window["dash_bio"] =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/lib/index.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/3dmol/build/3Dmol-min.js":
/*!***********************************************!*\
  !*** ./node_modules/3dmol/build/3Dmol-min.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n jQuery JavaScript Library v3.2.1\n https://jquery.com/\n\n Includes Sizzle.js\n https://sizzlejs.com/\n\n Copyright JS Foundation and other contributors\n Released under the MIT license\n https://jquery.org/license\n\n Date: 2017-03-20T18:59Z\n Sizzle CSS Selector Engine v2.3.3\n https://sizzlejs.com/\n\n Copyright jQuery Foundation and other contributors\n Released under the MIT license\n http://jquery.org/license\n\n Date: 2016-08-08\n*/\nvar $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(n,C,A){n instanceof String&&(n=String(n));for(var G=n.length,B=0;B<G;B++){var la=n[B];if(C.call(A,la,B,n))return{i:B,v:la}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||\"function\"==typeof Object.defineProperties?Object.defineProperty:function(n,C,A){n!=Array.prototype&&n!=Object.prototype&&(n[C]=A.value)};\n$jscomp.getGlobal=function(n){return\"undefined\"!=typeof window&&window===n?n:\"undefined\"!=typeof global&&null!=global?global:n};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(n,C,A,G){if(C){A=$jscomp.global;n=n.split(\".\");for(G=0;G<n.length-1;G++){var B=n[G];B in A||(A[B]={});A=A[B]}n=n[n.length-1];G=A[n];C=C(G);C!=G&&null!=C&&$jscomp.defineProperty(A,n,{configurable:!0,writable:!0,value:C})}};\n$jscomp.polyfill(\"Array.prototype.find\",function(n){return n?n:function(n,A){return $jscomp.findInternal(this,n,A).v}},\"es6\",\"es3\");\n(function(n,C){ true&&\"object\"===typeof module.exports?module.exports=n.document?C(n,!0):function(n){if(!n.document)throw Error(\"jQuery requires a window with a document\");return C(n)}:C(n)})(\"undefined\"!==typeof window?window:this,function(n,C){function A(a,b){b=b||p;var d=b.createElement(\"script\");d.text=a;b.head.appendChild(d).parentNode.removeChild(d)}function G(a){var b=!!a&&\"length\"in a&&a.length,d=c.type(a);return\"function\"===d||c.isWindow(a)?!1:\"array\"===d||0===b||\"number\"===\ntypeof b&&0<b&&b-1 in a}function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}function la(a,b,d){if(c.isFunction(b))return c.grep(a,function(a,c){return!!b.call(a,c,a)!==d});if(b.nodeType)return c.grep(a,function(a){return a===b!==d});if(\"string\"!==typeof b)return c.grep(a,function(a){return-1<va.call(b,a)!==d});if(Pb.test(b))return c.filter(b,a,d);b=c.filter(b,a);return c.grep(a,function(a){return-1<va.call(b,a)!==d&&1===a.nodeType})}function Za(a,b){for(;(a=a[b])&&1!==a.nodeType;);\nreturn a}function Qb(a){var b={};c.each(a.match(S)||[],function(a,c){b[c]=!0});return b}function ma(a){return a}function na(a){throw a;}function $a(a,b,d,e){var f;try{a&&c.isFunction(f=a.promise)?f.call(a).done(b).fail(d):a&&c.isFunction(f=a.then)?f.call(a,b,d):b.apply(void 0,[a].slice(e))}catch(g){d.apply(void 0,[g])}}function ca(){p.removeEventListener(\"DOMContentLoaded\",ca);n.removeEventListener(\"load\",ca);c.ready()}function da(){this.expando=c.expando+da.uid++}function ab(a,b,d){if(void 0===d&&\n1===a.nodeType)if(d=\"data-\"+b.replace(Rb,\"-$&\").toLowerCase(),d=a.getAttribute(d),\"string\"===typeof d){try{var c=d;d=\"true\"===c?!0:\"false\"===c?!1:\"null\"===c?null:c===+c+\"\"?+c:Sb.test(c)?JSON.parse(c):c}catch(f){}M.set(a,b,d)}else d=void 0;return d}function bb(a,b,d,e){var f=1,g=20,h=e?function(){return e.cur()}:function(){return c.css(a,b,\"\")},l=h(),k=d&&d[3]||(c.cssNumber[b]?\"\":\"px\"),m=(c.cssNumber[b]||\"px\"!==k&&+l)&&oa.exec(c.css(a,b));if(m&&m[3]!==k){k=k||m[3];d=d||[];m=+l||1;do f=f||\".5\",m/=f,\nc.style(a,b,m+k);while(f!==(f=h()/l)&&1!==f&&--g)}if(d){m=+m||+l||0;var t=d[1]?m+(d[1]+1)*d[2]:+d[2];e&&(e.unit=k,e.start=m,e.end=t)}return t}function pa(a,b){for(var d,e,f=[],g=0,h=a.length;g<h;g++)if(e=a[g],e.style)if(d=e.style.display,b){if(\"none\"===d&&(f[g]=v.get(e,\"display\")||null,f[g]||(e.style.display=\"\")),\"\"===e.style.display&&wa(e)){d=g;var l=e.ownerDocument;e=e.nodeName;var k=cb[e];k||(l=l.body.appendChild(l.createElement(e)),k=c.css(l,\"display\"),l.parentNode.removeChild(l),\"none\"===k&&\n(k=\"block\"),cb[e]=k);l=k;f[d]=l}}else\"none\"!==d&&(f[g]=\"none\",v.set(e,\"display\",d));for(g=0;g<h;g++)null!=f[g]&&(a[g].style.display=f[g]);return a}function H(a,b){var d=\"undefined\"!==typeof a.getElementsByTagName?a.getElementsByTagName(b||\"*\"):\"undefined\"!==typeof a.querySelectorAll?a.querySelectorAll(b||\"*\"):[];return void 0===b||b&&B(a,b)?c.merge([a],d):d}function Na(a,b){for(var d=0,c=a.length;d<c;d++)v.set(a[d],\"globalEval\",!b||v.get(b[d],\"globalEval\"))}function db(a,b,d,e,f){for(var g,h,l,k=\nb.createDocumentFragment(),m=[],t=0,n=a.length;t<n;t++)if((g=a[t])||0===g)if(\"object\"===c.type(g))c.merge(m,g.nodeType?[g]:g);else if(Tb.test(g)){h=h||k.appendChild(b.createElement(\"div\"));l=(eb.exec(g)||[\"\",\"\"])[1].toLowerCase();l=D[l]||D._default;h.innerHTML=l[1]+c.htmlPrefilter(g)+l[2];for(l=l[0];l--;)h=h.lastChild;c.merge(m,h.childNodes);h=k.firstChild;h.textContent=\"\"}else m.push(b.createTextNode(g));k.textContent=\"\";for(t=0;g=m[t++];)if(e&&-1<c.inArray(g,e))f&&f.push(g);else if(a=c.contains(g.ownerDocument,\ng),h=H(k.appendChild(g),\"script\"),a&&Na(h),d)for(l=0;g=h[l++];)fb.test(g.type||\"\")&&d.push(g);return k}function Ba(){return!0}function Z(){return!1}function gb(){try{return p.activeElement}catch(a){}}function Oa(a,b,d,e,f,g){var h;if(\"object\"===typeof b){\"string\"!==typeof d&&(e=e||d,d=void 0);for(h in b)Oa(a,h,d,e,b[h],g);return a}null==e&&null==f?(f=d,e=d=void 0):null==f&&(\"string\"===typeof d?(f=e,e=void 0):(f=e,e=d,d=void 0));if(!1===f)f=Z;else if(!f)return a;if(1===g){var l=f;f=function(a){c().off(a);\nreturn l.apply(this,arguments)};f.guid=l.guid||(l.guid=c.guid++)}return a.each(function(){c.event.add(this,b,f,e,d)})}function hb(a,b){return B(a,\"table\")&&B(11!==b.nodeType?b:b.firstChild,\"tr\")?c(\">tbody\",a)[0]||a:a}function Ub(a){a.type=(null!==a.getAttribute(\"type\"))+\"/\"+a.type;return a}function Vb(a){var b=Wb.exec(a.type);b?a.type=b[1]:a.removeAttribute(\"type\");return a}function ib(a,b){var d,e;if(1===b.nodeType){if(v.hasData(a)){var f=v.access(a);var g=v.set(b,f);if(f=f.events)for(e in delete g.handle,\ng.events={},f)for(g=0,d=f[e].length;g<d;g++)c.event.add(b,e,f[e][g])}M.hasData(a)&&(a=M.access(a),a=c.extend({},a),M.set(b,a))}}function qa(a,b,d,e){b=jb.apply([],b);var f,g=0,h=a.length,l=h-1,k=b[0],m=c.isFunction(k);if(m||1<h&&\"string\"===typeof k&&!q.checkClone&&Xb.test(k))return a.each(function(c){var f=a.eq(c);m&&(b[0]=k.call(this,c,f.html()));qa(f,b,d,e)});if(h){var t=db(b,a[0].ownerDocument,!1,a,e);var n=t.firstChild;1===t.childNodes.length&&(t=n);if(n||e){n=c.map(H(t,\"script\"),Ub);for(f=n.length;g<\nh;g++){var r=t;g!==l&&(r=c.clone(r,!0,!0),f&&c.merge(n,H(r,\"script\")));d.call(a[g],r,g)}if(f)for(t=n[n.length-1].ownerDocument,c.map(n,Vb),g=0;g<f;g++)r=n[g],fb.test(r.type||\"\")&&!v.access(r,\"globalEval\")&&c.contains(t,r)&&(r.src?c._evalUrl&&c._evalUrl(r.src):A(r.textContent.replace(Yb,\"\"),t))}}return a}function kb(a,b,d){for(var e=b?c.filter(b,a):a,f=0;null!=(b=e[f]);f++)d||1!==b.nodeType||c.cleanData(H(b)),b.parentNode&&(d&&c.contains(b.ownerDocument,b)&&Na(H(b,\"script\")),b.parentNode.removeChild(b));\nreturn a}function ra(a,b,d){var e=a.style;if(d=d||Ga(a)){var f=d.getPropertyValue(b)||d[b];\"\"!==f||c.contains(a.ownerDocument,a)||(f=c.style(a,b));if(!q.pixelMarginRight()&&Pa.test(f)&&lb.test(b)){a=e.width;b=e.minWidth;var g=e.maxWidth;e.minWidth=e.maxWidth=e.width=f;f=d.width;e.width=a;e.minWidth=b;e.maxWidth=g}}return void 0!==f?f+\"\":f}function mb(a,b){return{get:function(){if(a())delete this.get;else return(this.get=b).apply(this,arguments)}}}function nb(a){var b=c.cssProps[a];if(!b){b=c.cssProps;\na:{var d=a;if(!(d in ob)){for(var e=d[0].toUpperCase()+d.slice(1),f=pb.length;f--;)if(d=pb[f]+e,d in ob)break a;d=void 0}}b=b[a]=d||a}return b}function qb(a,b,d){return(a=oa.exec(b))?Math.max(0,a[2]-(d||0))+(a[3]||\"px\"):b}function rb(a,b,d,e,f){var g=0;for(b=d===(e?\"border\":\"content\")?4:\"width\"===b?1:0;4>b;b+=2)\"margin\"===d&&(g+=c.css(a,d+ba[b],!0,f)),e?(\"content\"===d&&(g-=c.css(a,\"padding\"+ba[b],!0,f)),\"margin\"!==d&&(g-=c.css(a,\"border\"+ba[b]+\"Width\",!0,f))):(g+=c.css(a,\"padding\"+ba[b],!0,f),\"padding\"!==\nd&&(g+=c.css(a,\"border\"+ba[b]+\"Width\",!0,f)));return g}function sb(a,b,d){var e=Ga(a),f=ra(a,b,e),g=\"border-box\"===c.css(a,\"boxSizing\",!1,e);if(Pa.test(f))return f;var h=g&&(q.boxSizingReliable()||f===a.style[b]);\"auto\"===f&&(f=a[\"offset\"+b[0].toUpperCase()+b.slice(1)]);f=parseFloat(f)||0;return f+rb(a,b,d||(g?\"border\":\"content\"),h,e)+\"px\"}function I(a,b,d,c,f){return new I.prototype.init(a,b,d,c,f)}function Qa(){Ha&&(!1===p.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(Qa):n.setTimeout(Qa,\nc.fx.interval),c.fx.tick())}function tb(){n.setTimeout(function(){sa=void 0});return sa=c.now()}function Ia(a,b){var d=0,c={height:a};for(b=b?1:0;4>d;d+=2-b){var f=ba[d];c[\"margin\"+f]=c[\"padding\"+f]=a}b&&(c.opacity=c.width=a);return c}function ub(a,b,d){for(var c,f=(T.tweeners[b]||[]).concat(T.tweeners[\"*\"]),g=0,h=f.length;g<h;g++)if(c=f[g].call(d,b,a))return c}function Zb(a,b){var d,e;for(d in a){var f=c.camelCase(d);var g=b[f];var h=a[d];Array.isArray(h)&&(g=h[1],h=a[d]=h[0]);d!==f&&(a[f]=h,delete a[d]);\nif((e=c.cssHooks[f])&&\"expand\"in e)for(d in h=e.expand(h),delete a[f],h)d in a||(a[d]=h[d],b[d]=g);else b[f]=g}}function T(a,b,d){var e,f=0,g=T.prefilters.length,h=c.Deferred().always(function(){delete l.elem}),l=function(){if(e)return!1;var b=sa||tb();b=Math.max(0,k.startTime+k.duration-b);for(var d=1-(b/k.duration||0),c=0,f=k.tweens.length;c<f;c++)k.tweens[c].run(d);h.notifyWith(a,[k,d,b]);if(1>d&&f)return b;f||h.notifyWith(a,[k,1,0]);h.resolveWith(a,[k]);return!1},k=h.promise({elem:a,props:c.extend({},\nb),opts:c.extend(!0,{specialEasing:{},easing:c.easing._default},d),originalProperties:b,originalOptions:d,startTime:sa||tb(),duration:d.duration,tweens:[],createTween:function(b,d){b=c.Tween(a,k.opts,b,d,k.opts.specialEasing[b]||k.opts.easing);k.tweens.push(b);return b},stop:function(b){var d=0,c=b?k.tweens.length:0;if(e)return this;for(e=!0;d<c;d++)k.tweens[d].run(1);b?(h.notifyWith(a,[k,1,0]),h.resolveWith(a,[k,b])):h.rejectWith(a,[k,b]);return this}});d=k.props;for(Zb(d,k.opts.specialEasing);f<\ng;f++)if(b=T.prefilters[f].call(k,a,d,k.opts))return c.isFunction(b.stop)&&(c._queueHooks(k.elem,k.opts.queue).stop=c.proxy(b.stop,b)),b;c.map(d,ub,k);c.isFunction(k.opts.start)&&k.opts.start.call(a,k);k.progress(k.opts.progress).done(k.opts.done,k.opts.complete).fail(k.opts.fail).always(k.opts.always);c.fx.timer(c.extend(l,{elem:a,anim:k,queue:k.opts.queue}));return k}function L(a){return(a.match(S)||[]).join(\" \")}function ea(a){return a.getAttribute&&a.getAttribute(\"class\")||\"\"}function Ra(a,b,\nd,e){var f;if(Array.isArray(b))c.each(b,function(b,c){d||$b.test(a)?e(a,c):Ra(a+\"[\"+(\"object\"===typeof c&&null!=c?b:\"\")+\"]\",c,d,e)});else if(d||\"object\"!==c.type(b))e(a,b);else for(f in b)Ra(a+\"[\"+f+\"]\",b[f],d,e)}function vb(a){return function(b,d){\"string\"!==typeof b&&(d=b,b=\"*\");var e=0,f=b.toLowerCase().match(S)||[];if(c.isFunction(d))for(;b=f[e++];)\"+\"===b[0]?(b=b.slice(1)||\"*\",(a[b]=a[b]||[]).unshift(d)):(a[b]=a[b]||[]).push(d)}}function wb(a,b,d,e){function f(l){var k;g[l]=!0;c.each(a[l]||[],\nfunction(a,c){a=c(b,d,e);if(\"string\"===typeof a&&!h&&!g[a])return b.dataTypes.unshift(a),f(a),!1;if(h)return!(k=a)});return k}var g={},h=a===Sa;return f(b.dataTypes[0])||!g[\"*\"]&&f(\"*\")}function Ta(a,b){var d,e,f=c.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((f[d]?a:e||(e={}))[d]=b[d]);e&&c.extend(!0,a,e);return a}var U=[],p=n.document,ac=Object.getPrototypeOf,fa=U.slice,jb=U.concat,Ua=U.push,va=U.indexOf,Ja={},xb=Ja.toString,Ka=Ja.hasOwnProperty,yb=Ka.toString,bc=yb.call(Object),q={},\nc=function(a,b){return new c.fn.init(a,b)},cc=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,dc=/^-ms-/,ec=/-([a-z])/g,fc=function(a,b){return b.toUpperCase()};c.fn=c.prototype={jquery:\"3.2.1\",constructor:c,length:0,toArray:function(){return fa.call(this)},get:function(a){return null==a?fa.call(this):0>a?this[a+this.length]:this[a]},pushStack:function(a){a=c.merge(this.constructor(),a);a.prevObject=this;return a},each:function(a){return c.each(this,a)},map:function(a){return this.pushStack(c.map(this,function(b,\nd){return a.call(b,d,b)}))},slice:function(){return this.pushStack(fa.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&a<b?[this[a]]:[])},end:function(){return this.prevObject||this.constructor()},push:Ua,sort:U.sort,splice:U.splice};c.extend=c.fn.extend=function(){var a,b,d,e=arguments[0]||{},f=1,g=arguments.length,h=!1;\"boolean\"===typeof e&&(h=e,e=arguments[f]||{},f++);\"object\"===\ntypeof e||c.isFunction(e)||(e={});f===g&&(e=this,f--);for(;f<g;f++)if(null!=(a=arguments[f]))for(b in a){var l=e[b];var k=a[b];e!==k&&(h&&k&&(c.isPlainObject(k)||(d=Array.isArray(k)))?(d?(d=!1,l=l&&Array.isArray(l)?l:[]):l=l&&c.isPlainObject(l)?l:{},e[b]=c.extend(h,l,k)):void 0!==k&&(e[b]=k))}return e};c.extend({expando:\"jQuery\"+(\"3.2.1\"+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(a){throw Error(a);},noop:function(){},isFunction:function(a){return\"function\"===c.type(a)},isWindow:function(a){return null!=\na&&a===a.window},isNumeric:function(a){var b=c.type(a);return(\"number\"===b||\"string\"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){if(!a||\"[object Object]\"!==xb.call(a))return!1;a=ac(a);if(!a)return!0;a=Ka.call(a,\"constructor\")&&a.constructor;return\"function\"===typeof a&&yb.call(a)===bc},isEmptyObject:function(a){for(var b in a)return!1;return!0},type:function(a){return null==a?a+\"\":\"object\"===typeof a||\"function\"===typeof a?Ja[xb.call(a)]||\"object\":typeof a},globalEval:function(a){A(a)},\ncamelCase:function(a){return a.replace(dc,\"ms-\").replace(ec,fc)},each:function(a,b){var d,c=0;if(G(a))for(d=a.length;c<d&&!1!==b.call(a[c],c,a[c]);c++);else for(c in a)if(!1===b.call(a[c],c,a[c]))break;return a},trim:function(a){return null==a?\"\":(a+\"\").replace(cc,\"\")},makeArray:function(a,b){b=b||[];null!=a&&(G(Object(a))?c.merge(b,\"string\"===typeof a?[a]:a):Ua.call(b,a));return b},inArray:function(a,b,d){return null==b?-1:va.call(b,a,d)},merge:function(a,b){for(var d=+b.length,c=0,f=a.length;c<\nd;c++)a[f++]=b[c];a.length=f;return a},grep:function(a,b,c){for(var d=[],f=0,g=a.length,h=!c;f<g;f++)c=!b(a[f],f),c!==h&&d.push(a[f]);return d},map:function(a,b,c){var d,f=0,g=[];if(G(a))for(d=a.length;f<d;f++){var h=b(a[f],f,c);null!=h&&g.push(h)}else for(f in a)h=b(a[f],f,c),null!=h&&g.push(h);return jb.apply([],g)},guid:1,proxy:function(a,b){if(\"string\"===typeof b){var d=a[b];b=a;a=d}if(c.isFunction(a)){var e=fa.call(arguments,2);d=function(){return a.apply(b||this,e.concat(fa.call(arguments)))};\nd.guid=a.guid=a.guid||c.guid++;return d}},now:Date.now,support:q});\"function\"===typeof Symbol&&(c.fn[Symbol.iterator]=U[Symbol.iterator]);c.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(a,b){Ja[\"[object \"+b+\"]\"]=b.toLowerCase()});var ka=function(a){function b(a,b,c,d){var e,f,g,E,h=b&&b.ownerDocument,w=b?b.nodeType:9;c=c||[];if(\"string\"!==typeof a||!a||1!==w&&9!==w&&11!==w)return c;if(!d&&((b?b.ownerDocument||b:V)!==x&&xa(b),b=b||x,W)){if(11!==w&&\n(E=va.exec(a)))if(e=E[1])if(9===w)if(f=b.getElementById(e)){if(f.id===e)return c.push(f),c}else return c;else{if(h&&(f=h.getElementById(e))&&A(b,f)&&f.id===e)return c.push(f),c}else{if(E[2])return ta.apply(c,b.getElementsByTagName(a)),c;if((e=E[3])&&J.getElementsByClassName&&b.getElementsByClassName)return ta.apply(c,b.getElementsByClassName(e)),c}if(!(!J.qsa||I[a+\" \"]||Q&&Q.test(a))){if(1!==w){h=b;var K=a}else if(\"object\"!==b.nodeName.toLowerCase()){(g=b.getAttribute(\"id\"))?g=g.replace(oa,ra):b.setAttribute(\"id\",\ng=y);f=ca(a);for(e=f.length;e--;)f[e]=\"#\"+g+\" \"+v(f[e]);K=f.join(\",\");h=da.test(a)&&u(b.parentNode)||b}if(K)try{return ta.apply(c,h.querySelectorAll(K)),c}catch(Kc){}finally{g===y&&b.removeAttribute(\"id\")}}}return Ba(a.replace(U,\"$1\"),b,c,d)}function c(){function a(c,d){b.push(c+\" \")>F.cacheLength&&delete a[b.shift()];return a[c+\" \"]=d}var b=[];return a}function e(a){a[y]=!0;return a}function f(a){var b=x.createElement(\"fieldset\");try{return!!a(b)}catch(w){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}\nfunction g(a,b){a=a.split(\"|\");for(var c=a.length;c--;)F.attrHandle[a[c]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function l(a){return function(b){return\"input\"===b.nodeName.toLowerCase()&&b.type===a}}function k(a){return function(b){var c=b.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function m(a){return function(b){return\"form\"in b?b.parentNode&&\n!1===b.disabled?\"label\"in b?\"label\"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&za(b)===a:b.disabled===a:\"label\"in b?b.disabled===a:!1}}function n(a){return e(function(b){b=+b;return e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function u(a){return a&&\"undefined\"!==typeof a.getElementsByTagName&&a}function r(){}function v(a){for(var b=0,c=a.length,d=\"\";b<c;b++)d+=a[b].value;return d}function Fa(a,b,\nc){var d=b.dir,e=b.next,f=e||d,g=c&&\"parentNode\"===f,E=M++;return b.first?function(b,c,e){for(;b=b[d];)if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,h){var w,l=[ha,E];if(h)for(;b=b[d];){if((1===b.nodeType||g)&&a(b,c,h))return!0}else for(;b=b[d];)if(1===b.nodeType||g){var k=b[y]||(b[y]={});k=k[b.uniqueID]||(k[b.uniqueID]={});if(e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((w=k[f])&&w[0]===ha&&w[1]===E)return l[2]=w[2];k[f]=l;if(l[2]=a(b,c,h))return!0}}return!1}}function p(a){return 1<\na.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,b,c,d,e){for(var f,g=[],E=0,h=a.length,w=null!=b;E<h;E++)if(f=a[E])if(!c||c(f,d,e))g.push(f),w&&b.push(E);return g}function B(a,c,d,f,g,h){f&&!f[y]&&(f=B(f));g&&!g[y]&&(g=B(g,h));return e(function(e,E,h,w){var l,k=[],m=[],K=E.length,P;if(!(P=e)){P=c||\"*\";for(var n=h.nodeType?[h]:h,t=[],Ca=0,Ea=n.length;Ca<Ea;Ca++)b(P,n[Ca],t);P=t}P=!a||!e&&c?P:q(P,k,a,h,w);n=d?g||(e?a:K||f)?[]:E:P;d&&d(P,n,h,w);if(f){var u=\nq(n,m);f(u,[],h,w);for(h=u.length;h--;)if(l=u[h])n[m[h]]=!(P[m[h]]=l)}if(e){if(g||a){if(g){u=[];for(h=n.length;h--;)(l=n[h])&&u.push(P[h]=l);g(null,n=[],u,w)}for(h=n.length;h--;)(l=n[h])&&-1<(u=g?L(e,l):k[h])&&(e[u]=!(E[u]=l))}}else n=q(n===E?n.splice(K,n.length):n),g?g(null,E,n,w):ta.apply(E,n)})}function z(a){var b,c,d=a.length,e=F.relative[a[0].type];var f=e||F.relative[\" \"];for(var g=e?1:0,h=Fa(function(a){return a===b},f,!0),E=Fa(function(a){return-1<L(b,a)},f,!0),l=[function(a,c,d){a=!e&&(d||\nc!==N)||((b=c).nodeType?h(a,c,d):E(a,c,d));b=null;return a}];g<d;g++)if(f=F.relative[a[g].type])l=[Fa(p(l),f)];else{f=F.filter[a[g].type].apply(null,a[g].matches);if(f[y]){for(c=++g;c<d&&!F.relative[a[c].type];c++);return B(1<g&&p(l),1<g&&v(a.slice(0,g-1).concat({value:\" \"===a[g-2].type?\"*\":\"\"})).replace(U,\"$1\"),f,g<c&&z(a.slice(g,c)),c<d&&z(a=a.slice(c)),c<d&&v(a))}l.push(f)}return p(l)}function gc(a,c){var d=0<c.length,f=0<a.length,g=function(e,g,h,E,w){var l,k,m=0,K=\"0\",P=e&&[],n=[],t=N,Ca=e||\nf&&F.find.TAG(\"*\",w),u=ha+=null==t?1:Math.random()||.1,r=Ca.length;for(w&&(N=g===x||g||w);K!==r&&null!=(l=Ca[K]);K++){if(f&&l){var Ea=0;g||l.ownerDocument===x||(xa(l),h=!W);for(;k=a[Ea++];)if(k(l,g||x,h)){E.push(l);break}w&&(ha=u)}d&&((l=!k&&l)&&m--,e&&P.push(l))}m+=K;if(d&&K!==m){for(Ea=0;k=c[Ea++];)k(P,n,g,h);if(e){if(0<m)for(;K--;)P[K]||n[K]||(n[K]=T.call(E));n=q(n)}ta.apply(E,n);w&&!e&&0<n.length&&1<m+c.length&&b.uniqueSort(E)}w&&(ha=u,N=t);return P};return d?e(g):g}var O,N,R,Da,x,X,W,Q,ya,C,\nA,y=\"sizzle\"+1*new Date,V=a.document,ha=0,M=0,H=c(),zb=c(),I=c(),G=function(a,b){a===b&&(Da=!0);return 0},S={}.hasOwnProperty,D=[],T=D.pop,aa=D.push,ta=D.push,ba=D.slice,L=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ea=/[\\x20\\t\\r\\n\\f]+/g,U=/^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$/g,fa=/^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*/,ka=/^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*/,la=/=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]/g,ma=/:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,\npa=/^(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+$/,Z={ID:/^#((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,CLASS:/^\\.((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,TAG:/^((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+|[*])/,ATTR:/^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\]/,PSEUDO:/^:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,\nCHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)/i},qa=/^(?:input|select|textarea|button)$/i,sa=/^h\\d$/i,Y=/^[^{]+\\{\\s*\\[native \\w/,\nva=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,da=/[+~]/,ia=/\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)/ig,ja=function(a,b,c){a=\"0x\"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)},oa=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,ra=function(a,b){return b?\"\\x00\"===a?\"\\ufffd\":a.slice(0,-1)+\"\\\\\"+a.charCodeAt(a.length-1).toString(16)+\" \":\"\\\\\"+a},ua=function(){xa()},za=Fa(function(a){return!0===a.disabled&&(\"form\"in a||\"label\"in a)},{dir:\"parentNode\",\nnext:\"legend\"});try{ta.apply(D=ba.call(V.childNodes),V.childNodes),D[V.childNodes.length].nodeType}catch(E){ta={apply:D.length?function(a,b){aa.apply(a,ba.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}var J=b.support={};var Aa=b.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?\"HTML\"!==a.nodeName:!1};var xa=b.setDocument=function(a){var b;a=a?a.ownerDocument||a:V;if(a===x||9!==a.nodeType||!a.documentElement)return x;x=a;X=x.documentElement;W=!Aa(x);\nV!==x&&(b=x.defaultView)&&b.top!==b&&(b.addEventListener?b.addEventListener(\"unload\",ua,!1):b.attachEvent&&b.attachEvent(\"onunload\",ua));J.attributes=f(function(a){a.className=\"i\";return!a.getAttribute(\"className\")});J.getElementsByTagName=f(function(a){a.appendChild(x.createComment(\"\"));return!a.getElementsByTagName(\"*\").length});J.getElementsByClassName=Y.test(x.getElementsByClassName);J.getById=f(function(a){X.appendChild(a).id=y;return!x.getElementsByName||!x.getElementsByName(y).length});J.getById?\n(F.filter.ID=function(a){var b=a.replace(ia,ja);return function(a){return a.getAttribute(\"id\")===b}},F.find.ID=function(a,b){if(\"undefined\"!==typeof b.getElementById&&W)return(a=b.getElementById(a))?[a]:[]}):(F.filter.ID=function(a){var b=a.replace(ia,ja);return function(a){return(a=\"undefined\"!==typeof a.getAttributeNode&&a.getAttributeNode(\"id\"))&&a.value===b}},F.find.ID=function(a,b){if(\"undefined\"!==typeof b.getElementById&&W){var c,d=b.getElementById(a);if(d){if((c=d.getAttributeNode(\"id\"))&&\nc.value===a)return[d];var e=b.getElementsByName(a);for(b=0;d=e[b++];)if((c=d.getAttributeNode(\"id\"))&&c.value===a)return[d]}return[]}});F.find.TAG=J.getElementsByTagName?function(a,b){if(\"undefined\"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a);if(J.qsa)return b.querySelectorAll(a)}:function(a,b){var c=[],d=0;b=b.getElementsByTagName(a);if(\"*\"===a){for(;a=b[d++];)1===a.nodeType&&c.push(a);return c}return b};F.find.CLASS=J.getElementsByClassName&&function(a,b){if(\"undefined\"!==typeof b.getElementsByClassName&&\nW)return b.getElementsByClassName(a)};ya=[];Q=[];if(J.qsa=Y.test(x.querySelectorAll))f(function(a){X.appendChild(a).innerHTML=\"<a id='\"+y+\"'></a><select id='\"+y+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\";a.querySelectorAll(\"[msallowcapture^='']\").length&&Q.push(\"[*^$]=[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:''|\\\"\\\")\");a.querySelectorAll(\"[selected]\").length||Q.push(\"\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)\");\na.querySelectorAll(\"[id~=\"+y+\"-]\").length||Q.push(\"~=\");a.querySelectorAll(\":checked\").length||Q.push(\":checked\");a.querySelectorAll(\"a#\"+y+\"+*\").length||Q.push(\".#.+[+~]\")}),f(function(a){a.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var b=x.createElement(\"input\");b.setAttribute(\"type\",\"hidden\");a.appendChild(b).setAttribute(\"name\",\"D\");a.querySelectorAll(\"[name=d]\").length&&Q.push(\"name[\\\\x20\\\\t\\\\r\\\\n\\\\f]*[*^$|!~]?=\");2!==a.querySelectorAll(\":enabled\").length&&\nQ.push(\":enabled\",\":disabled\");X.appendChild(a).disabled=!0;2!==a.querySelectorAll(\":disabled\").length&&Q.push(\":enabled\",\":disabled\");a.querySelectorAll(\"*,:x\");Q.push(\",.*:\")});(J.matchesSelector=Y.test(C=X.matches||X.webkitMatchesSelector||X.mozMatchesSelector||X.oMatchesSelector||X.msMatchesSelector))&&f(function(a){J.disconnectedMatch=C.call(a,\"*\");C.call(a,\"[s!='']:x\");ya.push(\"!=\",\":((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:[\\\\x20\\\\t\\\\r\\\\n\\\\f]*([*^$|!~]?=)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+))|)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*\\\\])*)|.*)\\\\)|)\")});\nQ=Q.length&&new RegExp(Q.join(\"|\"));ya=ya.length&&new RegExp(ya.join(\"|\"));A=(b=Y.test(X.compareDocumentPosition))||Y.test(X.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a;b=b&&b.parentNode;return a===b||!!(b&&1===b.nodeType&&(c.contains?c.contains(b):a.compareDocumentPosition&&a.compareDocumentPosition(b)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};G=b?function(a,b){if(a===b)return Da=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;\nif(c)return c;c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;return c&1||!J.sortDetached&&b.compareDocumentPosition(a)===c?a===x||a.ownerDocument===V&&A(V,a)?-1:b===x||b.ownerDocument===V&&A(V,b)?1:R?L(R,a)-L(R,b):0:c&4?-1:1}:function(a,b){if(a===b)return Da=!0,0;var c=0,d=a.parentNode,e=b.parentNode,f=[a],g=[b];if(!d||!e)return a===x?-1:b===x?1:d?-1:e?1:R?L(R,a)-L(R,b):0;if(d===e)return h(a,b);for(;a=a.parentNode;)f.unshift(a);for(a=b;a=a.parentNode;)g.unshift(a);for(;f[c]===\ng[c];)c++;return c?h(f[c],g[c]):f[c]===V?-1:g[c]===V?1:0};return x};b.matches=function(a,c){return b(a,null,null,c)};b.matchesSelector=function(a,c){(a.ownerDocument||a)!==x&&xa(a);c=c.replace(la,\"='$1']\");if(!(!J.matchesSelector||!W||I[c+\" \"]||ya&&ya.test(c)||Q&&Q.test(c)))try{var d=C.call(a,c);if(d||J.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(P){}return 0<b(c,x,null,[a]).length};b.contains=function(a,b){(a.ownerDocument||a)!==x&&xa(a);return A(a,b)};b.attr=function(a,\nb){(a.ownerDocument||a)!==x&&xa(a);var c=F.attrHandle[b.toLowerCase()];c=c&&S.call(F.attrHandle,b.toLowerCase())?c(a,b,!W):void 0;return void 0!==c?c:J.attributes||!W?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};b.escape=function(a){return(a+\"\").replace(oa,ra)};b.error=function(a){throw Error(\"Syntax error, unrecognized expression: \"+a);};b.uniqueSort=function(a){var b,c=[],d=0,e=0;Da=!J.detectDuplicates;R=!J.sortStable&&a.slice(0);a.sort(G);if(Da){for(;b=a[e++];)b===a[e]&&\n(d=c.push(e));for(;d--;)a.splice(c[d],1)}R=null;return a};var na=b.getText=function(a){var b=\"\",c=0;var d=a.nodeType;if(!d)for(;d=a[c++];)b+=na(d);else if(1===d||9===d||11===d){if(\"string\"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=na(a)}else if(3===d||4===d)return a.nodeValue;return b};var F=b.selectors={cacheLength:50,createPseudo:e,match:Z,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\n\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(ia,ja);a[3]=(a[3]||a[4]||a[5]||\"\").replace(ia,ja);\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();\"nth\"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&b.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(Z.CHILD.test(a[0]))return null;a[3]?a[2]=a[4]||a[5]||\"\":c&&ma.test(c)&&\n(b=ca(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(ia,ja).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=H[a+\" \"];return b||(b=new RegExp(\"(^|[\\\\x20\\\\t\\\\r\\\\n\\\\f])\"+a+\"([\\\\x20\\\\t\\\\r\\\\n\\\\f]|$)\"),H(a,function(a){return b.test(\"string\"===typeof a.className&&a.className||\"undefined\"!==typeof a.getAttribute&&a.getAttribute(\"class\")||\n\"\")}))},ATTR:function(a,c,d){return function(e){e=b.attr(e,a);if(null==e)return\"!=\"===c;if(!c)return!0;e+=\"\";return\"=\"===c?e===d:\"!=\"===c?e!==d:\"^=\"===c?d&&0===e.indexOf(d):\"*=\"===c?d&&-1<e.indexOf(d):\"$=\"===c?d&&e.slice(-d.length)===d:\"~=\"===c?-1<(\" \"+e.replace(ea,\" \")+\" \").indexOf(d):\"|=\"===c?e===d||e.slice(0,d.length+1)===d+\"-\":!1}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,l){var k,\nm;c=f!==g?\"nextSibling\":\"previousSibling\";var E=b.parentNode,n=h&&b.nodeName.toLowerCase();l=!l&&!h;var w=!1;if(E){if(f){for(;c;){for(k=b;k=k[c];)if(h?k.nodeName.toLowerCase()===n:1===k.nodeType)return!1;var K=c=\"only\"===a&&!K&&\"nextSibling\"}return!0}K=[g?E.firstChild:E.lastChild];if(g&&l){k=E;var t=k[y]||(k[y]={});t=t[k.uniqueID]||(t[k.uniqueID]={});w=t[a]||[];w=(m=w[0]===ha&&w[1])&&w[2];for(k=m&&E.childNodes[m];k=++m&&k&&k[c]||(w=m=0)||K.pop();)if(1===k.nodeType&&++w&&k===b){t[a]=[ha,m,w];break}}else if(l&&\n(k=b,t=k[y]||(k[y]={}),t=t[k.uniqueID]||(t[k.uniqueID]={}),w=t[a]||[],w=m=w[0]===ha&&w[1]),!1===w)for(;(k=++m&&k&&k[c]||(w=m=0)||K.pop())&&((h?k.nodeName.toLowerCase()!==n:1!==k.nodeType)||!++w||(l&&(t=k[y]||(k[y]={}),t=t[k.uniqueID]||(t[k.uniqueID]={}),t[a]=[ha,w]),k!==b)););w-=e;return w===d||0===w%d&&0<=w/d}}},PSEUDO:function(a,c){var d=F.pseudos[a]||F.setFilters[a.toLowerCase()]||b.error(\"unsupported pseudo: \"+a);if(d[y])return d(c);if(1<d.length){var f=[a,a,\"\",c];return F.setFilters.hasOwnProperty(a.toLowerCase())?\ne(function(a,b){for(var e,f=d(a,c),g=f.length;g--;)e=L(a,f[g]),a[e]=!(b[e]=f[g])}):function(a){return d(a,0,f)}}return d}},pseudos:{not:e(function(a){var b=[],c=[],d=wa(a.replace(U,\"$1\"));return d[y]?e(function(a,b,c,e){e=d(a,null,e,[]);for(var f=a.length;f--;)if(c=e[f])a[f]=!(b[f]=c)}):function(a,e,f){b[0]=a;d(b,null,f,c);b[0]=null;return!c.pop()}}),has:e(function(a){return function(c){return 0<b(a,c).length}}),contains:e(function(a){a=a.replace(ia,ja);return function(b){return-1<(b.textContent||\nb.innerText||na(b)).indexOf(a)}}),lang:e(function(a){pa.test(a||\"\")||b.error(\"unsupported lang: \"+a);a=a.replace(ia,ja).toLowerCase();return function(b){var c;do if(c=W?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===X},focus:function(a){return a===x.activeElement&&(!x.hasFocus||\nx.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:m(!1),disabled:m(!0),checked:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&!!a.checked||\"option\"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!F.pseudos.empty(a)},header:function(a){return sa.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},\nbutton:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:n(function(){return[0]}),last:n(function(a,b){return[b-1]}),eq:n(function(a,b,c){return[0>c?c+b:c]}),even:n(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:n(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:n(function(a,b,c){for(b=\n0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:n(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};F.pseudos.nth=F.pseudos.eq;for(O in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})F.pseudos[O]=l(O);for(O in{submit:!0,reset:!0})F.pseudos[O]=k(O);r.prototype=F.filters=F.pseudos;F.setFilters=new r;var ca=b.tokenize=function(a,c){var d,e,f,g,h;if(g=zb[a+\" \"])return c?0:g.slice(0);g=a;var k=[];for(h=F.preFilter;g;){if(!l||(d=fa.exec(g)))d&&(g=g.slice(d[0].length)||g),k.push(e=[]);var l=!1;\nif(d=ka.exec(g))l=d.shift(),e.push({value:l,type:d[0].replace(U,\" \")}),g=g.slice(l.length);for(f in F.filter)!(d=Z[f].exec(g))||h[f]&&!(d=h[f](d))||(l=d.shift(),e.push({value:l,type:f,matches:d}),g=g.slice(l.length));if(!l)break}return c?g.length:g?b.error(a):zb(a,k).slice(0)};var wa=b.compile=function(a,b){var c,d=[],e=[],f=I[a+\" \"];if(!f){b||(b=ca(a));for(c=b.length;c--;)f=z(b[c]),f[y]?d.push(f):e.push(f);f=I(a,gc(e,d));f.selector=a}return f};var Ba=b.select=function(a,b,c,d){var e,f,g,h=\"function\"===\ntypeof a&&a,k=!d&&ca(a=h.selector||a);c=c||[];if(1===k.length){var l=k[0]=k[0].slice(0);if(2<l.length&&\"ID\"===(f=l[0]).type&&9===b.nodeType&&W&&F.relative[l[1].type]){b=(F.find.ID(f.matches[0].replace(ia,ja),b)||[])[0];if(!b)return c;h&&(b=b.parentNode);a=a.slice(l.shift().value.length)}for(e=Z.needsContext.test(a)?0:l.length;e--;){f=l[e];if(F.relative[g=f.type])break;if(g=F.find[g])if(d=g(f.matches[0].replace(ia,ja),da.test(l[0].type)&&u(b.parentNode)||b)){l.splice(e,1);a=d.length&&v(l);if(!a)return ta.apply(c,\nd),c;break}}}(h||wa(a,k))(d,b,!W,c,!b||da.test(a)&&u(b.parentNode)||b);return c};J.sortStable=y.split(\"\").sort(G).join(\"\")===y;J.detectDuplicates=!!Da;xa();J.sortDetached=f(function(a){return a.compareDocumentPosition(x.createElement(\"fieldset\"))&1});f(function(a){a.innerHTML=\"<a href='#'></a>\";return\"#\"===a.firstChild.getAttribute(\"href\")})||g(\"type|href|height|width\",function(a,b,c){if(!c)return a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)});J.attributes&&f(function(a){a.innerHTML=\"<input/>\";\na.firstChild.setAttribute(\"value\",\"\");return\"\"===a.firstChild.getAttribute(\"value\")})||g(\"value\",function(a,b,c){if(!c&&\"input\"===a.nodeName.toLowerCase())return a.defaultValue});f(function(a){return null==a.getAttribute(\"disabled\")})||g(\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});return b}(n);c.find=ka;c.expr=\nka.selectors;c.expr[\":\"]=c.expr.pseudos;c.uniqueSort=c.unique=ka.uniqueSort;c.text=ka.getText;c.isXMLDoc=ka.isXML;c.contains=ka.contains;c.escapeSelector=ka.escape;var Y=function(a,b,d){for(var e=[],f=void 0!==d;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(f&&c(a).is(d))break;e.push(a)}return e},Ab=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},Bb=c.expr.match.needsContext,Cb=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i,Pb=/^.[^:#\\[\\.,]*$/;\nc.filter=function(a,b,d){var e=b[0];d&&(a=\":not(\"+a+\")\");return 1===b.length&&1===e.nodeType?c.find.matchesSelector(e,a)?[e]:[]:c.find.matches(a,c.grep(b,function(a){return 1===a.nodeType}))};c.fn.extend({find:function(a){var b,d=this.length,e=this;if(\"string\"!==typeof a)return this.pushStack(c(a).filter(function(){for(b=0;b<d;b++)if(c.contains(e[b],this))return!0}));var f=this.pushStack([]);for(b=0;b<d;b++)c.find(a,e[b],f);return 1<d?c.uniqueSort(f):f},filter:function(a){return this.pushStack(la(this,\na||[],!1))},not:function(a){return this.pushStack(la(this,a||[],!0))},is:function(a){return!!la(this,\"string\"===typeof a&&Bb.test(a)?c(a):a||[],!1).length}});var ic=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/;(c.fn.init=function(a,b,d){if(!a)return this;d=d||jc;if(\"string\"===typeof a){var e=\"<\"===a[0]&&\">\"===a[a.length-1]&&3<=a.length?[null,a,null]:ic.exec(a);if(!e||!e[1]&&b)return!b||b.jquery?(b||d).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof c?b[0]:b,c.merge(this,c.parseHTML(e[1],b&&\nb.nodeType?b.ownerDocument||b:p,!0)),Cb.test(e[1])&&c.isPlainObject(b))for(e in b)if(c.isFunction(this[e]))this[e](b[e]);else this.attr(e,b[e])}else if(a=p.getElementById(e[2]))this[0]=a,this.length=1;return this}return a.nodeType?(this[0]=a,this.length=1,this):c.isFunction(a)?void 0!==d.ready?d.ready(a):a(c):c.makeArray(a,this)}).prototype=c.fn;var jc=c(p);var kc=/^(?:parents|prev(?:Until|All))/,lc={children:!0,contents:!0,next:!0,prev:!0};c.fn.extend({has:function(a){var b=c(a,this),d=b.length;\nreturn this.filter(function(){for(var a=0;a<d;a++)if(c.contains(this,b[a]))return!0})},closest:function(a,b){var d,e=0,f=this.length,g=[],h=\"string\"!==typeof a&&c(a);if(!Bb.test(a))for(;e<f;e++)for(d=this[e];d&&d!==b;d=d.parentNode)if(11>d.nodeType&&(h?-1<h.index(d):1===d.nodeType&&c.find.matchesSelector(d,a))){g.push(d);break}return this.pushStack(1<g.length?c.uniqueSort(g):g)},index:function(a){return a?\"string\"===typeof a?va.call(c(a),this[0]):va.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?\nthis.first().prevAll().length:-1},add:function(a,b){return this.pushStack(c.uniqueSort(c.merge(this.get(),c(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});c.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return Y(a,\"parentNode\")},parentsUntil:function(a,b,c){return Y(a,\"parentNode\",c)},next:function(a){return Za(a,\"nextSibling\")},prev:function(a){return Za(a,\"previousSibling\")},nextAll:function(a){return Y(a,\n\"nextSibling\")},prevAll:function(a){return Y(a,\"previousSibling\")},nextUntil:function(a,b,c){return Y(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return Y(a,\"previousSibling\",c)},siblings:function(a){return Ab((a.parentNode||{}).firstChild,a)},children:function(a){return Ab(a.firstChild)},contents:function(a){if(B(a,\"iframe\"))return a.contentDocument;B(a,\"template\")&&(a=a.content||a);return c.merge([],a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);\"Until\"!==a.slice(-5)&&\n(e=d);e&&\"string\"===typeof e&&(f=c.filter(e,f));1<this.length&&(lc[a]||c.uniqueSort(f),kc.test(a)&&f.reverse());return this.pushStack(f)}});var S=/[^\\x20\\t\\r\\n\\f]+/g;c.Callbacks=function(a){a=\"string\"===typeof a?Qb(a):c.extend({},a);var b,d,e,f,g=[],h=[],l=-1,k=function(){f=f||a.once;for(e=b=!0;h.length;l=-1)for(d=h.shift();++l<g.length;)!1===g[l].apply(d[0],d[1])&&a.stopOnFalse&&(l=g.length,d=!1);a.memory||(d=!1);b=!1;f&&(g=d?[]:\"\")},m={add:function(){g&&(d&&!b&&(l=g.length-1,h.push(d)),function u(b){c.each(b,\nfunction(b,d){c.isFunction(d)?a.unique&&m.has(d)||g.push(d):d&&d.length&&\"string\"!==c.type(d)&&u(d)})}(arguments),d&&!b&&k());return this},remove:function(){c.each(arguments,function(a,b){for(var d;-1<(d=c.inArray(b,g,d));)g.splice(d,1),d<=l&&l--});return this},has:function(a){return a?-1<c.inArray(a,g):0<g.length},empty:function(){g&&(g=[]);return this},disable:function(){f=h=[];g=d=\"\";return this},disabled:function(){return!g},lock:function(){f=h=[];d||b||(g=d=\"\");return this},locked:function(){return!!f},\nfireWith:function(a,c){f||(c=c||[],c=[a,c.slice?c.slice():c],h.push(c),b||k());return this},fire:function(){m.fireWith(this,arguments);return this},fired:function(){return!!e}};return m};c.extend({Deferred:function(a){var b=[[\"notify\",\"progress\",c.Callbacks(\"memory\"),c.Callbacks(\"memory\"),2],[\"resolve\",\"done\",c.Callbacks(\"once memory\"),c.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",c.Callbacks(\"once memory\"),c.Callbacks(\"once memory\"),1,\"rejected\"]],d=\"pending\",e={state:function(){return d},\nalways:function(){f.done(arguments).fail(arguments);return this},\"catch\":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return c.Deferred(function(d){c.each(b,function(b,e){var g=c.isFunction(a[e[4]])&&a[e[4]];f[e[1]](function(){var a=g&&g.apply(this,arguments);if(a&&c.isFunction(a.promise))a.promise().progress(d.notify).done(d.resolve).fail(d.reject);else d[e[0]+\"With\"](this,g?[a]:arguments)})});a=null}).promise()},then:function(a,d,e){function f(a,b,d,e){return function(){var h=\nthis,l=arguments,k=function(){if(!(a<g)){var k=d.apply(h,l);if(k===b.promise())throw new TypeError(\"Thenable self-resolution\");var m=k&&(\"object\"===typeof k||\"function\"===typeof k)&&k.then;c.isFunction(m)?e?m.call(k,f(g,b,ma,e),f(g,b,na,e)):(g++,m.call(k,f(g,b,ma,e),f(g,b,na,e),f(g,b,ma,b.notifyWith))):(d!==ma&&(h=void 0,l=[k]),(e||b.resolveWith)(h,l))}},m=e?k:function(){try{k()}catch(z){c.Deferred.exceptionHook&&c.Deferred.exceptionHook(z,m.stackTrace),a+1>=g&&(d!==na&&(h=void 0,l=[z]),b.rejectWith(h,\nl))}};a?m():(c.Deferred.getStackHook&&(m.stackTrace=c.Deferred.getStackHook()),n.setTimeout(m))}}var g=0;return c.Deferred(function(g){b[0][3].add(f(0,g,c.isFunction(e)?e:ma,g.notifyWith));b[1][3].add(f(0,g,c.isFunction(a)?a:ma));b[2][3].add(f(0,g,c.isFunction(d)?d:na))}).promise()},promise:function(a){return null!=a?c.extend(a,e):e}},f={};c.each(b,function(a,c){var g=c[2],h=c[5];e[c[1]]=g.add;h&&g.add(function(){d=h},b[3-a][2].disable,b[0][2].lock);g.add(c[3].fire);f[c[0]]=function(){f[c[0]+\"With\"](this===\nf?void 0:this,arguments);return this};f[c[0]+\"With\"]=g.fireWith});e.promise(f);a&&a.call(f,f);return f},when:function(a){var b=arguments.length,d=b,e=Array(d),f=fa.call(arguments),g=c.Deferred(),h=function(a){return function(c){e[a]=this;f[a]=1<arguments.length?fa.call(arguments):c;--b||g.resolveWith(e,f)}};if(1>=b&&($a(a,g.done(h(d)).resolve,g.reject,!b),\"pending\"===g.state()||c.isFunction(f[d]&&f[d].then)))return g.then();for(;d--;)$a(f[d],h(d),g.reject);return g.promise()}});var mc=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\nc.Deferred.exceptionHook=function(a,b){n.console&&n.console.warn&&a&&mc.test(a.name)&&n.console.warn(\"jQuery.Deferred exception: \"+a.message,a.stack,b)};c.readyException=function(a){n.setTimeout(function(){throw a;})};var Va=c.Deferred();c.fn.ready=function(a){Va.then(a).catch(function(a){c.readyException(a)});return this};c.extend({isReady:!1,readyWait:1,ready:function(a){(!0===a?--c.readyWait:c.isReady)||(c.isReady=!0,!0!==a&&0<--c.readyWait||Va.resolveWith(p,[c]))}});c.ready.then=Va.then;\"complete\"===\np.readyState||\"loading\"!==p.readyState&&!p.documentElement.doScroll?n.setTimeout(c.ready):(p.addEventListener(\"DOMContentLoaded\",ca),n.addEventListener(\"load\",ca));var aa=function(a,b,d,e,f,g,h){var l=0,k=a.length,m=null==d;if(\"object\"===c.type(d))for(l in f=!0,d)aa(a,b,l,d[l],!0,g,h);else if(void 0!==e&&(f=!0,c.isFunction(e)||(h=!0),m&&(h?(b.call(a,e),b=null):(m=b,b=function(a,b,d){return m.call(c(a),d)})),b))for(;l<k;l++)b(a[l],d,h?e:e.call(a[l],l,b(a[l],d)));return f?a:m?b.call(a):k?b(a[0],d):\ng},La=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};da.uid=1;da.prototype={cache:function(a){var b=a[this.expando];b||(b={},La(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0})));return b},set:function(a,b,d){var e;a=this.cache(a);if(\"string\"===typeof b)a[c.camelCase(b)]=d;else for(e in b)a[c.camelCase(e)]=b[e];return a},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][c.camelCase(b)]},access:function(a,\nb,c){if(void 0===b||b&&\"string\"===typeof b&&void 0===c)return this.get(a,b);this.set(a,b,c);return void 0!==c?c:b},remove:function(a,b){var d,e=a[this.expando];if(void 0!==e){if(void 0!==b)for(Array.isArray(b)?b=b.map(c.camelCase):(b=c.camelCase(b),b=b in e?[b]:b.match(S)||[]),d=b.length;d--;)delete e[b[d]];if(void 0===b||c.isEmptyObject(e))a.nodeType?a[this.expando]=void 0:delete a[this.expando]}},hasData:function(a){a=a[this.expando];return void 0!==a&&!c.isEmptyObject(a)}};var v=new da,M=new da,\nSb=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,Rb=/[A-Z]/g;c.extend({hasData:function(a){return M.hasData(a)||v.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return v.access(a,b,c)},_removeData:function(a,b){v.remove(a,b)}});c.fn.extend({data:function(a,b){var d,e=this[0],f=e&&e.attributes;if(void 0===a){if(this.length){var g=M.get(e);if(1===e.nodeType&&!v.get(e,\"hasDataAttrs\")){for(d=f.length;d--;)if(f[d]){var h=f[d].name;0===h.indexOf(\"data-\")&&\n(h=c.camelCase(h.slice(5)),ab(e,h,g[h]))}v.set(e,\"hasDataAttrs\",!0)}}return g}return\"object\"===typeof a?this.each(function(){M.set(this,a)}):aa(this,function(b){if(e&&void 0===b){var c=M.get(e,a);if(void 0!==c)return c;c=ab(e,a);if(void 0!==c)return c}else this.each(function(){M.set(this,a,b)})},null,b,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||\"fx\")+\"queue\";var e=v.get(a,b);d&&(!e||Array.isArray(d)?\ne=v.access(a,b,c.makeArray(d)):e.push(d));return e||[]}},dequeue:function(a,b){b=b||\"fx\";var d=c.queue(a,b),e=d.length,f=d.shift(),g=c._queueHooks(a,b),h=function(){c.dequeue(a,b)};\"inprogress\"===f&&(f=d.shift(),e--);f&&(\"fx\"===b&&d.unshift(\"inprogress\"),delete g.stop,f.call(a,h,g));!e&&g&&g.empty.fire()},_queueHooks:function(a,b){var d=b+\"queueHooks\";return v.get(a,d)||v.access(a,d,{empty:c.Callbacks(\"once memory\").add(function(){v.remove(a,[b+\"queue\",d])})})}});c.fn.extend({queue:function(a,b){var d=\n2;\"string\"!==typeof a&&(b=a,a=\"fx\",d--);return arguments.length<d?c.queue(this[0],a):void 0===b?this:this.each(function(){var d=c.queue(this,a,b);c._queueHooks(this,a);\"fx\"===a&&\"inprogress\"!==d[0]&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||\"fx\",[])},promise:function(a,b){var d,e=1,f=c.Deferred(),g=this,h=this.length,l=function(){--e||f.resolveWith(g,[g])};\"string\"!==typeof a&&(b=a,a=void 0);for(a=a||\"fx\";h--;)(d=\nv.get(g[h],a+\"queueHooks\"))&&d.empty&&(e++,d.empty.add(l));l();return f.promise(b)}});var Db=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,oa=new RegExp(\"^(?:([+-])=|)(\"+Db+\")([a-z%]*)$\",\"i\"),ba=[\"Top\",\"Right\",\"Bottom\",\"Left\"],wa=function(a,b){a=b||a;return\"none\"===a.style.display||\"\"===a.style.display&&c.contains(a.ownerDocument,a)&&\"none\"===c.css(a,\"display\")},Eb=function(a,b,c,e){var d,g={};for(d in b)g[d]=a.style[d],a.style[d]=b[d];c=c.apply(a,e||[]);for(d in b)a.style[d]=g[d];return c},cb={};\nc.fn.extend({show:function(){return pa(this,!0)},hide:function(){return pa(this)},toggle:function(a){return\"boolean\"===typeof a?a?this.show():this.hide():this.each(function(){wa(this)?c(this).show():c(this).hide()})}});var Fb=/^(?:checkbox|radio)$/i,eb=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i,fb=/^$|\\/(?:java|ecma)script/i,D={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\n\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};D.optgroup=D.option;D.tbody=D.tfoot=D.colgroup=D.caption=D.thead;D.th=D.td;var Tb=/<|&#?\\w+;/;(function(){var a=p.createDocumentFragment().appendChild(p.createElement(\"div\")),b=p.createElement(\"input\");b.setAttribute(\"type\",\"radio\");b.setAttribute(\"checked\",\"checked\");b.setAttribute(\"name\",\"t\");a.appendChild(b);q.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;a.innerHTML=\"<textarea>x</textarea>\";q.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue})();\nvar Ma=p.documentElement,nc=/^key/,oc=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gb=/^([^.]*)(?:\\.(.+)|)/;c.event={global:{},add:function(a,b,d,e,f){var g,h,l,k,m;if(l=v.get(a)){if(d.handler){var n=d;d=n.handler;f=n.selector}f&&c.find.matchesSelector(Ma,f);d.guid||(d.guid=c.guid++);(h=l.events)||(h=l.events={});(g=l.handle)||(g=l.handle=function(b){return\"undefined\"!==typeof c&&c.event.triggered!==b.type?c.event.dispatch.apply(a,arguments):void 0});b=(b||\"\").match(S)||[\"\"];for(l=b.length;l--;){var u=\nGb.exec(b[l])||[];var r=k=u[1];var p=(u[2]||\"\").split(\".\").sort();r&&(u=c.event.special[r]||{},r=(f?u.delegateType:u.bindType)||r,u=c.event.special[r]||{},k=c.extend({type:r,origType:k,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&c.expr.match.needsContext.test(f),namespace:p.join(\".\")},n),(m=h[r])||(m=h[r]=[],m.delegateCount=0,u.setup&&!1!==u.setup.call(a,e,p,g)||a.addEventListener&&a.addEventListener(r,g)),u.add&&(u.add.call(a,k),k.handler.guid||(k.handler.guid=d.guid)),f?m.splice(m.delegateCount++,\n0,k):m.push(k),c.event.global[r]=!0)}}},remove:function(a,b,d,e,f){var g,h,l,k,m,n=v.hasData(a)&&v.get(a);if(n&&(l=n.events)){b=(b||\"\").match(S)||[\"\"];for(k=b.length;k--;){var u=Gb.exec(b[k])||[];var r=m=u[1];var p=(u[2]||\"\").split(\".\").sort();if(r){var q=c.event.special[r]||{};r=(e?q.delegateType:q.bindType)||r;var B=l[r]||[];u=u[2]&&new RegExp(\"(^|\\\\.)\"+p.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\");for(h=g=B.length;g--;){var A=B[g];!f&&m!==A.origType||d&&d.guid!==A.guid||u&&!u.test(A.namespace)||e&&e!==A.selector&&\n(\"**\"!==e||!A.selector)||(B.splice(g,1),A.selector&&B.delegateCount--,q.remove&&q.remove.call(a,A))}h&&!B.length&&(q.teardown&&!1!==q.teardown.call(a,p,n.handle)||c.removeEvent(a,r,n.handle),delete l[r])}else for(r in l)c.event.remove(a,r+b[k],d,e,!0)}c.isEmptyObject(l)&&v.remove(a,\"handle events\")}},dispatch:function(a){var b=c.event.fix(a),d,e,f,g=Array(arguments.length);var h=(v.get(this,\"events\")||{})[b.type]||[];var l=c.event.special[b.type]||{};g[0]=b;for(d=1;d<arguments.length;d++)g[d]=arguments[d];\nb.delegateTarget=this;if(!l.preDispatch||!1!==l.preDispatch.call(this,b)){var k=c.event.handlers.call(this,b,h);for(d=0;(f=k[d++])&&!b.isPropagationStopped();)for(b.currentTarget=f.elem,h=0;(e=f.handlers[h++])&&!b.isImmediatePropagationStopped();)if(!b.rnamespace||b.rnamespace.test(e.namespace))b.handleObj=e,b.data=e.data,e=((c.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,g),void 0!==e&&!1===(b.result=e)&&(b.preventDefault(),b.stopPropagation());l.postDispatch&&l.postDispatch.call(this,\nb);return b.result}},handlers:function(a,b){var d,e=[],f=b.delegateCount,g=a.target;if(f&&g.nodeType&&!(\"click\"===a.type&&1<=a.button))for(;g!==this;g=g.parentNode||this)if(1===g.nodeType&&(\"click\"!==a.type||!0!==g.disabled)){var h=[];var l={};for(d=0;d<f;d++){var k=b[d];var m=k.selector+\" \";void 0===l[m]&&(l[m]=k.needsContext?-1<c(m,this).index(g):c.find(m,this,null,[g]).length);l[m]&&h.push(k)}h.length&&e.push({elem:g,handlers:h})}f<b.length&&e.push({elem:this,handlers:b.slice(f)});return e},addProp:function(a,\nb){Object.defineProperty(c.Event.prototype,a,{enumerable:!0,configurable:!0,get:c.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[c.expando]?a:new c.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==gb()&&this.focus)return this.focus(),!1},delegateType:\"focusin\"},\nblur:{trigger:function(){if(this===gb()&&this.blur)return this.blur(),!1},delegateType:\"focusout\"},click:{trigger:function(){if(\"checkbox\"===this.type&&this.click&&B(this,\"input\"))return this.click(),!1},_default:function(a){return B(a.target,\"a\")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}};c.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)};c.Event=function(a,b){if(!(this instanceof c.Event))return new c.Event(a,\nb);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?Ba:Z,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a;b&&c.extend(this,b);this.timeStamp=a&&a.timeStamp||c.now();this[c.expando]=!0};c.Event.prototype={constructor:c.Event,isDefaultPrevented:Z,isPropagationStopped:Z,isImmediatePropagationStopped:Z,isSimulated:!1,\npreventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Ba;a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Ba;a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Ba;a&&!this.isSimulated&&a.stopImmediatePropagation();this.stopPropagation()}};c.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,\neventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,\"char\":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&nc.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&oc.test(a.type)?b&1?1:b&2?3:b&4?2:0:a.which}},c.event.addProp);c.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",\npointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(a,b){c.event.special[a]={delegateType:b,bindType:b,handle:function(a){var d=a.relatedTarget,f=a.handleObj;if(!d||d!==this&&!c.contains(this,d)){a.type=f.origType;var g=f.handler.apply(this,arguments);a.type=b}return g}}});c.fn.extend({on:function(a,b,c,e){return Oa(this,a,b,c,e)},one:function(a,b,c,e){return Oa(this,a,b,c,e,1)},off:function(a,b,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;c(a.delegateTarget).off(e.namespace?\ne.origType+\".\"+e.namespace:e.origType,e.selector,e.handler);return this}if(\"object\"===typeof a){for(e in a)this.off(e,b,a[e]);return this}if(!1===b||\"function\"===typeof b)d=b,b=void 0;!1===d&&(d=Z);return this.each(function(){c.event.remove(this,a,d,b)})}});var pc=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,qc=/<script|<style|<link/i,Xb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Wb=/^true\\/(.*)/,Yb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;c.extend({htmlPrefilter:function(a){return a.replace(pc,\n\"<$1></$2>\")},clone:function(a,b,d){var e,f=a.cloneNode(!0),g=c.contains(a.ownerDocument,a);if(!(q.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||c.isXMLDoc(a))){var h=H(f);var l=H(a);var k=0;for(e=l.length;k<e;k++){var m=l[k],n=h[k],u=n.nodeName.toLowerCase();if(\"input\"===u&&Fb.test(m.type))n.checked=m.checked;else if(\"input\"===u||\"textarea\"===u)n.defaultValue=m.defaultValue}}if(b)if(d)for(l=l||H(a),h=h||H(f),k=0,e=l.length;k<e;k++)ib(l[k],h[k]);else ib(a,f);h=H(f,\"script\");0<h.length&&Na(h,!g&&\nH(a,\"script\"));return f},cleanData:function(a){for(var b,d,e,f=c.event.special,g=0;void 0!==(d=a[g]);g++)if(La(d)){if(b=d[v.expando]){if(b.events)for(e in b.events)f[e]?c.event.remove(d,e):c.removeEvent(d,e,b.handle);d[v.expando]=void 0}d[M.expando]&&(d[M.expando]=void 0)}}});c.fn.extend({detach:function(a){return kb(this,a,!0)},remove:function(a){return kb(this,a)},text:function(a){return aa(this,function(a){return void 0===a?c.text(this):this.empty().each(function(){if(1===this.nodeType||11===this.nodeType||\n9===this.nodeType)this.textContent=a})},null,a,arguments.length)},append:function(){return qa(this,arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||hb(this,a).appendChild(a)})},prepend:function(){return qa(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=hb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return qa(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return qa(this,\narguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(c.cleanData(H(a,!1)),a.textContent=\"\");return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return c.clone(this,a,b)})},html:function(a){return aa(this,function(a){var b=this[0]||{},e=0,f=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if(\"string\"===typeof a&&!qc.test(a)&&!D[(eb.exec(a)||[\"\",\n\"\"])[1].toLowerCase()]){a=c.htmlPrefilter(a);try{for(;e<f;e++)b=this[e]||{},1===b.nodeType&&(c.cleanData(H(b,!1)),b.innerHTML=a);b=0}catch(g){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return qa(this,arguments,function(b){var d=this.parentNode;0>c.inArray(this,a)&&(c.cleanData(H(this)),d&&d.replaceChild(b,this))},a)}});c.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){c.fn[a]=\nfunction(a){for(var d=[],f=c(a),g=f.length-1,h=0;h<=g;h++)a=h===g?this:this.clone(!0),c(f[h])[b](a),Ua.apply(d,a.get());return this.pushStack(d)}});var lb=/^margin/,Pa=new RegExp(\"^(\"+Db+\")(?!px)[a-z%]+$\",\"i\"),Ga=function(a){var b=a.ownerDocument.defaultView;b&&b.opener||(b=n);return b.getComputedStyle(a)};(function(){function a(){if(h){h.style.cssText=\"box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%\";h.innerHTML=\"\";Ma.appendChild(g);var a=\nn.getComputedStyle(h);b=\"1%\"!==a.top;f=\"2px\"===a.marginLeft;d=\"4px\"===a.width;h.style.marginRight=\"50%\";e=\"4px\"===a.marginRight;Ma.removeChild(g);h=null}}var b,d,e,f,g=p.createElement(\"div\"),h=p.createElement(\"div\");h.style&&(h.style.backgroundClip=\"content-box\",h.cloneNode(!0).style.backgroundClip=\"\",q.clearCloneStyle=\"content-box\"===h.style.backgroundClip,g.style.cssText=\"border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute\",g.appendChild(h),c.extend(q,{pixelPosition:function(){a();\nreturn b},boxSizingReliable:function(){a();return d},pixelMarginRight:function(){a();return e},reliableMarginLeft:function(){a();return f}}))})();var rc=/^(none|table(?!-c[ea]).+)/,Hb=/^--/,sc={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Ib={letterSpacing:\"0\",fontWeight:\"400\"},pb=[\"Webkit\",\"Moz\",\"ms\"],ob=p.createElement(\"div\").style;c.extend({cssHooks:{opacity:{get:function(a,b){if(b)return a=ra(a,\"opacity\"),\"\"===a?\"1\":a}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,\nflexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":\"cssFloat\"},style:function(a,b,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g=c.camelCase(b),h=Hb.test(b),l=a.style;h||(b=nb(g));var k=c.cssHooks[b]||c.cssHooks[g];if(void 0!==d){var m=typeof d;\"string\"===m&&(f=oa.exec(d))&&f[1]&&(d=bb(a,b,f),m=\"number\");null!=d&&d===d&&(\"number\"===m&&(d+=f&&f[3]||(c.cssNumber[g]?\"\":\"px\")),q.clearCloneStyle||\"\"!==d||0!==\nb.indexOf(\"background\")||(l[b]=\"inherit\"),k&&\"set\"in k&&void 0===(d=k.set(a,d,e))||(h?l.setProperty(b,d):l[b]=d))}else return k&&\"get\"in k&&void 0!==(f=k.get(a,!1,e))?f:l[b]}},css:function(a,b,d,e){var f;var g=c.camelCase(b);Hb.test(b)||(b=nb(g));(g=c.cssHooks[b]||c.cssHooks[g])&&\"get\"in g&&(f=g.get(a,!0,d));void 0===f&&(f=ra(a,b,e));\"normal\"===f&&b in Ib&&(f=Ib[b]);return\"\"===d||d?(a=parseFloat(f),!0===d||isFinite(a)?a||0:f):f}});c.each([\"height\",\"width\"],function(a,b){c.cssHooks[b]={get:function(a,\ne,f){if(e)return!rc.test(c.css(a,\"display\"))||a.getClientRects().length&&a.getBoundingClientRect().width?sb(a,b,f):Eb(a,sc,function(){return sb(a,b,f)})},set:function(a,e,f){var d,h=f&&Ga(a);(f=f&&rb(a,b,f,\"border-box\"===c.css(a,\"boxSizing\",!1,h),h))&&(d=oa.exec(e))&&\"px\"!==(d[3]||\"px\")&&(a.style[b]=e,e=c.css(a,b));return qb(a,e,f)}}});c.cssHooks.marginLeft=mb(q.reliableMarginLeft,function(a,b){if(b)return(parseFloat(ra(a,\"marginLeft\"))||a.getBoundingClientRect().left-Eb(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+\n\"px\"});c.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){c.cssHooks[a+b]={expand:function(c){var d=0,f={};for(c=\"string\"===typeof c?c.split(\" \"):[c];4>d;d++)f[a+ba[d]+b]=c[d]||c[d-2]||c[0];return f}};lb.test(a)||(c.cssHooks[a+b].set=qb)});c.fn.extend({css:function(a,b){return aa(this,function(a,b,f){var d,e={},l=0;if(Array.isArray(b)){f=Ga(a);for(d=b.length;l<d;l++)e[b[l]]=c.css(a,b[l],!1,f);return e}return void 0!==f?c.style(a,b,f):c.css(a,b)},a,b,1<arguments.length)}});c.Tween=I;I.prototype=\n{constructor:I,init:function(a,b,d,e,f,g){this.elem=a;this.prop=d;this.easing=f||c.easing._default;this.options=b;this.start=this.now=this.cur();this.end=e;this.unit=g||(c.cssNumber[d]?\"\":\"px\")},cur:function(){var a=I.propHooks[this.prop];return a&&a.get?a.get(this):I.propHooks._default.get(this)},run:function(a){var b,d=I.propHooks[this.prop];this.pos=this.options.duration?b=c.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):b=a;this.now=(this.end-this.start)*b+this.start;\nthis.options.step&&this.options.step.call(this.elem,this.now,this);d&&d.set?d.set(this):I.propHooks._default.set(this);return this}};I.prototype.init.prototype=I.prototype;I.propHooks={_default:{get:function(a){return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(a=c.css(a.elem,a.prop,\"\"))&&\"auto\"!==a?a:0},set:function(a){if(c.fx.step[a.prop])c.fx.step[a.prop](a);else 1!==a.elem.nodeType||null==a.elem.style[c.cssProps[a.prop]]&&!c.cssHooks[a.prop]?a.elem[a.prop]=\na.now:c.style(a.elem,a.prop,a.now+a.unit)}}};I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};c.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:\"swing\"};c.fx=I.prototype.init;c.fx.step={};var sa,Ha,tc=/^(?:toggle|show|hide)$/,uc=/queueHooks$/;c.Animation=c.extend(T,{tweeners:{\"*\":[function(a,b){var c=this.createTween(a,b);bb(c.elem,a,oa.exec(b),c);return c}]},tweener:function(a,\nb){c.isFunction(a)?(b=a,a=[\"*\"]):a=a.match(S);for(var d,e=0,f=a.length;e<f;e++)d=a[e],T.tweeners[d]=T.tweeners[d]||[],T.tweeners[d].unshift(b)},prefilters:[function(a,b,d){var e;var f=\"width\"in b||\"height\"in b;var g=this,h={},l=a.style,k=a.nodeType&&wa(a),m=v.get(a,\"fxshow\");if(!d.queue){var n=c._queueHooks(a,\"fx\");if(null==n.unqueued){n.unqueued=0;var u=n.empty.fire;n.empty.fire=function(){n.unqueued||u()}}n.unqueued++;g.always(function(){g.always(function(){n.unqueued--;c.queue(a,\"fx\").length||\nn.empty.fire()})})}for(e in b){var r=b[e];if(tc.test(r)){delete b[e];var p=p||\"toggle\"===r;if(r===(k?\"hide\":\"show\"))if(\"show\"===r&&m&&void 0!==m[e])k=!0;else continue;h[e]=m&&m[e]||c.style(a,e)}}if((b=!c.isEmptyObject(b))||!c.isEmptyObject(h)){if(f&&1===a.nodeType){d.overflow=[l.overflow,l.overflowX,l.overflowY];var q=m&&m.display;null==q&&(q=v.get(a,\"display\"));f=c.css(a,\"display\");\"none\"===f&&(q?f=q:(pa([a],!0),q=a.style.display||q,f=c.css(a,\"display\"),pa([a])));(\"inline\"===f||\"inline-block\"===\nf&&null!=q)&&\"none\"===c.css(a,\"float\")&&(b||(g.done(function(){l.display=q}),null==q&&(f=l.display,q=\"none\"===f?\"\":f)),l.display=\"inline-block\")}d.overflow&&(l.overflow=\"hidden\",g.always(function(){l.overflow=d.overflow[0];l.overflowX=d.overflow[1];l.overflowY=d.overflow[2]}));b=!1;for(e in h)b||(m?\"hidden\"in m&&(k=m.hidden):m=v.access(a,\"fxshow\",{display:q}),p&&(m.hidden=!k),k&&pa([a],!0),g.done(function(){k||pa([a]);v.remove(a,\"fxshow\");for(e in h)c.style(a,e,h[e])})),b=ub(k?m[e]:0,e,g),e in m||\n(m[e]=b.start,k&&(b.end=b.start,b.start=0))}}],prefilter:function(a,b){b?T.prefilters.unshift(a):T.prefilters.push(a)}});c.speed=function(a,b,d){var e=a&&\"object\"===typeof a?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};c.fx.off?e.duration=0:\"number\"!==typeof e.duration&&(e.duration=e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default);if(null==e.queue||!0===e.queue)e.queue=\"fx\";e.old=e.complete;e.complete=function(){c.isFunction(e.old)&&\ne.old.call(this);e.queue&&c.dequeue(this,e.queue)};return e};c.fn.extend({fadeTo:function(a,b,c,e){return this.filter(wa).css(\"opacity\",0).show().end().animate({opacity:b},a,c,e)},animate:function(a,b,d,e){var f=c.isEmptyObject(a),g=c.speed(b,d,e);b=function(){var b=T(this,c.extend({},a),g);(f||v.get(this,\"finish\"))&&b.stop(!0)};b.finish=b;return f||!1===g.queue?this.each(b):this.queue(g.queue,b)},stop:function(a,b,d){var e=function(a){var b=a.stop;delete a.stop;b(d)};\"string\"!==typeof a&&(d=b,b=\na,a=void 0);b&&!1!==a&&this.queue(a||\"fx\",[]);return this.each(function(){var b=!0,g=null!=a&&a+\"queueHooks\",h=c.timers,l=v.get(this);if(g)l[g]&&l[g].stop&&e(l[g]);else for(g in l)l[g]&&l[g].stop&&uc.test(g)&&e(l[g]);for(g=h.length;g--;)h[g].elem!==this||null!=a&&h[g].queue!==a||(h[g].anim.stop(d),b=!1,h.splice(g,1));!b&&d||c.dequeue(this,a)})},finish:function(a){!1!==a&&(a=a||\"fx\");return this.each(function(){var b=v.get(this),d=b[a+\"queue\"];var e=b[a+\"queueHooks\"];var f=c.timers,g=d?d.length:0;\nb.finish=!0;c.queue(this,a,[]);e&&e.stop&&e.stop.call(this,!0);for(e=f.length;e--;)f[e].elem===this&&f[e].queue===a&&(f[e].anim.stop(!0),f.splice(e,1));for(e=0;e<g;e++)d[e]&&d[e].finish&&d[e].finish.call(this);delete b.finish})}});c.each([\"toggle\",\"show\",\"hide\"],function(a,b){var d=c.fn[b];c.fn[b]=function(a,c,g){return null==a||\"boolean\"===typeof a?d.apply(this,arguments):this.animate(Ia(b,!0),a,c,g)}});c.each({slideDown:Ia(\"show\"),slideUp:Ia(\"hide\"),slideToggle:Ia(\"toggle\"),fadeIn:{opacity:\"show\"},\nfadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(a,b){c.fn[a]=function(a,c,f){return this.animate(b,a,c,f)}});c.timers=[];c.fx.tick=function(){var a=0,b=c.timers;for(sa=c.now();a<b.length;a++){var d=b[a];d()||b[a]!==d||b.splice(a--,1)}b.length||c.fx.stop();sa=void 0};c.fx.timer=function(a){c.timers.push(a);c.fx.start()};c.fx.interval=13;c.fx.start=function(){Ha||(Ha=!0,Qa())};c.fx.stop=function(){Ha=null};c.fx.speeds={slow:600,fast:200,_default:400};c.fn.delay=function(a,b){a=c.fx?\nc.fx.speeds[a]||a:a;return this.queue(b||\"fx\",function(b,c){var d=n.setTimeout(b,a);c.stop=function(){n.clearTimeout(d)}})};(function(){var a=p.createElement(\"input\"),b=p.createElement(\"select\").appendChild(p.createElement(\"option\"));a.type=\"checkbox\";q.checkOn=\"\"!==a.value;q.optSelected=b.selected;a=p.createElement(\"input\");a.value=\"t\";a.type=\"radio\";q.radioValue=\"t\"===a.value})();var ua=c.expr.attrHandle;c.fn.extend({attr:function(a,b){return aa(this,c.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){c.removeAttr(this,\na)})}});c.extend({attr:function(a,b,d){var e,f,g=a.nodeType;if(3!==g&&8!==g&&2!==g){if(\"undefined\"===typeof a.getAttribute)return c.prop(a,b,d);1===g&&c.isXMLDoc(a)||(f=c.attrHooks[b.toLowerCase()]||(c.expr.match.bool.test(b)?vc:void 0));if(void 0!==d){if(null===d){c.removeAttr(a,b);return}if(f&&\"set\"in f&&void 0!==(e=f.set(a,d,b)))return e;a.setAttribute(b,d+\"\");return d}if(f&&\"get\"in f&&null!==(e=f.get(a,b)))return e;e=c.find.attr(a,b);return null==e?void 0:e}},attrHooks:{type:{set:function(a,b){if(!q.radioValue&&\n\"radio\"===b&&B(a,\"input\")){var c=a.value;a.setAttribute(\"type\",b);c&&(a.value=c);return b}}}},removeAttr:function(a,b){var c=0,e=b&&b.match(S);if(e&&1===a.nodeType)for(;b=e[c++];)a.removeAttribute(b)}});var vc={set:function(a,b,d){!1===b?c.removeAttr(a,d):a.setAttribute(d,d);return d}};c.each(c.expr.match.bool.source.match(/\\w+/g),function(a,b){var d=ua[b]||c.find.attr;ua[b]=function(a,b,c){var e=b.toLowerCase();if(!c){var f=ua[e];ua[e]=g;var g=null!=d(a,b,c)?e:null;ua[e]=f}return g}});var wc=/^(?:input|select|textarea|button)$/i,\nxc=/^(?:a|area)$/i;c.fn.extend({prop:function(a,b){return aa(this,c.prop,a,b,1<arguments.length)},removeProp:function(a){return this.each(function(){delete this[c.propFix[a]||a]})}});c.extend({prop:function(a,b,d){var e,f=a.nodeType;if(3!==f&&8!==f&&2!==f){if(1!==f||!c.isXMLDoc(a)){b=c.propFix[b]||b;var g=c.propHooks[b]}return void 0!==d?g&&\"set\"in g&&void 0!==(e=g.set(a,d,b))?e:a[b]=d:g&&\"get\"in g&&null!==(e=g.get(a,b))?e:a[b]}},propHooks:{tabIndex:{get:function(a){var b=c.find.attr(a,\"tabindex\");\nreturn b?parseInt(b,10):wc.test(a.nodeName)||xc.test(a.nodeName)&&a.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}});q.optSelected||(c.propHooks.selected={get:function(a){(a=a.parentNode)&&a.parentNode&&a.parentNode.selectedIndex;return null},set:function(a){if(a=a.parentNode)a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex}});c.each(\"tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable\".split(\" \"),function(){c.propFix[this.toLowerCase()]=\nthis});c.fn.extend({addClass:function(a){var b,d,e,f,g,h=0;if(c.isFunction(a))return this.each(function(b){c(this).addClass(a.call(this,b,ea(this)))});if(\"string\"===typeof a&&a)for(b=a.match(S)||[];d=this[h++];){var l=ea(d);if(e=1===d.nodeType&&\" \"+L(l)+\" \"){for(g=0;f=b[g++];)0>e.indexOf(\" \"+f+\" \")&&(e+=f+\" \");e=L(e);l!==e&&d.setAttribute(\"class\",e)}}return this},removeClass:function(a){var b,d,e,f,g,h=0;if(c.isFunction(a))return this.each(function(b){c(this).removeClass(a.call(this,b,ea(this)))});\nif(!arguments.length)return this.attr(\"class\",\"\");if(\"string\"===typeof a&&a)for(b=a.match(S)||[];d=this[h++];){var l=ea(d);if(e=1===d.nodeType&&\" \"+L(l)+\" \"){for(g=0;f=b[g++];)for(;-1<e.indexOf(\" \"+f+\" \");)e=e.replace(\" \"+f+\" \",\" \");e=L(e);l!==e&&d.setAttribute(\"class\",e)}}return this},toggleClass:function(a,b){var d=typeof a;return\"boolean\"===typeof b&&\"string\"===d?b?this.addClass(a):this.removeClass(a):c.isFunction(a)?this.each(function(d){c(this).toggleClass(a.call(this,d,ea(this),b),b)}):this.each(function(){var b,\nf;if(\"string\"===d){var g=0;var h=c(this);for(f=a.match(S)||[];b=f[g++];)h.hasClass(b)?h.removeClass(b):h.addClass(b)}else if(void 0===a||\"boolean\"===d)(b=ea(this))&&v.set(this,\"__className__\",b),this.setAttribute&&this.setAttribute(\"class\",b||!1===a?\"\":v.get(this,\"__className__\")||\"\")})},hasClass:function(a){var b,c=0;for(a=\" \"+a+\" \";b=this[c++];)if(1===b.nodeType&&-1<(\" \"+L(ea(b))+\" \").indexOf(a))return!0;return!1}});var yc=/\\r/g;c.fn.extend({val:function(a){var b,d,e=this[0];if(arguments.length){var f=\nc.isFunction(a);return this.each(function(d){1===this.nodeType&&(d=f?a.call(this,d,c(this).val()):a,null==d?d=\"\":\"number\"===typeof d?d+=\"\":Array.isArray(d)&&(d=c.map(d,function(a){return null==a?\"\":a+\"\"})),b=c.valHooks[this.type]||c.valHooks[this.nodeName.toLowerCase()],b&&\"set\"in b&&void 0!==b.set(this,d,\"value\")||(this.value=d))})}if(e){if((b=c.valHooks[e.type]||c.valHooks[e.nodeName.toLowerCase()])&&\"get\"in b&&void 0!==(d=b.get(e,\"value\")))return d;d=e.value;return\"string\"===typeof d?d.replace(yc,\n\"\"):null==d?\"\":d}}});c.extend({valHooks:{option:{get:function(a){var b=c.find.attr(a,\"value\");return null!=b?b:L(c.text(a))}},select:{get:function(a){var b=a.options,d=a.selectedIndex,e=\"select-one\"===a.type,f=e?null:[],g=e?d+1:b.length;for(a=0>d?g:e?d:0;a<g;a++){var h=b[a];if(!(!h.selected&&a!==d||h.disabled||h.parentNode.disabled&&B(h.parentNode,\"optgroup\"))){h=c(h).val();if(e)return h;f.push(h)}}return f},set:function(a,b){for(var d,e=a.options,f=c.makeArray(b),g=e.length;g--;)if(b=e[g],b.selected=\n-1<c.inArray(c.valHooks.option.get(b),f))d=!0;d||(a.selectedIndex=-1);return f}}}});c.each([\"radio\",\"checkbox\"],function(){c.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=-1<c.inArray(c(a).val(),b)}};q.checkOn||(c.valHooks[this].get=function(a){return null===a.getAttribute(\"value\")?\"on\":a.value})});var Jb=/^(?:focusinfocus|focusoutblur)$/;c.extend(c.event,{trigger:function(a,b,d,e){var f,g,h=[d||p],l=Ka.call(a,\"type\")?a.type:a;var k=Ka.call(a,\"namespace\")?a.namespace.split(\".\"):\n[];var m=f=d=d||p;if(3!==d.nodeType&&8!==d.nodeType&&!Jb.test(l+c.event.triggered)){-1<l.indexOf(\".\")&&(k=l.split(\".\"),l=k.shift(),k.sort());var t=0>l.indexOf(\":\")&&\"on\"+l;a=a[c.expando]?a:new c.Event(l,\"object\"===typeof a&&a);a.isTrigger=e?2:3;a.namespace=k.join(\".\");a.rnamespace=a.namespace?new RegExp(\"(^|\\\\.)\"+k.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null;a.result=void 0;a.target||(a.target=d);b=null==b?[a]:c.makeArray(b,[a]);k=c.event.special[l]||{};if(e||!k.trigger||!1!==k.trigger.apply(d,b)){if(!e&&\n!k.noBubble&&!c.isWindow(d)){var q=k.delegateType||l;Jb.test(q+l)||(m=m.parentNode);for(;m;m=m.parentNode)h.push(m),f=m;f===(d.ownerDocument||p)&&h.push(f.defaultView||f.parentWindow||n)}for(f=0;(m=h[f++])&&!a.isPropagationStopped();)a.type=1<f?q:k.bindType||l,(g=(v.get(m,\"events\")||{})[a.type]&&v.get(m,\"handle\"))&&g.apply(m,b),(g=t&&m[t])&&g.apply&&La(m)&&(a.result=g.apply(m,b),!1===a.result&&a.preventDefault());a.type=l;e||a.isDefaultPrevented()||k._default&&!1!==k._default.apply(h.pop(),b)||!La(d)||\n!t||!c.isFunction(d[l])||c.isWindow(d)||((f=d[t])&&(d[t]=null),c.event.triggered=l,d[l](),c.event.triggered=void 0,f&&(d[t]=f));return a.result}}},simulate:function(a,b,d){a=c.extend(new c.Event,d,{type:a,isSimulated:!0});c.event.trigger(a,null,b)}});c.fn.extend({trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){var d=this[0];if(d)return c.event.trigger(a,b,d,!0)}});c.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),\nfunction(a,b){c.fn[b]=function(a,c){return 0<arguments.length?this.on(b,null,a,c):this.trigger(b)}});c.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});q.focusin=\"onfocusin\"in n;q.focusin||c.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){var d=function(a){c.event.simulate(b,a.target,c.event.fix(a))};c.event.special[b]={setup:function(){var c=this.ownerDocument||this,f=v.access(c,b);f||c.addEventListener(a,d,!0);v.access(c,b,(f||0)+1)},teardown:function(){var c=this.ownerDocument||\nthis,f=v.access(c,b)-1;f?v.access(c,b,f):(c.removeEventListener(a,d,!0),v.remove(c,b))}}});var za=n.location,Kb=c.now(),Wa=/\\?/;c.parseXML=function(a){if(!a||\"string\"!==typeof a)return null;try{var b=(new n.DOMParser).parseFromString(a,\"text/xml\")}catch(d){b=void 0}b&&!b.getElementsByTagName(\"parsererror\").length||c.error(\"Invalid XML: \"+a);return b};var $b=/\\[\\]$/,Lb=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;c.param=function(a,b){var d,e=[],f=function(a,\nb){b=c.isFunction(b)?b():b;e[e.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(null==b?\"\":b)};if(Array.isArray(a)||a.jquery&&!c.isPlainObject(a))c.each(a,function(){f(this.name,this.value)});else for(d in a)Ra(d,a[d],b,f);return e.join(\"&\")};c.fn.extend({serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=c.prop(this,\"elements\");return a?c.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!c(this).is(\":disabled\")&&\nAc.test(this.nodeName)&&!zc.test(a)&&(this.checked||!Fb.test(a))}).map(function(a,b){a=c(this).val();return null==a?null:Array.isArray(a)?c.map(a,function(a){return{name:b.name,value:a.replace(Lb,\"\\r\\n\")}}):{name:b.name,value:a.replace(Lb,\"\\r\\n\")}}).get()}});var Bc=/%20/g,Cc=/#.*$/,Dc=/([?&])_=[^&]*/,Ec=/^(.*?):[ \\t]*([^\\r\\n]*)$/mg,Fc=/^(?:GET|HEAD)$/,Gc=/^\\/\\//,Mb={},Sa={},Nb=\"*/\".concat(\"*\"),Xa=p.createElement(\"a\");Xa.href=za.href;c.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:za.href,\ntype:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(za.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Nb,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\n\"text xml\":c.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ta(Ta(a,c.ajaxSettings),b):Ta(c.ajaxSettings,a)},ajaxPrefilter:vb(Mb),ajaxTransport:vb(Sa),ajax:function(a,b){function d(a,b,d,g){var k=b;if(!O){O=!0;h&&n.clearTimeout(h);e=void 0;f=g||\"\";z.readyState=0<a?4:0;g=200<=a&&300>a||304===a;if(d){var p=m;for(var u=z,r,x,N,y,C=p.contents,D=p.dataTypes;\"*\"===D[0];)D.shift(),void 0===r&&(r=p.mimeType||u.getResponseHeader(\"Content-Type\"));if(r)for(x in C)if(C[x]&&C[x].test(r)){D.unshift(x);\nbreak}if(D[0]in d)N=D[0];else{for(x in d){if(!D[0]||p.converters[x+\" \"+D[0]]){N=x;break}y||(y=x)}N=N||y}N?(N!==D[0]&&D.unshift(N),p=d[N]):p=void 0}a:{d=m;r=p;x=z;N=g;var I;u={};C=d.dataTypes.slice();if(C[1])for(H in d.converters)u[H.toLowerCase()]=d.converters[H];for(y=C.shift();y;){d.responseFields[y]&&(x[d.responseFields[y]]=r);!R&&N&&d.dataFilter&&(r=d.dataFilter(r,d.dataType));var R=y;if(y=C.shift())if(\"*\"===y)y=R;else if(\"*\"!==R&&R!==y){var H=u[R+\" \"+y]||u[\"* \"+y];if(!H)for(I in u)if(p=I.split(\" \"),\np[1]===y&&(H=u[R+\" \"+p[0]]||u[\"* \"+p[0]])){!0===H?H=u[I]:!0!==u[I]&&(y=p[0],C.unshift(p[1]));break}if(!0!==H)if(H&&d.throws)r=H(r);else try{r=H(r)}catch(hc){p={state:\"parsererror\",error:H?hc:\"No conversion from \"+R+\" to \"+y};break a}}}p={state:\"success\",data:r}}if(g)if(m.ifModified&&((k=z.getResponseHeader(\"Last-Modified\"))&&(c.lastModified[G]=k),(k=z.getResponseHeader(\"etag\"))&&(c.etag[G]=k)),204===a||\"HEAD\"===m.type)k=\"nocontent\";else if(304===a)k=\"notmodified\";else{k=p.state;var M=p.data;var L=\np.error;g=!L}else if(L=k,a||!k)k=\"error\",0>a&&(a=0);z.status=a;z.statusText=(b||k)+\"\";g?v.resolveWith(t,[M,k,z]):v.rejectWith(t,[z,k,L]);z.statusCode(A);A=void 0;l&&q.trigger(g?\"ajaxSuccess\":\"ajaxError\",[z,m,g?M:L]);B.fireWith(t,[z,k]);l&&(q.trigger(\"ajaxComplete\",[z,m]),--c.active||c.event.trigger(\"ajaxStop\"))}}\"object\"===typeof a&&(b=a,a=void 0);b=b||{};var e,f,g,h,l,k,m=c.ajaxSetup({},b),t=m.context||m,q=m.context&&(t.nodeType||t.jquery)?c(t):c.event,v=c.Deferred(),B=c.Callbacks(\"once memory\"),\nA=m.statusCode||{},C={},D={},I=\"canceled\",z={readyState:0,getResponseHeader:function(a){var b;if(O){if(!g)for(g={};b=Ec.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return O?f:null},setRequestHeader:function(a,b){null==O&&(a=D[a.toLowerCase()]=D[a.toLowerCase()]||a,C[a]=b);return this},overrideMimeType:function(a){null==O&&(m.mimeType=a);return this},statusCode:function(a){var b;if(a)if(O)z.always(a[z.status]);else for(b in a)A[b]=\n[A[b],a[b]];return this},abort:function(a){a=a||I;e&&e.abort(a);d(0,a);return this}};v.promise(z);m.url=((a||m.url||za.href)+\"\").replace(Gc,za.protocol+\"//\");m.type=b.method||b.type||m.method||m.type;m.dataTypes=(m.dataType||\"*\").toLowerCase().match(S)||[\"\"];if(null==m.crossDomain){a=p.createElement(\"a\");try{a.href=m.url,a.href=a.href,m.crossDomain=Xa.protocol+\"//\"+Xa.host!==a.protocol+\"//\"+a.host}catch(N){m.crossDomain=!0}}m.data&&m.processData&&\"string\"!==typeof m.data&&(m.data=c.param(m.data,m.traditional));\nwb(Mb,m,b,z);if(O)return z;(l=c.event&&m.global)&&0===c.active++&&c.event.trigger(\"ajaxStart\");m.type=m.type.toUpperCase();m.hasContent=!Fc.test(m.type);var G=m.url.replace(Cc,\"\");m.hasContent?m.data&&m.processData&&0===(m.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(m.data=m.data.replace(Bc,\"+\")):(a=m.url.slice(G.length),m.data&&(G+=(Wa.test(G)?\"&\":\"?\")+m.data,delete m.data),!1===m.cache&&(G=G.replace(Dc,\"$1\"),a=(Wa.test(G)?\"&\":\"?\")+\"_=\"+Kb++ +a),m.url=G+a);m.ifModified&&(c.lastModified[G]&&\nz.setRequestHeader(\"If-Modified-Since\",c.lastModified[G]),c.etag[G]&&z.setRequestHeader(\"If-None-Match\",c.etag[G]));(m.data&&m.hasContent&&!1!==m.contentType||b.contentType)&&z.setRequestHeader(\"Content-Type\",m.contentType);z.setRequestHeader(\"Accept\",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+(\"*\"!==m.dataTypes[0]?\", \"+Nb+\"; q=0.01\":\"\"):m.accepts[\"*\"]);for(k in m.headers)z.setRequestHeader(k,m.headers[k]);if(m.beforeSend&&(!1===m.beforeSend.call(t,z,m)||O))return z.abort();\nI=\"abort\";B.add(m.complete);z.done(m.success);z.fail(m.error);if(e=wb(Sa,m,b,z)){z.readyState=1;l&&q.trigger(\"ajaxSend\",[z,m]);if(O)return z;m.async&&0<m.timeout&&(h=n.setTimeout(function(){z.abort(\"timeout\")},m.timeout));try{var O=!1;e.send(C,d)}catch(N){if(O)throw N;d(-1,N)}}else d(-1,\"No Transport\");return z},getJSON:function(a,b,d){return c.get(a,b,d,\"json\")},getScript:function(a,b){return c.get(a,void 0,b,\"script\")}});c.each([\"get\",\"post\"],function(a,b){c[b]=function(a,e,f,g){c.isFunction(e)&&\n(g=g||f,f=e,e=void 0);return c.ajax(c.extend({url:a,type:b,dataType:g,data:e,success:f},c.isPlainObject(a)&&a))}});c._evalUrl=function(a){return c.ajax({url:a,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,\"throws\":!0})};c.fn.extend({wrapAll:function(a){this[0]&&(c.isFunction(a)&&(a=a.call(this[0])),a=c(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&a.insertBefore(this[0]),a.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this));return this},\nwrapInner:function(a){return c.isFunction(a)?this.each(function(b){c(this).wrapInner(a.call(this,b))}):this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){var b=c.isFunction(a);return this.each(function(d){c(this).wrapAll(b?a.call(this,d):a)})},unwrap:function(a){this.parent(a).not(\"body\").each(function(){c(this).replaceWith(this.childNodes)});return this}});c.expr.pseudos.hidden=function(a){return!c.expr.pseudos.visible(a)};c.expr.pseudos.visible=\nfunction(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)};c.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(a){}};var Hc={0:200,1223:204},Aa=c.ajaxSettings.xhr();q.cors=!!Aa&&\"withCredentials\"in Aa;q.ajax=Aa=!!Aa;c.ajaxTransport(function(a){var b,c;if(q.cors||Aa&&!a.crossDomain)return{send:function(d,f){var e,h=a.xhr();h.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields)for(e in a.xhrFields)h[e]=a.xhrFields[e];a.mimeType&&h.overrideMimeType&&h.overrideMimeType(a.mimeType);\na.crossDomain||d[\"X-Requested-With\"]||(d[\"X-Requested-With\"]=\"XMLHttpRequest\");for(e in d)h.setRequestHeader(e,d[e]);b=function(a){return function(){b&&(b=c=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,\"abort\"===a?h.abort():\"error\"===a?\"number\"!==typeof h.status?f(0,\"error\"):f(h.status,h.statusText):f(Hc[h.status]||h.status,h.statusText,\"text\"!==(h.responseType||\"text\")||\"string\"!==typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}};h.onload=b();\nc=h.onerror=b(\"error\");void 0!==h.onabort?h.onabort=c:h.onreadystatechange=function(){4===h.readyState&&n.setTimeout(function(){b&&c()})};b=b(\"abort\");try{h.send(a.hasContent&&a.data||null)}catch(l){if(b)throw l;}},abort:function(){b&&b()}}});c.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)});c.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(a){c.globalEval(a);\nreturn a}}});c.ajaxPrefilter(\"script\",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type=\"GET\")});c.ajaxTransport(\"script\",function(a){if(a.crossDomain){var b,d;return{send:function(e,f){b=c(\"<script>\").prop({charset:a.scriptCharset,src:a.url}).on(\"load error\",d=function(a){b.remove();d=null;a&&f(\"error\"===a.type?404:200,a.type)});p.head.appendChild(b[0])},abort:function(){d&&d()}}}});var Ob=[],Ya=/(=)\\?(?=&|$)|\\?\\?/;c.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var a=Ob.pop()||\nc.expando+\"_\"+Kb++;this[a]=!0;return a}});c.ajaxPrefilter(\"json jsonp\",function(a,b,d){var e,f=!1!==a.jsonp&&(Ya.test(a.url)?\"url\":\"string\"===typeof a.data&&0===(a.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Ya.test(a.data)&&\"data\");if(f||\"jsonp\"===a.dataTypes[0]){var g=a.jsonpCallback=c.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback;f?a[f]=a[f].replace(Ya,\"$1\"+g):!1!==a.jsonp&&(a.url+=(Wa.test(a.url)?\"&\":\"?\")+a.jsonp+\"=\"+g);a.converters[\"script json\"]=function(){e||\nc.error(g+\" was not called\");return e[0]};a.dataTypes[0]=\"json\";var h=n[g];n[g]=function(){e=arguments};d.always(function(){void 0===h?c(n).removeProp(g):n[g]=h;a[g]&&(a.jsonpCallback=b.jsonpCallback,Ob.push(g));e&&c.isFunction(h)&&h(e[0]);e=h=void 0});return\"script\"}});q.createHTMLDocument=function(){var a=p.implementation.createHTMLDocument(\"\").body;a.innerHTML=\"<form></form><form></form>\";return 2===a.childNodes.length}();c.parseHTML=function(a,b,d){if(\"string\"!==typeof a)return[];\"boolean\"===\ntypeof b&&(d=b,b=!1);if(!b)if(q.createHTMLDocument){b=p.implementation.createHTMLDocument(\"\");var e=b.createElement(\"base\");e.href=p.location.href;b.head.appendChild(e)}else b=p;e=Cb.exec(a);d=!d&&[];if(e)return[b.createElement(e[1])];e=db([a],b,d);d&&d.length&&c(d).remove();return c.merge([],e.childNodes)};c.fn.load=function(a,b,d){var e,f,g=this,h=a.indexOf(\" \");if(-1<h){var l=L(a.slice(h));a=a.slice(0,h)}c.isFunction(b)?(d=b,b=void 0):b&&\"object\"===typeof b&&(e=\"POST\");0<g.length&&c.ajax({url:a,\ntype:e||\"GET\",dataType:\"html\",data:b}).done(function(a){f=arguments;g.html(l?c(\"<div>\").append(c.parseHTML(a)).find(l):a)}).always(d&&function(a,b){g.each(function(){d.apply(this,f||[a.responseText,b,a])})});return this};c.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(a,b){c.fn[b]=function(a){return this.on(b,a)}});c.expr.pseudos.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.offset={setOffset:function(a,b,d){var e=\nc.css(a,\"position\"),f=c(a),g={};\"static\"===e&&(a.style.position=\"relative\");var h=f.offset();var l=c.css(a,\"top\");var k=c.css(a,\"left\");(\"absolute\"===e||\"fixed\"===e)&&-1<(l+k).indexOf(\"auto\")?(k=f.position(),l=k.top,k=k.left):(l=parseFloat(l)||0,k=parseFloat(k)||0);c.isFunction(b)&&(b=b.call(a,d,c.extend({},h)));null!=b.top&&(g.top=b.top-h.top+l);null!=b.left&&(g.left=b.left-h.left+k);\"using\"in b?b.using.call(a,g):f.css(g)}};c.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:\nthis.each(function(b){c.offset.setOffset(this,a,b)});var b;if(b=this[0]){if(!b.getClientRects().length)return{top:0,left:0};var d=b.getBoundingClientRect();var e=b.ownerDocument;b=e.documentElement;e=e.defaultView;return{top:d.top+e.pageYOffset-b.clientTop,left:d.left+e.pageXOffset-b.clientLeft}}},position:function(){if(this[0]){var a=this[0],b={top:0,left:0};if(\"fixed\"===c.css(a,\"position\"))var d=a.getBoundingClientRect();else{var e=this.offsetParent();d=this.offset();B(e[0],\"html\")||(b=e.offset());\nb={top:b.top+c.css(e[0],\"borderTopWidth\",!0),left:b.left+c.css(e[0],\"borderLeftWidth\",!0)}}return{top:d.top-b.top-c.css(a,\"marginTop\",!0),left:d.left-b.left-c.css(a,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent;a&&\"static\"===c.css(a,\"position\");)a=a.offsetParent;return a||Ma})}});c.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,b){var d=\"pageYOffset\"===b;c.fn[a]=function(e){return aa(this,function(a,e,h){if(c.isWindow(a))var f=\na;else 9===a.nodeType&&(f=a.defaultView);if(void 0===h)return f?f[b]:a[e];f?f.scrollTo(d?f.pageXOffset:h,d?h:f.pageYOffset):a[e]=h},a,e,arguments.length)}});c.each([\"top\",\"left\"],function(a,b){c.cssHooks[b]=mb(q.pixelPosition,function(a,e){if(e)return e=ra(a,b),Pa.test(e)?c(a).position()[b]+\"px\":e})});c.each({Height:\"height\",Width:\"width\"},function(a,b){c.each({padding:\"inner\"+a,content:b,\"\":\"outer\"+a},function(d,e){c.fn[e]=function(f,g){var h=arguments.length&&(d||\"boolean\"!==typeof f),l=d||(!0===\nf||!0===g?\"margin\":\"border\");return aa(this,function(b,d,f){return c.isWindow(b)?0===e.indexOf(\"outer\")?b[\"inner\"+a]:b.document.documentElement[\"client\"+a]:9===b.nodeType?(d=b.documentElement,Math.max(b.body[\"scroll\"+a],d[\"scroll\"+a],b.body[\"offset\"+a],d[\"offset\"+a],d[\"client\"+a])):void 0===f?c.css(b,d,l):c.style(b,d,f,l)},b,h?f:void 0,h)}})});c.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,e){return this.on(b,a,\nc,e)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,\"**\"):this.off(b,a||\"**\",c)}});c.holdReady=function(a){a?c.readyWait++:c.ready(!0)};c.isArray=Array.isArray;c.parseJSON=JSON.parse;c.nodeName=B; true&&!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return c}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));var Ic=n.jQuery,Jc=n.$;c.noConflict=function(a){n.$===c&&(n.$=Jc);a&&n.jQuery===c&&(n.jQuery=Ic);return c};C||(n.jQuery=n.$=c);return c});\nvar $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||\"function\"==typeof Object.defineProperties?Object.defineProperty:function(g,l,m){g!=Array.prototype&&g!=Object.prototype&&(g[l]=m.value)};$jscomp.getGlobal=function(g){return\"undefined\"!=typeof window&&window===g?g:\"undefined\"!=typeof global&&null!=global?global:g};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX=\"jscomp_symbol_\";\n$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(g){return $jscomp.SYMBOL_PREFIX+(g||\"\")+$jscomp.symbolCounter_++};\n$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var g=$jscomp.global.Symbol.iterator;g||(g=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[g]&&$jscomp.defineProperty(Array.prototype,g,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(g){var l=0;return $jscomp.iteratorPrototype(function(){return l<g.length?{done:!1,value:g[l++]}:{done:!0}})};\n$jscomp.iteratorPrototype=function(g){$jscomp.initSymbolIterator();g={next:g};g[$jscomp.global.Symbol.iterator]=function(){return this};return g};$jscomp.iteratorFromArray=function(g,l){$jscomp.initSymbolIterator();g instanceof String&&(g+=\"\");var m=0,n={next:function(){if(m<g.length){var q=m++;return{value:l(q,g[q]),done:!1}}n.next=function(){return{done:!0,value:void 0}};return n.next()}};n[Symbol.iterator]=function(){return n};return n};\n$jscomp.polyfill=function(g,l,m,n){if(l){m=$jscomp.global;g=g.split(\".\");for(n=0;n<g.length-1;n++){var q=g[n];q in m||(m[q]={});m=m[q]}g=g[g.length-1];n=m[g];l=l(n);l!=n&&null!=l&&$jscomp.defineProperty(m,g,{configurable:!0,writable:!0,value:l})}};$jscomp.polyfill(\"Array.prototype.keys\",function(g){return g?g:function(){return $jscomp.iteratorFromArray(this,function(g){return g})}},\"es6\",\"es3\");\n(function(g,l){l(g.MMTF=g.MMTF||{})})(this,function(g){function l(a,b,c){for(var d=0,f=c.length;d<f;d++){var e=c.charCodeAt(d);if(128>e)a.setUint8(b++,e>>>0&127|0);else if(2048>e)a.setUint8(b++,e>>>6&31|192),a.setUint8(b++,e>>>0&63|128);else if(65536>e)a.setUint8(b++,e>>>12&15|224),a.setUint8(b++,e>>>6&63|128),a.setUint8(b++,e>>>0&63|128);else if(1114112>e)a.setUint8(b++,e>>>18&7|240),a.setUint8(b++,e>>>12&63|128),a.setUint8(b++,e>>>6&63|128),a.setUint8(b++,e>>>0&63|128);else throw Error(\"bad codepoint \"+\ne);}}function m(a){for(var b=0,c=0,d=a.length;c<d;c++){var f=a.charCodeAt(c);if(128>f)b+=1;else if(2048>f)b+=2;else if(65536>f)b+=3;else if(1114112>f)b+=4;else throw Error(\"bad codepoint \"+f);}return b}function n(a,b,c){var d=typeof a;if(\"string\"===d){var f=m(a);if(32>f)return b.setUint8(c,f|160),l(b,c+1,a),1+f;if(256>f)return b.setUint8(c,217),b.setUint8(c+1,f),l(b,c+2,a),2+f;if(65536>f)return b.setUint8(c,218),b.setUint16(c+1,f),l(b,c+3,a),3+f;if(4294967296>f)return b.setUint8(c,219),b.setUint32(c+\n1,f),l(b,c+5,a),5+f}if(a instanceof Uint8Array){f=a.byteLength;var e=new Uint8Array(b.buffer);if(256>f)return b.setUint8(c,196),b.setUint8(c+1,f),e.set(a,c+2),2+f;if(65536>f)return b.setUint8(c,197),b.setUint16(c+1,f),e.set(a,c+3),3+f;if(4294967296>f)return b.setUint8(c,198),b.setUint32(c+1,f),e.set(a,c+5),5+f}if(\"number\"===d){if(!isFinite(a))throw Error(\"Number not finite: \"+a);if(Math.floor(a)!==a)return b.setUint8(c,203),b.setFloat64(c+1,a),9;if(0<=a){if(128>a)return b.setUint8(c,a),1;if(256>a)return b.setUint8(c,\n204),b.setUint8(c+1,a),2;if(65536>a)return b.setUint8(c,205),b.setUint16(c+1,a),3;if(4294967296>a)return b.setUint8(c,206),b.setUint32(c+1,a),5;throw Error(\"Number too big 0x\"+a.toString(16));}if(-32<=a)return b.setInt8(c,a),1;if(-128<=a)return b.setUint8(c,208),b.setInt8(c+1,a),2;if(-32768<=a)return b.setUint8(c,209),b.setInt16(c+1,a),3;if(-2147483648<=a)return b.setUint8(c,210),b.setInt32(c+1,a),5;throw Error(\"Number too small -0x\"+(-a).toString(16).substr(1));}if(null===a)return b.setUint8(c,192),\n1;if(\"boolean\"===d)return b.setUint8(c,a?195:194),1;if(\"object\"===d){d=0;if(e=Array.isArray(a))f=a.length;else{var h=Object.keys(a);f=h.length}16>f?(b.setUint8(c,f|(e?144:128)),d=1):65536>f?(b.setUint8(c,e?220:222),b.setUint16(c+1,f),d=3):4294967296>f&&(b.setUint8(c,e?221:223),b.setUint32(c+1,f),d=5);if(e)for(e=0;e<f;e++)d+=n(a[e],b,c+d);else for(e=0;e<f;e++){var g=h[e];d+=n(g,b,c+d);d+=n(a[g],b,c+d)}return d}throw Error(\"Unknown type \"+d);}function q(a){var b=typeof a;if(\"string\"===b){var c=m(a);\nif(32>c)return 1+c;if(256>c)return 2+c;if(65536>c)return 3+c;if(4294967296>c)return 5+c}if(a instanceof Uint8Array){c=a.byteLength;if(256>c)return 2+c;if(65536>c)return 3+c;if(4294967296>c)return 5+c}if(\"number\"===b){if(Math.floor(a)!==a)return 9;if(0<=a){if(128>a)return 1;if(256>a)return 2;if(65536>a)return 3;if(4294967296>a)return 5;throw Error(\"Number too big 0x\"+a.toString(16));}if(-32<=a)return 1;if(-128<=a)return 2;if(-32768<=a)return 3;if(-2147483648<=a)return 5;throw Error(\"Number too small -0x\"+\na.toString(16).substr(1));}if(\"boolean\"===b||null===a)return 1;if(\"object\"===b){b=0;if(Array.isArray(a)){c=a.length;for(var d=0;d<c;d++)b+=q(a[d])}else{var f=Object.keys(a);c=f.length;for(d=0;d<c;d++){var e=f[d];b+=q(e)+q(a[e])}}if(16>c)return 1+b;if(65536>c)return 3+b;if(4294967296>c)return 5+b;throw Error(\"Array or object too long 0x\"+c.toString(16));}throw Error(\"Unknown type \"+b);}function H(a){var b=new ArrayBuffer(q(a)),c=new DataView(b);n(a,c,0);return new Uint8Array(b)}function k(a,b,c){return b?\nnew a(b.buffer,b.byteOffset,b.byteLength/(c||1)):void 0}function A(a,b){var c=a.length/2;b||(b=new Int16Array(c));for(var d=0,f=0;d<c;++d,f+=2)b[d]=a[f]<<8^a[f+1]<<0;return b}function r(a,b){var c=a.length/4;b||(b=new Int32Array(c));for(var d=0,f=0;d<c;++d,f+=4)b[d]=a[f]<<24^a[f+1]<<16^a[f+2]<<8^a[f+3]<<0;return b}function t(a,b){var c=a.length;b||(b=new Uint8Array(4*c));for(var d=k(DataView,b),f=0;f<c;++f)d.setInt32(4*f,a[f]);return k(Uint8Array,b)}function x(a,b,c){var d=a.length;b=1/b;c||(c=new Float32Array(d));\nfor(var f=0;f<d;++f)c[f]=a[f]*b;return c}function I(a,b,c){var d=a.length;c||(c=new Int32Array(d));for(var f=0;f<d;++f)c[f]=Math.round(a[f]*b);return c}function B(a,b){var c;if(!b){var d=b=0;for(c=a.length;d<c;d+=2)b+=a[d+1];b=new a.constructor(b)}var f=0;d=0;for(c=a.length;d<c;d+=2)for(var e=a[d],h=a[d+1],g=0;g<h;++g)b[f]=e,++f;return b}function D(a){if(0===a.length)return new Int32Array;var b,c=2;var d=1;for(b=a.length;d<b;++d)a[d-1]!==a[d]&&(c+=2);c=new Int32Array(c);var f=0,e=1;d=1;for(b=a.length;d<\nb;++d)a[d-1]!==a[d]?(c[f]=a[d-1],c[f+1]=e,e=1,f+=2):++e;c[f]=a[a.length-1];c[f+1]=e;return c}function J(a,b){var c=a.length;b||(b=new a.constructor(c));c&&(b[0]=a[0]);for(var d=1;d<c;++d)b[d]=a[d]+b[d-1];return b}function K(a,b){var c=a.length;b||(b=new a.constructor(c));b[0]=a[0];for(var d=1;d<c;++d)b[d]=a[d]-a[d-1];return b}function y(a,b){var c=a instanceof Int8Array?127:32767,d=-c-1,f=a.length,e,h;if(!b){for(e=b=0;e<f;++e)a[e]<c&&a[e]>d&&++b;b=new Int32Array(b)}for(h=e=0;e<f;){for(var g=0;a[e]===\nc||a[e]===d;)g+=a[e],++e;g+=a[e];++e;b[h]=g;++h}return b}function Y(a){var b=k(DataView,a),c=b.getInt32(0);b=b.getInt32(4);var d=a.subarray(8,12);a=a.subarray(12);return[c,a,b,d]}function u(a,b,c,d){var f=new ArrayBuffer(12+d.byteLength),e=new Uint8Array(f);f=new DataView(f);f.setInt32(0,a);f.setInt32(4,b);c&&e.set(c,8);e.set(d,12);return e}function O(a){var b=a.length;a=k(Uint8Array,a);return u(2,b,void 0,a)}function P(a){var b=a.length;a=t(a);return u(4,b,void 0,a)}function Q(a,b){var c=a.length/\nb;b=t([b]);a=k(Uint8Array,a);return u(5,c,b,a)}function R(a){var b=a.length;a=t(D(a));return u(6,b,void 0,a)}function E(a){var b=a.length;a=t(D(K(a)));return u(8,b,void 0,a)}function Z(a,b){var c=a.length,d=t([b]);a=t(D(I(a,b)));return u(9,c,d,a)}function C(a,b){var c=a.length,d=t([b]);b=K(I(a,b),void 0);var f,e=b.length;for(f=a=0;f<e;++f){var h=b[f];0===h?++a:a=32767===h||-32768===h?a+2:0<h?a+Math.ceil(h/32767):a+Math.ceil(h/-32768)}a=new Int16Array(a);var g=0;for(f=0;f<e;++f){h=b[f];if(0<=h)for(;32767<=\nh;)a[g]=32767,++g,h-=32767;else for(;-32768>=h;)a[g]=-32768,++g,h-=-32768;a[g]=h;++g}b=void 0;h=a.length;b||(b=new Uint8Array(2*h));f=k(DataView,b);for(e=0;e<h;++e)f.setInt16(2*e,a[e]);a=k(Uint8Array,b);return u(10,c,d,a)}function S(a){var b={};T.forEach(function(c){void 0!==a[c]&&(b[c]=a[c])});a.bondAtomList&&(b.bondAtomList=P(a.bondAtomList));a.bondOrderList&&(b.bondOrderList=O(a.bondOrderList));b.xCoordList=C(a.xCoordList,1E3);b.yCoordList=C(a.yCoordList,1E3);b.zCoordList=C(a.zCoordList,1E3);a.bFactorList&&\n(b.bFactorList=C(a.bFactorList,100));a.atomIdList&&(b.atomIdList=E(a.atomIdList));a.altLocList&&(b.altLocList=R(a.altLocList));a.occupancyList&&(b.occupancyList=Z(a.occupancyList,100));b.groupIdList=E(a.groupIdList);b.groupTypeList=P(a.groupTypeList);a.secStructList&&(b.secStructList=O(a.secStructList,1));a.insCodeList&&(b.insCodeList=R(a.insCodeList));a.sequenceIndexList&&(b.sequenceIndexList=E(a.sequenceIndexList));b.chainIdList=Q(a.chainIdList,4);a.chainNameList&&(b.chainNameList=Q(a.chainNameList,\n4));return b}function U(a){function b(a){for(var b={},c=0;c<a;c++){var d=e();b[d]=e()}return b}function c(b){var c=a.subarray(h,h+b);h+=b;return c}function d(b){var c=a.subarray(h,h+b);h+=b;if(65535<b){b=[];for(var d=0;d<c.length;d+=65535)b.push(String.fromCharCode.apply(null,c.subarray(d,d+65535)));return b.join(\"\")}return String.fromCharCode.apply(null,c)}function f(a){for(var b=Array(a),c=0;c<a;c++)b[c]=e();return b}function e(){var e=a[h];if(0===(e&128))return h++,e;if(128===(e&240))return h++,\nb(e&15);if(144===(e&240))return h++,f(e&15);if(160===(e&224))return h++,d(e&31);if(224===(e&224))return e=g.getInt8(h),h++,e;switch(e){case 192:return h++,null;case 194:return h++,!1;case 195:return h++,!0;case 196:return e=g.getUint8(h+1),h+=2,c(e);case 197:return e=g.getUint16(h+1),h+=3,c(e);case 198:return e=g.getUint32(h+1),h+=5,c(e);case 202:return e=g.getFloat32(h+1),h+=5,e;case 203:return e=g.getFloat64(h+1),h+=9,e;case 204:return e=a[h+1],h+=2,e;case 205:return e=g.getUint16(h+1),h+=3,e;case 206:return e=\ng.getUint32(h+1),h+=5,e;case 208:return e=g.getInt8(h+1),h+=2,e;case 209:return e=g.getInt16(h+1),h+=3,e;case 210:return e=g.getInt32(h+1),h+=5,e;case 217:return e=g.getUint8(h+1),h+=2,d(e);case 218:return e=g.getUint16(h+1),h+=3,d(e);case 219:return e=g.getUint32(h+1),h+=5,d(e);case 220:return e=g.getUint16(h+1),h+=3,f(e);case 221:return e=g.getUint32(h+1),h+=5,f(e);case 222:return e=g.getUint16(h+1),h+=3,b(e);case 223:return e=g.getUint32(h+1),h+=5,b(e)}throw Error(\"Unknown type 0x\"+e.toString(16));\n}var h=0,g=new DataView(a.buffer);return e()}function aa(a,b,c,d){switch(a){case 1:d=void 0;c=b.length;d||(d=new Float32Array(c/4));a=k(DataView,d);b=k(DataView,b);var f=0,e=0;for(c/=4;f<c;++f,e+=4)a.setFloat32(e,b.getFloat32(e),!0);return d;case 2:return k(Int8Array,b);case 3:return A(b);case 4:return r(b);case 5:return k(Uint8Array,b);case 6:return B(r(b),new Uint8Array(c));case 7:return B(r(b));case 8:return d=r(b),J(B(d),void 0);case 9:return a=r(b),d=r(d)[0],x(B(a,k(Int32Array,void 0,4)),d,void 0);\ncase 10:return a=A(b),d=r(d)[0],a=y(a,k(Int32Array,void 0,4)),b=k(Float32Array,a,4),x(J(a,k(Int32Array,b,4)),d,b);case 11:return x(A(b),r(d)[0]);case 12:return a=A(b),d=r(d)[0],x(y(a,k(Int32Array,void 0,4)),d,void 0);case 13:return a=k(Int8Array,b),d=r(d)[0],x(y(a,k(Int32Array,void 0,4)),d,void 0);case 14:return y(A(b));case 15:return y(k(Int8Array,b))}}function V(a,b){b=b||{};var c=b.ignoreFields,d={};ba.forEach(function(b){var e=c?-1!==c.indexOf(b):!1,f=a[b];e||void 0===f||(d[b]=f instanceof Uint8Array?\naa.apply(null,Y(f)):f)});return d}function W(a,b){a instanceof ArrayBuffer&&(a=new Uint8Array(a));a=a instanceof Uint8Array?U(a):a;return V(a,b)}function X(a,b,c,d){var f=new XMLHttpRequest;f.addEventListener(\"load\",function(){try{var a=W(f.response);c(a)}catch(h){d(h)}},!0);f.addEventListener(\"error\",d,!0);f.responseType=\"arraybuffer\";f.open(\"GET\",b+a.toUpperCase());f.send()}var T=\"mmtfVersion mmtfProducer unitCell spaceGroup structureId title depositionDate releaseDate experimentalMethods resolution rFree rWork bioAssemblyList ncsOperatorList entityList groupList numBonds numAtoms numGroups numChains numModels groupsPerChain chainsPerModel\".split(\" \"),\nba=T.concat(\"xCoordList yCoordList zCoordList groupIdList groupTypeList chainIdList bFactorList atomIdList altLocList occupancyList secStructList insCodeList sequenceIndexList chainNameList bondAtomList bondOrderList\".split(\" \"));g.encode=function(a){return H(S(a))};g.decode=W;g.traverse=function(a,b,c){c=c||{};c=c.firstModelOnly;var d=b.onModel,f=b.onChain,e=b.onGroup,g=b.onAtom;b=b.onBond;var l=0,k=0,n=0,m=0,q,r=-1,t=a.chainNameList,u=a.secStructList,A=a.insCodeList,x=a.sequenceIndexList,y=a.atomIdList,\nB=a.bFactorList,C=a.altLocList,D=a.occupancyList,L=a.bondAtomList,E=a.bondOrderList,H;var I=0;for(H=a.chainsPerModel.length;I<H&&!(c&&0<l);++I){var F=a.chainsPerModel[l];d&&d({chainCount:F,modelIndex:l});for(q=0;q<F;++q){var G=a.groupsPerChain[k];if(f){var M=String.fromCharCode.apply(null,a.chainIdList.subarray(4*k,4*k+4)).replace(/\\0/g,\"\");var p=null;t&&(p=String.fromCharCode.apply(null,t.subarray(4*k,4*k+4)).replace(/\\0/g,\"\"));f({groupCount:G,chainIndex:k,modelIndex:l,chainId:M,chainName:p})}for(M=\n0;M<G;++M){var v=a.groupList[a.groupTypeList[n]],N=v.atomNameList.length;if(e){p=null;u&&(p=u[n]);var w=null;a.insCodeList&&(w=String.fromCharCode(A[n]));var z=null;x&&(z=x[n]);e({atomCount:N,groupIndex:n,chainIndex:k,modelIndex:l,groupId:a.groupIdList[n],groupType:a.groupTypeList[n],groupName:v.groupName,singleLetterCode:v.singleLetterCode,chemCompType:v.chemCompType,secStruct:p,insCode:w,sequenceIndex:z})}for(p=0;p<N;++p){if(g){w=null;y&&(w=y[m]);z=null;B&&(z=B[m]);var J=null;C&&(J=String.fromCharCode(C[m]));\nvar K=null;D&&(K=D[m]);g({atomIndex:m,groupIndex:n,chainIndex:k,modelIndex:l,atomId:w,element:v.elementList[p],atomName:v.atomNameList[p],formalCharge:v.formalChargeList[p],xCoord:a.xCoordList[m],yCoord:a.yCoordList[m],zCoord:a.zCoordList[m],bFactor:z,altLoc:J,occupancy:K})}m+=1}if(b)for(z=v.bondAtomList,p=0,w=v.bondOrderList.length;p<w;++p)b({atomIndex1:m-N+z[2*p],atomIndex2:m-N+z[2*p+1],bondOrder:v.bondOrderList[p]});n+=1}k+=1}q=r+1;r=m-1;if(b&&L)for(p=0,w=L.length;p<w;p+=2)F=L[p],G=L[p+1],(F>=\nq&&F<=r||G>=q&&G<=r)&&b({atomIndex1:F,atomIndex2:G,bondOrder:E?E[p/2]:null});l+=1}};g.fetch=function(a,b,c){X(a,\"http://mmtf.rcsb.org/v1.0/full/\",b,c)};g.fetchReduced=function(a,b,c){X(a,\"http://mmtf.rcsb.org/v1.0/reduced/\",b,c)};g.version=\"v1.0.0\";g.fetchUrl=\"http://mmtf.rcsb.org/v1.0/full/\";g.fetchReducedUrl=\"http://mmtf.rcsb.org/v1.0/reduced/\";g.encodeMsgpack=H;g.encodeMmtf=S;g.decodeMsgpack=U;g.decodeMmtf=V;Object.defineProperty(g,\"__esModule\",{value:!0})});\n(function(O){ true?module.exports=O():undefined})(function(){return function x(w,g,E){function z(h,d){if(!g[h]){if(!w[h]){var c=\"function\"==typeof require&&require;if(!d&&c)return require(h,!0);if(m)return m(h,!0);d=Error(\"Cannot find module '\"+h+\"'\");throw d.code=\"MODULE_NOT_FOUND\",d;}d=g[h]=\n{exports:{}};w[h][0].call(d.exports,function(c){var n=w[h][1][c];return z(n?n:c)},d,d.exports,x,w,g,E)}return g[h].exports}for(var m=\"function\"==typeof require&&require,k=0;k<E.length;k++)z(E[k]);return z}({1:[function(x,w,g){x=\"undefined\"!==typeof Uint8Array&&\"undefined\"!==typeof Uint16Array&&\"undefined\"!==typeof Int32Array;g.assign=function(m){for(var k=Array.prototype.slice.call(arguments,1);k.length;){var h=k.shift();if(h){if(\"object\"!==typeof h)throw new TypeError(h+\"must be non-object\");for(var d in h)h.hasOwnProperty(d)&&\n(m[d]=h[d])}}return m};g.shrinkBuf=function(m,k){if(m.length===k)return m;if(m.subarray)return m.subarray(0,k);m.length=k;return m};var E={arraySet:function(m,k,h,d,c){if(k.subarray&&m.subarray)m.set(k.subarray(h,h+d),c);else for(var n=0;n<d;n++)m[c+n]=k[h+n]},flattenChunks:function(m){var k,h;var d=h=0;for(k=m.length;d<k;d++)h+=m[d].length;var c=new Uint8Array(h);d=h=0;for(k=m.length;d<k;d++){var n=m[d];c.set(n,h);h+=n.length}return c}},z={arraySet:function(m,k,h,d,c){for(var n=0;n<d;n++)m[c+n]=\nk[h+n]},flattenChunks:function(m){return[].concat.apply([],m)}};g.setTyped=function(m){m?(g.Buf8=Uint8Array,g.Buf16=Uint16Array,g.Buf32=Int32Array,g.assign(g,E)):(g.Buf8=Array,g.Buf16=Array,g.Buf32=Array,g.assign(g,z))};g.setTyped(x)},{}],2:[function(x,w,g){function E(h,c){if(65537>c&&(h.subarray&&k||!h.subarray&&m))return String.fromCharCode.apply(null,z.shrinkBuf(h,c));for(var n=\"\",d=0;d<c;d++)n+=String.fromCharCode(h[d]);return n}var z=x(\"./common\"),m=!0,k=!0;try{String.fromCharCode.apply(null,\n[0])}catch(d){m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(d){k=!1}var h=new z.Buf8(256);for(x=0;256>x;x++)h[x]=252<=x?6:248<=x?5:240<=x?4:224<=x?3:192<=x?2:1;h[254]=h[254]=1;g.string2buf=function(h){var c,n,m=h.length,d=0;for(c=0;c<m;c++){var y=h.charCodeAt(c);if(55296===(y&64512)&&c+1<m){var C=h.charCodeAt(c+1);56320===(C&64512)&&(y=65536+(y-55296<<10)+(C-56320),c++)}d+=128>y?1:2048>y?2:65536>y?3:4}var k=new z.Buf8(d);for(c=n=0;n<d;c++)y=h.charCodeAt(c),55296===(y&64512)&&c+\n1<m&&(C=h.charCodeAt(c+1),56320===(C&64512)&&(y=65536+(y-55296<<10)+(C-56320),c++)),128>y?k[n++]=y:(2048>y?k[n++]=192|y>>>6:(65536>y?k[n++]=224|y>>>12:(k[n++]=240|y>>>18,k[n++]=128|y>>>12&63),k[n++]=128|y>>>6&63),k[n++]=128|y&63);return k};g.buf2binstring=function(h){return E(h,h.length)};g.binstring2buf=function(h){for(var c=new z.Buf8(h.length),n=0,m=c.length;n<m;n++)c[n]=h.charCodeAt(n);return c};g.buf2string=function(m,c){var n,k=c||m.length,d=Array(2*k);for(c=n=0;c<k;){var y=m[c++];if(128>y)d[n++]=\ny;else{var C=h[y];if(4<C)d[n++]=65533,c+=C-1;else{for(y&=2===C?31:3===C?15:7;1<C&&c<k;)y=y<<6|m[c++]&63,C--;1<C?d[n++]=65533:65536>y?d[n++]=y:(y-=65536,d[n++]=55296|y>>10&1023,d[n++]=56320|y&1023)}}}return E(d,n)};g.utf8border=function(m,c){var n;c=c||m.length;c>m.length&&(c=m.length);for(n=c-1;0<=n&&128===(m[n]&192);)n--;return 0>n||0===n?c:n+h[m[n]]>c?n:c}},{\"./common\":1}],3:[function(x,w,g){w.exports=function(g,x,m,k){var h=g&65535|0;g=g>>>16&65535|0;for(var d;0!==m;){d=2E3<m?2E3:m;m-=d;do h=h+\nx[k++]|0,g=g+h|0;while(--d);h%=65521;g%=65521}return h|g<<16|0}},{}],4:[function(x,w,g){w.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(x,\nw,g){var E=function(){for(var g,m=[],k=0;256>k;k++){g=k;for(var h=0;8>h;h++)g=g&1?3988292384^g>>>1:g>>>1;m[k]=g}return m}();w.exports=function(g,m,k,h){k=h+k;for(g^=-1;h<k;h++)g=g>>>8^E[(g^m[h])&255];return g^-1}},{}],6:[function(x,w,g){w.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name=\"\";this.hcrc=0;this.done=!1}},{}],7:[function(x,w,g){w.exports=function(g,x){var m=g.state;var k=g.next_in;var h=g.input;var d=k+(g.avail_in-5);var c=\ng.next_out;var n=g.output;x=c-(x-g.avail_out);var A=c+(g.avail_out-257);var w=m.dmax;var y=m.wsize;var C=m.whave;var H=m.wnext;var L=m.window;var b=m.hold;var p=m.bits;var Q=m.lencode;var F=m.distcode;var E=(1<<m.lenbits)-1;var a=(1<<m.distbits)-1;a:do{15>p&&(b+=h[k++]<<p,p+=8,b+=h[k++]<<p,p+=8);var D=Q[b&E];b:for(;;){var u=D>>>24;b>>>=u;p-=u;u=D>>>16&255;if(0===u)n[c++]=D&65535;else if(u&16){var q=D&65535;if(u&=15)p<u&&(b+=h[k++]<<p,p+=8),q+=b&(1<<u)-1,b>>>=u,p-=u;15>p&&(b+=h[k++]<<p,p+=8,b+=h[k++]<<\np,p+=8);D=F[b&a];c:for(;;){u=D>>>24;b>>>=u;p-=u;u=D>>>16&255;if(u&16){D&=65535;u&=15;p<u&&(b+=h[k++]<<p,p+=8,p<u&&(b+=h[k++]<<p,p+=8));D+=b&(1<<u)-1;if(D>w){g.msg=\"invalid distance too far back\";m.mode=30;break a}b>>>=u;p-=u;u=c-x;if(D>u){u=D-u;if(u>C&&m.sane){g.msg=\"invalid distance too far back\";m.mode=30;break a}var t=0;var J=L;if(0===H){if(t+=y-u,u<q){q-=u;do n[c++]=L[t++];while(--u);t=c-D;J=n}}else if(H<u){if(t+=y+H-u,u-=H,u<q){q-=u;do n[c++]=L[t++];while(--u);t=0;if(H<q){u=H;q-=u;do n[c++]=\nL[t++];while(--u);t=c-D;J=n}}}else if(t+=H-u,u<q){q-=u;do n[c++]=L[t++];while(--u);t=c-D;J=n}for(;2<q;)n[c++]=J[t++],n[c++]=J[t++],n[c++]=J[t++],q-=3;q&&(n[c++]=J[t++],1<q&&(n[c++]=J[t++]))}else{t=c-D;do n[c++]=n[t++],n[c++]=n[t++],n[c++]=n[t++],q-=3;while(2<q);q&&(n[c++]=n[t++],1<q&&(n[c++]=n[t++]))}}else if(0===(u&64)){D=F[(D&65535)+(b&(1<<u)-1)];continue c}else{g.msg=\"invalid distance code\";m.mode=30;break a}break}}else if(0===(u&64)){D=Q[(D&65535)+(b&(1<<u)-1)];continue b}else{u&32?m.mode=12:\n(g.msg=\"invalid literal/length code\",m.mode=30);break a}break}}while(k<d&&c<A);q=p>>3;k-=q;p-=q<<3;g.next_in=k;g.next_out=c;g.avail_in=k<d?5+(d-k):5-(k-d);g.avail_out=c<A?257+(A-c):257-(c-A);m.hold=b&(1<<p)-1;m.bits=p}},{}],8:[function(x,w,g){function E(b){return(b>>>24&255)+(b>>>8&65280)+((b&65280)<<8)+((b&255)<<24)}function z(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=\nnull;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new c.Buf16(320);this.work=new c.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function m(b){if(!b||!b.state)return-2;var p=b.state;b.total_in=b.total_out=p.total=0;b.msg=\"\";p.wrap&&(b.adler=p.wrap&1);p.mode=1;p.last=0;p.havedict=0;p.dmax=32768;p.head=null;p.hold=0;p.bits=0;p.lencode=\np.lendyn=new c.Buf32(852);p.distcode=p.distdyn=new c.Buf32(592);p.sane=1;p.back=-1;return 0}function k(b){if(!b||!b.state)return-2;var p=b.state;p.wsize=0;p.whave=0;p.wnext=0;return m(b)}function h(b,p){if(!b||!b.state)return-2;var c=b.state;if(0>p){var h=0;p=-p}else h=(p>>4)+1,48>p&&(p&=15);if(p&&(8>p||15<p))return-2;null!==c.window&&c.wbits!==p&&(c.window=null);c.wrap=h;c.wbits=p;return k(b)}function d(b,c){if(!b)return-2;var p=new z;b.state=p;p.window=null;c=h(b,c);0!==c&&(b.state=null);return c}\nvar c=x(\"../utils/common\"),n=x(\"./adler32\"),A=x(\"./crc32\"),I=x(\"./inffast\"),y=x(\"./inftrees\"),C=!0,H,L;g.inflateReset=k;g.inflateReset2=h;g.inflateResetKeep=m;g.inflateInit=function(b){return d(b,15)};g.inflateInit2=d;g.inflate=function(b,p){var h,m=new c.Buf8(4),g=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return-2;var a=b.state;12===a.mode&&(a.mode=13);var k=b.next_out;var u=b.output;var q=b.avail_out;var t=b.next_in;var d=b.input;var r=\nb.avail_in;var f=a.hold;var e=a.bits;var x=r;var w=q;var z=0;a:for(;;)switch(a.mode){case 1:if(0===a.wrap){a.mode=13;break}for(;16>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}if(a.wrap&2&&35615===f){a.check=0;m[0]=f&255;m[1]=f>>>8&255;a.check=A(a.check,m,2,0);e=f=0;a.mode=2;break}a.flags=0;a.head&&(a.head.done=!1);if(!(a.wrap&1)||(((f&255)<<8)+(f>>8))%31){b.msg=\"incorrect header check\";a.mode=30;break}if(8!==(f&15)){b.msg=\"unknown compression method\";a.mode=30;break}f>>>=4;e-=4;var v=(f&15)+8;if(0===\na.wbits)a.wbits=v;else if(v>a.wbits){b.msg=\"invalid window size\";a.mode=30;break}a.dmax=1<<v;b.adler=a.check=1;a.mode=f&512?10:12;e=f=0;break;case 2:for(;16>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.flags=f;if(8!==(a.flags&255)){b.msg=\"unknown compression method\";a.mode=30;break}if(a.flags&57344){b.msg=\"unknown header flags set\";a.mode=30;break}a.head&&(a.head.text=f>>8&1);a.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,a.check=A(a.check,m,2,0));e=f=0;a.mode=3;case 3:for(;32>e;){if(0===r)break a;r--;f+=\nd[t++]<<e;e+=8}a.head&&(a.head.time=f);a.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,m[2]=f>>>16&255,m[3]=f>>>24&255,a.check=A(a.check,m,4,0));e=f=0;a.mode=4;case 4:for(;16>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.head&&(a.head.xflags=f&255,a.head.os=f>>8);a.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,a.check=A(a.check,m,2,0));e=f=0;a.mode=5;case 5:if(a.flags&1024){for(;16>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.length=f;a.head&&(a.head.extra_len=f);a.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,a.check=A(a.check,\nm,2,0));e=f=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(a.flags&1024){var l=a.length;l>r&&(l=r);l&&(a.head&&(v=a.head.extra_len-a.length,a.head.extra||(a.head.extra=Array(a.head.extra_len)),c.arraySet(a.head.extra,d,t,l,v)),a.flags&512&&(a.check=A(a.check,d,l,t)),r-=l,t+=l,a.length-=l);if(a.length)break a}a.length=0;a.mode=7;case 7:if(a.flags&2048){if(0===r)break a;l=0;do v=d[t+l++],a.head&&v&&65536>a.length&&(a.head.name+=String.fromCharCode(v));while(v&&l<r);a.flags&512&&(a.check=A(a.check,\nd,l,t));r-=l;t+=l;if(v)break a}else a.head&&(a.head.name=null);a.length=0;a.mode=8;case 8:if(a.flags&4096){if(0===r)break a;l=0;do v=d[t+l++],a.head&&v&&65536>a.length&&(a.head.comment+=String.fromCharCode(v));while(v&&l<r);a.flags&512&&(a.check=A(a.check,d,l,t));r-=l;t+=l;if(v)break a}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(a.flags&512){for(;16>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}if(f!==(a.check&65535)){b.msg=\"header crc mismatch\";a.mode=30;break}e=f=0}a.head&&(a.head.hcrc=a.flags>>\n9&1,a.head.done=!0);b.adler=a.check=0;a.mode=12;break;case 10:for(;32>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}b.adler=a.check=E(f);e=f=0;a.mode=11;case 11:if(0===a.havedict)return b.next_out=k,b.avail_out=q,b.next_in=t,b.avail_in=r,a.hold=f,a.bits=e,2;b.adler=a.check=1;a.mode=12;case 12:if(5===p||6===p)break a;case 13:if(a.last){f>>>=e&7;e-=e&7;a.mode=27;break}for(;3>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.last=f&1;f>>>=1;--e;switch(f&3){case 0:a.mode=14;break;case 1:v=a;if(C){H=new c.Buf32(512);\nL=new c.Buf32(32);for(l=0;144>l;)v.lens[l++]=8;for(;256>l;)v.lens[l++]=9;for(;280>l;)v.lens[l++]=7;for(;288>l;)v.lens[l++]=8;y(1,v.lens,0,288,H,0,v.work,{bits:9});for(l=0;32>l;)v.lens[l++]=5;y(2,v.lens,0,32,L,0,v.work,{bits:5});C=!1}v.lencode=H;v.lenbits=9;v.distcode=L;v.distbits=5;a.mode=20;if(6===p){f>>>=2;e-=2;break a}break;case 2:a.mode=17;break;case 3:b.msg=\"invalid block type\",a.mode=30}f>>>=2;e-=2;break;case 14:f>>>=e&7;for(e-=e&7;32>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}if((f&65535)!==\n(f>>>16^65535)){b.msg=\"invalid stored block lengths\";a.mode=30;break}a.length=f&65535;e=f=0;a.mode=15;if(6===p)break a;case 15:a.mode=16;case 16:if(l=a.length){l>r&&(l=r);l>q&&(l=q);if(0===l)break a;c.arraySet(u,d,t,l,k);r-=l;t+=l;q-=l;k+=l;a.length-=l;break}a.mode=12;break;case 17:for(;14>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.nlen=(f&31)+257;f>>>=5;e-=5;a.ndist=(f&31)+1;f>>>=5;e-=5;a.ncode=(f&15)+4;f>>>=4;e-=4;if(286<a.nlen||30<a.ndist){b.msg=\"too many length or distance symbols\";a.mode=30;\nbreak}a.have=0;a.mode=18;case 18:for(;a.have<a.ncode;){for(;3>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.lens[g[a.have++]]=f&7;f>>>=3;e-=3}for(;19>a.have;)a.lens[g[a.have++]]=0;a.lencode=a.lendyn;a.lenbits=7;l={bits:a.lenbits};z=y(0,a.lens,0,19,a.lencode,0,a.work,l);a.lenbits=l.bits;if(z){b.msg=\"invalid code lengths set\";a.mode=30;break}a.have=0;a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;;){var B=a.lencode[f&(1<<a.lenbits)-1];l=B>>>24;B&=65535;if(l<=e)break;if(0===r)break a;r--;f+=d[t++]<<\ne;e+=8}if(16>B)f>>>=l,e-=l,a.lens[a.have++]=B;else{if(16===B){for(v=l+2;e<v;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}f>>>=l;e-=l;if(0===a.have){b.msg=\"invalid bit length repeat\";a.mode=30;break}v=a.lens[a.have-1];l=3+(f&3);f>>>=2;e-=2}else if(17===B){for(v=l+3;e<v;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}f>>>=l;e-=l;v=0;l=3+(f&7);f>>>=3;e-=3}else{for(v=l+7;e<v;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}f>>>=l;e-=l;v=0;l=11+(f&127);f>>>=7;e-=7}if(a.have+l>a.nlen+a.ndist){b.msg=\"invalid bit length repeat\";\na.mode=30;break}for(;l--;)a.lens[a.have++]=v}}if(30===a.mode)break;if(0===a.lens[256]){b.msg=\"invalid code -- missing end-of-block\";a.mode=30;break}a.lenbits=9;l={bits:a.lenbits};z=y(1,a.lens,0,a.nlen,a.lencode,0,a.work,l);a.lenbits=l.bits;if(z){b.msg=\"invalid literal/lengths set\";a.mode=30;break}a.distbits=6;a.distcode=a.distdyn;l={bits:a.distbits};z=y(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,l);a.distbits=l.bits;if(z){b.msg=\"invalid distances set\";a.mode=30;break}a.mode=20;if(6===p)break a;case 20:a.mode=\n21;case 21:if(6<=r&&258<=q){b.next_out=k;b.avail_out=q;b.next_in=t;b.avail_in=r;a.hold=f;a.bits=e;I(b,w);k=b.next_out;u=b.output;q=b.avail_out;t=b.next_in;d=b.input;r=b.avail_in;f=a.hold;e=a.bits;12===a.mode&&(a.back=-1);break}for(a.back=0;;){B=a.lencode[f&(1<<a.lenbits)-1];l=B>>>24;v=B>>>16&255;B&=65535;if(l<=e)break;if(0===r)break a;r--;f+=d[t++]<<e;e+=8}if(v&&0===(v&240)){var G=l;var M=v;for(h=B;;){B=a.lencode[h+((f&(1<<G+M)-1)>>G)];l=B>>>24;v=B>>>16&255;B&=65535;if(G+l<=e)break;if(0===r)break a;\nr--;f+=d[t++]<<e;e+=8}f>>>=G;e-=G;a.back+=G}f>>>=l;e-=l;a.back+=l;a.length=B;if(0===v){a.mode=26;break}if(v&32){a.back=-1;a.mode=12;break}if(v&64){b.msg=\"invalid literal/length code\";a.mode=30;break}a.extra=v&15;a.mode=22;case 22:if(a.extra){for(v=a.extra;e<v;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.length+=f&(1<<a.extra)-1;f>>>=a.extra;e-=a.extra;a.back+=a.extra}a.was=a.length;a.mode=23;case 23:for(;;){B=a.distcode[f&(1<<a.distbits)-1];l=B>>>24;v=B>>>16&255;B&=65535;if(l<=e)break;if(0===r)break a;\nr--;f+=d[t++]<<e;e+=8}if(0===(v&240)){G=l;M=v;for(h=B;;){B=a.distcode[h+((f&(1<<G+M)-1)>>G)];l=B>>>24;v=B>>>16&255;B&=65535;if(G+l<=e)break;if(0===r)break a;r--;f+=d[t++]<<e;e+=8}f>>>=G;e-=G;a.back+=G}f>>>=l;e-=l;a.back+=l;if(v&64){b.msg=\"invalid distance code\";a.mode=30;break}a.offset=B;a.extra=v&15;a.mode=24;case 24:if(a.extra){for(v=a.extra;e<v;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}a.offset+=f&(1<<a.extra)-1;f>>>=a.extra;e-=a.extra;a.back+=a.extra}if(a.offset>a.dmax){b.msg=\"invalid distance too far back\";\na.mode=30;break}a.mode=25;case 25:if(0===q)break a;l=w-q;if(a.offset>l){l=a.offset-l;if(l>a.whave&&a.sane){b.msg=\"invalid distance too far back\";a.mode=30;break}l>a.wnext?(l-=a.wnext,v=a.wsize-l):v=a.wnext-l;l>a.length&&(l=a.length);G=a.window}else G=u,v=k-a.offset,l=a.length;l>q&&(l=q);q-=l;a.length-=l;do u[k++]=G[v++];while(--l);0===a.length&&(a.mode=21);break;case 26:if(0===q)break a;u[k++]=a.length;q--;a.mode=21;break;case 27:if(a.wrap){for(;32>e;){if(0===r)break a;r--;f|=d[t++]<<e;e+=8}w-=q;\nb.total_out+=w;a.total+=w;w&&(b.adler=a.check=a.flags?A(a.check,u,w,k-w):n(a.check,u,w,k-w));w=q;if((a.flags?f:E(f))!==a.check){b.msg=\"incorrect data check\";a.mode=30;break}e=f=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;32>e;){if(0===r)break a;r--;f+=d[t++]<<e;e+=8}if(f!==(a.total&4294967295)){b.msg=\"incorrect length check\";a.mode=30;break}e=f=0}a.mode=29;case 29:z=1;break a;case 30:z=-3;break a;case 31:return-4;default:return-2}b.next_out=k;b.avail_out=q;b.next_in=t;b.avail_in=r;a.hold=f;a.bits=\ne;if(a.wsize||w!==b.avail_out&&30>a.mode&&(27>a.mode||4!==p))d=b.output,t=b.next_out,k=w-b.avail_out,q=b.state,null===q.window&&(q.wsize=1<<q.wbits,q.wnext=0,q.whave=0,q.window=new c.Buf8(q.wsize)),k>=q.wsize?(c.arraySet(q.window,d,t-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):(r=q.wsize-q.wnext,r>k&&(r=k),c.arraySet(q.window,d,t-k,r,q.wnext),(k-=r)?(c.arraySet(q.window,d,t-k,k,0),q.wnext=k,q.whave=q.wsize):(q.wnext+=r,q.wnext===q.wsize&&(q.wnext=0),q.whave<q.wsize&&(q.whave+=r)));x-=b.avail_in;\nw-=b.avail_out;b.total_in+=x;b.total_out+=w;a.total+=w;a.wrap&&w&&(b.adler=a.check=a.flags?A(a.check,u,w,b.next_out-w):n(a.check,u,w,b.next_out-w));b.data_type=a.bits+(a.last?64:0)+(12===a.mode?128:0)+(20===a.mode||15===a.mode?256:0);(0===x&&0===w||4===p)&&0===z&&(z=-5);return z};g.inflateEnd=function(b){if(!b||!b.state)return-2;var c=b.state;c.window&&(c.window=null);b.state=null;return 0};g.inflateGetHeader=function(b,c){if(!b||!b.state)return-2;b=b.state;if(0===(b.wrap&2))return-2;b.head=c;c.done=\n!1;return 0};g.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":1,\"./adler32\":3,\"./crc32\":5,\"./inffast\":7,\"./inftrees\":9}],9:[function(x,w,g){var E=x(\"../utils/common\"),z=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],m=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=\n[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];w.exports=function(d,c,g,w,x,y,C,H){var n=H.bits,b,p,A,F,K,a,D=0,u=new E.Buf16(16);var q=new E.Buf16(16);var t,J=0;for(b=0;15>=b;b++)u[b]=0;for(p=0;p<w;p++)u[c[g+p]]++;var r=n;for(A=15;1<=A&&0===u[A];A--);r>A&&(r=A);if(0===A)return x[y++]=20971520,x[y++]=20971520,H.bits=1,0;for(n=1;n<A&&0===u[n];n++);r<n&&(r=n);for(b=F=1;15>=b;b++)if(F<<=1,F-=u[b],0>F)return-1;if(0<F&&(0===d||1!==A))return-1;q[1]=0;for(b=\n1;15>b;b++)q[b+1]=q[b]+u[b];for(p=0;p<w;p++)0!==c[g+p]&&(C[q[c[g+p]]++]=p);if(0===d){var f=t=C;var e=19}else 1===d?(f=z,D-=257,t=m,J-=257,e=256):(f=k,t=h,e=-1);p=K=0;b=n;var I=y;w=r;q=0;var P=-1;var N=1<<r;var v=N-1;if(1===d&&852<N||2===d&&592<N)return 1;for(var l=0;;){l++;var B=b-q;if(C[p]<e){var G=0;var M=C[p]}else C[p]>e?(G=t[J+C[p]],M=f[D+C[p]]):(G=96,M=0);F=1<<b-q;n=a=1<<w;do a-=F,x[I+(K>>q)+a]=B<<24|G<<16|M|0;while(0!==a);for(F=1<<b-1;K&F;)F>>=1;0!==F?(K&=F-1,K+=F):K=0;p++;if(0===--u[b]){if(b===\nA)break;b=c[g+C[p]]}if(b>r&&(K&v)!==P){0===q&&(q=r);I+=n;w=b-q;for(F=1<<w;w+q<A;){F-=u[w+q];if(0>=F)break;w++;F<<=1}N+=1<<w;if(1===d&&852<N||2===d&&592<N)return 1;P=K&v;x[P]=r<<24|w<<16|I-y|0}}0!==K&&(x[I+K]=b-q<<24|4194304);H.bits=r;return 0}},{\"../utils/common\":1}],10:[function(x,w,g){w.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],11:[function(x,w,g){w.exports=\nfunction(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg=\"\";this.state=null;this.data_type=2;this.adler=0}},{}],\"/lib/inflate.js\":[function(x,w,g){function E(c,h){h=new I(h);h.push(c,!0);if(h.err)throw h.msg;return h.result}var z=x(\"./zlib/inflate.js\"),m=x(\"./utils/common\"),k=x(\"./utils/strings\"),h=x(\"./zlib/constants\"),d=x(\"./zlib/messages\"),c=x(\"./zlib/zstream\"),n=x(\"./zlib/gzheader\"),A=Object.prototype.toString,\nI=function(g){var k=this.options=m.assign({chunkSize:16384,windowBits:0,to:\"\"},g||{});k.raw&&0<=k.windowBits&&16>k.windowBits&&(k.windowBits=-k.windowBits,0===k.windowBits&&(k.windowBits=-15));!(0<=k.windowBits&&16>k.windowBits)||g&&g.windowBits||(k.windowBits+=32);15<k.windowBits&&48>k.windowBits&&0===(k.windowBits&15)&&(k.windowBits|=15);this.err=0;this.msg=\"\";this.ended=!1;this.chunks=[];this.strm=new c;this.strm.avail_out=0;g=z.inflateInit2(this.strm,k.windowBits);if(g!==h.Z_OK)throw Error(d[g]);\nthis.header=new n;z.inflateGetHeader(this.strm,this.header)};I.prototype.push=function(c,g){var d=this.strm,n=this.options.chunkSize;if(this.ended)return!1;g=g===~~g?g:!0===g?h.Z_FINISH:h.Z_NO_FLUSH;\"string\"===typeof c?d.input=k.binstring2buf(c):\"[object ArrayBuffer]\"===A.call(c)?d.input=new Uint8Array(c):d.input=c;d.next_in=0;d.avail_in=d.input.length;do{0===d.avail_out&&(d.output=new m.Buf8(n),d.next_out=0,d.avail_out=n);c=z.inflate(d,h.Z_NO_FLUSH);if(c!==h.Z_STREAM_END&&c!==h.Z_OK)return this.onEnd(c),\nthis.ended=!0,!1;if(d.next_out&&(0===d.avail_out||c===h.Z_STREAM_END||0===d.avail_in&&(g===h.Z_FINISH||g===h.Z_SYNC_FLUSH)))if(\"string\"===this.options.to){var b=k.utf8border(d.output,d.next_out);var p=d.next_out-b;var w=k.buf2string(d.output,b);d.next_out=p;d.avail_out=n-p;p&&m.arraySet(d.output,d.output,b,p,0);this.onData(w)}else this.onData(m.shrinkBuf(d.output,d.next_out))}while(0<d.avail_in&&c!==h.Z_STREAM_END);c===h.Z_STREAM_END&&(g=h.Z_FINISH);if(g===h.Z_FINISH)return c=z.inflateEnd(this.strm),\nthis.onEnd(c),this.ended=!0,c===h.Z_OK;g===h.Z_SYNC_FLUSH&&(this.onEnd(h.Z_OK),d.avail_out=0);return!0};I.prototype.onData=function(c){this.chunks.push(c)};I.prototype.onEnd=function(c){c===h.Z_OK&&(this.result=\"string\"===this.options.to?this.chunks.join(\"\"):m.flattenChunks(this.chunks));this.chunks=[];this.err=c;this.msg=this.strm.msg};g.Inflate=I;g.inflate=E;g.inflateRaw=function(c,d){d=d||{};d.raw=!0;return E(c,d)};g.ungzip=E},{\"./utils/common\":1,\"./utils/strings\":2,\"./zlib/constants\":4,\"./zlib/gzheader\":6,\n\"./zlib/inflate.js\":8,\"./zlib/messages\":10,\"./zlib/zstream\":11}]},{},[])(\"/lib/inflate.js\")});\nvar $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)};$jscomp.getGlobal=function(b){return\"undefined\"!=typeof window&&window===b?b:\"undefined\"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX=\"jscomp_symbol_\";\n$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return $jscomp.SYMBOL_PREFIX+(b||\"\")+$jscomp.symbolCounter_++};\n$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.iterator;b||(b=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&$jscomp.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(b){var c=0;return $jscomp.iteratorPrototype(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})};\n$jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();b={next:b};b[$jscomp.global.Symbol.iterator]=function(){return this};return b};$jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();var c=b[Symbol.iterator];return c?c.call(b):$jscomp.arrayIterator(b)};\n$jscomp.polyfill=function(b,c,d,h){if(c){d=$jscomp.global;b=b.split(\".\");for(h=0;h<b.length-1;h++){var e=b[h];e in d||(d[e]={});d=d[e]}b=b[b.length-1];h=d[b];c=c(h);c!=h&&null!=c&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;\n$jscomp.polyfill(\"Promise\",function(b){function c(){this.batch_=null}function d(b){return b instanceof e?b:new e(function(c,g){c(b)})}if(b&&!$jscomp.FORCE_POLYFILL_PROMISE)return b;c.prototype.asyncExecute=function(b){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(b);return this};c.prototype.asyncExecuteBatch_=function(){var b=this;this.asyncExecuteFunction(function(){b.executeBatch_()})};var h=$jscomp.global.setTimeout;c.prototype.asyncExecuteFunction=function(b){h(b,\n0)};c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var b=this.batch_;this.batch_=[];for(var c=0;c<b.length;++c){var d=b[c];delete b[c];try{d()}catch(u){this.asyncThrow_(u)}}}this.batch_=null};c.prototype.asyncThrow_=function(b){this.asyncExecuteFunction(function(){throw b;})};var e=function(b){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var c=this.createResolveAndReject_();try{b(c.resolve,c.reject)}catch(p){c.reject(p)}};e.prototype.createResolveAndReject_=\nfunction(){function b(b){return function(g){d||(d=!0,b.call(c,g))}}var c=this,d=!1;return{resolve:b(this.resolveTo_),reject:b(this.reject_)}};e.prototype.resolveTo_=function(b){if(b===this)this.reject_(new TypeError(\"A Promise cannot resolve to itself\"));else if(b instanceof e)this.settleSameAsPromise_(b);else{a:switch(typeof b){case \"object\":var c=null!=b;break a;case \"function\":c=!0;break a;default:c=!1}c?this.resolveToNonPromiseObj_(b):this.fulfill_(b)}};e.prototype.resolveToNonPromiseObj_=function(b){var c=\nvoid 0;try{c=b.then}catch(p){this.reject_(p);return}\"function\"==typeof c?this.settleSameAsThenable_(c,b):this.fulfill_(b)};e.prototype.reject_=function(b){this.settle_(2,b)};e.prototype.fulfill_=function(b){this.settle_(1,b)};e.prototype.settle_=function(b,c){if(0!=this.state_)throw Error(\"Cannot settle(\"+b+\", \"+c|\"): Promise already settled in state\"+this.state_);this.state_=b;this.result_=c;this.executeOnSettledCallbacks_()};e.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var b=\nthis.onSettledCallbacks_,c=0;c<b.length;++c)b[c].call(),b[c]=null;this.onSettledCallbacks_=null}};var t=new c;e.prototype.settleSameAsPromise_=function(b){var c=this.createResolveAndReject_();b.callWhenSettled_(c.resolve,c.reject)};e.prototype.settleSameAsThenable_=function(b,c){var d=this.createResolveAndReject_();try{b.call(c,d.resolve,d.reject)}catch(u){d.reject(u)}};e.prototype.then=function(b,c){function d(b,c){return\"function\"==typeof b?function(c){try{g(b(c))}catch(x){m(x)}}:c}var g,m,l=new e(function(b,\nc){g=b;m=c});this.callWhenSettled_(d(b,g),d(c,m));return l};e.prototype.catch=function(b){return this.then(void 0,b)};e.prototype.callWhenSettled_=function(b,c){function d(){switch(g.state_){case 1:b(g.result_);break;case 2:c(g.result_);break;default:throw Error(\"Unexpected state: \"+g.state_);}}var g=this;null==this.onSettledCallbacks_?t.asyncExecute(d):this.onSettledCallbacks_.push(function(){t.asyncExecute(d)})};e.resolve=d;e.reject=function(b){return new e(function(c,d){d(b)})};e.race=function(b){return new e(function(c,\ng){for(var h=$jscomp.makeIterator(b),m=h.next();!m.done;m=h.next())d(m.value).callWhenSettled_(c,g)})};e.all=function(b){var c=$jscomp.makeIterator(b),g=c.next();return g.done?d([]):new e(function(b,m){function l(c){return function(l){n[c]=l;h--;0==h&&b(n)}}var n=[],h=0;do n.push(void 0),h++,d(g.value).callWhenSettled_(l(n.length-1),m),g=c.next();while(!g.done)})};return e},\"es6\",\"es3\");\n$jscomp.checkStringArgs=function(b,c,d){if(null==b)throw new TypeError(\"The 'this' value for String.prototype.\"+d+\" must not be null or undefined\");if(c instanceof RegExp)throw new TypeError(\"First argument to String.prototype.\"+d+\" must not be a regular expression\");return b+\"\"};\n$jscomp.polyfill(\"String.prototype.repeat\",function(b){return b?b:function(b){var c=$jscomp.checkStringArgs(this,null,\"repeat\");if(0>b||1342177279<b)throw new RangeError(\"Invalid count value\");b|=0;for(var h=\"\";b;)if(b&1&&(h+=c),b>>>=1)c+=c;return h}},\"es6\",\"es3\");\n$jscomp.polyfill(\"String.prototype.startsWith\",function(b){return b?b:function(b,d){var c=$jscomp.checkStringArgs(this,b,\"startsWith\");b+=\"\";var e=c.length,t=b.length;d=Math.max(0,Math.min(d|0,c.length));for(var g=0;g<t&&d<e;)if(c[d++]!=b[g++])return!1;return g>=t}},\"es6\",\"es3\");\n$jscomp.polyfill(\"String.prototype.endsWith\",function(b){return b?b:function(b,d){var c=$jscomp.checkStringArgs(this,b,\"endsWith\");b+=\"\";void 0===d&&(d=c.length);d=Math.max(0,Math.min(d|0,c.length));for(var e=b.length;0<e&&0<d;)if(c[--d]!=b[--e])return!1;return 0>=e}},\"es6\",\"es3\");\n$jscomp.polyfill(\"Array.prototype.fill\",function(b){return b?b:function(b,d,h){var c=this.length||0;0>d&&(d=Math.max(0,c+d));if(null==h||h>c)h=c;h=Number(h);0>h&&(h=Math.max(0,c+h));for(d=Number(d||0);d<h;d++)this[d]=b;return this}},\"es6\",\"es3\");\n$jscomp.iteratorFromArray=function(b,c){$jscomp.initSymbolIterator();b instanceof String&&(b+=\"\");var d=0,h={next:function(){if(d<b.length){var e=d++;return{value:c(e,b[e]),done:!1}}h.next=function(){return{done:!0,value:void 0}};return h.next()}};h[Symbol.iterator]=function(){return h};return h};$jscomp.polyfill(\"Array.prototype.keys\",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},\"es6\",\"es3\");\n$jscomp.polyfill(\"Object.is\",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}},\"es6\",\"es3\");$jscomp.polyfill(\"Array.prototype.includes\",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var e=c.length;for(d=d||0;d<e;d++)if(c[d]==b||Object.is(c[d],b))return!0;return!1}},\"es7\",\"es3\");\n$jscomp.polyfill(\"String.prototype.includes\",function(b){return b?b:function(b,d){return-1!==$jscomp.checkStringArgs(this,b,\"includes\").indexOf(b,d||0)}},\"es6\",\"es3\");$jscomp.polyfill(\"Number.isFinite\",function(b){return b?b:function(b){return\"number\"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}},\"es6\",\"es3\");$jscomp.polyfill(\"Number.isInteger\",function(b){return b?b:function(b){return Number.isFinite(b)?b===Math.floor(b):!1}},\"es6\",\"es3\");$3Dmol=function(b){return b.$3Dmol||{}}(window);\n true&&\"object\"===typeof module.exports&&(module.exports=$3Dmol);$3Dmol.notrack||$.get(\"https://3dmol.csb.pitt.edu/track/report.cgi\");String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});\n$.ajaxTransport(\"+binary\",function(b,c,d){if(window.FormData&&(b.dataType&&\"binary\"==b.dataType||b.data&&(window.ArrayBuffer&&b.data instanceof ArrayBuffer||window.Blob&&b.data instanceof Blob)))return{send:function(c,d){var e=new XMLHttpRequest,g=b.url,h=b.type,p=b.async||!0,u=b.responseType||\"blob\",m=b.data||null,l=b.username||null,n=b.password||null,y=function(){var c={};c[b.dataType]=e.response;d(e.status,e.statusText,c,e.getAllResponseHeaders())};e.addEventListener(\"load\",y);e.addEventListener(\"error\",\ny);e.addEventListener(\"abort\",y);e.open(h,g,p,l,n);for(var f in c)e.setRequestHeader(f,c[f]);e.responseType=u;e.send(m)},abort:function(){d.abort()}}});$3Dmol.createViewer=function(b,c){\"string\"===$.type(b)&&(b=$(\"#\"+b));if(b){c=c||{};try{return new $3Dmol.GLViewer(b,c)}catch(d){throw\"error creating viewer: \"+d;}}};\n$3Dmol.createViewerGrid=function(b,c,d){\"string\"===$.type(b)&&(b=$(\"#\"+b));if(b){c=c||{};d=d||{};var h=[],e=document.createElement(\"canvas\");d.rows=c.rows;d.cols=c.cols;d.control_all=void 0!=c.control_all?c.control_all:!1;$(b).append($(e));try{for(var t=0;t<c.rows;t++){for(var g=[],q=0;q<c.cols;q++){d.row=t;d.col=q;d.canvas=e;d.viewers=h;d.control_all=c.control_all;var p=$3Dmol.createViewer(b,d);g.push(p)}h.unshift(g)}}catch(u){throw\"error creating viewer grid: \"+u;}return h}};$3Dmol.viewers={};\n$3Dmol.getbin=function(b,c,d,h){var e=new Promise(function(c,g){d=void 0==d?\"GET\":d;$.ajax({url:b,dataType:\"binary\",method:d,data:h,responseType:\"arraybuffer\",processData:!1}).done(function(b,d,g){c(b)}).fail(function(b,c){console.log(c);g()})});return c?e.then(c):e};$3Dmol.base64ToArray=function(b){b=window.atob(b);for(var c=b.length,d=new Uint8Array(c),h=0;h<c;h++)d[h]=b.charCodeAt(h);return d};\n$3Dmol.download=function(b,c,d,h){var e=\"\",t=\"\";t=\"\";var g=c.addModel();if(\"mmtf:\"===b.substr(0,5)){t=d&&d.pdbUri?d.pdbUri:\"https://mmtf.rcsb.org/v1.0/full/\";b=b.substr(5).toUpperCase();var q=t+b;d&&\"undefined\"===typeof d.noComputeSecondaryStructure&&(d.noComputeSecondaryStructure=!0);b=new Promise(function(b,m){$3Dmol.getbin(q).then(function(l){g.addMolData(l,\"mmtf\",d);c.zoomTo();c.render();b(g)})})}else{if(\"pdb:\"===b.substr(0,4)){e=\"mmtf\";d&&d.format&&(e=d.format);d&&\"undefined\"===typeof d.noComputeSecondaryStructure&&\n(d.noComputeSecondaryStructure=!0);b=b.substr(4).toUpperCase();if(!b.match(/^[1-9][A-Za-z0-9]{3}$/)){alert(\"Wrong PDB ID\");return}\"mmtf\"==e?(t=d&&d.mmtfUri?d.mmtfUri:\"https://mmtf.rcsb.org/v1.0/full/\",q=t+b.toUpperCase()):(t=d&&d.pdbUri?d.pdbUri:\"https://files.rcsb.org/view/\",q=t+b+\".\"+e)}else if(\"cid:\"==b.substr(0,4)){e=\"sdf\";b=b.substr(4);if(!b.match(/^[0-9]+$/)){alert(\"Wrong Compound ID\");return}q=\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/\"+b+\"/SDF?record_type=3d\"}else\"url:\"==b.substr(0,\n4)&&(e=q=b.substr(4));var p=function(b){g.addMolData(b,e,d);c.zoomTo();c.render()};b=new Promise(function(b,c){\"mmtf\"==e?$3Dmol.getbin(q).then(function(c){p(c);b(g)}):$.get(q,function(c){p(c);b(g)}).fail(function(b){console.log(\"fetch of \"+q+\" failed: \"+b.statusText)})})}return h?(b.then(function(b){h(b)}),g):b};$3Dmol.SurfaceType={VDW:1,MS:2,SAS:3,SES:4};$3Dmol.mergeGeos=function(b,c){c=c.geometry;void 0!==c&&b.geometryGroups.push(c.geometryGroups[0])};\n$3Dmol.multiLineString=function(b){return b.toString().replace(/^[^\\/]+\\/\\*!?/,\"\").replace(/\\*\\/[^\\/]+$/,\"\")};$3Dmol.syncSurface=!1;if(0<=window.navigator.userAgent.indexOf(\"MSIE \")||0<=window.navigator.userAgent.indexOf(\"Trident/\"))$3Dmol.syncSurface=!0;\n$3Dmol.specStringToObject=function(b){if(\"object\"===typeof b||\"undefined\"===typeof b||null==b)return b;b=b.replace(/%7E/,\"~\");var c=function(b){return $.isNumeric(b)?Math.floor(parseFloat(b))==parseInt(b)?parseFloat(b):0<=b.indexOf(\".\")?parseFloat(b):parseInt(b):\"true\"===b?!0:\"false\"===b?!1:b},d={};if(\"all\"===b)return d;b=b.split(\";\");for(var h=0;h<b.length;h++){var e=b[h].split(\":\"),t=e[0],g={};if(e=e[1])if(e=e.replace(/~/g,\"=\"),-1!==e.indexOf(\"=\")){e=e.split(\",\");for(var q=0;q<e.length;q++){var p=\ne[q].split(\"=\",2);g[p[0]]=c(p[1])}}else g=-1!==e.indexOf(\",\")?e.split(\",\"):c(e);d[t]=g}return d};\n$3Dmol.getExtent=function(b,c){var d,h,e,t,g,q,p,u=!c;c=d=h=9999;var m=e=t=-9999;var l=g=q=p=0;if(0===b.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var n=0;n<b.length;n++){var y=b[n];if(\"undefined\"!==typeof y&&isFinite(y.x)&&isFinite(y.y)&&isFinite(y.z)&&(p++,l+=y.x,g+=y.y,q+=y.z,c=c<y.x?c:y.x,d=d<y.y?d:y.y,h=h<y.z?h:y.z,m=m>y.x?m:y.x,e=e>y.y?e:y.y,t=t>y.z?t:y.z,y.symmetries&&u))for(var f=0;f<y.symmetries.length;f++)p++,l+=y.symmetries[f].x,g+=y.symmetries[f].y,q+=y.symmetries[f].z,c=c<y.symmetries[f].x?\nc:y.symmetries[f].x,d=d<y.symmetries[f].y?d:y.symmetries[f].y,h=h<y.symmetries[f].z?h:y.symmetries[f].z,m=m>y.symmetries[f].x?m:y.symmetries[f].x,e=e>y.symmetries[f].y?e:y.symmetries[f].y,t=t>y.symmetries[f].z?t:y.symmetries[f].z}return[[c,d,h],[m,e,t],[l/p,g/p,q/p]]};$3Dmol.getAtomProperty=function(b,c){var d=null;b.properties&&\"undefined\"!=typeof b.properties[c]?d=b.properties[c]:\"undefined\"!=typeof b[c]&&(d=b[c]);return d};\n$3Dmol.getPropertyRange=function(b,c){for(var d=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,e=0,t=b.length;e<t;e++){var g=$3Dmol.getAtomProperty(b[e],c);null!=g&&(g<d&&(d=g),g>h&&(h=g))}isFinite(d)||isFinite(h)?isFinite(d)?isFinite(h)||(h=d):d=h:d=h=0;return[d,h]}; true&&!(__WEBPACK_AMD_DEFINE_FACTORY__ = ($3Dmol),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n$3Dmol.createStereoViewer=function(b){var c=this;\"string\"===$.type(b)&&(b=$(\"#\"+b));if(b){b=$3Dmol.createViewerGrid(b,{rows:1,cols:2,control_all:!0});this.glviewer1=b[0][0];this.glviewer2=b[0][1];this.glviewer1.setAutoEyeSeparation(!1);this.glviewer2.setAutoEyeSeparation(!0);this.glviewer1.linkViewer(this.glviewer2);this.glviewer2.linkViewer(this.glviewer1);b=Object.getOwnPropertyNames(this.glviewer1).filter(function(b){return\"function\"==typeof c.glviewer1[b]});for(var d=0;d<b.length;d++)this[b[d]]=\nfunction(b){return function(){var c=this.glviewer1[b].apply(this.glviewer1,arguments),d=this.glviewer2[b].apply(this.glviewer2,arguments);return[c,d]}}(b[d]);this.setCoordinates=function(b,c,d){for(var g=0;g<b.length;g++)b[g].setCoordinates(c,d)};this.surfacesFinished=function(){return this.glviewer1.surfacesFinished()&&this.glviewer2.surfacesFinished()};this.isAnimated=function(){return this.glviewer1.isAnimated()||this.glviewer2.isAnimated()};this.render=function(b){this.glviewer1.render();this.glviewer2.render();\nb&&b(this)};this.getCanvas=function(){return this.glviewer1.getCanvas()}}};var $3Dmol=$3Dmol||{};$3Dmol.Math={clamp:function(b,c,d){return Math.min(Math.max(b,c),d)},degToRad:function(){var b=Math.PI/180;return function(c){return c*b}}()};$3Dmol.Quaternion=function(b,c,d,h){this.x=b||0;this.y=c||0;this.z=d||0;this.w=void 0!==h?h:1};\n$3Dmol.Quaternion.prototype={constructor:$3Dmol.Quaternion,set:function(b,c,d,h){this.x=b;this.y=c;this.z=d;this.w=h;return this},copy:function(b){this.x=b.x;this.y=b.y;this.z=b.z;this.w=b.w;return this},conjugate:function(){this.x*=-1;this.y*=-1;this.z*=-1;return this},inverse:function(){return this.conjugate().normalize()},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var b=this.length();0===b?(this.z=this.y=this.x=0,this.w=1):\n(b=1/b,this.x*=b,this.y*=b,this.z*=b,this.w*=b);return this},multiply:function(b){return this.multiplyQuaternions(this,b)},multiplyScalar:function(b){this.x*=b;this.y*=b;this.z*=b;this.w*=b;return this},multiplyQuaternions:function(b,c){var d=b.x,h=b.y,e=b.z;b=b.w;var t=c.x,g=c.y,q=c.z;c=c.w;this.x=d*c+b*t+h*q-e*g;this.y=h*c+b*g+e*t-d*q;this.z=e*c+b*q+d*g-h*t;this.w=b*c-d*t-h*g-e*q;return this},sub:function(b){this.x-=b.x;this.y-=b.y;this.z-=b.z;this.w-=b.w;return this},clone:function(){return new $3Dmol.Quaternion(this.x,\nthis.y,this.z,this.w)},setFromEuler:function(b){var c=Math.cos(b.x/2),d=Math.cos(b.y/2),h=Math.cos(b.z/2),e=Math.sin(b.x/2),t=Math.sin(b.y/2);b=Math.sin(b.z/2);this.x=e*d*h+c*t*b;this.y=c*t*h-e*d*b;this.z=c*d*b+e*t*h;this.w=c*d*h-e*t*b;return this}};$3Dmol.Vector2=function(b,c){this.x=b||0;this.y=c||0};\n$3Dmol.Vector2.prototype={constructor:$3Dmol.Vector2,set:function(b,c){this.x=b;this.y=c;return this},subVectors:function(b,c){this.x=b.x-c.x;this.y=b.y-c.y;return this},copy:function(b){this.x=b.x;this.y=b.y;return this},clone:function(){return new $3Dmol.Vector2(this.x,this.y)}};$3Dmol.Vector3=function(b,c,d){this.x=b||0;this.y=c||0;this.z=d||0};\n$3Dmol.Vector3.prototype={constructor:$3Dmol.Vector3,set:function(b,c,d){this.x=b;this.y=c;this.z=d;return this},copy:function(b){this.x=b.x;this.y=b.y;this.z=b.z;return this},add:function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z;return this},addVectors:function(b,c){this.x=b.x+c.x;this.y=b.y+c.y;this.z=b.z+c.z;return this},sub:function(b){this.x-=b.x;this.y-=b.y;this.z-=b.z;return this},subVectors:function(b,c){this.x=b.x-c.x;this.y=b.y-c.y;this.z=b.z-c.z;return this},multiplyScalar:function(b){this.x*=\nb;this.y*=b;this.z*=b;return this},divideScalar:function(b){0!==b?(this.x/=b,this.y/=b,this.z/=b):this.z=this.y=this.x=0;return this},max:function(b){this.x=Math.max(this.x,b.x);this.y=Math.max(this.y,b.y);this.z=Math.max(this.z,b.z);return this},min:function(b){this.x=Math.min(this.x,b.x);this.y=Math.min(this.y,b.y);this.z=Math.min(this.z,b.z);return this},distanceTo:function(b){return Math.sqrt(this.distanceToSquared(b))},distanceToSquared:function(b){var c=this.x-b.x,d=this.y-b.y;b=this.z-b.z;\nreturn c*c+d*d+b*b},applyMatrix4:function(b){var c=this.x,d=this.y,h=this.z;b=b.elements;this.x=b[0]*c+b[4]*d+b[8]*h+b[12];this.y=b[1]*c+b[5]*d+b[9]*h+b[13];this.z=b[2]*c+b[6]*d+b[10]*h+b[14];return this},applyProjection:function(b){var c=this.x,d=this.y,h=this.z;b=b.elements;var e=b[3]*c+b[7]*d+b[11]*h+b[15];this.x=(b[0]*c+b[4]*d+b[8]*h+b[12])/e;this.y=(b[1]*c+b[5]*d+b[9]*h+b[13])/e;this.z=(b[2]*c+b[6]*d+b[10]*h+b[14])/e;return this},applyQuaternion:function(b){var c=this.x,d=this.y,h=this.z,e=b.x,\nt=b.y,g=b.z;var q=2*(d*g-h*t);var p=2*(h*e-c*g);var u=2*(c*t-d*e);this.x=c+b.w*q+(p*g-u*t);this.y=d+b.w*p+(u*e-q*g);this.z=h+b.w*u+(q*t-p*e);return this},negate:function(){return this.multiplyScalar(-1)},dot:function(b){return this.x*b.x+this.y*b.y+this.z*b.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},normalize:function(){return this.divideScalar(this.length())},cross:function(b){var c=this.x,\nd=this.y,h=this.z;this.x=d*b.z-h*b.y;this.y=h*b.x-c*b.z;this.z=c*b.y-d*b.x;return this},crossVectors:function(b,c){this.x=b.y*c.z-b.z*c.y;this.y=b.z*c.x-b.x*c.z;this.z=b.x*c.y-b.y*c.x;return this},getPositionFromMatrix:function(b){this.x=b.elements[12];this.y=b.elements[13];this.z=b.elements[14];return this},setEulerFromRotationMatrix:function(b,c){var d=b.elements;b=d[0];var h=d[4],e=d[8],t=d[5],g=d[9],q=d[6];d=d[10];void 0===c||\"XYZ\"===c?(this.y=Math.asin($3Dmol.Math.clamp(e,-1,1)),.99999>Math.abs(e)?\n(this.x=Math.atan2(-g,d),this.z=Math.atan2(-h,b)):(this.x=Math.atan2(q,t),this.z=0)):console.error(\"Error with vector's setEulerFromRotationMatrix: Unknown order: \"+c);return this},rotateAboutVector:function(b,c){b.normalize();var d=Math.cos(c),h=Math.sin(c);c=this.clone().multiplyScalar(d);h=b.clone().cross(this).multiplyScalar(h);b=b.clone().multiplyScalar(b.clone().dot(this)).multiplyScalar(1-d);b=c.add(h).add(b);this.x=b.x;this.y=b.y;this.z=b.z;return this},setFromMatrixPosition:function(b){b=\nb.elements;this.x=b[12];this.y=b[13];this.z=b[14];return this},transformDirection:function(b){var c=this.x,d=this.y,h=this.z;b=b.elements;this.x=b[0]*c+b[4]*d+b[8]*h;this.y=b[1]*c+b[5]*d+b[9]*h;this.z=b[2]*c+b[6]*d+b[10]*h;return this.normalize()},clone:function(){return new $3Dmol.Vector3(this.x,this.y,this.z)}};$3Dmol.Matrix3=function(b,c,d,h,e,t,g,q,p){this.elements=new Float32Array(9);this.set(void 0!==b?b:1,c||0,d||0,h||0,void 0!==e?e:1,t||0,g||0,q||0,void 0!==p?p:1)};\n$3Dmol.Matrix3.prototype={constructor:$3Dmol.Matrix3,set:function(b,c,d,h,e,t,g,q,p){var u=this.elements;u[0]=b;u[3]=c;u[6]=d;u[1]=h;u[4]=e;u[7]=t;u[2]=g;u[5]=q;u[8]=p;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},copy:function(b){b=b.elements;this.set(b[0],b[3],b[6],b[1],b[4],b[7],b[2],b[5],b[8])},multiplyScalar:function(b){var c=this.elements;c[0]*=b;c[3]*=b;c[6]*=b;c[1]*=b;c[4]*=b;c[7]*=b;c[2]*=b;c[5]*=b;c[8]*=b;return this},getInverse:function(b,c){b=b.elements;var d=\nthis.elements;d[0]=b[10]*b[5]-b[6]*b[9];d[1]=-b[10]*b[1]+b[2]*b[9];d[2]=b[6]*b[1]-b[2]*b[5];d[3]=-b[10]*b[4]+b[6]*b[8];d[4]=b[10]*b[0]-b[2]*b[8];d[5]=-b[6]*b[0]+b[2]*b[4];d[6]=b[9]*b[4]-b[5]*b[8];d[7]=-b[9]*b[0]+b[1]*b[8];d[8]=b[5]*b[0]-b[1]*b[4];b=b[0]*d[0]+b[1]*d[3]+b[2]*d[6];if(0===b){if(c)throw Error(\"Matrix3.getInverse(): can't invert matrix, determinant is 0\");console.warn(\"Matrix3.getInverse(): can't invert matrix, determinant is 0\");this.identity();return this}this.multiplyScalar(1/b);return this},\ngetDeterminant:function(){var b=this.elements;return b[0]*b[4]*b[8]+b[1]*b[5]*b[6]+b[2]*b[3]*b[7]-b[2]*b[4]*b[6]-b[1]*b[3]*b[8]-b[0]*b[5]*b[7]},transpose:function(){var b=this.elements;var c=b[1];b[1]=b[3];b[3]=c;c=b[2];b[2]=b[6];b[6]=c;c=b[5];b[5]=b[7];b[7]=c;return this},clone:function(){var b=this.elements;return new $3Dmol.Matrix3(b[0],b[3],b[6],b[1],b[4],b[7],b[2],b[5],b[8])}};\n$3Dmol.Matrix4=function(b,c,d,h,e,t,g,q,p,u,m,l,n,y,f,x){if(\"undefined\"===typeof c&&\"undefined\"!==typeof b)this.elements=new Float32Array(b);else{var w=this.elements=new Float32Array(16);w[0]=void 0!==b?b:1;w[4]=c||0;w[8]=d||0;w[12]=h||0;w[1]=e||0;w[5]=void 0!==t?t:1;w[9]=g||0;w[13]=q||0;w[2]=p||0;w[6]=u||0;w[10]=void 0!==m?m:1;w[14]=l||0;w[3]=n||0;w[7]=y||0;w[11]=f||0;w[15]=void 0!==x?x:1}};\n$3Dmol.Matrix4.prototype={constructor:$3Dmol.Matrix4,set:function(b,c,d,h,e,t,g,q,p,u,m,l,n,y,f,x){var w=this.elements;w[0]=b;w[4]=c;w[8]=d;w[12]=h;w[1]=e;w[5]=t;w[9]=g;w[13]=q;w[2]=p;w[6]=u;w[10]=m;w[14]=l;w[3]=n;w[7]=y;w[11]=f;w[15]=x;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},copy:function(b){b=b.elements;this.set(b[0],b[4],b[8],b[12],b[1],b[5],b[9],b[13],b[2],b[6],b[10],b[14],b[3],b[7],b[11],b[15]);return this},matrix3FromTopLeft:function(){var b=this.elements;\nreturn new $3Dmol.Matrix3(b[0],b[4],b[8],b[1],b[5],b[9],b[2],b[6],b[10])},setRotationFromEuler:function(b,c){var d=this.elements,h=b.x,e=b.y,t=b.z;b=Math.cos(h);h=Math.sin(h);var g=Math.cos(e);e=Math.sin(e);var q=Math.cos(t);t=Math.sin(t);if(void 0===c||\"XYZ\"===c){c=b*q;var p=b*t,u=h*q,m=h*t;d[0]=g*q;d[4]=-g*t;d[8]=e;d[1]=p+u*e;d[5]=c-m*e;d[9]=-h*g;d[2]=m-c*e;d[6]=u+p*e;d[10]=b*g}else console.error(\"Error with matrix4 setRotationFromEuler. Order: \"+c);return this},setRotationFromQuaternion:function(b){var c=\nthis.elements,d=b.x,h=b.y,e=b.z,t=b.w,g=d+d,q=h+h,p=e+e;b=d*g;var u=d*q;d*=p;var m=h*q;h*=p;e*=p;g*=t;q*=t;t*=p;c[0]=1-(m+e);c[4]=u-t;c[8]=d+q;c[1]=u+t;c[5]=1-(b+e);c[9]=h-g;c[2]=d-q;c[6]=h+g;c[10]=1-(b+m);return this},lookAt:function(){var b=new $3Dmol.Vector3,c=new $3Dmol.Vector3,d=new $3Dmol.Vector3;return function(h,e,t){var g=this.elements;d.subVectors(h,e).normalize();0===d.length()&&(d.z=1);b.crossVectors(t,d).normalize();0===b.length()&&(d.x+=1E-4,b.crossVectors(t,d).normalize());c.crossVectors(d,\nb);g[0]=b.x;g[4]=c.x;g[8]=d.x;g[1]=b.y;g[5]=c.y;g[9]=d.y;g[2]=b.z;g[6]=c.z;g[10]=d.z;return this}}(),multiplyMatrices:function(b,c){var d=b.elements,h=c.elements;c=this.elements;b=d[0];var e=d[4],t=d[8],g=d[12],q=d[1],p=d[5],u=d[9],m=d[13],l=d[2],n=d[6],y=d[10],f=d[14],x=d[3],w=d[7],R=d[11];d=d[15];var P=h[0],A=h[4],T=h[8],G=h[12],C=h[1],z=h[5],D=h[9],I=h[13],K=h[2],H=h[6],N=h[10],E=h[14],L=h[3],M=h[7],F=h[11];h=h[15];c[0]=b*P+e*C+t*K+g*L;c[4]=b*A+e*z+t*H+g*M;c[8]=b*T+e*D+t*N+g*F;c[12]=b*G+e*I+t*\nE+g*h;c[1]=q*P+p*C+u*K+m*L;c[5]=q*A+p*z+u*H+m*M;c[9]=q*T+p*D+u*N+m*F;c[13]=q*G+p*I+u*E+m*h;c[2]=l*P+n*C+y*K+f*L;c[6]=l*A+n*z+y*H+f*M;c[10]=l*T+n*D+y*N+f*F;c[14]=l*G+n*I+y*E+f*h;c[3]=x*P+w*C+R*K+d*L;c[7]=x*A+w*z+R*H+d*M;c[11]=x*T+w*D+R*N+d*F;c[15]=x*G+w*I+R*E+d*h;return this},multiplyScalar:function(b){var c=this.elements;c[0]*=b;c[4]*=b;c[8]*=b;c[12]*=b;c[1]*=b;c[5]*=b;c[9]*=b;c[13]*=b;c[2]*=b;c[6]*=b;c[10]*=b;c[14]*=b;c[3]*=b;c[7]*=b;c[11]*=b;c[15]*=b;return this},makeTranslation:function(b,c,d){this.set(1,\n0,0,b,0,1,0,c,0,0,1,d,0,0,0,1);return this},transpose:function(){var b=this.elements;var c=b[1];b[1]=b[4];b[4]=c;c=b[2];b[2]=b[8];b[8]=c;c=b[6];b[6]=b[9];b[9]=c;c=b[3];b[3]=b[12];b[12]=c;c=b[7];b[7]=b[13];b[13]=c;c=b[11];b[11]=b[14];b[14]=c;return this},getPosition:function(){var b=new $3Dmol.Vector3;return function(){console.warn(\"DEPRECATED: Matrix4's .getPosition() has been removed. Use Vector3.getPositionFromMatrix( matrix ) instead.\");var c=this.elements;return b.set(c[12],c[13],c[14])}}(),setPosition:function(b){var c=\nthis.elements;c[12]=b.x;c[13]=b.y;c[14]=b.z;return this},getInverse:function(b,c){var d=this.elements;b=b.elements;var h=b[0],e=b[4],t=b[8],g=b[12],q=b[1],p=b[5],u=b[9],m=b[13],l=b[2],n=b[6],y=b[10],f=b[14],x=b[3],w=b[7],R=b[11],P=b[15];d[0]=u*f*w-m*y*w+m*n*R-p*f*R-u*n*P+p*y*P;d[4]=g*y*w-t*f*w-g*n*R+e*f*R+t*n*P-e*y*P;d[8]=t*m*w-g*u*w+g*p*R-e*m*R-t*p*P+e*u*P;d[12]=g*u*n-t*m*n-g*p*y+e*m*y+t*p*f-e*u*f;d[1]=m*y*x-u*f*x-m*l*R+q*f*R+u*l*P-q*y*P;d[5]=t*f*x-g*y*x+g*l*R-h*f*R-t*l*P+h*y*P;d[9]=g*u*x-t*m*x-\ng*q*R+h*m*R+t*q*P-h*u*P;d[13]=t*m*l-g*u*l+g*q*y-h*m*y-t*q*f+h*u*f;d[2]=p*f*x-m*n*x+m*l*w-q*f*w-p*l*P+q*n*P;d[6]=g*n*x-e*f*x-g*l*w+h*f*w+e*l*P-h*n*P;d[10]=e*m*x-g*p*x+g*q*w-h*m*w-e*q*P+h*p*P;d[14]=g*p*l-e*m*l-g*q*n+h*m*n+e*q*f-h*p*f;d[3]=u*n*x-p*y*x-u*l*w+q*y*w+p*l*R-q*n*R;d[7]=e*y*x-t*n*x+t*l*w-h*y*w-e*l*R+h*n*R;d[11]=t*p*x-e*u*x-t*q*w+h*u*w+e*q*R-h*p*R;d[15]=e*u*l-t*p*l+t*q*n-h*u*n-e*q*y+h*p*y;d=b[0]*d[0]+b[1]*d[4]+b[2]*d[8]+b[3]*d[12];if(0===d){if(c)throw Error(\"Matrix4.getInverse(): can't invert matrix, determinant is 0\");\nconsole.warn(\"Matrix4.getInverse(): can't invert matrix, determinant is 0\");this.identity();return this}this.multiplyScalar(1/d);return this},isReflected:function(){return 0>this.matrix3FromTopLeft().getDeterminant()},compose:function(){var b=new $3Dmol.Matrix4,c=new $3Dmol.Matrix4;return function(d,h,e){var t=this.elements;b.identity();b.setRotationFromQuaternion(h);c.makeScale(e.x,e.y,e.z);this.multiplyMatrices(b,c);t[12]=d.x;t[13]=d.y;t[14]=d.z;return this}}(),decompose:function(){var b=new $3Dmol.Vector3,\nc=new $3Dmol.Vector3,d=new $3Dmol.Vector3,h=new $3Dmol.Matrix4;return function(e,t,g){var q=this.elements;b.set(q[0],q[1],q[2]);c.set(q[4],q[5],q[6]);d.set(q[8],q[9],q[10]);e=e instanceof $3Dmol.Vector3?e:new $3Dmol.Vector3;t=t instanceof $3Dmol.Quaternion?t:new $3Dmol.Quaternion;g=g instanceof $3Dmol.Vector3?g:new $3Dmol.Vector3;g.x=b.length();g.y=c.length();g.z=d.length();e.x=q[12];e.y=q[13];e.z=q[14];h.copy(this);h.elements[0]/=g.x;h.elements[1]/=g.x;h.elements[2]/=g.x;h.elements[4]/=g.y;h.elements[5]/=\ng.y;h.elements[6]/=g.y;h.elements[8]/=g.z;h.elements[9]/=g.z;h.elements[10]/=g.z;t.setFromRotationMatrix(h);return[e,t,g]}}(),scale:function(b){var c=this.elements,d=b.x,h=b.y;b=b.z;c[0]*=d;c[4]*=h;c[8]*=b;c[1]*=d;c[5]*=h;c[9]*=b;c[2]*=d;c[6]*=h;c[10]*=b;c[3]*=d;c[7]*=h;c[11]*=b;return this},getMaxScaleOnAxis:function(){var b=this.elements;return Math.sqrt(Math.max(b[0]*b[0]+b[1]*b[1]+b[2]*b[2],Math.max(b[4]*b[4]+b[5]*b[5]+b[6]*b[6],b[8]*b[8]+b[9]*b[9]+b[10]*b[10])))},makeFrustum:function(b,c,d,h,\ne,t){var g=this.elements;g[0]=2*e/(c-b);g[4]=0;g[8]=(c+b)/(c-b);g[12]=0;g[1]=0;g[5]=2*e/(h-d);g[9]=(h+d)/(h-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(t+e)/(t-e);g[14]=-2*t*e/(t-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makePerspective:function(b,c,d,h){b=d*Math.tan($3Dmol.Math.degToRad(.5*b));var e=-b;return this.makeFrustum(e*c,b*c,e,b,d,h)},makeOrthographic:function(b,c,d,h,e,t){var g=this.elements,q=1/(c-b),p=1/(d-h),u=1/(t-e);g[0]=2*q;g[4]=0;g[8]=0;g[12]=-((c+b)*q);g[1]=0;g[5]=2*p;g[9]=0;g[13]=-((d+\nh)*p);g[2]=0;g[6]=0;g[10]=-2*u;g[14]=-((t+e)*u);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},isEqual:function(b){b=b.elements;var c=this.elements;return c[0]==b[0]&&c[4]==b[4]&&c[8]==b[8]&&c[12]==b[12]&&c[1]==b[1]&&c[5]==b[5]&&c[9]==b[9]&&c[13]==b[13]&&c[2]==b[2]&&c[6]==b[6]&&c[10]==b[10]&&c[14]==b[14]&&c[3]==b[3]&&c[7]==b[7]&&c[11]==b[11]&&c[15]==b[15]?!0:!1},clone:function(){var b=this.elements;return new $3Dmol.Matrix4(b[0],b[4],b[8],b[12],b[1],b[5],b[9],b[13],b[2],b[6],b[10],b[14],b[3],b[7],b[11],\nb[15])},isIdentity:function(){var b=this.elements;return 1==b[0]&&0==b[4]&&0==b[8]&&0==b[12]&&0==b[1]&&1==b[5]&&0==b[9]&&0==b[13]&&0==b[2]&&0==b[6]&&1==b[10]&&0==b[14]&&0==b[3]&&0==b[7]&&0==b[11]&&1==b[15]?!0:!1}};$3Dmol.Vector3.prototype.unproject=function(){var b=new $3Dmol.Matrix4;return function(c){b.multiplyMatrices(c.matrixWorld,b.getInverse(c.projectionMatrix));return this.applyMatrix4(b)}}();$3Dmol.Ray=function(b,c){this.origin=void 0!==b?b:new $3Dmol.Vector3;this.direction=void 0!==c?c:new $3Dmol.Vector3};\n$3Dmol.Ray.prototype={constructor:$3Dmol.Ray,set:function(b,c){this.origin.copy(b);this.direction.copy(c);return this},copy:function(b){this.origin.copy(b.origin);this.direction.copy(b.direction);return this},at:function(b,c){return(c||new $3Dmol.Vector3).copy(this.direction).multiplyScalar(b).add(this.origin)},recast:function(){var b=new $3Dmol.Vector3;return function(c){this.origin.copy(this.at(c,b));return this}}(),closestPointToPoint:function(b,c){c=c||new $3Dmol.Vector3;c.subVectors(b,this.origin);\nb=c.dot(this.direction);return c.copy(this.direction).multiplyScalar(b).add(this.origin)},distanceToPoint:function(b){var c=new $3Dmol.Vector3;return function(b){var d=c.subVectors(b,this.origin).dot(this.direction);c.copy(this.direction).multiplyScalar(d).add(this.origin);return c.distanceTo(b)}}(),isIntersectionCylinder:function(){},isIntersectionSphere:function(b){return this.distanceToPoint(b.center)<=b.radius},isIntersectionPlane:function(b){return 0!==b.normal.dot(this.direction)||0===b.distanceToPoint(this.origin)?\n!0:!1},distanceToPlane:function(b){var c=b.normal.dot(this.direction);if(0===c){if(0===b.distanceToPoint(this.origin))return 0}else return-(this.origin.dot(b.normal)+b.constant)/c},intersectPlane:function(b,c){b=this.distanceToPlane(b);if(void 0!==b)return this.at(b,c)},applyMatrix4:function(b){this.direction.add(this.origin).applyMatrix4(b);this.origin.applyMatrix4(b);this.direction.sub(this.origin);return this},equals:function(b){return b.origin.equals(this.origin)&&b.direction.equals(this.direction)},\nclone:function(){return(new $3Dmol.Ray).copy(this)}};$3Dmol.Sphere=function(b,c){this.center=void 0!==b?b:new $3Dmol.Vector3;this.radius=void 0!==c?c:0};\n$3Dmol.Sphere.prototype={constructor:$3Dmol.Sphere,set:function(b,c){this.center.copy(b);this.radius=c;return this},copy:function(b){this.center.copy(b.center);this.radius=b.radius;return this},applyMatrix4:function(b){this.center.applyMatrix4(b);this.radius*=b.getMaxScaleOnAxis();return this},translate:function(b){this.center.add(b);return this},equals:function(b){return b.center.equals(this.center)&&b.radius===this.radius},clone:function(){return(new $3Dmol.Sphere).copy(this)}};\n$3Dmol.Cylinder=function(b,c,d){this.c1=void 0!==b?b:new $3Dmol.Vector3;this.c2=void 0!==c?c:new $3Dmol.Vector3;this.direction=(new $3Dmol.Vector3).subVectors(this.c2,this.c1).normalize();this.radius=void 0!==d?d:0};\n$3Dmol.Cylinder.prototype={constructor:$3Dmol.Cylinder,copy:function(b){this.c1.copy(b.c1);this.c2.copy(b.c2);this.direction.copy(b.direction);this.radius=b.radius;return this},lengthSq:function(){var b=new $3Dmol.Vector3;return function(){return b.subVectors(this.c2,this.c1).lengthSq()}}(),applyMatrix4:function(b){this.direction.add(this.c1).applyMatrix4(b);this.c1.applyMatrix4(b);this.c2.applyMatrix4(b);this.direction.sub(this.c1).normalize();this.radius*=b.getMaxScaleOnAxis();return this}};\n$3Dmol.Triangle=function(b,c,d){this.a=void 0!==b?b:new $3Dmol.Vector3;this.b=void 0!==c?c:new $3Dmol.Vector3;this.c=void 0!==d?d:new $3Dmol.Vector3};\n$3Dmol.Triangle.prototype={constructor:$3Dmol.Triangle,copy:function(b){this.a.copy(b.a);this.b.copy(b.b);this.c.copy(b.c);return this},applyMatrix4:function(b){this.a.applyMatrix4(b);this.b.applyMatrix4(b);this.c.applyMatrix4(b);return this},getNormal:function(){var b=new $3Dmol.Vector3;return function(){var c=this.a.clone();c.sub(this.b);b.subVectors(this.c,this.b);c.cross(b);c.normalize();return c}}()};\n$3Dmol.EventDispatcher=function(){var b={};this.addEventListener=function(c,d){void 0===b[c]&&(b[c]=[]);-1===b[c].indexOf(d)&&b[c].push(d)};this.removeEventListener=function(c,d){d=b[c].indexOf(d);-1!==d&&b[c].splice(d,1)};this.dispatchEvent=function(c){var d=b[c.type];if(void 0!==d){c.target=this;for(var h=0,e=d.length;h<e;h++)d[h].call(this,c)}}};$3Dmol.Color=function(b){return 1<arguments.length?(this.r=arguments[0]||0,this.g=arguments[1]||0,this.b=arguments[2]||0,this):this.set(b)};\n$3Dmol.Color.prototype={constructor:$3Dmol.Color,r:0,g:0,b:0,set:function(b){if(b instanceof $3Dmol.Color)return b.clone();\"number\"===typeof b?this.setHex(b):\"object\"===typeof b&&\"r\"in b&&\"g\"in b&&\"b\"in b&&(this.r=b.r,this.g=b.g,this.b=b.b)},setHex:function(b){b=Math.floor(b);this.r=(b>>16&255)/255;this.g=(b>>8&255)/255;this.b=(b&255)/255;return this},getHex:function(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)},clone:function(){return new $3Dmol.Color(this.r,\nthis.g,this.b)},copy:function(b){this.r=b.r;this.g=b.g;this.b=b.b;return this},scaled:function(){var b={};b.r=Math.round(255*this.r);b.g=Math.round(255*this.g);b.b=Math.round(255*this.b);b.a=1;return b}};\n$3Dmol.Object3D=function(){this.id=$3Dmol.Object3DIDCount++;this.name=\"\";this.parent=void 0;this.children=[];this.position=new $3Dmol.Vector3;this.rotation=new $3Dmol.Vector3;this.matrix=new $3Dmol.Matrix4;this.matrixWorld=new $3Dmol.Matrix4;this.quaternion=new $3Dmol.Quaternion;this.eulerOrder=\"XYZ\";this.up=new $3Dmol.Vector3(0,1,0);this.scale=new $3Dmol.Vector3(1,1,1);this.rotationAutoUpdate=this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.useQuaternion=!1;this.visible=!0};\n$3Dmol.Object3D.prototype={constructor:$3Dmol.Object3D,lookAt:function(b){this.matrix.lookAt(b,this.position,this.up);this.rotationAutoUpdate&&(!0===this.useQuaternion?this.quaternion.copy(this.matrix.decompose()[1]):this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))},add:function(b){if(b===this)console.error(\"Can't add $3Dmol.Object3D to itself\");else{b.parent=this;this.children.push(b);for(var c=this;void 0!==c.parent;)c=c.parent;void 0!==c&&c instanceof $3Dmol.Scene&&c.__addObject(b)}},\nremove:function(b){var c=this.children.indexOf(b);if(-1!==c){b.parent=void 0;this.children.splice(c,1);for(c=this;void 0!==c.parent;)c=c.parent;void 0!==c&&c instanceof $3Dmol.Scene&&c.__removeObject(b)}},updateMatrix:function(){this.matrix.setPosition(this.position);!1===this.useQuaternion?this.matrix.setRotationFromEuler(this.rotation,this.eulerOrder):this.matrix.setRotationFromQuaternion(this.quaternion);1===this.scale.x&&1===this.scale.y&&1===this.scale.z||this.matrix.scale(this.scale);this.matrixWorldNeedsUpdate=\n!0},updateMatrixWorld:function(b){!0===this.matrixAutoUpdate&&this.updateMatrix();if(!0===this.matrixWorldNeedsUpdate||!0===b)void 0===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix);this.matrixWorldNeedsUpdate=!1;for(b=0;b<this.children.length;b++)this.children[b].updateMatrixWorld(!0)},clone:function(b){void 0===b&&(b=new $3Dmol.Object3D);b.name=this.name;b.up.copy(this.up);b.position.copy(this.position);b.rotation.copy(this.rotation);\nb.eulerOrder=this.eulerOrder;b.scale.copy(this.scale);b.rotationAutoUpdate=this.rotationAutoUpdate;b.matrix.copy(this.matrix);b.matrixWorld.copy(this.matrixWorld);b.quaternion.copy(this.quaternion);b.matrixAutoUpdate=this.matrixAutoUpdate;b.matrixWorldNeedsUpdate=this.matrixWorldNeedsUpdate;b.useQuaternion=this.useQuaternion;b.visible=this.visible;for(var c=0;c<this.children.length;c++)b.add(this.children[c].clone());return b},setVisible:function(b){this.visible=b;for(var c=0;c<this.children.length;c++)this.children[c].setVisible(b)}};\n$3Dmol.Object3DIDCount=0;\n$3Dmol.Geometry=function(){var b=function(b){this.id=b||0;this.lineArray=this.radiusArray=this.faceArray=this.normalArray=this.colorArray=this.vertexArray=null;this.lineidx=this.faceidx=this.vertices=0};b.prototype.setColors=function(b){var c=this.vertexArray,d=this.colorArray;if(c.length!=d.length)console.log(\"Cannot re-color geometry group due to mismatched lengths.\");else for(var g=0;g<c.length;g+=3){var h=b(c[g],c[g+1],c[g+2]);h instanceof $3Dmol.Color||(h=$3Dmol.CC.color(h));d[g]=h.r;d[g+1]=\nh.g;d[g+2]=h.b}};b.prototype.getNumVertices=function(){return this.vertices};b.prototype.getVertices=function(){return this.vertexArray};b.prototype.getCentroid=function(){for(var b=new $3Dmol.Vector3,c,d,g,q=0;q<this.vertices;++q)c=3*q,d=this.vertexArray[c],g=this.vertexArray[c+1],c=this.vertexArray[c+2],b.x+=d,b.y+=g,b.z+=c;b.divideScalar(this.vertices);return b};b.prototype.setNormals=function(){var b=this.faceArray,c=this.vertexArray,d=this.normalArray;if(this.vertices&&this.faceidx)for(var g,\nq,p,u,m,l,n=0;n<b.length/3;++n)g=3*b[3*n],q=3*b[3*n+1],p=3*b[3*n+2],u=new $3Dmol.Vector3(c[g],c[g+1],c[g+2]),m=new $3Dmol.Vector3(c[q],c[q+1],c[q+2]),l=new $3Dmol.Vector3(c[p],c[p+1],c[p+2]),u.subVectors(u,m),l.subVectors(l,m),l.cross(u),u=l,u.normalize(),d[g]+=u.x,d[q]+=u.x,d[p]+=u.x,d[g+1]+=u.y,d[q+1]+=u.y,d[p+1]+=u.y,d[g+2]+=u.z,d[q+2]+=u.z,d[p+2]+=u.z};b.prototype.setLineIndices=function(){if(this.faceidx&&(!this.lineArray||this.lineArray.length!=2*this.faceidx||this.lineidx!=2*this.faceidx)){var b=\nthis.faceArray,c=this.lineArray=new Uint16Array(2*this.faceidx);this.lineidx=2*this.faceidx;for(var d=0;d<this.faceidx/3;++d){var g=3*d,q=2*g,p=b[g],u=b[g+1];g=b[g+2];c[q]=p;c[q+1]=u;c[q+2]=p;c[q+3]=g;c[q+4]=u;c[q+5]=g}}};b.prototype.truncateArrayBuffers=function(b,c){b=!0===b?!0:!1;var d=this.colorArray,g=this.normalArray,e=this.faceArray,h=this.lineArray,u=this.radiusArray;this.vertexArray=this.vertexArray.subarray(0,3*this.vertices);this.colorArray=d.subarray(0,3*this.vertices);b?(this.normalArray=\ng.subarray(0,3*this.vertices),this.faceArray=e.subarray(0,this.faceidx),this.lineArray=0<this.lineidx?h.subarray(0,this.lineidx):new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0));u&&(this.radiusArray=u.subarray(0,this.vertices));c&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),\nthis.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray)));this.__inittedArrays=!0};var c=function(c){var d=new b(c.geometryGroups.length);c.geometryGroups.push(d);c.groups=c.geometryGroups.length;d.vertexArray=new Float32Array(196605);d.colorArray=new Float32Array(196605);c.mesh&&(d.normalArray=new Float32Array(196605),d.faceArray=new Uint16Array(393210),\nd.lineArray=new Uint16Array(393210));c.radii&&(d.radiusArray=new Float32Array(65535));d.useOffset=c.offset;return d},d=function(b,c,d){$3Dmol.EventDispatcher.call(this);this.id=$3Dmol.GeometryIDCount++;this.name=\"\";this.hasTangents=!1;this.dynamic=!0;this.mesh=!0===b?!0:!1;this.radii=c||!1;this.offset=d||!1;this.buffersNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.elementsNeedUpdate=this.verticesNeedUpdate=!1;this.geometryGroups=[];this.groups=0};d.prototype={constructor:d,updateGeoGroup:function(b){var d=\n0<this.groups?this.geometryGroups[this.groups-1]:null;if(!d||d.vertices+(b||0)>d.vertexArray.length/3)d=c(this);return d},addGeoGroup:function(){return c(this)},setUpNormals:function(b){b=b||!1;for(var c=0;c<this.groups;c++)this.geometryGroups[c].setNormals(b)},setColors:function(b){for(var c=this.geometryGroups.length,d=0;d<c;d++)this.geometryGroups[d].setColors(b)},setUpWireframe:function(){for(var b=0;b<this.groups;b++)this.geometryGroups[b].setLineIndices()},initTypedArrays:function(){for(var b=\n0;b<this.groups;b++){var c=this.geometryGroups[b];!0!==c.__inittedArrays&&c.truncateArrayBuffers(this.mesh,!1)}},dispose:function(){this.dispatchEvent({type:\"dispose\"})}};return d}();Object.defineProperty($3Dmol.Geometry.prototype,\"vertices\",{get:function(){for(var b=0,c=0;c<this.groups;c++)b+=this.geometryGroups[c].vertices;return b}});$3Dmol.GeometryIDCount=0;\n$3Dmol.Raycaster=function(){var b=function(b,c,n,d){this.ray=new $3Dmol.Ray(b,c);0<this.ray.direction.lengthSq()&&this.ray.direction.normalize();this.near=d||0;this.far=n||Infinity},c=new $3Dmol.Sphere,d=new $3Dmol.Cylinder,h=new $3Dmol.Triangle,e=new $3Dmol.Vector3,t=new $3Dmol.Vector3,g=new $3Dmol.Vector3,q=new $3Dmol.Vector3;new $3Dmol.Ray;new $3Dmol.Vector3;var p=new $3Dmol.Vector3;new $3Dmol.Matrix4;var u=function(b,c){return b.distance-c.distance};b.prototype.precision=1E-4;b.prototype.linePrecision=\n.2;b.prototype.set=function(b,c){this.ray.set(b,c)};b.prototype.setFromCamera=function(){var b=new $3Dmol.Matrix4;return function(c,n){n.ortho?(this.ray.origin.set(c.x,c.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld)):(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(c.x,c.y,c.z),n.projectionMatrixInverse.getInverse(n.projectionMatrix),b.multiplyMatrices(n.matrixWorld,n.projectionMatrixInverse),this.ray.direction.applyProjection(b),\nthis.ray.direction.sub(this.ray.origin).normalize())}}();b.prototype.intersectObjects=function(b,l){for(var n=[],m=0,f=l.length;m<f;m++)a:{var x=b,w=l[m],R=n;p.getPositionFromMatrix(x.matrixWorld);if(void 0!==w.intersectionShape){var P=w.intersectionShape;var A=this.linePrecision;A*=x.matrixWorld.getMaxScaleOnAxis();var T=A*A;if(void 0!==w.boundingSphere&&w.boundingSphere instanceof $3Dmol.Sphere&&(c.copy(w.boundingSphere),c.applyMatrix4(x.matrixWorld),!this.ray.isIntersectionSphere(c)))break a;var G=\n0;for(A=P.triangle.length;G<A;G++)if(P.triangle[G]instanceof $3Dmol.Triangle){h.copy(P.triangle[G]);h.applyMatrix4(x.matrixWorld);var C=h.getNormal();var z=this.ray.direction.dot(C);if(!(0<=z)){e.subVectors(h.a,this.ray.origin);var D=C.dot(e)/z;if(!(0>D)){t.copy(this.ray.direction).multiplyScalar(D).add(this.ray.origin);t.sub(h.a);g.copy(h.b).sub(h.a);q.copy(h.c).sub(h.a);z=g.dot(q);var I=g.lengthSq();C=q.lengthSq();C=(I*t.dot(q)-z*t.dot(g))/(I*C-z*z);0>C||1<C||(z=(t.dot(g)-C*z)/I,0>z||1<z||1<z+C||\nR.push({clickable:w,distance:D}))}}}G=0;for(A=P.cylinder.length;G<A;G++)if(P.cylinder[G]instanceof $3Dmol.Cylinder){d.copy(P.cylinder[G]);d.applyMatrix4(x.matrixWorld);e.subVectors(d.c1,this.ray.origin);var K=e.dot(d.direction);I=e.dot(this.ray.direction);z=Math.min(Math.max(this.ray.direction.dot(d.direction),-1),1);C=1-z*z;if(0!==C){var H=(z*I-K)/C;var N=(I-z*K)/C;t.copy(d.direction).multiplyScalar(H).add(d.c1);g.copy(this.ray.direction).multiplyScalar(N).add(this.ray.origin);var E=q.subVectors(t,\ng).lengthSq();H=d.radius*d.radius;E<=H&&(H=(z*K-I)*(z*K-I)-C*(e.lengthSq()-K*K-H),C=0>=H?D=Math.sqrt(E):D=(I-z*K-Math.sqrt(H))/C,z=z*C-K,0>z||z*z>d.lengthSq()||0>C||R.push({clickable:w,distance:D}))}}G=0;for(A=P.line.length;G<A;G+=2)t.copy(P.line[G]),t.applyMatrix4(x.matrixWorld),g.copy(P.line[G+1]),g.applyMatrix4(x.matrixWorld),q.subVectors(g,t),K=q.lengthSq(),q.normalize(),e.subVectors(t,this.ray.origin),E=e.dot(q),I=e.dot(this.ray.direction),z=Math.min(Math.max(this.ray.direction.dot(q),-1),1),\nC=1-z*z,0!==C&&(H=(z*I-E)/C,N=(I-z*E)/C,t.add(q.multiplyScalar(H)),g.copy(this.ray.direction).multiplyScalar(N).add(this.ray.origin),E=q.subVectors(g,t).lengthSq(),E<T&&H*H<K&&R.push({clickable:w,distance:N}));G=0;for(A=P.sphere.length;G<A;G++)if(P.sphere[G]instanceof $3Dmol.Sphere&&(c.copy(P.sphere[G]),c.applyMatrix4(x.matrixWorld),this.ray.isIntersectionSphere(c))){t.subVectors(c.center,this.ray.origin);x=t.dot(this.ray.direction);H=x*x-(t.lengthSq()-c.radius*c.radius);if(0>x)break a;D=0>=H?x:x-\nMath.sqrt(H);R.push({clickable:w,distance:D});break a}}}n.sort(u);return n};return b}();$3Dmol.Projector=function(){new $3Dmol.Matrix4;var b=new $3Dmol.Matrix4;this.projectVector=function(c,d){d.matrixWorldInverse.getInverse(d.matrixWorld);b.multiplyMatrices(d.projectionMatrix,d.matrixWorldInverse);return c.applyProjection(b)};this.unprojectVector=function(c,d){d.projectionMatrixInverse.getInverse(d.projectionMatrix);b.multiplyMatrices(d.matrixWorld,d.projectionMatrixInverse);return c.applyProjection(b)}};\n$3Dmol.Camera=function(b,c,d,h,e){$3Dmol.Object3D.call(this);this.fov=void 0!==b?b:50;this.aspect=void 0!==c?c:1;this.near=void 0!==d?d:.1;this.far=void 0!==h?h:2E3;this.projectionMatrix=new $3Dmol.Matrix4;this.projectionMatrixInverse=new $3Dmol.Matrix4;this.matrixWorldInverse=new $3Dmol.Matrix4;this.right=this.position.z*Math.tan(Math.PI/180*b);this.left=-this.right;this.top=this.right/this.aspect;this.bottom=-this.top;this.ortho=!!e;this.updateProjectionMatrix()};$3Dmol.Camera.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Camera.prototype.lookAt=function(b){this.matrix.lookAt(this.position,b,this.up);this.rotationAutoUpdate&&(!1===this.useQuaternion?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):this.quaternion.copy(this.matrix.decompose()[1]))};\n$3Dmol.Camera.prototype.updateProjectionMatrix=function(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)};\n$3Dmol.SpritePlugin=function(){function b(b,c){return b.z!==c.z?c.z-b.z:c.id-b.id}var c,d,h,e,t,g,q,p,u,m;this.init=function(b){c=b.context;d=b;h=b.getPrecision();e=new Float32Array(16);t=new Uint16Array(6);b=0;e[b++]=-1;e[b++]=-1;e[b++]=0;e[b++]=0;e[b++]=1;e[b++]=-1;e[b++]=1;e[b++]=0;e[b++]=1;e[b++]=1;e[b++]=1;e[b++]=1;e[b++]=-1;e[b++]=1;e[b++]=0;e[b++]=1;b=0;t[b++]=0;t[b++]=1;t[b++]=2;t[b++]=0;t[b++]=2;t[b++]=3;g=c.createBuffer();q=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,g);c.bufferData(c.ARRAY_BUFFER,\ne,c.STATIC_DRAW);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,q);c.bufferData(c.ELEMENT_ARRAY_BUFFER,t,c.STATIC_DRAW);b=$3Dmol.ShaderLib.sprite;var n=h,l=c.createProgram(),f=c.createShader(c.FRAGMENT_SHADER),x=c.createShader(c.VERTEX_SHADER);n=\"precision \"+n+\" float;\\n\";c.shaderSource(f,n+b.fragmentShader);c.shaderSource(x,n+b.vertexShader);c.compileShader(f);c.compileShader(x);c.getShaderParameter(f,c.COMPILE_STATUS)&&c.getShaderParameter(x,c.COMPILE_STATUS)?(c.attachShader(l,f),c.attachShader(l,x),c.linkProgram(l),\nc.getProgramParameter(l,c.LINK_STATUS)||console.error(\"Could not initialize shader\"),b=l):(console.error(c.getShaderInfoLog(f)),console.error(\"could not initialize shader\"),b=null);p=b;u={};m={};u.position=c.getAttribLocation(p,\"position\");u.uv=c.getAttribLocation(p,\"uv\");m.uvOffset=c.getUniformLocation(p,\"uvOffset\");m.uvScale=c.getUniformLocation(p,\"uvScale\");m.rotation=c.getUniformLocation(p,\"rotation\");m.scale=c.getUniformLocation(p,\"scale\");m.alignment=c.getUniformLocation(p,\"alignment\");m.color=\nc.getUniformLocation(p,\"color\");m.map=c.getUniformLocation(p,\"map\");m.opacity=c.getUniformLocation(p,\"opacity\");m.useScreenCoordinates=c.getUniformLocation(p,\"useScreenCoordinates\");m.screenPosition=c.getUniformLocation(p,\"screenPosition\");m.modelViewMatrix=c.getUniformLocation(p,\"modelViewMatrix\");m.projectionMatrix=c.getUniformLocation(p,\"projectionMatrix\");m.fogType=c.getUniformLocation(p,\"fogType\");m.fogDensity=c.getUniformLocation(p,\"fogDensity\");m.fogNear=c.getUniformLocation(p,\"fogNear\");m.fogFar=\nc.getUniformLocation(p,\"fogFar\");m.fogColor=c.getUniformLocation(p,\"fogColor\");m.alphaTest=c.getUniformLocation(p,\"alphaTest\")};this.render=function(l,n,y,f){var x=l.__webglSprites,w=x.length;if(w){var e=u,h=m,A=.5*y,T=.5*f;c.useProgram(p);c.enableVertexAttribArray(e.position);c.enableVertexAttribArray(e.uv);c.disable(c.CULL_FACE);c.enable(c.BLEND);c.bindBuffer(c.ARRAY_BUFFER,g);c.vertexAttribPointer(e.position,2,c.FLOAT,!1,16,0);c.vertexAttribPointer(e.uv,2,c.FLOAT,!1,16,8);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,\nq);c.uniformMatrix4fv(h.projectionMatrix,!1,n.projectionMatrix.elements);c.activeTexture(c.TEXTURE0);c.uniform1i(h.map,0);if(e=l.fog){c.uniform3f(h.fogColor,e.color.r,e.color.g,e.color.b);c.uniform1f(h.fogNear,e.near);c.uniform1f(h.fogFar,e.far);c.uniform1i(h.fogType,1);var G=e=1}else c.uniform1i(h.fogType,0),G=e=0;var t,z=[];for(t=0;t<w;t++){var D=x[t];var I=D.material;D.visible&&0!==I.opacity&&(I.useScreenCoordinates?D.z=-D.position.z:(D._modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,D.matrixWorld),\nD.z=-D._modelViewMatrix.elements[14]))}x.sort(b);for(t=0;t<w;t++)D=x[t],I=D.material,D.visible&&0!==I.opacity&&I.map&&I.map.image&&I.map.image.width&&(c.uniform1f(h.alphaTest,I.alphaTest),n=I.map.image.height,z[0]=I.map.image.width*d.devicePixelRatio/y,z[1]=n*d.devicePixelRatio/f,!0===I.useScreenCoordinates?(c.uniform1i(h.useScreenCoordinates,1),c.uniform3f(h.screenPosition,(D.position.x*d.devicePixelRatio-A)/A,(T-D.position.y*d.devicePixelRatio)/T,Math.max(0,Math.min(1,D.position.z)))):(c.uniform1i(h.useScreenCoordinates,\n0),c.uniformMatrix4fv(h.modelViewMatrix,!1,D._modelViewMatrix.elements)),n=l.fog&&I.fog?G:0,e!==n&&(c.uniform1i(h.fogType,n),e=n),n=1/(I.scaleByViewport?f:1),z[0]=z[0]*n*D.scale.x,z[1]=z[1]*n*D.scale.y,c.uniform2f(h.uvScale,I.uvScale.x,I.uvScale.y),c.uniform2f(h.uvOffset,I.uvOffset.x,I.uvOffset.y),c.uniform2f(h.alignment,I.alignment.x,I.alignment.y),c.uniform1f(h.opacity,I.opacity),c.uniform3f(h.color,I.color.r,I.color.g,I.color.b),c.uniform1f(h.rotation,D.rotation),c.uniform2fv(h.scale,z),d.setDepthTest(I.depthTest),\nd.setDepthWrite(I.depthWrite),d.setTexture(I.map,0),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0));c.enable(c.CULL_FACE)}}};$3Dmol.Light=function(b,c){$3Dmol.Object3D.call(this);this.color=new $3Dmol.Color(b);this.position=new $3Dmol.Vector3(0,1,0);this.target=new $3Dmol.Object3D;this.intensity=void 0!==c?c:1;this.onlyShadow=this.castShadow=!1};$3Dmol.Light.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Material=function(){$3Dmol.EventDispatcher.call(this);this.id=$3Dmol.MaterialIdCount++;this.name=\"\";this.side=$3Dmol.FrontSide;this.opacity=1;this.transparent=!1;this.stencilTest=this.depthWrite=this.depthTest=!0;this.polygonOffset=!1;this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.needsUpdate=this.visible=!0};\n$3Dmol.Material.prototype.setValues=function(b){if(void 0!==b)for(var c in b){var d=b[c];if(void 0===d)console.warn(\"$3Dmol.Material: '\"+c+\"' parameter is undefined.\");else if(c in this){var h=this[c];h instanceof $3Dmol.Color&&d instanceof $3Dmol.Color?h.copy(d):h instanceof $3Dmol.Color?h.set(d):h instanceof $3Dmol.Vector3&&d instanceof $3Dmol.Vector3?h.copy(d):this[c]=d}}};\n$3Dmol.Material.prototype.clone=function(b){void 0===b&&(b=new $3Dmol.Material);b.name=this.name;b.side=this.side;b.opacity=this.opacity;b.transparent=this.transparent;b.depthTest=this.depthTest;b.depthWrite=this.depthWrite;b.stencilTest=this.stencilTest;b.polygonOffset=this.polygonOffset;b.polygonOffsetFactor=this.polygonOffsetFactor;b.polygonOffsetUnits=this.polygonOffsetUnits;b.alphaTest=this.alphaTest;b.overdraw=this.overdraw;b.visible=this.visible;return b};\n$3Dmol.Material.prototype.dispose=function(){this.dispatchEvent({type:\"dispose\"})};$3Dmol.MaterialIdCount=0;$3Dmol.LineBasicMaterial=function(b){$3Dmol.Material.call(this);this.color=new $3Dmol.Color(16777215);this.linewidth=1;this.linejoin=this.linecap=\"round\";this.vertexColors=!1;this.fog=!0;this.shaderID=\"basic\";this.setValues(b)};$3Dmol.LineBasicMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.LineBasicMaterial.prototype.clone=function(){var b=new $3Dmol.LineBasicMaterial;$3Dmol.Material.prototype.clone.call(this,b);b.color.copy(this.color);return b};\n$3Dmol.MeshLambertMaterial=function(b){$3Dmol.Material.call(this);this.color=new $3Dmol.Color(16777215);this.ambient=new $3Dmol.Color(1048575);this.emissive=new $3Dmol.Color(0);this.wrapAround=!1;this.wrapRGB=new $3Dmol.Vector3(1,1,1);this.envMap=this.specularMap=this.lightMap=this.map=null;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.shading=$3Dmol.SmoothShading;this.shaderID=\"lambert\";\nthis.vertexColors=$3Dmol.NoColors;this.skinning=!1;this.setValues(b)};$3Dmol.MeshLambertMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.MeshLambertMaterial.prototype.clone=function(b){\"undefined\"===typeof b&&(b=new $3Dmol.MeshLambertMaterial);$3Dmol.Material.prototype.clone.call(this,b);b.color.copy(this.color);b.ambient.copy(this.ambient);b.emissive.copy(this.emissive);b.wrapAround=this.wrapAround;b.wrapRGB.copy(this.wrapRGB);b.map=this.map;b.lightMap=this.lightMap;b.specularMap=this.specularMap;b.envMap=this.envMap;b.combine=this.combine;b.reflectivity=this.reflectivity;b.refractionRatio=this.refractionRatio;b.fog=this.fog;\nb.shading=this.shading;b.shaderID=this.shaderID;b.vertexColors=this.vertexColors;b.skinning=this.skinning;b.morphTargets=this.morphTargets;b.morphNormals=this.morphNormals;return b};$3Dmol.MeshDoubleLambertMaterial=function(b){$3Dmol.MeshLambertMaterial.call(this,b);this.shaderID=\"lambertdouble\";this.side=$3Dmol.DoubleSide};$3Dmol.MeshDoubleLambertMaterial.prototype=Object.create($3Dmol.MeshLambertMaterial.prototype);\n$3Dmol.MeshDoubleLambertMaterial.prototype.clone=function(){var b=new $3Dmol.MeshDoubleLambertMaterial;$3Dmol.MeshLambertMaterial.prototype.clone.call(this,b);return b};$3Dmol.MeshOutlineMaterial=function(b){$3Dmol.Material.call(this);b=b||{};this.fog=!0;this.shaderID=\"outline\";this.wireframe=!1;this.outlineColor=b.color||new $3Dmol.Color(0,0,0);this.outlineWidth=b.width||.1;this.outlinePushback=b.pushback||1};$3Dmol.MeshOutlineMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.MeshOutlineMaterial.prototype.clone=function(b){\"undefined\"===typeof b&&(b=new $3Dmol.MeshOutlineMaterial);$3Dmol.Material.prototype.clone.call(this,b);b.fog=this.fog;b.shaderID=this.shaderID;b.wireframe=this.wireframe;return b};\n$3Dmol.ImposterMaterial=function(b){$3Dmol.Material.call(this);this.color=new $3Dmol.Color(16777215);this.ambient=new $3Dmol.Color(1048575);this.emissive=new $3Dmol.Color(0);this.imposter=!0;this.wrapAround=!1;this.wrapRGB=new $3Dmol.Vector3(1,1,1);this.envMap=this.specularMap=this.lightMap=this.map=null;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.shading=$3Dmol.SmoothShading;this.shaderID=\nnull;this.vertexColors=$3Dmol.NoColors;this.skinning=!1;this.setValues(b)};$3Dmol.ImposterMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.ImposterMaterial.prototype.clone=function(){var b=new $3Dmol.ImposterMaterial;$3Dmol.Material.prototype.clone.call(this,b);b.color.copy(this.color);b.ambient.copy(this.ambient);b.emissive.copy(this.emissive);b.wrapAround=this.wrapAround;b.wrapRGB.copy(this.wrapRGB);b.map=this.map;b.lightMap=this.lightMap;b.specularMap=this.specularMap;b.envMap=this.envMap;b.combine=this.combine;b.reflectivity=this.reflectivity;b.refractionRatio=this.refractionRatio;b.fog=this.fog;b.shading=this.shading;b.shaderID=\nthis.shaderID;b.vertexColors=this.vertexColors;b.skinning=this.skinning;b.morphTargets=this.morphTargets;b.morphNormals=this.morphNormals;return b};$3Dmol.SphereImposterMaterial=function(b){$3Dmol.ImposterMaterial.call(this);this.shaderID=\"sphereimposter\";this.setValues(b)};$3Dmol.SphereImposterMaterial.prototype=Object.create($3Dmol.ImposterMaterial.prototype);\n$3Dmol.SphereImposterMaterial.prototype.clone=function(){var b=new $3Dmol.SphereImposterMaterial;$3Dmol.ImposterMaterial.prototype.clone.call(this,b);return b};$3Dmol.SphereImposterOutlineMaterial=function(b){$3Dmol.ImposterMaterial.call(this);b=b||{};this.shaderID=\"sphereimposteroutline\";this.outlineColor=b.color||new $3Dmol.Color(0,0,0);this.outlineWidth=b.width||.1;this.outlinePushback=b.pushback||1;this.setValues(b)};$3Dmol.SphereImposterOutlineMaterial.prototype=Object.create($3Dmol.ImposterMaterial.prototype);\n$3Dmol.SphereImposterOutlineMaterial.prototype.clone=function(){var b=new $3Dmol.SphereImposterOutlineMaterial;$3Dmol.ImposterMaterial.prototype.clone.call(this,b);b.outlineColor=this.outlineColor;b.outlineWidth=this.outlineWidth;b.outlinePushback=this.outlinePushback;return b};$3Dmol.StickImposterMaterial=function(b){$3Dmol.ImposterMaterial.call(this);this.shaderID=\"stickimposter\";this.setValues(b)};$3Dmol.StickImposterMaterial.prototype=Object.create($3Dmol.ImposterMaterial.prototype);\n$3Dmol.StickImposterMaterial.prototype.clone=function(){var b=new $3Dmol.StickImposterMaterial;$3Dmol.ImposterMaterial.prototype.clone.call(this,b);return b};$3Dmol.StickImposterOutlineMaterial=function(b){$3Dmol.ImposterMaterial.call(this);b=b||{};this.shaderID=\"stickimposteroutline\";this.outlineColor=b.color||new $3Dmol.Color(0,0,0);this.outlineWidth=b.width||.1;this.outlinePushback=b.pushback||1;this.setValues(b)};$3Dmol.StickImposterOutlineMaterial.prototype=Object.create($3Dmol.ImposterMaterial.prototype);\n$3Dmol.StickImposterOutlineMaterial.prototype.clone=function(){var b=new $3Dmol.StickImposterOutlineMaterial;$3Dmol.ImposterMaterial.prototype.clone.call(this,b);b.outlineColor=this.outlineColor;b.outlineWidth=this.outlineWidth;b.outlinePushback=this.outlinePushback;return b};\n$3Dmol.InstancedMaterial=function(b){$3Dmol.Material.call(this);this.color=new $3Dmol.Color(16777215);this.ambient=new $3Dmol.Color(1048575);this.emissive=new $3Dmol.Color(0);this.wrapAround=!1;this.wrapRGB=new $3Dmol.Vector3(1,1,1);this.envMap=this.specularMap=this.lightMap=this.map=null;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap=\"round\";this.shading=$3Dmol.SmoothShading;this.shaderID=\"instanced\";\nthis.vertexColors=$3Dmol.NoColors;this.skinning=!1;this.sphere=null;this.setValues(b)};$3Dmol.InstancedMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.InstancedMaterial.prototype.clone=function(){var b=new $3Dmol.InstancedMaterial;$3Dmol.Material.prototype.clone.call(this,b);b.color.copy(this.color);b.ambient.copy(this.ambient);b.emissive.copy(this.emissive);b.wrapAround=this.wrapAround;b.wrapRGB.copy(this.wrapRGB);b.map=this.map;b.lightMap=this.lightMap;b.specularMap=this.specularMap;b.envMap=this.envMap;b.combine=this.combine;b.reflectivity=this.reflectivity;b.refractionRatio=this.refractionRatio;b.fog=this.fog;b.shading=this.shading;b.shaderID=\nthis.shaderID;b.vertexColors=this.vertexColors;b.skinning=this.skinning;b.morphTargets=this.morphTargets;b.morphNormals=this.morphNormals;b.sphere=this.sphere;return b};\n$3Dmol.SpriteMaterial=function(b){$3Dmol.Material.call(this);this.color=new $3Dmol.Color(16777215);this.map=new $3Dmol.Texture;this.useScreenCoordinates=!0;this.depthTest=!this.useScreenCoordinates;this.sizeAttenuation=!this.useScreenCoordinates;this.scaleByViewPort=!this.sizeAttenuation;this.alignment=$3Dmol.SpriteAlignment.center.clone();this.fog=!1;this.uvOffset=new $3Dmol.Vector2(0,0);this.uvScale=new $3Dmol.Vector2(1,1);this.setValues(b);b=b||{};void 0===b.depthTest&&(this.depthTest=!this.useScreenCoordinates);\nvoid 0===b.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates);void 0===b.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)};$3Dmol.SpriteMaterial.prototype=Object.create($3Dmol.Material.prototype);\n$3Dmol.SpriteMaterial.prototype.clone=function(){var b=new $3Dmol.SpriteMaterial;$3Dmol.Material.prototype.clone.call(this,b);b.color.copy(this.color);b.map=this.map;b.useScreenCoordinates=useScreenCoordinates;b.sizeAttenuation=this.sizeAttenuation;b.scaleByViewport=this.scaleByViewPort;b.alignment.copy(this.alignment);b.uvOffset.copy(this.uvOffset);return b};$3Dmol.SpriteAlignment={};$3Dmol.SpriteAlignment.topLeft=new $3Dmol.Vector2(1,-1);$3Dmol.SpriteAlignment.topCenter=new $3Dmol.Vector2(0,-1);\n$3Dmol.SpriteAlignment.topRight=new $3Dmol.Vector2(-1,-1);$3Dmol.SpriteAlignment.centerLeft=new $3Dmol.Vector2(1,0);$3Dmol.SpriteAlignment.center=new $3Dmol.Vector2(0,0);$3Dmol.SpriteAlignment.centerRight=new $3Dmol.Vector2(-1,0);$3Dmol.SpriteAlignment.bottomLeft=new $3Dmol.Vector2(1,1);$3Dmol.SpriteAlignment.bottomCenter=new $3Dmol.Vector2(0,1);$3Dmol.SpriteAlignment.bottomRight=new $3Dmol.Vector2(-1,1);\n$3Dmol.Texture=function(b){$3Dmol.EventDispatcher.call(this);this.id=$3Dmol.TextureIdCount++;this.name=\"\";this.image=b;this.mipmaps=[];this.mapping=new $3Dmol.UVMapping;this.wrapT=this.wrapS=$3Dmol.ClampToEdgeWrapping;this.magFilter=$3Dmol.LinearFilter;this.minFilter=$3Dmol.LinearMipMapLinearFilter;this.anisotropy=1;this.format=$3Dmol.RGBAFormat;this.type=$3Dmol.UnsignedByteType;this.offset=new $3Dmol.Vector2(0,0);this.repeat=new $3Dmol.Vector2(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;\nthis.flipY=!0;this.unpackAlignment=4;this.needsUpdate=!1;this.onUpdate=null};\n$3Dmol.Texture.prototype={constructor:$3Dmol.Texture,clone:function(b){void 0===b&&(b=new $3Dmol.Texture);b.image=this.image;b.mipmaps=this.mipmaps.slice(0);b.mapping=this.mapping;b.wrapS=this.wrapS;b.wrapT=this.wrapT;b.magFilter=this.magFilter;b.minFilter=this.minFilter;b.anisotropy=this.anisotropy;b.format=this.format;b.type=this.type;b.offset.copy(this.offset);b.repeat.copy(this.repeat);b.generateMipmaps=this.generateMipmaps;b.premultiplyAlpha=this.premultiplyAlpha;b.flipY=this.flipY;b.unpackAlignment=\nthis.unpackAlignment;return b},dispose:function(){this.dispatchEvent({type:\"dispose\"})}};$3Dmol.TextureIdCount=0;$3Dmol.FrontSide=0;$3Dmol.BackSide=1;$3Dmol.DoubleSide=2;$3Dmol.NoShading=0;$3Dmol.FlatShading=1;$3Dmol.SmoothShading=2;$3Dmol.NoColors=0;$3Dmol.FaceColors=1;$3Dmol.VertexColors=2;$3Dmol.MultiplyOperation=0;$3Dmol.MixOperation=1;$3Dmol.AddOperation=2;$3Dmol.UVMapping=function(){};$3Dmol.ClampToEdgeWrapping=1001;$3Dmol.LinearFilter=1006;$3Dmol.LinearMipMapLinearFilter=1008;\n$3Dmol.UnsignedByteType=1009;$3Dmol.RGBAFormat=1021;$3Dmol.Line=function(b,c,d){$3Dmol.Object3D.call(this);this.geometry=b;this.material=void 0!==c?c:new $3Dmol.LineBasicMaterial({color:16777215*Math.random()});this.type=void 0!==d?d:$3Dmol.LineStrip};$3Dmol.LineStrip=0;$3Dmol.LinePieces=1;$3Dmol.Line.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Line.prototype.clone=function(b){void 0===b&&(b=new $3Dmol.Line(this.geometry,this.material,this.type));$3Dmol.Object3D.prototype.clone.call(this,b);return b};$3Dmol.Mesh=function(b,c){$3Dmol.Object3D.call(this);this.geometry=b;this.material=void 0!==c?c:new $3Dmol.MeshBasicMaterial({color:16777215*Math.random(),wireframe:!0})};$3Dmol.Mesh.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Mesh.prototype.clone=function(b){void 0===b&&(b=new $3Dmol.Mesh(this.geometry,this.material));$3Dmol.Object3D.prototype.clone.call(this,b);return b};$3Dmol.Sprite=function(b){$3Dmol.Object3D.call(this);this.material=void 0!==b?b:new $3Dmol.SpriteMaterial;this.rotation3d=this.rotation;this.rotation=0};$3Dmol.Sprite.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Sprite.prototype.updateMatrix=function(){this.matrix.setPosition(this.position);this.rotation3d.set(0,0,this.rotation);this.matrix.setRotationFromEuler(this.rotation3d);1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale);this.matrixWorldNeedsUpdate=!0};$3Dmol.Sprite.prototype.clone=function(b){void 0===b&&(b=new $3Dmol.Sprite(this.material));$3Dmol.Object3D.prototype.clone.call(this,b);return b};\n$3Dmol.Renderer=function(b){function c(b){V[b]||(B.enableVertexAttribArray(b),V[b]=!0)}function d(b,c){var n;\"fragment\"===b?n=B.createShader(B.FRAGMENT_SHADER):\"vertex\"===b&&(n=B.createShader(B.VERTEX_SHADER));B.shaderSource(n,c);B.compileShader(n);return B.getShaderParameter(n,B.COMPILE_STATUS)?n:(console.error(B.getShaderInfoLog(n)),console.error(\"could not initialize shader\"),null)}function h(b,c,n,l,d,f,g,m){if(c){var h=b.length-1;m=c=-1}else h=0,c=b.length,m=1;for(var e=h;e!==c;e+=m){var y=b[e];\nif(y.render){h=y.object;var J=y.buffer;if(y=y[n]){g&&A.setBlending(!0);A.setDepthTest(y.depthTest);A.setDepthWrite(y.depthWrite);var p=y.polygonOffset;null!==p&&(p?B.enable(B.POLYGON_OFFSET_FILL):B.disable(B.POLYGON_OFFSET_FILL));p=h._modelViewMatrix.isReflected();A.setMaterialFaces(y,p);A.renderBuffer(l,d,f,y,J,h);if(P||y.outline)\"sphereimposter\"==y.shaderID?A.renderBuffer(l,d,f,w,J,h):\"stickimposter\"==y.shaderID?A.renderBuffer(l,d,f,R,J,h):y.wireframe||\"basic\"===y.shaderID||0===y.opacity||A.renderBuffer(l,\nd,f,x,J,h)}}}}function e(b){return 0===(b&b-1)}function t(b){return b===$3Dmol.UnsignedByteType?B.UNSIGNED_BYTE:b===$3Dmol.RGBAFormat?B.RGBA:0}b=b||{};this.row=b.row;this.col=b.col;this.rows=b.rows;this.cols=b.cols;var g=void 0!==b.canvas?b.canvas:document.createElement(\"canvas\"),q=void 0!==b.precision?b.precision:\"highp\",p=void 0!==b.alpha?b.alpha:!0,u=void 0!==b.premultipliedAlpha?b.premultipliedAlpha:!0,m=void 0!==b.antialias?b.antialias:!1,l=void 0!==b.stencil?b.stencil:!0,n=void 0!==b.preserveDrawingBuffer?\nb.preserveDrawingBuffer:!1,y=void 0!==b.clearColor?new $3Dmol.Color(b.clearColor):new $3Dmol.Color(0),f=void 0!==b.clearAlpha?b.clearAlpha:0,x=new $3Dmol.MeshOutlineMaterial(b.outline),w=new $3Dmol.SphereImposterOutlineMaterial(b.outline),R=new $3Dmol.StickImposterOutlineMaterial(b.outline),P=!!b.outline;this.domElement=g;this.context=null;this.devicePixelRatio=void 0!==b.devicePixelRatio?b.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;g.id=b.id;this.autoUpdateScene=this.autoUpdateObjects=\nthis.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var A=this,T=[],G=0,C=null,z=-1,D=null,I=null,K=0,H=-1,N=-1,E=-1,L=-1,M=null,F=0,J=0,Q=0,W=0,V={},U=new $3Dmol.Matrix4,ca=new $3Dmol.Vector3,S=new $3Dmol.Vector3,O=!0,Z=[],aa=[],B;try{if(!(B=g.getContext(\"experimental-webgl\",{alpha:p,premultipliedAlpha:u,antialias:m,stencil:l,\npreserveDrawingBuffer:n}))&&!(B=g.getContext(\"webgl\",{alpha:p,premultipliedAlpha:u,antialias:m,stencil:l,preserveDrawingBuffer:n})))throw\"Error creating WebGL context.\";}catch(ja){console.error(ja)}B.clearColor(0,0,0,1);B.clearDepth(1);B.clearStencil(0);B.enable(B.DEPTH_TEST);B.depthFunc(B.LEQUAL);B.frontFace(B.CCW);B.cullFace(B.BACK);B.enable(B.CULL_FACE);B.enable(B.BLEND);B.blendEquation(B.FUNC_ADD);B.blendFunc(B.SRC_ALPHA,B.ONE_MINUS_SRC_ALPHA);B.clearColor(y.r,y.g,y.b,f);this.context=B;var Y=\nB.getExtension(\"ANGLE_instanced_arrays\"),X=B.getExtension(\"EXT_frag_depth\");this.supportedExtensions=function(){return{supportsAIA:!!Y,supportsImposters:!!X}};this.getContext=function(){return B};this.getPrecision=function(){return q};this.setClearColorHex=function(b,c){y.setHex(b);f=c;B.clearColor(y.r,y.g,y.b,f)};this.enableOutline=function(b){x=new $3Dmol.MeshOutlineMaterial(b);w=new $3Dmol.SphereImposterOutlineMaterial(b);R=new $3Dmol.StickImposterOutlineMaterial(b);P=!0};this.disableOutline=function(){P=\n!1};this.setViewport=function(){if(void 0!=this.rows&&void 0!=this.cols&&void 0!=this.row&&void 0!=this.col){var b=g.width/this.cols,c=g.height/this.rows;F=b*this.devicePixelRatio;J=c*this.devicePixelRatio;B.drawingBufferWidth=3*F;B.drawingBufferHeight=J;B.enable(B.SCISSOR_TEST);B.scissor(b*this.col,c*this.row,b,c);B.viewport(b*this.col,c*this.row,b,c)}};this.setSize=function(b,c){if(void 0!=this.rows&&void 0!=this.cols&&void 0!=this.row&&void 0!=this.col){var n=b/this.cols,l=c/this.rows;g.width=\nb*this.devicePixelRatio;g.height=c*this.devicePixelRatio;F=n*this.devicePixelRatio;J=l*this.devicePixelRatio;g.style.width=b+\"px\";g.style.height=c+\"px\";this.setViewport()}else F=g.width=b*this.devicePixelRatio,J=g.height=c*this.devicePixelRatio,g.style.width=b+\"px\",g.style.height=c+\"px\",B.viewport(0,0,B.drawingBufferWidth,B.drawingBufferHeight)};this.clear=function(b,c,n){var l=0;if(void 0===b||b)l|=B.COLOR_BUFFER_BIT;if(void 0===c||c)l|=B.DEPTH_BUFFER_BIT;if(void 0===n||n)l|=B.STENCIL_BUFFER_BIT;\nB.clear(l)};this.clearTarget=function(b,c,n){this.clear(b,c,n)};this.setMaterialFaces=function(b,c){var n=b.side===$3Dmol.DoubleSide;b=b.side===$3Dmol.BackSide;b=c?!b:b;H!==n&&(n?B.disable(B.CULL_FACE):B.enable(B.CULL_FACE),H=n);N!==b&&(b?B.frontFace(B.CW):B.frontFace(B.CCW),N=b)};this.setDepthTest=function(b){E!==b&&(b?B.enable(B.DEPTH_TEST):B.disable(B.DEPTH_TEST),E=b)};this.setDepthWrite=function(b){L!==b&&(B.depthMask(b),L=b)};this.setBlending=function(b){b?(B.enable(B.BLEND),B.blendEquationSeparate(B.FUNC_ADD,\nB.FUNC_ADD),B.blendFuncSeparate(B.SRC_ALPHA,B.ONE_MINUS_SRC_ALPHA,B.ONE,B.ONE_MINUS_SRC_ALPHA)):B.disable(B.BLEND)};this.addPostPlugin=function(b){b.init(this);this.renderPluginsPost.push(b)};var da=function(b){b=b.target;b.removeEventListener(\"dispose\",da);b.__webglInit=void 0;void 0!==b.__webglVertexBuffer&&B.deleteBuffer(b.__webglVertexBuffer);void 0!==b.__webglColorBuffer&&B.deleteBuffer(b.__webglColorBuffer);if(void 0!==b.geometryGroups)for(var c=0,n=b.groups;c<n;c++){var l=b.geometryGroups[c];\nvoid 0!==l.__webglVertexBuffer&&B.deleteBuffer(l.__webglVertexBuffer);void 0!==l.__webglColorBuffer&&B.deleteBuffer(l.__webglColorBuffer);void 0!==l.__webglNormalBuffer&&B.deleteBuffer(l.__webglNormalBuffer);void 0!==l.__webglFaceBuffer&&B.deleteBuffer(l.__webglFaceBuffer);void 0!==l.__webglLineBuffer&&B.deleteBuffer(l.__webglLineBuffer)}A.info.memory.geometries--},ma=function(b){b=b.target;b.removeEventListener(\"dispose\",ma);b.image&&b.image.__webglTextureCube?B.deleteTexture(b.image.__webglTextureCube):\nb.__webglInit&&(b.__webglInit=!1,B.deleteTexture(b.__webglTexture));A.info.memory.textures--},qa=function(b){b=b.target;b.removeEventListener(\"dispose\",qa);ha(b)},ha=function(b){var c=b.program;if(void 0!==c){b.program=void 0;var n,l=!1;b=0;for(n=T.length;b<n;b++){var d=T[b];if(d.program===c){d.usedTimes--;0===d.usedTimes&&(l=!0);break}}if(!0===l){l=[];b=0;for(n=T.length;b<n;b++)d=T[b],d.program!==c&&l.push(d);T=l;B.deleteProgram(c);A.info.memory.programs--}}};this.initMaterial=function(b,c,n,l){b.addEventListener(\"dispose\",\nqa);if(c=b.shaderID)c=$3Dmol.ShaderLib[c],b.vertexShader=c.vertexShader,b.fragmentShader=c.fragmentShader,b.uniforms=$3Dmol.ShaderUtils.clone(c.uniforms);a:{var f=b.fragmentShader;l=b.vertexShader;n=b.uniforms;var g={wireframe:b.wireframe,fragdepth:b.imposter},m;c=[];c.push(f);c.push(l);for(w in g)c.push(w),c.push(g[w]);c=c.join();var w=0;for(m=T.length;w<m;w++){var x=T[w];if(x.code===c){x.usedTimes++;var y=x.program;break a}}w=B.createProgram();x=\"precision \"+q+\" float;\";m=\"\"+x;g=[g.fragdepth?\"#extension GL_EXT_frag_depth: enable\":\n\"\",g.wireframe?\"#define WIREFRAME 1\":\"\",x].join(\"\\n\");f=d(\"fragment\",g+f);l=d(\"vertex\",m+l);B.attachShader(w,l);B.attachShader(w,f);B.linkProgram(w);B.getProgramParameter(w,B.LINK_STATUS)||console.error(\"Could not initialize shader\");w.uniforms={};w.attributes={};l=[\"viewMatrix\",\"modelViewMatrix\",\"projectionMatrix\",\"normalMatrix\"];for(y in n)l.push(y);for(y=0;y<l.length;y++)n=l[y],w.uniforms[n]=B.getUniformLocation(w,n);l=\"position normal color lineDistance offset radius\".split(\" \");for(y=0;y<l.length;y++)n=\nl[y],w.attributes[n]=B.getAttribLocation(w,n);w.id=G++;T.push({program:w,code:c,usedTimes:1});A.info.memory.programs=T.length;y=w}b.program=y};this.renderBuffer=function(b,n,l,d,f,g){if(d.visible){d.needsUpdate&&(d.program&&ha(d),A.initMaterial(d,n,l,g),d.needsUpdate=!1);var w=!1,m=d.program,x=m.uniforms;var y=d.uniforms;m!=C&&(B.useProgram(m),C=m,w=!0);d.id!=z&&(z=d.id,w=!0);b!=I&&(I=b,w=!0);B.uniformMatrix4fv(x.projectionMatrix,!1,b.projectionMatrix.elements);B.uniformMatrix4fv(x.modelViewMatrix,\n!1,g._modelViewMatrix.elements);B.uniformMatrix3fv(x.normalMatrix,!1,g._normalMatrix.elements);if(w){y.fogColor.value=l.color;y.fogNear.value=l.near;y.fogFar.value=l.far;if(d.shaderID.startsWith(\"lambert\")||\"instanced\"===d.shaderID||d.shaderID.endsWith(\"imposter\")){B.uniformMatrix4fv(x.viewMatrix,!1,b.matrixWorldInverse.elements);if(O){var h=0,e=0,J=0;b=0;for(l=n.length;b<l;b++){w=n[b];var p=w.color;var R=w.intensity;w instanceof $3Dmol.Light&&(h++,S.getPositionFromMatrix(w.matrixWorld),ca.getPositionFromMatrix(w.target.matrixWorld),\nS.sub(ca),S.normalize(),0!==S.x||0!==S.y||0!==S.z)&&(aa[J]=S.x,aa[J+1]=S.y,aa[J+2]=S.z,Z[J]=p.r*R,Z[J+1]=p.g*R,Z[J+2]=p.b*R,J+=3,e++)}O=!1}y.directionalLightColor.value=Z;y.directionalLightDirection.value=aa}else d.shaderID.endsWith(\"outline\")?(y.outlineColor.value=d.outlineColor,y.outlineWidth.value=d.outlineWidth,y.outlinePushback.value=d.outlinePushback):\"sphereimposter\"===d.shaderID&&(B.uniformMatrix4fv(x.viewMatrix,!1,b.matrixWorldInverse.elements),B.uniformMatrix3fv(x.normalMatrix,!1,g._normalMatrix.elements),\ny.directionalLightColor.value=Z,y.directionalLightDirection.value=aa);y.opacity.value=d.opacity;for(var T in y)x[T]&&(n=y[T].type,b=y[T].value,l=x[T],\"f\"===n?B.uniform1f(l,b):\"fv\"===n?B.uniform3fv(l,b):\"c\"===n?B.uniform3f(l,b.r,b.g,b.b):\"f4\"===n&&B.uniform4f(l,b[0],b[1],b[2],b[3]))}y=m.attributes;x=!1;m=16777215*f.id+2*m.id+(d.wireframe?1:0);m!==D&&(D=m,x=!0);if(x){for(var P in V)V[P]&&(B.disableVertexAttribArray(P),V[P]=!1);0<=y.position&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglVertexBuffer),c(y.position),\nB.vertexAttribPointer(y.position,3,B.FLOAT,!1,0,0));0<=y.color&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglColorBuffer),c(y.color),B.vertexAttribPointer(y.color,3,B.FLOAT,!1,0,0));0<=y.normal&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglNormalBuffer),c(y.normal),B.vertexAttribPointer(y.normal,3,B.FLOAT,!1,0,0));0<=y.offset&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglOffsetBuffer),c(y.offset),B.vertexAttribPointer(y.offset,3,B.FLOAT,!1,0,0));0<=y.radius&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglRadiusBuffer),c(y.radius),\nB.vertexAttribPointer(y.radius,1,B.FLOAT,!1,0,0))}if(g instanceof $3Dmol.Mesh){if(\"instanced\"===d.shaderID){var q=d.sphere.geometryGroups[0];x&&(B.bindBuffer(B.ARRAY_BUFFER,f.__webglVertexBuffer),B.bufferData(B.ARRAY_BUFFER,q.vertexArray,B.STATIC_DRAW),B.bindBuffer(B.ARRAY_BUFFER,f.__webglNormalBuffer),B.bufferData(B.ARRAY_BUFFER,q.normalArray,B.STATIC_DRAW),B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,f.__webglFaceBuffer),B.bufferData(B.ELEMENT_ARRAY_BUFFER,q.faceArray,B.STATIC_DRAW));q=q.faceidx;Y.vertexAttribDivisorANGLE(y.offset,\n1);Y.vertexAttribDivisorANGLE(y.radius,1);Y.vertexAttribDivisorANGLE(y.color,1);Y.drawElementsInstancedANGLE(B.TRIANGLES,q,B.UNSIGNED_SHORT,0,f.radiusArray.length);Y.vertexAttribDivisorANGLE(y.offset,0);Y.vertexAttribDivisorANGLE(y.radius,0);Y.vertexAttribDivisorANGLE(y.color,0)}else d.wireframe?(g=f.lineidx,d=d.wireframeLinewidth,d!==M&&(B.lineWidth(d),M=d),x&&B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,f.__webglLineBuffer),B.drawElements(B.LINES,g,B.UNSIGNED_SHORT,0)):(q=f.faceidx,x&&B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,\nf.__webglFaceBuffer),B.drawElements(B.TRIANGLES,q,B.UNSIGNED_SHORT,0));A.info.render.calls++;A.info.render.vertices+=q;A.info.render.faces+=q/3}else g instanceof $3Dmol.Line&&(g=f.vertices,f=d.linewidth,f!==M&&(B.lineWidth(f),M=f),B.drawArrays(B.LINES,0,g),A.info.render.calls++)}};this.render=function(b,c,n){if(!1===c instanceof $3Dmol.Camera)console.error(\"$3Dmol.Renderer.render: camera is not an instance of $3Dmol.Camera.\");else{var l,d=b.__lights,g=b.fog;z=-1;O=!0;this.autoUpdateScene&&b.updateMatrixWorld();\nvoid 0===c.parent&&c.updateMatrixWorld();c.matrixWorldInverse.getInverse(c.matrixWorld);U.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);this.autoUpdateObjects&&this.initWebGLObjects(b);A.info.render.calls=0;A.info.render.vertices=0;A.info.render.faces=0;A.info.render.points=0;Q=F;W=J;this.setViewport();if(this.autoClear||n)B.clearColor(y.r,y.g,y.b,f),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);var w=b.__webglObjects;n=0;for(l=w.length;n<l;n++){var m=w[n];\nvar x=m.object;m.render=!1;if(x.visible){x._modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,x.matrixWorld);x._normalMatrix.getInverse(x._modelViewMatrix);x._normalMatrix.transpose();x=m;var e=x.object.material;e.transparent?(x.opaque=null,x.transparent=e,e.wireframe||(e=e.clone(),e.opacity=0,x.blank=e)):(x.opaque=e,x.transparent=null);m.render=!0}}this.setBlending(!1);h(b.__webglObjects,!0,\"opaque\",c,d,g,!1,null);h(b.__webglObjects,!0,\"blank\",c,d,g,!0,null);h(b.__webglObjects,!1,\"transparent\",\nc,d,g,!0,null);d=this.renderPluginsPost;D=-1;I=C=null;N=z=H=E=L=-1;if(d.length)for(g=0,n=d.length;g<n;g++)O=!0,d[g].render(b,c,Q,W),D=-1,I=C=null,N=z=H=E=L=-1;this.setDepthTest(!0);this.setDepthWrite(!0)}};this.initWebGLObjects=function(b){b.__webglObjects||(b.__webglObjects=[],b.__webglObjectsImmediate=[],b.__webglSprites=[],b.__webglFlares=[]);if(b.__objectsAdded.length){for(;b.__objectsAdded.length;){var c,n=b.__objectsAdded[0],l=b;if(!n.__webglInit&&(n.__webglInit=!0,n._modelViewMatrix=new $3Dmol.Matrix4,\nn._normalMatrix=new $3Dmol.Matrix3,void 0!==n.geometry&&void 0===n.geometry.__webglInit&&(n.geometry.__webglInit=!0,n.geometry.addEventListener(\"dispose\",da)),n instanceof $3Dmol.Mesh||n instanceof $3Dmol.Line)){var d=n.geometry;var f=0;for(c=d.geometryGroups.length;f<c;f++){var g=d.geometryGroups[f];g.id=K++;g.__webglVertexBuffer||(n instanceof $3Dmol.Mesh?(g.radiusArray&&(g.__webglRadiusBuffer=B.createBuffer()),g.useOffset&&(g.__webglOffsetBuffer=B.createBuffer()),g.__webglVertexBuffer=B.createBuffer(),\ng.__webglNormalBuffer=B.createBuffer(),g.__webglColorBuffer=B.createBuffer(),g.__webglFaceBuffer=B.createBuffer(),g.__webglLineBuffer=B.createBuffer(),A.info.memory.geometries++,d.elementsNeedUpdate=!0,d.normalsNeedUpdate=!0):n instanceof $3Dmol.Line&&(g.__webglVertexBuffer=B.createBuffer(),g.__webglColorBuffer=B.createBuffer(),A.info.memory.geometries++),d.verticesNeedUpdate=!0,d.colorsNeedUpdate=!0)}}if(!n.__webglActive){if(n instanceof $3Dmol.Mesh||n instanceof $3Dmol.Line)for(d=n.geometry,f=0,\nc=d.geometryGroups.length;f<c;f++)g=d.geometryGroups[f],l.__webglObjects.push({buffer:g,object:n,opaque:null,transparent:null});else n instanceof $3Dmol.Sprite&&l.__webglSprites.push(n);n.__webglActive=!0}b.__objectsAdded.splice(0,1)}D=-1}for(;b.__objectsRemoved.length;){d=b.__objectsRemoved[0];c=b;if(d instanceof $3Dmol.Mesh||d instanceof $3Dmol.Line)for(c=c.__webglObjects,f=d,n=c.length-1;0<=n;--n)c[n].object===f&&c.splice(n,1);else if(d instanceof $3Dmol.Sprite)for(c=c.__webglSprites,f=d,n=c.length-\n1;0<=n;--n)c[n]===f&&c.splice(n,1);d.__webglActive=!1;b.__objectsRemoved.splice(0,1)}d=0;for(c=b.__webglObjects.length;d<c;d++)if(n=b.__webglObjects[d].object,f=n.geometry,n instanceof $3Dmol.Mesh||n instanceof $3Dmol.Line){n=0;for(l=f.geometryGroups.length;n<l;n++)if(g=f.geometryGroups[n],f.verticesNeedUpdate||f.elementsNeedUpdate||f.colorsNeedUpdate||f.normalsNeedUpdate){var w=B.STATIC_DRAW,m=g.vertexArray,x=g.colorArray;void 0!==g.__webglOffsetBuffer?B.bindBuffer(B.ARRAY_BUFFER,g.__webglOffsetBuffer):\nB.bindBuffer(B.ARRAY_BUFFER,g.__webglVertexBuffer);B.bufferData(B.ARRAY_BUFFER,m,w);B.bindBuffer(B.ARRAY_BUFFER,g.__webglColorBuffer);B.bufferData(B.ARRAY_BUFFER,x,w);g.normalArray&&void 0!==g.__webglNormalBuffer&&(m=g.normalArray,B.bindBuffer(B.ARRAY_BUFFER,g.__webglNormalBuffer),B.bufferData(B.ARRAY_BUFFER,m,w));g.radiusArray&&void 0!==g.__webglRadiusBuffer&&(B.bindBuffer(B.ARRAY_BUFFER,g.__webglRadiusBuffer),B.bufferData(B.ARRAY_BUFFER,g.radiusArray,w));g.faceArray&&void 0!==g.__webglFaceBuffer&&\n(m=g.faceArray,B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,g.__webglFaceBuffer),B.bufferData(B.ELEMENT_ARRAY_BUFFER,m,w));g.lineArray&&void 0!==g.__webglLineBuffer&&(m=g.lineArray,B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,g.__webglLineBuffer),B.bufferData(B.ELEMENT_ARRAY_BUFFER,m,w))}f.verticesNeedUpdate=!1;f.elementsNeedUpdate=!1;f.normalsNeedUpdate=!1;f.colorsNeedUpdate=!1;f.buffersNeedUpdate=!1}};this.getXYRatio=function(){return void 0!=this.rows&&void 0!=this.cols&&void 0!=this.row&&void 0!=this.col?[this.cols,\nthis.rows]:[1,1]};this.getAspect=function(b,c){if(void 0==b||void 0==c)b=g.width,c=g.height;var n=b/c;void 0!=this.rows&&void 0!=this.cols&&void 0!=this.row&&void 0!=this.col&&(n=b/this.cols/(c/this.rows));return n};this.setTexture=function(b,c){if(b.needsUpdate){b.__webglInit||(b.__webglInit=!0,b.addEventListener(\"dispose\",ma),b.__webglTexture=B.createTexture(),A.info.memory.textures++);B.activeTexture(B.TEXTURE0+c);B.bindTexture(B.TEXTURE_2D,b.__webglTexture);B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,\nb.flipY);B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha);B.pixelStorei(B.UNPACK_ALIGNMENT,b.unpackAlignment);c=b.image;c=e(c.width)&&e(c.height);var n=t(b.format),l=t(b.type),d=B.TEXTURE_2D;c?(B.texParameteri(d,B.TEXTURE_WRAP_S,t(b.wrapS)),B.texParameteri(d,B.TEXTURE_WRAP_T,t(b.wrapT)),B.texParameteri(d,B.TEXTURE_MAG_FILTER,t(b.magFilter)),B.texParameteri(d,B.TEXTURE_MIN_FILTER,t(b.minFilter))):(B.texParameteri(d,B.TEXTURE_WRAP_S,B.CLAMP_TO_EDGE),B.texParameteri(d,B.TEXTURE_WRAP_T,\nB.CLAMP_TO_EDGE),B.texParameteri(d,B.TEXTURE_MAG_FILTER,B.LINEAR),B.texParameteri(d,B.TEXTURE_MIN_FILTER,B.LINEAR));var f=b.mipmaps;if(0<f.length&&c){for(var g=0,w=f.length;g<w;g++)d=f[g],B.texImage2D(B.TEXTURE_2D,g,n,n,l,d);b.generateMipmaps=!1}else B.texImage2D(B.TEXTURE_2D,0,n,n,l,b.image);b.generateMipmaps&&c&&B.generateMipmap(B.TEXTURE_2D);b.needsUpdate=!1;if(b.onUpdate)b.onUpdate()}else B.activeTexture(B.TEXTURE0+c),B.bindTexture(B.TEXTURE_2D,b.__webglTexture)};this.addPostPlugin(new $3Dmol.SpritePlugin)};\n$3Dmol.Scene=function(){$3Dmol.Object3D.call(this);this.overrideMaterial=this.fog=null;this.matrixAutoUpdate=!1;this.__objects=[];this.__lights=[];this.__objectsAdded=[];this.__objectsRemoved=[]};$3Dmol.Scene.prototype=Object.create($3Dmol.Object3D.prototype);\n$3Dmol.Scene.prototype.__addObject=function(b){b instanceof $3Dmol.Light?(-1===this.__lights.indexOf(b)&&this.__lights.push(b),b.target&&void 0===b.target.parent&&this.add(b.target)):-1===this.__objects.indexOf(b)&&(this.__objects.push(b),this.__objectsAdded.push(b),-1!==this.__objectsRemoved.indexOf(b)&&this.__objectsRemoved.splice(c,1));for(var c=0;c<b.children.length;c++)this.__addObject(b.children[c])};\n$3Dmol.Scene.prototype.__removeObject=function(b){if(b instanceof $3Dmol.Light){var c=this.__lights.indexOf(b);-1!==c&&this.__lights.splice(c,1)}else c=this.__objects.indexOf(b),-1!==c&&(this.__objects.splice(c,1),this.__objectsRemoved.push(b),-1!==this.__objectsAdded.indexOf(b)&&this.__objectsAdded.splice(c,1));for(c=0;c<b.children.length;c++)this.__removeObject(b.children[c])};$3Dmol.Fog=function(b,c,d){this.name=\"\";this.color=new $3Dmol.Color(b);this.near=void 0!==c?c:1;this.far=void 0!==d?d:1E3};\n$3Dmol.Fog.prototype.clone=function(){return new $3Dmol.Fog(this.color.getHex(),this.near,this.far)};$3Dmol.ShaderUtils={clone:function(b){var c,d={};for(c in b){d[c]={};d[c].type=b[c].type;var h=b[c].value;h instanceof $3Dmol.Color?d[c].value=h.clone():\"number\"===typeof h?d[c].value=h:h instanceof Array?d[c].value=[]:console.error(\"Error copying shader uniforms from ShaderLib: unknown type for uniform\")}return d},stickimposterFragmentShader:\"uniform float opacity;\\nuniform mat4 projectionMatrix;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvarying vec3 vLight;\\nvarying vec3 vColor;\\nvarying vec3 cposition;\\nvarying vec3 p1;\\nvarying vec3 p2;\\nvarying float r;\\nvoid main() {\\n    vec3 color = abs(vColor);\\n    vec3 pos = cposition;\\n    vec3 p = pos;\\n    vec3 v = normalize(pos);\\n    vec3 pa = p1;\\n    vec3 va = normalize(p2-p1);\\n    vec3 tmp1 = v-(dot(v,va)*va);\\n    vec3 deltap = p-pa;\\n    float A = dot(tmp1,tmp1);\\n    if(A == 0.0) discard;\\n    vec3 tmp2 = deltap-(dot(deltap,va)*va);\\n    float B = 2.0*dot(tmp1, tmp2);\\n    float C = dot(tmp2,tmp2)-r*r;\\n    float det = (B*B) - (4.0*A*C);\\n    if(det < 0.0) discard;\\n    float sqrtDet = sqrt(det);\\n    float posT = (-B+sqrtDet)/(2.0*A);\\n    float negT = (-B-sqrtDet)/(2.0*A);\\n    float intersectionT = min(posT,negT);\\n    vec3 qi = p+v*intersectionT;\\n    float dotp1 = dot(va,qi-p1);\\n    float dotp2 = dot(va,qi-p2);\\n    vec3 norm;\\n    if( dotp1 < 0.0 || dotp2 > 0.0) {\\n       vec3 cp;\\n       if( dotp1 < 0.0) {        cp = p1;\\n       } else {\\n          cp = p2;\\n       }\\n       vec3 diff = p-cp;\\n       A = dot(v,v);\\n       B = dot(diff,v)*2.0;\\n       C = dot(diff,diff)-r*r;\\n       det = (B*B) - (4.0*C);\\n       if(det < 0.0) discard;\\n       sqrtDet = sqrt(det);\\n       posT = (-B+sqrtDet)/(2.0);\\n       negT = (-B-sqrtDet)/(2.0);\\n       float t = min(posT,negT);\\n       qi = p+v*t;\\n       norm = normalize(qi-cp);\\n    } else {\\n       norm = normalize(qi-(dotp1*va + p1));\\n    }\\n    vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\\n    float ndcDepth = clipPos.z / clipPos.w;\\n    float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\\n    gl_FragDepthEXT = depth;\"};\n$3Dmol.ShaderLib={basic:{fragmentShader:\"uniform mat4 viewMatrix;\\nuniform float opacity;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvarying vec3 vColor;\\nvoid main() {\\n    gl_FragColor = vec4( vColor, opacity );\\n    float depth = gl_FragCoord.z / gl_FragCoord.w;\\n    float fogFactor = smoothstep( fogNear, fogFar, depth );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\",vertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nattribute vec3 position;\\nattribute vec3 color;\\nvarying vec3 vColor;\\nvoid main() {\\n    vColor = color;\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    gl_Position = projectionMatrix * mvPosition;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3}}},sphereimposter:{fragmentShader:\"uniform mat4 viewMatrix;\\nuniform float opacity;\\nuniform mat4 projectionMatrix;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nuniform float uDepth;\\nuniform vec3 directionalLightColor[ 1 ];\\nvarying vec3 vColor;\\nvarying vec2 mapping;\\nvarying float rval;\\nvarying vec3 vLight;\\nvarying vec3 center;\\nvoid main() {\\n    float lensqr = dot(mapping,mapping);\\n    float rsqr = rval*rval;\\n    if(lensqr > rsqr)\\n       discard;\\n    float z = sqrt(rsqr-lensqr);\\n    vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\\n    vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\\n    float ndcDepth = clipPos.z / clipPos.w;\\n    gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\\n    vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\\n    float dotProduct = dot( norm, vLight );\\n    vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\\n    vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\\n    gl_FragColor = vec4(vLight*vColor, opacity*opacity );\\n    float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\",\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nvarying vec2 mapping;\\nvarying vec3 vColor;\\nvarying float rval;\\nvarying vec3 vLight;\\nvarying vec3 center;\\nvoid main() {\\n    vColor = color;\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    center = mvPosition.xyz;\\n    vec4 projPosition = projectionMatrix * mvPosition;\\n    vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\\n    vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\\n    vLight = normalize( lDirection.xyz );\\n    mapping = normal.xy;\\n    rval = abs(normal.x);\\n    gl_Position = projPosition+adjust;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},directionalLightColor:{type:\"fv\",value:[]},directionalLightDirection:{type:\"fv\",value:[]}}},lambert:{fragmentShader:\"uniform mat4 viewMatrix;\\nuniform float opacity;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvarying vec3 vLightFront;\\nvarying vec3 vColor;\\nvoid main() {\\n    gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\\n    #ifndef WIREFRAME\\n    gl_FragColor.xyz *= vLightFront;\\n    #endif\\n    gl_FragColor = gl_FragColor * vec4( vColor, opacity );\\n    float depth = gl_FragCoord.z / gl_FragCoord.w;\\n    float fogFactor = smoothstep( fogNear, fogFar, depth );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\",\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nvarying vec3 vColor;\\nvarying vec3 vLightFront;\\nvoid main() {\\n    vColor = color;\\n    vec3 objectNormal = normal;\\n    vec3 transformedNormal = normalMatrix * objectNormal;\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    vLightFront = vec3( 0.0 );\\n    transformedNormal = normalize( transformedNormal );\\n    vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\\n    vec3 dirVector = normalize( lDirection.xyz );\\n    float dotProduct = dot( transformedNormal, dirVector );\\n    vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\\n    vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\\n    gl_Position = projectionMatrix * mvPosition;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},directionalLightColor:{type:\"fv\",value:[]},directionalLightDirection:{type:\"fv\",value:[]}}},instanced:{fragmentShader:\"uniform mat4 viewMatrix;\\nuniform float opacity;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvarying vec3 vLightFront;\\nvarying vec3 vColor;\\nvoid main() {\\n    gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\\n    #ifndef WIREFRAME\\n    gl_FragColor.xyz *= vLightFront;\\n    #endif\\n    gl_FragColor = gl_FragColor * vec4( vColor, opacity );\\n    float depth = gl_FragCoord.z / gl_FragCoord.w;\\n    float fogFactor = smoothstep( fogNear, fogFar, depth );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\",\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nattribute vec3 offset;\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nattribute float radius;\\nvarying vec3 vColor;\\nvarying vec3 vLightFront;\\nvoid main() {\\n    vColor = color;\\n    vec3 objectNormal = normal;\\n    vec3 transformedNormal = normalMatrix * objectNormal;\\n    vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\\n    vLightFront = vec3( 0.0 );\\n    transformedNormal = normalize( transformedNormal );\\n    vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\\n    vec3 dirVector = normalize( lDirection.xyz );\\n    float dotProduct = dot( transformedNormal, dirVector );\\n    vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\\n    vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\\n    gl_Position = projectionMatrix * mvPosition;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},directionalLightColor:{type:\"fv\",value:[]},directionalLightDirection:{type:\"fv\",value:[]}}},outline:{fragmentShader:\"uniform float opacity;\\nuniform vec3 outlineColor;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvoid main() {\\n    gl_FragColor = vec4( outlineColor, 1 );\\n}\",vertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform float outlineWidth;\\nuniform float outlinePushback;\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nvoid main() {\\n    vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    mvPosition.xy += norm.xy*outlineWidth;\\n    gl_Position = projectionMatrix * mvPosition;\\n    mvPosition.z -= outlinePushback;\\n    vec4 pushpos = projectionMatrix*mvPosition;\\n    gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},outlineColor:{type:\"c\",value:new $3Dmol.Color(0,0,0)},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},outlineWidth:{type:\"f\",value:.1},outlinePushback:{type:\"f\",value:1}}},sphereimposteroutline:{fragmentShader:\"uniform float opacity;\\nuniform vec3 outlineColor;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nuniform mat4 projectionMatrix;\\nvarying vec2 mapping;\\nvarying float rval;\\nvarying vec3 center;\\nuniform float outlinePushback;\\nvoid main() {\\n    float lensqr = dot(mapping,mapping);\\n    float rsqr = rval*rval;\\n    if(lensqr > rsqr)\\n       discard;\\n    float z = sqrt(rsqr-lensqr);\\n    vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\\n    vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\\n    float ndcDepth = clipPos.z / clipPos.w;\\n    gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\\n    gl_FragColor = vec4(outlineColor, 1 );\\n}\",\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform float outlineWidth;\\nuniform float outlinePushback;\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nvarying vec2 mapping;\\nvarying float rval;\\nvarying vec3 center;\\nvoid main() {\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    center = mvPosition.xyz;\\n    vec4 projPosition = projectionMatrix * mvPosition;\\n    vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\\n    vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\\n    mapping = norm.xy;\\n    rval = abs(norm.x);\\n    gl_Position = projPosition+adjust;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},outlineColor:{type:\"c\",value:new $3Dmol.Color(0,0,0)},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},outlineWidth:{type:\"f\",value:.1},outlinePushback:{type:\"f\",value:1}}},stickimposter:{fragmentShader:[$3Dmol.ShaderUtils.stickimposterFragmentShader,\"    float dotProduct = dot( norm, vLight );\\n    vec3 light = vec3( max( dotProduct, 0.0 ) );\\n    gl_FragColor = vec4(light*color, opacity*opacity );\\n    float fogFactor = smoothstep( fogNear, fogFar, depth );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\"].join(\"\\n\"),\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nattribute float radius;\\nvarying vec3 vColor;\\nvarying vec3 vLight;\\nvarying vec3 cposition;\\nvarying vec3 p1;\\nvarying vec3 p2;\\nvarying float r;\\nvoid main() {\\n    vColor = color; vColor.z = abs(vColor.z);\\n    r = abs(radius);\\n    vec4 to = modelViewMatrix*vec4(normal, 1.0);\\n    vec4 pt = modelViewMatrix*vec4(position, 1.0);\\n    vec4 mvPosition = pt;\\n    p1 = pt.xyz; p2 = to.xyz;\\n    vec3 norm = to.xyz-pt.xyz;\\n    float mult = 1.1;\\n    if(length(p1) > length(p2)) {\\n       mvPosition = to;\\n    }\\n    vec3 n = normalize(mvPosition.xyz);\\n    if(color.z >= 0.0) {\\n       vec3 pnorm = normalize(p1);\\n       float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\\n       mvPosition.xyz = p1+t*pnorm;\\n    } else {\\n       vec3 pnorm = normalize(p2);\\n       float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\\n       mvPosition.xyz = p2+t*pnorm;\\n       mult *= -1.0;\\n    }\\n    vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\\n    vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\\n    mvPosition.xy +=  mult*(cr + doublecr).xy;\\n    cposition = mvPosition.xyz;\\n    gl_Position = projectionMatrix * mvPosition;\\n    vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\\n    vLight = normalize( lDirection.xyz )*directionalLightColor[0];\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},directionalLightColor:{type:\"fv\",value:[]},directionalLightDirection:{type:\"fv\",value:[]}}},stickimposteroutline:{fragmentShader:$3Dmol.ShaderUtils.stickimposterFragmentShader+\"gl_FragColor = vec4(color,1.0);}\",vertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nuniform vec3 outlineColor;\\nuniform float outlineWidth;\\nuniform float outlinePushback;\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nattribute float radius;\\nvarying vec3 vColor;\\nvarying vec3 vLight;\\nvarying vec3 cposition;\\nvarying vec3 p1;\\nvarying vec3 p2;\\nvarying float r;\\nvoid main() {\\n    vColor = outlineColor;\\n    float rad = radius+sign(radius)*outlineWidth;\\n    r = abs(rad);\\n    vec4 to = modelViewMatrix*vec4(normal, 1.0);\\n    vec4 pt = modelViewMatrix*vec4(position, 1.0);\\n    to.xyz += normalize(to.xyz)*outlinePushback;\\n    pt.xyz += normalize(pt.xyz)*outlinePushback;\\n    vec4 mvPosition = pt;\\n    p1 = pt.xyz; p2 = to.xyz;\\n    vec3 norm = to.xyz-pt.xyz;\\n    float mult = 1.1;\\n    if(length(p1) > length(p2)) {\\n       mvPosition = to;\\n    }\\n    vec3 n = normalize(mvPosition.xyz);\\n    if(color.z >= 0.0) {\\n       vec3 pnorm = normalize(p1);\\n       float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\\n       mvPosition.xyz = p1+t*pnorm;\\n    } else {\\n       vec3 pnorm = normalize(p2);\\n       float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\\n       mvPosition.xyz = p2+t*pnorm;\\n       mult *= -1.0;\\n    }\\n    vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\\n    vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\\n    mvPosition.xy +=  mult*(cr + doublecr).xy;\\n    cposition = mvPosition.xyz;\\n    gl_Position = projectionMatrix * mvPosition;\\n    vLight = vec3(1.0,1.0,1.0);\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},outlineColor:{type:\"c\",value:new $3Dmol.Color(0,0,0)},outlineWidth:{type:\"f\",value:.1},outlinePushback:{type:\"f\",value:1}}},lambertdouble:{fragmentShader:\"uniform mat4 viewMatrix;\\nuniform float opacity;\\nuniform vec3 fogColor;\\nuniform float fogNear;\\nuniform float fogFar;\\nvarying vec3 vLightFront;\\nvarying vec3 vLightBack;\\nvarying vec3 vColor;\\nvoid main() {\\n    gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\\n    #ifndef WIREFRAME\\n    if ( gl_FrontFacing )\\n       gl_FragColor.xyz *= vLightFront;\\n    else\\n       gl_FragColor.xyz *= vLightBack;\\n    #endif\\n    gl_FragColor = gl_FragColor * vec4( vColor, opacity );\\n    float depth = gl_FragCoord.z / gl_FragCoord.w;\\n    float fogFactor = smoothstep( fogNear, fogFar, depth );\\n    gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\\n}\",\nvertexShader:\"uniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform mat4 viewMatrix;\\nuniform mat3 normalMatrix;\\nuniform vec3 directionalLightColor[ 1 ];\\nuniform vec3 directionalLightDirection[ 1 ];\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec3 color;\\nvarying vec3 vColor;\\nvarying vec3 vLightFront;\\nvarying vec3 vLightBack;\\nvoid main() {\\n    vColor = color;\\n    vec3 objectNormal = normal;\\n    vec3 transformedNormal = normalMatrix * objectNormal;\\n    vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n    vLightFront = vec3( 0.0 );\\n    vLightBack = vec3( 0.0 );\\n    transformedNormal = normalize( transformedNormal );\\n    vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\\n    vec3 dirVector = normalize( lDirection.xyz );\\n    float dotProduct = dot( transformedNormal, dirVector );\\n    vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\\n    vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\\n    vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\\n    vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\\n    gl_Position = projectionMatrix * mvPosition;\\n}\",\nuniforms:{opacity:{type:\"f\",value:1},fogColor:{type:\"c\",value:new $3Dmol.Color(1,1,1)},fogNear:{type:\"f\",value:1},fogFar:{type:\"f\",value:2E3},directionalLightColor:{type:\"fv\",value:[]},directionalLightDirection:{type:\"fv\",value:[]}}},sprite:{fragmentShader:\"uniform vec3 color;\\nuniform sampler2D map;\\nuniform float opacity;\\nuniform int fogType;\\nuniform vec3 fogColor;\\nuniform float fogDensity;\\nuniform float fogNear;\\nuniform float fogFar;\\nuniform float alphaTest;\\nvarying vec2 vUV;\\nvoid main() {\\n    vec4 texture = texture2D(map, vUV);\\n    if (texture.a < alphaTest) discard;\\n    gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\\n    if (fogType > 0) {\\n        float depth = gl_FragCoord.z / gl_FragCoord.w;\\n        float fogFactor = 0.0;\\n        if (fogType == 1) {\\n            fogFactor = smoothstep(fogNear, fogFar, depth);\\n        }\\n        else {\\n            const float LOG2 = 1.442695;\\n            float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\\n            fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\\n        }\\n        gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\\n    }\\n}\",\nvertexShader:\"uniform int useScreenCoordinates;\\nuniform vec3 screenPosition;\\nuniform mat4 modelViewMatrix;\\nuniform mat4 projectionMatrix;\\nuniform float rotation;\\nuniform vec2 scale;\\nuniform vec2 alignment;\\nuniform vec2 uvOffset;\\nuniform vec2 uvScale;\\nattribute vec2 position;\\nattribute vec2 uv;\\nvarying vec2 vUV;\\nvoid main() {\\n    vUV = uvOffset + uv * uvScale;\\n    vec2 alignedPosition = position + alignment;\\n    vec2 rotatedPosition;\\n    rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\\n    rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\\n    vec4 finalPosition;\\n    if(useScreenCoordinates != 0) {\\n        finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\\n    }\\n    else {\\n        finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\\n        finalPosition.xy += rotatedPosition; \\n    }\\n    gl_Position = finalPosition;\\n}\",\nuniforms:{}}};\n$3Dmol.autoload=function(b,c){void 0!==$(\".viewer_3Dmoljs\")[0]&&($3Dmol.autoinit=!0);if($3Dmol.autoinit){b=void 0!=b?b:null;$3Dmol.viewers={};var d=0;$(\".viewer_3Dmoljs\").each(function(){var h,e,t=$(this),g=[],q=[];\"static\"==t.css(\"position\")&&t.css(\"position\",\"relative\");var p=null;if(t.data(\"pdb\"))g.push(\"https://files.rcsb.org/view/\"+t.data(\"pdb\")+\".pdb\"),q.push(\"pdb\");else if(t.data(\"cid\"))q.push(\"sdf\"),g.push(\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/\"+t.data(\"cid\")+\"/SDF?record_type=3d\");\nelse if(t.data(\"href\")||t.data(\"url\")){var u=t.data(\"href\");g.push(u);p=u.substr(u.lastIndexOf(\".\")+1);q.push(p)}p=t.data();for(h in p)\"pdb\"===h.substring(0,3)&&\"pdb\"!==h?(g.push(\"https://files.rcsb.org/view/\"+p[h]+\".pdb\"),q.push(\"pdb\")):\"href\"===h.substring(0,4)&&\"href\"!==h?(u=p[h],g.push(u),q.push(u.substr(u.lastIndexOf(\".\")+1))):\"cid\"===h.substring(0,3)&&\"cid\"!==h&&(g.push(\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/\"+p[h]+\"/SDF?record_type=3d\"),q.push(\"sdf\"));var m={};t.data(\"options\")&&\n(m=$3Dmol.specStringToObject(t.data(\"options\")));p=$3Dmol.CC.color(t.data(\"backgroundcolor\"));var l={line:{}};t.data(\"style\")&&(l=$3Dmol.specStringToObject(t.data(\"style\")));var n={};t.data(\"select\")&&(n=$3Dmol.specStringToObject(t.data(\"select\")));var y=[],f=[],x=[],w=t.data(),R=/style(.+)/,P=/surface(.*)/,A=/labelres(.*)/,T=[];for(G in w)w.hasOwnProperty(G)&&T.push(G);T.sort();for(h=0;h<T.length;h++){var G=T[h];if(e=R.exec(G)){e=\"select\"+e[1];var C=$3Dmol.specStringToObject(w[e]);e=$3Dmol.specStringToObject(w[G]);\ny.push([C,e])}if(e=P.exec(G))e=\"select\"+e[1],C=$3Dmol.specStringToObject(w[e]),e=$3Dmol.specStringToObject(w[G]),f.push([C,e]);if(e=A.exec(G))e=\"select\"+e[1],C=$3Dmol.specStringToObject(w[e]),e=$3Dmol.specStringToObject(w[G]),x.push([C,e])}var z=function(b){b.setStyle(n,l);for(var c=0;c<y.length;c++){var d=y[c][0]||{};var g=y[c][1]||{line:{}};b.setStyle(d,g)}for(c=0;c<f.length;c++)d=f[c][0]||{},g=f[c][1]||{},b.addSurface($3Dmol.SurfaceType.VDW,g,d,d);for(c=0;c<x.length;c++)d=x[c][0]||{},g=x[c][1]||\n{},b.addResLabels(d,g);b.zoomTo();b.render()},D=b;try{null==D&&(D=$3Dmol.viewers[this.id||d++]=$3Dmol.createViewer(t,{defaultcolors:$3Dmol.rasmolElementColors})),D.setBackgroundColor(p)}catch(K){console.log(K),window.location=\"http://get.webgl.org\"}if(0!=g.length){h=0;var I=function(b){u=g[h];var n=t.data(\"type\")||t.data(\"datatype\")||q[h];D.addModel(b,n,m);h+=1;h<g.length?$.get(g[h],I,\"text\"):(z(D),t.data(\"callback\")&&(b=eval(t.data(\"callback\")),\"function\"==typeof b&&b(D)),c&&c(D))};$.get(g[0],I,\n\"text\")}else t.data(\"element\")&&(G=$(\"#\"+t.data(\"element\")).val()||\"\",p=t.data(\"type\")||t.data(\"datatype\"),p||(console.log(\"Warning: No type specified for embedded viewer with moldata from \"+t.data(\"element\")+\"\\n assuming type 'pdb'\"),p=\"pdb\"),D.addModel(G,p,m)),z(D),t.data(\"callback\")&&(G=eval(t.data(\"callback\")),\"function\"==typeof G&&G(D)),c&&c(D)})}};$(document).ready(function(){$3Dmol.autoload()});(function(){});\nvar htmlColors={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,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,\ndarkolivegreen: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,grey:8421504,green:32768,greenyellow:11403055,\nhoneydew: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,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,\nlimegreen: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,\npaleturquoise: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,\nthistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};\n$3Dmol.CC={cache:{0:new $3Dmol.Color(0)},color:function color_(c){if(!c)return this.cache[0];if(\"undefined\"!==typeof this.cache[c])return this.cache[c];if(c&&c.constructor===Array)return c.map(color_,this);c=this.getHex(c);if(\"number\"===typeof c){var d=new $3Dmol.Color(c);return this.cache[c]=d}return c},getHex:function(b){return isNaN(parseInt(b))?\"string\"===typeof b?(b=b.trim(),4==b.length&&\"#\"==b[0]&&(b=\"#\"+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]),7==b.length&&\"#\"==b[0]?parseInt(b.substring(1),16):htmlColors[b.toLowerCase()]||\n0):b:parseInt(b)}};$3Dmol.CC=$3Dmol.CC;$3Dmol.CC.color=$3Dmol.CC.color;$3Dmol.ssColors=$3Dmol.ssColors||{};$3Dmol.ssColors.pyMol={h:16711680,s:16776960,c:65280};$3Dmol.ssColors.Jmol={h:16711808,s:16762880,c:16777215};$3Dmol.elementColors=$3Dmol.elementColors||{};$3Dmol.elementColors.defaultColor=16716947;\n$3Dmol.elementColors.Jmol={H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578E4,SI:1578E4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,\nCo:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,\nSn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366E3,XE:4366E3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,\nW:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32E3,RA:32E3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,\nCF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998};\n$3Dmol.elementColors.rasmol={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,\nBa:16753920,BA:16753920,Au:14329120,AU:14329120};$3Dmol.elementColors.defaultColors=$3Dmol.elementColors.rasmol;$3Dmol.elementColors.greenCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.greenCarbon.C=65280;$3Dmol.elementColors.cyanCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.cyanCarbon.C=65535;$3Dmol.elementColors.magentaCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.magentaCarbon.C=16711935;\n$3Dmol.elementColors.yellowCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.yellowCarbon.C=16776960;$3Dmol.elementColors.whiteCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.whiteCarbon.C=16777215;$3Dmol.elementColors.orangeCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.orangeCarbon.C=16753920;$3Dmol.elementColors.purpleCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.purpleCarbon.C=8388736;\n$3Dmol.elementColors.blueCarbon=$.extend({},$3Dmol.elementColors.defaultColors);$3Dmol.elementColors.blueCarbon.C=255;$3Dmol.residues={};$3Dmol.residues.amino={ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740};\n$3Dmol.residues.shapely={ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935};$3Dmol.residues.nucleic={A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576};$3Dmol.chains={};\n$3Dmol.chains.atom={A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146};\n$3Dmol.chains.hetatm={A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834};\n$3Dmol.builtinColorSchemes={ssPyMol:{prop:\"ss\",map:$3Dmol.ssColors.pyMol},ssJmol:{prop:\"ss\",map:$3Dmol.ssColors.Jmol},Jmol:{prop:\"elem\",map:$3Dmol.elementColors.Jmol},greenCarbon:{prop:\"elem\",map:$3Dmol.elementColors.greenCarbon},\"default\":{prop:\"elem\",map:$3Dmol.elementColors.defaultColors},amino:{prop:\"resn\",map:$3Dmol.residues.amino},shapely:{prop:\"resn\",map:$3Dmol.residues.shapely},nucleic:{prop:\"resn\",map:$3Dmol.residues.nucleic},chain:{prop:\"chain\",map:$3Dmol.chains.atom},chainHetatm:{prop:\"chain\",\nmap:$3Dmol.chains.hetatm}};\n$3Dmol.getColorFromStyle=function(b,c){var d=c.colorscheme;if(\"undefined\"!=typeof $3Dmol.builtinColorSchemes[d])d=$3Dmol.builtinColorSchemes[d];else if(\"string\"==typeof d&&d.endsWith(\"Carbon\")){var h=d.substring(0,d.lastIndexOf(\"Carbon\")).toLowerCase();if(\"undefined\"!=typeof htmlColors[h]){var e=$.extend({},$3Dmol.elementColors.defaultColors);e.C=htmlColors[h];$3Dmol.builtinColorSchemes[d]={prop:\"elem\",map:e};d=$3Dmol.builtinColorSchemes[d]}}h=b.color;\"undefined\"!=typeof c.color&&\"spectrum\"!=c.color&&\n(h=c.color);\"undefined\"!=typeof d?\"undefined\"!=typeof $3Dmol.elementColors[d]?(d=$3Dmol.elementColors[d],\"undefined\"!=typeof d[b[d.prop]]&&(h=d.map[b[d.prop]])):\"undefined\"!=typeof d[b[d.prop]]?h=d.map[b[d.prop]]:\"undefined\"!=typeof d.prop&&\"undefined\"!=typeof d.gradient?(e=d.prop,c=d.gradient,\"undefined\"!=typeof $3Dmol.Gradient.builtinGradients[c]&&(c=new $3Dmol.Gradient.builtinGradients[c](d.min,d.max,d.mid)),d=c.range()||[-1,1],b=$3Dmol.getAtomProperty(b,e),null!=b&&(h=c.valueToHex(b,d))):\"undefined\"!=\ntypeof d.prop&&\"undefined\"!=typeof d.map?(e=d.prop,b=$3Dmol.getAtomProperty(b,e),\"undefined\"!=typeof d.map[b]&&(h=d.map[b])):\"undefined\"!=typeof c.colorscheme[b.elem]?h=c.colorscheme[b.elem]:console.log(\"Could not interpret colorscheme \"+d):\"undefined\"!=typeof c.colorfunc&&(h=c.colorfunc(b));return $3Dmol.CC.color(h)};$3Dmol=$3Dmol||{};\n$3Dmol.subdivide_spline=function(b,c){var d=[];var h=[];h.push(b[0]);var e;var t=1;for(e=b.length-1;t<e;t++){var g=b[t];var q=b[t+1];g.smoothen?(q=new $3Dmol.Vector3((g.x+q.x)/2,(g.y+q.y)/2,(g.z+q.z)/2),q.atom=g.atom,h.push(q)):h.push(g)}h.push(b[b.length-1]);t=-1;for(b=h.length;t<=b-3;t++){e=h[-1===t?0:t];g=h[t+1];q=h[t+2];var p=h[t===b-3?b-1:t+3];e=(new $3Dmol.Vector3).subVectors(q,e).multiplyScalar(.5);p=(new $3Dmol.Vector3).subVectors(p,g).multiplyScalar(.5);if(!q.skip)for(var u=0;u<c;u++){var m=\n1/c*u;m=new $3Dmol.Vector3(g.x+m*e.x+m*m*(-3*g.x+3*q.x-2*e.x-p.x)+m*m*m*(2*g.x-2*q.x+e.x+p.x),g.y+m*e.y+m*m*(-3*g.y+3*q.y-2*e.y-p.y)+m*m*m*(2*g.y-2*q.y+e.y+p.y),g.z+m*e.z+m*m*(-3*g.z+3*q.z-2*e.z-p.z)+m*m*m*(2*g.z-2*q.z+e.z+p.z));m.atom=u<c/2?g.atom:q.atom;d.push(m)}}d.push(h[h.length-1]);return d};\n$3Dmol.drawCartoon=function(){var b=function(b,c,d,f,g,w){g=0;for(w=c.length;g<w;g++){var n=Math.round(g*(f.length-1)/w);var l=$3Dmol.CC.color(f[n]);geoGroup=b.updateGeoGroup(2);var m=geoGroup.vertexArray,x=geoGroup.colorArray;n=geoGroup.faceArray;var y=geoGroup.vertices;var e=3*y;m[e]=c[g].x;m[e+1]=c[g].y;m[e+2]=c[g].z;m[e+3]=d[g].x;m[e+4]=d[g].y;m[e+5]=d[g].z;for(m=0;6>m;++m)x[e+3*m]=l.r,x[e+1+3*m]=l.g,x[e+2+3*m]=l.b;0<g&&(y=[y,y+1,y-1,y-2],e=geoGroup.faceidx,n[e]=y[0],n[e+1]=y[1],n[e+2]=y[3],n[e+\n3]=y[1],n[e+4]=y[2],n[e+5]=y[3],geoGroup.faceidx+=6);geoGroup.vertices+=2}},c=function(b,c,d,f,g){0!==c.length&&(g=void 0===g?5:g,f=new $3Dmol.Geometry,$3Dmol.subdivide_spline(c,g),c=new $3Dmol.LineBasicMaterial({linewidth:d}),c.vertexColors=!0,c=new $3Dmol.Line(f,c),c.type=$3Dmol.LineStrip,b.add(c))},d=function(c,n,d,f,g,w,m){m&&\"default\"!==m||(m=\"rectangle\");if(\"edged\"===m){if(!(2>n.length)){var l=n[0];n=n[n.length-1];var y=f||axisDIV;l=$3Dmol.subdivide_spline(l,y);n=$3Dmol.subdivide_spline(n,y);\nif(g){y=[];var x,e,h,p;m=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];var R;var q=0;for(R=l.length;q<R;q++){var t=Math.round(q*(d.length-1)/R);t=$3Dmol.CC.color(d[t]);y.push(x=l[q]);y.push(x);y.push(e=n[q]);y.push(e);if(q<R-1){var H=l[q+1].clone().sub(l[q]);H=n[q].clone().sub(l[q]).cross(H).normalize().multiplyScalar(g)}y.push(h=l[q].clone().add(H));y.push(h);y.push(p=n[q].clone().add(H));y.push(p);if(void 0!==x.atom)var u=x.atom;f=c.updateGeoGroup(8);var E=f.vertexArray;var L=f.colorArray;var M=\nf.faceArray;w=f.vertices;var F=3*w;E[F]=x.x;E[F+1]=x.y;E[F+2]=x.z;E[F+3]=x.x;E[F+4]=x.y;E[F+5]=x.z;E[F+6]=e.x;E[F+7]=e.y;E[F+8]=e.z;E[F+9]=e.x;E[F+10]=e.y;E[F+11]=e.z;E[F+12]=h.x;E[F+13]=h.y;E[F+14]=h.z;E[F+15]=h.x;E[F+16]=h.y;E[F+17]=h.z;E[F+18]=p.x;E[F+19]=p.y;E[F+20]=p.z;E[F+21]=p.x;E[F+22]=p.y;E[F+23]=p.z;for(E=0;8>E;++E)L[F+3*E]=t.r,L[F+1+3*E]=t.g,L[F+2+3*E]=t.b;if(0<q)for(L=void 0!==U&&void 0!==u&&U.serial!==u.serial,E=0;4>E;E++)if(F=[w+m[E][0],w+m[E][1],w+m[E][2],w+m[E][3]],e=f.faceidx,M[e]=\nF[0],M[e+1]=F[1],M[e+2]=F[3],M[e+3]=F[1],M[e+4]=F[2],M[e+5]=F[3],f.faceidx+=6,u.clickable||U.clickable||u.hoverable||U.hoverable){p=y[F[3]].clone();e=y[F[0]].clone();var J=y[F[2]].clone();h=y[F[1]].clone();p.atom=y[F[3]].atom||null;J.atom=y[F[2]].atom||null;e.atom=y[F[0]].atom||null;h.atom=y[F[1]].atom||null;if(L){var Q=p.clone().add(e).multiplyScalar(.5),W=J.clone().add(h).multiplyScalar(.5),V=p.clone().add(h).multiplyScalar(.5);if(0===E%2){if(U.clickable||U.hoverable)F=new $3Dmol.Triangle(Q,V,p),\nx=new $3Dmol.Triangle(W,J,V),p=new $3Dmol.Triangle(V,J,p),U.intersectionShape.triangle.push(F),U.intersectionShape.triangle.push(x),U.intersectionShape.triangle.push(p);if(u.clickable||u.hoverable)F=new $3Dmol.Triangle(e,h,V),x=new $3Dmol.Triangle(h,W,V),p=new $3Dmol.Triangle(e,V,Q),u.intersectionShape.triangle.push(F),u.intersectionShape.triangle.push(x),u.intersectionShape.triangle.push(p)}else{if(u.clickable||u.hoverable)F=new $3Dmol.Triangle(Q,V,p),x=new $3Dmol.Triangle(W,J,V),p=new $3Dmol.Triangle(V,\nJ,p),u.intersectionShape.triangle.push(F),u.intersectionShape.triangle.push(x),u.intersectionShape.triangle.push(p);if(U.clickable||U.hoverable)F=new $3Dmol.Triangle(e,h,V),x=new $3Dmol.Triangle(h,W,V),p=new $3Dmol.Triangle(e,V,Q),U.intersectionShape.triangle.push(F),U.intersectionShape.triangle.push(x),U.intersectionShape.triangle.push(p)}}else if(u.clickable||u.hoverable)F=new $3Dmol.Triangle(e,h,p),x=new $3Dmol.Triangle(h,J,p),u.intersectionShape.triangle.push(F),u.intersectionShape.triangle.push(x)}f.vertices+=\n8;var U=u}d=y.length-8;f=c.updateGeoGroup(8);E=f.vertexArray;L=f.colorArray;M=f.faceArray;w=f.vertices;F=3*w;e=f.faceidx;for(q=0;4>q;q++)y.push(y[2*q]),y.push(y[d+2*q]),g=y[2*q],c=y[d+2*q],E[F+6*q]=g.x,E[F+1+6*q]=g.y,E[F+2+6*q]=g.z,E[F+3+6*q]=c.x,E[F+4+6*q]=c.y,E[F+5+6*q]=c.z,L[F+6*q]=t.r,L[F+1+6*q]=t.g,L[F+2+6*q]=t.b,L[F+3+6*q]=t.r,L[F+4+6*q]=t.g,L[F+5+6*q]=t.b;F=[w,w+2,w+6,w+4];x=[w+1,w+5,w+7,w+3];M[e]=F[0];M[e+1]=F[1];M[e+2]=F[3];M[e+3]=F[1];M[e+4]=F[2];M[e+5]=F[3];M[e+6]=x[0];M[e+7]=x[1];M[e+\n8]=x[3];M[e+9]=x[1];M[e+10]=x[2];M[e+11]=x[3];f.faceidx+=12;f.vertices+=8}else b(c,l,n,d,y,w)}}else if(\"rectangle\"===m||\"oval\"===m||\"parabola\"===m)if(t=m,u=n.length,!(2>u||2>n[0].length)){f=f||axisDIV;for(U=0;U<u;U++)n[U]=$3Dmol.subdivide_spline(n[U],f);H=n[0].length;if(g){w=[];f=[];m=[];for(E=0;E<u;E++)w.push(.25+1.5*Math.sqrt((u-1)*E-Math.pow(E,2))/(u-1)),f.push(.5),m.push(2*(Math.pow(E/u,2)-E/u)+.6);R=[];for(E=0;E<2*u-1;E++)R[E]=[E,E+1,E+1-2*u,E-2*u];R[2*u-1]=[E,E+1-2*u,E+1-4*u,E-2*u];c=c.updateGeoGroup(2*\nu*H);for(U=0;U<H;U++){E=Math.round(U*(d.length-1)/H);x=$3Dmol.CC.color(d[E]);L=y;F=q;y=[];q=[];e=[];void 0!==n[0][U].atom&&(M=n[0][U].atom,\"oval\"===t?l=w:\"rectangle\"===t?l=f:\"parabola\"===t&&(l=m));l||(l=f);for(E=0;E<u;E++)h=U<H-1?n[E][U+1].clone().sub(n[E][U]):n[E][U-1].clone().sub(n[E][U]).negate(),p=E<u-1?n[E+1][U].clone().sub(n[E][U]):n[E-1][U].clone().sub(n[E][U]).negate(),e[E]=p.cross(h).normalize().multiplyScalar(g*l[E]);for(E=0;E<u;E++)y[E]=n[E][U].clone().add(e[E].clone().negate());for(E=\n0;E<u;E++)q[E]=n[E][U].clone().add(e[E]);J=c.vertexArray;p=c.colorArray;e=c.faceArray;h=c.vertices;Q=3*h;for(E=0;E<u;E++)J[Q+3*E+0]=y[E].x,J[Q+3*E+1]=y[E].y,J[Q+3*E+2]=y[E].z;for(E=0;E<u;E++)J[Q+3*E+0+3*u]=q[u-1-E].x,J[Q+3*E+1+3*u]=q[u-1-E].y,J[Q+3*E+2+3*u]=q[u-1-E].z;for(E=0;E<2*u;++E)p[Q+3*E+0]=x.r,p[Q+3*E+1]=x.g,p[Q+3*E+2]=x.b;if(0<U){for(E=0;E<2*u;E++)x=[h+R[E][0],h+R[E][1],h+R[E][2],h+R[E][3]],p=c.faceidx,e[p]=x[0],e[p+1]=x[1],e[p+2]=x[3],e[p+3]=x[1],e[p+4]=x[2],e[p+5]=x[3],c.faceidx+=6;if(M.clickable||\nM.hoverable)for(E in x=[],x.push(new $3Dmol.Triangle(L[0],y[0],y[u-1])),x.push(new $3Dmol.Triangle(L[0],y[u-1],L[u-1])),x.push(new $3Dmol.Triangle(L[u-1],y[u-1],q[u-1])),x.push(new $3Dmol.Triangle(L[u-1],q[u-1],F[u-1])),x.push(new $3Dmol.Triangle(q[0],F[0],F[u-1])),x.push(new $3Dmol.Triangle(q[u-1],q[0],F[u-1])),x.push(new $3Dmol.Triangle(y[0],L[0],F[0])),x.push(new $3Dmol.Triangle(q[0],y[0],F[0])),x)M.intersectionShape.triangle.push(x[E])}c.vertices+=2*u}e=c.faceArray;h=c.vertices;for(U=0;U<u-1;U++)x=\n[U,U+1,2*u-2-U,2*u-1-U],p=c.faceidx,e[p]=x[0],e[p+1]=x[1],e[p+2]=x[3],e[p+3]=x[1],e[p+4]=x[2],e[p+5]=x[3],c.faceidx+=6;for(U=0;U<u-1;U++)x=[h-1-U,h-2-U,h-2*u+U+1,h-2*u+U],p=c.faceidx,e[p]=x[0],e[p+1]=x[1],e[p+2]=x[3],e[p+3]=x[1],e[p+4]=x[2],e[p+5]=x[3],c.faceidx+=6}else b(c,n[0],n[u-1],d,f,w)}},h=function(b,c){if(b&&c&&b.chain===c.chain){if(b.reschain===c.reschain&&(b.resi===c.resi||b.resi===c.resi-1))return!0;if(b.resi<c.resi){var n=b.x-c.x,d=b.y-c.y;b=b.z-c.z;if(16>n*n+d*d+b*b)return!0}}return!1},\ne=function(b,c,d,f,g){null!=c&&0!=c.vertices&&(g&&(c.initTypedArrays(),c.setUpNormals()),g=new $3Dmol.MeshDoubleLambertMaterial,g.vertexColors=$3Dmol.FaceColors,\"number\"===typeof d&&0<=d&&1>d&&(g.transparent=!0,g.opacity=d),g.outline=f,c=new $3Dmol.Mesh(c,g),b.add(c))},t={C:!0,CA:!0,O:!0,P:!0,OP2:!0,O2P:!0,\"O5'\":!0,\"O3'\":!0,\"C5'\":!0,\"C2'\":!0,\"O5*\":!0,\"O3*\":!0,\"C5*\":!0,\"C2*\":!0,N1:!0,N3:!0},g={DA:!0,DG:!0,A:!0,G:!0},q={DT:!0,DC:!0,U:!0,C:!0,T:!0},p={DA:!0,DG:!0,A:!0,G:!0,DT:!0,DC:!0,U:!0,C:!0,T:!0},\nu=function(b,n,y,f,x,w,R){w=w||5;R=R||5;var l,A,u=new $3Dmol.Geometry(!0),G=new $3Dmol.Geometry(!0),C=[],z=[],D=1,I=!1,K={};for(L in $3Dmol.Gradient.builtinGradients)$3Dmol.Gradient.builtinGradients.hasOwnProperty(L)&&(K[L]=new $3Dmol.Gradient.builtinGradients[L](y[1],y[0]));var H=function(b,c){return y&&\"spectrum\"===c.color?c.colorscheme in K?K[c.colorscheme].valueToHex(b.resi):K.sinebow.valueToHex(b.resi):$3Dmol.getColorFromStyle(b,c).getHex()};for(A=0;A<w;A++)z[A]=[];var N=l=!1;A=0;var E=[];for(A in n){var L=\nn[A];if(\"C\"===L.elem&&\"CA\"===L.atom){var M=h(J,L);M&&\"s\"===L.ss?l=!0:l&&(J&&F&&J.style.cartoon.arrows&&F.style.cartoon.arrows&&(J.ss=\"arrow end\",F.ss=\"arrow start\"),l=!1);M&&(\"h\"===J.ss||\"tube start\"==J.ss)&&J.style.cartoon.tubes?!N&&\"tube start\"!=J.ss&&L.style.cartoon.tubes&&(L.ss=\"tube start\",N=!0):N&&(\"tube start\"===J.ss?J.ss=\"tube end\":F&&F.style.cartoon.tubes&&(F.ss=\"tube end\"),N=!1);var F=J;var J=L}L&&L.atom in t&&E.push(L)}N&&J.style.cartoon.tubes&&(J.ss=\"tube end\",N=!1);n=function(n){for(var l,\ng,m=0;!W&&m<w;m++)c(b,z[m],1,C,R,D);f&&0<z[0].length&&d(G,z,C,R,W,D,z.style);if(n){g=[];for(m=0;m<w;m++)g[m]=z[m][z[m].length-1];l=C[C.length-1]}z=[];for(m=0;m<w;m++)z[m]=[];C=[];if(n){for(m=0;m<w;m++)z[m].push(g[m]);C.push(l)}e(b,G,D,I,!0);e(b,u,D,I,!1);G=new $3Dmol.Geometry(!0);u=new $3Dmol.Geometry(!0)};J=void 0;for(F=0;F<E.length;F++)if(L=E[F],A=L.resn.trim(),N=A in p,D=1,l=L.style.cartoon,J&&J.style.cartoon&&(D=J.style.cartoon.opacity),J&&J.style.cartoon&&J.style.cartoon.outline&&(I=J.style.cartoon.outline),\n!J||!J.style.cartoon||L.style.cartoon&&J.style.cartoon.opacity==L.style.cartoon.opacity||n(J.chain==L.chain),z.length&&z[0].length>3E4/w/R/2&&n(!0),\"trace\"===l.style){if(!L.hetflag&&(\"C\"===L.elem&&\"CA\"===L.atom||N&&\"P\"===L.atom)){var Q=H(L,l);var W=$.isNumeric(l.thickness)?l.thickness:.4;if(h(J,L))if(Q==V){var V=$3Dmol.CC.color(Q);$3Dmol.GLDraw.drawCylinder(u,J,L,W,V,2,2)}else l=(new $3Dmol.Vector3).addVectors(J,L).multiplyScalar(.5),V=$3Dmol.CC.color(V),A=$3Dmol.CC.color(Q),$3Dmol.GLDraw.drawCylinder(u,\nJ,l,W,V,2,0),$3Dmol.GLDraw.drawCylinder(u,l,L,W,A,0,2);J=L;V=Q}}else{if(L&&\"C\"===L.elem&&\"CA\"===L.atom||N&&(\"P\"===L.atom||0==L.atom.indexOf(\"O5\"))){if(U)if(\"tube end\"===L.ss){var U=!1;A=new $3Dmol.Vector3(L.x,L.y,L.z);$3Dmol.GLDraw.drawCylinder(u,ca,A,2,$3Dmol.CC.color(V),1,1);L.ss=\"h\"}else if(J.chain!=L.chain||\"tube end\"===J.ss)U=!1,J.ss=\"h\",A=new $3Dmol.Vector3(J.x,J.y,J.z),$3Dmol.GLDraw.drawCylinder(u,ca,A,2,$3Dmol.CC.color(V),1,1);else continue;if(J&&(!h(J,L)||\"tube start\"===J.ss)){if(\"tube start\"===\nJ.ss){U=!0;var ca=new $3Dmol.Vector3(J.x,J.y,J.z);J.ss=\"h\"}if(S){A=B?(new $3Dmol.Vector3).addVectors(J,B).multiplyScalar(.5):new $3Dmol.Vector3(J.x,J.y,J.z);$3Dmol.GLDraw.drawCylinder(u,A,S,.4,$3Dmol.CC.color(S.color),0,2);m(z,w,!x,B,aa,Y,J,E,F);C.push(Q);var S=A=null}for(A=0;!W&&A<w;A++)c(b,z[A],1,C,R,D);f&&0<z[0].length&&d(G,z,C,R,W,D,z.style);z=[];for(A=0;A<w;A++)z[A]=[];C=[]}if(void 0===J||J.rescode!=L.rescode||J.resi!=L.resi){S&&(A=(new $3Dmol.Vector3).addVectors(J,L).multiplyScalar(.5),J=A.clone().sub(S).multiplyScalar(.02),\nA.add(J),$3Dmol.GLDraw.drawCylinder(u,A,S,.4,$3Dmol.CC.color(S.color),0,2),S=A=null);Q=H(L,l);C.push(Q);W=$.isNumeric(l.thickness)?l.thickness:.4;J=L;var O=new $3Dmol.Vector3(J.x,J.y,J.z);O.resi=J.resi;V=Q}!0!==L.clickable&&!0!==L.hoverable||void 0!==L.intersectionShape&&void 0!==L.intersectionShape.triangle||(L.intersectionShape={sphere:null,cylinder:[],line:[],triangle:[]})}else if(J&&\"C\"===J.elem&&\"CA\"===J.atom&&\"O\"===L.atom||N&&\"P\"===J.atom&&(\"OP2\"===L.atom||\"O2P\"===L.atom)||N&&0==J.atom.indexOf(\"O5\")&&\n0==L.atom.indexOf(\"C5\")){var Z=new $3Dmol.Vector3(L.x,L.y,L.z);Z.resi=L.resi;if(\"OP2\"===L.atom||\"O2P\"===L.atom)var aa=new $3Dmol.Vector3(L.x,L.y,L.z)}else if(N&&0==L.atom.indexOf(\"O3\"))var B=new $3Dmol.Vector3(L.x,L.y,L.z);else if(\"N1\"===L.atom&&A in g||\"N3\"===L.atom&&A in q)S=new $3Dmol.Vector3(L.x,L.y,L.z),S.color=$3Dmol.getColorFromStyle(L,l).getHex();if(Z&&O&&Z.resi===O.resi){m(z,w,!x,O,Z,Y,J,E,F);var Y=Z;Z=O=null;C.push(Q)}}S&&(A=B?(new $3Dmol.Vector3).addVectors(J,B).multiplyScalar(.5):new $3Dmol.Vector3(J.x,\nJ.y,J.z),$3Dmol.GLDraw.drawCylinder(u,A,S,.4,$3Dmol.CC.color(S.color),0,2),m(z,w,!x,B,aa,Y,J,E,F),C.push(Q));n()},m=function(b,c,d,g,m,w,e,h,p){if(g&&m&&e){var n=m.sub(g);n.normalize();var l=h[p];for(p+=1;p<h.length&&(l=h[p],l.atom!=e.atom);p++);l=l?new $3Dmol.Vector3(l.x,l.y,l.z):new $3Dmol.Vector3(0,0,0);l.sub(g);\"arrow start\"===e.ss&&(p=l.clone().multiplyScalar(.3).cross(m),g.add(p),p=l.clone().cross(n).normalize(),n.rotateAboutVector(p,.43));if(e.style.cartoon.ribbon)p=e.style.cartoon.thickness||\n.4;else if(e.style.cartoon.width)p=e.style.cartoon.width;else if(\"c\"===e.ss)p=\"P\"===e.atom?.8:.5;else if(\"arrow start\"===e.ss){p=1.3;var f=!0}else p=\"arrow end\"===e.ss?.5:\"h\"===e.ss&&e.style.cartoon.tubes||\"tube start\"===e.ss?.5:1.3;null!=w&&0>n.dot(w)&&n.negate();n.multiplyScalar(p);for(p=0;p<c;p++)w=-1+2*p/(c-1),w=new $3Dmol.Vector3(g.x+w*n.x,g.y+w*n.y,g.z+w*n.z),w.atom=e,d&&\"s\"===e.ss&&(w.smoothen=!0),b[p].push(w);if(f)for(n.multiplyScalar(2),p=0;p<c;p++)w=-1+2*p/(c-1),w=new $3Dmol.Vector3(g.x+\nw*n.x,g.y+w*n.y,g.z+w*n.z),w.atom=e,w.smoothen=!1,w.skip=!0,b[p].push(w);c=e.style.cartoon.style||\"default\";b.style?b.style!=c&&(console.log(\"Warning: a cartoon chain's strand-style is ambiguous\"),b.style=\"default\"):b.style=c;if(\"arrow start\"===e.ss||\"arrow end\"===e.ss)e.ss=\"s\";return f}};return function(b,c,d,g){g=g||5;u(b,c,d,!0,!1,g,g)}}();$3Dmol=$3Dmol||{};$3Dmol.CAP={NONE:0,FLAT:1,ROUND:2};\n$3Dmol.GLDraw=function(){var b={},c=function(){var b=new $3Dmol.Vector3;return function(c){b.set(c[0],c[1],c[2]);var d=b.x,g=b.y,m=b.z,l=Math.sqrt(d*d+g*g);1E-4>l?(c=0,l=1):(c=-d/l,l=g/l);g=-c*d+l*g;d=Math.sqrt(g*g+m*m);1E-4>d?(m=0,g=1):(m/=d,g/=d);d=new Float32Array(9);d[0]=l;d[1]=c;d[2]=0;d[3]=-c*g;d[4]=l*g;d[5]=m;d[6]=c*m;d[7]=-l*m;d[8]=g;return d}}(),d=function(){var b=[],c=Math.pow(2,4),d,e=Math.pow(2,2),m=c/e,l;b[0]=new $3Dmol.Vector3(-1,0,0);b[m]=new $3Dmol.Vector3(0,0,1);b[2*m]=new $3Dmol.Vector3(1,\n0,0);b[3*m]=new $3Dmol.Vector3(0,0,-1);for(d=3;4>=d;d++){e=Math.pow(2,d-1);m=c/e;for(l=0;l<e-1;l++)b[m/2+l*m]=b[l*m].clone().add(b[(l+1)*m]).normalize();l=e-1;b[m/2+l*m]=b[l*m].clone().add(b[0]).normalize()}return b}(),h={cache:{},getVerticesForRadius:function(b,c,e){if(void 0!==this.cache[b]&&void 0!==this.cache[b][c+e])return this.cache[b][c+e];new $3Dmol.Vector3(0,1,0);for(var g=d.length,m=[],l=[],n,y=0;y<g;y++)m.push(d[y].clone().multiplyScalar(b)),m.push(d[y].clone().multiplyScalar(b)),n=d[y].clone().normalize(),\nl.push(n),l.push(n);y=[];var f=2*Math.PI,x=Math.PI,w,h;for(h=0;10>=h;h++){var p=0===h||10===h?!0:!1;var q=5===h?!0:!1;var t=[],G=[];for(w=0;w<=g;w++)if(q){var C=w<g?2*w:0;G.push(C+1);t.push(C)}else{n=w/g;var z=h/10;p&&0!==w?p&&t.push(m.length-1):w<g?(C=new $3Dmol.Vector3,C.x=-b*Math.cos(0+n*f)*Math.sin(0+z*x),C.y=1==c?0:b*Math.cos(0+z*x),C.z=b*Math.sin(0+n*f)*Math.sin(0+z*x),1E-5>Math.abs(C.x)&&(C.x=0),1E-5>Math.abs(C.y)&&(C.y=0),1E-5>Math.abs(C.z)&&(C.z=0),n=c==$3Dmol.CAP.FLAT?new $3Dmol.Vector3(0,\nMath.cos(0+z*x),0):new $3Dmol.Vector3(C.x,C.y,C.z),n.normalize(),m.push(C),l.push(n),t.push(m.length-1)):t.push(m.length-g)}q&&y.push(G);y.push(t)}g={vertices:m,normals:l,verticesRows:y,w:g,h:10};b in this.cache||(this.cache[b]={});return this.cache[b][c+e]=g}},e=0;b.drawCylinder=function(b,d,p,t,m,l,n){if(d&&p){e++;var g=n||l;m=m||{r:0,g:0,b:0};var f=[p.x,p.y,p.z];f[0]-=d.x;f[1]-=d.y;f[2]-=d.z;f=c(f);var x=h.getVerticesForRadius(t,n,\"to\"),w=x.w,q=x.h,P=g?q*w+2:2*w;b=b.updateGeoGroup(P);var A=x.vertices,\nu=x.normals;x=x.verticesRows;var G=x[q/2],C=x[q/2+1],z=b.vertices,D,I=b.vertexArray,K=b.normalArray,H=b.colorArray,N=b.faceArray;for(D=0;D<w;++D){var E=2*D;var L=f[0]*A[E].x+f[3]*A[E].y+f[6]*A[E].z;var M=f[1]*A[E].x+f[4]*A[E].y+f[7]*A[E].z;var F=f[5]*A[E].y+f[8]*A[E].z;var J=3*(z+E);E=b.faceidx;I[J]=L+d.x;I[J+1]=M+d.y;I[J+2]=F+d.z;I[J+3]=L+p.x;I[J+4]=M+p.y;I[J+5]=F+p.z;K[J]=L;K[J+3]=L;K[J+1]=M;K[J+4]=M;K[J+2]=F;K[J+5]=F;H[J]=m.r;H[J+3]=m.r;H[J+1]=m.g;H[J+4]=m.g;H[J+2]=m.b;H[J+5]=m.b;N[E]=C[D]+z;N[E+\n1]=C[D+1]+z;N[E+2]=G[D]+z;N[E+3]=G[D]+z;N[E+4]=C[D+1]+z;N[E+5]=G[D+1]+z;b.faceidx+=6}if(g)for(g=l?q+1:q/2+1,M=n?0:q/2;M<g;M++)if(M!==q/2)for(G=M<=q/2?p:d,L=h.getVerticesForRadius(t,n,\"to\"),E=h.getVerticesForRadius(t,l,\"from\"),G===p?(A=L.vertices,u=L.normals,x=L.verticesRows):G==d&&(A=E.vertices,u=E.normals,x=E.verticesRows),L=0;L<w;L++){E=b.faceidx;C=x[M][L+1];var Q=3*(C+z);D=x[M][L];var W=3*(D+z);F=x[M+1][L];var V=3*(F+z);J=x[M+1][L+1];var U=3*(J+z);var ca=f[0]*A[C].x+f[3]*A[C].y+f[6]*A[C].z;var S=\nf[0]*A[D].x+f[3]*A[D].y+f[6]*A[D].z;var O=f[0]*A[F].x+f[3]*A[F].y+f[6]*A[F].z;var Z=f[0]*A[J].x+f[3]*A[J].y+f[6]*A[J].z;var aa=f[1]*A[C].x+f[4]*A[C].y+f[7]*A[C].z;var B=f[1]*A[D].x+f[4]*A[D].y+f[7]*A[D].z;var Y=f[1]*A[F].x+f[4]*A[F].y+f[7]*A[F].z;var X=f[1]*A[J].x+f[4]*A[J].y+f[7]*A[J].z;var da=f[5]*A[C].y+f[8]*A[C].z;var ma=f[5]*A[D].y+f[8]*A[D].z;var qa=f[5]*A[F].y+f[8]*A[F].z;var ha=f[5]*A[J].y+f[8]*A[J].z;I[Q]=ca+G.x;I[W]=S+G.x;I[V]=O+G.x;I[U]=Z+G.x;I[Q+1]=aa+G.y;I[W+1]=B+G.y;I[V+1]=Y+G.y;I[U+\n1]=X+G.y;I[Q+2]=da+G.z;I[W+2]=ma+G.z;I[V+2]=qa+G.z;I[U+2]=ha+G.z;H[Q]=m.r;H[W]=m.r;H[V]=m.r;H[U]=m.r;H[Q+1]=m.g;H[W+1]=m.g;H[V+1]=m.g;H[U+1]=m.g;H[Q+2]=m.b;H[W+2]=m.b;H[V+2]=m.b;H[U+2]=m.b;ca=f[0]*u[C].x+f[3]*u[C].y+f[6]*u[C].z;S=f[0]*u[D].x+f[3]*u[D].y+f[6]*u[D].z;O=f[0]*u[F].x+f[3]*u[F].y+f[6]*u[F].z;Z=f[0]*u[J].x+f[3]*u[J].y+f[6]*u[J].z;aa=f[1]*u[C].x+f[4]*u[C].y+f[7]*u[C].z;B=f[1]*u[D].x+f[4]*u[D].y+f[7]*u[D].z;Y=f[1]*u[F].x+f[4]*u[F].y+f[7]*u[F].z;X=f[1]*u[J].x+f[4]*u[J].y+f[7]*u[J].z;da=f[5]*\nu[C].y+f[8]*u[C].z;ma=f[5]*u[D].y+f[8]*u[D].z;qa=f[5]*u[F].y+f[8]*u[F].z;ha=f[5]*u[J].y+f[8]*u[J].z;0===M?(K[Q]=ca,K[V]=O,K[U]=Z,K[Q+1]=aa,K[V+1]=Y,K[U+1]=X,K[Q+2]=da,K[V+2]=qa,K[U+2]=ha,N[E]=C+z,N[E+1]=F+z,N[E+2]=J+z,b.faceidx+=3):M===g-1?(K[Q]=ca,K[W]=S,K[V]=O,K[Q+1]=aa,K[W+1]=B,K[V+1]=Y,K[Q+2]=da,K[W+2]=ma,K[V+2]=qa,N[E]=C+z,N[E+1]=D+z,N[E+2]=F+z,b.faceidx+=3):(K[Q]=ca,K[W]=S,K[U]=Z,K[Q+1]=aa,K[W+1]=B,K[U+1]=X,K[Q+2]=da,K[W+2]=ma,K[U+2]=ha,K[W]=S,K[V]=O,K[U]=Z,K[W+1]=B,K[V+1]=Y,K[U+1]=X,K[W+2]=\nma,K[V+2]=qa,K[U+2]=ha,N[E]=C+z,N[E+1]=D+z,N[E+2]=J+z,N[E+3]=D+z,N[E+4]=F+z,N[E+5]=J+z,b.faceidx+=6)}b.vertices+=P}};b.drawCone=function(b,e,h,t,m){if(e&&h){console.log(e);console.log(h);m=m||{r:0,g:0,b:0};var l=[h.x,h.y,h.z];l.x-=e.x;l.y-=e.y;l.z-=e.z;var n=c(l),g=d.length;b=b.updateGeoGroup(g+2);var f=b.vertices,x=b.vertexArray,w=b.normalArray,p=b.colorArray,q=b.faceArray;var A=3*f;l=(new $3Dmol.Vector3(l[0],l[1],l[2])).normalize();x[A]=e.x;x[A+1]=e.y;x[A+2]=e.z;w[A]=-l.x;w[A+1]=-l.y;w[A+2]=-l.z;\np[A]=m.r;p[A+1]=m.g;p[A+2]=m.b;x[A+3]=h.x;x[A+4]=h.y;x[A+5]=h.z;w[A+3]=l.x;w[A+4]=l.y;w[A+5]=l.z;p[A+3]=m.r;p[A+4]=m.g;p[A+5]=m.b;A+=6;for(h=0;h<g;++h){var u=d[h].clone();u.multiplyScalar(t);l=n[0]*u.x+n[3]*u.y+n[6]*u.z;var G=n[1]*u.x+n[4]*u.y+n[7]*u.z;u=n[5]*u.y+n[8]*u.z;x[A]=l+e.x;x[A+1]=G+e.y;x[A+2]=u+e.z;w[A]=l;w[A+1]=G;w[A+2]=u;p[A]=m.r;p[A+1]=m.g;p[A+2]=m.b;A+=3}b.vertices+=g+2;e=b.faceidx;for(h=0;h<g;h++)t=f+2+h,m=f+2+(h+1)%g,q[e]=t,q[e+1]=m,q[e+2]=f,e+=3,q[e]=t,q[e+1]=m,q[e+2]=f+1,e+=3;b.faceidx+=\n6*g}};var t={cache:{},getVerticesForRadius:function(b){if(\"undefined\"!==typeof this.cache[b])return this.cache[b];var c={vertices:[],verticesRows:[],normals:[]},d=16,g=10;1>b&&(d=10,g=8);var e=2*Math.PI,l=Math.PI,n,y;for(y=0;y<=g;y++){var f=[];for(n=0;n<=d;n++){var x=n/d,w=y/g,h={};h.x=-b*Math.cos(0+x*e)*Math.sin(0+w*l);h.y=b*Math.cos(0+w*l);h.z=b*Math.sin(0+x*e)*Math.sin(0+w*l);x=new $3Dmol.Vector3(h.x,h.y,h.z);x.normalize();c.vertices.push(h);c.normals.push(x);f.push(c.vertices.length-1)}c.verticesRows.push(f)}return this.cache[b]=\nc}};b.drawSphere=function(b,c,d,e){new $3Dmol.Vector3(c.x,c.y,c.z);var g=t.getVerticesForRadius(d),l=g.vertices,n=g.normals;b=b.updateGeoGroup(l.length);for(var h=b.vertices,f=b.vertexArray,x=b.colorArray,w=b.faceArray,p=b.lineArray,q=b.normalArray,A=0,u=l.length;A<u;++A){var G=3*(h+A),C=l[A];f[G]=C.x+c.x;f[G+1]=C.y+c.y;f[G+2]=C.z+c.z;x[G]=e.r;x[G+1]=e.g;x[G+2]=e.b}b.vertices+=l.length;g=g.verticesRows;f=g.length-1;for(e=0;e<f;e++)for(x=g[e].length-1,c=0;c<x;c++){A=b.faceidx;u=b.lineidx;G=g[e][c+\n1]+h;C=3*G;var z=g[e][c]+h,D=3*z,I=g[e+1][c]+h,K=3*I,H=g[e+1][c+1]+h,N=3*H,E=n[G-h],L=n[z-h],M=n[I-h],F=n[H-h];Math.abs(l[G-h].y)===d?(q[C]=E.x,q[K]=M.x,q[N]=F.x,q[C+1]=E.y,q[K+1]=M.y,q[N+1]=F.y,q[C+2]=E.z,q[K+2]=M.z,q[N+2]=F.z,w[A]=G,w[A+1]=I,w[A+2]=H,p[u]=G,p[u+1]=I,p[u+2]=G,p[u+3]=H,p[u+4]=I,p[u+5]=H,b.faceidx+=3,b.lineidx+=6):Math.abs(l[I-h].y)===d?(q[C]=E.x,q[D]=L.x,q[K]=M.x,q[C+1]=E.y,q[D+1]=L.y,q[K+1]=M.y,q[C+2]=E.z,q[D+2]=L.z,q[K+2]=M.z,w[A]=G,w[A+1]=z,w[A+2]=I,p[u]=G,p[u+1]=z,p[u+2]=G,p[u+\n3]=I,p[u+4]=z,p[u+5]=I,b.faceidx+=3,b.lineidx+=6):(q[C]=E.x,q[D]=L.x,q[N]=F.x,q[C+1]=E.y,q[D+1]=L.y,q[N+1]=F.y,q[C+2]=E.z,q[D+2]=L.z,q[N+2]=F.z,q[D]=L.x,q[K]=M.x,q[N]=F.x,q[D+1]=L.y,q[K+1]=M.y,q[N+1]=F.y,q[D+2]=L.z,q[K+2]=M.z,q[N+2]=F.z,w[A]=G,w[A+1]=z,w[A+2]=H,w[A+3]=z,w[A+4]=I,w[A+5]=H,p[u]=G,p[u+1]=z,p[u+2]=G,p[u+3]=H,p[u+4]=z,p[u+5]=I,p[u+6]=I,p[u+7]=H,b.faceidx+=6,b.lineidx+=8)}};return b}();$3Dmol=$3Dmol||{};\n$3Dmol.GLModel=function(){function b(e,h){var g=[],q=[],p=null,t=null,m=!1,l=null,n=null,y=null,f={},x=new $3Dmol.Matrix4,w=!0,R=$3Dmol.elementColors.defaultColor;h=h?h:{};var P=h.defaultcolors?h.defaultcolors:$3Dmol.elementColors.defaultColors,A=h.defaultSphereRadius?h.defaultSphereRadius:1.5,T=h.cartoonQuality?h.cartoonQuality:5,G=function(b,c){var n=A;\"undefined\"!=typeof c.radius?n=c.radius:d[b.elem]&&(n=d[b.elem]);\"undefined\"!=typeof c.scale&&(n*=c.scale);return n},C=function(b,c,d){var n=function(b,\nc){for(var d=null,n=-1,y=0,p=b.bonds.length;y<p;y++)if(b.bonds[y]!=c.index){m=b.bonds[y];x=g[m];h=new $3Dmol.Vector3(x.x,x.y,x.z);w=h.clone();w.sub(l);e=w.clone();e.cross(f);var J=e.lengthSq();if(J>n&&(n=J,d=e,.1<n))break}return d},l=new $3Dmol.Vector3(b.x,b.y,b.z),f=(new $3Dmol.Vector3(c.x,c.y,c.z)).clone(),e=null;f.sub(l);if(1===b.bonds.length)if(1===c.bonds.length)e=f.clone(),1E-4<Math.abs(e.x)?e.y+=1:e.x+=1;else{b=(d+1)%c.bonds.length;var m=c.bonds[b];var x=g[m];var h=new $3Dmol.Vector3(x.x,x.y,\nx.z);var w=h.clone();w.sub(l);e=w.clone();e.cross(f)}else e=n(b,c),.01>e.lengthSq()&&(c=n(c,b),null!=c&&(e=c));.01>e.lengthSq()&&(e=f.clone(),1E-4<Math.abs(e.x)?e.y+=1:e.x+=1);e.cross(f);e.normalize();return e},z=function(b,c,d,n,l,f){b[d]=n.x;b[d+1]=n.y;b[d+2]=n.z;c[d]=f.r;c[d+1]=f.g;c[d+2]=f.b;b[d+3]=l.x;b[d+4]=l.y;b[d+5]=l.z;c[d+3]=f.r;c[d+4]=f.g;c[d+5]=f.b},D=function(b,c){if(b.style.sphere){var d=b.style.sphere;if(!d.hidden){var n=$3Dmol.getColorFromStyle(b,d);d=G(b,d);if((!0===b.clickable||\nb.hoverable)&&void 0!==b.intersectionShape){var l=new $3Dmol.Vector3(b.x,b.y,b.z);b.intersectionShape.sphere.push(new $3Dmol.Sphere(l,d))}$3Dmol.GLDraw.drawSphere(c,b,d,n)}}},I=function(b,c){if(b.style.sphere){var d=b.style.sphere;if(!d.hidden){var n=G(b,d);d=$3Dmol.getColorFromStyle(b,d);c=c.updateGeoGroup(1);var l=c.vertices,f=3*l,e=c.vertexArray,g=c.radiusArray;e[f]=b.x;e[f+1]=b.y;e[f+2]=b.z;e=c.colorArray;e[f]=d.r;e[f+1]=d.g;e[f+2]=d.b;g[l]=n;!0!==b.clickable&&!b.hoverable||void 0===b.intersectionShape||\n(d=new $3Dmol.Vector3(b.x,b.y,b.z),b.intersectionShape.sphere.push(new $3Dmol.Sphere(d,n)));c.vertices+=1}}},K=function(b,c,d,n){b=b.updateGeoGroup(4);for(var l=b.vertices,f=3*l,e=b.vertexArray,g=0;4>g;g++)e[f+3*g]=c.x,e[f+3*g+1]=c.y,e[f+3*g+2]=c.z;e=b.normalArray;c=b.colorArray;for(g=0;4>g;g++)c[f+3*g]=n.r,c[f+3*g+1]=n.g,c[f+3*g+2]=n.b;e[f+0]=-d;e[f+1]=d;e[f+2]=0;e[f+3]=-d;e[f+4]=-d;e[f+5]=0;e[f+6]=d;e[f+7]=-d;e[f+8]=0;e[f+9]=d;e[f+10]=d;e[f+11]=0;b.vertices+=4;d=b.faceArray;n=b.faceidx;d[n+0]=l;\nd[n+1]=l+1;d[n+2]=l+2;d[n+3]=l+2;d[n+4]=l+3;d[n+5]=l;b.faceidx+=6},H=function(b,c){if(b.style.sphere){var d=b.style.sphere;if(!d.hidden){var n=G(b,d);d=$3Dmol.getColorFromStyle(b,d);if((!0===b.clickable||b.hoverable)&&void 0!==b.intersectionShape){var l=new $3Dmol.Vector3(b.x,b.y,b.z);b.intersectionShape.sphere.push(new $3Dmol.Sphere(l,n))}K(c,b,n,d)}}},N=function(b,c,d,n,l,f,e){b=b.updateGeoGroup(4);f=b.vertices;e=b.vertexArray;var g=b.colorArray,m=b.radiusArray,x=b.normalArray,w=l.r,h=l.g;l=l.b;\nfor(var y=3*f,p=0;4>p;p++){e[y]=c.x;x[y]=d.x;g[y]=w;y++;e[y]=c.y;x[y]=d.y;g[y]=h;y++;e[y]=c.z;x[y]=d.z;if(2>p)g[y]=l;else{var q=y,A=-l;0==A&&(A=-1E-4);g[q]=A}y++}b.vertices+=4;m[f]=-n;m[f+1]=n;m[f+2]=-n;m[f+3]=n;c=b.faceArray;d=b.faceidx;c[d+0]=f;c[d+1]=f+1;c[d+2]=f+2;c[d+3]=f+2;c[d+4]=f+3;c[d+5]=f;b.faceidx+=6};this.getCrystData=function(){return f.cryst?f.cryst:null};this.getSymmetries=function(){\"undefined\"==typeof f.symmetries&&(f.symmetries=[x]);return f.symmetries};this.setSymmetries=function(b){f.symmetries=\n\"undefined\"==typeof b?[x]:b};this.getID=function(){return e};this.getNumFrames=function(){return void 0!=q.numFrames?q.numFrames:q.length};var E=function(b,c,d,n){b=c-b;return b<-d?c+n:b>d?c-n:c};this.setFrame=function(b){var c=this.getNumFrames();return new Promise(function(d,n){0==c&&d();if(0>b||b>=c)b=c-1;void 0!=q.url?$3Dmol.getbin(q.url+\"/traj/frame/\"+b+\"/\"+q.path,null,\"POST\").then(function(b){b=new Float32Array(b,44);for(var c=0,n=0;n<g.length;n++)g[n].x=b[c++],g[n].y=b[c++],g[n].z=b[c++];if(p&&\nt&&p&&t){b=p[0];c=p[1];n=p[2];for(var l=.9*b,f=.9*c,e=.9*n,m=0;m<t.length;m++)for(var x=t[m],w=1;w<x.length;w++){var h=g[x[w][0]],y=g[x[w][1]];h.x=E(y.x,h.x,l,b);h.y=E(y.y,h.y,f,c);h.z=E(y.z,h.z,e,n)}}d()}).catch(n):(g=q[b],d());l=null})};this.addFrame=function(b){q.push(b)};this.vibrate=function(b,c){c=c||1;b=b||10;b--;for(var d=1;d<=b;d++){for(var n=[],l=0;l<g.length;l++){var f=new $3Dmol.Vector3($3Dmol.getAtomProperty(g[l],\"dx\"),$3Dmol.getAtomProperty(g[l],\"dy\"),$3Dmol.getAtomProperty(g[l],\"dz\")),\ne=new $3Dmol.Vector3(g[l].x,g[l].y,g[l].z);f.multiplyScalar(d*c/b);e.add(f);f={};for(var m in g[l])f[m]=g[l][m];f.x=e.x;f.y=e.y;f.z=e.z;n.push(f)}q.push(n)}q.unshift(g)};this.setAtomDefaults=function(b){for(var d=0;d<b.length;d++){var n=b[d];n&&(n.style=n.style||c,n.color=n.color||P[n.elem]||R,n.model=e,n.clickable||n.hoverable)&&(n.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]})}};this.addMolData=function(b,c,d){d=d||{};b=$3Dmol.GLModel.parseMolData(b,c,d);w=!d.duplicateAssemblyAtoms;\n(c=b.modelData)&&(f=Array.isArray(c)?c[0]:c);p=b.box?b.box:null;if(0==q.length){for(c=0;c<b.length;c++)0!=b[c].length&&q.push(b[c]);q[0]&&(g=q[0])}else if(d.frames)for(c=0;c<b.length;c++)q.push(b[c]);else for(c=0;c<b.length;c++)this.addAtoms(b[c]);for(c=0;c<q.length;c++)this.setAtomDefaults(q[c],e);d.vibrate&&d.vibrate.frames&&d.vibrate.amplitude&&this.vibrate(d.vibrate.frames,d.vibrate.amplitude);d.style&&this.setStyle({},d.style)};this.setDontDuplicateAtoms=function(b){w=b};this.setModelData=function(b){f=\nb};var L=function(b,c){if(b==c)return!0;if(\"string\"==typeof c&&\"number\"==typeof b&&(c=c.match(/(-?\\d+)\\s*-\\s*(-?\\d+)/))){var d=parseInt(c[1]),n=parseInt(c[2]);if(c&&b>=d&&b<=n)return!0}return!1};this.atomIsSelected=function(b,c){var d;if(\"undefined\"===typeof c)return!0;var n=!!c.invert,l=!0,f;for(f in c)if(\"and\"==f||\"or\"==f||\"not\"==f)if(\"not\"==f){if(this.atomIsSelected(b,c[f])){l=!1;break}}else if(\"and\"==f){var e=c[f];for(d=0;d<e.length;d++)if(!this.atomIsSelected(b,e[d])){l=!1;break}}else{if(\"or\"==\nf){l=c[f];e=!0;for(d=0;d<l.length;d++)if(this.atomIsSelected(b,l[d])){e=!0;break}else e=!1;l=e}}else if(\"predicate\"===f){if(!c.predicate(b)){l=!1;break}}else if(\"properties\"==f&&b[f])for(var g in c.properties){if(\"undefined\"===typeof b.properties[g]){l=!1;break}if(b.properties[g]!=c.properties[g]){l=!1;break}}else if(c.hasOwnProperty(f)&&\"props\"!=f&&\"invert\"!=f&&\"model\"!=f&&\"byres\"!=f&&\"expand\"!=f&&\"within\"!=f&&\"and\"!=f&&\"or\"!=f&&\"not\"!=f){if(\"undefined\"===typeof b[f]){l=!1;break}e=!1;if(\"bonds\"===\nf){if(d=c[f],d!=b.bonds.length){l=!1;break}}else if($.isArray(c[f])){var m=c[f],x=b[f];for(d=0;d<m.length;d++)if(L(x,m[d])){e=!0;break}if(!e){l=!1;break}}else if(d=c[f],!L(b[f],d)){l=!1;break}}return n?!l:l};this.selectedAtoms=function(b,c){var d,n=[];b=b||{};c||(c=g);for(var l=c.length,f=0;f<l;f++)(d=c[f])&&this.atomIsSelected(d,b)&&n.push(d);if(b.hasOwnProperty(\"expand\")){l=parseFloat(b.expand);if(0>=l)l=n;else{f=$3Dmol.getExtent(n);d=[[],[],[]];for(c=0;3>c;c++)d[0][c]=f[0][c]-l,d[1][c]=f[1][c]+\nl,d[2][c]=f[2][c];l=[];for(c=0;c<g.length;c++){var e=g[c].x,m=g[c].y,x=g[c].z;e>=d[0][0]&&e<=d[1][0]&&m>=d[0][1]&&m<=d[1][1]&&x>=d[0][2]&&x<=d[1][2]&&(e>=f[0][0]&&e<=f[1][0]&&m>=f[0][1]&&m<=f[1][1]&&x>=f[0][2]&&x<=f[1][2]||l.push(g[c]))}}e=n.length;for(f=0;f<l.length;f++)for(var h=0;h<e;h++)c=M(l[f],n[h]),d=Math.pow(b.expand,2),c<d&&0<c&&n.push(l[f])}if(b.hasOwnProperty(\"within\")&&b.within.hasOwnProperty(\"sel\")&&b.within.hasOwnProperty(\"distance\")){e=this.selectedAtoms(b.within.sel,g);l={};for(f=\n0;f<e.length;f++)for(h=0;h<n.length;h++)c=M(e[f],n[h]),d=Math.pow(parseFloat(b.within.distance),2),c<d&&0<c&&(l[h]=1);f=[];if(b.within.invert)for(h=0;h<n.length;h++)l[h]||f.push(n[h]);else for(h in l)f.push(n[h]);n=f}if(b.hasOwnProperty(\"byres\"))for(b={},c=[],l=[],f=0;f<n.length;f++)if(d=n[f],e=d.chain,m=d.resi,void 0===b[e]&&(b[e]={}),d.hasOwnProperty(\"resi\")&&void 0===b[e][m])for(b[e][m]=!0,l.push(d);0<l.length;)if(d=l.pop(),e=d.chain,m=d.resi,void 0===c[d.index])for(c[d.index]=!0,h=0;h<d.bonds.length;h++)x=\ng[d.bonds[h]],void 0===c[x.index]&&x.hasOwnProperty(\"resi\")&&x.chain==e&&x.resi==m&&(l.push(x),n.push(x));return n};var M=function(b,c){return Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2)+Math.pow(c.z-b.z,2)};this.addAtoms=function(b){l=null;var d=g.length,n=[],f;for(f=0;f<b.length;f++)\"undefined\"==typeof b[f].index&&(b[f].index=f),\"undefined\"==typeof b[f].serial&&(b[f].serial=f),n[b[f].index]=d+f;for(f=0;f<b.length;f++){d=b[f];var m=n[d.index],x=$.extend(!1,{},d);x.index=m;x.bonds=[];x.bondOrder=[];x.model=\ne;x.style=x.style||c;\"undefined\"==typeof x.color&&(x.color=P[x.elem]||R);m=d.bonds?d.bonds.length:0;for(var h=0;h<m;h++){var w=n[d.bonds[h]];\"undefined\"!=typeof w&&(x.bonds.push(w),x.bondOrder.push(d.bondOrder?d.bondOrder[h]:1))}g.push(x)}};this.removeAtoms=function(b){l=null;var c=[],d;for(d=0;d<b.length;d++)c[b[d].index]=!0;b=[];for(d=0;d<g.length;d++){var n=g[d];c[n.index]||b.push(n)}g=[];this.addAtoms(b)};this.setStyle=function(c,d,n){\"undefined\"===typeof d&&\"undefined\"==typeof n&&(d=c,c={});\nfor(var f in c)b.validAtomSelectionSpecs.hasOwnProperty(f)||console.log(\"Unknown selector \"+f);for(f in d)b.validAtomStyleSpecs.hasOwnProperty(f)||console.log(\"Unknown style \"+f);var e=!1,m=function(b){for(var l=x.selectedAtoms(c,b),g=0;g<b.length;g++)b[g]&&(b[g].capDrawn=!1);for(g=0;g<l.length;g++){e=!0;if(l[g].clickable||l[g].hoverable)l[g].intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]};n||(l[g].style={});for(f in d)if(d.hasOwnProperty(f)){l[g].style[f]=l[g].style[f]||{};for(var m in d[f])l[g].style[f][m]=\nd[f][m]}}},x=this;m(g);for(var h=0;h<q.length;h++)q[h]!==g&&m(q[h]);e&&(l=null)};this.setClickable=function(c,d,n){for(var f in c)b.validAtomSelectionSpecs.hasOwnProperty(f)||console.log(\"Unknown selector \"+f);d=!!d;if(n&&\"function\"!=typeof n)console.log(\"Callback is not a function\");else{f=this.selectedAtoms(c,g);var e=f.length;for(c=0;c<e;c++)f[c].intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]},f[c].clickable=d,n&&(f[c].callback=n);0<e&&(l=null)}};this.setHoverable=function(c,d,n,\nf){for(var e in c)b.validAtomSelectionSpecs.hasOwnProperty(e)||console.log(\"Unknown selector \"+e);d=!!d;if(n&&\"function\"!=typeof n)console.log(\"Hover_callback is not a function\");else if(f&&\"function\"!=typeof f)console.log(\"Unhover_callback is not a function\");else{e=this.selectedAtoms(c,g);var m=e.length;for(c=0;c<m;c++)e[c].intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]},e[c].hoverable=d,n&&(e[c].hover_callback=n),f&&(e[c].unhover_callback=f);0<m&&(l=null)}};this.setColorByElement=\nfunction(b,c){var d;if(d=null!==l)d=y,d=c&&d?JSON.stringify(c)==JSON.stringify(d):c==d;if(!d){y=c;var n=this.selectedAtoms(b,n);0<n.length&&(l=null);for(b=0;b<n.length;b++)d=n[b],\"undefined\"!==typeof c[d.elem]&&(d.color=c[d.elem])}};this.setColorByProperty=function(b,c,d,n){var f=this.selectedAtoms(b,f);y=null;0<f.length&&(l=null);\"undefined\"!=typeof $3Dmol.Gradient.builtinGradients[d]&&(d=new $3Dmol.Gradient.builtinGradients[d]);n||(n=d.range());n||(n=$3Dmol.getPropertyRange(f,c));for(b=0;b<f.length;b++){var e=\nf[b];null!=$3Dmol.getAtomProperty(e,c)&&(e.color=d.valueToHex(parseFloat(e.properties[c]),n))}};this.setColorByFunction=function(b,c){var d=this.selectedAtoms(b,d);if(\"function\"===typeof c)for(y=null,0<d.length&&(l=null),i=0;i<d.length;i++)a=d[i],a.color=c(a)};this.toCDObject=function(b){var c={a:[],b:[]};b&&(c.s=[]);for(var d=0;d<g.length;d++){var n={},f=g[d];n.x=f.x;n.y=f.y;n.z=f.z;\"C\"!=f.elem&&(n.l=f.elem);if(b){for(var l=0;l<c.s.length&&JSON.stringify(f.style)!==JSON.stringify(c.s[l]);)l++;l===\nc.s.length&&c.s.push(f.style);0!==l&&(n.s=l)}c.a.push(n);for(n=0;n<f.bonds.length;n++){l=d;var e=f.bonds[n];l>=e||(l={b:l,e:e},e=f.bondOrder[n],1!=e&&(l.o=e),c.b.push(l))}}return c};this.globj=function(b,c){if(null===l){var d=g,e=c;e=e||{};var x=new $3Dmol.Object3D,h=[],y={},p={},q=D;if(e.supportsImposters){q=H;var A=new $3Dmol.Geometry(!0);A.imposter=!0;var t=new $3Dmol.Geometry(!0,!0);t.imposter=!0;t.sphereGeometry=new $3Dmol.Geometry(!0);t.sphereGeometry.imposter=!0;t.drawnCaps={}}else e.supportsAIA?\n(q=I,A=new $3Dmol.Geometry(!1,!0,!0),A.instanced=!0):A=new $3Dmol.Geometry(!0),t=new $3Dmol.Geometry(!0);var u,R,P={},E=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];var J=0;for(R=d.length;J<R;J++){var F=d[J];if(F&&F.style){(F.clickable||F.hoverable)&&void 0===F.intersectionShape&&(F.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]});var L={line:void 0,cross:void 0,stick:void 0,sphere:void 0};for(u in L)L[u]=F.style[u]?F.style[u].opacity?parseFloat(F.style[u].opacity):1:void 0,P[u]?\nvoid 0!=L[u]&&P[u]!=L[u]&&(console.log(\"Warning: \"+u+\" opacity is ambiguous\"),P[u]=1):P[u]=L[u];q(F,A);var Q=F;if(Q.style.clicksphere){var M=Q.style.clicksphere;if(!M.hidden){var Ha=G(Q,M);if((!0===Q.clickable||Q.hoverable)&&void 0!==Q.intersectionShape){var Ia=new $3Dmol.Vector3(Q.x,Q.y,Q.z);Q.intersectionShape.sphere.push(new $3Dmol.Sphere(Ia,Ha))}}}var oa=F,Ja=p;if(oa.style.cross){var ea=oa.style.cross;if(!ea.hidden){var Va=ea.linewidth||1;Ja[Va]||(Ja[Va]=new $3Dmol.Geometry);var kb=Ja[Va].updateGeoGroup(6),\nQa=G(oa,ea),Ba=[[Qa,0,0],[-Qa,0,0],[0,Qa,0],[0,-Qa,0],[0,0,Qa],[0,0,-Qa]],qb=oa.clickable||oa.hoverable;qb&&void 0===oa.intersectionShape&&(oa.intersectionShape={sphere:[],cylinder:[],line:[]});for(var lb=$3Dmol.getColorFromStyle(oa,ea),Wa=kb.vertexArray,db=kb.colorArray,Xa=0;6>Xa;Xa++){var mb=3*kb.vertices;kb.vertices++;Wa[mb]=oa.x+Ba[Xa][0];Wa[mb+1]=oa.y+Ba[Xa][1];Wa[mb+2]=oa.z+Ba[Xa][2];db[mb]=lb.r;db[mb+1]=lb.g;db[mb+2]=lb.b;if(qb){var eb=new $3Dmol.Vector3(Ba[Xa][0],Ba[Xa][1],Ba[Xa][2]);eb.multiplyScalar(.1);\neb.set(eb.x+oa.x,eb.y+oa.y,eb.z+oa.z);oa.intersectionShape.line.push(eb)}}}}var Ya=void 0,Sa=void 0,Ca=void 0,Da=void 0,Ka=void 0,sa=void 0,ia=F,Cb=d,vb=y;if(ia.style.line){var wb=ia.style.line;if(!wb.hidden){var ob=wb.linewidth||1;vb[ob]||(vb[ob]=new $3Dmol.Geometry);for(var ta=vb[ob].updateGeoGroup(6*ia.bonds.length),ka=ta.vertexArray,ua=ta.colorArray,Za=0;Za<ia.bonds.length;Za++){var La=Cb[ia.bonds[Za]];if(La.style.line&&!(ia.serial>=La.serial)){var Ta=new $3Dmol.Vector3(ia.x,ia.y,ia.z),pb=new $3Dmol.Vector3(La.x,\nLa.y,La.z),rb=Ta.clone().add(pb).multiplyScalar(.5),Tb=!1,Ub=ia.clickable||ia.hoverable,Vb=La.clickable||La.hoverable;if(Ub||Vb)Ub&&(void 0===ia.intersectionShape&&(ia.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),ia.intersectionShape.line.push(Ta),ia.intersectionShape.line.push(rb)),Vb&&(void 0===La.intersectionShape&&(La.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),La.intersectionShape.line.push(rb),La.intersectionShape.line.push(pb));var za=$3Dmol.getColorFromStyle(ia,\nia.style.line),$a=$3Dmol.getColorFromStyle(La,La.style.line);if(ia.bondStyles&&ia.bondStyles[Za]){var nb=ia.bondStyles[Za];if(!nb.iswire)continue;nb.radius&&(bondR=nb.radius);nb.singleBond&&(Tb=!0);\"undefined\"!=typeof nb.color1&&(za=$3Dmol.CC.color(nb.color1));\"undefined\"!=typeof nb.color2&&($a=$3Dmol.CC.color(nb.color2))}var va=3*ta.vertices;if(1<ia.bondOrder[Za]&&4>ia.bondOrder[Za]&&!Tb){var sb=C(ia,La,Za),Ua=pb.clone();Ua.sub(Ta);2==ia.bondOrder[Za]?(sb.multiplyScalar(.1),Da=Ta.clone(),Da.add(sb),\nCa=Ta.clone(),Ca.sub(sb),Sa=Da.clone(),Sa.add(Ua),Ya=Ca.clone(),Ya.add(Ua),za==$a?(ta.vertices+=4,z(ka,ua,va,Da,Sa,za),z(ka,ua,va+6,Ca,Ya,za)):(ta.vertices+=8,Ua.multiplyScalar(.5),Ka=Da.clone(),Ka.add(Ua),sa=Ca.clone(),sa.add(Ua),z(ka,ua,va,Da,Ka,za),z(ka,ua,va+6,Ka,Sa,$a),z(ka,ua,va+12,Ca,sa,za),z(ka,ua,va+18,sa,Ya,$a))):3==ia.bondOrder[Za]&&(sb.multiplyScalar(.1),Da=Ta.clone(),Da.add(sb),Ca=Ta.clone(),Ca.sub(sb),Sa=Da.clone(),Sa.add(Ua),Ya=Ca.clone(),Ya.add(Ua),za==$a?(ta.vertices+=6,z(ka,ua,va,\nTa,pb,za),z(ka,ua,va+6,Da,Sa,za),z(ka,ua,va+12,Ca,Ya,za)):(ta.vertices+=12,Ua.multiplyScalar(.5),Ka=Da.clone(),Ka.add(Ua),sa=Ca.clone(),sa.add(Ua),z(ka,ua,va,Ta,rb,za),z(ka,ua,va+6,rb,pb,$a),z(ka,ua,va+12,Da,Ka,za),z(ka,ua,va+18,Ka,Sa,$a),z(ka,ua,va+24,Ca,sa,za),z(ka,ua,va+30,sa,Ya,$a)))}else za==$a?(ta.vertices+=2,z(ka,ua,va,Ta,pb,za)):(ta.vertices+=4,z(ka,ua,va,Ta,rb,za),z(ka,ua,va+6,rb,pb,$a))}}}}var Ma=void 0,pa=void 0,Ea=void 0,fa=void 0,ab=void 0,fb=void 0,gb=void 0,Db=void 0,Eb=void 0,Fb=void 0,\nGb=void 0,tb=void 0,Na=void 0,ba=F,Zb=d,na=t;if(ba.style.stick){var Hb=ba.style.stick;if(!Hb.hidden){var Ib=Hb.radius||.25,Wb=Hb.singleBonds||!1,xb=0,yb=0,wa=$3Dmol.getColorFromStyle(ba,Hb);!ba.capDrawn&&4>ba.bonds.length&&(xb=2);var ra=$3Dmol.GLDraw.drawCylinder;na.imposter&&(ra=N);for(var ya=0;ya<ba.bonds.length;ya++){var la=Zb[ba.bonds[ya]];if(ba.serial<la.serial){var Mb=la.style;if(Mb.stick&&!Mb.stick.hidden){var bb=$3Dmol.getColorFromStyle(la,Mb.stick);Ea=Ib;tb=Wb;if(ba.bondStyles&&ba.bondStyles[ya]){Na=\nba.bondStyles[ya];if(Na.iswire)continue;Na.radius&&(Ea=Na.radius);Na.singleBond&&(tb=!0);\"undefined\"!=typeof Na.color1&&(wa=$3Dmol.CC.color(Na.color1));\"undefined\"!=typeof Na.color2&&(bb=$3Dmol.CC.color(Na.color2))}var Aa=new $3Dmol.Vector3(ba.x,ba.y,ba.z),Ra=new $3Dmol.Vector3(la.x,la.y,la.z);if(1===ba.bondOrder[ya]||tb){if(!la.capDrawn&&4>la.bonds.length&&(yb=2),wa!=bb?(pa=(new $3Dmol.Vector3).addVectors(Aa,Ra).multiplyScalar(.5),ra(na,Aa,pa,Ea,wa,xb,0),ra(na,pa,Ra,Ea,bb,0,yb)):ra(na,Aa,Ra,Ea,wa,\nxb,yb),fb=ba.clickable||ba.hoverable,gb=la.clickable||la.hoverable,fb||gb){pa||(pa=(new $3Dmol.Vector3).addVectors(Aa,Ra).multiplyScalar(.5));if(fb){var $b=new $3Dmol.Cylinder(Aa,pa,Ea),ac=new $3Dmol.Sphere(Aa,Ea);ba.intersectionShape.cylinder.push($b);ba.intersectionShape.sphere.push(ac)}if(gb){var bc=new $3Dmol.Cylinder(Ra,pa,Ea),cc=new $3Dmol.Sphere(Ra,Ea);la.intersectionShape.cylinder.push(bc);la.intersectionShape.sphere.push(cc)}}}else if(1<ba.bondOrder[ya]){var hb=0,ib=0;Ea!=Ib&&(ib=hb=2);var ub=\nRa.clone();ub.sub(Aa);ab=C(ba,la,ya);if(2==ba.bondOrder[ya]){fa=Ea/2.5;ab=C(ba,la,ya);ab.multiplyScalar(1.5*fa);var Fa=Aa.clone();Fa.add(ab);var Ga=Aa.clone();Ga.sub(ab);var Oa=Fa.clone();Oa.add(ub);var Pa=Ga.clone();Pa.add(ub);wa!=bb?(pa=(new $3Dmol.Vector3).addVectors(Fa,Oa).multiplyScalar(.5),Ma=(new $3Dmol.Vector3).addVectors(Ga,Pa).multiplyScalar(.5),ra(na,Fa,pa,fa,wa,hb,0),ra(na,pa,Oa,fa,bb,0,ib),ra(na,Ga,Ma,fa,wa,hb,0),ra(na,Ma,Pa,fa,bb,0,ib)):(ra(na,Fa,Oa,fa,wa,hb,ib),ra(na,Ga,Pa,fa,wa,hb,\nib));fb=ba.clickable||ba.hoverable;gb=la.clickable||la.hoverable;if(fb||gb)pa||(pa=(new $3Dmol.Vector3).addVectors(Fa,Oa).multiplyScalar(.5)),Ma||(Ma=(new $3Dmol.Vector3).addVectors(Ga,Pa).multiplyScalar(.5)),fb&&(Db=new $3Dmol.Cylinder(Fa,pa,fa),Eb=new $3Dmol.Cylinder(Ga,Ma,fa),ba.intersectionShape.cylinder.push(Db),ba.intersectionShape.cylinder.push(Eb)),gb&&(Fb=new $3Dmol.Cylinder(Oa,pa,fa),Gb=new $3Dmol.Cylinder(Pa,Ma,fa),la.intersectionShape.cylinder.push(Fb),la.intersectionShape.cylinder.push(Gb))}else if(3==\nba.bondOrder[ya]&&(fa=Ea/4,ab.cross(ub),ab.normalize(),ab.multiplyScalar(3*fa),Fa=Aa.clone(),Fa.add(ab),Ga=Aa.clone(),Ga.sub(ab),Oa=Fa.clone(),Oa.add(ub),Pa=Ga.clone(),Pa.add(ub),wa!=bb?(pa=(new $3Dmol.Vector3).addVectors(Fa,Oa).multiplyScalar(.5),Ma=(new $3Dmol.Vector3).addVectors(Ga,Pa).multiplyScalar(.5),mp3=(new $3Dmol.Vector3).addVectors(Aa,Ra).multiplyScalar(.5),ra(na,Fa,pa,fa,wa,hb,0),ra(na,pa,Oa,fa,bb,0,ib),ra(na,Aa,mp3,fa,wa,xb,0),ra(na,mp3,Ra,fa,bb,0,yb),ra(na,Ga,Ma,fa,wa,hb,0),ra(na,Ma,\nPa,fa,bb,0,ib)):(ra(na,Fa,Oa,fa,wa,hb,ib),ra(na,Aa,Ra,fa,wa,xb,yb),ra(na,Ga,Pa,fa,wa,hb,ib)),fb=ba.clickable||ba.hoverable,gb=la.clickable||la.hoverable,fb||gb)){pa||(pa=(new $3Dmol.Vector3).addVectors(Fa,Oa).multiplyScalar(.5));Ma||(Ma=(new $3Dmol.Vector3).addVectors(Ga,Pa).multiplyScalar(.5));mp3||(mp3=(new $3Dmol.Vector3).addVectors(Aa,Ra).multiplyScalar(.5));if(fb){Db=new $3Dmol.Cylinder(Fa.clone(),pa.clone(),fa);Eb=new $3Dmol.Cylinder(Ga.clone(),Ma.clone(),fa);var dc=new $3Dmol.Cylinder(Aa.clone(),\nmp3.clone(),fa);ba.intersectionShape.cylinder.push(Db);ba.intersectionShape.cylinder.push(Eb);ba.intersectionShape.cylinder.push(dc)}if(gb){Fb=new $3Dmol.Cylinder(Oa.clone(),pa.clone(),fa);Gb=new $3Dmol.Cylinder(Pa.clone(),Ma.clone(),fa);var ec=new $3Dmol.Cylinder(Ra.clone(),mp3.clone(),fa);la.intersectionShape.cylinder.push(Fb);la.intersectionShape.cylinder.push(Gb);la.intersectionShape.cylinder.push(ec)}}}}}}var Nb=!1,Ob=0,Xb=!1;for(ya=0;ya<ba.bonds.length;ya++)tb=Wb,ba.bondStyles&&ba.bondStyles[ya]&&\n(Na=ba.bondStyles[ya],Na.singleBond&&(tb=!0),Na.radius&&Na.radius!=Ib&&(Xb=!0)),(tb||1==ba.bondOrder[ya])&&Ob++;Xb?0<Ob&&(Nb=!0):0==Ob&&0<ba.bonds.length&&(Nb=!0);Nb&&(Ea=Ib,na.imposter?K(na.sphereGeometry,ba,Ea,wa):$3Dmol.GLDraw.drawSphere(na,ba,Ea,wa))}}\"undefined\"===typeof F.style.cartoon||F.style.cartoon.hidden||(\"spectrum\"!==F.style.cartoon.color||\"number\"!==typeof F.resi||F.hetflag||(F.resi<E[0]&&(E[0]=F.resi),F.resi>E[1]&&(E[1]=F.resi)),h.push(F))}}0<h.length&&$3Dmol.drawCartoon(x,h,E,T);if(A&&\n0<A.vertices){A.initTypedArrays();if(A.imposter)var zb=new $3Dmol.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0});else if(A.instanced){var Ab=new $3Dmol.Geometry(!0);$3Dmol.GLDraw.drawSphere(Ab,{x:0,y:0,z:0},1,new $3Dmol.Color(.5,.5,.5));Ab.initTypedArrays();zb=new $3Dmol.InstancedMaterial({sphereMaterial:new $3Dmol.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:Ab})}else zb=new $3Dmol.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0});1>P.sphere&&\n0<=P.sphere&&(zb.transparent=!0,zb.opacity=P.sphere);Ab=new $3Dmol.Mesh(A,zb);x.add(Ab)}if(0<t.vertices){var cb=t.sphereGeometry;cb&&\"undefined\"!==typeof cb.vertices&&0!=cb.vertices||(cb=null);t.initTypedArrays();cb&&cb.initTypedArrays();var Jb={ambient:0,vertexColors:!0,reflectivity:0};if(t.imposter){var Bb=new $3Dmol.StickImposterMaterial(Jb);var Kb=new $3Dmol.SphereImposterMaterial(Jb)}else Bb=new $3Dmol.MeshLambertMaterial(Jb),Kb=new $3Dmol.MeshLambertMaterial(Jb),Bb.wireframe&&(t.setUpWireframe(),\ncb&&cb.setUpWireframe());1>P.stick&&0<=P.stick&&(Bb.transparent=!0,Bb.opacity=P.stick,Kb.transparent=!0,Kb.opacity=P.stick);var fc=new $3Dmol.Mesh(t,Bb);x.add(fc);if(cb){var gc=new $3Dmol.Mesh(cb,Kb);x.add(gc)}}for(J in y)if(y.hasOwnProperty(J)){var Pb=J;var Qb=new $3Dmol.LineBasicMaterial({linewidth:Pb,vertexColors:!0});1>P.line&&0<=P.line&&(Qb.transparent=!0,Qb.opacity=P.line);y[J].initTypedArrays();var hc=new $3Dmol.Line(y[J],Qb,$3Dmol.LinePieces);x.add(hc)}for(J in p)if(p.hasOwnProperty(J)){Pb=\nJ;var Rb=new $3Dmol.LineBasicMaterial({linewidth:Pb,vertexColors:!0});1>P.cross&&0<=P.cross&&(Rb.transparent=!0,Rb.opacity=P.cross);p[J].initTypedArrays();var ic=new $3Dmol.Line(p[J],Rb,$3Dmol.LinePieces);x.add(ic)}if(w&&f.symmetries&&0<f.symmetries.length){var Yb=new $3Dmol.Object3D,Lb;for(Lb=0;Lb<f.symmetries.length;Lb++){new $3Dmol.Object3D;var Sb=x.clone();Sb.matrix.copy(f.symmetries[Lb]);Sb.matrixAutoUpdate=!1;Yb.add(Sb)}l=Yb}else l=x;n&&(b.remove(n),n=null);n=l.clone();m&&(n.setVisible(!1),\nl.setVisible(!1));b.add(n)}};this.removegl=function(b){n&&(void 0!==n.geometry&&n.geometry.dispose(),void 0!==n.material&&n.material.dispose(),b.remove(n),n=null);l=null};this.hide=function(){m=!0;n&&n.setVisible(!1);l&&l.setVisible(!1)};this.show=function(){m=!1;n&&n.setVisible(!0);l&&l.setVisible(!0)};this.addPropertyLabels=function(b,c,d,n){var f=this.selectedAtoms(c,f);c=$.extend(!0,{},n);for(n=0;n<f.length;n++){var l=f[n],e=null;\"undefined\"!=typeof l[b]?e=String(l[b]):typeof(\"undefined\"!=l.properties[b])&&\n(e=String(l.properties[b]));null!=e&&(c.position=l,d.addLabel(e,c))}};this.addResLabels=function(b,c,d){var n=this.selectedAtoms(b,n);for(var f={},l=0;l<n.length;l++){b=n[l];var e=b.chain;var g=b.resn+\"\"+b.resi;f[e]||(f[e]={});f[e][g]||(f[e][g]=[]);f[e][g].push(b)}d=$.extend(!0,{},d);for(e in f)if(f.hasOwnProperty(e)){var m=f[e];for(g in m)if(m.hasOwnProperty(g)){n=m[g];var x=new $3Dmol.Vector3(0,0,0);for(l=0;l<n.length;l++)b=n[l],x.x+=b.x,x.y+=b.y,x.z+=b.z;x.divideScalar(n.length);d.position=x;c.addLabel(g,\nd)}}};var F=function(){t=[];var b=new Int8Array(g.length);b.fill(0);for(var c=function(d,n,f){f.push([d,n]);n=g[d];b[d]=1;for(var l=0;l<n.bonds.length;l++){var e=n.bonds[l];g[e]&&!b[e]&&c(e,d,f)}},d=0;d<g.length;d++)if(g[d]&&!b[d]){var n=[];c(d,-1,n);t.push(n)}};this.setCoordinatesFromURL=function(b,c){q=[];var d=this;p&&F();return new Promise(function(n,f){b.startsWith(\"http://\")||(b=\"http://\"+b);$.get(b+\"/traj/numframes/\"+c,function(l){isNaN(parseInt(l))||(q.push(g),q.numFrames=l,q.url=b,q.path=\nc,d.setFrame(0).then(function(){n()}).catch(f))})})};this.setCoordinates=function(c,d){d=d||\"\";if(!c)return[];if(/\\.gz$/.test(d)){d=d.replace(/\\.gz$/,\"\");try{c=pako.inflate(c,{to:\"string\"})}catch(O){console.log(O)}}if({mdcrd:\"\",inpcrd:\"\",pdb:\"\",netcdf:\"\"}.hasOwnProperty(d)){q=[];var n=g.length;c=b.parseCrd(c,d);for(d=0;d<c.length;){for(var f=[],l=0;l<n;l++){var e={},m;for(m in g[l])e[m]=g[l][m];f[l]=e;f[l].x=c[d++];f[l].y=c[d++];f[l].z=c[d++]}q.push(f)}g=q[0];return q}return[]};this.addAtomSpecs=\nfunction(c){for(var d=0;d<c.length;d++)b.validAtomSelectionSpecs.hasOwnProperty(c[d])&&b.validAtomSelectionSpecs.push(c[d])}}var c={line:{}},d={H:1.2,Li:1.82,LI:1.82,Na:2.27,NA:2.27,K:2.75,C:1.7,N:1.55,O:1.52,F:1.47,P:1.8,S:1.8,CL:1.75,Cl:1.75,BR:1.85,Br:1.85,SE:1.9,Se:1.9,ZN:1.39,Zn:1.39,CU:1.4,Cu:1.4,NI:1.63,Ni:1.63};b.validElements=\"H Li LI Na NA K C N O F P S CL Cl BR Br SE Se ZN Zn CU Cu NI Ni\".split(\" \");b.validAtomSpecs={resn:{type:\"string\",valid:!0},x:{type:\"number\",valid:!1,step:.1},y:{type:\"number\",\nvalid:!1,step:.1},z:{type:\"number\",valid:!1,step:.1},color:{type:\"color\",gui:!0},surfaceColor:{type:\"color\",gui:!0},elem:{type:\"element\",gui:!0},hetflag:{type:\"boolean\",valid:!1},chain:{type:\"string\",gui:!0},resi:{type:\"number\",gui:!0},icode:{type:\"number\",valid:!1,step:.1},rescode:{type:\"number\",valid:!1,step:.1},serial:{type:\"number\",valid:!1,step:.1},atom:{type:\"string\",valid:!1},bonds:{type:\"array\",valid:!1},ss:{type:\"string\",valid:!1},singleBonds:{type:\"boolean\",valid:!1},bondOrder:{type:\"array\",\nvalid:!1},properties:{type:\"properties\",valid:!1},b:{type:\"number\",valid:!1,step:.1},pdbline:{type:\"string\",valid:!1},clickable:{type:\"boolean\",valid:!1},callback:{type:\"function\",valid:!1},invert:{type:\"boolean\",valid:!1},reflectivity:{type:\"number\",gui:!0,step:.1},altLoc:{type:\"invalid\",valid:!1}};b.validAtomSelectionSpecs=function(b,c){for(var d in c)c.hasOwnProperty(d)&&(b[d]=c[d]);return b}(b.validAtomSpecs,{model:{type:\"string\",valid:!1},bonds:{type:\"string\",valid:!1},predicate:{type:\"string\",\nvalid:!1},invert:{type:\"string\",valid:!1},byres:{type:\"string\",valid:!1},expand:{type:\"string\",valid:!1},within:{type:\"string\",valid:!1},and:{type:\"string\",valid:!1},or:{type:\"string\",valid:!1},not:{type:\"string\",valid:!1}});var h={hidden:{type:\"boolean\",gui:!0},singleBonds:{type:\"boolean\",gui:!0},colorscheme:{type:\"colorscheme\",gui:!0},color:{type:\"color\",gui:!0},radius:{type:\"number\",gui:!0,step:.1,default:1.5,min:0}};b.validAtomStyleSpecs={line:{validItems:{hidden:{type:\"boolean\",gui:!0},linewidth:{type:\"number\",\ngui:!0,step:.1,default:1},colorscheme:{type:\"colorscheme\",gui:!0},color:{type:\"color\",gui:!0}},gui:!0},cross:{validItems:{hidden:{type:\"boolean\",gui:!0},linewidth:{type:\"number\",gui:!1,step:.1,default:1,min:0},colorscheme:{type:\"colorscheme\",gui:!0},color:{type:\"color\",gui:!0},radius:{type:\"number\",gui:!0,step:.1,default:1,min:.1},scale:{type:\"number\",gui:!0,step:.1,default:1,min:0}},gui:!0},stick:{validItems:{hidden:{type:\"boolean\",gui:!0},colorscheme:{type:\"colorscheme\",gui:!0},color:{type:\"color\",\ngui:!0},radius:{type:\"number\",gui:!0,step:.1,default:.25,min:.1},singleBonds:{type:\"boolean\",gui:!0}},gui:!0},sphere:{validItems:h,gui:!0},cartoon:{validItems:{style:{validItems:[\"trace\",\"oval\",\"rectangle\",\"parabola\",\"edged\"],gui:!0},color:{type:\"color\",gui:!0},arrows:{type:\"boolean\",gui:!0},ribbon:{type:\"boolean\",gui:!0},hidden:{type:\"boolean\",gui:!0},tubes:{type:\"boolean\",gui:!0},thickness:{type:\"number\",gui:!0,step:.1,default:1,min:0},width:{type:\"number\",gui:!0,step:.1,default:1,min:0},opacity:{type:\"number\",\ngui:!0,step:.1,default:1,min:0,max:1}},gui:!0},colorfunc:{validItems:null,valid:!1},clicksphere:{validItems:h}};b.validSurfaceSpecs={opacity:{type:\"number\",gui:!0,step:.1,default:1,min:0,max:1},colorscheme:{type:\"colorscheme\",gui:!0},color:{type:\"color\",gui:!0},voldata:{type:\"number\",gui:!1},volscheme:{type:\"number\",gui:!1},map:{type:\"number\",gui:!1}};b.validLabelResSpecs={font:{type:\"string\",gui:!0},fontSize:{type:\"number\",gui:!0,step:1,default:12,min:1},fontColor:{type:\"color\",gui:!0},fontOpacity:{type:\"number\",\ngui:!0,step:.1,default:1,min:0,max:1},borderThickness:{type:\"number\",gui:!0,step:.1,default:1,min:0},borderColor:{type:\"color\",gui:!0},borderOpacity:{type:\"number\",gui:!0,step:.1,default:1,min:0,max:1},backgroundColor:{type:\"color\",gui:!0},backgroundOpacity:{type:\"number\",gui:!0,step:.1,default:1,min:0,max:1},position:{type:\"array\",valid:!1},inFront:{type:\"boolean\",gui:!0},showBackground:{type:\"boolean\",gui:!0},fixed:{type:\"boolean\",gui:!0},alignment:{validItems:\"topLeft topCenter topRight centerLeft center centerRight bottomLeft bottomCenter bottomRight\".split(\" \"),\ngui:!0},scale:{type:\"boolean\",gui:!1}};b.parseCrd=function(b,c){var d,e=[],h=0;if(\"pdb\"==c)for(d=b.indexOf(\"\\nATOM\");-1!=d;){for(;\"\\nATOM\"==b.slice(d,d+5)||\"\\nHETATM\"==b.slice(d,d+7);)e[h++]=parseFloat(b.slice(d+31,d+39)),e[h++]=parseFloat(b.slice(d+39,d+47)),e[h++]=parseFloat(b.slice(d+47,d+55)),d=b.indexOf(\"\\n\",d+54),\"\\nTER\"==b.slice(d,d+4)&&(d=b.indexOf(\"\\n\",d+5));d=b.indexOf(\"\\nATOM\",d)}else\"netcdf\"==c?(b=new netcdfjs(b),e=[].concat.apply([],b.getDataVariable(\"coordinates\"))):(d=b.indexOf(\"\\n\"),\n\"inpcrd\"==c&&(d=b.indexOf(\"\\n\",d+1)),b=b.slice(d+1),e=b.match(/\\S+/g).map(parseFloat));return e};b.parseMolData=function(b,c,d){c=c||\"\";if(!b)return[];if(/\\.gz$/.test(c)){c=c.replace(/\\.gz$/,\"\");try{b=pako.inflate(b,{to:\"string\"})}catch(q){console.log(q)}}\"undefined\"==typeof $3Dmol.Parsers[c]&&(c=c.split(\".\").pop(),\"undefined\"==typeof $3Dmol.Parsers[c]&&(console.log(\"Unknown format: \"+c),c=b instanceof Uint8Array?\"mmtf\":b.match(/^@<TRIPOS>MOLECULE/gm)?\"mol2\":b.match(/^HETATM/gm)||b.match(/^ATOM/gm)?\n\"pdb\":b.match(/ITEM: TIMESTEP/gm)?\"lammpstrj\":b.match(/^.*\\n.*\\n.\\s*(\\d+)\\s+(\\d+)/gm)?\"sdf\":b.match(/^%VERSION\\s+\\VERSION_STAMP/gm)?\"prmtop\":\"xyz\",console.log(\"Best guess: \"+c)));return(0,$3Dmol.Parsers[c])(b,d)};b.setAtomDefaults=function(b,d){for(var e=0;e<b.length;e++){var h=b[e];h&&(h.style=h.style||c,h.color=h.color||ElementColors[h.elem]||defaultColor,h.model=d,h.clickable||h.hoverable)&&(h.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]})}};return b}();\n$3Dmol.GLShape=function(){function b(b){b=b||{};$3Dmol.ShapeIDCount++;this.boundingSphere=new $3Dmol.Sphere;this.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]};e(this,b);var g=[],q=null,p=null,u=new $3Dmol.Geometry(!0),m=new $3Dmol.Geometry(!0);this.updateStyle=function(c){for(var d in c)b[d]=c[d];e(this,b)};this.addCustom=function(b){b.vertexArr=b.vertexArr||[];b.faceArr=b.faceArr||[];b.normalArr=b.normalArr||[];d(this,u,b)};this.addSphere=function(b){b.center=b.center||{x:0,y:0,z:0};\nb.radius=b.radius?$3Dmol.Math.clamp(b.radius,0,Infinity):1.5;b.color=$3Dmol.CC.color(b.color);this.intersectionShape.sphere.push(new $3Dmol.Sphere(b.center,b.radius));$3Dmol.GLDraw.drawSphere(u,b.center,b.radius,b.color);g.push({centroid:new $3Dmol.Vector3(b.center.x,b.center.y,b.center.z)});b=u.updateGeoGroup(0);h(this.boundingSphere,g,b.vertexArray,b.vertices)};this.addBox=function(b){var c=b.dimensions||{w:1,h:1,d:1},l=c.w;\"number\"==typeof c.w&&(l={x:c.w,y:0,z:0});var f=c.h;\"number\"==typeof c.h&&\n(f={x:0,y:c.h,z:0});var e=c.d;\"number\"==typeof c.d&&(e={x:0,y:0,z:c.d});c=b.corner;void 0==c&&(c=void 0!==b.center?{x:b.center.x-.5*(l.x+f.x+e.x),y:b.center.y-.5*(l.y+f.y+e.y),z:b.center.z-.5*(l.z+f.z+e.z)}:{x:0,y:0,z:0});l=[{x:c.x,y:c.y,z:c.z},{x:c.x+l.x,y:c.y+l.y,z:c.z+l.z},{x:c.x+f.x,y:c.y+f.y,z:c.z+f.z},{x:c.x+l.x+f.x,y:c.y+l.y+f.y,z:c.z+l.z+f.z},{x:c.x+e.x,y:c.y+e.y,z:c.z+e.z},{x:c.x+l.x+e.x,y:c.y+l.y+e.y,z:c.z+l.z+e.z},{x:c.x+f.x+e.x,y:c.y+f.y+e.y,z:c.z+f.z+e.z},{x:c.x+l.x+f.x+e.x,y:c.y+l.y+\nf.y+e.y,z:c.z+l.z+f.z+e.z}];f=[];e=[];f.splice(f.length,0,l[0],l[1],l[2],l[3]);e.splice(e.length,0,0,2,1,1,2,3);c=4;f.splice(f.length,0,l[2],l[3],l[6],l[7]);e.splice(e.length,0,c+0,c+2,c+1,c+1,c+2,c+3);c+=4;f.splice(f.length,0,l[4],l[5],l[0],l[1]);e.splice(e.length,0,c+0,c+2,c+1,c+1,c+2,c+3);c+=4;f.splice(f.length,0,l[6],l[7],l[4],l[5]);e.splice(e.length,0,c+0,c+2,c+1,c+1,c+2,c+3);c+=4;f.splice(f.length,0,l[3],l[1],l[7],l[5]);e.splice(e.length,0,c+0,c+2,c+1,c+1,c+2,c+3);c+=4;f.splice(f.length,0,l[2],\nl[0],l[6],l[4]);e.splice(e.length,0,c+0,c+2,c+1,c+1,c+2,c+3);b=$.extend({},b);b.vertexArr=f;b.faceArr=e;b.normalArr=[];d(this,u,b);b=new $3Dmol.Vector3;g.push({centroid:b.addVectors(l[0],l[7]).multiplyScalar(.5)});b=u.updateGeoGroup(0);h(this.boundingSphere,g,b.vertexArray,b.vertices)};this.addCylinder=function(b){b.start=b.start||{};b.end=b.end||{};var c=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||0),d=new $3Dmol.Vector3(b.end.x,b.end.y||0,b.end.z||0);\"undefined\"==typeof d.x&&(d.x=3);\nvar f=b.radius||.1,l=$3Dmol.CC.color(b.color);this.intersectionShape.cylinder.push(new $3Dmol.Cylinder(c,d,f));$3Dmol.GLDraw.drawCylinder(u,c,d,f,l,b.fromCap,b.toCap);b=new $3Dmol.Vector3;g.push({centroid:b.addVectors(c,d).multiplyScalar(.5)});c=u.updateGeoGroup(0);h(this.boundingSphere,g,c.vertexArray,c.vertices)};this.addDashedCylinder=function(b){b.start=b.start||{};b.end=b.end||{};b.dashLength=b.dashLength||.25;b.gapLength=b.gapLength||.25;var c=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||\n0),d=new $3Dmol.Vector3(b.end.x,b.end.y||0,b.end.z||0);\"undefined\"==typeof d.x&&(d.x=3);var f=b.radius||.1,l=$3Dmol.CC.color(b.color),e=Math.sqrt(Math.pow(c.x-d.x,2)+Math.pow(c.y-d.y,2)+Math.pow(c.z-d.z,2)),m=e/(b.gapLength+b.dashLength),p=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||0);new $3Dmol.Vector3(b.end.x,b.end.y||0,b.end.z||0);for(var A=new $3Dmol.Vector3((d.x-c.x)/(e/b.gapLength),(d.y-c.y)/(e/b.gapLength),(d.z-c.z)/(e/b.gapLength)),q=new $3Dmol.Vector3((d.x-c.x)/(e/b.dashLength),\n(d.y-c.y)/(e/b.dashLength),(d.z-c.z)/(e/b.dashLength)),t=0;t<m;t++)e=new $3Dmol.Vector3(p.x+q.x,p.y+q.y,p.z+q.z),this.intersectionShape.cylinder.push(new $3Dmol.Cylinder(p,e,f)),$3Dmol.GLDraw.drawCylinder(u,p,e,f,l,b.fromCap,b.toCap),p=new $3Dmol.Vector3(e.x+A.x,e.y+A.y,e.z+A.z);b=new $3Dmol.Vector3;g.push({centroid:b.addVectors(c,d).multiplyScalar(.5)});c=u.updateGeoGroup(0);h(this.boundingSphere,g,c.vertexArray,c.vertices)};this.addCurve=function(b){b.points=b.points||[];b.smooth=b.smooth||10;\"undefined\"==\ntypeof b.fromCap&&(b.fromCap=2);\"undefined\"==typeof b.toCap&&(b.toCap=2);var c=$3Dmol.subdivide_spline(b.points,b.smooth);if(3>c.length)console.log(\"Too few points in addCurve\");else{var d=b.radius||.1,f=$3Dmol.CC.color(b.color),l=0,e=c.length-1;var g=c[0].distanceTo(c[1]);var m=Math.ceil(2*d/g);b.toArrow&&(e-=m,g={start:c[e],end:c[c.length-1],radius:d,color:f,mid:1E-4},this.addArrow(g));b.fromArrow&&(l+=m,g={start:c[l],end:c[0],radius:d,color:f,mid:1E-4},this.addArrow(g));b=Math.ceil(c.length/2);\nfor(d={radius:d,color:f,fromCap:2,toCap:2};l<e;l++)d.start=c[l],d.end=c[l+1],d.fromCap=2,d.toCap=2,l<b?(d.fromCap=2,d.toCap=0):(d.fromCap=l>b?0:2,d.toCap=2),this.addCylinder(d)}};this.addLine=function(b){b.start=b.start||{};b.end=b.end||{};var c=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||0);b=new $3Dmol.Vector3(b.end.x,b.end.y||0,b.end.z||0);\"undefined\"==typeof b.x&&(b.x=3);var d=u.updateGeoGroup(2),f=d.vertices,e=3*f,l=d.vertexArray;l[e]=c.x;l[e+1]=c.y;l[e+2]=c.z;l[e+3]=b.x;l[e+4]=b.y;\nl[e+5]=b.z;d.vertices+=2;e=d.lineArray;l=d.lineidx;e[l]=f;e[l+1]=f+1;d.lineidx+=2;d=new $3Dmol.Vector3;g.push({centroid:d.addVectors(c,b).multiplyScalar(.5)});d=u.updateGeoGroup(0);h(this.boundingSphere,g,d.vertexArray,d.vertices)};this.addArrow=function(b){b.start=b.start||{};b.end=b.end||{};b.start=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||0);if(b.dir instanceof $3Dmol.Vector3&&b.length instanceof number){var c=b.dir.clone().multiplyScalar(b.length).add(start);b.end=c}else b.end=new $3Dmol.Vector3(b.end.x,\nb.end.y||0,b.end.z||0),\"undefined\"==typeof b.end.x&&(b.end.x=3);b.radius=b.radius||.1;b.radiusRatio=b.radiusRatio||1.618034;b.mid=0<b.mid&&1>b.mid?b.mid:.618034;var d=b.start,f=b.end,e=b.radius,l=b.radiusRatio,m=b.mid;if(d&&f){c=u.updateGeoGroup(51);var p=f.clone();p.sub(d).multiplyScalar(m);var q=d.clone().add(p);m=p.clone().negate();this.intersectionShape.cylinder.push(new $3Dmol.Cylinder(d.clone(),q.clone(),e));this.intersectionShape.sphere.push(new $3Dmol.Sphere(d.clone(),e));var t=[];t[0]=p.clone();\n1E-4<Math.abs(t[0].x)?t[0].y+=1:t[0].x+=1;t[0].cross(p);t[0].normalize();t[0]=t[0];t[4]=t[0].clone();t[4].crossVectors(t[0],p);t[4].normalize();t[8]=t[0].clone().negate();t[12]=t[4].clone().negate();t[2]=t[0].clone().add(t[4]).normalize();t[6]=t[4].clone().add(t[8]).normalize();t[10]=t[8].clone().add(t[12]).normalize();t[14]=t[12].clone().add(t[0]).normalize();t[1]=t[0].clone().add(t[2]).normalize();t[3]=t[2].clone().add(t[4]).normalize();t[5]=t[4].clone().add(t[6]).normalize();t[7]=t[6].clone().add(t[8]).normalize();\nt[9]=t[8].clone().add(t[10]).normalize();t[11]=t[10].clone().add(t[12]).normalize();t[13]=t[12].clone().add(t[14]).normalize();t[15]=t[14].clone().add(t[0]).normalize();var G=c.vertices,C=c.vertexArray,z=c.faceArray,D=c.normalArray,I=c.lineArray,K;var H=0;for(K=t.length;H<K;++H){var N=3*(G+3*H);var E=t[H].clone().multiplyScalar(e).add(d),L=t[H].clone().multiplyScalar(e).add(q),M=t[H].clone().multiplyScalar(e*l).add(q);C[N]=E.x;C[N+1]=E.y;C[N+2]=E.z;C[N+3]=L.x;C[N+4]=L.y;C[N+5]=L.z;C[N+6]=M.x;C[N+\n7]=M.y;C[N+8]=M.z;0<H&&(N=new $3Dmol.Vector3(C[N-3],C[N-2],C[N-1]),E=f.clone(),L=q.clone(),M=new $3Dmol.Vector3(M.x,M.y,M.z),this.intersectionShape.triangle.push(new $3Dmol.Triangle(M,E,N)),this.intersectionShape.triangle.push(new $3Dmol.Triangle(N.clone(),L,M.clone())))}c.vertices+=48;N=3*c.vertices;C[N]=d.x;C[N+1]=d.y;C[N+2]=d.z;C[N+3]=q.x;C[N+4]=q.y;C[N+5]=q.z;C[N+6]=f.x;C[N+7]=f.y;C[N+8]=f.z;c.vertices+=3;var F,J,Q=c.vertices-3,W=c.vertices-2,V=c.vertices-1,U=3*Q,ca=3*W,S=3*V;H=0;for(K=t.length-\n1;H<K;++H){var O=G+3*H;d=c.faceidx;f=c.lineidx;e=O;N=3*e;l=O+1;E=3*l;q=O+2;L=3*q;C=O+4;var Z=3*C;M=O+5;var aa=3*M;O+=3;var B=3*O;var Y=F=t[H];var X=J=t[H+1];D[N]=Y.x;D[E]=F.x;D[B]=J.x;D[N+1]=Y.y;D[E+1]=F.y;D[B+1]=J.y;D[N+2]=Y.z;D[E+2]=F.z;D[B+2]=J.z;D[E]=F.x;D[Z]=X.x;D[B]=J.x;D[E+1]=F.y;D[Z+1]=X.y;D[B+1]=J.y;D[E+2]=F.z;D[Z+2]=X.z;D[B+2]=J.z;D[L]=F.x;D[aa]=X.x;D[L+1]=F.y;D[aa+1]=X.y;D[L+2]=F.z;D[aa+2]=X.z;z[d]=e;z[d+1]=l;z[d+2]=O;z[d+3]=l;z[d+4]=C;z[d+5]=O;z[d+6]=e;z[d+7]=O;z[d+8]=Q;z[d+9]=q;z[d+10]=\nW;z[d+11]=M;z[d+12]=q;z[d+13]=V;z[d+14]=M;I[f]=e;I[f+1]=l;I[f+2]=e;I[f+3]=O;I[f+4]=C;I[f+5]=O;I[f+6]=e;I[f+7]=O;I[f+8]=q;I[f+9]=l;I[f+10]=q;I[f+11]=M;I[f+12]=C;I[f+13]=M;I[f+14]=q;I[f+15]=V;I[f+16]=q;I[f+17]=M;I[f+18]=V;I[f+19]=M;c.faceidx+=15;c.lineidx+=20}G=[G+45,G+46,G+1,G,G+47,G+2];d=c.faceidx;f=c.lineidx;e=G[0];N=3*e;l=G[1];E=3*l;q=G[4];L=3*q;C=G[2];Z=3*C;M=G[5];aa=3*M;O=G[3];B=3*O;Y=F=t[15];X=J=t[0];D[N]=Y.x;D[E]=F.x;D[B]=J.x;D[N+1]=Y.y;D[E+1]=F.y;D[B+1]=J.y;D[N+2]=Y.z;D[E+2]=F.z;D[B+2]=J.z;\nD[E]=F.x;D[Z]=X.x;D[B]=J.x;D[E+1]=F.y;D[Z+1]=X.y;D[B+1]=J.y;D[E+2]=F.z;D[Z+2]=X.z;D[B+2]=J.z;D[L]=F.x;D[aa]=X.x;D[L+1]=F.y;D[aa+1]=X.y;D[L+2]=F.z;D[aa+2]=X.z;p.normalize();m.normalize();D[U]=m.x;D[ca]=D[S]=p.x;D[U+1]=m.y;D[ca+1]=D[S+1]=p.y;D[U+2]=m.z;D[ca+2]=D[S+2]=p.z;z[d]=e;z[d+1]=l;z[d+2]=O;z[d+3]=l;z[d+4]=C;z[d+5]=O;z[d+6]=e;z[d+7]=O;z[d+8]=Q;z[d+9]=q;z[d+10]=W;z[d+11]=M;z[d+12]=q;z[d+13]=V;z[d+14]=M;I[f]=e;I[f+1]=l;I[f+2]=e;I[f+3]=O;I[f+4]=C;I[f+5]=O;I[f+6]=e;I[f+7]=O;I[f+8]=q;I[f+9]=l;I[f+10]=\nq;I[f+11]=M;I[f+12]=C;I[f+13]=M;I[f+14]=q;I[f+15]=V;I[f+16]=q;I[f+17]=M;I[f+18]=V;I[f+19]=M;c.faceidx+=15;c.lineidx+=20}c=new $3Dmol.Vector3;g.push({centroid:c.addVectors(b.start,b.end).multiplyScalar(.5)});b=u.updateGeoGroup(0);h(this.boundingSphere,g,b.vertexArray,b.vertices)};this.addIsosurface=function(b,c,e){var f=void 0!==c.isoval&&\"number\"===typeof c.isoval?c.isoval:0,n=c.voxel?!0:!1,l=void 0===c.smoothness?1:c.smoothness,g=b.size.x,m=b.size.y,h=b.size.z,p=new Int16Array(g*m*h),q=b.data,t;\nvar y=0;for(t=p.length;y<t;++y)p[y]=-1;p=new Uint8Array(g*m*h);y=0;for(t=q.length;y<t;++y)0<(0<=f?q[y]-f:f-q[y])&&(p[y]|=2);f=[];q=[];$3Dmol.MarchingCube.march(p,f,q,{fulltable:!0,voxel:n,unitCube:b.unit,origin:b.origin,matrix:b.matrix,nX:g,nY:m,nZ:h});!n&&0<l&&$3Dmol.MarchingCube.laplacianSmooth(l,f,q);n=[];l=[];g=[];c.selectedRegion&&void 0===c.coords&&(c.coords=c.selectedRegion);if(void 0!==c.coords){m=c.coords[0].x;h=c.coords[0].y;p=c.coords[0].z;t=c.coords[0].x;var D=c.coords[0].y,I=c.coords[0].z;\nfor(y=0;y<c.coords.length;y++)c.coords[y].x>m?m=c.coords[y].x:c.coords[y].x<t&&(t=c.coords[y].x),c.coords[y].y>h?h=c.coords[y].y:c.coords[y].y<D&&(D=c.coords[y].y),c.coords[y].z>p?p=c.coords[y].z:c.coords[y].z<I&&(I=c.coords[y].z);var K=2;void 0!==c.radius&&(K=c.radius);void 0!==c.selectedOffset&&(K=c.selectedOffset);void 0!==c.seldist&&(K=c.seldist);t-=K;m+=K;D-=K;h+=K;I-=K;p+=K;for(y=0;y<f.length;y++){var H;if(H=f[y].x>t&&f[y].x<m&&f[y].y>D&&f[y].y<h&&f[y].z>I&&f[y].z<p)a:{H=f[y];for(var N=c.coords,\nE=K,L=0;L<N.length;L++){var M=N[L];if(Math.sqrt(Math.pow(M.x-H.x,2)+Math.pow(M.y-H.y,2)+Math.pow(M.z-H.z,2))<=E){H=!0;break a}}H=!1}H?(n.push(l.length),l.push(f[y])):n.push(-1)}for(y=0;y+2<q.length;y+=3)-1!==n[q[y]]&&-1!==n[q[y+1]]&&-1!==n[q[y+2]]&&(g.push(q[y]-(q[y]-n[q[y]])),g.push(q[y+1]-(q[y+1]-n[q[y+1]])),g.push(q[y+2]-(q[y+2]-n[q[y+2]])));f=l;q=g}d(this,u,{vertexArr:f,faceArr:q,normalArr:[],clickable:c.clickable,hoverable:c.hoverable});this.updateStyle(c);y=new $3Dmol.Vector3(b.origin.x,b.origin.y,\nb.origin.z);q=new $3Dmol.Vector3(b.size.x*b.unit.x,b.size.y*b.unit.y,b.size.z*b.unit.z);b=new $3Dmol.Vector3(0,0,0);c=y.clone();q=y.clone().add(q);for(y=0;y<f.length;y++)b.add(f[y]),c.max(f[y]),q.min(f[y]);b.divideScalar(f.length);y=b.distanceTo(q);f=b.distanceTo(c);this.boundingSphere.center=b;this.boundingSphere.radius=Math.max(y,f);\"function\"==typeof e&&e()};this.addVolumetricData=function(b,c,d){b=new $3Dmol.VolumeData(b,c);this.addIsosurface(b,d)};this.finalize=function(){c(u);u.initTypedArrays()};\nthis.globj=function(b){var d;p&&(b.remove(p),p=null);if(!this.hidden){c(u);u.initTypedArrays();this.wireframe&&u.setUpWireframe();if(\"undefined\"!=typeof this.color){(d=this.color)||$3Dmol.CC.color(d);u.colorsNeedUpdate=!0;if(d.constructor!==Array){var e=d.r;var f=d.g;var l=d.b}for(var g in u.geometryGroups){var h=u.geometryGroups[g],t=h.colorArray,A=0;for(h=h.vertices;A<h;++A)d.constructor===Array&&(l=d[A],e=l.r,f=l.g,l=l.b),t[3*A]=e,t[3*A+1]=f,t[3*A+2]=l}}q=new $3Dmol.Object3D;d=this.side==$3Dmol.DoubleSide?\nnew $3Dmol.MeshDoubleLambertMaterial({wireframe:this.wireframe,side:this.side,transparent:1>this.opacity?!0:!1,opacity:this.opacity,wireframeLinewidth:this.linewidth}):new $3Dmol.MeshLambertMaterial({wireframe:this.wireframe,side:this.side,transparent:1>this.opacity?!0:!1,opacity:this.opacity,wireframeLinewidth:this.linewidth});d=new $3Dmol.Mesh(u,d);q.add(d);d=new $3Dmol.LineBasicMaterial({linewidth:this.linewidth,color:this.color});d=new $3Dmol.Line(m,d,$3Dmol.LinePieces);q.add(d);p=q.clone();b.add(p)}};\nthis.removegl=function(b){p&&(void 0!==p.geometry&&p.geometry.dispose(),void 0!==p.material&&p.material.dispose(),b.remove(p),p=null);q=null}}var c=function(b){b=b.updateGeoGroup(0);0<b.vertices&&b.truncateArrayBuffers(!0,!0)},d=function(b,c,d){var e=d.faceArr;0!==d.vertexArr.length&&0!==e.length||console.warn(\"Error adding custom shape component: No vertices and/or face indices supplied!\");e=d.color;\"undefined\"==typeof e&&(e=b.color);e=$3Dmol.CC.color(e);for(var g=$3Dmol.splitMesh(d),m=0,l=g.length;m<\nl;m++){var n,y=void 0,f=n=void 0;var x=b;var w=c;var q=g[m];var t=g[m].colorArr?g[m].colorArr:e,A=d.clickable,T=w.addGeoGroup(),G=q.vertexArr,C=q.normalArr,z=q.faceArr;T.vertices=G.length;T.faceidx=z.length;var D=T.vertexArray,I=T.colorArray;t.constructor!==Array&&(y=t.r,n=t.g,f=t.b);var K=0;for(q=T.vertices;K<q;++K){var H=3*K;var N=G[K];D[H]=N.x;D[H+1]=N.y;D[H+2]=N.z;t.constructor===Array&&(N=t[K],y=N.r,n=N.g,f=N.b);I[H]=y;I[H+1]=n;I[H+2]=f}if(A)for(K=0,q=T.faceidx/3;K<q;++K)H=3*K,n=z[H],f=z[H+1],\nN=z[H+2],H=new $3Dmol.Vector3,y=new $3Dmol.Vector3,t=new $3Dmol.Vector3,x.intersectionShape.triangle.push(new $3Dmol.Triangle(H.copy(G[n]),y.copy(G[f]),t.copy(G[N])));if(A){q=new $3Dmol.Vector3(0,0,0);for(n=K=0;n<w.geometryGroups.length;n++)q.add(w.geometryGroups[n].getCentroid()),K++;q.divideScalar(K);h(x.boundingSphere,{centroid:q},D,T.vertices)}T.faceArray=new Uint16Array(z);T.truncateArrayBuffers(!0,!0);if(C.length<T.vertices)T.setNormals();else for(w=T.normalArray=new Float32Array(3*T.vertices),\nK=0,q=T.vertices;K<q;++K)H=3*K,x=C[K],w[H]=x.x,w[H+1]=x.y,w[H+2]=x.z;T.setLineIndices();T.lineidx=T.lineArray.length}},h=function(b,c,d,e){b.center.set(0,0,0);var g;if(0<c.length){var m=0;for(g=c.length;m<g;++m)b.center.add(c[m].centroid);b.center.divideScalar(c.length)}c=b.radius*b.radius;d.length/3<e&&(e=d.length/3);m=0;for(g=e;m<g;m++)e=b.center.distanceToSquared({x:d[3*m],y:d[3*m+1],z:d[3*m+2]}),c=Math.max(c,e);b.radius=Math.sqrt(c)},e=function(b,c){\"undefined\"!=typeof c.color?(b.color=c.color||\nnew $3Dmol.Color,c.color instanceof $3Dmol.Color||(b.color=$3Dmol.CC.color(c.color))):b.color=$3Dmol.CC.color(0);b.wireframe=c.wireframe?!0:!1;b.opacity=c.alpha?$3Dmol.Math.clamp(c.alpha,0,1):1;\"undefined\"!=typeof c.opacity&&(b.opacity=$3Dmol.Math.clamp(c.opacity,0,1));b.side=void 0!==c.side?c.side:$3Dmol.DoubleSide;b.linewidth=\"undefined\"==typeof c.linewidth?1:c.linewidth;b.clickable=c.clickable?!0:!1;b.callback=\"function\"===typeof c.callback?c.callback:null;b.hoverable=c.hoverable?!0:!1;b.hover_callback=\n\"function\"===typeof c.hover_callback?c.hover_callback:null;b.unhover_callback=\"function\"===typeof c.unhover_callback?c.unhover_callback:null;b.hidden=c.hidden};Object.defineProperty(b.prototype,\"position\",{get:function(){return this.boundingSphere.center}});Object.defineProperty(b.prototype,\"x\",{get:function(){return this.boundingSphere.center.x}});Object.defineProperty(b.prototype,\"y\",{get:function(){return this.boundingSphere.center.y}});Object.defineProperty(b.prototype,\"z\",{get:function(){return this.boundingSphere.center.z}});\nreturn b}();$3Dmol.ShapeIDCount=0;\n$3Dmol.splitMesh=function(b){if(64E3>b.vertexArr.length)return[b];var c=[{vertexArr:[],normalArr:[],faceArr:[]}];b.colorArr&&(c.colorArr=[]);for(var d=[],h=[],e=0,t=b.faceArr,g=0,q=t.length;g<q;g+=3){for(var p=c[e],u=0;3>u;u++){var m=t[g+u];d[m]!==e&&(d[m]=e,h[m]=p.vertexArr.length,p.vertexArr.push(b.vertexArr[m]),b.normalArr&&b.normalArr[m]&&p.normalArr.push(b.normalArr[m]),b.colorArr&&b.colorArr[m]&&p.colorArr.push(b.colorArr[m]));p.faceArr.push(h[m])}64E3<=p.vertexArr.length&&(c.push({vertexArr:[],\nnormalArr:[],faceArr:[]}),b.colorArr&&(c.colorArr=[]),e++)}return c};\n$3Dmol.GLViewer=function(){return function(b,c){function d(b){var c=[];if(\"undefined\"===typeof b.model)for(b=0;b<f.length;b++)f[b]&&c.push(f[b]);else for(c=b.model,$.isArray(c)||(c=[c]),b=0;b<c.length;b++)if(\"number\"===typeof c[b]){var d=c[b];0>d&&(d+=f.length);c[b]=f[d]}return c}function h(b){var c=[];\"undefined\"===typeof b&&(b={});for(var f=d(b),e=0;e<f.length;e++)c=c.concat(f[e].selectedAtoms(b));return c}function e(b,c,f,e,n){for(var l=d(c),m=0;m<l.length;m++)l[m][b](c,f,e,n)}function t(b){var c=\nnew $3Dmol.MeshLambertMaterial;c.vertexColors=$3Dmol.VertexColors;for(var d in b)\"color\"!==d&&\"map\"!==d&&b.hasOwnProperty(d)&&(c[d]=b[d]);void 0!==b.opacity&&(c.transparent=1===b.opacity?!1:!0);return c}c=c||{};var g=c.callback,q=c.defaultcolors;q||(q=$3Dmol.elementColors.defaultColors);var p=c.nomouse,u=0;c.backgroundColor=c.backgroundColor||\"#ffffff\";u=$3Dmol.CC.color(c.backgroundColor).getHex();var m=0;m=parseFloat(c.camerax);var l=this,n=b,y=null,f=[],x={},w=[],R=[],P=[],A=[],T=[],G=null,C=500;\nC=c.hoverDuration;var z=n.width(),D=n.height(),I=[],K=new $3Dmol.Renderer({antialias:!0,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:c.id,row:c.row,col:c.col,rows:c.rows,cols:c.cols,canvas:c.canvas});K.domElement.style.width=\"100%\";K.domElement.style.height=\"100%\";K.domElement.style.padding=\"0\";K.domElement.style.position=\"absolute\";K.domElement.style.top=\"0px\";K.domElement.style.left=\"0px\";K.domElement.style.zIndex=\"0\";var H=c.row,N=c.col,E=c.cols,L=c.rows,M=c.viewers,F=c.control_all,J=K.getAspect(z,\nD),Q=new $3Dmol.Camera(20,J,1,800,c.orthographic);Q.position=new $3Dmol.Vector3(m,0,150);var W=new $3Dmol.Vector3;Q.lookAt(W);var V=new $3Dmol.Raycaster(new $3Dmol.Vector3(0,0,0),new $3Dmol.Vector3(0,0,0)),U=new $3Dmol.Projector;new $3Dmol.Vector3(0,0,0);var ca=null,S=null,O=null,Z=-50,aa=50,B=new $3Dmol.Quaternion(0,0,0,1),Y=new $3Dmol.Quaternion(0,0,0,1),X=0,da=!1,ma=0,qa=0,ha=0,ja=0,jb=0,xa=0,Ha=0,Ia=function(){X--;0>X&&(X=0)},oa=function(){var b=0,c;for(c in x)if(x.hasOwnProperty(c)){var d=parseInt(c);\nisNaN(d)||(c=d);c>b&&(b=c)}return b+1},Ja=function(){var b=Q.position.z-S.position.z;1>b&&(b=1);Q.near=b+Z;1>Q.near&&(Q.near=1);Q.far=b+aa;Q.near+1>Q.far&&(Q.far=Q.near+1);Q.fov=20;Q.right=b*Math.tan(Math.PI/180*20);Q.left=-Q.right;Q.top=Q.right/J;Q.bottom=-Q.top;Q.updateProjectionMatrix();ca.fog.near=Q.near+.4*(Q.far-Q.near);ca.fog.far=Q.far;c.disableFog&&(ca.fog.near=ca.fog.far)},ea=function(b){K.setViewport();if(ca&&(Ja(),K.render(ca,Q),!b&&0<I.length)){b=l.getView();for(var c=0;c<I.length;c++)I[c].setView(b,\n!0)}};(function(){ca=new $3Dmol.Scene;ca.fog=new $3Dmol.Fog(u,100,200);O=new $3Dmol.Object3D;S=new $3Dmol.Object3D;S.useQuaternion=!0;S.quaternion=new $3Dmol.Quaternion(0,0,0,1);S.add(O);ca.add(S);var b=new $3Dmol.Light(16777215);b.position=(new $3Dmol.Vector3(.2,.2,1)).normalize();b.intensity=1;ca.add(b)})();K.setClearColorHex(u,1);ca.fog.color=$3Dmol.CC.color(u);var Va=function(b,c){G!=b&&(G&&G.unhover_callback(G,l,c,n),(G=b)&&void 0!==b.hover_callback&&\"function\"===typeof b.hover_callback&&b.hover_callback(b,\nl,c,n))},kb=function(b,c,d){V.setFromCamera({x:b,y:c,z:-1},Q);b=V.intersectObjects(O,T);0!=b.length&&void 0!==b[0]||Va(null);void 0!==b[0]&&b[0].clickable!==G&&Va(null)},Qa=function(b){var c=b.originalEvent.targetTouches[0].pageX-b.originalEvent.targetTouches[1].pageX;b=b.originalEvent.targetTouches[0].pageY-b.originalEvent.targetTouches[1].pageY;return Math.sqrt(c*c+b*b)},Ba=function(b){var c=b.pageX,d=b.pageY;void 0==c&&(c=b.originalEvent.pageX);void 0==d&&(d=b.originalEvent.pageY);b.originalEvent.targetTouches&&\nb.originalEvent.targetTouches[0]?(c=b.originalEvent.targetTouches[0].pageX,d=b.originalEvent.targetTouches[0].pageY):b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(c=b.originalEvent.changedTouches[0].pageX,d=b.originalEvent.changedTouches[0].pageY);return[c,d]},qb=function(b,c){b/=z;c/=D;var d=S.quaternion,f=new $3Dmol.Vector3(0,0,S.position.z);U.projectVector(f,Q);f.x+=2*b;f.y-=2*c;U.unprojectVector(f,Q);f.z=0;f.applyQuaternion(d);return f},lb=function(b,c){var d=n.width(),f=\nn.height();if(void 0!=M&&!F){d/=E;f/=L;var e=$(\"canvas\",n).offset();b=Math.floor((b-e.left)/d);if(L-Math.floor((c-e.top)/f)-1!=H||b!=N)return!1}return!0};$(\"body\").bind(\"mouseup touchend\",function(b){if(da&&ca){var c=Ba(b),d=c[0];c=c[1];if(d==ma&&c==qa){var f=$(\"canvas\",n).offset();0!=A.length&&(V.setFromCamera({x:(d-f.left)/z*2-1,y:2*-((c-f.top)/D)+1,z:-1},Q),d=V.intersectObjects(O,A),d.length&&(d=d[0].clickable,void 0!==d.callback&&\"function\"===typeof d.callback&&d.callback(d,l,b,n)))}}da=!1});\nvar Wa=function(b){if(c.lowerZoomLimit&&0<c.lowerZoomLimit){var d=150-c.lowerZoomLimit;b>d&&(b=d)}c.upperZoomLimit&&0<c.upperZoomLimit&&(d=150-c.upperZoomLimit,b<d&&(b=d));150<b&&(b=149.85);return b};this.setZoomLimits=function(b,d){\"undefined\"!==typeof b&&(c.lowerZoomLimit=b);d&&(c.upperZoomLimit=d);S.position.z=Wa(S.position.z);ea()};var db,Xa=this._handleMouseDown=function(b){b.preventDefault();if(ca){var c=Ba(b),d=c[0];c=c[1];void 0!==d&&(da=!0,db=b.which,ma=d,qa=c,ha=0,b.originalEvent.targetTouches&&\n2==b.originalEvent.targetTouches.length&&(ha=Qa(b)),B=S.quaternion,jb=S.position.z,ja=O.position.clone(),xa=Z,Ha=aa)}},mb=this._handleMouseScroll=function(b){b.preventDefault();if(ca){var c=Ba(b),d=c[0];void 0!==d&&lb(d,c[1])&&(c=.85*(150-S.position.z),d=1,b.originalEvent.ctrlKey&&(d=-1),b.originalEvent.detail?S.position.z+=d*c*b.originalEvent.detail/10:b.originalEvent.wheelDelta&&(S.position.z-=d*c*b.originalEvent.wheelDelta/400),S.position.z=Wa(S.position.z),ea())}};this.pngURI=function(){return this.getCanvas().toDataURL(\"image/png\")};\nthis.getCanvas=function(){return y.get(0)};this.setHoverDuration=function(b){C=b};var eb,Ya=this._handleMouseMove=function(b){z=n.width();D=n.height();clearTimeout(eb);var c=$(\"canvas\",n).offset(),d=(Ba(b)[0]-c.left)/z*2-1,f=2*-((Ba(b)[1]-c.top)/D)+1;null!==G&&kb(d,f,b);eb=setTimeout(function(){if(0!=T.length){V.setFromCamera({x:d,y:f,z:-1},Q);var b=V.intersectObjects(O,T);b.length?(b=b[0].clickable,Va(b),G=b):Va(null)}},C);b.preventDefault();if(ca&&da){c=0;var e=Ba(b),l=e[0],m=e[1];if(void 0!==l&&\nlb(l,m)){e=(l-ma)/z;var g=(m-qa)/D;0!=ha&&b.originalEvent.targetTouches&&2==b.originalEvent.targetTouches.length?(g=Qa(b),c=2,g=2*(g-ha)/(z+D),console.log(\"pinch \"+ha+\" dy \"+g)):b.originalEvent.targetTouches&&3==b.originalEvent.targetTouches.length&&(c=1);var h=K.getXYRatio(),x=h[0],w=h[1];e*=x;g*=w;h=Math.sqrt(e*e+g*g);3==c||3==db&&b.ctrlKey?(Z=xa+100*e,aa=Ha-100*g):2==c||3==db||b.shiftKey?(b=.85*(150-S.position.z),80>b&&(b=80),S.position.z=jb+g*b,S.position.z=Wa(S.position.z)):1==c||2==db||b.ctrlKey?\n(b=qb(x*(l-ma),w*(m-qa)),O.position.addVectors(ja,b)):0!==c&&1!=db||0===h||(b=Math.sin(h*Math.PI)/h,Y.x=Math.cos(h*Math.PI),Y.y=0,Y.z=b*e,Y.w=-b*g,S.quaternion=new $3Dmol.Quaternion(1,0,0,0),S.quaternion.multiply(Y),S.quaternion.multiply(B));ea()}}},Sa=function(b){n=b;z=n.width();D=n.height();J=K.getAspect(z,D);K.setSize(z,D);n.append(K.domElement);y=$(K.domElement);p||(y.bind(\"mousedown touchstart\",Xa),y.bind(\"DOMMouseScroll mousewheel\",mb),y.bind(\"mousemove touchmove\",Ya),y.bind(\"contextmenu\",function(b){b.preventDefault()}))};\nSa(n);this.setContainer=function(b){\"string\"===$.type(b)&&(b=$(\"#\"+b));b||(b=n);Sa(b);return this};this.setBackgroundColor=function(b,c){if(\"undefined\"==typeof c)c=1;else if(0>c||1<c)c=1;b=$3Dmol.CC.color(b);ca.fog.color=b;u=b.getHex();K.setClearColorHex(b.getHex(),c);ea();return this};this.setProjection=function(b){Q.ortho=\"orthographic\"===b;Ja()};this.setViewStyle=function(b){if(\"outline\"===b.style){var c={};b.color&&(c.color=$3Dmol.CC.color(b.color));b.width&&(c.width=b.width);K.enableOutline(c)}else K.disableOutline();\nreturn this};c.style&&this.setViewStyle(c);this.setWidth=function(b){z=b||z;K.setSize(z,D);return this};this.setHeight=function(b){D=b||D;K.setSize(z,D);return this};this.resize=function(){z=n.width();D=n.height();J=K.getAspect(z,D);K.setSize(z,D);Q.aspect=J;Q.updateProjectionMatrix();ea();return this};$(window).resize(this.resize);this.getModel=function(b){return b in f?f[b]:0==f.length?null:f[f.length-1]};this.rotate=function(b,c,d,f){d=void 0!==d?d:0;\"undefined\"===typeof c&&(c=\"y\");\"x\"==c&&(c=\n{x:1,y:0,z:0});\"y\"==c&&(c={x:0,y:1,z:0});\"z\"==c&&(c={x:0,y:0,z:1});var e=Math.PI*b/180;b=Math.sin(e/2);e=Math.cos(e/2);c=(new $3Dmol.Quaternion(c.x*b,c.y*b,c.z*b,e)).normalize();d?(c=(new $3Dmol.Quaternion).copy(S.quaternion).multiply(c),Ka(d,f,O.position,S.position.z,c,W)):(S.quaternion.multiply(c),ea());return this};this.surfacesFinished=function(){for(var b in x)if(!x[b][0].done)return!1;return!0};this.getView=function(){if(!O)return[0,0,0,0,0,0,0,1];var b=O.position,c=S.quaternion;return[b.x,\nb.y,b.z,S.position.z,c.x,c.y,c.z,c.w]};this.setView=function(b,c){if(void 0===b||!(b instanceof Array||8!==b.length)||!O||!S)return this;O.position.x=b[0];O.position.y=b[1];O.position.z=b[2];S.position.z=b[3];S.quaternion.x=b[4];S.quaternion.y=b[5];S.quaternion.z=b[6];S.quaternion.w=b[7];\"undefined\"!=typeof b[8]&&(S.position.x=b[8],S.position.y=b[9]);ea(c);return this};this.render=function(b){K.setViewport();A.splice(0,A.length);T.splice(0,T.length);var c;var d=0;for(c=f.length;d<c;d++){var e=f[d];\nif(e){var n=e.selectedAtoms({clickable:!0});e=e.selectedAtoms({hoverable:!0});Array.prototype.push.apply(T,e);Array.prototype.push.apply(A,n)}}d=0;for(c=w.length;d<c;d++)(n=w[d])&&n.clickable&&A.push(n),n&&n.hoverable&&T.push(n);d=this.getView();n=K.supportedExtensions();for(c=0;c<f.length;c++)f[c]&&f[c].globj(O,n);for(c=0;c<w.length;c++)w[c]&&w[c].globj(O,n);for(c in x)if(x.hasOwnProperty(c))for(e=x[c],n=0;n<e.length;n++)if(e.hasOwnProperty(n)){var l=e[n].geo;if(!e[n].finished)if(l.verticesNeedUpdate=\n!0,l.elementsNeedUpdate=!0,l.normalsNeedUpdate=!0,l.colorsNeedUpdate=!0,l.buffersNeedUpdate=!0,l.boundingSphere=null,e[n].done&&(e[n].finished=!0),e[n].lastGL&&O.remove(e[n].lastGL),l=e[n].mat instanceof $3Dmol.LineBasicMaterial?new $3Dmol.Line(l,e[n].mat):new $3Dmol.Mesh(l,e[n].mat),l.visible=e[n].mat.transparent&&0==e[n].mat.opacity?!1:!0,1<e[n].symmetries.length||1==e[n].symmetries.length&&!e[n].symmetries[n].isIdentity()){var m,g=new $3Dmol.Object3D;for(m=0;m<e[n].symmetries.length;m++){var h=\nl.clone();h.matrix=e[n].symmetries[m];h.matrixAutoUpdate=!1;g.add(h)}e[n].lastGL=g;O.add(g)}else e[n].lastGL=l,O.add(l)}this.setView(d);\"function\"===typeof b&&b(this);return this};this.selectedAtoms=function(b){return h(b)};this.getUniqueValues=function(b,c){\"undefined\"===typeof c&&(c={});c=h(c);var d={},f;for(f in c)c[f].hasOwnProperty(b)&&(d[c[f][b]]=!0);return Object.keys(d)};this.pdbData=function(b){b=h(b);for(var c=\"\",d=0,f=b.length;d<f;++d)c+=b[d].pdbline+\"\\n\";return c};var Ca=function(b,c,\nd){if(1==d)return c;if(0==d)return b;var f=b.x*c.x+b.y*c.y+b.z*c.z+b.w*c.w;if(.9995<f)return b=new $3Dmol.Quaternion(b.x+d*(c.x-b.x),b.y+d*(c.y-b.y),b.z+d*(c.z-b.z),b.w+d*(c.w-b.w)),b.normalize(),b;0>f&&(c=c.clone().multiplyScalar(-1),f=-f);1<f?f=1:-1>f&&(f=-1);d*=Math.acos(f);c=c.clone();c.sub(b.clone().multiplyScalar(f));c.normalize();f=Math.cos(d);d=Math.sin(d);b=new $3Dmol.Quaternion(b.x*f+c.x*d,b.y*f+c.y*d,b.z*f+c.z*d,b.w*f+c.w*d);b.normalize();return b},Da;this.spin=function(b){clearInterval(Da);\n\"undefined\"==typeof b&&(b=\"y\");if(\"boolean\"==typeof b)if(b)b=\"y\";else return;Array.isArray(b)&&(b={x:b[0],y:b[1],z:b[2]});var c=this;Da=setInterval(function(){c.rotate(1,b)},25)};var Ka=function(b,c,d,f,e,n){var l=Math.ceil(b/20);1>l&&(l=1);X++;b=O.position.clone();var m=S.position.z,g=S.quaternion.clone(),h=W.clone();if(c){l=Array(l);for(var x=l.length,w=0;w<x;w++){var p=(w+1)/x;c={mpos:b,rz:m,rot:g};d&&(c.mpos=d.clone().sub(b).multiplyScalar(p).add(b));\"undefined\"!=typeof f&&null!=f&&(c.rz=m+p*\n(f-m));e&&(c.rot=Ca(g,e,p));n&&(c.cam=n.clone().sub(h).multiplyScalar(p).add(h));l[w]=c}var y=0;var q=function(){var b=l[y];y+=1;b.mpos&&(O.position=b.mpos);b.rz&&(S.position.z=b.rz);b.rot&&(S.quaternion=b.rot);b.cam&&Q.lookAt(b.cam);y<l.length?setTimeout(q,20):Ia();ea()}}else{var t,A,ka;p=1/l;d&&(t=d.clone().sub(b).multiplyScalar(p));\"undefined\"!=typeof f&&null!=f&&(A=p*(f-m));if(e){c=Ca(g,e,p);var u=g.clone().inverse().multiply(c)}n&&(ka=n.clone().sub(h).multiplyScalar(p));y=0;q=function(){y+=1;\nt&&O.position.add(t);A&&(S.position.z+=A);u&&S.quaternion.multiply(u);ka&&(W.add(ka),Q.lookAt(W));y<l?setTimeout(q,20):Ia();ea()}}setTimeout(q,20)};this.zoom=function(b,c,d){c=void 0!==c?c:0;b=150-(150-S.position.z)/(b||2);0<c?Ka(c,d,O.position,Wa(b),S.quaternion,W):(S.position.z=Wa(b),ea());return this};this.translate=function(b,c,d,f){d=void 0!==d?d:0;b/=z;c/=D;var e=new $3Dmol.Vector3(0,0,-150);U.projectVector(e,Q);e.x-=b;e.y-=c;U.unprojectVector(e,Q);e.z=0;b=W.clone().add(e);0<d?Ka(d,f,O.position,\nS.position.z,S.quaternion,b):(W=b,Q.lookAt(W),ea());return this};this.fitSlab=function(b){b=b||{};b=h(b);var c=$3Dmol.getExtent(b);b=c[1][0]-c[0][0];var d=c[1][1]-c[0][1];c=c[1][2]-c[0][2];b=Math.sqrt(b*b+d*d+c*c);5>b&&(b=5);Z=-b/1.9;aa=b/2;return this};this.center=function(b,c,d){c=void 0!==c?c:0;b=b||{};var f=h(b),e=$3Dmol.getExtent(f);if($.isEmptyObject(b)){$.each(w,function(b,c){c&&c.boundingSphere&&c.boundingSphere.center&&(b=c.boundingSphere.center,c=c.boundingSphere.radius,0<c?(f.push(new $3Dmol.Vector3(b.x+\nc,b.y,b.z)),f.push(new $3Dmol.Vector3(b.x-c,b.y,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y+c,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y-c,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y,b.z+c)),f.push(new $3Dmol.Vector3(b.x,b.y,b.z-c))):f.push(b))});e=$3Dmol.getExtent(f);b=f;var n=e}else b=h({}),n=$3Dmol.getExtent(b);b=new $3Dmol.Vector3(e[2][0],e[2][1],e[2][2]);var l=n[1][0]-n[0][0],m=n[1][1]-n[0][1];n=n[1][2]-n[0][2];l=Math.sqrt(l*l+m*m+n*n);5>l&&(l=5);Z=-l/1.9;aa=l/2;l=e[1][0]-e[0][0];m=e[1][1]-e[0][1];n=e[1][2]-\ne[0][2];l=Math.sqrt(l*l+m*m+n*n);5>l&&(l=5);e=25;for(l=0;l<f.length;l++)f[l]&&(m=b.distanceToSquared(f[l]),m>e&&(e=m));l=2*Math.sqrt(e);b=b.clone().multiplyScalar(-1);0<c?Ka(c,d,b,S.position.z,S.quaternion,W):(O.position=b,ea());return this};this.zoomTo=function(b,c,d){c=void 0!==c?c:0;b=b||{};var f=h(b),e=$3Dmol.getExtent(f);if($.isEmptyObject(b)){$.each(w,function(b,c){c&&c.boundingSphere&&c.boundingSphere.center&&(b=c.boundingSphere.center,c=c.boundingSphere.radius,0<c?(f.push(new $3Dmol.Vector3(b.x+\nc,b.y,b.z)),f.push(new $3Dmol.Vector3(b.x-c,b.y,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y+c,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y-c,b.z)),f.push(new $3Dmol.Vector3(b.x,b.y,b.z+c)),f.push(new $3Dmol.Vector3(b.x,b.y,b.z-c))):f.push(b))});e=$3Dmol.getExtent(f);var n=f;var l=e}else n=h({}),l=$3Dmol.getExtent(n);n=new $3Dmol.Vector3(e[2][0],e[2][1],e[2][2]);var m=l[1][0]-l[0][0],g=l[1][1]-l[0][1];l=l[1][2]-l[0][2];m=Math.sqrt(m*m+g*g+l*l);5>m&&(m=5);Z=-m/1.9;aa=m/2;0===Object.keys(b).length&&(Z=-999999,\naa=999999);m=e[1][0]-e[0][0];g=e[1][1]-e[0][1];l=e[1][2]-e[0][2];m=Math.sqrt(m*m+g*g+l*l);5>m&&(m=5);b=25;for(e=0;e<f.length;e++)f[e]&&(m=n.distanceToSquared(f[e]),m>b&&(b=m));m=2*Math.sqrt(b);n=n.clone().multiplyScalar(-1);b=-(.5*m/Math.tan(Math.PI/180*Q.fov/2)-150);b=Wa(b);0<c?Ka(c,d,n,b,S.quaternion,W):(O.position=n,S.position.z=b,ea());return this};this.setSlab=function(b,c){Z=b;aa=c};this.getSlab=function(b){return{near:Z,far:aa}};this.addLabel=function(b,c,d){c=c||{};d&&(d=$3Dmol.getExtent(h(d)),\nc.position={x:d[2][0],y:d[2][1],z:d[2][2]});b=new $3Dmol.Label(b,c);b.setContext();O.add(b.sprite);c.fixed&&P.push(R.length);R.push(b);ea();return b};this.addResLabels=function(b,c){e(\"addResLabels\",b,this,c);ea();return this};this.addPropertyLabels=function(b,c,d){e(\"addPropertyLabels\",b,c,this,d);ea();return this};this.removeLabel=function(b){for(var c=0;c<R.length;c++)if(R[c]==b){R.splice(c,1);b.dispose();O.remove(b.sprite);break}ea();return this};this.removeAllLabels=function(){for(var b=0;b<\nR.length;b++)O.remove(R[b].sprite);R.splice(0,R.length);ea();return this};this.setLabelStyle=function(b,c){O.remove(b.sprite);b.dispose();b.stylespec=c;b.setContext();O.add(b.sprite);ea();return b};this.setLabelText=function(b,c){O.remove(b.sprite);b.dispose();b.text=c;b.setContext();O.add(b.sprite);ea();return b};this.addShape=function(b){b=b||{};b=new $3Dmol.GLShape(b);b.shapePosition=w.length;w.push(b);return b};this.removeShape=function(b){if(!b)return this;b.removegl(O);for(delete w[b.shapePosition];0<\nw.length&&\"undefined\"===typeof w[w.length-1];)w.pop();return this};this.removeAllShapes=function(){for(var b=0;b<w.length;b++)w[b].removegl(O);w.splice(0,w.length);return this};var sa=function(b){if(b.hasOwnProperty(\"x\")&&b.hasOwnProperty(\"y\")&&b.hasOwnProperty(\"z\"))return b;b=h(b);if(0==b.length)return{x:0,y:0,z:0};b=$3Dmol.getExtent(b);return{x:b[0][0]+(b[1][0]-b[0][0])/2,y:b[0][1]+(b[1][1]-b[0][1])/2,z:b[0][2]+(b[1][2]-b[0][2])/2}};this.addSphere=function(b){b=b||{};b.center=sa(b.center);var c=\nnew $3Dmol.GLShape(b);c.shapePosition=w.length;c.addSphere(b);w.push(c);c.finalize();return c};this.addBox=function(b){b=b||{};void 0!=b.corner&&(b.corner=sa(b.corner));void 0!=b.center&&(b.center=sa(b.center));var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;c.addBox(b);w.push(c);c.finalize();return c};this.addArrow=function(b){b=b||{};b.start=sa(b.start);b.end=sa(b.end);var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;c.addArrow(b);w.push(c);c.finalize();return c};this.addCylinder=function(b){b=\nb||{};b.start=sa(b.start);b.end=sa(b.end);var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;b.dashed?c.addDashedCylinder(b):c.addCylinder(b);w.push(c);c.finalize();return c};this.addCurve=function(b){b=b||{};var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;c.addCurve(b);w.push(c);c.finalize();return c};this.addLine=function(b){b=b||{};b.start=sa(b.start);b.end=sa(b.end);b.wireframe=!0;var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;if(b.dashed){b.dashLength=b.dashLength||.5;b.gapLength=\nb.gapLength||.5;b.start=b.start||{};b.end=b.end||{};var d=new $3Dmol.Vector3(b.start.x||0,b.start.y||0,b.start.z||0),f=new $3Dmol.Vector3(b.end.x,b.end.y||0,b.end.z||0),e=new $3Dmol.Vector3;new $3Dmol.Vector3;new $3Dmol.Vector3;var n,l=d.clone(),m=0;e.subVectors(f,d);var g=e.length();e.normalize();var h=e.clone();e=e.clone();h.multiplyScalar(b.dashLength);e.multiplyScalar(b.gapLength);var x=h.length();for(n=e.length();m<g;){if(m+x>g){b.start=d;b.end=f;c.addLine(b);break}l.addVectors(d,h);b.start=\nd;b.end=l;c.addLine(b);d=l.clone();m+=x;l.addVectors(d,e);d=l.clone();m+=n}c.finalize()}else c.addLine(b);w.push(c);c.finalize();return c};this.addUnitCell=function(b){b||(b=this.getModel());var c=new $3Dmol.GLShape({wireframe:!0});c.shapePosition=w.length;var d=b.getCrystData();if(d){if(d.matrix)b=d.matrix;else{b=d.a;var f=d.b,e=d.c,n=d.alpha,l=d.beta;d=d.gamma;n=n*Math.PI/180;l=l*Math.PI/180;d=d*Math.PI/180;var m=Math.cos(l);n=(Math.cos(n)-Math.cos(l)*Math.cos(d))/Math.sin(d);b=new $3Dmol.Matrix4(b,\nf*Math.cos(d),e*m,0,0,f*Math.sin(d),e*n,0,0,0,e*Math.sqrt(Math.max(0,1-m*m-n*n)),0,0,0,0,1)}f=[new $3Dmol.Vector3(0,0,0),new $3Dmol.Vector3(1,0,0),new $3Dmol.Vector3(0,1,0),new $3Dmol.Vector3(0,0,1),new $3Dmol.Vector3(1,1,0),new $3Dmol.Vector3(0,1,1),new $3Dmol.Vector3(1,0,1),new $3Dmol.Vector3(1,1,1)];for(e=0;e<f.length;e++)f[e]=f[e].applyMatrix4(b);c.addLine({start:f[0],end:f[1]});c.addLine({start:f[0],end:f[2]});c.addLine({start:f[1],end:f[4]});c.addLine({start:f[2],end:f[4]});c.addLine({start:f[0],\nend:f[3]});c.addLine({start:f[3],end:f[5]});c.addLine({start:f[2],end:f[5]});c.addLine({start:f[1],end:f[6]});c.addLine({start:f[4],end:f[7]});c.addLine({start:f[6],end:f[7]});c.addLine({start:f[3],end:f[6]});c.addLine({start:f[5],end:f[7]})}w.push(c);c.finalize();return c};this.addCustom=function(b){b=b||{};var c=new $3Dmol.GLShape(b);c.shapePosition=w.length;c.addCustom(b);w.push(c);c.finalize();return c};this.addVolumetricData=function(b,c,d){d=d||{};var f=new $3Dmol.GLShape(d);f.shapePosition=\nw.length;f.addVolumetricData(b,c,d);w.push(f);return f};this.addIsosurface=function(b,c,d){c=c||{};var f=new $3Dmol.GLShape(c);f.shapePosition=w.length;f.addIsosurface(b,c,d);w.push(f);return f};this.enableFog=function(b){b?ca.fog=new $3Dmol.Fog(u,100,200):(c.disableFog=!0,ea())};this.setFrame=function(b){return new Promise(function(c,d){d=f.map(function(c){return c.setFrame(b)});Promise.all(d).then(function(){c()})})};this.getNumFrames=function(){for(var b=0,c=0;c<f.length;c++)f[c].getNumFrames()>\nb&&(b=f[c].getNumFrames());return b};this.animate=function(b){X++;var c=100,d=\"forward\",f=0;b=b||{};b.interval&&(c=b.interval);b.loop&&(d=b.loop);b.reps&&(f=b.reps);var e=this.getNumFrames(),n=this,l=0,m=1;b.step&&(m=b.step,f/=m);var g=0,h=e*f,x=new Date,w=function(){n.render();if(++g!=h&&n.isAnimated()){var b=c-(new Date-x);setTimeout(p,0<b?b:0,d)}else clearTimeout(y),Ia()},p=function(b){x=new Date;\"forward\"==b?n.setFrame(l).then(function(){l=(l+m)%e;w()}):\"backward\"==b?n.setFrame(e-1-l).then(function(){l=\n(l+m)%e;w()}):n.setFrame(l).then(function(){l+=m;m*=0==l%(e-1)?-1:1;w()})},y=setTimeout(p,0,d);return this};this.stopAnimate=function(){X=0;return this};this.isAnimated=function(){return 0<X};this.addModel=function(b,c,d){d&&!d.defaultcolors&&(d.defaultcolors=q);var e=new $3Dmol.GLModel(f.length,d);e.addMolData(b,c,d);f.push(e);return e};this.addModels=function(b,c,d){d=d||{};d.multimodel=!0;d.frames=!0;b=$3Dmol.GLModel.parseMolData(b,c,d);for(c=0;c<b.length;c++){var e=new $3Dmol.GLModel(f.length,\nq);e.setAtomDefaults(b[c]);e.addFrame(b[c]);e.setFrame(0);b.modelData&&e.setModelData(b.modelData[c]);e.setDontDuplicateAtoms(!d.duplicateAssemblyAtoms);f.push(e)}return f};this.addModelsAsFrames=function(b,c,d){d=d||{};d.multimodel=!0;d.frames=!0;var e=new $3Dmol.GLModel(f.length,q);e.addMolData(b,c,d);f.push(e);return e};this.addAsOneMolecule=function(b,c,d){d=d||{};d.multimodel=!0;d.onemol=!0;var e=new $3Dmol.GLModel(f.length,q);e.addMolData(b,c,d);f.push(e);return e};this.removeModel=function(b){if(b){b.removegl(O);\nfor(delete f[b.getID()];0<f.length&&\"undefined\"===typeof f[f.length-1];)f.pop();return this}};this.removeAllModels=function(){for(var b=0;b<f.length;b++)f[b].removegl(O);f.splice(0,f.length);return this};this.exportJSON=function(b,c){var d={};d.m=void 0===c?f.map(function(c){return c.toCDObject(b)}):[model[c].toCDObject()];return JSON.stringify(d)};this.createModelFrom=function(b,c){for(var d=new $3Dmol.GLModel(f.length,q),e=0;e<f.length;e++)if(f[e]){var n=f[e].selectedAtoms(b);d.addAtoms(n);c&&f[e].removeAtoms(n)}f.push(d);\nreturn d};this.setStyle=function(b,c){\"undefined\"===typeof c&&(c=b,b={});e(\"setStyle\",b,c,!1);return this};this.addStyle=function(b,c){\"undefined\"===typeof c&&(c=b,b={});e(\"setStyle\",b,c,!0);return this};this.setClickable=function(b,c,d){e(\"setClickable\",b,c,d);return this};this.setHoverable=function(b,c,d,f){e(\"setHoverable\",b,c,d,f);return this};this.vibrate=function(b,c){e(\"vibrate\",b,c);return this};this.setColorByProperty=function(b,c,d,f){e(\"setColorByProperty\",b,c,d,f);return this};this.setColorByElement=\nfunction(b,c){e(\"setColorByElement\",b,c);return this};var ia=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b[f];\"undefined\"!=typeof e&&(e.x<c[0][0]||e.x>c[1][0]||e.y<c[0][1]||e.y>c[1][1]||e.z<c[0][2]||e.z>c[1][2]||d.push(e))}return d},Cb=function(b){return(b[1][0]-b[0][0])*(b[1][1]-b[0][1])*(b[1][2]-b[0][2])},vb=function(b,c,d){for(var f=[],e={},n=0,l=c.length;n<l;n++)e[c[n].index]=n;var m=function(b){for(var c=[],d=0,f=b.length;d<f;d++)b[d].index in e&&c.push(e[b[d].index]);return c},g=function(b){var c=\n[];c[0]=[b[0][0],b[0][1],b[0][2]];c[1]=[b[1][0],b[1][1],b[1][2]];return c},h=function(b){if(64E3>Cb(b))return[b];var c=b[1][0]-b[0][0],d=b[1][1]-b[0][1],f=b[1][2]-b[0][2];d=c>d&&c>f?0:d>c&&d>f?1:2;f=g(b);c=g(b);b=(b[1][d]-b[0][d])/2+b[0][d];f[1][d]=b;c[0][d]=b;b=h(f);c=h(c);return b.concat(c)};b=h(b);n=0;for(l=b.length;n<l;n++){var x=g(b[n]);x[0][0]-=6;x[0][1]-=6;x[0][2]-=6;x[1][0]+=6;x[1][1]+=6;x[1][2]+=6;x=ia(c,x);var w=ia(d,b[n]);f.push({extent:b[n],atoms:m(x),toshow:m(w)})}return f},wb=function(b,\nc,d){var f=new $3Dmol.Geometry(!0),e=f.updateGeoGroup(0),n=[];var l=0;for(h=b.length;l<h;l++){var m=b[l];m&&(\"undefined\"!=typeof m.surfaceColor?n[l]=m.surfaceColor:m.color&&(n[l]=$3Dmol.CC.color(m.color)))}var g=e.vertexArray;m=c.vertices;var h;l=0;for(h=m.length;l<h;l++)b=3*e.vertices,g[b]=m[l].x,g[b+1]=m[l].y,g[b+2]=m[l].z,e.vertices++;g=e.colorArray;if(d.voldata&&d.volscheme){n=d.volscheme;var x=d.voldata;var w=n.range()||[-1,1];l=0;for(h=m.length;l<h;l++){b=x.getVal(m[l].x,m[l].y,m[l].z);var p=\n$3Dmol.CC.color(n.valueToHex(b,w));b=3*l;g[b]=p.r;g[b+1]=p.g;g[b+2]=p.b}}else if(0<n.length)for(l=0,h=m.length;l<h;l++)x=m[l].atomid,b=3*l,g[b]=n[x].r,g[b+1]=n[x].g,g[b+2]=n[x].b;c=c.faces;e.faceidx=c.length;f.initTypedArrays();m=e.vertexArray;g=e.normalArray;l=0;for(h=c.length;l<h;l+=3){n=c[l+1];x=c[l+2];b=3*c[l];n*=3;x*=3;w=new $3Dmol.Vector3(m[b],m[b+1],m[b+2]);p=new $3Dmol.Vector3(m[n],m[n+1],m[n+2]);var y=new $3Dmol.Vector3(m[x],m[x+1],m[x+2]);y.subVectors(y,p);w.subVectors(w,p);y.cross(w);w=\ny;w.normalize();g[b]+=w.x;g[n]+=w.x;g[x]+=w.x;g[b+1]+=w.y;g[n+1]+=w.y;g[x+1]+=w.y;g[b+2]+=w.z;g[n+2]+=w.z;g[x+2]+=w.z}e.faceArray=new Uint16Array(c);d=new $3Dmol.Mesh(f,d);d.doubleSided=!0;return d};this.addMesh=function(b){b={geo:b.geometry,mat:b.material,done:!0,finished:!1};var c=oa();x[c]=b;return c};var ob=function(b){var c=[];$.each(b,function(b,d){c[b]=$.extend({},d)});return c},ta={VDW:$3Dmol.SurfaceType.VDW,MS:$3Dmol.SurfaceType.MS,SAS:$3Dmol.SurfaceType.SAS,SES:$3Dmol.SurfaceType.SES};this.addSurface=\nfunction(b,c,d,e,n,m){var g=oa();\"string\"==typeof b?void 0!==ta[b]?b=ta[b]:console.log(\"Surface type : \"+b+\" is not recognized\"):void 0===b&&(b=$3Dmol.SurfaceType.VDW);var w=null,p=null;d=ob(h(d));w=e?ob(h(e)):d;var y=!1;for(e=0;e<f.length;e++)if(f[e]){var q=f[e].getSymmetries();if(1<q.length||1==q.length&&!q[0].isIdentity()){y=!0;break}}q=function(d,e,f){p=n?ob(h(n)):f;var m=$3Dmol.getExtent(f,!0);if(c.map&&c.map.prop){var x=c.map.prop;var w=c.map.scheme||c.map.gradient||new $3Dmol.Gradient.RWB;\nvar y=w.range();y||(y=$3Dmol.getPropertyRange(f,x));c.colorscheme={prop:x,gradient:w}}var q=0;for(x=e.length;q<x;q++)w=e[q],w.surfaceColor=$3Dmol.getColorFromStyle(w,c);var t=Cb(m),u=vb(m,e,f);if(p&&p.length&&0<p.length){var R=$3Dmol.getExtent(p,!0);u.sort(function(b,c){var d=function(b,c){var d=b.extent;b=d[1][0]-d[0][0]-c[2][0];var e=d[1][1]-d[0][1]-c[2][1];c=d[1][2]-d[0][2]-c[2][2];return b*b+e*e+c*c};b=d(b,R);c=d(c,R);return b-c})}var I=[];q=0;for(x=e.length;q<x;q++)w=e[q],I[q]={x:w.x,y:w.y,z:w.z,\nserial:q,elem:w.elem};if($3Dmol.syncSurface){f=function(c){return new Promise(function(f,n){n=b;var m=u[c].extent,g=u[c].atoms;var h=u[c].toshow;var x=new $3Dmol.ProteinSurface;x.initparm(m,1===n?!1:!0,t);x.fillvoxels(I,g);x.buildboundary();if(n==$3Dmol.SurfaceType.SES||n==$3Dmol.SurfaceType.MS)x.fastdistancemap(),x.boundingatom(!1),x.fillvoxelswaals(I,g);x.marchingcube(n);h=x.getFacesAndVertices(h);n=$3Dmol.splitMesh({vertexArr:h.vertices,faceArr:h.faces});m=0;for(g=n.length;m<g;m++)h={vertices:n[m].vertexArr,\nfaces:n[m].faceArr},h=wb(e,h,A),$3Dmol.mergeGeos(d.geo,h);l.render();f()})};m=[];for(q=0;q<u.length;q++)m.push(f(q));return Promise.all(m).then(function(){d.done=!0;return Promise.resolve(g)})}var H=[];0>b&&(b=0);q=0;for(x=4;q<x;q++)f=new Worker($3Dmol.SurfaceWorker),H.push(f),f.postMessage({type:-1,atoms:I,volume:t});return new Promise(function(c,f){var n=0,m=function(b){b=$3Dmol.splitMesh({vertexArr:b.data.vertices,faceArr:b.data.faces});for(var f=0,m=b.length;f<m;f++){var h=wb(e,{vertices:b[f].vertexArr,\nfaces:b[f].faceArr},A);$3Dmol.mergeGeos(d.geo,h)}l.render();n++;n==u.length&&(d.done=!0,c(g))},h=function(b){console.log(b.message+\" (\"+b.filename+\":\"+b.lineno+\")\");f(b)};for(q=0;q<u.length;q++){var x=H[q%H.length];x.onmessage=m;x.onerror=h;x.postMessage({type:b,expandedExtent:u[q].extent,extendedAtoms:u[q].atoms,atomsToShow:u[q].toshow})}})};c=c||{};var A=t(c),u=[];e=null;if(y){y={};var R={};for(e=0;e<f.length;e++)y[e]=[],R[e]=[];for(e=0;e<w.length;e++)y[w[e].model].push(w[e]);for(e=0;e<d.length;e++)R[d[e].model].push(d[e]);\nw=[];for(e=0;e<f.length;e++)0<R[e].length&&(u.push({geo:new $3Dmol.Geometry(!0),mat:A,done:!1,finished:!1,symmetries:f[e].getSymmetries()}),w.append(q(u[e],y[e],R[e])));e=Promise.all(w)}else u.push({geo:new $3Dmol.Geometry(!0),mat:A,done:!1,finished:!1,symmetries:[new $3Dmol.Matrix4]}),e=q(u[u.length-1],w,d);x[g]=u;e.surfid=g;return m&&\"function\"==typeof m?(e.then(function(b){m(b)}),g):e};this.setSurfaceMaterialStyle=function(b,c){if(x[b]){b=x[b];for(var d=0;d<b.length;d++){var e=b[d].mat=t(c);b[d].mat.side=\n$3Dmol.FrontSide;if(c.color){b[d].mat.color=c.color;b[d].geo.colorsNeedUpdate=!0;var f=$3Dmol.CC.color(c.color);b[d].geo.setColors(function(){return f})}else if(e.voldata&&e.volscheme){var n=e.volscheme,l=e.voldata,m=n.range()||[-1,1];b[d].geo.setColors(function(b,c,d){b=l.getVal(b,c,d);return $3Dmol.CC.color(n.valueToHex(b,m))})}b[d].finished=!1}}return this};this.removeSurface=function(b){for(var c=x[b],d=0;d<c.length;d++)c[d]&&c[d].lastGL&&(void 0!==c[d].geo&&c[d].geo.dispose(),void 0!==c[d].mat&&\nc[d].mat.dispose(),O.remove(c[d].lastGL));delete x[b];ea();return this};this.removeAllSurfaces=function(){for(var b in x)if(x.hasOwnProperty(b)){for(var c=x[b],d=0;d<c.length;d++)c[d]&&c[d].lastGL&&(void 0!==c[d].geo&&c[d].geo.dispose(),void 0!==c[d].mat&&c[d].mat.dispose(),O.remove(c[d].lastGL));delete x[b]}ea();return this};this.jmolMoveTo=function(){var b=O.position;b=\"center { \"+-b.x+\" \"+-b.y+\" \"+-b.z+\" }; \";var c=S.quaternion;return b+=\"moveto .5 quaternion { \"+c.x+\" \"+c.y+\" \"+c.z+\" \"+c.w+\" };\"};\nthis.clear=function(){this.removeAllSurfaces();this.removeAllModels();this.removeAllLabels();this.removeAllShapes();ea();return this};this.mapAtomProperties=function(b,c){c=c||{};var e=h(c);if(\"function\"==typeof b)for(var f=0,n=e.length;f<n;f++)c=e[f],b(c);else for(f=0,n=e.length;f<n;f++){c=e[f];for(var l=0,m=b.length;l<m;l++){var g=b[l];if(g.props)for(var x in g.props)if(g.props.hasOwnProperty(x)){a:{var w=c;var p=g;\"undefined\"===typeof p&&(p={});for(var y=d(p),q=0;q<y.length;q++)if(y[q].atomIsSelected(w,\np)){w=!0;break a}w=!1}w&&(c.properties||(c.properties={}),c.properties[x]=g.props[x])}}}return this};this.linkViewer=function(b){I.push(b);return this};try{\"function\"===typeof g&&g(this)}catch(ka){console.log(\"error with glviewer callback: \"+ka)}this.getPerceivedDistance=function(){return 150-S.position.z};this.setPerceivedDistance=function(b){S.position.z=150-b};this.setAutoEyeSeparation=function(b){var c=this.getPerceivedDistance();Q.position.x=b||0<Q.position.x?c*Math.tan(Math.PI/180*5):-c*Math.tan(Math.PI/\n180*5);Q.lookAt(new $3Dmol.Vector3(0,0,S.position.z));return Q.position.x}}}();$3Dmol.glmolViewer=$3Dmol.GLViewer;$3Dmol=$3Dmol||{};$3Dmol.Gradient=function(b,c){};$3Dmol.Gradient.valueToHex=function(b,c){};$3Dmol.Gradient.range=function(){};$3Dmol.Gradient.normalizeValue=function(b,c,d){if(c>=b)return d<b&&(d=b),d>c&&(d=c),{lo:b,hi:c,val:d};d>b&&(d=b);d<c&&(d=c);return{lo:c,hi:b,val:b-d+c}};\n$3Dmol.Gradient.RWB=function(b,c,d){\"undefined\"==typeof c&&$.isArray(b)&&2<=b.length&&(c=b[1],b=b[0]);this.valueToHex=function(h,e){h*=1;if(e){var t=e[0];var g=e[1]}else t=b,g=c;if(void 0===h)return 16777215;h=$3Dmol.Gradient.normalizeValue(t,g,h);t=h.lo;g=h.hi;h=h.val;e=e&&\"undefined\"!=typeof e[2]?e[2]:\"undefined\"!=typeof d?d:(t+g)/2;if(h<=e)return t=Math.floor(255*Math.sqrt((h-t)/(e-t))),16711680+256*t+t;t=Math.floor(255*Math.sqrt(1-(h-e)/(g-e)));return 65536*t+256*t+255};this.range=function(){return\"undefined\"!=\ntypeof b&&\"undefined\"!=typeof c?[b,c]:null}};\n$3Dmol.Gradient.ROYGB=function(b,c){\"undefined\"==typeof c&&$.isArray(b)&&2<=b.length&&(c=b[1],b=b[0]);this.valueToHex=function(d,h){d*=1;if(h){var e=h[0];h=h[1]}else e=b,h=c;if(\"undefined\"==typeof d)return 16777215;d=$3Dmol.Gradient.normalizeValue(e,h,d);e=d.lo;h=d.hi;d=d.val;var t=(e+h)/2,g=(e+t)/2,q=(t+h)/2;if(d<g)return e=Math.floor(255*Math.sqrt((d-e)/(g-e))),256*e+16711680;if(d<t)return e=Math.floor(255*Math.sqrt(1-(d-g)/(t-g))),65536*e+65280;if(d<q)return e=Math.floor(255*Math.sqrt((d-t)/(q-\nt))),65280+1*e;e=Math.floor(255*Math.sqrt(1-(d-q)/(h-q)));return 256*e+255};this.range=function(){return\"undefined\"!=typeof b&&\"undefined\"!=typeof c?[b,c]:null}};\n$3Dmol.Gradient.Sinebow=function(b,c){var d=1;\"undefined\"==typeof c&&$.isArray(b)&&2<=b.length&&(c=b[1],b=b[0]);c<b&&(d=-1,b*=-1,c*=-1);this.valueToHex=function(h,e){h*=d;if(e){var t=e[0];e=e[1]}else t=b,e=c;if(\"undefined\"==typeof h)return 16777215;h=$3Dmol.Gradient.normalizeValue(t,e,h);t=h.lo;e=h.hi;h=h.val;e=(h-t)/(e-t)*5/6+.5;t=Math.sin(Math.PI*e);h=Math.sin(Math.PI*(e+1/3));e=Math.sin(Math.PI*(e+2/3));return 65536*Math.floor(255*t*t)+256*Math.floor(255*e*e)+1*Math.floor(255*h*h)};this.range=\nfunction(){return\"undefined\"!=typeof b&&\"undefined\"!=typeof c?[b,c]:null}};$3Dmol.Gradient.builtinGradients={rwb:$3Dmol.Gradient.RWB,roygb:$3Dmol.Gradient.ROYGB,sinebow:$3Dmol.Gradient.Sinebow};$3Dmol.LabelCount=0;$3Dmol.Label=function(b,c){this.id=$3Dmol.LabelCount++;this.stylespec=c||{};this.canvas=document.createElement(\"canvas\");this.canvas.width=134;this.canvas.height=35;this.context=this.canvas.getContext(\"2d\");this.sprite=new $3Dmol.Sprite;this.text=b};\n$3Dmol.Label.prototype={constructor:$3Dmol.Label,getStyle:function(){return this.stylespec},setContext:function(){var b=function(b,d,h){\"undefined\"!=typeof b&&(h=b instanceof $3Dmol.Color?b.scaled():$3Dmol.CC.color(b).scaled());\"undefined\"!=typeof d&&(h.a=parseFloat(d));return h};return function(){var c=this.stylespec,d=\"undefined\"==typeof c.useScreen?!1:c.useScreen,h=c.showBackground;if(\"0\"===h||\"false\"===h)h=!1;\"undefined\"==typeof h&&(h=!0);var e=c.font?c.font:\"sans-serif\",t=parseInt(c.fontSize)?\nparseInt(c.fontSize):18,g=b(c.fontColor,c.fontOpacity,{r:255,g:255,b:255,a:1}),q=c.padding?c.padding:4,p=c.borderThickness?c.borderThickness:0,u=b(c.backgroundColor,c.backgroundOpacity,{r:0,g:0,b:0,a:1}),m=b(c.borderColor,c.borderOpacity,u),l=c.position?c.position:{x:-10,y:1,z:1},n=void 0!==c.inFront?c.inFront:!0;if(\"false\"===n||\"0\"===n)n=!1;var y=c.alignment||$3Dmol.SpriteAlignment.topLeft;\"string\"==typeof y&&y in $3Dmol.SpriteAlignment&&(y=$3Dmol.SpriteAlignment[y]);var f=\"\";c.bold&&(f=\"bold \");\nthis.context.font=f+t+\"px  \"+e;var x=this.context.measureText(this.text).width;h||(p=0);var w=x+2.5*p+2*q,R=1.25*t+2*p+2*q;if(c.backgroundImage){var P=c.backgroundImage;var A=c.backgroundWidth?c.backgroundWidth:P.width;f=c.backgroundHeight?c.backgroundHeight:P.height;A>w&&(w=A);f>R&&(R=f)}this.canvas.width=w;this.canvas.height=R;this.context.clearRect(0,0,this.canvas.width,this.canvas.height);f=\"\";c.bold&&(f=\"bold \");this.context.font=f+t+\"px  \"+e;this.context.fillStyle=\"rgba(\"+u.r+\",\"+u.g+\",\"+u.b+\n\",\"+u.a+\")\";this.context.strokeStyle=\"rgba(\"+m.r+\",\"+m.g+\",\"+m.b+\",\"+m.a+\")\";this.context.lineWidth=p;h&&(h=this.context,u=e=p,w-=2*p,R-=2*p,m=0<p,h.beginPath(),h.moveTo(e+6,u),h.lineTo(e+w-6,u),h.quadraticCurveTo(e+w,u,e+w,u+6),h.lineTo(e+w,u+R-6),h.quadraticCurveTo(e+w,u+R,e+w-6,u+R),h.lineTo(e+6,u+R),h.quadraticCurveTo(e,u+R,e,u+R-6),h.lineTo(e,u+6),h.quadraticCurveTo(e,u,e+6,u),h.closePath(),h.fill(),m&&h.stroke());c.backgroundImage&&(P=c.backgroundImage,A=c.backgroundWidth?c.backgroundWidth:\nP.width,f=c.backgroundHeight?c.backgroundHeight:P.height,this.context.drawImage(P,0,0,A,f));this.context.fillStyle=\"rgba(\"+g.r+\",\"+g.g+\",\"+g.b+\",\"+g.a+\")\";this.context.fillText(this.text,p+q,t+p+q,x);c=new $3Dmol.Texture(this.canvas);c.needsUpdate=!0;this.sprite.material=new $3Dmol.SpriteMaterial({map:c,useScreenCoordinates:d,alignment:y,depthTest:!n});this.sprite.scale.set(1,1,1);this.sprite.position.set(l.x,l.y,l.z)}}(),dispose:function(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose();\nvoid 0!==this.sprite.material&&this.sprite.material.dispose()}};$3Dmol=$3Dmol||{};\n$3Dmol.MarchingCubeInitializer=function(){var b={march:function(b,g,q,p){var t=!!p.fulltable,m=p.hasOwnProperty(\"origin\")&&p.origin.hasOwnProperty(\"x\")?p.origin:{x:0,y:0,z:0},l=!!p.voxel,n=p.matrix,y=p.nX||0,f=p.nY||0,x=p.nZ||0,w=p.scale||1,R=null;R=p.unitCube?p.unitCube:{x:w,y:w,z:w};var P=new Int32Array(y*f*x);p=0;for(w=P.length;p<w;++p)P[p]=-1;w=function(b,c,d,e,h,w){var p={x:0,y:0,z:0},y=h;!(e&1<<h)&&e&1<<w&&(y=w);y&1&&d++;y&2&&c++;y&4&&b++;n?(p=new $3Dmol.Vector3(b,c,d),p=p.applyMatrix4(n),p=\n{x:p.x,y:p.y,z:p.z}):(p.x=m.x+R.x*b,p.y=m.y+R.y*c,p.z=m.z+R.z*d);b=(f*b+c)*x+d;if(l)return g.push(p),g.length-1;0>P[b]&&(P[b]=g.length,g.push(p));return P[b]};var A=new Int32Array(12),T=t?h:c;t=t?e:d;for(p=0;p<y-1;++p)for(var G=0;G<f-1;++G)for(var C=0;C<x-1;++C){for(var z=0,D=0;8>D;++D)z|=!!(b[(f*(p+((D&4)>>2))+G+((D&2)>>1))*x+C+(D&1)]&2)<<D;if(0!==z&&255!==z){var I=T[z];if(0!==I)for(D=t[z],I&1&&(A[0]=w(p,G,C,z,0,1)),I&2&&(A[1]=w(p,G,C,z,1,3)),I&4&&(A[2]=w(p,G,C,z,3,2)),I&8&&(A[3]=w(p,G,C,z,2,0)),\nI&16&&(A[4]=w(p,G,C,z,4,5)),I&32&&(A[5]=w(p,G,C,z,5,7)),I&64&&(A[6]=w(p,G,C,z,7,6)),I&128&&(A[7]=w(p,G,C,z,6,4)),I&256&&(A[8]=w(p,G,C,z,0,4)),I&512&&(A[9]=w(p,G,C,z,1,5)),I&1024&&(A[10]=w(p,G,C,z,3,7)),I&2048&&(A[11]=w(p,G,C,z,2,6)),z=0;z<D.length;z+=3){I=A[D[z]];var K=A[D[z+1]],H=A[D[z+2]];l&&3<=z&&(g.push(g[I]),I=g.length-1,g.push(g[K]),K=g.length-1,g.push(g[H]),H=g.length-1);q.push(I);q.push(K);q.push(H)}}}},laplacianSmooth:function(b,c,d){var e=Array(c.length),g,m;var l=0;for(g=c.length;l<g;l++)e[l]=\n{x:0,y:0,z:0};var n=Array(20);for(l=0;20>l;l++)n[l]=Array(c.length);l=0;for(g=c.length;l<g;l++)n[0][l]=0;l=0;for(g=d.length/3;l<g;l++){var h=3*l,f=3*l+1,x=3*l+2;var w=!0;var q=0;for(m=n[0][d[h]];q<m;q++)if(d[f]==n[q+1][d[h]]){w=!1;break}w&&(n[0][d[h]]++,n[n[0][d[h]]][d[h]]=d[f]);w=!0;q=0;for(m=n[0][d[h]];q<m;q++)if(d[x]==n[q+1][d[h]]){w=!1;break}w&&(n[0][d[h]]++,n[n[0][d[h]]][d[h]]=d[x]);w=!0;q=0;for(m=n[0][d[f]];q<m;q++)if(d[h]==n[q+1][d[f]]){w=!1;break}w&&(n[0][d[f]]++,n[n[0][d[f]]][d[f]]=d[h]);\nw=!0;q=0;for(m=n[0][d[f]];q<m;q++)if(d[x]==n[q+1][d[f]]){w=!1;break}w&&(n[0][d[f]]++,n[n[0][d[f]]][d[f]]=d[x]);w=!0;for(q=0;q<n[0][d[x]];q++)if(d[h]==n[q+1][d[x]]){w=!1;break}w&&(n[0][d[x]]++,n[n[0][d[x]]][d[x]]=d[h]);w=!0;q=0;for(m=n[0][d[x]];q<m;q++)if(d[f]==n[q+1][d[x]]){w=!1;break}w&&(n[0][d[x]]++,n[n[0][d[x]]][d[x]]=d[f])}for(d=0;d<b;d++){l=0;for(g=c.length;l<g;l++)if(3>n[0][l])e[l].x=c[l].x,e[l].y=c[l].y,e[l].z=c[l].z;else if(3==n[0][l]||4==n[0][l]){e[l].x=0;e[l].y=0;q=e[l].z=0;for(m=n[0][l];q<\nm;q++)e[l].x+=c[n[q+1][l]].x,e[l].y+=c[n[q+1][l]].y,e[l].z+=c[n[q+1][l]].z;e[l].x+=.5*c[l].x;e[l].y+=.5*c[l].y;e[l].z+=.5*c[l].z;e[l].x/=.5+n[0][l];e[l].y/=.5+n[0][l];e[l].z/=.5+n[0][l]}else{e[l].x=0;e[l].y=0;q=e[l].z=0;for(m=n[0][l];q<m;q++)e[l].x+=c[n[q+1][l]].x,e[l].y+=c[n[q+1][l]].y,e[l].z+=c[n[q+1][l]].z;e[l].x+=1*c[l].x;e[l].y+=1*c[l].y;e[l].z+=1*c[l].z;e[l].x/=1+n[0][l];e[l].y/=1+n[0][l];e[l].z/=1+n[0][l]}l=0;for(g=c.length;l<g;l++)c[l].x=e[l].x,c[l].y=e[l].y,c[l].z=e[l].z}},edgeTable:[0,0,\n0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,\n0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]},c=new Uint32Array(b.edgeTable),d=b.triTable=[[],[],[],\n[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,\n5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,\n0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,\n3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],\n[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,\n11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],h=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,\n153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,\n3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,\n1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],e=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,\n1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,\n10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,\n7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,\n3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],\n[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,\n5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,\n8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,\n9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,\n3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,\n7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]];return b};$3Dmol.MarchingCube=$3Dmol.MarchingCubeInitializer();\n$3Dmol.Parsers=function(){var b={},c=function(b){for(var c,d,e,f=0,m=b.length;f<m;f++)b[f].index||(b[f].index=f);m={};for(var h=0;h<b.length;h++)f=b[h],e=Math.floor(f.x/4.95),d=Math.floor(f.y/4.95),c=Math.floor(f.z/4.95),m[e]||(m[e]={}),m[e][d]||(m[e][d]={}),m[e][d][c]||(m[e][d][c]=[]),m[e][d][c].push(f);b=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}];for(e in m)for(d in e=\nparseInt(e),m[e])for(c in d=parseInt(d),m[e][d]){c=parseInt(c);h=m[e][d][c];for(f=0;f<h.length;f++)for(var p=h[f],q=f+1;q<h.length;q++){var t=h[q];g(p,t)&&-1==p.bonds.indexOf(t.index)&&(p.bonds.push(t.index),p.bondOrder.push(1),t.bonds.push(p.index),t.bondOrder.push(1))}for(f=0;f<b.length;f++)if(q=b[f],m[e+q.x]&&m[e+q.x][d+q.y]&&m[e+q.x][d+q.y][c+q.z])for(p=h,q=m[e+q.x][d+q.y][c+q.z],t=0;t<p.length;t++)for(var u=p[t],G=0;G<q.length;G++){var C=q[G];if(g(u,C)){var z=u.bonds.indexOf(C.index),D=C.bonds.indexOf(u.index);\n-1==z&&-1==D?(u.bonds.push(C.index),u.bondOrder.push(1),C.bonds.push(u.index),C.bondOrder.push(1)):-1==z?(u.bonds.push(C.index),u.bondOrder.push(C.bondOrder[D])):-1==D&&(C.bonds.push(u.index),C.bondOrder.push(u.bondOrder[z]))}}}},d=function(b){var d=[],e=[],m;var f=0;for(m=b.length;f<m;f++){var h=b[f];h.index=f;h.hetflag?e.push(h):d.push(h)}c(e);d.sort(function(b,c){return b.chain!=c.chain?b.chain<c.chain?-1:1:b.resi-c.resi});e=b=-1;f=0;for(m=d.length;f<m;f++){h=d[f];if(h.resi!==b){b=h.resi;w||e++;\nvar w=!1}h.reschain=e;for(var p=f+1;p<d.length;p++){var q=d[p];if(q.chain!=h.chain)break;if(1<q.resi-h.resi)break;g(h,q)&&(-1===h.bonds.indexOf(q.index)&&(h.bonds.push(q.index),h.bondOrder.push(1),q.bonds.push(h.index),q.bondOrder.push(1)),h.resi!==q.resi&&(w=!0))}}},h=function(b){var c=[],d;var e=0;for(d=b.length;e<d;e++){b[e].index=e;var f=b[e];f.hetflag||\"N\"!==f.atom&&\"O\"!==f.atom||(c.push(f),f.hbondOther=null,f.hbondDistanceSq=Number.POSITIVE_INFINITY)}c.sort(function(b,c){return b.z-c.z});e=\n0;for(d=c.length;e<d;e++)for(f=c[e],b=e+1;b<d;b++){var m=c[b],h=m.z-f.z;if(3.2<h)break;if(m.atom!=f.atom){var g=Math.abs(m.y-f.y);if(!(3.2<g)){var p=Math.abs(m.x-f.x);3.2<p||(h=p*p+g*g+h*h,10.24<h||m.chain==f.chain&&4>Math.abs(m.resi-f.resi)||(h<f.hbondDistanceSq&&(f.hbondOther=m,f.hbondDistanceSq=h),h<m.hbondDistanceSq&&(m.hbondOther=f,m.hbondDistanceSq=h)))}}}},e=function(b){var c;h(b);var d={},e;var f=0;for(c=b.length;f<c;f++){var m=b[f];\"undefined\"===typeof d[m.chain]&&(d[m.chain]=[]);if(isFinite(m.hbondDistanceSq)){var g=\nm.hbondOther;\"undefined\"===typeof d[g.chain]&&(d[g.chain]=[]);4===Math.abs(g.resi-m.resi)&&(d[m.chain][m.resi]=\"h\")}}for(e in d)for(m=1;m<d[e].length-1;m++)c=d[e][m-1],f=d[e][m+1],g=d[e][m],\"h\"==c&&c==f&&g!=c&&(d[e][m]=c);f=0;for(c=b.length;f<c;f++)m=b[f],isFinite(m.hbondDistanceSq)&&\"h\"!=d[m.chain][m.resi]&&\"h\"!=m.ss&&(d[m.chain][m.resi]=\"maybesheet\");f=0;for(c=b.length;f<c;f++)if(m=b[f],isFinite(m.hbondDistanceSq)&&\"maybesheet\"==d[m.chain][m.resi]){g=m.hbondOther;var p=d[g.chain][g.resi];if(\"maybesheet\"==\np||\"s\"==p)d[m.chain][m.resi]=\"s\",d[g.chain][g.resi]=\"s\"}for(e in d){for(m=1;m<d[e].length-1;m++)c=d[e][m-1],f=d[e][m+1],g=d[e][m],\"s\"==c&&c==f&&g!=c&&(d[e][m]=c);for(m=0;m<d[e].length;m++)g=d[e][m],\"h\"!=g&&\"s\"!=g||d[e][m-1]==g||d[e][m+1]==g||delete d[e][m]}f=0;for(c=b.length;f<c;f++)m=b[f],g=d[m.chain][m.resi],\"undefined\"!=typeof g&&\"maybesheet\"!=g&&(m.ss=g,d[m.chain][m.resi-1]!=g&&(m.ssbegin=!0),d[m.chain][m.resi+1]!=g&&(m.ssend=!0))};b.vasp=b.VASP=function(b,c){c=[[]];var d=b.replace(/^\\s+/,\"\").split(/[\\n\\r]/);\nif(3>d.length)return c;if(d[1].match(/\\d+/))b=parseFloat(d[1]);else return console.log(\"Warning: second line of the vasp structure file must be a number\"),c;if(0>b)return console.log(\"Warning: Vasp implementation for negative lattice lengths is not yet available\"),c;var e=new Float32Array(d[2].replace(/^\\s+/,\"\").split(/\\s+/));var f=new Float32Array(d[3].replace(/^\\s+/,\"\").split(/\\s+/));var m=new Float32Array(d[4].replace(/^\\s+/,\"\").split(/\\s+/));var l=new $3Dmol.Matrix4(e[0],e[1],e[2],0,f[0],f[1],\nf[2],0,m[0],m[1],m[2],0,0,0,0,1);l.multiplyScalar(b);c.modelData=[{symmetries:[],cryst:{matrix:l}}];l=d[5].replace(/\\s+/,\"\").replace(/\\s+$/,\"\").split(/\\s+/);var h=new Int16Array(d[6].replace(/^\\s+/,\"\").split(/\\s+/)),g=d[7].replace(/\\s+/,\"\");if(g.match(/C/))g=\"cartesian\";else if(g.match(/D/))g=\"direct\";else return console.log(\"Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)\"),c;if(l.length!=h.length)return console.log(\"Warning: declaration of atomary species wrong:\"),\nconsole.log(l),console.log(h),c;d.splice(0,8);for(var p=0,q=0,t=l.length;q<t;q++){for(var u=l[q],z=0,D=h[q];z<D;z++){var I=new Float32Array(d[p+z].replace(/^\\s+/,\"\").split(/\\s+/)),K={};K.elem=u;\"cartesian\"==g?(K.x=b*I[0],K.y=b*I[1],K.z=b*I[2]):(K.x=b*(I[0]*e[0]+I[1]*f[0]+I[2]*m[0]),K.y=b*(I[0]*e[1]+I[1]*f[1]+I[2]*m[1]),K.z=b*(I[0]*e[2]+I[1]*f[2]+I[2]*m[2]));K.bonds=[];c[0].push(K)}p+=h[q]}return c};b.cube=b.CUBE=function(b,d){d=[[]];b=b.replace(/^\\s+/,\"\").split(/\\n\\r|\\r+/);if(6>b.length)return d;\nvar e=b[2].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \"),m=Math.abs(parseFloat(e[0]));e=b[3].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");e=0<parseFloat(e[0])?.529177:1;b=b.splice(6,m);m=d[d.length-1].length;for(var f=m+b.length,l=m;l<f;++l){var g={};g.serial=l;var h=b[l-m].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");6==h[0]?g.elem=\"C\":1==h[0]?g.elem=\"H\":8==h[0]?g.elem=\"O\":17==h[0]&&(g.elem=\"Cl\");g.x=parseFloat(h[2])*e;g.y=parseFloat(h[3])*e;g.z=parseFloat(h[4])*e;g.hetflag=!0;g.bonds=\n[];g.bondOrder=[];g.properties={};d[d.length-1].push(g)}for(l=0;l<d.length;l++)c(d[l]);return d};b.xyz=b.XYZ=function(b,d){for(var e=[[]],l=b.split(/\\r?\\n|\\r/);0<l.length&&!(3>l.length);){var f=parseInt(l[0]);if(isNaN(f)||0>=f)break;if(l.length<f+2)break;b=2;var m=e[e.length-1].length;for(f=m+f;m<f;m++){var g=l[b++].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \"),h={};h.serial=m;var p=g[0];h.atom=h.elem=p[0].toUpperCase()+p.substr(1).toLowerCase();h.x=parseFloat(g[1]);h.y=parseFloat(g[2]);h.z=parseFloat(g[3]);\nh.hetflag=!0;h.bonds=[];h.bondOrder=[];h.properties={};e[e.length-1][m]=h;7<=g.length&&(h.dx=parseFloat(g[4]),h.dy=parseFloat(g[5]),h.dz=parseFloat(g[6]))}if(d.multimodel)e.push([]),l.splice(0,b);else break}for(m=0;m<e.length;m++)c(e[m]);if(d.onemol)for(d=e,e=[],e.push(d[0]),m=1;m<d.length;m++)for(b=e[0].length,l=0;l<d[m].length;l++){f=d[m][l];for(g=0;g<f.bonds.length;g++)f.bonds[g]+=b;f.index=e[0].length;f.serial=e[0].length;e[0].push(f)}return e};b.sdf=b.SDF=function(b,c){var d=[[]],e=!1;\"undefined\"!==\ntypeof c.keepH&&(e=!c.keepH);for(b=b.split(/\\r?\\n|\\r/);0<b.length&&!(4>b.length);){var f=parseInt(b[3].substr(0,3));if(isNaN(f)||0>=f)break;var l=parseInt(b[3].substr(3,3)),m=4;if(b.length<4+f+l)break;var g=[],h=d[d.length-1].length,p=h+f;for(f=h;f<p;f++,m++){var q=b[m];var t={},u=q.substr(31,3).replace(/ /g,\"\");t.atom=t.elem=u[0].toUpperCase()+u.substr(1).toLowerCase();\"H\"==t.elem&&e||(t.serial=f,g[f]=d[d.length-1].length,t.x=parseFloat(q.substr(0,10)),t.y=parseFloat(q.substr(10,10)),t.z=parseFloat(q.substr(20,\n10)),t.hetflag=!0,t.bonds=[],t.bondOrder=[],t.properties={},t.index=d[d.length-1].length,d[d.length-1].push(t))}for(f=0;f<l;f++,m++)q=b[m],p=g[parseInt(q.substr(0,3))-1+h],t=g[parseInt(q.substr(3,3))-1+h],q=parseInt(q.substr(6,3)),\"undefined\"!=typeof p&&\"undefined\"!=typeof t&&(d[d.length-1][p].bonds.push(t),d[d.length-1][p].bondOrder.push(q),d[d.length-1][t].bonds.push(p),d[d.length-1][t].bondOrder.push(q));if(c.multimodel){for(c.onemol||d.push([]);\"$$$$\"!=b[m];)m++;b.splice(0,++m)}else break}return d};\nb.cdjson=b.json=function(b,c){var d=[[]];\"string\"===typeof b&&(b=JSON.parse(b));var e=b.m,f=e[0].a;b=e[0].b;var m=e[0].s,l=void 0!==c&&void 0!==c.parseStyle?c.parseStyle:void 0!==m;c=d[d.length-1].length;for(e=0;e<f.length;e++){var g=f[e],h={};h.id=g.i;h.x=g.x;h.y=g.y;h.z=g.z||0;h.bonds=[];h.bondOrder=[];var p=g.l||\"C\";h.elem=p[0].toUpperCase()+p.substr(1).toLowerCase();h.serial=d[d.length-1].length;l&&(h.style=m[g.s||0]);d[d.length-1].push(h)}for(e=0;e<b.length;e++)l=b[e],f=l.b+c,m=l.e+c,l=l.o||\n1,g=d[d.length-1][f],h=d[d.length-1][m],g.bonds.push(m),g.bondOrder.push(l),h.bonds.push(f),h.bondOrder.push(l);return d};b.mcif=b.cif=function(b,d){function l(b,c){for(var d=[],e=0,f=0;f<b.length;){for(;b.substr(f,c.length)!==c&&f<b.length;){if(\"'\"===b[f])for(f++;f<b.length&&\"'\"!==b[f];)f++;else if('\"'===b[f])for(f++;f<b.length&&'\"'!==b[f];)f++;f++}d.push(b.substr(e,f-e));e=f+=c.length}return d}var m=[],f=!d.doAssembly;d=!d.duplicateAssemblyAtoms;var g=m.modelData=[],h=b.split(/\\r?\\n|\\r/);b=[];for(var p=\n!1,t=0;t<h.length;t++){var u=h[t].split(\"#\")[0];p?\";\"===u[0]&&(p=!1):\";\"===u[0]&&(p=!0);if(p||\"\"!==u){if(!p&&(u=u.trim(),\"_\"===u[0])){var T=u.split(/\\s/)[0].indexOf(\".\");-1<T&&(u[T]=\"_\",u=u.substr(0,T)+\"_\"+u.substr(T+1))}b.push(u)}}for(t=0;t<b.length;){h=function(b){var c=b.match(\"-\");b=b.replace(/[-xyz]/g,\"\");b=b.split(\"/\");var d=void 0===b[1]?1:parseInt(b[1]);return(\"\"===b[0]?1:parseInt(b[0]))/d*(c?-1:1)};for(T=function(b,c,d){return{x:M[0][0]*b+M[0][1]*c+M[0][2]*d,y:M[1][0]*b+M[1][1]*c+M[1][2]*\nd,z:M[2][0]*b+M[2][1]*c+M[2][2]*d}};!b[t].startsWith(\"data_\")||\"data_global\"===b[t];)t++;t++;for(p={};t<b.length&&!b[t].startsWith(\"data_\");)if(void 0===b[t][0])t++;else if(\"_\"===b[t][0]){var G=b[t].split(/\\s/)[0].toLowerCase();u=p[G]=p[G]||[];var C=b[t].substr(b[t].indexOf(G)+G.length);if(\"\"===C)if(t++,\";\"===b[t][0]){C=b[t].substr(1);for(t++;\";\"!==b[t];)C=C+\"\\n\"+b[t],t++;u.push(C)}else u.push(b[t]);else u.push(C.trim());t++}else if(\"loop_\"===b[t].substr(0,5)){t++;for(C=[];\"\"===b[t]||\"_\"===b[t][0];)\"\"!==\nb[t]&&(G=b[t].split(/\\s/)[0].toLowerCase(),u=p[G]=p[G]||[],C.push(u)),t++;for(G=0;t<b.length&&\"_\"!==b[t][0]&&!b[t].startsWith(\"loop_\")&&!b[t].startsWith(\"data_\");){u=l(b[t],\" \");for(var z=0;z<u.length;z++)\"\"!==u[z]&&(C[G].push(u[z]),G=(G+1)%C.length);t++}}else t++;g.push({symmetries:[]});m.push([]);C=void 0!==p._atom_site_id?p._atom_site_id.length:p._atom_site_label.length;if(void 0!==p._cell_length_a){u=parseFloat(p._cell_length_a);G=parseFloat(p._cell_length_b);z=parseFloat(p._cell_length_c);var D=\nparseFloat(p._cell_angle_alpha)||90,I=parseFloat(p._cell_angle_beta)||90,K=parseFloat(p._cell_angle_gamma)||90,H=K*Math.PI/180,N=Math.cos(D*Math.PI/180),E=Math.cos(I*Math.PI/180),L=Math.cos(H);H=Math.sin(H);var M=[[u,G*L,z*E],[0,G*H,z*(N-E*L)/H],[0,0,z*Math.sqrt(1-N*N-E*E-L*L+2*N*E*L)/H]];g[g.length-1].cryst={a:u,b:G,c:z,alpha:D,beta:I,gamma:K}}for(u=0;u<C;u++)if(void 0===p._atom_site_group_pdb||\"TER\"!==p._atom_site_group_pdb[u])G={},void 0!==p._atom_site_cartn_x?(G.x=parseFloat(p._atom_site_cartn_x[u]),\nG.y=parseFloat(p._atom_site_cartn_y[u]),G.z=parseFloat(p._atom_site_cartn_z[u])):(z=T(parseFloat(p._atom_site_fract_x[u]),parseFloat(p._atom_site_fract_y[u]),parseFloat(p._atom_site_fract_z[u])),G.x=z.x,G.y=z.y,G.z=z.z),G.chain=p._atom_site_auth_asym_id?p._atom_site_auth_asym_id[u]:void 0,G.resi=p._atom_site_auth_seq_id?parseInt(p._atom_site_auth_seq_id[u]):void 0,G.resn=p._atom_site_auth_comp_id?p._atom_site_auth_comp_id[u].trim():void 0,G.atom=p._atom_site_auth_atom_id?p._atom_site_auth_atom_id[u].replace(/\"/gm,\n\"\"):void 0,G.hetflag=!p._atom_site_group_pdb||\"HETA\"===p._atom_site_group_pdb[u]||\"HETATM\"===p._atom_site_group_pdb[u],z=p._atom_site_type_symbol[u],G.elem=z[0].toUpperCase()+z.substr(1).toLowerCase(),G.bonds=[],G.ss=\"c\",G.serial=u,G.bondOrder=[],G.properties={},m[m.length-1].push(G);if(void 0!==p._pdbx_struct_oper_list_id&&!f){for(u=0;u<p._pdbx_struct_oper_list_id.length;u++){T=parseFloat(p[\"_pdbx_struct_oper_list_matrix[1][1]\"][u]);C=parseFloat(p[\"_pdbx_struct_oper_list_matrix[1][2]\"][u]);G=parseFloat(p[\"_pdbx_struct_oper_list_matrix[1][3]\"][u]);\nz=parseFloat(p[\"_pdbx_struct_oper_list_vector[1]\"][u]);D=parseFloat(p[\"_pdbx_struct_oper_list_matrix[2][1]\"][u]);I=parseFloat(p[\"_pdbx_struct_oper_list_matrix[2][2]\"][u]);K=parseFloat(p[\"_pdbx_struct_oper_list_matrix[2][3]\"][u]);N=parseFloat(p[\"_pdbx_struct_oper_list_vector[2]\"][u]);E=parseFloat(p[\"_pdbx_struct_oper_list_matrix[3][1]\"][u]);L=parseFloat(p[\"_pdbx_struct_oper_list_matrix[3][2]\"][u]);H=parseFloat(p[\"_pdbx_struct_oper_list_matrix[3][3]\"][u]);var F=parseFloat(p[\"_pdbx_struct_oper_list_vector[3]\"][u]);\nT=new $3Dmol.Matrix4(T,C,G,z,D,I,K,N,E,L,H,F);g[g.length-1].symmetries.push(T)}for(u=0;u<m.length;u++)q(g[g.length-1].symmetries,d,m[u])}if(void 0!==p._symmetry_equiv_pos_as_xyz)for(u=0;u<p._symmetry_equiv_pos_as_xyz.length;u++){C=p._symmetry_equiv_pos_as_xyz[u].replace(/[\"' ]/g,\"\").split(\",\").map(function(b){return b.replace(/-/g,\"+-\")});T=new $3Dmol.Matrix4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1);for(G=0;3>G;G++)for(z=C[G].split(\"+\"),D=0;D<z.length;D++)I=z[D],\"\"!==I&&(K=h(I),I.match(\"x\")?T.elements[G+\n0]=K:I.match(\"y\")?T.elements[G+4]=K:I.match(\"z\")?T.elements[G+8]=K:T.elements[G+12]=K);C=new $3Dmol.Matrix4(M[0][0],M[0][1],M[0][2],0,M[1][0],M[1][1],M[1][2],0,M[2][0],M[2][1],M[2][2],0);G=(new $3Dmol.Matrix4).getInverse(C,!0);T=(new $3Dmol.Matrix4).multiplyMatrices(T,G);T=(new $3Dmol.Matrix4).multiplyMatrices(C,T);g[g.length-1].symmetries.push(T)}}for(u=0;u<m.length;u++)c(m[u]),e(m[u]),q(g[u].symmetries,d,m[u]);return m};b.mol2=b.MOL2=function(b,c){var d=[[]],e=!1;\"undefined\"!==typeof c.keepH&&(e=\n!c.keepH);var f=b.search(/@<TRIPOS>MOLECULE/),l=b.search(/@<TRIPOS>ATOM/);if(-1==f||-1==l)return d;for(b=b.substr(f,b.length).split(/\\r?\\n|\\r/);0<b.length;){f=[];var g=b[2].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \"),h=parseInt(g[0]);l=0;1<g.length&&(l=parseInt(g[1]));var m=4,p;for(p=3;p<b.length;p++)if(\"@<TRIPOS>ATOM\"==b[p]){m=p+1;break}p=d[d.length-1].length;for(h=p+h;p<h;p++){g=b[m++];g=g.replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");var q={},t=g[5].split(\".\")[0];q.atom=q.elem=t[0].toUpperCase()+\nt.substr(1).toLowerCase();if(\"H\"!=q.elem||!e){t=d[d.length-1].length;var u=parseInt(g[0]);q.serial=u;q.x=parseFloat(g[2]);q.y=parseFloat(g[3]);q.z=parseFloat(g[4]);q.atom=g[5];g=parseFloat(g[8]);q.index=t;q.bonds=[];q.bondOrder=[];q.properties={charge:g,partialCharge:g};f[u]=t;d[d.length-1].push(q)}}for(p=!1;m<b.length;)if(\"@<TRIPOS>BOND\"==b[m++]){p=!0;break}if(p&&l)for(p=0;p<l;p++)g=b[m++],g=g.replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \"),h=parseInt(g[1]),q=d[d.length-1][f[h]],t=parseInt(g[2]),\nu=d[d.length-1][f[t]],g=parseInt(g[3]),isNaN(g)&&(g=1),void 0!==q&&void 0!==u&&(q.bonds.push(f[t]),q.bondOrder.push(g),u.bonds.push(f[h]),u.bondOrder.push(g));if(c.multimodel)c.onemol||d.push([]),b.splice(0,m),b.join(\"\\n\");else break}return d};var t={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,\nSr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45},g=function(b,c){var d=(t[b.elem]||1.6)+(t[c.elem]||1.6);d+=.25;d*=d;var e=b.x-c.x;e*=e;if(e>d)return!1;var f=b.y-c.y;f*=f;if(f>d)return!1;var g=b.z-c.z;g*=g;if(g>d)return!1;e=e+f+g;return isNaN(e)?!1:.5>e?!1:e>d?!1:b.altLoc!=c.altLoc&&\" \"!=b.altLoc&&\n\" \"!=c.altLoc?!1:!0},q=function(b,c,d){var e=d.length,f=e,g,h;if(!c)for(c=0;c<b.length;c++){if(!b[c].isIdentity()){var l=new $3Dmol.Vector3;for(h=0;h<e;h++){var m=[];for(g=0;g<d[h].bonds.length;g++)m.push(d[h].bonds[g]+f);l.set(d[h].x,d[h].y,d[h].z);l.applyMatrix4(b[c]);g={};for(var n in d[h])g[n]=d[h][n];g.x=l.x;g.y=l.y;g.z=l.z;g.bonds=m;d.push(g)}f=d.length}}else if(1<b.length)for(c=0;c<d.length;c++){e=[];for(g=0;g<b.length;g++)b[g].isIdentity()||(f=new $3Dmol.Vector3,f.set(d[c].x,d[c].y,d[c].z),\nf.applyMatrix4(b[g]),e.push(f));d[c].symmetries=e}},p=function(b,c){b=b.replace(/ /g,\"\");0<b.length&&\"H\"==b[0]&&\"Hg\"!=b&&(b=\"H\");1<b.length&&(b=b[0].toUpperCase()+b.substr(1).toLowerCase(),\"undefined\"===typeof t[b]?b=b[0]:c&&(\"Ca\"==b?b=\"C\":\"Cd\"==b&&(b=\"C\")));return b};b.pdb=b.PDB=b.pdbqt=b.PDBQT=function(b,c){var g=[],h={};g.modelData=[];for(var f=b.split(/\\r?\\n|\\r/);0<f.length;){var l,m=f;b=h;f=[];var u=!c.keepH,P=!!c.noSecondaryStructure,A=!c.noComputeSecondaryStructure,T=!c.doAssembly,G=!c.duplicateAssemblyAtoms,\nC=c.altLoc?c.altLoc:\"A\",z={symmetries:[]},D=[],I=[],K={};for(l=0;l<m.length;l++){var H=m[l].replace(/^\\s*/,\"\");var N=H.substr(0,6);if(0==N.indexOf(\"END\")){D=m.slice(l+1);if(\"END\"==N)for(var E in b)b.hasOwnProperty(E)&&delete b[E];break}else if(\"ATOM  \"==N||\"HETATM\"==N){var L=H.substr(16,1);if(\" \"==L||L==C||\"*\"==C){var M=parseInt(H.substr(6,5));var F=H.substr(12,4).replace(/ /g,\"\");var J=H.substr(17,3).replace(/ /g,\"\");var Q=H.substr(21,1);var W=parseInt(H.substr(22,4));var V=H.substr(26,1);var U=\nparseFloat(H.substr(30,8));var ca=parseFloat(H.substr(38,8));var S=parseFloat(H.substr(46,8));var O=parseFloat(H.substr(60,8));var Z=H.substr(76,2).replace(/ /g,\"\");Z=\"\"===Z||\"undefined\"===typeof t[Z]?p(H.substr(12,2),\"A\"==H[0]):Z[0].toUpperCase()+Z.substr(1).toLowerCase();\"H\"==Z&&u||(N=\"H\"==N[0]?!0:!1,I[M]=f.length,f.push({resn:J,x:U,y:ca,z:S,elem:Z,hetflag:N,altLoc:L,chain:Q,resi:W,icode:V,rescode:W+(\" \"!=V?\"^\"+V:\"\"),serial:M,atom:F,bonds:[],ss:\"c\",bondOrder:[],properties:{},b:O,pdbline:H}))}}else if(\"SHEET \"==\nN){O=H.substr(21,1);F=parseInt(H.substr(22,4));H.substr(32,1);H=parseInt(H.substr(33,4));O in b||(b[O]={});b[O][F]=\"s1\";for(F+=1;F<H;F++)b[O][F]=\"s\";b[O][H]=\"s2\"}else if(\"CONECT\"==N)for(O=parseInt(H.substr(6,5)),F=I[O],M=f[F],J=[11,16,21,26],O=0;4>O;O++){if(Q=parseInt(H.substr(J[O],5)),Q=I[Q],W=f[Q],void 0!==M&&void 0!==W)if(K[[F,Q]])for(K[[F,Q]]+=1,W=0;W<M.bonds.length;W++)M.bonds[W]==Q&&(V=K[[F,Q]],M.bondOrder[W]=4<=V?1:V);else if(K[[F,Q]]=1,0==M.bonds.length||M.bonds[M.bonds.length-1]!=Q)M.bonds.push(Q),\nM.bondOrder.push(1)}else if(\"HELIX \"==N){O=H.substr(19,1);F=parseInt(H.substr(21,4));H.substr(31,1);H=parseInt(H.substr(33,4));O in b||(b[O]={});b[O][F]=\"h1\";for(F+=1;F<H;F++)b[O][F]=\"h\";b[O][H]=\"h2\"}else if(T||\"REMARK\"!=N||\"BIOMT\"!=H.substr(13,5))\"CRYST1\"==N?(F=parseFloat(H.substr(7,8)),O=parseFloat(H.substr(16,8)),M=parseFloat(H.substr(25,8)),J=parseFloat(H.substr(34,6)),Q=parseFloat(H.substr(41,6)),H=parseFloat(H.substr(48,6)),z.cryst={a:F,b:O,c:M,alpha:J,beta:Q,gamma:H}):\"ANISOU\"==N&&(M=parseInt(H.substr(6,\n5)),O=f[I[M]])&&(H=H.substr(30).trim().split(/\\s+/),H={u11:parseInt(H[0]),u22:parseInt(H[1]),u33:parseInt(H[2]),u12:parseInt(H[3]),u13:parseInt(H[4]),u23:parseInt(H[5])},O.uMat=H);else{F=new $3Dmol.Matrix4;for(O=1;3>=O;O++)if(H=m[l].replace(/^\\s*/,\"\"),parseInt(H.substr(18,1))==O)F.elements[O-1]=parseFloat(H.substr(23,10)),F.elements[O-1+4]=parseFloat(H.substr(33,10)),F.elements[O-1+8]=parseFloat(H.substr(43,10)),F.elements[O-1+12]=parseFloat(H.substr(53)),l++;else for(;\"BIOMT\"==H.substr(13,5);)l++,\nH=m[l].replace(/^\\s*/,\"\");F.elements[3]=0;F.elements[7]=0;F.elements[11]=0;F.elements[15]=1;z.symmetries.push(F);l--}}(new Date).getTime();l=f;m=0;for(u=l.length;m<u;m++)for(C=l[m],K=0;K<C.bonds.length;K++)H=l[C.bonds[K]],O=I[C.serial],H&&O&&0>H.bonds.indexOf(O)&&(H.bonds.push(O),H.bondOrder.push(C.bondOrder[K]));d(f);T||q(z.symmetries,G,f);A&&!P&&((new Date).getTime(),e(f));(new Date).getTime();a:{P=void 0;A=b;for(P in A){P=!1;break a}P=!0}if(!P)for(l=0;l<f.length;l++)F=f[l],void 0!==F&&F.chain in\nb&&F.resi in b[F.chain]&&(P=b[F.chain][F.resi],F.ss=P[0],1<P.length&&(\"1\"==P[1]?F.ssbegin=!0:\"2\"==P[1]&&(F.ssend=!0)));f=[f,z,D];b=f[0];z=f[1];f=f[2];if(0!=b.length){if(c.multimodel&&c.onemol&&0<g.length)for(z=g[0].length,D=0;D<b.length;D++){P=b[D];P.index=D;for(A=0;A<P.bonds.length;A++)P.bonds[A]+=z;g[0].push(P)}else g.modelData.push(z),g.push(b);if(!c.multimodel)break}}return g};b.pqr=b.PQR=function(b,c){var g=[[]],h=!c.noSecondaryStructure;g.modelData=[{symmetries:[]}];var f=[];b=b.split(/\\r?\\n|\\r/);\nvar l;for(l=0;l<b.length;l++){var m=b[l].replace(/^\\s*/,\"\");var p=m.substr(0,6);if(0==p.indexOf(\"END\"))if(c.multimodel)c.onemol||g.push([]);else break;else if(\"ATOM  \"==p||\"HETATM\"==p){var q=parseInt(m.substr(6,5));p=m.substr(12,4).replace(/ /g,\"\");var t=m.substr(17,3),u=m.substr(21,1),G=parseInt(m.substr(22,4));var C=m.substr(30).trim().split(/\\s+/);var z=parseFloat(C[0]),D=parseFloat(C[1]),I=parseFloat(C[2]),K=parseFloat(C[3]),H=parseFloat(C[4]),N=p[0];1<p.length&&p[1].toUpperCase()!=p[1]&&(N=p.substr(0,\n2));C=\"H\"==m[0]?!0:!1;f[q]=g[g.length-1].length;g[g.length-1].push({resn:t,x:z,y:D,z:I,elem:N,hetflag:C,chain:u,resi:G,serial:q,atom:p,bonds:[],ss:\"c\",bondOrder:[],properties:{charge:K,partialCharge:K,radius:H},pdbline:m})}else if(\"CONECT\"==p)for(p=parseInt(m.substr(6,5)),q=g[g.length-1][f[p]],p=0;4>p;p++)t=parseInt(m.substr([11,16,21,26][p],5)),u=g[g.length-1][f[t]],void 0!==q&&void 0!==u&&(q.bonds.push(f[t]),q.bondOrder.push(1))}for(l=0;l<g.length;l++)d(g[l]),h&&e(g[l]);return g};var u=function(b){return 0==\nb||2==b||4==b?\"h\":3==b?\"s\":\"c\"};b.mmtf=b.MMTF=function(b,c){var d=!c.keepH,g=c.altLoc?c.altLoc:\"A\",f=!!c.noSecondaryStructure,h=!c.noComputeSecondaryStructure,l=!c.doAssembly,m=!c.duplicateAssemblyAtoms,p=c.assemblyIndex?c.assemblyIndex:0;\"string\"==typeof b&&(b=$3Dmol.base64ToArray(b));b=MMTF.decode(b);var t=[[]],T=t.modelData=[],G=0,C=0,z=0,D=0,I=b.secStructList,K=b.insCodeList,H=b.bFactorList,N=b.altLocList,E=b.occupancyList,L=b.bondAtomList,M=b.bondOrderList,F=b.numModels;if(0==F)return t;c.multimodel||\n(F=1);var J,Q=[];if(!l&&b.bioAssemblyList&&0<b.bioAssemblyList.length){var W=b.bioAssemblyList[p].transformList;p=0;for(J=W.length;p<J;p++){var V=new $3Dmol.Matrix4(W[p].matrix);V.transpose();Q.push(V)}}V=null;b.unitCell&&(p=b.unitCell,V={a:p[0],b:p[1],c:p[2],alpha:p[3],beta:p[4],gamma:p[5]});var U=0;for(W=0;W<F;W++){var ca=b.chainsPerModel[W],S=t[t.length-1],O=[];T.push({symmetries:Q,cryst:V});for(p=0;p<ca;++p){var Z=b.groupsPerChain[C],aa=String.fromCharCode.apply(null,b.chainIdList.subarray(4*\nC,4*C+4)).replace(/\\0/g,\"\");b.chainNameList&&(aa=String.fromCharCode.apply(null,b.chainNameList.subarray(4*C,4*C+4)).replace(/\\0/g,\"\"));var B=z,Y=\"\";for(J=0;J<Z;++J){var X=b.groupList[b.groupTypeList[z]];var da=X.atomNameList.length;var ma=0;var qa=!1;var ha=!1;if(I){ma=I[z];var ja=u(ma);if(0==z||ja!=Y)qa=!0;Y=ja;var jb=z+1;if(jb>=I.length||u(I[jb]!=ja))ha=!0}b.insCodeList&&String.fromCharCode(K[z]);var xa=b.groupIdList[z];var Ha=X.groupName;jb=D;for(ja=0;ja<da;++ja){var Ia=X.elementList[ja];if(!d||\n\"H\"!=Ia){var oa=\"\";H&&(oa=H[D]);var Ja=\"\";N&&N[D]&&(Ja=String.fromCharCode(N[D]));var ea=\"\";E&&(ea=E[D]);if(\"\"==Ja||Ja==g||\"*\"==g){var Va=b.atomIdList[D],kb=X.atomNameList[ja],Qa=0;X.atomChargeList&&(Qa=X.atomChargeList[ja]);var Ba=b.xCoordList[D],qb=b.yCoordList[D],lb=b.zCoordList[D];O[D]=S.length;S.push({resn:Ha,x:Ba,y:qb,z:lb,elem:Ia,hetflag:0>ma,chain:aa,resi:xa,icode:Ja,rescode:xa+(\" \"!=Ja?\"^\"+Ja:\"\"),serial:Va,altLoc:Ja,index:D,atom:kb,bonds:[],ss:u(ma),ssbegin:qa,ssend:ha,bondOrder:[],properties:{charge:Qa,\noccupancy:ea},b:oa})}}D+=1}qa=X.bondAtomList;ja=0;for(ma=X.bondOrderList.length;ja<ma;++ja)ha=jb+qa[2*ja],xa=jb+qa[2*ja+1],da=X.bondOrderList[ja],ha=O[ha],Ia=O[xa],Ha=S[ha],xa=S[Ia],Ha&&xa&&(Ha.bonds.push(Ia),Ha.bondOrder.push(da),xa.bonds.push(ha),xa.bondOrder.push(da));z+=1}z=B;for(J=0;J<Z;++J)z+=1;C+=1}if(L)for(ja=U,ma=L.length;ja<ma;ja+=2){ha=L[ja];xa=L[ja+1];da=M?M[ja/2]:1;if(ha>=D){U=ja;break}ha=O[ha];Ia=O[xa];Ha=S[ha];xa=S[Ia];Ha&&xa&&(Ha.bonds.push(Ia),Ha.bondOrder.push(da),xa.bonds.push(ha),\nxa.bondOrder.push(da))}c.multimodel&&(c.onemol||t.push([]));if(!l)for(J=0;J<t.length;J++)q(T[G].symmetries,m,t[J]);G+=1}h&&!f&&e(t);return t};b.prmtop=b.PRMTOP=function(b,c){function d(b){var c=h.indexOf(l.filter(function(c){return c.includes(b)})[0]);if(Number.isInteger(c)&&0<c){for(;!h[c].includes(\"FORMAT\");)c++;return c}return-1}function e(b){var c=h[b].match(/\\((\\d*)\\S*/),d=h[b].match(/[a-zA-Z](\\d*)\\)\\s*/);null==d&&(d=h[b].match(/[a-zA-Z](\\d*)\\.\\d*\\)\\s*/));return[c[1],d[1]]}var f;c=[];var g=0,\nh=b.split(/\\r?\\n|\\r/);if(0<h.length&&h[0].includes(\"VERSION\")){var l=h.filter(function(b){return b.includes(\"POINTERS\")||b.includes(\"ATOM_NAME\")||b.includes(\"CHARGE\")||b.includes(\"RADII\")||b.includes(\"BONDS_INC_HYDROGEN\")||b.includes(\"BONDS_WITHOUT_HYDROGEN\")});b=d(\"POINTERS\");if(-1==b)return[];var m=e(b),p=parseInt(h[b+1].slice(0,m[1]));if(isNaN(p)||0>=p)return[];b=d(\"ATOM_NAME\");if(-1==b)return[];m=e(b);for(var q=m[0],t=0;t<p/m[0];t++){t==parseInt(p/m[0])&&(q=p%m[0]);for(var u=0;u<q;u++){var z=\n{};z.serial=g;z.x=0;z.y=0;z.z=0;z.atom=h[b+1].slice(m[1]*u,m[1]*(u+1));z.elem=h[b+1].slice(m[1]*u,m[1]*u+1);z.properties={charge:\"\",radii:\"\"};z.bonds=[];z.bondOrder=[];c.push(z);g++}b++}b=d(\"CHARGE\");if(-1!=b)for(m=e(b),g=0,q=m[0],t=0;t<p/m[0];t++){t==parseInt(p/m[0])&&(q=p%m[0]);for(u=0;u<q;u++)c[g].properties.charge=parseFloat(h[b+1].slice(m[1]*u,m[1]*(u+1))),g++;b++}b=d(\"RADII\");if(-1!=b)for(m=e(b),g=0,q=m[0],t=0;t<p/m[0];t++){t==parseInt(p/m[0])&&(q=p%m[0]);for(u=0;u<q;u++)c[g].properties.radii=\nparseFloat(h[b+1].slice(m[1]*u,m[1]*(u+1))),g++;b++}b=d(\"BONDS_WITHOUT_HYDROGEN\");if(-1!=b)for(m=e(b),g=0,q=m[0],b+=1;!h[b].match(/^%FLAG/);){h[b+1].match(/^%FLAG/)&&(q=p%m[0]);for(u=0;u<q;u++)0==g%3&&(f=parseInt(h[b].slice(m[1]*u,m[1]*(u+1))/3)),1==g%3&&c[f].bonds.push(parseInt(h[b].slice(m[1]*u,m[1]*(u+1))/3)),g++;b++}b=d(\"BONDS_INC_HYDROGEN\");if(-1!=b)for(m=e(b),g=0,q=m[0],b+=1;!h[b].match(/^%FLAG/);){h[b+1].match(/^%FLAG/)&&(q=p%m[0]);for(u=0;u<q;u++)0==g%3&&(f=parseInt(h[b].slice(m[1]*u,m[1]*\n(u+1))/3)),1==g%3&&c[f].bonds.push(parseInt(h[b].slice(m[1]*u,m[1]*(u+1))/3)),g++;b++}}else return[];return[c]};b.gro=b.GRO=function(b,c){c=[];for(b=b.split(/\\r?\\n|\\r/);0<b.length&&!(3>b.length);){var e=parseInt(b[1]);if(isNaN(e)||0>=e)break;if(b.length<e+3)break;var g=[];c.push(g);var f=2,h=g.length;for(e=h+e;h<e;h++){var l=b[f++],m={};m.serial=h;m.atom=l.slice(10,15).trim();m.elem=p(m.atom,!0);m.x=10*parseFloat(l.slice(20,28));m.y=10*parseFloat(l.slice(28,36));m.z=10*parseFloat(l.slice(36,44));\nm.resi=parseInt(l.slice(0,5));m.resn=l.slice(5,10).trim();m.bonds=[];m.bondOrder=[];m.properties={};44<l.length&&(m.dx=10*parseFloat(l.slice(44,52)),m.dy=10*parseFloat(l.slice(52,60)),m.dz=10*parseFloat(l.slice(60,68)));g[h]=m}if(b.length<=f+3&&(g=b[f++].trim().split(/\\s+/),3==g.length)){for(e=0;3>e;e++)g[e]=10*parseFloat(g[e]);c.box=g}b.splice(0,++f)}for(h=0;h<c.length;h++)d(c[h]);return c};b.lammpstrj=b.LAMMPSTRJ=function(b,d){var e=[],g={id:\"serial\",type:\"atom\",element:\"elem\",q:\"charge\",radius:\"radius\",\nx:\"x\",xu:\"x\",xs:\"x\",xsu:\"x\",y:\"y\",yu:\"y\",ys:\"y\",ysu:\"y\",z:\"z\",zu:\"z\",zs:\"z\",zsu:\"z\"};b=b.split(/\\r?\\n|\\r/);for(var f=0,h=0,l=0;l<b.length-9;){for(;l<b.length;l++)if(b[l].match(/ITEM: NUMBER OF ATOMS/)&&(h=parseInt(b[l+1])),b[l].match(/ITEM: ATOMS/)){f=l+1;break}var m=b[f-1].replace(\"ITEM: ATOMS \",\"\").split(\" \");e.push([]);for(l=f;l<f+h;l++){for(var p={},q={},t=b[l].split(\" \"),u=0;u<t.length;u++){var C=g[m[u]];void 0!=C&&(\"serial\"==C?p[C]=parseInt(t[u]):\"x\"==C||\"y\"==C||\"z\"===C?p[C]=parseFloat(t[u]):\n\"charge\"==C||\"radius\"==C?q[C]=parseFloat(t[u]):p[C]=t[u]);p.properties=q;p.bonds=[];p.bondOrder=[]}e[e.length-1][l-f]=p}l=f+h-1}if(d.assignbonds)for(d=0;d<e.length;d++)c(e[d]);return e};return b}();$3Dmol=$3Dmol||{};\n$3Dmol.partialCharges={\"ALA:N\":-.15,\"ALA:CA\":.1,\"ALA:CB\":0,\"ALA:C\":.6,\"ALA:O\":-.55,\"ARG:N\":-.15,\"ARG:CA\":.1,\"ARG:CB\":0,\"ARG:CG\":0,\"ARG:CD\":.1,\"ARG:NE\":-.1,\"ARG:CZ\":.5,\"ARG:NH1\":.25,\"ARG:NH2\":.25,\"ARG:C\":.6,\"ARG:O\":-.55,\"ASN:N\":-.15,\"ASN:CA\":.1,\"ASN:CB\":0,\"ASN:CG\":.55,\"ASN:OD1\":-.55,\"ASN:ND2\":0,\"ASN:C\":.6,\"ASN:O\":-.55,\"ASP:N\":-.15,\"ASP:CA\":.1,\"ASP:CB\":0,\"ASP:CG\":.14,\"ASP:OD1\":-.57,\"ASP:OD2\":-.57,\"ASP:C\":.6,\"ASP:O\":-.55,\"CYS:N\":-.15,\"CYS:CA\":.1,\"CYS:CB\":.19,\"CYS:SG\":-.19,\"CYS:C\":.6,\"CYS:O\":-.55,\"GLN:N\":-.15,\n\"GLN:CA\":.1,\"GLN:CB\":0,\"GLN:CG\":0,\"GLN:CD\":.55,\"GLN:OE1\":-.55,\"GLN:NE2\":0,\"GLN:C\":.6,\"GLN:O\":-.55,\"GLU:N\":-.15,\"GLU:CA\":.1,\"GLU:CB\":0,\"GLU:CG\":0,\"GLU:CD\":.14,\"GLU:OE1\":-.57,\"GLU:OE2\":-.57,\"GLU:C\":.6,\"GLU:O\":-.55,\"GLY:N\":-.15,\"GLY:CA\":.1,\"GLY:C\":.6,\"GLY:O\":-.55,\"HIS:N\":-.15,\"HIS:CA\":.1,\"HIS:CB\":0,\"HIS:CG\":.1,\"HIS:ND1\":-.1,\"HIS:CD2\":.1,\"HIS:NE2\":-.4,\"HIS:CE1\":.3,\"HIS:C\":.6,\"HIS:O\":-.55,\"ILE:N\":-.15,\"ILE:CA\":.1,\"ILE:CB\":0,\"ILE:CG2\":0,\"ILE:CG1\":0,\"ILE:CD\":0,\"ILE:C\":.6,\"ILE:O\":-.55,\"LEU:N\":-.15,\"LEU:CA\":.1,\n\"LEU:CB\":0,\"LEU:CG\":0,\"LEU:CD1\":0,\"LEU:CD2\":0,\"LEU:C\":.6,\"LEU:O\":-.55,\"LYS:N\":-.15,\"LYS:CA\":.1,\"LYS:CB\":0,\"LYS:CG\":0,\"LYS:CD\":0,\"LYS:CE\":.25,\"LYS:NZ\":.75,\"LYS:C\":.6,\"LYS:O\":-.55,\"MET:N\":-.15,\"MET:CA\":.1,\"MET:CB\":0,\"MET:CG\":.06,\"MET:SD\":-.12,\"MET:CE\":.06,\"MET:C\":.6,\"MET:O\":-.55,\"PHE:N\":-.15,\"PHE:CA\":.1,\"PHE:CB\":0,\"PHE:CG\":0,\"PHE:CD1\":0,\"PHE:CD2\":0,\"PHE:CE1\":0,\"PHE:CE2\":0,\"PHE:CZ\":0,\"PHE:C\":.6,\"PHE:O\":-.55,\"PRO:N\":-.25,\"PRO:CD\":.1,\"PRO:CA\":.1,\"PRO:CB\":0,\"PRO:CG\":0,\"PRO:C\":.6,\"PRO:O\":-.55,\"SER:N\":-.15,\n\"SER:CA\":.1,\"SER:CB\":.25,\"SER:OG\":-.25,\"SER:C\":.6,\"SER:O\":-.55,\"THR:N\":-.15,\"THR:CA\":.1,\"THR:CB\":.25,\"THR:OG1\":-.25,\"THR:CG2\":0,\"THR:C\":.6,\"THR:O\":-.55,\"TRP:N\":-.15,\"TRP:CA\":.1,\"TRP:CB\":0,\"TRP:CG\":-.03,\"TRP:CD2\":.1,\"TRP:CE2\":-.04,\"TRP:CE3\":-.03,\"TRP:CD1\":.06,\"TRP:NE1\":-.06,\"TRP:CZ2\":0,\"TRP:CZ3\":0,\"TRP:CH2\":0,\"TRP:C\":.6,\"TRP:O\":-.55,\"TYR:N\":-.15,\"TYR:CA\":.1,\"TYR:CB\":0,\"TYR:CG\":0,\"TYR:CD1\":0,\"TYR:CE1\":0,\"TYR:CD2\":0,\"TYR:CE2\":0,\"TYR:CZ\":.25,\"TYR:OH\":-.25,\"TYR:C\":.6,\"TYR:O\":-.55,\"VAL:N\":-.15,\"VAL:CA\":.1,\n\"VAL:CB\":0,\"VAL:CG1\":0,\"VAL:CG2\":0,\"VAL:C\":.6,\"VAL:O\":-.55};$3Dmol.applyPartialCharges=function(b,c){c&&\"undefined\"!==typeof b.partialCharge||b.resn&&b.atom&&(b.properties.partialCharge=$3Dmol.partialCharges[b.resn+\":\"+b.atom])};\"undefined\"===typeof console&&(console={log:function(){}});\n$3Dmol.ProteinSurface=function(){var b=0,c=0,d=0,h=2,e=0,t=0,g=0,q=0,p=null,u=null,m=null,l=0,n=0,y=0,f=0,x=0,w=0,R={H:1.2,Li:1.82,Na:2.27,K:2.75,C:1.7,N:1.55,O:1.52,F:1.47,P:1.8,S:1.8,CL:1.75,BR:1.85,SE:1.9,ZN:1.39,CU:1.4,NI:1.63,X:2},P=function(b){return b.elem&&\"undefined\"!=typeof R[b.elem]?b.elem:\"X\"},A={},T={},G,C,z=[new Int32Array([1,0,0]),new Int32Array([-1,0,0]),new Int32Array([0,1,0]),new Int32Array([0,-1,0]),new Int32Array([0,0,1]),new Int32Array([0,0,-1]),new Int32Array([1,1,0]),new Int32Array([1,\n-1,0]),new Int32Array([-1,1,0]),new Int32Array([-1,-1,0]),new Int32Array([1,0,1]),new Int32Array([1,0,-1]),new Int32Array([-1,0,1]),new Int32Array([-1,0,-1]),new Int32Array([0,1,1]),new Int32Array([0,1,-1]),new Int32Array([0,-1,1]),new Int32Array([0,-1,-1]),new Int32Array([1,1,1]),new Int32Array([1,1,-1]),new Int32Array([1,-1,1]),new Int32Array([-1,1,1]),new Int32Array([1,-1,-1]),new Int32Array([-1,-1,1]),new Int32Array([-1,1,-1]),new Int32Array([-1,-1,-1])];this.getFacesAndVertices=function(e){var f=\n{},g;var l=0;for(g=e.length;l<g;l++)f[e[l]]=!0;e=C;l=0;for(g=e.length;l<g;l++)e[l].x=e[l].x/h-b,e[l].y=e[l].y/h-c,e[l].z=e[l].z/h-d;var n=[];l=0;for(g=G.length;l<g;l+=3){var q=G[l],t=G[l+1],w=G[l+2],x=e[t].atomid,y=e[w].atomid,z=e[q].atomid;x<z&&(z=x);y<z&&(z=y);f[z]&&q!==t&&t!==w&&q!==w&&(n.push(q),n.push(t),n.push(w))}m=u=p=null;return{vertices:e,faces:n}};this.initparm=function(z,A,H){1E6<H&&(h=1);H=1/h*5.5;l=z[0][0];f=z[1][0];n=z[0][1];x=z[1][1];y=z[0][2];w=z[1][2];A?(l-=1.4+H,n-=1.4+H,y-=1.4+\nH,f+=1.4+H,x+=1.4+H,w+=1.4+H):(l-=H,n-=H,y-=H,f+=H,x+=H,w+=H);l=Math.floor(l*h)/h;n=Math.floor(n*h)/h;y=Math.floor(y*h)/h;f=Math.ceil(f*h)/h;x=Math.ceil(x*h)/h;w=Math.ceil(w*h)/h;b=-l;c=-n;d=-y;g=Math.ceil(h*(f-l))+1;t=Math.ceil(h*(x-n))+1;e=Math.ceil(h*(w-y))+1;this.boundingatom(A);q=1.4*h;p=new Uint8Array(g*t*e);u=new Float64Array(g*t*e);m=new Int32Array(g*t*e)};this.boundingatom=function(b){var c=[];flagradius=b;for(var d in R)if(R.hasOwnProperty(d)){var e=R[d];c[d]=b?(e+1.4)*h+.5:e*h+.5;e=c[d]*\nc[d];T[d]=Math.floor(c[d])+1;A[d]=new Int32Array(T[d]*T[d]);for(j=indx=0;j<T[d];j++)for(k=0;k<T[d];k++){var f=j*j+k*k;f>e?A[d][indx]=-1:(f=Math.sqrt(e-f),A[d][indx]=Math.floor(f));indx++}}};this.fillvoxels=function(b,c){var d;var e=0;for(d=p.length;e<d;e++)p[e]=0,u[e]=-1,m[e]=-1;for(e in c)d=b[c[e]],void 0!==d&&this.fillAtom(d,b);e=0;for(d=p.length;e<d;e++)p[e]&1&&(p[e]|=2)};this.fillAtom=function(f,l){var n,q,u,w,x,y;var z=Math.floor(.5+h*(f.x+b));var I=Math.floor(.5+h*(f.y+c));var C=Math.floor(.5+\nh*(f.z+d));var K=P(f),D=0,G=t*e;var S=0;for(y=T[K];S<y;S++)for(n=0;n<y;n++){if(-1!=A[K][D])for(u=-1;2>u;u++)for(w=-1;2>w;w++)for(x=-1;2>x;x++)if(0!==u&&0!==w&&0!==x){var O=u*S;var R=x*n;for(q=0;q<=A[K][D];q++){var aa=q*w;var B=z+O;var Y=I+aa;var X=C+R;if(!(0>B||0>Y||0>X||B>=g||Y>=t||X>=e))if(X=B*G+Y*e+X,p[X]&1){var da=l[m[X]];da.serial!=f.serial&&(B=z+O-Math.floor(.5+h*(da.x+b)),Y=I+aa-Math.floor(.5+h*(da.y+c)),da=C+R-Math.floor(.5+h*(da.z+d)),O*O+aa*aa+R*R<B*B+Y*Y+da*da&&(m[X]=f.serial))}else p[X]|=\n1,m[X]=f.serial}}D++}};this.fillvoxelswaals=function(b,c){var d;var e=0;for(d=p.length;e<d;e++)p[e]&=-3;for(e in c)d=b[c[e]],void 0!==d&&this.fillAtomWaals(d,b)};this.fillAtomWaals=function(f,l){var n=0,q,u,w,x,y,z;var I=Math.floor(.5+h*(f.x+b));var C=Math.floor(.5+h*(f.y+c));var D=Math.floor(.5+h*(f.z+d));var K=P(f),G=t*e;var S=0;for(z=T[K];S<z;S++)for(q=0;q<z;q++){if(-1!=A[K][n])for(w=-1;2>w;w++)for(x=-1;2>x;x++)for(y=-1;2>y;y++)if(0!==w&&0!==x&&0!==y){var O=w*S;var R=y*q;for(u=0;u<=A[K][n];u++){var aa=\nu*x;var B=I+O;var Y=C+aa;var X=D+R;if(!(0>B||0>Y||0>X||B>=g||Y>=t||X>=e))if(X=B*G+Y*e+X,p[X]&2){var da=l[m[X]];da.serial!=f.serial&&(B=I+O-Math.floor(.5+h*(da.x+b)),Y=C+aa-Math.floor(.5+h*(da.y+c)),da=D+R-Math.floor(.5+h*(da.z+d)),O*O+aa*aa+R*R<B*B+Y*Y+da*da&&(m[X]=f.serial))}else p[X]|=2,m[X]=f.serial}}n++}};this.buildboundary=function(){var b=t*e;for(i=0;i<g;i++)for(j=0;j<e;j++)for(k=0;k<t;k++){var c=i*b+k*e+j;if(p[c]&1)for(var d=0;26>d;){var f=i+z[d][0],h=j+z[d][2],l=k+z[d][1];if(-1<f&&f<g&&-1<\nl&&l<t&&-1<h&&h<e&&!(p[f*b+l*e+h]&1)){p[c]|=4;break}else d++}}};var D=function(b,c,d){var e=new Int32Array(b*c*d*3);this.set=function(b,f,g,h){b=3*((b*c+f)*d+g);e[b]=h.ix;e[b+1]=h.iy;e[b+2]=h.iz};this.get=function(b,f,g){b=3*((b*c+f)*d+g);return{ix:e[b],iy:e[b+1],iz:e[b+2]}}};this.fastdistancemap=function(){var b,c,d,f=new D(g,t,e),l=t*e,m=q*q,n=[];for(b=0;b<g;b++)for(c=0;c<t;c++)for(d=0;d<e;d++){var w=b*l+c*e+d;p[w]&=-3;if(p[w]&1&&p[w]&4){var x={ix:b,iy:c,iz:d};f.set(b,c,d,x);n.push(x);u[w]=0;p[w]|=\n2;p[w]&=-5}}do for(d=this.fastoneshell(n,f),n=[],b=0,c=d.length;b<c;b++)w=l*d[b].ix+e*d[b].iy+d[b].iz,p[w]&=-5,u[w]<=1.0404*m&&n.push({ix:d[b].ix,iy:d[b].iy,iz:d[b].iz});while(0!==n.length);b=h-.5;0>b&&(b=0);m-=.5/(.1+b);for(b=0;b<g;b++)for(c=0;c<t;c++)for(d=0;d<e;d++)w=b*l+c*e+d,p[w]&=-5,p[w]&1&&(!(p[w]&2)||p[w]&2&&u[w]>=m)&&(p[w]|=4)};this.fastoneshell=function(b,c){var d,f,h=[];if(0===b.length)return h;tnv={ix:-1,iy:-1,iz:-1};var l=t*e;var m=0;for(f=b.length;m<f;m++){var n=b[m].ix;var q=b[m].iy;\nvar w=b[m].iz;var x=c.get(n,q,w);for(d=0;6>d;d++)if(tnv.ix=n+z[d][0],tnv.iy=q+z[d][1],tnv.iz=w+z[d][2],tnv.ix<g&&-1<tnv.ix&&tnv.iy<t&&-1<tnv.iy&&tnv.iz<e&&-1<tnv.iz){var y=tnv.ix*l+e*tnv.iy+tnv.iz;if(p[y]&1&&!(p[y]&2)){c.set(tnv.ix,tnv.iy,w+z[d][2],x);var A=tnv.ix-x.ix;var C=tnv.iy-x.iy;var D=tnv.iz-x.iz;A=A*A+C*C+D*D;u[y]=A;p[y]|=2;p[y]|=4;h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz})}else p[y]&1&&p[y]&2&&(A=tnv.ix-x.ix,C=tnv.iy-x.iy,D=tnv.iz-x.iz,A=A*A+C*C+D*D,A<u[y]&&(c.set(tnv.ix,tnv.iy,tnv.iz,x),u[y]=\nA,p[y]&4||(p[y]|=4,h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz}))))}}m=0;for(f=b.length;m<f;m++)for(n=b[m].ix,q=b[m].iy,w=b[m].iz,x=c.get(n,q,w),d=6;18>d;d++)tnv.ix=n+z[d][0],tnv.iy=q+z[d][1],tnv.iz=w+z[d][2],tnv.ix<g&&-1<tnv.ix&&tnv.iy<t&&-1<tnv.iy&&tnv.iz<e&&-1<tnv.iz&&(y=tnv.ix*l+e*tnv.iy+tnv.iz,p[y]&1&&!(p[y]&2)?(c.set(tnv.ix,tnv.iy,w+z[d][2],x),A=tnv.ix-x.ix,C=tnv.iy-x.iy,D=tnv.iz-x.iz,A=A*A+C*C+D*D,u[y]=A,p[y]|=2,p[y]|=4,h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz})):p[y]&1&&p[y]&2&&(A=tnv.ix-x.ix,C=tnv.iy-\nx.iy,D=tnv.iz-x.iz,A=A*A+C*C+D*D,A<u[y]&&(c.set(tnv.ix,tnv.iy,tnv.iz,x),u[y]=A,p[y]&4||(p[y]|=4,h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz})))));m=0;for(f=b.length;m<f;m++)for(n=b[m].ix,q=b[m].iy,w=b[m].iz,x=c.get(n,q,w),d=18;26>d;d++)tnv.ix=n+z[d][0],tnv.iy=q+z[d][1],tnv.iz=w+z[d][2],tnv.ix<g&&-1<tnv.ix&&tnv.iy<t&&-1<tnv.iy&&tnv.iz<e&&-1<tnv.iz&&(y=tnv.ix*l+e*tnv.iy+tnv.iz,p[y]&1&&!(p[y]&2)?(c.set(tnv.ix,tnv.iy,w+z[d][2],x),A=tnv.ix-x.ix,C=tnv.iy-x.iy,D=tnv.iz-x.iz,A=A*A+C*C+D*D,u[y]=A,p[y]|=2,p[y]|=\n4,h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz})):p[y]&1&&p[y]&2&&(A=tnv.ix-x.ix,C=tnv.iy-x.iy,D=tnv.iz-x.iz,A=A*A+C*C+D*D,A<u[y]&&(c.set(tnv.ix,tnv.iy,tnv.iz,x),u[y]=A,p[y]&4||(p[y]|=4,h.push({ix:tnv.ix,iy:tnv.iy,iz:tnv.iz})))));return h};this.marchingcubeinit=function(b){for(var c=0,d=p.length;c<d;c++)1==b?p[c]&=-5:4==b?(p[c]&=-3,p[c]&4&&(p[c]|=2),p[c]&=-5):2==b?p[c]&4&&p[c]&2?p[c]&=-5:p[c]&4&&!(p[c]&2)&&(p[c]|=2):3==b&&(p[c]&=-5)};this.marchingcube=function(b){this.marchingcubeinit(b);C=[];G=[];$3Dmol.MarchingCube.march(p,\nC,G,{smooth:1,nX:g,nY:t,nZ:e});b=t*e;for(var c=0,d=C.length;c<d;c++)C[c].atomid=m[C[c].x*b+e*C[c].y+C[c].z];$3Dmol.MarchingCube.laplacianSmooth(1,C,G)}};(function(){});\n$3Dmol.VolumeData=function(b,c,d){this.unit={x:1,y:1,z:1};this.origin={x:0,y:0,z:0};this.size={x:0,y:0,z:0};this.data=new Float32Array([]);this.matrix=null;c=c.toLowerCase();if(/\\.gz$/.test(c)){c=c.replace(/\\.gz$/,\"\");try{b=this[c]&&this[c].isbinary?pako.inflate(b):(new TextDecoder(\"utf-8\")).decode(pako.inflate(b))}catch(t){console.log(t)}}if(this[c])this[c](b);if(d){if(d.negate)for(b=0,c=this.data.length;b<c;b++)this.data[b]=-this.data[b];if(d.normalize){var h=0;b=0;for(c=this.data.length;b<c;b++)h+=\nthis.data[b];d=h/this.data.length;console.log(\"computed mean: \"+d);b=h=0;for(c=this.data.length;b<c;b++){var e=this.data[b]-d;h+=e*e}h/=this.data.length;b=0;for(c=this.data.length;b<c;b++)this.data[b]=(this.data[b]-d)/h}}};\n$3Dmol.VolumeData.prototype.getVal=function(b,c,d){this.matrix?(this.inversematrix||(this.inversematrix=(new $3Dmol.Matrix4).getInverse(this.matrix)),d=new $3Dmol.Vector3(b,c,d),d=d.applyMatrix4(this.inversematrix),b=d.x,c=d.y,d=d.z):(b-=this.origin.x,c-=this.origin.y,d-=this.origin.z,b/=this.unit.x,c/=this.unit.y,d/=this.unit.z);b=Math.round(b);c=Math.round(c);d=Math.round(d);return 0>b||b>=this.size.x||0>c||c>=this.size.y||0>d||d>=this.size.z?0:this.data[b*this.size.y*this.size.z+c*this.size.z+\nd]};$3Dmol.VolumeData.prototype.getCoordinates=function(b){var c=b/(this.size.y*this.size.z),d=b%(this.size.y*this.size.z);b%=this.size.z;c*=this.unit.x;d*=this.unit.y;b*=this.unit.z;c+=this.origin.x;d+=this.origin.y;b+=this.origin.z;return{x:c,y:d,z:b}};\n$3Dmol.VolumeData.prototype.vasp=function(b){var c=b.replace(/^\\s+/,\"\").split(/[\\n\\r]/),d=$3Dmol.Parsers.vasp(b)[0].length;if(0==d)console.log(\"No good formating of CHG or CHGCAR file, not atomic information provided in the file.\"),this.data=[];else{var h=parseFloat(c[1]);var e=c[2].replace(/^\\s+/,\"\").split(/\\s+/);b=(new $3Dmol.Vector3(parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]))).multiplyScalar(1.889725992*h);e=c[3].replace(/^\\s+/,\"\").split(/\\s+/);var t=(new $3Dmol.Vector3(parseFloat(e[0]),\nparseFloat(e[1]),parseFloat(e[2]))).multiplyScalar(1.889725992*h);e=c[4].replace(/^\\s+/,\"\").split(/\\s+/);e=(new $3Dmol.Vector3(parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]))).multiplyScalar(1.889725992*h);h=b.x*(t.y*e.z-e.y*t.z)-t.x*(b.y*e.z-e.y*b.z)+e.x*(b.y*t.z-t.y*b.z);h=Math.abs(h)/Math.pow(1.889725992,3);h=1/h;c.splice(0,8+d+1);var g=c[0].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");d=Math.abs(g[0]);var q=Math.abs(g[1]);g=Math.abs(g[2]);var p=this.origin=new $3Dmol.Vector3(0,0,0);this.size=\n{x:d,y:q,z:g};this.unit=new $3Dmol.Vector3(b.x,t.y,e.z);b=b.multiplyScalar(1/(1.889725992*d));t=t.multiplyScalar(1/(1.889725992*q));e=e.multiplyScalar(1/(1.889725992*g));if(0!=b.y||0!=b.z||0!=t.x||0!=t.z||0!=e.x||0!=e.y)this.matrix=new $3Dmol.Matrix4(b.x,t.x,e.x,0,b.y,t.y,e.y,0,b.z,t.z,e.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new $3Dmol.Matrix4).makeTranslation(p.x,p.y,p.z)),this.origin=new $3Dmol.Vector3(0,0,0),this.unit=new $3Dmol.Vector3(1,1,1);c.splice(0,1);c=c.join(\" \");\nc=c.replace(/^\\s+/,\"\");c=c.split(/[\\s\\r]+/);c.splice(d*q*g+1);c=new Float32Array(c);for(b=0;b<c.length;b++)c[b]=c[b]*h*.036749309;this.data=c}};\n$3Dmol.VolumeData.prototype.dx=function(b){b=b.split(/[\\n\\r]+/);var c,d,h=/gridpositions\\s+counts\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)/,e=/^origin\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)/,t=/^delta\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)/,g=/data follows/;for(c=0;c<b.length;c++){var q=b[c];if(d=h.exec(q)){var p=parseInt(d[1]),u=parseInt(d[2]);d=parseInt(d[3]);this.size={x:p,y:u,z:d}}else if(d=t.exec(q)){p=parseFloat(d[1]);0==parseFloat(d[2])&&0==parseFloat(d[3])||console.log(\"Non-orthogonal delta matrix not currently supported in dx format\");\nc+=1;q=b[c];d=t.exec(q);if(null==d){console.log(\"Parse error in dx delta matrix\");return}u=parseFloat(d[2]);0==parseFloat(d[1])&&0==parseFloat(d[3])||console.log(\"Non-orthogonal delta matrix not currently supported in dx format\");c+=1;q=b[c];d=t.exec(q);if(null==d){console.log(\"Parse error in dx delta matrix\");return}q=parseFloat(d[3]);0==parseFloat(d[1])&&0==parseFloat(d[2])||console.log(\"Non-orthogonal delta matrix not currently supported in dx format\");this.unit=new $3Dmol.Vector3(p,u,q)}else if(d=\ne.exec(q))p=parseFloat(d[1]),u=parseFloat(d[2]),d=parseFloat(d[3]),this.origin=new $3Dmol.Vector3(p,u,d);else if(g.exec(q))break}c+=1;this.size&&this.origin&&this.unit&&this.size?(b=b.splice(c).join(\" \"),b=b.split(/[\\s\\r]+/),this.data=new Float32Array(b)):console.log(\"Error parsing dx format\")};\n$3Dmol.VolumeData.prototype.cube=function(b){b=b.replace(/^\\s+/,\"\").split(/[\\n\\r]+/);if(!(6>b.length)){var c=b[2].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \"),d=parseFloat(c[0]),h=Math.abs(d),e=this.origin=new $3Dmol.Vector3(parseFloat(c[1]),parseFloat(c[2]),parseFloat(c[3]));c=b[3].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");var t=0<c[0]?.529177:1;e.multiplyScalar(t);var g=Math.abs(c[0]),q=(new $3Dmol.Vector3(parseFloat(c[1]),parseFloat(c[2]),parseFloat(c[3]))).multiplyScalar(t);c=b[4].replace(/^\\s+/,\n\"\").replace(/\\s+/g,\" \").split(\" \");var p=Math.abs(c[0]),u=(new $3Dmol.Vector3(parseFloat(c[1]),parseFloat(c[2]),parseFloat(c[3]))).multiplyScalar(t);c=b[5].replace(/^\\s+/,\"\").replace(/\\s+/g,\" \").split(\" \");var m=Math.abs(c[0]);c=(new $3Dmol.Vector3(parseFloat(c[1]),parseFloat(c[2]),parseFloat(c[3]))).multiplyScalar(t);this.size={x:g,y:p,z:m};this.unit=new $3Dmol.Vector3(q.x,u.y,c.z);if(0!=q.y||0!=q.z||0!=u.x||0!=u.z||0!=c.x||0!=c.y)this.matrix=new $3Dmol.Matrix4(q.x,u.x,c.x,0,q.y,u.y,c.y,0,q.z,u.z,\nc.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new $3Dmol.Matrix4).makeTranslation(e.x,e.y,e.z)),this.origin=new $3Dmol.Vector3(0,0,0),this.unit=new $3Dmol.Vector3(1,1,1);e=6;0>d&&e++;b=b.splice(h+e).join(\" \");b=b.replace(/^\\s+/,\"\");b=b.split(/[\\s\\r]+/);this.data=new Float32Array(b)}};\n$3Dmol.VolumeData.prototype.ccp4=function(b){var c;b=new Int8Array(b);var d=new Int32Array(b.buffer,0,56);var h=new Float32Array(b.buffer,0,56);var e=new DataView(b.buffer);String.fromCharCode(e.getUint8(208),e.getUint8(209),e.getUint8(210),e.getUint8(211));var t=[e.getUint8(212),e.getUint8(213)];if(17===t[0]&&17===t[1])for(t=b.byteLength,c=0;c<t;c+=4)e.setFloat32(c,e.getFloat32(c),!0);e=d[0];t=d[1];var g=d[2];c=d[4];var q=d[5];var p=d[6];var u=d[7];var m=d[8];var l=d[9];var n=h[10];var y=h[11];var f=\nh[12];var x=h[13];var w=h[14];var R=h[15];var P=d[16];var A=d[17];var T=d[18];d=d[23];var G=h[49];var C=h[50];h=h[51];n=[n,0,0];y=[y*Math.cos(Math.PI/180*R),y*Math.sin(Math.PI/180*R),0];x=[f*Math.cos(Math.PI/180*w),f*(Math.cos(Math.PI/180*x)-Math.cos(Math.PI/180*R)*Math.cos(Math.PI/180*w))/Math.sin(Math.PI/180*R),0];x[2]=Math.sqrt(f*f*Math.sin(Math.PI/180*w)*Math.sin(Math.PI/180*w)-x[1]*x[1]);f=[0,n,y,x];u=[0,u,m,l];P=[0,P,A,T];this.matrix=new $3Dmol.Matrix4;this.matrix.set(f[P[1]][0]/u[P[1]],f[P[2]][0]/\nu[P[2]],f[P[3]][0]/u[P[3]],0,f[P[1]][1]/u[P[1]],f[P[2]][1]/u[P[2]],f[P[3]][1]/u[P[3]],0,f[P[1]][2]/u[P[1]],f[P[2]][2]/u[P[2]],f[P[3]][2]/u[P[3]],0,0,0,0,1);this.matrix=this.matrix.multiplyMatrices(this.matrix,(new $3Dmol.Matrix4).makeTranslation(c+G,q+C,p+h));this.origin=new $3Dmol.Vector3(0,0,0);this.unit=new $3Dmol.Vector3(1,1,1);this.size={x:e,y:t,z:g};b=new Float32Array(b.buffer,1024+d);this.data=new Float32Array(e*t*g);for(c=0;c<e;c++)for(q=0;q<t;q++)for(p=0;p<g;p++)this.data[(c*t+q)*g+p]=b[(p*\nt+q)*e+c]};$3Dmol.VolumeData.prototype.ccp4.isbinary=!0;\n$3Dmol.workerString=function(){self.onmessage=function(b){b=b.data;var c=b.type;if(0>c)self.atomData=b.atoms,self.volume=b.volume,self.ps=new ProteinSurface;else{var d=self.ps;d.initparm(b.expandedExtent,1==c?!1:!0,self.volume);d.fillvoxels(self.atomData,b.extendedAtoms);d.buildboundary();if(4===c||2===c)d.fastdistancemap(),d.boundingatom(!1),d.fillvoxelswaals(self.atomData,b.extendedAtoms);d.marchingcube(c);b=d.getFacesAndVertices(b.atomsToShow);self.postMessage(b)}}}.toString().replace(/(^.*?\\{|\\}$)/g,\n\"\");$3Dmol.workerString+=\"; var ProteinSurface=\"+$3Dmol.ProteinSurface.toString().replace(/[a-zA-Z_$]{1}[0-9a-zA-Z_$]*.MarchingCube./g,\"MarchingCube.\");$3Dmol.workerString+=\",MarchingCube=(\"+$3Dmol.MarchingCubeInitializer.toString()+\")();\";$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:\"text/javascript\"})):{postMessage:function(){}};$3Dmol.workerString=$3Dmol.workerString;$3Dmol.SurfaceWorker=$3Dmol.SurfaceWorker;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/3dmol/build/3Dmol-min.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    \"default\": obj\n  };\n}\n\nmodule.exports = _interopRequireDefault;\n\n//# sourceURL=webpack://dash_bio/./node_modules/@babel/runtime/helpers/interopRequireDefault.js?");

/***/ }),

/***/ "./node_modules/@emotion/hash/dist/hash.esm.js":
/*!*****************************************************!*\
  !*** ./node_modules/@emotion/hash/dist/hash.esm.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* eslint-disable */\n// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js\nfunction murmurhash2_32_gc(str) {\n  var l = str.length,\n      h = l ^ l,\n      i = 0,\n      k;\n\n  while (l >= 4) {\n    k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n    k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n    k ^= k >>> 24;\n    k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n    h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n    l -= 4;\n    ++i;\n  }\n\n  switch (l) {\n    case 3:\n      h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n    case 2:\n      h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n    case 1:\n      h ^= str.charCodeAt(i) & 0xff;\n      h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n  }\n\n  h ^= h >>> 13;\n  h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n  h ^= h >>> 15;\n  return (h >>> 0).toString(36);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (murmurhash2_32_gc);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/@emotion/hash/dist/hash.esm.js?");

/***/ }),

/***/ "./node_modules/@emotion/memoize/dist/memoize.esm.js":
/*!***********************************************************!*\
  !*** ./node_modules/@emotion/memoize/dist/memoize.esm.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction memoize(fn) {\n  var cache = {};\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (memoize);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/@emotion/memoize/dist/memoize.esm.js?");

/***/ }),

/***/ "./node_modules/@emotion/stylis/dist/stylis.esm.js":
/*!*********************************************************!*\
  !*** ./node_modules/@emotion/stylis/dist/stylis.esm.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction stylis_min (W) {\n  function M(d, c, e, h, a) {\n    for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n      g = e.charCodeAt(l);\n      l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n      if (0 === b + n + v + m) {\n        if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n          switch (g) {\n            case 32:\n            case 9:\n            case 59:\n            case 13:\n            case 10:\n              break;\n\n            default:\n              f += e.charAt(l);\n          }\n\n          g = 59;\n        }\n\n        switch (g) {\n          case 123:\n            f = f.trim();\n            q = f.charCodeAt(0);\n            k = 1;\n\n            for (t = ++l; l < B;) {\n              switch (g = e.charCodeAt(l)) {\n                case 123:\n                  k++;\n                  break;\n\n                case 125:\n                  k--;\n                  break;\n\n                case 47:\n                  switch (g = e.charCodeAt(l + 1)) {\n                    case 42:\n                    case 47:\n                      a: {\n                        for (u = l + 1; u < J; ++u) {\n                          switch (e.charCodeAt(u)) {\n                            case 47:\n                              if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                              break;\n\n                            case 10:\n                              if (47 === g) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                          }\n                        }\n\n                        l = u;\n                      }\n\n                  }\n\n                  break;\n\n                case 91:\n                  g++;\n\n                case 40:\n                  g++;\n\n                case 34:\n                case 39:\n                  for (; l++ < J && e.charCodeAt(l) !== g;) {\n                  }\n\n              }\n\n              if (0 === k) break;\n              l++;\n            }\n\n            k = e.substring(t, l);\n            0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n            switch (q) {\n              case 64:\n                0 < r && (f = f.replace(N, ''));\n                g = f.charCodeAt(1);\n\n                switch (g) {\n                  case 100:\n                  case 109:\n                  case 115:\n                  case 45:\n                    r = c;\n                    break;\n\n                  default:\n                    r = O;\n                }\n\n                k = M(c, r, k, g, a + 1);\n                t = k.length;\n                0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n                if (0 < t) switch (g) {\n                  case 115:\n                    f = f.replace(da, ea);\n\n                  case 100:\n                  case 109:\n                  case 45:\n                    k = f + '{' + k + '}';\n                    break;\n\n                  case 107:\n                    f = f.replace(fa, '$1 $2');\n                    k = f + '{' + k + '}';\n                    k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n                    break;\n\n                  default:\n                    k = f + k, 112 === h && (k = (p += k, ''));\n                } else k = '';\n                break;\n\n              default:\n                k = M(c, X(c, f, I), k, h, a + 1);\n            }\n\n            F += k;\n            k = I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n            break;\n\n          case 125:\n          case 59:\n            f = (0 < r ? f.replace(N, '') : f).trim();\n            if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n              case 0:\n                break;\n\n              case 64:\n                if (105 === g || 99 === g) {\n                  G += f + e.charAt(l);\n                  break;\n                }\n\n              default:\n                58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n            }\n            I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n        }\n      }\n\n      switch (g) {\n        case 13:\n        case 10:\n          47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n          0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n          z = 1;\n          D++;\n          break;\n\n        case 59:\n        case 125:\n          if (0 === b + n + v + m) {\n            z++;\n            break;\n          }\n\n        default:\n          z++;\n          y = e.charAt(l);\n\n          switch (g) {\n            case 9:\n            case 32:\n              if (0 === n + m + b) switch (x) {\n                case 44:\n                case 58:\n                case 9:\n                case 32:\n                  y = '';\n                  break;\n\n                default:\n                  32 !== g && (y = ' ');\n              }\n              break;\n\n            case 0:\n              y = '\\\\0';\n              break;\n\n            case 12:\n              y = '\\\\f';\n              break;\n\n            case 11:\n              y = '\\\\v';\n              break;\n\n            case 38:\n              0 === n + b + m && (r = I = 1, y = '\\f' + y);\n              break;\n\n            case 108:\n              if (0 === n + b + m + E && 0 < u) switch (l - u) {\n                case 2:\n                  112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n                case 8:\n                  111 === K && (E = K);\n              }\n              break;\n\n            case 58:\n              0 === n + b + m && (u = l);\n              break;\n\n            case 44:\n              0 === b + v + n + m && (r = 1, y += '\\r');\n              break;\n\n            case 34:\n            case 39:\n              0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n              break;\n\n            case 91:\n              0 === n + b + v && m++;\n              break;\n\n            case 93:\n              0 === n + b + v && m--;\n              break;\n\n            case 41:\n              0 === n + b + m && v--;\n              break;\n\n            case 40:\n              if (0 === n + b + m) {\n                if (0 === q) switch (2 * x + 3 * K) {\n                  case 533:\n                    break;\n\n                  default:\n                    q = 1;\n                }\n                v++;\n              }\n\n              break;\n\n            case 64:\n              0 === b + v + n + m + u + k && (k = 1);\n              break;\n\n            case 42:\n            case 47:\n              if (!(0 < n + m + v)) switch (b) {\n                case 0:\n                  switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n                    case 235:\n                      b = 47;\n                      break;\n\n                    case 220:\n                      t = l, b = 42;\n                  }\n\n                  break;\n\n                case 42:\n                  47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n              }\n          }\n\n          0 === b && (f += y);\n      }\n\n      K = x;\n      x = g;\n      l++;\n    }\n\n    t = p.length;\n\n    if (0 < t) {\n      r = c;\n      if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n      p = r.join(',') + '{' + p + '}';\n\n      if (0 !== w * E) {\n        2 !== w || L(p, 2) || (E = 0);\n\n        switch (E) {\n          case 111:\n            p = p.replace(ha, ':-moz-$1') + p;\n            break;\n\n          case 112:\n            p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n        }\n\n        E = 0;\n      }\n    }\n\n    return G + p + F;\n  }\n\n  function X(d, c, e) {\n    var h = c.trim().split(ia);\n    c = h;\n    var a = h.length,\n        m = d.length;\n\n    switch (m) {\n      case 0:\n      case 1:\n        var b = 0;\n\n        for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n          c[b] = Z(d, c[b], e, m).trim();\n        }\n\n        break;\n\n      default:\n        var v = b = 0;\n\n        for (c = []; b < a; ++b) {\n          for (var n = 0; n < m; ++n) {\n            c[v++] = Z(d[n] + ' ', h[b], e, m).trim();\n          }\n        }\n\n    }\n\n    return c;\n  }\n\n  function Z(d, c, e) {\n    var h = c.charCodeAt(0);\n    33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n    switch (h) {\n      case 38:\n        return c.replace(F, '$1' + d.trim());\n\n      case 58:\n        return d.trim() + c.replace(F, '$1' + d.trim());\n\n      default:\n        if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n    }\n\n    return d + c;\n  }\n\n  function P(d, c, e, h) {\n    var a = d + ';',\n        m = 2 * c + 3 * e + 4 * h;\n\n    if (944 === m) {\n      d = a.indexOf(':', 9) + 1;\n      var b = a.substring(d, a.length - 1).trim();\n      b = a.substring(0, d).trim() + b + ';';\n      return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n    }\n\n    if (0 === w || 2 === w && !L(a, 1)) return a;\n\n    switch (m) {\n      case 1015:\n        return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n      case 951:\n        return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n      case 963:\n        return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n      case 1009:\n        if (100 !== a.charCodeAt(4)) break;\n\n      case 969:\n      case 942:\n        return '-webkit-' + a + a;\n\n      case 978:\n        return '-webkit-' + a + '-moz-' + a + a;\n\n      case 1019:\n      case 983:\n        return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n      case 883:\n        if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n        if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n        break;\n\n      case 932:\n        if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n          case 103:\n            return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n          case 98:\n            return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n        }\n        return '-webkit-' + a + '-ms-' + a + a;\n\n      case 964:\n        return '-webkit-' + a + '-ms-flex-' + a + a;\n\n      case 1023:\n        if (99 !== a.charCodeAt(8)) break;\n        b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n        return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n      case 1005:\n        return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n      case 1e3:\n        b = a.substring(13).trim();\n        c = b.indexOf('-') + 1;\n\n        switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n          case 226:\n            b = a.replace(G, 'tb');\n            break;\n\n          case 232:\n            b = a.replace(G, 'tb-rl');\n            break;\n\n          case 220:\n            b = a.replace(G, 'lr');\n            break;\n\n          default:\n            return a;\n        }\n\n        return '-webkit-' + a + '-ms-' + b + a;\n\n      case 1017:\n        if (-1 === a.indexOf('sticky', 9)) break;\n\n      case 975:\n        c = (a = d).length - 10;\n        b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n        switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n          case 203:\n            if (111 > b.charCodeAt(8)) break;\n\n          case 115:\n            a = a.replace(b, '-webkit-' + b) + ';' + a;\n            break;\n\n          case 207:\n          case 102:\n            a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n        }\n\n        return a + ';';\n\n      case 938:\n        if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n          case 105:\n            return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n          default:\n            return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n        }\n        break;\n\n      case 973:\n      case 989:\n        if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n      case 931:\n      case 953:\n        if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n        break;\n\n      case 962:\n        if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n    }\n\n    return a;\n  }\n\n  function L(d, c) {\n    var e = d.indexOf(1 === c ? ':' : '{'),\n        h = d.substring(0, 3 !== c ? e : 10);\n    e = d.substring(e + 1, d.length - 1);\n    return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n  }\n\n  function ea(d, c) {\n    var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n    return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n  }\n\n  function H(d, c, e, h, a, m, b, v, n, q) {\n    for (var g = 0, x = c, w; g < A; ++g) {\n      switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n        case void 0:\n        case !1:\n        case !0:\n        case null:\n          break;\n\n        default:\n          x = w;\n      }\n    }\n\n    if (x !== c) return x;\n  }\n\n  function T(d) {\n    switch (d) {\n      case void 0:\n      case null:\n        A = S.length = 0;\n        break;\n\n      default:\n        switch (d.constructor) {\n          case Array:\n            for (var c = 0, e = d.length; c < e; ++c) {\n              T(d[c]);\n            }\n\n            break;\n\n          case Function:\n            S[A++] = d;\n            break;\n\n          case Boolean:\n            Y = !!d | 0;\n        }\n\n    }\n\n    return T;\n  }\n\n  function U(d) {\n    d = d.prefix;\n    void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n    return U;\n  }\n\n  function B(d, c) {\n    var e = d;\n    33 > e.charCodeAt(0) && (e = e.trim());\n    V = e;\n    e = [V];\n\n    if (0 < A) {\n      var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n      void 0 !== h && 'string' === typeof h && (c = h);\n    }\n\n    var a = M(O, e, c, 0, 0);\n    0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n    V = '';\n    E = 0;\n    z = D = 1;\n    return a;\n  }\n\n  var ca = /^\\0+/g,\n      N = /[\\0\\r\\f]/g,\n      aa = /: */g,\n      ka = /zoo|gra/,\n      ma = /([,: ])(transform)/g,\n      ia = /,\\r+?/g,\n      F = /([\\t\\r\\n ])*\\f?&/g,\n      fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n      Q = /::(place)/g,\n      ha = /:(read-only)/g,\n      G = /[svh]\\w+-[tblr]{2}/,\n      da = /\\(\\s*(.*)\\s*\\)/g,\n      oa = /([\\s\\S]*?);/g,\n      ba = /-self|flex-/g,\n      na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n      la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n      ja = /([^-])(image-set\\()/,\n      z = 1,\n      D = 1,\n      E = 0,\n      w = 1,\n      O = [],\n      S = [],\n      A = 0,\n      R = null,\n      Y = 0,\n      V = '';\n  B.use = T;\n  B.set = U;\n  void 0 !== W && U(W);\n  return B;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (stylis_min);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/@emotion/stylis/dist/stylis.esm.js?");

/***/ }),

/***/ "./node_modules/@emotion/unitless/dist/unitless.esm.js":
/*!*************************************************************!*\
  !*** ./node_modules/@emotion/unitless/dist/unitless.esm.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar unitlessKeys = {\n  animationIterationCount: 1,\n  borderImageOutset: 1,\n  borderImageSlice: 1,\n  borderImageWidth: 1,\n  boxFlex: 1,\n  boxFlexGroup: 1,\n  boxOrdinalGroup: 1,\n  columnCount: 1,\n  columns: 1,\n  flex: 1,\n  flexGrow: 1,\n  flexPositive: 1,\n  flexShrink: 1,\n  flexNegative: 1,\n  flexOrder: 1,\n  gridRow: 1,\n  gridRowEnd: 1,\n  gridRowSpan: 1,\n  gridRowStart: 1,\n  gridColumn: 1,\n  gridColumnEnd: 1,\n  gridColumnSpan: 1,\n  gridColumnStart: 1,\n  fontWeight: 1,\n  lineHeight: 1,\n  opacity: 1,\n  order: 1,\n  orphans: 1,\n  tabSize: 1,\n  widows: 1,\n  zIndex: 1,\n  zoom: 1,\n  WebkitLineClamp: 1,\n  // SVG-related properties\n  fillOpacity: 1,\n  floodOpacity: 1,\n  stopOpacity: 1,\n  strokeDasharray: 1,\n  strokeDashoffset: 1,\n  strokeMiterlimit: 1,\n  strokeOpacity: 1,\n  strokeWidth: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (unitlessKeys);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/@emotion/unitless/dist/unitless.esm.js?");

/***/ }),

/***/ "./node_modules/backbone-events-standalone/backbone-events-standalone.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/backbone-events-standalone/backbone-events-standalone.js ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Standalone extraction of Backbone.Events, no external dependency required.\n * Degrades nicely when Backone/underscore are already available in the current\n * global context.\n *\n * Note that docs suggest to use underscore's `_.extend()` method to add Events\n * support to some given object. A `mixin()` method has been added to the Events\n * prototype to avoid using underscore for that sole purpose:\n *\n *     var myEventEmitter = BackboneEvents.mixin({});\n *\n * Or for a function constructor:\n *\n *     function MyConstructor(){}\n *     MyConstructor.prototype.foo = function(){}\n *     BackboneEvents.mixin(MyConstructor.prototype);\n *\n * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n * (c) 2013 Nicolas Perriault\n */\n/* global exports:true, define, module */\n(function() {\n  var root = this,\n      nativeForEach = Array.prototype.forEach,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      slice = Array.prototype.slice,\n      idCounter = 0;\n\n  // Returns a partial implementation matching the minimal API subset required\n  // by Backbone.Events\n  function miniscore() {\n    return {\n      keys: Object.keys || function (obj) {\n        if (typeof obj !== \"object\" && typeof obj !== \"function\" || obj === null) {\n          throw new TypeError(\"keys() called on a non-object\");\n        }\n        var key, keys = [];\n        for (key in obj) {\n          if (obj.hasOwnProperty(key)) {\n            keys[keys.length] = key;\n          }\n        }\n        return keys;\n      },\n\n      uniqueId: function(prefix) {\n        var id = ++idCounter + '';\n        return prefix ? prefix + id : id;\n      },\n\n      has: function(obj, key) {\n        return hasOwnProperty.call(obj, key);\n      },\n\n      each: function(obj, iterator, context) {\n        if (obj == null) return;\n        if (nativeForEach && obj.forEach === nativeForEach) {\n          obj.forEach(iterator, context);\n        } else if (obj.length === +obj.length) {\n          for (var i = 0, l = obj.length; i < l; i++) {\n            iterator.call(context, obj[i], i, obj);\n          }\n        } else {\n          for (var key in obj) {\n            if (this.has(obj, key)) {\n              iterator.call(context, obj[key], key, obj);\n            }\n          }\n        }\n      },\n\n      once: function(func) {\n        var ran = false, memo;\n        return function() {\n          if (ran) return memo;\n          ran = true;\n          memo = func.apply(this, arguments);\n          func = null;\n          return memo;\n        };\n      }\n    };\n  }\n\n  var _ = miniscore(), Events;\n\n  // Backbone.Events\n  // ---------------\n\n  // A module that can be mixed in to *any object* in order to provide it with\n  // custom events. You may bind with `on` or remove with `off` callback\n  // functions to an event; `trigger`-ing an event fires all callbacks in\n  // succession.\n  //\n  //     var object = {};\n  //     _.extend(object, Backbone.Events);\n  //     object.on('expand', function(){ alert('expanded'); });\n  //     object.trigger('expand');\n  //\n  Events = {\n\n    // Bind an event to a `callback` function. Passing `\"all\"` will bind\n    // the callback to all events fired.\n    on: function(name, callback, context) {\n      if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;\n      this._events || (this._events = {});\n      var events = this._events[name] || (this._events[name] = []);\n      events.push({callback: callback, context: context, ctx: context || this});\n      return this;\n    },\n\n    // Bind an event to only be triggered a single time. After the first time\n    // the callback is invoked, it will be removed.\n    once: function(name, callback, context) {\n      if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;\n      var self = this;\n      var once = _.once(function() {\n        self.off(name, once);\n        callback.apply(this, arguments);\n      });\n      once._callback = callback;\n      return this.on(name, once, context);\n    },\n\n    // Remove one or many callbacks. If `context` is null, removes all\n    // callbacks with that function. If `callback` is null, removes all\n    // callbacks for the event. If `name` is null, removes all bound\n    // callbacks for all events.\n    off: function(name, callback, context) {\n      var retain, ev, events, names, i, l, j, k;\n      if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;\n      if (!name && !callback && !context) {\n        this._events = {};\n        return this;\n      }\n\n      names = name ? [name] : _.keys(this._events);\n      for (i = 0, l = names.length; i < l; i++) {\n        name = names[i];\n        if (events = this._events[name]) {\n          this._events[name] = retain = [];\n          if (callback || context) {\n            for (j = 0, k = events.length; j < k; j++) {\n              ev = events[j];\n              if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||\n                  (context && context !== ev.context)) {\n                retain.push(ev);\n              }\n            }\n          }\n          if (!retain.length) delete this._events[name];\n        }\n      }\n\n      return this;\n    },\n\n    // Trigger one or many events, firing all bound callbacks. Callbacks are\n    // passed the same arguments as `trigger` is, apart from the event name\n    // (unless you're listening on `\"all\"`, which will cause your callback to\n    // receive the true name of the event as the first argument).\n    trigger: function(name) {\n      if (!this._events) return this;\n      var args = slice.call(arguments, 1);\n      if (!eventsApi(this, 'trigger', name, args)) return this;\n      var events = this._events[name];\n      var allEvents = this._events.all;\n      if (events) triggerEvents(events, args);\n      if (allEvents) triggerEvents(allEvents, arguments);\n      return this;\n    },\n\n    // Tell this object to stop listening to either specific events ... or\n    // to every object it's currently listening to.\n    stopListening: function(obj, name, callback) {\n      var listeners = this._listeners;\n      if (!listeners) return this;\n      var deleteListener = !name && !callback;\n      if (typeof name === 'object') callback = this;\n      if (obj) (listeners = {})[obj._listenerId] = obj;\n      for (var id in listeners) {\n        listeners[id].off(name, callback, this);\n        if (deleteListener) delete this._listeners[id];\n      }\n      return this;\n    }\n\n  };\n\n  // Regular expression used to split event strings.\n  var eventSplitter = /\\s+/;\n\n  // Implement fancy features of the Events API such as multiple event\n  // names `\"change blur\"` and jQuery-style event maps `{change: action}`\n  // in terms of the existing API.\n  var eventsApi = function(obj, action, name, rest) {\n    if (!name) return true;\n\n    // Handle event maps.\n    if (typeof name === 'object') {\n      for (var key in name) {\n        obj[action].apply(obj, [key, name[key]].concat(rest));\n      }\n      return false;\n    }\n\n    // Handle space separated event names.\n    if (eventSplitter.test(name)) {\n      var names = name.split(eventSplitter);\n      for (var i = 0, l = names.length; i < l; i++) {\n        obj[action].apply(obj, [names[i]].concat(rest));\n      }\n      return false;\n    }\n\n    return true;\n  };\n\n  // A difficult-to-believe, but optimized internal dispatch function for\n  // triggering events. Tries to keep the usual cases speedy (most internal\n  // Backbone events have 3 arguments).\n  var triggerEvents = function(events, args) {\n    var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\n    switch (args.length) {\n      case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;\n      case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;\n      case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;\n      case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;\n      default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\n    }\n  };\n\n  var listenMethods = {listenTo: 'on', listenToOnce: 'once'};\n\n  // Inversion-of-control versions of `on` and `once`. Tell *this* object to\n  // listen to an event in another object ... keeping track of what it's\n  // listening to.\n  _.each(listenMethods, function(implementation, method) {\n    Events[method] = function(obj, name, callback) {\n      var listeners = this._listeners || (this._listeners = {});\n      var id = obj._listenerId || (obj._listenerId = _.uniqueId('l'));\n      listeners[id] = obj;\n      if (typeof name === 'object') callback = this;\n      obj[implementation](name, callback, this);\n      return this;\n    };\n  });\n\n  // Aliases for backwards compatibility.\n  Events.bind   = Events.on;\n  Events.unbind = Events.off;\n\n  // Mixin utility\n  Events.mixin = function(proto) {\n    var exports = ['on', 'once', 'off', 'trigger', 'stopListening', 'listenTo',\n                   'listenToOnce', 'bind', 'unbind'];\n    _.each(exports, function(name) {\n      proto[name] = this[name];\n    }, this);\n    return proto;\n  };\n\n  // Export Events as BackboneEvents depending on current context\n  if (true) {\n    if ( true && module.exports) {\n      exports = module.exports = Events;\n    }\n    exports.BackboneEvents = Events;\n  }else {}\n})(this);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/backbone-events-standalone/backbone-events-standalone.js?");

/***/ }),

/***/ "./node_modules/backbone-events-standalone/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/backbone-events-standalone/index.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./backbone-events-standalone */ \"./node_modules/backbone-events-standalone/backbone-events-standalone.js\");\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/backbone-events-standalone/index.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/clustal.js":
/*!********************************************!*\
  !*** ./node_modules/bio.io/lib/clustal.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parser = __webpack_require__(/*! ./parser */ \"./node_modules/bio.io/lib/parser.js\");\n\nvar _parser2 = _interopRequireDefault(_parser);\n\nvar _seqs = __webpack_require__(/*! ./seqs */ \"./node_modules/bio.io/lib/seqs.js\");\n\nvar _seqs2 = _interopRequireDefault(_seqs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Clustal = void 0;\nexports.default = Clustal = {\n  parse: function parse(text) {\n    var seqs = [];\n\n    if (Object.prototype.toString.call(text) === '[object Array]') {\n      var lines = text;\n    } else {\n      var lines = text.split(\"\\n\");\n    }\n\n    // The first line in the file must start with the words \"CLUSTAL\"\n    if (lines[0].slice(0, 6) === !\"CLUSTAL\") {\n      throw new Error(\"Invalid CLUSTAL Header\");\n    }\n\n    var k = 0;\n    // 0: reading sequences, 1: reading new lines\n    var blockstate = 1;\n    // count the sequence for every block\n    var seqCounter = 0;\n\n    while (k < lines.length) {\n      k++;\n      var line = lines[k];\n\n      if (!(line != null) || line.length === 0) {\n        blockstate = 1;\n        continue;\n      }\n\n      // okay we have an empty line\n      if (line.trim().length === 0) {\n        blockstate = 1;\n        continue;\n      } else {\n        // ignore annotations\n        if (_seqs2.default.contains(line, \"*\")) {\n          continue;\n        }\n        if (blockstate === 1) {\n          // new block recognized - reset\n          seqCounter = 0;\n          blockstate = 0;\n        }\n\n        var regex = /^(?:\\s*)(\\S+)(?:\\s+)(\\S+)(?:\\s*)(\\d*)(?:\\s*|$)/g;\n        var match = regex.exec(line);\n        if (match != null) {\n          var label = match[1].trim();\n          var sequence = match[2].trim();\n\n          // check for the first block\n          if (seqCounter >= seqs.length) {\n\n            var obj = _seqs2.default.getMeta(label.trim());\n            label = obj.name;\n\n            var cSeq = new _seqs2.default.model(sequence, label, seqCounter);\n            cSeq.ids = obj.ids || {};\n            cSeq.details = obj.details || {};\n\n            var keys = Object.keys(cSeq.ids);\n            if (keys.length > 0) {\n              cSeq.id = cSeq.ids[keys[0]];\n            }\n            seqs.push(cSeq);\n          } else {\n            seqs[seqCounter].seq += sequence;\n          }\n\n          seqCounter++;\n        } else {\n          console.log(\"parse error\", line);\n        }\n      }\n    }\n\n    return seqs;\n  }\n};\n\n\n_parser2.default.mixin(Clustal);\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/clustal.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/fasta.js":
/*!******************************************!*\
  !*** ./node_modules/bio.io/lib/fasta.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _seqs = __webpack_require__(/*! ./seqs */ \"./node_modules/bio.io/lib/seqs.js\");\n\nvar _seqs2 = _interopRequireDefault(_seqs);\n\nvar _extend2 = __webpack_require__(/*! ./utils/extend */ \"./node_modules/bio.io/lib/utils/extend.js\");\n\nvar _extend3 = _interopRequireDefault(_extend2);\n\nvar _parser = __webpack_require__(/*! ./parser */ \"./node_modules/bio.io/lib/parser.js\");\n\nvar _parser2 = _interopRequireDefault(_parser);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Fasta = void 0;\nexports.default = Fasta = {\n\n  getMeta: _seqs2.default.getMeta,\n\n  extend: function extend(metaParser) {\n    var customFasta = (0, _extend3.default)(Fasta);\n    Fasta.getMeta = metaParser;\n    return customFasta;\n  },\n  parse: function parse(text) {\n    var seqs = [];\n\n    // catch empty string\n    if (!text || text.length === 0) {\n      return [];\n    }\n\n    if (Object.prototype.toString.call(text) !== '[object Array]') {\n      text = text.split(\"\\n\");\n    }\n\n    var _Fasta = Fasta;\n    var getMeta = _Fasta.getMeta;\n\n\n    for (var i = 0; i < text.length; i++) {\n      // check for header\n      var line = text[i];\n      if (line[0] === \">\" || line[0] === \";\") {\n\n        var label = line.slice(1).trim();\n        // extract IDs and push them to the meta dict\n        var obj = getMeta(label.trim());\n        label = obj.name;\n        var id = obj.id || seqs.length;\n        var currentSeq = new _seqs2.default.model(\"\", obj.name, id);\n        currentSeq.ids = obj.ids || {};\n        currentSeq.details = obj.details || {};\n        seqs.push(currentSeq);\n      } else {\n        currentSeq.seq += line;\n      }\n    }\n    return seqs;\n  },\n  write: function write(seqs, access) {\n    var text = \"\";\n    for (var i = 0; i < seqs.length; i++) {\n      var seq = seqs[i];\n      if (access != null) {\n        seq = access(seq);\n      }\n      //FASTA header\n      text += \">\" + seq.name + \"\\n\";\n      // seq\n      text += _seqs2.default.splitNChars(seq.seq, 80).join(\"\\n\");\n\n      text += \"\\n\";\n    }\n    return text;\n  }\n};\n\n_parser2.default.mixin(Fasta);\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/fasta.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/gff/index.js":
/*!**********************************************!*\
  !*** ./node_modules/bio.io/lib/gff/index.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _parser = __webpack_require__(/*! ../parser */ \"./node_modules/bio.io/lib/parser.js\");\n\nvar _parser2 = _interopRequireDefault(_parser);\n\nvar _utils = __webpack_require__(/*! ./utils */ \"./node_modules/bio.io/lib/gff/utils.js\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _jalview = __webpack_require__(/*! ./jalview */ \"./node_modules/bio.io/lib/gff/jalview.js\");\n\nvar _jalview2 = _interopRequireDefault(_jalview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar gff = function gff() {}; /*\n                              * biojs-io-gff\n                              * https://github.com/greenify/biojs-io-gff\n                              *\n                              * Copyright (c) 2014 greenify\n                              * Licensed under the Apache 2 license.\n                              */\n\n_parser2.default.mixin(gff);\nexports.default = gff;\n\n\n/**\n * Method responsible to parse GFF\n * @see https://www.sanger.ac.uk/resources/software/gff/spec.html#t_2\n *\n * @example\n *\n *     biojsiogff.parse('SEQ1  EMBL  atg  103  105  .  +  0');\n *\n * @method parse\n * @param {String} file GFF file\n * @return {String} Returns JSON representation\n */\n\ngff.parseLines = function (file) {\n  var lines = file.split(\"\\n\");\n  var config = {};\n  var arr = [];\n  config.type = gff._guessType(lines);\n  var offset = 0;\n  if (config.type === \"jalview\") {\n    var ret = _jalview2.default.readHeader(lines);\n    //console.log(ret);\n    offset = ret.offset;\n    config.colors = ret.colors;\n    arr = ret.features;\n  }\n  for (var i = offset; i < lines.length; i++) {\n    // ignore comments for now\n    var line = lines[i];\n    if (line.length === 0 || line[0] === \"#\") continue;\n\n    line = gff.parseLine(line);\n    if (line !== undefined) arr.push(line);\n  }\n  return {\n    features: arr,\n    config: config\n  };\n};\n\ngff._guessType = function (line) {\n  if (line[0].substring(0, 15) === \"##gff-version 3\") {\n    return \"gff3\";\n  } else if (line[0].indexOf(\"#\") < 0 && line[0].split(\"\\t\").length === 2) {\n    // no comments and two columns. let's hope this is from jalview\n    return \"jalview\";\n  }\n  // unable to read file header. lets hope this is gff3\n  return \"gff3\";\n};\n\n/**\n * parses GFF and returns a dictionary of all seqs with their features\n * @method parseSeqs\n * @param {String} file GFF file\n * @return {String} Returns dictionary of sequences with an array of their features\n */\ngff.parseSeqs = gff.parse = function (file) {\n  var obj = gff.parseLines(file);\n  var seqs = {};\n  obj.features.forEach(function (entry) {\n    var key = entry.seqname;\n    if (seqs[key] === undefined) seqs[key] = [];\n    delete entry.seqname;\n    seqs[key].push(entry);\n  });\n  delete obj.features;\n  obj.seqs = seqs;\n  return obj;\n};\n\n/*\n * parses one GFF line and returns it\n */\ngff.parseLine = function (line) {\n  var tLine = {};\n\n  var columns = line.split(/\\s+/);\n  // ignore empty lines\n  if (columns.length === 1) return;\n\n  tLine.seqname = columns[0];\n  tLine.source = columns[1];\n  tLine.feature = columns[2];\n  tLine.start = parseInt(columns[3]);\n  tLine.end = parseInt(columns[4]);\n  tLine.score = columns[5]; // only DNA,RNA\n  tLine.strand = columns[6]; // only DNA,RNA\n  tLine.frame = columns[7]; // only DNA,RNA\n  var attr = columns.slice(8).join(\" \"); // plain text comments\n\n  // remove undefined (dot)\n  Object.keys(tLine).forEach(function (key) {\n    if (typeof tLine[key] === \"string\") {\n      tLine[key] = tLine[key].trim(); // triming is important\n    }\n    if (tLine[key] === \".\") {\n      tLine[key] = undefined;\n    }\n  });\n\n  // parse optional parameters\n  if (tLine.score) {\n    tLine.score = parseFloat(tLine.score);\n  }\n  if (tLine.frame) {\n    tLine.frame = parseInt(tLine.frame);\n  }\n\n  tLine.attributes = _utils2.default.extractKeys(attr);\n  return tLine;\n};\n\ngff.exportLine = function (line) {\n  var attrs = Object.keys(line.attributes).map(function (key) {\n    return key + \"=\" + line.attributes[key];\n  }).join(\";\");\n  var cells = [line.seqname, line.source, line.feature, line.start, line.end, line.score, line.strand, line.frame, attrs];\n  cells = cells.map(function (e) {\n    if (e === undefined) {\n      return \".\";\n    }\n    return e;\n  });\n  return cells.join(\"\\t\");\n};\n\ngff.exportLines = function (lines) {\n  return \"##gff-version 3\\n\" + lines.map(gff.exportLine).join(\"\\n\");\n};\n\ngff.exportSeqs = gff.export = function (seqs) {\n  var lines = [];\n  var pLine = function pLine(e) {\n    e.seqname = key;\n    lines.push(e);\n  };\n\n  for (var key in seqs) {\n    seqs[key].forEach(pLine);\n  }\n  return gff.exportLines(lines);\n};\n\n// expose utils\ngff.utils = _utils2.default;\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/gff/index.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/gff/jalview.js":
/*!************************************************!*\
  !*** ./node_modules/bio.io/lib/gff/jalview.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ \"./node_modules/bio.io/lib/gff/utils.js\");\n\nvar jalview = {};\nexports.default = jalview;\n\n// http://www.jalview.org/help/html/features/featuresFormat.html\n\njalview.readHeader = function (lines) {\n  var colors = {};\n  var i = 0;\n  var features = [];\n  var currentGroup;\n\n  for (; i < lines.length; i++) {\n    var line = lines[i];\n    if (line.indexOf(\"#\") >= 0) {\n      // no comments allowed -> stop\n      break;\n    }\n    var columns = line.split(/\\t/);\n    var firstCell = columns[0].trim();\n    if (firstCell === \"GFF\") {\n      // this symbolizes the end\n      break;\n    } else if (columns.length === 2) {\n      if (firstCell === \"startgroup\") {\n        currentGroup = columns[1].trim();\n      } else if (firstCell === \"endgroup\") {\n        currentGroup = \"\";\n        continue;\n      } else {\n        // parse color\n        colors[columns[0]] = jalview.parseColor(columns[1]);\n      }\n    } else if (columns.length >= 5) {\n      var arr = jalview.parseLine(columns);\n      if (currentGroup) {\n        arr.attributes.Parent = currentGroup;\n      }\n      features.push(arr);\n    }\n  }\n\n  return {\n    offset: i,\n    colors: colors,\n    features: features\n  };\n};\n\njalview.parseColor = function (cell) {\n  if (cell.indexOf(\",\") >= 0) {\n    // rgb code\n    return (0, _utils.rgbToHex)(cell.split(\",\").map(function (el) {\n      return parseInt(el);\n    }));\n  }\n  // color names with length == 6\n  // 'bisque,maroon,orange,orchid,purple,salmon,sienna,tomato,violet,yellow'\n  if (cell.length === 6 && parseInt(cell.charAt(0), 16) <= 16 && cell !== 'bisque') {\n    // hex code\n    return \"#\" + cell;\n  }\n  // color name\n  return cell;\n};\n\njalview.parseLine = function (columns) {\n  var obj = {\n    attributes: {}\n  };\n  obj.attributes.Name = columns[0].trim(); //desc\n  obj.seqname = columns[1].trim(); // id\n  obj.start = parseInt(columns[3]);\n  obj.end = parseInt(columns[4]);\n  obj.feature = columns[5].trim();\n  if (obj.seqname === \"ID_NOT_SPECIFIED\") {\n    obj.seqname = columns[2].trim(); // alternative id\n  }\n  return obj;\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/gff/jalview.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/gff/utils.js":
/*!**********************************************!*\
  !*** ./node_modules/bio.io/lib/gff/utils.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.extractKeys = extractKeys;\nexports.rgbToHex = rgbToHex;\nfunction extractKeys(attr) {\n  // extract key-value definitions\n  var attributes = {};\n  var attrArr = attr.split(\";\");\n  attrArr.forEach(function (el) {\n    var keyArr, key, val;\n    if (el.indexOf(\"=\") > 0) {\n      keyArr = el.split(\"=\");\n      key = keyArr[0];\n      val = keyArr[1];\n      attributes[key] = val;\n    } else if (el.indexOf(\" \") > 0) {\n      keyArr = el.split(\" \");\n      key = keyArr[0];\n      val = keyArr[1].replace(/\"/g, '');\n      attributes[key] = val;\n    }\n  });\n  return attributes;\n};\n\nfunction componentToHex(c) {\n  var hex = c.toString(16);\n  return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction rgbToHex(r, g, b) {\n  if (r.length === 3) {\n    return rgbToHex(r[0], r[1], r[2]);\n  }\n  return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n};\n\n// exporting with star is expensive\nexports.default = {\n  extractKeys: extractKeys,\n  rgbToHex: rgbToHex\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/gff/utils.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/index.js":
/*!******************************************!*\
  !*** ./node_modules/bio.io/lib/index.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n    value: true\n});\nexports.version = exports.xhr = exports.seqs = exports.parser = exports.newick = exports.matrix = exports.gff = exports.fasta = exports.clustal = undefined;\n\nvar _clustal2 = __webpack_require__(/*! ./clustal */ \"./node_modules/bio.io/lib/clustal.js\");\n\nvar _clustal3 = _interopRequireDefault(_clustal2);\n\nvar _fasta2 = __webpack_require__(/*! ./fasta */ \"./node_modules/bio.io/lib/fasta.js\");\n\nvar _fasta3 = _interopRequireDefault(_fasta2);\n\nvar _gff2 = __webpack_require__(/*! ./gff */ \"./node_modules/bio.io/lib/gff/index.js\");\n\nvar _gff3 = _interopRequireDefault(_gff2);\n\nvar _matrix2 = __webpack_require__(/*! ./matrix */ \"./node_modules/bio.io/lib/matrix.js\");\n\nvar _matrix3 = _interopRequireDefault(_matrix2);\n\nvar _newick2 = __webpack_require__(/*! ./newick */ \"./node_modules/bio.io/lib/newick/index.js\");\n\nvar _newick3 = _interopRequireDefault(_newick2);\n\nvar _parser2 = __webpack_require__(/*! ./parser */ \"./node_modules/bio.io/lib/parser.js\");\n\nvar _parser3 = _interopRequireDefault(_parser2);\n\nvar _seqs2 = __webpack_require__(/*! ./seqs */ \"./node_modules/bio.io/lib/seqs.js\");\n\nvar _seqs3 = _interopRequireDefault(_seqs2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.clustal = _clustal3.default; // TODO: make BLAST slim\n//export blast from \"./blast\";\n\nexports.fasta = _fasta3.default;\nexports.gff = _gff3.default;\nexports.matrix = _matrix3.default;\nexports.newick = _newick3.default;\nexports.parser = _parser3.default;\nexports.seqs = _seqs3.default;\n\n// convenience export\n\nvar xhr = __webpack_require__(/*! xhr */ \"./node_modules/xhr/index.js\");\nexports.xhr = xhr;\n\n// version will be automatically injected by webpack\n// IO_VERSION is only defined if loaded via webpack\n\nvar VERSION = \"imported\";\nif (typeof IO_VERSION !== \"undefined\") {\n    VERSION = IO_VERSION;\n}\n\nvar version = exports.version = VERSION;\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/index.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/matrix.js":
/*!*******************************************!*\
  !*** ./node_modules/bio.io/lib/matrix.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _parser = __webpack_require__(/*! ./parser */ \"./node_modules/bio.io/lib/parser.js\");\n\nvar _parser2 = _interopRequireDefault(_parser);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/** Example of a simple 2d matrix parser\n * Can be used for e.g. BLOSUM\n * */\n\nvar MatrixReader = function MatrixReader(text) {\n  if (this.constructor != MatrixReader) return new MatrixReader(text);\n  this.matrix = {};\n  this.parsingOrder = [];\n  if (text != undefined) {\n    this.parse(text);\n  }\n  return this;\n};\n\n_parser2.default.mixin(MatrixReader);\n\nmodule.exports = MatrixReader;\n\nMatrixReader.prototype.parse = function (text) {\n  text.split(\"\\n\").forEach(function (el) {\n    this.parseLine(el);\n  }.bind(this));\n  this.buildMatrix();\n  return this.matrix;\n};\n\nMatrixReader.read = function (url, cb) {\n  return new MatrixReader().read(url, cb);\n};\n\nMatrixReader.parse = function (text) {\n  return new MatrixReader().parse(text);\n};\n\nMatrixReader.prototype.parseLine = function (line) {\n  var c = line.charAt(0);\n  if (c === '#') {\n    return;\n  } else {\n    this.parsingOrder.push(c);\n    var intStr = line.substring(1);\n    var ints = intStr.split(/\\s+/).filter(function (e) {\n      return e.length > 0;\n    }).map(function (e) {\n      return parseInt(e);\n    });\n\n    var m = {};\n    for (var i = 0; i < ints.length; i++) {\n      m[this.parsingOrder[i]] = ints[i];\n    }\n    this.matrix[c] = m;\n  }\n};\n\nMatrixReader.prototype.export = function () {\n  return MatrixReader.export(this.matrix);\n};\n\nMatrixReader.export = function (matrix) {\n  var lines = [];\n  var max = 1;\n  // use the matrix attribute if an object is given\n  if (\"matrix\" in matrix) {\n    matrix = matrix.matrix;\n  }\n  for (var key in matrix) {\n    var line = key;\n    var keys = Object.keys(matrix[key]);\n    for (var i = 0; i < max; i++) {\n      line += \"\\t\" + matrix[key][keys[i]];\n    }\n    lines.push(line);\n    max++;\n  }\n  return lines.join(\"\\n\");\n};\n\n/**\n * faster access time\n */\nMatrixReader.prototype.buildMatrix = function () {\n  for (var i = this.parsingOrder.length - 1; i >= 0; i--) {\n    var curC = this.parsingOrder[i];\n    var map = this.matrix[curC];\n    for (var key in map) {\n      this.matrix[key][curC] = map[key];\n    }\n  }\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/matrix.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/newick/extended_newick.js":
/*!***********************************************************!*\
  !*** ./node_modules/bio.io/lib/newick/extended_newick.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nexports.default = parse_nhx;\n/**\n * Extended Newick format parser in JavaScript.\n *\n * Copyright (c) Miguel Pignatelli 2014 based on Jason Davies\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Example tree (from http://en.wikipedia.org/wiki/Newick_format):\n *\n * +--0.1--A\n * F-----0.2-----B            +-------0.3----C\n * +------------------0.5-----E\n *                            +---------0.4------D\n *\n * Newick format:\n * (A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;\n *\n * Converted to JSON:\n * {\n *   name: \"F\",\n *   children: [\n *     {name: \"A\", branch_length: 0.1},\n *     {name: \"B\", branch_length: 0.2},\n *     {\n *       name: \"E\",\n *       length: 0.5,\n *       children: [\n *         {name: \"C\", branch_length: 0.3},\n *         {name: \"D\", branch_length: 0.4}\n *       ]\n *     }\n *   ]\n * }\n *\n * Converted to JSON, but with no names or lengths:\n * {\n *   children: [\n *     {}, {}, {\n *       children: [{}, {}]\n *     }\n *   ]\n * }\n */\n\nfunction parse_nhx(s) {\n  var ancestors = [];\n  var tree = {};\n  // var tokens = s.split(/\\s*(;|\\(|\\)|,|:)\\s*/);\n  //[&&NHX:D=N:G=ENSG00000139618:T=9606]\n  var tokens = s.split(/\\s*(;|\\(|\\)|\\[|\\]|,|:|=)\\s*/);\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i];\n    var subtree = void 0;\n    switch (token) {\n      case '(':\n        // new children\n        subtree = {};\n        tree.children = [subtree];\n        ancestors.push(tree);\n        tree = subtree;\n        break;\n      case ',':\n        // another branch\n        subtree = {};\n        ancestors[ancestors.length - 1].children.push(subtree);\n        tree = subtree;\n        break;\n      case ')':\n        // optional name next\n        tree = ancestors.pop();\n        break;\n      case ':':\n        // optional length next\n        break;\n      default:\n        var x = tokens[i - 1];\n        // var x2 = tokens[i-2];\n        if (x == ')' || x == '(' || x == ',') {\n          tree.name = token;\n        } else if (x == ':') {\n          var test_type = typeof token === 'undefined' ? 'undefined' : _typeof(token);\n          if (!isNaN(token)) {\n            tree.branch_length = parseFloat(token);\n          }\n          // tree.length = parseFloat(token);\n        } else if (x == '=') {\n            var x2 = tokens[i - 2];\n            switch (x2) {\n              case 'D':\n                tree.duplication = token;\n                break;\n              case 'G':\n                tree.gene_id = token;\n                break;\n              case 'T':\n                tree.taxon_id = token;\n                break;\n\n            }\n          } else {\n            var test;\n          }\n    }\n  }\n  return tree;\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/newick/extended_newick.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/newick/index.js":
/*!*************************************************!*\
  !*** ./node_modules/bio.io/lib/newick/index.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.parseNhx = exports.parse = undefined;\n\nvar _newick = __webpack_require__(/*! ./newick */ \"./node_modules/bio.io/lib/newick/newick.js\");\n\nvar _newick2 = _interopRequireDefault(_newick);\n\nvar _extended_newick = __webpack_require__(/*! ./extended_newick */ \"./node_modules/bio.io/lib/newick/extended_newick.js\");\n\nvar _extended_newick2 = _interopRequireDefault(_extended_newick);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar newick = {};\nnewick.parse = _newick2.default;\nnewick.parseNhx = _extended_newick2.default;\n\nexports.default = newick;\nexports.parse = _newick2.default;\nexports.parseNhx = _extended_newick2.default;\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/newick/index.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/newick/newick.js":
/*!**************************************************!*\
  !*** ./node_modules/bio.io/lib/newick/newick.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = parse_newick;\n/**\n * Newick format parser in JavaScript.\n *\n * Copyright (c) edited by Miguel Pignatelli 2014, based on Jason Davies 2010.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Example tree (from http://en.wikipedia.org/wiki/Newick_format):\n *\n * +--0.1--A\n * F-----0.2-----B            +-------0.3----C\n * +------------------0.5-----E\n *                            +---------0.4------D\n *\n * Newick format:\n * (A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;\n *\n * Converted to JSON:\n * {\n *   name: \"F\",\n *   children: [\n *     {name: \"A\", branch_length: 0.1},\n *     {name: \"B\", branch_length: 0.2},\n *     {\n *       name: \"E\",\n *       length: 0.5,\n *       children: [\n *         {name: \"C\", branch_length: 0.3},\n *         {name: \"D\", branch_length: 0.4}\n *       ]\n *     }\n *   ]\n * }\n *\n * Converted to JSON, but with no names or lengths:\n * {\n *   children: [\n *     {}, {}, {\n *       children: [{}, {}]\n *     }\n *   ]\n * }\n */\n\nfunction parse_newick(s) {\n  var ancestors = [];\n  var tree = {};\n  var tokens = s.split(/\\s*(;|\\(|\\)|,|:)\\s*/);\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i];\n    var subtree = void 0;\n    switch (token) {\n      case '(':\n        // new children\n        subtree = {};\n        tree.children = [subtree];\n        ancestors.push(tree);\n        tree = subtree;\n        break;\n      case ',':\n        // another branch\n        subtree = {};\n        ancestors[ancestors.length - 1].children.push(subtree);\n        tree = subtree;\n        break;\n      case ')':\n        // optional name next\n        tree = ancestors.pop();\n        break;\n      case ':':\n        // optional length next\n        break;\n      default:\n        var x = tokens[i - 1];\n        if (x == ')' || x == '(' || x == ',') {\n          tree.name = token;\n        } else if (x == ':') {\n          tree.branch_length = parseFloat(token);\n        }\n    }\n  }\n  return tree;\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/newick/newick.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/parser.js":
/*!*******************************************!*\
  !*** ./node_modules/bio.io/lib/parser.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar xhr = __webpack_require__(/*! request */ \"./node_modules/xhr/index.js\");\nvar GenericReader = {};\n\nexports.default = GenericReader;\n\n// returns a promise if callback is undefined\n\nGenericReader.read = function (url, callback) {\n  var onret = function (_this) {\n    return function (err, response, text) {\n      return GenericReader._onRetrieval(err, text, callback, _this);\n    };\n  }(this);\n\n  if (typeof callback === \"undefined\") {\n    return new Promise(function (resolve, reject) {\n      callback = function callback(err, res) {\n        if (err) {\n          reject(err);\n        } else {\n          resolve(res);\n        }\n      };\n      xhr(url, onret);\n    });\n  } else {\n    return xhr(url, onret);\n  }\n};\n\nGenericReader._onRetrieval = function (err, text, callback, _this) {\n  var rText = void 0;\n  if (typeof err !== \"undefined\") {\n    rText = _this.parse(text);\n  }\n  return callback.call(_this, err, rText);\n};\n\n// provide a convenient shortcut to inherit\nGenericReader.extend = function (obj, statics) {\n  return extend(GenericReader, obj, statics);\n};\n// Mixin utility\nGenericReader.mixin = function (proto) {\n  var exports = ['read'];\n  if ((typeof proto === \"undefined\" ? \"undefined\" : _typeof(proto)) !== \"object\") {\n    proto = proto.prototype;\n  }\n  exports.forEach(function (name) {\n    proto[name] = GenericReader[name];\n  }, this);\n  return proto;\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/parser.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/seqs.js":
/*!*****************************************!*\
  !*** ./node_modules/bio.io/lib/seqs.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar st = {};\nexports.default = st;\n\n/****\n * Seems to be lots of different ways to format FASTA headers.\n *\n * Generally there's an ID and a DESCRIPTION\n *   >ID DESCRIPTION\n *\n *   >(parts|of|ID) (DESCRIPTION with optional key=values)\n *\n * This is complicated by the fact that the \"values\" in the description can have spaces\n * e.g. OS=Arabidopsis thaliana GN=CCD8\n *\n ****\n*/\n\n// extract IDs and push them to the meta dict\n\nst.getMeta = function (label) {\n\n  var full_id = false,\n      full_desc = false;\n  var name,\n      ids = {},\n      details = {},\n      description;\n\n  var label_parts = label.split(\" \");\n\n  if (label_parts.length >= 1) {\n    full_id = label_parts.shift(); // everything up to the first white space\n    full_desc = label_parts.join(\" \"); // everything else\n  } else {\n      full_id = label;\n    }\n\n  if (full_id) {\n    var id_parts = full_id.split('|');\n\n    // the last item is the accession\n    name = id_parts.pop();\n\n    details.en = name;\n\n    // everything else should be pairs: db|id\n    while (id_parts.length != 0) {\n      var db = id_parts.shift();\n      var id = id_parts.shift();\n      ids[db] = id;\n    }\n  } else {\n    name = full_id;\n  }\n\n  if (full_desc) {\n\n    var kv_parts = full_desc.split('=');\n\n    if (kv_parts.length > 1) {\n\n      var current_key, next_key;\n      var kv;\n      var kv_idx_max = kv_parts.length - 1;\n      var kv_idx = 0;\n      kv_parts.forEach(function (value_and_maybe_next_key) {\n\n        value_and_maybe_next_key = value_and_maybe_next_key.trim();\n\n        var value_parts = value_and_maybe_next_key.split(\" \");\n        var value;\n        if (value_parts.length > 1) {\n          next_key = value_parts.pop();\n          value = value_parts.join(' ');\n        } else {\n          value = value_and_maybe_next_key;\n        }\n\n        if (current_key) {\n          var key = current_key.toLowerCase();\n          details[key] = value;\n        } else {\n          description = value;\n        }\n        current_key = next_key;\n      });\n    } else {\n      description = kv_parts.shift();\n    }\n  }\n\n  var meta = {\n    name: name,\n    ids: ids,\n    details: details\n  };\n\n  if (description) {\n    meta.desc = description;\n  }\n\n  return meta;\n};\n\nvar findSepInArr = function findSepInArr(arr, sep) {\n  for (var i = 0; i < arr.lenght; i++) {\n    if (arr[i].indexOf(i)) {\n      return i;\n    }\n  }\n  return arr.length - 1;\n};\n\nvar strToDict = function strToDict(str, sep, toJoin) {\n  toJoin = toJoin || {};\n  var entries = str.split(sep);\n  toJoin[entries[0].toLowerCase()] = entries[1];\n  return toJoin;\n};\n\nvar identDB = {\n  \"sp\": {\n    link: \"http://www.uniprot.org/%s\",\n    name: \"Uniprot\"\n  },\n  \"tr\": {\n    link: \"http://www.uniprot.org/%s\",\n    name: \"Trembl\"\n  },\n  \"gb\": {\n    link: \"http://www.ncbi.nlm.nih.gov/nuccore/%s\",\n    name: \"Genbank\"\n  },\n  \"pdb\": {\n    link: \"http://www.rcsb.org/pdb/explore/explore.do?structureId=%s\",\n    name: \"PDB\"\n  }\n};\n\nst.buildLinks = function (meta) {\n  var links = {};\n  meta = meta || {};\n  Object.keys(meta).forEach(function (id) {\n    if (id in identDB) {\n      var entry = identDB[id];\n      var link = entry.link.replace(\"%s\", meta[id]);\n      links[entry.name] = link;\n    }\n  });\n  return links;\n};\n\n// search for a text\nst.contains = function (text, search) {\n  return ''.indexOf.call(text, search, 0) !== -1;\n};\n\n// split after e.g. 80 chars\nst.splitNChars = function (txt, num) {\n  var i, _ref;\n  num = num || 80;\n  var result = [];\n  for (i = 0, _ref = txt.length - 1; i <= _ref; i += num) {\n    result.push(txt.substr(i, num));\n  }\n  return result;\n};\n\nst.reverse = function (seq) {\n  return seq.split('').reverse().join('');\n};\n\nst.complement = function (seq) {\n  var newSeq = seq + \"\";\n  var replacements = [\n  // cg\n  [/g/g, \"0\"], [/c/g, \"1\"], [/0/g, \"c\"], [/1/g, \"g\"],\n  // CG\n  [/G/g, \"0\"], [/C/g, \"1\"], [/0/g, \"C\"], [/1/g, \"G\"],\n  // at\n  [/a/g, \"0\"], [/t/g, \"1\"], [/0/g, \"t\"], [/1/g, \"a\"],\n  // AT\n  [/A/g, \"0\"], [/T/g, \"1\"], [/0/g, \"T\"], [/1/g, \"A\"]];\n\n  for (var rep in replacements) {\n    newSeq = newSeq.replace(replacements[rep][0], replacements[rep][1]);\n  }\n  return newSeq;\n};\n\nst.reverseComplement = function (seq) {\n  return st.reverse(st.complement(seq));\n};\n\nst.model = function Seq(seq, name, id) {\n  this.seq = seq;\n  this.name = name;\n  this.id = id;\n  this.ids = {};\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/seqs.js?");

/***/ }),

/***/ "./node_modules/bio.io/lib/utils/extend.js":
/*!*************************************************!*\
  !*** ./node_modules/bio.io/lib/utils/extend.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nexports.default = function (out) {\n\tout = out || {};\n\tvar iterable = __range__(0, arguments.length, false);\n\tfor (var j = 0; j < iterable.length; j++) {\n\t\tvar i = iterable[j];\n\t\tif (!arguments[i]) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (var k = 0; k < arguments[i].length; k++) {\n\t\t\tvar key = arguments[i][k];\n\t\t\tif (arguments[i].hasOwnProperty(key)) {\n\t\t\t\tout[key] = arguments[i][key];\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n};\n\n;\n\nfunction __range__(left, right, inclusive) {\n\tvar range = [];\n\tvar ascending = left < right;\n\tvar end = !inclusive ? right : ascending ? right + 1 : right - 1;\n\tfor (var i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {\n\t\trange.push(i);\n\t}\n\treturn range;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/bio.io/lib/utils/extend.js?");

/***/ }),

/***/ "./node_modules/biojs-events/index.js":
/*!********************************************!*\
  !*** ./node_modules/biojs-events/index.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var events = __webpack_require__(/*! backbone-events-standalone */ \"./node_modules/backbone-events-standalone/index.js\");\n\nevents.onAll = function(callback,context){\n  this.on(\"all\", callback,context);\n  return this;\n};\n\n// Mixin utility\nevents.oldMixin = events.mixin;\nevents.mixin = function(proto) {\n  events.oldMixin(proto);\n  // add custom onAll\n  var exports = ['onAll'];\n  for(var i=0; i < exports.length;i++){\n    var name = exports[i];\n    proto[name] = this[name];\n  }\n  return proto;\n};\n\nmodule.exports = events;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/biojs-events/index.js?");

/***/ }),

/***/ "./node_modules/circos/dist/circos.es6.js":
/*!************************************************!*\
  !*** ./node_modules/circos/dist/circos.es6.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse { var i, a; }\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 240);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n});\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(8);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(scheme) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0_d3_interpolate__[\"e\" /* interpolateRgbBasis */])(scheme[scheme.length - 1]);\n});\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_create__ = __webpack_require__(314);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_create__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_creator__ = __webpack_require__(66);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_creator__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_local__ = __webpack_require__(343);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_local__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_matcher__ = __webpack_require__(161);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_matcher__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_mouse__ = __webpack_require__(344);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mouse\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_mouse__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_namespace__ = __webpack_require__(93);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_namespace__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_namespaces__ = __webpack_require__(94);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_namespaces__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_point__ = __webpack_require__(67);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clientPoint\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_point__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_select__ = __webpack_require__(159);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_select__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_selectAll__ = __webpack_require__(345);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_selectAll__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_selection_index__ = __webpack_require__(11);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_selection_index__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_selector__ = __webpack_require__(95);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_selector__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_selectorAll__ = __webpack_require__(160);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_selectorAll__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_selection_style__ = __webpack_require__(164);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return __WEBPACK_IMPORTED_MODULE_13__src_selection_style__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_touch__ = __webpack_require__(346);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"touch\", function() { return __WEBPACK_IMPORTED_MODULE_14__src_touch__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_touches__ = __webpack_require__(347);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"touches\", function() { return __WEBPACK_IMPORTED_MODULE_15__src_touches__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_window__ = __webpack_require__(96);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_window__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__src_selection_on__ = __webpack_require__(97);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_selection_on__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_selection_on__[\"a\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = newInterval;\nvar t0 = new Date,\n    t1 = new Date;\n\nfunction newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = new Date(+date)), date;\n  }\n\n  interval.floor = interval;\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar freeGlobal = __webpack_require__(128);\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_value__ = __webpack_require__(99);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_value__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_array__ = __webpack_require__(171);\n/* unused harmony reexport interpolateArray */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_basis__ = __webpack_require__(102);\n/* unused harmony reexport interpolateBasis */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_basisClosed__ = __webpack_require__(169);\n/* unused harmony reexport interpolateBasisClosed */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_date__ = __webpack_require__(172);\n/* unused harmony reexport interpolateDate */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_number__ = __webpack_require__(69);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_number__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_object__ = __webpack_require__(173);\n/* unused harmony reexport interpolateObject */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_round__ = __webpack_require__(357);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_round__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_string__ = __webpack_require__(174);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_string__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_transform_index__ = __webpack_require__(358);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_transform_index__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_transform_index__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_zoom__ = __webpack_require__(361);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_zoom__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_rgb__ = __webpack_require__(168);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_rgb__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_rgb__[\"b\"]; });\n/* unused harmony reexport interpolateRgbBasisClosed */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_hsl__ = __webpack_require__(362);\n/* unused harmony reexport interpolateHsl */\n/* unused harmony reexport interpolateHslLong */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_lab__ = __webpack_require__(363);\n/* unused harmony reexport interpolateLab */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_hcl__ = __webpack_require__(364);\n/* unused harmony reexport interpolateHcl */\n/* unused harmony reexport interpolateHclLong */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__ = __webpack_require__(365);\n/* unused harmony reexport interpolateCubehelix */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_quantize__ = __webpack_require__(366);\n/* unused harmony reexport quantize */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_color__ = __webpack_require__(100);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_color__[\"e\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_color__[\"g\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_color__[\"f\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_lab__ = __webpack_require__(355);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_lab__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_lab__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_cubehelix__ = __webpack_require__(356);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_cubehelix__[\"a\"]; });\n\n\n\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_bisect__ = __webpack_require__(197);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_bisect__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_bisect__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_bisect__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_ascending__ = __webpack_require__(36);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_ascending__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_bisector__ = __webpack_require__(198);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_bisector__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_cross__ = __webpack_require__(452);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_cross__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_descending__ = __webpack_require__(453);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_descending__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_deviation__ = __webpack_require__(200);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_deviation__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_extent__ = __webpack_require__(202);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_extent__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_histogram__ = __webpack_require__(454);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_histogram__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_threshold_freedmanDiaconis__ = __webpack_require__(457);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_threshold_freedmanDiaconis__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_threshold_scott__ = __webpack_require__(458);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_threshold_scott__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_threshold_sturges__ = __webpack_require__(206);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_threshold_sturges__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_max__ = __webpack_require__(459);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_max__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_mean__ = __webpack_require__(460);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_mean__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_median__ = __webpack_require__(461);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return __WEBPACK_IMPORTED_MODULE_13__src_median__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_merge__ = __webpack_require__(462);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return __WEBPACK_IMPORTED_MODULE_14__src_merge__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_min__ = __webpack_require__(207);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return __WEBPACK_IMPORTED_MODULE_15__src_min__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_pairs__ = __webpack_require__(199);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_pairs__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__src_permute__ = __webpack_require__(463);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_permute__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__src_quantile__ = __webpack_require__(112);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return __WEBPACK_IMPORTED_MODULE_18__src_quantile__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__src_range__ = __webpack_require__(204);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return __WEBPACK_IMPORTED_MODULE_19__src_range__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__src_scan__ = __webpack_require__(464);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return __WEBPACK_IMPORTED_MODULE_20__src_scan__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__src_shuffle__ = __webpack_require__(465);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return __WEBPACK_IMPORTED_MODULE_21__src_shuffle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__src_sum__ = __webpack_require__(466);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return __WEBPACK_IMPORTED_MODULE_22__src_sum__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__src_ticks__ = __webpack_require__(205);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return __WEBPACK_IMPORTED_MODULE_23__src_ticks__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return __WEBPACK_IMPORTED_MODULE_23__src_ticks__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return __WEBPACK_IMPORTED_MODULE_23__src_ticks__[\"c\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__src_transpose__ = __webpack_require__(208);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return __WEBPACK_IMPORTED_MODULE_24__src_transpose__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__src_variance__ = __webpack_require__(201);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return __WEBPACK_IMPORTED_MODULE_25__src_variance__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__src_zip__ = __webpack_require__(467);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return __WEBPACK_IMPORTED_MODULE_26__src_zip__[\"a\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return root; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Selection;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__select__ = __webpack_require__(315);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectAll__ = __webpack_require__(316);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter__ = __webpack_require__(317);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__data__ = __webpack_require__(318);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enter__ = __webpack_require__(162);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__exit__ = __webpack_require__(320);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__merge__ = __webpack_require__(321);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__order__ = __webpack_require__(322);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__sort__ = __webpack_require__(323);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__call__ = __webpack_require__(324);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__nodes__ = __webpack_require__(325);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__node__ = __webpack_require__(326);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__size__ = __webpack_require__(327);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__empty__ = __webpack_require__(328);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__each__ = __webpack_require__(329);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__attr__ = __webpack_require__(330);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__style__ = __webpack_require__(164);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__property__ = __webpack_require__(331);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__classed__ = __webpack_require__(332);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__text__ = __webpack_require__(333);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__html__ = __webpack_require__(334);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__raise__ = __webpack_require__(335);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__lower__ = __webpack_require__(336);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__append__ = __webpack_require__(337);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__insert__ = __webpack_require__(338);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__remove__ = __webpack_require__(339);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__clone__ = __webpack_require__(340);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__datum__ = __webpack_require__(341);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__on__ = __webpack_require__(97);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__dispatch__ = __webpack_require__(342);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: __WEBPACK_IMPORTED_MODULE_0__select__[\"a\" /* default */],\n  selectAll: __WEBPACK_IMPORTED_MODULE_1__selectAll__[\"a\" /* default */],\n  filter: __WEBPACK_IMPORTED_MODULE_2__filter__[\"a\" /* default */],\n  data: __WEBPACK_IMPORTED_MODULE_3__data__[\"a\" /* default */],\n  enter: __WEBPACK_IMPORTED_MODULE_4__enter__[\"b\" /* default */],\n  exit: __WEBPACK_IMPORTED_MODULE_5__exit__[\"a\" /* default */],\n  merge: __WEBPACK_IMPORTED_MODULE_6__merge__[\"a\" /* default */],\n  order: __WEBPACK_IMPORTED_MODULE_7__order__[\"a\" /* default */],\n  sort: __WEBPACK_IMPORTED_MODULE_8__sort__[\"a\" /* default */],\n  call: __WEBPACK_IMPORTED_MODULE_9__call__[\"a\" /* default */],\n  nodes: __WEBPACK_IMPORTED_MODULE_10__nodes__[\"a\" /* default */],\n  node: __WEBPACK_IMPORTED_MODULE_11__node__[\"a\" /* default */],\n  size: __WEBPACK_IMPORTED_MODULE_12__size__[\"a\" /* default */],\n  empty: __WEBPACK_IMPORTED_MODULE_13__empty__[\"a\" /* default */],\n  each: __WEBPACK_IMPORTED_MODULE_14__each__[\"a\" /* default */],\n  attr: __WEBPACK_IMPORTED_MODULE_15__attr__[\"a\" /* default */],\n  style: __WEBPACK_IMPORTED_MODULE_16__style__[\"a\" /* default */],\n  property: __WEBPACK_IMPORTED_MODULE_17__property__[\"a\" /* default */],\n  classed: __WEBPACK_IMPORTED_MODULE_18__classed__[\"a\" /* default */],\n  text: __WEBPACK_IMPORTED_MODULE_19__text__[\"a\" /* default */],\n  html: __WEBPACK_IMPORTED_MODULE_20__html__[\"a\" /* default */],\n  raise: __WEBPACK_IMPORTED_MODULE_21__raise__[\"a\" /* default */],\n  lower: __WEBPACK_IMPORTED_MODULE_22__lower__[\"a\" /* default */],\n  append: __WEBPACK_IMPORTED_MODULE_23__append__[\"a\" /* default */],\n  insert: __WEBPACK_IMPORTED_MODULE_24__insert__[\"a\" /* default */],\n  remove: __WEBPACK_IMPORTED_MODULE_25__remove__[\"a\" /* default */],\n  clone: __WEBPACK_IMPORTED_MODULE_26__clone__[\"a\" /* default */],\n  datum: __WEBPACK_IMPORTED_MODULE_27__datum__[\"a\" /* default */],\n  on: __WEBPACK_IMPORTED_MODULE_28__on__[\"b\" /* default */],\n  dispatch: __WEBPACK_IMPORTED_MODULE_29__dispatch__[\"a\" /* default */]\n};\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (selection);\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export CREATED */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return STARTING; });\n/* unused harmony export STARTED */\n/* unused harmony export RUNNING */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ENDED; });\n/* harmony export (immutable) */ __webpack_exports__[\"g\"] = init;\n/* harmony export (immutable) */ __webpack_exports__[\"h\"] = set;\n/* harmony export (immutable) */ __webpack_exports__[\"f\"] = get;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_timer__ = __webpack_require__(177);\n\n\n\nvar emptyOn = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__[\"dispatch\"])(\"start\", \"end\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"e\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTING) throw new Error(\"too late; already started\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__[\"c\" /* timer */])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__[\"b\" /* timeout */])(start);\n\n      // Interrupt the active transition, if any.\n      // Dispatch the interrupt event.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions. No interrupt event is dispatched\n      // because the cancelled transitions never started. Note that this also\n      // removes this transition from the pending list!\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__[\"b\" /* timeout */])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(null, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_arc__ = __webpack_require__(427);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_arc__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_area__ = __webpack_require__(183);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_area__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_line__ = __webpack_require__(108);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_line__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_pie__ = __webpack_require__(429);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_pie__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__ = __webpack_require__(432);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__ = __webpack_require__(185);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_pointRadial__ = __webpack_require__(186);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_pointRadial__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_link_index__ = __webpack_require__(433);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_symbol__ = __webpack_require__(434);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_symbol__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_symbol__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_symbol_circle__ = __webpack_require__(188);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_symbol_circle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_symbol_cross__ = __webpack_require__(189);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_symbol_cross__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_symbol_diamond__ = __webpack_require__(190);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_symbol_diamond__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_symbol_square__ = __webpack_require__(192);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_symbol_square__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_symbol_star__ = __webpack_require__(191);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return __WEBPACK_IMPORTED_MODULE_13__src_symbol_star__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_symbol_triangle__ = __webpack_require__(193);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return __WEBPACK_IMPORTED_MODULE_14__src_symbol_triangle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_symbol_wye__ = __webpack_require__(194);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return __WEBPACK_IMPORTED_MODULE_15__src_symbol_wye__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_curve_basisClosed__ = __webpack_require__(435);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_curve_basisClosed__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__src_curve_basisOpen__ = __webpack_require__(436);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_curve_basisOpen__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__src_curve_basis__ = __webpack_require__(73);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return __WEBPACK_IMPORTED_MODULE_18__src_curve_basis__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__src_curve_bundle__ = __webpack_require__(437);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return __WEBPACK_IMPORTED_MODULE_19__src_curve_bundle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__src_curve_cardinalClosed__ = __webpack_require__(195);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return __WEBPACK_IMPORTED_MODULE_20__src_curve_cardinalClosed__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__src_curve_cardinalOpen__ = __webpack_require__(196);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return __WEBPACK_IMPORTED_MODULE_21__src_curve_cardinalOpen__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__src_curve_cardinal__ = __webpack_require__(74);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return __WEBPACK_IMPORTED_MODULE_22__src_curve_cardinal__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__src_curve_catmullRomClosed__ = __webpack_require__(438);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return __WEBPACK_IMPORTED_MODULE_23__src_curve_catmullRomClosed__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__src_curve_catmullRomOpen__ = __webpack_require__(439);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return __WEBPACK_IMPORTED_MODULE_24__src_curve_catmullRomOpen__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__src_curve_catmullRom__ = __webpack_require__(110);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return __WEBPACK_IMPORTED_MODULE_25__src_curve_catmullRom__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__src_curve_linearClosed__ = __webpack_require__(440);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return __WEBPACK_IMPORTED_MODULE_26__src_curve_linearClosed__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__src_curve_linear__ = __webpack_require__(71);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return __WEBPACK_IMPORTED_MODULE_27__src_curve_linear__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__ = __webpack_require__(441);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__src_curve_natural__ = __webpack_require__(442);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return __WEBPACK_IMPORTED_MODULE_29__src_curve_natural__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__src_curve_step__ = __webpack_require__(443);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__[\"c\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__src_stack__ = __webpack_require__(444);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return __WEBPACK_IMPORTED_MODULE_31__src_stack__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__src_offset_expand__ = __webpack_require__(445);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return __WEBPACK_IMPORTED_MODULE_32__src_offset_expand__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__src_offset_diverging__ = __webpack_require__(446);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return __WEBPACK_IMPORTED_MODULE_33__src_offset_diverging__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__src_offset_none__ = __webpack_require__(45);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return __WEBPACK_IMPORTED_MODULE_34__src_offset_none__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__src_offset_silhouette__ = __webpack_require__(447);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return __WEBPACK_IMPORTED_MODULE_35__src_offset_silhouette__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__src_offset_wiggle__ = __webpack_require__(448);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return __WEBPACK_IMPORTED_MODULE_36__src_offset_wiggle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__src_order_ascending__ = __webpack_require__(111);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return __WEBPACK_IMPORTED_MODULE_37__src_order_ascending__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__src_order_descending__ = __webpack_require__(449);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return __WEBPACK_IMPORTED_MODULE_38__src_order_descending__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__src_order_insideOut__ = __webpack_require__(450);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return __WEBPACK_IMPORTED_MODULE_39__src_order_insideOut__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__src_order_none__ = __webpack_require__(46);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return __WEBPACK_IMPORTED_MODULE_40__src_order_none__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__src_order_reverse__ = __webpack_require__(451);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return __WEBPACK_IMPORTED_MODULE_41__src_order_reverse__[\"a\"]; });\n\n\n\n\n // Note: radialArea is deprecated!\n // Note: radialLine is deprecated!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignValue = __webpack_require__(90),\n    copyObject = __webpack_require__(31),\n    createAssigner = __webpack_require__(142),\n    isArrayLike = __webpack_require__(17),\n    isPrototype = __webpack_require__(57),\n    keys = __webpack_require__(18);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * function Bar() {\n *   this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n  if (isPrototype(source) || isArrayLike(source)) {\n    copyObject(source, keys(source), object);\n    return;\n  }\n  for (var key in source) {\n    if (hasOwnProperty.call(source, key)) {\n      assignValue(object, key, source[key]);\n    }\n  }\n});\n\nmodule.exports = assign;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return durationSecond; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return durationMinute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return durationHour; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return durationDay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return durationWeek; });\nvar durationSecond = 1e3;\nvar durationMinute = 6e4;\nvar durationHour = 36e5;\nvar durationDay = 864e5;\nvar durationWeek = 6048e5;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29),\n    getRawTag = __webpack_require__(244),\n    objectToString = __webpack_require__(245);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isFunction = __webpack_require__(24),\n    isLength = __webpack_require__(87);\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayLikeKeys = __webpack_require__(141),\n    baseKeys = __webpack_require__(143),\n    isArrayLike = __webpack_require__(17);\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Transition;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = transition;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = newId;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__attr__ = __webpack_require__(372);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__attrTween__ = __webpack_require__(373);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__delay__ = __webpack_require__(374);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__duration__ = __webpack_require__(375);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ease__ = __webpack_require__(376);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__filter__ = __webpack_require__(377);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__merge__ = __webpack_require__(378);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__on__ = __webpack_require__(379);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__remove__ = __webpack_require__(380);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__select__ = __webpack_require__(381);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectAll__ = __webpack_require__(382);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selection__ = __webpack_require__(383);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__style__ = __webpack_require__(384);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__styleTween__ = __webpack_require__(385);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__text__ = __webpack_require__(386);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__transition__ = __webpack_require__(387);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__tween__ = __webpack_require__(70);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: __WEBPACK_IMPORTED_MODULE_10__select__[\"a\" /* default */],\n  selectAll: __WEBPACK_IMPORTED_MODULE_11__selectAll__[\"a\" /* default */],\n  filter: __WEBPACK_IMPORTED_MODULE_6__filter__[\"a\" /* default */],\n  merge: __WEBPACK_IMPORTED_MODULE_7__merge__[\"a\" /* default */],\n  selection: __WEBPACK_IMPORTED_MODULE_12__selection__[\"a\" /* default */],\n  transition: __WEBPACK_IMPORTED_MODULE_16__transition__[\"a\" /* default */],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: __WEBPACK_IMPORTED_MODULE_8__on__[\"a\" /* default */],\n  attr: __WEBPACK_IMPORTED_MODULE_1__attr__[\"a\" /* default */],\n  attrTween: __WEBPACK_IMPORTED_MODULE_2__attrTween__[\"a\" /* default */],\n  style: __WEBPACK_IMPORTED_MODULE_13__style__[\"a\" /* default */],\n  styleTween: __WEBPACK_IMPORTED_MODULE_14__styleTween__[\"a\" /* default */],\n  text: __WEBPACK_IMPORTED_MODULE_15__text__[\"a\" /* default */],\n  remove: __WEBPACK_IMPORTED_MODULE_9__remove__[\"a\" /* default */],\n  tween: __WEBPACK_IMPORTED_MODULE_17__tween__[\"a\" /* default */],\n  delay: __WEBPACK_IMPORTED_MODULE_3__delay__[\"a\" /* default */],\n  duration: __WEBPACK_IMPORTED_MODULE_4__duration__[\"a\" /* default */],\n  ease: __WEBPACK_IMPORTED_MODULE_5__ease__[\"a\" /* default */]\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tooltip = __webpack_require__(209);\n\nvar _d3Dispatch = __webpack_require__(68);\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _d3Selection = __webpack_require__(3);\n\nvar _configUtils = __webpack_require__(474);\n\nvar _utils = __webpack_require__(210);\n\nvar _colors = __webpack_require__(566);\n\nvar _axes = __webpack_require__(608);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\r\n * Abstract class used by all tracks\r\n**/\nvar Track = function () {\n  function Track(instance, conf, defaultConf, data, dataParser) {\n    _classCallCheck(this, Track);\n\n    this.dispatch = (0, _d3Dispatch.dispatch)('mouseover', 'mouseout');\n    this.parseData = dataParser;\n    this.loadData(data, instance);\n    this.conf = (0, _configUtils.getConf)(conf, defaultConf, this.meta, instance);\n    this.conf.colorValue = (0, _colors.buildColorValue)(this.conf.color, this.conf.cmin, this.conf.cmax, this.conf.logScale, this.conf.logScaleBase);\n    this.scale = (0, _utils.buildScale)(this.conf.cmin, this.conf.cmax, this.conf.outerRadius - this.conf.innerRadius, this.conf.logScale, this.conf.logScaleBase);\n  }\n\n  _createClass(Track, [{\n    key: 'loadData',\n    value: function loadData(data, instance) {\n      var result = this.parseData(data, instance._layout.summary());\n      this.data = result.data;\n      this.meta = result.meta;\n    }\n  }, {\n    key: 'render',\n    value: function render(instance, parentElement, name) {\n      var _this = this;\n\n      parentElement.select('.' + name).remove();\n      var track = parentElement.append('g').attr('class', name).attr('z-index', this.conf.zIndex);\n      var datumContainer = this.renderBlock(track, this.data, instance._layout, this.conf);\n      if (this.conf.axes && this.conf.axes.length > 0) {\n        (0, _axes.renderAxes)(datumContainer, this.conf, instance, this.scale);\n      }\n      var selection = this.renderDatum(datumContainer, this.conf, instance._layout);\n      if (this.conf.tooltipContent) {\n        (0, _tooltip.registerTooltip)(this, instance, selection, this.conf);\n      }\n      selection.on('mouseover', function (d, i) {\n        _this.dispatch.call('mouseover', _this, d);\n        if (_this.conf.tooltipContent) {\n          instance.clipboard.attr('value', _this.conf.tooltipContent(d));\n        }\n      });\n      selection.on('mouseout', function (d, i) {\n        _this.dispatch.call('mouseout', _this, d);\n      });\n\n      Object.keys(this.conf.events).forEach(function (eventName) {\n        var conf = _this.conf;\n        selection.on(eventName, function (d, i, nodes) {\n          conf.events[eventName](d, i, nodes, _d3Selection.event);\n        });\n      });\n\n      return this;\n    }\n  }, {\n    key: 'renderBlock',\n    value: function renderBlock(parentElement, data, layout, conf) {\n      var _this2 = this;\n\n      var block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function (d) {\n        return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';\n      });\n\n      if (conf.backgrounds) {\n        block.selectAll('.background').data(function (d) {\n          return conf.backgrounds.map(function (background) {\n            return {\n              start: background.start || conf.cmin,\n              end: background.end || conf.cmax,\n              angle: layout.blocks[d.key].end - layout.blocks[d.key].start,\n              color: background.color,\n              opacity: background.opacity\n            };\n          });\n        }).enter().append('path').attr('class', 'background').attr('fill', function (background) {\n          return background.color;\n        }).attr('opacity', function (background) {\n          return background.opacity || 1;\n        }).attr('d', (0, _d3Shape.arc)().innerRadius(function (background) {\n          return conf.direction === 'in' ? conf.outerRadius - _this2.scale(background.start) : conf.innerRadius + _this2.scale(background.start);\n        }).outerRadius(function (background) {\n          return conf.direction === 'in' ? conf.outerRadius - _this2.scale(background.end) : conf.innerRadius + _this2.scale(background.end);\n        }).startAngle(0).endAngle(function (d) {\n          return d.angle;\n        }));\n      }\n\n      return block;\n    }\n  }, {\n    key: 'theta',\n    value: function theta(position, block) {\n      return position / block.len * (block.end - block.start);\n    }\n  }, {\n    key: 'x',\n    value: function x(d, layout, conf) {\n      var height = this.scale(d.value);\n      var r = conf.direction === 'in' ? conf.outerRadius - height : conf.innerRadius + height;\n\n      var angle = this.theta(d.position, layout.blocks[d.block_id]) - Math.PI / 2;\n      return r * Math.cos(angle);\n    }\n  }, {\n    key: 'y',\n    value: function y(d, layout, conf) {\n      var height = this.scale(d.value);\n      var r = conf.direction === 'in' ? conf.outerRadius - height : conf.innerRadius + height;\n\n      var angle = this.theta(d.position, layout.blocks[d.block_id]) - Math.PI / 2;\n      return r * Math.sin(angle);\n    }\n  }]);\n\n  return Track;\n}();\n\nexports.default = Track;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.parseSpanValueData = parseSpanValueData;\nexports.parseSpanStringData = parseSpanStringData;\nexports.parsePositionValueData = parsePositionValueData;\nexports.parsePositionTextData = parsePositionTextData;\nexports.parseChordData = parseChordData;\n\nvar _keys = __webpack_require__(18);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _includes = __webpack_require__(613);\n\nvar _includes2 = _interopRequireDefault(_includes);\n\nvar _every = __webpack_require__(617);\n\nvar _every2 = _interopRequireDefault(_every);\n\nvar _map = __webpack_require__(144);\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _d3Collection = __webpack_require__(227);\n\nvar _d3Array = __webpack_require__(10);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar logger = console;\n\nfunction checkParent(key, index, layoutSummary, header) {\n  if (!(0, _includes2.default)((0, _keys2.default)(layoutSummary), key)) {\n    logger.log(1, 'datum', 'unknown parent id', { line: index + 1, value: key, header: header, layoutSummary: layoutSummary });\n    return false;\n  }\n  return true;\n}\n\nfunction checkNumber(keys, index) {\n  return (0, _every2.default)(keys, function (value, header) {\n    if (isNaN(value)) {\n      logger.log(1, 'datum', 'not a number', { line: index + 1, value: value, header: header });\n      return false;\n    }\n    return true;\n  });\n}\n\nfunction normalize(data, idKeys) {\n  var sampleKeys = (0, _keys2.default)(data[0]);\n  var isObject = (0, _every2.default)((0, _map2.default)(idKeys, function (key) {\n    return (0, _includes2.default)(sampleKeys, key);\n  }));\n  if (isObject) {\n    return (0, _map2.default)(data, function (datum) {\n      return (0, _map2.default)(idKeys, function (key) {\n        return datum[key];\n      });\n    });\n  }\n\n  return data;\n}\n\nfunction buildOutput(data) {\n  return {\n    data: (0, _d3Collection.nest)().key(function (datum) {\n      return datum.block_id;\n    }).entries(data),\n    meta: {\n      min: (0, _d3Array.min)(data, function (d) {\n        return d.value;\n      }),\n      max: (0, _d3Array.max)(data, function (d) {\n        return d.value;\n      })\n    }\n  };\n}\n\nfunction parseSpanValueData(data, layoutSummary) {\n  // ['parent_id', 'start', 'end', 'value']\n  if (data.length === 0) {\n    return { data: [], meta: { min: null, max: null } };\n  }\n\n  var filteredData = data.filter(function (datum, index) {\n    return checkParent(datum.block_id, index, layoutSummary, 'parent');\n  });\n\n  return buildOutput(filteredData);\n}\n\nfunction parseSpanStringData(data, layoutSummary) {\n  // ['parent_id', 'start', 'end', 'value']\n\n  if (data.length === 0) {\n    return { data: [], meta: { min: null, max: null } };\n  }\n\n  var filteredData = data.filter(function (datum, index) {\n    return checkParent(datum.block_id, index, layoutSummary, 'parent');\n  }).filter(function (datum, index) {\n    return checkNumber({ start: datum.start, end: datum.end }, index);\n  }).filter(function (datum) {\n    if (datum.start < 0 || datum.end > layoutSummary[datum.block_id]) {\n      logger.log(2, 'position', 'position inconsistency', { datum: datum, layoutSummary: layoutSummary });\n      return false;\n    }\n    return true;\n  });\n\n  return buildOutput(filteredData);\n}\n\nfunction parsePositionValueData(data, layoutSummary) {\n  // ['parent_id', 'position', 'value']\n  if (data.length === 0) {\n    return { data: [], meta: { min: null, max: null } };\n  }\n\n  var filteredData = data.filter(function (datum, index) {\n    return checkParent(datum.block_id, index, layoutSummary, 'parent');\n  }).filter(function (datum, index) {\n    return checkNumber({ position: datum.position, value: datum.value }, index);\n  });\n\n  return buildOutput(filteredData);\n}\n\nfunction parsePositionTextData(data, layoutSummary) {\n  // ['parent_id', 'position', 'value']\n  if (data.length === 0) {\n    return { data: [], meta: { min: null, max: null } };\n  }\n\n  var filteredData = data.filter(function (datum, index) {\n    return checkParent(datum.block_id, index, layoutSummary, 'parent');\n  }).filter(function (datum, index) {\n    return checkNumber({ position: datum.position }, index);\n  });\n\n  return buildOutput(filteredData);\n}\n\nfunction parseChordData(data, layoutSummary) {\n  if (data.length === 0) {\n    return { data: [], meta: { min: null, max: null } };\n  }\n\n  var formatedData = data.filter(function (datum, index) {\n    if (datum.source) {\n      return checkParent(datum.source.id, index, layoutSummary, 'sourceId');\n    }\n    logger.warn('No source for data at index ' + index);\n    return false;\n  }).filter(function (datum, index) {\n    if (datum.target) {\n      return checkParent(datum.target.id, index, layoutSummary, 'targetId');\n    }\n    logger.warn('No target for data at index ' + index);\n    return false;\n  }).filter(function (datum, index) {\n    return checkNumber({\n      sourceStart: datum.source.start,\n      sourceEnd: datum.source.end,\n      targetStart: datum.target.start,\n      targetEnd: datum.target.end,\n      value: datum.value || 1\n    }, index);\n  });\n\n  return {\n    data: formatedData,\n    meta: {\n      min: (0, _d3Array.min)(formatedData, function (d) {\n        return d.value;\n      }),\n      max: (0, _d3Array.max)(formatedData, function (d) {\n        return d.value;\n      })\n    }\n  };\n}\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar axes = {\n  axes: {\n    value: [],\n    iteratee: false\n  },\n  showAxesTooltip: {\n    value: true,\n    iteratee: false\n  }\n};\n\nvar palette = {\n  colorPaletteSize: {\n    value: 9,\n    iteratee: false\n  },\n  colorPalette: {\n    value: 'YlGnBu',\n    iteratee: false\n  },\n  usePalette: {\n    value: true,\n    iteratee: false\n  },\n  colorPaletteReverse: {\n    value: true,\n    iteratee: false\n  }\n};\n\nvar radial = {\n  innerRadius: {\n    value: 0,\n    iteratee: false\n  },\n  outerRadius: {\n    value: 0,\n    iteratee: false\n  }\n};\n\nvar values = {\n  min: {\n    value: null,\n    iteratee: false\n  },\n  max: {\n    value: null,\n    iteratee: false\n  },\n  logScale: {\n    value: false,\n    iteratee: false\n  },\n  logScaleBase: {\n    value: Math.E,\n    iteratee: false\n  }\n};\n\nvar common = {\n  zIndex: {\n    value: false,\n    iteratee: false\n  },\n  opacity: {\n    value: 1,\n    iteratee: true\n  },\n  tooltipContent: {\n    value: null,\n    iteratee: false\n  },\n  events: {\n    value: {},\n    iteratee: false\n  }\n};\n\nexports.axes = axes;\nexports.palette = palette;\nexports.radial = radial;\nexports.values = values;\nexports.common = common;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsNative = __webpack_require__(243),\n    getValue = __webpack_require__(248);\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isObject = __webpack_require__(7);\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function constant() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return map; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return slice; });\nvar array = Array.prototype;\n\nvar map = array.map;\nvar slice = array.slice;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(5);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nmodule.exports = copyArray;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignValue = __webpack_require__(90),\n    baseAssignValue = __webpack_require__(83);\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\nmodule.exports = copyObject;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayEach = __webpack_require__(64),\n    baseEach = __webpack_require__(39),\n    castFunction = __webpack_require__(286),\n    isArray = __webpack_require__(2);\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n *   console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n  var func = isArray(collection) ? arrayEach : baseEach;\n  return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseMatches = __webpack_require__(287),\n    baseMatchesProperty = __webpack_require__(303),\n    identity = __webpack_require__(28),\n    isArray = __webpack_require__(2),\n    property = __webpack_require__(311);\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_path__ = __webpack_require__(428);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_path__[\"a\"]; });\n\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n});\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseConvert = __webpack_require__(476),\n    util = __webpack_require__(478);\n\n/**\n * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied. If `name` is an object its methods\n * will be converted.\n *\n * @param {string} name The name of the function to wrap.\n * @param {Function} [func] The function to wrap.\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction convert(name, func, options) {\n  return baseConvert(util, name, func, options);\n}\n\nmodule.exports = convert;\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseForOwn = __webpack_require__(283),\n    createBaseEach = __webpack_require__(285);\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar DataView = __webpack_require__(299),\n    Map = __webpack_require__(81),\n    Promise = __webpack_require__(300),\n    Set = __webpack_require__(301),\n    WeakMap = __webpack_require__(151),\n    baseGetTag = __webpack_require__(16),\n    toSource = __webpack_require__(129);\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(34);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = hue;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = gamma;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = nogamma;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(170);\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(isNaN(a) ? b : a);\n}\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return tau; });\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = acos;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = asin;\nvar abs = Math.abs;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar max = Math.max;\nvar min = Math.min;\nvar sin = Math.sin;\nvar sqrt = Math.sqrt;\n\nvar epsilon = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = 2 * pi;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n});\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series) {\n  var n = series.length, o = new Array(n);\n  while (--n >= 0) o[n] = n;\n  return o;\n});\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = linearish;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = linear;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__continuous__ = __webpack_require__(76);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tickFormat__ = __webpack_require__(527);\n\n\n\n\n\nfunction linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"ticks\"])(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return Object(__WEBPACK_IMPORTED_MODULE_3__tickFormat__[\"a\" /* default */])(domain(), count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickIncrement\"])(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickIncrement\"])(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickIncrement\"])(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nfunction linear() {\n  var scale = Object(__WEBPACK_IMPORTED_MODULE_2__continuous__[\"b\" /* default */])(__WEBPACK_IMPORTED_MODULE_2__continuous__[\"c\" /* deinterpolateLinear */], __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateNumber */]);\n\n  scale.copy = function() {\n    return Object(__WEBPACK_IMPORTED_MODULE_2__continuous__[\"a\" /* copy */])(scale, linear());\n  };\n\n  return linearish(scale);\n}\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(s) {\n  return s.match(/.{6}/g).map(function(x) {\n    return \"#\" + x;\n  });\n});\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports) {\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(52),\n    stackClear = __webpack_require__(255),\n    stackDelete = __webpack_require__(256),\n    stackGet = __webpack_require__(257),\n    stackHas = __webpack_require__(258),\n    stackSet = __webpack_require__(259);\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar listCacheClear = __webpack_require__(250),\n    listCacheDelete = __webpack_require__(251),\n    listCacheGet = __webpack_require__(252),\n    listCacheHas = __webpack_require__(253),\n    listCacheSet = __webpack_require__(254);\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar eq = __webpack_require__(38);\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23);\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isKeyable = __webpack_require__(268);\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(7);\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\nmodule.exports = baseCreate;\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsArguments = __webpack_require__(274),\n    isObjectLike = __webpack_require__(6);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(5),\n    stubFalse = __webpack_require__(276);\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module)))\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayLikeKeys = __webpack_require__(141),\n    baseKeysIn = __webpack_require__(280),\n    isArrayLike = __webpack_require__(17);\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar eq = __webpack_require__(38),\n    isArrayLike = __webpack_require__(17),\n    isIndex = __webpack_require__(62),\n    isObject = __webpack_require__(7);\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\nmodule.exports = arrayEach;\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespace__ = __webpack_require__(93);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__namespaces__ = __webpack_require__(94);\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === __WEBPACK_IMPORTED_MODULE_1__namespaces__[\"b\" /* xhtml */] && document.documentElement.namespaceURI === __WEBPACK_IMPORTED_MODULE_1__namespaces__[\"b\" /* xhtml */]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0__namespace__[\"a\" /* default */])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node, event) {\n  var svg = node.ownerSVGElement || node;\n\n  if (svg.createSVGPoint) {\n    var point = svg.createSVGPoint();\n    point.x = event.clientX, point.y = event.clientY;\n    point = point.matrixTransform(node.getScreenCTM().inverse());\n    return [point.x, point.y];\n  }\n\n  var rect = node.getBoundingClientRect();\n  return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n});\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_dispatch__ = __webpack_require__(350);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_dispatch__[\"a\"]; });\n\n\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return a + b * t;\n  };\n});\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = tweenValue;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule__ = __webpack_require__(12);\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(node, id).value[name];\n  };\n}\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new Linear(context);\n});\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {});\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = point;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Basis;\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nfunction Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function(context) {\n  return new Basis(context);\n});\n\n\n/***/ }),\n/* 74 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = point;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Cardinal;\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nfunction Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"b\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseCreate = __webpack_require__(56),\n    isObject = __webpack_require__(7);\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n  return function() {\n    // Use a `switch` statement to work with class constructors. See\n    // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n    // for more details.\n    var args = arguments;\n    switch (args.length) {\n      case 0: return new Ctor;\n      case 1: return new Ctor(args[0]);\n      case 2: return new Ctor(args[0], args[1]);\n      case 3: return new Ctor(args[0], args[1], args[2]);\n      case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n      case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n      case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n      case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n    }\n    var thisBinding = baseCreate(Ctor.prototype),\n        result = Ctor.apply(thisBinding, args);\n\n    // Mimic the constructor's `return` behavior.\n    // See https://es5.github.io/#x13.2.2 for more details.\n    return isObject(result) ? result : thisBinding;\n  };\n}\n\nmodule.exports = createCtor;\n\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = deinterpolateLinear;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = copy;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = continuous;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constant__ = __webpack_require__(121);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number__ = __webpack_require__(228);\n\n\n\n\n\n\nvar unit = [0, 1];\n\nfunction deinterpolateLinear(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : Object(__WEBPACK_IMPORTED_MODULE_3__constant__[\"a\" /* default */])(b);\n}\n\nfunction deinterpolateClamp(deinterpolate) {\n  return function(a, b) {\n    var d = deinterpolate(a = +a, b = +b);\n    return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };\n  };\n}\n\nfunction reinterpolateClamp(reinterpolate) {\n  return function(a, b) {\n    var r = reinterpolate(a = +a, b = +b);\n    return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };\n  };\n}\n\nfunction bimap(domain, range, deinterpolate, reinterpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);\n  else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, deinterpolate, reinterpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = deinterpolate(domain[i], domain[i + 1]);\n    r[i] = reinterpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"bisect\"])(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp());\n}\n\n// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].\nfunction continuous(deinterpolate, reinterpolate) {\n  var domain = unit,\n      range = unit,\n      interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n      clamp = false,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n  }\n\n  scale.invert = function(y) {\n    return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"f\" /* interpolateRound */], rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, rescale()) : clamp;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  return rescale();\n}\n\n\n/***/ }),\n/* 77 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal__ = __webpack_require__(122);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return x = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal__[\"a\" /* default */])(Math.abs(x)), x ? x[1] : NaN;\n});\n\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar identity = __webpack_require__(28),\n    overRest = __webpack_require__(126),\n    setToString = __webpack_require__(79);\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseSetToString = __webpack_require__(241),\n    shortOut = __webpack_require__(130);\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23),\n    root = __webpack_require__(5);\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar mapCacheClear = __webpack_require__(260),\n    mapCacheDelete = __webpack_require__(267),\n    mapCacheGet = __webpack_require__(269),\n    mapCacheHas = __webpack_require__(270),\n    mapCacheSet = __webpack_require__(271);\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar defineProperty = __webpack_require__(127);\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nmodule.exports = baseAssignValue;\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Uint8Array = __webpack_require__(136);\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar overArg = __webpack_require__(138);\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports) {\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsTypedArray = __webpack_require__(277),\n    baseUnary = __webpack_require__(60),\n    nodeUtil = __webpack_require__(89);\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(128);\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module)))\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseAssignValue = __webpack_require__(83),\n    eq = __webpack_require__(38);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignValue;\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayFilter = __webpack_require__(149),\n    stubArray = __webpack_require__(150);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArray = __webpack_require__(2),\n    isSymbol = __webpack_require__(34);\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespaces__ = __webpack_require__(94);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return __WEBPACK_IMPORTED_MODULE_0__namespaces__[\"a\" /* default */].hasOwnProperty(prefix) ? {space: __WEBPACK_IMPORTED_MODULE_0__namespaces__[\"a\" /* default */][prefix], local: name} : name;\n});\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return event; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = customEvent;\nvar filterEvents = {};\n\nvar event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n});\n\nfunction customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_on__ = __webpack_require__(97);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var current = __WEBPACK_IMPORTED_MODULE_0__selection_on__[\"c\" /* event */], source;\n  while (source = current.sourceEvent) current = source;\n  return current;\n});\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__rgb__ = __webpack_require__(168);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array__ = __webpack_require__(171);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date__ = __webpack_require__(172);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number__ = __webpack_require__(69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__object__ = __webpack_require__(173);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__string__ = __webpack_require__(174);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constant__ = __webpack_require__(170);\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(__WEBPACK_IMPORTED_MODULE_7__constant__[\"a\" /* default */])(b)\n      : (t === \"number\" ? __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]\n      : t === \"string\" ? ((c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"a\" /* color */])(b)) ? (b = c, __WEBPACK_IMPORTED_MODULE_1__rgb__[\"a\" /* default */]) : __WEBPACK_IMPORTED_MODULE_6__string__[\"a\" /* default */])\n      : b instanceof __WEBPACK_IMPORTED_MODULE_0_d3_color__[\"a\" /* color */] ? __WEBPACK_IMPORTED_MODULE_1__rgb__[\"a\" /* default */]\n      : b instanceof Date ? __WEBPACK_IMPORTED_MODULE_3__date__[\"a\" /* default */]\n      : Array.isArray(b) ? __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* default */]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? __WEBPACK_IMPORTED_MODULE_5__object__[\"a\" /* default */]\n      : __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */])(a, b);\n});\n\n\n/***/ }),\n/* 100 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Color;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return brighter; });\n/* harmony export (immutable) */ __webpack_exports__[\"e\"] = color;\n/* harmony export (immutable) */ __webpack_exports__[\"h\"] = rgbConvert;\n/* harmony export (immutable) */ __webpack_exports__[\"g\"] = rgb;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = Rgb;\n/* unused harmony export hslConvert */\n/* harmony export (immutable) */ __webpack_exports__[\"f\"] = hsl;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define__ = __webpack_require__(101);\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex3 = /^#([0-9a-f]{3})$/,\n    reHex6 = /^#([0-9a-f]{6})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Color, color, {\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  toString: function() {\n    return this.rgb() + \"\";\n  }\n});\n\nfunction color(format) {\n  var m;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00\n      : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format])\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Rgb, rgb, Object(__WEBPACK_IMPORTED_MODULE_0__define__[\"b\" /* extend */])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (0 <= this.r && this.r <= 255)\n        && (0 <= this.g && this.g <= 255)\n        && (0 <= this.b && this.b <= 255)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  toString: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"rgb(\" : \"rgba(\")\n        + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Hsl, hsl, Object(__WEBPACK_IMPORTED_MODULE_0__define__[\"b\" /* extend */])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = extend;\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = basis;\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = now;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Timer;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = timer;\n/* unused harmony export timerFlush */\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(51),\n    arrayEach = __webpack_require__(64),\n    assignValue = __webpack_require__(90),\n    baseAssign = __webpack_require__(181),\n    baseAssignIn = __webpack_require__(404),\n    cloneBuffer = __webpack_require__(134),\n    copyArray = __webpack_require__(30),\n    copySymbols = __webpack_require__(405),\n    copySymbolsIn = __webpack_require__(406),\n    getAllKeys = __webpack_require__(147),\n    getAllKeysIn = __webpack_require__(407),\n    getTag = __webpack_require__(41),\n    initCloneArray = __webpack_require__(408),\n    initCloneByTag = __webpack_require__(409),\n    initCloneObject = __webpack_require__(137),\n    isArray = __webpack_require__(2),\n    isBuffer = __webpack_require__(59),\n    isMap = __webpack_require__(413),\n    isObject = __webpack_require__(7),\n    isSet = __webpack_require__(415),\n    keys = __webpack_require__(18);\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_FLAT_FLAG = 2,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Deep clone\n *  2 - Flatten inherited properties\n *  4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n  var result,\n      isDeep = bitmask & CLONE_DEEP_FLAG,\n      isFlat = bitmask & CLONE_FLAT_FLAG,\n      isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      result = (isFlat || isFunc) ? {} : initCloneObject(value);\n      if (!isDeep) {\n        return isFlat\n          ? copySymbolsIn(value, baseAssignIn(result, value))\n          : copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (isSet(value)) {\n    value.forEach(function(subValue) {\n      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n    });\n\n    return result;\n  }\n\n  if (isMap(value)) {\n    value.forEach(function(subValue, key) {\n      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n    });\n\n    return result;\n  }\n\n  var keysFunc = isFull\n    ? (isFlat ? getAllKeysIn : getAllKeys)\n    : (isFlat ? keysIn : keys);\n\n  var props = isArr ? undefined : keysFunc(value);\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n  });\n  return result;\n}\n\nmodule.exports = baseClone;\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayReduce = __webpack_require__(417),\n    baseEach = __webpack_require__(39),\n    baseIteratee = __webpack_require__(33),\n    baseReduce = __webpack_require__(418),\n    isArray = __webpack_require__(2);\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n *   return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n *   (result[value] || (result[value] = [])).push(key);\n *   return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n  var func = isArray(collection) ? arrayReduce : baseReduce,\n      initAccum = arguments.length < 3;\n\n  return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nmodule.exports = reduce;\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFlatten = __webpack_require__(107),\n    baseOrderBy = __webpack_require__(422),\n    baseRest = __webpack_require__(78),\n    isIterateeCall = __webpack_require__(63);\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n *  The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n *   { 'user': 'fred',   'age': 48 },\n *   { 'user': 'barney', 'age': 36 },\n *   { 'user': 'fred',   'age': 40 },\n *   { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n  if (collection == null) {\n    return [];\n  }\n  var length = iteratees.length;\n  if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n    iteratees = [];\n  } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n    iteratees = [iteratees[0]];\n  }\n  return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(65),\n    isFlattenable = __webpack_require__(421);\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n  var index = -1,\n      length = array.length;\n\n  predicate || (predicate = isFlattenable);\n  result || (result = []);\n\n  while (++index < length) {\n    var value = array[index];\n    if (depth > 0 && predicate(value)) {\n      if (depth > 1) {\n        // Recursively flatten arrays (susceptible to call stack limits).\n        baseFlatten(value, depth - 1, predicate, isStrict, result);\n      } else {\n        arrayPush(result, value);\n      }\n    } else if (!isStrict) {\n      result[result.length] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n/***/ }),\n/* 108 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__curve_linear__ = __webpack_require__(71);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point__ = __webpack_require__(109);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var x = __WEBPACK_IMPORTED_MODULE_3__point__[\"a\" /* x */],\n      y = __WEBPACK_IMPORTED_MODULE_3__point__[\"b\" /* y */],\n      defined = Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(true),\n      context = null,\n      curve = __WEBPACK_IMPORTED_MODULE_2__curve_linear__[\"a\" /* default */],\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__[\"a\" /* path */])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), line) : x;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), line) : y;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n});\n\n\n/***/ }),\n/* 109 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = x;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = y;\nfunction x(p) {\n  return p[0];\n}\n\nfunction y(p) {\n  return p[1];\n}\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = point;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cardinal__ = __webpack_require__(74);\n\n\n\nfunction point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > __WEBPACK_IMPORTED_MODULE_0__math__[\"f\" /* epsilon */]) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > __WEBPACK_IMPORTED_MODULE_0__math__[\"f\" /* epsilon */]) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new __WEBPACK_IMPORTED_MODULE_1__cardinal__[\"a\" /* Cardinal */](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = sum;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(46);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series) {\n  var sums = series.map(sum);\n  return Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series).sort(function(a, b) { return sums[a] - sums[b]; });\n});\n\nfunction sum(series) {\n  var s = 0, i = -1, n = series.length, v;\n  while (++i < n) if (v = +series[i][1]) s += v;\n  return s;\n}\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(47);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, p, valueof) {\n  if (valueof == null) valueof = __WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */];\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n});\n\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseSetData = __webpack_require__(211),\n    createBind = __webpack_require__(480),\n    createCurry = __webpack_require__(481),\n    createHybrid = __webpack_require__(213),\n    createPartial = __webpack_require__(495),\n    getData = __webpack_require__(116),\n    mergeData = __webpack_require__(496),\n    setData = __webpack_require__(219),\n    setWrapToString = __webpack_require__(220),\n    toInteger = __webpack_require__(119);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n    WRAP_BIND_KEY_FLAG = 2,\n    WRAP_CURRY_FLAG = 8,\n    WRAP_CURRY_RIGHT_FLAG = 16,\n    WRAP_PARTIAL_FLAG = 32,\n    WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n *    1 - `_.bind`\n *    2 - `_.bindKey`\n *    4 - `_.curry` or `_.curryRight` of a bound function\n *    8 - `_.curry`\n *   16 - `_.curryRight`\n *   32 - `_.partial`\n *   64 - `_.partialRight`\n *  128 - `_.rearg`\n *  256 - `_.ary`\n *  512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n  var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n  if (!isBindKey && typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var length = partials ? partials.length : 0;\n  if (!length) {\n    bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n    partials = holders = undefined;\n  }\n  ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n  arity = arity === undefined ? arity : toInteger(arity);\n  length -= holders ? holders.length : 0;\n\n  if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n    var partialsRight = partials,\n        holdersRight = holders;\n\n    partials = holders = undefined;\n  }\n  var data = isBindKey ? undefined : getData(func);\n\n  var newData = [\n    func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n    argPos, ary, arity\n  ];\n\n  if (data) {\n    mergeData(newData, data);\n  }\n  func = newData[0];\n  bitmask = newData[1];\n  thisArg = newData[2];\n  partials = newData[3];\n  holders = newData[4];\n  arity = newData[9] = newData[9] === undefined\n    ? (isBindKey ? 0 : func.length)\n    : nativeMax(newData[9] - length, 0);\n\n  if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n    bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n  }\n  if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n    var result = createBind(func, bitmask, thisArg);\n  } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n    result = createCurry(func, bitmask, arity);\n  } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n    result = createPartial(func, bitmask, thisArg, partials);\n  } else {\n    result = createHybrid.apply(undefined, newData);\n  }\n  var setter = data ? baseSetData : setData;\n  return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nmodule.exports = createWrap;\n\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseCreate = __webpack_require__(56),\n    baseLodash = __webpack_require__(115);\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n  this.__wrapped__ = value;\n  this.__actions__ = [];\n  this.__dir__ = 1;\n  this.__filtered__ = false;\n  this.__iteratees__ = [];\n  this.__takeCount__ = MAX_ARRAY_LENGTH;\n  this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports) {\n\n/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n  // No operation performed.\n}\n\nmodule.exports = baseLodash;\n\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar metaMap = __webpack_require__(212),\n    noop = __webpack_require__(483);\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n  return metaMap.get(func);\n};\n\nmodule.exports = getData;\n\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseCreate = __webpack_require__(56),\n    baseLodash = __webpack_require__(115);\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n  this.__wrapped__ = value;\n  this.__actions__ = [];\n  this.__chain__ = !!chainAll;\n  this.__index__ = 0;\n  this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nmodule.exports = LodashWrapper;\n\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports) {\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n  var index = -1,\n      length = array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (value === placeholder || value === PLACEHOLDER) {\n      array[index] = PLACEHOLDER;\n      result[resIndex++] = index;\n    }\n  }\n  return result;\n}\n\nmodule.exports = replaceHolders;\n\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toFinite = __webpack_require__(223);\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n\n\n/***/ }),\n/* 120 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prefix; });\nvar prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function(key) {\n    return (prefix + key) in this;\n  },\n  get: function(key) {\n    return this[prefix + key];\n  },\n  set: function(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function() {\n    for (var property in this) if (property[0] === prefix) delete this[property];\n  },\n  keys: function() {\n    var keys = [];\n    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n    return keys;\n  },\n  values: function() {\n    var values = [];\n    for (var property in this) if (property[0] === prefix) values.push(this[property]);\n    return values;\n  },\n  entries: function() {\n    var entries = [];\n    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n    return entries;\n  },\n  size: function() {\n    var size = 0;\n    for (var property in this) if (property[0] === prefix) ++size;\n    return size;\n  },\n  empty: function() {\n    for (var property in this) if (property[0] === prefix) return false;\n    return true;\n  },\n  each: function(f) {\n    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map;\n\n  // Copy constructor.\n  if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n  // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n    var i = -1,\n        n = object.length,\n        o;\n\n    if (f == null) while (++i < n) map.set(i, object[i]);\n    else while (++i < n) map.set(f(o = object[i], i, object), o);\n  }\n\n  // Convert object to map.\n  else if (object) for (var key in object) map.set(key, object[key]);\n\n  return map;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (map);\n\n\n/***/ }),\n/* 121 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 122 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n});\n\n\n/***/ }),\n/* 123 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_interval__ = __webpack_require__(4);\n/* unused harmony reexport timeInterval */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_millisecond__ = __webpack_require__(542);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_millisecond__[\"a\"]; });\n/* unused harmony reexport timeMilliseconds */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_millisecond__[\"a\"]; });\n/* unused harmony reexport utcMilliseconds */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_second__ = __webpack_require__(543);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_second__[\"a\"]; });\n/* unused harmony reexport timeSeconds */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_second__[\"a\"]; });\n/* unused harmony reexport utcSeconds */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_minute__ = __webpack_require__(544);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_minute__[\"a\"]; });\n/* unused harmony reexport timeMinutes */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_hour__ = __webpack_require__(545);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_hour__[\"a\"]; });\n/* unused harmony reexport timeHours */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_day__ = __webpack_require__(546);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_day__[\"a\"]; });\n/* unused harmony reexport timeDays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_week__ = __webpack_require__(547);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_week__[\"b\"]; });\n/* unused harmony reexport timeWeeks */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_week__[\"b\"]; });\n/* unused harmony reexport timeSundays */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_week__[\"a\"]; });\n/* unused harmony reexport timeMondays */\n/* unused harmony reexport timeTuesday */\n/* unused harmony reexport timeTuesdays */\n/* unused harmony reexport timeWednesday */\n/* unused harmony reexport timeWednesdays */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_week__[\"c\"]; });\n/* unused harmony reexport timeThursdays */\n/* unused harmony reexport timeFriday */\n/* unused harmony reexport timeFridays */\n/* unused harmony reexport timeSaturday */\n/* unused harmony reexport timeSaturdays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_month__ = __webpack_require__(548);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_month__[\"a\"]; });\n/* unused harmony reexport timeMonths */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_year__ = __webpack_require__(549);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_year__[\"a\"]; });\n/* unused harmony reexport timeYears */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_utcMinute__ = __webpack_require__(550);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_utcMinute__[\"a\"]; });\n/* unused harmony reexport utcMinutes */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_utcHour__ = __webpack_require__(551);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_utcHour__[\"a\"]; });\n/* unused harmony reexport utcHours */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_utcDay__ = __webpack_require__(552);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_utcDay__[\"a\"]; });\n/* unused harmony reexport utcDays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_utcWeek__ = __webpack_require__(553);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_utcWeek__[\"b\"]; });\n/* unused harmony reexport utcWeeks */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_utcWeek__[\"b\"]; });\n/* unused harmony reexport utcSundays */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_utcWeek__[\"a\"]; });\n/* unused harmony reexport utcMondays */\n/* unused harmony reexport utcTuesday */\n/* unused harmony reexport utcTuesdays */\n/* unused harmony reexport utcWednesday */\n/* unused harmony reexport utcWednesdays */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_utcWeek__[\"c\"]; });\n/* unused harmony reexport utcThursdays */\n/* unused harmony reexport utcFriday */\n/* unused harmony reexport utcFridays */\n/* unused harmony reexport utcSaturday */\n/* unused harmony reexport utcSaturdays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_utcMonth__ = __webpack_require__(554);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return __WEBPACK_IMPORTED_MODULE_13__src_utcMonth__[\"a\"]; });\n/* unused harmony reexport utcMonths */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_utcYear__ = __webpack_require__(555);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return __WEBPACK_IMPORTED_MODULE_14__src_utcYear__[\"a\"]; });\n/* unused harmony reexport utcYears */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 124 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return timeFormat; });\n/* unused harmony export timeParse */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return utcFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return utcParse; });\n/* unused harmony export default */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale__ = __webpack_require__(237);\n\n\nvar locale;\nvar timeFormat;\nvar timeParse;\nvar utcFormat;\nvar utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(__WEBPACK_IMPORTED_MODULE_0__locale__[\"a\" /* default */])(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = __webpack_require__(50),\n    baseRest = __webpack_require__(78),\n    customDefaultsMerge = __webpack_require__(249),\n    mergeWith = __webpack_require__(282);\n\n/**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\nvar defaultsDeep = baseRest(function(args) {\n  args.push(undefined, customDefaultsMerge);\n  return apply(mergeWith, undefined, args);\n});\n\nmodule.exports = defaultsDeep;\n\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = __webpack_require__(50);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nmodule.exports = overRest;\n\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23);\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(80)))\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports) {\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nmodule.exports = shortOut;\n\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(51),\n    assignMergeValue = __webpack_require__(132),\n    baseFor = __webpack_require__(133),\n    baseMergeDeep = __webpack_require__(273),\n    isObject = __webpack_require__(7),\n    keysIn = __webpack_require__(61),\n    safeGet = __webpack_require__(140);\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    if (isObject(srcValue)) {\n      stack || (stack = new Stack);\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\nmodule.exports = baseMerge;\n\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseAssignValue = __webpack_require__(83),\n    eq = __webpack_require__(38);\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignMergeValue;\n\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createBaseFor = __webpack_require__(272);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(5);\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\nmodule.exports = cloneBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module)))\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(85);\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(5);\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseCreate = __webpack_require__(56),\n    getPrototype = __webpack_require__(86),\n    isPrototype = __webpack_require__(57);\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\nmodule.exports = initCloneObject;\n\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    getPrototype = __webpack_require__(86),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\nmodule.exports = safeGet;\n\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseTimes = __webpack_require__(279),\n    isArguments = __webpack_require__(58),\n    isArray = __webpack_require__(2),\n    isBuffer = __webpack_require__(59),\n    isIndex = __webpack_require__(62),\n    isTypedArray = __webpack_require__(88);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseRest = __webpack_require__(78),\n    isIterateeCall = __webpack_require__(63);\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\nmodule.exports = createAssigner;\n\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isPrototype = __webpack_require__(57),\n    nativeKeys = __webpack_require__(284);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n\n\n/***/ }),\n/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(40),\n    baseIteratee = __webpack_require__(33),\n    baseMap = __webpack_require__(158),\n    isArray = __webpack_require__(2);\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n *   return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n *   { 'user': 'barney' },\n *   { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n  var func = isArray(collection) ? arrayMap : baseMap;\n  return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsEqualDeep = __webpack_require__(289),\n    isObjectLike = __webpack_require__(6);\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SetCache = __webpack_require__(290),\n    arraySome = __webpack_require__(293),\n    cacheHas = __webpack_require__(294);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Assume cyclic values are equal.\n  var stacked = stack.get(array);\n  if (stacked && stack.get(other)) {\n    return stacked == other;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalArrays;\n\n\n/***/ }),\n/* 147 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetAllKeys = __webpack_require__(148),\n    getSymbols = __webpack_require__(91),\n    keys = __webpack_require__(18);\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(65),\n    isArray = __webpack_require__(2);\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n/***/ }),\n/* 149 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports) {\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23),\n    root = __webpack_require__(5);\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n/***/ }),\n/* 152 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(7);\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar castPath = __webpack_require__(155),\n    toKey = __webpack_require__(42);\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n/***/ }),\n/* 155 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArray = __webpack_require__(2),\n    isKey = __webpack_require__(92),\n    stringToPath = __webpack_require__(156),\n    toString = __webpack_require__(157);\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar memoizeCapped = __webpack_require__(305);\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nmodule.exports = stringToPath;\n\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseToString = __webpack_require__(307);\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n/***/ }),\n/* 158 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseEach = __webpack_require__(39),\n    isArrayLike = __webpack_require__(17);\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n  var index = -1,\n      result = isArrayLike(collection) ? Array(collection.length) : [];\n\n  baseEach(collection, function(value, key, collection) {\n    result[++index] = iteratee(value, key, collection);\n  });\n  return result;\n}\n\nmodule.exports = baseMap;\n\n\n/***/ }),\n/* 159 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_index__ = __webpack_require__(11);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"a\" /* Selection */]([[document.querySelector(selector)]], [document.documentElement])\n      : new __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"a\" /* Selection */]([[selector]], __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"c\" /* root */]);\n});\n\n\n/***/ }),\n/* 160 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n/***/ }),\n/* 161 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar matcher = function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n};\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!element.matches) {\n    var vendorMatches = element.webkitMatchesSelector\n        || element.msMatchesSelector\n        || element.mozMatchesSelector\n        || element.oMatchesSelector;\n    matcher = function(selector) {\n      return function() {\n        return vendorMatches.call(this, selector);\n      };\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (matcher);\n\n\n/***/ }),\n/* 162 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = EnterNode;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sparse__ = __webpack_require__(163);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(11);\n\n\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function() {\n  return new __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* Selection */](this._enter || this._groups.map(__WEBPACK_IMPORTED_MODULE_0__sparse__[\"a\" /* default */]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n/***/ }),\n/* 163 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n/***/ }),\n/* 164 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = styleValue;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__window__ = __webpack_require__(96);\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(__WEBPACK_IMPORTED_MODULE_0__window__[\"a\" /* default */])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n/***/ }),\n/* 165 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = yesdrag;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noevent__ = __webpack_require__(166);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"select\"])(view).on(\"dragstart.drag\", __WEBPACK_IMPORTED_MODULE_1__noevent__[\"a\" /* default */], true);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", __WEBPACK_IMPORTED_MODULE_1__noevent__[\"a\" /* default */], true);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", __WEBPACK_IMPORTED_MODULE_1__noevent__[\"a\" /* default */], true);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n/***/ }),\n/* 166 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = nopropagation;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n\n\nfunction nopropagation() {\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].preventDefault();\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].stopImmediatePropagation();\n});\n\n\n/***/ }),\n/* 167 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return deg2rad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return rad2deg; });\nvar deg2rad = Math.PI / 180;\nvar rad2deg = 180 / Math.PI;\n\n\n/***/ }),\n/* 168 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return rgbBasis; });\n/* unused harmony export rgbBasisClosed */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basis__ = __webpack_require__(102);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__basisClosed__ = __webpack_require__(169);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__color__ = __webpack_require__(43);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ((function rgbGamma(y) {\n  var color = Object(__WEBPACK_IMPORTED_MODULE_3__color__[\"b\" /* gamma */])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"f\" /* rgb */])(start)).r, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"f\" /* rgb */])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(__WEBPACK_IMPORTED_MODULE_3__color__[\"a\" /* default */])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"f\" /* rgb */])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(__WEBPACK_IMPORTED_MODULE_1__basis__[\"b\" /* default */]);\nvar rgbBasisClosed = rgbSpline(__WEBPACK_IMPORTED_MODULE_2__basisClosed__[\"a\" /* default */]);\n\n\n/***/ }),\n/* 169 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis__ = __webpack_require__(102);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(__WEBPACK_IMPORTED_MODULE_0__basis__[\"a\" /* basis */])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n/***/ }),\n/* 170 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 171 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__value__ = __webpack_require__(99);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(__WEBPACK_IMPORTED_MODULE_0__value__[\"a\" /* default */])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n/* 172 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b -= a, function(t) {\n    return d.setTime(a + b * t), d;\n  };\n});\n\n\n/***/ }),\n/* 173 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__value__ = __webpack_require__(99);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(__WEBPACK_IMPORTED_MODULE_0__value__[\"a\" /* default */])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n/***/ }),\n/* 174 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(69);\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n/***/ }),\n/* 175 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_selection_index__ = __webpack_require__(367);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_transition_index__ = __webpack_require__(19);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_transition_index__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_active__ = __webpack_require__(399);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_active__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_interrupt__ = __webpack_require__(176);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_interrupt__[\"a\"]; });\n\n\n\n\n\n\n/***/ }),\n/* 176 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_schedule__ = __webpack_require__(12);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > __WEBPACK_IMPORTED_MODULE_0__transition_schedule__[\"d\" /* STARTING */] && schedule.state < __WEBPACK_IMPORTED_MODULE_0__transition_schedule__[\"b\" /* ENDING */];\n    schedule.state = __WEBPACK_IMPORTED_MODULE_0__transition_schedule__[\"a\" /* ENDED */];\n    schedule.timer.stop();\n    if (active) schedule.on.call(\"interrupt\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n/***/ }),\n/* 177 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_timer__ = __webpack_require__(103);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_timer__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_timer__[\"c\"]; });\n/* unused harmony reexport timerFlush */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_timeout__ = __webpack_require__(369);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_timeout__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_interval__ = __webpack_require__(370);\n/* unused harmony reexport interval */\n\n\n\n\n\n\n\n/***/ }),\n/* 178 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateNumber */]\n      : b instanceof __WEBPACK_IMPORTED_MODULE_0_d3_color__[\"a\" /* color */] ? __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRgb */]\n      : (c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"a\" /* color */])(b)) ? (b = c, __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRgb */])\n      : __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"g\" /* interpolateString */])(a, b);\n});\n\n\n/***/ }),\n/* 179 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Transform;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return identity; });\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = transform;\nfunction Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nvar identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nfunction transform(node) {\n  return node.__zoom || identity;\n}\n\n\n/***/ }),\n/* 180 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseClone = __webpack_require__(104);\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n\n\n/***/ }),\n/* 181 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(31),\n    keys = __webpack_require__(18);\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n\n\n/***/ }),\n/* 182 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(65),\n    getPrototype = __webpack_require__(86),\n    getSymbols = __webpack_require__(91),\n    stubArray = __webpack_require__(150);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n  var result = [];\n  while (object) {\n    arrayPush(result, getSymbols(object));\n    object = getPrototype(object);\n  }\n  return result;\n};\n\nmodule.exports = getSymbolsIn;\n\n\n/***/ }),\n/* 183 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__curve_linear__ = __webpack_require__(71);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__line__ = __webpack_require__(108);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__point__ = __webpack_require__(109);\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var x0 = __WEBPACK_IMPORTED_MODULE_4__point__[\"a\" /* x */],\n      x1 = null,\n      y0 = Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(0),\n      y1 = __WEBPACK_IMPORTED_MODULE_4__point__[\"b\" /* y */],\n      defined = Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(true),\n      context = null,\n      curve = __WEBPACK_IMPORTED_MODULE_2__curve_linear__[\"a\" /* default */],\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__[\"a\" /* path */])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return Object(__WEBPACK_IMPORTED_MODULE_3__line__[\"a\" /* default */])().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n});\n\n\n/***/ }),\n/* 184 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return curveRadialLinear; });\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = curveRadial;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(71);\n\n\nvar curveRadialLinear = curveRadial(__WEBPACK_IMPORTED_MODULE_0__linear__[\"a\" /* default */]);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nfunction curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n\n\n/***/ }),\n/* 185 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = lineRadial;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__curve_radial__ = __webpack_require__(184);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line__ = __webpack_require__(108);\n\n\n\nfunction lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(Object(__WEBPACK_IMPORTED_MODULE_0__curve_radial__[\"b\" /* default */])(_)) : c()._curve;\n  };\n\n  return l;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return lineRadial(Object(__WEBPACK_IMPORTED_MODULE_1__line__[\"a\" /* default */])().curve(__WEBPACK_IMPORTED_MODULE_0__curve_radial__[\"a\" /* curveRadialLinear */]));\n});\n\n\n/***/ }),\n/* 186 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n});\n\n\n/***/ }),\n/* 187 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n/* 188 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math__ = __webpack_require__(44);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / __WEBPACK_IMPORTED_MODULE_0__math__[\"j\" /* pi */]);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, __WEBPACK_IMPORTED_MODULE_0__math__[\"m\" /* tau */]);\n  }\n});\n\n\n/***/ }),\n/* 189 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n/* 190 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n/* 191 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math__ = __webpack_require__(44);\n\n\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(__WEBPACK_IMPORTED_MODULE_0__math__[\"j\" /* pi */] / 10) / Math.sin(7 * __WEBPACK_IMPORTED_MODULE_0__math__[\"j\" /* pi */] / 10),\n    kx = Math.sin(__WEBPACK_IMPORTED_MODULE_0__math__[\"m\" /* tau */] / 10) * kr,\n    ky = -Math.cos(__WEBPACK_IMPORTED_MODULE_0__math__[\"m\" /* tau */] / 10) * kr;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (var i = 1; i < 5; ++i) {\n      var a = __WEBPACK_IMPORTED_MODULE_0__math__[\"m\" /* tau */] * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n/* 192 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n});\n\n\n/***/ }),\n/* 193 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar sqrt3 = Math.sqrt(3);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n/* 194 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n});\n\n\n/***/ }),\n/* 195 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = CardinalClosed;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(72);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cardinal__ = __webpack_require__(74);\n\n\n\nfunction CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(__WEBPACK_IMPORTED_MODULE_1__cardinal__[\"c\" /* point */])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"b\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n/* 196 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = CardinalOpen;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinal__ = __webpack_require__(74);\n\n\nfunction CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(__WEBPACK_IMPORTED_MODULE_0__cardinal__[\"c\" /* point */])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"b\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n/***/ }),\n/* 197 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return bisectLeft; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(36);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bisector__ = __webpack_require__(198);\n\n\n\nvar ascendingBisect = Object(__WEBPACK_IMPORTED_MODULE_1__bisector__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_0__ascending__[\"a\" /* default */]);\nvar bisectRight = ascendingBisect.right;\nvar bisectLeft = ascendingBisect.left;\n/* harmony default export */ __webpack_exports__[\"c\"] = (bisectRight);\n\n\n/***/ }),\n/* 198 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(36);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n});\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return Object(__WEBPACK_IMPORTED_MODULE_0__ascending__[\"a\" /* default */])(f(d), x);\n  };\n}\n\n\n/***/ }),\n/* 199 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = pair;\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(array, f) {\n  if (f == null) f = pair;\n  var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);\n  while (i < n) pairs[i] = f(p, p = array[++i]);\n  return pairs;\n});\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n/***/ }),\n/* 200 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__variance__ = __webpack_require__(201);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(array, f) {\n  var v = Object(__WEBPACK_IMPORTED_MODULE_0__variance__[\"a\" /* default */])(array, f);\n  return v ? Math.sqrt(v) : v;\n});\n\n\n/***/ }),\n/* 201 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(47);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      m = 0,\n      i = -1,\n      mean = 0,\n      value,\n      delta,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(values[i]))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(valueof(values[i], i, values)))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  if (m > 1) return sum / (m - 1);\n});\n\n\n/***/ }),\n/* 202 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return [min, max];\n});\n\n\n/***/ }),\n/* 203 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n/***/ }),\n/* 204 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n/***/ }),\n/* 205 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = tickIncrement;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = tickStep;\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n/***/ }),\n/* 206 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values) {\n  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n});\n\n\n/***/ }),\n/* 207 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  return min;\n});\n\n\n/***/ }),\n/* 208 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__min__ = __webpack_require__(207);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(__WEBPACK_IMPORTED_MODULE_0__min__[\"a\" /* default */])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n/***/ }),\n/* 209 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.registerTooltip = registerTooltip;\n\nvar _d3Selection = __webpack_require__(3);\n\n__webpack_require__(175);\n\n__webpack_require__(469);\n\nfunction registerTooltip(track, instance, element, trackParams) {\n  track.dispatch.on('mouseover', function (d) {\n    instance.tip.html(trackParams.tooltipContent(d)).transition().style('opacity', 0.9).style('left', _d3Selection.event.pageX + 'px').style('top', _d3Selection.event.pageY - 28 + 'px');\n  });\n\n  track.dispatch.on('mouseout', function (d) {\n    instance.tip.transition().duration(500).style('opacity', 0);\n  });\n}\n\n/***/ }),\n/* 210 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.smartBorders = smartBorders;\nexports.computeMinMax = computeMinMax;\nexports.buildScale = buildScale;\n\nvar _sortBy = __webpack_require__(475);\n\nvar _sortBy2 = _interopRequireDefault(_sortBy);\n\nvar _flow = __webpack_require__(506);\n\nvar _flow2 = _interopRequireDefault(_flow);\n\nvar _concat = __webpack_require__(509);\n\nvar _concat2 = _interopRequireDefault(_concat);\n\nvar _filter = __webpack_require__(511);\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _first = __webpack_require__(514);\n\nvar _first2 = _interopRequireDefault(_first);\n\nvar _reverse = __webpack_require__(518);\n\nvar _reverse2 = _interopRequireDefault(_reverse);\n\nvar _d3Scale = __webpack_require__(225);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction smartBorders(conf, layout, tracks) {\n  var width = conf.defaultTrackWidth || 30;\n\n  var externalTrack = (0, _flow2.default)((0, _filter2.default)('conf.outerRadius'), (0, _sortBy2.default)('conf.outerRadius'), _reverse2.default, _first2.default)((0, _concat2.default)(tracks, layout));\n\n  return {\n    in: externalTrack.conf.outerRadius,\n    out: externalTrack.conf.outerRadius + width\n  };\n}\n\nfunction computeMinMax(conf, meta) {\n  conf.cmin = conf.min === null ? meta.min : conf.min;\n  conf.cmax = conf.max === null ? meta.max : conf.max;\n  return conf;\n}\n\nfunction buildScale(min, max, height) {\n  var logScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  var logScaleBase = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Math.E;\n\n  if (logScale && min * max <= 0) {\n    console.warn('As log(0) = -\\u221E, a log scale domain must be\\n      strictly-positive or strictly-negative. logscale ignored');\n  }\n  var scale = logScale && min * max > 0 ? (0, _d3Scale.scaleLog)().base(logScaleBase) : (0, _d3Scale.scaleLinear)();\n\n  return scale.domain([min, max]).range([0, height]).clamp(true);\n}\n\n/***/ }),\n/* 211 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar identity = __webpack_require__(28),\n    metaMap = __webpack_require__(212);\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n  metaMap.set(func, data);\n  return func;\n};\n\nmodule.exports = baseSetData;\n\n\n/***/ }),\n/* 212 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar WeakMap = __webpack_require__(151);\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n\n\n/***/ }),\n/* 213 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar composeArgs = __webpack_require__(214),\n    composeArgsRight = __webpack_require__(215),\n    countHolders = __webpack_require__(482),\n    createCtor = __webpack_require__(75),\n    createRecurry = __webpack_require__(216),\n    getHolder = __webpack_require__(222),\n    reorder = __webpack_require__(494),\n    replaceHolders = __webpack_require__(118),\n    root = __webpack_require__(5);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n    WRAP_BIND_KEY_FLAG = 2,\n    WRAP_CURRY_FLAG = 8,\n    WRAP_CURRY_RIGHT_FLAG = 16,\n    WRAP_ARY_FLAG = 128,\n    WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n *  the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n *  to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n  var isAry = bitmask & WRAP_ARY_FLAG,\n      isBind = bitmask & WRAP_BIND_FLAG,\n      isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n      isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n      isFlip = bitmask & WRAP_FLIP_FLAG,\n      Ctor = isBindKey ? undefined : createCtor(func);\n\n  function wrapper() {\n    var length = arguments.length,\n        args = Array(length),\n        index = length;\n\n    while (index--) {\n      args[index] = arguments[index];\n    }\n    if (isCurried) {\n      var placeholder = getHolder(wrapper),\n          holdersCount = countHolders(args, placeholder);\n    }\n    if (partials) {\n      args = composeArgs(args, partials, holders, isCurried);\n    }\n    if (partialsRight) {\n      args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n    }\n    length -= holdersCount;\n    if (isCurried && length < arity) {\n      var newHolders = replaceHolders(args, placeholder);\n      return createRecurry(\n        func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n        args, newHolders, argPos, ary, arity - length\n      );\n    }\n    var thisBinding = isBind ? thisArg : this,\n        fn = isBindKey ? thisBinding[func] : func;\n\n    length = args.length;\n    if (argPos) {\n      args = reorder(args, argPos);\n    } else if (isFlip && length > 1) {\n      args.reverse();\n    }\n    if (isAry && ary < length) {\n      args.length = ary;\n    }\n    if (this && this !== root && this instanceof wrapper) {\n      fn = Ctor || createCtor(fn);\n    }\n    return fn.apply(thisBinding, args);\n  }\n  return wrapper;\n}\n\nmodule.exports = createHybrid;\n\n\n/***/ }),\n/* 214 */\n/***/ (function(module, exports) {\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n  var argsIndex = -1,\n      argsLength = args.length,\n      holdersLength = holders.length,\n      leftIndex = -1,\n      leftLength = partials.length,\n      rangeLength = nativeMax(argsLength - holdersLength, 0),\n      result = Array(leftLength + rangeLength),\n      isUncurried = !isCurried;\n\n  while (++leftIndex < leftLength) {\n    result[leftIndex] = partials[leftIndex];\n  }\n  while (++argsIndex < holdersLength) {\n    if (isUncurried || argsIndex < argsLength) {\n      result[holders[argsIndex]] = args[argsIndex];\n    }\n  }\n  while (rangeLength--) {\n    result[leftIndex++] = args[argsIndex++];\n  }\n  return result;\n}\n\nmodule.exports = composeArgs;\n\n\n/***/ }),\n/* 215 */\n/***/ (function(module, exports) {\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n  var argsIndex = -1,\n      argsLength = args.length,\n      holdersIndex = -1,\n      holdersLength = holders.length,\n      rightIndex = -1,\n      rightLength = partials.length,\n      rangeLength = nativeMax(argsLength - holdersLength, 0),\n      result = Array(rangeLength + rightLength),\n      isUncurried = !isCurried;\n\n  while (++argsIndex < rangeLength) {\n    result[argsIndex] = args[argsIndex];\n  }\n  var offset = argsIndex;\n  while (++rightIndex < rightLength) {\n    result[offset + rightIndex] = partials[rightIndex];\n  }\n  while (++holdersIndex < holdersLength) {\n    if (isUncurried || argsIndex < argsLength) {\n      result[offset + holders[holdersIndex]] = args[argsIndex++];\n    }\n  }\n  return result;\n}\n\nmodule.exports = composeArgsRight;\n\n\n/***/ }),\n/* 216 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isLaziable = __webpack_require__(217),\n    setData = __webpack_require__(219),\n    setWrapToString = __webpack_require__(220);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n    WRAP_BIND_KEY_FLAG = 2,\n    WRAP_CURRY_BOUND_FLAG = 4,\n    WRAP_CURRY_FLAG = 8,\n    WRAP_PARTIAL_FLAG = 32,\n    WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n *  the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n  var isCurry = bitmask & WRAP_CURRY_FLAG,\n      newHolders = isCurry ? holders : undefined,\n      newHoldersRight = isCurry ? undefined : holders,\n      newPartials = isCurry ? partials : undefined,\n      newPartialsRight = isCurry ? undefined : partials;\n\n  bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n  bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n  if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n    bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n  }\n  var newData = [\n    func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n    newHoldersRight, argPos, ary, arity\n  ];\n\n  var result = wrapFunc.apply(undefined, newData);\n  if (isLaziable(func)) {\n    setData(result, newData);\n  }\n  result.placeholder = placeholder;\n  return setWrapToString(result, func, bitmask);\n}\n\nmodule.exports = createRecurry;\n\n\n/***/ }),\n/* 217 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar LazyWrapper = __webpack_require__(114),\n    getData = __webpack_require__(116),\n    getFuncName = __webpack_require__(218),\n    lodash = __webpack_require__(485);\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n *  else `false`.\n */\nfunction isLaziable(func) {\n  var funcName = getFuncName(func),\n      other = lodash[funcName];\n\n  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n    return false;\n  }\n  if (func === other) {\n    return true;\n  }\n  var data = getData(other);\n  return !!data && func === data[0];\n}\n\nmodule.exports = isLaziable;\n\n\n/***/ }),\n/* 218 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar realNames = __webpack_require__(484);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n  var result = (func.name + ''),\n      array = realNames[result],\n      length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n  while (length--) {\n    var data = array[length],\n        otherFunc = data.func;\n    if (otherFunc == null || otherFunc == func) {\n      return data.name;\n    }\n  }\n  return result;\n}\n\nmodule.exports = getFuncName;\n\n\n/***/ }),\n/* 219 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseSetData = __webpack_require__(211),\n    shortOut = __webpack_require__(130);\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nmodule.exports = setData;\n\n\n/***/ }),\n/* 220 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getWrapDetails = __webpack_require__(487),\n    insertWrapDetails = __webpack_require__(488),\n    setToString = __webpack_require__(79),\n    updateWrapDetails = __webpack_require__(489);\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n  var source = (reference + '');\n  return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n\n\n/***/ }),\n/* 221 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFindIndex = __webpack_require__(491),\n    baseIsNaN = __webpack_require__(492),\n    strictIndexOf = __webpack_require__(493);\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n  return value === value\n    ? strictIndexOf(array, value, fromIndex)\n    : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n/***/ }),\n/* 222 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n  var object = func;\n  return object.placeholder;\n}\n\nmodule.exports = getHolder;\n\n\n/***/ }),\n/* 223 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toNumber = __webpack_require__(497);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n\n\n/***/ }),\n/* 224 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar flatten = __webpack_require__(504),\n    overRest = __webpack_require__(126),\n    setToString = __webpack_require__(79);\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n  return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n\n\n/***/ }),\n/* 225 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_band__ = __webpack_require__(520);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_band__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_band__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_identity__ = __webpack_require__(526);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_identity__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_linear__ = __webpack_require__(48);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_linear__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_log__ = __webpack_require__(537);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_log__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_ordinal__ = __webpack_require__(226);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_ordinal__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_ordinal__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_pow__ = __webpack_require__(538);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_pow__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_pow__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_quantile__ = __webpack_require__(539);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return __WEBPACK_IMPORTED_MODULE_6__src_quantile__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_quantize__ = __webpack_require__(540);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return __WEBPACK_IMPORTED_MODULE_7__src_quantize__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_threshold__ = __webpack_require__(541);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return __WEBPACK_IMPORTED_MODULE_8__src_threshold__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_time__ = __webpack_require__(235);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return __WEBPACK_IMPORTED_MODULE_9__src_time__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_utcTime__ = __webpack_require__(557);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return __WEBPACK_IMPORTED_MODULE_10__src_utcTime__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_category10__ = __webpack_require__(558);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return __WEBPACK_IMPORTED_MODULE_11__src_category10__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_category20b__ = __webpack_require__(559);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20b\", function() { return __WEBPACK_IMPORTED_MODULE_12__src_category20b__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_category20c__ = __webpack_require__(560);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20c\", function() { return __WEBPACK_IMPORTED_MODULE_13__src_category20c__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_category20__ = __webpack_require__(561);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20\", function() { return __WEBPACK_IMPORTED_MODULE_14__src_category20__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__ = __webpack_require__(562);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_rainbow__ = __webpack_require__(563);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_rainbow__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_rainbow__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return __WEBPACK_IMPORTED_MODULE_16__src_rainbow__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__src_viridis__ = __webpack_require__(564);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_viridis__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_viridis__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_viridis__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return __WEBPACK_IMPORTED_MODULE_17__src_viridis__[\"d\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__src_sequential__ = __webpack_require__(565);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return __WEBPACK_IMPORTED_MODULE_18__src_sequential__[\"a\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 226 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return implicit; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = ordinal;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_collection__ = __webpack_require__(227);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(27);\n\n\n\nvar implicit = {name: \"implicit\"};\n\nfunction ordinal(range) {\n  var index = Object(__WEBPACK_IMPORTED_MODULE_0_d3_collection__[\"map\"])(),\n      domain = [],\n      unknown = implicit;\n\n  range = range == null ? [] : __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(range);\n\n  function scale(d) {\n    var key = d + \"\", i = index.get(key);\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = Object(__WEBPACK_IMPORTED_MODULE_0_d3_collection__[\"map\"])();\n    var i = -1, n = _.length, d, key;\n    while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return scale;\n}\n\n\n/***/ }),\n/* 227 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_nest__ = __webpack_require__(521);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"nest\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_nest__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_set__ = __webpack_require__(522);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_set__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_map__ = __webpack_require__(120);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_map__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_keys__ = __webpack_require__(523);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_keys__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_values__ = __webpack_require__(524);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_values__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_entries__ = __webpack_require__(525);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"entries\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_entries__[\"a\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n/* 228 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return +x;\n});\n\n\n/***/ }),\n/* 229 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__ = __webpack_require__(528);\n/* unused harmony reexport formatDefaultLocale */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_locale__ = __webpack_require__(230);\n/* unused harmony reexport formatLocale */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_formatSpecifier__ = __webpack_require__(231);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_formatSpecifier__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_precisionFixed__ = __webpack_require__(534);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_3__src_precisionFixed__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_precisionPrefix__ = __webpack_require__(535);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_4__src_precisionPrefix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_precisionRound__ = __webpack_require__(536);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_5__src_precisionRound__[\"a\"]; });\n\n\n\n\n\n\n\n\n/***/ }),\n/* 230 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent__ = __webpack_require__(77);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__formatGroup__ = __webpack_require__(529);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__formatNumerals__ = __webpack_require__(530);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__formatSpecifier__ = __webpack_require__(231);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__formatTypes__ = __webpack_require__(232);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formatPrefixAuto__ = __webpack_require__(233);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__identity__ = __webpack_require__(533);\n\n\n\n\n\n\n\n\nvar prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(locale) {\n  var group = locale.grouping && locale.thousands ? Object(__WEBPACK_IMPORTED_MODULE_1__formatGroup__[\"a\" /* default */])(locale.grouping, locale.thousands) : __WEBPACK_IMPORTED_MODULE_6__identity__[\"a\" /* default */],\n      currency = locale.currency,\n      decimal = locale.decimal,\n      numerals = locale.numerals ? Object(__WEBPACK_IMPORTED_MODULE_2__formatNumerals__[\"a\" /* default */])(locale.numerals) : __WEBPACK_IMPORTED_MODULE_6__identity__[\"a\" /* default */],\n      percent = locale.percent || \"%\";\n\n  function newFormat(specifier) {\n    specifier = Object(__WEBPACK_IMPORTED_MODULE_3__formatSpecifier__[\"a\" /* default */])(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        type = specifier.type;\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = __WEBPACK_IMPORTED_MODULE_4__formatTypes__[\"a\" /* default */][type],\n        maybeSuffix = !type || /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision == null ? (type ? 6 : 12)\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Perform the initial formatting.\n        var valueNegative = value < 0;\n        value = formatType(Math.abs(value), precision);\n\n        // If a negative value rounds to zero during formatting, treat as positive.\n        if (valueNegative && +value === 0) valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + __WEBPACK_IMPORTED_MODULE_5__formatPrefixAuto__[\"b\" /* prefixExponent */] / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = Object(__WEBPACK_IMPORTED_MODULE_3__formatSpecifier__[\"a\" /* default */])(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n});\n\n\n/***/ }),\n/* 231 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = formatSpecifier;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatTypes__ = __webpack_require__(232);\n\n\n// [[fill]align][sign][symbol][0][width][,][.precision][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  return new FormatSpecifier(specifier);\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n  var match,\n      fill = match[1] || \" \",\n      align = match[2] || \">\",\n      sign = match[3] || \"-\",\n      symbol = match[4] || \"\",\n      zero = !!match[5],\n      width = match[6] && +match[6],\n      comma = !!match[7],\n      precision = match[8] && +match[8].slice(1),\n      type = match[9] || \"\";\n\n  // The \"n\" type is an alias for \",g\".\n  if (type === \"n\") comma = true, type = \"g\";\n\n  // Map invalid types to the default format.\n  else if (!__WEBPACK_IMPORTED_MODULE_0__formatTypes__[\"a\" /* default */][type]) type = \"\";\n\n  // If zero fill is specified, padding goes after sign and before digits.\n  if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n  this.fill = fill;\n  this.align = align;\n  this.sign = sign;\n  this.symbol = symbol;\n  this.zero = zero;\n  this.width = width;\n  this.comma = comma;\n  this.precision = precision;\n  this.type = type;\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + this.type;\n};\n\n\n/***/ }),\n/* 232 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDefault__ = __webpack_require__(531);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__formatPrefixAuto__ = __webpack_require__(233);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__formatRounded__ = __webpack_require__(532);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n  \"\": __WEBPACK_IMPORTED_MODULE_0__formatDefault__[\"a\" /* default */],\n  \"%\": function(x, p) { return (x * 100).toFixed(p); },\n  \"b\": function(x) { return Math.round(x).toString(2); },\n  \"c\": function(x) { return x + \"\"; },\n  \"d\": function(x) { return Math.round(x).toString(10); },\n  \"e\": function(x, p) { return x.toExponential(p); },\n  \"f\": function(x, p) { return x.toFixed(p); },\n  \"g\": function(x, p) { return x.toPrecision(p); },\n  \"o\": function(x) { return Math.round(x).toString(8); },\n  \"p\": function(x, p) { return Object(__WEBPACK_IMPORTED_MODULE_2__formatRounded__[\"a\" /* default */])(x * 100, p); },\n  \"r\": __WEBPACK_IMPORTED_MODULE_2__formatRounded__[\"a\" /* default */],\n  \"s\": __WEBPACK_IMPORTED_MODULE_1__formatPrefixAuto__[\"a\" /* default */],\n  \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n  \"x\": function(x) { return Math.round(x).toString(16); }\n});\n\n\n/***/ }),\n/* 233 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prefixExponent; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal__ = __webpack_require__(122);\n\n\nvar prefixExponent;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x, p) {\n  var d = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal__[\"a\" /* default */])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal__[\"a\" /* default */])(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n});\n\n\n/***/ }),\n/* 234 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n});\n\n\n/***/ }),\n/* 235 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = calendar;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_time__ = __webpack_require__(123);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_time_format__ = __webpack_require__(236);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__array__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__continuous__ = __webpack_require__(76);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__nice__ = __webpack_require__(234);\n\n\n\n\n\n\n\n\nvar durationSecond = 1000,\n    durationMinute = durationSecond * 60,\n    durationHour = durationMinute * 60,\n    durationDay = durationHour * 24,\n    durationWeek = durationDay * 7,\n    durationMonth = durationDay * 30,\n    durationYear = durationDay * 365;\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nfunction calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n  var scale = Object(__WEBPACK_IMPORTED_MODULE_5__continuous__[\"b\" /* default */])(__WEBPACK_IMPORTED_MODULE_5__continuous__[\"c\" /* deinterpolateLinear */], __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateNumber */]),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  var tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  function tickInterval(interval, start, stop, step) {\n    if (interval == null) interval = 10;\n\n    // If a desired tick count is specified, pick a reasonable tick interval\n    // based on the extent of the domain and a rough estimate of tick size.\n    // Otherwise, assume interval is already a time interval and use it.\n    if (typeof interval === \"number\") {\n      var target = Math.abs(stop - start) / interval,\n          i = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"bisector\"])(function(i) { return i[2]; }).right(tickIntervals, target);\n      if (i === tickIntervals.length) {\n        step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickStep\"])(start / durationYear, stop / durationYear, interval);\n        interval = year;\n      } else if (i) {\n        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n        step = i[1];\n        interval = i[0];\n      } else {\n        step = Math.max(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickStep\"])(start, stop, interval), 1);\n        interval = millisecond;\n      }\n    }\n\n    return step == null ? interval : interval.every(step);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(__WEBPACK_IMPORTED_MODULE_4__array__[\"a\" /* map */].call(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval, step) {\n    var d = domain(),\n        t0 = d[0],\n        t1 = d[d.length - 1],\n        r = t1 < t0,\n        t;\n    if (r) t = t0, t0 = t1, t1 = t;\n    t = tickInterval(interval, t0, t1, step);\n    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n    return r ? t.reverse() : t;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval, step) {\n    var d = domain();\n    return (interval = tickInterval(interval, d[0], d[d.length - 1], step))\n        ? domain(Object(__WEBPACK_IMPORTED_MODULE_6__nice__[\"a\" /* default */])(d, interval))\n        : scale;\n  };\n\n  scale.copy = function() {\n    return Object(__WEBPACK_IMPORTED_MODULE_5__continuous__[\"a\" /* copy */])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n  };\n\n  return scale;\n}\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function() {\n  return calendar(__WEBPACK_IMPORTED_MODULE_2_d3_time__[\"k\" /* timeYear */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"f\" /* timeMonth */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"j\" /* timeWeek */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"a\" /* timeDay */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"b\" /* timeHour */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"d\" /* timeMinute */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"g\" /* timeSecond */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"c\" /* timeMillisecond */], __WEBPACK_IMPORTED_MODULE_3_d3_time_format__[\"a\" /* timeFormat */]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);\n});\n\n\n/***/ }),\n/* 236 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__ = __webpack_require__(124);\n/* unused harmony reexport timeFormatDefaultLocale */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__[\"a\"]; });\n/* unused harmony reexport timeParse */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_defaultLocale__[\"b\"]; });\n/* unused harmony reexport utcParse */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_locale__ = __webpack_require__(237);\n/* unused harmony reexport timeFormatLocale */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_isoFormat__ = __webpack_require__(238);\n/* unused harmony reexport isoFormat */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_isoParse__ = __webpack_require__(556);\n/* unused harmony reexport isoParse */\n\n\n\n\n\n\n/***/ }),\n/* 237 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = formatLocale;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_time__ = __webpack_require__(123);\n\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newYear(y) {\n  return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n}\n\nfunction formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, newDate) {\n    return function(string) {\n      var d = newYear(1900),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newYear(d.y)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"p\" /* utcMonday */].ceil(week) : Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"p\" /* utcMonday */])(week);\n          week = __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"l\" /* utcDay */].offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = newDate(newYear(d.y)), day = week.getDay();\n          week = day > 4 || day === 0 ? __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"e\" /* timeMonday */].ceil(week) : Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"e\" /* timeMonday */])(week);\n          week = __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"a\" /* timeDay */].offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return newDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", localDate);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier, utcDate);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {}, i = -1, n = names.length;\n  while (++i < n) map[names[i].toLowerCase()] = i;\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"a\" /* timeDay */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"k\" /* timeYear */])(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"h\" /* timeSunday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"k\" /* timeYear */])(d), d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"i\" /* timeThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"i\" /* timeThursday */].ceil(d);\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"i\" /* timeThursday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"k\" /* timeYear */])(d), d) + (Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"k\" /* timeYear */])(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"e\" /* timeMonday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"k\" /* timeYear */])(d), d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"l\" /* utcDay */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"v\" /* utcYear */])(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"s\" /* utcSunday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"v\" /* utcYear */])(d), d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"t\" /* utcThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__[\"t\" /* utcThursday */].ceil(d);\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"t\" /* utcThursday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"v\" /* utcYear */])(d), d) + (Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"v\" /* utcYear */])(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"p\" /* utcMonday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__[\"v\" /* utcYear */])(d), d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n\n\n/***/ }),\n/* 238 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isoSpecifier; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultLocale__ = __webpack_require__(124);\n\n\nvar isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : Object(__WEBPACK_IMPORTED_MODULE_0__defaultLocale__[\"b\" /* utcFormat */])(isoSpecifier);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (formatIso);\n\n\n/***/ }),\n/* 239 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return sin; });\n/* unused harmony export pi */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return max; });\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = pi * 2;\nvar max = Math.max;\n\n\n/***/ }),\n/* 240 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _defaultsDeep = __webpack_require__(125);\n\nvar _defaultsDeep2 = _interopRequireDefault(_defaultsDeep);\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _isArray = __webpack_require__(2);\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _map = __webpack_require__(144);\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _d3Selection = __webpack_require__(3);\n\nvar _d3Zoom = __webpack_require__(348);\n\nvar _index = __webpack_require__(403);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _render2 = __webpack_require__(420);\n\nvar _render3 = _interopRequireDefault(_render2);\n\nvar _Text = __webpack_require__(468);\n\nvar _Text2 = _interopRequireDefault(_Text);\n\nvar _Highlight = __webpack_require__(620);\n\nvar _Highlight2 = _interopRequireDefault(_Highlight);\n\nvar _Histogram = __webpack_require__(621);\n\nvar _Histogram2 = _interopRequireDefault(_Histogram);\n\nvar _Chords = __webpack_require__(622);\n\nvar _Chords2 = _interopRequireDefault(_Chords);\n\nvar _Heatmap = __webpack_require__(628);\n\nvar _Heatmap2 = _interopRequireDefault(_Heatmap);\n\nvar _Line = __webpack_require__(629);\n\nvar _Line2 = _interopRequireDefault(_Line);\n\nvar _Scatter = __webpack_require__(630);\n\nvar _Scatter2 = _interopRequireDefault(_Scatter);\n\nvar _Stack = __webpack_require__(631);\n\nvar _Stack2 = _interopRequireDefault(_Stack);\n\nvar _clipboard = __webpack_require__(632);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar defaultConf = {\n  width: 700,\n  height: 700,\n  container: 'circos',\n  defaultTrackWidth: 10\n};\n\nvar zoom_handler = (0, _d3Zoom.zoom)().scaleExtent([1, 2]).on(\"zoom\", function () {\n  (0, _d3Selection.select)('.all').attr(\"transform\", _d3Selection.event.transform);\n});\n\nfunction download_svg() {\n  if (document.getElementById('svg-child').hasChildNodes() === true) {\n    var circos_svg = document.getElementById('svg-child');\n    var svg_as_xml = new XMLSerializer().serializeToString(circos_svg);\n    var svg_data = 'data:image/svg+xml,' + encodeURIComponent(svg_as_xml);\n    var link = document.getElementById('download-link');\n    link.setAttribute(\"href\", svg_data);\n    link.setAttribute(\"download\", \"circos.svg\");\n    link.click();\n  }\n}\n\nvar Core = function () {\n  function Core(conf) {\n    _classCallCheck(this, Core);\n\n    this.tracks = {};\n    this._layout = null;\n    this.conf = (0, _defaultsDeep2.default)(conf, defaultConf);\n\n    // Apply style for positioning button\n    var container = (0, _d3Selection.select)(this.conf.container).style('position', 'relative');\n    this.svg = container.append('svg');\n    if (conf.enableZoomPan === true) {\n      // Apply zoom & pan handler\n      this.svg.attr('id', 'svg-child').call(zoom_handler);\n      this.svg.call(zoom_handler.transform, _d3Zoom.zoomIdentity.translate(conf.width / 2, conf.height / 2));\n\n      // Reset to center on dbl click\n      this.svg.on('dblclick.zoom', function () {\n        (0, _d3Selection.select)('#svg-child').call(zoom_handler.transform, _d3Zoom.zoomIdentity.translate(conf.width / 2, conf.height / 2));\n      });\n    }\n\n    if (conf.enableDownloadSVG === true) {\n      // Add svg download button\n      var button_svg = (0, _d3Selection.select)('#' + this.conf.container.id).append(\"button\").style('position', 'absolute').style('top', '5%').style('right', '5%').text(\"Download SVG\").attr(\"id\", \"button\").classed(\"Button\", true).on(\"click.button\", function () {\n        download_svg();\n      }).append('a').attr('id', 'download-link');\n    }\n\n    if ((0, _d3Selection.select)('body').select('.circos-tooltip').empty()) {\n      this.tip = (0, _d3Selection.select)('body').append('div').attr('class', 'circos-tooltip').style('position', 'fixed').style('opacity', 0);\n    } else {\n      this.tip = (0, _d3Selection.select)('body').select('.circos-tooltip');\n    }\n\n    this.clipboard = (0, _clipboard.initClipboard)(this.conf.container);\n  }\n\n  _createClass(Core, [{\n    key: 'removeToolTip',\n    value: function removeToolTip() {\n      this.tip.remove();\n    }\n  }, {\n    key: 'removeTracks',\n    value: function removeTracks(trackIds) {\n      var _this = this;\n\n      if (typeof trackIds === 'undefined') {\n        (0, _map2.default)(this.tracks, function (track, id) {\n          _this.svg.select('.' + id).remove();\n        });\n        this.tracks = {};\n      } else if (typeof trackIds === 'string') {\n        this.svg.select('.' + trackIds).remove();\n        delete this.tracks[trackIds];\n      } else if ((0, _isArray2.default)(trackIds)) {\n        (0, _forEach2.default)(trackIds, function (trackId) {\n          this.svg.select('.' + trackId).remove();\n          delete this.tracks[trackId];\n        });\n      } else {\n        console.warn('removeTracks received an unhandled attribute type');\n      }\n\n      return this;\n    }\n  }, {\n    key: 'layout',\n    value: function layout(data, conf) {\n      this._layout = new _index2.default(conf, data);\n      return this;\n    }\n  }, {\n    key: 'chords',\n    value: function chords(id, data, conf) {\n      this.tracks[id] = new _Chords2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'heatmap',\n    value: function heatmap(id, data, conf) {\n      this.tracks[id] = new _Heatmap2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'highlight',\n    value: function highlight(id, data, conf) {\n      this.tracks[id] = new _Highlight2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'histogram',\n    value: function histogram(id, data, conf) {\n      this.tracks[id] = new _Histogram2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'line',\n    value: function line(id, data, conf) {\n      this.tracks[id] = new _Line2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'scatter',\n    value: function scatter(id, data, conf) {\n      this.tracks[id] = new _Scatter2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'stack',\n    value: function stack(id, data, conf) {\n      this.tracks[id] = new _Stack2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'text',\n    value: function text(id, data, conf) {\n      this.tracks[id] = new _Text2.default(this, conf, data);\n      return this;\n    }\n  }, {\n    key: 'render',\n    value: function render(ids, removeTracks) {\n      (0, _render3.default)(ids, removeTracks, this);\n    }\n  }]);\n\n  return Core;\n}();\n\nvar Circos = function Circos(conf) {\n  var instance = new Core(conf);\n  return instance;\n};\n\nmodule.exports = Circos;\n\n/***/ }),\n/* 241 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar constant = __webpack_require__(242),\n    defineProperty = __webpack_require__(127),\n    identity = __webpack_require__(28);\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nmodule.exports = baseSetToString;\n\n\n/***/ }),\n/* 242 */\n/***/ (function(module, exports) {\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nmodule.exports = constant;\n\n\n/***/ }),\n/* 243 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isFunction = __webpack_require__(24),\n    isMasked = __webpack_require__(246),\n    isObject = __webpack_require__(7),\n    toSource = __webpack_require__(129);\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n/***/ }),\n/* 244 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n\n\n/***/ }),\n/* 245 */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n/***/ }),\n/* 246 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar coreJsData = __webpack_require__(247);\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n/***/ }),\n/* 247 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar root = __webpack_require__(5);\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n/***/ }),\n/* 248 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n/***/ }),\n/* 249 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseMerge = __webpack_require__(131),\n    isObject = __webpack_require__(7);\n\n/**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n  if (isObject(objValue) && isObject(srcValue)) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, objValue);\n    baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n    stack['delete'](srcValue);\n  }\n  return objValue;\n}\n\nmodule.exports = customDefaultsMerge;\n\n\n/***/ }),\n/* 250 */\n/***/ (function(module, exports) {\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n/***/ }),\n/* 251 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(53);\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n/***/ }),\n/* 252 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(53);\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n/***/ }),\n/* 253 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(53);\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n/***/ }),\n/* 254 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assocIndexOf = __webpack_require__(53);\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n/***/ }),\n/* 255 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(52);\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n/***/ }),\n/* 256 */\n/***/ (function(module, exports) {\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n\n\n/***/ }),\n/* 257 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n/***/ }),\n/* 258 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n/***/ }),\n/* 259 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ListCache = __webpack_require__(52),\n    Map = __webpack_require__(81),\n    MapCache = __webpack_require__(82);\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n\n\n/***/ }),\n/* 260 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Hash = __webpack_require__(261),\n    ListCache = __webpack_require__(52),\n    Map = __webpack_require__(81);\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n\n\n/***/ }),\n/* 261 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hashClear = __webpack_require__(262),\n    hashDelete = __webpack_require__(263),\n    hashGet = __webpack_require__(264),\n    hashHas = __webpack_require__(265),\n    hashSet = __webpack_require__(266);\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n/***/ }),\n/* 262 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(54);\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n/***/ }),\n/* 263 */\n/***/ (function(module, exports) {\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n\n\n/***/ }),\n/* 264 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(54);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n/***/ }),\n/* 265 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(54);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n/***/ }),\n/* 266 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar nativeCreate = __webpack_require__(54);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n\n\n/***/ }),\n/* 267 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(55);\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n/***/ }),\n/* 268 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n/***/ }),\n/* 269 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(55);\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n/***/ }),\n/* 270 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(55);\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n/***/ }),\n/* 271 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getMapData = __webpack_require__(55);\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n/***/ }),\n/* 272 */\n/***/ (function(module, exports) {\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createBaseFor;\n\n\n/***/ }),\n/* 273 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar assignMergeValue = __webpack_require__(132),\n    cloneBuffer = __webpack_require__(134),\n    cloneTypedArray = __webpack_require__(135),\n    copyArray = __webpack_require__(30),\n    initCloneObject = __webpack_require__(137),\n    isArguments = __webpack_require__(58),\n    isArray = __webpack_require__(2),\n    isArrayLikeObject = __webpack_require__(275),\n    isBuffer = __webpack_require__(59),\n    isFunction = __webpack_require__(24),\n    isObject = __webpack_require__(7),\n    isPlainObject = __webpack_require__(139),\n    isTypedArray = __webpack_require__(88),\n    safeGet = __webpack_require__(140),\n    toPlainObject = __webpack_require__(278);\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n\n\n/***/ }),\n/* 274 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n/***/ }),\n/* 275 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArrayLike = __webpack_require__(17),\n    isObjectLike = __webpack_require__(6);\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n\n\n/***/ }),\n/* 276 */\n/***/ (function(module, exports) {\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n\n\n/***/ }),\n/* 277 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isLength = __webpack_require__(87),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n/***/ }),\n/* 278 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(31),\n    keysIn = __webpack_require__(61);\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n\n\n/***/ }),\n/* 279 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n\n\n/***/ }),\n/* 280 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(7),\n    isPrototype = __webpack_require__(57),\n    nativeKeysIn = __webpack_require__(281);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeysIn;\n\n\n/***/ }),\n/* 281 */\n/***/ (function(module, exports) {\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = nativeKeysIn;\n\n\n/***/ }),\n/* 282 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseMerge = __webpack_require__(131),\n    createAssigner = __webpack_require__(142);\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n *   if (_.isArray(objValue)) {\n *     return objValue.concat(srcValue);\n *   }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n  baseMerge(object, source, srcIndex, customizer);\n});\n\nmodule.exports = mergeWith;\n\n\n/***/ }),\n/* 283 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFor = __webpack_require__(133),\n    keys = __webpack_require__(18);\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n\n/***/ }),\n/* 284 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar overArg = __webpack_require__(138);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n/***/ }),\n/* 285 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isArrayLike = __webpack_require__(17);\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n\n\n/***/ }),\n/* 286 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar identity = __webpack_require__(28);\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n  return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n\n\n/***/ }),\n/* 287 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsMatch = __webpack_require__(288),\n    getMatchData = __webpack_require__(302),\n    matchesStrictComparable = __webpack_require__(153);\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n\n\n/***/ }),\n/* 288 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(51),\n    baseIsEqual = __webpack_require__(145);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n/***/ }),\n/* 289 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Stack = __webpack_require__(51),\n    equalArrays = __webpack_require__(146),\n    equalByTag = __webpack_require__(295),\n    equalObjects = __webpack_require__(298),\n    getTag = __webpack_require__(41),\n    isArray = __webpack_require__(2),\n    isBuffer = __webpack_require__(59),\n    isTypedArray = __webpack_require__(88);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n/***/ }),\n/* 290 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar MapCache = __webpack_require__(82),\n    setCacheAdd = __webpack_require__(291),\n    setCacheHas = __webpack_require__(292);\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n/***/ }),\n/* 291 */\n/***/ (function(module, exports) {\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n/***/ }),\n/* 292 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n/***/ }),\n/* 293 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n\n\n/***/ }),\n/* 294 */\n/***/ (function(module, exports) {\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n/***/ }),\n/* 295 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29),\n    Uint8Array = __webpack_require__(136),\n    eq = __webpack_require__(38),\n    equalArrays = __webpack_require__(146),\n    mapToArray = __webpack_require__(296),\n    setToArray = __webpack_require__(297);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n\n\n/***/ }),\n/* 296 */\n/***/ (function(module, exports) {\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nmodule.exports = mapToArray;\n\n\n/***/ }),\n/* 297 */\n/***/ (function(module, exports) {\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n\n\n/***/ }),\n/* 298 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getAllKeys = __webpack_require__(147);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Assume cyclic values are equal.\n  var stacked = stack.get(object);\n  if (stacked && stack.get(other)) {\n    return stacked == other;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalObjects;\n\n\n/***/ }),\n/* 299 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23),\n    root = __webpack_require__(5);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n/***/ }),\n/* 300 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23),\n    root = __webpack_require__(5);\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n/***/ }),\n/* 301 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getNative = __webpack_require__(23),\n    root = __webpack_require__(5);\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n/***/ }),\n/* 302 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isStrictComparable = __webpack_require__(152),\n    keys = __webpack_require__(18);\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n\n\n/***/ }),\n/* 303 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsEqual = __webpack_require__(145),\n    get = __webpack_require__(304),\n    hasIn = __webpack_require__(308),\n    isKey = __webpack_require__(92),\n    isStrictComparable = __webpack_require__(152),\n    matchesStrictComparable = __webpack_require__(153),\n    toKey = __webpack_require__(42);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n/***/ }),\n/* 304 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGet = __webpack_require__(154);\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n/***/ }),\n/* 305 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar memoize = __webpack_require__(306);\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n/***/ }),\n/* 306 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar MapCache = __webpack_require__(82);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n/***/ }),\n/* 307 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29),\n    arrayMap = __webpack_require__(40),\n    isArray = __webpack_require__(2),\n    isSymbol = __webpack_require__(34);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n/***/ }),\n/* 308 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseHasIn = __webpack_require__(309),\n    hasPath = __webpack_require__(310);\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n/***/ }),\n/* 309 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n/***/ }),\n/* 310 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar castPath = __webpack_require__(155),\n    isArguments = __webpack_require__(58),\n    isArray = __webpack_require__(2),\n    isIndex = __webpack_require__(62),\n    isLength = __webpack_require__(87),\n    toKey = __webpack_require__(42);\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n/***/ }),\n/* 311 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseProperty = __webpack_require__(312),\n    basePropertyDeep = __webpack_require__(313),\n    isKey = __webpack_require__(92),\n    toKey = __webpack_require__(42);\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n/***/ }),\n/* 312 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n\n\n/***/ }),\n/* 313 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGet = __webpack_require__(154);\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n/***/ }),\n/* 314 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select__ = __webpack_require__(159);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  return Object(__WEBPACK_IMPORTED_MODULE_1__select__[\"a\" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__creator__[\"a\" /* default */])(name).call(document.documentElement));\n});\n\n\n/***/ }),\n/* 315 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selector__ = __webpack_require__(95);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(__WEBPACK_IMPORTED_MODULE_1__selector__[\"a\" /* default */])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](subgroups, this._parents);\n});\n\n\n/***/ }),\n/* 316 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectorAll__ = __webpack_require__(160);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(__WEBPACK_IMPORTED_MODULE_1__selectorAll__[\"a\" /* default */])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](subgroups, parents);\n});\n\n\n/***/ }),\n/* 317 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__matcher__ = __webpack_require__(161);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(__WEBPACK_IMPORTED_MODULE_1__matcher__[\"a\" /* default */])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](subgroups, this._parents);\n});\n\n\n/***/ }),\n/* 318 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enter__ = __webpack_require__(162);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(319);\n\n\n\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new __WEBPACK_IMPORTED_MODULE_1__enter__[\"a\" /* EnterNode */](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new __WEBPACK_IMPORTED_MODULE_1__enter__[\"a\" /* EnterNode */](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n\n/***/ }),\n/* 319 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 320 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sparse__ = __webpack_require__(163);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(11);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return new __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* Selection */](this._exit || this._groups.map(__WEBPACK_IMPORTED_MODULE_0__sparse__[\"a\" /* default */]), this._parents);\n});\n\n\n/***/ }),\n/* 321 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](merges, this._parents);\n});\n\n\n/***/ }),\n/* 322 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n/* 323 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(11);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Selection */](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n/***/ }),\n/* 324 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n/***/ }),\n/* 325 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n});\n\n\n/***/ }),\n/* 326 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n/* 327 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n});\n\n\n/***/ }),\n/* 328 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return !this.node();\n});\n\n\n/***/ }),\n/* 329 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n/***/ }),\n/* 330 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespace__ = __webpack_require__(93);\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0__namespace__[\"a\" /* default */])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n/***/ }),\n/* 331 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n/***/ }),\n/* 332 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n/***/ }),\n/* 333 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n/***/ }),\n/* 334 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n/***/ }),\n/* 335 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return this.each(raise);\n});\n\n\n/***/ }),\n/* 336 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return this.each(lower);\n});\n\n\n/***/ }),\n/* 337 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(66);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(__WEBPACK_IMPORTED_MODULE_0__creator__[\"a\" /* default */])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n/***/ }),\n/* 338 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selector__ = __webpack_require__(95);\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(__WEBPACK_IMPORTED_MODULE_0__creator__[\"a\" /* default */])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(__WEBPACK_IMPORTED_MODULE_1__selector__[\"a\" /* default */])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n/***/ }),\n/* 339 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return this.each(remove);\n});\n\n\n/***/ }),\n/* 340 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction selection_cloneShallow() {\n  return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n  return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n/***/ }),\n/* 341 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n/***/ }),\n/* 342 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__window__ = __webpack_require__(96);\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(__WEBPACK_IMPORTED_MODULE_0__window__[\"a\" /* default */])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n/***/ }),\n/* 343 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = local;\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n/***/ }),\n/* 344 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(98);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(67);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node) {\n  var event = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__[\"a\" /* default */])();\n  if (event.changedTouches) event = event.changedTouches[0];\n  return Object(__WEBPACK_IMPORTED_MODULE_1__point__[\"a\" /* default */])(node, event);\n});\n\n\n/***/ }),\n/* 345 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_index__ = __webpack_require__(11);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"a\" /* Selection */]([document.querySelectorAll(selector)], [document.documentElement])\n      : new __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"a\" /* Selection */]([selector == null ? [] : selector], __WEBPACK_IMPORTED_MODULE_0__selection_index__[\"c\" /* root */]);\n});\n\n\n/***/ }),\n/* 346 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(98);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(67);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node, touches, identifier) {\n  if (arguments.length < 3) identifier = touches, touches = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__[\"a\" /* default */])().changedTouches;\n\n  for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n    if ((touch = touches[i]).identifier === identifier) {\n      return Object(__WEBPACK_IMPORTED_MODULE_1__point__[\"a\" /* default */])(node, touch);\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n/* 347 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(98);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(67);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node, touches) {\n  if (touches == null) touches = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__[\"a\" /* default */])().touches;\n\n  for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {\n    points[i] = Object(__WEBPACK_IMPORTED_MODULE_1__point__[\"a\" /* default */])(node, touches[i]);\n  }\n\n  return points;\n});\n\n\n/***/ }),\n/* 348 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__zoom__ = __webpack_require__(349);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return __WEBPACK_IMPORTED_MODULE_0__zoom__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transform__ = __webpack_require__(179);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return __WEBPACK_IMPORTED_MODULE_1__transform__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return __WEBPACK_IMPORTED_MODULE_1__transform__[\"c\"]; });\n\n\n\n\n/***/ }),\n/* 349 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_drag__ = __webpack_require__(351);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_transition__ = __webpack_require__(175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constant__ = __webpack_require__(400);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__event__ = __webpack_require__(401);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__transform__ = __webpack_require__(179);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__noevent__ = __webpack_require__(402);\n\n\n\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var e = this, w, h;\n  if (e instanceof SVGElement) {\n    e = e.ownerSVGElement || e;\n    w = e.width.baseVal.value;\n    h = e.height.baseVal.value;\n  } else {\n    w = e.clientWidth;\n    h = e.clientHeight;\n  }\n  return [[0, 0], [w, h]];\n}\n\nfunction defaultTransform() {\n  return this.__zoom || __WEBPACK_IMPORTED_MODULE_7__transform__[\"c\" /* identity */];\n}\n\nfunction defaultWheelDelta() {\n  return -__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].deltaY * (__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].deltaMode ? 120 : 1) / 500;\n}\n\nfunction defaultTouchable() {\n  return \"ontouchstart\" in this;\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n  return transform.translate(\n    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n  );\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var filter = defaultFilter,\n      extent = defaultExtent,\n      constrain = defaultConstrain,\n      wheelDelta = defaultWheelDelta,\n      touchable = defaultTouchable,\n      scaleExtent = [0, Infinity],\n      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n      duration = 250,\n      interpolate = __WEBPACK_IMPORTED_MODULE_2_d3_interpolate__[\"j\" /* interpolateZoom */],\n      gestures = [],\n      listeners = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__[\"dispatch\"])(\"start\", \"zoom\", \"end\"),\n      touchstarting,\n      touchending,\n      touchDelay = 500,\n      wheelDelay = 150,\n      clickDistance2 = 0;\n\n  function zoom(selection) {\n    selection\n        .property(\"__zoom\", defaultTransform)\n        .on(\"wheel.zoom\", wheeled)\n        .on(\"mousedown.zoom\", mousedowned)\n        .on(\"dblclick.zoom\", dblclicked)\n      .filter(touchable)\n        .on(\"touchstart.zoom\", touchstarted)\n        .on(\"touchmove.zoom\", touchmoved)\n        .on(\"touchend.zoom touchcancel.zoom\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  zoom.transform = function(collection, transform) {\n    var selection = collection.selection ? collection.selection() : collection;\n    selection.property(\"__zoom\", defaultTransform);\n    if (collection !== selection) {\n      schedule(collection, transform);\n    } else {\n      selection.interrupt().each(function() {\n        gesture(this, arguments)\n            .start()\n            .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n            .end();\n      });\n    }\n  };\n\n  zoom.scaleBy = function(selection, k) {\n    zoom.scaleTo(selection, function() {\n      var k0 = this.__zoom.k,\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return k0 * k1;\n    });\n  };\n\n  zoom.scaleTo = function(selection, k) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t0 = this.__zoom,\n          p0 = centroid(e),\n          p1 = t0.invert(p0),\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n    });\n  };\n\n  zoom.translateBy = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      return constrain(this.__zoom.translate(\n        typeof x === \"function\" ? x.apply(this, arguments) : x,\n        typeof y === \"function\" ? y.apply(this, arguments) : y\n      ), extent.apply(this, arguments), translateExtent);\n    });\n  };\n\n  zoom.translateTo = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t = this.__zoom,\n          p = centroid(e);\n      return constrain(__WEBPACK_IMPORTED_MODULE_7__transform__[\"c\" /* identity */].translate(p[0], p[1]).scale(t.k).translate(\n        typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n        typeof y === \"function\" ? -y.apply(this, arguments) : -y\n      ), e, translateExtent);\n    });\n  };\n\n  function scale(transform, k) {\n    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n    return k === transform.k ? transform : new __WEBPACK_IMPORTED_MODULE_7__transform__[\"a\" /* Transform */](k, transform.x, transform.y);\n  }\n\n  function translate(transform, p0, p1) {\n    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n    return x === transform.x && y === transform.y ? transform : new __WEBPACK_IMPORTED_MODULE_7__transform__[\"a\" /* Transform */](transform.k, x, y);\n  }\n\n  function centroid(extent) {\n    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n  }\n\n  function schedule(transition, transform, center) {\n    transition\n        .on(\"start.zoom\", function() { gesture(this, arguments).start(); })\n        .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).end(); })\n        .tween(\"zoom\", function() {\n          var that = this,\n              args = arguments,\n              g = gesture(that, args),\n              e = extent.apply(that, args),\n              p = center || centroid(e),\n              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n              a = that.__zoom,\n              b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n          return function(t) {\n            if (t === 1) t = b; // Avoid rounding error on end.\n            else { var l = i(t), k = w / l[2]; t = new __WEBPACK_IMPORTED_MODULE_7__transform__[\"a\" /* Transform */](k, p[0] - l[0] * k, p[1] - l[1] * k); }\n            g.zoom(null, t);\n          };\n        });\n  }\n\n  function gesture(that, args) {\n    for (var i = 0, n = gestures.length, g; i < n; ++i) {\n      if ((g = gestures[i]).that === that) {\n        return g;\n      }\n    }\n    return new Gesture(that, args);\n  }\n\n  function Gesture(that, args) {\n    this.that = that;\n    this.args = args;\n    this.index = -1;\n    this.active = 0;\n    this.extent = extent.apply(that, args);\n  }\n\n  Gesture.prototype = {\n    start: function() {\n      if (++this.active === 1) {\n        this.index = gestures.push(this) - 1;\n        this.emit(\"start\");\n      }\n      return this;\n    },\n    zoom: function(key, transform) {\n      if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n      if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n      if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n      this.that.__zoom = transform;\n      this.emit(\"zoom\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) {\n        gestures.splice(this.index, 1);\n        this.index = -1;\n        this.emit(\"end\");\n      }\n      return this;\n    },\n    emit: function(type) {\n      Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"customEvent\"])(new __WEBPACK_IMPORTED_MODULE_6__event__[\"a\" /* default */](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function wheeled() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        t = this.__zoom,\n        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n        p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"mouse\"])(this);\n\n    // If the mouse is in the same location as before, reuse it.\n    // If there were recent wheel events, reset the wheel idle timeout.\n    if (g.wheel) {\n      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n        g.mouse[1] = t.invert(g.mouse[0] = p);\n      }\n      clearTimeout(g.wheel);\n    }\n\n    // If this wheel event won’t trigger a transform change, ignore it.\n    else if (t.k === k) return;\n\n    // Otherwise, capture the mouse point and location at the start.\n    else {\n      g.mouse = [p, t.invert(p)];\n      Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__[\"interrupt\"])(this);\n      g.start();\n    }\n\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"a\" /* default */])();\n    g.wheel = setTimeout(wheelidled, wheelDelay);\n    g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n    function wheelidled() {\n      g.wheel = null;\n      g.end();\n    }\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        v = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"select\"])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n        p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"mouse\"])(this),\n        x0 = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].clientX,\n        y0 = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].clientY;\n\n    Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__[\"a\" /* dragDisable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].view);\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"b\" /* nopropagation */])();\n    g.mouse = [p, this.__zoom.invert(p)];\n    Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__[\"interrupt\"])(this);\n    g.start();\n\n    function mousemoved() {\n      Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"a\" /* default */])();\n      if (!g.moved) {\n        var dx = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].clientX - x0, dy = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].clientY - y0;\n        g.moved = dx * dx + dy * dy > clickDistance2;\n      }\n      g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"mouse\"])(g.that), g.mouse[1]), g.extent, translateExtent));\n    }\n\n    function mouseupped() {\n      v.on(\"mousemove.zoom mouseup.zoom\", null);\n      Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__[\"b\" /* dragEnable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].view, g.moved);\n      Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"a\" /* default */])();\n      g.end();\n    }\n  }\n\n  function dblclicked() {\n    if (!filter.apply(this, arguments)) return;\n    var t0 = this.__zoom,\n        p0 = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"mouse\"])(this),\n        p1 = t0.invert(p0),\n        k1 = t0.k * (__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].shiftKey ? 0.5 : 2),\n        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"a\" /* default */])();\n    if (duration > 0) Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"select\"])(this).transition().duration(duration).call(schedule, t1, p0);\n    else Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"select\"])(this).call(zoom.transform, t1);\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].changedTouches,\n        started,\n        n = touches.length, i, t, p;\n\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"b\" /* nopropagation */])();\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"touch\"])(this, touches, t.identifier);\n      p = [p, this.__zoom.invert(p), t.identifier];\n      if (!g.touch0) g.touch0 = p, started = true;\n      else if (!g.touch1) g.touch1 = p;\n    }\n\n    // If this is a dbltap, reroute to the (optional) dblclick.zoom handler.\n    if (touchstarting) {\n      touchstarting = clearTimeout(touchstarting);\n      if (!g.touch1) {\n        g.end();\n        p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"select\"])(this).on(\"dblclick.zoom\");\n        if (p) p.apply(this, arguments);\n        return;\n      }\n    }\n\n    if (started) {\n      touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n      Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__[\"interrupt\"])(this);\n      g.start();\n    }\n  }\n\n  function touchmoved() {\n    var g = gesture(this, arguments),\n        touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].changedTouches,\n        n = touches.length, i, t, p, l;\n\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"a\" /* default */])();\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"touch\"])(this, touches, t.identifier);\n      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n    }\n    t = g.that.__zoom;\n    if (g.touch1) {\n      var p0 = g.touch0[0], l0 = g.touch0[1],\n          p1 = g.touch1[0], l1 = g.touch1[1],\n          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n      t = scale(t, Math.sqrt(dp / dl));\n      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n    }\n    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n    else return;\n    g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n  }\n\n  function touchended() {\n    var g = gesture(this, arguments),\n        touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__[\"event\"].changedTouches,\n        n = touches.length, i, t;\n\n    Object(__WEBPACK_IMPORTED_MODULE_8__noevent__[\"b\" /* nopropagation */])();\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, touchDelay);\n    for (i = 0; i < n; ++i) {\n      t = touches[i];\n      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n    }\n    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n    else g.end();\n  }\n\n  zoom.wheelDelta = function(_) {\n    return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant__[\"a\" /* default */])(+_), zoom) : wheelDelta;\n  };\n\n  zoom.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant__[\"a\" /* default */])(!!_), zoom) : filter;\n  };\n\n  zoom.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant__[\"a\" /* default */])(!!_), zoom) : touchable;\n  };\n\n  zoom.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant__[\"a\" /* default */])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n  };\n\n  zoom.scaleExtent = function(_) {\n    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n  };\n\n  zoom.translateExtent = function(_) {\n    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n  };\n\n  zoom.constrain = function(_) {\n    return arguments.length ? (constrain = _, zoom) : constrain;\n  };\n\n  zoom.duration = function(_) {\n    return arguments.length ? (duration = +_, zoom) : duration;\n  };\n\n  zoom.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, zoom) : interpolate;\n  };\n\n  zoom.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? zoom : value;\n  };\n\n  zoom.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n  };\n\n  return zoom;\n});\n\n\n/***/ }),\n/* 350 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (dispatch);\n\n\n/***/ }),\n/* 351 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_drag__ = __webpack_require__(352);\n/* unused harmony reexport drag */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_nodrag__ = __webpack_require__(165);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_nodrag__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_nodrag__[\"b\"]; });\n\n\n\n\n/***/ }),\n/* 352 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodrag__ = __webpack_require__(165);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__noevent__ = __webpack_require__(166);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constant__ = __webpack_require__(353);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__event__ = __webpack_require__(354);\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n  return d == null ? {x: __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].x, y: __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].y} : d;\n}\n\nfunction defaultTouchable() {\n  return \"ontouchstart\" in this;\n}\n\n/* unused harmony default export */ var _unused_webpack_default_export = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved)\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var gesture = beforestart(\"mouse\", container.apply(this, arguments), __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"mouse\"], this, arguments);\n    if (!gesture) return;\n    Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"select\"])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n    Object(__WEBPACK_IMPORTED_MODULE_2__nodrag__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].view);\n    Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"b\" /* nopropagation */])();\n    mousemoving = false;\n    mousedownx = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].clientX;\n    mousedowny = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].clientY;\n    gesture(\"start\");\n  }\n\n  function mousemoved() {\n    Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"a\" /* default */])();\n    if (!mousemoving) {\n      var dx = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].clientX - mousedownx, dy = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\");\n  }\n\n  function mouseupped() {\n    Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"select\"])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(__WEBPACK_IMPORTED_MODULE_2__nodrag__[\"b\" /* yesdrag */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].view, mousemoving);\n    Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"a\" /* default */])();\n    gestures.mouse(\"end\");\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].changedTouches,\n        c = container.apply(this, arguments),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(touches[i].identifier, c, __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"touch\"], this, arguments)) {\n        Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"b\" /* nopropagation */])();\n        gesture(\"start\");\n      }\n    }\n  }\n\n  function touchmoved() {\n    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"a\" /* default */])();\n        gesture(\"drag\");\n      }\n    }\n  }\n\n  function touchended() {\n    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(__WEBPACK_IMPORTED_MODULE_3__noevent__[\"b\" /* nopropagation */])();\n        gesture(\"end\");\n      }\n    }\n  }\n\n  function beforestart(id, container, point, that, args) {\n    var p = point(container, id), s, dx, dy,\n        sublisteners = listeners.copy();\n\n    if (!Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"customEvent\"])(new __WEBPACK_IMPORTED_MODULE_5__event__[\"a\" /* default */](drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n      if ((__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"event\"].subject = s = subject.apply(that, args)) == null) return false;\n      dx = s.x - p[0] || 0;\n      dy = s.y - p[1] || 0;\n      return true;\n    })) return;\n\n    return function gesture(type) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[id] = gesture, n = active++; break;\n        case \"end\": delete gestures[id], --active; // nobreak\n        case \"drag\": p = point(container, id), n = active; break;\n      }\n      Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"customEvent\"])(new __WEBPACK_IMPORTED_MODULE_5__event__[\"a\" /* default */](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant__[\"a\" /* default */])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant__[\"a\" /* default */])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant__[\"a\" /* default */])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant__[\"a\" /* default */])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n/***/ }),\n/* 353 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 354 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = DragEvent;\nfunction DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n  this.target = target;\n  this.type = type;\n  this.subject = subject;\n  this.identifier = id;\n  this.active = active;\n  this.x = x;\n  this.y = y;\n  this.dx = dx;\n  this.dy = dy;\n  this._ = dispatch;\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n/***/ }),\n/* 355 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = lab;\n/* unused harmony export Lab */\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = hcl;\n/* unused harmony export Hcl */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define__ = __webpack_require__(101);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(100);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math__ = __webpack_require__(167);\n\n\n\n\nvar Kn = 18,\n    Xn = 0.950470, // D65 standard referent\n    Yn = 1,\n    Zn = 1.088830,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) {\n    var h = o.h * __WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* deg2rad */];\n    return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n  }\n  if (!(o instanceof __WEBPACK_IMPORTED_MODULE_1__color__[\"b\" /* Rgb */])) o = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"h\" /* rgbConvert */])(o);\n  var b = rgb2xyz(o.r),\n      a = rgb2xyz(o.g),\n      l = rgb2xyz(o.b),\n      x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n      y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n      z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Lab, lab, Object(__WEBPACK_IMPORTED_MODULE_0__define__[\"b\" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* Color */], {\n  brighter: function(k) {\n    return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new __WEBPACK_IMPORTED_MODULE_1__color__[\"b\" /* Rgb */](\n      xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n      xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n      xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  var h = Math.atan2(o.b, o.a) * __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* rad2deg */];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Hcl, hcl, Object(__WEBPACK_IMPORTED_MODULE_0__define__[\"b\" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* Color */], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return labConvert(this).rgb();\n  }\n}));\n\n\n/***/ }),\n/* 356 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = cubehelix;\n/* unused harmony export Cubehelix */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define__ = __webpack_require__(101);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(100);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math__ = __webpack_require__(167);\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof __WEBPACK_IMPORTED_MODULE_1__color__[\"b\" /* Rgb */])) o = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"h\" /* rgbConvert */])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* rad2deg */] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_0__define__[\"a\" /* default */])(Cubehelix, cubehelix, Object(__WEBPACK_IMPORTED_MODULE_0__define__[\"b\" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* Color */], {\n  brighter: function(k) {\n    k = k == null ? __WEBPACK_IMPORTED_MODULE_1__color__[\"c\" /* brighter */] : Math.pow(__WEBPACK_IMPORTED_MODULE_1__color__[\"c\" /* brighter */], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? __WEBPACK_IMPORTED_MODULE_1__color__[\"d\" /* darker */] : Math.pow(__WEBPACK_IMPORTED_MODULE_1__color__[\"d\" /* darker */], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * __WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* deg2rad */],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new __WEBPACK_IMPORTED_MODULE_1__color__[\"b\" /* Rgb */](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n/***/ }),\n/* 357 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return Math.round(a + b * t);\n  };\n});\n\n\n/***/ }),\n/* 358 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return interpolateTransformSvg; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__parse__ = __webpack_require__(359);\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(xa, xb)}, {i: i - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(xa, xb)}, {i: i - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(__WEBPACK_IMPORTED_MODULE_1__parse__[\"a\" /* parseCss */], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(__WEBPACK_IMPORTED_MODULE_1__parse__[\"b\" /* parseSvg */], \", \", \")\", \")\");\n\n\n/***/ }),\n/* 359 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = parseCss;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = parseSvg;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__decompose__ = __webpack_require__(360);\n\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nfunction parseCss(value) {\n  if (value === \"none\") return __WEBPACK_IMPORTED_MODULE_0__decompose__[\"b\" /* identity */];\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return Object(__WEBPACK_IMPORTED_MODULE_0__decompose__[\"a\" /* default */])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return __WEBPACK_IMPORTED_MODULE_0__decompose__[\"b\" /* identity */];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return __WEBPACK_IMPORTED_MODULE_0__decompose__[\"b\" /* identity */];\n  value = value.matrix;\n  return Object(__WEBPACK_IMPORTED_MODULE_0__decompose__[\"a\" /* default */])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n/***/ }),\n/* 360 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n/***/ }),\n/* 361 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar rho = Math.SQRT2,\n    rho2 = 2,\n    rho4 = 4,\n    epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(p0, p1) {\n  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n      dx = ux1 - ux0,\n      dy = uy1 - uy0,\n      d2 = dx * dx + dy * dy,\n      i,\n      S;\n\n  // Special case for u0 ≅ u1.\n  if (d2 < epsilon2) {\n    S = Math.log(w1 / w0) / rho;\n    i = function(t) {\n      return [\n        ux0 + t * dx,\n        uy0 + t * dy,\n        w0 * Math.exp(rho * t * S)\n      ];\n    }\n  }\n\n  // General case.\n  else {\n    var d1 = Math.sqrt(d2),\n        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n    S = (r1 - r0) / rho;\n    i = function(t) {\n      var s = t * S,\n          coshr0 = cosh(r0),\n          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n      return [\n        ux0 + u * dx,\n        uy0 + u * dy,\n        w0 * coshr0 / cosh(rho * s + r0)\n      ];\n    }\n  }\n\n  i.duration = S * 1000;\n\n  return i;\n});\n\n\n/***/ }),\n/* 362 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export hslLong */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(43);\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"d\" /* hsl */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"d\" /* hsl */])(end)).h),\n        s = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.s, end.s),\n        l = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n        opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* unused harmony default export */ var _unused_webpack_default_export = (hsl(__WEBPACK_IMPORTED_MODULE_1__color__[\"c\" /* hue */]));\nvar hslLong = hsl(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */]);\n\n\n/***/ }),\n/* 363 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export default */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(43);\n\n\n\nfunction lab(start, end) {\n  var l = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"e\" /* lab */])(start)).l, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"e\" /* lab */])(end)).l),\n      a = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.a, end.a),\n      b = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.b, end.b),\n      opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n/***/ }),\n/* 364 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export hclLong */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(43);\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"c\" /* hcl */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"c\" /* hcl */])(end)).h),\n        c = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.c, end.c),\n        l = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n        opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* unused harmony default export */ var _unused_webpack_default_export = (hcl(__WEBPACK_IMPORTED_MODULE_1__color__[\"c\" /* hue */]));\nvar hclLong = hcl(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */]);\n\n\n/***/ }),\n/* 365 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cubehelixLong; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color__ = __webpack_require__(43);\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(end)).h),\n          s = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.s, end.s),\n          l = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n          opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* unused harmony default export */ var _unused_webpack_default_export = (cubehelix(__WEBPACK_IMPORTED_MODULE_1__color__[\"c\" /* hue */]));\nvar cubehelixLong = cubehelix(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */]);\n\n\n/***/ }),\n/* 366 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony default export */ var _unused_webpack_default_export = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n/***/ }),\n/* 367 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__interrupt__ = __webpack_require__(368);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__transition__ = __webpack_require__(371);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selection\"].prototype.interrupt = __WEBPACK_IMPORTED_MODULE_1__interrupt__[\"a\" /* default */];\n__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selection\"].prototype.transition = __WEBPACK_IMPORTED_MODULE_2__transition__[\"a\" /* default */];\n\n\n/***/ }),\n/* 368 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interrupt__ = __webpack_require__(176);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  return this.each(function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__interrupt__[\"a\" /* default */])(this, name);\n  });\n});\n\n\n/***/ }),\n/* 369 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__timer__ = __webpack_require__(103);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(callback, delay, time) {\n  var t = new __WEBPACK_IMPORTED_MODULE_0__timer__[\"a\" /* Timer */];\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n/* 370 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__timer__ = __webpack_require__(103);\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (function(callback, delay, time) {\n  var t = new __WEBPACK_IMPORTED_MODULE_0__timer__[\"a\" /* Timer */], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  delay = +delay, time = time == null ? Object(__WEBPACK_IMPORTED_MODULE_0__timer__[\"b\" /* now */])() : +time;\n  t.restart(function tick(elapsed) {\n    elapsed += total;\n    t.restart(tick, total += delay, time);\n    callback(elapsed);\n  }, delay, time);\n  return t;\n});\n\n\n/***/ }),\n/* 371 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_index__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transition_schedule__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_ease__ = __webpack_require__(388);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_timer__ = __webpack_require__(177);\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: __WEBPACK_IMPORTED_MODULE_2_d3_ease__[\"a\" /* easeCubicInOut */]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      return defaultTiming.time = Object(__WEBPACK_IMPORTED_MODULE_3_d3_timer__[\"a\" /* now */])(), defaultTiming;\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof __WEBPACK_IMPORTED_MODULE_0__transition_index__[\"a\" /* Transition */]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(__WEBPACK_IMPORTED_MODULE_0__transition_index__[\"c\" /* newId */])(), (timing = defaultTiming).time = Object(__WEBPACK_IMPORTED_MODULE_3_d3_timer__[\"a\" /* now */])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(__WEBPACK_IMPORTED_MODULE_1__transition_schedule__[\"e\" /* default */])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__transition_index__[\"a\" /* Transition */](groups, this._parents, name, id);\n});\n\n\n/***/ }),\n/* 372 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tween__ = __webpack_require__(70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__interpolate__ = __webpack_require__(178);\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttribute(name);\n    value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  var fullname = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"namespace\"])(name), i = fullname === \"transform\" ? __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__[\"i\" /* interpolateTransformSvg */] : __WEBPACK_IMPORTED_MODULE_3__interpolate__[\"a\" /* default */];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(__WEBPACK_IMPORTED_MODULE_2__tween__[\"b\" /* tweenValue */])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + \"\"));\n});\n\n\n/***/ }),\n/* 373 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n\n\nfunction attrTweenNS(fullname, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttributeNS(fullname.space, fullname.local, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttribute(name, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n/***/ }),\n/* 374 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule__ = __webpack_require__(12);\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"g\" /* init */])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"g\" /* init */])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(this.node(), id).delay;\n});\n\n\n/***/ }),\n/* 375 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule__ = __webpack_require__(12);\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(this.node(), id).duration;\n});\n\n\n/***/ }),\n/* 376 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule__ = __webpack_require__(12);\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(this.node(), id).ease;\n});\n\n\n/***/ }),\n/* 377 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(19);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* Transition */](subgroups, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n/* 378 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(19);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Transition */](merges, this._parents, this._name, this._id);\n});\n\n\n/***/ }),\n/* 379 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule__ = __webpack_require__(12);\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? __WEBPACK_IMPORTED_MODULE_0__schedule__[\"g\" /* init */] : __WEBPACK_IMPORTED_MODULE_0__schedule__[\"h\" /* set */];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(__WEBPACK_IMPORTED_MODULE_0__schedule__[\"f\" /* get */])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n/***/ }),\n/* 380 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n/***/ }),\n/* 381 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__schedule__ = __webpack_require__(12);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(__WEBPACK_IMPORTED_MODULE_2__schedule__[\"e\" /* default */])(subgroup[i], name, id, i, subgroup, Object(__WEBPACK_IMPORTED_MODULE_2__schedule__[\"f\" /* get */])(node, id));\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* Transition */](subgroups, this._parents, name, id);\n});\n\n\n/***/ }),\n/* 382 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__schedule__ = __webpack_require__(12);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(__WEBPACK_IMPORTED_MODULE_2__schedule__[\"f\" /* get */])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(__WEBPACK_IMPORTED_MODULE_2__schedule__[\"e\" /* default */])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* Transition */](subgroups, parents, name, id);\n});\n\n\n/***/ }),\n/* 383 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n\n\nvar Selection = __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n/***/ }),\n/* 384 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tween__ = __webpack_require__(70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__interpolate__ = __webpack_require__(178);\n\n\n\n\n\nfunction styleRemove(name, interpolate) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"style\"])(this, name),\n        value1 = (this.style.removeProperty(name), Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"style\"])(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction styleRemoveEnd(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"style\"])(this, name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"style\"])(this, name),\n        value1 = value(this);\n    if (value1 == null) value1 = (this.style.removeProperty(name), Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__[\"style\"])(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__[\"h\" /* interpolateTransformCss */] : __WEBPACK_IMPORTED_MODULE_3__interpolate__[\"a\" /* default */];\n  return value == null ? this\n          .styleTween(name, styleRemove(name, i))\n          .on(\"end.style.\" + name, styleRemoveEnd(name))\n      : this.styleTween(name, typeof value === \"function\"\n          ? styleFunction(name, i, Object(__WEBPACK_IMPORTED_MODULE_2__tween__[\"b\" /* tweenValue */])(this, \"style.\" + name, value))\n          : styleConstant(name, i, value + \"\"), priority);\n});\n\n\n/***/ }),\n/* 385 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction styleTween(name, value, priority) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.style.setProperty(name, i(t), priority);\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n/***/ }),\n/* 386 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tween__ = __webpack_require__(70);\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(__WEBPACK_IMPORTED_MODULE_0__tween__[\"b\" /* tweenValue */])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n/***/ }),\n/* 387 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__schedule__ = __webpack_require__(12);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(__WEBPACK_IMPORTED_MODULE_0__index__[\"c\" /* newId */])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(__WEBPACK_IMPORTED_MODULE_1__schedule__[\"f\" /* get */])(node, id0);\n        Object(__WEBPACK_IMPORTED_MODULE_1__schedule__[\"e\" /* default */])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new __WEBPACK_IMPORTED_MODULE_0__index__[\"a\" /* Transition */](groups, this._parents, name, id1);\n});\n\n\n/***/ }),\n/* 388 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_linear__ = __webpack_require__(389);\n/* unused harmony reexport easeLinear */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_quad__ = __webpack_require__(390);\n/* unused harmony reexport easeQuad */\n/* unused harmony reexport easeQuadIn */\n/* unused harmony reexport easeQuadOut */\n/* unused harmony reexport easeQuadInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_cubic__ = __webpack_require__(391);\n/* unused harmony reexport easeCubic */\n/* unused harmony reexport easeCubicIn */\n/* unused harmony reexport easeCubicOut */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_cubic__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_poly__ = __webpack_require__(392);\n/* unused harmony reexport easePoly */\n/* unused harmony reexport easePolyIn */\n/* unused harmony reexport easePolyOut */\n/* unused harmony reexport easePolyInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_sin__ = __webpack_require__(393);\n/* unused harmony reexport easeSin */\n/* unused harmony reexport easeSinIn */\n/* unused harmony reexport easeSinOut */\n/* unused harmony reexport easeSinInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_exp__ = __webpack_require__(394);\n/* unused harmony reexport easeExp */\n/* unused harmony reexport easeExpIn */\n/* unused harmony reexport easeExpOut */\n/* unused harmony reexport easeExpInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_circle__ = __webpack_require__(395);\n/* unused harmony reexport easeCircle */\n/* unused harmony reexport easeCircleIn */\n/* unused harmony reexport easeCircleOut */\n/* unused harmony reexport easeCircleInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_bounce__ = __webpack_require__(396);\n/* unused harmony reexport easeBounce */\n/* unused harmony reexport easeBounceIn */\n/* unused harmony reexport easeBounceOut */\n/* unused harmony reexport easeBounceInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_back__ = __webpack_require__(397);\n/* unused harmony reexport easeBack */\n/* unused harmony reexport easeBackIn */\n/* unused harmony reexport easeBackOut */\n/* unused harmony reexport easeBackInOut */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_elastic__ = __webpack_require__(398);\n/* unused harmony reexport easeElastic */\n/* unused harmony reexport easeElasticIn */\n/* unused harmony reexport easeElasticOut */\n/* unused harmony reexport easeElasticInOut */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 389 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export linear */\nfunction linear(t) {\n  return +t;\n}\n\n\n/***/ }),\n/* 390 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export quadIn */\n/* unused harmony export quadOut */\n/* unused harmony export quadInOut */\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n/***/ }),\n/* 391 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export cubicIn */\n/* unused harmony export cubicOut */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = cubicInOut;\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n/***/ }),\n/* 392 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export polyIn */\n/* unused harmony export polyOut */\n/* unused harmony export polyInOut */\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n/***/ }),\n/* 393 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export sinIn */\n/* unused harmony export sinOut */\n/* unused harmony export sinInOut */\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n/***/ }),\n/* 394 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export expIn */\n/* unused harmony export expOut */\n/* unused harmony export expInOut */\nfunction expIn(t) {\n  return Math.pow(2, 10 * t - 10);\n}\n\nfunction expOut(t) {\n  return 1 - Math.pow(2, -10 * t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;\n}\n\n\n/***/ }),\n/* 395 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export circleIn */\n/* unused harmony export circleOut */\n/* unused harmony export circleInOut */\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n/***/ }),\n/* 396 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export bounceIn */\n/* unused harmony export bounceOut */\n/* unused harmony export bounceInOut */\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n/***/ }),\n/* 397 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export backIn */\n/* unused harmony export backOut */\n/* unused harmony export backInOut */\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return t * t * ((s + 1) * t - s);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((s + 1) * t + s) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n/***/ }),\n/* 398 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export elasticIn */\n/* unused harmony export elasticOut */\n/* unused harmony export elasticInOut */\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p)\n        : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n/***/ }),\n/* 399 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_index__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transition_schedule__ = __webpack_require__(12);\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > __WEBPACK_IMPORTED_MODULE_1__transition_schedule__[\"c\" /* SCHEDULED */] && schedule.name === name) {\n        return new __WEBPACK_IMPORTED_MODULE_0__transition_index__[\"a\" /* Transition */]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n/***/ }),\n/* 400 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 401 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = ZoomEvent;\nfunction ZoomEvent(target, type, transform) {\n  this.target = target;\n  this.type = type;\n  this.transform = transform;\n}\n\n\n/***/ }),\n/* 402 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = nopropagation;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(3);\n\n\nfunction nopropagation() {\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].preventDefault();\n  __WEBPACK_IMPORTED_MODULE_0_d3_selection__[\"event\"].stopImmediatePropagation();\n});\n\n\n/***/ }),\n/* 403 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _cloneDeep = __webpack_require__(180);\n\nvar _cloneDeep2 = _interopRequireDefault(_cloneDeep);\n\nvar _defaultsDeep = __webpack_require__(125);\n\nvar _defaultsDeep2 = _interopRequireDefault(_defaultsDeep);\n\nvar _reduce = __webpack_require__(105);\n\nvar _reduce2 = _interopRequireDefault(_reduce);\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _conf = __webpack_require__(419);\n\nvar _conf2 = _interopRequireDefault(_conf);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar logger = console;\n\nvar Layout = function () {\n  function Layout(conf, data) {\n    var _this = this;\n\n    _classCallCheck(this, Layout);\n\n    if (!data) {\n      logger.log(2, 'no layout data', '');\n    }\n\n    this.conf = (0, _defaultsDeep2.default)(conf, (0, _cloneDeep2.default)(_conf2.default));\n    this.data = data;\n    var agg = (0, _reduce2.default)(data, function (aggregator, block) {\n      block.offset = aggregator.offset;\n      aggregator.blocks[block.id] = {\n        label: block.label,\n        len: block.len,\n        color: block.color,\n        offset: aggregator.offset\n      };\n      aggregator.offset += block.len;\n      return aggregator;\n    }, { blocks: {}, offset: 0 });\n    this.blocks = agg.blocks;\n    this.size = agg.offset;\n\n    // thanks to sum of blocks' length, compute start and end angles in radian\n    (0, _forEach2.default)(this.data, function (block, index) {\n      _this.blocks[block.id].start = block.offset / _this.size * (2 * Math.PI - _this.data.length * _this.conf.gap) + index * _this.conf.gap;\n\n      _this.blocks[block.id].end = (block.offset + block.len) / _this.size * (2 * Math.PI - _this.data.length * _this.conf.gap) + index * _this.conf.gap;\n\n      block.start = block.offset / _this.size * (2 * Math.PI - _this.data.length * _this.conf.gap) + index * _this.conf.gap;\n\n      block.end = (block.offset + block.len) / _this.size * (2 * Math.PI - _this.data.length * _this.conf.gap) + index * _this.conf.gap;\n    });\n  }\n\n  _createClass(Layout, [{\n    key: 'getAngle',\n    value: function getAngle(blockId, unit) {\n      var position = this.blocks[blockId].start / this.size;\n      if (unit === 'deg') {\n        return angle * 360;\n      }\n\n      if (unit === 'rad') {\n        return position * 2 * Math.PI;\n      }\n\n      return null;\n    }\n  }, {\n    key: 'summary',\n    value: function summary() {\n      return (0, _reduce2.default)(this.data, function (summary, block) {\n        summary[block.id] = block.len;\n        return summary;\n      }, {});\n    }\n  }]);\n\n  return Layout;\n}();\n\nexports.default = Layout;\n\n/***/ }),\n/* 404 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(31),\n    keysIn = __webpack_require__(61);\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n  return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n\n\n/***/ }),\n/* 405 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(31),\n    getSymbols = __webpack_require__(91);\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n\n\n/***/ }),\n/* 406 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyObject = __webpack_require__(31),\n    getSymbolsIn = __webpack_require__(182);\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n  return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n\n\n/***/ }),\n/* 407 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetAllKeys = __webpack_require__(148),\n    getSymbolsIn = __webpack_require__(182),\n    keysIn = __webpack_require__(61);\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n  return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n\n\n/***/ }),\n/* 408 */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = new array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\nmodule.exports = initCloneArray;\n\n\n/***/ }),\n/* 409 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(85),\n    cloneDataView = __webpack_require__(410),\n    cloneRegExp = __webpack_require__(411),\n    cloneSymbol = __webpack_require__(412),\n    cloneTypedArray = __webpack_require__(135);\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return new Ctor;\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return new Ctor;\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\nmodule.exports = initCloneByTag;\n\n\n/***/ }),\n/* 410 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar cloneArrayBuffer = __webpack_require__(85);\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n\n\n/***/ }),\n/* 411 */\n/***/ (function(module, exports) {\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\nmodule.exports = cloneRegExp;\n\n\n/***/ }),\n/* 412 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n\n\n/***/ }),\n/* 413 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsMap = __webpack_require__(414),\n    baseUnary = __webpack_require__(60),\n    nodeUtil = __webpack_require__(89);\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n\n\n/***/ }),\n/* 414 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getTag = __webpack_require__(41),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n  return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n\n\n/***/ }),\n/* 415 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIsSet = __webpack_require__(416),\n    baseUnary = __webpack_require__(60),\n    nodeUtil = __webpack_require__(89);\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n\n\n/***/ }),\n/* 416 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getTag = __webpack_require__(41),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n  return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n\n\n/***/ }),\n/* 417 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\nmodule.exports = arrayReduce;\n\n\n/***/ }),\n/* 418 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n *  `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n  eachFunc(collection, function(value, index, collection) {\n    accumulator = initAccum\n      ? (initAccum = false, value)\n      : iteratee(accumulator, value, index, collection);\n  });\n  return accumulator;\n}\n\nmodule.exports = baseReduce;\n\n\n/***/ }),\n/* 419 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = {\n  innerRadius: 250,\n  outerRadius: 300,\n  cornerRadius: 0,\n  gap: 0.04, // in radian\n  opacity: 1,\n  labels: {\n    position: 'center',\n    display: true,\n    size: 14,\n    color: '#000',\n    radialOffset: 20\n  },\n  ticks: {\n    display: true,\n    color: 'grey',\n    spacing: 10000000,\n    labels: true,\n    labelSpacing: 10,\n    labelSuffix: '',\n    labelDenominator: 1,\n    labelDisplay0: true,\n    labelSize: 10,\n    labelColor: '#000',\n    labelFont: 'default',\n    majorSpacing: 5,\n    size: {\n      minor: 2,\n      major: 5\n    }\n  },\n  onClick: null,\n  onMouseOver: null,\n  events: {},\n  zIndex: 100\n};\n\n/***/ }),\n/* 420 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = render;\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _sortBy = __webpack_require__(106);\n\nvar _sortBy2 = _interopRequireDefault(_sortBy);\n\nvar _render = __webpack_require__(426);\n\nvar _render2 = _interopRequireDefault(_render);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction render() {\n  var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var removeTracks = arguments[1];\n  var circos = arguments[2];\n\n  var renderAll = ids.length === 0;\n\n  var svg = circos.svg.attr('width', circos.conf.width).attr('height', circos.conf.height);\n\n  if (removeTracks) {\n    (0, _forEach2.default)(circos.tracks, function (track, trackId) {\n      svg.select('.' + trackId).remove();\n    });\n  }\n\n  var translated = svg.select('.all');\n  if (translated.empty()) {\n    translated = svg.append('g').attr('class', 'all').attr('transform', 'translate(\\n          ' + parseInt(circos.conf.width / 2) + ',\\n          ' + parseInt(circos.conf.height / 2) + '\\n        )');\n  }\n\n  (0, _forEach2.default)(circos.tracks, function (track, trackId) {\n    if (renderAll || trackId in ids) {\n      track.render(circos, translated, trackId);\n    }\n  });\n  if (renderAll || 'layout' in ids) {\n    (0, _render2.default)(translated, circos);\n  }\n\n  // re-order tracks and layout according to z-index\n  var trackContainers = svg.selectAll('.all > g').remove();\n  var sortedTrackContainers = (0, _sortBy2.default)(trackContainers._groups[0], function (elt) {\n    return elt.getAttribute('z-index');\n  });\n\n  svg.select('.all').selectAll('g').data(sortedTrackContainers).enter().append(function (d) {\n    return d;\n  });\n\n  return circos;\n}\n\n/***/ }),\n/* 421 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Symbol = __webpack_require__(29),\n    isArguments = __webpack_require__(58),\n    isArray = __webpack_require__(2);\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n  return isArray(value) || isArguments(value) ||\n    !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n/***/ }),\n/* 422 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(40),\n    baseIteratee = __webpack_require__(33),\n    baseMap = __webpack_require__(158),\n    baseSortBy = __webpack_require__(423),\n    baseUnary = __webpack_require__(60),\n    compareMultiple = __webpack_require__(424),\n    identity = __webpack_require__(28);\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n  var index = -1;\n  iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\n\n  var result = baseMap(collection, function(value, key, collection) {\n    var criteria = arrayMap(iteratees, function(iteratee) {\n      return iteratee(value);\n    });\n    return { 'criteria': criteria, 'index': ++index, 'value': value };\n  });\n\n  return baseSortBy(result, function(object, other) {\n    return compareMultiple(object, other, orders);\n  });\n}\n\nmodule.exports = baseOrderBy;\n\n\n/***/ }),\n/* 423 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n  var length = array.length;\n\n  array.sort(comparer);\n  while (length--) {\n    array[length] = array[length].value;\n  }\n  return array;\n}\n\nmodule.exports = baseSortBy;\n\n\n/***/ }),\n/* 424 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar compareAscending = __webpack_require__(425);\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n  var index = -1,\n      objCriteria = object.criteria,\n      othCriteria = other.criteria,\n      length = objCriteria.length,\n      ordersLength = orders.length;\n\n  while (++index < length) {\n    var result = compareAscending(objCriteria[index], othCriteria[index]);\n    if (result) {\n      if (index >= ordersLength) {\n        return result;\n      }\n      var order = orders[index];\n      return result * (order == 'desc' ? -1 : 1);\n    }\n  }\n  // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n  // that causes it, under certain circumstances, to provide the same value for\n  // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n  // for more details.\n  //\n  // This also ensures a stable sort in V8 and other engines.\n  // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n  return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n\n\n/***/ }),\n/* 425 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isSymbol = __webpack_require__(34);\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n  if (value !== other) {\n    var valIsDefined = value !== undefined,\n        valIsNull = value === null,\n        valIsReflexive = value === value,\n        valIsSymbol = isSymbol(value);\n\n    var othIsDefined = other !== undefined,\n        othIsNull = other === null,\n        othIsReflexive = other === other,\n        othIsSymbol = isSymbol(other);\n\n    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n        (valIsNull && othIsDefined && othIsReflexive) ||\n        (!valIsDefined && othIsReflexive) ||\n        !valIsReflexive) {\n      return 1;\n    }\n    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n        (othIsNull && valIsDefined && valIsReflexive) ||\n        (!othIsDefined && valIsReflexive) ||\n        !othIsReflexive) {\n      return -1;\n    }\n  }\n  return 0;\n}\n\nmodule.exports = compareAscending;\n\n\n/***/ }),\n/* 426 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = renderLayout;\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _d3Array = __webpack_require__(10);\n\nvar _d3Selection = __webpack_require__(3);\n\nfunction renderLayoutLabels(conf, block) {\n  var radius = conf.innerRadius + conf.labels.radialOffset;\n\n  var labelArc = (0, _d3Shape.arc)().innerRadius(radius).outerRadius(radius).startAngle(function (d, i) {\n    return d.start;\n  }).endAngle(function (d, i) {\n    return d.end;\n  });\n\n  block.append('path').attr('fill', 'none').attr('stroke', 'none').attr('d', labelArc).attr('id', function (d) {\n    return 'arc-label' + d.id;\n  });\n\n  var label = block.append('text').style('font-size', '' + conf.labels.size + 'px').attr('text-anchor', 'middle');\n\n  // http://stackoverflow.com/questions/20447106/how-to-center-horizontal-and-vertical-text-along-an-textpath-inside-an-arc-usi\n  label.append('textPath').attr('startOffset', '25%').attr('xlink:href', function (d) {\n    return '#arc-label' + d.id;\n  }).style('fill', conf.labels.color).text(function (d) {\n    return d.label;\n  });\n}\n\nfunction renderLayoutTicks(conf, layout, instance) {\n  // Returns an array of tick angles and labels, given a block.\n  function blockTicks(d) {\n    var k = (d.end - d.start) / d.len;\n    return (0, _d3Array.range)(0, d.len, conf.ticks.spacing).map(function (v, i) {\n      return {\n        angle: v * k + d.start,\n        label: displayLabel(v, i)\n      };\n    });\n  }\n\n  function displayLabel(v, i) {\n    if (conf.ticks.labels === false) {\n      return null;\n    } else if (conf.ticks.labelDisplay0 === false && i === 0) {\n      return null;\n    } else if (i % conf.ticks.labelSpacing) {\n      return null;\n    } else {\n      return v / conf.ticks.labelDenominator + conf.ticks.labelSuffix;\n    }\n  }\n\n  var ticks = layout.append('g').selectAll('g').data(instance._layout.data).enter().append('g').selectAll('g').data(blockTicks).enter().append('g').attr('transform', function (d) {\n    return 'rotate(' + (d.angle * 180 / Math.PI - 90) + ')' + 'translate(' + conf.outerRadius + ',0)';\n  });\n\n  ticks.append('line').attr('x1', 0).attr('y1', 1).attr('x2', function (d, i) {\n    if (i % conf.ticks.majorSpacing) {\n      return conf.ticks.size.minor;\n    } else {\n      return conf.ticks.size.major;\n    }\n  }).attr('y2', 1).style('stroke', conf.ticks.color);\n\n  ticks.append('text').attr('x', 8).attr('dy', '.35em').attr('transform', function (d) {\n    return d.angle > Math.PI ? 'rotate(180)translate(-16)' : null;\n  }).style('text-anchor', function (d) {\n    return d.angle > Math.PI ? 'end' : null;\n  }).style('font-size', '' + conf.ticks.labelSize + 'px').style('fill', conf.ticks.labelColor).text(function (d) {\n    return d.label;\n  });\n}\n\nfunction renderLayout(parentElement, instance) {\n  var conf = instance._layout.conf;\n  parentElement.select('.cs-layout').remove();\n\n  var layout = parentElement.append('g').attr('class', 'cs-layout').attr('z-index', conf.zIndex).on('click', conf.onClick);\n\n  var block = layout.selectAll('g').data(instance._layout.data).enter().append('g').attr('class', function (d) {\n    return d.id;\n  }).attr('opacity', conf.opacity);\n\n  Object.keys(conf.events).forEach(function (eventName) {\n    block.on(eventName, function (d, i, nodes) {\n      conf.events[eventName](d, i, nodes, _d3Selection.event);\n    });\n  });\n\n  var entry = (0, _d3Shape.arc)().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).cornerRadius(conf.cornerRadius).startAngle(function (d) {\n    return d.start;\n  }).endAngle(function (d) {\n    return d.end;\n  });\n\n  block.append('path').attr('d', entry).attr('fill', function (d) {\n    return d.color;\n  }).attr('id', function (d) {\n    return d.id;\n  });\n\n  if (conf.labels.display) {\n    renderLayoutLabels(conf, block);\n  }\n\n  if (conf.ticks.display) {\n    renderLayoutTicks(conf, layout, instance);\n  }\n}\n\n/***/ }),\n/* 427 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math__ = __webpack_require__(44);\n\n\n\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"h\" /* max */])(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - __WEBPACK_IMPORTED_MODULE_2__math__[\"g\" /* halfPi */],\n        a1 = endAngle.apply(this, arguments) - __WEBPACK_IMPORTED_MODULE_2__math__[\"g\" /* halfPi */],\n        da = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* abs */])(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__[\"a\" /* path */])();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */])) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > __WEBPACK_IMPORTED_MODULE_2__math__[\"m\" /* tau */] - __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n      context.moveTo(r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a0), r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n        context.moveTo(r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a1), r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) && (padRadius ? +padRadius.apply(this, arguments) : Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(r0 * r0 + r1 * r1)),\n          rc = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"i\" /* min */])(Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* abs */])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n        var p0 = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"c\" /* asin */])(rp / r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(ap)),\n            p1 = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"c\" /* asin */])(rp / r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(ap));\n        if ((da0 -= p0 * 2) > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a01),\n          y01 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a01),\n          x10 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a10),\n          y10 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a10);\n\n      // Apply rounded corners?\n      if (rc > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n        var x11 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a11),\n            y11 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a11),\n            x00 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a00),\n            y00 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a00);\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < __WEBPACK_IMPORTED_MODULE_2__math__[\"j\" /* pi */]) {\n          var oc = da0 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */] ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],\n              ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* acos */])((ax * bx + ay * by) / (Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(ax * ax + ay * ay) * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(bx * bx + by * by))) / 2),\n              lc = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"l\" /* sqrt */])(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"i\" /* min */])(rc, (r0 - lc) / (kc - 1));\n          rc1 = Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"i\" /* min */])(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */])) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.cy + t0.y11, t0.cx + t0.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y11, t1.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) || !(da0 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */])) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > __WEBPACK_IMPORTED_MODULE_2__math__[\"f\" /* epsilon */]) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t0.cy + t0.y11, t0.cx + t0.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y11, t1.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* atan2 */])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - __WEBPACK_IMPORTED_MODULE_2__math__[\"j\" /* pi */] / 2;\n    return [Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"e\" /* cos */])(a) * r, Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"k\" /* sin */])(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n});\n\n\n/***/ }),\n/* 428 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon)) {}\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (path);\n\n\n/***/ }),\n/* 429 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__descending__ = __webpack_require__(430);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity__ = __webpack_require__(431);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__math__ = __webpack_require__(44);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var value = __WEBPACK_IMPORTED_MODULE_2__identity__[\"a\" /* default */],\n      sortValues = __WEBPACK_IMPORTED_MODULE_1__descending__[\"a\" /* default */],\n      sort = null,\n      startAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(0),\n      endAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_3__math__[\"m\" /* tau */]),\n      padAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(__WEBPACK_IMPORTED_MODULE_3__math__[\"m\" /* tau */], Math.max(-__WEBPACK_IMPORTED_MODULE_3__math__[\"m\" /* tau */], endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(+_), pie) : padAngle;\n  };\n\n  return pie;\n});\n\n\n/***/ }),\n/* 430 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n/***/ }),\n/* 431 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(d) {\n  return d;\n});\n\n\n/***/ }),\n/* 432 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__curve_radial__ = __webpack_require__(184);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area__ = __webpack_require__(183);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__lineRadial__ = __webpack_require__(185);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var a = Object(__WEBPACK_IMPORTED_MODULE_1__area__[\"a\" /* default */])().curve(__WEBPACK_IMPORTED_MODULE_0__curve_radial__[\"a\" /* curveRadialLinear */]),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial__[\"b\" /* lineRadial */])(x0()); }, delete a.lineX0;\n  a.lineEndAngle = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial__[\"b\" /* lineRadial */])(x1()); }, delete a.lineX1;\n  a.lineInnerRadius = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial__[\"b\" /* lineRadial */])(y0()); }, delete a.lineY0;\n  a.lineOuterRadius = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial__[\"b\" /* lineRadial */])(y1()); }, delete a.lineY1;\n\n  a.curve = function(_) {\n    return arguments.length ? c(Object(__WEBPACK_IMPORTED_MODULE_0__curve_radial__[\"b\" /* default */])(_)) : c()._curve;\n  };\n\n  return a;\n});\n\n\n/***/ }),\n/* 433 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = linkHorizontal;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = linkVertical;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = linkRadial;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(187);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point__ = __webpack_require__(109);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pointRadial__ = __webpack_require__(186);\n\n\n\n\n\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x = __WEBPACK_IMPORTED_MODULE_3__point__[\"a\" /* x */],\n      y = __WEBPACK_IMPORTED_MODULE_3__point__[\"b\" /* y */],\n      context = null;\n\n  function link() {\n    var buffer, argv = __WEBPACK_IMPORTED_MODULE_1__array__[\"a\" /* slice */].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__[\"a\" /* path */])();\n    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function(_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function(_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(+_), link) : x;\n  };\n\n  link.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(+_), link) : y;\n  };\n\n  link.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n  var p0 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial__[\"a\" /* default */])(x0, y0),\n      p1 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial__[\"a\" /* default */])(x0, y0 = (y0 + y1) / 2),\n      p2 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial__[\"a\" /* default */])(x1, y0),\n      p3 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial__[\"a\" /* default */])(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nfunction linkHorizontal() {\n  return link(curveHorizontal);\n}\n\nfunction linkVertical() {\n  return link(curveVertical);\n}\n\nfunction linkRadial() {\n  var l = link(curveRadial);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}\n\n\n/***/ }),\n/* 434 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return symbols; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_circle__ = __webpack_require__(188);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_cross__ = __webpack_require__(189);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__symbol_diamond__ = __webpack_require__(190);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__symbol_star__ = __webpack_require__(191);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__symbol_square__ = __webpack_require__(192);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__symbol_triangle__ = __webpack_require__(193);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__symbol_wye__ = __webpack_require__(194);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__constant__ = __webpack_require__(25);\n\n\n\n\n\n\n\n\n\n\nvar symbols = [\n  __WEBPACK_IMPORTED_MODULE_1__symbol_circle__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_2__symbol_cross__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_3__symbol_diamond__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_5__symbol_square__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_4__symbol_star__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_6__symbol_triangle__[\"a\" /* default */],\n  __WEBPACK_IMPORTED_MODULE_7__symbol_wye__[\"a\" /* default */]\n];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var type = Object(__WEBPACK_IMPORTED_MODULE_8__constant__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_1__symbol_circle__[\"a\" /* default */]),\n      size = Object(__WEBPACK_IMPORTED_MODULE_8__constant__[\"a\" /* default */])(64),\n      context = null;\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__[\"a\" /* path */])();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_8__constant__[\"a\" /* default */])(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_8__constant__[\"a\" /* default */])(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n});\n\n\n/***/ }),\n/* 435 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(72);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basis__ = __webpack_require__(73);\n\n\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x2, this._y2);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x2, this._y2);\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n      default: Object(__WEBPACK_IMPORTED_MODULE_1__basis__[\"c\" /* point */])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new BasisClosed(context);\n});\n\n\n/***/ }),\n/* 436 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis__ = __webpack_require__(73);\n\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n      case 3: this._point = 4; // proceed\n      default: Object(__WEBPACK_IMPORTED_MODULE_0__basis__[\"c\" /* point */])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new BasisOpen(context);\n});\n\n\n/***/ }),\n/* 437 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis__ = __webpack_require__(73);\n\n\nfunction Bundle(context, beta) {\n  this._basis = new __WEBPACK_IMPORTED_MODULE_0__basis__[\"a\" /* Basis */](context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ((function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new __WEBPACK_IMPORTED_MODULE_0__basis__[\"a\" /* Basis */](context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85));\n\n\n/***/ }),\n/* 438 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinalClosed__ = __webpack_require__(195);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noop__ = __webpack_require__(72);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__catmullRom__ = __webpack_require__(110);\n\n\n\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: __WEBPACK_IMPORTED_MODULE_1__noop__[\"a\" /* default */],\n  areaEnd: __WEBPACK_IMPORTED_MODULE_1__noop__[\"a\" /* default */],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(__WEBPACK_IMPORTED_MODULE_2__catmullRom__[\"b\" /* point */])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new __WEBPACK_IMPORTED_MODULE_0__cardinalClosed__[\"a\" /* CardinalClosed */](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n/* 439 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinalOpen__ = __webpack_require__(196);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__catmullRom__ = __webpack_require__(110);\n\n\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(__WEBPACK_IMPORTED_MODULE_1__catmullRom__[\"b\" /* point */])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new __WEBPACK_IMPORTED_MODULE_0__cardinalOpen__[\"a\" /* CardinalOpen */](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n/***/ }),\n/* 440 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(72);\n\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop__[\"a\" /* default */],\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new LinearClosed(context);\n});\n\n\n/***/ }),\n/* 441 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = monotoneX;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = monotoneY;\nfunction sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n}\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nfunction monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nfunction monotoneY(context) {\n  return new MonotoneY(context);\n}\n\n\n/***/ }),\n/* 442 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  a[n - 1] = r[n - 1] / b[n - 1];\n  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n  return [a, b];\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new Natural(context);\n});\n\n\n/***/ }),\n/* 443 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = stepBefore;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = stepAfter;\nfunction Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: {\n        if (this._t <= 0) {\n          this._context.lineTo(this._x, y);\n          this._context.lineTo(x, y);\n        } else {\n          var x1 = this._x * (1 - this._t) + x * this._t;\n          this._context.lineTo(x1, this._y);\n          this._context.lineTo(x1, y);\n        }\n        break;\n      }\n    }\n    this._x = x, this._y = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(context) {\n  return new Step(context, 0.5);\n});\n\nfunction stepBefore(context) {\n  return new Step(context, 0);\n}\n\nfunction stepAfter(context) {\n  return new Step(context, 1);\n}\n\n\n/***/ }),\n/* 444 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(187);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__offset_none__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__order_none__ = __webpack_require__(46);\n\n\n\n\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var keys = Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])([]),\n      order = __WEBPACK_IMPORTED_MODULE_3__order_none__[\"a\" /* default */],\n      offset = __WEBPACK_IMPORTED_MODULE_2__offset_none__[\"a\" /* default */],\n      value = stackValue;\n\n  function stack(data) {\n    var kz = keys.apply(this, arguments),\n        i,\n        m = data.length,\n        n = kz.length,\n        sz = new Array(n),\n        oz;\n\n    for (i = 0; i < n; ++i) {\n      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n        si[j] = sij = [0, +value(data[j], ki, j, data)];\n        sij.data = data[j];\n      }\n      si.key = ki;\n    }\n\n    for (i = 0, oz = order(sz); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function(_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array__[\"a\" /* slice */].call(_)), stack) : keys;\n  };\n\n  stack.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), stack) : value;\n  };\n\n  stack.order = function(_) {\n    return arguments.length ? (order = _ == null ? __WEBPACK_IMPORTED_MODULE_3__order_none__[\"a\" /* default */] : typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array__[\"a\" /* slice */].call(_)), stack) : order;\n  };\n\n  stack.offset = function(_) {\n    return arguments.length ? (offset = _ == null ? __WEBPACK_IMPORTED_MODULE_2__offset_none__[\"a\" /* default */] : _, stack) : offset;\n  };\n\n  return stack;\n});\n\n\n/***/ }),\n/* 445 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(45);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n  }\n  Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series, order);\n});\n\n\n/***/ }),\n/* 446 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) >= 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = yp;\n      }\n    }\n  }\n});\n\n\n/***/ }),\n/* 447 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(45);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n  Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series, order);\n});\n\n\n/***/ }),\n/* 448 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(45);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n      s1 += sij0, s2 += s3 * sij0;\n    }\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series, order);\n});\n\n\n/***/ }),\n/* 449 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(111);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__ascending__[\"a\" /* default */])(series).reverse();\n});\n\n\n/***/ }),\n/* 450 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(46);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending__ = __webpack_require__(111);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(__WEBPACK_IMPORTED_MODULE_1__ascending__[\"b\" /* sum */]),\n      order = Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series).sort(function(a, b) { return sums[b] - sums[a]; }),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n});\n\n\n/***/ }),\n/* 451 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(46);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(series) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__none__[\"a\" /* default */])(series).reverse();\n});\n\n\n/***/ }),\n/* 452 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pairs__ = __webpack_require__(199);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values0, values1, reduce) {\n  var n0 = values0.length,\n      n1 = values1.length,\n      values = new Array(n0 * n1),\n      i0,\n      i1,\n      i,\n      value0;\n\n  if (reduce == null) reduce = __WEBPACK_IMPORTED_MODULE_0__pairs__[\"b\" /* pair */];\n\n  for (i0 = i = 0; i0 < n0; ++i0) {\n    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n      values[i] = reduce(value0, values1[i1]);\n    }\n  }\n\n  return values;\n});\n\n\n/***/ }),\n/* 453 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n/***/ }),\n/* 454 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(203);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bisect__ = __webpack_require__(197);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(455);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__extent__ = __webpack_require__(202);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__identity__ = __webpack_require__(456);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__range__ = __webpack_require__(204);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ticks__ = __webpack_require__(205);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__threshold_sturges__ = __webpack_require__(206);\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var value = __WEBPACK_IMPORTED_MODULE_4__identity__[\"a\" /* default */],\n      domain = __WEBPACK_IMPORTED_MODULE_3__extent__[\"a\" /* default */],\n      threshold = __WEBPACK_IMPORTED_MODULE_7__threshold_sturges__[\"a\" /* default */];\n\n  function histogram(data) {\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      tz = Object(__WEBPACK_IMPORTED_MODULE_6__ticks__[\"c\" /* tickStep */])(x0, x1, tz);\n      tz = Object(__WEBPACK_IMPORTED_MODULE_5__range__[\"a\" /* default */])(Math.ceil(x0 / tz) * tz, Math.floor(x1 / tz) * tz, tz); // exclusive\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x0 <= x && x <= x1) {\n        bins[Object(__WEBPACK_IMPORTED_MODULE_1__bisect__[\"c\" /* default */])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array__[\"b\" /* slice */].call(_)) : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n/***/ }),\n/* 455 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 456 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n/* 457 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(203);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending__ = __webpack_require__(36);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__number__ = __webpack_require__(47);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quantile__ = __webpack_require__(112);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, min, max) {\n  values = __WEBPACK_IMPORTED_MODULE_0__array__[\"a\" /* map */].call(values, __WEBPACK_IMPORTED_MODULE_2__number__[\"a\" /* default */]).sort(__WEBPACK_IMPORTED_MODULE_1__ascending__[\"a\" /* default */]);\n  return Math.ceil((max - min) / (2 * (Object(__WEBPACK_IMPORTED_MODULE_3__quantile__[\"a\" /* default */])(values, 0.75) - Object(__WEBPACK_IMPORTED_MODULE_3__quantile__[\"a\" /* default */])(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n});\n\n\n/***/ }),\n/* 458 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deviation__ = __webpack_require__(200);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(__WEBPACK_IMPORTED_MODULE_0__deviation__[\"a\" /* default */])(values) * Math.pow(values.length, -1 / 3)));\n});\n\n\n/***/ }),\n/* 459 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n});\n\n\n/***/ }),\n/* 460 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(47);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      m = n,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(values[i]))) sum += value;\n      else --m;\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__[\"a\" /* default */])(valueof(values[i], i, values)))) sum += value;\n      else --m;\n    }\n  }\n\n  if (m) return sum / m;\n});\n\n\n/***/ }),\n/* 461 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(36);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__number__ = __webpack_require__(47);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__quantile__ = __webpack_require__(112);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      numbers = [];\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_1__number__[\"a\" /* default */])(values[i]))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_1__number__[\"a\" /* default */])(valueof(values[i], i, values)))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  return Object(__WEBPACK_IMPORTED_MODULE_2__quantile__[\"a\" /* default */])(numbers.sort(__WEBPACK_IMPORTED_MODULE_0__ascending__[\"a\" /* default */]), 0.5);\n});\n\n\n/***/ }),\n/* 462 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(arrays) {\n  var n = arrays.length,\n      m,\n      i = -1,\n      j = 0,\n      merged,\n      array;\n\n  while (++i < n) j += arrays[i].length;\n  merged = new Array(j);\n\n  while (--n >= 0) {\n    array = arrays[n];\n    m = array.length;\n    while (--m >= 0) {\n      merged[--j] = array[m];\n    }\n  }\n\n  return merged;\n});\n\n\n/***/ }),\n/* 463 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(array, indexes) {\n  var i = indexes.length, permutes = new Array(i);\n  while (i--) permutes[i] = array[indexes[i]];\n  return permutes;\n});\n\n\n/***/ }),\n/* 464 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(36);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, compare) {\n  if (!(n = values.length)) return;\n  var n,\n      i = 0,\n      j = 0,\n      xi,\n      xj = values[j];\n\n  if (compare == null) compare = __WEBPACK_IMPORTED_MODULE_0__ascending__[\"a\" /* default */];\n\n  while (++i < n) {\n    if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n      xj = xi, j = i;\n    }\n  }\n\n  if (compare(xj, xj) === 0) return j;\n});\n\n\n/***/ }),\n/* 465 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(array, i0, i1) {\n  var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m + i0];\n    array[m + i0] = array[i + i0];\n    array[i + i0] = t;\n  }\n\n  return array;\n});\n\n\n/***/ }),\n/* 466 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (value = +valueof(values[i], i, values)) sum += value;\n    }\n  }\n\n  return sum;\n});\n\n\n/***/ }),\n/* 467 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transpose__ = __webpack_require__(208);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__transpose__[\"a\" /* default */])(arguments);\n});\n\n\n/***/ }),\n/* 468 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _configs = __webpack_require__(22);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  style: {\n    value: {},\n    iteratee: true\n  },\n  color: {\n    value: 'black',\n    iteratee: true\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.common, _configs.radial);\n\nvar Text = function (_Track) {\n  _inherits(Text, _Track);\n\n  function Text(instance, conf, data) {\n    _classCallCheck(this, Text);\n\n    return _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, instance, conf, defaultConf, data, _dataParser.parsePositionTextData));\n  }\n\n  _createClass(Text, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      var text = parentElement.selectAll('g').data(function (d) {\n        return d.values.map(function (item) {\n          item._angle = _this2.theta(item.position, layout.blocks[item.block_id]) * 360 / (2 * Math.PI) - 90;\n          item._anchor = item._angle > 90 ? 'end' : 'start';\n          item._rotate = item._angle > 90 ? 180 : 0;\n          return item;\n        });\n      }).enter().append('g').append('text').text(function (d) {\n        return d.value;\n      }).attr('transform', function (d) {\n        return '\\n          rotate(' + d._angle + ')\\n          translate(' + conf.innerRadius + ', 0)\\n          rotate(' + d._rotate + ')\\n        ';\n      }).attr('text-anchor', function (d) {\n        return d._anchor;\n      });\n      (0, _forEach2.default)(conf.style, function (value, key) {\n        text.style(key, value);\n      });\n      return text;\n    }\n  }]);\n\n  return Text;\n}(_Track3.default);\n\nexports.default = Text;\n\n/***/ }),\n/* 469 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(470);\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(472)(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n/* 470 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(471)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"div.circos-tooltip {\\r\\n  position: absolute;\\r\\n  text-align: center;\\r\\n  padding: 5px 10px;\\r\\n  background: #111111;\\r\\n  color: white;\\r\\n  border: 0px;\\r\\n  pointer-events: none;\\r\\n  z-index: 1000;\\r\\n}\\r\\n\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 471 */\n/***/ (function(module, exports) {\n\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t//  when a module is imported multiple times with different media queries.\n\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n/***/ }),\n/* 472 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n  return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n                // If passing function in options, then use it for resolve \"head\" element.\n                // Useful for Shadow Root style i.e\n                // {\n                //   insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n                // }\n                if (typeof target === 'function') {\n                        return target();\n                }\n                if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(473);\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n        if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + \" \" + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t    result = options.transform(obj.css);\n\n\t    if (result) {\n\t    \t// If transform returns a value, use that instead of the original css.\n\t    \t// This allows running runtime transformations on the css.\n\t    \tobj.css = result;\n\t    } else {\n\t    \t// If the transform function returns a falsy value, don't add this css.\n\t    \t// This allows conditional loading of css\n\t    \treturn function() {\n\t    \t\t// noop\n\t    \t};\n\t    }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default.  Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n/***/ }),\n/* 473 */\n/***/ (function(module, exports) {\n\n\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n  // get current location\n  var location = typeof window !== \"undefined\" && window.location;\n\n  if (!location) {\n    throw new Error(\"fixUrls requires window.location\");\n  }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t  return css;\n  }\n\n  var baseUrl = location.protocol + \"//\" + location.host;\n  var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\(  = Match on the word \"url\" with any whitespace after it and then a parens\n\t   (  = Start a capturing group\n\t     (?:  = Start a non-capturing group\n\t         [^)(]  = Match anything that isn't a parentheses\n\t         |  = OR\n\t         \\(  = Match a start parentheses\n\t             (?:  = Start another non-capturing groups\n\t                 [^)(]+  = Match anything that isn't a parentheses\n\t                 |  = OR\n\t                 \\(  = Match a start parentheses\n\t                     [^)(]*  = Match anything that isn't a parentheses\n\t                 \\)  = Match a end parentheses\n\t             )  = End Group\n              *\\) = Match anything and then a close parens\n          )  = Close non-capturing group\n          *  = Match anything\n       )  = Close capturing group\n\t \\)  = Match a close parens\n\n\t /gi  = Get all matches, not the first.  Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t  return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t  \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n/***/ }),\n/* 474 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getConf = undefined;\n\nvar _cloneDeep = __webpack_require__(180);\n\nvar _cloneDeep2 = _interopRequireDefault(_cloneDeep);\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _isFunction = __webpack_require__(24);\n\nvar _isFunction2 = _interopRequireDefault(_isFunction);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _utils = __webpack_require__(210);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar buildConf = function buildConf() {\n  var userConf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var defaultConf = arguments[1];\n\n  var conf = {};\n  (0, _forEach2.default)(defaultConf, function (item, key) {\n    // if it's a leaf\n    if (item.iteratee !== undefined) {\n      if (!item.iteratee) {\n        conf[key] = Object.keys(userConf).indexOf(key) > -1 ? userConf[key] : item.value;\n      } else if (Object.keys(userConf).indexOf(key) > -1) {\n        if ((0, _isFunction2.default)(userConf[key])) {\n          conf[key] = userConf[key];\n        } else {\n          conf[key] = userConf[key];\n        }\n      } else {\n        conf[key] = function () {\n          return item.value;\n        };\n      }\n      // else we go deeper\n    } else {\n      conf[key] = buildConf(userConf[key], item);\n    }\n  });\n\n  return conf;\n};\n\nvar computeMinMax = function computeMinMax(conf, meta) {\n  return {\n    cmin: conf.min === null ? meta.min : conf.min,\n    cmax: conf.max === null ? meta.max : conf.max\n  };\n};\n\nvar computeRadius = function computeRadius(conf, instance) {\n  if (conf.innerRadius === 0 && conf.outerRadius === 0) {\n    var borders = (0, _utils.smartBorders)(conf, instance._layout, instance.tracks);\n    return {\n      innerRadius: borders.in,\n      outerRadius: borders.out\n    };\n  }\n  if (conf.innerRadius <= 1 && conf.outerRadius <= 1) {\n    return {\n      innerRadius: conf.innerRadius * instance._layout.conf.innerRadius,\n      outerRadius: conf.outerRadius * instance._layout.conf.innerRadius\n    };\n  }\n  if (conf.innerRadius <= 10 && conf.outerRadius <= 10) {\n    return {\n      innerRadius: conf.innerRadius * instance._layout.conf.outerRadius,\n      outerRadius: conf.outerRadius * instance._layout.conf.outerRadius\n    };\n  }\n};\n\nvar getConf = function getConf(userConf, defaultConf, meta, instance) {\n  var conf = buildConf(userConf, (0, _cloneDeep2.default)(defaultConf));\n  (0, _assign2.default)(conf, computeMinMax(conf, meta), computeRadius(conf, instance));\n  return conf;\n};\n\nexports.getConf = getConf;\n\n/***/ }),\n/* 475 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('sortBy', __webpack_require__(106));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 476 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar mapping = __webpack_require__(477),\n    fallbackHolder = __webpack_require__(26);\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n  return n == 2\n    ? function(a, b) { return func.apply(undefined, arguments); }\n    : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n  return n == 2\n    ? function(a, b) { return func(a, b); }\n    : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n  var length = array ? array.length : 0,\n      result = Array(length);\n\n  while (length--) {\n    result[length] = array[length];\n  }\n  return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n  return function(object) {\n    return func({}, object);\n  };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n  return function() {\n    var length = arguments.length,\n        lastIndex = length - 1,\n        args = Array(length);\n\n    while (length--) {\n      args[length] = arguments[length];\n    }\n    var array = args[start],\n        otherArgs = args.slice(0, start);\n\n    if (array) {\n      push.apply(otherArgs, array);\n    }\n    if (start != lastIndex) {\n      push.apply(otherArgs, args.slice(start + 1));\n    }\n    return func.apply(this, otherArgs);\n  };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n  return function() {\n    var length = arguments.length;\n    if (!length) {\n      return;\n    }\n    var args = Array(length);\n    while (length--) {\n      args[length] = arguments[length];\n    }\n    var result = args[0] = cloner.apply(undefined, args);\n    func.apply(undefined, args);\n    return result;\n  };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n  var isLib = typeof name == 'function',\n      isObj = name === Object(name);\n\n  if (isObj) {\n    options = func;\n    func = name;\n    name = undefined;\n  }\n  if (func == null) {\n    throw new TypeError;\n  }\n  options || (options = {});\n\n  var config = {\n    'cap': 'cap' in options ? options.cap : true,\n    'curry': 'curry' in options ? options.curry : true,\n    'fixed': 'fixed' in options ? options.fixed : true,\n    'immutable': 'immutable' in options ? options.immutable : true,\n    'rearg': 'rearg' in options ? options.rearg : true\n  };\n\n  var defaultHolder = isLib ? func : fallbackHolder,\n      forceCurry = ('curry' in options) && options.curry,\n      forceFixed = ('fixed' in options) && options.fixed,\n      forceRearg = ('rearg' in options) && options.rearg,\n      pristine = isLib ? func.runInContext() : undefined;\n\n  var helpers = isLib ? func : {\n    'ary': util.ary,\n    'assign': util.assign,\n    'clone': util.clone,\n    'curry': util.curry,\n    'forEach': util.forEach,\n    'isArray': util.isArray,\n    'isError': util.isError,\n    'isFunction': util.isFunction,\n    'isWeakMap': util.isWeakMap,\n    'iteratee': util.iteratee,\n    'keys': util.keys,\n    'rearg': util.rearg,\n    'toInteger': util.toInteger,\n    'toPath': util.toPath\n  };\n\n  var ary = helpers.ary,\n      assign = helpers.assign,\n      clone = helpers.clone,\n      curry = helpers.curry,\n      each = helpers.forEach,\n      isArray = helpers.isArray,\n      isError = helpers.isError,\n      isFunction = helpers.isFunction,\n      isWeakMap = helpers.isWeakMap,\n      keys = helpers.keys,\n      rearg = helpers.rearg,\n      toInteger = helpers.toInteger,\n      toPath = helpers.toPath;\n\n  var aryMethodKeys = keys(mapping.aryMethod);\n\n  var wrappers = {\n    'castArray': function(castArray) {\n      return function() {\n        var value = arguments[0];\n        return isArray(value)\n          ? castArray(cloneArray(value))\n          : castArray.apply(undefined, arguments);\n      };\n    },\n    'iteratee': function(iteratee) {\n      return function() {\n        var func = arguments[0],\n            arity = arguments[1],\n            result = iteratee(func, arity),\n            length = result.length;\n\n        if (config.cap && typeof arity == 'number') {\n          arity = arity > 2 ? (arity - 2) : 1;\n          return (length && length <= arity) ? result : baseAry(result, arity);\n        }\n        return result;\n      };\n    },\n    'mixin': function(mixin) {\n      return function(source) {\n        var func = this;\n        if (!isFunction(func)) {\n          return mixin(func, Object(source));\n        }\n        var pairs = [];\n        each(keys(source), function(key) {\n          if (isFunction(source[key])) {\n            pairs.push([key, func.prototype[key]]);\n          }\n        });\n\n        mixin(func, Object(source));\n\n        each(pairs, function(pair) {\n          var value = pair[1];\n          if (isFunction(value)) {\n            func.prototype[pair[0]] = value;\n          } else {\n            delete func.prototype[pair[0]];\n          }\n        });\n        return func;\n      };\n    },\n    'nthArg': function(nthArg) {\n      return function(n) {\n        var arity = n < 0 ? 1 : (toInteger(n) + 1);\n        return curry(nthArg(n), arity);\n      };\n    },\n    'rearg': function(rearg) {\n      return function(func, indexes) {\n        var arity = indexes ? indexes.length : 0;\n        return curry(rearg(func, indexes), arity);\n      };\n    },\n    'runInContext': function(runInContext) {\n      return function(context) {\n        return baseConvert(util, runInContext(context), options);\n      };\n    }\n  };\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Casts `func` to a function with an arity capped iteratee if needed.\n   *\n   * @private\n   * @param {string} name The name of the function to inspect.\n   * @param {Function} func The function to inspect.\n   * @returns {Function} Returns the cast function.\n   */\n  function castCap(name, func) {\n    if (config.cap) {\n      var indexes = mapping.iterateeRearg[name];\n      if (indexes) {\n        return iterateeRearg(func, indexes);\n      }\n      var n = !isLib && mapping.iterateeAry[name];\n      if (n) {\n        return iterateeAry(func, n);\n      }\n    }\n    return func;\n  }\n\n  /**\n   * Casts `func` to a curried function if needed.\n   *\n   * @private\n   * @param {string} name The name of the function to inspect.\n   * @param {Function} func The function to inspect.\n   * @param {number} n The arity of `func`.\n   * @returns {Function} Returns the cast function.\n   */\n  function castCurry(name, func, n) {\n    return (forceCurry || (config.curry && n > 1))\n      ? curry(func, n)\n      : func;\n  }\n\n  /**\n   * Casts `func` to a fixed arity function if needed.\n   *\n   * @private\n   * @param {string} name The name of the function to inspect.\n   * @param {Function} func The function to inspect.\n   * @param {number} n The arity cap.\n   * @returns {Function} Returns the cast function.\n   */\n  function castFixed(name, func, n) {\n    if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n      var data = mapping.methodSpread[name],\n          start = data && data.start;\n\n      return start  === undefined ? ary(func, n) : flatSpread(func, start);\n    }\n    return func;\n  }\n\n  /**\n   * Casts `func` to an rearged function if needed.\n   *\n   * @private\n   * @param {string} name The name of the function to inspect.\n   * @param {Function} func The function to inspect.\n   * @param {number} n The arity of `func`.\n   * @returns {Function} Returns the cast function.\n   */\n  function castRearg(name, func, n) {\n    return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n      ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n      : func;\n  }\n\n  /**\n   * Creates a clone of `object` by `path`.\n   *\n   * @private\n   * @param {Object} object The object to clone.\n   * @param {Array|string} path The path to clone by.\n   * @returns {Object} Returns the cloned object.\n   */\n  function cloneByPath(object, path) {\n    path = toPath(path);\n\n    var index = -1,\n        length = path.length,\n        lastIndex = length - 1,\n        result = clone(Object(object)),\n        nested = result;\n\n    while (nested != null && ++index < length) {\n      var key = path[index],\n          value = nested[key];\n\n      if (value != null &&\n          !(isFunction(value) || isError(value) || isWeakMap(value))) {\n        nested[key] = clone(index == lastIndex ? value : Object(value));\n      }\n      nested = nested[key];\n    }\n    return result;\n  }\n\n  /**\n   * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n   * version with conversion `options` applied.\n   *\n   * @param {Object} [options] The options object. See `baseConvert` for more details.\n   * @returns {Function} Returns the converted `lodash`.\n   */\n  function convertLib(options) {\n    return _.runInContext.convert(options)(undefined);\n  }\n\n  /**\n   * Create a converter function for `func` of `name`.\n   *\n   * @param {string} name The name of the function to convert.\n   * @param {Function} func The function to convert.\n   * @returns {Function} Returns the new converter function.\n   */\n  function createConverter(name, func) {\n    var realName = mapping.aliasToReal[name] || name,\n        methodName = mapping.remap[realName] || realName,\n        oldOptions = options;\n\n    return function(options) {\n      var newUtil = isLib ? pristine : helpers,\n          newFunc = isLib ? pristine[methodName] : func,\n          newOptions = assign(assign({}, oldOptions), options);\n\n      return baseConvert(newUtil, realName, newFunc, newOptions);\n    };\n  }\n\n  /**\n   * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n   * arguments, ignoring any additional arguments.\n   *\n   * @private\n   * @param {Function} func The function to cap iteratee arguments for.\n   * @param {number} n The arity cap.\n   * @returns {Function} Returns the new function.\n   */\n  function iterateeAry(func, n) {\n    return overArg(func, function(func) {\n      return typeof func == 'function' ? baseAry(func, n) : func;\n    });\n  }\n\n  /**\n   * Creates a function that wraps `func` to invoke its iteratee with arguments\n   * arranged according to the specified `indexes` where the argument value at\n   * the first index is provided as the first argument, the argument value at\n   * the second index is provided as the second argument, and so on.\n   *\n   * @private\n   * @param {Function} func The function to rearrange iteratee arguments for.\n   * @param {number[]} indexes The arranged argument indexes.\n   * @returns {Function} Returns the new function.\n   */\n  function iterateeRearg(func, indexes) {\n    return overArg(func, function(func) {\n      var n = indexes.length;\n      return baseArity(rearg(baseAry(func, n), indexes), n);\n    });\n  }\n\n  /**\n   * Creates a function that invokes `func` with its first argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function() {\n      var length = arguments.length;\n      if (!length) {\n        return func();\n      }\n      var args = Array(length);\n      while (length--) {\n        args[length] = arguments[length];\n      }\n      var index = config.rearg ? 0 : (length - 1);\n      args[index] = transform(args[index]);\n      return func.apply(undefined, args);\n    };\n  }\n\n  /**\n   * Creates a function that wraps `func` and applys the conversions\n   * rules by `name`.\n   *\n   * @private\n   * @param {string} name The name of the function to wrap.\n   * @param {Function} func The function to wrap.\n   * @returns {Function} Returns the converted function.\n   */\n  function wrap(name, func, placeholder) {\n    var result,\n        realName = mapping.aliasToReal[name] || name,\n        wrapped = func,\n        wrapper = wrappers[realName];\n\n    if (wrapper) {\n      wrapped = wrapper(func);\n    }\n    else if (config.immutable) {\n      if (mapping.mutate.array[realName]) {\n        wrapped = wrapImmutable(func, cloneArray);\n      }\n      else if (mapping.mutate.object[realName]) {\n        wrapped = wrapImmutable(func, createCloner(func));\n      }\n      else if (mapping.mutate.set[realName]) {\n        wrapped = wrapImmutable(func, cloneByPath);\n      }\n    }\n    each(aryMethodKeys, function(aryKey) {\n      each(mapping.aryMethod[aryKey], function(otherName) {\n        if (realName == otherName) {\n          var data = mapping.methodSpread[realName],\n              afterRearg = data && data.afterRearg;\n\n          result = afterRearg\n            ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n            : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n          result = castCap(realName, result);\n          result = castCurry(realName, result, aryKey);\n          return false;\n        }\n      });\n      return !result;\n    });\n\n    result || (result = wrapped);\n    if (result == func) {\n      result = forceCurry ? curry(result, 1) : function() {\n        return func.apply(this, arguments);\n      };\n    }\n    result.convert = createConverter(realName, func);\n    result.placeholder = func.placeholder = placeholder;\n\n    return result;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  if (!isObj) {\n    return wrap(name, func, defaultHolder);\n  }\n  var _ = func;\n\n  // Convert methods by ary cap.\n  var pairs = [];\n  each(aryMethodKeys, function(aryKey) {\n    each(mapping.aryMethod[aryKey], function(key) {\n      var func = _[mapping.remap[key] || key];\n      if (func) {\n        pairs.push([key, wrap(key, func, _)]);\n      }\n    });\n  });\n\n  // Convert remaining methods.\n  each(keys(_), function(key) {\n    var func = _[key];\n    if (typeof func == 'function') {\n      var length = pairs.length;\n      while (length--) {\n        if (pairs[length][0] == key) {\n          return;\n        }\n      }\n      func.convert = createConverter(key, func);\n      pairs.push([key, func]);\n    }\n  });\n\n  // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n  each(pairs, function(pair) {\n    _[pair[0]] = pair[1];\n  });\n\n  _.convert = convertLib;\n  _.placeholder = _;\n\n  // Assign aliases.\n  each(keys(_), function(key) {\n    each(mapping.realToAlias[key] || [], function(alias) {\n      _[alias] = _[key];\n    });\n  });\n\n  return _;\n}\n\nmodule.exports = baseConvert;\n\n\n/***/ }),\n/* 477 */\n/***/ (function(module, exports) {\n\n/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n  // Lodash aliases.\n  'each': 'forEach',\n  'eachRight': 'forEachRight',\n  'entries': 'toPairs',\n  'entriesIn': 'toPairsIn',\n  'extend': 'assignIn',\n  'extendAll': 'assignInAll',\n  'extendAllWith': 'assignInAllWith',\n  'extendWith': 'assignInWith',\n  'first': 'head',\n\n  // Methods that are curried variants of others.\n  'conforms': 'conformsTo',\n  'matches': 'isMatch',\n  'property': 'get',\n\n  // Ramda aliases.\n  '__': 'placeholder',\n  'F': 'stubFalse',\n  'T': 'stubTrue',\n  'all': 'every',\n  'allPass': 'overEvery',\n  'always': 'constant',\n  'any': 'some',\n  'anyPass': 'overSome',\n  'apply': 'spread',\n  'assoc': 'set',\n  'assocPath': 'set',\n  'complement': 'negate',\n  'compose': 'flowRight',\n  'contains': 'includes',\n  'dissoc': 'unset',\n  'dissocPath': 'unset',\n  'dropLast': 'dropRight',\n  'dropLastWhile': 'dropRightWhile',\n  'equals': 'isEqual',\n  'identical': 'eq',\n  'indexBy': 'keyBy',\n  'init': 'initial',\n  'invertObj': 'invert',\n  'juxt': 'over',\n  'omitAll': 'omit',\n  'nAry': 'ary',\n  'path': 'get',\n  'pathEq': 'matchesProperty',\n  'pathOr': 'getOr',\n  'paths': 'at',\n  'pickAll': 'pick',\n  'pipe': 'flow',\n  'pluck': 'map',\n  'prop': 'get',\n  'propEq': 'matchesProperty',\n  'propOr': 'getOr',\n  'props': 'at',\n  'symmetricDifference': 'xor',\n  'symmetricDifferenceBy': 'xorBy',\n  'symmetricDifferenceWith': 'xorWith',\n  'takeLast': 'takeRight',\n  'takeLastWhile': 'takeRightWhile',\n  'unapply': 'rest',\n  'unnest': 'flatten',\n  'useWith': 'overArgs',\n  'where': 'conformsTo',\n  'whereEq': 'isMatch',\n  'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n  '1': [\n    'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n    'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n    'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n    'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n    'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n    'uniqueId', 'words', 'zipAll'\n  ],\n  '2': [\n    'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n    'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n    'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n    'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n    'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n    'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n    'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n    'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n    'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n    'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n    'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n    'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n    'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n    'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n    'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n    'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n    'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n    'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n    'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n    'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n    'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n    'zipObjectDeep'\n  ],\n  '3': [\n    'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n    'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n    'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n    'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n    'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n    'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n    'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n    'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n    'xorWith', 'zipWith'\n  ],\n  '4': [\n    'fill', 'setWith', 'updateWith'\n  ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n  '2': [1, 0],\n  '3': [2, 0, 1],\n  '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n  'dropRightWhile': 1,\n  'dropWhile': 1,\n  'every': 1,\n  'filter': 1,\n  'find': 1,\n  'findFrom': 1,\n  'findIndex': 1,\n  'findIndexFrom': 1,\n  'findKey': 1,\n  'findLast': 1,\n  'findLastFrom': 1,\n  'findLastIndex': 1,\n  'findLastIndexFrom': 1,\n  'findLastKey': 1,\n  'flatMap': 1,\n  'flatMapDeep': 1,\n  'flatMapDepth': 1,\n  'forEach': 1,\n  'forEachRight': 1,\n  'forIn': 1,\n  'forInRight': 1,\n  'forOwn': 1,\n  'forOwnRight': 1,\n  'map': 1,\n  'mapKeys': 1,\n  'mapValues': 1,\n  'partition': 1,\n  'reduce': 2,\n  'reduceRight': 2,\n  'reject': 1,\n  'remove': 1,\n  'some': 1,\n  'takeRightWhile': 1,\n  'takeWhile': 1,\n  'times': 1,\n  'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n  'mapKeys': [1],\n  'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n  'assignInAllWith': [1, 0],\n  'assignInWith': [1, 2, 0],\n  'assignAllWith': [1, 0],\n  'assignWith': [1, 2, 0],\n  'differenceBy': [1, 2, 0],\n  'differenceWith': [1, 2, 0],\n  'getOr': [2, 1, 0],\n  'intersectionBy': [1, 2, 0],\n  'intersectionWith': [1, 2, 0],\n  'isEqualWith': [1, 2, 0],\n  'isMatchWith': [2, 1, 0],\n  'mergeAllWith': [1, 0],\n  'mergeWith': [1, 2, 0],\n  'padChars': [2, 1, 0],\n  'padCharsEnd': [2, 1, 0],\n  'padCharsStart': [2, 1, 0],\n  'pullAllBy': [2, 1, 0],\n  'pullAllWith': [2, 1, 0],\n  'rangeStep': [1, 2, 0],\n  'rangeStepRight': [1, 2, 0],\n  'setWith': [3, 1, 2, 0],\n  'sortedIndexBy': [2, 1, 0],\n  'sortedLastIndexBy': [2, 1, 0],\n  'unionBy': [1, 2, 0],\n  'unionWith': [1, 2, 0],\n  'updateWith': [3, 1, 2, 0],\n  'xorBy': [1, 2, 0],\n  'xorWith': [1, 2, 0],\n  'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n  'assignAll': { 'start': 0 },\n  'assignAllWith': { 'start': 0 },\n  'assignInAll': { 'start': 0 },\n  'assignInAllWith': { 'start': 0 },\n  'defaultsAll': { 'start': 0 },\n  'defaultsDeepAll': { 'start': 0 },\n  'invokeArgs': { 'start': 2 },\n  'invokeArgsMap': { 'start': 2 },\n  'mergeAll': { 'start': 0 },\n  'mergeAllWith': { 'start': 0 },\n  'partial': { 'start': 1 },\n  'partialRight': { 'start': 1 },\n  'without': { 'start': 1 },\n  'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n  'array': {\n    'fill': true,\n    'pull': true,\n    'pullAll': true,\n    'pullAllBy': true,\n    'pullAllWith': true,\n    'pullAt': true,\n    'remove': true,\n    'reverse': true\n  },\n  'object': {\n    'assign': true,\n    'assignAll': true,\n    'assignAllWith': true,\n    'assignIn': true,\n    'assignInAll': true,\n    'assignInAllWith': true,\n    'assignInWith': true,\n    'assignWith': true,\n    'defaults': true,\n    'defaultsAll': true,\n    'defaultsDeep': true,\n    'defaultsDeepAll': true,\n    'merge': true,\n    'mergeAll': true,\n    'mergeAllWith': true,\n    'mergeWith': true,\n  },\n  'set': {\n    'set': true,\n    'setWith': true,\n    'unset': true,\n    'update': true,\n    'updateWith': true\n  }\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n  var hasOwnProperty = Object.prototype.hasOwnProperty,\n      object = exports.aliasToReal,\n      result = {};\n\n  for (var key in object) {\n    var value = object[key];\n    if (hasOwnProperty.call(result, value)) {\n      result[value].push(key);\n    } else {\n      result[value] = [key];\n    }\n  }\n  return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n  'assignAll': 'assign',\n  'assignAllWith': 'assignWith',\n  'assignInAll': 'assignIn',\n  'assignInAllWith': 'assignInWith',\n  'curryN': 'curry',\n  'curryRightN': 'curryRight',\n  'defaultsAll': 'defaults',\n  'defaultsDeepAll': 'defaultsDeep',\n  'findFrom': 'find',\n  'findIndexFrom': 'findIndex',\n  'findLastFrom': 'findLast',\n  'findLastIndexFrom': 'findLastIndex',\n  'getOr': 'get',\n  'includesFrom': 'includes',\n  'indexOfFrom': 'indexOf',\n  'invokeArgs': 'invoke',\n  'invokeArgsMap': 'invokeMap',\n  'lastIndexOfFrom': 'lastIndexOf',\n  'mergeAll': 'merge',\n  'mergeAllWith': 'mergeWith',\n  'padChars': 'pad',\n  'padCharsEnd': 'padEnd',\n  'padCharsStart': 'padStart',\n  'propertyOf': 'get',\n  'rangeStep': 'range',\n  'rangeStepRight': 'rangeRight',\n  'restFrom': 'rest',\n  'spreadFrom': 'spread',\n  'trimChars': 'trim',\n  'trimCharsEnd': 'trimEnd',\n  'trimCharsStart': 'trimStart',\n  'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n  'castArray': true,\n  'flow': true,\n  'flowRight': true,\n  'iteratee': true,\n  'mixin': true,\n  'rearg': true,\n  'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n  'add': true,\n  'assign': true,\n  'assignIn': true,\n  'bind': true,\n  'bindKey': true,\n  'concat': true,\n  'difference': true,\n  'divide': true,\n  'eq': true,\n  'gt': true,\n  'gte': true,\n  'isEqual': true,\n  'lt': true,\n  'lte': true,\n  'matchesProperty': true,\n  'merge': true,\n  'multiply': true,\n  'overArgs': true,\n  'partial': true,\n  'partialRight': true,\n  'propertyOf': true,\n  'random': true,\n  'range': true,\n  'rangeRight': true,\n  'subtract': true,\n  'zip': true,\n  'zipObject': true,\n  'zipObjectDeep': true\n};\n\n\n/***/ }),\n/* 478 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\n  'ary': __webpack_require__(479),\n  'assign': __webpack_require__(181),\n  'clone': __webpack_require__(498),\n  'curry': __webpack_require__(499),\n  'forEach': __webpack_require__(64),\n  'isArray': __webpack_require__(2),\n  'isError': __webpack_require__(500),\n  'isFunction': __webpack_require__(24),\n  'isWeakMap': __webpack_require__(501),\n  'iteratee': __webpack_require__(502),\n  'keys': __webpack_require__(143),\n  'rearg': __webpack_require__(503),\n  'toInteger': __webpack_require__(119),\n  'toPath': __webpack_require__(505)\n};\n\n\n/***/ }),\n/* 479 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createWrap = __webpack_require__(113);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n  n = guard ? undefined : n;\n  n = (func && n == null) ? func.length : n;\n  return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\n\nmodule.exports = ary;\n\n\n/***/ }),\n/* 480 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createCtor = __webpack_require__(75),\n    root = __webpack_require__(5);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n  var isBind = bitmask & WRAP_BIND_FLAG,\n      Ctor = createCtor(func);\n\n  function wrapper() {\n    var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n    return fn.apply(isBind ? thisArg : this, arguments);\n  }\n  return wrapper;\n}\n\nmodule.exports = createBind;\n\n\n/***/ }),\n/* 481 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = __webpack_require__(50),\n    createCtor = __webpack_require__(75),\n    createHybrid = __webpack_require__(213),\n    createRecurry = __webpack_require__(216),\n    getHolder = __webpack_require__(222),\n    replaceHolders = __webpack_require__(118),\n    root = __webpack_require__(5);\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n  var Ctor = createCtor(func);\n\n  function wrapper() {\n    var length = arguments.length,\n        args = Array(length),\n        index = length,\n        placeholder = getHolder(wrapper);\n\n    while (index--) {\n      args[index] = arguments[index];\n    }\n    var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n      ? []\n      : replaceHolders(args, placeholder);\n\n    length -= holders.length;\n    if (length < arity) {\n      return createRecurry(\n        func, bitmask, createHybrid, wrapper.placeholder, undefined,\n        args, holders, undefined, undefined, arity - length);\n    }\n    var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n    return apply(fn, this, args);\n  }\n  return wrapper;\n}\n\nmodule.exports = createCurry;\n\n\n/***/ }),\n/* 482 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n  var length = array.length,\n      result = 0;\n\n  while (length--) {\n    if (array[length] === placeholder) {\n      ++result;\n    }\n  }\n  return result;\n}\n\nmodule.exports = countHolders;\n\n\n/***/ }),\n/* 483 */\n/***/ (function(module, exports) {\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n/***/ }),\n/* 484 */\n/***/ (function(module, exports) {\n\n/** Used to lookup unminified function names. */\nvar realNames = {};\n\nmodule.exports = realNames;\n\n\n/***/ }),\n/* 485 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar LazyWrapper = __webpack_require__(114),\n    LodashWrapper = __webpack_require__(117),\n    baseLodash = __webpack_require__(115),\n    isArray = __webpack_require__(2),\n    isObjectLike = __webpack_require__(6),\n    wrapperClone = __webpack_require__(486);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n *   return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n    if (value instanceof LodashWrapper) {\n      return value;\n    }\n    if (hasOwnProperty.call(value, '__wrapped__')) {\n      return wrapperClone(value);\n    }\n  }\n  return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nmodule.exports = lodash;\n\n\n/***/ }),\n/* 486 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar LazyWrapper = __webpack_require__(114),\n    LodashWrapper = __webpack_require__(117),\n    copyArray = __webpack_require__(30);\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n  if (wrapper instanceof LazyWrapper) {\n    return wrapper.clone();\n  }\n  var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n  result.__actions__ = copyArray(wrapper.__actions__);\n  result.__index__  = wrapper.__index__;\n  result.__values__ = wrapper.__values__;\n  return result;\n}\n\nmodule.exports = wrapperClone;\n\n\n/***/ }),\n/* 487 */\n/***/ (function(module, exports) {\n\n/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n    reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n  var match = source.match(reWrapDetails);\n  return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n\n\n/***/ }),\n/* 488 */\n/***/ (function(module, exports) {\n\n/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n  var length = details.length;\n  if (!length) {\n    return source;\n  }\n  var lastIndex = length - 1;\n  details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n  details = details.join(length > 2 ? ', ' : ' ');\n  return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nmodule.exports = insertWrapDetails;\n\n\n/***/ }),\n/* 489 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayEach = __webpack_require__(64),\n    arrayIncludes = __webpack_require__(490);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n    WRAP_BIND_KEY_FLAG = 2,\n    WRAP_CURRY_FLAG = 8,\n    WRAP_CURRY_RIGHT_FLAG = 16,\n    WRAP_PARTIAL_FLAG = 32,\n    WRAP_PARTIAL_RIGHT_FLAG = 64,\n    WRAP_ARY_FLAG = 128,\n    WRAP_REARG_FLAG = 256,\n    WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n  ['ary', WRAP_ARY_FLAG],\n  ['bind', WRAP_BIND_FLAG],\n  ['bindKey', WRAP_BIND_KEY_FLAG],\n  ['curry', WRAP_CURRY_FLAG],\n  ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n  ['flip', WRAP_FLIP_FLAG],\n  ['partial', WRAP_PARTIAL_FLAG],\n  ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n  ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n  arrayEach(wrapFlags, function(pair) {\n    var value = '_.' + pair[0];\n    if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n      details.push(value);\n    }\n  });\n  return details.sort();\n}\n\nmodule.exports = updateWrapDetails;\n\n\n/***/ }),\n/* 490 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIndexOf = __webpack_require__(221);\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n  var length = array == null ? 0 : array.length;\n  return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n/***/ }),\n/* 491 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n  var length = array.length,\n      index = fromIndex + (fromRight ? 1 : -1);\n\n  while ((fromRight ? index-- : ++index < length)) {\n    if (predicate(array[index], index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n/***/ }),\n/* 492 */\n/***/ (function(module, exports) {\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n  return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n/***/ }),\n/* 493 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n/***/ }),\n/* 494 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar copyArray = __webpack_require__(30),\n    isIndex = __webpack_require__(62);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n  var arrLength = array.length,\n      length = nativeMin(indexes.length, arrLength),\n      oldArray = copyArray(array);\n\n  while (length--) {\n    var index = indexes[length];\n    array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n  }\n  return array;\n}\n\nmodule.exports = reorder;\n\n\n/***/ }),\n/* 495 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = __webpack_require__(50),\n    createCtor = __webpack_require__(75),\n    root = __webpack_require__(5);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n *  the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n  var isBind = bitmask & WRAP_BIND_FLAG,\n      Ctor = createCtor(func);\n\n  function wrapper() {\n    var argsIndex = -1,\n        argsLength = arguments.length,\n        leftIndex = -1,\n        leftLength = partials.length,\n        args = Array(leftLength + argsLength),\n        fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n    while (++leftIndex < leftLength) {\n      args[leftIndex] = partials[leftIndex];\n    }\n    while (argsLength--) {\n      args[leftIndex++] = arguments[++argsIndex];\n    }\n    return apply(fn, isBind ? thisArg : this, args);\n  }\n  return wrapper;\n}\n\nmodule.exports = createPartial;\n\n\n/***/ }),\n/* 496 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar composeArgs = __webpack_require__(214),\n    composeArgsRight = __webpack_require__(215),\n    replaceHolders = __webpack_require__(118);\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n    WRAP_BIND_KEY_FLAG = 2,\n    WRAP_CURRY_BOUND_FLAG = 4,\n    WRAP_CURRY_FLAG = 8,\n    WRAP_ARY_FLAG = 128,\n    WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n  var bitmask = data[1],\n      srcBitmask = source[1],\n      newBitmask = bitmask | srcBitmask,\n      isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n  var isCombo =\n    ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n    ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n    ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n  // Exit early if metadata can't be merged.\n  if (!(isCommon || isCombo)) {\n    return data;\n  }\n  // Use source `thisArg` if available.\n  if (srcBitmask & WRAP_BIND_FLAG) {\n    data[2] = source[2];\n    // Set when currying a bound function.\n    newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n  }\n  // Compose partial arguments.\n  var value = source[3];\n  if (value) {\n    var partials = data[3];\n    data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n    data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n  }\n  // Compose partial right arguments.\n  value = source[5];\n  if (value) {\n    partials = data[5];\n    data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n    data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n  }\n  // Use source `argPos` if available.\n  value = source[7];\n  if (value) {\n    data[7] = value;\n  }\n  // Use source `ary` if it's smaller.\n  if (srcBitmask & WRAP_ARY_FLAG) {\n    data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n  }\n  // Use source `arity` if one is not provided.\n  if (data[9] == null) {\n    data[9] = source[9];\n  }\n  // Use source `func` and merge bitmasks.\n  data[0] = source[0];\n  data[1] = newBitmask;\n\n  return data;\n}\n\nmodule.exports = mergeData;\n\n\n/***/ }),\n/* 497 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(7),\n    isSymbol = __webpack_require__(34);\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n/***/ }),\n/* 498 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseClone = __webpack_require__(104);\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n  return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n\n\n/***/ }),\n/* 499 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createWrap = __webpack_require__(113);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n *   return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n  arity = guard ? undefined : arity;\n  var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n  result.placeholder = curry.placeholder;\n  return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nmodule.exports = curry;\n\n\n/***/ }),\n/* 500 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isObjectLike = __webpack_require__(6),\n    isPlainObject = __webpack_require__(139);\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n    errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n  if (!isObjectLike(value)) {\n    return false;\n  }\n  var tag = baseGetTag(value);\n  return tag == errorTag || tag == domExcTag ||\n    (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\nmodule.exports = isError;\n\n\n/***/ }),\n/* 501 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar getTag = __webpack_require__(41),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n  return isObjectLike(value) && getTag(value) == weakMapTag;\n}\n\nmodule.exports = isWeakMap;\n\n\n/***/ }),\n/* 502 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseClone = __webpack_require__(104),\n    baseIteratee = __webpack_require__(33);\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n *   { 'user': 'barney', 'age': 36, 'active': true },\n *   { 'user': 'fred',   'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n *     return func.test(string);\n *   };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n  return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nmodule.exports = iteratee;\n\n\n/***/ }),\n/* 503 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createWrap = __webpack_require__(113),\n    flatRest = __webpack_require__(224);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n *   return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function(func, indexes) {\n  return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\n\nmodule.exports = rearg;\n\n\n/***/ }),\n/* 504 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseFlatten = __webpack_require__(107);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n\n\n/***/ }),\n/* 505 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(40),\n    copyArray = __webpack_require__(30),\n    isArray = __webpack_require__(2),\n    isSymbol = __webpack_require__(34),\n    stringToPath = __webpack_require__(156),\n    toKey = __webpack_require__(42),\n    toString = __webpack_require__(157);\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n  if (isArray(value)) {\n    return arrayMap(value, toKey);\n  }\n  return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n}\n\nmodule.exports = toPath;\n\n\n/***/ }),\n/* 506 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('flow', __webpack_require__(507));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 507 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createFlow = __webpack_require__(508);\n\n/**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n *   return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flow = createFlow();\n\nmodule.exports = flow;\n\n\n/***/ }),\n/* 508 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar LodashWrapper = __webpack_require__(117),\n    flatRest = __webpack_require__(224),\n    getData = __webpack_require__(116),\n    getFuncName = __webpack_require__(218),\n    isArray = __webpack_require__(2),\n    isLaziable = __webpack_require__(217);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8,\n    WRAP_PARTIAL_FLAG = 32,\n    WRAP_ARY_FLAG = 128,\n    WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\nfunction createFlow(fromRight) {\n  return flatRest(function(funcs) {\n    var length = funcs.length,\n        index = length,\n        prereq = LodashWrapper.prototype.thru;\n\n    if (fromRight) {\n      funcs.reverse();\n    }\n    while (index--) {\n      var func = funcs[index];\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n        var wrapper = new LodashWrapper([], true);\n      }\n    }\n    index = wrapper ? index : length;\n    while (++index < length) {\n      func = funcs[index];\n\n      var funcName = getFuncName(func),\n          data = funcName == 'wrapper' ? getData(func) : undefined;\n\n      if (data && isLaziable(data[0]) &&\n            data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n            !data[4].length && data[9] == 1\n          ) {\n        wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n      } else {\n        wrapper = (func.length == 1 && isLaziable(func))\n          ? wrapper[funcName]()\n          : wrapper.thru(func);\n      }\n    }\n    return function() {\n      var args = arguments,\n          value = args[0];\n\n      if (wrapper && args.length == 1 && isArray(value)) {\n        return wrapper.plant(value).value();\n      }\n      var index = 0,\n          result = length ? funcs[index].apply(this, args) : value;\n\n      while (++index < length) {\n        result = funcs[index].call(this, result);\n      }\n      return result;\n    };\n  });\n}\n\nmodule.exports = createFlow;\n\n\n/***/ }),\n/* 509 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('concat', __webpack_require__(510));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 510 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayPush = __webpack_require__(65),\n    baseFlatten = __webpack_require__(107),\n    copyArray = __webpack_require__(30),\n    isArray = __webpack_require__(2);\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n  var length = arguments.length;\n  if (!length) {\n    return [];\n  }\n  var args = Array(length - 1),\n      array = arguments[0],\n      index = length;\n\n  while (index--) {\n    args[index - 1] = arguments[index];\n  }\n  return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nmodule.exports = concat;\n\n\n/***/ }),\n/* 511 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('filter', __webpack_require__(512));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 512 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayFilter = __webpack_require__(149),\n    baseFilter = __webpack_require__(513),\n    baseIteratee = __webpack_require__(33),\n    isArray = __webpack_require__(2);\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n *   { 'user': 'barney', 'age': 36, 'active': true },\n *   { 'user': 'fred',   'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\nfunction filter(collection, predicate) {\n  var func = isArray(collection) ? arrayFilter : baseFilter;\n  return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n\n\n/***/ }),\n/* 513 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseEach = __webpack_require__(39);\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n  var result = [];\n  baseEach(collection, function(value, index, collection) {\n    if (predicate(value, index, collection)) {\n      result.push(value);\n    }\n  });\n  return result;\n}\n\nmodule.exports = baseFilter;\n\n\n/***/ }),\n/* 514 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(515);\n\n\n/***/ }),\n/* 515 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('head', __webpack_require__(516), __webpack_require__(517));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 516 */\n/***/ (function(module, exports) {\n\n/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n  return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n\n\n/***/ }),\n/* 517 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\n  'cap': false,\n  'curry': false,\n  'fixed': false,\n  'immutable': false,\n  'rearg': false\n};\n\n\n/***/ }),\n/* 518 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar convert = __webpack_require__(37),\n    func = convert('reverse', __webpack_require__(519));\n\nfunc.placeholder = __webpack_require__(26);\nmodule.exports = func;\n\n\n/***/ }),\n/* 519 */\n/***/ (function(module, exports) {\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeReverse = arrayProto.reverse;\n\n/**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\nfunction reverse(array) {\n  return array == null ? array : nativeReverse.call(array);\n}\n\nmodule.exports = reverse;\n\n\n/***/ }),\n/* 520 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = band;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = point;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ordinal__ = __webpack_require__(226);\n\n\n\nfunction band() {\n  var scale = Object(__WEBPACK_IMPORTED_MODULE_1__ordinal__[\"a\" /* default */])().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      range = [0, 1],\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = range[1] < range[0],\n        start = range[reverse - 0],\n        stop = range[1 - reverse];\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"range\"])(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = [+_[0], +_[1]], round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band()\n        .domain(domain())\n        .range(range)\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return rescale();\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nfunction point() {\n  return pointish(band().paddingInner(1));\n}\n\n\n/***/ }),\n/* 521 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(120);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var keys = [],\n      sortKeys = [],\n      sortValues,\n      rollup,\n      nest;\n\n  function apply(array, depth, createResult, setResult) {\n    if (depth >= keys.length) {\n      if (sortValues != null) array.sort(sortValues);\n      return rollup != null ? rollup(array) : array;\n    }\n\n    var i = -1,\n        n = array.length,\n        key = keys[depth++],\n        keyValue,\n        value,\n        valuesByKey = Object(__WEBPACK_IMPORTED_MODULE_0__map__[\"a\" /* default */])(),\n        values,\n        result = createResult();\n\n    while (++i < n) {\n      if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n        values.push(value);\n      } else {\n        valuesByKey.set(keyValue, [value]);\n      }\n    }\n\n    valuesByKey.each(function(values, key) {\n      setResult(result, key, apply(values, depth, createResult, setResult));\n    });\n\n    return result;\n  }\n\n  function entries(map, depth) {\n    if (++depth > keys.length) return map;\n    var array, sortKey = sortKeys[depth - 1];\n    if (rollup != null && depth >= keys.length) array = map.entries();\n    else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });\n    return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;\n  }\n\n  return nest = {\n    object: function(array) { return apply(array, 0, createObject, setObject); },\n    map: function(array) { return apply(array, 0, createMap, setMap); },\n    entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },\n    key: function(d) { keys.push(d); return nest; },\n    sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },\n    sortValues: function(order) { sortValues = order; return nest; },\n    rollup: function(f) { rollup = f; return nest; }\n  };\n});\n\nfunction createObject() {\n  return {};\n}\n\nfunction setObject(object, key, value) {\n  object[key] = value;\n}\n\nfunction createMap() {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__map__[\"a\" /* default */])();\n}\n\nfunction setMap(map, key, value) {\n  map.set(key, value);\n}\n\n\n/***/ }),\n/* 522 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(120);\n\n\nfunction Set() {}\n\nvar proto = __WEBPACK_IMPORTED_MODULE_0__map__[\"a\" /* default */].prototype;\n\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function(value) {\n    value += \"\";\n    this[__WEBPACK_IMPORTED_MODULE_0__map__[\"b\" /* prefix */] + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set;\n\n  // Copy constructor.\n  if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n  // Otherwise, assume it’s an array.\n  else if (object) {\n    var i = -1, n = object.length;\n    if (f == null) while (++i < n) set.add(object[i]);\n    else while (++i < n) set.add(f(object[i], i, object));\n  }\n\n  return set;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (set);\n\n\n/***/ }),\n/* 523 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(map) {\n  var keys = [];\n  for (var key in map) keys.push(key);\n  return keys;\n});\n\n\n/***/ }),\n/* 524 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(map) {\n  var values = [];\n  for (var key in map) values.push(map[key]);\n  return values;\n});\n\n\n/***/ }),\n/* 525 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(map) {\n  var entries = [];\n  for (var key in map) entries.push({key: key, value: map[key]});\n  return entries;\n});\n\n\n/***/ }),\n/* 526 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = identity;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__linear__ = __webpack_require__(48);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__number__ = __webpack_require__(228);\n\n\n\n\nfunction identity() {\n  var domain = [0, 1];\n\n  function scale(x) {\n    return +x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_0__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_2__number__[\"a\" /* default */]), scale) : domain.slice();\n  };\n\n  scale.copy = function() {\n    return identity().domain(domain);\n  };\n\n  return Object(__WEBPACK_IMPORTED_MODULE_1__linear__[\"b\" /* linearish */])(scale);\n}\n\n\n/***/ }),\n/* 527 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_format__ = __webpack_require__(229);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(domain, count, specifier) {\n  var start = domain[0],\n      stop = domain[domain.length - 1],\n      step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"tickStep\"])(start, stop, count == null ? 10 : count),\n      precision;\n  specifier = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"c\" /* formatSpecifier */])(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"e\" /* precisionPrefix */])(step, value))) specifier.precision = precision;\n      return Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"b\" /* formatPrefix */])(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"f\" /* precisionRound */])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"d\" /* precisionFixed */])(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"a\" /* format */])(specifier);\n});\n\n\n/***/ }),\n/* 528 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return format; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return formatPrefix; });\n/* unused harmony export default */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale__ = __webpack_require__(230);\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(__WEBPACK_IMPORTED_MODULE_0__locale__[\"a\" /* default */])(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n/***/ }),\n/* 529 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n});\n\n\n/***/ }),\n/* 530 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n});\n\n\n/***/ }),\n/* 531 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x, p) {\n  x = x.toPrecision(p);\n\n  out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (x[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      case \"e\": break out;\n      default: if (i0 > 0) i0 = 0; break;\n    }\n  }\n\n  return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n});\n\n\n/***/ }),\n/* 532 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal__ = __webpack_require__(122);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x, p) {\n  var d = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal__[\"a\" /* default */])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n});\n\n\n/***/ }),\n/* 533 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return x;\n});\n\n\n/***/ }),\n/* 534 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent__ = __webpack_require__(77);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(step) {\n  return Math.max(0, -Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(Math.abs(step)));\n});\n\n\n/***/ }),\n/* 535 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent__ = __webpack_require__(77);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(value) / 3))) * 3 - Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(Math.abs(step)));\n});\n\n\n/***/ }),\n/* 536 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent__ = __webpack_require__(77);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(max) - Object(__WEBPACK_IMPORTED_MODULE_0__exponent__[\"a\" /* default */])(step)) + 1;\n});\n\n\n/***/ }),\n/* 537 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = log;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_format__ = __webpack_require__(229);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(121);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__nice__ = __webpack_require__(234);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__continuous__ = __webpack_require__(76);\n\n\n\n\n\n\nfunction deinterpolate(a, b) {\n  return (b = Math.log(b / a))\n      ? function(x) { return Math.log(x / a) / b; }\n      : Object(__WEBPACK_IMPORTED_MODULE_2__constant__[\"a\" /* default */])(b);\n}\n\nfunction reinterpolate(a, b) {\n  return a < 0\n      ? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }\n      : function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n  return function(x) {\n    return -f(-x);\n  };\n}\n\nfunction log() {\n  var scale = Object(__WEBPACK_IMPORTED_MODULE_4__continuous__[\"b\" /* default */])(deinterpolate, reinterpolate).domain([1, 10]),\n      domain = scale.domain,\n      base = 10,\n      logs = logp(10),\n      pows = powp(10);\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = function(count) {\n    var d = domain(),\n        u = d[0],\n        v = d[d.length - 1],\n        r;\n\n    if (r = v < u) i = u, u = v, v = i;\n\n    var i = logs(u),\n        j = logs(v),\n        p,\n        k,\n        t,\n        n = count == null ? 10 : +count,\n        z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.round(i) - 1, j = Math.round(j) + 1;\n      if (u > 0) for (; i < j; ++i) {\n        for (k = 1, p = pows(i); k < base; ++k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i < j; ++i) {\n        for (k = base - 1, p = pows(i); k >= 1; --k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n    } else {\n      z = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"ticks\"])(i, j, Math.min(j - i, n)).map(pows);\n    }\n\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n    if (typeof specifier !== \"function\") specifier = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__[\"a\" /* format */])(specifier);\n    if (count === Infinity) return specifier;\n    if (count == null) count = 10;\n    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return function(d) {\n      var i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = function() {\n    return domain(Object(__WEBPACK_IMPORTED_MODULE_3__nice__[\"a\" /* default */])(domain(), {\n      floor: function(x) { return pows(Math.floor(logs(x))); },\n      ceil: function(x) { return pows(Math.ceil(logs(x))); }\n    }));\n  };\n\n  scale.copy = function() {\n    return Object(__WEBPACK_IMPORTED_MODULE_4__continuous__[\"a\" /* copy */])(scale, log().base(base));\n  };\n\n  return scale;\n}\n\n\n/***/ }),\n/* 538 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = pow;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = sqrt;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(121);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__linear__ = __webpack_require__(48);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__continuous__ = __webpack_require__(76);\n\n\n\n\nfunction raise(x, exponent) {\n  return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n}\n\nfunction pow() {\n  var exponent = 1,\n      scale = Object(__WEBPACK_IMPORTED_MODULE_2__continuous__[\"b\" /* default */])(deinterpolate, reinterpolate),\n      domain = scale.domain;\n\n  function deinterpolate(a, b) {\n    return (b = raise(b, exponent) - (a = raise(a, exponent)))\n        ? function(x) { return (raise(x, exponent) - a) / b; }\n        : Object(__WEBPACK_IMPORTED_MODULE_0__constant__[\"a\" /* default */])(b);\n  }\n\n  function reinterpolate(a, b) {\n    b = raise(b, exponent) - (a = raise(a, exponent));\n    return function(t) { return raise(a + b * t, 1 / exponent); };\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, domain(domain())) : exponent;\n  };\n\n  scale.copy = function() {\n    return Object(__WEBPACK_IMPORTED_MODULE_2__continuous__[\"a\" /* copy */])(scale, pow().exponent(exponent));\n  };\n\n  return Object(__WEBPACK_IMPORTED_MODULE_1__linear__[\"b\" /* linearish */])(scale);\n}\n\nfunction sqrt() {\n  return pow().exponent(0.5);\n}\n\n\n/***/ }),\n/* 539 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = quantile;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(27);\n\n\n\nfunction quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [];\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"quantile\"])(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    if (!isNaN(x = +x)) return range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"bisect\"])(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"ascending\"]);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range);\n  };\n\n  return scale;\n}\n\n\n/***/ }),\n/* 540 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = quantize;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear__ = __webpack_require__(48);\n\n\n\n\nfunction quantize() {\n  var x0 = 0,\n      x1 = 1,\n      n = 1,\n      domain = [0.5],\n      range = [0, 1];\n\n  function scale(x) {\n    if (x <= x) return range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"bisect\"])(domain, x, 0, n)];\n  }\n\n  function rescale() {\n    var i = -1;\n    domain = new Array(n);\n    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n    return scale;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (n = (range = __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(_)).length - 1, rescale()) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN]\n        : i < 1 ? [x0, domain[0]]\n        : i >= n ? [domain[n - 1], x1]\n        : [domain[i - 1], domain[i]];\n  };\n\n  scale.copy = function() {\n    return quantize()\n        .domain([x0, x1])\n        .range(range);\n  };\n\n  return Object(__WEBPACK_IMPORTED_MODULE_2__linear__[\"b\" /* linearish */])(scale);\n}\n\n\n/***/ }),\n/* 541 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = threshold;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(27);\n\n\n\nfunction threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      n = 1;\n\n  function scale(x) {\n    if (x <= x) return range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"bisect\"])(domain, x, 0, n)];\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__[\"b\" /* slice */].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range);\n  };\n\n  return scale;\n}\n\n\n/***/ }),\n/* 542 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export milliseconds */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n\n\nvar millisecond = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (millisecond);\nvar milliseconds = millisecond.range;\n\n\n/***/ }),\n/* 543 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export seconds */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar second = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setTime(Math.floor(date / __WEBPACK_IMPORTED_MODULE_1__duration__[\"d\" /* durationSecond */]) * __WEBPACK_IMPORTED_MODULE_1__duration__[\"d\" /* durationSecond */]);\n}, function(date, step) {\n  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration__[\"d\" /* durationSecond */]);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"d\" /* durationSecond */];\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (second);\nvar seconds = second.range;\n\n\n/***/ }),\n/* 544 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export minutes */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar minute = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setTime(Math.floor(date / __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]) * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]);\n}, function(date, step) {\n  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */];\n}, function(date) {\n  return date.getMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (minute);\nvar minutes = minute.range;\n\n\n/***/ }),\n/* 545 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export hours */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar hour = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  var offset = date.getTimezoneOffset() * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */] % __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */];\n  if (offset < 0) offset += __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */];\n  date.setTime(Math.floor((+date - offset) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */]) * __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */] + offset);\n}, function(date, step) {\n  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */]);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */];\n}, function(date) {\n  return date.getHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (hour);\nvar hours = hour.range;\n\n\n/***/ }),\n/* 546 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export days */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar day = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setDate(date.getDate() + step);\n}, function(start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"a\" /* durationDay */];\n}, function(date) {\n  return date.getDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (day);\nvar days = day.range;\n\n\n/***/ }),\n/* 547 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return sunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return monday; });\n/* unused harmony export tuesday */\n/* unused harmony export wednesday */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return thursday; });\n/* unused harmony export friday */\n/* unused harmony export saturday */\n/* unused harmony export sundays */\n/* unused harmony export mondays */\n/* unused harmony export tuesdays */\n/* unused harmony export wednesdays */\n/* unused harmony export thursdays */\n/* unused harmony export fridays */\n/* unused harmony export saturdays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nfunction weekday(i) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"e\" /* durationWeek */];\n  });\n}\n\nvar sunday = weekday(0);\nvar monday = weekday(1);\nvar tuesday = weekday(2);\nvar wednesday = weekday(3);\nvar thursday = weekday(4);\nvar friday = weekday(5);\nvar saturday = weekday(6);\n\nvar sundays = sunday.range;\nvar mondays = monday.range;\nvar tuesdays = tuesday.range;\nvar wednesdays = wednesday.range;\nvar thursdays = thursday.range;\nvar fridays = friday.range;\nvar saturdays = saturday.range;\n\n\n/***/ }),\n/* 548 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export months */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n\n\nvar month = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (month);\nvar months = month.range;\n\n\n/***/ }),\n/* 549 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export years */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n\n\nvar year = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (year);\nvar years = year.range;\n\n\n/***/ }),\n/* 550 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export utcMinutes */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar utcMinute = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */]);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"c\" /* durationMinute */];\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (utcMinute);\nvar utcMinutes = utcMinute.range;\n\n\n/***/ }),\n/* 551 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export utcHours */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar utcHour = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */]);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"b\" /* durationHour */];\n}, function(date) {\n  return date.getUTCHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (utcHour);\nvar utcHours = utcHour.range;\n\n\n/***/ }),\n/* 552 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export utcDays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nvar utcDay = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"a\" /* durationDay */];\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (utcDay);\nvar utcDays = utcDay.range;\n\n\n/***/ }),\n/* 553 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return utcSunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return utcMonday; });\n/* unused harmony export utcTuesday */\n/* unused harmony export utcWednesday */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return utcThursday; });\n/* unused harmony export utcFriday */\n/* unused harmony export utcSaturday */\n/* unused harmony export utcSundays */\n/* unused harmony export utcMondays */\n/* unused harmony export utcTuesdays */\n/* unused harmony export utcWednesdays */\n/* unused harmony export utcThursdays */\n/* unused harmony export utcFridays */\n/* unused harmony export utcSaturdays */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration__ = __webpack_require__(15);\n\n\n\nfunction utcWeekday(i) {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration__[\"e\" /* durationWeek */];\n  });\n}\n\nvar utcSunday = utcWeekday(0);\nvar utcMonday = utcWeekday(1);\nvar utcTuesday = utcWeekday(2);\nvar utcWednesday = utcWeekday(3);\nvar utcThursday = utcWeekday(4);\nvar utcFriday = utcWeekday(5);\nvar utcSaturday = utcWeekday(6);\n\nvar utcSundays = utcSunday.range;\nvar utcMondays = utcMonday.range;\nvar utcTuesdays = utcTuesday.range;\nvar utcWednesdays = utcWednesday.range;\nvar utcThursdays = utcThursday.range;\nvar utcFridays = utcFriday.range;\nvar utcSaturdays = utcSaturday.range;\n\n\n/***/ }),\n/* 554 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export utcMonths */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n\n\nvar utcMonth = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (utcMonth);\nvar utcMonths = utcMonth.range;\n\n\n/***/ }),\n/* 555 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export utcYears */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval__ = __webpack_require__(4);\n\n\nvar utcYear = Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(__WEBPACK_IMPORTED_MODULE_0__interval__[\"a\" /* default */])(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (utcYear);\nvar utcYears = utcYear.range;\n\n\n/***/ }),\n/* 556 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isoFormat__ = __webpack_require__(238);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defaultLocale__ = __webpack_require__(124);\n\n\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : Object(__WEBPACK_IMPORTED_MODULE_1__defaultLocale__[\"c\" /* utcParse */])(__WEBPACK_IMPORTED_MODULE_0__isoFormat__[\"a\" /* isoSpecifier */]);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (parseIso);\n\n\n/***/ }),\n/* 557 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__time__ = __webpack_require__(235);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_time_format__ = __webpack_require__(236);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_time__ = __webpack_require__(123);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  return Object(__WEBPACK_IMPORTED_MODULE_0__time__[\"a\" /* calendar */])(__WEBPACK_IMPORTED_MODULE_2_d3_time__[\"v\" /* utcYear */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"q\" /* utcMonth */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"u\" /* utcWeek */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"l\" /* utcDay */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"m\" /* utcHour */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"o\" /* utcMinute */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"r\" /* utcSecond */], __WEBPACK_IMPORTED_MODULE_2_d3_time__[\"n\" /* utcMillisecond */], __WEBPACK_IMPORTED_MODULE_1_d3_time_format__[\"b\" /* utcFormat */]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);\n});\n\n\n/***/ }),\n/* 558 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(49);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n\n\n/***/ }),\n/* 559 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(49);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6\"));\n\n\n/***/ }),\n/* 560 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(49);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9\"));\n\n\n/***/ }),\n/* 561 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(49);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5\"));\n\n\n/***/ }),\n/* 562 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(300, 0.5, 0.0), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(-240, 0.5, 1.0)));\n\n\n/***/ }),\n/* 563 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cool; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n\n\n\nvar warm = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(-100, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(80, 1.50, 0.8));\n\nvar cool = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(260, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(80, 1.50, 0.8));\n\nvar rainbow = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])();\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  rainbow.h = 360 * t - 100;\n  rainbow.s = 1.5 - 1.5 * ts;\n  rainbow.l = 0.8 - 0.9 * ts;\n  return rainbow + \"\";\n});\n\n\n/***/ }),\n/* 564 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return plasma; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(49);\n\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n\n\n/***/ }),\n/* 565 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = sequential;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(48);\n\n\nfunction sequential(interpolator) {\n  var x0 = 0,\n      x1 = 1,\n      clamp = false;\n\n  function scale(x) {\n    var t = (x - x0) / (x1 - x0);\n    return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (x0 = +_[0], x1 = +_[1], scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.copy = function() {\n    return sequential(interpolator).domain([x0, x1]).clamp(clamp);\n  };\n\n  return Object(__WEBPACK_IMPORTED_MODULE_0__linear__[\"b\" /* linearish */])(scale);\n}\n\n\n/***/ }),\n/* 566 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.buildColorValue = buildColorValue;\n\nvar _isFunction = __webpack_require__(24);\n\nvar _isFunction2 = _interopRequireDefault(_isFunction);\n\nvar _d3Scale = __webpack_require__(225);\n\nvar _d3ScaleChromatic = __webpack_require__(567);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar palettes = {\n  BrBG: _d3ScaleChromatic.interpolateBrBG,\n  PRGn: _d3ScaleChromatic.interpolatePRGn,\n  PiYG: _d3ScaleChromatic.interpolatePiYG,\n  PuOr: _d3ScaleChromatic.interpolatePuOr,\n  RdBu: _d3ScaleChromatic.interpolateRdBu,\n  RdGy: _d3ScaleChromatic.interpolateRdGy,\n  RdYlBu: _d3ScaleChromatic.interpolateRdYlBu,\n  RdYlGn: _d3ScaleChromatic.interpolateRdYlGn,\n  Spectral: _d3ScaleChromatic.interpolateSpectral,\n  Blues: _d3ScaleChromatic.interpolateBlues,\n  Greens: _d3ScaleChromatic.interpolateGreens,\n  Greys: _d3ScaleChromatic.interpolateGreys,\n  Oranges: _d3ScaleChromatic.interpolateOranges,\n  Purples: _d3ScaleChromatic.interpolatePurples,\n  Reds: _d3ScaleChromatic.interpolateReds,\n  BuGn: _d3ScaleChromatic.interpolateBuGn,\n  BuPu: _d3ScaleChromatic.interpolateBuPu,\n  GnBu: _d3ScaleChromatic.interpolateGnBu,\n  OrRd: _d3ScaleChromatic.interpolateOrRd,\n  PuBuGn: _d3ScaleChromatic.interpolatePuBuGn,\n  PuBu: _d3ScaleChromatic.interpolatePuBu,\n  PuRd: _d3ScaleChromatic.interpolatePuRd,\n  RdPu: _d3ScaleChromatic.interpolateRdPu,\n  YlGnBu: _d3ScaleChromatic.interpolateYlGnBu,\n  YlGn: _d3ScaleChromatic.interpolateYlGn,\n  YlOrBr: _d3ScaleChromatic.interpolateYlOrBr,\n  YlOrRd: _d3ScaleChromatic.interpolateYlOrRd\n};\n\nfunction buildColorValue(color) {\n  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var logScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  var logScaleBase = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Math.E;\n\n  if ((0, _isFunction2.default)(color)) {\n    return color;\n  }\n  var reverse = color[0] === '-';\n  var paletteName = color[0] === '-' ? color.slice(1) : color;\n  if (palettes[paletteName]) {\n    var scale = buildColorScale(palettes[paletteName], min, max, reverse, logScale, logScaleBase);\n    return function (d) {\n      return scale(d.value);\n    };\n  }\n  return color;\n}\n\nvar buildColorScale = function buildColorScale(interpolator, min, max) {\n  var reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  var logScale = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n  var logScaleBase = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : Math.E;\n\n  if (logScale && min * max <= 0) {\n    console.warn('As log(0) = -\\u221E, a log scale domain must be\\n      strictly-positive or strictly-negative. logscale ignored');\n  }\n\n  if (logScale && min * max > 0) {\n    var scale = (0, _d3Scale.scaleLog)().base(logScaleBase).domain(reverse ? [max, min] : [min, max]).range([0, 1]);\n    return (0, _d3Scale.scaleSequential)(function (t) {\n      return interpolator(scale(t));\n    }).domain([0, 1]);\n  }\n  return (0, _d3Scale.scaleSequential)(interpolator).domain(reverse ? [max, min] : [min, max]);\n};\n\n/***/ }),\n/* 567 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_category10__ = __webpack_require__(568);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return __WEBPACK_IMPORTED_MODULE_0__categorical_category10__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__categorical_Accent__ = __webpack_require__(569);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return __WEBPACK_IMPORTED_MODULE_1__categorical_Accent__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__categorical_Dark2__ = __webpack_require__(570);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return __WEBPACK_IMPORTED_MODULE_2__categorical_Dark2__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__categorical_Paired__ = __webpack_require__(571);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return __WEBPACK_IMPORTED_MODULE_3__categorical_Paired__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__categorical_Pastel1__ = __webpack_require__(572);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return __WEBPACK_IMPORTED_MODULE_4__categorical_Pastel1__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__categorical_Pastel2__ = __webpack_require__(573);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return __WEBPACK_IMPORTED_MODULE_5__categorical_Pastel2__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__categorical_Set1__ = __webpack_require__(574);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return __WEBPACK_IMPORTED_MODULE_6__categorical_Set1__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__categorical_Set2__ = __webpack_require__(575);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return __WEBPACK_IMPORTED_MODULE_7__categorical_Set2__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__categorical_Set3__ = __webpack_require__(576);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return __WEBPACK_IMPORTED_MODULE_8__categorical_Set3__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__diverging_BrBG__ = __webpack_require__(577);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return __WEBPACK_IMPORTED_MODULE_9__diverging_BrBG__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return __WEBPACK_IMPORTED_MODULE_9__diverging_BrBG__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__diverging_PRGn__ = __webpack_require__(578);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return __WEBPACK_IMPORTED_MODULE_10__diverging_PRGn__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return __WEBPACK_IMPORTED_MODULE_10__diverging_PRGn__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__diverging_PiYG__ = __webpack_require__(579);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return __WEBPACK_IMPORTED_MODULE_11__diverging_PiYG__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return __WEBPACK_IMPORTED_MODULE_11__diverging_PiYG__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__diverging_PuOr__ = __webpack_require__(580);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return __WEBPACK_IMPORTED_MODULE_12__diverging_PuOr__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return __WEBPACK_IMPORTED_MODULE_12__diverging_PuOr__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__diverging_RdBu__ = __webpack_require__(581);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return __WEBPACK_IMPORTED_MODULE_13__diverging_RdBu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return __WEBPACK_IMPORTED_MODULE_13__diverging_RdBu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__diverging_RdGy__ = __webpack_require__(582);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging_RdGy__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging_RdGy__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__diverging_RdYlBu__ = __webpack_require__(583);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return __WEBPACK_IMPORTED_MODULE_15__diverging_RdYlBu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return __WEBPACK_IMPORTED_MODULE_15__diverging_RdYlBu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlGn__ = __webpack_require__(584);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlGn__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlGn__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__diverging_Spectral__ = __webpack_require__(585);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return __WEBPACK_IMPORTED_MODULE_17__diverging_Spectral__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return __WEBPACK_IMPORTED_MODULE_17__diverging_Spectral__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__sequential_multi_BuGn__ = __webpack_require__(586);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return __WEBPACK_IMPORTED_MODULE_18__sequential_multi_BuGn__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return __WEBPACK_IMPORTED_MODULE_18__sequential_multi_BuGn__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuPu__ = __webpack_require__(587);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuPu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuPu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__sequential_multi_GnBu__ = __webpack_require__(588);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return __WEBPACK_IMPORTED_MODULE_20__sequential_multi_GnBu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return __WEBPACK_IMPORTED_MODULE_20__sequential_multi_GnBu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__sequential_multi_OrRd__ = __webpack_require__(589);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return __WEBPACK_IMPORTED_MODULE_21__sequential_multi_OrRd__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return __WEBPACK_IMPORTED_MODULE_21__sequential_multi_OrRd__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__sequential_multi_PuBuGn__ = __webpack_require__(590);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return __WEBPACK_IMPORTED_MODULE_22__sequential_multi_PuBuGn__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return __WEBPACK_IMPORTED_MODULE_22__sequential_multi_PuBuGn__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBu__ = __webpack_require__(591);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuRd__ = __webpack_require__(592);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuRd__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuRd__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__sequential_multi_RdPu__ = __webpack_require__(593);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return __WEBPACK_IMPORTED_MODULE_25__sequential_multi_RdPu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return __WEBPACK_IMPORTED_MODULE_25__sequential_multi_RdPu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__sequential_multi_YlGnBu__ = __webpack_require__(594);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return __WEBPACK_IMPORTED_MODULE_26__sequential_multi_YlGnBu__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return __WEBPACK_IMPORTED_MODULE_26__sequential_multi_YlGnBu__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGn__ = __webpack_require__(595);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGn__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGn__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlOrBr__ = __webpack_require__(596);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlOrBr__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlOrBr__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrRd__ = __webpack_require__(597);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrRd__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrRd__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__sequential_single_Blues__ = __webpack_require__(598);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return __WEBPACK_IMPORTED_MODULE_30__sequential_single_Blues__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return __WEBPACK_IMPORTED_MODULE_30__sequential_single_Blues__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__sequential_single_Greens__ = __webpack_require__(599);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return __WEBPACK_IMPORTED_MODULE_31__sequential_single_Greens__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return __WEBPACK_IMPORTED_MODULE_31__sequential_single_Greens__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greys__ = __webpack_require__(600);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greys__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greys__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__sequential_single_Purples__ = __webpack_require__(601);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return __WEBPACK_IMPORTED_MODULE_33__sequential_single_Purples__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return __WEBPACK_IMPORTED_MODULE_33__sequential_single_Purples__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__sequential_single_Reds__ = __webpack_require__(602);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return __WEBPACK_IMPORTED_MODULE_34__sequential_single_Reds__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return __WEBPACK_IMPORTED_MODULE_34__sequential_single_Reds__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__sequential_single_Oranges__ = __webpack_require__(603);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return __WEBPACK_IMPORTED_MODULE_35__sequential_single_Oranges__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return __WEBPACK_IMPORTED_MODULE_35__sequential_single_Oranges__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__sequential_multi_cubehelix__ = __webpack_require__(604);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return __WEBPACK_IMPORTED_MODULE_36__sequential_multi_cubehelix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__sequential_multi_rainbow__ = __webpack_require__(605);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return __WEBPACK_IMPORTED_MODULE_37__sequential_multi_rainbow__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return __WEBPACK_IMPORTED_MODULE_37__sequential_multi_rainbow__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return __WEBPACK_IMPORTED_MODULE_37__sequential_multi_rainbow__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__sequential_multi_sinebow__ = __webpack_require__(606);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return __WEBPACK_IMPORTED_MODULE_38__sequential_multi_sinebow__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__sequential_multi_viridis__ = __webpack_require__(607);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_viridis__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_viridis__[\"c\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_viridis__[\"b\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_viridis__[\"d\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 568 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n\n\n/***/ }),\n/* 569 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"));\n\n\n/***/ }),\n/* 570 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"));\n\n\n/***/ }),\n/* 571 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"));\n\n\n/***/ }),\n/* 572 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"));\n\n\n/***/ }),\n/* 573 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"));\n\n\n/***/ }),\n/* 574 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"));\n\n\n/***/ }),\n/* 575 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"));\n\n\n/***/ }),\n/* 576 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"));\n\n\n/***/ }),\n/* 577 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 578 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 579 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 580 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 581 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 582 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 583 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 584 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 585 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 586 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 587 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 588 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 589 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 590 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 591 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 592 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 593 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 594 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 595 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 596 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 597 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 598 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 599 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 600 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 601 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 602 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 603 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return scheme; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp__ = __webpack_require__(1);\n\n\n\nvar scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp__[\"a\" /* default */])(scheme));\n\n\n/***/ }),\n/* 604 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(300, 0.5, 0.0), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(-240, 0.5, 1.0)));\n\n\n/***/ }),\n/* 605 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cool; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(8);\n\n\n\nvar warm = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(-100, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(80, 1.50, 0.8));\n\nvar cool = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(260, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])(80, 1.50, 0.8));\n\nvar c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* cubehelix */])();\n\n/* harmony default export */ __webpack_exports__[\"b\"] = (function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n});\n\n\n/***/ }),\n/* 606 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(9);\n\n\nvar c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"f\" /* rgb */])(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n});\n\n\n/***/ }),\n/* 607 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return plasma; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors__ = __webpack_require__(0);\n\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors__[\"a\" /* default */])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n\n\n/***/ }),\n/* 608 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.renderAxes = exports._buildAxesData = undefined;\n\nvar _range = __webpack_require__(609);\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _reduce = __webpack_require__(105);\n\nvar _reduce2 = _interopRequireDefault(_reduce);\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _logger = __webpack_require__(612);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _buildAxisData = function _buildAxisData(value, axesGroup, conf) {\n  return {\n    value: value,\n    thickness: axesGroup.thickness || 1,\n    color: axesGroup.color || '#d3d3d3',\n    opacity: axesGroup.opacity || conf.opacity\n  };\n};\n\nvar _buildAxesData = exports._buildAxesData = function _buildAxesData(conf) {\n  return (0, _reduce2.default)(conf.axes, function (aggregator, axesGroup) {\n    if (!axesGroup.position && !axesGroup.spacing) {\n      _logger2.default.warn('Skipping axe group with no position and spacing defined');\n      return aggregator;\n    }\n    if (axesGroup.position) {\n      aggregator.push(_buildAxisData(axesGroup.position, axesGroup, conf));\n    }\n    if (axesGroup.spacing) {\n      var builtAxes = (0, _range2.default)(axesGroup.start || conf.cmin, axesGroup.end || conf.cmax, axesGroup.spacing).map(function (value) {\n        return _buildAxisData(value, axesGroup, conf);\n      });\n      return aggregator.concat(builtAxes);\n    }\n    return aggregator;\n  }, []);\n};\n\nvar renderAxes = exports.renderAxes = function renderAxes(parentElement, conf, instance, scale) {\n  var axes = _buildAxesData(conf);\n\n  var axis = (0, _d3Shape.arc)().innerRadius(function (d) {\n    return conf.direction === 'in' ? conf.outerRadius - scale(d.value) : conf.innerRadius + scale(d.value);\n  }).outerRadius(function (d) {\n    return conf.direction === 'in' ? conf.outerRadius - scale(d.value) : conf.innerRadius + scale(d.value);\n  }).startAngle(0).endAngle(function (d) {\n    return d.length;\n  });\n\n  var selection = parentElement.selectAll('.axis').data(function (blockData) {\n    var block = instance._layout.blocks[blockData.key];\n    return axes.map(function (d) {\n      return {\n        value: d.value,\n        thickness: d.thickness,\n        color: d.color,\n        opacity: d.opacity,\n        block_id: blockData.key,\n        length: block.end - block.start\n      };\n    });\n  }).enter().append('path').attr('opacity', function (d) {\n    return d.opacity;\n  }).attr('class', 'axis').attr('d', axis).attr('stroke-width', function (d) {\n    return d.thickness;\n  }).attr('stroke', function (d) {\n    return d.color;\n  });\n\n  if (conf.showAxesTooltip) {\n    selection.on('mouseover', function (d, i) {\n      instance.tip.html(d.value).transition().style('opacity', 0.9).style('left', event.pageX + 'px').style('top', event.pageY - 28 + 'px');\n    });\n    selection.on('mouseout', function (d, i) {\n      instance.tip.transition().duration(500).style('opacity', 0);\n    });\n  }\n\n  return selection;\n};\n\n/***/ }),\n/* 609 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar createRange = __webpack_require__(610);\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n\n\n/***/ }),\n/* 610 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseRange = __webpack_require__(611),\n    isIterateeCall = __webpack_require__(63),\n    toFinite = __webpack_require__(223);\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n  return function(start, end, step) {\n    if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n      end = step = undefined;\n    }\n    // Ensure the sign of `-0` is preserved.\n    start = toFinite(start);\n    if (end === undefined) {\n      end = start;\n      start = 0;\n    } else {\n      end = toFinite(end);\n    }\n    step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n    return baseRange(start, end, step, fromRight);\n  };\n}\n\nmodule.exports = createRange;\n\n\n/***/ }),\n/* 611 */\n/***/ (function(module, exports) {\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n    nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n  var index = -1,\n      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n      result = Array(length);\n\n  while (length--) {\n    result[fromRight ? length : ++index] = start;\n    start += step;\n  }\n  return result;\n}\n\nmodule.exports = baseRange;\n\n\n/***/ }),\n/* 612 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = console;\n\n/***/ }),\n/* 613 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseIndexOf = __webpack_require__(221),\n    isArrayLike = __webpack_require__(17),\n    isString = __webpack_require__(614),\n    toInteger = __webpack_require__(119),\n    values = __webpack_require__(615);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n  collection = isArrayLike(collection) ? collection : values(collection);\n  fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n  var length = collection.length;\n  if (fromIndex < 0) {\n    fromIndex = nativeMax(length + fromIndex, 0);\n  }\n  return isString(collection)\n    ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n    : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nmodule.exports = includes;\n\n\n/***/ }),\n/* 614 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseGetTag = __webpack_require__(16),\n    isArray = __webpack_require__(2),\n    isObjectLike = __webpack_require__(6);\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n  return typeof value == 'string' ||\n    (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n\n/***/ }),\n/* 615 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseValues = __webpack_require__(616),\n    keys = __webpack_require__(18);\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n  return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n\n\n/***/ }),\n/* 616 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayMap = __webpack_require__(40);\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n  return arrayMap(props, function(key) {\n    return object[key];\n  });\n}\n\nmodule.exports = baseValues;\n\n\n/***/ }),\n/* 617 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayEvery = __webpack_require__(618),\n    baseEvery = __webpack_require__(619),\n    baseIteratee = __webpack_require__(33),\n    isArray = __webpack_require__(2),\n    isIterateeCall = __webpack_require__(63);\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n *   { 'user': 'barney', 'age': 36, 'active': false },\n *   { 'user': 'fred',   'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n  var func = isArray(collection) ? arrayEvery : baseEvery;\n  if (guard && isIterateeCall(collection, predicate, guard)) {\n    predicate = undefined;\n  }\n  return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = every;\n\n\n/***/ }),\n/* 618 */\n/***/ (function(module, exports) {\n\n/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`.\n */\nfunction arrayEvery(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (!predicate(array[index], index, array)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = arrayEvery;\n\n\n/***/ }),\n/* 619 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar baseEach = __webpack_require__(39);\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n *  else `false`\n */\nfunction baseEvery(collection, predicate) {\n  var result = true;\n  baseEach(collection, function(value, index, collection) {\n    result = !!predicate(value, index, collection);\n    return result;\n  });\n  return result;\n}\n\nmodule.exports = baseEvery;\n\n\n/***/ }),\n/* 620 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _configs = __webpack_require__(22);\n\nvar _d3Shape = __webpack_require__(13);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  strokeColor: {\n    value: '#d3d3d3',\n    iteratee: true\n  },\n  strokeWidth: {\n    value: 0,\n    iteratee: true\n  }\n}, _configs.radial, _configs.common);\n\nvar Highlight = function (_Track) {\n  _inherits(Highlight, _Track);\n\n  function Highlight(instance, conf, data) {\n    _classCallCheck(this, Highlight);\n\n    return _possibleConstructorReturn(this, (Highlight.__proto__ || Object.getPrototypeOf(Highlight)).call(this, instance, conf, defaultConf, data, _dataParser.parseSpanStringData));\n  }\n\n  _createClass(Highlight, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      return parentElement.selectAll('tile').data(function (d) {\n        return d.values;\n      }).enter().append('path').attr('class', 'tile').attr('d', (0, _d3Shape.arc)().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function (d, i) {\n        return _this2.theta(d.start, layout.blocks[d.block_id]);\n      }).endAngle(function (d, i) {\n        return _this2.theta(d.end, layout.blocks[d.block_id]);\n      })).attr('fill', conf.colorValue).attr('opacity', conf.opacity).attr('stroke-width', conf.strokeWidth).attr('stroke', conf.strokeColor);\n    }\n  }]);\n\n  return Highlight;\n}(_Track3.default);\n\nexports.default = Highlight;\n\n/***/ }),\n/* 621 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _configs = __webpack_require__(22);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  direction: {\n    value: 'out',\n    iteratee: false\n  },\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.axes, _configs.radial, _configs.common, _configs.values);\n\nvar Histogram = function (_Track) {\n  _inherits(Histogram, _Track);\n\n  function Histogram(instance, conf, data) {\n    _classCallCheck(this, Histogram);\n\n    return _possibleConstructorReturn(this, (Histogram.__proto__ || Object.getPrototypeOf(Histogram)).call(this, instance, conf, defaultConf, data, _dataParser.parseSpanValueData));\n  }\n\n  _createClass(Histogram, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      var bin = parentElement.selectAll('.bin').data(function (d) {\n        return d.values;\n      }).enter().append('path').attr('class', 'bin').attr('opacity', function (d) {\n        return conf.opacity;\n      }).attr('d', (0, _d3Shape.arc)().innerRadius(function (d) {\n        if (conf.direction == 'in') {\n          return conf.outerRadius - _this2.scale(d.value);\n        }\n        return conf.innerRadius;\n      }).outerRadius(function (d) {\n        if (conf.direction == 'out') {\n          return conf.innerRadius + _this2.scale(d.value);\n        }\n        return conf.outerRadius;\n      }).startAngle(function (d) {\n        return _this2.theta(d.start, layout.blocks[d.block_id]);\n      }).endAngle(function (d) {\n        return _this2.theta(d.end, layout.blocks[d.block_id]);\n      }));\n      bin.attr('fill', conf.colorValue);\n      return bin;\n    }\n  }]);\n\n  return Histogram;\n}(_Track3.default);\n\nexports.default = Histogram;\n\n/***/ }),\n/* 622 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _tooltip = __webpack_require__(209);\n\nvar _d3Chord = __webpack_require__(623);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _isFunction = __webpack_require__(24);\n\nvar _isFunction2 = _interopRequireDefault(_isFunction);\n\nvar _d3Selection = __webpack_require__(3);\n\nvar _configs = __webpack_require__(22);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  radius: {\n    value: null,\n    iteratee: false\n  }\n}, _configs.common, _configs.values);\n\nvar normalizeRadius = function normalizeRadius(radius, layoutRadius) {\n  if (radius >= 1) return radius;\n  return radius * layoutRadius;\n};\n\nvar Chords = function (_Track) {\n  _inherits(Chords, _Track);\n\n  function Chords(instance, conf, data) {\n    _classCallCheck(this, Chords);\n\n    return _possibleConstructorReturn(this, (Chords.__proto__ || Object.getPrototypeOf(Chords)).call(this, instance, conf, defaultConf, data, _dataParser.parseChordData));\n  }\n\n  _createClass(Chords, [{\n    key: 'getCoordinates',\n    value: function getCoordinates(d, layout, conf, datum) {\n      var block = layout.blocks[d.id];\n      var startAngle = block.start + d.start / block.len * (block.end - block.start);\n      var endAngle = block.start + d.end / block.len * (block.end - block.start);\n\n      var radius = void 0;\n      if ((0, _isFunction2.default)(conf.radius)) {\n        radius = normalizeRadius(conf.radius(datum), layout.conf.innerRadius);\n      } else if (conf.radius) {\n        radius = normalizeRadius(conf.radius, layout.conf.innerRadius);\n      }\n\n      if (!radius) {\n        radius = layout.conf.innerRadius;\n      }\n\n      return {\n        radius: radius,\n        startAngle: startAngle,\n        endAngle: endAngle\n      };\n    }\n  }, {\n    key: 'renderChords',\n    value: function renderChords(parentElement, name, conf, data, instance, getCoordinates) {\n      var _this2 = this;\n\n      var track = parentElement.append('g');\n\n      var link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', (0, _d3Chord.ribbon)().source(function (d) {\n        return getCoordinates(d.source, instance._layout, _this2.conf, d);\n      }).target(function (d) {\n        return getCoordinates(d.target, instance._layout, _this2.conf, d);\n      })).attr('opacity', conf.opacity).on('mouseover', function (d) {\n        _this2.dispatch.call('mouseover', _this2, d);\n        instance.clipboard.attr('value', conf.tooltipContent(d));\n      }).on('mouseout', function (d) {\n        return _this2.dispatch.call('mouseout', _this2, d);\n      });\n\n      Object.keys(conf.events).forEach(function (eventName) {\n        link.on(eventName, function (d, i, nodes) {\n          conf.events[eventName](d, i, nodes, _d3Selection.event);\n        });\n      });\n\n      link.attr('fill', conf.colorValue);\n\n      return link;\n    }\n  }, {\n    key: 'render',\n    value: function render(instance, parentElement, name) {\n      parentElement.select('.' + name).remove();\n\n      var track = parentElement.append('g').attr('class', name).attr('z-index', this.conf.zIndex);\n\n      var selection = this.renderChords(track, name, this.conf, this.data, instance, this.getCoordinates);\n      if (this.conf.tooltipContent) {\n        (0, _tooltip.registerTooltip)(this, instance, selection, this.conf);\n      }\n      return this;\n    }\n  }]);\n\n  return Chords;\n}(_Track3.default);\n\nexports.default = Chords;\n\n/***/ }),\n/* 623 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_chord__ = __webpack_require__(624);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return __WEBPACK_IMPORTED_MODULE_0__src_chord__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_ribbon__ = __webpack_require__(625);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_ribbon__[\"a\"]; });\n\n\n\n\n/***/ }),\n/* 624 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math__ = __webpack_require__(239);\n\n\n\nfunction compareValue(compare) {\n  return function(a, b) {\n    return compare(\n      a.source.value + a.target.value,\n      b.source.value + b.target.value\n    );\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var padAngle = 0,\n      sortGroups = null,\n      sortSubgroups = null,\n      sortChords = null;\n\n  function chord(matrix) {\n    var n = matrix.length,\n        groupSums = [],\n        groupIndex = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"range\"])(n),\n        subgroupIndex = [],\n        chords = [],\n        groups = chords.groups = new Array(n),\n        subgroups = new Array(n * n),\n        k,\n        x,\n        x0,\n        dx,\n        i,\n        j;\n\n    // Compute the sum.\n    k = 0, i = -1; while (++i < n) {\n      x = 0, j = -1; while (++j < n) {\n        x += matrix[i][j];\n      }\n      groupSums.push(x);\n      subgroupIndex.push(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__[\"range\"])(n));\n      k += x;\n    }\n\n    // Sort groups…\n    if (sortGroups) groupIndex.sort(function(a, b) {\n      return sortGroups(groupSums[a], groupSums[b]);\n    });\n\n    // Sort subgroups…\n    if (sortSubgroups) subgroupIndex.forEach(function(d, i) {\n      d.sort(function(a, b) {\n        return sortSubgroups(matrix[i][a], matrix[i][b]);\n      });\n    });\n\n    // Convert the sum to scaling factor for [0, 2pi].\n    // TODO Allow start and end angle to be specified?\n    // TODO Allow padding to be specified as percentage?\n    k = Object(__WEBPACK_IMPORTED_MODULE_1__math__[\"c\" /* max */])(0, __WEBPACK_IMPORTED_MODULE_1__math__[\"e\" /* tau */] - padAngle * n) / k;\n    dx = k ? padAngle : __WEBPACK_IMPORTED_MODULE_1__math__[\"e\" /* tau */] / n;\n\n    // Compute the start and end angle for each group and subgroup.\n    // Note: Opera has a bug reordering object literal properties!\n    x = 0, i = -1; while (++i < n) {\n      x0 = x, j = -1; while (++j < n) {\n        var di = groupIndex[i],\n            dj = subgroupIndex[di][j],\n            v = matrix[di][dj],\n            a0 = x,\n            a1 = x += v * k;\n        subgroups[dj * n + di] = {\n          index: di,\n          subindex: dj,\n          startAngle: a0,\n          endAngle: a1,\n          value: v\n        };\n      }\n      groups[di] = {\n        index: di,\n        startAngle: x0,\n        endAngle: x,\n        value: groupSums[di]\n      };\n      x += dx;\n    }\n\n    // Generate chords for each (non-empty) subgroup-subgroup link.\n    i = -1; while (++i < n) {\n      j = i - 1; while (++j < n) {\n        var source = subgroups[j * n + i],\n            target = subgroups[i * n + j];\n        if (source.value || target.value) {\n          chords.push(source.value < target.value\n              ? {source: target, target: source}\n              : {source: source, target: target});\n        }\n      }\n    }\n\n    return sortChords ? chords.sort(sortChords) : chords;\n  }\n\n  chord.padAngle = function(_) {\n    return arguments.length ? (padAngle = Object(__WEBPACK_IMPORTED_MODULE_1__math__[\"c\" /* max */])(0, _), chord) : padAngle;\n  };\n\n  chord.sortGroups = function(_) {\n    return arguments.length ? (sortGroups = _, chord) : sortGroups;\n  };\n\n  chord.sortSubgroups = function(_) {\n    return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n  };\n\n  chord.sortChords = function(_) {\n    return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n  };\n\n  return chord;\n});\n\n\n/***/ }),\n/* 625 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(626);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(627);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math__ = __webpack_require__(239);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_path__ = __webpack_require__(35);\n\n\n\n\n\nfunction defaultSource(d) {\n  return d.source;\n}\n\nfunction defaultTarget(d) {\n  return d.target;\n}\n\nfunction defaultRadius(d) {\n  return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n  return d.endAngle;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function() {\n  var source = defaultSource,\n      target = defaultTarget,\n      radius = defaultRadius,\n      startAngle = defaultStartAngle,\n      endAngle = defaultEndAngle,\n      context = null;\n\n  function ribbon() {\n    var buffer,\n        argv = __WEBPACK_IMPORTED_MODULE_0__array__[\"a\" /* slice */].call(arguments),\n        s = source.apply(this, argv),\n        t = target.apply(this, argv),\n        sr = +radius.apply(this, (argv[0] = s, argv)),\n        sa0 = startAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* halfPi */],\n        sa1 = endAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* halfPi */],\n        sx0 = sr * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* cos */])(sa0),\n        sy0 = sr * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* sin */])(sa0),\n        tr = +radius.apply(this, (argv[0] = t, argv)),\n        ta0 = startAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* halfPi */],\n        ta1 = endAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__[\"b\" /* halfPi */];\n\n    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_3_d3_path__[\"a\" /* path */])();\n\n    context.moveTo(sx0, sy0);\n    context.arc(0, 0, sr, sa0, sa1);\n    if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?\n      context.quadraticCurveTo(0, 0, tr * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"a\" /* cos */])(ta0), tr * Object(__WEBPACK_IMPORTED_MODULE_2__math__[\"d\" /* sin */])(ta0));\n      context.arc(0, 0, tr, ta0, ta1);\n    }\n    context.quadraticCurveTo(0, 0, sx0, sy0);\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  ribbon.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), ribbon) : radius;\n  };\n\n  ribbon.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), ribbon) : startAngle;\n  };\n\n  ribbon.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__[\"a\" /* default */])(+_), ribbon) : endAngle;\n  };\n\n  ribbon.source = function(_) {\n    return arguments.length ? (source = _, ribbon) : source;\n  };\n\n  ribbon.target = function(_) {\n    return arguments.length ? (target = _, ribbon) : target;\n  };\n\n  ribbon.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n  };\n\n  return ribbon;\n});\n\n\n/***/ }),\n/* 626 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n/***/ }),\n/* 627 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n/***/ }),\n/* 628 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _configs = __webpack_require__(22);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  color: {\n    value: 'Spectral',\n    iteratee: false\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.radial, _configs.values, _configs.common);\n\nvar Heatmap = function (_Track) {\n  _inherits(Heatmap, _Track);\n\n  function Heatmap(instance, conf, data) {\n    _classCallCheck(this, Heatmap);\n\n    return _possibleConstructorReturn(this, (Heatmap.__proto__ || Object.getPrototypeOf(Heatmap)).call(this, instance, conf, defaultConf, data, _dataParser.parseSpanValueData));\n  }\n\n  _createClass(Heatmap, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      return parentElement.selectAll('tile').data(function (d) {\n        return d.values;\n      }).enter().append('path').attr('class', 'tile').attr('opacity', conf.opacity).attr('d', (0, _d3Shape.arc)().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function (d, i) {\n        return _this2.theta(d.start, layout.blocks[d.block_id]);\n      }).endAngle(function (d, i) {\n        return _this2.theta(d.end, layout.blocks[d.block_id]);\n      })).attr('fill', conf.colorValue);\n    }\n  }]);\n\n  return Heatmap;\n}(_Track3.default);\n\nexports.default = Heatmap;\n\n/***/ }),\n/* 629 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _reduce = __webpack_require__(105);\n\nvar _reduce2 = _interopRequireDefault(_reduce);\n\nvar _sortBy = __webpack_require__(106);\n\nvar _sortBy2 = _interopRequireDefault(_sortBy);\n\nvar _configs = __webpack_require__(22);\n\nvar _d3Shape = __webpack_require__(13);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  direction: {\n    value: 'out',\n    iteratee: false\n  },\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  fill: {\n    value: false,\n    iteratee: false\n  },\n  fillColor: {\n    value: '#d3d3d3',\n    iteratee: true\n  },\n  thickness: {\n    value: 1,\n    iteratee: true\n  },\n  maxGap: {\n    value: null,\n    iteratee: false\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.axes, _configs.radial, _configs.common, _configs.values);\n\nvar splitByGap = function splitByGap(points, maxGap) {\n  return (0, _reduce2.default)((0, _sortBy2.default)(points, 'position'), function (aggregator, datum) {\n    if (aggregator.position === null) {\n      return { position: datum.position, groups: [[datum]] };\n    }\n    if (datum.position > aggregator.position + maxGap) {\n      aggregator.groups.push([datum]);\n    } else {\n      aggregator.groups[aggregator.groups.length - 1].push(datum);\n    }\n    aggregator.position = datum.position;\n    return aggregator;\n  }, { position: null, groups: [] }).groups;\n};\n\nvar Line = function (_Track) {\n  _inherits(Line, _Track);\n\n  function Line(instance, conf, data) {\n    _classCallCheck(this, Line);\n\n    return _possibleConstructorReturn(this, (Line.__proto__ || Object.getPrototypeOf(Line)).call(this, instance, conf, defaultConf, data, _dataParser.parsePositionValueData));\n  }\n\n  _createClass(Line, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      var line = (0, _d3Shape.radialLine)().angle(function (d) {\n        return d.angle;\n      }).radius(function (d) {\n        return d.radius;\n      }).curve(_d3Shape.curveLinear);\n\n      var area = (0, _d3Shape.radialArea)().angle(function (d) {\n        return d.angle;\n      }).innerRadius(function (d) {\n        return d.innerRadius;\n      }).outerRadius(function (d) {\n        return d.outerRadius;\n      }).curve(_d3Shape.curveLinear);\n\n      var generator = conf.fill ? area : line;\n\n      var buildRadius = function buildRadius(height) {\n        if (conf.fill) {\n          return {\n            innerRadius: conf.direction === 'out' ? conf.innerRadius : conf.outerRadius - height,\n            outerRadius: conf.direction === 'out' ? conf.innerRadius + height : conf.outerRadius\n          };\n        } else {\n          return {\n            radius: conf.direction === 'out' ? conf.innerRadius + height : conf.outerRadius - height\n          };\n        }\n      };\n\n      var selection = parentElement.selectAll('.line').data(function (d) {\n        return conf.maxGap ? splitByGap(d.values, conf.maxGap) : [d.values];\n      }).enter().append('g').attr('class', 'line').append('path').datum(function (d) {\n        return d.map(function (datum) {\n          var height = _this2.scale(datum.value);\n          return (0, _assign2.default)(datum, {\n            angle: _this2.theta(datum.position, layout.blocks[datum.block_id])\n          }, buildRadius(height));\n        });\n      }).attr('d', generator).attr('opacity', conf.opacity).attr('stroke-width', conf.thickness).attr('stroke', conf.colorValue).attr('fill', 'none');\n\n      if (conf.fill) {\n        selection.attr('fill', conf.fillColor);\n      }\n\n      return selection;\n    }\n  }]);\n\n  return Line;\n}(_Track3.default);\n\nexports.default = Line;\n\n/***/ }),\n/* 630 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _configs = __webpack_require__(22);\n\nvar _d3Shape = __webpack_require__(13);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  direction: {\n    value: 'out',\n    iteratee: false\n  },\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  fill: {\n    value: true,\n    iteratee: false\n  },\n  size: {\n    value: 15,\n    iteratee: true\n  },\n  shape: {\n    value: 'circle',\n    iteratee: false\n  },\n  strokeColor: {\n    value: '#d3d3d3',\n    iteratee: true\n  },\n  strokeWidth: {\n    value: 2,\n    iteratee: true\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.axes, _configs.radial, _configs.common, _configs.values);\n\nvar getSymbol = function getSymbol(key) {\n  switch (key) {\n    case 'circle':\n      return _d3Shape.symbolCircle;\n    case 'cross':\n      return _d3Shape.symbolCross;\n    case 'diamond':\n      return _d3Shape.symbolDiamond;\n    case 'square':\n      return _d3Shape.symbolSquare;\n    case 'triangle':\n      return _d3Shape.symbolTriangle;\n    case 'star':\n      return _d3Shape.symbolStar;\n    case 'wye':\n      return _d3Shape.symbolWye;\n    default:\n      return _d3Shape.symbolCross;\n  }\n};\n\nvar Scatter = function (_Track) {\n  _inherits(Scatter, _Track);\n\n  function Scatter(instance, conf, data) {\n    _classCallCheck(this, Scatter);\n\n    return _possibleConstructorReturn(this, (Scatter.__proto__ || Object.getPrototypeOf(Scatter)).call(this, instance, conf, defaultConf, data, _dataParser.parsePositionValueData));\n  }\n\n  _createClass(Scatter, [{\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      var point = parentElement.selectAll('.point').data(function (d) {\n        d.values.forEach(function (item, i) {\n          item.symbol = (0, _d3Shape.symbol)().type(getSymbol(conf.shape)).size(conf.size);\n        });\n        return d.values;\n      }).enter().append('path').attr('class', 'point').attr('opacity', conf.opacity).attr('d', function (d, i, j) {\n        return d.symbol(d, i, j);\n      }).attr('transform', function (d) {\n        return '\\n          translate(\\n            ' + _this2.x(d, layout, conf) + ',\\n            ' + _this2.y(d, layout, conf) + '\\n          ) rotate(\\n            ' + _this2.theta(d.position, layout.blocks[d.block_id]) * 360 / (2 * Math.PI) + '\\n          )';\n      }).attr('stroke', conf.strokeColor).attr('stroke-width', conf.strokeWidth).attr('fill', 'none');\n\n      if (conf.fill) {\n        point.attr('fill', conf.colorValue);\n      }\n\n      return point;\n    }\n  }]);\n\n  return Scatter;\n}(_Track3.default);\n\nexports.default = Scatter;\n\n/***/ }),\n/* 631 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Track2 = __webpack_require__(20);\n\nvar _Track3 = _interopRequireDefault(_Track2);\n\nvar _dataParser = __webpack_require__(21);\n\nvar _d3Shape = __webpack_require__(13);\n\nvar _assign = __webpack_require__(14);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _forEach = __webpack_require__(32);\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _configs = __webpack_require__(22);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultConf = (0, _assign2.default)({\n  color: {\n    value: '#fd6a62',\n    iteratee: true\n  },\n  direction: {\n    value: 'out',\n    iteratee: false\n  },\n  thickness: {\n    value: 10,\n    iteratee: false\n  },\n  radialMargin: {\n    value: 2,\n    iteratee: false\n  },\n  margin: {\n    value: 2,\n    iteratee: false\n  },\n  strokeWidth: {\n    value: 1,\n    iteratee: true\n  },\n  strokeColor: {\n    value: '#000000',\n    iteratee: true\n  },\n  backgrounds: {\n    value: [],\n    iteratee: false\n  }\n}, _configs.axes, _configs.radial, _configs.values, _configs.common);\n\nvar Stack = function (_Track) {\n  _inherits(Stack, _Track);\n\n  function Stack(instance, conf, data) {\n    _classCallCheck(this, Stack);\n\n    var _this = _possibleConstructorReturn(this, (Stack.__proto__ || Object.getPrototypeOf(Stack)).call(this, instance, conf, defaultConf, data, _dataParser.parseSpanValueData));\n\n    _this.buildLayers(_this.data, _this.conf.margin);\n    return _this;\n  }\n\n  _createClass(Stack, [{\n    key: 'buildLayers',\n    value: function buildLayers(data, margin) {\n      (0, _forEach2.default)(data, function (block, idx) {\n        block.values = block.values.sort(function (a, b) {\n          if (a.start < b.start) {\n            return -1;\n          }\n          if (a.start == b.start && a.end > b.end) {\n            return -1;\n          }\n          if (a.start == b.start && a.end == b.end) {\n            return 0;\n          }\n          return 1;\n        });\n        var layers = [];\n        (0, _forEach2.default)(block.values, function (datum) {\n          var placed = false;\n          (0, _forEach2.default)(layers, function (layer, i) {\n            // try to place datum\n            var lastDatumInLayer = layer.slice(0).pop();\n            if (lastDatumInLayer.end + margin < datum.start) {\n              layer.push(datum);\n              datum.layer = i;\n              placed = true;\n              return false;\n            }\n          });\n          if (!placed) {\n            datum.layer = layers.length;\n            layers.push([datum]);\n          }\n        });\n      });\n    }\n  }, {\n    key: 'datumRadialPosition',\n    value: function datumRadialPosition(d) {\n      var radialStart = (this.conf.thickness + this.conf.radialMargin) * d.layer;\n      var radialEnd = radialStart + this.conf.thickness;\n      if (this.conf.direction === 'out') {\n        return [Math.min(this.conf.innerRadius + radialStart, this.conf.outerRadius), Math.min(this.conf.innerRadius + radialEnd, this.conf.outerRadius)];\n      }\n\n      if (this.conf.direction === 'in') {\n        return [Math.max(this.conf.outerRadius - radialEnd, this.conf.innerRadius), this.conf.outerRadius - radialStart];\n      }\n\n      if (this.conf.direction === 'center') {\n        var origin = Math.floor((this.conf.outerRadius + this.conf.innerRadius) / 2);\n        var _radialStart = (this.conf.thickness + this.conf.radialMargin) * Math.floor(d.layer / 2);\n        var _radialEnd = _radialStart + this.conf.thickness;\n\n        if (d.layer % 2 === 0) {\n          return [origin + _radialStart, origin + _radialEnd];\n        } else {\n          return [origin - _radialStart - this.conf.radialMargin, origin - _radialEnd - this.conf.radialMargin];\n        }\n      }\n    }\n  }, {\n    key: 'renderDatum',\n    value: function renderDatum(parentElement, conf, layout) {\n      var _this2 = this;\n\n      var that = this;\n\n      return parentElement.selectAll('.tile').data(function (d) {\n        return d.values.map(function (datum) {\n          var radius = that.datumRadialPosition(datum);\n          return (0, _assign2.default)(datum, {\n            innerRadius: radius[0],\n            outerRadius: radius[1],\n            startAngle: _this2.theta(datum.start, layout.blocks[datum.block_id]),\n            endAngle: _this2.theta(datum.end, layout.blocks[datum.block_id])\n          });\n        });\n      }).enter().append('path').attr('class', 'tile').attr('d', (0, _d3Shape.arc)()).attr('opacity', conf.opacity).attr('stroke-width', conf.strokeWidth).attr('stroke', conf.strokeColor).attr('fill', conf.colorValue);\n    }\n  }]);\n\n  return Stack;\n}(_Track3.default);\n\nexports.default = Stack;\n\n/***/ }),\n/* 632 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.initClipboard = undefined;\n\nvar _clipboardJs = __webpack_require__(633);\n\nvar _clipboardJs2 = _interopRequireDefault(_clipboardJs);\n\nvar _d3Selection = __webpack_require__(3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar initClipboard = exports.initClipboard = function initClipboard(container) {\n  var input = (0, _d3Selection.select)(container).append('input').attr('class', 'circos-clipboard').attr('type', 'hidden');\n\n  (0, _d3Selection.select)('body').on('keydown', function () {\n    if (event.ctrlKey && event.code === 'KeyC') {\n      _clipboardJs2.default.copy(input.attr('value'));\n    }\n  });\n  return input;\n};\n\n/***/ }),\n/* 633 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(setImmediate) {//  Import support https://stackoverflow.com/questions/13673346/supporting-both-commonjs-and-amd\n(function(name, definition) {\n    if (true) { module.exports = definition(); }\n    else {}\n}(\"clipboard\", function() {\n  if (typeof document === 'undefined' || !document.addEventListener) {\n    return null;\n  }\n\n  var clipboard = {};\n\n  clipboard.copy = (function() {\n    var _intercept = false;\n    var _data = null; // Map from data type (e.g. \"text/html\") to value.\n    var _bogusSelection = false;\n\n    function cleanup() {\n      _intercept = false;\n      _data = null;\n      if (_bogusSelection) {\n        window.getSelection().removeAllRanges();\n      }\n      _bogusSelection = false;\n    }\n\n    document.addEventListener(\"copy\", function(e) {\n      if (_intercept) {\n        for (var key in _data) {\n          e.clipboardData.setData(key, _data[key]);\n        }\n        e.preventDefault();\n      }\n    });\n\n    // Workaround for Safari: https://bugs.webkit.org/show_bug.cgi?id=156529\n    function bogusSelect() {\n      var sel = document.getSelection();\n      // If \"nothing\" is selected...\n      if (!document.queryCommandEnabled(\"copy\") && sel.isCollapsed) {\n        // ... temporarily select the entire body.\n        //\n        // We select the entire body because:\n        // - it's guaranteed to exist,\n        // - it works (unlike, say, document.head, or phantom element that is\n        //   not inserted into the DOM),\n        // - it doesn't seem to flicker (due to the synchronous copy event), and\n        // - it avoids modifying the DOM (can trigger mutation observers).\n        //\n        // Because we can't do proper feature detection (we already checked\n        // document.queryCommandEnabled(\"copy\") , which actually gives a false\n        // negative for Blink when nothing is selected) and UA sniffing is not\n        // reliable (a lot of UA strings contain \"Safari\"), this will also\n        // happen for some browsers other than Safari. :-()\n        var range = document.createRange();\n        range.selectNodeContents(document.body);\n        sel.removeAllRanges();\n        sel.addRange(range);\n        _bogusSelection = true;\n      }\n    };\n\n    return function(data) {\n      return new Promise(function(resolve, reject) {\n        _intercept = true;\n        if (typeof data === \"string\") {\n          _data = {\"text/plain\": data};\n        } else if (data instanceof Node) {\n          _data = {\"text/html\": new XMLSerializer().serializeToString(data)};\n        } else if (data instanceof Object){\n          _data = data;\n        } else {\n          reject(\"Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings.\")\n        }\n\n        function triggerCopy(tryBogusSelect) {\n          try {\n            if (document.execCommand(\"copy\")) {\n              // document.execCommand is synchronous: http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#integration-with-rich-text-editing-apis\n              // So we can call resolve() back here.\n              cleanup();\n              resolve();\n            }\n            else {\n              if (!tryBogusSelect) {\n                bogusSelect();\n                triggerCopy(true);\n              } else {\n                cleanup();\n                throw new Error(\"Unable to copy. Perhaps it's not available in your browser?\");\n              }\n            }\n          } catch (e) {\n            cleanup();\n            reject(e);\n          }\n        }\n        triggerCopy(false);\n\n      });\n    };\n  })();\n\n  clipboard.paste = (function() {\n    var _intercept = false;\n    var _resolve;\n    var _dataType;\n\n    document.addEventListener(\"paste\", function(e) {\n      if (_intercept) {\n        _intercept = false;\n        e.preventDefault();\n        var resolve = _resolve;\n        _resolve = null;\n        resolve(e.clipboardData.getData(_dataType));\n      }\n    });\n\n    return function(dataType) {\n      return new Promise(function(resolve, reject) {\n        _intercept = true;\n        _resolve = resolve;\n        _dataType = dataType || \"text/plain\";\n        try {\n          if (!document.execCommand(\"paste\")) {\n            _intercept = false;\n            reject(new Error(\"Unable to paste. Pasting only works in Internet Explorer at the moment.\"));\n          }\n        } catch (e) {\n          _intercept = false;\n          reject(new Error(e));\n        }\n      });\n    };\n  })();\n\n  // Handle IE behaviour.\n  if (typeof ClipboardEvent === \"undefined\" &&\n      typeof window.clipboardData !== \"undefined\" &&\n      typeof window.clipboardData.setData !== \"undefined\") {\n\n    /*! promise-polyfill 2.0.1 */\n    (function(a){function b(a,b){return function(){a.apply(b,arguments)}}function c(a){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof a)throw new TypeError(\"not a function\");this._state=null,this._value=null,this._deferreds=[],i(a,b(e,this),b(f,this))}function d(a){var b=this;return null===this._state?void this._deferreds.push(a):void j(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(e){return void a.reject(e)}a.resolve(d)})}function e(a){try{if(a===this)throw new TypeError(\"A promise cannot be resolved with itself.\");if(a&&(\"object\"==typeof a||\"function\"==typeof a)){var c=a.then;if(\"function\"==typeof c)return void i(b(c,a),b(e,this),b(f,this))}this._state=!0,this._value=a,g.call(this)}catch(d){f.call(this,d)}}function f(a){this._state=!1,this._value=a,g.call(this)}function g(){for(var a=0,b=this._deferreds.length;b>a;a++)d.call(this,this._deferreds[a]);this._deferreds=null}function h(a,b,c,d){this.onFulfilled=\"function\"==typeof a?a:null,this.onRejected=\"function\"==typeof b?b:null,this.resolve=c,this.reject=d}function i(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var j=c.immediateFn||\"function\"==typeof setImmediate&&setImmediate||function(a){setTimeout(a,1)},k=Array.isArray||function(a){return\"[object Array]\"===Object.prototype.toString.call(a)};c.prototype[\"catch\"]=function(a){return this.then(null,a)},c.prototype.then=function(a,b){var e=this;return new c(function(c,f){d.call(e,new h(a,b,c,f))})},c.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&k(arguments[0])?arguments[0]:arguments);return new c(function(b,c){function d(f,g){try{if(g&&(\"object\"==typeof g||\"function\"==typeof g)){var h=g.then;if(\"function\"==typeof h)return void h.call(g,function(a){d(f,a)},c)}a[f]=g,0===--e&&b(a)}catch(i){c(i)}}if(0===a.length)return b([]);for(var e=a.length,f=0;f<a.length;f++)d(f,a[f])})},c.resolve=function(a){return a&&\"object\"==typeof a&&a.constructor===c?a:new c(function(b){b(a)})},c.reject=function(a){return new c(function(b,c){c(a)})},c.race=function(a){return new c(function(b,c){for(var d=0,e=a.length;e>d;d++)a[d].then(b,c)})},\"undefined\"!=typeof module&&module.exports?module.exports=c:a.Promise||(a.Promise=c)})(this);\n\n    clipboard.copy = function(data) {\n      return new Promise(function(resolve, reject) {\n        // IE supports string and URL types: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx\n        // We only support the string type for now.\n        if (typeof data !== \"string\" && !(\"text/plain\" in data)) {\n          throw new Error(\"You must provide a text/plain type.\");\n        }\n\n        var strData = (typeof data === \"string\" ? data : data[\"text/plain\"]);\n        var copySucceeded = window.clipboardData.setData(\"Text\", strData);\n        if (copySucceeded) {\n          resolve();\n        } else {\n          reject(new Error(\"Copying was rejected.\"));\n        }\n      });\n    };\n\n    clipboard.paste = function() {\n      return new Promise(function(resolve, reject) {\n        var strData = window.clipboardData.getData(\"Text\");\n        if (strData) {\n          resolve(strData);\n        } else {\n          // The user rejected the paste request.\n          reject(new Error(\"Pasting was rejected.\"));\n        }\n      });\n    };\n  }\n\n  return clipboard;\n}));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(634).setImmediate))\n\n/***/ }),\n/* 634 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(635);\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n                         (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(80)))\n\n/***/ }),\n/* 635 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(80), __webpack_require__(636)))\n\n/***/ }),\n/* 636 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ })\n/******/ ]);\n});\n\n//# sourceURL=webpack://dash_bio/./node_modules/circos/dist/circos.es6.js?");

/***/ }),

/***/ "./node_modules/circos/index.js":
/*!**************************************!*\
  !*** ./node_modules/circos/index.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./dist/circos.es6 */ \"./node_modules/circos/dist/circos.es6.js\");\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/circos/index.js?");

/***/ }),

/***/ "./node_modules/create-emotion/dist/index.esm.js":
/*!*******************************************************!*\
  !*** ./node_modules/create-emotion/dist/index.esm.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ \"./node_modules/@emotion/memoize/dist/memoize.esm.js\");\n/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/unitless */ \"./node_modules/@emotion/unitless/dist/unitless.esm.js\");\n/* harmony import */ var _emotion_hash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/hash */ \"./node_modules/@emotion/hash/dist/hash.esm.js\");\n/* harmony import */ var _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/stylis */ \"./node_modules/@emotion/stylis/dist/stylis.esm.js\");\n/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! stylis-rule-sheet */ \"./node_modules/stylis-rule-sheet/index.js\");\n/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar processStyleName = Object(_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (styleName) {\n  return styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\nvar processStyleValue = function processStyleValue(key, value) {\n  if (value == null || typeof value === 'boolean') {\n    return '';\n  }\n\n  if (_emotion_unitless__WEBPACK_IMPORTED_MODULE_1__[\"default\"][key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties\n  !isNaN(value) && value !== 0) {\n    return value + 'px';\n  }\n\n  return value;\n};\n\nif (true) {\n  var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n  var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n  var oldProcessStyleValue = processStyleValue;\n\n  processStyleValue = function processStyleValue(key, value) {\n    if (key === 'content') {\n      if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n        console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n      }\n    }\n\n    return oldProcessStyleValue(key, value);\n  };\n}\n\nvar classnames = function classnames(args) {\n  var len = args.length;\n  var i = 0;\n  var cls = '';\n\n  for (; i < len; i++) {\n    var arg = args[i];\n    if (arg == null) continue;\n    var toAdd = void 0;\n\n    switch (typeof arg) {\n      case 'boolean':\n        break;\n\n      case 'function':\n        if (true) {\n          console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\\n' + 'Please call the function before passing it to cx.');\n        }\n\n        toAdd = classnames([arg()]);\n        break;\n\n      case 'object':\n        {\n          if (Array.isArray(arg)) {\n            toAdd = classnames(arg);\n          } else {\n            toAdd = '';\n\n            for (var k in arg) {\n              if (arg[k] && k) {\n                toAdd && (toAdd += ' ');\n                toAdd += k;\n              }\n            }\n          }\n\n          break;\n        }\n\n      default:\n        {\n          toAdd = arg;\n        }\n    }\n\n    if (toAdd) {\n      cls && (cls += ' ');\n      cls += toAdd;\n    }\n  }\n\n  return cls;\n};\nvar isBrowser = typeof document !== 'undefined';\n\n/*\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n- 'polyfills' on server side\n\n// usage\n\nimport StyleSheet from 'glamor/lib/sheet'\nlet styleSheet = new StyleSheet()\n\nstyleSheet.inject()\n- 'injects' the stylesheet into the page (or into memory if on server)\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n  if (tag.sheet) {\n    // $FlowFixMe\n    return tag.sheet;\n  } // this weirdness brought to you by firefox\n\n\n  for (var i = 0; i < document.styleSheets.length; i++) {\n    if (document.styleSheets[i].ownerNode === tag) {\n      // $FlowFixMe\n      return document.styleSheets[i];\n    }\n  }\n}\n\nfunction makeStyleTag(opts) {\n  var tag = document.createElement('style');\n  tag.setAttribute('data-emotion', opts.key || '');\n\n  if (opts.nonce !== undefined) {\n    tag.setAttribute('nonce', opts.nonce);\n  }\n\n  tag.appendChild(document.createTextNode('')) // $FlowFixMe\n  ;\n  (opts.container !== undefined ? opts.container : document.head).appendChild(tag);\n  return tag;\n}\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n  function StyleSheet(options) {\n    this.isSpeedy = \"development\" === 'production'; // the big drawback here is that the css won't be editable in devtools\n\n    this.tags = [];\n    this.ctr = 0;\n    this.opts = options;\n  }\n\n  var _proto = StyleSheet.prototype;\n\n  _proto.inject = function inject() {\n    if (this.injected) {\n      throw new Error('already injected!');\n    }\n\n    this.tags[0] = makeStyleTag(this.opts);\n    this.injected = true;\n  };\n\n  _proto.speedy = function speedy(bool) {\n    if (this.ctr !== 0) {\n      // cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool})\n      throw new Error(\"cannot change speedy now\");\n    }\n\n    this.isSpeedy = !!bool;\n  };\n\n  _proto.insert = function insert(rule, sourceMap) {\n    // this is the ultrafast version, works across browsers\n    if (this.isSpeedy) {\n      var tag = this.tags[this.tags.length - 1];\n      var sheet = sheetForTag(tag);\n\n      try {\n        sheet.insertRule(rule, sheet.cssRules.length);\n      } catch (e) {\n        if (true) {\n          console.warn('illegal rule', rule); // eslint-disable-line no-console\n        }\n      }\n    } else {\n      var _tag = makeStyleTag(this.opts);\n\n      this.tags.push(_tag);\n\n      _tag.appendChild(document.createTextNode(rule + (sourceMap || '')));\n    }\n\n    this.ctr++;\n\n    if (this.ctr % 65000 === 0) {\n      this.tags.push(makeStyleTag(this.opts));\n    }\n  };\n\n  _proto.flush = function flush() {\n    // $FlowFixMe\n    this.tags.forEach(function (tag) {\n      return tag.parentNode.removeChild(tag);\n    });\n    this.tags = [];\n    this.ctr = 0; // todo - look for remnants in document.styleSheets\n\n    this.injected = false;\n  };\n\n  return StyleSheet;\n}();\n\nfunction createEmotion(context, options) {\n  if (context.__SECRET_EMOTION__ !== undefined) {\n    return context.__SECRET_EMOTION__;\n  }\n\n  if (options === undefined) options = {};\n  var key = options.key || 'css';\n\n  if (true) {\n    if (/[^a-z-]/.test(key)) {\n      throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n    }\n  }\n\n  var current;\n\n  function insertRule(rule) {\n    current += rule;\n\n    if (isBrowser) {\n      sheet.insert(rule, currentSourceMap);\n    }\n  }\n\n  var insertionPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default()(insertRule);\n  var stylisOptions;\n\n  if (options.prefix !== undefined) {\n    stylisOptions = {\n      prefix: options.prefix\n    };\n  }\n\n  var caches = {\n    registered: {},\n    inserted: {},\n    nonce: options.nonce,\n    key: key\n  };\n  var sheet = new StyleSheet(options);\n\n  if (isBrowser) {\n    // 🚀\n    sheet.inject();\n  }\n\n  var stylis = new _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__[\"default\"](stylisOptions);\n  stylis.use(options.stylisPlugins)(insertionPlugin);\n  var currentSourceMap = '';\n\n  function handleInterpolation(interpolation, couldBeSelectorInterpolation) {\n    if (interpolation == null) {\n      return '';\n    }\n\n    switch (typeof interpolation) {\n      case 'boolean':\n        return '';\n\n      case 'function':\n        if (interpolation.__emotion_styles !== undefined) {\n          var selector = interpolation.toString();\n\n          if (selector === 'NO_COMPONENT_SELECTOR' && \"development\" !== 'production') {\n            throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n          }\n\n          return selector;\n        }\n\n        if (this === undefined && \"development\" !== 'production') {\n          console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n        }\n\n        return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe\n        interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation);\n\n      case 'object':\n        return createStringFromObject.call(this, interpolation);\n\n      default:\n        var cached = caches.registered[interpolation];\n        return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;\n    }\n  }\n\n  var objectToStringCache = new WeakMap();\n\n  function createStringFromObject(obj) {\n    if (objectToStringCache.has(obj)) {\n      // $FlowFixMe\n      return objectToStringCache.get(obj);\n    }\n\n    var string = '';\n\n    if (Array.isArray(obj)) {\n      obj.forEach(function (interpolation) {\n        string += handleInterpolation.call(this, interpolation, false);\n      }, this);\n    } else {\n      Object.keys(obj).forEach(function (key) {\n        if (typeof obj[key] !== 'object') {\n          if (caches.registered[obj[key]] !== undefined) {\n            string += key + \"{\" + caches.registered[obj[key]] + \"}\";\n          } else {\n            string += processStyleName(key) + \":\" + processStyleValue(key, obj[key]) + \";\";\n          }\n        } else {\n          if (key === 'NO_COMPONENT_SELECTOR' && \"development\" !== 'production') {\n            throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n          }\n\n          if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {\n            obj[key].forEach(function (value) {\n              string += processStyleName(key) + \":\" + processStyleValue(key, value) + \";\";\n            });\n          } else {\n            string += key + \"{\" + handleInterpolation.call(this, obj[key], false) + \"}\";\n          }\n        }\n      }, this);\n    }\n\n    objectToStringCache.set(obj, string);\n    return string;\n  }\n\n  var name;\n  var stylesWithLabel;\n  var labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\n\n  var createClassName = function createClassName(styles, identifierName) {\n    return Object(_emotion_hash__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(styles + identifierName) + identifierName;\n  };\n\n  if (true) {\n    var oldCreateClassName = createClassName;\n    var sourceMappingUrlPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n\n    createClassName = function createClassName(styles, identifierName) {\n      return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) {\n        currentSourceMap = sourceMap;\n        return '';\n      }), identifierName);\n    };\n  }\n\n  var createStyles = function createStyles(strings) {\n    var stringMode = true;\n    var styles = '';\n    var identifierName = '';\n\n    if (strings == null || strings.raw === undefined) {\n      stringMode = false;\n      styles += handleInterpolation.call(this, strings, false);\n    } else {\n      styles += strings[0];\n    }\n\n    for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      interpolations[_key - 1] = arguments[_key];\n    }\n\n    interpolations.forEach(function (interpolation, i) {\n      styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // .\n      );\n\n      if (stringMode === true && strings[i + 1] !== undefined) {\n        styles += strings[i + 1];\n      }\n    }, this);\n    stylesWithLabel = styles;\n    styles = styles.replace(labelPattern, function (match, p1) {\n      identifierName += \"-\" + p1;\n      return '';\n    });\n    name = createClassName(styles, identifierName);\n    return styles;\n  };\n\n  if (true) {\n    var oldStylis = stylis;\n\n    stylis = function stylis(selector, styles) {\n      oldStylis(selector, styles);\n      currentSourceMap = '';\n    };\n  }\n\n  function insert(scope, styles) {\n    if (caches.inserted[name] === undefined) {\n      current = '';\n      stylis(scope, styles);\n      caches.inserted[name] = current;\n    }\n  }\n\n  var css = function css() {\n    var styles = createStyles.apply(this, arguments);\n    var selector = key + \"-\" + name;\n\n    if (caches.registered[selector] === undefined) {\n      caches.registered[selector] = stylesWithLabel;\n    }\n\n    insert(\".\" + selector, styles);\n    return selector;\n  };\n\n  var keyframes = function keyframes() {\n    var styles = createStyles.apply(this, arguments);\n    var animation = \"animation-\" + name;\n    insert('', \"@keyframes \" + animation + \"{\" + styles + \"}\");\n    return animation;\n  };\n\n  var injectGlobal = function injectGlobal() {\n    var styles = createStyles.apply(this, arguments);\n    insert('', styles);\n  };\n\n  function getRegisteredStyles(registeredStyles, classNames) {\n    var rawClassName = '';\n    classNames.split(' ').forEach(function (className) {\n      if (caches.registered[className] !== undefined) {\n        registeredStyles.push(className);\n      } else {\n        rawClassName += className + \" \";\n      }\n    });\n    return rawClassName;\n  }\n\n  function merge(className, sourceMap) {\n    var registeredStyles = [];\n    var rawClassName = getRegisteredStyles(registeredStyles, className);\n\n    if (registeredStyles.length < 2) {\n      return className;\n    }\n\n    return rawClassName + css(registeredStyles, sourceMap);\n  }\n\n  function cx() {\n    for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      classNames[_key2] = arguments[_key2];\n    }\n\n    return merge(classnames(classNames));\n  }\n\n  function hydrateSingleId(id) {\n    caches.inserted[id] = true;\n  }\n\n  function hydrate(ids) {\n    ids.forEach(hydrateSingleId);\n  }\n\n  function flush() {\n    if (isBrowser) {\n      sheet.flush();\n      sheet.inject();\n    }\n\n    caches.inserted = {};\n    caches.registered = {};\n  }\n\n  if (isBrowser) {\n    var chunks = document.querySelectorAll(\"[data-emotion-\" + key + \"]\");\n    Array.prototype.forEach.call(chunks, function (node) {\n      // $FlowFixMe\n      sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe\n\n      node.getAttribute(\"data-emotion-\" + key).split(' ').forEach(hydrateSingleId);\n    });\n  }\n\n  var emotion = {\n    flush: flush,\n    hydrate: hydrate,\n    cx: cx,\n    merge: merge,\n    getRegisteredStyles: getRegisteredStyles,\n    injectGlobal: injectGlobal,\n    keyframes: keyframes,\n    css: css,\n    sheet: sheet,\n    caches: caches\n  };\n  context.__SECRET_EMOTION__ = emotion;\n  return emotion;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createEmotion);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/create-emotion/dist/index.esm.js?");

/***/ }),

/***/ "./node_modules/crossfilter/crossfilter.js":
/*!*************************************************!*\
  !*** ./node_modules/crossfilter/crossfilter.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("(function(exports){\ncrossfilter.version = \"1.3.12\";\nfunction crossfilter_identity(d) {\n  return d;\n}\ncrossfilter.permute = permute;\n\nfunction permute(array, index) {\n  for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {\n    copy[i] = array[index[i]];\n  }\n  return copy;\n}\nvar bisect = crossfilter.bisect = bisect_by(crossfilter_identity);\n\nbisect.by = bisect_by;\n\nfunction bisect_by(f) {\n\n  // Locate the insertion point for x in a to maintain sorted order. The\n  // arguments lo and hi may be used to specify a subset of the array which\n  // should be considered; by default the entire array is used. If x is already\n  // present in a, the insertion point will be before (to the left of) any\n  // existing entries. The return value is suitable for use as the first\n  // argument to `array.splice` assuming that a is already sorted.\n  //\n  // The returned insertion point i partitions the array a into two halves so\n  // that all v < x for v in a[lo:i] for the left side and all v >= x for v in\n  // a[i:hi] for the right side.\n  function bisectLeft(a, x, lo, hi) {\n    while (lo < hi) {\n      var mid = lo + hi >>> 1;\n      if (f(a[mid]) < x) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  // Similar to bisectLeft, but returns an insertion point which comes after (to\n  // the right of) any existing entries of x in a.\n  //\n  // The returned insertion point i partitions the array into two halves so that\n  // all v <= x for v in a[lo:i] for the left side and all v > x for v in\n  // a[i:hi] for the right side.\n  function bisectRight(a, x, lo, hi) {\n    while (lo < hi) {\n      var mid = lo + hi >>> 1;\n      if (x < f(a[mid])) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  bisectRight.right = bisectRight;\n  bisectRight.left = bisectLeft;\n  return bisectRight;\n}\nvar heap = crossfilter.heap = heap_by(crossfilter_identity);\n\nheap.by = heap_by;\n\nfunction heap_by(f) {\n\n  // Builds a binary heap within the specified array a[lo:hi]. The heap has the\n  // property such that the parent a[lo+i] is always less than or equal to its\n  // two children: a[lo+2*i+1] and a[lo+2*i+2].\n  function heap(a, lo, hi) {\n    var n = hi - lo,\n        i = (n >>> 1) + 1;\n    while (--i > 0) sift(a, i, n, lo);\n    return a;\n  }\n\n  // Sorts the specified array a[lo:hi] in descending order, assuming it is\n  // already a heap.\n  function sort(a, lo, hi) {\n    var n = hi - lo,\n        t;\n    while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);\n    return a;\n  }\n\n  // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous\n  // slice of array a[lo:lo+n]. This method can also be used to update the heap\n  // incrementally, without incurring the full cost of reconstructing the heap.\n  function sift(a, i, n, lo) {\n    var d = a[--lo + i],\n        x = f(d),\n        child;\n    while ((child = i << 1) <= n) {\n      if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;\n      if (x <= f(a[lo + child])) break;\n      a[lo + i] = a[lo + child];\n      i = child;\n    }\n    a[lo + i] = d;\n  }\n\n  heap.sort = sort;\n  return heap;\n}\nvar heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);\n\nheapselect.by = heapselect_by;\n\nfunction heapselect_by(f) {\n  var heap = heap_by(f);\n\n  // Returns a new array containing the top k elements in the array a[lo:hi].\n  // The returned array is not sorted, but maintains the heap property. If k is\n  // greater than hi - lo, then fewer than k elements will be returned. The\n  // order of elements in a is unchanged by this operation.\n  function heapselect(a, lo, hi, k) {\n    var queue = new Array(k = Math.min(hi - lo, k)),\n        min,\n        i,\n        x,\n        d;\n\n    for (i = 0; i < k; ++i) queue[i] = a[lo++];\n    heap(queue, 0, k);\n\n    if (lo < hi) {\n      min = f(queue[0]);\n      do {\n        if (x = f(d = a[lo]) > min) {\n          queue[0] = d;\n          min = f(heap(queue, 0, k)[0]);\n        }\n      } while (++lo < hi);\n    }\n\n    return queue;\n  }\n\n  return heapselect;\n}\nvar insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);\n\ninsertionsort.by = insertionsort_by;\n\nfunction insertionsort_by(f) {\n\n  function insertionsort(a, lo, hi) {\n    for (var i = lo + 1; i < hi; ++i) {\n      for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {\n        a[j] = a[j - 1];\n      }\n      a[j] = t;\n    }\n    return a;\n  }\n\n  return insertionsort;\n}\n// Algorithm designed by Vladimir Yaroslavskiy.\n// Implementation based on the Dart project; see lib/dart/LICENSE for details.\n\nvar quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);\n\nquicksort.by = quicksort_by;\n\nfunction quicksort_by(f) {\n  var insertionsort = insertionsort_by(f);\n\n  function sort(a, lo, hi) {\n    return (hi - lo < quicksort_sizeThreshold\n        ? insertionsort\n        : quicksort)(a, lo, hi);\n  }\n\n  function quicksort(a, lo, hi) {\n    // Compute the two pivots by looking at 5 elements.\n    var sixth = (hi - lo) / 6 | 0,\n        i1 = lo + sixth,\n        i5 = hi - 1 - sixth,\n        i3 = lo + hi - 1 >> 1,  // The midpoint.\n        i2 = i3 - sixth,\n        i4 = i3 + sixth;\n\n    var e1 = a[i1], x1 = f(e1),\n        e2 = a[i2], x2 = f(e2),\n        e3 = a[i3], x3 = f(e3),\n        e4 = a[i4], x4 = f(e4),\n        e5 = a[i5], x5 = f(e5);\n\n    var t;\n\n    // Sort the selected 5 elements using a sorting network.\n    if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;\n    if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;\n    if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;\n    if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;\n    if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;\n    if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;\n    if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;\n    if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;\n    if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;\n\n    var pivot1 = e2, pivotValue1 = x2,\n        pivot2 = e4, pivotValue2 = x4;\n\n    // e2 and e4 have been saved in the pivot variables. They will be written\n    // back, once the partitioning is finished.\n    a[i1] = e1;\n    a[i2] = a[lo];\n    a[i3] = e3;\n    a[i4] = a[hi - 1];\n    a[i5] = e5;\n\n    var less = lo + 1,   // First element in the middle partition.\n        great = hi - 2;  // Last element in the middle partition.\n\n    // Note that for value comparison, <, <=, >= and > coerce to a primitive via\n    // Object.prototype.valueOf; == and === do not, so in order to be consistent\n    // with natural order (such as for Date objects), we must do two compares.\n    var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;\n    if (pivotsEqual) {\n\n      // Degenerated case where the partitioning becomes a dutch national flag\n      // problem.\n      //\n      // [ |  < pivot  | == pivot | unpartitioned | > pivot  | ]\n      //  ^             ^          ^             ^            ^\n      // left         less         k           great         right\n      //\n      // a[left] and a[right] are undefined and are filled after the\n      // partitioning.\n      //\n      // Invariants:\n      //   1) for x in ]left, less[ : x < pivot.\n      //   2) for x in [less, k[ : x == pivot.\n      //   3) for x in ]great, right[ : x > pivot.\n      for (var k = less; k <= great; ++k) {\n        var ek = a[k], xk = f(ek);\n        if (xk < pivotValue1) {\n          if (k !== less) {\n            a[k] = a[less];\n            a[less] = ek;\n          }\n          ++less;\n        } else if (xk > pivotValue1) {\n\n          // Find the first element <= pivot in the range [k - 1, great] and\n          // put [:ek:] there. We know that such an element must exist:\n          // When k == less, then el3 (which is equal to pivot) lies in the\n          // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.\n          // Note that in the latter case invariant 2 will be violated for a\n          // short amount of time. The invariant will be restored when the\n          // pivots are put into their final positions.\n          while (true) {\n            var greatValue = f(a[great]);\n            if (greatValue > pivotValue1) {\n              great--;\n              // This is the only location in the while-loop where a new\n              // iteration is started.\n              continue;\n            } else if (greatValue < pivotValue1) {\n              // Triple exchange.\n              a[k] = a[less];\n              a[less++] = a[great];\n              a[great--] = ek;\n              break;\n            } else {\n              a[k] = a[great];\n              a[great--] = ek;\n              // Note: if great < k then we will exit the outer loop and fix\n              // invariant 2 (which we just violated).\n              break;\n            }\n          }\n        }\n      }\n    } else {\n\n      // We partition the list into three parts:\n      //  1. < pivot1\n      //  2. >= pivot1 && <= pivot2\n      //  3. > pivot2\n      //\n      // During the loop we have:\n      // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned  | > pivot2  | ]\n      //  ^            ^                        ^              ^             ^\n      // left         less                     k              great        right\n      //\n      // a[left] and a[right] are undefined and are filled after the\n      // partitioning.\n      //\n      // Invariants:\n      //   1. for x in ]left, less[ : x < pivot1\n      //   2. for x in [less, k[ : pivot1 <= x && x <= pivot2\n      //   3. for x in ]great, right[ : x > pivot2\n      for (var k = less; k <= great; k++) {\n        var ek = a[k], xk = f(ek);\n        if (xk < pivotValue1) {\n          if (k !== less) {\n            a[k] = a[less];\n            a[less] = ek;\n          }\n          ++less;\n        } else {\n          if (xk > pivotValue2) {\n            while (true) {\n              var greatValue = f(a[great]);\n              if (greatValue > pivotValue2) {\n                great--;\n                if (great < k) break;\n                // This is the only location inside the loop where a new\n                // iteration is started.\n                continue;\n              } else {\n                // a[great] <= pivot2.\n                if (greatValue < pivotValue1) {\n                  // Triple exchange.\n                  a[k] = a[less];\n                  a[less++] = a[great];\n                  a[great--] = ek;\n                } else {\n                  // a[great] >= pivot1.\n                  a[k] = a[great];\n                  a[great--] = ek;\n                }\n                break;\n              }\n            }\n          }\n        }\n      }\n    }\n\n    // Move pivots into their final positions.\n    // We shrunk the list from both sides (a[left] and a[right] have\n    // meaningless values in them) and now we move elements from the first\n    // and third partition into these locations so that we can store the\n    // pivots.\n    a[lo] = a[less - 1];\n    a[less - 1] = pivot1;\n    a[hi - 1] = a[great + 1];\n    a[great + 1] = pivot2;\n\n    // The list is now partitioned into three partitions:\n    // [ < pivot1   | >= pivot1 && <= pivot2   |  > pivot2   ]\n    //  ^            ^                        ^             ^\n    // left         less                     great        right\n\n    // Recursive descent. (Don't include the pivot values.)\n    sort(a, lo, less - 1);\n    sort(a, great + 2, hi);\n\n    if (pivotsEqual) {\n      // All elements in the second partition are equal to the pivot. No\n      // need to sort them.\n      return a;\n    }\n\n    // In theory it should be enough to call _doSort recursively on the second\n    // partition.\n    // The Android source however removes the pivot elements from the recursive\n    // call if the second partition is too large (more than 2/3 of the list).\n    if (less < i1 && great > i5) {\n      var lessValue, greatValue;\n      while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;\n      while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;\n\n      // Copy paste of the previous 3-way partitioning with adaptions.\n      //\n      // We partition the list into three parts:\n      //  1. == pivot1\n      //  2. > pivot1 && < pivot2\n      //  3. == pivot2\n      //\n      // During the loop we have:\n      // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned  | == pivot2 ]\n      //              ^                      ^              ^\n      //            less                     k              great\n      //\n      // Invariants:\n      //   1. for x in [ *, less[ : x == pivot1\n      //   2. for x in [less, k[ : pivot1 < x && x < pivot2\n      //   3. for x in ]great, * ] : x == pivot2\n      for (var k = less; k <= great; k++) {\n        var ek = a[k], xk = f(ek);\n        if (xk <= pivotValue1 && xk >= pivotValue1) {\n          if (k !== less) {\n            a[k] = a[less];\n            a[less] = ek;\n          }\n          less++;\n        } else {\n          if (xk <= pivotValue2 && xk >= pivotValue2) {\n            while (true) {\n              var greatValue = f(a[great]);\n              if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {\n                great--;\n                if (great < k) break;\n                // This is the only location inside the loop where a new\n                // iteration is started.\n                continue;\n              } else {\n                // a[great] < pivot2.\n                if (greatValue < pivotValue1) {\n                  // Triple exchange.\n                  a[k] = a[less];\n                  a[less++] = a[great];\n                  a[great--] = ek;\n                } else {\n                  // a[great] == pivot1.\n                  a[k] = a[great];\n                  a[great--] = ek;\n                }\n                break;\n              }\n            }\n          }\n        }\n      }\n    }\n\n    // The second partition has now been cleared of pivot elements and looks\n    // as follows:\n    // [  *  |  > pivot1 && < pivot2  | * ]\n    //        ^                      ^\n    //       less                  great\n    // Sort the second partition using recursive descent.\n\n    // The second partition looks as follows:\n    // [  *  |  >= pivot1 && <= pivot2  | * ]\n    //        ^                        ^\n    //       less                    great\n    // Simply sort it by recursive descent.\n\n    return sort(a, less, great + 1);\n  }\n\n  return sort;\n}\n\nvar quicksort_sizeThreshold = 32;\nvar crossfilter_array8 = crossfilter_arrayUntyped,\n    crossfilter_array16 = crossfilter_arrayUntyped,\n    crossfilter_array32 = crossfilter_arrayUntyped,\n    crossfilter_arrayLengthen = crossfilter_arrayLengthenUntyped,\n    crossfilter_arrayWiden = crossfilter_arrayWidenUntyped;\n\nif (typeof Uint8Array !== \"undefined\") {\n  crossfilter_array8 = function(n) { return new Uint8Array(n); };\n  crossfilter_array16 = function(n) { return new Uint16Array(n); };\n  crossfilter_array32 = function(n) { return new Uint32Array(n); };\n\n  crossfilter_arrayLengthen = function(array, length) {\n    if (array.length >= length) return array;\n    var copy = new array.constructor(length);\n    copy.set(array);\n    return copy;\n  };\n\n  crossfilter_arrayWiden = function(array, width) {\n    var copy;\n    switch (width) {\n      case 16: copy = crossfilter_array16(array.length); break;\n      case 32: copy = crossfilter_array32(array.length); break;\n      default: throw new Error(\"invalid array width!\");\n    }\n    copy.set(array);\n    return copy;\n  };\n}\n\nfunction crossfilter_arrayUntyped(n) {\n  var array = new Array(n), i = -1;\n  while (++i < n) array[i] = 0;\n  return array;\n}\n\nfunction crossfilter_arrayLengthenUntyped(array, length) {\n  var n = array.length;\n  while (n < length) array[n++] = 0;\n  return array;\n}\n\nfunction crossfilter_arrayWidenUntyped(array, width) {\n  if (width > 32) throw new Error(\"invalid array width!\");\n  return array;\n}\nfunction crossfilter_filterExact(bisect, value) {\n  return function(values) {\n    var n = values.length;\n    return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];\n  };\n}\n\nfunction crossfilter_filterRange(bisect, range) {\n  var min = range[0],\n      max = range[1];\n  return function(values) {\n    var n = values.length;\n    return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];\n  };\n}\n\nfunction crossfilter_filterAll(values) {\n  return [0, values.length];\n}\nfunction crossfilter_null() {\n  return null;\n}\nfunction crossfilter_zero() {\n  return 0;\n}\nfunction crossfilter_reduceIncrement(p) {\n  return p + 1;\n}\n\nfunction crossfilter_reduceDecrement(p) {\n  return p - 1;\n}\n\nfunction crossfilter_reduceAdd(f) {\n  return function(p, v) {\n    return p + +f(v);\n  };\n}\n\nfunction crossfilter_reduceSubtract(f) {\n  return function(p, v) {\n    return p - f(v);\n  };\n}\nexports.crossfilter = crossfilter;\n\nfunction crossfilter() {\n  var crossfilter = {\n    add: add,\n    remove: removeData,\n    dimension: dimension,\n    groupAll: groupAll,\n    size: size\n  };\n\n  var data = [], // the records\n      n = 0, // the number of records; data.length\n      m = 0, // a bit mask representing which dimensions are in use\n      M = 8, // number of dimensions that can fit in `filters`\n      filters = crossfilter_array8(0), // M bits per record; 1 is filtered out\n      filterListeners = [], // when the filters change\n      dataListeners = [], // when data is added\n      removeDataListeners = []; // when data is removed\n\n  // Adds the specified new records to this crossfilter.\n  function add(newData) {\n    var n0 = n,\n        n1 = newData.length;\n\n    // If there's actually new data to add…\n    // Merge the new data into the existing data.\n    // Lengthen the filter bitset to handle the new records.\n    // Notify listeners (dimensions and groups) that new data is available.\n    if (n1) {\n      data = data.concat(newData);\n      filters = crossfilter_arrayLengthen(filters, n += n1);\n      dataListeners.forEach(function(l) { l(newData, n0, n1); });\n    }\n\n    return crossfilter;\n  }\n\n  // Removes all records that match the current filters.\n  function removeData() {\n    var newIndex = crossfilter_index(n, n),\n        removed = [];\n    for (var i = 0, j = 0; i < n; ++i) {\n      if (filters[i]) newIndex[i] = j++;\n      else removed.push(i);\n    }\n\n    // Remove all matching records from groups.\n    filterListeners.forEach(function(l) { l(0, [], removed); });\n\n    // Update indexes.\n    removeDataListeners.forEach(function(l) { l(newIndex); });\n\n    // Remove old filters and data by overwriting.\n    for (var i = 0, j = 0, k; i < n; ++i) {\n      if (k = filters[i]) {\n        if (i !== j) filters[j] = k, data[j] = data[i];\n        ++j;\n      }\n    }\n    data.length = j;\n    while (n > j) filters[--n] = 0;\n  }\n\n  // Adds a new dimension with the specified value accessor function.\n  function dimension(value) {\n    var dimension = {\n      filter: filter,\n      filterExact: filterExact,\n      filterRange: filterRange,\n      filterFunction: filterFunction,\n      filterAll: filterAll,\n      top: top,\n      bottom: bottom,\n      group: group,\n      groupAll: groupAll,\n      dispose: dispose,\n      remove: dispose // for backwards-compatibility\n    };\n\n    var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000\n        zero = ~one, // inverted one, e.g., 11110111\n        values, // sorted, cached array\n        index, // value rank ↦ object id\n        newValues, // temporary array storing newly-added values\n        newIndex, // temporary array storing newly-added index\n        sort = quicksort_by(function(i) { return newValues[i]; }),\n        refilter = crossfilter_filterAll, // for recomputing filter\n        refilterFunction, // the custom filter function in use\n        indexListeners = [], // when data is added\n        dimensionGroups = [],\n        lo0 = 0,\n        hi0 = 0;\n\n    // Updating a dimension is a two-stage process. First, we must update the\n    // associated filters for the newly-added records. Once all dimensions have\n    // updated their filters, the groups are notified to update.\n    dataListeners.unshift(preAdd);\n    dataListeners.push(postAdd);\n\n    removeDataListeners.push(removeData);\n\n    // Incorporate any existing data into this dimension, and make sure that the\n    // filter bitset is wide enough to handle the new dimension.\n    m |= one;\n    if (M >= 32 ? !one : m & -(1 << M)) {\n      filters = crossfilter_arrayWiden(filters, M <<= 1);\n    }\n    preAdd(data, 0, n);\n    postAdd(data, 0, n);\n\n    // Incorporates the specified new records into this dimension.\n    // This function is responsible for updating filters, values, and index.\n    function preAdd(newData, n0, n1) {\n\n      // Permute new values into natural order using a sorted index.\n      newValues = newData.map(value);\n      newIndex = sort(crossfilter_range(n1), 0, n1);\n      newValues = permute(newValues, newIndex);\n\n      // Bisect newValues to determine which new records are selected.\n      var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;\n      if (refilterFunction) {\n        for (i = 0; i < n1; ++i) {\n          if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one;\n        }\n      } else {\n        for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;\n        for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;\n      }\n\n      // If this dimension previously had no data, then we don't need to do the\n      // more expensive merge operation; use the new values and index as-is.\n      if (!n0) {\n        values = newValues;\n        index = newIndex;\n        lo0 = lo1;\n        hi0 = hi1;\n        return;\n      }\n\n      var oldValues = values,\n          oldIndex = index,\n          i0 = 0,\n          i1 = 0;\n\n      // Otherwise, create new arrays into which to merge new and old.\n      values = new Array(n);\n      index = crossfilter_index(n, n);\n\n      // Merge the old and new sorted values, and old and new index.\n      for (i = 0; i0 < n0 && i1 < n1; ++i) {\n        if (oldValues[i0] < newValues[i1]) {\n          values[i] = oldValues[i0];\n          index[i] = oldIndex[i0++];\n        } else {\n          values[i] = newValues[i1];\n          index[i] = newIndex[i1++] + n0;\n        }\n      }\n\n      // Add any remaining old values.\n      for (; i0 < n0; ++i0, ++i) {\n        values[i] = oldValues[i0];\n        index[i] = oldIndex[i0];\n      }\n\n      // Add any remaining new values.\n      for (; i1 < n1; ++i1, ++i) {\n        values[i] = newValues[i1];\n        index[i] = newIndex[i1] + n0;\n      }\n\n      // Bisect again to recompute lo0 and hi0.\n      bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];\n    }\n\n    // When all filters have updated, notify index listeners of the new values.\n    function postAdd(newData, n0, n1) {\n      indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n      newValues = newIndex = null;\n    }\n\n    function removeData(reIndex) {\n      for (var i = 0, j = 0, k; i < n; ++i) {\n        if (filters[k = index[i]]) {\n          if (i !== j) values[j] = values[i];\n          index[j] = reIndex[k];\n          ++j;\n        }\n      }\n      values.length = j;\n      while (j < n) index[j++] = 0;\n\n      // Bisect again to recompute lo0 and hi0.\n      var bounds = refilter(values);\n      lo0 = bounds[0], hi0 = bounds[1];\n    }\n\n    // Updates the selected values based on the specified bounds [lo, hi].\n    // This implementation is used by all the public filter methods.\n    function filterIndexBounds(bounds) {\n      var lo1 = bounds[0],\n          hi1 = bounds[1];\n\n      if (refilterFunction) {\n        refilterFunction = null;\n        filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; });\n        lo0 = lo1;\n        hi0 = hi1;\n        return dimension;\n      }\n\n      var i,\n          j,\n          k,\n          added = [],\n          removed = [];\n\n      // Fast incremental update based on previous lo index.\n      if (lo1 < lo0) {\n        for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n          filters[k = index[i]] ^= one;\n          added.push(k);\n        }\n      } else if (lo1 > lo0) {\n        for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n          filters[k = index[i]] ^= one;\n          removed.push(k);\n        }\n      }\n\n      // Fast incremental update based on previous hi index.\n      if (hi1 > hi0) {\n        for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n          filters[k = index[i]] ^= one;\n          added.push(k);\n        }\n      } else if (hi1 < hi0) {\n        for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n          filters[k = index[i]] ^= one;\n          removed.push(k);\n        }\n      }\n\n      lo0 = lo1;\n      hi0 = hi1;\n      filterListeners.forEach(function(l) { l(one, added, removed); });\n      return dimension;\n    }\n\n    // Filters this dimension using the specified range, value, or null.\n    // If the range is null, this is equivalent to filterAll.\n    // If the range is an array, this is equivalent to filterRange.\n    // Otherwise, this is equivalent to filterExact.\n    function filter(range) {\n      return range == null\n          ? filterAll() : Array.isArray(range)\n          ? filterRange(range) : typeof range === \"function\"\n          ? filterFunction(range)\n          : filterExact(range);\n    }\n\n    // Filters this dimension to select the exact value.\n    function filterExact(value) {\n      return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values));\n    }\n\n    // Filters this dimension to select the specified range [lo, hi].\n    // The lower bound is inclusive, and the upper bound is exclusive.\n    function filterRange(range) {\n      return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values));\n    }\n\n    // Clears any filters on this dimension.\n    function filterAll() {\n      return filterIndexBounds((refilter = crossfilter_filterAll)(values));\n    }\n\n    // Filters this dimension using an arbitrary function.\n    function filterFunction(f) {\n      refilter = crossfilter_filterAll;\n\n      filterIndexFunction(refilterFunction = f);\n\n      lo0 = 0;\n      hi0 = n;\n\n      return dimension;\n    }\n\n    function filterIndexFunction(f) {\n      var i,\n          k,\n          x,\n          added = [],\n          removed = [];\n\n      for (i = 0; i < n; ++i) {\n        if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) {\n          if (x) filters[k] &= zero, added.push(k);\n          else filters[k] |= one, removed.push(k);\n        }\n      }\n      filterListeners.forEach(function(l) { l(one, added, removed); });\n    }\n\n    // Returns the top K selected records based on this dimension's order.\n    // Note: observes this dimension's filter, unlike group and groupAll.\n    function top(k) {\n      var array = [],\n          i = hi0,\n          j;\n\n      while (--i >= lo0 && k > 0) {\n        if (!filters[j = index[i]]) {\n          array.push(data[j]);\n          --k;\n        }\n      }\n\n      return array;\n    }\n\n    // Returns the bottom K selected records based on this dimension's order.\n    // Note: observes this dimension's filter, unlike group and groupAll.\n    function bottom(k) {\n      var array = [],\n          i = lo0,\n          j;\n\n      while (i < hi0 && k > 0) {\n        if (!filters[j = index[i]]) {\n          array.push(data[j]);\n          --k;\n        }\n        i++;\n      }\n\n      return array;\n    }\n\n    // Adds a new group to this dimension, using the specified key function.\n    function group(key) {\n      var group = {\n        top: top,\n        all: all,\n        reduce: reduce,\n        reduceCount: reduceCount,\n        reduceSum: reduceSum,\n        order: order,\n        orderNatural: orderNatural,\n        size: size,\n        dispose: dispose,\n        remove: dispose // for backwards-compatibility\n      };\n\n      // Ensure that this group will be removed when the dimension is removed.\n      dimensionGroups.push(group);\n\n      var groups, // array of {key, value}\n          groupIndex, // object id ↦ group id\n          groupWidth = 8,\n          groupCapacity = crossfilter_capacity(groupWidth),\n          k = 0, // cardinality\n          select,\n          heap,\n          reduceAdd,\n          reduceRemove,\n          reduceInitial,\n          update = crossfilter_null,\n          reset = crossfilter_null,\n          resetNeeded = true,\n          groupAll = key === crossfilter_null;\n\n      if (arguments.length < 1) key = crossfilter_identity;\n\n      // The group listens to the crossfilter for when any dimension changes, so\n      // that it can update the associated reduce values. It must also listen to\n      // the parent dimension for when data is added, and compute new keys.\n      filterListeners.push(update);\n      indexListeners.push(add);\n      removeDataListeners.push(removeData);\n\n      // Incorporate any existing data into the grouping.\n      add(values, index, 0, n);\n\n      // Incorporates the specified new values into this group.\n      // This function is responsible for updating groups and groupIndex.\n      function add(newValues, newIndex, n0, n1) {\n        var oldGroups = groups,\n            reIndex = crossfilter_index(k, groupCapacity),\n            add = reduceAdd,\n            initial = reduceInitial,\n            k0 = k, // old cardinality\n            i0 = 0, // index of old group\n            i1 = 0, // index of new record\n            j, // object id\n            g0, // old group\n            x0, // old key\n            x1, // new key\n            g, // group to add\n            x; // key of group to add\n\n        // If a reset is needed, we don't need to update the reduce values.\n        if (resetNeeded) add = initial = crossfilter_null;\n\n        // Reset the new groups (k is a lower bound).\n        // Also, make sure that groupIndex exists and is long enough.\n        groups = new Array(k), k = 0;\n        groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);\n\n        // Get the first old key (x0 of g0), if it exists.\n        if (k0) x0 = (g0 = oldGroups[0]).key;\n\n        // Find the first new key (x1), skipping NaN keys.\n        while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;\n\n        // While new keys remain…\n        while (i1 < n1) {\n\n          // Determine the lesser of the two current keys; new and old.\n          // If there are no old keys remaining, then always add the new key.\n          if (g0 && x0 <= x1) {\n            g = g0, x = x0;\n\n            // Record the new index of the old group.\n            reIndex[i0] = k;\n\n            // Retrieve the next old key.\n            if (g0 = oldGroups[++i0]) x0 = g0.key;\n          } else {\n            g = {key: x1, value: initial()}, x = x1;\n          }\n\n          // Add the lesser group.\n          groups[k] = g;\n\n          // Add any selected records belonging to the added group, while\n          // advancing the new key and populating the associated group index.\n          while (!(x1 > x)) {\n            groupIndex[j = newIndex[i1] + n0] = k;\n            if (!(filters[j] & zero)) g.value = add(g.value, data[j]);\n            if (++i1 >= n1) break;\n            x1 = key(newValues[i1]);\n          }\n\n          groupIncrement();\n        }\n\n        // Add any remaining old groups that were greater than all new keys.\n        // No incremental reduce is needed; these groups have no new records.\n        // Also record the new index of the old group.\n        while (i0 < k0) {\n          groups[reIndex[i0] = k] = oldGroups[i0++];\n          groupIncrement();\n        }\n\n        // If we added any new groups before any old groups,\n        // update the group index of all the old records.\n        if (k > i0) for (i0 = 0; i0 < n0; ++i0) {\n          groupIndex[i0] = reIndex[groupIndex[i0]];\n        }\n\n        // Modify the update and reset behavior based on the cardinality.\n        // If the cardinality is less than or equal to one, then the groupIndex\n        // is not needed. If the cardinality is zero, then there are no records\n        // and therefore no groups to update or reset. Note that we also must\n        // change the registered listener to point to the new method.\n        j = filterListeners.indexOf(update);\n        if (k > 1) {\n          update = updateMany;\n          reset = resetMany;\n        } else {\n          if (!k && groupAll) {\n            k = 1;\n            groups = [{key: null, value: initial()}];\n          }\n          if (k === 1) {\n            update = updateOne;\n            reset = resetOne;\n          } else {\n            update = crossfilter_null;\n            reset = crossfilter_null;\n          }\n          groupIndex = null;\n        }\n        filterListeners[j] = update;\n\n        // Count the number of added groups,\n        // and widen the group index as needed.\n        function groupIncrement() {\n          if (++k === groupCapacity) {\n            reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);\n            groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);\n            groupCapacity = crossfilter_capacity(groupWidth);\n          }\n        }\n      }\n\n      function removeData() {\n        if (k > 1) {\n          var oldK = k,\n              oldGroups = groups,\n              seenGroups = crossfilter_index(oldK, oldK);\n\n          // Filter out non-matches by copying matching group index entries to\n          // the beginning of the array.\n          for (var i = 0, j = 0; i < n; ++i) {\n            if (filters[i]) {\n              seenGroups[groupIndex[j] = groupIndex[i]] = 1;\n              ++j;\n            }\n          }\n\n          // Reassemble groups including only those groups that were referred\n          // to by matching group index entries.  Note the new group index in\n          // seenGroups.\n          groups = [], k = 0;\n          for (i = 0; i < oldK; ++i) {\n            if (seenGroups[i]) {\n              seenGroups[i] = k++;\n              groups.push(oldGroups[i]);\n            }\n          }\n\n          if (k > 1) {\n            // Reindex the group index using seenGroups to find the new index.\n            for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]];\n          } else {\n            groupIndex = null;\n          }\n          filterListeners[filterListeners.indexOf(update)] = k > 1\n              ? (reset = resetMany, update = updateMany)\n              : k === 1 ? (reset = resetOne, update = updateOne)\n              : reset = update = crossfilter_null;\n        } else if (k === 1) {\n          if (groupAll) return;\n          for (var i = 0; i < n; ++i) if (filters[i]) return;\n          groups = [], k = 0;\n          filterListeners[filterListeners.indexOf(update)] =\n          update = reset = crossfilter_null;\n        }\n      }\n\n      // Reduces the specified selected or deselected records.\n      // This function is only used when the cardinality is greater than 1.\n      function updateMany(filterOne, added, removed) {\n        if (filterOne === one || resetNeeded) return;\n\n        var i,\n            k,\n            n,\n            g;\n\n        // Add the added values.\n        for (i = 0, n = added.length; i < n; ++i) {\n          if (!(filters[k = added[i]] & zero)) {\n            g = groups[groupIndex[k]];\n            g.value = reduceAdd(g.value, data[k]);\n          }\n        }\n\n        // Remove the removed values.\n        for (i = 0, n = removed.length; i < n; ++i) {\n          if ((filters[k = removed[i]] & zero) === filterOne) {\n            g = groups[groupIndex[k]];\n            g.value = reduceRemove(g.value, data[k]);\n          }\n        }\n      }\n\n      // Reduces the specified selected or deselected records.\n      // This function is only used when the cardinality is 1.\n      function updateOne(filterOne, added, removed) {\n        if (filterOne === one || resetNeeded) return;\n\n        var i,\n            k,\n            n,\n            g = groups[0];\n\n        // Add the added values.\n        for (i = 0, n = added.length; i < n; ++i) {\n          if (!(filters[k = added[i]] & zero)) {\n            g.value = reduceAdd(g.value, data[k]);\n          }\n        }\n\n        // Remove the removed values.\n        for (i = 0, n = removed.length; i < n; ++i) {\n          if ((filters[k = removed[i]] & zero) === filterOne) {\n            g.value = reduceRemove(g.value, data[k]);\n          }\n        }\n      }\n\n      // Recomputes the group reduce values from scratch.\n      // This function is only used when the cardinality is greater than 1.\n      function resetMany() {\n        var i,\n            g;\n\n        // Reset all group values.\n        for (i = 0; i < k; ++i) {\n          groups[i].value = reduceInitial();\n        }\n\n        // Add any selected records.\n        for (i = 0; i < n; ++i) {\n          if (!(filters[i] & zero)) {\n            g = groups[groupIndex[i]];\n            g.value = reduceAdd(g.value, data[i]);\n          }\n        }\n      }\n\n      // Recomputes the group reduce values from scratch.\n      // This function is only used when the cardinality is 1.\n      function resetOne() {\n        var i,\n            g = groups[0];\n\n        // Reset the singleton group values.\n        g.value = reduceInitial();\n\n        // Add any selected records.\n        for (i = 0; i < n; ++i) {\n          if (!(filters[i] & zero)) {\n            g.value = reduceAdd(g.value, data[i]);\n          }\n        }\n      }\n\n      // Returns the array of group values, in the dimension's natural order.\n      function all() {\n        if (resetNeeded) reset(), resetNeeded = false;\n        return groups;\n      }\n\n      // Returns a new array containing the top K group values, in reduce order.\n      function top(k) {\n        var top = select(all(), 0, groups.length, k);\n        return heap.sort(top, 0, top.length);\n      }\n\n      // Sets the reduce behavior for this group to use the specified functions.\n      // This method lazily recomputes the reduce values, waiting until needed.\n      function reduce(add, remove, initial) {\n        reduceAdd = add;\n        reduceRemove = remove;\n        reduceInitial = initial;\n        resetNeeded = true;\n        return group;\n      }\n\n      // A convenience method for reducing by count.\n      function reduceCount() {\n        return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n      }\n\n      // A convenience method for reducing by sum(value).\n      function reduceSum(value) {\n        return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n      }\n\n      // Sets the reduce order, using the specified accessor.\n      function order(value) {\n        select = heapselect_by(valueOf);\n        heap = heap_by(valueOf);\n        function valueOf(d) { return value(d.value); }\n        return group;\n      }\n\n      // A convenience method for natural ordering by reduce value.\n      function orderNatural() {\n        return order(crossfilter_identity);\n      }\n\n      // Returns the cardinality of this group, irrespective of any filters.\n      function size() {\n        return k;\n      }\n\n      // Removes this group and associated event listeners.\n      function dispose() {\n        var i = filterListeners.indexOf(update);\n        if (i >= 0) filterListeners.splice(i, 1);\n        i = indexListeners.indexOf(add);\n        if (i >= 0) indexListeners.splice(i, 1);\n        i = removeDataListeners.indexOf(removeData);\n        if (i >= 0) removeDataListeners.splice(i, 1);\n        return group;\n      }\n\n      return reduceCount().orderNatural();\n    }\n\n    // A convenience function for generating a singleton group.\n    function groupAll() {\n      var g = group(crossfilter_null), all = g.all;\n      delete g.all;\n      delete g.top;\n      delete g.order;\n      delete g.orderNatural;\n      delete g.size;\n      g.value = function() { return all()[0].value; };\n      return g;\n    }\n\n    // Removes this dimension and associated groups and event listeners.\n    function dispose() {\n      dimensionGroups.forEach(function(group) { group.dispose(); });\n      var i = dataListeners.indexOf(preAdd);\n      if (i >= 0) dataListeners.splice(i, 1);\n      i = dataListeners.indexOf(postAdd);\n      if (i >= 0) dataListeners.splice(i, 1);\n      i = removeDataListeners.indexOf(removeData);\n      if (i >= 0) removeDataListeners.splice(i, 1);\n      m &= zero;\n      return filterAll();\n    }\n\n    return dimension;\n  }\n\n  // A convenience method for groupAll on a dummy dimension.\n  // This implementation can be optimized since it always has cardinality 1.\n  function groupAll() {\n    var group = {\n      reduce: reduce,\n      reduceCount: reduceCount,\n      reduceSum: reduceSum,\n      value: value,\n      dispose: dispose,\n      remove: dispose // for backwards-compatibility\n    };\n\n    var reduceValue,\n        reduceAdd,\n        reduceRemove,\n        reduceInitial,\n        resetNeeded = true;\n\n    // The group listens to the crossfilter for when any dimension changes, so\n    // that it can update the reduce value. It must also listen to the parent\n    // dimension for when data is added.\n    filterListeners.push(update);\n    dataListeners.push(add);\n\n    // For consistency; actually a no-op since resetNeeded is true.\n    add(data, 0, n);\n\n    // Incorporates the specified new values into this group.\n    function add(newData, n0) {\n      var i;\n\n      if (resetNeeded) return;\n\n      // Add the added values.\n      for (i = n0; i < n; ++i) {\n        if (!filters[i]) {\n          reduceValue = reduceAdd(reduceValue, data[i]);\n        }\n      }\n    }\n\n    // Reduces the specified selected or deselected records.\n    function update(filterOne, added, removed) {\n      var i,\n          k,\n          n;\n\n      if (resetNeeded) return;\n\n      // Add the added values.\n      for (i = 0, n = added.length; i < n; ++i) {\n        if (!filters[k = added[i]]) {\n          reduceValue = reduceAdd(reduceValue, data[k]);\n        }\n      }\n\n      // Remove the removed values.\n      for (i = 0, n = removed.length; i < n; ++i) {\n        if (filters[k = removed[i]] === filterOne) {\n          reduceValue = reduceRemove(reduceValue, data[k]);\n        }\n      }\n    }\n\n    // Recomputes the group reduce value from scratch.\n    function reset() {\n      var i;\n\n      reduceValue = reduceInitial();\n\n      for (i = 0; i < n; ++i) {\n        if (!filters[i]) {\n          reduceValue = reduceAdd(reduceValue, data[i]);\n        }\n      }\n    }\n\n    // Sets the reduce behavior for this group to use the specified functions.\n    // This method lazily recomputes the reduce value, waiting until needed.\n    function reduce(add, remove, initial) {\n      reduceAdd = add;\n      reduceRemove = remove;\n      reduceInitial = initial;\n      resetNeeded = true;\n      return group;\n    }\n\n    // A convenience method for reducing by count.\n    function reduceCount() {\n      return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n    }\n\n    // A convenience method for reducing by sum(value).\n    function reduceSum(value) {\n      return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n    }\n\n    // Returns the computed reduce value.\n    function value() {\n      if (resetNeeded) reset(), resetNeeded = false;\n      return reduceValue;\n    }\n\n    // Removes this group and associated event listeners.\n    function dispose() {\n      var i = filterListeners.indexOf(update);\n      if (i >= 0) filterListeners.splice(i);\n      i = dataListeners.indexOf(add);\n      if (i >= 0) dataListeners.splice(i);\n      return group;\n    }\n\n    return reduceCount();\n  }\n\n  // Returns the number of records in this crossfilter, irrespective of any filters.\n  function size() {\n    return n;\n  }\n\n  return arguments.length\n      ? add(arguments[0])\n      : crossfilter;\n}\n\n// Returns an array of size n, big enough to store ids up to m.\nfunction crossfilter_index(n, m) {\n  return (m < 0x101\n      ? crossfilter_array8 : m < 0x10001\n      ? crossfilter_array16\n      : crossfilter_array32)(n);\n}\n\n// Constructs a new array of size n, with sequential values from 0 to n - 1.\nfunction crossfilter_range(n) {\n  var range = crossfilter_index(n, n);\n  for (var i = -1; ++i < n;) range[i] = i;\n  return range;\n}\n\nfunction crossfilter_capacity(w) {\n  return w === 8\n      ? 0x100 : w === 16\n      ? 0x10000\n      : 0x100000000;\n}\n})( true && exports || this);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/crossfilter/crossfilter.js?");

/***/ }),

/***/ "./node_modules/crossfilter/index.js":
/*!*******************************************!*\
  !*** ./node_modules/crossfilter/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./crossfilter */ \"./node_modules/crossfilter/crossfilter.js\").crossfilter;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/crossfilter/index.js?");

/***/ }),

/***/ "./node_modules/d3-array/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-array/index.js ***!
  \****************************************/
/*! exports provided: bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_bisect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/bisect */ \"./node_modules/d3-array/src/bisect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return _src_bisect__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return _src_bisect__WEBPACK_IMPORTED_MODULE_0__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return _src_bisect__WEBPACK_IMPORTED_MODULE_0__[\"bisectLeft\"]; });\n\n/* harmony import */ var _src_ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return _src_ascending__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_bisector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/bisector */ \"./node_modules/d3-array/src/bisector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return _src_bisector__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_cross__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/cross */ \"./node_modules/d3-array/src/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return _src_cross__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_descending__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/descending */ \"./node_modules/d3-array/src/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return _src_descending__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_deviation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/deviation */ \"./node_modules/d3-array/src/deviation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return _src_deviation__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_extent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/extent */ \"./node_modules/d3-array/src/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return _src_extent__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_histogram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/histogram */ \"./node_modules/d3-array/src/histogram.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return _src_histogram__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/threshold/freedmanDiaconis */ \"./node_modules/d3-array/src/threshold/freedmanDiaconis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return _src_threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_threshold_scott__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/threshold/scott */ \"./node_modules/d3-array/src/threshold/scott.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return _src_threshold_scott__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_threshold_sturges__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/threshold/sturges */ \"./node_modules/d3-array/src/threshold/sturges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return _src_threshold_sturges__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_max__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/max */ \"./node_modules/d3-array/src/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _src_max__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_mean__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/mean */ \"./node_modules/d3-array/src/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _src_mean__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_median__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/median */ \"./node_modules/d3-array/src/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _src_median__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_merge__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/merge */ \"./node_modules/d3-array/src/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _src_merge__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _src_min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/min */ \"./node_modules/d3-array/src/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _src_min__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _src_pairs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/pairs */ \"./node_modules/d3-array/src/pairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return _src_pairs__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _src_permute__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./src/permute */ \"./node_modules/d3-array/src/permute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return _src_permute__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _src_quantile__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./src/quantile */ \"./node_modules/d3-array/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return _src_quantile__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _src_range__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./src/range */ \"./node_modules/d3-array/src/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _src_range__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _src_scan__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./src/scan */ \"./node_modules/d3-array/src/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _src_scan__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _src_shuffle__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./src/shuffle */ \"./node_modules/d3-array/src/shuffle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return _src_shuffle__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _src_sum__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./src/sum */ \"./node_modules/d3-array/src/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _src_sum__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _src_ticks__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./src/ticks */ \"./node_modules/d3-array/src/ticks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return _src_ticks__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return _src_ticks__WEBPACK_IMPORTED_MODULE_23__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return _src_ticks__WEBPACK_IMPORTED_MODULE_23__[\"tickStep\"]; });\n\n/* harmony import */ var _src_transpose__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./src/transpose */ \"./node_modules/d3-array/src/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _src_transpose__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _src_variance__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./src/variance */ \"./node_modules/d3-array/src/variance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return _src_variance__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _src_zip__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./src/zip */ \"./node_modules/d3-array/src/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _src_zip__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/index.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/array.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/array.js ***!
  \********************************************/
/*! exports provided: slice, map */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/ascending.js":
/*!************************************************!*\
  !*** ./node_modules/d3-array/src/ascending.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/ascending.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/bisect.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-array/src/bisect.js ***!
  \*********************************************/
/*! exports provided: bisectRight, bisectLeft, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return bisectRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return bisectLeft; });\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector */ \"./node_modules/d3-array/src/bisector.js\");\n\n\n\nvar ascendingBisect = Object(_bisector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\nvar bisectRight = ascendingBisect.right;\nvar bisectLeft = ascendingBisect.left;\n/* harmony default export */ __webpack_exports__[\"default\"] = (bisectRight);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/bisect.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/bisector.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-array/src/bisector.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n});\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return Object(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f(d), x);\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/bisector.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-array/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/cross.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/cross.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pairs */ \"./node_modules/d3-array/src/pairs.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values0, values1, reduce) {\n  var n0 = values0.length,\n      n1 = values1.length,\n      values = new Array(n0 * n1),\n      i0,\n      i1,\n      i,\n      value0;\n\n  if (reduce == null) reduce = _pairs__WEBPACK_IMPORTED_MODULE_0__[\"pair\"];\n\n  for (i0 = i = 0; i0 < n0; ++i0) {\n    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n      values[i] = reduce(value0, values1[i1]);\n    }\n  }\n\n  return values;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/cross.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/descending.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-array/src/descending.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/descending.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/deviation.js":
/*!************************************************!*\
  !*** ./node_modules/d3-array/src/deviation.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance */ \"./node_modules/d3-array/src/variance.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, f) {\n  var v = Object(_variance__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(array, f);\n  return v ? Math.sqrt(v) : v;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/deviation.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/extent.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-array/src/extent.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return [min, max];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/extent.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/histogram.js":
/*!************************************************!*\
  !*** ./node_modules/d3-array/src/histogram.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-array/src/array.js\");\n/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect */ \"./node_modules/d3-array/src/bisect.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-array/src/constant.js\");\n/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent */ \"./node_modules/d3-array/src/extent.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity */ \"./node_modules/d3-array/src/identity.js\");\n/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./range */ \"./node_modules/d3-array/src/range.js\");\n/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks */ \"./node_modules/d3-array/src/ticks.js\");\n/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges */ \"./node_modules/d3-array/src/threshold/sturges.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n      domain = _extent__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      threshold = _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n  function histogram(data) {\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      tz = Object(_ticks__WEBPACK_IMPORTED_MODULE_6__[\"tickStep\"])(x0, x1, tz);\n      tz = Object(_range__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Math.ceil(x0 / tz) * tz, Math.floor(x1 / tz) * tz, tz); // exclusive\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x0 <= x && x <= x1) {\n        bins[Object(_bisect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_), histogram) : threshold;\n  };\n\n  return histogram;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/histogram.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/identity.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-array/src/identity.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/max.js":
/*!******************************************!*\
  !*** ./node_modules/d3-array/src/max.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/max.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/mean.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-array/src/mean.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      m = n,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values[i]))) sum += value;\n      else --m;\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(valueof(values[i], i, values)))) sum += value;\n      else --m;\n    }\n  }\n\n  if (m) return sum / m;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/mean.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/median.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-array/src/median.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quantile */ \"./node_modules/d3-array/src/quantile.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      numbers = [];\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values[i]))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(valueof(values[i], i, values)))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  return Object(_quantile__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(numbers.sort(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), 0.5);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/median.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/merge.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/merge.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(arrays) {\n  var n = arrays.length,\n      m,\n      i = -1,\n      j = 0,\n      merged,\n      array;\n\n  while (++i < n) j += arrays[i].length;\n  merged = new Array(j);\n\n  while (--n >= 0) {\n    array = arrays[n];\n    m = array.length;\n    while (--m >= 0) {\n      merged[--j] = array[m];\n    }\n  }\n\n  return merged;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/merge.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/min.js":
/*!******************************************!*\
  !*** ./node_modules/d3-array/src/min.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  return min;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/min.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/number.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-array/src/number.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x === null ? NaN : +x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/number.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/pairs.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/pairs.js ***!
  \********************************************/
/*! exports provided: default, pair */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return pair; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, f) {\n  if (f == null) f = pair;\n  var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);\n  while (i < n) pairs[i] = f(p, p = array[++i]);\n  return pairs;\n});\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/pairs.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/permute.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-array/src/permute.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, indexes) {\n  var i = indexes.length, permutes = new Array(i);\n  while (i--) permutes[i] = array[indexes[i]];\n  return permutes;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/permute.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/quantile.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-array/src/quantile.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, p, valueof) {\n  if (valueof == null) valueof = _number__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/quantile.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/range.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/range.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/range.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/scan.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-array/src/scan.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-array/src/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, compare) {\n  if (!(n = values.length)) return;\n  var n,\n      i = 0,\n      j = 0,\n      xi,\n      xj = values[j];\n\n  if (compare == null) compare = _ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n  while (++i < n) {\n    if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n      xj = xi, j = i;\n    }\n  }\n\n  if (compare(xj, xj) === 0) return j;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/scan.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/shuffle.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-array/src/shuffle.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(array, i0, i1) {\n  var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m + i0];\n    array[m + i0] = array[i + i0];\n    array[i + i0] = t;\n  }\n\n  return array;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/shuffle.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/sum.js":
/*!******************************************!*\
  !*** ./node_modules/d3-array/src/sum.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (value = +valueof(values[i], i, values)) sum += value;\n    }\n  }\n\n  return sum;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/sum.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/threshold/freedmanDiaconis.js":
/*!*****************************************************************!*\
  !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!
  \*****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array */ \"./node_modules/d3-array/src/array.js\");\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ascending */ \"./node_modules/d3-array/src/ascending.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../number */ \"./node_modules/d3-array/src/number.js\");\n/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../quantile */ \"./node_modules/d3-array/src/quantile.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  values = _array__WEBPACK_IMPORTED_MODULE_0__[\"map\"].call(values, _number__WEBPACK_IMPORTED_MODULE_2__[\"default\"]).sort(_ascending__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n  return Math.ceil((max - min) / (2 * (Object(_quantile__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(values, 0.75) - Object(_quantile__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/threshold/freedmanDiaconis.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/threshold/scott.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-array/src/threshold/scott.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deviation */ \"./node_modules/d3-array/src/deviation.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * Object(_deviation__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values) * Math.pow(values.length, -1 / 3)));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/threshold/scott.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/threshold/sturges.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-array/src/threshold/sturges.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/threshold/sturges.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/ticks.js":
/*!********************************************!*\
  !*** ./node_modules/d3-array/src/ticks.js ***!
  \********************************************/
/*! exports provided: default, tickIncrement, tickStep */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return tickIncrement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return tickStep; });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n});\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/ticks.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/transpose.js":
/*!************************************************!*\
  !*** ./node_modules/d3-array/src/transpose.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min */ \"./node_modules/d3-array/src/min.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = Object(_min__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n});\n\nfunction length(d) {\n  return d.length;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/transpose.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/variance.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-array/src/variance.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-array/src/number.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values, valueof) {\n  var n = values.length,\n      m = 0,\n      i = -1,\n      mean = 0,\n      value,\n      delta,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values[i]))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(valueof(values[i], i, values)))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  if (m > 1) return sum / (m - 1);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/variance.js?");

/***/ }),

/***/ "./node_modules/d3-array/src/zip.js":
/*!******************************************!*\
  !*** ./node_modules/d3-array/src/zip.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose */ \"./node_modules/d3-array/src/transpose.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_transpose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-array/src/zip.js?");

/***/ }),

/***/ "./node_modules/d3-axis/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-axis/index.js ***!
  \***************************************/
/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/axis */ \"./node_modules/d3-axis/src/axis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return _src_axis__WEBPACK_IMPORTED_MODULE_0__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return _src_axis__WEBPACK_IMPORTED_MODULE_0__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return _src_axis__WEBPACK_IMPORTED_MODULE_0__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return _src_axis__WEBPACK_IMPORTED_MODULE_0__[\"axisLeft\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-axis/index.js?");

/***/ }),

/***/ "./node_modules/d3-axis/src/array.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-axis/src/array.js ***!
  \*******************************************/
/*! exports provided: slice */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-axis/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-axis/src/axis.js":
/*!******************************************!*\
  !*** ./node_modules/d3-axis/src/axis.js ***!
  \******************************************/
/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return axisTop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return axisRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return axisBottom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return axisLeft; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-axis/src/array.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ \"./node_modules/d3-axis/src/identity.js\");\n\n\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + (x + 0.5) + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + (y + 0.5) + \")\";\n}\n\nfunction number(scale) {\n  return function(d) {\n    return +scale(d);\n  };\n}\n\nfunction center(scale) {\n  var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.\n  if (scale.round()) offset = Math.round(offset);\n  return function(d) {\n    return +scale(d) + offset;\n  };\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + 0.5,\n        range1 = +range[range.length - 1] + 0.5,\n        position = (scale.bandwidth ? center : number)(scale.copy()),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"#000\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"#000\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"#000\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient == right\n            ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H0.5V\" + range1 + \"H\" + k * tickSizeOuter\n            : \"M\" + range0 + \",\" + k * tickSizeOuter + \"V0.5H\" + range1 + \"V\" + k * tickSizeOuter);\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d)); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  return axis;\n}\n\nfunction axisTop(scale) {\n  return axis(top, scale);\n}\n\nfunction axisRight(scale) {\n  return axis(right, scale);\n}\n\nfunction axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nfunction axisLeft(scale) {\n  return axis(left, scale);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-axis/src/axis.js?");

/***/ }),

/***/ "./node_modules/d3-axis/src/identity.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-axis/src/identity.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-axis/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-brush/src/brush.js":
/*!********************************************!*\
  !*** ./node_modules/d3-brush/src/brush.js ***!
  \********************************************/
/*! exports provided: brushSelection, brushX, brushY, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return brushSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return brushX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return brushY; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-brush/src/constant.js\");\n/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ \"./node_modules/d3-brush/src/event.js\");\n/* harmony import */ var _noevent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent */ \"./node_modules/d3-brush/src/noevent.js\");\n\n\n\n\n\n\n\n\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nvar X = {\n  name: \"x\",\n  handles: [\"e\", \"w\"].map(type),\n  input: function(x, e) { return x && [[x[0], e[0][1]], [x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y && [[e[0][0], y[0]], [e[1][0], y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\"].map(type),\n  input: function(xy) { return xy; },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nfunction brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nfunction brushX() {\n  return brush(X);\n}\n\nfunction brushY() {\n  return brush(Y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return brush(XY);\n});\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(brush, \"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\")\n        .on(\"mousedown.brush touchstart.brush\", started);\n  }\n\n  brush.move = function(group, selection) {\n    if (group.selection) {\n      group\n          .on(\"start.brush\", function() { emitter(this, arguments).beforestart().start(); })\n          .on(\"interrupt.brush end.brush\", function() { emitter(this, arguments).end(); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolate\"])(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && empty(selection1) ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 && selection1 ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n            state.selection = selection1 == null || empty(selection1) ? null : selection1;\n            redraw.call(that);\n            emit.start().brush().end();\n          });\n    }\n  };\n\n  function redraw() {\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args) {\n    return that.__brush.emitter || new Emitter(that, args);\n  }\n\n  function Emitter(that, args) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function() {\n      if (this.starting) this.starting = false, this.emit(\"start\");\n      return this;\n    },\n    brush: function() {\n      this.emit(\"brush\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\");\n      return this;\n    },\n    emit: function(type) {\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"customEvent\"])(new _event__WEBPACK_IMPORTED_MODULE_6__[\"default\"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function started() {\n    if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) { if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches.length < d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches.length) return Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(); }\n    else if (touchending) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].target.__data__.type,\n        mode = (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx,\n        dy,\n        moving,\n        shifting = signX && signY && d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].shiftKey,\n        lockX,\n        lockY,\n        point0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(that),\n        point = point0,\n        emit = emitter(that, arguments).beforestart();\n\n    if (type === \"overlay\") {\n      state.selection = selection = [\n        [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],\n        [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]\n      ];\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n      group\n          .on(\"touchmove.brush\", moved, true)\n          .on(\"touchend.brush touchcancel.brush\", ended, true);\n    } else {\n      var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view)\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view);\n    }\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n    redraw.call(that);\n    emit.start();\n\n    function moved() {\n      var point1 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(that);\n      if (shifting && !lockX && !lockY) {\n        if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;\n        else lockX = true;\n      }\n      point = point1;\n      moving = true;\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n      move();\n    }\n\n    function move() {\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n          else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n          if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n          else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));\n          if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush();\n      }\n    }\n\n    function ended() {\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n      if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n        if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n        group.on(\"touchmove.brush touchend.brush touchcancel.brush\", null);\n      } else {\n        Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end();\n    }\n\n    function keydowned() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n\n    function keyupped() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move();\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = extent.apply(this, arguments);\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : filter;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-brush/src/brush.js?");

/***/ }),

/***/ "./node_modules/d3-brush/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-brush/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-brush/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-brush/src/event.js":
/*!********************************************!*\
  !*** ./node_modules/d3-brush/src/event.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(target, type, selection) {\n  this.target = target;\n  this.type = type;\n  this.selection = selection;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-brush/src/event.js?");

/***/ }),

/***/ "./node_modules/d3-brush/src/index.js":
/*!********************************************!*\
  !*** ./node_modules/d3-brush/src/index.js ***!
  \********************************************/
/*! exports provided: brush, brushX, brushY, brushSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _brush__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush */ \"./node_modules/d3-brush/src/brush.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return _brush__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return _brush__WEBPACK_IMPORTED_MODULE_0__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return _brush__WEBPACK_IMPORTED_MODULE_0__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return _brush__WEBPACK_IMPORTED_MODULE_0__[\"brushSelection\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-brush/src/index.js?");

/***/ }),

/***/ "./node_modules/d3-brush/src/noevent.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-brush/src/noevent.js ***!
  \**********************************************/
/*! exports provided: nopropagation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-brush/src/noevent.js?");

/***/ }),

/***/ "./node_modules/d3-chord/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-chord/index.js ***!
  \****************************************/
/*! exports provided: chord, ribbon */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_chord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/chord */ \"./node_modules/d3-chord/src/chord.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return _src_chord__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_ribbon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/ribbon */ \"./node_modules/d3-chord/src/ribbon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return _src_ribbon__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/index.js?");

/***/ }),

/***/ "./node_modules/d3-chord/src/array.js":
/*!********************************************!*\
  !*** ./node_modules/d3-chord/src/array.js ***!
  \********************************************/
/*! exports provided: slice */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-chord/src/chord.js":
/*!********************************************!*\
  !*** ./node_modules/d3-chord/src/chord.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-chord/src/math.js\");\n\n\n\nfunction compareValue(compare) {\n  return function(a, b) {\n    return compare(\n      a.source.value + a.target.value,\n      b.source.value + b.target.value\n    );\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var padAngle = 0,\n      sortGroups = null,\n      sortSubgroups = null,\n      sortChords = null;\n\n  function chord(matrix) {\n    var n = matrix.length,\n        groupSums = [],\n        groupIndex = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n),\n        subgroupIndex = [],\n        chords = [],\n        groups = chords.groups = new Array(n),\n        subgroups = new Array(n * n),\n        k,\n        x,\n        x0,\n        dx,\n        i,\n        j;\n\n    // Compute the sum.\n    k = 0, i = -1; while (++i < n) {\n      x = 0, j = -1; while (++j < n) {\n        x += matrix[i][j];\n      }\n      groupSums.push(x);\n      subgroupIndex.push(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n));\n      k += x;\n    }\n\n    // Sort groups…\n    if (sortGroups) groupIndex.sort(function(a, b) {\n      return sortGroups(groupSums[a], groupSums[b]);\n    });\n\n    // Sort subgroups…\n    if (sortSubgroups) subgroupIndex.forEach(function(d, i) {\n      d.sort(function(a, b) {\n        return sortSubgroups(matrix[i][a], matrix[i][b]);\n      });\n    });\n\n    // Convert the sum to scaling factor for [0, 2pi].\n    // TODO Allow start and end angle to be specified?\n    // TODO Allow padding to be specified as percentage?\n    k = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"max\"])(0, _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] - padAngle * n) / k;\n    dx = k ? padAngle : _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] / n;\n\n    // Compute the start and end angle for each group and subgroup.\n    // Note: Opera has a bug reordering object literal properties!\n    x = 0, i = -1; while (++i < n) {\n      x0 = x, j = -1; while (++j < n) {\n        var di = groupIndex[i],\n            dj = subgroupIndex[di][j],\n            v = matrix[di][dj],\n            a0 = x,\n            a1 = x += v * k;\n        subgroups[dj * n + di] = {\n          index: di,\n          subindex: dj,\n          startAngle: a0,\n          endAngle: a1,\n          value: v\n        };\n      }\n      groups[di] = {\n        index: di,\n        startAngle: x0,\n        endAngle: x,\n        value: groupSums[di]\n      };\n      x += dx;\n    }\n\n    // Generate chords for each (non-empty) subgroup-subgroup link.\n    i = -1; while (++i < n) {\n      j = i - 1; while (++j < n) {\n        var source = subgroups[j * n + i],\n            target = subgroups[i * n + j];\n        if (source.value || target.value) {\n          chords.push(source.value < target.value\n              ? {source: target, target: source}\n              : {source: source, target: target});\n        }\n      }\n    }\n\n    return sortChords ? chords.sort(sortChords) : chords;\n  }\n\n  chord.padAngle = function(_) {\n    return arguments.length ? (padAngle = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"max\"])(0, _), chord) : padAngle;\n  };\n\n  chord.sortGroups = function(_) {\n    return arguments.length ? (sortGroups = _, chord) : sortGroups;\n  };\n\n  chord.sortSubgroups = function(_) {\n    return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n  };\n\n  chord.sortChords = function(_) {\n    return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n  };\n\n  return chord;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/src/chord.js?");

/***/ }),

/***/ "./node_modules/d3-chord/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-chord/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-chord/src/math.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-chord/src/math.js ***!
  \*******************************************/
/*! exports provided: cos, sin, pi, halfPi, tau, max */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = pi * 2;\nvar max = Math.max;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/src/math.js?");

/***/ }),

/***/ "./node_modules/d3-chord/src/ribbon.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-chord/src/ribbon.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-chord/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-chord/src/constant.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-chord/src/math.js\");\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n\n\n\n\n\nfunction defaultSource(d) {\n  return d.source;\n}\n\nfunction defaultTarget(d) {\n  return d.target;\n}\n\nfunction defaultRadius(d) {\n  return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n  return d.endAngle;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var source = defaultSource,\n      target = defaultTarget,\n      radius = defaultRadius,\n      startAngle = defaultStartAngle,\n      endAngle = defaultEndAngle,\n      context = null;\n\n  function ribbon() {\n    var buffer,\n        argv = _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(arguments),\n        s = source.apply(this, argv),\n        t = target.apply(this, argv),\n        sr = +radius.apply(this, (argv[0] = s, argv)),\n        sa0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        sa1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        sx0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(sa0),\n        sy0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(sa0),\n        tr = +radius.apply(this, (argv[0] = t, argv)),\n        ta0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        ta1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"];\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_3__[\"path\"])();\n\n    context.moveTo(sx0, sy0);\n    context.arc(0, 0, sr, sa0, sa1);\n    if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?\n      context.quadraticCurveTo(0, 0, tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(ta0), tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ta0));\n      context.arc(0, 0, tr, ta0, ta1);\n    }\n    context.quadraticCurveTo(0, 0, sx0, sy0);\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  ribbon.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : radius;\n  };\n\n  ribbon.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : startAngle;\n  };\n\n  ribbon.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), ribbon) : endAngle;\n  };\n\n  ribbon.source = function(_) {\n    return arguments.length ? (source = _, ribbon) : source;\n  };\n\n  ribbon.target = function(_) {\n    return arguments.length ? (target = _, ribbon) : target;\n  };\n\n  ribbon.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n  };\n\n  return ribbon;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-chord/src/ribbon.js?");

/***/ }),

/***/ "./node_modules/d3-collection/index.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-collection/index.js ***!
  \*********************************************/
/*! exports provided: nest, set, map, keys, values, entries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_nest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/nest */ \"./node_modules/d3-collection/src/nest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nest\", function() { return _src_nest__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/set */ \"./node_modules/d3-collection/src/set.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return _src_set__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/map */ \"./node_modules/d3-collection/src/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _src_map__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/keys */ \"./node_modules/d3-collection/src/keys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return _src_keys__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/values */ \"./node_modules/d3-collection/src/values.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return _src_values__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_entries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/entries */ \"./node_modules/d3-collection/src/entries.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"entries\", function() { return _src_entries__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/index.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/entries.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-collection/src/entries.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var entries = [];\n  for (var key in map) entries.push({key: key, value: map[key]});\n  return entries;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/entries.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/keys.js":
/*!************************************************!*\
  !*** ./node_modules/d3-collection/src/keys.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var keys = [];\n  for (var key in map) keys.push(key);\n  return keys;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/keys.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/map.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-collection/src/map.js ***!
  \***********************************************/
/*! exports provided: prefix, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefix\", function() { return prefix; });\nvar prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function(key) {\n    return (prefix + key) in this;\n  },\n  get: function(key) {\n    return this[prefix + key];\n  },\n  set: function(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function() {\n    for (var property in this) if (property[0] === prefix) delete this[property];\n  },\n  keys: function() {\n    var keys = [];\n    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n    return keys;\n  },\n  values: function() {\n    var values = [];\n    for (var property in this) if (property[0] === prefix) values.push(this[property]);\n    return values;\n  },\n  entries: function() {\n    var entries = [];\n    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n    return entries;\n  },\n  size: function() {\n    var size = 0;\n    for (var property in this) if (property[0] === prefix) ++size;\n    return size;\n  },\n  empty: function() {\n    for (var property in this) if (property[0] === prefix) return false;\n    return true;\n  },\n  each: function(f) {\n    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map;\n\n  // Copy constructor.\n  if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n  // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n    var i = -1,\n        n = object.length,\n        o;\n\n    if (f == null) while (++i < n) map.set(i, object[i]);\n    else while (++i < n) map.set(f(o = object[i], i, object), o);\n  }\n\n  // Convert object to map.\n  else if (object) for (var key in object) map.set(key, object[key]);\n\n  return map;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (map);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/map.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/nest.js":
/*!************************************************!*\
  !*** ./node_modules/d3-collection/src/nest.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ \"./node_modules/d3-collection/src/map.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var keys = [],\n      sortKeys = [],\n      sortValues,\n      rollup,\n      nest;\n\n  function apply(array, depth, createResult, setResult) {\n    if (depth >= keys.length) {\n      if (sortValues != null) array.sort(sortValues);\n      return rollup != null ? rollup(array) : array;\n    }\n\n    var i = -1,\n        n = array.length,\n        key = keys[depth++],\n        keyValue,\n        value,\n        valuesByKey = Object(_map__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n        values,\n        result = createResult();\n\n    while (++i < n) {\n      if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n        values.push(value);\n      } else {\n        valuesByKey.set(keyValue, [value]);\n      }\n    }\n\n    valuesByKey.each(function(values, key) {\n      setResult(result, key, apply(values, depth, createResult, setResult));\n    });\n\n    return result;\n  }\n\n  function entries(map, depth) {\n    if (++depth > keys.length) return map;\n    var array, sortKey = sortKeys[depth - 1];\n    if (rollup != null && depth >= keys.length) array = map.entries();\n    else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });\n    return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;\n  }\n\n  return nest = {\n    object: function(array) { return apply(array, 0, createObject, setObject); },\n    map: function(array) { return apply(array, 0, createMap, setMap); },\n    entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },\n    key: function(d) { keys.push(d); return nest; },\n    sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },\n    sortValues: function(order) { sortValues = order; return nest; },\n    rollup: function(f) { rollup = f; return nest; }\n  };\n});\n\nfunction createObject() {\n  return {};\n}\n\nfunction setObject(object, key, value) {\n  object[key] = value;\n}\n\nfunction createMap() {\n  return Object(_map__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n}\n\nfunction setMap(map, key, value) {\n  map.set(key, value);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/nest.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/set.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-collection/src/set.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ \"./node_modules/d3-collection/src/map.js\");\n\n\nfunction Set() {}\n\nvar proto = _map__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype;\n\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function(value) {\n    value += \"\";\n    this[_map__WEBPACK_IMPORTED_MODULE_0__[\"prefix\"] + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set;\n\n  // Copy constructor.\n  if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n  // Otherwise, assume it’s an array.\n  else if (object) {\n    var i = -1, n = object.length;\n    if (f == null) while (++i < n) set.add(object[i]);\n    else while (++i < n) set.add(f(object[i], i, object));\n  }\n\n  return set;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (set);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/set.js?");

/***/ }),

/***/ "./node_modules/d3-collection/src/values.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-collection/src/values.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(map) {\n  var values = [];\n  for (var key in map) values.push(map[key]);\n  return values;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-collection/src/values.js?");

/***/ }),

/***/ "./node_modules/d3-color/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-color/index.js ***!
  \****************************************/
/*! exports provided: color, rgb, hsl, lab, hcl, cubehelix */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/color */ \"./node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _src_color__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _src_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _src_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _src_lab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/lab */ \"./node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _src_lab__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _src_lab__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony import */ var _src_cubehelix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/cubehelix */ \"./node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _src_cubehelix__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/index.js?");

/***/ }),

/***/ "./node_modules/d3-color/src/color.js":
/*!********************************************!*\
  !*** ./node_modules/d3-color/src/color.js ***!
  \********************************************/
/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darker\", function() { return darker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brighter\", function() { return brighter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbConvert\", function() { return rgbConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Rgb\", function() { return Rgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslConvert\", function() { return hslConvert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return hsl; });\n/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define */ \"./node_modules/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex3 = /^#([0-9a-f]{3})$/,\n    reHex6 = /^#([0-9a-f]{6})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Color, color, {\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  toString: function() {\n    return this.rgb() + \"\";\n  }\n});\n\nfunction color(format) {\n  var m;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00\n      : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format])\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (0 <= this.r && this.r <= 255)\n        && (0 <= this.g && this.g <= 255)\n        && (0 <= this.b && this.b <= 255)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  toString: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"rgb(\" : \"rgba(\")\n        + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/src/color.js?");

/***/ }),

/***/ "./node_modules/d3-color/src/cubehelix.js":
/*!************************************************!*\
  !*** ./node_modules/d3-color/src/cubehelix.js ***!
  \************************************************/
/*! exports provided: default, Cubehelix */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof _color__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * _math__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"] - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    k = k == null ? _color__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? _color__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * _math__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"],\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new _color__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/src/cubehelix.js?");

/***/ }),

/***/ "./node_modules/d3-color/src/define.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-color/src/define.js ***!
  \*********************************************/
/*! exports provided: default, extend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/src/define.js?");

/***/ }),

/***/ "./node_modules/d3-color/src/lab.js":
/*!******************************************!*\
  !*** ./node_modules/d3-color/src/lab.js ***!
  \******************************************/
/*! exports provided: default, Lab, hcl, Hcl */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\nvar Kn = 18,\n    Xn = 0.950470, // D65 standard referent\n    Yn = 1,\n    Zn = 1.088830,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) {\n    var h = o.h * _math__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"];\n    return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n  }\n  if (!(o instanceof _color__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n  var b = rgb2xyz(o.r),\n      a = rgb2xyz(o.g),\n      l = rgb2xyz(o.b),\n      x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n      y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n      z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new _color__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n      xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n      xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n      xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  var h = Math.atan2(o.b, o.a) * _math__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"];\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nObject(_define__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return labConvert(this).rgb();\n  }\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/src/lab.js?");

/***/ }),

/***/ "./node_modules/d3-color/src/math.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-color/src/math.js ***!
  \*******************************************/
/*! exports provided: deg2rad, rad2deg */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deg2rad\", function() { return deg2rad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rad2deg\", function() { return rad2deg; });\nvar deg2rad = Math.PI / 180;\nvar rad2deg = 180 / Math.PI;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-color/src/math.js?");

/***/ }),

/***/ "./node_modules/d3-dispatch/index.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-dispatch/index.js ***!
  \*******************************************/
/*! exports provided: dispatch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/dispatch */ \"./node_modules/d3-dispatch/src/dispatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return _src_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dispatch/index.js?");

/***/ }),

/***/ "./node_modules/d3-dispatch/src/dispatch.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-dispatch/src/dispatch.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dispatch);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dispatch/src/dispatch.js?");

/***/ }),

/***/ "./node_modules/d3-drag/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-drag/index.js ***!
  \***************************************/
/*! exports provided: drag, dragDisable, dragEnable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_drag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/drag */ \"./node_modules/d3-drag/src/drag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return _src_drag__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_nodrag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/nodrag */ \"./node_modules/d3-drag/src/nodrag.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return _src_nodrag__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return _src_nodrag__WEBPACK_IMPORTED_MODULE_1__[\"yesdrag\"]; });\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/index.js?");

/***/ }),

/***/ "./node_modules/d3-drag/src/constant.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-drag/src/constant.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-drag/src/drag.js":
/*!******************************************!*\
  !*** ./node_modules/d3-drag/src/drag.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _nodrag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag */ \"./node_modules/d3-drag/src/nodrag.js\");\n/* harmony import */ var _noevent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent */ \"./node_modules/d3-drag/src/noevent.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-drag/src/constant.js\");\n/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event */ \"./node_modules/d3-drag/src/event.js\");\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].button;\n}\n\nfunction defaultContainer() {\n  return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n  return d == null ? {x: d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].x, y: d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].y} : d;\n}\n\nfunction defaultTouchable() {\n  return \"ontouchstart\" in this;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      container = defaultContainer,\n      subject = defaultSubject,\n      touchable = defaultTouchable,\n      gestures = {},\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"drag\", \"end\"),\n      active = 0,\n      mousedownx,\n      mousedowny,\n      mousemoving,\n      touchending,\n      clickDistance2 = 0;\n\n  function drag(selection) {\n    selection\n        .on(\"mousedown.drag\", mousedowned)\n      .filter(touchable)\n        .on(\"touchstart.drag\", touchstarted)\n        .on(\"touchmove.drag\", touchmoved)\n        .on(\"touchend.drag touchcancel.drag\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var gesture = beforestart(\"mouse\", container.apply(this, arguments), d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"mouse\"], this, arguments);\n    if (!gesture) return;\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n    Object(_nodrag__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view);\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n    mousemoving = false;\n    mousedownx = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientX;\n    mousedowny = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientY;\n    gesture(\"start\");\n  }\n\n  function mousemoved() {\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n    if (!mousemoving) {\n      var dx = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientX - mousedownx, dy = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].clientY - mousedowny;\n      mousemoving = dx * dx + dy * dy > clickDistance2;\n    }\n    gestures.mouse(\"drag\");\n  }\n\n  function mouseupped() {\n    Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view).on(\"mousemove.drag mouseup.drag\", null);\n    Object(_nodrag__WEBPACK_IMPORTED_MODULE_2__[\"yesdrag\"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].view, mousemoving);\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n    gestures.mouse(\"end\");\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        c = container.apply(this, arguments),\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = beforestart(touches[i].identifier, c, d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"touch\"], this, arguments)) {\n        Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n        gesture(\"start\");\n      }\n    }\n  }\n\n  function touchmoved() {\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n        gesture(\"drag\");\n      }\n    }\n  }\n\n  function touchended() {\n    var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].changedTouches,\n        n = touches.length, i, gesture;\n\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n    for (i = 0; i < n; ++i) {\n      if (gesture = gestures[touches[i].identifier]) {\n        Object(_noevent__WEBPACK_IMPORTED_MODULE_3__[\"nopropagation\"])();\n        gesture(\"end\");\n      }\n    }\n  }\n\n  function beforestart(id, container, point, that, args) {\n    var p = point(container, id), s, dx, dy,\n        sublisteners = listeners.copy();\n\n    if (!Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"customEvent\"])(new _event__WEBPACK_IMPORTED_MODULE_5__[\"default\"](drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n      if ((d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"event\"].subject = s = subject.apply(that, args)) == null) return false;\n      dx = s.x - p[0] || 0;\n      dy = s.y - p[1] || 0;\n      return true;\n    })) return;\n\n    return function gesture(type) {\n      var p0 = p, n;\n      switch (type) {\n        case \"start\": gestures[id] = gesture, n = active++; break;\n        case \"end\": delete gestures[id], --active; // nobreak\n        case \"drag\": p = point(container, id), n = active; break;\n      }\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"customEvent\"])(new _event__WEBPACK_IMPORTED_MODULE_5__[\"default\"](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n    };\n  }\n\n  drag.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : filter;\n  };\n\n  drag.container = function(_) {\n    return arguments.length ? (container = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : container;\n  };\n\n  drag.subject = function(_) {\n    return arguments.length ? (subject = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_), drag) : subject;\n  };\n\n  drag.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!!_), drag) : touchable;\n  };\n\n  drag.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? drag : value;\n  };\n\n  drag.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n  };\n\n  return drag;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/src/drag.js?");

/***/ }),

/***/ "./node_modules/d3-drag/src/event.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-drag/src/event.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DragEvent; });\nfunction DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n  this.target = target;\n  this.type = type;\n  this.subject = subject;\n  this.identifier = id;\n  this.active = active;\n  this.x = x;\n  this.y = y;\n  this.dx = dx;\n  this.dy = dy;\n  this._ = dispatch;\n}\n\nDragEvent.prototype.on = function() {\n  var value = this._.on.apply(this._, arguments);\n  return value === this._ ? this : value;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/src/event.js?");

/***/ }),

/***/ "./node_modules/d3-drag/src/nodrag.js":
/*!********************************************!*\
  !*** ./node_modules/d3-drag/src/nodrag.js ***!
  \********************************************/
/*! exports provided: default, yesdrag */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"yesdrag\", function() { return yesdrag; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _noevent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent */ \"./node_modules/d3-drag/src/noevent.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(view) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", _noevent__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", _noevent__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n});\n\nfunction yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", _noevent__WEBPACK_IMPORTED_MODULE_1__[\"default\"], true);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/src/nodrag.js?");

/***/ }),

/***/ "./node_modules/d3-drag/src/noevent.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-drag/src/noevent.js ***!
  \*********************************************/
/*! exports provided: nopropagation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-drag/src/noevent.js?");

/***/ }),

/***/ "./node_modules/d3-dsv/index.js":
/*!**************************************!*\
  !*** ./node_modules/d3-dsv/index.js ***!
  \**************************************/
/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatRows, tsvParse, tsvParseRows, tsvFormat, tsvFormatRows */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/dsv */ \"./node_modules/d3-dsv/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return _src_dsv__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_csv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/csv */ \"./node_modules/d3-dsv/src/csv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return _src_csv__WEBPACK_IMPORTED_MODULE_1__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return _src_csv__WEBPACK_IMPORTED_MODULE_1__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return _src_csv__WEBPACK_IMPORTED_MODULE_1__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return _src_csv__WEBPACK_IMPORTED_MODULE_1__[\"csvFormatRows\"]; });\n\n/* harmony import */ var _src_tsv__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/tsv */ \"./node_modules/d3-dsv/src/tsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return _src_tsv__WEBPACK_IMPORTED_MODULE_2__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return _src_tsv__WEBPACK_IMPORTED_MODULE_2__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return _src_tsv__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return _src_tsv__WEBPACK_IMPORTED_MODULE_2__[\"tsvFormatRows\"]; });\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dsv/index.js?");

/***/ }),

/***/ "./node_modules/d3-dsv/src/csv.js":
/*!****************************************!*\
  !*** ./node_modules/d3-dsv/src/csv.js ***!
  \****************************************/
/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatRows */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return csvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return csvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return csvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return csvFormatRows; });\n/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv */ \"./node_modules/d3-dsv/src/dsv.js\");\n\n\nvar csv = Object(_dsv__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\",\");\n\nvar csvParse = csv.parse;\nvar csvParseRows = csv.parseRows;\nvar csvFormat = csv.format;\nvar csvFormatRows = csv.formatRows;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dsv/src/csv.js?");

/***/ }),

/***/ "./node_modules/d3-dsv/src/dsv.js":
/*!****************************************!*\
  !*** ./node_modules/d3-dsv/src/dsv.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar EOL = {},\n    EOF = {},\n    QUOTE = 34,\n    NEWLINE = 10,\n    RETURN = 13;\n\nfunction objectConverter(columns) {\n  return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n    return JSON.stringify(name) + \": d[\" + i + \"]\";\n  }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n  var object = objectConverter(columns);\n  return function(row, i) {\n    return f(object(row), i, columns);\n  };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n  var columnSet = Object.create(null),\n      columns = [];\n\n  rows.forEach(function(row) {\n    for (var column in row) {\n      if (!(column in columnSet)) {\n        columns.push(columnSet[column] = column);\n      }\n    }\n  });\n\n  return columns;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(delimiter) {\n  var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n      DELIMITER = delimiter.charCodeAt(0);\n\n  function parse(text, f) {\n    var convert, columns, rows = parseRows(text, function(row, i) {\n      if (convert) return convert(row, i - 1);\n      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n    });\n    rows.columns = columns || [];\n    return rows;\n  }\n\n  function parseRows(text, f) {\n    var rows = [], // output rows\n        N = text.length,\n        I = 0, // current character index\n        n = 0, // current line number\n        t, // current token\n        eof = N <= 0, // current token followed by EOF?\n        eol = false; // current token followed by EOL?\n\n    // Strip the trailing newline.\n    if (text.charCodeAt(N - 1) === NEWLINE) --N;\n    if (text.charCodeAt(N - 1) === RETURN) --N;\n\n    function token() {\n      if (eof) return EOF;\n      if (eol) return eol = false, EOL;\n\n      // Unescape quotes.\n      var i, j = I, c;\n      if (text.charCodeAt(j) === QUOTE) {\n        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n        if ((i = I) >= N) eof = true;\n        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n      }\n\n      // Find next delimiter or newline.\n      while (I < N) {\n        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        else if (c !== DELIMITER) continue;\n        return text.slice(j, i);\n      }\n\n      // Return last token before EOF.\n      return eof = true, text.slice(j, N);\n    }\n\n    while ((t = token()) !== EOF) {\n      var row = [];\n      while (t !== EOL && t !== EOF) row.push(t), t = token();\n      if (f && (row = f(row, n++)) == null) continue;\n      rows.push(row);\n    }\n\n    return rows;\n  }\n\n  function format(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) {\n      return columns.map(function(column) {\n        return formatValue(row[column]);\n      }).join(delimiter);\n    })).join(\"\\n\");\n  }\n\n  function formatRows(rows) {\n    return rows.map(formatRow).join(\"\\n\");\n  }\n\n  function formatRow(row) {\n    return row.map(formatValue).join(delimiter);\n  }\n\n  function formatValue(text) {\n    return text == null ? \"\"\n        : reFormat.test(text += \"\") ? \"\\\"\" + text.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n        : text;\n  }\n\n  return {\n    parse: parse,\n    parseRows: parseRows,\n    format: format,\n    formatRows: formatRows\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dsv/src/dsv.js?");

/***/ }),

/***/ "./node_modules/d3-dsv/src/tsv.js":
/*!****************************************!*\
  !*** ./node_modules/d3-dsv/src/tsv.js ***!
  \****************************************/
/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatRows */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return tsvParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return tsvParseRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return tsvFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return tsvFormatRows; });\n/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv */ \"./node_modules/d3-dsv/src/dsv.js\");\n\n\nvar tsv = Object(_dsv__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"\\t\");\n\nvar tsvParse = tsv.parse;\nvar tsvParseRows = tsv.parseRows;\nvar tsvFormat = tsv.format;\nvar tsvFormatRows = tsv.formatRows;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-dsv/src/tsv.js?");

/***/ }),

/***/ "./node_modules/d3-ease/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-ease/index.js ***!
  \***************************************/
/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/linear */ \"./node_modules/d3-ease/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return _src_linear__WEBPACK_IMPORTED_MODULE_0__[\"linear\"]; });\n\n/* harmony import */ var _src_quad__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/quad */ \"./node_modules/d3-ease/src/quad.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return _src_quad__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return _src_quad__WEBPACK_IMPORTED_MODULE_1__[\"quadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return _src_quad__WEBPACK_IMPORTED_MODULE_1__[\"quadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return _src_quad__WEBPACK_IMPORTED_MODULE_1__[\"quadInOut\"]; });\n\n/* harmony import */ var _src_cubic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/cubic */ \"./node_modules/d3-ease/src/cubic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return _src_cubic__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return _src_cubic__WEBPACK_IMPORTED_MODULE_2__[\"cubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return _src_cubic__WEBPACK_IMPORTED_MODULE_2__[\"cubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return _src_cubic__WEBPACK_IMPORTED_MODULE_2__[\"cubicInOut\"]; });\n\n/* harmony import */ var _src_poly__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/poly */ \"./node_modules/d3-ease/src/poly.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return _src_poly__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return _src_poly__WEBPACK_IMPORTED_MODULE_3__[\"polyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return _src_poly__WEBPACK_IMPORTED_MODULE_3__[\"polyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return _src_poly__WEBPACK_IMPORTED_MODULE_3__[\"polyInOut\"]; });\n\n/* harmony import */ var _src_sin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/sin */ \"./node_modules/d3-ease/src/sin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return _src_sin__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return _src_sin__WEBPACK_IMPORTED_MODULE_4__[\"sinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return _src_sin__WEBPACK_IMPORTED_MODULE_4__[\"sinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return _src_sin__WEBPACK_IMPORTED_MODULE_4__[\"sinInOut\"]; });\n\n/* harmony import */ var _src_exp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/exp */ \"./node_modules/d3-ease/src/exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return _src_exp__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return _src_exp__WEBPACK_IMPORTED_MODULE_5__[\"expIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return _src_exp__WEBPACK_IMPORTED_MODULE_5__[\"expOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return _src_exp__WEBPACK_IMPORTED_MODULE_5__[\"expInOut\"]; });\n\n/* harmony import */ var _src_circle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/circle */ \"./node_modules/d3-ease/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return _src_circle__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return _src_circle__WEBPACK_IMPORTED_MODULE_6__[\"circleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return _src_circle__WEBPACK_IMPORTED_MODULE_6__[\"circleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return _src_circle__WEBPACK_IMPORTED_MODULE_6__[\"circleInOut\"]; });\n\n/* harmony import */ var _src_bounce__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/bounce */ \"./node_modules/d3-ease/src/bounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return _src_bounce__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return _src_bounce__WEBPACK_IMPORTED_MODULE_7__[\"bounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return _src_bounce__WEBPACK_IMPORTED_MODULE_7__[\"bounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return _src_bounce__WEBPACK_IMPORTED_MODULE_7__[\"bounceInOut\"]; });\n\n/* harmony import */ var _src_back__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/back */ \"./node_modules/d3-ease/src/back.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return _src_back__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return _src_back__WEBPACK_IMPORTED_MODULE_8__[\"backIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return _src_back__WEBPACK_IMPORTED_MODULE_8__[\"backOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return _src_back__WEBPACK_IMPORTED_MODULE_8__[\"backInOut\"]; });\n\n/* harmony import */ var _src_elastic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/elastic */ \"./node_modules/d3-ease/src/elastic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return _src_elastic__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return _src_elastic__WEBPACK_IMPORTED_MODULE_9__[\"elasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return _src_elastic__WEBPACK_IMPORTED_MODULE_9__[\"elasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return _src_elastic__WEBPACK_IMPORTED_MODULE_9__[\"elasticInOut\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/index.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/back.js":
/*!******************************************!*\
  !*** ./node_modules/d3-ease/src/back.js ***!
  \******************************************/
/*! exports provided: backIn, backOut, backInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backIn\", function() { return backIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backOut\", function() { return backOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"backInOut\", function() { return backInOut; });\nvar overshoot = 1.70158;\n\nvar backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return t * t * ((s + 1) * t - s);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nvar backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((s + 1) * t + s) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nvar backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/back.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/bounce.js":
/*!********************************************!*\
  !*** ./node_modules/d3-ease/src/bounce.js ***!
  \********************************************/
/*! exports provided: bounceIn, bounceOut, bounceInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceIn\", function() { return bounceIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceOut\", function() { return bounceOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bounceInOut\", function() { return bounceInOut; });\nvar b1 = 4 / 11,\n    b2 = 6 / 11,\n    b3 = 8 / 11,\n    b4 = 3 / 4,\n    b5 = 9 / 11,\n    b6 = 10 / 11,\n    b7 = 15 / 16,\n    b8 = 21 / 22,\n    b9 = 63 / 64,\n    b0 = 1 / b1 / b1;\n\nfunction bounceIn(t) {\n  return 1 - bounceOut(1 - t);\n}\n\nfunction bounceOut(t) {\n  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nfunction bounceInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/bounce.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/circle.js":
/*!********************************************!*\
  !*** ./node_modules/d3-ease/src/circle.js ***!
  \********************************************/
/*! exports provided: circleIn, circleOut, circleInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleIn\", function() { return circleIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleOut\", function() { return circleOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleInOut\", function() { return circleInOut; });\nfunction circleIn(t) {\n  return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction circleOut(t) {\n  return Math.sqrt(1 - --t * t);\n}\n\nfunction circleInOut(t) {\n  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/circle.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/cubic.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-ease/src/cubic.js ***!
  \*******************************************/
/*! exports provided: cubicIn, cubicOut, cubicInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicIn\", function() { return cubicIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicOut\", function() { return cubicOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubicInOut\", function() { return cubicInOut; });\nfunction cubicIn(t) {\n  return t * t * t;\n}\n\nfunction cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nfunction cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/cubic.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/elastic.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-ease/src/elastic.js ***!
  \*********************************************/
/*! exports provided: elasticIn, elasticOut, elasticInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticIn\", function() { return elasticIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticOut\", function() { return elasticOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elasticInOut\", function() { return elasticInOut; });\nvar tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nvar elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nvar elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nvar elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p)\n        : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/elastic.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/exp.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-ease/src/exp.js ***!
  \*****************************************/
/*! exports provided: expIn, expOut, expInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expIn\", function() { return expIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expOut\", function() { return expOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"expInOut\", function() { return expInOut; });\nfunction expIn(t) {\n  return Math.pow(2, 10 * t - 10);\n}\n\nfunction expOut(t) {\n  return 1 - Math.pow(2, -10 * t);\n}\n\nfunction expInOut(t) {\n  return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/exp.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/linear.js":
/*!********************************************!*\
  !*** ./node_modules/d3-ease/src/linear.js ***!
  \********************************************/
/*! exports provided: linear */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linear\", function() { return linear; });\nfunction linear(t) {\n  return +t;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/linear.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/poly.js":
/*!******************************************!*\
  !*** ./node_modules/d3-ease/src/poly.js ***!
  \******************************************/
/*! exports provided: polyIn, polyOut, polyInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyIn\", function() { return polyIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyOut\", function() { return polyOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyInOut\", function() { return polyInOut; });\nvar exponent = 3;\n\nvar polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nvar polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nvar polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/poly.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/quad.js":
/*!******************************************!*\
  !*** ./node_modules/d3-ease/src/quad.js ***!
  \******************************************/
/*! exports provided: quadIn, quadOut, quadInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadIn\", function() { return quadIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadOut\", function() { return quadOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quadInOut\", function() { return quadInOut; });\nfunction quadIn(t) {\n  return t * t;\n}\n\nfunction quadOut(t) {\n  return t * (2 - t);\n}\n\nfunction quadInOut(t) {\n  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/quad.js?");

/***/ }),

/***/ "./node_modules/d3-ease/src/sin.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-ease/src/sin.js ***!
  \*****************************************/
/*! exports provided: sinIn, sinOut, sinInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinIn\", function() { return sinIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinOut\", function() { return sinOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinInOut\", function() { return sinInOut; });\nvar pi = Math.PI,\n    halfPi = pi / 2;\n\nfunction sinIn(t) {\n  return 1 - Math.cos(t * halfPi);\n}\n\nfunction sinOut(t) {\n  return Math.sin(t * halfPi);\n}\n\nfunction sinInOut(t) {\n  return (1 - Math.cos(pi * t)) / 2;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-ease/src/sin.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/blob.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-fetch/src/blob.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction responseBlob(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.blob();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseBlob);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/blob.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/buffer.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-fetch/src/buffer.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction responseArrayBuffer(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.arrayBuffer();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseArrayBuffer);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/buffer.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/dsv.js":
/*!******************************************!*\
  !*** ./node_modules/d3-fetch/src/dsv.js ***!
  \******************************************/
/*! exports provided: default, csv, tsv */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return dsv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return csv; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return tsv; });\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-fetch/src/text.js\");\n\n\n\nfunction dsvParse(parse) {\n  return function(input, init, row) {\n    if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n    return Object(_text__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n      return parse(response, row);\n    });\n  };\n}\n\nfunction dsv(delimiter, input, init, row) {\n  if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n  var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"dsvFormat\"])(delimiter);\n  return Object(_text__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input, init).then(function(response) {\n    return format.parse(response, row);\n  });\n}\n\nvar csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"csvParse\"]);\nvar tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"tsvParse\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/dsv.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/image.js":
/*!********************************************!*\
  !*** ./node_modules/d3-fetch/src/image.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return new Promise(function(resolve, reject) {\n    var image = new Image;\n    for (var key in init) image[key] = init[key];\n    image.onerror = reject;\n    image.onload = function() { resolve(image); };\n    image.src = input;\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/image.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/index.js":
/*!********************************************!*\
  !*** ./node_modules/d3-fetch/src/index.js ***!
  \********************************************/
/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _blob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob */ \"./node_modules/d3-fetch/src/blob.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blob\", function() { return _blob__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer */ \"./node_modules/d3-fetch/src/buffer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"buffer\", function() { return _buffer__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv */ \"./node_modules/d3-fetch/src/dsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsv\", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__[\"tsv\"]; });\n\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image */ \"./node_modules/d3-fetch/src/image.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return _image__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json */ \"./node_modules/d3-fetch/src/json.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return _json__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-fetch/src/text.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return _text__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _xml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml */ \"./node_modules/d3-fetch/src/xml.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__[\"svg\"]; });\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/index.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/json.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-fetch/src/json.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction responseJson(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.json();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseJson);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/json.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/text.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-fetch/src/text.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction responseText(response) {\n  if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n  return response.text();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(input, init) {\n  return fetch(input, init).then(responseText);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/text.js?");

/***/ }),

/***/ "./node_modules/d3-fetch/src/xml.js":
/*!******************************************!*\
  !*** ./node_modules/d3-fetch/src/xml.js ***!
  \******************************************/
/*! exports provided: default, html, svg */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return html; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"svg\", function() { return svg; });\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-fetch/src/text.js\");\n\n\nfunction parser(type) {\n  return function(input, init)  {\n    return Object(_text__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(input, init).then(function(text) {\n      return (new DOMParser).parseFromString(text, type);\n    });\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parser(\"application/xml\"));\n\nvar html = parser(\"text/html\");\n\nvar svg = parser(\"image/svg+xml\");\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-fetch/src/xml.js?");

/***/ }),

/***/ "./node_modules/d3-force/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-force/index.js ***!
  \****************************************/
/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_center__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/center */ \"./node_modules/d3-force/src/center.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return _src_center__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_collide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/collide */ \"./node_modules/d3-force/src/collide.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return _src_collide__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/link */ \"./node_modules/d3-force/src/link.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return _src_link__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_manyBody__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/manyBody */ \"./node_modules/d3-force/src/manyBody.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return _src_manyBody__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_radial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/radial */ \"./node_modules/d3-force/src/radial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return _src_radial__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_simulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/simulation */ \"./node_modules/d3-force/src/simulation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return _src_simulation__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_x__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/x */ \"./node_modules/d3-force/src/x.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return _src_x__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/y */ \"./node_modules/d3-force/src/y.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return _src_y__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/index.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/center.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-force/src/center.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  var nodes;\n\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force() {\n    var i,\n        n = nodes.length,\n        node,\n        sx = 0,\n        sy = 0;\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], sx += node.x, sy += node.y;\n    }\n\n    for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {\n      node = nodes[i], node.x -= sx, node.y -= sy;\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/center.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/collide.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-force/src/collide.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/index.js\");\n\n\n\n\nfunction x(d) {\n  return d.x + d.vx;\n}\n\nfunction y(d) {\n  return d.y + d.vy;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var nodes,\n      radii,\n      strength = 1,\n      iterations = 1;\n\n  if (typeof radius !== \"function\") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(radius == null ? 1 : +radius);\n\n  function force() {\n    var i, n = nodes.length,\n        tree,\n        node,\n        xi,\n        yi,\n        ri,\n        ri2;\n\n    for (var k = 0; k < iterations; ++k) {\n      tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__[\"quadtree\"])(nodes, x, y).visitAfter(prepare);\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        ri = radii[node.index], ri2 = ri * ri;\n        xi = node.x + node.vx;\n        yi = node.y + node.vy;\n        tree.visit(apply);\n      }\n    }\n\n    function apply(quad, x0, y0, x1, y1) {\n      var data = quad.data, rj = quad.r, r = ri + rj;\n      if (data) {\n        if (data.index > node.index) {\n          var x = xi - data.x - data.vx,\n              y = yi - data.y - data.vy,\n              l = x * x + y * y;\n          if (l < r * r) {\n            if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n            if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n            l = (r - (l = Math.sqrt(l))) / l * strength;\n            node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n            node.vy += (y *= l) * r;\n            data.vx -= x * (r = 1 - r);\n            data.vy -= y * r;\n          }\n        }\n        return;\n      }\n      return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n    }\n  }\n\n  function prepare(quad) {\n    if (quad.data) return quad.r = radii[quad.data.index];\n    for (var i = quad.r = 0; i < 4; ++i) {\n      if (quad[i] && quad[i].r > quad.r) {\n        quad.r = quad[i].r;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    radii = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = +_, force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/collide.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-force/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/jiggle.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-force/src/jiggle.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return (Math.random() - 0.5) * 1e-6;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/jiggle.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/link.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-force/src/link.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/index.js\");\n\n\n\n\nfunction index(d) {\n  return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n  var node = nodeById.get(nodeId);\n  if (!node) throw new Error(\"missing: \" + nodeId);\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(links) {\n  var id = index,\n      strength = defaultStrength,\n      strengths,\n      distance = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(30),\n      distances,\n      nodes,\n      count,\n      bias,\n      iterations = 1;\n\n  if (links == null) links = [];\n\n  function defaultStrength(link) {\n    return 1 / Math.min(count[link.source.index], count[link.target.index]);\n  }\n\n  function force(alpha) {\n    for (var k = 0, n = links.length; k < iterations; ++k) {\n      for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n        link = links[i], source = link.source, target = link.target;\n        x = target.x + target.vx - source.x - source.vx || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n        y = target.y + target.vy - source.y - source.vy || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n        l = Math.sqrt(x * x + y * y);\n        l = (l - distances[i]) / l * alpha * strengths[i];\n        x *= l, y *= l;\n        target.vx -= x * (b = bias[i]);\n        target.vy -= y * b;\n        source.vx += x * (b = 1 - b);\n        source.vy += y * b;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n\n    var i,\n        n = nodes.length,\n        m = links.length,\n        nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(nodes, id),\n        link;\n\n    for (i = 0, count = new Array(n); i < m; ++i) {\n      link = links[i], link.index = i;\n      if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n      if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n      count[link.source.index] = (count[link.source.index] || 0) + 1;\n      count[link.target.index] = (count[link.target.index] || 0) + 1;\n    }\n\n    for (i = 0, bias = new Array(m); i < m; ++i) {\n      link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n    }\n\n    strengths = new Array(m), initializeStrength();\n    distances = new Array(m), initializeDistance();\n  }\n\n  function initializeStrength() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      strengths[i] = +strength(links[i], i, links);\n    }\n  }\n\n  function initializeDistance() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      distances[i] = +distance(links[i], i, links);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.links = function(_) {\n    return arguments.length ? (links = _, initialize(), force) : links;\n  };\n\n  force.id = function(_) {\n    return arguments.length ? (id = _, force) : id;\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeStrength(), force) : strength;\n  };\n\n  force.distance = function(_) {\n    return arguments.length ? (distance = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initializeDistance(), force) : distance;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/link.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/manyBody.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-force/src/manyBody.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ \"./node_modules/d3-force/src/jiggle.js\");\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/index.js\");\n/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation */ \"./node_modules/d3-force/src/simulation.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes,\n      node,\n      alpha,\n      strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(-30),\n      strengths,\n      distanceMin2 = 1,\n      distanceMax2 = Infinity,\n      theta2 = 0.81;\n\n  function force(_) {\n    var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__[\"quadtree\"])(nodes, _simulation__WEBPACK_IMPORTED_MODULE_3__[\"x\"], _simulation__WEBPACK_IMPORTED_MODULE_3__[\"y\"]).visitAfter(accumulate);\n    for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    strengths = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n  }\n\n  function accumulate(quad) {\n    var strength = 0, q, c, weight = 0, x, y, i;\n\n    // For internal nodes, accumulate forces from child quadrants.\n    if (quad.length) {\n      for (x = y = i = 0; i < 4; ++i) {\n        if ((q = quad[i]) && (c = Math.abs(q.value))) {\n          strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n        }\n      }\n      quad.x = x / weight;\n      quad.y = y / weight;\n    }\n\n    // For leaf nodes, accumulate forces from coincident quadrants.\n    else {\n      q = quad;\n      q.x = q.data.x;\n      q.y = q.data.y;\n      do strength += strengths[q.data.index];\n      while (q = q.next);\n    }\n\n    quad.value = strength;\n  }\n\n  function apply(quad, x1, _, x2) {\n    if (!quad.value) return true;\n\n    var x = quad.x - node.x,\n        y = quad.y - node.y,\n        w = x2 - x1,\n        l = x * x + y * y;\n\n    // Apply the Barnes-Hut approximation if possible.\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (w * w / theta2 < l) {\n      if (l < distanceMax2) {\n        if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n        if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n        if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n        node.vx += x * quad.value * alpha / l;\n        node.vy += y * quad.value * alpha / l;\n      }\n      return true;\n    }\n\n    // Otherwise, process points directly.\n    else if (quad.length || l >= distanceMax2) return;\n\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (quad.data !== node || quad.next) {\n      if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += x * x;\n      if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), l += y * y;\n      if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n    }\n\n    do if (quad.data !== node) {\n      w = strengths[quad.data.index] * alpha / l;\n      node.vx += x * w;\n      node.vy += y * w;\n    } while (quad = quad.next);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.distanceMin = function(_) {\n    return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n  };\n\n  force.distanceMax = function(_) {\n    return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n  };\n\n  force.theta = function(_) {\n    return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/manyBody.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/radial.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-force/src/radial.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius, x, y) {\n  var nodes,\n      strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      strengths,\n      radiuses;\n\n  if (typeof radius !== \"function\") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+radius);\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length; i < n; ++i) {\n      var node = nodes[i],\n          dx = node.x - x || 1e-6,\n          dy = node.y - y || 1e-6,\n          r = Math.sqrt(dx * dx + dy * dy),\n          k = (radiuses[i] - r) * strengths[i] * alpha / r;\n      node.vx += dx * k;\n      node.vy += dy * k;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    radiuses = new Array(n);\n    for (i = 0; i < n; ++i) {\n      radiuses[i] = +radius(nodes[i], i, nodes);\n      strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _, initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : radius;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/radial.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/simulation.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-force/src/simulation.js ***!
  \*************************************************/
/*! exports provided: x, y, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/index.js\");\n\n\n\n\nfunction x(d) {\n  return d.x;\n}\n\nfunction y(d) {\n  return d.y;\n}\n\nvar initialRadius = 10,\n    initialAngle = Math.PI * (3 - Math.sqrt(5));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(nodes) {\n  var simulation,\n      alpha = 1,\n      alphaMin = 0.001,\n      alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n      alphaTarget = 0,\n      velocityDecay = 0.6,\n      forces = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(),\n      stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_2__[\"timer\"])(step),\n      event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"tick\", \"end\");\n\n  if (nodes == null) nodes = [];\n\n  function step() {\n    tick();\n    event.call(\"tick\", simulation);\n    if (alpha < alphaMin) {\n      stepper.stop();\n      event.call(\"end\", simulation);\n    }\n  }\n\n  function tick() {\n    var i, n = nodes.length, node;\n\n    alpha += (alphaTarget - alpha) * alphaDecay;\n\n    forces.each(function(force) {\n      force(alpha);\n    });\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i];\n      if (node.fx == null) node.x += node.vx *= velocityDecay;\n      else node.x = node.fx, node.vx = 0;\n      if (node.fy == null) node.y += node.vy *= velocityDecay;\n      else node.y = node.fy, node.vy = 0;\n    }\n  }\n\n  function initializeNodes() {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.index = i;\n      if (isNaN(node.x) || isNaN(node.y)) {\n        var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;\n        node.x = radius * Math.cos(angle);\n        node.y = radius * Math.sin(angle);\n      }\n      if (isNaN(node.vx) || isNaN(node.vy)) {\n        node.vx = node.vy = 0;\n      }\n    }\n  }\n\n  function initializeForce(force) {\n    if (force.initialize) force.initialize(nodes);\n    return force;\n  }\n\n  initializeNodes();\n\n  return simulation = {\n    tick: tick,\n\n    restart: function() {\n      return stepper.restart(step), simulation;\n    },\n\n    stop: function() {\n      return stepper.stop(), simulation;\n    },\n\n    nodes: function(_) {\n      return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;\n    },\n\n    alpha: function(_) {\n      return arguments.length ? (alpha = +_, simulation) : alpha;\n    },\n\n    alphaMin: function(_) {\n      return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n    },\n\n    alphaDecay: function(_) {\n      return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n    },\n\n    alphaTarget: function(_) {\n      return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n    },\n\n    velocityDecay: function(_) {\n      return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n    },\n\n    force: function(name, _) {\n      return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n    },\n\n    find: function(x, y, radius) {\n      var i = 0,\n          n = nodes.length,\n          dx,\n          dy,\n          d2,\n          node,\n          closest;\n\n      if (radius == null) radius = Infinity;\n      else radius *= radius;\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        dx = x - node.x;\n        dy = y - node.y;\n        d2 = dx * dx + dy * dy;\n        if (d2 < radius) closest = node, radius = d2;\n      }\n\n      return closest;\n    },\n\n    on: function(name, _) {\n      return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n    }\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/simulation.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/x.js":
/*!****************************************!*\
  !*** ./node_modules/d3-force/src/x.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      xz;\n\n  if (typeof x !== \"function\") x = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x == null ? 0 : +x);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    xz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : x;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/x.js?");

/***/ }),

/***/ "./node_modules/d3-force/src/y.js":
/*!****************************************!*\
  !*** ./node_modules/d3-force/src/y.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-force/src/constant.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(y) {\n  var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0.1),\n      nodes,\n      strengths,\n      yz;\n\n  if (typeof y !== \"function\") y = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(y == null ? 0 : +y);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    yz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : strength;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), initialize(), force) : y;\n  };\n\n  return force;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-force/src/y.js?");

/***/ }),

/***/ "./node_modules/d3-format/index.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-format/index.js ***!
  \*****************************************/
/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, precisionFixed, precisionPrefix, precisionRound */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/defaultLocale */ \"./node_modules/d3-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"formatPrefix\"]; });\n\n/* harmony import */ var _src_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/locale */ \"./node_modules/d3-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return _src_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_formatSpecifier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/formatSpecifier */ \"./node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return _src_formatSpecifier__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_precisionFixed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/precisionFixed */ \"./node_modules/d3-format/src/precisionFixed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return _src_precisionFixed__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_precisionPrefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/precisionPrefix */ \"./node_modules/d3-format/src/precisionPrefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return _src_precisionPrefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_precisionRound__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/precisionRound */ \"./node_modules/d3-format/src/precisionRound.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return _src_precisionRound__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/index.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/defaultLocale.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/defaultLocale.js ***!
  \*****************************************************/
/*! exports provided: format, formatPrefix, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return format; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return formatPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale */ \"./node_modules/d3-format/src/locale.js\");\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/defaultLocale.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/exponent.js":
/*!************************************************!*\
  !*** ./node_modules/d3-format/src/exponent.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x = Object(_formatDecimal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(x)), x ? x[1] : NaN;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/exponent.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatDecimal.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/formatDecimal.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatDecimal.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatDefault.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/formatDefault.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  x = x.toPrecision(p);\n\n  out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (x[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      case \"e\": break out;\n      default: if (i0 > 0) i0 = 0; break;\n    }\n  }\n\n  return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatDefault.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatGroup.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-format/src/formatGroup.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatGroup.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatNumerals.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-format/src/formatNumerals.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatNumerals.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatPrefixAuto.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***!
  \********************************************************/
/*! exports provided: prefixExponent, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefixExponent\", function() { return prefixExponent; });\n/* harmony import */ var _formatDecimal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\nvar prefixExponent;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + Object(_formatDecimal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatPrefixAuto.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatRounded.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/formatRounded.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDecimal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal */ \"./node_modules/d3-format/src/formatDecimal.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, p) {\n  var d = Object(_formatDecimal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatRounded.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatSpecifier.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-format/src/formatSpecifier.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatSpecifier; });\n/* harmony import */ var _formatTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatTypes */ \"./node_modules/d3-format/src/formatTypes.js\");\n\n\n// [[fill]align][sign][symbol][0][width][,][.precision][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  return new FormatSpecifier(specifier);\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n  var match,\n      fill = match[1] || \" \",\n      align = match[2] || \">\",\n      sign = match[3] || \"-\",\n      symbol = match[4] || \"\",\n      zero = !!match[5],\n      width = match[6] && +match[6],\n      comma = !!match[7],\n      precision = match[8] && +match[8].slice(1),\n      type = match[9] || \"\";\n\n  // The \"n\" type is an alias for \",g\".\n  if (type === \"n\") comma = true, type = \"g\";\n\n  // Map invalid types to the default format.\n  else if (!_formatTypes__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type]) type = \"\";\n\n  // If zero fill is specified, padding goes after sign and before digits.\n  if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n  this.fill = fill;\n  this.align = align;\n  this.sign = sign;\n  this.symbol = symbol;\n  this.zero = zero;\n  this.width = width;\n  this.comma = comma;\n  this.precision = precision;\n  this.type = type;\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + this.type;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatSpecifier.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/formatTypes.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-format/src/formatTypes.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _formatDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDefault */ \"./node_modules/d3-format/src/formatDefault.js\");\n/* harmony import */ var _formatPrefixAuto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto */ \"./node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _formatRounded__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded */ \"./node_modules/d3-format/src/formatRounded.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  \"\": _formatDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  \"%\": function(x, p) { return (x * 100).toFixed(p); },\n  \"b\": function(x) { return Math.round(x).toString(2); },\n  \"c\": function(x) { return x + \"\"; },\n  \"d\": function(x) { return Math.round(x).toString(10); },\n  \"e\": function(x, p) { return x.toExponential(p); },\n  \"f\": function(x, p) { return x.toFixed(p); },\n  \"g\": function(x, p) { return x.toPrecision(p); },\n  \"o\": function(x) { return Math.round(x).toString(8); },\n  \"p\": function(x, p) { return Object(_formatRounded__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x * 100, p); },\n  \"r\": _formatRounded__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  \"s\": _formatPrefixAuto__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n  \"x\": function(x) { return Math.round(x).toString(16); }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/formatTypes.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/identity.js":
/*!************************************************!*\
  !*** ./node_modules/d3-format/src/identity.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/locale.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-format/src/locale.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent */ \"./node_modules/d3-format/src/exponent.js\");\n/* harmony import */ var _formatGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup */ \"./node_modules/d3-format/src/formatGroup.js\");\n/* harmony import */ var _formatNumerals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals */ \"./node_modules/d3-format/src/formatNumerals.js\");\n/* harmony import */ var _formatSpecifier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier */ \"./node_modules/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _formatTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTypes */ \"./node_modules/d3-format/src/formatTypes.js\");\n/* harmony import */ var _formatPrefixAuto__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatPrefixAuto */ \"./node_modules/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./identity */ \"./node_modules/d3-format/src/identity.js\");\n\n\n\n\n\n\n\n\nvar prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(locale) {\n  var group = locale.grouping && locale.thousands ? Object(_formatGroup__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(locale.grouping, locale.thousands) : _identity__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n      currency = locale.currency,\n      decimal = locale.decimal,\n      numerals = locale.numerals ? Object(_formatNumerals__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(locale.numerals) : _identity__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n      percent = locale.percent || \"%\";\n\n  function newFormat(specifier) {\n    specifier = Object(_formatSpecifier__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        type = specifier.type;\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = _formatTypes__WEBPACK_IMPORTED_MODULE_4__[\"default\"][type],\n        maybeSuffix = !type || /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision == null ? (type ? 6 : 12)\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Perform the initial formatting.\n        var valueNegative = value < 0;\n        value = formatType(Math.abs(value), precision);\n\n        // If a negative value rounds to zero during formatting, treat as positive.\n        if (valueNegative && +value === 0) valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + _formatPrefixAuto__WEBPACK_IMPORTED_MODULE_5__[\"prefixExponent\"] / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = Object(_formatSpecifier__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/locale.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/precisionFixed.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-format/src/precisionFixed.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step) {\n  return Math.max(0, -Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/precisionFixed.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/precisionPrefix.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-format/src/precisionPrefix.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) / 3))) * 3 - Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.abs(step)));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/precisionPrefix.js?");

/***/ }),

/***/ "./node_modules/d3-format/src/precisionRound.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-format/src/precisionRound.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent */ \"./node_modules/d3-format/src/exponent.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(max) - Object(_exponent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(step)) + 1;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-format/src/precisionRound.js?");

/***/ }),

/***/ "./node_modules/d3-geo/index.js":
/*!**************************************!*\
  !*** ./node_modules/d3-geo/index.js ***!
  \**************************************/
/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_area__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/area */ \"./node_modules/d3-geo/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return _src_area__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_bounds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/bounds */ \"./node_modules/d3-geo/src/bounds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return _src_bounds__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_centroid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/centroid */ \"./node_modules/d3-geo/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return _src_centroid__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/circle */ \"./node_modules/d3-geo/src/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return _src_circle__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_clip_antimeridian__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/clip/antimeridian */ \"./node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return _src_clip_antimeridian__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_clip_circle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/clip/circle */ \"./node_modules/d3-geo/src/clip/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return _src_clip_circle__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_clip_extent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/clip/extent */ \"./node_modules/d3-geo/src/clip/extent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return _src_clip_extent__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_clip_rectangle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/clip/rectangle */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return _src_clip_rectangle__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_contains__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/contains */ \"./node_modules/d3-geo/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return _src_contains__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_distance__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/distance */ \"./node_modules/d3-geo/src/distance.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return _src_distance__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_graticule__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/graticule */ \"./node_modules/d3-geo/src/graticule.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return _src_graticule__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return _src_graticule__WEBPACK_IMPORTED_MODULE_10__[\"graticule10\"]; });\n\n/* harmony import */ var _src_interpolate__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/interpolate */ \"./node_modules/d3-geo/src/interpolate.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return _src_interpolate__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_length__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/length */ \"./node_modules/d3-geo/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return _src_length__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_path_index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/path/index */ \"./node_modules/d3-geo/src/path/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return _src_path_index__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_projection_albers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/projection/albers */ \"./node_modules/d3-geo/src/projection/albers.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return _src_projection_albers__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _src_projection_albersUsa__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/projection/albersUsa */ \"./node_modules/d3-geo/src/projection/albersUsa.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return _src_projection_albersUsa__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _src_projection_azimuthalEqualArea__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/projection/azimuthalEqualArea */ \"./node_modules/d3-geo/src/projection/azimuthalEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return _src_projection_azimuthalEqualArea__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return _src_projection_azimuthalEqualArea__WEBPACK_IMPORTED_MODULE_16__[\"azimuthalEqualAreaRaw\"]; });\n\n/* harmony import */ var _src_projection_azimuthalEquidistant__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./src/projection/azimuthalEquidistant */ \"./node_modules/d3-geo/src/projection/azimuthalEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return _src_projection_azimuthalEquidistant__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return _src_projection_azimuthalEquidistant__WEBPACK_IMPORTED_MODULE_17__[\"azimuthalEquidistantRaw\"]; });\n\n/* harmony import */ var _src_projection_conicConformal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./src/projection/conicConformal */ \"./node_modules/d3-geo/src/projection/conicConformal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return _src_projection_conicConformal__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return _src_projection_conicConformal__WEBPACK_IMPORTED_MODULE_18__[\"conicConformalRaw\"]; });\n\n/* harmony import */ var _src_projection_conicEqualArea__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./src/projection/conicEqualArea */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return _src_projection_conicEqualArea__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return _src_projection_conicEqualArea__WEBPACK_IMPORTED_MODULE_19__[\"conicEqualAreaRaw\"]; });\n\n/* harmony import */ var _src_projection_conicEquidistant__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./src/projection/conicEquidistant */ \"./node_modules/d3-geo/src/projection/conicEquidistant.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return _src_projection_conicEquidistant__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return _src_projection_conicEquidistant__WEBPACK_IMPORTED_MODULE_20__[\"conicEquidistantRaw\"]; });\n\n/* harmony import */ var _src_projection_equirectangular__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./src/projection/equirectangular */ \"./node_modules/d3-geo/src/projection/equirectangular.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return _src_projection_equirectangular__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return _src_projection_equirectangular__WEBPACK_IMPORTED_MODULE_21__[\"equirectangularRaw\"]; });\n\n/* harmony import */ var _src_projection_gnomonic__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./src/projection/gnomonic */ \"./node_modules/d3-geo/src/projection/gnomonic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return _src_projection_gnomonic__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return _src_projection_gnomonic__WEBPACK_IMPORTED_MODULE_22__[\"gnomonicRaw\"]; });\n\n/* harmony import */ var _src_projection_identity__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./src/projection/identity */ \"./node_modules/d3-geo/src/projection/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return _src_projection_identity__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _src_projection_index__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./src/projection/index */ \"./node_modules/d3-geo/src/projection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return _src_projection_index__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return _src_projection_index__WEBPACK_IMPORTED_MODULE_24__[\"projectionMutator\"]; });\n\n/* harmony import */ var _src_projection_mercator__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./src/projection/mercator */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return _src_projection_mercator__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return _src_projection_mercator__WEBPACK_IMPORTED_MODULE_25__[\"mercatorRaw\"]; });\n\n/* harmony import */ var _src_projection_naturalEarth1__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./src/projection/naturalEarth1 */ \"./node_modules/d3-geo/src/projection/naturalEarth1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return _src_projection_naturalEarth1__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return _src_projection_naturalEarth1__WEBPACK_IMPORTED_MODULE_26__[\"naturalEarth1Raw\"]; });\n\n/* harmony import */ var _src_projection_orthographic__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./src/projection/orthographic */ \"./node_modules/d3-geo/src/projection/orthographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return _src_projection_orthographic__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return _src_projection_orthographic__WEBPACK_IMPORTED_MODULE_27__[\"orthographicRaw\"]; });\n\n/* harmony import */ var _src_projection_stereographic__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./src/projection/stereographic */ \"./node_modules/d3-geo/src/projection/stereographic.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return _src_projection_stereographic__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return _src_projection_stereographic__WEBPACK_IMPORTED_MODULE_28__[\"stereographicRaw\"]; });\n\n/* harmony import */ var _src_projection_transverseMercator__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./src/projection/transverseMercator */ \"./node_modules/d3-geo/src/projection/transverseMercator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return _src_projection_transverseMercator__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return _src_projection_transverseMercator__WEBPACK_IMPORTED_MODULE_29__[\"transverseMercatorRaw\"]; });\n\n/* harmony import */ var _src_rotation__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./src/rotation */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return _src_rotation__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _src_stream__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./src/stream */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return _src_stream__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _src_transform__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./src/transform */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return _src_transform__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n\n\n\n\n\n\n // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/index.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/adder.js":
/*!******************************************!*\
  !*** ./node_modules/d3-geo/src/adder.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Adder;\n});\n\nfunction Adder() {\n  this.reset();\n}\n\nAdder.prototype = {\n  constructor: Adder,\n  reset: function() {\n    this.s = // rounded value\n    this.t = 0; // exact error\n  },\n  add: function(y) {\n    add(temp, y, this.t);\n    add(this, temp.s, this.s);\n    if (this.s) this.t += temp.t;\n    else this.s = temp.t;\n  },\n  valueOf: function() {\n    return this.s;\n  }\n};\n\nvar temp = new Adder;\n\nfunction add(adder, a, b) {\n  var x = adder.s = a + b,\n      bv = x - a,\n      av = x - bv;\n  adder.t = (a - av) + (b - bv);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/adder.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/area.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-geo/src/area.js ***!
  \*****************************************/
/*! exports provided: areaRingSum, areaStream, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaRingSum\", function() { return areaRingSum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areaStream\", function() { return areaStream; });\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar areaRingSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\nvar areaSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lambda00,\n    phi00,\n    lambda0,\n    cosPhi0,\n    sinPhi0;\n\nvar areaStream = {\n  point: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaRingSum.reset();\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    var areaRing = +areaRingSum;\n    areaSum.add(areaRing < 0 ? _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] + areaRing : areaRing);\n    this.lineStart = this.lineEnd = this.point = _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  sphere: function() {\n    areaSum.add(_math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]);\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n  areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n  areaStream.point = areaPoint;\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, cosPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi = phi / 2 + _math__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]), sinPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  phi = phi / 2 + _math__WEBPACK_IMPORTED_MODULE_1__[\"quarterPi\"]; // half the angular distance from south pole\n\n  // Spherical excess E for a spherical triangle with vertices: south pole,\n  // previous point, current point.  Uses a formula derived from Cagnoli’s\n  // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n  var dLambda = lambda - lambda0,\n      sdLambda = dLambda >= 0 ? 1 : -1,\n      adLambda = sdLambda * dLambda,\n      cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      sinPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      k = sinPhi0 * sinPhi,\n      u = cosPhi0 * cosPhi + k * Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(adLambda),\n      v = k * sdLambda * Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(adLambda);\n  areaRingSum.add(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(v, u));\n\n  // Advance the previous points.\n  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  areaSum.reset();\n  Object(_stream__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, areaStream);\n  return areaSum * 2;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/area.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/bounds.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-geo/src/bounds.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area */ \"./node_modules/d3-geo/src/area.js\");\n/* harmony import */ var _cartesian__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n    lambda2, // previous lambda-coordinate\n    lambda00, phi00, // first point\n    p0, // previous 3D point\n    deltaSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    ranges,\n    range;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: boundsLineStart,\n  lineEnd: boundsLineEnd,\n  polygonStart: function() {\n    boundsStream.point = boundsRingPoint;\n    boundsStream.lineStart = boundsRingStart;\n    boundsStream.lineEnd = boundsRingEnd;\n    deltaSum.reset();\n    _area__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonStart();\n  },\n  polygonEnd: function() {\n    _area__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].polygonEnd();\n    boundsStream.point = boundsPoint;\n    boundsStream.lineStart = boundsLineStart;\n    boundsStream.lineEnd = boundsLineEnd;\n    if (_area__WEBPACK_IMPORTED_MODULE_1__[\"areaRingSum\"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n    else if (deltaSum > _math__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi1 = 90;\n    else if (deltaSum < -_math__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) phi0 = -90;\n    range[0] = lambda0, range[1] = lambda1;\n  }\n};\n\nfunction boundsPoint(lambda, phi) {\n  ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n  var p = Object(_cartesian__WEBPACK_IMPORTED_MODULE_2__[\"cartesian\"])([lambda * _math__WEBPACK_IMPORTED_MODULE_3__[\"radians\"], phi * _math__WEBPACK_IMPORTED_MODULE_3__[\"radians\"]]);\n  if (p0) {\n    var normal = Object(_cartesian__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(p0, p),\n        equatorial = [normal[1], -normal[0], 0],\n        inflection = Object(_cartesian__WEBPACK_IMPORTED_MODULE_2__[\"cartesianCross\"])(equatorial, normal);\n    Object(_cartesian__WEBPACK_IMPORTED_MODULE_2__[\"cartesianNormalizeInPlace\"])(inflection);\n    inflection = Object(_cartesian__WEBPACK_IMPORTED_MODULE_2__[\"spherical\"])(inflection);\n    var delta = lambda - lambda2,\n        sign = delta > 0 ? 1 : -1,\n        lambdai = inflection[0] * _math__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"] * sign,\n        phii,\n        antimeridian = Object(_math__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180;\n    if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = inflection[1] * _math__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii > phi1) phi1 = phii;\n    } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = -inflection[1] * _math__WEBPACK_IMPORTED_MODULE_3__[\"degrees\"];\n      if (phii < phi0) phi0 = phii;\n    } else {\n      if (phi < phi0) phi0 = phi;\n      if (phi > phi1) phi1 = phi;\n    }\n    if (antimeridian) {\n      if (lambda < lambda2) {\n        if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n      } else {\n        if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n      }\n    } else {\n      if (lambda1 >= lambda0) {\n        if (lambda < lambda0) lambda0 = lambda;\n        if (lambda > lambda1) lambda1 = lambda;\n      } else {\n        if (lambda > lambda2) {\n          if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n        } else {\n          if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n        }\n      }\n    }\n  } else {\n    ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  }\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n  p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n  boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n  range[0] = lambda0, range[1] = lambda1;\n  boundsStream.point = boundsPoint;\n  p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n  if (p0) {\n    var delta = lambda - lambda2;\n    deltaSum.add(Object(_math__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n  } else {\n    lambda00 = lambda, phi00 = phi;\n  }\n  _area__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].point(lambda, phi);\n  linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n  _area__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineStart();\n}\n\nfunction boundsRingEnd() {\n  boundsRingPoint(lambda00, phi00);\n  _area__WEBPACK_IMPORTED_MODULE_1__[\"areaStream\"].lineEnd();\n  if (Object(_math__WEBPACK_IMPORTED_MODULE_3__[\"abs\"])(deltaSum) > _math__WEBPACK_IMPORTED_MODULE_3__[\"epsilon\"]) lambda0 = -(lambda1 = 180);\n  range[0] = lambda0, range[1] = lambda1;\n  p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n  return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n  return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(feature) {\n  var i, n, a, b, merged, deltaMax, delta;\n\n  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n  ranges = [];\n  Object(_stream__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(feature, boundsStream);\n\n  // First, sort ranges by their minimum longitudes.\n  if (n = ranges.length) {\n    ranges.sort(rangeCompare);\n\n    // Then, merge any ranges that overlap.\n    for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n      b = ranges[i];\n      if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n        if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n        if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n      } else {\n        merged.push(a = b);\n      }\n    }\n\n    // Finally, find the largest gap between the merged ranges.\n    // The final bounding box will be the inverse of this gap.\n    for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n      b = merged[i];\n      if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n    }\n  }\n\n  ranges = range = null;\n\n  return lambda0 === Infinity || phi0 === Infinity\n      ? [[NaN, NaN], [NaN, NaN]]\n      : [[lambda0, phi0], [lambda1, phi1]];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/bounds.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/cartesian.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-geo/src/cartesian.js ***!
  \**********************************************/
/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"spherical\", function() { return spherical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesian\", function() { return cartesian; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianDot\", function() { return cartesianDot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianCross\", function() { return cartesianCross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianAddInPlace\", function() { return cartesianAddInPlace; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianScale\", function() { return cartesianScale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cartesianNormalizeInPlace\", function() { return cartesianNormalizeInPlace; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction spherical(cartesian) {\n  return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(cartesian[1], cartesian[0]), Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(cartesian[2])];\n}\n\nfunction cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  return [cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda), cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda), Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi)];\n}\n\nfunction cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nfunction cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nfunction cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nfunction cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nfunction cartesianNormalizeInPlace(d) {\n  var l = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/cartesian.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/centroid.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/centroid.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\nvar W0, W1,\n    X0, Y0, Z0,\n    X1, Y1, Z1,\n    X2, Y2, Z2,\n    lambda00, phi00, // first point\n    x0, y0, z0; // previous point\n\nvar centroidStream = {\n  sphere: _noop__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  centroidPointCartesian(cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda), cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda), Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n  ++W0;\n  X0 += (x - X0) / W0;\n  Y0 += (y - Y0) / W0;\n  Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda);\n  z0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi);\n  centroidStream.point = centroidLinePoint;\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi),\n      x = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda),\n      z = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi),\n      w = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n  centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n  centroidRingPoint(lambda00, phi00);\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n  lambda00 = lambda, phi00 = phi;\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  centroidStream.point = centroidRingPoint;\n  var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi);\n  x0 = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda);\n  y0 = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda);\n  z0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi);\n  centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"];\n  var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi),\n      x = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(lambda),\n      y = cosPhi * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(lambda),\n      z = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi),\n      cx = y0 * z - z0 * y,\n      cy = z0 * x - x0 * z,\n      cz = x0 * y - y0 * x,\n      m = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(cx * cx + cy * cy + cz * cz),\n      w = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(m), // line weight = angle\n      v = m && -w / m; // area weight multiplier\n  X2 += v * cx;\n  Y2 += v * cy;\n  Z2 += v * cz;\n  W1 += w;\n  X1 += w * (x0 + (x0 = x));\n  Y1 += w * (y0 + (y0 = y));\n  Z1 += w * (z0 + (z0 = z));\n  centroidPointCartesian(x0, y0, z0);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  W0 = W1 =\n  X0 = Y0 = Z0 =\n  X1 = Y1 = Z1 =\n  X2 = Y2 = Z2 = 0;\n  Object(_stream__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(object, centroidStream);\n\n  var x = X2,\n      y = Y2,\n      z = Z2,\n      m = x * x + y * y + z * z;\n\n  // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n  if (m < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon2\"]) {\n    x = X1, y = Y1, z = Z1;\n    // If the feature has zero length, fall back to arithmetic mean of point vectors.\n    if (W1 < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) x = X0, y = Y0, z = Z0;\n    m = x * x + y * y + z * z;\n    // If the feature still has an undefined ccentroid, then return.\n    if (m < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon2\"]) return [NaN, NaN];\n  }\n\n  return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(y, x) * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z / Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(m)) * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/centroid.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/circle.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-geo/src/circle.js ***!
  \*******************************************/
/*! exports provided: circleStream, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circleStream\", function() { return circleStream; });\n/* harmony import */ var _cartesian__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-geo/src/constant.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation */ \"./node_modules/d3-geo/src/rotation.js\");\n\n\n\n\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nfunction circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      sinRadius = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])([cosRadius, -sinRadius * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(t), -sinRadius * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(point), point[0] -= cosRadius;\n  Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianNormalizeInPlace\"])(point);\n  var radius = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) % _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var center = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([0, 0]),\n      radius = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(90),\n      precision = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= _math__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"], x[1] *= _math__WEBPACK_IMPORTED_MODULE_2__[\"degrees\"];\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n        p = precision.apply(this, arguments) * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"];\n    ring = [];\n    rotate = Object(_rotation__WEBPACK_IMPORTED_MODULE_3__[\"rotateRadians\"])(-c[0] * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], -c[1] * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), circle) : precision;\n  };\n\n  return circle;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/circle.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/antimeridian.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/clip/index.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -_math__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]]\n));\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"],\n          delta = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - lambda0);\n      if (Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta - _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) < _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"] : -_math__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"]);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"]) { // line crosses antimeridian\n        if (Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - sign0) < _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda0 -= sign0 * _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; // handle degeneracies\n        if (Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda1 - sign1) < _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) lambda1 -= sign1 * _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"];\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0 - lambda1);\n  return Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(sinLambda0Lambda1) > _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]\n      ? Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan\"])((Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi0) * (cosPhi1 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi1)) * Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda1)\n          - Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi1) * (cosPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi0)) * Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * _math__WEBPACK_IMPORTED_MODULE_1__[\"halfPi\"];\n    stream.point(-_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(0, phi);\n    stream.point(_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n    stream.point(_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(0, -phi);\n    stream.point(-_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], -phi);\n    stream.point(-_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], 0);\n    stream.point(-_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"], phi);\n  } else if (Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(from[0] - to[0]) > _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) {\n    var lambda = from[0] < to[0] ? _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] : -_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"];\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/antimeridian.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/buffer.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/buffer.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y) {\n      line.push([x, y]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/buffer.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/circle.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/circle.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle */ \"./node_modules/d3-geo/src/circle.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _pointEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual */ \"./node_modules/d3-geo/src/pointEqual.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/clip/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(radius) {\n  var cr = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(radius),\n      delta = 6 * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"],\n      smallRadius = cr > 0,\n      notHemisphere = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(cr) > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    Object(_circle__WEBPACK_IMPORTED_MODULE_1__[\"circleStream\"])(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda) * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] : -_math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        // Handle degeneracies.\n        // TODO ignore if not clipping polygons.\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || Object(_pointEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point2) || Object(_pointEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point1, point2)) {\n            point1[0] += _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n            point1[1] += _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n            v = visible(point1[0], point1[1]);\n          }\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1]);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n            }\n          }\n        }\n        if (v && (!point0 || !Object(_pointEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(a),\n        pb = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(pa, pb),\n        n2n2 = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianCross\"])(n1, n2),\n        A = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n1, c1),\n        B = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(n2, c2);\n    Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, u),\n        uu = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(u, u),\n        t2 = w * w - uu * (Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianDot\"])(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(t2),\n        q = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w - t) / uu);\n    Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q, A);\n    q = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(delta - _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) < _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"],\n        meridian = polar || delta < _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(q[0] - lambda0) < _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianScale\"])(u, (-w + t) / uu);\n      Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesianAddInPlace\"])(q1, A);\n      return [q, Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"spherical\"])(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return Object(_index__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"], radius - _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/circle.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/extent.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/extent.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rectangle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x0 = 0,\n      y0 = 0,\n      x1 = 960,\n      y1 = 500,\n      cache,\n      cacheStream,\n      clip;\n\n  return clip = {\n    stream: function(stream) {\n      return cache && cacheStream === stream ? cache : cache = Object(_rectangle__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0, y0, x1, y1)(cacheStream = stream);\n    },\n    extent: function(_) {\n      return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n    }\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/extent.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/index.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-geo/src/clip/index.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer */ \"./node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _rejoin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin */ \"./node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _polygonContains__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains */ \"./node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = Object(_buffer__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments);\n        var startInside = Object(_polygonContains__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          Object(_rejoin__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n});\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] : _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"] - b[1]);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/index.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/line.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-geo/src/clip/line.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/line.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/rectangle.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/rectangle.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return clipRectangle; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer */ \"./node_modules/d3-geo/src/clip/buffer.js\");\n/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line */ \"./node_modules/d3-geo/src/clip/line.js\");\n/* harmony import */ var _rejoin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin */ \"./node_modules/d3-geo/src/clip/rejoin.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n\n\n\n\n\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nfunction clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x0) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 0 : 3\n        : Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[0] - x1) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 2 : 1\n        : Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(p[1] - y0) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = Object(_buffer__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          Object(_rejoin__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (Object(_line__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/rectangle.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/clip/rejoin.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/clip/rejoin.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _pointEqual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual */ \"./node_modules/d3-geo/src/pointEqual.js\");\n\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    // If the first and last points of a segment are coincident, then treat as a\n    // closed ring. TODO if all rings are closed, then the winding order of the\n    // exterior ring should be checked.\n    if (Object(_pointEqual__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(p0, p1)) {\n      stream.lineStart();\n      for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n      stream.lineEnd();\n      return;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n});\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/clip/rejoin.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/compose.js":
/*!********************************************!*\
  !*** ./node_modules/d3-geo/src/compose.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/compose.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/constant.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/constant.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/contains.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/contains.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _polygonContains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains */ \"./node_modules/d3-geo/src/polygonContains.js\");\n/* harmony import */ var _distance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance */ \"./node_modules/d3-geo/src/distance.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n\nvar containsObjectType = {\n  Feature: function(object, point) {\n    return containsGeometry(object.geometry, point);\n  },\n  FeatureCollection: function(object, point) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;\n    return false;\n  }\n};\n\nvar containsGeometryType = {\n  Sphere: function() {\n    return true;\n  },\n  Point: function(object, point) {\n    return containsPoint(object.coordinates, point);\n  },\n  MultiPoint: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPoint(coordinates[i], point)) return true;\n    return false;\n  },\n  LineString: function(object, point) {\n    return containsLine(object.coordinates, point);\n  },\n  MultiLineString: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsLine(coordinates[i], point)) return true;\n    return false;\n  },\n  Polygon: function(object, point) {\n    return containsPolygon(object.coordinates, point);\n  },\n  MultiPolygon: function(object, point) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) if (containsPolygon(coordinates[i], point)) return true;\n    return false;\n  },\n  GeometryCollection: function(object, point) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) if (containsGeometry(geometries[i], point)) return true;\n    return false;\n  }\n};\n\nfunction containsGeometry(geometry, point) {\n  return geometry && containsGeometryType.hasOwnProperty(geometry.type)\n      ? containsGeometryType[geometry.type](geometry, point)\n      : false;\n}\n\nfunction containsPoint(coordinates, point) {\n  return Object(_distance__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n  var ab = Object(_distance__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[0], coordinates[1]),\n      ao = Object(_distance__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(coordinates[0], point),\n      ob = Object(_distance__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(point, coordinates[1]);\n  return ao + ob <= ab + _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"];\n}\n\nfunction containsPolygon(coordinates, point) {\n  return !!Object(_polygonContains__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n  return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n  return [point[0] * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"], point[1] * _math__WEBPACK_IMPORTED_MODULE_2__[\"radians\"]];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, point) {\n  return (object && containsObjectType.hasOwnProperty(object.type)\n      ? containsObjectType[object.type]\n      : containsGeometry)(object, point);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/contains.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/distance.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/distance.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _length__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length */ \"./node_modules/d3-geo/src/length.js\");\n\n\nvar coordinates = [null, null],\n    object = {type: \"LineString\", coordinates: coordinates};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  coordinates[0] = a;\n  coordinates[1] = b;\n  return Object(_length__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/distance.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/graticule.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-geo/src/graticule.js ***!
  \**********************************************/
/*! exports provided: default, graticule10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return graticule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"graticule10\", function() { return graticule10; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction graticuleX(y0, y1, dy) {\n  var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(y0, y1 - _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dy).concat(y1);\n  return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n  var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(x0, x1 - _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"], dx).concat(x1);\n  return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nfunction graticule() {\n  var x1, x0, X1, X0,\n      y1, y0, Y1, Y0,\n      dx = 10, dy = dx, DX = 90, DY = 360,\n      x, y, X, Y,\n      precision = 2.5;\n\n  function graticule() {\n    return {type: \"MultiLineString\", coordinates: lines()};\n  }\n\n  function lines() {\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(X0 / DX) * DX, X1, DX).map(X)\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(Y0 / DY) * DY, Y1, DY).map(Y))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(x % DX) > _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(x))\n        .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"ceil\"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(y % DY) > _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]; }).map(y));\n  }\n\n  graticule.lines = function() {\n    return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n  };\n\n  graticule.outline = function() {\n    return {\n      type: \"Polygon\",\n      coordinates: [\n        X(X0).concat(\n        Y(Y1).slice(1),\n        X(X1).reverse().slice(1),\n        Y(Y0).reverse().slice(1))\n      ]\n    };\n  };\n\n  graticule.extent = function(_) {\n    if (!arguments.length) return graticule.extentMinor();\n    return graticule.extentMajor(_).extentMinor(_);\n  };\n\n  graticule.extentMajor = function(_) {\n    if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n    X0 = +_[0][0], X1 = +_[1][0];\n    Y0 = +_[0][1], Y1 = +_[1][1];\n    if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n    if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.extentMinor = function(_) {\n    if (!arguments.length) return [[x0, y0], [x1, y1]];\n    x0 = +_[0][0], x1 = +_[1][0];\n    y0 = +_[0][1], y1 = +_[1][1];\n    if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n    if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n    return graticule.precision(precision);\n  };\n\n  graticule.step = function(_) {\n    if (!arguments.length) return graticule.stepMinor();\n    return graticule.stepMajor(_).stepMinor(_);\n  };\n\n  graticule.stepMajor = function(_) {\n    if (!arguments.length) return [DX, DY];\n    DX = +_[0], DY = +_[1];\n    return graticule;\n  };\n\n  graticule.stepMinor = function(_) {\n    if (!arguments.length) return [dx, dy];\n    dx = +_[0], dy = +_[1];\n    return graticule;\n  };\n\n  graticule.precision = function(_) {\n    if (!arguments.length) return precision;\n    precision = +_;\n    x = graticuleX(y0, y1, 90);\n    y = graticuleY(x0, x1, precision);\n    X = graticuleX(Y0, Y1, 90);\n    Y = graticuleY(X0, X1, precision);\n    return graticule;\n  };\n\n  return graticule\n      .extentMajor([[-180, -90 + _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 90 - _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]])\n      .extentMinor([[-180, -80 - _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]], [180, 80 + _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]]]);\n}\n\nfunction graticule10() {\n  return graticule()();\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/graticule.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/identity.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/identity.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/interpolate.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/interpolate.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var x0 = a[0] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y0 = a[1] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      x1 = b[0] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      y1 = b[1] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"],\n      cy0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      sy0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0),\n      cy1 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1),\n      sy1 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1),\n      kx0 = cy0 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x0),\n      ky0 = cy0 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x0),\n      kx1 = cy1 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x1),\n      ky1 = cy1 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x1),\n      d = 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(y1 - y0) + cy0 * cy1 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"haversin\"])(x1 - x0))),\n      k = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d);\n\n  var interpolate = d ? function(t) {\n    var B = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(t *= d) / k,\n        A = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(d - t) / k,\n        x = A * kx0 + B * kx1,\n        y = A * ky0 + B * ky1,\n        z = A * sy0 + B * sy1;\n    return [\n      Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(y, x) * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"],\n      Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(z, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y)) * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]\n    ];\n  } : function() {\n    return [x0 * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], y0 * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  interpolate.distance = d;\n\n  return interpolate;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/interpolate.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/length.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-geo/src/length.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop */ \"./node_modules/d3-geo/src/noop.js\");\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream */ \"./node_modules/d3-geo/src/stream.js\");\n\n\n\n\n\nvar lengthSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lambda0,\n    sinPhi0,\n    cosPhi0;\n\nvar lengthStream = {\n  sphere: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  point: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: lengthLineStart,\n  lineEnd: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonEnd: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n};\n\nfunction lengthLineStart() {\n  lengthStream.point = lengthPointFirst;\n  lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n  lengthStream.point = lengthStream.lineEnd = _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n}\n\nfunction lengthPointFirst(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  lambda0 = lambda, sinPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi), cosPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi);\n  lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n  lambda *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], phi *= _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"];\n  var sinPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n      cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n      delta = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda - lambda0),\n      cosDelta = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(delta),\n      sinDelta = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(delta),\n      x = cosPhi * sinDelta,\n      y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n      z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n  lengthSum.add(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x * x + y * y), z));\n  lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object) {\n  lengthSum.reset();\n  Object(_stream__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(object, lengthStream);\n  return +lengthSum;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/length.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/math.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-geo/src/math.js ***!
  \*****************************************/
/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon2\", function() { return epsilon2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quarterPi\", function() { return quarterPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"degrees\", function() { return degrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"radians\", function() { return radians; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan\", function() { return atan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exp\", function() { return exp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pow\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sign\", function() { return sign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tan\", function() { return tan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"haversin\", function() { return haversin; });\nvar epsilon = 1e-6;\nvar epsilon2 = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar quarterPi = pi / 4;\nvar tau = pi * 2;\n\nvar degrees = 180 / pi;\nvar radians = pi / 180;\n\nvar abs = Math.abs;\nvar atan = Math.atan;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar ceil = Math.ceil;\nvar exp = Math.exp;\nvar floor = Math.floor;\nvar log = Math.log;\nvar pow = Math.pow;\nvar sin = Math.sin;\nvar sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nvar sqrt = Math.sqrt;\nvar tan = Math.tan;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nfunction haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/math.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/noop.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-geo/src/noop.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return noop; });\nfunction noop() {}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/noop.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/area.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-geo/src/path/area.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar areaSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    areaRingSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineEnd: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n    areaSum.add(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(areaRingSum));\n    areaRingSum.reset();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum.reset();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (areaStream);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/area.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/bounds.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/path/bounds.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-geo/src/noop.js\");\n\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonStart: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  polygonEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (boundsStream);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/bounds.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/centroid.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-geo/src/path/centroid.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (centroidStream);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/centroid.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/context.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-geo/src/path/context.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathContext; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\nfunction PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, _math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n        break;\n      }\n    }\n  },\n  result: _noop__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/context.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/index.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-geo/src/path/index.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area */ \"./node_modules/d3-geo/src/path/area.js\");\n/* harmony import */ var _bounds__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds */ \"./node_modules/d3-geo/src/path/bounds.js\");\n/* harmony import */ var _centroid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid */ \"./node_modules/d3-geo/src/path/centroid.js\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context */ \"./node_modules/d3-geo/src/path/context.js\");\n/* harmony import */ var _measure__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure */ \"./node_modules/d3-geo/src/path/measure.js\");\n/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string */ \"./node_modules/d3-geo/src/path/string.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(projection, context) {\n  var pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      Object(_stream__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    Object(_stream__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_area__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n    return _area__WEBPACK_IMPORTED_MODULE_2__[\"default\"].result();\n  };\n\n  path.measure = function(object) {\n    Object(_stream__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_measure__WEBPACK_IMPORTED_MODULE_6__[\"default\"]));\n    return _measure__WEBPACK_IMPORTED_MODULE_6__[\"default\"].result();\n  };\n\n  path.bounds = function(object) {\n    Object(_stream__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_bounds__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n    return _bounds__WEBPACK_IMPORTED_MODULE_3__[\"default\"].result();\n  };\n\n  path.centroid = function(object) {\n    Object(_stream__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object, projectionStream(_centroid__WEBPACK_IMPORTED_MODULE_4__[\"default\"]));\n    return _centroid__WEBPACK_IMPORTED_MODULE_4__[\"default\"].result();\n  };\n\n  path.projection = function(_) {\n    return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) : (projection = _).stream, path) : projection;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new _string__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) : new _context__WEBPACK_IMPORTED_MODULE_5__[\"default\"](context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  return path.projection(projection).context(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/index.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/measure.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-geo/src/path/measure.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-geo/src/noop.js\");\n\n\n\n\nvar lengthSum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = _noop__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum.reset();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (lengthStream);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/measure.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/path/string.js":
/*!************************************************!*\
  !*** ./node_modules/d3-geo/src/path/string.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PathString; });\nfunction PathString() {\n  this._string = [];\n}\n\nPathString.prototype = {\n  _radius: 4.5,\n  _circle: circle(4.5),\n  pointRadius: function(_) {\n    if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n    return this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._string.push(\"Z\");\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._string.push(\"M\", x, \",\", y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._string.push(\"L\", x, \",\", y);\n        break;\n      }\n      default: {\n        if (this._circle == null) this._circle = circle(this._radius);\n        this._string.push(\"M\", x, \",\", y, this._circle);\n        break;\n      }\n    }\n  },\n  result: function() {\n    if (this._string.length) {\n      var result = this._string.join(\"\");\n      this._string = [];\n      return result;\n    } else {\n      return null;\n    }\n  }\n};\n\nfunction circle(radius) {\n  return \"m0,\" + radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n      + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n      + \"z\";\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/path/string.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/pointEqual.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-geo/src/pointEqual.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[0] - b[0]) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"] && Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(a[1] - b[1]) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/pointEqual.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/polygonContains.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-geo/src/polygonContains.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _adder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder */ \"./node_modules/d3-geo/src/adder.js\");\n/* harmony import */ var _cartesian__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\n\nvar sum = Object(_adder__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var lambda = point[0],\n      phi = point[1],\n      normal = [Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(lambda), -Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  sum.reset();\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = point0[0],\n        phi0 = point0[1] / 2 + _math__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n        sinPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi0),\n        cosPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = point1[0],\n          phi1 = point1[1] / 2 + _math__WEBPACK_IMPORTED_MODULE_2__[\"quarterPi\"],\n          sinPhi1 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(phi1),\n          cosPhi1 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"],\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(k * sign * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(absDelta)));\n      angle += antimeridian ? delta + sign * _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] : delta;\n\n      // Are the longitudes either side of the point’s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point0), Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesian\"])(point1));\n        Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(arc);\n        var intersection = Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesianCross\"])(normal, arc);\n        Object(_cartesian__WEBPACK_IMPORTED_MODULE_1__[\"cartesianNormalizeInPlace\"])(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -_math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] || angle < _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] && sum < -_math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) ^ (winding & 1);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/polygonContains.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/albers.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/albers.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _conicEqualArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conicEqualArea__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/albers.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/albersUsa.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _albers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers */ \"./node_modules/d3-geo/src/projection/albers.js\");\n/* harmony import */ var _conicEqualArea__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea */ \"./node_modules/d3-geo/src/projection/conicEqualArea.js\");\n/* harmony import */ var _fit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit */ \"./node_modules/d3-geo/src/projection/fit.js\");\n\n\n\n\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var cache,\n      cacheStream,\n      lower48 = Object(_albers__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), lower48Point,\n      alaska = Object(_conicEqualArea__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = Object(_conicEqualArea__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.120 * k + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.214 * k - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.166 * k + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]], [x - 0.115 * k - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"], y + 0.234 * k - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/albersUsa.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/azimuthal.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***!
  \*********************************************************/
/*! exports provided: azimuthalRaw, azimuthalInvert */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalRaw\", function() { return azimuthalRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalInvert\", function() { return azimuthalInvert; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x),\n        cy = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y),\n        k = scale(cx * cy);\n    return [\n      k * cy * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x),\n      k * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)\n    ];\n  }\n}\n\nfunction azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + y * y),\n        c = angle(z),\n        sc = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c),\n        cc = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(c);\n    return [\n      Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x * sc, z * cc),\n      Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z && y * sc / z)\n    ];\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/azimuthal.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js":
/*!******************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***!
  \******************************************************************/
/*! exports provided: azimuthalEqualAreaRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEqualAreaRaw\", function() { return azimuthalEqualAreaRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEqualAreaRaw = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(cxcy) {\n  return Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(z / 2);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/azimuthalEqualArea.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js":
/*!********************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***!
  \********************************************************************/
/*! exports provided: azimuthalEquidistantRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"azimuthalEquidistantRaw\", function() { return azimuthalEquidistantRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nvar azimuthalEquidistantRaw = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalRaw\"])(function(c) {\n  return (c = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"acos\"])(c)) && c / Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(c);\n});\n\nazimuthalEquidistantRaw.invert = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return z;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/azimuthalEquidistant.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/conic.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/conic.js ***!
  \*****************************************************/
/*! exports provided: conicProjection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicProjection\", function() { return conicProjection; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\nfunction conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = _math__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 3,\n      m = Object(_index__WEBPACK_IMPORTED_MODULE_1__[\"projectionMutator\"])(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"], phi1 = _[1] * _math__WEBPACK_IMPORTED_MODULE_0__[\"radians\"]) : [phi0 * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"], phi1 * _math__WEBPACK_IMPORTED_MODULE_0__[\"degrees\"]];\n  };\n\n  return p;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/conic.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/conicConformal.js":
/*!**************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***!
  \**************************************************************/
/*! exports provided: conicConformalRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicConformalRaw\", function() { return conicConformalRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _mercator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\n\nfunction tany(y) {\n  return Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + y) / 2);\n}\n\nfunction conicConformalRaw(y0, y1) {\n  var cy0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(cy0 / Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(tany(y1) / tany(y0)),\n      f = cy0 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y0), n) / n;\n\n  if (!n) return _mercator__WEBPACK_IMPORTED_MODULE_2__[\"mercatorRaw\"];\n\n  function project(x, y) {\n    if (f > 0) { if (y < -_math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = -_math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    else { if (y > _math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) y = _math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] - _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]; }\n    var r = f / Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(tany(y), n);\n    return [r * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(n * x), f - r * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + fy * fy);\n    return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(fy)) / n * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(fy), 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"pow\"])(f / r, 1 / n)) - _math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/conicConformal.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/conicEqualArea.js":
/*!**************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***!
  \**************************************************************/
/*! exports provided: conicEqualAreaRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEqualAreaRaw\", function() { return conicEqualAreaRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _cylindricalEqualArea__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea */ \"./node_modules/d3-geo/src/projection/cylindricalEqualArea.js\");\n\n\n\n\nfunction conicEqualAreaRaw(y0, y1) {\n  var sy0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0), n = (sy0 + Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return Object(_cylindricalEqualArea__WEBPACK_IMPORTED_MODULE_2__[\"cylindricalEqualAreaRaw\"])(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c) / n;\n\n  function project(x, y) {\n    var r = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(c - 2 * n * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)) / n;\n    return [r * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x *= n), r0 - r * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y;\n    return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(r0y)) / n * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(r0y), Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/conicEqualArea.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/conicEquidistant.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***!
  \****************************************************************/
/*! exports provided: conicEquidistantRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conicEquidistantRaw\", function() { return conicEquidistantRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _conic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic */ \"./node_modules/d3-geo/src/projection/conic.js\");\n/* harmony import */ var _equirectangular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular */ \"./node_modules/d3-geo/src/projection/equirectangular.js\");\n\n\n\n\nfunction conicEquidistantRaw(y0, y1) {\n  var cy0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y0),\n      n = y0 === y1 ? Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y0) : (cy0 - Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(n) < _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) return _equirectangular__WEBPACK_IMPORTED_MODULE_2__[\"equirectangularRaw\"];\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(nx), g - gy * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y;\n    return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan2\"])(x, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"abs\"])(gy)) / n * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(gy), g - Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sign\"])(n) * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sqrt\"])(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_conic__WEBPACK_IMPORTED_MODULE_1__[\"conicProjection\"])(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/conicEquidistant.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js":
/*!********************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***!
  \********************************************************************/
/*! exports provided: cylindricalEqualAreaRaw */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cylindricalEqualAreaRaw\", function() { return cylindricalEqualAreaRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n\n\nfunction cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"])(y * cosPhi0)];\n  };\n\n  return forward;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/cylindricalEqualArea.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/equirectangular.js":
/*!***************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***!
  \***************************************************************/
/*! exports provided: equirectangularRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equirectangularRaw\", function() { return equirectangularRaw; });\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\nfunction equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(equirectangularRaw)\n      .scale(152.63);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/equirectangular.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/fit.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/fit.js ***!
  \***************************************************/
/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitExtent\", function() { return fitExtent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitSize\", function() { return fitSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitWidth\", function() { return fitWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fitHeight\", function() { return fitHeight; });\n/* harmony import */ var _stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream */ \"./node_modules/d3-geo/src/stream.js\");\n/* harmony import */ var _path_bounds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds */ \"./node_modules/d3-geo/src/path/bounds.js\");\n\n\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  Object(_stream__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object, projection.stream(_path_bounds__WEBPACK_IMPORTED_MODULE_1__[\"default\"]));\n  fitBounds(_path_bounds__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nfunction fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nfunction fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nfunction fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/fit.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/gnomonic.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***!
  \********************************************************/
/*! exports provided: gnomonicRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gnomonicRaw\", function() { return gnomonicRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction gnomonicRaw(x, y) {\n  var cy = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\ngnomonicRaw.invert = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/gnomonic.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/identity.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/identity.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _clip_rectangle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit */ \"./node_modules/d3-geo/src/projection/fit.js\");\n\n\n\n\n\nfunction scaleTranslate(kx, ky, tx, ty) {\n  return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : Object(_transform__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n    point: function(x, y) {\n      this.stream.point(x * kx + tx, y * ky + ty);\n    }\n  });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, transform = _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"], // scale, translate and reflect\n      x0 = null, y0, x1, y1, // clip extent\n      postclip = _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      cache,\n      cacheStream,\n      projection;\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return projection = {\n    stream: function(stream) {\n      return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n    },\n    postclip: function(_) {\n      return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n    },\n    clipExtent: function(_) {\n      return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : Object(_clip_rectangle__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n    },\n    scale: function(_) {\n      return arguments.length ? (transform = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k;\n    },\n    translate: function(_) {\n      return arguments.length ? (transform = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty];\n    },\n    reflectX: function(_) {\n      return arguments.length ? (transform = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0;\n    },\n    reflectY: function(_) {\n      return arguments.length ? (transform = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0;\n    },\n    fitExtent: function(extent, object) {\n      return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitExtent\"])(projection, extent, object);\n    },\n    fitSize: function(size, object) {\n      return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitSize\"])(projection, size, object);\n    },\n    fitWidth: function(width, object) {\n      return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitWidth\"])(projection, width, object);\n    },\n    fitHeight: function(height, object) {\n      return Object(_fit__WEBPACK_IMPORTED_MODULE_3__[\"fitHeight\"])(projection, height, object);\n    }\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/identity.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/index.js ***!
  \*****************************************************/
/*! exports provided: default, projectionMutator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return projection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"projectionMutator\", function() { return projectionMutator; });\n/* harmony import */ var _clip_antimeridian__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian */ \"./node_modules/d3-geo/src/clip/antimeridian.js\");\n/* harmony import */ var _clip_circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle */ \"./node_modules/d3-geo/src/clip/circle.js\");\n/* harmony import */ var _clip_rectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle */ \"./node_modules/d3-geo/src/clip/rectangle.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose */ \"./node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity */ \"./node_modules/d3-geo/src/identity.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform */ \"./node_modules/d3-geo/src/transform.js\");\n/* harmony import */ var _fit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit */ \"./node_modules/d3-geo/src/projection/fit.js\");\n/* harmony import */ var _resample__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample */ \"./node_modules/d3-geo/src/projection/resample.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar transformRadians = Object(_transform__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n  point: function(x, y) {\n    this.stream.point(x * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], y * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return Object(_transform__WEBPACK_IMPORTED_MODULE_7__[\"transformer\"])({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nfunction projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      dx, dy, lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, projectRotate, // rotate\n      theta = null, preclip = _clip_antimeridian__WEBPACK_IMPORTED_MODULE_0__[\"default\"], // clip angle\n      x0 = null, y0, x1, y1, postclip = _identity__WEBPACK_IMPORTED_MODULE_4__[\"default\"], // clip extent\n      delta2 = 0.5, projectResample = Object(_resample__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2), // precision\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    point = projectRotate(point[0] * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], point[1] * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]);\n    return [point[0] * k + dx, dy - point[1] * k];\n  }\n\n  function invert(point) {\n    point = projectRotate.invert((point[0] - dx) / k, (dy - point[1]) / k);\n    return point && [point[0] * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], point[1] * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  }\n\n  function projectTransform(x, y) {\n    return x = project(x, y), [x[0] * k + dx, dy - x[1] * k];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? Object(_clip_circle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(theta = _ * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"]) : (theta = null, _clip_antimeridian__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), reset()) : theta * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"];\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) : Object(_clip_rectangle__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], phi = _[1] % 360 * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], recenter()) : [lambda * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], phi * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaPhi = _[1] % 360 * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"], deltaGamma = _.length > 2 ? _[2] % 360 * _math__WEBPACK_IMPORTED_MODULE_5__[\"radians\"] : 0, recenter()) : [deltaLambda * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaPhi * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"], deltaGamma * _math__WEBPACK_IMPORTED_MODULE_5__[\"degrees\"]];\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = Object(_resample__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(projectTransform, delta2 = _ * _), reset()) : Object(_math__WEBPACK_IMPORTED_MODULE_5__[\"sqrt\"])(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_8__[\"fitExtent\"])(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_8__[\"fitSize\"])(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_8__[\"fitWidth\"])(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return Object(_fit__WEBPACK_IMPORTED_MODULE_8__[\"fitHeight\"])(projection, height, object);\n  };\n\n  function recenter() {\n    projectRotate = Object(_compose__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rotate = Object(_rotation__WEBPACK_IMPORTED_MODULE_6__[\"rotateRadians\"])(deltaLambda, deltaPhi, deltaGamma), project);\n    var center = project(lambda, phi);\n    dx = x - center[0] * k;\n    dy = y + center[1] * k;\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/index.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/mercator.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/mercator.js ***!
  \********************************************************/
/*! exports provided: mercatorRaw, default, mercatorProjection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorRaw\", function() { return mercatorRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mercatorProjection\", function() { return mercatorProjection; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _rotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation */ \"./node_modules/d3-geo/src/rotation.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction mercatorRaw(lambda, phi) {\n  return [lambda, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(y)) - _math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / _math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n});\n\nfunction mercatorProjection(project) {\n  var m = Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = _math__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] * scale(),\n        t = m(Object(_rotation__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/mercator.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/naturalEarth1.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***!
  \*************************************************************/
/*! exports provided: naturalEarth1Raw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"naturalEarth1Raw\", function() { return naturalEarth1Raw; });\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction naturalEarth1Raw(lambda, phi) {\n  var phi2 = phi * phi, phi4 = phi2 * phi2;\n  return [\n    lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n    phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n  ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n  var phi = y, i = 25, delta;\n  do {\n    var phi2 = phi * phi, phi4 = phi2 * phi2;\n    phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n        (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n  } while (Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(delta) > _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && --i > 0);\n  return [\n    x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n    phi\n  ];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(naturalEarth1Raw)\n      .scale(175.295);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/naturalEarth1.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/orthographic.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/orthographic.js ***!
  \************************************************************/
/*! exports provided: orthographicRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orthographicRaw\", function() { return orthographicRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction orthographicRaw(x, y) {\n  return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y) * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x), Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y)];\n}\n\northographicRaw.invert = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(_math__WEBPACK_IMPORTED_MODULE_0__[\"asin\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/orthographic.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/resample.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/resample.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cartesian__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian */ \"./node_modules/d3-geo/src/cartesian.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform */ \"./node_modules/d3-geo/src/transform.js\");\n\n\n\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(30 * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]); // cos(minimum angular distance)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n});\n\nfunction resampleNone(project) {\n  return Object(_transform__WEBPACK_IMPORTED_MODULE_2__[\"transformer\"])({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sqrt\"])(a * a + b * b + c * c),\n          phi2 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(c /= m),\n          lambda2 = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(c) - 1) < _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] || Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])(lambda0 - lambda1) < _math__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? (lambda0 + lambda1) / 2 : Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"abs\"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = Object(_cartesian__WEBPACK_IMPORTED_MODULE_0__[\"cartesian\"])([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/resample.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/stereographic.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/stereographic.js ***!
  \*************************************************************/
/*! exports provided: stereographicRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stereographicRaw\", function() { return stereographicRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _azimuthal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal */ \"./node_modules/d3-geo/src/projection/azimuthal.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-geo/src/projection/index.js\");\n\n\n\n\nfunction stereographicRaw(x, y) {\n  var cy = Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(y), k = 1 + Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"cos\"])(x) * cy;\n  return [cy * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(x) / k, Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"sin\"])(y) / k];\n}\n\nstereographicRaw.invert = Object(_azimuthal__WEBPACK_IMPORTED_MODULE_1__[\"azimuthalInvert\"])(function(z) {\n  return 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(z);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/stereographic.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/projection/transverseMercator.js":
/*!******************************************************************!*\
  !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***!
  \******************************************************************/
/*! exports provided: transverseMercatorRaw, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transverseMercatorRaw\", function() { return transverseMercatorRaw; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-geo/src/math.js\");\n/* harmony import */ var _mercator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator */ \"./node_modules/d3-geo/src/projection/mercator.js\");\n\n\n\nfunction transverseMercatorRaw(lambda, phi) {\n  return [Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"log\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"tan\"])((_math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"] + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"atan\"])(Object(_math__WEBPACK_IMPORTED_MODULE_0__[\"exp\"])(x)) - _math__WEBPACK_IMPORTED_MODULE_0__[\"halfPi\"]];\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var m = Object(_mercator__WEBPACK_IMPORTED_MODULE_1__[\"mercatorProjection\"])(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/projection/transverseMercator.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/rotation.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-geo/src/rotation.js ***!
  \*********************************************/
/*! exports provided: rotateRadians, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateRadians\", function() { return rotateRadians; });\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose */ \"./node_modules/d3-geo/src/compose.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-geo/src/math.js\");\n\n\n\nfunction rotationIdentity(lambda, phi) {\n  return [lambda > _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda - _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda < -_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nfunction rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"]) ? (deltaPhi || deltaGamma ? Object(_compose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    return lambda += deltaLambda, [lambda > _math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda - _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda < -_math__WEBPACK_IMPORTED_MODULE_1__[\"pi\"] ? lambda + _math__WEBPACK_IMPORTED_MODULE_1__[\"tau\"] : lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaPhi),\n      sinDeltaPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaPhi),\n      cosDeltaGamma = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(deltaGamma),\n      sinDeltaGamma = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(phi),\n        x = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"cos\"])(lambda) * cosPhi,\n        y = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(lambda) * cosPhi,\n        z = Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"sin\"])(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"atan2\"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      Object(_math__WEBPACK_IMPORTED_MODULE_1__[\"asin\"])(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(rotate) {\n  rotate = rotateRadians(rotate[0] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate[1] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], rotate.length > 2 ? rotate[2] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"] : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"], coordinates[1] * _math__WEBPACK_IMPORTED_MODULE_1__[\"radians\"]);\n    return coordinates[0] *= _math__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates[1] *= _math__WEBPACK_IMPORTED_MODULE_1__[\"degrees\"], coordinates;\n  };\n\n  return forward;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/rotation.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/stream.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-geo/src/stream.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/stream.js?");

/***/ }),

/***/ "./node_modules/d3-geo/src/transform.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-geo/src/transform.js ***!
  \**********************************************/
/*! exports provided: default, transformer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformer\", function() { return transformer; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n});\n\nfunction transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-geo/src/transform.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/index.js":
/*!********************************************!*\
  !*** ./node_modules/d3-hierarchy/index.js ***!
  \********************************************/
/*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_cluster__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/cluster */ \"./node_modules/d3-hierarchy/src/cluster.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return _src_cluster__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_hierarchy_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/hierarchy/index */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return _src_hierarchy_index__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_pack_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/pack/index */ \"./node_modules/d3-hierarchy/src/pack/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return _src_pack_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_pack_siblings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/pack/siblings */ \"./node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return _src_pack_siblings__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_pack_enclose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/pack/enclose */ \"./node_modules/d3-hierarchy/src/pack/enclose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return _src_pack_enclose__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_partition__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/partition */ \"./node_modules/d3-hierarchy/src/partition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return _src_partition__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_stratify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/stratify */ \"./node_modules/d3-hierarchy/src/stratify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return _src_stratify__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/tree */ \"./node_modules/d3-hierarchy/src/tree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return _src_tree__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/treemap/index */ \"./node_modules/d3-hierarchy/src/treemap/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return _src_treemap_index__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_binary__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/treemap/binary */ \"./node_modules/d3-hierarchy/src/treemap/binary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return _src_treemap_binary__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_dice__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/treemap/dice */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return _src_treemap_dice__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_slice__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/treemap/slice */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return _src_treemap_slice__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_sliceDice__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/treemap/sliceDice */ \"./node_modules/d3-hierarchy/src/treemap/sliceDice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return _src_treemap_sliceDice__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_squarify__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/treemap/squarify */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return _src_treemap_squarify__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_treemap_resquarify__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/treemap/resquarify */ \"./node_modules/d3-hierarchy/src/treemap/resquarify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return _src_treemap_resquarify__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/index.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/accessors.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/accessors.js ***!
  \****************************************************/
/*! exports provided: optional, required */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"optional\", function() { return optional; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"required\", function() { return required; });\nfunction optional(f) {\n  return f == null ? null : required(f);\n}\n\nfunction required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/accessors.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/array.js":
/*!************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/array.js ***!
  \************************************************/
/*! exports provided: slice, shuffle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return shuffle; });\nvar slice = Array.prototype.slice;\n\nfunction shuffle(array) {\n  var m = array.length,\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m];\n    array[m] = array[i];\n    array[i] = t;\n  }\n\n  return array;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/cluster.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/cluster.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n  return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n  return x + c.x;\n}\n\nfunction maxY(children) {\n  return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n  return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n  var children;\n  while (children = node.children) node = children[0];\n  return node;\n}\n\nfunction leafRight(node) {\n  var children;\n  while (children = node.children) node = children[children.length - 1];\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = false;\n\n  function cluster(root) {\n    var previousNode,\n        x = 0;\n\n    // First walk, computing the initial x & y values.\n    root.eachAfter(function(node) {\n      var children = node.children;\n      if (children) {\n        node.x = meanX(children);\n        node.y = maxY(children);\n      } else {\n        node.x = previousNode ? x += separation(node, previousNode) : 0;\n        node.y = 0;\n        previousNode = node;\n      }\n    });\n\n    var left = leafLeft(root),\n        right = leafRight(root),\n        x0 = left.x - separation(left, right) / 2,\n        x1 = right.x + separation(right, left) / 2;\n\n    // Second walk, normalizing x & y to the desired size.\n    return root.eachAfter(nodeSize ? function(node) {\n      node.x = (node.x - root.x) * dx;\n      node.y = (root.y - node.y) * dy;\n    } : function(node) {\n      node.x = (node.x - x0) / (x1 - x0) * dx;\n      node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n    });\n  }\n\n  cluster.separation = function(x) {\n    return arguments.length ? (separation = x, cluster) : separation;\n  };\n\n  cluster.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n  };\n\n  cluster.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return cluster;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/cluster.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/constant.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/constant.js ***!
  \***************************************************/
/*! exports provided: constantZero, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"constantZero\", function() { return constantZero; });\nfunction constantZero() {\n  return 0;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js":
/*!**************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/ancestors.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/count.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.eachAfter(count);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/count.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/descendants.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/each.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/each.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js":
/*!**************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js":
/*!***************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***!
  \***************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***!
  \**********************************************************/
/*! exports provided: default, computeHeight, Node */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return hierarchy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"computeHeight\", function() { return computeHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony import */ var _count__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count */ \"./node_modules/d3-hierarchy/src/hierarchy/count.js\");\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each */ \"./node_modules/d3-hierarchy/src/hierarchy/each.js\");\n/* harmony import */ var _eachBefore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore */ \"./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js\");\n/* harmony import */ var _eachAfter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter */ \"./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js\");\n/* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sum */ \"./node_modules/d3-hierarchy/src/hierarchy/sum.js\");\n/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sort */ \"./node_modules/d3-hierarchy/src/hierarchy/sort.js\");\n/* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path */ \"./node_modules/d3-hierarchy/src/hierarchy/path.js\");\n/* harmony import */ var _ancestors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ancestors */ \"./node_modules/d3-hierarchy/src/hierarchy/ancestors.js\");\n/* harmony import */ var _descendants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descendants */ \"./node_modules/d3-hierarchy/src/hierarchy/descendants.js\");\n/* harmony import */ var _leaves__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./leaves */ \"./node_modules/d3-hierarchy/src/hierarchy/leaves.js\");\n/* harmony import */ var _links__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./links */ \"./node_modules/d3-hierarchy/src/hierarchy/links.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nfunction computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nfunction Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: _count__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  each: _each__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  eachAfter: _eachAfter__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  eachBefore: _eachBefore__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  sum: _sum__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  sort: _sort__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  path: _path__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  ancestors: _ancestors__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  descendants: _descendants__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  leaves: _leaves__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  links: _links__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  copy: node_copy\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/index.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/leaves.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/links.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/links.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/path.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n});\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/path.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/sort.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/sort.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/hierarchy/sum.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/hierarchy/sum.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/pack/enclose.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array */ \"./node_modules/d3-hierarchy/src/array.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  var i = 0, n = (circles = Object(_array__WEBPACK_IMPORTED_MODULE_0__[\"shuffle\"])(_array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(circles))).length, B = [], p, e;\n\n  while (i < n) {\n    p = circles[i];\n    if (e && enclosesWeak(e, p)) ++i;\n    else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n  }\n\n  return e;\n});\n\nfunction extendBasis(B, p) {\n  var i, j;\n\n  if (enclosesWeakAll(p, B)) return [p];\n\n  // If we get here then B must have at least one element.\n  for (i = 0; i < B.length; ++i) {\n    if (enclosesNot(p, B[i])\n        && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n      return [B[i], p];\n    }\n  }\n\n  // If we get here then B must have at least two elements.\n  for (i = 0; i < B.length - 1; ++i) {\n    for (j = i + 1; j < B.length; ++j) {\n      if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n          && enclosesNot(encloseBasis2(B[i], p), B[j])\n          && enclosesNot(encloseBasis2(B[j], p), B[i])\n          && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n        return [B[i], B[j], p];\n      }\n    }\n  }\n\n  // If we get here then something is very wrong.\n  throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n  var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n  return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n  var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n  for (var i = 0; i < B.length; ++i) {\n    if (!enclosesWeak(a, B[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction encloseBasis(B) {\n  switch (B.length) {\n    case 1: return encloseBasis1(B[0]);\n    case 2: return encloseBasis2(B[0], B[1]);\n    case 3: return encloseBasis3(B[0], B[1], B[2]);\n  }\n}\n\nfunction encloseBasis1(a) {\n  return {\n    x: a.x,\n    y: a.y,\n    r: a.r\n  };\n}\n\nfunction encloseBasis2(a, b) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n      l = Math.sqrt(x21 * x21 + y21 * y21);\n  return {\n    x: (x1 + x2 + x21 / l * r21) / 2,\n    y: (y1 + y2 + y21 / l * r21) / 2,\n    r: (l + r1 + r2) / 2\n  };\n}\n\nfunction encloseBasis3(a, b, c) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x3 = c.x, y3 = c.y, r3 = c.r,\n      a2 = x1 - x2,\n      a3 = x1 - x3,\n      b2 = y1 - y2,\n      b3 = y1 - y3,\n      c2 = r2 - r1,\n      c3 = r3 - r1,\n      d1 = x1 * x1 + y1 * y1 - r1 * r1,\n      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n      ab = a3 * b2 - a2 * b3,\n      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n      xb = (b3 * c2 - b2 * c3) / ab,\n      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n      yb = (a2 * c3 - a3 * c2) / ab,\n      A = xb * xb + yb * yb - 1,\n      B = 2 * (r1 + xa * xb + ya * yb),\n      C = xa * xa + ya * ya - r1 * r1,\n      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n  return {\n    x: x1 + xa + xb * r,\n    y: y1 + ya + yb * r,\n    r: r\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/pack/enclose.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/pack/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/pack/index.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _siblings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings */ \"./node_modules/d3-hierarchy/src/pack/siblings.js\");\n/* harmony import */ var _accessors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ \"./node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\nfunction defaultRadius(d) {\n  return Math.sqrt(d.value);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var radius = null,\n      dx = 1,\n      dy = 1,\n      padding = _constant__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"];\n\n  function pack(root) {\n    root.x = dx / 2, root.y = dy / 2;\n    if (radius) {\n      root.eachBefore(radiusLeaf(radius))\n          .eachAfter(packChildren(padding, 0.5))\n          .eachBefore(translateChild(1));\n    } else {\n      root.eachBefore(radiusLeaf(defaultRadius))\n          .eachAfter(packChildren(_constant__WEBPACK_IMPORTED_MODULE_2__[\"constantZero\"], 1))\n          .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n          .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n    }\n    return root;\n  }\n\n  pack.radius = function(x) {\n    return arguments.length ? (radius = Object(_accessors__WEBPACK_IMPORTED_MODULE_1__[\"optional\"])(x), pack) : radius;\n  };\n\n  pack.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n  };\n\n  pack.padding = function(x) {\n    return arguments.length ? (padding = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+x), pack) : padding;\n  };\n\n  return pack;\n});\n\nfunction radiusLeaf(radius) {\n  return function(node) {\n    if (!node.children) {\n      node.r = Math.max(0, +radius(node) || 0);\n    }\n  };\n}\n\nfunction packChildren(padding, k) {\n  return function(node) {\n    if (children = node.children) {\n      var children,\n          i,\n          n = children.length,\n          r = padding(node) * k || 0,\n          e;\n\n      if (r) for (i = 0; i < n; ++i) children[i].r += r;\n      e = Object(_siblings__WEBPACK_IMPORTED_MODULE_0__[\"packEnclose\"])(children);\n      if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n      node.r = e + r;\n    }\n  };\n}\n\nfunction translateChild(k) {\n  return function(node) {\n    var parent = node.parent;\n    node.r *= k;\n    if (parent) {\n      node.x = parent.x + k * node.x;\n      node.y = parent.y + k * node.y;\n    }\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/pack/index.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/pack/siblings.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***!
  \********************************************************/
/*! exports provided: packEnclose, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return packEnclose; });\n/* harmony import */ var _enclose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enclose */ \"./node_modules/d3-hierarchy/src/pack/enclose.js\");\n\n\nfunction place(a, b, c) {\n  var ax = a.x,\n      ay = a.y,\n      da = b.r + c.r,\n      db = a.r + c.r,\n      dx = b.x - ax,\n      dy = b.y - ay,\n      dc = dx * dx + dy * dy;\n  if (dc) {\n    var x = 0.5 + ((db *= db) - (da *= da)) / (2 * dc),\n        y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);\n    c.x = ax + x * dx + y * dy;\n    c.y = ay + x * dy - y * dx;\n  } else {\n    c.x = ax + db;\n    c.y = ay;\n  }\n}\n\nfunction intersects(a, b) {\n  var dx = b.x - a.x,\n      dy = b.y - a.y,\n      dr = a.r + b.r;\n  return dr * dr - 1e-6 > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n  var a = node._,\n      b = node.next._,\n      ab = a.r + b.r,\n      dx = (a.x * b.r + b.x * a.r) / ab,\n      dy = (a.y * b.r + b.y * a.r) / ab;\n  return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n  this._ = circle;\n  this.next = null;\n  this.previous = null;\n}\n\nfunction packEnclose(circles) {\n  if (!(n = circles.length)) return 0;\n\n  var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n  // Place the first circle.\n  a = circles[0], a.x = 0, a.y = 0;\n  if (!(n > 1)) return a.r;\n\n  // Place the second circle.\n  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n  if (!(n > 2)) return a.r + b.r;\n\n  // Place the third circle.\n  place(b, a, c = circles[2]);\n\n  // Initialize the front-chain using the first three circles a, b and c.\n  a = new Node(a), b = new Node(b), c = new Node(c);\n  a.next = c.previous = b;\n  b.next = a.previous = c;\n  c.next = b.previous = a;\n\n  // Attempt to place each remaining circle…\n  pack: for (i = 3; i < n; ++i) {\n    place(a._, b._, c = circles[i]), c = new Node(c);\n\n    // Find the closest intersecting circle on the front-chain, if any.\n    // “Closeness” is determined by linear distance along the front-chain.\n    // “Ahead” or “behind” is likewise determined by linear distance.\n    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n    do {\n      if (sj <= sk) {\n        if (intersects(j._, c._)) {\n          b = j, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sj += j._.r, j = j.next;\n      } else {\n        if (intersects(k._, c._)) {\n          a = k, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sk += k._.r, k = k.previous;\n      }\n    } while (j !== k.next);\n\n    // Success! Insert the new circle c between a and b.\n    c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n    // Compute the new closest circle pair to the centroid.\n    aa = score(a);\n    while ((c = c.next) !== b) {\n      if ((ca = score(c)) < aa) {\n        a = c, aa = ca;\n      }\n    }\n    b = a.next;\n  }\n\n  // Compute the enclosing circle of the front chain.\n  a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a);\n\n  // Translate the circles to put the enclosing circle around the origin.\n  for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n  return c.r;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(circles) {\n  packEnclose(circles);\n  return circles;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/pack/siblings.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/partition.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/partition.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _treemap_round__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round */ \"./node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _treemap_dice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var dx = 1,\n      dy = 1,\n      padding = 0,\n      round = false;\n\n  function partition(root) {\n    var n = root.height + 1;\n    root.x0 =\n    root.y0 = padding;\n    root.x1 = dx;\n    root.y1 = dy / n;\n    root.eachBefore(positionNode(dy, n));\n    if (round) root.eachBefore(_treemap_round__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(dy, n) {\n    return function(node) {\n      if (node.children) {\n        Object(_treemap_dice__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n      }\n      var x0 = node.x0,\n          y0 = node.y0,\n          x1 = node.x1 - padding,\n          y1 = node.y1 - padding;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      node.x0 = x0;\n      node.y0 = y0;\n      node.x1 = x1;\n      node.y1 = y1;\n    };\n  }\n\n  partition.round = function(x) {\n    return arguments.length ? (round = !!x, partition) : round;\n  };\n\n  partition.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n  };\n\n  partition.padding = function(x) {\n    return arguments.length ? (padding = +x, partition) : padding;\n  };\n\n  return partition;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/partition.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/stratify.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/stratify.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _accessors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _hierarchy_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\n\nvar keyPrefix = \"$\", // Protect against keys like “__proto__”.\n    preroot = {depth: -1},\n    ambiguous = {};\n\nfunction defaultId(d) {\n  return d.id;\n}\n\nfunction defaultParentId(d) {\n  return d.parentId;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var id = defaultId,\n      parentId = defaultParentId;\n\n  function stratify(data) {\n    var d,\n        i,\n        n = data.length,\n        root,\n        parent,\n        node,\n        nodes = new Array(n),\n        nodeId,\n        nodeKey,\n        nodeByKey = {};\n\n    for (i = 0; i < n; ++i) {\n      d = data[i], node = nodes[i] = new _hierarchy_index__WEBPACK_IMPORTED_MODULE_1__[\"Node\"](d);\n      if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n        nodeKey = keyPrefix + (node.id = nodeId);\n        nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;\n      }\n    }\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], nodeId = parentId(data[i], i, data);\n      if (nodeId == null || !(nodeId += \"\")) {\n        if (root) throw new Error(\"multiple roots\");\n        root = node;\n      } else {\n        parent = nodeByKey[keyPrefix + nodeId];\n        if (!parent) throw new Error(\"missing: \" + nodeId);\n        if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n        if (parent.children) parent.children.push(node);\n        else parent.children = [node];\n        node.parent = parent;\n      }\n    }\n\n    if (!root) throw new Error(\"no root\");\n    root.parent = preroot;\n    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index__WEBPACK_IMPORTED_MODULE_1__[\"computeHeight\"]);\n    root.parent = null;\n    if (n > 0) throw new Error(\"cycle\");\n\n    return root;\n  }\n\n  stratify.id = function(x) {\n    return arguments.length ? (id = Object(_accessors__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : id;\n  };\n\n  stratify.parentId = function(x) {\n    return arguments.length ? (parentId = Object(_accessors__WEBPACK_IMPORTED_MODULE_0__[\"required\"])(x), stratify) : parentId;\n  };\n\n  return stratify;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/stratify.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/tree.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-hierarchy/src/tree.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hierarchy_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index */ \"./node_modules/d3-hierarchy/src/hierarchy/index.js\");\n\n\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n//   return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n  var children = v.children;\n  return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n  var children = v.children;\n  return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n  var change = shift / (wp.i - wm.i);\n  wp.c -= change;\n  wp.s += shift;\n  wm.c += change;\n  wp.z += shift;\n  wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n  var shift = 0,\n      change = 0,\n      children = v.children,\n      i = children.length,\n      w;\n  while (--i >= 0) {\n    w = children[i];\n    w.z += shift;\n    w.m += shift;\n    shift += w.s + (change += w.c);\n  }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n  return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n  this._ = node;\n  this.parent = null;\n  this.children = null;\n  this.A = null; // default ancestor\n  this.a = this; // ancestor\n  this.z = 0; // prelim\n  this.m = 0; // mod\n  this.c = 0; // change\n  this.s = 0; // shift\n  this.t = null; // thread\n  this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(_hierarchy_index__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].prototype);\n\nfunction treeRoot(root) {\n  var tree = new TreeNode(root, 0),\n      node,\n      nodes = [tree],\n      child,\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if (children = node._.children) {\n      node.children = new Array(n = children.length);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n        child.parent = node;\n      }\n    }\n  }\n\n  (tree.parent = new TreeNode(null, 0)).children = [tree];\n  return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = null;\n\n  function tree(root) {\n    var t = treeRoot(root);\n\n    // Compute the layout using Buchheim et al.’s algorithm.\n    t.eachAfter(firstWalk), t.parent.m = -t.z;\n    t.eachBefore(secondWalk);\n\n    // If a fixed node size is specified, scale x and y.\n    if (nodeSize) root.eachBefore(sizeNode);\n\n    // If a fixed tree size is specified, scale x and y based on the extent.\n    // Compute the left-most, right-most, and depth-most nodes for extents.\n    else {\n      var left = root,\n          right = root,\n          bottom = root;\n      root.eachBefore(function(node) {\n        if (node.x < left.x) left = node;\n        if (node.x > right.x) right = node;\n        if (node.depth > bottom.depth) bottom = node;\n      });\n      var s = left === right ? 1 : separation(left, right) / 2,\n          tx = s - left.x,\n          kx = dx / (right.x + s + tx),\n          ky = dy / (bottom.depth || 1);\n      root.eachBefore(function(node) {\n        node.x = (node.x + tx) * kx;\n        node.y = node.depth * ky;\n      });\n    }\n\n    return root;\n  }\n\n  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n  // applied recursively to the children of v, as well as the function\n  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n  // node v is placed to the midpoint of its outermost children.\n  function firstWalk(v) {\n    var children = v.children,\n        siblings = v.parent.children,\n        w = v.i ? siblings[v.i - 1] : null;\n    if (children) {\n      executeShifts(v);\n      var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n      if (w) {\n        v.z = w.z + separation(v._, w._);\n        v.m = v.z - midpoint;\n      } else {\n        v.z = midpoint;\n      }\n    } else if (w) {\n      v.z = w.z + separation(v._, w._);\n    }\n    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n  }\n\n  // Computes all real x-coordinates by summing up the modifiers recursively.\n  function secondWalk(v) {\n    v._.x = v.z + v.parent.m;\n    v.m += v.parent.m;\n  }\n\n  // The core of the algorithm. Here, a new subtree is combined with the\n  // previous subtrees. Threads are used to traverse the inside and outside\n  // contours of the left and right subtree up to the highest common level. The\n  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n  // superscript o means outside and i means inside, the subscript - means left\n  // subtree and + means right subtree. For summing up the modifiers along the\n  // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n  // nodes of the inside contours conflict, we compute the left one of the\n  // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n  // Finally, we add a new thread (if necessary).\n  function apportion(v, w, ancestor) {\n    if (w) {\n      var vip = v,\n          vop = v,\n          vim = w,\n          vom = vip.parent.children[0],\n          sip = vip.m,\n          sop = vop.m,\n          sim = vim.m,\n          som = vom.m,\n          shift;\n      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n        vom = nextLeft(vom);\n        vop = nextRight(vop);\n        vop.a = v;\n        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n        if (shift > 0) {\n          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n          sip += shift;\n          sop += shift;\n        }\n        sim += vim.m;\n        sip += vip.m;\n        som += vom.m;\n        sop += vop.m;\n      }\n      if (vim && !nextRight(vop)) {\n        vop.t = vim;\n        vop.m += sim - sop;\n      }\n      if (vip && !nextLeft(vom)) {\n        vom.t = vip;\n        vom.m += sip - som;\n        ancestor = v;\n      }\n    }\n    return ancestor;\n  }\n\n  function sizeNode(node) {\n    node.x *= dx;\n    node.y = node.depth * dy;\n  }\n\n  tree.separation = function(x) {\n    return arguments.length ? (separation = x, tree) : separation;\n  };\n\n  tree.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n  };\n\n  tree.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return tree;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/tree.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/binary.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      i, n = nodes.length,\n      sum, sums = new Array(n + 1);\n\n  for (sums[0] = sum = i = 0; i < n; ++i) {\n    sums[i + 1] = sum += nodes[i].value;\n  }\n\n  partition(0, n, parent.value, x0, y0, x1, y1);\n\n  function partition(i, j, value, x0, y0, x1, y1) {\n    if (i >= j - 1) {\n      var node = nodes[i];\n      node.x0 = x0, node.y0 = y0;\n      node.x1 = x1, node.y1 = y1;\n      return;\n    }\n\n    var valueOffset = sums[i],\n        valueTarget = (value / 2) + valueOffset,\n        k = i + 1,\n        hi = j - 1;\n\n    while (k < hi) {\n      var mid = k + hi >>> 1;\n      if (sums[mid] < valueTarget) k = mid + 1;\n      else hi = mid;\n    }\n\n    if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n    var valueLeft = sums[k] - valueOffset,\n        valueRight = value - valueLeft;\n\n    if ((x1 - x0) > (y1 - y0)) {\n      var xk = (x0 * valueRight + x1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, xk, y1);\n      partition(k, j, valueRight, xk, y0, x1, y1);\n    } else {\n      var yk = (y0 * valueRight + y1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, x1, yk);\n      partition(k, j, valueRight, x0, yk, x1, y1);\n    }\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/binary.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/dice.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/dice.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/index.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _round__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round */ \"./node_modules/d3-hierarchy/src/treemap/round.js\");\n/* harmony import */ var _squarify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n/* harmony import */ var _accessors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors */ \"./node_modules/d3-hierarchy/src/accessors.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant */ \"./node_modules/d3-hierarchy/src/constant.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var tile = _squarify__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = _constant__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingTop = _constant__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingRight = _constant__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingBottom = _constant__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"],\n      paddingLeft = _constant__WEBPACK_IMPORTED_MODULE_3__[\"constantZero\"];\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(_round__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = Object(_accessors__WEBPACK_IMPORTED_MODULE_2__[\"required\"])(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/index.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/resquarify.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n/* harmony import */ var _squarify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify */ \"./node_modules/d3-hierarchy/src/treemap/squarify.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n        if (row.dice) Object(_dice__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);\n        else Object(_slice__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = Object(_squarify__WEBPACK_IMPORTED_MODULE_2__[\"squarifyRatio\"])(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(_squarify__WEBPACK_IMPORTED_MODULE_2__[\"phi\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/resquarify.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/round.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/round.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/slice.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/slice.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(parent, x0, y0, x1, y1) {\n  (parent.depth & 1 ? _slice__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _dice__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parent, x0, y0, x1, y1);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/sliceDice.js?");

/***/ }),

/***/ "./node_modules/d3-hierarchy/src/treemap/squarify.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***!
  \***********************************************************/
/*! exports provided: phi, squarifyRatio, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"phi\", function() { return phi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squarifyRatio\", function() { return squarifyRatio; });\n/* harmony import */ var _dice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice */ \"./node_modules/d3-hierarchy/src/treemap/dice.js\");\n/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ \"./node_modules/d3-hierarchy/src/treemap/slice.js\");\n\n\n\nvar phi = (1 + Math.sqrt(5)) / 2;\n\nfunction squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) Object(_dice__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else Object(_slice__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-hierarchy/src/treemap/squarify.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/index.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-interpolate/index.js ***!
  \**********************************************/
/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateNumber, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, quantize */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/value */ \"./node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _src_value__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/array */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _src_array__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_basis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/basis */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _src_basis__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_basisClosed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/basisClosed */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _src_basisClosed__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/date */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _src_date__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_number__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/number */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _src_number__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/object */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _src_object__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_round__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/round */ \"./node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _src_round__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/string */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _src_string__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_transform_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/transform/index */ \"./node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _src_transform_index__WEBPACK_IMPORTED_MODULE_9__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _src_transform_index__WEBPACK_IMPORTED_MODULE_9__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _src_zoom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/zoom */ \"./node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _src_zoom__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_rgb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/rgb */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _src_rgb__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _src_rgb__WEBPACK_IMPORTED_MODULE_11__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _src_rgb__WEBPACK_IMPORTED_MODULE_11__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _src_hsl__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/hsl */ \"./node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _src_hsl__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _src_hsl__WEBPACK_IMPORTED_MODULE_12__[\"hslLong\"]; });\n\n/* harmony import */ var _src_lab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/lab */ \"./node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _src_lab__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_hcl__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/hcl */ \"./node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _src_hcl__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _src_hcl__WEBPACK_IMPORTED_MODULE_14__[\"hclLong\"]; });\n\n/* harmony import */ var _src_cubehelix__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/cubehelix */ \"./node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _src_cubehelix__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _src_cubehelix__WEBPACK_IMPORTED_MODULE_15__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _src_quantize__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/quantize */ \"./node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _src_quantize__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/index.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/array.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-interpolate/src/array.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value */ \"./node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = Object(_value__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/basis.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-interpolate/src/basis.js ***!
  \**************************************************/
/*! exports provided: basis, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/basis.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/basisClosed.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-interpolate/src/basisClosed.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis */ \"./node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return Object(_basis__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/basisClosed.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/color.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-interpolate/src/color.js ***!
  \**************************************************/
/*! exports provided: hue, gamma, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/color.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/constant.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-interpolate/src/constant.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/cubehelix.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-interpolate/src/cubehelix.js ***!
  \******************************************************/
/*! exports provided: default, cubehelixLong */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n          s = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n          l = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n          opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/cubehelix.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/date.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-interpolate/src/date.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var d = new Date;\n  return a = +a, b -= a, function(t) {\n    return d.setTime(a + b * t), d;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/date.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/hcl.js":
/*!************************************************!*\
  !*** ./node_modules/d3-interpolate/src/hcl.js ***!
  \************************************************/
/*! exports provided: default, hclLong */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n        c = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n        l = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/hcl.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/hsl.js":
/*!************************************************!*\
  !*** ./node_modules/d3-interpolate/src/hsl.js ***!
  \************************************************/
/*! exports provided: default, hslLong */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n        s = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n        l = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n        opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/hsl.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/lab.js":
/*!************************************************!*\
  !*** ./node_modules/d3-interpolate/src/lab.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n  var l = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n      a = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n      b = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n      opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/lab.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/number.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-interpolate/src/number.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return a + b * t;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/number.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/object.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-interpolate/src/object.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value */ \"./node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = Object(_value__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/object.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/quantize.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-interpolate/src/quantize.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/quantize.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/rgb.js":
/*!************************************************!*\
  !*** ./node_modules/d3-interpolate/src/rgb.js ***!
  \************************************************/
/*! exports provided: default, rgbBasis, rgbBasisClosed */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n  var color = Object(_color__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n  function rgb(start, end) {\n    var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = Object(_color__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(_basis__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/rgb.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/round.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-interpolate/src/round.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return Math.round(a + b * t);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/round.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/string.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-interpolate/src/string.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/string.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/transform/decompose.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***!
  \****************************************************************/
/*! exports provided: identity, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/transform/decompose.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/transform/index.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-interpolate/src/transform/index.js ***!
  \************************************************************/
/*! exports provided: interpolateTransformCss, interpolateTransformSvg */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse */ \"./node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/transform/index.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/transform/parse.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-interpolate/src/transform/parse.js ***!
  \************************************************************/
/*! exports provided: parseCss, parseSvg */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose */ \"./node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nfunction parseCss(value) {\n  if (value === \"none\") return _decompose__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return Object(_decompose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return _decompose__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n  value = value.matrix;\n  return Object(_decompose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/transform/parse.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/value.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-interpolate/src/value.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var _rgb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-interpolate/src/constant.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? Object(_constant__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n      : (t === \"number\" ? _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n      : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n      : b instanceof Date ? _date__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n      : Array.isArray(b) ? _array__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n      : _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/value.js?");

/***/ }),

/***/ "./node_modules/d3-interpolate/src/zoom.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-interpolate/src/zoom.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar rho = Math.SQRT2,\n    rho2 = 2,\n    rho4 = 4,\n    epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(p0, p1) {\n  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n      dx = ux1 - ux0,\n      dy = uy1 - uy0,\n      d2 = dx * dx + dy * dy,\n      i,\n      S;\n\n  // Special case for u0 ≅ u1.\n  if (d2 < epsilon2) {\n    S = Math.log(w1 / w0) / rho;\n    i = function(t) {\n      return [\n        ux0 + t * dx,\n        uy0 + t * dy,\n        w0 * Math.exp(rho * t * S)\n      ];\n    }\n  }\n\n  // General case.\n  else {\n    var d1 = Math.sqrt(d2),\n        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n    S = (r1 - r0) / rho;\n    i = function(t) {\n      var s = t * S,\n          coshr0 = cosh(r0),\n          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n      return [\n        ux0 + u * dx,\n        uy0 + u * dy,\n        w0 * coshr0 / cosh(rho * s + r0)\n      ];\n    }\n  }\n\n  i.duration = S * 1000;\n\n  return i;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-interpolate/src/zoom.js?");

/***/ }),

/***/ "./node_modules/d3-path/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-path/index.js ***!
  \***************************************/
/*! exports provided: path */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/path */ \"./node_modules/d3-path/src/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _src_path__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-path/index.js?");

/***/ }),

/***/ "./node_modules/d3-path/src/path.js":
/*!******************************************!*\
  !*** ./node_modules/d3-path/src/path.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon)) {}\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-path/src/path.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/index.js":
/*!******************************************!*\
  !*** ./node_modules/d3-polygon/index.js ***!
  \******************************************/
/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_area__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/area */ \"./node_modules/d3-polygon/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return _src_area__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_centroid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/centroid */ \"./node_modules/d3-polygon/src/centroid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return _src_centroid__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_hull__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/hull */ \"./node_modules/d3-polygon/src/hull.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return _src_hull__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_contains__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/contains */ \"./node_modules/d3-polygon/src/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return _src_contains__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_length__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/length */ \"./node_modules/d3-polygon/src/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return _src_length__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/index.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/area.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-polygon/src/area.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      a,\n      b = polygon[n - 1],\n      area = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    area += a[1] * b[0] - a[0] * b[1];\n  }\n\n  return area / 2;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/area.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/centroid.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-polygon/src/centroid.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      x = 0,\n      y = 0,\n      a,\n      b = polygon[n - 1],\n      c,\n      k = 0;\n\n  while (++i < n) {\n    a = b;\n    b = polygon[i];\n    k += c = a[0] * b[1] - b[0] * a[1];\n    x += (a[0] + b[0]) * c;\n    y += (a[1] + b[1]) * c;\n  }\n\n  return k *= 3, [x / k, y / k];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/centroid.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/contains.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-polygon/src/contains.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon, point) {\n  var n = polygon.length,\n      p = polygon[n - 1],\n      x = point[0], y = point[1],\n      x0 = p[0], y0 = p[1],\n      x1, y1,\n      inside = false;\n\n  for (var i = 0; i < n; ++i) {\n    p = polygon[i], x1 = p[0], y1 = p[1];\n    if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n    x0 = x1, y0 = y1;\n  }\n\n  return inside;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/contains.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/cross.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-polygon/src/cross.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/cross.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/hull.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-polygon/src/hull.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cross__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross */ \"./node_modules/d3-polygon/src/cross.js\");\n\n\nfunction lexicographicOrder(a, b) {\n  return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n  var n = points.length,\n      indexes = [0, 1],\n      size = 2;\n\n  for (var i = 2; i < n; ++i) {\n    while (size > 1 && Object(_cross__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n    indexes[size++] = i;\n  }\n\n  return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(points) {\n  if ((n = points.length) < 3) return null;\n\n  var i,\n      n,\n      sortedPoints = new Array(n),\n      flippedPoints = new Array(n);\n\n  for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n  sortedPoints.sort(lexicographicOrder);\n  for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n  var upperIndexes = computeUpperHullIndexes(sortedPoints),\n      lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n  // Construct the hull polygon, removing possible duplicate endpoints.\n  var skipLeft = lowerIndexes[0] === upperIndexes[0],\n      skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n      hull = [];\n\n  // Add upper hull in right-to-l order.\n  // Then add lower hull in left-to-right order.\n  for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n  for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n  return hull;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/hull.js?");

/***/ }),

/***/ "./node_modules/d3-polygon/src/length.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-polygon/src/length.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(polygon) {\n  var i = -1,\n      n = polygon.length,\n      b = polygon[n - 1],\n      xa,\n      ya,\n      xb = b[0],\n      yb = b[1],\n      perimeter = 0;\n\n  while (++i < n) {\n    xa = xb;\n    ya = yb;\n    b = polygon[i];\n    xb = b[0];\n    yb = b[1];\n    xa -= xb;\n    ya -= yb;\n    perimeter += Math.sqrt(xa * xa + ya * ya);\n  }\n\n  return perimeter;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-polygon/src/length.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/index.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-quadtree/index.js ***!
  \*******************************************/
/*! exports provided: quadtree */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/quadtree */ \"./node_modules/d3-quadtree/src/quadtree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return _src_quadtree__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/index.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/add.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-quadtree/src/add.js ***!
  \*********************************************/
/*! exports provided: default, addAll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAll\", function() { return addAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  var x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n});\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nfunction addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, inherit the existing extent.\n  if (x1 < x0) x0 = this._x0, x1 = this._x1;\n  if (y1 < y0) y0 = this._y0, y1 = this._y1;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/add.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/cover.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-quadtree/src/cover.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else if (x0 > x || x > x1 || y0 > y || y > y1) {\n    var z = x1 - x0,\n        node = this._root,\n        parent,\n        i;\n\n    switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) {\n      case 0: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1);\n        break;\n      }\n      case 1: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1);\n        break;\n      }\n      case 2: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y);\n        break;\n      }\n      case 3: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y);\n        break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  // If the quadtree covers the point already, just return.\n  else return this;\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/cover.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/data.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-quadtree/src/data.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/data.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/extent.js":
/*!************************************************!*\
  !*** ./node_modules/d3-quadtree/src/extent.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/extent.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/find.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-quadtree/src/find.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[3], xm, ym, x2, y2),\n        new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[2], x1, ym, xm, y2),\n        new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[1], xm, y1, x2, ym),\n        new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/find.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/quad.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-quadtree/src/quad.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/quad.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/quadtree.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-quadtree/src/quadtree.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quadtree; });\n/* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ \"./node_modules/d3-quadtree/src/add.js\");\n/* harmony import */ var _cover__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover */ \"./node_modules/d3-quadtree/src/cover.js\");\n/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data */ \"./node_modules/d3-quadtree/src/data.js\");\n/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent */ \"./node_modules/d3-quadtree/src/extent.js\");\n/* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find */ \"./node_modules/d3-quadtree/src/find.js\");\n/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove */ \"./node_modules/d3-quadtree/src/remove.js\");\n/* harmony import */ var _root__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root */ \"./node_modules/d3-quadtree/src/root.js\");\n/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size */ \"./node_modules/d3-quadtree/src/size.js\");\n/* harmony import */ var _visit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit */ \"./node_modules/d3-quadtree/src/visit.js\");\n/* harmony import */ var _visitAfter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter */ \"./node_modules/d3-quadtree/src/visitAfter.js\");\n/* harmony import */ var _x__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x */ \"./node_modules/d3-quadtree/src/x.js\");\n/* harmony import */ var _y__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y */ \"./node_modules/d3-quadtree/src/y.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? _x__WEBPACK_IMPORTED_MODULE_10__[\"defaultX\"] : x, y == null ? _y__WEBPACK_IMPORTED_MODULE_11__[\"defaultY\"] : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = _add__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\ntreeProto.addAll = _add__WEBPACK_IMPORTED_MODULE_0__[\"addAll\"];\ntreeProto.cover = _cover__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\ntreeProto.data = _data__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\ntreeProto.extent = _extent__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\ntreeProto.find = _find__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\ntreeProto.remove = _remove__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\ntreeProto.removeAll = _remove__WEBPACK_IMPORTED_MODULE_5__[\"removeAll\"];\ntreeProto.root = _root__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\ntreeProto.size = _size__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\ntreeProto.visit = _visit__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\ntreeProto.visitAfter = _visitAfter__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\ntreeProto.x = _x__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\ntreeProto.y = _y__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/quadtree.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/remove.js":
/*!************************************************!*\
  !*** ./node_modules/d3-quadtree/src/remove.js ***!
  \************************************************/
/*! exports provided: default, removeAll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAll\", function() { return removeAll; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n});\n\nfunction removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/remove.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/root.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-quadtree/src/root.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this._root;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/root.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/size.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-quadtree/src/size.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/size.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/visit.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-quadtree/src/visit.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/visit.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/visitAfter.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-quadtree/src/visitAfter.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _quad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad */ \"./node_modules/d3-quadtree/src/quad.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new _quad__WEBPACK_IMPORTED_MODULE_0__[\"default\"](child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/visitAfter.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/x.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-quadtree/src/x.js ***!
  \*******************************************/
/*! exports provided: defaultX, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultX\", function() { return defaultX; });\nfunction defaultX(d) {\n  return d[0];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/x.js?");

/***/ }),

/***/ "./node_modules/d3-quadtree/src/y.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-quadtree/src/y.js ***!
  \*******************************************/
/*! exports provided: defaultY, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultY\", function() { return defaultY; });\nfunction defaultY(d) {\n  return d[1];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-quadtree/src/y.js?");

/***/ }),

/***/ "./node_modules/d3-queue/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-queue/index.js ***!
  \****************************************/
/*! exports provided: queue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/queue */ \"./node_modules/d3-queue/src/queue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"queue\", function() { return _src_queue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-queue/index.js?");

/***/ }),

/***/ "./node_modules/d3-queue/src/array.js":
/*!********************************************!*\
  !*** ./node_modules/d3-queue/src/array.js ***!
  \********************************************/
/*! exports provided: slice */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = [].slice;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-queue/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-queue/src/queue.js":
/*!********************************************!*\
  !*** ./node_modules/d3-queue/src/queue.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return queue; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-queue/src/array.js\");\n\n\nvar noabort = {};\n\nfunction Queue(size) {\n  this._size = size;\n  this._call =\n  this._error = null;\n  this._tasks = [];\n  this._data = [];\n  this._waiting =\n  this._active =\n  this._ended =\n  this._start = 0; // inside a synchronous task callback?\n}\n\nQueue.prototype = queue.prototype = {\n  constructor: Queue,\n  defer: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"defer after await\");\n    if (this._error != null) return this;\n    var t = _array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(arguments, 1);\n    t.push(callback);\n    ++this._waiting, this._tasks.push(t);\n    poke(this);\n    return this;\n  },\n  abort: function() {\n    if (this._error == null) abort(this, new Error(\"abort\"));\n    return this;\n  },\n  await: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"multiple await\");\n    this._call = function(error, results) { callback.apply(null, [error].concat(results)); };\n    maybeNotify(this);\n    return this;\n  },\n  awaitAll: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"multiple await\");\n    this._call = callback;\n    maybeNotify(this);\n    return this;\n  }\n};\n\nfunction poke(q) {\n  if (!q._start) {\n    try { start(q); } // let the current task complete\n    catch (e) {\n      if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously\n      else if (!q._data) throw e; // await callback errored synchronously\n    }\n  }\n}\n\nfunction start(q) {\n  while (q._start = q._waiting && q._active < q._size) {\n    var i = q._ended + q._active,\n        t = q._tasks[i],\n        j = t.length - 1,\n        c = t[j];\n    t[j] = end(q, i);\n    --q._waiting, ++q._active;\n    t = c.apply(null, t);\n    if (!q._tasks[i]) continue; // task finished synchronously\n    q._tasks[i] = t || noabort;\n  }\n}\n\nfunction end(q, i) {\n  return function(e, r) {\n    if (!q._tasks[i]) return; // ignore multiple callbacks\n    --q._active, ++q._ended;\n    q._tasks[i] = null;\n    if (q._error != null) return; // ignore secondary errors\n    if (e != null) {\n      abort(q, e);\n    } else {\n      q._data[i] = r;\n      if (q._waiting) poke(q);\n      else maybeNotify(q);\n    }\n  };\n}\n\nfunction abort(q, e) {\n  var i = q._tasks.length, t;\n  q._error = e; // ignore active callbacks\n  q._data = undefined; // allow gc\n  q._waiting = NaN; // prevent starting\n\n  while (--i >= 0) {\n    if (t = q._tasks[i]) {\n      q._tasks[i] = null;\n      if (t.abort) {\n        try { t.abort(); }\n        catch (e) { /* ignore */ }\n      }\n    }\n  }\n\n  q._active = NaN; // allow notification\n  maybeNotify(q);\n}\n\nfunction maybeNotify(q) {\n  if (!q._active && q._call) {\n    var d = q._data;\n    q._data = undefined; // allow gc\n    q._call(q._error, d);\n  }\n}\n\nfunction queue(concurrency) {\n  if (concurrency == null) concurrency = Infinity;\n  else if (!((concurrency = +concurrency) >= 1)) throw new Error(\"invalid concurrency\");\n  return new Queue(concurrency);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-queue/src/queue.js?");

/***/ }),

/***/ "./node_modules/d3-random/index.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-random/index.js ***!
  \*****************************************/
/*! exports provided: randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_uniform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/uniform */ \"./node_modules/d3-random/src/uniform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return _src_uniform__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/normal */ \"./node_modules/d3-random/src/normal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return _src_normal__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_logNormal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/logNormal */ \"./node_modules/d3-random/src/logNormal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return _src_logNormal__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_bates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/bates */ \"./node_modules/d3-random/src/bates.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return _src_bates__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_irwinHall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/irwinHall */ \"./node_modules/d3-random/src/irwinHall.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return _src_irwinHall__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_exponential__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/exponential */ \"./node_modules/d3-random/src/exponential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return _src_exponential__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/index.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/bates.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-random/src/bates.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall */ \"./node_modules/d3-random/src/irwinHall.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomBates(source) {\n  function randomBates(n) {\n    var randomIrwinHall = _irwinHall__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source)(n);\n    return function() {\n      return randomIrwinHall() / n;\n    };\n  }\n\n  randomBates.source = sourceRandomBates;\n\n  return randomBates;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/bates.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/defaultSource.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-random/src/defaultSource.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Math.random();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/defaultSource.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/exponential.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-random/src/exponential.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomExponential(source) {\n  function randomExponential(lambda) {\n    return function() {\n      return -Math.log(1 - source()) / lambda;\n    };\n  }\n\n  randomExponential.source = sourceRandomExponential;\n\n  return randomExponential;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/exponential.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/irwinHall.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-random/src/irwinHall.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomIrwinHall(source) {\n  function randomIrwinHall(n) {\n    return function() {\n      for (var sum = 0, i = 0; i < n; ++i) sum += source();\n      return sum;\n    };\n  }\n\n  randomIrwinHall.source = sourceRandomIrwinHall;\n\n  return randomIrwinHall;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/irwinHall.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/logNormal.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-random/src/logNormal.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ \"./node_modules/d3-random/src/normal.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomLogNormal(source) {\n  function randomLogNormal() {\n    var randomNormal = _normal__WEBPACK_IMPORTED_MODULE_1__[\"default\"].source(source).apply(this, arguments);\n    return function() {\n      return Math.exp(randomNormal());\n    };\n  }\n\n  randomLogNormal.source = sourceRandomLogNormal;\n\n  return randomLogNormal;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/logNormal.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/normal.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-random/src/normal.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomNormal(source) {\n  function randomNormal(mu, sigma) {\n    var x, r;\n    mu = mu == null ? 0 : +mu;\n    sigma = sigma == null ? 1 : +sigma;\n    return function() {\n      var y;\n\n      // If available, use the second previously-generated uniform random.\n      if (x != null) y = x, x = null;\n\n      // Otherwise, generate a new x and y.\n      else do {\n        x = source() * 2 - 1;\n        y = source() * 2 - 1;\n        r = x * x + y * y;\n      } while (!r || r > 1);\n\n      return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n    };\n  }\n\n  randomNormal.source = sourceRandomNormal;\n\n  return randomNormal;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/normal.js?");

/***/ }),

/***/ "./node_modules/d3-random/src/uniform.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-random/src/uniform.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ \"./node_modules/d3-random/src/defaultSource.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function sourceRandomUniform(source) {\n  function randomUniform(min, max) {\n    min = min == null ? 0 : +min;\n    max = max == null ? 1 : +max;\n    if (arguments.length === 1) max = min, min = 0;\n    else max -= min;\n    return function() {\n      return source() * max + min;\n    };\n  }\n\n  randomUniform.source = sourceRandomUniform;\n\n  return randomUniform;\n})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-random/src/uniform.js?");

/***/ }),

/***/ "./node_modules/d3-request/index.js":
/*!******************************************!*\
  !*** ./node_modules/d3-request/index.js ***!
  \******************************************/
/*! exports provided: request, html, json, text, xml, csv, tsv */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/request */ \"./node_modules/d3-request/src/request.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"request\", function() { return _src_request__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/html */ \"./node_modules/d3-request/src/html.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return _src_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/json */ \"./node_modules/d3-request/src/json.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return _src_json__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/text */ \"./node_modules/d3-request/src/text.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return _src_text__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_xml__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/xml */ \"./node_modules/d3-request/src/xml.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return _src_xml__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_csv__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/csv */ \"./node_modules/d3-request/src/csv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return _src_csv__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_tsv__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/tsv */ \"./node_modules/d3-request/src/tsv.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return _src_tsv__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/index.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/csv.js":
/*!********************************************!*\
  !*** ./node_modules/d3-request/src/csv.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/index.js\");\n/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dsv */ \"./node_modules/d3-request/src/dsv.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_dsv__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"text/csv\", d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"csvParse\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/csv.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/dsv.js":
/*!********************************************!*\
  !*** ./node_modules/d3-request/src/dsv.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./request */ \"./node_modules/d3-request/src/request.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(defaultMimeType, parse) {\n  return function(url, row, callback) {\n    if (arguments.length < 3) callback = row, row = null;\n    var r = Object(_request__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(url).mimeType(defaultMimeType);\n    r.row = function(_) { return arguments.length ? r.response(responseOf(parse, row = _)) : row; };\n    r.row(row);\n    return callback ? r.get(callback) : r;\n  };\n});\n\nfunction responseOf(parse, row) {\n  return function(request) {\n    return parse(request.responseText, row);\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/dsv.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/html.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-request/src/html.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ \"./node_modules/d3-request/src/type.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"text/html\", function(xhr) {\n  return document.createRange().createContextualFragment(xhr.responseText);\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/html.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/json.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-request/src/json.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ \"./node_modules/d3-request/src/type.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"application/json\", function(xhr) {\n  return JSON.parse(xhr.responseText);\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/json.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/request.js":
/*!************************************************!*\
  !*** ./node_modules/d3-request/src/request.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/index.js\");\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(url, callback) {\n  var request,\n      event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_1__[\"dispatch\"])(\"beforesend\", \"progress\", \"load\", \"error\"),\n      mimeType,\n      headers = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__[\"map\"])(),\n      xhr = new XMLHttpRequest,\n      user = null,\n      password = null,\n      response,\n      responseType,\n      timeout = 0;\n\n  // If IE does not support CORS, use XDomainRequest.\n  if (typeof XDomainRequest !== \"undefined\"\n      && !(\"withCredentials\" in xhr)\n      && /^(http(s)?:)?\\/\\//.test(url)) xhr = new XDomainRequest;\n\n  \"onload\" in xhr\n      ? xhr.onload = xhr.onerror = xhr.ontimeout = respond\n      : xhr.onreadystatechange = function(o) { xhr.readyState > 3 && respond(o); };\n\n  function respond(o) {\n    var status = xhr.status, result;\n    if (!status && hasResponse(xhr)\n        || status >= 200 && status < 300\n        || status === 304) {\n      if (response) {\n        try {\n          result = response.call(request, xhr);\n        } catch (e) {\n          event.call(\"error\", request, e);\n          return;\n        }\n      } else {\n        result = xhr;\n      }\n      event.call(\"load\", request, result);\n    } else {\n      event.call(\"error\", request, o);\n    }\n  }\n\n  xhr.onprogress = function(e) {\n    event.call(\"progress\", request, e);\n  };\n\n  request = {\n    header: function(name, value) {\n      name = (name + \"\").toLowerCase();\n      if (arguments.length < 2) return headers.get(name);\n      if (value == null) headers.remove(name);\n      else headers.set(name, value + \"\");\n      return request;\n    },\n\n    // If mimeType is non-null and no Accept header is set, a default is used.\n    mimeType: function(value) {\n      if (!arguments.length) return mimeType;\n      mimeType = value == null ? null : value + \"\";\n      return request;\n    },\n\n    // Specifies what type the response value should take;\n    // for instance, arraybuffer, blob, document, or text.\n    responseType: function(value) {\n      if (!arguments.length) return responseType;\n      responseType = value;\n      return request;\n    },\n\n    timeout: function(value) {\n      if (!arguments.length) return timeout;\n      timeout = +value;\n      return request;\n    },\n\n    user: function(value) {\n      return arguments.length < 1 ? user : (user = value == null ? null : value + \"\", request);\n    },\n\n    password: function(value) {\n      return arguments.length < 1 ? password : (password = value == null ? null : value + \"\", request);\n    },\n\n    // Specify how to convert the response content to a specific type;\n    // changes the callback value on \"load\" events.\n    response: function(value) {\n      response = value;\n      return request;\n    },\n\n    // Alias for send(\"GET\", …).\n    get: function(data, callback) {\n      return request.send(\"GET\", data, callback);\n    },\n\n    // Alias for send(\"POST\", …).\n    post: function(data, callback) {\n      return request.send(\"POST\", data, callback);\n    },\n\n    // If callback is non-null, it will be used for error and load events.\n    send: function(method, data, callback) {\n      xhr.open(method, url, true, user, password);\n      if (mimeType != null && !headers.has(\"accept\")) headers.set(\"accept\", mimeType + \",*/*\");\n      if (xhr.setRequestHeader) headers.each(function(value, name) { xhr.setRequestHeader(name, value); });\n      if (mimeType != null && xhr.overrideMimeType) xhr.overrideMimeType(mimeType);\n      if (responseType != null) xhr.responseType = responseType;\n      if (timeout > 0) xhr.timeout = timeout;\n      if (callback == null && typeof data === \"function\") callback = data, data = null;\n      if (callback != null && callback.length === 1) callback = fixCallback(callback);\n      if (callback != null) request.on(\"error\", callback).on(\"load\", function(xhr) { callback(null, xhr); });\n      event.call(\"beforesend\", request, xhr);\n      xhr.send(data == null ? null : data);\n      return request;\n    },\n\n    abort: function() {\n      xhr.abort();\n      return request;\n    },\n\n    on: function() {\n      var value = event.on.apply(event, arguments);\n      return value === event ? request : value;\n    }\n  };\n\n  if (callback != null) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    return request.get(callback);\n  }\n\n  return request;\n});\n\nfunction fixCallback(callback) {\n  return function(error, xhr) {\n    callback(error == null ? xhr : null);\n  };\n}\n\nfunction hasResponse(xhr) {\n  var type = xhr.responseType;\n  return type && type !== \"text\"\n      ? xhr.response // null on error\n      : xhr.responseText; // \"\" on error\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/request.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/text.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-request/src/text.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ \"./node_modules/d3-request/src/type.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"text/plain\", function(xhr) {\n  return xhr.responseText;\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/text.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/tsv.js":
/*!********************************************!*\
  !*** ./node_modules/d3-request/src/tsv.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/index.js\");\n/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dsv */ \"./node_modules/d3-request/src/dsv.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_dsv__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"text/tab-separated-values\", d3_dsv__WEBPACK_IMPORTED_MODULE_0__[\"tsvParse\"]));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/tsv.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/type.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-request/src/type.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./request */ \"./node_modules/d3-request/src/request.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(defaultMimeType, response) {\n  return function(url, callback) {\n    var r = Object(_request__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(url).mimeType(defaultMimeType).response(response);\n    if (callback != null) {\n      if (typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n      return r.get(callback);\n    }\n    return r;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/type.js?");

/***/ }),

/***/ "./node_modules/d3-request/src/xml.js":
/*!********************************************!*\
  !*** ./node_modules/d3-request/src/xml.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ \"./node_modules/d3-request/src/type.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"application/xml\", function(xhr) {\n  var xml = xhr.responseXML;\n  if (!xml) throw new Error(\"parse error\");\n  return xml;\n}));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-request/src/xml.js?");

/***/ }),

/***/ "./node_modules/d3-scale/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-scale/index.js ***!
  \****************************************/
/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, schemeCategory10, schemeCategory20b, schemeCategory20c, schemeCategory20, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, scaleSequential */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_band__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/band */ \"./node_modules/d3-scale/src/band.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return _src_band__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return _src_band__WEBPACK_IMPORTED_MODULE_0__[\"point\"]; });\n\n/* harmony import */ var _src_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/identity */ \"./node_modules/d3-scale/src/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return _src_identity__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/linear */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return _src_linear__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/log */ \"./node_modules/d3-scale/src/log.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return _src_log__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_ordinal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/ordinal */ \"./node_modules/d3-scale/src/ordinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return _src_ordinal__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return _src_ordinal__WEBPACK_IMPORTED_MODULE_4__[\"implicit\"]; });\n\n/* harmony import */ var _src_pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/pow */ \"./node_modules/d3-scale/src/pow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return _src_pow__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return _src_pow__WEBPACK_IMPORTED_MODULE_5__[\"sqrt\"]; });\n\n/* harmony import */ var _src_quantile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/quantile */ \"./node_modules/d3-scale/src/quantile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return _src_quantile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_quantize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/quantize */ \"./node_modules/d3-scale/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return _src_quantize__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_threshold__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/threshold */ \"./node_modules/d3-scale/src/threshold.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return _src_threshold__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_time__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/time */ \"./node_modules/d3-scale/src/time.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return _src_time__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_utcTime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/utcTime */ \"./node_modules/d3-scale/src/utcTime.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return _src_utcTime__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_category10__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/category10 */ \"./node_modules/d3-scale/src/category10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return _src_category10__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_category20b__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/category20b */ \"./node_modules/d3-scale/src/category20b.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20b\", function() { return _src_category20b__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_category20c__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/category20c */ \"./node_modules/d3-scale/src/category20c.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20c\", function() { return _src_category20c__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_category20__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/category20 */ \"./node_modules/d3-scale/src/category20.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20\", function() { return _src_category20__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _src_cubehelix__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/cubehelix */ \"./node_modules/d3-scale/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return _src_cubehelix__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _src_rainbow__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/rainbow */ \"./node_modules/d3-scale/src/rainbow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return _src_rainbow__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return _src_rainbow__WEBPACK_IMPORTED_MODULE_16__[\"warm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return _src_rainbow__WEBPACK_IMPORTED_MODULE_16__[\"cool\"]; });\n\n/* harmony import */ var _src_viridis__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./src/viridis */ \"./node_modules/d3-scale/src/viridis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return _src_viridis__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return _src_viridis__WEBPACK_IMPORTED_MODULE_17__[\"magma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return _src_viridis__WEBPACK_IMPORTED_MODULE_17__[\"inferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return _src_viridis__WEBPACK_IMPORTED_MODULE_17__[\"plasma\"]; });\n\n/* harmony import */ var _src_sequential__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./src/sequential */ \"./node_modules/d3-scale/src/sequential.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return _src_sequential__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/index.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/array.js":
/*!********************************************!*\
  !*** ./node_modules/d3-scale/src/array.js ***!
  \********************************************/
/*! exports provided: map, slice */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar array = Array.prototype;\n\nvar map = array.map;\nvar slice = array.slice;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/band.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-scale/src/band.js ***!
  \*******************************************/
/*! exports provided: default, point */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return band; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ordinal */ \"./node_modules/d3-scale/src/ordinal.js\");\n\n\n\nfunction band() {\n  var scale = Object(_ordinal__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      range = [0, 1],\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = range[1] < range[0],\n        start = range[reverse - 0],\n        stop = range[1 - reverse];\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"range\"])(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = [+_[0], +_[1]], round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band()\n        .domain(domain())\n        .range(range)\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return rescale();\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nfunction point() {\n  return pointish(band().paddingInner(1));\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/band.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/category10.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-scale/src/category10.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/d3-scale/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/category10.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/category20.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-scale/src/category20.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/d3-scale/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5\"));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/category20.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/category20b.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-scale/src/category20b.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/d3-scale/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6\"));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/category20b.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/category20c.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-scale/src/category20c.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/d3-scale/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9\"));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/category20c.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/colors.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-scale/src/colors.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(s) {\n  return s.match(/.{6}/g).map(function(x) {\n    return \"#\" + x;\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/colors.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-scale/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/continuous.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-scale/src/continuous.js ***!
  \*************************************************/
/*! exports provided: deinterpolateLinear, copy, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deinterpolateLinear\", function() { return deinterpolateLinear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return continuous; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-scale/src/constant.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-scale/src/number.js\");\n\n\n\n\n\n\nvar unit = [0, 1];\n\nfunction deinterpolateLinear(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : Object(_constant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(b);\n}\n\nfunction deinterpolateClamp(deinterpolate) {\n  return function(a, b) {\n    var d = deinterpolate(a = +a, b = +b);\n    return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };\n  };\n}\n\nfunction reinterpolateClamp(reinterpolate) {\n  return function(a, b) {\n    var r = reinterpolate(a = +a, b = +b);\n    return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };\n  };\n}\n\nfunction bimap(domain, range, deinterpolate, reinterpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);\n  else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, deinterpolate, reinterpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = deinterpolate(domain[i], domain[i + 1]);\n    r[i] = reinterpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp());\n}\n\n// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].\nfunction continuous(deinterpolate, reinterpolate) {\n  var domain = unit,\n      range = unit,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n      clamp = false,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n  }\n\n  scale.invert = function(y) {\n    return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, rescale()) : clamp;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  return rescale();\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/continuous.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/cubehelix.js":
/*!************************************************!*\
  !*** ./node_modules/d3-scale/src/cubehelix.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-240, 0.5, 1.0)));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/cubehelix.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/identity.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-scale/src/identity.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return identity; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ \"./node_modules/d3-scale/src/number.js\");\n\n\n\n\nfunction identity() {\n  var domain = [0, 1];\n\n  function scale(x) {\n    return +x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_0__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_2__[\"default\"]), scale) : domain.slice();\n  };\n\n  scale.copy = function() {\n    return identity().domain(domain);\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_1__[\"linearish\"])(scale);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/linear.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-scale/src/linear.js ***!
  \*********************************************/
/*! exports provided: linearish, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linearish\", function() { return linearish; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return linear; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./continuous */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat */ \"./node_modules/d3-scale/src/tickFormat.js\");\n\n\n\n\n\nfunction linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return Object(_tickFormat__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(domain(), count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickIncrement\"])(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nfunction linear() {\n  var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_continuous__WEBPACK_IMPORTED_MODULE_2__[\"deinterpolateLinear\"], d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]);\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_2__[\"copy\"])(scale, linear());\n  };\n\n  return linearish(scale);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/linear.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/log.js":
/*!******************************************!*\
  !*** ./node_modules/d3-scale/src/log.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return log; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-scale/src/constant.js\");\n/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nice */ \"./node_modules/d3-scale/src/nice.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous */ \"./node_modules/d3-scale/src/continuous.js\");\n\n\n\n\n\n\nfunction deinterpolate(a, b) {\n  return (b = Math.log(b / a))\n      ? function(x) { return Math.log(x / a) / b; }\n      : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b);\n}\n\nfunction reinterpolate(a, b) {\n  return a < 0\n      ? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }\n      : function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n  return function(x) {\n    return -f(-x);\n  };\n}\n\nfunction log() {\n  var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(deinterpolate, reinterpolate).domain([1, 10]),\n      domain = scale.domain,\n      base = 10,\n      logs = logp(10),\n      pows = powp(10);\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = function(count) {\n    var d = domain(),\n        u = d[0],\n        v = d[d.length - 1],\n        r;\n\n    if (r = v < u) i = u, u = v, v = i;\n\n    var i = logs(u),\n        j = logs(v),\n        p,\n        k,\n        t,\n        n = count == null ? 10 : +count,\n        z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.round(i) - 1, j = Math.round(j) + 1;\n      if (u > 0) for (; i < j; ++i) {\n        for (k = 1, p = pows(i); k < base; ++k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i < j; ++i) {\n        for (k = base - 1, p = pows(i); k >= 1; --k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n    } else {\n      z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ticks\"])(i, j, Math.min(j - i, n)).map(pows);\n    }\n\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n    if (typeof specifier !== \"function\") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n    if (count === Infinity) return specifier;\n    if (count == null) count = 10;\n    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return function(d) {\n      var i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = function() {\n    return domain(Object(_nice__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(domain(), {\n      floor: function(x) { return pows(Math.floor(logs(x))); },\n      ceil: function(x) { return pows(Math.ceil(logs(x))); }\n    }));\n  };\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_4__[\"copy\"])(scale, log().base(base));\n  };\n\n  return scale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/log.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/nice.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-scale/src/nice.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/nice.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/number.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-scale/src/number.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return +x;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/number.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/ordinal.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-scale/src/ordinal.js ***!
  \**********************************************/
/*! exports provided: implicit, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"implicit\", function() { return implicit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ordinal; });\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n\n\n\nvar implicit = {name: \"implicit\"};\n\nfunction ordinal(range) {\n  var index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__[\"map\"])(),\n      domain = [],\n      unknown = implicit;\n\n  range = range == null ? [] : _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(range);\n\n  function scale(d) {\n    var key = d + \"\", i = index.get(key);\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__[\"map\"])();\n    var i = -1, n = _.length, d, key;\n    while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return scale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/ordinal.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/pow.js":
/*!******************************************!*\
  !*** ./node_modules/d3-scale/src/pow.js ***!
  \******************************************/
/*! exports provided: default, sqrt */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-scale/src/constant.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ \"./node_modules/d3-scale/src/linear.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./continuous */ \"./node_modules/d3-scale/src/continuous.js\");\n\n\n\n\nfunction raise(x, exponent) {\n  return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n}\n\nfunction pow() {\n  var exponent = 1,\n      scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(deinterpolate, reinterpolate),\n      domain = scale.domain;\n\n  function deinterpolate(a, b) {\n    return (b = raise(b, exponent) - (a = raise(a, exponent)))\n        ? function(x) { return (raise(x, exponent) - a) / b; }\n        : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(b);\n  }\n\n  function reinterpolate(a, b) {\n    b = raise(b, exponent) - (a = raise(a, exponent));\n    return function(t) { return raise(a + b * t, 1 / exponent); };\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, domain(domain())) : exponent;\n  };\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_2__[\"copy\"])(scale, pow().exponent(exponent));\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_1__[\"linearish\"])(scale);\n}\n\nfunction sqrt() {\n  return pow().exponent(0.5);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/pow.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/quantile.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-scale/src/quantile.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantile; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n\n\n\nfunction quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [];\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"quantile\"])(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    if (!isNaN(x = +x)) return range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"ascending\"]);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), rescale()) : range.slice();\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range);\n  };\n\n  return scale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/quantile.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/quantize.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-scale/src/quantize.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return quantize; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ \"./node_modules/d3-scale/src/linear.js\");\n\n\n\n\nfunction quantize() {\n  var x0 = 0,\n      x1 = 1,\n      n = 1,\n      domain = [0.5],\n      range = [0, 1];\n\n  function scale(x) {\n    if (x <= x) return range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)];\n  }\n\n  function rescale() {\n    var i = -1;\n    domain = new Array(n);\n    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n    return scale;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (n = (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_)).length - 1, rescale()) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN]\n        : i < 1 ? [x0, domain[0]]\n        : i >= n ? [domain[n - 1], x1]\n        : [domain[i - 1], domain[i]];\n  };\n\n  scale.copy = function() {\n    return quantize()\n        .domain([x0, x1])\n        .range(range);\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_2__[\"linearish\"])(scale);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/quantize.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/rainbow.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-scale/src/rainbow.js ***!
  \**********************************************/
/*! exports provided: warm, cool, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"warm\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cool\", function() { return cool; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n\n\n\nvar warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar rainbow = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  rainbow.h = 360 * t - 100;\n  rainbow.s = 1.5 - 1.5 * ts;\n  rainbow.l = 0.8 - 0.9 * ts;\n  return rainbow + \"\";\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/rainbow.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/sequential.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-scale/src/sequential.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return sequential; });\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ \"./node_modules/d3-scale/src/linear.js\");\n\n\nfunction sequential(interpolator) {\n  var x0 = 0,\n      x1 = 1,\n      clamp = false;\n\n  function scale(x) {\n    var t = (x - x0) / (x1 - x0);\n    return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (x0 = +_[0], x1 = +_[1], scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.copy = function() {\n    return sequential(interpolator).domain([x0, x1]).clamp(clamp);\n  };\n\n  return Object(_linear__WEBPACK_IMPORTED_MODULE_0__[\"linearish\"])(scale);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/sequential.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/threshold.js":
/*!************************************************!*\
  !*** ./node_modules/d3-scale/src/threshold.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return threshold; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n\n\n\nfunction threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      n = 1;\n\n  function scale(x) {\n    if (x <= x) return range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisect\"])(domain, x, 0, n)];\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range);\n  };\n\n  return scale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/threshold.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/tickFormat.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-scale/src/tickFormat.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(domain, count, specifier) {\n  var start = domain[0],\n      stop = domain[domain.length - 1],\n      step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, count == null ? 10 : count),\n      precision;\n  specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatSpecifier\"])(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionPrefix\"])(step, value))) specifier.precision = precision;\n      return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"formatPrefix\"])(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionRound\"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"precisionFixed\"])(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__[\"format\"])(specifier);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/tickFormat.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/time.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-scale/src/time.js ***!
  \*******************************************/
/*! exports provided: calendar, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calendar\", function() { return calendar; });\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/index.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-scale/src/array.js\");\n/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./continuous */ \"./node_modules/d3-scale/src/continuous.js\");\n/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nice */ \"./node_modules/d3-scale/src/nice.js\");\n\n\n\n\n\n\n\n\nvar durationSecond = 1000,\n    durationMinute = durationSecond * 60,\n    durationHour = durationMinute * 60,\n    durationDay = durationHour * 24,\n    durationWeek = durationDay * 7,\n    durationMonth = durationDay * 30,\n    durationYear = durationDay * 365;\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nfunction calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n  var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_continuous__WEBPACK_IMPORTED_MODULE_5__[\"deinterpolateLinear\"], d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  var tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  function tickInterval(interval, start, stop, step) {\n    if (interval == null) interval = 10;\n\n    // If a desired tick count is specified, pick a reasonable tick interval\n    // based on the extent of the domain and a rough estimate of tick size.\n    // Otherwise, assume interval is already a time interval and use it.\n    if (typeof interval === \"number\") {\n      var target = Math.abs(stop - start) / interval,\n          i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"bisector\"])(function(i) { return i[2]; }).right(tickIntervals, target);\n      if (i === tickIntervals.length) {\n        step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start / durationYear, stop / durationYear, interval);\n        interval = year;\n      } else if (i) {\n        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n        step = i[1];\n        interval = i[0];\n      } else {\n        step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__[\"tickStep\"])(start, stop, interval), 1);\n        interval = millisecond;\n      }\n    }\n\n    return step == null ? interval : interval.every(step);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(_array__WEBPACK_IMPORTED_MODULE_4__[\"map\"].call(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval, step) {\n    var d = domain(),\n        t0 = d[0],\n        t1 = d[d.length - 1],\n        r = t1 < t0,\n        t;\n    if (r) t = t0, t0 = t1, t1 = t;\n    t = tickInterval(interval, t0, t1, step);\n    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n    return r ? t.reverse() : t;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval, step) {\n    var d = domain();\n    return (interval = tickInterval(interval, d[0], d[d.length - 1], step))\n        ? domain(Object(_nice__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(d, interval))\n        : scale;\n  };\n\n  scale.copy = function() {\n    return Object(_continuous__WEBPACK_IMPORTED_MODULE_5__[\"copy\"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n  };\n\n  return scale;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return calendar(d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeYear\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeDay\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeHour\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeSecond\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"timeMillisecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_3__[\"timeFormat\"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/time.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/utcTime.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-scale/src/utcTime.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time */ \"./node_modules/d3-scale/src/time.js\");\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/index.js\");\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/index.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return Object(_time__WEBPACK_IMPORTED_MODULE_0__[\"calendar\"])(d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcYear\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMonth\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcWeek\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcDay\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcHour\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMinute\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcSecond\"], d3_time__WEBPACK_IMPORTED_MODULE_2__[\"utcMillisecond\"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__[\"utcFormat\"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/utcTime.js?");

/***/ }),

/***/ "./node_modules/d3-scale/src/viridis.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-scale/src/viridis.js ***!
  \**********************************************/
/*! exports provided: default, magma, inferno, plasma */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"magma\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inferno\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"plasma\", function() { return plasma; });\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/d3-scale/src/colors.js\");\n\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ramp(Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(_colors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-scale/src/viridis.js?");

/***/ }),

/***/ "./node_modules/d3-selection/index.js":
/*!********************************************!*\
  !*** ./node_modules/d3-selection/index.js ***!
  \********************************************/
/*! exports provided: create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/create */ \"./node_modules/d3-selection/src/create.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return _src_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return _src_creator__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/local */ \"./node_modules/d3-selection/src/local.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return _src_local__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/matcher */ \"./node_modules/d3-selection/src/matcher.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return _src_matcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/mouse */ \"./node_modules/d3-selection/src/mouse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mouse\", function() { return _src_mouse__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return _src_namespace__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return _src_namespaces__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/point */ \"./node_modules/d3-selection/src/point.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clientPoint\", function() { return _src_point__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _src_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/select */ \"./node_modules/d3-selection/src/select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return _src_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _src_selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/selectAll */ \"./node_modules/d3-selection/src/selectAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return _src_selectAll__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return _src_selection_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/selector */ \"./node_modules/d3-selection/src/selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return _src_selector__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/selectorAll */ \"./node_modules/d3-selection/src/selectorAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return _src_selectorAll__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/selection/style */ \"./node_modules/d3-selection/src/selection/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _src_selection_style__WEBPACK_IMPORTED_MODULE_13__[\"styleValue\"]; });\n\n/* harmony import */ var _src_touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/touch */ \"./node_modules/d3-selection/src/touch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touch\", function() { return _src_touch__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _src_touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/touches */ \"./node_modules/d3-selection/src/touches.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touches\", function() { return _src_touches__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _src_window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/window */ \"./node_modules/d3-selection/src/window.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return _src_window__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _src_selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./src/selection/on */ \"./node_modules/d3-selection/src/selection/on.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return _src_selection_on__WEBPACK_IMPORTED_MODULE_17__[\"event\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return _src_selection_on__WEBPACK_IMPORTED_MODULE_17__[\"customEvent\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/index.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/constant.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-selection/src/constant.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/create.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-selection/src/create.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-selection/src/select.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return Object(_select__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name).call(document.documentElement));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/create.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/creator.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-selection/src/creator.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n\n\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__[\"xhtml\"]\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/creator.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/local.js":
/*!************************************************!*\
  !*** ./node_modules/d3-selection/src/local.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return local; });\nvar nextId = 0;\n\nfunction local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/local.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/matcher.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-selection/src/matcher.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar matcher = function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n};\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!element.matches) {\n    var vendorMatches = element.webkitMatchesSelector\n        || element.msMatchesSelector\n        || element.mozMatchesSelector\n        || element.oMatchesSelector;\n    matcher = function(selector) {\n      return function() {\n        return vendorMatches.call(this, selector);\n      };\n    };\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (matcher);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/matcher.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/mouse.js":
/*!************************************************!*\
  !*** ./node_modules/d3-selection/src/mouse.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n  if (event.changedTouches) event = event.changedTouches[0];\n  return Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, event);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/mouse.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/namespace.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-selection/src/namespace.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ \"./node_modules/d3-selection/src/namespaces.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return _namespaces__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__[\"default\"][prefix], local: name} : name;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/namespace.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/namespaces.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-selection/src/namespaces.js ***!
  \*****************************************************/
/*! exports provided: xhtml, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"xhtml\", function() { return xhtml; });\nvar xhtml = \"http://www.w3.org/1999/xhtml\";\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/namespaces.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/point.js":
/*!************************************************!*\
  !*** ./node_modules/d3-selection/src/point.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, event) {\n  var svg = node.ownerSVGElement || node;\n\n  if (svg.createSVGPoint) {\n    var point = svg.createSVGPoint();\n    point.x = event.clientX, point.y = event.clientY;\n    point = point.matrixTransform(node.getScreenCTM().inverse());\n    return [point.x, point.y];\n  }\n\n  var rect = node.getBoundingClientRect();\n  return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/point.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/select.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-selection/src/select.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[document.querySelector(selector)]], [document.documentElement])\n      : new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/select.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selectAll.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-selection/src/selectAll.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return typeof selector === \"string\"\n      ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([document.querySelectorAll(selector)], [document.documentElement])\n      : new _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__[\"root\"]);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selectAll.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/append.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/append.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ \"./node_modules/d3-selection/src/creator.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var create = typeof name === \"function\" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/append.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/attr.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/attr.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace */ \"./node_modules/d3-selection/src/namespace.js\");\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/attr.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/call.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/call.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/call.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/classed.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/classed.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/classed.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/clone.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/clone.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction selection_cloneShallow() {\n  return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n  return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/clone.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/data.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/data.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter */ \"./node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ \"./node_modules/d3-selection/src/constant.js\");\n\n\n\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__[\"EnterNode\"](parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/data.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/datum.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/datum.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/datum.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/dispatch.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/dispatch.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ \"./node_modules/d3-selection/src/window.js\");\n\n\nfunction dispatchEvent(node, type, params) {\n  var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/dispatch.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/each.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/each.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/each.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/empty.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/empty.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return !this.node();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/empty.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/enter.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/enter.js ***!
  \**********************************************************/
/*! exports provided: default, EnterNode */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnterNode\", function() { return EnterNode; });\n/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ \"./node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\nfunction EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/enter.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/exit.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/exit.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ \"./node_modules/d3-selection/src/selection/sparse.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]), this._parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/exit.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/filter.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/filter.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher */ \"./node_modules/d3-selection/src/matcher.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/filter.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/html.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/html.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/html.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/index.js ***!
  \**********************************************************/
/*! exports provided: root, Selection, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-selection/src/selection/select.js\");\n/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll */ \"./node_modules/d3-selection/src/selection/selectAll.js\");\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ \"./node_modules/d3-selection/src/selection/filter.js\");\n/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data */ \"./node_modules/d3-selection/src/selection/data.js\");\n/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enter */ \"./node_modules/d3-selection/src/selection/enter.js\");\n/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exit */ \"./node_modules/d3-selection/src/selection/exit.js\");\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./merge */ \"./node_modules/d3-selection/src/selection/merge.js\");\n/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./order */ \"./node_modules/d3-selection/src/selection/order.js\");\n/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./sort */ \"./node_modules/d3-selection/src/selection/sort.js\");\n/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./call */ \"./node_modules/d3-selection/src/selection/call.js\");\n/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./nodes */ \"./node_modules/d3-selection/src/selection/nodes.js\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./node */ \"./node_modules/d3-selection/src/selection/node.js\");\n/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./size */ \"./node_modules/d3-selection/src/selection/size.js\");\n/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./empty */ \"./node_modules/d3-selection/src/selection/empty.js\");\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./each */ \"./node_modules/d3-selection/src/selection/each.js\");\n/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./attr */ \"./node_modules/d3-selection/src/selection/attr.js\");\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./style */ \"./node_modules/d3-selection/src/selection/style.js\");\n/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./property */ \"./node_modules/d3-selection/src/selection/property.js\");\n/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./classed */ \"./node_modules/d3-selection/src/selection/classed.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-selection/src/selection/text.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./html */ \"./node_modules/d3-selection/src/selection/html.js\");\n/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./raise */ \"./node_modules/d3-selection/src/selection/raise.js\");\n/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./lower */ \"./node_modules/d3-selection/src/selection/lower.js\");\n/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./append */ \"./node_modules/d3-selection/src/selection/append.js\");\n/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./insert */ \"./node_modules/d3-selection/src/selection/insert.js\");\n/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./remove */ \"./node_modules/d3-selection/src/selection/remove.js\");\n/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./clone */ \"./node_modules/d3-selection/src/selection/clone.js\");\n/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./datum */ \"./node_modules/d3-selection/src/selection/datum.js\");\n/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./on */ \"./node_modules/d3-selection/src/selection/on.js\");\n/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./dispatch */ \"./node_modules/d3-selection/src/selection/dispatch.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar root = [null];\n\nfunction Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: _select__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  filter: _filter__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  data: _data__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  enter: _enter__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  exit: _exit__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  merge: _merge__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  order: _order__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  sort: _sort__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  call: _call__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  nodes: _nodes__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  node: _node__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  size: _size__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  empty: _empty__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  each: _each__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  attr: _attr__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  style: _style__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  property: _property__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  classed: _classed__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n  text: _text__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n  html: _html__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n  raise: _raise__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n  lower: _lower__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n  append: _append__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n  insert: _insert__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n  remove: _remove__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n  clone: _clone__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n  datum: _datum__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n  on: _on__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n  dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_29__[\"default\"]\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (selection);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/index.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/insert.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/insert.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ \"./node_modules/d3-selection/src/creator.js\");\n/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ \"./node_modules/d3-selection/src/selector.js\");\n\n\n\nfunction constantNull() {\n  return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, before) {\n  var create = typeof name === \"function\" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/insert.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/lower.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/lower.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(lower);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/lower.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/merge.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/merge.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](merges, this._parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/merge.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/node.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/node.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/node.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/nodes.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/nodes.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/nodes.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/on.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/on.js ***!
  \*******************************************************/
/*! exports provided: event, default, customEvent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return event; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return customEvent; });\nvar filterEvents = {};\n\nvar event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n});\n\nfunction customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/on.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/order.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/order.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/order.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/property.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/property.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/property.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/raise.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/raise.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(raise);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/raise.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/remove.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/remove.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.each(remove);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/remove.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/select.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/select.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ \"./node_modules/d3-selection/src/selector.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, this._parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/select.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/selectAll.js":
/*!**************************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/selectAll.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selectorAll */ \"./node_modules/d3-selection/src/selectorAll.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  if (typeof select !== \"function\") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](subgroups, parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/selectAll.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/size.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/size.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/size.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/sort.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/sort.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-selection/src/selection/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"](sortgroups, this._parents).order();\n});\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/sort.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/sparse.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/sparse.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(update) {\n  return new Array(update.length);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/sparse.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/style.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/style.js ***!
  \**********************************************************/
/*! exports provided: default, styleValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleValue\", function() { return styleValue; });\n/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ \"./node_modules/d3-selection/src/window.js\");\n\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n});\n\nfunction styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || Object(_window__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/style.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selection/text.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-selection/src/selection/text.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selection/text.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selector.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-selection/src/selector.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction none() {}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selector.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/selectorAll.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-selection/src/selectorAll.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction empty() {\n  return [];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/selectorAll.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/sourceEvent.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-selection/src/sourceEvent.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/on */ \"./node_modules/d3-selection/src/selection/on.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__[\"event\"], source;\n  while (source = current.sourceEvent) current = source;\n  return current;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/sourceEvent.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/touch.js":
/*!************************************************!*\
  !*** ./node_modules/d3-selection/src/touch.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, touches, identifier) {\n  if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])().changedTouches;\n\n  for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n    if ((touch = touches[i]).identifier === identifier) {\n      return Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, touch);\n    }\n  }\n\n  return null;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/touch.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/touches.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-selection/src/touches.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ \"./node_modules/d3-selection/src/sourceEvent.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-selection/src/point.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, touches) {\n  if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"])().touches;\n\n  for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {\n    points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, touches[i]);\n  }\n\n  return points;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/touches.js?");

/***/ }),

/***/ "./node_modules/d3-selection/src/window.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-selection/src/window.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-selection/src/window.js?");

/***/ }),

/***/ "./node_modules/d3-shape/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-shape/index.js ***!
  \****************************************/
/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_arc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/arc */ \"./node_modules/d3-shape/src/arc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return _src_arc__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_area__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/area */ \"./node_modules/d3-shape/src/area.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return _src_area__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_line__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/line */ \"./node_modules/d3-shape/src/line.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return _src_line__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_pie__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/pie */ \"./node_modules/d3-shape/src/pie.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return _src_pie__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _src_areaRadial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/areaRadial */ \"./node_modules/d3-shape/src/areaRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return _src_areaRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return _src_areaRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _src_lineRadial__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/lineRadial */ \"./node_modules/d3-shape/src/lineRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return _src_lineRadial__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return _src_lineRadial__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _src_pointRadial__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/pointRadial */ \"./node_modules/d3-shape/src/pointRadial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return _src_pointRadial__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _src_link_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/link/index */ \"./node_modules/d3-shape/src/link/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return _src_link_index__WEBPACK_IMPORTED_MODULE_7__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return _src_link_index__WEBPACK_IMPORTED_MODULE_7__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return _src_link_index__WEBPACK_IMPORTED_MODULE_7__[\"linkRadial\"]; });\n\n/* harmony import */ var _src_symbol__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/symbol */ \"./node_modules/d3-shape/src/symbol.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return _src_symbol__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return _src_symbol__WEBPACK_IMPORTED_MODULE_8__[\"symbols\"]; });\n\n/* harmony import */ var _src_symbol_circle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/symbol/circle */ \"./node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return _src_symbol_circle__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_cross__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/symbol/cross */ \"./node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return _src_symbol_cross__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_diamond__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/symbol/diamond */ \"./node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return _src_symbol_diamond__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_square__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/symbol/square */ \"./node_modules/d3-shape/src/symbol/square.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return _src_symbol_square__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_star__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/symbol/star */ \"./node_modules/d3-shape/src/symbol/star.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return _src_symbol_star__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_triangle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/symbol/triangle */ \"./node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return _src_symbol_triangle__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _src_symbol_wye__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./src/symbol/wye */ \"./node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return _src_symbol_wye__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _src_curve_basisClosed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./src/curve/basisClosed */ \"./node_modules/d3-shape/src/curve/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return _src_curve_basisClosed__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _src_curve_basisOpen__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./src/curve/basisOpen */ \"./node_modules/d3-shape/src/curve/basisOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return _src_curve_basisOpen__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _src_curve_basis__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./src/curve/basis */ \"./node_modules/d3-shape/src/curve/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return _src_curve_basis__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _src_curve_bundle__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./src/curve/bundle */ \"./node_modules/d3-shape/src/curve/bundle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return _src_curve_bundle__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _src_curve_cardinalClosed__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./src/curve/cardinalClosed */ \"./node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return _src_curve_cardinalClosed__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _src_curve_cardinalOpen__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./src/curve/cardinalOpen */ \"./node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return _src_curve_cardinalOpen__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _src_curve_cardinal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./src/curve/cardinal */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return _src_curve_cardinal__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _src_curve_catmullRomClosed__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./src/curve/catmullRomClosed */ \"./node_modules/d3-shape/src/curve/catmullRomClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return _src_curve_catmullRomClosed__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _src_curve_catmullRomOpen__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./src/curve/catmullRomOpen */ \"./node_modules/d3-shape/src/curve/catmullRomOpen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return _src_curve_catmullRomOpen__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _src_curve_catmullRom__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./src/curve/catmullRom */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return _src_curve_catmullRom__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _src_curve_linearClosed__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./src/curve/linearClosed */ \"./node_modules/d3-shape/src/curve/linearClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return _src_curve_linearClosed__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _src_curve_linear__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./src/curve/linear */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return _src_curve_linear__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony import */ var _src_curve_monotone__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./src/curve/monotone */ \"./node_modules/d3-shape/src/curve/monotone.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return _src_curve_monotone__WEBPACK_IMPORTED_MODULE_28__[\"monotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return _src_curve_monotone__WEBPACK_IMPORTED_MODULE_28__[\"monotoneY\"]; });\n\n/* harmony import */ var _src_curve_natural__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./src/curve/natural */ \"./node_modules/d3-shape/src/curve/natural.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return _src_curve_natural__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _src_curve_step__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./src/curve/step */ \"./node_modules/d3-shape/src/curve/step.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return _src_curve_step__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return _src_curve_step__WEBPACK_IMPORTED_MODULE_30__[\"stepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return _src_curve_step__WEBPACK_IMPORTED_MODULE_30__[\"stepBefore\"]; });\n\n/* harmony import */ var _src_stack__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./src/stack */ \"./node_modules/d3-shape/src/stack.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return _src_stack__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _src_offset_expand__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./src/offset/expand */ \"./node_modules/d3-shape/src/offset/expand.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return _src_offset_expand__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _src_offset_diverging__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./src/offset/diverging */ \"./node_modules/d3-shape/src/offset/diverging.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return _src_offset_diverging__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _src_offset_none__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./src/offset/none */ \"./node_modules/d3-shape/src/offset/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return _src_offset_none__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _src_offset_silhouette__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./src/offset/silhouette */ \"./node_modules/d3-shape/src/offset/silhouette.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return _src_offset_silhouette__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony import */ var _src_offset_wiggle__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./src/offset/wiggle */ \"./node_modules/d3-shape/src/offset/wiggle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return _src_offset_wiggle__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _src_order_ascending__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./src/order/ascending */ \"./node_modules/d3-shape/src/order/ascending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return _src_order_ascending__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _src_order_descending__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./src/order/descending */ \"./node_modules/d3-shape/src/order/descending.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return _src_order_descending__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _src_order_insideOut__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./src/order/insideOut */ \"./node_modules/d3-shape/src/order/insideOut.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return _src_order_insideOut__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _src_order_none__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./src/order/none */ \"./node_modules/d3-shape/src/order/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return _src_order_none__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _src_order_reverse__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./src/order/reverse */ \"./node_modules/d3-shape/src/order/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return _src_order_reverse__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n\n\n\n\n // Note: radialArea is deprecated!\n // Note: radialLine is deprecated!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/index.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/arc.js":
/*!******************************************!*\
  !*** ./node_modules/d3-shape/src/arc.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-shape/src/math.js\");\n\n\n\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"max\"])(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        a1 = endAngle.apply(this, arguments) - _math__WEBPACK_IMPORTED_MODULE_2__[\"halfPi\"],\n        da = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > _math__WEBPACK_IMPORTED_MODULE_2__[\"tau\"] - _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n      context.moveTo(r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a0), r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        context.moveTo(r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a1), r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(r0 * r0 + r1 * r1)),\n          rc = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"abs\"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var p0 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap)),\n            p1 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"asin\"])(rp / r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(ap));\n        if ((da0 -= p0 * 2) > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a01),\n          y01 = r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a01),\n          x10 = r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a10),\n          y10 = r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a10);\n\n      // Apply rounded corners?\n      if (rc > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        var x11 = r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a11),\n            y11 = r1 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a11),\n            x00 = r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a00),\n            y00 = r0 * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a00);\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"]) {\n          var oc = da0 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"] ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],\n              ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"acos\"])((ax * bx + ay * by) / (Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(ax * ax + ay * ay) * Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(bx * bx + by * by))) / 2),\n              lc = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sqrt\"])(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r0 - lc) / (kc - 1));\n          rc1 = Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"min\"])(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) || !(da0 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"])) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > _math__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y01, t0.x01), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y11, t1.x11), Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"atan2\"])(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math__WEBPACK_IMPORTED_MODULE_2__[\"pi\"] / 2;\n    return [Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"cos\"])(a) * r, Object(_math__WEBPACK_IMPORTED_MODULE_2__[\"sin\"])(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/arc.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/area.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-shape/src/area.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ \"./node_modules/d3-shape/src/line.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x0 = _point__WEBPACK_IMPORTED_MODULE_4__[\"x\"],\n      x1 = null,\n      y0 = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(0),\n      y1 = _point__WEBPACK_IMPORTED_MODULE_4__[\"y\"],\n      defined = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return Object(_line__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/area.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/areaRadial.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/areaRadial.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curve_radial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial */ \"./node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area */ \"./node_modules/d3-shape/src/area.js\");\n/* harmony import */ var _lineRadial__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial */ \"./node_modules/d3-shape/src/lineRadial.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var a = Object(_area__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function() { return Object(_lineRadial__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x0()); }, delete a.lineX0;\n  a.lineEndAngle = function() { return Object(_lineRadial__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(x1()); }, delete a.lineX1;\n  a.lineInnerRadius = function() { return Object(_lineRadial__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y0()); }, delete a.lineY0;\n  a.lineOuterRadius = function() { return Object(_lineRadial__WEBPACK_IMPORTED_MODULE_2__[\"lineRadial\"])(y1()); }, delete a.lineY1;\n\n  a.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return a;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/areaRadial.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/array.js":
/*!********************************************!*\
  !*** ./node_modules/d3-shape/src/array.js ***!
  \********************************************/
/*! exports provided: slice */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\nvar slice = Array.prototype.slice;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/array.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/constant.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-shape/src/constant.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function constant() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/basis.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/basis.js ***!
  \**************************************************/
/*! exports provided: point, Basis, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Basis\", function() { return Basis; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nfunction Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Basis(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/basis.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/basisClosed.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x2, this._y2);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x2, this._y2);\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n      default: Object(_basis__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisClosed(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/basisClosed.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/basisOpen.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_basis__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new BasisOpen(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/basisOpen.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/bundle.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/bundle.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis */ \"./node_modules/d3-shape/src/curve/basis.js\");\n\n\nfunction Bundle(context, beta) {\n  this._basis = new _basis__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new _basis__WEBPACK_IMPORTED_MODULE_0__[\"Basis\"](context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/bundle.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/cardinal.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/cardinal.js ***!
  \*****************************************************/
/*! exports provided: point, Cardinal, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cardinal\", function() { return Cardinal; });\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nfunction Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/cardinal.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/cardinalClosed.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***!
  \***********************************************************/
/*! exports provided: CardinalClosed, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalClosed\", function() { return CardinalClosed; });\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _cardinal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_cardinal__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/cardinalClosed.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/cardinalOpen.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***!
  \*********************************************************/
/*! exports provided: CardinalOpen, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CardinalOpen\", function() { return CardinalOpen; });\n/* harmony import */ var _cardinal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\nfunction CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_cardinal__WEBPACK_IMPORTED_MODULE_0__[\"point\"])(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/cardinalOpen.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/catmullRom.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***!
  \*******************************************************/
/*! exports provided: point, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"point\", function() { return point; });\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-shape/src/math.js\");\n/* harmony import */ var _cardinal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal */ \"./node_modules/d3-shape/src/curve/cardinal.js\");\n\n\n\nfunction point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > _math__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new _cardinal__WEBPACK_IMPORTED_MODULE_1__[\"Cardinal\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/catmullRom.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/catmullRomClosed.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalClosed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed */ \"./node_modules/d3-shape/src/curve/cardinalClosed.js\");\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-shape/src/noop.js\");\n/* harmony import */ var _catmullRom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: _noop__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  areaEnd: _noop__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: Object(_catmullRom__WEBPACK_IMPORTED_MODULE_2__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed__WEBPACK_IMPORTED_MODULE_0__[\"CardinalClosed\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/catmullRomClosed.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/catmullRomOpen.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cardinalOpen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen */ \"./node_modules/d3-shape/src/curve/cardinalOpen.js\");\n/* harmony import */ var _catmullRom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom */ \"./node_modules/d3-shape/src/curve/catmullRom.js\");\n\n\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: Object(_catmullRom__WEBPACK_IMPORTED_MODULE_1__[\"point\"])(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen__WEBPACK_IMPORTED_MODULE_0__[\"CardinalOpen\"](context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5));\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/catmullRomOpen.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/linear.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/linear.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Linear(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/linear.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/linearClosed.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop */ \"./node_modules/d3-shape/src/noop.js\");\n\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  areaEnd: _noop__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new LinearClosed(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/linearClosed.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/monotone.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/monotone.js ***!
  \*****************************************************/
/*! exports provided: monotoneX, monotoneY */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneX\", function() { return monotoneX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monotoneY\", function() { return monotoneY; });\nfunction sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n}\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nfunction monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nfunction monotoneY(context) {\n  return new MonotoneY(context);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/monotone.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/natural.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/natural.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  a[n - 1] = r[n - 1] / b[n - 1];\n  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n  return [a, b];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Natural(context);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/natural.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/radial.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/radial.js ***!
  \***************************************************/
/*! exports provided: curveRadialLinear, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"curveRadialLinear\", function() { return curveRadialLinear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return curveRadial; });\n/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ \"./node_modules/d3-shape/src/curve/linear.js\");\n\n\nvar curveRadialLinear = curveRadial(_linear__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nfunction curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/radial.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/curve/step.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/curve/step.js ***!
  \*************************************************/
/*! exports provided: default, stepBefore, stepAfter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepBefore\", function() { return stepBefore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stepAfter\", function() { return stepAfter; });\nfunction Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: {\n        if (this._t <= 0) {\n          this._context.lineTo(this._x, y);\n          this._context.lineTo(x, y);\n        } else {\n          var x1 = this._x * (1 - this._t) + x * this._t;\n          this._context.lineTo(x1, this._y);\n          this._context.lineTo(x1, y);\n        }\n        break;\n      }\n    }\n    this._x = x, this._y = y;\n  }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(context) {\n  return new Step(context, 0.5);\n});\n\nfunction stepBefore(context) {\n  return new Step(context, 0);\n}\n\nfunction stepAfter(context) {\n  return new Step(context, 1);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/curve/step.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/descending.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/descending.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/descending.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/identity.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-shape/src/identity.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(d) {\n  return d;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/identity.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/line.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-shape/src/line.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _curve_linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear */ \"./node_modules/d3-shape/src/curve/linear.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-shape/src/point.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = _point__WEBPACK_IMPORTED_MODULE_3__[\"x\"],\n      y = _point__WEBPACK_IMPORTED_MODULE_3__[\"y\"],\n      defined = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(true),\n      context = null,\n      curve = _curve_linear__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), line) : x;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), line) : y;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/line.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/lineRadial.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/lineRadial.js ***!
  \*************************************************/
/*! exports provided: lineRadial, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return lineRadial; });\n/* harmony import */ var _curve_radial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial */ \"./node_modules/d3-shape/src/curve/radial.js\");\n/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line */ \"./node_modules/d3-shape/src/line.js\");\n\n\n\nfunction lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(Object(_curve_radial__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_)) : c()._curve;\n  };\n\n  return l;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return lineRadial(Object(_line__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().curve(_curve_radial__WEBPACK_IMPORTED_MODULE_0__[\"curveRadialLinear\"]));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/lineRadial.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/link/index.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/link/index.js ***!
  \*************************************************/
/*! exports provided: linkHorizontal, linkVertical, linkRadial */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return linkHorizontal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return linkVertical; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return linkRadial; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point */ \"./node_modules/d3-shape/src/point.js\");\n/* harmony import */ var _pointRadial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial */ \"./node_modules/d3-shape/src/pointRadial.js\");\n\n\n\n\n\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x = _point__WEBPACK_IMPORTED_MODULE_3__[\"x\"],\n      y = _point__WEBPACK_IMPORTED_MODULE_3__[\"y\"],\n      context = null;\n\n  function link() {\n    var buffer, argv = _array__WEBPACK_IMPORTED_MODULE_1__[\"slice\"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function(_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function(_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : x;\n  };\n\n  link.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(+_), link) : y;\n  };\n\n  link.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n  var p0 = Object(_pointRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0),\n      p1 = Object(_pointRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x0, y0 = (y0 + y1) / 2),\n      p2 = Object(_pointRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y0),\n      p3 = Object(_pointRadial__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nfunction linkHorizontal() {\n  return link(curveHorizontal);\n}\n\nfunction linkVertical() {\n  return link(curveVertical);\n}\n\nfunction linkRadial() {\n  var l = link(curveRadial);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/link/index.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/math.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-shape/src/math.js ***!
  \*******************************************/
/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"abs\", function() { return abs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"atan2\", function() { return atan2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cos\", function() { return cos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sin\", function() { return sin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrt\", function() { return sqrt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pi\", function() { return pi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"halfPi\", function() { return halfPi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tau\", function() { return tau; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acos\", function() { return acos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asin\", function() { return asin; });\nvar abs = Math.abs;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar max = Math.max;\nvar min = Math.min;\nvar sin = Math.sin;\nvar sqrt = Math.sqrt;\n\nvar epsilon = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = 2 * pi;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/math.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/noop.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-shape/src/noop.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/noop.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/offset/diverging.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-shape/src/offset/diverging.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) >= 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = yp;\n      }\n    }\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/offset/diverging.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/offset/expand.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/offset/expand.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n  }\n  Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/offset/expand.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/offset/none.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-shape/src/offset/none.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/offset/none.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/offset/silhouette.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-shape/src/offset/silhouette.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n  Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/offset/silhouette.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/offset/wiggle.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/offset/wiggle.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/offset/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n      s1 += sij0, s2 += s3 * sij0;\n    }\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series, order);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/offset/wiggle.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/order/ascending.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-shape/src/order/ascending.js ***!
  \******************************************************/
/*! exports provided: default, sum */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return sum; });\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var sums = series.map(sum);\n  return Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return sums[a] - sums[b]; });\n});\n\nfunction sum(series) {\n  var s = 0, i = -1, n = series.length, v;\n  while (++i < n) if (v = +series[i][1]) s += v;\n  return s;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/order/ascending.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/order/descending.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-shape/src/order/descending.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-shape/src/order/ascending.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_ascending__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/order/descending.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/order/insideOut.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-shape/src/order/insideOut.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/order/none.js\");\n/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending */ \"./node_modules/d3-shape/src/order/ascending.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(_ascending__WEBPACK_IMPORTED_MODULE_1__[\"sum\"]),\n      order = Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).sort(function(a, b) { return sums[b] - sums[a]; }),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/order/insideOut.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/order/none.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/order/none.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  var n = series.length, o = new Array(n);\n  while (--n >= 0) o[n] = n;\n  return o;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/order/none.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/order/reverse.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/order/reverse.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(series) {\n  return Object(_none__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(series).reverse();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/order/reverse.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/pie.js":
/*!******************************************!*\
  !*** ./node_modules/d3-shape/src/pie.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _descending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending */ \"./node_modules/d3-shape/src/descending.js\");\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity */ \"./node_modules/d3-shape/src/identity.js\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math */ \"./node_modules/d3-shape/src/math.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var value = _identity__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      sortValues = _descending__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n      sort = null,\n      startAngle = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0),\n      endAngle = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_math__WEBPACK_IMPORTED_MODULE_3__[\"tau\"]),\n      padAngle = Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(_math__WEBPACK_IMPORTED_MODULE_3__[\"tau\"], Math.max(-_math__WEBPACK_IMPORTED_MODULE_3__[\"tau\"], endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), pie) : padAngle;\n  };\n\n  return pie;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/pie.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/point.js":
/*!********************************************!*\
  !*** ./node_modules/d3-shape/src/point.js ***!
  \********************************************/
/*! exports provided: x, y */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\nfunction x(p) {\n  return p[0];\n}\n\nfunction y(p) {\n  return p[1];\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/point.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/pointRadial.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-shape/src/pointRadial.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/pointRadial.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/stack.js":
/*!********************************************!*\
  !*** ./node_modules/d3-shape/src/stack.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ \"./node_modules/d3-shape/src/array.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n/* harmony import */ var _offset_none__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none */ \"./node_modules/d3-shape/src/offset/none.js\");\n/* harmony import */ var _order_none__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none */ \"./node_modules/d3-shape/src/order/none.js\");\n\n\n\n\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var keys = Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([]),\n      order = _order_none__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n      offset = _offset_none__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n      value = stackValue;\n\n  function stack(data) {\n    var kz = keys.apply(this, arguments),\n        i,\n        m = data.length,\n        n = kz.length,\n        sz = new Array(n),\n        oz;\n\n    for (i = 0; i < n; ++i) {\n      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n        si[j] = sij = [0, +value(data[j], ki, j, data)];\n        sij.data = data[j];\n      }\n      si.key = ki;\n    }\n\n    for (i = 0, oz = order(sz); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function(_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)), stack) : keys;\n  };\n\n  stack.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(+_), stack) : value;\n  };\n\n  stack.order = function(_) {\n    return arguments.length ? (order = _ == null ? _order_none__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_array__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(_)), stack) : order;\n  };\n\n  stack.offset = function(_) {\n    return arguments.length ? (offset = _ == null ? _offset_none__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _, stack) : offset;\n  };\n\n  return stack;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/stack.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-shape/src/symbol.js ***!
  \*********************************************/
/*! exports provided: symbols, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return symbols; });\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony import */ var _symbol_circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle */ \"./node_modules/d3-shape/src/symbol/circle.js\");\n/* harmony import */ var _symbol_cross__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross */ \"./node_modules/d3-shape/src/symbol/cross.js\");\n/* harmony import */ var _symbol_diamond__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond */ \"./node_modules/d3-shape/src/symbol/diamond.js\");\n/* harmony import */ var _symbol_star__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star */ \"./node_modules/d3-shape/src/symbol/star.js\");\n/* harmony import */ var _symbol_square__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square */ \"./node_modules/d3-shape/src/symbol/square.js\");\n/* harmony import */ var _symbol_triangle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle */ \"./node_modules/d3-shape/src/symbol/triangle.js\");\n/* harmony import */ var _symbol_wye__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye */ \"./node_modules/d3-shape/src/symbol/wye.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-shape/src/constant.js\");\n\n\n\n\n\n\n\n\n\n\nvar symbols = [\n  _symbol_circle__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _symbol_cross__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  _symbol_diamond__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  _symbol_square__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  _symbol_star__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  _symbol_triangle__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  _symbol_wye__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var type = Object(_constant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_symbol_circle__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n      size = Object(_constant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(64),\n      context = null;\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__[\"path\"])();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/circle.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/circle.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-shape/src/math.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / _math__WEBPACK_IMPORTED_MODULE_0__[\"pi\"]);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, _math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"]);\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/circle.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/cross.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/cross.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/cross.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/diamond.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/diamond.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/diamond.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/square.js":
/*!****************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/square.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/square.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/star.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/star.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math */ \"./node_modules/d3-shape/src/math.js\");\n\n\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(_math__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10) / Math.sin(7 * _math__WEBPACK_IMPORTED_MODULE_0__[\"pi\"] / 10),\n    kx = Math.sin(_math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr,\n    ky = -Math.cos(_math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] / 10) * kr;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (var i = 1; i < 5; ++i) {\n      var a = _math__WEBPACK_IMPORTED_MODULE_0__[\"tau\"] * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/star.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/triangle.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/triangle.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar sqrt3 = Math.sqrt(3);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/triangle.js?");

/***/ }),

/***/ "./node_modules/d3-shape/src/symbol/wye.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-shape/src/symbol/wye.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  draw: function(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-shape/src/symbol/wye.js?");

/***/ }),

/***/ "./node_modules/d3-time-format/index.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-time-format/index.js ***!
  \**********************************************/
/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/defaultLocale */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return _src_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"utcParse\"]; });\n\n/* harmony import */ var _src_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/locale */ \"./node_modules/d3-time-format/src/locale.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return _src_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_isoFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/isoFormat */ \"./node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return _src_isoFormat__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_isoParse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/isoParse */ \"./node_modules/d3-time-format/src/isoParse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return _src_isoParse__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time-format/index.js?");

/***/ }),

/***/ "./node_modules/d3-time-format/src/defaultLocale.js":
/*!**********************************************************!*\
  !*** ./node_modules/d3-time-format/src/defaultLocale.js ***!
  \**********************************************************/
/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return timeFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return timeParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return utcFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return utcParse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return defaultLocale; });\n/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale */ \"./node_modules/d3-time-format/src/locale.js\");\n\n\nvar locale;\nvar timeFormat;\nvar timeParse;\nvar utcFormat;\nvar utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = Object(_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time-format/src/defaultLocale.js?");

/***/ }),

/***/ "./node_modules/d3-time-format/src/isoFormat.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-time-format/src/isoFormat.js ***!
  \******************************************************/
/*! exports provided: isoSpecifier, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isoSpecifier\", function() { return isoSpecifier; });\n/* harmony import */ var _defaultLocale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n\n\nvar isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : Object(_defaultLocale__WEBPACK_IMPORTED_MODULE_0__[\"utcFormat\"])(isoSpecifier);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formatIso);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time-format/src/isoFormat.js?");

/***/ }),

/***/ "./node_modules/d3-time-format/src/isoParse.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-time-format/src/isoParse.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _isoFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat */ \"./node_modules/d3-time-format/src/isoFormat.js\");\n/* harmony import */ var _defaultLocale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale */ \"./node_modules/d3-time-format/src/defaultLocale.js\");\n\n\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : Object(_defaultLocale__WEBPACK_IMPORTED_MODULE_1__[\"utcParse\"])(_isoFormat__WEBPACK_IMPORTED_MODULE_0__[\"isoSpecifier\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseIso);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time-format/src/isoParse.js?");

/***/ }),

/***/ "./node_modules/d3-time-format/src/locale.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-time-format/src/locale.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatLocale; });\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/index.js\");\n\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newYear(y) {\n  return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n}\n\nfunction formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, newDate) {\n    return function(string) {\n      var d = newYear(1900),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newYear(d.y)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = newDate(newYear(d.y)), day = week.getDay();\n          week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"])(week);\n          week = d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return newDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", localDate);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier, utcDate);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {}, i = -1, n = names.length;\n  while (++i < n) map[names[i].toLowerCase()] = i;\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].ceil(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"timeYear\"])(d), d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcDay\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcSunday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].ceil(d);\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcThursday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcMonday\"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__[\"utcYear\"])(d), d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time-format/src/locale.js?");

/***/ }),

/***/ "./node_modules/d3-time/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-time/index.js ***!
  \***************************************/
/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return _src_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_millisecond__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/millisecond */ \"./node_modules/d3-time/src/millisecond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return _src_millisecond__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return _src_millisecond__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return _src_millisecond__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return _src_millisecond__WEBPACK_IMPORTED_MODULE_1__[\"milliseconds\"]; });\n\n/* harmony import */ var _src_second__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/second */ \"./node_modules/d3-time/src/second.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return _src_second__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return _src_second__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return _src_second__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return _src_second__WEBPACK_IMPORTED_MODULE_2__[\"seconds\"]; });\n\n/* harmony import */ var _src_minute__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/minute */ \"./node_modules/d3-time/src/minute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return _src_minute__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return _src_minute__WEBPACK_IMPORTED_MODULE_3__[\"minutes\"]; });\n\n/* harmony import */ var _src_hour__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/hour */ \"./node_modules/d3-time/src/hour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return _src_hour__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return _src_hour__WEBPACK_IMPORTED_MODULE_4__[\"hours\"]; });\n\n/* harmony import */ var _src_day__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/day */ \"./node_modules/d3-time/src/day.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return _src_day__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return _src_day__WEBPACK_IMPORTED_MODULE_5__[\"days\"]; });\n\n/* harmony import */ var _src_week__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/week */ \"./node_modules/d3-time/src/week.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"sunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"sundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"monday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"mondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"tuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"tuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"wednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"wednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"thursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"thursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"friday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"fridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"saturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return _src_week__WEBPACK_IMPORTED_MODULE_6__[\"saturdays\"]; });\n\n/* harmony import */ var _src_month__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./src/month */ \"./node_modules/d3-time/src/month.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return _src_month__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return _src_month__WEBPACK_IMPORTED_MODULE_7__[\"months\"]; });\n\n/* harmony import */ var _src_year__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./src/year */ \"./node_modules/d3-time/src/year.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return _src_year__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return _src_year__WEBPACK_IMPORTED_MODULE_8__[\"years\"]; });\n\n/* harmony import */ var _src_utcMinute__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/utcMinute */ \"./node_modules/d3-time/src/utcMinute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return _src_utcMinute__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return _src_utcMinute__WEBPACK_IMPORTED_MODULE_9__[\"utcMinutes\"]; });\n\n/* harmony import */ var _src_utcHour__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/utcHour */ \"./node_modules/d3-time/src/utcHour.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return _src_utcHour__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return _src_utcHour__WEBPACK_IMPORTED_MODULE_10__[\"utcHours\"]; });\n\n/* harmony import */ var _src_utcDay__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/utcDay */ \"./node_modules/d3-time/src/utcDay.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return _src_utcDay__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return _src_utcDay__WEBPACK_IMPORTED_MODULE_11__[\"utcDays\"]; });\n\n/* harmony import */ var _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/utcWeek */ \"./node_modules/d3-time/src/utcWeek.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return _src_utcWeek__WEBPACK_IMPORTED_MODULE_12__[\"utcSaturdays\"]; });\n\n/* harmony import */ var _src_utcMonth__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./src/utcMonth */ \"./node_modules/d3-time/src/utcMonth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return _src_utcMonth__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return _src_utcMonth__WEBPACK_IMPORTED_MODULE_13__[\"utcMonths\"]; });\n\n/* harmony import */ var _src_utcYear__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./src/utcYear */ \"./node_modules/d3-time/src/utcYear.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return _src_utcYear__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return _src_utcYear__WEBPACK_IMPORTED_MODULE_14__[\"utcYears\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/index.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/day.js":
/*!*****************************************!*\
  !*** ./node_modules/d3-time/src/day.js ***!
  \*****************************************/
/*! exports provided: default, days */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"days\", function() { return days; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar day = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setDate(date.getDate() + step);\n}, function(start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (day);\nvar days = day.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/day.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/duration.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-time/src/duration.js ***!
  \**********************************************/
/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationSecond\", function() { return durationSecond; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationMinute\", function() { return durationMinute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationHour\", function() { return durationHour; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationDay\", function() { return durationDay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"durationWeek\", function() { return durationWeek; });\nvar durationSecond = 1e3;\nvar durationMinute = 6e4;\nvar durationHour = 36e5;\nvar durationDay = 864e5;\nvar durationWeek = 6048e5;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/duration.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/hour.js":
/*!******************************************!*\
  !*** ./node_modules/d3-time/src/hour.js ***!
  \******************************************/
/*! exports provided: default, hours */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hours\", function() { return hours; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar hour = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  var offset = date.getTimezoneOffset() * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"] % _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n  if (offset < 0) offset += _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n  date.setTime(Math.floor((+date - offset) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]) * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"] + offset);\n}, function(date, step) {\n  date.setTime(+date + step * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hour);\nvar hours = hour.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/hour.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/interval.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-time/src/interval.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return newInterval; });\nvar t0 = new Date,\n    t1 = new Date;\n\nfunction newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = new Date(+date)), date;\n  }\n\n  interval.floor = interval;\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/interval.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/millisecond.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-time/src/millisecond.js ***!
  \*************************************************/
/*! exports provided: default, milliseconds */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"milliseconds\", function() { return milliseconds; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar millisecond = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (millisecond);\nvar milliseconds = millisecond.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/millisecond.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/minute.js":
/*!********************************************!*\
  !*** ./node_modules/d3-time/src/minute.js ***!
  \********************************************/
/*! exports provided: default, minutes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minutes\", function() { return minutes; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar minute = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(Math.floor(date / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (minute);\nvar minutes = minute.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/minute.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/month.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-time/src/month.js ***!
  \*******************************************/
/*! exports provided: default, months */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"months\", function() { return months; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar month = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (month);\nvar months = month.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/month.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/second.js":
/*!********************************************!*\
  !*** ./node_modules/d3-time/src/second.js ***!
  \********************************************/
/*! exports provided: default, seconds */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"seconds\", function() { return seconds; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar second = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setTime(Math.floor(date / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]) * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(date, step) {\n  date.setTime(+date + step * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"]);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationSecond\"];\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (second);\nvar seconds = second.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/second.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcDay.js":
/*!********************************************!*\
  !*** ./node_modules/d3-time/src/utcDay.js ***!
  \********************************************/
/*! exports provided: default, utcDays */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return utcDays; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcDay = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationDay\"];\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcDay);\nvar utcDays = utcDay.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcDay.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcHour.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-time/src/utcHour.js ***!
  \*********************************************/
/*! exports provided: default, utcHours */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return utcHours; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcHour = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"]);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationHour\"];\n}, function(date) {\n  return date.getUTCHours();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcHour);\nvar utcHours = utcHour.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcHour.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcMinute.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-time/src/utcMinute.js ***!
  \***********************************************/
/*! exports provided: default, utcMinutes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return utcMinutes; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nvar utcMinute = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]);\n}, function(start, end) {\n  return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"];\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMinute);\nvar utcMinutes = utcMinute.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcMinute.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcMonth.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-time/src/utcMonth.js ***!
  \**********************************************/
/*! exports provided: default, utcMonths */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return utcMonths; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar utcMonth = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcMonth);\nvar utcMonths = utcMonth.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcMonth.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcWeek.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-time/src/utcWeek.js ***!
  \*********************************************/
/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return utcSunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return utcMonday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return utcTuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return utcWednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return utcThursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return utcFriday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return utcSaturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return utcSundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return utcMondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return utcTuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return utcWednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return utcThursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return utcFridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return utcSaturdays; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nfunction utcWeekday(i) {\n  return Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar utcSunday = utcWeekday(0);\nvar utcMonday = utcWeekday(1);\nvar utcTuesday = utcWeekday(2);\nvar utcWednesday = utcWeekday(3);\nvar utcThursday = utcWeekday(4);\nvar utcFriday = utcWeekday(5);\nvar utcSaturday = utcWeekday(6);\n\nvar utcSundays = utcSunday.range;\nvar utcMondays = utcMonday.range;\nvar utcTuesdays = utcTuesday.range;\nvar utcWednesdays = utcWednesday.range;\nvar utcThursdays = utcThursday.range;\nvar utcFridays = utcFriday.range;\nvar utcSaturdays = utcSaturday.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcWeek.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/utcYear.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-time/src/utcYear.js ***!
  \*********************************************/
/*! exports provided: default, utcYears */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return utcYears; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar utcYear = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (utcYear);\nvar utcYears = utcYear.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/utcYear.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/week.js":
/*!******************************************!*\
  !*** ./node_modules/d3-time/src/week.js ***!
  \******************************************/
/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sunday\", function() { return sunday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monday\", function() { return monday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesday\", function() { return tuesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesday\", function() { return wednesday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursday\", function() { return thursday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"friday\", function() { return friday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturday\", function() { return saturday; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sundays\", function() { return sundays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mondays\", function() { return mondays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tuesdays\", function() { return tuesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wednesdays\", function() { return wednesdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"thursdays\", function() { return thursdays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fridays\", function() { return fridays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"saturdays\", function() { return saturdays; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-time/src/duration.js\");\n\n\n\nfunction weekday(i) {\n  return Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationMinute\"]) / _duration__WEBPACK_IMPORTED_MODULE_1__[\"durationWeek\"];\n  });\n}\n\nvar sunday = weekday(0);\nvar monday = weekday(1);\nvar tuesday = weekday(2);\nvar wednesday = weekday(3);\nvar thursday = weekday(4);\nvar friday = weekday(5);\nvar saturday = weekday(6);\n\nvar sundays = sunday.range;\nvar mondays = monday.range;\nvar tuesdays = tuesday.range;\nvar wednesdays = wednesday.range;\nvar thursdays = thursday.range;\nvar fridays = friday.range;\nvar saturdays = saturday.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/week.js?");

/***/ }),

/***/ "./node_modules/d3-time/src/year.js":
/*!******************************************!*\
  !*** ./node_modules/d3-time/src/year.js ***!
  \******************************************/
/*! exports provided: default, years */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"years\", function() { return years; });\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval */ \"./node_modules/d3-time/src/interval.js\");\n\n\nvar year = Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (year);\nvar years = year.range;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-time/src/year.js?");

/***/ }),

/***/ "./node_modules/d3-timer/index.js":
/*!****************************************!*\
  !*** ./node_modules/d3-timer/index.js ***!
  \****************************************/
/*! exports provided: now, timer, timerFlush, timeout, interval */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/timer */ \"./node_modules/d3-timer/src/timer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return _src_timer__WEBPACK_IMPORTED_MODULE_0__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return _src_timer__WEBPACK_IMPORTED_MODULE_0__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return _src_timer__WEBPACK_IMPORTED_MODULE_0__[\"timerFlush\"]; });\n\n/* harmony import */ var _src_timeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/timeout */ \"./node_modules/d3-timer/src/timeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return _src_timeout__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_interval__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/interval */ \"./node_modules/d3-timer/src/interval.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _src_interval__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-timer/index.js?");

/***/ }),

/***/ "./node_modules/d3-timer/src/interval.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-timer/src/interval.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer */ \"./node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"], total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  delay = +delay, time = time == null ? Object(_timer__WEBPACK_IMPORTED_MODULE_0__[\"now\"])() : +time;\n  t.restart(function tick(elapsed) {\n    elapsed += total;\n    t.restart(tick, total += delay, time);\n    callback(elapsed);\n  }, delay, time);\n  return t;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-timer/src/interval.js?");

/***/ }),

/***/ "./node_modules/d3-timer/src/timeout.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-timer/src/timeout.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer */ \"./node_modules/d3-timer/src/timer.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(callback, delay, time) {\n  var t = new _timer__WEBPACK_IMPORTED_MODULE_0__[\"Timer\"];\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-timer/src/timeout.js?");

/***/ }),

/***/ "./node_modules/d3-timer/src/timer.js":
/*!********************************************!*\
  !*** ./node_modules/d3-timer/src/timer.js ***!
  \********************************************/
/*! exports provided: now, Timer, timer, timerFlush */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return now; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Timer\", function() { return Timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return timer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return timerFlush; });\nvar frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-timer/src/timer.js?");

/***/ }),

/***/ "./node_modules/d3-transition/index.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-transition/index.js ***!
  \*********************************************/
/*! exports provided: transition, active, interrupt */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/selection/index */ \"./node_modules/d3-transition/src/selection/index.js\");\n/* harmony import */ var _src_transition_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/transition/index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return _src_transition_index__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _src_active__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/active */ \"./node_modules/d3-transition/src/active.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return _src_active__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _src_interrupt__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/interrupt */ \"./node_modules/d3-transition/src/interrupt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return _src_interrupt__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/index.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/active.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-transition/src/active.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\nvar root = [null];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > _transition_schedule__WEBPACK_IMPORTED_MODULE_1__[\"SCHEDULED\"] && schedule.name === name) {\n        return new _transition_index__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/active.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/interrupt.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-transition/src/interrupt.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > _transition_schedule__WEBPACK_IMPORTED_MODULE_0__[\"STARTING\"] && schedule.state < _transition_schedule__WEBPACK_IMPORTED_MODULE_0__[\"ENDING\"];\n    schedule.state = _transition_schedule__WEBPACK_IMPORTED_MODULE_0__[\"ENDED\"];\n    schedule.timer.stop();\n    if (active) schedule.on.call(\"interrupt\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/interrupt.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/selection/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-transition/src/selection/index.js ***!
  \***********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _interrupt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt */ \"./node_modules/d3-transition/src/selection/interrupt.js\");\n/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition */ \"./node_modules/d3-transition/src/selection/transition.js\");\n\n\n\n\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.interrupt = _interrupt__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\nd3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.transition = _transition__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/selection/index.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/selection/interrupt.js":
/*!***************************************************************!*\
  !*** ./node_modules/d3-transition/src/selection/interrupt.js ***!
  \***************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interrupt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt */ \"./node_modules/d3-transition/src/interrupt.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  return this.each(function() {\n    Object(_interrupt__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, name);\n  });\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/selection/interrupt.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/selection/transition.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-transition/src/selection/transition.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-ease/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/index.js\");\n\n\n\n\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__[\"easeCubicInOut\"]\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), defaultTiming;\n    }\n  }\n  return timing;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name) {\n  var id,\n      timing;\n\n  if (name instanceof _transition_index__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"]) {\n    id = name._id, name = name._name;\n  } else {\n    id = Object(_transition_index__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__[\"now\"])(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        Object(_transition_schedule__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new _transition_index__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/selection/transition.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/attr.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/attr.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween */ \"./node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate */ \"./node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttribute(name);\n    value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"namespace\"])(name), i = fullname === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformSvg\"] : _interpolate__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + \"\"));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/attr.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/attrTween.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/attrTween.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nfunction attrTweenNS(fullname, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttributeNS(fullname.space, fullname.local, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttribute(name, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"namespace\"])(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/attrTween.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/delay.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/delay.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction delayFunction(id, value) {\n  return function() {\n    Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"init\"])(this, id).delay = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).delay;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/delay.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/duration.js":
/*!***************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/duration.js ***!
  \***************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction durationFunction(id, value) {\n  return function() {\n    Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).duration = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).duration;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/duration.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/ease.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/ease.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id).ease = value;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).ease;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/ease.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/filter.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/filter.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-transition/src/transition/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(match) {\n  if (typeof match !== \"function\") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"matcher\"])(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, this._name, this._id);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/filter.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/index.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/index.js ***!
  \************************************************************/
/*! exports provided: Transition, default, newId */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return Transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newId\", function() { return newId; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr */ \"./node_modules/d3-transition/src/transition/attr.js\");\n/* harmony import */ var _attrTween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween */ \"./node_modules/d3-transition/src/transition/attrTween.js\");\n/* harmony import */ var _delay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay */ \"./node_modules/d3-transition/src/transition/delay.js\");\n/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration */ \"./node_modules/d3-transition/src/transition/duration.js\");\n/* harmony import */ var _ease__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease */ \"./node_modules/d3-transition/src/transition/ease.js\");\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter */ \"./node_modules/d3-transition/src/transition/filter.js\");\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge */ \"./node_modules/d3-transition/src/transition/merge.js\");\n/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./on */ \"./node_modules/d3-transition/src/transition/on.js\");\n/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove */ \"./node_modules/d3-transition/src/transition/remove.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select */ \"./node_modules/d3-transition/src/transition/select.js\");\n/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selectAll */ \"./node_modules/d3-transition/src/transition/selectAll.js\");\n/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selection */ \"./node_modules/d3-transition/src/transition/selection.js\");\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style */ \"./node_modules/d3-transition/src/transition/style.js\");\n/* harmony import */ var _styleTween__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./styleTween */ \"./node_modules/d3-transition/src/transition/styleTween.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./text */ \"./node_modules/d3-transition/src/transition/text.js\");\n/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./transition */ \"./node_modules/d3-transition/src/transition/transition.js\");\n/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./tween */ \"./node_modules/d3-transition/src/transition/tween.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar id = 0;\n\nfunction Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nfunction transition(name) {\n  return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"])().transition(name);\n}\n\nfunction newId() {\n  return ++id;\n}\n\nvar selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: _select__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n  filter: _filter__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  merge: _merge__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  selection: _selection__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n  transition: _transition__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: _on__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  attr: _attr__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  attrTween: _attrTween__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  style: _style__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n  styleTween: _styleTween__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n  text: _text__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n  remove: _remove__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  tween: _tween__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n  delay: _delay__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  duration: _duration__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  ease: _ease__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/index.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/interpolate.js":
/*!******************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/interpolate.js ***!
  \******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateNumber\"]\n      : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"]\n      : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRgb\"])\n      : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateString\"])(a, b);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/interpolate.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/merge.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/merge.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-transition/src/transition/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](merges, this._parents, this._name, this._id);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/merge.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/on.js":
/*!*********************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/on.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? _schedule__WEBPACK_IMPORTED_MODULE_0__[\"init\"] : _schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"];\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/on.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/remove.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/remove.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/remove.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/schedule.js":
/*!***************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/schedule.js ***!
  \***************************************************************/
/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CREATED\", function() { return CREATED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCHEDULED\", function() { return SCHEDULED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTING\", function() { return STARTING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STARTED\", function() { return STARTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RUNNING\", function() { return RUNNING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDING\", function() { return ENDING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDED\", function() { return ENDED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/index.js\");\n\n\n\nvar emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"end\", \"interrupt\");\nvar emptyTween = [];\n\nvar CREATED = 0;\nvar SCHEDULED = 1;\nvar STARTING = 2;\nvar STARTED = 3;\nvar RUNNING = 4;\nvar ENDING = 5;\nvar ENDED = 6;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n});\n\nfunction init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nfunction set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTING) throw new Error(\"too late; already started\");\n  return schedule;\n}\n\nfunction get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timer\"])(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(start);\n\n      // Interrupt the active transition, if any.\n      // Dispatch the interrupt event.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions. No interrupt event is dispatched\n      // because the cancelled transitions never started. Note that this also\n      // removes this transition from the pending list!\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__[\"timeout\"])(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(null, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/schedule.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/select.js":
/*!*************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/select.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selector\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        Object(_schedule__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(subgroup[i], name, id, i, subgroup, Object(_schedule__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id));\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, this._parents, name, id);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/select.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/selectAll.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/selectAll.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selectorAll\"])(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            Object(_schedule__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_1__[\"Transition\"](subgroups, parents, name, id);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/selectAll.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/selection.js":
/*!****************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/selection.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nvar Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"selection\"].prototype.constructor;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return new Selection(this._groups, this._parents);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/selection.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/style.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/style.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween */ \"./node_modules/d3-transition/src/transition/tween.js\");\n/* harmony import */ var _interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate */ \"./node_modules/d3-transition/src/transition/interpolate.js\");\n\n\n\n\n\nfunction styleRemove(name, interpolate) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction styleRemoveEnd(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name),\n        value1 = value(this);\n    if (value1 == null) value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__[\"style\"])(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateTransformCss\"] : _interpolate__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n  return value == null ? this\n          .styleTween(name, styleRemove(name, i))\n          .on(\"end.style.\" + name, styleRemoveEnd(name))\n      : this.styleTween(name, typeof value === \"function\"\n          ? styleFunction(name, i, Object(_tween__WEBPACK_IMPORTED_MODULE_2__[\"tweenValue\"])(this, \"style.\" + name, value))\n          : styleConstant(name, i, value + \"\"), priority);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/style.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/styleTween.js":
/*!*****************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/styleTween.js ***!
  \*****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction styleTween(name, value, priority) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.style.setProperty(name, i(t), priority);\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/styleTween.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/text.js":
/*!***********************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/text.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween */ \"./node_modules/d3-transition/src/transition/tween.js\");\n\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(Object(_tween__WEBPACK_IMPORTED_MODULE_0__[\"tweenValue\"])(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/text.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/transition.js":
/*!*****************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/transition.js ***!
  \*****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/d3-transition/src/transition/index.js\");\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = Object(_index__WEBPACK_IMPORTED_MODULE_0__[\"newId\"])();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = Object(_schedule__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(node, id0);\n        Object(_schedule__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new _index__WEBPACK_IMPORTED_MODULE_0__[\"Transition\"](groups, this._parents, name, id1);\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/transition.js?");

/***/ }),

/***/ "./node_modules/d3-transition/src/transition/tween.js":
/*!************************************************************!*\
  !*** ./node_modules/d3-transition/src/transition/tween.js ***!
  \************************************************************/
/*! exports provided: default, tweenValue */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tweenValue\", function() { return tweenValue; });\n/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule */ \"./node_modules/d3-transition/src/transition/schedule.js\");\n\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n});\n\nfunction tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"set\"])(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return Object(_schedule__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(node, id).value[name];\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-transition/src/transition/tween.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/index.js":
/*!******************************************!*\
  !*** ./node_modules/d3-voronoi/index.js ***!
  \******************************************/
/*! exports provided: voronoi */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_voronoi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/voronoi */ \"./node_modules/d3-voronoi/src/voronoi.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"voronoi\", function() { return _src_voronoi__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/index.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/Beach.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-voronoi/src/Beach.js ***!
  \**********************************************/
/*! exports provided: removeBeach, addBeach */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeBeach\", function() { return removeBeach; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addBeach\", function() { return addBeach; });\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ \"./node_modules/d3-voronoi/src/Cell.js\");\n/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ \"./node_modules/d3-voronoi/src/Circle.js\");\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\n\n\n\nvar beachPool = [];\n\nfunction Beach() {\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(this);\n  this.edge =\n  this.site =\n  this.circle = null;\n}\n\nfunction createBeach(site) {\n  var beach = beachPool.pop() || new Beach;\n  beach.site = site;\n  return beach;\n}\n\nfunction detachBeach(beach) {\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(beach);\n  _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].remove(beach);\n  beachPool.push(beach);\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(beach);\n}\n\nfunction removeBeach(beach) {\n  var circle = beach.circle,\n      x = circle.x,\n      y = circle.cy,\n      vertex = [x, y],\n      previous = beach.P,\n      next = beach.N,\n      disappearing = [beach];\n\n  detachBeach(beach);\n\n  var lArc = previous;\n  while (lArc.circle\n      && Math.abs(x - lArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]\n      && Math.abs(y - lArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n    previous = lArc.P;\n    disappearing.unshift(lArc);\n    detachBeach(lArc);\n    lArc = previous;\n  }\n\n  disappearing.unshift(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n\n  var rArc = next;\n  while (rArc.circle\n      && Math.abs(x - rArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]\n      && Math.abs(y - rArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n    next = rArc.N;\n    disappearing.push(rArc);\n    detachBeach(rArc);\n    rArc = next;\n  }\n\n  disappearing.push(rArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(rArc);\n\n  var nArcs = disappearing.length,\n      iArc;\n  for (iArc = 1; iArc < nArcs; ++iArc) {\n    rArc = disappearing[iArc];\n    lArc = disappearing[iArc - 1];\n    Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"setEdgeEnd\"])(rArc.edge, lArc.site, rArc.site, vertex);\n  }\n\n  lArc = disappearing[0];\n  rArc = disappearing[nArcs - 1];\n  rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, rArc.site, null, vertex);\n\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n}\n\nfunction addBeach(site) {\n  var x = site[0],\n      directrix = site[1],\n      lArc,\n      rArc,\n      dxl,\n      dxr,\n      node = _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"]._;\n\n  while (node) {\n    dxl = leftBreakPoint(node, directrix) - x;\n    if (dxl > _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) node = node.L; else {\n      dxr = x - rightBreakPoint(node, directrix);\n      if (dxr > _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n        if (!node.R) {\n          lArc = node;\n          break;\n        }\n        node = node.R;\n      } else {\n        if (dxl > -_Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n          lArc = node.P;\n          rArc = node;\n        } else if (dxr > -_Diagram__WEBPACK_IMPORTED_MODULE_4__[\"epsilon\"]) {\n          lArc = node;\n          rArc = node.N;\n        } else {\n          lArc = rArc = node;\n        }\n        break;\n      }\n    }\n  }\n\n  Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"createCell\"])(site);\n  var newArc = createBeach(site);\n  _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].insert(lArc, newArc);\n\n  if (!lArc && !rArc) return;\n\n  if (lArc === rArc) {\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n    rArc = createBeach(lArc.site);\n    _Diagram__WEBPACK_IMPORTED_MODULE_4__[\"beaches\"].insert(newArc, rArc);\n    newArc.edge = rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, newArc.site);\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n    Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n    return;\n  }\n\n  if (!rArc) { // && lArc\n    newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lArc.site, newArc.site);\n    return;\n  }\n\n  // else lArc !== rArc\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"detachCircle\"])(rArc);\n\n  var lSite = lArc.site,\n      ax = lSite[0],\n      ay = lSite[1],\n      bx = site[0] - ax,\n      by = site[1] - ay,\n      rSite = rArc.site,\n      cx = rSite[0] - ax,\n      cy = rSite[1] - ay,\n      d = 2 * (bx * cy - by * cx),\n      hb = bx * bx + by * by,\n      hc = cx * cx + cy * cy,\n      vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];\n\n  Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"setEdgeEnd\"])(rArc.edge, lSite, rSite, vertex);\n  newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(lSite, site, null, vertex);\n  rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"createEdge\"])(site, rSite, null, vertex);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(lArc);\n  Object(_Circle__WEBPACK_IMPORTED_MODULE_2__[\"attachCircle\"])(rArc);\n}\n\nfunction leftBreakPoint(arc, directrix) {\n  var site = arc.site,\n      rfocx = site[0],\n      rfocy = site[1],\n      pby2 = rfocy - directrix;\n\n  if (!pby2) return rfocx;\n\n  var lArc = arc.P;\n  if (!lArc) return -Infinity;\n\n  site = lArc.site;\n  var lfocx = site[0],\n      lfocy = site[1],\n      plby2 = lfocy - directrix;\n\n  if (!plby2) return lfocx;\n\n  var hl = lfocx - rfocx,\n      aby2 = 1 / pby2 - 1 / plby2,\n      b = hl / plby2;\n\n  if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n\n  return (rfocx + lfocx) / 2;\n}\n\nfunction rightBreakPoint(arc, directrix) {\n  var rArc = arc.N;\n  if (rArc) return leftBreakPoint(rArc, directrix);\n  var site = arc.site;\n  return site[1] === directrix ? site[0] : Infinity;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/Beach.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/Cell.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-voronoi/src/Cell.js ***!
  \*********************************************/
/*! exports provided: createCell, cellHalfedgeStart, cellHalfedgeEnd, sortCellHalfedges, clipCells */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createCell\", function() { return createCell; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cellHalfedgeStart\", function() { return cellHalfedgeStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cellHalfedgeEnd\", function() { return cellHalfedgeEnd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCellHalfedges\", function() { return sortCellHalfedges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clipCells\", function() { return clipCells; });\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\nfunction createCell(site) {\n  return _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][site.index] = {\n    site: site,\n    halfedges: []\n  };\n}\n\nfunction cellHalfedgeAngle(cell, edge) {\n  var site = cell.site,\n      va = edge.left,\n      vb = edge.right;\n  if (site === vb) vb = va, va = site;\n  if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);\n  if (site === va) va = edge[1], vb = edge[0];\n  else va = edge[0], vb = edge[1];\n  return Math.atan2(va[0] - vb[0], vb[1] - va[1]);\n}\n\nfunction cellHalfedgeStart(cell, edge) {\n  return edge[+(edge.left !== cell.site)];\n}\n\nfunction cellHalfedgeEnd(cell, edge) {\n  return edge[+(edge.left === cell.site)];\n}\n\nfunction sortCellHalfedges() {\n  for (var i = 0, n = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"].length, cell, halfedges, j, m; i < n; ++i) {\n    if ((cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][i]) && (m = (halfedges = cell.halfedges).length)) {\n      var index = new Array(m),\n          array = new Array(m);\n      for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[j]]);\n      index.sort(function(i, j) { return array[j] - array[i]; });\n      for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];\n      for (j = 0; j < m; ++j) halfedges[j] = array[j];\n    }\n  }\n}\n\nfunction clipCells(x0, y0, x1, y1) {\n  var nCells = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"].length,\n      iCell,\n      cell,\n      site,\n      iHalfedge,\n      halfedges,\n      nHalfedges,\n      start,\n      startX,\n      startY,\n      end,\n      endX,\n      endY,\n      cover = true;\n\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n      site = cell.site;\n      halfedges = cell.halfedges;\n      iHalfedge = halfedges.length;\n\n      // Remove any dangling clipped edges.\n      while (iHalfedge--) {\n        if (!_Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[iHalfedge]]) {\n          halfedges.splice(iHalfedge, 1);\n        }\n      }\n\n      // Insert any border edges as necessary.\n      iHalfedge = 0, nHalfedges = halfedges.length;\n      while (iHalfedge < nHalfedges) {\n        end = cellHalfedgeEnd(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[iHalfedge]]), endX = end[0], endY = end[1];\n        start = cellHalfedgeStart(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];\n        if (Math.abs(endX - startX) > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] || Math.abs(endY - startY) > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"]) {\n          halfedges.splice(iHalfedge, 0, _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, end,\n              Math.abs(endX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && y1 - endY > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [x0, Math.abs(startX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startY : y1]\n              : Math.abs(endY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && x1 - endX > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [Math.abs(startY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startX : x1, y1]\n              : Math.abs(endX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && endY - y0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [x1, Math.abs(startX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startY : y0]\n              : Math.abs(endY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] && endX - x0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? [Math.abs(startY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon\"] ? startX : x0, y0]\n              : null)) - 1);\n          ++nHalfedges;\n        }\n      }\n\n      if (nHalfedges) cover = false;\n    }\n  }\n\n  // If there weren’t any edges, have the closest site cover the extent.\n  // It doesn’t matter which corner of the extent we measure!\n  if (cover) {\n    var dx, dy, d2, dc = Infinity;\n\n    for (iCell = 0, cover = null; iCell < nCells; ++iCell) {\n      if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n        site = cell.site;\n        dx = site[0] - x0;\n        dy = site[1] - y0;\n        d2 = dx * dx + dy * dy;\n        if (d2 < dc) dc = d2, cover = cell;\n      }\n    }\n\n    if (cover) {\n      var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];\n      cover.halfedges.push(\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site = cover.site, v00, v01)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v01, v11)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v11, v10)) - 1,\n        _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"edges\"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__[\"createBorderEdge\"])(site, v10, v00)) - 1\n      );\n    }\n  }\n\n  // Lastly delete any cells with no edges; these were entirely clipped.\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell]) {\n      if (!cell.halfedges.length) {\n        delete _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"cells\"][iCell];\n      }\n    }\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/Cell.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/Circle.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-voronoi/src/Circle.js ***!
  \***********************************************/
/*! exports provided: firstCircle, attachCircle, detachCircle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"firstCircle\", function() { return firstCircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"attachCircle\", function() { return attachCircle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detachCircle\", function() { return detachCircle; });\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\nvar circlePool = [];\n\nvar firstCircle;\n\nfunction Circle() {\n  Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(this);\n  this.x =\n  this.y =\n  this.arc =\n  this.site =\n  this.cy = null;\n}\n\nfunction attachCircle(arc) {\n  var lArc = arc.P,\n      rArc = arc.N;\n\n  if (!lArc || !rArc) return;\n\n  var lSite = lArc.site,\n      cSite = arc.site,\n      rSite = rArc.site;\n\n  if (lSite === rSite) return;\n\n  var bx = cSite[0],\n      by = cSite[1],\n      ax = lSite[0] - bx,\n      ay = lSite[1] - by,\n      cx = rSite[0] - bx,\n      cy = rSite[1] - by;\n\n  var d = 2 * (ax * cy - ay * cx);\n  if (d >= -_Diagram__WEBPACK_IMPORTED_MODULE_1__[\"epsilon2\"]) return;\n\n  var ha = ax * ax + ay * ay,\n      hc = cx * cx + cy * cy,\n      x = (cy * ha - ay * hc) / d,\n      y = (ax * hc - cx * ha) / d;\n\n  var circle = circlePool.pop() || new Circle;\n  circle.arc = arc;\n  circle.site = cSite;\n  circle.x = x + bx;\n  circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom\n\n  arc.circle = circle;\n\n  var before = null,\n      node = _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"]._;\n\n  while (node) {\n    if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {\n      if (node.L) node = node.L;\n      else { before = node.P; break; }\n    } else {\n      if (node.R) node = node.R;\n      else { before = node; break; }\n    }\n  }\n\n  _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"].insert(before, circle);\n  if (!before) firstCircle = circle;\n}\n\nfunction detachCircle(arc) {\n  var circle = arc.circle;\n  if (circle) {\n    if (!circle.P) firstCircle = circle.N;\n    _Diagram__WEBPACK_IMPORTED_MODULE_1__[\"circles\"].remove(circle);\n    circlePool.push(circle);\n    Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__[\"RedBlackNode\"])(circle);\n    arc.circle = null;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/Circle.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/Diagram.js":
/*!************************************************!*\
  !*** ./node_modules/d3-voronoi/src/Diagram.js ***!
  \************************************************/
/*! exports provided: epsilon, epsilon2, beaches, cells, circles, edges, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon\", function() { return epsilon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"epsilon2\", function() { return epsilon2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"beaches\", function() { return beaches; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cells\", function() { return cells; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"circles\", function() { return circles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"edges\", function() { return edges; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Diagram; });\n/* harmony import */ var _Beach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Beach */ \"./node_modules/d3-voronoi/src/Beach.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ \"./node_modules/d3-voronoi/src/Cell.js\");\n/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ \"./node_modules/d3-voronoi/src/Circle.js\");\n/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ \"./node_modules/d3-voronoi/src/Edge.js\");\n/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedBlackTree */ \"./node_modules/d3-voronoi/src/RedBlackTree.js\");\n\n\n\n\n\n\nvar epsilon = 1e-6;\nvar epsilon2 = 1e-12;\nvar beaches;\nvar cells;\nvar circles;\nvar edges;\n\nfunction triangleArea(a, b, c) {\n  return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);\n}\n\nfunction lexicographic(a, b) {\n  return b[1] - a[1]\n      || b[0] - a[0];\n}\n\nfunction Diagram(sites, extent) {\n  var site = sites.sort(lexicographic).pop(),\n      x,\n      y,\n      circle;\n\n  edges = [];\n  cells = new Array(sites.length);\n  beaches = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n  circles = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\n  while (true) {\n    circle = _Circle__WEBPACK_IMPORTED_MODULE_2__[\"firstCircle\"];\n    if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {\n      if (site[0] !== x || site[1] !== y) {\n        Object(_Beach__WEBPACK_IMPORTED_MODULE_0__[\"addBeach\"])(site);\n        x = site[0], y = site[1];\n      }\n      site = sites.pop();\n    } else if (circle) {\n      Object(_Beach__WEBPACK_IMPORTED_MODULE_0__[\"removeBeach\"])(circle.arc);\n    } else {\n      break;\n    }\n  }\n\n  Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"sortCellHalfedges\"])();\n\n  if (extent) {\n    var x0 = +extent[0][0],\n        y0 = +extent[0][1],\n        x1 = +extent[1][0],\n        y1 = +extent[1][1];\n    Object(_Edge__WEBPACK_IMPORTED_MODULE_3__[\"clipEdges\"])(x0, y0, x1, y1);\n    Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"clipCells\"])(x0, y0, x1, y1);\n  }\n\n  this.edges = edges;\n  this.cells = cells;\n\n  beaches =\n  circles =\n  edges =\n  cells = null;\n}\n\nDiagram.prototype = {\n  constructor: Diagram,\n\n  polygons: function() {\n    var edges = this.edges;\n\n    return this.cells.map(function(cell) {\n      var polygon = cell.halfedges.map(function(i) { return Object(_Cell__WEBPACK_IMPORTED_MODULE_1__[\"cellHalfedgeStart\"])(cell, edges[i]); });\n      polygon.data = cell.site.data;\n      return polygon;\n    });\n  },\n\n  triangles: function() {\n    var triangles = [],\n        edges = this.edges;\n\n    this.cells.forEach(function(cell, i) {\n      if (!(m = (halfedges = cell.halfedges).length)) return;\n      var site = cell.site,\n          halfedges,\n          j = -1,\n          m,\n          s0,\n          e1 = edges[halfedges[m - 1]],\n          s1 = e1.left === site ? e1.right : e1.left;\n\n      while (++j < m) {\n        s0 = s1;\n        e1 = edges[halfedges[j]];\n        s1 = e1.left === site ? e1.right : e1.left;\n        if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {\n          triangles.push([site.data, s0.data, s1.data]);\n        }\n      }\n    });\n\n    return triangles;\n  },\n\n  links: function() {\n    return this.edges.filter(function(edge) {\n      return edge.right;\n    }).map(function(edge) {\n      return {\n        source: edge.left.data,\n        target: edge.right.data\n      };\n    });\n  },\n\n  find: function(x, y, radius) {\n    var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;\n\n    // Use the previously-found cell, or start with an arbitrary one.\n    while (!(cell = that.cells[i1])) if (++i1 >= n) return null;\n    var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;\n\n    // Traverse the half-edges to find a closer cell, if any.\n    do {\n      cell = that.cells[i0 = i1], i1 = null;\n      cell.halfedges.forEach(function(e) {\n        var edge = that.edges[e], v = edge.left;\n        if ((v === cell.site || !v) && !(v = edge.right)) return;\n        var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;\n        if (v2 < d2) d2 = v2, i1 = v.index;\n      });\n    } while (i1 !== null);\n\n    that._found = i0;\n\n    return radius == null || d2 <= radius * radius ? cell.site : null;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/Diagram.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/Edge.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-voronoi/src/Edge.js ***!
  \*********************************************/
/*! exports provided: createEdge, createBorderEdge, setEdgeEnd, clipEdges */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createEdge\", function() { return createEdge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createBorderEdge\", function() { return createBorderEdge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setEdgeEnd\", function() { return setEdgeEnd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clipEdges\", function() { return clipEdges; });\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\nfunction createEdge(left, right, v0, v1) {\n  var edge = [null, null],\n      index = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"].push(edge) - 1;\n  edge.left = left;\n  edge.right = right;\n  if (v0) setEdgeEnd(edge, left, right, v0);\n  if (v1) setEdgeEnd(edge, right, left, v1);\n  _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"cells\"][left.index].halfedges.push(index);\n  _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"cells\"][right.index].halfedges.push(index);\n  return edge;\n}\n\nfunction createBorderEdge(left, v0, v1) {\n  var edge = [v0, v1];\n  edge.left = left;\n  return edge;\n}\n\nfunction setEdgeEnd(edge, left, right, vertex) {\n  if (!edge[0] && !edge[1]) {\n    edge[0] = vertex;\n    edge.left = left;\n    edge.right = right;\n  } else if (edge.left === right) {\n    edge[1] = vertex;\n  } else {\n    edge[0] = vertex;\n  }\n}\n\n// Liang–Barsky line clipping.\nfunction clipEdge(edge, x0, y0, x1, y1) {\n  var a = edge[0],\n      b = edge[1],\n      ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?\n\n  if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];\n  if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];\n  return true;\n}\n\nfunction connectEdge(edge, x0, y0, x1, y1) {\n  var v1 = edge[1];\n  if (v1) return true;\n\n  var v0 = edge[0],\n      left = edge.left,\n      right = edge.right,\n      lx = left[0],\n      ly = left[1],\n      rx = right[0],\n      ry = right[1],\n      fx = (lx + rx) / 2,\n      fy = (ly + ry) / 2,\n      fm,\n      fb;\n\n  if (ry === ly) {\n    if (fx < x0 || fx >= x1) return;\n    if (lx > rx) {\n      if (!v0) v0 = [fx, y0];\n      else if (v0[1] >= y1) return;\n      v1 = [fx, y1];\n    } else {\n      if (!v0) v0 = [fx, y1];\n      else if (v0[1] < y0) return;\n      v1 = [fx, y0];\n    }\n  } else {\n    fm = (lx - rx) / (ry - ly);\n    fb = fy - fm * fx;\n    if (fm < -1 || fm > 1) {\n      if (lx > rx) {\n        if (!v0) v0 = [(y0 - fb) / fm, y0];\n        else if (v0[1] >= y1) return;\n        v1 = [(y1 - fb) / fm, y1];\n      } else {\n        if (!v0) v0 = [(y1 - fb) / fm, y1];\n        else if (v0[1] < y0) return;\n        v1 = [(y0 - fb) / fm, y0];\n      }\n    } else {\n      if (ly < ry) {\n        if (!v0) v0 = [x0, fm * x0 + fb];\n        else if (v0[0] >= x1) return;\n        v1 = [x1, fm * x1 + fb];\n      } else {\n        if (!v0) v0 = [x1, fm * x1 + fb];\n        else if (v0[0] < x0) return;\n        v1 = [x0, fm * x0 + fb];\n      }\n    }\n  }\n\n  edge[0] = v0;\n  edge[1] = v1;\n  return true;\n}\n\nfunction clipEdges(x0, y0, x1, y1) {\n  var i = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"].length,\n      edge;\n\n  while (i--) {\n    if (!connectEdge(edge = _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"][i], x0, y0, x1, y1)\n        || !clipEdge(edge, x0, y0, x1, y1)\n        || !(Math.abs(edge[0][0] - edge[1][0]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"]\n            || Math.abs(edge[0][1] - edge[1][1]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"epsilon\"])) {\n      delete _Diagram__WEBPACK_IMPORTED_MODULE_0__[\"edges\"][i];\n    }\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/Edge.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/RedBlackTree.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-voronoi/src/RedBlackTree.js ***!
  \*****************************************************/
/*! exports provided: RedBlackNode, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RedBlackNode\", function() { return RedBlackNode; });\nfunction RedBlackTree() {\n  this._ = null; // root node\n}\n\nfunction RedBlackNode(node) {\n  node.U = // parent node\n  node.C = // color - true for red, false for black\n  node.L = // left node\n  node.R = // right node\n  node.P = // previous node\n  node.N = null; // next node\n}\n\nRedBlackTree.prototype = {\n  constructor: RedBlackTree,\n\n  insert: function(after, node) {\n    var parent, grandpa, uncle;\n\n    if (after) {\n      node.P = after;\n      node.N = after.N;\n      if (after.N) after.N.P = node;\n      after.N = node;\n      if (after.R) {\n        after = after.R;\n        while (after.L) after = after.L;\n        after.L = node;\n      } else {\n        after.R = node;\n      }\n      parent = after;\n    } else if (this._) {\n      after = RedBlackFirst(this._);\n      node.P = null;\n      node.N = after;\n      after.P = after.L = node;\n      parent = after;\n    } else {\n      node.P = node.N = null;\n      this._ = node;\n      parent = null;\n    }\n    node.L = node.R = null;\n    node.U = parent;\n    node.C = true;\n\n    after = node;\n    while (parent && parent.C) {\n      grandpa = parent.U;\n      if (parent === grandpa.L) {\n        uncle = grandpa.R;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.R) {\n            RedBlackRotateLeft(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateRight(this, grandpa);\n        }\n      } else {\n        uncle = grandpa.L;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.L) {\n            RedBlackRotateRight(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateLeft(this, grandpa);\n        }\n      }\n      parent = after.U;\n    }\n    this._.C = false;\n  },\n\n  remove: function(node) {\n    if (node.N) node.N.P = node.P;\n    if (node.P) node.P.N = node.N;\n    node.N = node.P = null;\n\n    var parent = node.U,\n        sibling,\n        left = node.L,\n        right = node.R,\n        next,\n        red;\n\n    if (!left) next = right;\n    else if (!right) next = left;\n    else next = RedBlackFirst(right);\n\n    if (parent) {\n      if (parent.L === node) parent.L = next;\n      else parent.R = next;\n    } else {\n      this._ = next;\n    }\n\n    if (left && right) {\n      red = next.C;\n      next.C = node.C;\n      next.L = left;\n      left.U = next;\n      if (next !== right) {\n        parent = next.U;\n        next.U = node.U;\n        node = next.R;\n        parent.L = node;\n        next.R = right;\n        right.U = next;\n      } else {\n        next.U = parent;\n        parent = next;\n        node = next.R;\n      }\n    } else {\n      red = node.C;\n      node = next;\n    }\n\n    if (node) node.U = parent;\n    if (red) return;\n    if (node && node.C) { node.C = false; return; }\n\n    do {\n      if (node === this._) break;\n      if (node === parent.L) {\n        sibling = parent.R;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateLeft(this, parent);\n          sibling = parent.R;\n        }\n        if ((sibling.L && sibling.L.C)\n            || (sibling.R && sibling.R.C)) {\n          if (!sibling.R || !sibling.R.C) {\n            sibling.L.C = false;\n            sibling.C = true;\n            RedBlackRotateRight(this, sibling);\n            sibling = parent.R;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.R.C = false;\n          RedBlackRotateLeft(this, parent);\n          node = this._;\n          break;\n        }\n      } else {\n        sibling = parent.L;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateRight(this, parent);\n          sibling = parent.L;\n        }\n        if ((sibling.L && sibling.L.C)\n          || (sibling.R && sibling.R.C)) {\n          if (!sibling.L || !sibling.L.C) {\n            sibling.R.C = false;\n            sibling.C = true;\n            RedBlackRotateLeft(this, sibling);\n            sibling = parent.L;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.L.C = false;\n          RedBlackRotateRight(this, parent);\n          node = this._;\n          break;\n        }\n      }\n      sibling.C = true;\n      node = parent;\n      parent = parent.U;\n    } while (!node.C);\n\n    if (node) node.C = false;\n  }\n};\n\nfunction RedBlackRotateLeft(tree, node) {\n  var p = node,\n      q = node.R,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.R = q.L;\n  if (p.R) p.R.U = p;\n  q.L = p;\n}\n\nfunction RedBlackRotateRight(tree, node) {\n  var p = node,\n      q = node.L,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.L = q.R;\n  if (p.L) p.L.U = p;\n  q.R = p;\n}\n\nfunction RedBlackFirst(node) {\n  while (node.L) node = node.L;\n  return node;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RedBlackTree);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/RedBlackTree.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/constant.js":
/*!*************************************************!*\
  !*** ./node_modules/d3-voronoi/src/constant.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/point.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-voronoi/src/point.js ***!
  \**********************************************/
/*! exports provided: x, y */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return y; });\nfunction x(d) {\n  return d[0];\n}\n\nfunction y(d) {\n  return d[1];\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/point.js?");

/***/ }),

/***/ "./node_modules/d3-voronoi/src/voronoi.js":
/*!************************************************!*\
  !*** ./node_modules/d3-voronoi/src/voronoi.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-voronoi/src/constant.js\");\n/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ \"./node_modules/d3-voronoi/src/point.js\");\n/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Diagram */ \"./node_modules/d3-voronoi/src/Diagram.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var x = _point__WEBPACK_IMPORTED_MODULE_1__[\"x\"],\n      y = _point__WEBPACK_IMPORTED_MODULE_1__[\"y\"],\n      extent = null;\n\n  function voronoi(data) {\n    return new _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"default\"](data.map(function(d, i) {\n      var s = [Math.round(x(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"], Math.round(y(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__[\"epsilon\"]];\n      s.index = i;\n      s.data = d;\n      return s;\n    }), extent);\n  }\n\n  voronoi.polygons = function(data) {\n    return voronoi(data).polygons();\n  };\n\n  voronoi.links = function(data) {\n    return voronoi(data).links();\n  };\n\n  voronoi.triangles = function(data) {\n    return voronoi(data).triangles();\n  };\n\n  voronoi.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), voronoi) : x;\n  };\n\n  voronoi.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+_), voronoi) : y;\n  };\n\n  voronoi.extent = function(_) {\n    return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];\n  };\n\n  voronoi.size = function(_) {\n    return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];\n  };\n\n  return voronoi;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-voronoi/src/voronoi.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/index.js":
/*!***************************************!*\
  !*** ./node_modules/d3-zoom/index.js ***!
  \***************************************/
/*! exports provided: zoom, zoomTransform, zoomIdentity */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_zoom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/zoom */ \"./node_modules/d3-zoom/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return _src_zoom__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _src_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/transform */ \"./node_modules/d3-zoom/src/transform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return _src_transform__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return _src_transform__WEBPACK_IMPORTED_MODULE_1__[\"identity\"]; });\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/index.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/src/constant.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-zoom/src/constant.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/src/constant.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/src/event.js":
/*!*******************************************!*\
  !*** ./node_modules/d3-zoom/src/event.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ZoomEvent; });\nfunction ZoomEvent(target, type, transform) {\n  this.target = target;\n  this.type = type;\n  this.transform = transform;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/src/event.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/src/noevent.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-zoom/src/noevent.js ***!
  \*********************************************/
/*! exports provided: nopropagation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/src/noevent.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/src/transform.js":
/*!***********************************************!*\
  !*** ./node_modules/d3-zoom/src/transform.js ***!
  \***********************************************/
/*! exports provided: Transform, identity, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return transform; });\nfunction Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nvar identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nfunction transform(node) {\n  return node.__zoom || identity;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/src/transform.js?");

/***/ }),

/***/ "./node_modules/d3-zoom/src/zoom.js":
/*!******************************************!*\
  !*** ./node_modules/d3-zoom/src/zoom.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant */ \"./node_modules/d3-zoom/src/constant.js\");\n/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ \"./node_modules/d3-zoom/src/event.js\");\n/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform */ \"./node_modules/d3-zoom/src/transform.js\");\n/* harmony import */ var _noevent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent */ \"./node_modules/d3-zoom/src/noevent.js\");\n\n\n\n\n\n\n\n\n\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var e = this, w, h;\n  if (e instanceof SVGElement) {\n    e = e.ownerSVGElement || e;\n    w = e.width.baseVal.value;\n    h = e.height.baseVal.value;\n  } else {\n    w = e.clientWidth;\n    h = e.clientHeight;\n  }\n  return [[0, 0], [w, h]];\n}\n\nfunction defaultTransform() {\n  return this.__zoom || _transform__WEBPACK_IMPORTED_MODULE_7__[\"identity\"];\n}\n\nfunction defaultWheelDelta() {\n  return -d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].deltaY * (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].deltaMode ? 120 : 1) / 500;\n}\n\nfunction defaultTouchable() {\n  return \"ontouchstart\" in this;\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n  return transform.translate(\n    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n  );\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  var filter = defaultFilter,\n      extent = defaultExtent,\n      constrain = defaultConstrain,\n      wheelDelta = defaultWheelDelta,\n      touchable = defaultTouchable,\n      scaleExtent = [0, Infinity],\n      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n      duration = 250,\n      interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolateZoom\"],\n      gestures = [],\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(\"start\", \"zoom\", \"end\"),\n      touchstarting,\n      touchending,\n      touchDelay = 500,\n      wheelDelay = 150,\n      clickDistance2 = 0;\n\n  function zoom(selection) {\n    selection\n        .property(\"__zoom\", defaultTransform)\n        .on(\"wheel.zoom\", wheeled)\n        .on(\"mousedown.zoom\", mousedowned)\n        .on(\"dblclick.zoom\", dblclicked)\n      .filter(touchable)\n        .on(\"touchstart.zoom\", touchstarted)\n        .on(\"touchmove.zoom\", touchmoved)\n        .on(\"touchend.zoom touchcancel.zoom\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  zoom.transform = function(collection, transform) {\n    var selection = collection.selection ? collection.selection() : collection;\n    selection.property(\"__zoom\", defaultTransform);\n    if (collection !== selection) {\n      schedule(collection, transform);\n    } else {\n      selection.interrupt().each(function() {\n        gesture(this, arguments)\n            .start()\n            .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n            .end();\n      });\n    }\n  };\n\n  zoom.scaleBy = function(selection, k) {\n    zoom.scaleTo(selection, function() {\n      var k0 = this.__zoom.k,\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return k0 * k1;\n    });\n  };\n\n  zoom.scaleTo = function(selection, k) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t0 = this.__zoom,\n          p0 = centroid(e),\n          p1 = t0.invert(p0),\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n    });\n  };\n\n  zoom.translateBy = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      return constrain(this.__zoom.translate(\n        typeof x === \"function\" ? x.apply(this, arguments) : x,\n        typeof y === \"function\" ? y.apply(this, arguments) : y\n      ), extent.apply(this, arguments), translateExtent);\n    });\n  };\n\n  zoom.translateTo = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t = this.__zoom,\n          p = centroid(e);\n      return constrain(_transform__WEBPACK_IMPORTED_MODULE_7__[\"identity\"].translate(p[0], p[1]).scale(t.k).translate(\n        typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n        typeof y === \"function\" ? -y.apply(this, arguments) : -y\n      ), e, translateExtent);\n    });\n  };\n\n  function scale(transform, k) {\n    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n    return k === transform.k ? transform : new _transform__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, transform.x, transform.y);\n  }\n\n  function translate(transform, p0, p1) {\n    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n    return x === transform.x && y === transform.y ? transform : new _transform__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](transform.k, x, y);\n  }\n\n  function centroid(extent) {\n    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n  }\n\n  function schedule(transition, transform, center) {\n    transition\n        .on(\"start.zoom\", function() { gesture(this, arguments).start(); })\n        .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).end(); })\n        .tween(\"zoom\", function() {\n          var that = this,\n              args = arguments,\n              g = gesture(that, args),\n              e = extent.apply(that, args),\n              p = center || centroid(e),\n              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n              a = that.__zoom,\n              b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n          return function(t) {\n            if (t === 1) t = b; // Avoid rounding error on end.\n            else { var l = i(t), k = w / l[2]; t = new _transform__WEBPACK_IMPORTED_MODULE_7__[\"Transform\"](k, p[0] - l[0] * k, p[1] - l[1] * k); }\n            g.zoom(null, t);\n          };\n        });\n  }\n\n  function gesture(that, args) {\n    for (var i = 0, n = gestures.length, g; i < n; ++i) {\n      if ((g = gestures[i]).that === that) {\n        return g;\n      }\n    }\n    return new Gesture(that, args);\n  }\n\n  function Gesture(that, args) {\n    this.that = that;\n    this.args = args;\n    this.index = -1;\n    this.active = 0;\n    this.extent = extent.apply(that, args);\n  }\n\n  Gesture.prototype = {\n    start: function() {\n      if (++this.active === 1) {\n        this.index = gestures.push(this) - 1;\n        this.emit(\"start\");\n      }\n      return this;\n    },\n    zoom: function(key, transform) {\n      if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n      if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n      if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n      this.that.__zoom = transform;\n      this.emit(\"zoom\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) {\n        gestures.splice(this.index, 1);\n        this.index = -1;\n        this.emit(\"end\");\n      }\n      return this;\n    },\n    emit: function(type) {\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"customEvent\"])(new _event__WEBPACK_IMPORTED_MODULE_6__[\"default\"](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function wheeled() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        t = this.__zoom,\n        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this);\n\n    // If the mouse is in the same location as before, reuse it.\n    // If there were recent wheel events, reset the wheel idle timeout.\n    if (g.wheel) {\n      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n        g.mouse[1] = t.invert(g.mouse[0] = p);\n      }\n      clearTimeout(g.wheel);\n    }\n\n    // If this wheel event won’t trigger a transform change, ignore it.\n    else if (t.k === k) return;\n\n    // Otherwise, capture the mouse point and location at the start.\n    else {\n      g.mouse = [p, t.invert(p)];\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    g.wheel = setTimeout(wheelidled, wheelDelay);\n    g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n    function wheelidled() {\n      g.wheel = null;\n      g.end();\n    }\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this),\n        x0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientX,\n        y0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientY;\n\n    Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view);\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    g.mouse = [p, this.__zoom.invert(p)];\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n    g.start();\n\n    function mousemoved() {\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n      if (!g.moved) {\n        var dx = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientX - x0, dy = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].clientY - y0;\n        g.moved = dx * dx + dy * dy > clickDistance2;\n      }\n      g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(g.that), g.mouse[1]), g.extent, translateExtent));\n    }\n\n    function mouseupped() {\n      v.on(\"mousemove.zoom mouseup.zoom\", null);\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view, g.moved);\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n      g.end();\n    }\n  }\n\n  function dblclicked() {\n    if (!filter.apply(this, arguments)) return;\n    var t0 = this.__zoom,\n        p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(this),\n        p1 = t0.invert(p0),\n        k1 = t0.k * (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].shiftKey ? 0.5 : 2),\n        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).transition().duration(duration).call(schedule, t1, p0);\n    else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).call(zoom.transform, t1);\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches,\n        started,\n        n = touches.length, i, t, p;\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"touch\"])(this, touches, t.identifier);\n      p = [p, this.__zoom.invert(p), t.identifier];\n      if (!g.touch0) g.touch0 = p, started = true;\n      else if (!g.touch1) g.touch1 = p;\n    }\n\n    // If this is a dbltap, reroute to the (optional) dblclick.zoom handler.\n    if (touchstarting) {\n      touchstarting = clearTimeout(touchstarting);\n      if (!g.touch1) {\n        g.end();\n        p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this).on(\"dblclick.zoom\");\n        if (p) p.apply(this, arguments);\n        return;\n      }\n    }\n\n    if (started) {\n      touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n      Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(this);\n      g.start();\n    }\n  }\n\n  function touchmoved() {\n    var g = gesture(this, arguments),\n        touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches,\n        n = touches.length, i, t, p, l;\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"touch\"])(this, touches, t.identifier);\n      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n    }\n    t = g.that.__zoom;\n    if (g.touch1) {\n      var p0 = g.touch0[0], l0 = g.touch0[1],\n          p1 = g.touch1[0], l1 = g.touch1[1],\n          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n      t = scale(t, Math.sqrt(dp / dl));\n      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n    }\n    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n    else return;\n    g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n  }\n\n  function touchended() {\n    var g = gesture(this, arguments),\n        touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches,\n        n = touches.length, i, t;\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_8__[\"nopropagation\"])();\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, touchDelay);\n    for (i = 0; i < n; ++i) {\n      t = touches[i];\n      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n    }\n    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n    else g.end();\n  }\n\n  zoom.wheelDelta = function(_) {\n    return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(+_), zoom) : wheelDelta;\n  };\n\n  zoom.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : filter;\n  };\n\n  zoom.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), zoom) : touchable;\n  };\n\n  zoom.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n  };\n\n  zoom.scaleExtent = function(_) {\n    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n  };\n\n  zoom.translateExtent = function(_) {\n    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n  };\n\n  zoom.constrain = function(_) {\n    return arguments.length ? (constrain = _, zoom) : constrain;\n  };\n\n  zoom.duration = function(_) {\n    return arguments.length ? (duration = +_, zoom) : duration;\n  };\n\n  zoom.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, zoom) : interpolate;\n  };\n\n  zoom.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? zoom : value;\n  };\n\n  zoom.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n  };\n\n  return zoom;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/d3-zoom/src/zoom.js?");

/***/ }),

/***/ "./node_modules/define-properties/index.js":
/*!*************************************************!*\
  !*** ./node_modules/define-properties/index.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar keys = __webpack_require__(/*! object-keys */ \"./node_modules/object-keys/index.js\");\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/define-properties/index.js?");

/***/ }),

/***/ "./node_modules/dom-helpers/class/addClass.js":
/*!****************************************************!*\
  !*** ./node_modules/dom-helpers/class/addClass.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = addClass;\n\nvar _hasClass = _interopRequireDefault(__webpack_require__(/*! ./hasClass */ \"./node_modules/dom-helpers/class/hasClass.js\"));\n\nfunction addClass(element, className) {\n  if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);\n}\n\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://dash_bio/./node_modules/dom-helpers/class/addClass.js?");

/***/ }),

/***/ "./node_modules/dom-helpers/class/hasClass.js":
/*!****************************************************!*\
  !*** ./node_modules/dom-helpers/class/hasClass.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = hasClass;\n\nfunction hasClass(element, className) {\n  if (element.classList) return !!className && element.classList.contains(className);else return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}\n\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://dash_bio/./node_modules/dom-helpers/class/hasClass.js?");

/***/ }),

/***/ "./node_modules/dom-helpers/class/removeClass.js":
/*!*******************************************************!*\
  !*** ./node_modules/dom-helpers/class/removeClass.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction replaceClassName(origClass, classToRemove) {\n  return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n  if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/dom-helpers/class/removeClass.js?");

/***/ }),

/***/ "./node_modules/emotion/dist/index.esm.js":
/*!************************************************!*\
  !*** ./node_modules/emotion/dist/index.esm.js ***!
  \************************************************/
/*! exports provided: flush, hydrate, cx, merge, getRegisteredStyles, injectGlobal, keyframes, css, sheet, caches */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flush\", function() { return flush; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hydrate\", function() { return hydrate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cx\", function() { return cx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return merge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRegisteredStyles\", function() { return getRegisteredStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"injectGlobal\", function() { return injectGlobal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyframes\", function() { return keyframes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"css\", function() { return css; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sheet\", function() { return sheet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"caches\", function() { return caches; });\n/* harmony import */ var create_emotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! create-emotion */ \"./node_modules/create-emotion/dist/index.esm.js\");\n\n\nvar context = typeof global !== 'undefined' ? global : {};\n\nvar _createEmotion = Object(create_emotion__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(context),\n    flush = _createEmotion.flush,\n    hydrate = _createEmotion.hydrate,\n    cx = _createEmotion.cx,\n    merge = _createEmotion.merge,\n    getRegisteredStyles = _createEmotion.getRegisteredStyles,\n    injectGlobal = _createEmotion.injectGlobal,\n    keyframes = _createEmotion.keyframes,\n    css = _createEmotion.css,\n    sheet = _createEmotion.sheet,\n    caches = _createEmotion.caches;\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/emotion/dist/index.esm.js?");

/***/ }),

/***/ "./node_modules/es-abstract/GetIntrinsic.js":
/*!**************************************************!*\
  !*** ./node_modules/es-abstract/GetIntrinsic.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/* globals\n\tSet,\n\tMap,\n\tWeakSet,\n\tWeakMap,\n\n\tPromise,\n\n\tSymbol,\n\tProxy,\n\n\tAtomics,\n\tSharedArrayBuffer,\n\n\tArrayBuffer,\n\tDataView,\n\tUint8Array,\n\tFloat32Array,\n\tFloat64Array,\n\tInt8Array,\n\tInt16Array,\n\tInt32Array,\n\tUint8ClampedArray,\n\tUint16Array,\n\tUint32Array,\n*/\n\nvar undefined; // eslint-disable-line no-shadow-restricted-names\n\nvar ThrowTypeError = Object.getOwnPropertyDescriptor\n\t? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())\n\t: function () { throw new TypeError(); };\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar generator; // = function * () {};\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'$ %Array%': Array,\n\t'$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n\t'$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'$ %ArrayPrototype%': Array.prototype,\n\t'$ %ArrayProto_entries%': Array.prototype.entries,\n\t'$ %ArrayProto_forEach%': Array.prototype.forEach,\n\t'$ %ArrayProto_keys%': Array.prototype.keys,\n\t'$ %ArrayProto_values%': Array.prototype.values,\n\t'$ %AsyncFromSyncIteratorPrototype%': undefined,\n\t'$ %AsyncFunction%': asyncFunction,\n\t'$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n\t'$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n\t'$ %AsyncGeneratorFunction%': asyncGenFunction,\n\t'$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n\t'$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n\t'$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'$ %Boolean%': Boolean,\n\t'$ %BooleanPrototype%': Boolean.prototype,\n\t'$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n\t'$ %Date%': Date,\n\t'$ %DatePrototype%': Date.prototype,\n\t'$ %decodeURI%': decodeURI,\n\t'$ %decodeURIComponent%': decodeURIComponent,\n\t'$ %encodeURI%': encodeURI,\n\t'$ %encodeURIComponent%': encodeURIComponent,\n\t'$ %Error%': Error,\n\t'$ %ErrorPrototype%': Error.prototype,\n\t'$ %eval%': eval, // eslint-disable-line no-eval\n\t'$ %EvalError%': EvalError,\n\t'$ %EvalErrorPrototype%': EvalError.prototype,\n\t'$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n\t'$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n\t'$ %Function%': Function,\n\t'$ %FunctionPrototype%': Function.prototype,\n\t'$ %Generator%': generator ? getProto(generator()) : undefined,\n\t'$ %GeneratorFunction%': generatorFunction,\n\t'$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n\t'$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n\t'$ %isFinite%': isFinite,\n\t'$ %isNaN%': isNaN,\n\t'$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'$ %JSON%': JSON,\n\t'$ %JSONParse%': JSON.parse,\n\t'$ %Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n\t'$ %Math%': Math,\n\t'$ %Number%': Number,\n\t'$ %NumberPrototype%': Number.prototype,\n\t'$ %Object%': Object,\n\t'$ %ObjectPrototype%': Object.prototype,\n\t'$ %ObjProto_toString%': Object.prototype.toString,\n\t'$ %ObjProto_valueOf%': Object.prototype.valueOf,\n\t'$ %parseFloat%': parseFloat,\n\t'$ %parseInt%': parseInt,\n\t'$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n\t'$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n\t'$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n\t'$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n\t'$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n\t'$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'$ %RangeError%': RangeError,\n\t'$ %RangeErrorPrototype%': RangeError.prototype,\n\t'$ %ReferenceError%': ReferenceError,\n\t'$ %ReferenceErrorPrototype%': ReferenceError.prototype,\n\t'$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'$ %RegExp%': RegExp,\n\t'$ %RegExpPrototype%': RegExp.prototype,\n\t'$ %Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n\t'$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n\t'$ %String%': String,\n\t'$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'$ %StringPrototype%': String.prototype,\n\t'$ %Symbol%': hasSymbols ? Symbol : undefined,\n\t'$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n\t'$ %SyntaxError%': SyntaxError,\n\t'$ %SyntaxErrorPrototype%': SyntaxError.prototype,\n\t'$ %ThrowTypeError%': ThrowTypeError,\n\t'$ %TypedArray%': TypedArray,\n\t'$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n\t'$ %TypeError%': TypeError,\n\t'$ %TypeErrorPrototype%': TypeError.prototype,\n\t'$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n\t'$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n\t'$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n\t'$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n\t'$ %URIError%': URIError,\n\t'$ %URIErrorPrototype%': URIError.prototype,\n\t'$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n\t'$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\t'$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar key = '$ ' + name;\n\tif (!(key in INTRINSICS)) {\n\t\tthrow new SyntaxError('intrinsic ' + name + ' does not exist!');\n\t}\n\n\t// istanbul ignore if // hopefully this is impossible to test :-)\n\tif (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {\n\t\tthrow new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t}\n\treturn INTRINSICS[key];\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/GetIntrinsic.js?");

/***/ }),

/***/ "./node_modules/es-abstract/es5.js":
/*!*****************************************!*\
  !*** ./node_modules/es-abstract/es5.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar GetIntrinsic = __webpack_require__(/*! ./GetIntrinsic */ \"./node_modules/es-abstract/GetIntrinsic.js\");\n\nvar $Object = GetIntrinsic('%Object%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $String = GetIntrinsic('%String%');\n\nvar $isNaN = __webpack_require__(/*! ./helpers/isNaN */ \"./node_modules/es-abstract/helpers/isNaN.js\");\nvar $isFinite = __webpack_require__(/*! ./helpers/isFinite */ \"./node_modules/es-abstract/helpers/isFinite.js\");\n\nvar sign = __webpack_require__(/*! ./helpers/sign */ \"./node_modules/es-abstract/helpers/sign.js\");\nvar mod = __webpack_require__(/*! ./helpers/mod */ \"./node_modules/es-abstract/helpers/mod.js\");\n\nvar IsCallable = __webpack_require__(/*! is-callable */ \"./node_modules/is-callable/index.js\");\nvar toPrimitive = __webpack_require__(/*! es-to-primitive/es5 */ \"./node_modules/es-to-primitive/es5.js\");\n\nvar has = __webpack_require__(/*! has */ \"./node_modules/has/src/index.js\");\n\n// https://es5.github.io/#x9\nvar ES5 = {\n\tToPrimitive: toPrimitive,\n\n\tToBoolean: function ToBoolean(value) {\n\t\treturn !!value;\n\t},\n\tToNumber: function ToNumber(value) {\n\t\treturn +value; // eslint-disable-line no-implicit-coercion\n\t},\n\tToInteger: function ToInteger(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number)) { return 0; }\n\t\tif (number === 0 || !$isFinite(number)) { return number; }\n\t\treturn sign(number) * Math.floor(Math.abs(number));\n\t},\n\tToInt32: function ToInt32(x) {\n\t\treturn this.ToNumber(x) >> 0;\n\t},\n\tToUint32: function ToUint32(x) {\n\t\treturn this.ToNumber(x) >>> 0;\n\t},\n\tToUint16: function ToUint16(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }\n\t\tvar posInt = sign(number) * Math.floor(Math.abs(number));\n\t\treturn mod(posInt, 0x10000);\n\t},\n\tToString: function ToString(value) {\n\t\treturn $String(value);\n\t},\n\tToObject: function ToObject(value) {\n\t\tthis.CheckObjectCoercible(value);\n\t\treturn $Object(value);\n\t},\n\tCheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {\n\t\t/* jshint eqnull:true */\n\t\tif (value == null) {\n\t\t\tthrow new $TypeError(optMessage || 'Cannot call method on ' + value);\n\t\t}\n\t\treturn value;\n\t},\n\tIsCallable: IsCallable,\n\tSameValue: function SameValue(x, y) {\n\t\tif (x === y) { // 0 === -0, but they are not identical.\n\t\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\t\treturn true;\n\t\t}\n\t\treturn $isNaN(x) && $isNaN(y);\n\t},\n\n\t// https://www.ecma-international.org/ecma-262/5.1/#sec-8\n\tType: function Type(x) {\n\t\tif (x === null) {\n\t\t\treturn 'Null';\n\t\t}\n\t\tif (typeof x === 'undefined') {\n\t\t\treturn 'Undefined';\n\t\t}\n\t\tif (typeof x === 'function' || typeof x === 'object') {\n\t\t\treturn 'Object';\n\t\t}\n\t\tif (typeof x === 'number') {\n\t\t\treturn 'Number';\n\t\t}\n\t\tif (typeof x === 'boolean') {\n\t\t\treturn 'Boolean';\n\t\t}\n\t\tif (typeof x === 'string') {\n\t\t\treturn 'String';\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n\tIsPropertyDescriptor: function IsPropertyDescriptor(Desc) {\n\t\tif (this.Type(Desc) !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\t\t// jscs:disable\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// jscs:enable\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.1\n\tIsAccessorDescriptor: function IsAccessorDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!this.IsPropertyDescriptor(Desc)) {\n\t\t\tthrow new $TypeError('Desc must be a Property Descriptor');\n\t\t}\n\n\t\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.2\n\tIsDataDescriptor: function IsDataDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!this.IsPropertyDescriptor(Desc)) {\n\t\t\tthrow new $TypeError('Desc must be a Property Descriptor');\n\t\t}\n\n\t\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.3\n\tIsGenericDescriptor: function IsGenericDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!this.IsPropertyDescriptor(Desc)) {\n\t\t\tthrow new $TypeError('Desc must be a Property Descriptor');\n\t\t}\n\n\t\tif (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.4\n\tFromPropertyDescriptor: function FromPropertyDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn Desc;\n\t\t}\n\n\t\tif (!this.IsPropertyDescriptor(Desc)) {\n\t\t\tthrow new $TypeError('Desc must be a Property Descriptor');\n\t\t}\n\n\t\tif (this.IsDataDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tvalue: Desc['[[Value]]'],\n\t\t\t\twritable: !!Desc['[[Writable]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else if (this.IsAccessorDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tget: Desc['[[Get]]'],\n\t\t\t\tset: Desc['[[Set]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else {\n\t\t\tthrow new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor');\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.5\n\tToPropertyDescriptor: function ToPropertyDescriptor(Obj) {\n\t\tif (this.Type(Obj) !== 'Object') {\n\t\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t\t}\n\n\t\tvar desc = {};\n\t\tif (has(Obj, 'enumerable')) {\n\t\t\tdesc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);\n\t\t}\n\t\tif (has(Obj, 'configurable')) {\n\t\t\tdesc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);\n\t\t}\n\t\tif (has(Obj, 'value')) {\n\t\t\tdesc['[[Value]]'] = Obj.value;\n\t\t}\n\t\tif (has(Obj, 'writable')) {\n\t\t\tdesc['[[Writable]]'] = this.ToBoolean(Obj.writable);\n\t\t}\n\t\tif (has(Obj, 'get')) {\n\t\t\tvar getter = Obj.get;\n\t\t\tif (typeof getter !== 'undefined' && !this.IsCallable(getter)) {\n\t\t\t\tthrow new TypeError('getter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Get]]'] = getter;\n\t\t}\n\t\tif (has(Obj, 'set')) {\n\t\t\tvar setter = Obj.set;\n\t\t\tif (typeof setter !== 'undefined' && !this.IsCallable(setter)) {\n\t\t\t\tthrow new $TypeError('setter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Set]]'] = setter;\n\t\t}\n\n\t\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t\t}\n\t\treturn desc;\n\t}\n};\n\nmodule.exports = ES5;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/es5.js?");

/***/ }),

/***/ "./node_modules/es-abstract/helpers/isFinite.js":
/*!******************************************************!*\
  !*** ./node_modules/es-abstract/helpers/isFinite.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("var $isNaN = Number.isNaN || function (a) { return a !== a; };\n\nmodule.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/helpers/isFinite.js?");

/***/ }),

/***/ "./node_modules/es-abstract/helpers/isNaN.js":
/*!***************************************************!*\
  !*** ./node_modules/es-abstract/helpers/isNaN.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/helpers/isNaN.js?");

/***/ }),

/***/ "./node_modules/es-abstract/helpers/mod.js":
/*!*************************************************!*\
  !*** ./node_modules/es-abstract/helpers/mod.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function mod(number, modulo) {\n\tvar remain = number % modulo;\n\treturn Math.floor(remain >= 0 ? remain : remain + modulo);\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/helpers/mod.js?");

/***/ }),

/***/ "./node_modules/es-abstract/helpers/sign.js":
/*!**************************************************!*\
  !*** ./node_modules/es-abstract/helpers/sign.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function sign(number) {\n\treturn number >= 0 ? 1 : -1;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-abstract/helpers/sign.js?");

/***/ }),

/***/ "./node_modules/es-to-primitive/es5.js":
/*!*********************************************!*\
  !*** ./node_modules/es-to-primitive/es5.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar toStr = Object.prototype.toString;\n\nvar isPrimitive = __webpack_require__(/*! ./helpers/isPrimitive */ \"./node_modules/es-to-primitive/helpers/isPrimitive.js\");\n\nvar isCallable = __webpack_require__(/*! is-callable */ \"./node_modules/is-callable/index.js\");\n\n// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8\nvar ES5internalSlots = {\n\t'[[DefaultValue]]': function (O) {\n\t\tvar actualHint;\n\t\tif (arguments.length > 1) {\n\t\t\tactualHint = arguments[1];\n\t\t} else {\n\t\t\tactualHint = toStr.call(O) === '[object Date]' ? String : Number;\n\t\t}\n\n\t\tif (actualHint === String || actualHint === Number) {\n\t\t\tvar methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\t\t\tvar value, i;\n\t\t\tfor (i = 0; i < methods.length; ++i) {\n\t\t\t\tif (isCallable(O[methods[i]])) {\n\t\t\t\t\tvalue = O[methods[i]]();\n\t\t\t\t\tif (isPrimitive(value)) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new TypeError('No default value');\n\t\t}\n\t\tthrow new TypeError('invalid [[DefaultValue]] hint supplied');\n\t}\n};\n\n// http://ecma-international.org/ecma-262/5.1/#sec-9.1\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tif (arguments.length > 1) {\n\t\treturn ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);\n\t}\n\treturn ES5internalSlots['[[DefaultValue]]'](input);\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-to-primitive/es5.js?");

/***/ }),

/***/ "./node_modules/es-to-primitive/helpers/isPrimitive.js":
/*!*************************************************************!*\
  !*** ./node_modules/es-to-primitive/helpers/isPrimitive.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/es-to-primitive/helpers/isPrimitive.js?");

/***/ }),

/***/ "./node_modules/es6-natural-sort/naturalSort.min.js":
/*!**********************************************************!*\
  !*** ./node_modules/es6-natural-sort/naturalSort.min.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return naturalSort; });\nfunction naturalSort(e,a){var r,t,n=/(^([+\\-]?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?(?=\\D|\\s|$))|^0x[\\da-fA-F]+$|\\d+)/g,l=/^\\s+|\\s+$/g,i=/\\s+/g,s=/^0x[0-9a-f]+$/i,c=/^0/,p=function(e){return(naturalSort.insensitive&&(\"\"+e).toLowerCase()||\"\"+e).replace(l,\"\")},u=p(e),d=p(a),f=u.replace(n,\"\\0$1\\0\").replace(/\\0$/,\"\").replace(/^\\0/,\"\").split(\"\\0\"),o=d.replace(n,\"\\0$1\\0\").replace(/\\0$/,\"\").replace(/^\\0/,\"\").split(\"\\0\"),h=parseInt(u.match(s),16)||1!==f.length&&Date.parse(u),w=parseInt(d.match(s),16)||h&&d.match(/(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/)&&Date.parse(d)||null,$=function(e,a){return(!e.match(c)||1==a)&&parseFloat(e)||e.replace(i,\" \").replace(l,\"\")||0};if(w){if(h<w)return-1;if(h>w)return 1}for(var m=0,g=f.length,N=o.length,x=Math.max(g,N);m<x;m++){if(r=$(f[m]||\"\",g),t=$(o[m]||\"\",N),isNaN(r)!==isNaN(t))return isNaN(r)?1:-1;if(/[^\\x00-\\x80]/.test(r+t)&&r.localeCompare){var v=r.localeCompare(t);return v/Math.abs(v)}if(r<t)return-1;if(r>t)return 1}}\n\n//# sourceURL=webpack://dash_bio/./node_modules/es6-natural-sort/naturalSort.min.js?");

/***/ }),

/***/ "./node_modules/fast-memoize/src/index.js":
/*!************************************************!*\
  !*** ./node_modules/fast-memoize/src/index.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("//\n// Main\n//\n\nfunction memoize (fn, options) {\n  var cache = options && options.cache\n    ? options.cache\n    : cacheDefault\n\n  var serializer = options && options.serializer\n    ? options.serializer\n    : serializerDefault\n\n  var strategy = options && options.strategy\n    ? options.strategy\n    : strategyDefault\n\n  return strategy(fn, {\n    cache: cache,\n    serializer: serializer\n  })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n  return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n  var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.call(this, arg)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n  var args = Array.prototype.slice.call(arguments, 3)\n  var cacheKey = serializer(args)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.apply(this, args)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n  return strategy.bind(\n    context,\n    fn,\n    cache,\n    serialize\n  )\n}\n\nfunction strategyDefault (fn, options) {\n  var strategy = fn.length === 1 ? monadic : variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyVariadic (fn, options) {\n  var strategy = variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyMonadic (fn, options) {\n  var strategy = monadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n  return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n  this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n  return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n  return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n  this.cache[key] = value\n}\n\nvar cacheDefault = {\n  create: function create () {\n    return new ObjectWithoutPrototypeCache()\n  }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n  variadic: strategyVariadic,\n  monadic: strategyMonadic\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/fast-memoize/src/index.js?");

/***/ }),

/***/ "./node_modules/for-each/index.js":
/*!****************************************!*\
  !*** ./node_modules/for-each/index.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar isCallable = __webpack_require__(/*! is-callable */ \"./node_modules/is-callable/index.js\");\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n    for (var i = 0, len = array.length; i < len; i++) {\n        if (hasOwnProperty.call(array, i)) {\n            if (receiver == null) {\n                iterator(array[i], i, array);\n            } else {\n                iterator.call(receiver, array[i], i, array);\n            }\n        }\n    }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n    for (var i = 0, len = string.length; i < len; i++) {\n        // no such thing as a sparse string.\n        if (receiver == null) {\n            iterator(string.charAt(i), i, string);\n        } else {\n            iterator.call(receiver, string.charAt(i), i, string);\n        }\n    }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n    for (var k in object) {\n        if (hasOwnProperty.call(object, k)) {\n            if (receiver == null) {\n                iterator(object[k], k, object);\n            } else {\n                iterator.call(receiver, object[k], k, object);\n            }\n        }\n    }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n    if (!isCallable(iterator)) {\n        throw new TypeError('iterator must be a function');\n    }\n\n    var receiver;\n    if (arguments.length >= 3) {\n        receiver = thisArg;\n    }\n\n    if (toStr.call(list) === '[object Array]') {\n        forEachArray(list, iterator, receiver);\n    } else if (typeof list === 'string') {\n        forEachString(list, iterator, receiver);\n    } else {\n        forEachObject(list, iterator, receiver);\n    }\n};\n\nmodule.exports = forEach;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/for-each/index.js?");

/***/ }),

/***/ "./node_modules/function-bind/implementation.js":
/*!******************************************************!*\
  !*** ./node_modules/function-bind/implementation.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n    var target = this;\n    if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n        throw new TypeError(ERROR_MESSAGE + target);\n    }\n    var args = slice.call(arguments, 1);\n\n    var bound;\n    var binder = function () {\n        if (this instanceof bound) {\n            var result = target.apply(\n                this,\n                args.concat(slice.call(arguments))\n            );\n            if (Object(result) === result) {\n                return result;\n            }\n            return this;\n        } else {\n            return target.apply(\n                that,\n                args.concat(slice.call(arguments))\n            );\n        }\n    };\n\n    var boundLength = Math.max(0, target.length - args.length);\n    var boundArgs = [];\n    for (var i = 0; i < boundLength; i++) {\n        boundArgs.push('$' + i);\n    }\n\n    bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n    if (target.prototype) {\n        var Empty = function Empty() {};\n        Empty.prototype = target.prototype;\n        bound.prototype = new Empty();\n        Empty.prototype = null;\n    }\n\n    return bound;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/function-bind/implementation.js?");

/***/ }),

/***/ "./node_modules/function-bind/index.js":
/*!*********************************************!*\
  !*** ./node_modules/function-bind/index.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/function-bind/implementation.js\");\n\nmodule.exports = Function.prototype.bind || implementation;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/function-bind/index.js?");

/***/ }),

/***/ "./node_modules/global/window.js":
/*!***************************************!*\
  !*** ./node_modules/global/window.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n    win = window;\n} else if (typeof global !== \"undefined\") {\n    win = global;\n} else if (typeof self !== \"undefined\"){\n    win = self;\n} else {\n    win = {};\n}\n\nmodule.exports = win;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/global/window.js?");

/***/ }),

/***/ "./node_modules/has/src/index.js":
/*!***************************************!*\
  !*** ./node_modules/has/src/index.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/has/src/index.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/annotations.js":
/*!*****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/annotations.js ***!
  \*****************************************************************/
/*! exports provided: onLoadAnnots, onDrawAnnots, processAnnotData, restoreDefaultTracks, updateDisplayedTracks, initAnnotSettings, fetchAnnots, drawAnnots, getHistogramBars, drawHeatmaps, deserializeAnnotsForHeatmap, fillAnnots, drawProcessedAnnots, drawSynteny, startHideAnnotTooltipTimeout, showAnnotTooltip, onWillShowAnnotTooltip, setOriginalTrackIndexes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initAnnotSettings\", function() { return initAnnotSettings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fetchAnnots\", function() { return fetchAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fillAnnots\", function() { return fillAnnots; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n/* harmony import */ var es6_natural_sort__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! es6-natural-sort */ \"./node_modules/es6-natural-sort/naturalSort.min.js\");\n/* harmony import */ var _parsers_bed_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../parsers/bed-parser */ \"./node_modules/ideogram/src/js/parsers/bed-parser.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _heatmap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./heatmap */ \"./node_modules/ideogram/src/js/annotations/heatmap.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawHeatmaps\", function() { return _heatmap__WEBPACK_IMPORTED_MODULE_5__[\"drawHeatmaps\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deserializeAnnotsForHeatmap\", function() { return _heatmap__WEBPACK_IMPORTED_MODULE_5__[\"deserializeAnnotsForHeatmap\"]; });\n\n/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ \"./node_modules/ideogram/src/js/annotations/events.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onLoadAnnots\", function() { return _events__WEBPACK_IMPORTED_MODULE_6__[\"onLoadAnnots\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onDrawAnnots\", function() { return _events__WEBPACK_IMPORTED_MODULE_6__[\"onDrawAnnots\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"startHideAnnotTooltipTimeout\", function() { return _events__WEBPACK_IMPORTED_MODULE_6__[\"startHideAnnotTooltipTimeout\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"showAnnotTooltip\", function() { return _events__WEBPACK_IMPORTED_MODULE_6__[\"showAnnotTooltip\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onWillShowAnnotTooltip\", function() { return _events__WEBPACK_IMPORTED_MODULE_6__[\"onWillShowAnnotTooltip\"]; });\n\n/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./draw */ \"./node_modules/ideogram/src/js/annotations/draw.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawAnnots\", function() { return _draw__WEBPACK_IMPORTED_MODULE_7__[\"drawAnnots\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawProcessedAnnots\", function() { return _draw__WEBPACK_IMPORTED_MODULE_7__[\"drawProcessedAnnots\"]; });\n\n/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./histogram */ \"./node_modules/ideogram/src/js/annotations/histogram.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getHistogramBars\", function() { return _histogram__WEBPACK_IMPORTED_MODULE_8__[\"getHistogramBars\"]; });\n\n/* harmony import */ var _synteny__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./synteny */ \"./node_modules/ideogram/src/js/annotations/synteny.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawSynteny\", function() { return _synteny__WEBPACK_IMPORTED_MODULE_9__[\"drawSynteny\"]; });\n\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./filter */ \"./node_modules/ideogram/src/js/annotations/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"restoreDefaultTracks\", function() { return _filter__WEBPACK_IMPORTED_MODULE_10__[\"restoreDefaultTracks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"updateDisplayedTracks\", function() { return _filter__WEBPACK_IMPORTED_MODULE_10__[\"updateDisplayedTracks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setOriginalTrackIndexes\", function() { return _filter__WEBPACK_IMPORTED_MODULE_10__[\"setOriginalTrackIndexes\"]; });\n\n/* harmony import */ var _process__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./process */ \"./node_modules/ideogram/src/js/annotations/process.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"processAnnotData\", function() { return _process__WEBPACK_IMPORTED_MODULE_11__[\"processAnnotData\"]; });\n\n/**\n * @fileoverview Methods for ideogram annotations.\n * Annotations are graphical objects that represent features of interest\n * located on the chromosomes, e.g. genes or variations.  They can\n * appear beside a chromosome, overlaid on top of it, or between multiple\n * chromosomes.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_4__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__, d3_fetch__WEBPACK_IMPORTED_MODULE_1__);\n\nfunction initNumTracksHeightAndBarWidth(ideo, config) {\n  var annotHeight;\n\n  if (!config.annotationHeight) {\n    if (config.annotationsLayout === 'heatmap') {\n      annotHeight = config.chrWidth - 1;\n    } else {\n      annotHeight = Math.round(config.chrHeight / 100);\n    }\n    ideo.config.annotationHeight = annotHeight;\n  }\n\n  if (config.annotationTracks) {\n    ideo.config.numAnnotTracks = config.annotationTracks.length;\n  } else if (config.annotationsNumTracks) {\n    ideo.config.numAnnotTracks = config.annotationsNumTracks;\n  } else {\n    ideo.config.numAnnotTracks = 1;\n  }\n  ideo.config.annotTracksHeight =\n    config.annotationHeight * config.numAnnotTracks;\n\n  if (typeof config.barWidth === 'undefined') {\n    ideo.config.barWidth = 3;\n  }\n}\n\nfunction initTooltip(ideo, config) {\n  if (config.showAnnotTooltip !== false) {\n    ideo.config.showAnnotTooltip = true;\n  }\n\n  if (config.onWillShowAnnotTooltip) {\n    ideo.onWillShowAnnotTooltipCallback = config.onWillShowAnnotTooltip;\n  }\n}\n\n/**\n * Initializes various annotation settings.  Constructor help function.\n */\nfunction initAnnotSettings() {\n  var ideo = this,\n    config = ideo.config;\n\n  if (\n    config.annotationsPath || config.localAnnotationsPath ||\n    ideo.annots || config.annotations\n  ) {\n    initNumTracksHeightAndBarWidth(ideo, config);\n  } else {\n    ideo.config.annotTracksHeight = 0;\n  }\n\n  if (typeof config.annotationsColor === 'undefined') {\n    ideo.config.annotationsColor = '#F00';\n  }\n\n  initTooltip(ideo, config);\n}\n\nfunction validateAnnotsUrl(annotsUrl) {\n  var tmp, extension;\n\n  tmp = annotsUrl.split('?')[0].split('.');\n  extension = tmp[tmp.length - 1];\n\n  if (extension !== 'bed' && extension !== 'json') {\n    extension = extension.toUpperCase();\n    alert(\n      'Ideogram.js only supports BED and Ideogram JSON at the moment.  ' +\n      'Sorry, check back soon for ' + extension + ' support!'\n    );\n    return;\n  }\n  return extension;\n}\n\nfunction afterRawAnnots(ideo) {\n  // Ensure annots are ordered by chromosome\n  ideo.rawAnnots.annots = ideo.rawAnnots.annots.sort(function(a, b) {\n    return Object(es6_natural_sort__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a.chr, b.chr);\n  });\n\n  if (ideo.onLoadAnnotsCallback) {\n    ideo.onLoadAnnotsCallback();\n  }\n\n  if (ideo.config.heatmaps) {\n    ideo.deserializeAnnotsForHeatmap(ideo.rawAnnots);\n  }\n}\n\n/**\n * Requests annotations URL via HTTP, sets ideo.rawAnnots for downstream\n * processing.\n *\n * @param annotsUrl Absolute or relative URL native or BED annotations file\n */\nfunction fetchAnnots(annotsUrl) {\n  var extension,\n    ideo = this;\n\n  if (annotsUrl.slice(0, 4) !== 'http') {\n    d3.json(ideo.config.annotationsPath)\n      .then(function(data) {\n        ideo.rawAnnots = data;\n        afterRawAnnots(ideo);\n      });\n    return;\n  }\n\n  extension = validateAnnotsUrl(annotsUrl);\n\n  d3.text(annotsUrl).then(function(text) {\n    if (extension === 'bed') {\n      ideo.rawAnnots = new _parsers_bed_parser__WEBPACK_IMPORTED_MODULE_3__[\"BedParser\"](text, ideo).rawAnnots;\n    } else {\n      ideo.rawAnnots = JSON.parse(text);\n    }\n    afterRawAnnots(ideo);\n  });\n}\n\n/**\n * Fills out annotations data structure such that its top-level list of arrays\n * matches that of this ideogram's chromosomes list in order and number\n * Fixes https://github.com/eweitz/ideogram/issues/66\n */\nfunction fillAnnots(annots) {\n  var filledAnnots, chrs, chrArray, i, chr, annot, chrIndex;\n\n  filledAnnots = [];\n  chrs = [];\n  chrArray = this.chromosomesArray;\n\n  for (i = 0; i < chrArray.length; i++) {\n    chr = chrArray[i].name;\n    chrs.push(chr);\n    filledAnnots.push({chr: chr, annots: []});\n  }\n\n  for (i = 0; i < annots.length; i++) {\n    annot = annots[i];\n    chrIndex = chrs.indexOf(annot.chr);\n    if (chrIndex !== -1) {\n      filledAnnots[chrIndex] = annot;\n    }\n  }\n\n  return filledAnnots;\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/annotations.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/draw.js":
/*!**********************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/draw.js ***!
  \**********************************************************/
/*! exports provided: drawAnnots, drawProcessedAnnots */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawAnnots\", function() { return drawAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawProcessedAnnots\", function() { return drawProcessedAnnots; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./histogram */ \"./node_modules/ideogram/src/js/annotations/histogram.js\");\n/* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./legend */ \"./node_modules/ideogram/src/js/annotations/legend.js\");\n\n\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction parseFriendlyAnnots(friendlyAnnots, rawAnnots) {\n  var i, j, annot, rawAnnot;\n\n  for (i = 0; i < friendlyAnnots.length; i++) {\n    annot = friendlyAnnots[i];\n\n    for (j = 0; j < rawAnnots.length; j++) {\n      if (annot.chr === rawAnnots[j].chr) {\n        rawAnnot = [\n          annot.name,\n          annot.start,\n          annot.stop - annot.start\n        ];\n        if ('color' in annot) rawAnnot.push(annot.color);\n        if ('shape' in annot) rawAnnot.push(annot.shape);\n        rawAnnots[j].annots.push(rawAnnot);\n        break;\n      }\n    }\n  }\n\n  return rawAnnots;\n}\n\nfunction parseFriendlyKeys(friendlyAnnots) {\n  var keys = ['name', 'start', 'length'];\n  if ('color' in friendlyAnnots[0]) {\n    keys.push('color');\n  }\n  if ('shape' in friendlyAnnots[0]) {\n    keys.push('shape');\n  }\n  return keys;\n}\n\n/**\n * Draws annotations defined by user\n */\nfunction drawAnnots(friendlyAnnots) {\n  var keys, chr,\n    rawAnnots = [],\n    ideo = this,\n    chrs = ideo.chromosomes[ideo.config.taxid]; // TODO: multiorganism\n\n  // Occurs when filtering\n  if ('annots' in friendlyAnnots[0]) {\n    return ideo.drawProcessedAnnots(friendlyAnnots);\n  }\n\n  for (chr in chrs) {\n    rawAnnots.push({chr: chr, annots: []});\n  }\n  rawAnnots = parseFriendlyAnnots(friendlyAnnots, rawAnnots)\n\n  keys = parseFriendlyKeys(friendlyAnnots);\n\n  ideo.rawAnnots = {keys: keys, annots: rawAnnots};\n  ideo.annots = ideo.processAnnotData(ideo.rawAnnots);\n\n  ideo.drawProcessedAnnots(ideo.annots);\n}\n\nfunction getShapes(annotHeight) {\n  var triangle, circle, rectangle, r;\n\n  triangle =\n    'm0,0 l -' + annotHeight + ' ' + (2 * annotHeight) +\n    ' l ' + (2 * annotHeight) + ' 0 z';\n\n  // From http://stackoverflow.com/a/10477334, with a minor change (\"m -r, r\")\n  // Circles are supported natively via <circle>, but having it as a path\n  // simplifies handling triangles, circles and other shapes in the same\n  // D3 call\n  r = annotHeight;\n  circle =\n    'm -' + r + ', ' + r +\n    'a ' + r + ',' + r + ' 0 1,0 ' + (r * 2) + ',0' +\n    'a ' + r + ',' + r + ' 0 1,0 -' + (r * 2) + ',0';\n\n  rectangle =\n    'm0,0 l 0 ' + (2 * annotHeight) +\n    'l ' + annotHeight + ' 0' +\n    'l 0 -' + (2 * annotHeight) + 'z';\n\n  return {triangle: triangle, circle: circle, rectangle: rectangle};\n}\n\nfunction getChrAnnotNodes(filledAnnots, ideo) {\n  return d3.selectAll(ideo.selector + ' .chromosome')\n    .data(filledAnnots)\n    .selectAll('path.annot')\n    .data(function(d) {\n      return d.annots;\n    })\n    .enter();\n}\n\nfunction determineShape(d, shapes) {\n  if (!d.shape || d.shape === 'triangle') {\n    return shapes.triangle;\n  } else if (d.shape === 'circle') {\n    return shapes.circle;\n  } else if (d.shape === 'rectangle') {\n    return shapes.rectangle;\n  } else {\n    return d.shape;\n  }\n}\n\nfunction writeTrackAnnots(chrAnnot, ideo) {\n  var shapes,\n    annotHeight = ideo.config.annotationHeight;\n\n  shapes = getShapes(annotHeight);\n\n  chrAnnot.append('g')\n    .attr('id', function(d) { return d.id; })\n    .attr('class', 'annot')\n    .attr('transform', function(d) {\n      var y = ideo.config.chrWidth + (d.trackIndex * annotHeight * 2);\n      return 'translate(' + d.px + ',' + y + ')';\n    })\n    .append('path')\n    .attr('d', function(d) { return determineShape(d, shapes); })\n    .attr('fill', function(d) { return d.color; })\n    .on('mouseover', function(d) { ideo.showAnnotTooltip(d, this); })\n    .on('mouseout', function() { ideo.startHideAnnotTooltipTimeout(); });\n}\n\n/**\n * Overlaid annotations appear directly on chromosomes\n */\nfunction writeOverlayAnnots(chrAnnot, ideo) {\n  chrAnnot.append('polygon')\n    .attr('id', function(d) { return d.id; })\n    .attr('class', 'annot')\n    .attr('points', function(d) {\n      var x1, x2,\n        chrWidth = ideo.config.chrWidth;\n\n      if (d.stopPx - d.startPx > 1) {\n        x1 = d.startPx;\n        x2 = d.stopPx;\n      } else {\n        x1 = d.px - 0.5;\n        x2 = d.px + 0.5;\n      }\n\n      return (\n        x1 + ',' + chrWidth + ' ' + x2 + ',' + chrWidth + ' ' +\n        x2 + ',0 ' + x1 + ',0'\n      );\n    })\n    .attr('fill', function(d) { return d.color; })\n    .on('mouseover', function(d) { ideo.showAnnotTooltip(d, this); })\n    .on('mouseout', function() { ideo.startHideAnnotTooltipTimeout(); });\n}\n\nfunction warnIfTooManyAnnots(layout, annots) {\n  var i, numAnnots;\n\n  if (layout !== 'heatmap' && layout !== 'histogram') {\n    numAnnots = 0;\n    for (i = 0; i < annots.length; i++) {\n      numAnnots += annots[i].annots.length;\n    }\n    if (numAnnots > 2000) {\n      console.warn(\n        'Rendering more than 2000 annotations in Ideogram?\\n' +\n        'Try setting \"annotationsLayout\" to \"heatmap\" or \"histogram\" in your ' +\n        'Ideogram configuration object for better layout and performance.'\n      );\n    }\n  }\n}\n\nfunction drawAnnotsByLayoutType(layout, annots, ideo) {\n  var filledAnnots, chrAnnot;\n\n  warnIfTooManyAnnots(layout, annots);\n\n  if (layout === 'histogram') annots = ideo.getHistogramBars(annots);\n\n  filledAnnots = ideo.fillAnnots(annots);\n\n  chrAnnot = getChrAnnotNodes(filledAnnots, ideo);\n\n  if (layout === 'tracks') {\n    writeTrackAnnots(chrAnnot, ideo);\n  } else if (layout === 'overlay') {\n    writeOverlayAnnots(chrAnnot, ideo);\n  } else if (layout === 'histogram') {\n    Object(_histogram__WEBPACK_IMPORTED_MODULE_1__[\"writeHistogramAnnots\"])(chrAnnot, ideo);\n  }\n}\n\n/**\n * Draws genome annotations on chromosomes.\n * Annotations can be rendered as either overlaid directly\n * on a chromosome, or along one or more \"tracks\"\n * running parallel to each chromosome.\n */\nfunction drawProcessedAnnots(annots) {\n  var layout,\n    ideo = this;\n\n  d3.selectAll(ideo.selector + ' .annot').remove();\n\n  layout = 'tracks';\n  if (ideo.config.annotationsLayout) layout = ideo.config.annotationsLayout;\n\n  if ('legend' in ideo.config) Object(_legend__WEBPACK_IMPORTED_MODULE_2__[\"writeLegend\"])(ideo);\n\n  if (layout === 'heatmap') {\n    ideo.drawHeatmaps(annots);\n    return;\n  }\n\n  drawAnnotsByLayoutType(layout, annots, ideo);\n  if (ideo.onDrawAnnotsCallback) ideo.onDrawAnnotsCallback();\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/draw.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/events.js":
/*!************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/events.js ***!
  \************************************************************/
/*! exports provided: onLoadAnnots, onDrawAnnots, startHideAnnotTooltipTimeout, onWillShowAnnotTooltip, showAnnotTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onLoadAnnots\", function() { return onLoadAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onDrawAnnots\", function() { return onDrawAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startHideAnnotTooltipTimeout\", function() { return startHideAnnotTooltipTimeout; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onWillShowAnnotTooltip\", function() { return onWillShowAnnotTooltip; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showAnnotTooltip\", function() { return showAnnotTooltip; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Optional callback, invoked when annotations are drawn\n */\nfunction onLoadAnnots() {\n  call(this.onLoadAnnotsCallback);\n}\n\n/**\n * Optional callback, invoked when annotations are drawn\n */\nfunction onDrawAnnots() {\n  call(this.onDrawAnnotsCallback);\n}\n\n/**\n * Starts a timer that, upon expiring, hides the annotation tooltip.\n *\n * To enable users to copy tooltip content to their clipboard, a timer is\n * used to control when the tooltip disappears.  It starts when the user's\n * cursor leaves the annotation or the tooltip.  If the user moves the cursor\n * back over the annot or tooltip after the timer starts and before it expires,\n * then the timer is cleared.\n */\nfunction startHideAnnotTooltipTimeout() {\n\n  if (this.config.showAnnotTooltip === false) {\n    return;\n  }\n\n  this.hideAnnotTooltipTimeout = window.setTimeout(function () {\n    d3.select('._ideogramTooltip').transition()\n      .duration(500)\n      .style('opacity', 0)\n      .style('pointer-events', 'none')\n  }, 250);\n}\n\nfunction writeTooltip(tooltip, content, matrix, yOffset, ideo) {\n  tooltip.html(content)\n    .style('opacity', 1) // Make tooltip visible\n    .style('left', matrix.e + 'px')\n    .style('top', (matrix.f - yOffset) + 'px')\n    .style('pointer-events', null) // Prevent bug in clicking chromosome\n    .on('mouseover', function () {\n      clearTimeout(ideo.hideAnnotTooltipTimeout);\n    })\n    .on('mouseout', function () {\n      ideo.startHideAnnotTooltipTimeout();\n    });\n}\n\nfunction getContentAndYOffset(annot) {\n  var content, yOffset, range, displayName;\n\n  range = 'chr' + annot.chr + ':' + annot.start.toLocaleString();\n  if (annot.length > 0) {\n    // Only show range if stop differs from start\n    range += '-' + annot.stop.toLocaleString();\n  }\n  content = range;\n  yOffset = 24;\n\n  if (annot.name) {\n    displayName = annot.displayName ? annot.displayName : annot.name;\n    content = displayName + '<br/>' + content;\n    yOffset += 8;\n  }\n\n  return [content, yOffset];\n}\n\n/**\n * Optional callback, invoked before showing annotation tooltip\n */\nfunction onWillShowAnnotTooltip(annot) {\n  call(this.onWillShowAnnotTooltipCallback, annot);\n}\n\n/**\n * Shows a tooltip for the given annotation.\n *\n * See notes in startHideAnnotTooltipTimeout about show/hide logic.\n *\n * @param annot {Object} Processed annotation object\n * @param context {Object} \"This\" of the caller -- an SVG path DOM object\n */\nfunction showAnnotTooltip(annot, context) {\n  var matrix, content, yOffset, tooltip,\n    ideo = this;\n\n  if (ideo.config.showAnnotTooltip === false) return;\n\n  clearTimeout(ideo.hideAnnotTooltipTimeout);\n\n  if (ideo.onWillShowAnnotTooltipCallback) {\n    annot = ideo.onWillShowAnnotTooltipCallback(annot);\n  }\n\n  tooltip = d3.select('._ideogramTooltip');\n  tooltip.interrupt(); // Stop any in-progress disapperance\n\n  matrix = context.getScreenCTM()\n    .translate(+context.getAttribute('cx'), +context.getAttribute('cy'));\n\n  [content, yOffset] = getContentAndYOffset(annot)\n\n  writeTooltip(tooltip, content, matrix, yOffset, ideo)\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/events.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/filter.js":
/*!************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/filter.js ***!
  \************************************************************/
/*! exports provided: restoreDefaultTracks, setOriginalTrackIndexes, updateDisplayedTracks */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"restoreDefaultTracks\", function() { return restoreDefaultTracks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setOriginalTrackIndexes\", function() { return setOriginalTrackIndexes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateDisplayedTracks\", function() { return updateDisplayedTracks; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Reset displayed tracks to those originally displayed\n */\nfunction restoreDefaultTracks() {\n  var ideo = this;\n  ideo.config.numAnnotTracks = ideo.config.annotationsNumTracks;\n  d3.selectAll(ideo.selector + ' .annot').remove();\n  ideo.drawAnnots(ideo.processAnnotData(ideo.rawAnnots));\n}\n\nfunction getDisplayedRawAnnotsByChr(annotsByChr, trackIndexes) {\n  var annot, displayedRawAnnotsByChr, annots, i, displayedAnnots, j,\n    trackIndex;\n\n  displayedRawAnnotsByChr = [];\n\n  // Filter displayed tracks by selected track indexes\n  for (i = 0; i < annotsByChr.length; i++) {\n    annots = annotsByChr[i];\n    displayedAnnots = [];\n    for (j = 0; j < annots.annots.length; j++) {\n      annot = annots.annots[j].slice(); // copy array by value\n      trackIndex = annot[3] + 1;\n      if (trackIndexes.includes(trackIndex)) {\n        annot[3] = trackIndexes.indexOf(trackIndex);\n        displayedAnnots.push(annot);\n      }\n    }\n    displayedRawAnnotsByChr.push({chr: annots.chr, annots: displayedAnnots});\n  }\n\n  return displayedRawAnnotsByChr;\n}\n\n/**\n * Adds or removes tracks from the displayed list of tracks.\n * Only works when raw annotations are dense.\n *\n * @param trackIndexes Array of indexes of tracks to display\n */\nfunction updateDisplayedTracks(trackIndexes) {\n  var displayedRawAnnotsByChr, displayedAnnots, rawAnnots,\n    ideo = this,\n    annotsByChr = ideo.rawAnnots.annots;\n\n  ideo.config.numAnnotTracks = trackIndexes.length;\n\n  displayedRawAnnotsByChr =\n    getDisplayedRawAnnotsByChr(annotsByChr, trackIndexes);\n  rawAnnots = {keys: ideo.rawAnnots.keys, annots: displayedRawAnnotsByChr};\n\n  displayedAnnots = ideo.processAnnotData(rawAnnots);\n\n  d3.selectAll(ideo.selector + ' .annot').remove();\n  ideogram.displayedTrackIndexes = trackIndexes;\n  ideo.drawAnnots(displayedAnnots);\n\n  return displayedAnnots;\n}\n\nfunction getSetAnnotsByChr(annotsByChr, ideo) {\n  var i, j, annots, annot, setAnnots, trackIndexOriginal, numAvailTracks,\n    setAnnotsByChr = [];\n\n  numAvailTracks = 1;\n\n  for (i = 0; i < annotsByChr.length; i++) {\n    annots = annotsByChr[i];\n    setAnnots = [];\n    for (j = 0; j < annots.annots.length; j++) {\n      annot = annots.annots[j].slice();\n      trackIndexOriginal = annot[3];\n      if (trackIndexOriginal + 1 > numAvailTracks) {\n        numAvailTracks = trackIndexOriginal + 1;\n      }\n      annot.splice(4, 0, trackIndexOriginal);\n      setAnnots.push(annot);\n    }\n    setAnnotsByChr.push({chr: annots.chr, annots: setAnnots});\n  }\n\n  ideo.numAvailTracks = numAvailTracks;\n\n  return setAnnotsByChr;\n}\n\nfunction setOriginalTrackIndexes(rawAnnots) {\n  var keys, annotsByChr, setAnnotsByChr,\n    ideo = this;\n\n  keys = rawAnnots.keys;\n\n  // If this method is unnecessary, pass through\n  if (\n    keys.length < 4 ||\n    keys[3] !== 'trackIndex' ||\n    keys[4] === 'trackIndexOriginal'\n  ) {\n    return rawAnnots;\n  }\n\n  annotsByChr = rawAnnots.annots;\n  setAnnotsByChr = getSetAnnotsByChr(annotsByChr, ideo);\n\n  keys.splice(4, 0, 'trackIndexOriginal');\n  rawAnnots = {keys: keys, annots: setAnnotsByChr};\n  if (ideo.rawAnnots.metadata) rawAnnots.metadata = ideo.rawAnnots.metadata;\n\n  return rawAnnots;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/filter.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/heatmap.js":
/*!*************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/heatmap.js ***!
  \*************************************************************/
/*! exports provided: drawHeatmaps, deserializeAnnotsForHeatmap */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawHeatmaps\", function() { return drawHeatmaps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deserializeAnnotsForHeatmap\", function() { return deserializeAnnotsForHeatmap; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _track_labels__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./track-labels */ \"./node_modules/ideogram/src/js/annotations/track-labels.js\");\n/**\n * @fileoverview Functions for heatmaps of genome annotations.\n * Heatmaps provide an easy way to visualize very dense annotation data.\n * Unlike the rest of Ideogram's graphics, which use SVG, heatmaps are\n * rendered using the Canvas element.\n */\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n\n\n/**\n * Add canvases that will contain annotations.  One canvas per track.\n */\nfunction writeCanvases(chr, chrLeft, ideoHeight, ideo) {\n  var j, trackLeft, trackWidth, canvas, context, id,\n    contextArray = [],\n    numAnnotTracks = ideo.config.numAnnotTracks;\n\n  var marginHack = 7; // TODO: Make this dynamic\n\n  // Create a canvas for each annotation track on this chromosome\n  for (j = 0; j < numAnnotTracks; j++) {\n    trackWidth = ideo.config.annotationHeight;\n    id = chr.id + '-canvas-' + j; // e.g. chr1-9606-canvas-0\n    trackLeft = chrLeft - trackWidth * (numAnnotTracks - j) - marginHack;\n    canvas = d3.select(ideo.config.container + ' #_ideogramInnerWrap')\n      .append('canvas')\n      .attr('id', id)\n      .attr('width', trackWidth)\n      .attr('height', ideoHeight)\n      .style('position', 'absolute')\n      .style('left', trackLeft + 'px');\n    context = canvas.nodes()[0].getContext('2d');\n    contextArray.push(context);\n  }\n\n  return contextArray;\n}\n\n/**\n * Render annotations on the canvas\n */\nfunction fillCanvasAnnots(annots, contextArray, chrWidth, ideoMarginTop) {\n  var j, annot, context, x;\n\n  // Fill in the canvas(es) with annotation colors to draw a heatmap\n  for (j = 0; j < annots.length; j++) {\n    annot = annots[j];\n    context = contextArray[annot.trackIndex];\n    context.fillStyle = annot.color;\n    x = annot.trackIndex - 1;\n    context.fillRect(x, annot.startPx + ideoMarginTop, chrWidth, 0.5);\n  }\n}\n\n/**\n * Draw a 1D heatmap of annotations along each chromosome.\n * Ideal for representing very dense annotation sets in a granular manner\n * without subsampling.\n *\n * TODO:\n * - Support in 'horizontal' orientation\n * - Support after rotating chromosome on click\n */\nfunction drawHeatmaps(annotContainers) {\n  var annots, chrLeft, contextArray, chrWidth, i, chr,\n    ideo = this,\n    ideoMarginTop = ideo._layout.margin.top,\n    ideoHeight = ideo.config.chrHeight + ideoMarginTop;\n\n  d3.selectAll(ideo.config.container + ' canvas').remove();\n\n  Object(_track_labels__WEBPACK_IMPORTED_MODULE_1__[\"writeTrackLabelContainer\"])(ideo);\n\n  // Each \"annotationContainer\" represents annotations for a chromosome\n  for (i = 0; i < annotContainers.length; i++) {\n\n    annots = annotContainers[i].annots;\n    chr = ideo.chromosomesArray[i];\n    chrWidth = ideo.config.chrWidth;\n    chrLeft = ideo._layout.getChromosomeSetYTranslate(i);\n\n    contextArray = writeCanvases(chr, chrLeft, ideoHeight, ideo);\n    fillCanvasAnnots(annots, contextArray, chrWidth, ideoMarginTop);\n  }\n\n  d3.selectAll(ideo.config.container + ' canvas')\n    .on('mouseover', function() { Object(_track_labels__WEBPACK_IMPORTED_MODULE_1__[\"showTrackLabel\"])(this, ideo); })\n    .on('mouseout', function() { Object(_track_labels__WEBPACK_IMPORTED_MODULE_1__[\"startHideTrackLabelTimeout\"])(ideo); });\n\n  if (ideo.onDrawAnnotsCallback) {\n    ideo.onDrawAnnotsCallback();\n  }\n}\n\n/**\n * Given annotation value (m), should it use the color in this threshold?\n */\nfunction shouldUseThresholdColor(m, numThresholds, value, prevThreshold,\n  threshold) {\n\n  return (\n    // If this is the last threshold, and\n    // its value is \"+\" and the value is above the previous threshold...\n    m === numThresholds && (\n      threshold === '+' && value > prevThreshold\n    ) ||\n\n    // ... or if the value matches the threshold...\n    value === threshold ||\n\n    // ... or if this isn't the first or last threshold, and\n    // the value is between this threshold and the previous one...\n    m !== 0 && m !== numThresholds && (\n      value <= threshold &&\n      value > prevThreshold\n    ) ||\n\n    // ... or if this is the first threshold and the value is\n    // at or below the threshold\n    m === 0 && value <= threshold\n  );\n}\n\n/**\n * Determine the color of the heatmap annotation.\n */\nfunction getHeatmapAnnotColor(thresholds, value) {\n  var m, numThresholds, thresholdList, threshold, tvNum, thresholdColor,\n    prevThreshold, useThresholdColor, color;\n\n  for (m = 0; m < thresholds.length; m++) {\n    numThresholds = thresholds.length - 1;\n    thresholdList = thresholds[m];\n    threshold = thresholdList[0];\n\n    // The threshold value is usually an integer,\n    // but can also be a \"+\" character indicating that\n    // this threshold is anything greater than the previous threshold.\n    tvNum = parseFloat(threshold);\n    if (isNaN(tvNum) === false) threshold = tvNum;\n    if (m !== 0) prevThreshold = parseFloat(thresholds[m - 1][0]);\n    thresholdColor = thresholdList[1];\n\n    useThresholdColor = shouldUseThresholdColor(m, numThresholds, value,\n      prevThreshold, threshold);\n\n    if (useThresholdColor) color = thresholdColor;\n  }\n\n  return color;\n}\n\n/**\n * Set color and track index for raw annotation objects.\n */\nfunction getNewRawAnnots(heatmapKeyIndexes, rawAnnots, ideo) {\n  var j, k, ra, newRa, value, thresholds, color, trackIndex,\n    newRas = [];\n\n  for (j = 0; j < rawAnnots.length; j++) {\n    ra = rawAnnots[j];\n    for (k = 0; k < heatmapKeyIndexes.length; k++) {\n      newRa = ra.slice(0, 3); // name, start, length\n\n      value = ra[heatmapKeyIndexes[k]];\n      thresholds = ideo.config.heatmaps[k].thresholds;\n      color = getHeatmapAnnotColor(thresholds, value);\n\n      trackIndex = k;\n      newRa.push(trackIndex, color, value);\n      newRas.push(newRa);\n    }\n  }\n\n  return newRas;\n}\n\nfunction getNewRawAnnotContainers(heatmapKeyIndexes, rawAnnotBoxes, ideo) {\n  var raContainer, chr, rawAnnots, newRas, i,\n    newRaContainers = [];\n\n  for (i = 0; i < rawAnnotBoxes.length; i++) {\n    raContainer = rawAnnotBoxes[i];\n    chr = raContainer.chr;\n\n    rawAnnots = raContainer.annots;\n    newRas = getNewRawAnnots(heatmapKeyIndexes, rawAnnots, ideo);\n\n    newRaContainers.push({chr: chr, annots: newRas});\n  }\n  return newRaContainers;\n}\n\nfunction reportPerformance(t0, ideo) {\n  var t1 = new Date().getTime();\n  if (ideo.config.debug) {\n    console.log('Time in deserializeAnnotsForHeatmap: ' + (t1 - t0) + ' ms');\n  }\n}\n\n/**\n * Deserialize compressed annotation data into a format suited for heatmaps.\n *\n * This enables the annotations to be downloaded from a server without the\n * requested annotations JSON needing to explicitly specify track index or\n * color.  The track index and color are inferred from the \"heatmaps\" Ideogram\n * configuration option defined before ideogram initialization.\n *\n * This saves time for the user.\n *\n * @param rawAnnotsContainer {Object} Raw annotations as passed from server\n */\nfunction deserializeAnnotsForHeatmap(rawAnnotsContainer) {\n  var newRaContainers, heatmapKey, heatmapKeyIndexes, i,\n    t0 = new Date().getTime(),\n    keys = rawAnnotsContainer.keys,\n    rawAnnotBoxes = rawAnnotsContainer.annots,\n    ideo = this;\n\n  heatmapKeyIndexes = [];\n  for (i = 0; i < ideo.config.heatmaps.length; i++) {\n    heatmapKey = ideo.config.heatmaps[i].key;\n    heatmapKeyIndexes.push(keys.indexOf(heatmapKey));\n  }\n\n  newRaContainers =\n    getNewRawAnnotContainers(heatmapKeyIndexes, rawAnnotBoxes, ideo);\n\n  keys.splice(3, 0, 'trackIndex');\n  keys.splice(4, 0, 'color');\n\n  ideo.rawAnnots.keys = keys;\n  ideo.rawAnnots.annots = newRaContainers;\n\n  reportPerformance(t0, ideo);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/heatmap.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/histogram.js":
/*!***************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/histogram.js ***!
  \***************************************************************/
/*! exports provided: getHistogramBars, writeHistogramAnnots */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getHistogramBars\", function() { return getHistogramBars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeHistogramAnnots\", function() { return writeHistogramAnnots; });\n/**\n * Get containers to group individual annotations into higher-level \"bar\"\n * annotations.\n */\nfunction getRawBars(chrModels, ideo) {\n  var chr, chrModel, lastBand, numBins, bar, i, px,\n    barWidth = ideo.config.barWidth,\n    bars = [];\n\n  for (chr in chrModels) {\n    chrModel = chrModels[chr];\n    lastBand = chrModel.bands[chrModel.bands.length - 1];\n    numBins = Math.round(lastBand.px.stop / barWidth); // chrPxStop / barWidth\n    bar = {chr: chr, annots: []};\n    for (i = 0; i < numBins; i++) {\n      px = i * barWidth - ideo.bump;\n      bar.annots.push({\n        bp: ideo.convertPxToBp(chrModel, px + ideo.bump),\n        px: px,\n        count: 0,\n        chrIndex: chrModel.chrIndex,\n        chrName: chr,\n        color: ideo.config.annotationsColor,\n        annots: []\n      });\n    }\n    bars.push(bar);\n  }\n  return bars;\n}\n\n/**\n * Assign how many, and which annotations each histogram bar contains\n */\nfunction assignAnnotsToBars(annots, bars, chrModels, ideo) {\n  var chr, chrAnnots, chrModel, barAnnots, i, annot, px, j, barPx, nextBarPx,\n    barWidth = ideo.config.barWidth;\n\n  for (chr in annots) {\n    chrAnnots = annots[chr].annots;\n    chrModel = chrModels[annots[chr].chr]; // get chr by name\n    barAnnots = bars[chrModel.chrIndex].annots;\n    for (i = 0; i < chrAnnots.length; i++) {\n      annot = chrAnnots[i];\n      px = annot.px - ideo.bump;\n      for (j = 0; j < barAnnots.length; j++) {\n        barPx = barAnnots[j].px;\n        nextBarPx = barPx + barWidth;\n        if (j === barAnnots.length - 1) nextBarPx += barWidth;\n        if (px >= barPx && px < nextBarPx) {\n          bars[chrModel.chrIndex].annots[j].count += 1;\n          bars[chrModel.chrIndex].annots[j].annots.push(annot);\n          break;\n        }\n      }\n    }\n  }\n  return bars;\n}\n\nfunction setIdeoMaxAnnotsPerBar(bars, isFirstGet, ideo) {\n  var maxAnnotsPerBarAllChrs, i, maxAnnotsPerBar, annots, chr, j, barCount;\n\n  if (isFirstGet || ideo.config.histogramScaling === 'relative') {\n    maxAnnotsPerBarAllChrs = 0;\n    for (i = 0; i < bars.length; i++) {\n      maxAnnotsPerBar = 0;\n      annots = bars[i].annots;\n      chr = bars[i].chr;\n      for (j = 0; j < annots.length; j++) {\n        barCount = annots[j].count;\n        if (barCount > maxAnnotsPerBar) maxAnnotsPerBar = barCount;\n        if (barCount > maxAnnotsPerBarAllChrs) {\n          maxAnnotsPerBarAllChrs = barCount;\n        }\n      }\n      ideo.maxAnnotsPerBar[chr] = maxAnnotsPerBar;\n    }\n    ideo.maxAnnotsPerBarAllChrs = maxAnnotsPerBarAllChrs;\n  }\n}\n\n/**\n * Set each bar's height to be proportional to the height of the bar with the\n * most annotations\n */\nfunction setProportionalBarHeight(annots, bars, ideo) {\n  var i, annots, chr, j, barCount, barCountRatio, height,\n    ideoIsRotated = ideo._layout._isRotated;\n\n  for (i = 0; i < bars.length; i++) {\n    annots = bars[i].annots;\n    chr = bars[i].chr;\n    for (j = 0; j < annots.length; j++) {\n      barCount = annots[j].count;\n      if (ideo.config.histogramScaling === 'relative') {\n        barCountRatio = barCount / ideo.maxAnnotsPerBar[chr];\n      } else {\n        barCountRatio = barCount / ideo.maxAnnotsPerBarAllChrs;\n      }\n      if (ideoIsRotated === false) {\n        height = barCountRatio * ideo.config.chrMargin;\n      } else {\n        height = barCountRatio * ideo.config.chrHeightOriginal * 3;\n      }\n      bars[i].annots[j].height = height;\n    }\n  }\n  return bars;\n}\n\nfunction reportGetHistogramBarPerformance(t0, ideo) {\n  var t1 = new Date().getTime();\n  if (ideo.config.debug) {\n    console.log('Time spent in getHistogramBars: ' + (t1 - t0) + ' ms');\n  }\n}\n\nfunction setIdeoHistogramScaling(ideo) {\n  if ('histogramScaling' in ideo.config === false) {\n    ideo.config.histogramScaling = 'absolute';\n  }\n}\n\n/**\n * Returns and sets bars used for histogram\n */\nfunction getHistogramBars(annots) {\n  var chrModels, bars,\n    isFirstGet = false,\n    t0 = new Date().getTime(),\n    ideo = this;\n\n  chrModels = ideo.chromosomes[ideo.config.taxid];\n\n  setIdeoHistogramScaling(ideo);\n\n  if (typeof ideo.maxAnnotsPerBar === 'undefined') {\n    ideo.maxAnnotsPerBar = {};\n    isFirstGet = true;\n  }\n\n  bars = getRawBars(chrModels, ideo);\n  bars = assignAnnotsToBars(annots, bars, chrModels, ideo);\n  setIdeoMaxAnnotsPerBar(bars, isFirstGet, ideo);\n  bars = setProportionalBarHeight(annots, bars, ideo);\n\n  reportGetHistogramBarPerformance(t0, ideo)\n  ideo.bars = bars;\n  return bars;\n}\n\nfunction getHistogramPoints(d, chrWidth, chrWidths, ideo) {\n  var x1, x2, y1, y2;\n\n  x1 = d.px + ideo.bump;\n  x2 = d.px + ideo.config.barWidth + ideo.bump;\n  y1 = chrWidth;\n  y2 = chrWidth + d.height;\n\n  var thisChrWidth = chrWidths[d.chr];\n\n  if (x2 > thisChrWidth) {\n    x2 = thisChrWidth;\n  }\n\n  return (\n    x1 + ',' + y1 + ' ' +\n    x2 + ',' + y1 + ' ' +\n    x2 + ',' + y2 + ' ' +\n    x1 + ',' + y2\n  );\n}\n\nfunction writeHistogramAnnots(chrAnnot, ideo) {\n  var chrs, chr,\n    chrWidths = {},\n    chrWidth = ideo.config.chrWidth;\n\n  chrs = ideo.chromosomes[ideo.config.taxid];\n  for (chr in chrs) {\n    chrWidths[chr] = chrs[chr];\n  }\n\n  chrAnnot.append('polygon')\n    // .attr('id', function(d, i) { return d.id; })\n    .attr('class', 'annot')\n    .attr('points', function(d) {\n      return getHistogramPoints(d, chrWidth, chrWidths, ideo);\n    })\n    .attr('fill', function(d) { return d.color; });\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/histogram.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/legend.js":
/*!************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/legend.js ***!
  \************************************************************/
/*! exports provided: writeLegend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeLegend\", function() { return writeLegend; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/**\n * @fileoverview Functions for drawing a legend for genome annotations.\n * A legend consists of rows, each with a colored icon and a text label.\n * Icons may have different shapes.  A legend may also have a name.\n */\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nvar lineHeight = 19;\n\nvar legendStyle =\n  '#_ideogramLegend {font: 12px Arial; line-height: 19px;} ' +\n  '#_ideogramLegend svg {float: left;} ' +\n  '#_ideogramLegend ul {' +\n    'position: relative; left: -14px; list-style: none; float: left; ' +\n    'padding-left: 10px; margin-top: 0px;' +\n  '} ' +\n  '#_ideogramLegend ul span {position: relative; left: -15px;} ';\n\nfunction getIcon(row) {\n  var icon, triangleAttrs, circleAttrs, rectAttrs,\n    fill = 'fill=\"' + row.color + '\" style=\"stroke: #AAA;\"',\n    shape = row.shape;\n\n  triangleAttrs = 'd=\"m7,3 l -5 9 l 9 0 z\"';\n  circleAttrs = 'd=\"m2,9a 4.5,4.5 0 1,0 9,0a 4.5,4.5 0 1,0 -9,0\"';\n  rectAttrs = 'height=\"10\" width=\"10\"  y=\"3\"';\n\n  if ('shape' in row && ['circle', 'triangle'].includes(shape)) {\n    if (shape === 'circle') {\n      icon = '<path ' + circleAttrs + ' ' + fill + '></path>';\n    } else if (shape === 'triangle') {\n      icon = '<path ' + triangleAttrs + ' ' + fill + '></path>';\n    }\n  } else {\n    icon = '<rect ' + rectAttrs + ' ' + fill + '/>';\n  }\n\n  return icon;\n}\n\nfunction getListItems(labels, svg, list) {\n  var i, icon, y, row;\n  for (i = 0; i < list.rows.length; i++) {\n    row = list.rows[i];\n    labels += '<li>' + row.name + '</li>';\n    y = lineHeight * i;\n    if ('name' in list) y += lineHeight;\n    icon = getIcon(row);\n    svg += '<g transform=\"translate(0, ' + y + ')\">' + icon + '</g>';\n  }\n\n  return [labels, svg];\n}\n\n/**\n * Display a legend for genome annotations, using `legend` configuration option\n */\nfunction writeLegend(ideo) {\n  var i, legend, svg, labels, list, content;\n\n  d3.select(ideo.config.container + ' #_ideogramLegend').remove();\n\n  legend = ideo.config.legend;\n  content = '';\n\n  for (i = 0; i < legend.length; i++) {\n    list = legend[i];\n    if ('name' in list) labels = '<span>' + list.name + '</span>';\n    svg = '<svg width=\"' + lineHeight + '\">';\n    [labels, svg] = getListItems(labels, svg, list);\n    svg += '</svg>'\n    content += svg + '<ul>' + labels + '</ul>';\n  }\n\n  var target = d3.select(ideo.config.container + ' #_ideogramOuterWrap');\n  target.append('style').html(legendStyle)\n  target.append('div').attr('id', '_ideogramLegend').html(content);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/legend.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/process.js":
/*!*************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/process.js ***!
  \*************************************************************/
/*! exports provided: processAnnotData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processAnnotData\", function() { return processAnnotData; });\n// Default colors for tracks of annotations\nvar colorMap = [\n  ['F00'], // If there is 1 track, then color it red.\n  ['F00', '88F'], // If 2 tracks, color one red and one light blue.\n  ['F00', 'CCC', '88F'], // If 3, color one red, one grey, one light blue.\n  ['F00', 'FA0', '0AF', '88F'], // And so on.\n  ['F00', 'FA0', 'CCC', '0AF', '88F'],\n  ['F00', 'FA0', '875', '578', '0AF', '88F'],\n  ['F00', 'FA0', '875', 'CCC', '578', '0AF', '88F'],\n  ['F00', 'FA0', '7A0', '875', '0A7', '578', '0AF', '88F'],\n  ['F00', 'FA0', '7A0', '875', 'CCC', '0A7', '578', '0AF', '88F'],\n  ['F00', 'FA0', '7A0', '875', '552', '255', '0A7', '578', '0AF', '88F']\n];\n\n/**\n * Ensure annotation containers are ordered by chromosome.\n */\nfunction orderAnnotContainers(annots, ideo) {\n  var unorderedAnnots, i, j, annot, chr, chrs;\n\n  unorderedAnnots = annots;\n  annots = [];\n  chrs = ideo.chromosomesArray;\n  for (i = 0; i < chrs.length; i++) {\n    chr = chrs[i].name;\n    for (j = 0; j < unorderedAnnots.length; j++) {\n      annot = unorderedAnnots[j];\n      if (annot.chr === chr) {\n        annots.push(annot);\n      }\n    }\n  }\n\n  return annots;\n}\n\n/**\n * Add client annotations, as in annotations-tracks.html\n */\nfunction addClientAnnot(annots, annot, ra, m, ideo) {\n  var annotTrack;\n\n  annot.trackIndex = ra[3];\n  annotTrack = ideo.config.annotationTracks[annot.trackIndex];\n  if (annotTrack.color) {\n    annot.color = annotTrack.color;\n  }\n  if (annotTrack.shape) {\n    annot.shape = annotTrack.shape;\n  }\n\n  annots[m].annots.push(annot);\n\n  return annots;\n}\n\n/**\n * Add sparse server annotations, as in annotations-track-filters.html\n */\nfunction addSparseServertAnnot(annot, ra, omittedAnnots, annots, m, ideo) {\n  var colors = colorMap[ideo.numAvailTracks - 1];\n\n  annot.trackIndex = ra[3];\n  annot.trackIndexOriginal = ra[4];\n  annot.color = '#' + colors[annot.trackIndexOriginal];\n\n  // Catch annots that will be omitted from display\n  if (annot.trackIndex > ideo.config.numTracks - 1) {\n    if (annot.trackIndex in omittedAnnots) {\n      omittedAnnots[annot.trackIndex].push(annot);\n    } else {\n      omittedAnnots[annot.trackIndex] = [annot];\n    }\n    return [annots, omittedAnnots];\n  }\n  annots[m].annots.push(annot);\n\n  return [annots, omittedAnnots];\n}\n\n// TODO: This needs a working test case.\n// function addDenseServerAnnot(keys, annots, annot, m) {\n//   var n, thisAnnot;\n\n//   // Dense server annotations\n//   for (n = 4; n < keys.length; n++) {\n//     thisAnnot = Object.assign({}, annot); // copy by value\n//     thisAnnot.trackIndex = n - 4;\n//     thisAnnot.trackIndexOriginal = n - 3;\n//     thisAnnot.color = '#' + colors[thisAnnot.trackIndexOriginal];\n//     annots[m].annots.push(thisAnnot);\n//   }\n\n//   return annots;\n// }\n\n/**\n * Basic client annotations, as in annotations-basic.html\n * and annotations-external.html\n */\nfunction addBasicClientAnnot(annots, annot, m, ideo) {\n  annot.trackIndex = 0;\n  if (!annot.color) {\n    annot.color = ideo.config.annotationsColor;\n  }\n  if (!annot.shape) {\n    annot.shape = 'triangle';\n  }\n  annots[m].annots.push(annot);\n\n  return annots;\n}\n\nfunction addAnnot(annot, keys, ra, omittedAnnots, annots, m, ideo) {\n\n  if (ideo.config.annotationTracks) {\n    annots = addClientAnnot(annots, annot, ra, m, ideo);\n  } else if (keys[3] === 'trackIndex' && ideo.numAvailTracks !== 1) {\n    [annots, omittedAnnots] = \n      addSparseServertAnnot(annot, ra, omittedAnnots, annots, m, ideo);\n  // } else if (\n  //   keys.length > 3 &&\n  //   keys[3] in {trackIndex: 1, color: 1, shape: 1} === false &&\n  //   keys[4] === 'trackIndexOriginal'\n  // ) {\n  //   annots = addDenseServerAnnot(keys, annots, annot, m);\n  } else {\n    annots = addBasicClientAnnot(annots, annot, m, ideo);\n  }\n\n  return [annots, omittedAnnots];\n}\n\nfunction addAnnotsForChr(annots, omittedAnnots, annotsByChr, chrModel,\n  m, keys, ideo) {\n  var j, k, annot, ra;\n\n  for (j = 0; j < annotsByChr.annots.length; j++) {\n    ra = annotsByChr.annots[j];\n    annot = {};\n\n    for (k = 0; k < keys.length; k++) {\n      annot[keys[k]] = ra[k];\n    }\n\n    annot.stop = annot.start + annot.length;\n\n    annot.chr = annotsByChr.chr;\n    annot.chrIndex = m;\n    annot.startPx = ideo.convertBpToPx(chrModel, annot.start);\n    annot.stopPx = ideo.convertBpToPx(chrModel, annot.stop);\n    annot.px = Math.round((annot.startPx + annot.stopPx) / 2);\n\n    [annots, omittedAnnots] = \n      addAnnot(annot, keys, ra, omittedAnnots, annots, m, ideo);\n  }\n\n  return [annots, omittedAnnots];\n}\n\nfunction warnOfUndefinedChromosome(annotsByChr) {\n  console.warn(\n    'Chromosome \"' + annotsByChr.chr + '\" undefined in ideogram; ' +\n    annotsByChr.annots.length + ' annotations not shown'\n  );\n}\n\nfunction addAnnots(rawAnnots, keys, ideo) {\n  var m, i, annotsByChr, chrModel,\n    annots = [],\n    omittedAnnots = {};\n\n  m = -1;\n  for (i = 0; i < rawAnnots.length; i++) {\n    annotsByChr = rawAnnots[i];\n    chrModel = ideo.chromosomes[ideo.config.taxid][annotsByChr.chr];\n\n    if (typeof chrModel === 'undefined') {\n      warnOfUndefinedChromosome(annotsByChr);\n      continue;\n    }\n\n    m++;\n    annots.push({chr: annotsByChr.chr, annots: []});\n\n    [annots, omittedAnnots] =\n      addAnnotsForChr(annots, omittedAnnots, annotsByChr, chrModel,\n        m, keys, ideo);\n  }\n  return [annots, omittedAnnots];\n}\n\nfunction sendTrackAndAnnotWarnings(omittedAnnots, ideo) {\n  var numOmittedTracks,\n    numTracks = ideo.config.numAnnotTracks;;\n\n  if (numTracks > 10) {\n    console.error(\n      'Ideogram only displays up to 10 tracks at a time.  ' +\n      'You specified ' + numTracks + ' tracks.  ' +\n      'Perhaps consider a different way to visualize your data.'\n    );\n  }\n\n  numOmittedTracks = Object.keys(omittedAnnots).length;\n  if (numOmittedTracks) {\n    console.warn(\n      'Ideogram configuration specified ' + numTracks + ' tracks, ' +\n      'but loaded annotations contain ' + numOmittedTracks + ' ' +\n      'extra tracks.'\n    );\n  }\n}\n\n/**\n * Proccesses genome annotation data.\n *\n * This method converts raw annotation data from server, which is structured as\n * an array of arrays, into a more verbose data structure consisting of an\n * array of objects.  It also adds pixel offset information.\n */\nfunction processAnnotData(rawAnnots) {\n  var keys, annots, omittedAnnots,\n    ideo = this;\n\n  keys = rawAnnots.keys;\n  rawAnnots = rawAnnots.annots;\n\n  [annots, omittedAnnots] = addAnnots(rawAnnots, keys, ideo);\n  annots = orderAnnotContainers(annots, ideo);\n\n  sendTrackAndAnnotWarnings(omittedAnnots, ideo)\n\n  return annots;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/process.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/synteny.js":
/*!*************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/synteny.js ***!
  \*************************************************************/
/*! exports provided: drawSynteny */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawSynteny\", function() { return drawSynteny; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction writeSyntenicRegion(syntenies, regionID, ideo) {\n  return syntenies.append('g')\n    .attr('class', 'syntenicRegion')\n    .attr('id', regionID)\n    .on('click', function() {\n      var activeRegion = this;\n      var others = d3.selectAll(ideo.selector + ' .syntenicRegion')\n        .filter(function() {\n          return (this !== activeRegion);\n        });\n\n      others.classed('hidden', !others.classed('hidden'));\n    })\n    .on('mouseover', function() {\n      var activeRegion = this;\n      d3.selectAll(ideo.selector + ' .syntenicRegion')\n        .filter(function() { return (this !== activeRegion); })\n        .classed('ghost', true);\n    })\n    .on('mouseout', function() {\n      d3.selectAll(ideo.selector + ' .syntenicRegion')\n        .classed('ghost', false);\n    });\n}\n\nfunction getRegionsR1AndR2(regions, xOffset, ideo) {\n  var r1, r2;\n\n  r1 = regions.r1;\n  r2 = regions.r2;\n\n  r1.startPx = ideo.convertBpToPx(r1.chr, r1.start) + xOffset;\n  r1.stopPx = ideo.convertBpToPx(r1.chr, r1.stop) + xOffset;\n  r2.startPx = ideo.convertBpToPx(r2.chr, r2.start) + xOffset;\n  r2.stopPx = ideo.convertBpToPx(r2.chr, r2.stop) + xOffset;\n\n  return [r1, r2];\n}\n\nfunction writeSyntenicRegionPolygons(syntenicRegion, x1, x2, r1, r2, regions) {\n  var color, opacity;\n\n  color = ('color' in regions) ? regions.color : '#CFC';\n  opacity = ('opacity' in regions) ? regions.opacity : 1;\n\n  syntenicRegion.append('polygon')\n    .attr('points',\n      x1 + ', ' + r1.startPx + ' ' +\n      x1 + ', ' + r1.stopPx + ' ' +\n      x2 + ', ' + r2.stopPx + ' ' +\n      x2 + ', ' + r2.startPx\n    )\n    .attr('style', 'fill: ' + color + '; fill-opacity: ' + opacity);\n}\n\nfunction writeSyntenicRegionLines(syntenicRegion, x1, x2, r1, r2) {\n  syntenicRegion.append('line')\n    .attr('class', 'syntenyBorder')\n    .attr('x1', x1)\n    .attr('x2', x2)\n    .attr('y1', r1.startPx)\n    .attr('y2', r2.startPx);\n\n  syntenicRegion.append('line')\n    .attr('class', 'syntenyBorder')\n    .attr('x1', x1)\n    .attr('x2', x2)\n    .attr('y1', r1.stopPx)\n    .attr('y2', r2.stopPx);\n}\n\nfunction writeSyntenicRegions(syntenicRegions, syntenies, xOffset, ideo) {\n  var i, regions, r1, r2, regionID, syntenicRegion, chrWidth, x1, x2;\n\n  for (i = 0; i < syntenicRegions.length; i++) {\n    regions = syntenicRegions[i];\n\n    [r1, r2] = getRegionsR1AndR2(regions, xOffset, ideo)\n\n    regionID = (\n      r1.chr.id + '_' + r1.start + '_' + r1.stop + '_' +\n      '__' +\n      r2.chr.id + '_' + r2.start + '_' + r2.stop\n    );\n\n    syntenicRegion = writeSyntenicRegion(syntenies, regionID, ideo);\n\n    chrWidth = ideo.config.chrWidth;\n    x1 = ideo._layout.getChromosomeSetYTranslate(0);\n    x2 = ideo._layout.getChromosomeSetYTranslate(1) - chrWidth;\n\n    writeSyntenicRegionPolygons(syntenicRegion, x1, x2, r1, r2, regions);\n    writeSyntenicRegionLines(syntenicRegion, x1, x2, r1, r2);\n  }\n}\n\nfunction reportPerformance(t0, ideo) {\n  var t1 = new Date().getTime();\n  if (ideo.config.debug) {\n    console.log('Time in drawSyntenicRegions: ' + (t1 - t0) + ' ms');\n  }\n}\n\n/**\n * Draws a trapezoid connecting a genomic range on\n * one chromosome to a genomic range on another chromosome;\n * a syntenic region.\n */\nfunction drawSynteny(syntenicRegions) {\n  var syntenies, xOffset, \n    t0 = new Date().getTime(),\n    ideo = this;\n\n  syntenies = d3.select(ideo.selector)\n    .insert('g', ':first-child')\n    .attr('class', 'synteny');\n\n  xOffset = ideo._layout.margin.left;\n\n  writeSyntenicRegions(syntenicRegions, syntenies, xOffset, ideo);\n\n  reportPerformance(t0, ideo);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/synteny.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/annotations/track-labels.js":
/*!******************************************************************!*\
  !*** ./node_modules/ideogram/src/js/annotations/track-labels.js ***!
  \******************************************************************/
/*! exports provided: startHideTrackLabelTimeout, writeTrackLabelContainer, showTrackLabel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startHideTrackLabelTimeout\", function() { return startHideTrackLabelTimeout; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeTrackLabelContainer\", function() { return writeTrackLabelContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showTrackLabel\", function() { return showTrackLabel; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/**\n * @fileoverview Functions for labeling tracks of genome annotations.\n * Tracks are columns of annotations that run beside a chromosome.\n * Labeling tracks with descriptive names makes them easier to understand.\n */\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nvar reservedTrackKeys = [\n  'name', 'start', 'length', 'trackIndex', 'trackIndexOriginal', 'color'\n];\n\n/**\n * Start a timer that, upon expiring, hides the track label.\n *\n * To enable users to copy label content to their clipboard, a timer is\n * used to control when the label disappears.  It starts when the user's\n * cursor leaves the track or the label.  If the user moves the cursor\n * back over the annot or label after the timer starts and before it expires,\n * then the timer is cleared.\n */\nfunction startHideTrackLabelTimeout(ideo) {\n  if (ideo.config.showTrackLabel === false) return;\n\n  ideo.hideTrackLabelTimeout = window.setTimeout(function () {\n    d3.select(ideo.config.container + ' #_ideogramTrackLabel').transition()\n      .duration(500)\n      .style('opacity', 0)\n  }, 250);\n}\n\n/**\n * Write label div setup with default styling.\n */\nfunction writeTrackLabelContainer(ideo) {\n  d3.select(ideo.config.container + ' #_ideogramTrackLabelContainer')\n    .append('div')\n    .attr('id', '_ideogramTrackLabel')\n    .style('opacity', 0)\n    .style('position', 'absolute')\n    .style('text-align', 'center')\n    .style('padding', '1px')\n    .style('font', '11px sans-serif')\n    .style('background', 'white')\n    .style('line-height', '10px')\n    .style('z-index', '9000')\n}\n\n/**\n * Get label text for displayed tracks from annotation container metadata,\n * heatmap keys, or annotation container keys\n */\nfunction getLabels(ideo) {\n  var annotKeys, labels, heatmaps, i;\n\n  if (ideo.rawAnnots.metadata) {\n    labels = ideo.rawAnnots.metadata.trackLabels;\n  } else if (ideo.config.heatmaps) {\n    labels = [];\n    heatmaps = ideo.config.heatmaps;\n    for (i = 0; i < heatmaps.length; i++) {\n      labels.push(heatmaps[i].key);\n    }\n  } else {\n    annotKeys = ideo.rawAnnots.keys.slice(0);\n    labels = annotKeys.filter(d => !reservedTrackKeys.includes(d));\n  }\n\n  if (ideo.displayedTrackIndexes) {\n    labels = labels.filter(function(d, i) {\n      return ideo.displayedTrackIndexes.includes(i + 1);\n    });\n  }\n\n  labels = labels.join('<br>');\n\n  return labels;\n}\n\n/**\n * Display track labels on the page\n */\nfunction renderTrackLabels(top, left, ideo) {\n  d3.select(ideo.config.container + ' #_ideogramTrackLabel')\n    .style('opacity', 1) // Make label visible\n    .style('left', left + 'px')\n    .style('top', top + 'px')\n    .style('width', 'max-content')\n    .style('transform-origin', 'bottom left')\n    .style('text-align', 'left')\n    .on('mouseover', function () {\n      clearTimeout(ideo.hideTrackLabelTimeout);\n    })\n    .on('mouseout', function () {\n      startHideTrackLabelTimeout(ideo);\n    });\n}\n\n/**\n * Get left and top (x and y) offset for track label text\n */\nfunction getTrackLabelOffsets(labels, trackCanvas, ideo) {\n  var labels, firstTrackId, firstTrack, trackBox, labelBox, ideoBox, left, top,\n    marginHack = 7; // TODO: Make this dynamic\n\n  firstTrackId = trackCanvas.id.split('-').slice(0, -1).join('-') + '-0';\n  firstTrack = d3.select(ideo.config.container + ' #' + firstTrackId)\n    .nodes()[0];\n  trackBox = firstTrack.getBoundingClientRect();\n\n  labelBox = d3.select(ideo.config.container + ' #_ideogramTrackLabel')\n    .nodes()[0].getBoundingClientRect();\n  ideoBox = d3.select(ideo.config.container).nodes()[0]\n    .getBoundingClientRect();\n\n  left = Math.round(trackBox.left + labelBox.width) - trackBox.width - 1;\n  left -= ideoBox.left - marginHack;\n  top = -(labels.split('<br>').length - 2) * trackBox.width + 2;\n\n  return [left, top];\n}\n\n/**\n * Show the label for this track\n */\nfunction showTrackLabel(trackCanvas, ideo) {\n    var labels, left, top;\n\n    clearTimeout(ideo.hideTrackLabelTimeout);\n\n    labels = getLabels(ideo);\n\n    // Clear any previous positioning, write track label text to DOM\n    d3.select(ideo.config.container + ' #_ideogramTrackLabel')\n      .interrupt() // Stop any in-progress disapperance\n      .style('top', '')\n      .style('left', '')\n      .style('transform', null)\n      .style('transform', 'rotate(-90deg)')\n      .html(labels);\n\n    [left, top] = getTrackLabelOffsets(labels, trackCanvas, ideo);\n\n    renderTrackLabels(top, left, ideo);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/annotations/track-labels.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/bands.js":
/*!*****************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/bands.js ***!
  \*****************************************************/
/*! exports provided: parseBands, drawBandLabels, getBandColorGradients, processBandData, setBandsToShow, hideUnshownBandLabels, drawBandLabelText, drawBandLabelStalk */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processBandData\", function() { return processBandData; });\n/* harmony import */ var es6_natural_sort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! es6-natural-sort */ \"./node_modules/es6-natural-sort/naturalSort.min.js\");\n/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./draw */ \"./node_modules/ideogram/src/js/bands/draw.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabels\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"drawBandLabels\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getBandColorGradients\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"getBandColorGradients\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setBandsToShow\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"setBandsToShow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hideUnshownBandLabels\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"hideUnshownBandLabels\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabelText\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"drawBandLabelText\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabelStalk\", function() { return _draw__WEBPACK_IMPORTED_MODULE_1__[\"drawBandLabelStalk\"]; });\n\n/* harmony import */ var _parse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parse */ \"./node_modules/ideogram/src/js/bands/parse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"parseBands\", function() { return _parse__WEBPACK_IMPORTED_MODULE_2__[\"parseBands\"]; });\n\n/**\n * @fileoverview Methods for processing chromosome length and banding data.\n *\n * Ideogram.js depicts chromosomes using data on their length, name, and\n * (if dealing with a very well-studied organism) cytogenetic banding data.\n * This file processes cytoband data that comes from biological research\n * institutions.\n *\n * For background on cytogenetic bands and how they are used in genomics, see:\n * https://ghr.nlm.nih.gov/primer/howgeneswork/genelocation\n *\n */\n\n\n\n\n\n\n/**\n * TODO: Should this be in services/organism.js?\n */\nfunction setTaxids(ideo) {\n  var i, taxid, taxids;\n\n  if (ideo.config.multiorganism === true) {\n    ideo.coordinateSystem = 'bp';\n    taxids = ideo.config.taxids;\n    for (i = 0; i < taxids.length; i++) {\n      taxid = taxids[i];\n    }\n  } else {\n    if (typeof ideo.config.taxid === 'undefined') {\n      ideo.config.taxid = ideo.config.taxids[0];\n    }\n    taxid = ideo.config.taxid;\n    taxids = [taxid];\n    ideo.config.taxids = taxids;\n  }\n\n  return [taxid, taxids];\n}\n\n/**\n * Updates bands array, sets ideo.maxLength\n */\nfunction updateBandsArray(chromosome, bandsByChr, bandsArray, ideo) {\n  var bands, chrLength;\n\n  bands = bandsByChr[chromosome];\n  bandsArray.push(bands);\n\n  chrLength = {\n    iscn: bands[bands.length - 1].iscn.stop,\n    bp: bands[bands.length - 1].bp.stop\n  };\n\n  if (chrLength.iscn > ideo.maxLength.iscn) {\n    ideo.maxLength.iscn = chrLength.iscn;\n  }\n\n  if (chrLength.bp > ideo.maxLength.bp) {\n    ideo.maxLength.bp = chrLength.bp;\n  }\n\n  return bandsArray;\n}\n\n/**\n * Updates bandsArray, sets ideo.config.chromosomes and ideo.numChromosomes\n */\nfunction setChrsByTaxidsWithBands(taxid, chrs, bandsArray, ideo) {\n  var bandData, bandsByChr, chromosome, k;\n\n  bandData = ideo.bandData[taxid];\n\n  bandsByChr = ideo.parseBands(bandData, taxid, chrs);\n\n  chrs = Object.keys(bandsByChr).sort(function(a, b) {\n    return Object(es6_natural_sort__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b);\n  });\n\n  ideo.config.chromosomes[taxid] = chrs.slice();\n  ideo.numChromosomes += ideo.config.chromosomes[taxid].length;\n\n  for (k = 0; k < chrs.length; k++) {\n    chromosome = chrs[k];\n    bandsArray = updateBandsArray(chromosome, bandsByChr, bandsArray, ideo);\n  }\n\n  return bandsArray;\n}\n\nfunction setChromosomesByTaxid(taxid, chrs, bandsArray, ideo) {\n  var chr, k;\n\n  if (ideo.coordinateSystem === 'iscn' || ideo.config.multiorganism) {\n    bandsArray = setChrsByTaxidsWithBands(taxid, chrs, bandsArray, ideo);\n  } else if (ideo.coordinateSystem === 'bp') {\n    // If lacking band-level data\n    ideo.config.chromosomes[taxid] = chrs.slice();\n    ideo.numChromosomes += ideo.config.chromosomes[taxid].length;\n\n    for (k = 0; k < chrs.length; k++) {\n      chr = chrs[k];\n      if (chr.length > ideo.maxLength.bp) ideo.maxLength.bp = chr.length;\n    }\n  }\n\n  return bandsArray;\n}\n\nfunction reportPerformance(t0, ideo) {\n  var t1 = new Date().getTime();\n  if (ideo.config.debug) {\n    console.log('Time in processBandData: ' + (t1 - t0) + ' ms');\n  }\n}\n\n/**\n * Completes default ideogram initialization by calling downstream functions\n * to process raw band data into full JSON objects, render chromosome and\n * cytoband figures and labels, apply initial graphical transformations,\n * hide overlapping band labels, and execute callbacks defined by client code\n */\nfunction processBandData() {\n  var bandsArray, j, taxid, taxids, chrs, chrsByTaxid,\n    t0 = new Date().getTime(),\n    ideo = this;\n\n  bandsArray = [];\n\n  [taxid, taxids] = setTaxids(ideo);\n\n  if ('chromosomes' in ideo.config) chrs = ideo.config.chromosomes;\n  if (ideo.config.multiorganism) chrsByTaxid = chrs;\n  ideo.config.chromosomes = {};\n\n  for (j = 0; j < taxids.length; j++) {\n    taxid = taxids[j];\n    if (ideo.config.multiorganism) chrs = chrsByTaxid[taxid];\n    bandsArray = setChromosomesByTaxid(taxid, chrs, bandsArray, ideo);\n  }\n\n  reportPerformance(t0, ideo);\n  return bandsArray;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/bands.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/draw.js":
/*!****************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/draw.js ***!
  \****************************************************/
/*! exports provided: drawBandLabels, getBandColorGradients, hideUnshownBandLabels, setBandsToShow, drawBandLabelText, drawBandLabelStalk */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabels\", function() { return drawBandLabels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBandColorGradients\", function() { return getBandColorGradients; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabelText\", function() { return drawBandLabelText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawBandLabelStalk\", function() { return drawBandLabelStalk; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _show__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./show */ \"./node_modules/ideogram/src/js/bands/show.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hideUnshownBandLabels\", function() { return _show__WEBPACK_IMPORTED_MODULE_2__[\"hideUnshownBandLabels\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setBandsToShow\", function() { return _show__WEBPACK_IMPORTED_MODULE_2__[\"setBandsToShow\"]; });\n\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./styles */ \"./node_modules/ideogram/src/js/bands/styles.js\");\n/**\n * @fileoverview Methods to draw cytogenetic bands and their labels\n *\n */\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Draws text of cytoband label\n */\nfunction drawBandLabelText(chr, bandsToLabel, chrModel, textOffsets) {\n  var ideo = this,\n    layout = ideo._layout,\n    chrIndex = chrModel.chrIndex;\n\n  chr.selectAll('text')\n    .data(bandsToLabel)\n    .enter()\n    .append('g')\n    .attr('class', function (d, i) {\n      return 'bandLabel bsbsl-' + i;\n    })\n    .attr('transform', function (d) {\n      var transform = layout.getChromosomeBandLabelTranslate(d, chrIndex);\n\n      if (ideo.config.orientation === 'horizontal') {\n        textOffsets[chrModel.id].push(transform.x + 13);\n      } else {\n        textOffsets[chrModel.id].push(transform.y + 6);\n      }\n\n      return transform.translate;\n    })\n    .append('text')\n    .attr('text-anchor', layout.getChromosomeBandLabelAnchor(chrIndex))\n    .text(function (d) {\n      return d.name;\n    });\n\n  return textOffsets;\n}\n\n/**\n * Draws line between cytoband and its text label\n */\nfunction drawBandLabelStalk(chr, bandsToLabel, chrModel, textOffsets) {\n  var ideo = this;\n\n  chr.selectAll('line.bandLabelStalk')\n    .data(bandsToLabel)\n    .enter()\n    .append('g')\n    .attr('class', function (d, i) {\n      return 'bandLabelStalk bsbsl-' + i;\n    })\n    .attr('transform', function (d) {\n      var x, y;\n\n      x = ideo.round(d.px.start + d.px.width / 2);\n      y = -10;\n\n      textOffsets[chrModel.id].push(x + 13);\n\n      return 'translate(' + x + ',' + y + ')';\n    })\n    .append('line')\n    .attr('x1', 0)\n    .attr('y1', ideo._layout.getChromosomeBandTickY1(chrModel.chrIndex))\n    .attr('x2', 0)\n    .attr('y2', ideo._layout.getChromosomeBandTickY2(chrModel.chrIndex));\n}\n\nfunction getChrModels(chromosomes) {\n  var taxid, chr,\n    chrModels = [];\n\n  for (taxid in chromosomes) {\n    for (chr in chromosomes[taxid]) {\n      chrModels.push(chromosomes[taxid][chr]);\n    }\n  }\n\n  return chrModels;\n}\n\n/**\n * Draws text and stalks for cytogenetic band labels.\n *\n * Band labels are text like \"p11.11\".\n * Stalks are small lines that visually connect labels to their bands.\n */\nfunction drawBandLabels(chromosomes) {\n  var i, chr, chrModel, chrModels, textOffsets, bandsToLabel,\n    ideo = this,\n    textOffsets = {};\n\n  chrModels = getChrModels(chromosomes);\n\n  for (i = 0; i < chrModels.length; i++) {\n    chrModel = chrModels[i];\n    chr = d3.select(ideo.selector + ' #' + chrModel.id);\n    textOffsets[chrModel.id] = [];\n\n    // Don't show \"pter\" label for telocentric chromosomes, e.g. mouse\n    bandsToLabel = chrModel.bands.filter(d => d.name !== 'pter');\n\n    textOffsets =\n      ideo.drawBandLabelText(chr, bandsToLabel, chrModel, textOffsets);\n\n    ideo.drawBandLabelStalk(chr, bandsToLabel, chrModel, textOffsets);\n  }\n\n  ideo.setBandsToShow(chrModels, textOffsets);\n}\n\nfunction getStainAndColors(i, colors) {\n  var stain, color1, color2, color3;\n\n  stain = colors[i][0];\n  color1 = colors[i][1];\n  color2 = colors[i][2];\n  color3 = colors[i][3];\n\n  return [stain, color1, color2, color3];\n}\n\nfunction getGradients(colors) {\n  var i, stain, color1, color2, color3,\n    gradients = '';\n\n  for (i = 0; i < colors.length; i++) {\n    [stain, color1, color2, color3] = getStainAndColors(i, colors);\n    gradients +=\n      '<linearGradient id=\"' + stain + '\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">';\n    if (stain === \"gneg\") {\n      gradients +=\n        '<stop offset=\"70%\" stop-color=\"' + color2 + '\" />' +\n        '<stop offset=\"95%\" stop-color=\"' + color3 + '\" />' +\n        '<stop offset=\"100%\" stop-color=\"' + color1 + '\" />';\n    } else {\n      gradients +=\n        '<stop offset=\"5%\" stop-color=\"' + color1 + '\" />' +\n        '<stop offset=\"15%\" stop-color=\"' + color2 + '\" />' +\n        '<stop offset=\"60%\" stop-color=\"' + color3 + '\" />';\n    }\n    gradients +=\n      '</linearGradient>';\n  }\n\n  return gradients;\n}\n\n/**\n * Returns SVG gradients that give chromosomes a polished look\n */\nfunction getBandColorGradients() {\n  var css,\n    gradients = '';\n\n  gradients = getGradients(_styles__WEBPACK_IMPORTED_MODULE_3__[\"staticColors\"]);\n\n  css = _styles__WEBPACK_IMPORTED_MODULE_3__[\"staticCss\"];\n\n  gradients += _styles__WEBPACK_IMPORTED_MODULE_3__[\"staticGradients\"];\n  gradients = \"<defs>\" + gradients + \"</defs>\";\n  gradients = css + gradients;\n\n  return gradients;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/draw.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/fetch.js":
/*!*****************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/fetch.js ***!
  \*****************************************************/
/*! exports provided: fetchBands */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fetchBands\", function() { return fetchBands; });\nfunction setBandData(url, fileNames, chrBands, ideo) {\n  var taxid, fetchedTaxid, fileName;\n\n  // Ensures correct taxid is processed in response callback;\n  // using simply upstream 'taxid' variable gives the last\n  // *requested* taxid, which fails when dealing with multiple taxa.\n  for (taxid in fileNames) {\n    fileName = fileNames[taxid];\n    if (url.includes(fileName) && fileName !== '') {\n      fetchedTaxid = taxid;\n    }\n  }\n\n  ideo.bandData[fetchedTaxid] = chrBands;\n}\n\nfunction fetchBands(bandDataFileNames, taxid, t0, ideo) {\n  var bandDataUrl = ideo.config.dataDir + bandDataFileNames[taxid];\n\n  if (!ideo.numBandDataResponses) ideo.numBandDataResponses = 0;\n\n  fetch(bandDataUrl)\n    .then(function(response) {\n      return response.text().then(function(rawBands) {\n\n        delete window.chrBands; // Remove any previous chrBands variable\n        eval(rawBands); // Fetched data is a JS variable 'chrBands'; assign it\n\n        setBandData(response.url, bandDataFileNames, chrBands, ideo);\n\n        ideo.numBandDataResponses += 1;\n\n        if (ideo.numBandDataResponses === ideo.config.taxids.length) {\n          var bandsArray = ideo.processBandData();\n          ideo.writeContainer(bandsArray, taxid, t0);\n          delete ideo.numBandDataResponses;\n        }\n      });\n    });\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/fetch.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/parse.js":
/*!*****************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/parse.js ***!
  \*****************************************************/
/*! exports provided: parseBands */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseBands\", function() { return parseBands; });\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\nfunction getDelimiterTsvLinesAndInit(source, content) {\n  var delimiter, tsvLines, init;\n\n  if (typeof chrBands === 'undefined' && source !== 'native') {\n    delimiter = /\\t/;\n    tsvLines = content.split(/\\r\\n|\\n/);\n    init = 1;\n  } else {\n    delimiter = / /;\n    if (source === 'native') {\n      tsvLines = eval(content);\n    } else {\n      tsvLines = content;\n    }\n    init = 0;\n  }\n\n  return [delimiter, tsvLines, init];\n}\n\nfunction updateChromosomes(chromosomes) {\n  var tmp, i;\n\n  if (chromosomes instanceof Array && typeof chromosomes[0] === 'object') {\n    tmp = [];\n    for (i = 0; i < chromosomes.length; i++) {\n      tmp.push(chromosomes[i].name);\n    }\n    chromosomes = tmp;\n  }\n\n  return chromosomes;\n}\n\nfunction getLineObject(chr, columns, stain, taxid) {\n  return {\n    chr: chr,\n    bp: {\n      start: parseInt(columns[5], 10),\n      stop: parseInt(columns[6], 10)\n    },\n    iscn: {\n      start: parseInt(columns[3], 10),\n      stop: parseInt(columns[4], 10)\n    },\n    px: {\n      start: -1,\n      stop: -1,\n      width: -1\n    },\n    name: columns[1] + columns[2],\n    stain: stain,\n    taxid: taxid\n  };\n}\n\nfunction getStain(columns) {\n  var stain = columns[7];\n  // For e.g. acen and gvar, columns[8] (density) is undefined\n  if (columns[8]) stain += columns[8];\n  return stain;\n}\n\nfunction updateLines(lines, columns, taxid) {\n  var chr, stain, line;\n\n  chr = columns[0];\n  if (chr in lines === false) lines[chr] = [];\n  \n  stain = getStain(columns)\n\n  line = getLineObject(chr, columns, stain, taxid);\n  lines[chr].push(line);\n\n  return lines;\n}\n\n/**\n * Parses cytogenetic band data from a TSV file, or, if band data is\n * prefetched, from an array\n *\n * NCBI:\n * #chromosome arm band iscn_start iscn_stop bp_start bp_stop stain density\n * ftp://ftp.ncbi.nlm.nih.gov/pub/gdp/ideogram_9606_GCF_000001305.14_550_V1\n */\nfunction parseBands(content, taxid, chromosomes) {\n  var delimiter, tsvLines, columns, chr, i, init, source,\n    lines = {};\n\n  if (content.slice(0, 15) === 'window.chrBands') source = 'native';\n  \n  chromosomes = updateChromosomes(chromosomes);\n\n  [delimiter, tsvLines, init] = getDelimiterTsvLinesAndInit(source, content);\n\n  for (i = init; i < tsvLines.length; i++) {\n    columns = tsvLines[i].split(delimiter);\n\n    chr = columns[0];\n\n    if (\n      typeof (chromosomes) !== 'undefined' &&\n      chromosomes.indexOf(chr) === -1\n    ) {\n      // If a specific set of chromosomes has been requested, and\n      // the current chromosome\n      continue;\n    }\n\n    lines = updateLines(lines, columns, taxid);\n  }\n\n  return lines;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/parse.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/show.js":
/*!****************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/show.js ***!
  \****************************************************/
/*! exports provided: hideUnshownBandLabels, setBandsToShow */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hideUnshownBandLabels\", function() { return hideUnshownBandLabels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBandsToShow\", function() { return setBandsToShow; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/**\n * @fileoverview Methods to show (or hide) cytogenetic banding data\n */\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction hideUnshownBandLabels() {\n  var ideo = this;\n  var bandsToShow = ideo.bandsToShow.join(',');\n\n  // d3.selectAll resolves to querySelectorAll (QSA).\n  // QSA takes a surprisingly long time to complete,\n  // and scales with the number of selectors.\n  // Most bands are hidden, so we can optimize by\n  // Hiding all bands, then QSA'ing and displaying the\n  // relatively few bands that are shown.\n  d3.selectAll(ideo.selector + ' .bandLabel, .bandLabelStalk')\n    .style('display', 'none');\n  d3.selectAll(bandsToShow).style('display', '');\n}\n\nfunction getPrevRight(prevLabelXRight, prevHiddenBoxIndex, i,\n  textOffsets, chrModel) {\n  var prevTextBoxLeft, prevTextBoxWidth;\n\n  if (prevHiddenBoxIndex !== i) {\n    // This getBoundingClientRect() forces Chrome's\n    // 'Recalculate Style' and 'Layout', which takes 30-40 ms on Chrome.\n    // TODO: This forced synchronous layout would be nice to eliminate.\n    // prevTextBox = texts[i].getBoundingClientRect();\n    // prevLabelXRight = prevTextBox.left + prevTextBox.width;\n\n    // TODO: Account for number of characters in prevTextBoxWidth,\n    // maybe also zoom.\n    prevTextBoxLeft = textOffsets[chrModel.id][i];\n    prevTextBoxWidth = 36;\n\n    prevLabelXRight = prevTextBoxLeft + prevTextBoxWidth;\n  }\n\n  return prevLabelXRight;\n}\n\nfunction updateShown(indexesToShow, overlapRight, left, pad, prevRight, i,\n  isBefore) {\n  var hiddenIndex, doSkip,\n    thisRight = isBefore ? overlapRight : prevRight;\n\n  if (left < pad + thisRight) {\n    overlapRight = prevRight;\n    hiddenIndex = i;\n    doSkip = isBefore ? true : false;\n  } else {\n    indexesToShow.push(i);\n  }\n\n  return [indexesToShow, overlapRight, hiddenIndex, doSkip];\n}\n\nfunction getIndexesToShow(offsets, chrModel) {\n  var i, hiddenIndex, left, prevRight, doSkip,\n    indexesToShow = [],\n    textsLength = offsets[chrModel.id].length,\n    overlapRight = 0, // Right X coordinate of overlapping label\n    pad = 5; // text padding\n\n  for (i = 0; i < textsLength; i++) {\n    // Ensures band labels don't overlap\n    left = offsets[chrModel.id][i];\n\n    [indexesToShow, overlapRight, hiddenIndex, doSkip] =\n      updateShown(indexesToShow, overlapRight, left, pad, prevRight, i, true);\n    if (doSkip) continue;\n\n    prevRight = getPrevRight(prevRight, hiddenIndex, i, offsets, chrModel);\n\n    [indexesToShow, overlapRight, hiddenIndex, doSkip] =\n      updateShown(indexesToShow, overlapRight, left, pad, prevRight, i, false);\n  }\n\n  return indexesToShow;\n}\n\n/**\n * Sets band labels to display on each chromosome, avoiding label overlap\n */\nfunction setBandsToShow(chrs, textOffsets) {\n  var index, i, j, indexesToShow, chrModel, selectorsToShow, ithLength, j,\n    ideo = this;\n\n  ideo.bandsToShow = [];\n\n  for (i = 0; i < chrs.length; i++) {\n\n    chrModel = chrs[i];\n\n    indexesToShow = getIndexesToShow(textOffsets, chrModel);\n\n    selectorsToShow = [];\n    ithLength = indexesToShow.length;\n\n    for (j = 0; j < ithLength; j++) {\n      index = indexesToShow[j];\n      selectorsToShow.push('#' + chrModel.id + ' .bsbsl-' + index);\n    }\n\n    ideo.bandsToShow = ideo.bandsToShow.concat(selectorsToShow);\n  }\n}\n  \n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/show.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/bands/styles.js":
/*!******************************************************!*\
  !*** ./node_modules/ideogram/src/js/bands/styles.js ***!
  \******************************************************/
/*! exports provided: staticColors, staticCss, staticGradients */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticColors\", function() { return staticColors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticCss\", function() { return staticCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticGradients\", function() { return staticGradients; });\nvar staticColors, staticCss, staticGradients;\n\nstaticColors = [\n  ['gneg', '#FFF', '#FFF', '#DDD'],\n  ['gpos25', '#C8C8C8', '#DDD', '#BBB'],\n  ['gpos33', '#BBB', '#BBB', '#AAA'],\n  ['gpos50', '#999', '#AAA', '#888'],\n  ['gpos66', '#888', '#888', '#666'],\n  ['gpos75', '#777', '#777', '#444'],\n  ['gpos100', '#444', '#666', '#000'],\n  ['acen', '#FEE', '#FEE', '#FDD'],\n  ['noBands', '#BBB', '#BBB', '#AAA']\n];\n\nstaticCss =\n  '<style>' +\n  '#_ideogram {padding-left: 5px;} ' +\n  '#_ideogram .labeled {padding-left: 15px;} ' +\n  '#_ideogram.labeledLeft {padding-left: 15px; padding-top: 15px;} ' +\n  // Tahoma has great readability and space utilization at small sizes\n  // More: http://ux.stackexchange.com/a/3334\n  '#_ideogram text {font: 9px Tahoma; fill: #000;} ' +\n  '#_ideogram .italic {font-style: italic;} ' +\n  '#_ideogram .chromosome {cursor: pointer; fill: #AAA;}' +\n  '#_ideogram .chrSetLabel {font-weight: bolder;}' +\n  '#_ideogram .ghost {opacity: 0.2;}' +\n  '#_ideogram .hidden {display: none;}' +\n  '#_ideogram .bandLabelStalk line {stroke: #AAA; stroke-width: 1;}' +\n  '#_ideogram .syntenyBorder {stroke:#AAA;stroke-width:1;}' +\n  '#_ideogram .brush .selection {' +\n  '  fill: #F00;' +\n  '  stroke: #F00;' +\n  '  fill-opacity: .3;' +\n  '  shape-rendering: crispEdges;' +\n  '}' +\n  '#_ideogram .noBands {fill: #AAA;}' +\n  // NCBI stain density colors\n  '#_ideogram .gneg {fill: #FFF}' +\n  '#_ideogram .gpos25 {fill: #BBB}' +\n  '#_ideogram .gpos33 {fill: #AAA}' +\n  '#_ideogram .gpos50 {fill: #888}' +\n  '#_ideogram .gpos66 {fill: #666}' +\n  '#_ideogram .gpos75 {fill: #444}' +\n  '#_ideogram .gpos100 {fill: #000}' +\n  '#_ideogram .gpos {fill: #000}' +\n  '#_ideogram .acen {fill: #FDD}' +\n  '#_ideogram .stalk {fill: #CCE;}' +\n  '#_ideogram .gvar {fill: #DDF}' +\n  // Used when overlaid with annotations\n  '#_ideogram.faint .gneg {fill: #FFF}' +\n  '#_ideogram.faint .gpos25 {fill: #EEE}' +\n  '#_ideogram.faint .gpos33 {fill: #EEE}' +\n  '#_ideogram.faint .gpos50 {fill: #EEE}' +\n  '#_ideogram.faint .gpos66 {fill: #EEE}' +\n  '#_ideogram.faint .gpos75 {fill: #EEE}' +\n  '#_ideogram.faint .gpos100 {fill: #DDD}' +\n  '#_ideogram.faint .gpos {fill: #DDD}' +\n  '#_ideogram.faint .acen {fill: #FEE}' +\n  '#_ideogram.faint .stalk {fill: #EEF;}' +\n  '#_ideogram.faint .gvar {fill: #EEF}' +\n  // For sheen, i.e. the soft shine in chromosomes\n  '#_ideogram .gneg {fill: url(\"#gneg\")} ' +\n  '#_ideogram .gpos25 {fill: url(\"#gpos25\")} ' +\n  '#_ideogram .gpos33 {fill: url(\"#gpos33\")} ' +\n  '#_ideogram .gpos50 {fill: url(\"#gpos50\")} ' +\n  '#_ideogram .gpos66 {fill: url(\"#gpos66\")} ' +\n  '#_ideogram .gpos75 {fill: url(\"#gpos75\")} ' +\n  '#_ideogram .gpos100 {fill: url(\"#gpos100\")} ' +\n  '#_ideogram .gpos {fill: url(\"#gpos100\")} ' +\n  '#_ideogram .acen {fill: url(\"#acen\")} ' +\n  '#_ideogram .stalk {fill: url(\"#stalk\")} ' +\n  '#_ideogram .gvar {fill: url(\"#gvar\")} ' +\n  '#_ideogram .noBands {fill: url(\"#noBands\")} ' +\n  '#_ideogram .chromosome {fill: url(\"#noBands\")} ' +\n  '</style>';\n\nstaticGradients =\n  '<pattern id=\"stalk\" width=\"2\" height=\"1\" patternUnits=\"userSpaceOnUse\" ' +\n  'patternTransform=\"rotate(30 0 0)\">' +\n  '<rect x=\"0\" y=\"0\" width=\"10\" height=\"2\" fill=\"#CCE\" /> ' +\n  '<line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\" style=\"stroke:#88B; ' +\n  'stroke-width:0.7;\" />' +\n  '</pattern>' +\n  '<pattern id=\"gvar\" width=\"2\" height=\"1\" patternUnits=\"userSpaceOnUse\" ' +\n  'patternTransform=\"rotate(-30 0 0)\">' +\n  '<rect x=\"0\" y=\"0\" width=\"10\" height=\"2\" fill=\"#DDF\" /> ' +\n  '<line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\" style=\"stroke:#99C; ' +\n  'stroke-width:0.7;\" />' +\n  '</pattern>';\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/bands/styles.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/brush.js":
/*!***********************************************!*\
  !*** ./node_modules/ideogram/src/js/brush.js ***!
  \***********************************************/
/*! exports provided: onBrushMove, createBrush */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onBrushMove\", function() { return onBrushMove; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createBrush\", function() { return createBrush; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-brush */ \"./node_modules/d3-brush/src/index.js\");\n/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-scale */ \"./node_modules/d3-scale/index.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/**\n * @fileoverview Methods to create and handle a brush on a chromosome.\n *\n * Ideogram.js enables users to display a box around part of a chromosome\n * that represents a \"currently selected\" region.  The user can move this\n * box like a sliding window, e.g. by clicking and dragging the mouse.\n *\n * For background, see:\n * https://github.com/d3/d3-brush\n */\n\n\n// See https://github.com/d3/d3/issues/2733\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_4__[\"Object\"].assign({}, d3_brush__WEBPACK_IMPORTED_MODULE_1__, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\nd3.scaleLinear = d3_scale__WEBPACK_IMPORTED_MODULE_2__[\"scaleLinear\"];\nd3.max = d3_array__WEBPACK_IMPORTED_MODULE_3__[\"max\"];\n\n/**\n * Custom event handler, fired upon dragging sliding window on chromosome\n */\nfunction onBrushMove() {\n  call(this.onBrushMoveCallback);\n}\n\nfunction setBrush(bpDomain, pxRange, xOffset, width, ideo) {\n  var xScale,\n    length = ideo.config.chrHeight;\n\n  xScale = d3.scaleLinear().domain(bpDomain).range(pxRange);\n\n  ideo.brush = d3.brushX()\n    .extent([[xOffset, 0], [length + xOffset, width]])\n    .on('brush', onBrushMove);\n\n  function onBrushMove() {\n    var extent = d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].selection.map(xScale.invert),\n      from = Math.floor(extent[0]),\n      to = Math.ceil(extent[1]);\n\n    ideo.selectedRegion = {from: from, to: to, extent: (to - from)};\n\n    if (ideo.onBrushMove) {\n      ideo.onBrushMoveCallback();\n    }\n  }\n}\n\nfunction getBasePairDomainAndPixelRange(chrModel, xOffset) {\n  var band, i,\n    bpDomain = [1],\n    pxRange = [1],\n    lastBand = chrModel.bands.slice(-1)[0];\n\n\n  for (i = 0; i < chrModel.bands.length; i++) {\n    band = chrModel.bands[i];\n    bpDomain.push(band.bp.start);\n    pxRange.push(band.px.start + xOffset);\n  }\n\n  bpDomain.push(lastBand.bp.stop - 1);\n  pxRange.push(lastBand.px.stop + xOffset);\n\n  return [bpDomain, pxRange];\n}\n\n/**\n * Account for calls like createBrush('chr1:104325484-119977655')\n */\nfunction refineGenomicCoordinates(chr, from, to) {\n  var nameSplit, fromToSplit;\n\n  // Account for calls like createBrush('chr1:104325484-119977655')\n  nameSplit = chr.split(':');\n  fromToSplit = chr.split('-');\n  if (nameSplit.length > 1 && fromToSplit.length > 1) {\n    chr = nameSplit[0].replace('chr', '');\n    fromToSplit = nameSplit[1].split('-');\n    from = parseInt(fromToSplit[0]);\n    to = parseInt(fromToSplit[1] - 1);\n  }\n\n  return [chr, from, to];\n}\n\nfunction getChrModel(chr, ideo) {\n  var i, cm, chrModel;\n\n  for (i = 0; i < ideo.chromosomesArray.length; i++) {\n    cm = ideo.chromosomesArray[i];\n    if (cm.name === chr) {\n      chrModel = cm;\n      return chrModel;\n    }\n  }\n}\n\nfunction writeBrush(chrModel, from, to, xOffset, width, ideo) {\n  var x0, x1, yTranslate, yOffset;\n\n  x0 = ideo.convertBpToPx(chrModel, from) + xOffset;\n  x1 = ideo.convertBpToPx(chrModel, to) + xOffset;\n\n  yTranslate = ideo._layout.getChromosomeSetYTranslate(0);\n  yOffset = yTranslate + (ideo.config.chrWidth - width) / 2;\n\n  d3.select(ideo.selector).append('g')\n    .attr('class', 'brush')\n    .attr('transform', 'translate(0, ' + yOffset + ')')\n    .call(ideo.brush)\n    .call(ideo.brush.move, [x0, x1]);\n}\n\nfunction setSelectedRegion(from, to, ideo) {\n   // Genomics web UIs are 1-based, fully closed.\n  // I.e. If start = 20 bp and stop = 10 bp, then extent = 11 bp.\n  // Details:\n  // http://genome.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/\n  // https://www.biostars.org/p/84686/\n  var extent = to - from + 1;\n  ideo.selectedRegion = {from: from, to: to, extent: extent};\n}\n\n/**\n * Creates a sliding window along a chromosome\n *\n * @param chr Chromosome name (e.g. '1') or range, e.g. 'chr1:104325484-119977655'\n * @param from Genomic start coordinate in base pairs, e.g. 104325484\n * @param to Genomic end coordinate in base pairs, e.g. 119977655\n */\nfunction createBrush(chr, from, to) {\n  var chrModel, chrLengthBp, bpDomain, pxRange, lastBand,\n    ideo = this,\n    width = ideo.config.chrWidth + 6.5,\n    xOffset = ideo._layout.margin.left;\n\n  [chr, from, to] = refineGenomicCoordinates(chr, from, to);\n\n  chrModel = getChrModel(chr, ideo);\n\n  [bpDomain, pxRange] = getBasePairDomainAndPixelRange(chrModel, xOffset);\n\n  lastBand = chrModel.bands.slice(-1)[0];\n  chrLengthBp = lastBand.bp.stop;\n\n  if (typeof from === 'undefined') from = Math.floor(chrLengthBp / 10);\n  if (typeof to === 'undefined') to = Math.ceil(from * 2);\n\n  setBrush(bpDomain, pxRange, xOffset, width, ideo);\n\n  setSelectedRegion(from, to, ideo);\n  writeBrush(chrModel, from, to, xOffset, width, ideo);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/brush.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/color.js":
/*!***********************************************!*\
  !*** ./node_modules/ideogram/src/js/color.js ***!
  \***********************************************/
/*! exports provided: Color */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Color\", function() { return Color; });\n/* harmony import */ var _ploidy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ploidy */ \"./node_modules/ideogram/src/js/ploidy.js\");\n\n\nclass Color {\n\n  constructor(config) {\n      // Ideogram config\n    this._config = config;\n    this._ploidy = new _ploidy__WEBPACK_IMPORTED_MODULE_0__[\"Ploidy\"](this._config);\n  }\n\n  getArmColor(chrSetIndex, chrIndex, armIndex) {\n    if (this._config.armColors) {\n      return this._config.armColors[armIndex];\n    } else if (this._config.ancestors) {\n      return this._getPolyploidArmColor(chrSetIndex, chrIndex, armIndex);\n    } else {\n      return null;\n    }\n  }\n\n  getBorderColor(chrSetIndex, chrIndex, armIndex) {\n    if (chrIndex < this._config.ploidy) {\n      return '#000';\n    } else if (this._ploidy.exists(chrSetIndex, chrIndex, armIndex)) {\n      return '#000';\n    } else {\n      return '#fff';\n    }\n  }\n\n  _getPolyploidArmColor(chrSetIndex, chrIndex, armIndex) {\n    if (!this._ploidy.exists(chrSetIndex, chrIndex, armIndex)) {\n      return 'transparent';\n    } else {\n      var ancestor =\n        this._ploidy.getAncestor(chrSetIndex, chrIndex, armIndex);\n      return this._config.ancestors[ancestor];\n    }\n  }\n\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/color.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/coordinate-converters.js":
/*!***************************************************************!*\
  !*** ./node_modules/ideogram/src/js/coordinate-converters.js ***!
  \***************************************************************/
/*! exports provided: convertBpToPx, convertPxToBp */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"convertBpToPx\", function() { return convertBpToPx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"convertPxToBp\", function() { return convertPxToBp; });\n/**\n * @fileoverview Methods to convert to and from different types of coordinates.\n *\n * Ideogram.js uses multiple coordinate systems, e.g. base pairs (bp) and\n * pixels (px).  These methods interconvert between those coordinate systems.\n *\n * TODO:\n * - Add methods to interconvert between ISCN coordinates and base pairs,\n * pixels.\n */\n\nfunction throwBpToPxError(bp, chr, band) {\n  throw new Error(\n    'Base pair out of range.  ' +\n    'bp: ' + bp + '; length of chr' + chr.name + ': ' + band.bp.stop\n  );\n}\n\nfunction getPx(chr, bp) {\n  var i, px, band, bpToIscnScale, iscn, iscnStart, iscnStop, iscnLength,\n    bpStart, bpStop, bpLength, pxStart, pxLength;\n\n  for (i = 0; i < chr.bands.length; i++) {\n    band = chr.bands[i];\n    bpStart = band.bp.start;\n    bpStop = band.bp.stop;\n    bpLength = bpStop - bpStart;\n    iscnStart = band.iscn.start;\n    iscnStop = band.iscn.stop;\n    iscnLength = iscnStop - iscnStart;\n    pxStart = band.px.start;\n    pxLength = band.px.width;\n\n    if (bp >= bpStart && bp <= bpStop) {\n      bpToIscnScale = iscnLength / bpLength;\n      iscn = iscnStart + (bp - bpStart) * bpToIscnScale;\n      px = pxStart + (pxLength * (iscn - iscnStart) / (iscnLength));\n\n      return [px, band];\n    }\n  }\n  return [null, band];\n}\n\n/**\n * Converts base pair coordinates to pixel offsets.\n * Bp-to-pixel scales differ among cytogenetic bands.\n *\n * For example, if we want to depict a gene on a chromosome, then we need\n * to convert the gene's location in base pairs to a location in pixels offset\n * from the start of the chromosome.\n */\nfunction convertBpToPx(chr, bp) {\n  var band, px;\n\n  if (chr.bands.length > 1) {\n    [px, band] = getPx(chr, bp);\n    if (px !== null) return px;\n  } else {\n    if (bp >= 1 && bp <= chr.length) {\n      px = chr.scale.bp * bp;\n      return px;\n    }\n  }\n\n  throwBpToPxError(bp, chr, band);\n}\n\nfunction throwPxToBpError(px, chr, pxStop) {\n  throw new Error(\n    'Pixel out of range.  ' +\n    'px: ' + px + '; length of chr' + chr.name + ': ' + pxStop\n  );\n}\n\nfunction getBp(iscnStop, iscnStart, px, pxStop, pxStart, band, iscnLength) {\n  var iscnLength, pxLength, bpLength, pxToIscnScale, iscn, bp;\n\n  iscnLength = iscnStop - iscnStart;\n  pxLength = pxStop - pxStart;\n  bpLength = band.bp.stop - band.bp.start;\n\n  pxToIscnScale = iscnLength / pxLength;\n  iscn = iscnStart + (px - pxStart) * pxToIscnScale;\n\n  bp = band.bp.start + (bpLength * (iscn - iscnStart) / iscnLength);\n\n  return Math.round(bp);\n}\n\n/**\n * Converts pixel offsets to base pair coordinates.\n * Pixel-to-bp scales differ among cytogenetic bands.\n *\n * For example, if we want to determine the genomic location a user clicked on\n * (e.g. when creating a brush / sliding window region), then we need to\n * convert pixels to base pairs.\n */\nfunction convertPxToBp(chr, px) {\n  var i, band, bp, pxStart, pxStop, iscnStart, iscnStop, iscnLength;\n\n  if (px === 0) {\n    px = chr.bands[0].px.start;\n  }\n\n  for (i = 0; i < chr.bands.length; i++) {\n    band = chr.bands[i];\n\n    pxStart = band.px.start;\n    pxStop = band.px.stop;\n    iscnStart = band.iscn.start;\n    iscnStop = band.iscn.stop;\n\n    if (px >= pxStart && px <= pxStop) {\n      bp = getBp(iscnStop, iscnStart, px, pxStop, pxStart, band, iscnLength);\n      return bp;\n    }\n  }\n  throwPxToBpError(px, chr, pxStop)\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/coordinate-converters.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/filter.js":
/*!************************************************!*\
  !*** ./node_modules/ideogram/src/js/filter.js ***!
  \************************************************/
/*! exports provided: unpackAnnots, packAnnots, initCrossFilter, filterAnnots */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unpackAnnots\", function() { return unpackAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"packAnnots\", function() { return packAnnots; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initCrossFilter\", function() { return initCrossFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterAnnots\", function() { return filterAnnots; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var crossfilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! crossfilter */ \"./node_modules/crossfilter/index.js\");\n/* harmony import */ var crossfilter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crossfilter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/* Decompresses ideogram's annotations for crossfilter initialization\nBy default, annotations are clustered by chromosome, e.g.\n[\n  {\"chr\": \"1\", \"annots\": [{\"from\": 100, \"to\", 101, \"chr\": \"1\", ...}, ...]},\n  {\"chr\": \"2\", \"annots\": [{\"from\": 500, \"to\", 501, \"chr\": \"2\", ...}, ...]},\n  ...\n]\nThis method flattens that structure to e.g.\n[\n  {\"from\": 100, \"to\": 101, \"chr\": \"1\", ...},\n  ...\n  {\"from\": 500, \"to\": 501, \"chr\": \"2\", ...},\n]\nSee also: packAnnots\n*/\nfunction unpackAnnots() {\n  var chr, annots, i,\n    unpackedAnnots = [],\n    ideo = this,\n    chrs = ideo.annots;\n\n  for (i = 0; i < chrs.length; i++) {\n    chr = chrs[i];\n    annots = chr.annots;\n    unpackedAnnots = unpackedAnnots.concat(annots);\n  }\n\n  return unpackedAnnots;\n}\n\n/*\n  Compresses annots back to default state.  Inverse of unpackAnnots.\n*/\nfunction packAnnots(unpackedAnnots) {\n  var chr, annot, i,\n    annots = [],\n    ideo = this,\n    chrs = ideo.annots;\n\n  for (chr in chrs) {\n    annots.push({chr: chrs[chr].chr, annots: []});\n  }\n\n  for (i = 0; i < unpackedAnnots.length; i++) {\n    annot = unpackedAnnots[i];\n    annots[annot.chrIndex].annots.push(annot);\n  }\n\n  return annots;\n}\n\n/*\n  Initializes crossfilter.  Needed for client-side filtering.\n  More: https://github.com/square/crossfilter/wiki/API-Reference\n*/\nfunction initCrossFilter() {\n  var i, facet,\n    ideo = this,\n    keys = ideo.rawAnnots.keys;\n\n  ideo.unpackedAnnots = ideo.unpackAnnots();\n  ideo.crossfilter = crossfilter__WEBPACK_IMPORTED_MODULE_1__(ideo.unpackedAnnots);\n\n  ideo.annotsByFacet = {};\n  ideo.facets = keys.slice(3, keys.length);\n\n  for (i = 0; i < ideo.facets.length; i++) {\n    facet = ideo.facets[i];\n    ideo.annotsByFacet[facet] =\n      ideo.crossfilter.dimension(function(d) {\n          return d[facet];\n        });\n  }\n\n  if ('filterSelections' in ideo) {\n    ideo.filterAnnots(ideo.filterSelections);\n  }\n}\n\nfunction getFilteredResults(selections, ideo) {\n  var fn, i, facet, results,\n    counts = {};\n\n  if (Object.keys(selections).length === 0) {\n    results = ideo.unpackedAnnots;\n  } else {\n    for (i = 0; i < ideo.facets.length; i++) {\n      facet = ideo.facets[i];\n      if (facet in selections) {\n        fn = function(d) {\n          return (d in selections[facet]);\n        };\n      } else {\n        fn = null;\n      }\n      ideo.annotsByFacet[facet].filter(fn);\n      counts[facet] = ideo.annotsByFacet[facet].group().top(Infinity);\n    }\n    results = ideo.annotsByFacet[facet].top(Infinity);\n  }\n\n  return [results, counts];\n}\n\n/*\n  Filters annotations based on the given selections\n  \"selections\" is an object of objects, e.g.\n\n    {\n      \"tissue-type\": {          <-- a facet\n        \"cerebral-cortex\": 1,   <-- a filter; \"1\" means it is selected\n        \"liver\": 1\n      },\n      \"gene-type\": {\n        mirna\": 1\n      }\n    }\n\n  Translation:\n  select where:\n      (tissue-type is cerebral-cortex OR liver) and (gene-type is mirna)\n\n  TODO:\n    * Filter counts\n    * Range filters\n    * Integrate server-side filtering for very large datasets\n*/\nfunction filterAnnots(selections) {\n  var i, facet, results, counts,\n    t0 = Date.now(),\n    ideo = this;\n\n  ideo.filterSelections = selections;\n  [results, counts] = getFilteredResults(selections, ideo);\n\n  for (i < 0; i < ideo.facets.length; i++) {\n    ideo.annotsByFacet[facet].filterAll(); // clear filters\n  }\n\n  results = ideo.packAnnots(results);\n\n  delete ideo.maxAnnotsPerBar;\n  delete ideo.maxAnnotsPerBarAllChrs;\n\n  d3.selectAll(ideo.selector + ' polygon.annot').remove();\n  ideo.drawAnnots(results);\n\n  console.log('Time in filterAnnots: ' + (Date.now() - t0) + ' ms');\n\n  return counts;\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/filter.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/ideogram.js":
/*!**************************************************!*\
  !*** ./node_modules/ideogram/src/js/ideogram.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Ideogram; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-brush */ \"./node_modules/d3-brush/src/index.js\");\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-scale */ \"./node_modules/d3-scale/index.js\");\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony import */ var es6_natural_sort__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! es6-natural-sort */ \"./node_modules/es6-natural-sort/naturalSort.min.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./version */ \"./node_modules/ideogram/src/js/version.js\");\n/* harmony import */ var _init_init__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./init/init */ \"./node_modules/ideogram/src/js/init/init.js\");\n/* harmony import */ var _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./annotations/annotations */ \"./node_modules/ideogram/src/js/annotations/annotations.js\");\n/* harmony import */ var _services_services__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./services/services */ \"./node_modules/ideogram/src/js/services/services.js\");\n/* harmony import */ var _bands_bands__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./bands/bands */ \"./node_modules/ideogram/src/js/bands/bands.js\");\n/* harmony import */ var _brush__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./brush */ \"./node_modules/ideogram/src/js/brush.js\");\n/* harmony import */ var _sex_chromosomes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sex-chromosomes */ \"./node_modules/ideogram/src/js/sex-chromosomes.js\");\n/* harmony import */ var _coordinate_converters__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./coordinate-converters */ \"./node_modules/ideogram/src/js/coordinate-converters.js\");\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./filter */ \"./node_modules/ideogram/src/js/filter.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _views_chromosome_model__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./views/chromosome-model */ \"./node_modules/ideogram/src/js/views/chromosome-model.js\");\n/* harmony import */ var _views_draw_chromosomes__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./views/draw-chromosomes */ \"./node_modules/ideogram/src/js/views/draw-chromosomes.js\");\n/* harmony import */ var _views_chromosome_labels_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./views/chromosome-labels.js */ \"./node_modules/ideogram/src/js/views/chromosome-labels.js\");\n/**\n * @fileoverview Core module of Ideogram.js, links all other modules\n * This file defines the Ideogram class, its constructor method, and its\n * static methods.  All instance methods are defined in other modules.\n *\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_16__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__, d3_fetch__WEBPACK_IMPORTED_MODULE_1__, d3_brush__WEBPACK_IMPORTED_MODULE_2__, d3_dispatch__WEBPACK_IMPORTED_MODULE_3__);\nd3.scaleLinear = d3_scale__WEBPACK_IMPORTED_MODULE_4__[\"scaleLinear\"];\nd3.max = d3_array__WEBPACK_IMPORTED_MODULE_5__[\"max\"];\n\nclass Ideogram {\n  constructor(config) {\n\n    // Functions from init.js\n    this.configure = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"configure\"];\n    this.initDrawChromosomes = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"initDrawChromosomes\"];\n    this.onLoad = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"onLoad\"];\n    this.handleRotateOnClick = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"handleRotateOnClick\"];\n    this.init = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"init\"];\n    this.finishInit = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"finishInit\"];\n    this.writeContainer = _init_init__WEBPACK_IMPORTED_MODULE_8__[\"writeContainer\"];\n\n    // Functions from annotations.js\n    this.onLoadAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"onLoadAnnots\"];\n    this.onDrawAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"onDrawAnnots\"];\n    this.processAnnotData = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"processAnnotData\"];\n    this.restoreDefaultTracks = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"restoreDefaultTracks\"];\n    this.updateDisplayedTracks = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"updateDisplayedTracks\"];\n    this.initAnnotSettings = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"initAnnotSettings\"];\n    this.fetchAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"fetchAnnots\"];\n    this.drawAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"drawAnnots\"];\n    this.getHistogramBars = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"getHistogramBars\"];\n    this.drawHeatmaps = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"drawHeatmaps\"];\n    this.deserializeAnnotsForHeatmap = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"deserializeAnnotsForHeatmap\"];\n    this.fillAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"fillAnnots\"];\n    this.drawProcessedAnnots = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"drawProcessedAnnots\"];\n    this.drawSynteny = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"drawSynteny\"];\n    this.startHideAnnotTooltipTimeout = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"startHideAnnotTooltipTimeout\"];\n    this.showAnnotTooltip = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"showAnnotTooltip\"];\n    this.onWillShowAnnotTooltip = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"onWillShowAnnotTooltip\"];\n    this.setOriginalTrackIndexes = _annotations_annotations__WEBPACK_IMPORTED_MODULE_9__[\"setOriginalTrackIndexes\"];\n\n    // Variables and functions from services.js\n    this.esearch = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"esearch\"];\n    this.esummary = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"esummary\"];\n    this.elink = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"elink\"];\n    this.getTaxidFromEutils = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"getTaxidFromEutils\"];\n    this.setTaxidData = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"setTaxidData\"];\n    this.setTaxidAndAssemblyAndChromosomes = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"setTaxidAndAssemblyAndChromosomes\"];\n    this.getOrganismFromEutils = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"getOrganismFromEutils\"];\n    this.getTaxids = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"getTaxids\"];\n    this.getAssemblyAndChromosomesFromEutils = _services_services__WEBPACK_IMPORTED_MODULE_10__[\"getAssemblyAndChromosomesFromEutils\"];\n\n    // Functions from bands.js\n    this.parseBands = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"parseBands\"];\n    this.drawBandLabels = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"drawBandLabels\"];\n    this.getBandColorGradients = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"getBandColorGradients\"];\n    this.processBandData = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"processBandData\"];\n    this.setBandsToShow = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"setBandsToShow\"];\n    this.hideUnshownBandLabels = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"hideUnshownBandLabels\"];\n    this.drawBandLabelText = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"drawBandLabelText\"];\n    this.drawBandLabelStalk = _bands_bands__WEBPACK_IMPORTED_MODULE_11__[\"drawBandLabelStalk\"];\n\n    // Functions from brush.js\n    this.onBrushMove = _brush__WEBPACK_IMPORTED_MODULE_12__[\"onBrushMove\"];\n    this.createBrush = _brush__WEBPACK_IMPORTED_MODULE_12__[\"createBrush\"];\n\n    // Functions from sex-chromosomes.js\n    this.drawSexChromosomes = _sex_chromosomes__WEBPACK_IMPORTED_MODULE_13__[\"drawSexChromosomes\"];\n    this.setSexChromosomes = _sex_chromosomes__WEBPACK_IMPORTED_MODULE_13__[\"setSexChromosomes\"];\n\n    // Functions from coordinate-converters.js\n    this.convertBpToPx = _coordinate_converters__WEBPACK_IMPORTED_MODULE_14__[\"convertBpToPx\"];\n    this.convertPxToBp = _coordinate_converters__WEBPACK_IMPORTED_MODULE_14__[\"convertPxToBp\"];\n\n    // Functions from filter.js\n    this.unpackAnnots = _filter__WEBPACK_IMPORTED_MODULE_15__[\"unpackAnnots\"];\n    this.packAnnots = _filter__WEBPACK_IMPORTED_MODULE_15__[\"packAnnots\"];\n    this.initCrossFilter = _filter__WEBPACK_IMPORTED_MODULE_15__[\"initCrossFilter\"];\n    this.filterAnnots = _filter__WEBPACK_IMPORTED_MODULE_15__[\"filterAnnots\"];\n\n    // Functions from lib\n    this.assemblyIsAccession = _lib__WEBPACK_IMPORTED_MODULE_16__[\"assemblyIsAccession\"];\n    this.getDataDir = _lib__WEBPACK_IMPORTED_MODULE_16__[\"getDataDir\"];\n    this.round = _lib__WEBPACK_IMPORTED_MODULE_16__[\"round\"];\n    this.onDidRotate = _lib__WEBPACK_IMPORTED_MODULE_16__[\"onDidRotate\"];\n    this.getSvg = _lib__WEBPACK_IMPORTED_MODULE_16__[\"getSvg\"];\n\n    // Functions from views/chromosome-model.js\n    this.getChromosomeModel = _views_chromosome_model__WEBPACK_IMPORTED_MODULE_17__[\"getChromosomeModel\"];\n    this.getChromosomePixels = _views_chromosome_model__WEBPACK_IMPORTED_MODULE_17__[\"getChromosomePixels\"];\n\n    // Functions from views/chromosome-labels.js\n    this.drawChromosomeLabels = _views_chromosome_labels_js__WEBPACK_IMPORTED_MODULE_19__[\"drawChromosomeLabels\"];\n    this.rotateChromosomeLabels = _views_chromosome_labels_js__WEBPACK_IMPORTED_MODULE_19__[\"rotateChromosomeLabels\"];\n\n    // Functions from views/draw-chromosomes.js\n    this.appendHomolog = _views_draw_chromosomes__WEBPACK_IMPORTED_MODULE_18__[\"appendHomolog\"];\n    this.drawChromosome = _views_draw_chromosomes__WEBPACK_IMPORTED_MODULE_18__[\"drawChromosome\"];\n    this.rotateAndToggleDisplay = _views_draw_chromosomes__WEBPACK_IMPORTED_MODULE_18__[\"rotateAndToggleDisplay\"];\n    this.setOverflowScroll = _views_draw_chromosomes__WEBPACK_IMPORTED_MODULE_18__[\"setOverflowScroll\"];\n\n    this.configure(config)\n  }\n\n  /**\n   * Get the current version of Ideogram.js\n   */\n  static get version() {\n    return _version__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n  }\n\n  /**\n  * Enable use of D3 in client apps, via \"d3 = Ideogram.d3\"\n  */\n  static get d3() {\n    return d3;\n  }\n\n  /**\n  * e.g. \"Homo sapiens\" -> \"homo-sapiens\"\n  */\n  static slugify(value) {\n    return value.toLowerCase().replace(' ', '-');\n  }\n\n\n  /**\n   * Sorts two chromosome objects by type and name\n   * - Nuclear chromosomes come before non-nuclear chromosomes.\n   * - Among nuclear chromosomes, use \"natural sorting\", e.g.\n   *   numbers come before letters\n   * - Among non-nuclear chromosomes, i.e. \"MT\" (mitochondrial DNA) and\n   *   \"CP\" (chromoplast DNA), MT comes first\n   *\n   *\n   * @param a Chromosome object \"A\"\n   * @param b Chromosome object \"B\"\n   * @returns {Number} JavaScript sort order indicator\n   */\n  static sortChromosomes(a, b) {\n    var aIsNuclear = a.type === 'nuclear',\n      bIsNuclear = b.type === 'nuclear',\n      aIsCP = a.type === 'chloroplast',\n      bIsCP = b.type === 'chloroplast',\n      aIsMT = a.type === 'mitochondrion',\n      bIsMT = b.type === 'mitochondrion',\n      aIsAP = a.type === 'apicoplast',\n      bIsAP = b.type === 'apicoplast';\n    // aIsPlastid = aIsMT && a.name !== 'MT', // e.g. B1 in rice genome GCF_001433935.1\n    // bIsPlastid = bIsMT && b.name !== 'MT';\n\n    if (aIsNuclear && bIsNuclear) {\n      return Object(es6_natural_sort__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(a.name, b.name);\n    } else if (!aIsNuclear && bIsNuclear) {\n      return 1;\n    } else if (aIsMT && bIsCP) {\n      return 1;\n    } else if (aIsCP && bIsMT) {\n      return -1;\n    } else if (!aIsAP && !aIsMT && !aIsCP && (bIsMT || bIsCP || bIsAP)) {\n      return -1;\n    }\n  }\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/ideogram.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/index.js":
/*!***********************************************!*\
  !*** ./node_modules/ideogram/src/js/index.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ideogram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ideogram */ \"./node_modules/ideogram/src/js/ideogram.js\");\n\n\n// Enable references to Ideogram when loaded via traditional script tag\nwindow.Ideogram = _ideogram__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n// Enable references to Ideogram when imported as an ES6 module\n/* harmony default export */ __webpack_exports__[\"default\"] = (_ideogram__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/index.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/init/configure.js":
/*!********************************************************!*\
  !*** ./node_modules/ideogram/src/js/init/configure.js ***!
  \********************************************************/
/*! exports provided: configure */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"configure\", function() { return configure; });\nfunction configurePloidy(ideo) {\n  if (!ideo.config.ploidy) ideo.config.ploidy = 1;\n\n  if (ideo.config.ploidy > 1) {\n    ideo.sexChromosomes = {};\n    if (!ideo.config.sex) {\n      // Default to 'male' per human, mouse reference genomes.\n      // TODO: The default sex value should probably be the heterogametic sex,\n      // i.e. whichever sex has allosomes that differ in morphology.\n      // In mammals and most insects that is the male.\n      // However, in birds and reptiles, that is female.\n      ideo.config.sex = 'male';\n    }\n    if (ideo.config.ploidy === 2 && !ideo.config.ancestors) {\n      ideo.config.ancestors = {M: '#ffb6c1', P: '#add8e6'};\n      ideo.config.ploidyDesc = 'MP';\n    }\n  }\n}\n\nfunction configureHeight(ideo) {\n  var container, rect, chrHeight;\n\n  if (!ideo.config.chrHeight) {\n    container = ideo.config.container;\n    rect = document.querySelector(container).getBoundingClientRect();\n\n    if (ideo.config.orientation === 'vertical') {\n      chrHeight = rect.height;\n    } else {\n      chrHeight = rect.width;\n    }\n\n    if (container === 'body' || chrHeight === 0) chrHeight = 400;\n    ideo.config.chrHeight = chrHeight;\n  }\n}\n\nfunction configureWidth(ideo) {\n  var chrWidth, chrHeight;\n\n  if (!ideo.config.chrWidth) {\n    chrWidth = 10;\n    chrHeight = ideo.config.chrHeight;\n\n    if (chrHeight < 900 && chrHeight > 500) {\n      chrWidth = Math.round(chrHeight / 40);\n    } else if (chrHeight >= 900) {\n      chrWidth = Math.round(chrHeight / 45);\n    }\n    ideo.config.chrWidth = chrWidth;\n  }\n}\n\nfunction configureMargin(ideo) {\n  if (!ideo.config.chrMargin) {\n    if (ideo.config.ploidy === 1) {\n      ideo.config.chrMargin = 10;\n    } else {\n      // Defaults polyploid chromosomes to relatively small interchromatid gap\n      ideo.config.chrMargin = Math.round(ideo.config.chrWidth / 4);\n    }\n  }\n  if (ideo.config.showBandLabels) ideo.config.chrMargin += 20;\n}\n\nfunction configureBump(ideo) {\n  ideo.bump = Math.round(ideo.config.chrHeight / 125);\n  ideo.adjustedBump = false;\n  if (ideo.config.chrHeight < 200) {\n    ideo.adjustedBump = true;\n    ideo.bump = 4;\n  }\n}\n\nfunction configureSingleChromosome(config, ideo) {\n  if (config.chromosome) {\n    ideo.config.chromosomes = [config.chromosome];\n    if ('showBandLabels' in config === false) {\n      ideo.config.showBandLabels = true;\n    }\n    if ('rotatable' in config === false) ideo.config.rotatable = false;\n  }\n}\n\nfunction configureOrganisms(ideo) {\n  ideo.organisms = {\n    9606: {\n      commonName: 'Human',\n      scientificName: 'Homo sapiens',\n      scientificNameAbbr: 'H. sapiens',\n      assemblies: {\n        default: 'GCF_000001405.26', // GRCh38\n        GRCh38: 'GCF_000001405.26',\n        GRCh37: 'GCF_000001405.13'\n      }\n    },\n    10090: {\n      commonName: 'Mouse',\n      scientificName: 'Mus musculus',\n      scientificNameAbbr: 'M. musculus',\n      assemblies: {\n        default: 'GCF_000001635.20'\n      }\n    },\n    4641: {\n      commonName: 'banana',\n      scientificName: 'Musa acuminata',\n      scientificNameAbbr: 'M. acuminata',\n      assemblies: {\n        default: 'mock'\n      }\n    }\n  }\n}\n\nfunction configureCallbacks(config, ideo) {\n  if (config.onLoad) ideo.onLoadCallback = config.onLoad;\n  if (config.onLoadAnnots) ideo.onLoadAnnotsCallback = config.onLoadAnnots;\n  if (config.onDrawAnnots) ideo.onDrawAnnotsCallback = config.onDrawAnnots;\n  if (config.onBrushMove) ideo.onBrushMoveCallback = config.onBrushMove;\n  if (config.onDidRotate) ideo.onDidRotateCallback = config.onDidRotate;\n  if (config.onWillShowAnnotTooltip) {\n    ideo.onWillShowAnnotTooltipCallback = config.onWillShowAnnotTooltip;\n  }\n}\n\nfunction configureMiscellaneous(ideo) {\n  ideo.chromosomesArray = [];\n  ideo.coordinateSystem = 'iscn';\n  ideo.maxLength = {bp: 0, iscn: 0};\n  ideo.chromosomes = {};\n  ideo.numChromosomes = 0;\n  if (!ideo.config.debug) ideo.config.debug = false;\n  if (!ideo.config.dataDir) ideo.config.dataDir = ideo.getDataDir();\n  if (!ideo.config.container) ideo.config.container = 'body';\n  ideo.selector = ideo.config.container + ' #_ideogram';\n  if (!ideo.config.resolution) ideo.config.resolution = '';\n  if (!ideo.config.orientation) ideo.config.orientation = 'vertical';\n  if (!ideo.config.brush) ideo.config.brush = null;\n  if (!ideo.config.rows) ideo.config.rows = 1;\n  if ('showChromosomeLabels' in ideo.config === false) {\n    ideo.config.showChromosomeLabels = true;\n  }\n  if (!ideo.config.showNonNuclearChromosomes) {\n    ideo.config.showNonNuclearChromosomes = false;\n  }\n}\n\nfunction configureBands(ideo) {\n  if (!ideo.config.showBandLabels) ideo.config.showBandLabels = false;\n\n  if ('showFullyBanded' in ideo.config) {\n    ideo.config.showFullyBanded = ideo.config.showFullyBanded;\n  } else {\n    ideo.config.showFullyBanded = true;\n  }\n\n  ideo.bandsToShow = [];\n  ideo.bandData = {};\n}\n\n/**\n * High-level helper method for Ideogram constructor.\n *\n * @param config Configuration object.  Enables setting Ideogram properties.\n */\nfunction configure(config) {\n  \n  // Clone the config object, to allow multiple instantiations\n  // without picking up prior ideogram's settings\n  this.config = JSON.parse(JSON.stringify(config));\n\n  configureMiscellaneous(this);\n  configurePloidy(this);\n  configureBands(this);\n  configureHeight(this);\n  configureWidth(this);\n  configureMargin(this);\n  configureCallbacks(config, this);\n  configureOrganisms(this);\n  configureBump(this);\n  configureSingleChromosome(config, this);\n  this.initAnnotSettings();\n  this.config.chrMargin += this.config.chrWidth;\n  if (this.config.annotationsLayout === 'heatmap') {\n    this.config.chrMargin += this.config.annotTracksHeight;\n  } else {\n    this.config.chrMargin += this.config.annotTracksHeight * 2;\n  }\n  this.init();\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/init/configure.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/init/finish-init.js":
/*!**********************************************************!*\
  !*** ./node_modules/ideogram/src/js/init/finish-init.js ***!
  \**********************************************************/
/*! exports provided: finishInit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishInit\", function() { return finishInit; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction processLabels(config, ideo) {\n  var i, chrID, t0C, t1C;\n\n  if (config.showBandLabels === true) {\n    t0C = new Date().getTime();\n    ideo.hideUnshownBandLabels();\n    t1C = new Date().getTime();\n    if (config.debug) {\n      console.log('Time in showing bands: ' + (t1C - t0C) + ' ms');\n    }\n\n    if (config.orientation === 'vertical') {\n      for (i = 0; i < ideo.chromosomesArray.length; i++) {\n        chrID = '#' + ideo.chromosomesArray[i].id;\n        ideo.rotateChromosomeLabels(d3.select(chrID), i);\n      }\n    }\n  }\n\n  if (config.showChromosomeLabels === true) {\n    ideo.drawChromosomeLabels(ideo.chromosomes);\n  }\n}\n\nfunction processAnnots(ideo) {\n  if (typeof ideo.timeout !== 'undefined') window.clearTimeout(ideo.timeout);\n\n  ideo.rawAnnots = ideo.setOriginalTrackIndexes(ideo.rawAnnots);\n\n  if (ideo.config.annotationsDisplayedTracks) {\n    ideo.annots =\n      ideo.updateDisplayedTracks(ideo.config.annotationsDisplayedTracks);\n  } else {\n    ideo.annots = ideo.processAnnotData(ideo.rawAnnots);\n    if (ideo.config.filterable) ideo.initCrossFilter();\n    ideo.drawProcessedAnnots(ideo.annots);\n  }\n}\n\n/**\n * Waits for potentially large annotation dataset\n * to be received by the client, then triggers annotation processing.\n */\nfunction waitForAndProcessAnnots(ideo) {\n  if (ideo.rawAnnots) {\n    processAnnots(ideo);\n  } else {\n    (function checkAnnotData() {\n      ideo.timeout = setTimeout(function() {\n        if (!ideo.rawAnnots) {\n          checkAnnotData();\n        } else {\n          processAnnots(ideo);\n        }\n      }, 50);\n    })();\n  }\n}\n\nfunction reportDebugTimings(config, t0, t0A) {\n\n  var t1A = new Date().getTime();\n  if (config.debug) {\n    console.log('Time in drawChromosome: ' + (t1A - t0A) + ' ms');\n  }\n\n  var t1 = new Date().getTime();\n  if (config.debug) {\n    console.log('Time constructing ideogram: ' + (t1 - t0) + ' ms');\n  }\n}\n\n/**\n * Completes high-level initialization.\n * Draws chromosomes and band labels, rotating as needed;\n * processes and draws annotations;\n * creates brush, emits notification of load completion, etc.\n */\nfunction finishInit(bandsArray, t0) {\n  var t0A = new Date().getTime(),\n    ideo = this,\n    config = ideo.config;\n\n  ideo.initDrawChromosomes(bandsArray);\n\n  if (config.annotationsPath) waitForAndProcessAnnots(ideo);\n\n  processLabels(config, ideo);\n\n  if (config.brush) ideo.createBrush(config.brush);\n  if (config.annotations) ideo.drawAnnots(config.annotations);\n\n  reportDebugTimings(config, t0, t0A);\n\n  ideo.setOverflowScroll();\n\n  if (ideo.onLoadCallback) ideo.onLoadCallback();\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/init/finish-init.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/init/init.js":
/*!***************************************************!*\
  !*** ./node_modules/ideogram/src/js/init/init.js ***!
  \***************************************************/
/*! exports provided: configure, initDrawChromosomes, handleRotateOnClick, setOverflowScroll, onLoad, init, finishInit, writeContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initDrawChromosomes\", function() { return initDrawChromosomes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"handleRotateOnClick\", function() { return handleRotateOnClick; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setOverflowScroll\", function() { return setOverflowScroll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onLoad\", function() { return onLoad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _configure__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./configure */ \"./node_modules/ideogram/src/js/init/configure.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"configure\", function() { return _configure__WEBPACK_IMPORTED_MODULE_3__[\"configure\"]; });\n\n/* harmony import */ var _finish_init__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./finish-init */ \"./node_modules/ideogram/src/js/init/finish-init.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"finishInit\", function() { return _finish_init__WEBPACK_IMPORTED_MODULE_4__[\"finishInit\"]; });\n\n/* harmony import */ var _write_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./write-container */ \"./node_modules/ideogram/src/js/init/write-container.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"writeContainer\", function() { return _write_container__WEBPACK_IMPORTED_MODULE_5__[\"writeContainer\"]; });\n\n/* harmony import */ var _bands_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../bands/fetch */ \"./node_modules/ideogram/src/js/bands/fetch.js\");\n/**\n * @fileoveriew Methods for initialization\n */\n\n\n\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_fetch__WEBPACK_IMPORTED_MODULE_0__, d3_selection__WEBPACK_IMPORTED_MODULE_1__);\n\nfunction isHeterogameticChromosome(chrModel, chrIndex, ideo) {\n  var ploidy = ideo.config.ploidy;\n  return (\n    'sex' in ideo.config &&\n      (\n        ploidy === 2 && ideo.sexChromosomes.index + 2 === chrIndex ||\n        ideo.config.sex === 'female' && chrModel.name === 'Y'\n      )\n  );\n}\n\nfunction prepareChromosomes(bandsArray, chrs, taxid, chrIndex, ideo) {\n  var j, bands, chromosome, chrModel\n\n  for (j = 0; j < chrs.length; j++) {\n    chromosome = chrs[j];\n    if ('bandsArray' in ideo) bands = bandsArray[chrIndex];\n\n    chrModel = ideo.getChromosomeModel(bands, chromosome, taxid, chrIndex);\n\n    chrIndex += 1;\n\n    if (typeof chromosome !== 'string') chromosome = chromosome.name;\n\n    ideo.chromosomes[taxid][chromosome] = chrModel;\n    ideo.chromosomesArray.push(chrModel);\n\n    if (isHeterogameticChromosome(chrModel, chrIndex, ideo)) continue;\n\n    ideo.drawChromosome(chrModel);\n  }\n\n  return chrIndex;\n}\n\nfunction setCoordinateSystem(chrs, ideo) {\n  if (\n    typeof chrBands !== 'undefined' &&\n    chrs.length >= chrBands.length / 2\n  ) {\n    ideo.coordinateSystem = 'bp';\n  }\n}\n\n/**\n * Configures chromosome data and calls downstream chromosome drawing functions\n */\nfunction initDrawChromosomes(bandsArray) {\n  var ideo = this,\n    taxids = ideo.config.taxids,\n    chrIndex = 0,\n    taxid, i, chrs;\n\n  if (bandsArray.length > 0) ideo.bandsArray = {};\n\n  for (i = 0; i < taxids.length; i++) {\n    taxid = taxids[i];\n    chrs = ideo.config.chromosomes[taxid];\n\n    setCoordinateSystem(chrs, ideo);\n\n    ideo.chromosomes[taxid] = {};\n    ideo.setSexChromosomes(chrs);\n\n    if ('bandsArray' in ideo) ideo.bandsArray[taxid] = bandsArray;\n\n    chrIndex = prepareChromosomes(bandsArray, chrs, taxid, chrIndex, ideo);\n\n    if (ideo.config.showBandLabels) ideo.drawBandLabels(ideo.chromosomes);\n    ideo.handleRotateOnClick();\n    ideo._gotChrModels = true; // Prevent issue with errant rat centromeres\n  }\n}\n\n/**\n * Attach any click handlers to rotate and toggle chromosomes\n */\nfunction handleRotateOnClick() {\n  var ideo = this;\n\n  if (!('rotatable' in ideo.config && ideo.config.rotatable === false)) {\n    d3.selectAll(ideo.selector + ' .chromosome').on('click', function () {\n      ideo.rotateAndToggleDisplay(this);\n    });\n  } else {\n    d3.selectAll(ideo.selector + ' .chromosome')\n      .style('cursor', 'default');\n  }\n}\n\n/**\n * Called when Ideogram has finished initializing.\n * Accounts for certain ideogram properties not being set until\n * asynchronous requests succeed, etc.\n */\nfunction onLoad() {\n  call(this.onLoadCallback);\n}\n\nfunction getBandFileName(taxid, accession, ideo) {\n  var organism = ideo.organisms[taxid];\n  var bandFileName = [Ideogram.slugify(organism.scientificName)];\n  var assemblies = organism.assemblies;\n  var resolution = ideo.config.resolution;\n\n  if (accession !== assemblies.default) {\n    bandFileName.push(accession);\n  }\n  if (\n    taxid === '9606' &&\n    (accession in assemblies === 'false' &&\n      _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].values(assemblies).includes(config.assembly) ||\n      (resolution !== '' && resolution !== 850))\n  ) {\n    bandFileName.push(resolution);\n  }\n  bandFileName = bandFileName.join('-') + '.js';\n\n  return bandFileName;\n}\n\nfunction getBandFileNames(taxid, bandFileNames, ideo) {\n  var organism, assemblies, accession, bandFileName,\n    config = ideo.config;\n\n  organism = ideo.organisms[taxid];\n\n  if (!config.assembly) ideo.config.assembly = 'default';\n\n  assemblies = organism.assemblies;\n\n  if (ideo.assemblyIsAccession()) {\n    accession = config.assembly;\n  } else {\n    accession = assemblies[config.assembly];\n  }\n\n  bandFileName = getBandFileName(taxid, accession, ideo);\n\n  if (taxid === '9606' || taxid === '10090') {\n    bandFileNames[taxid] = bandFileName;\n  }\n  return bandFileNames;\n}\n\nfunction prepareContainer(taxid, bandFileNames, t0, ideo) {\n  var bandsArray;\n\n  if (\n    Object(_lib__WEBPACK_IMPORTED_MODULE_2__[\"hasNonGenBankAssembly\"])(ideo) &&\n    typeof chrBands === 'undefined' && taxid in bandFileNames\n  ) {\n    Object(_bands_fetch__WEBPACK_IMPORTED_MODULE_6__[\"fetchBands\"])(bandFileNames, taxid, t0, ideo);\n  } else {\n    if (typeof chrBands !== 'undefined') {\n      // If bands already available,\n      // e.g. via <script> tag in initial page load\n      ideo.bandData[taxid] = chrBands;\n    }\n    bandsArray = ideo.processBandData();\n    ideo.writeContainer(bandsArray, taxid, t0);\n  }\n}\n\nfunction initializeTaxids(ideo) {\n  return new Promise(function(resolve) {\n    if (typeof ideo.config.organism === 'number') {\n      // 'organism' is a taxid, e.g. 9606\n      ideo.getOrganismFromEutils(function() {\n        ideo.getTaxids(resolve);\n      });\n    } else {\n      ideo.getTaxids(resolve);\n    }\n  });\n}\n\nfunction getBandsAndPrepareContainer(taxids, t0, ideo) {\n  var bandFileNames, i, taxid;\n\n  taxid = taxids[0];\n  ideo.config.taxid = taxid;\n  ideo.config.taxids = taxids;\n\n  bandFileNames = {\n    9606: '',\n    10090: ''\n  };\n\n  for (i = 0; i < taxids.length; i++) {\n    taxid = String(taxids[i]);\n    bandFileNames = getBandFileNames(taxid, bandFileNames, ideo);\n    prepareContainer(taxid, bandFileNames, t0, ideo);\n  }\n}\n\n/**\n * Initializes an ideogram.\n * Sets some high-level properties based on instance configuration,\n * fetches band and annotation data if needed, and\n * writes an SVG element to the document to contain the ideogram\n */\nfunction init() {\n  var t0 = new Date().getTime(),\n    ideo = this;\n\n  initializeTaxids(ideo).then(function(taxids) {\n    getBandsAndPrepareContainer(taxids, t0, ideo);\n  });\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/init/init.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/init/write-container.js":
/*!**************************************************************!*\
  !*** ./node_modules/ideogram/src/js/init/write-container.js ***!
  \**************************************************************/
/*! exports provided: writeContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeContainer\", function() { return writeContainer; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _ploidy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ploidy */ \"./node_modules/ideogram/src/js/ploidy.js\");\n/* harmony import */ var _layouts_layout_adapter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../layouts/layout-adapter */ \"./node_modules/ideogram/src/js/layouts/layout-adapter.js\");\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * If ploidy description is a string, then convert it to the canonical\n * array format.  String ploidyDesc is used when depicting e.g. parental\n * origin each member of chromosome pair in a human genome.\n * See ploidy-basic.html for usage example.\n */\nfunction setPloidy(ideo) {\n  if (\n    'ploidyDesc' in ideo.config &&\n    typeof ideo.config.ploidyDesc === 'string'\n  ) {\n    var tmp = [];\n    for (var i = 0; i < ideo.numChromosomes; i++) {\n      tmp.push(ideo.config.ploidyDesc);\n    }\n    ideo.config.ploidyDesc = tmp;\n  }\n  // Organism ploidy description\n  ideo._ploidy = new _ploidy__WEBPACK_IMPORTED_MODULE_2__[\"Ploidy\"](ideo.config);\n}\n\nfunction getContainerSvgClass(ideo) {\n  var svgClass = '';\n  if (ideo.config.showChromosomeLabels) {\n    if (ideo.config.orientation === 'horizontal') {\n      svgClass += 'labeledLeft ';\n    } else {\n      svgClass += 'labeled ';\n    }\n  }\n\n  if (\n    ideo.config.annotationsLayout &&\n    ideo.config.annotationsLayout === 'overlay'\n  ) {\n    svgClass += 'faint';\n  }\n\n  return svgClass\n}\n\n/**\n * Write tooltip div setup with default styling.\n */\nfunction writeTooltipContainer(ideo) {\n  d3.select(ideo.config.container + ' #_ideogramOuterWrap').append('div')\n    .attr('class', '_ideogramTooltip')\n    .attr('id', '_ideogramTooltip')\n    .style('opacity', 0)\n    .style('position', 'fixed')\n    .style('text-align', 'center')\n    .style('padding', '4px')\n    .style('font', '12px sans-serif')\n    .style('background', 'white')\n    .style('border', '1px solid black')\n    .style('border-radius', '5px')\n    .style('z-index', '100');\n}\n\nfunction writeContainerDom(taxid, ideo) {\n\n  // Remove any previous container content\n  d3.selectAll(ideo.config.container + ' #_ideogramOuterWrap').remove();\n\n  d3.select(ideo.config.container)\n    .append('div')\n    .attr('id', '_ideogramOuterWrap')\n    .append('div')\n    .attr('id', '_ideogramTrackLabelContainer')\n    .style('position', 'absolute');\n\n  d3.select(ideo.config.container + ' #_ideogramOuterWrap').append('div')\n    .attr('id', '_ideogramMiddleWrap') // needed for overflow and scrolling\n      .style('position', 'relative')\n      .style('overflow-x', 'auto')\n    .append('div')\n    .attr('id', '_ideogramInnerWrap') // needed for overflow and scrolling\n    .append('svg')\n    .attr('id', '_ideogram')\n    .attr('class', getContainerSvgClass(ideo))\n    .attr('width', ideo._layout.getWidth(taxid))\n    .attr('height', ideo._layout.getHeight(taxid))\n    .html(ideo.getBandColorGradients());\n}\n\n/**\n * Writes the HTML elements that contain this ideogram instance.\n */\nfunction writeContainer(bandsArray, taxid, t0) {\n  var ideo = this;\n\n  if (ideo.config.annotationsPath) {\n    ideo.fetchAnnots(ideo.config.annotationsPath);\n  }\n\n  setPloidy(ideo);\n\n  ideo._layout = Object(_layouts_layout_adapter__WEBPACK_IMPORTED_MODULE_3__[\"getLayout\"])(ideo);\n\n  writeContainerDom(taxid, ideo);\n\n  ideo.isOnlyIdeogram = document.querySelectorAll('#_ideogram').length === 1;\n  writeTooltipContainer(ideo);\n  ideo.finishInit(bandsArray, t0);\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/init/write-container.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/horizontal-layout.js":
/*!*******************************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/horizontal-layout.js ***!
  \*******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout */ \"./node_modules/ideogram/src/js/layouts/layout.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/**\n* @fileoverview Horizontal layout class\n* Ideogram instances with horizontal layout are oriented with each chromosome\n* starting at left and ending at right, and aligned as rows.\n*/\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nclass HorizontalLayout extends _layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n\n  constructor(config, ideo) {\n    super(config, ideo);\n    this._class = 'HorizontalLayout';\n    this.margin = {\n      left: 20,\n      top: 30\n    };\n  }\n\n  _getLeftMargin() {\n    var margin = _layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype._getLeftMargin.call(this);\n    if (this._config.ploidy > 1) {\n      margin *= 1.8;\n    }\n\n    return margin;\n  }\n\n  rotateForward(setIndex, chrIndex, chrElement, callback) {\n\n    var xOffset, yOffset, transform, labels;\n\n    xOffset = 30;\n\n    yOffset = xOffset + 7.5;\n\n    transform = (\n      'rotate(90) ' +\n      'translate(' + xOffset + ', -' + yOffset + ') '\n    );\n\n    d3.select(chrElement.parentNode)\n      .transition()\n      .attr(\"transform\", transform)\n      .on('end', callback);\n\n    // Append new chromosome labels\n    labels = this.getChromosomeLabels(chrElement);\n    d3.select(this._ideo.getSvg())\n      .append('g')\n      .attr('class', 'tmp')\n      .selectAll('text')\n      .data(labels)\n      .enter()\n      .append('text')\n      .attr('class', function(d, i) {\n        return i === 0 && labels.length === 2 ? 'chrSetLabel' : null;\n      })\n      .attr('x', xOffset - 4)\n      .attr('y', function(d, i) {\n        return (i + 1 + labels.length % 2) * 12;\n      })\n      .style('text-anchor', 'middle')\n      .style('opacity', 0)\n      .text(String)\n      .transition()\n      .style('opacity', 1);\n\n    this._ideo.config.orientation = 'vertical';\n  }\n\n  rotateBack(setIndex, chrIndex, chrElement, callback) {\n    var translate = this.getChromosomeSetTranslate(setIndex);\n\n    d3.select(chrElement.parentNode)\n      .transition()\n      .attr(\"transform\", translate)\n      .on('end', callback);\n\n    d3.selectAll(this._ideo.selector + ' g.tmp')\n      .style('opacity', 0)\n      .remove();\n\n    this._ideo.config.orientation = 'horizontal';\n  }\n\n  getHeight(taxid) {\n    // Get last chromosome set offset.\n    var numChromosomes = this._config.chromosomes[taxid].length;\n    var lastSetOffset = this.getChromosomeSetYTranslate(numChromosomes - 1);\n\n    // Get last chromosome set size.\n    var lastSetSize = this._getChromosomeSetSize(numChromosomes - 1);\n\n    // Increase offset by last chromosome set size\n    lastSetOffset += lastSetSize;\n\n    return lastSetOffset + this._getAdditionalOffset() * 2;\n  }\n\n  getWidth() {\n    return this._config.chrHeight + this.margin.top * 1.5;\n  }\n\n  getChromosomeSetLabelAnchor() {\n    return 'end';\n  }\n\n  getChromosomeBandLabelAnchor() {\n    return null;\n  }\n\n  getChromosomeBandTickY1() {\n    return 2;\n  }\n\n  getChromosomeBandTickY2() {\n    return 10;\n  }\n\n  getChromosomeSetLabelTranslate() {\n    return null;\n  }\n\n  getChromosomeSetTranslate(setIndex) {\n    var leftMargin = this._getLeftMargin();\n    var yTranslate = this.getChromosomeSetYTranslate(setIndex);\n    return 'translate(' + leftMargin + ', ' + yTranslate + ')';\n  }\n\n  getChromosomeSetYTranslate(setIndex) {\n    // If no detailed description provided just use one formula for all cases.\n    if (!this._config.ploidyDesc) {\n      return this._config.chrMargin * (setIndex + 1);\n    }\n\n    // Id detailed description provided start to calculate offsets\n    //  for each chromosome set separately. This should be done only once.\n    if (!this._translate) {\n      // First offset equals to zero.\n      this._translate = [1];\n\n      // Loop through description set\n      for (var i = 1; i < this._config.ploidyDesc.length; i++) {\n        this._translate[i] =\n          this._translate[i - 1] + this._getChromosomeSetSize(i - 1);\n      }\n    }\n\n    return this._translate[setIndex];\n  }\n\n  getChromosomeSetLabelXPosition(i) {\n    if (this._config.ploidy === 1) {\n      return this.getChromosomeLabelXPosition(i);\n    } else {\n      return -20;\n    }\n  }\n\n  getChromosomeSetLabelYPosition(i) {\n    var setSize = this._ploidy.getSetSize(i),\n      config = this._config,\n      chrMargin = config.chrMargin,\n      chrWidth = config.chrWidth,\n      y;\n\n    if (config.ploidy === 1) {\n      y = chrWidth / 2 + 3;\n    } else {\n      y = (setSize * chrMargin) / 2;\n    }\n\n    return y;\n  }\n\n  getChromosomeLabelXPosition() {\n    return -8;\n  }\n\n  getChromosomeLabelYPosition() {\n    return this._config.chrWidth;\n  }\n\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (HorizontalLayout);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/horizontal-layout.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/layout-adapter.js":
/*!****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/layout-adapter.js ***!
  \****************************************************************/
/*! exports provided: getLayout */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getLayout\", function() { return getLayout; });\n/* harmony import */ var _vertical_layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vertical-layout */ \"./node_modules/ideogram/src/js/layouts/vertical-layout.js\");\n/* harmony import */ var _horizontal_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./horizontal-layout */ \"./node_modules/ideogram/src/js/layouts/horizontal-layout.js\");\n/* harmony import */ var _paired_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./paired-layout */ \"./node_modules/ideogram/src/js/layouts/paired-layout.js\");\n/* harmony import */ var _small_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./small-layout */ \"./node_modules/ideogram/src/js/layouts/small-layout.js\");\n\n\n\n\n\nfunction getLayout(ideo) {\n  var config = ideo.config;\n\n  if ('perspective' in config && config.perspective === 'comparative') {\n    return new _paired_layout__WEBPACK_IMPORTED_MODULE_2__[\"default\"](config, ideo);\n  } else if ('rows' in config && config.rows > 1) {\n    return new _small_layout__WEBPACK_IMPORTED_MODULE_3__[\"default\"](config, ideo);\n  } else if (config.orientation === 'vertical') {\n    return new _vertical_layout__WEBPACK_IMPORTED_MODULE_0__[\"default\"](config, ideo);\n  } else if (config.orientation === 'horizontal') {\n    return new _horizontal_layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"](config, ideo);\n  } else {\n    return new _vertical_layout__WEBPACK_IMPORTED_MODULE_0__[\"default\"](config, ideo);\n  }\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/layout-adapter.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/layout.js":
/*!********************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/layout.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _views_chromosome_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../views/chromosome-util */ \"./node_modules/ideogram/src/js/views/chromosome-util.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nclass Layout {\n\n  constructor(config, ideo) {\n    this._config = config;\n    this._ideo = ideo;\n    this._ploidy = this._ideo._ploidy;\n    this._translate = undefined;\n\n    if ('chrSetMargin' in config) {\n      this.chrSetMargin = config.chrSetMargin;\n    } else {\n      var chrMargin = this._config.chrMargin;\n      this.chrSetMargin = (this._config.ploidy > 1 ? chrMargin : 0);\n    }\n\n    // Chromosome band's size.\n    this._tickSize = 8;\n\n    // Chromosome rotation state.\n    this._isRotated = false;\n  }\n\n  // Get chart left margin\n  _getLeftMargin() {\n    return this.margin.left;\n  }\n\n  // Get rotated chromosome y scale\n  _getYScale() {\n    // 20 is width of rotated chromosome.\n    return 20 / this._config.chrWidth;\n  }\n\n  // Get chromosome labels\n  getChromosomeLabels(chrElement) {\n    var util = new _views_chromosome_util__WEBPACK_IMPORTED_MODULE_1__[\"ChromosomeUtil\"](chrElement),\n      labels = [];\n\n    if (this._ideo.config.ploidy > 1) {\n      labels.push(util.getSetLabel());\n    }\n    labels.push(util.getLabel());\n\n    return labels.filter(function(d) {\n      return d.length > 0;\n    });\n  }\n\n  getChromosomeBandLabelTranslate(band) {\n    var x, y, translate,\n      ideo = this._ideo,\n      tickSize = this._tickSize,\n      orientation = ideo.config.orientation;\n\n    if (orientation === 'vertical') {\n      x = tickSize;\n      y = ideo.round(2 + band.px.start + band.px.width/2);\n      translate = \"rotate(-90)translate(\" + x + \",\" + y + \")\";\n    } else if (orientation === 'horizontal') {\n      x = ideo.round(-tickSize + band.px.start + band.px.width / 2);\n      y = -10;\n      translate = 'translate(' + x + ',' + y + ')';\n    }\n\n    return {\n      x: x,\n      y: y,\n      translate: translate\n    };\n  }\n\n  didRotate(chrIndex, chrElement) {\n    var ideo, taxid, chrName, bands, chrModel, oldWidth,\n      chrSetElement, transform, scale, scaleRE;\n\n    ideo = this._ideo;\n    taxid = ideo.config.taxid;\n    chrName = chrElement.id.split('-')[0].replace('chr', '');\n    chrModel = ideo.chromosomes[taxid][chrName];\n    bands = chrModel.bands;\n\n    chrSetElement = d3.select(chrElement.parentNode);\n    transform = chrSetElement.attr('transform');\n    scaleRE = /scale\\(.*\\)/;\n    scale = scaleRE.exec(transform);\n    transform = transform.replace(scale, '');\n    chrSetElement.attr('transform', transform);\n\n    oldWidth = chrModel.width;\n\n    chrModel = ideo.getChromosomeModel(bands, chrName, taxid, chrIndex);\n\n    chrModel.oldWidth = oldWidth;\n\n    ideo.chromosomes[taxid][chrName] = chrModel;\n    ideo.drawChromosome(chrModel);\n\n    ideo.handleRotateOnClick();\n\n    if (ideo.rawAnnots) {\n      if (ideo.displayedTrackIndexes) {\n        ideo.updateDisplayedTracks(ideo.displayedTrackIndexes);\n      } else {\n        ideo.annots = ideo.processAnnotData(ideo.rawAnnots);\n        ideo.drawProcessedAnnots(ideo.annots);\n\n        if (ideo.config.filterable) {\n          ideo.initCrossFilter();\n        }\n      }\n    }\n\n    if (ideo.config.showBandLabels === true) {\n      ideo.drawBandLabels(ideo.chromosomes);\n      ideo.hideUnshownBandLabels();\n    }\n\n    if (ideo.onDidRotateCallback) {\n      ideo.onDidRotateCallback(chrModel);\n    }\n  }\n\n  rotate(chrSetIndex, chrIndex, chrElement) {\n    var ideo, otherChrs, ideoBounds, labelSelectors;\n    ideo = this._ideo;\n\n    labelSelectors = (\n      ideo.selector + ' .chrSetLabel, ' + ideo.selector + ' .chrLabel'\n    );\n\n    ideoBounds = document.querySelector(ideo.selector).getBoundingClientRect();\n\n    // Find chromosomes which should be hidden\n    otherChrs = d3.selectAll(ideo.selector + ' g.chromosome')\n      .filter(function() {return this !== chrElement;});\n\n    if (this._isRotated) {\n\n      this._isRotated = false;\n\n      ideo.config.chrHeight = ideo.config.chrHeightOriginal;\n      ideo.config.chrWidth = ideo.config.chrWidthOriginal;\n      ideo.config.annotationHeight = ideo.config.annotationHeightOriginal;\n\n      // Rotate chromosome back\n      this.rotateBack(chrSetIndex, chrIndex, chrElement, function() {\n        // Show all other chromosomes and chromosome labels\n        otherChrs.style('display', null);\n        d3.selectAll(labelSelectors).style('display', null);\n        ideo._layout.didRotate(chrIndex, chrElement);\n      });\n\n    } else {\n\n      this._isRotated = true;\n\n      // Hide all other chromosomes and chromosome labels\n      otherChrs.style('display', 'none');\n      d3.selectAll(labelSelectors).style('display', 'none');\n\n      // Rotate chromosome\n      this.rotateForward(chrSetIndex, chrIndex, chrElement, function() {\n\n        var chrHeight, elementLength, windowLength;\n\n        ideo.config.chrHeightOriginal = ideo.config.chrHeight;\n        ideo.config.chrWidthOriginal = ideo.config.chrWidth;\n        ideo.config.annotationHeightOriginal = ideo.config.annotationHeight;\n\n        if (ideo._layout._class === 'VerticalLayout') {\n          elementLength = ideoBounds.width;\n          windowLength = window.innerWidth;\n        } else {\n          elementLength = ideoBounds.height - 10;\n          windowLength = window.innerHeight - 10;\n        }\n\n        // Set chromosome height to window length or ideogram element length,\n        // whichever is smaller.  This keeps whole chromosome viewable, while\n        // also ensuring the height doesn't exceed what the user specified.\n        chrHeight = (windowLength < elementLength ? windowLength : elementLength);\n        chrHeight -= ideo.config.chrMargin * 2;\n        ideo.config.chrHeight = chrHeight;\n\n        // Account for chromosome label\n        // TODO: Make this dynamic, not hard-coded\n        ideo.config.chrWidth *= 2.3;\n\n        ideo.config.annotationHeight *= 1.7;\n\n        ideo._layout.didRotate(chrIndex, chrElement);\n      });\n    }\n  }\n\n  getChromosomeLabelClass() {\n    if (this._config.ploidy === 1) {\n      return 'chrLabel';\n    } else {\n      return 'chrSetLabel';\n    }\n  }\n\n  _getAdditionalOffset() {\n    return (\n      (this._config.annotationHeight || 0) * (this._config.annotationsNumTracks || 1)\n    );\n  }\n\n  _getChromosomeSetSize(chrSetIndex) {\n    // Get last chromosome set size.\n    var setSize = this._ploidy.getSetSize(chrSetIndex);\n\n    // Increase offset by last chromosome set size\n    return (\n      setSize * this._config.chrWidth * 2 + (this.chrSetMargin)\n    );\n  }\n\n  // Get chromosome set label anchor property\n  getChromosomeSetLabelAnchor() {\n    return 'middle';\n  }\n\n  // Get chromosome label y position.\n  getChromosomeLabelYPosition() {\n    return -5.5;\n  }\n\n  getChromosomeSetLabelYPosition(chrIndex) {\n    if (this._config.ploidy === 1) {\n      return this.getChromosomeLabelYPosition(chrIndex);\n    } else {\n      return -2 * this._config.chrWidth;\n    }\n  }\n\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Layout);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/layout.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/paired-layout.js":
/*!***************************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/paired-layout.js ***!
  \***************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout */ \"./node_modules/ideogram/src/js/layouts/layout.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/**\n* @fileoverview Paired layout class\n* Ideograms with paired layout group each chromosome in a chromosome set.\n* This enables ploidy support beyond the default haploid; e.g. diploid genomes.\n*/\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nclass PairedLayout extends _layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n\n  constructor(config, ideo) {\n    super(config, ideo);\n\n    this._class = 'PairedLayout';\n\n    this.margin = {\n      left: 30\n    };\n  }\n\n  rotateForward(setIndex, chrIndex, chrElement, callback) {\n    console.warn('rotateForward not implemented for PairedLayout');\n    // var self = this;\n    // var ideo = this._ideo;\n    //\n    // // Get ideo container and chromosome set dimensions\n    // var ideoBox = d3.select(ideo.selector).node().getBoundingClientRect();\n    // var chrBox = chrElement.getBoundingClientRect();\n    //\n    // // Evaluate dimensions scale coefficients\n    // var scaleX = (ideoBox.width / chrBox.height) * 0.97;\n    // var scaleY = this._getYScale();\n    //\n    // // Evaluate y offset of chromosome.\n    // // It is different for first and the second one\n    // var yOffset = setIndex ? 150 : 25;\n    //\n    // var transform =\n    //   'translate(15, ' + yOffset + ') scale(' + scaleX + ', ' + scaleY + ')';\n    //\n    // // Run rotation procedure\n    // d3.select(chrElement.parentNode)\n    //   .transition()\n    //   .attr(\"transform\", transform)\n    //   .on('end', function() {\n    //     // Run callback function if provided\n    //     if (callback) {\n    //       callback();\n    //     }\n    //\n    //     var translateY = (6 * Number(!setIndex));\n    //\n    //     // Rotate band labels\n    //     d3.select(chrElement.parentNode).selectAll('g.bandLabel text')\n    //       .attr('transform', 'rotate(90) translate(0, ' + translateY + ')')\n    //       .attr('text-anchor', 'middle');\n    //\n    //     // Hide syntenic regions\n    //     d3.selectAll(ideo.selector + ' .syntenicRegion')\n    //       .style('display', 'none');\n    //   });\n    //\n    // // Append new chromosome labels\n    // var labels = this.getChromosomeLabels(chrElement);\n    //\n    // d3.select(this._ideo.getSvg())\n    //   .append('g')\n    //   .attr('class', 'tmp')\n    //   .selectAll('text')\n    //   .data(this.getChromosomeLabels(chrElement))\n    //   .enter()\n    //   .append('text')\n    //   .attr('class', function(d, i) {\n    //     return i === 0 && labels.length === 2 ? 'chrSetLabel' : null;\n    //   })\n    //   .attr('x', 0)\n    //   .attr('y', yOffset + (self._config.chrWidth * scaleX / 2) * 1.15)\n    //   .style('opacity', 0)\n    //   .text(String)\n    //   .transition()\n    //   .style('opacity', 1);\n  }\n\n  rotateBack(setIndex, chrIndex, chrElement, callback) {\n    console.warn('rotateBack not implemented for PairedLayout');\n    //\n    // var ideo = this._ideo;\n    //\n    // // Get intial transformation string for chromosome set\n    // var translate = this.getChromosomeSetTranslate(setIndex);\n    //\n    // // Run rotation procedure\n    // d3.select(chrElement.parentNode)\n    //   .transition()\n    //   .attr('transform', translate)\n    //   .on('end', function() {\n    //     // Run callback fnuction if provided\n    //     callback();\n    //\n    //     // Show syntenic regions\n    //     d3.selectAll(ideo.select + ' .syntenicRegion')\n    //       .style('display', null);\n    //\n    //     // Reset changed attributes to original state\n    //     d3.select(chrElement.parentNode).selectAll('g.bandLabel text')\n    //       .attr('transform', null)\n    //       .attr('text-anchor', setIndex ? null : 'end');\n    //   });\n    //\n    // d3.selectAll(ideo.selector + ' g.tmp')\n    //   .style('opacity', 0)\n    //   .remove();\n  }\n\n  getHeight() {\n    return this._config.chrHeight + this.margin.left * 1.5;\n  }\n\n  getWidth() {\n    return '97%';\n  }\n\n  getChromosomeBandTickY1(chrIndex) {\n    return chrIndex % 2 ? this._config.chrWidth : this._config.chrWidth * 2;\n  }\n\n  getChromosomeBandTickY2(chrIndex) {\n    var width = this._config.chrWidth;\n    return chrIndex % 2 ? width - this._tickSize : width * 2 + this._tickSize;\n  }\n\n  getChromosomeBandLabelAnchor(chrIndex) {\n    return chrIndex % 2 ? null : 'end';\n  }\n\n  getChromosomeBandLabelTranslate(band, chrIndex) {\n    var x = chrIndex % 2 ? 10 : -this._config.chrWidth - 10;\n    var y = this._ideo.round(band.px.start + band.px.width / 2) + 3;\n\n    return {\n      x: y,\n      y: y,\n      translate: 'rotate(-90) translate(' + x + ', ' + y + ')'\n    };\n  }\n\n  getChromosomeLabelXPosition() {\n    return -this._tickSize;\n  }\n\n  getChromosomeSetLabelXPosition() {\n    return this._config.chrWidth / -2;\n  }\n\n  getChromosomeSetLabelTranslate() {\n    return 'rotate(-90)';\n  }\n\n  getChromosomeSetTranslate(setIndex) {\n    var chromosomeSetYTranslate = this.getChromosomeSetYTranslate(setIndex);\n    return (\n      'rotate(90) ' +\n      'translate(' + this.margin.left + ', -' + chromosomeSetYTranslate + ')'\n    );\n  }\n\n  getChromosomeSetYTranslate(setIndex) {\n    return 200 * (setIndex + 1);\n  }\n\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (PairedLayout);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/paired-layout.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/small-layout.js":
/*!**************************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/small-layout.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout */ \"./node_modules/ideogram/src/js/layouts/layout.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nclass SmallLayout extends _layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n\n  constructor(config, ideo) {\n    super(config, ideo);\n\n    this._class = 'SmallLayout';\n\n    this.margin = {\n      left: 36.5,\n      top: 10\n    };\n  }\n\n  // rotateForward(setIndex, chrIndex, chrElement, callback) {\n  //   var ideoBox = d3.select(this._ideo.selector).node().getBoundingClientRect();\n  //   var chrBox = chrElement.getBoundingClientRect();\n  //\n  //   var scaleX = (ideoBox.width / chrBox.height) * 0.97;\n  //   var scaleY = this._getYScale();\n  //\n  //   transform = 'translate(5, 25) scale(' + scaleX + ', ' + scaleY + ')';\n  //\n  //   d3.select(chrElement.parentNode)\n  //     .transition()\n  //     .attr('transform', transform)\n  //     .on('end', callback);\n  // }\n  //\n  // rotateBack(setIndex, chrIndex, chrElement, callback) {\n  //   var translate = this.getChromosomeSetTranslate(setIndex);\n  //\n  //   d3.select(chrElement.parentNode)\n  //     .transition()\n  //     .attr('transform', translate)\n  //     .on('end', callback);\n  // }\n\n  getHeight() {\n    var chrHeight = this._config.chrHeight;\n    return this._config.rows * (chrHeight + this.margin.top * 1.5);\n  }\n\n  getWidth() {\n    return '97%';\n  }\n\n  getChromosomeBandLabelTranslate() {\n\n  }\n\n  getChromosomeSetLabelTranslate() {\n    return 'rotate(-90)';\n  }\n\n  getChromosomeSetTranslate(setIndex) {\n    // Get organisms id list\n    var organisms = [];\n    this._ideo.getTaxids(function(taxidList) {\n      organisms = taxidList;\n    });\n    // Get first organism chromosomes amount\n    var size = this._ideo.config.chromosomes[organisms[0]].length;\n    // Amount of chromosomes per number\n    var rowSize = size / this._config.rows;\n\n    var xOffset;\n    var yOffset;\n\n    if (setIndex > rowSize - 1) {\n      xOffset = this.margin.left + this._config.chrHeight * 1.4;\n      yOffset = this.getChromosomeSetYTranslate(setIndex - rowSize);\n    } else {\n      xOffset = this.margin.left;\n      yOffset = this.getChromosomeSetYTranslate(setIndex);\n    }\n\n    return 'rotate(90) translate(' + xOffset + ', -' + yOffset + ')';\n  }\n\n  getChromosomeSetYTranslate(setIndex) {\n    // Get additional padding caused by annotation tracks\n    var additionalPadding = this._getAdditionalOffset();\n    // If no detailed description provided just use one formula for all cases\n    return (\n      this.margin.left * (setIndex) + this._config.chrWidth +\n      additionalPadding * 2 + additionalPadding * setIndex\n    );\n  }\n\n  getChromosomeSetLabelXPosition(setIndex) {\n    return (\n      ((this._ploidy.getSetSize(setIndex) * this._config.chrWidth + 20) / -2) +\n      (this._config.ploidy > 1 ? 0 : this._config.chrWidth)\n    );\n  }\n\n  getChromosomeLabelXPosition() {\n    return this._config.chrWidth / -2;\n  }\n\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SmallLayout);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/small-layout.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/layouts/vertical-layout.js":
/*!*****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/layouts/vertical-layout.js ***!
  \*****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout */ \"./node_modules/ideogram/src/js/layouts/layout.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/**\n* @fileoverview Vertical layout class\n* Ideogram instances with vertical layout are oriented with each chromosome\n* starting at top and ending at bottom, and aligned as columns.\n*/\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nclass VerticalLayout extends _layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n\n  constructor(config, ideo) {\n    super(config, ideo);\n    this._class = 'VerticalLayout';\n    // Layout margins\n    this.margin = {\n      top: 30,\n      left: 15\n    };\n  }\n\n  rotateForward(setIndex, chrIndex, chrElement, callback) {\n\n    var self = this;\n\n    var xOffset = 20;\n\n    var scale = this.getChromosomeScale(chrElement);\n\n    var transform =\n      'translate(' + xOffset + ', 25) ' + scale;\n\n    d3.select(chrElement.parentNode)\n      .transition()\n      .attr('transform', transform)\n      .on('end', callback);\n\n    // Append new chromosome labels\n    var labels = this.getChromosomeLabels(chrElement);\n    var y = (xOffset + self._config.chrWidth) * 1.3;\n    d3.select(this._ideo.getSvg())\n      .append('g')\n      .attr('class', 'tmp')\n      .selectAll('text')\n      .data(labels)\n      .enter()\n      .append('text')\n      .attr('class', function(d, i) {\n        return i === 0 && labels.length === 2 ? 'chrSetLabel' : null;\n      })\n      .attr('x', 0)\n      .attr('y', y).style('opacity', 0)\n      .text(String)\n      .transition()\n      .style('opacity', 1);\n\n    this._ideo.config.orientation = 'horizontal';\n  }\n\n  rotateBack(setIndex, chrIndex, chrElement, callback) {\n\n    var scale = this.getChromosomeScaleBack(chrElement);\n    var translate = this.getChromosomeSetTranslate(setIndex);\n\n    d3.select(chrElement.parentNode)\n      .transition()\n      .attr('transform', translate + ' ' + scale)\n      .on('end', callback);\n\n    d3.selectAll(this._ideo.selector + ' g.tmp')\n      .style('opacity', 0)\n      .remove();\n\n    this._ideo.config.orientation = 'vertical';\n  }\n\n  getHeight() {\n    return this._config.chrHeight + this.margin.top * 1.5;\n  }\n\n  getWidth() {\n    return '97%';\n  }\n\n  getChromosomeBandTickY1() {\n    return 2;\n  }\n\n  getChromosomeBandTickY2() {\n    return 10;\n  }\n\n  getChromosomeSetLabelTranslate() {\n    return 'rotate(-90)';\n  }\n\n  getChromosomeBandLabelAnchor() {\n    return null;\n  }\n\n  getChromosomeScale(chrElement) {\n    var ideoBox, chrBox, scaleX, scaleY;\n\n    ideoBox = d3.select(this._ideo.selector).node().getBoundingClientRect();\n    chrBox = chrElement.getBoundingClientRect();\n\n    scaleX = (ideoBox.width / chrBox.height) * 0.97;\n    scaleY = this._getYScale();\n\n    return 'scale(' + scaleX + ', ' + scaleY + ')';\n  }\n\n  getChromosomeScaleBack(chrElement) {\n    var scale, scaleX, scaleY, chrName, chrModel, taxid, ideo, config;\n\n    ideo = this._ideo;\n    config = ideo.config;\n    taxid = config.taxid;\n\n    chrName = chrElement.id.split('-')[0].replace('chr', '');\n    chrModel = this._ideo.chromosomes[taxid][chrName];\n    scaleX = (chrModel.oldWidth/(config.chrHeight*3)) * 0.97;\n    scaleY = 1/this._getYScale();\n    scale = 'scale(' + scaleX + ', ' + scaleY + ')';\n    return scale;\n  }\n\n  getChromosomeSetTranslate(setIndex) {\n    var marginTop = this.margin.top;\n    var chromosomeSetYTranslate = this.getChromosomeSetYTranslate(setIndex);\n    return (\n      'rotate(90) ' +\n      'translate(' + marginTop + ', -' + chromosomeSetYTranslate + ')'\n    );\n  }\n\n  getChromosomeSetYTranslate(setIndex) {\n    // Get additional padding caused by annotation/histogram tracks\n    var pad = this._getAdditionalOffset(),\n      margin = this._config.chrMargin,\n      width = this._config.chrWidth,\n      translate;\n\n    // If no detailed description provided just use one formula for all cases\n    if (!this._config.ploidyDesc) {\n      // TODO:\n      // This part of code contains a lot magic numbers and if\n      // statements for exactly corresponing to original ideogram examples.\n      // But all this stuff should be removed. Calculation of translate\n      // should be a simple formula applied for all cases listed below.\n      // Now they are diffirent because of Layout:_getAdditionalOffset do\n      // not meet for cases when no annotation, when annotation exists and\n      // when histogram used\n\n      if (this._config.annotationsLayout === 'histogram') {\n        return margin / 2 + setIndex * (margin + width + 2) + pad * 2 + 1;\n      } else {\n        translate = width + setIndex * (margin + width) + pad * 2;\n        if (pad > 0) {\n          return translate;\n        } else {\n          return translate + 4 + (2 * setIndex);\n        }\n      }\n    }\n\n    // If detailed description provided start to calculate offsets\n    // for each chromosome set separately. This should be done only once\n    if (!this._translate) {\n      // First offset equals to zero\n      this._translate = [this._ploidy.getSetSize(0) * width * 2];\n      var prevTranslate;\n      // Loop through description set\n      for (var i = 1; i < this._config.ploidyDesc.length; i++) {\n        prevTranslate = this._translate[i - 1];\n        this._translate[i] = prevTranslate + this._getChromosomeSetSize(i - 1);\n      }\n    }\n\n    return this._translate[setIndex];\n  }\n\n  getChromosomeSetLabelXPosition() {\n    return (this._config.chrWidth * this._config.ploidy) / -2;\n  }\n\n  getChromosomeLabelXPosition() {\n    return this._config.chrWidth / -2;\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (VerticalLayout);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/layouts/vertical-layout.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/lib.js":
/*!*********************************************!*\
  !*** ./node_modules/ideogram/src/js/lib.js ***!
  \*********************************************/
/*! exports provided: assemblyIsAccession, hasNonGenBankAssembly, hasGenBankAssembly, getDataDir, drawChromosomeLabels, rotateChromosomeLabels, round, appendHomolog, drawChromosome, rotateAndToggleDisplay, onDidRotate, getSvg, setOverflowScroll, Object */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"assemblyIsAccession\", function() { return assemblyIsAccession; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasNonGenBankAssembly\", function() { return hasNonGenBankAssembly; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGenBankAssembly\", function() { return hasGenBankAssembly; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDataDir\", function() { return getDataDir; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawChromosomeLabels\", function() { return drawChromosomeLabels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateChromosomeLabels\", function() { return rotateChromosomeLabels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"round\", function() { return round; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"appendHomolog\", function() { return appendHomolog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawChromosome\", function() { return drawChromosome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateAndToggleDisplay\", function() { return rotateAndToggleDisplay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onDidRotate\", function() { return onDidRotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSvg\", function() { return getSvg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setOverflowScroll\", function() { return setOverflowScroll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Object\", function() { return Object; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/**\n * @fileoverview A collection of Ideogram methods that don't fit elsewhere.\n */\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Is the assembly in this.config an NCBI Assembly accession?\n *\n * @returns {boolean}\n */\nfunction assemblyIsAccession() {\n  return (\n    'assembly' in this.config &&\n    /(GCF_|GCA_)/.test(this.config.assembly)\n  );\n}\n\n/**\n * Is the assembly in this.config not from GenBank?\n *\n * @returns {boolean}\n */\nfunction hasNonGenBankAssembly(ideo) {\n  return (\n    'assembly' in ideo.config &&\n    /(GCA_)/.test(ideo.config.assembly) === false\n  );\n}\n\n/**\n * Is the assembly in this.config from GenBank?\n *\n * @returns {boolean}\n */\nfunction hasGenBankAssembly(ideo) {\n  return (\n    'assembly' in ideo.config &&\n    /(GCA_)/.test(ideo.config.assembly)\n  );\n}\n\n/**\n * Returns directory used to fetch data for bands and annotations\n *\n * This simplifies ideogram configuration.  By default, the dataDir is\n * set to an external CDN unless we're serving from the local host, in\n * which case dataDir is deduced from the \"src\" attribute of the ideogram\n * script loaded in the document.\n *\n * @returns {String}\n */\nfunction getDataDir() {\n  var script, tmp, protocol, dataDir, ideogramInLeaf,\n    scripts = document.scripts,\n    host = location.host.split(':')[0],\n    version = Ideogram.version;\n\n  if (host !== 'localhost' && host !== '127.0.0.1') {\n    return (\n      'https://unpkg.com/ideogram@' + version + '/dist/data/bands/native/'\n    );\n  }\n\n  for (var i = 0; i < scripts.length; i++) {\n    script = scripts[i];\n    ideogramInLeaf = /ideogram/.test(script.src.split('/').slice(-1));\n    if ('src' in script && ideogramInLeaf) {\n      tmp = script.src.split('//');\n      protocol = tmp[0];\n      tmp = '/' + tmp[1].split('/').slice(0,-2).join('/');\n      dataDir = protocol + '//' + tmp + '/data/bands/native/';\n      return dataDir;\n    }\n  }\n  return '../data/bands/native/';\n}\n\n/**\n * Rounds an SVG coordinates to two decimal places\n *\n * @param coord SVG coordinate, e.g. 42.1234567890\n * @returns {number} Rounded value, e.g. 42.12\n */\nfunction round(coord) {\n  // Per http://stackoverflow.com/a/9453447, below method is fastest\n  return Math.round(coord * 100) / 100;\n}\n\nfunction onDidRotate(chrModel) {\n  call(this.onDidRotateCallback, chrModel);\n}\n\n/**\n * Get ideogram SVG container\n */\nfunction getSvg() {\n  return d3.select(this.selector).node();\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/lib.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/model-adapter.js":
/*!*******************************************************!*\
  !*** ./node_modules/ideogram/src/js/model-adapter.js ***!
  \*******************************************************/
/*! exports provided: ModelAdapter, ModelNoBandsAdapter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ModelAdapter\", function() { return ModelAdapter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ModelNoBandsAdapter\", function() { return ModelNoBandsAdapter; });\nclass ModelAdapter {\n\n  constructor(model) {\n    this._model = model;\n    this._class = 'ModelAdapter';\n  }\n\n  static getInstance(model) {\n    if (model.bands) {\n      return new ModelAdapter(model);\n    } else {\n      return new ModelNoBandsAdapter(model);\n    }\n  }\n\n  getModel() {\n    return this._model;\n  }\n\n  getCssClass() {\n    return '';\n  }\n}\n\nclass ModelNoBandsAdapter extends ModelAdapter {\n\n  constructor(model) {\n    super(model);\n    this._class = 'ModelNoBandsAdapter';\n  }\n\n  getModel() {\n    this._model.bands = [];\n\n    // If chromosome width more than 1, add single band to bands array\n    if (this._model.width > 1) {\n      this._model.bands.push({\n        name: 'q',\n        px: {\n          start: 0,\n          stop: this._model.width,\n          width: this._model.width\n        },\n        bp: {\n          start: 1,\n          stop: this._model.length\n        }\n      });\n    }\n\n    return this._model;\n  }\n\n  getCssClass() {\n    return 'noBands';\n  }\n\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/model-adapter.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/parsers/bed-parser.js":
/*!************************************************************!*\
  !*** ./node_modules/ideogram/src/js/parsers/bed-parser.js ***!
  \************************************************************/
/*! exports provided: BedParser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"BedParser\", function() { return BedParser; });\n/**\n * @fileoverview Parse raw Ideogram.js annotations from a BED file\n * BED documentation: https://genome.ucsc.edu/FAQ/FAQformat#format1\n */\n\nclass BedParser {\n\n  constructor(bed, ideo) {\n    this.rawAnnots = this.parseBed(bed, ideo);\n  }\n\n  // http://stackoverflow.com/a/5624139\n  static componentToHex(c) {\n    var hex = parseInt(c, 10).toString(16);\n    return hex.length === 1 ? \"0\" + hex : hex;\n  }\n\n  static rgbToHex(r, g, b) {\n    return (\n      \"#\" +\n      BedParser.componentToHex(r) +\n      BedParser.componentToHex(g) +\n      BedParser.componentToHex(b)\n    );\n  }\n\n  parseGenomicCoordinates(columns, ucscStyle) {\n    var chr, start, stop, length;\n\n    // These three columns (i.e. fields) are required\n    chr = columns[0];\n    start = parseInt(columns[1], 10);\n    stop = parseInt(columns[2], 10);\n\n    length = stop - start;\n\n    if (ucscStyle) {\n      chr = chr.slice(3);\n    }\n\n    return [chr, start, stop, length];\n  }\n\n  /**\n   * Parses an annotation from a tab-separated line of a BED file\n   */\n  parseAnnotFromTsvLine(tsvLine, chrs, ucscStyle) {\n    var annot, chrIndex, chr, start, stop, rgb, color, label,\n      columns = tsvLine.split(/\\s/g);\n\n    [chr, start, stop, length] =\n      this.parseGenomicCoordinates(columns, ucscStyle);\n\n    chrIndex = chrs.indexOf(chr);\n    if (chrIndex === -1) return [null, null];\n    \n    annot = ['', start, length, 0];\n\n    if (columns.length >= 4) {\n      label = columns[3];\n      annot[0] = label;\n    }\n\n    if (columns.length >= 8) {\n      rgb = columns[8].split(',');\n      color = BedParser.rgbToHex(rgb[0], rgb[1], rgb[2]);\n      annot.push(color);\n    }\n\n    return [chrIndex, annot];\n  }\n\n  parseRawAnnots(annots, bedStartIndex, tsvLines, chrs) {\n    var i, line, chrIndex, annot, keys, rawAnnots, ucscStyle;\n\n    ucscStyle = true;\n    if (isNaN(parseInt(tsvLines[bedStartIndex], 10)) === false) {\n      ucscStyle = false;\n    }\n\n    for (i = bedStartIndex; i < tsvLines.length; i++) {\n      line = tsvLines[i];\n      [chrIndex, annot] = this.parseAnnotFromTsvLine(line, chrs, ucscStyle);\n      if (chrIndex !== null) annots[chrIndex].annots.push(annot);\n    }\n\n    keys = ['name', 'start', 'length', 'trackIndex'];\n    if (tsvLines[bedStartIndex].length >= 8) keys.push('color');\n    \n    rawAnnots = {keys: keys, annots: annots};\n\n    return rawAnnots;\n  }\n\n  /**\n  * Parses a BED file, returns raw annotations\n  */\n  parseBed(bed, ideo) {\n    var i, chrs, chr, bedStartIndex, rawAnnots,\n      annots = [],\n      tsvLines = bed.split(/\\r\\n|\\n/);\n\n    chrs = Object.keys(ideo.chromosomes[ideo.config.taxid]);\n\n    for (i = 0; i < chrs.length; i++) {\n      chr = chrs[i];\n      annots.push({chr: chr, annots: []});\n    }\n\n    bedStartIndex = 0; // 1 if BED has header (i.e. track line), 0 otherwise\n    if (tsvLines[0].slice(0, 3) === 'chr' || isNaN(parseInt(tsvLines[0], 10))) {\n      bedStartIndex = 1;\n    }\n    \n    rawAnnots = this.parseRawAnnots(annots, bedStartIndex, tsvLines, chrs);\n    return rawAnnots;\n  }\n\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/parsers/bed-parser.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/ploidy.js":
/*!************************************************!*\
  !*** ./node_modules/ideogram/src/js/ploidy.js ***!
  \************************************************/
/*! exports provided: Ploidy */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Ploidy\", function() { return Ploidy; });\nclass Ploidy {\n\n  constructor(config) {\n    this._config = config;\n    this._description = this._normalize(this._config.ploidyDesc);\n  }\n\n  // Get number of chromosomes in a chromosome set\n  getChromosomesNumber(setIndex) {\n    if (this._config.ploidyDesc) {\n      var chrSetCode = this._config.ploidyDesc[setIndex];\n      if (chrSetCode instanceof Object) {\n        return Object.keys(chrSetCode)[0].length;\n      } else {\n        return chrSetCode.length;\n      }\n    } else {\n      return this._config.ploidy || 1;\n    }\n  }\n\n  // Normalize use defined description\n  _normalize(description) {\n    var key, descValue,\n      normalized = [];\n\n    if (!description) return description;\n\n    // Loop through description and normalize\n    for (key in description) {\n      descValue = description[key];\n      if (typeof descValue === 'string') {\n        if (this._config.orientation === 'vertical') {\n          descValue = descValue.split('').reverse();\n        }\n        normalized.push({\n          ancestors: descValue,\n          existence: this._getexistenceArray(descValue.length)\n        });\n      } else {\n        normalized.push({\n          ancestors: Object.keys(descValue)[0],\n          existence: descValue[Object.keys(descValue)[0]]\n        });\n      }\n    }\n\n    return normalized;\n  }\n\n  // Get array filled by '11' elements\n  _getexistenceArray(length) {\n    var array = [];\n\n    for (var i = 0; i < length; i++) {\n      array.push('11');\n    }\n\n    return array;\n  }\n\n  getSetSize(chrSetIndex) {\n    if (this._description) {\n      return this._description[chrSetIndex].ancestors.length;\n    } else {\n      return 1;\n    }\n  }\n\n  // Get ancestor letter\n  getAncestor(chrSetIndex, chrIndex) {\n    if (this._description) {\n      return this._description[chrSetIndex].ancestors[chrIndex];\n    } else {\n      return '';\n    }\n  }\n\n  // Check if chromosome's arm should be rendered.\n  // If no description was provided, method returns true and\n  // something another depending on user provided description.\n  exists(chrSetIndex, chrIndex, armIndex) {\n    if (this._description) {\n      var desc =\n        this._description[chrSetIndex].existence[chrIndex][armIndex];\n      return Number(desc) > 0;\n    } else {\n      return true;\n    }\n  }\n\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/ploidy.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/range.js":
/*!***********************************************!*\
  !*** ./node_modules/ideogram/src/js/range.js ***!
  \***********************************************/
/*! exports provided: Range */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Range\", function() { return Range; });\nclass Range {\n\n  /**\n  * Chromosome range.\n  * @public\n  * @class\n  * @param {Object} data - range data.\n  * @param {Integer} data.chr - chromosome index.\n  * @param {Integer[]} [data.ploidy] - array which controls on which chromosomes range should appear in case of ploidy.\n  * @param {Integer} data.start - range start.\n  * @param {Integer} data.stop - range end.\n  * @param {String} data.color - range color.\n  */\n  constructor(data) {\n    this._data = data;\n    this.start = data.start;\n    this.stop = data.stop;\n    this.length = this.stop - this.start\n  }\n\n  getColor(chrIndex) {\n    if (!('ploidy' in this._data)) {\n      return this._getColor(chrIndex);\n    } else if ('ploidy' in this._data && this._data.ploidy[chrIndex]) {\n      return this._getColor(chrIndex);\n    } else {\n      return 'transparent';\n    }\n  }\n\n  _getColor(chrIndex) {\n    if (Array.isArray(this._data.color)) {\n      return this._data.color[chrIndex];\n    } else {\n      return this._data.color;\n    }\n  }\n\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/range.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/services/eutils-config.js":
/*!****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/services/eutils-config.js ***!
  \****************************************************************/
/*! exports provided: esearch, esummary, elink, getAssemblySearchUrl */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"esearch\", function() { return esearch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"esummary\", function() { return esummary; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"elink\", function() { return elink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAssemblySearchUrl\", function() { return getAssemblySearchUrl; });\n// The E-Utilies In Depth: Parameters, Syntax and More:\n// https://www.ncbi.nlm.nih.gov/books/NBK25499/\n\nvar apiKey = '&api_key=7e33ac6a08a6955ec3b83d214d22b21a2808';\n\nvar eutils = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/';\nvar esearch = eutils + 'esearch.fcgi?retmode=json' + apiKey;\nvar esummary = eutils + 'esummary.fcgi?retmode=json' + apiKey;\nvar elink = eutils + 'elink.fcgi?retmode=json' + apiKey;\n\nfunction getAssemblySearchUrl(ideo) {\n  var organism, termStem, asmSearchUrl;\n\n  organism = ideo.config.organism;\n\n  if (ideo.assemblyIsAccession()) {\n    termStem = ideo.config.assembly + '%22[Assembly%20Accession]';\n  } else {\n    termStem = (\n      organism + '%22[organism]' +\n      'AND%20(%22latest%20refseq%22[filter])%20'\n    );\n  }\n\n  asmSearchUrl =\n    ideo.esearch +\n    '&db=assembly' +\n    '&term=%22' + termStem +\n    'AND%20(%22chromosome%20level%22[filter]%20' +\n    'OR%20%22complete%20genome%22[filter])';\n\n  return asmSearchUrl;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/services/eutils-config.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/services/organisms.js":
/*!************************************************************!*\
  !*** ./node_modules/ideogram/src/js/services/organisms.js ***!
  \************************************************************/
/*! exports provided: getTaxidFromEutils, setTaxidAndAssemblyAndChromosomes, getTaxids, setTaxidData, getOrganismFromEutils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTaxidFromEutils\", function() { return getTaxidFromEutils; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTaxidAndAssemblyAndChromosomes\", function() { return setTaxidAndAssemblyAndChromosomes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTaxids\", function() { return getTaxids; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTaxidData\", function() { return setTaxidData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getOrganismFromEutils\", function() { return getOrganismFromEutils; });\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n\n\nvar d3 = Object.assign({}, d3_fetch__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n *  Returns an NCBI taxonomy identifier (taxid) for the configured organism\n */\nfunction getTaxidFromEutils(callback) {\n  var organism, taxonomySearch, taxid,\n    ideo = this;\n\n  organism = ideo.config.organism;\n\n  taxonomySearch = ideo.esearch + '&db=taxonomy&term=' + organism;\n\n  d3.json(taxonomySearch).then(function(data) {\n    taxid = data.esearchresult.idlist[0];\n    if (typeof ideo.config.taxids === 'undefined') {\n      ideo.config.taxids = [taxid];\n    } else {\n      ideo.config.taxids.push(taxid);\n    }\n    return callback(taxid);\n  });\n}\n\nfunction setTaxidData(taxid) {\n  var organism, dataDir, urlOrg, taxids,\n    ideo = this;\n\n  organism = ideo.config.organism;\n  dataDir = ideo.config.dataDir;\n  urlOrg = organism.replace(' ', '-');\n\n  taxids = [taxid];\n\n  ideo.organisms[taxid] = {\n    commonName: '',\n    scientificName: organism,\n    scientificNameAbbr: ''\n  };\n\n  var fullyBandedTaxids = ['9606', '10090', '10116'];\n  if (fullyBandedTaxids.includes(taxid) && !ideo.config.showFullyBanded) {\n    urlOrg += '-no-bands';\n  }\n  var chromosomesUrl = dataDir + urlOrg + '.js';\n\n  var promise2 = new Promise(function(resolve, reject) {\n    fetch(chromosomesUrl).then(function(response) {\n      if (response.ok === false) {\n        reject(Error('Fetch failed for ' + chromosomesUrl));\n      } else {\n        return response.text().then(function(text) {\n          resolve(text);\n        });\n      }\n    });\n  });\n\n  return promise2\n  .then(function(data) {\n    // Check if chromosome data exists locally.\n    // This is used for pre-processed centromere data,\n    // which is not accessible via EUtils.  See get_chromosomes.py.\n\n    var asmAndChrTaxidsArray = [''],\n        chromosomes = [],\n        seenChrs = {},\n        chr;\n\n    eval(data);\n\n    for (var i = 0; i < chrBands.length; i++) {\n      chr = chrBands[i].split(' ')[0];\n      if (chr in seenChrs) {\n        continue;\n      } else {\n        chromosomes.push({name: chr, type: 'nuclear'});\n        seenChrs[chr] = 1;\n      }\n    }\n    chromosomes = chromosomes.sort(Ideogram.sortChromosomes);\n    asmAndChrTaxidsArray.push(chromosomes);\n    asmAndChrTaxidsArray.push(taxids);\n    ideo.coordinateSystem = 'iscn';\n    return asmAndChrTaxidsArray;\n  },\n  function() {\n    return new Promise(function(resolve) {\n      ideo.coordinateSystem = 'bp';\n      ideo.getAssemblyAndChromosomesFromEutils(resolve);\n    });\n  });\n}\n\nfunction setTaxidAndAssemblyAndChromosomes(callback) {\n  var assembly, chromosomes, getTaxidsFromEutils, taxid, taxids,\n    ideo = this;\n\n  getTaxidsFromEutils = new Promise(function(resolve) {\n    ideo.getTaxidFromEutils(resolve);\n  });\n\n  getTaxidsFromEutils\n  .then(function(data) {\n    taxid = data;\n    return ideo.setTaxidData(taxid);\n  })\n  .then(function(asmChrTaxidsArray) {\n    assembly = asmChrTaxidsArray[0];\n    chromosomes = asmChrTaxidsArray[1];\n    taxids = ideo.config.taxids;\n    ideo.config.chromosomes = chromosomes;\n    ideo.organisms[taxid].assemblies = {\n      default: assembly\n    };\n\n    callback(taxids);\n  });\n}\n\nfunction prepareTmpChrsAndTaxids(ideo) {\n  var orgs, taxids, tmpChrs, i, org, taxid,\n    config = ideo.config;\n\n  taxids = [];\n  tmpChrs = {};\n  orgs = (config.multiorganism) ? config.organism : [config.organism];\n\n  for (i = 0; i < orgs.length; i++) {\n    // Gets a list of taxids from common organism names\n    org = orgs[i];\n    for (taxid in ideo.organisms) {\n      if (ideo.organisms[taxid].commonName.toLowerCase() === org) {\n        taxids.push(taxid);\n        if (config.multiorganism) {\n          // Adjusts 'chromosomes' configuration parameter to make object\n          // keys use taxid instead of common organism name\n          tmpChrs[taxid] = config.chromosomes[org];\n        }\n      }\n    }\n  }\n\n  return [tmpChrs, taxids];\n}\n\nfunction getTaxidsForOrganismInConfig(taxids, callback, ideo) {\n\n  var tmpChrs;\n\n  [tmpChrs, taxids] = prepareTmpChrsAndTaxids(ideo);\n\n  if (\n    taxids.length === 0 ||\n    ideo.assemblyIsAccession() && /GCA_/.test(ideo.config.assembly)\n  ) {\n    ideo.setTaxidAndAssemblyAndChromosomes(callback);\n  } else {\n    ideo.config.taxids = taxids;\n    if (ideo.config.multiorganism) {\n      ideo.config.chromosomes = tmpChrs;\n    }\n    callback(taxids);\n  }\n}\n\nfunction getIsMultiorganism(taxidInit, ideo) {\n  return (\n    ('organism' in ideo.config && ideo.config.organism instanceof Array) ||\n    (taxidInit && ideo.config.taxid instanceof Array)\n  );\n}\n\nfunction getTaxidsForOrganismNotInConfig(taxids, taxidInit, callback, ideo) {\n  if (ideo.config.multiorganism) {\n    ideo.coordinateSystem = 'bp';\n    if (taxidInit) {\n      taxids = ideo.config.taxid;\n    }\n  } else {\n    if (taxidInit) {\n      taxids = [ideo.config.taxid];\n    }\n    ideo.config.taxids = taxids;\n  }\n  callback(taxids);\n}\n\n/**\n * Returns an array of taxids for the current ideogram\n * Also sets configuration parameters related to taxid(s), whether ideogram is\n * multiorganism, and adjusts chromosomes parameters as needed\n **/\nfunction getTaxids(callback) {\n  var taxids, taxidInit,\n    ideo = this;\n\n  taxidInit = 'taxid' in ideo.config;\n\n  ideo.config.multiorganism = getIsMultiorganism(taxidInit, ideo);\n\n  if ('organism' in ideo.config) {\n    getTaxidsForOrganismInConfig(taxids, callback, ideo)\n  } else {\n    getTaxidsForOrganismNotInConfig(taxids, taxidInit, callback, ideo);\n  }\n}\n\n/**\n * Searches NCBI EUtils for the common organism name for this ideogram\n * instance's taxid (i.e. NCBI Taxonomy ID)\n *\n * @param callback Function to call upon completing ESearch request\n */\nfunction getOrganismFromEutils(callback) {\n  var organism, taxonomySearch, taxid,\n    ideo = this;\n\n  taxid = ideo.config.organism;\n\n  taxonomySearch = ideo.esummary + '&db=taxonomy&id=' + taxid;\n\n  d3.json(taxonomySearch).then(function(data) {\n    organism = data.result[String(taxid)].commonname;\n    ideo.config.organism = organism;\n    return callback(organism);\n  });\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/services/organisms.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/services/services.js":
/*!***********************************************************!*\
  !*** ./node_modules/ideogram/src/js/services/services.js ***!
  \***********************************************************/
/*! exports provided: esearch, esummary, elink, getTaxidFromEutils, getOrganismFromEutils, getTaxids, setTaxidAndAssemblyAndChromosomes, setTaxidData, getAssemblyAndChromosomesFromEutils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAssemblyAndChromosomesFromEutils\", function() { return getAssemblyAndChromosomesFromEutils; });\n/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-fetch */ \"./node_modules/d3-fetch/src/index.js\");\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n/* harmony import */ var _eutils_config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eutils-config.js */ \"./node_modules/ideogram/src/js/services/eutils-config.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"esearch\", function() { return _eutils_config_js__WEBPACK_IMPORTED_MODULE_3__[\"esearch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"esummary\", function() { return _eutils_config_js__WEBPACK_IMPORTED_MODULE_3__[\"esummary\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"elink\", function() { return _eutils_config_js__WEBPACK_IMPORTED_MODULE_3__[\"elink\"]; });\n\n/* harmony import */ var _organisms_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./organisms.js */ \"./node_modules/ideogram/src/js/services/organisms.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getTaxidFromEutils\", function() { return _organisms_js__WEBPACK_IMPORTED_MODULE_4__[\"getTaxidFromEutils\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getOrganismFromEutils\", function() { return _organisms_js__WEBPACK_IMPORTED_MODULE_4__[\"getOrganismFromEutils\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getTaxids\", function() { return _organisms_js__WEBPACK_IMPORTED_MODULE_4__[\"getTaxids\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setTaxidAndAssemblyAndChromosomes\", function() { return _organisms_js__WEBPACK_IMPORTED_MODULE_4__[\"setTaxidAndAssemblyAndChromosomes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setTaxidData\", function() { return _organisms_js__WEBPACK_IMPORTED_MODULE_4__[\"setTaxidData\"]; });\n\n\n\n\n\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_2__[\"Object\"].assign({}, d3_fetch__WEBPACK_IMPORTED_MODULE_0__, d3_dispatch__WEBPACK_IMPORTED_MODULE_1__);\n\nfunction getNuccoreQueryString(gbUid, asmUid, recovering, ideo) {\n  var qs;\n\n  // Get a list of IDs for the chromosomes in this genome.\n  //\n  // If this is our first pass, or if assembly is GenBank-only, or if\n  // a GenBank assembly was explicitly requested (GCA_), then query RefSeq\n  // sequences in Nucleotide DB.  Otherwise, query the lesser-known\n  // GenColl (Genomic Collections) DB.\n  if (Object(_lib__WEBPACK_IMPORTED_MODULE_2__[\"hasGenBankAssembly\"])(ideo) || typeof recovering !== 'undefined') {\n    // TODO: account for GenBank-only\n    qs = '&db=nuccore&linkname=gencoll_nuccore_chr&from_uid=' + gbUid;\n  } else {\n    qs = '&db=nuccore&linkname=assembly_nuccore_refseq&from_uid=' + asmUid;\n  }\n\n  return qs;\n}\n\nfunction getAssemblyAndNuccoreLink(data, asmAndChrArray, recovering, ideo) {\n  var assembly, qs, gbUid, nuccoreLink, asmUid;\n\n  asmUid = data.result.uids[0];\n  assembly = data.result[asmUid];\n  // rsUid = assembly.rsuid; // RefSeq UID for this assembly\n  gbUid = assembly.gbuid; // GenBank UID\n\n  asmAndChrArray.push(assembly.assemblyaccession);\n\n  qs = getNuccoreQueryString(gbUid, asmUid, recovering, ideo);\n  nuccoreLink = ideo.elink + qs;\n\n  return [asmAndChrArray, nuccoreLink];\n}\n\n/**\n *  If the list of presumed chromosomes is longer than 100 elements, then\n * we've likely fetched scaffolds instead of chromosomes.  This\n * happens with e.g. Sus scrofa (pig).  Try recovering once via a\n * different query, and throw an error upon any subsequent failure.\n */\nfunction handleScaffoldData(data, asmAndChrArray, context) {\n  var assemblyAccession = asmAndChrArray[0],\n    ideo = context.ideo;\n  if (data.linksets[0].linksetdbs[0].links.length > 100) {\n    if (typeof context.recovering === 'undefined') {\n      ideo.getAssemblyAndChromosomesFromEutils(context.callback, true);\n      return Promise.reject(\n        'Unexpectedly found genomic scaffolds instead of chromosomes ' +\n        'while querying RefSeq.  Recovering.'\n      );\n    } else {\n      // Avoid flooding NCBI with EUtils requests.\n      throw Error(\n        'Failed to find chromosomes for genome ' + assemblyAccession\n      );\n    }\n  }\n}\n\nfunction fetchNucleotideSummary(data, assemblyAccession, context) {\n  var links, ntSummary;\n\n  handleScaffoldData(data, assemblyAccession, context);\n\n  links = data.linksets[0].linksetdbs[0].links.join(',');\n  ntSummary = context.ideo.esummary + '&db=nucleotide&id=' + links;\n\n  return d3.json(ntSummary);\n}\n\nfunction parseMitochondrion(result, ideo) {\n  var type, cnIndex, chrName;\n\n  if (ideo.config.showNonNuclearChromosomes) {\n    type = result.genome;\n    cnIndex = result.subtype.split('|').indexOf('plasmid');\n    if (cnIndex === -1) {\n      chrName = 'MT';\n    } else {\n      // Seen in e.g. rice genome IRGSP-1.0 (GCF_001433935.1),\n      // From https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?retmode=json&db=nucleotide&id=996703432,996703431,996703430,996703429,996703428,996703427,996703426,996703425,996703424,996703423,996703422,996703421,194033210,11466763,7524755\n      // genome: 'mitochondrion',\n      // subtype: 'cell_line|plasmid',\n      // subname: 'A-58 CMS|B1',\n      chrName = result.subname.split('|')[cnIndex];\n    }\n  } else {\n    return [null, null];\n  }\n\n  return [chrName, type];\n}\n\nfunction parseChloroplastOrPlastid(ideo) {\n  // Plastid encountered with rice genome IRGSP-1.0 (GCF_001433935.1)\n  if (ideo.config.showNonNuclearChromosomes) {\n    return ['CP', 'chloroplast'];\n  } \n  return [null, null];\n}\n\nfunction parseApicoplast(ideo) {\n  if (ideo.config.showNonNuclearChromosomes) {\n    return ['AP', 'apicoplast'];\n  } \n  return [null, null];\n}\n\nfunction parseNuclear(result) {\n  var type, cnIndex, chrName;\n\n  type = 'nuclear';\n  cnIndex = result.subtype.split('|').indexOf('chromosome');\n  chrName = result.subname.split('|')[cnIndex];\n\n  if (typeof chrName !== 'undefined' && chrName.substr(0, 3) === 'chr') {\n    // Convert \"chr12\" to \"12\", e.g. for banana (GCF_000313855.2)\n    chrName = chrName.substr(3);\n  }\n\n  return [chrName, type];\n}\n\nfunction getChrNameAndType(result, ideo) {\n  var genome = result.genome;\n  if (genome === 'mitochondrion') {\n    return parseMitochondrion(result, ideo);\n  } else if (genome === 'chloroplast' || genome === 'plastid') {\n    return parseChloroplastOrPlastid(ideo);\n  } else if (genome === 'apicoplast') {\n    return parseApicoplast(ideo);\n  } else {\n    return parseNuclear(result);\n  }\n}\n\nfunction parseChromosome(result, ideo) {\n  var chrName, type, chromosome, result,\n\n  [chrName, type] = getChrNameAndType(result, ideo);\n\n  chromosome = {\n    name: chrName,\n    length: result.slen,\n    type: type\n  };\n\n  return chromosome;\n}\n\nfunction parseChromosomes(results, asmAndChrArray, ideo) {\n  var x, chromosome,\n    chromosomes = [];\n\n  for (x in results) {\n    // omit list of result uids\n    if (x === 'uids') continue;\n\n    chromosome = parseChromosome(results[x], ideo);\n    chromosomes.push(chromosome);\n  }\n\n  chromosomes = chromosomes.sort(Ideogram.sortChromosomes);\n\n  ideo.coordinateSystem = 'bp';\n\n  asmAndChrArray.push(chromosomes);\n\n  return asmAndChrArray;\n}\n\nfunction fetchAssemblySummary(data, ideo) {\n  var asmUid, asmSummaryUrl;\n\n  // NCBI Assembly database's internal identifier (uid) for this assembly\n  asmUid = data.esearchresult.idlist[0];\n  asmSummaryUrl = ideo.esummary + '&db=assembly&id=' + asmUid;\n\n  return d3.json(asmSummaryUrl);\n}\n\n/**\n * Returns names and lengths of chromosomes for an organism's best-known\n * genome assembly, or for a specified assembly.  Gets data from NCBI\n * EUtils web API.\n *\n * @param callback Function to call upon completion of this async method\n * @param recovering Boolean indicating attempt at failure recovery\n */\nfunction getAssemblyAndChromosomesFromEutils(callback, recovering) {\n  var asmSearchUrl, nuccoreLink,\n    asmAndChrArray = [],\n    ideo = this,\n    context = {callback: callback, recovering: recovering, ideo: ideo};\n\n  asmSearchUrl = Object(_eutils_config_js__WEBPACK_IMPORTED_MODULE_3__[\"getAssemblySearchUrl\"])(ideo);\n\n  d3.json(asmSearchUrl)\n    .then(function(data) { return fetchAssemblySummary(data, ideo); })\n    .then(function(data) {\n      [asmAndChrArray, nuccoreLink] =\n        getAssemblyAndNuccoreLink(data, asmAndChrArray, recovering, ideo);\n      return d3.json(nuccoreLink);\n    })\n    .then(function(data) {\n      return fetchNucleotideSummary(data, asmAndChrArray, context);\n    })\n    .then(function(data) {\n      asmAndChrArray = parseChromosomes(data.result, asmAndChrArray, ideo);\n      return callback(asmAndChrArray);\n    }, function(rejectedReason) {\n      console.warn(rejectedReason);\n    });\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/services/services.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/sex-chromosomes.js":
/*!*********************************************************!*\
  !*** ./node_modules/ideogram/src/js/sex-chromosomes.js ***!
  \*********************************************************/
/*! exports provided: drawSexChromosomes, setSexChromosomes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawSexChromosomes\", function() { return drawSexChromosomes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setSexChromosomes\", function() { return setSexChromosomes; });\n/**\n * @fileoverview Instance methods for sex chromosomes (allosomes).\n *\n * This module provides methods for drawing karyotypically normal\n * male and female mammalian genomes.\n */\n\n/**\n * Appends SVG elements depicting sex chromosomes to the document.\n */\nfunction drawSexChromosomes(container, chrIndex) {\n  var bandsArray, taxid, chrs,\n    sexChromosomeIndexes, sciLength,\n    chromosome, bands, chrModel, sci, homologIndex;\n\n  bandsArray = this.bandsArray;\n  taxid = this.config.taxid;\n  chrs = this.config.chromosomes[taxid];\n\n  if (this.config.sex === 'male') {\n    sexChromosomeIndexes = [1, 0];\n  } else {\n    sexChromosomeIndexes = [0, 0];\n  }\n\n  sciLength = sexChromosomeIndexes.length;\n\n  for (homologIndex = 0; homologIndex < sciLength; homologIndex++) {\n    sci = sexChromosomeIndexes[homologIndex] + chrIndex;\n    chromosome = chrs[sci];\n    bands = bandsArray[taxid][sci];\n    chrModel = this.getChromosomeModel(bands, chromosome, taxid, sci);\n    this.appendHomolog(chrModel, chrIndex, homologIndex, container);\n  }\n}\n\n/**\n * Sets instance properties regarding sex chromosomes.\n * Currently only supported for mammals.\n * TODO: Support all sexually reproducing taxa\n *   XY sex-determination (mammals):\n *     - Male: XY <- heterogametic\n *     - Female: XX\n *   ZW sex-determination (birds):\n *     - Male: ZZ\n *     - Female: ZW <- heterogametic\n *   X0 sex-determination (some insects):\n *     - Male: X0, i.e. only X <- heterogametic?\n *     - Female: XX\n * TODO: Support sex chromosome aneuploidies in mammals\n *     - Turner syndrome: X0\n *     - Klinefelter syndome: XXY\n *  More types:\n *  https://en.wikipedia.org/wiki/Category:Sex_chromosome_aneuploidies\n */\nfunction setSexChromosomes(chrs) {\n  var chr, i,\n    ideo = this,\n    sexChrs = {X: 1, Y: 1};\n\n  if (this.config.ploidy !== 2 || !this.config.sex) return;\n\n  ideo.sexChromosomes.list = [];\n\n  for (i = 0; i < chrs.length; i++) {\n    chr = chrs[i];\n    if (ideo.config.sex === 'male' && chr in sexChrs) {\n      ideo.sexChromosomes.list.push(chr);\n      if (!ideo.sexChromosomes.index) {\n        ideo.sexChromosomes.index = i;\n      }\n    } else if (chr === 'X') {\n      ideo.sexChromosomes.list.push(chr, chr);\n      ideo.sexChromosomes.index = i;\n    }\n  }\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/sex-chromosomes.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/version.js":
/*!*************************************************!*\
  !*** ./node_modules/ideogram/src/js/version.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar version = '1.4.1';\n/* harmony default export */ __webpack_exports__[\"default\"] = (version);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/version.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/views/chromosome-labels.js":
/*!*****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/views/chromosome-labels.js ***!
  \*****************************************************************/
/*! exports provided: drawChromosomeLabels, rotateChromosomeLabels */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawChromosomeLabels\", function() { return drawChromosomeLabels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateChromosomeLabels\", function() { return rotateChromosomeLabels; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction getChrSetLabelLines(d, i, ideo) {\n  var lines;\n\n  if (d.name.indexOf(' ') === -1) {\n    lines = [d.name];\n  } else {\n    lines = d.name.match(/^(.*)\\s+([^\\s]+)$/).slice(1).reverse();\n  }\n\n  if (\n    'sex' in ideo.config &&\n    ideo.config.ploidy === 2 &&\n    i === ideo.sexChromosomes.index\n  ) {\n    if (ideo.config.sex === 'male') {\n      lines = ['XY'];\n    } else {\n      lines = ['XX'];\n    }\n  }\n\n  return lines\n}\n\nfunction renderChromosomeSetLabel(d, i, textElement, ideo) {\n  // Get label lines\n  var lines = getChrSetLabelLines(d, i, ideo);\n\n  // Render label lines\n  d3.select(textElement).selectAll('tspan')\n    .data(lines)\n    .enter()\n    .append('tspan')\n    .attr('dy', function(d, i) {\n      return i * -1.2 + 'em';\n    })\n    .attr('x', ideo._layout.getChromosomeSetLabelXPosition())\n    .attr('class', function(a, i) {\n      var fullLabels = ideo.config.fullChromosomeLabels;\n      return i === 1 && fullLabels ? 'italic' : null;\n    })\n    .text(String);\n}\n\nfunction appendChromosomeSetLabels(ideo) {\n  var layout = ideo._layout;\n\n  d3.selectAll(ideo.selector + ' .chromosome-set-container')\n    .insert('text', ':first-child')\n    .data(ideo.chromosomesArray)\n    .attr('class', layout.getChromosomeLabelClass())\n    .attr('transform', layout.getChromosomeSetLabelTranslate())\n    .attr('x', layout.getChromosomeSetLabelXPosition())\n    .attr('y', function(d, i) {\n      return layout.getChromosomeSetLabelYPosition(i);\n    })\n    .attr('text-anchor', layout.getChromosomeSetLabelAnchor())\n    .each(function(d, i) {\n      renderChromosomeSetLabel(d, i, this, ideo);\n    });\n}\n\nfunction appendChromosomeLabels(ideo) {\n  var layout = ideo._layout;\n\n  d3.selectAll(ideo.selector + ' .chromosome-set-container')\n    .each(function(a, chrSetIndex) {\n      d3.select(this).selectAll('.chromosome')\n        .append('text')\n        .attr('class', 'chrLabel')\n        .attr('transform', layout.getChromosomeSetLabelTranslate())\n        .attr('x', function(d, i) {\n          return layout.getChromosomeLabelXPosition(i);\n        })\n        .attr('y', function(d, i) {\n          return layout.getChromosomeLabelYPosition(i);\n        })\n        .text(function(d, chrIndex) {\n          return ideo._ploidy.getAncestor(chrSetIndex, chrIndex);\n        })\n        .attr('text-anchor', 'middle');\n    });\n}\n\n/**\n * Draws labels for each chromosome, e.g. \"1\", \"2\", \"X\".\n * If ideogram configuration has 'fullChromosomeLabels: True',\n * then labels includes name of taxon, which can help when\n * depicting orthologs.\n */\nfunction drawChromosomeLabels() {\n  var ideo = this;\n  appendChromosomeSetLabels(ideo);\n  appendChromosomeLabels(ideo);\n}\n\nfunction getLabelPositionAttrs(scale) {\n  var x, y, scaleSvg, scale;\n\n  if (\n    typeof (scale) !== 'undefined' &&\n    scale.hasOwnProperty('x') &&\n    !(scale.x === 1 && scale.y === 1)\n  ) {\n    scaleSvg = 'scale(' + scale.x + ',' + scale.y + ')';\n    x = -6;\n    y = (scale === '' ? -16 : -14);\n  } else {\n    x = -8;\n    y = -16;\n    scale = {x: 1, y: 1};\n    scaleSvg = '';\n  }\n\n  return {x: x, y: y, scaleSvg: scaleSvg, scale: scale};\n}\n\nfunction updateChrIndex(chrIndex, config) {\n  if (config.numAnnotTracks > 1 || config.orientation === '') chrIndex -= 1;\n  return chrIndex\n}\n\nfunction rotateVerticalChromosomeLabels(chr, chrIndex, labelPosAttrs, ideo) {\n  var chrMargin2, chrMargin, y,\n    config = ideo.config;\n\n  chrIndex = updateChrIndex(chrIndex, config);\n\n  chrMargin2 = -4;\n  if (config.showBandLabels === true) {\n    chrMargin2 = config.chrMargin + config.chrWidth + 26;\n  }\n\n  chrMargin = config.chrMargin * chrIndex;\n  if (config.numAnnotTracks > 1 === false) chrMargin += 1;\n\n  y = chrMargin + chrMargin2;\n\n  chr.selectAll('text.chrLabel')\n    .attr('transform', labelPosAttrs.scaleSvg)\n    .selectAll('tspan')\n    .attr('x', labelPosAttrs.x)\n    .attr('y', y);\n}\n\nfunction rotateHorizontalChromosomeLabels(chr, chrIndex, labelPosAttrs, ideo) {\n  var chrMargin, chrMargin2, tracksHeight, x,\n    config = ideo.config;\n\n  chrMargin2 = -config.chrWidth - 2;\n  if (config.showBandLabels === true) chrMargin2 = config.chrMargin + 8;\n\n  tracksHeight = config.annotTracksHeight;\n  if (config.annotationsLayout !== 'overlay') tracksHeight *= 2;\n\n  chrMargin = config.chrMargin * chrIndex;\n  x = -(chrMargin + chrMargin2) + 3 + tracksHeight;\n  x /= labelPosAttrs.scale.x;\n\n  chr.selectAll('text.chrLabel')\n    .attr('transform', 'rotate(-90)' + labelPosAttrs.scaleSvg)\n    .selectAll('tspan')\n    .attr('x', x)\n    .attr('y', labelPosAttrs.y);\n}\n\n/**\n * Rotates chromosome labels by 90 degrees, e.g. upon clicking a chromosome.\n */\nfunction rotateChromosomeLabels(chr, chrIndex, orientation, scale) {\n  var labelPosAttrs,\n    ideo = this;\n\n  chrIndex -= 1;\n\n  labelPosAttrs = getLabelPositionAttrs(scale);\n\n  if (orientation === 'vertical' || orientation === '') {\n    rotateVerticalChromosomeLabels(chr, chrIndex, labelPosAttrs, ideo);\n  } else {\n    rotateHorizontalChromosomeLabels(chr, chrIndex, labelPosAttrs, ideo);\n  }\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/views/chromosome-labels.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/views/chromosome-model.js":
/*!****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/views/chromosome-model.js ***!
  \****************************************************************/
/*! exports provided: getChromosomeModel, getChromosomePixels */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getChromosomeModel\", function() { return getChromosomeModel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getChromosomePixels\", function() { return getChromosomePixels; });\nfunction getPixelAndOtherData(bands, chr, hasBands, ideo) {\n  var i, band, csLength, width, cs,\n    pxStop = 0,\n    cs = ideo.coordinateSystem,\n    chrHeight = ideo.config.chrHeight;\n\n  for (var i = 0; i < bands.length; i++) {\n    band = bands[i];\n    csLength = band[cs].stop - band[cs].start;\n\n    // If ideogram is rotated (and thus showing only one chromosome),\n    // then set its width independent of the longest chromosome in this\n    // genome.\n    if (ideo._layout._isRotated) {\n      width = chrHeight * csLength / chr.length;\n    } else {\n      width = chrHeight * chr.length / ideo.maxLength[cs] * csLength / chr.length;\n    }\n    bands[i].px = {start: pxStop, stop: pxStop + width, width: width};\n\n    pxStop = bands[i].px.stop;\n\n    if (hasBands && band.stain === 'acen' && band.name[0] === 'p') {\n      chr.pcenIndex = i;\n    }\n  }\n  return [bands, chr, pxStop];\n}\n\n/**\n * TODO:\n * A chromosome-level scale property is likely\n * nonsensical for any chromosomes that have cytogenetic band data.\n * Different bands tend to have ratios between number of base pairs\n * and physical length.\n *\n * However, a chromosome-level scale property is likely\n * necessary for chromosomes that do not have band data.\n *\n * This needs further review.\n */\nfunction getChrScale(chr, hasBands, ideo) {\n  var chrHeight = ideo.config.chrHeight,\n    chrLength = chr.length,\n    maxLength = ideo.maxLength,\n    scale = {}\n\n  if (ideo.config.multiorganism === true) {\n    scale.bp = 1;\n    // chr.scale.bp = band.iscn.stop / band.bp.stop;\n    scale.iscn = chrHeight * chrLength / maxLength.bp;\n  } else {\n    scale.bp = chrHeight / maxLength.bp;\n    if (hasBands) {\n      scale.iscn = chrHeight / maxLength.iscn;\n    }\n  }\n\n  return scale;\n}\n\nfunction getChromosomePixels(chr) {\n  var bands, chrHeight, pxStop, hasBands,\n    ideo = this;\n\n  bands = chr.bands;\n  chrHeight = ideo.config.chrHeight;\n  pxStop = 0;\n  hasBands = (typeof bands !== 'undefined');\n\n  if (hasBands) {\n    [bands, chr, pxStop] = getPixelAndOtherData(bands, chr, hasBands, ideo);\n  } else {\n    pxStop = chrHeight * chr.length / ideo.maxLength[ideo.coordinateSystem];\n  }\n\n  chr.width = pxStop;\n  chr.scale = getChrScale(chr, hasBands, ideo);\n  chr.bands = bands;\n\n  return chr;\n}\n\nfunction getChrModelScaffold(chr, bands, chrName, ideo) {\n  var hasBands = (typeof bands !== 'undefined');\n\n  if (hasBands) {\n    chr.name = chrName;\n    chr.length = bands[bands.length - 1][ideo.coordinateSystem].stop;\n    chr.type = 'nuclear';\n  } else {\n    chr = chrName;\n  }\n\n  return chr;\n}\n\n/**\n * Encountered when processing an assembly that has chromosomes with\n * centromere data, but this chromosome does not.\n * Example: chromosome F1 in Felis catus.\n */\nfunction deleteExtraneousBands(chr, hasBands) {\n  if (hasBands && chr.bands.length === 1) {\n    delete chr.bands;\n  }\n  return chr;\n}\n\nfunction getCentromerePosition(hasBands, bands) {\n  if (\n    hasBands && bands[0].name[0] === 'p' && bands[1].name[0] === 'q' &&\n    bands[0].bp.stop - bands[0].bp.start < 2E6\n  ) {\n    // As with almost all mouse chromosome, chimpanzee chr22\n    return 'telocentric';\n  } else {\n    return '';\n  }\n}\n\n/**\n * Generates a model object for each chromosome containing information on\n * its name, DOM ID, length in base pairs or ISCN coordinates, cytogenetic\n * bands, centromere position, etc.\n */\nfunction getChromosomeModel(bands, chrName, taxid, chrIndex) {\n  var hasBands,\n    chr = {},\n    ideo = this;\n\n  hasBands = (typeof bands !== 'undefined');\n\n  chr = getChrModelScaffold(chr, bands, chrName, ideo)\n\n  chr.chrIndex = chrIndex;\n  chr.id = 'chr' + chr.name + '-' + taxid;\n\n  if (ideo.config.fullChromosomeLabels === true) {\n    var orgName = this.organisms[taxid].scientificNameAbbr;\n    chr.name = orgName + ' chr' + chr.name;\n  }\n\n  chr.bands = bands;\n  chr = ideo.getChromosomePixels(chr);\n  chr.centromerePosition = getCentromerePosition(hasBands, bands);\n\n  chr = deleteExtraneousBands(chr, hasBands);\n\n  return chr;\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/views/chromosome-model.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/views/chromosome-util.js":
/*!***************************************************************!*\
  !*** ./node_modules/ideogram/src/js/views/chromosome-util.js ***!
  \***************************************************************/
/*! exports provided: ChromosomeUtil */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChromosomeUtil\", function() { return ChromosomeUtil; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../lib */ \"./node_modules/ideogram/src/js/lib.js\");\n\n\n\n\nvar d3 = _lib__WEBPACK_IMPORTED_MODULE_1__[\"Object\"].assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Chromosome's view utility class\n */\nclass ChromosomeUtil {\n\n  constructor(node) {\n    this._node = node;\n  }\n\n  getLabel() {\n    var label =\n      d3\n        .select(this._node.parentNode)\n        .select('text.chrLabel')\n        .text();\n    return label;\n  }\n\n  /**\n   * Get chromosome set label\n   */\n  getSetLabel() {\n    var setLabel =\n      d3\n        .select(this._node.parentNode)\n        .select('text.chrSetLabel')\n        .text();\n    return setLabel;\n  }\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/views/chromosome-util.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/views/chromosome.js":
/*!**********************************************************!*\
  !*** ./node_modules/ideogram/src/js/views/chromosome.js ***!
  \**********************************************************/
/*! exports provided: Chromosome, MetacentricChromosome, TelocentricChromosome */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Chromosome\", function() { return Chromosome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MetacentricChromosome\", function() { return MetacentricChromosome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TelocentricChromosome\", function() { return TelocentricChromosome; });\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../color */ \"./node_modules/ideogram/src/js/color.js\");\n/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../range */ \"./node_modules/ideogram/src/js/range.js\");\n\n\n\nclass Chromosome {\n\n  constructor(adapter, config, ideo) {\n    this._adapter = adapter;\n    this._model = this._adapter.getModel();\n    this._config = config;\n    this._ideo = ideo;\n    this._color = new _color__WEBPACK_IMPORTED_MODULE_0__[\"Color\"](this._config);\n    this._bumpCoefficient = 5;\n  }\n\n  /**\n   * Factory method\n   */\n  static getInstance(adapter, config, ideo) {\n    if (adapter.getModel().centromerePosition === 'telocentric') {\n      return new TelocentricChromosome(adapter, config, ideo);\n    } else {\n      return new MetacentricChromosome(adapter, config, ideo);\n    }\n  };\n\n  _addPArmShape(clipPath, isPArmRendered) {\n    if (isPArmRendered) {\n      return clipPath.concat(this._getPArmShape());\n    } else {\n      return clipPath;\n    }\n  };\n\n  _addQArmShape(clipPath, isQArmRendered) {\n    if (isQArmRendered) {\n      return clipPath.concat(this._getQArmShape());\n    } else {\n      return clipPath;\n    }\n  };\n\n  /**\n   * Append bands container and apply clip-path to it\n   */\n  render(container, chrSetIndex, chrIndex) {\n\n    var self, isPArmRendered, isQArmRendered, clipPath, opacity, fill,\n      isFullyBanded;\n\n    self = this;\n\n    container = container.append('g')\n      .attr('class', 'bands')\n      .attr('clip-path', 'url(#' + this._model.id + '-chromosome-set-clippath)');\n\n    // Render chromosome arms\n    isPArmRendered = this._renderArm(container, chrSetIndex, chrIndex, 'p');\n    isQArmRendered = this._renderArm(container, chrSetIndex, chrIndex, 'q');\n\n    // Render range set\n    this._renderRangeSet(container, chrSetIndex, chrIndex);\n\n    // Push arms shape string into clipPath array\n    clipPath = [];\n    clipPath = this._addPArmShape(clipPath, isPArmRendered);\n    clipPath = this._addQArmShape(clipPath, isQArmRendered);\n\n    opacity = '0';\n    fill = '';\n    isFullyBanded = this.isFullyBanded();\n    if ('ancestors' in this._ideo.config && !('rangeSet' in this._ideo.config)) {\n      // E.g. diploid human genome (with translucent overlay)\n      fill = self._color.getArmColor(chrSetIndex, chrIndex, 0);\n      if (isFullyBanded) {\n        opacity = '0.5';\n      }\n    } else if (isFullyBanded) {\n      // E.g. mouse reference genome\n      opacity = null;\n      fill = 'transparent';\n    } else if (!('ancestors' in this._ideo.config)) {\n      // E.g. chimpanzee assembly Pan_tro 3.0\n      opacity = '1';\n    }\n\n    // Render chromosome border\n    container.append('g')\n      .attr('class', 'chromosome-border')\n      .selectAll('path')\n      .data(clipPath)\n      .enter()\n      .append('path')\n      .attr('fill', fill)\n      .style('fill-opacity', opacity)\n      .attr('stroke', function(d, i) {\n        return self._color.getBorderColor(chrSetIndex, chrIndex, i);\n      })\n      .attr('stroke-width', function(d) {\n        return ('strokeWidth' in d ? d.strokeWidth : 1);\n      })\n      .attr('d', function(d) {\n        return d.path;\n      }).attr('class', function(d) {\n        return d.class;\n      });\n\n    return clipPath;\n  };\n\n  _renderRangeSet(container, chrSetIndex, chrIndex) {\n\n    var self, rangeSet, rangesContainer, ideo;\n\n    if (!('rangeSet' in this._config)) {\n      return;\n    }\n\n    rangeSet = this._config.rangeSet.filter(function(range) {\n      return range.chr - 1 === chrSetIndex;\n    }).map(function(range) {\n      return new _range__WEBPACK_IMPORTED_MODULE_1__[\"Range\"](range);\n    });\n\n    rangesContainer = container.append('g').attr('class', 'range-set');\n\n    self = this;\n    ideo = self._ideo;\n\n    rangesContainer.selectAll('rect.range')\n      .data(rangeSet)\n      .enter()\n      .append('rect')\n      .attr('class', 'range')\n      .attr('x', function(range) {\n        return ideo.convertBpToPx(self._model, range.start);\n      }).attr('y', 0)\n      .attr('width', function(range) {\n        return ideo.convertBpToPx(self._model, range.length);\n      }).attr('height', this._config.chrWidth)\n      .style('fill', function(range) {\n        return range.getColor(chrIndex);\n      });\n  };\n\n  /**\n   * Get chromosome's shape main values\n   */\n  _getShapeData() {\n\n    var firstQBand, i, lastBand, rightTerminalPosition;\n\n    // First q band from bands sequence\n    for (i = 0; i < this._model.bands.length; i++) {\n      if (this._model.bands[i].name[0] === 'q') {\n        firstQBand = this._model.bands[i];\n        break;\n      }\n    }\n\n    // Chromosome's right position\n    lastBand = this._model.bands.length - 1;\n    rightTerminalPosition = this._model.bands[lastBand].px.stop;\n\n      // Properties description:\n      // x1 - left terminal start position\n      // x2 - centromere position\n      // x3 - right terminal end position\n      // w - chromosome width\n      // b - bump size\n    return {\n      x1: 0,\n      x2: firstQBand ? firstQBand.px.start : rightTerminalPosition,\n      x3: rightTerminalPosition,\n      w: this._config.chrWidth,\n      b: this._config.chrWidth / this._bumpCoefficient\n    };\n  };\n\n  _getPArmShape() {\n    var d = this._getShapeData(),\n      x = d.x2 - d.b;\n\n    if (this.isFullyBanded() || 'ancestors' in this._ideo.config) {\n      // Encountered when chromosome has any of:\n      //  - One placeholder \"band\", e.g. pig genome GCF_000003025.5\n      //  - Many (> 2) bands, e.g. human reference genome\n      //  - Ancestor colors in ploidy configuration, as in ploidy-basic.html\n      return {\n        class: '',\n        path:\n          'M' + d.b + ',0 ' +\n          'L' + x + ',0 ' +\n          'Q' + (d.x2 + d.b) + ',' + (d.w / 2) + ',' + x + ',' + d.w + ' ' +\n          'L' + d.b + ',' + d.w + ' ' +\n          'Q-' + d.b + ',' + (d.w / 2) + ',' + d.b + ',0'\n      };\n    } else {\n      // e.g. chimpanzee assembly Pan_tro 3.0\n      return [{\n        class: '',\n        path:\n          'M' + d.b + ',0 ' +\n          'L' + (x - 2) + ',0 ' +\n          'L' + (x - 2) + ',' + d.w + ' ' +\n          'L' + d.b + ',' + d.w + ' ' +\n          'Q-' + d.b + ',' + (d.w / 2) + ',' + d.b + ',0'\n      }, {\n        class: 'acen',\n        path:\n          'M' + x + ',0 ' +\n          'Q' + (d.x2 + d.b) + ',' + (d.w / 2) + ',' + x + ',' + d.w + ' ' +\n          'L' + x + ',' + d.w + ' ' +\n          'L' + (x - 2) + ',' + d.w + ' ' +\n          'L' + (x - 2) + ',0'\n      }];\n    }\n  };\n\n  _getQArmShape() {\n    var d = this._getShapeData(),\n      x = d.x3 - d.b,\n      x2b = d.x2 + d.b;\n\n    if (this.isFullyBanded() || 'ancestors' in this._ideo.config) {\n      return {\n        class: '',\n        path:\n          'M' + x2b + ',0 ' +\n          'L' + x + ',0 ' +\n          'Q' + (d.x3 + d.b) + ',' + (d.w / 2) + ',' + x + ',' + d.w + ' ' +\n          'L' + x2b + ',' + d.w + ' ' +\n          'Q' + (d.x2 - d.b) + ',' + (d.w / 2) + ',' + x2b + ',0'\n      };\n    } else {\n      // e.g. chimpanzee assembly Pan_tro 3.0\n      return [{\n        path:\n          'M' + x2b + ',0 ' +\n          'L' + x + ',0 ' +\n          'Q' + (d.x3 + d.b) + ',' + (d.w / 2) + ',' + x + ',' + d.w + ' ' +\n          'L' + x2b + ',' + d.w + ' ' +\n          'L' + x2b + ',0'\n      }, {\n        class: 'acen',\n        path:\n          'M' + x2b + ',0' +\n          'Q' + (d.x2 - d.b) + ',' + (d.w / 2) + ',' + x2b + ',' + d.w + ' ' +\n          'L' + x2b + ',' + d.w +\n          'L' + (x2b + 2) + ',' + d.w +\n          'L' + (x2b + 2) + ',0'\n      }];\n    }\n  };\n\n  isFullyBanded() {\n    return (\n      this._model.bands &&\n      (this._model.bands.length !== 2 || this._model.bands[0].name[0] === 'q')\n    );\n  };\n\n  /**\n   * Render arm bands\n   */\n  _renderBands(container, chrSetIndex, chrIndex, bands, arm) {\n\n    var self, armIndex, fill;\n\n    self = this;\n    armIndex = arm === 'p' ? 0 : 1;\n    fill = '';\n\n    if ('ancestors' in self._ideo.config && !(self.isFullyBanded())) {\n      fill = self._color.getArmColor(chrSetIndex, chrIndex, armIndex);\n    }\n\n    container.selectAll('path.band.' + arm)\n      .data(bands)\n      .enter()\n      .append('path')\n      .attr('id', function(d) {\n        return self._model.id + '-' + d.name.replace('.', '-');\n      })\n      .attr('class', function(d) {\n        return 'band ' + arm + '-band ' + d.stain;\n      })\n      .attr('d', function(d) {\n        var start, length, x;\n\n        start = self._ideo.round(d.px.start);\n        length = self._ideo.round(d.px.width);\n\n        return 'M ' + start + ', 0' +\n              'l ' + length + ' 0 ' +\n              'l 0 ' + self._config.chrWidth + ' ' +\n              'l -' + length + ' 0 z';\n      })\n      .style('fill', fill);\n  };\n\n  /**\n   * Render a chromosome arm.\n   * Returns boolean indicating if any bands were rendered.\n   */\n  _renderArm(container, chrSetIndex, chrIndex, arm) {\n    var bands = this._model.bands.filter(function(band) {\n      return band.name[0] === arm;\n    });\n\n    this._renderBands(container, chrSetIndex, chrIndex, bands, arm);\n\n    return Boolean(bands.length);\n  }\n}\n\n\n\nclass MetacentricChromosome extends Chromosome {\n\n  constructor(model, config, ideo) {\n    super(model, config, ideo);\n    this._class = 'MetacentricChromosome';\n  }\n}\n\n\n\nclass TelocentricChromosome extends Chromosome {\n\n  constructor(model, config, ideo) {\n    super(model, config, ideo);\n    this._class = 'TelocentricChromosome';\n    this._pArmOffset = 3;\n  }\n\n  _addPArmShape(clipPath) {\n    return clipPath.concat(this._getPArmShape());\n  };\n\n  _getPArmShape() {\n    var d = this._getShapeData();\n    d.o = this._pArmOffset;\n\n    return [{\n      class: 'acen',\n      path: 'M' + (d.x2 + 2) + ',1' +\n      'L' + (d.x2 + d.o + 3.25) + ',1 ' +\n      'L' + (d.x2 + d.o + 3.25) + ',' + (d.w - 1) + ' ' +\n      'L' + (d.x2 + 2) + ',' + (d.w - 1)\n    }, {\n      class: 'gpos66',\n      path: 'M' + (d.x2 - d.o + 5) + ',0' +\n      'L' + (d.x2 - d.o + 3) + ',0 ' +\n      'L' + (d.x2 - d.o + 3) + ',' + d.w + ' ' +\n      'L' + (d.x2 - d.o + 5) + ',' + d.w,\n      strokeWidth: 0.5\n    }];\n  };\n\n  _getQArmShape() {\n    var d = this._getShapeData(),\n      x = d.x3 - d.b,\n      o = this._pArmOffset + 3;\n\n    return {\n      class: '',\n      path:\n      'M' + (d.x2 + o) + ',0 ' +\n      'L' + x + ',0 ' +\n      'Q' + (d.x3 + d.b) + ',' + (d.w / 2) + ',' + x + ',' + d.w + ' ' +\n      'L' + (d.x2 + o) + ',' + d.w\n    };\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/views/chromosome.js?");

/***/ }),

/***/ "./node_modules/ideogram/src/js/views/draw-chromosomes.js":
/*!****************************************************************!*\
  !*** ./node_modules/ideogram/src/js/views/draw-chromosomes.js ***!
  \****************************************************************/
/*! exports provided: appendHomolog, drawChromosome, rotateAndToggleDisplay, setOverflowScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"appendHomolog\", function() { return appendHomolog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"drawChromosome\", function() { return drawChromosome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateAndToggleDisplay\", function() { return rotateAndToggleDisplay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setOverflowScroll\", function() { return setOverflowScroll; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var _model_adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model-adapter */ \"./node_modules/ideogram/src/js/model-adapter.js\");\n/* harmony import */ var _chromosome__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chromosome */ \"./node_modules/ideogram/src/js/views/chromosome.js\");\n\n\n\n\n\nvar d3 = Object.assign({}, d3_selection__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Adds a copy of a chromosome (i.e. a homologous chromosome, homolog) to DOM\n *\n * @param chrModel\n * @param chrIndex\n * @param homologIndex\n * @param container\n */\nfunction appendHomolog(chrModel, chrIndex, homologIndex, container) {\n\n  var homologOffset, chromosome, shape, defs, adapter;\n\n  defs = d3.select(this.selector + ' defs');\n  // Get chromosome model adapter class\n  adapter = _model_adapter__WEBPACK_IMPORTED_MODULE_1__[\"ModelAdapter\"].getInstance(chrModel);\n\n  // How far this copy of the chromosome is from another\n  homologOffset = homologIndex * this.config.chrMargin;\n\n  // Append chromosome's container\n  chromosome = container\n    .append('g')\n    .attr('id', chrModel.id)\n    .attr('class', 'chromosome ' + adapter.getCssClass())\n    .attr('transform', 'translate(0, ' + homologOffset + ')');\n\n  // Render chromosome\n  shape = _chromosome__WEBPACK_IMPORTED_MODULE_2__[\"Chromosome\"].getInstance(adapter, this.config, this)\n    .render(chromosome, chrIndex, homologIndex);\n\n  d3.select('#' + chrModel.id + '-chromosome-set-clippath').remove();\n\n  defs.append('clipPath')\n    .attr('id', chrModel.id + '-chromosome-set-clippath')\n    .selectAll('path')\n    .data(shape)\n    .enter()\n    .append('path')\n    .attr('d', function (d) {\n      return d.path;\n    })\n    .attr('class', function (d) {\n      return d.class;\n    });\n}\n\n\n/**\n * Renders all the bands and outlining boundaries of a chromosome.\n */\nfunction drawChromosome(chrModel) {\n\n  var chrIndex, container, numChrsInSet, transform, homologIndex,\n    chrSetSelector;\n\n  chrIndex = chrModel.chrIndex;\n\n  transform = this._layout.getChromosomeSetTranslate(chrIndex);\n\n  chrSetSelector = this.selector + ' #' + chrModel.id + '-chromosome-set';\n\n  d3.selectAll(chrSetSelector + ' g').remove();\n\n  container = d3.select(chrSetSelector);\n\n  if (container.nodes().length === 0) {\n    // Append chromosome set container\n    container = d3.select(this.selector)\n      .append('g')\n      .attr('class', 'chromosome-set-container')\n      .attr('data-set-number', chrIndex)\n      .attr('transform', transform)\n      .attr('id', chrModel.id + '-chromosome-set');\n  }\n\n  if (\n    'sex' in this.config &&\n    this.config.ploidy === 2 &&\n    this.sexChromosomes.index === chrIndex\n  ) {\n    this.drawSexChromosomes(container, chrIndex);\n    return;\n  }\n\n  numChrsInSet = 1;\n  if (this.config.ploidy > 1) {\n    numChrsInSet = this._ploidy.getChromosomesNumber(chrIndex);\n  }\n\n  for (homologIndex = 0; homologIndex < numChrsInSet; homologIndex++) {\n    this.appendHomolog(chrModel, chrIndex, homologIndex, container);\n  }\n}\n\n/**\n * Rotates a chromosome 90 degrees and shows or hides all other chromosomes\n * Useful for focusing or defocusing a particular chromosome\n */\nfunction rotateAndToggleDisplay(chrElement) {\n\n  var chrName, chrModel, chrIndex, chrSetIndex;\n\n  // Do nothing if taxid not defined. But it should be defined.\n  // To fix that bug we should have a way to find chromosome set number.\n  if (!this.config.taxid) {\n    return;\n  }\n\n  chrName = chrElement.id.split('-')[0].replace('chr', '');\n  chrModel = this.chromosomes[this.config.taxid][chrName];\n  chrIndex = chrModel.chrIndex;\n\n  chrSetIndex =\n    Number(d3.select(chrElement.parentNode).attr('data-set-number'));\n\n  this._layout.rotate(chrSetIndex, chrIndex, chrElement);\n}\n\nfunction setOverflowScroll() {\n  var ideo, config, ideoWidth, ideoInnerWrap, ideoMiddleWrap, ideoSvg,\n    ploidy, ploidyPad;\n\n  ideo = this;\n  config = ideo.config;\n\n  ideoSvg = d3.select(config.container + ' svg#_ideogram');\n  ideoInnerWrap = d3.select(config.container + ' #_ideogramInnerWrap');\n  ideoMiddleWrap = d3.select(config.container + ' #_ideogramMiddleWrap');\n\n  ploidy = config.ploidy;\n  ploidyPad = (ploidy - 1);\n\n  if (\n    config.orientation === 'vertical' &&\n    config.perspective !== 'comparative'\n  ) {\n    ideoWidth = (ideo.numChromosomes + 2) * (config.chrWidth + config.chrMargin + ploidyPad);\n  } else {\n    return;\n    // chrOffset = ideoSvg.select('.chromosome').nodes()[0].getBoundingClientRect();\n    // ideoWidth = config.chrHeight + chrOffset.x + 1;\n  }\n\n  ideoWidth = Math.round(ideoWidth * ploidy / config.rows);\n  if (ideo._layout._class === 'SmallLayout') ideoWidth += 40;\n\n  // Ensures absolutely-positioned elements, e.g. heatmap overlaps, display\n  // properly if ideogram container also has position: absolute\n  ideoMiddleWrap\n    .style('height', ideo._layout.getHeight() + 'px')\n\n  ideoInnerWrap\n    .style('max-width', ideoWidth + 'px')\n    .style('overflow-x', 'scroll')\n    .style('position', 'absolute');\n  ideoSvg.style('min-width', (ideoWidth - 5) + 'px');\n}\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ideogram/src/js/views/draw-chromosomes.js?");

/***/ }),

/***/ "./node_modules/immutable/dist/immutable.js":
/*!**************************************************!*\
  !*** ./node_modules/immutable/dist/immutable.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n(function (global, factory) {\n   true ? module.exports = factory() :\n  undefined;\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n  function createClass(ctor, superClass) {\n    if (superClass) {\n      ctor.prototype = Object.create(superClass.prototype);\n    }\n    ctor.prototype.constructor = ctor;\n  }\n\n  function Iterable(value) {\n      return isIterable(value) ? value : Seq(value);\n    }\n\n\n  createClass(KeyedIterable, Iterable);\n    function KeyedIterable(value) {\n      return isKeyed(value) ? value : KeyedSeq(value);\n    }\n\n\n  createClass(IndexedIterable, Iterable);\n    function IndexedIterable(value) {\n      return isIndexed(value) ? value : IndexedSeq(value);\n    }\n\n\n  createClass(SetIterable, Iterable);\n    function SetIterable(value) {\n      return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n    }\n\n\n\n  function isIterable(maybeIterable) {\n    return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n  }\n\n  function isKeyed(maybeKeyed) {\n    return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n  }\n\n  function isIndexed(maybeIndexed) {\n    return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n  }\n\n  function isAssociative(maybeAssociative) {\n    return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n  }\n\n  function isOrdered(maybeOrdered) {\n    return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n  }\n\n  Iterable.isIterable = isIterable;\n  Iterable.isKeyed = isKeyed;\n  Iterable.isIndexed = isIndexed;\n  Iterable.isAssociative = isAssociative;\n  Iterable.isOrdered = isOrdered;\n\n  Iterable.Keyed = KeyedIterable;\n  Iterable.Indexed = IndexedIterable;\n  Iterable.Set = SetIterable;\n\n\n  var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n  var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n  var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n  var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n  // Used for setting prototype methods that IE8 chokes on.\n  var DELETE = 'delete';\n\n  // Constants describing the size of trie nodes.\n  var SHIFT = 5; // Resulted in best performance after ______?\n  var SIZE = 1 << SHIFT;\n  var MASK = SIZE - 1;\n\n  // A consistent shared value representing \"not set\" which equals nothing other\n  // than itself, and nothing that could be provided externally.\n  var NOT_SET = {};\n\n  // Boolean references, Rough equivalent of `bool &`.\n  var CHANGE_LENGTH = { value: false };\n  var DID_ALTER = { value: false };\n\n  function MakeRef(ref) {\n    ref.value = false;\n    return ref;\n  }\n\n  function SetRef(ref) {\n    ref && (ref.value = true);\n  }\n\n  // A function which returns a value representing an \"owner\" for transient writes\n  // to tries. The return value will only ever equal itself, and will not equal\n  // the return of any subsequent call of this function.\n  function OwnerID() {}\n\n  // http://jsperf.com/copy-array-inline\n  function arrCopy(arr, offset) {\n    offset = offset || 0;\n    var len = Math.max(0, arr.length - offset);\n    var newArr = new Array(len);\n    for (var ii = 0; ii < len; ii++) {\n      newArr[ii] = arr[ii + offset];\n    }\n    return newArr;\n  }\n\n  function ensureSize(iter) {\n    if (iter.size === undefined) {\n      iter.size = iter.__iterate(returnTrue);\n    }\n    return iter.size;\n  }\n\n  function wrapIndex(iter, index) {\n    // This implements \"is array index\" which the ECMAString spec defines as:\n    //\n    //     A String property name P is an array index if and only if\n    //     ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n    //     to 2^32−1.\n    //\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n    if (typeof index !== 'number') {\n      var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n      if ('' + uint32Index !== index || uint32Index === 4294967295) {\n        return NaN;\n      }\n      index = uint32Index;\n    }\n    return index < 0 ? ensureSize(iter) + index : index;\n  }\n\n  function returnTrue() {\n    return true;\n  }\n\n  function wholeSlice(begin, end, size) {\n    return (begin === 0 || (size !== undefined && begin <= -size)) &&\n      (end === undefined || (size !== undefined && end >= size));\n  }\n\n  function resolveBegin(begin, size) {\n    return resolveIndex(begin, size, 0);\n  }\n\n  function resolveEnd(end, size) {\n    return resolveIndex(end, size, size);\n  }\n\n  function resolveIndex(index, size, defaultIndex) {\n    return index === undefined ?\n      defaultIndex :\n      index < 0 ?\n        Math.max(0, size + index) :\n        size === undefined ?\n          index :\n          Math.min(size, index);\n  }\n\n  /* global Symbol */\n\n  var ITERATE_KEYS = 0;\n  var ITERATE_VALUES = 1;\n  var ITERATE_ENTRIES = 2;\n\n  var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n  var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n  function Iterator(next) {\n      this.next = next;\n    }\n\n    Iterator.prototype.toString = function() {\n      return '[Iterator]';\n    };\n\n\n  Iterator.KEYS = ITERATE_KEYS;\n  Iterator.VALUES = ITERATE_VALUES;\n  Iterator.ENTRIES = ITERATE_ENTRIES;\n\n  Iterator.prototype.inspect =\n  Iterator.prototype.toSource = function () { return this.toString(); }\n  Iterator.prototype[ITERATOR_SYMBOL] = function () {\n    return this;\n  };\n\n\n  function iteratorValue(type, k, v, iteratorResult) {\n    var value = type === 0 ? k : type === 1 ? v : [k, v];\n    iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n      value: value, done: false\n    });\n    return iteratorResult;\n  }\n\n  function iteratorDone() {\n    return { value: undefined, done: true };\n  }\n\n  function hasIterator(maybeIterable) {\n    return !!getIteratorFn(maybeIterable);\n  }\n\n  function isIterator(maybeIterator) {\n    return maybeIterator && typeof maybeIterator.next === 'function';\n  }\n\n  function getIterator(iterable) {\n    var iteratorFn = getIteratorFn(iterable);\n    return iteratorFn && iteratorFn.call(iterable);\n  }\n\n  function getIteratorFn(iterable) {\n    var iteratorFn = iterable && (\n      (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n      iterable[FAUX_ITERATOR_SYMBOL]\n    );\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  function isArrayLike(value) {\n    return value && typeof value.length === 'number';\n  }\n\n  createClass(Seq, Iterable);\n    function Seq(value) {\n      return value === null || value === undefined ? emptySequence() :\n        isIterable(value) ? value.toSeq() : seqFromValue(value);\n    }\n\n    Seq.of = function(/*...values*/) {\n      return Seq(arguments);\n    };\n\n    Seq.prototype.toSeq = function() {\n      return this;\n    };\n\n    Seq.prototype.toString = function() {\n      return this.__toString('Seq {', '}');\n    };\n\n    Seq.prototype.cacheResult = function() {\n      if (!this._cache && this.__iterateUncached) {\n        this._cache = this.entrySeq().toArray();\n        this.size = this._cache.length;\n      }\n      return this;\n    };\n\n    // abstract __iterateUncached(fn, reverse)\n\n    Seq.prototype.__iterate = function(fn, reverse) {\n      return seqIterate(this, fn, reverse, true);\n    };\n\n    // abstract __iteratorUncached(type, reverse)\n\n    Seq.prototype.__iterator = function(type, reverse) {\n      return seqIterator(this, type, reverse, true);\n    };\n\n\n\n  createClass(KeyedSeq, Seq);\n    function KeyedSeq(value) {\n      return value === null || value === undefined ?\n        emptySequence().toKeyedSeq() :\n        isIterable(value) ?\n          (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n          keyedSeqFromValue(value);\n    }\n\n    KeyedSeq.prototype.toKeyedSeq = function() {\n      return this;\n    };\n\n\n\n  createClass(IndexedSeq, Seq);\n    function IndexedSeq(value) {\n      return value === null || value === undefined ? emptySequence() :\n        !isIterable(value) ? indexedSeqFromValue(value) :\n        isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n    }\n\n    IndexedSeq.of = function(/*...values*/) {\n      return IndexedSeq(arguments);\n    };\n\n    IndexedSeq.prototype.toIndexedSeq = function() {\n      return this;\n    };\n\n    IndexedSeq.prototype.toString = function() {\n      return this.__toString('Seq [', ']');\n    };\n\n    IndexedSeq.prototype.__iterate = function(fn, reverse) {\n      return seqIterate(this, fn, reverse, false);\n    };\n\n    IndexedSeq.prototype.__iterator = function(type, reverse) {\n      return seqIterator(this, type, reverse, false);\n    };\n\n\n\n  createClass(SetSeq, Seq);\n    function SetSeq(value) {\n      return (\n        value === null || value === undefined ? emptySequence() :\n        !isIterable(value) ? indexedSeqFromValue(value) :\n        isKeyed(value) ? value.entrySeq() : value\n      ).toSetSeq();\n    }\n\n    SetSeq.of = function(/*...values*/) {\n      return SetSeq(arguments);\n    };\n\n    SetSeq.prototype.toSetSeq = function() {\n      return this;\n    };\n\n\n\n  Seq.isSeq = isSeq;\n  Seq.Keyed = KeyedSeq;\n  Seq.Set = SetSeq;\n  Seq.Indexed = IndexedSeq;\n\n  var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n  Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n  createClass(ArraySeq, IndexedSeq);\n    function ArraySeq(array) {\n      this._array = array;\n      this.size = array.length;\n    }\n\n    ArraySeq.prototype.get = function(index, notSetValue) {\n      return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n    };\n\n    ArraySeq.prototype.__iterate = function(fn, reverse) {\n      var array = this._array;\n      var maxIndex = array.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    ArraySeq.prototype.__iterator = function(type, reverse) {\n      var array = this._array;\n      var maxIndex = array.length - 1;\n      var ii = 0;\n      return new Iterator(function() \n        {return ii > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n      );\n    };\n\n\n\n  createClass(ObjectSeq, KeyedSeq);\n    function ObjectSeq(object) {\n      var keys = Object.keys(object);\n      this._object = object;\n      this._keys = keys;\n      this.size = keys.length;\n    }\n\n    ObjectSeq.prototype.get = function(key, notSetValue) {\n      if (notSetValue !== undefined && !this.has(key)) {\n        return notSetValue;\n      }\n      return this._object[key];\n    };\n\n    ObjectSeq.prototype.has = function(key) {\n      return this._object.hasOwnProperty(key);\n    };\n\n    ObjectSeq.prototype.__iterate = function(fn, reverse) {\n      var object = this._object;\n      var keys = this._keys;\n      var maxIndex = keys.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        var key = keys[reverse ? maxIndex - ii : ii];\n        if (fn(object[key], key, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    ObjectSeq.prototype.__iterator = function(type, reverse) {\n      var object = this._object;\n      var keys = this._keys;\n      var maxIndex = keys.length - 1;\n      var ii = 0;\n      return new Iterator(function()  {\n        var key = keys[reverse ? maxIndex - ii : ii];\n        return ii++ > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, key, object[key]);\n      });\n    };\n\n  ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n  createClass(IterableSeq, IndexedSeq);\n    function IterableSeq(iterable) {\n      this._iterable = iterable;\n      this.size = iterable.length || iterable.size;\n    }\n\n    IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterable = this._iterable;\n      var iterator = getIterator(iterable);\n      var iterations = 0;\n      if (isIterator(iterator)) {\n        var step;\n        while (!(step = iterator.next()).done) {\n          if (fn(step.value, iterations++, this) === false) {\n            break;\n          }\n        }\n      }\n      return iterations;\n    };\n\n    IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterable = this._iterable;\n      var iterator = getIterator(iterable);\n      if (!isIterator(iterator)) {\n        return new Iterator(iteratorDone);\n      }\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step : iteratorValue(type, iterations++, step.value);\n      });\n    };\n\n\n\n  createClass(IteratorSeq, IndexedSeq);\n    function IteratorSeq(iterator) {\n      this._iterator = iterator;\n      this._iteratorCache = [];\n    }\n\n    IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterator = this._iterator;\n      var cache = this._iteratorCache;\n      var iterations = 0;\n      while (iterations < cache.length) {\n        if (fn(cache[iterations], iterations++, this) === false) {\n          return iterations;\n        }\n      }\n      var step;\n      while (!(step = iterator.next()).done) {\n        var val = step.value;\n        cache[iterations] = val;\n        if (fn(val, iterations++, this) === false) {\n          break;\n        }\n      }\n      return iterations;\n    };\n\n    IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = this._iterator;\n      var cache = this._iteratorCache;\n      var iterations = 0;\n      return new Iterator(function()  {\n        if (iterations >= cache.length) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          cache[iterations] = step.value;\n        }\n        return iteratorValue(type, iterations, cache[iterations++]);\n      });\n    };\n\n\n\n\n  // # pragma Helper functions\n\n  function isSeq(maybeSeq) {\n    return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n  }\n\n  var EMPTY_SEQ;\n\n  function emptySequence() {\n    return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n  }\n\n  function keyedSeqFromValue(value) {\n    var seq =\n      Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n      isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n      hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n      typeof value === 'object' ? new ObjectSeq(value) :\n      undefined;\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of [k, v] entries, '+\n        'or keyed object: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function indexedSeqFromValue(value) {\n    var seq = maybeIndexedSeqFromValue(value);\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of values: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function seqFromValue(value) {\n    var seq = maybeIndexedSeqFromValue(value) ||\n      (typeof value === 'object' && new ObjectSeq(value));\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of values, or keyed object: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function maybeIndexedSeqFromValue(value) {\n    return (\n      isArrayLike(value) ? new ArraySeq(value) :\n      isIterator(value) ? new IteratorSeq(value) :\n      hasIterator(value) ? new IterableSeq(value) :\n      undefined\n    );\n  }\n\n  function seqIterate(seq, fn, reverse, useKeys) {\n    var cache = seq._cache;\n    if (cache) {\n      var maxIndex = cache.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        var entry = cache[reverse ? maxIndex - ii : ii];\n        if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    }\n    return seq.__iterateUncached(fn, reverse);\n  }\n\n  function seqIterator(seq, type, reverse, useKeys) {\n    var cache = seq._cache;\n    if (cache) {\n      var maxIndex = cache.length - 1;\n      var ii = 0;\n      return new Iterator(function()  {\n        var entry = cache[reverse ? maxIndex - ii : ii];\n        return ii++ > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n      });\n    }\n    return seq.__iteratorUncached(type, reverse);\n  }\n\n  function fromJS(json, converter) {\n    return converter ?\n      fromJSWith(converter, json, '', {'': json}) :\n      fromJSDefault(json);\n  }\n\n  function fromJSWith(converter, json, key, parentJSON) {\n    if (Array.isArray(json)) {\n      return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));\n    }\n    if (isPlainObj(json)) {\n      return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));\n    }\n    return json;\n  }\n\n  function fromJSDefault(json) {\n    if (Array.isArray(json)) {\n      return IndexedSeq(json).map(fromJSDefault).toList();\n    }\n    if (isPlainObj(json)) {\n      return KeyedSeq(json).map(fromJSDefault).toMap();\n    }\n    return json;\n  }\n\n  function isPlainObj(value) {\n    return value && (value.constructor === Object || value.constructor === undefined);\n  }\n\n  /**\n   * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n   * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n   *\n   * NaN is considered the same as NaN, however -0 and 0 are considered the same\n   * value, which is different from the algorithm described by\n   * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n   *\n   * This is extended further to allow Objects to describe the values they\n   * represent, by way of `valueOf` or `equals` (and `hashCode`).\n   *\n   * Note: because of this extension, the key equality of Immutable.Map and the\n   * value equality of Immutable.Set will differ from ES6 Map and Set.\n   *\n   * ### Defining custom values\n   *\n   * The easiest way to describe the value an object represents is by implementing\n   * `valueOf`. For example, `Date` represents a value by returning a unix\n   * timestamp for `valueOf`:\n   *\n   *     var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n   *     var date2 = new Date(1234567890000);\n   *     date1.valueOf(); // 1234567890000\n   *     assert( date1 !== date2 );\n   *     assert( Immutable.is( date1, date2 ) );\n   *\n   * Note: overriding `valueOf` may have other implications if you use this object\n   * where JavaScript expects a primitive, such as implicit string coercion.\n   *\n   * For more complex types, especially collections, implementing `valueOf` may\n   * not be performant. An alternative is to implement `equals` and `hashCode`.\n   *\n   * `equals` takes another object, presumably of similar type, and returns true\n   * if the it is equal. Equality is symmetrical, so the same result should be\n   * returned if this and the argument are flipped.\n   *\n   *     assert( a.equals(b) === b.equals(a) );\n   *\n   * `hashCode` returns a 32bit integer number representing the object which will\n   * be used to determine how to store the value object in a Map or Set. You must\n   * provide both or neither methods, one must not exist without the other.\n   *\n   * Also, an important relationship between these methods must be upheld: if two\n   * values are equal, they *must* return the same hashCode. If the values are not\n   * equal, they might have the same hashCode; this is called a hash collision,\n   * and while undesirable for performance reasons, it is acceptable.\n   *\n   *     if (a.equals(b)) {\n   *       assert( a.hashCode() === b.hashCode() );\n   *     }\n   *\n   * All Immutable collections implement `equals` and `hashCode`.\n   *\n   */\n  function is(valueA, valueB) {\n    if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n      return true;\n    }\n    if (!valueA || !valueB) {\n      return false;\n    }\n    if (typeof valueA.valueOf === 'function' &&\n        typeof valueB.valueOf === 'function') {\n      valueA = valueA.valueOf();\n      valueB = valueB.valueOf();\n      if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n        return true;\n      }\n      if (!valueA || !valueB) {\n        return false;\n      }\n    }\n    if (typeof valueA.equals === 'function' &&\n        typeof valueB.equals === 'function' &&\n        valueA.equals(valueB)) {\n      return true;\n    }\n    return false;\n  }\n\n  function deepEqual(a, b) {\n    if (a === b) {\n      return true;\n    }\n\n    if (\n      !isIterable(b) ||\n      a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n      a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n      isKeyed(a) !== isKeyed(b) ||\n      isIndexed(a) !== isIndexed(b) ||\n      isOrdered(a) !== isOrdered(b)\n    ) {\n      return false;\n    }\n\n    if (a.size === 0 && b.size === 0) {\n      return true;\n    }\n\n    var notAssociative = !isAssociative(a);\n\n    if (isOrdered(a)) {\n      var entries = a.entries();\n      return b.every(function(v, k)  {\n        var entry = entries.next().value;\n        return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n      }) && entries.next().done;\n    }\n\n    var flipped = false;\n\n    if (a.size === undefined) {\n      if (b.size === undefined) {\n        if (typeof a.cacheResult === 'function') {\n          a.cacheResult();\n        }\n      } else {\n        flipped = true;\n        var _ = a;\n        a = b;\n        b = _;\n      }\n    }\n\n    var allEqual = true;\n    var bSize = b.__iterate(function(v, k)  {\n      if (notAssociative ? !a.has(v) :\n          flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n        allEqual = false;\n        return false;\n      }\n    });\n\n    return allEqual && a.size === bSize;\n  }\n\n  createClass(Repeat, IndexedSeq);\n\n    function Repeat(value, times) {\n      if (!(this instanceof Repeat)) {\n        return new Repeat(value, times);\n      }\n      this._value = value;\n      this.size = times === undefined ? Infinity : Math.max(0, times);\n      if (this.size === 0) {\n        if (EMPTY_REPEAT) {\n          return EMPTY_REPEAT;\n        }\n        EMPTY_REPEAT = this;\n      }\n    }\n\n    Repeat.prototype.toString = function() {\n      if (this.size === 0) {\n        return 'Repeat []';\n      }\n      return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n    };\n\n    Repeat.prototype.get = function(index, notSetValue) {\n      return this.has(index) ? this._value : notSetValue;\n    };\n\n    Repeat.prototype.includes = function(searchValue) {\n      return is(this._value, searchValue);\n    };\n\n    Repeat.prototype.slice = function(begin, end) {\n      var size = this.size;\n      return wholeSlice(begin, end, size) ? this :\n        new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n    };\n\n    Repeat.prototype.reverse = function() {\n      return this;\n    };\n\n    Repeat.prototype.indexOf = function(searchValue) {\n      if (is(this._value, searchValue)) {\n        return 0;\n      }\n      return -1;\n    };\n\n    Repeat.prototype.lastIndexOf = function(searchValue) {\n      if (is(this._value, searchValue)) {\n        return this.size;\n      }\n      return -1;\n    };\n\n    Repeat.prototype.__iterate = function(fn, reverse) {\n      for (var ii = 0; ii < this.size; ii++) {\n        if (fn(this._value, ii, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n      var ii = 0;\n      return new Iterator(function() \n        {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n      );\n    };\n\n    Repeat.prototype.equals = function(other) {\n      return other instanceof Repeat ?\n        is(this._value, other._value) :\n        deepEqual(other);\n    };\n\n\n  var EMPTY_REPEAT;\n\n  function invariant(condition, error) {\n    if (!condition) throw new Error(error);\n  }\n\n  createClass(Range, IndexedSeq);\n\n    function Range(start, end, step) {\n      if (!(this instanceof Range)) {\n        return new Range(start, end, step);\n      }\n      invariant(step !== 0, 'Cannot step a Range by 0');\n      start = start || 0;\n      if (end === undefined) {\n        end = Infinity;\n      }\n      step = step === undefined ? 1 : Math.abs(step);\n      if (end < start) {\n        step = -step;\n      }\n      this._start = start;\n      this._end = end;\n      this._step = step;\n      this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n      if (this.size === 0) {\n        if (EMPTY_RANGE) {\n          return EMPTY_RANGE;\n        }\n        EMPTY_RANGE = this;\n      }\n    }\n\n    Range.prototype.toString = function() {\n      if (this.size === 0) {\n        return 'Range []';\n      }\n      return 'Range [ ' +\n        this._start + '...' + this._end +\n        (this._step !== 1 ? ' by ' + this._step : '') +\n      ' ]';\n    };\n\n    Range.prototype.get = function(index, notSetValue) {\n      return this.has(index) ?\n        this._start + wrapIndex(this, index) * this._step :\n        notSetValue;\n    };\n\n    Range.prototype.includes = function(searchValue) {\n      var possibleIndex = (searchValue - this._start) / this._step;\n      return possibleIndex >= 0 &&\n        possibleIndex < this.size &&\n        possibleIndex === Math.floor(possibleIndex);\n    };\n\n    Range.prototype.slice = function(begin, end) {\n      if (wholeSlice(begin, end, this.size)) {\n        return this;\n      }\n      begin = resolveBegin(begin, this.size);\n      end = resolveEnd(end, this.size);\n      if (end <= begin) {\n        return new Range(0, 0);\n      }\n      return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n    };\n\n    Range.prototype.indexOf = function(searchValue) {\n      var offsetValue = searchValue - this._start;\n      if (offsetValue % this._step === 0) {\n        var index = offsetValue / this._step;\n        if (index >= 0 && index < this.size) {\n          return index\n        }\n      }\n      return -1;\n    };\n\n    Range.prototype.lastIndexOf = function(searchValue) {\n      return this.indexOf(searchValue);\n    };\n\n    Range.prototype.__iterate = function(fn, reverse) {\n      var maxIndex = this.size - 1;\n      var step = this._step;\n      var value = reverse ? this._start + maxIndex * step : this._start;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        if (fn(value, ii, this) === false) {\n          return ii + 1;\n        }\n        value += reverse ? -step : step;\n      }\n      return ii;\n    };\n\n    Range.prototype.__iterator = function(type, reverse) {\n      var maxIndex = this.size - 1;\n      var step = this._step;\n      var value = reverse ? this._start + maxIndex * step : this._start;\n      var ii = 0;\n      return new Iterator(function()  {\n        var v = value;\n        value += reverse ? -step : step;\n        return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n      });\n    };\n\n    Range.prototype.equals = function(other) {\n      return other instanceof Range ?\n        this._start === other._start &&\n        this._end === other._end &&\n        this._step === other._step :\n        deepEqual(this, other);\n    };\n\n\n  var EMPTY_RANGE;\n\n  createClass(Collection, Iterable);\n    function Collection() {\n      throw TypeError('Abstract');\n    }\n\n\n  createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n  createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n  createClass(SetCollection, Collection);function SetCollection() {}\n\n\n  Collection.Keyed = KeyedCollection;\n  Collection.Indexed = IndexedCollection;\n  Collection.Set = SetCollection;\n\n  var imul =\n    typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n    Math.imul :\n    function imul(a, b) {\n      a = a | 0; // int\n      b = b | 0; // int\n      var c = a & 0xffff;\n      var d = b & 0xffff;\n      // Shift by 0 fixes the sign on the high part.\n      return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n    };\n\n  // v8 has an optimization for storing 31-bit signed numbers.\n  // Values which have either 00 or 11 as the high order bits qualify.\n  // This function drops the highest order bit in a signed number, maintaining\n  // the sign bit.\n  function smi(i32) {\n    return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n  }\n\n  function hash(o) {\n    if (o === false || o === null || o === undefined) {\n      return 0;\n    }\n    if (typeof o.valueOf === 'function') {\n      o = o.valueOf();\n      if (o === false || o === null || o === undefined) {\n        return 0;\n      }\n    }\n    if (o === true) {\n      return 1;\n    }\n    var type = typeof o;\n    if (type === 'number') {\n      if (o !== o || o === Infinity) {\n        return 0;\n      }\n      var h = o | 0;\n      if (h !== o) {\n        h ^= o * 0xFFFFFFFF;\n      }\n      while (o > 0xFFFFFFFF) {\n        o /= 0xFFFFFFFF;\n        h ^= o;\n      }\n      return smi(h);\n    }\n    if (type === 'string') {\n      return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n    }\n    if (typeof o.hashCode === 'function') {\n      return o.hashCode();\n    }\n    if (type === 'object') {\n      return hashJSObj(o);\n    }\n    if (typeof o.toString === 'function') {\n      return hashString(o.toString());\n    }\n    throw new Error('Value type ' + type + ' cannot be hashed.');\n  }\n\n  function cachedHashString(string) {\n    var hash = stringHashCache[string];\n    if (hash === undefined) {\n      hash = hashString(string);\n      if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n        STRING_HASH_CACHE_SIZE = 0;\n        stringHashCache = {};\n      }\n      STRING_HASH_CACHE_SIZE++;\n      stringHashCache[string] = hash;\n    }\n    return hash;\n  }\n\n  // http://jsperf.com/hashing-strings\n  function hashString(string) {\n    // This is the hash from JVM\n    // The hash code for a string is computed as\n    // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n    // where s[i] is the ith character of the string and n is the length of\n    // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n    // (exclusive) by dropping high bits.\n    var hash = 0;\n    for (var ii = 0; ii < string.length; ii++) {\n      hash = 31 * hash + string.charCodeAt(ii) | 0;\n    }\n    return smi(hash);\n  }\n\n  function hashJSObj(obj) {\n    var hash;\n    if (usingWeakMap) {\n      hash = weakMap.get(obj);\n      if (hash !== undefined) {\n        return hash;\n      }\n    }\n\n    hash = obj[UID_HASH_KEY];\n    if (hash !== undefined) {\n      return hash;\n    }\n\n    if (!canDefineProperty) {\n      hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n      if (hash !== undefined) {\n        return hash;\n      }\n\n      hash = getIENodeHash(obj);\n      if (hash !== undefined) {\n        return hash;\n      }\n    }\n\n    hash = ++objHashUID;\n    if (objHashUID & 0x40000000) {\n      objHashUID = 0;\n    }\n\n    if (usingWeakMap) {\n      weakMap.set(obj, hash);\n    } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n      throw new Error('Non-extensible objects are not allowed as keys.');\n    } else if (canDefineProperty) {\n      Object.defineProperty(obj, UID_HASH_KEY, {\n        'enumerable': false,\n        'configurable': false,\n        'writable': false,\n        'value': hash\n      });\n    } else if (obj.propertyIsEnumerable !== undefined &&\n               obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n      // Since we can't define a non-enumerable property on the object\n      // we'll hijack one of the less-used non-enumerable properties to\n      // save our hash on it. Since this is a function it will not show up in\n      // `JSON.stringify` which is what we want.\n      obj.propertyIsEnumerable = function() {\n        return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n      };\n      obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n    } else if (obj.nodeType !== undefined) {\n      // At this point we couldn't get the IE `uniqueID` to use as a hash\n      // and we couldn't use a non-enumerable property to exploit the\n      // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n      // itself.\n      obj[UID_HASH_KEY] = hash;\n    } else {\n      throw new Error('Unable to set a non-enumerable property on object.');\n    }\n\n    return hash;\n  }\n\n  // Get references to ES5 object methods.\n  var isExtensible = Object.isExtensible;\n\n  // True if Object.defineProperty works as expected. IE8 fails this test.\n  var canDefineProperty = (function() {\n    try {\n      Object.defineProperty({}, '@', {});\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }());\n\n  // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n  // and avoid memory leaks from the IE cloneNode bug.\n  function getIENodeHash(node) {\n    if (node && node.nodeType > 0) {\n      switch (node.nodeType) {\n        case 1: // Element\n          return node.uniqueID;\n        case 9: // Document\n          return node.documentElement && node.documentElement.uniqueID;\n      }\n    }\n  }\n\n  // If possible, use a WeakMap.\n  var usingWeakMap = typeof WeakMap === 'function';\n  var weakMap;\n  if (usingWeakMap) {\n    weakMap = new WeakMap();\n  }\n\n  var objHashUID = 0;\n\n  var UID_HASH_KEY = '__immutablehash__';\n  if (typeof Symbol === 'function') {\n    UID_HASH_KEY = Symbol(UID_HASH_KEY);\n  }\n\n  var STRING_HASH_CACHE_MIN_STRLEN = 16;\n  var STRING_HASH_CACHE_MAX_SIZE = 255;\n  var STRING_HASH_CACHE_SIZE = 0;\n  var stringHashCache = {};\n\n  function assertNotInfinite(size) {\n    invariant(\n      size !== Infinity,\n      'Cannot perform this action with an infinite size.'\n    );\n  }\n\n  createClass(Map, KeyedCollection);\n\n    // @pragma Construction\n\n    function Map(value) {\n      return value === null || value === undefined ? emptyMap() :\n        isMap(value) && !isOrdered(value) ? value :\n        emptyMap().withMutations(function(map ) {\n          var iter = KeyedIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v, k)  {return map.set(k, v)});\n        });\n    }\n\n    Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);\n      return emptyMap().withMutations(function(map ) {\n        for (var i = 0; i < keyValues.length; i += 2) {\n          if (i + 1 >= keyValues.length) {\n            throw new Error('Missing value for key: ' + keyValues[i]);\n          }\n          map.set(keyValues[i], keyValues[i + 1]);\n        }\n      });\n    };\n\n    Map.prototype.toString = function() {\n      return this.__toString('Map {', '}');\n    };\n\n    // @pragma Access\n\n    Map.prototype.get = function(k, notSetValue) {\n      return this._root ?\n        this._root.get(0, undefined, k, notSetValue) :\n        notSetValue;\n    };\n\n    // @pragma Modification\n\n    Map.prototype.set = function(k, v) {\n      return updateMap(this, k, v);\n    };\n\n    Map.prototype.setIn = function(keyPath, v) {\n      return this.updateIn(keyPath, NOT_SET, function()  {return v});\n    };\n\n    Map.prototype.remove = function(k) {\n      return updateMap(this, k, NOT_SET);\n    };\n\n    Map.prototype.deleteIn = function(keyPath) {\n      return this.updateIn(keyPath, function()  {return NOT_SET});\n    };\n\n    Map.prototype.update = function(k, notSetValue, updater) {\n      return arguments.length === 1 ?\n        k(this) :\n        this.updateIn([k], notSetValue, updater);\n    };\n\n    Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n      if (!updater) {\n        updater = notSetValue;\n        notSetValue = undefined;\n      }\n      var updatedValue = updateInDeepMap(\n        this,\n        forceIterator(keyPath),\n        notSetValue,\n        updater\n      );\n      return updatedValue === NOT_SET ? undefined : updatedValue;\n    };\n\n    Map.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._root = null;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyMap();\n    };\n\n    // @pragma Composition\n\n    Map.prototype.merge = function(/*...iters*/) {\n      return mergeIntoMapWith(this, undefined, arguments);\n    };\n\n    Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoMapWith(this, merger, iters);\n    };\n\n    Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n      return this.updateIn(\n        keyPath,\n        emptyMap(),\n        function(m ) {return typeof m.merge === 'function' ?\n          m.merge.apply(m, iters) :\n          iters[iters.length - 1]}\n      );\n    };\n\n    Map.prototype.mergeDeep = function(/*...iters*/) {\n      return mergeIntoMapWith(this, deepMerger, arguments);\n    };\n\n    Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n    };\n\n    Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n      return this.updateIn(\n        keyPath,\n        emptyMap(),\n        function(m ) {return typeof m.mergeDeep === 'function' ?\n          m.mergeDeep.apply(m, iters) :\n          iters[iters.length - 1]}\n      );\n    };\n\n    Map.prototype.sort = function(comparator) {\n      // Late binding\n      return OrderedMap(sortFactory(this, comparator));\n    };\n\n    Map.prototype.sortBy = function(mapper, comparator) {\n      // Late binding\n      return OrderedMap(sortFactory(this, comparator, mapper));\n    };\n\n    // @pragma Mutability\n\n    Map.prototype.withMutations = function(fn) {\n      var mutable = this.asMutable();\n      fn(mutable);\n      return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n    };\n\n    Map.prototype.asMutable = function() {\n      return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n    };\n\n    Map.prototype.asImmutable = function() {\n      return this.__ensureOwner();\n    };\n\n    Map.prototype.wasAltered = function() {\n      return this.__altered;\n    };\n\n    Map.prototype.__iterator = function(type, reverse) {\n      return new MapIterator(this, type, reverse);\n    };\n\n    Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      this._root && this._root.iterate(function(entry ) {\n        iterations++;\n        return fn(entry[1], entry[0], this$0);\n      }, reverse);\n      return iterations;\n    };\n\n    Map.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this.__altered = false;\n        return this;\n      }\n      return makeMap(this.size, this._root, ownerID, this.__hash);\n    };\n\n\n  function isMap(maybeMap) {\n    return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n  }\n\n  Map.isMap = isMap;\n\n  var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n  var MapPrototype = Map.prototype;\n  MapPrototype[IS_MAP_SENTINEL] = true;\n  MapPrototype[DELETE] = MapPrototype.remove;\n  MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n  // #pragma Trie Nodes\n\n\n\n    function ArrayMapNode(ownerID, entries) {\n      this.ownerID = ownerID;\n      this.entries = entries;\n    }\n\n    ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      var entries = this.entries;\n      for (var ii = 0, len = entries.length; ii < len; ii++) {\n        if (is(key, entries[ii][0])) {\n          return entries[ii][1];\n        }\n      }\n      return notSetValue;\n    };\n\n    ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      var removed = value === NOT_SET;\n\n      var entries = this.entries;\n      var idx = 0;\n      for (var len = entries.length; idx < len; idx++) {\n        if (is(key, entries[idx][0])) {\n          break;\n        }\n      }\n      var exists = idx < len;\n\n      if (exists ? entries[idx][1] === value : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n      (removed || !exists) && SetRef(didChangeSize);\n\n      if (removed && entries.length === 1) {\n        return; // undefined\n      }\n\n      if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n        return createNodes(ownerID, entries, key, value);\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newEntries = isEditable ? entries : arrCopy(entries);\n\n      if (exists) {\n        if (removed) {\n          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n        } else {\n          newEntries[idx] = [key, value];\n        }\n      } else {\n        newEntries.push([key, value]);\n      }\n\n      if (isEditable) {\n        this.entries = newEntries;\n        return this;\n      }\n\n      return new ArrayMapNode(ownerID, newEntries);\n    };\n\n\n\n\n    function BitmapIndexedNode(ownerID, bitmap, nodes) {\n      this.ownerID = ownerID;\n      this.bitmap = bitmap;\n      this.nodes = nodes;\n    }\n\n    BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n      var bitmap = this.bitmap;\n      return (bitmap & bit) === 0 ? notSetValue :\n        this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n    };\n\n    BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var bit = 1 << keyHashFrag;\n      var bitmap = this.bitmap;\n      var exists = (bitmap & bit) !== 0;\n\n      if (!exists && value === NOT_SET) {\n        return this;\n      }\n\n      var idx = popCount(bitmap & (bit - 1));\n      var nodes = this.nodes;\n      var node = exists ? nodes[idx] : undefined;\n      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n      if (newNode === node) {\n        return this;\n      }\n\n      if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n        return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n      }\n\n      if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n        return nodes[idx ^ 1];\n      }\n\n      if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n        return newNode;\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n      var newNodes = exists ? newNode ?\n        setIn(nodes, idx, newNode, isEditable) :\n        spliceOut(nodes, idx, isEditable) :\n        spliceIn(nodes, idx, newNode, isEditable);\n\n      if (isEditable) {\n        this.bitmap = newBitmap;\n        this.nodes = newNodes;\n        return this;\n      }\n\n      return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n    };\n\n\n\n\n    function HashArrayMapNode(ownerID, count, nodes) {\n      this.ownerID = ownerID;\n      this.count = count;\n      this.nodes = nodes;\n    }\n\n    HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var node = this.nodes[idx];\n      return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n    };\n\n    HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var removed = value === NOT_SET;\n      var nodes = this.nodes;\n      var node = nodes[idx];\n\n      if (removed && !node) {\n        return this;\n      }\n\n      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n      if (newNode === node) {\n        return this;\n      }\n\n      var newCount = this.count;\n      if (!node) {\n        newCount++;\n      } else if (!newNode) {\n        newCount--;\n        if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n          return packNodes(ownerID, nodes, newCount, idx);\n        }\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n      if (isEditable) {\n        this.count = newCount;\n        this.nodes = newNodes;\n        return this;\n      }\n\n      return new HashArrayMapNode(ownerID, newCount, newNodes);\n    };\n\n\n\n\n    function HashCollisionNode(ownerID, keyHash, entries) {\n      this.ownerID = ownerID;\n      this.keyHash = keyHash;\n      this.entries = entries;\n    }\n\n    HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      var entries = this.entries;\n      for (var ii = 0, len = entries.length; ii < len; ii++) {\n        if (is(key, entries[ii][0])) {\n          return entries[ii][1];\n        }\n      }\n      return notSetValue;\n    };\n\n    HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n\n      var removed = value === NOT_SET;\n\n      if (keyHash !== this.keyHash) {\n        if (removed) {\n          return this;\n        }\n        SetRef(didAlter);\n        SetRef(didChangeSize);\n        return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n      }\n\n      var entries = this.entries;\n      var idx = 0;\n      for (var len = entries.length; idx < len; idx++) {\n        if (is(key, entries[idx][0])) {\n          break;\n        }\n      }\n      var exists = idx < len;\n\n      if (exists ? entries[idx][1] === value : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n      (removed || !exists) && SetRef(didChangeSize);\n\n      if (removed && len === 2) {\n        return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newEntries = isEditable ? entries : arrCopy(entries);\n\n      if (exists) {\n        if (removed) {\n          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n        } else {\n          newEntries[idx] = [key, value];\n        }\n      } else {\n        newEntries.push([key, value]);\n      }\n\n      if (isEditable) {\n        this.entries = newEntries;\n        return this;\n      }\n\n      return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n    };\n\n\n\n\n    function ValueNode(ownerID, keyHash, entry) {\n      this.ownerID = ownerID;\n      this.keyHash = keyHash;\n      this.entry = entry;\n    }\n\n    ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n    };\n\n    ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      var removed = value === NOT_SET;\n      var keyMatch = is(key, this.entry[0]);\n      if (keyMatch ? value === this.entry[1] : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n\n      if (removed) {\n        SetRef(didChangeSize);\n        return; // undefined\n      }\n\n      if (keyMatch) {\n        if (ownerID && ownerID === this.ownerID) {\n          this.entry[1] = value;\n          return this;\n        }\n        return new ValueNode(ownerID, this.keyHash, [key, value]);\n      }\n\n      SetRef(didChangeSize);\n      return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n    };\n\n\n\n  // #pragma Iterators\n\n  ArrayMapNode.prototype.iterate =\n  HashCollisionNode.prototype.iterate = function (fn, reverse) {\n    var entries = this.entries;\n    for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n      if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n        return false;\n      }\n    }\n  }\n\n  BitmapIndexedNode.prototype.iterate =\n  HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n    var nodes = this.nodes;\n    for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n      var node = nodes[reverse ? maxIndex - ii : ii];\n      if (node && node.iterate(fn, reverse) === false) {\n        return false;\n      }\n    }\n  }\n\n  ValueNode.prototype.iterate = function (fn, reverse) {\n    return fn(this.entry);\n  }\n\n  createClass(MapIterator, Iterator);\n\n    function MapIterator(map, type, reverse) {\n      this._type = type;\n      this._reverse = reverse;\n      this._stack = map._root && mapIteratorFrame(map._root);\n    }\n\n    MapIterator.prototype.next = function() {\n      var type = this._type;\n      var stack = this._stack;\n      while (stack) {\n        var node = stack.node;\n        var index = stack.index++;\n        var maxIndex;\n        if (node.entry) {\n          if (index === 0) {\n            return mapIteratorValue(type, node.entry);\n          }\n        } else if (node.entries) {\n          maxIndex = node.entries.length - 1;\n          if (index <= maxIndex) {\n            return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n          }\n        } else {\n          maxIndex = node.nodes.length - 1;\n          if (index <= maxIndex) {\n            var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n            if (subNode) {\n              if (subNode.entry) {\n                return mapIteratorValue(type, subNode.entry);\n              }\n              stack = this._stack = mapIteratorFrame(subNode, stack);\n            }\n            continue;\n          }\n        }\n        stack = this._stack = this._stack.__prev;\n      }\n      return iteratorDone();\n    };\n\n\n  function mapIteratorValue(type, entry) {\n    return iteratorValue(type, entry[0], entry[1]);\n  }\n\n  function mapIteratorFrame(node, prev) {\n    return {\n      node: node,\n      index: 0,\n      __prev: prev\n    };\n  }\n\n  function makeMap(size, root, ownerID, hash) {\n    var map = Object.create(MapPrototype);\n    map.size = size;\n    map._root = root;\n    map.__ownerID = ownerID;\n    map.__hash = hash;\n    map.__altered = false;\n    return map;\n  }\n\n  var EMPTY_MAP;\n  function emptyMap() {\n    return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n  }\n\n  function updateMap(map, k, v) {\n    var newRoot;\n    var newSize;\n    if (!map._root) {\n      if (v === NOT_SET) {\n        return map;\n      }\n      newSize = 1;\n      newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n    } else {\n      var didChangeSize = MakeRef(CHANGE_LENGTH);\n      var didAlter = MakeRef(DID_ALTER);\n      newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n      if (!didAlter.value) {\n        return map;\n      }\n      newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n    }\n    if (map.__ownerID) {\n      map.size = newSize;\n      map._root = newRoot;\n      map.__hash = undefined;\n      map.__altered = true;\n      return map;\n    }\n    return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n  }\n\n  function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n    if (!node) {\n      if (value === NOT_SET) {\n        return node;\n      }\n      SetRef(didAlter);\n      SetRef(didChangeSize);\n      return new ValueNode(ownerID, keyHash, [key, value]);\n    }\n    return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n  }\n\n  function isLeafNode(node) {\n    return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n  }\n\n  function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n    if (node.keyHash === keyHash) {\n      return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n    }\n\n    var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n    var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n    var newNode;\n    var nodes = idx1 === idx2 ?\n      [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n      ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n    return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n  }\n\n  function createNodes(ownerID, entries, key, value) {\n    if (!ownerID) {\n      ownerID = new OwnerID();\n    }\n    var node = new ValueNode(ownerID, hash(key), [key, value]);\n    for (var ii = 0; ii < entries.length; ii++) {\n      var entry = entries[ii];\n      node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n    }\n    return node;\n  }\n\n  function packNodes(ownerID, nodes, count, excluding) {\n    var bitmap = 0;\n    var packedII = 0;\n    var packedNodes = new Array(count);\n    for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n      var node = nodes[ii];\n      if (node !== undefined && ii !== excluding) {\n        bitmap |= bit;\n        packedNodes[packedII++] = node;\n      }\n    }\n    return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n  }\n\n  function expandNodes(ownerID, nodes, bitmap, including, node) {\n    var count = 0;\n    var expandedNodes = new Array(SIZE);\n    for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n      expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n    }\n    expandedNodes[including] = node;\n    return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n  }\n\n  function mergeIntoMapWith(map, merger, iterables) {\n    var iters = [];\n    for (var ii = 0; ii < iterables.length; ii++) {\n      var value = iterables[ii];\n      var iter = KeyedIterable(value);\n      if (!isIterable(value)) {\n        iter = iter.map(function(v ) {return fromJS(v)});\n      }\n      iters.push(iter);\n    }\n    return mergeIntoCollectionWith(map, merger, iters);\n  }\n\n  function deepMerger(existing, value, key) {\n    return existing && existing.mergeDeep && isIterable(value) ?\n      existing.mergeDeep(value) :\n      is(existing, value) ? existing : value;\n  }\n\n  function deepMergerWith(merger) {\n    return function(existing, value, key)  {\n      if (existing && existing.mergeDeepWith && isIterable(value)) {\n        return existing.mergeDeepWith(merger, value);\n      }\n      var nextValue = merger(existing, value, key);\n      return is(existing, nextValue) ? existing : nextValue;\n    };\n  }\n\n  function mergeIntoCollectionWith(collection, merger, iters) {\n    iters = iters.filter(function(x ) {return x.size !== 0});\n    if (iters.length === 0) {\n      return collection;\n    }\n    if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n      return collection.constructor(iters[0]);\n    }\n    return collection.withMutations(function(collection ) {\n      var mergeIntoMap = merger ?\n        function(value, key)  {\n          collection.update(key, NOT_SET, function(existing )\n            {return existing === NOT_SET ? value : merger(existing, value, key)}\n          );\n        } :\n        function(value, key)  {\n          collection.set(key, value);\n        }\n      for (var ii = 0; ii < iters.length; ii++) {\n        iters[ii].forEach(mergeIntoMap);\n      }\n    });\n  }\n\n  function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n    var isNotSet = existing === NOT_SET;\n    var step = keyPathIter.next();\n    if (step.done) {\n      var existingValue = isNotSet ? notSetValue : existing;\n      var newValue = updater(existingValue);\n      return newValue === existingValue ? existing : newValue;\n    }\n    invariant(\n      isNotSet || (existing && existing.set),\n      'invalid keyPath'\n    );\n    var key = step.value;\n    var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n    var nextUpdated = updateInDeepMap(\n      nextExisting,\n      keyPathIter,\n      notSetValue,\n      updater\n    );\n    return nextUpdated === nextExisting ? existing :\n      nextUpdated === NOT_SET ? existing.remove(key) :\n      (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n  }\n\n  function popCount(x) {\n    x = x - ((x >> 1) & 0x55555555);\n    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n    x = (x + (x >> 4)) & 0x0f0f0f0f;\n    x = x + (x >> 8);\n    x = x + (x >> 16);\n    return x & 0x7f;\n  }\n\n  function setIn(array, idx, val, canEdit) {\n    var newArray = canEdit ? array : arrCopy(array);\n    newArray[idx] = val;\n    return newArray;\n  }\n\n  function spliceIn(array, idx, val, canEdit) {\n    var newLen = array.length + 1;\n    if (canEdit && idx + 1 === newLen) {\n      array[idx] = val;\n      return array;\n    }\n    var newArray = new Array(newLen);\n    var after = 0;\n    for (var ii = 0; ii < newLen; ii++) {\n      if (ii === idx) {\n        newArray[ii] = val;\n        after = -1;\n      } else {\n        newArray[ii] = array[ii + after];\n      }\n    }\n    return newArray;\n  }\n\n  function spliceOut(array, idx, canEdit) {\n    var newLen = array.length - 1;\n    if (canEdit && idx === newLen) {\n      array.pop();\n      return array;\n    }\n    var newArray = new Array(newLen);\n    var after = 0;\n    for (var ii = 0; ii < newLen; ii++) {\n      if (ii === idx) {\n        after = 1;\n      }\n      newArray[ii] = array[ii + after];\n    }\n    return newArray;\n  }\n\n  var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n  var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n  var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n  createClass(List, IndexedCollection);\n\n    // @pragma Construction\n\n    function List(value) {\n      var empty = emptyList();\n      if (value === null || value === undefined) {\n        return empty;\n      }\n      if (isList(value)) {\n        return value;\n      }\n      var iter = IndexedIterable(value);\n      var size = iter.size;\n      if (size === 0) {\n        return empty;\n      }\n      assertNotInfinite(size);\n      if (size > 0 && size < SIZE) {\n        return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n      }\n      return empty.withMutations(function(list ) {\n        list.setSize(size);\n        iter.forEach(function(v, i)  {return list.set(i, v)});\n      });\n    }\n\n    List.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    List.prototype.toString = function() {\n      return this.__toString('List [', ']');\n    };\n\n    // @pragma Access\n\n    List.prototype.get = function(index, notSetValue) {\n      index = wrapIndex(this, index);\n      if (index >= 0 && index < this.size) {\n        index += this._origin;\n        var node = listNodeFor(this, index);\n        return node && node.array[index & MASK];\n      }\n      return notSetValue;\n    };\n\n    // @pragma Modification\n\n    List.prototype.set = function(index, value) {\n      return updateList(this, index, value);\n    };\n\n    List.prototype.remove = function(index) {\n      return !this.has(index) ? this :\n        index === 0 ? this.shift() :\n        index === this.size - 1 ? this.pop() :\n        this.splice(index, 1);\n    };\n\n    List.prototype.insert = function(index, value) {\n      return this.splice(index, 0, value);\n    };\n\n    List.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = this._origin = this._capacity = 0;\n        this._level = SHIFT;\n        this._root = this._tail = null;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyList();\n    };\n\n    List.prototype.push = function(/*...values*/) {\n      var values = arguments;\n      var oldSize = this.size;\n      return this.withMutations(function(list ) {\n        setListBounds(list, 0, oldSize + values.length);\n        for (var ii = 0; ii < values.length; ii++) {\n          list.set(oldSize + ii, values[ii]);\n        }\n      });\n    };\n\n    List.prototype.pop = function() {\n      return setListBounds(this, 0, -1);\n    };\n\n    List.prototype.unshift = function(/*...values*/) {\n      var values = arguments;\n      return this.withMutations(function(list ) {\n        setListBounds(list, -values.length);\n        for (var ii = 0; ii < values.length; ii++) {\n          list.set(ii, values[ii]);\n        }\n      });\n    };\n\n    List.prototype.shift = function() {\n      return setListBounds(this, 1);\n    };\n\n    // @pragma Composition\n\n    List.prototype.merge = function(/*...iters*/) {\n      return mergeIntoListWith(this, undefined, arguments);\n    };\n\n    List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoListWith(this, merger, iters);\n    };\n\n    List.prototype.mergeDeep = function(/*...iters*/) {\n      return mergeIntoListWith(this, deepMerger, arguments);\n    };\n\n    List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoListWith(this, deepMergerWith(merger), iters);\n    };\n\n    List.prototype.setSize = function(size) {\n      return setListBounds(this, 0, size);\n    };\n\n    // @pragma Iteration\n\n    List.prototype.slice = function(begin, end) {\n      var size = this.size;\n      if (wholeSlice(begin, end, size)) {\n        return this;\n      }\n      return setListBounds(\n        this,\n        resolveBegin(begin, size),\n        resolveEnd(end, size)\n      );\n    };\n\n    List.prototype.__iterator = function(type, reverse) {\n      var index = 0;\n      var values = iterateList(this, reverse);\n      return new Iterator(function()  {\n        var value = values();\n        return value === DONE ?\n          iteratorDone() :\n          iteratorValue(type, index++, value);\n      });\n    };\n\n    List.prototype.__iterate = function(fn, reverse) {\n      var index = 0;\n      var values = iterateList(this, reverse);\n      var value;\n      while ((value = values()) !== DONE) {\n        if (fn(value, index++, this) === false) {\n          break;\n        }\n      }\n      return index;\n    };\n\n    List.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        return this;\n      }\n      return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n    };\n\n\n  function isList(maybeList) {\n    return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n  }\n\n  List.isList = isList;\n\n  var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n  var ListPrototype = List.prototype;\n  ListPrototype[IS_LIST_SENTINEL] = true;\n  ListPrototype[DELETE] = ListPrototype.remove;\n  ListPrototype.setIn = MapPrototype.setIn;\n  ListPrototype.deleteIn =\n  ListPrototype.removeIn = MapPrototype.removeIn;\n  ListPrototype.update = MapPrototype.update;\n  ListPrototype.updateIn = MapPrototype.updateIn;\n  ListPrototype.mergeIn = MapPrototype.mergeIn;\n  ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n  ListPrototype.withMutations = MapPrototype.withMutations;\n  ListPrototype.asMutable = MapPrototype.asMutable;\n  ListPrototype.asImmutable = MapPrototype.asImmutable;\n  ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n    function VNode(array, ownerID) {\n      this.array = array;\n      this.ownerID = ownerID;\n    }\n\n    // TODO: seems like these methods are very similar\n\n    VNode.prototype.removeBefore = function(ownerID, level, index) {\n      if (index === level ? 1 << level :  false || this.array.length === 0) {\n        return this;\n      }\n      var originIndex = (index >>> level) & MASK;\n      if (originIndex >= this.array.length) {\n        return new VNode([], ownerID);\n      }\n      var removingFirst = originIndex === 0;\n      var newChild;\n      if (level > 0) {\n        var oldChild = this.array[originIndex];\n        newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n        if (newChild === oldChild && removingFirst) {\n          return this;\n        }\n      }\n      if (removingFirst && !newChild) {\n        return this;\n      }\n      var editable = editableVNode(this, ownerID);\n      if (!removingFirst) {\n        for (var ii = 0; ii < originIndex; ii++) {\n          editable.array[ii] = undefined;\n        }\n      }\n      if (newChild) {\n        editable.array[originIndex] = newChild;\n      }\n      return editable;\n    };\n\n    VNode.prototype.removeAfter = function(ownerID, level, index) {\n      if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n        return this;\n      }\n      var sizeIndex = ((index - 1) >>> level) & MASK;\n      if (sizeIndex >= this.array.length) {\n        return this;\n      }\n\n      var newChild;\n      if (level > 0) {\n        var oldChild = this.array[sizeIndex];\n        newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n        if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n          return this;\n        }\n      }\n\n      var editable = editableVNode(this, ownerID);\n      editable.array.splice(sizeIndex + 1);\n      if (newChild) {\n        editable.array[sizeIndex] = newChild;\n      }\n      return editable;\n    };\n\n\n\n  var DONE = {};\n\n  function iterateList(list, reverse) {\n    var left = list._origin;\n    var right = list._capacity;\n    var tailPos = getTailOffset(right);\n    var tail = list._tail;\n\n    return iterateNodeOrLeaf(list._root, list._level, 0);\n\n    function iterateNodeOrLeaf(node, level, offset) {\n      return level === 0 ?\n        iterateLeaf(node, offset) :\n        iterateNode(node, level, offset);\n    }\n\n    function iterateLeaf(node, offset) {\n      var array = offset === tailPos ? tail && tail.array : node && node.array;\n      var from = offset > left ? 0 : left - offset;\n      var to = right - offset;\n      if (to > SIZE) {\n        to = SIZE;\n      }\n      return function()  {\n        if (from === to) {\n          return DONE;\n        }\n        var idx = reverse ? --to : from++;\n        return array && array[idx];\n      };\n    }\n\n    function iterateNode(node, level, offset) {\n      var values;\n      var array = node && node.array;\n      var from = offset > left ? 0 : (left - offset) >> level;\n      var to = ((right - offset) >> level) + 1;\n      if (to > SIZE) {\n        to = SIZE;\n      }\n      return function()  {\n        do {\n          if (values) {\n            var value = values();\n            if (value !== DONE) {\n              return value;\n            }\n            values = null;\n          }\n          if (from === to) {\n            return DONE;\n          }\n          var idx = reverse ? --to : from++;\n          values = iterateNodeOrLeaf(\n            array && array[idx], level - SHIFT, offset + (idx << level)\n          );\n        } while (true);\n      };\n    }\n  }\n\n  function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n    var list = Object.create(ListPrototype);\n    list.size = capacity - origin;\n    list._origin = origin;\n    list._capacity = capacity;\n    list._level = level;\n    list._root = root;\n    list._tail = tail;\n    list.__ownerID = ownerID;\n    list.__hash = hash;\n    list.__altered = false;\n    return list;\n  }\n\n  var EMPTY_LIST;\n  function emptyList() {\n    return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n  }\n\n  function updateList(list, index, value) {\n    index = wrapIndex(list, index);\n\n    if (index !== index) {\n      return list;\n    }\n\n    if (index >= list.size || index < 0) {\n      return list.withMutations(function(list ) {\n        index < 0 ?\n          setListBounds(list, index).set(0, value) :\n          setListBounds(list, 0, index + 1).set(index, value)\n      });\n    }\n\n    index += list._origin;\n\n    var newTail = list._tail;\n    var newRoot = list._root;\n    var didAlter = MakeRef(DID_ALTER);\n    if (index >= getTailOffset(list._capacity)) {\n      newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n    } else {\n      newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n    }\n\n    if (!didAlter.value) {\n      return list;\n    }\n\n    if (list.__ownerID) {\n      list._root = newRoot;\n      list._tail = newTail;\n      list.__hash = undefined;\n      list.__altered = true;\n      return list;\n    }\n    return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n  }\n\n  function updateVNode(node, ownerID, level, index, value, didAlter) {\n    var idx = (index >>> level) & MASK;\n    var nodeHas = node && idx < node.array.length;\n    if (!nodeHas && value === undefined) {\n      return node;\n    }\n\n    var newNode;\n\n    if (level > 0) {\n      var lowerNode = node && node.array[idx];\n      var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n      if (newLowerNode === lowerNode) {\n        return node;\n      }\n      newNode = editableVNode(node, ownerID);\n      newNode.array[idx] = newLowerNode;\n      return newNode;\n    }\n\n    if (nodeHas && node.array[idx] === value) {\n      return node;\n    }\n\n    SetRef(didAlter);\n\n    newNode = editableVNode(node, ownerID);\n    if (value === undefined && idx === newNode.array.length - 1) {\n      newNode.array.pop();\n    } else {\n      newNode.array[idx] = value;\n    }\n    return newNode;\n  }\n\n  function editableVNode(node, ownerID) {\n    if (ownerID && node && ownerID === node.ownerID) {\n      return node;\n    }\n    return new VNode(node ? node.array.slice() : [], ownerID);\n  }\n\n  function listNodeFor(list, rawIndex) {\n    if (rawIndex >= getTailOffset(list._capacity)) {\n      return list._tail;\n    }\n    if (rawIndex < 1 << (list._level + SHIFT)) {\n      var node = list._root;\n      var level = list._level;\n      while (node && level > 0) {\n        node = node.array[(rawIndex >>> level) & MASK];\n        level -= SHIFT;\n      }\n      return node;\n    }\n  }\n\n  function setListBounds(list, begin, end) {\n    // Sanitize begin & end using this shorthand for ToInt32(argument)\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n    if (begin !== undefined) {\n      begin = begin | 0;\n    }\n    if (end !== undefined) {\n      end = end | 0;\n    }\n    var owner = list.__ownerID || new OwnerID();\n    var oldOrigin = list._origin;\n    var oldCapacity = list._capacity;\n    var newOrigin = oldOrigin + begin;\n    var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n    if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n      return list;\n    }\n\n    // If it's going to end after it starts, it's empty.\n    if (newOrigin >= newCapacity) {\n      return list.clear();\n    }\n\n    var newLevel = list._level;\n    var newRoot = list._root;\n\n    // New origin might need creating a higher root.\n    var offsetShift = 0;\n    while (newOrigin + offsetShift < 0) {\n      newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n      newLevel += SHIFT;\n      offsetShift += 1 << newLevel;\n    }\n    if (offsetShift) {\n      newOrigin += offsetShift;\n      oldOrigin += offsetShift;\n      newCapacity += offsetShift;\n      oldCapacity += offsetShift;\n    }\n\n    var oldTailOffset = getTailOffset(oldCapacity);\n    var newTailOffset = getTailOffset(newCapacity);\n\n    // New size might need creating a higher root.\n    while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n      newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n      newLevel += SHIFT;\n    }\n\n    // Locate or create the new tail.\n    var oldTail = list._tail;\n    var newTail = newTailOffset < oldTailOffset ?\n      listNodeFor(list, newCapacity - 1) :\n      newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n    // Merge Tail into tree.\n    if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n      newRoot = editableVNode(newRoot, owner);\n      var node = newRoot;\n      for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n        var idx = (oldTailOffset >>> level) & MASK;\n        node = node.array[idx] = editableVNode(node.array[idx], owner);\n      }\n      node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n    }\n\n    // If the size has been reduced, there's a chance the tail needs to be trimmed.\n    if (newCapacity < oldCapacity) {\n      newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n    }\n\n    // If the new origin is within the tail, then we do not need a root.\n    if (newOrigin >= newTailOffset) {\n      newOrigin -= newTailOffset;\n      newCapacity -= newTailOffset;\n      newLevel = SHIFT;\n      newRoot = null;\n      newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n    // Otherwise, if the root has been trimmed, garbage collect.\n    } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n      offsetShift = 0;\n\n      // Identify the new top root node of the subtree of the old root.\n      while (newRoot) {\n        var beginIndex = (newOrigin >>> newLevel) & MASK;\n        if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n          break;\n        }\n        if (beginIndex) {\n          offsetShift += (1 << newLevel) * beginIndex;\n        }\n        newLevel -= SHIFT;\n        newRoot = newRoot.array[beginIndex];\n      }\n\n      // Trim the new sides of the new root.\n      if (newRoot && newOrigin > oldOrigin) {\n        newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n      }\n      if (newRoot && newTailOffset < oldTailOffset) {\n        newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n      }\n      if (offsetShift) {\n        newOrigin -= offsetShift;\n        newCapacity -= offsetShift;\n      }\n    }\n\n    if (list.__ownerID) {\n      list.size = newCapacity - newOrigin;\n      list._origin = newOrigin;\n      list._capacity = newCapacity;\n      list._level = newLevel;\n      list._root = newRoot;\n      list._tail = newTail;\n      list.__hash = undefined;\n      list.__altered = true;\n      return list;\n    }\n    return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n  }\n\n  function mergeIntoListWith(list, merger, iterables) {\n    var iters = [];\n    var maxSize = 0;\n    for (var ii = 0; ii < iterables.length; ii++) {\n      var value = iterables[ii];\n      var iter = IndexedIterable(value);\n      if (iter.size > maxSize) {\n        maxSize = iter.size;\n      }\n      if (!isIterable(value)) {\n        iter = iter.map(function(v ) {return fromJS(v)});\n      }\n      iters.push(iter);\n    }\n    if (maxSize > list.size) {\n      list = list.setSize(maxSize);\n    }\n    return mergeIntoCollectionWith(list, merger, iters);\n  }\n\n  function getTailOffset(size) {\n    return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n  }\n\n  createClass(OrderedMap, Map);\n\n    // @pragma Construction\n\n    function OrderedMap(value) {\n      return value === null || value === undefined ? emptyOrderedMap() :\n        isOrderedMap(value) ? value :\n        emptyOrderedMap().withMutations(function(map ) {\n          var iter = KeyedIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v, k)  {return map.set(k, v)});\n        });\n    }\n\n    OrderedMap.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    OrderedMap.prototype.toString = function() {\n      return this.__toString('OrderedMap {', '}');\n    };\n\n    // @pragma Access\n\n    OrderedMap.prototype.get = function(k, notSetValue) {\n      var index = this._map.get(k);\n      return index !== undefined ? this._list.get(index)[1] : notSetValue;\n    };\n\n    // @pragma Modification\n\n    OrderedMap.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._map.clear();\n        this._list.clear();\n        return this;\n      }\n      return emptyOrderedMap();\n    };\n\n    OrderedMap.prototype.set = function(k, v) {\n      return updateOrderedMap(this, k, v);\n    };\n\n    OrderedMap.prototype.remove = function(k) {\n      return updateOrderedMap(this, k, NOT_SET);\n    };\n\n    OrderedMap.prototype.wasAltered = function() {\n      return this._map.wasAltered() || this._list.wasAltered();\n    };\n\n    OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._list.__iterate(\n        function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n        reverse\n      );\n    };\n\n    OrderedMap.prototype.__iterator = function(type, reverse) {\n      return this._list.fromEntrySeq().__iterator(type, reverse);\n    };\n\n    OrderedMap.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map.__ensureOwner(ownerID);\n      var newList = this._list.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        this._list = newList;\n        return this;\n      }\n      return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n    };\n\n\n  function isOrderedMap(maybeOrderedMap) {\n    return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n  }\n\n  OrderedMap.isOrderedMap = isOrderedMap;\n\n  OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n  OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n  function makeOrderedMap(map, list, ownerID, hash) {\n    var omap = Object.create(OrderedMap.prototype);\n    omap.size = map ? map.size : 0;\n    omap._map = map;\n    omap._list = list;\n    omap.__ownerID = ownerID;\n    omap.__hash = hash;\n    return omap;\n  }\n\n  var EMPTY_ORDERED_MAP;\n  function emptyOrderedMap() {\n    return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n  }\n\n  function updateOrderedMap(omap, k, v) {\n    var map = omap._map;\n    var list = omap._list;\n    var i = map.get(k);\n    var has = i !== undefined;\n    var newMap;\n    var newList;\n    if (v === NOT_SET) { // removed\n      if (!has) {\n        return omap;\n      }\n      if (list.size >= SIZE && list.size >= map.size * 2) {\n        newList = list.filter(function(entry, idx)  {return entry !== undefined && i !== idx});\n        newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n        if (omap.__ownerID) {\n          newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n        }\n      } else {\n        newMap = map.remove(k);\n        newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n      }\n    } else {\n      if (has) {\n        if (v === list.get(i)[1]) {\n          return omap;\n        }\n        newMap = map;\n        newList = list.set(i, [k, v]);\n      } else {\n        newMap = map.set(k, list.size);\n        newList = list.set(list.size, [k, v]);\n      }\n    }\n    if (omap.__ownerID) {\n      omap.size = newMap.size;\n      omap._map = newMap;\n      omap._list = newList;\n      omap.__hash = undefined;\n      return omap;\n    }\n    return makeOrderedMap(newMap, newList);\n  }\n\n  createClass(ToKeyedSequence, KeyedSeq);\n    function ToKeyedSequence(indexed, useKeys) {\n      this._iter = indexed;\n      this._useKeys = useKeys;\n      this.size = indexed.size;\n    }\n\n    ToKeyedSequence.prototype.get = function(key, notSetValue) {\n      return this._iter.get(key, notSetValue);\n    };\n\n    ToKeyedSequence.prototype.has = function(key) {\n      return this._iter.has(key);\n    };\n\n    ToKeyedSequence.prototype.valueSeq = function() {\n      return this._iter.valueSeq();\n    };\n\n    ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n      var reversedSequence = reverseFactory(this, true);\n      if (!this._useKeys) {\n        reversedSequence.valueSeq = function()  {return this$0._iter.toSeq().reverse()};\n      }\n      return reversedSequence;\n    };\n\n    ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n      var mappedSequence = mapFactory(this, mapper, context);\n      if (!this._useKeys) {\n        mappedSequence.valueSeq = function()  {return this$0._iter.toSeq().map(mapper, context)};\n      }\n      return mappedSequence;\n    };\n\n    ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var ii;\n      return this._iter.__iterate(\n        this._useKeys ?\n          function(v, k)  {return fn(v, k, this$0)} :\n          ((ii = reverse ? resolveSize(this) : 0),\n            function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n        reverse\n      );\n    };\n\n    ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n      if (this._useKeys) {\n        return this._iter.__iterator(type, reverse);\n      }\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      var ii = reverse ? resolveSize(this) : 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n      });\n    };\n\n  ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n  createClass(ToIndexedSequence, IndexedSeq);\n    function ToIndexedSequence(iter) {\n      this._iter = iter;\n      this.size = iter.size;\n    }\n\n    ToIndexedSequence.prototype.includes = function(value) {\n      return this._iter.includes(value);\n    };\n\n    ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n    };\n\n    ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, iterations++, step.value, step)\n      });\n    };\n\n\n\n  createClass(ToSetSequence, SetSeq);\n    function ToSetSequence(iter) {\n      this._iter = iter;\n      this.size = iter.size;\n    }\n\n    ToSetSequence.prototype.has = function(key) {\n      return this._iter.includes(key);\n    };\n\n    ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n    };\n\n    ToSetSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, step.value, step.value, step);\n      });\n    };\n\n\n\n  createClass(FromEntriesSequence, KeyedSeq);\n    function FromEntriesSequence(entries) {\n      this._iter = entries;\n      this.size = entries.size;\n    }\n\n    FromEntriesSequence.prototype.entrySeq = function() {\n      return this._iter.toSeq();\n    };\n\n    FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._iter.__iterate(function(entry ) {\n        // Check if entry exists first so array access doesn't throw for holes\n        // in the parent iteration.\n        if (entry) {\n          validateEntry(entry);\n          var indexedIterable = isIterable(entry);\n          return fn(\n            indexedIterable ? entry.get(1) : entry[1],\n            indexedIterable ? entry.get(0) : entry[0],\n            this$0\n          );\n        }\n      }, reverse);\n    };\n\n    FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      return new Iterator(function()  {\n        while (true) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          var entry = step.value;\n          // Check if entry exists first so array access doesn't throw for holes\n          // in the parent iteration.\n          if (entry) {\n            validateEntry(entry);\n            var indexedIterable = isIterable(entry);\n            return iteratorValue(\n              type,\n              indexedIterable ? entry.get(0) : entry[0],\n              indexedIterable ? entry.get(1) : entry[1],\n              step\n            );\n          }\n        }\n      });\n    };\n\n\n  ToIndexedSequence.prototype.cacheResult =\n  ToKeyedSequence.prototype.cacheResult =\n  ToSetSequence.prototype.cacheResult =\n  FromEntriesSequence.prototype.cacheResult =\n    cacheResultThrough;\n\n\n  function flipFactory(iterable) {\n    var flipSequence = makeSequence(iterable);\n    flipSequence._iter = iterable;\n    flipSequence.size = iterable.size;\n    flipSequence.flip = function()  {return iterable};\n    flipSequence.reverse = function () {\n      var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n      reversedSequence.flip = function()  {return iterable.reverse()};\n      return reversedSequence;\n    };\n    flipSequence.has = function(key ) {return iterable.includes(key)};\n    flipSequence.includes = function(key ) {return iterable.has(key)};\n    flipSequence.cacheResult = cacheResultThrough;\n    flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(function(v, k)  {return fn(k, v, this$0) !== false}, reverse);\n    }\n    flipSequence.__iteratorUncached = function(type, reverse) {\n      if (type === ITERATE_ENTRIES) {\n        var iterator = iterable.__iterator(type, reverse);\n        return new Iterator(function()  {\n          var step = iterator.next();\n          if (!step.done) {\n            var k = step.value[0];\n            step.value[0] = step.value[1];\n            step.value[1] = k;\n          }\n          return step;\n        });\n      }\n      return iterable.__iterator(\n        type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n        reverse\n      );\n    }\n    return flipSequence;\n  }\n\n\n  function mapFactory(iterable, mapper, context) {\n    var mappedSequence = makeSequence(iterable);\n    mappedSequence.size = iterable.size;\n    mappedSequence.has = function(key ) {return iterable.has(key)};\n    mappedSequence.get = function(key, notSetValue)  {\n      var v = iterable.get(key, NOT_SET);\n      return v === NOT_SET ?\n        notSetValue :\n        mapper.call(context, v, key, iterable);\n    };\n    mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(\n        function(v, k, c)  {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n        reverse\n      );\n    }\n    mappedSequence.__iteratorUncached = function (type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      return new Iterator(function()  {\n        var step = iterator.next();\n        if (step.done) {\n          return step;\n        }\n        var entry = step.value;\n        var key = entry[0];\n        return iteratorValue(\n          type,\n          key,\n          mapper.call(context, entry[1], key, iterable),\n          step\n        );\n      });\n    }\n    return mappedSequence;\n  }\n\n\n  function reverseFactory(iterable, useKeys) {\n    var reversedSequence = makeSequence(iterable);\n    reversedSequence._iter = iterable;\n    reversedSequence.size = iterable.size;\n    reversedSequence.reverse = function()  {return iterable};\n    if (iterable.flip) {\n      reversedSequence.flip = function () {\n        var flipSequence = flipFactory(iterable);\n        flipSequence.reverse = function()  {return iterable.flip()};\n        return flipSequence;\n      };\n    }\n    reversedSequence.get = function(key, notSetValue) \n      {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n    reversedSequence.has = function(key )\n      {return iterable.has(useKeys ? key : -1 - key)};\n    reversedSequence.includes = function(value ) {return iterable.includes(value)};\n    reversedSequence.cacheResult = cacheResultThrough;\n    reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(function(v, k)  {return fn(v, k, this$0)}, !reverse);\n    };\n    reversedSequence.__iterator =\n      function(type, reverse)  {return iterable.__iterator(type, !reverse)};\n    return reversedSequence;\n  }\n\n\n  function filterFactory(iterable, predicate, context, useKeys) {\n    var filterSequence = makeSequence(iterable);\n    if (useKeys) {\n      filterSequence.has = function(key ) {\n        var v = iterable.get(key, NOT_SET);\n        return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n      };\n      filterSequence.get = function(key, notSetValue)  {\n        var v = iterable.get(key, NOT_SET);\n        return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n          v : notSetValue;\n      };\n    }\n    filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c)  {\n        if (predicate.call(context, v, k, c)) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0);\n        }\n      }, reverse);\n      return iterations;\n    };\n    filterSequence.__iteratorUncached = function (type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (true) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          var entry = step.value;\n          var key = entry[0];\n          var value = entry[1];\n          if (predicate.call(context, value, key, iterable)) {\n            return iteratorValue(type, useKeys ? key : iterations++, value, step);\n          }\n        }\n      });\n    }\n    return filterSequence;\n  }\n\n\n  function countByFactory(iterable, grouper, context) {\n    var groups = Map().asMutable();\n    iterable.__iterate(function(v, k)  {\n      groups.update(\n        grouper.call(context, v, k, iterable),\n        0,\n        function(a ) {return a + 1}\n      );\n    });\n    return groups.asImmutable();\n  }\n\n\n  function groupByFactory(iterable, grouper, context) {\n    var isKeyedIter = isKeyed(iterable);\n    var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n    iterable.__iterate(function(v, k)  {\n      groups.update(\n        grouper.call(context, v, k, iterable),\n        function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n      );\n    });\n    var coerce = iterableClass(iterable);\n    return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n  }\n\n\n  function sliceFactory(iterable, begin, end, useKeys) {\n    var originalSize = iterable.size;\n\n    // Sanitize begin & end using this shorthand for ToInt32(argument)\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n    if (begin !== undefined) {\n      begin = begin | 0;\n    }\n    if (end !== undefined) {\n      if (end === Infinity) {\n        end = originalSize;\n      } else {\n        end = end | 0;\n      }\n    }\n\n    if (wholeSlice(begin, end, originalSize)) {\n      return iterable;\n    }\n\n    var resolvedBegin = resolveBegin(begin, originalSize);\n    var resolvedEnd = resolveEnd(end, originalSize);\n\n    // begin or end will be NaN if they were provided as negative numbers and\n    // this iterable's size is unknown. In that case, cache first so there is\n    // a known size and these do not resolve to NaN.\n    if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n      return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n    }\n\n    // Note: resolvedEnd is undefined when the original sequence's length is\n    // unknown and this slice did not supply an end and should contain all\n    // elements after resolvedBegin.\n    // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n    var resolvedSize = resolvedEnd - resolvedBegin;\n    var sliceSize;\n    if (resolvedSize === resolvedSize) {\n      sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n    }\n\n    var sliceSeq = makeSequence(iterable);\n\n    // If iterable.size is undefined, the size of the realized sliceSeq is\n    // unknown at this point unless the number of items to slice is 0\n    sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n    if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n      sliceSeq.get = function (index, notSetValue) {\n        index = wrapIndex(this, index);\n        return index >= 0 && index < sliceSize ?\n          iterable.get(index + resolvedBegin, notSetValue) :\n          notSetValue;\n      }\n    }\n\n    sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      if (sliceSize === 0) {\n        return 0;\n      }\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var skipped = 0;\n      var isSkipping = true;\n      var iterations = 0;\n      iterable.__iterate(function(v, k)  {\n        if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n                 iterations !== sliceSize;\n        }\n      });\n      return iterations;\n    };\n\n    sliceSeq.__iteratorUncached = function(type, reverse) {\n      if (sliceSize !== 0 && reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      // Don't bother instantiating parent iterator if taking 0.\n      var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n      var skipped = 0;\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (skipped++ < resolvedBegin) {\n          iterator.next();\n        }\n        if (++iterations > sliceSize) {\n          return iteratorDone();\n        }\n        var step = iterator.next();\n        if (useKeys || type === ITERATE_VALUES) {\n          return step;\n        } else if (type === ITERATE_KEYS) {\n          return iteratorValue(type, iterations - 1, undefined, step);\n        } else {\n          return iteratorValue(type, iterations - 1, step.value[1], step);\n        }\n      });\n    }\n\n    return sliceSeq;\n  }\n\n\n  function takeWhileFactory(iterable, predicate, context) {\n    var takeSequence = makeSequence(iterable);\n    takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c) \n        {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n      );\n      return iterations;\n    };\n    takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var iterating = true;\n      return new Iterator(function()  {\n        if (!iterating) {\n          return iteratorDone();\n        }\n        var step = iterator.next();\n        if (step.done) {\n          return step;\n        }\n        var entry = step.value;\n        var k = entry[0];\n        var v = entry[1];\n        if (!predicate.call(context, v, k, this$0)) {\n          iterating = false;\n          return iteratorDone();\n        }\n        return type === ITERATE_ENTRIES ? step :\n          iteratorValue(type, k, v, step);\n      });\n    };\n    return takeSequence;\n  }\n\n\n  function skipWhileFactory(iterable, predicate, context, useKeys) {\n    var skipSequence = makeSequence(iterable);\n    skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var isSkipping = true;\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c)  {\n        if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0);\n        }\n      });\n      return iterations;\n    };\n    skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var skipping = true;\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step, k, v;\n        do {\n          step = iterator.next();\n          if (step.done) {\n            if (useKeys || type === ITERATE_VALUES) {\n              return step;\n            } else if (type === ITERATE_KEYS) {\n              return iteratorValue(type, iterations++, undefined, step);\n            } else {\n              return iteratorValue(type, iterations++, step.value[1], step);\n            }\n          }\n          var entry = step.value;\n          k = entry[0];\n          v = entry[1];\n          skipping && (skipping = predicate.call(context, v, k, this$0));\n        } while (skipping);\n        return type === ITERATE_ENTRIES ? step :\n          iteratorValue(type, k, v, step);\n      });\n    };\n    return skipSequence;\n  }\n\n\n  function concatFactory(iterable, values) {\n    var isKeyedIterable = isKeyed(iterable);\n    var iters = [iterable].concat(values).map(function(v ) {\n      if (!isIterable(v)) {\n        v = isKeyedIterable ?\n          keyedSeqFromValue(v) :\n          indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n      } else if (isKeyedIterable) {\n        v = KeyedIterable(v);\n      }\n      return v;\n    }).filter(function(v ) {return v.size !== 0});\n\n    if (iters.length === 0) {\n      return iterable;\n    }\n\n    if (iters.length === 1) {\n      var singleton = iters[0];\n      if (singleton === iterable ||\n          isKeyedIterable && isKeyed(singleton) ||\n          isIndexed(iterable) && isIndexed(singleton)) {\n        return singleton;\n      }\n    }\n\n    var concatSeq = new ArraySeq(iters);\n    if (isKeyedIterable) {\n      concatSeq = concatSeq.toKeyedSeq();\n    } else if (!isIndexed(iterable)) {\n      concatSeq = concatSeq.toSetSeq();\n    }\n    concatSeq = concatSeq.flatten(true);\n    concatSeq.size = iters.reduce(\n      function(sum, seq)  {\n        if (sum !== undefined) {\n          var size = seq.size;\n          if (size !== undefined) {\n            return sum + size;\n          }\n        }\n      },\n      0\n    );\n    return concatSeq;\n  }\n\n\n  function flattenFactory(iterable, depth, useKeys) {\n    var flatSequence = makeSequence(iterable);\n    flatSequence.__iterateUncached = function(fn, reverse) {\n      var iterations = 0;\n      var stopped = false;\n      function flatDeep(iter, currentDepth) {var this$0 = this;\n        iter.__iterate(function(v, k)  {\n          if ((!depth || currentDepth < depth) && isIterable(v)) {\n            flatDeep(v, currentDepth + 1);\n          } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n            stopped = true;\n          }\n          return !stopped;\n        }, reverse);\n      }\n      flatDeep(iterable, 0);\n      return iterations;\n    }\n    flatSequence.__iteratorUncached = function(type, reverse) {\n      var iterator = iterable.__iterator(type, reverse);\n      var stack = [];\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (iterator) {\n          var step = iterator.next();\n          if (step.done !== false) {\n            iterator = stack.pop();\n            continue;\n          }\n          var v = step.value;\n          if (type === ITERATE_ENTRIES) {\n            v = v[1];\n          }\n          if ((!depth || stack.length < depth) && isIterable(v)) {\n            stack.push(iterator);\n            iterator = v.__iterator(type, reverse);\n          } else {\n            return useKeys ? step : iteratorValue(type, iterations++, v, step);\n          }\n        }\n        return iteratorDone();\n      });\n    }\n    return flatSequence;\n  }\n\n\n  function flatMapFactory(iterable, mapper, context) {\n    var coerce = iterableClass(iterable);\n    return iterable.toSeq().map(\n      function(v, k)  {return coerce(mapper.call(context, v, k, iterable))}\n    ).flatten(true);\n  }\n\n\n  function interposeFactory(iterable, separator) {\n    var interposedSequence = makeSequence(iterable);\n    interposedSequence.size = iterable.size && iterable.size * 2 -1;\n    interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      iterable.__iterate(function(v, k) \n        {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n        fn(v, iterations++, this$0) !== false},\n        reverse\n      );\n      return iterations;\n    };\n    interposedSequence.__iteratorUncached = function(type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n      var iterations = 0;\n      var step;\n      return new Iterator(function()  {\n        if (!step || iterations % 2) {\n          step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n        }\n        return iterations % 2 ?\n          iteratorValue(type, iterations++, separator) :\n          iteratorValue(type, iterations++, step.value, step);\n      });\n    };\n    return interposedSequence;\n  }\n\n\n  function sortFactory(iterable, comparator, mapper) {\n    if (!comparator) {\n      comparator = defaultComparator;\n    }\n    var isKeyedIterable = isKeyed(iterable);\n    var index = 0;\n    var entries = iterable.toSeq().map(\n      function(v, k)  {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n    ).toArray();\n    entries.sort(function(a, b)  {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n      isKeyedIterable ?\n      function(v, i)  { entries[i].length = 2; } :\n      function(v, i)  { entries[i] = v[1]; }\n    );\n    return isKeyedIterable ? KeyedSeq(entries) :\n      isIndexed(iterable) ? IndexedSeq(entries) :\n      SetSeq(entries);\n  }\n\n\n  function maxFactory(iterable, comparator, mapper) {\n    if (!comparator) {\n      comparator = defaultComparator;\n    }\n    if (mapper) {\n      var entry = iterable.toSeq()\n        .map(function(v, k)  {return [v, mapper(v, k, iterable)]})\n        .reduce(function(a, b)  {return maxCompare(comparator, a[1], b[1]) ? b : a});\n      return entry && entry[0];\n    } else {\n      return iterable.reduce(function(a, b)  {return maxCompare(comparator, a, b) ? b : a});\n    }\n  }\n\n  function maxCompare(comparator, a, b) {\n    var comp = comparator(b, a);\n    // b is considered the new max if the comparator declares them equal, but\n    // they are not equal and b is in fact a nullish value.\n    return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n  }\n\n\n  function zipWithFactory(keyIter, zipper, iters) {\n    var zipSequence = makeSequence(keyIter);\n    zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n    // Note: this a generic base implementation of __iterate in terms of\n    // __iterator which may be more generically useful in the future.\n    zipSequence.__iterate = function(fn, reverse) {\n      /* generic:\n      var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n      var step;\n      var iterations = 0;\n      while (!(step = iterator.next()).done) {\n        iterations++;\n        if (fn(step.value[1], step.value[0], this) === false) {\n          break;\n        }\n      }\n      return iterations;\n      */\n      // indexed:\n      var iterator = this.__iterator(ITERATE_VALUES, reverse);\n      var step;\n      var iterations = 0;\n      while (!(step = iterator.next()).done) {\n        if (fn(step.value, iterations++, this) === false) {\n          break;\n        }\n      }\n      return iterations;\n    };\n    zipSequence.__iteratorUncached = function(type, reverse) {\n      var iterators = iters.map(function(i )\n        {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n      );\n      var iterations = 0;\n      var isDone = false;\n      return new Iterator(function()  {\n        var steps;\n        if (!isDone) {\n          steps = iterators.map(function(i ) {return i.next()});\n          isDone = steps.some(function(s ) {return s.done});\n        }\n        if (isDone) {\n          return iteratorDone();\n        }\n        return iteratorValue(\n          type,\n          iterations++,\n          zipper.apply(null, steps.map(function(s ) {return s.value}))\n        );\n      });\n    };\n    return zipSequence\n  }\n\n\n  // #pragma Helper Functions\n\n  function reify(iter, seq) {\n    return isSeq(iter) ? seq : iter.constructor(seq);\n  }\n\n  function validateEntry(entry) {\n    if (entry !== Object(entry)) {\n      throw new TypeError('Expected [K, V] tuple: ' + entry);\n    }\n  }\n\n  function resolveSize(iter) {\n    assertNotInfinite(iter.size);\n    return ensureSize(iter);\n  }\n\n  function iterableClass(iterable) {\n    return isKeyed(iterable) ? KeyedIterable :\n      isIndexed(iterable) ? IndexedIterable :\n      SetIterable;\n  }\n\n  function makeSequence(iterable) {\n    return Object.create(\n      (\n        isKeyed(iterable) ? KeyedSeq :\n        isIndexed(iterable) ? IndexedSeq :\n        SetSeq\n      ).prototype\n    );\n  }\n\n  function cacheResultThrough() {\n    if (this._iter.cacheResult) {\n      this._iter.cacheResult();\n      this.size = this._iter.size;\n      return this;\n    } else {\n      return Seq.prototype.cacheResult.call(this);\n    }\n  }\n\n  function defaultComparator(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n  }\n\n  function forceIterator(keyPath) {\n    var iter = getIterator(keyPath);\n    if (!iter) {\n      // Array might not be iterable in this environment, so we need a fallback\n      // to our wrapped type.\n      if (!isArrayLike(keyPath)) {\n        throw new TypeError('Expected iterable or array-like: ' + keyPath);\n      }\n      iter = getIterator(Iterable(keyPath));\n    }\n    return iter;\n  }\n\n  createClass(Record, KeyedCollection);\n\n    function Record(defaultValues, name) {\n      var hasInitialized;\n\n      var RecordType = function Record(values) {\n        if (values instanceof RecordType) {\n          return values;\n        }\n        if (!(this instanceof RecordType)) {\n          return new RecordType(values);\n        }\n        if (!hasInitialized) {\n          hasInitialized = true;\n          var keys = Object.keys(defaultValues);\n          setProps(RecordTypePrototype, keys);\n          RecordTypePrototype.size = keys.length;\n          RecordTypePrototype._name = name;\n          RecordTypePrototype._keys = keys;\n          RecordTypePrototype._defaultValues = defaultValues;\n        }\n        this._map = Map(values);\n      };\n\n      var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n      RecordTypePrototype.constructor = RecordType;\n\n      return RecordType;\n    }\n\n    Record.prototype.toString = function() {\n      return this.__toString(recordName(this) + ' {', '}');\n    };\n\n    // @pragma Access\n\n    Record.prototype.has = function(k) {\n      return this._defaultValues.hasOwnProperty(k);\n    };\n\n    Record.prototype.get = function(k, notSetValue) {\n      if (!this.has(k)) {\n        return notSetValue;\n      }\n      var defaultVal = this._defaultValues[k];\n      return this._map ? this._map.get(k, defaultVal) : defaultVal;\n    };\n\n    // @pragma Modification\n\n    Record.prototype.clear = function() {\n      if (this.__ownerID) {\n        this._map && this._map.clear();\n        return this;\n      }\n      var RecordType = this.constructor;\n      return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n    };\n\n    Record.prototype.set = function(k, v) {\n      if (!this.has(k)) {\n        throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n      }\n      if (this._map && !this._map.has(k)) {\n        var defaultVal = this._defaultValues[k];\n        if (v === defaultVal) {\n          return this;\n        }\n      }\n      var newMap = this._map && this._map.set(k, v);\n      if (this.__ownerID || newMap === this._map) {\n        return this;\n      }\n      return makeRecord(this, newMap);\n    };\n\n    Record.prototype.remove = function(k) {\n      if (!this.has(k)) {\n        return this;\n      }\n      var newMap = this._map && this._map.remove(k);\n      if (this.__ownerID || newMap === this._map) {\n        return this;\n      }\n      return makeRecord(this, newMap);\n    };\n\n    Record.prototype.wasAltered = function() {\n      return this._map.wasAltered();\n    };\n\n    Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterator(type, reverse);\n    };\n\n    Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterate(fn, reverse);\n    };\n\n    Record.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map && this._map.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        return this;\n      }\n      return makeRecord(this, newMap, ownerID);\n    };\n\n\n  var RecordPrototype = Record.prototype;\n  RecordPrototype[DELETE] = RecordPrototype.remove;\n  RecordPrototype.deleteIn =\n  RecordPrototype.removeIn = MapPrototype.removeIn;\n  RecordPrototype.merge = MapPrototype.merge;\n  RecordPrototype.mergeWith = MapPrototype.mergeWith;\n  RecordPrototype.mergeIn = MapPrototype.mergeIn;\n  RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n  RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n  RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n  RecordPrototype.setIn = MapPrototype.setIn;\n  RecordPrototype.update = MapPrototype.update;\n  RecordPrototype.updateIn = MapPrototype.updateIn;\n  RecordPrototype.withMutations = MapPrototype.withMutations;\n  RecordPrototype.asMutable = MapPrototype.asMutable;\n  RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n  function makeRecord(likeRecord, map, ownerID) {\n    var record = Object.create(Object.getPrototypeOf(likeRecord));\n    record._map = map;\n    record.__ownerID = ownerID;\n    return record;\n  }\n\n  function recordName(record) {\n    return record._name || record.constructor.name || 'Record';\n  }\n\n  function setProps(prototype, names) {\n    try {\n      names.forEach(setProp.bind(undefined, prototype));\n    } catch (error) {\n      // Object.defineProperty failed. Probably IE8.\n    }\n  }\n\n  function setProp(prototype, name) {\n    Object.defineProperty(prototype, name, {\n      get: function() {\n        return this.get(name);\n      },\n      set: function(value) {\n        invariant(this.__ownerID, 'Cannot set on an immutable record.');\n        this.set(name, value);\n      }\n    });\n  }\n\n  createClass(Set, SetCollection);\n\n    // @pragma Construction\n\n    function Set(value) {\n      return value === null || value === undefined ? emptySet() :\n        isSet(value) && !isOrdered(value) ? value :\n        emptySet().withMutations(function(set ) {\n          var iter = SetIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v ) {return set.add(v)});\n        });\n    }\n\n    Set.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    Set.fromKeys = function(value) {\n      return this(KeyedIterable(value).keySeq());\n    };\n\n    Set.prototype.toString = function() {\n      return this.__toString('Set {', '}');\n    };\n\n    // @pragma Access\n\n    Set.prototype.has = function(value) {\n      return this._map.has(value);\n    };\n\n    // @pragma Modification\n\n    Set.prototype.add = function(value) {\n      return updateSet(this, this._map.set(value, true));\n    };\n\n    Set.prototype.remove = function(value) {\n      return updateSet(this, this._map.remove(value));\n    };\n\n    Set.prototype.clear = function() {\n      return updateSet(this, this._map.clear());\n    };\n\n    // @pragma Composition\n\n    Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n      iters = iters.filter(function(x ) {return x.size !== 0});\n      if (iters.length === 0) {\n        return this;\n      }\n      if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n        return this.constructor(iters[0]);\n      }\n      return this.withMutations(function(set ) {\n        for (var ii = 0; ii < iters.length; ii++) {\n          SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n        }\n      });\n    };\n\n    Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n      if (iters.length === 0) {\n        return this;\n      }\n      iters = iters.map(function(iter ) {return SetIterable(iter)});\n      var originalSet = this;\n      return this.withMutations(function(set ) {\n        originalSet.forEach(function(value ) {\n          if (!iters.every(function(iter ) {return iter.includes(value)})) {\n            set.remove(value);\n          }\n        });\n      });\n    };\n\n    Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n      if (iters.length === 0) {\n        return this;\n      }\n      iters = iters.map(function(iter ) {return SetIterable(iter)});\n      var originalSet = this;\n      return this.withMutations(function(set ) {\n        originalSet.forEach(function(value ) {\n          if (iters.some(function(iter ) {return iter.includes(value)})) {\n            set.remove(value);\n          }\n        });\n      });\n    };\n\n    Set.prototype.merge = function() {\n      return this.union.apply(this, arguments);\n    };\n\n    Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return this.union.apply(this, iters);\n    };\n\n    Set.prototype.sort = function(comparator) {\n      // Late binding\n      return OrderedSet(sortFactory(this, comparator));\n    };\n\n    Set.prototype.sortBy = function(mapper, comparator) {\n      // Late binding\n      return OrderedSet(sortFactory(this, comparator, mapper));\n    };\n\n    Set.prototype.wasAltered = function() {\n      return this._map.wasAltered();\n    };\n\n    Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._map.__iterate(function(_, k)  {return fn(k, k, this$0)}, reverse);\n    };\n\n    Set.prototype.__iterator = function(type, reverse) {\n      return this._map.map(function(_, k)  {return k}).__iterator(type, reverse);\n    };\n\n    Set.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        return this;\n      }\n      return this.__make(newMap, ownerID);\n    };\n\n\n  function isSet(maybeSet) {\n    return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n  }\n\n  Set.isSet = isSet;\n\n  var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n  var SetPrototype = Set.prototype;\n  SetPrototype[IS_SET_SENTINEL] = true;\n  SetPrototype[DELETE] = SetPrototype.remove;\n  SetPrototype.mergeDeep = SetPrototype.merge;\n  SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n  SetPrototype.withMutations = MapPrototype.withMutations;\n  SetPrototype.asMutable = MapPrototype.asMutable;\n  SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n  SetPrototype.__empty = emptySet;\n  SetPrototype.__make = makeSet;\n\n  function updateSet(set, newMap) {\n    if (set.__ownerID) {\n      set.size = newMap.size;\n      set._map = newMap;\n      return set;\n    }\n    return newMap === set._map ? set :\n      newMap.size === 0 ? set.__empty() :\n      set.__make(newMap);\n  }\n\n  function makeSet(map, ownerID) {\n    var set = Object.create(SetPrototype);\n    set.size = map ? map.size : 0;\n    set._map = map;\n    set.__ownerID = ownerID;\n    return set;\n  }\n\n  var EMPTY_SET;\n  function emptySet() {\n    return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n  }\n\n  createClass(OrderedSet, Set);\n\n    // @pragma Construction\n\n    function OrderedSet(value) {\n      return value === null || value === undefined ? emptyOrderedSet() :\n        isOrderedSet(value) ? value :\n        emptyOrderedSet().withMutations(function(set ) {\n          var iter = SetIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v ) {return set.add(v)});\n        });\n    }\n\n    OrderedSet.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    OrderedSet.fromKeys = function(value) {\n      return this(KeyedIterable(value).keySeq());\n    };\n\n    OrderedSet.prototype.toString = function() {\n      return this.__toString('OrderedSet {', '}');\n    };\n\n\n  function isOrderedSet(maybeOrderedSet) {\n    return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n  }\n\n  OrderedSet.isOrderedSet = isOrderedSet;\n\n  var OrderedSetPrototype = OrderedSet.prototype;\n  OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n  OrderedSetPrototype.__empty = emptyOrderedSet;\n  OrderedSetPrototype.__make = makeOrderedSet;\n\n  function makeOrderedSet(map, ownerID) {\n    var set = Object.create(OrderedSetPrototype);\n    set.size = map ? map.size : 0;\n    set._map = map;\n    set.__ownerID = ownerID;\n    return set;\n  }\n\n  var EMPTY_ORDERED_SET;\n  function emptyOrderedSet() {\n    return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n  }\n\n  createClass(Stack, IndexedCollection);\n\n    // @pragma Construction\n\n    function Stack(value) {\n      return value === null || value === undefined ? emptyStack() :\n        isStack(value) ? value :\n        emptyStack().unshiftAll(value);\n    }\n\n    Stack.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    Stack.prototype.toString = function() {\n      return this.__toString('Stack [', ']');\n    };\n\n    // @pragma Access\n\n    Stack.prototype.get = function(index, notSetValue) {\n      var head = this._head;\n      index = wrapIndex(this, index);\n      while (head && index--) {\n        head = head.next;\n      }\n      return head ? head.value : notSetValue;\n    };\n\n    Stack.prototype.peek = function() {\n      return this._head && this._head.value;\n    };\n\n    // @pragma Modification\n\n    Stack.prototype.push = function(/*...values*/) {\n      if (arguments.length === 0) {\n        return this;\n      }\n      var newSize = this.size + arguments.length;\n      var head = this._head;\n      for (var ii = arguments.length - 1; ii >= 0; ii--) {\n        head = {\n          value: arguments[ii],\n          next: head\n        };\n      }\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    Stack.prototype.pushAll = function(iter) {\n      iter = IndexedIterable(iter);\n      if (iter.size === 0) {\n        return this;\n      }\n      assertNotInfinite(iter.size);\n      var newSize = this.size;\n      var head = this._head;\n      iter.reverse().forEach(function(value ) {\n        newSize++;\n        head = {\n          value: value,\n          next: head\n        };\n      });\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    Stack.prototype.pop = function() {\n      return this.slice(1);\n    };\n\n    Stack.prototype.unshift = function(/*...values*/) {\n      return this.push.apply(this, arguments);\n    };\n\n    Stack.prototype.unshiftAll = function(iter) {\n      return this.pushAll(iter);\n    };\n\n    Stack.prototype.shift = function() {\n      return this.pop.apply(this, arguments);\n    };\n\n    Stack.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._head = undefined;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyStack();\n    };\n\n    Stack.prototype.slice = function(begin, end) {\n      if (wholeSlice(begin, end, this.size)) {\n        return this;\n      }\n      var resolvedBegin = resolveBegin(begin, this.size);\n      var resolvedEnd = resolveEnd(end, this.size);\n      if (resolvedEnd !== this.size) {\n        // super.slice(begin, end);\n        return IndexedCollection.prototype.slice.call(this, begin, end);\n      }\n      var newSize = this.size - resolvedBegin;\n      var head = this._head;\n      while (resolvedBegin--) {\n        head = head.next;\n      }\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    // @pragma Mutability\n\n    Stack.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this.__altered = false;\n        return this;\n      }\n      return makeStack(this.size, this._head, ownerID, this.__hash);\n    };\n\n    // @pragma Iteration\n\n    Stack.prototype.__iterate = function(fn, reverse) {\n      if (reverse) {\n        return this.reverse().__iterate(fn);\n      }\n      var iterations = 0;\n      var node = this._head;\n      while (node) {\n        if (fn(node.value, iterations++, this) === false) {\n          break;\n        }\n        node = node.next;\n      }\n      return iterations;\n    };\n\n    Stack.prototype.__iterator = function(type, reverse) {\n      if (reverse) {\n        return this.reverse().__iterator(type);\n      }\n      var iterations = 0;\n      var node = this._head;\n      return new Iterator(function()  {\n        if (node) {\n          var value = node.value;\n          node = node.next;\n          return iteratorValue(type, iterations++, value);\n        }\n        return iteratorDone();\n      });\n    };\n\n\n  function isStack(maybeStack) {\n    return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n  }\n\n  Stack.isStack = isStack;\n\n  var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n  var StackPrototype = Stack.prototype;\n  StackPrototype[IS_STACK_SENTINEL] = true;\n  StackPrototype.withMutations = MapPrototype.withMutations;\n  StackPrototype.asMutable = MapPrototype.asMutable;\n  StackPrototype.asImmutable = MapPrototype.asImmutable;\n  StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n  function makeStack(size, head, ownerID, hash) {\n    var map = Object.create(StackPrototype);\n    map.size = size;\n    map._head = head;\n    map.__ownerID = ownerID;\n    map.__hash = hash;\n    map.__altered = false;\n    return map;\n  }\n\n  var EMPTY_STACK;\n  function emptyStack() {\n    return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n  }\n\n  /**\n   * Contributes additional methods to a constructor\n   */\n  function mixin(ctor, methods) {\n    var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n    Object.keys(methods).forEach(keyCopier);\n    Object.getOwnPropertySymbols &&\n      Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n    return ctor;\n  }\n\n  Iterable.Iterator = Iterator;\n\n  mixin(Iterable, {\n\n    // ### Conversion to other types\n\n    toArray: function() {\n      assertNotInfinite(this.size);\n      var array = new Array(this.size || 0);\n      this.valueSeq().__iterate(function(v, i)  { array[i] = v; });\n      return array;\n    },\n\n    toIndexedSeq: function() {\n      return new ToIndexedSequence(this);\n    },\n\n    toJS: function() {\n      return this.toSeq().map(\n        function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n      ).__toJS();\n    },\n\n    toJSON: function() {\n      return this.toSeq().map(\n        function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n      ).__toJS();\n    },\n\n    toKeyedSeq: function() {\n      return new ToKeyedSequence(this, true);\n    },\n\n    toMap: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Map(this.toKeyedSeq());\n    },\n\n    toObject: function() {\n      assertNotInfinite(this.size);\n      var object = {};\n      this.__iterate(function(v, k)  { object[k] = v; });\n      return object;\n    },\n\n    toOrderedMap: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return OrderedMap(this.toKeyedSeq());\n    },\n\n    toOrderedSet: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toSet: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Set(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toSetSeq: function() {\n      return new ToSetSequence(this);\n    },\n\n    toSeq: function() {\n      return isIndexed(this) ? this.toIndexedSeq() :\n        isKeyed(this) ? this.toKeyedSeq() :\n        this.toSetSeq();\n    },\n\n    toStack: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Stack(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toList: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return List(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n\n    // ### Common JavaScript methods and properties\n\n    toString: function() {\n      return '[Iterable]';\n    },\n\n    __toString: function(head, tail) {\n      if (this.size === 0) {\n        return head + tail;\n      }\n      return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n    },\n\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    concat: function() {var values = SLICE$0.call(arguments, 0);\n      return reify(this, concatFactory(this, values));\n    },\n\n    includes: function(searchValue) {\n      return this.some(function(value ) {return is(value, searchValue)});\n    },\n\n    entries: function() {\n      return this.__iterator(ITERATE_ENTRIES);\n    },\n\n    every: function(predicate, context) {\n      assertNotInfinite(this.size);\n      var returnValue = true;\n      this.__iterate(function(v, k, c)  {\n        if (!predicate.call(context, v, k, c)) {\n          returnValue = false;\n          return false;\n        }\n      });\n      return returnValue;\n    },\n\n    filter: function(predicate, context) {\n      return reify(this, filterFactory(this, predicate, context, true));\n    },\n\n    find: function(predicate, context, notSetValue) {\n      var entry = this.findEntry(predicate, context);\n      return entry ? entry[1] : notSetValue;\n    },\n\n    forEach: function(sideEffect, context) {\n      assertNotInfinite(this.size);\n      return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n    },\n\n    join: function(separator) {\n      assertNotInfinite(this.size);\n      separator = separator !== undefined ? '' + separator : ',';\n      var joined = '';\n      var isFirst = true;\n      this.__iterate(function(v ) {\n        isFirst ? (isFirst = false) : (joined += separator);\n        joined += v !== null && v !== undefined ? v.toString() : '';\n      });\n      return joined;\n    },\n\n    keys: function() {\n      return this.__iterator(ITERATE_KEYS);\n    },\n\n    map: function(mapper, context) {\n      return reify(this, mapFactory(this, mapper, context));\n    },\n\n    reduce: function(reducer, initialReduction, context) {\n      assertNotInfinite(this.size);\n      var reduction;\n      var useFirst;\n      if (arguments.length < 2) {\n        useFirst = true;\n      } else {\n        reduction = initialReduction;\n      }\n      this.__iterate(function(v, k, c)  {\n        if (useFirst) {\n          useFirst = false;\n          reduction = v;\n        } else {\n          reduction = reducer.call(context, reduction, v, k, c);\n        }\n      });\n      return reduction;\n    },\n\n    reduceRight: function(reducer, initialReduction, context) {\n      var reversed = this.toKeyedSeq().reverse();\n      return reversed.reduce.apply(reversed, arguments);\n    },\n\n    reverse: function() {\n      return reify(this, reverseFactory(this, true));\n    },\n\n    slice: function(begin, end) {\n      return reify(this, sliceFactory(this, begin, end, true));\n    },\n\n    some: function(predicate, context) {\n      return !this.every(not(predicate), context);\n    },\n\n    sort: function(comparator) {\n      return reify(this, sortFactory(this, comparator));\n    },\n\n    values: function() {\n      return this.__iterator(ITERATE_VALUES);\n    },\n\n\n    // ### More sequential methods\n\n    butLast: function() {\n      return this.slice(0, -1);\n    },\n\n    isEmpty: function() {\n      return this.size !== undefined ? this.size === 0 : !this.some(function()  {return true});\n    },\n\n    count: function(predicate, context) {\n      return ensureSize(\n        predicate ? this.toSeq().filter(predicate, context) : this\n      );\n    },\n\n    countBy: function(grouper, context) {\n      return countByFactory(this, grouper, context);\n    },\n\n    equals: function(other) {\n      return deepEqual(this, other);\n    },\n\n    entrySeq: function() {\n      var iterable = this;\n      if (iterable._cache) {\n        // We cache as an entries array, so we can just return the cache!\n        return new ArraySeq(iterable._cache);\n      }\n      var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n      entriesSequence.fromEntrySeq = function()  {return iterable.toSeq()};\n      return entriesSequence;\n    },\n\n    filterNot: function(predicate, context) {\n      return this.filter(not(predicate), context);\n    },\n\n    findEntry: function(predicate, context, notSetValue) {\n      var found = notSetValue;\n      this.__iterate(function(v, k, c)  {\n        if (predicate.call(context, v, k, c)) {\n          found = [k, v];\n          return false;\n        }\n      });\n      return found;\n    },\n\n    findKey: function(predicate, context) {\n      var entry = this.findEntry(predicate, context);\n      return entry && entry[0];\n    },\n\n    findLast: function(predicate, context, notSetValue) {\n      return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n    },\n\n    findLastEntry: function(predicate, context, notSetValue) {\n      return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n    },\n\n    findLastKey: function(predicate, context) {\n      return this.toKeyedSeq().reverse().findKey(predicate, context);\n    },\n\n    first: function() {\n      return this.find(returnTrue);\n    },\n\n    flatMap: function(mapper, context) {\n      return reify(this, flatMapFactory(this, mapper, context));\n    },\n\n    flatten: function(depth) {\n      return reify(this, flattenFactory(this, depth, true));\n    },\n\n    fromEntrySeq: function() {\n      return new FromEntriesSequence(this);\n    },\n\n    get: function(searchKey, notSetValue) {\n      return this.find(function(_, key)  {return is(key, searchKey)}, undefined, notSetValue);\n    },\n\n    getIn: function(searchKeyPath, notSetValue) {\n      var nested = this;\n      // Note: in an ES6 environment, we would prefer:\n      // for (var key of searchKeyPath) {\n      var iter = forceIterator(searchKeyPath);\n      var step;\n      while (!(step = iter.next()).done) {\n        var key = step.value;\n        nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n        if (nested === NOT_SET) {\n          return notSetValue;\n        }\n      }\n      return nested;\n    },\n\n    groupBy: function(grouper, context) {\n      return groupByFactory(this, grouper, context);\n    },\n\n    has: function(searchKey) {\n      return this.get(searchKey, NOT_SET) !== NOT_SET;\n    },\n\n    hasIn: function(searchKeyPath) {\n      return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n    },\n\n    isSubset: function(iter) {\n      iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n      return this.every(function(value ) {return iter.includes(value)});\n    },\n\n    isSuperset: function(iter) {\n      iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n      return iter.isSubset(this);\n    },\n\n    keyOf: function(searchValue) {\n      return this.findKey(function(value ) {return is(value, searchValue)});\n    },\n\n    keySeq: function() {\n      return this.toSeq().map(keyMapper).toIndexedSeq();\n    },\n\n    last: function() {\n      return this.toSeq().reverse().first();\n    },\n\n    lastKeyOf: function(searchValue) {\n      return this.toKeyedSeq().reverse().keyOf(searchValue);\n    },\n\n    max: function(comparator) {\n      return maxFactory(this, comparator);\n    },\n\n    maxBy: function(mapper, comparator) {\n      return maxFactory(this, comparator, mapper);\n    },\n\n    min: function(comparator) {\n      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n    },\n\n    minBy: function(mapper, comparator) {\n      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n    },\n\n    rest: function() {\n      return this.slice(1);\n    },\n\n    skip: function(amount) {\n      return this.slice(Math.max(0, amount));\n    },\n\n    skipLast: function(amount) {\n      return reify(this, this.toSeq().reverse().skip(amount).reverse());\n    },\n\n    skipWhile: function(predicate, context) {\n      return reify(this, skipWhileFactory(this, predicate, context, true));\n    },\n\n    skipUntil: function(predicate, context) {\n      return this.skipWhile(not(predicate), context);\n    },\n\n    sortBy: function(mapper, comparator) {\n      return reify(this, sortFactory(this, comparator, mapper));\n    },\n\n    take: function(amount) {\n      return this.slice(0, Math.max(0, amount));\n    },\n\n    takeLast: function(amount) {\n      return reify(this, this.toSeq().reverse().take(amount).reverse());\n    },\n\n    takeWhile: function(predicate, context) {\n      return reify(this, takeWhileFactory(this, predicate, context));\n    },\n\n    takeUntil: function(predicate, context) {\n      return this.takeWhile(not(predicate), context);\n    },\n\n    valueSeq: function() {\n      return this.toIndexedSeq();\n    },\n\n\n    // ### Hashable Object\n\n    hashCode: function() {\n      return this.__hash || (this.__hash = hashIterable(this));\n    }\n\n\n    // ### Internal\n\n    // abstract __iterate(fn, reverse)\n\n    // abstract __iterator(type, reverse)\n  });\n\n  // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n  // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n  // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n  // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n  var IterablePrototype = Iterable.prototype;\n  IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n  IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n  IterablePrototype.__toJS = IterablePrototype.toArray;\n  IterablePrototype.__toStringMapper = quoteString;\n  IterablePrototype.inspect =\n  IterablePrototype.toSource = function() { return this.toString(); };\n  IterablePrototype.chain = IterablePrototype.flatMap;\n  IterablePrototype.contains = IterablePrototype.includes;\n\n  mixin(KeyedIterable, {\n\n    // ### More sequential methods\n\n    flip: function() {\n      return reify(this, flipFactory(this));\n    },\n\n    mapEntries: function(mapper, context) {var this$0 = this;\n      var iterations = 0;\n      return reify(this,\n        this.toSeq().map(\n          function(v, k)  {return mapper.call(context, [k, v], iterations++, this$0)}\n        ).fromEntrySeq()\n      );\n    },\n\n    mapKeys: function(mapper, context) {var this$0 = this;\n      return reify(this,\n        this.toSeq().flip().map(\n          function(k, v)  {return mapper.call(context, k, v, this$0)}\n        ).flip()\n      );\n    }\n\n  });\n\n  var KeyedIterablePrototype = KeyedIterable.prototype;\n  KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n  KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n  KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n  KeyedIterablePrototype.__toStringMapper = function(v, k)  {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n  mixin(IndexedIterable, {\n\n    // ### Conversion to other types\n\n    toKeyedSeq: function() {\n      return new ToKeyedSequence(this, false);\n    },\n\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    filter: function(predicate, context) {\n      return reify(this, filterFactory(this, predicate, context, false));\n    },\n\n    findIndex: function(predicate, context) {\n      var entry = this.findEntry(predicate, context);\n      return entry ? entry[0] : -1;\n    },\n\n    indexOf: function(searchValue) {\n      var key = this.keyOf(searchValue);\n      return key === undefined ? -1 : key;\n    },\n\n    lastIndexOf: function(searchValue) {\n      var key = this.lastKeyOf(searchValue);\n      return key === undefined ? -1 : key;\n    },\n\n    reverse: function() {\n      return reify(this, reverseFactory(this, false));\n    },\n\n    slice: function(begin, end) {\n      return reify(this, sliceFactory(this, begin, end, false));\n    },\n\n    splice: function(index, removeNum /*, ...values*/) {\n      var numArgs = arguments.length;\n      removeNum = Math.max(removeNum | 0, 0);\n      if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n        return this;\n      }\n      // If index is negative, it should resolve relative to the size of the\n      // collection. However size may be expensive to compute if not cached, so\n      // only call count() if the number is in fact negative.\n      index = resolveBegin(index, index < 0 ? this.count() : this.size);\n      var spliced = this.slice(0, index);\n      return reify(\n        this,\n        numArgs === 1 ?\n          spliced :\n          spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n      );\n    },\n\n\n    // ### More collection methods\n\n    findLastIndex: function(predicate, context) {\n      var entry = this.findLastEntry(predicate, context);\n      return entry ? entry[0] : -1;\n    },\n\n    first: function() {\n      return this.get(0);\n    },\n\n    flatten: function(depth) {\n      return reify(this, flattenFactory(this, depth, false));\n    },\n\n    get: function(index, notSetValue) {\n      index = wrapIndex(this, index);\n      return (index < 0 || (this.size === Infinity ||\n          (this.size !== undefined && index > this.size))) ?\n        notSetValue :\n        this.find(function(_, key)  {return key === index}, undefined, notSetValue);\n    },\n\n    has: function(index) {\n      index = wrapIndex(this, index);\n      return index >= 0 && (this.size !== undefined ?\n        this.size === Infinity || index < this.size :\n        this.indexOf(index) !== -1\n      );\n    },\n\n    interpose: function(separator) {\n      return reify(this, interposeFactory(this, separator));\n    },\n\n    interleave: function(/*...iterables*/) {\n      var iterables = [this].concat(arrCopy(arguments));\n      var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n      var interleaved = zipped.flatten(true);\n      if (zipped.size) {\n        interleaved.size = zipped.size * iterables.length;\n      }\n      return reify(this, interleaved);\n    },\n\n    keySeq: function() {\n      return Range(0, this.size);\n    },\n\n    last: function() {\n      return this.get(-1);\n    },\n\n    skipWhile: function(predicate, context) {\n      return reify(this, skipWhileFactory(this, predicate, context, false));\n    },\n\n    zip: function(/*, ...iterables */) {\n      var iterables = [this].concat(arrCopy(arguments));\n      return reify(this, zipWithFactory(this, defaultZipper, iterables));\n    },\n\n    zipWith: function(zipper/*, ...iterables */) {\n      var iterables = arrCopy(arguments);\n      iterables[0] = this;\n      return reify(this, zipWithFactory(this, zipper, iterables));\n    }\n\n  });\n\n  IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n  IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n  mixin(SetIterable, {\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    get: function(value, notSetValue) {\n      return this.has(value) ? value : notSetValue;\n    },\n\n    includes: function(value) {\n      return this.has(value);\n    },\n\n\n    // ### More sequential methods\n\n    keySeq: function() {\n      return this.valueSeq();\n    }\n\n  });\n\n  SetIterable.prototype.has = IterablePrototype.includes;\n  SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n\n  // Mixin subclasses\n\n  mixin(KeyedSeq, KeyedIterable.prototype);\n  mixin(IndexedSeq, IndexedIterable.prototype);\n  mixin(SetSeq, SetIterable.prototype);\n\n  mixin(KeyedCollection, KeyedIterable.prototype);\n  mixin(IndexedCollection, IndexedIterable.prototype);\n  mixin(SetCollection, SetIterable.prototype);\n\n\n  // #pragma Helper functions\n\n  function keyMapper(v, k) {\n    return k;\n  }\n\n  function entryMapper(v, k) {\n    return [k, v];\n  }\n\n  function not(predicate) {\n    return function() {\n      return !predicate.apply(this, arguments);\n    }\n  }\n\n  function neg(predicate) {\n    return function() {\n      return -predicate.apply(this, arguments);\n    }\n  }\n\n  function quoteString(value) {\n    return typeof value === 'string' ? JSON.stringify(value) : String(value);\n  }\n\n  function defaultZipper() {\n    return arrCopy(arguments);\n  }\n\n  function defaultNegComparator(a, b) {\n    return a < b ? 1 : a > b ? -1 : 0;\n  }\n\n  function hashIterable(iterable) {\n    if (iterable.size === Infinity) {\n      return 0;\n    }\n    var ordered = isOrdered(iterable);\n    var keyed = isKeyed(iterable);\n    var h = ordered ? 1 : 0;\n    var size = iterable.__iterate(\n      keyed ?\n        ordered ?\n          function(v, k)  { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n          function(v, k)  { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n        ordered ?\n          function(v ) { h = 31 * h + hash(v) | 0; } :\n          function(v ) { h = h + hash(v) | 0; }\n    );\n    return murmurHashOfSize(size, h);\n  }\n\n  function murmurHashOfSize(size, h) {\n    h = imul(h, 0xCC9E2D51);\n    h = imul(h << 15 | h >>> -15, 0x1B873593);\n    h = imul(h << 13 | h >>> -13, 5);\n    h = (h + 0xE6546B64 | 0) ^ size;\n    h = imul(h ^ h >>> 16, 0x85EBCA6B);\n    h = imul(h ^ h >>> 13, 0xC2B2AE35);\n    h = smi(h ^ h >>> 16);\n    return h;\n  }\n\n  function hashMerge(a, b) {\n    return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n  }\n\n  var Immutable = {\n\n    Iterable: Iterable,\n\n    Seq: Seq,\n    Collection: Collection,\n    Map: Map,\n    OrderedMap: OrderedMap,\n    List: List,\n    Stack: Stack,\n    Set: Set,\n    OrderedSet: OrderedSet,\n\n    Record: Record,\n    Range: Range,\n    Repeat: Repeat,\n\n    is: is,\n    fromJS: fromJS\n\n  };\n\n  return Immutable;\n\n}));\n\n//# sourceURL=webpack://dash_bio/./node_modules/immutable/dist/immutable.js?");

/***/ }),

/***/ "./node_modules/is-callable/index.js":
/*!*******************************************!*\
  !*** ./node_modules/is-callable/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar fnToStr = Function.prototype.toString;\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isCallable(value) {\n\tif (!value) { return false; }\n\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\tif (typeof value === 'function' && !value.prototype) { return true; }\n\tif (hasToStringTag) { return tryFunctionObject(value); }\n\tif (isES6ClassFn(value)) { return false; }\n\tvar strClass = toStr.call(value);\n\treturn strClass === fnClass || strClass === genClass;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/is-callable/index.js?");

/***/ }),

/***/ "./node_modules/is-function/index.js":
/*!*******************************************!*\
  !*** ./node_modules/is-function/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n  var string = toString.call(fn)\n  return string === '[object Function]' ||\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\n    (typeof window !== 'undefined' &&\n     // IE8 and below\n     (fn === window.setTimeout ||\n      fn === window.alert ||\n      fn === window.confirm ||\n      fn === window.prompt))\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/is-function/index.js?");

/***/ }),

/***/ "./node_modules/jquery/dist/jquery.js":
/*!********************************************!*\
  !*** ./node_modules/jquery/dist/jquery.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v3.4.0\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2019-04-10T19:48Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif (  true && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n      // Support: Chrome <=57, Firefox <=52\n      // In some browsers, typeof returns \"function\" for HTML <object> elements\n      // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n      // We don't want to classify *any* DOM node as a function.\n      return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n  };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.4.0\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android <=4.0 only\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code, options ) {\n\t\tDOMEval( code, { nonce: options && options.nonce } );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android <=4.0 only\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.4\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2019-04-08\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t(nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\") ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 && rdescend.test( selector ) ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem.namespaceURI,\n\t\tdocElem = (elem.ownerDocument || elem).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( el ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( el ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn (sel + \"\").replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( (oldCache = uniqueCache[ key ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( el ) {\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement(\"fieldset\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( el ) {\n\treturn el.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( typeof elem.contentDocument !== \"undefined\" ) {\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\tif ( documentElement.attachShadow ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE <=9 only\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE <=9 only\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tvar event = jQuery.event.fix( nativeEvent );\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( el, \"click\" ) === undefined ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( el, \"click\" ) === undefined ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tjQuery.event.add( el, type, returnTrue );\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\tjQuery.extend( saved.shift(), jQuery.Event.prototype ),\n\t\t\t\t\tsaved,\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t/* eslint-disable max-len */\n\n\t// See https://github.com/eslint/eslint/issues/3229\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,\n\n\t/* eslint-enable */\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, #12537)\n\t//   .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t// This happens for inline elements with no explicit setting (gh-3571)\n\t// Support: Android <=4.1 - 4.3 only\n\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t// Support: IE 9-11 only\n\t// Also use offsetWidth/offsetHeight for when box sizing is unreliable\n\t// We use getClientRects() to check for hidden/disconnected.\n\t// In those cases, the computed value can be trusted to be border-box\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\t\tval === \"auto\" ||\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = Date.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce++ ) + uncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url, options ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( ( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t}\n} );\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( true ) {\n\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\treturn jQuery;\n\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/jquery/dist/jquery.js?");

/***/ }),

/***/ "./node_modules/lodash.debounce/index.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash.debounce/index.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/lodash.debounce/index.js?");

/***/ }),

/***/ "./node_modules/lodash/lodash.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/lodash.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.15';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading and trailing whitespace. */\n  var reTrim = /^\\s+|\\s+$/g,\n      reTrimStart = /^\\s+/,\n      reTrimEnd = /\\s+$/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports =  true && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      var index = -1;\n      iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      value = iteratee(value);\n\n      var low = 0,\n          high = array == null ? 0 : array.length,\n          valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(array);\n      if (stacked && stack.get(other)) {\n        return stacked == other;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked && stack.get(other)) {\n        return stacked == other;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = value.replace(reTrim, '');\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // with lookup (in case of e.g. prototype pollution), and strip newlines if any.\n      // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/[\\r\\n]/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      // Like with sourceURL, we take care to not check the option's prototype,\n      // as this configuration is a code injection vector.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrim, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimEnd, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (true) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n      return _;\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else {}\n}.call(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://dash_bio/./node_modules/lodash/lodash.js?");

/***/ }),

/***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
/*!**********************************************************!*\
  !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction areInputsEqual(newInputs, lastInputs) {\n  if (newInputs.length !== lastInputs.length) {\n    return false;\n  }\n\n  for (var i = 0; i < newInputs.length; i++) {\n    if (newInputs[i] !== lastInputs[i]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction index (resultFn, isEqual) {\n  if (isEqual === void 0) {\n    isEqual = areInputsEqual;\n  }\n\n  var lastThis;\n  var lastArgs = [];\n  var lastResult;\n  var calledOnce = false;\n\n  var result = function result() {\n    for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {\n      newArgs[_key] = arguments[_key];\n    }\n\n    if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n      return lastResult;\n    }\n\n    lastResult = resultFn.apply(this, newArgs);\n    calledOnce = true;\n    lastThis = this;\n    lastArgs = newArgs;\n    return lastResult;\n  };\n\n  return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/memoize-one/dist/memoize-one.esm.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/dist/bundle.js":
/*!***********************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/dist/bundle.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p=\"/js/\",t(0)}([function(e,t,n){e.exports=n(10)},function(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n={getBondWidth:function(e){if(!e||isNaN(parseInt(e.bond,10)))throw new Error(\"Invalid input\");if(e.bond<0)throw new Error(\"d.bond must be at least 0\");return 4*e.bond-2+\"px\"},chooseColor:function(e,t){var n=e.category||e.color;return n?n:t},withDefault:function(e,t){return\"undefined\"==typeof e?t:e}};t.default=n},function(e,t){e.exports=__webpack_require__(/*! d3 */ \"./node_modules/molecule-2d-for-react/node_modules/d3/index.js\")},function(e,t){e.exports=__webpack_require__(/*! prop-types */ \"./node_modules/molecule-2d-for-react/node_modules/prop-types/index.js\")},function(e,t){e.exports=__webpack_require__(/*! react */ \"react\")},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push(\"@media \"+n[2]+\"{\"+n[1]+\"}\"):e.push(n[1])}return e.join(\"\")},e.i=function(t,n){\"string\"==typeof t&&(t=[[null,t,\"\"]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];\"number\"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];\"number\"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]=\"(\"+a[2]+\") and (\"+n+\")\"),e.push(a))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(l(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(l(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],u=o[2],s=o[3],l={css:a,media:u,sourceMap:s};n[i]?n[i].parts.push(l):t.push(n[i]={id:i,parts:[l]})}return t}function i(e,t){var n=v(),r=g[g.length-1];if(\"top\"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if(\"bottom\"!==e.insertAt)throw new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function u(e){var t=document.createElement(\"style\");return t.type=\"text/css\",i(e,t),t}function s(e){var t=document.createElement(\"link\");return t.rel=\"stylesheet\",i(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var i=m++;n=b||(b=u(t)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=s(t),r=d.bind(null,n),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=f.bind(null,n),o=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?\"\":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute(\"media\",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+\" */\");var o=new Blob([n],{type:\"text/css\"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},h=function(e){var t;return function(){return\"undefined\"==typeof t&&(t=e.apply(this,arguments)),t}},y=h(function(){return/msie [6-9]\\b/.test(self.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName(\"head\")[0]}),b=null,m=0,g=[];e.exports=function(e,t){t=t||{},\"undefined\"==typeof t.singleton&&(t.singleton=y()),\"undefined\"==typeof t.insertAt&&(t.insertAt=\"bottom\");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var u=n[a],s=p[u.id];s.refs--,i.push(s)}if(e){var l=o(e);r(l,t)}for(var a=0;a<i.length;a++){var s=i[a];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete p[s.id]}}}};var k=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join(\"\\n\")}}()},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(4),l=r(s),c=n(3),f=r(c),d=n(2),p=n(1),h=r(p);n(14);var y=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:\"componentDidMount\",value:function(){this.renderD3()}},{key:\"componentDidUpdate\",value:function(){this.renderD3()}},{key:\"renderD3\",value:function(){if(this.linksContainer){var e=(0,d.select)(this.linksContainer),t=e.selectAll(\".link\").data(this.props.links,function(e){return e.id}),n=t.enter().append(\"g\").attr(\"class\",\"link\");n.append(\"line\").attr(\"class\",\"link-line\"),e.selectAll(\".link-line\").attr(\"source\",function(e){return\"undefined\"!=typeof e.source.id?e.source.id:e.source}).attr(\"target\",function(e){return\"undefined\"!=typeof e.target.id?e.target.id:e.target}).style(\"stroke-width\",h.default.getBondWidth).style(\"stroke-dasharray\",function(e){return\"dashed\"===e.style?5:0}).style(\"stroke\",function(e){return h.default.chooseColor(e,\"black\")}).style(\"opacity\",function(e){if(0===e.bond)return 0}),n.append(\"text\"),e.selectAll(\".link\").selectAll(\"text\").attr(\"x\",function(e){return e.source.x||0}).attr(\"y\",function(e){return e.source.y||0}).attr(\"text-anchor\",\"middle\").text(function(){return\" \"}),n.filter(function(e){return e.bond>1}).append(\"line\").attr(\"class\",\"separator separator-double\"),e.selectAll(\".separator-double\").style(\"stroke\",\"#FFF\").style(\"stroke-width\",function(e){return 4*e.bond-5+\"px\"}),n.filter(function(e){return 3===e.bond}).append(\"line\").attr(\"class\",\"separator separator-triple\"),e.selectAll(\".separator-triple\").style(\"stroke\",function(e){return h.default.chooseColor(e,\"black\")}).style(\"stroke-width\",\"1px\"),t.exit().remove()}}},{key:\"render\",value:function(){var e=this;return l.default.createElement(\"g\",{className:\"links-container\",ref:function(t){e.linksContainer=t}})}}]),t}(l.default.Component);y.propTypes={links:f.default.arrayOf(f.default.object)},t.default=y},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(4),l=r(s),c=n(3),f=r(c),d=n(2),p=n(9),h=r(p),y=n(7),v=r(y),b=n(11),m=r(b),g=n(1),k=r(g),x=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClickNode=function(e){var t=n.state.selectedAtomIds.slice(0),r=t.indexOf(e.id);r!==-1?t.splice(r,1):t.push(e.id),n.setState({selectedAtomIds:t}),n.props.onChangeSelection(t)},n.onDragStartedNode=function(e){d.event.active||n.simulation.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y},n.onDragEndedNode=function(e){d.event.active||n.simulation.alphaTarget(0),e.fx=null,e.fy=null},n.renderTransform=function(){if(n.svg){var e=(0,d.select)(n.svg);e.selectAll(\".node\").attr(\"transform\",function(e){return\"translate(\"+(e.x||0)+\",\"+(e.y||0)+\")\"});var t=e.selectAll(\".link\");t.selectAll(\"line\").attr(\"x1\",function(e){return e.source.x||0}).attr(\"y1\",function(e){return e.source.y||0}).attr(\"x2\",function(e){return e.target.x||0}).attr(\"y2\",function(e){return e.target.y||0}),t.selectAll(\"text\").attr(\"x\",function(e){return((e.source.x||0)+(e.target.x||0))/2}).attr(\"y\",function(e){return((e.source.y||0)+(e.target.y||0))/2})}},n.state={selectedAtomIds:e.selectedAtomIds||[]},n}return a(t,e),u(t,[{key:\"componentDidMount\",value:function(){this.renderD3()}},{key:\"componentWillReceiveProps\",value:function(e){m.default.compareIds(this.state.selectedAtomIds,e.selectedAtomIds)||this.setState({selectedAtomIds:e.selectedAtomIds})}},{key:\"componentDidUpdate\",value:function(){this.renderD3()}},{key:\"renderD3\",value:function(){var e=this;this.simulation=(0,d.forceSimulation)().force(\"link\",(0,d.forceLink)().distance(function(e){return k.default.withDefault(e.distance,20)}).strength(function(e){return k.default.withDefault(e.strength,1)})).force(\"charge\",(0,d.forceManyBody)()).force(\"center\",(0,d.forceCenter)(this.props.width/2,this.props.height/2)),this.simulation.nodes(this.nodes).on(\"tick\",function(){return e.renderTransform()}),this.simulation.force(\"link\").id(function(e){return e.id}).links(this.links)}},{key:\"render\",value:function(){var e=this;return this.nodes=m.default.updateModels(this.nodes||[],this.props.modelData.nodes),this.links=m.default.updateModels(this.links||[],this.props.modelData.links),l.default.createElement(\"svg\",{ref:function(t){e.svg=t},width:this.props.width,height:this.props.height},l.default.createElement(v.default,{links:this.links}),l.default.createElement(h.default,{selectedAtomIds:this.state.selectedAtomIds,nodes:this.nodes,onClickNode:this.onClickNode,onDragStartedNode:this.onDragStartedNode,onDragEndedNode:this.onDragEndedNode}))}}]),t}(l.default.Component);x.defaultProps={width:500,height:500,selectedAtomIds:[],onChangeSelection:function(){}},x.propTypes={width:f.default.number,height:f.default.number,modelData:f.default.shape({nodes:f.default.array,links:f.default.array}).isRequired,selectedAtomIds:f.default.arrayOf(f.default.number),onChangeSelection:f.default.func},t.default=x},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(4),l=r(s),c=n(3),f=r(c),d=n(2),p=n(1),h=r(p);n(15);var y=\"#39f8ff\",v=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:\"componentDidMount\",value:function(){this.renderD3()}},{key:\"componentDidUpdate\",value:function(){this.renderD3()}},{key:\"renderD3\",value:function(){var e=this;if(this.nodesContainer){var n=(0,d.select)(this.nodesContainer),r=n.selectAll(\".node\").data(this.props.nodes,function(e){return e.id}),o=r.enter().append(\"g\");o.attr(\"class\",\"node\").on(\"click\",this.props.onClickNode).attr(\"index\",function(e){return e.id}).call((0,d.drag)().on(\"start\",this.props.onDragStartedNode).on(\"drag\",t.onDragged).on(\"end\",this.props.onDragEndedNode)),n.selectAll(\".node\").classed(\"selected\",function(t){return e.props.selectedAtomIds.indexOf(t.id)!==-1?y:\"\"});var i=(0,d.scaleSqrt)().range([0,6]);o.append(\"circle\").attr(\"class\",\"atom-circle\").attr(\"r\",function(e){return i(h.default.withDefault(e.size,1.5))}).style(\"fill\",function(e){return h.default.chooseColor(e,\"white\")}),(0,d.selectAll)(\".atom-circle\").style(\"stroke\",function(t){return e.props.selectedAtomIds.indexOf(t.id)!==-1?y:\"\"}),o.append(\"text\").attr(\"class\",\"atom-label\").attr(\"dy\",\".35em\").attr(\"text-anchor\",\"middle\").text(function(e){return e.atom}),n.selectAll(\".atom-label\").attr(\"fill\",function(t){var n=e.props.selectedAtomIds.indexOf(t.id)!==-1?y:\"\";return h.default.withDefault(t.textcolor,n)}),r.exit().remove()}}},{key:\"render\",value:function(){var e=this;return l.default.createElement(\"g\",{className:\"nodes-container\",ref:function(t){e.nodesContainer=t}})}}],[{key:\"onDragged\",value:function(e){e.fx=d.event.x,e.fy=d.event.y}}]),t}(l.default.Component);v.propTypes={selectedAtomIds:f.default.arrayOf(f.default.number),nodes:f.default.arrayOf(f.default.object),onClickNode:f.default.func,onDragStartedNode:f.default.func,onDragEndedNode:f.default.func},t.default=v},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var o=n(8),i=r(o);t.default=i.default},function(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n={compareIds:function(e,t){if(!e.length&&t.length||e.length&&!t.length)return!1;var n=new Map;e.forEach(function(e){n.set(e,!1)});var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(!n.has(s))return!1;n.set(s,!0)}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}var l=!0,c=!1,f=void 0;try{for(var d,p=n[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var h=d.value,y=h[1];if(!y)return!1}}catch(e){c=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(c)throw f}}return!0},updateObjectInPlace:function(e,t){return Object.keys(t).forEach(function(r){e[r]instanceof Object&&t[r]instanceof Object?e[r]=n.updateObjectInPlace(e[r],t[r]):e[r]=t[r]}),e},updateModels:function(e,t){var r=n.compareIds(e.map(function(e){return e.id}),t.map(function(e){return e.id}));if(!r)return t;t.forEach(function(t){for(var r=!1,o=0;o<e.length;o+=1)if(e[o].id===t.id){e[o]=n.updateObjectInPlace(e[o],t),r=!0;break}r||e.push(t)});for(var o=function(n){var r=e[n],o=t.find(function(e){return e.id===r.id});o||(e.splice(n,1),n-=1),i=n},i=0;i<e.length;i+=1)o(i);return e}};t.default=n},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,\".link line{stroke:#696969}.link line.separator{stroke:#fff;stroke-width:2px}\",\"\"])},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,\".node text{font:10px sans-serif;pointer-events:none}\",\"\"])},function(e,t,n){var r=n(12);\"string\"==typeof r&&(r=[[e.id,r,\"\"]]);n(6)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(13);\"string\"==typeof r&&(r=[[e.id,r,\"\"]]);n(6)(r,{});r.locals&&(e.exports=r.locals)}]);\n//# sourceMappingURL=bundle.js.map\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/dist/bundle.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3-brush/index.js":
/*!***************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3-brush/index.js ***!
  \***************************************************************************/
/*! exports provided: brush, brushX, brushY, brushSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _src_brush__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/brush */ \"./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/brush.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return _src_brush__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return _src_brush__WEBPACK_IMPORTED_MODULE_0__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return _src_brush__WEBPACK_IMPORTED_MODULE_0__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return _src_brush__WEBPACK_IMPORTED_MODULE_0__[\"brushSelection\"]; });\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3-brush/index.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/brush.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/brush.js ***!
  \*******************************************************************************/
/*! exports provided: brushSelection, brushX, brushY, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return brushSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return brushX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return brushY; });\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/index.js\");\n/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant */ \"./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/constant.js\");\n/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ \"./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/event.js\");\n/* harmony import */ var _noevent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent */ \"./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/noevent.js\");\n\n\n\n\n\n\n\n\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nvar X = {\n  name: \"x\",\n  handles: [\"e\", \"w\"].map(type),\n  input: function(x, e) { return x && [[x[0], e[0][1]], [x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y && [[e[0][0], y[0]], [e[1][0], y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\"].map(type),\n  input: function(xy) { return xy; },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nfunction brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nfunction brushX() {\n  return brush(X);\n}\n\nfunction brushY() {\n  return brush(Y);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  return brush(XY);\n});\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])(brush, \"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\")\n        .on(\"mousedown.brush touchstart.brush\", started);\n  }\n\n  brush.move = function(group, selection) {\n    if (group.selection) {\n      group\n          .on(\"start.brush\", function() { emitter(this, arguments).beforestart().start(); })\n          .on(\"interrupt.brush end.brush\", function() { emitter(this, arguments).end(); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__[\"interpolate\"])(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && empty(selection1) ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 && selection1 ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n            state.selection = selection1 == null || empty(selection1) ? null : selection1;\n            redraw.call(that);\n            emit.start().brush().end();\n          });\n    }\n  };\n\n  function redraw() {\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args) {\n    return that.__brush.emitter || new Emitter(that, args);\n  }\n\n  function Emitter(that, args) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function() {\n      if (this.starting) this.starting = false, this.emit(\"start\");\n      return this;\n    },\n    brush: function() {\n      this.emit(\"brush\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\");\n      return this;\n    },\n    emit: function(type) {\n      Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"customEvent\"])(new _event__WEBPACK_IMPORTED_MODULE_6__[\"default\"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function started() {\n    if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) { if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].changedTouches.length < d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches.length) return Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(); }\n    else if (touchending) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].target.__data__.type,\n        mode = (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx,\n        dy,\n        moving,\n        shifting = signX && signY && d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].shiftKey,\n        lockX,\n        lockY,\n        point0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(that),\n        point = point0,\n        emit = emitter(that, arguments).beforestart();\n\n    if (type === \"overlay\") {\n      state.selection = selection = [\n        [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],\n        [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]\n      ];\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n      group\n          .on(\"touchmove.brush\", moved, true)\n          .on(\"touchend.brush touchcancel.brush\", ended, true);\n    } else {\n      var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view)\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n\n      Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragDisable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view);\n    }\n\n    Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n    Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__[\"interrupt\"])(that);\n    redraw.call(that);\n    emit.start();\n\n    function moved() {\n      var point1 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"mouse\"])(that);\n      if (shifting && !lockX && !lockY) {\n        if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;\n        else lockX = true;\n      }\n      point = point1;\n      moving = true;\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n      move();\n    }\n\n    function move() {\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n          else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n          if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n          else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));\n          if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush();\n      }\n    }\n\n    function ended() {\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"nopropagation\"])();\n      if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches) {\n        if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n        group.on(\"touchmove.brush touchend.brush touchcancel.brush\", null);\n      } else {\n        Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__[\"dragEnable\"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end();\n    }\n\n    function keydowned() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n\n    function keyupped() {\n      switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move();\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move();\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (d3_selection__WEBPACK_IMPORTED_MODULE_3__[\"event\"].altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move();\n          }\n          break;\n        }\n        default: return;\n      }\n      Object(_noevent__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n    }\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = extent.apply(this, arguments);\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!!_), brush) : filter;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/brush.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/constant.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/constant.js ***!
  \**********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n  return function() {\n    return x;\n  };\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/constant.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/event.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/event.js ***!
  \*******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(target, type, selection) {\n  this.target = target;\n  this.type = type;\n  this.selection = selection;\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/event.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/noevent.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/noevent.js ***!
  \*********************************************************************************/
/*! exports provided: nopropagation, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nopropagation\", function() { return nopropagation; });\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n\n\nfunction nopropagation() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function() {\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].preventDefault();\n  d3_selection__WEBPACK_IMPORTED_MODULE_0__[\"event\"].stopImmediatePropagation();\n});\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3-brush/src/noevent.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3/build/package.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3/build/package.js ***!
  \*****************************************************************************/
/*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, scripts, devDependencies, dependencies */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"name\", function() { return name; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"description\", function() { return description; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keywords\", function() { return keywords; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"homepage\", function() { return homepage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"license\", function() { return license; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"author\", function() { return author; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"main\", function() { return main; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unpkg\", function() { return unpkg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"jsdelivr\", function() { return jsdelivr; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"module\", function() { return module; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"repository\", function() { return repository; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scripts\", function() { return scripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"devDependencies\", function() { return devDependencies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dependencies\", function() { return dependencies; });\nvar name = \"d3\";\nvar version = \"4.13.0\";\nvar description = \"Data-Driven Documents\";\nvar keywords = [\"dom\",\"visualization\",\"svg\",\"animation\",\"canvas\"];\nvar homepage = \"https://d3js.org\";\nvar license = \"BSD-3-Clause\";\nvar author = {\"name\":\"Mike Bostock\",\"url\":\"https://bost.ocks.org/mike\"};\nvar main = \"build/d3.node.js\";\nvar unpkg = \"build/d3.min.js\";\nvar jsdelivr = \"build/d3.min.js\";\nvar module = \"index\";\nvar repository = {\"type\":\"git\",\"url\":\"https://github.com/d3/d3.git\"};\nvar scripts = {\"pretest\":\"rimraf build && mkdir build && json2module package.json > build/package.js && node rollup.node\",\"test\":\"tape 'test/**/*-test.js'\",\"prepublishOnly\":\"npm run test && rollup -c --banner \\\"$(preamble)\\\" && uglifyjs -b beautify=false,preamble=\\\"'$(preamble)'\\\" build/d3.js -c negate_iife=false -m -o build/d3.min.js\",\"postpublish\":\"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/build/d3.js d3.v4.js && cp ../d3/build/d3.min.js d3.v4.min.js && git add d3.v4.js d3.v4.min.js && git commit -m \\\"d3 ${npm_package_version}\\\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/build/d3.js ../d3/build/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \\\"${npm_package_version}\\\" && git tag -am \\\"${npm_package_version}\\\" v${npm_package_version} && git push && git push --tags && cd - && zip -j build/d3.zip -- LICENSE README.md API.md CHANGES.md build/d3.js build/d3.min.js\"};\nvar devDependencies = {\"json2module\":\"0.0\",\"package-preamble\":\"0.1\",\"rimraf\":\"2\",\"rollup\":\"0.53\",\"rollup-plugin-ascii\":\"0.0\",\"rollup-plugin-node-resolve\":\"3\",\"tape\":\"4\",\"uglify-js\":\"3.2\"};\nvar dependencies = {\"d3-array\":\"1.2.1\",\"d3-axis\":\"1.0.8\",\"d3-brush\":\"1.0.4\",\"d3-chord\":\"1.0.4\",\"d3-collection\":\"1.0.4\",\"d3-color\":\"1.0.3\",\"d3-dispatch\":\"1.0.3\",\"d3-drag\":\"1.2.1\",\"d3-dsv\":\"1.0.8\",\"d3-ease\":\"1.0.3\",\"d3-force\":\"1.1.0\",\"d3-format\":\"1.2.2\",\"d3-geo\":\"1.9.1\",\"d3-hierarchy\":\"1.1.5\",\"d3-interpolate\":\"1.1.6\",\"d3-path\":\"1.0.5\",\"d3-polygon\":\"1.0.3\",\"d3-quadtree\":\"1.0.3\",\"d3-queue\":\"3.0.7\",\"d3-random\":\"1.1.0\",\"d3-request\":\"1.0.6\",\"d3-scale\":\"1.0.7\",\"d3-selection\":\"1.3.0\",\"d3-shape\":\"1.2.0\",\"d3-time\":\"1.0.8\",\"d3-time-format\":\"2.1.1\",\"d3-timer\":\"1.0.7\",\"d3-transition\":\"1.1.1\",\"d3-voronoi\":\"1.1.2\",\"d3-zoom\":\"1.7.1\"};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3/build/package.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/d3/index.js":
/*!*********************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/d3/index.js ***!
  \*********************************************************************/
/*! exports provided: version, bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, ribbon, nest, set, map, keys, values, entries, color, rgb, hsl, lab, hcl, cubehelix, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatRows, tsvParse, tsvParseRows, tsvFormat, tsvFormatRows, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateNumber, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, queue, randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, request, html, json, text, xml, csv, tsv, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, schemeCategory10, schemeCategory20b, schemeCategory20c, schemeCategory20, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, scaleSequential, create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, voronoi, zoom, zoomTransform, zoomIdentity */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _build_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./build/package */ \"./node_modules/molecule-2d-for-react/node_modules/d3/build/package.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return _build_package__WEBPACK_IMPORTED_MODULE_0__[\"version\"]; });\n\n/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ \"./node_modules/d3-array/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisect\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectRight\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisectRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisectLeft\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisectLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"ascending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bisector\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"bisector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"cross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descending\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"descending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deviation\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"deviation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extent\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"extent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"histogram\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"histogram\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdFreedmanDiaconis\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdFreedmanDiaconis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdScott\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdScott\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thresholdSturges\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"thresholdSturges\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"max\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"mean\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"median\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"merge\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"min\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pairs\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"pairs\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"permute\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"permute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantile\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"quantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"range\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"scan\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"sum\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ticks\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"ticks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickIncrement\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"tickIncrement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tickStep\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"tickStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"transpose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"variance\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"variance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__[\"zip\"]; });\n\n/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ \"./node_modules/d3-axis/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisTop\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisRight\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisBottom\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"axisLeft\", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__[\"axisLeft\"]; });\n\n/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ \"./node_modules/molecule-2d-for-react/node_modules/d3-brush/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brush\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushX\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushY\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brushSelection\", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__[\"brushSelection\"]; });\n\n/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ \"./node_modules/d3-chord/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chord\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__[\"chord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ribbon\", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__[\"ribbon\"]; });\n\n/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-collection */ \"./node_modules/d3-collection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nest\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"nest\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"set\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"map\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"keys\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"values\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"entries\", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__[\"entries\"]; });\n\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"color\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"hsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"lab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__[\"cubehelix\"]; });\n\n/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-dispatch */ \"./node_modules/d3-dispatch/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_7__[\"dispatch\"]; });\n\n/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-drag */ \"./node_modules/d3-drag/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drag\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"drag\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragDisable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"dragDisable\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dragEnable\", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_8__[\"dragEnable\"]; });\n\n/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-dsv */ \"./node_modules/d3-dsv/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"dsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"csvFormatRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParse\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvParseRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvParseRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormat\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsvFormatRows\", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_9__[\"tsvFormatRows\"]; });\n\n/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-ease */ \"./node_modules/d3-ease/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeLinear\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuad\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuad\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeQuadInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeQuadInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCubicInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCubicInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePoly\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePoly\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easePolyInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easePolyInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSin\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSin\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeSinInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeSinInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExp\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeExpInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeExpInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircle\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeCircleInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeCircleInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounce\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounce\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBounceInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBounceInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBack\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeBackInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeBackInOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElastic\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElastic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticIn\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticIn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easeElasticInOut\", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_10__[\"easeElasticInOut\"]; });\n\n/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-force */ \"./node_modules/d3-force/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCenter\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceCenter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceCollide\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceCollide\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceLink\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceLink\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceManyBody\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceManyBody\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceRadial\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceSimulation\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceSimulation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceX\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forceY\", function() { return d3_force__WEBPACK_IMPORTED_MODULE_11__[\"forceY\"]; });\n\n/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-format */ \"./node_modules/d3-format/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDefaultLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"formatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"format\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"formatPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatLocale\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"formatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatSpecifier\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"formatSpecifier\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionFixed\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"precisionFixed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionPrefix\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"precisionPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"precisionRound\", function() { return d3_format__WEBPACK_IMPORTED_MODULE_12__[\"precisionRound\"]; });\n\n/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-geo */ \"./node_modules/d3-geo/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoBounds\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoBounds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCentroid\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipAntimeridian\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoClipAntimeridian\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipCircle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoClipCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipExtent\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoClipExtent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoClipRectangle\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoClipRectangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoContains\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoDistance\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoDistance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoGraticule\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGraticule10\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoGraticule10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoInterpolate\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoInterpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoLength\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoLength\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoPath\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbers\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAlbers\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAlbersUsa\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAlbersUsa\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAzimuthalEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAzimuthalEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAzimuthalEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoAzimuthalEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoAzimuthalEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformal\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicConformal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicConformalRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicConformalRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualArea\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicEqualArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEqualAreaRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicEqualAreaRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistant\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicEquidistant\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoConicEquidistantRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoConicEquidistantRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangular\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoEquirectangular\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoEquirectangularRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoEquirectangularRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoGnomonic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoGnomonicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoGnomonicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoIdentity\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjection\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoProjection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoProjectionMutator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoProjectionMutator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoNaturalEarth1\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoNaturalEarth1Raw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoNaturalEarth1Raw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoOrthographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoOrthographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoOrthographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographic\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoStereographic\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStereographicRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoStereographicRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercator\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoTransverseMercator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransverseMercatorRaw\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoTransverseMercatorRaw\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoRotation\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoRotation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoStream\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoStream\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"geoTransform\", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_13__[\"geoTransform\"]; });\n\n/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-hierarchy */ \"./node_modules/d3-hierarchy/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cluster\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"cluster\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hierarchy\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"hierarchy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pack\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"pack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packSiblings\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"packSiblings\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"packEnclose\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"packEnclose\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"partition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stratify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"stratify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tree\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"tree\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemap\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapBinary\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapBinary\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSlice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapSlice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSliceDice\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapSliceDice\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapSquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapSquarify\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"treemapResquarify\", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_14__[\"treemapResquarify\"]; });\n\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateDate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateNumber\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateRound\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateTransformSvg\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateZoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateRgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateRgbBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateHsl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateHslLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateLab\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateHcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateHclLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateCubehelix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"interpolateCubehelixLong\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_15__[\"quantize\"]; });\n\n/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-path */ \"./node_modules/d3-path/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return d3_path__WEBPACK_IMPORTED_MODULE_16__[\"path\"]; });\n\n/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-polygon */ \"./node_modules/d3-polygon/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonArea\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_17__[\"polygonArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonCentroid\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_17__[\"polygonCentroid\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonHull\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_17__[\"polygonHull\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonContains\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_17__[\"polygonContains\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"polygonLength\", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_17__[\"polygonLength\"]; });\n\n/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-quadtree */ \"./node_modules/d3-quadtree/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quadtree\", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_18__[\"quadtree\"]; });\n\n/* harmony import */ var d3_queue__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-queue */ \"./node_modules/d3-queue/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"queue\", function() { return d3_queue__WEBPACK_IMPORTED_MODULE_19__[\"queue\"]; });\n\n/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-random */ \"./node_modules/d3-random/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomUniform\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomUniform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomLogNormal\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomLogNormal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomBates\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomBates\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomIrwinHall\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomIrwinHall\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"randomExponential\", function() { return d3_random__WEBPACK_IMPORTED_MODULE_20__[\"randomExponential\"]; });\n\n/* harmony import */ var d3_request__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-request */ \"./node_modules/d3-request/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"request\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"request\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"html\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"json\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"json\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"text\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xml\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"xml\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"csv\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"csv\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tsv\", function() { return d3_request__WEBPACK_IMPORTED_MODULE_21__[\"tsv\"]; });\n\n/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ \"./node_modules/d3-scale/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleBand\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleBand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePoint\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scalePoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleIdentity\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleIdentity\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLinear\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleLog\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleLog\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleOrdinal\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleOrdinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleImplicit\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleImplicit\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scalePow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scalePow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSqrt\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSqrt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantile\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleQuantile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleQuantize\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleQuantize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleThreshold\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleThreshold\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleTime\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleTime\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleUtc\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleUtc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"schemeCategory10\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20b\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"schemeCategory20b\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20c\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"schemeCategory20c\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory20\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"schemeCategory20\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateCubehelixDefault\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateRainbow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateWarm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateCool\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateViridis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateMagma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolateInferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"interpolatePlasma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scaleSequential\", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__[\"scaleSequential\"]; });\n\n/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-selection */ \"./node_modules/d3-selection/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"create\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"creator\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"creator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"local\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"local\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matcher\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"matcher\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mouse\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"mouse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespace\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"namespace\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"namespaces\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"namespaces\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clientPoint\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"clientPoint\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"select\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selectAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selection\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selector\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selector\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"selectorAll\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"selectorAll\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"style\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touch\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"touch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"touches\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"touches\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"window\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"event\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"event\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"customEvent\", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_23__[\"customEvent\"]; });\n\n/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-shape */ \"./node_modules/d3-shape/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"arc\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"arc\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"area\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"area\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"line\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"line\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pie\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"pie\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areaRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"areaRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialArea\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"radialArea\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"lineRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"radialLine\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"radialLine\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pointRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"pointRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkHorizontal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkHorizontal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkVertical\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkVertical\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"linkRadial\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"linkRadial\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbol\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbol\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbols\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbols\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCircle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolCircle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolCross\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolCross\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolDiamond\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolDiamond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolSquare\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolSquare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolStar\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolStar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolTriangle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolTriangle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symbolWye\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"symbolWye\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasisClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasisOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasisOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBasis\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveBundle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveBundle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinalClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinalOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinalOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCardinal\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCardinal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRomClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRomOpen\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRomOpen\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveCatmullRom\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveCatmullRom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinearClosed\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveLinearClosed\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveLinear\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveLinear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneX\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveMonotoneX\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveMonotoneY\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveMonotoneY\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveNatural\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveNatural\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStep\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStep\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepAfter\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStepAfter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curveStepBefore\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"curveStepBefore\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stack\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stack\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetExpand\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetExpand\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetDiverging\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetDiverging\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetSilhouette\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetSilhouette\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOffsetWiggle\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOffsetWiggle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderAscending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderAscending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderDescending\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderDescending\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderInsideOut\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderInsideOut\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderNone\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderNone\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stackOrderReverse\", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_24__[\"stackOrderReverse\"]; });\n\n/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-time */ \"./node_modules/d3-time/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeInterval\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeInterval\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMillisecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMillisecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMilliseconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMilliseconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSecond\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSecond\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSeconds\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSeconds\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"timeYears\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinute\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMinute\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMinutes\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMinutes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHour\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcHour\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcHours\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcHours\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDay\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcDay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcDays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcDays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeek\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWeek\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWeeks\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWeeks\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSunday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSunday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSundays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSundays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMondays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMondays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTuesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcTuesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcTuesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWednesday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcWednesdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcWednesdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcThursday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcThursdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcThursdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFriday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcFriday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFridays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcFridays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturday\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSaturday\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcSaturdays\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcSaturdays\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonth\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcMonths\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcMonths\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYear\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcYear\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcYears\", function() { return d3_time__WEBPACK_IMPORTED_MODULE_25__[\"utcYears\"]; });\n\n/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time-format */ \"./node_modules/d3-time-format/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatDefaultLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormatDefaultLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"utcFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"utcParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"utcParse\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeFormatLocale\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"timeFormatLocale\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoFormat\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"isoFormat\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isoParse\", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_26__[\"isoParse\"]; });\n\n/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-timer */ \"./node_modules/d3-timer/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"now\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"now\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timer\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timerFlush\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timerFlush\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"timeout\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"timeout\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_27__[\"interval\"]; });\n\n/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-transition */ \"./node_modules/d3-transition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transition\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"transition\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"active\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"active\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interrupt\", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_28__[\"interrupt\"]; });\n\n/* harmony import */ var d3_voronoi__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-voronoi */ \"./node_modules/d3-voronoi/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"voronoi\", function() { return d3_voronoi__WEBPACK_IMPORTED_MODULE_29__[\"voronoi\"]; });\n\n/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-zoom */ \"./node_modules/d3-zoom/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoom\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__[\"zoom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomTransform\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__[\"zoomTransform\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zoomIdentity\", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__[\"zoomIdentity\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/d3/index.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/prop-types/checkPropTypes.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/prop-types/checkPropTypes.js ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/molecule-2d-for-react/node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n  var loggedTypeFailures = {};\n  var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (true) {\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          );\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n  if (true) {\n    loggedTypeFailures = {};\n  }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/prop-types/checkPropTypes.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/prop-types/factoryWithTypeCheckers.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/prop-types/factoryWithTypeCheckers.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/molecule-2d-for-react/node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/molecule-2d-for-react/node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (true) {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    elementType: createElementTypeTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (true) {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if ( true && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!ReactIs.isValidElementType(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      if (true) {\n        if (arguments.length > 1) {\n          printWarning(\n            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n          );\n        } else {\n          printWarning('Invalid argument supplied to oneOf, expected an array.');\n        }\n      }\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n        var type = getPreciseType(value);\n        if (type === 'symbol') {\n          return String(value);\n        }\n        return value;\n      });\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (has(propValue, key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n       true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // falsy value can't be a Symbol\n    if (!propValue) {\n      return false;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/prop-types/factoryWithTypeCheckers.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/prop-types/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/prop-types/index.js ***!
  \*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n  var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/molecule-2d-for-react/node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/prop-types/index.js?");

/***/ }),

/***/ "./node_modules/molecule-2d-for-react/node_modules/prop-types/lib/ReactPropTypesSecret.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/molecule-2d-for-react/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
  \************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-2d-for-react/node_modules/prop-types/lib/ReactPropTypesSecret.js?");

/***/ }),

/***/ "./node_modules/molecule-3d-for-react/dist/bundle.js":
/*!***********************************************************!*\
  !*** ./node_modules/molecule-3d-for-react/dist/bundle.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports=function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p=\"/js/\",t(0)}([function(e,t,r){e.exports=r(4)},function(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r={ATOM:\"Atom\",RESIDUE:\"Residue\",CHAIN:\"Chain\"};t.default=r},function(e,t,r){\"use strict\";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function a(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function i(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var l=function(){function e(e,t){var r=[],o=!0,n=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(n)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),s=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,\"value\"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),u=r(9),d=o(u),c=r(11),f=o(c),p=r(10),h=o(p),m=r(5),y=o(m),b=r(6),v=o(b),S=r(1),g=o(S);window.$=d.default;var O=r(7),w=14,_=16711680,C=255,M=.8,A=function(e){function t(e){n(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.onClickAtom=function(e){var t=r.props.modelData.atoms,o=t[e.serial],n=r.props.selectionType,a=v.default.addSelection(t,r.state.selectedAtomIds,o,n);r.setState({selectedAtomIds:a}),r.props.onChangeSelection&&r.props.onChangeSelection(a)},r.state={selectedAtomIds:e.selectedAtomIds},r.lastOutline={width:0},r}return i(t,e),s(t,null,[{key:\"isModelDataEmpty\",value:function(e){return 0===e.atoms.length&&0===e.bonds.length}},{key:\"render3dMolModel\",value:function(e,r){e.clear(),t.isModelDataEmpty(r)||(e.addModel(v.default.modelDataToCDJSON(r),\"json\",{keepH:!0}),e.getModel().selectedAtoms().forEach(function(e){var t=e,o=(r.atoms[e.serial].residue_name||\"\").replace(/[0-9]+/,\"\");t.atom=r.atoms[e.serial].name,t.chain=r.atoms[e.serial].chain,t.resi=r.atoms[e.serial].residue_index,t.resn=o}))}},{key:\"render3dMolShapes\",value:function(e,t){e.removeAllShapes(),t.forEach(function(t){t.type&&e[\"add\"+t.type](y.default.getShapeSpec(t))})}},{key:\"render3dMolLabels\",value:function(e,t){e.removeAllLabels(),t.forEach(function(t){e.addLabel(t.text,t)})}},{key:\"render3dMolOrbital\",value:function(e,t){if(t.cube_file){var r=new O.VolumeData(t.cube_file,\"cube\");e.addIsosurface(r,{isoval:t.iso_val,color:t.positiveVolumetricColor||_,opacity:t.opacity||M}),e.addIsosurface(r,{isoval:-t.iso_val,color:t.negativeVolumetricColor||C,opacity:t.opacity||M})}}}]),s(t,[{key:\"componentDidMount\",value:function(){this.render3dMol()}},{key:\"componentWillReceiveProps\",value:function(e){this.setState({selectedAtomIds:e.selectedAtomIds})}},{key:\"componentDidUpdate\",value:function(){this.render3dMol()}},{key:\"render3dMol\",value:function(){var e=this;if(this.glviewer||!t.isModelDataEmpty(this.props.modelData)){var r=this.glviewer||O.createViewer((0,d.default)(this.container),{defaultcolors:O.elementColors.rasmol}),o=v.default.modelDataEquivalent(this.oldModelData,this.props.modelData);o||(this.lastStylesByAtom=null,t.render3dMolModel(r,this.props.modelData)),this.props.outlineWidth===this.lastOutline.width&&this.props.outlineColor===this.lastOutline.color||(this.props.outlineWidth?this.lastOutline={style:\"outline\",width:this.props.outlineWidth,color:this.props.outlineColor}:this.lastOutline={},r.setViewStyle(this.lastOutline));var n=Object.create(null),a=Object.create(null);this.props.modelData.atoms.forEach(function(t,o){var i=e.state.selectedAtomIds.indexOf(t.serial)!==-1,l=y.default.getLibStyle(t,i,e.props.atomLabelsShown,e.props.styles[o]);e.props.atomLabelsShown&&r.addLabel(t.name,{fontSize:w,position:{x:t.positions[0],y:t.positions[1],z:t.positions[2]}});var s=JSON.stringify(l);a[t.serial]=s,e.lastStylesByAtom&&e.lastStylesByAtom[t.serial]===s||(n[s]||(n[s]=[]),n[s].push(t.serial))}),this.lastStylesByAtom=a,Object.entries(n).forEach(function(e){var t=l(e,2),o=t[0],n=t[1];r.setStyle({serial:n},JSON.parse(o))}),t.render3dMolShapes(r,this.props.shapes),t.render3dMolLabels(r,this.props.labels),t.render3dMolOrbital(r,this.props.orbital);var i=!1;if(\"number\"==typeof this.props.nearClip&&\"number\"==typeof this.props.farClip&&(r.setSlab(this.props.nearClip,this.props.farClip),i=!0),r.setBackgroundColor(y.default.colorStringToNumber(this.props.backgroundColor),this.props.backgroundOpacity),r.setClickable({},!0,this.onClickAtom),r.render(),this.oldModelData||(r.zoom(),r.zoomTo(.8)),o||(i||r.fitSlab(),this.props.onRenderNewData(r)),!this.glviewer)var s=this,u=setInterval(function(){s.container.children.length>0&&s.container.children[0].offsetParent&&(r.resize(),clearInterval(u))},50);this.oldModelData=this.props.modelData,this.glviewer=r}}},{key:\"render\",value:function(){var e=this;return f.default.createElement(\"div\",{className:\"molecule-3d\",style:{width:this.props.width,height:this.props.height,position:\"relative\",margin:\"0 auto\"},ref:function(t){e.container=t}})}}]),t}(f.default.Component);A.defaultProps={atomLabelsShown:!1,backgroundOpacity:1,backgroundColor:\"#73757c\",height:\"500px\",onRenderNewData:function(){},orbital:{},selectedAtomIds:[],selectionType:g.default.ATOM,shapes:[],labels:[],styles:{},width:\"500px\",outlineWidth:0,outlineColor:\"#000000\",nearClip:null,farClip:null},A.propTypes={atomLabelsShown:h.default.bool,backgroundColor:h.default.string,backgroundOpacity:h.default.number,height:h.default.string,modelData:h.default.shape({atoms:h.default.array,bonds:h.default.array}).isRequired,onChangeSelection:h.default.func,onRenderNewData:h.default.func,orbital:h.default.shape({cube_file:h.default.string,iso_val:h.default.number,opacity:h.default.number,positiveVolumetricColor:h.default.string,negativeVolumetricColor:h.default.string}),selectedAtomIds:h.default.arrayOf(h.default.number),selectionType:h.default.oneOf([g.default.ATOM,g.default.RESIDUE,g.default.CHAIN]),shapes:h.default.arrayOf(h.default.object),labels:h.default.arrayOf(h.default.object),styles:h.default.objectOf(h.default.object),width:h.default.string,nearClip:h.default.number,farClip:h.default.number,outlineWidth:h.default.number,outlineColor:h.default.string},t.default=A},function(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r={ARROW:\"Arrow\",SPHERE:\"Sphere\",CYLINDER:\"Cylinder\"};t.default=r},function(e,t,r){\"use strict\";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(2),a=o(n);t.default=a.default},function(e,t,r){\"use strict\";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var n=function(){function e(e,t){var r=[],o=!0,n=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(n)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),a=r(3),i=o(a),l=\"stick\",s={colorStringToNumber:function(e){if(4!==e.length&&7!==e.length)return e;if(\"#\"!==e[0])return e;var t=parseInt(e.substr(1,e.length-1),16);return isNaN(t)?e:t},getShapeSpec:function(e,t){var r=void 0;e.color&&(r=s.colorStringToNumber(e.color));var o=Object.assign({},{alpha:.8,callback:t,clickable:!1,color:65027,radius:e.radius},e,{color:r});if(e.type===i.default.ARROW)o.start=e.start,o.end=e.end;else if(e.type===i.default.SPHERE)o.center=e.center;else{if(e.type!==i.default.CYLINDER)throw new Error(\"Invalid shape type.\");o.fromCap=!0,o.toCap=!0,o.start=e.start,o.end=e.end}return o},getLibStyle:function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a={},i=o.visualization_type||l;return a[i]={},Object.entries(o).forEach(function(e){var t=n(e,2),r=t[0],o=t[1];\"visualization_type\"!==r&&(a[i][r]=o)}),t&&(a[i].color=2094078),\"string\"==typeof a[i].color&&(a[i].color=s.colorStringToNumber(a[i].color)),a}};t.default=s},function(e,t,r){\"use strict\";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(8),a=r(1),i=o(a),l={modelDataToCDJSON:function(e){var t=e.atoms.map(function(e){return{l:e.elem,x:e.positions[0],y:e.positions[1],z:e.positions[2],mass:e.mass_magnitude}}),r=e.bonds.map(function(e){return{b:e.atom1_index,e:e.atom2_index,o:e.bond_order}});return{m:[{a:t,b:r}]}},addSelection:function(e,t,r,o){var n=t.slice(),a=t.indexOf(r.serial),s=a===-1;return o===i.default.ATOM?(s?n.push(r.serial):n.splice(a,1),n):(s?e.forEach(function(e){l.isSameGroup(r,e,o)&&n.push(e.serial)}):n=n.filter(function(t){var n=e[t];return!l.isSameGroup(r,n,o)}),n)},isSameGroup:function(e,t,r){if(r===i.default.RESIDUE)return e.residue_index===t.residue_index;if(r===i.default.CHAIN)return e.chain===t.chain;throw new Error(\"selectionType must be either residue or chain\")},modelDataEquivalent:function(e,t){if(!e||!t)return!1;var r=new n.Set(e.atoms.map(function(e){return e.serial})),o=new n.Set(t.atoms.map(function(e){return e.serial})),a=new n.Set(e.bonds.map(function(e){return e.atom1_index+\"=>\"+e.atom2_index})),i=new n.Set(t.bonds.map(function(e){return e.atom1_index+\"=>\"+e.atom2_index})),l=r.equals(o),s=a.equals(i);if(!l||!s)return!1;var u=new Map,d=!0,c=!1,f=void 0;try{for(var p,h=e.atoms[Symbol.iterator]();!(d=(p=h.next()).done);d=!0){var m=p.value;u.set(m.serial,m.positions||[])}}catch(e){c=!0,f=e}finally{try{!d&&h.return&&h.return()}finally{if(c)throw f}}return t.atoms.every(function(e){return u.get(e.serial).every(function(t,r){var o=e.positions||[];return o[r]===t})})}};t.default=l},function(e,t){e.exports=__webpack_require__(/*! 3dmol */ \"./node_modules/3dmol/build/3Dmol-min.js\")},function(e,t){e.exports=__webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\")},function(e,t){e.exports=__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")},function(e,t){e.exports=__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\")},function(e,t){e.exports=__webpack_require__(/*! react */ \"react\")}]);\n//# sourceMappingURL=bundle.js.map\n\n//# sourceURL=webpack://dash_bio/./node_modules/molecule-3d-for-react/dist/bundle.js?");

/***/ }),

/***/ "./node_modules/object-assign/index.js":
/*!*********************************************!*\
  !*** ./node_modules/object-assign/index.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/object-assign/index.js?");

/***/ }),

/***/ "./node_modules/object-keys/index.js":
/*!*******************************************!*\
  !*** ./node_modules/object-keys/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = __webpack_require__(/*! ./isArguments */ \"./node_modules/object-keys/isArguments.js\");\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\nvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar excludedKeys = {\n\t$applicationCache: true,\n\t$console: true,\n\t$external: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$innerHeight: true,\n\t$innerWidth: true,\n\t$outerHeight: true,\n\t$outerWidth: true,\n\t$pageXOffset: true,\n\t$pageYOffset: true,\n\t$parent: true,\n\t$scrollLeft: true,\n\t$scrollTop: true,\n\t$scrollX: true,\n\t$scrollY: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/object-keys/index.js?");

/***/ }),

/***/ "./node_modules/object-keys/isArguments.js":
/*!*************************************************!*\
  !*** ./node_modules/object-keys/isArguments.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/object-keys/isArguments.js?");

/***/ }),

/***/ "./node_modules/parse-headers/parse-headers.js":
/*!*****************************************************!*\
  !*** ./node_modules/parse-headers/parse-headers.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var trim = __webpack_require__(/*! string.prototype.trim */ \"./node_modules/string.prototype.trim/index.js\")\n  , forEach = __webpack_require__(/*! for-each */ \"./node_modules/for-each/index.js\")\n  , isArray = function(arg) {\n      return Object.prototype.toString.call(arg) === '[object Array]';\n    }\n\nmodule.exports = function (headers) {\n  if (!headers)\n    return {}\n\n  var result = {}\n\n  forEach(\n      trim(headers).split('\\n')\n    , function (row) {\n        var index = row.indexOf(':')\n          , key = trim(row.slice(0, index)).toLowerCase()\n          , value = trim(row.slice(index + 1))\n\n        if (typeof(result[key]) === 'undefined') {\n          result[key] = value\n        } else if (isArray(result[key])) {\n          result[key].push(value)\n        } else {\n          result[key] = [ result[key], value ]\n        }\n      }\n  )\n\n  return result\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/parse-headers/parse-headers.js?");

/***/ }),

/***/ "./node_modules/performance-now/lib/performance-now.js":
/*!*************************************************************!*\
  !*** ./node_modules/performance-now/lib/performance-now.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2\n(function() {\n  var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n  if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n    module.exports = function() {\n      return performance.now();\n    };\n  } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n    module.exports = function() {\n      return (getNanoSeconds() - nodeLoadTime) / 1e6;\n    };\n    hrtime = process.hrtime;\n    getNanoSeconds = function() {\n      var hr;\n      hr = hrtime();\n      return hr[0] * 1e9 + hr[1];\n    };\n    moduleLoadTime = getNanoSeconds();\n    upTime = process.uptime() * 1e9;\n    nodeLoadTime = moduleLoadTime - upTime;\n  } else if (Date.now) {\n    module.exports = function() {\n      return Date.now() - loadTime;\n    };\n    loadTime = Date.now();\n  } else {\n    module.exports = function() {\n      return new Date().getTime() - loadTime;\n    };\n    loadTime = new Date().getTime();\n  }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/performance-now/lib/performance-now.js?");

/***/ }),

/***/ "./node_modules/plotly.js/dist/plotly.js":
/*!***********************************************!*\
  !*** ./node_modules/plotly.js/dist/plotly.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/**\n* plotly.js v1.48.3\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n* Licensed under the MIT license\n*/\n(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){\n'use strict';\n\nvar Lib = _dereq_('../src/lib');\nvar rules = {\n    \"X,X div\": \"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\",\n    \"X input,X button\": \"font-family:'Open Sans', verdana, arial, sans-serif;\",\n    \"X input:focus,X button:focus\": \"outline:none;\",\n    \"X a\": \"text-decoration:none;\",\n    \"X a:hover\": \"text-decoration:none;\",\n    \"X .crisp\": \"shape-rendering:crispEdges;\",\n    \"X .user-select-none\": \"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\n    \"X svg\": \"overflow:hidden;\",\n    \"X svg a\": \"fill:#447adb;\",\n    \"X svg a:hover\": \"fill:#3c6dc5;\",\n    \"X .main-svg\": \"position:absolute;top:0;left:0;pointer-events:none;\",\n    \"X .main-svg .draglayer\": \"pointer-events:all;\",\n    \"X .cursor-default\": \"cursor:default;\",\n    \"X .cursor-pointer\": \"cursor:pointer;\",\n    \"X .cursor-crosshair\": \"cursor:crosshair;\",\n    \"X .cursor-move\": \"cursor:move;\",\n    \"X .cursor-col-resize\": \"cursor:col-resize;\",\n    \"X .cursor-row-resize\": \"cursor:row-resize;\",\n    \"X .cursor-ns-resize\": \"cursor:ns-resize;\",\n    \"X .cursor-ew-resize\": \"cursor:ew-resize;\",\n    \"X .cursor-sw-resize\": \"cursor:sw-resize;\",\n    \"X .cursor-s-resize\": \"cursor:s-resize;\",\n    \"X .cursor-se-resize\": \"cursor:se-resize;\",\n    \"X .cursor-w-resize\": \"cursor:w-resize;\",\n    \"X .cursor-e-resize\": \"cursor:e-resize;\",\n    \"X .cursor-nw-resize\": \"cursor:nw-resize;\",\n    \"X .cursor-n-resize\": \"cursor:n-resize;\",\n    \"X .cursor-ne-resize\": \"cursor:ne-resize;\",\n    \"X .cursor-grab\": \"cursor:-webkit-grab;cursor:grab;\",\n    \"X .modebar\": \"position:absolute;top:2px;right:2px;\",\n    \"X .ease-bg\": \"-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;\",\n    \"X .modebar--hover>:not(.watermark)\": \"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;\",\n    \"X:hover .modebar--hover .modebar-group\": \"opacity:1;\",\n    \"X .modebar-group\": \"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\n    \"X .modebar-btn\": \"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\",\n    \"X .modebar-btn svg\": \"position:relative;top:2px;\",\n    \"X .modebar.vertical\": \"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\",\n    \"X .modebar.vertical svg\": \"top:-1px;\",\n    \"X .modebar.vertical .modebar-group\": \"display:block;float:none;padding-left:0px;padding-bottom:8px;\",\n    \"X .modebar.vertical .modebar-group .modebar-btn\": \"display:block;text-align:center;\",\n    \"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%;\",\n    \"X [data-title]:hover:before,X [data-title]:hover:after\": \"display:block;opacity:1;\",\n    \"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;\",\n    \"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;\",\n    \"X .vertical [data-title]:before,X .vertical [data-title]:after\": \"top:0%;right:200%;\",\n    \"X .vertical [data-title]:before\": \"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;\",\n    \"X .select-outline\": \"fill:none;stroke-width:1;shape-rendering:crispEdges;\",\n    \"X .select-outline-1\": \"stroke:white;\",\n    \"X .select-outline-2\": \"stroke:black;stroke-dasharray:2px 2px;\",\n    Y: \"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;\",\n    \"Y p\": \"margin:0;\",\n    \"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;\",\n    \"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;\",\n    \"Y .notifier-close:hover\": \"color:#444;text-decoration:none;cursor:pointer;\"\n};\n\nfor(var selector in rules) {\n    var fullSelector = selector.replace(/^,/,' ,')\n        .replace(/X/g, '.js-plotly-plot .plotly')\n        .replace(/Y/g, '.plotly-notifier');\n    Lib.addStyleRule(fullSelector, rules[selector]);\n}\n\n},{\"../src/lib\":703}],2:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = {\n    'undo': {\n        'width': 857.1,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'home': {\n        'width': 928.6,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'camera-retro': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'zoombox': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'pan': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'zoom_plus': {\n        'width': 875,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'zoom_minus': {\n        'width': 875,\n        'height': 1000,\n        'path': 'm0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'autoscale': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'tooltip_basic': {\n        'width': 1500,\n        'height': 1000,\n        'path': 'm375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'tooltip_compare': {\n        'width': 1125,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'plotlylogo': {\n        'width': 1542,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'z-axis': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    '3d_rotate': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'camera': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'movie': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'question': {\n        'width': 857.1,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'disk': {\n        'width': 857.1,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'lasso': {\n        'width': 1031,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'selectbox': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1 0 0 -1 0 850)'\n    },\n    'spikeline': {\n        'width': 1000,\n        'height': 1000,\n        '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',\n        'transform': 'matrix(1.5 0 0 -1.5 0 850)'\n    },\n    'newplotlylogo': {\n        'name': 'newplotlylogo',\n        'svg': '<svg xmlns=\\'http://www.w3.org/2000/svg\\' viewBox=\\'0 0 132 132\\'><defs><style>.cls-1 {fill: #119dff;} .cls-2 {fill: #25fefd;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id=\\'symbol\\'><rect class=\\'cls-1\\' width=\\'132\\' height=\\'132\\' rx=\\'6\\' ry=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'78\\' cy=\\'54\\' r=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'102\\' cy=\\'30\\' r=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'78\\' cy=\\'30\\' r=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'54\\' cy=\\'30\\' r=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'30\\' cy=\\'30\\' r=\\'6\\'/><circle class=\\'cls-2\\' cx=\\'30\\' cy=\\'54\\' r=\\'6\\'/><path class=\\'cls-3\\' d=\\'M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z\\'/><path class=\\'cls-3\\' d=\\'M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z\\'/><path class=\\'cls-3\\' d=\\'M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z\\'/><path class=\\'cls-3\\' d=\\'M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z\\'/></g></svg>'\n    }\n};\n\n},{}],3:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/transforms/aggregate');\n\n},{\"../src/transforms/aggregate\":1210}],4:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/bar');\n\n},{\"../src/traces/bar\":848}],5:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/barpolar');\n\n},{\"../src/traces/barpolar\":860}],6:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/box');\n\n},{\"../src/traces/box\":870}],7:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/components/calendars');\n\n},{\"../src/components/calendars\":578}],8:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/candlestick');\n\n},{\"../src/traces/candlestick\":879}],9:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/carpet');\n\n},{\"../src/traces/carpet\":898}],10:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/choropleth');\n\n},{\"../src/traces/choropleth\":912}],11:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/cone');\n\n},{\"../src/traces/cone\":920}],12:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/contour');\n\n},{\"../src/traces/contour\":935}],13:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/contourcarpet');\n\n},{\"../src/traces/contourcarpet\":946}],14:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/core');\n\n},{\"../src/core\":682}],15:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/transforms/filter');\n\n},{\"../src/transforms/filter\":1211}],16:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/funnel');\n\n},{\"../src/traces/funnel\":958}],17:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/funnelarea');\n\n},{\"../src/traces/funnelarea\":967}],18:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/transforms/groupby');\n\n},{\"../src/transforms/groupby\":1212}],19:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/heatmap');\n\n},{\"../src/traces/heatmap\":980}],20:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/heatmapgl');\n\n},{\"../src/traces/heatmapgl\":989}],21:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/histogram');\n\n},{\"../src/traces/histogram\":1001}],22:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/histogram2d');\n\n},{\"../src/traces/histogram2d\":1007}],23:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/histogram2dcontour');\n\n},{\"../src/traces/histogram2dcontour\":1011}],24:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Plotly = _dereq_('./core');\n\n// traces\nPlotly.register([\n    _dereq_('./bar'),\n    _dereq_('./box'),\n    _dereq_('./heatmap'),\n    _dereq_('./histogram'),\n    _dereq_('./histogram2d'),\n    _dereq_('./histogram2dcontour'),\n    _dereq_('./contour'),\n    _dereq_('./scatterternary'),\n    _dereq_('./violin'),\n    _dereq_('./funnel'),\n    _dereq_('./waterfall'),\n\n    _dereq_('./pie'),\n    _dereq_('./sunburst'),\n    _dereq_('./funnelarea'),\n\n    _dereq_('./scatter3d'),\n    _dereq_('./surface'),\n    _dereq_('./isosurface'),\n    _dereq_('./volume'),\n    _dereq_('./mesh3d'),\n    _dereq_('./cone'),\n    _dereq_('./streamtube'),\n\n    _dereq_('./scattergeo'),\n    _dereq_('./choropleth'),\n\n    _dereq_('./scattergl'),\n    _dereq_('./splom'),\n\n    _dereq_('./pointcloud'),\n    _dereq_('./heatmapgl'),\n    _dereq_('./parcoords'),\n    _dereq_('./parcats'),\n    _dereq_('./scattermapbox'),\n\n    _dereq_('./sankey'),\n\n    _dereq_('./table'),\n\n    _dereq_('./carpet'),\n    _dereq_('./scattercarpet'),\n    _dereq_('./contourcarpet'),\n\n    _dereq_('./ohlc'),\n    _dereq_('./candlestick'),\n\n    _dereq_('./scatterpolar'),\n    _dereq_('./scatterpolargl'),\n    _dereq_('./barpolar')\n]);\n\n// transforms\n//\n// Please note that all *transform* methods are executed before\n// all *calcTransform* methods - which could possibly lead to\n// unexpected results when applying multiple transforms of different types\n// to a given trace.\n//\n// For more info, see:\n// https://github.com/plotly/plotly.js/pull/978#pullrequestreview-2403353\n//\nPlotly.register([\n    _dereq_('./aggregate'),\n    _dereq_('./filter'),\n    _dereq_('./groupby'),\n    _dereq_('./sort')\n]);\n\n// components\nPlotly.register([\n    _dereq_('./calendars')\n]);\n\nmodule.exports = Plotly;\n\n},{\"./aggregate\":3,\"./bar\":4,\"./barpolar\":5,\"./box\":6,\"./calendars\":7,\"./candlestick\":8,\"./carpet\":9,\"./choropleth\":10,\"./cone\":11,\"./contour\":12,\"./contourcarpet\":13,\"./core\":14,\"./filter\":15,\"./funnel\":16,\"./funnelarea\":17,\"./groupby\":18,\"./heatmap\":19,\"./heatmapgl\":20,\"./histogram\":21,\"./histogram2d\":22,\"./histogram2dcontour\":23,\"./isosurface\":25,\"./mesh3d\":26,\"./ohlc\":27,\"./parcats\":28,\"./parcoords\":29,\"./pie\":30,\"./pointcloud\":31,\"./sankey\":32,\"./scatter3d\":33,\"./scattercarpet\":34,\"./scattergeo\":35,\"./scattergl\":36,\"./scattermapbox\":37,\"./scatterpolar\":38,\"./scatterpolargl\":39,\"./scatterternary\":40,\"./sort\":41,\"./splom\":42,\"./streamtube\":43,\"./sunburst\":44,\"./surface\":45,\"./table\":46,\"./violin\":47,\"./volume\":48,\"./waterfall\":49}],25:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/isosurface');\n\n},{\"../src/traces/isosurface\":1016}],26:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/mesh3d');\n\n},{\"../src/traces/mesh3d\":1021}],27:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/ohlc');\n\n},{\"../src/traces/ohlc\":1026}],28:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/parcats');\n\n},{\"../src/traces/parcats\":1035}],29:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/parcoords');\n\n},{\"../src/traces/parcoords\":1044}],30:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/pie');\n\n},{\"../src/traces/pie\":1055}],31:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/pointcloud');\n\n},{\"../src/traces/pointcloud\":1064}],32:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/sankey');\n\n},{\"../src/traces/sankey\":1070}],33:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scatter3d');\n\n},{\"../src/traces/scatter3d\":1106}],34:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scattercarpet');\n\n},{\"../src/traces/scattercarpet\":1112}],35:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scattergeo');\n\n},{\"../src/traces/scattergeo\":1119}],36:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scattergl');\n\n},{\"../src/traces/scattergl\":1127}],37:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scattermapbox');\n\n},{\"../src/traces/scattermapbox\":1133}],38:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scatterpolar');\n\n},{\"../src/traces/scatterpolar\":1140}],39:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scatterpolargl');\n\n},{\"../src/traces/scatterpolargl\":1144}],40:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/scatterternary');\n\n},{\"../src/traces/scatterternary\":1150}],41:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/transforms/sort');\n\n},{\"../src/transforms/sort\":1214}],42:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/splom');\n\n},{\"../src/traces/splom\":1155}],43:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/streamtube');\n\n},{\"../src/traces/streamtube\":1160}],44:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/sunburst');\n\n},{\"../src/traces/sunburst\":1166}],45:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/surface');\n\n},{\"../src/traces/surface\":1175}],46:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/table');\n\n},{\"../src/traces/table\":1183}],47:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/violin');\n\n},{\"../src/traces/violin\":1191}],48:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/volume');\n\n},{\"../src/traces/volume\":1199}],49:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = _dereq_('../src/traces/waterfall');\n\n},{\"../src/traces/waterfall\":1205}],50:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createViewController\n\nvar createTurntable = _dereq_('turntable-camera-controller')\nvar createOrbit     = _dereq_('orbit-camera-controller')\nvar createMatrix    = _dereq_('matrix-camera-controller')\n\nfunction ViewController(controllers, mode) {\n  this._controllerNames = Object.keys(controllers)\n  this._controllerList = this._controllerNames.map(function(n) {\n    return controllers[n]\n  })\n  this._mode   = mode\n  this._active = controllers[mode]\n  if(!this._active) {\n    this._mode   = 'turntable'\n    this._active = controllers.turntable\n  }\n  this.modes = this._controllerNames\n  this.computedMatrix = this._active.computedMatrix\n  this.computedEye    = this._active.computedEye\n  this.computedUp     = this._active.computedUp\n  this.computedCenter = this._active.computedCenter\n  this.computedRadius = this._active.computedRadius\n}\n\nvar proto = ViewController.prototype\n\nvar COMMON_METHODS = [\n  ['flush', 1],\n  ['idle', 1],\n  ['lookAt', 4],\n  ['rotate', 4],\n  ['pan', 4],\n  ['translate', 4],\n  ['setMatrix', 2],\n  ['setDistanceLimits', 2],\n  ['setDistance', 2]\n]\n\nCOMMON_METHODS.forEach(function(method) {\n  var name = method[0]\n  var argNames = []\n  for(var i=0; i<method[1]; ++i) {\n    argNames.push('a'+i)\n  }\n  var code = 'var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i].'+method[0]+'('+argNames.join()+')}'\n  proto[name] = Function.apply(null, argNames.concat(code))\n})\n\nproto.recalcMatrix = function(t) {\n  this._active.recalcMatrix(t)\n}\n\nproto.getDistance = function(t) {\n  return this._active.getDistance(t)\n}\nproto.getDistanceLimits = function(out) {\n  return this._active.getDistanceLimits(out)\n}\n\nproto.lastT = function() {\n  return this._active.lastT()\n}\n\nproto.setMode = function(mode) {\n  if(mode === this._mode) {\n    return\n  }\n  var idx = this._controllerNames.indexOf(mode)\n  if(idx < 0) {\n    return\n  }\n  var prev  = this._active\n  var next  = this._controllerList[idx]\n  var lastT = Math.max(prev.lastT(), next.lastT())\n\n  prev.recalcMatrix(lastT)\n  next.setMatrix(lastT, prev.computedMatrix)\n  \n  this._active = next\n  this._mode   = mode\n\n  //Update matrix properties\n  this.computedMatrix = this._active.computedMatrix\n  this.computedEye    = this._active.computedEye\n  this.computedUp     = this._active.computedUp\n  this.computedCenter = this._active.computedCenter\n  this.computedRadius = this._active.computedRadius\n}\n\nproto.getMode = function() {\n  return this._mode\n}\n\nfunction createViewController(options) {\n  options = options || {}\n\n  var eye       = options.eye    || [0,0,1]\n  var center    = options.center || [0,0,0]\n  var up        = options.up     || [0,1,0]\n  var limits    = options.distanceLimits || [0, Infinity]\n  var mode      = options.mode   || 'turntable'\n\n  var turntable = createTurntable()\n  var orbit     = createOrbit()\n  var matrix    = createMatrix()\n\n  turntable.setDistanceLimits(limits[0], limits[1])\n  turntable.lookAt(0, eye, center, up)\n  orbit.setDistanceLimits(limits[0], limits[1])\n  orbit.lookAt(0, eye, center, up)\n  matrix.setDistanceLimits(limits[0], limits[1])\n  matrix.lookAt(0, eye, center, up)\n\n  return new ViewController({\n    turntable: turntable,\n    orbit: orbit,\n    matrix: matrix\n  }, mode)\n}\n},{\"matrix-camera-controller\":428,\"orbit-camera-controller\":451,\"turntable-camera-controller\":529}],51:[function(_dereq_,module,exports){\n// https://github.com/d3/d3-sankey Version 0.7.2. Copyright 2019 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, _dereq_('d3-array'), _dereq_('d3-collection'), _dereq_('d3-shape')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-shape'], factory) :\n\t(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3));\n}(this, (function (exports,d3Array,d3Collection,d3Shape) { 'use strict';\n\nfunction targetDepth(d) {\n  return d.target.depth;\n}\n\nfunction left(node) {\n  return node.depth;\n}\n\nfunction right(node, n) {\n  return n - 1 - node.height;\n}\n\nfunction justify(node, n) {\n  return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nfunction center(node) {\n  return node.targetLinks.length ? node.depth\n      : node.sourceLinks.length ? d3Array.min(node.sourceLinks, targetDepth) - 1\n      : 0;\n}\n\nfunction constant(x) {\n  return function() {\n    return x;\n  };\n}\n\nfunction ascendingSourceBreadth(a, b) {\n  return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n  return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n  return a.y0 - b.y0;\n}\n\nfunction value(d) {\n  return d.value;\n}\n\nfunction nodeCenter(node) {\n  return (node.y0 + node.y1) / 2;\n}\n\nfunction weightedSource(link) {\n  return nodeCenter(link.source) * link.value;\n}\n\nfunction weightedTarget(link) {\n  return nodeCenter(link.target) * link.value;\n}\n\nfunction defaultId(d) {\n  return d.index;\n}\n\nfunction defaultNodes(graph) {\n  return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n  return graph.links;\n}\n\nfunction find(nodeById, id) {\n  var node = nodeById.get(id);\n  if (!node) throw new Error(\"missing: \" + id);\n  return node;\n}\n\nvar sankey = function() {\n  var x0 = 0, y0 = 0, x1 = 1, y1 = 1, // extent\n      dx = 24, // nodeWidth\n      py = 8, // nodePadding\n      id = defaultId,\n      align = justify,\n      nodes = defaultNodes,\n      links = defaultLinks,\n      iterations = 32,\n      maxPaddedSpace = 2 / 3; // Defined as a fraction of the total available space\n\n  function sankey() {\n    var graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n    computeNodeLinks(graph);\n    computeNodeValues(graph);\n    computeNodeDepths(graph);\n    computeNodeBreadths(graph, iterations);\n    computeLinkBreadths(graph);\n    return graph;\n  }\n\n  sankey.update = function(graph) {\n    computeLinkBreadths(graph);\n    return graph;\n  };\n\n  sankey.nodeId = function(_) {\n    return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n  };\n\n  sankey.nodeAlign = function(_) {\n    return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n  };\n\n  sankey.nodeWidth = function(_) {\n    return arguments.length ? (dx = +_, sankey) : dx;\n  };\n\n  sankey.nodePadding = function(_) {\n    return arguments.length ? (py = +_, sankey) : py;\n  };\n\n  sankey.nodes = function(_) {\n    return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n  };\n\n  sankey.links = function(_) {\n    return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n  };\n\n  sankey.size = function(_) {\n    return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n  };\n\n  sankey.extent = function(_) {\n    return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n  };\n\n  sankey.iterations = function(_) {\n    return arguments.length ? (iterations = +_, sankey) : iterations;\n  };\n\n  // Populate the sourceLinks and targetLinks for each node.\n  // Also, if the source and target are not objects, assume they are indices.\n  function computeNodeLinks(graph) {\n    graph.nodes.forEach(function(node, i) {\n      node.index = i;\n      node.sourceLinks = [];\n      node.targetLinks = [];\n    });\n\n    var nodeById = d3Collection.map(graph.nodes, id);\n    graph.links.forEach(function(link, i) {\n      link.index = i;\n      var source = link.source, target = link.target;\n      if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n      if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n      source.sourceLinks.push(link);\n      target.targetLinks.push(link);\n    });\n  }\n\n  // Compute the value (size) of each node by summing the associated links.\n  function computeNodeValues(graph) {\n    graph.nodes.forEach(function(node) {\n      node.value = Math.max(\n        d3Array.sum(node.sourceLinks, value),\n        d3Array.sum(node.targetLinks, value)\n      );\n    });\n  }\n\n  // Iteratively assign the depth (x-position) for each node.\n  // Nodes are assigned the maximum depth of incoming neighbors plus one;\n  // nodes with no incoming links are assigned depth zero, while\n  // nodes with no outgoing links are assigned the maximum depth.\n  function computeNodeDepths(graph) {\n    var nodes, next, x;\n\n    for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n      nodes.forEach(function(node) {\n        node.depth = x;\n        node.sourceLinks.forEach(function(link) {\n          if (next.indexOf(link.target) < 0) {\n            next.push(link.target);\n          }\n        });\n      });\n    }\n\n    for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n      nodes.forEach(function(node) {\n        node.height = x;\n        node.targetLinks.forEach(function(link) {\n          if (next.indexOf(link.source) < 0) {\n            next.push(link.source);\n          }\n        });\n      });\n    }\n\n    var kx = (x1 - x0 - dx) / (x - 1);\n    graph.nodes.forEach(function(node) {\n      node.x1 = (node.x0 = x0 + Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))) * kx) + dx;\n    });\n  }\n\n  function computeNodeBreadths(graph) {\n    var columns = d3Collection.nest()\n        .key(function(d) { return d.x0; })\n        .sortKeys(d3Array.ascending)\n        .entries(graph.nodes)\n        .map(function(d) { return d.values; });\n\n    //\n    initializeNodeBreadth();\n    resolveCollisions();\n    for (var alpha = 1, n = iterations; n > 0; --n) {\n      relaxRightToLeft(alpha *= 0.99);\n      resolveCollisions();\n      relaxLeftToRight(alpha);\n      resolveCollisions();\n    }\n\n    function initializeNodeBreadth() {\n      var L = d3Array.max(columns, function(nodes) {\n        return nodes.length;\n      });\n      var maxNodePadding = maxPaddedSpace * (y1 - y0) / (L - 1);\n      if(py > maxNodePadding) py = maxNodePadding;\n      var ky = d3Array.min(columns, function(nodes) {\n        return (y1 - y0 - (nodes.length - 1) * py) / d3Array.sum(nodes, value);\n      });\n\n      columns.forEach(function(nodes) {\n        nodes.forEach(function(node, i) {\n          node.y1 = (node.y0 = i) + node.value * ky;\n        });\n      });\n\n      graph.links.forEach(function(link) {\n        link.width = link.value * ky;\n      });\n    }\n\n    function relaxLeftToRight(alpha) {\n      columns.forEach(function(nodes) {\n        nodes.forEach(function(node) {\n          if (node.targetLinks.length) {\n            var dy = (d3Array.sum(node.targetLinks, weightedSource) / d3Array.sum(node.targetLinks, value) - nodeCenter(node)) * alpha;\n            node.y0 += dy, node.y1 += dy;\n          }\n        });\n      });\n    }\n\n    function relaxRightToLeft(alpha) {\n      columns.slice().reverse().forEach(function(nodes) {\n        nodes.forEach(function(node) {\n          if (node.sourceLinks.length) {\n            var dy = (d3Array.sum(node.sourceLinks, weightedTarget) / d3Array.sum(node.sourceLinks, value) - nodeCenter(node)) * alpha;\n            node.y0 += dy, node.y1 += dy;\n          }\n        });\n      });\n    }\n\n    function resolveCollisions() {\n      columns.forEach(function(nodes) {\n        var node,\n            dy,\n            y = y0,\n            n = nodes.length,\n            i;\n\n        // Push any overlapping nodes down.\n        nodes.sort(ascendingBreadth);\n        for (i = 0; i < n; ++i) {\n          node = nodes[i];\n          dy = y - node.y0;\n          if (dy > 0) node.y0 += dy, node.y1 += dy;\n          y = node.y1 + py;\n        }\n\n        // If the bottommost node goes outside the bounds, push it back up.\n        dy = y - py - y1;\n        if (dy > 0) {\n          y = (node.y0 -= dy), node.y1 -= dy;\n\n          // Push any overlapping nodes back up.\n          for (i = n - 2; i >= 0; --i) {\n            node = nodes[i];\n            dy = node.y1 + py - y;\n            if (dy > 0) node.y0 -= dy, node.y1 -= dy;\n            y = node.y0;\n          }\n        }\n      });\n    }\n  }\n\n  function computeLinkBreadths(graph) {\n    graph.nodes.forEach(function(node) {\n      node.sourceLinks.sort(ascendingTargetBreadth);\n      node.targetLinks.sort(ascendingSourceBreadth);\n    });\n    graph.nodes.forEach(function(node) {\n      var y0 = node.y0, y1 = y0;\n      node.sourceLinks.forEach(function(link) {\n        link.y0 = y0 + link.width / 2, y0 += link.width;\n      });\n      node.targetLinks.forEach(function(link) {\n        link.y1 = y1 + link.width / 2, y1 += link.width;\n      });\n    });\n  }\n\n  return sankey;\n};\n\nfunction horizontalSource(d) {\n  return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n  return [d.target.x0, d.y1];\n}\n\nvar sankeyLinkHorizontal = function() {\n  return d3Shape.linkHorizontal()\n      .source(horizontalSource)\n      .target(horizontalTarget);\n};\n\nexports.sankey = sankey;\nexports.sankeyCenter = center;\nexports.sankeyLeft = left;\nexports.sankeyRight = right;\nexports.sankeyJustify = justify;\nexports.sankeyLinkHorizontal = sankeyLinkHorizontal;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{\"d3-array\":145,\"d3-collection\":146,\"d3-shape\":155}],52:[function(_dereq_,module,exports){\n'use strict'\n\nvar weakMap      = typeof WeakMap === 'undefined' ? _dereq_('weak-map') : WeakMap\nvar createBuffer = _dereq_('gl-buffer')\nvar createVAO    = _dereq_('gl-vao')\n\nvar TriangleCache = new weakMap()\n\nfunction createABigTriangle(gl) {\n\n  var triangleVAO = TriangleCache.get(gl)\n  var handle = triangleVAO && (triangleVAO._triangleBuffer.handle || triangleVAO._triangleBuffer.buffer)\n  if(!handle || !gl.isBuffer(handle)) {\n    var buf = createBuffer(gl, new Float32Array([-1, -1, -1, 4, 4, -1]))\n    triangleVAO = createVAO(gl, [\n      { buffer: buf,\n        type: gl.FLOAT,\n        size: 2\n      }\n    ])\n    triangleVAO._triangleBuffer = buf\n    TriangleCache.set(gl, triangleVAO)\n  }\n  triangleVAO.bind()\n  gl.drawArrays(gl.TRIANGLES, 0, 3)\n  triangleVAO.unbind()\n}\n\nmodule.exports = createABigTriangle\n\n},{\"gl-buffer\":240,\"gl-vao\":322,\"weak-map\":539}],53:[function(_dereq_,module,exports){\n\nmodule.exports = absolutize\n\n/**\n * redefine `path` with absolute coordinates\n *\n * @param {Array} path\n * @return {Array}\n */\n\nfunction absolutize(path){\n\tvar startX = 0\n\tvar startY = 0\n\tvar x = 0\n\tvar y = 0\n\n\treturn path.map(function(seg){\n\t\tseg = seg.slice()\n\t\tvar type = seg[0]\n\t\tvar command = type.toUpperCase()\n\n\t\t// is relative\n\t\tif (type != command) {\n\t\t\tseg[0] = command\n\t\t\tswitch (type) {\n\t\t\t\tcase 'a':\n\t\t\t\t\tseg[6] += x\n\t\t\t\t\tseg[7] += y\n\t\t\t\t\tbreak\n\t\t\t\tcase 'v':\n\t\t\t\t\tseg[1] += y\n\t\t\t\t\tbreak\n\t\t\t\tcase 'h':\n\t\t\t\t\tseg[1] += x\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\tfor (var i = 1; i < seg.length;) {\n\t\t\t\t\t\tseg[i++] += x\n\t\t\t\t\t\tseg[i++] += y\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update cursor state\n\t\tswitch (command) {\n\t\t\tcase 'Z':\n\t\t\t\tx = startX\n\t\t\t\ty = startY\n\t\t\t\tbreak\n\t\t\tcase 'H':\n\t\t\t\tx = seg[1]\n\t\t\t\tbreak\n\t\t\tcase 'V':\n\t\t\t\ty = seg[1]\n\t\t\t\tbreak\n\t\t\tcase 'M':\n\t\t\t\tx = startX = seg[1]\n\t\t\t\ty = startY = seg[2]\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tx = seg[seg.length - 2]\n\t\t\t\ty = seg[seg.length - 1]\n\t\t}\n\n\t\treturn seg\n\t})\n}\n\n},{}],54:[function(_dereq_,module,exports){\nvar padLeft = _dereq_('pad-left')\n\nmodule.exports = addLineNumbers\nfunction addLineNumbers (string, start, delim) {\n  start = typeof start === 'number' ? start : 1\n  delim = delim || ': '\n\n  var lines = string.split(/\\r?\\n/)\n  var totalDigits = String(lines.length + start - 1).length\n  return lines.map(function (line, i) {\n    var c = i + start\n    var digits = String(c).length\n    var prefix = padLeft(c, totalDigits - digits)\n    return prefix + delim + line\n  }).join('\\n')\n}\n\n},{\"pad-left\":452}],55:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = affineHull\n\nvar orient = _dereq_('robust-orientation')\n\nfunction linearlyIndependent(points, d) {\n  var nhull = new Array(d+1)\n  for(var i=0; i<points.length; ++i) {\n    nhull[i] = points[i]\n  }\n  for(var i=0; i<=points.length; ++i) {\n    for(var j=points.length; j<=d; ++j) {\n      var x = new Array(d)\n      for(var k=0; k<d; ++k) {\n        x[k] = Math.pow(j+1-i, k)\n      }\n      nhull[j] = x\n    }\n    var o = orient.apply(void 0, nhull)\n    if(o) {\n      return true\n    }\n  }\n  return false\n}\n\nfunction affineHull(points) {\n  var n = points.length\n  if(n === 0) {\n    return []\n  }\n  if(n === 1) {\n    return [0]\n  }\n  var d = points[0].length\n  var frame = [ points[0] ]\n  var index = [ 0 ]\n  for(var i=1; i<n; ++i) {\n    frame.push(points[i])\n    if(!linearlyIndependent(frame, d)) {\n      frame.pop()\n      continue\n    }\n    index.push(i)\n    if(index.length === d+1) {\n      return index\n    }\n  }\n  return index\n}\n},{\"robust-orientation\":497}],56:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = alphaComplex\n\nvar delaunay = _dereq_('delaunay-triangulate')\nvar circumradius = _dereq_('circumradius')\n\nfunction alphaComplex(alpha, points) {\n  return delaunay(points).filter(function(cell) {\n    var simplex = new Array(cell.length)\n    for(var i=0; i<cell.length; ++i) {\n      simplex[i] = points[cell[i]]\n    }\n    return circumradius(simplex) * alpha < 1\n  })\n}\n},{\"circumradius\":107,\"delaunay-triangulate\":159}],57:[function(_dereq_,module,exports){\nmodule.exports = alphaShape\n\nvar ac = _dereq_('alpha-complex')\nvar bnd = _dereq_('simplicial-complex-boundary')\n\nfunction alphaShape(alpha, points) {\n  return bnd(ac(alpha, points))\n}\n},{\"alpha-complex\":56,\"simplicial-complex-boundary\":504}],58:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = normalize;\r\n\r\nfunction normalize (arr, dim) {\r\n\tif (!arr || arr.length == null) throw Error('Argument should be an array')\r\n\r\n\tif (dim == null) dim = 1\r\n\telse dim = Math.floor(dim)\r\n\r\n\tvar bounds = Array(dim * 2)\r\n\r\n\tfor (var offset = 0; offset < dim; offset++) {\r\n\t\tvar max = -Infinity, min = Infinity, i = offset, l = arr.length;\r\n\r\n\t\tfor (; i < l; i+=dim) {\r\n\t\t\tif (arr[i] > max) max = arr[i];\r\n\t\t\tif (arr[i] < min) min = arr[i];\r\n\t\t}\r\n\r\n\t\tbounds[offset] = min\r\n\t\tbounds[dim + offset] = max\r\n\t}\r\n\r\n\treturn bounds;\r\n}\r\n\n},{}],59:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar getBounds = _dereq_('array-bounds')\r\n\r\nmodule.exports = normalize;\r\n\r\nfunction normalize (arr, dim, bounds) {\r\n\tif (!arr || arr.length == null) throw Error('Argument should be an array')\r\n\r\n\tif (dim == null) dim = 1\r\n\tif (bounds == null) bounds = getBounds(arr, dim)\r\n\r\n\tfor (var offset = 0; offset < dim; offset++) {\r\n\t\tvar max = bounds[dim + offset], min = bounds[offset], i = offset, l = arr.length;\r\n\r\n\t\tif (max === Infinity && min === -Infinity) {\r\n\t\t\tfor (i = offset; i < l; i+=dim) {\r\n\t\t\t\tarr[i] = arr[i] === max ? 1 : arr[i] === min ? 0 : .5\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (max === Infinity) {\r\n\t\t\tfor (i = offset; i < l; i+=dim) {\r\n\t\t\t\tarr[i] = arr[i] === max ? 1 : 0\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (min === -Infinity) {\r\n\t\t\tfor (i = offset; i < l; i+=dim) {\r\n\t\t\t\tarr[i] = arr[i] === min ? 0 : 1\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tvar range = max - min\r\n\t\t\tfor (i = offset; i < l; i+=dim) {\r\n\t\t\t\tarr[i] = range === 0 ? .5 : (arr[i] - min) / range\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn arr;\r\n}\r\n\n},{\"array-bounds\":58}],60:[function(_dereq_,module,exports){\n\nmodule.exports = function newArray(start, end) {\n    var n0 = typeof start === 'number',\n        n1 = typeof end === 'number'\n\n    if (n0 && !n1) {\n        end = start\n        start = 0\n    } else if (!n0 && !n1) {\n        start = 0\n        end = 0\n    }\n\n    start = start|0\n    end = end|0\n    var len = end-start\n    if (len<0)\n        throw new Error('array length must be positive')\n    \n    var a = new Array(len)\n    for (var i=0, c=start; i<len; i++, c++)\n        a[i] = c\n    return a\n}\n},{}],61:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\n\n// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\nfunction compare(a, b) {\n  if (a === b) {\n    return 0;\n  }\n\n  var x = a.length;\n  var y = b.length;\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i];\n      y = b[i];\n      break;\n    }\n  }\n\n  if (x < y) {\n    return -1;\n  }\n  if (y < x) {\n    return 1;\n  }\n  return 0;\n}\nfunction isBuffer(b) {\n  if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {\n    return global.Buffer.isBuffer(b);\n  }\n  return !!(b != null && b._isBuffer);\n}\n\n// based on node assert, original notice:\n\n// http://wiki.commonjs.org/wiki/Unit_Testing/1.0\n//\n// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!\n//\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar util = _dereq_('util/');\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar pSlice = Array.prototype.slice;\nvar functionsHaveNames = (function () {\n  return function foo() {}.name === 'foo';\n}());\nfunction pToString (obj) {\n  return Object.prototype.toString.call(obj);\n}\nfunction isView(arrbuf) {\n  if (isBuffer(arrbuf)) {\n    return false;\n  }\n  if (typeof global.ArrayBuffer !== 'function') {\n    return false;\n  }\n  if (typeof ArrayBuffer.isView === 'function') {\n    return ArrayBuffer.isView(arrbuf);\n  }\n  if (!arrbuf) {\n    return false;\n  }\n  if (arrbuf instanceof DataView) {\n    return true;\n  }\n  if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {\n    return true;\n  }\n  return false;\n}\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n//                             actual: actual,\n//                             expected: expected })\n\nvar regex = /\\s*function\\s+([^\\(\\s]*)\\s*/;\n// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js\nfunction getName(func) {\n  if (!util.isFunction(func)) {\n    return;\n  }\n  if (functionsHaveNames) {\n    return func.name;\n  }\n  var str = func.toString();\n  var match = str.match(regex);\n  return match && match[1];\n}\nassert.AssertionError = function AssertionError(options) {\n  this.name = 'AssertionError';\n  this.actual = options.actual;\n  this.expected = options.expected;\n  this.operator = options.operator;\n  if (options.message) {\n    this.message = options.message;\n    this.generatedMessage = false;\n  } else {\n    this.message = getMessage(this);\n    this.generatedMessage = true;\n  }\n  var stackStartFunction = options.stackStartFunction || fail;\n  if (Error.captureStackTrace) {\n    Error.captureStackTrace(this, stackStartFunction);\n  } else {\n    // non v8 browsers so we can have a stacktrace\n    var err = new Error();\n    if (err.stack) {\n      var out = err.stack;\n\n      // try to strip useless frames\n      var fn_name = getName(stackStartFunction);\n      var idx = out.indexOf('\\n' + fn_name);\n      if (idx >= 0) {\n        // once we have located the function frame\n        // we need to strip out everything before it (and its line)\n        var next_line = out.indexOf('\\n', idx + 1);\n        out = out.substring(next_line + 1);\n      }\n\n      this.stack = out;\n    }\n  }\n};\n\n// assert.AssertionError instanceof Error\nutil.inherits(assert.AssertionError, Error);\n\nfunction truncate(s, n) {\n  if (typeof s === 'string') {\n    return s.length < n ? s : s.slice(0, n);\n  } else {\n    return s;\n  }\n}\nfunction inspect(something) {\n  if (functionsHaveNames || !util.isFunction(something)) {\n    return util.inspect(something);\n  }\n  var rawname = getName(something);\n  var name = rawname ? ': ' + rawname : '';\n  return '[Function' +  name + ']';\n}\nfunction getMessage(self) {\n  return truncate(inspect(self.actual), 128) + ' ' +\n         self.operator + ' ' +\n         truncate(inspect(self.expected), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided.  All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n  throw new assert.AssertionError({\n    message: message,\n    actual: actual,\n    expected: expected,\n    operator: operator,\n    stackStartFunction: stackStartFunction\n  });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n  if (!value) fail(value, true, message, '==', assert.ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\n\nassert.equal = function equal(actual, expected, message) {\n  if (actual != expected) fail(actual, expected, message, '==', assert.equal);\n};\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\n\nassert.notEqual = function notEqual(actual, expected, message) {\n  if (actual == expected) {\n    fail(actual, expected, message, '!=', assert.notEqual);\n  }\n};\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n  if (!_deepEqual(actual, expected, false)) {\n    fail(actual, expected, message, 'deepEqual', assert.deepEqual);\n  }\n};\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n  if (!_deepEqual(actual, expected, true)) {\n    fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);\n  }\n};\n\nfunction _deepEqual(actual, expected, strict, memos) {\n  // 7.1. All identical values are equivalent, as determined by ===.\n  if (actual === expected) {\n    return true;\n  } else if (isBuffer(actual) && isBuffer(expected)) {\n    return compare(actual, expected) === 0;\n\n  // 7.2. If the expected value is a Date object, the actual value is\n  // equivalent if it is also a Date object that refers to the same time.\n  } else if (util.isDate(actual) && util.isDate(expected)) {\n    return actual.getTime() === expected.getTime();\n\n  // 7.3 If the expected value is a RegExp object, the actual value is\n  // equivalent if it is also a RegExp object with the same source and\n  // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n  } else if (util.isRegExp(actual) && util.isRegExp(expected)) {\n    return actual.source === expected.source &&\n           actual.global === expected.global &&\n           actual.multiline === expected.multiline &&\n           actual.lastIndex === expected.lastIndex &&\n           actual.ignoreCase === expected.ignoreCase;\n\n  // 7.4. Other pairs that do not both pass typeof value == 'object',\n  // equivalence is determined by ==.\n  } else if ((actual === null || typeof actual !== 'object') &&\n             (expected === null || typeof expected !== 'object')) {\n    return strict ? actual === expected : actual == expected;\n\n  // If both values are instances of typed arrays, wrap their underlying\n  // ArrayBuffers in a Buffer each to increase performance\n  // This optimization requires the arrays to have the same type as checked by\n  // Object.prototype.toString (aka pToString). Never perform binary\n  // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their\n  // bit patterns are not identical.\n  } else if (isView(actual) && isView(expected) &&\n             pToString(actual) === pToString(expected) &&\n             !(actual instanceof Float32Array ||\n               actual instanceof Float64Array)) {\n    return compare(new Uint8Array(actual.buffer),\n                   new Uint8Array(expected.buffer)) === 0;\n\n  // 7.5 For all other Object pairs, including Array objects, equivalence is\n  // determined by having the same number of owned properties (as verified\n  // with Object.prototype.hasOwnProperty.call), the same set of keys\n  // (although not necessarily the same order), equivalent values for every\n  // corresponding key, and an identical 'prototype' property. Note: this\n  // accounts for both named and indexed properties on Arrays.\n  } else if (isBuffer(actual) !== isBuffer(expected)) {\n    return false;\n  } else {\n    memos = memos || {actual: [], expected: []};\n\n    var actualIndex = memos.actual.indexOf(actual);\n    if (actualIndex !== -1) {\n      if (actualIndex === memos.expected.indexOf(expected)) {\n        return true;\n      }\n    }\n\n    memos.actual.push(actual);\n    memos.expected.push(expected);\n\n    return objEquiv(actual, expected, strict, memos);\n  }\n}\n\nfunction isArguments(object) {\n  return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b, strict, actualVisitedObjects) {\n  if (a === null || a === undefined || b === null || b === undefined)\n    return false;\n  // if one is a primitive, the other must be same\n  if (util.isPrimitive(a) || util.isPrimitive(b))\n    return a === b;\n  if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n    return false;\n  var aIsArgs = isArguments(a);\n  var bIsArgs = isArguments(b);\n  if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n    return false;\n  if (aIsArgs) {\n    a = pSlice.call(a);\n    b = pSlice.call(b);\n    return _deepEqual(a, b, strict);\n  }\n  var ka = objectKeys(a);\n  var kb = objectKeys(b);\n  var key, i;\n  // having the same number of owned properties (keys incorporates\n  // hasOwnProperty)\n  if (ka.length !== kb.length)\n    return false;\n  //the same set of keys (although not necessarily the same order),\n  ka.sort();\n  kb.sort();\n  //~~~cheap key test\n  for (i = ka.length - 1; i >= 0; i--) {\n    if (ka[i] !== kb[i])\n      return false;\n  }\n  //equivalent values for every corresponding key, and\n  //~~~possibly expensive deep test\n  for (i = ka.length - 1; i >= 0; i--) {\n    key = ka[i];\n    if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))\n      return false;\n  }\n  return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n  if (_deepEqual(actual, expected, false)) {\n    fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);\n  }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n  if (_deepEqual(actual, expected, true)) {\n    fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);\n  }\n}\n\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n  if (actual !== expected) {\n    fail(actual, expected, message, '===', assert.strictEqual);\n  }\n};\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==.  assert.notStrictEqual(actual, expected, message_opt);\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n  if (actual === expected) {\n    fail(actual, expected, message, '!==', assert.notStrictEqual);\n  }\n};\n\nfunction expectedException(actual, expected) {\n  if (!actual || !expected) {\n    return false;\n  }\n\n  if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n    return expected.test(actual);\n  }\n\n  try {\n    if (actual instanceof expected) {\n      return true;\n    }\n  } catch (e) {\n    // Ignore.  The instanceof check doesn't work for arrow functions.\n  }\n\n  if (Error.isPrototypeOf(expected)) {\n    return false;\n  }\n\n  return expected.call({}, actual) === true;\n}\n\nfunction _tryBlock(block) {\n  var error;\n  try {\n    block();\n  } catch (e) {\n    error = e;\n  }\n  return error;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n  var actual;\n\n  if (typeof block !== 'function') {\n    throw new TypeError('\"block\" argument must be a function');\n  }\n\n  if (typeof expected === 'string') {\n    message = expected;\n    expected = null;\n  }\n\n  actual = _tryBlock(block);\n\n  message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n            (message ? ' ' + message : '.');\n\n  if (shouldThrow && !actual) {\n    fail(actual, expected, 'Missing expected exception' + message);\n  }\n\n  var userProvidedMessage = typeof message === 'string';\n  var isUnwantedException = !shouldThrow && util.isError(actual);\n  var isUnexpectedException = !shouldThrow && actual && !expected;\n\n  if ((isUnwantedException &&\n      userProvidedMessage &&\n      expectedException(actual, expected)) ||\n      isUnexpectedException) {\n    fail(actual, expected, 'Got unwanted exception' + message);\n  }\n\n  if ((shouldThrow && actual && expected &&\n      !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n    throw actual;\n  }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\n\nassert.throws = function(block, /*optional*/error, /*optional*/message) {\n  _throws(true, block, error, message);\n};\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {\n  _throws(false, block, error, message);\n};\n\nassert.ifError = function(err) { if (err) throw err; };\n\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    if (hasOwn.call(obj, key)) keys.push(key);\n  }\n  return keys;\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"util/\":64}],62:[function(_dereq_,module,exports){\nif (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n\n},{}],63:[function(_dereq_,module,exports){\nmodule.exports = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n}\n},{}],64:[function(_dereq_,module,exports){\n(function (process,global){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n  // Allow for deprecating things in the process of starting up.\n  if (isUndefined(global.process)) {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  if (process.noDeprecation === true) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = process.env.NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = process.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    exports._extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== exports.inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = _dereq_('./support/isBuffer');\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = _dereq_('inherits');\n\nexports._extend = function(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n}).call(this,_dereq_('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./support/isBuffer\":63,\"_process\":477,\"inherits\":62}],65:[function(_dereq_,module,exports){\nmodule.exports = function _atob(str) {\n  return atob(str)\n}\n\n},{}],66:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = barycentric\n\nvar solve = _dereq_('robust-linear-solve')\n\nfunction reduce(x) {\n  var r = 0\n  for(var i=0; i<x.length; ++i) {\n    r += x[i]\n  }\n  return r\n}\n\nfunction barycentric(simplex, point) {\n  var d = point.length\n  var A = new Array(d+1)\n  for(var i=0; i<d; ++i) {\n    var row = new Array(d+1)\n    for(var j=0; j<=d; ++j) {\n      row[j] = simplex[j][i]\n    }\n    A[i] = row\n  }\n  A[d] = new Array(d+1)\n  for(var i=0; i<=d; ++i) {\n    A[d][i] = 1\n  }\n\n  var b = new Array(d+1)\n  for(var i=0; i<d; ++i) {\n    b[i] = point[i]\n  }\n  b[d] = 1.0\n\n  var x = solve(A, b)\n  var w = reduce(x[d+1])\n  \n  if(w === 0) {\n    w = 1.0\n  }\n  var y = new Array(d+1)\n  for(var i=0; i<=d; ++i) {\n    y[i] = reduce(x[i]) / w\n  }\n  return y\n}\n},{\"robust-linear-solve\":496}],67:[function(_dereq_,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  for (var i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n\n},{}],68:[function(_dereq_,module,exports){\n'use strict'\n\nvar rationalize = _dereq_('./lib/rationalize')\n\nmodule.exports = add\n\nfunction add(a, b) {\n  return rationalize(\n    a[0].mul(b[1]).add(b[0].mul(a[1])),\n    a[1].mul(b[1]))\n}\n\n},{\"./lib/rationalize\":78}],69:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = cmp\n\nfunction cmp(a, b) {\n    return a[0].mul(b[1]).cmp(b[0].mul(a[1]))\n}\n\n},{}],70:[function(_dereq_,module,exports){\n'use strict'\n\nvar rationalize = _dereq_('./lib/rationalize')\n\nmodule.exports = div\n\nfunction div(a, b) {\n  return rationalize(a[0].mul(b[1]), a[1].mul(b[0]))\n}\n\n},{\"./lib/rationalize\":78}],71:[function(_dereq_,module,exports){\n'use strict'\n\nvar isRat = _dereq_('./is-rat')\nvar isBN = _dereq_('./lib/is-bn')\nvar num2bn = _dereq_('./lib/num-to-bn')\nvar str2bn = _dereq_('./lib/str-to-bn')\nvar rationalize = _dereq_('./lib/rationalize')\nvar div = _dereq_('./div')\n\nmodule.exports = makeRational\n\nfunction makeRational(numer, denom) {\n  if(isRat(numer)) {\n    if(denom) {\n      return div(numer, makeRational(denom))\n    }\n    return [numer[0].clone(), numer[1].clone()]\n  }\n  var shift = 0\n  var a, b\n  if(isBN(numer)) {\n    a = numer.clone()\n  } else if(typeof numer === 'string') {\n    a = str2bn(numer)\n  } else if(numer === 0) {\n    return [num2bn(0), num2bn(1)]\n  } else if(numer === Math.floor(numer)) {\n    a = num2bn(numer)\n  } else {\n    while(numer !== Math.floor(numer)) {\n      numer = numer * Math.pow(2, 256)\n      shift -= 256\n    }\n    a = num2bn(numer)\n  }\n  if(isRat(denom)) {\n    a.mul(denom[1])\n    b = denom[0].clone()\n  } else if(isBN(denom)) {\n    b = denom.clone()\n  } else if(typeof denom === 'string') {\n    b = str2bn(denom)\n  } else if(!denom) {\n    b = num2bn(1)\n  } else if(denom === Math.floor(denom)) {\n    b = num2bn(denom)\n  } else {\n    while(denom !== Math.floor(denom)) {\n      denom = denom * Math.pow(2, 256)\n      shift += 256\n    }\n    b = num2bn(denom)\n  }\n  if(shift > 0) {\n    a = a.ushln(shift)\n  } else if(shift < 0) {\n    b = b.ushln(-shift)\n  }\n  return rationalize(a, b)\n}\n\n},{\"./div\":70,\"./is-rat\":72,\"./lib/is-bn\":76,\"./lib/num-to-bn\":77,\"./lib/rationalize\":78,\"./lib/str-to-bn\":79}],72:[function(_dereq_,module,exports){\n'use strict'\n\nvar isBN = _dereq_('./lib/is-bn')\n\nmodule.exports = isRat\n\nfunction isRat(x) {\n  return Array.isArray(x) && x.length === 2 && isBN(x[0]) && isBN(x[1])\n}\n\n},{\"./lib/is-bn\":76}],73:[function(_dereq_,module,exports){\n'use strict'\n\nvar BN = _dereq_('bn.js')\n\nmodule.exports = sign\n\nfunction sign (x) {\n  return x.cmp(new BN(0))\n}\n\n},{\"bn.js\":87}],74:[function(_dereq_,module,exports){\n'use strict'\n\nvar sign = _dereq_('./bn-sign')\n\nmodule.exports = bn2num\n\n//TODO: Make this better\nfunction bn2num(b) {\n  var l = b.length\n  var words = b.words\n  var out = 0\n  if (l === 1) {\n    out = words[0]\n  } else if (l === 2) {\n    out = words[0] + (words[1] * 0x4000000)\n  } else {\n    for (var i = 0; i < l; i++) {\n      var w = words[i]\n      out += w * Math.pow(0x4000000, i)\n    }\n  }\n  return sign(b) * out\n}\n\n},{\"./bn-sign\":73}],75:[function(_dereq_,module,exports){\n'use strict'\n\nvar db = _dereq_('double-bits')\nvar ctz = _dereq_('bit-twiddle').countTrailingZeros\n\nmodule.exports = ctzNumber\n\n//Counts the number of trailing zeros\nfunction ctzNumber(x) {\n  var l = ctz(db.lo(x))\n  if(l < 32) {\n    return l\n  }\n  var h = ctz(db.hi(x))\n  if(h > 20) {\n    return 52\n  }\n  return h + 32\n}\n\n},{\"bit-twiddle\":85,\"double-bits\":161}],76:[function(_dereq_,module,exports){\n'use strict'\n\nvar BN = _dereq_('bn.js')\n\nmodule.exports = isBN\n\n//Test if x is a bignumber\n//FIXME: obviously this is the wrong way to do it\nfunction isBN(x) {\n  return x && typeof x === 'object' && Boolean(x.words)\n}\n\n},{\"bn.js\":87}],77:[function(_dereq_,module,exports){\n'use strict'\n\nvar BN = _dereq_('bn.js')\nvar db = _dereq_('double-bits')\n\nmodule.exports = num2bn\n\nfunction num2bn(x) {\n  var e = db.exponent(x)\n  if(e < 52) {\n    return new BN(x)\n  } else {\n    return (new BN(x * Math.pow(2, 52-e))).ushln(e-52)\n  }\n}\n\n},{\"bn.js\":87,\"double-bits\":161}],78:[function(_dereq_,module,exports){\n'use strict'\n\nvar num2bn = _dereq_('./num-to-bn')\nvar sign = _dereq_('./bn-sign')\n\nmodule.exports = rationalize\n\nfunction rationalize(numer, denom) {\n  var snumer = sign(numer)\n  var sdenom = sign(denom)\n  if(snumer === 0) {\n    return [num2bn(0), num2bn(1)]\n  }\n  if(sdenom === 0) {\n    return [num2bn(0), num2bn(0)]\n  }\n  if(sdenom < 0) {\n    numer = numer.neg()\n    denom = denom.neg()\n  }\n  var d = numer.gcd(denom)\n  if(d.cmpn(1)) {\n    return [ numer.div(d), denom.div(d) ]\n  }\n  return [ numer, denom ]\n}\n\n},{\"./bn-sign\":73,\"./num-to-bn\":77}],79:[function(_dereq_,module,exports){\n'use strict'\n\nvar BN = _dereq_('bn.js')\n\nmodule.exports = str2BN\n\nfunction str2BN(x) {\n  return new BN(x)\n}\n\n},{\"bn.js\":87}],80:[function(_dereq_,module,exports){\n'use strict'\n\nvar rationalize = _dereq_('./lib/rationalize')\n\nmodule.exports = mul\n\nfunction mul(a, b) {\n  return rationalize(a[0].mul(b[0]), a[1].mul(b[1]))\n}\n\n},{\"./lib/rationalize\":78}],81:[function(_dereq_,module,exports){\n'use strict'\n\nvar bnsign = _dereq_('./lib/bn-sign')\n\nmodule.exports = sign\n\nfunction sign(x) {\n  return bnsign(x[0]) * bnsign(x[1])\n}\n\n},{\"./lib/bn-sign\":73}],82:[function(_dereq_,module,exports){\n'use strict'\n\nvar rationalize = _dereq_('./lib/rationalize')\n\nmodule.exports = sub\n\nfunction sub(a, b) {\n  return rationalize(a[0].mul(b[1]).sub(a[1].mul(b[0])), a[1].mul(b[1]))\n}\n\n},{\"./lib/rationalize\":78}],83:[function(_dereq_,module,exports){\n'use strict'\n\nvar bn2num = _dereq_('./lib/bn-to-num')\nvar ctz = _dereq_('./lib/ctz')\n\nmodule.exports = roundRat\n\n// Round a rational to the closest float\nfunction roundRat (f) {\n  var a = f[0]\n  var b = f[1]\n  if (a.cmpn(0) === 0) {\n    return 0\n  }\n  var h = a.abs().divmod(b.abs())\n  var iv = h.div\n  var x = bn2num(iv)\n  var ir = h.mod\n  var sgn = (a.negative !== b.negative) ? -1 : 1\n  if (ir.cmpn(0) === 0) {\n    return sgn * x\n  }\n  if (x) {\n    var s = ctz(x) + 4\n    var y = bn2num(ir.ushln(s).divRound(b))\n    return sgn * (x + y * Math.pow(2, -s))\n  } else {\n    var ybits = b.bitLength() - ir.bitLength() + 53\n    var y = bn2num(ir.ushln(ybits).divRound(b))\n    if (ybits < 1023) {\n      return sgn * y * Math.pow(2, -ybits)\n    }\n    y *= Math.pow(2, -1023)\n    return sgn * y * Math.pow(2, 1023 - ybits)\n  }\n}\n\n},{\"./lib/bn-to-num\":74,\"./lib/ctz\":75}],84:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction compileSearch(funcName, predicate, reversed, extraArgs, useNdarray, earlyOut) {\n  var code = [\n    \"function \", funcName, \"(a,l,h,\", extraArgs.join(\",\"),  \"){\",\nearlyOut ? \"\" : \"var i=\", (reversed ? \"l-1\" : \"h+1\"),\n\";while(l<=h){\\\nvar m=(l+h)>>>1,x=a\", useNdarray ? \".get(m)\" : \"[m]\"]\n  if(earlyOut) {\n    if(predicate.indexOf(\"c\") < 0) {\n      code.push(\";if(x===y){return m}else if(x<=y){\")\n    } else {\n      code.push(\";var p=c(x,y);if(p===0){return m}else if(p<=0){\")\n    }\n  } else {\n    code.push(\";if(\", predicate, \"){i=m;\")\n  }\n  if(reversed) {\n    code.push(\"l=m+1}else{h=m-1}\")\n  } else {\n    code.push(\"h=m-1}else{l=m+1}\")\n  }\n  code.push(\"}\")\n  if(earlyOut) {\n    code.push(\"return -1};\")\n  } else {\n    code.push(\"return i};\")\n  }\n  return code.join(\"\")\n}\n\nfunction compileBoundsSearch(predicate, reversed, suffix, earlyOut) {\n  var result = new Function([\n  compileSearch(\"A\", \"x\" + predicate + \"y\", reversed, [\"y\"], false, earlyOut),\n  compileSearch(\"B\", \"x\" + predicate + \"y\", reversed, [\"y\"], true, earlyOut),\n  compileSearch(\"P\", \"c(x,y)\" + predicate + \"0\", reversed, [\"y\", \"c\"], false, earlyOut),\n  compileSearch(\"Q\", \"c(x,y)\" + predicate + \"0\", reversed, [\"y\", \"c\"], true, earlyOut),\n\"function dispatchBsearch\", suffix, \"(a,y,c,l,h){\\\nif(a.shape){\\\nif(typeof(c)==='function'){\\\nreturn Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)\\\n}else{\\\nreturn B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)\\\n}}else{\\\nif(typeof(c)==='function'){\\\nreturn P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)\\\n}else{\\\nreturn A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)\\\n}}}\\\nreturn dispatchBsearch\", suffix].join(\"\"))\n  return result()\n}\n\nmodule.exports = {\n  ge: compileBoundsSearch(\">=\", false, \"GE\"),\n  gt: compileBoundsSearch(\">\", false, \"GT\"),\n  lt: compileBoundsSearch(\"<\", true, \"LT\"),\n  le: compileBoundsSearch(\"<=\", true, \"LE\"),\n  eq: compileBoundsSearch(\"-\", true, \"EQ\", true)\n}\n\n},{}],85:[function(_dereq_,module,exports){\n/**\n * Bit twiddling hacks for JavaScript.\n *\n * Author: Mikola Lysenko\n *\n * Ported from Stanford bit twiddling hack library:\n *    http://graphics.stanford.edu/~seander/bithacks.html\n */\n\n\"use strict\"; \"use restrict\";\n\n//Number of bits in an integer\nvar INT_BITS = 32;\n\n//Constants\nexports.INT_BITS  = INT_BITS;\nexports.INT_MAX   =  0x7fffffff;\nexports.INT_MIN   = -1<<(INT_BITS-1);\n\n//Returns -1, 0, +1 depending on sign of x\nexports.sign = function(v) {\n  return (v > 0) - (v < 0);\n}\n\n//Computes absolute value of integer\nexports.abs = function(v) {\n  var mask = v >> (INT_BITS-1);\n  return (v ^ mask) - mask;\n}\n\n//Computes minimum of integers x and y\nexports.min = function(x, y) {\n  return y ^ ((x ^ y) & -(x < y));\n}\n\n//Computes maximum of integers x and y\nexports.max = function(x, y) {\n  return x ^ ((x ^ y) & -(x < y));\n}\n\n//Checks if a number is a power of two\nexports.isPow2 = function(v) {\n  return !(v & (v-1)) && (!!v);\n}\n\n//Computes log base 2 of v\nexports.log2 = function(v) {\n  var r, shift;\n  r =     (v > 0xFFFF) << 4; v >>>= r;\n  shift = (v > 0xFF  ) << 3; v >>>= shift; r |= shift;\n  shift = (v > 0xF   ) << 2; v >>>= shift; r |= shift;\n  shift = (v > 0x3   ) << 1; v >>>= shift; r |= shift;\n  return r | (v >> 1);\n}\n\n//Computes log base 10 of v\nexports.log10 = function(v) {\n  return  (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 :\n          (v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 :\n          (v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0;\n}\n\n//Counts number of bits\nexports.popCount = function(v) {\n  v = v - ((v >>> 1) & 0x55555555);\n  v = (v & 0x33333333) + ((v >>> 2) & 0x33333333);\n  return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;\n}\n\n//Counts number of trailing zeros\nfunction countTrailingZeros(v) {\n  var c = 32;\n  v &= -v;\n  if (v) c--;\n  if (v & 0x0000FFFF) c -= 16;\n  if (v & 0x00FF00FF) c -= 8;\n  if (v & 0x0F0F0F0F) c -= 4;\n  if (v & 0x33333333) c -= 2;\n  if (v & 0x55555555) c -= 1;\n  return c;\n}\nexports.countTrailingZeros = countTrailingZeros;\n\n//Rounds to next power of 2\nexports.nextPow2 = function(v) {\n  v += v === 0;\n  --v;\n  v |= v >>> 1;\n  v |= v >>> 2;\n  v |= v >>> 4;\n  v |= v >>> 8;\n  v |= v >>> 16;\n  return v + 1;\n}\n\n//Rounds down to previous power of 2\nexports.prevPow2 = function(v) {\n  v |= v >>> 1;\n  v |= v >>> 2;\n  v |= v >>> 4;\n  v |= v >>> 8;\n  v |= v >>> 16;\n  return v - (v>>>1);\n}\n\n//Computes parity of word\nexports.parity = function(v) {\n  v ^= v >>> 16;\n  v ^= v >>> 8;\n  v ^= v >>> 4;\n  v &= 0xf;\n  return (0x6996 >>> v) & 1;\n}\n\nvar REVERSE_TABLE = new Array(256);\n\n(function(tab) {\n  for(var i=0; i<256; ++i) {\n    var v = i, r = i, s = 7;\n    for (v >>>= 1; v; v >>>= 1) {\n      r <<= 1;\n      r |= v & 1;\n      --s;\n    }\n    tab[i] = (r << s) & 0xff;\n  }\n})(REVERSE_TABLE);\n\n//Reverse bits in a 32 bit word\nexports.reverse = function(v) {\n  return  (REVERSE_TABLE[ v         & 0xff] << 24) |\n          (REVERSE_TABLE[(v >>> 8)  & 0xff] << 16) |\n          (REVERSE_TABLE[(v >>> 16) & 0xff] << 8)  |\n           REVERSE_TABLE[(v >>> 24) & 0xff];\n}\n\n//Interleave bits of 2 coordinates with 16 bits.  Useful for fast quadtree codes\nexports.interleave2 = function(x, y) {\n  x &= 0xFFFF;\n  x = (x | (x << 8)) & 0x00FF00FF;\n  x = (x | (x << 4)) & 0x0F0F0F0F;\n  x = (x | (x << 2)) & 0x33333333;\n  x = (x | (x << 1)) & 0x55555555;\n\n  y &= 0xFFFF;\n  y = (y | (y << 8)) & 0x00FF00FF;\n  y = (y | (y << 4)) & 0x0F0F0F0F;\n  y = (y | (y << 2)) & 0x33333333;\n  y = (y | (y << 1)) & 0x55555555;\n\n  return x | (y << 1);\n}\n\n//Extracts the nth interleaved component\nexports.deinterleave2 = function(v, n) {\n  v = (v >>> n) & 0x55555555;\n  v = (v | (v >>> 1))  & 0x33333333;\n  v = (v | (v >>> 2))  & 0x0F0F0F0F;\n  v = (v | (v >>> 4))  & 0x00FF00FF;\n  v = (v | (v >>> 16)) & 0x000FFFF;\n  return (v << 16) >> 16;\n}\n\n\n//Interleave bits of 3 coordinates, each with 10 bits.  Useful for fast octree codes\nexports.interleave3 = function(x, y, z) {\n  x &= 0x3FF;\n  x  = (x | (x<<16)) & 4278190335;\n  x  = (x | (x<<8))  & 251719695;\n  x  = (x | (x<<4))  & 3272356035;\n  x  = (x | (x<<2))  & 1227133513;\n\n  y &= 0x3FF;\n  y  = (y | (y<<16)) & 4278190335;\n  y  = (y | (y<<8))  & 251719695;\n  y  = (y | (y<<4))  & 3272356035;\n  y  = (y | (y<<2))  & 1227133513;\n  x |= (y << 1);\n  \n  z &= 0x3FF;\n  z  = (z | (z<<16)) & 4278190335;\n  z  = (z | (z<<8))  & 251719695;\n  z  = (z | (z<<4))  & 3272356035;\n  z  = (z | (z<<2))  & 1227133513;\n  \n  return x | (z << 2);\n}\n\n//Extracts nth interleaved component of a 3-tuple\nexports.deinterleave3 = function(v, n) {\n  v = (v >>> n)       & 1227133513;\n  v = (v | (v>>>2))   & 3272356035;\n  v = (v | (v>>>4))   & 251719695;\n  v = (v | (v>>>8))   & 4278190335;\n  v = (v | (v>>>16))  & 0x3FF;\n  return (v<<22)>>22;\n}\n\n//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page)\nexports.nextCombination = function(v) {\n  var t = v | (v - 1);\n  return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1));\n}\n\n\n},{}],86:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar clamp = _dereq_('clamp')\r\n\r\nmodule.exports = calcSDF\r\n\r\nvar INF = 1e20;\r\n\r\nfunction calcSDF(src, options) {\r\n    if (!options) options = {}\r\n\r\n    var cutoff = options.cutoff == null ? 0.25 : options.cutoff\r\n    var radius = options.radius == null ? 8 : options.radius\r\n    var channel = options.channel || 0\r\n    var w, h, size, data, intData, stride, ctx, canvas, imgData, i, l\r\n\r\n    // handle image container\r\n    if (ArrayBuffer.isView(src) || Array.isArray(src)) {\r\n        if (!options.width || !options.height) throw Error('For raw data width and height should be provided by options')\r\n        w = options.width, h = options.height\r\n        data = src\r\n\r\n        if (!options.stride) stride = Math.floor(src.length / w / h)\r\n        else stride = options.stride\r\n    }\r\n    else {\r\n        if (window.HTMLCanvasElement && src instanceof window.HTMLCanvasElement) {\r\n            canvas = src\r\n            ctx = canvas.getContext('2d')\r\n            w = canvas.width, h = canvas.height\r\n            imgData = ctx.getImageData(0, 0, w, h)\r\n            data = imgData.data\r\n            stride = 4\r\n        }\r\n        else if (window.CanvasRenderingContext2D && src instanceof window.CanvasRenderingContext2D) {\r\n            canvas = src.canvas\r\n            ctx = src\r\n            w = canvas.width, h = canvas.height\r\n            imgData = ctx.getImageData(0, 0, w, h)\r\n            data = imgData.data\r\n            stride = 4\r\n        }\r\n        else if (window.ImageData && src instanceof window.ImageData) {\r\n            imgData = src\r\n            w = src.width, h = src.height\r\n            data = imgData.data\r\n            stride = 4\r\n        }\r\n    }\r\n\r\n    size = Math.max(w, h)\r\n\r\n    //convert int data to floats\r\n    if ((window.Uint8ClampedArray && data instanceof window.Uint8ClampedArray) || (window.Uint8Array && data instanceof window.Uint8Array)) {\r\n        intData = data\r\n        data = Array(w*h)\r\n\r\n        for (i = 0, l = intData.length; i < l; i++) {\r\n            data[i] = intData[i*stride + channel] / 255\r\n        }\r\n    }\r\n    else {\r\n        if (stride !== 1) throw Error('Raw data can have only 1 value per pixel')\r\n    }\r\n\r\n    // temporary arrays for the distance transform\r\n    var gridOuter = Array(w * h)\r\n    var gridInner = Array(w * h)\r\n    var f = Array(size)\r\n    var d = Array(size)\r\n    var z = Array(size + 1)\r\n    var v = Array(size)\r\n\r\n    for (i = 0, l = w * h; i < l; i++) {\r\n        var a = data[i]\r\n        gridOuter[i] = a === 1 ? 0 : a === 0 ? INF : Math.pow(Math.max(0, 0.5 - a), 2)\r\n        gridInner[i] = a === 1 ? INF : a === 0 ? 0 : Math.pow(Math.max(0, a - 0.5), 2)\r\n    }\r\n\r\n    edt(gridOuter, w, h, f, d, v, z)\r\n    edt(gridInner, w, h, f, d, v, z)\r\n\r\n    var dist = window.Float32Array ? new Float32Array(w * h) : new Array(w * h)\r\n\r\n    for (i = 0, l = w*h; i < l; i++) {\r\n        dist[i] = clamp(1 - ( (gridOuter[i] - gridInner[i]) / radius + cutoff), 0, 1)\r\n    }\r\n\r\n    return dist\r\n}\r\n\r\n// 2D Euclidean distance transform by Felzenszwalb & Huttenlocher https://cs.brown.edu/~pff/dt/\r\nfunction edt(data, width, height, f, d, v, z) {\r\n    for (var x = 0; x < width; x++) {\r\n        for (var y = 0; y < height; y++) {\r\n            f[y] = data[y * width + x]\r\n        }\r\n        edt1d(f, d, v, z, height)\r\n        for (y = 0; y < height; y++) {\r\n            data[y * width + x] = d[y]\r\n        }\r\n    }\r\n    for (y = 0; y < height; y++) {\r\n        for (x = 0; x < width; x++) {\r\n            f[x] = data[y * width + x]\r\n        }\r\n        edt1d(f, d, v, z, width)\r\n        for (x = 0; x < width; x++) {\r\n            data[y * width + x] = Math.sqrt(d[x])\r\n        }\r\n    }\r\n}\r\n\r\n// 1D squared distance transform\r\nfunction edt1d(f, d, v, z, n) {\r\n    v[0] = 0;\r\n    z[0] = -INF\r\n    z[1] = +INF\r\n\r\n    for (var q = 1, k = 0; q < n; q++) {\r\n        var s = ((f[q] + q * q) - (f[v[k]] + v[k] * v[k])) / (2 * q - 2 * v[k])\r\n        while (s <= z[k]) {\r\n            k--\r\n            s = ((f[q] + q * q) - (f[v[k]] + v[k] * v[k])) / (2 * q - 2 * v[k])\r\n        }\r\n        k++\r\n        v[k] = q\r\n        z[k] = s\r\n        z[k + 1] = +INF\r\n    }\r\n\r\n    for (q = 0, k = 0; q < n; q++) {\r\n        while (z[k + 1] < q) k++\r\n        d[q] = (q - v[k]) * (q - v[k]) + f[v[k]]\r\n    }\r\n}\r\n\n},{\"clamp\":108}],87:[function(_dereq_,module,exports){\n(function (module, exports) {\n  'use strict';\n\n  // Utils\n  function assert (val, msg) {\n    if (!val) throw new Error(msg || 'Assertion failed');\n  }\n\n  // Could use `inherits` module, but don't want to move from single file\n  // architecture yet.\n  function inherits (ctor, superCtor) {\n    ctor.super_ = superCtor;\n    var TempCtor = function () {};\n    TempCtor.prototype = superCtor.prototype;\n    ctor.prototype = new TempCtor();\n    ctor.prototype.constructor = ctor;\n  }\n\n  // BN\n\n  function BN (number, base, endian) {\n    if (BN.isBN(number)) {\n      return number;\n    }\n\n    this.negative = 0;\n    this.words = null;\n    this.length = 0;\n\n    // Reduction context\n    this.red = null;\n\n    if (number !== null) {\n      if (base === 'le' || base === 'be') {\n        endian = base;\n        base = 10;\n      }\n\n      this._init(number || 0, base || 10, endian || 'be');\n    }\n  }\n  if (typeof module === 'object') {\n    module.exports = BN;\n  } else {\n    exports.BN = BN;\n  }\n\n  BN.BN = BN;\n  BN.wordSize = 26;\n\n  var Buffer;\n  try {\n    Buffer = _dereq_('buffer').Buffer;\n  } catch (e) {\n  }\n\n  BN.isBN = function isBN (num) {\n    if (num instanceof BN) {\n      return true;\n    }\n\n    return num !== null && typeof num === 'object' &&\n      num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n  };\n\n  BN.max = function max (left, right) {\n    if (left.cmp(right) > 0) return left;\n    return right;\n  };\n\n  BN.min = function min (left, right) {\n    if (left.cmp(right) < 0) return left;\n    return right;\n  };\n\n  BN.prototype._init = function init (number, base, endian) {\n    if (typeof number === 'number') {\n      return this._initNumber(number, base, endian);\n    }\n\n    if (typeof number === 'object') {\n      return this._initArray(number, base, endian);\n    }\n\n    if (base === 'hex') {\n      base = 16;\n    }\n    assert(base === (base | 0) && base >= 2 && base <= 36);\n\n    number = number.toString().replace(/\\s+/g, '');\n    var start = 0;\n    if (number[0] === '-') {\n      start++;\n    }\n\n    if (base === 16) {\n      this._parseHex(number, start);\n    } else {\n      this._parseBase(number, base, start);\n    }\n\n    if (number[0] === '-') {\n      this.negative = 1;\n    }\n\n    this.strip();\n\n    if (endian !== 'le') return;\n\n    this._initArray(this.toArray(), base, endian);\n  };\n\n  BN.prototype._initNumber = function _initNumber (number, base, endian) {\n    if (number < 0) {\n      this.negative = 1;\n      number = -number;\n    }\n    if (number < 0x4000000) {\n      this.words = [ number & 0x3ffffff ];\n      this.length = 1;\n    } else if (number < 0x10000000000000) {\n      this.words = [\n        number & 0x3ffffff,\n        (number / 0x4000000) & 0x3ffffff\n      ];\n      this.length = 2;\n    } else {\n      assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n      this.words = [\n        number & 0x3ffffff,\n        (number / 0x4000000) & 0x3ffffff,\n        1\n      ];\n      this.length = 3;\n    }\n\n    if (endian !== 'le') return;\n\n    // Reverse the bytes\n    this._initArray(this.toArray(), base, endian);\n  };\n\n  BN.prototype._initArray = function _initArray (number, base, endian) {\n    // Perhaps a Uint8Array\n    assert(typeof number.length === 'number');\n    if (number.length <= 0) {\n      this.words = [ 0 ];\n      this.length = 1;\n      return this;\n    }\n\n    this.length = Math.ceil(number.length / 3);\n    this.words = new Array(this.length);\n    for (var i = 0; i < this.length; i++) {\n      this.words[i] = 0;\n    }\n\n    var j, w;\n    var off = 0;\n    if (endian === 'be') {\n      for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n        w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n        this.words[j] |= (w << off) & 0x3ffffff;\n        this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n        off += 24;\n        if (off >= 26) {\n          off -= 26;\n          j++;\n        }\n      }\n    } else if (endian === 'le') {\n      for (i = 0, j = 0; i < number.length; i += 3) {\n        w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n        this.words[j] |= (w << off) & 0x3ffffff;\n        this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n        off += 24;\n        if (off >= 26) {\n          off -= 26;\n          j++;\n        }\n      }\n    }\n    return this.strip();\n  };\n\n  function parseHex (str, start, end) {\n    var r = 0;\n    var len = Math.min(str.length, end);\n    for (var i = start; i < len; i++) {\n      var c = str.charCodeAt(i) - 48;\n\n      r <<= 4;\n\n      // 'a' - 'f'\n      if (c >= 49 && c <= 54) {\n        r |= c - 49 + 0xa;\n\n      // 'A' - 'F'\n      } else if (c >= 17 && c <= 22) {\n        r |= c - 17 + 0xa;\n\n      // '0' - '9'\n      } else {\n        r |= c & 0xf;\n      }\n    }\n    return r;\n  }\n\n  BN.prototype._parseHex = function _parseHex (number, start) {\n    // Create possibly bigger array to ensure that it fits the number\n    this.length = Math.ceil((number.length - start) / 6);\n    this.words = new Array(this.length);\n    for (var i = 0; i < this.length; i++) {\n      this.words[i] = 0;\n    }\n\n    var j, w;\n    // Scan 24-bit chunks and add them to the number\n    var off = 0;\n    for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n      w = parseHex(number, i, i + 6);\n      this.words[j] |= (w << off) & 0x3ffffff;\n      // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n      this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n      off += 24;\n      if (off >= 26) {\n        off -= 26;\n        j++;\n      }\n    }\n    if (i + 6 !== start) {\n      w = parseHex(number, start, i + 6);\n      this.words[j] |= (w << off) & 0x3ffffff;\n      this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n    }\n    this.strip();\n  };\n\n  function parseBase (str, start, end, mul) {\n    var r = 0;\n    var len = Math.min(str.length, end);\n    for (var i = start; i < len; i++) {\n      var c = str.charCodeAt(i) - 48;\n\n      r *= mul;\n\n      // 'a'\n      if (c >= 49) {\n        r += c - 49 + 0xa;\n\n      // 'A'\n      } else if (c >= 17) {\n        r += c - 17 + 0xa;\n\n      // '0' - '9'\n      } else {\n        r += c;\n      }\n    }\n    return r;\n  }\n\n  BN.prototype._parseBase = function _parseBase (number, base, start) {\n    // Initialize as zero\n    this.words = [ 0 ];\n    this.length = 1;\n\n    // Find length of limb in base\n    for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n      limbLen++;\n    }\n    limbLen--;\n    limbPow = (limbPow / base) | 0;\n\n    var total = number.length - start;\n    var mod = total % limbLen;\n    var end = Math.min(total, total - mod) + start;\n\n    var word = 0;\n    for (var i = start; i < end; i += limbLen) {\n      word = parseBase(number, i, i + limbLen, base);\n\n      this.imuln(limbPow);\n      if (this.words[0] + word < 0x4000000) {\n        this.words[0] += word;\n      } else {\n        this._iaddn(word);\n      }\n    }\n\n    if (mod !== 0) {\n      var pow = 1;\n      word = parseBase(number, i, number.length, base);\n\n      for (i = 0; i < mod; i++) {\n        pow *= base;\n      }\n\n      this.imuln(pow);\n      if (this.words[0] + word < 0x4000000) {\n        this.words[0] += word;\n      } else {\n        this._iaddn(word);\n      }\n    }\n  };\n\n  BN.prototype.copy = function copy (dest) {\n    dest.words = new Array(this.length);\n    for (var i = 0; i < this.length; i++) {\n      dest.words[i] = this.words[i];\n    }\n    dest.length = this.length;\n    dest.negative = this.negative;\n    dest.red = this.red;\n  };\n\n  BN.prototype.clone = function clone () {\n    var r = new BN(null);\n    this.copy(r);\n    return r;\n  };\n\n  BN.prototype._expand = function _expand (size) {\n    while (this.length < size) {\n      this.words[this.length++] = 0;\n    }\n    return this;\n  };\n\n  // Remove leading `0` from `this`\n  BN.prototype.strip = function strip () {\n    while (this.length > 1 && this.words[this.length - 1] === 0) {\n      this.length--;\n    }\n    return this._normSign();\n  };\n\n  BN.prototype._normSign = function _normSign () {\n    // -0 = 0\n    if (this.length === 1 && this.words[0] === 0) {\n      this.negative = 0;\n    }\n    return this;\n  };\n\n  BN.prototype.inspect = function inspect () {\n    return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';\n  };\n\n  /*\n\n  var zeros = [];\n  var groupSizes = [];\n  var groupBases = [];\n\n  var s = '';\n  var i = -1;\n  while (++i < BN.wordSize) {\n    zeros[i] = s;\n    s += '0';\n  }\n  groupSizes[0] = 0;\n  groupSizes[1] = 0;\n  groupBases[0] = 0;\n  groupBases[1] = 0;\n  var base = 2 - 1;\n  while (++base < 36 + 1) {\n    var groupSize = 0;\n    var groupBase = 1;\n    while (groupBase < (1 << BN.wordSize) / base) {\n      groupBase *= base;\n      groupSize += 1;\n    }\n    groupSizes[base] = groupSize;\n    groupBases[base] = groupBase;\n  }\n\n  */\n\n  var zeros = [\n    '',\n    '0',\n    '00',\n    '000',\n    '0000',\n    '00000',\n    '000000',\n    '0000000',\n    '00000000',\n    '000000000',\n    '0000000000',\n    '00000000000',\n    '000000000000',\n    '0000000000000',\n    '00000000000000',\n    '000000000000000',\n    '0000000000000000',\n    '00000000000000000',\n    '000000000000000000',\n    '0000000000000000000',\n    '00000000000000000000',\n    '000000000000000000000',\n    '0000000000000000000000',\n    '00000000000000000000000',\n    '000000000000000000000000',\n    '0000000000000000000000000'\n  ];\n\n  var groupSizes = [\n    0, 0,\n    25, 16, 12, 11, 10, 9, 8,\n    8, 7, 7, 7, 7, 6, 6,\n    6, 6, 6, 6, 6, 5, 5,\n    5, 5, 5, 5, 5, 5, 5,\n    5, 5, 5, 5, 5, 5, 5\n  ];\n\n  var groupBases = [\n    0, 0,\n    33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n    43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n    16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n    6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n    24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n  ];\n\n  BN.prototype.toString = function toString (base, padding) {\n    base = base || 10;\n    padding = padding | 0 || 1;\n\n    var out;\n    if (base === 16 || base === 'hex') {\n      out = '';\n      var off = 0;\n      var carry = 0;\n      for (var i = 0; i < this.length; i++) {\n        var w = this.words[i];\n        var word = (((w << off) | carry) & 0xffffff).toString(16);\n        carry = (w >>> (24 - off)) & 0xffffff;\n        if (carry !== 0 || i !== this.length - 1) {\n          out = zeros[6 - word.length] + word + out;\n        } else {\n          out = word + out;\n        }\n        off += 2;\n        if (off >= 26) {\n          off -= 26;\n          i--;\n        }\n      }\n      if (carry !== 0) {\n        out = carry.toString(16) + out;\n      }\n      while (out.length % padding !== 0) {\n        out = '0' + out;\n      }\n      if (this.negative !== 0) {\n        out = '-' + out;\n      }\n      return out;\n    }\n\n    if (base === (base | 0) && base >= 2 && base <= 36) {\n      // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n      var groupSize = groupSizes[base];\n      // var groupBase = Math.pow(base, groupSize);\n      var groupBase = groupBases[base];\n      out = '';\n      var c = this.clone();\n      c.negative = 0;\n      while (!c.isZero()) {\n        var r = c.modn(groupBase).toString(base);\n        c = c.idivn(groupBase);\n\n        if (!c.isZero()) {\n          out = zeros[groupSize - r.length] + r + out;\n        } else {\n          out = r + out;\n        }\n      }\n      if (this.isZero()) {\n        out = '0' + out;\n      }\n      while (out.length % padding !== 0) {\n        out = '0' + out;\n      }\n      if (this.negative !== 0) {\n        out = '-' + out;\n      }\n      return out;\n    }\n\n    assert(false, 'Base should be between 2 and 36');\n  };\n\n  BN.prototype.toNumber = function toNumber () {\n    var ret = this.words[0];\n    if (this.length === 2) {\n      ret += this.words[1] * 0x4000000;\n    } else if (this.length === 3 && this.words[2] === 0x01) {\n      // NOTE: at this stage it is known that the top bit is set\n      ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n    } else if (this.length > 2) {\n      assert(false, 'Number can only safely store up to 53 bits');\n    }\n    return (this.negative !== 0) ? -ret : ret;\n  };\n\n  BN.prototype.toJSON = function toJSON () {\n    return this.toString(16);\n  };\n\n  BN.prototype.toBuffer = function toBuffer (endian, length) {\n    assert(typeof Buffer !== 'undefined');\n    return this.toArrayLike(Buffer, endian, length);\n  };\n\n  BN.prototype.toArray = function toArray (endian, length) {\n    return this.toArrayLike(Array, endian, length);\n  };\n\n  BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n    var byteLength = this.byteLength();\n    var reqLength = length || Math.max(1, byteLength);\n    assert(byteLength <= reqLength, 'byte array longer than desired length');\n    assert(reqLength > 0, 'Requested array length <= 0');\n\n    this.strip();\n    var littleEndian = endian === 'le';\n    var res = new ArrayType(reqLength);\n\n    var b, i;\n    var q = this.clone();\n    if (!littleEndian) {\n      // Assume big-endian\n      for (i = 0; i < reqLength - byteLength; i++) {\n        res[i] = 0;\n      }\n\n      for (i = 0; !q.isZero(); i++) {\n        b = q.andln(0xff);\n        q.iushrn(8);\n\n        res[reqLength - i - 1] = b;\n      }\n    } else {\n      for (i = 0; !q.isZero(); i++) {\n        b = q.andln(0xff);\n        q.iushrn(8);\n\n        res[i] = b;\n      }\n\n      for (; i < reqLength; i++) {\n        res[i] = 0;\n      }\n    }\n\n    return res;\n  };\n\n  if (Math.clz32) {\n    BN.prototype._countBits = function _countBits (w) {\n      return 32 - Math.clz32(w);\n    };\n  } else {\n    BN.prototype._countBits = function _countBits (w) {\n      var t = w;\n      var r = 0;\n      if (t >= 0x1000) {\n        r += 13;\n        t >>>= 13;\n      }\n      if (t >= 0x40) {\n        r += 7;\n        t >>>= 7;\n      }\n      if (t >= 0x8) {\n        r += 4;\n        t >>>= 4;\n      }\n      if (t >= 0x02) {\n        r += 2;\n        t >>>= 2;\n      }\n      return r + t;\n    };\n  }\n\n  BN.prototype._zeroBits = function _zeroBits (w) {\n    // Short-cut\n    if (w === 0) return 26;\n\n    var t = w;\n    var r = 0;\n    if ((t & 0x1fff) === 0) {\n      r += 13;\n      t >>>= 13;\n    }\n    if ((t & 0x7f) === 0) {\n      r += 7;\n      t >>>= 7;\n    }\n    if ((t & 0xf) === 0) {\n      r += 4;\n      t >>>= 4;\n    }\n    if ((t & 0x3) === 0) {\n      r += 2;\n      t >>>= 2;\n    }\n    if ((t & 0x1) === 0) {\n      r++;\n    }\n    return r;\n  };\n\n  // Return number of used bits in a BN\n  BN.prototype.bitLength = function bitLength () {\n    var w = this.words[this.length - 1];\n    var hi = this._countBits(w);\n    return (this.length - 1) * 26 + hi;\n  };\n\n  function toBitArray (num) {\n    var w = new Array(num.bitLength());\n\n    for (var bit = 0; bit < w.length; bit++) {\n      var off = (bit / 26) | 0;\n      var wbit = bit % 26;\n\n      w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n    }\n\n    return w;\n  }\n\n  // Number of trailing zero bits\n  BN.prototype.zeroBits = function zeroBits () {\n    if (this.isZero()) return 0;\n\n    var r = 0;\n    for (var i = 0; i < this.length; i++) {\n      var b = this._zeroBits(this.words[i]);\n      r += b;\n      if (b !== 26) break;\n    }\n    return r;\n  };\n\n  BN.prototype.byteLength = function byteLength () {\n    return Math.ceil(this.bitLength() / 8);\n  };\n\n  BN.prototype.toTwos = function toTwos (width) {\n    if (this.negative !== 0) {\n      return this.abs().inotn(width).iaddn(1);\n    }\n    return this.clone();\n  };\n\n  BN.prototype.fromTwos = function fromTwos (width) {\n    if (this.testn(width - 1)) {\n      return this.notn(width).iaddn(1).ineg();\n    }\n    return this.clone();\n  };\n\n  BN.prototype.isNeg = function isNeg () {\n    return this.negative !== 0;\n  };\n\n  // Return negative clone of `this`\n  BN.prototype.neg = function neg () {\n    return this.clone().ineg();\n  };\n\n  BN.prototype.ineg = function ineg () {\n    if (!this.isZero()) {\n      this.negative ^= 1;\n    }\n\n    return this;\n  };\n\n  // Or `num` with `this` in-place\n  BN.prototype.iuor = function iuor (num) {\n    while (this.length < num.length) {\n      this.words[this.length++] = 0;\n    }\n\n    for (var i = 0; i < num.length; i++) {\n      this.words[i] = this.words[i] | num.words[i];\n    }\n\n    return this.strip();\n  };\n\n  BN.prototype.ior = function ior (num) {\n    assert((this.negative | num.negative) === 0);\n    return this.iuor(num);\n  };\n\n  // Or `num` with `this`\n  BN.prototype.or = function or (num) {\n    if (this.length > num.length) return this.clone().ior(num);\n    return num.clone().ior(this);\n  };\n\n  BN.prototype.uor = function uor (num) {\n    if (this.length > num.length) return this.clone().iuor(num);\n    return num.clone().iuor(this);\n  };\n\n  // And `num` with `this` in-place\n  BN.prototype.iuand = function iuand (num) {\n    // b = min-length(num, this)\n    var b;\n    if (this.length > num.length) {\n      b = num;\n    } else {\n      b = this;\n    }\n\n    for (var i = 0; i < b.length; i++) {\n      this.words[i] = this.words[i] & num.words[i];\n    }\n\n    this.length = b.length;\n\n    return this.strip();\n  };\n\n  BN.prototype.iand = function iand (num) {\n    assert((this.negative | num.negative) === 0);\n    return this.iuand(num);\n  };\n\n  // And `num` with `this`\n  BN.prototype.and = function and (num) {\n    if (this.length > num.length) return this.clone().iand(num);\n    return num.clone().iand(this);\n  };\n\n  BN.prototype.uand = function uand (num) {\n    if (this.length > num.length) return this.clone().iuand(num);\n    return num.clone().iuand(this);\n  };\n\n  // Xor `num` with `this` in-place\n  BN.prototype.iuxor = function iuxor (num) {\n    // a.length > b.length\n    var a;\n    var b;\n    if (this.length > num.length) {\n      a = this;\n      b = num;\n    } else {\n      a = num;\n      b = this;\n    }\n\n    for (var i = 0; i < b.length; i++) {\n      this.words[i] = a.words[i] ^ b.words[i];\n    }\n\n    if (this !== a) {\n      for (; i < a.length; i++) {\n        this.words[i] = a.words[i];\n      }\n    }\n\n    this.length = a.length;\n\n    return this.strip();\n  };\n\n  BN.prototype.ixor = function ixor (num) {\n    assert((this.negative | num.negative) === 0);\n    return this.iuxor(num);\n  };\n\n  // Xor `num` with `this`\n  BN.prototype.xor = function xor (num) {\n    if (this.length > num.length) return this.clone().ixor(num);\n    return num.clone().ixor(this);\n  };\n\n  BN.prototype.uxor = function uxor (num) {\n    if (this.length > num.length) return this.clone().iuxor(num);\n    return num.clone().iuxor(this);\n  };\n\n  // Not ``this`` with ``width`` bitwidth\n  BN.prototype.inotn = function inotn (width) {\n    assert(typeof width === 'number' && width >= 0);\n\n    var bytesNeeded = Math.ceil(width / 26) | 0;\n    var bitsLeft = width % 26;\n\n    // Extend the buffer with leading zeroes\n    this._expand(bytesNeeded);\n\n    if (bitsLeft > 0) {\n      bytesNeeded--;\n    }\n\n    // Handle complete words\n    for (var i = 0; i < bytesNeeded; i++) {\n      this.words[i] = ~this.words[i] & 0x3ffffff;\n    }\n\n    // Handle the residue\n    if (bitsLeft > 0) {\n      this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n    }\n\n    // And remove leading zeroes\n    return this.strip();\n  };\n\n  BN.prototype.notn = function notn (width) {\n    return this.clone().inotn(width);\n  };\n\n  // Set `bit` of `this`\n  BN.prototype.setn = function setn (bit, val) {\n    assert(typeof bit === 'number' && bit >= 0);\n\n    var off = (bit / 26) | 0;\n    var wbit = bit % 26;\n\n    this._expand(off + 1);\n\n    if (val) {\n      this.words[off] = this.words[off] | (1 << wbit);\n    } else {\n      this.words[off] = this.words[off] & ~(1 << wbit);\n    }\n\n    return this.strip();\n  };\n\n  // Add `num` to `this` in-place\n  BN.prototype.iadd = function iadd (num) {\n    var r;\n\n    // negative + positive\n    if (this.negative !== 0 && num.negative === 0) {\n      this.negative = 0;\n      r = this.isub(num);\n      this.negative ^= 1;\n      return this._normSign();\n\n    // positive + negative\n    } else if (this.negative === 0 && num.negative !== 0) {\n      num.negative = 0;\n      r = this.isub(num);\n      num.negative = 1;\n      return r._normSign();\n    }\n\n    // a.length > b.length\n    var a, b;\n    if (this.length > num.length) {\n      a = this;\n      b = num;\n    } else {\n      a = num;\n      b = this;\n    }\n\n    var carry = 0;\n    for (var i = 0; i < b.length; i++) {\n      r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n      this.words[i] = r & 0x3ffffff;\n      carry = r >>> 26;\n    }\n    for (; carry !== 0 && i < a.length; i++) {\n      r = (a.words[i] | 0) + carry;\n      this.words[i] = r & 0x3ffffff;\n      carry = r >>> 26;\n    }\n\n    this.length = a.length;\n    if (carry !== 0) {\n      this.words[this.length] = carry;\n      this.length++;\n    // Copy the rest of the words\n    } else if (a !== this) {\n      for (; i < a.length; i++) {\n        this.words[i] = a.words[i];\n      }\n    }\n\n    return this;\n  };\n\n  // Add `num` to `this`\n  BN.prototype.add = function add (num) {\n    var res;\n    if (num.negative !== 0 && this.negative === 0) {\n      num.negative = 0;\n      res = this.sub(num);\n      num.negative ^= 1;\n      return res;\n    } else if (num.negative === 0 && this.negative !== 0) {\n      this.negative = 0;\n      res = num.sub(this);\n      this.negative = 1;\n      return res;\n    }\n\n    if (this.length > num.length) return this.clone().iadd(num);\n\n    return num.clone().iadd(this);\n  };\n\n  // Subtract `num` from `this` in-place\n  BN.prototype.isub = function isub (num) {\n    // this - (-num) = this + num\n    if (num.negative !== 0) {\n      num.negative = 0;\n      var r = this.iadd(num);\n      num.negative = 1;\n      return r._normSign();\n\n    // -this - num = -(this + num)\n    } else if (this.negative !== 0) {\n      this.negative = 0;\n      this.iadd(num);\n      this.negative = 1;\n      return this._normSign();\n    }\n\n    // At this point both numbers are positive\n    var cmp = this.cmp(num);\n\n    // Optimization - zeroify\n    if (cmp === 0) {\n      this.negative = 0;\n      this.length = 1;\n      this.words[0] = 0;\n      return this;\n    }\n\n    // a > b\n    var a, b;\n    if (cmp > 0) {\n      a = this;\n      b = num;\n    } else {\n      a = num;\n      b = this;\n    }\n\n    var carry = 0;\n    for (var i = 0; i < b.length; i++) {\n      r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n      carry = r >> 26;\n      this.words[i] = r & 0x3ffffff;\n    }\n    for (; carry !== 0 && i < a.length; i++) {\n      r = (a.words[i] | 0) + carry;\n      carry = r >> 26;\n      this.words[i] = r & 0x3ffffff;\n    }\n\n    // Copy rest of the words\n    if (carry === 0 && i < a.length && a !== this) {\n      for (; i < a.length; i++) {\n        this.words[i] = a.words[i];\n      }\n    }\n\n    this.length = Math.max(this.length, i);\n\n    if (a !== this) {\n      this.negative = 1;\n    }\n\n    return this.strip();\n  };\n\n  // Subtract `num` from `this`\n  BN.prototype.sub = function sub (num) {\n    return this.clone().isub(num);\n  };\n\n  function smallMulTo (self, num, out) {\n    out.negative = num.negative ^ self.negative;\n    var len = (self.length + num.length) | 0;\n    out.length = len;\n    len = (len - 1) | 0;\n\n    // Peel one iteration (compiler can't do it, because of code complexity)\n    var a = self.words[0] | 0;\n    var b = num.words[0] | 0;\n    var r = a * b;\n\n    var lo = r & 0x3ffffff;\n    var carry = (r / 0x4000000) | 0;\n    out.words[0] = lo;\n\n    for (var k = 1; k < len; k++) {\n      // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n      // note that ncarry could be >= 0x3ffffff\n      var ncarry = carry >>> 26;\n      var rword = carry & 0x3ffffff;\n      var maxJ = Math.min(k, num.length - 1);\n      for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n        var i = (k - j) | 0;\n        a = self.words[i] | 0;\n        b = num.words[j] | 0;\n        r = a * b + rword;\n        ncarry += (r / 0x4000000) | 0;\n        rword = r & 0x3ffffff;\n      }\n      out.words[k] = rword | 0;\n      carry = ncarry | 0;\n    }\n    if (carry !== 0) {\n      out.words[k] = carry | 0;\n    } else {\n      out.length--;\n    }\n\n    return out.strip();\n  }\n\n  // TODO(indutny): it may be reasonable to omit it for users who don't need\n  // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n  // multiplication (like elliptic secp256k1).\n  var comb10MulTo = function comb10MulTo (self, num, out) {\n    var a = self.words;\n    var b = num.words;\n    var o = out.words;\n    var c = 0;\n    var lo;\n    var mid;\n    var hi;\n    var a0 = a[0] | 0;\n    var al0 = a0 & 0x1fff;\n    var ah0 = a0 >>> 13;\n    var a1 = a[1] | 0;\n    var al1 = a1 & 0x1fff;\n    var ah1 = a1 >>> 13;\n    var a2 = a[2] | 0;\n    var al2 = a2 & 0x1fff;\n    var ah2 = a2 >>> 13;\n    var a3 = a[3] | 0;\n    var al3 = a3 & 0x1fff;\n    var ah3 = a3 >>> 13;\n    var a4 = a[4] | 0;\n    var al4 = a4 & 0x1fff;\n    var ah4 = a4 >>> 13;\n    var a5 = a[5] | 0;\n    var al5 = a5 & 0x1fff;\n    var ah5 = a5 >>> 13;\n    var a6 = a[6] | 0;\n    var al6 = a6 & 0x1fff;\n    var ah6 = a6 >>> 13;\n    var a7 = a[7] | 0;\n    var al7 = a7 & 0x1fff;\n    var ah7 = a7 >>> 13;\n    var a8 = a[8] | 0;\n    var al8 = a8 & 0x1fff;\n    var ah8 = a8 >>> 13;\n    var a9 = a[9] | 0;\n    var al9 = a9 & 0x1fff;\n    var ah9 = a9 >>> 13;\n    var b0 = b[0] | 0;\n    var bl0 = b0 & 0x1fff;\n    var bh0 = b0 >>> 13;\n    var b1 = b[1] | 0;\n    var bl1 = b1 & 0x1fff;\n    var bh1 = b1 >>> 13;\n    var b2 = b[2] | 0;\n    var bl2 = b2 & 0x1fff;\n    var bh2 = b2 >>> 13;\n    var b3 = b[3] | 0;\n    var bl3 = b3 & 0x1fff;\n    var bh3 = b3 >>> 13;\n    var b4 = b[4] | 0;\n    var bl4 = b4 & 0x1fff;\n    var bh4 = b4 >>> 13;\n    var b5 = b[5] | 0;\n    var bl5 = b5 & 0x1fff;\n    var bh5 = b5 >>> 13;\n    var b6 = b[6] | 0;\n    var bl6 = b6 & 0x1fff;\n    var bh6 = b6 >>> 13;\n    var b7 = b[7] | 0;\n    var bl7 = b7 & 0x1fff;\n    var bh7 = b7 >>> 13;\n    var b8 = b[8] | 0;\n    var bl8 = b8 & 0x1fff;\n    var bh8 = b8 >>> 13;\n    var b9 = b[9] | 0;\n    var bl9 = b9 & 0x1fff;\n    var bh9 = b9 >>> 13;\n\n    out.negative = self.negative ^ num.negative;\n    out.length = 19;\n    /* k = 0 */\n    lo = Math.imul(al0, bl0);\n    mid = Math.imul(al0, bh0);\n    mid = (mid + Math.imul(ah0, bl0)) | 0;\n    hi = Math.imul(ah0, bh0);\n    var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n    w0 &= 0x3ffffff;\n    /* k = 1 */\n    lo = Math.imul(al1, bl0);\n    mid = Math.imul(al1, bh0);\n    mid = (mid + Math.imul(ah1, bl0)) | 0;\n    hi = Math.imul(ah1, bh0);\n    lo = (lo + Math.imul(al0, bl1)) | 0;\n    mid = (mid + Math.imul(al0, bh1)) | 0;\n    mid = (mid + Math.imul(ah0, bl1)) | 0;\n    hi = (hi + Math.imul(ah0, bh1)) | 0;\n    var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n    w1 &= 0x3ffffff;\n    /* k = 2 */\n    lo = Math.imul(al2, bl0);\n    mid = Math.imul(al2, bh0);\n    mid = (mid + Math.imul(ah2, bl0)) | 0;\n    hi = Math.imul(ah2, bh0);\n    lo = (lo + Math.imul(al1, bl1)) | 0;\n    mid = (mid + Math.imul(al1, bh1)) | 0;\n    mid = (mid + Math.imul(ah1, bl1)) | 0;\n    hi = (hi + Math.imul(ah1, bh1)) | 0;\n    lo = (lo + Math.imul(al0, bl2)) | 0;\n    mid = (mid + Math.imul(al0, bh2)) | 0;\n    mid = (mid + Math.imul(ah0, bl2)) | 0;\n    hi = (hi + Math.imul(ah0, bh2)) | 0;\n    var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n    w2 &= 0x3ffffff;\n    /* k = 3 */\n    lo = Math.imul(al3, bl0);\n    mid = Math.imul(al3, bh0);\n    mid = (mid + Math.imul(ah3, bl0)) | 0;\n    hi = Math.imul(ah3, bh0);\n    lo = (lo + Math.imul(al2, bl1)) | 0;\n    mid = (mid + Math.imul(al2, bh1)) | 0;\n    mid = (mid + Math.imul(ah2, bl1)) | 0;\n    hi = (hi + Math.imul(ah2, bh1)) | 0;\n    lo = (lo + Math.imul(al1, bl2)) | 0;\n    mid = (mid + Math.imul(al1, bh2)) | 0;\n    mid = (mid + Math.imul(ah1, bl2)) | 0;\n    hi = (hi + Math.imul(ah1, bh2)) | 0;\n    lo = (lo + Math.imul(al0, bl3)) | 0;\n    mid = (mid + Math.imul(al0, bh3)) | 0;\n    mid = (mid + Math.imul(ah0, bl3)) | 0;\n    hi = (hi + Math.imul(ah0, bh3)) | 0;\n    var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n    w3 &= 0x3ffffff;\n    /* k = 4 */\n    lo = Math.imul(al4, bl0);\n    mid = Math.imul(al4, bh0);\n    mid = (mid + Math.imul(ah4, bl0)) | 0;\n    hi = Math.imul(ah4, bh0);\n    lo = (lo + Math.imul(al3, bl1)) | 0;\n    mid = (mid + Math.imul(al3, bh1)) | 0;\n    mid = (mid + Math.imul(ah3, bl1)) | 0;\n    hi = (hi + Math.imul(ah3, bh1)) | 0;\n    lo = (lo + Math.imul(al2, bl2)) | 0;\n    mid = (mid + Math.imul(al2, bh2)) | 0;\n    mid = (mid + Math.imul(ah2, bl2)) | 0;\n    hi = (hi + Math.imul(ah2, bh2)) | 0;\n    lo = (lo + Math.imul(al1, bl3)) | 0;\n    mid = (mid + Math.imul(al1, bh3)) | 0;\n    mid = (mid + Math.imul(ah1, bl3)) | 0;\n    hi = (hi + Math.imul(ah1, bh3)) | 0;\n    lo = (lo + Math.imul(al0, bl4)) | 0;\n    mid = (mid + Math.imul(al0, bh4)) | 0;\n    mid = (mid + Math.imul(ah0, bl4)) | 0;\n    hi = (hi + Math.imul(ah0, bh4)) | 0;\n    var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n    w4 &= 0x3ffffff;\n    /* k = 5 */\n    lo = Math.imul(al5, bl0);\n    mid = Math.imul(al5, bh0);\n    mid = (mid + Math.imul(ah5, bl0)) | 0;\n    hi = Math.imul(ah5, bh0);\n    lo = (lo + Math.imul(al4, bl1)) | 0;\n    mid = (mid + Math.imul(al4, bh1)) | 0;\n    mid = (mid + Math.imul(ah4, bl1)) | 0;\n    hi = (hi + Math.imul(ah4, bh1)) | 0;\n    lo = (lo + Math.imul(al3, bl2)) | 0;\n    mid = (mid + Math.imul(al3, bh2)) | 0;\n    mid = (mid + Math.imul(ah3, bl2)) | 0;\n    hi = (hi + Math.imul(ah3, bh2)) | 0;\n    lo = (lo + Math.imul(al2, bl3)) | 0;\n    mid = (mid + Math.imul(al2, bh3)) | 0;\n    mid = (mid + Math.imul(ah2, bl3)) | 0;\n    hi = (hi + Math.imul(ah2, bh3)) | 0;\n    lo = (lo + Math.imul(al1, bl4)) | 0;\n    mid = (mid + Math.imul(al1, bh4)) | 0;\n    mid = (mid + Math.imul(ah1, bl4)) | 0;\n    hi = (hi + Math.imul(ah1, bh4)) | 0;\n    lo = (lo + Math.imul(al0, bl5)) | 0;\n    mid = (mid + Math.imul(al0, bh5)) | 0;\n    mid = (mid + Math.imul(ah0, bl5)) | 0;\n    hi = (hi + Math.imul(ah0, bh5)) | 0;\n    var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n    w5 &= 0x3ffffff;\n    /* k = 6 */\n    lo = Math.imul(al6, bl0);\n    mid = Math.imul(al6, bh0);\n    mid = (mid + Math.imul(ah6, bl0)) | 0;\n    hi = Math.imul(ah6, bh0);\n    lo = (lo + Math.imul(al5, bl1)) | 0;\n    mid = (mid + Math.imul(al5, bh1)) | 0;\n    mid = (mid + Math.imul(ah5, bl1)) | 0;\n    hi = (hi + Math.imul(ah5, bh1)) | 0;\n    lo = (lo + Math.imul(al4, bl2)) | 0;\n    mid = (mid + Math.imul(al4, bh2)) | 0;\n    mid = (mid + Math.imul(ah4, bl2)) | 0;\n    hi = (hi + Math.imul(ah4, bh2)) | 0;\n    lo = (lo + Math.imul(al3, bl3)) | 0;\n    mid = (mid + Math.imul(al3, bh3)) | 0;\n    mid = (mid + Math.imul(ah3, bl3)) | 0;\n    hi = (hi + Math.imul(ah3, bh3)) | 0;\n    lo = (lo + Math.imul(al2, bl4)) | 0;\n    mid = (mid + Math.imul(al2, bh4)) | 0;\n    mid = (mid + Math.imul(ah2, bl4)) | 0;\n    hi = (hi + Math.imul(ah2, bh4)) | 0;\n    lo = (lo + Math.imul(al1, bl5)) | 0;\n    mid = (mid + Math.imul(al1, bh5)) | 0;\n    mid = (mid + Math.imul(ah1, bl5)) | 0;\n    hi = (hi + Math.imul(ah1, bh5)) | 0;\n    lo = (lo + Math.imul(al0, bl6)) | 0;\n    mid = (mid + Math.imul(al0, bh6)) | 0;\n    mid = (mid + Math.imul(ah0, bl6)) | 0;\n    hi = (hi + Math.imul(ah0, bh6)) | 0;\n    var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n    w6 &= 0x3ffffff;\n    /* k = 7 */\n    lo = Math.imul(al7, bl0);\n    mid = Math.imul(al7, bh0);\n    mid = (mid + Math.imul(ah7, bl0)) | 0;\n    hi = Math.imul(ah7, bh0);\n    lo = (lo + Math.imul(al6, bl1)) | 0;\n    mid = (mid + Math.imul(al6, bh1)) | 0;\n    mid = (mid + Math.imul(ah6, bl1)) | 0;\n    hi = (hi + Math.imul(ah6, bh1)) | 0;\n    lo = (lo + Math.imul(al5, bl2)) | 0;\n    mid = (mid + Math.imul(al5, bh2)) | 0;\n    mid = (mid + Math.imul(ah5, bl2)) | 0;\n    hi = (hi + Math.imul(ah5, bh2)) | 0;\n    lo = (lo + Math.imul(al4, bl3)) | 0;\n    mid = (mid + Math.imul(al4, bh3)) | 0;\n    mid = (mid + Math.imul(ah4, bl3)) | 0;\n    hi = (hi + Math.imul(ah4, bh3)) | 0;\n    lo = (lo + Math.imul(al3, bl4)) | 0;\n    mid = (mid + Math.imul(al3, bh4)) | 0;\n    mid = (mid + Math.imul(ah3, bl4)) | 0;\n    hi = (hi + Math.imul(ah3, bh4)) | 0;\n    lo = (lo + Math.imul(al2, bl5)) | 0;\n    mid = (mid + Math.imul(al2, bh5)) | 0;\n    mid = (mid + Math.imul(ah2, bl5)) | 0;\n    hi = (hi + Math.imul(ah2, bh5)) | 0;\n    lo = (lo + Math.imul(al1, bl6)) | 0;\n    mid = (mid + Math.imul(al1, bh6)) | 0;\n    mid = (mid + Math.imul(ah1, bl6)) | 0;\n    hi = (hi + Math.imul(ah1, bh6)) | 0;\n    lo = (lo + Math.imul(al0, bl7)) | 0;\n    mid = (mid + Math.imul(al0, bh7)) | 0;\n    mid = (mid + Math.imul(ah0, bl7)) | 0;\n    hi = (hi + Math.imul(ah0, bh7)) | 0;\n    var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n    w7 &= 0x3ffffff;\n    /* k = 8 */\n    lo = Math.imul(al8, bl0);\n    mid = Math.imul(al8, bh0);\n    mid = (mid + Math.imul(ah8, bl0)) | 0;\n    hi = Math.imul(ah8, bh0);\n    lo = (lo + Math.imul(al7, bl1)) | 0;\n    mid = (mid + Math.imul(al7, bh1)) | 0;\n    mid = (mid + Math.imul(ah7, bl1)) | 0;\n    hi = (hi + Math.imul(ah7, bh1)) | 0;\n    lo = (lo + Math.imul(al6, bl2)) | 0;\n    mid = (mid + Math.imul(al6, bh2)) | 0;\n    mid = (mid + Math.imul(ah6, bl2)) | 0;\n    hi = (hi + Math.imul(ah6, bh2)) | 0;\n    lo = (lo + Math.imul(al5, bl3)) | 0;\n    mid = (mid + Math.imul(al5, bh3)) | 0;\n    mid = (mid + Math.imul(ah5, bl3)) | 0;\n    hi = (hi + Math.imul(ah5, bh3)) | 0;\n    lo = (lo + Math.imul(al4, bl4)) | 0;\n    mid = (mid + Math.imul(al4, bh4)) | 0;\n    mid = (mid + Math.imul(ah4, bl4)) | 0;\n    hi = (hi + Math.imul(ah4, bh4)) | 0;\n    lo = (lo + Math.imul(al3, bl5)) | 0;\n    mid = (mid + Math.imul(al3, bh5)) | 0;\n    mid = (mid + Math.imul(ah3, bl5)) | 0;\n    hi = (hi + Math.imul(ah3, bh5)) | 0;\n    lo = (lo + Math.imul(al2, bl6)) | 0;\n    mid = (mid + Math.imul(al2, bh6)) | 0;\n    mid = (mid + Math.imul(ah2, bl6)) | 0;\n    hi = (hi + Math.imul(ah2, bh6)) | 0;\n    lo = (lo + Math.imul(al1, bl7)) | 0;\n    mid = (mid + Math.imul(al1, bh7)) | 0;\n    mid = (mid + Math.imul(ah1, bl7)) | 0;\n    hi = (hi + Math.imul(ah1, bh7)) | 0;\n    lo = (lo + Math.imul(al0, bl8)) | 0;\n    mid = (mid + Math.imul(al0, bh8)) | 0;\n    mid = (mid + Math.imul(ah0, bl8)) | 0;\n    hi = (hi + Math.imul(ah0, bh8)) | 0;\n    var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n    w8 &= 0x3ffffff;\n    /* k = 9 */\n    lo = Math.imul(al9, bl0);\n    mid = Math.imul(al9, bh0);\n    mid = (mid + Math.imul(ah9, bl0)) | 0;\n    hi = Math.imul(ah9, bh0);\n    lo = (lo + Math.imul(al8, bl1)) | 0;\n    mid = (mid + Math.imul(al8, bh1)) | 0;\n    mid = (mid + Math.imul(ah8, bl1)) | 0;\n    hi = (hi + Math.imul(ah8, bh1)) | 0;\n    lo = (lo + Math.imul(al7, bl2)) | 0;\n    mid = (mid + Math.imul(al7, bh2)) | 0;\n    mid = (mid + Math.imul(ah7, bl2)) | 0;\n    hi = (hi + Math.imul(ah7, bh2)) | 0;\n    lo = (lo + Math.imul(al6, bl3)) | 0;\n    mid = (mid + Math.imul(al6, bh3)) | 0;\n    mid = (mid + Math.imul(ah6, bl3)) | 0;\n    hi = (hi + Math.imul(ah6, bh3)) | 0;\n    lo = (lo + Math.imul(al5, bl4)) | 0;\n    mid = (mid + Math.imul(al5, bh4)) | 0;\n    mid = (mid + Math.imul(ah5, bl4)) | 0;\n    hi = (hi + Math.imul(ah5, bh4)) | 0;\n    lo = (lo + Math.imul(al4, bl5)) | 0;\n    mid = (mid + Math.imul(al4, bh5)) | 0;\n    mid = (mid + Math.imul(ah4, bl5)) | 0;\n    hi = (hi + Math.imul(ah4, bh5)) | 0;\n    lo = (lo + Math.imul(al3, bl6)) | 0;\n    mid = (mid + Math.imul(al3, bh6)) | 0;\n    mid = (mid + Math.imul(ah3, bl6)) | 0;\n    hi = (hi + Math.imul(ah3, bh6)) | 0;\n    lo = (lo + Math.imul(al2, bl7)) | 0;\n    mid = (mid + Math.imul(al2, bh7)) | 0;\n    mid = (mid + Math.imul(ah2, bl7)) | 0;\n    hi = (hi + Math.imul(ah2, bh7)) | 0;\n    lo = (lo + Math.imul(al1, bl8)) | 0;\n    mid = (mid + Math.imul(al1, bh8)) | 0;\n    mid = (mid + Math.imul(ah1, bl8)) | 0;\n    hi = (hi + Math.imul(ah1, bh8)) | 0;\n    lo = (lo + Math.imul(al0, bl9)) | 0;\n    mid = (mid + Math.imul(al0, bh9)) | 0;\n    mid = (mid + Math.imul(ah0, bl9)) | 0;\n    hi = (hi + Math.imul(ah0, bh9)) | 0;\n    var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n    w9 &= 0x3ffffff;\n    /* k = 10 */\n    lo = Math.imul(al9, bl1);\n    mid = Math.imul(al9, bh1);\n    mid = (mid + Math.imul(ah9, bl1)) | 0;\n    hi = Math.imul(ah9, bh1);\n    lo = (lo + Math.imul(al8, bl2)) | 0;\n    mid = (mid + Math.imul(al8, bh2)) | 0;\n    mid = (mid + Math.imul(ah8, bl2)) | 0;\n    hi = (hi + Math.imul(ah8, bh2)) | 0;\n    lo = (lo + Math.imul(al7, bl3)) | 0;\n    mid = (mid + Math.imul(al7, bh3)) | 0;\n    mid = (mid + Math.imul(ah7, bl3)) | 0;\n    hi = (hi + Math.imul(ah7, bh3)) | 0;\n    lo = (lo + Math.imul(al6, bl4)) | 0;\n    mid = (mid + Math.imul(al6, bh4)) | 0;\n    mid = (mid + Math.imul(ah6, bl4)) | 0;\n    hi = (hi + Math.imul(ah6, bh4)) | 0;\n    lo = (lo + Math.imul(al5, bl5)) | 0;\n    mid = (mid + Math.imul(al5, bh5)) | 0;\n    mid = (mid + Math.imul(ah5, bl5)) | 0;\n    hi = (hi + Math.imul(ah5, bh5)) | 0;\n    lo = (lo + Math.imul(al4, bl6)) | 0;\n    mid = (mid + Math.imul(al4, bh6)) | 0;\n    mid = (mid + Math.imul(ah4, bl6)) | 0;\n    hi = (hi + Math.imul(ah4, bh6)) | 0;\n    lo = (lo + Math.imul(al3, bl7)) | 0;\n    mid = (mid + Math.imul(al3, bh7)) | 0;\n    mid = (mid + Math.imul(ah3, bl7)) | 0;\n    hi = (hi + Math.imul(ah3, bh7)) | 0;\n    lo = (lo + Math.imul(al2, bl8)) | 0;\n    mid = (mid + Math.imul(al2, bh8)) | 0;\n    mid = (mid + Math.imul(ah2, bl8)) | 0;\n    hi = (hi + Math.imul(ah2, bh8)) | 0;\n    lo = (lo + Math.imul(al1, bl9)) | 0;\n    mid = (mid + Math.imul(al1, bh9)) | 0;\n    mid = (mid + Math.imul(ah1, bl9)) | 0;\n    hi = (hi + Math.imul(ah1, bh9)) | 0;\n    var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n    w10 &= 0x3ffffff;\n    /* k = 11 */\n    lo = Math.imul(al9, bl2);\n    mid = Math.imul(al9, bh2);\n    mid = (mid + Math.imul(ah9, bl2)) | 0;\n    hi = Math.imul(ah9, bh2);\n    lo = (lo + Math.imul(al8, bl3)) | 0;\n    mid = (mid + Math.imul(al8, bh3)) | 0;\n    mid = (mid + Math.imul(ah8, bl3)) | 0;\n    hi = (hi + Math.imul(ah8, bh3)) | 0;\n    lo = (lo + Math.imul(al7, bl4)) | 0;\n    mid = (mid + Math.imul(al7, bh4)) | 0;\n    mid = (mid + Math.imul(ah7, bl4)) | 0;\n    hi = (hi + Math.imul(ah7, bh4)) | 0;\n    lo = (lo + Math.imul(al6, bl5)) | 0;\n    mid = (mid + Math.imul(al6, bh5)) | 0;\n    mid = (mid + Math.imul(ah6, bl5)) | 0;\n    hi = (hi + Math.imul(ah6, bh5)) | 0;\n    lo = (lo + Math.imul(al5, bl6)) | 0;\n    mid = (mid + Math.imul(al5, bh6)) | 0;\n    mid = (mid + Math.imul(ah5, bl6)) | 0;\n    hi = (hi + Math.imul(ah5, bh6)) | 0;\n    lo = (lo + Math.imul(al4, bl7)) | 0;\n    mid = (mid + Math.imul(al4, bh7)) | 0;\n    mid = (mid + Math.imul(ah4, bl7)) | 0;\n    hi = (hi + Math.imul(ah4, bh7)) | 0;\n    lo = (lo + Math.imul(al3, bl8)) | 0;\n    mid = (mid + Math.imul(al3, bh8)) | 0;\n    mid = (mid + Math.imul(ah3, bl8)) | 0;\n    hi = (hi + Math.imul(ah3, bh8)) | 0;\n    lo = (lo + Math.imul(al2, bl9)) | 0;\n    mid = (mid + Math.imul(al2, bh9)) | 0;\n    mid = (mid + Math.imul(ah2, bl9)) | 0;\n    hi = (hi + Math.imul(ah2, bh9)) | 0;\n    var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n    w11 &= 0x3ffffff;\n    /* k = 12 */\n    lo = Math.imul(al9, bl3);\n    mid = Math.imul(al9, bh3);\n    mid = (mid + Math.imul(ah9, bl3)) | 0;\n    hi = Math.imul(ah9, bh3);\n    lo = (lo + Math.imul(al8, bl4)) | 0;\n    mid = (mid + Math.imul(al8, bh4)) | 0;\n    mid = (mid + Math.imul(ah8, bl4)) | 0;\n    hi = (hi + Math.imul(ah8, bh4)) | 0;\n    lo = (lo + Math.imul(al7, bl5)) | 0;\n    mid = (mid + Math.imul(al7, bh5)) | 0;\n    mid = (mid + Math.imul(ah7, bl5)) | 0;\n    hi = (hi + Math.imul(ah7, bh5)) | 0;\n    lo = (lo + Math.imul(al6, bl6)) | 0;\n    mid = (mid + Math.imul(al6, bh6)) | 0;\n    mid = (mid + Math.imul(ah6, bl6)) | 0;\n    hi = (hi + Math.imul(ah6, bh6)) | 0;\n    lo = (lo + Math.imul(al5, bl7)) | 0;\n    mid = (mid + Math.imul(al5, bh7)) | 0;\n    mid = (mid + Math.imul(ah5, bl7)) | 0;\n    hi = (hi + Math.imul(ah5, bh7)) | 0;\n    lo = (lo + Math.imul(al4, bl8)) | 0;\n    mid = (mid + Math.imul(al4, bh8)) | 0;\n    mid = (mid + Math.imul(ah4, bl8)) | 0;\n    hi = (hi + Math.imul(ah4, bh8)) | 0;\n    lo = (lo + Math.imul(al3, bl9)) | 0;\n    mid = (mid + Math.imul(al3, bh9)) | 0;\n    mid = (mid + Math.imul(ah3, bl9)) | 0;\n    hi = (hi + Math.imul(ah3, bh9)) | 0;\n    var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n    w12 &= 0x3ffffff;\n    /* k = 13 */\n    lo = Math.imul(al9, bl4);\n    mid = Math.imul(al9, bh4);\n    mid = (mid + Math.imul(ah9, bl4)) | 0;\n    hi = Math.imul(ah9, bh4);\n    lo = (lo + Math.imul(al8, bl5)) | 0;\n    mid = (mid + Math.imul(al8, bh5)) | 0;\n    mid = (mid + Math.imul(ah8, bl5)) | 0;\n    hi = (hi + Math.imul(ah8, bh5)) | 0;\n    lo = (lo + Math.imul(al7, bl6)) | 0;\n    mid = (mid + Math.imul(al7, bh6)) | 0;\n    mid = (mid + Math.imul(ah7, bl6)) | 0;\n    hi = (hi + Math.imul(ah7, bh6)) | 0;\n    lo = (lo + Math.imul(al6, bl7)) | 0;\n    mid = (mid + Math.imul(al6, bh7)) | 0;\n    mid = (mid + Math.imul(ah6, bl7)) | 0;\n    hi = (hi + Math.imul(ah6, bh7)) | 0;\n    lo = (lo + Math.imul(al5, bl8)) | 0;\n    mid = (mid + Math.imul(al5, bh8)) | 0;\n    mid = (mid + Math.imul(ah5, bl8)) | 0;\n    hi = (hi + Math.imul(ah5, bh8)) | 0;\n    lo = (lo + Math.imul(al4, bl9)) | 0;\n    mid = (mid + Math.imul(al4, bh9)) | 0;\n    mid = (mid + Math.imul(ah4, bl9)) | 0;\n    hi = (hi + Math.imul(ah4, bh9)) | 0;\n    var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n    w13 &= 0x3ffffff;\n    /* k = 14 */\n    lo = Math.imul(al9, bl5);\n    mid = Math.imul(al9, bh5);\n    mid = (mid + Math.imul(ah9, bl5)) | 0;\n    hi = Math.imul(ah9, bh5);\n    lo = (lo + Math.imul(al8, bl6)) | 0;\n    mid = (mid + Math.imul(al8, bh6)) | 0;\n    mid = (mid + Math.imul(ah8, bl6)) | 0;\n    hi = (hi + Math.imul(ah8, bh6)) | 0;\n    lo = (lo + Math.imul(al7, bl7)) | 0;\n    mid = (mid + Math.imul(al7, bh7)) | 0;\n    mid = (mid + Math.imul(ah7, bl7)) | 0;\n    hi = (hi + Math.imul(ah7, bh7)) | 0;\n    lo = (lo + Math.imul(al6, bl8)) | 0;\n    mid = (mid + Math.imul(al6, bh8)) | 0;\n    mid = (mid + Math.imul(ah6, bl8)) | 0;\n    hi = (hi + Math.imul(ah6, bh8)) | 0;\n    lo = (lo + Math.imul(al5, bl9)) | 0;\n    mid = (mid + Math.imul(al5, bh9)) | 0;\n    mid = (mid + Math.imul(ah5, bl9)) | 0;\n    hi = (hi + Math.imul(ah5, bh9)) | 0;\n    var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n    w14 &= 0x3ffffff;\n    /* k = 15 */\n    lo = Math.imul(al9, bl6);\n    mid = Math.imul(al9, bh6);\n    mid = (mid + Math.imul(ah9, bl6)) | 0;\n    hi = Math.imul(ah9, bh6);\n    lo = (lo + Math.imul(al8, bl7)) | 0;\n    mid = (mid + Math.imul(al8, bh7)) | 0;\n    mid = (mid + Math.imul(ah8, bl7)) | 0;\n    hi = (hi + Math.imul(ah8, bh7)) | 0;\n    lo = (lo + Math.imul(al7, bl8)) | 0;\n    mid = (mid + Math.imul(al7, bh8)) | 0;\n    mid = (mid + Math.imul(ah7, bl8)) | 0;\n    hi = (hi + Math.imul(ah7, bh8)) | 0;\n    lo = (lo + Math.imul(al6, bl9)) | 0;\n    mid = (mid + Math.imul(al6, bh9)) | 0;\n    mid = (mid + Math.imul(ah6, bl9)) | 0;\n    hi = (hi + Math.imul(ah6, bh9)) | 0;\n    var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n    w15 &= 0x3ffffff;\n    /* k = 16 */\n    lo = Math.imul(al9, bl7);\n    mid = Math.imul(al9, bh7);\n    mid = (mid + Math.imul(ah9, bl7)) | 0;\n    hi = Math.imul(ah9, bh7);\n    lo = (lo + Math.imul(al8, bl8)) | 0;\n    mid = (mid + Math.imul(al8, bh8)) | 0;\n    mid = (mid + Math.imul(ah8, bl8)) | 0;\n    hi = (hi + Math.imul(ah8, bh8)) | 0;\n    lo = (lo + Math.imul(al7, bl9)) | 0;\n    mid = (mid + Math.imul(al7, bh9)) | 0;\n    mid = (mid + Math.imul(ah7, bl9)) | 0;\n    hi = (hi + Math.imul(ah7, bh9)) | 0;\n    var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n    w16 &= 0x3ffffff;\n    /* k = 17 */\n    lo = Math.imul(al9, bl8);\n    mid = Math.imul(al9, bh8);\n    mid = (mid + Math.imul(ah9, bl8)) | 0;\n    hi = Math.imul(ah9, bh8);\n    lo = (lo + Math.imul(al8, bl9)) | 0;\n    mid = (mid + Math.imul(al8, bh9)) | 0;\n    mid = (mid + Math.imul(ah8, bl9)) | 0;\n    hi = (hi + Math.imul(ah8, bh9)) | 0;\n    var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n    w17 &= 0x3ffffff;\n    /* k = 18 */\n    lo = Math.imul(al9, bl9);\n    mid = Math.imul(al9, bh9);\n    mid = (mid + Math.imul(ah9, bl9)) | 0;\n    hi = Math.imul(ah9, bh9);\n    var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n    c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n    w18 &= 0x3ffffff;\n    o[0] = w0;\n    o[1] = w1;\n    o[2] = w2;\n    o[3] = w3;\n    o[4] = w4;\n    o[5] = w5;\n    o[6] = w6;\n    o[7] = w7;\n    o[8] = w8;\n    o[9] = w9;\n    o[10] = w10;\n    o[11] = w11;\n    o[12] = w12;\n    o[13] = w13;\n    o[14] = w14;\n    o[15] = w15;\n    o[16] = w16;\n    o[17] = w17;\n    o[18] = w18;\n    if (c !== 0) {\n      o[19] = c;\n      out.length++;\n    }\n    return out;\n  };\n\n  // Polyfill comb\n  if (!Math.imul) {\n    comb10MulTo = smallMulTo;\n  }\n\n  function bigMulTo (self, num, out) {\n    out.negative = num.negative ^ self.negative;\n    out.length = self.length + num.length;\n\n    var carry = 0;\n    var hncarry = 0;\n    for (var k = 0; k < out.length - 1; k++) {\n      // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n      // note that ncarry could be >= 0x3ffffff\n      var ncarry = hncarry;\n      hncarry = 0;\n      var rword = carry & 0x3ffffff;\n      var maxJ = Math.min(k, num.length - 1);\n      for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n        var i = k - j;\n        var a = self.words[i] | 0;\n        var b = num.words[j] | 0;\n        var r = a * b;\n\n        var lo = r & 0x3ffffff;\n        ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n        lo = (lo + rword) | 0;\n        rword = lo & 0x3ffffff;\n        ncarry = (ncarry + (lo >>> 26)) | 0;\n\n        hncarry += ncarry >>> 26;\n        ncarry &= 0x3ffffff;\n      }\n      out.words[k] = rword;\n      carry = ncarry;\n      ncarry = hncarry;\n    }\n    if (carry !== 0) {\n      out.words[k] = carry;\n    } else {\n      out.length--;\n    }\n\n    return out.strip();\n  }\n\n  function jumboMulTo (self, num, out) {\n    var fftm = new FFTM();\n    return fftm.mulp(self, num, out);\n  }\n\n  BN.prototype.mulTo = function mulTo (num, out) {\n    var res;\n    var len = this.length + num.length;\n    if (this.length === 10 && num.length === 10) {\n      res = comb10MulTo(this, num, out);\n    } else if (len < 63) {\n      res = smallMulTo(this, num, out);\n    } else if (len < 1024) {\n      res = bigMulTo(this, num, out);\n    } else {\n      res = jumboMulTo(this, num, out);\n    }\n\n    return res;\n  };\n\n  // Cooley-Tukey algorithm for FFT\n  // slightly revisited to rely on looping instead of recursion\n\n  function FFTM (x, y) {\n    this.x = x;\n    this.y = y;\n  }\n\n  FFTM.prototype.makeRBT = function makeRBT (N) {\n    var t = new Array(N);\n    var l = BN.prototype._countBits(N) - 1;\n    for (var i = 0; i < N; i++) {\n      t[i] = this.revBin(i, l, N);\n    }\n\n    return t;\n  };\n\n  // Returns binary-reversed representation of `x`\n  FFTM.prototype.revBin = function revBin (x, l, N) {\n    if (x === 0 || x === N - 1) return x;\n\n    var rb = 0;\n    for (var i = 0; i < l; i++) {\n      rb |= (x & 1) << (l - i - 1);\n      x >>= 1;\n    }\n\n    return rb;\n  };\n\n  // Performs \"tweedling\" phase, therefore 'emulating'\n  // behaviour of the recursive algorithm\n  FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n    for (var i = 0; i < N; i++) {\n      rtws[i] = rws[rbt[i]];\n      itws[i] = iws[rbt[i]];\n    }\n  };\n\n  FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n    this.permute(rbt, rws, iws, rtws, itws, N);\n\n    for (var s = 1; s < N; s <<= 1) {\n      var l = s << 1;\n\n      var rtwdf = Math.cos(2 * Math.PI / l);\n      var itwdf = Math.sin(2 * Math.PI / l);\n\n      for (var p = 0; p < N; p += l) {\n        var rtwdf_ = rtwdf;\n        var itwdf_ = itwdf;\n\n        for (var j = 0; j < s; j++) {\n          var re = rtws[p + j];\n          var ie = itws[p + j];\n\n          var ro = rtws[p + j + s];\n          var io = itws[p + j + s];\n\n          var rx = rtwdf_ * ro - itwdf_ * io;\n\n          io = rtwdf_ * io + itwdf_ * ro;\n          ro = rx;\n\n          rtws[p + j] = re + ro;\n          itws[p + j] = ie + io;\n\n          rtws[p + j + s] = re - ro;\n          itws[p + j + s] = ie - io;\n\n          /* jshint maxdepth : false */\n          if (j !== l) {\n            rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n            itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n            rtwdf_ = rx;\n          }\n        }\n      }\n    }\n  };\n\n  FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n    var N = Math.max(m, n) | 1;\n    var odd = N & 1;\n    var i = 0;\n    for (N = N / 2 | 0; N; N = N >>> 1) {\n      i++;\n    }\n\n    return 1 << i + 1 + odd;\n  };\n\n  FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n    if (N <= 1) return;\n\n    for (var i = 0; i < N / 2; i++) {\n      var t = rws[i];\n\n      rws[i] = rws[N - i - 1];\n      rws[N - i - 1] = t;\n\n      t = iws[i];\n\n      iws[i] = -iws[N - i - 1];\n      iws[N - i - 1] = -t;\n    }\n  };\n\n  FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n    var carry = 0;\n    for (var i = 0; i < N / 2; i++) {\n      var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n        Math.round(ws[2 * i] / N) +\n        carry;\n\n      ws[i] = w & 0x3ffffff;\n\n      if (w < 0x4000000) {\n        carry = 0;\n      } else {\n        carry = w / 0x4000000 | 0;\n      }\n    }\n\n    return ws;\n  };\n\n  FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n    var carry = 0;\n    for (var i = 0; i < len; i++) {\n      carry = carry + (ws[i] | 0);\n\n      rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n      rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n    }\n\n    // Pad with zeroes\n    for (i = 2 * len; i < N; ++i) {\n      rws[i] = 0;\n    }\n\n    assert(carry === 0);\n    assert((carry & ~0x1fff) === 0);\n  };\n\n  FFTM.prototype.stub = function stub (N) {\n    var ph = new Array(N);\n    for (var i = 0; i < N; i++) {\n      ph[i] = 0;\n    }\n\n    return ph;\n  };\n\n  FFTM.prototype.mulp = function mulp (x, y, out) {\n    var N = 2 * this.guessLen13b(x.length, y.length);\n\n    var rbt = this.makeRBT(N);\n\n    var _ = this.stub(N);\n\n    var rws = new Array(N);\n    var rwst = new Array(N);\n    var iwst = new Array(N);\n\n    var nrws = new Array(N);\n    var nrwst = new Array(N);\n    var niwst = new Array(N);\n\n    var rmws = out.words;\n    rmws.length = N;\n\n    this.convert13b(x.words, x.length, rws, N);\n    this.convert13b(y.words, y.length, nrws, N);\n\n    this.transform(rws, _, rwst, iwst, N, rbt);\n    this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n    for (var i = 0; i < N; i++) {\n      var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n      iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n      rwst[i] = rx;\n    }\n\n    this.conjugate(rwst, iwst, N);\n    this.transform(rwst, iwst, rmws, _, N, rbt);\n    this.conjugate(rmws, _, N);\n    this.normalize13b(rmws, N);\n\n    out.negative = x.negative ^ y.negative;\n    out.length = x.length + y.length;\n    return out.strip();\n  };\n\n  // Multiply `this` by `num`\n  BN.prototype.mul = function mul (num) {\n    var out = new BN(null);\n    out.words = new Array(this.length + num.length);\n    return this.mulTo(num, out);\n  };\n\n  // Multiply employing FFT\n  BN.prototype.mulf = function mulf (num) {\n    var out = new BN(null);\n    out.words = new Array(this.length + num.length);\n    return jumboMulTo(this, num, out);\n  };\n\n  // In-place Multiplication\n  BN.prototype.imul = function imul (num) {\n    return this.clone().mulTo(num, this);\n  };\n\n  BN.prototype.imuln = function imuln (num) {\n    assert(typeof num === 'number');\n    assert(num < 0x4000000);\n\n    // Carry\n    var carry = 0;\n    for (var i = 0; i < this.length; i++) {\n      var w = (this.words[i] | 0) * num;\n      var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n      carry >>= 26;\n      carry += (w / 0x4000000) | 0;\n      // NOTE: lo is 27bit maximum\n      carry += lo >>> 26;\n      this.words[i] = lo & 0x3ffffff;\n    }\n\n    if (carry !== 0) {\n      this.words[i] = carry;\n      this.length++;\n    }\n\n    return this;\n  };\n\n  BN.prototype.muln = function muln (num) {\n    return this.clone().imuln(num);\n  };\n\n  // `this` * `this`\n  BN.prototype.sqr = function sqr () {\n    return this.mul(this);\n  };\n\n  // `this` * `this` in-place\n  BN.prototype.isqr = function isqr () {\n    return this.imul(this.clone());\n  };\n\n  // Math.pow(`this`, `num`)\n  BN.prototype.pow = function pow (num) {\n    var w = toBitArray(num);\n    if (w.length === 0) return new BN(1);\n\n    // Skip leading zeroes\n    var res = this;\n    for (var i = 0; i < w.length; i++, res = res.sqr()) {\n      if (w[i] !== 0) break;\n    }\n\n    if (++i < w.length) {\n      for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n        if (w[i] === 0) continue;\n\n        res = res.mul(q);\n      }\n    }\n\n    return res;\n  };\n\n  // Shift-left in-place\n  BN.prototype.iushln = function iushln (bits) {\n    assert(typeof bits === 'number' && bits >= 0);\n    var r = bits % 26;\n    var s = (bits - r) / 26;\n    var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n    var i;\n\n    if (r !== 0) {\n      var carry = 0;\n\n      for (i = 0; i < this.length; i++) {\n        var newCarry = this.words[i] & carryMask;\n        var c = ((this.words[i] | 0) - newCarry) << r;\n        this.words[i] = c | carry;\n        carry = newCarry >>> (26 - r);\n      }\n\n      if (carry) {\n        this.words[i] = carry;\n        this.length++;\n      }\n    }\n\n    if (s !== 0) {\n      for (i = this.length - 1; i >= 0; i--) {\n        this.words[i + s] = this.words[i];\n      }\n\n      for (i = 0; i < s; i++) {\n        this.words[i] = 0;\n      }\n\n      this.length += s;\n    }\n\n    return this.strip();\n  };\n\n  BN.prototype.ishln = function ishln (bits) {\n    // TODO(indutny): implement me\n    assert(this.negative === 0);\n    return this.iushln(bits);\n  };\n\n  // Shift-right in-place\n  // NOTE: `hint` is a lowest bit before trailing zeroes\n  // NOTE: if `extended` is present - it will be filled with destroyed bits\n  BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n    assert(typeof bits === 'number' && bits >= 0);\n    var h;\n    if (hint) {\n      h = (hint - (hint % 26)) / 26;\n    } else {\n      h = 0;\n    }\n\n    var r = bits % 26;\n    var s = Math.min((bits - r) / 26, this.length);\n    var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n    var maskedWords = extended;\n\n    h -= s;\n    h = Math.max(0, h);\n\n    // Extended mode, copy masked part\n    if (maskedWords) {\n      for (var i = 0; i < s; i++) {\n        maskedWords.words[i] = this.words[i];\n      }\n      maskedWords.length = s;\n    }\n\n    if (s === 0) {\n      // No-op, we should not move anything at all\n    } else if (this.length > s) {\n      this.length -= s;\n      for (i = 0; i < this.length; i++) {\n        this.words[i] = this.words[i + s];\n      }\n    } else {\n      this.words[0] = 0;\n      this.length = 1;\n    }\n\n    var carry = 0;\n    for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n      var word = this.words[i] | 0;\n      this.words[i] = (carry << (26 - r)) | (word >>> r);\n      carry = word & mask;\n    }\n\n    // Push carried bits as a mask\n    if (maskedWords && carry !== 0) {\n      maskedWords.words[maskedWords.length++] = carry;\n    }\n\n    if (this.length === 0) {\n      this.words[0] = 0;\n      this.length = 1;\n    }\n\n    return this.strip();\n  };\n\n  BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n    // TODO(indutny): implement me\n    assert(this.negative === 0);\n    return this.iushrn(bits, hint, extended);\n  };\n\n  // Shift-left\n  BN.prototype.shln = function shln (bits) {\n    return this.clone().ishln(bits);\n  };\n\n  BN.prototype.ushln = function ushln (bits) {\n    return this.clone().iushln(bits);\n  };\n\n  // Shift-right\n  BN.prototype.shrn = function shrn (bits) {\n    return this.clone().ishrn(bits);\n  };\n\n  BN.prototype.ushrn = function ushrn (bits) {\n    return this.clone().iushrn(bits);\n  };\n\n  // Test if n bit is set\n  BN.prototype.testn = function testn (bit) {\n    assert(typeof bit === 'number' && bit >= 0);\n    var r = bit % 26;\n    var s = (bit - r) / 26;\n    var q = 1 << r;\n\n    // Fast case: bit is much higher than all existing words\n    if (this.length <= s) return false;\n\n    // Check bit and return\n    var w = this.words[s];\n\n    return !!(w & q);\n  };\n\n  // Return only lowers bits of number (in-place)\n  BN.prototype.imaskn = function imaskn (bits) {\n    assert(typeof bits === 'number' && bits >= 0);\n    var r = bits % 26;\n    var s = (bits - r) / 26;\n\n    assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n    if (this.length <= s) {\n      return this;\n    }\n\n    if (r !== 0) {\n      s++;\n    }\n    this.length = Math.min(s, this.length);\n\n    if (r !== 0) {\n      var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n      this.words[this.length - 1] &= mask;\n    }\n\n    return this.strip();\n  };\n\n  // Return only lowers bits of number\n  BN.prototype.maskn = function maskn (bits) {\n    return this.clone().imaskn(bits);\n  };\n\n  // Add plain number `num` to `this`\n  BN.prototype.iaddn = function iaddn (num) {\n    assert(typeof num === 'number');\n    assert(num < 0x4000000);\n    if (num < 0) return this.isubn(-num);\n\n    // Possible sign change\n    if (this.negative !== 0) {\n      if (this.length === 1 && (this.words[0] | 0) < num) {\n        this.words[0] = num - (this.words[0] | 0);\n        this.negative = 0;\n        return this;\n      }\n\n      this.negative = 0;\n      this.isubn(num);\n      this.negative = 1;\n      return this;\n    }\n\n    // Add without checks\n    return this._iaddn(num);\n  };\n\n  BN.prototype._iaddn = function _iaddn (num) {\n    this.words[0] += num;\n\n    // Carry\n    for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n      this.words[i] -= 0x4000000;\n      if (i === this.length - 1) {\n        this.words[i + 1] = 1;\n      } else {\n        this.words[i + 1]++;\n      }\n    }\n    this.length = Math.max(this.length, i + 1);\n\n    return this;\n  };\n\n  // Subtract plain number `num` from `this`\n  BN.prototype.isubn = function isubn (num) {\n    assert(typeof num === 'number');\n    assert(num < 0x4000000);\n    if (num < 0) return this.iaddn(-num);\n\n    if (this.negative !== 0) {\n      this.negative = 0;\n      this.iaddn(num);\n      this.negative = 1;\n      return this;\n    }\n\n    this.words[0] -= num;\n\n    if (this.length === 1 && this.words[0] < 0) {\n      this.words[0] = -this.words[0];\n      this.negative = 1;\n    } else {\n      // Carry\n      for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n        this.words[i] += 0x4000000;\n        this.words[i + 1] -= 1;\n      }\n    }\n\n    return this.strip();\n  };\n\n  BN.prototype.addn = function addn (num) {\n    return this.clone().iaddn(num);\n  };\n\n  BN.prototype.subn = function subn (num) {\n    return this.clone().isubn(num);\n  };\n\n  BN.prototype.iabs = function iabs () {\n    this.negative = 0;\n\n    return this;\n  };\n\n  BN.prototype.abs = function abs () {\n    return this.clone().iabs();\n  };\n\n  BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n    var len = num.length + shift;\n    var i;\n\n    this._expand(len);\n\n    var w;\n    var carry = 0;\n    for (i = 0; i < num.length; i++) {\n      w = (this.words[i + shift] | 0) + carry;\n      var right = (num.words[i] | 0) * mul;\n      w -= right & 0x3ffffff;\n      carry = (w >> 26) - ((right / 0x4000000) | 0);\n      this.words[i + shift] = w & 0x3ffffff;\n    }\n    for (; i < this.length - shift; i++) {\n      w = (this.words[i + shift] | 0) + carry;\n      carry = w >> 26;\n      this.words[i + shift] = w & 0x3ffffff;\n    }\n\n    if (carry === 0) return this.strip();\n\n    // Subtraction overflow\n    assert(carry === -1);\n    carry = 0;\n    for (i = 0; i < this.length; i++) {\n      w = -(this.words[i] | 0) + carry;\n      carry = w >> 26;\n      this.words[i] = w & 0x3ffffff;\n    }\n    this.negative = 1;\n\n    return this.strip();\n  };\n\n  BN.prototype._wordDiv = function _wordDiv (num, mode) {\n    var shift = this.length - num.length;\n\n    var a = this.clone();\n    var b = num;\n\n    // Normalize\n    var bhi = b.words[b.length - 1] | 0;\n    var bhiBits = this._countBits(bhi);\n    shift = 26 - bhiBits;\n    if (shift !== 0) {\n      b = b.ushln(shift);\n      a.iushln(shift);\n      bhi = b.words[b.length - 1] | 0;\n    }\n\n    // Initialize quotient\n    var m = a.length - b.length;\n    var q;\n\n    if (mode !== 'mod') {\n      q = new BN(null);\n      q.length = m + 1;\n      q.words = new Array(q.length);\n      for (var i = 0; i < q.length; i++) {\n        q.words[i] = 0;\n      }\n    }\n\n    var diff = a.clone()._ishlnsubmul(b, 1, m);\n    if (diff.negative === 0) {\n      a = diff;\n      if (q) {\n        q.words[m] = 1;\n      }\n    }\n\n    for (var j = m - 1; j >= 0; j--) {\n      var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n        (a.words[b.length + j - 1] | 0);\n\n      // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n      // (0x7ffffff)\n      qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n      a._ishlnsubmul(b, qj, j);\n      while (a.negative !== 0) {\n        qj--;\n        a.negative = 0;\n        a._ishlnsubmul(b, 1, j);\n        if (!a.isZero()) {\n          a.negative ^= 1;\n        }\n      }\n      if (q) {\n        q.words[j] = qj;\n      }\n    }\n    if (q) {\n      q.strip();\n    }\n    a.strip();\n\n    // Denormalize\n    if (mode !== 'div' && shift !== 0) {\n      a.iushrn(shift);\n    }\n\n    return {\n      div: q || null,\n      mod: a\n    };\n  };\n\n  // NOTE: 1) `mode` can be set to `mod` to request mod only,\n  //       to `div` to request div only, or be absent to\n  //       request both div & mod\n  //       2) `positive` is true if unsigned mod is requested\n  BN.prototype.divmod = function divmod (num, mode, positive) {\n    assert(!num.isZero());\n\n    if (this.isZero()) {\n      return {\n        div: new BN(0),\n        mod: new BN(0)\n      };\n    }\n\n    var div, mod, res;\n    if (this.negative !== 0 && num.negative === 0) {\n      res = this.neg().divmod(num, mode);\n\n      if (mode !== 'mod') {\n        div = res.div.neg();\n      }\n\n      if (mode !== 'div') {\n        mod = res.mod.neg();\n        if (positive && mod.negative !== 0) {\n          mod.iadd(num);\n        }\n      }\n\n      return {\n        div: div,\n        mod: mod\n      };\n    }\n\n    if (this.negative === 0 && num.negative !== 0) {\n      res = this.divmod(num.neg(), mode);\n\n      if (mode !== 'mod') {\n        div = res.div.neg();\n      }\n\n      return {\n        div: div,\n        mod: res.mod\n      };\n    }\n\n    if ((this.negative & num.negative) !== 0) {\n      res = this.neg().divmod(num.neg(), mode);\n\n      if (mode !== 'div') {\n        mod = res.mod.neg();\n        if (positive && mod.negative !== 0) {\n          mod.isub(num);\n        }\n      }\n\n      return {\n        div: res.div,\n        mod: mod\n      };\n    }\n\n    // Both numbers are positive at this point\n\n    // Strip both numbers to approximate shift value\n    if (num.length > this.length || this.cmp(num) < 0) {\n      return {\n        div: new BN(0),\n        mod: this\n      };\n    }\n\n    // Very short reduction\n    if (num.length === 1) {\n      if (mode === 'div') {\n        return {\n          div: this.divn(num.words[0]),\n          mod: null\n        };\n      }\n\n      if (mode === 'mod') {\n        return {\n          div: null,\n          mod: new BN(this.modn(num.words[0]))\n        };\n      }\n\n      return {\n        div: this.divn(num.words[0]),\n        mod: new BN(this.modn(num.words[0]))\n      };\n    }\n\n    return this._wordDiv(num, mode);\n  };\n\n  // Find `this` / `num`\n  BN.prototype.div = function div (num) {\n    return this.divmod(num, 'div', false).div;\n  };\n\n  // Find `this` % `num`\n  BN.prototype.mod = function mod (num) {\n    return this.divmod(num, 'mod', false).mod;\n  };\n\n  BN.prototype.umod = function umod (num) {\n    return this.divmod(num, 'mod', true).mod;\n  };\n\n  // Find Round(`this` / `num`)\n  BN.prototype.divRound = function divRound (num) {\n    var dm = this.divmod(num);\n\n    // Fast case - exact division\n    if (dm.mod.isZero()) return dm.div;\n\n    var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n    var half = num.ushrn(1);\n    var r2 = num.andln(1);\n    var cmp = mod.cmp(half);\n\n    // Round down\n    if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n    // Round up\n    return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n  };\n\n  BN.prototype.modn = function modn (num) {\n    assert(num <= 0x3ffffff);\n    var p = (1 << 26) % num;\n\n    var acc = 0;\n    for (var i = this.length - 1; i >= 0; i--) {\n      acc = (p * acc + (this.words[i] | 0)) % num;\n    }\n\n    return acc;\n  };\n\n  // In-place division by number\n  BN.prototype.idivn = function idivn (num) {\n    assert(num <= 0x3ffffff);\n\n    var carry = 0;\n    for (var i = this.length - 1; i >= 0; i--) {\n      var w = (this.words[i] | 0) + carry * 0x4000000;\n      this.words[i] = (w / num) | 0;\n      carry = w % num;\n    }\n\n    return this.strip();\n  };\n\n  BN.prototype.divn = function divn (num) {\n    return this.clone().idivn(num);\n  };\n\n  BN.prototype.egcd = function egcd (p) {\n    assert(p.negative === 0);\n    assert(!p.isZero());\n\n    var x = this;\n    var y = p.clone();\n\n    if (x.negative !== 0) {\n      x = x.umod(p);\n    } else {\n      x = x.clone();\n    }\n\n    // A * x + B * y = x\n    var A = new BN(1);\n    var B = new BN(0);\n\n    // C * x + D * y = y\n    var C = new BN(0);\n    var D = new BN(1);\n\n    var g = 0;\n\n    while (x.isEven() && y.isEven()) {\n      x.iushrn(1);\n      y.iushrn(1);\n      ++g;\n    }\n\n    var yp = y.clone();\n    var xp = x.clone();\n\n    while (!x.isZero()) {\n      for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n      if (i > 0) {\n        x.iushrn(i);\n        while (i-- > 0) {\n          if (A.isOdd() || B.isOdd()) {\n            A.iadd(yp);\n            B.isub(xp);\n          }\n\n          A.iushrn(1);\n          B.iushrn(1);\n        }\n      }\n\n      for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n      if (j > 0) {\n        y.iushrn(j);\n        while (j-- > 0) {\n          if (C.isOdd() || D.isOdd()) {\n            C.iadd(yp);\n            D.isub(xp);\n          }\n\n          C.iushrn(1);\n          D.iushrn(1);\n        }\n      }\n\n      if (x.cmp(y) >= 0) {\n        x.isub(y);\n        A.isub(C);\n        B.isub(D);\n      } else {\n        y.isub(x);\n        C.isub(A);\n        D.isub(B);\n      }\n    }\n\n    return {\n      a: C,\n      b: D,\n      gcd: y.iushln(g)\n    };\n  };\n\n  // This is reduced incarnation of the binary EEA\n  // above, designated to invert members of the\n  // _prime_ fields F(p) at a maximal speed\n  BN.prototype._invmp = function _invmp (p) {\n    assert(p.negative === 0);\n    assert(!p.isZero());\n\n    var a = this;\n    var b = p.clone();\n\n    if (a.negative !== 0) {\n      a = a.umod(p);\n    } else {\n      a = a.clone();\n    }\n\n    var x1 = new BN(1);\n    var x2 = new BN(0);\n\n    var delta = b.clone();\n\n    while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n      for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n      if (i > 0) {\n        a.iushrn(i);\n        while (i-- > 0) {\n          if (x1.isOdd()) {\n            x1.iadd(delta);\n          }\n\n          x1.iushrn(1);\n        }\n      }\n\n      for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n      if (j > 0) {\n        b.iushrn(j);\n        while (j-- > 0) {\n          if (x2.isOdd()) {\n            x2.iadd(delta);\n          }\n\n          x2.iushrn(1);\n        }\n      }\n\n      if (a.cmp(b) >= 0) {\n        a.isub(b);\n        x1.isub(x2);\n      } else {\n        b.isub(a);\n        x2.isub(x1);\n      }\n    }\n\n    var res;\n    if (a.cmpn(1) === 0) {\n      res = x1;\n    } else {\n      res = x2;\n    }\n\n    if (res.cmpn(0) < 0) {\n      res.iadd(p);\n    }\n\n    return res;\n  };\n\n  BN.prototype.gcd = function gcd (num) {\n    if (this.isZero()) return num.abs();\n    if (num.isZero()) return this.abs();\n\n    var a = this.clone();\n    var b = num.clone();\n    a.negative = 0;\n    b.negative = 0;\n\n    // Remove common factor of two\n    for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n      a.iushrn(1);\n      b.iushrn(1);\n    }\n\n    do {\n      while (a.isEven()) {\n        a.iushrn(1);\n      }\n      while (b.isEven()) {\n        b.iushrn(1);\n      }\n\n      var r = a.cmp(b);\n      if (r < 0) {\n        // Swap `a` and `b` to make `a` always bigger than `b`\n        var t = a;\n        a = b;\n        b = t;\n      } else if (r === 0 || b.cmpn(1) === 0) {\n        break;\n      }\n\n      a.isub(b);\n    } while (true);\n\n    return b.iushln(shift);\n  };\n\n  // Invert number in the field F(num)\n  BN.prototype.invm = function invm (num) {\n    return this.egcd(num).a.umod(num);\n  };\n\n  BN.prototype.isEven = function isEven () {\n    return (this.words[0] & 1) === 0;\n  };\n\n  BN.prototype.isOdd = function isOdd () {\n    return (this.words[0] & 1) === 1;\n  };\n\n  // And first word and num\n  BN.prototype.andln = function andln (num) {\n    return this.words[0] & num;\n  };\n\n  // Increment at the bit position in-line\n  BN.prototype.bincn = function bincn (bit) {\n    assert(typeof bit === 'number');\n    var r = bit % 26;\n    var s = (bit - r) / 26;\n    var q = 1 << r;\n\n    // Fast case: bit is much higher than all existing words\n    if (this.length <= s) {\n      this._expand(s + 1);\n      this.words[s] |= q;\n      return this;\n    }\n\n    // Add bit and propagate, if needed\n    var carry = q;\n    for (var i = s; carry !== 0 && i < this.length; i++) {\n      var w = this.words[i] | 0;\n      w += carry;\n      carry = w >>> 26;\n      w &= 0x3ffffff;\n      this.words[i] = w;\n    }\n    if (carry !== 0) {\n      this.words[i] = carry;\n      this.length++;\n    }\n    return this;\n  };\n\n  BN.prototype.isZero = function isZero () {\n    return this.length === 1 && this.words[0] === 0;\n  };\n\n  BN.prototype.cmpn = function cmpn (num) {\n    var negative = num < 0;\n\n    if (this.negative !== 0 && !negative) return -1;\n    if (this.negative === 0 && negative) return 1;\n\n    this.strip();\n\n    var res;\n    if (this.length > 1) {\n      res = 1;\n    } else {\n      if (negative) {\n        num = -num;\n      }\n\n      assert(num <= 0x3ffffff, 'Number is too big');\n\n      var w = this.words[0] | 0;\n      res = w === num ? 0 : w < num ? -1 : 1;\n    }\n    if (this.negative !== 0) return -res | 0;\n    return res;\n  };\n\n  // Compare two numbers and return:\n  // 1 - if `this` > `num`\n  // 0 - if `this` == `num`\n  // -1 - if `this` < `num`\n  BN.prototype.cmp = function cmp (num) {\n    if (this.negative !== 0 && num.negative === 0) return -1;\n    if (this.negative === 0 && num.negative !== 0) return 1;\n\n    var res = this.ucmp(num);\n    if (this.negative !== 0) return -res | 0;\n    return res;\n  };\n\n  // Unsigned comparison\n  BN.prototype.ucmp = function ucmp (num) {\n    // At this point both numbers have the same sign\n    if (this.length > num.length) return 1;\n    if (this.length < num.length) return -1;\n\n    var res = 0;\n    for (var i = this.length - 1; i >= 0; i--) {\n      var a = this.words[i] | 0;\n      var b = num.words[i] | 0;\n\n      if (a === b) continue;\n      if (a < b) {\n        res = -1;\n      } else if (a > b) {\n        res = 1;\n      }\n      break;\n    }\n    return res;\n  };\n\n  BN.prototype.gtn = function gtn (num) {\n    return this.cmpn(num) === 1;\n  };\n\n  BN.prototype.gt = function gt (num) {\n    return this.cmp(num) === 1;\n  };\n\n  BN.prototype.gten = function gten (num) {\n    return this.cmpn(num) >= 0;\n  };\n\n  BN.prototype.gte = function gte (num) {\n    return this.cmp(num) >= 0;\n  };\n\n  BN.prototype.ltn = function ltn (num) {\n    return this.cmpn(num) === -1;\n  };\n\n  BN.prototype.lt = function lt (num) {\n    return this.cmp(num) === -1;\n  };\n\n  BN.prototype.lten = function lten (num) {\n    return this.cmpn(num) <= 0;\n  };\n\n  BN.prototype.lte = function lte (num) {\n    return this.cmp(num) <= 0;\n  };\n\n  BN.prototype.eqn = function eqn (num) {\n    return this.cmpn(num) === 0;\n  };\n\n  BN.prototype.eq = function eq (num) {\n    return this.cmp(num) === 0;\n  };\n\n  //\n  // A reduce context, could be using montgomery or something better, depending\n  // on the `m` itself.\n  //\n  BN.red = function red (num) {\n    return new Red(num);\n  };\n\n  BN.prototype.toRed = function toRed (ctx) {\n    assert(!this.red, 'Already a number in reduction context');\n    assert(this.negative === 0, 'red works only with positives');\n    return ctx.convertTo(this)._forceRed(ctx);\n  };\n\n  BN.prototype.fromRed = function fromRed () {\n    assert(this.red, 'fromRed works only with numbers in reduction context');\n    return this.red.convertFrom(this);\n  };\n\n  BN.prototype._forceRed = function _forceRed (ctx) {\n    this.red = ctx;\n    return this;\n  };\n\n  BN.prototype.forceRed = function forceRed (ctx) {\n    assert(!this.red, 'Already a number in reduction context');\n    return this._forceRed(ctx);\n  };\n\n  BN.prototype.redAdd = function redAdd (num) {\n    assert(this.red, 'redAdd works only with red numbers');\n    return this.red.add(this, num);\n  };\n\n  BN.prototype.redIAdd = function redIAdd (num) {\n    assert(this.red, 'redIAdd works only with red numbers');\n    return this.red.iadd(this, num);\n  };\n\n  BN.prototype.redSub = function redSub (num) {\n    assert(this.red, 'redSub works only with red numbers');\n    return this.red.sub(this, num);\n  };\n\n  BN.prototype.redISub = function redISub (num) {\n    assert(this.red, 'redISub works only with red numbers');\n    return this.red.isub(this, num);\n  };\n\n  BN.prototype.redShl = function redShl (num) {\n    assert(this.red, 'redShl works only with red numbers');\n    return this.red.shl(this, num);\n  };\n\n  BN.prototype.redMul = function redMul (num) {\n    assert(this.red, 'redMul works only with red numbers');\n    this.red._verify2(this, num);\n    return this.red.mul(this, num);\n  };\n\n  BN.prototype.redIMul = function redIMul (num) {\n    assert(this.red, 'redMul works only with red numbers');\n    this.red._verify2(this, num);\n    return this.red.imul(this, num);\n  };\n\n  BN.prototype.redSqr = function redSqr () {\n    assert(this.red, 'redSqr works only with red numbers');\n    this.red._verify1(this);\n    return this.red.sqr(this);\n  };\n\n  BN.prototype.redISqr = function redISqr () {\n    assert(this.red, 'redISqr works only with red numbers');\n    this.red._verify1(this);\n    return this.red.isqr(this);\n  };\n\n  // Square root over p\n  BN.prototype.redSqrt = function redSqrt () {\n    assert(this.red, 'redSqrt works only with red numbers');\n    this.red._verify1(this);\n    return this.red.sqrt(this);\n  };\n\n  BN.prototype.redInvm = function redInvm () {\n    assert(this.red, 'redInvm works only with red numbers');\n    this.red._verify1(this);\n    return this.red.invm(this);\n  };\n\n  // Return negative clone of `this` % `red modulo`\n  BN.prototype.redNeg = function redNeg () {\n    assert(this.red, 'redNeg works only with red numbers');\n    this.red._verify1(this);\n    return this.red.neg(this);\n  };\n\n  BN.prototype.redPow = function redPow (num) {\n    assert(this.red && !num.red, 'redPow(normalNum)');\n    this.red._verify1(this);\n    return this.red.pow(this, num);\n  };\n\n  // Prime numbers with efficient reduction\n  var primes = {\n    k256: null,\n    p224: null,\n    p192: null,\n    p25519: null\n  };\n\n  // Pseudo-Mersenne prime\n  function MPrime (name, p) {\n    // P = 2 ^ N - K\n    this.name = name;\n    this.p = new BN(p, 16);\n    this.n = this.p.bitLength();\n    this.k = new BN(1).iushln(this.n).isub(this.p);\n\n    this.tmp = this._tmp();\n  }\n\n  MPrime.prototype._tmp = function _tmp () {\n    var tmp = new BN(null);\n    tmp.words = new Array(Math.ceil(this.n / 13));\n    return tmp;\n  };\n\n  MPrime.prototype.ireduce = function ireduce (num) {\n    // Assumes that `num` is less than `P^2`\n    // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n    var r = num;\n    var rlen;\n\n    do {\n      this.split(r, this.tmp);\n      r = this.imulK(r);\n      r = r.iadd(this.tmp);\n      rlen = r.bitLength();\n    } while (rlen > this.n);\n\n    var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n    if (cmp === 0) {\n      r.words[0] = 0;\n      r.length = 1;\n    } else if (cmp > 0) {\n      r.isub(this.p);\n    } else {\n      r.strip();\n    }\n\n    return r;\n  };\n\n  MPrime.prototype.split = function split (input, out) {\n    input.iushrn(this.n, 0, out);\n  };\n\n  MPrime.prototype.imulK = function imulK (num) {\n    return num.imul(this.k);\n  };\n\n  function K256 () {\n    MPrime.call(\n      this,\n      'k256',\n      'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n  }\n  inherits(K256, MPrime);\n\n  K256.prototype.split = function split (input, output) {\n    // 256 = 9 * 26 + 22\n    var mask = 0x3fffff;\n\n    var outLen = Math.min(input.length, 9);\n    for (var i = 0; i < outLen; i++) {\n      output.words[i] = input.words[i];\n    }\n    output.length = outLen;\n\n    if (input.length <= 9) {\n      input.words[0] = 0;\n      input.length = 1;\n      return;\n    }\n\n    // Shift by 9 limbs\n    var prev = input.words[9];\n    output.words[output.length++] = prev & mask;\n\n    for (i = 10; i < input.length; i++) {\n      var next = input.words[i] | 0;\n      input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n      prev = next;\n    }\n    prev >>>= 22;\n    input.words[i - 10] = prev;\n    if (prev === 0 && input.length > 10) {\n      input.length -= 10;\n    } else {\n      input.length -= 9;\n    }\n  };\n\n  K256.prototype.imulK = function imulK (num) {\n    // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n    num.words[num.length] = 0;\n    num.words[num.length + 1] = 0;\n    num.length += 2;\n\n    // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n    var lo = 0;\n    for (var i = 0; i < num.length; i++) {\n      var w = num.words[i] | 0;\n      lo += w * 0x3d1;\n      num.words[i] = lo & 0x3ffffff;\n      lo = w * 0x40 + ((lo / 0x4000000) | 0);\n    }\n\n    // Fast length reduction\n    if (num.words[num.length - 1] === 0) {\n      num.length--;\n      if (num.words[num.length - 1] === 0) {\n        num.length--;\n      }\n    }\n    return num;\n  };\n\n  function P224 () {\n    MPrime.call(\n      this,\n      'p224',\n      'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n  }\n  inherits(P224, MPrime);\n\n  function P192 () {\n    MPrime.call(\n      this,\n      'p192',\n      'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n  }\n  inherits(P192, MPrime);\n\n  function P25519 () {\n    // 2 ^ 255 - 19\n    MPrime.call(\n      this,\n      '25519',\n      '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n  }\n  inherits(P25519, MPrime);\n\n  P25519.prototype.imulK = function imulK (num) {\n    // K = 0x13\n    var carry = 0;\n    for (var i = 0; i < num.length; i++) {\n      var hi = (num.words[i] | 0) * 0x13 + carry;\n      var lo = hi & 0x3ffffff;\n      hi >>>= 26;\n\n      num.words[i] = lo;\n      carry = hi;\n    }\n    if (carry !== 0) {\n      num.words[num.length++] = carry;\n    }\n    return num;\n  };\n\n  // Exported mostly for testing purposes, use plain name instead\n  BN._prime = function prime (name) {\n    // Cached version of prime\n    if (primes[name]) return primes[name];\n\n    var prime;\n    if (name === 'k256') {\n      prime = new K256();\n    } else if (name === 'p224') {\n      prime = new P224();\n    } else if (name === 'p192') {\n      prime = new P192();\n    } else if (name === 'p25519') {\n      prime = new P25519();\n    } else {\n      throw new Error('Unknown prime ' + name);\n    }\n    primes[name] = prime;\n\n    return prime;\n  };\n\n  //\n  // Base reduction engine\n  //\n  function Red (m) {\n    if (typeof m === 'string') {\n      var prime = BN._prime(m);\n      this.m = prime.p;\n      this.prime = prime;\n    } else {\n      assert(m.gtn(1), 'modulus must be greater than 1');\n      this.m = m;\n      this.prime = null;\n    }\n  }\n\n  Red.prototype._verify1 = function _verify1 (a) {\n    assert(a.negative === 0, 'red works only with positives');\n    assert(a.red, 'red works only with red numbers');\n  };\n\n  Red.prototype._verify2 = function _verify2 (a, b) {\n    assert((a.negative | b.negative) === 0, 'red works only with positives');\n    assert(a.red && a.red === b.red,\n      'red works only with red numbers');\n  };\n\n  Red.prototype.imod = function imod (a) {\n    if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n    return a.umod(this.m)._forceRed(this);\n  };\n\n  Red.prototype.neg = function neg (a) {\n    if (a.isZero()) {\n      return a.clone();\n    }\n\n    return this.m.sub(a)._forceRed(this);\n  };\n\n  Red.prototype.add = function add (a, b) {\n    this._verify2(a, b);\n\n    var res = a.add(b);\n    if (res.cmp(this.m) >= 0) {\n      res.isub(this.m);\n    }\n    return res._forceRed(this);\n  };\n\n  Red.prototype.iadd = function iadd (a, b) {\n    this._verify2(a, b);\n\n    var res = a.iadd(b);\n    if (res.cmp(this.m) >= 0) {\n      res.isub(this.m);\n    }\n    return res;\n  };\n\n  Red.prototype.sub = function sub (a, b) {\n    this._verify2(a, b);\n\n    var res = a.sub(b);\n    if (res.cmpn(0) < 0) {\n      res.iadd(this.m);\n    }\n    return res._forceRed(this);\n  };\n\n  Red.prototype.isub = function isub (a, b) {\n    this._verify2(a, b);\n\n    var res = a.isub(b);\n    if (res.cmpn(0) < 0) {\n      res.iadd(this.m);\n    }\n    return res;\n  };\n\n  Red.prototype.shl = function shl (a, num) {\n    this._verify1(a);\n    return this.imod(a.ushln(num));\n  };\n\n  Red.prototype.imul = function imul (a, b) {\n    this._verify2(a, b);\n    return this.imod(a.imul(b));\n  };\n\n  Red.prototype.mul = function mul (a, b) {\n    this._verify2(a, b);\n    return this.imod(a.mul(b));\n  };\n\n  Red.prototype.isqr = function isqr (a) {\n    return this.imul(a, a.clone());\n  };\n\n  Red.prototype.sqr = function sqr (a) {\n    return this.mul(a, a);\n  };\n\n  Red.prototype.sqrt = function sqrt (a) {\n    if (a.isZero()) return a.clone();\n\n    var mod3 = this.m.andln(3);\n    assert(mod3 % 2 === 1);\n\n    // Fast case\n    if (mod3 === 3) {\n      var pow = this.m.add(new BN(1)).iushrn(2);\n      return this.pow(a, pow);\n    }\n\n    // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n    //\n    // Find Q and S, that Q * 2 ^ S = (P - 1)\n    var q = this.m.subn(1);\n    var s = 0;\n    while (!q.isZero() && q.andln(1) === 0) {\n      s++;\n      q.iushrn(1);\n    }\n    assert(!q.isZero());\n\n    var one = new BN(1).toRed(this);\n    var nOne = one.redNeg();\n\n    // Find quadratic non-residue\n    // NOTE: Max is such because of generalized Riemann hypothesis.\n    var lpow = this.m.subn(1).iushrn(1);\n    var z = this.m.bitLength();\n    z = new BN(2 * z * z).toRed(this);\n\n    while (this.pow(z, lpow).cmp(nOne) !== 0) {\n      z.redIAdd(nOne);\n    }\n\n    var c = this.pow(z, q);\n    var r = this.pow(a, q.addn(1).iushrn(1));\n    var t = this.pow(a, q);\n    var m = s;\n    while (t.cmp(one) !== 0) {\n      var tmp = t;\n      for (var i = 0; tmp.cmp(one) !== 0; i++) {\n        tmp = tmp.redSqr();\n      }\n      assert(i < m);\n      var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n      r = r.redMul(b);\n      c = b.redSqr();\n      t = t.redMul(c);\n      m = i;\n    }\n\n    return r;\n  };\n\n  Red.prototype.invm = function invm (a) {\n    var inv = a._invmp(this.m);\n    if (inv.negative !== 0) {\n      inv.negative = 0;\n      return this.imod(inv).redNeg();\n    } else {\n      return this.imod(inv);\n    }\n  };\n\n  Red.prototype.pow = function pow (a, num) {\n    if (num.isZero()) return new BN(1).toRed(this);\n    if (num.cmpn(1) === 0) return a.clone();\n\n    var windowSize = 4;\n    var wnd = new Array(1 << windowSize);\n    wnd[0] = new BN(1).toRed(this);\n    wnd[1] = a;\n    for (var i = 2; i < wnd.length; i++) {\n      wnd[i] = this.mul(wnd[i - 1], a);\n    }\n\n    var res = wnd[0];\n    var current = 0;\n    var currentLen = 0;\n    var start = num.bitLength() % 26;\n    if (start === 0) {\n      start = 26;\n    }\n\n    for (i = num.length - 1; i >= 0; i--) {\n      var word = num.words[i];\n      for (var j = start - 1; j >= 0; j--) {\n        var bit = (word >> j) & 1;\n        if (res !== wnd[0]) {\n          res = this.sqr(res);\n        }\n\n        if (bit === 0 && current === 0) {\n          currentLen = 0;\n          continue;\n        }\n\n        current <<= 1;\n        current |= bit;\n        currentLen++;\n        if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n        res = this.mul(res, wnd[current]);\n        currentLen = 0;\n        current = 0;\n      }\n      start = 26;\n    }\n\n    return res;\n  };\n\n  Red.prototype.convertTo = function convertTo (num) {\n    var r = num.umod(this.m);\n\n    return r === num ? r.clone() : r;\n  };\n\n  Red.prototype.convertFrom = function convertFrom (num) {\n    var res = num.clone();\n    res.red = null;\n    return res;\n  };\n\n  //\n  // Montgomery method engine\n  //\n\n  BN.mont = function mont (num) {\n    return new Mont(num);\n  };\n\n  function Mont (m) {\n    Red.call(this, m);\n\n    this.shift = this.m.bitLength();\n    if (this.shift % 26 !== 0) {\n      this.shift += 26 - (this.shift % 26);\n    }\n\n    this.r = new BN(1).iushln(this.shift);\n    this.r2 = this.imod(this.r.sqr());\n    this.rinv = this.r._invmp(this.m);\n\n    this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n    this.minv = this.minv.umod(this.r);\n    this.minv = this.r.sub(this.minv);\n  }\n  inherits(Mont, Red);\n\n  Mont.prototype.convertTo = function convertTo (num) {\n    return this.imod(num.ushln(this.shift));\n  };\n\n  Mont.prototype.convertFrom = function convertFrom (num) {\n    var r = this.imod(num.mul(this.rinv));\n    r.red = null;\n    return r;\n  };\n\n  Mont.prototype.imul = function imul (a, b) {\n    if (a.isZero() || b.isZero()) {\n      a.words[0] = 0;\n      a.length = 1;\n      return a;\n    }\n\n    var t = a.imul(b);\n    var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n    var u = t.isub(c).iushrn(this.shift);\n    var res = u;\n\n    if (u.cmp(this.m) >= 0) {\n      res = u.isub(this.m);\n    } else if (u.cmpn(0) < 0) {\n      res = u.iadd(this.m);\n    }\n\n    return res._forceRed(this);\n  };\n\n  Mont.prototype.mul = function mul (a, b) {\n    if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n    var t = a.mul(b);\n    var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n    var u = t.isub(c).iushrn(this.shift);\n    var res = u;\n    if (u.cmp(this.m) >= 0) {\n      res = u.isub(this.m);\n    } else if (u.cmpn(0) < 0) {\n      res = u.iadd(this.m);\n    }\n\n    return res._forceRed(this);\n  };\n\n  Mont.prototype.invm = function invm (a) {\n    // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n    var res = this.imod(a._invmp(this.m).mul(this.r2));\n    return res._forceRed(this);\n  };\n})(typeof module === 'undefined' || module, this);\n\n},{\"buffer\":96}],88:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = boundary\n\nfunction boundary (cells) {\n  var i, j, k\n  var n = cells.length\n  var sz = 0\n  for (i = 0; i < n; ++i) {\n    sz += cells[i].length\n  }\n  var result = new Array(sz)\n  var ptr = 0\n  for (i = 0; i < n; ++i) {\n    var c = cells[i]\n    var d = c.length\n    for (j = 0; j < d; ++j) {\n      var b = result[ptr++] = new Array(d - 1)\n      var p = 0\n      for (k = 0; k < d; ++k) {\n        if (k === j) {\n          continue\n        }\n        b[p++] = c[k]\n      }\n      if (j & 1) {\n        var tmp = b[1]\n        b[1] = b[0]\n        b[0] = tmp\n      }\n    }\n  }\n  return result\n}\n\n},{}],89:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = boxIntersectWrapper\n\nvar pool = _dereq_('typedarray-pool')\nvar sweep = _dereq_('./lib/sweep')\nvar boxIntersectIter = _dereq_('./lib/intersect')\n\nfunction boxEmpty(d, box) {\n  for(var j=0; j<d; ++j) {\n    if(!(box[j] <= box[j+d])) {\n      return true\n    }\n  }\n  return false\n}\n\n//Unpack boxes into a flat typed array, remove empty boxes\nfunction convertBoxes(boxes, d, data, ids) {\n  var ptr = 0\n  var count = 0\n  for(var i=0, n=boxes.length; i<n; ++i) {\n    var b = boxes[i]\n    if(boxEmpty(d, b)) {\n      continue\n    }\n    for(var j=0; j<2*d; ++j) {\n      data[ptr++] = b[j]\n    }\n    ids[count++] = i\n  }\n  return count\n}\n\n//Perform type conversions, check bounds\nfunction boxIntersect(red, blue, visit, full) {\n  var n = red.length\n  var m = blue.length\n\n  //If either array is empty, then we can skip this whole thing\n  if(n <= 0 || m <= 0) {\n    return\n  }\n\n  //Compute dimension, if it is 0 then we skip\n  var d = (red[0].length)>>>1\n  if(d <= 0) {\n    return\n  }\n\n  var retval\n\n  //Convert red boxes\n  var redList  = pool.mallocDouble(2*d*n)\n  var redIds   = pool.mallocInt32(n)\n  n = convertBoxes(red, d, redList, redIds)\n\n  if(n > 0) {\n    if(d === 1 && full) {\n      //Special case: 1d complete\n      sweep.init(n)\n      retval = sweep.sweepComplete(\n        d, visit, \n        0, n, redList, redIds,\n        0, n, redList, redIds)\n    } else {\n\n      //Convert blue boxes\n      var blueList = pool.mallocDouble(2*d*m)\n      var blueIds  = pool.mallocInt32(m)\n      m = convertBoxes(blue, d, blueList, blueIds)\n\n      if(m > 0) {\n        sweep.init(n+m)\n\n        if(d === 1) {\n          //Special case: 1d bipartite\n          retval = sweep.sweepBipartite(\n            d, visit, \n            0, n, redList,  redIds,\n            0, m, blueList, blueIds)\n        } else {\n          //General case:  d>1\n          retval = boxIntersectIter(\n            d, visit,    full,\n            n, redList,  redIds,\n            m, blueList, blueIds)\n        }\n\n        pool.free(blueList)\n        pool.free(blueIds)\n      }\n    }\n\n    pool.free(redList)\n    pool.free(redIds)\n  }\n\n  return retval\n}\n\n\nvar RESULT\n\nfunction appendItem(i,j) {\n  RESULT.push([i,j])\n}\n\nfunction intersectFullArray(x) {\n  RESULT = []\n  boxIntersect(x, x, appendItem, true)\n  return RESULT\n}\n\nfunction intersectBipartiteArray(x, y) {\n  RESULT = []\n  boxIntersect(x, y, appendItem, false)\n  return RESULT\n}\n\n//User-friendly wrapper, handle full input and no-visitor cases\nfunction boxIntersectWrapper(arg0, arg1, arg2) {\n  var result\n  switch(arguments.length) {\n    case 1:\n      return intersectFullArray(arg0)\n    case 2:\n      if(typeof arg1 === 'function') {\n        return boxIntersect(arg0, arg0, arg1, true)\n      } else {\n        return intersectBipartiteArray(arg0, arg1)\n      }\n    case 3:\n      return boxIntersect(arg0, arg1, arg2, false)\n    default:\n      throw new Error('box-intersect: Invalid arguments')\n  }\n}\n},{\"./lib/intersect\":91,\"./lib/sweep\":95,\"typedarray-pool\":532}],90:[function(_dereq_,module,exports){\n'use strict'\n\nvar DIMENSION   = 'd'\nvar AXIS        = 'ax'\nvar VISIT       = 'vv'\nvar FLIP        = 'fp'\n\nvar ELEM_SIZE   = 'es'\n\nvar RED_START   = 'rs'\nvar RED_END     = 're'\nvar RED_BOXES   = 'rb'\nvar RED_INDEX   = 'ri'\nvar RED_PTR     = 'rp'\n\nvar BLUE_START  = 'bs'\nvar BLUE_END    = 'be'\nvar BLUE_BOXES  = 'bb'\nvar BLUE_INDEX  = 'bi'\nvar BLUE_PTR    = 'bp'\n\nvar RETVAL      = 'rv'\n\nvar INNER_LABEL = 'Q'\n\nvar ARGS = [\n  DIMENSION,\n  AXIS,\n  VISIT,\n  RED_START,\n  RED_END,\n  RED_BOXES,\n  RED_INDEX,\n  BLUE_START,\n  BLUE_END,\n  BLUE_BOXES,\n  BLUE_INDEX\n]\n\nfunction generateBruteForce(redMajor, flip, full) {\n  var funcName = 'bruteForce' + \n    (redMajor ? 'Red' : 'Blue') + \n    (flip ? 'Flip' : '') +\n    (full ? 'Full' : '')\n\n  var code = ['function ', funcName, '(', ARGS.join(), '){',\n    'var ', ELEM_SIZE, '=2*', DIMENSION, ';']\n\n  var redLoop = \n    'for(var i=' + RED_START + ',' + RED_PTR + '=' + ELEM_SIZE + '*' + RED_START + ';' +\n        'i<' + RED_END +';' +\n        '++i,' + RED_PTR + '+=' + ELEM_SIZE + '){' +\n        'var x0=' + RED_BOXES + '[' + AXIS + '+' + RED_PTR + '],' +\n            'x1=' + RED_BOXES + '[' + AXIS + '+' + RED_PTR + '+' + DIMENSION + '],' +\n            'xi=' + RED_INDEX + '[i];'\n\n  var blueLoop = \n    'for(var j=' + BLUE_START + ',' + BLUE_PTR + '=' + ELEM_SIZE + '*' + BLUE_START + ';' +\n        'j<' + BLUE_END + ';' +\n        '++j,' + BLUE_PTR + '+=' + ELEM_SIZE + '){' +\n        'var y0=' + BLUE_BOXES + '[' + AXIS + '+' + BLUE_PTR + '],' +\n            (full ? 'y1=' + BLUE_BOXES + '[' + AXIS + '+' + BLUE_PTR + '+' + DIMENSION + '],' : '') +\n            'yi=' + BLUE_INDEX + '[j];'\n\n  if(redMajor) {\n    code.push(redLoop, INNER_LABEL, ':', blueLoop)\n  } else {\n    code.push(blueLoop, INNER_LABEL, ':', redLoop)\n  }\n\n  if(full) {\n    code.push('if(y1<x0||x1<y0)continue;')\n  } else if(flip) {\n    code.push('if(y0<=x0||x1<y0)continue;')\n  } else {\n    code.push('if(y0<x0||x1<y0)continue;')\n  }\n\n  code.push('for(var k='+AXIS+'+1;k<'+DIMENSION+';++k){'+\n    'var r0='+RED_BOXES+'[k+'+RED_PTR+'],'+\n        'r1='+RED_BOXES+'[k+'+DIMENSION+'+'+RED_PTR+'],'+\n        'b0='+BLUE_BOXES+'[k+'+BLUE_PTR+'],'+\n        'b1='+BLUE_BOXES+'[k+'+DIMENSION+'+'+BLUE_PTR+'];'+\n      'if(r1<b0||b1<r0)continue ' + INNER_LABEL + ';}' +\n      'var ' + RETVAL + '=' + VISIT + '(')\n\n  if(flip) {\n    code.push('yi,xi')\n  } else {\n    code.push('xi,yi')\n  }\n\n  code.push(');if(' + RETVAL + '!==void 0)return ' + RETVAL + ';}}}')\n\n  return {\n    name: funcName, \n    code: code.join('')\n  }\n}\n\nfunction bruteForcePlanner(full) {\n  var funcName = 'bruteForce' + (full ? 'Full' : 'Partial')\n  var prefix = []\n  var fargs = ARGS.slice()\n  if(!full) {\n    fargs.splice(3, 0, FLIP)\n  }\n\n  var code = ['function ' + funcName + '(' + fargs.join() + '){']\n\n  function invoke(redMajor, flip) {\n    var res = generateBruteForce(redMajor, flip, full)\n    prefix.push(res.code)\n    code.push('return ' + res.name + '(' + ARGS.join() + ');')\n  }\n\n  code.push('if(' + RED_END + '-' + RED_START + '>' +\n                    BLUE_END + '-' + BLUE_START + '){')\n\n  if(full) {\n    invoke(true, false)\n    code.push('}else{')\n    invoke(false, false)\n  } else {\n    code.push('if(' + FLIP + '){')\n    invoke(true, true)\n    code.push('}else{')\n    invoke(true, false)\n    code.push('}}else{if(' + FLIP + '){')\n    invoke(false, true)\n    code.push('}else{')\n    invoke(false, false)\n    code.push('}')\n  }\n  code.push('}}return ' + funcName)\n\n  var codeStr = prefix.join('') + code.join('')\n  var proc = new Function(codeStr)\n  return proc()\n}\n\n\nexports.partial = bruteForcePlanner(false)\nexports.full    = bruteForcePlanner(true)\n},{}],91:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = boxIntersectIter\n\nvar pool = _dereq_('typedarray-pool')\nvar bits = _dereq_('bit-twiddle')\nvar bruteForce = _dereq_('./brute')\nvar bruteForcePartial = bruteForce.partial\nvar bruteForceFull = bruteForce.full\nvar sweep = _dereq_('./sweep')\nvar findMedian = _dereq_('./median')\nvar genPartition = _dereq_('./partition')\n\n//Twiddle parameters\nvar BRUTE_FORCE_CUTOFF    = 128       //Cut off for brute force search\nvar SCAN_CUTOFF           = (1<<22)   //Cut off for two way scan\nvar SCAN_COMPLETE_CUTOFF  = (1<<22)  \n\n//Partition functions\nvar partitionInteriorContainsInterval = genPartition(\n  '!(lo>=p0)&&!(p1>=hi)', \n  ['p0', 'p1'])\n\nvar partitionStartEqual = genPartition(\n  'lo===p0',\n  ['p0'])\n\nvar partitionStartLessThan = genPartition(\n  'lo<p0',\n  ['p0'])\n\nvar partitionEndLessThanEqual = genPartition(\n  'hi<=p0',\n  ['p0'])\n\nvar partitionContainsPoint = genPartition(\n  'lo<=p0&&p0<=hi',\n  ['p0'])\n\nvar partitionContainsPointProper = genPartition(\n  'lo<p0&&p0<=hi',\n  ['p0'])\n\n//Frame size for iterative loop\nvar IFRAME_SIZE = 6\nvar DFRAME_SIZE = 2\n\n//Data for box statck\nvar INIT_CAPACITY = 1024\nvar BOX_ISTACK  = pool.mallocInt32(INIT_CAPACITY)\nvar BOX_DSTACK  = pool.mallocDouble(INIT_CAPACITY)\n\n//Initialize iterative loop queue\nfunction iterInit(d, count) {\n  var levels = (8 * bits.log2(count+1) * (d+1))|0\n  var maxInts = bits.nextPow2(IFRAME_SIZE*levels)\n  if(BOX_ISTACK.length < maxInts) {\n    pool.free(BOX_ISTACK)\n    BOX_ISTACK = pool.mallocInt32(maxInts)\n  }\n  var maxDoubles = bits.nextPow2(DFRAME_SIZE*levels)\n  if(BOX_DSTACK < maxDoubles) {\n    pool.free(BOX_DSTACK)\n    BOX_DSTACK = pool.mallocDouble(maxDoubles)\n  }\n}\n\n//Append item to queue\nfunction iterPush(ptr,\n  axis, \n  redStart, redEnd, \n  blueStart, blueEnd, \n  state, \n  lo, hi) {\n\n  var iptr = IFRAME_SIZE * ptr\n  BOX_ISTACK[iptr]   = axis\n  BOX_ISTACK[iptr+1] = redStart\n  BOX_ISTACK[iptr+2] = redEnd\n  BOX_ISTACK[iptr+3] = blueStart\n  BOX_ISTACK[iptr+4] = blueEnd\n  BOX_ISTACK[iptr+5] = state\n\n  var dptr = DFRAME_SIZE * ptr\n  BOX_DSTACK[dptr]   = lo\n  BOX_DSTACK[dptr+1] = hi\n}\n\n//Special case:  Intersect single point with list of intervals\nfunction onePointPartial(\n  d, axis, visit, flip,\n  redStart, redEnd, red, redIndex,\n  blueOffset, blue, blueId) {\n\n  var elemSize = 2 * d\n  var bluePtr  = blueOffset * elemSize\n  var blueX    = blue[bluePtr + axis]\n\nred_loop:\n  for(var i=redStart, redPtr=redStart*elemSize; i<redEnd; ++i, redPtr+=elemSize) {\n    var r0 = red[redPtr+axis]\n    var r1 = red[redPtr+axis+d]\n    if(blueX < r0 || r1 < blueX) {\n      continue\n    }\n    if(flip && blueX === r0) {\n      continue\n    }\n    var redId = redIndex[i]\n    for(var j=axis+1; j<d; ++j) {\n      var r0 = red[redPtr+j]\n      var r1 = red[redPtr+j+d]\n      var b0 = blue[bluePtr+j]\n      var b1 = blue[bluePtr+j+d]\n      if(r1 < b0 || b1 < r0) {\n        continue red_loop\n      }\n    }\n    var retval\n    if(flip) {\n      retval = visit(blueId, redId)\n    } else {\n      retval = visit(redId, blueId)\n    }\n    if(retval !== void 0) {\n      return retval\n    }\n  }\n}\n\n//Special case:  Intersect one point with list of intervals\nfunction onePointFull(\n  d, axis, visit,\n  redStart, redEnd, red, redIndex,\n  blueOffset, blue, blueId) {\n\n  var elemSize = 2 * d\n  var bluePtr  = blueOffset * elemSize\n  var blueX    = blue[bluePtr + axis]\n\nred_loop:\n  for(var i=redStart, redPtr=redStart*elemSize; i<redEnd; ++i, redPtr+=elemSize) {\n    var redId = redIndex[i]\n    if(redId === blueId) {\n      continue\n    }\n    var r0 = red[redPtr+axis]\n    var r1 = red[redPtr+axis+d]\n    if(blueX < r0 || r1 < blueX) {\n      continue\n    }\n    for(var j=axis+1; j<d; ++j) {\n      var r0 = red[redPtr+j]\n      var r1 = red[redPtr+j+d]\n      var b0 = blue[bluePtr+j]\n      var b1 = blue[bluePtr+j+d]\n      if(r1 < b0 || b1 < r0) {\n        continue red_loop\n      }\n    }\n    var retval = visit(redId, blueId)\n    if(retval !== void 0) {\n      return retval\n    }\n  }\n}\n\n//The main box intersection routine\nfunction boxIntersectIter(\n  d, visit, initFull,\n  xSize, xBoxes, xIndex,\n  ySize, yBoxes, yIndex) {\n\n  //Reserve memory for stack\n  iterInit(d, xSize + ySize)\n\n  var top  = 0\n  var elemSize = 2 * d\n  var retval\n\n  iterPush(top++,\n      0,\n      0, xSize,\n      0, ySize,\n      initFull ? 16 : 0, \n      -Infinity, Infinity)\n  if(!initFull) {\n    iterPush(top++,\n      0,\n      0, ySize,\n      0, xSize,\n      1, \n      -Infinity, Infinity)\n  }\n\n  while(top > 0) {\n    top  -= 1\n\n    var iptr = top * IFRAME_SIZE\n    var axis      = BOX_ISTACK[iptr]\n    var redStart  = BOX_ISTACK[iptr+1]\n    var redEnd    = BOX_ISTACK[iptr+2]\n    var blueStart = BOX_ISTACK[iptr+3]\n    var blueEnd   = BOX_ISTACK[iptr+4]\n    var state     = BOX_ISTACK[iptr+5]\n\n    var dptr = top * DFRAME_SIZE\n    var lo        = BOX_DSTACK[dptr]\n    var hi        = BOX_DSTACK[dptr+1]\n\n    //Unpack state info\n    var flip      = (state & 1)\n    var full      = !!(state & 16)\n\n    //Unpack indices\n    var red       = xBoxes\n    var redIndex  = xIndex\n    var blue      = yBoxes\n    var blueIndex = yIndex\n    if(flip) {\n      red         = yBoxes\n      redIndex    = yIndex\n      blue        = xBoxes\n      blueIndex   = xIndex\n    }\n\n    if(state & 2) {\n      redEnd = partitionStartLessThan(\n        d, axis,\n        redStart, redEnd, red, redIndex,\n        hi)\n      if(redStart >= redEnd) {\n        continue\n      }\n    }\n    if(state & 4) {\n      redStart = partitionEndLessThanEqual(\n        d, axis,\n        redStart, redEnd, red, redIndex,\n        lo)\n      if(redStart >= redEnd) {\n        continue\n      }\n    }\n    \n    var redCount  = redEnd  - redStart\n    var blueCount = blueEnd - blueStart\n\n    if(full) {\n      if(d * redCount * (redCount + blueCount) < SCAN_COMPLETE_CUTOFF) {\n        retval = sweep.scanComplete(\n          d, axis, visit, \n          redStart, redEnd, red, redIndex,\n          blueStart, blueEnd, blue, blueIndex)\n        if(retval !== void 0) {\n          return retval\n        }\n        continue\n      }\n    } else {\n      if(d * Math.min(redCount, blueCount) < BRUTE_FORCE_CUTOFF) {\n        //If input small, then use brute force\n        retval = bruteForcePartial(\n            d, axis, visit, flip,\n            redStart,  redEnd,  red,  redIndex,\n            blueStart, blueEnd, blue, blueIndex)\n        if(retval !== void 0) {\n          return retval\n        }\n        continue\n      } else if(d * redCount * blueCount < SCAN_CUTOFF) {\n        //If input medium sized, then use sweep and prune\n        retval = sweep.scanBipartite(\n          d, axis, visit, flip, \n          redStart, redEnd, red, redIndex,\n          blueStart, blueEnd, blue, blueIndex)\n        if(retval !== void 0) {\n          return retval\n        }\n        continue\n      }\n    }\n    \n    //First, find all red intervals whose interior contains (lo,hi)\n    var red0 = partitionInteriorContainsInterval(\n      d, axis, \n      redStart, redEnd, red, redIndex,\n      lo, hi)\n\n    //Lower dimensional case\n    if(redStart < red0) {\n\n      if(d * (red0 - redStart) < BRUTE_FORCE_CUTOFF) {\n        //Special case for small inputs: use brute force\n        retval = bruteForceFull(\n          d, axis+1, visit,\n          redStart, red0, red, redIndex,\n          blueStart, blueEnd, blue, blueIndex)\n        if(retval !== void 0) {\n          return retval\n        }\n      } else if(axis === d-2) {\n        if(flip) {\n          retval = sweep.sweepBipartite(\n            d, visit,\n            blueStart, blueEnd, blue, blueIndex,\n            redStart, red0, red, redIndex)\n        } else {\n          retval = sweep.sweepBipartite(\n            d, visit,\n            redStart, red0, red, redIndex,\n            blueStart, blueEnd, blue, blueIndex)\n        }\n        if(retval !== void 0) {\n          return retval\n        }\n      } else {\n        iterPush(top++,\n          axis+1,\n          redStart, red0,\n          blueStart, blueEnd,\n          flip,\n          -Infinity, Infinity)\n        iterPush(top++,\n          axis+1,\n          blueStart, blueEnd,\n          redStart, red0,\n          flip^1,\n          -Infinity, Infinity)\n      }\n    }\n\n    //Divide and conquer phase\n    if(red0 < redEnd) {\n\n      //Cut blue into 3 parts:\n      //\n      //  Points < mid point\n      //  Points = mid point\n      //  Points > mid point\n      //\n      var blue0 = findMedian(\n        d, axis, \n        blueStart, blueEnd, blue, blueIndex)\n      var mid = blue[elemSize * blue0 + axis]\n      var blue1 = partitionStartEqual(\n        d, axis,\n        blue0, blueEnd, blue, blueIndex,\n        mid)\n\n      //Right case\n      if(blue1 < blueEnd) {\n        iterPush(top++,\n          axis,\n          red0, redEnd,\n          blue1, blueEnd,\n          (flip|4) + (full ? 16 : 0),\n          mid, hi)\n      }\n\n      //Left case\n      if(blueStart < blue0) {\n        iterPush(top++,\n          axis,\n          red0, redEnd,\n          blueStart, blue0,\n          (flip|2) + (full ? 16 : 0),\n          lo, mid)\n      }\n\n      //Center case (the hard part)\n      if(blue0 + 1 === blue1) {\n        //Optimization: Range with exactly 1 point, use a brute force scan\n        if(full) {\n          retval = onePointFull(\n            d, axis, visit,\n            red0, redEnd, red, redIndex,\n            blue0, blue, blueIndex[blue0])\n        } else {\n          retval = onePointPartial(\n            d, axis, visit, flip,\n            red0, redEnd, red, redIndex,\n            blue0, blue, blueIndex[blue0])\n        }\n        if(retval !== void 0) {\n          return retval\n        }\n      } else if(blue0 < blue1) {\n        var red1\n        if(full) {\n          //If full intersection, need to handle special case\n          red1 = partitionContainsPoint(\n            d, axis,\n            red0, redEnd, red, redIndex,\n            mid)\n          if(red0 < red1) {\n            var redX = partitionStartEqual(\n              d, axis,\n              red0, red1, red, redIndex,\n              mid)\n            if(axis === d-2) {\n              //Degenerate sweep intersection:\n              //  [red0, redX] with [blue0, blue1]\n              if(red0 < redX) {\n                retval = sweep.sweepComplete(\n                  d, visit,\n                  red0, redX, red, redIndex,\n                  blue0, blue1, blue, blueIndex)\n                if(retval !== void 0) {\n                  return retval\n                }\n              }\n\n              //Normal sweep intersection:\n              //  [redX, red1] with [blue0, blue1]\n              if(redX < red1) {\n                retval = sweep.sweepBipartite(\n                  d, visit,\n                  redX, red1, red, redIndex,\n                  blue0, blue1, blue, blueIndex)\n                if(retval !== void 0) {\n                  return retval\n                }\n              }\n            } else {\n              if(red0 < redX) {\n                iterPush(top++,\n                  axis+1,\n                  red0, redX,\n                  blue0, blue1,\n                  16,\n                  -Infinity, Infinity)\n              }\n              if(redX < red1) {\n                iterPush(top++,\n                  axis+1,\n                  redX, red1,\n                  blue0, blue1,\n                  0,\n                  -Infinity, Infinity)\n                iterPush(top++,\n                  axis+1,\n                  blue0, blue1,\n                  redX, red1,\n                  1,\n                  -Infinity, Infinity)\n              }\n            }\n          }\n        } else {\n          if(flip) {\n            red1 = partitionContainsPointProper(\n              d, axis,\n              red0, redEnd, red, redIndex,\n              mid)\n          } else {\n            red1 = partitionContainsPoint(\n              d, axis,\n              red0, redEnd, red, redIndex,\n              mid)\n          }\n          if(red0 < red1) {\n            if(axis === d-2) {\n              if(flip) {\n                retval = sweep.sweepBipartite(\n                  d, visit,\n                  blue0, blue1, blue, blueIndex,\n                  red0, red1, red, redIndex)\n              } else {\n                retval = sweep.sweepBipartite(\n                  d, visit,\n                  red0, red1, red, redIndex,\n                  blue0, blue1, blue, blueIndex)\n              }\n            } else {\n              iterPush(top++,\n                axis+1,\n                red0, red1,\n                blue0, blue1,\n                flip,\n                -Infinity, Infinity)\n              iterPush(top++,\n                axis+1,\n                blue0, blue1,\n                red0, red1,\n                flip^1,\n                -Infinity, Infinity)\n            }\n          }\n        }\n      }\n    }\n  }\n}\n},{\"./brute\":90,\"./median\":92,\"./partition\":93,\"./sweep\":95,\"bit-twiddle\":85,\"typedarray-pool\":532}],92:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = findMedian\n\nvar genPartition = _dereq_('./partition')\n\nvar partitionStartLessThan = genPartition('lo<p0', ['p0'])\n\nvar PARTITION_THRESHOLD = 8   //Cut off for using insertion sort in findMedian\n\n//Base case for median finding:  Use insertion sort\nfunction insertionSort(d, axis, start, end, boxes, ids) {\n  var elemSize = 2 * d\n  var boxPtr = elemSize * (start+1) + axis\n  for(var i=start+1; i<end; ++i, boxPtr+=elemSize) {\n    var x = boxes[boxPtr]\n    for(var j=i, ptr=elemSize*(i-1); \n        j>start && boxes[ptr+axis] > x; \n        --j, ptr-=elemSize) {\n      //Swap\n      var aPtr = ptr\n      var bPtr = ptr+elemSize\n      for(var k=0; k<elemSize; ++k, ++aPtr, ++bPtr) {\n        var y = boxes[aPtr]\n        boxes[aPtr] = boxes[bPtr]\n        boxes[bPtr] = y\n      }\n      var tmp = ids[j]\n      ids[j] = ids[j-1]\n      ids[j-1] = tmp\n    }\n  }\n}\n\n//Find median using quick select algorithm\n//  takes O(n) time with high probability\nfunction findMedian(d, axis, start, end, boxes, ids) {\n  if(end <= start+1) {\n    return start\n  }\n\n  var lo       = start\n  var hi       = end\n  var mid      = ((end + start) >>> 1)\n  var elemSize = 2*d\n  var pivot    = mid\n  var value    = boxes[elemSize*mid+axis]\n  \n  while(lo < hi) {\n    if(hi - lo < PARTITION_THRESHOLD) {\n      insertionSort(d, axis, lo, hi, boxes, ids)\n      value = boxes[elemSize*mid+axis]\n      break\n    }\n    \n    //Select pivot using median-of-3\n    var count  = hi - lo\n    var pivot0 = (Math.random()*count+lo)|0\n    var value0 = boxes[elemSize*pivot0 + axis]\n    var pivot1 = (Math.random()*count+lo)|0\n    var value1 = boxes[elemSize*pivot1 + axis]\n    var pivot2 = (Math.random()*count+lo)|0\n    var value2 = boxes[elemSize*pivot2 + axis]\n    if(value0 <= value1) {\n      if(value2 >= value1) {\n        pivot = pivot1\n        value = value1\n      } else if(value0 >= value2) {\n        pivot = pivot0\n        value = value0\n      } else {\n        pivot = pivot2\n        value = value2\n      }\n    } else {\n      if(value1 >= value2) {\n        pivot = pivot1\n        value = value1\n      } else if(value2 >= value0) {\n        pivot = pivot0\n        value = value0\n      } else {\n        pivot = pivot2\n        value = value2\n      }\n    }\n\n    //Swap pivot to end of array\n    var aPtr = elemSize * (hi-1)\n    var bPtr = elemSize * pivot\n    for(var i=0; i<elemSize; ++i, ++aPtr, ++bPtr) {\n      var x = boxes[aPtr]\n      boxes[aPtr] = boxes[bPtr]\n      boxes[bPtr] = x\n    }\n    var y = ids[hi-1]\n    ids[hi-1] = ids[pivot]\n    ids[pivot] = y\n\n    //Partition using pivot\n    pivot = partitionStartLessThan(\n      d, axis, \n      lo, hi-1, boxes, ids,\n      value)\n\n    //Swap pivot back\n    var aPtr = elemSize * (hi-1)\n    var bPtr = elemSize * pivot\n    for(var i=0; i<elemSize; ++i, ++aPtr, ++bPtr) {\n      var x = boxes[aPtr]\n      boxes[aPtr] = boxes[bPtr]\n      boxes[bPtr] = x\n    }\n    var y = ids[hi-1]\n    ids[hi-1] = ids[pivot]\n    ids[pivot] = y\n\n    //Swap pivot to last pivot\n    if(mid < pivot) {\n      hi = pivot-1\n      while(lo < hi && \n        boxes[elemSize*(hi-1)+axis] === value) {\n        hi -= 1\n      }\n      hi += 1\n    } else if(pivot < mid) {\n      lo = pivot + 1\n      while(lo < hi &&\n        boxes[elemSize*lo+axis] === value) {\n        lo += 1\n      }\n    } else {\n      break\n    }\n  }\n\n  //Make sure pivot is at start\n  return partitionStartLessThan(\n    d, axis, \n    start, mid, boxes, ids,\n    boxes[elemSize*mid+axis])\n}\n},{\"./partition\":93}],93:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = genPartition\n\nvar code = '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'\n\nfunction genPartition(predicate, args) {\n  var fargs ='abcdef'.split('').concat(args)\n  var reads = []\n  if(predicate.indexOf('lo') >= 0) {\n    reads.push('lo=e[k+n]')\n  }\n  if(predicate.indexOf('hi') >= 0) {\n    reads.push('hi=e[k+o]')\n  }\n  fargs.push(\n    code.replace('_', reads.join())\n        .replace('$', predicate))\n  return Function.apply(void 0, fargs)\n}\n},{}],94:[function(_dereq_,module,exports){\n'use strict';\n\n//This code is extracted from ndarray-sort\n//It is inlined here as a temporary workaround\n\nmodule.exports = wrapper;\n\nvar INSERT_SORT_CUTOFF = 32\n\nfunction wrapper(data, n0) {\n  if (n0 <= 4*INSERT_SORT_CUTOFF) {\n    insertionSort(0, n0 - 1, data);\n  } else {\n    quickSort(0, n0 - 1, data);\n  }\n}\n\nfunction insertionSort(left, right, data) {\n  var ptr = 2*(left+1)\n  for(var i=left+1; i<=right; ++i) {\n    var a = data[ptr++]\n    var b = data[ptr++]\n    var j = i\n    var jptr = ptr-2\n    while(j-- > left) {\n      var x = data[jptr-2]\n      var y = data[jptr-1]\n      if(x < a) {\n        break\n      } else if(x === a && y < b) {\n        break\n      }\n      data[jptr]   = x\n      data[jptr+1] = y\n      jptr -= 2\n    }\n    data[jptr]   = a\n    data[jptr+1] = b\n  }\n}\n\nfunction swap(i, j, data) {\n  i *= 2\n  j *= 2\n  var x = data[i]\n  var y = data[i+1]\n  data[i] = data[j]\n  data[i+1] = data[j+1]\n  data[j] = x\n  data[j+1] = y\n}\n\nfunction move(i, j, data) {\n  i *= 2\n  j *= 2\n  data[i] = data[j]\n  data[i+1] = data[j+1]\n}\n\nfunction rotate(i, j, k, data) {\n  i *= 2\n  j *= 2\n  k *= 2\n  var x = data[i]\n  var y = data[i+1]\n  data[i] = data[j]\n  data[i+1] = data[j+1]\n  data[j] = data[k]\n  data[j+1] = data[k+1]\n  data[k] = x\n  data[k+1] = y\n}\n\nfunction shufflePivot(i, j, px, py, data) {\n  i *= 2\n  j *= 2\n  data[i] = data[j]\n  data[j] = px\n  data[i+1] = data[j+1]\n  data[j+1] = py\n}\n\nfunction compare(i, j, data) {\n  i *= 2\n  j *= 2\n  var x = data[i],\n      y = data[j]\n  if(x < y) {\n    return false\n  } else if(x === y) {\n    return data[i+1] > data[j+1]\n  }\n  return true\n}\n\nfunction comparePivot(i, y, b, data) {\n  i *= 2\n  var x = data[i]\n  if(x < y) {\n    return true\n  } else if(x === y) {\n    return data[i+1] < b\n  }\n  return false\n}\n\nfunction quickSort(left, right, data) {\n  var sixth = (right - left + 1) / 6 | 0, \n      index1 = left + sixth, \n      index5 = right - sixth, \n      index3 = left + right >> 1, \n      index2 = index3 - sixth, \n      index4 = index3 + sixth, \n      el1 = index1, \n      el2 = index2, \n      el3 = index3, \n      el4 = index4, \n      el5 = index5, \n      less = left + 1, \n      great = right - 1, \n      tmp = 0\n  if(compare(el1, el2, data)) {\n    tmp = el1\n    el1 = el2\n    el2 = tmp\n  }\n  if(compare(el4, el5, data)) {\n    tmp = el4\n    el4 = el5\n    el5 = tmp\n  }\n  if(compare(el1, el3, data)) {\n    tmp = el1\n    el1 = el3\n    el3 = tmp\n  }\n  if(compare(el2, el3, data)) {\n    tmp = el2\n    el2 = el3\n    el3 = tmp\n  }\n  if(compare(el1, el4, data)) {\n    tmp = el1\n    el1 = el4\n    el4 = tmp\n  }\n  if(compare(el3, el4, data)) {\n    tmp = el3\n    el3 = el4\n    el4 = tmp\n  }\n  if(compare(el2, el5, data)) {\n    tmp = el2\n    el2 = el5\n    el5 = tmp\n  }\n  if(compare(el2, el3, data)) {\n    tmp = el2\n    el2 = el3\n    el3 = tmp\n  }\n  if(compare(el4, el5, data)) {\n    tmp = el4\n    el4 = el5\n    el5 = tmp\n  }\n\n  var pivot1X = data[2*el2]\n  var pivot1Y = data[2*el2+1]\n  var pivot2X = data[2*el4]\n  var pivot2Y = data[2*el4+1]\n\n  var ptr0 = 2 * el1;\n  var ptr2 = 2 * el3;\n  var ptr4 = 2 * el5;\n  var ptr5 = 2 * index1;\n  var ptr6 = 2 * index3;\n  var ptr7 = 2 * index5;\n  for (var i1 = 0; i1 < 2; ++i1) {\n    var x = data[ptr0+i1];\n    var y = data[ptr2+i1];\n    var z = data[ptr4+i1];\n    data[ptr5+i1] = x;\n    data[ptr6+i1] = y;\n    data[ptr7+i1] = z;\n  }\n\n  move(index2, left, data)\n  move(index4, right, data)\n  for (var k = less; k <= great; ++k) {\n    if (comparePivot(k, pivot1X, pivot1Y, data)) {\n      if (k !== less) {\n        swap(k, less, data)\n      }\n      ++less;\n    } else {\n      if (!comparePivot(k, pivot2X, pivot2Y, data)) {\n        while (true) {\n          if (!comparePivot(great, pivot2X, pivot2Y, data)) {\n            if (--great < k) {\n              break;\n            }\n            continue;\n          } else {\n            if (comparePivot(great, pivot1X, pivot1Y, data)) {\n              rotate(k, less, great, data)\n              ++less;\n              --great;\n            } else {\n              swap(k, great, data)\n              --great;\n            }\n            break;\n          }\n        }\n      }\n    }\n  }\n  shufflePivot(left, less-1, pivot1X, pivot1Y, data)\n  shufflePivot(right, great+1, pivot2X, pivot2Y, data)\n  if (less - 2 - left <= INSERT_SORT_CUTOFF) {\n    insertionSort(left, less - 2, data);\n  } else {\n    quickSort(left, less - 2, data);\n  }\n  if (right - (great + 2) <= INSERT_SORT_CUTOFF) {\n    insertionSort(great + 2, right, data);\n  } else {\n    quickSort(great + 2, right, data);\n  }\n  if (great - less <= INSERT_SORT_CUTOFF) {\n    insertionSort(less, great, data);\n  } else {\n    quickSort(less, great, data);\n  }\n}\n},{}],95:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = {\n  init:           sqInit,\n  sweepBipartite: sweepBipartite,\n  sweepComplete:  sweepComplete,\n  scanBipartite:  scanBipartite,\n  scanComplete:   scanComplete\n}\n\nvar pool  = _dereq_('typedarray-pool')\nvar bits  = _dereq_('bit-twiddle')\nvar isort = _dereq_('./sort')\n\n//Flag for blue\nvar BLUE_FLAG = (1<<28)\n\n//1D sweep event queue stuff (use pool to save space)\nvar INIT_CAPACITY      = 1024\nvar RED_SWEEP_QUEUE    = pool.mallocInt32(INIT_CAPACITY)\nvar RED_SWEEP_INDEX    = pool.mallocInt32(INIT_CAPACITY)\nvar BLUE_SWEEP_QUEUE   = pool.mallocInt32(INIT_CAPACITY)\nvar BLUE_SWEEP_INDEX   = pool.mallocInt32(INIT_CAPACITY)\nvar COMMON_SWEEP_QUEUE = pool.mallocInt32(INIT_CAPACITY)\nvar COMMON_SWEEP_INDEX = pool.mallocInt32(INIT_CAPACITY)\nvar SWEEP_EVENTS       = pool.mallocDouble(INIT_CAPACITY * 8)\n\n//Reserves memory for the 1D sweep data structures\nfunction sqInit(count) {\n  var rcount = bits.nextPow2(count)\n  if(RED_SWEEP_QUEUE.length < rcount) {\n    pool.free(RED_SWEEP_QUEUE)\n    RED_SWEEP_QUEUE = pool.mallocInt32(rcount)\n  }\n  if(RED_SWEEP_INDEX.length < rcount) {\n    pool.free(RED_SWEEP_INDEX)\n    RED_SWEEP_INDEX = pool.mallocInt32(rcount)\n  }\n  if(BLUE_SWEEP_QUEUE.length < rcount) {\n    pool.free(BLUE_SWEEP_QUEUE)\n    BLUE_SWEEP_QUEUE = pool.mallocInt32(rcount)\n  }\n  if(BLUE_SWEEP_INDEX.length < rcount) {\n    pool.free(BLUE_SWEEP_INDEX)\n    BLUE_SWEEP_INDEX = pool.mallocInt32(rcount)\n  }\n  if(COMMON_SWEEP_QUEUE.length < rcount) {\n    pool.free(COMMON_SWEEP_QUEUE)\n    COMMON_SWEEP_QUEUE = pool.mallocInt32(rcount)\n  }\n  if(COMMON_SWEEP_INDEX.length < rcount) {\n    pool.free(COMMON_SWEEP_INDEX)\n    COMMON_SWEEP_INDEX = pool.mallocInt32(rcount)\n  }\n  var eventLength = 8 * rcount\n  if(SWEEP_EVENTS.length < eventLength) {\n    pool.free(SWEEP_EVENTS)\n    SWEEP_EVENTS = pool.mallocDouble(eventLength)\n  }\n}\n\n//Remove an item from the active queue in O(1)\nfunction sqPop(queue, index, count, item) {\n  var idx = index[item]\n  var top = queue[count-1]\n  queue[idx] = top\n  index[top] = idx\n}\n\n//Insert an item into the active queue in O(1)\nfunction sqPush(queue, index, count, item) {\n  queue[count] = item\n  index[item]  = count\n}\n\n//Recursion base case: use 1D sweep algorithm\nfunction sweepBipartite(\n    d, visit,\n    redStart,  redEnd, red, redIndex,\n    blueStart, blueEnd, blue, blueIndex) {\n\n  //store events as pairs [coordinate, idx]\n  //\n  //  red create:  -(idx+1)\n  //  red destroy: idx\n  //  blue create: -(idx+BLUE_FLAG)\n  //  blue destroy: idx+BLUE_FLAG\n  //\n  var ptr      = 0\n  var elemSize = 2*d\n  var istart   = d-1\n  var iend     = elemSize-1\n\n  for(var i=redStart; i<redEnd; ++i) {\n    var idx = redIndex[i]\n    var redOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = red[redOffset+istart]\n    SWEEP_EVENTS[ptr++] = -(idx+1)\n    SWEEP_EVENTS[ptr++] = red[redOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx\n  }\n\n  for(var i=blueStart; i<blueEnd; ++i) {\n    var idx = blueIndex[i]+BLUE_FLAG\n    var blueOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx\n  }\n\n  //process events from left->right\n  var n = ptr >>> 1\n  isort(SWEEP_EVENTS, n)\n  \n  var redActive  = 0\n  var blueActive = 0\n  for(var i=0; i<n; ++i) {\n    var e = SWEEP_EVENTS[2*i+1]|0\n    if(e >= BLUE_FLAG) {\n      //blue destroy event\n      e = (e-BLUE_FLAG)|0\n      sqPop(BLUE_SWEEP_QUEUE, BLUE_SWEEP_INDEX, blueActive--, e)\n    } else if(e >= 0) {\n      //red destroy event\n      sqPop(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive--, e)\n    } else if(e <= -BLUE_FLAG) {\n      //blue create event\n      e = (-e-BLUE_FLAG)|0\n      for(var j=0; j<redActive; ++j) {\n        var retval = visit(RED_SWEEP_QUEUE[j], e)\n        if(retval !== void 0) {\n          return retval\n        }\n      }\n      sqPush(BLUE_SWEEP_QUEUE, BLUE_SWEEP_INDEX, blueActive++, e)\n    } else {\n      //red create event\n      e = (-e-1)|0\n      for(var j=0; j<blueActive; ++j) {\n        var retval = visit(e, BLUE_SWEEP_QUEUE[j])\n        if(retval !== void 0) {\n          return retval\n        }\n      }\n      sqPush(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive++, e)\n    }\n  }\n}\n\n//Complete sweep\nfunction sweepComplete(d, visit, \n  redStart, redEnd, red, redIndex,\n  blueStart, blueEnd, blue, blueIndex) {\n\n  var ptr      = 0\n  var elemSize = 2*d\n  var istart   = d-1\n  var iend     = elemSize-1\n\n  for(var i=redStart; i<redEnd; ++i) {\n    var idx = (redIndex[i]+1)<<1\n    var redOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = red[redOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n    SWEEP_EVENTS[ptr++] = red[redOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx\n  }\n\n  for(var i=blueStart; i<blueEnd; ++i) {\n    var idx = (blueIndex[i]+1)<<1\n    var blueOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+istart]\n    SWEEP_EVENTS[ptr++] = (-idx)|1\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx|1\n  }\n\n  //process events from left->right\n  var n = ptr >>> 1\n  isort(SWEEP_EVENTS, n)\n  \n  var redActive    = 0\n  var blueActive   = 0\n  var commonActive = 0\n  for(var i=0; i<n; ++i) {\n    var e     = SWEEP_EVENTS[2*i+1]|0\n    var color = e&1\n    if(i < n-1 && (e>>1) === (SWEEP_EVENTS[2*i+3]>>1)) {\n      color = 2\n      i += 1\n    }\n    \n    if(e < 0) {\n      //Create event\n      var id = -(e>>1) - 1\n\n      //Intersect with common\n      for(var j=0; j<commonActive; ++j) {\n        var retval = visit(COMMON_SWEEP_QUEUE[j], id)\n        if(retval !== void 0) {\n          return retval\n        }\n      }\n\n      if(color !== 0) {\n        //Intersect with red\n        for(var j=0; j<redActive; ++j) {\n          var retval = visit(RED_SWEEP_QUEUE[j], id)\n          if(retval !== void 0) {\n            return retval\n          }\n        }\n      }\n\n      if(color !== 1) {\n        //Intersect with blue\n        for(var j=0; j<blueActive; ++j) {\n          var retval = visit(BLUE_SWEEP_QUEUE[j], id)\n          if(retval !== void 0) {\n            return retval\n          }\n        }\n      }\n\n      if(color === 0) {\n        //Red\n        sqPush(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive++, id)\n      } else if(color === 1) {\n        //Blue\n        sqPush(BLUE_SWEEP_QUEUE, BLUE_SWEEP_INDEX, blueActive++, id)\n      } else if(color === 2) {\n        //Both\n        sqPush(COMMON_SWEEP_QUEUE, COMMON_SWEEP_INDEX, commonActive++, id)\n      }\n    } else {\n      //Destroy event\n      var id = (e>>1) - 1\n      if(color === 0) {\n        //Red\n        sqPop(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive--, id)\n      } else if(color === 1) {\n        //Blue\n        sqPop(BLUE_SWEEP_QUEUE, BLUE_SWEEP_INDEX, blueActive--, id)\n      } else if(color === 2) {\n        //Both\n        sqPop(COMMON_SWEEP_QUEUE, COMMON_SWEEP_INDEX, commonActive--, id)\n      }\n    }\n  }\n}\n\n//Sweep and prune/scanline algorithm:\n//  Scan along axis, detect intersections\n//  Brute force all boxes along axis\nfunction scanBipartite(\n  d, axis, visit, flip,\n  redStart,  redEnd, red, redIndex,\n  blueStart, blueEnd, blue, blueIndex) {\n  \n  var ptr      = 0\n  var elemSize = 2*d\n  var istart   = axis\n  var iend     = axis+d\n\n  var redShift  = 1\n  var blueShift = 1\n  if(flip) {\n    blueShift = BLUE_FLAG\n  } else {\n    redShift  = BLUE_FLAG\n  }\n\n  for(var i=redStart; i<redEnd; ++i) {\n    var idx = i + redShift\n    var redOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = red[redOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n    SWEEP_EVENTS[ptr++] = red[redOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx\n  }\n  for(var i=blueStart; i<blueEnd; ++i) {\n    var idx = i + blueShift\n    var blueOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n  }\n\n  //process events from left->right\n  var n = ptr >>> 1\n  isort(SWEEP_EVENTS, n)\n  \n  var redActive    = 0\n  for(var i=0; i<n; ++i) {\n    var e = SWEEP_EVENTS[2*i+1]|0\n    if(e < 0) {\n      var idx   = -e\n      var isRed = false\n      if(idx >= BLUE_FLAG) {\n        isRed = !flip\n        idx -= BLUE_FLAG \n      } else {\n        isRed = !!flip\n        idx -= 1\n      }\n      if(isRed) {\n        sqPush(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive++, idx)\n      } else {\n        var blueId  = blueIndex[idx]\n        var bluePtr = elemSize * idx\n        \n        var b0 = blue[bluePtr+axis+1]\n        var b1 = blue[bluePtr+axis+1+d]\n\nred_loop:\n        for(var j=0; j<redActive; ++j) {\n          var oidx   = RED_SWEEP_QUEUE[j]\n          var redPtr = elemSize * oidx\n\n          if(b1 < red[redPtr+axis+1] || \n             red[redPtr+axis+1+d] < b0) {\n            continue\n          }\n\n          for(var k=axis+2; k<d; ++k) {\n            if(blue[bluePtr + k + d] < red[redPtr + k] || \n               red[redPtr + k + d] < blue[bluePtr + k]) {\n              continue red_loop\n            }\n          }\n\n          var redId  = redIndex[oidx]\n          var retval\n          if(flip) {\n            retval = visit(blueId, redId)\n          } else {\n            retval = visit(redId, blueId)\n          }\n          if(retval !== void 0) {\n            return retval \n          }\n        }\n      }\n    } else {\n      sqPop(RED_SWEEP_QUEUE, RED_SWEEP_INDEX, redActive--, e - redShift)\n    }\n  }\n}\n\nfunction scanComplete(\n  d, axis, visit,\n  redStart,  redEnd, red, redIndex,\n  blueStart, blueEnd, blue, blueIndex) {\n\n  var ptr      = 0\n  var elemSize = 2*d\n  var istart   = axis\n  var iend     = axis+d\n\n  for(var i=redStart; i<redEnd; ++i) {\n    var idx = i + BLUE_FLAG\n    var redOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = red[redOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n    SWEEP_EVENTS[ptr++] = red[redOffset+iend]\n    SWEEP_EVENTS[ptr++] = idx\n  }\n  for(var i=blueStart; i<blueEnd; ++i) {\n    var idx = i + 1\n    var blueOffset = elemSize*i\n    SWEEP_EVENTS[ptr++] = blue[blueOffset+istart]\n    SWEEP_EVENTS[ptr++] = -idx\n  }\n\n  //process events from left->right\n  var n = ptr >>> 1\n  isort(SWEEP_EVENTS, n)\n  \n  var redActive    = 0\n  for(var i=0; i<n; ++i) {\n    var e = SWEEP_EVENTS[2*i+1]|0\n    if(e < 0) {\n      var idx   = -e\n      if(idx >= BLUE_FLAG) {\n        RED_SWEEP_QUEUE[redActive++] = idx - BLUE_FLAG\n      } else {\n        idx -= 1\n        var blueId  = blueIndex[idx]\n        var bluePtr = elemSize * idx\n\n        var b0 = blue[bluePtr+axis+1]\n        var b1 = blue[bluePtr+axis+1+d]\n\nred_loop:\n        for(var j=0; j<redActive; ++j) {\n          var oidx   = RED_SWEEP_QUEUE[j]\n          var redId  = redIndex[oidx]\n\n          if(redId === blueId) {\n            break\n          }\n\n          var redPtr = elemSize * oidx\n          if(b1 < red[redPtr+axis+1] || \n            red[redPtr+axis+1+d] < b0) {\n            continue\n          }\n          for(var k=axis+2; k<d; ++k) {\n            if(blue[bluePtr + k + d] < red[redPtr + k] || \n               red[redPtr + k + d]   < blue[bluePtr + k]) {\n              continue red_loop\n            }\n          }\n\n          var retval = visit(redId, blueId)\n          if(retval !== void 0) {\n            return retval \n          }\n        }\n      }\n    } else {\n      var idx = e - BLUE_FLAG\n      for(var j=redActive-1; j>=0; --j) {\n        if(RED_SWEEP_QUEUE[j] === idx) {\n          for(var k=j+1; k<redActive; ++k) {\n            RED_SWEEP_QUEUE[k-1] = RED_SWEEP_QUEUE[k]\n          }\n          break\n        }\n      }\n      --redActive\n    }\n  }\n}\n},{\"./sort\":94,\"bit-twiddle\":85,\"typedarray-pool\":532}],96:[function(_dereq_,module,exports){\n\n},{}],97:[function(_dereq_,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar objectCreate = Object.create || objectCreatePolyfill\nvar objectKeys = Object.keys || objectKeysPolyfill\nvar bind = Function.prototype.bind || functionBindPolyfill\n\nfunction EventEmitter() {\n  if (!this._events || !Object.prototype.hasOwnProperty.call(this, '_events')) {\n    this._events = objectCreate(null);\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nvar hasDefineProperty;\ntry {\n  var o = {};\n  if (Object.defineProperty) Object.defineProperty(o, 'x', { value: 0 });\n  hasDefineProperty = o.x === 0;\n} catch (err) { hasDefineProperty = false }\nif (hasDefineProperty) {\n  Object.defineProperty(EventEmitter, 'defaultMaxListeners', {\n    enumerable: true,\n    get: function() {\n      return defaultMaxListeners;\n    },\n    set: function(arg) {\n      // check whether the input is a positive number (whose value is zero or\n      // greater and not a NaN).\n      if (typeof arg !== 'number' || arg < 0 || arg !== arg)\n        throw new TypeError('\"defaultMaxListeners\" must be a positive number');\n      defaultMaxListeners = arg;\n    }\n  });\n} else {\n  EventEmitter.defaultMaxListeners = defaultMaxListeners;\n}\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || isNaN(n))\n    throw new TypeError('\"n\" argument must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nfunction $getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return $getMaxListeners(this);\n};\n\n// These standalone emit* functions are used to optimize calling of event\n// handlers for fast cases because emit() itself often has a variable number of\n// arguments and can be deoptimized because of that. These functions always have\n// the same number of arguments and thus do not get deoptimized, so the code\n// inside them can execute faster.\nfunction emitNone(handler, isFn, self) {\n  if (isFn)\n    handler.call(self);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self);\n  }\n}\nfunction emitOne(handler, isFn, self, arg1) {\n  if (isFn)\n    handler.call(self, arg1);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1);\n  }\n}\nfunction emitTwo(handler, isFn, self, arg1, arg2) {\n  if (isFn)\n    handler.call(self, arg1, arg2);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1, arg2);\n  }\n}\nfunction emitThree(handler, isFn, self, arg1, arg2, arg3) {\n  if (isFn)\n    handler.call(self, arg1, arg2, arg3);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1, arg2, arg3);\n  }\n}\n\nfunction emitMany(handler, isFn, self, args) {\n  if (isFn)\n    handler.apply(self, args);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].apply(self, args);\n  }\n}\n\nEventEmitter.prototype.emit = function emit(type) {\n  var er, handler, len, args, i, events;\n  var doError = (type === 'error');\n\n  events = this._events;\n  if (events)\n    doError = (doError && events.error == null);\n  else if (!doError)\n    return false;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    if (arguments.length > 1)\n      er = arguments[1];\n    if (er instanceof Error) {\n      throw er; // Unhandled 'error' event\n    } else {\n      // At least give some kind of context to the user\n      var err = new Error('Unhandled \"error\" event. (' + er + ')');\n      err.context = er;\n      throw err;\n    }\n    return false;\n  }\n\n  handler = events[type];\n\n  if (!handler)\n    return false;\n\n  var isFn = typeof handler === 'function';\n  len = arguments.length;\n  switch (len) {\n      // fast cases\n    case 1:\n      emitNone(handler, isFn, this);\n      break;\n    case 2:\n      emitOne(handler, isFn, this, arguments[1]);\n      break;\n    case 3:\n      emitTwo(handler, isFn, this, arguments[1], arguments[2]);\n      break;\n    case 4:\n      emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);\n      break;\n      // slower\n    default:\n      args = new Array(len - 1);\n      for (i = 1; i < len; i++)\n        args[i - 1] = arguments[i];\n      emitMany(handler, isFn, this, args);\n  }\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  if (typeof listener !== 'function')\n    throw new TypeError('\"listener\" argument must be a function');\n\n  events = target._events;\n  if (!events) {\n    events = target._events = objectCreate(null);\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener) {\n      target.emit('newListener', type,\n          listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (!existing) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] =\n          prepend ? [listener, existing] : [existing, listener];\n    } else {\n      // If we've already got an array, just append.\n      if (prepend) {\n        existing.unshift(listener);\n      } else {\n        existing.push(listener);\n      }\n    }\n\n    // Check for listener leak\n    if (!existing.warned) {\n      m = $getMaxListeners(target);\n      if (m && m > 0 && existing.length > m) {\n        existing.warned = true;\n        var w = new Error('Possible EventEmitter memory leak detected. ' +\n            existing.length + ' \"' + String(type) + '\" listeners ' +\n            'added. Use emitter.setMaxListeners() to ' +\n            'increase limit.');\n        w.name = 'MaxListenersExceededWarning';\n        w.emitter = target;\n        w.type = type;\n        w.count = existing.length;\n        if (typeof console === 'object' && console.warn) {\n          console.warn('%s: %s', w.name, w.message);\n        }\n      }\n    }\n  }\n\n  return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction onceWrapper() {\n  if (!this.fired) {\n    this.target.removeListener(this.type, this.wrapFn);\n    this.fired = true;\n    switch (arguments.length) {\n      case 0:\n        return this.listener.call(this.target);\n      case 1:\n        return this.listener.call(this.target, arguments[0]);\n      case 2:\n        return this.listener.call(this.target, arguments[0], arguments[1]);\n      case 3:\n        return this.listener.call(this.target, arguments[0], arguments[1],\n            arguments[2]);\n      default:\n        var args = new Array(arguments.length);\n        for (var i = 0; i < args.length; ++i)\n          args[i] = arguments[i];\n        this.listener.apply(this.target, args);\n    }\n  }\n}\n\nfunction _onceWrap(target, type, listener) {\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n  var wrapped = bind.call(onceWrapper, state);\n  wrapped.listener = listener;\n  state.wrapFn = wrapped;\n  return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  if (typeof listener !== 'function')\n    throw new TypeError('\"listener\" argument must be a function');\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      if (typeof listener !== 'function')\n        throw new TypeError('\"listener\" argument must be a function');\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      if (typeof listener !== 'function')\n        throw new TypeError('\"listener\" argument must be a function');\n\n      events = this._events;\n      if (!events)\n        return this;\n\n      list = events[type];\n      if (!list)\n        return this;\n\n      if (list === listener || list.listener === listener) {\n        if (--this._eventsCount === 0)\n          this._events = objectCreate(null);\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length - 1; i >= 0; i--) {\n          if (list[i] === listener || list[i].listener === listener) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (position === 0)\n          list.shift();\n        else\n          spliceOne(list, position);\n\n        if (list.length === 1)\n          events[type] = list[0];\n\n        if (events.removeListener)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events, i;\n\n      events = this._events;\n      if (!events)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (!events.removeListener) {\n        if (arguments.length === 0) {\n          this._events = objectCreate(null);\n          this._eventsCount = 0;\n        } else if (events[type]) {\n          if (--this._eventsCount === 0)\n            this._events = objectCreate(null);\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = objectKeys(events);\n        var key;\n        for (i = 0; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = objectCreate(null);\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners) {\n        // LIFO order\n        for (i = listeners.length - 1; i >= 0; i--) {\n          this.removeListener(type, listeners[i]);\n        }\n      }\n\n      return this;\n    };\n\nfunction _listeners(target, type, unwrap) {\n  var events = target._events;\n\n  if (!events)\n    return [];\n\n  var evlistener = events[type];\n  if (!evlistener)\n    return [];\n\n  if (typeof evlistener === 'function')\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n  return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n  return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];\n};\n\n// About 1.5x faster than the two-arg version of Array#splice().\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n    list[i] = list[k];\n  list.pop();\n}\n\nfunction arrayClone(arr, n) {\n  var copy = new Array(n);\n  for (var i = 0; i < n; ++i)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n\nfunction objectCreatePolyfill(proto) {\n  var F = function() {};\n  F.prototype = proto;\n  return new F;\n}\nfunction objectKeysPolyfill(obj) {\n  var keys = [];\n  for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k)) {\n    keys.push(k);\n  }\n  return k;\n}\nfunction functionBindPolyfill(context) {\n  var fn = this;\n  return function () {\n    return fn.apply(context, arguments);\n  };\n}\n\n},{}],98:[function(_dereq_,module,exports){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = _dereq_('base64-js')\nvar ieee754 = _dereq_('ieee754')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  var buf = new Uint8Array(length)\n  buf.__proto__ = Buffer.prototype\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\n// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\nif (typeof Symbol !== 'undefined' && Symbol.species != null &&\n    Buffer[Symbol.species] === Buffer) {\n  Object.defineProperty(Buffer, Symbol.species, {\n    value: null,\n    configurable: true,\n    enumerable: false,\n    writable: false\n  })\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayLike(value)\n  }\n\n  if (value == null) {\n    throw TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  var valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  var b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(\n      value[Symbol.toPrimitive]('string'), encodingOrOffset, length\n    )\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nBuffer.prototype.__proto__ = Uint8Array.prototype\nBuffer.__proto__ = Uint8Array\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  var length = byteLength(string, encoding) | 0\n  var buf = createBuffer(length)\n\n  var actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  var buf = createBuffer(length)\n  for (var i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  var buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  buf.__proto__ = Buffer.prototype\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    var buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      buf = Buffer.from(buf)\n    }\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  var len = string.length\n  var mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  var strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n        : (firstByte > 0xBF) ? 2\n          : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  newBuf.__proto__ = Buffer.prototype\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    var limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    var limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (var i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    var len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n},{\"base64-js\":67,\"ieee754\":407}],99:[function(_dereq_,module,exports){\n'use strict'\n\nvar monotoneTriangulate = _dereq_('./lib/monotone')\nvar makeIndex = _dereq_('./lib/triangulation')\nvar delaunayFlip = _dereq_('./lib/delaunay')\nvar filterTriangulation = _dereq_('./lib/filter')\n\nmodule.exports = cdt2d\n\nfunction canonicalizeEdge(e) {\n  return [Math.min(e[0], e[1]), Math.max(e[0], e[1])]\n}\n\nfunction compareEdge(a, b) {\n  return a[0]-b[0] || a[1]-b[1]\n}\n\nfunction canonicalizeEdges(edges) {\n  return edges.map(canonicalizeEdge).sort(compareEdge)\n}\n\nfunction getDefault(options, property, dflt) {\n  if(property in options) {\n    return options[property]\n  }\n  return dflt\n}\n\nfunction cdt2d(points, edges, options) {\n\n  if(!Array.isArray(edges)) {\n    options = edges || {}\n    edges = []\n  } else {\n    options = options || {}\n    edges = edges || []\n  }\n\n  //Parse out options\n  var delaunay = !!getDefault(options, 'delaunay', true)\n  var interior = !!getDefault(options, 'interior', true)\n  var exterior = !!getDefault(options, 'exterior', true)\n  var infinity = !!getDefault(options, 'infinity', false)\n\n  //Handle trivial case\n  if((!interior && !exterior) || points.length === 0) {\n    return []\n  }\n\n  //Construct initial triangulation\n  var cells = monotoneTriangulate(points, edges)\n\n  //If delaunay refinement needed, then improve quality by edge flipping\n  if(delaunay || interior !== exterior || infinity) {\n\n    //Index all of the cells to support fast neighborhood queries\n    var triangulation = makeIndex(points.length, canonicalizeEdges(edges))\n    for(var i=0; i<cells.length; ++i) {\n      var f = cells[i]\n      triangulation.addTriangle(f[0], f[1], f[2])\n    }\n\n    //Run edge flipping\n    if(delaunay) {\n      delaunayFlip(points, triangulation)\n    }\n\n    //Filter points\n    if(!exterior) {\n      return filterTriangulation(triangulation, -1)\n    } else if(!interior) {\n      return filterTriangulation(triangulation,  1, infinity)\n    } else if(infinity) {\n      return filterTriangulation(triangulation, 0, infinity)\n    } else {\n      return triangulation.cells()\n    }\n    \n  } else {\n    return cells\n  }\n}\n\n},{\"./lib/delaunay\":100,\"./lib/filter\":101,\"./lib/monotone\":102,\"./lib/triangulation\":103}],100:[function(_dereq_,module,exports){\n'use strict'\n\nvar inCircle = _dereq_('robust-in-sphere')[4]\nvar bsearch = _dereq_('binary-search-bounds')\n\nmodule.exports = delaunayRefine\n\nfunction testFlip(points, triangulation, stack, a, b, x) {\n  var y = triangulation.opposite(a, b)\n\n  //Test boundary edge\n  if(y < 0) {\n    return\n  }\n\n  //Swap edge if order flipped\n  if(b < a) {\n    var tmp = a\n    a = b\n    b = tmp\n    tmp = x\n    x = y\n    y = tmp\n  }\n\n  //Test if edge is constrained\n  if(triangulation.isConstraint(a, b)) {\n    return\n  }\n\n  //Test if edge is delaunay\n  if(inCircle(points[a], points[b], points[x], points[y]) < 0) {\n    stack.push(a, b)\n  }\n}\n\n//Assume edges are sorted lexicographically\nfunction delaunayRefine(points, triangulation) {\n  var stack = []\n\n  var numPoints = points.length\n  var stars = triangulation.stars\n  for(var a=0; a<numPoints; ++a) {\n    var star = stars[a]\n    for(var j=1; j<star.length; j+=2) {\n      var b = star[j]\n\n      //If order is not consistent, then skip edge\n      if(b < a) {\n        continue\n      }\n\n      //Check if edge is constrained\n      if(triangulation.isConstraint(a, b)) {\n        continue\n      }\n\n      //Find opposite edge\n      var x = star[j-1], y = -1\n      for(var k=1; k<star.length; k+=2) {\n        if(star[k-1] === b) {\n          y = star[k]\n          break\n        }\n      }\n\n      //If this is a boundary edge, don't flip it\n      if(y < 0) {\n        continue\n      }\n\n      //If edge is in circle, flip it\n      if(inCircle(points[a], points[b], points[x], points[y]) < 0) {\n        stack.push(a, b)\n      }\n    }\n  }\n\n  while(stack.length > 0) {\n    var b = stack.pop()\n    var a = stack.pop()\n\n    //Find opposite pairs\n    var x = -1, y = -1\n    var star = stars[a]\n    for(var i=1; i<star.length; i+=2) {\n      var s = star[i-1]\n      var t = star[i]\n      if(s === b) {\n        y = t\n      } else if(t === b) {\n        x = s\n      }\n    }\n\n    //If x/y are both valid then skip edge\n    if(x < 0 || y < 0) {\n      continue\n    }\n\n    //If edge is now delaunay, then don't flip it\n    if(inCircle(points[a], points[b], points[x], points[y]) >= 0) {\n      continue\n    }\n\n    //Flip the edge\n    triangulation.flip(a, b)\n\n    //Test flipping neighboring edges\n    testFlip(points, triangulation, stack, x, a, y)\n    testFlip(points, triangulation, stack, a, y, x)\n    testFlip(points, triangulation, stack, y, b, x)\n    testFlip(points, triangulation, stack, b, x, y)\n  }\n}\n\n},{\"binary-search-bounds\":104,\"robust-in-sphere\":495}],101:[function(_dereq_,module,exports){\n'use strict'\n\nvar bsearch = _dereq_('binary-search-bounds')\n\nmodule.exports = classifyFaces\n\nfunction FaceIndex(cells, neighbor, constraint, flags, active, next, boundary) {\n  this.cells       = cells\n  this.neighbor    = neighbor\n  this.flags       = flags\n  this.constraint  = constraint\n  this.active      = active\n  this.next        = next\n  this.boundary    = boundary\n}\n\nvar proto = FaceIndex.prototype\n\nfunction compareCell(a, b) {\n  return a[0] - b[0] ||\n         a[1] - b[1] ||\n         a[2] - b[2]\n}\n\nproto.locate = (function() {\n  var key = [0,0,0]\n  return function(a, b, c) {\n    var x = a, y = b, z = c\n    if(b < c) {\n      if(b < a) {\n        x = b\n        y = c\n        z = a\n      }\n    } else if(c < a) {\n      x = c\n      y = a\n      z = b\n    }\n    if(x < 0) {\n      return -1\n    }\n    key[0] = x\n    key[1] = y\n    key[2] = z\n    return bsearch.eq(this.cells, key, compareCell)\n  }\n})()\n\nfunction indexCells(triangulation, infinity) {\n  //First get cells and canonicalize\n  var cells = triangulation.cells()\n  var nc = cells.length\n  for(var i=0; i<nc; ++i) {\n    var c = cells[i]\n    var x = c[0], y = c[1], z = c[2]\n    if(y < z) {\n      if(y < x) {\n        c[0] = y\n        c[1] = z\n        c[2] = x\n      }\n    } else if(z < x) {\n      c[0] = z\n      c[1] = x\n      c[2] = y\n    }\n  }\n  cells.sort(compareCell)\n\n  //Initialize flag array\n  var flags = new Array(nc)\n  for(var i=0; i<flags.length; ++i) {\n    flags[i] = 0\n  }\n\n  //Build neighbor index, initialize queues\n  var active = []\n  var next   = []\n  var neighbor = new Array(3*nc)\n  var constraint = new Array(3*nc)\n  var boundary = null\n  if(infinity) {\n    boundary = []\n  }\n  var index = new FaceIndex(\n    cells,\n    neighbor,\n    constraint,\n    flags,\n    active,\n    next,\n    boundary)\n  for(var i=0; i<nc; ++i) {\n    var c = cells[i]\n    for(var j=0; j<3; ++j) {\n      var x = c[j], y = c[(j+1)%3]\n      var a = neighbor[3*i+j] = index.locate(y, x, triangulation.opposite(y, x))\n      var b = constraint[3*i+j] = triangulation.isConstraint(x, y)\n      if(a < 0) {\n        if(b) {\n          next.push(i)\n        } else {\n          active.push(i)\n          flags[i] = 1\n        }\n        if(infinity) {\n          boundary.push([y, x, -1])\n        }\n      }\n    }\n  }\n  return index\n}\n\nfunction filterCells(cells, flags, target) {\n  var ptr = 0\n  for(var i=0; i<cells.length; ++i) {\n    if(flags[i] === target) {\n      cells[ptr++] = cells[i]\n    }\n  }\n  cells.length = ptr\n  return cells\n}\n\nfunction classifyFaces(triangulation, target, infinity) {\n  var index = indexCells(triangulation, infinity)\n\n  if(target === 0) {\n    if(infinity) {\n      return index.cells.concat(index.boundary)\n    } else {\n      return index.cells\n    }\n  }\n\n  var side = 1\n  var active = index.active\n  var next = index.next\n  var flags = index.flags\n  var cells = index.cells\n  var constraint = index.constraint\n  var neighbor = index.neighbor\n\n  while(active.length > 0 || next.length > 0) {\n    while(active.length > 0) {\n      var t = active.pop()\n      if(flags[t] === -side) {\n        continue\n      }\n      flags[t] = side\n      var c = cells[t]\n      for(var j=0; j<3; ++j) {\n        var f = neighbor[3*t+j]\n        if(f >= 0 && flags[f] === 0) {\n          if(constraint[3*t+j]) {\n            next.push(f)\n          } else {\n            active.push(f)\n            flags[f] = side\n          }\n        }\n      }\n    }\n\n    //Swap arrays and loop\n    var tmp = next\n    next = active\n    active = tmp\n    next.length = 0\n    side = -side\n  }\n\n  var result = filterCells(cells, flags, target)\n  if(infinity) {\n    return result.concat(index.boundary)\n  }\n  return result\n}\n\n},{\"binary-search-bounds\":104}],102:[function(_dereq_,module,exports){\n'use strict'\n\nvar bsearch = _dereq_('binary-search-bounds')\nvar orient = _dereq_('robust-orientation')[3]\n\nvar EVENT_POINT = 0\nvar EVENT_END   = 1\nvar EVENT_START = 2\n\nmodule.exports = monotoneTriangulate\n\n//A partial convex hull fragment, made of two unimonotone polygons\nfunction PartialHull(a, b, idx, lowerIds, upperIds) {\n  this.a = a\n  this.b = b\n  this.idx = idx\n  this.lowerIds = lowerIds\n  this.upperIds = upperIds\n}\n\n//An event in the sweep line procedure\nfunction Event(a, b, type, idx) {\n  this.a    = a\n  this.b    = b\n  this.type = type\n  this.idx  = idx\n}\n\n//This is used to compare events for the sweep line procedure\n// Points are:\n//  1. sorted lexicographically\n//  2. sorted by type  (point < end < start)\n//  3. segments sorted by winding order\n//  4. sorted by index\nfunction compareEvent(a, b) {\n  var d =\n    (a.a[0] - b.a[0]) ||\n    (a.a[1] - b.a[1]) ||\n    (a.type - b.type)\n  if(d) { return d }\n  if(a.type !== EVENT_POINT) {\n    d = orient(a.a, a.b, b.b)\n    if(d) { return d }\n  }\n  return a.idx - b.idx\n}\n\nfunction testPoint(hull, p) {\n  return orient(hull.a, hull.b, p)\n}\n\nfunction addPoint(cells, hulls, points, p, idx) {\n  var lo = bsearch.lt(hulls, p, testPoint)\n  var hi = bsearch.gt(hulls, p, testPoint)\n  for(var i=lo; i<hi; ++i) {\n    var hull = hulls[i]\n\n    //Insert p into lower hull\n    var lowerIds = hull.lowerIds\n    var m = lowerIds.length\n    while(m > 1 && orient(\n        points[lowerIds[m-2]],\n        points[lowerIds[m-1]],\n        p) > 0) {\n      cells.push(\n        [lowerIds[m-1],\n         lowerIds[m-2],\n         idx])\n      m -= 1\n    }\n    lowerIds.length = m\n    lowerIds.push(idx)\n\n    //Insert p into upper hull\n    var upperIds = hull.upperIds\n    var m = upperIds.length\n    while(m > 1 && orient(\n        points[upperIds[m-2]],\n        points[upperIds[m-1]],\n        p) < 0) {\n      cells.push(\n        [upperIds[m-2],\n         upperIds[m-1],\n         idx])\n      m -= 1\n    }\n    upperIds.length = m\n    upperIds.push(idx)\n  }\n}\n\nfunction findSplit(hull, edge) {\n  var d\n  if(hull.a[0] < edge.a[0]) {\n    d = orient(hull.a, hull.b, edge.a)\n  } else {\n    d = orient(edge.b, edge.a, hull.a)\n  }\n  if(d) { return d }\n  if(edge.b[0] < hull.b[0]) {\n    d = orient(hull.a, hull.b, edge.b)\n  } else {\n    d = orient(edge.b, edge.a, hull.b)\n  }\n  return d || hull.idx - edge.idx\n}\n\nfunction splitHulls(hulls, points, event) {\n  var splitIdx = bsearch.le(hulls, event, findSplit)\n  var hull = hulls[splitIdx]\n  var upperIds = hull.upperIds\n  var x = upperIds[upperIds.length-1]\n  hull.upperIds = [x]\n  hulls.splice(splitIdx+1, 0,\n    new PartialHull(event.a, event.b, event.idx, [x], upperIds))\n}\n\n\nfunction mergeHulls(hulls, points, event) {\n  //Swap pointers for merge search\n  var tmp = event.a\n  event.a = event.b\n  event.b = tmp\n  var mergeIdx = bsearch.eq(hulls, event, findSplit)\n  var upper = hulls[mergeIdx]\n  var lower = hulls[mergeIdx-1]\n  lower.upperIds = upper.upperIds\n  hulls.splice(mergeIdx, 1)\n}\n\n\nfunction monotoneTriangulate(points, edges) {\n\n  var numPoints = points.length\n  var numEdges = edges.length\n\n  var events = []\n\n  //Create point events\n  for(var i=0; i<numPoints; ++i) {\n    events.push(new Event(\n      points[i],\n      null,\n      EVENT_POINT,\n      i))\n  }\n\n  //Create edge events\n  for(var i=0; i<numEdges; ++i) {\n    var e = edges[i]\n    var a = points[e[0]]\n    var b = points[e[1]]\n    if(a[0] < b[0]) {\n      events.push(\n        new Event(a, b, EVENT_START, i),\n        new Event(b, a, EVENT_END, i))\n    } else if(a[0] > b[0]) {\n      events.push(\n        new Event(b, a, EVENT_START, i),\n        new Event(a, b, EVENT_END, i))\n    }\n  }\n\n  //Sort events\n  events.sort(compareEvent)\n\n  //Initialize hull\n  var minX = events[0].a[0] - (1 + Math.abs(events[0].a[0])) * Math.pow(2, -52)\n  var hull = [ new PartialHull([minX, 1], [minX, 0], -1, [], [], [], []) ]\n\n  //Process events in order\n  var cells = []\n  for(var i=0, numEvents=events.length; i<numEvents; ++i) {\n    var event = events[i]\n    var type = event.type\n    if(type === EVENT_POINT) {\n      addPoint(cells, hull, points, event.a, event.idx)\n    } else if(type === EVENT_START) {\n      splitHulls(hull, points, event)\n    } else {\n      mergeHulls(hull, points, event)\n    }\n  }\n\n  //Return triangulation\n  return cells\n}\n\n},{\"binary-search-bounds\":104,\"robust-orientation\":497}],103:[function(_dereq_,module,exports){\n'use strict'\n\nvar bsearch = _dereq_('binary-search-bounds')\n\nmodule.exports = createTriangulation\n\nfunction Triangulation(stars, edges) {\n  this.stars = stars\n  this.edges = edges\n}\n\nvar proto = Triangulation.prototype\n\nfunction removePair(list, j, k) {\n  for(var i=1, n=list.length; i<n; i+=2) {\n    if(list[i-1] === j && list[i] === k) {\n      list[i-1] = list[n-2]\n      list[i] = list[n-1]\n      list.length = n - 2\n      return\n    }\n  }\n}\n\nproto.isConstraint = (function() {\n  var e = [0,0]\n  function compareLex(a, b) {\n    return a[0] - b[0] || a[1] - b[1]\n  }\n  return function(i, j) {\n    e[0] = Math.min(i,j)\n    e[1] = Math.max(i,j)\n    return bsearch.eq(this.edges, e, compareLex) >= 0\n  }\n})()\n\nproto.removeTriangle = function(i, j, k) {\n  var stars = this.stars\n  removePair(stars[i], j, k)\n  removePair(stars[j], k, i)\n  removePair(stars[k], i, j)\n}\n\nproto.addTriangle = function(i, j, k) {\n  var stars = this.stars\n  stars[i].push(j, k)\n  stars[j].push(k, i)\n  stars[k].push(i, j)\n}\n\nproto.opposite = function(j, i) {\n  var list = this.stars[i]\n  for(var k=1, n=list.length; k<n; k+=2) {\n    if(list[k] === j) {\n      return list[k-1]\n    }\n  }\n  return -1\n}\n\nproto.flip = function(i, j) {\n  var a = this.opposite(i, j)\n  var b = this.opposite(j, i)\n  this.removeTriangle(i, j, a)\n  this.removeTriangle(j, i, b)\n  this.addTriangle(i, b, a)\n  this.addTriangle(j, a, b)\n}\n\nproto.edges = function() {\n  var stars = this.stars\n  var result = []\n  for(var i=0, n=stars.length; i<n; ++i) {\n    var list = stars[i]\n    for(var j=0, m=list.length; j<m; j+=2) {\n      result.push([list[j], list[j+1]])\n    }\n  }\n  return result\n}\n\nproto.cells = function() {\n  var stars = this.stars\n  var result = []\n  for(var i=0, n=stars.length; i<n; ++i) {\n    var list = stars[i]\n    for(var j=0, m=list.length; j<m; j+=2) {\n      var s = list[j]\n      var t = list[j+1]\n      if(i < Math.min(s, t)) {\n        result.push([i, s, t])\n      }\n    }\n  }\n  return result\n}\n\nfunction createTriangulation(numVerts, edges) {\n  var stars = new Array(numVerts)\n  for(var i=0; i<numVerts; ++i) {\n    stars[i] = []\n  }\n  return new Triangulation(stars, edges)\n}\n\n},{\"binary-search-bounds\":104}],104:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) {\n  var code = [\n    \"function \", funcName, \"(a,l,h,\", extraArgs.join(\",\"),  \"){\",\n    earlyOut ? \"\" : \"var i=\", (reversed ? \"l-1\" : \"h+1\"),\n    \";while(l<=h){var m=(l+h)>>>1,x=a[m]\"]\n  if(earlyOut) {\n    if(predicate.indexOf(\"c\") < 0) {\n      code.push(\";if(x===y){return m}else if(x<=y){\")\n    } else {\n      code.push(\";var p=c(x,y);if(p===0){return m}else if(p<=0){\")\n    }\n  } else {\n    code.push(\";if(\", predicate, \"){i=m;\")\n  }\n  if(reversed) {\n    code.push(\"l=m+1}else{h=m-1}\")\n  } else {\n    code.push(\"h=m-1}else{l=m+1}\")\n  }\n  code.push(\"}\")\n  if(earlyOut) {\n    code.push(\"return -1};\")\n  } else {\n    code.push(\"return i};\")\n  }\n  return code.join(\"\")\n}\n\nfunction compileBoundsSearch(predicate, reversed, suffix, earlyOut) {\n  var result = new Function([\n  compileSearch(\"A\", \"x\" + predicate + \"y\", reversed, [\"y\"], earlyOut),\n  compileSearch(\"P\", \"c(x,y)\" + predicate + \"0\", reversed, [\"y\", \"c\"], earlyOut),\n\"function dispatchBsearch\", suffix, \"(a,y,c,l,h){\\\nif(typeof(c)==='function'){\\\nreturn P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)\\\n}else{\\\nreturn A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)\\\n}}\\\nreturn dispatchBsearch\", suffix].join(\"\"))\n  return result()\n}\n\nmodule.exports = {\n  ge: compileBoundsSearch(\">=\", false,  \"GE\"),\n  gt: compileBoundsSearch(\">\",  false,  \"GT\"),\n  lt: compileBoundsSearch(\"<\",  true,   \"LT\"),\n  le: compileBoundsSearch(\"<=\", true,   \"LE\"),\n  eq: compileBoundsSearch(\"-\",  true,   \"EQ\", true)\n}\n\n},{}],105:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = orientation\n\nfunction orientation(s) {\n  var p = 1\n  for(var i=1; i<s.length; ++i) {\n    for(var j=0; j<i; ++j) {\n      if(s[i] < s[j]) {\n        p = -p\n      } else if(s[j] === s[i]) {\n        return 0\n      }\n    }\n  }\n  return p\n}\n\n},{}],106:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar dup = _dereq_(\"dup\")\nvar solve = _dereq_(\"robust-linear-solve\")\n\nfunction dot(a, b) {\n  var s = 0.0\n  var d = a.length\n  for(var i=0; i<d; ++i) {\n    s += a[i] * b[i]\n  }\n  return s\n}\n\nfunction barycentricCircumcenter(points) {\n  var N = points.length\n  if(N === 0) {\n    return []\n  }\n  \n  var D = points[0].length\n  var A = dup([points.length+1, points.length+1], 1.0)\n  var b = dup([points.length+1], 1.0)\n  A[N][N] = 0.0\n  for(var i=0; i<N; ++i) {\n    for(var j=0; j<=i; ++j) {\n      A[j][i] = A[i][j] = 2.0 * dot(points[i], points[j])\n    }\n    b[i] = dot(points[i], points[i])\n  }\n  var x = solve(A, b)\n\n  var denom = 0.0\n  var h = x[N+1]\n  for(var i=0; i<h.length; ++i) {\n    denom += h[i]\n  }\n\n  var y = new Array(N)\n  for(var i=0; i<N; ++i) {\n    var h = x[i]\n    var numer = 0.0\n    for(var j=0; j<h.length; ++j) {\n      numer += h[j]\n    }\n    y[i] =  numer / denom\n  }\n\n  return y\n}\n\nfunction circumcenter(points) {\n  if(points.length === 0) {\n    return []\n  }\n  var D = points[0].length\n  var result = dup([D])\n  var weights = barycentricCircumcenter(points)\n  for(var i=0; i<points.length; ++i) {\n    for(var j=0; j<D; ++j) {\n      result[j] += points[i][j] * weights[i]\n    }\n  }\n  return result\n}\n\ncircumcenter.barycenetric = barycentricCircumcenter\nmodule.exports = circumcenter\n},{\"dup\":164,\"robust-linear-solve\":496}],107:[function(_dereq_,module,exports){\nmodule.exports = circumradius\n\nvar circumcenter = _dereq_('circumcenter')\n\nfunction circumradius(points) {\n  var center = circumcenter(points)\n  var avgDist = 0.0\n  for(var i=0; i<points.length; ++i) {\n    var p = points[i]\n    for(var j=0; j<center.length; ++j) {\n      avgDist += Math.pow(p[j] - center[j], 2)\n    }\n  }\n  return Math.sqrt(avgDist / points.length)\n}\n},{\"circumcenter\":106}],108:[function(_dereq_,module,exports){\nmodule.exports = clamp\n\nfunction clamp(value, min, max) {\n  return min < max\n    ? (value < min ? min : value > max ? max : value)\n    : (value < max ? max : value > min ? min : value)\n}\n\n},{}],109:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = cleanPSLG\n\nvar UnionFind = _dereq_('union-find')\nvar boxIntersect = _dereq_('box-intersect')\nvar segseg = _dereq_('robust-segment-intersect')\nvar rat = _dereq_('big-rat')\nvar ratCmp = _dereq_('big-rat/cmp')\nvar ratToFloat = _dereq_('big-rat/to-float')\nvar ratVec = _dereq_('rat-vec')\nvar nextafter = _dereq_('nextafter')\n\nvar solveIntersection = _dereq_('./lib/rat-seg-intersect')\n\n// Bounds on a rational number when rounded to a float\nfunction boundRat (r) {\n  var f = ratToFloat(r)\n  return [\n    nextafter(f, -Infinity),\n    nextafter(f, Infinity)\n  ]\n}\n\n// Convert a list of edges in a pslg to bounding boxes\nfunction boundEdges (points, edges) {\n  var bounds = new Array(edges.length)\n  for (var i = 0; i < edges.length; ++i) {\n    var e = edges[i]\n    var a = points[e[0]]\n    var b = points[e[1]]\n    bounds[i] = [\n      nextafter(Math.min(a[0], b[0]), -Infinity),\n      nextafter(Math.min(a[1], b[1]), -Infinity),\n      nextafter(Math.max(a[0], b[0]), Infinity),\n      nextafter(Math.max(a[1], b[1]), Infinity)\n    ]\n  }\n  return bounds\n}\n\n// Convert a list of points into bounding boxes by duplicating coords\nfunction boundPoints (points) {\n  var bounds = new Array(points.length)\n  for (var i = 0; i < points.length; ++i) {\n    var p = points[i]\n    bounds[i] = [\n      nextafter(p[0], -Infinity),\n      nextafter(p[1], -Infinity),\n      nextafter(p[0], Infinity),\n      nextafter(p[1], Infinity)\n    ]\n  }\n  return bounds\n}\n\n// Find all pairs of crossing edges in a pslg (given edge bounds)\nfunction getCrossings (points, edges, edgeBounds) {\n  var result = []\n  boxIntersect(edgeBounds, function (i, j) {\n    var e = edges[i]\n    var f = edges[j]\n    if (e[0] === f[0] || e[0] === f[1] ||\n      e[1] === f[0] || e[1] === f[1]) {\n      return\n    }\n    var a = points[e[0]]\n    var b = points[e[1]]\n    var c = points[f[0]]\n    var d = points[f[1]]\n    if (segseg(a, b, c, d)) {\n      result.push([i, j])\n    }\n  })\n  return result\n}\n\n// Find all pairs of crossing vertices in a pslg (given edge/vert bounds)\nfunction getTJunctions (points, edges, edgeBounds, vertBounds) {\n  var result = []\n  boxIntersect(edgeBounds, vertBounds, function (i, v) {\n    var e = edges[i]\n    if (e[0] === v || e[1] === v) {\n      return\n    }\n    var p = points[v]\n    var a = points[e[0]]\n    var b = points[e[1]]\n    if (segseg(a, b, p, p)) {\n      result.push([i, v])\n    }\n  })\n  return result\n}\n\n// Cut edges along crossings/tjunctions\nfunction cutEdges (floatPoints, edges, crossings, junctions, useColor) {\n  var i, e\n\n  // Convert crossings into tjunctions by constructing rational points\n  var ratPoints = floatPoints.map(function(p) {\n      return [\n          rat(p[0]),\n          rat(p[1])\n      ]\n  })\n  for (i = 0; i < crossings.length; ++i) {\n    var crossing = crossings[i]\n    e = crossing[0]\n    var f = crossing[1]\n    var ee = edges[e]\n    var ef = edges[f]\n    var x = solveIntersection(\n      ratVec(floatPoints[ee[0]]),\n      ratVec(floatPoints[ee[1]]),\n      ratVec(floatPoints[ef[0]]),\n      ratVec(floatPoints[ef[1]]))\n    if (!x) {\n      // Segments are parallel, should already be handled by t-junctions\n      continue\n    }\n    var idx = floatPoints.length\n    floatPoints.push([ratToFloat(x[0]), ratToFloat(x[1])])\n    ratPoints.push(x)\n    junctions.push([e, idx], [f, idx])\n  }\n\n  // Sort tjunctions\n  junctions.sort(function (a, b) {\n    if (a[0] !== b[0]) {\n      return a[0] - b[0]\n    }\n    var u = ratPoints[a[1]]\n    var v = ratPoints[b[1]]\n    return ratCmp(u[0], v[0]) || ratCmp(u[1], v[1])\n  })\n\n  // Split edges along junctions\n  for (i = junctions.length - 1; i >= 0; --i) {\n    var junction = junctions[i]\n    e = junction[0]\n\n    var edge = edges[e]\n    var s = edge[0]\n    var t = edge[1]\n\n    // Check if edge is not lexicographically sorted\n    var a = floatPoints[s]\n    var b = floatPoints[t]\n    if (((a[0] - b[0]) || (a[1] - b[1])) < 0) {\n      var tmp = s\n      s = t\n      t = tmp\n    }\n\n    // Split leading edge\n    edge[0] = s\n    var last = edge[1] = junction[1]\n\n    // If we are grouping edges by color, remember to track data\n    var color\n    if (useColor) {\n      color = edge[2]\n    }\n\n    // Split other edges\n    while (i > 0 && junctions[i - 1][0] === e) {\n      var junction = junctions[--i]\n      var next = junction[1]\n      if (useColor) {\n        edges.push([last, next, color])\n      } else {\n        edges.push([last, next])\n      }\n      last = next\n    }\n\n    // Add final edge\n    if (useColor) {\n      edges.push([last, t, color])\n    } else {\n      edges.push([last, t])\n    }\n  }\n\n  // Return constructed rational points\n  return ratPoints\n}\n\n// Merge overlapping points\nfunction dedupPoints (floatPoints, ratPoints, floatBounds) {\n  var numPoints = ratPoints.length\n  var uf = new UnionFind(numPoints)\n\n  // Compute rational bounds\n  var bounds = []\n  for (var i = 0; i < ratPoints.length; ++i) {\n    var p = ratPoints[i]\n    var xb = boundRat(p[0])\n    var yb = boundRat(p[1])\n    bounds.push([\n      nextafter(xb[0], -Infinity),\n      nextafter(yb[0], -Infinity),\n      nextafter(xb[1], Infinity),\n      nextafter(yb[1], Infinity)\n    ])\n  }\n\n  // Link all points with over lapping boxes\n  boxIntersect(bounds, function (i, j) {\n    uf.link(i, j)\n  })\n\n  // Do 1 pass over points to combine points in label sets\n  var noDupes = true\n  var labels = new Array(numPoints)\n  for (var i = 0; i < numPoints; ++i) {\n    var j = uf.find(i)\n    if (j !== i) {\n      // Clear no-dupes flag, zero out label\n      noDupes = false\n      // Make each point the top-left point from its cell\n      floatPoints[j] = [\n        Math.min(floatPoints[i][0], floatPoints[j][0]),\n        Math.min(floatPoints[i][1], floatPoints[j][1])\n      ]\n    }\n  }\n\n  // If no duplicates, return null to signal termination\n  if (noDupes) {\n    return null\n  }\n\n  var ptr = 0\n  for (var i = 0; i < numPoints; ++i) {\n    var j = uf.find(i)\n    if (j === i) {\n      labels[i] = ptr\n      floatPoints[ptr++] = floatPoints[i]\n    } else {\n      labels[i] = -1\n    }\n  }\n\n  floatPoints.length = ptr\n\n  // Do a second pass to fix up missing labels\n  for (var i = 0; i < numPoints; ++i) {\n    if (labels[i] < 0) {\n      labels[i] = labels[uf.find(i)]\n    }\n  }\n\n  // Return resulting union-find data structure\n  return labels\n}\n\nfunction compareLex2 (a, b) { return (a[0] - b[0]) || (a[1] - b[1]) }\nfunction compareLex3 (a, b) {\n  var d = (a[0] - b[0]) || (a[1] - b[1])\n  if (d) {\n    return d\n  }\n  if (a[2] < b[2]) {\n    return -1\n  } else if (a[2] > b[2]) {\n    return 1\n  }\n  return 0\n}\n\n// Remove duplicate edge labels\nfunction dedupEdges (edges, labels, useColor) {\n  if (edges.length === 0) {\n    return\n  }\n  if (labels) {\n    for (var i = 0; i < edges.length; ++i) {\n      var e = edges[i]\n      var a = labels[e[0]]\n      var b = labels[e[1]]\n      e[0] = Math.min(a, b)\n      e[1] = Math.max(a, b)\n    }\n  } else {\n    for (var i = 0; i < edges.length; ++i) {\n      var e = edges[i]\n      var a = e[0]\n      var b = e[1]\n      e[0] = Math.min(a, b)\n      e[1] = Math.max(a, b)\n    }\n  }\n  if (useColor) {\n    edges.sort(compareLex3)\n  } else {\n    edges.sort(compareLex2)\n  }\n  var ptr = 1\n  for (var i = 1; i < edges.length; ++i) {\n    var prev = edges[i - 1]\n    var next = edges[i]\n    if (next[0] === prev[0] && next[1] === prev[1] &&\n      (!useColor || next[2] === prev[2])) {\n      continue\n    }\n    edges[ptr++] = next\n  }\n  edges.length = ptr\n}\n\nfunction preRound (points, edges, useColor) {\n  var labels = dedupPoints(points, [], boundPoints(points))\n  dedupEdges(edges, labels, useColor)\n  return !!labels\n}\n\n// Repeat until convergence\nfunction snapRound (points, edges, useColor) {\n  // 1. find edge crossings\n  var edgeBounds = boundEdges(points, edges)\n  var crossings = getCrossings(points, edges, edgeBounds)\n\n  // 2. find t-junctions\n  var vertBounds = boundPoints(points)\n  var tjunctions = getTJunctions(points, edges, edgeBounds, vertBounds)\n\n  // 3. cut edges, construct rational points\n  var ratPoints = cutEdges(points, edges, crossings, tjunctions, useColor)\n\n  // 4. dedupe verts\n  var labels = dedupPoints(points, ratPoints, vertBounds)\n\n  // 5. dedupe edges\n  dedupEdges(edges, labels, useColor)\n\n  // 6. check termination\n  if (!labels) {\n    return (crossings.length > 0 || tjunctions.length > 0)\n  }\n\n  // More iterations necessary\n  return true\n}\n\n// Main loop, runs PSLG clean up until completion\nfunction cleanPSLG (points, edges, colors) {\n  // If using colors, augment edges with color data\n  var prevEdges\n  if (colors) {\n    prevEdges = edges\n    var augEdges = new Array(edges.length)\n    for (var i = 0; i < edges.length; ++i) {\n      var e = edges[i]\n      augEdges[i] = [e[0], e[1], colors[i]]\n    }\n    edges = augEdges\n  }\n\n  // First round: remove duplicate edges and points\n  var modified = preRound(points, edges, !!colors)\n\n  // Run snap rounding until convergence\n  while (snapRound(points, edges, !!colors)) {\n    modified = true\n  }\n\n  // Strip color tags\n  if (!!colors && modified) {\n    prevEdges.length = 0\n    colors.length = 0\n    for (var i = 0; i < edges.length; ++i) {\n      var e = edges[i]\n      prevEdges.push([e[0], e[1]])\n      colors.push(e[2])\n    }\n  }\n\n  return modified\n}\n\n},{\"./lib/rat-seg-intersect\":110,\"big-rat\":71,\"big-rat/cmp\":69,\"big-rat/to-float\":83,\"box-intersect\":89,\"nextafter\":446,\"rat-vec\":481,\"robust-segment-intersect\":500,\"union-find\":533}],110:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = solveIntersection\n\nvar ratMul = _dereq_('big-rat/mul')\nvar ratDiv = _dereq_('big-rat/div')\nvar ratSub = _dereq_('big-rat/sub')\nvar ratSign = _dereq_('big-rat/sign')\nvar rvSub = _dereq_('rat-vec/sub')\nvar rvAdd = _dereq_('rat-vec/add')\nvar rvMuls = _dereq_('rat-vec/muls')\n\nfunction ratPerp (a, b) {\n  return ratSub(ratMul(a[0], b[1]), ratMul(a[1], b[0]))\n}\n\n// Solve for intersection\n//  x = a + t (b-a)\n//  (x - c) ^ (d-c) = 0\n//  (t * (b-a) + (a-c) ) ^ (d-c) = 0\n//  t * (b-a)^(d-c) = (d-c)^(a-c)\n//  t = (d-c)^(a-c) / (b-a)^(d-c)\n\nfunction solveIntersection (a, b, c, d) {\n  var ba = rvSub(b, a)\n  var dc = rvSub(d, c)\n\n  var baXdc = ratPerp(ba, dc)\n\n  if (ratSign(baXdc) === 0) {\n    return null\n  }\n\n  var ac = rvSub(a, c)\n  var dcXac = ratPerp(dc, ac)\n\n  var t = ratDiv(dcXac, baXdc)\n  var s = rvMuls(ba, t)\n  var r = rvAdd(a, s)\n\n  return r\n}\n\n},{\"big-rat/div\":70,\"big-rat/mul\":80,\"big-rat/sign\":81,\"big-rat/sub\":82,\"rat-vec/add\":480,\"rat-vec/muls\":482,\"rat-vec/sub\":483}],111:[function(_dereq_,module,exports){\n/** @module  color-id */\r\n\r\n'use strict'\r\n\r\nvar clamp = _dereq_('clamp')\r\n\r\nmodule.exports = toNumber\r\nmodule.exports.to = toNumber\r\nmodule.exports.from = fromNumber\r\n\r\nfunction toNumber (rgba, normalized) {\r\n\tif(normalized == null) normalized = true\r\n\r\n\tvar r = rgba[0], g = rgba[1], b = rgba[2], a = rgba[3]\r\n\r\n\tif (a == null) a = normalized ? 1 : 255\r\n\r\n\tif (normalized) {\r\n\t\tr *= 255\r\n\t\tg *= 255\r\n\t\tb *= 255\r\n\t\ta *= 255\r\n\t}\r\n\r\n\tr = clamp(r, 0, 255) & 0xFF\r\n\tg = clamp(g, 0, 255) & 0xFF\r\n\tb = clamp(b, 0, 255) & 0xFF\r\n\ta = clamp(a, 0, 255) & 0xFF\r\n\r\n\t//hi-order shift converts to -1, so we can't use <<24\r\n\tvar n = (r * 0x01000000) + (g << 16) + (b << 8) + (a)\r\n\r\n\treturn n\r\n}\r\n\r\nfunction fromNumber (n, normalized) {\r\n\tn = +n\r\n\r\n\tvar r = n >>> 24\r\n\tvar g = (n & 0x00ff0000) >>> 16\r\n\tvar b = (n & 0x0000ff00) >>> 8\r\n\tvar a = n & 0x000000ff\r\n\r\n\tif (normalized === false) return [r, g, b, a]\r\n\r\n\treturn [r/255, g/255, b/255, a/255]\r\n}\r\n\n},{\"clamp\":108}],112:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n},{}],113:[function(_dereq_,module,exports){\n/** @module  color-normalize */\r\n\r\n'use strict'\r\n\r\nvar rgba = _dereq_('color-rgba')\r\nvar clamp = _dereq_('clamp')\r\nvar dtype = _dereq_('dtype')\r\n\r\nmodule.exports = function normalize (color, type) {\r\n\tif (type === 'float' || !type) type = 'array'\r\n\tif (type === 'uint') type = 'uint8'\r\n\tif (type === 'uint_clamped') type = 'uint8_clamped'\r\n\tvar Ctor = dtype(type)\r\n\tvar output = new Ctor(4)\r\n\r\n\tvar normalize = type !== 'uint8' && type !== 'uint8_clamped'\r\n\r\n\t// attempt to parse non-array arguments\r\n\tif (!color.length || typeof color === 'string') {\r\n\t\tcolor = rgba(color)\r\n\t\tcolor[0] /= 255\r\n\t\tcolor[1] /= 255\r\n\t\tcolor[2] /= 255\r\n\t}\r\n\r\n\t// 0, 1 are possible contradictory values for Arrays:\r\n\t// [1,1,1] input gives [1,1,1] output instead of [1/255,1/255,1/255], which may be collision if input is meant to be uint.\r\n\t// converting [1,1,1] to [1/255,1/255,1/255] in case of float input gives larger mistake since [1,1,1] float is frequent edge value, whereas [0,1,1], [1,1,1] etc. uint inputs are relatively rare\r\n\tif (isInt(color)) {\r\n\t\toutput[0] = color[0]\r\n\t\toutput[1] = color[1]\r\n\t\toutput[2] = color[2]\r\n\t\toutput[3] = color[3] != null ? color[3] : 255\r\n\r\n\t\tif (normalize) {\r\n\t\t\toutput[0] /= 255\r\n\t\t\toutput[1] /= 255\r\n\t\t\toutput[2] /= 255\r\n\t\t\toutput[3] /= 255\r\n\t\t}\r\n\r\n\t\treturn output\r\n\t}\r\n\r\n\tif (!normalize) {\r\n\t\toutput[0] = clamp(Math.floor(color[0] * 255), 0, 255)\r\n\t\toutput[1] = clamp(Math.floor(color[1] * 255), 0, 255)\r\n\t\toutput[2] = clamp(Math.floor(color[2] * 255), 0, 255)\r\n\t\toutput[3] = color[3] == null ? 255 : clamp(Math.floor(color[3] * 255), 0, 255)\r\n\t} else {\r\n\t\toutput[0] = color[0]\r\n\t\toutput[1] = color[1]\r\n\t\toutput[2] = color[2]\r\n\t\toutput[3] = color[3] != null ? color[3] : 1\r\n\t}\r\n\r\n\treturn output\r\n}\r\n\r\nfunction isInt(color) {\r\n\tif (color instanceof Uint8Array || color instanceof Uint8ClampedArray) return true\r\n\r\n\tif (Array.isArray(color) &&\r\n\t\t(color[0] > 1 || color[0] === 0) &&\r\n\t\t(color[1] > 1 || color[1] === 0) &&\r\n\t\t(color[2] > 1 || color[2] === 0) &&\r\n\t\t(!color[3] || color[3] > 1)\r\n\t) return true\r\n\r\n\treturn false\r\n}\r\n\n},{\"clamp\":108,\"color-rgba\":115,\"dtype\":163}],114:[function(_dereq_,module,exports){\n(function (global){\n/**\r\n * @module color-parse\r\n */\r\n\r\n'use strict'\r\n\r\nvar names = _dereq_('color-name')\r\nvar isObject = _dereq_('is-plain-obj')\r\nvar defined = _dereq_('defined')\r\n\r\nmodule.exports = parse\r\n\r\n/**\r\n * Base hues\r\n * http://dev.w3.org/csswg/css-color/#typedef-named-hue\r\n */\r\n//FIXME: use external hue detector\r\nvar baseHues = {\r\n\tred: 0,\r\n\torange: 60,\r\n\tyellow: 120,\r\n\tgreen: 180,\r\n\tblue: 240,\r\n\tpurple: 300\r\n}\r\n\r\n/**\r\n * Parse color from the string passed\r\n *\r\n * @return {Object} A space indicator `space`, an array `values` and `alpha`\r\n */\r\nfunction parse (cstr) {\r\n\tvar m, parts = [], alpha = 1, space\r\n\r\n\tif (typeof cstr === 'string') {\r\n\t\t//keyword\r\n\t\tif (names[cstr]) {\r\n\t\t\tparts = names[cstr].slice()\r\n\t\t\tspace = 'rgb'\r\n\t\t}\r\n\r\n\t\t//reserved words\r\n\t\telse if (cstr === 'transparent') {\r\n\t\t\talpha = 0\r\n\t\t\tspace = 'rgb'\r\n\t\t\tparts = [0,0,0]\r\n\t\t}\r\n\r\n\t\t//hex\r\n\t\telse if (/^#[A-Fa-f0-9]+$/.test(cstr)) {\r\n\t\t\tvar base = cstr.slice(1)\r\n\t\t\tvar size = base.length\r\n\t\t\tvar isShort = size <= 4\r\n\t\t\talpha = 1\r\n\r\n\t\t\tif (isShort) {\r\n\t\t\t\tparts = [\r\n\t\t\t\t\tparseInt(base[0] + base[0], 16),\r\n\t\t\t\t\tparseInt(base[1] + base[1], 16),\r\n\t\t\t\t\tparseInt(base[2] + base[2], 16)\r\n\t\t\t\t]\r\n\t\t\t\tif (size === 4) {\r\n\t\t\t\t\talpha = parseInt(base[3] + base[3], 16) / 255\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tparts = [\r\n\t\t\t\t\tparseInt(base[0] + base[1], 16),\r\n\t\t\t\t\tparseInt(base[2] + base[3], 16),\r\n\t\t\t\t\tparseInt(base[4] + base[5], 16)\r\n\t\t\t\t]\r\n\t\t\t\tif (size === 8) {\r\n\t\t\t\t\talpha = parseInt(base[6] + base[7], 16) / 255\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!parts[0]) parts[0] = 0\r\n\t\t\tif (!parts[1]) parts[1] = 0\r\n\t\t\tif (!parts[2]) parts[2] = 0\r\n\r\n\t\t\tspace = 'rgb'\r\n\t\t}\r\n\r\n\t\t//color space\r\n\t\telse if (m = /^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(cstr)) {\r\n\t\t\tvar name = m[1]\r\n\t\t\tvar base = name.replace(/a$/, '')\r\n\t\t\tspace = base\r\n\t\t\tvar size = base === 'cmyk' ? 4 : base === 'gray' ? 1 : 3\r\n\t\t\tparts = m[2].trim()\r\n\t\t\t\t.split(/\\s*,\\s*/)\r\n\t\t\t\t.map(function (x, i) {\r\n\t\t\t\t\t//<percentage>\r\n\t\t\t\t\tif (/%$/.test(x)) {\r\n\t\t\t\t\t\t//alpha\r\n\t\t\t\t\t\tif (i === size)\treturn parseFloat(x) / 100\r\n\t\t\t\t\t\t//rgb\r\n\t\t\t\t\t\tif (base === 'rgb') return parseFloat(x) * 255 / 100\r\n\t\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//hue\r\n\t\t\t\t\telse if (base[i] === 'h') {\r\n\t\t\t\t\t\t//<deg>\r\n\t\t\t\t\t\tif (/deg$/.test(x)) {\r\n\t\t\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//<base-hue>\r\n\t\t\t\t\t\telse if (baseHues[x] !== undefined) {\r\n\t\t\t\t\t\t\treturn baseHues[x]\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t})\r\n\r\n\t\t\tif (name === base) parts.push(1)\r\n\t\t\talpha = parts[size] === undefined ? 1 : parts[size]\r\n\t\t\tparts = parts.slice(0, size)\r\n\t\t}\r\n\r\n\t\t//named channels case\r\n\t\telse if (cstr.length > 10 && /[0-9](?:\\s|\\/)/.test(cstr)) {\r\n\t\t\tparts = cstr.match(/([0-9]+)/g).map(function (value) {\r\n\t\t\t\treturn parseFloat(value)\r\n\t\t\t})\r\n\r\n\t\t\tspace = cstr.match(/([a-z])/ig).join('').toLowerCase()\r\n\t\t}\r\n\t}\r\n\r\n\t//numeric case\r\n\telse if (!isNaN(cstr)) {\r\n\t\tspace = 'rgb'\r\n\t\tparts = [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff]\r\n\t}\r\n\r\n\t//object case - detects css cases of rgb and hsl\r\n\telse if (isObject(cstr)) {\r\n\t\tvar r = defined(cstr.r, cstr.red, cstr.R, null)\r\n\r\n\t\tif (r !== null) {\r\n\t\t\tspace = 'rgb'\r\n\t\t\tparts = [\r\n\t\t\t\tr,\r\n\t\t\t\tdefined(cstr.g, cstr.green, cstr.G),\r\n\t\t\t\tdefined(cstr.b, cstr.blue, cstr.B)\r\n\t\t\t]\r\n\t\t}\r\n\t\telse {\r\n\t\t\tspace = 'hsl'\r\n\t\t\tparts = [\r\n\t\t\t\tdefined(cstr.h, cstr.hue, cstr.H),\r\n\t\t\t\tdefined(cstr.s, cstr.saturation, cstr.S),\r\n\t\t\t\tdefined(cstr.l, cstr.lightness, cstr.L, cstr.b, cstr.brightness)\r\n\t\t\t]\r\n\t\t}\r\n\r\n\t\talpha = defined(cstr.a, cstr.alpha, cstr.opacity, 1)\r\n\r\n\t\tif (cstr.opacity != null) alpha /= 100\r\n\t}\r\n\r\n\t//array\r\n\telse if (Array.isArray(cstr) || global.ArrayBuffer && ArrayBuffer.isView && ArrayBuffer.isView(cstr)) {\r\n\t\tparts = [cstr[0], cstr[1], cstr[2]]\r\n\t\tspace = 'rgb'\r\n\t\talpha = cstr.length === 4 ? cstr[3] : 1\r\n\t}\r\n\r\n\treturn {\r\n\t\tspace: space,\r\n\t\tvalues: parts,\r\n\t\talpha: alpha\r\n\t}\r\n}\r\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"color-name\":112,\"defined\":158,\"is-plain-obj\":417}],115:[function(_dereq_,module,exports){\n/** @module  color-rgba */\r\n\r\n'use strict'\r\n\r\nvar parse = _dereq_('color-parse')\r\nvar hsl = _dereq_('color-space/hsl')\r\nvar clamp = _dereq_('clamp')\r\n\r\nmodule.exports = function rgba (color) {\r\n\tvar values, i, l\r\n\r\n\t//attempt to parse non-array arguments\r\n\tvar parsed = parse(color)\r\n\r\n\tif (!parsed.space) return []\r\n\r\n\tvalues = Array(3)\r\n\tvalues[0] = clamp(parsed.values[0], 0, 255)\r\n\tvalues[1] = clamp(parsed.values[1], 0, 255)\r\n\tvalues[2] = clamp(parsed.values[2], 0, 255)\r\n\r\n\tif (parsed.space[0] === 'h') {\r\n\t\tvalues = hsl.rgb(values)\r\n\t}\r\n\r\n\tvalues.push(clamp(parsed.alpha, 0, 1))\r\n\r\n\treturn values\r\n}\r\n\n},{\"clamp\":108,\"color-parse\":114,\"color-space/hsl\":116}],116:[function(_dereq_,module,exports){\n/**\n * @module color-space/hsl\n */\n'use strict'\n\nvar rgb = _dereq_('./rgb');\n\nmodule.exports = {\n\tname: 'hsl',\n\tmin: [0,0,0],\n\tmax: [360,100,100],\n\tchannel: ['hue', 'saturation', 'lightness'],\n\talias: ['HSL'],\n\n\trgb: function(hsl) {\n\t\tvar h = hsl[0] / 360,\n\t\t\t\ts = hsl[1] / 100,\n\t\t\t\tl = hsl[2] / 100,\n\t\t\t\tt1, t2, t3, rgb, val;\n\n\t\tif (s === 0) {\n\t\t\tval = l * 255;\n\t\t\treturn [val, val, val];\n\t\t}\n\n\t\tif (l < 0.5) {\n\t\t\tt2 = l * (1 + s);\n\t\t}\n\t\telse {\n\t\t\tt2 = l + s - l * s;\n\t\t}\n\t\tt1 = 2 * l - t2;\n\n\t\trgb = [0, 0, 0];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\tt3 = h + 1 / 3 * - (i - 1);\n\t\t\tif (t3 < 0) {\n\t\t\t\tt3++;\n\t\t\t}\n\t\t\telse if (t3 > 1) {\n\t\t\t\tt3--;\n\t\t\t}\n\n\t\t\tif (6 * t3 < 1) {\n\t\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t\t}\n\t\t\telse if (2 * t3 < 1) {\n\t\t\t\tval = t2;\n\t\t\t}\n\t\t\telse if (3 * t3 < 2) {\n\t\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tval = t1;\n\t\t\t}\n\n\t\t\trgb[i] = val * 255;\n\t\t}\n\n\t\treturn rgb;\n\t}\n};\n\n\n//extend rgb\nrgb.hsl = function(rgb) {\n\tvar r = rgb[0]/255,\n\t\t\tg = rgb[1]/255,\n\t\t\tb = rgb[2]/255,\n\t\t\tmin = Math.min(r, g, b),\n\t\t\tmax = Math.max(r, g, b),\n\t\t\tdelta = max - min,\n\t\t\th, s, l;\n\n\tif (max === min) {\n\t\th = 0;\n\t}\n\telse if (r === max) {\n\t\th = (g - b) / delta;\n\t}\n\telse if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t}\n\telse if (b === max) {\n\t\th = 4 + (r - g)/ delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t}\n\telse if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t}\n\telse {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\n},{\"./rgb\":117}],117:[function(_dereq_,module,exports){\n/**\n * RGB space.\n *\n * @module  color-space/rgb\n */\n'use strict'\n\nmodule.exports = {\n\tname: 'rgb',\n\tmin: [0,0,0],\n\tmax: [255,255,255],\n\tchannel: ['red', 'green', 'blue'],\n\talias: ['RGB']\n};\n\n},{}],118:[function(_dereq_,module,exports){\nmodule.exports={\n\t\"jet\":[{\"index\":0,\"rgb\":[0,0,131]},{\"index\":0.125,\"rgb\":[0,60,170]},{\"index\":0.375,\"rgb\":[5,255,255]},{\"index\":0.625,\"rgb\":[255,255,0]},{\"index\":0.875,\"rgb\":[250,0,0]},{\"index\":1,\"rgb\":[128,0,0]}],\n\n\t\"hsv\":[{\"index\":0,\"rgb\":[255,0,0]},{\"index\":0.169,\"rgb\":[253,255,2]},{\"index\":0.173,\"rgb\":[247,255,2]},{\"index\":0.337,\"rgb\":[0,252,4]},{\"index\":0.341,\"rgb\":[0,252,10]},{\"index\":0.506,\"rgb\":[1,249,255]},{\"index\":0.671,\"rgb\":[2,0,253]},{\"index\":0.675,\"rgb\":[8,0,253]},{\"index\":0.839,\"rgb\":[255,0,251]},{\"index\":0.843,\"rgb\":[255,0,245]},{\"index\":1,\"rgb\":[255,0,6]}],\n\n\t\"hot\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.3,\"rgb\":[230,0,0]},{\"index\":0.6,\"rgb\":[255,210,0]},{\"index\":1,\"rgb\":[255,255,255]}],\n\n\t\"cool\":[{\"index\":0,\"rgb\":[0,255,255]},{\"index\":1,\"rgb\":[255,0,255]}],\n\n\t\"spring\":[{\"index\":0,\"rgb\":[255,0,255]},{\"index\":1,\"rgb\":[255,255,0]}],\n\n\t\"summer\":[{\"index\":0,\"rgb\":[0,128,102]},{\"index\":1,\"rgb\":[255,255,102]}],\n\n\t\"autumn\":[{\"index\":0,\"rgb\":[255,0,0]},{\"index\":1,\"rgb\":[255,255,0]}],\n\n\t\"winter\":[{\"index\":0,\"rgb\":[0,0,255]},{\"index\":1,\"rgb\":[0,255,128]}],\n\n\t\"bone\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.376,\"rgb\":[84,84,116]},{\"index\":0.753,\"rgb\":[169,200,200]},{\"index\":1,\"rgb\":[255,255,255]}],\n\n\t\"copper\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.804,\"rgb\":[255,160,102]},{\"index\":1,\"rgb\":[255,199,127]}],\n\n\t\"greys\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":1,\"rgb\":[255,255,255]}],\n\n\t\"yignbu\":[{\"index\":0,\"rgb\":[8,29,88]},{\"index\":0.125,\"rgb\":[37,52,148]},{\"index\":0.25,\"rgb\":[34,94,168]},{\"index\":0.375,\"rgb\":[29,145,192]},{\"index\":0.5,\"rgb\":[65,182,196]},{\"index\":0.625,\"rgb\":[127,205,187]},{\"index\":0.75,\"rgb\":[199,233,180]},{\"index\":0.875,\"rgb\":[237,248,217]},{\"index\":1,\"rgb\":[255,255,217]}],\n\n\t\"greens\":[{\"index\":0,\"rgb\":[0,68,27]},{\"index\":0.125,\"rgb\":[0,109,44]},{\"index\":0.25,\"rgb\":[35,139,69]},{\"index\":0.375,\"rgb\":[65,171,93]},{\"index\":0.5,\"rgb\":[116,196,118]},{\"index\":0.625,\"rgb\":[161,217,155]},{\"index\":0.75,\"rgb\":[199,233,192]},{\"index\":0.875,\"rgb\":[229,245,224]},{\"index\":1,\"rgb\":[247,252,245]}],\n\n\t\"yiorrd\":[{\"index\":0,\"rgb\":[128,0,38]},{\"index\":0.125,\"rgb\":[189,0,38]},{\"index\":0.25,\"rgb\":[227,26,28]},{\"index\":0.375,\"rgb\":[252,78,42]},{\"index\":0.5,\"rgb\":[253,141,60]},{\"index\":0.625,\"rgb\":[254,178,76]},{\"index\":0.75,\"rgb\":[254,217,118]},{\"index\":0.875,\"rgb\":[255,237,160]},{\"index\":1,\"rgb\":[255,255,204]}],\n\n\t\"bluered\":[{\"index\":0,\"rgb\":[0,0,255]},{\"index\":1,\"rgb\":[255,0,0]}],\n\n\t\"rdbu\":[{\"index\":0,\"rgb\":[5,10,172]},{\"index\":0.35,\"rgb\":[106,137,247]},{\"index\":0.5,\"rgb\":[190,190,190]},{\"index\":0.6,\"rgb\":[220,170,132]},{\"index\":0.7,\"rgb\":[230,145,90]},{\"index\":1,\"rgb\":[178,10,28]}],\n\n\t\"picnic\":[{\"index\":0,\"rgb\":[0,0,255]},{\"index\":0.1,\"rgb\":[51,153,255]},{\"index\":0.2,\"rgb\":[102,204,255]},{\"index\":0.3,\"rgb\":[153,204,255]},{\"index\":0.4,\"rgb\":[204,204,255]},{\"index\":0.5,\"rgb\":[255,255,255]},{\"index\":0.6,\"rgb\":[255,204,255]},{\"index\":0.7,\"rgb\":[255,153,255]},{\"index\":0.8,\"rgb\":[255,102,204]},{\"index\":0.9,\"rgb\":[255,102,102]},{\"index\":1,\"rgb\":[255,0,0]}],\n\n\t\"rainbow\":[{\"index\":0,\"rgb\":[150,0,90]},{\"index\":0.125,\"rgb\":[0,0,200]},{\"index\":0.25,\"rgb\":[0,25,255]},{\"index\":0.375,\"rgb\":[0,152,255]},{\"index\":0.5,\"rgb\":[44,255,150]},{\"index\":0.625,\"rgb\":[151,255,0]},{\"index\":0.75,\"rgb\":[255,234,0]},{\"index\":0.875,\"rgb\":[255,111,0]},{\"index\":1,\"rgb\":[255,0,0]}],\n\n\t\"portland\":[{\"index\":0,\"rgb\":[12,51,131]},{\"index\":0.25,\"rgb\":[10,136,186]},{\"index\":0.5,\"rgb\":[242,211,56]},{\"index\":0.75,\"rgb\":[242,143,56]},{\"index\":1,\"rgb\":[217,30,30]}],\n\n\t\"blackbody\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.2,\"rgb\":[230,0,0]},{\"index\":0.4,\"rgb\":[230,210,0]},{\"index\":0.7,\"rgb\":[255,255,255]},{\"index\":1,\"rgb\":[160,200,255]}],\n\n\t\"earth\":[{\"index\":0,\"rgb\":[0,0,130]},{\"index\":0.1,\"rgb\":[0,180,180]},{\"index\":0.2,\"rgb\":[40,210,40]},{\"index\":0.4,\"rgb\":[230,230,50]},{\"index\":0.6,\"rgb\":[120,70,20]},{\"index\":1,\"rgb\":[255,255,255]}],\n\n\t\"electric\":[{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.15,\"rgb\":[30,0,100]},{\"index\":0.4,\"rgb\":[120,0,100]},{\"index\":0.6,\"rgb\":[160,90,0]},{\"index\":0.8,\"rgb\":[230,200,0]},{\"index\":1,\"rgb\":[255,250,220]}],\n\n\t\"alpha\": [{\"index\":0, \"rgb\": [255,255,255,0]},{\"index\":1, \"rgb\": [255,255,255,1]}],\n\n\t\"viridis\": [{\"index\":0,\"rgb\":[68,1,84]},{\"index\":0.13,\"rgb\":[71,44,122]},{\"index\":0.25,\"rgb\":[59,81,139]},{\"index\":0.38,\"rgb\":[44,113,142]},{\"index\":0.5,\"rgb\":[33,144,141]},{\"index\":0.63,\"rgb\":[39,173,129]},{\"index\":0.75,\"rgb\":[92,200,99]},{\"index\":0.88,\"rgb\":[170,220,50]},{\"index\":1,\"rgb\":[253,231,37]}],\n\n\t\"inferno\": [{\"index\":0,\"rgb\":[0,0,4]},{\"index\":0.13,\"rgb\":[31,12,72]},{\"index\":0.25,\"rgb\":[85,15,109]},{\"index\":0.38,\"rgb\":[136,34,106]},{\"index\":0.5,\"rgb\":[186,54,85]},{\"index\":0.63,\"rgb\":[227,89,51]},{\"index\":0.75,\"rgb\":[249,140,10]},{\"index\":0.88,\"rgb\":[249,201,50]},{\"index\":1,\"rgb\":[252,255,164]}],\n\n\t\"magma\": [{\"index\":0,\"rgb\":[0,0,4]},{\"index\":0.13,\"rgb\":[28,16,68]},{\"index\":0.25,\"rgb\":[79,18,123]},{\"index\":0.38,\"rgb\":[129,37,129]},{\"index\":0.5,\"rgb\":[181,54,122]},{\"index\":0.63,\"rgb\":[229,80,100]},{\"index\":0.75,\"rgb\":[251,135,97]},{\"index\":0.88,\"rgb\":[254,194,135]},{\"index\":1,\"rgb\":[252,253,191]}],\n\n\t\"plasma\": [{\"index\":0,\"rgb\":[13,8,135]},{\"index\":0.13,\"rgb\":[75,3,161]},{\"index\":0.25,\"rgb\":[125,3,168]},{\"index\":0.38,\"rgb\":[168,34,150]},{\"index\":0.5,\"rgb\":[203,70,121]},{\"index\":0.63,\"rgb\":[229,107,93]},{\"index\":0.75,\"rgb\":[248,148,65]},{\"index\":0.88,\"rgb\":[253,195,40]},{\"index\":1,\"rgb\":[240,249,33]}],\n\n\t\"warm\": [{\"index\":0,\"rgb\":[125,0,179]},{\"index\":0.13,\"rgb\":[172,0,187]},{\"index\":0.25,\"rgb\":[219,0,170]},{\"index\":0.38,\"rgb\":[255,0,130]},{\"index\":0.5,\"rgb\":[255,63,74]},{\"index\":0.63,\"rgb\":[255,123,0]},{\"index\":0.75,\"rgb\":[234,176,0]},{\"index\":0.88,\"rgb\":[190,228,0]},{\"index\":1,\"rgb\":[147,255,0]}],\n\n\t\"cool\": [{\"index\":0,\"rgb\":[125,0,179]},{\"index\":0.13,\"rgb\":[116,0,218]},{\"index\":0.25,\"rgb\":[98,74,237]},{\"index\":0.38,\"rgb\":[68,146,231]},{\"index\":0.5,\"rgb\":[0,204,197]},{\"index\":0.63,\"rgb\":[0,247,146]},{\"index\":0.75,\"rgb\":[0,255,88]},{\"index\":0.88,\"rgb\":[40,255,8]},{\"index\":1,\"rgb\":[147,255,0]}],\n\n\t\"rainbow-soft\": [{\"index\":0,\"rgb\":[125,0,179]},{\"index\":0.1,\"rgb\":[199,0,180]},{\"index\":0.2,\"rgb\":[255,0,121]},{\"index\":0.3,\"rgb\":[255,108,0]},{\"index\":0.4,\"rgb\":[222,194,0]},{\"index\":0.5,\"rgb\":[150,255,0]},{\"index\":0.6,\"rgb\":[0,255,55]},{\"index\":0.7,\"rgb\":[0,246,150]},{\"index\":0.8,\"rgb\":[50,167,222]},{\"index\":0.9,\"rgb\":[103,51,235]},{\"index\":1,\"rgb\":[124,0,186]}],\n\n\t\"bathymetry\": [{\"index\":0,\"rgb\":[40,26,44]},{\"index\":0.13,\"rgb\":[59,49,90]},{\"index\":0.25,\"rgb\":[64,76,139]},{\"index\":0.38,\"rgb\":[63,110,151]},{\"index\":0.5,\"rgb\":[72,142,158]},{\"index\":0.63,\"rgb\":[85,174,163]},{\"index\":0.75,\"rgb\":[120,206,163]},{\"index\":0.88,\"rgb\":[187,230,172]},{\"index\":1,\"rgb\":[253,254,204]}],\n\n\t\"cdom\": [{\"index\":0,\"rgb\":[47,15,62]},{\"index\":0.13,\"rgb\":[87,23,86]},{\"index\":0.25,\"rgb\":[130,28,99]},{\"index\":0.38,\"rgb\":[171,41,96]},{\"index\":0.5,\"rgb\":[206,67,86]},{\"index\":0.63,\"rgb\":[230,106,84]},{\"index\":0.75,\"rgb\":[242,149,103]},{\"index\":0.88,\"rgb\":[249,193,135]},{\"index\":1,\"rgb\":[254,237,176]}],\n\n\t\"chlorophyll\": [{\"index\":0,\"rgb\":[18,36,20]},{\"index\":0.13,\"rgb\":[25,63,41]},{\"index\":0.25,\"rgb\":[24,91,59]},{\"index\":0.38,\"rgb\":[13,119,72]},{\"index\":0.5,\"rgb\":[18,148,80]},{\"index\":0.63,\"rgb\":[80,173,89]},{\"index\":0.75,\"rgb\":[132,196,122]},{\"index\":0.88,\"rgb\":[175,221,162]},{\"index\":1,\"rgb\":[215,249,208]}],\n\n\t\"density\": [{\"index\":0,\"rgb\":[54,14,36]},{\"index\":0.13,\"rgb\":[89,23,80]},{\"index\":0.25,\"rgb\":[110,45,132]},{\"index\":0.38,\"rgb\":[120,77,178]},{\"index\":0.5,\"rgb\":[120,113,213]},{\"index\":0.63,\"rgb\":[115,151,228]},{\"index\":0.75,\"rgb\":[134,185,227]},{\"index\":0.88,\"rgb\":[177,214,227]},{\"index\":1,\"rgb\":[230,241,241]}],\n\n\t\"freesurface-blue\": [{\"index\":0,\"rgb\":[30,4,110]},{\"index\":0.13,\"rgb\":[47,14,176]},{\"index\":0.25,\"rgb\":[41,45,236]},{\"index\":0.38,\"rgb\":[25,99,212]},{\"index\":0.5,\"rgb\":[68,131,200]},{\"index\":0.63,\"rgb\":[114,156,197]},{\"index\":0.75,\"rgb\":[157,181,203]},{\"index\":0.88,\"rgb\":[200,208,216]},{\"index\":1,\"rgb\":[241,237,236]}],\n\n\t\"freesurface-red\": [{\"index\":0,\"rgb\":[60,9,18]},{\"index\":0.13,\"rgb\":[100,17,27]},{\"index\":0.25,\"rgb\":[142,20,29]},{\"index\":0.38,\"rgb\":[177,43,27]},{\"index\":0.5,\"rgb\":[192,87,63]},{\"index\":0.63,\"rgb\":[205,125,105]},{\"index\":0.75,\"rgb\":[216,162,148]},{\"index\":0.88,\"rgb\":[227,199,193]},{\"index\":1,\"rgb\":[241,237,236]}],\n\n\t\"oxygen\": [{\"index\":0,\"rgb\":[64,5,5]},{\"index\":0.13,\"rgb\":[106,6,15]},{\"index\":0.25,\"rgb\":[144,26,7]},{\"index\":0.38,\"rgb\":[168,64,3]},{\"index\":0.5,\"rgb\":[188,100,4]},{\"index\":0.63,\"rgb\":[206,136,11]},{\"index\":0.75,\"rgb\":[220,174,25]},{\"index\":0.88,\"rgb\":[231,215,44]},{\"index\":1,\"rgb\":[248,254,105]}],\n\n\t\"par\": [{\"index\":0,\"rgb\":[51,20,24]},{\"index\":0.13,\"rgb\":[90,32,35]},{\"index\":0.25,\"rgb\":[129,44,34]},{\"index\":0.38,\"rgb\":[159,68,25]},{\"index\":0.5,\"rgb\":[182,99,19]},{\"index\":0.63,\"rgb\":[199,134,22]},{\"index\":0.75,\"rgb\":[212,171,35]},{\"index\":0.88,\"rgb\":[221,210,54]},{\"index\":1,\"rgb\":[225,253,75]}],\n\n\t\"phase\": [{\"index\":0,\"rgb\":[145,105,18]},{\"index\":0.13,\"rgb\":[184,71,38]},{\"index\":0.25,\"rgb\":[186,58,115]},{\"index\":0.38,\"rgb\":[160,71,185]},{\"index\":0.5,\"rgb\":[110,97,218]},{\"index\":0.63,\"rgb\":[50,123,164]},{\"index\":0.75,\"rgb\":[31,131,110]},{\"index\":0.88,\"rgb\":[77,129,34]},{\"index\":1,\"rgb\":[145,105,18]}],\n\n\t\"salinity\": [{\"index\":0,\"rgb\":[42,24,108]},{\"index\":0.13,\"rgb\":[33,50,162]},{\"index\":0.25,\"rgb\":[15,90,145]},{\"index\":0.38,\"rgb\":[40,118,137]},{\"index\":0.5,\"rgb\":[59,146,135]},{\"index\":0.63,\"rgb\":[79,175,126]},{\"index\":0.75,\"rgb\":[120,203,104]},{\"index\":0.88,\"rgb\":[193,221,100]},{\"index\":1,\"rgb\":[253,239,154]}],\n\n\t\"temperature\": [{\"index\":0,\"rgb\":[4,35,51]},{\"index\":0.13,\"rgb\":[23,51,122]},{\"index\":0.25,\"rgb\":[85,59,157]},{\"index\":0.38,\"rgb\":[129,79,143]},{\"index\":0.5,\"rgb\":[175,95,130]},{\"index\":0.63,\"rgb\":[222,112,101]},{\"index\":0.75,\"rgb\":[249,146,66]},{\"index\":0.88,\"rgb\":[249,196,65]},{\"index\":1,\"rgb\":[232,250,91]}],\n\n\t\"turbidity\": [{\"index\":0,\"rgb\":[34,31,27]},{\"index\":0.13,\"rgb\":[65,50,41]},{\"index\":0.25,\"rgb\":[98,69,52]},{\"index\":0.38,\"rgb\":[131,89,57]},{\"index\":0.5,\"rgb\":[161,112,59]},{\"index\":0.63,\"rgb\":[185,140,66]},{\"index\":0.75,\"rgb\":[202,174,88]},{\"index\":0.88,\"rgb\":[216,209,126]},{\"index\":1,\"rgb\":[233,246,171]}],\n\n\t\"velocity-blue\": [{\"index\":0,\"rgb\":[17,32,64]},{\"index\":0.13,\"rgb\":[35,52,116]},{\"index\":0.25,\"rgb\":[29,81,156]},{\"index\":0.38,\"rgb\":[31,113,162]},{\"index\":0.5,\"rgb\":[50,144,169]},{\"index\":0.63,\"rgb\":[87,173,176]},{\"index\":0.75,\"rgb\":[149,196,189]},{\"index\":0.88,\"rgb\":[203,221,211]},{\"index\":1,\"rgb\":[254,251,230]}],\n\n\t\"velocity-green\": [{\"index\":0,\"rgb\":[23,35,19]},{\"index\":0.13,\"rgb\":[24,64,38]},{\"index\":0.25,\"rgb\":[11,95,45]},{\"index\":0.38,\"rgb\":[39,123,35]},{\"index\":0.5,\"rgb\":[95,146,12]},{\"index\":0.63,\"rgb\":[152,165,18]},{\"index\":0.75,\"rgb\":[201,186,69]},{\"index\":0.88,\"rgb\":[233,216,137]},{\"index\":1,\"rgb\":[255,253,205]}],\n\n\t\"cubehelix\": [{\"index\":0,\"rgb\":[0,0,0]},{\"index\":0.07,\"rgb\":[22,5,59]},{\"index\":0.13,\"rgb\":[60,4,105]},{\"index\":0.2,\"rgb\":[109,1,135]},{\"index\":0.27,\"rgb\":[161,0,147]},{\"index\":0.33,\"rgb\":[210,2,142]},{\"index\":0.4,\"rgb\":[251,11,123]},{\"index\":0.47,\"rgb\":[255,29,97]},{\"index\":0.53,\"rgb\":[255,54,69]},{\"index\":0.6,\"rgb\":[255,85,46]},{\"index\":0.67,\"rgb\":[255,120,34]},{\"index\":0.73,\"rgb\":[255,157,37]},{\"index\":0.8,\"rgb\":[241,191,57]},{\"index\":0.87,\"rgb\":[224,220,93]},{\"index\":0.93,\"rgb\":[218,241,142]},{\"index\":1,\"rgb\":[227,253,198]}]\n};\n\n},{}],119:[function(_dereq_,module,exports){\n/*\n * Ben Postlethwaite\n * January 2013\n * License MIT\n */\n'use strict';\n\nvar colorScale = _dereq_('./colorScale');\nvar lerp = _dereq_('lerp')\n\nmodule.exports = createColormap;\n\nfunction createColormap (spec) {\n    /*\n     * Default Options\n     */\n    var indicies, fromrgba, torgba,\n        nsteps, cmap, colormap, format,\n        nshades, colors, alpha, i;\n\n    if ( !spec ) spec = {};\n\n    nshades = (spec.nshades || 72) - 1;\n    format = spec.format || 'hex';\n\n    colormap = spec.colormap;\n    if (!colormap) colormap = 'jet';\n\n    if (typeof colormap === 'string') {\n        colormap = colormap.toLowerCase();\n\n        if (!colorScale[colormap]) {\n            throw Error(colormap + ' not a supported colorscale');\n        }\n\n        cmap = colorScale[colormap];\n\n    } else if (Array.isArray(colormap)) {\n        cmap = colormap.slice();\n\n    } else {\n        throw Error('unsupported colormap option', colormap);\n    }\n\n    if (cmap.length > nshades + 1) {\n        throw new Error(\n            colormap+' map requires nshades to be at least size '+cmap.length\n        );\n    }\n\n    if (!Array.isArray(spec.alpha)) {\n\n        if (typeof spec.alpha === 'number') {\n            alpha = [spec.alpha, spec.alpha];\n\n        } else {\n            alpha = [1, 1];\n        }\n\n    } else if (spec.alpha.length !== 2) {\n        alpha = [1, 1];\n\n    } else {\n        alpha = spec.alpha.slice();\n    }\n\n    // map index points from 0..1 to 0..n-1\n    indicies = cmap.map(function(c) {\n        return Math.round(c.index * nshades);\n    });\n\n    // Add alpha channel to the map\n    alpha[0] = Math.min(Math.max(alpha[0], 0), 1);\n    alpha[1] = Math.min(Math.max(alpha[1], 0), 1);\n\n    var steps = cmap.map(function(c, i) {\n        var index = cmap[i].index\n\n        var rgba = cmap[i].rgb.slice();\n\n        // if user supplies their own map use it\n        if (rgba.length === 4 && rgba[3] >= 0 && rgba[3] <= 1) {\n            return rgba\n        }\n        rgba[3] = alpha[0] + (alpha[1] - alpha[0])*index;\n\n        return rgba\n    })\n\n\n    /*\n     * map increasing linear values between indicies to\n     * linear steps in colorvalues\n     */\n    var colors = []\n    for (i = 0; i < indicies.length-1; ++i) {\n        nsteps = indicies[i+1] - indicies[i];\n        fromrgba = steps[i];\n        torgba = steps[i+1];\n\n        for (var j = 0; j < nsteps; j++) {\n            var amt = j / nsteps\n            colors.push([\n                Math.round(lerp(fromrgba[0], torgba[0], amt)),\n                Math.round(lerp(fromrgba[1], torgba[1], amt)),\n                Math.round(lerp(fromrgba[2], torgba[2], amt)),\n                lerp(fromrgba[3], torgba[3], amt)\n            ])\n        }\n    }\n\n    //add 1 step as last value\n    colors.push(cmap[cmap.length - 1].rgb.concat(alpha[1]))\n\n    if (format === 'hex') colors = colors.map( rgb2hex );\n    else if (format === 'rgbaString') colors = colors.map( rgbaStr );\n    else if (format === 'float') colors = colors.map( rgb2float );\n\n    return colors;\n};\n\nfunction rgb2float (rgba) {\n    return [\n        rgba[0] / 255,\n        rgba[1] / 255,\n        rgba[2] / 255,\n        rgba[3]\n    ]\n}\n\nfunction rgb2hex (rgba) {\n    var dig, hex = '#';\n    for (var i = 0; i < 3; ++i) {\n        dig = rgba[i];\n        dig = dig.toString(16);\n        hex += ('00' + dig).substr( dig.length );\n    }\n    return hex;\n}\n\nfunction rgbaStr (rgba) {\n    return 'rgba(' + rgba.join(',') + ')';\n}\n\n},{\"./colorScale\":118,\"lerp\":420}],120:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = compareAngle\n\nvar orient = _dereq_(\"robust-orientation\")\nvar sgn = _dereq_(\"signum\")\nvar twoSum = _dereq_(\"two-sum\")\nvar robustProduct = _dereq_(\"robust-product\")\nvar robustSum = _dereq_(\"robust-sum\")\n\nfunction testInterior(a, b, c) {\n  var x0 = twoSum(a[0], -b[0])\n  var y0 = twoSum(a[1], -b[1])\n  var x1 = twoSum(c[0], -b[0])\n  var y1 = twoSum(c[1], -b[1])\n\n  var d = robustSum(\n    robustProduct(x0, x1),\n    robustProduct(y0, y1))\n\n  return d[d.length-1] >= 0\n}\n\nfunction compareAngle(a, b, c, d) {\n  var bcd = orient(b, c, d)\n  if(bcd === 0) {\n    //Handle degenerate cases\n    var sabc = sgn(orient(a, b, c))\n    var sabd = sgn(orient(a, b, d))\n    if(sabc === sabd) {\n      if(sabc === 0) {\n        var ic = testInterior(a, b, c)\n        var id = testInterior(a, b, d)\n        if(ic === id) {\n          return 0\n        } else if(ic) {\n          return 1\n        } else {\n          return -1\n        }\n      }\n      return 0\n    } else if(sabd === 0) {\n      if(sabc > 0) {\n        return -1\n      } else if(testInterior(a, b, d)) {\n        return -1\n      } else {\n        return 1\n      }\n    } else if(sabc === 0) {\n      if(sabd > 0) {\n        return 1\n      } else if(testInterior(a, b, c)) {\n        return 1\n      } else {\n        return -1\n      }\n    }\n    return sgn(sabd - sabc)\n  }\n  var abc = orient(a, b, c)\n  if(abc > 0) {\n    if(bcd > 0 && orient(a, b, d) > 0) {\n      return 1\n    }\n    return -1\n  } else if(abc < 0) {\n    if(bcd > 0 || orient(a, b, d) > 0) {\n      return 1\n    }\n    return -1\n  } else {\n    var abd = orient(a, b, d)\n    if(abd > 0) {\n      return 1\n    } else {\n      if(testInterior(a, b, c)) {\n        return 1\n      } else {\n        return -1\n      }\n    }\n  }\n}\n},{\"robust-orientation\":497,\"robust-product\":498,\"robust-sum\":502,\"signum\":503,\"two-sum\":531}],121:[function(_dereq_,module,exports){\nmodule.exports = compareCells\n\nvar min = Math.min\n\nfunction compareInt(a, b) {\n  return a - b\n}\n\nfunction compareCells(a, b) {\n  var n = a.length\n    , t = a.length - b.length\n  if(t) {\n    return t\n  }\n  switch(n) {\n    case 0:\n      return 0\n    case 1:\n      return a[0] - b[0]\n    case 2:\n      return (a[0]+a[1]-b[0]-b[1]) ||\n             min(a[0],a[1]) - min(b[0],b[1])\n    case 3:\n      var l1 = a[0]+a[1]\n        , m1 = b[0]+b[1]\n      t = l1+a[2] - (m1+b[2])\n      if(t) {\n        return t\n      }\n      var l0 = min(a[0], a[1])\n        , m0 = min(b[0], b[1])\n      return min(l0, a[2]) - min(m0, b[2]) ||\n             min(l0+a[2], l1) - min(m0+b[2], m1)\n    case 4:\n      var aw=a[0], ax=a[1], ay=a[2], az=a[3]\n        , bw=b[0], bx=b[1], by=b[2], bz=b[3]\n      return (aw+ax+ay+az)-(bw+bx+by+bz) ||\n             min(aw,ax,ay,az)-min(bw,bx,by,bz,bw) ||\n             min(aw+ax,aw+ay,aw+az,ax+ay,ax+az,ay+az) -\n               min(bw+bx,bw+by,bw+bz,bx+by,bx+bz,by+bz) ||\n             min(aw+ax+ay,aw+ax+az,aw+ay+az,ax+ay+az) -\n               min(bw+bx+by,bw+bx+bz,bw+by+bz,bx+by+bz)\n    default:\n      var as = a.slice().sort(compareInt)\n      var bs = b.slice().sort(compareInt)\n      for(var i=0; i<n; ++i) {\n        t = as[i] - bs[i]\n        if(t) {\n          return t\n        }\n      }\n      return 0\n  }\n}\n\n},{}],122:[function(_dereq_,module,exports){\n'use strict'\n\nvar compareCells = _dereq_('compare-cell')\nvar parity = _dereq_('cell-orientation')\n\nmodule.exports = compareOrientedCells\n\nfunction compareOrientedCells(a, b) {\n  return compareCells(a, b) || parity(a) - parity(b)\n}\n\n},{\"cell-orientation\":105,\"compare-cell\":121}],123:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar convexHull1d = _dereq_('./lib/ch1d')\nvar convexHull2d = _dereq_('./lib/ch2d')\nvar convexHullnd = _dereq_('./lib/chnd')\n\nmodule.exports = convexHull\n\nfunction convexHull(points) {\n  var n = points.length\n  if(n === 0) {\n    return []\n  } else if(n === 1) {\n    return [[0]]\n  }\n  var d = points[0].length\n  if(d === 0) {\n    return []\n  } else if(d === 1) {\n    return convexHull1d(points)\n  } else if(d === 2) {\n    return convexHull2d(points)\n  }\n  return convexHullnd(points, d)\n}\n},{\"./lib/ch1d\":124,\"./lib/ch2d\":125,\"./lib/chnd\":126}],124:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = convexHull1d\n\nfunction convexHull1d(points) {\n  var lo = 0\n  var hi = 0\n  for(var i=1; i<points.length; ++i) {\n    if(points[i][0] < points[lo][0]) {\n      lo = i\n    }\n    if(points[i][0] > points[hi][0]) {\n      hi = i\n    }\n  }\n  if(lo < hi) {\n    return [[lo], [hi]]\n  } else if(lo > hi) {\n    return [[hi], [lo]]\n  } else {\n    return [[lo]]\n  }\n}\n},{}],125:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = convexHull2D\n\nvar monotoneHull = _dereq_('monotone-convex-hull-2d')\n\nfunction convexHull2D(points) {\n  var hull = monotoneHull(points)\n  var h = hull.length\n  if(h <= 2) {\n    return []\n  }\n  var edges = new Array(h)\n  var a = hull[h-1]\n  for(var i=0; i<h; ++i) {\n    var b = hull[i]\n    edges[i] = [a,b]\n    a = b\n  }\n  return edges\n}\n\n},{\"monotone-convex-hull-2d\":429}],126:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = convexHullnD\n\nvar ich = _dereq_('incremental-convex-hull')\nvar aff = _dereq_('affine-hull')\n\nfunction permute(points, front) {\n  var n = points.length\n  var npoints = new Array(n)\n  for(var i=0; i<front.length; ++i) {\n    npoints[i] = points[front[i]]\n  }\n  var ptr = front.length\n  for(var i=0; i<n; ++i) {\n    if(front.indexOf(i) < 0) {\n      npoints[ptr++] = points[i]\n    }\n  }\n  return npoints\n}\n\nfunction invPermute(cells, front) {\n  var nc = cells.length\n  var nf = front.length\n  for(var i=0; i<nc; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      var x = c[j]\n      if(x < nf) {\n        c[j] = front[x]\n      } else {\n        x = x - nf\n        for(var k=0; k<nf; ++k) {\n          if(x >= front[k]) {\n            x += 1\n          }\n        }\n        c[j] = x\n      }\n    }\n  }\n  return cells\n}\n\nfunction convexHullnD(points, d) {\n  try {\n    return ich(points, true)\n  } catch(e) {\n    //If point set is degenerate, try to find a basis and rerun it\n    var ah = aff(points)\n    if(ah.length <= d) {\n      //No basis, no try\n      return []\n    }\n    var npoints = permute(points, ah)\n    var nhull   = ich(npoints, true)\n    return invPermute(nhull, ah)\n  }\n}\n},{\"affine-hull\":55,\"incremental-convex-hull\":408}],127:[function(_dereq_,module,exports){\nmodule.exports = {\n  AFG: 'afghan',\n  ALA: '\\\\b\\\\wland',\n  ALB: 'albania',\n  DZA: 'algeria',\n  ASM: '^(?=.*americ).*samoa',\n  AND: 'andorra',\n  AGO: 'angola',\n  AIA: 'anguill?a',\n  ATA: 'antarctica',\n  ATG: 'antigua',\n  ARG: 'argentin',\n  ARM: 'armenia',\n  ABW: '^(?!.*bonaire).*\\\\baruba',\n  AUS: 'australia',\n  AUT: '^(?!.*hungary).*austria|\\\\baustri.*\\\\bemp',\n  AZE: 'azerbaijan',\n  BHS: 'bahamas',\n  BHR: 'bahrain',\n  BGD: 'bangladesh|^(?=.*east).*paki?stan',\n  BRB: 'barbados',\n  BLR: 'belarus|byelo',\n  BEL: '^(?!.*luxem).*belgium',\n  BLZ: 'belize|^(?=.*british).*honduras',\n  BEN: 'benin|dahome',\n  BMU: 'bermuda',\n  BTN: 'bhutan',\n  BOL: 'bolivia',\n  BES: '^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\bbes.?islands',\n  BIH: 'herzegovina|bosnia',\n  BWA: 'botswana|bechuana',\n  BVT: 'bouvet',\n  BRA: 'brazil',\n  IOT: 'british.?indian.?ocean',\n  BRN: 'brunei',\n  BGR: 'bulgaria',\n  BFA: 'burkina|\\\\bfaso|upper.?volta',\n  BDI: 'burundi',\n  CPV: 'verde',\n  KHM: 'cambodia|kampuchea|khmer',\n  CMR: 'cameroon',\n  CAN: 'canada',\n  CYM: 'cayman',\n  CAF: '\\\\bcentral.african.republic',\n  TCD: '\\\\bchad',\n  CHL: '\\\\bchile',\n  CHN: '^(?!.*\\\\bmac)(?!.*\\\\bhong)(?!.*\\\\btai)(?!.*\\\\brep).*china|^(?=.*peo)(?=.*rep).*china',\n  CXR: 'christmas',\n  CCK: '\\\\bcocos|keeling',\n  COL: 'colombia',\n  COM: 'comoro',\n  COG: '^(?!.*\\\\bdem)(?!.*\\\\bd[\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\bcongo',\n  COK: '\\\\bcook',\n  CRI: 'costa.?rica',\n  CIV: 'ivoire|ivory',\n  HRV: 'croatia',\n  CUB: '\\\\bcuba',\n  CUW: '^(?!.*bonaire).*\\\\bcura(c|ç)ao',\n  CYP: 'cyprus',\n  CSK: 'czechoslovakia',\n  CZE: '^(?=.*rep).*czech|czechia|bohemia',\n  COD: '\\\\bdem.*congo|congo.*\\\\bdem|congo.*\\\\bd[\\\\.]?r|\\\\bd[\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc',\n  DNK: 'denmark',\n  DJI: 'djibouti',\n  DMA: 'dominica(?!n)',\n  DOM: 'dominican.rep',\n  ECU: 'ecuador',\n  EGY: 'egypt',\n  SLV: 'el.?salvador',\n  GNQ: 'guine.*eq|eq.*guine|^(?=.*span).*guinea',\n  ERI: 'eritrea',\n  EST: 'estonia',\n  ETH: 'ethiopia|abyssinia',\n  FLK: 'falkland|malvinas',\n  FRO: 'faroe|faeroe',\n  FJI: 'fiji',\n  FIN: 'finland',\n  FRA: '^(?!.*\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\bgaul',\n  GUF: '^(?=.*french).*guiana',\n  PYF: 'french.?polynesia|tahiti',\n  ATF: 'french.?southern',\n  GAB: 'gabon',\n  GMB: 'gambia',\n  GEO: '^(?!.*south).*georgia',\n  DDR: 'german.?democratic.?republic|democratic.?republic.*germany|east.germany',\n  DEU: '^(?!.*east).*germany|^(?=.*\\\\bfed.*\\\\brep).*german',\n  GHA: 'ghana|gold.?coast',\n  GIB: 'gibraltar',\n  GRC: 'greece|hellenic|hellas',\n  GRL: 'greenland',\n  GRD: 'grenada',\n  GLP: 'guadeloupe',\n  GUM: '\\\\bguam',\n  GTM: 'guatemala',\n  GGY: 'guernsey',\n  GIN: '^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea',\n  GNB: 'bissau|^(?=.*portu).*guinea',\n  GUY: 'guyana|british.?guiana',\n  HTI: 'haiti',\n  HMD: 'heard.*mcdonald',\n  VAT: 'holy.?see|vatican|papal.?st',\n  HND: '^(?!.*brit).*honduras',\n  HKG: 'hong.?kong',\n  HUN: '^(?!.*austr).*hungary',\n  ISL: 'iceland',\n  IND: 'india(?!.*ocea)',\n  IDN: 'indonesia',\n  IRN: '\\\\biran|persia',\n  IRQ: '\\\\biraq|mesopotamia',\n  IRL: '(^ireland)|(^republic.*ireland)',\n  IMN: '^(?=.*isle).*\\\\bman',\n  ISR: 'israel',\n  ITA: 'italy',\n  JAM: 'jamaica',\n  JPN: 'japan',\n  JEY: 'jersey',\n  JOR: 'jordan',\n  KAZ: 'kazak',\n  KEN: 'kenya|british.?east.?africa|east.?africa.?prot',\n  KIR: 'kiribati',\n  PRK: '^(?=.*democrat|people|north|d.*p.*.r).*\\\\bkorea|dprk|korea.*(d.*p.*r)',\n  KWT: 'kuwait',\n  KGZ: 'kyrgyz|kirghiz',\n  LAO: '\\\\blaos?\\\\b',\n  LVA: 'latvia',\n  LBN: 'lebanon',\n  LSO: 'lesotho|basuto',\n  LBR: 'liberia',\n  LBY: 'libya',\n  LIE: 'liechtenstein',\n  LTU: 'lithuania',\n  LUX: '^(?!.*belg).*luxem',\n  MAC: 'maca(o|u)',\n  MDG: 'madagascar|malagasy',\n  MWI: 'malawi|nyasa',\n  MYS: 'malaysia',\n  MDV: 'maldive',\n  MLI: '\\\\bmali\\\\b',\n  MLT: '\\\\bmalta',\n  MHL: 'marshall',\n  MTQ: 'martinique',\n  MRT: 'mauritania',\n  MUS: 'mauritius',\n  MYT: '\\\\bmayotte',\n  MEX: '\\\\bmexic',\n  FSM: 'fed.*micronesia|micronesia.*fed',\n  MCO: 'monaco',\n  MNG: 'mongolia',\n  MNE: '^(?!.*serbia).*montenegro',\n  MSR: 'montserrat',\n  MAR: 'morocco|\\\\bmaroc',\n  MOZ: 'mozambique',\n  MMR: 'myanmar|burma',\n  NAM: 'namibia',\n  NRU: 'nauru',\n  NPL: 'nepal',\n  NLD: '^(?!.*\\\\bant)(?!.*\\\\bcarib).*netherlands',\n  ANT: '^(?=.*\\\\bant).*(nether|dutch)',\n  NCL: 'new.?caledonia',\n  NZL: 'new.?zealand',\n  NIC: 'nicaragua',\n  NER: '\\\\bniger(?!ia)',\n  NGA: 'nigeria',\n  NIU: 'niue',\n  NFK: 'norfolk',\n  MNP: 'mariana',\n  NOR: 'norway',\n  OMN: '\\\\boman|trucial',\n  PAK: '^(?!.*east).*paki?stan',\n  PLW: 'palau',\n  PSE: 'palestin|\\\\bgaza|west.?bank',\n  PAN: 'panama',\n  PNG: 'papua|new.?guinea',\n  PRY: 'paraguay',\n  PER: 'peru',\n  PHL: 'philippines',\n  PCN: 'pitcairn',\n  POL: 'poland',\n  PRT: 'portugal',\n  PRI: 'puerto.?rico',\n  QAT: 'qatar',\n  KOR: '^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\bkorea(?!.*d.*p.*r)',\n  MDA: 'moldov|b(a|e)ssarabia',\n  REU: 'r(e|é)union',\n  ROU: 'r(o|u|ou)mania',\n  RUS: '\\\\brussia|soviet.?union|u\\\\.?s\\\\.?s\\\\.?r|socialist.?republics',\n  RWA: 'rwanda',\n  BLM: 'barth(e|é)lemy',\n  SHN: 'helena',\n  KNA: 'kitts|\\\\bnevis',\n  LCA: '\\\\blucia',\n  MAF: '^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)',\n  SPM: 'miquelon',\n  VCT: 'vincent',\n  WSM: '^(?!.*amer).*samoa',\n  SMR: 'san.?marino',\n  STP: '\\\\bs(a|ã)o.?tom(e|é)',\n  SAU: '\\\\bsa\\\\w*.?arabia',\n  SEN: 'senegal',\n  SRB: '^(?!.*monte).*serbia',\n  SYC: 'seychell',\n  SLE: 'sierra',\n  SGP: 'singapore',\n  SXM: '^(?!.*martin)(?!.*saba).*maarten',\n  SVK: '^(?!.*cze).*slovak',\n  SVN: 'slovenia',\n  SLB: 'solomon',\n  SOM: 'somali',\n  ZAF: 'south.africa|s\\\\\\\\..?africa',\n  SGS: 'south.?georgia|sandwich',\n  SSD: '\\\\bs\\\\w*.?sudan',\n  ESP: 'spain',\n  LKA: 'sri.?lanka|ceylon',\n  SDN: '^(?!.*\\\\bs(?!u)).*sudan',\n  SUR: 'surinam|dutch.?guiana',\n  SJM: 'svalbard',\n  SWZ: 'swaziland',\n  SWE: 'sweden',\n  CHE: 'switz|swiss',\n  SYR: 'syria',\n  TWN: 'taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china',\n  TJK: 'tajik',\n  THA: 'thailand|\\\\bsiam',\n  MKD: 'macedonia|fyrom',\n  TLS: '^(?=.*leste).*timor|^(?=.*east).*timor',\n  TGO: 'togo',\n  TKL: 'tokelau',\n  TON: 'tonga',\n  TTO: 'trinidad|tobago',\n  TUN: 'tunisia',\n  TUR: 'turkey',\n  TKM: 'turkmen',\n  TCA: 'turks',\n  TUV: 'tuvalu',\n  UGA: 'uganda',\n  UKR: 'ukrain',\n  ARE: 'emirates|^u\\\\.?a\\\\.?e\\\\.?$|united.?arab.?em',\n  GBR: 'united.?kingdom|britain|^u\\\\.?k\\\\.?$',\n  TZA: 'tanzania',\n  USA: 'united.?states\\\\b(?!.*islands)|\\\\bu\\\\.?s\\\\.?a\\\\.?\\\\b|^\\\\s*u\\\\.?s\\\\.?\\\\b(?!.*islands)',\n  UMI: 'minor.?outlying.?is',\n  URY: 'uruguay',\n  UZB: 'uzbek',\n  VUT: 'vanuatu|new.?hebrides',\n  VEN: 'venezuela',\n  VNM: '^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam',\n  VGB: '^(?=.*\\\\bu\\\\.?\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin',\n  VIR: '^(?=.*\\\\bu\\\\.?\\\\s?s).*virgin|^(?=.*states).*virgin',\n  WLF: 'futuna|wallis',\n  ESH: 'western.sahara',\n  YEM: '^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\bp\\\\.?d\\\\.?r).*yemen',\n  YMD: '^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\bp\\\\.?d\\\\.?r).*yemen',\n  YUG: 'yugoslavia',\n  ZMB: 'zambia|northern.?rhodesia',\n  EAZ: 'zanzibar',\n  ZWE: 'zimbabwe|^(?!.*northern).*rhodesia'\n}\n\n},{}],128:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"xx-small\",\r\n\t\"x-small\",\r\n\t\"small\",\r\n\t\"medium\",\r\n\t\"large\",\r\n\t\"x-large\",\r\n\t\"xx-large\",\r\n\t\"larger\",\r\n\t\"smaller\"\r\n]\r\n\n},{}],129:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"normal\",\r\n\t\"condensed\",\r\n\t\"semi-condensed\",\r\n\t\"extra-condensed\",\r\n\t\"ultra-condensed\",\r\n\t\"expanded\",\r\n\t\"semi-expanded\",\r\n\t\"extra-expanded\",\r\n\t\"ultra-expanded\"\r\n]\r\n\n},{}],130:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"normal\",\r\n\t\"italic\",\r\n\t\"oblique\"\r\n]\r\n\n},{}],131:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"normal\",\r\n\t\"bold\",\r\n\t\"bolder\",\r\n\t\"lighter\",\r\n\t\"100\",\r\n\t\"200\",\r\n\t\"300\",\r\n\t\"400\",\r\n\t\"500\",\r\n\t\"600\",\r\n\t\"700\",\r\n\t\"800\",\r\n\t\"900\"\r\n]\r\n\n},{}],132:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = {\r\n\tparse: _dereq_('./parse'),\r\n\tstringify: _dereq_('./stringify')\r\n}\r\n\n},{\"./parse\":134,\"./stringify\":135}],133:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar sizes = _dereq_('css-font-size-keywords')\r\n\r\nmodule.exports = {\r\n\tisSize: function isSize(value) {\r\n\t\treturn /^[\\d\\.]/.test(value)\r\n\t\t\t|| value.indexOf('/') !== -1\r\n\t\t\t|| sizes.indexOf(value) !== -1\r\n\t}\r\n}\r\n\n},{\"css-font-size-keywords\":128}],134:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar unquote = _dereq_('unquote')\r\nvar globalKeywords = _dereq_('css-global-keywords')\r\nvar systemFontKeywords = _dereq_('css-system-font-keywords')\r\nvar fontWeightKeywords = _dereq_('css-font-weight-keywords')\r\nvar fontStyleKeywords = _dereq_('css-font-style-keywords')\r\nvar fontStretchKeywords = _dereq_('css-font-stretch-keywords')\r\nvar splitBy = _dereq_('string-split-by')\r\nvar isSize = _dereq_('./lib/util').isSize\r\n\r\n\r\nmodule.exports = parseFont\r\n\r\n\r\nvar cache = parseFont.cache = {}\r\n\r\n\r\nfunction parseFont (value) {\r\n\tif (typeof value !== 'string') throw new Error('Font argument must be a string.')\r\n\r\n\tif (cache[value]) return cache[value]\r\n\r\n\tif (value === '') {\r\n\t\tthrow new Error('Cannot parse an empty string.')\r\n\t}\r\n\r\n\tif (systemFontKeywords.indexOf(value) !== -1) {\r\n\t\treturn cache[value] = {system: value}\r\n\t}\r\n\r\n\tvar font = {\r\n\t\tstyle: 'normal',\r\n\t\tvariant: 'normal',\r\n\t\tweight: 'normal',\r\n\t\tstretch: 'normal',\r\n\t\tlineHeight: 'normal',\r\n\t\tsize: '1rem',\r\n\t\tfamily: ['serif']\r\n\t}\r\n\r\n\tvar tokens = splitBy(value, /\\s+/)\r\n\tvar token\r\n\r\n\twhile (token = tokens.shift()) {\r\n\t\tif (globalKeywords.indexOf(token) !== -1) {\r\n\t\t\t['style', 'variant', 'weight', 'stretch'].forEach(function(prop) {\r\n\t\t\t\tfont[prop] = token\r\n\t\t\t})\r\n\r\n\t\t\treturn cache[value] = font\r\n\t\t}\r\n\r\n\t\tif (fontStyleKeywords.indexOf(token) !== -1) {\r\n\t\t\tfont.style = token\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\t\tif (token === 'normal' || token === 'small-caps') {\r\n\t\t\tfont.variant = token\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\t\tif (fontStretchKeywords.indexOf(token) !== -1) {\r\n\t\t\tfont.stretch = token\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\t\tif (fontWeightKeywords.indexOf(token) !== -1) {\r\n\t\t\tfont.weight = token\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\r\n\t\tif (isSize(token)) {\r\n\t\t\tvar parts = splitBy(token, '/')\r\n\t\t\tfont.size = parts[0]\r\n\t\t\tif (parts[1] != null) {\r\n\t\t\t\tfont.lineHeight = parseLineHeight(parts[1])\r\n\t\t\t}\r\n\t\t\telse if (tokens[0] === '/') {\r\n\t\t\t\ttokens.shift()\r\n\t\t\t\tfont.lineHeight = parseLineHeight(tokens.shift())\r\n \t\t\t}\r\n\r\n\t\t\tif (!tokens.length) {\r\n\t\t\t\tthrow new Error('Missing required font-family.')\r\n\t\t\t}\r\n\t\t\tfont.family = splitBy(tokens.join(' '), /\\s*,\\s*/).map(unquote)\r\n\r\n\t\t\treturn cache[value] = font\r\n\t\t}\r\n\r\n\t\tthrow new Error('Unknown or unsupported font token: ' + token)\r\n\t}\r\n\r\n\tthrow new Error('Missing required font-size.')\r\n}\r\n\r\n\r\nfunction parseLineHeight(value) {\r\n\tvar parsed = parseFloat(value)\r\n\tif (parsed.toString() === value) {\r\n\t\treturn parsed\r\n\t}\r\n\treturn value\r\n}\r\n\n},{\"./lib/util\":133,\"css-font-stretch-keywords\":129,\"css-font-style-keywords\":130,\"css-font-weight-keywords\":131,\"css-global-keywords\":136,\"css-system-font-keywords\":137,\"string-split-by\":516,\"unquote\":535}],135:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar pick = _dereq_('pick-by-alias')\r\nvar isSize = _dereq_('./lib/util').isSize\r\n\r\nvar globals = a2o(_dereq_('css-global-keywords'))\r\nvar systems = a2o(_dereq_('css-system-font-keywords'))\r\nvar weights = a2o(_dereq_('css-font-weight-keywords'))\r\nvar styles = a2o(_dereq_('css-font-style-keywords'))\r\nvar stretches = a2o(_dereq_('css-font-stretch-keywords'))\r\n\r\nvar variants = {'normal': 1, 'small-caps': 1}\r\nvar fams = {\r\n\t'serif': 1,\r\n\t'sans-serif': 1,\r\n\t'monospace': 1,\r\n\t'cursive': 1,\r\n\t'fantasy': 1,\r\n\t'system-ui': 1\r\n}\r\n\r\nvar defaults = {\r\n\tstyle: 'normal',\r\n\tvariant: 'normal',\r\n\tweight: 'normal',\r\n\tstretch: 'normal',\r\n\tsize: '1rem',\r\n\tlineHeight: 'normal',\r\n\tfamily: 'serif'\r\n}\r\n\r\nmodule.exports = function stringifyFont (o) {\r\n\to = pick(o, {\r\n\t\tstyle: 'style fontstyle fontStyle font-style slope distinction',\r\n\t\tvariant: 'variant font-variant fontVariant fontvariant var capitalization',\r\n\t\tweight: 'weight w font-weight fontWeight fontweight',\r\n\t\tstretch: 'stretch font-stretch fontStretch fontstretch width',\r\n\t\tsize: 'size s font-size fontSize fontsize height em emSize',\r\n\t\tlineHeight: 'lh line-height lineHeight lineheight leading',\r\n\t\tfamily: 'font family fontFamily font-family fontfamily type typeface face',\r\n\t\tsystem: 'system reserved default global',\r\n\t})\r\n\r\n\tif (o.system) {\r\n\t\tif (o.system) verify(o.system, systems)\r\n\t\treturn o.system\r\n\t}\r\n\r\n\tverify(o.style, styles)\r\n\tverify(o.variant, variants)\r\n\tverify(o.weight, weights)\r\n\tverify(o.stretch, stretches)\r\n\r\n\t// default root value is medium, but by default it's inherited\r\n\tif (o.size == null) o.size = defaults.size\r\n\tif (typeof o.size === 'number') o.size += 'px'\r\n\r\n\tif (!isSize) throw Error('Bad size value `' + o.size + '`')\r\n\r\n\t// many user-agents use serif, we don't detect that for consistency\r\n\tif (!o.family) o.family = defaults.family\r\n\tif (Array.isArray(o.family)) {\r\n\t\tif (!o.family.length) o.family = [defaults.family]\r\n\t\to.family = o.family.map(function (f) {\r\n\t\t\treturn fams[f] ? f : '\"' + f + '\"'\r\n\t\t}).join(', ')\r\n\t}\r\n\r\n\t// [ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ]\r\n\tvar result = []\r\n\r\n\tresult.push(o.style)\r\n\tif (o.variant !== o.style) result.push(o.variant)\r\n\r\n\tif (o.weight !== o.variant &&\r\n\t\to.weight !== o.style) result.push(o.weight)\r\n\r\n\tif (o.stretch !== o.weight &&\r\n\t\to.stretch !== o.variant &&\r\n\t\to.stretch !== o.style) result.push(o.stretch)\r\n\r\n\tresult.push(o.size + (o.lineHeight == null || o.lineHeight === 'normal' || (o.lineHeight + '' === '1')  ? '' : ('/' + o.lineHeight)))\r\n\tresult.push(o.family)\r\n\r\n\treturn result.filter(Boolean).join(' ')\r\n}\r\n\r\nfunction verify (value, values) {\r\n\tif (value && !values[value] && !globals[value]) throw Error('Unknown keyword `' + value +'`')\r\n\r\n\treturn value\r\n}\r\n\r\n\r\n// ['a', 'b'] -> {a: true, b: true}\r\nfunction a2o (a) {\r\n\tvar o = {}\r\n\tfor (var i = 0; i < a.length; i++) {\r\n\t\to[a[i]] = 1\r\n\t}\r\n\treturn o\r\n}\r\n\n},{\"./lib/util\":133,\"css-font-stretch-keywords\":129,\"css-font-style-keywords\":130,\"css-font-weight-keywords\":131,\"css-global-keywords\":136,\"css-system-font-keywords\":137,\"pick-by-alias\":460}],136:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"inherit\",\r\n\t\"initial\",\r\n\t\"unset\"\r\n]\r\n\n},{}],137:[function(_dereq_,module,exports){\nmodule.exports=[\r\n\t\"caption\",\r\n\t\"icon\",\r\n\t\"menu\",\r\n\t\"message-box\",\r\n\t\"small-caption\",\r\n\t\"status-bar\"\r\n]\r\n\n},{}],138:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction dcubicHermite(p0, v0, p1, v1, t, f) {\n  var dh00 = 6*t*t-6*t,\n      dh10 = 3*t*t-4*t + 1,\n      dh01 = -6*t*t+6*t,\n      dh11 = 3*t*t-2*t\n  if(p0.length) {\n    if(!f) {\n      f = new Array(p0.length)\n    }\n    for(var i=p0.length-1; i>=0; --i) {\n      f[i] = dh00*p0[i] + dh10*v0[i] + dh01*p1[i] + dh11*v1[i]\n    }\n    return f\n  }\n  return dh00*p0 + dh10*v0 + dh01*p1[i] + dh11*v1\n}\n\nfunction cubicHermite(p0, v0, p1, v1, t, f) {\n  var ti  = (t-1), t2 = t*t, ti2 = ti*ti,\n      h00 = (1+2*t)*ti2,\n      h10 = t*ti2,\n      h01 = t2*(3-2*t),\n      h11 = t2*ti\n  if(p0.length) {\n    if(!f) {\n      f = new Array(p0.length)\n    }\n    for(var i=p0.length-1; i>=0; --i) {\n      f[i] = h00*p0[i] + h10*v0[i] + h01*p1[i] + h11*v1[i]\n    }\n    return f\n  }\n  return h00*p0 + h10*v0 + h01*p1 + h11*v1\n}\n\nmodule.exports = cubicHermite\nmodule.exports.derivative = dcubicHermite\n},{}],139:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar createThunk = _dereq_(\"./lib/thunk.js\")\n\nfunction Procedure() {\n  this.argTypes = []\n  this.shimArgs = []\n  this.arrayArgs = []\n  this.arrayBlockIndices = []\n  this.scalarArgs = []\n  this.offsetArgs = []\n  this.offsetArgIndex = []\n  this.indexArgs = []\n  this.shapeArgs = []\n  this.funcName = \"\"\n  this.pre = null\n  this.body = null\n  this.post = null\n  this.debug = false\n}\n\nfunction compileCwise(user_args) {\n  //Create procedure\n  var proc = new Procedure()\n  \n  //Parse blocks\n  proc.pre    = user_args.pre\n  proc.body   = user_args.body\n  proc.post   = user_args.post\n\n  //Parse arguments\n  var proc_args = user_args.args.slice(0)\n  proc.argTypes = proc_args\n  for(var i=0; i<proc_args.length; ++i) {\n    var arg_type = proc_args[i]\n    if(arg_type === \"array\" || (typeof arg_type === \"object\" && arg_type.blockIndices)) {\n      proc.argTypes[i] = \"array\"\n      proc.arrayArgs.push(i)\n      proc.arrayBlockIndices.push(arg_type.blockIndices ? arg_type.blockIndices : 0)\n      proc.shimArgs.push(\"array\" + i)\n      if(i < proc.pre.args.length && proc.pre.args[i].count>0) {\n        throw new Error(\"cwise: pre() block may not reference array args\")\n      }\n      if(i < proc.post.args.length && proc.post.args[i].count>0) {\n        throw new Error(\"cwise: post() block may not reference array args\")\n      }\n    } else if(arg_type === \"scalar\") {\n      proc.scalarArgs.push(i)\n      proc.shimArgs.push(\"scalar\" + i)\n    } else if(arg_type === \"index\") {\n      proc.indexArgs.push(i)\n      if(i < proc.pre.args.length && proc.pre.args[i].count > 0) {\n        throw new Error(\"cwise: pre() block may not reference array index\")\n      }\n      if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n        throw new Error(\"cwise: body() block may not write to array index\")\n      }\n      if(i < proc.post.args.length && proc.post.args[i].count > 0) {\n        throw new Error(\"cwise: post() block may not reference array index\")\n      }\n    } else if(arg_type === \"shape\") {\n      proc.shapeArgs.push(i)\n      if(i < proc.pre.args.length && proc.pre.args[i].lvalue) {\n        throw new Error(\"cwise: pre() block may not write to array shape\")\n      }\n      if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n        throw new Error(\"cwise: body() block may not write to array shape\")\n      }\n      if(i < proc.post.args.length && proc.post.args[i].lvalue) {\n        throw new Error(\"cwise: post() block may not write to array shape\")\n      }\n    } else if(typeof arg_type === \"object\" && arg_type.offset) {\n      proc.argTypes[i] = \"offset\"\n      proc.offsetArgs.push({ array: arg_type.array, offset:arg_type.offset })\n      proc.offsetArgIndex.push(i)\n    } else {\n      throw new Error(\"cwise: Unknown argument type \" + proc_args[i])\n    }\n  }\n  \n  //Make sure at least one array argument was specified\n  if(proc.arrayArgs.length <= 0) {\n    throw new Error(\"cwise: No array arguments specified\")\n  }\n  \n  //Make sure arguments are correct\n  if(proc.pre.args.length > proc_args.length) {\n    throw new Error(\"cwise: Too many arguments in pre() block\")\n  }\n  if(proc.body.args.length > proc_args.length) {\n    throw new Error(\"cwise: Too many arguments in body() block\")\n  }\n  if(proc.post.args.length > proc_args.length) {\n    throw new Error(\"cwise: Too many arguments in post() block\")\n  }\n\n  //Check debug flag\n  proc.debug = !!user_args.printCode || !!user_args.debug\n  \n  //Retrieve name\n  proc.funcName = user_args.funcName || \"cwise\"\n  \n  //Read in block size\n  proc.blockSize = user_args.blockSize || 64\n\n  return createThunk(proc)\n}\n\nmodule.exports = compileCwise\n\n},{\"./lib/thunk.js\":141}],140:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar uniq = _dereq_(\"uniq\")\n\n// This function generates very simple loops analogous to how you typically traverse arrays (the outermost loop corresponds to the slowest changing index, the innermost loop to the fastest changing index)\n// TODO: If two arrays have the same strides (and offsets) there is potential for decreasing the number of \"pointers\" and related variables. The drawback is that the type signature would become more specific and that there would thus be less potential for caching, but it might still be worth it, especially when dealing with large numbers of arguments.\nfunction innerFill(order, proc, body) {\n  var dimension = order.length\n    , nargs = proc.arrayArgs.length\n    , has_index = proc.indexArgs.length>0\n    , code = []\n    , vars = []\n    , idx=0, pidx=0, i, j\n  for(i=0; i<dimension; ++i) { // Iteration variables\n    vars.push([\"i\",i,\"=0\"].join(\"\"))\n  }\n  //Compute scan deltas\n  for(j=0; j<nargs; ++j) {\n    for(i=0; i<dimension; ++i) {\n      pidx = idx\n      idx = order[i]\n      if(i === 0) { // The innermost/fastest dimension's delta is simply its stride\n        vars.push([\"d\",j,\"s\",i,\"=t\",j,\"p\",idx].join(\"\"))\n      } else { // For other dimensions the delta is basically the stride minus something which essentially \"rewinds\" the previous (more inner) dimension\n        vars.push([\"d\",j,\"s\",i,\"=(t\",j,\"p\",idx,\"-s\",pidx,\"*t\",j,\"p\",pidx,\")\"].join(\"\"))\n      }\n    }\n  }\n  if (vars.length > 0) {\n    code.push(\"var \" + vars.join(\",\"))\n  }  \n  //Scan loop\n  for(i=dimension-1; i>=0; --i) { // Start at largest stride and work your way inwards\n    idx = order[i]\n    code.push([\"for(i\",i,\"=0;i\",i,\"<s\",idx,\";++i\",i,\"){\"].join(\"\"))\n  }\n  //Push body of inner loop\n  code.push(body)\n  //Advance scan pointers\n  for(i=0; i<dimension; ++i) {\n    pidx = idx\n    idx = order[i]\n    for(j=0; j<nargs; ++j) {\n      code.push([\"p\",j,\"+=d\",j,\"s\",i].join(\"\"))\n    }\n    if(has_index) {\n      if(i > 0) {\n        code.push([\"index[\",pidx,\"]-=s\",pidx].join(\"\"))\n      }\n      code.push([\"++index[\",idx,\"]\"].join(\"\"))\n    }\n    code.push(\"}\")\n  }\n  return code.join(\"\\n\")\n}\n\n// Generate \"outer\" loops that loop over blocks of data, applying \"inner\" loops to the blocks by manipulating the local variables in such a way that the inner loop only \"sees\" the current block.\n// TODO: If this is used, then the previous declaration (done by generateCwiseOp) of s* is essentially unnecessary.\n//       I believe the s* are not used elsewhere (in particular, I don't think they're used in the pre/post parts and \"shape\" is defined independently), so it would be possible to make defining the s* dependent on what loop method is being used.\nfunction outerFill(matched, order, proc, body) {\n  var dimension = order.length\n    , nargs = proc.arrayArgs.length\n    , blockSize = proc.blockSize\n    , has_index = proc.indexArgs.length > 0\n    , code = []\n  for(var i=0; i<nargs; ++i) {\n    code.push([\"var offset\",i,\"=p\",i].join(\"\"))\n  }\n  //Generate loops for unmatched dimensions\n  // The order in which these dimensions are traversed is fairly arbitrary (from small stride to large stride, for the first argument)\n  // TODO: It would be nice if the order in which these loops are placed would also be somehow \"optimal\" (at the very least we should check that it really doesn't hurt us if they're not).\n  for(var i=matched; i<dimension; ++i) {\n    code.push([\"for(var j\"+i+\"=SS[\", order[i], \"]|0;j\", i, \">0;){\"].join(\"\")) // Iterate back to front\n    code.push([\"if(j\",i,\"<\",blockSize,\"){\"].join(\"\")) // Either decrease j by blockSize (s = blockSize), or set it to zero (after setting s = j).\n    code.push([\"s\",order[i],\"=j\",i].join(\"\"))\n    code.push([\"j\",i,\"=0\"].join(\"\"))\n    code.push([\"}else{s\",order[i],\"=\",blockSize].join(\"\"))\n    code.push([\"j\",i,\"-=\",blockSize,\"}\"].join(\"\"))\n    if(has_index) {\n      code.push([\"index[\",order[i],\"]=j\",i].join(\"\"))\n    }\n  }\n  for(var i=0; i<nargs; ++i) {\n    var indexStr = [\"offset\"+i]\n    for(var j=matched; j<dimension; ++j) {\n      indexStr.push([\"j\",j,\"*t\",i,\"p\",order[j]].join(\"\"))\n    }\n    code.push([\"p\",i,\"=(\",indexStr.join(\"+\"),\")\"].join(\"\"))\n  }\n  code.push(innerFill(order, proc, body))\n  for(var i=matched; i<dimension; ++i) {\n    code.push(\"}\")\n  }\n  return code.join(\"\\n\")\n}\n\n//Count the number of compatible inner orders\n// This is the length of the longest common prefix of the arrays in orders.\n// Each array in orders lists the dimensions of the correspond ndarray in order of increasing stride.\n// This is thus the maximum number of dimensions that can be efficiently traversed by simple nested loops for all arrays.\nfunction countMatches(orders) {\n  var matched = 0, dimension = orders[0].length\n  while(matched < dimension) {\n    for(var j=1; j<orders.length; ++j) {\n      if(orders[j][matched] !== orders[0][matched]) {\n        return matched\n      }\n    }\n    ++matched\n  }\n  return matched\n}\n\n//Processes a block according to the given data types\n// Replaces variable names by different ones, either \"local\" ones (that are then ferried in and out of the given array) or ones matching the arguments that the function performing the ultimate loop will accept.\nfunction processBlock(block, proc, dtypes) {\n  var code = block.body\n  var pre = []\n  var post = []\n  for(var i=0; i<block.args.length; ++i) {\n    var carg = block.args[i]\n    if(carg.count <= 0) {\n      continue\n    }\n    var re = new RegExp(carg.name, \"g\")\n    var ptrStr = \"\"\n    var arrNum = proc.arrayArgs.indexOf(i)\n    switch(proc.argTypes[i]) {\n      case \"offset\":\n        var offArgIndex = proc.offsetArgIndex.indexOf(i)\n        var offArg = proc.offsetArgs[offArgIndex]\n        arrNum = offArg.array\n        ptrStr = \"+q\" + offArgIndex // Adds offset to the \"pointer\" in the array\n      case \"array\":\n        ptrStr = \"p\" + arrNum + ptrStr\n        var localStr = \"l\" + i\n        var arrStr = \"a\" + arrNum\n        if (proc.arrayBlockIndices[arrNum] === 0) { // Argument to body is just a single value from this array\n          if(carg.count === 1) { // Argument/array used only once(?)\n            if(dtypes[arrNum] === \"generic\") {\n              if(carg.lvalue) {\n                pre.push([\"var \", localStr, \"=\", arrStr, \".get(\", ptrStr, \")\"].join(\"\")) // Is this necessary if the argument is ONLY used as an lvalue? (keep in mind that we can have a += something, so we would actually need to check carg.rvalue)\n                code = code.replace(re, localStr)\n                post.push([arrStr, \".set(\", ptrStr, \",\", localStr,\")\"].join(\"\"))\n              } else {\n                code = code.replace(re, [arrStr, \".get(\", ptrStr, \")\"].join(\"\"))\n              }\n            } else {\n              code = code.replace(re, [arrStr, \"[\", ptrStr, \"]\"].join(\"\"))\n            }\n          } else if(dtypes[arrNum] === \"generic\") {\n            pre.push([\"var \", localStr, \"=\", arrStr, \".get(\", ptrStr, \")\"].join(\"\")) // TODO: Could we optimize by checking for carg.rvalue?\n            code = code.replace(re, localStr)\n            if(carg.lvalue) {\n              post.push([arrStr, \".set(\", ptrStr, \",\", localStr,\")\"].join(\"\"))\n            }\n          } else {\n            pre.push([\"var \", localStr, \"=\", arrStr, \"[\", ptrStr, \"]\"].join(\"\")) // TODO: Could we optimize by checking for carg.rvalue?\n            code = code.replace(re, localStr)\n            if(carg.lvalue) {\n              post.push([arrStr, \"[\", ptrStr, \"]=\", localStr].join(\"\"))\n            }\n          }\n        } else { // Argument to body is a \"block\"\n          var reStrArr = [carg.name], ptrStrArr = [ptrStr]\n          for(var j=0; j<Math.abs(proc.arrayBlockIndices[arrNum]); j++) {\n            reStrArr.push(\"\\\\s*\\\\[([^\\\\]]+)\\\\]\")\n            ptrStrArr.push(\"$\" + (j+1) + \"*t\" + arrNum + \"b\" + j) // Matched index times stride\n          }\n          re = new RegExp(reStrArr.join(\"\"), \"g\")\n          ptrStr = ptrStrArr.join(\"+\")\n          if(dtypes[arrNum] === \"generic\") {\n            /*if(carg.lvalue) {\n              pre.push([\"var \", localStr, \"=\", arrStr, \".get(\", ptrStr, \")\"].join(\"\")) // Is this necessary if the argument is ONLY used as an lvalue? (keep in mind that we can have a += something, so we would actually need to check carg.rvalue)\n              code = code.replace(re, localStr)\n              post.push([arrStr, \".set(\", ptrStr, \",\", localStr,\")\"].join(\"\"))\n            } else {\n              code = code.replace(re, [arrStr, \".get(\", ptrStr, \")\"].join(\"\"))\n            }*/\n            throw new Error(\"cwise: Generic arrays not supported in combination with blocks!\")\n          } else {\n            // This does not produce any local variables, even if variables are used multiple times. It would be possible to do so, but it would complicate things quite a bit.\n            code = code.replace(re, [arrStr, \"[\", ptrStr, \"]\"].join(\"\"))\n          }\n        }\n      break\n      case \"scalar\":\n        code = code.replace(re, \"Y\" + proc.scalarArgs.indexOf(i))\n      break\n      case \"index\":\n        code = code.replace(re, \"index\")\n      break\n      case \"shape\":\n        code = code.replace(re, \"shape\")\n      break\n    }\n  }\n  return [pre.join(\"\\n\"), code, post.join(\"\\n\")].join(\"\\n\").trim()\n}\n\nfunction typeSummary(dtypes) {\n  var summary = new Array(dtypes.length)\n  var allEqual = true\n  for(var i=0; i<dtypes.length; ++i) {\n    var t = dtypes[i]\n    var digits = t.match(/\\d+/)\n    if(!digits) {\n      digits = \"\"\n    } else {\n      digits = digits[0]\n    }\n    if(t.charAt(0) === 0) {\n      summary[i] = \"u\" + t.charAt(1) + digits\n    } else {\n      summary[i] = t.charAt(0) + digits\n    }\n    if(i > 0) {\n      allEqual = allEqual && summary[i] === summary[i-1]\n    }\n  }\n  if(allEqual) {\n    return summary[0]\n  }\n  return summary.join(\"\")\n}\n\n//Generates a cwise operator\nfunction generateCWiseOp(proc, typesig) {\n\n  //Compute dimension\n  // Arrays get put first in typesig, and there are two entries per array (dtype and order), so this gets the number of dimensions in the first array arg.\n  var dimension = (typesig[1].length - Math.abs(proc.arrayBlockIndices[0]))|0\n  var orders = new Array(proc.arrayArgs.length)\n  var dtypes = new Array(proc.arrayArgs.length)\n  for(var i=0; i<proc.arrayArgs.length; ++i) {\n    dtypes[i] = typesig[2*i]\n    orders[i] = typesig[2*i+1]\n  }\n  \n  //Determine where block and loop indices start and end\n  var blockBegin = [], blockEnd = [] // These indices are exposed as blocks\n  var loopBegin = [], loopEnd = [] // These indices are iterated over\n  var loopOrders = [] // orders restricted to the loop indices\n  for(var i=0; i<proc.arrayArgs.length; ++i) {\n    if (proc.arrayBlockIndices[i]<0) {\n      loopBegin.push(0)\n      loopEnd.push(dimension)\n      blockBegin.push(dimension)\n      blockEnd.push(dimension+proc.arrayBlockIndices[i])\n    } else {\n      loopBegin.push(proc.arrayBlockIndices[i]) // Non-negative\n      loopEnd.push(proc.arrayBlockIndices[i]+dimension)\n      blockBegin.push(0)\n      blockEnd.push(proc.arrayBlockIndices[i])\n    }\n    var newOrder = []\n    for(var j=0; j<orders[i].length; j++) {\n      if (loopBegin[i]<=orders[i][j] && orders[i][j]<loopEnd[i]) {\n        newOrder.push(orders[i][j]-loopBegin[i]) // If this is a loop index, put it in newOrder, subtracting loopBegin, to make sure that all loopOrders are using a common set of indices.\n      }\n    }\n    loopOrders.push(newOrder)\n  }\n\n  //First create arguments for procedure\n  var arglist = [\"SS\"] // SS is the overall shape over which we iterate\n  var code = [\"'use strict'\"]\n  var vars = []\n  \n  for(var j=0; j<dimension; ++j) {\n    vars.push([\"s\", j, \"=SS[\", j, \"]\"].join(\"\")) // The limits for each dimension.\n  }\n  for(var i=0; i<proc.arrayArgs.length; ++i) {\n    arglist.push(\"a\"+i) // Actual data array\n    arglist.push(\"t\"+i) // Strides\n    arglist.push(\"p\"+i) // Offset in the array at which the data starts (also used for iterating over the data)\n    \n    for(var j=0; j<dimension; ++j) { // Unpack the strides into vars for looping\n      vars.push([\"t\",i,\"p\",j,\"=t\",i,\"[\",loopBegin[i]+j,\"]\"].join(\"\"))\n    }\n    \n    for(var j=0; j<Math.abs(proc.arrayBlockIndices[i]); ++j) { // Unpack the strides into vars for block iteration\n      vars.push([\"t\",i,\"b\",j,\"=t\",i,\"[\",blockBegin[i]+j,\"]\"].join(\"\"))\n    }\n  }\n  for(var i=0; i<proc.scalarArgs.length; ++i) {\n    arglist.push(\"Y\" + i)\n  }\n  if(proc.shapeArgs.length > 0) {\n    vars.push(\"shape=SS.slice(0)\") // Makes the shape over which we iterate available to the user defined functions (so you can use width/height for example)\n  }\n  if(proc.indexArgs.length > 0) {\n    // Prepare an array to keep track of the (logical) indices, initialized to dimension zeroes.\n    var zeros = new Array(dimension)\n    for(var i=0; i<dimension; ++i) {\n      zeros[i] = \"0\"\n    }\n    vars.push([\"index=[\", zeros.join(\",\"), \"]\"].join(\"\"))\n  }\n  for(var i=0; i<proc.offsetArgs.length; ++i) { // Offset arguments used for stencil operations\n    var off_arg = proc.offsetArgs[i]\n    var init_string = []\n    for(var j=0; j<off_arg.offset.length; ++j) {\n      if(off_arg.offset[j] === 0) {\n        continue\n      } else if(off_arg.offset[j] === 1) {\n        init_string.push([\"t\", off_arg.array, \"p\", j].join(\"\"))      \n      } else {\n        init_string.push([off_arg.offset[j], \"*t\", off_arg.array, \"p\", j].join(\"\"))\n      }\n    }\n    if(init_string.length === 0) {\n      vars.push(\"q\" + i + \"=0\")\n    } else {\n      vars.push([\"q\", i, \"=\", init_string.join(\"+\")].join(\"\"))\n    }\n  }\n\n  //Prepare this variables\n  var thisVars = uniq([].concat(proc.pre.thisVars)\n                      .concat(proc.body.thisVars)\n                      .concat(proc.post.thisVars))\n  vars = vars.concat(thisVars)\n  if (vars.length > 0) {\n    code.push(\"var \" + vars.join(\",\"))\n  }\n  for(var i=0; i<proc.arrayArgs.length; ++i) {\n    code.push(\"p\"+i+\"|=0\")\n  }\n  \n  //Inline prelude\n  if(proc.pre.body.length > 3) {\n    code.push(processBlock(proc.pre, proc, dtypes))\n  }\n\n  //Process body\n  var body = processBlock(proc.body, proc, dtypes)\n  var matched = countMatches(loopOrders)\n  if(matched < dimension) {\n    code.push(outerFill(matched, loopOrders[0], proc, body)) // TODO: Rather than passing loopOrders[0], it might be interesting to look at passing an order that represents the majority of the arguments for example.\n  } else {\n    code.push(innerFill(loopOrders[0], proc, body))\n  }\n\n  //Inline epilog\n  if(proc.post.body.length > 3) {\n    code.push(processBlock(proc.post, proc, dtypes))\n  }\n  \n  if(proc.debug) {\n    console.log(\"-----Generated cwise routine for \", typesig, \":\\n\" + code.join(\"\\n\") + \"\\n----------\")\n  }\n  \n  var loopName = [(proc.funcName||\"unnamed\"), \"_cwise_loop_\", orders[0].join(\"s\"),\"m\",matched,typeSummary(dtypes)].join(\"\")\n  var f = new Function([\"function \",loopName,\"(\", arglist.join(\",\"),\"){\", code.join(\"\\n\"),\"} return \", loopName].join(\"\"))\n  return f()\n}\nmodule.exports = generateCWiseOp\n\n},{\"uniq\":534}],141:[function(_dereq_,module,exports){\n\"use strict\"\n\n// The function below is called when constructing a cwise function object, and does the following:\n// A function object is constructed which accepts as argument a compilation function and returns another function.\n// It is this other function that is eventually returned by createThunk, and this function is the one that actually\n// checks whether a certain pattern of arguments has already been used before and compiles new loops as needed.\n// The compilation passed to the first function object is used for compiling new functions.\n// Once this function object is created, it is called with compile as argument, where the first argument of compile\n// is bound to \"proc\" (essentially containing a preprocessed version of the user arguments to cwise).\n// So createThunk roughly works like this:\n// function createThunk(proc) {\n//   var thunk = function(compileBound) {\n//     var CACHED = {}\n//     return function(arrays and scalars) {\n//       if (dtype and order of arrays in CACHED) {\n//         var func = CACHED[dtype and order of arrays]\n//       } else {\n//         var func = CACHED[dtype and order of arrays] = compileBound(dtype and order of arrays)\n//       }\n//       return func(arrays and scalars)\n//     }\n//   }\n//   return thunk(compile.bind1(proc))\n// }\n\nvar compile = _dereq_(\"./compile.js\")\n\nfunction createThunk(proc) {\n  var code = [\"'use strict'\", \"var CACHED={}\"]\n  var vars = []\n  var thunkName = proc.funcName + \"_cwise_thunk\"\n  \n  //Build thunk\n  code.push([\"return function \", thunkName, \"(\", proc.shimArgs.join(\",\"), \"){\"].join(\"\"))\n  var typesig = []\n  var string_typesig = []\n  var proc_args = [[\"array\",proc.arrayArgs[0],\".shape.slice(\", // Slice shape so that we only retain the shape over which we iterate (which gets passed to the cwise operator as SS).\n                    Math.max(0,proc.arrayBlockIndices[0]),proc.arrayBlockIndices[0]<0?(\",\"+proc.arrayBlockIndices[0]+\")\"):\")\"].join(\"\")]\n  var shapeLengthConditions = [], shapeConditions = []\n  // Process array arguments\n  for(var i=0; i<proc.arrayArgs.length; ++i) {\n    var j = proc.arrayArgs[i]\n    vars.push([\"t\", j, \"=array\", j, \".dtype,\",\n               \"r\", j, \"=array\", j, \".order\"].join(\"\"))\n    typesig.push(\"t\" + j)\n    typesig.push(\"r\" + j)\n    string_typesig.push(\"t\"+j)\n    string_typesig.push(\"r\"+j+\".join()\")\n    proc_args.push(\"array\" + j + \".data\")\n    proc_args.push(\"array\" + j + \".stride\")\n    proc_args.push(\"array\" + j + \".offset|0\")\n    if (i>0) { // Gather conditions to check for shape equality (ignoring block indices)\n      shapeLengthConditions.push(\"array\" + proc.arrayArgs[0] + \".shape.length===array\" + j + \".shape.length+\" + (Math.abs(proc.arrayBlockIndices[0])-Math.abs(proc.arrayBlockIndices[i])))\n      shapeConditions.push(\"array\" + proc.arrayArgs[0] + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[0]) + \"]===array\" + j + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[i]) + \"]\")\n    }\n  }\n  // Check for shape equality\n  if (proc.arrayArgs.length > 1) {\n    code.push(\"if (!(\" + shapeLengthConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same dimensionality!')\")\n    code.push(\"for(var shapeIndex=array\" + proc.arrayArgs[0] + \".shape.length-\" + Math.abs(proc.arrayBlockIndices[0]) + \"; shapeIndex-->0;) {\")\n    code.push(\"if (!(\" + shapeConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same shape!')\")\n    code.push(\"}\")\n  }\n  // Process scalar arguments\n  for(var i=0; i<proc.scalarArgs.length; ++i) {\n    proc_args.push(\"scalar\" + proc.scalarArgs[i])\n  }\n  // Check for cached function (and if not present, generate it)\n  vars.push([\"type=[\", string_typesig.join(\",\"), \"].join()\"].join(\"\"))\n  vars.push(\"proc=CACHED[type]\")\n  code.push(\"var \" + vars.join(\",\"))\n  \n  code.push([\"if(!proc){\",\n             \"CACHED[type]=proc=compile([\", typesig.join(\",\"), \"])}\",\n             \"return proc(\", proc_args.join(\",\"), \")}\"].join(\"\"))\n\n  if(proc.debug) {\n    console.log(\"-----Generated thunk:\\n\" + code.join(\"\\n\") + \"\\n----------\")\n  }\n  \n  //Compile thunk\n  var thunk = new Function(\"compile\", code.join(\"\\n\"))\n  return thunk(compile.bind(undefined, proc))\n}\n\nmodule.exports = createThunk\n\n},{\"./compile.js\":140}],142:[function(_dereq_,module,exports){\nmodule.exports = _dereq_(\"cwise-compiler\")\n},{\"cwise-compiler\":139}],143:[function(_dereq_,module,exports){\n'use strict';\n\nvar copy             = _dereq_('es5-ext/object/copy')\n  , normalizeOptions = _dereq_('es5-ext/object/normalize-options')\n  , ensureCallable   = _dereq_('es5-ext/object/valid-callable')\n  , map              = _dereq_('es5-ext/object/map')\n  , callable         = _dereq_('es5-ext/object/valid-callable')\n  , validValue       = _dereq_('es5-ext/object/valid-value')\n\n  , bind = Function.prototype.bind, defineProperty = Object.defineProperty\n  , hasOwnProperty = Object.prototype.hasOwnProperty\n  , define;\n\ndefine = function (name, desc, options) {\n\tvar value = validValue(desc) && callable(desc.value), dgs;\n\tdgs = copy(desc);\n\tdelete dgs.writable;\n\tdelete dgs.value;\n\tdgs.get = function () {\n\t\tif (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;\n\t\tdesc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);\n\t\tdefineProperty(this, name, desc);\n\t\treturn this[name];\n\t};\n\treturn dgs;\n};\n\nmodule.exports = function (props/*, options*/) {\n\tvar options = normalizeOptions(arguments[1]);\n\tif (options.resolveContext != null) ensureCallable(options.resolveContext);\n\treturn map(props, function (desc, name) { return define(name, desc, options); });\n};\n\n},{\"es5-ext/object/copy\":184,\"es5-ext/object/map\":193,\"es5-ext/object/normalize-options\":194,\"es5-ext/object/valid-callable\":198,\"es5-ext/object/valid-value\":200}],144:[function(_dereq_,module,exports){\n'use strict';\n\nvar assign        = _dereq_('es5-ext/object/assign')\n  , normalizeOpts = _dereq_('es5-ext/object/normalize-options')\n  , isCallable    = _dereq_('es5-ext/object/is-callable')\n  , contains      = _dereq_('es5-ext/string/#/contains')\n\n  , d;\n\nd = module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif ((arguments.length < 2) || (typeof dscr !== 'string')) {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (dscr == null) {\n\t\tc = w = true;\n\t\te = false;\n\t} else {\n\t\tc = contains.call(dscr, 'c');\n\t\te = contains.call(dscr, 'e');\n\t\tw = contains.call(dscr, 'w');\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== 'string') {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (get == null) {\n\t\tget = undefined;\n\t} else if (!isCallable(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (set == null) {\n\t\tset = undefined;\n\t} else if (!isCallable(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (dscr == null) {\n\t\tc = true;\n\t\te = false;\n\t} else {\n\t\tc = contains.call(dscr, 'c');\n\t\te = contains.call(dscr, 'e');\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n\n},{\"es5-ext/object/assign\":181,\"es5-ext/object/is-callable\":187,\"es5-ext/object/normalize-options\":194,\"es5-ext/string/#/contains\":201}],145:[function(_dereq_,module,exports){\n// https://d3js.org/d3-array/ v1.2.4 Copyright 2018 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\nfunction bisector(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n}\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return ascending(f(d), x);\n  };\n}\n\nvar ascendingBisect = bisector(ascending);\nvar bisectRight = ascendingBisect.right;\nvar bisectLeft = ascendingBisect.left;\n\nfunction pairs(array, f) {\n  if (f == null) f = pair;\n  var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);\n  while (i < n) pairs[i] = f(p, p = array[++i]);\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\nfunction cross(values0, values1, reduce) {\n  var n0 = values0.length,\n      n1 = values1.length,\n      values = new Array(n0 * n1),\n      i0,\n      i1,\n      i,\n      value0;\n\n  if (reduce == null) reduce = pair;\n\n  for (i0 = i = 0; i0 < n0; ++i0) {\n    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n      values[i] = reduce(value0, values1[i1]);\n    }\n  }\n\n  return values;\n}\n\nfunction descending(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n\nfunction number(x) {\n  return x === null ? NaN : +x;\n}\n\nfunction variance(values, valueof) {\n  var n = values.length,\n      m = 0,\n      i = -1,\n      mean = 0,\n      value,\n      delta,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = number(values[i]))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = number(valueof(values[i], i, values)))) {\n        delta = value - mean;\n        mean += delta / ++m;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n\n  if (m > 1) return sum / (m - 1);\n}\n\nfunction deviation(array, f) {\n  var v = variance(array, f);\n  return v ? Math.sqrt(v) : v;\n}\n\nfunction extent(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return [min, max];\n}\n\nvar array = Array.prototype;\n\nvar slice = array.slice;\nvar map = array.map;\n\nfunction constant(x) {\n  return function() {\n    return x;\n  };\n}\n\nfunction identity(x) {\n  return x;\n}\n\nfunction range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction ticks(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n}\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\nfunction sturges(values) {\n  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n}\n\nfunction histogram() {\n  var value = identity,\n      domain = extent,\n      threshold = sturges;\n\n  function histogram(data) {\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds.\n    if (!Array.isArray(tz)) {\n      tz = tickStep(x0, x1, tz);\n      tz = range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x0 <= x && x <= x1) {\n        bins[bisectRight(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n  };\n\n  return histogram;\n}\n\nfunction quantile(values, p, valueof) {\n  if (valueof == null) valueof = number;\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction freedmanDiaconis(values, min, max) {\n  values = map.call(values, number).sort(ascending);\n  return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n}\n\nfunction scott(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));\n}\n\nfunction max(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n}\n\nfunction mean(values, valueof) {\n  var n = values.length,\n      m = n,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = number(values[i]))) sum += value;\n      else --m;\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;\n      else --m;\n    }\n  }\n\n  if (m) return sum / m;\n}\n\nfunction median(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      numbers = [];\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (!isNaN(value = number(values[i]))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (!isNaN(value = number(valueof(values[i], i, values)))) {\n        numbers.push(value);\n      }\n    }\n  }\n\n  return quantile(numbers.sort(ascending), 0.5);\n}\n\nfunction merge(arrays) {\n  var n = arrays.length,\n      m,\n      i = -1,\n      j = 0,\n      merged,\n      array;\n\n  while (++i < n) j += arrays[i].length;\n  merged = new Array(j);\n\n  while (--n >= 0) {\n    array = arrays[n];\n    m = array.length;\n    while (--m >= 0) {\n      merged[--j] = array[m];\n    }\n  }\n\n  return merged;\n}\n\nfunction min(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  return min;\n}\n\nfunction permute(array, indexes) {\n  var i = indexes.length, permutes = new Array(i);\n  while (i--) permutes[i] = array[indexes[i]];\n  return permutes;\n}\n\nfunction scan(values, compare) {\n  if (!(n = values.length)) return;\n  var n,\n      i = 0,\n      j = 0,\n      xi,\n      xj = values[j];\n\n  if (compare == null) compare = ascending;\n\n  while (++i < n) {\n    if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n      xj = xi, j = i;\n    }\n  }\n\n  if (compare(xj, xj) === 0) return j;\n}\n\nfunction shuffle(array, i0, i1) {\n  var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m + i0];\n    array[m + i0] = array[i + i0];\n    array[i + i0] = t;\n  }\n\n  return array;\n}\n\nfunction sum(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n    }\n  }\n\n  else {\n    while (++i < n) {\n      if (value = +valueof(values[i], i, values)) sum += value;\n    }\n  }\n\n  return sum;\n}\n\nfunction transpose(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n}\n\nfunction length(d) {\n  return d.length;\n}\n\nfunction zip() {\n  return transpose(arguments);\n}\n\nexports.bisect = bisectRight;\nexports.bisectRight = bisectRight;\nexports.bisectLeft = bisectLeft;\nexports.ascending = ascending;\nexports.bisector = bisector;\nexports.cross = cross;\nexports.descending = descending;\nexports.deviation = deviation;\nexports.extent = extent;\nexports.histogram = histogram;\nexports.thresholdFreedmanDiaconis = freedmanDiaconis;\nexports.thresholdScott = scott;\nexports.thresholdSturges = sturges;\nexports.max = max;\nexports.mean = mean;\nexports.median = median;\nexports.merge = merge;\nexports.min = min;\nexports.pairs = pairs;\nexports.permute = permute;\nexports.quantile = quantile;\nexports.range = range;\nexports.scan = scan;\nexports.shuffle = shuffle;\nexports.sum = sum;\nexports.ticks = ticks;\nexports.tickIncrement = tickIncrement;\nexports.tickStep = tickStep;\nexports.transpose = transpose;\nexports.variance = variance;\nexports.zip = zip;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],146:[function(_dereq_,module,exports){\n// https://d3js.org/d3-collection/ Version 1.0.4. Copyright 2017 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nvar prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function(key) {\n    return (prefix + key) in this;\n  },\n  get: function(key) {\n    return this[prefix + key];\n  },\n  set: function(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function() {\n    for (var property in this) if (property[0] === prefix) delete this[property];\n  },\n  keys: function() {\n    var keys = [];\n    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n    return keys;\n  },\n  values: function() {\n    var values = [];\n    for (var property in this) if (property[0] === prefix) values.push(this[property]);\n    return values;\n  },\n  entries: function() {\n    var entries = [];\n    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n    return entries;\n  },\n  size: function() {\n    var size = 0;\n    for (var property in this) if (property[0] === prefix) ++size;\n    return size;\n  },\n  empty: function() {\n    for (var property in this) if (property[0] === prefix) return false;\n    return true;\n  },\n  each: function(f) {\n    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map;\n\n  // Copy constructor.\n  if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n  // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n    var i = -1,\n        n = object.length,\n        o;\n\n    if (f == null) while (++i < n) map.set(i, object[i]);\n    else while (++i < n) map.set(f(o = object[i], i, object), o);\n  }\n\n  // Convert object to map.\n  else if (object) for (var key in object) map.set(key, object[key]);\n\n  return map;\n}\n\nvar nest = function() {\n  var keys = [],\n      sortKeys = [],\n      sortValues,\n      rollup,\n      nest;\n\n  function apply(array, depth, createResult, setResult) {\n    if (depth >= keys.length) {\n      if (sortValues != null) array.sort(sortValues);\n      return rollup != null ? rollup(array) : array;\n    }\n\n    var i = -1,\n        n = array.length,\n        key = keys[depth++],\n        keyValue,\n        value,\n        valuesByKey = map(),\n        values,\n        result = createResult();\n\n    while (++i < n) {\n      if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n        values.push(value);\n      } else {\n        valuesByKey.set(keyValue, [value]);\n      }\n    }\n\n    valuesByKey.each(function(values, key) {\n      setResult(result, key, apply(values, depth, createResult, setResult));\n    });\n\n    return result;\n  }\n\n  function entries(map$$1, depth) {\n    if (++depth > keys.length) return map$$1;\n    var array, sortKey = sortKeys[depth - 1];\n    if (rollup != null && depth >= keys.length) array = map$$1.entries();\n    else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });\n    return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;\n  }\n\n  return nest = {\n    object: function(array) { return apply(array, 0, createObject, setObject); },\n    map: function(array) { return apply(array, 0, createMap, setMap); },\n    entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },\n    key: function(d) { keys.push(d); return nest; },\n    sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },\n    sortValues: function(order) { sortValues = order; return nest; },\n    rollup: function(f) { rollup = f; return nest; }\n  };\n};\n\nfunction createObject() {\n  return {};\n}\n\nfunction setObject(object, key, value) {\n  object[key] = value;\n}\n\nfunction createMap() {\n  return map();\n}\n\nfunction setMap(map$$1, key, value) {\n  map$$1.set(key, value);\n}\n\nfunction Set() {}\n\nvar proto = map.prototype;\n\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function(value) {\n    value += \"\";\n    this[prefix + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set;\n\n  // Copy constructor.\n  if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n  // Otherwise, assume it’s an array.\n  else if (object) {\n    var i = -1, n = object.length;\n    if (f == null) while (++i < n) set.add(object[i]);\n    else while (++i < n) set.add(f(object[i], i, object));\n  }\n\n  return set;\n}\n\nvar keys = function(map) {\n  var keys = [];\n  for (var key in map) keys.push(key);\n  return keys;\n};\n\nvar values = function(map) {\n  var values = [];\n  for (var key in map) values.push(map[key]);\n  return values;\n};\n\nvar entries = function(map) {\n  var entries = [];\n  for (var key in map) entries.push({key: key, value: map[key]});\n  return entries;\n};\n\nexports.nest = nest;\nexports.set = set;\nexports.map = map;\nexports.keys = keys;\nexports.values = values;\nexports.entries = entries;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],147:[function(_dereq_,module,exports){\n// https://d3js.org/d3-color/ v1.2.3 Copyright 2018 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nfunction define(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex3 = /^#([0-9a-f]{3})$/,\n    reHex6 = /^#([0-9a-f]{6})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: function() {\n    return this.rgb().hex();\n  },\n  toString: function() {\n    return this.rgb() + \"\";\n  }\n});\n\nfunction color(format) {\n  var m;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00\n      : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format])\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (0 <= this.r && this.r <= 255)\n        && (0 <= this.g && this.g <= 255)\n        && (0 <= this.b && this.b <= 255)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: function() {\n    return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n  },\n  toString: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"rgb(\" : \"rgba(\")\n        + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\nvar deg2rad = Math.PI / 180;\nvar rad2deg = 180 / Math.PI;\n\n// https://beta.observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) {\n    if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n    var h = o.h * deg2rad;\n    return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n  }\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * rad2deg;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return labConvert(this).rgb();\n  }\n}));\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n\nexports.color = color;\nexports.rgb = rgb;\nexports.hsl = hsl;\nexports.lab = lab;\nexports.hcl = hcl;\nexports.lch = lch;\nexports.gray = gray;\nexports.cubehelix = cubehelix;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],148:[function(_dereq_,module,exports){\n// https://d3js.org/d3-dispatch/ Version 1.0.3. Copyright 2017 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nvar noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexports.dispatch = dispatch;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],149:[function(_dereq_,module,exports){\n// https://d3js.org/d3-force/ Version 1.1.0. Copyright 2017 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, _dereq_('d3-quadtree'), _dereq_('d3-collection'), _dereq_('d3-dispatch'), _dereq_('d3-timer')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) :\n\t(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3));\n}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict';\n\nvar center = function(x, y) {\n  var nodes;\n\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force() {\n    var i,\n        n = nodes.length,\n        node,\n        sx = 0,\n        sy = 0;\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], sx += node.x, sy += node.y;\n    }\n\n    for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {\n      node = nodes[i], node.x -= sx, node.y -= sy;\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n};\n\nvar constant = function(x) {\n  return function() {\n    return x;\n  };\n};\n\nvar jiggle = function() {\n  return (Math.random() - 0.5) * 1e-6;\n};\n\nfunction x(d) {\n  return d.x + d.vx;\n}\n\nfunction y(d) {\n  return d.y + d.vy;\n}\n\nvar collide = function(radius) {\n  var nodes,\n      radii,\n      strength = 1,\n      iterations = 1;\n\n  if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n  function force() {\n    var i, n = nodes.length,\n        tree,\n        node,\n        xi,\n        yi,\n        ri,\n        ri2;\n\n    for (var k = 0; k < iterations; ++k) {\n      tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare);\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        ri = radii[node.index], ri2 = ri * ri;\n        xi = node.x + node.vx;\n        yi = node.y + node.vy;\n        tree.visit(apply);\n      }\n    }\n\n    function apply(quad, x0, y0, x1, y1) {\n      var data = quad.data, rj = quad.r, r = ri + rj;\n      if (data) {\n        if (data.index > node.index) {\n          var x = xi - data.x - data.vx,\n              y = yi - data.y - data.vy,\n              l = x * x + y * y;\n          if (l < r * r) {\n            if (x === 0) x = jiggle(), l += x * x;\n            if (y === 0) y = jiggle(), l += y * y;\n            l = (r - (l = Math.sqrt(l))) / l * strength;\n            node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n            node.vy += (y *= l) * r;\n            data.vx -= x * (r = 1 - r);\n            data.vy -= y * r;\n          }\n        }\n        return;\n      }\n      return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n    }\n  }\n\n  function prepare(quad) {\n    if (quad.data) return quad.r = radii[quad.data.index];\n    for (var i = quad.r = 0; i < 4; ++i) {\n      if (quad[i] && quad[i].r > quad.r) {\n        quad.r = quad[i].r;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    radii = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = +_, force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n  };\n\n  return force;\n};\n\nfunction index(d) {\n  return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n  var node = nodeById.get(nodeId);\n  if (!node) throw new Error(\"missing: \" + nodeId);\n  return node;\n}\n\nvar link = function(links) {\n  var id = index,\n      strength = defaultStrength,\n      strengths,\n      distance = constant(30),\n      distances,\n      nodes,\n      count,\n      bias,\n      iterations = 1;\n\n  if (links == null) links = [];\n\n  function defaultStrength(link) {\n    return 1 / Math.min(count[link.source.index], count[link.target.index]);\n  }\n\n  function force(alpha) {\n    for (var k = 0, n = links.length; k < iterations; ++k) {\n      for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n        link = links[i], source = link.source, target = link.target;\n        x = target.x + target.vx - source.x - source.vx || jiggle();\n        y = target.y + target.vy - source.y - source.vy || jiggle();\n        l = Math.sqrt(x * x + y * y);\n        l = (l - distances[i]) / l * alpha * strengths[i];\n        x *= l, y *= l;\n        target.vx -= x * (b = bias[i]);\n        target.vy -= y * b;\n        source.vx += x * (b = 1 - b);\n        source.vy += y * b;\n      }\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n\n    var i,\n        n = nodes.length,\n        m = links.length,\n        nodeById = d3Collection.map(nodes, id),\n        link;\n\n    for (i = 0, count = new Array(n); i < m; ++i) {\n      link = links[i], link.index = i;\n      if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n      if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n      count[link.source.index] = (count[link.source.index] || 0) + 1;\n      count[link.target.index] = (count[link.target.index] || 0) + 1;\n    }\n\n    for (i = 0, bias = new Array(m); i < m; ++i) {\n      link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n    }\n\n    strengths = new Array(m), initializeStrength();\n    distances = new Array(m), initializeDistance();\n  }\n\n  function initializeStrength() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      strengths[i] = +strength(links[i], i, links);\n    }\n  }\n\n  function initializeDistance() {\n    if (!nodes) return;\n\n    for (var i = 0, n = links.length; i < n; ++i) {\n      distances[i] = +distance(links[i], i, links);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.links = function(_) {\n    return arguments.length ? (links = _, initialize(), force) : links;\n  };\n\n  force.id = function(_) {\n    return arguments.length ? (id = _, force) : id;\n  };\n\n  force.iterations = function(_) {\n    return arguments.length ? (iterations = +_, force) : iterations;\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n  };\n\n  force.distance = function(_) {\n    return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n  };\n\n  return force;\n};\n\nfunction x$1(d) {\n  return d.x;\n}\n\nfunction y$1(d) {\n  return d.y;\n}\n\nvar initialRadius = 10;\nvar initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nvar simulation = function(nodes) {\n  var simulation,\n      alpha = 1,\n      alphaMin = 0.001,\n      alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n      alphaTarget = 0,\n      velocityDecay = 0.6,\n      forces = d3Collection.map(),\n      stepper = d3Timer.timer(step),\n      event = d3Dispatch.dispatch(\"tick\", \"end\");\n\n  if (nodes == null) nodes = [];\n\n  function step() {\n    tick();\n    event.call(\"tick\", simulation);\n    if (alpha < alphaMin) {\n      stepper.stop();\n      event.call(\"end\", simulation);\n    }\n  }\n\n  function tick() {\n    var i, n = nodes.length, node;\n\n    alpha += (alphaTarget - alpha) * alphaDecay;\n\n    forces.each(function(force) {\n      force(alpha);\n    });\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i];\n      if (node.fx == null) node.x += node.vx *= velocityDecay;\n      else node.x = node.fx, node.vx = 0;\n      if (node.fy == null) node.y += node.vy *= velocityDecay;\n      else node.y = node.fy, node.vy = 0;\n    }\n  }\n\n  function initializeNodes() {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.index = i;\n      if (isNaN(node.x) || isNaN(node.y)) {\n        var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;\n        node.x = radius * Math.cos(angle);\n        node.y = radius * Math.sin(angle);\n      }\n      if (isNaN(node.vx) || isNaN(node.vy)) {\n        node.vx = node.vy = 0;\n      }\n    }\n  }\n\n  function initializeForce(force) {\n    if (force.initialize) force.initialize(nodes);\n    return force;\n  }\n\n  initializeNodes();\n\n  return simulation = {\n    tick: tick,\n\n    restart: function() {\n      return stepper.restart(step), simulation;\n    },\n\n    stop: function() {\n      return stepper.stop(), simulation;\n    },\n\n    nodes: function(_) {\n      return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;\n    },\n\n    alpha: function(_) {\n      return arguments.length ? (alpha = +_, simulation) : alpha;\n    },\n\n    alphaMin: function(_) {\n      return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n    },\n\n    alphaDecay: function(_) {\n      return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n    },\n\n    alphaTarget: function(_) {\n      return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n    },\n\n    velocityDecay: function(_) {\n      return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n    },\n\n    force: function(name, _) {\n      return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n    },\n\n    find: function(x, y, radius) {\n      var i = 0,\n          n = nodes.length,\n          dx,\n          dy,\n          d2,\n          node,\n          closest;\n\n      if (radius == null) radius = Infinity;\n      else radius *= radius;\n\n      for (i = 0; i < n; ++i) {\n        node = nodes[i];\n        dx = x - node.x;\n        dy = y - node.y;\n        d2 = dx * dx + dy * dy;\n        if (d2 < radius) closest = node, radius = d2;\n      }\n\n      return closest;\n    },\n\n    on: function(name, _) {\n      return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n    }\n  };\n};\n\nvar manyBody = function() {\n  var nodes,\n      node,\n      alpha,\n      strength = constant(-30),\n      strengths,\n      distanceMin2 = 1,\n      distanceMax2 = Infinity,\n      theta2 = 0.81;\n\n  function force(_) {\n    var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate);\n    for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length, node;\n    strengths = new Array(n);\n    for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n  }\n\n  function accumulate(quad) {\n    var strength = 0, q, c, weight = 0, x, y, i;\n\n    // For internal nodes, accumulate forces from child quadrants.\n    if (quad.length) {\n      for (x = y = i = 0; i < 4; ++i) {\n        if ((q = quad[i]) && (c = Math.abs(q.value))) {\n          strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n        }\n      }\n      quad.x = x / weight;\n      quad.y = y / weight;\n    }\n\n    // For leaf nodes, accumulate forces from coincident quadrants.\n    else {\n      q = quad;\n      q.x = q.data.x;\n      q.y = q.data.y;\n      do strength += strengths[q.data.index];\n      while (q = q.next);\n    }\n\n    quad.value = strength;\n  }\n\n  function apply(quad, x1, _, x2) {\n    if (!quad.value) return true;\n\n    var x = quad.x - node.x,\n        y = quad.y - node.y,\n        w = x2 - x1,\n        l = x * x + y * y;\n\n    // Apply the Barnes-Hut approximation if possible.\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (w * w / theta2 < l) {\n      if (l < distanceMax2) {\n        if (x === 0) x = jiggle(), l += x * x;\n        if (y === 0) y = jiggle(), l += y * y;\n        if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n        node.vx += x * quad.value * alpha / l;\n        node.vy += y * quad.value * alpha / l;\n      }\n      return true;\n    }\n\n    // Otherwise, process points directly.\n    else if (quad.length || l >= distanceMax2) return;\n\n    // Limit forces for very close nodes; randomize direction if coincident.\n    if (quad.data !== node || quad.next) {\n      if (x === 0) x = jiggle(), l += x * x;\n      if (y === 0) y = jiggle(), l += y * y;\n      if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n    }\n\n    do if (quad.data !== node) {\n      w = strengths[quad.data.index] * alpha / l;\n      node.vx += x * w;\n      node.vy += y * w;\n    } while (quad = quad.next);\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n  };\n\n  force.distanceMin = function(_) {\n    return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n  };\n\n  force.distanceMax = function(_) {\n    return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n  };\n\n  force.theta = function(_) {\n    return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n  };\n\n  return force;\n};\n\nvar radial = function(radius, x, y) {\n  var nodes,\n      strength = constant(0.1),\n      strengths,\n      radiuses;\n\n  if (typeof radius !== \"function\") radius = constant(+radius);\n  if (x == null) x = 0;\n  if (y == null) y = 0;\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length; i < n; ++i) {\n      var node = nodes[i],\n          dx = node.x - x || 1e-6,\n          dy = node.y - y || 1e-6,\n          r = Math.sqrt(dx * dx + dy * dy),\n          k = (radiuses[i] - r) * strengths[i] * alpha / r;\n      node.vx += dx * k;\n      node.vy += dy * k;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    radiuses = new Array(n);\n    for (i = 0; i < n; ++i) {\n      radiuses[i] = +radius(nodes[i], i, nodes);\n      strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _, initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n  };\n\n  force.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = +_, force) : x;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = +_, force) : y;\n  };\n\n  return force;\n};\n\nvar x$2 = function(x) {\n  var strength = constant(0.1),\n      nodes,\n      strengths,\n      xz;\n\n  if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    xz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n  };\n\n  force.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n  };\n\n  return force;\n};\n\nvar y$2 = function(y) {\n  var strength = constant(0.1),\n      nodes,\n      strengths,\n      yz;\n\n  if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n  function force(alpha) {\n    for (var i = 0, n = nodes.length, node; i < n; ++i) {\n      node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n    }\n  }\n\n  function initialize() {\n    if (!nodes) return;\n    var i, n = nodes.length;\n    strengths = new Array(n);\n    yz = new Array(n);\n    for (i = 0; i < n; ++i) {\n      strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n    }\n  }\n\n  force.initialize = function(_) {\n    nodes = _;\n    initialize();\n  };\n\n  force.strength = function(_) {\n    return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n  };\n\n  force.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n  };\n\n  return force;\n};\n\nexports.forceCenter = center;\nexports.forceCollide = collide;\nexports.forceLink = link;\nexports.forceManyBody = manyBody;\nexports.forceRadial = radial;\nexports.forceSimulation = simulation;\nexports.forceX = x$2;\nexports.forceY = y$2;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{\"d3-collection\":146,\"d3-dispatch\":148,\"d3-quadtree\":153,\"d3-timer\":156}],150:[function(_dereq_,module,exports){\n// https://d3js.org/d3-hierarchy/ v1.1.8 Copyright 2018 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n  return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n  return x + c.x;\n}\n\nfunction maxY(children) {\n  return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n  return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n  var children;\n  while (children = node.children) node = children[0];\n  return node;\n}\n\nfunction leafRight(node) {\n  var children;\n  while (children = node.children) node = children[children.length - 1];\n  return node;\n}\n\nfunction cluster() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = false;\n\n  function cluster(root) {\n    var previousNode,\n        x = 0;\n\n    // First walk, computing the initial x & y values.\n    root.eachAfter(function(node) {\n      var children = node.children;\n      if (children) {\n        node.x = meanX(children);\n        node.y = maxY(children);\n      } else {\n        node.x = previousNode ? x += separation(node, previousNode) : 0;\n        node.y = 0;\n        previousNode = node;\n      }\n    });\n\n    var left = leafLeft(root),\n        right = leafRight(root),\n        x0 = left.x - separation(left, right) / 2,\n        x1 = right.x + separation(right, left) / 2;\n\n    // Second walk, normalizing x & y to the desired size.\n    return root.eachAfter(nodeSize ? function(node) {\n      node.x = (node.x - root.x) * dx;\n      node.y = (root.y - node.y) * dy;\n    } : function(node) {\n      node.x = (node.x - x0) / (x1 - x0) * dx;\n      node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n    });\n  }\n\n  cluster.separation = function(x) {\n    return arguments.length ? (separation = x, cluster) : separation;\n  };\n\n  cluster.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n  };\n\n  cluster.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return cluster;\n}\n\nfunction count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\nfunction node_count() {\n  return this.eachAfter(count);\n}\n\nfunction node_each(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n}\n\nfunction node_eachBefore(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n}\n\nfunction node_eachAfter(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n}\n\nfunction node_sum(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n}\n\nfunction node_sort(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}\n\nfunction node_path(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n\nfunction node_ancestors() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n}\n\nfunction node_descendants() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n}\n\nfunction node_leaves() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}\n\nfunction node_links() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n}\n\nfunction hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nfunction computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nfunction Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy\n};\n\nvar slice = Array.prototype.slice;\n\nfunction shuffle(array) {\n  var m = array.length,\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m];\n    array[m] = array[i];\n    array[i] = t;\n  }\n\n  return array;\n}\n\nfunction enclose(circles) {\n  var i = 0, n = (circles = shuffle(slice.call(circles))).length, B = [], p, e;\n\n  while (i < n) {\n    p = circles[i];\n    if (e && enclosesWeak(e, p)) ++i;\n    else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n  }\n\n  return e;\n}\n\nfunction extendBasis(B, p) {\n  var i, j;\n\n  if (enclosesWeakAll(p, B)) return [p];\n\n  // If we get here then B must have at least one element.\n  for (i = 0; i < B.length; ++i) {\n    if (enclosesNot(p, B[i])\n        && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n      return [B[i], p];\n    }\n  }\n\n  // If we get here then B must have at least two elements.\n  for (i = 0; i < B.length - 1; ++i) {\n    for (j = i + 1; j < B.length; ++j) {\n      if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n          && enclosesNot(encloseBasis2(B[i], p), B[j])\n          && enclosesNot(encloseBasis2(B[j], p), B[i])\n          && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n        return [B[i], B[j], p];\n      }\n    }\n  }\n\n  // If we get here then something is very wrong.\n  throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n  var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n  return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n  var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n  for (var i = 0; i < B.length; ++i) {\n    if (!enclosesWeak(a, B[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction encloseBasis(B) {\n  switch (B.length) {\n    case 1: return encloseBasis1(B[0]);\n    case 2: return encloseBasis2(B[0], B[1]);\n    case 3: return encloseBasis3(B[0], B[1], B[2]);\n  }\n}\n\nfunction encloseBasis1(a) {\n  return {\n    x: a.x,\n    y: a.y,\n    r: a.r\n  };\n}\n\nfunction encloseBasis2(a, b) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n      l = Math.sqrt(x21 * x21 + y21 * y21);\n  return {\n    x: (x1 + x2 + x21 / l * r21) / 2,\n    y: (y1 + y2 + y21 / l * r21) / 2,\n    r: (l + r1 + r2) / 2\n  };\n}\n\nfunction encloseBasis3(a, b, c) {\n  var x1 = a.x, y1 = a.y, r1 = a.r,\n      x2 = b.x, y2 = b.y, r2 = b.r,\n      x3 = c.x, y3 = c.y, r3 = c.r,\n      a2 = x1 - x2,\n      a3 = x1 - x3,\n      b2 = y1 - y2,\n      b3 = y1 - y3,\n      c2 = r2 - r1,\n      c3 = r3 - r1,\n      d1 = x1 * x1 + y1 * y1 - r1 * r1,\n      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n      ab = a3 * b2 - a2 * b3,\n      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n      xb = (b3 * c2 - b2 * c3) / ab,\n      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n      yb = (a2 * c3 - a3 * c2) / ab,\n      A = xb * xb + yb * yb - 1,\n      B = 2 * (r1 + xa * xb + ya * yb),\n      C = xa * xa + ya * ya - r1 * r1,\n      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n  return {\n    x: x1 + xa + xb * r,\n    y: y1 + ya + yb * r,\n    r: r\n  };\n}\n\nfunction place(b, a, c) {\n  var dx = b.x - a.x, x, a2,\n      dy = b.y - a.y, y, b2,\n      d2 = dx * dx + dy * dy;\n  if (d2) {\n    a2 = a.r + c.r, a2 *= a2;\n    b2 = b.r + c.r, b2 *= b2;\n    if (a2 > b2) {\n      x = (d2 + b2 - a2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n      c.x = b.x - x * dx - y * dy;\n      c.y = b.y - x * dy + y * dx;\n    } else {\n      x = (d2 + a2 - b2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n      c.x = a.x + x * dx - y * dy;\n      c.y = a.y + x * dy + y * dx;\n    }\n  } else {\n    c.x = a.x + c.r;\n    c.y = a.y;\n  }\n}\n\nfunction intersects(a, b) {\n  var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n  var a = node._,\n      b = node.next._,\n      ab = a.r + b.r,\n      dx = (a.x * b.r + b.x * a.r) / ab,\n      dy = (a.y * b.r + b.y * a.r) / ab;\n  return dx * dx + dy * dy;\n}\n\nfunction Node$1(circle) {\n  this._ = circle;\n  this.next = null;\n  this.previous = null;\n}\n\nfunction packEnclose(circles) {\n  if (!(n = circles.length)) return 0;\n\n  var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n  // Place the first circle.\n  a = circles[0], a.x = 0, a.y = 0;\n  if (!(n > 1)) return a.r;\n\n  // Place the second circle.\n  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n  if (!(n > 2)) return a.r + b.r;\n\n  // Place the third circle.\n  place(b, a, c = circles[2]);\n\n  // Initialize the front-chain using the first three circles a, b and c.\n  a = new Node$1(a), b = new Node$1(b), c = new Node$1(c);\n  a.next = c.previous = b;\n  b.next = a.previous = c;\n  c.next = b.previous = a;\n\n  // Attempt to place each remaining circle…\n  pack: for (i = 3; i < n; ++i) {\n    place(a._, b._, c = circles[i]), c = new Node$1(c);\n\n    // Find the closest intersecting circle on the front-chain, if any.\n    // “Closeness” is determined by linear distance along the front-chain.\n    // “Ahead” or “behind” is likewise determined by linear distance.\n    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n    do {\n      if (sj <= sk) {\n        if (intersects(j._, c._)) {\n          b = j, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sj += j._.r, j = j.next;\n      } else {\n        if (intersects(k._, c._)) {\n          a = k, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n        sk += k._.r, k = k.previous;\n      }\n    } while (j !== k.next);\n\n    // Success! Insert the new circle c between a and b.\n    c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n    // Compute the new closest circle pair to the centroid.\n    aa = score(a);\n    while ((c = c.next) !== b) {\n      if ((ca = score(c)) < aa) {\n        a = c, aa = ca;\n      }\n    }\n    b = a.next;\n  }\n\n  // Compute the enclosing circle of the front chain.\n  a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a);\n\n  // Translate the circles to put the enclosing circle around the origin.\n  for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n  return c.r;\n}\n\nfunction siblings(circles) {\n  packEnclose(circles);\n  return circles;\n}\n\nfunction optional(f) {\n  return f == null ? null : required(f);\n}\n\nfunction required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n\nfunction constantZero() {\n  return 0;\n}\n\nfunction constant(x) {\n  return function() {\n    return x;\n  };\n}\n\nfunction defaultRadius(d) {\n  return Math.sqrt(d.value);\n}\n\nfunction index() {\n  var radius = null,\n      dx = 1,\n      dy = 1,\n      padding = constantZero;\n\n  function pack(root) {\n    root.x = dx / 2, root.y = dy / 2;\n    if (radius) {\n      root.eachBefore(radiusLeaf(radius))\n          .eachAfter(packChildren(padding, 0.5))\n          .eachBefore(translateChild(1));\n    } else {\n      root.eachBefore(radiusLeaf(defaultRadius))\n          .eachAfter(packChildren(constantZero, 1))\n          .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n          .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n    }\n    return root;\n  }\n\n  pack.radius = function(x) {\n    return arguments.length ? (radius = optional(x), pack) : radius;\n  };\n\n  pack.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n  };\n\n  pack.padding = function(x) {\n    return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n  };\n\n  return pack;\n}\n\nfunction radiusLeaf(radius) {\n  return function(node) {\n    if (!node.children) {\n      node.r = Math.max(0, +radius(node) || 0);\n    }\n  };\n}\n\nfunction packChildren(padding, k) {\n  return function(node) {\n    if (children = node.children) {\n      var children,\n          i,\n          n = children.length,\n          r = padding(node) * k || 0,\n          e;\n\n      if (r) for (i = 0; i < n; ++i) children[i].r += r;\n      e = packEnclose(children);\n      if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n      node.r = e + r;\n    }\n  };\n}\n\nfunction translateChild(k) {\n  return function(node) {\n    var parent = node.parent;\n    node.r *= k;\n    if (parent) {\n      node.x = parent.x + k * node.x;\n      node.y = parent.y + k * node.y;\n    }\n  };\n}\n\nfunction roundNode(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n}\n\nfunction treemapDice(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n}\n\nfunction partition() {\n  var dx = 1,\n      dy = 1,\n      padding = 0,\n      round = false;\n\n  function partition(root) {\n    var n = root.height + 1;\n    root.x0 =\n    root.y0 = padding;\n    root.x1 = dx;\n    root.y1 = dy / n;\n    root.eachBefore(positionNode(dy, n));\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(dy, n) {\n    return function(node) {\n      if (node.children) {\n        treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n      }\n      var x0 = node.x0,\n          y0 = node.y0,\n          x1 = node.x1 - padding,\n          y1 = node.y1 - padding;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      node.x0 = x0;\n      node.y0 = y0;\n      node.x1 = x1;\n      node.y1 = y1;\n    };\n  }\n\n  partition.round = function(x) {\n    return arguments.length ? (round = !!x, partition) : round;\n  };\n\n  partition.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n  };\n\n  partition.padding = function(x) {\n    return arguments.length ? (padding = +x, partition) : padding;\n  };\n\n  return partition;\n}\n\nvar keyPrefix = \"$\", // Protect against keys like “__proto__”.\n    preroot = {depth: -1},\n    ambiguous = {};\n\nfunction defaultId(d) {\n  return d.id;\n}\n\nfunction defaultParentId(d) {\n  return d.parentId;\n}\n\nfunction stratify() {\n  var id = defaultId,\n      parentId = defaultParentId;\n\n  function stratify(data) {\n    var d,\n        i,\n        n = data.length,\n        root,\n        parent,\n        node,\n        nodes = new Array(n),\n        nodeId,\n        nodeKey,\n        nodeByKey = {};\n\n    for (i = 0; i < n; ++i) {\n      d = data[i], node = nodes[i] = new Node(d);\n      if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n        nodeKey = keyPrefix + (node.id = nodeId);\n        nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;\n      }\n    }\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i], nodeId = parentId(data[i], i, data);\n      if (nodeId == null || !(nodeId += \"\")) {\n        if (root) throw new Error(\"multiple roots\");\n        root = node;\n      } else {\n        parent = nodeByKey[keyPrefix + nodeId];\n        if (!parent) throw new Error(\"missing: \" + nodeId);\n        if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n        if (parent.children) parent.children.push(node);\n        else parent.children = [node];\n        node.parent = parent;\n      }\n    }\n\n    if (!root) throw new Error(\"no root\");\n    root.parent = preroot;\n    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n    root.parent = null;\n    if (n > 0) throw new Error(\"cycle\");\n\n    return root;\n  }\n\n  stratify.id = function(x) {\n    return arguments.length ? (id = required(x), stratify) : id;\n  };\n\n  stratify.parentId = function(x) {\n    return arguments.length ? (parentId = required(x), stratify) : parentId;\n  };\n\n  return stratify;\n}\n\nfunction defaultSeparation$1(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n//   return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n  var children = v.children;\n  return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n  var children = v.children;\n  return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n  var change = shift / (wp.i - wm.i);\n  wp.c -= change;\n  wp.s += shift;\n  wm.c += change;\n  wp.z += shift;\n  wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n  var shift = 0,\n      change = 0,\n      children = v.children,\n      i = children.length,\n      w;\n  while (--i >= 0) {\n    w = children[i];\n    w.z += shift;\n    w.m += shift;\n    shift += w.s + (change += w.c);\n  }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n  return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n  this._ = node;\n  this.parent = null;\n  this.children = null;\n  this.A = null; // default ancestor\n  this.a = this; // ancestor\n  this.z = 0; // prelim\n  this.m = 0; // mod\n  this.c = 0; // change\n  this.s = 0; // shift\n  this.t = null; // thread\n  this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n  var tree = new TreeNode(root, 0),\n      node,\n      nodes = [tree],\n      child,\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if (children = node._.children) {\n      node.children = new Array(n = children.length);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n        child.parent = node;\n      }\n    }\n  }\n\n  (tree.parent = new TreeNode(null, 0)).children = [tree];\n  return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nfunction tree() {\n  var separation = defaultSeparation$1,\n      dx = 1,\n      dy = 1,\n      nodeSize = null;\n\n  function tree(root) {\n    var t = treeRoot(root);\n\n    // Compute the layout using Buchheim et al.’s algorithm.\n    t.eachAfter(firstWalk), t.parent.m = -t.z;\n    t.eachBefore(secondWalk);\n\n    // If a fixed node size is specified, scale x and y.\n    if (nodeSize) root.eachBefore(sizeNode);\n\n    // If a fixed tree size is specified, scale x and y based on the extent.\n    // Compute the left-most, right-most, and depth-most nodes for extents.\n    else {\n      var left = root,\n          right = root,\n          bottom = root;\n      root.eachBefore(function(node) {\n        if (node.x < left.x) left = node;\n        if (node.x > right.x) right = node;\n        if (node.depth > bottom.depth) bottom = node;\n      });\n      var s = left === right ? 1 : separation(left, right) / 2,\n          tx = s - left.x,\n          kx = dx / (right.x + s + tx),\n          ky = dy / (bottom.depth || 1);\n      root.eachBefore(function(node) {\n        node.x = (node.x + tx) * kx;\n        node.y = node.depth * ky;\n      });\n    }\n\n    return root;\n  }\n\n  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n  // applied recursively to the children of v, as well as the function\n  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n  // node v is placed to the midpoint of its outermost children.\n  function firstWalk(v) {\n    var children = v.children,\n        siblings = v.parent.children,\n        w = v.i ? siblings[v.i - 1] : null;\n    if (children) {\n      executeShifts(v);\n      var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n      if (w) {\n        v.z = w.z + separation(v._, w._);\n        v.m = v.z - midpoint;\n      } else {\n        v.z = midpoint;\n      }\n    } else if (w) {\n      v.z = w.z + separation(v._, w._);\n    }\n    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n  }\n\n  // Computes all real x-coordinates by summing up the modifiers recursively.\n  function secondWalk(v) {\n    v._.x = v.z + v.parent.m;\n    v.m += v.parent.m;\n  }\n\n  // The core of the algorithm. Here, a new subtree is combined with the\n  // previous subtrees. Threads are used to traverse the inside and outside\n  // contours of the left and right subtree up to the highest common level. The\n  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n  // superscript o means outside and i means inside, the subscript - means left\n  // subtree and + means right subtree. For summing up the modifiers along the\n  // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n  // nodes of the inside contours conflict, we compute the left one of the\n  // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n  // Finally, we add a new thread (if necessary).\n  function apportion(v, w, ancestor) {\n    if (w) {\n      var vip = v,\n          vop = v,\n          vim = w,\n          vom = vip.parent.children[0],\n          sip = vip.m,\n          sop = vop.m,\n          sim = vim.m,\n          som = vom.m,\n          shift;\n      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n        vom = nextLeft(vom);\n        vop = nextRight(vop);\n        vop.a = v;\n        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n        if (shift > 0) {\n          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n          sip += shift;\n          sop += shift;\n        }\n        sim += vim.m;\n        sip += vip.m;\n        som += vom.m;\n        sop += vop.m;\n      }\n      if (vim && !nextRight(vop)) {\n        vop.t = vim;\n        vop.m += sim - sop;\n      }\n      if (vip && !nextLeft(vom)) {\n        vom.t = vip;\n        vom.m += sip - som;\n        ancestor = v;\n      }\n    }\n    return ancestor;\n  }\n\n  function sizeNode(node) {\n    node.x *= dx;\n    node.y = node.depth * dy;\n  }\n\n  tree.separation = function(x) {\n    return arguments.length ? (separation = x, tree) : separation;\n  };\n\n  tree.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n  };\n\n  tree.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return tree;\n}\n\nfunction treemapSlice(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n}\n\nvar phi = (1 + Math.sqrt(5)) / 2;\n\nfunction squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\nvar squarify = (function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi);\n\nfunction index$1() {\n  var tile = squarify,\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = constantZero,\n      paddingTop = constantZero,\n      paddingRight = constantZero,\n      paddingBottom = constantZero,\n      paddingLeft = constantZero;\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = required(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n}\n\nfunction binary(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      i, n = nodes.length,\n      sum, sums = new Array(n + 1);\n\n  for (sums[0] = sum = i = 0; i < n; ++i) {\n    sums[i + 1] = sum += nodes[i].value;\n  }\n\n  partition(0, n, parent.value, x0, y0, x1, y1);\n\n  function partition(i, j, value, x0, y0, x1, y1) {\n    if (i >= j - 1) {\n      var node = nodes[i];\n      node.x0 = x0, node.y0 = y0;\n      node.x1 = x1, node.y1 = y1;\n      return;\n    }\n\n    var valueOffset = sums[i],\n        valueTarget = (value / 2) + valueOffset,\n        k = i + 1,\n        hi = j - 1;\n\n    while (k < hi) {\n      var mid = k + hi >>> 1;\n      if (sums[mid] < valueTarget) k = mid + 1;\n      else hi = mid;\n    }\n\n    if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n    var valueLeft = sums[k] - valueOffset,\n        valueRight = value - valueLeft;\n\n    if ((x1 - x0) > (y1 - y0)) {\n      var xk = (x0 * valueRight + x1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, xk, y1);\n      partition(k, j, valueRight, xk, y0, x1, y1);\n    } else {\n      var yk = (y0 * valueRight + y1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, x1, yk);\n      partition(k, j, valueRight, x0, yk, x1, y1);\n    }\n  }\n}\n\nfunction sliceDice(parent, x0, y0, x1, y1) {\n  (parent.depth & 1 ? treemapSlice : treemapDice)(parent, x0, y0, x1, y1);\n}\n\nvar resquarify = (function custom(ratio) {\n\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n        if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);\n        else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(phi);\n\nexports.cluster = cluster;\nexports.hierarchy = hierarchy;\nexports.pack = index;\nexports.packSiblings = siblings;\nexports.packEnclose = enclose;\nexports.partition = partition;\nexports.stratify = stratify;\nexports.tree = tree;\nexports.treemap = index$1;\nexports.treemapBinary = binary;\nexports.treemapDice = treemapDice;\nexports.treemapSlice = treemapSlice;\nexports.treemapSliceDice = sliceDice;\nexports.treemapSquarify = squarify;\nexports.treemapResquarify = resquarify;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],151:[function(_dereq_,module,exports){\n// https://d3js.org/d3-interpolate/ v1.3.2 Copyright 2018 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, _dereq_('d3-color')) :\ntypeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) :\n(factory((global.d3 = global.d3 || {}),global.d3));\n}(this, (function (exports,d3Color) { 'use strict';\n\nfunction basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nfunction basis$1(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n\nfunction basisClosed(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n\nfunction constant(x) {\n  return function() {\n    return x;\n  };\n}\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n\nvar rgb = (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = d3Color.rgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nvar rgbBasis = rgbSpline(basis$1);\nvar rgbBasisClosed = rgbSpline(basisClosed);\n\nfunction array(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\nfunction date(a, b) {\n  var d = new Date;\n  return a = +a, b -= a, function(t) {\n    return d.setTime(a + b * t), d;\n  };\n}\n\nfunction number(a, b) {\n  return a = +a, b -= a, function(t) {\n    return a + b * t;\n  };\n}\n\nfunction object(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nfunction string(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n\nfunction value(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = d3Color.color(b)) ? (b = c, rgb) : string)\n      : b instanceof d3Color.color ? rgb\n      : b instanceof Date ? date\n      : Array.isArray(b) ? array\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n\nfunction discrete(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nfunction hue$1(a, b) {\n  var i = hue(+a, +b);\n  return function(t) {\n    var x = i(t);\n    return x - 360 * Math.floor(x / 360);\n  };\n}\n\nfunction round(a, b) {\n  return a = +a, b -= a, function(t) {\n    return Math.round(a + b * t);\n  };\n}\n\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nfunction decompose(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nfunction parseCss(value) {\n  if (value === \"none\") return identity;\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nfunction parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nvar interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n\nvar rho = Math.SQRT2,\n    rho2 = 2,\n    rho4 = 4,\n    epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\nfunction zoom(p0, p1) {\n  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n      dx = ux1 - ux0,\n      dy = uy1 - uy0,\n      d2 = dx * dx + dy * dy,\n      i,\n      S;\n\n  // Special case for u0 ≅ u1.\n  if (d2 < epsilon2) {\n    S = Math.log(w1 / w0) / rho;\n    i = function(t) {\n      return [\n        ux0 + t * dx,\n        uy0 + t * dy,\n        w0 * Math.exp(rho * t * S)\n      ];\n    };\n  }\n\n  // General case.\n  else {\n    var d1 = Math.sqrt(d2),\n        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n    S = (r1 - r0) / rho;\n    i = function(t) {\n      var s = t * S,\n          coshr0 = cosh(r0),\n          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n      return [\n        ux0 + u * dx,\n        uy0 + u * dy,\n        w0 * coshr0 / cosh(rho * s + r0)\n      ];\n    };\n  }\n\n  i.duration = S * 1000;\n\n  return i;\n}\n\nfunction hsl(hue$$1) {\n  return function(start, end) {\n    var h = hue$$1((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h),\n        s = nogamma(start.s, end.s),\n        l = nogamma(start.l, end.l),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nvar hsl$1 = hsl(hue);\nvar hslLong = hsl(nogamma);\n\nfunction lab(start, end) {\n  var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l),\n      a = nogamma(start.a, end.a),\n      b = nogamma(start.b, end.b),\n      opacity = nogamma(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n\nfunction hcl(hue$$1) {\n  return function(start, end) {\n    var h = hue$$1((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h),\n        c = nogamma(start.c, end.c),\n        l = nogamma(start.l, end.l),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nvar hcl$1 = hcl(hue);\nvar hclLong = hcl(nogamma);\n\nfunction cubehelix(hue$$1) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue$$1((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h),\n          s = nogamma(start.s, end.s),\n          l = nogamma(start.l, end.l),\n          opacity = nogamma(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nvar cubehelix$1 = cubehelix(hue);\nvar cubehelixLong = cubehelix(nogamma);\n\nfunction piecewise(interpolate, values) {\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n\nfunction quantize(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n}\n\nexports.interpolate = value;\nexports.interpolateArray = array;\nexports.interpolateBasis = basis$1;\nexports.interpolateBasisClosed = basisClosed;\nexports.interpolateDate = date;\nexports.interpolateDiscrete = discrete;\nexports.interpolateHue = hue$1;\nexports.interpolateNumber = number;\nexports.interpolateObject = object;\nexports.interpolateRound = round;\nexports.interpolateString = string;\nexports.interpolateTransformCss = interpolateTransformCss;\nexports.interpolateTransformSvg = interpolateTransformSvg;\nexports.interpolateZoom = zoom;\nexports.interpolateRgb = rgb;\nexports.interpolateRgbBasis = rgbBasis;\nexports.interpolateRgbBasisClosed = rgbBasisClosed;\nexports.interpolateHsl = hsl$1;\nexports.interpolateHslLong = hslLong;\nexports.interpolateLab = lab;\nexports.interpolateHcl = hcl$1;\nexports.interpolateHclLong = hclLong;\nexports.interpolateCubehelix = cubehelix$1;\nexports.interpolateCubehelixLong = cubehelixLong;\nexports.piecewise = piecewise;\nexports.quantize = quantize;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{\"d3-color\":147}],152:[function(_dereq_,module,exports){\n// https://d3js.org/d3-path/ v1.0.7 Copyright 2018 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nvar pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\nexports.path = path;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],153:[function(_dereq_,module,exports){\n// https://d3js.org/d3-quadtree/ Version 1.0.3. Copyright 2017 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nvar tree_add = function(d) {\n  var x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n};\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nfunction addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, inherit the existing extent.\n  if (x1 < x0) x0 = this._x0, x1 = this._x1;\n  if (y1 < y0) y0 = this._y0, y1 = this._y1;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n\nvar tree_cover = function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else if (x0 > x || x > x1 || y0 > y || y > y1) {\n    var z = x1 - x0,\n        node = this._root,\n        parent,\n        i;\n\n    switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) {\n      case 0: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1);\n        break;\n      }\n      case 1: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1);\n        break;\n      }\n      case 2: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y);\n        break;\n      }\n      case 3: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y);\n        break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  // If the quadtree covers the point already, just return.\n  else return this;\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n};\n\nvar tree_data = function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n};\n\nvar tree_extent = function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n};\n\nvar Quad = function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n};\n\nvar tree_find = function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new Quad(node[3], xm, ym, x2, y2),\n        new Quad(node[2], x1, ym, xm, y2),\n        new Quad(node[1], xm, y1, x2, ym),\n        new Quad(node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n};\n\nvar tree_remove = function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n};\n\nfunction removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n\nvar tree_root = function() {\n  return this._root;\n};\n\nvar tree_size = function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n};\n\nvar tree_visit = function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n};\n\nvar tree_visitAfter = function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n};\n\nfunction defaultX(d) {\n  return d[0];\n}\n\nvar tree_x = function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n};\n\nfunction defaultY(d) {\n  return d[1];\n}\n\nvar tree_y = function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n};\n\nfunction quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n\nexports.quadtree = quadtree;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],154:[function(_dereq_,module,exports){\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, _dereq_('d3-array'), _dereq_('d3-collection'), _dereq_('d3-shape'), _dereq_('elementary-circuits-directed-graph')) :\n  typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-shape', 'elementary-circuits-directed-graph'], factory) :\n  (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,null));\n}(this, (function (exports,d3Array,d3Collection,d3Shape,findCircuits) { 'use strict';\n\n  findCircuits = findCircuits && findCircuits.hasOwnProperty('default') ? findCircuits['default'] : findCircuits;\n\n  // For a given link, return the target node's depth\n  function targetDepth(d) {\n    return d.target.depth;\n  }\n\n  // The depth of a node when the nodeAlign (align) is set to 'left'\n  function left(node) {\n    return node.depth;\n  }\n\n  // The depth of a node when the nodeAlign (align) is set to 'right'\n  function right(node, n) {\n    return n - 1 - node.height;\n  }\n\n  // The depth of a node when the nodeAlign (align) is set to 'justify'\n  function justify(node, n) {\n    return node.sourceLinks.length ? node.depth : n - 1;\n  }\n\n  // The depth of a node when the nodeAlign (align) is set to 'center'\n  function center(node) {\n    return node.targetLinks.length ? node.depth : node.sourceLinks.length ? d3Array.min(node.sourceLinks, targetDepth) - 1 : 0;\n  }\n\n  // returns a function, using the parameter given to the sankey setting\n  function constant(x) {\n    return function () {\n      return x;\n    };\n  }\n\n  var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  };\n\n  /// https://github.com/tomshanley/d3-sankeyCircular-circular\n\n  // sort links' breadth (ie top to bottom in a column), based on their source nodes' breadths\n  function ascendingSourceBreadth(a, b) {\n    return ascendingBreadth(a.source, b.source) || a.index - b.index;\n  }\n\n  // sort links' breadth (ie top to bottom in a column), based on their target nodes' breadths\n  function ascendingTargetBreadth(a, b) {\n    return ascendingBreadth(a.target, b.target) || a.index - b.index;\n  }\n\n  // sort nodes' breadth (ie top to bottom in a column)\n  // if both nodes have circular links, or both don't have circular links, then sort by the top (y0) of the node\n  // else push nodes that have top circular links to the top, and nodes that have bottom circular links to the bottom\n  function ascendingBreadth(a, b) {\n    if (a.partOfCycle === b.partOfCycle) {\n      return a.y0 - b.y0;\n    } else {\n      if (a.circularLinkType === 'top' || b.circularLinkType === 'bottom') {\n        return -1;\n      } else {\n        return 1;\n      }\n    }\n  }\n\n  // return the value of a node or link\n  function value(d) {\n    return d.value;\n  }\n\n  // return the vertical center of a node\n  function nodeCenter(node) {\n    return (node.y0 + node.y1) / 2;\n  }\n\n  // return the vertical center of a link's source node\n  function linkSourceCenter(link) {\n    return nodeCenter(link.source);\n  }\n\n  // return the vertical center of a link's target node\n  function linkTargetCenter(link) {\n    return nodeCenter(link.target);\n  }\n\n  // Return the default value for ID for node, d.index\n  function defaultId(d) {\n    return d.index;\n  }\n\n  // Return the default object the graph's nodes, graph.nodes\n  function defaultNodes(graph) {\n    return graph.nodes;\n  }\n\n  // Return the default object the graph's nodes, graph.links\n  function defaultLinks(graph) {\n    return graph.links;\n  }\n\n  // Return the node from the collection that matches the provided ID, or throw an error if no match\n  function find(nodeById, id) {\n    var node = nodeById.get(id);\n    if (!node) throw new Error('missing: ' + id);\n    return node;\n  }\n\n  function getNodeID(node, id) {\n    return id(node);\n  }\n\n  // The main sankeyCircular functions\n\n  // Some constants for circular link calculations\n  var verticalMargin = 25;\n  var baseRadius = 10;\n  var scale = 0.3; //Possibly let user control this, although anything over 0.5 starts to get too cramped\n\n  function sankeyCircular () {\n    // Set the default values\n    var x0 = 0,\n        y0 = 0,\n        x1 = 1,\n        y1 = 1,\n        // extent\n    dx = 24,\n        // nodeWidth\n    py,\n        // nodePadding, for vertical postioning\n    id = defaultId,\n        align = justify,\n        nodes = defaultNodes,\n        links = defaultLinks,\n        iterations = 32,\n        circularLinkGap = 2,\n        paddingRatio,\n        sortNodes = null;\n\n    function sankeyCircular() {\n      var graph = {\n        nodes: nodes.apply(null, arguments),\n        links: links.apply(null, arguments)\n\n        // Process the graph's nodes and links, setting their positions\n\n        // 1.  Associate the nodes with their respective links, and vice versa\n      };computeNodeLinks(graph);\n\n      // 2.  Determine which links result in a circular path in the graph\n      identifyCircles(graph, id, sortNodes);\n\n      // 4. Calculate the nodes' values, based on the values of the incoming and outgoing links\n      computeNodeValues(graph);\n\n      // 5.  Calculate the nodes' depth based on the incoming and outgoing links\n      //     Sets the nodes':\n      //     - depth:  the depth in the graph\n      //     - column: the depth (0, 1, 2, etc), as is relates to visual position from left to right\n      //     - x0, x1: the x coordinates, as is relates to visual position from left to right\n      computeNodeDepths(graph);\n\n      // 3.  Determine how the circular links will be drawn,\n      //     either travelling back above the main chart (\"top\")\n      //     or below the main chart (\"bottom\")\n      selectCircularLinkTypes(graph, id);\n\n      // 6.  Calculate the nodes' and links' vertical position within their respective column\n      //     Also readjusts sankeyCircular size if circular links are needed, and node x's\n      computeNodeBreadths(graph, iterations, id);\n      computeLinkBreadths(graph);\n\n      // 7.  Sort links per node, based on the links' source/target nodes' breadths\n      // 8.  Adjust nodes that overlap links that span 2+ columns\n      var linkSortingIterations = 4; //Possibly let user control this number, like the iterations over node placement\n      for (var iteration = 0; iteration < linkSortingIterations; iteration++) {\n\n        sortSourceLinks(graph, y1, id);\n        sortTargetLinks(graph, y1, id);\n        resolveNodeLinkOverlaps(graph, y0, y1, id);\n        sortSourceLinks(graph, y1, id);\n        sortTargetLinks(graph, y1, id);\n      }\n\n      // 8.1  Adjust node and link positions back to fill height of chart area if compressed\n      fillHeight(graph, y0, y1);\n\n      // 9. Calculate visually appealling path for the circular paths, and create the \"d\" string\n      addCircularPathData(graph, circularLinkGap, y1, id);\n\n      return graph;\n    } // end of sankeyCircular function\n\n\n    // Set the sankeyCircular parameters\n    // nodeID, nodeAlign, nodeWidth, nodePadding, nodes, links, size, extent, iterations, nodePaddingRatio, circularLinkGap\n    sankeyCircular.nodeId = function (_) {\n      return arguments.length ? (id = typeof _ === 'function' ? _ : constant(_), sankeyCircular) : id;\n    };\n\n    sankeyCircular.nodeAlign = function (_) {\n      return arguments.length ? (align = typeof _ === 'function' ? _ : constant(_), sankeyCircular) : align;\n    };\n\n    sankeyCircular.nodeWidth = function (_) {\n      return arguments.length ? (dx = +_, sankeyCircular) : dx;\n    };\n\n    sankeyCircular.nodePadding = function (_) {\n      return arguments.length ? (py = +_, sankeyCircular) : py;\n    };\n\n    sankeyCircular.nodes = function (_) {\n      return arguments.length ? (nodes = typeof _ === 'function' ? _ : constant(_), sankeyCircular) : nodes;\n    };\n\n    sankeyCircular.links = function (_) {\n      return arguments.length ? (links = typeof _ === 'function' ? _ : constant(_), sankeyCircular) : links;\n    };\n\n    sankeyCircular.size = function (_) {\n      return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankeyCircular) : [x1 - x0, y1 - y0];\n    };\n\n    sankeyCircular.extent = function (_) {\n      return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankeyCircular) : [[x0, y0], [x1, y1]];\n    };\n\n    sankeyCircular.iterations = function (_) {\n      return arguments.length ? (iterations = +_, sankeyCircular) : iterations;\n    };\n\n    sankeyCircular.circularLinkGap = function (_) {\n      return arguments.length ? (circularLinkGap = +_, sankeyCircular) : circularLinkGap;\n    };\n\n    sankeyCircular.nodePaddingRatio = function (_) {\n      return arguments.length ? (paddingRatio = +_, sankeyCircular) : paddingRatio;\n    };\n\n    sankeyCircular.sortNodes = function (_) {\n      return arguments.length ? (sortNodes = _, sankeyCircular) : sortNodes;\n    };\n\n    sankeyCircular.update = function (graph) {\n      // 5.  Calculate the nodes' depth based on the incoming and outgoing links\n      //     Sets the nodes':\n      //     - depth:  the depth in the graph\n      //     - column: the depth (0, 1, 2, etc), as is relates to visual position from left to right\n      //     - x0, x1: the x coordinates, as is relates to visual position from left to right\n      // computeNodeDepths(graph)\n\n      // 3.  Determine how the circular links will be drawn,\n      //     either travelling back above the main chart (\"top\")\n      //     or below the main chart (\"bottom\")\n      selectCircularLinkTypes(graph, id);\n\n      // 6.  Calculate the nodes' and links' vertical position within their respective column\n      //     Also readjusts sankeyCircular size if circular links are needed, and node x's\n      // computeNodeBreadths(graph, iterations, id)\n      computeLinkBreadths(graph);\n\n      // Force position of circular link type based on position\n      graph.links.forEach(function (link) {\n        if (link.circular) {\n          link.circularLinkType = link.y0 + link.y1 < y1 ? 'top' : 'bottom';\n\n          link.source.circularLinkType = link.circularLinkType;\n          link.target.circularLinkType = link.circularLinkType;\n        }\n      });\n\n      sortSourceLinks(graph, y1, id, false); // Sort links but do not move nodes\n      sortTargetLinks(graph, y1, id);\n\n      // 7.  Sort links per node, based on the links' source/target nodes' breadths\n      // 8.  Adjust nodes that overlap links that span 2+ columns\n      // var linkSortingIterations = 4; //Possibly let user control this number, like the iterations over node placement\n      // for (var iteration = 0; iteration < linkSortingIterations; iteration++) {\n      //\n      //   sortSourceLinks(graph, y1, id)\n      //   sortTargetLinks(graph, y1, id)\n      //   resolveNodeLinkOverlaps(graph, y0, y1, id)\n      //   sortSourceLinks(graph, y1, id)\n      //   sortTargetLinks(graph, y1, id)\n      //\n      // }\n\n      // 8.1  Adjust node and link positions back to fill height of chart area if compressed\n      // fillHeight(graph, y0, y1)\n\n      // 9. Calculate visually appealling path for the circular paths, and create the \"d\" string\n      addCircularPathData(graph, circularLinkGap, y1, id);\n      return graph;\n    };\n\n    // Populate the sourceLinks and targetLinks for each node.\n    // Also, if the source and target are not objects, assume they are indices.\n    function computeNodeLinks(graph) {\n      graph.nodes.forEach(function (node, i) {\n        node.index = i;\n        node.sourceLinks = [];\n        node.targetLinks = [];\n      });\n      var nodeById = d3Collection.map(graph.nodes, id);\n      graph.links.forEach(function (link, i) {\n        link.index = i;\n        var source = link.source;\n        var target = link.target;\n        if ((typeof source === \"undefined\" ? \"undefined\" : _typeof(source)) !== 'object') {\n          source = link.source = find(nodeById, source);\n        }\n        if ((typeof target === \"undefined\" ? \"undefined\" : _typeof(target)) !== 'object') {\n          target = link.target = find(nodeById, target);\n        }\n        source.sourceLinks.push(link);\n        target.targetLinks.push(link);\n      });\n      return graph;\n    }\n\n    // Compute the value (size) and cycleness of each node by summing the associated links.\n    function computeNodeValues(graph) {\n      graph.nodes.forEach(function (node) {\n        node.partOfCycle = false;\n        node.value = Math.max(d3Array.sum(node.sourceLinks, value), d3Array.sum(node.targetLinks, value));\n        node.sourceLinks.forEach(function (link) {\n          if (link.circular) {\n            node.partOfCycle = true;\n            node.circularLinkType = link.circularLinkType;\n          }\n        });\n        node.targetLinks.forEach(function (link) {\n          if (link.circular) {\n            node.partOfCycle = true;\n            node.circularLinkType = link.circularLinkType;\n          }\n        });\n      });\n    }\n\n    function getCircleMargins(graph) {\n      var totalTopLinksWidth = 0,\n          totalBottomLinksWidth = 0,\n          totalRightLinksWidth = 0,\n          totalLeftLinksWidth = 0;\n\n      var maxColumn = d3Array.max(graph.nodes, function (node) {\n        return node.column;\n      });\n\n      graph.links.forEach(function (link) {\n        if (link.circular) {\n          if (link.circularLinkType == 'top') {\n            totalTopLinksWidth = totalTopLinksWidth + link.width;\n          } else {\n            totalBottomLinksWidth = totalBottomLinksWidth + link.width;\n          }\n\n          if (link.target.column == 0) {\n            totalLeftLinksWidth = totalLeftLinksWidth + link.width;\n          }\n\n          if (link.source.column == maxColumn) {\n            totalRightLinksWidth = totalRightLinksWidth + link.width;\n          }\n        }\n      });\n\n      //account for radius of curves and padding between links\n      totalTopLinksWidth = totalTopLinksWidth > 0 ? totalTopLinksWidth + verticalMargin + baseRadius : totalTopLinksWidth;\n      totalBottomLinksWidth = totalBottomLinksWidth > 0 ? totalBottomLinksWidth + verticalMargin + baseRadius : totalBottomLinksWidth;\n      totalRightLinksWidth = totalRightLinksWidth > 0 ? totalRightLinksWidth + verticalMargin + baseRadius : totalRightLinksWidth;\n      totalLeftLinksWidth = totalLeftLinksWidth > 0 ? totalLeftLinksWidth + verticalMargin + baseRadius : totalLeftLinksWidth;\n\n      return { \"top\": totalTopLinksWidth, \"bottom\": totalBottomLinksWidth, \"left\": totalLeftLinksWidth, \"right\": totalRightLinksWidth };\n    }\n\n    // Update the x0, y0, x1 and y1 for the sankeyCircular, to allow space for any circular links\n    function scaleSankeySize(graph, margin) {\n\n      var maxColumn = d3Array.max(graph.nodes, function (node) {\n        return node.column;\n      });\n\n      var currentWidth = x1 - x0;\n      var currentHeight = y1 - y0;\n\n      var newWidth = currentWidth + margin.right + margin.left;\n      var newHeight = currentHeight + margin.top + margin.bottom;\n\n      var scaleX = currentWidth / newWidth;\n      var scaleY = currentHeight / newHeight;\n\n      x0 = x0 * scaleX + margin.left;\n      x1 = margin.right == 0 ? x1 : x1 * scaleX;\n      y0 = y0 * scaleY + margin.top;\n      y1 = y1 * scaleY;\n\n      graph.nodes.forEach(function (node) {\n        node.x0 = x0 + node.column * ((x1 - x0 - dx) / maxColumn);\n        node.x1 = node.x0 + dx;\n      });\n\n      return scaleY;\n    }\n\n    // Iteratively assign the depth for each node.\n    // Nodes are assigned the maximum depth of incoming neighbors plus one;\n    // nodes with no incoming links are assigned depth zero, while\n    // nodes with no outgoing links are assigned the maximum depth.\n    function computeNodeDepths(graph) {\n      var nodes, next, x;\n\n      for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n        nodes.forEach(function (node) {\n          node.depth = x;\n          node.sourceLinks.forEach(function (link) {\n            if (next.indexOf(link.target) < 0 && !link.circular) {\n              next.push(link.target);\n            }\n          });\n        });\n      }\n\n      for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n        nodes.forEach(function (node) {\n          node.height = x;\n          node.targetLinks.forEach(function (link) {\n            if (next.indexOf(link.source) < 0 && !link.circular) {\n              next.push(link.source);\n            }\n          });\n        });\n      }\n\n      // assign column numbers, and get max value\n      graph.nodes.forEach(function (node) {\n        node.column = Math.floor(align.call(null, node, x));\n      });\n    }\n\n    // Assign nodes' breadths, and then shift nodes that overlap (resolveCollisions)\n    function computeNodeBreadths(graph, iterations, id) {\n      var columns = d3Collection.nest().key(function (d) {\n        return d.column;\n      }).sortKeys(d3Array.ascending).entries(graph.nodes).map(function (d) {\n        return d.values;\n      });\n\n      initializeNodeBreadth(id);\n      resolveCollisions();\n\n      for (var alpha = 1, n = iterations; n > 0; --n) {\n        relaxLeftAndRight(alpha *= 0.99, id);\n        resolveCollisions();\n      }\n\n      function initializeNodeBreadth(id) {\n\n        //override py if nodePadding has been set\n        if (paddingRatio) {\n          var padding = Infinity;\n          columns.forEach(function (nodes) {\n            var thisPadding = y1 * paddingRatio / (nodes.length + 1);\n            padding = thisPadding < padding ? thisPadding : padding;\n          });\n          py = padding;\n        }\n\n        var ky = d3Array.min(columns, function (nodes) {\n          return (y1 - y0 - (nodes.length - 1) * py) / d3Array.sum(nodes, value);\n        });\n\n        //calculate the widths of the links\n        ky = ky * scale;\n\n        graph.links.forEach(function (link) {\n          link.width = link.value * ky;\n        });\n\n        //determine how much to scale down the chart, based on circular links\n        var margin = getCircleMargins(graph);\n        var ratio = scaleSankeySize(graph, margin);\n\n        //re-calculate widths\n        ky = ky * ratio;\n\n        graph.links.forEach(function (link) {\n          link.width = link.value * ky;\n        });\n\n        columns.forEach(function (nodes) {\n          var nodesLength = nodes.length;\n          nodes.forEach(function (node, i) {\n            if (node.depth == columns.length - 1 && nodesLength == 1) {\n              node.y0 = y1 / 2 - node.value * ky;\n              node.y1 = node.y0 + node.value * ky;\n            } else if (node.depth == 0 && nodesLength == 1) {\n              node.y0 = y1 / 2 - node.value * ky;\n              node.y1 = node.y0 + node.value * ky;\n            } else if (node.partOfCycle) {\n              if (numberOfNonSelfLinkingCycles(node, id) == 0) {\n                node.y0 = y1 / 2 + i;\n                node.y1 = node.y0 + node.value * ky;\n              } else if (node.circularLinkType == 'top') {\n                node.y0 = y0 + i;\n                node.y1 = node.y0 + node.value * ky;\n              } else {\n                node.y0 = y1 - node.value * ky - i;\n                node.y1 = node.y0 + node.value * ky;\n              }\n            } else {\n              if (margin.top == 0 || margin.bottom == 0) {\n                node.y0 = (y1 - y0) / nodesLength * i;\n                node.y1 = node.y0 + node.value * ky;\n              } else {\n                node.y0 = (y1 - y0) / 2 - nodesLength / 2 + i;\n                node.y1 = node.y0 + node.value * ky;\n              }\n            }\n          });\n        });\n      }\n\n      // For each node in each column, check the node's vertical position in relation to its targets and sources vertical position\n      // and shift up/down to be closer to the vertical middle of those targets and sources\n      function relaxLeftAndRight(alpha, id) {\n        var columnsLength = columns.length;\n\n        columns.forEach(function (nodes) {\n          var n = nodes.length;\n          var depth = nodes[0].depth;\n\n          nodes.forEach(function (node) {\n            // check the node is not an orphan\n            var nodeHeight;\n            if (node.sourceLinks.length || node.targetLinks.length) {\n              if (node.partOfCycle && numberOfNonSelfLinkingCycles(node, id) > 0) ; else if (depth == 0 && n == 1) {\n                nodeHeight = node.y1 - node.y0;\n\n                node.y0 = y1 / 2 - nodeHeight / 2;\n                node.y1 = y1 / 2 + nodeHeight / 2;\n              } else if (depth == columnsLength - 1 && n == 1) {\n                nodeHeight = node.y1 - node.y0;\n\n                node.y0 = y1 / 2 - nodeHeight / 2;\n                node.y1 = y1 / 2 + nodeHeight / 2;\n              } else {\n                var avg = 0;\n\n                var avgTargetY = d3Array.mean(node.sourceLinks, linkTargetCenter);\n                var avgSourceY = d3Array.mean(node.targetLinks, linkSourceCenter);\n\n                if (avgTargetY && avgSourceY) {\n                  avg = (avgTargetY + avgSourceY) / 2;\n                } else {\n                  avg = avgTargetY || avgSourceY;\n                }\n\n                var dy = (avg - nodeCenter(node)) * alpha;\n                // positive if it node needs to move down\n                node.y0 += dy;\n                node.y1 += dy;\n              }\n            }\n          });\n        });\n      }\n\n      // For each column, check if nodes are overlapping, and if so, shift up/down\n      function resolveCollisions() {\n        columns.forEach(function (nodes) {\n          var node,\n              dy,\n              y = y0,\n              n = nodes.length,\n              i;\n\n          // Push any overlapping nodes down.\n          nodes.sort(ascendingBreadth);\n\n          for (i = 0; i < n; ++i) {\n            node = nodes[i];\n            dy = y - node.y0;\n\n            if (dy > 0) {\n              node.y0 += dy;\n              node.y1 += dy;\n            }\n            y = node.y1 + py;\n          }\n\n          // If the bottommost node goes outside the bounds, push it back up.\n          dy = y - py - y1;\n          if (dy > 0) {\n            y = node.y0 -= dy, node.y1 -= dy;\n\n            // Push any overlapping nodes back up.\n            for (i = n - 2; i >= 0; --i) {\n              node = nodes[i];\n              dy = node.y1 + py - y;\n              if (dy > 0) node.y0 -= dy, node.y1 -= dy;\n              y = node.y0;\n            }\n          }\n        });\n      }\n    }\n\n    // Assign the links y0 and y1 based on source/target nodes position,\n    // plus the link's relative position to other links to the same node\n    function computeLinkBreadths(graph) {\n      graph.nodes.forEach(function (node) {\n        node.sourceLinks.sort(ascendingTargetBreadth);\n        node.targetLinks.sort(ascendingSourceBreadth);\n      });\n      graph.nodes.forEach(function (node) {\n        var y0 = node.y0;\n        var y1 = y0;\n\n        // start from the bottom of the node for cycle links\n        var y0cycle = node.y1;\n        var y1cycle = y0cycle;\n\n        node.sourceLinks.forEach(function (link) {\n          if (link.circular) {\n            link.y0 = y0cycle - link.width / 2;\n            y0cycle = y0cycle - link.width;\n          } else {\n            link.y0 = y0 + link.width / 2;\n            y0 += link.width;\n          }\n        });\n        node.targetLinks.forEach(function (link) {\n          if (link.circular) {\n            link.y1 = y1cycle - link.width / 2;\n            y1cycle = y1cycle - link.width;\n          } else {\n            link.y1 = y1 + link.width / 2;\n            y1 += link.width;\n          }\n        });\n      });\n    }\n\n    return sankeyCircular;\n  }\n\n  /// /////////////////////////////////////////////////////////////////////////////////\n  // Cycle functions\n  // portion of code to detect circular links based on Colin Fergus' bl.ock https://gist.github.com/cfergus/3956043\n\n  // Identify circles in the link objects\n  function identifyCircles(graph, id, sortNodes) {\n\n    var circularLinkID = 0;\n\n    if (sortNodes === null) {\n\n      // Building adjacency graph\n      var adjList = [];\n      for (var i = 0; i < graph.links.length; i++) {\n        var link = graph.links[i];\n        var source = link.source.index;\n        var target = link.target.index;\n        if (!adjList[source]) adjList[source] = [];\n        if (!adjList[target]) adjList[target] = [];\n\n        // Add links if not already in set\n        if (adjList[source].indexOf(target) === -1) adjList[source].push(target);\n      }\n\n      // Find all elementary circuits\n      var cycles = findCircuits(adjList);\n\n      // Sort by circuits length\n      cycles.sort(function (a, b) {\n        return a.length - b.length;\n      });\n\n      // Make one link circular for each elementary circuit\n      var circularLinks = {};\n      for (i = 0; i < cycles.length; i++) {\n        var cycle = cycles[i];\n        var closed = false;\n        for (var j = 0; j < cycle.length - 1; j++) {\n          if (!circularLinks[cycle[j]]) circularLinks[cycle[j]] = {};\n\n          // Check if there is already a circular link in the circuit\n          if (circularLinks[cycle[j]] && circularLinks[cycle[j]][cycle[j + 1]]) {\n            closed = true;\n            break;\n          }\n        }\n\n        if (!closed) {\n          // If not closed, make the last link the circular one\n          var last = cycle.slice(-2);\n          circularLinks[last[0]][last[1]] = true;\n        }\n      }\n\n      graph.links.forEach(function (link) {\n        var target = link.target.index;\n        var source = link.source.index;\n        // If self-linking or a back-edge\n        if (target === source || circularLinks[source] && circularLinks[source][target]) {\n          link.circular = true;\n          link.circularLinkID = circularLinkID;\n          circularLinkID = circularLinkID + 1;\n        } else {\n          link.circular = false;\n        }\n      });\n    } else {\n      graph.links.forEach(function (link) {\n        if (link.source[sortNodes] < link.target[sortNodes]) {\n          link.circular = false;\n        } else {\n          link.circular = true;\n          link.circularLinkID = circularLinkID;\n          circularLinkID = circularLinkID + 1;\n        }\n      });\n    }\n  }\n\n  // Assign a circular link type (top or bottom), based on:\n  // - if the source/target node already has circular links, then use the same type\n  // - if not, choose the type with fewer links\n  function selectCircularLinkTypes(graph, id) {\n    var numberOfTops = 0;\n    var numberOfBottoms = 0;\n    graph.links.forEach(function (link) {\n      if (link.circular) {\n        // if either souce or target has type already use that\n        if (link.source.circularLinkType || link.target.circularLinkType) {\n          // default to source type if available\n          link.circularLinkType = link.source.circularLinkType ? link.source.circularLinkType : link.target.circularLinkType;\n        } else {\n          link.circularLinkType = numberOfTops < numberOfBottoms ? 'top' : 'bottom';\n        }\n\n        if (link.circularLinkType == 'top') {\n          numberOfTops = numberOfTops + 1;\n        } else {\n          numberOfBottoms = numberOfBottoms + 1;\n        }\n\n        graph.nodes.forEach(function (node) {\n          if (getNodeID(node, id) == getNodeID(link.source, id) || getNodeID(node, id) == getNodeID(link.target, id)) {\n            node.circularLinkType = link.circularLinkType;\n          }\n        });\n      }\n    });\n\n    //correct self-linking links to be same direction as node\n    graph.links.forEach(function (link) {\n      if (link.circular) {\n        //if both source and target node are same type, then link should have same type\n        if (link.source.circularLinkType == link.target.circularLinkType) {\n          link.circularLinkType = link.source.circularLinkType;\n        }\n        //if link is selflinking, then link should have same type as node\n        if (selfLinking(link, id)) {\n          link.circularLinkType = link.source.circularLinkType;\n        }\n      }\n    });\n  }\n\n  // Return the angle between a straight line between the source and target of the link, and the vertical plane of the node\n  function linkAngle(link) {\n    var adjacent = Math.abs(link.y1 - link.y0);\n    var opposite = Math.abs(link.target.x0 - link.source.x1);\n\n    return Math.atan(opposite / adjacent);\n  }\n\n  // Check if two circular links potentially overlap\n  function circularLinksCross(link1, link2) {\n    if (link1.source.column < link2.target.column) {\n      return false;\n    } else if (link1.target.column > link2.source.column) {\n      return false;\n    } else {\n      return true;\n    }\n  }\n\n  // Return the number of circular links for node, not including self linking links\n  function numberOfNonSelfLinkingCycles(node, id) {\n    var sourceCount = 0;\n    node.sourceLinks.forEach(function (l) {\n      sourceCount = l.circular && !selfLinking(l, id) ? sourceCount + 1 : sourceCount;\n    });\n\n    var targetCount = 0;\n    node.targetLinks.forEach(function (l) {\n      targetCount = l.circular && !selfLinking(l, id) ? targetCount + 1 : targetCount;\n    });\n\n    return sourceCount + targetCount;\n  }\n\n  // Check if a circular link is the only circular link for both its source and target node\n  function onlyCircularLink(link) {\n    var nodeSourceLinks = link.source.sourceLinks;\n    var sourceCount = 0;\n    nodeSourceLinks.forEach(function (l) {\n      sourceCount = l.circular ? sourceCount + 1 : sourceCount;\n    });\n\n    var nodeTargetLinks = link.target.targetLinks;\n    var targetCount = 0;\n    nodeTargetLinks.forEach(function (l) {\n      targetCount = l.circular ? targetCount + 1 : targetCount;\n    });\n\n    if (sourceCount > 1 || targetCount > 1) {\n      return false;\n    } else {\n      return true;\n    }\n  }\n\n  // creates vertical buffer values per set of top/bottom links\n  function calcVerticalBuffer(links, circularLinkGap, id) {\n    links.sort(sortLinkColumnAscending);\n    links.forEach(function (link, i) {\n      var buffer = 0;\n\n      if (selfLinking(link, id) && onlyCircularLink(link)) {\n        link.circularPathData.verticalBuffer = buffer + link.width / 2;\n      } else {\n        var j = 0;\n        for (j; j < i; j++) {\n          if (circularLinksCross(links[i], links[j])) {\n            var bufferOverThisLink = links[j].circularPathData.verticalBuffer + links[j].width / 2 + circularLinkGap;\n            buffer = bufferOverThisLink > buffer ? bufferOverThisLink : buffer;\n          }\n        }\n\n        link.circularPathData.verticalBuffer = buffer + link.width / 2;\n      }\n    });\n\n    return links;\n  }\n\n  // calculate the optimum path for a link to reduce overlaps\n  function addCircularPathData(graph, circularLinkGap, y1, id) {\n    //var baseRadius = 10\n    var buffer = 5;\n    //var verticalMargin = 25\n\n    var minY = d3Array.min(graph.links, function (link) {\n      return link.source.y0;\n    });\n\n    // create object for circular Path Data\n    graph.links.forEach(function (link) {\n      if (link.circular) {\n        link.circularPathData = {};\n      }\n    });\n\n    // calc vertical offsets per top/bottom links\n    var topLinks = graph.links.filter(function (l) {\n      return l.circularLinkType == 'top';\n    });\n    /* topLinks = */calcVerticalBuffer(topLinks, circularLinkGap, id);\n\n    var bottomLinks = graph.links.filter(function (l) {\n      return l.circularLinkType == 'bottom';\n    });\n    /* bottomLinks = */calcVerticalBuffer(bottomLinks, circularLinkGap, id);\n\n    // add the base data for each link\n    graph.links.forEach(function (link) {\n      if (link.circular) {\n        link.circularPathData.arcRadius = link.width + baseRadius;\n        link.circularPathData.leftNodeBuffer = buffer;\n        link.circularPathData.rightNodeBuffer = buffer;\n        link.circularPathData.sourceWidth = link.source.x1 - link.source.x0;\n        link.circularPathData.sourceX = link.source.x0 + link.circularPathData.sourceWidth;\n        link.circularPathData.targetX = link.target.x0;\n        link.circularPathData.sourceY = link.y0;\n        link.circularPathData.targetY = link.y1;\n\n        // for self linking paths, and that the only circular link in/out of that node\n        if (selfLinking(link, id) && onlyCircularLink(link)) {\n          link.circularPathData.leftSmallArcRadius = baseRadius + link.width / 2;\n          link.circularPathData.leftLargeArcRadius = baseRadius + link.width / 2;\n          link.circularPathData.rightSmallArcRadius = baseRadius + link.width / 2;\n          link.circularPathData.rightLargeArcRadius = baseRadius + link.width / 2;\n\n          if (link.circularLinkType == 'bottom') {\n            link.circularPathData.verticalFullExtent = link.source.y1 + verticalMargin + link.circularPathData.verticalBuffer;\n            link.circularPathData.verticalLeftInnerExtent = link.circularPathData.verticalFullExtent - link.circularPathData.leftLargeArcRadius;\n            link.circularPathData.verticalRightInnerExtent = link.circularPathData.verticalFullExtent - link.circularPathData.rightLargeArcRadius;\n          } else {\n            // top links\n            link.circularPathData.verticalFullExtent = link.source.y0 - verticalMargin - link.circularPathData.verticalBuffer;\n            link.circularPathData.verticalLeftInnerExtent = link.circularPathData.verticalFullExtent + link.circularPathData.leftLargeArcRadius;\n            link.circularPathData.verticalRightInnerExtent = link.circularPathData.verticalFullExtent + link.circularPathData.rightLargeArcRadius;\n          }\n        } else {\n          // else calculate normally\n          // add left extent coordinates, based on links with same source column and circularLink type\n          var thisColumn = link.source.column;\n          var thisCircularLinkType = link.circularLinkType;\n          var sameColumnLinks = graph.links.filter(function (l) {\n            return l.source.column == thisColumn && l.circularLinkType == thisCircularLinkType;\n          });\n\n          if (link.circularLinkType == 'bottom') {\n            sameColumnLinks.sort(sortLinkSourceYDescending);\n          } else {\n            sameColumnLinks.sort(sortLinkSourceYAscending);\n          }\n\n          var radiusOffset = 0;\n          sameColumnLinks.forEach(function (l, i) {\n            if (l.circularLinkID == link.circularLinkID) {\n              link.circularPathData.leftSmallArcRadius = baseRadius + link.width / 2 + radiusOffset;\n              link.circularPathData.leftLargeArcRadius = baseRadius + link.width / 2 + i * circularLinkGap + radiusOffset;\n            }\n            radiusOffset = radiusOffset + l.width;\n          });\n\n          // add right extent coordinates, based on links with same target column and circularLink type\n          thisColumn = link.target.column;\n          sameColumnLinks = graph.links.filter(function (l) {\n            return l.target.column == thisColumn && l.circularLinkType == thisCircularLinkType;\n          });\n          if (link.circularLinkType == 'bottom') {\n            sameColumnLinks.sort(sortLinkTargetYDescending);\n          } else {\n            sameColumnLinks.sort(sortLinkTargetYAscending);\n          }\n\n          radiusOffset = 0;\n          sameColumnLinks.forEach(function (l, i) {\n            if (l.circularLinkID == link.circularLinkID) {\n              link.circularPathData.rightSmallArcRadius = baseRadius + link.width / 2 + radiusOffset;\n              link.circularPathData.rightLargeArcRadius = baseRadius + link.width / 2 + i * circularLinkGap + radiusOffset;\n            }\n            radiusOffset = radiusOffset + l.width;\n          });\n\n          // bottom links\n          if (link.circularLinkType == 'bottom') {\n            link.circularPathData.verticalFullExtent = Math.max(y1, link.source.y1, link.target.y1) + verticalMargin + link.circularPathData.verticalBuffer;\n            link.circularPathData.verticalLeftInnerExtent = link.circularPathData.verticalFullExtent - link.circularPathData.leftLargeArcRadius;\n            link.circularPathData.verticalRightInnerExtent = link.circularPathData.verticalFullExtent - link.circularPathData.rightLargeArcRadius;\n          } else {\n            // top links\n            link.circularPathData.verticalFullExtent = minY - verticalMargin - link.circularPathData.verticalBuffer;\n            link.circularPathData.verticalLeftInnerExtent = link.circularPathData.verticalFullExtent + link.circularPathData.leftLargeArcRadius;\n            link.circularPathData.verticalRightInnerExtent = link.circularPathData.verticalFullExtent + link.circularPathData.rightLargeArcRadius;\n          }\n        }\n\n        // all links\n        link.circularPathData.leftInnerExtent = link.circularPathData.sourceX + link.circularPathData.leftNodeBuffer;\n        link.circularPathData.rightInnerExtent = link.circularPathData.targetX - link.circularPathData.rightNodeBuffer;\n        link.circularPathData.leftFullExtent = link.circularPathData.sourceX + link.circularPathData.leftLargeArcRadius + link.circularPathData.leftNodeBuffer;\n        link.circularPathData.rightFullExtent = link.circularPathData.targetX - link.circularPathData.rightLargeArcRadius - link.circularPathData.rightNodeBuffer;\n      }\n\n      if (link.circular) {\n        link.path = createCircularPathString(link);\n      } else {\n        var normalPath = d3Shape.linkHorizontal().source(function (d) {\n          var x = d.source.x0 + (d.source.x1 - d.source.x0);\n          var y = d.y0;\n          return [x, y];\n        }).target(function (d) {\n          var x = d.target.x0;\n          var y = d.y1;\n          return [x, y];\n        });\n        link.path = normalPath(link);\n      }\n    });\n  }\n\n  // create a d path using the addCircularPathData\n  function createCircularPathString(link) {\n    var pathString = '';\n    // 'pathData' is assigned a value but never used\n    // var pathData = {}\n\n    if (link.circularLinkType == 'top') {\n      pathString =\n      // start at the right of the source node\n      'M' + link.circularPathData.sourceX + ' ' + link.circularPathData.sourceY + ' ' +\n      // line right to buffer point\n      'L' + link.circularPathData.leftInnerExtent + ' ' + link.circularPathData.sourceY + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.leftLargeArcRadius + ' ' + link.circularPathData.leftSmallArcRadius + ' 0 0 0 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.leftFullExtent + ' ' + (link.circularPathData.sourceY - link.circularPathData.leftSmallArcRadius) + ' ' + // End of arc X\n      // line up to buffer point\n      'L' + link.circularPathData.leftFullExtent + ' ' + link.circularPathData.verticalLeftInnerExtent + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.leftLargeArcRadius + ' ' + link.circularPathData.leftLargeArcRadius + ' 0 0 0 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.leftInnerExtent + ' ' + link.circularPathData.verticalFullExtent + ' ' + // End of arc X\n      // line left to buffer point\n      'L' + link.circularPathData.rightInnerExtent + ' ' + link.circularPathData.verticalFullExtent + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.rightLargeArcRadius + ' ' + link.circularPathData.rightLargeArcRadius + ' 0 0 0 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.rightFullExtent + ' ' + link.circularPathData.verticalRightInnerExtent + ' ' + // End of arc X\n      // line down\n      'L' + link.circularPathData.rightFullExtent + ' ' + (link.circularPathData.targetY - link.circularPathData.rightSmallArcRadius) + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.rightLargeArcRadius + ' ' + link.circularPathData.rightSmallArcRadius + ' 0 0 0 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.rightInnerExtent + ' ' + link.circularPathData.targetY + ' ' + // End of arc X\n      // line to end\n      'L' + link.circularPathData.targetX + ' ' + link.circularPathData.targetY;\n    } else {\n      // bottom path\n      pathString =\n      // start at the right of the source node\n      'M' + link.circularPathData.sourceX + ' ' + link.circularPathData.sourceY + ' ' +\n      // line right to buffer point\n      'L' + link.circularPathData.leftInnerExtent + ' ' + link.circularPathData.sourceY + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.leftLargeArcRadius + ' ' + link.circularPathData.leftSmallArcRadius + ' 0 0 1 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.leftFullExtent + ' ' + (link.circularPathData.sourceY + link.circularPathData.leftSmallArcRadius) + ' ' + // End of arc X\n      // line down to buffer point\n      'L' + link.circularPathData.leftFullExtent + ' ' + link.circularPathData.verticalLeftInnerExtent + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.leftLargeArcRadius + ' ' + link.circularPathData.leftLargeArcRadius + ' 0 0 1 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.leftInnerExtent + ' ' + link.circularPathData.verticalFullExtent + ' ' + // End of arc X\n      // line left to buffer point\n      'L' + link.circularPathData.rightInnerExtent + ' ' + link.circularPathData.verticalFullExtent + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.rightLargeArcRadius + ' ' + link.circularPathData.rightLargeArcRadius + ' 0 0 1 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.rightFullExtent + ' ' + link.circularPathData.verticalRightInnerExtent + ' ' + // End of arc X\n      // line up\n      'L' + link.circularPathData.rightFullExtent + ' ' + (link.circularPathData.targetY + link.circularPathData.rightSmallArcRadius) + ' ' +\n      // Arc around: Centre of arc X and  //Centre of arc Y\n      'A' + link.circularPathData.rightLargeArcRadius + ' ' + link.circularPathData.rightSmallArcRadius + ' 0 0 1 ' +\n      // End of arc X //End of arc Y\n      link.circularPathData.rightInnerExtent + ' ' + link.circularPathData.targetY + ' ' + // End of arc X\n      // line to end\n      'L' + link.circularPathData.targetX + ' ' + link.circularPathData.targetY;\n    }\n\n    return pathString;\n  }\n\n  // sort links based on the distance between the source and tartget node columns\n  // if the same, then use Y position of the source node\n  function sortLinkColumnAscending(link1, link2) {\n    if (linkColumnDistance(link1) == linkColumnDistance(link2)) {\n      return link1.circularLinkType == 'bottom' ? sortLinkSourceYDescending(link1, link2) : sortLinkSourceYAscending(link1, link2);\n    } else {\n      return linkColumnDistance(link2) - linkColumnDistance(link1);\n    }\n  }\n\n  // sort ascending links by their source vertical position, y0\n  function sortLinkSourceYAscending(link1, link2) {\n    return link1.y0 - link2.y0;\n  }\n\n  // sort descending links by their source vertical position, y0\n  function sortLinkSourceYDescending(link1, link2) {\n    return link2.y0 - link1.y0;\n  }\n\n  // sort ascending links by their target vertical position, y1\n  function sortLinkTargetYAscending(link1, link2) {\n    return link1.y1 - link2.y1;\n  }\n\n  // sort descending links by their target vertical position, y1\n  function sortLinkTargetYDescending(link1, link2) {\n    return link2.y1 - link1.y1;\n  }\n\n  // return the distance between the link's target and source node, in terms of the nodes' column\n  function linkColumnDistance(link) {\n    return link.target.column - link.source.column;\n  }\n\n  // return the distance between the link's target and source node, in terms of the nodes' X coordinate\n  function linkXLength(link) {\n    return link.target.x0 - link.source.x1;\n  }\n\n  // Return the Y coordinate on the longerLink path * which is perpendicular shorterLink's source.\n  // * approx, based on a straight line from target to source, when in fact the path is a bezier\n  function linkPerpendicularYToLinkSource(longerLink, shorterLink) {\n    // get the angle for the longer link\n    var angle = linkAngle(longerLink);\n\n    // get the adjacent length to the other link's x position\n    var heightFromY1ToPependicular = linkXLength(shorterLink) / Math.tan(angle);\n\n    // add or subtract from longer link1's original y1, depending on the slope\n    var yPerpendicular = incline(longerLink) == 'up' ? longerLink.y1 + heightFromY1ToPependicular : longerLink.y1 - heightFromY1ToPependicular;\n\n    return yPerpendicular;\n  }\n\n  // Return the Y coordinate on the longerLink path * which is perpendicular shorterLink's source.\n  // * approx, based on a straight line from target to source, when in fact the path is a bezier\n  function linkPerpendicularYToLinkTarget(longerLink, shorterLink) {\n    // get the angle for the longer link\n    var angle = linkAngle(longerLink);\n\n    // get the adjacent length to the other link's x position\n    var heightFromY1ToPependicular = linkXLength(shorterLink) / Math.tan(angle);\n\n    // add or subtract from longer link's original y1, depending on the slope\n    var yPerpendicular = incline(longerLink) == 'up' ? longerLink.y1 - heightFromY1ToPependicular : longerLink.y1 + heightFromY1ToPependicular;\n\n    return yPerpendicular;\n  }\n\n  // Move any nodes that overlap links which span 2+ columns\n  function resolveNodeLinkOverlaps(graph, y0, y1, id) {\n\n    graph.links.forEach(function (link) {\n      if (link.circular) {\n        return;\n      }\n\n      if (link.target.column - link.source.column > 1) {\n        var columnToTest = link.source.column + 1;\n        var maxColumnToTest = link.target.column - 1;\n\n        var i = 1;\n        var numberOfColumnsToTest = maxColumnToTest - columnToTest + 1;\n\n        for (i = 1; columnToTest <= maxColumnToTest; columnToTest++, i++) {\n          graph.nodes.forEach(function (node) {\n            if (node.column == columnToTest) {\n              var t = i / (numberOfColumnsToTest + 1);\n\n              // Find all the points of a cubic bezier curve in javascript\n              // https://stackoverflow.com/questions/15397596/find-all-the-points-of-a-cubic-bezier-curve-in-javascript\n\n              var B0_t = Math.pow(1 - t, 3);\n              var B1_t = 3 * t * Math.pow(1 - t, 2);\n              var B2_t = 3 * Math.pow(t, 2) * (1 - t);\n              var B3_t = Math.pow(t, 3);\n\n              var py_t = B0_t * link.y0 + B1_t * link.y0 + B2_t * link.y1 + B3_t * link.y1;\n\n              var linkY0AtColumn = py_t - link.width / 2;\n              var linkY1AtColumn = py_t + link.width / 2;\n              var dy;\n\n              // If top of link overlaps node, push node up\n              if (linkY0AtColumn > node.y0 && linkY0AtColumn < node.y1) {\n\n                dy = node.y1 - linkY0AtColumn + 10;\n                dy = node.circularLinkType == 'bottom' ? dy : -dy;\n\n                node = adjustNodeHeight(node, dy, y0, y1);\n\n                // check if other nodes need to move up too\n                graph.nodes.forEach(function (otherNode) {\n                  // don't need to check itself or nodes at different columns\n                  if (getNodeID(otherNode, id) == getNodeID(node, id) || otherNode.column != node.column) {\n                    return;\n                  }\n                  if (nodesOverlap(node, otherNode)) {\n                    adjustNodeHeight(otherNode, dy, y0, y1);\n                  }\n                });\n              } else if (linkY1AtColumn > node.y0 && linkY1AtColumn < node.y1) {\n                // If bottom of link overlaps node, push node down\n                dy = linkY1AtColumn - node.y0 + 10;\n\n                node = adjustNodeHeight(node, dy, y0, y1);\n\n                // check if other nodes need to move down too\n                graph.nodes.forEach(function (otherNode) {\n                  // don't need to check itself or nodes at different columns\n                  if (getNodeID(otherNode, id) == getNodeID(node, id) || otherNode.column != node.column) {\n                    return;\n                  }\n                  if (otherNode.y0 < node.y1 && otherNode.y1 > node.y1) {\n                    adjustNodeHeight(otherNode, dy, y0, y1);\n                  }\n                });\n              } else if (linkY0AtColumn < node.y0 && linkY1AtColumn > node.y1) {\n                // if link completely overlaps node\n                dy = linkY1AtColumn - node.y0 + 10;\n\n                node = adjustNodeHeight(node, dy, y0, y1);\n\n                graph.nodes.forEach(function (otherNode) {\n                  // don't need to check itself or nodes at different columns\n                  if (getNodeID(otherNode, id) == getNodeID(node, id) || otherNode.column != node.column) {\n                    return;\n                  }\n                  if (otherNode.y0 < node.y1 && otherNode.y1 > node.y1) {\n                    adjustNodeHeight(otherNode, dy, y0, y1);\n                  }\n                });\n              }\n            }\n          });\n        }\n      }\n    });\n  }\n\n  // check if two nodes overlap\n  function nodesOverlap(nodeA, nodeB) {\n    // test if nodeA top partially overlaps nodeB\n    if (nodeA.y0 > nodeB.y0 && nodeA.y0 < nodeB.y1) {\n      return true;\n    } else if (nodeA.y1 > nodeB.y0 && nodeA.y1 < nodeB.y1) {\n      // test if nodeA bottom partially overlaps nodeB\n      return true;\n    } else if (nodeA.y0 < nodeB.y0 && nodeA.y1 > nodeB.y1) {\n      // test if nodeA covers nodeB\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  // update a node, and its associated links, vertical positions (y0, y1)\n  function adjustNodeHeight(node, dy, sankeyY0, sankeyY1) {\n    if (node.y0 + dy >= sankeyY0 && node.y1 + dy <= sankeyY1) {\n      node.y0 = node.y0 + dy;\n      node.y1 = node.y1 + dy;\n\n      node.targetLinks.forEach(function (l) {\n        l.y1 = l.y1 + dy;\n      });\n\n      node.sourceLinks.forEach(function (l) {\n        l.y0 = l.y0 + dy;\n      });\n    }\n    return node;\n  }\n\n  // sort and set the links' y0 for each node\n  function sortSourceLinks(graph, y1, id, moveNodes) {\n    graph.nodes.forEach(function (node) {\n      // move any nodes up which are off the bottom\n      if (moveNodes && node.y + (node.y1 - node.y0) > y1) {\n        node.y = node.y - (node.y + (node.y1 - node.y0) - y1);\n      }\n\n      var nodesSourceLinks = graph.links.filter(function (l) {\n        return getNodeID(l.source, id) == getNodeID(node, id);\n      });\n\n      var nodeSourceLinksLength = nodesSourceLinks.length;\n\n      // if more than 1 link then sort\n      if (nodeSourceLinksLength > 1) {\n        nodesSourceLinks.sort(function (link1, link2) {\n          // if both are not circular...\n          if (!link1.circular && !link2.circular) {\n            // if the target nodes are the same column, then sort by the link's target y\n            if (link1.target.column == link2.target.column) {\n              return link1.y1 - link2.y1;\n            } else if (!sameInclines(link1, link2)) {\n              // if the links slope in different directions, then sort by the link's target y\n              return link1.y1 - link2.y1;\n\n              // if the links slope in same directions, then sort by any overlap\n            } else {\n              if (link1.target.column > link2.target.column) {\n                var link2Adj = linkPerpendicularYToLinkTarget(link2, link1);\n                return link1.y1 - link2Adj;\n              }\n              if (link2.target.column > link1.target.column) {\n                var link1Adj = linkPerpendicularYToLinkTarget(link1, link2);\n                return link1Adj - link2.y1;\n              }\n            }\n          }\n\n          // if only one is circular, the move top links up, or bottom links down\n          if (link1.circular && !link2.circular) {\n            return link1.circularLinkType == 'top' ? -1 : 1;\n          } else if (link2.circular && !link1.circular) {\n            return link2.circularLinkType == 'top' ? 1 : -1;\n          }\n\n          // if both links are circular...\n          if (link1.circular && link2.circular) {\n            // ...and they both loop the same way (both top)\n            if (link1.circularLinkType === link2.circularLinkType && link1.circularLinkType == 'top') {\n              // ...and they both connect to a target with same column, then sort by the target's y\n              if (link1.target.column === link2.target.column) {\n                return link1.target.y1 - link2.target.y1;\n              } else {\n                // ...and they connect to different column targets, then sort by how far back they\n                return link2.target.column - link1.target.column;\n              }\n            } else if (link1.circularLinkType === link2.circularLinkType && link1.circularLinkType == 'bottom') {\n              // ...and they both loop the same way (both bottom)\n              // ...and they both connect to a target with same column, then sort by the target's y\n              if (link1.target.column === link2.target.column) {\n                return link2.target.y1 - link1.target.y1;\n              } else {\n                // ...and they connect to different column targets, then sort by how far back they\n                return link1.target.column - link2.target.column;\n              }\n            } else {\n              // ...and they loop around different ways, the move top up and bottom down\n              return link1.circularLinkType == 'top' ? -1 : 1;\n            }\n          }\n        });\n      }\n\n      // update y0 for links\n      var ySourceOffset = node.y0;\n\n      nodesSourceLinks.forEach(function (link) {\n        link.y0 = ySourceOffset + link.width / 2;\n        ySourceOffset = ySourceOffset + link.width;\n      });\n\n      // correct any circular bottom links so they are at the bottom of the node\n      nodesSourceLinks.forEach(function (link, i) {\n        if (link.circularLinkType == 'bottom') {\n          var j = i + 1;\n          var offsetFromBottom = 0;\n          // sum the widths of any links that are below this link\n          for (j; j < nodeSourceLinksLength; j++) {\n            offsetFromBottom = offsetFromBottom + nodesSourceLinks[j].width;\n          }\n          link.y0 = node.y1 - offsetFromBottom - link.width / 2;\n        }\n      });\n    });\n  }\n\n  // sort and set the links' y1 for each node\n  function sortTargetLinks(graph, y1, id) {\n    graph.nodes.forEach(function (node) {\n      var nodesTargetLinks = graph.links.filter(function (l) {\n        return getNodeID(l.target, id) == getNodeID(node, id);\n      });\n\n      var nodesTargetLinksLength = nodesTargetLinks.length;\n\n      if (nodesTargetLinksLength > 1) {\n        nodesTargetLinks.sort(function (link1, link2) {\n          // if both are not circular, the base on the source y position\n          if (!link1.circular && !link2.circular) {\n            if (link1.source.column == link2.source.column) {\n              return link1.y0 - link2.y0;\n            } else if (!sameInclines(link1, link2)) {\n              return link1.y0 - link2.y0;\n            } else {\n              // get the angle of the link to the further source node (ie the smaller column)\n              if (link2.source.column < link1.source.column) {\n                var link2Adj = linkPerpendicularYToLinkSource(link2, link1);\n\n                return link1.y0 - link2Adj;\n              }\n              if (link1.source.column < link2.source.column) {\n                var link1Adj = linkPerpendicularYToLinkSource(link1, link2);\n\n                return link1Adj - link2.y0;\n              }\n            }\n          }\n\n          // if only one is circular, the move top links up, or bottom links down\n          if (link1.circular && !link2.circular) {\n            return link1.circularLinkType == 'top' ? -1 : 1;\n          } else if (link2.circular && !link1.circular) {\n            return link2.circularLinkType == 'top' ? 1 : -1;\n          }\n\n          // if both links are circular...\n          if (link1.circular && link2.circular) {\n            // ...and they both loop the same way (both top)\n            if (link1.circularLinkType === link2.circularLinkType && link1.circularLinkType == 'top') {\n              // ...and they both connect to a target with same column, then sort by the target's y\n              if (link1.source.column === link2.source.column) {\n                return link1.source.y1 - link2.source.y1;\n              } else {\n                // ...and they connect to different column targets, then sort by how far back they\n                return link1.source.column - link2.source.column;\n              }\n            } else if (link1.circularLinkType === link2.circularLinkType && link1.circularLinkType == 'bottom') {\n              // ...and they both loop the same way (both bottom)\n              // ...and they both connect to a target with same column, then sort by the target's y\n              if (link1.source.column === link2.source.column) {\n                return link1.source.y1 - link2.source.y1;\n              } else {\n                // ...and they connect to different column targets, then sort by how far back they\n                return link2.source.column - link1.source.column;\n              }\n            } else {\n              // ...and they loop around different ways, the move top up and bottom down\n              return link1.circularLinkType == 'top' ? -1 : 1;\n            }\n          }\n        });\n      }\n\n      // update y1 for links\n      var yTargetOffset = node.y0;\n\n      nodesTargetLinks.forEach(function (link) {\n        link.y1 = yTargetOffset + link.width / 2;\n        yTargetOffset = yTargetOffset + link.width;\n      });\n\n      // correct any circular bottom links so they are at the bottom of the node\n      nodesTargetLinks.forEach(function (link, i) {\n        if (link.circularLinkType == 'bottom') {\n          var j = i + 1;\n          var offsetFromBottom = 0;\n          // sum the widths of any links that are below this link\n          for (j; j < nodesTargetLinksLength; j++) {\n            offsetFromBottom = offsetFromBottom + nodesTargetLinks[j].width;\n          }\n          link.y1 = node.y1 - offsetFromBottom - link.width / 2;\n        }\n      });\n    });\n  }\n\n  // test if links both slope up, or both slope down\n  function sameInclines(link1, link2) {\n    return incline(link1) == incline(link2);\n  }\n\n  // returns the slope of a link, from source to target\n  // up => slopes up from source to target\n  // down => slopes down from source to target\n  function incline(link) {\n    return link.y0 - link.y1 > 0 ? 'up' : 'down';\n  }\n\n  // check if link is self linking, ie links a node to the same node\n  function selfLinking(link, id) {\n    return getNodeID(link.source, id) == getNodeID(link.target, id);\n  }\n\n  function fillHeight(graph, y0, y1) {\n\n    var nodes = graph.nodes;\n    var links = graph.links;\n\n    var top = false;\n    var bottom = false;\n\n    links.forEach(function (link) {\n      if (link.circularLinkType == \"top\") {\n        top = true;\n      } else if (link.circularLinkType == \"bottom\") {\n        bottom = true;\n      }\n    });\n\n    if (top == false || bottom == false) {\n      var minY0 = d3Array.min(nodes, function (node) {\n        return node.y0;\n      });\n      var maxY1 = d3Array.max(nodes, function (node) {\n        return node.y1;\n      });\n      var currentHeight = maxY1 - minY0;\n      var chartHeight = y1 - y0;\n      var ratio = chartHeight / currentHeight;\n\n      nodes.forEach(function (node) {\n        var nodeHeight = (node.y1 - node.y0) * ratio;\n        node.y0 = (node.y0 - minY0) * ratio;\n        node.y1 = node.y0 + nodeHeight;\n      });\n\n      links.forEach(function (link) {\n        link.y0 = (link.y0 - minY0) * ratio;\n        link.y1 = (link.y1 - minY0) * ratio;\n        link.width = link.width * ratio;\n      });\n    }\n  }\n\n  exports.sankeyCircular = sankeyCircular;\n  exports.sankeyCenter = center;\n  exports.sankeyLeft = left;\n  exports.sankeyRight = right;\n  exports.sankeyJustify = justify;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{\"d3-array\":145,\"d3-collection\":146,\"d3-shape\":155,\"elementary-circuits-directed-graph\":167}],155:[function(_dereq_,module,exports){\n// https://d3js.org/d3-shape/ v1.3.4 Copyright 2019 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, _dereq_('d3-path')) :\ntypeof define === 'function' && define.amd ? define(['exports', 'd3-path'], factory) :\n(factory((global.d3 = global.d3 || {}),global.d3));\n}(this, (function (exports,d3Path) { 'use strict';\n\nfunction constant(x) {\n  return function constant() {\n    return x;\n  };\n}\n\nvar abs = Math.abs;\nvar atan2 = Math.atan2;\nvar cos = Math.cos;\nvar max = Math.max;\nvar min = Math.min;\nvar sin = Math.sin;\nvar sqrt = Math.sqrt;\n\nvar epsilon = 1e-12;\nvar pi = Math.PI;\nvar halfPi = pi / 2;\nvar tau = 2 * pi;\n\nfunction acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nfunction asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = y32 * x10 - x32 * y10;\n  if (t * t < epsilon) return;\n  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\nfunction arc() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = constant(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - halfPi,\n        a1 = endAngle.apply(this, arguments) - halfPi,\n        da = abs(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = d3Path.path();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > tau - epsilon) {\n      context.moveTo(r1 * cos(a0), r1 * sin(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > epsilon) {\n        context.moveTo(r0 * cos(a1), r0 * sin(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n          rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > epsilon) {\n        var p0 = asin(rp / r0 * sin(ap)),\n            p1 = asin(rp / r1 * sin(ap));\n        if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * cos(a01),\n          y01 = r1 * sin(a01),\n          x10 = r0 * cos(a10),\n          y10 = r0 * sin(a10);\n\n      // Apply rounded corners?\n      if (rc > epsilon) {\n        var x11 = r1 * cos(a11),\n            y11 = r1 * sin(a11),\n            x00 = r0 * cos(a00),\n            y00 = r0 * sin(a00),\n            oc;\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n          var ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n              lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = min(rc, (r0 - lc) / (kc - 1));\n          rc1 = min(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > epsilon) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > epsilon) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n    return [cos(a) * r, sin(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n}\n\nfunction Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\nfunction curveLinear(context) {\n  return new Linear(context);\n}\n\nfunction x(p) {\n  return p[0];\n}\n\nfunction y(p) {\n  return p[1];\n}\n\nfunction line() {\n  var x$$1 = x,\n      y$$1 = y,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = d3Path.path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x$$1(d, i, data), +y$$1(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x$$1 = typeof _ === \"function\" ? _ : constant(+_), line) : x$$1;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y$$1 = typeof _ === \"function\" ? _ : constant(+_), line) : y$$1;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n}\n\nfunction area() {\n  var x0 = x,\n      x1 = null,\n      y0 = constant(0),\n      y1 = y,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = d3Path.path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return line().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n}\n\nfunction descending(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n\nfunction identity(d) {\n  return d;\n}\n\nfunction pie() {\n  var value = identity,\n      sortValues = descending,\n      sort = null,\n      startAngle = constant(0),\n      endAngle = constant(tau),\n      padAngle = constant(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n  };\n\n  return pie;\n}\n\nvar curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nfunction curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n\nfunction lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(curveRadial(_)) : c()._curve;\n  };\n\n  return l;\n}\n\nfunction lineRadial$1() {\n  return lineRadial(line().curve(curveRadialLinear));\n}\n\nfunction areaRadial() {\n  var a = area().curve(curveRadialLinear),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n  a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n  a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n  a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n  a.curve = function(_) {\n    return arguments.length ? c(curveRadial(_)) : c()._curve;\n  };\n\n  return a;\n}\n\nfunction pointRadial(x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n\nvar slice = Array.prototype.slice;\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x$$1 = x,\n      y$$1 = y,\n      context = null;\n\n  function link() {\n    var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n    if (!context) context = buffer = d3Path.path();\n    curve(context, +x$$1.apply(this, (argv[0] = s, argv)), +y$$1.apply(this, argv), +x$$1.apply(this, (argv[0] = t, argv)), +y$$1.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function(_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function(_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function(_) {\n    return arguments.length ? (x$$1 = typeof _ === \"function\" ? _ : constant(+_), link) : x$$1;\n  };\n\n  link.y = function(_) {\n    return arguments.length ? (y$$1 = typeof _ === \"function\" ? _ : constant(+_), link) : y$$1;\n  };\n\n  link.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial$1(context, x0, y0, x1, y1) {\n  var p0 = pointRadial(x0, y0),\n      p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n      p2 = pointRadial(x1, y0),\n      p3 = pointRadial(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nfunction linkHorizontal() {\n  return link(curveHorizontal);\n}\n\nfunction linkVertical() {\n  return link(curveVertical);\n}\n\nfunction linkRadial() {\n  var l = link(curveRadial$1);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}\n\nvar circle = {\n  draw: function(context, size) {\n    var r = Math.sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};\n\nvar cross = {\n  draw: function(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};\n\nvar tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\n\nvar diamond = {\n  draw: function(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};\n\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n    kx = Math.sin(tau / 10) * kr,\n    ky = -Math.cos(tau / 10) * kr;\n\nvar star = {\n  draw: function(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (var i = 1; i < 5; ++i) {\n      var a = tau * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n};\n\nvar square = {\n  draw: function(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};\n\nvar sqrt3 = Math.sqrt(3);\n\nvar triangle = {\n  draw: function(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};\n\nvar c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\n\nvar wye = {\n  draw: function(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};\n\nvar symbols = [\n  circle,\n  cross,\n  diamond,\n  square,\n  star,\n  triangle,\n  wye\n];\n\nfunction symbol() {\n  var type = constant(circle),\n      size = constant(64),\n      context = null;\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = d3Path.path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}\n\nfunction noop() {}\n\nfunction point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nfunction Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\nfunction basis(context) {\n  return new Basis(context);\n}\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x2, this._y2);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x2, this._y2);\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\nfunction basisClosed(context) {\n  return new BasisClosed(context);\n}\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n      case 3: this._point = 4; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\nfunction basisOpen(context) {\n  return new BasisOpen(context);\n}\n\nfunction Bundle(context, beta) {\n  this._basis = new Basis(context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\nvar bundle = (function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85);\n\nfunction point$1(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nfunction Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point$1(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // proceed\n      default: point$1(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar cardinal = (function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n\nfunction CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: point$1(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar cardinalClosed = (function custom(tension) {\n\n  function cardinal$$1(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal$$1.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal$$1;\n})(0);\n\nfunction CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: point$1(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar cardinalOpen = (function custom(tension) {\n\n  function cardinal$$1(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal$$1.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal$$1;\n})(0);\n\nfunction point$2(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > epsilon) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > epsilon) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // proceed\n      default: point$2(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar catmullRom = (function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: point$2(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar catmullRomClosed = (function custom(alpha) {\n\n  function catmullRom$$1(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n  }\n\n  catmullRom$$1.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom$$1;\n})(0.5);\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: point$2(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nvar catmullRomOpen = (function custom(alpha) {\n\n  function catmullRom$$1(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n  }\n\n  catmullRom$$1.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom$$1;\n})(0.5);\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\nfunction linearClosed(context) {\n  return new LinearClosed(context);\n}\n\nfunction sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point$3(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point$3(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point$3(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point$3(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n};\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nfunction monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nfunction monotoneY(context) {\n  return new MonotoneY(context);\n}\n\nfunction Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  a[n - 1] = r[n - 1] / b[n - 1];\n  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n  return [a, b];\n}\n\nfunction natural(context) {\n  return new Natural(context);\n}\n\nfunction Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: {\n        if (this._t <= 0) {\n          this._context.lineTo(this._x, y);\n          this._context.lineTo(x, y);\n        } else {\n          var x1 = this._x * (1 - this._t) + x * this._t;\n          this._context.lineTo(x1, this._y);\n          this._context.lineTo(x1, y);\n        }\n        break;\n      }\n    }\n    this._x = x, this._y = y;\n  }\n};\n\nfunction step(context) {\n  return new Step(context, 0.5);\n}\n\nfunction stepBefore(context) {\n  return new Step(context, 0);\n}\n\nfunction stepAfter(context) {\n  return new Step(context, 1);\n}\n\nfunction none(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n}\n\nfunction none$1(series) {\n  var n = series.length, o = new Array(n);\n  while (--n >= 0) o[n] = n;\n  return o;\n}\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\nfunction stack() {\n  var keys = constant([]),\n      order = none$1,\n      offset = none,\n      value = stackValue;\n\n  function stack(data) {\n    var kz = keys.apply(this, arguments),\n        i,\n        m = data.length,\n        n = kz.length,\n        sz = new Array(n),\n        oz;\n\n    for (i = 0; i < n; ++i) {\n      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n        si[j] = sij = [0, +value(data[j], ki, j, data)];\n        sij.data = data[j];\n      }\n      si.key = ki;\n    }\n\n    for (i = 0, oz = order(sz); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function(_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n  };\n\n  stack.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n  };\n\n  stack.order = function(_) {\n    return arguments.length ? (order = _ == null ? none$1 : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n  };\n\n  stack.offset = function(_) {\n    return arguments.length ? (offset = _ == null ? none : _, stack) : offset;\n  };\n\n  return stack;\n}\n\nfunction expand(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n  }\n  none(series, order);\n}\n\nfunction diverging(series, order) {\n  if (!((n = series.length) > 1)) return;\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) >= 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = yp;\n      }\n    }\n  }\n}\n\nfunction silhouette(series, order) {\n  if (!((n = series.length) > 0)) return;\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n  none(series, order);\n}\n\nfunction wiggle(series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n      s1 += sij0, s2 += s3 * sij0;\n    }\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  none(series, order);\n}\n\nfunction appearance(series) {\n  var peaks = series.map(peak);\n  return none$1(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n  var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n  while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n  return j;\n}\n\nfunction ascending(series) {\n  var sums = series.map(sum);\n  return none$1(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nfunction sum(series) {\n  var s = 0, i = -1, n = series.length, v;\n  while (++i < n) if (v = +series[i][1]) s += v;\n  return s;\n}\n\nfunction descending$1(series) {\n  return ascending(series).reverse();\n}\n\nfunction insideOut(series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(sum),\n      order = appearance(series),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n}\n\nfunction reverse(series) {\n  return none$1(series).reverse();\n}\n\nexports.arc = arc;\nexports.area = area;\nexports.line = line;\nexports.pie = pie;\nexports.areaRadial = areaRadial;\nexports.radialArea = areaRadial;\nexports.lineRadial = lineRadial$1;\nexports.radialLine = lineRadial$1;\nexports.pointRadial = pointRadial;\nexports.linkHorizontal = linkHorizontal;\nexports.linkVertical = linkVertical;\nexports.linkRadial = linkRadial;\nexports.symbol = symbol;\nexports.symbols = symbols;\nexports.symbolCircle = circle;\nexports.symbolCross = cross;\nexports.symbolDiamond = diamond;\nexports.symbolSquare = square;\nexports.symbolStar = star;\nexports.symbolTriangle = triangle;\nexports.symbolWye = wye;\nexports.curveBasisClosed = basisClosed;\nexports.curveBasisOpen = basisOpen;\nexports.curveBasis = basis;\nexports.curveBundle = bundle;\nexports.curveCardinalClosed = cardinalClosed;\nexports.curveCardinalOpen = cardinalOpen;\nexports.curveCardinal = cardinal;\nexports.curveCatmullRomClosed = catmullRomClosed;\nexports.curveCatmullRomOpen = catmullRomOpen;\nexports.curveCatmullRom = catmullRom;\nexports.curveLinearClosed = linearClosed;\nexports.curveLinear = curveLinear;\nexports.curveMonotoneX = monotoneX;\nexports.curveMonotoneY = monotoneY;\nexports.curveNatural = natural;\nexports.curveStep = step;\nexports.curveStepAfter = stepAfter;\nexports.curveStepBefore = stepBefore;\nexports.stack = stack;\nexports.stackOffsetExpand = expand;\nexports.stackOffsetDiverging = diverging;\nexports.stackOffsetNone = none;\nexports.stackOffsetSilhouette = silhouette;\nexports.stackOffsetWiggle = wiggle;\nexports.stackOrderAppearance = appearance;\nexports.stackOrderAscending = ascending;\nexports.stackOrderDescending = descending$1;\nexports.stackOrderInsideOut = insideOut;\nexports.stackOrderNone = none$1;\nexports.stackOrderReverse = reverse;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{\"d3-path\":152}],156:[function(_dereq_,module,exports){\n// https://d3js.org/d3-timer/ Version 1.0.7. Copyright 2017 Mike Bostock.\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.d3 = global.d3 || {})));\n}(this, (function (exports) { 'use strict';\n\nvar frame = 0;\nvar timeout = 0;\nvar interval = 0;\nvar pokeDelay = 1000;\nvar taskHead;\nvar taskTail;\nvar clockLast = 0;\nvar clockNow = 0;\nvar clockSkew = 0;\nvar clock = typeof performance === \"object\" && performance.now ? performance : Date;\nvar setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nfunction now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nfunction Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nfunction timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nfunction timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n\nvar timeout$1 = function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n};\n\nvar interval$1 = function(callback, delay, time) {\n  var t = new Timer, total = delay;\n  if (delay == null) return t.restart(callback, delay, time), t;\n  delay = +delay, time = time == null ? now() : +time;\n  t.restart(function tick(elapsed) {\n    elapsed += total;\n    t.restart(tick, total += delay, time);\n    callback(elapsed);\n  }, delay, time);\n  return t;\n};\n\nexports.now = now;\nexports.timer = timer;\nexports.timerFlush = timerFlush;\nexports.timeout = timeout$1;\nexports.interval = interval$1;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],157:[function(_dereq_,module,exports){\n!function() {\n  var d3 = {\n    version: \"3.5.17\"\n  };\n  var d3_arraySlice = [].slice, d3_array = function(list) {\n    return d3_arraySlice.call(list);\n  };\n  var d3_document = this.document;\n  function d3_documentElement(node) {\n    return node && (node.ownerDocument || node.document || node).documentElement;\n  }\n  function d3_window(node) {\n    return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);\n  }\n  if (d3_document) {\n    try {\n      d3_array(d3_document.documentElement.childNodes)[0].nodeType;\n    } catch (e) {\n      d3_array = function(list) {\n        var i = list.length, array = new Array(i);\n        while (i--) array[i] = list[i];\n        return array;\n      };\n    }\n  }\n  if (!Date.now) Date.now = function() {\n    return +new Date();\n  };\n  if (d3_document) {\n    try {\n      d3_document.createElement(\"DIV\").style.setProperty(\"opacity\", 0, \"\");\n    } catch (error) {\n      var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;\n      d3_element_prototype.setAttribute = function(name, value) {\n        d3_element_setAttribute.call(this, name, value + \"\");\n      };\n      d3_element_prototype.setAttributeNS = function(space, local, value) {\n        d3_element_setAttributeNS.call(this, space, local, value + \"\");\n      };\n      d3_style_prototype.setProperty = function(name, value, priority) {\n        d3_style_setProperty.call(this, name, value + \"\", priority);\n      };\n    }\n  }\n  d3.ascending = d3_ascending;\n  function d3_ascending(a, b) {\n    return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n  }\n  d3.descending = function(a, b) {\n    return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n  };\n  d3.min = function(array, f) {\n    var i = -1, n = array.length, a, b;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null && a > b) a = b;\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;\n    }\n    return a;\n  };\n  d3.max = function(array, f) {\n    var i = -1, n = array.length, a, b;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null && b > a) a = b;\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;\n    }\n    return a;\n  };\n  d3.extent = function(array, f) {\n    var i = -1, n = array.length, a, b, c;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = c = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null) {\n        if (a > b) a = b;\n        if (c < b) c = b;\n      }\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = c = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null) {\n        if (a > b) a = b;\n        if (c < b) c = b;\n      }\n    }\n    return [ a, c ];\n  };\n  function d3_number(x) {\n    return x === null ? NaN : +x;\n  }\n  function d3_numeric(x) {\n    return !isNaN(x);\n  }\n  d3.sum = function(array, f) {\n    var s = 0, n = array.length, a, i = -1;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = +array[i])) s += a;\n    } else {\n      while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;\n    }\n    return s;\n  };\n  d3.mean = function(array, f) {\n    var s = 0, n = array.length, a, i = -1, j = n;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;\n    } else {\n      while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;\n    }\n    if (j) return s / j;\n  };\n  d3.quantile = function(values, p) {\n    var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;\n    return e ? v + e * (values[h] - v) : v;\n  };\n  d3.median = function(array, f) {\n    var numbers = [], n = array.length, a, i = -1;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);\n    } else {\n      while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);\n    }\n    if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);\n  };\n  d3.variance = function(array, f) {\n    var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;\n    if (arguments.length === 1) {\n      while (++i < n) {\n        if (d3_numeric(a = d3_number(array[i]))) {\n          d = a - m;\n          m += d / ++j;\n          s += d * (a - m);\n        }\n      }\n    } else {\n      while (++i < n) {\n        if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {\n          d = a - m;\n          m += d / ++j;\n          s += d * (a - m);\n        }\n      }\n    }\n    if (j > 1) return s / (j - 1);\n  };\n  d3.deviation = function() {\n    var v = d3.variance.apply(this, arguments);\n    return v ? Math.sqrt(v) : v;\n  };\n  function d3_bisector(compare) {\n    return {\n      left: function(a, x, lo, hi) {\n        if (arguments.length < 3) lo = 0;\n        if (arguments.length < 4) hi = a.length;\n        while (lo < hi) {\n          var mid = lo + hi >>> 1;\n          if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;\n        }\n        return lo;\n      },\n      right: function(a, x, lo, hi) {\n        if (arguments.length < 3) lo = 0;\n        if (arguments.length < 4) hi = a.length;\n        while (lo < hi) {\n          var mid = lo + hi >>> 1;\n          if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;\n        }\n        return lo;\n      }\n    };\n  }\n  var d3_bisect = d3_bisector(d3_ascending);\n  d3.bisectLeft = d3_bisect.left;\n  d3.bisect = d3.bisectRight = d3_bisect.right;\n  d3.bisector = function(f) {\n    return d3_bisector(f.length === 1 ? function(d, x) {\n      return d3_ascending(f(d), x);\n    } : f);\n  };\n  d3.shuffle = function(array, i0, i1) {\n    if ((m = arguments.length) < 3) {\n      i1 = array.length;\n      if (m < 2) i0 = 0;\n    }\n    var m = i1 - i0, t, i;\n    while (m) {\n      i = Math.random() * m-- | 0;\n      t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;\n    }\n    return array;\n  };\n  d3.permute = function(array, indexes) {\n    var i = indexes.length, permutes = new Array(i);\n    while (i--) permutes[i] = array[indexes[i]];\n    return permutes;\n  };\n  d3.pairs = function(array) {\n    var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);\n    while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];\n    return pairs;\n  };\n  d3.transpose = function(matrix) {\n    if (!(n = matrix.length)) return [];\n    for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) {\n      for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) {\n        row[j] = matrix[j][i];\n      }\n    }\n    return transpose;\n  };\n  function d3_transposeLength(d) {\n    return d.length;\n  }\n  d3.zip = function() {\n    return d3.transpose(arguments);\n  };\n  d3.keys = function(map) {\n    var keys = [];\n    for (var key in map) keys.push(key);\n    return keys;\n  };\n  d3.values = function(map) {\n    var values = [];\n    for (var key in map) values.push(map[key]);\n    return values;\n  };\n  d3.entries = function(map) {\n    var entries = [];\n    for (var key in map) entries.push({\n      key: key,\n      value: map[key]\n    });\n    return entries;\n  };\n  d3.merge = function(arrays) {\n    var n = arrays.length, m, i = -1, j = 0, merged, array;\n    while (++i < n) j += arrays[i].length;\n    merged = new Array(j);\n    while (--n >= 0) {\n      array = arrays[n];\n      m = array.length;\n      while (--m >= 0) {\n        merged[--j] = array[m];\n      }\n    }\n    return merged;\n  };\n  var abs = Math.abs;\n  d3.range = function(start, stop, step) {\n    if (arguments.length < 3) {\n      step = 1;\n      if (arguments.length < 2) {\n        stop = start;\n        start = 0;\n      }\n    }\n    if ((stop - start) / step === Infinity) throw new Error(\"infinite range\");\n    var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;\n    start *= k, stop *= k, step *= k;\n    if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);\n    return range;\n  };\n  function d3_range_integerScale(x) {\n    var k = 1;\n    while (x * k % 1) k *= 10;\n    return k;\n  }\n  function d3_class(ctor, properties) {\n    for (var key in properties) {\n      Object.defineProperty(ctor.prototype, key, {\n        value: properties[key],\n        enumerable: false\n      });\n    }\n  }\n  d3.map = function(object, f) {\n    var map = new d3_Map();\n    if (object instanceof d3_Map) {\n      object.forEach(function(key, value) {\n        map.set(key, value);\n      });\n    } else if (Array.isArray(object)) {\n      var i = -1, n = object.length, o;\n      if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);\n    } else {\n      for (var key in object) map.set(key, object[key]);\n    }\n    return map;\n  };\n  function d3_Map() {\n    this._ = Object.create(null);\n  }\n  var d3_map_proto = \"__proto__\", d3_map_zero = \"\\x00\";\n  d3_class(d3_Map, {\n    has: d3_map_has,\n    get: function(key) {\n      return this._[d3_map_escape(key)];\n    },\n    set: function(key, value) {\n      return this._[d3_map_escape(key)] = value;\n    },\n    remove: d3_map_remove,\n    keys: d3_map_keys,\n    values: function() {\n      var values = [];\n      for (var key in this._) values.push(this._[key]);\n      return values;\n    },\n    entries: function() {\n      var entries = [];\n      for (var key in this._) entries.push({\n        key: d3_map_unescape(key),\n        value: this._[key]\n      });\n      return entries;\n    },\n    size: d3_map_size,\n    empty: d3_map_empty,\n    forEach: function(f) {\n      for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);\n    }\n  });\n  function d3_map_escape(key) {\n    return (key += \"\") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;\n  }\n  function d3_map_unescape(key) {\n    return (key += \"\")[0] === d3_map_zero ? key.slice(1) : key;\n  }\n  function d3_map_has(key) {\n    return d3_map_escape(key) in this._;\n  }\n  function d3_map_remove(key) {\n    return (key = d3_map_escape(key)) in this._ && delete this._[key];\n  }\n  function d3_map_keys() {\n    var keys = [];\n    for (var key in this._) keys.push(d3_map_unescape(key));\n    return keys;\n  }\n  function d3_map_size() {\n    var size = 0;\n    for (var key in this._) ++size;\n    return size;\n  }\n  function d3_map_empty() {\n    for (var key in this._) return false;\n    return true;\n  }\n  d3.nest = function() {\n    var nest = {}, keys = [], sortKeys = [], sortValues, rollup;\n    function map(mapType, array, depth) {\n      if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;\n      var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;\n      while (++i < n) {\n        if (values = valuesByKey.get(keyValue = key(object = array[i]))) {\n          values.push(object);\n        } else {\n          valuesByKey.set(keyValue, [ object ]);\n        }\n      }\n      if (mapType) {\n        object = mapType();\n        setter = function(keyValue, values) {\n          object.set(keyValue, map(mapType, values, depth));\n        };\n      } else {\n        object = {};\n        setter = function(keyValue, values) {\n          object[keyValue] = map(mapType, values, depth);\n        };\n      }\n      valuesByKey.forEach(setter);\n      return object;\n    }\n    function entries(map, depth) {\n      if (depth >= keys.length) return map;\n      var array = [], sortKey = sortKeys[depth++];\n      map.forEach(function(key, keyMap) {\n        array.push({\n          key: key,\n          values: entries(keyMap, depth)\n        });\n      });\n      return sortKey ? array.sort(function(a, b) {\n        return sortKey(a.key, b.key);\n      }) : array;\n    }\n    nest.map = function(array, mapType) {\n      return map(mapType, array, 0);\n    };\n    nest.entries = function(array) {\n      return entries(map(d3.map, array, 0), 0);\n    };\n    nest.key = function(d) {\n      keys.push(d);\n      return nest;\n    };\n    nest.sortKeys = function(order) {\n      sortKeys[keys.length - 1] = order;\n      return nest;\n    };\n    nest.sortValues = function(order) {\n      sortValues = order;\n      return nest;\n    };\n    nest.rollup = function(f) {\n      rollup = f;\n      return nest;\n    };\n    return nest;\n  };\n  d3.set = function(array) {\n    var set = new d3_Set();\n    if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);\n    return set;\n  };\n  function d3_Set() {\n    this._ = Object.create(null);\n  }\n  d3_class(d3_Set, {\n    has: d3_map_has,\n    add: function(key) {\n      this._[d3_map_escape(key += \"\")] = true;\n      return key;\n    },\n    remove: d3_map_remove,\n    values: d3_map_keys,\n    size: d3_map_size,\n    empty: d3_map_empty,\n    forEach: function(f) {\n      for (var key in this._) f.call(this, d3_map_unescape(key));\n    }\n  });\n  d3.behavior = {};\n  function d3_identity(d) {\n    return d;\n  }\n  d3.rebind = function(target, source) {\n    var i = 1, n = arguments.length, method;\n    while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);\n    return target;\n  };\n  function d3_rebind(target, source, method) {\n    return function() {\n      var value = method.apply(source, arguments);\n      return value === source ? target : value;\n    };\n  }\n  function d3_vendorSymbol(object, name) {\n    if (name in object) return name;\n    name = name.charAt(0).toUpperCase() + name.slice(1);\n    for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {\n      var prefixName = d3_vendorPrefixes[i] + name;\n      if (prefixName in object) return prefixName;\n    }\n  }\n  var d3_vendorPrefixes = [ \"webkit\", \"ms\", \"moz\", \"Moz\", \"o\", \"O\" ];\n  function d3_noop() {}\n  d3.dispatch = function() {\n    var dispatch = new d3_dispatch(), i = -1, n = arguments.length;\n    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n    return dispatch;\n  };\n  function d3_dispatch() {}\n  d3_dispatch.prototype.on = function(type, listener) {\n    var i = type.indexOf(\".\"), name = \"\";\n    if (i >= 0) {\n      name = type.slice(i + 1);\n      type = type.slice(0, i);\n    }\n    if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);\n    if (arguments.length === 2) {\n      if (listener == null) for (type in this) {\n        if (this.hasOwnProperty(type)) this[type].on(name, null);\n      }\n      return this;\n    }\n  };\n  function d3_dispatch_event(dispatch) {\n    var listeners = [], listenerByName = new d3_Map();\n    function event() {\n      var z = listeners, i = -1, n = z.length, l;\n      while (++i < n) if (l = z[i].on) l.apply(this, arguments);\n      return dispatch;\n    }\n    event.on = function(name, listener) {\n      var l = listenerByName.get(name), i;\n      if (arguments.length < 2) return l && l.on;\n      if (l) {\n        l.on = null;\n        listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));\n        listenerByName.remove(name);\n      }\n      if (listener) listeners.push(listenerByName.set(name, {\n        on: listener\n      }));\n      return dispatch;\n    };\n    return event;\n  }\n  d3.event = null;\n  function d3_eventPreventDefault() {\n    d3.event.preventDefault();\n  }\n  function d3_eventSource() {\n    var e = d3.event, s;\n    while (s = e.sourceEvent) e = s;\n    return e;\n  }\n  function d3_eventDispatch(target) {\n    var dispatch = new d3_dispatch(), i = 0, n = arguments.length;\n    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n    dispatch.of = function(thiz, argumentz) {\n      return function(e1) {\n        try {\n          var e0 = e1.sourceEvent = d3.event;\n          e1.target = target;\n          d3.event = e1;\n          dispatch[e1.type].apply(thiz, argumentz);\n        } finally {\n          d3.event = e0;\n        }\n      };\n    };\n    return dispatch;\n  }\n  d3.requote = function(s) {\n    return s.replace(d3_requote_re, \"\\\\$&\");\n  };\n  var d3_requote_re = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n  var d3_subclass = {}.__proto__ ? function(object, prototype) {\n    object.__proto__ = prototype;\n  } : function(object, prototype) {\n    for (var property in prototype) object[property] = prototype[property];\n  };\n  function d3_selection(groups) {\n    d3_subclass(groups, d3_selectionPrototype);\n    return groups;\n  }\n  var d3_select = function(s, n) {\n    return n.querySelector(s);\n  }, d3_selectAll = function(s, n) {\n    return n.querySelectorAll(s);\n  }, d3_selectMatches = function(n, s) {\n    var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, \"matchesSelector\")];\n    d3_selectMatches = function(n, s) {\n      return d3_selectMatcher.call(n, s);\n    };\n    return d3_selectMatches(n, s);\n  };\n  if (typeof Sizzle === \"function\") {\n    d3_select = function(s, n) {\n      return Sizzle(s, n)[0] || null;\n    };\n    d3_selectAll = Sizzle;\n    d3_selectMatches = Sizzle.matchesSelector;\n  }\n  d3.selection = function() {\n    return d3.select(d3_document.documentElement);\n  };\n  var d3_selectionPrototype = d3.selection.prototype = [];\n  d3_selectionPrototype.select = function(selector) {\n    var subgroups = [], subgroup, subnode, group, node;\n    selector = d3_selection_selector(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = (group = this[j]).parentNode;\n      for (var i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroup.push(subnode = selector.call(node, node.__data__, i, j));\n          if (subnode && \"__data__\" in node) subnode.__data__ = node.__data__;\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_selector(selector) {\n    return typeof selector === \"function\" ? selector : function() {\n      return d3_select(selector, this);\n    };\n  }\n  d3_selectionPrototype.selectAll = function(selector) {\n    var subgroups = [], subgroup, node;\n    selector = d3_selection_selectorAll(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));\n          subgroup.parentNode = node;\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_selectorAll(selector) {\n    return typeof selector === \"function\" ? selector : function() {\n      return d3_selectAll(selector, this);\n    };\n  }\n  var d3_nsXhtml = \"http://www.w3.org/1999/xhtml\";\n  var d3_nsPrefix = {\n    svg: \"http://www.w3.org/2000/svg\",\n    xhtml: d3_nsXhtml,\n    xlink: \"http://www.w3.org/1999/xlink\",\n    xml: \"http://www.w3.org/XML/1998/namespace\",\n    xmlns: \"http://www.w3.org/2000/xmlns/\"\n  };\n  d3.ns = {\n    prefix: d3_nsPrefix,\n    qualify: function(name) {\n      var i = name.indexOf(\":\"), prefix = name;\n      if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n      return d3_nsPrefix.hasOwnProperty(prefix) ? {\n        space: d3_nsPrefix[prefix],\n        local: name\n      } : name;\n    }\n  };\n  d3_selectionPrototype.attr = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") {\n        var node = this.node();\n        name = d3.ns.qualify(name);\n        return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);\n      }\n      for (value in name) this.each(d3_selection_attr(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_attr(name, value));\n  };\n  function d3_selection_attr(name, value) {\n    name = d3.ns.qualify(name);\n    function attrNull() {\n      this.removeAttribute(name);\n    }\n    function attrNullNS() {\n      this.removeAttributeNS(name.space, name.local);\n    }\n    function attrConstant() {\n      this.setAttribute(name, value);\n    }\n    function attrConstantNS() {\n      this.setAttributeNS(name.space, name.local, value);\n    }\n    function attrFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);\n    }\n    function attrFunctionNS() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);\n    }\n    return value == null ? name.local ? attrNullNS : attrNull : typeof value === \"function\" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;\n  }\n  function d3_collapse(s) {\n    return s.trim().replace(/\\s+/g, \" \");\n  }\n  d3_selectionPrototype.classed = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") {\n        var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;\n        if (value = node.classList) {\n          while (++i < n) if (!value.contains(name[i])) return false;\n        } else {\n          value = node.getAttribute(\"class\");\n          while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;\n        }\n        return true;\n      }\n      for (value in name) this.each(d3_selection_classed(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_classed(name, value));\n  };\n  function d3_selection_classedRe(name) {\n    return new RegExp(\"(?:^|\\\\s+)\" + d3.requote(name) + \"(?:\\\\s+|$)\", \"g\");\n  }\n  function d3_selection_classes(name) {\n    return (name + \"\").trim().split(/^|\\s+/);\n  }\n  function d3_selection_classed(name, value) {\n    name = d3_selection_classes(name).map(d3_selection_classedName);\n    var n = name.length;\n    function classedConstant() {\n      var i = -1;\n      while (++i < n) name[i](this, value);\n    }\n    function classedFunction() {\n      var i = -1, x = value.apply(this, arguments);\n      while (++i < n) name[i](this, x);\n    }\n    return typeof value === \"function\" ? classedFunction : classedConstant;\n  }\n  function d3_selection_classedName(name) {\n    var re = d3_selection_classedRe(name);\n    return function(node, value) {\n      if (c = node.classList) return value ? c.add(name) : c.remove(name);\n      var c = node.getAttribute(\"class\") || \"\";\n      if (value) {\n        re.lastIndex = 0;\n        if (!re.test(c)) node.setAttribute(\"class\", d3_collapse(c + \" \" + name));\n      } else {\n        node.setAttribute(\"class\", d3_collapse(c.replace(re, \" \")));\n      }\n    };\n  }\n  d3_selectionPrototype.style = function(name, value, priority) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof name !== \"string\") {\n        if (n < 2) value = \"\";\n        for (priority in name) this.each(d3_selection_style(priority, name[priority], value));\n        return this;\n      }\n      if (n < 2) {\n        var node = this.node();\n        return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);\n      }\n      priority = \"\";\n    }\n    return this.each(d3_selection_style(name, value, priority));\n  };\n  function d3_selection_style(name, value, priority) {\n    function styleNull() {\n      this.style.removeProperty(name);\n    }\n    function styleConstant() {\n      this.style.setProperty(name, value, priority);\n    }\n    function styleFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);\n    }\n    return value == null ? styleNull : typeof value === \"function\" ? styleFunction : styleConstant;\n  }\n  d3_selectionPrototype.property = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") return this.node()[name];\n      for (value in name) this.each(d3_selection_property(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_property(name, value));\n  };\n  function d3_selection_property(name, value) {\n    function propertyNull() {\n      delete this[name];\n    }\n    function propertyConstant() {\n      this[name] = value;\n    }\n    function propertyFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) delete this[name]; else this[name] = x;\n    }\n    return value == null ? propertyNull : typeof value === \"function\" ? propertyFunction : propertyConstant;\n  }\n  d3_selectionPrototype.text = function(value) {\n    return arguments.length ? this.each(typeof value === \"function\" ? function() {\n      var v = value.apply(this, arguments);\n      this.textContent = v == null ? \"\" : v;\n    } : value == null ? function() {\n      this.textContent = \"\";\n    } : function() {\n      this.textContent = value;\n    }) : this.node().textContent;\n  };\n  d3_selectionPrototype.html = function(value) {\n    return arguments.length ? this.each(typeof value === \"function\" ? function() {\n      var v = value.apply(this, arguments);\n      this.innerHTML = v == null ? \"\" : v;\n    } : value == null ? function() {\n      this.innerHTML = \"\";\n    } : function() {\n      this.innerHTML = value;\n    }) : this.node().innerHTML;\n  };\n  d3_selectionPrototype.append = function(name) {\n    name = d3_selection_creator(name);\n    return this.select(function() {\n      return this.appendChild(name.apply(this, arguments));\n    });\n  };\n  function d3_selection_creator(name) {\n    function create() {\n      var document = this.ownerDocument, namespace = this.namespaceURI;\n      return namespace === d3_nsXhtml && document.documentElement.namespaceURI === d3_nsXhtml ? document.createElement(name) : document.createElementNS(namespace, name);\n    }\n    function createNS() {\n      return this.ownerDocument.createElementNS(name.space, name.local);\n    }\n    return typeof name === \"function\" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;\n  }\n  d3_selectionPrototype.insert = function(name, before) {\n    name = d3_selection_creator(name);\n    before = d3_selection_selector(before);\n    return this.select(function() {\n      return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);\n    });\n  };\n  d3_selectionPrototype.remove = function() {\n    return this.each(d3_selectionRemove);\n  };\n  function d3_selectionRemove() {\n    var parent = this.parentNode;\n    if (parent) parent.removeChild(this);\n  }\n  d3_selectionPrototype.data = function(value, key) {\n    var i = -1, n = this.length, group, node;\n    if (!arguments.length) {\n      value = new Array(n = (group = this[0]).length);\n      while (++i < n) {\n        if (node = group[i]) {\n          value[i] = node.__data__;\n        }\n      }\n      return value;\n    }\n    function bind(group, groupData) {\n      var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;\n      if (key) {\n        var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;\n        for (i = -1; ++i < n; ) {\n          if (node = group[i]) {\n            if (nodeByKeyValue.has(keyValue = key.call(node, node.__data__, i))) {\n              exitNodes[i] = node;\n            } else {\n              nodeByKeyValue.set(keyValue, node);\n            }\n            keyValues[i] = keyValue;\n          }\n        }\n        for (i = -1; ++i < m; ) {\n          if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {\n            enterNodes[i] = d3_selection_dataNode(nodeData);\n          } else if (node !== true) {\n            updateNodes[i] = node;\n            node.__data__ = nodeData;\n          }\n          nodeByKeyValue.set(keyValue, true);\n        }\n        for (i = -1; ++i < n; ) {\n          if (i in keyValues && nodeByKeyValue.get(keyValues[i]) !== true) {\n            exitNodes[i] = group[i];\n          }\n        }\n      } else {\n        for (i = -1; ++i < n0; ) {\n          node = group[i];\n          nodeData = groupData[i];\n          if (node) {\n            node.__data__ = nodeData;\n            updateNodes[i] = node;\n          } else {\n            enterNodes[i] = d3_selection_dataNode(nodeData);\n          }\n        }\n        for (;i < m; ++i) {\n          enterNodes[i] = d3_selection_dataNode(groupData[i]);\n        }\n        for (;i < n; ++i) {\n          exitNodes[i] = group[i];\n        }\n      }\n      enterNodes.update = updateNodes;\n      enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;\n      enter.push(enterNodes);\n      update.push(updateNodes);\n      exit.push(exitNodes);\n    }\n    var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);\n    if (typeof value === \"function\") {\n      while (++i < n) {\n        bind(group = this[i], value.call(group, group.parentNode.__data__, i));\n      }\n    } else {\n      while (++i < n) {\n        bind(group = this[i], value);\n      }\n    }\n    update.enter = function() {\n      return enter;\n    };\n    update.exit = function() {\n      return exit;\n    };\n    return update;\n  };\n  function d3_selection_dataNode(data) {\n    return {\n      __data__: data\n    };\n  }\n  d3_selectionPrototype.datum = function(value) {\n    return arguments.length ? this.property(\"__data__\", value) : this.property(\"__data__\");\n  };\n  d3_selectionPrototype.filter = function(filter) {\n    var subgroups = [], subgroup, group, node;\n    if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = (group = this[j]).parentNode;\n      for (var i = 0, n = group.length; i < n; i++) {\n        if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n          subgroup.push(node);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_filter(selector) {\n    return function() {\n      return d3_selectMatches(this, selector);\n    };\n  }\n  d3_selectionPrototype.order = function() {\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {\n        if (node = group[i]) {\n          if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n          next = node;\n        }\n      }\n    }\n    return this;\n  };\n  d3_selectionPrototype.sort = function(comparator) {\n    comparator = d3_selection_sortComparator.apply(this, arguments);\n    for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);\n    return this.order();\n  };\n  function d3_selection_sortComparator(comparator) {\n    if (!arguments.length) comparator = d3_ascending;\n    return function(a, b) {\n      return a && b ? comparator(a.__data__, b.__data__) : !a - !b;\n    };\n  }\n  d3_selectionPrototype.each = function(callback) {\n    return d3_selection_each(this, function(node, i, j) {\n      callback.call(node, node.__data__, i, j);\n    });\n  };\n  function d3_selection_each(groups, callback) {\n    for (var j = 0, m = groups.length; j < m; j++) {\n      for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {\n        if (node = group[i]) callback(node, i, j);\n      }\n    }\n    return groups;\n  }\n  d3_selectionPrototype.call = function(callback) {\n    var args = d3_array(arguments);\n    callback.apply(args[0] = this, args);\n    return this;\n  };\n  d3_selectionPrototype.empty = function() {\n    return !this.node();\n  };\n  d3_selectionPrototype.node = function() {\n    for (var j = 0, m = this.length; j < m; j++) {\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        var node = group[i];\n        if (node) return node;\n      }\n    }\n    return null;\n  };\n  d3_selectionPrototype.size = function() {\n    var n = 0;\n    d3_selection_each(this, function() {\n      ++n;\n    });\n    return n;\n  };\n  function d3_selection_enter(selection) {\n    d3_subclass(selection, d3_selection_enterPrototype);\n    return selection;\n  }\n  var d3_selection_enterPrototype = [];\n  d3.selection.enter = d3_selection_enter;\n  d3.selection.enter.prototype = d3_selection_enterPrototype;\n  d3_selection_enterPrototype.append = d3_selectionPrototype.append;\n  d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;\n  d3_selection_enterPrototype.node = d3_selectionPrototype.node;\n  d3_selection_enterPrototype.call = d3_selectionPrototype.call;\n  d3_selection_enterPrototype.size = d3_selectionPrototype.size;\n  d3_selection_enterPrototype.select = function(selector) {\n    var subgroups = [], subgroup, subnode, upgroup, group, node;\n    for (var j = -1, m = this.length; ++j < m; ) {\n      upgroup = (group = this[j]).update;\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = group.parentNode;\n      for (var i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));\n          subnode.__data__ = node.__data__;\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  d3_selection_enterPrototype.insert = function(name, before) {\n    if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);\n    return d3_selectionPrototype.insert.call(this, name, before);\n  };\n  function d3_selection_enterInsertBefore(enter) {\n    var i0, j0;\n    return function(d, i, j) {\n      var group = enter[j].update, n = group.length, node;\n      if (j != j0) j0 = j, i0 = 0;\n      if (i >= i0) i0 = i + 1;\n      while (!(node = group[i0]) && ++i0 < n) ;\n      return node;\n    };\n  }\n  d3.select = function(node) {\n    var group;\n    if (typeof node === \"string\") {\n      group = [ d3_select(node, d3_document) ];\n      group.parentNode = d3_document.documentElement;\n    } else {\n      group = [ node ];\n      group.parentNode = d3_documentElement(node);\n    }\n    return d3_selection([ group ]);\n  };\n  d3.selectAll = function(nodes) {\n    var group;\n    if (typeof nodes === \"string\") {\n      group = d3_array(d3_selectAll(nodes, d3_document));\n      group.parentNode = d3_document.documentElement;\n    } else {\n      group = d3_array(nodes);\n      group.parentNode = null;\n    }\n    return d3_selection([ group ]);\n  };\n  d3_selectionPrototype.on = function(type, listener, capture) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof type !== \"string\") {\n        if (n < 2) listener = false;\n        for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));\n        return this;\n      }\n      if (n < 2) return (n = this.node()[\"__on\" + type]) && n._;\n      capture = false;\n    }\n    return this.each(d3_selection_on(type, listener, capture));\n  };\n  function d3_selection_on(type, listener, capture) {\n    var name = \"__on\" + type, i = type.indexOf(\".\"), wrap = d3_selection_onListener;\n    if (i > 0) type = type.slice(0, i);\n    var filter = d3_selection_onFilters.get(type);\n    if (filter) type = filter, wrap = d3_selection_onFilter;\n    function onRemove() {\n      var l = this[name];\n      if (l) {\n        this.removeEventListener(type, l, l.$);\n        delete this[name];\n      }\n    }\n    function onAdd() {\n      var l = wrap(listener, d3_array(arguments));\n      onRemove.call(this);\n      this.addEventListener(type, this[name] = l, l.$ = capture);\n      l._ = listener;\n    }\n    function removeAll() {\n      var re = new RegExp(\"^__on([^.]+)\" + d3.requote(type) + \"$\"), match;\n      for (var name in this) {\n        if (match = name.match(re)) {\n          var l = this[name];\n          this.removeEventListener(match[1], l, l.$);\n          delete this[name];\n        }\n      }\n    }\n    return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;\n  }\n  var d3_selection_onFilters = d3.map({\n    mouseenter: \"mouseover\",\n    mouseleave: \"mouseout\"\n  });\n  if (d3_document) {\n    d3_selection_onFilters.forEach(function(k) {\n      if (\"on\" + k in d3_document) d3_selection_onFilters.remove(k);\n    });\n  }\n  function d3_selection_onListener(listener, argumentz) {\n    return function(e) {\n      var o = d3.event;\n      d3.event = e;\n      argumentz[0] = this.__data__;\n      try {\n        listener.apply(this, argumentz);\n      } finally {\n        d3.event = o;\n      }\n    };\n  }\n  function d3_selection_onFilter(listener, argumentz) {\n    var l = d3_selection_onListener(listener, argumentz);\n    return function(e) {\n      var target = this, related = e.relatedTarget;\n      if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {\n        l.call(target, e);\n      }\n    };\n  }\n  var d3_event_dragSelect, d3_event_dragId = 0;\n  function d3_event_dragSuppress(node) {\n    var name = \".dragsuppress-\" + ++d3_event_dragId, click = \"click\" + name, w = d3.select(d3_window(node)).on(\"touchmove\" + name, d3_eventPreventDefault).on(\"dragstart\" + name, d3_eventPreventDefault).on(\"selectstart\" + name, d3_eventPreventDefault);\n    if (d3_event_dragSelect == null) {\n      d3_event_dragSelect = \"onselectstart\" in node ? false : d3_vendorSymbol(node.style, \"userSelect\");\n    }\n    if (d3_event_dragSelect) {\n      var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];\n      style[d3_event_dragSelect] = \"none\";\n    }\n    return function(suppressClick) {\n      w.on(name, null);\n      if (d3_event_dragSelect) style[d3_event_dragSelect] = select;\n      if (suppressClick) {\n        var off = function() {\n          w.on(click, null);\n        };\n        w.on(click, function() {\n          d3_eventPreventDefault();\n          off();\n        }, true);\n        setTimeout(off, 0);\n      }\n    };\n  }\n  d3.mouse = function(container) {\n    return d3_mousePoint(container, d3_eventSource());\n  };\n  var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;\n  function d3_mousePoint(container, e) {\n    if (e.changedTouches) e = e.changedTouches[0];\n    var svg = container.ownerSVGElement || container;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      if (d3_mouse_bug44083 < 0) {\n        var window = d3_window(container);\n        if (window.scrollX || window.scrollY) {\n          svg = d3.select(\"body\").append(\"svg\").style({\n            position: \"absolute\",\n            top: 0,\n            left: 0,\n            margin: 0,\n            padding: 0,\n            border: \"none\"\n          }, \"important\");\n          var ctm = svg[0][0].getScreenCTM();\n          d3_mouse_bug44083 = !(ctm.f || ctm.e);\n          svg.remove();\n        }\n      }\n      if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, \n      point.y = e.clientY;\n      point = point.matrixTransform(container.getScreenCTM().inverse());\n      return [ point.x, point.y ];\n    }\n    var rect = container.getBoundingClientRect();\n    return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];\n  }\n  d3.touch = function(container, touches, identifier) {\n    if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;\n    if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {\n      if ((touch = touches[i]).identifier === identifier) {\n        return d3_mousePoint(container, touch);\n      }\n    }\n  };\n  d3.behavior.drag = function() {\n    var event = d3_eventDispatch(drag, \"drag\", \"dragstart\", \"dragend\"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, \"mousemove\", \"mouseup\"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, \"touchmove\", \"touchend\");\n    function drag() {\n      this.on(\"mousedown.drag\", mousedown).on(\"touchstart.drag\", touchstart);\n    }\n    function dragstart(id, position, subject, move, end) {\n      return function() {\n        var that = this, target = d3.event.target.correspondingElement || d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = \".drag\" + (dragId == null ? \"\" : \"-\" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);\n        if (origin) {\n          dragOffset = origin.apply(that, arguments);\n          dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];\n        } else {\n          dragOffset = [ 0, 0 ];\n        }\n        dispatch({\n          type: \"dragstart\"\n        });\n        function moved() {\n          var position1 = position(parent, dragId), dx, dy;\n          if (!position1) return;\n          dx = position1[0] - position0[0];\n          dy = position1[1] - position0[1];\n          dragged |= dx | dy;\n          position0 = position1;\n          dispatch({\n            type: \"drag\",\n            x: position1[0] + dragOffset[0],\n            y: position1[1] + dragOffset[1],\n            dx: dx,\n            dy: dy\n          });\n        }\n        function ended() {\n          if (!position(parent, dragId)) return;\n          dragSubject.on(move + dragName, null).on(end + dragName, null);\n          dragRestore(dragged);\n          dispatch({\n            type: \"dragend\"\n          });\n        }\n      };\n    }\n    drag.origin = function(x) {\n      if (!arguments.length) return origin;\n      origin = x;\n      return drag;\n    };\n    return d3.rebind(drag, event, \"on\");\n  };\n  function d3_behavior_dragTouchId() {\n    return d3.event.changedTouches[0].identifier;\n  }\n  d3.touches = function(container, touches) {\n    if (arguments.length < 2) touches = d3_eventSource().touches;\n    return touches ? d3_array(touches).map(function(touch) {\n      var point = d3_mousePoint(container, touch);\n      point.identifier = touch.identifier;\n      return point;\n    }) : [];\n  };\n  var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;\n  function d3_sgn(x) {\n    return x > 0 ? 1 : x < 0 ? -1 : 0;\n  }\n  function d3_cross2d(a, b, c) {\n    return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n  }\n  function d3_acos(x) {\n    return x > 1 ? 0 : x < -1 ? π : Math.acos(x);\n  }\n  function d3_asin(x) {\n    return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);\n  }\n  function d3_sinh(x) {\n    return ((x = Math.exp(x)) - 1 / x) / 2;\n  }\n  function d3_cosh(x) {\n    return ((x = Math.exp(x)) + 1 / x) / 2;\n  }\n  function d3_tanh(x) {\n    return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n  }\n  function d3_haversin(x) {\n    return (x = Math.sin(x / 2)) * x;\n  }\n  var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;\n  d3.interpolateZoom = function(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;\n    if (d2 < ε2) {\n      S = Math.log(w1 / w0) / ρ;\n      i = function(t) {\n        return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * t * S) ];\n      };\n    } else {\n      var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / ρ;\n      i = function(t) {\n        var s = t * S, coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));\n        return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];\n      };\n    }\n    i.duration = S * 1e3;\n    return i;\n  };\n  d3.behavior.zoom = function() {\n    var view = {\n      x: 0,\n      y: 0,\n      k: 1\n    }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = \"mousedown.zoom\", mousemove = \"mousemove.zoom\", mouseup = \"mouseup.zoom\", mousewheelTimer, touchstart = \"touchstart.zoom\", touchtime, event = d3_eventDispatch(zoom, \"zoomstart\", \"zoom\", \"zoomend\"), x0, x1, y0, y1;\n    if (!d3_behavior_zoomWheel) {\n      d3_behavior_zoomWheel = \"onwheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n        return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);\n      }, \"wheel\") : \"onmousewheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n        return d3.event.wheelDelta;\n      }, \"mousewheel\") : (d3_behavior_zoomDelta = function() {\n        return -d3.event.detail;\n      }, \"MozMousePixelScroll\");\n    }\n    function zoom(g) {\n      g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + \".zoom\", mousewheeled).on(\"dblclick.zoom\", dblclicked).on(touchstart, touchstarted);\n    }\n    zoom.event = function(g) {\n      g.each(function() {\n        var dispatch = event.of(this, arguments), view1 = view;\n        if (d3_transitionInheritId) {\n          d3.select(this).transition().each(\"start.zoom\", function() {\n            view = this.__chart__ || {\n              x: 0,\n              y: 0,\n              k: 1\n            };\n            zoomstarted(dispatch);\n          }).tween(\"zoom:zoom\", function() {\n            var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);\n            return function(t) {\n              var l = i(t), k = dx / l[2];\n              this.__chart__ = view = {\n                x: cx - l[0] * k,\n                y: cy - l[1] * k,\n                k: k\n              };\n              zoomed(dispatch);\n            };\n          }).each(\"interrupt.zoom\", function() {\n            zoomended(dispatch);\n          }).each(\"end.zoom\", function() {\n            zoomended(dispatch);\n          });\n        } else {\n          this.__chart__ = view;\n          zoomstarted(dispatch);\n          zoomed(dispatch);\n          zoomended(dispatch);\n        }\n      });\n    };\n    zoom.translate = function(_) {\n      if (!arguments.length) return [ view.x, view.y ];\n      view = {\n        x: +_[0],\n        y: +_[1],\n        k: view.k\n      };\n      rescale();\n      return zoom;\n    };\n    zoom.scale = function(_) {\n      if (!arguments.length) return view.k;\n      view = {\n        x: view.x,\n        y: view.y,\n        k: null\n      };\n      scaleTo(+_);\n      rescale();\n      return zoom;\n    };\n    zoom.scaleExtent = function(_) {\n      if (!arguments.length) return scaleExtent;\n      scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.center = function(_) {\n      if (!arguments.length) return center;\n      center = _ && [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.size = function(_) {\n      if (!arguments.length) return size;\n      size = _ && [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.duration = function(_) {\n      if (!arguments.length) return duration;\n      duration = +_;\n      return zoom;\n    };\n    zoom.x = function(z) {\n      if (!arguments.length) return x1;\n      x1 = z;\n      x0 = z.copy();\n      view = {\n        x: 0,\n        y: 0,\n        k: 1\n      };\n      return zoom;\n    };\n    zoom.y = function(z) {\n      if (!arguments.length) return y1;\n      y1 = z;\n      y0 = z.copy();\n      view = {\n        x: 0,\n        y: 0,\n        k: 1\n      };\n      return zoom;\n    };\n    function location(p) {\n      return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];\n    }\n    function point(l) {\n      return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];\n    }\n    function scaleTo(s) {\n      view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));\n    }\n    function translateTo(p, l) {\n      l = point(l);\n      view.x += p[0] - l[0];\n      view.y += p[1] - l[1];\n    }\n    function zoomTo(that, p, l, k) {\n      that.__chart__ = {\n        x: view.x,\n        y: view.y,\n        k: view.k\n      };\n      scaleTo(Math.pow(2, k));\n      translateTo(center0 = p, l);\n      that = d3.select(that);\n      if (duration > 0) that = that.transition().duration(duration);\n      that.call(zoom.event);\n    }\n    function rescale() {\n      if (x1) x1.domain(x0.range().map(function(x) {\n        return (x - view.x) / view.k;\n      }).map(x0.invert));\n      if (y1) y1.domain(y0.range().map(function(y) {\n        return (y - view.y) / view.k;\n      }).map(y0.invert));\n    }\n    function zoomstarted(dispatch) {\n      if (!zooming++) dispatch({\n        type: \"zoomstart\"\n      });\n    }\n    function zoomed(dispatch) {\n      rescale();\n      dispatch({\n        type: \"zoom\",\n        scale: view.k,\n        translate: [ view.x, view.y ]\n      });\n    }\n    function zoomended(dispatch) {\n      if (!--zooming) dispatch({\n        type: \"zoomend\"\n      }), center0 = null;\n    }\n    function mousedowned() {\n      var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);\n      d3_selection_interrupt.call(that);\n      zoomstarted(dispatch);\n      function moved() {\n        dragged = 1;\n        translateTo(d3.mouse(that), location0);\n        zoomed(dispatch);\n      }\n      function ended() {\n        subject.on(mousemove, null).on(mouseup, null);\n        dragRestore(dragged);\n        zoomended(dispatch);\n      }\n    }\n    function touchstarted() {\n      var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = \".zoom-\" + d3.event.changedTouches[0].identifier, touchmove = \"touchmove\" + zoomName, touchend = \"touchend\" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);\n      started();\n      zoomstarted(dispatch);\n      subject.on(mousedown, null).on(touchstart, started);\n      function relocate() {\n        var touches = d3.touches(that);\n        scale0 = view.k;\n        touches.forEach(function(t) {\n          if (t.identifier in locations0) locations0[t.identifier] = location(t);\n        });\n        return touches;\n      }\n      function started() {\n        var target = d3.event.target;\n        d3.select(target).on(touchmove, moved).on(touchend, ended);\n        targets.push(target);\n        var changed = d3.event.changedTouches;\n        for (var i = 0, n = changed.length; i < n; ++i) {\n          locations0[changed[i].identifier] = null;\n        }\n        var touches = relocate(), now = Date.now();\n        if (touches.length === 1) {\n          if (now - touchtime < 500) {\n            var p = touches[0];\n            zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);\n            d3_eventPreventDefault();\n          }\n          touchtime = now;\n        } else if (touches.length > 1) {\n          var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];\n          distance0 = dx * dx + dy * dy;\n        }\n      }\n      function moved() {\n        var touches = d3.touches(that), p0, l0, p1, l1;\n        d3_selection_interrupt.call(that);\n        for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {\n          p1 = touches[i];\n          if (l1 = locations0[p1.identifier]) {\n            if (l0) break;\n            p0 = p1, l0 = l1;\n          }\n        }\n        if (l1) {\n          var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);\n          p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];\n          l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];\n          scaleTo(scale1 * scale0);\n        }\n        touchtime = null;\n        translateTo(p0, l0);\n        zoomed(dispatch);\n      }\n      function ended() {\n        if (d3.event.touches.length) {\n          var changed = d3.event.changedTouches;\n          for (var i = 0, n = changed.length; i < n; ++i) {\n            delete locations0[changed[i].identifier];\n          }\n          for (var identifier in locations0) {\n            return void relocate();\n          }\n        }\n        d3.selectAll(targets).on(zoomName, null);\n        subject.on(mousedown, mousedowned).on(touchstart, touchstarted);\n        dragRestore();\n        zoomended(dispatch);\n      }\n    }\n    function mousewheeled() {\n      var dispatch = event.of(this, arguments);\n      if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), \n      translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);\n      mousewheelTimer = setTimeout(function() {\n        mousewheelTimer = null;\n        zoomended(dispatch);\n      }, 50);\n      d3_eventPreventDefault();\n      scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);\n      translateTo(center0, translate0);\n      zoomed(dispatch);\n    }\n    function dblclicked() {\n      var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;\n      zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);\n    }\n    return d3.rebind(zoom, event, \"on\");\n  };\n  var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;\n  d3.color = d3_color;\n  function d3_color() {}\n  d3_color.prototype.toString = function() {\n    return this.rgb() + \"\";\n  };\n  d3.hsl = d3_hsl;\n  function d3_hsl(h, s, l) {\n    return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse(\"\" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);\n  }\n  var d3_hslPrototype = d3_hsl.prototype = new d3_color();\n  d3_hslPrototype.brighter = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_hsl(this.h, this.s, this.l / k);\n  };\n  d3_hslPrototype.darker = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_hsl(this.h, this.s, k * this.l);\n  };\n  d3_hslPrototype.rgb = function() {\n    return d3_hsl_rgb(this.h, this.s, this.l);\n  };\n  function d3_hsl_rgb(h, s, l) {\n    var m1, m2;\n    h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;\n    s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;\n    l = l < 0 ? 0 : l > 1 ? 1 : l;\n    m2 = l <= .5 ? l * (1 + s) : l + s - l * s;\n    m1 = 2 * l - m2;\n    function v(h) {\n      if (h > 360) h -= 360; else if (h < 0) h += 360;\n      if (h < 60) return m1 + (m2 - m1) * h / 60;\n      if (h < 180) return m2;\n      if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;\n      return m1;\n    }\n    function vv(h) {\n      return Math.round(v(h) * 255);\n    }\n    return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));\n  }\n  d3.hcl = d3_hcl;\n  function d3_hcl(h, c, l) {\n    return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);\n  }\n  var d3_hclPrototype = d3_hcl.prototype = new d3_color();\n  d3_hclPrototype.brighter = function(k) {\n    return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));\n  };\n  d3_hclPrototype.darker = function(k) {\n    return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));\n  };\n  d3_hclPrototype.rgb = function() {\n    return d3_hcl_lab(this.h, this.c, this.l).rgb();\n  };\n  function d3_hcl_lab(h, c, l) {\n    if (isNaN(h)) h = 0;\n    if (isNaN(c)) c = 0;\n    return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);\n  }\n  d3.lab = d3_lab;\n  function d3_lab(l, a, b) {\n    return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);\n  }\n  var d3_lab_K = 18;\n  var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;\n  var d3_labPrototype = d3_lab.prototype = new d3_color();\n  d3_labPrototype.brighter = function(k) {\n    return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n  };\n  d3_labPrototype.darker = function(k) {\n    return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n  };\n  d3_labPrototype.rgb = function() {\n    return d3_lab_rgb(this.l, this.a, this.b);\n  };\n  function d3_lab_rgb(l, a, b) {\n    var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;\n    x = d3_lab_xyz(x) * d3_lab_X;\n    y = d3_lab_xyz(y) * d3_lab_Y;\n    z = d3_lab_xyz(z) * d3_lab_Z;\n    return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));\n  }\n  function d3_lab_hcl(l, a, b) {\n    return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);\n  }\n  function d3_lab_xyz(x) {\n    return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;\n  }\n  function d3_xyz_lab(x) {\n    return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;\n  }\n  function d3_xyz_rgb(r) {\n    return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));\n  }\n  d3.rgb = d3_rgb;\n  function d3_rgb(r, g, b) {\n    return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse(\"\" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);\n  }\n  function d3_rgbNumber(value) {\n    return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);\n  }\n  function d3_rgbString(value) {\n    return d3_rgbNumber(value) + \"\";\n  }\n  var d3_rgbPrototype = d3_rgb.prototype = new d3_color();\n  d3_rgbPrototype.brighter = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    var r = this.r, g = this.g, b = this.b, i = 30;\n    if (!r && !g && !b) return new d3_rgb(i, i, i);\n    if (r && r < i) r = i;\n    if (g && g < i) g = i;\n    if (b && b < i) b = i;\n    return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));\n  };\n  d3_rgbPrototype.darker = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_rgb(k * this.r, k * this.g, k * this.b);\n  };\n  d3_rgbPrototype.hsl = function() {\n    return d3_rgb_hsl(this.r, this.g, this.b);\n  };\n  d3_rgbPrototype.toString = function() {\n    return \"#\" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);\n  };\n  function d3_rgb_hex(v) {\n    return v < 16 ? \"0\" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);\n  }\n  function d3_rgb_parse(format, rgb, hsl) {\n    var r = 0, g = 0, b = 0, m1, m2, color;\n    m1 = /([a-z]+)\\((.*)\\)/.exec(format = format.toLowerCase());\n    if (m1) {\n      m2 = m1[2].split(\",\");\n      switch (m1[1]) {\n       case \"hsl\":\n        {\n          return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);\n        }\n\n       case \"rgb\":\n        {\n          return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));\n        }\n      }\n    }\n    if (color = d3_rgb_names.get(format)) {\n      return rgb(color.r, color.g, color.b);\n    }\n    if (format != null && format.charAt(0) === \"#\" && !isNaN(color = parseInt(format.slice(1), 16))) {\n      if (format.length === 4) {\n        r = (color & 3840) >> 4;\n        r = r >> 4 | r;\n        g = color & 240;\n        g = g >> 4 | g;\n        b = color & 15;\n        b = b << 4 | b;\n      } else if (format.length === 7) {\n        r = (color & 16711680) >> 16;\n        g = (color & 65280) >> 8;\n        b = color & 255;\n      }\n    }\n    return rgb(r, g, b);\n  }\n  function d3_rgb_hsl(r, g, b) {\n    var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;\n    if (d) {\n      s = l < .5 ? d / (max + min) : d / (2 - max - min);\n      if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;\n      h *= 60;\n    } else {\n      h = NaN;\n      s = l > 0 && l < 1 ? 0 : h;\n    }\n    return new d3_hsl(h, s, l);\n  }\n  function d3_rgb_lab(r, g, b) {\n    r = d3_rgb_xyz(r);\n    g = d3_rgb_xyz(g);\n    b = d3_rgb_xyz(b);\n    var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);\n    return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));\n  }\n  function d3_rgb_xyz(r) {\n    return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);\n  }\n  function d3_rgb_parseNumber(c) {\n    var f = parseFloat(c);\n    return c.charAt(c.length - 1) === \"%\" ? Math.round(f * 2.55) : f;\n  }\n  var d3_rgb_names = d3.map({\n    aliceblue: 15792383,\n    antiquewhite: 16444375,\n    aqua: 65535,\n    aquamarine: 8388564,\n    azure: 15794175,\n    beige: 16119260,\n    bisque: 16770244,\n    black: 0,\n    blanchedalmond: 16772045,\n    blue: 255,\n    blueviolet: 9055202,\n    brown: 10824234,\n    burlywood: 14596231,\n    cadetblue: 6266528,\n    chartreuse: 8388352,\n    chocolate: 13789470,\n    coral: 16744272,\n    cornflowerblue: 6591981,\n    cornsilk: 16775388,\n    crimson: 14423100,\n    cyan: 65535,\n    darkblue: 139,\n    darkcyan: 35723,\n    darkgoldenrod: 12092939,\n    darkgray: 11119017,\n    darkgreen: 25600,\n    darkgrey: 11119017,\n    darkkhaki: 12433259,\n    darkmagenta: 9109643,\n    darkolivegreen: 5597999,\n    darkorange: 16747520,\n    darkorchid: 10040012,\n    darkred: 9109504,\n    darksalmon: 15308410,\n    darkseagreen: 9419919,\n    darkslateblue: 4734347,\n    darkslategray: 3100495,\n    darkslategrey: 3100495,\n    darkturquoise: 52945,\n    darkviolet: 9699539,\n    deeppink: 16716947,\n    deepskyblue: 49151,\n    dimgray: 6908265,\n    dimgrey: 6908265,\n    dodgerblue: 2003199,\n    firebrick: 11674146,\n    floralwhite: 16775920,\n    forestgreen: 2263842,\n    fuchsia: 16711935,\n    gainsboro: 14474460,\n    ghostwhite: 16316671,\n    gold: 16766720,\n    goldenrod: 14329120,\n    gray: 8421504,\n    green: 32768,\n    greenyellow: 11403055,\n    grey: 8421504,\n    honeydew: 15794160,\n    hotpink: 16738740,\n    indianred: 13458524,\n    indigo: 4915330,\n    ivory: 16777200,\n    khaki: 15787660,\n    lavender: 15132410,\n    lavenderblush: 16773365,\n    lawngreen: 8190976,\n    lemonchiffon: 16775885,\n    lightblue: 11393254,\n    lightcoral: 15761536,\n    lightcyan: 14745599,\n    lightgoldenrodyellow: 16448210,\n    lightgray: 13882323,\n    lightgreen: 9498256,\n    lightgrey: 13882323,\n    lightpink: 16758465,\n    lightsalmon: 16752762,\n    lightseagreen: 2142890,\n    lightskyblue: 8900346,\n    lightslategray: 7833753,\n    lightslategrey: 7833753,\n    lightsteelblue: 11584734,\n    lightyellow: 16777184,\n    lime: 65280,\n    limegreen: 3329330,\n    linen: 16445670,\n    magenta: 16711935,\n    maroon: 8388608,\n    mediumaquamarine: 6737322,\n    mediumblue: 205,\n    mediumorchid: 12211667,\n    mediumpurple: 9662683,\n    mediumseagreen: 3978097,\n    mediumslateblue: 8087790,\n    mediumspringgreen: 64154,\n    mediumturquoise: 4772300,\n    mediumvioletred: 13047173,\n    midnightblue: 1644912,\n    mintcream: 16121850,\n    mistyrose: 16770273,\n    moccasin: 16770229,\n    navajowhite: 16768685,\n    navy: 128,\n    oldlace: 16643558,\n    olive: 8421376,\n    olivedrab: 7048739,\n    orange: 16753920,\n    orangered: 16729344,\n    orchid: 14315734,\n    palegoldenrod: 15657130,\n    palegreen: 10025880,\n    paleturquoise: 11529966,\n    palevioletred: 14381203,\n    papayawhip: 16773077,\n    peachpuff: 16767673,\n    peru: 13468991,\n    pink: 16761035,\n    plum: 14524637,\n    powderblue: 11591910,\n    purple: 8388736,\n    rebeccapurple: 6697881,\n    red: 16711680,\n    rosybrown: 12357519,\n    royalblue: 4286945,\n    saddlebrown: 9127187,\n    salmon: 16416882,\n    sandybrown: 16032864,\n    seagreen: 3050327,\n    seashell: 16774638,\n    sienna: 10506797,\n    silver: 12632256,\n    skyblue: 8900331,\n    slateblue: 6970061,\n    slategray: 7372944,\n    slategrey: 7372944,\n    snow: 16775930,\n    springgreen: 65407,\n    steelblue: 4620980,\n    tan: 13808780,\n    teal: 32896,\n    thistle: 14204888,\n    tomato: 16737095,\n    turquoise: 4251856,\n    violet: 15631086,\n    wheat: 16113331,\n    white: 16777215,\n    whitesmoke: 16119285,\n    yellow: 16776960,\n    yellowgreen: 10145074\n  });\n  d3_rgb_names.forEach(function(key, value) {\n    d3_rgb_names.set(key, d3_rgbNumber(value));\n  });\n  function d3_functor(v) {\n    return typeof v === \"function\" ? v : function() {\n      return v;\n    };\n  }\n  d3.functor = d3_functor;\n  d3.xhr = d3_xhrType(d3_identity);\n  function d3_xhrType(response) {\n    return function(url, mimeType, callback) {\n      if (arguments.length === 2 && typeof mimeType === \"function\") callback = mimeType, \n      mimeType = null;\n      return d3_xhr(url, mimeType, response, callback);\n    };\n  }\n  function d3_xhr(url, mimeType, response, callback) {\n    var xhr = {}, dispatch = d3.dispatch(\"beforesend\", \"progress\", \"load\", \"error\"), headers = {}, request = new XMLHttpRequest(), responseType = null;\n    if (this.XDomainRequest && !(\"withCredentials\" in request) && /^(http(s)?:)?\\/\\//.test(url)) request = new XDomainRequest();\n    \"onload\" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {\n      request.readyState > 3 && respond();\n    };\n    function respond() {\n      var status = request.status, result;\n      if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {\n        try {\n          result = response.call(xhr, request);\n        } catch (e) {\n          dispatch.error.call(xhr, e);\n          return;\n        }\n        dispatch.load.call(xhr, result);\n      } else {\n        dispatch.error.call(xhr, request);\n      }\n    }\n    request.onprogress = function(event) {\n      var o = d3.event;\n      d3.event = event;\n      try {\n        dispatch.progress.call(xhr, request);\n      } finally {\n        d3.event = o;\n      }\n    };\n    xhr.header = function(name, value) {\n      name = (name + \"\").toLowerCase();\n      if (arguments.length < 2) return headers[name];\n      if (value == null) delete headers[name]; else headers[name] = value + \"\";\n      return xhr;\n    };\n    xhr.mimeType = function(value) {\n      if (!arguments.length) return mimeType;\n      mimeType = value == null ? null : value + \"\";\n      return xhr;\n    };\n    xhr.responseType = function(value) {\n      if (!arguments.length) return responseType;\n      responseType = value;\n      return xhr;\n    };\n    xhr.response = function(value) {\n      response = value;\n      return xhr;\n    };\n    [ \"get\", \"post\" ].forEach(function(method) {\n      xhr[method] = function() {\n        return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));\n      };\n    });\n    xhr.send = function(method, data, callback) {\n      if (arguments.length === 2 && typeof data === \"function\") callback = data, data = null;\n      request.open(method, url, true);\n      if (mimeType != null && !(\"accept\" in headers)) headers[\"accept\"] = mimeType + \",*/*\";\n      if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);\n      if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);\n      if (responseType != null) request.responseType = responseType;\n      if (callback != null) xhr.on(\"error\", callback).on(\"load\", function(request) {\n        callback(null, request);\n      });\n      dispatch.beforesend.call(xhr, request);\n      request.send(data == null ? null : data);\n      return xhr;\n    };\n    xhr.abort = function() {\n      request.abort();\n      return xhr;\n    };\n    d3.rebind(xhr, dispatch, \"on\");\n    return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));\n  }\n  function d3_xhr_fixCallback(callback) {\n    return callback.length === 1 ? function(error, request) {\n      callback(error == null ? request : null);\n    } : callback;\n  }\n  function d3_xhrHasResponse(request) {\n    var type = request.responseType;\n    return type && type !== \"text\" ? request.response : request.responseText;\n  }\n  d3.dsv = function(delimiter, mimeType) {\n    var reFormat = new RegExp('[\"' + delimiter + \"\\n]\"), delimiterCode = delimiter.charCodeAt(0);\n    function dsv(url, row, callback) {\n      if (arguments.length < 3) callback = row, row = null;\n      var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);\n      xhr.row = function(_) {\n        return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;\n      };\n      return xhr;\n    }\n    function response(request) {\n      return dsv.parse(request.responseText);\n    }\n    function typedResponse(f) {\n      return function(request) {\n        return dsv.parse(request.responseText, f);\n      };\n    }\n    dsv.parse = function(text, f) {\n      var o;\n      return dsv.parseRows(text, function(row, i) {\n        if (o) return o(row, i - 1);\n        var a = new Function(\"d\", \"return {\" + row.map(function(name, i) {\n          return JSON.stringify(name) + \": d[\" + i + \"]\";\n        }).join(\",\") + \"}\");\n        o = f ? function(row, i) {\n          return f(a(row), i);\n        } : a;\n      });\n    };\n    dsv.parseRows = function(text, f) {\n      var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;\n      function token() {\n        if (I >= N) return EOF;\n        if (eol) return eol = false, EOL;\n        var j = I;\n        if (text.charCodeAt(j) === 34) {\n          var i = j;\n          while (i++ < N) {\n            if (text.charCodeAt(i) === 34) {\n              if (text.charCodeAt(i + 1) !== 34) break;\n              ++i;\n            }\n          }\n          I = i + 2;\n          var c = text.charCodeAt(i + 1);\n          if (c === 13) {\n            eol = true;\n            if (text.charCodeAt(i + 2) === 10) ++I;\n          } else if (c === 10) {\n            eol = true;\n          }\n          return text.slice(j + 1, i).replace(/\"\"/g, '\"');\n        }\n        while (I < N) {\n          var c = text.charCodeAt(I++), k = 1;\n          if (c === 10) eol = true; else if (c === 13) {\n            eol = true;\n            if (text.charCodeAt(I) === 10) ++I, ++k;\n          } else if (c !== delimiterCode) continue;\n          return text.slice(j, I - k);\n        }\n        return text.slice(j);\n      }\n      while ((t = token()) !== EOF) {\n        var a = [];\n        while (t !== EOL && t !== EOF) {\n          a.push(t);\n          t = token();\n        }\n        if (f && (a = f(a, n++)) == null) continue;\n        rows.push(a);\n      }\n      return rows;\n    };\n    dsv.format = function(rows) {\n      if (Array.isArray(rows[0])) return dsv.formatRows(rows);\n      var fieldSet = new d3_Set(), fields = [];\n      rows.forEach(function(row) {\n        for (var field in row) {\n          if (!fieldSet.has(field)) {\n            fields.push(fieldSet.add(field));\n          }\n        }\n      });\n      return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {\n        return fields.map(function(field) {\n          return formatValue(row[field]);\n        }).join(delimiter);\n      })).join(\"\\n\");\n    };\n    dsv.formatRows = function(rows) {\n      return rows.map(formatRow).join(\"\\n\");\n    };\n    function formatRow(row) {\n      return row.map(formatValue).join(delimiter);\n    }\n    function formatValue(text) {\n      return reFormat.test(text) ? '\"' + text.replace(/\\\"/g, '\"\"') + '\"' : text;\n    }\n    return dsv;\n  };\n  d3.csv = d3.dsv(\",\", \"text/csv\");\n  d3.tsv = d3.dsv(\"\t\", \"text/tab-separated-values\");\n  var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_frame = this[d3_vendorSymbol(this, \"requestAnimationFrame\")] || function(callback) {\n    setTimeout(callback, 17);\n  };\n  d3.timer = function() {\n    d3_timer.apply(this, arguments);\n  };\n  function d3_timer(callback, delay, then) {\n    var n = arguments.length;\n    if (n < 2) delay = 0;\n    if (n < 3) then = Date.now();\n    var time = then + delay, timer = {\n      c: callback,\n      t: time,\n      n: null\n    };\n    if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;\n    d3_timer_queueTail = timer;\n    if (!d3_timer_interval) {\n      d3_timer_timeout = clearTimeout(d3_timer_timeout);\n      d3_timer_interval = 1;\n      d3_timer_frame(d3_timer_step);\n    }\n    return timer;\n  }\n  function d3_timer_step() {\n    var now = d3_timer_mark(), delay = d3_timer_sweep() - now;\n    if (delay > 24) {\n      if (isFinite(delay)) {\n        clearTimeout(d3_timer_timeout);\n        d3_timer_timeout = setTimeout(d3_timer_step, delay);\n      }\n      d3_timer_interval = 0;\n    } else {\n      d3_timer_interval = 1;\n      d3_timer_frame(d3_timer_step);\n    }\n  }\n  d3.timer.flush = function() {\n    d3_timer_mark();\n    d3_timer_sweep();\n  };\n  function d3_timer_mark() {\n    var now = Date.now(), timer = d3_timer_queueHead;\n    while (timer) {\n      if (now >= timer.t && timer.c(now - timer.t)) timer.c = null;\n      timer = timer.n;\n    }\n    return now;\n  }\n  function d3_timer_sweep() {\n    var t0, t1 = d3_timer_queueHead, time = Infinity;\n    while (t1) {\n      if (t1.c) {\n        if (t1.t < time) time = t1.t;\n        t1 = (t0 = t1).n;\n      } else {\n        t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;\n      }\n    }\n    d3_timer_queueTail = t0;\n    return time;\n  }\n  function d3_format_precision(x, p) {\n    return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);\n  }\n  d3.round = function(x, n) {\n    return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);\n  };\n  var d3_formatPrefixes = [ \"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\" ].map(d3_formatPrefix);\n  d3.formatPrefix = function(value, precision) {\n    var i = 0;\n    if (value = +value) {\n      if (value < 0) value *= -1;\n      if (precision) value = d3.round(value, d3_format_precision(value, precision));\n      i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);\n      i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));\n    }\n    return d3_formatPrefixes[8 + i / 3];\n  };\n  function d3_formatPrefix(d, i) {\n    var k = Math.pow(10, abs(8 - i) * 3);\n    return {\n      scale: i > 8 ? function(d) {\n        return d / k;\n      } : function(d) {\n        return d * k;\n      },\n      symbol: d\n    };\n  }\n  function d3_locale_numberFormat(locale) {\n    var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {\n      var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;\n      while (i > 0 && g > 0) {\n        if (length + g + 1 > width) g = Math.max(1, width - length);\n        t.push(value.substring(i -= g, i + g));\n        if ((length += g + 1) > width) break;\n        g = locale_grouping[j = (j + 1) % locale_grouping.length];\n      }\n      return t.reverse().join(locale_thousands);\n    } : d3_identity;\n    return function(specifier) {\n      var match = d3_format_re.exec(specifier), fill = match[1] || \" \", align = match[2] || \">\", sign = match[3] || \"-\", symbol = match[4] || \"\", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = \"\", suffix = \"\", integer = false, exponent = true;\n      if (precision) precision = +precision.substring(1);\n      if (zfill || fill === \"0\" && align === \"=\") {\n        zfill = fill = \"0\";\n        align = \"=\";\n      }\n      switch (type) {\n       case \"n\":\n        comma = true;\n        type = \"g\";\n        break;\n\n       case \"%\":\n        scale = 100;\n        suffix = \"%\";\n        type = \"f\";\n        break;\n\n       case \"p\":\n        scale = 100;\n        suffix = \"%\";\n        type = \"r\";\n        break;\n\n       case \"b\":\n       case \"o\":\n       case \"x\":\n       case \"X\":\n        if (symbol === \"#\") prefix = \"0\" + type.toLowerCase();\n\n       case \"c\":\n        exponent = false;\n\n       case \"d\":\n        integer = true;\n        precision = 0;\n        break;\n\n       case \"s\":\n        scale = -1;\n        type = \"r\";\n        break;\n      }\n      if (symbol === \"$\") prefix = locale_currency[0], suffix = locale_currency[1];\n      if (type == \"r\" && !precision) type = \"g\";\n      if (precision != null) {\n        if (type == \"g\") precision = Math.max(1, Math.min(21, precision)); else if (type == \"e\" || type == \"f\") precision = Math.max(0, Math.min(20, precision));\n      }\n      type = d3_format_types.get(type) || d3_format_typeDefault;\n      var zcomma = zfill && comma;\n      return function(value) {\n        var fullSuffix = suffix;\n        if (integer && value % 1) return \"\";\n        var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, \"-\") : sign === \"-\" ? \"\" : sign;\n        if (scale < 0) {\n          var unit = d3.formatPrefix(value, precision);\n          value = unit.scale(value);\n          fullSuffix = unit.symbol + suffix;\n        } else {\n          value *= scale;\n        }\n        value = type(value, precision);\n        var i = value.lastIndexOf(\".\"), before, after;\n        if (i < 0) {\n          var j = exponent ? value.lastIndexOf(\"e\") : -1;\n          if (j < 0) before = value, after = \"\"; else before = value.substring(0, j), after = value.substring(j);\n        } else {\n          before = value.substring(0, i);\n          after = locale_decimal + value.substring(i + 1);\n        }\n        if (!zfill && comma) before = formatGroup(before, Infinity);\n        var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : \"\";\n        if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);\n        negative += prefix;\n        value = before + after;\n        return (align === \"<\" ? negative + value + padding : align === \">\" ? padding + negative + value : align === \"^\" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;\n      };\n    };\n  }\n  var d3_format_re = /(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i;\n  var d3_format_types = d3.map({\n    b: function(x) {\n      return x.toString(2);\n    },\n    c: function(x) {\n      return String.fromCharCode(x);\n    },\n    o: function(x) {\n      return x.toString(8);\n    },\n    x: function(x) {\n      return x.toString(16);\n    },\n    X: function(x) {\n      return x.toString(16).toUpperCase();\n    },\n    g: function(x, p) {\n      return x.toPrecision(p);\n    },\n    e: function(x, p) {\n      return x.toExponential(p);\n    },\n    f: function(x, p) {\n      return x.toFixed(p);\n    },\n    r: function(x, p) {\n      return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));\n    }\n  });\n  function d3_format_typeDefault(x) {\n    return x + \"\";\n  }\n  var d3_time = d3.time = {}, d3_date = Date;\n  function d3_date_utc() {\n    this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);\n  }\n  d3_date_utc.prototype = {\n    getDate: function() {\n      return this._.getUTCDate();\n    },\n    getDay: function() {\n      return this._.getUTCDay();\n    },\n    getFullYear: function() {\n      return this._.getUTCFullYear();\n    },\n    getHours: function() {\n      return this._.getUTCHours();\n    },\n    getMilliseconds: function() {\n      return this._.getUTCMilliseconds();\n    },\n    getMinutes: function() {\n      return this._.getUTCMinutes();\n    },\n    getMonth: function() {\n      return this._.getUTCMonth();\n    },\n    getSeconds: function() {\n      return this._.getUTCSeconds();\n    },\n    getTime: function() {\n      return this._.getTime();\n    },\n    getTimezoneOffset: function() {\n      return 0;\n    },\n    valueOf: function() {\n      return this._.valueOf();\n    },\n    setDate: function() {\n      d3_time_prototype.setUTCDate.apply(this._, arguments);\n    },\n    setDay: function() {\n      d3_time_prototype.setUTCDay.apply(this._, arguments);\n    },\n    setFullYear: function() {\n      d3_time_prototype.setUTCFullYear.apply(this._, arguments);\n    },\n    setHours: function() {\n      d3_time_prototype.setUTCHours.apply(this._, arguments);\n    },\n    setMilliseconds: function() {\n      d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);\n    },\n    setMinutes: function() {\n      d3_time_prototype.setUTCMinutes.apply(this._, arguments);\n    },\n    setMonth: function() {\n      d3_time_prototype.setUTCMonth.apply(this._, arguments);\n    },\n    setSeconds: function() {\n      d3_time_prototype.setUTCSeconds.apply(this._, arguments);\n    },\n    setTime: function() {\n      d3_time_prototype.setTime.apply(this._, arguments);\n    }\n  };\n  var d3_time_prototype = Date.prototype;\n  function d3_time_interval(local, step, number) {\n    function round(date) {\n      var d0 = local(date), d1 = offset(d0, 1);\n      return date - d0 < d1 - date ? d0 : d1;\n    }\n    function ceil(date) {\n      step(date = local(new d3_date(date - 1)), 1);\n      return date;\n    }\n    function offset(date, k) {\n      step(date = new d3_date(+date), k);\n      return date;\n    }\n    function range(t0, t1, dt) {\n      var time = ceil(t0), times = [];\n      if (dt > 1) {\n        while (time < t1) {\n          if (!(number(time) % dt)) times.push(new Date(+time));\n          step(time, 1);\n        }\n      } else {\n        while (time < t1) times.push(new Date(+time)), step(time, 1);\n      }\n      return times;\n    }\n    function range_utc(t0, t1, dt) {\n      try {\n        d3_date = d3_date_utc;\n        var utc = new d3_date_utc();\n        utc._ = t0;\n        return range(utc, t1, dt);\n      } finally {\n        d3_date = Date;\n      }\n    }\n    local.floor = local;\n    local.round = round;\n    local.ceil = ceil;\n    local.offset = offset;\n    local.range = range;\n    var utc = local.utc = d3_time_interval_utc(local);\n    utc.floor = utc;\n    utc.round = d3_time_interval_utc(round);\n    utc.ceil = d3_time_interval_utc(ceil);\n    utc.offset = d3_time_interval_utc(offset);\n    utc.range = range_utc;\n    return local;\n  }\n  function d3_time_interval_utc(method) {\n    return function(date, k) {\n      try {\n        d3_date = d3_date_utc;\n        var utc = new d3_date_utc();\n        utc._ = date;\n        return method(utc, k)._;\n      } finally {\n        d3_date = Date;\n      }\n    };\n  }\n  d3_time.year = d3_time_interval(function(date) {\n    date = d3_time.day(date);\n    date.setMonth(0, 1);\n    return date;\n  }, function(date, offset) {\n    date.setFullYear(date.getFullYear() + offset);\n  }, function(date) {\n    return date.getFullYear();\n  });\n  d3_time.years = d3_time.year.range;\n  d3_time.years.utc = d3_time.year.utc.range;\n  d3_time.day = d3_time_interval(function(date) {\n    var day = new d3_date(2e3, 0);\n    day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n    return day;\n  }, function(date, offset) {\n    date.setDate(date.getDate() + offset);\n  }, function(date) {\n    return date.getDate() - 1;\n  });\n  d3_time.days = d3_time.day.range;\n  d3_time.days.utc = d3_time.day.utc.range;\n  d3_time.dayOfYear = function(date) {\n    var year = d3_time.year(date);\n    return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);\n  };\n  [ \"sunday\", \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\" ].forEach(function(day, i) {\n    i = 7 - i;\n    var interval = d3_time[day] = d3_time_interval(function(date) {\n      (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);\n      return date;\n    }, function(date, offset) {\n      date.setDate(date.getDate() + Math.floor(offset) * 7);\n    }, function(date) {\n      var day = d3_time.year(date).getDay();\n      return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);\n    });\n    d3_time[day + \"s\"] = interval.range;\n    d3_time[day + \"s\"].utc = interval.utc.range;\n    d3_time[day + \"OfYear\"] = function(date) {\n      var day = d3_time.year(date).getDay();\n      return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);\n    };\n  });\n  d3_time.week = d3_time.sunday;\n  d3_time.weeks = d3_time.sunday.range;\n  d3_time.weeks.utc = d3_time.sunday.utc.range;\n  d3_time.weekOfYear = d3_time.sundayOfYear;\n  function d3_locale_timeFormat(locale) {\n    var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;\n    function d3_time_format(template) {\n      var n = template.length;\n      function format(date) {\n        var string = [], i = -1, j = 0, c, p, f;\n        while (++i < n) {\n          if (template.charCodeAt(i) === 37) {\n            string.push(template.slice(j, i));\n            if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);\n            if (f = d3_time_formats[c]) c = f(date, p == null ? c === \"e\" ? \" \" : \"0\" : p);\n            string.push(c);\n            j = i + 1;\n          }\n        }\n        string.push(template.slice(j, i));\n        return string.join(\"\");\n      }\n      format.parse = function(string) {\n        var d = {\n          y: 1900,\n          m: 0,\n          d: 1,\n          H: 0,\n          M: 0,\n          S: 0,\n          L: 0,\n          Z: null\n        }, i = d3_time_parse(d, template, string, 0);\n        if (i != string.length) return null;\n        if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n        var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();\n        if (\"j\" in d) date.setFullYear(d.y, 0, d.j); else if (\"W\" in d || \"U\" in d) {\n          if (!(\"w\" in d)) d.w = \"W\" in d ? 1 : 0;\n          date.setFullYear(d.y, 0, 1);\n          date.setFullYear(d.y, 0, \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7);\n        } else date.setFullYear(d.y, d.m, d.d);\n        date.setHours(d.H + (d.Z / 100 | 0), d.M + d.Z % 100, d.S, d.L);\n        return localZ ? date._ : date;\n      };\n      format.toString = function() {\n        return template;\n      };\n      return format;\n    }\n    function d3_time_parse(date, template, string, j) {\n      var c, p, t, i = 0, n = template.length, m = string.length;\n      while (i < n) {\n        if (j >= m) return -1;\n        c = template.charCodeAt(i++);\n        if (c === 37) {\n          t = template.charAt(i++);\n          p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t];\n          if (!p || (j = p(date, string, j)) < 0) return -1;\n        } else if (c != string.charCodeAt(j++)) {\n          return -1;\n        }\n      }\n      return j;\n    }\n    d3_time_format.utc = function(template) {\n      var local = d3_time_format(template);\n      function format(date) {\n        try {\n          d3_date = d3_date_utc;\n          var utc = new d3_date();\n          utc._ = date;\n          return local(utc);\n        } finally {\n          d3_date = Date;\n        }\n      }\n      format.parse = function(string) {\n        try {\n          d3_date = d3_date_utc;\n          var date = local.parse(string);\n          return date && date._;\n        } finally {\n          d3_date = Date;\n        }\n      };\n      format.toString = local.toString;\n      return format;\n    };\n    d3_time_format.multi = d3_time_format.utc.multi = d3_time_formatMulti;\n    var d3_time_periodLookup = d3.map(), d3_time_dayRe = d3_time_formatRe(locale_days), d3_time_dayLookup = d3_time_formatLookup(locale_days), d3_time_dayAbbrevRe = d3_time_formatRe(locale_shortDays), d3_time_dayAbbrevLookup = d3_time_formatLookup(locale_shortDays), d3_time_monthRe = d3_time_formatRe(locale_months), d3_time_monthLookup = d3_time_formatLookup(locale_months), d3_time_monthAbbrevRe = d3_time_formatRe(locale_shortMonths), d3_time_monthAbbrevLookup = d3_time_formatLookup(locale_shortMonths);\n    locale_periods.forEach(function(p, i) {\n      d3_time_periodLookup.set(p.toLowerCase(), i);\n    });\n    var d3_time_formats = {\n      a: function(d) {\n        return locale_shortDays[d.getDay()];\n      },\n      A: function(d) {\n        return locale_days[d.getDay()];\n      },\n      b: function(d) {\n        return locale_shortMonths[d.getMonth()];\n      },\n      B: function(d) {\n        return locale_months[d.getMonth()];\n      },\n      c: d3_time_format(locale_dateTime),\n      d: function(d, p) {\n        return d3_time_formatPad(d.getDate(), p, 2);\n      },\n      e: function(d, p) {\n        return d3_time_formatPad(d.getDate(), p, 2);\n      },\n      H: function(d, p) {\n        return d3_time_formatPad(d.getHours(), p, 2);\n      },\n      I: function(d, p) {\n        return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);\n      },\n      j: function(d, p) {\n        return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3);\n      },\n      L: function(d, p) {\n        return d3_time_formatPad(d.getMilliseconds(), p, 3);\n      },\n      m: function(d, p) {\n        return d3_time_formatPad(d.getMonth() + 1, p, 2);\n      },\n      M: function(d, p) {\n        return d3_time_formatPad(d.getMinutes(), p, 2);\n      },\n      p: function(d) {\n        return locale_periods[+(d.getHours() >= 12)];\n      },\n      S: function(d, p) {\n        return d3_time_formatPad(d.getSeconds(), p, 2);\n      },\n      U: function(d, p) {\n        return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2);\n      },\n      w: function(d) {\n        return d.getDay();\n      },\n      W: function(d, p) {\n        return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2);\n      },\n      x: d3_time_format(locale_date),\n      X: d3_time_format(locale_time),\n      y: function(d, p) {\n        return d3_time_formatPad(d.getFullYear() % 100, p, 2);\n      },\n      Y: function(d, p) {\n        return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);\n      },\n      Z: d3_time_zone,\n      \"%\": function() {\n        return \"%\";\n      }\n    };\n    var d3_time_parsers = {\n      a: d3_time_parseWeekdayAbbrev,\n      A: d3_time_parseWeekday,\n      b: d3_time_parseMonthAbbrev,\n      B: d3_time_parseMonth,\n      c: d3_time_parseLocaleFull,\n      d: d3_time_parseDay,\n      e: d3_time_parseDay,\n      H: d3_time_parseHour24,\n      I: d3_time_parseHour24,\n      j: d3_time_parseDayOfYear,\n      L: d3_time_parseMilliseconds,\n      m: d3_time_parseMonthNumber,\n      M: d3_time_parseMinutes,\n      p: d3_time_parseAmPm,\n      S: d3_time_parseSeconds,\n      U: d3_time_parseWeekNumberSunday,\n      w: d3_time_parseWeekdayNumber,\n      W: d3_time_parseWeekNumberMonday,\n      x: d3_time_parseLocaleDate,\n      X: d3_time_parseLocaleTime,\n      y: d3_time_parseYear,\n      Y: d3_time_parseFullYear,\n      Z: d3_time_parseZone,\n      \"%\": d3_time_parseLiteralPercent\n    };\n    function d3_time_parseWeekdayAbbrev(date, string, i) {\n      d3_time_dayAbbrevRe.lastIndex = 0;\n      var n = d3_time_dayAbbrevRe.exec(string.slice(i));\n      return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseWeekday(date, string, i) {\n      d3_time_dayRe.lastIndex = 0;\n      var n = d3_time_dayRe.exec(string.slice(i));\n      return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseMonthAbbrev(date, string, i) {\n      d3_time_monthAbbrevRe.lastIndex = 0;\n      var n = d3_time_monthAbbrevRe.exec(string.slice(i));\n      return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseMonth(date, string, i) {\n      d3_time_monthRe.lastIndex = 0;\n      var n = d3_time_monthRe.exec(string.slice(i));\n      return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseLocaleFull(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.c.toString(), string, i);\n    }\n    function d3_time_parseLocaleDate(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.x.toString(), string, i);\n    }\n    function d3_time_parseLocaleTime(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.X.toString(), string, i);\n    }\n    function d3_time_parseAmPm(date, string, i) {\n      var n = d3_time_periodLookup.get(string.slice(i, i += 2).toLowerCase());\n      return n == null ? -1 : (date.p = n, i);\n    }\n    return d3_time_format;\n  }\n  var d3_time_formatPads = {\n    \"-\": \"\",\n    _: \" \",\n    \"0\": \"0\"\n  }, d3_time_numberRe = /^\\s*\\d+/, d3_time_percentRe = /^%/;\n  function d3_time_formatPad(value, fill, width) {\n    var sign = value < 0 ? \"-\" : \"\", string = (sign ? -value : value) + \"\", length = string.length;\n    return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n  }\n  function d3_time_formatRe(names) {\n    return new RegExp(\"^(?:\" + names.map(d3.requote).join(\"|\") + \")\", \"i\");\n  }\n  function d3_time_formatLookup(names) {\n    var map = new d3_Map(), i = -1, n = names.length;\n    while (++i < n) map.set(names[i].toLowerCase(), i);\n    return map;\n  }\n  function d3_time_parseWeekdayNumber(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 1));\n    return n ? (date.w = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseWeekNumberSunday(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i));\n    return n ? (date.U = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseWeekNumberMonday(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i));\n    return n ? (date.W = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseFullYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 4));\n    return n ? (date.y = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1;\n  }\n  function d3_time_parseZone(date, string, i) {\n    return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, \n    i + 5) : -1;\n  }\n  function d3_time_expandYear(d) {\n    return d + (d > 68 ? 1900 : 2e3);\n  }\n  function d3_time_parseMonthNumber(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.m = n[0] - 1, i + n[0].length) : -1;\n  }\n  function d3_time_parseDay(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.d = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseDayOfYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n    return n ? (date.j = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseHour24(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.H = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseMinutes(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.M = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseSeconds(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.S = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseMilliseconds(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n    return n ? (date.L = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_zone(d) {\n    var z = d.getTimezoneOffset(), zs = z > 0 ? \"-\" : \"+\", zh = abs(z) / 60 | 0, zm = abs(z) % 60;\n    return zs + d3_time_formatPad(zh, \"0\", 2) + d3_time_formatPad(zm, \"0\", 2);\n  }\n  function d3_time_parseLiteralPercent(date, string, i) {\n    d3_time_percentRe.lastIndex = 0;\n    var n = d3_time_percentRe.exec(string.slice(i, i + 1));\n    return n ? i + n[0].length : -1;\n  }\n  function d3_time_formatMulti(formats) {\n    var n = formats.length, i = -1;\n    while (++i < n) formats[i][0] = this(formats[i][0]);\n    return function(date) {\n      var i = 0, f = formats[i];\n      while (!f[1](date)) f = formats[++i];\n      return f[0](date);\n    };\n  }\n  d3.locale = function(locale) {\n    return {\n      numberFormat: d3_locale_numberFormat(locale),\n      timeFormat: d3_locale_timeFormat(locale)\n    };\n  };\n  var d3_locale_enUS = d3.locale({\n    decimal: \".\",\n    thousands: \",\",\n    grouping: [ 3 ],\n    currency: [ \"$\", \"\" ],\n    dateTime: \"%a %b %e %X %Y\",\n    date: \"%m/%d/%Y\",\n    time: \"%H:%M:%S\",\n    periods: [ \"AM\", \"PM\" ],\n    days: [ \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\" ],\n    shortDays: [ \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\" ],\n    months: [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ],\n    shortMonths: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ]\n  });\n  d3.format = d3_locale_enUS.numberFormat;\n  d3.geo = {};\n  function d3_adder() {}\n  d3_adder.prototype = {\n    s: 0,\n    t: 0,\n    add: function(y) {\n      d3_adderSum(y, this.t, d3_adderTemp);\n      d3_adderSum(d3_adderTemp.s, this.s, this);\n      if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t;\n    },\n    reset: function() {\n      this.s = this.t = 0;\n    },\n    valueOf: function() {\n      return this.s;\n    }\n  };\n  var d3_adderTemp = new d3_adder();\n  function d3_adderSum(a, b, o) {\n    var x = o.s = a + b, bv = x - a, av = x - bv;\n    o.t = a - av + (b - bv);\n  }\n  d3.geo.stream = function(object, listener) {\n    if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {\n      d3_geo_streamObjectType[object.type](object, listener);\n    } else {\n      d3_geo_streamGeometry(object, listener);\n    }\n  };\n  function d3_geo_streamGeometry(geometry, listener) {\n    if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {\n      d3_geo_streamGeometryType[geometry.type](geometry, listener);\n    }\n  }\n  var d3_geo_streamObjectType = {\n    Feature: function(feature, listener) {\n      d3_geo_streamGeometry(feature.geometry, listener);\n    },\n    FeatureCollection: function(object, listener) {\n      var features = object.features, i = -1, n = features.length;\n      while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);\n    }\n  };\n  var d3_geo_streamGeometryType = {\n    Sphere: function(object, listener) {\n      listener.sphere();\n    },\n    Point: function(object, listener) {\n      object = object.coordinates;\n      listener.point(object[0], object[1], object[2]);\n    },\n    MultiPoint: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]);\n    },\n    LineString: function(object, listener) {\n      d3_geo_streamLine(object.coordinates, listener, 0);\n    },\n    MultiLineString: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);\n    },\n    Polygon: function(object, listener) {\n      d3_geo_streamPolygon(object.coordinates, listener);\n    },\n    MultiPolygon: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);\n    },\n    GeometryCollection: function(object, listener) {\n      var geometries = object.geometries, i = -1, n = geometries.length;\n      while (++i < n) d3_geo_streamGeometry(geometries[i], listener);\n    }\n  };\n  function d3_geo_streamLine(coordinates, listener, closed) {\n    var i = -1, n = coordinates.length - closed, coordinate;\n    listener.lineStart();\n    while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]);\n    listener.lineEnd();\n  }\n  function d3_geo_streamPolygon(coordinates, listener) {\n    var i = -1, n = coordinates.length;\n    listener.polygonStart();\n    while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);\n    listener.polygonEnd();\n  }\n  d3.geo.area = function(object) {\n    d3_geo_areaSum = 0;\n    d3.geo.stream(object, d3_geo_area);\n    return d3_geo_areaSum;\n  };\n  var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder();\n  var d3_geo_area = {\n    sphere: function() {\n      d3_geo_areaSum += 4 * π;\n    },\n    point: d3_noop,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: function() {\n      d3_geo_areaRingSum.reset();\n      d3_geo_area.lineStart = d3_geo_areaRingStart;\n    },\n    polygonEnd: function() {\n      var area = 2 * d3_geo_areaRingSum;\n      d3_geo_areaSum += area < 0 ? 4 * π + area : area;\n      d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;\n    }\n  };\n  function d3_geo_areaRingStart() {\n    var λ00, φ00, λ0, cosφ0, sinφ0;\n    d3_geo_area.point = function(λ, φ) {\n      d3_geo_area.point = nextPoint;\n      λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), \n      sinφ0 = Math.sin(φ);\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      φ = φ * d3_radians / 2 + π / 4;\n      var dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(adλ), v = k * sdλ * Math.sin(adλ);\n      d3_geo_areaRingSum.add(Math.atan2(v, u));\n      λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;\n    }\n    d3_geo_area.lineEnd = function() {\n      nextPoint(λ00, φ00);\n    };\n  }\n  function d3_geo_cartesian(spherical) {\n    var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);\n    return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];\n  }\n  function d3_geo_cartesianDot(a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n  }\n  function d3_geo_cartesianCross(a, b) {\n    return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];\n  }\n  function d3_geo_cartesianAdd(a, b) {\n    a[0] += b[0];\n    a[1] += b[1];\n    a[2] += b[2];\n  }\n  function d3_geo_cartesianScale(vector, k) {\n    return [ vector[0] * k, vector[1] * k, vector[2] * k ];\n  }\n  function d3_geo_cartesianNormalize(d) {\n    var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n    d[0] /= l;\n    d[1] /= l;\n    d[2] /= l;\n  }\n  function d3_geo_spherical(cartesian) {\n    return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];\n  }\n  function d3_geo_sphericalEqual(a, b) {\n    return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;\n  }\n  d3.geo.bounds = function() {\n    var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;\n    var bound = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        bound.point = ringPoint;\n        bound.lineStart = ringStart;\n        bound.lineEnd = ringEnd;\n        dλSum = 0;\n        d3_geo_area.polygonStart();\n      },\n      polygonEnd: function() {\n        d3_geo_area.polygonEnd();\n        bound.point = point;\n        bound.lineStart = lineStart;\n        bound.lineEnd = lineEnd;\n        if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90;\n        range[0] = λ0, range[1] = λ1;\n      }\n    };\n    function point(λ, φ) {\n      ranges.push(range = [ λ0 = λ, λ1 = λ ]);\n      if (φ < φ0) φ0 = φ;\n      if (φ > φ1) φ1 = φ;\n    }\n    function linePoint(λ, φ) {\n      var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);\n      if (p0) {\n        var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);\n        d3_geo_cartesianNormalize(inflection);\n        inflection = d3_geo_spherical(inflection);\n        var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180;\n        if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n          var φi = inflection[1] * d3_degrees;\n          if (φi > φ1) φ1 = φi;\n        } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n          var φi = -inflection[1] * d3_degrees;\n          if (φi < φ0) φ0 = φi;\n        } else {\n          if (φ < φ0) φ0 = φ;\n          if (φ > φ1) φ1 = φ;\n        }\n        if (antimeridian) {\n          if (λ < λ_) {\n            if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n          } else {\n            if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n          }\n        } else {\n          if (λ1 >= λ0) {\n            if (λ < λ0) λ0 = λ;\n            if (λ > λ1) λ1 = λ;\n          } else {\n            if (λ > λ_) {\n              if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n            } else {\n              if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n            }\n          }\n        }\n      } else {\n        point(λ, φ);\n      }\n      p0 = p, λ_ = λ;\n    }\n    function lineStart() {\n      bound.point = linePoint;\n    }\n    function lineEnd() {\n      range[0] = λ0, range[1] = λ1;\n      bound.point = point;\n      p0 = null;\n    }\n    function ringPoint(λ, φ) {\n      if (p0) {\n        var dλ = λ - λ_;\n        dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ;\n      } else λ__ = λ, φ__ = φ;\n      d3_geo_area.point(λ, φ);\n      linePoint(λ, φ);\n    }\n    function ringStart() {\n      d3_geo_area.lineStart();\n    }\n    function ringEnd() {\n      ringPoint(λ__, φ__);\n      d3_geo_area.lineEnd();\n      if (abs(dλSum) > ε) λ0 = -(λ1 = 180);\n      range[0] = λ0, range[1] = λ1;\n      p0 = null;\n    }\n    function angle(λ0, λ1) {\n      return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1;\n    }\n    function compareRanges(a, b) {\n      return a[0] - b[0];\n    }\n    function withinRange(x, range) {\n      return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n    }\n    return function(feature) {\n      φ1 = λ1 = -(λ0 = φ0 = Infinity);\n      ranges = [];\n      d3.geo.stream(feature, bound);\n      var n = ranges.length;\n      if (n) {\n        ranges.sort(compareRanges);\n        for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) {\n          b = ranges[i];\n          if (withinRange(b[0], a) || withinRange(b[1], a)) {\n            if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n            if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n          } else {\n            merged.push(a = b);\n          }\n        }\n        var best = -Infinity, dλ;\n        for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) {\n          b = merged[i];\n          if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1];\n        }\n      }\n      ranges = range = null;\n      return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ];\n    };\n  }();\n  d3.geo.centroid = function(object) {\n    d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n    d3.geo.stream(object, d3_geo_centroid);\n    var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z;\n    if (m < ε2) {\n      x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1;\n      if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0;\n      m = x * x + y * y + z * z;\n      if (m < ε2) return [ NaN, NaN ];\n    }\n    return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ];\n  };\n  var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2;\n  var d3_geo_centroid = {\n    sphere: d3_noop,\n    point: d3_geo_centroidPoint,\n    lineStart: d3_geo_centroidLineStart,\n    lineEnd: d3_geo_centroidLineEnd,\n    polygonStart: function() {\n      d3_geo_centroid.lineStart = d3_geo_centroidRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_centroid.lineStart = d3_geo_centroidLineStart;\n    }\n  };\n  function d3_geo_centroidPoint(λ, φ) {\n    λ *= d3_radians;\n    var cosφ = Math.cos(φ *= d3_radians);\n    d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ));\n  }\n  function d3_geo_centroidPointXYZ(x, y, z) {\n    ++d3_geo_centroidW0;\n    d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0;\n    d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0;\n    d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0;\n  }\n  function d3_geo_centroidLineStart() {\n    var x0, y0, z0;\n    d3_geo_centroid.point = function(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians);\n      x0 = cosφ * Math.cos(λ);\n      y0 = cosφ * Math.sin(λ);\n      z0 = Math.sin(φ);\n      d3_geo_centroid.point = nextPoint;\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n      d3_geo_centroidW1 += w;\n      d3_geo_centroidX1 += w * (x0 + (x0 = x));\n      d3_geo_centroidY1 += w * (y0 + (y0 = y));\n      d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    }\n  }\n  function d3_geo_centroidLineEnd() {\n    d3_geo_centroid.point = d3_geo_centroidPoint;\n  }\n  function d3_geo_centroidRingStart() {\n    var λ00, φ00, x0, y0, z0;\n    d3_geo_centroid.point = function(λ, φ) {\n      λ00 = λ, φ00 = φ;\n      d3_geo_centroid.point = nextPoint;\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians);\n      x0 = cosφ * Math.cos(λ);\n      y0 = cosφ * Math.sin(λ);\n      z0 = Math.sin(φ);\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    };\n    d3_geo_centroid.lineEnd = function() {\n      nextPoint(λ00, φ00);\n      d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;\n      d3_geo_centroid.point = d3_geo_centroidPoint;\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u);\n      d3_geo_centroidX2 += v * cx;\n      d3_geo_centroidY2 += v * cy;\n      d3_geo_centroidZ2 += v * cz;\n      d3_geo_centroidW1 += w;\n      d3_geo_centroidX1 += w * (x0 + (x0 = x));\n      d3_geo_centroidY1 += w * (y0 + (y0 = y));\n      d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    }\n  }\n  function d3_geo_compose(a, b) {\n    function compose(x, y) {\n      return x = a(x, y), b(x[0], x[1]);\n    }\n    if (a.invert && b.invert) compose.invert = function(x, y) {\n      return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n    };\n    return compose;\n  }\n  function d3_true() {\n    return true;\n  }\n  function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {\n    var subject = [], clip = [];\n    segments.forEach(function(segment) {\n      if ((n = segment.length - 1) <= 0) return;\n      var n, p0 = segment[0], p1 = segment[n];\n      if (d3_geo_sphericalEqual(p0, p1)) {\n        listener.lineStart();\n        for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);\n        listener.lineEnd();\n        return;\n      }\n      var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false);\n      a.o = b;\n      subject.push(a);\n      clip.push(b);\n      a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);\n      b = new d3_geo_clipPolygonIntersection(p1, null, a, true);\n      a.o = b;\n      subject.push(a);\n      clip.push(b);\n    });\n    clip.sort(compare);\n    d3_geo_clipPolygonLinkCircular(subject);\n    d3_geo_clipPolygonLinkCircular(clip);\n    if (!subject.length) return;\n    for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {\n      clip[i].e = entry = !entry;\n    }\n    var start = subject[0], points, point;\n    while (1) {\n      var current = start, isSubject = true;\n      while (current.v) if ((current = current.n) === start) return;\n      points = current.z;\n      listener.lineStart();\n      do {\n        current.v = current.o.v = true;\n        if (current.e) {\n          if (isSubject) {\n            for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);\n          } else {\n            interpolate(current.x, current.n.x, 1, listener);\n          }\n          current = current.n;\n        } else {\n          if (isSubject) {\n            points = current.p.z;\n            for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);\n          } else {\n            interpolate(current.x, current.p.x, -1, listener);\n          }\n          current = current.p;\n        }\n        current = current.o;\n        points = current.z;\n        isSubject = !isSubject;\n      } while (!current.v);\n      listener.lineEnd();\n    }\n  }\n  function d3_geo_clipPolygonLinkCircular(array) {\n    if (!(n = array.length)) return;\n    var n, i = 0, a = array[0], b;\n    while (++i < n) {\n      a.n = b = array[i];\n      b.p = a;\n      a = b;\n    }\n    a.n = b = array[0];\n    b.p = a;\n  }\n  function d3_geo_clipPolygonIntersection(point, points, other, entry) {\n    this.x = point;\n    this.z = points;\n    this.o = other;\n    this.e = entry;\n    this.v = false;\n    this.n = this.p = null;\n  }\n  function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {\n    return function(rotate, listener) {\n      var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);\n      var clip = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          clip.point = pointRing;\n          clip.lineStart = ringStart;\n          clip.lineEnd = ringEnd;\n          segments = [];\n          polygon = [];\n        },\n        polygonEnd: function() {\n          clip.point = point;\n          clip.lineStart = lineStart;\n          clip.lineEnd = lineEnd;\n          segments = d3.merge(segments);\n          var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);\n          if (segments.length) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);\n          } else if (clipStartInside) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            listener.lineStart();\n            interpolate(null, null, 1, listener);\n            listener.lineEnd();\n          }\n          if (polygonStarted) listener.polygonEnd(), polygonStarted = false;\n          segments = polygon = null;\n        },\n        sphere: function() {\n          listener.polygonStart();\n          listener.lineStart();\n          interpolate(null, null, 1, listener);\n          listener.lineEnd();\n          listener.polygonEnd();\n        }\n      };\n      function point(λ, φ) {\n        var point = rotate(λ, φ);\n        if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);\n      }\n      function pointLine(λ, φ) {\n        var point = rotate(λ, φ);\n        line.point(point[0], point[1]);\n      }\n      function lineStart() {\n        clip.point = pointLine;\n        line.lineStart();\n      }\n      function lineEnd() {\n        clip.point = point;\n        line.lineEnd();\n      }\n      var segments;\n      var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygonStarted = false, polygon, ring;\n      function pointRing(λ, φ) {\n        ring.push([ λ, φ ]);\n        var point = rotate(λ, φ);\n        ringListener.point(point[0], point[1]);\n      }\n      function ringStart() {\n        ringListener.lineStart();\n        ring = [];\n      }\n      function ringEnd() {\n        pointRing(ring[0][0], ring[0][1]);\n        ringListener.lineEnd();\n        var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;\n        ring.pop();\n        polygon.push(ring);\n        ring = null;\n        if (!n) return;\n        if (clean & 1) {\n          segment = ringSegments[0];\n          var n = segment.length - 1, i = -1, point;\n          if (n > 0) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            listener.lineStart();\n            while (++i < n) listener.point((point = segment[i])[0], point[1]);\n            listener.lineEnd();\n          }\n          return;\n        }\n        if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n        segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));\n      }\n      return clip;\n    };\n  }\n  function d3_geo_clipSegmentLength1(segment) {\n    return segment.length > 1;\n  }\n  function d3_geo_clipBufferListener() {\n    var lines = [], line;\n    return {\n      lineStart: function() {\n        lines.push(line = []);\n      },\n      point: function(λ, φ) {\n        line.push([ λ, φ ]);\n      },\n      lineEnd: d3_noop,\n      buffer: function() {\n        var buffer = lines;\n        lines = [];\n        line = null;\n        return buffer;\n      },\n      rejoin: function() {\n        if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n      }\n    };\n  }\n  function d3_geo_clipSort(a, b) {\n    return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);\n  }\n  var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -π, -π / 2 ]);\n  function d3_geo_clipAntimeridianLine(listener) {\n    var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;\n    return {\n      lineStart: function() {\n        listener.lineStart();\n        clean = 1;\n      },\n      point: function(λ1, φ1) {\n        var sλ1 = λ1 > 0 ? π : -π, dλ = abs(λ1 - λ0);\n        if (abs(dλ - π) < ε) {\n          listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfπ : -halfπ);\n          listener.point(sλ0, φ0);\n          listener.lineEnd();\n          listener.lineStart();\n          listener.point(sλ1, φ0);\n          listener.point(λ1, φ0);\n          clean = 0;\n        } else if (sλ0 !== sλ1 && dλ >= π) {\n          if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;\n          if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;\n          φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);\n          listener.point(sλ0, φ0);\n          listener.lineEnd();\n          listener.lineStart();\n          listener.point(sλ1, φ0);\n          clean = 0;\n        }\n        listener.point(λ0 = λ1, φ0 = φ1);\n        sλ0 = sλ1;\n      },\n      lineEnd: function() {\n        listener.lineEnd();\n        λ0 = φ0 = NaN;\n      },\n      clean: function() {\n        return 2 - clean;\n      }\n    };\n  }\n  function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {\n    var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);\n    return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;\n  }\n  function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {\n    var φ;\n    if (from == null) {\n      φ = direction * halfπ;\n      listener.point(-π, φ);\n      listener.point(0, φ);\n      listener.point(π, φ);\n      listener.point(π, 0);\n      listener.point(π, -φ);\n      listener.point(0, -φ);\n      listener.point(-π, -φ);\n      listener.point(-π, 0);\n      listener.point(-π, φ);\n    } else if (abs(from[0] - to[0]) > ε) {\n      var s = from[0] < to[0] ? π : -π;\n      φ = direction * s / 2;\n      listener.point(-s, φ);\n      listener.point(0, φ);\n      listener.point(s, φ);\n    } else {\n      listener.point(to[0], to[1]);\n    }\n  }\n  function d3_geo_pointInPolygon(point, polygon) {\n    var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;\n    d3_geo_areaRingSum.reset();\n    for (var i = 0, n = polygon.length; i < n; ++i) {\n      var ring = polygon[i], m = ring.length;\n      if (!m) continue;\n      var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1;\n      while (true) {\n        if (j === m) j = 0;\n        point = ring[j];\n        var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, antimeridian = adλ > π, k = sinφ0 * sinφ;\n        d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));\n        polarAngle += antimeridian ? dλ + sdλ * τ : dλ;\n        if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {\n          var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));\n          d3_geo_cartesianNormalize(arc);\n          var intersection = d3_geo_cartesianCross(meridianNormal, arc);\n          d3_geo_cartesianNormalize(intersection);\n          var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);\n          if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {\n            winding += antimeridian ^ dλ >= 0 ? 1 : -1;\n          }\n        }\n        if (!j++) break;\n        λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;\n      }\n    }\n    return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < -ε) ^ winding & 1;\n  }\n  function d3_geo_clipCircle(radius) {\n    var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);\n    return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);\n    function visible(λ, φ) {\n      return Math.cos(λ) * Math.cos(φ) > cr;\n    }\n    function clipLine(listener) {\n      var point0, c0, v0, v00, clean;\n      return {\n        lineStart: function() {\n          v00 = v0 = false;\n          clean = 1;\n        },\n        point: function(λ, φ) {\n          var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;\n          if (!point0 && (v00 = v0 = v)) listener.lineStart();\n          if (v !== v0) {\n            point2 = intersect(point0, point1);\n            if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {\n              point1[0] += ε;\n              point1[1] += ε;\n              v = visible(point1[0], point1[1]);\n            }\n          }\n          if (v !== v0) {\n            clean = 0;\n            if (v) {\n              listener.lineStart();\n              point2 = intersect(point1, point0);\n              listener.point(point2[0], point2[1]);\n            } else {\n              point2 = intersect(point0, point1);\n              listener.point(point2[0], point2[1]);\n              listener.lineEnd();\n            }\n            point0 = point2;\n          } else if (notHemisphere && point0 && smallRadius ^ v) {\n            var t;\n            if (!(c & c0) && (t = intersect(point1, point0, true))) {\n              clean = 0;\n              if (smallRadius) {\n                listener.lineStart();\n                listener.point(t[0][0], t[0][1]);\n                listener.point(t[1][0], t[1][1]);\n                listener.lineEnd();\n              } else {\n                listener.point(t[1][0], t[1][1]);\n                listener.lineEnd();\n                listener.lineStart();\n                listener.point(t[0][0], t[0][1]);\n              }\n            }\n          }\n          if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {\n            listener.point(point1[0], point1[1]);\n          }\n          point0 = point1, v0 = v, c0 = c;\n        },\n        lineEnd: function() {\n          if (v0) listener.lineEnd();\n          point0 = null;\n        },\n        clean: function() {\n          return clean | (v00 && v0) << 1;\n        }\n      };\n    }\n    function intersect(a, b, two) {\n      var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);\n      var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;\n      if (!determinant) return !two && a;\n      var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);\n      d3_geo_cartesianAdd(A, B);\n      var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);\n      if (t2 < 0) return;\n      var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);\n      d3_geo_cartesianAdd(q, A);\n      q = d3_geo_spherical(q);\n      if (!two) return q;\n      var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;\n      if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;\n      var δλ = λ1 - λ0, polar = abs(δλ - π) < ε, meridian = polar || δλ < ε;\n      if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;\n      if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {\n        var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);\n        d3_geo_cartesianAdd(q1, A);\n        return [ q, d3_geo_spherical(q1) ];\n      }\n    }\n    function code(λ, φ) {\n      var r = smallRadius ? radius : π - radius, code = 0;\n      if (λ < -r) code |= 1; else if (λ > r) code |= 2;\n      if (φ < -r) code |= 4; else if (φ > r) code |= 8;\n      return code;\n    }\n  }\n  function d3_geom_clipLine(x0, y0, x1, y1) {\n    return function(line) {\n      var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;\n      r = x0 - ax;\n      if (!dx && r > 0) return;\n      r /= dx;\n      if (dx < 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      } else if (dx > 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      }\n      r = x1 - ax;\n      if (!dx && r < 0) return;\n      r /= dx;\n      if (dx < 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      } else if (dx > 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      }\n      r = y0 - ay;\n      if (!dy && r > 0) return;\n      r /= dy;\n      if (dy < 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      } else if (dy > 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      }\n      r = y1 - ay;\n      if (!dy && r < 0) return;\n      r /= dy;\n      if (dy < 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      } else if (dy > 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      }\n      if (t0 > 0) line.a = {\n        x: ax + t0 * dx,\n        y: ay + t0 * dy\n      };\n      if (t1 < 1) line.b = {\n        x: ax + t1 * dx,\n        y: ay + t1 * dy\n      };\n      return line;\n    };\n  }\n  var d3_geo_clipExtentMAX = 1e9;\n  d3.geo.clipExtent = function() {\n    var x0, y0, x1, y1, stream, clip, clipExtent = {\n      stream: function(output) {\n        if (stream) stream.valid = false;\n        stream = clip(output);\n        stream.valid = true;\n        return stream;\n      },\n      extent: function(_) {\n        if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n        clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]);\n        if (stream) stream.valid = false, stream = null;\n        return clipExtent;\n      }\n    };\n    return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]);\n  };\n  function d3_geo_clipExtent(x0, y0, x1, y1) {\n    return function(listener) {\n      var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;\n      var clip = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          listener = bufferListener;\n          segments = [];\n          polygon = [];\n          clean = true;\n        },\n        polygonEnd: function() {\n          listener = listener_;\n          segments = d3.merge(segments);\n          var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length;\n          if (inside || visible) {\n            listener.polygonStart();\n            if (inside) {\n              listener.lineStart();\n              interpolate(null, null, 1, listener);\n              listener.lineEnd();\n            }\n            if (visible) {\n              d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener);\n            }\n            listener.polygonEnd();\n          }\n          segments = polygon = ring = null;\n        }\n      };\n      function insidePolygon(p) {\n        var wn = 0, n = polygon.length, y = p[1];\n        for (var i = 0; i < n; ++i) {\n          for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) {\n            b = v[j];\n            if (a[1] <= y) {\n              if (b[1] > y && d3_cross2d(a, b, p) > 0) ++wn;\n            } else {\n              if (b[1] <= y && d3_cross2d(a, b, p) < 0) --wn;\n            }\n            a = b;\n          }\n        }\n        return wn !== 0;\n      }\n      function interpolate(from, to, direction, listener) {\n        var a = 0, a1 = 0;\n        if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {\n          do {\n            listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n          } while ((a = (a + direction + 4) % 4) !== a1);\n        } else {\n          listener.point(to[0], to[1]);\n        }\n      }\n      function pointVisible(x, y) {\n        return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n      }\n      function point(x, y) {\n        if (pointVisible(x, y)) listener.point(x, y);\n      }\n      var x__, y__, v__, x_, y_, v_, first, clean;\n      function lineStart() {\n        clip.point = linePoint;\n        if (polygon) polygon.push(ring = []);\n        first = true;\n        v_ = false;\n        x_ = y_ = NaN;\n      }\n      function lineEnd() {\n        if (segments) {\n          linePoint(x__, y__);\n          if (v__ && v_) bufferListener.rejoin();\n          segments.push(bufferListener.buffer());\n        }\n        clip.point = point;\n        if (v_) listener.lineEnd();\n      }\n      function linePoint(x, y) {\n        x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));\n        y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));\n        var v = pointVisible(x, y);\n        if (polygon) ring.push([ x, y ]);\n        if (first) {\n          x__ = x, y__ = y, v__ = v;\n          first = false;\n          if (v) {\n            listener.lineStart();\n            listener.point(x, y);\n          }\n        } else {\n          if (v && v_) listener.point(x, y); else {\n            var l = {\n              a: {\n                x: x_,\n                y: y_\n              },\n              b: {\n                x: x,\n                y: y\n              }\n            };\n            if (clipLine(l)) {\n              if (!v_) {\n                listener.lineStart();\n                listener.point(l.a.x, l.a.y);\n              }\n              listener.point(l.b.x, l.b.y);\n              if (!v) listener.lineEnd();\n              clean = false;\n            } else if (v) {\n              listener.lineStart();\n              listener.point(x, y);\n              clean = false;\n            }\n          }\n        }\n        x_ = x, y_ = y, v_ = v;\n      }\n      return clip;\n    };\n    function corner(p, direction) {\n      return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;\n    }\n    function compare(a, b) {\n      return comparePoints(a.x, b.x);\n    }\n    function comparePoints(a, b) {\n      var ca = corner(a, 1), cb = corner(b, 1);\n      return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];\n    }\n  }\n  function d3_geo_conic(projectAt) {\n    var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);\n    p.parallels = function(_) {\n      if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];\n      return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);\n    };\n    return p;\n  }\n  function d3_geo_conicEqualArea(φ0, φ1) {\n    var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;\n    function forward(λ, φ) {\n      var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;\n      return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = ρ0 - y;\n      return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];\n    };\n    return forward;\n  }\n  (d3.geo.conicEqualArea = function() {\n    return d3_geo_conic(d3_geo_conicEqualArea);\n  }).raw = d3_geo_conicEqualArea;\n  d3.geo.albers = function() {\n    return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070);\n  };\n  d3.geo.albersUsa = function() {\n    var lower48 = d3.geo.albers();\n    var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);\n    var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);\n    var point, pointStream = {\n      point: function(x, y) {\n        point = [ x, y ];\n      }\n    }, lower48Point, alaskaPoint, hawaiiPoint;\n    function albersUsa(coordinates) {\n      var x = coordinates[0], y = coordinates[1];\n      point = null;\n      (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y);\n      return point;\n    }\n    albersUsa.invert = function(coordinates) {\n      var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k;\n      return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates);\n    };\n    albersUsa.stream = function(stream) {\n      var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream);\n      return {\n        point: function(x, y) {\n          lower48Stream.point(x, y);\n          alaskaStream.point(x, y);\n          hawaiiStream.point(x, y);\n        },\n        sphere: function() {\n          lower48Stream.sphere();\n          alaskaStream.sphere();\n          hawaiiStream.sphere();\n        },\n        lineStart: function() {\n          lower48Stream.lineStart();\n          alaskaStream.lineStart();\n          hawaiiStream.lineStart();\n        },\n        lineEnd: function() {\n          lower48Stream.lineEnd();\n          alaskaStream.lineEnd();\n          hawaiiStream.lineEnd();\n        },\n        polygonStart: function() {\n          lower48Stream.polygonStart();\n          alaskaStream.polygonStart();\n          hawaiiStream.polygonStart();\n        },\n        polygonEnd: function() {\n          lower48Stream.polygonEnd();\n          alaskaStream.polygonEnd();\n          hawaiiStream.polygonEnd();\n        }\n      };\n    };\n    albersUsa.precision = function(_) {\n      if (!arguments.length) return lower48.precision();\n      lower48.precision(_);\n      alaska.precision(_);\n      hawaii.precision(_);\n      return albersUsa;\n    };\n    albersUsa.scale = function(_) {\n      if (!arguments.length) return lower48.scale();\n      lower48.scale(_);\n      alaska.scale(_ * .35);\n      hawaii.scale(_);\n      return albersUsa.translate(lower48.translate());\n    };\n    albersUsa.translate = function(_) {\n      if (!arguments.length) return lower48.translate();\n      var k = lower48.scale(), x = +_[0], y = +_[1];\n      lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point;\n      alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n      hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n      return albersUsa;\n    };\n    return albersUsa.scale(1070);\n  };\n  var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {\n    point: d3_noop,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: function() {\n      d3_geo_pathAreaPolygon = 0;\n      d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;\n      d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2);\n    }\n  };\n  function d3_geo_pathAreaRingStart() {\n    var x00, y00, x0, y0;\n    d3_geo_pathArea.point = function(x, y) {\n      d3_geo_pathArea.point = nextPoint;\n      x00 = x0 = x, y00 = y0 = y;\n    };\n    function nextPoint(x, y) {\n      d3_geo_pathAreaPolygon += y0 * x - x0 * y;\n      x0 = x, y0 = y;\n    }\n    d3_geo_pathArea.lineEnd = function() {\n      nextPoint(x00, y00);\n    };\n  }\n  var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;\n  var d3_geo_pathBounds = {\n    point: d3_geo_pathBoundsPoint,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: d3_noop,\n    polygonEnd: d3_noop\n  };\n  function d3_geo_pathBoundsPoint(x, y) {\n    if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;\n    if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;\n    if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;\n    if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;\n  }\n  function d3_geo_pathBuffer() {\n    var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];\n    var stream = {\n      point: point,\n      lineStart: function() {\n        stream.point = pointLineStart;\n      },\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        stream.lineEnd = lineEndPolygon;\n      },\n      polygonEnd: function() {\n        stream.lineEnd = lineEnd;\n        stream.point = point;\n      },\n      pointRadius: function(_) {\n        pointCircle = d3_geo_pathBufferCircle(_);\n        return stream;\n      },\n      result: function() {\n        if (buffer.length) {\n          var result = buffer.join(\"\");\n          buffer = [];\n          return result;\n        }\n      }\n    };\n    function point(x, y) {\n      buffer.push(\"M\", x, \",\", y, pointCircle);\n    }\n    function pointLineStart(x, y) {\n      buffer.push(\"M\", x, \",\", y);\n      stream.point = pointLine;\n    }\n    function pointLine(x, y) {\n      buffer.push(\"L\", x, \",\", y);\n    }\n    function lineEnd() {\n      stream.point = point;\n    }\n    function lineEndPolygon() {\n      buffer.push(\"Z\");\n    }\n    return stream;\n  }\n  function d3_geo_pathBufferCircle(radius) {\n    return \"m0,\" + radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius + \"z\";\n  }\n  var d3_geo_pathCentroid = {\n    point: d3_geo_pathCentroidPoint,\n    lineStart: d3_geo_pathCentroidLineStart,\n    lineEnd: d3_geo_pathCentroidLineEnd,\n    polygonStart: function() {\n      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;\n      d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;\n    }\n  };\n  function d3_geo_pathCentroidPoint(x, y) {\n    d3_geo_centroidX0 += x;\n    d3_geo_centroidY0 += y;\n    ++d3_geo_centroidZ0;\n  }\n  function d3_geo_pathCentroidLineStart() {\n    var x0, y0;\n    d3_geo_pathCentroid.point = function(x, y) {\n      d3_geo_pathCentroid.point = nextPoint;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    };\n    function nextPoint(x, y) {\n      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n      d3_geo_centroidX1 += z * (x0 + x) / 2;\n      d3_geo_centroidY1 += z * (y0 + y) / 2;\n      d3_geo_centroidZ1 += z;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    }\n  }\n  function d3_geo_pathCentroidLineEnd() {\n    d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n  }\n  function d3_geo_pathCentroidRingStart() {\n    var x00, y00, x0, y0;\n    d3_geo_pathCentroid.point = function(x, y) {\n      d3_geo_pathCentroid.point = nextPoint;\n      d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);\n    };\n    function nextPoint(x, y) {\n      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n      d3_geo_centroidX1 += z * (x0 + x) / 2;\n      d3_geo_centroidY1 += z * (y0 + y) / 2;\n      d3_geo_centroidZ1 += z;\n      z = y0 * x - x0 * y;\n      d3_geo_centroidX2 += z * (x0 + x);\n      d3_geo_centroidY2 += z * (y0 + y);\n      d3_geo_centroidZ2 += z * 3;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    }\n    d3_geo_pathCentroid.lineEnd = function() {\n      nextPoint(x00, y00);\n    };\n  }\n  function d3_geo_pathContext(context) {\n    var pointRadius = 4.5;\n    var stream = {\n      point: point,\n      lineStart: function() {\n        stream.point = pointLineStart;\n      },\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        stream.lineEnd = lineEndPolygon;\n      },\n      polygonEnd: function() {\n        stream.lineEnd = lineEnd;\n        stream.point = point;\n      },\n      pointRadius: function(_) {\n        pointRadius = _;\n        return stream;\n      },\n      result: d3_noop\n    };\n    function point(x, y) {\n      context.moveTo(x + pointRadius, y);\n      context.arc(x, y, pointRadius, 0, τ);\n    }\n    function pointLineStart(x, y) {\n      context.moveTo(x, y);\n      stream.point = pointLine;\n    }\n    function pointLine(x, y) {\n      context.lineTo(x, y);\n    }\n    function lineEnd() {\n      stream.point = point;\n    }\n    function lineEndPolygon() {\n      context.closePath();\n    }\n    return stream;\n  }\n  function d3_geo_resample(project) {\n    var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;\n    function resample(stream) {\n      return (maxDepth ? resampleRecursive : resampleNone)(stream);\n    }\n    function resampleNone(stream) {\n      return d3_geo_transformPoint(stream, function(x, y) {\n        x = project(x, y);\n        stream.point(x[0], x[1]);\n      });\n    }\n    function resampleRecursive(stream) {\n      var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;\n      var resample = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          stream.polygonStart();\n          resample.lineStart = ringStart;\n        },\n        polygonEnd: function() {\n          stream.polygonEnd();\n          resample.lineStart = lineStart;\n        }\n      };\n      function point(x, y) {\n        x = project(x, y);\n        stream.point(x[0], x[1]);\n      }\n      function lineStart() {\n        x0 = NaN;\n        resample.point = linePoint;\n        stream.lineStart();\n      }\n      function linePoint(λ, φ) {\n        var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);\n        resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n        stream.point(x0, y0);\n      }\n      function lineEnd() {\n        resample.point = point;\n        stream.lineEnd();\n      }\n      function ringStart() {\n        lineStart();\n        resample.point = ringPoint;\n        resample.lineEnd = ringEnd;\n      }\n      function ringPoint(λ, φ) {\n        linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n        resample.point = linePoint;\n      }\n      function ringEnd() {\n        resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);\n        resample.lineEnd = lineEnd;\n        lineEnd();\n      }\n      return resample;\n    }\n    function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {\n      var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;\n      if (d2 > 4 * δ2 && depth--) {\n        var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;\n        if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {\n          resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);\n          stream.point(x2, y2);\n          resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);\n        }\n      }\n    }\n    resample.precision = function(_) {\n      if (!arguments.length) return Math.sqrt(δ2);\n      maxDepth = (δ2 = _ * _) > 0 && 16;\n      return resample;\n    };\n    return resample;\n  }\n  d3.geo.path = function() {\n    var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;\n    function path(object) {\n      if (object) {\n        if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n        if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream);\n        d3.geo.stream(object, cacheStream);\n      }\n      return contextStream.result();\n    }\n    path.area = function(object) {\n      d3_geo_pathAreaSum = 0;\n      d3.geo.stream(object, projectStream(d3_geo_pathArea));\n      return d3_geo_pathAreaSum;\n    };\n    path.centroid = function(object) {\n      d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n      d3.geo.stream(object, projectStream(d3_geo_pathCentroid));\n      return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ];\n    };\n    path.bounds = function(object) {\n      d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);\n      d3.geo.stream(object, projectStream(d3_geo_pathBounds));\n      return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];\n    };\n    path.projection = function(_) {\n      if (!arguments.length) return projection;\n      projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;\n      return reset();\n    };\n    path.context = function(_) {\n      if (!arguments.length) return context;\n      contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);\n      if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n      return reset();\n    };\n    path.pointRadius = function(_) {\n      if (!arguments.length) return pointRadius;\n      pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n      return path;\n    };\n    function reset() {\n      cacheStream = null;\n      return path;\n    }\n    return path.projection(d3.geo.albersUsa()).context(null);\n  };\n  function d3_geo_pathProjectStream(project) {\n    var resample = d3_geo_resample(function(x, y) {\n      return project([ x * d3_degrees, y * d3_degrees ]);\n    });\n    return function(stream) {\n      return d3_geo_projectionRadians(resample(stream));\n    };\n  }\n  d3.geo.transform = function(methods) {\n    return {\n      stream: function(stream) {\n        var transform = new d3_geo_transform(stream);\n        for (var k in methods) transform[k] = methods[k];\n        return transform;\n      }\n    };\n  };\n  function d3_geo_transform(stream) {\n    this.stream = stream;\n  }\n  d3_geo_transform.prototype = {\n    point: function(x, y) {\n      this.stream.point(x, y);\n    },\n    sphere: function() {\n      this.stream.sphere();\n    },\n    lineStart: function() {\n      this.stream.lineStart();\n    },\n    lineEnd: function() {\n      this.stream.lineEnd();\n    },\n    polygonStart: function() {\n      this.stream.polygonStart();\n    },\n    polygonEnd: function() {\n      this.stream.polygonEnd();\n    }\n  };\n  function d3_geo_transformPoint(stream, point) {\n    return {\n      point: point,\n      sphere: function() {\n        stream.sphere();\n      },\n      lineStart: function() {\n        stream.lineStart();\n      },\n      lineEnd: function() {\n        stream.lineEnd();\n      },\n      polygonStart: function() {\n        stream.polygonStart();\n      },\n      polygonEnd: function() {\n        stream.polygonEnd();\n      }\n    };\n  }\n  d3.geo.projection = d3_geo_projection;\n  d3.geo.projectionMutator = d3_geo_projectionMutator;\n  function d3_geo_projection(project) {\n    return d3_geo_projectionMutator(function() {\n      return project;\n    })();\n  }\n  function d3_geo_projectionMutator(projectAt) {\n    var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {\n      x = project(x, y);\n      return [ x[0] * k + δx, δy - x[1] * k ];\n    }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;\n    function projection(point) {\n      point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);\n      return [ point[0] * k + δx, δy - point[1] * k ];\n    }\n    function invert(point) {\n      point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);\n      return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];\n    }\n    projection.stream = function(output) {\n      if (stream) stream.valid = false;\n      stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output))));\n      stream.valid = true;\n      return stream;\n    };\n    projection.clipAngle = function(_) {\n      if (!arguments.length) return clipAngle;\n      preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);\n      return invalidate();\n    };\n    projection.clipExtent = function(_) {\n      if (!arguments.length) return clipExtent;\n      clipExtent = _;\n      postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity;\n      return invalidate();\n    };\n    projection.scale = function(_) {\n      if (!arguments.length) return k;\n      k = +_;\n      return reset();\n    };\n    projection.translate = function(_) {\n      if (!arguments.length) return [ x, y ];\n      x = +_[0];\n      y = +_[1];\n      return reset();\n    };\n    projection.center = function(_) {\n      if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];\n      λ = _[0] % 360 * d3_radians;\n      φ = _[1] % 360 * d3_radians;\n      return reset();\n    };\n    projection.rotate = function(_) {\n      if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];\n      δλ = _[0] % 360 * d3_radians;\n      δφ = _[1] % 360 * d3_radians;\n      δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;\n      return reset();\n    };\n    d3.rebind(projection, projectResample, \"precision\");\n    function reset() {\n      projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);\n      var center = project(λ, φ);\n      δx = x - center[0] * k;\n      δy = y + center[1] * k;\n      return invalidate();\n    }\n    function invalidate() {\n      if (stream) stream.valid = false, stream = null;\n      return projection;\n    }\n    return function() {\n      project = projectAt.apply(this, arguments);\n      projection.invert = project.invert && invert;\n      return reset();\n    };\n  }\n  function d3_geo_projectionRadians(stream) {\n    return d3_geo_transformPoint(stream, function(x, y) {\n      stream.point(x * d3_radians, y * d3_radians);\n    });\n  }\n  function d3_geo_equirectangular(λ, φ) {\n    return [ λ, φ ];\n  }\n  (d3.geo.equirectangular = function() {\n    return d3_geo_projection(d3_geo_equirectangular);\n  }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;\n  d3.geo.rotation = function(rotate) {\n    rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);\n    function forward(coordinates) {\n      coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n    }\n    forward.invert = function(coordinates) {\n      coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n    };\n    return forward;\n  };\n  function d3_geo_identityRotation(λ, φ) {\n    return [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n  }\n  d3_geo_identityRotation.invert = d3_geo_equirectangular;\n  function d3_geo_rotation(δλ, δφ, δγ) {\n    return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation;\n  }\n  function d3_geo_forwardRotationλ(δλ) {\n    return function(λ, φ) {\n      return λ += δλ, [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n    };\n  }\n  function d3_geo_rotationλ(δλ) {\n    var rotation = d3_geo_forwardRotationλ(δλ);\n    rotation.invert = d3_geo_forwardRotationλ(-δλ);\n    return rotation;\n  }\n  function d3_geo_rotationφγ(δφ, δγ) {\n    var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);\n    function rotation(λ, φ) {\n      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;\n      return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ];\n    }\n    rotation.invert = function(λ, φ) {\n      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;\n      return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ];\n    };\n    return rotation;\n  }\n  d3.geo.circle = function() {\n    var origin = [ 0, 0 ], angle, precision = 6, interpolate;\n    function circle() {\n      var center = typeof origin === \"function\" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];\n      interpolate(null, null, 1, {\n        point: function(x, y) {\n          ring.push(x = rotate(x, y));\n          x[0] *= d3_degrees, x[1] *= d3_degrees;\n        }\n      });\n      return {\n        type: \"Polygon\",\n        coordinates: [ ring ]\n      };\n    }\n    circle.origin = function(x) {\n      if (!arguments.length) return origin;\n      origin = x;\n      return circle;\n    };\n    circle.angle = function(x) {\n      if (!arguments.length) return angle;\n      interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);\n      return circle;\n    };\n    circle.precision = function(_) {\n      if (!arguments.length) return precision;\n      interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);\n      return circle;\n    };\n    return circle.angle(90);\n  };\n  function d3_geo_circleInterpolate(radius, precision) {\n    var cr = Math.cos(radius), sr = Math.sin(radius);\n    return function(from, to, direction, listener) {\n      var step = direction * precision;\n      if (from != null) {\n        from = d3_geo_circleAngle(cr, from);\n        to = d3_geo_circleAngle(cr, to);\n        if (direction > 0 ? from < to : from > to) from += direction * τ;\n      } else {\n        from = radius + direction * τ;\n        to = radius - .5 * step;\n      }\n      for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) {\n        listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);\n      }\n    };\n  }\n  function d3_geo_circleAngle(cr, point) {\n    var a = d3_geo_cartesian(point);\n    a[0] -= cr;\n    d3_geo_cartesianNormalize(a);\n    var angle = d3_acos(-a[1]);\n    return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);\n  }\n  d3.geo.distance = function(a, b) {\n    var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;\n    return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);\n  };\n  d3.geo.graticule = function() {\n    var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;\n    function graticule() {\n      return {\n        type: \"MultiLineString\",\n        coordinates: lines()\n      };\n    }\n    function lines() {\n      return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {\n        return abs(x % DX) > ε;\n      }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {\n        return abs(y % DY) > ε;\n      }).map(y));\n    }\n    graticule.lines = function() {\n      return lines().map(function(coordinates) {\n        return {\n          type: \"LineString\",\n          coordinates: coordinates\n        };\n      });\n    };\n    graticule.outline = function() {\n      return {\n        type: \"Polygon\",\n        coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]\n      };\n    };\n    graticule.extent = function(_) {\n      if (!arguments.length) return graticule.minorExtent();\n      return graticule.majorExtent(_).minorExtent(_);\n    };\n    graticule.majorExtent = function(_) {\n      if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];\n      X0 = +_[0][0], X1 = +_[1][0];\n      Y0 = +_[0][1], Y1 = +_[1][1];\n      if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n      if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n      return graticule.precision(precision);\n    };\n    graticule.minorExtent = function(_) {\n      if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n      x0 = +_[0][0], x1 = +_[1][0];\n      y0 = +_[0][1], y1 = +_[1][1];\n      if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n      if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n      return graticule.precision(precision);\n    };\n    graticule.step = function(_) {\n      if (!arguments.length) return graticule.minorStep();\n      return graticule.majorStep(_).minorStep(_);\n    };\n    graticule.majorStep = function(_) {\n      if (!arguments.length) return [ DX, DY ];\n      DX = +_[0], DY = +_[1];\n      return graticule;\n    };\n    graticule.minorStep = function(_) {\n      if (!arguments.length) return [ dx, dy ];\n      dx = +_[0], dy = +_[1];\n      return graticule;\n    };\n    graticule.precision = function(_) {\n      if (!arguments.length) return precision;\n      precision = +_;\n      x = d3_geo_graticuleX(y0, y1, 90);\n      y = d3_geo_graticuleY(x0, x1, precision);\n      X = d3_geo_graticuleX(Y0, Y1, 90);\n      Y = d3_geo_graticuleY(X0, X1, precision);\n      return graticule;\n    };\n    return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);\n  };\n  function d3_geo_graticuleX(y0, y1, dy) {\n    var y = d3.range(y0, y1 - ε, dy).concat(y1);\n    return function(x) {\n      return y.map(function(y) {\n        return [ x, y ];\n      });\n    };\n  }\n  function d3_geo_graticuleY(x0, x1, dx) {\n    var x = d3.range(x0, x1 - ε, dx).concat(x1);\n    return function(y) {\n      return x.map(function(x) {\n        return [ x, y ];\n      });\n    };\n  }\n  function d3_source(d) {\n    return d.source;\n  }\n  function d3_target(d) {\n    return d.target;\n  }\n  d3.geo.greatArc = function() {\n    var source = d3_source, source_, target = d3_target, target_;\n    function greatArc() {\n      return {\n        type: \"LineString\",\n        coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]\n      };\n    }\n    greatArc.distance = function() {\n      return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));\n    };\n    greatArc.source = function(_) {\n      if (!arguments.length) return source;\n      source = _, source_ = typeof _ === \"function\" ? null : _;\n      return greatArc;\n    };\n    greatArc.target = function(_) {\n      if (!arguments.length) return target;\n      target = _, target_ = typeof _ === \"function\" ? null : _;\n      return greatArc;\n    };\n    greatArc.precision = function() {\n      return arguments.length ? greatArc : 0;\n    };\n    return greatArc;\n  };\n  d3.geo.interpolate = function(source, target) {\n    return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);\n  };\n  function d3_geo_interpolate(x0, y0, x1, y1) {\n    var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);\n    var interpolate = d ? function(t) {\n      var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;\n      return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];\n    } : function() {\n      return [ x0 * d3_degrees, y0 * d3_degrees ];\n    };\n    interpolate.distance = d;\n    return interpolate;\n  }\n  d3.geo.length = function(object) {\n    d3_geo_lengthSum = 0;\n    d3.geo.stream(object, d3_geo_length);\n    return d3_geo_lengthSum;\n  };\n  var d3_geo_lengthSum;\n  var d3_geo_length = {\n    sphere: d3_noop,\n    point: d3_noop,\n    lineStart: d3_geo_lengthLineStart,\n    lineEnd: d3_noop,\n    polygonStart: d3_noop,\n    polygonEnd: d3_noop\n  };\n  function d3_geo_lengthLineStart() {\n    var λ0, sinφ0, cosφ0;\n    d3_geo_length.point = function(λ, φ) {\n      λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);\n      d3_geo_length.point = nextPoint;\n    };\n    d3_geo_length.lineEnd = function() {\n      d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;\n    };\n    function nextPoint(λ, φ) {\n      var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);\n      d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);\n      λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;\n    }\n  }\n  function d3_geo_azimuthal(scale, angle) {\n    function azimuthal(λ, φ) {\n      var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);\n      return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];\n    }\n    azimuthal.invert = function(x, y) {\n      var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c);\n      return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ];\n    };\n    return azimuthal;\n  }\n  var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {\n    return Math.sqrt(2 / (1 + cosλcosφ));\n  }, function(ρ) {\n    return 2 * Math.asin(ρ / 2);\n  });\n  (d3.geo.azimuthalEqualArea = function() {\n    return d3_geo_projection(d3_geo_azimuthalEqualArea);\n  }).raw = d3_geo_azimuthalEqualArea;\n  var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {\n    var c = Math.acos(cosλcosφ);\n    return c && c / Math.sin(c);\n  }, d3_identity);\n  (d3.geo.azimuthalEquidistant = function() {\n    return d3_geo_projection(d3_geo_azimuthalEquidistant);\n  }).raw = d3_geo_azimuthalEquidistant;\n  function d3_geo_conicConformal(φ0, φ1) {\n    var cosφ0 = Math.cos(φ0), t = function(φ) {\n      return Math.tan(π / 4 + φ / 2);\n    }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;\n    if (!n) return d3_geo_mercator;\n    function forward(λ, φ) {\n      if (F > 0) {\n        if (φ < -halfπ + ε) φ = -halfπ + ε;\n      } else {\n        if (φ > halfπ - ε) φ = halfπ - ε;\n      }\n      var ρ = F / Math.pow(t(φ), n);\n      return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y);\n      return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - halfπ ];\n    };\n    return forward;\n  }\n  (d3.geo.conicConformal = function() {\n    return d3_geo_conic(d3_geo_conicConformal);\n  }).raw = d3_geo_conicConformal;\n  function d3_geo_conicEquidistant(φ0, φ1) {\n    var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;\n    if (abs(n) < ε) return d3_geo_equirectangular;\n    function forward(λ, φ) {\n      var ρ = G - φ;\n      return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = G - y;\n      return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ];\n    };\n    return forward;\n  }\n  (d3.geo.conicEquidistant = function() {\n    return d3_geo_conic(d3_geo_conicEquidistant);\n  }).raw = d3_geo_conicEquidistant;\n  var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {\n    return 1 / cosλcosφ;\n  }, Math.atan);\n  (d3.geo.gnomonic = function() {\n    return d3_geo_projection(d3_geo_gnomonic);\n  }).raw = d3_geo_gnomonic;\n  function d3_geo_mercator(λ, φ) {\n    return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];\n  }\n  d3_geo_mercator.invert = function(x, y) {\n    return [ x, 2 * Math.atan(Math.exp(y)) - halfπ ];\n  };\n  function d3_geo_mercatorProjection(project) {\n    var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;\n    m.scale = function() {\n      var v = scale.apply(m, arguments);\n      return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n    };\n    m.translate = function() {\n      var v = translate.apply(m, arguments);\n      return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n    };\n    m.clipExtent = function(_) {\n      var v = clipExtent.apply(m, arguments);\n      if (v === m) {\n        if (clipAuto = _ == null) {\n          var k = π * scale(), t = translate();\n          clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);\n        }\n      } else if (clipAuto) {\n        v = null;\n      }\n      return v;\n    };\n    return m.clipExtent(null);\n  }\n  (d3.geo.mercator = function() {\n    return d3_geo_mercatorProjection(d3_geo_mercator);\n  }).raw = d3_geo_mercator;\n  var d3_geo_orthographic = d3_geo_azimuthal(function() {\n    return 1;\n  }, Math.asin);\n  (d3.geo.orthographic = function() {\n    return d3_geo_projection(d3_geo_orthographic);\n  }).raw = d3_geo_orthographic;\n  var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {\n    return 1 / (1 + cosλcosφ);\n  }, function(ρ) {\n    return 2 * Math.atan(ρ);\n  });\n  (d3.geo.stereographic = function() {\n    return d3_geo_projection(d3_geo_stereographic);\n  }).raw = d3_geo_stereographic;\n  function d3_geo_transverseMercator(λ, φ) {\n    return [ Math.log(Math.tan(π / 4 + φ / 2)), -λ ];\n  }\n  d3_geo_transverseMercator.invert = function(x, y) {\n    return [ -y, 2 * Math.atan(Math.exp(x)) - halfπ ];\n  };\n  (d3.geo.transverseMercator = function() {\n    var projection = d3_geo_mercatorProjection(d3_geo_transverseMercator), center = projection.center, rotate = projection.rotate;\n    projection.center = function(_) {\n      return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]);\n    };\n    projection.rotate = function(_) {\n      return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), \n      [ _[0], _[1], _[2] - 90 ]);\n    };\n    return rotate([ 0, 0, 90 ]);\n  }).raw = d3_geo_transverseMercator;\n  d3.geom = {};\n  function d3_geom_pointX(d) {\n    return d[0];\n  }\n  function d3_geom_pointY(d) {\n    return d[1];\n  }\n  d3.geom.hull = function(vertices) {\n    var x = d3_geom_pointX, y = d3_geom_pointY;\n    if (arguments.length) return hull(vertices);\n    function hull(data) {\n      if (data.length < 3) return [];\n      var fx = d3_functor(x), fy = d3_functor(y), i, n = data.length, points = [], flippedPoints = [];\n      for (i = 0; i < n; i++) {\n        points.push([ +fx.call(this, data[i], i), +fy.call(this, data[i], i), i ]);\n      }\n      points.sort(d3_geom_hullOrder);\n      for (i = 0; i < n; i++) flippedPoints.push([ points[i][0], -points[i][1] ]);\n      var upper = d3_geom_hullUpper(points), lower = d3_geom_hullUpper(flippedPoints);\n      var skipLeft = lower[0] === upper[0], skipRight = lower[lower.length - 1] === upper[upper.length - 1], polygon = [];\n      for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]);\n      for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]);\n      return polygon;\n    }\n    hull.x = function(_) {\n      return arguments.length ? (x = _, hull) : x;\n    };\n    hull.y = function(_) {\n      return arguments.length ? (y = _, hull) : y;\n    };\n    return hull;\n  };\n  function d3_geom_hullUpper(points) {\n    var n = points.length, hull = [ 0, 1 ], hs = 2;\n    for (var i = 2; i < n; i++) {\n      while (hs > 1 && d3_cross2d(points[hull[hs - 2]], points[hull[hs - 1]], points[i]) <= 0) --hs;\n      hull[hs++] = i;\n    }\n    return hull.slice(0, hs);\n  }\n  function d3_geom_hullOrder(a, b) {\n    return a[0] - b[0] || a[1] - b[1];\n  }\n  d3.geom.polygon = function(coordinates) {\n    d3_subclass(coordinates, d3_geom_polygonPrototype);\n    return coordinates;\n  };\n  var d3_geom_polygonPrototype = d3.geom.polygon.prototype = [];\n  d3_geom_polygonPrototype.area = function() {\n    var i = -1, n = this.length, a, b = this[n - 1], area = 0;\n    while (++i < n) {\n      a = b;\n      b = this[i];\n      area += a[1] * b[0] - a[0] * b[1];\n    }\n    return area * .5;\n  };\n  d3_geom_polygonPrototype.centroid = function(k) {\n    var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c;\n    if (!arguments.length) k = -1 / (6 * this.area());\n    while (++i < n) {\n      a = b;\n      b = this[i];\n      c = a[0] * b[1] - b[0] * a[1];\n      x += (a[0] + b[0]) * c;\n      y += (a[1] + b[1]) * c;\n    }\n    return [ x * k, y * k ];\n  };\n  d3_geom_polygonPrototype.clip = function(subject) {\n    var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d;\n    while (++i < n) {\n      input = subject.slice();\n      subject.length = 0;\n      b = this[i];\n      c = input[(m = input.length - closed) - 1];\n      j = -1;\n      while (++j < m) {\n        d = input[j];\n        if (d3_geom_polygonInside(d, a, b)) {\n          if (!d3_geom_polygonInside(c, a, b)) {\n            subject.push(d3_geom_polygonIntersect(c, d, a, b));\n          }\n          subject.push(d);\n        } else if (d3_geom_polygonInside(c, a, b)) {\n          subject.push(d3_geom_polygonIntersect(c, d, a, b));\n        }\n        c = d;\n      }\n      if (closed) subject.push(subject[0]);\n      a = b;\n    }\n    return subject;\n  };\n  function d3_geom_polygonInside(p, a, b) {\n    return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);\n  }\n  function d3_geom_polygonIntersect(c, d, a, b) {\n    var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);\n    return [ x1 + ua * x21, y1 + ua * y21 ];\n  }\n  function d3_geom_polygonClosed(coordinates) {\n    var a = coordinates[0], b = coordinates[coordinates.length - 1];\n    return !(a[0] - b[0] || a[1] - b[1]);\n  }\n  var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = [];\n  function d3_geom_voronoiBeach() {\n    d3_geom_voronoiRedBlackNode(this);\n    this.edge = this.site = this.circle = null;\n  }\n  function d3_geom_voronoiCreateBeach(site) {\n    var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach();\n    beach.site = site;\n    return beach;\n  }\n  function d3_geom_voronoiDetachBeach(beach) {\n    d3_geom_voronoiDetachCircle(beach);\n    d3_geom_voronoiBeaches.remove(beach);\n    d3_geom_voronoiBeachPool.push(beach);\n    d3_geom_voronoiRedBlackNode(beach);\n  }\n  function d3_geom_voronoiRemoveBeach(beach) {\n    var circle = beach.circle, x = circle.x, y = circle.cy, vertex = {\n      x: x,\n      y: y\n    }, previous = beach.P, next = beach.N, disappearing = [ beach ];\n    d3_geom_voronoiDetachBeach(beach);\n    var lArc = previous;\n    while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {\n      previous = lArc.P;\n      disappearing.unshift(lArc);\n      d3_geom_voronoiDetachBeach(lArc);\n      lArc = previous;\n    }\n    disappearing.unshift(lArc);\n    d3_geom_voronoiDetachCircle(lArc);\n    var rArc = next;\n    while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {\n      next = rArc.N;\n      disappearing.push(rArc);\n      d3_geom_voronoiDetachBeach(rArc);\n      rArc = next;\n    }\n    disappearing.push(rArc);\n    d3_geom_voronoiDetachCircle(rArc);\n    var nArcs = disappearing.length, iArc;\n    for (iArc = 1; iArc < nArcs; ++iArc) {\n      rArc = disappearing[iArc];\n      lArc = disappearing[iArc - 1];\n      d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n    }\n    lArc = disappearing[0];\n    rArc = disappearing[nArcs - 1];\n    rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex);\n    d3_geom_voronoiAttachCircle(lArc);\n    d3_geom_voronoiAttachCircle(rArc);\n  }\n  function d3_geom_voronoiAddBeach(site) {\n    var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;\n    while (node) {\n      dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;\n      if (dxl > ε) node = node.L; else {\n        dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix);\n        if (dxr > ε) {\n          if (!node.R) {\n            lArc = node;\n            break;\n          }\n          node = node.R;\n        } else {\n          if (dxl > -ε) {\n            lArc = node.P;\n            rArc = node;\n          } else if (dxr > -ε) {\n            lArc = node;\n            rArc = node.N;\n          } else {\n            lArc = rArc = node;\n          }\n          break;\n        }\n      }\n    }\n    var newArc = d3_geom_voronoiCreateBeach(site);\n    d3_geom_voronoiBeaches.insert(lArc, newArc);\n    if (!lArc && !rArc) return;\n    if (lArc === rArc) {\n      d3_geom_voronoiDetachCircle(lArc);\n      rArc = d3_geom_voronoiCreateBeach(lArc.site);\n      d3_geom_voronoiBeaches.insert(newArc, rArc);\n      newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n      d3_geom_voronoiAttachCircle(lArc);\n      d3_geom_voronoiAttachCircle(rArc);\n      return;\n    }\n    if (!rArc) {\n      newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n      return;\n    }\n    d3_geom_voronoiDetachCircle(lArc);\n    d3_geom_voronoiDetachCircle(rArc);\n    var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = {\n      x: (cy * hb - by * hc) / d + ax,\n      y: (bx * hc - cx * hb) / d + ay\n    };\n    d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex);\n    newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex);\n    rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex);\n    d3_geom_voronoiAttachCircle(lArc);\n    d3_geom_voronoiAttachCircle(rArc);\n  }\n  function d3_geom_voronoiLeftBreakPoint(arc, directrix) {\n    var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix;\n    if (!pby2) return rfocx;\n    var lArc = arc.P;\n    if (!lArc) return -Infinity;\n    site = lArc.site;\n    var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix;\n    if (!plby2) return lfocx;\n    var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2;\n    if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n    return (rfocx + lfocx) / 2;\n  }\n  function d3_geom_voronoiRightBreakPoint(arc, directrix) {\n    var rArc = arc.N;\n    if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix);\n    var site = arc.site;\n    return site.y === directrix ? site.x : Infinity;\n  }\n  function d3_geom_voronoiCell(site) {\n    this.site = site;\n    this.edges = [];\n  }\n  d3_geom_voronoiCell.prototype.prepare = function() {\n    var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge;\n    while (iHalfEdge--) {\n      edge = halfEdges[iHalfEdge].edge;\n      if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1);\n    }\n    halfEdges.sort(d3_geom_voronoiHalfEdgeOrder);\n    return halfEdges.length;\n  };\n  function d3_geom_voronoiCloseCells(extent) {\n    var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;\n    while (iCell--) {\n      cell = cells[iCell];\n      if (!cell || !cell.prepare()) continue;\n      halfEdges = cell.edges;\n      nHalfEdges = halfEdges.length;\n      iHalfEdge = 0;\n      while (iHalfEdge < nHalfEdges) {\n        end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y;\n        start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y;\n        if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) {\n          halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? {\n            x: x0,\n            y: abs(x2 - x0) < ε ? y2 : y1\n          } : abs(y3 - y1) < ε && x1 - x3 > ε ? {\n            x: abs(y2 - y1) < ε ? x2 : x1,\n            y: y1\n          } : abs(x3 - x1) < ε && y3 - y0 > ε ? {\n            x: x1,\n            y: abs(x2 - x1) < ε ? y2 : y0\n          } : abs(y3 - y0) < ε && x3 - x0 > ε ? {\n            x: abs(y2 - y0) < ε ? x2 : x0,\n            y: y0\n          } : null), cell.site, null));\n          ++nHalfEdges;\n        }\n      }\n    }\n  }\n  function d3_geom_voronoiHalfEdgeOrder(a, b) {\n    return b.angle - a.angle;\n  }\n  function d3_geom_voronoiCircle() {\n    d3_geom_voronoiRedBlackNode(this);\n    this.x = this.y = this.arc = this.site = this.cy = null;\n  }\n  function d3_geom_voronoiAttachCircle(arc) {\n    var lArc = arc.P, rArc = arc.N;\n    if (!lArc || !rArc) return;\n    var lSite = lArc.site, cSite = arc.site, rSite = rArc.site;\n    if (lSite === rSite) return;\n    var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by;\n    var d = 2 * (ax * cy - ay * cx);\n    if (d >= -ε2) return;\n    var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by;\n    var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle();\n    circle.arc = arc;\n    circle.site = cSite;\n    circle.x = x + bx;\n    circle.y = cy + Math.sqrt(x * x + y * y);\n    circle.cy = cy;\n    arc.circle = circle;\n    var before = null, node = d3_geom_voronoiCircles._;\n    while (node) {\n      if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {\n        if (node.L) node = node.L; else {\n          before = node.P;\n          break;\n        }\n      } else {\n        if (node.R) node = node.R; else {\n          before = node;\n          break;\n        }\n      }\n    }\n    d3_geom_voronoiCircles.insert(before, circle);\n    if (!before) d3_geom_voronoiFirstCircle = circle;\n  }\n  function d3_geom_voronoiDetachCircle(arc) {\n    var circle = arc.circle;\n    if (circle) {\n      if (!circle.P) d3_geom_voronoiFirstCircle = circle.N;\n      d3_geom_voronoiCircles.remove(circle);\n      d3_geom_voronoiCirclePool.push(circle);\n      d3_geom_voronoiRedBlackNode(circle);\n      arc.circle = null;\n    }\n  }\n  function d3_geom_voronoiClipEdges(extent) {\n    var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e;\n    while (i--) {\n      e = edges[i];\n      if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) {\n        e.a = e.b = null;\n        edges.splice(i, 1);\n      }\n    }\n  }\n  function d3_geom_voronoiConnectEdge(edge, extent) {\n    var vb = edge.b;\n    if (vb) return true;\n    var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;\n    if (ry === ly) {\n      if (fx < x0 || fx >= x1) return;\n      if (lx > rx) {\n        if (!va) va = {\n          x: fx,\n          y: y0\n        }; else if (va.y >= y1) return;\n        vb = {\n          x: fx,\n          y: y1\n        };\n      } else {\n        if (!va) va = {\n          x: fx,\n          y: y1\n        }; else if (va.y < y0) return;\n        vb = {\n          x: fx,\n          y: y0\n        };\n      }\n    } else {\n      fm = (lx - rx) / (ry - ly);\n      fb = fy - fm * fx;\n      if (fm < -1 || fm > 1) {\n        if (lx > rx) {\n          if (!va) va = {\n            x: (y0 - fb) / fm,\n            y: y0\n          }; else if (va.y >= y1) return;\n          vb = {\n            x: (y1 - fb) / fm,\n            y: y1\n          };\n        } else {\n          if (!va) va = {\n            x: (y1 - fb) / fm,\n            y: y1\n          }; else if (va.y < y0) return;\n          vb = {\n            x: (y0 - fb) / fm,\n            y: y0\n          };\n        }\n      } else {\n        if (ly < ry) {\n          if (!va) va = {\n            x: x0,\n            y: fm * x0 + fb\n          }; else if (va.x >= x1) return;\n          vb = {\n            x: x1,\n            y: fm * x1 + fb\n          };\n        } else {\n          if (!va) va = {\n            x: x1,\n            y: fm * x1 + fb\n          }; else if (va.x < x0) return;\n          vb = {\n            x: x0,\n            y: fm * x0 + fb\n          };\n        }\n      }\n    }\n    edge.a = va;\n    edge.b = vb;\n    return true;\n  }\n  function d3_geom_voronoiEdge(lSite, rSite) {\n    this.l = lSite;\n    this.r = rSite;\n    this.a = this.b = null;\n  }\n  function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) {\n    var edge = new d3_geom_voronoiEdge(lSite, rSite);\n    d3_geom_voronoiEdges.push(edge);\n    if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va);\n    if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb);\n    d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite));\n    d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite));\n    return edge;\n  }\n  function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) {\n    var edge = new d3_geom_voronoiEdge(lSite, null);\n    edge.a = va;\n    edge.b = vb;\n    d3_geom_voronoiEdges.push(edge);\n    return edge;\n  }\n  function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) {\n    if (!edge.a && !edge.b) {\n      edge.a = vertex;\n      edge.l = lSite;\n      edge.r = rSite;\n    } else if (edge.l === rSite) {\n      edge.b = vertex;\n    } else {\n      edge.a = vertex;\n    }\n  }\n  function d3_geom_voronoiHalfEdge(edge, lSite, rSite) {\n    var va = edge.a, vb = edge.b;\n    this.edge = edge;\n    this.site = lSite;\n    this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y);\n  }\n  d3_geom_voronoiHalfEdge.prototype = {\n    start: function() {\n      return this.edge.l === this.site ? this.edge.a : this.edge.b;\n    },\n    end: function() {\n      return this.edge.l === this.site ? this.edge.b : this.edge.a;\n    }\n  };\n  function d3_geom_voronoiRedBlackTree() {\n    this._ = null;\n  }\n  function d3_geom_voronoiRedBlackNode(node) {\n    node.U = node.C = node.L = node.R = node.P = node.N = null;\n  }\n  d3_geom_voronoiRedBlackTree.prototype = {\n    insert: function(after, node) {\n      var parent, grandpa, uncle;\n      if (after) {\n        node.P = after;\n        node.N = after.N;\n        if (after.N) after.N.P = node;\n        after.N = node;\n        if (after.R) {\n          after = after.R;\n          while (after.L) after = after.L;\n          after.L = node;\n        } else {\n          after.R = node;\n        }\n        parent = after;\n      } else if (this._) {\n        after = d3_geom_voronoiRedBlackFirst(this._);\n        node.P = null;\n        node.N = after;\n        after.P = after.L = node;\n        parent = after;\n      } else {\n        node.P = node.N = null;\n        this._ = node;\n        parent = null;\n      }\n      node.L = node.R = null;\n      node.U = parent;\n      node.C = true;\n      after = node;\n      while (parent && parent.C) {\n        grandpa = parent.U;\n        if (parent === grandpa.L) {\n          uncle = grandpa.R;\n          if (uncle && uncle.C) {\n            parent.C = uncle.C = false;\n            grandpa.C = true;\n            after = grandpa;\n          } else {\n            if (after === parent.R) {\n              d3_geom_voronoiRedBlackRotateLeft(this, parent);\n              after = parent;\n              parent = after.U;\n            }\n            parent.C = false;\n            grandpa.C = true;\n            d3_geom_voronoiRedBlackRotateRight(this, grandpa);\n          }\n        } else {\n          uncle = grandpa.L;\n          if (uncle && uncle.C) {\n            parent.C = uncle.C = false;\n            grandpa.C = true;\n            after = grandpa;\n          } else {\n            if (after === parent.L) {\n              d3_geom_voronoiRedBlackRotateRight(this, parent);\n              after = parent;\n              parent = after.U;\n            }\n            parent.C = false;\n            grandpa.C = true;\n            d3_geom_voronoiRedBlackRotateLeft(this, grandpa);\n          }\n        }\n        parent = after.U;\n      }\n      this._.C = false;\n    },\n    remove: function(node) {\n      if (node.N) node.N.P = node.P;\n      if (node.P) node.P.N = node.N;\n      node.N = node.P = null;\n      var parent = node.U, sibling, left = node.L, right = node.R, next, red;\n      if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right);\n      if (parent) {\n        if (parent.L === node) parent.L = next; else parent.R = next;\n      } else {\n        this._ = next;\n      }\n      if (left && right) {\n        red = next.C;\n        next.C = node.C;\n        next.L = left;\n        left.U = next;\n        if (next !== right) {\n          parent = next.U;\n          next.U = node.U;\n          node = next.R;\n          parent.L = node;\n          next.R = right;\n          right.U = next;\n        } else {\n          next.U = parent;\n          parent = next;\n          node = next.R;\n        }\n      } else {\n        red = node.C;\n        node = next;\n      }\n      if (node) node.U = parent;\n      if (red) return;\n      if (node && node.C) {\n        node.C = false;\n        return;\n      }\n      do {\n        if (node === this._) break;\n        if (node === parent.L) {\n          sibling = parent.R;\n          if (sibling.C) {\n            sibling.C = false;\n            parent.C = true;\n            d3_geom_voronoiRedBlackRotateLeft(this, parent);\n            sibling = parent.R;\n          }\n          if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n            if (!sibling.R || !sibling.R.C) {\n              sibling.L.C = false;\n              sibling.C = true;\n              d3_geom_voronoiRedBlackRotateRight(this, sibling);\n              sibling = parent.R;\n            }\n            sibling.C = parent.C;\n            parent.C = sibling.R.C = false;\n            d3_geom_voronoiRedBlackRotateLeft(this, parent);\n            node = this._;\n            break;\n          }\n        } else {\n          sibling = parent.L;\n          if (sibling.C) {\n            sibling.C = false;\n            parent.C = true;\n            d3_geom_voronoiRedBlackRotateRight(this, parent);\n            sibling = parent.L;\n          }\n          if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n            if (!sibling.L || !sibling.L.C) {\n              sibling.R.C = false;\n              sibling.C = true;\n              d3_geom_voronoiRedBlackRotateLeft(this, sibling);\n              sibling = parent.L;\n            }\n            sibling.C = parent.C;\n            parent.C = sibling.L.C = false;\n            d3_geom_voronoiRedBlackRotateRight(this, parent);\n            node = this._;\n            break;\n          }\n        }\n        sibling.C = true;\n        node = parent;\n        parent = parent.U;\n      } while (!node.C);\n      if (node) node.C = false;\n    }\n  };\n  function d3_geom_voronoiRedBlackRotateLeft(tree, node) {\n    var p = node, q = node.R, parent = p.U;\n    if (parent) {\n      if (parent.L === p) parent.L = q; else parent.R = q;\n    } else {\n      tree._ = q;\n    }\n    q.U = parent;\n    p.U = q;\n    p.R = q.L;\n    if (p.R) p.R.U = p;\n    q.L = p;\n  }\n  function d3_geom_voronoiRedBlackRotateRight(tree, node) {\n    var p = node, q = node.L, parent = p.U;\n    if (parent) {\n      if (parent.L === p) parent.L = q; else parent.R = q;\n    } else {\n      tree._ = q;\n    }\n    q.U = parent;\n    p.U = q;\n    p.L = q.R;\n    if (p.L) p.L.U = p;\n    q.R = p;\n  }\n  function d3_geom_voronoiRedBlackFirst(node) {\n    while (node.L) node = node.L;\n    return node;\n  }\n  function d3_geom_voronoi(sites, bbox) {\n    var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle;\n    d3_geom_voronoiEdges = [];\n    d3_geom_voronoiCells = new Array(sites.length);\n    d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree();\n    d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree();\n    while (true) {\n      circle = d3_geom_voronoiFirstCircle;\n      if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) {\n        if (site.x !== x0 || site.y !== y0) {\n          d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site);\n          d3_geom_voronoiAddBeach(site);\n          x0 = site.x, y0 = site.y;\n        }\n        site = sites.pop();\n      } else if (circle) {\n        d3_geom_voronoiRemoveBeach(circle.arc);\n      } else {\n        break;\n      }\n    }\n    if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox);\n    var diagram = {\n      cells: d3_geom_voronoiCells,\n      edges: d3_geom_voronoiEdges\n    };\n    d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null;\n    return diagram;\n  }\n  function d3_geom_voronoiVertexOrder(a, b) {\n    return b.y - a.y || b.x - a.x;\n  }\n  d3.geom.voronoi = function(points) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;\n    if (points) return voronoi(points);\n    function voronoi(data) {\n      var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];\n      d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) {\n        var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) {\n          var s = e.start();\n          return [ s.x, s.y ];\n        }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : [];\n        polygon.point = data[i];\n      });\n      return polygons;\n    }\n    function sites(data) {\n      return data.map(function(d, i) {\n        return {\n          x: Math.round(fx(d, i) / ε) * ε,\n          y: Math.round(fy(d, i) / ε) * ε,\n          i: i\n        };\n      });\n    }\n    voronoi.links = function(data) {\n      return d3_geom_voronoi(sites(data)).edges.filter(function(edge) {\n        return edge.l && edge.r;\n      }).map(function(edge) {\n        return {\n          source: data[edge.l.i],\n          target: data[edge.r.i]\n        };\n      });\n    };\n    voronoi.triangles = function(data) {\n      var triangles = [];\n      d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) {\n        var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l;\n        while (++j < m) {\n          e0 = e1;\n          s0 = s1;\n          e1 = edges[j].edge;\n          s1 = e1.l === site ? e1.r : e1.l;\n          if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) {\n            triangles.push([ data[i], data[s0.i], data[s1.i] ]);\n          }\n        }\n      });\n      return triangles;\n    };\n    voronoi.x = function(_) {\n      return arguments.length ? (fx = d3_functor(x = _), voronoi) : x;\n    };\n    voronoi.y = function(_) {\n      return arguments.length ? (fy = d3_functor(y = _), voronoi) : y;\n    };\n    voronoi.clipExtent = function(_) {\n      if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent;\n      clipExtent = _ == null ? d3_geom_voronoiClipExtent : _;\n      return voronoi;\n    };\n    voronoi.size = function(_) {\n      if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1];\n      return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]);\n    };\n    return voronoi;\n  };\n  var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ];\n  function d3_geom_voronoiTriangleArea(a, b, c) {\n    return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y);\n  }\n  d3.geom.delaunay = function(vertices) {\n    return d3.geom.voronoi().triangles(vertices);\n  };\n  d3.geom.quadtree = function(points, x1, y1, x2, y2) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, compat;\n    if (compat = arguments.length) {\n      x = d3_geom_quadtreeCompatX;\n      y = d3_geom_quadtreeCompatY;\n      if (compat === 3) {\n        y2 = y1;\n        x2 = x1;\n        y1 = x1 = 0;\n      }\n      return quadtree(points);\n    }\n    function quadtree(data) {\n      var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;\n      if (x1 != null) {\n        x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;\n      } else {\n        x2_ = y2_ = -(x1_ = y1_ = Infinity);\n        xs = [], ys = [];\n        n = data.length;\n        if (compat) for (i = 0; i < n; ++i) {\n          d = data[i];\n          if (d.x < x1_) x1_ = d.x;\n          if (d.y < y1_) y1_ = d.y;\n          if (d.x > x2_) x2_ = d.x;\n          if (d.y > y2_) y2_ = d.y;\n          xs.push(d.x);\n          ys.push(d.y);\n        } else for (i = 0; i < n; ++i) {\n          var x_ = +fx(d = data[i], i), y_ = +fy(d, i);\n          if (x_ < x1_) x1_ = x_;\n          if (y_ < y1_) y1_ = y_;\n          if (x_ > x2_) x2_ = x_;\n          if (y_ > y2_) y2_ = y_;\n          xs.push(x_);\n          ys.push(y_);\n        }\n      }\n      var dx = x2_ - x1_, dy = y2_ - y1_;\n      if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;\n      function insert(n, d, x, y, x1, y1, x2, y2) {\n        if (isNaN(x) || isNaN(y)) return;\n        if (n.leaf) {\n          var nx = n.x, ny = n.y;\n          if (nx != null) {\n            if (abs(nx - x) + abs(ny - y) < .01) {\n              insertChild(n, d, x, y, x1, y1, x2, y2);\n            } else {\n              var nPoint = n.point;\n              n.x = n.y = n.point = null;\n              insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);\n              insertChild(n, d, x, y, x1, y1, x2, y2);\n            }\n          } else {\n            n.x = x, n.y = y, n.point = d;\n          }\n        } else {\n          insertChild(n, d, x, y, x1, y1, x2, y2);\n        }\n      }\n      function insertChild(n, d, x, y, x1, y1, x2, y2) {\n        var xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym, i = below << 1 | right;\n        n.leaf = false;\n        n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());\n        if (right) x1 = xm; else x2 = xm;\n        if (below) y1 = ym; else y2 = ym;\n        insert(n, d, x, y, x1, y1, x2, y2);\n      }\n      var root = d3_geom_quadtreeNode();\n      root.add = function(d) {\n        insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);\n      };\n      root.visit = function(f) {\n        d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);\n      };\n      root.find = function(point) {\n        return d3_geom_quadtreeFind(root, point[0], point[1], x1_, y1_, x2_, y2_);\n      };\n      i = -1;\n      if (x1 == null) {\n        while (++i < n) {\n          insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);\n        }\n        --i;\n      } else data.forEach(root.add);\n      xs = ys = data = d = null;\n      return root;\n    }\n    quadtree.x = function(_) {\n      return arguments.length ? (x = _, quadtree) : x;\n    };\n    quadtree.y = function(_) {\n      return arguments.length ? (y = _, quadtree) : y;\n    };\n    quadtree.extent = function(_) {\n      if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ];\n      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], \n      y2 = +_[1][1];\n      return quadtree;\n    };\n    quadtree.size = function(_) {\n      if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ];\n      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1];\n      return quadtree;\n    };\n    return quadtree;\n  };\n  function d3_geom_quadtreeCompatX(d) {\n    return d.x;\n  }\n  function d3_geom_quadtreeCompatY(d) {\n    return d.y;\n  }\n  function d3_geom_quadtreeNode() {\n    return {\n      leaf: true,\n      nodes: [],\n      point: null,\n      x: null,\n      y: null\n    };\n  }\n  function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {\n    if (!f(node, x1, y1, x2, y2)) {\n      var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;\n      if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);\n      if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);\n      if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);\n      if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);\n    }\n  }\n  function d3_geom_quadtreeFind(root, x, y, x0, y0, x3, y3) {\n    var minDistance2 = Infinity, closestPoint;\n    (function find(node, x1, y1, x2, y2) {\n      if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return;\n      if (point = node.point) {\n        var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy;\n        if (distance2 < minDistance2) {\n          var distance = Math.sqrt(minDistance2 = distance2);\n          x0 = x - distance, y0 = y - distance;\n          x3 = x + distance, y3 = y + distance;\n          closestPoint = point;\n        }\n      }\n      var children = node.nodes, xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym;\n      for (var i = below << 1 | right, j = i + 4; i < j; ++i) {\n        if (node = children[i & 3]) switch (i & 3) {\n         case 0:\n          find(node, x1, y1, xm, ym);\n          break;\n\n         case 1:\n          find(node, xm, y1, x2, ym);\n          break;\n\n         case 2:\n          find(node, x1, ym, xm, y2);\n          break;\n\n         case 3:\n          find(node, xm, ym, x2, y2);\n          break;\n        }\n      }\n    })(root, x0, y0, x3, y3);\n    return closestPoint;\n  }\n  d3.interpolateRgb = d3_interpolateRgb;\n  function d3_interpolateRgb(a, b) {\n    a = d3.rgb(a);\n    b = d3.rgb(b);\n    var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;\n    return function(t) {\n      return \"#\" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));\n    };\n  }\n  d3.interpolateObject = d3_interpolateObject;\n  function d3_interpolateObject(a, b) {\n    var i = {}, c = {}, k;\n    for (k in a) {\n      if (k in b) {\n        i[k] = d3_interpolate(a[k], b[k]);\n      } else {\n        c[k] = a[k];\n      }\n    }\n    for (k in b) {\n      if (!(k in a)) {\n        c[k] = b[k];\n      }\n    }\n    return function(t) {\n      for (k in i) c[k] = i[k](t);\n      return c;\n    };\n  }\n  d3.interpolateNumber = d3_interpolateNumber;\n  function d3_interpolateNumber(a, b) {\n    a = +a, b = +b;\n    return function(t) {\n      return a * (1 - t) + b * t;\n    };\n  }\n  d3.interpolateString = d3_interpolateString;\n  function d3_interpolateString(a, b) {\n    var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];\n    a = a + \"\", b = b + \"\";\n    while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {\n      if ((bs = bm.index) > bi) {\n        bs = b.slice(bi, bs);\n        if (s[i]) s[i] += bs; else s[++i] = bs;\n      }\n      if ((am = am[0]) === (bm = bm[0])) {\n        if (s[i]) s[i] += bm; else s[++i] = bm;\n      } else {\n        s[++i] = null;\n        q.push({\n          i: i,\n          x: d3_interpolateNumber(am, bm)\n        });\n      }\n      bi = d3_interpolate_numberB.lastIndex;\n    }\n    if (bi < b.length) {\n      bs = b.slice(bi);\n      if (s[i]) s[i] += bs; else s[++i] = bs;\n    }\n    return s.length < 2 ? q[0] ? (b = q[0].x, function(t) {\n      return b(t) + \"\";\n    }) : function() {\n      return b;\n    } : (b = q.length, function(t) {\n      for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    });\n  }\n  var d3_interpolate_numberA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, d3_interpolate_numberB = new RegExp(d3_interpolate_numberA.source, \"g\");\n  d3.interpolate = d3_interpolate;\n  function d3_interpolate(a, b) {\n    var i = d3.interpolators.length, f;\n    while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;\n    return f;\n  }\n  d3.interpolators = [ function(a, b) {\n    var t = typeof b;\n    return (t === \"string\" ? d3_rgb_names.has(b.toLowerCase()) || /^(#|rgb\\(|hsl\\()/i.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_color ? d3_interpolateRgb : Array.isArray(b) ? d3_interpolateArray : t === \"object\" && isNaN(b) ? d3_interpolateObject : d3_interpolateNumber)(a, b);\n  } ];\n  d3.interpolateArray = d3_interpolateArray;\n  function d3_interpolateArray(a, b) {\n    var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;\n    for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));\n    for (;i < na; ++i) c[i] = a[i];\n    for (;i < nb; ++i) c[i] = b[i];\n    return function(t) {\n      for (i = 0; i < n0; ++i) c[i] = x[i](t);\n      return c;\n    };\n  }\n  var d3_ease_default = function() {\n    return d3_identity;\n  };\n  var d3_ease = d3.map({\n    linear: d3_ease_default,\n    poly: d3_ease_poly,\n    quad: function() {\n      return d3_ease_quad;\n    },\n    cubic: function() {\n      return d3_ease_cubic;\n    },\n    sin: function() {\n      return d3_ease_sin;\n    },\n    exp: function() {\n      return d3_ease_exp;\n    },\n    circle: function() {\n      return d3_ease_circle;\n    },\n    elastic: d3_ease_elastic,\n    back: d3_ease_back,\n    bounce: function() {\n      return d3_ease_bounce;\n    }\n  });\n  var d3_ease_mode = d3.map({\n    \"in\": d3_identity,\n    out: d3_ease_reverse,\n    \"in-out\": d3_ease_reflect,\n    \"out-in\": function(f) {\n      return d3_ease_reflect(d3_ease_reverse(f));\n    }\n  });\n  d3.ease = function(name) {\n    var i = name.indexOf(\"-\"), t = i >= 0 ? name.slice(0, i) : name, m = i >= 0 ? name.slice(i + 1) : \"in\";\n    t = d3_ease.get(t) || d3_ease_default;\n    m = d3_ease_mode.get(m) || d3_identity;\n    return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));\n  };\n  function d3_ease_clamp(f) {\n    return function(t) {\n      return t <= 0 ? 0 : t >= 1 ? 1 : f(t);\n    };\n  }\n  function d3_ease_reverse(f) {\n    return function(t) {\n      return 1 - f(1 - t);\n    };\n  }\n  function d3_ease_reflect(f) {\n    return function(t) {\n      return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));\n    };\n  }\n  function d3_ease_quad(t) {\n    return t * t;\n  }\n  function d3_ease_cubic(t) {\n    return t * t * t;\n  }\n  function d3_ease_cubicInOut(t) {\n    if (t <= 0) return 0;\n    if (t >= 1) return 1;\n    var t2 = t * t, t3 = t2 * t;\n    return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);\n  }\n  function d3_ease_poly(e) {\n    return function(t) {\n      return Math.pow(t, e);\n    };\n  }\n  function d3_ease_sin(t) {\n    return 1 - Math.cos(t * halfπ);\n  }\n  function d3_ease_exp(t) {\n    return Math.pow(2, 10 * (t - 1));\n  }\n  function d3_ease_circle(t) {\n    return 1 - Math.sqrt(1 - t * t);\n  }\n  function d3_ease_elastic(a, p) {\n    var s;\n    if (arguments.length < 2) p = .45;\n    if (arguments.length) s = p / τ * Math.asin(1 / a); else a = 1, s = p / 4;\n    return function(t) {\n      return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);\n    };\n  }\n  function d3_ease_back(s) {\n    if (!s) s = 1.70158;\n    return function(t) {\n      return t * t * ((s + 1) * t - s);\n    };\n  }\n  function d3_ease_bounce(t) {\n    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;\n  }\n  d3.interpolateHcl = d3_interpolateHcl;\n  function d3_interpolateHcl(a, b) {\n    a = d3.hcl(a);\n    b = d3.hcl(b);\n    var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;\n    if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac;\n    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n    return function(t) {\n      return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + \"\";\n    };\n  }\n  d3.interpolateHsl = d3_interpolateHsl;\n  function d3_interpolateHsl(a, b) {\n    a = d3.hsl(a);\n    b = d3.hsl(b);\n    var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al;\n    if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as;\n    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n    return function(t) {\n      return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + \"\";\n    };\n  }\n  d3.interpolateLab = d3_interpolateLab;\n  function d3_interpolateLab(a, b) {\n    a = d3.lab(a);\n    b = d3.lab(b);\n    var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;\n    return function(t) {\n      return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + \"\";\n    };\n  }\n  d3.interpolateRound = d3_interpolateRound;\n  function d3_interpolateRound(a, b) {\n    b -= a;\n    return function(t) {\n      return Math.round(a + b * t);\n    };\n  }\n  d3.transform = function(string) {\n    var g = d3_document.createElementNS(d3.ns.prefix.svg, \"g\");\n    return (d3.transform = function(string) {\n      if (string != null) {\n        g.setAttribute(\"transform\", string);\n        var t = g.transform.baseVal.consolidate();\n      }\n      return new d3_transform(t ? t.matrix : d3_transformIdentity);\n    })(string);\n  };\n  function d3_transform(m) {\n    var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;\n    if (r0[0] * r1[1] < r1[0] * r0[1]) {\n      r0[0] *= -1;\n      r0[1] *= -1;\n      kx *= -1;\n      kz *= -1;\n    }\n    this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;\n    this.translate = [ m.e, m.f ];\n    this.scale = [ kx, ky ];\n    this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;\n  }\n  d3_transform.prototype.toString = function() {\n    return \"translate(\" + this.translate + \")rotate(\" + this.rotate + \")skewX(\" + this.skew + \")scale(\" + this.scale + \")\";\n  };\n  function d3_transformDot(a, b) {\n    return a[0] * b[0] + a[1] * b[1];\n  }\n  function d3_transformNormalize(a) {\n    var k = Math.sqrt(d3_transformDot(a, a));\n    if (k) {\n      a[0] /= k;\n      a[1] /= k;\n    }\n    return k;\n  }\n  function d3_transformCombine(a, b, k) {\n    a[0] += k * b[0];\n    a[1] += k * b[1];\n    return a;\n  }\n  var d3_transformIdentity = {\n    a: 1,\n    b: 0,\n    c: 0,\n    d: 1,\n    e: 0,\n    f: 0\n  };\n  d3.interpolateTransform = d3_interpolateTransform;\n  function d3_interpolateTransformPop(s) {\n    return s.length ? s.pop() + \",\" : \"\";\n  }\n  function d3_interpolateTranslate(ta, tb, s, q) {\n    if (ta[0] !== tb[0] || ta[1] !== tb[1]) {\n      var i = s.push(\"translate(\", null, \",\", null, \")\");\n      q.push({\n        i: i - 4,\n        x: d3_interpolateNumber(ta[0], tb[0])\n      }, {\n        i: i - 2,\n        x: d3_interpolateNumber(ta[1], tb[1])\n      });\n    } else if (tb[0] || tb[1]) {\n      s.push(\"translate(\" + tb + \")\");\n    }\n  }\n  function d3_interpolateRotate(ra, rb, s, q) {\n    if (ra !== rb) {\n      if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;\n      q.push({\n        i: s.push(d3_interpolateTransformPop(s) + \"rotate(\", null, \")\") - 2,\n        x: d3_interpolateNumber(ra, rb)\n      });\n    } else if (rb) {\n      s.push(d3_interpolateTransformPop(s) + \"rotate(\" + rb + \")\");\n    }\n  }\n  function d3_interpolateSkew(wa, wb, s, q) {\n    if (wa !== wb) {\n      q.push({\n        i: s.push(d3_interpolateTransformPop(s) + \"skewX(\", null, \")\") - 2,\n        x: d3_interpolateNumber(wa, wb)\n      });\n    } else if (wb) {\n      s.push(d3_interpolateTransformPop(s) + \"skewX(\" + wb + \")\");\n    }\n  }\n  function d3_interpolateScale(ka, kb, s, q) {\n    if (ka[0] !== kb[0] || ka[1] !== kb[1]) {\n      var i = s.push(d3_interpolateTransformPop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({\n        i: i - 4,\n        x: d3_interpolateNumber(ka[0], kb[0])\n      }, {\n        i: i - 2,\n        x: d3_interpolateNumber(ka[1], kb[1])\n      });\n    } else if (kb[0] !== 1 || kb[1] !== 1) {\n      s.push(d3_interpolateTransformPop(s) + \"scale(\" + kb + \")\");\n    }\n  }\n  function d3_interpolateTransform(a, b) {\n    var s = [], q = [];\n    a = d3.transform(a), b = d3.transform(b);\n    d3_interpolateTranslate(a.translate, b.translate, s, q);\n    d3_interpolateRotate(a.rotate, b.rotate, s, q);\n    d3_interpolateSkew(a.skew, b.skew, s, q);\n    d3_interpolateScale(a.scale, b.scale, s, q);\n    a = b = null;\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  }\n  function d3_uninterpolateNumber(a, b) {\n    b = (b -= a = +a) || 1 / b;\n    return function(x) {\n      return (x - a) / b;\n    };\n  }\n  function d3_uninterpolateClamp(a, b) {\n    b = (b -= a = +a) || 1 / b;\n    return function(x) {\n      return Math.max(0, Math.min(1, (x - a) / b));\n    };\n  }\n  d3.layout = {};\n  d3.layout.bundle = function() {\n    return function(links) {\n      var paths = [], i = -1, n = links.length;\n      while (++i < n) paths.push(d3_layout_bundlePath(links[i]));\n      return paths;\n    };\n  };\n  function d3_layout_bundlePath(link) {\n    var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];\n    while (start !== lca) {\n      start = start.parent;\n      points.push(start);\n    }\n    var k = points.length;\n    while (end !== lca) {\n      points.splice(k, 0, end);\n      end = end.parent;\n    }\n    return points;\n  }\n  function d3_layout_bundleAncestors(node) {\n    var ancestors = [], parent = node.parent;\n    while (parent != null) {\n      ancestors.push(node);\n      node = parent;\n      parent = parent.parent;\n    }\n    ancestors.push(node);\n    return ancestors;\n  }\n  function d3_layout_bundleLeastCommonAncestor(a, b) {\n    if (a === b) return a;\n    var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;\n    while (aNode === bNode) {\n      sharedNode = aNode;\n      aNode = aNodes.pop();\n      bNode = bNodes.pop();\n    }\n    return sharedNode;\n  }\n  d3.layout.chord = function() {\n    var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;\n    function relayout() {\n      var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;\n      chords = [];\n      groups = [];\n      k = 0, i = -1;\n      while (++i < n) {\n        x = 0, j = -1;\n        while (++j < n) {\n          x += matrix[i][j];\n        }\n        groupSums.push(x);\n        subgroupIndex.push(d3.range(n));\n        k += x;\n      }\n      if (sortGroups) {\n        groupIndex.sort(function(a, b) {\n          return sortGroups(groupSums[a], groupSums[b]);\n        });\n      }\n      if (sortSubgroups) {\n        subgroupIndex.forEach(function(d, i) {\n          d.sort(function(a, b) {\n            return sortSubgroups(matrix[i][a], matrix[i][b]);\n          });\n        });\n      }\n      k = (τ - padding * n) / k;\n      x = 0, i = -1;\n      while (++i < n) {\n        x0 = x, j = -1;\n        while (++j < n) {\n          var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;\n          subgroups[di + \"-\" + dj] = {\n            index: di,\n            subindex: dj,\n            startAngle: a0,\n            endAngle: a1,\n            value: v\n          };\n        }\n        groups[di] = {\n          index: di,\n          startAngle: x0,\n          endAngle: x,\n          value: groupSums[di]\n        };\n        x += padding;\n      }\n      i = -1;\n      while (++i < n) {\n        j = i - 1;\n        while (++j < n) {\n          var source = subgroups[i + \"-\" + j], target = subgroups[j + \"-\" + i];\n          if (source.value || target.value) {\n            chords.push(source.value < target.value ? {\n              source: target,\n              target: source\n            } : {\n              source: source,\n              target: target\n            });\n          }\n        }\n      }\n      if (sortChords) resort();\n    }\n    function resort() {\n      chords.sort(function(a, b) {\n        return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);\n      });\n    }\n    chord.matrix = function(x) {\n      if (!arguments.length) return matrix;\n      n = (matrix = x) && matrix.length;\n      chords = groups = null;\n      return chord;\n    };\n    chord.padding = function(x) {\n      if (!arguments.length) return padding;\n      padding = x;\n      chords = groups = null;\n      return chord;\n    };\n    chord.sortGroups = function(x) {\n      if (!arguments.length) return sortGroups;\n      sortGroups = x;\n      chords = groups = null;\n      return chord;\n    };\n    chord.sortSubgroups = function(x) {\n      if (!arguments.length) return sortSubgroups;\n      sortSubgroups = x;\n      chords = null;\n      return chord;\n    };\n    chord.sortChords = function(x) {\n      if (!arguments.length) return sortChords;\n      sortChords = x;\n      if (chords) resort();\n      return chord;\n    };\n    chord.chords = function() {\n      if (!chords) relayout();\n      return chords;\n    };\n    chord.groups = function() {\n      if (!groups) relayout();\n      return groups;\n    };\n    return chord;\n  };\n  d3.layout.force = function() {\n    var force = {}, event = d3.dispatch(\"start\", \"tick\", \"end\"), timer, size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;\n    function repulse(node) {\n      return function(quad, x1, _, x2) {\n        if (quad.point !== node) {\n          var dx = quad.cx - node.x, dy = quad.cy - node.y, dw = x2 - x1, dn = dx * dx + dy * dy;\n          if (dw * dw / theta2 < dn) {\n            if (dn < chargeDistance2) {\n              var k = quad.charge / dn;\n              node.px -= dx * k;\n              node.py -= dy * k;\n            }\n            return true;\n          }\n          if (quad.point && dn && dn < chargeDistance2) {\n            var k = quad.pointCharge / dn;\n            node.px -= dx * k;\n            node.py -= dy * k;\n          }\n        }\n        return !quad.charge;\n      };\n    }\n    force.tick = function() {\n      if ((alpha *= .99) < .005) {\n        timer = null;\n        event.end({\n          type: \"end\",\n          alpha: alpha = 0\n        });\n        return true;\n      }\n      var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;\n      for (i = 0; i < m; ++i) {\n        o = links[i];\n        s = o.source;\n        t = o.target;\n        x = t.x - s.x;\n        y = t.y - s.y;\n        if (l = x * x + y * y) {\n          l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;\n          x *= l;\n          y *= l;\n          t.x -= x * (k = s.weight + t.weight ? s.weight / (s.weight + t.weight) : .5);\n          t.y -= y * k;\n          s.x += x * (k = 1 - k);\n          s.y += y * k;\n        }\n      }\n      if (k = alpha * gravity) {\n        x = size[0] / 2;\n        y = size[1] / 2;\n        i = -1;\n        if (k) while (++i < n) {\n          o = nodes[i];\n          o.x += (x - o.x) * k;\n          o.y += (y - o.y) * k;\n        }\n      }\n      if (charge) {\n        d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);\n        i = -1;\n        while (++i < n) {\n          if (!(o = nodes[i]).fixed) {\n            q.visit(repulse(o));\n          }\n        }\n      }\n      i = -1;\n      while (++i < n) {\n        o = nodes[i];\n        if (o.fixed) {\n          o.x = o.px;\n          o.y = o.py;\n        } else {\n          o.x -= (o.px - (o.px = o.x)) * friction;\n          o.y -= (o.py - (o.py = o.y)) * friction;\n        }\n      }\n      event.tick({\n        type: \"tick\",\n        alpha: alpha\n      });\n    };\n    force.nodes = function(x) {\n      if (!arguments.length) return nodes;\n      nodes = x;\n      return force;\n    };\n    force.links = function(x) {\n      if (!arguments.length) return links;\n      links = x;\n      return force;\n    };\n    force.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return force;\n    };\n    force.linkDistance = function(x) {\n      if (!arguments.length) return linkDistance;\n      linkDistance = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.distance = force.linkDistance;\n    force.linkStrength = function(x) {\n      if (!arguments.length) return linkStrength;\n      linkStrength = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.friction = function(x) {\n      if (!arguments.length) return friction;\n      friction = +x;\n      return force;\n    };\n    force.charge = function(x) {\n      if (!arguments.length) return charge;\n      charge = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.chargeDistance = function(x) {\n      if (!arguments.length) return Math.sqrt(chargeDistance2);\n      chargeDistance2 = x * x;\n      return force;\n    };\n    force.gravity = function(x) {\n      if (!arguments.length) return gravity;\n      gravity = +x;\n      return force;\n    };\n    force.theta = function(x) {\n      if (!arguments.length) return Math.sqrt(theta2);\n      theta2 = x * x;\n      return force;\n    };\n    force.alpha = function(x) {\n      if (!arguments.length) return alpha;\n      x = +x;\n      if (alpha) {\n        if (x > 0) {\n          alpha = x;\n        } else {\n          timer.c = null, timer.t = NaN, timer = null;\n          event.end({\n            type: \"end\",\n            alpha: alpha = 0\n          });\n        }\n      } else if (x > 0) {\n        event.start({\n          type: \"start\",\n          alpha: alpha = x\n        });\n        timer = d3_timer(force.tick);\n      }\n      return force;\n    };\n    force.start = function() {\n      var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;\n      for (i = 0; i < n; ++i) {\n        (o = nodes[i]).index = i;\n        o.weight = 0;\n      }\n      for (i = 0; i < m; ++i) {\n        o = links[i];\n        if (typeof o.source == \"number\") o.source = nodes[o.source];\n        if (typeof o.target == \"number\") o.target = nodes[o.target];\n        ++o.source.weight;\n        ++o.target.weight;\n      }\n      for (i = 0; i < n; ++i) {\n        o = nodes[i];\n        if (isNaN(o.x)) o.x = position(\"x\", w);\n        if (isNaN(o.y)) o.y = position(\"y\", h);\n        if (isNaN(o.px)) o.px = o.x;\n        if (isNaN(o.py)) o.py = o.y;\n      }\n      distances = [];\n      if (typeof linkDistance === \"function\") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;\n      strengths = [];\n      if (typeof linkStrength === \"function\") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;\n      charges = [];\n      if (typeof charge === \"function\") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;\n      function position(dimension, size) {\n        if (!neighbors) {\n          neighbors = new Array(n);\n          for (j = 0; j < n; ++j) {\n            neighbors[j] = [];\n          }\n          for (j = 0; j < m; ++j) {\n            var o = links[j];\n            neighbors[o.source.index].push(o.target);\n            neighbors[o.target.index].push(o.source);\n          }\n        }\n        var candidates = neighbors[i], j = -1, l = candidates.length, x;\n        while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x;\n        return Math.random() * size;\n      }\n      return force.resume();\n    };\n    force.resume = function() {\n      return force.alpha(.1);\n    };\n    force.stop = function() {\n      return force.alpha(0);\n    };\n    force.drag = function() {\n      if (!drag) drag = d3.behavior.drag().origin(d3_identity).on(\"dragstart.force\", d3_layout_forceDragstart).on(\"drag.force\", dragmove).on(\"dragend.force\", d3_layout_forceDragend);\n      if (!arguments.length) return drag;\n      this.on(\"mouseover.force\", d3_layout_forceMouseover).on(\"mouseout.force\", d3_layout_forceMouseout).call(drag);\n    };\n    function dragmove(d) {\n      d.px = d3.event.x, d.py = d3.event.y;\n      force.resume();\n    }\n    return d3.rebind(force, event, \"on\");\n  };\n  function d3_layout_forceDragstart(d) {\n    d.fixed |= 2;\n  }\n  function d3_layout_forceDragend(d) {\n    d.fixed &= ~6;\n  }\n  function d3_layout_forceMouseover(d) {\n    d.fixed |= 4;\n    d.px = d.x, d.py = d.y;\n  }\n  function d3_layout_forceMouseout(d) {\n    d.fixed &= ~4;\n  }\n  function d3_layout_forceAccumulate(quad, alpha, charges) {\n    var cx = 0, cy = 0;\n    quad.charge = 0;\n    if (!quad.leaf) {\n      var nodes = quad.nodes, n = nodes.length, i = -1, c;\n      while (++i < n) {\n        c = nodes[i];\n        if (c == null) continue;\n        d3_layout_forceAccumulate(c, alpha, charges);\n        quad.charge += c.charge;\n        cx += c.charge * c.cx;\n        cy += c.charge * c.cy;\n      }\n    }\n    if (quad.point) {\n      if (!quad.leaf) {\n        quad.point.x += Math.random() - .5;\n        quad.point.y += Math.random() - .5;\n      }\n      var k = alpha * charges[quad.point.index];\n      quad.charge += quad.pointCharge = k;\n      cx += k * quad.point.x;\n      cy += k * quad.point.y;\n    }\n    quad.cx = cx / quad.charge;\n    quad.cy = cy / quad.charge;\n  }\n  var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1, d3_layout_forceChargeDistance2 = Infinity;\n  d3.layout.hierarchy = function() {\n    var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;\n    function hierarchy(root) {\n      var stack = [ root ], nodes = [], node;\n      root.depth = 0;\n      while ((node = stack.pop()) != null) {\n        nodes.push(node);\n        if ((childs = children.call(hierarchy, node, node.depth)) && (n = childs.length)) {\n          var n, childs, child;\n          while (--n >= 0) {\n            stack.push(child = childs[n]);\n            child.parent = node;\n            child.depth = node.depth + 1;\n          }\n          if (value) node.value = 0;\n          node.children = childs;\n        } else {\n          if (value) node.value = +value.call(hierarchy, node, node.depth) || 0;\n          delete node.children;\n        }\n      }\n      d3_layout_hierarchyVisitAfter(root, function(node) {\n        var childs, parent;\n        if (sort && (childs = node.children)) childs.sort(sort);\n        if (value && (parent = node.parent)) parent.value += node.value;\n      });\n      return nodes;\n    }\n    hierarchy.sort = function(x) {\n      if (!arguments.length) return sort;\n      sort = x;\n      return hierarchy;\n    };\n    hierarchy.children = function(x) {\n      if (!arguments.length) return children;\n      children = x;\n      return hierarchy;\n    };\n    hierarchy.value = function(x) {\n      if (!arguments.length) return value;\n      value = x;\n      return hierarchy;\n    };\n    hierarchy.revalue = function(root) {\n      if (value) {\n        d3_layout_hierarchyVisitBefore(root, function(node) {\n          if (node.children) node.value = 0;\n        });\n        d3_layout_hierarchyVisitAfter(root, function(node) {\n          var parent;\n          if (!node.children) node.value = +value.call(hierarchy, node, node.depth) || 0;\n          if (parent = node.parent) parent.value += node.value;\n        });\n      }\n      return root;\n    };\n    return hierarchy;\n  };\n  function d3_layout_hierarchyRebind(object, hierarchy) {\n    d3.rebind(object, hierarchy, \"sort\", \"children\", \"value\");\n    object.nodes = object;\n    object.links = d3_layout_hierarchyLinks;\n    return object;\n  }\n  function d3_layout_hierarchyVisitBefore(node, callback) {\n    var nodes = [ node ];\n    while ((node = nodes.pop()) != null) {\n      callback(node);\n      if ((children = node.children) && (n = children.length)) {\n        var n, children;\n        while (--n >= 0) nodes.push(children[n]);\n      }\n    }\n  }\n  function d3_layout_hierarchyVisitAfter(node, callback) {\n    var nodes = [ node ], nodes2 = [];\n    while ((node = nodes.pop()) != null) {\n      nodes2.push(node);\n      if ((children = node.children) && (n = children.length)) {\n        var i = -1, n, children;\n        while (++i < n) nodes.push(children[i]);\n      }\n    }\n    while ((node = nodes2.pop()) != null) {\n      callback(node);\n    }\n  }\n  function d3_layout_hierarchyChildren(d) {\n    return d.children;\n  }\n  function d3_layout_hierarchyValue(d) {\n    return d.value;\n  }\n  function d3_layout_hierarchySort(a, b) {\n    return b.value - a.value;\n  }\n  function d3_layout_hierarchyLinks(nodes) {\n    return d3.merge(nodes.map(function(parent) {\n      return (parent.children || []).map(function(child) {\n        return {\n          source: parent,\n          target: child\n        };\n      });\n    }));\n  }\n  d3.layout.partition = function() {\n    var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];\n    function position(node, x, dx, dy) {\n      var children = node.children;\n      node.x = x;\n      node.y = node.depth * dy;\n      node.dx = dx;\n      node.dy = dy;\n      if (children && (n = children.length)) {\n        var i = -1, n, c, d;\n        dx = node.value ? dx / node.value : 0;\n        while (++i < n) {\n          position(c = children[i], x, d = c.value * dx, dy);\n          x += d;\n        }\n      }\n    }\n    function depth(node) {\n      var children = node.children, d = 0;\n      if (children && (n = children.length)) {\n        var i = -1, n;\n        while (++i < n) d = Math.max(d, depth(children[i]));\n      }\n      return 1 + d;\n    }\n    function partition(d, i) {\n      var nodes = hierarchy.call(this, d, i);\n      position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));\n      return nodes;\n    }\n    partition.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return partition;\n    };\n    return d3_layout_hierarchyRebind(partition, hierarchy);\n  };\n  d3.layout.pie = function() {\n    var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = τ, padAngle = 0;\n    function pie(data) {\n      var n = data.length, values = data.map(function(d, i) {\n        return +value.call(pie, d, i);\n      }), a = +(typeof startAngle === \"function\" ? startAngle.apply(this, arguments) : startAngle), da = (typeof endAngle === \"function\" ? endAngle.apply(this, arguments) : endAngle) - a, p = Math.min(Math.abs(da) / n, +(typeof padAngle === \"function\" ? padAngle.apply(this, arguments) : padAngle)), pa = p * (da < 0 ? -1 : 1), sum = d3.sum(values), k = sum ? (da - n * pa) / sum : 0, index = d3.range(n), arcs = [], v;\n      if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {\n        return values[j] - values[i];\n      } : function(i, j) {\n        return sort(data[i], data[j]);\n      });\n      index.forEach(function(i) {\n        arcs[i] = {\n          data: data[i],\n          value: v = values[i],\n          startAngle: a,\n          endAngle: a += v * k + pa,\n          padAngle: p\n        };\n      });\n      return arcs;\n    }\n    pie.value = function(_) {\n      if (!arguments.length) return value;\n      value = _;\n      return pie;\n    };\n    pie.sort = function(_) {\n      if (!arguments.length) return sort;\n      sort = _;\n      return pie;\n    };\n    pie.startAngle = function(_) {\n      if (!arguments.length) return startAngle;\n      startAngle = _;\n      return pie;\n    };\n    pie.endAngle = function(_) {\n      if (!arguments.length) return endAngle;\n      endAngle = _;\n      return pie;\n    };\n    pie.padAngle = function(_) {\n      if (!arguments.length) return padAngle;\n      padAngle = _;\n      return pie;\n    };\n    return pie;\n  };\n  var d3_layout_pieSortByValue = {};\n  d3.layout.stack = function() {\n    var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;\n    function stack(data, index) {\n      if (!(n = data.length)) return data;\n      var series = data.map(function(d, i) {\n        return values.call(stack, d, i);\n      });\n      var points = series.map(function(d) {\n        return d.map(function(v, i) {\n          return [ x.call(stack, v, i), y.call(stack, v, i) ];\n        });\n      });\n      var orders = order.call(stack, points, index);\n      series = d3.permute(series, orders);\n      points = d3.permute(points, orders);\n      var offsets = offset.call(stack, points, index);\n      var m = series[0].length, n, i, j, o;\n      for (j = 0; j < m; ++j) {\n        out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);\n        for (i = 1; i < n; ++i) {\n          out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);\n        }\n      }\n      return data;\n    }\n    stack.values = function(x) {\n      if (!arguments.length) return values;\n      values = x;\n      return stack;\n    };\n    stack.order = function(x) {\n      if (!arguments.length) return order;\n      order = typeof x === \"function\" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;\n      return stack;\n    };\n    stack.offset = function(x) {\n      if (!arguments.length) return offset;\n      offset = typeof x === \"function\" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;\n      return stack;\n    };\n    stack.x = function(z) {\n      if (!arguments.length) return x;\n      x = z;\n      return stack;\n    };\n    stack.y = function(z) {\n      if (!arguments.length) return y;\n      y = z;\n      return stack;\n    };\n    stack.out = function(z) {\n      if (!arguments.length) return out;\n      out = z;\n      return stack;\n    };\n    return stack;\n  };\n  function d3_layout_stackX(d) {\n    return d.x;\n  }\n  function d3_layout_stackY(d) {\n    return d.y;\n  }\n  function d3_layout_stackOut(d, y0, y) {\n    d.y0 = y0;\n    d.y = y;\n  }\n  var d3_layout_stackOrders = d3.map({\n    \"inside-out\": function(data) {\n      var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {\n        return max[a] - max[b];\n      }), top = 0, bottom = 0, tops = [], bottoms = [];\n      for (i = 0; i < n; ++i) {\n        j = index[i];\n        if (top < bottom) {\n          top += sums[j];\n          tops.push(j);\n        } else {\n          bottom += sums[j];\n          bottoms.push(j);\n        }\n      }\n      return bottoms.reverse().concat(tops);\n    },\n    reverse: function(data) {\n      return d3.range(data.length).reverse();\n    },\n    \"default\": d3_layout_stackOrderDefault\n  });\n  var d3_layout_stackOffsets = d3.map({\n    silhouette: function(data) {\n      var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];\n      for (j = 0; j < m; ++j) {\n        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n        if (o > max) max = o;\n        sums.push(o);\n      }\n      for (j = 0; j < m; ++j) {\n        y0[j] = (max - sums[j]) / 2;\n      }\n      return y0;\n    },\n    wiggle: function(data) {\n      var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];\n      y0[0] = o = o0 = 0;\n      for (j = 1; j < m; ++j) {\n        for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];\n        for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {\n          for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {\n            s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;\n          }\n          s2 += s3 * data[i][j][1];\n        }\n        y0[j] = o -= s1 ? s2 / s1 * dx : 0;\n        if (o < o0) o0 = o;\n      }\n      for (j = 0; j < m; ++j) y0[j] -= o0;\n      return y0;\n    },\n    expand: function(data) {\n      var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];\n      for (j = 0; j < m; ++j) {\n        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n        if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;\n      }\n      for (j = 0; j < m; ++j) y0[j] = 0;\n      return y0;\n    },\n    zero: d3_layout_stackOffsetZero\n  });\n  function d3_layout_stackOrderDefault(data) {\n    return d3.range(data.length);\n  }\n  function d3_layout_stackOffsetZero(data) {\n    var j = -1, m = data[0].length, y0 = [];\n    while (++j < m) y0[j] = 0;\n    return y0;\n  }\n  function d3_layout_stackMaxIndex(array) {\n    var i = 1, j = 0, v = array[0][1], k, n = array.length;\n    for (;i < n; ++i) {\n      if ((k = array[i][1]) > v) {\n        j = i;\n        v = k;\n      }\n    }\n    return j;\n  }\n  function d3_layout_stackReduceSum(d) {\n    return d.reduce(d3_layout_stackSum, 0);\n  }\n  function d3_layout_stackSum(p, d) {\n    return p + d[1];\n  }\n  d3.layout.histogram = function() {\n    var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;\n    function histogram(data, i) {\n      var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;\n      while (++i < m) {\n        bin = bins[i] = [];\n        bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);\n        bin.y = 0;\n      }\n      if (m > 0) {\n        i = -1;\n        while (++i < n) {\n          x = values[i];\n          if (x >= range[0] && x <= range[1]) {\n            bin = bins[d3.bisect(thresholds, x, 1, m) - 1];\n            bin.y += k;\n            bin.push(data[i]);\n          }\n        }\n      }\n      return bins;\n    }\n    histogram.value = function(x) {\n      if (!arguments.length) return valuer;\n      valuer = x;\n      return histogram;\n    };\n    histogram.range = function(x) {\n      if (!arguments.length) return ranger;\n      ranger = d3_functor(x);\n      return histogram;\n    };\n    histogram.bins = function(x) {\n      if (!arguments.length) return binner;\n      binner = typeof x === \"number\" ? function(range) {\n        return d3_layout_histogramBinFixed(range, x);\n      } : d3_functor(x);\n      return histogram;\n    };\n    histogram.frequency = function(x) {\n      if (!arguments.length) return frequency;\n      frequency = !!x;\n      return histogram;\n    };\n    return histogram;\n  };\n  function d3_layout_histogramBinSturges(range, values) {\n    return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));\n  }\n  function d3_layout_histogramBinFixed(range, n) {\n    var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];\n    while (++x <= n) f[x] = m * x + b;\n    return f;\n  }\n  function d3_layout_histogramRange(values) {\n    return [ d3.min(values), d3.max(values) ];\n  }\n  d3.layout.pack = function() {\n    var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;\n    function pack(d, i) {\n      var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === \"function\" ? radius : function() {\n        return radius;\n      };\n      root.x = root.y = 0;\n      d3_layout_hierarchyVisitAfter(root, function(d) {\n        d.r = +r(d.value);\n      });\n      d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n      if (padding) {\n        var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2;\n        d3_layout_hierarchyVisitAfter(root, function(d) {\n          d.r += dr;\n        });\n        d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n        d3_layout_hierarchyVisitAfter(root, function(d) {\n          d.r -= dr;\n        });\n      }\n      d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h));\n      return nodes;\n    }\n    pack.size = function(_) {\n      if (!arguments.length) return size;\n      size = _;\n      return pack;\n    };\n    pack.radius = function(_) {\n      if (!arguments.length) return radius;\n      radius = _ == null || typeof _ === \"function\" ? _ : +_;\n      return pack;\n    };\n    pack.padding = function(_) {\n      if (!arguments.length) return padding;\n      padding = +_;\n      return pack;\n    };\n    return d3_layout_hierarchyRebind(pack, hierarchy);\n  };\n  function d3_layout_packSort(a, b) {\n    return a.value - b.value;\n  }\n  function d3_layout_packInsert(a, b) {\n    var c = a._pack_next;\n    a._pack_next = b;\n    b._pack_prev = a;\n    b._pack_next = c;\n    c._pack_prev = b;\n  }\n  function d3_layout_packSplice(a, b) {\n    a._pack_next = b;\n    b._pack_prev = a;\n  }\n  function d3_layout_packIntersects(a, b) {\n    var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;\n    return .999 * dr * dr > dx * dx + dy * dy;\n  }\n  function d3_layout_packSiblings(node) {\n    if (!(nodes = node.children) || !(n = nodes.length)) return;\n    var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;\n    function bound(node) {\n      xMin = Math.min(node.x - node.r, xMin);\n      xMax = Math.max(node.x + node.r, xMax);\n      yMin = Math.min(node.y - node.r, yMin);\n      yMax = Math.max(node.y + node.r, yMax);\n    }\n    nodes.forEach(d3_layout_packLink);\n    a = nodes[0];\n    a.x = -a.r;\n    a.y = 0;\n    bound(a);\n    if (n > 1) {\n      b = nodes[1];\n      b.x = b.r;\n      b.y = 0;\n      bound(b);\n      if (n > 2) {\n        c = nodes[2];\n        d3_layout_packPlace(a, b, c);\n        bound(c);\n        d3_layout_packInsert(a, c);\n        a._pack_prev = c;\n        d3_layout_packInsert(c, b);\n        b = a._pack_next;\n        for (i = 3; i < n; i++) {\n          d3_layout_packPlace(a, b, c = nodes[i]);\n          var isect = 0, s1 = 1, s2 = 1;\n          for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {\n            if (d3_layout_packIntersects(j, c)) {\n              isect = 1;\n              break;\n            }\n          }\n          if (isect == 1) {\n            for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {\n              if (d3_layout_packIntersects(k, c)) {\n                break;\n              }\n            }\n          }\n          if (isect) {\n            if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);\n            i--;\n          } else {\n            d3_layout_packInsert(a, c);\n            b = c;\n            bound(c);\n          }\n        }\n      }\n    }\n    var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;\n    for (i = 0; i < n; i++) {\n      c = nodes[i];\n      c.x -= cx;\n      c.y -= cy;\n      cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));\n    }\n    node.r = cr;\n    nodes.forEach(d3_layout_packUnlink);\n  }\n  function d3_layout_packLink(node) {\n    node._pack_next = node._pack_prev = node;\n  }\n  function d3_layout_packUnlink(node) {\n    delete node._pack_next;\n    delete node._pack_prev;\n  }\n  function d3_layout_packTransform(node, x, y, k) {\n    var children = node.children;\n    node.x = x += k * node.x;\n    node.y = y += k * node.y;\n    node.r *= k;\n    if (children) {\n      var i = -1, n = children.length;\n      while (++i < n) d3_layout_packTransform(children[i], x, y, k);\n    }\n  }\n  function d3_layout_packPlace(a, b, c) {\n    var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;\n    if (db && (dx || dy)) {\n      var da = b.r + c.r, dc = dx * dx + dy * dy;\n      da *= da;\n      db *= db;\n      var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);\n      c.x = a.x + x * dx + y * dy;\n      c.y = a.y + x * dy - y * dx;\n    } else {\n      c.x = a.x + db;\n      c.y = a.y;\n    }\n  }\n  d3.layout.tree = function() {\n    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;\n    function tree(d, i) {\n      var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);\n      d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;\n      d3_layout_hierarchyVisitBefore(root1, secondWalk);\n      if (nodeSize) d3_layout_hierarchyVisitBefore(root0, sizeNode); else {\n        var left = root0, right = root0, bottom = root0;\n        d3_layout_hierarchyVisitBefore(root0, function(node) {\n          if (node.x < left.x) left = node;\n          if (node.x > right.x) right = node;\n          if (node.depth > bottom.depth) bottom = node;\n        });\n        var tx = separation(left, right) / 2 - left.x, kx = size[0] / (right.x + separation(right, left) / 2 + tx), ky = size[1] / (bottom.depth || 1);\n        d3_layout_hierarchyVisitBefore(root0, function(node) {\n          node.x = (node.x + tx) * kx;\n          node.y = node.depth * ky;\n        });\n      }\n      return nodes;\n    }\n    function wrapTree(root0) {\n      var root1 = {\n        A: null,\n        children: [ root0 ]\n      }, queue = [ root1 ], node1;\n      while ((node1 = queue.pop()) != null) {\n        for (var children = node1.children, child, i = 0, n = children.length; i < n; ++i) {\n          queue.push((children[i] = child = {\n            _: children[i],\n            parent: node1,\n            children: (child = children[i].children) && child.slice() || [],\n            A: null,\n            a: null,\n            z: 0,\n            m: 0,\n            c: 0,\n            s: 0,\n            t: null,\n            i: i\n          }).a = child);\n        }\n      }\n      return root1.children[0];\n    }\n    function firstWalk(v) {\n      var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;\n      if (children.length) {\n        d3_layout_treeShift(v);\n        var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n        if (w) {\n          v.z = w.z + separation(v._, w._);\n          v.m = v.z - midpoint;\n        } else {\n          v.z = midpoint;\n        }\n      } else if (w) {\n        v.z = w.z + separation(v._, w._);\n      }\n      v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n    }\n    function secondWalk(v) {\n      v._.x = v.z + v.parent.m;\n      v.m += v.parent.m;\n    }\n    function apportion(v, w, ancestor) {\n      if (w) {\n        var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;\n        while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {\n          vom = d3_layout_treeLeft(vom);\n          vop = d3_layout_treeRight(vop);\n          vop.a = v;\n          shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n          if (shift > 0) {\n            d3_layout_treeMove(d3_layout_treeAncestor(vim, v, ancestor), v, shift);\n            sip += shift;\n            sop += shift;\n          }\n          sim += vim.m;\n          sip += vip.m;\n          som += vom.m;\n          sop += vop.m;\n        }\n        if (vim && !d3_layout_treeRight(vop)) {\n          vop.t = vim;\n          vop.m += sim - sop;\n        }\n        if (vip && !d3_layout_treeLeft(vom)) {\n          vom.t = vip;\n          vom.m += sip - som;\n          ancestor = v;\n        }\n      }\n      return ancestor;\n    }\n    function sizeNode(node) {\n      node.x *= size[0];\n      node.y = node.depth * size[1];\n    }\n    tree.separation = function(x) {\n      if (!arguments.length) return separation;\n      separation = x;\n      return tree;\n    };\n    tree.size = function(x) {\n      if (!arguments.length) return nodeSize ? null : size;\n      nodeSize = (size = x) == null ? sizeNode : null;\n      return tree;\n    };\n    tree.nodeSize = function(x) {\n      if (!arguments.length) return nodeSize ? size : null;\n      nodeSize = (size = x) == null ? null : sizeNode;\n      return tree;\n    };\n    return d3_layout_hierarchyRebind(tree, hierarchy);\n  };\n  function d3_layout_treeSeparation(a, b) {\n    return a.parent == b.parent ? 1 : 2;\n  }\n  function d3_layout_treeLeft(v) {\n    var children = v.children;\n    return children.length ? children[0] : v.t;\n  }\n  function d3_layout_treeRight(v) {\n    var children = v.children, n;\n    return (n = children.length) ? children[n - 1] : v.t;\n  }\n  function d3_layout_treeMove(wm, wp, shift) {\n    var change = shift / (wp.i - wm.i);\n    wp.c -= change;\n    wp.s += shift;\n    wm.c += change;\n    wp.z += shift;\n    wp.m += shift;\n  }\n  function d3_layout_treeShift(v) {\n    var shift = 0, change = 0, children = v.children, i = children.length, w;\n    while (--i >= 0) {\n      w = children[i];\n      w.z += shift;\n      w.m += shift;\n      shift += w.s + (change += w.c);\n    }\n  }\n  function d3_layout_treeAncestor(vim, v, ancestor) {\n    return vim.a.parent === v.parent ? vim.a : ancestor;\n  }\n  d3.layout.cluster = function() {\n    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;\n    function cluster(d, i) {\n      var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;\n      d3_layout_hierarchyVisitAfter(root, function(node) {\n        var children = node.children;\n        if (children && children.length) {\n          node.x = d3_layout_clusterX(children);\n          node.y = d3_layout_clusterY(children);\n        } else {\n          node.x = previousNode ? x += separation(node, previousNode) : 0;\n          node.y = 0;\n          previousNode = node;\n        }\n      });\n      var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;\n      d3_layout_hierarchyVisitAfter(root, nodeSize ? function(node) {\n        node.x = (node.x - root.x) * size[0];\n        node.y = (root.y - node.y) * size[1];\n      } : function(node) {\n        node.x = (node.x - x0) / (x1 - x0) * size[0];\n        node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];\n      });\n      return nodes;\n    }\n    cluster.separation = function(x) {\n      if (!arguments.length) return separation;\n      separation = x;\n      return cluster;\n    };\n    cluster.size = function(x) {\n      if (!arguments.length) return nodeSize ? null : size;\n      nodeSize = (size = x) == null;\n      return cluster;\n    };\n    cluster.nodeSize = function(x) {\n      if (!arguments.length) return nodeSize ? size : null;\n      nodeSize = (size = x) != null;\n      return cluster;\n    };\n    return d3_layout_hierarchyRebind(cluster, hierarchy);\n  };\n  function d3_layout_clusterY(children) {\n    return 1 + d3.max(children, function(child) {\n      return child.y;\n    });\n  }\n  function d3_layout_clusterX(children) {\n    return children.reduce(function(x, child) {\n      return x + child.x;\n    }, 0) / children.length;\n  }\n  function d3_layout_clusterLeft(node) {\n    var children = node.children;\n    return children && children.length ? d3_layout_clusterLeft(children[0]) : node;\n  }\n  function d3_layout_clusterRight(node) {\n    var children = node.children, n;\n    return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;\n  }\n  d3.layout.treemap = function() {\n    var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = \"squarify\", ratio = .5 * (1 + Math.sqrt(5));\n    function scale(children, k) {\n      var i = -1, n = children.length, child, area;\n      while (++i < n) {\n        area = (child = children[i]).value * (k < 0 ? 0 : k);\n        child.area = isNaN(area) || area <= 0 ? 0 : area;\n      }\n    }\n    function squarify(node) {\n      var children = node.children;\n      if (children && children.length) {\n        var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === \"slice\" ? rect.dx : mode === \"dice\" ? rect.dy : mode === \"slice-dice\" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;\n        scale(remaining, rect.dx * rect.dy / node.value);\n        row.area = 0;\n        while ((n = remaining.length) > 0) {\n          row.push(child = remaining[n - 1]);\n          row.area += child.area;\n          if (mode !== \"squarify\" || (score = worst(row, u)) <= best) {\n            remaining.pop();\n            best = score;\n          } else {\n            row.area -= row.pop().area;\n            position(row, u, rect, false);\n            u = Math.min(rect.dx, rect.dy);\n            row.length = row.area = 0;\n            best = Infinity;\n          }\n        }\n        if (row.length) {\n          position(row, u, rect, true);\n          row.length = row.area = 0;\n        }\n        children.forEach(squarify);\n      }\n    }\n    function stickify(node) {\n      var children = node.children;\n      if (children && children.length) {\n        var rect = pad(node), remaining = children.slice(), child, row = [];\n        scale(remaining, rect.dx * rect.dy / node.value);\n        row.area = 0;\n        while (child = remaining.pop()) {\n          row.push(child);\n          row.area += child.area;\n          if (child.z != null) {\n            position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);\n            row.length = row.area = 0;\n          }\n        }\n        children.forEach(stickify);\n      }\n    }\n    function worst(row, u) {\n      var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;\n      while (++i < n) {\n        if (!(r = row[i].area)) continue;\n        if (r < rmin) rmin = r;\n        if (r > rmax) rmax = r;\n      }\n      s *= s;\n      u *= u;\n      return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;\n    }\n    function position(row, u, rect, flush) {\n      var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;\n      if (u == rect.dx) {\n        if (flush || v > rect.dy) v = rect.dy;\n        while (++i < n) {\n          o = row[i];\n          o.x = x;\n          o.y = y;\n          o.dy = v;\n          x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);\n        }\n        o.z = true;\n        o.dx += rect.x + rect.dx - x;\n        rect.y += v;\n        rect.dy -= v;\n      } else {\n        if (flush || v > rect.dx) v = rect.dx;\n        while (++i < n) {\n          o = row[i];\n          o.x = x;\n          o.y = y;\n          o.dx = v;\n          y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);\n        }\n        o.z = false;\n        o.dy += rect.y + rect.dy - y;\n        rect.x += v;\n        rect.dx -= v;\n      }\n    }\n    function treemap(d) {\n      var nodes = stickies || hierarchy(d), root = nodes[0];\n      root.x = root.y = 0;\n      if (root.value) root.dx = size[0], root.dy = size[1]; else root.dx = root.dy = 0;\n      if (stickies) hierarchy.revalue(root);\n      scale([ root ], root.dx * root.dy / root.value);\n      (stickies ? stickify : squarify)(root);\n      if (sticky) stickies = nodes;\n      return nodes;\n    }\n    treemap.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return treemap;\n    };\n    treemap.padding = function(x) {\n      if (!arguments.length) return padding;\n      function padFunction(node) {\n        var p = x.call(treemap, node, node.depth);\n        return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === \"number\" ? [ p, p, p, p ] : p);\n      }\n      function padConstant(node) {\n        return d3_layout_treemapPad(node, x);\n      }\n      var type;\n      pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === \"function\" ? padFunction : type === \"number\" ? (x = [ x, x, x, x ], \n      padConstant) : padConstant;\n      return treemap;\n    };\n    treemap.round = function(x) {\n      if (!arguments.length) return round != Number;\n      round = x ? Math.round : Number;\n      return treemap;\n    };\n    treemap.sticky = function(x) {\n      if (!arguments.length) return sticky;\n      sticky = x;\n      stickies = null;\n      return treemap;\n    };\n    treemap.ratio = function(x) {\n      if (!arguments.length) return ratio;\n      ratio = x;\n      return treemap;\n    };\n    treemap.mode = function(x) {\n      if (!arguments.length) return mode;\n      mode = x + \"\";\n      return treemap;\n    };\n    return d3_layout_hierarchyRebind(treemap, hierarchy);\n  };\n  function d3_layout_treemapPadNull(node) {\n    return {\n      x: node.x,\n      y: node.y,\n      dx: node.dx,\n      dy: node.dy\n    };\n  }\n  function d3_layout_treemapPad(node, padding) {\n    var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];\n    if (dx < 0) {\n      x += dx / 2;\n      dx = 0;\n    }\n    if (dy < 0) {\n      y += dy / 2;\n      dy = 0;\n    }\n    return {\n      x: x,\n      y: y,\n      dx: dx,\n      dy: dy\n    };\n  }\n  d3.random = {\n    normal: function(µ, σ) {\n      var n = arguments.length;\n      if (n < 2) σ = 1;\n      if (n < 1) µ = 0;\n      return function() {\n        var x, y, r;\n        do {\n          x = Math.random() * 2 - 1;\n          y = Math.random() * 2 - 1;\n          r = x * x + y * y;\n        } while (!r || r > 1);\n        return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);\n      };\n    },\n    logNormal: function() {\n      var random = d3.random.normal.apply(d3, arguments);\n      return function() {\n        return Math.exp(random());\n      };\n    },\n    bates: function(m) {\n      var random = d3.random.irwinHall(m);\n      return function() {\n        return random() / m;\n      };\n    },\n    irwinHall: function(m) {\n      return function() {\n        for (var s = 0, j = 0; j < m; j++) s += Math.random();\n        return s;\n      };\n    }\n  };\n  d3.scale = {};\n  function d3_scaleExtent(domain) {\n    var start = domain[0], stop = domain[domain.length - 1];\n    return start < stop ? [ start, stop ] : [ stop, start ];\n  }\n  function d3_scaleRange(scale) {\n    return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());\n  }\n  function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {\n    var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);\n    return function(x) {\n      return i(u(x));\n    };\n  }\n  function d3_scale_nice(domain, nice) {\n    var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;\n    if (x1 < x0) {\n      dx = i0, i0 = i1, i1 = dx;\n      dx = x0, x0 = x1, x1 = dx;\n    }\n    domain[i0] = nice.floor(x0);\n    domain[i1] = nice.ceil(x1);\n    return domain;\n  }\n  function d3_scale_niceStep(step) {\n    return step ? {\n      floor: function(x) {\n        return Math.floor(x / step) * step;\n      },\n      ceil: function(x) {\n        return Math.ceil(x / step) * step;\n      }\n    } : d3_scale_niceIdentity;\n  }\n  var d3_scale_niceIdentity = {\n    floor: d3_identity,\n    ceil: d3_identity\n  };\n  function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {\n    var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;\n    if (domain[k] < domain[0]) {\n      domain = domain.slice().reverse();\n      range = range.slice().reverse();\n    }\n    while (++j <= k) {\n      u.push(uninterpolate(domain[j - 1], domain[j]));\n      i.push(interpolate(range[j - 1], range[j]));\n    }\n    return function(x) {\n      var j = d3.bisect(domain, x, 1, k) - 1;\n      return i[j](u[j](x));\n    };\n  }\n  d3.scale.linear = function() {\n    return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);\n  };\n  function d3_scale_linear(domain, range, interpolate, clamp) {\n    var output, input;\n    function rescale() {\n      var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;\n      output = linear(domain, range, uninterpolate, interpolate);\n      input = linear(range, domain, uninterpolate, d3_interpolate);\n      return scale;\n    }\n    function scale(x) {\n      return output(x);\n    }\n    scale.invert = function(y) {\n      return input(y);\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(Number);\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.rangeRound = function(x) {\n      return scale.range(x).interpolate(d3_interpolateRound);\n    };\n    scale.clamp = function(x) {\n      if (!arguments.length) return clamp;\n      clamp = x;\n      return rescale();\n    };\n    scale.interpolate = function(x) {\n      if (!arguments.length) return interpolate;\n      interpolate = x;\n      return rescale();\n    };\n    scale.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    scale.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    scale.nice = function(m) {\n      d3_scale_linearNice(domain, m);\n      return rescale();\n    };\n    scale.copy = function() {\n      return d3_scale_linear(domain, range, interpolate, clamp);\n    };\n    return rescale();\n  }\n  function d3_scale_linearRebind(scale, linear) {\n    return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n  }\n  function d3_scale_linearNice(domain, m) {\n    d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n    d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n    return domain;\n  }\n  function d3_scale_linearTickRange(domain, m) {\n    if (m == null) m = 10;\n    var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;\n    if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;\n    extent[0] = Math.ceil(extent[0] / step) * step;\n    extent[1] = Math.floor(extent[1] / step) * step + step * .5;\n    extent[2] = step;\n    return extent;\n  }\n  function d3_scale_linearTicks(domain, m) {\n    return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));\n  }\n  function d3_scale_linearTickFormat(domain, m, format) {\n    var range = d3_scale_linearTickRange(domain, m);\n    if (format) {\n      var match = d3_format_re.exec(format);\n      match.shift();\n      if (match[8] === \"s\") {\n        var prefix = d3.formatPrefix(Math.max(abs(range[0]), abs(range[1])));\n        if (!match[7]) match[7] = \".\" + d3_scale_linearPrecision(prefix.scale(range[2]));\n        match[8] = \"f\";\n        format = d3.format(match.join(\"\"));\n        return function(d) {\n          return format(prefix.scale(d)) + prefix.symbol;\n        };\n      }\n      if (!match[7]) match[7] = \".\" + d3_scale_linearFormatPrecision(match[8], range);\n      format = match.join(\"\");\n    } else {\n      format = \",.\" + d3_scale_linearPrecision(range[2]) + \"f\";\n    }\n    return d3.format(format);\n  }\n  var d3_scale_linearFormatSignificant = {\n    s: 1,\n    g: 1,\n    p: 1,\n    r: 1,\n    e: 1\n  };\n  function d3_scale_linearPrecision(value) {\n    return -Math.floor(Math.log(value) / Math.LN10 + .01);\n  }\n  function d3_scale_linearFormatPrecision(type, range) {\n    var p = d3_scale_linearPrecision(range[2]);\n    return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(abs(range[0]), abs(range[1])))) + +(type !== \"e\") : p - (type === \"%\") * 2;\n  }\n  d3.scale.log = function() {\n    return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]);\n  };\n  function d3_scale_log(linear, base, positive, domain) {\n    function log(x) {\n      return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);\n    }\n    function pow(x) {\n      return positive ? Math.pow(base, x) : -Math.pow(base, -x);\n    }\n    function scale(x) {\n      return linear(log(x));\n    }\n    scale.invert = function(x) {\n      return pow(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      positive = x[0] >= 0;\n      linear.domain((domain = x.map(Number)).map(log));\n      return scale;\n    };\n    scale.base = function(_) {\n      if (!arguments.length) return base;\n      base = +_;\n      linear.domain(domain.map(log));\n      return scale;\n    };\n    scale.nice = function() {\n      var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative);\n      linear.domain(niced);\n      domain = niced.map(pow);\n      return scale;\n    };\n    scale.ticks = function() {\n      var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base;\n      if (isFinite(j - i)) {\n        if (positive) {\n          for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k);\n          ticks.push(pow(i));\n        } else {\n          ticks.push(pow(i));\n          for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k);\n        }\n        for (i = 0; ticks[i] < u; i++) {}\n        for (j = ticks.length; ticks[j - 1] > v; j--) {}\n        ticks = ticks.slice(i, j);\n      }\n      return ticks;\n    };\n    scale.tickFormat = function(n, format) {\n      if (!arguments.length) return d3_scale_logFormat;\n      if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== \"function\") format = d3.format(format);\n      var k = Math.max(1, base * n / scale.ticks().length);\n      return function(d) {\n        var i = d / pow(Math.round(log(d)));\n        if (i * base < base - .5) i *= base;\n        return i <= k ? format(d) : \"\";\n      };\n    };\n    scale.copy = function() {\n      return d3_scale_log(linear.copy(), base, positive, domain);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  var d3_scale_logFormat = d3.format(\".0e\"), d3_scale_logNiceNegative = {\n    floor: function(x) {\n      return -Math.ceil(-x);\n    },\n    ceil: function(x) {\n      return -Math.floor(-x);\n    }\n  };\n  d3.scale.pow = function() {\n    return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]);\n  };\n  function d3_scale_pow(linear, exponent, domain) {\n    var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);\n    function scale(x) {\n      return linear(powp(x));\n    }\n    scale.invert = function(x) {\n      return powb(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      linear.domain((domain = x.map(Number)).map(powp));\n      return scale;\n    };\n    scale.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    scale.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    scale.nice = function(m) {\n      return scale.domain(d3_scale_linearNice(domain, m));\n    };\n    scale.exponent = function(x) {\n      if (!arguments.length) return exponent;\n      powp = d3_scale_powPow(exponent = x);\n      powb = d3_scale_powPow(1 / exponent);\n      linear.domain(domain.map(powp));\n      return scale;\n    };\n    scale.copy = function() {\n      return d3_scale_pow(linear.copy(), exponent, domain);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  function d3_scale_powPow(e) {\n    return function(x) {\n      return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);\n    };\n  }\n  d3.scale.sqrt = function() {\n    return d3.scale.pow().exponent(.5);\n  };\n  d3.scale.ordinal = function() {\n    return d3_scale_ordinal([], {\n      t: \"range\",\n      a: [ [] ]\n    });\n  };\n  function d3_scale_ordinal(domain, ranger) {\n    var index, range, rangeBand;\n    function scale(x) {\n      return range[((index.get(x) || (ranger.t === \"range\" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length];\n    }\n    function steps(start, step) {\n      return d3.range(domain.length).map(function(i) {\n        return start + step * i;\n      });\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = [];\n      index = new d3_Map();\n      var i = -1, n = x.length, xi;\n      while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));\n      return scale[ranger.t].apply(scale, ranger.a);\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      rangeBand = 0;\n      ranger = {\n        t: \"range\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangePoints = function(x, padding) {\n      if (arguments.length < 2) padding = 0;\n      var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, \n      0) : (stop - start) / (domain.length - 1 + padding);\n      range = steps(start + step * padding / 2, step);\n      rangeBand = 0;\n      ranger = {\n        t: \"rangePoints\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeRoundPoints = function(x, padding) {\n      if (arguments.length < 2) padding = 0;\n      var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), \n      0) : (stop - start) / (domain.length - 1 + padding) | 0;\n      range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step);\n      rangeBand = 0;\n      ranger = {\n        t: \"rangeRoundPoints\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeBands = function(x, padding, outerPadding) {\n      if (arguments.length < 2) padding = 0;\n      if (arguments.length < 3) outerPadding = padding;\n      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);\n      range = steps(start + step * outerPadding, step);\n      if (reverse) range.reverse();\n      rangeBand = step * (1 - padding);\n      ranger = {\n        t: \"rangeBands\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeRoundBands = function(x, padding, outerPadding) {\n      if (arguments.length < 2) padding = 0;\n      if (arguments.length < 3) outerPadding = padding;\n      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding));\n      range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step);\n      if (reverse) range.reverse();\n      rangeBand = Math.round(step * (1 - padding));\n      ranger = {\n        t: \"rangeRoundBands\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeBand = function() {\n      return rangeBand;\n    };\n    scale.rangeExtent = function() {\n      return d3_scaleExtent(ranger.a[0]);\n    };\n    scale.copy = function() {\n      return d3_scale_ordinal(domain, ranger);\n    };\n    return scale.domain(domain);\n  }\n  d3.scale.category10 = function() {\n    return d3.scale.ordinal().range(d3_category10);\n  };\n  d3.scale.category20 = function() {\n    return d3.scale.ordinal().range(d3_category20);\n  };\n  d3.scale.category20b = function() {\n    return d3.scale.ordinal().range(d3_category20b);\n  };\n  d3.scale.category20c = function() {\n    return d3.scale.ordinal().range(d3_category20c);\n  };\n  var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString);\n  var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString);\n  var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString);\n  var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString);\n  d3.scale.quantile = function() {\n    return d3_scale_quantile([], []);\n  };\n  function d3_scale_quantile(domain, range) {\n    var thresholds;\n    function rescale() {\n      var k = 0, q = range.length;\n      thresholds = [];\n      while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);\n      return scale;\n    }\n    function scale(x) {\n      if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)];\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(d3_number).filter(d3_numeric).sort(d3_ascending);\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.quantiles = function() {\n      return thresholds;\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ];\n    };\n    scale.copy = function() {\n      return d3_scale_quantile(domain, range);\n    };\n    return rescale();\n  }\n  d3.scale.quantize = function() {\n    return d3_scale_quantize(0, 1, [ 0, 1 ]);\n  };\n  function d3_scale_quantize(x0, x1, range) {\n    var kx, i;\n    function scale(x) {\n      return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];\n    }\n    function rescale() {\n      kx = range.length / (x1 - x0);\n      i = range.length - 1;\n      return scale;\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return [ x0, x1 ];\n      x0 = +x[0];\n      x1 = +x[x.length - 1];\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      y = y < 0 ? NaN : y / kx + x0;\n      return [ y, y + 1 / kx ];\n    };\n    scale.copy = function() {\n      return d3_scale_quantize(x0, x1, range);\n    };\n    return rescale();\n  }\n  d3.scale.threshold = function() {\n    return d3_scale_threshold([ .5 ], [ 0, 1 ]);\n  };\n  function d3_scale_threshold(domain, range) {\n    function scale(x) {\n      if (x <= x) return range[d3.bisect(domain, x)];\n    }\n    scale.domain = function(_) {\n      if (!arguments.length) return domain;\n      domain = _;\n      return scale;\n    };\n    scale.range = function(_) {\n      if (!arguments.length) return range;\n      range = _;\n      return scale;\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      return [ domain[y - 1], domain[y] ];\n    };\n    scale.copy = function() {\n      return d3_scale_threshold(domain, range);\n    };\n    return scale;\n  }\n  d3.scale.identity = function() {\n    return d3_scale_identity([ 0, 1 ]);\n  };\n  function d3_scale_identity(domain) {\n    function identity(x) {\n      return +x;\n    }\n    identity.invert = identity;\n    identity.domain = identity.range = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(identity);\n      return identity;\n    };\n    identity.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    identity.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    identity.copy = function() {\n      return d3_scale_identity(domain);\n    };\n    return identity;\n  }\n  d3.svg = {};\n  function d3_zero() {\n    return 0;\n  }\n  d3.svg.arc = function() {\n    var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, cornerRadius = d3_zero, padRadius = d3_svg_arcAuto, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle, padAngle = d3_svg_arcPadAngle;\n    function arc() {\n      var r0 = Math.max(0, +innerRadius.apply(this, arguments)), r1 = Math.max(0, +outerRadius.apply(this, arguments)), a0 = startAngle.apply(this, arguments) - halfπ, a1 = endAngle.apply(this, arguments) - halfπ, da = Math.abs(a1 - a0), cw = a0 > a1 ? 0 : 1;\n      if (r1 < r0) rc = r1, r1 = r0, r0 = rc;\n      if (da >= τε) return circleSegment(r1, cw) + (r0 ? circleSegment(r0, 1 - cw) : \"\") + \"Z\";\n      var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = [];\n      if (ap = (+padAngle.apply(this, arguments) || 0) / 2) {\n        rp = padRadius === d3_svg_arcAuto ? Math.sqrt(r0 * r0 + r1 * r1) : +padRadius.apply(this, arguments);\n        if (!cw) p1 *= -1;\n        if (r1) p1 = d3_asin(rp / r1 * Math.sin(ap));\n        if (r0) p0 = d3_asin(rp / r0 * Math.sin(ap));\n      }\n      if (r1) {\n        x0 = r1 * Math.cos(a0 + p1);\n        y0 = r1 * Math.sin(a0 + p1);\n        x1 = r1 * Math.cos(a1 - p1);\n        y1 = r1 * Math.sin(a1 - p1);\n        var l1 = Math.abs(a1 - a0 - 2 * p1) <= π ? 0 : 1;\n        if (p1 && d3_svg_arcSweep(x0, y0, x1, y1) === cw ^ l1) {\n          var h1 = (a0 + a1) / 2;\n          x0 = r1 * Math.cos(h1);\n          y0 = r1 * Math.sin(h1);\n          x1 = y1 = null;\n        }\n      } else {\n        x0 = y0 = 0;\n      }\n      if (r0) {\n        x2 = r0 * Math.cos(a1 - p0);\n        y2 = r0 * Math.sin(a1 - p0);\n        x3 = r0 * Math.cos(a0 + p0);\n        y3 = r0 * Math.sin(a0 + p0);\n        var l0 = Math.abs(a0 - a1 + 2 * p0) <= π ? 0 : 1;\n        if (p0 && d3_svg_arcSweep(x2, y2, x3, y3) === 1 - cw ^ l0) {\n          var h0 = (a0 + a1) / 2;\n          x2 = r0 * Math.cos(h0);\n          y2 = r0 * Math.sin(h0);\n          x3 = y3 = null;\n        }\n      } else {\n        x2 = y2 = 0;\n      }\n      if (da > ε && (rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments))) > .001) {\n        cr = r0 < r1 ^ cw ? 0 : 1;\n        var rc1 = rc, rc0 = rc;\n        if (da < π) {\n          var oc = x3 == null ? [ x2, y2 ] : x1 == null ? [ x0, y0 ] : d3_geom_polygonIntersect([ x0, y0 ], [ x3, y3 ], [ x1, y1 ], [ x2, y2 ]), ax = x0 - oc[0], ay = y0 - oc[1], bx = x1 - oc[0], by = y1 - oc[1], kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2), lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Math.min(rc, (r0 - lc) / (kc - 1));\n          rc1 = Math.min(rc, (r1 - lc) / (kc + 1));\n        }\n        if (x1 != null) {\n          var t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1, cw), t12 = d3_svg_arcCornerTangents([ x1, y1 ], [ x2, y2 ], r1, rc1, cw);\n          if (rc === rc1) {\n            path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t30[1], \"A\", r1, \",\", r1, \" 0 \", 1 - cw ^ d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), \",\", cw, \" \", t12[1], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t12[0]);\n          } else {\n            path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 1,\", cr, \" \", t12[0]);\n          }\n        } else {\n          path.push(\"M\", x0, \",\", y0);\n        }\n        if (x3 != null) {\n          var t03 = d3_svg_arcCornerTangents([ x0, y0 ], [ x3, y3 ], r0, -rc0, cw), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0, cw);\n          if (rc === rc0) {\n            path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t21[1], \"A\", r0, \",\", r0, \" 0 \", cw ^ d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), \",\", 1 - cw, \" \", t03[1], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n          } else {\n            path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n          }\n        } else {\n          path.push(\"L\", x2, \",\", y2);\n        }\n      } else {\n        path.push(\"M\", x0, \",\", y0);\n        if (x1 != null) path.push(\"A\", r1, \",\", r1, \" 0 \", l1, \",\", cw, \" \", x1, \",\", y1);\n        path.push(\"L\", x2, \",\", y2);\n        if (x3 != null) path.push(\"A\", r0, \",\", r0, \" 0 \", l0, \",\", 1 - cw, \" \", x3, \",\", y3);\n      }\n      path.push(\"Z\");\n      return path.join(\"\");\n    }\n    function circleSegment(r1, cw) {\n      return \"M0,\" + r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + -r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + r1;\n    }\n    arc.innerRadius = function(v) {\n      if (!arguments.length) return innerRadius;\n      innerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.outerRadius = function(v) {\n      if (!arguments.length) return outerRadius;\n      outerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.cornerRadius = function(v) {\n      if (!arguments.length) return cornerRadius;\n      cornerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.padRadius = function(v) {\n      if (!arguments.length) return padRadius;\n      padRadius = v == d3_svg_arcAuto ? d3_svg_arcAuto : d3_functor(v);\n      return arc;\n    };\n    arc.startAngle = function(v) {\n      if (!arguments.length) return startAngle;\n      startAngle = d3_functor(v);\n      return arc;\n    };\n    arc.endAngle = function(v) {\n      if (!arguments.length) return endAngle;\n      endAngle = d3_functor(v);\n      return arc;\n    };\n    arc.padAngle = function(v) {\n      if (!arguments.length) return padAngle;\n      padAngle = d3_functor(v);\n      return arc;\n    };\n    arc.centroid = function() {\n      var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - halfπ;\n      return [ Math.cos(a) * r, Math.sin(a) * r ];\n    };\n    return arc;\n  };\n  var d3_svg_arcAuto = \"auto\";\n  function d3_svg_arcInnerRadius(d) {\n    return d.innerRadius;\n  }\n  function d3_svg_arcOuterRadius(d) {\n    return d.outerRadius;\n  }\n  function d3_svg_arcStartAngle(d) {\n    return d.startAngle;\n  }\n  function d3_svg_arcEndAngle(d) {\n    return d.endAngle;\n  }\n  function d3_svg_arcPadAngle(d) {\n    return d && d.padAngle;\n  }\n  function d3_svg_arcSweep(x0, y0, x1, y1) {\n    return (x0 - x1) * y0 - (y0 - y1) * x0 > 0 ? 0 : 1;\n  }\n  function d3_svg_arcCornerTangents(p0, p1, r1, rc, cw) {\n    var x01 = p0[0] - p1[0], y01 = p0[1] - p1[1], lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x1 = p0[0] + ox, y1 = p0[1] + oy, x2 = p1[0] + ox, y2 = p1[1] + oy, x3 = (x1 + x2) / 2, y3 = (y1 + y2) / 2, dx = x2 - x1, dy = y2 - y1, d2 = dx * dx + dy * dy, r = r1 - rc, D = x1 * y2 - x2 * y1, d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x3, dy0 = cy0 - y3, dx1 = cx1 - x3, dy1 = cy1 - y3;\n    if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n    return [ [ cx0 - ox, cy0 - oy ], [ cx0 * r1 / r, cy0 * r1 / r ] ];\n  }\n  function d3_svg_line(projection) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;\n    function line(data) {\n      var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);\n      function segment() {\n        segments.push(\"M\", interpolate(projection(points), tension));\n      }\n      while (++i < n) {\n        if (defined.call(this, d = data[i], i)) {\n          points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);\n        } else if (points.length) {\n          segment();\n          points = [];\n        }\n      }\n      if (points.length) segment();\n      return segments.length ? segments.join(\"\") : null;\n    }\n    line.x = function(_) {\n      if (!arguments.length) return x;\n      x = _;\n      return line;\n    };\n    line.y = function(_) {\n      if (!arguments.length) return y;\n      y = _;\n      return line;\n    };\n    line.defined = function(_) {\n      if (!arguments.length) return defined;\n      defined = _;\n      return line;\n    };\n    line.interpolate = function(_) {\n      if (!arguments.length) return interpolateKey;\n      if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n      return line;\n    };\n    line.tension = function(_) {\n      if (!arguments.length) return tension;\n      tension = _;\n      return line;\n    };\n    return line;\n  }\n  d3.svg.line = function() {\n    return d3_svg_line(d3_identity);\n  };\n  var d3_svg_lineInterpolators = d3.map({\n    linear: d3_svg_lineLinear,\n    \"linear-closed\": d3_svg_lineLinearClosed,\n    step: d3_svg_lineStep,\n    \"step-before\": d3_svg_lineStepBefore,\n    \"step-after\": d3_svg_lineStepAfter,\n    basis: d3_svg_lineBasis,\n    \"basis-open\": d3_svg_lineBasisOpen,\n    \"basis-closed\": d3_svg_lineBasisClosed,\n    bundle: d3_svg_lineBundle,\n    cardinal: d3_svg_lineCardinal,\n    \"cardinal-open\": d3_svg_lineCardinalOpen,\n    \"cardinal-closed\": d3_svg_lineCardinalClosed,\n    monotone: d3_svg_lineMonotone\n  });\n  d3_svg_lineInterpolators.forEach(function(key, value) {\n    value.key = key;\n    value.closed = /-closed$/.test(key);\n  });\n  function d3_svg_lineLinear(points) {\n    return points.length > 1 ? points.join(\"L\") : points + \"Z\";\n  }\n  function d3_svg_lineLinearClosed(points) {\n    return points.join(\"L\") + \"Z\";\n  }\n  function d3_svg_lineStep(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"H\", (p[0] + (p = points[i])[0]) / 2, \"V\", p[1]);\n    if (n > 1) path.push(\"H\", p[0]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineStepBefore(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"V\", (p = points[i])[1], \"H\", p[0]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineStepAfter(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"H\", (p = points[i])[0], \"V\", p[1]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineCardinalOpen(points, tension) {\n    return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension));\n  }\n  function d3_svg_lineCardinalClosed(points, tension) {\n    return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), \n    points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));\n  }\n  function d3_svg_lineCardinal(points, tension) {\n    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));\n  }\n  function d3_svg_lineHermite(points, tangents) {\n    if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {\n      return d3_svg_lineLinear(points);\n    }\n    var quad = points.length != tangents.length, path = \"\", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;\n    if (quad) {\n      path += \"Q\" + (p[0] - t0[0] * 2 / 3) + \",\" + (p[1] - t0[1] * 2 / 3) + \",\" + p[0] + \",\" + p[1];\n      p0 = points[1];\n      pi = 2;\n    }\n    if (tangents.length > 1) {\n      t = tangents[1];\n      p = points[pi];\n      pi++;\n      path += \"C\" + (p0[0] + t0[0]) + \",\" + (p0[1] + t0[1]) + \",\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n      for (var i = 2; i < tangents.length; i++, pi++) {\n        p = points[pi];\n        t = tangents[i];\n        path += \"S\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n      }\n    }\n    if (quad) {\n      var lp = points[pi];\n      path += \"Q\" + (p[0] + t[0] * 2 / 3) + \",\" + (p[1] + t[1] * 2 / 3) + \",\" + lp[0] + \",\" + lp[1];\n    }\n    return path;\n  }\n  function d3_svg_lineCardinalTangents(points, tension) {\n    var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;\n    while (++i < n) {\n      p0 = p1;\n      p1 = p2;\n      p2 = points[i];\n      tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);\n    }\n    return tangents;\n  }\n  function d3_svg_lineBasis(points) {\n    if (points.length < 3) return d3_svg_lineLinear(points);\n    var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, \",\", y0, \"L\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n    points.push(points[n - 1]);\n    while (++i <= n) {\n      pi = points[i];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    points.pop();\n    path.push(\"L\", pi);\n    return path.join(\"\");\n  }\n  function d3_svg_lineBasisOpen(points) {\n    if (points.length < 4) return d3_svg_lineLinear(points);\n    var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];\n    while (++i < 3) {\n      pi = points[i];\n      px.push(pi[0]);\n      py.push(pi[1]);\n    }\n    path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + \",\" + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));\n    --i;\n    while (++i < n) {\n      pi = points[i];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    return path.join(\"\");\n  }\n  function d3_svg_lineBasisClosed(points) {\n    var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];\n    while (++i < 4) {\n      pi = points[i % n];\n      px.push(pi[0]);\n      py.push(pi[1]);\n    }\n    path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n    --i;\n    while (++i < m) {\n      pi = points[i % n];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    return path.join(\"\");\n  }\n  function d3_svg_lineBundle(points, tension) {\n    var n = points.length - 1;\n    if (n) {\n      var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;\n      while (++i <= n) {\n        p = points[i];\n        t = i / n;\n        p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);\n        p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);\n      }\n    }\n    return d3_svg_lineBasis(points);\n  }\n  function d3_svg_lineDot4(a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n  }\n  var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];\n  function d3_svg_lineBasisBezier(path, x, y) {\n    path.push(\"C\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));\n  }\n  function d3_svg_lineSlope(p0, p1) {\n    return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n  }\n  function d3_svg_lineFiniteDifferences(points) {\n    var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);\n    while (++i < j) {\n      m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;\n    }\n    m[i] = d;\n    return m;\n  }\n  function d3_svg_lineMonotoneTangents(points) {\n    var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;\n    while (++i < j) {\n      d = d3_svg_lineSlope(points[i], points[i + 1]);\n      if (abs(d) < ε) {\n        m[i] = m[i + 1] = 0;\n      } else {\n        a = m[i] / d;\n        b = m[i + 1] / d;\n        s = a * a + b * b;\n        if (s > 9) {\n          s = d * 3 / Math.sqrt(s);\n          m[i] = s * a;\n          m[i + 1] = s * b;\n        }\n      }\n    }\n    i = -1;\n    while (++i <= j) {\n      s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));\n      tangents.push([ s || 0, m[i] * s || 0 ]);\n    }\n    return tangents;\n  }\n  function d3_svg_lineMonotone(points) {\n    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));\n  }\n  d3.svg.line.radial = function() {\n    var line = d3_svg_line(d3_svg_lineRadial);\n    line.radius = line.x, delete line.x;\n    line.angle = line.y, delete line.y;\n    return line;\n  };\n  function d3_svg_lineRadial(points) {\n    var point, i = -1, n = points.length, r, a;\n    while (++i < n) {\n      point = points[i];\n      r = point[0];\n      a = point[1] - halfπ;\n      point[0] = r * Math.cos(a);\n      point[1] = r * Math.sin(a);\n    }\n    return points;\n  }\n  function d3_svg_area(projection) {\n    var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = \"L\", tension = .7;\n    function area(data) {\n      var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {\n        return x;\n      } : d3_functor(x1), fy1 = y0 === y1 ? function() {\n        return y;\n      } : d3_functor(y1), x, y;\n      function segment() {\n        segments.push(\"M\", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), \"Z\");\n      }\n      while (++i < n) {\n        if (defined.call(this, d = data[i], i)) {\n          points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);\n          points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);\n        } else if (points0.length) {\n          segment();\n          points0 = [];\n          points1 = [];\n        }\n      }\n      if (points0.length) segment();\n      return segments.length ? segments.join(\"\") : null;\n    }\n    area.x = function(_) {\n      if (!arguments.length) return x1;\n      x0 = x1 = _;\n      return area;\n    };\n    area.x0 = function(_) {\n      if (!arguments.length) return x0;\n      x0 = _;\n      return area;\n    };\n    area.x1 = function(_) {\n      if (!arguments.length) return x1;\n      x1 = _;\n      return area;\n    };\n    area.y = function(_) {\n      if (!arguments.length) return y1;\n      y0 = y1 = _;\n      return area;\n    };\n    area.y0 = function(_) {\n      if (!arguments.length) return y0;\n      y0 = _;\n      return area;\n    };\n    area.y1 = function(_) {\n      if (!arguments.length) return y1;\n      y1 = _;\n      return area;\n    };\n    area.defined = function(_) {\n      if (!arguments.length) return defined;\n      defined = _;\n      return area;\n    };\n    area.interpolate = function(_) {\n      if (!arguments.length) return interpolateKey;\n      if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n      interpolateReverse = interpolate.reverse || interpolate;\n      L = interpolate.closed ? \"M\" : \"L\";\n      return area;\n    };\n    area.tension = function(_) {\n      if (!arguments.length) return tension;\n      tension = _;\n      return area;\n    };\n    return area;\n  }\n  d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;\n  d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;\n  d3.svg.area = function() {\n    return d3_svg_area(d3_identity);\n  };\n  d3.svg.area.radial = function() {\n    var area = d3_svg_area(d3_svg_lineRadial);\n    area.radius = area.x, delete area.x;\n    area.innerRadius = area.x0, delete area.x0;\n    area.outerRadius = area.x1, delete area.x1;\n    area.angle = area.y, delete area.y;\n    area.startAngle = area.y0, delete area.y0;\n    area.endAngle = area.y1, delete area.y1;\n    return area;\n  };\n  d3.svg.chord = function() {\n    var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;\n    function chord(d, i) {\n      var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);\n      return \"M\" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + \"Z\";\n    }\n    function subgroup(self, f, d, i) {\n      var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) - halfπ, a1 = endAngle.call(self, subgroup, i) - halfπ;\n      return {\n        r: r,\n        a0: a0,\n        a1: a1,\n        p0: [ r * Math.cos(a0), r * Math.sin(a0) ],\n        p1: [ r * Math.cos(a1), r * Math.sin(a1) ]\n      };\n    }\n    function equals(a, b) {\n      return a.a0 == b.a0 && a.a1 == b.a1;\n    }\n    function arc(r, p, a) {\n      return \"A\" + r + \",\" + r + \" 0 \" + +(a > π) + \",1 \" + p;\n    }\n    function curve(r0, p0, r1, p1) {\n      return \"Q 0,0 \" + p1;\n    }\n    chord.radius = function(v) {\n      if (!arguments.length) return radius;\n      radius = d3_functor(v);\n      return chord;\n    };\n    chord.source = function(v) {\n      if (!arguments.length) return source;\n      source = d3_functor(v);\n      return chord;\n    };\n    chord.target = function(v) {\n      if (!arguments.length) return target;\n      target = d3_functor(v);\n      return chord;\n    };\n    chord.startAngle = function(v) {\n      if (!arguments.length) return startAngle;\n      startAngle = d3_functor(v);\n      return chord;\n    };\n    chord.endAngle = function(v) {\n      if (!arguments.length) return endAngle;\n      endAngle = d3_functor(v);\n      return chord;\n    };\n    return chord;\n  };\n  function d3_svg_chordRadius(d) {\n    return d.radius;\n  }\n  d3.svg.diagonal = function() {\n    var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;\n    function diagonal(d, i) {\n      var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {\n        x: p0.x,\n        y: m\n      }, {\n        x: p3.x,\n        y: m\n      }, p3 ];\n      p = p.map(projection);\n      return \"M\" + p[0] + \"C\" + p[1] + \" \" + p[2] + \" \" + p[3];\n    }\n    diagonal.source = function(x) {\n      if (!arguments.length) return source;\n      source = d3_functor(x);\n      return diagonal;\n    };\n    diagonal.target = function(x) {\n      if (!arguments.length) return target;\n      target = d3_functor(x);\n      return diagonal;\n    };\n    diagonal.projection = function(x) {\n      if (!arguments.length) return projection;\n      projection = x;\n      return diagonal;\n    };\n    return diagonal;\n  };\n  function d3_svg_diagonalProjection(d) {\n    return [ d.x, d.y ];\n  }\n  d3.svg.diagonal.radial = function() {\n    var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;\n    diagonal.projection = function(x) {\n      return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;\n    };\n    return diagonal;\n  };\n  function d3_svg_diagonalRadialProjection(projection) {\n    return function() {\n      var d = projection.apply(this, arguments), r = d[0], a = d[1] - halfπ;\n      return [ r * Math.cos(a), r * Math.sin(a) ];\n    };\n  }\n  d3.svg.symbol = function() {\n    var type = d3_svg_symbolType, size = d3_svg_symbolSize;\n    function symbol(d, i) {\n      return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));\n    }\n    symbol.type = function(x) {\n      if (!arguments.length) return type;\n      type = d3_functor(x);\n      return symbol;\n    };\n    symbol.size = function(x) {\n      if (!arguments.length) return size;\n      size = d3_functor(x);\n      return symbol;\n    };\n    return symbol;\n  };\n  function d3_svg_symbolSize() {\n    return 64;\n  }\n  function d3_svg_symbolType() {\n    return \"circle\";\n  }\n  function d3_svg_symbolCircle(size) {\n    var r = Math.sqrt(size / π);\n    return \"M0,\" + r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + -r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + r + \"Z\";\n  }\n  var d3_svg_symbols = d3.map({\n    circle: d3_svg_symbolCircle,\n    cross: function(size) {\n      var r = Math.sqrt(size / 5) / 2;\n      return \"M\" + -3 * r + \",\" + -r + \"H\" + -r + \"V\" + -3 * r + \"H\" + r + \"V\" + -r + \"H\" + 3 * r + \"V\" + r + \"H\" + r + \"V\" + 3 * r + \"H\" + -r + \"V\" + r + \"H\" + -3 * r + \"Z\";\n    },\n    diamond: function(size) {\n      var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;\n      return \"M0,\" + -ry + \"L\" + rx + \",0\" + \" 0,\" + ry + \" \" + -rx + \",0\" + \"Z\";\n    },\n    square: function(size) {\n      var r = Math.sqrt(size) / 2;\n      return \"M\" + -r + \",\" + -r + \"L\" + r + \",\" + -r + \" \" + r + \",\" + r + \" \" + -r + \",\" + r + \"Z\";\n    },\n    \"triangle-down\": function(size) {\n      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n      return \"M0,\" + ry + \"L\" + rx + \",\" + -ry + \" \" + -rx + \",\" + -ry + \"Z\";\n    },\n    \"triangle-up\": function(size) {\n      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n      return \"M0,\" + -ry + \"L\" + rx + \",\" + ry + \" \" + -rx + \",\" + ry + \"Z\";\n    }\n  });\n  d3.svg.symbolTypes = d3_svg_symbols.keys();\n  var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);\n  d3_selectionPrototype.transition = function(name) {\n    var id = d3_transitionInheritId || ++d3_transitionId, ns = d3_transitionNamespace(name), subgroups = [], subgroup, node, transition = d3_transitionInherit || {\n      time: Date.now(),\n      ease: d3_ease_cubicInOut,\n      delay: 0,\n      duration: 250\n    };\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) d3_transitionNode(node, i, ns, id, transition);\n        subgroup.push(node);\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_selectionPrototype.interrupt = function(name) {\n    return this.each(name == null ? d3_selection_interrupt : d3_selection_interruptNS(d3_transitionNamespace(name)));\n  };\n  var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace());\n  function d3_selection_interruptNS(ns) {\n    return function() {\n      var lock, activeId, active;\n      if ((lock = this[ns]) && (active = lock[activeId = lock.active])) {\n        active.timer.c = null;\n        active.timer.t = NaN;\n        if (--lock.count) delete lock[activeId]; else delete this[ns];\n        lock.active += .5;\n        active.event && active.event.interrupt.call(this, this.__data__, active.index);\n      }\n    };\n  }\n  function d3_transition(groups, ns, id) {\n    d3_subclass(groups, d3_transitionPrototype);\n    groups.namespace = ns;\n    groups.id = id;\n    return groups;\n  }\n  var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;\n  d3_transitionPrototype.call = d3_selectionPrototype.call;\n  d3_transitionPrototype.empty = d3_selectionPrototype.empty;\n  d3_transitionPrototype.node = d3_selectionPrototype.node;\n  d3_transitionPrototype.size = d3_selectionPrototype.size;\n  d3.transition = function(selection, name) {\n    return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection);\n  };\n  d3.transition.prototype = d3_transitionPrototype;\n  d3_transitionPrototype.select = function(selector) {\n    var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnode, node;\n    selector = d3_selection_selector(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {\n          if (\"__data__\" in node) subnode.__data__ = node.__data__;\n          d3_transitionNode(subnode, i, ns, id, node[ns][id]);\n          subgroup.push(subnode);\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_transitionPrototype.selectAll = function(selector) {\n    var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnodes, node, subnode, transition;\n    selector = d3_selection_selectorAll(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          transition = node[ns][id];\n          subnodes = selector.call(node, node.__data__, i, j);\n          subgroups.push(subgroup = []);\n          for (var k = -1, o = subnodes.length; ++k < o; ) {\n            if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition);\n            subgroup.push(subnode);\n          }\n        }\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_transitionPrototype.filter = function(filter) {\n    var subgroups = [], subgroup, group, node;\n    if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n          subgroup.push(node);\n        }\n      }\n    }\n    return d3_transition(subgroups, this.namespace, this.id);\n  };\n  d3_transitionPrototype.tween = function(name, tween) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 2) return this.node()[ns][id].tween.get(name);\n    return d3_selection_each(this, tween == null ? function(node) {\n      node[ns][id].tween.remove(name);\n    } : function(node) {\n      node[ns][id].tween.set(name, tween);\n    });\n  };\n  function d3_transition_tween(groups, name, value, tween) {\n    var id = groups.id, ns = groups.namespace;\n    return d3_selection_each(groups, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j)));\n    } : (value = tween(value), function(node) {\n      node[ns][id].tween.set(name, value);\n    }));\n  }\n  d3_transitionPrototype.attr = function(nameNS, value) {\n    if (arguments.length < 2) {\n      for (value in nameNS) this.attr(value, nameNS[value]);\n      return this;\n    }\n    var interpolate = nameNS == \"transform\" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS);\n    function attrNull() {\n      this.removeAttribute(name);\n    }\n    function attrNullNS() {\n      this.removeAttributeNS(name.space, name.local);\n    }\n    function attrTween(b) {\n      return b == null ? attrNull : (b += \"\", function() {\n        var a = this.getAttribute(name), i;\n        return a !== b && (i = interpolate(a, b), function(t) {\n          this.setAttribute(name, i(t));\n        });\n      });\n    }\n    function attrTweenNS(b) {\n      return b == null ? attrNullNS : (b += \"\", function() {\n        var a = this.getAttributeNS(name.space, name.local), i;\n        return a !== b && (i = interpolate(a, b), function(t) {\n          this.setAttributeNS(name.space, name.local, i(t));\n        });\n      });\n    }\n    return d3_transition_tween(this, \"attr.\" + nameNS, value, name.local ? attrTweenNS : attrTween);\n  };\n  d3_transitionPrototype.attrTween = function(nameNS, tween) {\n    var name = d3.ns.qualify(nameNS);\n    function attrTween(d, i) {\n      var f = tween.call(this, d, i, this.getAttribute(name));\n      return f && function(t) {\n        this.setAttribute(name, f(t));\n      };\n    }\n    function attrTweenNS(d, i) {\n      var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));\n      return f && function(t) {\n        this.setAttributeNS(name.space, name.local, f(t));\n      };\n    }\n    return this.tween(\"attr.\" + nameNS, name.local ? attrTweenNS : attrTween);\n  };\n  d3_transitionPrototype.style = function(name, value, priority) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof name !== \"string\") {\n        if (n < 2) value = \"\";\n        for (priority in name) this.style(priority, name[priority], value);\n        return this;\n      }\n      priority = \"\";\n    }\n    function styleNull() {\n      this.style.removeProperty(name);\n    }\n    function styleString(b) {\n      return b == null ? styleNull : (b += \"\", function() {\n        var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;\n        return a !== b && (i = d3_interpolate(a, b), function(t) {\n          this.style.setProperty(name, i(t), priority);\n        });\n      });\n    }\n    return d3_transition_tween(this, \"style.\" + name, value, styleString);\n  };\n  d3_transitionPrototype.styleTween = function(name, tween, priority) {\n    if (arguments.length < 3) priority = \"\";\n    function styleTween(d, i) {\n      var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));\n      return f && function(t) {\n        this.style.setProperty(name, f(t), priority);\n      };\n    }\n    return this.tween(\"style.\" + name, styleTween);\n  };\n  d3_transitionPrototype.text = function(value) {\n    return d3_transition_tween(this, \"text\", value, d3_transition_text);\n  };\n  function d3_transition_text(b) {\n    if (b == null) b = \"\";\n    return function() {\n      this.textContent = b;\n    };\n  }\n  d3_transitionPrototype.remove = function() {\n    var ns = this.namespace;\n    return this.each(\"end.transition\", function() {\n      var p;\n      if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this);\n    });\n  };\n  d3_transitionPrototype.ease = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].ease;\n    if (typeof value !== \"function\") value = d3.ease.apply(d3, arguments);\n    return d3_selection_each(this, function(node) {\n      node[ns][id].ease = value;\n    });\n  };\n  d3_transitionPrototype.delay = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].delay;\n    return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].delay = +value.call(node, node.__data__, i, j);\n    } : (value = +value, function(node) {\n      node[ns][id].delay = value;\n    }));\n  };\n  d3_transitionPrototype.duration = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].duration;\n    return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j));\n    } : (value = Math.max(1, value), function(node) {\n      node[ns][id].duration = value;\n    }));\n  };\n  d3_transitionPrototype.each = function(type, listener) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 2) {\n      var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;\n      try {\n        d3_transitionInheritId = id;\n        d3_selection_each(this, function(node, i, j) {\n          d3_transitionInherit = node[ns][id];\n          type.call(node, node.__data__, i, j);\n        });\n      } finally {\n        d3_transitionInherit = inherit;\n        d3_transitionInheritId = inheritId;\n      }\n    } else {\n      d3_selection_each(this, function(node) {\n        var transition = node[ns][id];\n        (transition.event || (transition.event = d3.dispatch(\"start\", \"end\", \"interrupt\"))).on(type, listener);\n      });\n    }\n    return this;\n  };\n  d3_transitionPrototype.transition = function() {\n    var id0 = this.id, id1 = ++d3_transitionId, ns = this.namespace, subgroups = [], subgroup, group, node, transition;\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        if (node = group[i]) {\n          transition = node[ns][id0];\n          d3_transitionNode(node, i, ns, id1, {\n            time: transition.time,\n            ease: transition.ease,\n            delay: transition.delay + transition.duration,\n            duration: transition.duration\n          });\n        }\n        subgroup.push(node);\n      }\n    }\n    return d3_transition(subgroups, ns, id1);\n  };\n  function d3_transitionNamespace(name) {\n    return name == null ? \"__transition__\" : \"__transition_\" + name + \"__\";\n  }\n  function d3_transitionNode(node, i, ns, id, inherit) {\n    var lock = node[ns] || (node[ns] = {\n      active: 0,\n      count: 0\n    }), transition = lock[id], time, timer, duration, ease, tweens;\n    function schedule(elapsed) {\n      var delay = transition.delay;\n      timer.t = delay + time;\n      if (delay <= elapsed) return start(elapsed - delay);\n      timer.c = start;\n    }\n    function start(elapsed) {\n      var activeId = lock.active, active = lock[activeId];\n      if (active) {\n        active.timer.c = null;\n        active.timer.t = NaN;\n        --lock.count;\n        delete lock[activeId];\n        active.event && active.event.interrupt.call(node, node.__data__, active.index);\n      }\n      for (var cancelId in lock) {\n        if (+cancelId < id) {\n          var cancel = lock[cancelId];\n          cancel.timer.c = null;\n          cancel.timer.t = NaN;\n          --lock.count;\n          delete lock[cancelId];\n        }\n      }\n      timer.c = tick;\n      d3_timer(function() {\n        if (timer.c && tick(elapsed || 1)) {\n          timer.c = null;\n          timer.t = NaN;\n        }\n        return 1;\n      }, 0, time);\n      lock.active = id;\n      transition.event && transition.event.start.call(node, node.__data__, i);\n      tweens = [];\n      transition.tween.forEach(function(key, value) {\n        if (value = value.call(node, node.__data__, i)) {\n          tweens.push(value);\n        }\n      });\n      ease = transition.ease;\n      duration = transition.duration;\n    }\n    function tick(elapsed) {\n      var t = elapsed / duration, e = ease(t), n = tweens.length;\n      while (n > 0) {\n        tweens[--n].call(node, e);\n      }\n      if (t >= 1) {\n        transition.event && transition.event.end.call(node, node.__data__, i);\n        if (--lock.count) delete lock[id]; else delete node[ns];\n        return 1;\n      }\n    }\n    if (!transition) {\n      time = inherit.time;\n      timer = d3_timer(schedule, 0, time);\n      transition = lock[id] = {\n        tween: new d3_Map(),\n        time: time,\n        timer: timer,\n        delay: inherit.delay,\n        duration: inherit.duration,\n        ease: inherit.ease,\n        index: i\n      };\n      inherit = null;\n      ++lock.count;\n    }\n  }\n  d3.svg.axis = function() {\n    var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;\n    function axis(g) {\n      g.each(function() {\n        var g = d3.select(this);\n        var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();\n        var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(\".tick\").data(ticks, scale1), tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\").style(\"opacity\", ε), tickExit = d3.transition(tick.exit()).style(\"opacity\", ε).remove(), tickUpdate = d3.transition(tick.order()).style(\"opacity\", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform;\n        var range = d3_scaleRange(scale1), path = g.selectAll(\".domain\").data([ 0 ]), pathUpdate = (path.enter().append(\"path\").attr(\"class\", \"domain\"), \n        d3.transition(path));\n        tickEnter.append(\"line\");\n        tickEnter.append(\"text\");\n        var lineEnter = tickEnter.select(\"line\"), lineUpdate = tickUpdate.select(\"line\"), text = tick.select(\"text\").text(tickFormat), textEnter = tickEnter.select(\"text\"), textUpdate = tickUpdate.select(\"text\"), sign = orient === \"top\" || orient === \"left\" ? -1 : 1, x1, x2, y1, y2;\n        if (orient === \"bottom\" || orient === \"top\") {\n          tickTransform = d3_svg_axisX, x1 = \"x\", y1 = \"y\", x2 = \"x2\", y2 = \"y2\";\n          text.attr(\"dy\", sign < 0 ? \"0em\" : \".71em\").style(\"text-anchor\", \"middle\");\n          pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + sign * outerTickSize + \"V0H\" + range[1] + \"V\" + sign * outerTickSize);\n        } else {\n          tickTransform = d3_svg_axisY, x1 = \"y\", y1 = \"x\", x2 = \"y2\", y2 = \"x2\";\n          text.attr(\"dy\", \".32em\").style(\"text-anchor\", sign < 0 ? \"end\" : \"start\");\n          pathUpdate.attr(\"d\", \"M\" + sign * outerTickSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + sign * outerTickSize);\n        }\n        lineEnter.attr(y2, sign * innerTickSize);\n        textEnter.attr(y1, sign * tickSpacing);\n        lineUpdate.attr(x2, 0).attr(y2, sign * innerTickSize);\n        textUpdate.attr(x1, 0).attr(y1, sign * tickSpacing);\n        if (scale1.rangeBand) {\n          var x = scale1, dx = x.rangeBand() / 2;\n          scale0 = scale1 = function(d) {\n            return x(d) + dx;\n          };\n        } else if (scale0.rangeBand) {\n          scale0 = scale1;\n        } else {\n          tickExit.call(tickTransform, scale1, scale0);\n        }\n        tickEnter.call(tickTransform, scale0, scale1);\n        tickUpdate.call(tickTransform, scale1, scale1);\n      });\n    }\n    axis.scale = function(x) {\n      if (!arguments.length) return scale;\n      scale = x;\n      return axis;\n    };\n    axis.orient = function(x) {\n      if (!arguments.length) return orient;\n      orient = x in d3_svg_axisOrients ? x + \"\" : d3_svg_axisDefaultOrient;\n      return axis;\n    };\n    axis.ticks = function() {\n      if (!arguments.length) return tickArguments_;\n      tickArguments_ = d3_array(arguments);\n      return axis;\n    };\n    axis.tickValues = function(x) {\n      if (!arguments.length) return tickValues;\n      tickValues = x;\n      return axis;\n    };\n    axis.tickFormat = function(x) {\n      if (!arguments.length) return tickFormat_;\n      tickFormat_ = x;\n      return axis;\n    };\n    axis.tickSize = function(x) {\n      var n = arguments.length;\n      if (!n) return innerTickSize;\n      innerTickSize = +x;\n      outerTickSize = +arguments[n - 1];\n      return axis;\n    };\n    axis.innerTickSize = function(x) {\n      if (!arguments.length) return innerTickSize;\n      innerTickSize = +x;\n      return axis;\n    };\n    axis.outerTickSize = function(x) {\n      if (!arguments.length) return outerTickSize;\n      outerTickSize = +x;\n      return axis;\n    };\n    axis.tickPadding = function(x) {\n      if (!arguments.length) return tickPadding;\n      tickPadding = +x;\n      return axis;\n    };\n    axis.tickSubdivide = function() {\n      return arguments.length && axis;\n    };\n    return axis;\n  };\n  var d3_svg_axisDefaultOrient = \"bottom\", d3_svg_axisOrients = {\n    top: 1,\n    right: 1,\n    bottom: 1,\n    left: 1\n  };\n  function d3_svg_axisX(selection, x0, x1) {\n    selection.attr(\"transform\", function(d) {\n      var v0 = x0(d);\n      return \"translate(\" + (isFinite(v0) ? v0 : x1(d)) + \",0)\";\n    });\n  }\n  function d3_svg_axisY(selection, y0, y1) {\n    selection.attr(\"transform\", function(d) {\n      var v0 = y0(d);\n      return \"translate(0,\" + (isFinite(v0) ? v0 : y1(d)) + \")\";\n    });\n  }\n  d3.svg.brush = function() {\n    var event = d3_eventDispatch(brush, \"brushstart\", \"brush\", \"brushend\"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];\n    function brush(g) {\n      g.each(function() {\n        var g = d3.select(this).style(\"pointer-events\", \"all\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\").on(\"mousedown.brush\", brushstart).on(\"touchstart.brush\", brushstart);\n        var background = g.selectAll(\".background\").data([ 0 ]);\n        background.enter().append(\"rect\").attr(\"class\", \"background\").style(\"visibility\", \"hidden\").style(\"cursor\", \"crosshair\");\n        g.selectAll(\".extent\").data([ 0 ]).enter().append(\"rect\").attr(\"class\", \"extent\").style(\"cursor\", \"move\");\n        var resize = g.selectAll(\".resize\").data(resizes, d3_identity);\n        resize.exit().remove();\n        resize.enter().append(\"g\").attr(\"class\", function(d) {\n          return \"resize \" + d;\n        }).style(\"cursor\", function(d) {\n          return d3_svg_brushCursor[d];\n        }).append(\"rect\").attr(\"x\", function(d) {\n          return /[ew]$/.test(d) ? -3 : null;\n        }).attr(\"y\", function(d) {\n          return /^[ns]/.test(d) ? -3 : null;\n        }).attr(\"width\", 6).attr(\"height\", 6).style(\"visibility\", \"hidden\");\n        resize.style(\"display\", brush.empty() ? \"none\" : null);\n        var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range;\n        if (x) {\n          range = d3_scaleRange(x);\n          backgroundUpdate.attr(\"x\", range[0]).attr(\"width\", range[1] - range[0]);\n          redrawX(gUpdate);\n        }\n        if (y) {\n          range = d3_scaleRange(y);\n          backgroundUpdate.attr(\"y\", range[0]).attr(\"height\", range[1] - range[0]);\n          redrawY(gUpdate);\n        }\n        redraw(gUpdate);\n      });\n    }\n    brush.event = function(g) {\n      g.each(function() {\n        var event_ = event.of(this, arguments), extent1 = {\n          x: xExtent,\n          y: yExtent,\n          i: xExtentDomain,\n          j: yExtentDomain\n        }, extent0 = this.__chart__ || extent1;\n        this.__chart__ = extent1;\n        if (d3_transitionInheritId) {\n          d3.select(this).transition().each(\"start.brush\", function() {\n            xExtentDomain = extent0.i;\n            yExtentDomain = extent0.j;\n            xExtent = extent0.x;\n            yExtent = extent0.y;\n            event_({\n              type: \"brushstart\"\n            });\n          }).tween(\"brush:brush\", function() {\n            var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y);\n            xExtentDomain = yExtentDomain = null;\n            return function(t) {\n              xExtent = extent1.x = xi(t);\n              yExtent = extent1.y = yi(t);\n              event_({\n                type: \"brush\",\n                mode: \"resize\"\n              });\n            };\n          }).each(\"end.brush\", function() {\n            xExtentDomain = extent1.i;\n            yExtentDomain = extent1.j;\n            event_({\n              type: \"brush\",\n              mode: \"resize\"\n            });\n            event_({\n              type: \"brushend\"\n            });\n          });\n        } else {\n          event_({\n            type: \"brushstart\"\n          });\n          event_({\n            type: \"brush\",\n            mode: \"resize\"\n          });\n          event_({\n            type: \"brushend\"\n          });\n        }\n      });\n    };\n    function redraw(g) {\n      g.selectAll(\".resize\").attr(\"transform\", function(d) {\n        return \"translate(\" + xExtent[+/e$/.test(d)] + \",\" + yExtent[+/^s/.test(d)] + \")\";\n      });\n    }\n    function redrawX(g) {\n      g.select(\".extent\").attr(\"x\", xExtent[0]);\n      g.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\", xExtent[1] - xExtent[0]);\n    }\n    function redrawY(g) {\n      g.select(\".extent\").attr(\"y\", yExtent[0]);\n      g.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\", yExtent[1] - yExtent[0]);\n    }\n    function brushstart() {\n      var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed(\"extent\"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset;\n      var w = d3.select(d3_window(target)).on(\"keydown.brush\", keydown).on(\"keyup.brush\", keyup);\n      if (d3.event.changedTouches) {\n        w.on(\"touchmove.brush\", brushmove).on(\"touchend.brush\", brushend);\n      } else {\n        w.on(\"mousemove.brush\", brushmove).on(\"mouseup.brush\", brushend);\n      }\n      g.interrupt().selectAll(\"*\").interrupt();\n      if (dragging) {\n        origin[0] = xExtent[0] - origin[0];\n        origin[1] = yExtent[0] - origin[1];\n      } else if (resizing) {\n        var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);\n        offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ];\n        origin[0] = xExtent[ex];\n        origin[1] = yExtent[ey];\n      } else if (d3.event.altKey) center = origin.slice();\n      g.style(\"pointer-events\", \"none\").selectAll(\".resize\").style(\"display\", null);\n      d3.select(\"body\").style(\"cursor\", eventTarget.style(\"cursor\"));\n      event_({\n        type: \"brushstart\"\n      });\n      brushmove();\n      function keydown() {\n        if (d3.event.keyCode == 32) {\n          if (!dragging) {\n            center = null;\n            origin[0] -= xExtent[1];\n            origin[1] -= yExtent[1];\n            dragging = 2;\n          }\n          d3_eventPreventDefault();\n        }\n      }\n      function keyup() {\n        if (d3.event.keyCode == 32 && dragging == 2) {\n          origin[0] += xExtent[1];\n          origin[1] += yExtent[1];\n          dragging = 0;\n          d3_eventPreventDefault();\n        }\n      }\n      function brushmove() {\n        var point = d3.mouse(target), moved = false;\n        if (offset) {\n          point[0] += offset[0];\n          point[1] += offset[1];\n        }\n        if (!dragging) {\n          if (d3.event.altKey) {\n            if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ];\n            origin[0] = xExtent[+(point[0] < center[0])];\n            origin[1] = yExtent[+(point[1] < center[1])];\n          } else center = null;\n        }\n        if (resizingX && move1(point, x, 0)) {\n          redrawX(g);\n          moved = true;\n        }\n        if (resizingY && move1(point, y, 1)) {\n          redrawY(g);\n          moved = true;\n        }\n        if (moved) {\n          redraw(g);\n          event_({\n            type: \"brush\",\n            mode: dragging ? \"move\" : \"resize\"\n          });\n        }\n      }\n      function move1(point, scale, i) {\n        var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max;\n        if (dragging) {\n          r0 -= position;\n          r1 -= size + position;\n        }\n        min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i];\n        if (dragging) {\n          max = (min += position) + size;\n        } else {\n          if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));\n          if (position < min) {\n            max = min;\n            min = position;\n          } else {\n            max = position;\n          }\n        }\n        if (extent[0] != min || extent[1] != max) {\n          if (i) yExtentDomain = null; else xExtentDomain = null;\n          extent[0] = min;\n          extent[1] = max;\n          return true;\n        }\n      }\n      function brushend() {\n        brushmove();\n        g.style(\"pointer-events\", \"all\").selectAll(\".resize\").style(\"display\", brush.empty() ? \"none\" : null);\n        d3.select(\"body\").style(\"cursor\", null);\n        w.on(\"mousemove.brush\", null).on(\"mouseup.brush\", null).on(\"touchmove.brush\", null).on(\"touchend.brush\", null).on(\"keydown.brush\", null).on(\"keyup.brush\", null);\n        dragRestore();\n        event_({\n          type: \"brushend\"\n        });\n      }\n    }\n    brush.x = function(z) {\n      if (!arguments.length) return x;\n      x = z;\n      resizes = d3_svg_brushResizes[!x << 1 | !y];\n      return brush;\n    };\n    brush.y = function(z) {\n      if (!arguments.length) return y;\n      y = z;\n      resizes = d3_svg_brushResizes[!x << 1 | !y];\n      return brush;\n    };\n    brush.clamp = function(z) {\n      if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null;\n      if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z;\n      return brush;\n    };\n    brush.extent = function(z) {\n      var x0, x1, y0, y1, t;\n      if (!arguments.length) {\n        if (x) {\n          if (xExtentDomain) {\n            x0 = xExtentDomain[0], x1 = xExtentDomain[1];\n          } else {\n            x0 = xExtent[0], x1 = xExtent[1];\n            if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);\n            if (x1 < x0) t = x0, x0 = x1, x1 = t;\n          }\n        }\n        if (y) {\n          if (yExtentDomain) {\n            y0 = yExtentDomain[0], y1 = yExtentDomain[1];\n          } else {\n            y0 = yExtent[0], y1 = yExtent[1];\n            if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);\n            if (y1 < y0) t = y0, y0 = y1, y1 = t;\n          }\n        }\n        return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];\n      }\n      if (x) {\n        x0 = z[0], x1 = z[1];\n        if (y) x0 = x0[0], x1 = x1[0];\n        xExtentDomain = [ x0, x1 ];\n        if (x.invert) x0 = x(x0), x1 = x(x1);\n        if (x1 < x0) t = x0, x0 = x1, x1 = t;\n        if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ];\n      }\n      if (y) {\n        y0 = z[0], y1 = z[1];\n        if (x) y0 = y0[1], y1 = y1[1];\n        yExtentDomain = [ y0, y1 ];\n        if (y.invert) y0 = y(y0), y1 = y(y1);\n        if (y1 < y0) t = y0, y0 = y1, y1 = t;\n        if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ];\n      }\n      return brush;\n    };\n    brush.clear = function() {\n      if (!brush.empty()) {\n        xExtent = [ 0, 0 ], yExtent = [ 0, 0 ];\n        xExtentDomain = yExtentDomain = null;\n      }\n      return brush;\n    };\n    brush.empty = function() {\n      return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1];\n    };\n    return d3.rebind(brush, event, \"on\");\n  };\n  var d3_svg_brushCursor = {\n    n: \"ns-resize\",\n    e: \"ew-resize\",\n    s: \"ns-resize\",\n    w: \"ew-resize\",\n    nw: \"nwse-resize\",\n    ne: \"nesw-resize\",\n    se: \"nwse-resize\",\n    sw: \"nesw-resize\"\n  };\n  var d3_svg_brushResizes = [ [ \"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\" ], [ \"e\", \"w\" ], [ \"n\", \"s\" ], [] ];\n  var d3_time_format = d3_time.format = d3_locale_enUS.timeFormat;\n  var d3_time_formatUtc = d3_time_format.utc;\n  var d3_time_formatIso = d3_time_formatUtc(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n  d3_time_format.iso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\") ? d3_time_formatIsoNative : d3_time_formatIso;\n  function d3_time_formatIsoNative(date) {\n    return date.toISOString();\n  }\n  d3_time_formatIsoNative.parse = function(string) {\n    var date = new Date(string);\n    return isNaN(date) ? null : date;\n  };\n  d3_time_formatIsoNative.toString = d3_time_formatIso.toString;\n  d3_time.second = d3_time_interval(function(date) {\n    return new d3_date(Math.floor(date / 1e3) * 1e3);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 1e3);\n  }, function(date) {\n    return date.getSeconds();\n  });\n  d3_time.seconds = d3_time.second.range;\n  d3_time.seconds.utc = d3_time.second.utc.range;\n  d3_time.minute = d3_time_interval(function(date) {\n    return new d3_date(Math.floor(date / 6e4) * 6e4);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 6e4);\n  }, function(date) {\n    return date.getMinutes();\n  });\n  d3_time.minutes = d3_time.minute.range;\n  d3_time.minutes.utc = d3_time.minute.utc.range;\n  d3_time.hour = d3_time_interval(function(date) {\n    var timezone = date.getTimezoneOffset() / 60;\n    return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 36e5);\n  }, function(date) {\n    return date.getHours();\n  });\n  d3_time.hours = d3_time.hour.range;\n  d3_time.hours.utc = d3_time.hour.utc.range;\n  d3_time.month = d3_time_interval(function(date) {\n    date = d3_time.day(date);\n    date.setDate(1);\n    return date;\n  }, function(date, offset) {\n    date.setMonth(date.getMonth() + offset);\n  }, function(date) {\n    return date.getMonth();\n  });\n  d3_time.months = d3_time.month.range;\n  d3_time.months.utc = d3_time.month.utc.range;\n  function d3_time_scale(linear, methods, format) {\n    function scale(x) {\n      return linear(x);\n    }\n    scale.invert = function(x) {\n      return d3_time_scaleDate(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return linear.domain().map(d3_time_scaleDate);\n      linear.domain(x);\n      return scale;\n    };\n    function tickMethod(extent, count) {\n      var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target);\n      return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {\n        return d / 31536e6;\n      }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i];\n    }\n    scale.nice = function(interval, skip) {\n      var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" && tickMethod(extent, interval);\n      if (method) interval = method[0], skip = method[1];\n      function skipped(date) {\n        return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;\n      }\n      return scale.domain(d3_scale_nice(domain, skip > 1 ? {\n        floor: function(date) {\n          while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1);\n          return date;\n        },\n        ceil: function(date) {\n          while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1);\n          return date;\n        }\n      } : interval));\n    };\n    scale.ticks = function(interval, skip) {\n      var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" ? tickMethod(extent, interval) : !interval.range && [ {\n        range: interval\n      }, skip ];\n      if (method) interval = method[0], skip = method[1];\n      return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip);\n    };\n    scale.tickFormat = function() {\n      return format;\n    };\n    scale.copy = function() {\n      return d3_time_scale(linear.copy(), methods, format);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  function d3_time_scaleDate(t) {\n    return new Date(t);\n  }\n  var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];\n  var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ];\n  var d3_time_scaleLocalFormat = d3_time_format.multi([ [ \".%L\", function(d) {\n    return d.getMilliseconds();\n  } ], [ \":%S\", function(d) {\n    return d.getSeconds();\n  } ], [ \"%I:%M\", function(d) {\n    return d.getMinutes();\n  } ], [ \"%I %p\", function(d) {\n    return d.getHours();\n  } ], [ \"%a %d\", function(d) {\n    return d.getDay() && d.getDate() != 1;\n  } ], [ \"%b %d\", function(d) {\n    return d.getDate() != 1;\n  } ], [ \"%B\", function(d) {\n    return d.getMonth();\n  } ], [ \"%Y\", d3_true ] ]);\n  var d3_time_scaleMilliseconds = {\n    range: function(start, stop, step) {\n      return d3.range(Math.ceil(start / step) * step, +stop, step).map(d3_time_scaleDate);\n    },\n    floor: d3_identity,\n    ceil: d3_identity\n  };\n  d3_time_scaleLocalMethods.year = d3_time.year;\n  d3_time.scale = function() {\n    return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);\n  };\n  var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods.map(function(m) {\n    return [ m[0].utc, m[1] ];\n  });\n  var d3_time_scaleUtcFormat = d3_time_formatUtc.multi([ [ \".%L\", function(d) {\n    return d.getUTCMilliseconds();\n  } ], [ \":%S\", function(d) {\n    return d.getUTCSeconds();\n  } ], [ \"%I:%M\", function(d) {\n    return d.getUTCMinutes();\n  } ], [ \"%I %p\", function(d) {\n    return d.getUTCHours();\n  } ], [ \"%a %d\", function(d) {\n    return d.getUTCDay() && d.getUTCDate() != 1;\n  } ], [ \"%b %d\", function(d) {\n    return d.getUTCDate() != 1;\n  } ], [ \"%B\", function(d) {\n    return d.getUTCMonth();\n  } ], [ \"%Y\", d3_true ] ]);\n  d3_time_scaleUtcMethods.year = d3_time.year.utc;\n  d3_time.scale.utc = function() {\n    return d3_time_scale(d3.scale.linear(), d3_time_scaleUtcMethods, d3_time_scaleUtcFormat);\n  };\n  d3.text = d3_xhrType(function(request) {\n    return request.responseText;\n  });\n  d3.json = function(url, callback) {\n    return d3_xhr(url, \"application/json\", d3_json, callback);\n  };\n  function d3_json(request) {\n    return JSON.parse(request.responseText);\n  }\n  d3.html = function(url, callback) {\n    return d3_xhr(url, \"text/html\", d3_html, callback);\n  };\n  function d3_html(request) {\n    var range = d3_document.createRange();\n    range.selectNode(d3_document.body);\n    return range.createContextualFragment(request.responseText);\n  }\n  d3.xml = d3_xhrType(function(request) {\n    return request.responseXML;\n  });\n  if (typeof define === \"function\" && define.amd) this.d3 = d3, define(d3); else if (typeof module === \"object\" && module.exports) module.exports = d3; else this.d3 = d3;\n}();\n},{}],158:[function(_dereq_,module,exports){\nmodule.exports = function () {\n    for (var i = 0; i < arguments.length; i++) {\n        if (arguments[i] !== undefined) return arguments[i];\n    }\n};\n\n},{}],159:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar ch = _dereq_(\"incremental-convex-hull\")\nvar uniq = _dereq_(\"uniq\")\n\nmodule.exports = triangulate\n\nfunction LiftedPoint(p, i) {\n  this.point = p\n  this.index = i\n}\n\nfunction compareLifted(a, b) {\n  var ap = a.point\n  var bp = b.point\n  var d = ap.length\n  for(var i=0; i<d; ++i) {\n    var s = bp[i] - ap[i]\n    if(s) {\n      return s\n    }\n  }\n  return 0\n}\n\nfunction triangulate1D(n, points, includePointAtInfinity) {\n  if(n === 1) {\n    if(includePointAtInfinity) {\n      return [ [-1, 0] ]\n    } else {\n      return []\n    }\n  }\n  var lifted = points.map(function(p, i) {\n    return [ p[0], i ]\n  })\n  lifted.sort(function(a,b) {\n    return a[0] - b[0]\n  })\n  var cells = new Array(n - 1)\n  for(var i=1; i<n; ++i) {\n    var a = lifted[i-1]\n    var b = lifted[i]\n    cells[i-1] = [ a[1], b[1] ]\n  }\n  if(includePointAtInfinity) {\n    cells.push(\n      [ -1, cells[0][1], ],\n      [ cells[n-1][1], -1 ])\n  }\n  return cells\n}\n\nfunction triangulate(points, includePointAtInfinity) {\n  var n = points.length\n  if(n === 0) {\n    return []\n  }\n  \n  var d = points[0].length\n  if(d < 1) {\n    return []\n  }\n\n  //Special case:  For 1D we can just sort the points\n  if(d === 1) {\n    return triangulate1D(n, points, includePointAtInfinity)\n  }\n  \n  //Lift points, sort\n  var lifted = new Array(n)\n  var upper = 1.0\n  for(var i=0; i<n; ++i) {\n    var p = points[i]\n    var x = new Array(d+1)\n    var l = 0.0\n    for(var j=0; j<d; ++j) {\n      var v = p[j]\n      x[j] = v\n      l += v * v\n    }\n    x[d] = l\n    lifted[i] = new LiftedPoint(x, i)\n    upper = Math.max(l, upper)\n  }\n  uniq(lifted, compareLifted)\n  \n  //Double points\n  n = lifted.length\n\n  //Create new list of points\n  var dpoints = new Array(n + d + 1)\n  var dindex = new Array(n + d + 1)\n\n  //Add steiner points at top\n  var u = (d+1) * (d+1) * upper\n  var y = new Array(d+1)\n  for(var i=0; i<=d; ++i) {\n    y[i] = 0.0\n  }\n  y[d] = u\n\n  dpoints[0] = y.slice()\n  dindex[0] = -1\n\n  for(var i=0; i<=d; ++i) {\n    var x = y.slice()\n    x[i] = 1\n    dpoints[i+1] = x\n    dindex[i+1] = -1\n  }\n\n  //Copy rest of the points over\n  for(var i=0; i<n; ++i) {\n    var h = lifted[i]\n    dpoints[i + d + 1] = h.point\n    dindex[i + d + 1] =  h.index\n  }\n\n  //Construct convex hull\n  var hull = ch(dpoints, false)\n  if(includePointAtInfinity) {\n    hull = hull.filter(function(cell) {\n      var count = 0\n      for(var j=0; j<=d; ++j) {\n        var v = dindex[cell[j]]\n        if(v < 0) {\n          if(++count >= 2) {\n            return false\n          }\n        }\n        cell[j] = v\n      }\n      return true\n    })\n  } else {\n    hull = hull.filter(function(cell) {\n      for(var i=0; i<=d; ++i) {\n        var v = dindex[cell[i]]\n        if(v < 0) {\n          return false\n        }\n        cell[i] = v\n      }\n      return true\n    })\n  }\n\n  if(d & 1) {\n    for(var i=0; i<hull.length; ++i) {\n      var h = hull[i]\n      var x = h[0]\n      h[0] = h[1]\n      h[1] = x\n    }\n  }\n\n  return hull\n}\n},{\"incremental-convex-hull\":408,\"uniq\":534}],160:[function(_dereq_,module,exports){\n'use strict'\r\n\r\n\r\nmodule.exports = kerning\r\n\r\n\r\nvar canvas = kerning.canvas = document.createElement('canvas')\r\nvar ctx = canvas.getContext('2d')\r\nvar asciiPairs = createPairs([32, 126])\r\n\r\nkerning.createPairs = createPairs\r\nkerning.ascii = asciiPairs\r\n\r\n\r\nfunction kerning (family, o) {\r\n\tif (Array.isArray(family)) family = family.join(', ')\r\n\r\n\tvar table = {}, pairs, fs = 16, threshold = .05\r\n\r\n\tif (o) {\r\n\t\tif (o.length === 2 && typeof o[0] === 'number') {\r\n\t\t\tpairs = createPairs(o)\r\n\t\t}\r\n\t\telse if (Array.isArray(o)) {\r\n\t\t\tpairs = o\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o.o) pairs = createPairs(o.o)\r\n\t\t\telse if (o.pairs) pairs = o.pairs\r\n\r\n\t\t\tif (o.fontSize) fs = o.fontSize\r\n\t\t\tif (o.threshold != null) threshold = o.threshold\r\n\t\t}\r\n\t}\r\n\r\n\tif (!pairs) pairs = asciiPairs\r\n\r\n\tctx.font = fs + 'px ' + family\r\n\r\n\tfor (var i = 0; i < pairs.length; i++) {\r\n\t\tvar pair = pairs[i]\r\n\t\tvar width = ctx.measureText(pair[0]).width + ctx.measureText(pair[1]).width\r\n\t\tvar kerningWidth = ctx.measureText(pair).width\r\n\t\tif (Math.abs(width - kerningWidth) > fs * threshold) {\r\n\t\t\tvar emWidth = (kerningWidth - width) / fs\r\n\t\t\ttable[pair] = emWidth * 1000\r\n\t\t}\r\n\t}\r\n\r\n\treturn table\r\n}\r\n\r\n\r\nfunction createPairs (range) {\r\n\tvar pairs = []\r\n\r\n    for (var i = range[0]; i <= range[1]; i++) {\r\n\t\tvar leftChar = String.fromCharCode(i)\r\n\t\tfor (var j = range[0]; j < range[1]; j++) {\r\n\t\t\tvar rightChar = String.fromCharCode(j)\r\n\t\t\tvar pair = leftChar + rightChar\r\n\r\n\t\t\tpairs.push(pair)\r\n\t\t}\r\n\t}\r\n\r\n\treturn pairs\r\n}\r\n\n},{}],161:[function(_dereq_,module,exports){\n(function (Buffer){\nvar hasTypedArrays = false\nif(typeof Float64Array !== \"undefined\") {\n  var DOUBLE_VIEW = new Float64Array(1)\n    , UINT_VIEW   = new Uint32Array(DOUBLE_VIEW.buffer)\n  DOUBLE_VIEW[0] = 1.0\n  hasTypedArrays = true\n  if(UINT_VIEW[1] === 0x3ff00000) {\n    //Use little endian\n    module.exports = function doubleBitsLE(n) {\n      DOUBLE_VIEW[0] = n\n      return [ UINT_VIEW[0], UINT_VIEW[1] ]\n    }\n    function toDoubleLE(lo, hi) {\n      UINT_VIEW[0] = lo\n      UINT_VIEW[1] = hi\n      return DOUBLE_VIEW[0]\n    }\n    module.exports.pack = toDoubleLE\n    function lowUintLE(n) {\n      DOUBLE_VIEW[0] = n\n      return UINT_VIEW[0]\n    }\n    module.exports.lo = lowUintLE\n    function highUintLE(n) {\n      DOUBLE_VIEW[0] = n\n      return UINT_VIEW[1]\n    }\n    module.exports.hi = highUintLE\n  } else if(UINT_VIEW[0] === 0x3ff00000) {\n    //Use big endian\n    module.exports = function doubleBitsBE(n) {\n      DOUBLE_VIEW[0] = n\n      return [ UINT_VIEW[1], UINT_VIEW[0] ]\n    }\n    function toDoubleBE(lo, hi) {\n      UINT_VIEW[1] = lo\n      UINT_VIEW[0] = hi\n      return DOUBLE_VIEW[0]\n    }\n    module.exports.pack = toDoubleBE\n    function lowUintBE(n) {\n      DOUBLE_VIEW[0] = n\n      return UINT_VIEW[1]\n    }\n    module.exports.lo = lowUintBE\n    function highUintBE(n) {\n      DOUBLE_VIEW[0] = n\n      return UINT_VIEW[0]\n    }\n    module.exports.hi = highUintBE\n  } else {\n    hasTypedArrays = false\n  }\n}\nif(!hasTypedArrays) {\n  var buffer = new Buffer(8)\n  module.exports = function doubleBits(n) {\n    buffer.writeDoubleLE(n, 0, true)\n    return [ buffer.readUInt32LE(0, true), buffer.readUInt32LE(4, true) ]\n  }\n  function toDouble(lo, hi) {\n    buffer.writeUInt32LE(lo, 0, true)\n    buffer.writeUInt32LE(hi, 4, true)\n    return buffer.readDoubleLE(0, true)\n  }\n  module.exports.pack = toDouble  \n  function lowUint(n) {\n    buffer.writeDoubleLE(n, 0, true)\n    return buffer.readUInt32LE(0, true)\n  }\n  module.exports.lo = lowUint\n  function highUint(n) {\n    buffer.writeDoubleLE(n, 0, true)\n    return buffer.readUInt32LE(4, true)\n  }\n  module.exports.hi = highUint\n}\n\nmodule.exports.sign = function(n) {\n  return module.exports.hi(n) >>> 31\n}\n\nmodule.exports.exponent = function(n) {\n  var b = module.exports.hi(n)\n  return ((b<<1) >>> 21) - 1023\n}\n\nmodule.exports.fraction = function(n) {\n  var lo = module.exports.lo(n)\n  var hi = module.exports.hi(n)\n  var b = hi & ((1<<20) - 1)\n  if(hi & 0x7ff00000) {\n    b += (1<<20)\n  }\n  return [lo, b]\n}\n\nmodule.exports.denormalized = function(n) {\n  var hi = module.exports.hi(n)\n  return !(hi & 0x7ff00000)\n}\n}).call(this,_dereq_(\"buffer\").Buffer)\n},{\"buffer\":98}],162:[function(_dereq_,module,exports){\nvar abs = _dereq_('abs-svg-path')\nvar normalize = _dereq_('normalize-svg-path')\n\nvar methods = {\n  'M': 'moveTo',\n  'C': 'bezierCurveTo'\n}\n\nmodule.exports = function(context, segments) {\n  context.beginPath()\n\n  // Make path easy to reproduce.\n  normalize(abs(segments)).forEach(\n    function(segment) {\n      var command = segment[0]\n      var args = segment.slice(1)\n\n      // Convert the path command to a context method.\n      context[methods[command]].apply(context, args)\n    }\n  )\n\n  context.closePath()\n}\n\n},{\"abs-svg-path\":53,\"normalize-svg-path\":447}],163:[function(_dereq_,module,exports){\nmodule.exports = function(dtype) {\n  switch (dtype) {\n    case 'int8':\n      return Int8Array\n    case 'int16':\n      return Int16Array\n    case 'int32':\n      return Int32Array\n    case 'uint8':\n      return Uint8Array\n    case 'uint16':\n      return Uint16Array\n    case 'uint32':\n      return Uint32Array\n    case 'float32':\n      return Float32Array\n    case 'float64':\n      return Float64Array\n    case 'array':\n      return Array\n    case 'uint8_clamped':\n      return Uint8ClampedArray\n  }\n}\n\n},{}],164:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction dupe_array(count, value, i) {\n  var c = count[i]|0\n  if(c <= 0) {\n    return []\n  }\n  var result = new Array(c), j\n  if(i === count.length-1) {\n    for(j=0; j<c; ++j) {\n      result[j] = value\n    }\n  } else {\n    for(j=0; j<c; ++j) {\n      result[j] = dupe_array(count, value, i+1)\n    }\n  }\n  return result\n}\n\nfunction dupe_number(count, value) {\n  var result, i\n  result = new Array(count)\n  for(i=0; i<count; ++i) {\n    result[i] = value\n  }\n  return result\n}\n\nfunction dupe(count, value) {\n  if(typeof value === \"undefined\") {\n    value = 0\n  }\n  switch(typeof count) {\n    case \"number\":\n      if(count > 0) {\n        return dupe_number(count|0, value)\n      }\n    break\n    case \"object\":\n      if(typeof (count.length) === \"number\") {\n        return dupe_array(count, value, 0)\n      }\n    break\n  }\n  return []\n}\n\nmodule.exports = dupe\n},{}],165:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n    dim = dim || 2;\n\n    var hasHoles = holeIndices && holeIndices.length,\n        outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n        outerNode = linkedList(data, 0, outerLen, dim, true),\n        triangles = [];\n\n    if (!outerNode) return triangles;\n\n    var minX, minY, maxX, maxY, x, y, invSize;\n\n    if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n    if (data.length > 80 * dim) {\n        minX = maxX = data[0];\n        minY = maxY = data[1];\n\n        for (var i = dim; i < outerLen; i += dim) {\n            x = data[i];\n            y = data[i + 1];\n            if (x < minX) minX = x;\n            if (y < minY) minY = y;\n            if (x > maxX) maxX = x;\n            if (y > maxY) maxY = y;\n        }\n\n        // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n        invSize = Math.max(maxX - minX, maxY - minY);\n        invSize = invSize !== 0 ? 1 / invSize : 0;\n    }\n\n    earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n    return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n    var i, last;\n\n    if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n        for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n    } else {\n        for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n    }\n\n    if (last && equals(last, last.next)) {\n        removeNode(last);\n        last = last.next;\n    }\n\n    return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n    if (!start) return start;\n    if (!end) end = start;\n\n    var p = start,\n        again;\n    do {\n        again = false;\n\n        if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n            removeNode(p);\n            p = end = p.prev;\n            if (p === p.next) break;\n            again = true;\n\n        } else {\n            p = p.next;\n        }\n    } while (again || p !== end);\n\n    return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n    if (!ear) return;\n\n    // interlink polygon nodes in z-order\n    if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n    var stop = ear,\n        prev, next;\n\n    // iterate through ears, slicing them one by one\n    while (ear.prev !== ear.next) {\n        prev = ear.prev;\n        next = ear.next;\n\n        if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n            // cut off the triangle\n            triangles.push(prev.i / dim);\n            triangles.push(ear.i / dim);\n            triangles.push(next.i / dim);\n\n            removeNode(ear);\n\n            // skipping the next vertice leads to less sliver triangles\n            ear = next.next;\n            stop = next.next;\n\n            continue;\n        }\n\n        ear = next;\n\n        // if we looped through the whole remaining polygon and can't find any more ears\n        if (ear === stop) {\n            // try filtering points and slicing again\n            if (!pass) {\n                earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n            // if this didn't work, try curing all small self-intersections locally\n            } else if (pass === 1) {\n                ear = cureLocalIntersections(ear, triangles, dim);\n                earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n            // as a last resort, try splitting the remaining polygon into two\n            } else if (pass === 2) {\n                splitEarcut(ear, triangles, dim, minX, minY, invSize);\n            }\n\n            break;\n        }\n    }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // now make sure we don't have other points inside the potential ear\n    var p = ear.next.next;\n\n    while (p !== ear.prev) {\n        if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.next;\n    }\n\n    return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n    var a = ear.prev,\n        b = ear,\n        c = ear.next;\n\n    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n    // triangle bbox; min & max are calculated like this for speed\n    var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n        minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n        maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n        maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n    // z-order range for the current triangle bbox;\n    var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n        maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n    var p = ear.prevZ,\n        n = ear.nextZ;\n\n    // look for points inside the triangle in both directions\n    while (p && p.z >= minZ && n && n.z <= maxZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.prevZ;\n\n        if (n !== ear.prev && n !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n            area(n.prev, n, n.next) >= 0) return false;\n        n = n.nextZ;\n    }\n\n    // look for remaining points in decreasing z-order\n    while (p && p.z >= minZ) {\n        if (p !== ear.prev && p !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n            area(p.prev, p, p.next) >= 0) return false;\n        p = p.prevZ;\n    }\n\n    // look for remaining points in increasing z-order\n    while (n && n.z <= maxZ) {\n        if (n !== ear.prev && n !== ear.next &&\n            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n            area(n.prev, n, n.next) >= 0) return false;\n        n = n.nextZ;\n    }\n\n    return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n    var p = start;\n    do {\n        var a = p.prev,\n            b = p.next.next;\n\n        if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n            triangles.push(a.i / dim);\n            triangles.push(p.i / dim);\n            triangles.push(b.i / dim);\n\n            // remove two nodes involved\n            removeNode(p);\n            removeNode(p.next);\n\n            p = start = b;\n        }\n        p = p.next;\n    } while (p !== start);\n\n    return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n    // look for a valid diagonal that divides the polygon into two\n    var a = start;\n    do {\n        var b = a.next.next;\n        while (b !== a.prev) {\n            if (a.i !== b.i && isValidDiagonal(a, b)) {\n                // split the polygon in two by the diagonal\n                var c = splitPolygon(a, b);\n\n                // filter colinear points around the cuts\n                a = filterPoints(a, a.next);\n                c = filterPoints(c, c.next);\n\n                // run earcut on each half\n                earcutLinked(a, triangles, dim, minX, minY, invSize);\n                earcutLinked(c, triangles, dim, minX, minY, invSize);\n                return;\n            }\n            b = b.next;\n        }\n        a = a.next;\n    } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n    var queue = [],\n        i, len, start, end, list;\n\n    for (i = 0, len = holeIndices.length; i < len; i++) {\n        start = holeIndices[i] * dim;\n        end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n        list = linkedList(data, start, end, dim, false);\n        if (list === list.next) list.steiner = true;\n        queue.push(getLeftmost(list));\n    }\n\n    queue.sort(compareX);\n\n    // process holes from left to right\n    for (i = 0; i < queue.length; i++) {\n        eliminateHole(queue[i], outerNode);\n        outerNode = filterPoints(outerNode, outerNode.next);\n    }\n\n    return outerNode;\n}\n\nfunction compareX(a, b) {\n    return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n    outerNode = findHoleBridge(hole, outerNode);\n    if (outerNode) {\n        var b = splitPolygon(outerNode, hole);\n        filterPoints(b, b.next);\n    }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n    var p = outerNode,\n        hx = hole.x,\n        hy = hole.y,\n        qx = -Infinity,\n        m;\n\n    // find a segment intersected by a ray from the hole's leftmost point to the left;\n    // segment's endpoint with lesser x will be potential connection point\n    do {\n        if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n            var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n            if (x <= hx && x > qx) {\n                qx = x;\n                if (x === hx) {\n                    if (hy === p.y) return p;\n                    if (hy === p.next.y) return p.next;\n                }\n                m = p.x < p.next.x ? p : p.next;\n            }\n        }\n        p = p.next;\n    } while (p !== outerNode);\n\n    if (!m) return null;\n\n    if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n    // look for points inside the triangle of hole point, segment intersection and endpoint;\n    // if there are no points found, we have a valid connection;\n    // otherwise choose the point of the minimum angle with the ray as connection point\n\n    var stop = m,\n        mx = m.x,\n        my = m.y,\n        tanMin = Infinity,\n        tan;\n\n    p = m.next;\n\n    while (p !== stop) {\n        if (hx >= p.x && p.x >= mx && hx !== p.x &&\n                pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n            tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n            if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n                m = p;\n                tanMin = tan;\n            }\n        }\n\n        p = p.next;\n    }\n\n    return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n    var p = start;\n    do {\n        if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n        p.prevZ = p.prev;\n        p.nextZ = p.next;\n        p = p.next;\n    } while (p !== start);\n\n    p.prevZ.nextZ = null;\n    p.prevZ = null;\n\n    sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n    var i, p, q, e, tail, numMerges, pSize, qSize,\n        inSize = 1;\n\n    do {\n        p = list;\n        list = null;\n        tail = null;\n        numMerges = 0;\n\n        while (p) {\n            numMerges++;\n            q = p;\n            pSize = 0;\n            for (i = 0; i < inSize; i++) {\n                pSize++;\n                q = q.nextZ;\n                if (!q) break;\n            }\n            qSize = inSize;\n\n            while (pSize > 0 || (qSize > 0 && q)) {\n\n                if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n                    e = p;\n                    p = p.nextZ;\n                    pSize--;\n                } else {\n                    e = q;\n                    q = q.nextZ;\n                    qSize--;\n                }\n\n                if (tail) tail.nextZ = e;\n                else list = e;\n\n                e.prevZ = tail;\n                tail = e;\n            }\n\n            p = q;\n        }\n\n        tail.nextZ = null;\n        inSize *= 2;\n\n    } while (numMerges > 1);\n\n    return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n    // coords are transformed into non-negative 15-bit integer range\n    x = 32767 * (x - minX) * invSize;\n    y = 32767 * (y - minY) * invSize;\n\n    x = (x | (x << 8)) & 0x00FF00FF;\n    x = (x | (x << 4)) & 0x0F0F0F0F;\n    x = (x | (x << 2)) & 0x33333333;\n    x = (x | (x << 1)) & 0x55555555;\n\n    y = (y | (y << 8)) & 0x00FF00FF;\n    y = (y | (y << 4)) & 0x0F0F0F0F;\n    y = (y | (y << 2)) & 0x33333333;\n    y = (y | (y << 1)) & 0x55555555;\n\n    return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n    var p = start,\n        leftmost = start;\n    do {\n        if (p.x < leftmost.x) leftmost = p;\n        p = p.next;\n    } while (p !== start);\n\n    return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n    return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n           locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n    return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n    return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n    if ((equals(p1, q1) && equals(p2, q2)) ||\n        (equals(p1, q2) && equals(p2, q1))) return true;\n    return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n           area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n    var p = a;\n    do {\n        if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n                intersects(p, p.next, a, b)) return true;\n        p = p.next;\n    } while (p !== a);\n\n    return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n    return area(a.prev, a, a.next) < 0 ?\n        area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n        area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n    var p = a,\n        inside = false,\n        px = (a.x + b.x) / 2,\n        py = (a.y + b.y) / 2;\n    do {\n        if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n                (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n            inside = !inside;\n        p = p.next;\n    } while (p !== a);\n\n    return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n    var a2 = new Node(a.i, a.x, a.y),\n        b2 = new Node(b.i, b.x, b.y),\n        an = a.next,\n        bp = b.prev;\n\n    a.next = b;\n    b.prev = a;\n\n    a2.next = an;\n    an.prev = a2;\n\n    b2.next = a2;\n    a2.prev = b2;\n\n    bp.next = b2;\n    b2.prev = bp;\n\n    return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n    var p = new Node(i, x, y);\n\n    if (!last) {\n        p.prev = p;\n        p.next = p;\n\n    } else {\n        p.next = last.next;\n        p.prev = last;\n        last.next.prev = p;\n        last.next = p;\n    }\n    return p;\n}\n\nfunction removeNode(p) {\n    p.next.prev = p.prev;\n    p.prev.next = p.next;\n\n    if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n    if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n    // vertice index in coordinates array\n    this.i = i;\n\n    // vertex coordinates\n    this.x = x;\n    this.y = y;\n\n    // previous and next vertice nodes in a polygon ring\n    this.prev = null;\n    this.next = null;\n\n    // z-order curve value\n    this.z = null;\n\n    // previous and next nodes in z-order\n    this.prevZ = null;\n    this.nextZ = null;\n\n    // indicates whether this is a steiner point\n    this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n    var hasHoles = holeIndices && holeIndices.length;\n    var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n    var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n    if (hasHoles) {\n        for (var i = 0, len = holeIndices.length; i < len; i++) {\n            var start = holeIndices[i] * dim;\n            var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n            polygonArea -= Math.abs(signedArea(data, start, end, dim));\n        }\n    }\n\n    var trianglesArea = 0;\n    for (i = 0; i < triangles.length; i += 3) {\n        var a = triangles[i] * dim;\n        var b = triangles[i + 1] * dim;\n        var c = triangles[i + 2] * dim;\n        trianglesArea += Math.abs(\n            (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n            (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n    }\n\n    return polygonArea === 0 && trianglesArea === 0 ? 0 :\n        Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n    var sum = 0;\n    for (var i = start, j = end - dim; i < end; i += dim) {\n        sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n        j = i;\n    }\n    return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n    var dim = data[0][0].length,\n        result = {vertices: [], holes: [], dimensions: dim},\n        holeIndex = 0;\n\n    for (var i = 0; i < data.length; i++) {\n        for (var j = 0; j < data[i].length; j++) {\n            for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n        }\n        if (i > 0) {\n            holeIndex += data[i - 1].length;\n            result.holes.push(holeIndex);\n        }\n    }\n    return result;\n};\n\n},{}],166:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = edgeToAdjacency\n\nvar uniq = _dereq_(\"uniq\")\n\nfunction edgeToAdjacency(edges, numVertices) {\n  var numEdges = edges.length\n  if(typeof numVertices !== \"number\") {\n    numVertices = 0\n    for(var i=0; i<numEdges; ++i) {\n      var e = edges[i]\n      numVertices = Math.max(numVertices, e[0], e[1])\n    }\n    numVertices = (numVertices|0) + 1\n  }\n  numVertices = numVertices|0\n  var adj = new Array(numVertices)\n  for(var i=0; i<numVertices; ++i) {\n    adj[i] = []\n  }\n  for(var i=0; i<numEdges; ++i) {\n    var e = edges[i]\n    adj[e[0]].push(e[1])\n    adj[e[1]].push(e[0])\n  }\n  for(var j=0; j<numVertices; ++j) {\n    uniq(adj[j], function(a, b) {\n      return a - b\n    })\n  }\n  return adj\n}\n},{\"uniq\":534}],167:[function(_dereq_,module,exports){\nvar tarjan = _dereq_('strongly-connected-components');\n\nmodule.exports = function findCircuits(edges) {\n    var circuits = []; // Output\n\n    var stack = [];\n    var blocked = [];\n    var B = {};\n    var Ak = [];\n    var s;\n\n    function unblock(u) {\n        blocked[u] = false;\n        if(B.hasOwnProperty(u)) {\n            Object.keys(B[u]).forEach(function(w) {\n                delete B[u][w];\n                if(blocked[w]) {unblock(w);}\n            });\n        }\n    }\n\n    function circuit(v) {\n        var found = false;\n\n        stack.push(v);\n        blocked[v] = true;\n\n        // L1\n        var i;\n        var w;\n        for(i = 0; i < Ak[v].length; i++) {\n            w = Ak[v][i];\n            if(w === s) {\n                output(s, stack);\n                found = true;\n            } else if(!blocked[w]) {\n                found = circuit(w);\n            }\n        }\n\n        // L2\n        if(found) {\n            unblock(v);\n        } else {\n            for(i = 0; i < Ak[v].length; i++) {\n                w = Ak[v][i];\n                var entry = B[w];\n\n                if(!entry) {\n                    entry = {};\n                    B[w] = entry;\n                }\n\n                entry[w] = true;\n            }\n        }\n        stack.pop();\n        return found;\n    }\n\n    function output(start, stack) {\n        var cycle = [].concat(stack).concat(start);\n        circuits.push(cycle);\n    }\n\n    function subgraph(minId) {\n      // Remove edges with indice smaller than minId\n        for(var i = 0; i < edges.length; i++) {\n            if(i < minId) edges[i] = [];\n            edges[i] = edges[i].filter(function(i) {\n                return i >= minId;\n            });\n        }\n    }\n\n    function adjacencyStructureSCC(from) {\n      // Make subgraph starting from vertex minId\n        subgraph(from);\n        var g = edges;\n\n      // Find strongly connected components using Tarjan algorithm\n        var sccs = tarjan(g);\n\n      // Filter out trivial connected components (ie. made of one node)\n        var ccs = sccs.components.filter(function(scc) {\n            return scc.length > 1;\n        });\n\n      // Find least vertex\n        var leastVertex = Infinity;\n        var leastVertexComponent;\n        for(var i = 0; i < ccs.length; i++) {\n            for(var j = 0; j < ccs[i].length; j++) {\n                if(ccs[i][j] < leastVertex) {\n                    leastVertex = ccs[i][j];\n                    leastVertexComponent = i;\n                }\n            }\n        }\n\n        var cc = ccs[leastVertexComponent];\n\n        if(!cc) return false;\n\n      // Return the adjacency list of first component\n        var adjList = edges.map(function(l, index) {\n            if(cc.indexOf(index) === -1) return [];\n            return l.filter(function(i) {\n                return cc.indexOf(i) !== -1;\n            });\n        });\n\n        return {\n            leastVertex: leastVertex,\n            adjList: adjList\n        };\n    }\n\n    s = 0;\n    var n = edges.length;\n    while(s < n) {\n        // find strong component with least vertex in\n        // subgraph starting from vertex `s`\n        var p = adjacencyStructureSCC(s);\n\n        // Its least vertex\n        s = p.leastVertex;\n        // Its adjacency list\n        Ak = p.adjList;\n\n        if(Ak) {\n            for(var i = 0; i < Ak.length; i++) {\n                for(var j = 0; j < Ak[i].length; j++) {\n                    var vertexId = Ak[i][j];\n                    blocked[+vertexId] = false;\n                    B[vertexId] = {};\n                }\n            }\n            circuit(s);\n            s = s + 1;\n        } else {\n            s = n;\n        }\n\n    }\n\n    return circuits;\n};\n\n},{\"strongly-connected-components\":517}],168:[function(_dereq_,module,exports){\n// Inspired by Google Closure:\n// http://closure-library.googlecode.com/svn/docs/\n// closure_goog_array_array.js.html#goog.array.clear\n\n\"use strict\";\n\nvar value = _dereq_(\"../../object/valid-value\");\n\nmodule.exports = function () {\n\tvalue(this).length = 0;\n\treturn this;\n};\n\n},{\"../../object/valid-value\":200}],169:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")()\n\t? Array.from\n\t: _dereq_(\"./shim\");\n\n},{\"./is-implemented\":170,\"./shim\":171}],170:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && (result !== arr) && (result[1] === \"dwa\"));\n};\n\n},{}],171:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar iteratorSymbol = _dereq_(\"es6-symbol\").iterator\n  , isArguments    = _dereq_(\"../../function/is-arguments\")\n  , isFunction     = _dereq_(\"../../function/is-function\")\n  , toPosInt       = _dereq_(\"../../number/to-pos-integer\")\n  , callable       = _dereq_(\"../../object/valid-callable\")\n  , validValue     = _dereq_(\"../../object/valid-value\")\n  , isValue        = _dereq_(\"../../object/is-value\")\n  , isString       = _dereq_(\"../../string/is-string\")\n  , isArray        = Array.isArray\n  , call           = Function.prototype.call\n  , desc           = { configurable: true, enumerable: true, writable: true, value: null }\n  , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t  , thisArg = arguments[2]\n\t  , Context\n\t  , i\n\t  , j\n\t  , arr\n\t  , length\n\t  , code\n\t  , iterator\n\t  , result\n\t  , getIterator\n\t  , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array(length = arrayLike.length);\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n\n},{\"../../function/is-arguments\":172,\"../../function/is-function\":173,\"../../number/to-pos-integer\":179,\"../../object/is-value\":189,\"../../object/valid-callable\":198,\"../../object/valid-value\":200,\"../../string/is-string\":204,\"es6-symbol\":214}],172:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar objToString = Object.prototype.toString\n  , id = objToString.call(\n\t(function () {\n\t\treturn arguments;\n\t})()\n);\n\nmodule.exports = function (value) {\n\treturn objToString.call(value) === id;\n};\n\n},{}],173:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(_dereq_(\"./noop\"));\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && objToString.call(value) === id;\n};\n\n},{\"./noop\":174}],174:[function(_dereq_,module,exports){\n\"use strict\";\n\n// eslint-disable-next-line no-empty-function\nmodule.exports = function () {};\n\n},{}],175:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")()\n\t? Math.sign\n\t: _dereq_(\"./shim\");\n\n},{\"./is-implemented\":176,\"./shim\":177}],176:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn (sign(10) === 1) && (sign(-20) === -1);\n};\n\n},{}],177:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || (value === 0)) return value;\n\treturn value > 0 ? 1 : -1;\n};\n\n},{}],178:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar sign = _dereq_(\"../math/sign\")\n\n  , abs = Math.abs, floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif ((value === 0) || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n\n},{\"../math/sign\":175}],179:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar toInteger = _dereq_(\"./to-integer\")\n\n  , max = Math.max;\n\nmodule.exports = function (value) {\n return max(0, toInteger(value));\n};\n\n},{\"./to-integer\":178}],180:[function(_dereq_,module,exports){\n// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable                = _dereq_(\"./valid-callable\")\n  , value                   = _dereq_(\"./valid-value\")\n  , bind                    = Function.prototype.bind\n  , call                    = Function.prototype.call\n  , keys                    = Object.keys\n  , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n\n},{\"./valid-callable\":198,\"./valid-value\":200}],181:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")()\n\t? Object.assign\n\t: _dereq_(\"./shim\");\n\n},{\"./is-implemented\":182,\"./shim\":183}],182:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn (obj.foo + obj.bar + obj.trzy) === \"razdwatrzy\";\n};\n\n},{}],183:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar keys  = _dereq_(\"../keys\")\n  , value = _dereq_(\"../valid-value\")\n  , max   = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n\n},{\"../keys\":190,\"../valid-value\":200}],184:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar aFrom  = _dereq_(\"../array/from\")\n  , assign = _dereq_(\"./assign\")\n  , value  = _dereq_(\"./valid-value\");\n\nmodule.exports = function (obj/*, propertyNames, options*/) {\n\tvar copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]);\n\tif (copy !== obj && !propertyNames) return copy;\n\tvar result = {};\n\tif (propertyNames) {\n\t\taFrom(propertyNames, function (propertyName) {\n\t\t\tif (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];\n\t\t});\n\t} else {\n\t\tassign(result, obj);\n\t}\n\treturn result;\n};\n\n},{\"../array/from\":169,\"./assign\":181,\"./valid-value\":200}],185:[function(_dereq_,module,exports){\n// Workaround for http://code.google.com/p/v8/issues/detail?id=2804\n\n\"use strict\";\n\nvar create = Object.create, shim;\n\nif (!_dereq_(\"./set-prototype-of/is-implemented\")()) {\n\tshim = _dereq_(\"./set-prototype-of/shim\");\n}\n\nmodule.exports = (function () {\n\tvar nullObject, polyProps, desc;\n\tif (!shim) return create;\n\tif (shim.level !== 1) return create;\n\n\tnullObject = {};\n\tpolyProps = {};\n\tdesc = {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue: undefined\n\t};\n\tObject.getOwnPropertyNames(Object.prototype).forEach(function (name) {\n\t\tif (name === \"__proto__\") {\n\t\t\tpolyProps[name] = {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: undefined\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tpolyProps[name] = desc;\n\t});\n\tObject.defineProperties(nullObject, polyProps);\n\n\tObject.defineProperty(shim, \"nullPolyfill\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: nullObject\n\t});\n\n\treturn function (prototype, props) {\n\t\treturn create(prototype === null ? nullObject : prototype, props);\n\t};\n}());\n\n},{\"./set-prototype-of/is-implemented\":196,\"./set-prototype-of/shim\":197}],186:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./_iterate\")(\"forEach\");\n\n},{\"./_iterate\":180}],187:[function(_dereq_,module,exports){\n// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) {\n return typeof obj === \"function\";\n};\n\n},{}],188:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isValue = _dereq_(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) {\n\treturn (isValue(value) && map[typeof value]) || false;\n};\n\n},{\"./is-value\":189}],189:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar _undefined = _dereq_(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) {\n return (val !== _undefined) && (val !== null);\n};\n\n},{\"../function/noop\":174}],190:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")() ? Object.keys : _dereq_(\"./shim\");\n\n},{\"./is-implemented\":191,\"./shim\":192}],191:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n},{}],192:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isValue = _dereq_(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n\n},{\"../is-value\":189}],193:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar callable = _dereq_(\"./valid-callable\")\n  , forEach  = _dereq_(\"./for-each\")\n  , call     = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n\n},{\"./for-each\":186,\"./valid-callable\":198}],194:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isValue = _dereq_(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n\n},{\"./is-value\":189}],195:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")()\n\t? Object.setPrototypeOf\n\t: _dereq_(\"./shim\");\n\n},{\"./is-implemented\":196,\"./shim\":197}],196:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};\n\nmodule.exports = function (/* CustomCreate*/) {\n\tvar setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;\n\tif (typeof setPrototypeOf !== \"function\") return false;\n\treturn getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;\n};\n\n},{}],197:[function(_dereq_,module,exports){\n/* eslint no-proto: \"off\" */\n\n// Big thanks to @WebReflection for sorting this out\n// https://gist.github.com/WebReflection/5593554\n\n\"use strict\";\n\nvar isObject        = _dereq_(\"../is-object\")\n  , value           = _dereq_(\"../valid-value\")\n  , objIsPrototypeOf = Object.prototype.isPrototypeOf\n  , defineProperty  = Object.defineProperty\n  , nullDesc        = {\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true,\n\tvalue: undefined\n}\n  , validate;\n\nvalidate = function (obj, prototype) {\n\tvalue(obj);\n\tif (prototype === null || isObject(prototype)) return obj;\n\tthrow new TypeError(\"Prototype must be null or an object\");\n};\n\nmodule.exports = (function (status) {\n\tvar fn, set;\n\tif (!status) return null;\n\tif (status.level === 2) {\n\t\tif (status.set) {\n\t\t\tset = status.set;\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tset.call(validate(obj, prototype), prototype);\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t} else {\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tvalidate(obj, prototype).__proto__ = prototype;\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}\n\t} else {\n\t\tfn = function self(obj, prototype) {\n\t\t\tvar isNullBase;\n\t\t\tvalidate(obj, prototype);\n\t\t\tisNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);\n\t\t\tif (isNullBase) delete self.nullPolyfill.__proto__;\n\t\t\tif (prototype === null) prototype = self.nullPolyfill;\n\t\t\tobj.__proto__ = prototype;\n\t\t\tif (isNullBase) defineProperty(self.nullPolyfill, \"__proto__\", nullDesc);\n\t\t\treturn obj;\n\t\t};\n\t}\n\treturn Object.defineProperty(fn, \"level\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: status.level\n\t});\n}(\n\t(function () {\n\t\tvar tmpObj1 = Object.create(null)\n\t\t  , tmpObj2 = {}\n\t\t  , set\n\t\t  , desc = Object.getOwnPropertyDescriptor(Object.prototype, \"__proto__\");\n\n\t\tif (desc) {\n\t\t\ttry {\n\t\t\t\tset = desc.set; // Opera crashes at this point\n\t\t\t\tset.call(tmpObj1, tmpObj2);\n\t\t\t} catch (ignore) {}\n\t\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 };\n\t\t}\n\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 };\n\n\t\ttmpObj1 = {};\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 };\n\n\t\treturn false;\n\t})()\n));\n\n_dereq_(\"../create\");\n\n},{\"../create\":185,\"../is-object\":188,\"../valid-value\":200}],198:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\n},{}],199:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isObject = _dereq_(\"./is-object\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) throw new TypeError(value + \" is not an Object\");\n\treturn value;\n};\n\n},{\"./is-object\":188}],200:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isValue = _dereq_(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n\n},{\"./is-value\":189}],201:[function(_dereq_,module,exports){\n\"use strict\";\n\nmodule.exports = _dereq_(\"./is-implemented\")()\n\t? String.prototype.contains\n\t: _dereq_(\"./shim\");\n\n},{\"./is-implemented\":202,\"./shim\":203}],202:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn (str.contains(\"dwa\") === true) && (str.contains(\"foo\") === false);\n};\n\n},{}],203:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString/*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n\n},{}],204:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n\n},{}],205:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar generated = Object.create(null), random = Math.random;\n\nmodule.exports = function () {\n\tvar str;\n\tdo {\n\t\tstr = random()\n\t\t\t.toString(36)\n\t\t\t.slice(2);\n\t} while (generated[str]);\n\treturn str;\n};\n\n},{}],206:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar setPrototypeOf = _dereq_(\"es5-ext/object/set-prototype-of\")\n  , contains       = _dereq_(\"es5-ext/string/#/contains\")\n  , d              = _dereq_(\"d\")\n  , Symbol         = _dereq_(\"es6-symbol\")\n  , Iterator       = _dereq_(\"./\");\n\nvar defineProperty = Object.defineProperty, ArrayIterator;\n\nArrayIterator = module.exports = function (arr, kind) {\n\tif (!(this instanceof ArrayIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tIterator.call(this, arr);\n\tif (!kind) kind = \"value\";\n\telse if (contains.call(kind, \"key+value\")) kind = \"key+value\";\n\telse if (contains.call(kind, \"key\")) kind = \"key\";\n\telse kind = \"value\";\n\tdefineProperty(this, \"__kind__\", d(\"\", kind));\n};\nif (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete ArrayIterator.prototype.constructor;\n\nArrayIterator.prototype = Object.create(Iterator.prototype, {\n\t_resolve: d(function (i) {\n\t\tif (this.__kind__ === \"value\") return this.__list__[i];\n\t\tif (this.__kind__ === \"key+value\") return [i, this.__list__[i]];\n\t\treturn i;\n\t})\n});\ndefineProperty(ArrayIterator.prototype, Symbol.toStringTag, d(\"c\", \"Array Iterator\"));\n\n},{\"./\":209,\"d\":144,\"es5-ext/object/set-prototype-of\":195,\"es5-ext/string/#/contains\":201,\"es6-symbol\":214}],207:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isArguments = _dereq_(\"es5-ext/function/is-arguments\")\n  , callable    = _dereq_(\"es5-ext/object/valid-callable\")\n  , isString    = _dereq_(\"es5-ext/string/is-string\")\n  , get         = _dereq_(\"./get\");\n\nvar isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some;\n\nmodule.exports = function (iterable, cb /*, thisArg*/) {\n\tvar mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;\n\tif (isArray(iterable) || isArguments(iterable)) mode = \"array\";\n\telse if (isString(iterable)) mode = \"string\";\n\telse iterable = get(iterable);\n\n\tcallable(cb);\n\tdoBreak = function () {\n\t\tbroken = true;\n\t};\n\tif (mode === \"array\") {\n\t\tsome.call(iterable, function (value) {\n\t\t\tcall.call(cb, thisArg, value, doBreak);\n\t\t\treturn broken;\n\t\t});\n\t\treturn;\n\t}\n\tif (mode === \"string\") {\n\t\tlength = iterable.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tchar = iterable[i];\n\t\t\tif (i + 1 < length) {\n\t\t\t\tcode = char.charCodeAt(0);\n\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) char += iterable[++i];\n\t\t\t}\n\t\t\tcall.call(cb, thisArg, char, doBreak);\n\t\t\tif (broken) break;\n\t\t}\n\t\treturn;\n\t}\n\tresult = iterable.next();\n\n\twhile (!result.done) {\n\t\tcall.call(cb, thisArg, result.value, doBreak);\n\t\tif (broken) return;\n\t\tresult = iterable.next();\n\t}\n};\n\n},{\"./get\":208,\"es5-ext/function/is-arguments\":172,\"es5-ext/object/valid-callable\":198,\"es5-ext/string/is-string\":204}],208:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isArguments    = _dereq_(\"es5-ext/function/is-arguments\")\n  , isString       = _dereq_(\"es5-ext/string/is-string\")\n  , ArrayIterator  = _dereq_(\"./array\")\n  , StringIterator = _dereq_(\"./string\")\n  , iterable       = _dereq_(\"./valid-iterable\")\n  , iteratorSymbol = _dereq_(\"es6-symbol\").iterator;\n\nmodule.exports = function (obj) {\n\tif (typeof iterable(obj)[iteratorSymbol] === \"function\") return obj[iteratorSymbol]();\n\tif (isArguments(obj)) return new ArrayIterator(obj);\n\tif (isString(obj)) return new StringIterator(obj);\n\treturn new ArrayIterator(obj);\n};\n\n},{\"./array\":206,\"./string\":211,\"./valid-iterable\":212,\"es5-ext/function/is-arguments\":172,\"es5-ext/string/is-string\":204,\"es6-symbol\":214}],209:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar clear    = _dereq_(\"es5-ext/array/#/clear\")\n  , assign   = _dereq_(\"es5-ext/object/assign\")\n  , callable = _dereq_(\"es5-ext/object/valid-callable\")\n  , value    = _dereq_(\"es5-ext/object/valid-value\")\n  , d        = _dereq_(\"d\")\n  , autoBind = _dereq_(\"d/auto-bind\")\n  , Symbol   = _dereq_(\"es6-symbol\");\n\nvar defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator;\n\nmodule.exports = Iterator = function (list, context) {\n\tif (!(this instanceof Iterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tdefineProperties(this, {\n\t\t__list__: d(\"w\", value(list)),\n\t\t__context__: d(\"w\", context),\n\t\t__nextIndex__: d(\"w\", 0)\n\t});\n\tif (!context) return;\n\tcallable(context.on);\n\tcontext.on(\"_add\", this._onAdd);\n\tcontext.on(\"_delete\", this._onDelete);\n\tcontext.on(\"_clear\", this._onClear);\n};\n\n// Internal %IteratorPrototype% doesn't expose its constructor\ndelete Iterator.prototype.constructor;\n\ndefineProperties(\n\tIterator.prototype,\n\tassign(\n\t\t{\n\t\t\t_next: d(function () {\n\t\t\t\tvar i;\n\t\t\t\tif (!this.__list__) return undefined;\n\t\t\t\tif (this.__redo__) {\n\t\t\t\t\ti = this.__redo__.shift();\n\t\t\t\t\tif (i !== undefined) return i;\n\t\t\t\t}\n\t\t\t\tif (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;\n\t\t\t\tthis._unBind();\n\t\t\t\treturn undefined;\n\t\t\t}),\n\t\t\tnext: d(function () {\n\t\t\t\treturn this._createResult(this._next());\n\t\t\t}),\n\t\t\t_createResult: d(function (i) {\n\t\t\t\tif (i === undefined) return { done: true, value: undefined };\n\t\t\t\treturn { done: false, value: this._resolve(i) };\n\t\t\t}),\n\t\t\t_resolve: d(function (i) {\n\t\t\t\treturn this.__list__[i];\n\t\t\t}),\n\t\t\t_unBind: d(function () {\n\t\t\t\tthis.__list__ = null;\n\t\t\t\tdelete this.__redo__;\n\t\t\t\tif (!this.__context__) return;\n\t\t\t\tthis.__context__.off(\"_add\", this._onAdd);\n\t\t\t\tthis.__context__.off(\"_delete\", this._onDelete);\n\t\t\t\tthis.__context__.off(\"_clear\", this._onClear);\n\t\t\t\tthis.__context__ = null;\n\t\t\t}),\n\t\t\ttoString: d(function () {\n\t\t\t\treturn \"[object \" + (this[Symbol.toStringTag] || \"Object\") + \"]\";\n\t\t\t})\n\t\t},\n\t\tautoBind({\n\t\t\t_onAdd: d(function (index) {\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t++this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) {\n\t\t\t\t\tdefineProperty(this, \"__redo__\", d(\"c\", [index]));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.__redo__.forEach(function (redo, i) {\n\t\t\t\t\tif (redo >= index) this.__redo__[i] = ++redo;\n\t\t\t\t}, this);\n\t\t\t\tthis.__redo__.push(index);\n\t\t\t}),\n\t\t\t_onDelete: d(function (index) {\n\t\t\t\tvar i;\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t--this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) return;\n\t\t\t\ti = this.__redo__.indexOf(index);\n\t\t\t\tif (i !== -1) this.__redo__.splice(i, 1);\n\t\t\t\tthis.__redo__.forEach(function (redo, j) {\n\t\t\t\t\tif (redo > index) this.__redo__[j] = --redo;\n\t\t\t\t}, this);\n\t\t\t}),\n\t\t\t_onClear: d(function () {\n\t\t\t\tif (this.__redo__) clear.call(this.__redo__);\n\t\t\t\tthis.__nextIndex__ = 0;\n\t\t\t})\n\t\t})\n\t)\n);\n\ndefineProperty(\n\tIterator.prototype,\n\tSymbol.iterator,\n\td(function () {\n\t\treturn this;\n\t})\n);\n\n},{\"d\":144,\"d/auto-bind\":143,\"es5-ext/array/#/clear\":168,\"es5-ext/object/assign\":181,\"es5-ext/object/valid-callable\":198,\"es5-ext/object/valid-value\":200,\"es6-symbol\":214}],210:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isArguments = _dereq_(\"es5-ext/function/is-arguments\")\n  , isValue     = _dereq_(\"es5-ext/object/is-value\")\n  , isString    = _dereq_(\"es5-ext/string/is-string\");\n\nvar iteratorSymbol = _dereq_(\"es6-symbol\").iterator\n  , isArray        = Array.isArray;\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\tif (isArray(value)) return true;\n\tif (isString(value)) return true;\n\tif (isArguments(value)) return true;\n\treturn typeof value[iteratorSymbol] === \"function\";\n};\n\n},{\"es5-ext/function/is-arguments\":172,\"es5-ext/object/is-value\":189,\"es5-ext/string/is-string\":204,\"es6-symbol\":214}],211:[function(_dereq_,module,exports){\n// Thanks @mathiasbynens\n// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols\n\n\"use strict\";\n\nvar setPrototypeOf = _dereq_(\"es5-ext/object/set-prototype-of\")\n  , d              = _dereq_(\"d\")\n  , Symbol         = _dereq_(\"es6-symbol\")\n  , Iterator       = _dereq_(\"./\");\n\nvar defineProperty = Object.defineProperty, StringIterator;\n\nStringIterator = module.exports = function (str) {\n\tif (!(this instanceof StringIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tstr = String(str);\n\tIterator.call(this, str);\n\tdefineProperty(this, \"__length__\", d(\"\", str.length));\n};\nif (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete StringIterator.prototype.constructor;\n\nStringIterator.prototype = Object.create(Iterator.prototype, {\n\t_next: d(function () {\n\t\tif (!this.__list__) return undefined;\n\t\tif (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;\n\t\tthis._unBind();\n\t\treturn undefined;\n\t}),\n\t_resolve: d(function (i) {\n\t\tvar char = this.__list__[i], code;\n\t\tif (this.__nextIndex__ === this.__length__) return char;\n\t\tcode = char.charCodeAt(0);\n\t\tif (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++];\n\t\treturn char;\n\t})\n});\ndefineProperty(StringIterator.prototype, Symbol.toStringTag, d(\"c\", \"String Iterator\"));\n\n},{\"./\":209,\"d\":144,\"es5-ext/object/set-prototype-of\":195,\"es6-symbol\":214}],212:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar isIterable = _dereq_(\"./is-iterable\");\n\nmodule.exports = function (value) {\n\tif (!isIterable(value)) throw new TypeError(value + \" is not iterable\");\n\treturn value;\n};\n\n},{\"./is-iterable\":210}],213:[function(_dereq_,module,exports){\n(function (process,global){\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license   Licensed under MIT license\n *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version   3.3.1\n */\n\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n  return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n  return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n  _isArray = function (x) {\n    return Object.prototype.toString.call(x) === '[object Array]';\n  };\n} else {\n  _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n  queue[len] = callback;\n  queue[len + 1] = arg;\n  len += 2;\n  if (len === 2) {\n    // If len is 2, that means that we need to schedule an async flush.\n    // If additional callbacks are queued before the queue is flushed, they\n    // will be processed by this flush that we are scheduling.\n    if (customSchedulerFn) {\n      customSchedulerFn(flush);\n    } else {\n      scheduleFlush();\n    }\n  }\n};\n\nfunction setScheduler(scheduleFn) {\n  customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n  asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n  // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n  // see https://github.com/cujojs/when/issues/410 for details\n  return function () {\n    return process.nextTick(flush);\n  };\n}\n\n// vertx\nfunction useVertxTimer() {\n  return function () {\n    vertxNext(flush);\n  };\n}\n\nfunction useMutationObserver() {\n  var iterations = 0;\n  var observer = new BrowserMutationObserver(flush);\n  var node = document.createTextNode('');\n  observer.observe(node, { characterData: true });\n\n  return function () {\n    node.data = iterations = ++iterations % 2;\n  };\n}\n\n// web worker\nfunction useMessageChannel() {\n  var channel = new MessageChannel();\n  channel.port1.onmessage = flush;\n  return function () {\n    return channel.port2.postMessage(0);\n  };\n}\n\nfunction useSetTimeout() {\n  // Store setTimeout reference so es6-promise will be unaffected by\n  // other code modifying setTimeout (like sinon.useFakeTimers())\n  var globalSetTimeout = setTimeout;\n  return function () {\n    return globalSetTimeout(flush, 1);\n  };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n  for (var i = 0; i < len; i += 2) {\n    var callback = queue[i];\n    var arg = queue[i + 1];\n\n    callback(arg);\n\n    queue[i] = undefined;\n    queue[i + 1] = undefined;\n  }\n\n  len = 0;\n}\n\nfunction attemptVertx() {\n  try {\n    var r = _dereq_;\n    var vertx = r('vertx');\n    vertxNext = vertx.runOnLoop || vertx.runOnContext;\n    return useVertxTimer();\n  } catch (e) {\n    return useSetTimeout();\n  }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n  scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n  scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n  scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof _dereq_ === 'function') {\n  scheduleFlush = attemptVertx();\n} else {\n  scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n  var _arguments = arguments;\n\n  var parent = this;\n\n  var child = new this.constructor(noop);\n\n  if (child[PROMISE_ID] === undefined) {\n    makePromise(child);\n  }\n\n  var _state = parent._state;\n\n  if (_state) {\n    (function () {\n      var callback = _arguments[_state - 1];\n      asap(function () {\n        return invokeCallback(_state, child, callback, parent._result);\n      });\n    })();\n  } else {\n    subscribe(parent, child, onFulfillment, onRejection);\n  }\n\n  return child;\n}\n\n/**\n  `Promise.resolve` returns a promise that will become resolved with the\n  passed `value`. It is shorthand for the following:\n\n  ```javascript\n  let promise = new Promise(function(resolve, reject){\n    resolve(1);\n  });\n\n  promise.then(function(value){\n    // value === 1\n  });\n  ```\n\n  Instead of writing the above, your code now simply becomes the following:\n\n  ```javascript\n  let promise = Promise.resolve(1);\n\n  promise.then(function(value){\n    // value === 1\n  });\n  ```\n\n  @method resolve\n  @static\n  @param {Any} value value that the returned promise will be resolved with\n  Useful for tooling.\n  @return {Promise} a promise that will become fulfilled with the given\n  `value`\n*/\nfunction resolve(object) {\n  /*jshint validthis:true */\n  var Constructor = this;\n\n  if (object && typeof object === 'object' && object.constructor === Constructor) {\n    return object;\n  }\n\n  var promise = new Constructor(noop);\n  _resolve(promise, object);\n  return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n  return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n  return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n  try {\n    return promise.then;\n  } catch (error) {\n    GET_THEN_ERROR.error = error;\n    return GET_THEN_ERROR;\n  }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n  try {\n    then.call(value, fulfillmentHandler, rejectionHandler);\n  } catch (e) {\n    return e;\n  }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n  asap(function (promise) {\n    var sealed = false;\n    var error = tryThen(then, thenable, function (value) {\n      if (sealed) {\n        return;\n      }\n      sealed = true;\n      if (thenable !== value) {\n        _resolve(promise, value);\n      } else {\n        fulfill(promise, value);\n      }\n    }, function (reason) {\n      if (sealed) {\n        return;\n      }\n      sealed = true;\n\n      _reject(promise, reason);\n    }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n    if (!sealed && error) {\n      sealed = true;\n      _reject(promise, error);\n    }\n  }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n  if (thenable._state === FULFILLED) {\n    fulfill(promise, thenable._result);\n  } else if (thenable._state === REJECTED) {\n    _reject(promise, thenable._result);\n  } else {\n    subscribe(thenable, undefined, function (value) {\n      return _resolve(promise, value);\n    }, function (reason) {\n      return _reject(promise, reason);\n    });\n  }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n  if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n    handleOwnThenable(promise, maybeThenable);\n  } else {\n    if (then$$ === GET_THEN_ERROR) {\n      _reject(promise, GET_THEN_ERROR.error);\n    } else if (then$$ === undefined) {\n      fulfill(promise, maybeThenable);\n    } else if (isFunction(then$$)) {\n      handleForeignThenable(promise, maybeThenable, then$$);\n    } else {\n      fulfill(promise, maybeThenable);\n    }\n  }\n}\n\nfunction _resolve(promise, value) {\n  if (promise === value) {\n    _reject(promise, selfFulfillment());\n  } else if (objectOrFunction(value)) {\n    handleMaybeThenable(promise, value, getThen(value));\n  } else {\n    fulfill(promise, value);\n  }\n}\n\nfunction publishRejection(promise) {\n  if (promise._onerror) {\n    promise._onerror(promise._result);\n  }\n\n  publish(promise);\n}\n\nfunction fulfill(promise, value) {\n  if (promise._state !== PENDING) {\n    return;\n  }\n\n  promise._result = value;\n  promise._state = FULFILLED;\n\n  if (promise._subscribers.length !== 0) {\n    asap(publish, promise);\n  }\n}\n\nfunction _reject(promise, reason) {\n  if (promise._state !== PENDING) {\n    return;\n  }\n  promise._state = REJECTED;\n  promise._result = reason;\n\n  asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n  var _subscribers = parent._subscribers;\n  var length = _subscribers.length;\n\n  parent._onerror = null;\n\n  _subscribers[length] = child;\n  _subscribers[length + FULFILLED] = onFulfillment;\n  _subscribers[length + REJECTED] = onRejection;\n\n  if (length === 0 && parent._state) {\n    asap(publish, parent);\n  }\n}\n\nfunction publish(promise) {\n  var subscribers = promise._subscribers;\n  var settled = promise._state;\n\n  if (subscribers.length === 0) {\n    return;\n  }\n\n  var child = undefined,\n      callback = undefined,\n      detail = promise._result;\n\n  for (var i = 0; i < subscribers.length; i += 3) {\n    child = subscribers[i];\n    callback = subscribers[i + settled];\n\n    if (child) {\n      invokeCallback(settled, child, callback, detail);\n    } else {\n      callback(detail);\n    }\n  }\n\n  promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n  this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n  try {\n    return callback(detail);\n  } catch (e) {\n    TRY_CATCH_ERROR.error = e;\n    return TRY_CATCH_ERROR;\n  }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n  var hasCallback = isFunction(callback),\n      value = undefined,\n      error = undefined,\n      succeeded = undefined,\n      failed = undefined;\n\n  if (hasCallback) {\n    value = tryCatch(callback, detail);\n\n    if (value === TRY_CATCH_ERROR) {\n      failed = true;\n      error = value.error;\n      value = null;\n    } else {\n      succeeded = true;\n    }\n\n    if (promise === value) {\n      _reject(promise, cannotReturnOwn());\n      return;\n    }\n  } else {\n    value = detail;\n    succeeded = true;\n  }\n\n  if (promise._state !== PENDING) {\n    // noop\n  } else if (hasCallback && succeeded) {\n      _resolve(promise, value);\n    } else if (failed) {\n      _reject(promise, error);\n    } else if (settled === FULFILLED) {\n      fulfill(promise, value);\n    } else if (settled === REJECTED) {\n      _reject(promise, value);\n    }\n}\n\nfunction initializePromise(promise, resolver) {\n  try {\n    resolver(function resolvePromise(value) {\n      _resolve(promise, value);\n    }, function rejectPromise(reason) {\n      _reject(promise, reason);\n    });\n  } catch (e) {\n    _reject(promise, e);\n  }\n}\n\nvar id = 0;\nfunction nextId() {\n  return id++;\n}\n\nfunction makePromise(promise) {\n  promise[PROMISE_ID] = id++;\n  promise._state = undefined;\n  promise._result = undefined;\n  promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n  this._instanceConstructor = Constructor;\n  this.promise = new Constructor(noop);\n\n  if (!this.promise[PROMISE_ID]) {\n    makePromise(this.promise);\n  }\n\n  if (isArray(input)) {\n    this._input = input;\n    this.length = input.length;\n    this._remaining = input.length;\n\n    this._result = new Array(this.length);\n\n    if (this.length === 0) {\n      fulfill(this.promise, this._result);\n    } else {\n      this.length = this.length || 0;\n      this._enumerate();\n      if (this._remaining === 0) {\n        fulfill(this.promise, this._result);\n      }\n    }\n  } else {\n    _reject(this.promise, validationError());\n  }\n}\n\nfunction validationError() {\n  return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n  var length = this.length;\n  var _input = this._input;\n\n  for (var i = 0; this._state === PENDING && i < length; i++) {\n    this._eachEntry(_input[i], i);\n  }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n  var c = this._instanceConstructor;\n  var resolve$$ = c.resolve;\n\n  if (resolve$$ === resolve) {\n    var _then = getThen(entry);\n\n    if (_then === then && entry._state !== PENDING) {\n      this._settledAt(entry._state, i, entry._result);\n    } else if (typeof _then !== 'function') {\n      this._remaining--;\n      this._result[i] = entry;\n    } else if (c === Promise) {\n      var promise = new c(noop);\n      handleMaybeThenable(promise, entry, _then);\n      this._willSettleAt(promise, i);\n    } else {\n      this._willSettleAt(new c(function (resolve$$) {\n        return resolve$$(entry);\n      }), i);\n    }\n  } else {\n    this._willSettleAt(resolve$$(entry), i);\n  }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n  var promise = this.promise;\n\n  if (promise._state === PENDING) {\n    this._remaining--;\n\n    if (state === REJECTED) {\n      _reject(promise, value);\n    } else {\n      this._result[i] = value;\n    }\n  }\n\n  if (this._remaining === 0) {\n    fulfill(promise, this._result);\n  }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n  var enumerator = this;\n\n  subscribe(promise, undefined, function (value) {\n    return enumerator._settledAt(FULFILLED, i, value);\n  }, function (reason) {\n    return enumerator._settledAt(REJECTED, i, reason);\n  });\n};\n\n/**\n  `Promise.all` accepts an array of promises, and returns a new promise which\n  is fulfilled with an array of fulfillment values for the passed promises, or\n  rejected with the reason of the first passed promise to be rejected. It casts all\n  elements of the passed iterable to promises as it runs this algorithm.\n\n  Example:\n\n  ```javascript\n  let promise1 = resolve(1);\n  let promise2 = resolve(2);\n  let promise3 = resolve(3);\n  let promises = [ promise1, promise2, promise3 ];\n\n  Promise.all(promises).then(function(array){\n    // The array here would be [ 1, 2, 3 ];\n  });\n  ```\n\n  If any of the `promises` given to `all` are rejected, the first promise\n  that is rejected will be given as an argument to the returned promises's\n  rejection handler. For example:\n\n  Example:\n\n  ```javascript\n  let promise1 = resolve(1);\n  let promise2 = reject(new Error(\"2\"));\n  let promise3 = reject(new Error(\"3\"));\n  let promises = [ promise1, promise2, promise3 ];\n\n  Promise.all(promises).then(function(array){\n    // Code here never runs because there are rejected promises!\n  }, function(error) {\n    // error.message === \"2\"\n  });\n  ```\n\n  @method all\n  @static\n  @param {Array} entries array of promises\n  @param {String} label optional string for labeling the promise.\n  Useful for tooling.\n  @return {Promise} promise that is fulfilled when all `promises` have been\n  fulfilled, or rejected if any of them become rejected.\n  @static\n*/\nfunction all(entries) {\n  return new Enumerator(this, entries).promise;\n}\n\n/**\n  `Promise.race` returns a new promise which is settled in the same way as the\n  first passed promise to settle.\n\n  Example:\n\n  ```javascript\n  let promise1 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 1');\n    }, 200);\n  });\n\n  let promise2 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 2');\n    }, 100);\n  });\n\n  Promise.race([promise1, promise2]).then(function(result){\n    // result === 'promise 2' because it was resolved before promise1\n    // was resolved.\n  });\n  ```\n\n  `Promise.race` is deterministic in that only the state of the first\n  settled promise matters. For example, even if other promises given to the\n  `promises` array argument are resolved, but the first settled promise has\n  become rejected before the other promises became fulfilled, the returned\n  promise will become rejected:\n\n  ```javascript\n  let promise1 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 1');\n    }, 200);\n  });\n\n  let promise2 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      reject(new Error('promise 2'));\n    }, 100);\n  });\n\n  Promise.race([promise1, promise2]).then(function(result){\n    // Code here never runs\n  }, function(reason){\n    // reason.message === 'promise 2' because promise 2 became rejected before\n    // promise 1 became fulfilled\n  });\n  ```\n\n  An example real-world use case is implementing timeouts:\n\n  ```javascript\n  Promise.race([ajax('foo.json'), timeout(5000)])\n  ```\n\n  @method race\n  @static\n  @param {Array} promises array of promises to observe\n  Useful for tooling.\n  @return {Promise} a promise which settles in the same way as the first passed\n  promise to settle.\n*/\nfunction race(entries) {\n  /*jshint validthis:true */\n  var Constructor = this;\n\n  if (!isArray(entries)) {\n    return new Constructor(function (_, reject) {\n      return reject(new TypeError('You must pass an array to race.'));\n    });\n  } else {\n    return new Constructor(function (resolve, reject) {\n      var length = entries.length;\n      for (var i = 0; i < length; i++) {\n        Constructor.resolve(entries[i]).then(resolve, reject);\n      }\n    });\n  }\n}\n\n/**\n  `Promise.reject` returns a promise rejected with the passed `reason`.\n  It is shorthand for the following:\n\n  ```javascript\n  let promise = new Promise(function(resolve, reject){\n    reject(new Error('WHOOPS'));\n  });\n\n  promise.then(function(value){\n    // Code here doesn't run because the promise is rejected!\n  }, function(reason){\n    // reason.message === 'WHOOPS'\n  });\n  ```\n\n  Instead of writing the above, your code now simply becomes the following:\n\n  ```javascript\n  let promise = Promise.reject(new Error('WHOOPS'));\n\n  promise.then(function(value){\n    // Code here doesn't run because the promise is rejected!\n  }, function(reason){\n    // reason.message === 'WHOOPS'\n  });\n  ```\n\n  @method reject\n  @static\n  @param {Any} reason value that the returned promise will be rejected with.\n  Useful for tooling.\n  @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n  /*jshint validthis:true */\n  var Constructor = this;\n  var promise = new Constructor(noop);\n  _reject(promise, reason);\n  return promise;\n}\n\nfunction needsResolver() {\n  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n  throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n  Promise objects represent the eventual result of an asynchronous operation. The\n  primary way of interacting with a promise is through its `then` method, which\n  registers callbacks to receive either a promise's eventual value or the reason\n  why the promise cannot be fulfilled.\n\n  Terminology\n  -----------\n\n  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n  - `thenable` is an object or function that defines a `then` method.\n  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n  - `exception` is a value that is thrown using the throw statement.\n  - `reason` is a value that indicates why a promise was rejected.\n  - `settled` the final resting state of a promise, fulfilled or rejected.\n\n  A promise can be in one of three states: pending, fulfilled, or rejected.\n\n  Promises that are fulfilled have a fulfillment value and are in the fulfilled\n  state.  Promises that are rejected have a rejection reason and are in the\n  rejected state.  A fulfillment value is never a thenable.\n\n  Promises can also be said to *resolve* a value.  If this value is also a\n  promise, then the original promise's settled state will match the value's\n  settled state.  So a promise that *resolves* a promise that rejects will\n  itself reject, and a promise that *resolves* a promise that fulfills will\n  itself fulfill.\n\n\n  Basic Usage:\n  ------------\n\n  ```js\n  let promise = new Promise(function(resolve, reject) {\n    // on success\n    resolve(value);\n\n    // on failure\n    reject(reason);\n  });\n\n  promise.then(function(value) {\n    // on fulfillment\n  }, function(reason) {\n    // on rejection\n  });\n  ```\n\n  Advanced Usage:\n  ---------------\n\n  Promises shine when abstracting away asynchronous interactions such as\n  `XMLHttpRequest`s.\n\n  ```js\n  function getJSON(url) {\n    return new Promise(function(resolve, reject){\n      let xhr = new XMLHttpRequest();\n\n      xhr.open('GET', url);\n      xhr.onreadystatechange = handler;\n      xhr.responseType = 'json';\n      xhr.setRequestHeader('Accept', 'application/json');\n      xhr.send();\n\n      function handler() {\n        if (this.readyState === this.DONE) {\n          if (this.status === 200) {\n            resolve(this.response);\n          } else {\n            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n          }\n        }\n      };\n    });\n  }\n\n  getJSON('/posts.json').then(function(json) {\n    // on fulfillment\n  }, function(reason) {\n    // on rejection\n  });\n  ```\n\n  Unlike callbacks, promises are great composable primitives.\n\n  ```js\n  Promise.all([\n    getJSON('/posts'),\n    getJSON('/comments')\n  ]).then(function(values){\n    values[0] // => postsJSON\n    values[1] // => commentsJSON\n\n    return values;\n  });\n  ```\n\n  @class Promise\n  @param {function} resolver\n  Useful for tooling.\n  @constructor\n*/\nfunction Promise(resolver) {\n  this[PROMISE_ID] = nextId();\n  this._result = this._state = undefined;\n  this._subscribers = [];\n\n  if (noop !== resolver) {\n    typeof resolver !== 'function' && needsResolver();\n    this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n  }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n  constructor: Promise,\n\n  /**\n    The primary way of interacting with a promise is through its `then` method,\n    which registers callbacks to receive either a promise's eventual value or the\n    reason why the promise cannot be fulfilled.\n  \n    ```js\n    findUser().then(function(user){\n      // user is available\n    }, function(reason){\n      // user is unavailable, and you are given the reason why\n    });\n    ```\n  \n    Chaining\n    --------\n  \n    The return value of `then` is itself a promise.  This second, 'downstream'\n    promise is resolved with the return value of the first promise's fulfillment\n    or rejection handler, or rejected if the handler throws an exception.\n  \n    ```js\n    findUser().then(function (user) {\n      return user.name;\n    }, function (reason) {\n      return 'default name';\n    }).then(function (userName) {\n      // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n      // will be `'default name'`\n    });\n  \n    findUser().then(function (user) {\n      throw new Error('Found user, but still unhappy');\n    }, function (reason) {\n      throw new Error('`findUser` rejected and we're unhappy');\n    }).then(function (value) {\n      // never reached\n    }, function (reason) {\n      // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n      // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n    });\n    ```\n    If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n  \n    ```js\n    findUser().then(function (user) {\n      throw new PedagogicalException('Upstream error');\n    }).then(function (value) {\n      // never reached\n    }).then(function (value) {\n      // never reached\n    }, function (reason) {\n      // The `PedgagocialException` is propagated all the way down to here\n    });\n    ```\n  \n    Assimilation\n    ------------\n  \n    Sometimes the value you want to propagate to a downstream promise can only be\n    retrieved asynchronously. This can be achieved by returning a promise in the\n    fulfillment or rejection handler. The downstream promise will then be pending\n    until the returned promise is settled. This is called *assimilation*.\n  \n    ```js\n    findUser().then(function (user) {\n      return findCommentsByAuthor(user);\n    }).then(function (comments) {\n      // The user's comments are now available\n    });\n    ```\n  \n    If the assimliated promise rejects, then the downstream promise will also reject.\n  \n    ```js\n    findUser().then(function (user) {\n      return findCommentsByAuthor(user);\n    }).then(function (comments) {\n      // If `findCommentsByAuthor` fulfills, we'll have the value here\n    }, function (reason) {\n      // If `findCommentsByAuthor` rejects, we'll have the reason here\n    });\n    ```\n  \n    Simple Example\n    --------------\n  \n    Synchronous Example\n  \n    ```javascript\n    let result;\n  \n    try {\n      result = findResult();\n      // success\n    } catch(reason) {\n      // failure\n    }\n    ```\n  \n    Errback Example\n  \n    ```js\n    findResult(function(result, err){\n      if (err) {\n        // failure\n      } else {\n        // success\n      }\n    });\n    ```\n  \n    Promise Example;\n  \n    ```javascript\n    findResult().then(function(result){\n      // success\n    }, function(reason){\n      // failure\n    });\n    ```\n  \n    Advanced Example\n    --------------\n  \n    Synchronous Example\n  \n    ```javascript\n    let author, books;\n  \n    try {\n      author = findAuthor();\n      books  = findBooksByAuthor(author);\n      // success\n    } catch(reason) {\n      // failure\n    }\n    ```\n  \n    Errback Example\n  \n    ```js\n  \n    function foundBooks(books) {\n  \n    }\n  \n    function failure(reason) {\n  \n    }\n  \n    findAuthor(function(author, err){\n      if (err) {\n        failure(err);\n        // failure\n      } else {\n        try {\n          findBoooksByAuthor(author, function(books, err) {\n            if (err) {\n              failure(err);\n            } else {\n              try {\n                foundBooks(books);\n              } catch(reason) {\n                failure(reason);\n              }\n            }\n          });\n        } catch(error) {\n          failure(err);\n        }\n        // success\n      }\n    });\n    ```\n  \n    Promise Example;\n  \n    ```javascript\n    findAuthor().\n      then(findBooksByAuthor).\n      then(function(books){\n        // found books\n    }).catch(function(reason){\n      // something went wrong\n    });\n    ```\n  \n    @method then\n    @param {Function} onFulfilled\n    @param {Function} onRejected\n    Useful for tooling.\n    @return {Promise}\n  */\n  then: then,\n\n  /**\n    `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n    as the catch block of a try/catch statement.\n  \n    ```js\n    function findAuthor(){\n      throw new Error('couldn't find that author');\n    }\n  \n    // synchronous\n    try {\n      findAuthor();\n    } catch(reason) {\n      // something went wrong\n    }\n  \n    // async with promises\n    findAuthor().catch(function(reason){\n      // something went wrong\n    });\n    ```\n  \n    @method catch\n    @param {Function} onRejection\n    Useful for tooling.\n    @return {Promise}\n  */\n  'catch': function _catch(onRejection) {\n    return this.then(null, onRejection);\n  }\n};\n\nfunction polyfill() {\n    var local = undefined;\n\n    if (typeof global !== 'undefined') {\n        local = global;\n    } else if (typeof self !== 'undefined') {\n        local = self;\n    } else {\n        try {\n            local = Function('return this')();\n        } catch (e) {\n            throw new Error('polyfill failed because global object is unavailable in this environment');\n        }\n    }\n\n    var P = local.Promise;\n\n    if (P) {\n        var promiseToString = null;\n        try {\n            promiseToString = Object.prototype.toString.call(P.resolve());\n        } catch (e) {\n            // silently ignored\n        }\n\n        if (promiseToString === '[object Promise]' && !P.cast) {\n            return;\n        }\n    }\n\n    local.Promise = Promise;\n}\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n\n}).call(this,_dereq_('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"_process\":477}],214:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = _dereq_('./is-implemented')() ? Symbol : _dereq_('./polyfill');\n\n},{\"./is-implemented\":215,\"./polyfill\":217}],215:[function(_dereq_,module,exports){\n'use strict';\n\nvar validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar symbol;\n\tif (typeof Symbol !== 'function') return false;\n\tsymbol = Symbol('test symbol');\n\ttry { String(symbol); } catch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n\n},{}],216:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = function (x) {\n\tif (!x) return false;\n\tif (typeof x === 'symbol') return true;\n\tif (!x.constructor) return false;\n\tif (x.constructor.name !== 'Symbol') return false;\n\treturn (x[x.constructor.toStringTag] === 'Symbol');\n};\n\n},{}],217:[function(_dereq_,module,exports){\n// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n'use strict';\n\nvar d              = _dereq_('d')\n  , validateSymbol = _dereq_('./validate-symbol')\n\n  , create = Object.create, defineProperties = Object.defineProperties\n  , defineProperty = Object.defineProperty, objPrototype = Object.prototype\n  , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null)\n  , isNativeSafe;\n\nif (typeof Symbol === 'function') {\n\tNativeSymbol = Symbol;\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n}\n\nvar generateName = (function () {\n\tvar created = create(null);\n\treturn function (desc) {\n\t\tvar postfix = 0, name, ie11BugWorkaround;\n\t\twhile (created[desc + (postfix || '')]) ++postfix;\n\t\tdesc += (postfix || '');\n\t\tcreated[desc] = true;\n\t\tname = '@@' + desc;\n\t\tdefineProperty(objPrototype, name, d.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t//    ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t}));\n\t\treturn name;\n\t};\n}());\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError('Symbol is not a constructor');\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError('Symbol is not a constructor');\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = (description === undefined ? '' : String(description));\n\treturn defineProperties(symbol, {\n\t\t__description__: d('', description),\n\t\t__name__: d('', generateName(description))\n\t});\n};\ndefineProperties(SymbolPolyfill, {\n\tfor: d(function (key) {\n\t\tif (globalSymbols[key]) return globalSymbols[key];\n\t\treturn (globalSymbols[key] = SymbolPolyfill(String(key)));\n\t}),\n\tkeyFor: d(function (s) {\n\t\tvar key;\n\t\tvalidateSymbol(s);\n\t\tfor (key in globalSymbols) if (globalSymbols[key] === s) return key;\n\t}),\n\n\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t// fallback to eventual native implementation of given symbol\n\thasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),\n\tisConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\tSymbolPolyfill('isConcatSpreadable')),\n\titerator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),\n\tmatch: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),\n\treplace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),\n\tsearch: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),\n\tspecies: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),\n\tsplit: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),\n\ttoPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),\n\ttoStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),\n\tunscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))\n});\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d('', function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function () {\n\tvar symbol = validateSymbol(this);\n\tif (typeof symbol === 'symbol') return symbol;\n\treturn symbol.toString();\n}));\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));\n\n},{\"./validate-symbol\":218,\"d\":144}],218:[function(_dereq_,module,exports){\n'use strict';\n\nvar isSymbol = _dereq_('./is-symbol');\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n\n},{\"./is-symbol\":216}],219:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = _dereq_('./is-implemented')() ? WeakMap : _dereq_('./polyfill');\n\n},{\"./is-implemented\":220,\"./polyfill\":222}],220:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = function () {\n\tvar weakMap, x;\n\tif (typeof WeakMap !== 'function') return false;\n\ttry {\n\t\t// WebKit doesn't support arguments and crashes\n\t\tweakMap = new WeakMap([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]);\n\t} catch (e) {\n\t\treturn false;\n\t}\n\tif (String(weakMap) !== '[object WeakMap]') return false;\n\tif (typeof weakMap.set !== 'function') return false;\n\tif (weakMap.set({}, 1) !== weakMap) return false;\n\tif (typeof weakMap.delete !== 'function') return false;\n\tif (typeof weakMap.has !== 'function') return false;\n\tif (weakMap.get(x) !== 'one') return false;\n\n\treturn true;\n};\n\n},{}],221:[function(_dereq_,module,exports){\n// Exports true if environment provides native `WeakMap` implementation, whatever that is.\n\n'use strict';\n\nmodule.exports = (function () {\n\tif (typeof WeakMap !== 'function') return false;\n\treturn (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]');\n}());\n\n},{}],222:[function(_dereq_,module,exports){\n'use strict';\n\nvar setPrototypeOf    = _dereq_('es5-ext/object/set-prototype-of')\n  , object            = _dereq_('es5-ext/object/valid-object')\n  , value             = _dereq_('es5-ext/object/valid-value')\n  , randomUniq        = _dereq_('es5-ext/string/random-uniq')\n  , d                 = _dereq_('d')\n  , getIterator       = _dereq_('es6-iterator/get')\n  , forOf             = _dereq_('es6-iterator/for-of')\n  , toStringTagSymbol = _dereq_('es6-symbol').toStringTag\n  , isNative          = _dereq_('./is-native-implemented')\n\n  , isArray = Array.isArray, defineProperty = Object.defineProperty\n  , hasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf\n  , WeakMapPoly;\n\nmodule.exports = WeakMapPoly = function (/*iterable*/) {\n\tvar iterable = arguments[0], self;\n\tif (!(this instanceof WeakMapPoly)) throw new TypeError('Constructor requires \\'new\\'');\n\tif (isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)) {\n\t\tself = setPrototypeOf(new WeakMap(), getPrototypeOf(this));\n\t} else {\n\t\tself = this;\n\t}\n\tif (iterable != null) {\n\t\tif (!isArray(iterable)) iterable = getIterator(iterable);\n\t}\n\tdefineProperty(self, '__weakMapData__', d('c', '$weakMap$' + randomUniq()));\n\tif (!iterable) return self;\n\tforOf(iterable, function (val) {\n\t\tvalue(val);\n\t\tself.set(val[0], val[1]);\n\t});\n\treturn self;\n};\n\nif (isNative) {\n\tif (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap);\n\tWeakMapPoly.prototype = Object.create(WeakMap.prototype, {\n\t\tconstructor: d(WeakMapPoly)\n\t});\n}\n\nObject.defineProperties(WeakMapPoly.prototype, {\n\tdelete: d(function (key) {\n\t\tif (hasOwnProperty.call(object(key), this.__weakMapData__)) {\n\t\t\tdelete key[this.__weakMapData__];\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}),\n\tget: d(function (key) {\n\t\tif (hasOwnProperty.call(object(key), this.__weakMapData__)) {\n\t\t\treturn key[this.__weakMapData__];\n\t\t}\n\t}),\n\thas: d(function (key) {\n\t\treturn hasOwnProperty.call(object(key), this.__weakMapData__);\n\t}),\n\tset: d(function (key, value) {\n\t\tdefineProperty(object(key), this.__weakMapData__, d('c', value));\n\t\treturn this;\n\t}),\n\ttoString: d(function () { return '[object WeakMap]'; })\n});\ndefineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap'));\n\n},{\"./is-native-implemented\":221,\"d\":144,\"es5-ext/object/set-prototype-of\":195,\"es5-ext/object/valid-object\":199,\"es5-ext/object/valid-value\":200,\"es5-ext/string/random-uniq\":205,\"es6-iterator/for-of\":207,\"es6-iterator/get\":208,\"es6-symbol\":214}],223:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = extractPlanes\n\nfunction extractPlanes(M, zNear, zFar) {\n  var z  = zNear || 0.0\n  var zf = zFar || 1.0\n  return [\n    [ M[12] + M[0], M[13] + M[1], M[14] + M[2], M[15] + M[3] ],\n    [ M[12] - M[0], M[13] - M[1], M[14] - M[2], M[15] - M[3] ],\n    [ M[12] + M[4], M[13] + M[5], M[14] + M[6], M[15] + M[7] ],\n    [ M[12] - M[4], M[13] - M[5], M[14] - M[6], M[15] - M[7] ],\n    [ z*M[12] + M[8], z*M[13] + M[9], z*M[14] + M[10], z*M[15] + M[11] ],\n    [ zf*M[12] - M[8], zf*M[13] - M[9], zf*M[14] - M[10], zf*M[15] - M[11] ]\n  ]\n}\n},{}],224:[function(_dereq_,module,exports){\n/**\n * inspired by is-number <https://github.com/jonschlinkert/is-number>\n * but significantly simplified and sped up by ignoring number and string constructors\n * ie these return false:\n *   new Number(1)\n *   new String('1')\n */\n\n'use strict';\n\nvar allBlankCharCodes = _dereq_('is-string-blank');\n\nmodule.exports = function(n) {\n    var type = typeof n;\n    if(type === 'string') {\n        var original = n;\n        n = +n;\n        // whitespace strings cast to zero - filter them out\n        if(n===0 && allBlankCharCodes(original)) return false;\n    }\n    else if(type !== 'number') return false;\n\n    return n - n < 1;\n};\n\n},{\"is-string-blank\":418}],225:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createFilteredVector\n\nvar cubicHermite = _dereq_('cubic-hermite')\nvar bsearch = _dereq_('binary-search-bounds')\n\nfunction clamp(lo, hi, x) {\n  return Math.min(hi, Math.max(lo, x))\n}\n\nfunction FilteredVector(state0, velocity0, t0) {\n  this.dimension  = state0.length\n  this.bounds     = [ new Array(this.dimension), new Array(this.dimension) ]\n  for(var i=0; i<this.dimension; ++i) {\n    this.bounds[0][i] = -Infinity\n    this.bounds[1][i] = Infinity\n  }\n  this._state     = state0.slice().reverse()\n  this._velocity  = velocity0.slice().reverse()\n  this._time      = [ t0 ]\n  this._scratch   = [ state0.slice(), state0.slice(), state0.slice(), state0.slice(), state0.slice() ]\n}\n\nvar proto = FilteredVector.prototype\n\nproto.flush = function(t) {\n  var idx = bsearch.gt(this._time, t) - 1\n  if(idx <= 0) {\n    return\n  }\n  this._time.splice(0, idx)\n  this._state.splice(0, idx * this.dimension)\n  this._velocity.splice(0, idx * this.dimension)\n}\n\nproto.curve = function(t) {\n  var time      = this._time\n  var n         = time.length\n  var idx       = bsearch.le(time, t)\n  var result    = this._scratch[0]\n  var state     = this._state\n  var velocity  = this._velocity\n  var d         = this.dimension\n  var bounds    = this.bounds\n  if(idx < 0) {\n    var ptr = d-1\n    for(var i=0; i<d; ++i, --ptr) {\n      result[i] = state[ptr]\n    }\n  } else if(idx >= n-1) {\n    var ptr = state.length-1\n    var tf = t - time[n-1]\n    for(var i=0; i<d; ++i, --ptr) {\n      result[i] = state[ptr] + tf * velocity[ptr]\n    }\n  } else {\n    var ptr = d * (idx+1) - 1\n    var t0  = time[idx]\n    var t1  = time[idx+1]\n    var dt  = (t1 - t0) || 1.0\n    var x0  = this._scratch[1]\n    var x1  = this._scratch[2]\n    var v0  = this._scratch[3]\n    var v1  = this._scratch[4]\n    var steady = true\n    for(var i=0; i<d; ++i, --ptr) {\n      x0[i] = state[ptr]\n      v0[i] = velocity[ptr] * dt\n      x1[i] = state[ptr+d]\n      v1[i] = velocity[ptr+d] * dt\n      steady = steady && (x0[i] === x1[i] && v0[i] === v1[i] && v0[i] === 0.0)\n    }\n    if(steady) {\n      for(var i=0; i<d; ++i) {\n        result[i] = x0[i]\n      }\n    } else {\n      cubicHermite(x0, v0, x1, v1, (t-t0)/dt, result)\n    }\n  }\n  var lo = bounds[0]\n  var hi = bounds[1]\n  for(var i=0; i<d; ++i) {\n    result[i] = clamp(lo[i], hi[i], result[i])\n  }\n  return result\n}\n\nproto.dcurve = function(t) {\n  var time     = this._time\n  var n        = time.length\n  var idx      = bsearch.le(time, t)\n  var result   = this._scratch[0]\n  var state    = this._state\n  var velocity = this._velocity\n  var d        = this.dimension\n  if(idx >= n-1) {\n    var ptr = state.length-1\n    var tf = t - time[n-1]\n    for(var i=0; i<d; ++i, --ptr) {\n      result[i] = velocity[ptr]\n    }\n  } else {\n    var ptr = d * (idx+1) - 1\n    var t0 = time[idx]\n    var t1 = time[idx+1]\n    var dt = (t1 - t0) || 1.0\n    var x0 = this._scratch[1]\n    var x1 = this._scratch[2]\n    var v0 = this._scratch[3]\n    var v1 = this._scratch[4]\n    var steady = true\n    for(var i=0; i<d; ++i, --ptr) {\n      x0[i] = state[ptr]\n      v0[i] = velocity[ptr] * dt\n      x1[i] = state[ptr+d]\n      v1[i] = velocity[ptr+d] * dt\n      steady = steady && (x0[i] === x1[i] && v0[i] === v1[i] && v0[i] === 0.0)\n    }\n    if(steady) {\n      for(var i=0; i<d; ++i) {\n        result[i] = 0.0\n      }\n    } else {\n      cubicHermite.derivative(x0, v0, x1, v1, (t-t0)/dt, result)\n      for(var i=0; i<d; ++i) {\n        result[i] /= dt\n      }\n    }\n  }\n  return result\n}\n\nproto.lastT = function() {\n  var time = this._time\n  return time[time.length-1]\n}\n\nproto.stable = function() {\n  var velocity = this._velocity\n  var ptr = velocity.length\n  for(var i=this.dimension-1; i>=0; --i) {\n    if(velocity[--ptr]) {\n      return false\n    }\n  }\n  return true\n}\n\nproto.jump = function(t) {\n  var t0 = this.lastT()\n  var d  = this.dimension\n  if(t < t0 || arguments.length !== d+1) {\n    return\n  }\n  var state     = this._state\n  var velocity  = this._velocity\n  var ptr       = state.length-this.dimension\n  var bounds    = this.bounds\n  var lo        = bounds[0]\n  var hi        = bounds[1]\n  this._time.push(t0, t)\n  for(var j=0; j<2; ++j) {\n    for(var i=0; i<d; ++i) {\n      state.push(state[ptr++])\n      velocity.push(0)\n    }\n  }\n  this._time.push(t)\n  for(var i=d; i>0; --i) {\n    state.push(clamp(lo[i-1], hi[i-1], arguments[i]))\n    velocity.push(0)\n  }\n}\n\nproto.push = function(t) {\n  var t0 = this.lastT()\n  var d  = this.dimension\n  if(t < t0 || arguments.length !== d+1) {\n    return\n  }\n  var state     = this._state\n  var velocity  = this._velocity\n  var ptr       = state.length-this.dimension\n  var dt        = t - t0\n  var bounds    = this.bounds\n  var lo        = bounds[0]\n  var hi        = bounds[1]\n  var sf        = (dt > 1e-6) ? 1/dt : 0\n  this._time.push(t)\n  for(var i=d; i>0; --i) {\n    var xc = clamp(lo[i-1], hi[i-1], arguments[i])\n    state.push(xc)\n    velocity.push((xc - state[ptr++]) * sf)\n  }\n}\n\nproto.set = function(t) {\n  var d = this.dimension\n  if(t < this.lastT() || arguments.length !== d+1) {\n    return\n  }\n  var state     = this._state\n  var velocity  = this._velocity\n  var bounds    = this.bounds\n  var lo        = bounds[0]\n  var hi        = bounds[1]\n  this._time.push(t)\n  for(var i=d; i>0; --i) {\n    state.push(clamp(lo[i-1], hi[i-1], arguments[i]))\n    velocity.push(0)\n  }\n}\n\nproto.move = function(t) {\n  var t0 = this.lastT()\n  var d  = this.dimension\n  if(t <= t0 || arguments.length !== d+1) {\n    return\n  }\n  var state    = this._state\n  var velocity = this._velocity\n  var statePtr = state.length - this.dimension\n  var bounds   = this.bounds\n  var lo       = bounds[0]\n  var hi       = bounds[1]\n  var dt       = t - t0\n  var sf       = (dt > 1e-6) ? 1/dt : 0.0\n  this._time.push(t)\n  for(var i=d; i>0; --i) {\n    var dx = arguments[i]\n    state.push(clamp(lo[i-1], hi[i-1], state[statePtr++] + dx))\n    velocity.push(dx * sf)\n  }\n}\n\nproto.idle = function(t) {\n  var t0 = this.lastT()\n  if(t < t0) {\n    return\n  }\n  var d        = this.dimension\n  var state    = this._state\n  var velocity = this._velocity\n  var statePtr = state.length-d\n  var bounds   = this.bounds\n  var lo       = bounds[0]\n  var hi       = bounds[1]\n  var dt       = t - t0\n  this._time.push(t)\n  for(var i=d-1; i>=0; --i) {\n    state.push(clamp(lo[i], hi[i], state[statePtr] + dt * velocity[statePtr]))\n    velocity.push(0)\n    statePtr += 1\n  }\n}\n\nfunction getZero(d) {\n  var result = new Array(d)\n  for(var i=0; i<d; ++i) {\n    result[i] = 0.0\n  }\n  return result\n}\n\nfunction createFilteredVector(initState, initVelocity, initTime) {\n  switch(arguments.length) {\n    case 0:\n      return new FilteredVector([0], [0], 0)\n    case 1:\n      if(typeof initState === 'number') {\n        var zero = getZero(initState)\n        return new FilteredVector(zero, zero, 0)\n      } else {\n        return new FilteredVector(initState, getZero(initState.length), 0)\n      }\n    case 2:\n      if(typeof initVelocity === 'number') {\n        var zero = getZero(initState.length)\n        return new FilteredVector(initState, zero, +initVelocity)\n      } else {\n        initTime = 0\n      }\n    case 3:\n      if(initState.length !== initVelocity.length) {\n        throw new Error('state and velocity lengths must match')\n      }\n      return new FilteredVector(initState, initVelocity, initTime)\n  }\n}\n\n},{\"binary-search-bounds\":84,\"cubic-hermite\":138}],226:[function(_dereq_,module,exports){\n/*eslint new-cap:0*/\nvar dtype = _dereq_('dtype')\n\nmodule.exports = flattenVertexData\n\nfunction flattenVertexData (data, output, offset) {\n  if (!data) throw new TypeError('must specify data as first parameter')\n  offset = +(offset || 0) | 0\n\n  if (Array.isArray(data) && (data[0] && typeof data[0][0] === 'number')) {\n    var dim = data[0].length\n    var length = data.length * dim\n    var i, j, k, l\n\n    // no output specified, create a new typed array\n    if (!output || typeof output === 'string') {\n      output = new (dtype(output || 'float32'))(length + offset)\n    }\n\n    var dstLength = output.length - offset\n    if (length !== dstLength) {\n      throw new Error('source length ' + length + ' (' + dim + 'x' + data.length + ')' +\n        ' does not match destination length ' + dstLength)\n    }\n\n    for (i = 0, k = offset; i < data.length; i++) {\n      for (j = 0; j < dim; j++) {\n        output[k++] = data[i][j] === null ? NaN : data[i][j]\n      }\n    }\n  } else {\n    if (!output || typeof output === 'string') {\n      // no output, create a new one\n      var Ctor = dtype(output || 'float32')\n\n      // handle arrays separately due to possible nulls\n      if (Array.isArray(data) || output === 'array') {\n        output = new Ctor(data.length + offset)\n        for (i = 0, k = offset, l = output.length; k < l; k++, i++) {\n          output[k] = data[i] === null ? NaN : data[i]\n        }\n      } else {\n        if (offset === 0) {\n          output = new Ctor(data)\n        } else {\n          output = new Ctor(data.length + offset)\n\n          output.set(data, offset)\n        }\n      }\n    } else {\n      // store output in existing array\n      output.set(data, offset)\n    }\n  }\n\n  return output\n}\n\n},{\"dtype\":163}],227:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar stringifyFont = _dereq_('css-font/stringify')\r\nvar defaultChars = [32, 126]\r\n\r\nmodule.exports = atlas\r\n\r\nfunction atlas(options) {\r\n  options = options || {}\r\n\r\n  var shape  = options.shape ? options.shape : options.canvas ? [options.canvas.width, options.canvas.height] : [512, 512]\r\n  var canvas = options.canvas || document.createElement('canvas')\r\n  var font   = options.font\r\n  var step   = typeof options.step === 'number' ? [options.step, options.step] : options.step || [32, 32]\r\n  var chars  = options.chars || defaultChars\r\n\r\n  if (font && typeof font !== 'string') font = stringifyFont(font)\r\n\r\n  if (!Array.isArray(chars)) {\r\n    chars = String(chars).split('')\r\n  } else\r\n  if (chars.length === 2\r\n    && typeof chars[0] === 'number'\r\n    && typeof chars[1] === 'number'\r\n  ) {\r\n    var newchars = []\r\n\r\n    for (var i = chars[0], j = 0; i <= chars[1]; i++) {\r\n      newchars[j++] = String.fromCharCode(i)\r\n    }\r\n\r\n    chars = newchars\r\n  }\r\n\r\n  shape = shape.slice()\r\n  canvas.width  = shape[0]\r\n  canvas.height = shape[1]\r\n\r\n  var ctx = canvas.getContext('2d')\r\n\r\n  ctx.fillStyle = '#000'\r\n  ctx.fillRect(0, 0, canvas.width, canvas.height)\r\n\r\n  ctx.font = font\r\n  ctx.textAlign = 'center'\r\n  ctx.textBaseline = 'middle'\r\n  ctx.fillStyle = '#fff'\r\n\r\n  var x = step[0] / 2\r\n  var y = step[1] / 2\r\n  for (var i = 0; i < chars.length; i++) {\r\n    ctx.fillText(chars[i], x, y)\r\n    if ((x += step[0]) > shape[0] - step[0]/2) (x = step[0]/2), (y += step[1])\r\n  }\r\n\r\n  return canvas\r\n}\r\n\n},{\"css-font/stringify\":135}],228:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = measure\r\n\r\nmeasure.canvas = document.createElement('canvas')\r\nmeasure.cache = {}\r\n\r\nfunction measure (font, o) {\r\n\tif (!o) o = {}\r\n\r\n\tif (typeof font === 'string' || Array.isArray(font)) {\r\n\t\to.family = font\r\n\t}\r\n\r\n\tvar family = Array.isArray(o.family) ? o.family.join(', ') : o.family\r\n\tif (!family) throw Error('`family` must be defined')\r\n\r\n\tvar fs = o.size || o.fontSize || o.em || 48\r\n\tvar weight = o.weight || o.fontWeight || ''\r\n\tvar style = o.style || o.fontStyle || ''\r\n\tvar font = [style, weight, fs].join(' ') + 'px ' + family\r\n\tvar origin = o.origin || 'top'\r\n\r\n\tif (measure.cache[family]) {\r\n\t\t// return more precise values if cache has them\r\n\t\tif (fs <= measure.cache[family].em) {\r\n\t\t\treturn applyOrigin(measure.cache[family], origin)\r\n\t\t}\r\n\t}\r\n\r\n\tvar canvas = o.canvas || measure.canvas\r\n\tvar ctx = canvas.getContext('2d')\r\n\tvar chars = {\r\n\t\tupper: o.upper !== undefined ? o.upper : 'H',\r\n\t\tlower: o.lower !== undefined ? o.lower : 'x',\r\n\t\tdescent: o.descent !== undefined ? o.descent : 'p',\r\n\t\tascent: o.ascent !== undefined ? o.ascent : 'h',\r\n\t\ttittle: o.tittle !== undefined ? o.tittle : 'i',\r\n\t\tovershoot: o.overshoot !== undefined ? o.overshoot : 'O'\r\n\t}\r\n\tvar l = Math.ceil(fs * 1.5)\r\n\tcanvas.height = l\r\n\tcanvas.width = l * .5\r\n\tctx.font = font\r\n\r\n\tvar char = 'H'\r\n\tvar result = {\r\n\t\ttop: 0\r\n\t}\r\n\r\n\t// measure line-height\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'top'\r\n\tctx.fillStyle = 'black'\r\n\tctx.fillText(char, 0, 0)\r\n\tvar topPx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'bottom'\r\n\tctx.fillText(char, 0, l)\r\n\tvar bottomPx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tresult.lineHeight =\r\n\tresult.bottom = l - bottomPx + topPx\r\n\r\n\t// measure baseline\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'alphabetic'\r\n\tctx.fillText(char, 0, l)\r\n\tvar baselinePx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tvar baseline = l - baselinePx - 1 + topPx\r\n\tresult.baseline =\r\n\tresult.alphabetic = baseline\r\n\r\n\t// measure median\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'middle'\r\n\tctx.fillText(char, 0, l * .5)\r\n\tvar medianPx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tresult.median =\r\n\tresult.middle = l - medianPx - 1 + topPx - l * .5\r\n\r\n\t// measure hanging\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'hanging'\r\n\tctx.fillText(char, 0, l * .5)\r\n\tvar hangingPx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tresult.hanging = l - hangingPx - 1 + topPx - l * .5\r\n\r\n\t// measure ideographic\r\n\tctx.clearRect(0, 0, l, l)\r\n\tctx.textBaseline = 'ideographic'\r\n\tctx.fillText(char, 0, l)\r\n\tvar ideographicPx = firstTop(ctx.getImageData(0, 0, l, l))\r\n\tresult.ideographic = l - ideographicPx - 1 + topPx\r\n\r\n\t// measure cap\r\n\tif (chars.upper) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.upper, 0, 0)\r\n\t\tresult.upper = firstTop(ctx.getImageData(0, 0, l, l))\r\n\t\tresult.capHeight = (result.baseline - result.upper)\r\n\t}\r\n\r\n\t// measure x\r\n\tif (chars.lower) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.lower, 0, 0)\r\n\t\tresult.lower = firstTop(ctx.getImageData(0, 0, l, l))\r\n\t\tresult.xHeight = (result.baseline - result.lower)\r\n\t}\r\n\r\n\t// measure tittle\r\n\tif (chars.tittle) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.tittle, 0, 0)\r\n\t\tresult.tittle = firstTop(ctx.getImageData(0, 0, l, l))\r\n\t}\r\n\r\n\t// measure ascent\r\n\tif (chars.ascent) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.ascent, 0, 0)\r\n\t\tresult.ascent = firstTop(ctx.getImageData(0, 0, l, l))\r\n\t}\r\n\r\n\t// measure descent\r\n\tif (chars.descent) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.descent, 0, 0)\r\n\t\tresult.descent = firstBottom(ctx.getImageData(0, 0, l, l))\r\n\t}\r\n\r\n\t// measure overshoot\r\n\tif (chars.overshoot) {\r\n\t\tctx.clearRect(0, 0, l, l)\r\n\t\tctx.textBaseline = 'top'\r\n\t\tctx.fillText(chars.overshoot, 0, 0)\r\n\t\tvar overshootPx = firstBottom(ctx.getImageData(0, 0, l, l))\r\n\t\tresult.overshoot = overshootPx - baseline\r\n\t}\r\n\r\n\t// normalize result\r\n\tfor (var name in result) {\r\n\t\tresult[name] /= fs\r\n\t}\r\n\r\n\tresult.em = fs\r\n\tmeasure.cache[family] = result\r\n\r\n\treturn applyOrigin(result, origin)\r\n}\r\n\r\nfunction applyOrigin(obj, origin) {\r\n\tvar res = {}\r\n\tif (typeof origin === 'string') origin = obj[origin]\r\n\tfor (var name in obj) {\r\n\t\tif (name === 'em') continue\r\n\t\tres[name] = obj[name] - origin\r\n\t}\r\n\treturn res\r\n}\r\n\r\nfunction firstTop(iData) {\r\n\tvar l = iData.height\r\n\tvar data = iData.data\r\n\tfor (var i = 3; i < data.length; i+=4) {\r\n\t\tif (data[i] !== 0) {\r\n\t\t\treturn Math.floor((i - 3) *.25 / l)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction firstBottom(iData) {\r\n\tvar l = iData.height\r\n\tvar data = iData.data\r\n\tfor (var i = data.length - 1; i > 0; i -= 4) {\r\n\t\tif (data[i] !== 0) {\r\n\t\t\treturn Math.floor((i - 3) *.25 / l)\r\n\t\t}\r\n\t}\r\n}\r\n\n},{}],229:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = createRBTree\n\nvar RED   = 0\nvar BLACK = 1\n\nfunction RBNode(color, key, value, left, right, count) {\n  this._color = color\n  this.key = key\n  this.value = value\n  this.left = left\n  this.right = right\n  this._count = count\n}\n\nfunction cloneNode(node) {\n  return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count)\n}\n\nfunction repaint(color, node) {\n  return new RBNode(color, node.key, node.value, node.left, node.right, node._count)\n}\n\nfunction recount(node) {\n  node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0)\n}\n\nfunction RedBlackTree(compare, root) {\n  this._compare = compare\n  this.root = root\n}\n\nvar proto = RedBlackTree.prototype\n\nObject.defineProperty(proto, \"keys\", {\n  get: function() {\n    var result = []\n    this.forEach(function(k,v) {\n      result.push(k)\n    })\n    return result\n  }\n})\n\nObject.defineProperty(proto, \"values\", {\n  get: function() {\n    var result = []\n    this.forEach(function(k,v) {\n      result.push(v)\n    })\n    return result\n  }\n})\n\n//Returns the number of nodes in the tree\nObject.defineProperty(proto, \"length\", {\n  get: function() {\n    if(this.root) {\n      return this.root._count\n    }\n    return 0\n  }\n})\n\n//Insert a new item into the tree\nproto.insert = function(key, value) {\n  var cmp = this._compare\n  //Find point to insert new node at\n  var n = this.root\n  var n_stack = []\n  var d_stack = []\n  while(n) {\n    var d = cmp(key, n.key)\n    n_stack.push(n)\n    d_stack.push(d)\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  //Rebuild path to leaf node\n  n_stack.push(new RBNode(RED, key, value, null, null, 1))\n  for(var s=n_stack.length-2; s>=0; --s) {\n    var n = n_stack[s]\n    if(d_stack[s] <= 0) {\n      n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1)\n    } else {\n      n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1)\n    }\n  }\n  //Rebalance tree using rotations\n  //console.log(\"start insert\", key, d_stack)\n  for(var s=n_stack.length-1; s>1; --s) {\n    var p = n_stack[s-1]\n    var n = n_stack[s]\n    if(p._color === BLACK || n._color === BLACK) {\n      break\n    }\n    var pp = n_stack[s-2]\n    if(pp.left === p) {\n      if(p.left === n) {\n        var y = pp.right\n        if(y && y._color === RED) {\n          //console.log(\"LLr\")\n          p._color = BLACK\n          pp.right = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"LLb\")\n          pp._color = RED\n          pp.left = p.right\n          p._color = BLACK\n          p.right = pp\n          n_stack[s-2] = p\n          n_stack[s-1] = n\n          recount(pp)\n          recount(p)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.left === pp) {\n              ppp.left = p\n            } else {\n              ppp.right = p\n            }\n          }\n          break\n        }\n      } else {\n        var y = pp.right\n        if(y && y._color === RED) {\n          //console.log(\"LRr\")\n          p._color = BLACK\n          pp.right = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"LRb\")\n          p.right = n.left\n          pp._color = RED\n          pp.left = n.right\n          n._color = BLACK\n          n.left = p\n          n.right = pp\n          n_stack[s-2] = n\n          n_stack[s-1] = p\n          recount(pp)\n          recount(p)\n          recount(n)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.left === pp) {\n              ppp.left = n\n            } else {\n              ppp.right = n\n            }\n          }\n          break\n        }\n      }\n    } else {\n      if(p.right === n) {\n        var y = pp.left\n        if(y && y._color === RED) {\n          //console.log(\"RRr\", y.key)\n          p._color = BLACK\n          pp.left = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"RRb\")\n          pp._color = RED\n          pp.right = p.left\n          p._color = BLACK\n          p.left = pp\n          n_stack[s-2] = p\n          n_stack[s-1] = n\n          recount(pp)\n          recount(p)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.right === pp) {\n              ppp.right = p\n            } else {\n              ppp.left = p\n            }\n          }\n          break\n        }\n      } else {\n        var y = pp.left\n        if(y && y._color === RED) {\n          //console.log(\"RLr\")\n          p._color = BLACK\n          pp.left = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"RLb\")\n          p.left = n.right\n          pp._color = RED\n          pp.right = n.left\n          n._color = BLACK\n          n.right = p\n          n.left = pp\n          n_stack[s-2] = n\n          n_stack[s-1] = p\n          recount(pp)\n          recount(p)\n          recount(n)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.right === pp) {\n              ppp.right = n\n            } else {\n              ppp.left = n\n            }\n          }\n          break\n        }\n      }\n    }\n  }\n  //Return new tree\n  n_stack[0]._color = BLACK\n  return new RedBlackTree(cmp, n_stack[0])\n}\n\n\n//Visit all nodes inorder\nfunction doVisitFull(visit, node) {\n  if(node.left) {\n    var v = doVisitFull(visit, node.left)\n    if(v) { return v }\n  }\n  var v = visit(node.key, node.value)\n  if(v) { return v }\n  if(node.right) {\n    return doVisitFull(visit, node.right)\n  }\n}\n\n//Visit half nodes in order\nfunction doVisitHalf(lo, compare, visit, node) {\n  var l = compare(lo, node.key)\n  if(l <= 0) {\n    if(node.left) {\n      var v = doVisitHalf(lo, compare, visit, node.left)\n      if(v) { return v }\n    }\n    var v = visit(node.key, node.value)\n    if(v) { return v }\n  }\n  if(node.right) {\n    return doVisitHalf(lo, compare, visit, node.right)\n  }\n}\n\n//Visit all nodes within a range\nfunction doVisit(lo, hi, compare, visit, node) {\n  var l = compare(lo, node.key)\n  var h = compare(hi, node.key)\n  var v\n  if(l <= 0) {\n    if(node.left) {\n      v = doVisit(lo, hi, compare, visit, node.left)\n      if(v) { return v }\n    }\n    if(h > 0) {\n      v = visit(node.key, node.value)\n      if(v) { return v }\n    }\n  }\n  if(h > 0 && node.right) {\n    return doVisit(lo, hi, compare, visit, node.right)\n  }\n}\n\n\nproto.forEach = function rbTreeForEach(visit, lo, hi) {\n  if(!this.root) {\n    return\n  }\n  switch(arguments.length) {\n    case 1:\n      return doVisitFull(visit, this.root)\n    break\n\n    case 2:\n      return doVisitHalf(lo, this._compare, visit, this.root)\n    break\n\n    case 3:\n      if(this._compare(lo, hi) >= 0) {\n        return\n      }\n      return doVisit(lo, hi, this._compare, visit, this.root)\n    break\n  }\n}\n\n//First item in list\nObject.defineProperty(proto, \"begin\", {\n  get: function() {\n    var stack = []\n    var n = this.root\n    while(n) {\n      stack.push(n)\n      n = n.left\n    }\n    return new RedBlackTreeIterator(this, stack)\n  }\n})\n\n//Last item in list\nObject.defineProperty(proto, \"end\", {\n  get: function() {\n    var stack = []\n    var n = this.root\n    while(n) {\n      stack.push(n)\n      n = n.right\n    }\n    return new RedBlackTreeIterator(this, stack)\n  }\n})\n\n//Find the ith item in the tree\nproto.at = function(idx) {\n  if(idx < 0) {\n    return new RedBlackTreeIterator(this, [])\n  }\n  var n = this.root\n  var stack = []\n  while(true) {\n    stack.push(n)\n    if(n.left) {\n      if(idx < n.left._count) {\n        n = n.left\n        continue\n      }\n      idx -= n.left._count\n    }\n    if(!idx) {\n      return new RedBlackTreeIterator(this, stack)\n    }\n    idx -= 1\n    if(n.right) {\n      if(idx >= n.right._count) {\n        break\n      }\n      n = n.right\n    } else {\n      break\n    }\n  }\n  return new RedBlackTreeIterator(this, [])\n}\n\nproto.ge = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d <= 0) {\n      last_ptr = stack.length\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.gt = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d < 0) {\n      last_ptr = stack.length\n    }\n    if(d < 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.lt = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d > 0) {\n      last_ptr = stack.length\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.le = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d >= 0) {\n      last_ptr = stack.length\n    }\n    if(d < 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\n//Finds the item with key if it exists\nproto.find = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d === 0) {\n      return new RedBlackTreeIterator(this, stack)\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  return new RedBlackTreeIterator(this, [])\n}\n\n//Removes item with key from tree\nproto.remove = function(key) {\n  var iter = this.find(key)\n  if(iter) {\n    return iter.remove()\n  }\n  return this\n}\n\n//Returns the item at `key`\nproto.get = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  while(n) {\n    var d = cmp(key, n.key)\n    if(d === 0) {\n      return n.value\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  return\n}\n\n//Iterator for red black tree\nfunction RedBlackTreeIterator(tree, stack) {\n  this.tree = tree\n  this._stack = stack\n}\n\nvar iproto = RedBlackTreeIterator.prototype\n\n//Test if iterator is valid\nObject.defineProperty(iproto, \"valid\", {\n  get: function() {\n    return this._stack.length > 0\n  }\n})\n\n//Node of the iterator\nObject.defineProperty(iproto, \"node\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1]\n    }\n    return null\n  },\n  enumerable: true\n})\n\n//Makes a copy of an iterator\niproto.clone = function() {\n  return new RedBlackTreeIterator(this.tree, this._stack.slice())\n}\n\n//Swaps two nodes\nfunction swapNode(n, v) {\n  n.key = v.key\n  n.value = v.value\n  n.left = v.left\n  n.right = v.right\n  n._color = v._color\n  n._count = v._count\n}\n\n//Fix up a double black node in a tree\nfunction fixDoubleBlack(stack) {\n  var n, p, s, z\n  for(var i=stack.length-1; i>=0; --i) {\n    n = stack[i]\n    if(i === 0) {\n      n._color = BLACK\n      return\n    }\n    //console.log(\"visit node:\", n.key, i, stack[i].key, stack[i-1].key)\n    p = stack[i-1]\n    if(p.left === n) {\n      //console.log(\"left child\")\n      s = p.right\n      if(s.right && s.right._color === RED) {\n        //console.log(\"case 1: right sibling child red\")\n        s = p.right = cloneNode(s)\n        z = s.right = cloneNode(s.right)\n        p.right = s.left\n        s.left = p\n        s.right = z\n        s._color = p._color\n        n._color = BLACK\n        p._color = BLACK\n        z._color = BLACK\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = s\n          } else {\n            pp.right = s\n          }\n        }\n        stack[i-1] = s\n        return\n      } else if(s.left && s.left._color === RED) {\n        //console.log(\"case 1: left sibling child red\")\n        s = p.right = cloneNode(s)\n        z = s.left = cloneNode(s.left)\n        p.right = z.left\n        s.left = z.right\n        z.left = p\n        z.right = s\n        z._color = p._color\n        p._color = BLACK\n        s._color = BLACK\n        n._color = BLACK\n        recount(p)\n        recount(s)\n        recount(z)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = z\n          } else {\n            pp.right = z\n          }\n        }\n        stack[i-1] = z\n        return\n      }\n      if(s._color === BLACK) {\n        if(p._color === RED) {\n          //console.log(\"case 2: black sibling, red parent\", p.right.value)\n          p._color = BLACK\n          p.right = repaint(RED, s)\n          return\n        } else {\n          //console.log(\"case 2: black sibling, black parent\", p.right.value)\n          p.right = repaint(RED, s)\n          continue  \n        }\n      } else {\n        //console.log(\"case 3: red sibling\")\n        s = cloneNode(s)\n        p.right = s.left\n        s.left = p\n        s._color = p._color\n        p._color = RED\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = s\n          } else {\n            pp.right = s\n          }\n        }\n        stack[i-1] = s\n        stack[i] = p\n        if(i+1 < stack.length) {\n          stack[i+1] = n\n        } else {\n          stack.push(n)\n        }\n        i = i+2\n      }\n    } else {\n      //console.log(\"right child\")\n      s = p.left\n      if(s.left && s.left._color === RED) {\n        //console.log(\"case 1: left sibling child red\", p.value, p._color)\n        s = p.left = cloneNode(s)\n        z = s.left = cloneNode(s.left)\n        p.left = s.right\n        s.right = p\n        s.left = z\n        s._color = p._color\n        n._color = BLACK\n        p._color = BLACK\n        z._color = BLACK\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = s\n          } else {\n            pp.left = s\n          }\n        }\n        stack[i-1] = s\n        return\n      } else if(s.right && s.right._color === RED) {\n        //console.log(\"case 1: right sibling child red\")\n        s = p.left = cloneNode(s)\n        z = s.right = cloneNode(s.right)\n        p.left = z.right\n        s.right = z.left\n        z.right = p\n        z.left = s\n        z._color = p._color\n        p._color = BLACK\n        s._color = BLACK\n        n._color = BLACK\n        recount(p)\n        recount(s)\n        recount(z)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = z\n          } else {\n            pp.left = z\n          }\n        }\n        stack[i-1] = z\n        return\n      }\n      if(s._color === BLACK) {\n        if(p._color === RED) {\n          //console.log(\"case 2: black sibling, red parent\")\n          p._color = BLACK\n          p.left = repaint(RED, s)\n          return\n        } else {\n          //console.log(\"case 2: black sibling, black parent\")\n          p.left = repaint(RED, s)\n          continue  \n        }\n      } else {\n        //console.log(\"case 3: red sibling\")\n        s = cloneNode(s)\n        p.left = s.right\n        s.right = p\n        s._color = p._color\n        p._color = RED\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = s\n          } else {\n            pp.left = s\n          }\n        }\n        stack[i-1] = s\n        stack[i] = p\n        if(i+1 < stack.length) {\n          stack[i+1] = n\n        } else {\n          stack.push(n)\n        }\n        i = i+2\n      }\n    }\n  }\n}\n\n//Removes item at iterator from tree\niproto.remove = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return this.tree\n  }\n  //First copy path to node\n  var cstack = new Array(stack.length)\n  var n = stack[stack.length-1]\n  cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count)\n  for(var i=stack.length-2; i>=0; --i) {\n    var n = stack[i]\n    if(n.left === stack[i+1]) {\n      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)\n    } else {\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n  }\n\n  //Get node\n  n = cstack[cstack.length-1]\n  //console.log(\"start remove: \", n.value)\n\n  //If not leaf, then swap with previous node\n  if(n.left && n.right) {\n    //console.log(\"moving to leaf\")\n\n    //First walk to previous leaf\n    var split = cstack.length\n    n = n.left\n    while(n.right) {\n      cstack.push(n)\n      n = n.right\n    }\n    //Copy path to leaf\n    var v = cstack[split-1]\n    cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count))\n    cstack[split-1].key = n.key\n    cstack[split-1].value = n.value\n\n    //Fix up stack\n    for(var i=cstack.length-2; i>=split; --i) {\n      n = cstack[i]\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n    cstack[split-1].left = cstack[split]\n  }\n  //console.log(\"stack=\", cstack.map(function(v) { return v.value }))\n\n  //Remove leaf node\n  n = cstack[cstack.length-1]\n  if(n._color === RED) {\n    //Easy case: removing red leaf\n    //console.log(\"RED leaf\")\n    var p = cstack[cstack.length-2]\n    if(p.left === n) {\n      p.left = null\n    } else if(p.right === n) {\n      p.right = null\n    }\n    cstack.pop()\n    for(var i=0; i<cstack.length; ++i) {\n      cstack[i]._count--\n    }\n    return new RedBlackTree(this.tree._compare, cstack[0])\n  } else {\n    if(n.left || n.right) {\n      //Second easy case:  Single child black parent\n      //console.log(\"BLACK single child\")\n      if(n.left) {\n        swapNode(n, n.left)\n      } else if(n.right) {\n        swapNode(n, n.right)\n      }\n      //Child must be red, so repaint it black to balance color\n      n._color = BLACK\n      for(var i=0; i<cstack.length-1; ++i) {\n        cstack[i]._count--\n      }\n      return new RedBlackTree(this.tree._compare, cstack[0])\n    } else if(cstack.length === 1) {\n      //Third easy case: root\n      //console.log(\"ROOT\")\n      return new RedBlackTree(this.tree._compare, null)\n    } else {\n      //Hard case: Repaint n, and then do some nasty stuff\n      //console.log(\"BLACK leaf no children\")\n      for(var i=0; i<cstack.length; ++i) {\n        cstack[i]._count--\n      }\n      var parent = cstack[cstack.length-2]\n      fixDoubleBlack(cstack)\n      //Fix up links\n      if(parent.left === n) {\n        parent.left = null\n      } else {\n        parent.right = null\n      }\n    }\n  }\n  return new RedBlackTree(this.tree._compare, cstack[0])\n}\n\n//Returns key\nObject.defineProperty(iproto, \"key\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1].key\n    }\n    return\n  },\n  enumerable: true\n})\n\n//Returns value\nObject.defineProperty(iproto, \"value\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1].value\n    }\n    return\n  },\n  enumerable: true\n})\n\n\n//Returns the position of this iterator in the sorted list\nObject.defineProperty(iproto, \"index\", {\n  get: function() {\n    var idx = 0\n    var stack = this._stack\n    if(stack.length === 0) {\n      var r = this.tree.root\n      if(r) {\n        return r._count\n      }\n      return 0\n    } else if(stack[stack.length-1].left) {\n      idx = stack[stack.length-1].left._count\n    }\n    for(var s=stack.length-2; s>=0; --s) {\n      if(stack[s+1] === stack[s].right) {\n        ++idx\n        if(stack[s].left) {\n          idx += stack[s].left._count\n        }\n      }\n    }\n    return idx\n  },\n  enumerable: true\n})\n\n//Advances iterator to next element in list\niproto.next = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return\n  }\n  var n = stack[stack.length-1]\n  if(n.right) {\n    n = n.right\n    while(n) {\n      stack.push(n)\n      n = n.left\n    }\n  } else {\n    stack.pop()\n    while(stack.length > 0 && stack[stack.length-1].right === n) {\n      n = stack[stack.length-1]\n      stack.pop()\n    }\n  }\n}\n\n//Checks if iterator is at end of tree\nObject.defineProperty(iproto, \"hasNext\", {\n  get: function() {\n    var stack = this._stack\n    if(stack.length === 0) {\n      return false\n    }\n    if(stack[stack.length-1].right) {\n      return true\n    }\n    for(var s=stack.length-1; s>0; --s) {\n      if(stack[s-1].left === stack[s]) {\n        return true\n      }\n    }\n    return false\n  }\n})\n\n//Update value\niproto.update = function(value) {\n  var stack = this._stack\n  if(stack.length === 0) {\n    throw new Error(\"Can't update empty node!\")\n  }\n  var cstack = new Array(stack.length)\n  var n = stack[stack.length-1]\n  cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count)\n  for(var i=stack.length-2; i>=0; --i) {\n    n = stack[i]\n    if(n.left === stack[i+1]) {\n      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)\n    } else {\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n  }\n  return new RedBlackTree(this.tree._compare, cstack[0])\n}\n\n//Moves iterator backward one element\niproto.prev = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return\n  }\n  var n = stack[stack.length-1]\n  if(n.left) {\n    n = n.left\n    while(n) {\n      stack.push(n)\n      n = n.right\n    }\n  } else {\n    stack.pop()\n    while(stack.length > 0 && stack[stack.length-1].left === n) {\n      n = stack[stack.length-1]\n      stack.pop()\n    }\n  }\n}\n\n//Checks if iterator is at start of tree\nObject.defineProperty(iproto, \"hasPrev\", {\n  get: function() {\n    var stack = this._stack\n    if(stack.length === 0) {\n      return false\n    }\n    if(stack[stack.length-1].left) {\n      return true\n    }\n    for(var s=stack.length-1; s>0; --s) {\n      if(stack[s-1].right === stack[s]) {\n        return true\n      }\n    }\n    return false\n  }\n})\n\n//Default comparison function\nfunction defaultCompare(a, b) {\n  if(a < b) {\n    return -1\n  }\n  if(a > b) {\n    return 1\n  }\n  return 0\n}\n\n//Build a tree\nfunction createRBTree(compare) {\n  return new RedBlackTree(compare || defaultCompare, null)\n}\n},{}],230:[function(_dereq_,module,exports){\n// transliterated from the python snippet here:\n// http://en.wikipedia.org/wiki/Lanczos_approximation\n\nvar g = 7;\nvar p = [\n    0.99999999999980993,\n    676.5203681218851,\n    -1259.1392167224028,\n    771.32342877765313,\n    -176.61502916214059,\n    12.507343278686905,\n    -0.13857109526572012,\n    9.9843695780195716e-6,\n    1.5056327351493116e-7\n];\n\nvar g_ln = 607/128;\nvar p_ln = [\n    0.99999999999999709182,\n    57.156235665862923517,\n    -59.597960355475491248,\n    14.136097974741747174,\n    -0.49191381609762019978,\n    0.33994649984811888699e-4,\n    0.46523628927048575665e-4,\n    -0.98374475304879564677e-4,\n    0.15808870322491248884e-3,\n    -0.21026444172410488319e-3,\n    0.21743961811521264320e-3,\n    -0.16431810653676389022e-3,\n    0.84418223983852743293e-4,\n    -0.26190838401581408670e-4,\n    0.36899182659531622704e-5\n];\n\n// Spouge approximation (suitable for large arguments)\nfunction lngamma(z) {\n\n    if(z < 0) return Number('0/0');\n    var x = p_ln[0];\n    for(var i = p_ln.length - 1; i > 0; --i) x += p_ln[i] / (z + i);\n    var t = z + g_ln + 0.5;\n    return .5*Math.log(2*Math.PI)+(z+.5)*Math.log(t)-t+Math.log(x)-Math.log(z);\n}\n\nmodule.exports = function gamma (z) {\n    if (z < 0.5) {\n        return Math.PI / (Math.sin(Math.PI * z) * gamma(1 - z));\n    }\n    else if(z > 100) return Math.exp(lngamma(z));\n    else {\n        z -= 1;\n        var x = p[0];\n        for (var i = 1; i < g + 2; i++) {\n            x += p[i] / (z + i);\n        }\n        var t = z + g + 0.5;\n\n        return Math.sqrt(2 * Math.PI)\n            * Math.pow(t, z + 0.5)\n            * Math.exp(-t)\n            * x\n        ;\n    }\n};\n\nmodule.exports.log = lngamma;\n\n},{}],231:[function(_dereq_,module,exports){\nmodule.exports = getCanvasContext\nfunction getCanvasContext (type, opts) {\n  if (typeof type !== 'string') {\n    throw new TypeError('must specify type string')\n  }\n\n  opts = opts || {}\n\n  if (typeof document === 'undefined' && !opts.canvas) {\n    return null // check for Node\n  }\n\n  var canvas = opts.canvas || document.createElement('canvas')\n  if (typeof opts.width === 'number') {\n    canvas.width = opts.width\n  }\n  if (typeof opts.height === 'number') {\n    canvas.height = opts.height\n  }\n\n  var attribs = opts\n  var gl\n  try {\n    var names = [ type ]\n    // prefix GL contexts\n    if (type.indexOf('webgl') === 0) {\n      names.push('experimental-' + type)\n    }\n\n    for (var i = 0; i < names.length; i++) {\n      gl = canvas.getContext(names[i], attribs)\n      if (gl) return gl\n    }\n  } catch (e) {\n    gl = null\n  }\n  return (gl || null) // ensure null on fail\n}\n\n},{}],232:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createAxes\n\nvar createText        = _dereq_('./lib/text.js')\nvar createLines       = _dereq_('./lib/lines.js')\nvar createBackground  = _dereq_('./lib/background.js')\nvar getCubeProperties = _dereq_('./lib/cube.js')\nvar Ticks             = _dereq_('./lib/ticks.js')\n\nvar identity = new Float32Array([\n  1, 0, 0, 0,\n  0, 1, 0, 0,\n  0, 0, 1, 0,\n  0, 0, 0, 1])\n\nfunction copyVec3(a, b) {\n  a[0] = b[0]\n  a[1] = b[1]\n  a[2] = b[2]\n  return a\n}\n\nfunction Axes(gl) {\n  this.gl             = gl\n\n  this.pixelRatio     = 1\n\n  this.bounds         = [ [-10, -10, -10],\n                          [ 10,  10,  10] ]\n  this.ticks          = [ [], [], [] ]\n  this.autoTicks      = true\n  this.tickSpacing    = [ 1, 1, 1 ]\n\n  this.tickEnable     = [ true, true, true ]\n  this.tickFont       = [ 'sans-serif', 'sans-serif', 'sans-serif' ]\n  this.tickSize       = [ 12, 12, 12 ]\n  this.tickAngle      = [ 0, 0, 0 ]\n  this.tickAlign      = [ 'auto', 'auto', 'auto' ]\n  this.tickColor      = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n  this.tickPad        = [ 10, 10, 10 ]\n\n  this.lastCubeProps  = {\n    cubeEdges: [0,0,0],\n    axis:      [0,0,0]\n  }\n\n  this.labels         = [ 'x', 'y', 'z' ]\n  this.labelEnable    = [ true, true, true ]\n  this.labelFont      = 'sans-serif'\n  this.labelSize      = [ 20, 20, 20 ]\n  this.labelAngle     = [ 0, 0, 0 ]\n  this.labelAlign     = [ 'auto', 'auto', 'auto' ]\n  this.labelColor     = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n  this.labelPad       = [ 10, 10, 10 ]\n\n  this.lineEnable     = [ true, true, true ]\n  this.lineMirror     = [ false, false, false ]\n  this.lineWidth      = [ 1, 1, 1 ]\n  this.lineColor      = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n\n  this.lineTickEnable = [ true, true, true ]\n  this.lineTickMirror = [ false, false, false ]\n  this.lineTickLength = [ 0, 0, 0 ]\n  this.lineTickWidth  = [ 1, 1, 1 ]\n  this.lineTickColor  = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n\n  this.gridEnable     = [ true, true, true ]\n  this.gridWidth      = [ 1, 1, 1 ]\n  this.gridColor      = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n\n  this.zeroEnable     = [ true, true, true ]\n  this.zeroLineColor  = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ]\n  this.zeroLineWidth  = [ 2, 2, 2 ]\n\n  this.backgroundEnable = [ false, false, false ]\n  this.backgroundColor  = [ [0.8, 0.8, 0.8, 0.5],\n                            [0.8, 0.8, 0.8, 0.5],\n                            [0.8, 0.8, 0.8, 0.5] ]\n\n  this._firstInit = true\n  this._text  = null\n  this._lines = null\n  this._background = createBackground(gl)\n}\n\nvar proto = Axes.prototype\n\nproto.update = function(options) {\n  options = options || {}\n\n  //Option parsing helper functions\n  function parseOption(nest, cons, name) {\n    if(name in options) {\n      var opt = options[name]\n      var prev = this[name]\n      var next\n      if(nest ? (Array.isArray(opt) && Array.isArray(opt[0])) :\n                 Array.isArray(opt) ) {\n        this[name] = next = [ cons(opt[0]), cons(opt[1]), cons(opt[2]) ]\n      } else {\n        this[name] = next = [ cons(opt), cons(opt), cons(opt) ]\n      }\n      for(var i=0; i<3; ++i) {\n        if(next[i] !== prev[i]) {\n          return true\n        }\n      }\n    }\n    return false\n  }\n\n  var NUMBER  = parseOption.bind(this, false, Number)\n  var BOOLEAN = parseOption.bind(this, false, Boolean)\n  var STRING  = parseOption.bind(this, false, String)\n  var COLOR   = parseOption.bind(this, true, function(v) {\n    if(Array.isArray(v)) {\n      if(v.length === 3) {\n        return [ +v[0], +v[1], +v[2], 1.0 ]\n      } else if(v.length === 4) {\n        return [ +v[0], +v[1], +v[2], +v[3] ]\n      }\n    }\n    return [ 0, 0, 0, 1 ]\n  })\n\n  //Tick marks and bounds\n  var nextTicks\n  var ticksUpdate   = false\n  var boundsChanged = false\n  if('bounds' in options) {\n    var bounds = options.bounds\ni_loop:\n    for(var i=0; i<2; ++i) {\n      for(var j=0; j<3; ++j) {\n        if(bounds[i][j] !== this.bounds[i][j]) {\n          boundsChanged = true\n        }\n        this.bounds[i][j] = bounds[i][j]\n      }\n    }\n  }\n  if('ticks' in options) {\n    nextTicks      = options.ticks\n    ticksUpdate    = true\n    this.autoTicks = false\n    for(var i=0; i<3; ++i) {\n      this.tickSpacing[i] = 0.0\n    }\n  } else if(NUMBER('tickSpacing')) {\n    this.autoTicks  = true\n    boundsChanged   = true\n  }\n\n  if(this._firstInit) {\n    if(!('ticks' in options || 'tickSpacing' in options)) {\n      this.autoTicks = true\n    }\n\n    //Force tick recomputation on first update\n    boundsChanged   = true\n    ticksUpdate     = true\n    this._firstInit = false\n  }\n\n  if(boundsChanged && this.autoTicks) {\n    nextTicks = Ticks.create(this.bounds, this.tickSpacing)\n    ticksUpdate = true\n  }\n\n  //Compare next ticks to previous ticks, only update if needed\n  if(ticksUpdate) {\n    for(var i=0; i<3; ++i) {\n      nextTicks[i].sort(function(a,b) {\n        return a.x-b.x\n      })\n    }\n    if(Ticks.equal(nextTicks, this.ticks)) {\n      ticksUpdate = false\n    } else {\n      this.ticks = nextTicks\n    }\n  }\n\n  //Parse tick properties\n  BOOLEAN('tickEnable')\n  if(STRING('tickFont')) {\n    ticksUpdate = true  //If font changes, must rebuild vbo\n  }\n  NUMBER('tickSize')\n  NUMBER('tickAngle')\n  NUMBER('tickPad')\n  COLOR('tickColor')\n\n  //Axis labels\n  var labelUpdate = STRING('labels')\n  if(STRING('labelFont')) {\n    labelUpdate = true\n  }\n  BOOLEAN('labelEnable')\n  NUMBER('labelSize')\n  NUMBER('labelPad')\n  COLOR('labelColor')\n\n  //Axis lines\n  BOOLEAN('lineEnable')\n  BOOLEAN('lineMirror')\n  NUMBER('lineWidth')\n  COLOR('lineColor')\n\n  //Axis line ticks\n  BOOLEAN('lineTickEnable')\n  BOOLEAN('lineTickMirror')\n  NUMBER('lineTickLength')\n  NUMBER('lineTickWidth')\n  COLOR('lineTickColor')\n\n  //Grid lines\n  BOOLEAN('gridEnable')\n  NUMBER('gridWidth')\n  COLOR('gridColor')\n\n  //Zero line\n  BOOLEAN('zeroEnable')\n  COLOR('zeroLineColor')\n  NUMBER('zeroLineWidth')\n\n  //Background\n  BOOLEAN('backgroundEnable')\n  COLOR('backgroundColor')\n\n  //Update text if necessary\n  if(!this._text) {\n    this._text = createText(\n      this.gl,\n      this.bounds,\n      this.labels,\n      this.labelFont,\n      this.ticks,\n      this.tickFont)\n  } else if(this._text && (labelUpdate || ticksUpdate)) {\n    this._text.update(\n      this.bounds,\n      this.labels,\n      this.labelFont,\n      this.ticks,\n      this.tickFont)\n  }\n\n  //Update lines if necessary\n  if(this._lines && ticksUpdate) {\n    this._lines.dispose()\n    this._lines = null\n  }\n  if(!this._lines) {\n    this._lines = createLines(this.gl, this.bounds, this.ticks)\n  }\n}\n\nfunction OffsetInfo() {\n  this.primalOffset = [0,0,0]\n  this.primalMinor  = [0,0,0]\n  this.mirrorOffset = [0,0,0]\n  this.mirrorMinor  = [0,0,0]\n}\n\nvar LINE_OFFSET = [ new OffsetInfo(), new OffsetInfo(), new OffsetInfo() ]\n\nfunction computeLineOffset(result, i, bounds, cubeEdges, cubeAxis) {\n  var primalOffset = result.primalOffset\n  var primalMinor  = result.primalMinor\n  var dualOffset   = result.mirrorOffset\n  var dualMinor    = result.mirrorMinor\n  var e = cubeEdges[i]\n\n  //Calculate offsets\n  for(var j=0; j<3; ++j) {\n    if(i === j) {\n      continue\n    }\n    var a = primalOffset,\n        b = dualOffset,\n        c = primalMinor,\n        d = dualMinor\n    if(e & (1<<j)) {\n      a = dualOffset\n      b = primalOffset\n      c = dualMinor\n      d = primalMinor\n    }\n    a[j] = bounds[0][j]\n    b[j] = bounds[1][j]\n    if(cubeAxis[j] > 0) {\n      c[j] = -1\n      d[j] = 0\n    } else {\n      c[j] = 0\n      d[j] = +1\n    }\n  }\n}\n\nvar CUBE_ENABLE = [0,0,0]\nvar DEFAULT_PARAMS = {\n  model:      identity,\n  view:       identity,\n  projection: identity,\n  _ortho:      false\n}\n\nproto.isOpaque = function() {\n  return true\n}\n\nproto.isTransparent = function() {\n  return false\n}\n\nproto.drawTransparent = function(params) {}\n\nvar ALIGN_OPTION_AUTO = 0 // i.e. as defined in the shader the text would rotate to stay upwards range: [-90,90]\n\nvar PRIMAL_MINOR  = [0,0,0]\nvar MIRROR_MINOR  = [0,0,0]\nvar PRIMAL_OFFSET = [0,0,0]\n\nproto.draw = function(params) {\n  params = params || DEFAULT_PARAMS\n\n  var gl = this.gl\n\n  //Geometry for camera and axes\n  var model       = params.model || identity\n  var view        = params.view || identity\n  var projection  = params.projection || identity\n  var bounds      = this.bounds\n  var isOrtho     = params._ortho || false\n\n  //Unpack axis info\n  var cubeParams  = getCubeProperties(model, view, projection, bounds, isOrtho)\n  var cubeEdges   = cubeParams.cubeEdges\n  var cubeAxis    = cubeParams.axis\n\n  var cx = view[12]\n  var cy = view[13]\n  var cz = view[14]\n  var cw = view[15]\n\n  var orthoFix = (isOrtho) ? 2 : 1 // double up padding for orthographic ticks & labels\n  var pixelScaleF = orthoFix * this.pixelRatio * (projection[3]*cx + projection[7]*cy + projection[11]*cz + projection[15]*cw) / gl.drawingBufferHeight\n\n  for(var i=0; i<3; ++i) {\n    this.lastCubeProps.cubeEdges[i] = cubeEdges[i]\n    this.lastCubeProps.axis[i] = cubeAxis[i]\n  }\n\n  //Compute axis info\n  var lineOffset  = LINE_OFFSET\n  for(var i=0; i<3; ++i) {\n    computeLineOffset(\n      LINE_OFFSET[i],\n      i,\n      this.bounds,\n      cubeEdges,\n      cubeAxis)\n  }\n\n  //Set up state parameters\n  var gl = this.gl\n\n  //Draw background first\n  var cubeEnable = CUBE_ENABLE\n  for(var i=0; i<3; ++i) {\n    if(this.backgroundEnable[i]) {\n      cubeEnable[i] = cubeAxis[i]\n    } else {\n      cubeEnable[i] = 0\n    }\n  }\n\n  this._background.draw(\n    model,\n    view,\n    projection,\n    bounds,\n    cubeEnable,\n    this.backgroundColor)\n\n  //Draw lines\n  this._lines.bind(\n    model,\n    view,\n    projection,\n    this)\n\n  //First draw grid lines and zero lines\n  for(var i=0; i<3; ++i) {\n    var x = [0,0,0]\n    if(cubeAxis[i] > 0) {\n      x[i] = bounds[1][i]\n    } else {\n      x[i] = bounds[0][i]\n    }\n\n    //Draw grid lines\n    for(var j=0; j<2; ++j) {\n      var u = (i + 1 + j) % 3\n      var v = (i + 1 + (j^1)) % 3\n      if(this.gridEnable[u]) {\n        this._lines.drawGrid(u, v, this.bounds, x, this.gridColor[u], this.gridWidth[u]*this.pixelRatio)\n      }\n    }\n\n    //Draw zero lines (need to do this AFTER all grid lines are drawn)\n    for(var j=0; j<2; ++j) {\n      var u = (i + 1 + j) % 3\n      var v = (i + 1 + (j^1)) % 3\n      if(this.zeroEnable[v]) {\n        //Check if zero line in bounds\n        if(Math.min(bounds[0][v], bounds[1][v]) <= 0 && Math.max(bounds[0][v], bounds[1][v]) >= 0) {\n          this._lines.drawZero(u, v, this.bounds, x, this.zeroLineColor[v], this.zeroLineWidth[v]*this.pixelRatio)\n        }\n      }\n    }\n  }\n\n  //Then draw axis lines and tick marks\n  for(var i=0; i<3; ++i) {\n\n    //Draw axis lines\n    if(this.lineEnable[i]) {\n      this._lines.drawAxisLine(i, this.bounds, lineOffset[i].primalOffset, this.lineColor[i], this.lineWidth[i]*this.pixelRatio)\n    }\n    if(this.lineMirror[i]) {\n      this._lines.drawAxisLine(i, this.bounds, lineOffset[i].mirrorOffset, this.lineColor[i], this.lineWidth[i]*this.pixelRatio)\n    }\n\n    //Compute minor axes\n    var primalMinor = copyVec3(PRIMAL_MINOR, lineOffset[i].primalMinor)\n    var mirrorMinor = copyVec3(MIRROR_MINOR, lineOffset[i].mirrorMinor)\n    var tickLength  = this.lineTickLength\n    for(var j=0; j<3; ++j) {\n      var scaleFactor = pixelScaleF / model[5*j]\n      primalMinor[j] *= tickLength[j] * scaleFactor\n      mirrorMinor[j] *= tickLength[j] * scaleFactor\n    }\n\n\n\n    //Draw axis line ticks\n    if(this.lineTickEnable[i]) {\n      this._lines.drawAxisTicks(i, lineOffset[i].primalOffset, primalMinor, this.lineTickColor[i], this.lineTickWidth[i]*this.pixelRatio)\n    }\n    if(this.lineTickMirror[i]) {\n      this._lines.drawAxisTicks(i, lineOffset[i].mirrorOffset, mirrorMinor, this.lineTickColor[i], this.lineTickWidth[i]*this.pixelRatio)\n    }\n  }\n  this._lines.unbind()\n\n  //Draw text sprites\n  this._text.bind(\n    model,\n    view,\n    projection,\n    this.pixelRatio)\n\n  var alignOpt // options in shader are from this list {-1, 0, 1, 2, 3, ..., n}\n  // -1: backward compatible\n  //  0: raw data\n  //  1: auto align, free angles\n  //  2: auto align, horizontal or vertical\n  //3-n: auto align, round to n directions e.g. 12 -> round to angles with 30-degree steps\n\n  var hv_ratio = 0.5 // can have an effect on the ratio between horizontals and verticals when using option 2\n\n  var enableAlign\n  var alignDir\n\n  function alignTo(i) {\n    alignDir = [0,0,0]\n    alignDir[i] = 1\n  }\n\n  function solveTickAlignments(i, minor, major) {\n\n    var i1 = (i + 1) % 3\n    var i2 = (i + 2) % 3\n\n    var A = minor[i1]\n    var B = minor[i2]\n    var C = major[i1]\n    var D = major[i2]\n\n         if ((A > 0) && (D > 0)) { alignTo(i1); return; }\n    else if ((A > 0) && (D < 0)) { alignTo(i1); return; }\n    else if ((A < 0) && (D > 0)) { alignTo(i1); return; }\n    else if ((A < 0) && (D < 0)) { alignTo(i1); return; }\n    else if ((B > 0) && (C > 0)) { alignTo(i2); return; }\n    else if ((B > 0) && (C < 0)) { alignTo(i2); return; }\n    else if ((B < 0) && (C > 0)) { alignTo(i2); return; }\n    else if ((B < 0) && (C < 0)) { alignTo(i2); return; }\n  }\n\n  for(var i=0; i<3; ++i) {\n\n    var minor      = lineOffset[i].primalMinor\n    var major      = lineOffset[i].mirrorMinor\n\n    var offset     = copyVec3(PRIMAL_OFFSET, lineOffset[i].primalOffset)\n\n    for(var j=0; j<3; ++j) {\n      if(this.lineTickEnable[i]) {\n        offset[j] += pixelScaleF * minor[j] * Math.max(this.lineTickLength[j], 0)  / model[5*j]\n      }\n    }\n\n    var axis = [0,0,0]\n    axis[i] = 1\n\n    //Draw tick text\n    if(this.tickEnable[i]) {\n\n      if(this.tickAngle[i] === -3600) {\n        this.tickAngle[i] = 0\n        this.tickAlign[i] = 'auto'\n      } else {\n        this.tickAlign[i] = -1\n      }\n\n      enableAlign = 1;\n\n      alignOpt = [this.tickAlign[i], hv_ratio, enableAlign]\n      if(alignOpt[0] === 'auto') alignOpt[0] = ALIGN_OPTION_AUTO\n      else alignOpt[0] = parseInt('' + alignOpt[0])\n\n      alignDir = [0,0,0]\n      solveTickAlignments(i, minor, major)\n\n      //Add tick padding\n      for(var j=0; j<3; ++j) {\n        offset[j] += pixelScaleF * minor[j] * this.tickPad[j] / model[5*j]\n      }\n\n      //Draw axis\n      this._text.drawTicks(\n        i,\n        this.tickSize[i],\n        this.tickAngle[i],\n        offset,\n        this.tickColor[i],\n        axis,\n        alignDir,\n        alignOpt)\n    }\n\n    //Draw labels\n    if(this.labelEnable[i]) {\n\n      enableAlign = 0\n      alignDir = [0,0,0]\n      if(this.labels[i].length > 4) { // for large label axis enable alignDir to axis\n        alignTo(i)\n        enableAlign = 1\n      }\n\n      alignOpt = [this.labelAlign[i], hv_ratio, enableAlign]\n      if(alignOpt[0] === 'auto') alignOpt[0] = ALIGN_OPTION_AUTO\n      else alignOpt[0] = parseInt('' + alignOpt[0])\n\n      //Add label padding\n      for(var j=0; j<3; ++j) {\n        offset[j] += pixelScaleF * minor[j] * this.labelPad[j] / model[5*j]\n      }\n      offset[i] += 0.5 * (bounds[0][i] + bounds[1][i])\n\n      //Draw axis\n      this._text.drawLabel(\n        i,\n        this.labelSize[i],\n        this.labelAngle[i],\n        offset,\n        this.labelColor[i],\n        [0,0,0],\n        alignDir,\n        alignOpt)\n    }\n  }\n\n  this._text.unbind()\n}\n\nproto.dispose = function() {\n  this._text.dispose()\n  this._lines.dispose()\n  this._background.dispose()\n  this._lines = null\n  this._text = null\n  this._background = null\n  this.gl = null\n}\n\nfunction createAxes(gl, options) {\n  var axes = new Axes(gl)\n  axes.update(options)\n  return axes\n}\n\n},{\"./lib/background.js\":233,\"./lib/cube.js\":234,\"./lib/lines.js\":235,\"./lib/text.js\":237,\"./lib/ticks.js\":238}],233:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createBackgroundCube\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createVAO    = _dereq_('gl-vao')\nvar createShader = _dereq_('./shaders').bg\n\nfunction BackgroundCube(gl, buffer, vao, shader) {\n  this.gl = gl\n  this.buffer = buffer\n  this.vao = vao\n  this.shader = shader\n}\n\nvar proto = BackgroundCube.prototype\n\nproto.draw = function(model, view, projection, bounds, enable, colors) {\n  var needsBG = false\n  for(var i=0; i<3; ++i) {\n    needsBG = needsBG || enable[i]\n  }\n  if(!needsBG) {\n    return\n  }\n\n  var gl = this.gl\n\n  gl.enable(gl.POLYGON_OFFSET_FILL)\n  gl.polygonOffset(1, 2)\n\n  this.shader.bind()\n  this.shader.uniforms = {\n    model: model,\n    view: view,\n    projection: projection,\n    bounds: bounds,\n    enable: enable,\n    colors: colors\n  }\n  this.vao.bind()\n  this.vao.draw(this.gl.TRIANGLES, 36)\n  this.vao.unbind()\n\n  gl.disable(gl.POLYGON_OFFSET_FILL)\n}\n\nproto.dispose = function() {\n  this.vao.dispose()\n  this.buffer.dispose()\n  this.shader.dispose()\n}\n\nfunction createBackgroundCube(gl) {\n  //Create cube vertices\n  var vertices = []\n  var indices  = []\n  var ptr = 0\n  for(var d=0; d<3; ++d) {\n    var u = (d+1) % 3\n    var v = (d+2) % 3\n    var x = [0,0,0]\n    var c = [0,0,0]\n    for(var s=-1; s<=1; s+=2) {\n      indices.push(ptr,   ptr+2, ptr+1,\n                   ptr+1, ptr+2, ptr+3)\n      x[d] = s\n      c[d] = s\n      for(var i=-1; i<=1; i+=2) {\n        x[u] = i\n        for(var j=-1; j<=1; j+=2) {\n          x[v] = j\n          vertices.push(x[0], x[1], x[2],\n                        c[0], c[1], c[2])\n          ptr += 1\n        }\n      }\n      //Swap u and v\n      var tt = u\n      u = v\n      v = tt\n    }\n  }\n\n  //Allocate buffer and vertex array\n  var buffer = createBuffer(gl, new Float32Array(vertices))\n  var elements = createBuffer(gl, new Uint16Array(indices), gl.ELEMENT_ARRAY_BUFFER)\n  var vao = createVAO(gl, [\n      {\n        buffer: buffer,\n        type: gl.FLOAT,\n        size: 3,\n        offset: 0,\n        stride: 24\n      },\n      {\n        buffer: buffer,\n        type: gl.FLOAT,\n        size: 3,\n        offset: 12,\n        stride: 24\n      }\n    ], elements)\n\n  //Create shader object\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n  shader.attributes.normal.location = 1\n\n  return new BackgroundCube(gl, buffer, vao, shader)\n}\n\n},{\"./shaders\":236,\"gl-buffer\":240,\"gl-vao\":322}],234:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = getCubeEdges\n\nvar bits      = _dereq_('bit-twiddle')\nvar multiply  = _dereq_('gl-mat4/multiply')\nvar splitPoly = _dereq_('split-polygon')\nvar orient    = _dereq_('robust-orientation')\n\nvar mvp        = new Array(16)\nvar pCubeVerts = new Array(8)\nvar cubeVerts  = new Array(8)\nvar x          = new Array(3)\nvar zero3      = [0,0,0]\n\n;(function() {\n  for(var i=0; i<8; ++i) {\n    pCubeVerts[i] =[1,1,1,1]\n    cubeVerts[i] = [1,1,1]\n  }\n})()\n\n\nfunction transformHg(result, x, mat) {\n  for(var i=0; i<4; ++i) {\n    result[i] = mat[12+i]\n    for(var j=0; j<3; ++j) {\n      result[i] += x[j]*mat[4*j+i]\n    }\n  }\n}\n\nvar FRUSTUM_PLANES = [\n  [ 0, 0, 1, 0, 0],\n  [ 0, 0,-1, 1, 0],\n  [ 0,-1, 0, 1, 0],\n  [ 0, 1, 0, 1, 0],\n  [-1, 0, 0, 1, 0],\n  [ 1, 0, 0, 1, 0]\n]\n\nfunction polygonArea(p) {\n  for(var i=0; i<FRUSTUM_PLANES.length; ++i) {\n    p = splitPoly.positive(p, FRUSTUM_PLANES[i])\n    if(p.length < 3) {\n      return 0\n    }\n  }\n\n  var base = p[0]\n  var ax = base[0] / base[3]\n  var ay = base[1] / base[3]\n  var area = 0.0\n  for(var i=1; i+1<p.length; ++i) {\n    var b = p[i]\n    var c = p[i+1]\n\n    var bx = b[0]/b[3]\n    var by = b[1]/b[3]\n    var cx = c[0]/c[3]\n    var cy = c[1]/c[3]\n\n    var ux = bx - ax\n    var uy = by - ay\n\n    var vx = cx - ax\n    var vy = cy - ay\n\n    area += Math.abs(ux * vy - uy * vx)\n  }\n\n  return area\n}\n\nvar CUBE_EDGES = [1,1,1]\nvar CUBE_AXIS  = [0,0,0]\nvar CUBE_RESULT = {\n  cubeEdges: CUBE_EDGES,\n  axis: CUBE_AXIS\n}\n\nfunction getCubeEdges(model, view, projection, bounds, ortho) {\n\n  //Concatenate matrices\n  multiply(mvp, view, model)\n  multiply(mvp, projection, mvp)\n\n  //First project cube vertices\n  var ptr = 0\n  for(var i=0; i<2; ++i) {\n    x[2] = bounds[i][2]\n    for(var j=0; j<2; ++j) {\n      x[1] = bounds[j][1]\n      for(var k=0; k<2; ++k) {\n        x[0] = bounds[k][0]\n        transformHg(pCubeVerts[ptr], x, mvp)\n        ptr += 1\n      }\n    }\n  }\n\n  //Classify camera against cube faces\n  var closest = -1\n\n  for(var i=0; i<8; ++i) {\n    var w = pCubeVerts[i][3]\n    for(var l=0; l<3; ++l) {\n      cubeVerts[i][l] = pCubeVerts[i][l] / w\n    }\n\n    if(ortho) cubeVerts[i][2] *= -1;\n\n    if(w < 0) {\n      if(closest < 0) {\n        closest = i\n      } else if(cubeVerts[i][2] < cubeVerts[closest][2]) {\n        closest = i\n      }\n    }\n  }\n\n  if(closest < 0) {\n    closest = 0\n    for(var d=0; d<3; ++d) {\n      var u = (d+2) % 3\n      var v = (d+1) % 3\n      var o0 = -1\n      var o1 = -1\n      for(var s=0; s<2; ++s) {\n        var f0 = (s<<d)\n        var f1 = f0 + (s << u) + ((1-s) << v)\n        var f2 = f0 + ((1-s) << u) + (s << v)\n        if(orient(cubeVerts[f0], cubeVerts[f1], cubeVerts[f2], zero3) < 0) {\n          continue\n        }\n        if(s) {\n          o0 = 1\n        } else {\n          o1 = 1\n        }\n      }\n      if(o0 < 0 || o1 < 0) {\n        if(o1 > o0) {\n          closest |= 1<<d\n        }\n        continue\n      }\n      for(var s=0; s<2; ++s) {\n        var f0 = (s<<d)\n        var f1 = f0 + (s << u) + ((1-s) << v)\n        var f2 = f0 + ((1-s) << u) + (s << v)\n        var o = polygonArea([\n            pCubeVerts[f0],\n            pCubeVerts[f1],\n            pCubeVerts[f2],\n            pCubeVerts[f0+(1<<u)+(1<<v)]])\n        if(s) {\n          o0 = o\n        } else {\n          o1 = o\n        }\n      }\n      if(o1 > o0) {\n        closest |= 1<<d\n        continue\n      }\n    }\n  }\n\n  var farthest = 7^closest\n\n  //Find lowest vertex which is not closest closest\n  var bottom = -1\n  for(var i=0; i<8; ++i) {\n    if(i === closest || i === farthest) {\n      continue\n    }\n    if(bottom < 0) {\n      bottom = i\n    } else if(cubeVerts[bottom][1] > cubeVerts[i][1]) {\n      bottom = i\n    }\n  }\n\n  //Find left/right neighbors of bottom vertex\n  var left = -1\n  for(var i=0; i<3; ++i) {\n    var idx = bottom ^ (1<<i)\n    if(idx === closest || idx === farthest) {\n      continue\n    }\n    if(left < 0) {\n      left = idx\n    }\n    var v = cubeVerts[idx]\n    if(v[0] < cubeVerts[left][0]) {\n      left = idx\n    }\n  }\n  var right = -1\n  for(var i=0; i<3; ++i) {\n    var idx = bottom ^ (1<<i)\n    if(idx === closest || idx === farthest || idx === left) {\n      continue\n    }\n    if(right < 0) {\n      right = idx\n    }\n    var v = cubeVerts[idx]\n    if(v[0] > cubeVerts[right][0]) {\n      right = idx\n    }\n  }\n\n  //Determine edge axis coordinates\n  var cubeEdges = CUBE_EDGES\n  cubeEdges[0] = cubeEdges[1] = cubeEdges[2] = 0\n  cubeEdges[bits.log2(left^bottom)] = bottom&left\n  cubeEdges[bits.log2(bottom^right)] = bottom&right\n  var top = right ^ 7\n  if(top === closest || top === farthest) {\n    top = left ^ 7\n    cubeEdges[bits.log2(right^top)] = top&right\n  } else {\n    cubeEdges[bits.log2(left^top)] = top&left\n  }\n\n  //Determine visible faces\n  var axis = CUBE_AXIS\n  var cutCorner = closest\n  for(var d=0; d<3; ++d) {\n    if(cutCorner & (1<<d)) {\n      axis[d] = -1\n    } else {\n      axis[d] = 1\n    }\n  }\n\n  //Return result\n  return CUBE_RESULT\n}\n},{\"bit-twiddle\":85,\"gl-mat4/multiply\":266,\"robust-orientation\":497,\"split-polygon\":514}],235:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports    = createLines\n\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar createShader  = _dereq_('./shaders').line\n\nvar MAJOR_AXIS = [0,0,0]\nvar MINOR_AXIS = [0,0,0]\nvar SCREEN_AXIS = [0,0,0]\nvar OFFSET_VEC = [0,0,0]\nvar SHAPE = [1,1]\n\nfunction zeroVec(a) {\n  a[0] = a[1] = a[2] = 0\n  return a\n}\n\nfunction copyVec(a,b) {\n  a[0] = b[0]\n  a[1] = b[1]\n  a[2] = b[2]\n  return a\n}\n\nfunction Lines(gl, vertBuffer, vao, shader, tickCount, tickOffset, gridCount, gridOffset) {\n  this.gl         = gl\n  this.vertBuffer = vertBuffer\n  this.vao        = vao\n  this.shader     = shader\n  this.tickCount  = tickCount\n  this.tickOffset = tickOffset\n  this.gridCount  = gridCount\n  this.gridOffset = gridOffset\n}\n\nvar proto = Lines.prototype\n\nproto.bind = function(model, view, projection) {\n  this.shader.bind()\n  this.shader.uniforms.model = model\n  this.shader.uniforms.view = view\n  this.shader.uniforms.projection = projection\n\n  SHAPE[0] = this.gl.drawingBufferWidth\n  SHAPE[1] = this.gl.drawingBufferHeight\n\n  this.shader.uniforms.screenShape = SHAPE\n  this.vao.bind()\n}\n\nproto.unbind = function() {\n  this.vao.unbind()\n}\n\nproto.drawAxisLine = function(j, bounds, offset, color, lineWidth) {\n  var minorAxis = zeroVec(MINOR_AXIS)\n  this.shader.uniforms.majorAxis = MINOR_AXIS\n\n  minorAxis[j] = bounds[1][j] - bounds[0][j]\n  this.shader.uniforms.minorAxis = minorAxis\n\n  var noffset = copyVec(OFFSET_VEC, offset)\n  noffset[j] += bounds[0][j]\n  this.shader.uniforms.offset = noffset\n\n  this.shader.uniforms.lineWidth = lineWidth\n\n  this.shader.uniforms.color = color\n\n  var screenAxis = zeroVec(SCREEN_AXIS)\n  screenAxis[(j+2)%3] = 1\n  this.shader.uniforms.screenAxis = screenAxis\n  this.vao.draw(this.gl.TRIANGLES, 6)\n\n  var screenAxis = zeroVec(SCREEN_AXIS)\n  screenAxis[(j+1)%3] = 1\n  this.shader.uniforms.screenAxis = screenAxis\n  this.vao.draw(this.gl.TRIANGLES, 6)\n}\n\nproto.drawAxisTicks = function(j, offset, minorAxis, color, lineWidth) {\n  if(!this.tickCount[j]) {\n    return\n  }\n\n  var majorAxis = zeroVec(MAJOR_AXIS)\n  majorAxis[j]  = 1\n  this.shader.uniforms.majorAxis = majorAxis\n  this.shader.uniforms.offset    = offset\n  this.shader.uniforms.minorAxis = minorAxis\n  this.shader.uniforms.color     = color\n  this.shader.uniforms.lineWidth = lineWidth\n\n  var screenAxis = zeroVec(SCREEN_AXIS)\n  screenAxis[j] = 1\n  this.shader.uniforms.screenAxis = screenAxis\n  this.vao.draw(this.gl.TRIANGLES, this.tickCount[j], this.tickOffset[j])\n}\n\n\nproto.drawGrid = function(i, j, bounds, offset, color, lineWidth) {\n  if(!this.gridCount[i]) {\n    return\n  }\n\n  var minorAxis = zeroVec(MINOR_AXIS)\n  minorAxis[j]  = bounds[1][j] - bounds[0][j]\n  this.shader.uniforms.minorAxis = minorAxis\n\n  var noffset = copyVec(OFFSET_VEC, offset)\n  noffset[j] += bounds[0][j]\n  this.shader.uniforms.offset = noffset\n\n  var majorAxis = zeroVec(MAJOR_AXIS)\n  majorAxis[i]  = 1\n  this.shader.uniforms.majorAxis = majorAxis\n\n  var screenAxis = zeroVec(SCREEN_AXIS)\n  screenAxis[i] = 1\n  this.shader.uniforms.screenAxis = screenAxis\n  this.shader.uniforms.lineWidth = lineWidth\n\n  this.shader.uniforms.color = color\n  this.vao.draw(this.gl.TRIANGLES, this.gridCount[i], this.gridOffset[i])\n}\n\nproto.drawZero = function(j, i, bounds, offset, color, lineWidth) {\n  var minorAxis = zeroVec(MINOR_AXIS)\n  this.shader.uniforms.majorAxis = minorAxis\n\n  minorAxis[j] = bounds[1][j] - bounds[0][j]\n  this.shader.uniforms.minorAxis = minorAxis\n\n  var noffset = copyVec(OFFSET_VEC, offset)\n  noffset[j] += bounds[0][j]\n  this.shader.uniforms.offset = noffset\n\n  var screenAxis = zeroVec(SCREEN_AXIS)\n  screenAxis[i] = 1\n  this.shader.uniforms.screenAxis = screenAxis\n  this.shader.uniforms.lineWidth = lineWidth\n\n  this.shader.uniforms.color = color\n  this.vao.draw(this.gl.TRIANGLES, 6)\n}\n\nproto.dispose = function() {\n  this.vao.dispose()\n  this.vertBuffer.dispose()\n  this.shader.dispose()\n}\n\nfunction createLines(gl, bounds, ticks) {\n  var vertices    = []\n  var tickOffset  = [0,0,0]\n  var tickCount   = [0,0,0]\n\n  //Create grid lines for each axis/direction\n  var gridOffset = [0,0,0]\n  var gridCount  = [0,0,0]\n\n  //Add zero line\n  vertices.push(\n    0,0,1,   0,1,1,   0,0,-1,\n    0,0,-1,  0,1,1,   0,1,-1)\n\n  for(var i=0; i<3; ++i) {\n    //Axis tick marks\n    var start = ((vertices.length / 3)|0)\n    for(var j=0; j<ticks[i].length; ++j) {\n      var x = +ticks[i][j].x\n      vertices.push(\n        x,0,1,   x,1,1,   x,0,-1,\n        x,0,-1,  x,1,1,   x,1,-1)\n    }\n    var end = ((vertices.length / 3)|0)\n    tickOffset[i] = start\n    tickCount[i]  = end - start\n\n    //Grid lines\n    var start = ((vertices.length / 3)|0)\n    for(var k=0; k<ticks[i].length; ++k) {\n      var x = +ticks[i][k].x\n      vertices.push(\n        x,0,1,   x,1,1,   x,0,-1,\n        x,0,-1,  x,1,1,   x,1,-1)\n    }\n    var end = ((vertices.length / 3)|0)\n    gridOffset[i] = start\n    gridCount[i]  = end - start\n  }\n\n  //Create cube VAO\n  var vertBuf = createBuffer(gl, new Float32Array(vertices))\n  var vao = createVAO(gl, [\n    { \"buffer\": vertBuf,\n      \"type\": gl.FLOAT,\n      \"size\": 3,\n      \"stride\": 0,\n      \"offset\": 0\n    }\n  ])\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n  return new Lines(gl, vertBuf, vao, shader, tickCount, tickOffset, gridCount, gridOffset)\n}\n\n},{\"./shaders\":236,\"gl-buffer\":240,\"gl-vao\":322}],236:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify = _dereq_('glslify')\nvar createShader = _dereq_('gl-shader')\n\nvar lineVert = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\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\"])\nvar lineFrag = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = color;\\n}\"])\nexports.line = function(gl) {\n  return createShader(gl, lineVert, lineFrag, null, [\n    {name: 'position', type: 'vec3'}\n  ])\n}\n\nvar textVert = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, axis, alignDir, alignOpt;\\nuniform float scale, angle, pixelScale;\\nuniform vec2 resolution;\\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\\nfloat computeViewAngle(vec3 a, vec3 b) {\\n  vec3 A = project(a);\\n  vec3 B = project(b);\\n\\n  return atan(\\n    (B.y - A.y) * resolution.y,\\n    (B.x - A.x) * resolution.x\\n  );\\n}\\n\\nconst float PI = 3.141592;\\nconst float TWO_PI = 2.0 * PI;\\nconst float HALF_PI = 0.5 * PI;\\nconst float ONE_AND_HALF_PI = 1.5 * PI;\\n\\nint option = int(floor(alignOpt.x + 0.001));\\nfloat hv_ratio =       alignOpt.y;\\nbool enableAlign =    (alignOpt.z != 0.0);\\n\\nfloat mod_angle(float a) {\\n  return mod(a, PI);\\n}\\n\\nfloat positive_angle(float a) {\\n  return mod_angle((a < 0.0) ?\\n    a + TWO_PI :\\n    a\\n  );\\n}\\n\\nfloat look_upwards(float a) {\\n  float b = positive_angle(a);\\n  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\\n    b - PI :\\n    b;\\n}\\n\\nfloat look_horizontal_or_vertical(float a, float ratio) {\\n  // ratio controls the ratio between being horizontal to (vertical + horizontal)\\n  // if ratio is set to 0.5 then it is 50%, 50%.\\n  // when using a higher ratio e.g. 0.75 the result would\\n  // likely be more horizontal than vertical.\\n\\n  float b = positive_angle(a);\\n\\n  return\\n    (b < (      ratio) * HALF_PI) ? 0.0 :\\n    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\\n    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\\n    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\\n                                    0.0;\\n}\\n\\nfloat roundTo(float a, float b) {\\n  return float(b * floor((a + 0.5 * b) / b));\\n}\\n\\nfloat look_round_n_directions(float a, int n) {\\n  float b = positive_angle(a);\\n  float div = TWO_PI / float(n);\\n  float c = roundTo(b, div);\\n  return look_upwards(c);\\n}\\n\\nfloat applyAlignOption(float rawAngle, float delta) {\\n  return\\n    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\\n    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\\n    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\\n    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\\n    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\\n                    rawAngle;                // otherwise return back raw input angle\\n}\\n\\nbool isAxisTitle = (axis.x == 0.0) &&\\n                   (axis.y == 0.0) &&\\n                   (axis.z == 0.0);\\n\\nvoid main() {\\n  //Compute world offset\\n  float axisDistance = position.z;\\n  vec3 dataPosition = axisDistance * axis + offset;\\n\\n  float beta = angle; // i.e. user defined attributes for each tick\\n\\n  float axisAngle;\\n  float clipAngle;\\n  float flip;\\n\\n  if (enableAlign) {\\n    axisAngle = (isAxisTitle) ? HALF_PI :\\n                      computeViewAngle(dataPosition, dataPosition + axis);\\n    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\\n\\n    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\\n    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\\n\\n    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\\n                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\\n\\n    beta += applyAlignOption(clipAngle, flip * PI);\\n  }\\n\\n  //Compute plane offset\\n  vec2 planeCoord = position.xy * pixelScale;\\n\\n  mat2 planeXform = scale * mat2(\\n     cos(beta), sin(beta),\\n    -sin(beta), cos(beta)\\n  );\\n\\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\n\\n  //Compute clip position\\n  vec3 clipPosition = project(dataPosition);\\n\\n  //Apply text offset in clip coordinates\\n  clipPosition += vec3(viewOffset, 0.0);\\n\\n  //Done\\n  gl_Position = vec4(clipPosition, 1.0);\\n}\"])\nvar textFrag = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = color;\\n}\"])\nexports.text = function(gl) {\n  return createShader(gl, textVert, textFrag, null, [\n    {name: 'position', type: 'vec3'}\n  ])\n}\n\nvar bgVert = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\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\\n  vec3 signAxis = sign(bounds[1] - bounds[0]);\\n\\n  vec3 realNormal = signAxis * normal;\\n\\n  if(dot(realNormal, enable) > 0.0) {\\n    vec3 minRange = min(bounds[0], bounds[1]);\\n    vec3 maxRange = max(bounds[0], bounds[1]);\\n    vec3 nPosition = mix(minRange, maxRange, 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\\n  colorChannel = abs(realNormal);\\n}\"])\nvar bgFrag = glslify([\"precision highp 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}\"])\nexports.bg = function(gl) {\n  return createShader(gl, bgVert, bgFrag, null, [\n    {name: 'position', type: 'vec3'},\n    {name: 'normal', type: 'vec3'}\n  ])\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],237:[function(_dereq_,module,exports){\n(function (process){\n\"use strict\"\n\nmodule.exports = createTextSprites\n\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar vectorizeText = _dereq_('vectorize-text')\nvar createShader  = _dereq_('./shaders').text\n\nvar globals = window || process.global || {}\nvar __TEXT_CACHE  = globals.__TEXT_CACHE || {}\nglobals.__TEXT_CACHE = {}\n\n//Vertex buffer format for text is:\n//\n/// [x,y,z] = Spatial coordinate\n//\n\nvar VERTEX_SIZE = 3\n\nfunction TextSprites(\n  gl,\n  shader,\n  buffer,\n  vao) {\n  this.gl           = gl\n  this.shader       = shader\n  this.buffer       = buffer\n  this.vao          = vao\n  this.tickOffset   =\n  this.tickCount    =\n  this.labelOffset  =\n  this.labelCount   = null\n}\n\nvar proto = TextSprites.prototype\n\n//Bind textures for rendering\nvar SHAPE = [0,0]\nproto.bind = function(model, view, projection, pixelScale) {\n  this.vao.bind()\n  this.shader.bind()\n  var uniforms = this.shader.uniforms\n  uniforms.model = model\n  uniforms.view = view\n  uniforms.projection = projection\n  uniforms.pixelScale = pixelScale\n  SHAPE[0] = this.gl.drawingBufferWidth\n  SHAPE[1] = this.gl.drawingBufferHeight\n  this.shader.uniforms.resolution = SHAPE\n}\n\nproto.unbind = function() {\n  this.vao.unbind()\n}\n\nproto.update = function(bounds, labels, labelFont, ticks, tickFont) {\n  var data = []\n\n  function addItem(t, text, font, size, lineSpacing, styletags) {\n    var fontcache = __TEXT_CACHE[font]\n    if(!fontcache) {\n      fontcache = __TEXT_CACHE[font] = {}\n    }\n    var mesh = fontcache[text]\n    if(!mesh) {\n      mesh = fontcache[text] = tryVectorizeText(text, {\n        triangles: true,\n        font: font,\n        textAlign: 'center',\n        textBaseline: 'middle',\n        lineSpacing: lineSpacing,\n        styletags: styletags\n      })\n    }\n    var scale = (size || 12) / 12\n    var positions = mesh.positions\n    var cells = mesh.cells\n    for(var i=0, nc=cells.length; i<nc; ++i) {\n      var c = cells[i]\n      for(var j=2; j>=0; --j) {\n        var p = positions[c[j]]\n        data.push(scale*p[0], -scale*p[1], t)\n      }\n    }\n  }\n\n  //Generate sprites for all 3 axes, store data in texture atlases\n  var tickOffset  = [0,0,0]\n  var tickCount   = [0,0,0]\n  var labelOffset = [0,0,0]\n  var labelCount  = [0,0,0]\n  var lineSpacing = 1.25\n  var styletags = {\n    breaklines:true,\n    bolds: true,\n    italics: true,\n    subscripts:true,\n    superscripts:true\n  }\n  for(var d=0; d<3; ++d) {\n\n    //Generate label\n    labelOffset[d] = (data.length/VERTEX_SIZE)|0\n    addItem(\n      0.5*(bounds[0][d]+bounds[1][d]),\n      labels[d],\n      labelFont[d],\n      12, // labelFontSize\n      lineSpacing,\n      styletags\n    )\n    labelCount[d] = ((data.length/VERTEX_SIZE)|0) - labelOffset[d]\n\n    //Generate sprites for tick marks\n    tickOffset[d] = (data.length/VERTEX_SIZE)|0\n    for(var i=0; i<ticks[d].length; ++i) {\n      if(!ticks[d][i].text) {\n        continue\n      }\n      addItem(\n        ticks[d][i].x,\n        ticks[d][i].text,\n        ticks[d][i].font || tickFont,\n        ticks[d][i].fontSize || 12,\n        lineSpacing,\n        styletags\n      )\n    }\n    tickCount[d] = ((data.length/VERTEX_SIZE)|0) - tickOffset[d]\n  }\n\n  this.buffer.update(data)\n  this.tickOffset = tickOffset\n  this.tickCount = tickCount\n  this.labelOffset = labelOffset\n  this.labelCount = labelCount\n}\n\n//Draws the tick marks for an axis\nproto.drawTicks = function(d, scale, angle, offset, color, axis, alignDir, alignOpt) {\n  if(!this.tickCount[d]) {\n    return\n  }\n\n  this.shader.uniforms.axis = axis\n  this.shader.uniforms.color = color\n  this.shader.uniforms.angle = angle\n  this.shader.uniforms.scale = scale\n  this.shader.uniforms.offset = offset\n  this.shader.uniforms.alignDir = alignDir\n  this.shader.uniforms.alignOpt = alignOpt\n  this.vao.draw(this.gl.TRIANGLES, this.tickCount[d], this.tickOffset[d])\n}\n\n//Draws the text label for an axis\nproto.drawLabel = function(d, scale, angle, offset, color, axis, alignDir, alignOpt) {\n  if(!this.labelCount[d]) {\n    return\n  }\n\n  this.shader.uniforms.axis = axis\n  this.shader.uniforms.color = color\n  this.shader.uniforms.angle = angle\n  this.shader.uniforms.scale = scale\n  this.shader.uniforms.offset = offset\n  this.shader.uniforms.alignDir = alignDir\n  this.shader.uniforms.alignOpt = alignOpt\n  this.vao.draw(this.gl.TRIANGLES, this.labelCount[d], this.labelOffset[d])\n}\n\n//Releases all resources attached to this object\nproto.dispose = function() {\n  this.shader.dispose()\n  this.vao.dispose()\n  this.buffer.dispose()\n}\n\nfunction tryVectorizeText(text, options) {\n  try {\n    return vectorizeText(text, options)\n  } catch(e) {\n    console.warn('error vectorizing text:\"' + text + '\" error:', e)\n    return {\n      cells: [],\n      positions: []\n    }\n  }\n}\n\nfunction createTextSprites(\n    gl,\n    bounds,\n    labels,\n    labelFont,\n    ticks,\n    tickFont) {\n\n  var buffer = createBuffer(gl)\n  var vao = createVAO(gl, [\n    { \"buffer\": buffer,\n      \"size\": 3\n    }\n  ])\n\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n\n  var result = new TextSprites(\n    gl,\n    shader,\n    buffer,\n    vao)\n\n  result.update(bounds, labels, labelFont, ticks, tickFont)\n\n  return result\n}\n\n}).call(this,_dereq_('_process'))\n},{\"./shaders\":236,\"_process\":477,\"gl-buffer\":240,\"gl-vao\":322,\"vectorize-text\":537}],238:[function(_dereq_,module,exports){\n'use strict'\n\nexports.create   = defaultTicks\nexports.equal    = ticksEqual\n\nfunction prettyPrint(spacing, i) {\n  var stepStr = spacing + \"\"\n  var u = stepStr.indexOf(\".\")\n  var sigFigs = 0\n  if(u >= 0) {\n    sigFigs = stepStr.length - u - 1\n  }\n  var shift = Math.pow(10, sigFigs)\n  var x = Math.round(spacing * i * shift)\n  var xstr = x + \"\"\n  if(xstr.indexOf(\"e\") >= 0) {\n    return xstr\n  }\n  var xi = x / shift, xf = x % shift\n  if(x < 0) {\n    xi = -Math.ceil(xi)|0\n    xf = (-xf)|0\n  } else {\n    xi = Math.floor(xi)|0\n    xf = xf|0\n  }\n  var xis = \"\" + xi \n  if(x < 0) {\n    xis = \"-\" + xis\n  }\n  if(sigFigs) {\n    var xs = \"\" + xf\n    while(xs.length < sigFigs) {\n      xs = \"0\" + xs\n    }\n    return xis + \".\" + xs\n  } else {\n    return xis\n  }\n}\n\nfunction defaultTicks(bounds, tickSpacing) {\n  var array = []\n  for(var d=0; d<3; ++d) {\n    var ticks = []\n    var m = 0.5*(bounds[0][d]+bounds[1][d])\n    for(var t=0; t*tickSpacing[d]<=bounds[1][d]; ++t) {\n      ticks.push({x: t*tickSpacing[d], text: prettyPrint(tickSpacing[d], t)})\n    }\n    for(var t=-1; t*tickSpacing[d]>=bounds[0][d]; --t) {\n      ticks.push({x: t*tickSpacing[d], text: prettyPrint(tickSpacing[d], t)})\n    }\n    array.push(ticks)\n  }\n  return array\n}\n\nfunction ticksEqual(ticksA, ticksB) {\n  for(var i=0; i<3; ++i) {\n    if(ticksA[i].length !== ticksB[i].length) {\n      return false\n    }\n    for(var j=0; j<ticksA[i].length; ++j) {\n      var a = ticksA[i][j]\n      var b = ticksB[i][j]\n      if(\n        a.x !== b.x ||\n        a.text !== b.text ||\n        a.font !== b.font ||\n        a.fontColor !== b.fontColor ||\n        a.fontSize !== b.fontSize ||\n        a.dx !== b.dx ||\n        a.dy !== b.dy\n      ) {\n        return false\n      }\n    }\n  }\n  return true\n}\n},{}],239:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = axesProperties\n\nvar getPlanes   = _dereq_(\"extract-frustum-planes\")\nvar splitPoly   = _dereq_(\"split-polygon\")\nvar cubeParams  = _dereq_(\"./lib/cube.js\")\nvar m4mul       = _dereq_(\"gl-mat4/multiply\")\nvar m4transpose = _dereq_(\"gl-mat4/transpose\")\nvar v4transformMat4 = _dereq_(\"gl-vec4/transformMat4\")\n\nvar identity    = new Float32Array([\n    1, 0, 0, 0,\n    0, 1, 0, 0,\n    0, 0, 1, 0,\n    0, 0, 0, 1\n  ])\n\nvar mvp         = new Float32Array(16)\n\nfunction AxesRange3D(lo, hi, pixelsPerDataUnit) {\n  this.lo = lo\n  this.hi = hi\n  this.pixelsPerDataUnit = pixelsPerDataUnit\n}\n\nvar SCRATCH_P = [0,0,0,1]\nvar SCRATCH_Q = [0,0,0,1]\n\nfunction gradient(result, M, v, width, height) {\n  for(var i=0; i<3; ++i) {\n    var p = SCRATCH_P\n    var q = SCRATCH_Q\n    for(var j=0; j<3; ++j) {\n      q[j] = p[j] = v[j]\n    }\n    q[3] = p[3] = 1\n\n    q[i] += 1\n    v4transformMat4(q, q, M)\n    if(q[3] < 0) {\n      result[i] = Infinity\n    }\n\n    p[i] -= 1\n    v4transformMat4(p, p, M)\n    if(p[3] < 0) {\n      result[i] = Infinity\n    }\n\n    var dx = (p[0]/p[3] - q[0]/q[3]) * width\n    var dy = (p[1]/p[3] - q[1]/q[3]) * height\n\n    result[i] = 0.25 * Math.sqrt(dx*dx + dy*dy)\n  }\n  return result\n}\n\nvar RANGES = [\n  new AxesRange3D(Infinity, -Infinity, Infinity),\n  new AxesRange3D(Infinity, -Infinity, Infinity),\n  new AxesRange3D(Infinity, -Infinity, Infinity)\n]\n\nvar SCRATCH_X = [0,0,0]\n\nfunction axesProperties(axes, camera, width, height, params) {\n  var model       = camera.model || identity\n  var view        = camera.view || identity\n  var projection  = camera.projection || identity\n  var isOrtho     = camera._ortho || false\n  var bounds      = axes.bounds\n  var params      = params || cubeParams(model, view, projection, bounds, isOrtho)\n  var axis        = params.axis\n\n  m4mul(mvp, view, model)\n  m4mul(mvp, projection, mvp)\n\n  //Calculate the following properties for each axis:\n  //\n  // * lo - start of visible range for each axis in tick coordinates\n  // * hi - end of visible range for each axis in tick coordinates\n  // * ticksPerPixel - pixel density of tick marks for the axis\n  //\n  var ranges = RANGES\n  for(var i=0; i<3; ++i) {\n    ranges[i].lo = Infinity\n    ranges[i].hi = -Infinity\n    ranges[i].pixelsPerDataUnit = Infinity\n  }\n\n  //Compute frustum planes, intersect with box\n  var frustum = getPlanes(m4transpose(mvp, mvp))\n  m4transpose(mvp, mvp)\n\n  //Loop over vertices of viewable box\n  for(var d=0; d<3; ++d) {\n    var u = (d+1)%3\n    var v = (d+2)%3\n    var x = SCRATCH_X\ni_loop:\n    for(var i=0; i<2; ++i) {\n      var poly = []\n\n      if((axis[d] < 0) === !!i) {\n        continue\n      }\n\n      x[d] = bounds[i][d]\n      for(var j=0; j<2; ++j) {\n        x[u] = bounds[j^i][u]\n        for(var k=0; k<2; ++k) {\n          x[v] = bounds[k^j^i][v]\n          poly.push(x.slice())\n        }\n      }\n\n      var Q = (isOrtho) ? 5 : 4\n      for(var j=Q; j===Q; ++j) { // Note: using only near plane here (& for orthographic projection we use the far).\n        if(poly.length === 0) {\n          continue i_loop\n        }\n        poly = splitPoly.positive(poly, frustum[j])\n      }\n\n      //Loop over vertices of polygon to find extremal points\n      for(var j=0; j<poly.length; ++j) {\n        var v = poly[j]\n        var grad = gradient(SCRATCH_X, mvp, v, width, height)\n        for(var k=0; k<3; ++k) {\n          ranges[k].lo = Math.min(ranges[k].lo, v[k])\n          ranges[k].hi = Math.max(ranges[k].hi, v[k])\n          if(k !== d) {\n            ranges[k].pixelsPerDataUnit = Math.min(ranges[k].pixelsPerDataUnit, Math.abs(grad[k]))\n          }\n        }\n      }\n    }\n  }\n\n  return ranges\n}\n\n},{\"./lib/cube.js\":234,\"extract-frustum-planes\":223,\"gl-mat4/multiply\":266,\"gl-mat4/transpose\":275,\"gl-vec4/transformMat4\":393,\"split-polygon\":514}],240:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar pool = _dereq_(\"typedarray-pool\")\nvar ops = _dereq_(\"ndarray-ops\")\nvar ndarray = _dereq_(\"ndarray\")\n\nvar SUPPORTED_TYPES = [\n  \"uint8\",\n  \"uint8_clamped\",\n  \"uint16\",\n  \"uint32\",\n  \"int8\",\n  \"int16\",\n  \"int32\",\n  \"float32\" ]\n\nfunction GLBuffer(gl, type, handle, length, usage) {\n  this.gl = gl\n  this.type = type\n  this.handle = handle\n  this.length = length\n  this.usage = usage\n}\n\nvar proto = GLBuffer.prototype\n\nproto.bind = function() {\n  this.gl.bindBuffer(this.type, this.handle)\n}\n\nproto.unbind = function() {\n  this.gl.bindBuffer(this.type, null)\n}\n\nproto.dispose = function() {\n  this.gl.deleteBuffer(this.handle)\n}\n\nfunction updateTypeArray(gl, type, len, usage, data, offset) {\n  var dataLen = data.length * data.BYTES_PER_ELEMENT\n  if(offset < 0) {\n    gl.bufferData(type, data, usage)\n    return dataLen\n  }\n  if(dataLen + offset > len) {\n    throw new Error(\"gl-buffer: If resizing buffer, must not specify offset\")\n  }\n  gl.bufferSubData(type, offset, data)\n  return len\n}\n\nfunction makeScratchTypeArray(array, dtype) {\n  var res = pool.malloc(array.length, dtype)\n  var n = array.length\n  for(var i=0; i<n; ++i) {\n    res[i] = array[i]\n  }\n  return res\n}\n\nfunction isPacked(shape, stride) {\n  var n = 1\n  for(var i=stride.length-1; i>=0; --i) {\n    if(stride[i] !== n) {\n      return false\n    }\n    n *= shape[i]\n  }\n  return true\n}\n\nproto.update = function(array, offset) {\n  if(typeof offset !== \"number\") {\n    offset = -1\n  }\n  this.bind()\n  if(typeof array === \"object\" && typeof array.shape !== \"undefined\") { //ndarray\n    var dtype = array.dtype\n    if(SUPPORTED_TYPES.indexOf(dtype) < 0) {\n      dtype = \"float32\"\n    }\n    if(this.type === this.gl.ELEMENT_ARRAY_BUFFER) {\n      var ext = gl.getExtension('OES_element_index_uint')\n      if(ext && dtype !== \"uint16\") {\n        dtype = \"uint32\"\n      } else {\n        dtype = \"uint16\"\n      }\n    }\n    if(dtype === array.dtype && isPacked(array.shape, array.stride)) {\n      if(array.offset === 0 && array.data.length === array.shape[0]) {\n        this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, array.data, offset)\n      } else {\n        this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, array.data.subarray(array.offset, array.shape[0]), offset)\n      }\n    } else {\n      var tmp = pool.malloc(array.size, dtype)\n      var ndt = ndarray(tmp, array.shape)\n      ops.assign(ndt, array)\n      if(offset < 0) {\n        this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, tmp, offset)\n      } else {\n        this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, tmp.subarray(0, array.size), offset)\n      }\n      pool.free(tmp)\n    }\n  } else if(Array.isArray(array)) { //Vanilla array\n    var t\n    if(this.type === this.gl.ELEMENT_ARRAY_BUFFER) {\n      t = makeScratchTypeArray(array, \"uint16\")\n    } else {\n      t = makeScratchTypeArray(array, \"float32\")\n    }\n    if(offset < 0) {\n      this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, t, offset)\n    } else {\n      this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, t.subarray(0, array.length), offset)\n    }\n    pool.free(t)\n  } else if(typeof array === \"object\" && typeof array.length === \"number\") { //Typed array\n    this.length = updateTypeArray(this.gl, this.type, this.length, this.usage, array, offset)\n  } else if(typeof array === \"number\" || array === undefined) { //Number/default\n    if(offset >= 0) {\n      throw new Error(\"gl-buffer: Cannot specify offset when resizing buffer\")\n    }\n    array = array | 0\n    if(array <= 0) {\n      array = 1\n    }\n    this.gl.bufferData(this.type, array|0, this.usage)\n    this.length = array\n  } else { //Error, case should not happen\n    throw new Error(\"gl-buffer: Invalid data type\")\n  }\n}\n\nfunction createBuffer(gl, data, type, usage) {\n  type = type || gl.ARRAY_BUFFER\n  usage = usage || gl.DYNAMIC_DRAW\n  if(type !== gl.ARRAY_BUFFER && type !== gl.ELEMENT_ARRAY_BUFFER) {\n    throw new Error(\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\")\n  }\n  if(usage !== gl.DYNAMIC_DRAW && usage !== gl.STATIC_DRAW && usage !== gl.STREAM_DRAW) {\n    throw new Error(\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\")\n  }\n  var handle = gl.createBuffer()\n  var result = new GLBuffer(gl, type, handle, 0, usage)\n  result.update(data)\n  return result\n}\n\nmodule.exports = createBuffer\n\n},{\"ndarray\":445,\"ndarray-ops\":439,\"typedarray-pool\":532}],241:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar V = _dereq_('gl-vec3');\n\nvar vec3 = function(x, y, z) {\n\tvar v = V.create();\n\tif (x !== undefined) {\n\t\tV.set(v, x, y, z);\n\t}\n\treturn v;\n}\n\nvar createPositionsForMeshgrid = function(meshgrid) {\n\tvar xs = meshgrid[0], ys = meshgrid[1], zs = meshgrid[2];\n\tvar positions = [];\n\tfor (var z=0; z<zs.length; z++) {\n\t\tfor (var y=0; y<ys.length; y++) {\n\t\t\tfor (var x=0; x<xs.length; x++) {\n\t\t\t\tpositions.push([zs[z], ys[y], xs[x]]);\n\t\t\t}\n\t\t}\n\t}\n\treturn positions;\n};\n\nvar findLastSmallerIndex = function(points, v) {\n\tfor (var i=0; i<points.length; i++) {\n\t\tif (points[i] >= v) {\n\t\t\treturn i-1;\n\t\t}\n\t}\n\treturn i;\n};\n\nvar tmp = V.create();\nvar tmp2 = V.create();\n\nvar clamp = function(v, min, max) {\n\treturn v < min ? min : (v > max ? max : v);\n};\n\nvar sampleMeshgrid = function(point, array, meshgrid, clampOverflow) {\n\tvar x = point[0];\n\tvar y = point[1];\n\tvar z = point[2];\n\n\tvar w = meshgrid[0].length;\n\tvar h = meshgrid[1].length;\n\tvar d = meshgrid[2].length;\n\n\t// Find the index of the nearest smaller value in the meshgrid for each coordinate of (x,y,z).\n\t// The nearest smaller value index for x is the index x0 such that\n\t// meshgrid[0][x0] < x and for all x1 > x0, meshgrid[0][x1] >= x.\n\tvar x0 = findLastSmallerIndex(meshgrid[0], x);\n\tvar y0 = findLastSmallerIndex(meshgrid[1], y);\n\tvar z0 = findLastSmallerIndex(meshgrid[2], z);\n\n\t// Get the nearest larger meshgrid value indices.\n\t// From the above \"nearest smaller value\", we know that\n\t//   meshgrid[0][x0] < x\n\t//   meshgrid[0][x0+1] >= x\n\tvar x1 = x0 + 1;\n\tvar y1 = y0 + 1;\n\tvar z1 = z0 + 1;\n\n\tif (clampOverflow) {\n\t\tx0 = clamp(x0, 0, w-1);\n\t\tx1 = clamp(x1, 0, w-1);\n\t\ty0 = clamp(y0, 0, h-1);\n\t\ty1 = clamp(y1, 0, h-1);\n\t\tz0 = clamp(z0, 0, d-1);\n\t\tz1 = clamp(z1, 0, d-1);\n\t}\n\n\t// Reject points outside the meshgrid, return a zero vector.\n\tif (x0 < 0 || y0 < 0 || z0 < 0 || x1 >= w || y1 >= h || z1 >= d) {\n\t\treturn V.create();\n\t}\n\n\t// Normalize point coordinates to 0..1 scaling factor between x0 and x1.\n\tvar xf = (x - meshgrid[0][x0]) / (meshgrid[0][x1] - meshgrid[0][x0]);\n\tvar yf = (y - meshgrid[1][y0]) / (meshgrid[1][y1] - meshgrid[1][y0]);\n\tvar zf = (z - meshgrid[2][z0]) / (meshgrid[2][z1] - meshgrid[2][z0]);\n\n\tif (xf < 0 || xf > 1 || isNaN(xf)) xf = 0;\n\tif (yf < 0 || yf > 1 || isNaN(yf)) yf = 0;\n\tif (zf < 0 || zf > 1 || isNaN(zf)) zf = 0;\n\n\tvar z0off = z0*w*h;\n\tvar z1off = z1*w*h;\n\n\tvar y0off = y0*w;\n\tvar y1off = y1*w;\n\n\tvar x0off = x0;\n\tvar x1off = x1;\n\n\t// Sample data array around the (x,y,z) point.\n\t//  vZYX = array[zZoff + yYoff + xXoff]\n\tvar v000 = array[y0off + z0off + x0off];\n\tvar v001 = array[y0off + z0off + x1off];\n\tvar v010 = array[y1off + z0off + x0off];\n\tvar v011 = array[y1off + z0off + x1off];\n\tvar v100 = array[y0off + z1off + x0off];\n\tvar v101 = array[y0off + z1off + x1off];\n\tvar v110 = array[y1off + z1off + x0off];\n\tvar v111 = array[y1off + z1off + x1off];\n\n\tvar result = V.create();\n\n\t// Average samples according to distance to point.\n\tV.lerp(result, v000, v001, xf);\n\tV.lerp(tmp, v010, v011, xf);\n\tV.lerp(result, result, tmp, yf);\n\tV.lerp(tmp, v100, v101, xf);\n\tV.lerp(tmp2, v110, v111, xf);\n\tV.lerp(tmp, tmp, tmp2, yf);\n\tV.lerp(result, result, tmp, zf);\n\n\treturn result;\n};\n\nvar getOrthogonalVector = function(dst, v) {\n\t// Return up-vector for only-z vector.\n\tif (v[0] === 0 && v[1] === 0) {\n\t\tV.set(dst, 0, 1, 0);\n\t} else {\n\t\t// Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n\t\t// From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n\t\t// Assign z = 0, x = -b, y = a:\n\t\t// a*-b + b*a + c*0 = -ba + ba + 0 = 0\n\t\tV.set(dst, -v[1], v[0], 0);\n\t}\n\treturn dst;\n};\n\nmodule.exports = function(vectorfield, bounds) {\n\tvar positions;\n\tif (vectorfield.positions) {\n\t\tpositions = vectorfield.positions;\n\t} else {\n\t\tpositions = createPositionsForMeshgrid(vectorfield.meshgrid);\n\t}\n\tvar meshgrid = vectorfield.meshgrid;\n\tvar vectors = vectorfield.vectors;\n\tvar geo = {\n\t\tpositions: [],\n\t\tvertexIntensity: [],\n\t\tvertexIntensityBounds: vectorfield.vertexIntensityBounds,\n\t\tvertexNormals: [],\n\t\tvectors: [],\n\t\tcells: [],\n\t\tconeOffset: vectorfield.coneOffset,\n\t\tcolormap: vectorfield.colormap\n\t};\n\n\tif (vectorfield.positions.length === 0) {\n\t\tif (bounds) {\n\t\t\tbounds[0] = [0,0,0];\n\t\t\tbounds[1] = [0,0,0];\n\t\t}\n\t\treturn geo;\n\t}\n\n\t// Compute bounding box for the dataset.\n\t// Compute maximum velocity for the dataset to use for scaling the cones.\n\tvar maxNorm = 0;\n\tvar minX = 1/0, maxX = -1/0;\n\tvar minY = 1/0, maxY = -1/0;\n\tvar minZ = 1/0, maxZ = -1/0;\n\tvar p2 = null;\n\tvar u2 = null;\n\tvar positionVectors = [];\n\tvar vectorScale = 1/0;\n\tfor (var i = 0; i < positions.length; i++) {\n\t\tvar p = positions[i];\n\t\tminX = Math.min(p[0], minX);\n\t\tmaxX = Math.max(p[0], maxX);\n\t\tminY = Math.min(p[1], minY);\n\t\tmaxY = Math.max(p[1], maxY);\n\t\tminZ = Math.min(p[2], minZ);\n\t\tmaxZ = Math.max(p[2], maxZ);\n\t\tvar u;\n\t\tif (meshgrid) {\n\t\t\tu = sampleMeshgrid(p, vectors, meshgrid, true);\n\t\t} else {\n\t\t\tu = vectors[i];\n\t\t}\n\t\tif (V.length(u) > maxNorm) {\n\t\t\tmaxNorm = V.length(u);\n\t\t}\n\t\tif (i) {\n\t\t\t// Find vector scale [w/ units of time] using \"successive\" positions\n\t\t\t// (not \"adjacent\" with would be O(n^2)),\n\t\t\t//\n\t\t\t// The vector scale corresponds to the minimum \"time\" to travel across two\n\t\t\t// two adjacent positions at the average velocity of those two adjacent positions\n\t\t\tvectorScale = Math.min(vectorScale,\n\t\t\t\t2 * V.distance(p2, p) / (V.length(u2) + V.length(u))\n\t\t\t);\n\t\t}\n\t\tp2 = p;\n\t\tu2 = u;\n\t\tpositionVectors.push(u);\n\t}\n\tvar minV = [minX, minY, minZ];\n\tvar maxV = [maxX, maxY, maxZ];\n\tif (bounds) {\n\t\tbounds[0] = minV;\n\t\tbounds[1] = maxV;\n\t}\n\tif (maxNorm === 0) {\n\t\tmaxNorm = 1;\n\t}\n\n\t// Inverted max norm would map vector with norm maxNorm to 1 coord space units in length\n\tvar invertedMaxNorm = 1 / maxNorm;\n\n\tif (!isFinite(vectorScale) || isNaN(vectorScale)) {\n\t\tvectorScale = 1.0;\n\t}\n\tgeo.vectorScale = vectorScale;\n\n\tvar nml = vec3(0,1,0);\n\n\tvar coneScale = vectorfield.coneSize || 0.5;\n\n\tif (vectorfield.absoluteConeSize) {\n\t\tconeScale = vectorfield.absoluteConeSize * invertedMaxNorm;\n\t}\n\n\tgeo.coneScale = coneScale;\n\n\t// Build the cone model.\n\tfor (var i = 0, j = 0; i < positions.length; i++) {\n\t\tvar p = positions[i];\n\t\tvar x = p[0], y = p[1], z = p[2];\n\t\tvar d = positionVectors[i];\n\t\tvar intensity = V.length(d) * invertedMaxNorm;\n\t\tfor (var k = 0, l = 8; k < l; k++) {\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\t\t\tgeo.positions.push([x, y, z, j++]);\n\n\t\t\tgeo.vectors.push(d);\n\t\t\tgeo.vectors.push(d);\n\t\t\tgeo.vectors.push(d);\n\t\t\tgeo.vectors.push(d);\n\t\t\tgeo.vectors.push(d);\n\t\t\tgeo.vectors.push(d);\n\n\t\t\tgeo.vertexIntensity.push(intensity, intensity, intensity);\n\t\t\tgeo.vertexIntensity.push(intensity, intensity, intensity);\n\n\t\t\tgeo.vertexNormals.push(nml, nml, nml);\n\t\t\tgeo.vertexNormals.push(nml, nml, nml);\n\n\t\t\tvar m = geo.positions.length;\n\t\t\tgeo.cells.push([m-6, m-5, m-4], [m-3, m-2, m-1]);\n\t\t}\n\t}\n\n\treturn geo;\n};\n\nmodule.exports.createConeMesh = _dereq_('./lib/conemesh');\n\n},{\"./lib/conemesh\":242,\"gl-vec3\":341}],242:[function(_dereq_,module,exports){\n'use strict'\n\nvar DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small\nvar DEFAULT_FACE_NORMALS_EPSILON = 1e-6;\n\nvar createShader  = _dereq_('gl-shader')\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar createTexture = _dereq_('gl-texture2d')\nvar normals       = _dereq_('normals')\nvar multiply      = _dereq_('gl-mat4/multiply')\nvar invert        = _dereq_('gl-mat4/invert')\nvar ndarray       = _dereq_('ndarray')\nvar colormap      = _dereq_('colormap')\nvar getContour    = _dereq_('simplicial-complex-contour')\nvar pool          = _dereq_('typedarray-pool')\nvar shaders       = _dereq_('./shaders')\n\nvar meshShader    = shaders.meshShader\nvar pickShader    = shaders.pickShader\n\nvar IDENTITY = [\n  1,0,0,0,\n  0,1,0,0,\n  0,0,1,0,\n  0,0,0,1]\n\nfunction SimplicialMesh(gl\n  , texture\n  , triShader\n  , pickShader\n  , trianglePositions\n  , triangleVectors\n  , triangleIds\n  , triangleColors\n  , triangleUVs\n  , triangleNormals\n  , triangleVAO\n  , edgePositions\n  , edgeIds\n  , edgeColors\n  , edgeUVs\n  , edgeVAO\n  , pointPositions\n  , pointIds\n  , pointColors\n  , pointUVs\n  , pointSizes\n  , pointVAO\n  , contourPositions\n  , contourVAO) {\n\n  this.gl                = gl\n  this.pixelRatio         = 1\n  this.cells             = []\n  this.positions         = []\n  this.intensity         = []\n  this.texture           = texture\n  this.dirty             = true\n\n  this.triShader         = triShader\n  this.pickShader        = pickShader\n\n  this.trianglePositions = trianglePositions\n  this.triangleVectors   = triangleVectors\n  this.triangleColors    = triangleColors\n  this.triangleNormals   = triangleNormals\n  this.triangleUVs       = triangleUVs\n  this.triangleIds       = triangleIds\n  this.triangleVAO       = triangleVAO\n  this.triangleCount     = 0\n\n  this.lineWidth         = 1\n  this.edgePositions     = edgePositions\n  this.edgeColors        = edgeColors\n  this.edgeUVs           = edgeUVs\n  this.edgeIds           = edgeIds\n  this.edgeVAO           = edgeVAO\n  this.edgeCount         = 0\n\n  this.pointPositions    = pointPositions\n  this.pointColors       = pointColors\n  this.pointUVs          = pointUVs\n  this.pointSizes        = pointSizes\n  this.pointIds          = pointIds\n  this.pointVAO          = pointVAO\n  this.pointCount        = 0\n\n  this.contourLineWidth  = 1\n  this.contourPositions  = contourPositions\n  this.contourVAO        = contourVAO\n  this.contourCount      = 0\n  this.contourColor      = [0,0,0]\n  this.contourEnable     = true\n\n  this.pickId            = 1\n  this.bounds            = [\n    [ Infinity, Infinity, Infinity],\n    [-Infinity,-Infinity,-Infinity] ]\n  this.clipBounds        = [\n    [-Infinity,-Infinity,-Infinity],\n    [ Infinity, Infinity, Infinity] ]\n\n  this.lightPosition = [1e5, 1e5, 0]\n  this.ambientLight  = 0.8\n  this.diffuseLight  = 0.8\n  this.specularLight = 2.0\n  this.roughness     = 0.5\n  this.fresnel       = 1.5\n\n  this.opacity       = 1.0\n\n  this.coneScale     = 2.0\n  this.vectorScale   = 1.0\n  this.coneOffset    = 1.0 / 4.0;\n\n  this._model       = IDENTITY\n  this._view        = IDENTITY\n  this._projection  = IDENTITY\n  this._resolution  = [1,1]\n}\n\nvar proto = SimplicialMesh.prototype\n\nproto.isOpaque = function() {\n  return this.opacity >= 1\n}\n\nproto.isTransparent = function() {\n  return this.opacity < 1\n}\n\nproto.pickSlots = 1\n\nproto.setPickBase = function(id) {\n  this.pickId = id\n}\n\nfunction genColormap(param) {\n  var colors = colormap({\n      colormap: param\n    , nshades:  256\n    , format:  'rgba'\n  })\n\n  var result = new Uint8Array(256*4)\n  for(var i=0; i<256; ++i) {\n    var c = colors[i]\n    for(var j=0; j<3; ++j) {\n      result[4*i+j] = c[j]\n    }\n    result[4*i+3] = c[3]*255\n  }\n\n  return ndarray(result, [256,256,4], [4,0,1])\n}\n\nfunction unpackIntensity(cells, numVerts, cellIntensity) {\n  var result = new Array(numVerts)\n  for(var i=0; i<numVerts; ++i) {\n    result[i] = 0\n  }\n  var numCells = cells.length\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      result[c[j]] = cellIntensity[i]\n    }\n  }\n  return result\n}\n\nfunction takeZComponent(array) {\n  var n = array.length\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = array[i][2]\n  }\n  return result\n}\n\nproto.highlight = function(selection) {\n  if(!selection || !this.contourEnable) {\n    this.contourCount = 0\n    return\n  }\n  var level = getContour(this.cells, this.intensity, selection.intensity)\n  var cells         = level.cells\n  var vertexIds     = level.vertexIds\n  var vertexWeights = level.vertexWeights\n  var numCells = cells.length\n  var result = pool.mallocFloat32(2 * 3 * numCells)\n  var ptr = 0\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<2; ++j) {\n      var v = c[0]\n      if(c.length === 2) {\n        v = c[j]\n      }\n      var a = vertexIds[v][0]\n      var b = vertexIds[v][1]\n      var w = vertexWeights[v]\n      var wi = 1.0 - w\n      var pa = this.positions[a]\n      var pb = this.positions[b]\n      for(var k=0; k<3; ++k) {\n        result[ptr++] = w * pa[k] + wi * pb[k]\n      }\n    }\n  }\n  this.contourCount = (ptr / 3)|0\n  this.contourPositions.update(result.subarray(0, ptr))\n  pool.free(result)\n}\n\nproto.update = function(params) {\n  params = params || {}\n  var gl = this.gl\n\n  this.dirty = true\n\n  if('contourEnable' in params) {\n    this.contourEnable = params.contourEnable\n  }\n  if('contourColor' in params) {\n    this.contourColor = params.contourColor\n  }\n  if('lineWidth' in params) {\n    this.lineWidth = params.lineWidth\n  }\n  if('lightPosition' in params) {\n    this.lightPosition = params.lightPosition\n  }\n  if('opacity' in params) {\n    this.opacity = params.opacity\n  }\n  if('ambient' in params) {\n    this.ambientLight  = params.ambient\n  }\n  if('diffuse' in params) {\n    this.diffuseLight = params.diffuse\n  }\n  if('specular' in params) {\n    this.specularLight = params.specular\n  }\n  if('roughness' in params) {\n    this.roughness = params.roughness\n  }\n  if('fresnel' in params) {\n    this.fresnel = params.fresnel\n  }\n\n  if (params.vectorScale !== undefined) {\n    this.vectorScale = params.vectorScale;\n  }\n  if (params.coneScale !== undefined) {\n    this.coneScale = params.coneScale;\n  }\n  if (params.coneOffset !== undefined) {\n    this.coneOffset = params.coneOffset;\n  }\n\n  if(params.texture) {\n    this.texture.dispose()\n    this.texture = createTexture(gl, params.texture)\n  } else if (params.colormap) {\n    this.texture.shape = [256,256]\n    this.texture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n    this.texture.magFilter = gl.LINEAR\n    this.texture.setPixels(genColormap(params.colormap))\n    this.texture.generateMipmap()\n  }\n\n  var cells = params.cells\n  var positions = params.positions\n  var vectors = params.vectors\n\n  if(!positions || !cells || !vectors) {\n    return\n  }\n\n  var tPos = []\n  var tVec = []\n  var tCol = []\n  var tNor = []\n  var tUVs = []\n  var tIds = []\n\n  var ePos = []\n  var eCol = []\n  var eUVs = []\n  var eIds = []\n\n  var pPos = []\n  var pCol = []\n  var pUVs = []\n  var pSiz = []\n  var pIds = []\n\n  //Save geometry data for picking calculations\n  this.cells     = cells\n  this.positions = positions\n\n  //Compute normals\n  var vertexNormals = params.vertexNormals\n  var cellNormals   = params.cellNormals\n  var vertexNormalsEpsilon = params.vertexNormalsEpsilon === void(0) ? DEFAULT_VERTEX_NORMALS_EPSILON : params.vertexNormalsEpsilon\n  var faceNormalsEpsilon = params.faceNormalsEpsilon === void(0) ? DEFAULT_FACE_NORMALS_EPSILON : params.faceNormalsEpsilon\n  if(params.useFacetNormals && !cellNormals) {\n    cellNormals = normals.faceNormals(cells, positions, faceNormalsEpsilon)\n  }\n  if(!cellNormals && !vertexNormals) {\n    vertexNormals = normals.vertexNormals(cells, positions, vertexNormalsEpsilon)\n  }\n\n  //Compute colors\n  var vertexColors    = params.vertexColors\n  var cellColors      = params.cellColors\n  var meshColor       = params.meshColor || [1,1,1,1]\n\n  //UVs\n  var vertexUVs       = params.vertexUVs\n  var vertexIntensity = params.vertexIntensity\n  var cellUVs         = params.cellUVs\n  var cellIntensity   = params.cellIntensity\n\n  var intensityLo     = Infinity\n  var intensityHi     = -Infinity\n  if(!vertexUVs && !cellUVs) {\n    if(vertexIntensity) {\n      if(params.vertexIntensityBounds) {\n        intensityLo = +params.vertexIntensityBounds[0]\n        intensityHi = +params.vertexIntensityBounds[1]\n      } else {\n        for(var i=0; i<vertexIntensity.length; ++i) {\n          var f = vertexIntensity[i]\n          intensityLo = Math.min(intensityLo, f)\n          intensityHi = Math.max(intensityHi, f)\n        }\n      }\n    } else if(cellIntensity) {\n      for(var i=0; i<cellIntensity.length; ++i) {\n        var f = cellIntensity[i]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    } else {\n      for(var i=0; i<positions.length; ++i) {\n        var f = positions[i][2]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    }\n  }\n\n  if(vertexIntensity) {\n    this.intensity = vertexIntensity\n  } else if(cellIntensity) {\n    this.intensity = unpackIntensity(cells, positions.length, cellIntensity)\n  } else {\n    this.intensity = takeZComponent(positions)\n  }\n\n  //Point size\n  var pointSizes      = params.pointSizes\n  var meshPointSize   = params.pointSize || 1.0\n\n  //Update bounds\n  this.bounds       = [[Infinity,Infinity,Infinity], [-Infinity,-Infinity,-Infinity]]\n  for(var i=0; i<positions.length; ++i) {\n    var p = positions[i]\n    for(var j=0; j<3; ++j) {\n      if(isNaN(p[j]) || !isFinite(p[j])) {\n        continue\n      }\n      this.bounds[0][j] = Math.min(this.bounds[0][j], p[j])\n      this.bounds[1][j] = Math.max(this.bounds[1][j], p[j])\n    }\n  }\n\n  //Pack cells into buffers\n  var triangleCount = 0\n  var edgeCount = 0\n  var pointCount = 0\n\nfill_loop:\n  for(var i=0; i<cells.length; ++i) {\n    var cell = cells[i]\n    switch(cell.length) {\n      case 1:\n\n        var v = cell[0]\n        var p = positions[v]\n\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          if(isNaN(p[j]) || !isFinite(p[j])) {\n            continue fill_loop\n          }\n        }\n\n        pPos.push(p[0], p[1], p[2], p[3])\n\n        var c\n        if(vertexColors) {\n          c = vertexColors[v]\n        } else if(cellColors) {\n          c = cellColors[i]\n        } else {\n          c = meshColor\n        }\n        if(c.length === 3) {\n          pCol.push(c[0], c[1], c[2], 1)\n        } else {\n          pCol.push(c[0], c[1], c[2], c[3])\n        }\n\n        var uv\n        if(vertexUVs) {\n          uv = vertexUVs[v]\n        } else if(vertexIntensity) {\n          uv = [\n            (vertexIntensity[v] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else if(cellUVs) {\n          uv = cellUVs[i]\n        } else if(cellIntensity) {\n          uv = [\n            (cellIntensity[i] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else {\n          uv = [\n            (p[2] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        }\n        pUVs.push(uv[0], uv[1])\n\n        if(pointSizes) {\n          pSiz.push(pointSizes[v])\n        } else {\n          pSiz.push(meshPointSize)\n        }\n\n        pIds.push(i)\n\n        pointCount += 1\n      break\n\n      case 2:\n\n        //Check NaNs\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n\n          ePos.push(p[0], p[1], p[2])\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n          if(c.length === 3) {\n            eCol.push(c[0], c[1], c[2], 1)\n          } else {\n            eCol.push(c[0], c[1], c[2], c[3])\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          eUVs.push(uv[0], uv[1])\n\n          eIds.push(i)\n        }\n        edgeCount += 1\n      break\n\n      case 3:\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<3; ++j) {\n          var v = cell[2 - j]\n\n          var p = positions[v]\n          tPos.push(p[0], p[1], p[2], p[3])\n\n          var w = vectors[v]\n          tVec.push(w[0], w[1], w[2]);\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n          if(c.length === 3) {\n            tCol.push(c[0], c[1], c[2], 1)\n          } else {\n            tCol.push(c[0], c[1], c[2], c[3])\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          tUVs.push(uv[0], uv[1])\n\n          var q\n          if(vertexNormals) {\n            q = vertexNormals[v]\n          } else {\n            q = cellNormals[i]\n          }\n          tNor.push(q[0], q[1], q[2])\n\n          tIds.push(i)\n        }\n        triangleCount += 1\n      break\n\n      default:\n      break\n    }\n  }\n\n  this.pointCount     = pointCount\n  this.edgeCount      = edgeCount\n  this.triangleCount  = triangleCount\n\n  this.pointPositions.update(pPos)\n  this.pointColors.update(pCol)\n  this.pointUVs.update(pUVs)\n  this.pointSizes.update(pSiz)\n  this.pointIds.update(new Uint32Array(pIds))\n\n  this.edgePositions.update(ePos)\n  this.edgeColors.update(eCol)\n  this.edgeUVs.update(eUVs)\n  this.edgeIds.update(new Uint32Array(eIds))\n\n  this.trianglePositions.update(tPos)\n  this.triangleVectors.update(tVec)\n  this.triangleColors.update(tCol)\n  this.triangleUVs.update(tUVs)\n  this.triangleNormals.update(tNor)\n  this.triangleIds.update(new Uint32Array(tIds))\n}\n\nproto.drawTransparent = proto.draw = function(params) {\n  params = params || {}\n  var gl          = this.gl\n  var model       = params.model      || IDENTITY\n  var view        = params.view       || IDENTITY\n  var projection  = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    inverseModel: IDENTITY.slice(),\n\n    clipBounds: clipBounds,\n\n    kambient:   this.ambientLight,\n    kdiffuse:   this.diffuseLight,\n    kspecular:  this.specularLight,\n    roughness:  this.roughness,\n    fresnel:    this.fresnel,\n\n    eyePosition:   [0,0,0],\n    lightPosition: [0,0,0],\n\n    opacity:  this.opacity,\n\n    vectorScale: this.vectorScale,\n    coneScale: this.coneScale,\n    coneOffset: this.coneOffset,\n\n    contourColor: this.contourColor,\n\n    texture:    0\n  }\n\n  uniforms.inverseModel = invert(uniforms.inverseModel, uniforms.model)\n\n  gl.disable(gl.CULL_FACE)\n\n  this.texture.bind(0)\n\n  var invCameraMatrix = new Array(16)\n  multiply(invCameraMatrix, uniforms.view, uniforms.model)\n  multiply(invCameraMatrix, uniforms.projection, invCameraMatrix)\n  invert(invCameraMatrix, invCameraMatrix)\n\n  for(var i=0; i<3; ++i) {\n    uniforms.eyePosition[i] = invCameraMatrix[12+i] / invCameraMatrix[15]\n  }\n\n  var w = invCameraMatrix[15]\n  for(var i=0; i<3; ++i) {\n    w += this.lightPosition[i] * invCameraMatrix[4*i+3]\n  }\n  for(var i=0; i<3; ++i) {\n    var s = invCameraMatrix[12+i]\n    for(var j=0; j<3; ++j) {\n      s += invCameraMatrix[4*j+i] * this.lightPosition[j]\n    }\n    uniforms.lightPosition[i] = s / w\n  }\n\n  if(this.triangleCount > 0) {\n    var shader = this.triShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n}\nproto.drawPick = function(params) {\n  params = params || {}\n\n  var gl         = this.gl\n\n  var model      = params.model      || IDENTITY\n  var view       = params.view       || IDENTITY\n  var projection = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  //Save camera parameters\n  this._model      = [].slice.call(model)\n  this._view       = [].slice.call(view)\n  this._projection = [].slice.call(projection)\n  this._resolution = [gl.drawingBufferWidth, gl.drawingBufferHeight]\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    clipBounds: clipBounds,\n\n    vectorScale: this.vectorScale,\n    coneScale: this.coneScale,\n    coneOffset: this.coneOffset,\n\n    pickId:     this.pickId / 255.0,\n  }\n\n  var shader = this.pickShader\n  shader.bind()\n  shader.uniforms = uniforms\n\n  if(this.triangleCount > 0) {\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n\n  if(this.edgeCount > 0) {\n    this.edgeVAO.bind()\n    gl.lineWidth(this.lineWidth * this.pixelRatio)\n    gl.drawArrays(gl.LINES, 0, this.edgeCount*2)\n    this.edgeVAO.unbind()\n  }\n\n}\n\n\nproto.pick = function(pickData) {\n  if(!pickData) {\n    return null\n  }\n  if(pickData.id !== this.pickId) {\n    return null\n  }\n\n  var cellId    = pickData.value[0] + 256*pickData.value[1] + 65536*pickData.value[2]\n  var cell      = this.cells[cellId]\n  var pos =     this.positions[cell[1]].slice(0, 3)\n\n  return {\n    // corresponding to input indices\n    index: Math.floor(cell[1] / 48),\n    position: pos,\n    dataCoordinate: pos\n  }\n}\n\n\nproto.dispose = function() {\n  this.texture.dispose()\n\n  this.triShader.dispose()\n  this.pickShader.dispose()\n\n  this.triangleVAO.dispose()\n  this.trianglePositions.dispose()\n  this.triangleVectors.dispose()\n  this.triangleColors.dispose()\n  this.triangleUVs.dispose()\n  this.triangleNormals.dispose()\n  this.triangleIds.dispose()\n\n  this.edgeVAO.dispose()\n  this.edgePositions.dispose()\n  this.edgeColors.dispose()\n  this.edgeUVs.dispose()\n  this.edgeIds.dispose()\n\n  this.pointVAO.dispose()\n  this.pointPositions.dispose()\n  this.pointColors.dispose()\n  this.pointUVs.dispose()\n  this.pointSizes.dispose()\n  this.pointIds.dispose()\n\n  this.contourVAO.dispose()\n  this.contourPositions.dispose()\n}\n\nfunction createMeshShader(gl) {\n  // need to pass meshShader attributes manually,\n  // to make this work on etpinard's Ubuntu Thinkpad\n  var shader = createShader(gl, meshShader.vertex, meshShader.fragment, null, meshShader.attributes)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location    = 2\n  shader.attributes.uv.location       = 3\n  shader.attributes.vector.location   = 5\n  return shader\n}\n\n\nfunction createPickShader(gl) {\n  var shader = createShader(gl, pickShader.vertex, pickShader.fragment, null, pickShader.attributes)\n  shader.attributes.position.location = 0\n  shader.attributes.id.location       = 1\n  shader.attributes.vector.location   = 5\n  return shader\n}\n\n\n\nfunction createSimplicialMesh(gl, params) {\n  if (arguments.length === 1) {\n    params = gl;\n    gl = params.gl;\n  }\n\n\n  var triShader       = params.triShader || createMeshShader(gl)\n  var pickShader      = createPickShader(gl)\n  var meshTexture       = createTexture(gl,\n    ndarray(new Uint8Array([255,255,255,255]), [1,1,4]))\n  meshTexture.generateMipmap()\n  meshTexture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n  meshTexture.magFilter = gl.LINEAR\n\n  var trianglePositions = createBuffer(gl)\n  var triangleVectors   = createBuffer(gl)\n  var triangleColors    = createBuffer(gl)\n  var triangleUVs       = createBuffer(gl)\n  var triangleNormals   = createBuffer(gl)\n  var triangleIds       = createBuffer(gl)\n  var triangleVAO       = createVAO(gl, [\n    { buffer: trianglePositions,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: triangleIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: triangleColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: triangleUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: triangleNormals,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: triangleVectors,\n      type: gl.FLOAT,\n      size: 3\n    }\n  ])\n\n  var edgePositions = createBuffer(gl)\n  var edgeColors    = createBuffer(gl)\n  var edgeUVs       = createBuffer(gl)\n  var edgeIds       = createBuffer(gl)\n  var edgeVAO       = createVAO(gl, [\n    { buffer: edgePositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: edgeIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: edgeColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: edgeUVs,\n      type: gl.FLOAT,\n      size: 2\n    }\n  ])\n\n  var pointPositions  = createBuffer(gl)\n  var pointColors     = createBuffer(gl)\n  var pointUVs        = createBuffer(gl)\n  var pointSizes      = createBuffer(gl)\n  var pointIds        = createBuffer(gl)\n  var pointVAO        = createVAO(gl, [\n    { buffer: pointPositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: pointIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: pointColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: pointUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: pointSizes,\n      type: gl.FLOAT,\n      size: 1\n    }\n  ])\n\n  var contourPositions = createBuffer(gl)\n  var contourVAO       = createVAO(gl, [\n    { buffer: contourPositions,\n      type:   gl.FLOAT,\n      size:   3\n    }])\n\n  var mesh = new SimplicialMesh(gl\n    , meshTexture\n    , triShader\n    , pickShader\n    , trianglePositions\n    , triangleVectors\n    , triangleIds\n    , triangleColors\n    , triangleUVs\n    , triangleNormals\n    , triangleVAO\n    , edgePositions\n    , edgeIds\n    , edgeColors\n    , edgeUVs\n    , edgeVAO\n    , pointPositions\n    , pointIds\n    , pointColors\n    , pointUVs\n    , pointSizes\n    , pointVAO\n    , contourPositions\n    , contourVAO)\n\n  mesh.update(params)\n\n  return mesh\n}\n\nmodule.exports = createSimplicialMesh\n\n},{\"./shaders\":243,\"colormap\":119,\"gl-buffer\":240,\"gl-mat4/invert\":264,\"gl-mat4/multiply\":266,\"gl-shader\":300,\"gl-texture2d\":317,\"gl-vao\":322,\"ndarray\":445,\"normals\":448,\"simplicial-complex-contour\":505,\"typedarray-pool\":532}],243:[function(_dereq_,module,exports){\nvar glslify       = _dereq_('glslify')\n\nvar triVertSrc = glslify([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the cone vertex and normal at the given index.\\n//\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\n// pointing in the direction of the vector attribute.\\n//\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\n// These vertices are used to make up the triangles of the cone by the following:\\n//   segment + 0 top vertex\\n//   segment + 1 perimeter vertex a+1\\n//   segment + 2 perimeter vertex a\\n//   segment + 3 center base vertex\\n//   segment + 4 perimeter vertex a\\n//   segment + 5 perimeter vertex a+1\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\n// To go from index to segment, floor(index / 6)\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\n// To go from index to segment index, index - (segment*6)\\n//\\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\\n\\n  const float segmentCount = 8.0;\\n\\n  float index = rawIndex - floor(rawIndex /\\n    (segmentCount * 6.0)) *\\n    (segmentCount * 6.0);\\n\\n  float segment = floor(0.001 + index/6.0);\\n  float segmentIndex = index - (segment*6.0);\\n\\n  normal = -normalize(d);\\n\\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\\n    return mix(vec3(0.0), -d, coneOffset);\\n  }\\n\\n  float nextAngle = (\\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\\n  ) ? 1.0 : 0.0;\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\n\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\n  vec3 v2 = v1 - d;\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\n  vec3 v3 = v2 + x + y;\\n  if (segmentIndex < 3.0) {\\n    vec3 tx = u * sin(angle);\\n    vec3 ty = v * -cos(angle);\\n    vec3 tangent = tx + ty;\\n    normal = normalize(cross(v3 - v1, tangent));\\n  }\\n\\n  if (segmentIndex == 0.0) {\\n    return mix(d, vec3(0.0), coneOffset);\\n  }\\n  return v3;\\n}\\n\\nattribute vec3 vector;\\nattribute vec4 color, position;\\nattribute vec2 uv;\\nuniform float vectorScale;\\nuniform float coneScale;\\n\\nuniform float coneOffset;\\n\\nuniform mat4 model\\n           , view\\n           , projection\\n           , inverseModel;\\nuniform vec3 eyePosition\\n           , lightPosition;\\n\\nvarying vec3 f_normal\\n           , f_lightDirection\\n           , f_eyeDirection\\n           , f_data\\n           , f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  // Scale the vector magnitude to stay constant with\\n  // model & view changes.\\n  vec3 normal;\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * conePosition;\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\\n\\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\\n  vec4 t_position  = view * conePosition;\\n  gl_Position      = projection * t_position;\\n\\n  f_color          = color;\\n  f_data           = conePosition.xyz;\\n  f_position       = position.xyz;\\n  f_uv             = uv;\\n}\\n\"])\nvar triFragSrc = glslify([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(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\\nfloat cookTorranceSpecular(\\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(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\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\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\\n           , f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\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 = min(1.0, max(0.0, cookTorranceSpecular(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}\\n\"])\nvar pickVertSrc = glslify([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the cone vertex and normal at the given index.\\n//\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\n// pointing in the direction of the vector attribute.\\n//\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\n// These vertices are used to make up the triangles of the cone by the following:\\n//   segment + 0 top vertex\\n//   segment + 1 perimeter vertex a+1\\n//   segment + 2 perimeter vertex a\\n//   segment + 3 center base vertex\\n//   segment + 4 perimeter vertex a\\n//   segment + 5 perimeter vertex a+1\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\n// To go from index to segment, floor(index / 6)\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\n// To go from index to segment index, index - (segment*6)\\n//\\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\\n\\n  const float segmentCount = 8.0;\\n\\n  float index = rawIndex - floor(rawIndex /\\n    (segmentCount * 6.0)) *\\n    (segmentCount * 6.0);\\n\\n  float segment = floor(0.001 + index/6.0);\\n  float segmentIndex = index - (segment*6.0);\\n\\n  normal = -normalize(d);\\n\\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\\n    return mix(vec3(0.0), -d, coneOffset);\\n  }\\n\\n  float nextAngle = (\\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\\n  ) ? 1.0 : 0.0;\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\n\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\n  vec3 v2 = v1 - d;\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\n  vec3 v3 = v2 + x + y;\\n  if (segmentIndex < 3.0) {\\n    vec3 tx = u * sin(angle);\\n    vec3 ty = v * -cos(angle);\\n    vec3 tangent = tx + ty;\\n    normal = normalize(cross(v3 - v1, tangent));\\n  }\\n\\n  if (segmentIndex == 0.0) {\\n    return mix(d, vec3(0.0), coneOffset);\\n  }\\n  return v3;\\n}\\n\\nattribute vec3 vector;\\nattribute vec4 position;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\n\\nuniform float vectorScale;\\nuniform float coneScale;\\nuniform float coneOffset;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  vec3 normal;\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n  gl_Position = projection * view * conePosition;\\n  f_id        = id;\\n  f_position  = position.xyz;\\n}\\n\"])\nvar pickFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"])\n\nexports.meshShader = {\n  vertex:   triVertSrc,\n  fragment: triFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec4'},\n    {name: 'normal', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'uv', type: 'vec2'},\n    {name: 'vector', type: 'vec3'}\n  ]\n}\nexports.pickShader = {\n  vertex:   pickVertSrc,\n  fragment: pickFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec4'},\n    {name: 'id', type: 'vec4'},\n    {name: 'vector', type: 'vec3'}\n  ]\n}\n\n},{\"glslify\":404}],244:[function(_dereq_,module,exports){\nmodule.exports = {\n  0: 'NONE',\n  1: 'ONE',\n  2: 'LINE_LOOP',\n  3: 'LINE_STRIP',\n  4: 'TRIANGLES',\n  5: 'TRIANGLE_STRIP',\n  6: 'TRIANGLE_FAN',\n  256: 'DEPTH_BUFFER_BIT',\n  512: 'NEVER',\n  513: 'LESS',\n  514: 'EQUAL',\n  515: 'LEQUAL',\n  516: 'GREATER',\n  517: 'NOTEQUAL',\n  518: 'GEQUAL',\n  519: 'ALWAYS',\n  768: 'SRC_COLOR',\n  769: 'ONE_MINUS_SRC_COLOR',\n  770: 'SRC_ALPHA',\n  771: 'ONE_MINUS_SRC_ALPHA',\n  772: 'DST_ALPHA',\n  773: 'ONE_MINUS_DST_ALPHA',\n  774: 'DST_COLOR',\n  775: 'ONE_MINUS_DST_COLOR',\n  776: 'SRC_ALPHA_SATURATE',\n  1024: 'STENCIL_BUFFER_BIT',\n  1028: 'FRONT',\n  1029: 'BACK',\n  1032: 'FRONT_AND_BACK',\n  1280: 'INVALID_ENUM',\n  1281: 'INVALID_VALUE',\n  1282: 'INVALID_OPERATION',\n  1285: 'OUT_OF_MEMORY',\n  1286: 'INVALID_FRAMEBUFFER_OPERATION',\n  2304: 'CW',\n  2305: 'CCW',\n  2849: 'LINE_WIDTH',\n  2884: 'CULL_FACE',\n  2885: 'CULL_FACE_MODE',\n  2886: 'FRONT_FACE',\n  2928: 'DEPTH_RANGE',\n  2929: 'DEPTH_TEST',\n  2930: 'DEPTH_WRITEMASK',\n  2931: 'DEPTH_CLEAR_VALUE',\n  2932: 'DEPTH_FUNC',\n  2960: 'STENCIL_TEST',\n  2961: 'STENCIL_CLEAR_VALUE',\n  2962: 'STENCIL_FUNC',\n  2963: 'STENCIL_VALUE_MASK',\n  2964: 'STENCIL_FAIL',\n  2965: 'STENCIL_PASS_DEPTH_FAIL',\n  2966: 'STENCIL_PASS_DEPTH_PASS',\n  2967: 'STENCIL_REF',\n  2968: 'STENCIL_WRITEMASK',\n  2978: 'VIEWPORT',\n  3024: 'DITHER',\n  3042: 'BLEND',\n  3088: 'SCISSOR_BOX',\n  3089: 'SCISSOR_TEST',\n  3106: 'COLOR_CLEAR_VALUE',\n  3107: 'COLOR_WRITEMASK',\n  3317: 'UNPACK_ALIGNMENT',\n  3333: 'PACK_ALIGNMENT',\n  3379: 'MAX_TEXTURE_SIZE',\n  3386: 'MAX_VIEWPORT_DIMS',\n  3408: 'SUBPIXEL_BITS',\n  3410: 'RED_BITS',\n  3411: 'GREEN_BITS',\n  3412: 'BLUE_BITS',\n  3413: 'ALPHA_BITS',\n  3414: 'DEPTH_BITS',\n  3415: 'STENCIL_BITS',\n  3553: 'TEXTURE_2D',\n  4352: 'DONT_CARE',\n  4353: 'FASTEST',\n  4354: 'NICEST',\n  5120: 'BYTE',\n  5121: 'UNSIGNED_BYTE',\n  5122: 'SHORT',\n  5123: 'UNSIGNED_SHORT',\n  5124: 'INT',\n  5125: 'UNSIGNED_INT',\n  5126: 'FLOAT',\n  5386: 'INVERT',\n  5890: 'TEXTURE',\n  6401: 'STENCIL_INDEX',\n  6402: 'DEPTH_COMPONENT',\n  6406: 'ALPHA',\n  6407: 'RGB',\n  6408: 'RGBA',\n  6409: 'LUMINANCE',\n  6410: 'LUMINANCE_ALPHA',\n  7680: 'KEEP',\n  7681: 'REPLACE',\n  7682: 'INCR',\n  7683: 'DECR',\n  7936: 'VENDOR',\n  7937: 'RENDERER',\n  7938: 'VERSION',\n  9728: 'NEAREST',\n  9729: 'LINEAR',\n  9984: 'NEAREST_MIPMAP_NEAREST',\n  9985: 'LINEAR_MIPMAP_NEAREST',\n  9986: 'NEAREST_MIPMAP_LINEAR',\n  9987: 'LINEAR_MIPMAP_LINEAR',\n  10240: 'TEXTURE_MAG_FILTER',\n  10241: 'TEXTURE_MIN_FILTER',\n  10242: 'TEXTURE_WRAP_S',\n  10243: 'TEXTURE_WRAP_T',\n  10497: 'REPEAT',\n  10752: 'POLYGON_OFFSET_UNITS',\n  16384: 'COLOR_BUFFER_BIT',\n  32769: 'CONSTANT_COLOR',\n  32770: 'ONE_MINUS_CONSTANT_COLOR',\n  32771: 'CONSTANT_ALPHA',\n  32772: 'ONE_MINUS_CONSTANT_ALPHA',\n  32773: 'BLEND_COLOR',\n  32774: 'FUNC_ADD',\n  32777: 'BLEND_EQUATION_RGB',\n  32778: 'FUNC_SUBTRACT',\n  32779: 'FUNC_REVERSE_SUBTRACT',\n  32819: 'UNSIGNED_SHORT_4_4_4_4',\n  32820: 'UNSIGNED_SHORT_5_5_5_1',\n  32823: 'POLYGON_OFFSET_FILL',\n  32824: 'POLYGON_OFFSET_FACTOR',\n  32854: 'RGBA4',\n  32855: 'RGB5_A1',\n  32873: 'TEXTURE_BINDING_2D',\n  32926: 'SAMPLE_ALPHA_TO_COVERAGE',\n  32928: 'SAMPLE_COVERAGE',\n  32936: 'SAMPLE_BUFFERS',\n  32937: 'SAMPLES',\n  32938: 'SAMPLE_COVERAGE_VALUE',\n  32939: 'SAMPLE_COVERAGE_INVERT',\n  32968: 'BLEND_DST_RGB',\n  32969: 'BLEND_SRC_RGB',\n  32970: 'BLEND_DST_ALPHA',\n  32971: 'BLEND_SRC_ALPHA',\n  33071: 'CLAMP_TO_EDGE',\n  33170: 'GENERATE_MIPMAP_HINT',\n  33189: 'DEPTH_COMPONENT16',\n  33306: 'DEPTH_STENCIL_ATTACHMENT',\n  33635: 'UNSIGNED_SHORT_5_6_5',\n  33648: 'MIRRORED_REPEAT',\n  33901: 'ALIASED_POINT_SIZE_RANGE',\n  33902: 'ALIASED_LINE_WIDTH_RANGE',\n  33984: 'TEXTURE0',\n  33985: 'TEXTURE1',\n  33986: 'TEXTURE2',\n  33987: 'TEXTURE3',\n  33988: 'TEXTURE4',\n  33989: 'TEXTURE5',\n  33990: 'TEXTURE6',\n  33991: 'TEXTURE7',\n  33992: 'TEXTURE8',\n  33993: 'TEXTURE9',\n  33994: 'TEXTURE10',\n  33995: 'TEXTURE11',\n  33996: 'TEXTURE12',\n  33997: 'TEXTURE13',\n  33998: 'TEXTURE14',\n  33999: 'TEXTURE15',\n  34000: 'TEXTURE16',\n  34001: 'TEXTURE17',\n  34002: 'TEXTURE18',\n  34003: 'TEXTURE19',\n  34004: 'TEXTURE20',\n  34005: 'TEXTURE21',\n  34006: 'TEXTURE22',\n  34007: 'TEXTURE23',\n  34008: 'TEXTURE24',\n  34009: 'TEXTURE25',\n  34010: 'TEXTURE26',\n  34011: 'TEXTURE27',\n  34012: 'TEXTURE28',\n  34013: 'TEXTURE29',\n  34014: 'TEXTURE30',\n  34015: 'TEXTURE31',\n  34016: 'ACTIVE_TEXTURE',\n  34024: 'MAX_RENDERBUFFER_SIZE',\n  34041: 'DEPTH_STENCIL',\n  34055: 'INCR_WRAP',\n  34056: 'DECR_WRAP',\n  34067: 'TEXTURE_CUBE_MAP',\n  34068: 'TEXTURE_BINDING_CUBE_MAP',\n  34069: 'TEXTURE_CUBE_MAP_POSITIVE_X',\n  34070: 'TEXTURE_CUBE_MAP_NEGATIVE_X',\n  34071: 'TEXTURE_CUBE_MAP_POSITIVE_Y',\n  34072: 'TEXTURE_CUBE_MAP_NEGATIVE_Y',\n  34073: 'TEXTURE_CUBE_MAP_POSITIVE_Z',\n  34074: 'TEXTURE_CUBE_MAP_NEGATIVE_Z',\n  34076: 'MAX_CUBE_MAP_TEXTURE_SIZE',\n  34338: 'VERTEX_ATTRIB_ARRAY_ENABLED',\n  34339: 'VERTEX_ATTRIB_ARRAY_SIZE',\n  34340: 'VERTEX_ATTRIB_ARRAY_STRIDE',\n  34341: 'VERTEX_ATTRIB_ARRAY_TYPE',\n  34342: 'CURRENT_VERTEX_ATTRIB',\n  34373: 'VERTEX_ATTRIB_ARRAY_POINTER',\n  34466: 'NUM_COMPRESSED_TEXTURE_FORMATS',\n  34467: 'COMPRESSED_TEXTURE_FORMATS',\n  34660: 'BUFFER_SIZE',\n  34661: 'BUFFER_USAGE',\n  34816: 'STENCIL_BACK_FUNC',\n  34817: 'STENCIL_BACK_FAIL',\n  34818: 'STENCIL_BACK_PASS_DEPTH_FAIL',\n  34819: 'STENCIL_BACK_PASS_DEPTH_PASS',\n  34877: 'BLEND_EQUATION_ALPHA',\n  34921: 'MAX_VERTEX_ATTRIBS',\n  34922: 'VERTEX_ATTRIB_ARRAY_NORMALIZED',\n  34930: 'MAX_TEXTURE_IMAGE_UNITS',\n  34962: 'ARRAY_BUFFER',\n  34963: 'ELEMENT_ARRAY_BUFFER',\n  34964: 'ARRAY_BUFFER_BINDING',\n  34965: 'ELEMENT_ARRAY_BUFFER_BINDING',\n  34975: 'VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',\n  35040: 'STREAM_DRAW',\n  35044: 'STATIC_DRAW',\n  35048: 'DYNAMIC_DRAW',\n  35632: 'FRAGMENT_SHADER',\n  35633: 'VERTEX_SHADER',\n  35660: 'MAX_VERTEX_TEXTURE_IMAGE_UNITS',\n  35661: 'MAX_COMBINED_TEXTURE_IMAGE_UNITS',\n  35663: 'SHADER_TYPE',\n  35664: 'FLOAT_VEC2',\n  35665: 'FLOAT_VEC3',\n  35666: 'FLOAT_VEC4',\n  35667: 'INT_VEC2',\n  35668: 'INT_VEC3',\n  35669: 'INT_VEC4',\n  35670: 'BOOL',\n  35671: 'BOOL_VEC2',\n  35672: 'BOOL_VEC3',\n  35673: 'BOOL_VEC4',\n  35674: 'FLOAT_MAT2',\n  35675: 'FLOAT_MAT3',\n  35676: 'FLOAT_MAT4',\n  35678: 'SAMPLER_2D',\n  35680: 'SAMPLER_CUBE',\n  35712: 'DELETE_STATUS',\n  35713: 'COMPILE_STATUS',\n  35714: 'LINK_STATUS',\n  35715: 'VALIDATE_STATUS',\n  35716: 'INFO_LOG_LENGTH',\n  35717: 'ATTACHED_SHADERS',\n  35718: 'ACTIVE_UNIFORMS',\n  35719: 'ACTIVE_UNIFORM_MAX_LENGTH',\n  35720: 'SHADER_SOURCE_LENGTH',\n  35721: 'ACTIVE_ATTRIBUTES',\n  35722: 'ACTIVE_ATTRIBUTE_MAX_LENGTH',\n  35724: 'SHADING_LANGUAGE_VERSION',\n  35725: 'CURRENT_PROGRAM',\n  36003: 'STENCIL_BACK_REF',\n  36004: 'STENCIL_BACK_VALUE_MASK',\n  36005: 'STENCIL_BACK_WRITEMASK',\n  36006: 'FRAMEBUFFER_BINDING',\n  36007: 'RENDERBUFFER_BINDING',\n  36048: 'FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE',\n  36049: 'FRAMEBUFFER_ATTACHMENT_OBJECT_NAME',\n  36050: 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL',\n  36051: 'FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE',\n  36053: 'FRAMEBUFFER_COMPLETE',\n  36054: 'FRAMEBUFFER_INCOMPLETE_ATTACHMENT',\n  36055: 'FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT',\n  36057: 'FRAMEBUFFER_INCOMPLETE_DIMENSIONS',\n  36061: 'FRAMEBUFFER_UNSUPPORTED',\n  36064: 'COLOR_ATTACHMENT0',\n  36096: 'DEPTH_ATTACHMENT',\n  36128: 'STENCIL_ATTACHMENT',\n  36160: 'FRAMEBUFFER',\n  36161: 'RENDERBUFFER',\n  36162: 'RENDERBUFFER_WIDTH',\n  36163: 'RENDERBUFFER_HEIGHT',\n  36164: 'RENDERBUFFER_INTERNAL_FORMAT',\n  36168: 'STENCIL_INDEX8',\n  36176: 'RENDERBUFFER_RED_SIZE',\n  36177: 'RENDERBUFFER_GREEN_SIZE',\n  36178: 'RENDERBUFFER_BLUE_SIZE',\n  36179: 'RENDERBUFFER_ALPHA_SIZE',\n  36180: 'RENDERBUFFER_DEPTH_SIZE',\n  36181: 'RENDERBUFFER_STENCIL_SIZE',\n  36194: 'RGB565',\n  36336: 'LOW_FLOAT',\n  36337: 'MEDIUM_FLOAT',\n  36338: 'HIGH_FLOAT',\n  36339: 'LOW_INT',\n  36340: 'MEDIUM_INT',\n  36341: 'HIGH_INT',\n  36346: 'SHADER_COMPILER',\n  36347: 'MAX_VERTEX_UNIFORM_VECTORS',\n  36348: 'MAX_VARYING_VECTORS',\n  36349: 'MAX_FRAGMENT_UNIFORM_VECTORS',\n  37440: 'UNPACK_FLIP_Y_WEBGL',\n  37441: 'UNPACK_PREMULTIPLY_ALPHA_WEBGL',\n  37442: 'CONTEXT_LOST_WEBGL',\n  37443: 'UNPACK_COLORSPACE_CONVERSION_WEBGL',\n  37444: 'BROWSER_DEFAULT_WEBGL'\n}\n\n},{}],245:[function(_dereq_,module,exports){\nvar gl10 = _dereq_('./1.0/numbers')\n\nmodule.exports = function lookupConstant (number) {\n  return gl10[number]\n}\n\n},{\"./1.0/numbers\":244}],246:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createErrorBars\n\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar createShader  = _dereq_('./shaders/index')\n\nvar IDENTITY = [1,0,0,0,\n                0,1,0,0,\n                0,0,1,0,\n                0,0,0,1]\n\nfunction ErrorBars(gl, buffer, vao, shader) {\n  this.gl           = gl\n  this.shader       = shader\n  this.buffer       = buffer\n  this.vao          = vao\n  this.pixelRatio   = 1\n  this.bounds       = [[ Infinity, Infinity, Infinity], [-Infinity,-Infinity,-Infinity]]\n  this.clipBounds   = [[-Infinity,-Infinity,-Infinity], [ Infinity, Infinity, Infinity]]\n  this.lineWidth    = [1,1,1]\n  this.capSize      = [10,10,10]\n  this.lineCount    = [0,0,0]\n  this.lineOffset   = [0,0,0]\n  this.opacity      = 1\n  this.hasAlpha     = false\n}\n\nvar proto = ErrorBars.prototype\n\nproto.isOpaque = function() {\n  return !this.hasAlpha\n}\n\nproto.isTransparent = function() {\n  return this.hasAlpha\n}\n\nproto.drawTransparent = proto.draw = function(cameraParams) {\n  var gl = this.gl\n  var uniforms        = this.shader.uniforms\n\n  this.shader.bind()\n  var view       = uniforms.view       = cameraParams.view       || IDENTITY\n  var projection = uniforms.projection = cameraParams.projection || IDENTITY\n  uniforms.model      = cameraParams.model      || IDENTITY\n  uniforms.clipBounds = this.clipBounds\n  uniforms.opacity    = this.opacity\n\n\n  var cx = view[12]\n  var cy = view[13]\n  var cz = view[14]\n  var cw = view[15]\n\n  var isOrtho = cameraParams._ortho || false\n  var orthoFix = (isOrtho) ? 2 : 1 // double up padding for orthographic ticks & labels\n  var pixelScaleF = orthoFix * this.pixelRatio * (projection[3]*cx + projection[7]*cy + projection[11]*cz + projection[15]*cw) / gl.drawingBufferHeight\n\n  this.vao.bind()\n  for(var i=0; i<3; ++i) {\n    gl.lineWidth(this.lineWidth[i] * this.pixelRatio)\n    uniforms.capSize = this.capSize[i] * pixelScaleF\n    if (this.lineCount[i]) {\n      gl.drawArrays(gl.LINES, this.lineOffset[i], this.lineCount[i])\n    }\n  }\n  this.vao.unbind()\n}\n\nfunction updateBounds(bounds, point) {\n  for(var i=0; i<3; ++i) {\n    bounds[0][i] = Math.min(bounds[0][i], point[i])\n    bounds[1][i] = Math.max(bounds[1][i], point[i])\n  }\n}\n\nvar FACE_TABLE = (function(){\n  var table = new Array(3)\n  for(var d=0; d<3; ++d) {\n    var row = []\n    for(var j=1; j<=2; ++j) {\n      for(var s=-1; s<=1; s+=2) {\n        var u = (j+d) % 3\n        var y = [0,0,0]\n        y[u] = s\n        row.push(y)\n      }\n    }\n    table[d] = row\n  }\n  return table\n})()\n\n\nfunction emitFace(verts, x, c, d) {\n  var offsets = FACE_TABLE[d]\n  for(var i=0; i<offsets.length; ++i) {\n    var o = offsets[i]\n    verts.push(x[0], x[1], x[2],\n               c[0], c[1], c[2], c[3],\n               o[0], o[1], o[2])\n  }\n  return offsets.length\n}\n\nproto.update = function(options) {\n  options = options || {}\n\n  if('lineWidth' in options) {\n    this.lineWidth = options.lineWidth\n    if(!Array.isArray(this.lineWidth)) {\n      this.lineWidth = [this.lineWidth, this.lineWidth, this.lineWidth]\n    }\n  }\n  if('capSize' in options) {\n    this.capSize = options.capSize\n    if(!Array.isArray(this.capSize)) {\n      this.capSize = [this.capSize, this.capSize, this.capSize]\n    }\n  }\n\n  this.hasAlpha = false // default to no transparent draw\n  if('opacity' in options) {\n    this.opacity = +options.opacity\n    if(this.opacity < 1) {\n      this.hasAlpha = true;\n    }\n  }\n\n  var color    = options.color || [[0,0,0],[0,0,0],[0,0,0]]\n  var position = options.position\n  var error    = options.error\n  if(!Array.isArray(color[0])) {\n    color = [color,color,color]\n  }\n\n  if(position && error) {\n\n    var verts       = []\n    var n           = position.length\n    var vertexCount = 0\n    this.bounds     = [[ Infinity, Infinity, Infinity],\n                       [-Infinity,-Infinity,-Infinity]]\n    this.lineCount  = [0,0,0]\n\n    //Build geometry for lines\n    for(var j=0; j<3; ++j) {\n      this.lineOffset[j] = vertexCount\n\ni_loop:\n      for(var i=0; i<n; ++i) {\n        var p = position[i]\n\n        for(var k=0; k<3; ++k) {\n          if(isNaN(p[k]) || !isFinite(p[k])) {\n            continue i_loop\n          }\n        }\n\n        var e = error[i]\n        var c = color[j]\n        if(Array.isArray(c[0])) {\n          c = color[i]\n        }\n        if(c.length === 3) {\n          c = [c[0], c[1], c[2], 1]\n        } else if(c.length === 4) {\n          c = [c[0], c[1], c[2], c[3]]\n          if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n        }\n\n        if(isNaN(e[0][j]) || isNaN(e[1][j])) {\n          continue\n        }\n        if(e[0][j] < 0) {\n          var x = p.slice()\n          x[j] += e[0][j]\n          verts.push(p[0], p[1], p[2],\n                     c[0], c[1], c[2], c[3],\n                        0,    0,    0,\n                     x[0], x[1], x[2],\n                     c[0], c[1], c[2], c[3],\n                        0,    0,    0)\n          updateBounds(this.bounds, x)\n          vertexCount += 2 + emitFace(verts, x, c, j)\n        }\n        if(e[1][j] > 0) {\n          var x = p.slice()\n          x[j] += e[1][j]\n          verts.push(p[0], p[1], p[2],\n                     c[0], c[1], c[2], c[3],\n                        0,    0,    0,\n                     x[0], x[1], x[2],\n                     c[0], c[1], c[2], c[3],\n                        0,    0,    0)\n          updateBounds(this.bounds, x)\n          vertexCount += 2 + emitFace(verts, x, c, j)\n        }\n      }\n      this.lineCount[j] = vertexCount - this.lineOffset[j]\n    }\n    this.buffer.update(verts)\n  }\n}\n\nproto.dispose = function() {\n  this.shader.dispose()\n  this.buffer.dispose()\n  this.vao.dispose()\n}\n\nfunction createErrorBars(options) {\n  var gl = options.gl\n  var buffer = createBuffer(gl)\n  var vao = createVAO(gl, [\n      {\n        buffer: buffer,\n        type:   gl.FLOAT,\n        size:   3,\n        offset: 0,\n        stride: 40\n      },\n      {\n        buffer: buffer,\n        type:   gl.FLOAT,\n        size:   4,\n        offset: 12,\n        stride: 40\n      },\n      {\n        buffer: buffer,\n        type:   gl.FLOAT,\n        size:   3,\n        offset: 28,\n        stride: 40\n      }\n    ])\n\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location    = 1\n  shader.attributes.offset.location   = 2\n\n  var result = new ErrorBars(gl, buffer, vao, shader)\n  result.update(options)\n  return result\n}\n\n},{\"./shaders/index\":247,\"gl-buffer\":240,\"gl-vao\":322}],247:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify = _dereq_('glslify')\nvar createShader = _dereq_('gl-shader')\n\nvar vertSrc = glslify([\"precision highp 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}\"])\nvar fragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float opacity;\\nvarying vec3 fragPosition;\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  if (\\n    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\\n    fragColor.a * opacity == 0.\\n  ) discard;\\n\\n  gl_FragColor = opacity * fragColor;\\n}\"])\n\nmodule.exports = function(gl) {\n  return createShader(gl, vertSrc, fragSrc, null, [\n    {name: 'position', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'offset', type: 'vec3'}\n  ])\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],248:[function(_dereq_,module,exports){\n'use strict'\n\nvar createTexture = _dereq_('gl-texture2d')\n\nmodule.exports = createFBO\n\nvar colorAttachmentArrays = null\nvar FRAMEBUFFER_UNSUPPORTED\nvar FRAMEBUFFER_INCOMPLETE_ATTACHMENT\nvar FRAMEBUFFER_INCOMPLETE_DIMENSIONS\nvar FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\n\nfunction saveFBOState(gl) {\n  var fbo = gl.getParameter(gl.FRAMEBUFFER_BINDING)\n  var rbo = gl.getParameter(gl.RENDERBUFFER_BINDING)\n  var tex = gl.getParameter(gl.TEXTURE_BINDING_2D)\n  return [fbo, rbo, tex]\n}\n\nfunction restoreFBOState(gl, data) {\n  gl.bindFramebuffer(gl.FRAMEBUFFER, data[0])\n  gl.bindRenderbuffer(gl.RENDERBUFFER, data[1])\n  gl.bindTexture(gl.TEXTURE_2D, data[2])\n}\n\nfunction lazyInitColorAttachments(gl, ext) {\n  var maxColorAttachments = gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL)\n  colorAttachmentArrays = new Array(maxColorAttachments + 1)\n  for(var i=0; i<=maxColorAttachments; ++i) {\n    var x = new Array(maxColorAttachments)\n    for(var j=0; j<i; ++j) {\n      x[j] = gl.COLOR_ATTACHMENT0 + j\n    }\n    for(var j=i; j<maxColorAttachments; ++j) {\n      x[j] = gl.NONE\n    }\n    colorAttachmentArrays[i] = x\n  }\n}\n\n//Throw an appropriate error\nfunction throwFBOError(status) {\n  switch(status){\n    case FRAMEBUFFER_UNSUPPORTED:\n      throw new Error('gl-fbo: Framebuffer unsupported')\n    case FRAMEBUFFER_INCOMPLETE_ATTACHMENT:\n      throw new Error('gl-fbo: Framebuffer incomplete attachment')\n    case FRAMEBUFFER_INCOMPLETE_DIMENSIONS:\n      throw new Error('gl-fbo: Framebuffer incomplete dimensions')\n    case FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:\n      throw new Error('gl-fbo: Framebuffer incomplete missing attachment')\n    default:\n      throw new Error('gl-fbo: Framebuffer failed for unspecified reason')\n  }\n}\n\n//Initialize a texture object\nfunction initTexture(gl, width, height, type, format, attachment) {\n  if(!type) {\n    return null\n  }\n  var result = createTexture(gl, width, height, format, type)\n  result.magFilter = gl.NEAREST\n  result.minFilter = gl.NEAREST\n  result.mipSamples = 1\n  result.bind()\n  gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_2D, result.handle, 0)\n  return result\n}\n\n//Initialize a render buffer object\nfunction initRenderBuffer(gl, width, height, component, attachment) {\n  var result = gl.createRenderbuffer()\n  gl.bindRenderbuffer(gl.RENDERBUFFER, result)\n  gl.renderbufferStorage(gl.RENDERBUFFER, component, width, height)\n  gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, result)\n  return result\n}\n\n//Rebuild the frame buffer\nfunction rebuildFBO(fbo) {\n\n  //Save FBO state\n  var state = saveFBOState(fbo.gl)\n\n  var gl = fbo.gl\n  var handle = fbo.handle = gl.createFramebuffer()\n  var width = fbo._shape[0]\n  var height = fbo._shape[1]\n  var numColors = fbo.color.length\n  var ext = fbo._ext\n  var useStencil = fbo._useStencil\n  var useDepth = fbo._useDepth\n  var colorType = fbo._colorType\n\n  //Bind the fbo\n  gl.bindFramebuffer(gl.FRAMEBUFFER, handle)\n\n  //Allocate color buffers\n  for(var i=0; i<numColors; ++i) {\n    fbo.color[i] = initTexture(gl, width, height, colorType, gl.RGBA, gl.COLOR_ATTACHMENT0 + i)\n  }\n  if(numColors === 0) {\n    fbo._color_rb = initRenderBuffer(gl, width, height, gl.RGBA4, gl.COLOR_ATTACHMENT0)\n    if(ext) {\n      ext.drawBuffersWEBGL(colorAttachmentArrays[0])\n    }\n  } else if(numColors > 1) {\n    ext.drawBuffersWEBGL(colorAttachmentArrays[numColors])\n  }\n\n  //Allocate depth/stencil buffers\n  var WEBGL_depth_texture = gl.getExtension('WEBGL_depth_texture')\n  if(WEBGL_depth_texture) {\n    if(useStencil) {\n      fbo.depth = initTexture(gl, width, height,\n                          WEBGL_depth_texture.UNSIGNED_INT_24_8_WEBGL,\n                          gl.DEPTH_STENCIL,\n                          gl.DEPTH_STENCIL_ATTACHMENT)\n    } else if(useDepth) {\n      fbo.depth = initTexture(gl, width, height,\n                          gl.UNSIGNED_SHORT,\n                          gl.DEPTH_COMPONENT,\n                          gl.DEPTH_ATTACHMENT)\n    }\n  } else {\n    if(useDepth && useStencil) {\n      fbo._depth_rb = initRenderBuffer(gl, width, height, gl.DEPTH_STENCIL, gl.DEPTH_STENCIL_ATTACHMENT)\n    } else if(useDepth) {\n      fbo._depth_rb = initRenderBuffer(gl, width, height, gl.DEPTH_COMPONENT16, gl.DEPTH_ATTACHMENT)\n    } else if(useStencil) {\n      fbo._depth_rb = initRenderBuffer(gl, width, height, gl.STENCIL_INDEX, gl.STENCIL_ATTACHMENT)\n    }\n  }\n\n  //Check frame buffer state\n  var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER)\n  if(status !== gl.FRAMEBUFFER_COMPLETE) {\n\n    //Release all partially allocated resources\n    fbo._destroyed = true\n\n    //Release all resources\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null)\n    gl.deleteFramebuffer(fbo.handle)\n    fbo.handle = null\n    if(fbo.depth) {\n      fbo.depth.dispose()\n      fbo.depth = null\n    }\n    if(fbo._depth_rb) {\n      gl.deleteRenderbuffer(fbo._depth_rb)\n      fbo._depth_rb = null\n    }\n    for(var i=0; i<fbo.color.length; ++i) {\n      fbo.color[i].dispose()\n      fbo.color[i] = null\n    }\n    if(fbo._color_rb) {\n      gl.deleteRenderbuffer(fbo._color_rb)\n      fbo._color_rb = null\n    }\n\n    restoreFBOState(gl, state)\n\n    //Throw the frame buffer error\n    throwFBOError(status)\n  }\n\n  //Everything ok, let's get on with life\n  restoreFBOState(gl, state)\n}\n\nfunction Framebuffer(gl, width, height, colorType, numColors, useDepth, useStencil, ext) {\n\n  //Handle and set properties\n  this.gl = gl\n  this._shape = [width|0, height|0]\n  this._destroyed = false\n  this._ext = ext\n\n  //Allocate buffers\n  this.color = new Array(numColors)\n  for(var i=0; i<numColors; ++i) {\n    this.color[i] = null\n  }\n  this._color_rb = null\n  this.depth = null\n  this._depth_rb = null\n\n  //Save depth and stencil flags\n  this._colorType = colorType\n  this._useDepth = useDepth\n  this._useStencil = useStencil\n\n  //Shape vector for resizing\n  var parent = this\n  var shapeVector = [width|0, height|0]\n  Object.defineProperties(shapeVector, {\n    0: {\n      get: function() {\n        return parent._shape[0]\n      },\n      set: function(w) {\n        return parent.width = w\n      }\n    },\n    1: {\n      get: function() {\n        return parent._shape[1]\n      },\n      set: function(h) {\n        return parent.height = h\n      }\n    }\n  })\n  this._shapeVector = shapeVector\n\n  //Initialize all attachments\n  rebuildFBO(this)\n}\n\nvar proto = Framebuffer.prototype\n\nfunction reshapeFBO(fbo, w, h) {\n  //If fbo is invalid, just skip this\n  if(fbo._destroyed) {\n    throw new Error('gl-fbo: Can\\'t resize destroyed FBO')\n  }\n\n  //Don't resize if no change in shape\n  if( (fbo._shape[0] === w) &&\n      (fbo._shape[1] === h) ) {\n    return\n  }\n\n  var gl = fbo.gl\n\n  //Check parameter ranges\n  var maxFBOSize = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE)\n  if( w < 0 || w > maxFBOSize ||\n      h < 0 || h > maxFBOSize) {\n    throw new Error('gl-fbo: Can\\'t resize FBO, invalid dimensions')\n  }\n\n  //Update shape\n  fbo._shape[0] = w\n  fbo._shape[1] = h\n\n  //Save framebuffer state\n  var state = saveFBOState(gl)\n\n  //Resize framebuffer attachments\n  for(var i=0; i<fbo.color.length; ++i) {\n    fbo.color[i].shape = fbo._shape\n  }\n  if(fbo._color_rb) {\n    gl.bindRenderbuffer(gl.RENDERBUFFER, fbo._color_rb)\n    gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, fbo._shape[0], fbo._shape[1])\n  }\n  if(fbo.depth) {\n    fbo.depth.shape = fbo._shape\n  }\n  if(fbo._depth_rb) {\n    gl.bindRenderbuffer(gl.RENDERBUFFER, fbo._depth_rb)\n    if(fbo._useDepth && fbo._useStencil) {\n      gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, fbo._shape[0], fbo._shape[1])\n    } else if(fbo._useDepth) {\n      gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, fbo._shape[0], fbo._shape[1])\n    } else if(fbo._useStencil) {\n      gl.renderbufferStorage(gl.RENDERBUFFER, gl.STENCIL_INDEX, fbo._shape[0], fbo._shape[1])\n    }\n  }\n\n  //Check FBO status after resize, if something broke then die in a fire\n  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.handle)\n  var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER)\n  if(status !== gl.FRAMEBUFFER_COMPLETE) {\n    fbo.dispose()\n    restoreFBOState(gl, state)\n    throwFBOError(status)\n  }\n\n  //Restore framebuffer state\n  restoreFBOState(gl, state)\n}\n\nObject.defineProperties(proto, {\n  'shape': {\n    get: function() {\n      if(this._destroyed) {\n        return [0,0]\n      }\n      return this._shapeVector\n    },\n    set: function(x) {\n      if(!Array.isArray(x)) {\n        x = [x|0, x|0]\n      }\n      if(x.length !== 2) {\n        throw new Error('gl-fbo: Shape vector must be length 2')\n      }\n\n      var w = x[0]|0\n      var h = x[1]|0\n      reshapeFBO(this, w, h)\n\n      return [w, h]\n    },\n    enumerable: false\n  },\n  'width': {\n    get: function() {\n      if(this._destroyed) {\n        return 0\n      }\n      return this._shape[0]\n    },\n    set: function(w) {\n      w = w|0\n      reshapeFBO(this, w, this._shape[1])\n      return w\n    },\n    enumerable: false\n  },\n  'height': {\n    get: function() {\n      if(this._destroyed) {\n        return 0\n      }\n      return this._shape[1]\n    },\n    set: function(h) {\n      h = h|0\n      reshapeFBO(this, this._shape[0], h)\n      return h\n    },\n    enumerable: false\n  }\n})\n\nproto.bind = function() {\n  if(this._destroyed) {\n    return\n  }\n  var gl = this.gl\n  gl.bindFramebuffer(gl.FRAMEBUFFER, this.handle)\n  gl.viewport(0, 0, this._shape[0], this._shape[1])\n}\n\nproto.dispose = function() {\n  if(this._destroyed) {\n    return\n  }\n  this._destroyed = true\n  var gl = this.gl\n  gl.deleteFramebuffer(this.handle)\n  this.handle = null\n  if(this.depth) {\n    this.depth.dispose()\n    this.depth = null\n  }\n  if(this._depth_rb) {\n    gl.deleteRenderbuffer(this._depth_rb)\n    this._depth_rb = null\n  }\n  for(var i=0; i<this.color.length; ++i) {\n    this.color[i].dispose()\n    this.color[i] = null\n  }\n  if(this._color_rb) {\n    gl.deleteRenderbuffer(this._color_rb)\n    this._color_rb = null\n  }\n}\n\nfunction createFBO(gl, width, height, options) {\n\n  //Update frame buffer error code values\n  if(!FRAMEBUFFER_UNSUPPORTED) {\n    FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED\n    FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT\n    FRAMEBUFFER_INCOMPLETE_DIMENSIONS = gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS\n    FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\n  }\n\n  //Lazily initialize color attachment arrays\n  var WEBGL_draw_buffers = gl.getExtension('WEBGL_draw_buffers')\n  if(!colorAttachmentArrays && WEBGL_draw_buffers) {\n    lazyInitColorAttachments(gl, WEBGL_draw_buffers)\n  }\n\n  //Special case: Can accept an array as argument\n  if(Array.isArray(width)) {\n    options = height\n    height = width[1]|0\n    width = width[0]|0\n  }\n\n  if(typeof width !== 'number') {\n    throw new Error('gl-fbo: Missing shape parameter')\n  }\n\n  //Validate width/height properties\n  var maxFBOSize = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE)\n  if(width < 0 || width > maxFBOSize || height < 0 || height > maxFBOSize) {\n    throw new Error('gl-fbo: Parameters are too large for FBO')\n  }\n\n  //Handle each option type\n  options = options || {}\n\n  //Figure out number of color buffers to use\n  var numColors = 1\n  if('color' in options) {\n    numColors = Math.max(options.color|0, 0)\n    if(numColors < 0) {\n      throw new Error('gl-fbo: Must specify a nonnegative number of colors')\n    }\n    if(numColors > 1) {\n      //Check if multiple render targets supported\n      if(!WEBGL_draw_buffers) {\n        throw new Error('gl-fbo: Multiple draw buffer extension not supported')\n      } else if(numColors > gl.getParameter(WEBGL_draw_buffers.MAX_COLOR_ATTACHMENTS_WEBGL)) {\n        throw new Error('gl-fbo: Context does not support ' + numColors + ' draw buffers')\n      }\n    }\n  }\n\n  //Determine whether to use floating point textures\n  var colorType = gl.UNSIGNED_BYTE\n  var OES_texture_float = gl.getExtension('OES_texture_float')\n  if(options.float && numColors > 0) {\n    if(!OES_texture_float) {\n      throw new Error('gl-fbo: Context does not support floating point textures')\n    }\n    colorType = gl.FLOAT\n  } else if(options.preferFloat && numColors > 0) {\n    if(OES_texture_float) {\n      colorType = gl.FLOAT\n    }\n  }\n\n  //Check if we should use depth buffer\n  var useDepth = true\n  if('depth' in options) {\n    useDepth = !!options.depth\n  }\n\n  //Check if we should use a stencil buffer\n  var useStencil = false\n  if('stencil' in options) {\n    useStencil = !!options.stencil\n  }\n\n  return new Framebuffer(\n    gl,\n    width,\n    height,\n    colorType,\n    numColors,\n    useDepth,\n    useStencil,\n    WEBGL_draw_buffers)\n}\n\n},{\"gl-texture2d\":317}],249:[function(_dereq_,module,exports){\n\nvar sprintf = _dereq_('sprintf-js').sprintf;\nvar glConstants = _dereq_('gl-constants/lookup');\nvar shaderName = _dereq_('glsl-shader-name');\nvar addLineNumbers = _dereq_('add-line-numbers');\n\nmodule.exports = formatCompilerError;\n\nfunction formatCompilerError(errLog, src, type) {\n    \"use strict\";\n\n    var name = shaderName(src) || 'of unknown name (see npm glsl-shader-name)';\n\n    var typeName = 'unknown type';\n    if (type !== undefined) {\n        typeName = type === glConstants.FRAGMENT_SHADER ? 'fragment' : 'vertex'\n    }\n\n    var longForm = sprintf('Error compiling %s shader %s:\\n', typeName, name);\n    var shortForm = sprintf(\"%s%s\", longForm, errLog);\n\n    var errorStrings = errLog.split('\\n');\n    var errors = {};\n\n    for (var i = 0; i < errorStrings.length; i++) {\n        var errorString = errorStrings[i];\n        if (errorString === '' || errorString === \"\\0\") continue;\n        var lineNo = parseInt(errorString.split(':')[2]);\n        if (isNaN(lineNo)) {\n            throw new Error(sprintf('Could not parse error: %s', errorString));\n        }\n        errors[lineNo] = errorString;\n    }\n\n    var lines = addLineNumbers(src).split('\\n');\n\n    for (var i = 0; i < lines.length; i++) {\n        if (!errors[i+3] && !errors[i+2] && !errors[i+1]) continue;\n        var line = lines[i];\n        longForm += line + '\\n';\n        if (errors[i+1]) {\n            var e = errors[i+1];\n            e = e.substr(e.split(':', 3).join(':').length + 1).trim();\n            longForm += sprintf('^^^ %s\\n\\n', e);\n        }\n    }\n\n    return {\n        long: longForm.trim(),\n        short: shortForm.trim()\n    };\n}\n\n\n},{\"add-line-numbers\":54,\"gl-constants/lookup\":245,\"glsl-shader-name\":396,\"sprintf-js\":515}],250:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createHeatmap2D\n\nvar bsearch = _dereq_('binary-search-bounds')\nvar iota = _dereq_('iota-array')\nvar pool = _dereq_('typedarray-pool')\nvar createShader = _dereq_('gl-shader')\nvar createBuffer = _dereq_('gl-buffer')\n\nvar shaders = _dereq_('./lib/shaders')\n\nfunction GLHeatmap2D (\n  plot,\n  shader,\n  pickShader,\n  positionBuffer,\n  weightBuffer,\n  colorBuffer,\n  idBuffer) {\n  this.plot = plot\n  this.shader = shader\n  this.pickShader = pickShader\n  this.positionBuffer = positionBuffer\n  this.weightBuffer = weightBuffer\n  this.colorBuffer = colorBuffer\n  this.idBuffer = idBuffer\n  this.xData = []\n  this.yData = []\n  this.shape = [0, 0]\n  this.bounds = [Infinity, Infinity, -Infinity, -Infinity]\n  this.pickOffset = 0\n}\n\nvar proto = GLHeatmap2D.prototype\n\nvar WEIGHTS = [\n  0, 0,\n  1, 0,\n  0, 1,\n  1, 0,\n  1, 1,\n  0, 1\n]\n\nproto.draw = (function () {\n  var MATRIX = [\n    1, 0, 0,\n    0, 1, 0,\n    0, 0, 1\n  ]\n\n  return function () {\n    var plot = this.plot\n    var shader = this.shader\n    var bounds = this.bounds\n    var numVertices = this.numVertices\n\n    if (numVertices <= 0) {\n      return\n    }\n\n    var gl = plot.gl\n    var dataBox = plot.dataBox\n\n    var boundX = bounds[2] - bounds[0]\n    var boundY = bounds[3] - bounds[1]\n    var dataX = dataBox[2] - dataBox[0]\n    var dataY = dataBox[3] - dataBox[1]\n\n    MATRIX[0] = 2.0 * boundX / dataX\n    MATRIX[4] = 2.0 * boundY / dataY\n    MATRIX[6] = 2.0 * (bounds[0] - dataBox[0]) / dataX - 1.0\n    MATRIX[7] = 2.0 * (bounds[1] - dataBox[1]) / dataY - 1.0\n\n    shader.bind()\n\n    var uniforms = shader.uniforms\n    uniforms.viewTransform = MATRIX\n\n    uniforms.shape = this.shape\n\n    var attributes = shader.attributes\n    this.positionBuffer.bind()\n    attributes.position.pointer()\n\n    this.weightBuffer.bind()\n    attributes.weight.pointer(gl.UNSIGNED_BYTE, false)\n\n    this.colorBuffer.bind()\n    attributes.color.pointer(gl.UNSIGNED_BYTE, true)\n\n    gl.drawArrays(gl.TRIANGLES, 0, numVertices)\n  }\n})()\n\nproto.drawPick = (function () {\n  var MATRIX = [\n    1, 0, 0,\n    0, 1, 0,\n    0, 0, 1\n  ]\n\n  var PICK_VECTOR = [0, 0, 0, 0]\n\n  return function (pickOffset) {\n    var plot = this.plot\n    var shader = this.pickShader\n    var bounds = this.bounds\n    var numVertices = this.numVertices\n\n    if (numVertices <= 0) {\n      return\n    }\n\n    var gl = plot.gl\n    var dataBox = plot.dataBox\n\n    var boundX = bounds[2] - bounds[0]\n    var boundY = bounds[3] - bounds[1]\n    var dataX = dataBox[2] - dataBox[0]\n    var dataY = dataBox[3] - dataBox[1]\n\n    MATRIX[0] = 2.0 * boundX / dataX\n    MATRIX[4] = 2.0 * boundY / dataY\n    MATRIX[6] = 2.0 * (bounds[0] - dataBox[0]) / dataX - 1.0\n    MATRIX[7] = 2.0 * (bounds[1] - dataBox[1]) / dataY - 1.0\n\n    for (var i = 0; i < 4; ++i) {\n      PICK_VECTOR[i] = (pickOffset >> (i * 8)) & 0xff\n    }\n\n    this.pickOffset = pickOffset\n\n    shader.bind()\n\n    var uniforms = shader.uniforms\n    uniforms.viewTransform = MATRIX\n    uniforms.pickOffset = PICK_VECTOR\n    uniforms.shape = this.shape\n\n    var attributes = shader.attributes\n    this.positionBuffer.bind()\n    attributes.position.pointer()\n\n    this.weightBuffer.bind()\n    attributes.weight.pointer(gl.UNSIGNED_BYTE, false)\n\n    this.idBuffer.bind()\n    attributes.pickId.pointer(gl.UNSIGNED_BYTE, false)\n\n    gl.drawArrays(gl.TRIANGLES, 0, numVertices)\n\n    return pickOffset + this.shape[0] * this.shape[1]\n  }\n})()\n\nproto.pick = function (x, y, value) {\n  var pickOffset = this.pickOffset\n  var pointCount = this.shape[0] * this.shape[1]\n  if (value < pickOffset || value >= pickOffset + pointCount) {\n    return null\n  }\n  var pointId = value - pickOffset\n  var xData = this.xData\n  var yData = this.yData\n  return {\n    object: this,\n    pointId: pointId,\n    dataCoord: [\n      xData[pointId % this.shape[0]],\n      yData[(pointId / this.shape[0]) | 0]]\n  }\n}\n\nproto.update = function (options) {\n  options = options || {}\n\n  var shape = options.shape || [0, 0]\n\n  var x = options.x || iota(shape[0])\n  var y = options.y || iota(shape[1])\n  var z = options.z || new Float32Array(shape[0] * shape[1])\n\n  this.xData = x\n  this.yData = y\n\n  var colorLevels = options.colorLevels || [0]\n  var colorValues = options.colorValues || [0, 0, 0, 1]\n  var colorCount = colorLevels.length\n\n  var bounds = this.bounds\n  var lox = bounds[0] = x[0]\n  var loy = bounds[1] = y[0]\n  var hix = bounds[2] = x[x.length - 1]\n  var hiy = bounds[3] = y[y.length - 1]\n\n  var xs = 1.0 / (hix - lox)\n  var ys = 1.0 / (hiy - loy)\n\n  var numX = shape[0]\n  var numY = shape[1]\n\n  this.shape = [numX, numY]\n\n  var numVerts = (numX - 1) * (numY - 1) * (WEIGHTS.length >>> 1)\n\n  this.numVertices = numVerts\n\n  var colors = pool.mallocUint8(numVerts * 4)\n  var positions = pool.mallocFloat32(numVerts * 2)\n  var weights   = pool.mallocUint8 (numVerts * 2)\n  var ids = pool.mallocUint32(numVerts)\n\n  var ptr = 0\n\n  for (var j = 0; j < numY - 1; ++j) {\n    var yc0 = ys * (y[j] - loy)\n    var yc1 = ys * (y[j + 1] - loy)\n    for (var i = 0; i < numX - 1; ++i) {\n      var xc0 = xs * (x[i] - lox)\n      var xc1 = xs * (x[i + 1] - lox)\n\n      for (var dd = 0; dd < WEIGHTS.length; dd += 2) {\n        var dx = WEIGHTS[dd]\n        var dy = WEIGHTS[dd + 1]\n        var offset = (j + dy) * numX + (i + dx)\n        var zc = z[offset]\n        var colorIdx = bsearch.le(colorLevels, zc)\n        var r, g, b, a\n        if (colorIdx < 0) {\n          r = colorValues[0]\n          g = colorValues[1]\n          b = colorValues[2]\n          a = colorValues[3]\n        } else if (colorIdx === colorCount - 1) {\n          r = colorValues[4 * colorCount - 4]\n          g = colorValues[4 * colorCount - 3]\n          b = colorValues[4 * colorCount - 2]\n          a = colorValues[4 * colorCount - 1]\n        } else {\n          var t = (zc - colorLevels[colorIdx]) /\n            (colorLevels[colorIdx + 1] - colorLevels[colorIdx])\n          var ti = 1.0 - t\n          var i0 = 4 * colorIdx\n          var i1 = 4 * (colorIdx + 1)\n          r = ti * colorValues[i0] + t * colorValues[i1]\n          g = ti * colorValues[i0 + 1] + t * colorValues[i1 + 1]\n          b = ti * colorValues[i0 + 2] + t * colorValues[i1 + 2]\n          a = ti * colorValues[i0 + 3] + t * colorValues[i1 + 3]\n        }\n\n        colors[4 * ptr] = 255 * r\n        colors[4 * ptr + 1] = 255 * g\n        colors[4 * ptr + 2] = 255 * b\n        colors[4 * ptr + 3] = 255 * a\n\n        positions[2*ptr] = xc0*.5 + xc1*.5;\n        positions[2*ptr+1] = yc0*.5 + yc1*.5;\n\n        weights[2*ptr] = dx;\n        weights[2*ptr+1] = dy;\n\n        ids[ptr] = j * numX + i\n\n        ptr += 1\n      }\n    }\n  }\n\n  this.positionBuffer.update(positions)\n  this.weightBuffer.update(weights)\n  this.colorBuffer.update(colors)\n  this.idBuffer.update(ids)\n\n  pool.free(positions)\n  pool.free(colors)\n  pool.free(weights)\n  pool.free(ids)\n}\n\nproto.dispose = function () {\n  this.shader.dispose()\n  this.pickShader.dispose()\n  this.positionBuffer.dispose()\n  this.weightBuffer.dispose()\n  this.colorBuffer.dispose()\n  this.idBuffer.dispose()\n  this.plot.removeObject(this)\n}\n\nfunction createHeatmap2D (plot, options) {\n  var gl = plot.gl\n\n  var shader = createShader(gl, shaders.vertex, shaders.fragment)\n  var pickShader = createShader(gl, shaders.pickVertex, shaders.pickFragment)\n\n  var positionBuffer = createBuffer(gl)\n  var weightBuffer   = createBuffer(gl)\n  var colorBuffer = createBuffer(gl)\n  var idBuffer = createBuffer(gl)\n\n  var heatmap = new GLHeatmap2D(\n    plot,\n    shader,\n    pickShader,\n    positionBuffer,\n    weightBuffer,\n    colorBuffer,\n    idBuffer)\n\n  heatmap.update(options)\n  plot.addObject(heatmap)\n\n  return heatmap\n}\n\n},{\"./lib/shaders\":251,\"binary-search-bounds\":252,\"gl-buffer\":240,\"gl-shader\":300,\"iota-array\":411,\"typedarray-pool\":532}],251:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify = _dereq_('glslify')\n\nmodule.exports = {\n  fragment:     glslify([\"precision lowp float;\\n#define GLSLIFY 1\\nvarying vec4 fragColor;\\nvoid main() {\\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\n}\\n\"]),\n  vertex:       glslify([\"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\"]),\n  pickFragment: glslify([\"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\"]),\n  pickVertex:   glslify([\"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\"])\n}\n\n},{\"glslify\":404}],252:[function(_dereq_,module,exports){\narguments[4][104][0].apply(exports,arguments)\n},{\"dup\":104}],253:[function(_dereq_,module,exports){\nvar glslify       = _dereq_('glslify')\nvar createShader  = _dereq_('gl-shader')\n\nvar vertSrc = glslify([\"precision highp 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\\nvec4 project(vec3 p) {\\n  return projection * view * model * vec4(p, 1.0);\\n}\\n\\nvoid main() {\\n  vec4 startPoint = project(position);\\n  vec4 endPoint   = project(nextPosition);\\n\\n  vec2 A = startPoint.xy / startPoint.w;\\n  vec2 B =   endPoint.xy /   endPoint.w;\\n\\n  float clipAngle = atan(\\n    (B.y - A.y) * screenShape.y,\\n    (B.x - A.x) * screenShape.x\\n  );\\n\\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\\n    sin(clipAngle),\\n    -cos(clipAngle)\\n  ) / screenShape;\\n\\n  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\\n\\n  worldPosition = position;\\n  pixelArcLength = arcLength;\\n  fragColor = color;\\n}\\n\"])\nvar forwardFrag = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (\\n    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\\n    fragColor.a * opacity == 0.\\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\"])\nvar pickFrag = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\n#define FLOAT_MAX  1.70141184e38\\n#define FLOAT_MIN  1.17549435e-38\\n\\nlowp vec4 encode_float_1540259130(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\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform float pickId;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec3 worldPosition;\\nvarying float pixelArcLength;\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\n\\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\\n}\"])\n\nvar ATTRIBUTES = [\n  {name: 'position', type: 'vec3'},\n  {name: 'nextPosition', type: 'vec3'},\n  {name: 'arcLength', type: 'float'},\n  {name: 'lineWidth', type: 'float'},\n  {name: 'color', type: 'vec4'}\n]\n\nexports.createShader = function(gl) {\n  return createShader(gl, vertSrc, forwardFrag, null, ATTRIBUTES)\n}\n\nexports.createPickShader = function(gl) {\n  return createShader(gl, vertSrc, pickFrag, null, ATTRIBUTES)\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],254:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createLinePlot\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createVAO = _dereq_('gl-vao')\nvar createTexture = _dereq_('gl-texture2d')\nvar unpackFloat = _dereq_('glsl-read-float')\nvar bsearch = _dereq_('binary-search-bounds')\nvar ndarray = _dereq_('ndarray')\nvar shaders = _dereq_('./lib/shaders')\n\nvar createShader = shaders.createShader\nvar createPickShader = shaders.createPickShader\n\nvar identity = [1, 0, 0, 0,\n  0, 1, 0, 0,\n  0, 0, 1, 0,\n  0, 0, 0, 1]\n\nfunction distance (a, b) {\n  var s = 0.0\n  for (var i = 0; i < 3; ++i) {\n    var d = a[i] - b[i]\n    s += d * d\n  }\n  return Math.sqrt(s)\n}\n\nfunction filterClipBounds (bounds) {\n  var result = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]]\n  for (var i = 0; i < 3; ++i) {\n    result[0][i] = Math.max(bounds[0][i], result[0][i])\n    result[1][i] = Math.min(bounds[1][i], result[1][i])\n  }\n  return result\n}\n\nfunction PickResult (tau, position, index, dataCoordinate) {\n  this.arcLength = tau\n  this.position = position\n  this.index = index\n  this.dataCoordinate = dataCoordinate\n}\n\nfunction LinePlot (gl, shader, pickShader, buffer, vao, texture) {\n  this.gl = gl\n  this.shader = shader\n  this.pickShader = pickShader\n  this.buffer = buffer\n  this.vao = vao\n  this.clipBounds = [\n    [ -Infinity, -Infinity, -Infinity ],\n    [ Infinity, Infinity, Infinity ]]\n  this.points = []\n  this.arcLength = []\n  this.vertexCount = 0\n  this.bounds = [[0, 0, 0], [0, 0, 0]]\n  this.pickId = 0\n  this.lineWidth = 1\n  this.texture = texture\n  this.dashScale = 1\n  this.opacity = 1\n  this.hasAlpha = false\n  this.dirty = true\n  this.pixelRatio = 1\n}\n\nvar proto = LinePlot.prototype\n\nproto.isTransparent = function () {\n  return this.hasAlpha\n}\n\nproto.isOpaque = function () {\n  return !this.hasAlpha\n}\n\nproto.pickSlots = 1\n\nproto.setPickBase = function (id) {\n  this.pickId = id\n}\n\nproto.drawTransparent = proto.draw = function (camera) {\n  if (!this.vertexCount) return\n  var gl = this.gl\n  var shader = this.shader\n  var vao = this.vao\n  shader.bind()\n  shader.uniforms = {\n    model: camera.model || identity,\n    view: camera.view || identity,\n    projection: camera.projection || identity,\n    clipBounds: filterClipBounds(this.clipBounds),\n    dashTexture: this.texture.bind(),\n    dashScale: this.dashScale / this.arcLength[this.arcLength.length - 1],\n    opacity: this.opacity,\n    screenShape: [gl.drawingBufferWidth, gl.drawingBufferHeight],\n    pixelRatio: this.pixelRatio\n  }\n  vao.bind()\n  vao.draw(gl.TRIANGLE_STRIP, this.vertexCount)\n  vao.unbind()\n}\n\nproto.drawPick = function (camera) {\n  if (!this.vertexCount) return\n  var gl = this.gl\n  var shader = this.pickShader\n  var vao = this.vao\n  shader.bind()\n  shader.uniforms = {\n    model: camera.model || identity,\n    view: camera.view || identity,\n    projection: camera.projection || identity,\n    pickId: this.pickId,\n    clipBounds: filterClipBounds(this.clipBounds),\n    screenShape: [gl.drawingBufferWidth, gl.drawingBufferHeight],\n    pixelRatio: this.pixelRatio\n  }\n  vao.bind()\n  vao.draw(gl.TRIANGLE_STRIP, this.vertexCount)\n  vao.unbind()\n}\n\nproto.update = function (options) {\n  var i, j\n\n  this.dirty = true\n\n  var connectGaps = !!options.connectGaps\n\n  if ('dashScale' in options) {\n    this.dashScale = options.dashScale\n  }\n\n  this.hasAlpha = false // default to no transparent draw\n  if ('opacity' in options) {\n    this.opacity = +options.opacity\n    if(this.opacity < 1) {\n      this.hasAlpha = true;\n    }\n  }\n\n  // Recalculate buffer data\n  var buffer = []\n  var arcLengthArray = []\n  var pointArray = []\n  var arcLength = 0.0\n  var vertexCount = 0\n  var bounds = [\n    [ Infinity, Infinity, Infinity ],\n    [ -Infinity, -Infinity, -Infinity ]]\n\n  var positions = options.position || options.positions\n  if (positions) {\n\n    // Default color\n    var colors = options.color || options.colors || [0, 0, 0, 1]\n\n    var lineWidth = options.lineWidth || 1\n\n    var hadGap = false\n\n    fill_loop:\n    for (i = 1; i < positions.length; ++i) {\n      var a = positions[i - 1]\n      var b = positions[i]\n\n      arcLengthArray.push(arcLength)\n      pointArray.push(a.slice())\n\n      for (j = 0; j < 3; ++j) {\n        if (isNaN(a[j]) || isNaN(b[j]) ||\n          !isFinite(a[j]) || !isFinite(b[j])) {\n\n          if (!connectGaps && buffer.length > 0) {\n            for (var k = 0; k < 24; ++k) {\n              buffer.push(buffer[buffer.length - 12])\n            }\n            vertexCount += 2\n            hadGap = true\n          }\n\n          continue fill_loop\n        }\n        bounds[0][j] = Math.min(bounds[0][j], a[j], b[j])\n        bounds[1][j] = Math.max(bounds[1][j], a[j], b[j])\n      }\n\n      var acolor, bcolor\n      if (Array.isArray(colors[0])) {\n        acolor = (colors.length > i - 1) ? colors[i - 1] :             // using index value\n                 (colors.length > 0)     ? colors[colors.length - 1] : // using last item\n                                           [0, 0, 0, 1];               // using black\n\n        bcolor = (colors.length > i) ? colors[i] :                 // using index value\n                 (colors.length > 0) ? colors[colors.length - 1] : // using last item\n                                       [0, 0, 0, 1];               // using black\n      } else {\n        acolor = bcolor = colors\n      }\n\n      if (acolor.length === 3) {\n        acolor = [acolor[0], acolor[1], acolor[2], 1]\n      }\n      if (bcolor.length === 3) {\n        bcolor = [bcolor[0], bcolor[1], bcolor[2], 1]\n      }\n\n      if(!this.hasAlpha && acolor[3] < 1) this.hasAlpha = true\n\n      var w0\n      if (Array.isArray(lineWidth)) {\n        w0 = (lineWidth.length > i - 1) ? lineWidth[i - 1] :                // using index value\n             (lineWidth.length > 0)     ? lineWidth[lineWidth.length - 1] : // using last item\n                                          [0, 0, 0, 1];                     // using black\n      } else {\n        w0 = lineWidth\n      }\n\n      var t0 = arcLength\n      arcLength += distance(a, b)\n\n      if (hadGap) {\n        for (j = 0; j < 2; ++j) {\n          buffer.push(\n            a[0], a[1], a[2], b[0], b[1], b[2], t0, w0, acolor[0], acolor[1], acolor[2], acolor[3])\n        }\n        vertexCount += 2\n        hadGap = false\n      }\n\n      buffer.push(\n        a[0], a[1], a[2], b[0], b[1], b[2], t0, w0, acolor[0], acolor[1], acolor[2], acolor[3],\n        a[0], a[1], a[2], b[0], b[1], b[2], t0, -w0, acolor[0], acolor[1], acolor[2], acolor[3],\n        b[0], b[1], b[2], a[0], a[1], a[2], arcLength, -w0, bcolor[0], bcolor[1], bcolor[2], bcolor[3],\n        b[0], b[1], b[2], a[0], a[1], a[2], arcLength, w0, bcolor[0], bcolor[1], bcolor[2], bcolor[3])\n\n      vertexCount += 4\n    }\n  }\n  this.buffer.update(buffer)\n\n  arcLengthArray.push(arcLength)\n  pointArray.push(positions[positions.length - 1].slice())\n\n  this.bounds = bounds\n\n  this.vertexCount = vertexCount\n\n  this.points = pointArray\n  this.arcLength = arcLengthArray\n\n  if ('dashes' in options) {\n    var dashArray = options.dashes\n\n    // Calculate prefix sum\n    var prefixSum = dashArray.slice()\n    prefixSum.unshift(0)\n    for (i = 1; i < prefixSum.length; ++i) {\n      prefixSum[i] = prefixSum[i - 1] + prefixSum[i]\n    }\n\n    var dashTexture = ndarray(new Array(256 * 4), [256, 1, 4])\n    for (i = 0; i < 256; ++i) {\n      for (j = 0; j < 4; ++j) {\n        dashTexture.set(i, 0, j, 0)\n      }\n      if (bsearch.le(prefixSum, prefixSum[prefixSum.length - 1] * i / 255.0) & 1) {\n        dashTexture.set(i, 0, 0, 0)\n      } else {\n        dashTexture.set(i, 0, 0, 255)\n      }\n    }\n\n    this.texture.setPixels(dashTexture)\n  }\n}\n\nproto.dispose = function () {\n  this.shader.dispose()\n  this.vao.dispose()\n  this.buffer.dispose()\n}\n\nproto.pick = function (selection) {\n  if (!selection) {\n    return null\n  }\n  if (selection.id !== this.pickId) {\n    return null\n  }\n  var tau = unpackFloat(\n    selection.value[0],\n    selection.value[1],\n    selection.value[2],\n    0)\n  var index = bsearch.le(this.arcLength, tau)\n  if (index < 0) {\n    return null\n  }\n  if (index === this.arcLength.length - 1) {\n    return new PickResult(\n      this.arcLength[this.arcLength.length - 1],\n      this.points[this.points.length - 1].slice(),\n      index)\n  }\n  var a = this.points[index]\n  var b = this.points[Math.min(index + 1, this.points.length - 1)]\n  var t = (tau - this.arcLength[index]) / (this.arcLength[index + 1] - this.arcLength[index])\n  var ti = 1.0 - t\n  var x = [0, 0, 0]\n  for (var i = 0; i < 3; ++i) {\n    x[i] = ti * a[i] + t * b[i]\n  }\n  var dataIndex = Math.min((t < 0.5) ? index : (index + 1), this.points.length - 1)\n  return new PickResult(\n    tau,\n    x,\n    dataIndex,\n    this.points[dataIndex])\n}\n\nfunction createLinePlot (options) {\n  var gl = options.gl || (options.scene && options.scene.gl)\n\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n  shader.attributes.nextPosition.location = 1\n  shader.attributes.arcLength.location = 2\n  shader.attributes.lineWidth.location = 3\n  shader.attributes.color.location = 4\n\n  var pickShader = createPickShader(gl)\n  pickShader.attributes.position.location = 0\n  pickShader.attributes.nextPosition.location = 1\n  pickShader.attributes.arcLength.location = 2\n  pickShader.attributes.lineWidth.location = 3\n  pickShader.attributes.color.location = 4\n\n  var buffer = createBuffer(gl)\n  var vao = createVAO(gl, [\n    {\n      'buffer': buffer,\n      'size': 3,\n      'offset': 0,\n      'stride': 48\n    },\n    {\n      'buffer': buffer,\n      'size': 3,\n      'offset': 12,\n      'stride': 48\n    },\n    {\n      'buffer': buffer,\n      'size': 1,\n      'offset': 24,\n      'stride': 48\n    },\n    {\n      'buffer': buffer,\n      'size': 1,\n      'offset': 28,\n      'stride': 48\n    },\n    {\n      'buffer': buffer,\n      'size': 4,\n      'offset': 32,\n      'stride': 48\n    }\n  ])\n\n  // Create texture for dash pattern\n  var defaultTexture = ndarray(new Array(256 * 4), [256, 1, 4])\n  for (var i = 0; i < 256 * 4; ++i) {\n    defaultTexture.data[i] = 255\n  }\n  var texture = createTexture(gl, defaultTexture)\n  texture.wrap = gl.REPEAT\n\n  var linePlot = new LinePlot(gl, shader, pickShader, buffer, vao, texture)\n  linePlot.update(options)\n  return linePlot\n}\n\n},{\"./lib/shaders\":253,\"binary-search-bounds\":255,\"gl-buffer\":240,\"gl-texture2d\":317,\"gl-vao\":322,\"glsl-read-float\":395,\"ndarray\":445}],255:[function(_dereq_,module,exports){\narguments[4][104][0].apply(exports,arguments)\n},{\"dup\":104}],256:[function(_dereq_,module,exports){\nmodule.exports = invert\n\n/**\n * Inverts a mat2\n *\n * @alias mat2.invert\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nfunction invert(out, a) {\n  var a0 = a[0]\n  var a1 = a[1]\n  var a2 = a[2]\n  var a3 = a[3]\n  var det = a0 * a3 - a2 * a1\n\n  if (!det) return null\n  det = 1.0 / det\n\n  out[0] =  a3 * det\n  out[1] = -a1 * det\n  out[2] = -a2 * det\n  out[3] =  a0 * det\n\n  return out\n}\n\n},{}],257:[function(_dereq_,module,exports){\nmodule.exports = invert\n\n/**\n * Inverts a mat3\n *\n * @alias mat3.invert\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nfunction invert(out, a) {\n  var a00 = a[0], a01 = a[1], a02 = a[2]\n  var a10 = a[3], a11 = a[4], a12 = a[5]\n  var a20 = a[6], a21 = a[7], a22 = a[8]\n\n  var b01 = a22 * a11 - a12 * a21\n  var b11 = -a22 * a10 + a12 * a20\n  var b21 = a21 * a10 - a11 * a20\n\n  // Calculate the determinant\n  var det = a00 * b01 + a01 * b11 + a02 * b21\n\n  if (!det) return null\n  det = 1.0 / det\n\n  out[0] = b01 * det\n  out[1] = (-a22 * a01 + a02 * a21) * det\n  out[2] = (a12 * a01 - a02 * a11) * det\n  out[3] = b11 * det\n  out[4] = (a22 * a00 - a02 * a20) * det\n  out[5] = (-a12 * a00 + a02 * a10) * det\n  out[6] = b21 * det\n  out[7] = (-a21 * a00 + a01 * a20) * det\n  out[8] = (a11 * a00 - a01 * a10) * det\n\n  return out\n}\n\n},{}],258:[function(_dereq_,module,exports){\nmodule.exports = clone;\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nfunction clone(a) {\n    var out = new Float32Array(16);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    out[9] = a[9];\n    out[10] = a[10];\n    out[11] = a[11];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n    return out;\n};\n},{}],259:[function(_dereq_,module,exports){\nmodule.exports = create;\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nfunction create() {\n    var out = new Float32Array(16);\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n    return out;\n};\n},{}],260:[function(_dereq_,module,exports){\nmodule.exports = determinant;\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\nfunction determinant(a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n        b00 = a00 * a11 - a01 * a10,\n        b01 = a00 * a12 - a02 * a10,\n        b02 = a00 * a13 - a03 * a10,\n        b03 = a01 * a12 - a02 * a11,\n        b04 = a01 * a13 - a03 * a11,\n        b05 = a02 * a13 - a03 * a12,\n        b06 = a20 * a31 - a21 * a30,\n        b07 = a20 * a32 - a22 * a30,\n        b08 = a20 * a33 - a23 * a30,\n        b09 = a21 * a32 - a22 * a31,\n        b10 = a21 * a33 - a23 * a31,\n        b11 = a22 * a33 - a23 * a32;\n\n    // Calculate the determinant\n    return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n};\n},{}],261:[function(_dereq_,module,exports){\nmodule.exports = fromQuat;\n\n/**\n * Creates a matrix from a quaternion rotation.\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @returns {mat4} out\n */\nfunction fromQuat(out, q) {\n    var x = q[0], y = q[1], z = q[2], w = q[3],\n        x2 = x + x,\n        y2 = y + y,\n        z2 = z + z,\n\n        xx = x * x2,\n        yx = y * x2,\n        yy = y * y2,\n        zx = z * x2,\n        zy = z * y2,\n        zz = z * z2,\n        wx = w * x2,\n        wy = w * y2,\n        wz = w * z2;\n\n    out[0] = 1 - yy - zz;\n    out[1] = yx + wz;\n    out[2] = zx - wy;\n    out[3] = 0;\n\n    out[4] = yx - wz;\n    out[5] = 1 - xx - zz;\n    out[6] = zy + wx;\n    out[7] = 0;\n\n    out[8] = zx + wy;\n    out[9] = zy - wx;\n    out[10] = 1 - xx - yy;\n    out[11] = 0;\n\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n\n    return out;\n};\n},{}],262:[function(_dereq_,module,exports){\nmodule.exports = fromRotationTranslation;\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n *     mat4.identity(dest);\n *     mat4.translate(dest, vec);\n *     var quatMat = mat4.create();\n *     quat4.toMat4(quat, quatMat);\n *     mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\nfunction fromRotationTranslation(out, q, v) {\n    // Quaternion math\n    var x = q[0], y = q[1], z = q[2], w = q[3],\n        x2 = x + x,\n        y2 = y + y,\n        z2 = z + z,\n\n        xx = x * x2,\n        xy = x * y2,\n        xz = x * z2,\n        yy = y * y2,\n        yz = y * z2,\n        zz = z * z2,\n        wx = w * x2,\n        wy = w * y2,\n        wz = w * z2;\n\n    out[0] = 1 - (yy + zz);\n    out[1] = xy + wz;\n    out[2] = xz - wy;\n    out[3] = 0;\n    out[4] = xy - wz;\n    out[5] = 1 - (xx + zz);\n    out[6] = yz + wx;\n    out[7] = 0;\n    out[8] = xz + wy;\n    out[9] = yz - wx;\n    out[10] = 1 - (xx + yy);\n    out[11] = 0;\n    out[12] = v[0];\n    out[13] = v[1];\n    out[14] = v[2];\n    out[15] = 1;\n    \n    return out;\n};\n},{}],263:[function(_dereq_,module,exports){\nmodule.exports = identity;\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nfunction identity(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n    return out;\n};\n},{}],264:[function(_dereq_,module,exports){\nmodule.exports = invert;\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nfunction invert(out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n        b00 = a00 * a11 - a01 * a10,\n        b01 = a00 * a12 - a02 * a10,\n        b02 = a00 * a13 - a03 * a10,\n        b03 = a01 * a12 - a02 * a11,\n        b04 = a01 * a13 - a03 * a11,\n        b05 = a02 * a13 - a03 * a12,\n        b06 = a20 * a31 - a21 * a30,\n        b07 = a20 * a32 - a22 * a30,\n        b08 = a20 * a33 - a23 * a30,\n        b09 = a21 * a32 - a22 * a31,\n        b10 = a21 * a33 - a23 * a31,\n        b11 = a22 * a33 - a23 * a32,\n\n        // Calculate the determinant\n        det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n    if (!det) { \n        return null; \n    }\n    det = 1.0 / det;\n\n    out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n    out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n    out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n    out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n    out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n    out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n    out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n    out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n    out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n    out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n    out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n    out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n    out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n    out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n    out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n    out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n    return out;\n};\n},{}],265:[function(_dereq_,module,exports){\nvar identity = _dereq_('./identity');\n\nmodule.exports = lookAt;\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\nfunction lookAt(out, eye, center, up) {\n    var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n        eyex = eye[0],\n        eyey = eye[1],\n        eyez = eye[2],\n        upx = up[0],\n        upy = up[1],\n        upz = up[2],\n        centerx = center[0],\n        centery = center[1],\n        centerz = center[2];\n\n    if (Math.abs(eyex - centerx) < 0.000001 &&\n        Math.abs(eyey - centery) < 0.000001 &&\n        Math.abs(eyez - centerz) < 0.000001) {\n        return identity(out);\n    }\n\n    z0 = eyex - centerx;\n    z1 = eyey - centery;\n    z2 = eyez - centerz;\n\n    len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n    z0 *= len;\n    z1 *= len;\n    z2 *= len;\n\n    x0 = upy * z2 - upz * z1;\n    x1 = upz * z0 - upx * z2;\n    x2 = upx * z1 - upy * z0;\n    len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n    if (!len) {\n        x0 = 0;\n        x1 = 0;\n        x2 = 0;\n    } else {\n        len = 1 / len;\n        x0 *= len;\n        x1 *= len;\n        x2 *= len;\n    }\n\n    y0 = z1 * x2 - z2 * x1;\n    y1 = z2 * x0 - z0 * x2;\n    y2 = z0 * x1 - z1 * x0;\n\n    len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n    if (!len) {\n        y0 = 0;\n        y1 = 0;\n        y2 = 0;\n    } else {\n        len = 1 / len;\n        y0 *= len;\n        y1 *= len;\n        y2 *= len;\n    }\n\n    out[0] = x0;\n    out[1] = y0;\n    out[2] = z0;\n    out[3] = 0;\n    out[4] = x1;\n    out[5] = y1;\n    out[6] = z1;\n    out[7] = 0;\n    out[8] = x2;\n    out[9] = y2;\n    out[10] = z2;\n    out[11] = 0;\n    out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n    out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n    out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n    out[15] = 1;\n\n    return out;\n};\n},{\"./identity\":263}],266:[function(_dereq_,module,exports){\nmodule.exports = multiply;\n\n/**\n * Multiplies two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\nfunction multiply(out, a, b) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n    // Cache only the current line of the second matrix\n    var b0  = b[0], b1 = b[1], b2 = b[2], b3 = b[3];  \n    out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n    out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n    out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n    out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n    return out;\n};\n},{}],267:[function(_dereq_,module,exports){\nmodule.exports = ortho;\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nfunction ortho(out, left, right, bottom, top, near, far) {\n    var lr = 1 / (left - right),\n        bt = 1 / (bottom - top),\n        nf = 1 / (near - far);\n    out[0] = -2 * lr;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = -2 * bt;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 2 * nf;\n    out[11] = 0;\n    out[12] = (left + right) * lr;\n    out[13] = (top + bottom) * bt;\n    out[14] = (far + near) * nf;\n    out[15] = 1;\n    return out;\n};\n},{}],268:[function(_dereq_,module,exports){\nmodule.exports = perspective;\n\n/**\n * Generates a perspective projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nfunction perspective(out, fovy, aspect, near, far) {\n    var f = 1.0 / Math.tan(fovy / 2),\n        nf = 1 / (near - far);\n    out[0] = f / aspect;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = f;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = (far + near) * nf;\n    out[11] = -1;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = (2 * far * near) * nf;\n    out[15] = 0;\n    return out;\n};\n},{}],269:[function(_dereq_,module,exports){\nmodule.exports = rotate;\n\n/**\n * Rotates a mat4 by the given angle\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nfunction rotate(out, a, rad, axis) {\n    var x = axis[0], y = axis[1], z = axis[2],\n        len = Math.sqrt(x * x + y * y + z * z),\n        s, c, t,\n        a00, a01, a02, a03,\n        a10, a11, a12, a13,\n        a20, a21, a22, a23,\n        b00, b01, b02,\n        b10, b11, b12,\n        b20, b21, b22;\n\n    if (Math.abs(len) < 0.000001) { return null; }\n    \n    len = 1 / len;\n    x *= len;\n    y *= len;\n    z *= len;\n\n    s = Math.sin(rad);\n    c = Math.cos(rad);\n    t = 1 - c;\n\n    a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n    a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n    a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n    // Construct the elements of the rotation matrix\n    b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n    b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n    b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\n    // Perform rotation-specific matrix multiplication\n    out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n    out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n    out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n    out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n    out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n    out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n    out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n    out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n    out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n    out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n    out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n    out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged last row\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n    return out;\n};\n},{}],270:[function(_dereq_,module,exports){\nmodule.exports = rotateX;\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nfunction rotateX(out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a10 = a[4],\n        a11 = a[5],\n        a12 = a[6],\n        a13 = a[7],\n        a20 = a[8],\n        a21 = a[9],\n        a22 = a[10],\n        a23 = a[11];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged rows\n        out[0]  = a[0];\n        out[1]  = a[1];\n        out[2]  = a[2];\n        out[3]  = a[3];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[4] = a10 * c + a20 * s;\n    out[5] = a11 * c + a21 * s;\n    out[6] = a12 * c + a22 * s;\n    out[7] = a13 * c + a23 * s;\n    out[8] = a20 * c - a10 * s;\n    out[9] = a21 * c - a11 * s;\n    out[10] = a22 * c - a12 * s;\n    out[11] = a23 * c - a13 * s;\n    return out;\n};\n},{}],271:[function(_dereq_,module,exports){\nmodule.exports = rotateY;\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nfunction rotateY(out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a00 = a[0],\n        a01 = a[1],\n        a02 = a[2],\n        a03 = a[3],\n        a20 = a[8],\n        a21 = a[9],\n        a22 = a[10],\n        a23 = a[11];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged rows\n        out[4]  = a[4];\n        out[5]  = a[5];\n        out[6]  = a[6];\n        out[7]  = a[7];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[0] = a00 * c - a20 * s;\n    out[1] = a01 * c - a21 * s;\n    out[2] = a02 * c - a22 * s;\n    out[3] = a03 * c - a23 * s;\n    out[8] = a00 * s + a20 * c;\n    out[9] = a01 * s + a21 * c;\n    out[10] = a02 * s + a22 * c;\n    out[11] = a03 * s + a23 * c;\n    return out;\n};\n},{}],272:[function(_dereq_,module,exports){\nmodule.exports = rotateZ;\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nfunction rotateZ(out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a00 = a[0],\n        a01 = a[1],\n        a02 = a[2],\n        a03 = a[3],\n        a10 = a[4],\n        a11 = a[5],\n        a12 = a[6],\n        a13 = a[7];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged last row\n        out[8]  = a[8];\n        out[9]  = a[9];\n        out[10] = a[10];\n        out[11] = a[11];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[0] = a00 * c + a10 * s;\n    out[1] = a01 * c + a11 * s;\n    out[2] = a02 * c + a12 * s;\n    out[3] = a03 * c + a13 * s;\n    out[4] = a10 * c - a00 * s;\n    out[5] = a11 * c - a01 * s;\n    out[6] = a12 * c - a02 * s;\n    out[7] = a13 * c - a03 * s;\n    return out;\n};\n},{}],273:[function(_dereq_,module,exports){\nmodule.exports = scale;\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nfunction scale(out, a, v) {\n    var x = v[0], y = v[1], z = v[2];\n\n    out[0] = a[0] * x;\n    out[1] = a[1] * x;\n    out[2] = a[2] * x;\n    out[3] = a[3] * x;\n    out[4] = a[4] * y;\n    out[5] = a[5] * y;\n    out[6] = a[6] * y;\n    out[7] = a[7] * y;\n    out[8] = a[8] * z;\n    out[9] = a[9] * z;\n    out[10] = a[10] * z;\n    out[11] = a[11] * z;\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n    return out;\n};\n},{}],274:[function(_dereq_,module,exports){\nmodule.exports = translate;\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\nfunction translate(out, a, v) {\n    var x = v[0], y = v[1], z = v[2],\n        a00, a01, a02, a03,\n        a10, a11, a12, a13,\n        a20, a21, a22, a23;\n\n    if (a === out) {\n        out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n        out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n        out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n        out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n    } else {\n        a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n        a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n        a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n        out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n        out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n        out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\n        out[12] = a00 * x + a10 * y + a20 * z + a[12];\n        out[13] = a01 * x + a11 * y + a21 * z + a[13];\n        out[14] = a02 * x + a12 * y + a22 * z + a[14];\n        out[15] = a03 * x + a13 * y + a23 * z + a[15];\n    }\n\n    return out;\n};\n},{}],275:[function(_dereq_,module,exports){\nmodule.exports = transpose;\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nfunction transpose(out, a) {\n    // If we are transposing ourselves we can skip a few steps but have to cache some values\n    if (out === a) {\n        var a01 = a[1], a02 = a[2], a03 = a[3],\n            a12 = a[6], a13 = a[7],\n            a23 = a[11];\n\n        out[1] = a[4];\n        out[2] = a[8];\n        out[3] = a[12];\n        out[4] = a01;\n        out[6] = a[9];\n        out[7] = a[13];\n        out[8] = a02;\n        out[9] = a12;\n        out[11] = a[14];\n        out[12] = a03;\n        out[13] = a13;\n        out[14] = a23;\n    } else {\n        out[0] = a[0];\n        out[1] = a[4];\n        out[2] = a[8];\n        out[3] = a[12];\n        out[4] = a[1];\n        out[5] = a[5];\n        out[6] = a[9];\n        out[7] = a[13];\n        out[8] = a[2];\n        out[9] = a[6];\n        out[10] = a[10];\n        out[11] = a[14];\n        out[12] = a[3];\n        out[13] = a[7];\n        out[14] = a[11];\n        out[15] = a[15];\n    }\n    \n    return out;\n};\n},{}],276:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = invert\n\nvar invert2 = _dereq_('gl-mat2/invert')\nvar invert3 = _dereq_('gl-mat3/invert')\nvar invert4 = _dereq_('gl-mat4/invert')\n\nfunction invert(out, M) {\n  switch(M.length) {\n    case 0:\n    break\n    case 1:\n      out[0] = 1.0 / M[0]\n    break\n    case 4:\n      invert2(out, M)\n    break\n    case 9:\n      invert3(out, M)\n    break\n    case 16:\n      invert4(out, M)\n    break\n    default:\n      throw new Error('currently supports matrices up to 4x4')\n    break\n  }\n  return out\n}\n},{\"gl-mat2/invert\":256,\"gl-mat3/invert\":257,\"gl-mat4/invert\":264}],277:[function(_dereq_,module,exports){\n'use strict'\n\nvar barycentric            = _dereq_('barycentric')\nvar closestPointToTriangle = _dereq_('polytope-closest-point/lib/closest_point_2d.js')\n\nmodule.exports = closestPointToPickLocation\n\nfunction xformMatrix(m, v) {\n  var out = [0,0,0,0]\n  for(var i=0; i<4; ++i) {\n    for(var j=0; j<4; ++j) {\n      out[j] += m[4*i + j] * v[i]\n    }\n  }\n  return out\n}\n\nfunction projectVertex(v, model, view, projection, resolution) {\n  var p = xformMatrix(projection,\n            xformMatrix(view,\n              xformMatrix(model, [v[0], v[1], v[2], 1])))\n  for(var i=0; i<3; ++i) {\n    p[i] /= p[3]\n  }\n  return [ 0.5 * resolution[0] * (1.0+p[0]), 0.5 * resolution[1] * (1.0-p[1]) ]\n}\n\nfunction barycentricCoord(simplex, point) {\n  if(simplex.length === 2) {\n    var d0 = 0.0\n    var d1 = 0.0\n    for(var i=0; i<2; ++i) {\n      d0 += Math.pow(point[i] - simplex[0][i], 2)\n      d1 += Math.pow(point[i] - simplex[1][i], 2)\n    }\n    d0 = Math.sqrt(d0)\n    d1 = Math.sqrt(d1)\n    if(d0+d1 < 1e-6) {\n      return [1,0]\n    }\n    return [d1/(d0+d1),d0/(d1+d0)]\n  } else if(simplex.length === 3) {\n    var closestPoint = [0,0]\n    closestPointToTriangle(simplex[0], simplex[1], simplex[2], point, closestPoint)\n    return barycentric(simplex, closestPoint)\n  }\n  return []\n}\n\nfunction interpolate(simplex, weights) {\n  var result = [0,0,0]\n  for(var i=0; i<simplex.length; ++i) {\n    var p = simplex[i]\n    var w = weights[i]\n    for(var j=0; j<3; ++j) {\n      result[j] += w * p[j]\n    }\n  }\n  return result\n}\n\nfunction closestPointToPickLocation(simplex, pixelCoord, model, view, projection, resolution) {\n  if(simplex.length === 1) {\n    return [0, simplex[0].slice()]\n  }\n  var simplex2D = new Array(simplex.length)\n  for(var i=0; i<simplex.length; ++i) {\n    simplex2D[i] = projectVertex(simplex[i], model, view, projection, resolution);\n  }\n\n  var closestIndex = 0\n  var closestDist  = Infinity\n  for(var i=0; i<simplex2D.length; ++i) {\n    var d2 = 0.0\n    for(var j=0; j<2; ++j) {\n      d2 += Math.pow(simplex2D[i][j] - pixelCoord[j], 2)\n    }\n    if(d2 < closestDist) {\n      closestDist  = d2\n      closestIndex = i\n    }\n  }\n\n  var weights = barycentricCoord(simplex2D, pixelCoord)\n  var s = 0.0\n  for(var i=0; i<3; ++i) {\n    if(weights[i] < -0.001 ||\n       weights[i] > 1.0001) {\n      return null\n    }\n    s += weights[i]\n  }\n  if(Math.abs(s - 1.0) > 0.001) {\n    return null\n  }\n  return [closestIndex, interpolate(simplex, weights), weights]\n}\n},{\"barycentric\":66,\"polytope-closest-point/lib/closest_point_2d.js\":476}],278:[function(_dereq_,module,exports){\nvar glslify       = _dereq_('glslify')\n\nvar triVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, normal;\\nattribute vec4 color;\\nattribute vec2 uv;\\n\\nuniform mat4 model\\n           , view\\n           , projection\\n           , inverseModel;\\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\\nvec4 project(vec3 p) {\\n  return projection * view * model * vec4(p, 1.0);\\n}\\n\\nvoid main() {\\n  gl_Position      = project(position);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * vec4(position , 1.0);\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);\\n\\n  f_color          = color;\\n  f_data           = position;\\n  f_uv             = uv;\\n}\\n\"])\nvar triFragSrc = glslify([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(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\\nfloat cookTorranceSpecular(\\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(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//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float roughness\\n            , fresnel\\n            , kambient\\n            , kdiffuse\\n            , kspecular;\\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 (f_color.a == 0.0 ||\\n    outOfRange(clipBounds[0], clipBounds[1], f_data)\\n  ) discard;\\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 = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\\n  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\\n\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\n\\n  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * 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 * f_color.a;\\n}\\n\"])\nvar edgeVertSrc = glslify([\"precision highp 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}\"])\nvar edgeFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\n\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\n}\"])\nvar pointVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0.0, 0.0 ,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}\"])\nvar pointFragSrc = glslify([\"precision highp 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}\"])\nvar pickVertSrc = glslify([\"precision highp 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}\"])\nvar pickFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"])\nvar pickPointVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0.0, 0.0, 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}\"])\nvar contourVertSrc = glslify([\"precision highp 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}\"])\nvar contourFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec3 contourColor;\\n\\nvoid main() {\\n  gl_FragColor = vec4(contourColor, 1.0);\\n}\\n\"])\n\nexports.meshShader = {\n  vertex:   triVertSrc,\n  fragment: triFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'},\n    {name: 'normal', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'uv', type: 'vec2'}\n  ]\n}\nexports.wireShader = {\n  vertex:   edgeVertSrc,\n  fragment: edgeFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'uv', type: 'vec2'}\n  ]\n}\nexports.pointShader = {\n  vertex:   pointVertSrc,\n  fragment: pointFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'uv', type: 'vec2'},\n    {name: 'pointSize', type: 'float'}\n  ]\n}\nexports.pickShader = {\n  vertex:   pickVertSrc,\n  fragment: pickFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'},\n    {name: 'id', type: 'vec4'}\n  ]\n}\nexports.pointPickShader = {\n  vertex:   pickPointVertSrc,\n  fragment: pickFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'},\n    {name: 'pointSize', type: 'float'},\n    {name: 'id', type: 'vec4'}\n  ]\n}\nexports.contourShader = {\n  vertex:   contourVertSrc,\n  fragment: contourFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec3'}\n  ]\n}\n\n},{\"glslify\":404}],279:[function(_dereq_,module,exports){\n'use strict'\n\nvar DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small\nvar DEFAULT_FACE_NORMALS_EPSILON = 1e-6;\n\nvar createShader  = _dereq_('gl-shader')\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar createTexture = _dereq_('gl-texture2d')\nvar normals       = _dereq_('normals')\nvar multiply      = _dereq_('gl-mat4/multiply')\nvar invert        = _dereq_('gl-mat4/invert')\nvar ndarray       = _dereq_('ndarray')\nvar colormap      = _dereq_('colormap')\nvar getContour    = _dereq_('simplicial-complex-contour')\nvar pool          = _dereq_('typedarray-pool')\nvar shaders       = _dereq_('./lib/shaders')\nvar closestPoint  = _dereq_('./lib/closest-point')\n\nvar meshShader    = shaders.meshShader\nvar wireShader    = shaders.wireShader\nvar pointShader   = shaders.pointShader\nvar pickShader    = shaders.pickShader\nvar pointPickShader = shaders.pointPickShader\nvar contourShader = shaders.contourShader\n\nvar IDENTITY = [\n  1,0,0,0,\n  0,1,0,0,\n  0,0,1,0,\n  0,0,0,1]\n\n\nfunction SimplicialMesh(gl\n  , texture\n  , triShader\n  , lineShader\n  , pointShader\n  , pickShader\n  , pointPickShader\n  , contourShader\n  , trianglePositions\n  , triangleIds\n  , triangleColors\n  , triangleUVs\n  , triangleNormals\n  , triangleVAO\n  , edgePositions\n  , edgeIds\n  , edgeColors\n  , edgeUVs\n  , edgeVAO\n  , pointPositions\n  , pointIds\n  , pointColors\n  , pointUVs\n  , pointSizes\n  , pointVAO\n  , contourPositions\n  , contourVAO) {\n\n  this.gl                = gl\n  this.pixelRatio         = 1\n  this.cells             = []\n  this.positions         = []\n  this.intensity         = []\n  this.texture           = texture\n  this.dirty             = true\n\n  this.triShader         = triShader\n  this.lineShader        = lineShader\n  this.pointShader       = pointShader\n  this.pickShader        = pickShader\n  this.pointPickShader   = pointPickShader\n  this.contourShader     = contourShader\n\n  this.trianglePositions = trianglePositions\n  this.triangleColors    = triangleColors\n  this.triangleNormals   = triangleNormals\n  this.triangleUVs       = triangleUVs\n  this.triangleIds       = triangleIds\n  this.triangleVAO       = triangleVAO\n  this.triangleCount     = 0\n\n  this.lineWidth         = 1\n  this.edgePositions     = edgePositions\n  this.edgeColors        = edgeColors\n  this.edgeUVs           = edgeUVs\n  this.edgeIds           = edgeIds\n  this.edgeVAO           = edgeVAO\n  this.edgeCount         = 0\n\n  this.pointPositions    = pointPositions\n  this.pointColors       = pointColors\n  this.pointUVs          = pointUVs\n  this.pointSizes        = pointSizes\n  this.pointIds          = pointIds\n  this.pointVAO          = pointVAO\n  this.pointCount        = 0\n\n  this.contourLineWidth  = 1\n  this.contourPositions  = contourPositions\n  this.contourVAO        = contourVAO\n  this.contourCount      = 0\n  this.contourColor      = [0,0,0]\n  this.contourEnable     = true\n\n  this.pickId            = 1\n  this.bounds            = [\n    [ Infinity, Infinity, Infinity],\n    [-Infinity,-Infinity,-Infinity] ]\n  this.clipBounds        = [\n    [-Infinity,-Infinity,-Infinity],\n    [ Infinity, Infinity, Infinity] ]\n\n  this.lightPosition = [1e5, 1e5, 0]\n  this.ambientLight  = 0.8\n  this.diffuseLight  = 0.8\n  this.specularLight = 2.0\n  this.roughness     = 0.5\n  this.fresnel       = 1.5\n\n  this.opacity       = 1.0\n  this.hasAlpha      = false\n  this.opacityscale  = false\n\n  this._model       = IDENTITY\n  this._view        = IDENTITY\n  this._projection  = IDENTITY\n  this._resolution  = [1,1]\n}\n\nvar proto = SimplicialMesh.prototype\n\nproto.isOpaque = function() {\n  return !this.hasAlpha\n}\n\nproto.isTransparent = function() {\n  return this.hasAlpha\n}\n\nproto.pickSlots = 1\n\nproto.setPickBase = function(id) {\n  this.pickId = id\n}\n\nfunction getOpacityFromScale(ratio, opacityscale) {\n\n  if(!opacityscale) return 1\n  if(!opacityscale.length) return 1\n\n  for(var i = 0; i < opacityscale.length; ++i) {\n    if(opacityscale.length < 2) return 1\n    if(opacityscale[i][0] === ratio) return opacityscale[i][1]\n    if(opacityscale[i][0] > ratio && i > 0) {\n      var d = (opacityscale[i][0] - ratio) / (opacityscale[i][0] - opacityscale[i - 1][0])\n      return opacityscale[i][1] * (1 - d) + d * opacityscale[i - 1][1]\n    }\n  }\n\n  return 1\n}\n\nfunction genColormap(param, opacityscale) {\n  var colors = colormap({\n      colormap: param\n    , nshades:  256\n    , format:  'rgba'\n  })\n\n  var result = new Uint8Array(256*4)\n  for(var i=0; i<256; ++i) {\n    var c = colors[i]\n    for(var j=0; j<3; ++j) {\n      result[4*i+j] = c[j]\n    }\n    if(!opacityscale) {\n      result[4*i+3] = 255 * c[3]\n    } else {\n      result[4*i+3] = 255 * getOpacityFromScale(i / 255.0, opacityscale)\n    }\n  }\n\n  return ndarray(result, [256,256,4], [4,0,1])\n}\n\nfunction unpackIntensity(cells, numVerts, cellIntensity) {\n  var result = new Array(numVerts)\n  for(var i=0; i<numVerts; ++i) {\n    result[i] = 0\n  }\n  var numCells = cells.length\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      result[c[j]] = cellIntensity[i]\n    }\n  }\n  return result\n}\n\nfunction takeZComponent(array) {\n  var n = array.length\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = array[i][2]\n  }\n  return result\n}\n\nproto.highlight = function(selection) {\n  if(!selection || !this.contourEnable) {\n    this.contourCount = 0\n    return\n  }\n  var level = getContour(this.cells, this.intensity, selection.intensity)\n  var cells         = level.cells\n  var vertexIds     = level.vertexIds\n  var vertexWeights = level.vertexWeights\n  var numCells = cells.length\n  var result = pool.mallocFloat32(2 * 3 * numCells)\n  var ptr = 0\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<2; ++j) {\n      var v = c[0]\n      if(c.length === 2) {\n        v = c[j]\n      }\n      var a = vertexIds[v][0]\n      var b = vertexIds[v][1]\n      var w = vertexWeights[v]\n      var wi = 1.0 - w\n      var pa = this.positions[a]\n      var pb = this.positions[b]\n      for(var k=0; k<3; ++k) {\n        result[ptr++] = w * pa[k] + wi * pb[k]\n      }\n    }\n  }\n  this.contourCount = (ptr / 3)|0\n  this.contourPositions.update(result.subarray(0, ptr))\n  pool.free(result)\n}\n\nproto.update = function(params) {\n  params = params || {}\n  var gl = this.gl\n\n  this.dirty = true\n\n  if('contourEnable' in params) {\n    this.contourEnable = params.contourEnable\n  }\n  if('contourColor' in params) {\n    this.contourColor = params.contourColor\n  }\n  if('lineWidth' in params) {\n    this.lineWidth = params.lineWidth\n  }\n  if('lightPosition' in params) {\n    this.lightPosition = params.lightPosition\n  }\n\n  this.hasAlpha = false // default to no transparent draw\n  if('opacity' in params) {\n    this.opacity = params.opacity\n    if(this.opacity < 1) {\n      this.hasAlpha = true;\n    }\n  }\n  if('opacityscale' in params) {\n    this.opacityscale = params.opacityscale\n    this.hasAlpha = true;\n  }\n\n  if('ambient' in params) {\n    this.ambientLight  = params.ambient\n  }\n  if('diffuse' in params) {\n    this.diffuseLight = params.diffuse\n  }\n  if('specular' in params) {\n    this.specularLight = params.specular\n  }\n  if('roughness' in params) {\n    this.roughness = params.roughness\n  }\n  if('fresnel' in params) {\n    this.fresnel = params.fresnel\n  }\n\n  if(params.texture) {\n    this.texture.dispose()\n    this.texture = createTexture(gl, params.texture)\n  } else if (params.colormap) {\n    this.texture.shape = [256,256]\n    this.texture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n    this.texture.magFilter = gl.LINEAR\n    this.texture.setPixels(genColormap(params.colormap, this.opacityscale))\n    this.texture.generateMipmap()\n  }\n\n  var cells = params.cells\n  var positions = params.positions\n\n  if(!positions || !cells) {\n    return\n  }\n\n  var tPos = []\n  var tCol = []\n  var tNor = []\n  var tUVs = []\n  var tIds = []\n\n  var ePos = []\n  var eCol = []\n  var eUVs = []\n  var eIds = []\n\n  var pPos = []\n  var pCol = []\n  var pUVs = []\n  var pSiz = []\n  var pIds = []\n\n  //Save geometry data for picking calculations\n  this.cells     = cells\n  this.positions = positions\n\n  //Compute normals\n  var vertexNormals = params.vertexNormals\n  var cellNormals   = params.cellNormals\n  var vertexNormalsEpsilon = params.vertexNormalsEpsilon === void(0) ? DEFAULT_VERTEX_NORMALS_EPSILON : params.vertexNormalsEpsilon\n  var faceNormalsEpsilon = params.faceNormalsEpsilon === void(0) ? DEFAULT_FACE_NORMALS_EPSILON : params.faceNormalsEpsilon\n  if(params.useFacetNormals && !cellNormals) {\n    cellNormals = normals.faceNormals(cells, positions, faceNormalsEpsilon)\n  }\n  if(!cellNormals && !vertexNormals) {\n    vertexNormals = normals.vertexNormals(cells, positions, vertexNormalsEpsilon)\n  }\n\n  //Compute colors\n  var vertexColors    = params.vertexColors\n  var cellColors      = params.cellColors\n  var meshColor       = params.meshColor || [1,1,1,1]\n\n  //UVs\n  var vertexUVs       = params.vertexUVs\n  var vertexIntensity = params.vertexIntensity\n  var cellUVs         = params.cellUVs\n  var cellIntensity   = params.cellIntensity\n\n  var intensityLo     = Infinity\n  var intensityHi     = -Infinity\n  if(!vertexUVs && !cellUVs) {\n    if(vertexIntensity) {\n      if(params.vertexIntensityBounds) {\n        intensityLo = +params.vertexIntensityBounds[0]\n        intensityHi = +params.vertexIntensityBounds[1]\n      } else {\n        for(var i=0; i<vertexIntensity.length; ++i) {\n          var f = vertexIntensity[i]\n          intensityLo = Math.min(intensityLo, f)\n          intensityHi = Math.max(intensityHi, f)\n        }\n      }\n    } else if(cellIntensity) {\n      for(var i=0; i<cellIntensity.length; ++i) {\n        var f = cellIntensity[i]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    } else {\n      for(var i=0; i<positions.length; ++i) {\n        var f = positions[i][2]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    }\n  }\n\n  if(vertexIntensity) {\n    this.intensity = vertexIntensity\n  } else if(cellIntensity) {\n    this.intensity = unpackIntensity(cells, positions.length, cellIntensity)\n  } else {\n    this.intensity = takeZComponent(positions)\n  }\n\n  //Point size\n  var pointSizes      = params.pointSizes\n  var meshPointSize   = params.pointSize || 1.0\n\n  //Update bounds\n  this.bounds       = [[Infinity,Infinity,Infinity], [-Infinity,-Infinity,-Infinity]]\n  for(var i=0; i<positions.length; ++i) {\n    var p = positions[i]\n    for(var j=0; j<3; ++j) {\n      if(isNaN(p[j]) || !isFinite(p[j])) {\n        continue\n      }\n      this.bounds[0][j] = Math.min(this.bounds[0][j], p[j])\n      this.bounds[1][j] = Math.max(this.bounds[1][j], p[j])\n    }\n  }\n\n  //Pack cells into buffers\n  var triangleCount = 0\n  var edgeCount = 0\n  var pointCount = 0\n\nfill_loop:\n  for(var i=0; i<cells.length; ++i) {\n    var cell = cells[i]\n    switch(cell.length) {\n      case 1:\n\n        var v = cell[0]\n        var p = positions[v]\n\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          if(isNaN(p[j]) || !isFinite(p[j])) {\n            continue fill_loop\n          }\n        }\n\n        pPos.push(p[0], p[1], p[2])\n\n        var c\n        if(vertexColors) {\n          c = vertexColors[v]\n        } else if(cellColors) {\n          c = cellColors[i]\n        } else {\n          c = meshColor\n        }\n        if(this.opacityscale && vertexIntensity) {\n          tCol.push(c[0], c[1], c[2],\n            this.opacity * getOpacityFromScale(\n              (vertexIntensity[v] - intensityLo) / (intensityHi - intensityLo),\n              this.opacityscale\n            )\n          )\n        } else if(c.length === 3) {\n          pCol.push(c[0], c[1], c[2], this.opacity)\n        } else {\n          pCol.push(c[0], c[1], c[2], c[3] * this.opacity)\n          if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n        }\n\n        var uv\n        if(vertexUVs) {\n          uv = vertexUVs[v]\n        } else if(vertexIntensity) {\n          uv = [\n            (vertexIntensity[v] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else if(cellUVs) {\n          uv = cellUVs[i]\n        } else if(cellIntensity) {\n          uv = [\n            (cellIntensity[i] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else {\n          uv = [\n            (p[2] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        }\n        pUVs.push(uv[0], uv[1])\n\n        if(pointSizes) {\n          pSiz.push(pointSizes[v])\n        } else {\n          pSiz.push(meshPointSize)\n        }\n\n        pIds.push(i)\n\n        pointCount += 1\n      break\n\n      case 2:\n\n        //Check NaNs\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n\n          ePos.push(p[0], p[1], p[2])\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n          if(this.opacityscale && vertexIntensity) {\n            tCol.push(c[0], c[1], c[2],\n              this.opacity * getOpacityFromScale(\n                (vertexIntensity[v] - intensityLo) / (intensityHi - intensityLo),\n                this.opacityscale\n              )\n            )\n          } else if(c.length === 3) {\n            eCol.push(c[0], c[1], c[2], this.opacity)\n          } else {\n            eCol.push(c[0], c[1], c[2], c[3] * this.opacity)\n            if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          eUVs.push(uv[0], uv[1])\n\n          eIds.push(i)\n        }\n        edgeCount += 1\n      break\n\n      case 3:\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<3; ++j) {\n          var v = cell[2 - j]\n\n          var p = positions[v]\n          tPos.push(p[0], p[1], p[2])\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n\n          if(this.opacityscale && vertexIntensity) {\n            tCol.push(c[0], c[1], c[2],\n              this.opacity * getOpacityFromScale(\n                (vertexIntensity[v] - intensityLo) / (intensityHi - intensityLo),\n                this.opacityscale\n              )\n            )\n          } else if(c.length === 3) {\n            tCol.push(c[0], c[1], c[2], this.opacity)\n          } else {\n            tCol.push(c[0], c[1], c[2], c[3] * this.opacity)\n            if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          tUVs.push(uv[0], uv[1])\n\n          var q\n          if(vertexNormals) {\n            q = vertexNormals[v]\n          } else {\n            q = cellNormals[i]\n          }\n          tNor.push(q[0], q[1], q[2])\n\n          tIds.push(i)\n        }\n        triangleCount += 1\n      break\n\n      default:\n      break\n    }\n  }\n\n  this.pointCount     = pointCount\n  this.edgeCount      = edgeCount\n  this.triangleCount  = triangleCount\n\n  this.pointPositions.update(pPos)\n  this.pointColors.update(pCol)\n  this.pointUVs.update(pUVs)\n  this.pointSizes.update(pSiz)\n  this.pointIds.update(new Uint32Array(pIds))\n\n  this.edgePositions.update(ePos)\n  this.edgeColors.update(eCol)\n  this.edgeUVs.update(eUVs)\n  this.edgeIds.update(new Uint32Array(eIds))\n\n  this.trianglePositions.update(tPos)\n  this.triangleColors.update(tCol)\n  this.triangleUVs.update(tUVs)\n  this.triangleNormals.update(tNor)\n  this.triangleIds.update(new Uint32Array(tIds))\n}\n\nproto.drawTransparent = proto.draw = function(params) {\n  params = params || {}\n  var gl          = this.gl\n  var model       = params.model      || IDENTITY\n  var view        = params.view       || IDENTITY\n  var projection  = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    inverseModel: IDENTITY.slice(),\n\n    clipBounds: clipBounds,\n\n    kambient:   this.ambientLight,\n    kdiffuse:   this.diffuseLight,\n    kspecular:  this.specularLight,\n    roughness:  this.roughness,\n    fresnel:    this.fresnel,\n\n    eyePosition:   [0,0,0],\n    lightPosition: [0,0,0],\n\n    contourColor: this.contourColor,\n\n    texture:    0\n  }\n\n  uniforms.inverseModel = invert(uniforms.inverseModel, uniforms.model)\n\n  gl.disable(gl.CULL_FACE)\n\n  this.texture.bind(0)\n\n  var invCameraMatrix = new Array(16)\n  multiply(invCameraMatrix, uniforms.view, uniforms.model)\n  multiply(invCameraMatrix, uniforms.projection, invCameraMatrix)\n  invert(invCameraMatrix, invCameraMatrix)\n\n  for(var i=0; i<3; ++i) {\n    uniforms.eyePosition[i] = invCameraMatrix[12+i] / invCameraMatrix[15]\n  }\n\n  var w = invCameraMatrix[15]\n  for(var i=0; i<3; ++i) {\n    w += this.lightPosition[i] * invCameraMatrix[4*i+3]\n  }\n  for(var i=0; i<3; ++i) {\n    var s = invCameraMatrix[12+i]\n    for(var j=0; j<3; ++j) {\n      s += invCameraMatrix[4*j+i] * this.lightPosition[j]\n    }\n    uniforms.lightPosition[i] = s / w\n  }\n\n  if(this.triangleCount > 0) {\n    var shader = this.triShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n\n  if(this.edgeCount > 0 && this.lineWidth > 0) {\n    var shader = this.lineShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.edgeVAO.bind()\n    gl.lineWidth(this.lineWidth * this.pixelRatio)\n    gl.drawArrays(gl.LINES, 0, this.edgeCount*2)\n    this.edgeVAO.unbind()\n  }\n\n  if(this.pointCount > 0) {\n    var shader = this.pointShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.pointVAO.bind()\n    gl.drawArrays(gl.POINTS, 0, this.pointCount)\n    this.pointVAO.unbind()\n  }\n\n  if(this.contourEnable && this.contourCount > 0 && this.contourLineWidth > 0) {\n    var shader = this.contourShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.contourVAO.bind()\n    gl.drawArrays(gl.LINES, 0, this.contourCount)\n    this.contourVAO.unbind()\n  }\n}\n\nproto.drawPick = function(params) {\n  params = params || {}\n\n  var gl         = this.gl\n\n  var model      = params.model      || IDENTITY\n  var view       = params.view       || IDENTITY\n  var projection = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  //Save camera parameters\n  this._model      = [].slice.call(model)\n  this._view       = [].slice.call(view)\n  this._projection = [].slice.call(projection)\n  this._resolution = [gl.drawingBufferWidth, gl.drawingBufferHeight]\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    clipBounds: clipBounds,\n    pickId:     this.pickId / 255.0,\n  }\n\n  var shader = this.pickShader\n  shader.bind()\n  shader.uniforms = uniforms\n\n  if(this.triangleCount > 0) {\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n\n  if(this.edgeCount > 0) {\n    this.edgeVAO.bind()\n    gl.lineWidth(this.lineWidth * this.pixelRatio)\n    gl.drawArrays(gl.LINES, 0, this.edgeCount*2)\n    this.edgeVAO.unbind()\n  }\n\n  if(this.pointCount > 0) {\n    var shader = this.pointPickShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.pointVAO.bind()\n    gl.drawArrays(gl.POINTS, 0, this.pointCount)\n    this.pointVAO.unbind()\n  }\n}\n\n\nproto.pick = function(pickData) {\n  if(!pickData) {\n    return null\n  }\n  if(pickData.id !== this.pickId) {\n    return null\n  }\n\n  var cellId    = pickData.value[0] + 256*pickData.value[1] + 65536*pickData.value[2]\n  var cell      = this.cells[cellId]\n  var positions = this.positions\n\n  var simplex   = new Array(cell.length)\n  for(var i=0; i<cell.length; ++i) {\n    simplex[i] = positions[cell[i]]\n  }\n\n  var data = closestPoint(\n    simplex,\n    [pickData.coord[0], this._resolution[1]-pickData.coord[1]],\n    this._model,\n    this._view,\n    this._projection,\n    this._resolution)\n\n  if(!data) {\n    return null\n  }\n\n  var weights = data[2]\n  var interpIntensity = 0.0\n  for(var i=0; i<cell.length; ++i) {\n    interpIntensity += weights[i] * this.intensity[cell[i]]\n  }\n\n  return {\n    position: data[1],\n    index:    cell[data[0]],\n    cell:     cell,\n    cellId:   cellId,\n    intensity:  interpIntensity,\n    dataCoordinate: this.positions[cell[data[0]]]\n  }\n}\n\n\nproto.dispose = function() {\n  this.texture.dispose()\n\n  this.triShader.dispose()\n  this.lineShader.dispose()\n  this.pointShader.dispose()\n  this.pickShader.dispose()\n  this.pointPickShader.dispose()\n\n  this.triangleVAO.dispose()\n  this.trianglePositions.dispose()\n  this.triangleColors.dispose()\n  this.triangleUVs.dispose()\n  this.triangleNormals.dispose()\n  this.triangleIds.dispose()\n\n  this.edgeVAO.dispose()\n  this.edgePositions.dispose()\n  this.edgeColors.dispose()\n  this.edgeUVs.dispose()\n  this.edgeIds.dispose()\n\n  this.pointVAO.dispose()\n  this.pointPositions.dispose()\n  this.pointColors.dispose()\n  this.pointUVs.dispose()\n  this.pointSizes.dispose()\n  this.pointIds.dispose()\n\n  this.contourVAO.dispose()\n  this.contourPositions.dispose()\n  this.contourShader.dispose()\n}\n\nfunction createMeshShader(gl) {\n  var shader = createShader(gl, meshShader.vertex, meshShader.fragment)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location    = 2\n  shader.attributes.uv.location       = 3\n  shader.attributes.normal.location   = 4\n  return shader\n}\n\nfunction createWireShader(gl) {\n  var shader = createShader(gl, wireShader.vertex, wireShader.fragment)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location    = 2\n  shader.attributes.uv.location       = 3\n  return shader\n}\n\nfunction createPointShader(gl) {\n  var shader = createShader(gl, pointShader.vertex, pointShader.fragment)\n  shader.attributes.position.location  = 0\n  shader.attributes.color.location     = 2\n  shader.attributes.uv.location        = 3\n  shader.attributes.pointSize.location = 4\n  return shader\n}\n\nfunction createPickShader(gl) {\n  var shader = createShader(gl, pickShader.vertex, pickShader.fragment)\n  shader.attributes.position.location = 0\n  shader.attributes.id.location       = 1\n  return shader\n}\n\nfunction createPointPickShader(gl) {\n  var shader = createShader(gl, pointPickShader.vertex, pointPickShader.fragment)\n  shader.attributes.position.location  = 0\n  shader.attributes.id.location        = 1\n  shader.attributes.pointSize.location = 4\n  return shader\n}\n\nfunction createContourShader(gl) {\n  var shader = createShader(gl, contourShader.vertex, contourShader.fragment)\n  shader.attributes.position.location = 0\n  return shader\n}\n\nfunction createSimplicialMesh(gl, params) {\n  if (arguments.length === 1) {\n    params = gl;\n    gl = params.gl;\n  }\n\n  //enable derivatives for face normals\n  var ext = gl.getExtension('OES_standard_derivatives') || gl.getExtension('MOZ_OES_standard_derivatives') || gl.getExtension('WEBKIT_OES_standard_derivatives')\n  if (!ext)\n    throw new Error('derivatives not supported')\n\n  var triShader       = createMeshShader(gl)\n  var lineShader      = createWireShader(gl)\n  var pointShader     = createPointShader(gl)\n  var pickShader      = createPickShader(gl)\n  var pointPickShader = createPointPickShader(gl)\n  var contourShader   = createContourShader(gl)\n\n  var meshTexture       = createTexture(gl,\n    ndarray(new Uint8Array([255,255,255,255]), [1,1,4]))\n  meshTexture.generateMipmap()\n  meshTexture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n  meshTexture.magFilter = gl.LINEAR\n\n  var trianglePositions = createBuffer(gl)\n  var triangleColors    = createBuffer(gl)\n  var triangleUVs       = createBuffer(gl)\n  var triangleNormals   = createBuffer(gl)\n  var triangleIds       = createBuffer(gl)\n  var triangleVAO       = createVAO(gl, [\n    { buffer: trianglePositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: triangleIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: triangleColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: triangleUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: triangleNormals,\n      type: gl.FLOAT,\n      size: 3\n    }\n  ])\n\n  var edgePositions = createBuffer(gl)\n  var edgeColors    = createBuffer(gl)\n  var edgeUVs       = createBuffer(gl)\n  var edgeIds       = createBuffer(gl)\n  var edgeVAO       = createVAO(gl, [\n    { buffer: edgePositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: edgeIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: edgeColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: edgeUVs,\n      type: gl.FLOAT,\n      size: 2\n    }\n  ])\n\n  var pointPositions  = createBuffer(gl)\n  var pointColors     = createBuffer(gl)\n  var pointUVs        = createBuffer(gl)\n  var pointSizes      = createBuffer(gl)\n  var pointIds        = createBuffer(gl)\n  var pointVAO        = createVAO(gl, [\n    { buffer: pointPositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: pointIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: pointColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: pointUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: pointSizes,\n      type: gl.FLOAT,\n      size: 1\n    }\n  ])\n\n  var contourPositions = createBuffer(gl)\n  var contourVAO       = createVAO(gl, [\n    { buffer: contourPositions,\n      type:   gl.FLOAT,\n      size:   3\n    }])\n\n  var mesh = new SimplicialMesh(gl\n    , meshTexture\n    , triShader\n    , lineShader\n    , pointShader\n    , pickShader\n    , pointPickShader\n    , contourShader\n    , trianglePositions\n    , triangleIds\n    , triangleColors\n    , triangleUVs\n    , triangleNormals\n    , triangleVAO\n    , edgePositions\n    , edgeIds\n    , edgeColors\n    , edgeUVs\n    , edgeVAO\n    , pointPositions\n    , pointIds\n    , pointColors\n    , pointUVs\n    , pointSizes\n    , pointVAO\n    , contourPositions\n    , contourVAO)\n\n  mesh.update(params)\n\n  return mesh\n}\n\nmodule.exports = createSimplicialMesh\n\n},{\"./lib/closest-point\":277,\"./lib/shaders\":278,\"colormap\":119,\"gl-buffer\":240,\"gl-mat4/invert\":264,\"gl-mat4/multiply\":266,\"gl-shader\":300,\"gl-texture2d\":317,\"gl-vao\":322,\"ndarray\":445,\"normals\":448,\"simplicial-complex-contour\":505,\"typedarray-pool\":532}],280:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createBoxes\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createShader = _dereq_('gl-shader')\n\nvar shaders = _dereq_('./shaders')\n\nfunction Boxes(plot, vbo, shader) {\n  this.plot   = plot\n  this.vbo    = vbo\n  this.shader = shader\n}\n\nvar proto = Boxes.prototype\n\nproto.bind = function() {\n  var shader = this.shader\n  this.vbo.bind()\n  this.shader.bind()\n  shader.attributes.coord.pointer()\n  shader.uniforms.screenBox = this.plot.screenBox\n}\n\nproto.drawBox = (function() {\n  var lo = [0,0]\n  var hi = [0,0]\n  return function(loX, loY, hiX, hiY, color) {\n    var plot       = this.plot\n    var shader     = this.shader\n    var gl         = plot.gl\n\n    lo[0] = loX\n    lo[1] = loY\n    hi[0] = hiX\n    hi[1] = hiY\n\n    shader.uniforms.lo     = lo\n    shader.uniforms.hi     = hi\n    shader.uniforms.color  = color\n\n    gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4)\n  }\n}())\n\nproto.dispose = function() {\n  this.vbo.dispose()\n  this.shader.dispose()\n}\n\nfunction createBoxes(plot) {\n  var gl  = plot.gl\n  var vbo = createBuffer(gl, [\n    0,0,\n    0,1,\n    1,0,\n    1,1])\n  var shader  = createShader(gl, shaders.boxVert, shaders.lineFrag)\n  return new Boxes(plot, vbo, shader)\n}\n\n},{\"./shaders\":283,\"gl-buffer\":240,\"gl-shader\":300}],281:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createGrid\n\nvar createBuffer  = _dereq_('gl-buffer')\nvar createShader  = _dereq_('gl-shader')\nvar bsearch       = _dereq_('binary-search-bounds')\nvar shaders       = _dereq_('./shaders')\n\nfunction Grid(plot, vbo, shader, tickShader) {\n  this.plot   = plot\n  this.vbo    = vbo\n  this.shader = shader\n  this.tickShader = tickShader\n  this.ticks  = [[], []]\n}\n\nfunction compareTickNum(a, b) {\n  return a - b\n}\n\nvar proto = Grid.prototype\n\nproto.draw = (function() {\n\n  var DATA_SHIFT = [0,0]\n  var DATA_SCALE = [0,0]\n  var DATA_AXIS  = [0,0]\n\n  return function() {\n    var plot       = this.plot\n    var vbo        = this.vbo\n    var shader     = this.shader\n    var ticks      = this.ticks\n    var gl         = plot.gl\n    var bounds     = plot._tickBounds\n    var dataBox    = plot.dataBox\n    var viewPixels = plot.viewBox\n    var lineWidth  = plot.gridLineWidth\n    var gridColor  = plot.gridLineColor\n    var gridEnable = plot.gridLineEnable\n    var pixelRatio = plot.pixelRatio\n\n    for(var i=0; i<2; ++i) {\n      var lo = bounds[i]\n      var hi = bounds[i+2]\n      var boundScale = hi - lo\n      var dataCenter  = 0.5 * (dataBox[i+2] + dataBox[i])\n      var dataWidth   = dataBox[i+2] - dataBox[i]\n      DATA_SCALE[i] = 2.0 * boundScale / dataWidth\n      DATA_SHIFT[i] = 2.0 * (lo - dataCenter) / dataWidth\n    }\n\n    shader.bind()\n    vbo.bind()\n    shader.attributes.dataCoord.pointer()\n    shader.uniforms.dataShift = DATA_SHIFT\n    shader.uniforms.dataScale = DATA_SCALE\n\n    var offset = 0\n    for(var i=0; i<2; ++i) {\n      DATA_AXIS[0] = DATA_AXIS[1] = 0\n      DATA_AXIS[i] = 1\n      shader.uniforms.dataAxis  = DATA_AXIS\n      shader.uniforms.lineWidth = lineWidth[i] / (viewPixels[i+2] - viewPixels[i]) * pixelRatio\n      shader.uniforms.color     = gridColor[i]\n\n      var size = ticks[i].length * 6\n      if(gridEnable[i] && size) {\n        gl.drawArrays(gl.TRIANGLES, offset, size)\n      }\n      offset += size\n    }\n  }\n})()\n\nproto.drawTickMarks = (function() {\n  var DATA_SHIFT = [0,0]\n  var DATA_SCALE = [0,0]\n  var X_AXIS     = [1,0]\n  var Y_AXIS     = [0,1]\n  var SCR_OFFSET = [0,0]\n  var TICK_SCALE = [0,0]\n\n  return function() {\n    var plot       = this.plot\n    var vbo        = this.vbo\n    var shader     = this.tickShader\n    var ticks      = this.ticks\n    var gl         = plot.gl\n    var bounds     = plot._tickBounds\n    var dataBox    = plot.dataBox\n    var viewBox    = plot.viewBox\n    var pixelRatio = plot.pixelRatio\n    var screenBox  = plot.screenBox\n\n    var screenWidth  = screenBox[2] - screenBox[0]\n    var screenHeight = screenBox[3] - screenBox[1]\n    var viewWidth    = viewBox[2]   - viewBox[0]\n    var viewHeight   = viewBox[3]   - viewBox[1]\n\n    for(var i=0; i<2; ++i) {\n      var lo = bounds[i]\n      var hi = bounds[i+2]\n      var boundScale = hi - lo\n      var dataCenter  = 0.5 * (dataBox[i+2] + dataBox[i])\n      var dataWidth   = (dataBox[i+2] - dataBox[i])\n      DATA_SCALE[i] = 2.0 * boundScale / dataWidth\n      DATA_SHIFT[i] = 2.0 * (lo - dataCenter) / dataWidth\n    }\n\n    DATA_SCALE[0] *= viewWidth / screenWidth\n    DATA_SHIFT[0] *= viewWidth / screenWidth\n\n    DATA_SCALE[1] *= viewHeight / screenHeight\n    DATA_SHIFT[1] *= viewHeight / screenHeight\n\n    shader.bind()\n    vbo.bind()\n\n    shader.attributes.dataCoord.pointer()\n\n    var uniforms = shader.uniforms\n    uniforms.dataShift = DATA_SHIFT\n    uniforms.dataScale = DATA_SCALE\n\n    var tickMarkLength = plot.tickMarkLength\n    var tickMarkWidth  = plot.tickMarkWidth\n    var tickMarkColor  = plot.tickMarkColor\n\n    var xTicksOffset = 0\n    var yTicksOffset = ticks[0].length * 6\n\n    var xStart = Math.min(bsearch.ge(ticks[0], (dataBox[0] - bounds[0]) / (bounds[2] - bounds[0]), compareTickNum), ticks[0].length)\n    var xEnd   = Math.min(bsearch.gt(ticks[0], (dataBox[2] - bounds[0]) / (bounds[2] - bounds[0]), compareTickNum), ticks[0].length)\n    var xOffset = xTicksOffset + 6 * xStart\n    var xCount  = 6 * Math.max(0, xEnd - xStart)\n\n    var yStart = Math.min(bsearch.ge(ticks[1], (dataBox[1] - bounds[1]) / (bounds[3] - bounds[1]), compareTickNum), ticks[1].length)\n    var yEnd   = Math.min(bsearch.gt(ticks[1], (dataBox[3] - bounds[1]) / (bounds[3] - bounds[1]), compareTickNum), ticks[1].length)\n    var yOffset = yTicksOffset + 6 * yStart\n    var yCount  = 6 * Math.max(0, yEnd - yStart)\n\n    SCR_OFFSET[0]         = 2.0 * (viewBox[0] - tickMarkLength[1]) / screenWidth - 1.0\n    SCR_OFFSET[1]         = (viewBox[3] + viewBox[1]) / screenHeight - 1.0\n    TICK_SCALE[0]         = tickMarkLength[1] * pixelRatio / screenWidth\n    TICK_SCALE[1]         = tickMarkWidth[1]  * pixelRatio / screenHeight\n\n    if(yCount) {\n      uniforms.color        = tickMarkColor[1]\n      uniforms.tickScale    = TICK_SCALE\n      uniforms.dataAxis     = Y_AXIS\n      uniforms.screenOffset = SCR_OFFSET\n      gl.drawArrays(gl.TRIANGLES, yOffset, yCount)\n    }\n\n    SCR_OFFSET[0]         = (viewBox[2] + viewBox[0]) / screenWidth - 1.0\n    SCR_OFFSET[1]         = 2.0 * (viewBox[1] - tickMarkLength[0]) / screenHeight - 1.0\n    TICK_SCALE[0]         = tickMarkWidth[0]  * pixelRatio / screenWidth\n    TICK_SCALE[1]         = tickMarkLength[0] * pixelRatio / screenHeight\n\n    if(xCount) {\n      uniforms.color        = tickMarkColor[0]\n      uniforms.tickScale    = TICK_SCALE\n      uniforms.dataAxis     = X_AXIS\n      uniforms.screenOffset = SCR_OFFSET\n      gl.drawArrays(gl.TRIANGLES, xOffset, xCount)\n    }\n\n    SCR_OFFSET[0]         = 2.0 * (viewBox[2] + tickMarkLength[3]) / screenWidth - 1.0\n    SCR_OFFSET[1]         = (viewBox[3] + viewBox[1]) / screenHeight - 1.0\n    TICK_SCALE[0]         = tickMarkLength[3] * pixelRatio / screenWidth\n    TICK_SCALE[1]         = tickMarkWidth[3]  * pixelRatio / screenHeight\n\n    if(yCount) {\n      uniforms.color        = tickMarkColor[3]\n      uniforms.tickScale    = TICK_SCALE\n      uniforms.dataAxis     = Y_AXIS\n      uniforms.screenOffset = SCR_OFFSET\n      gl.drawArrays(gl.TRIANGLES, yOffset, yCount)\n    }\n\n    SCR_OFFSET[0]         = (viewBox[2] + viewBox[0]) / screenWidth - 1.0\n    SCR_OFFSET[1]         = 2.0 * (viewBox[3] + tickMarkLength[2]) / screenHeight - 1.0\n    TICK_SCALE[0]         = tickMarkWidth[2]  * pixelRatio / screenWidth\n    TICK_SCALE[1]         = tickMarkLength[2] * pixelRatio / screenHeight\n\n    if(xCount) {\n      uniforms.color        = tickMarkColor[2]\n      uniforms.tickScale    = TICK_SCALE\n      uniforms.dataAxis     = X_AXIS\n      uniforms.screenOffset = SCR_OFFSET\n      gl.drawArrays(gl.TRIANGLES, xOffset, xCount)\n    }\n  }\n})()\n\nproto.update = (function() {\n  var OFFSET_X = [1,  1, -1, -1,  1, -1]\n  var OFFSET_Y = [1, -1,  1,  1, -1, -1]\n\n  return function(options) {\n    var ticks  = options.ticks\n    var bounds = options.bounds\n    var data   = new Float32Array(6 * 3 * (ticks[0].length + ticks[1].length))\n\n    var zeroLineEnable = this.plot.zeroLineEnable\n\n    var ptr    = 0\n    var gridTicks = [[], []]\n    for(var dim=0; dim<2; ++dim) {\n      var localTicks = gridTicks[dim]\n      var axisTicks = ticks[dim]\n      var lo = bounds[dim]\n      var hi = bounds[dim+2]\n      for(var i=0; i<axisTicks.length; ++i) {\n        var x = (axisTicks[i].x - lo) / (hi - lo)\n        localTicks.push(x)\n        for(var j=0; j<6; ++j) {\n          data[ptr++] = x\n          data[ptr++] = OFFSET_X[j]\n          data[ptr++] = OFFSET_Y[j]\n        }\n      }\n    }\n\n    this.ticks = gridTicks\n    this.vbo.update(data)\n  }\n})()\n\nproto.dispose = function() {\n  this.vbo.dispose()\n  this.shader.dispose()\n  this.tickShader.dispose()\n}\n\nfunction createGrid(plot) {\n  var gl     = plot.gl\n  var vbo    = createBuffer(gl)\n  var shader = createShader(gl, shaders.gridVert, shaders.gridFrag)\n  var tickShader = createShader(gl, shaders.tickVert, shaders.gridFrag)\n  var grid   = new Grid(plot, vbo, shader, tickShader)\n  return grid\n}\n\n},{\"./shaders\":283,\"binary-search-bounds\":285,\"gl-buffer\":240,\"gl-shader\":300}],282:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createLines\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createShader = _dereq_('gl-shader')\n\nvar shaders = _dereq_('./shaders')\n\nfunction Lines(plot, vbo, shader) {\n  this.plot   = plot\n  this.vbo    = vbo\n  this.shader = shader\n}\n\nvar proto = Lines.prototype\n\nproto.bind = function() {\n  var shader = this.shader\n  this.vbo.bind()\n  this.shader.bind()\n  shader.attributes.coord.pointer()\n  shader.uniforms.screenBox = this.plot.screenBox\n}\n\nproto.drawLine = (function() {\n  var start = [0,0]\n  var end   = [0,0]\n  return function(startX, startY, endX, endY, width, color) {\n    var plot       = this.plot\n    var shader     = this.shader\n    var gl         = plot.gl\n\n    start[0] = startX\n    start[1] = startY\n    end[0]   = endX\n    end[1]   = endY\n\n    shader.uniforms.start  = start\n    shader.uniforms.end    = end\n    shader.uniforms.width  = width * plot.pixelRatio\n    shader.uniforms.color  = color\n\n    gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4)\n  }\n}())\n\nproto.dispose = function() {\n  this.vbo.dispose()\n  this.shader.dispose()\n}\n\nfunction createLines(plot) {\n  var gl  = plot.gl\n  var vbo = createBuffer(gl, [\n    -1,-1,\n    -1,1,\n    1,-1,\n    1,1])\n  var shader  = createShader(gl, shaders.lineVert, shaders.lineFrag)\n  var lines   = new Lines(plot, vbo, shader)\n  return lines\n}\n\n},{\"./shaders\":283,\"gl-buffer\":240,\"gl-shader\":300}],283:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify = _dereq_('glslify')\n\nvar FRAGMENT = glslify([\"precision lowp float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\\n}\\n\"])\n\nmodule.exports = {\n  lineVert: glslify([\"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\"]),\n  lineFrag: FRAGMENT,\n  textVert: glslify([\"#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\"]),\n  textFrag: FRAGMENT,\n  gridVert: glslify([\"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\"]),\n  gridFrag: FRAGMENT,\n  boxVert:  glslify([\"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\"]),\n  tickVert: glslify([\"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\"])\n}\n\n},{\"glslify\":404}],284:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createTextElements\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createShader = _dereq_('gl-shader')\nvar getText      = _dereq_('text-cache')\nvar bsearch      = _dereq_('binary-search-bounds')\nvar shaders      = _dereq_('./shaders')\n\nfunction TextElements(plot, vbo, shader) {\n  this.plot         = plot\n  this.vbo          = vbo\n  this.shader       = shader\n  this.tickOffset   = [[],[]]\n  this.tickX        = [[],[]]\n  this.labelOffset  = [0,0]\n  this.labelCount   = [0,0]\n}\n\nvar proto = TextElements.prototype\n\nproto.drawTicks = (function() {\n  var DATA_AXIS = [0,0]\n  var SCREEN_OFFSET = [0,0]\n  var ZERO_2 = [0,0]\n\n  return function(axis) {\n    var plot        = this.plot\n    var shader      = this.shader\n    var tickX       = this.tickX[axis]\n    var tickOffset  = this.tickOffset[axis]\n    var gl          = plot.gl\n    var viewBox     = plot.viewBox\n    var dataBox     = plot.dataBox\n    var screenBox   = plot.screenBox\n    var pixelRatio  = plot.pixelRatio\n    var tickEnable  = plot.tickEnable\n    var tickPad     = plot.tickPad\n    var textColor   = plot.tickColor\n    var textAngle   = plot.tickAngle\n    // todo check if this should be used (now unused)\n    // var tickLength  = plot.tickMarkLength\n\n    var labelEnable = plot.labelEnable\n    var labelPad    = plot.labelPad\n    var labelColor  = plot.labelColor\n    var labelAngle  = plot.labelAngle\n    var labelOffset = this.labelOffset[axis]\n    var labelCount  = this.labelCount[axis]\n\n    var start = bsearch.lt(tickX, dataBox[axis])\n    var end   = bsearch.le(tickX, dataBox[axis+2])\n\n    DATA_AXIS[0]    = DATA_AXIS[1] = 0\n    DATA_AXIS[axis] = 1\n\n    SCREEN_OFFSET[axis] = (viewBox[2+axis] + viewBox[axis]) / (screenBox[2+axis] - screenBox[axis]) - 1.0\n\n    var screenScale = 2.0 / screenBox[2+(axis^1)] - screenBox[axis^1]\n\n    SCREEN_OFFSET[axis^1] = screenScale * viewBox[axis^1] - 1.0\n    if(tickEnable[axis]) {\n      SCREEN_OFFSET[axis^1] -= screenScale * pixelRatio * tickPad[axis]\n      if(start < end && tickOffset[end] > tickOffset[start]) {\n        shader.uniforms.dataAxis     = DATA_AXIS\n        shader.uniforms.screenOffset = SCREEN_OFFSET\n        shader.uniforms.color        = textColor[axis]\n        shader.uniforms.angle        = textAngle[axis]\n        gl.drawArrays(\n          gl.TRIANGLES,\n          tickOffset[start],\n          tickOffset[end] - tickOffset[start])\n      }\n    }\n    if(labelEnable[axis] && labelCount) {\n      SCREEN_OFFSET[axis^1] -= screenScale * pixelRatio * labelPad[axis]\n      shader.uniforms.dataAxis     = ZERO_2\n      shader.uniforms.screenOffset = SCREEN_OFFSET\n      shader.uniforms.color        = labelColor[axis]\n      shader.uniforms.angle        = labelAngle[axis]\n      gl.drawArrays(\n        gl.TRIANGLES,\n        labelOffset,\n        labelCount)\n    }\n\n    SCREEN_OFFSET[axis^1] = screenScale * viewBox[2+(axis^1)] - 1.0\n    if(tickEnable[axis+2]) {\n      SCREEN_OFFSET[axis^1] += screenScale * pixelRatio * tickPad[axis+2]\n      if(start < end && tickOffset[end] > tickOffset[start]) {\n        shader.uniforms.dataAxis     = DATA_AXIS\n        shader.uniforms.screenOffset = SCREEN_OFFSET\n        shader.uniforms.color        = textColor[axis+2]\n        shader.uniforms.angle        = textAngle[axis+2]\n        gl.drawArrays(\n          gl.TRIANGLES,\n          tickOffset[start],\n          tickOffset[end] - tickOffset[start])\n      }\n    }\n    if(labelEnable[axis+2] && labelCount) {\n      SCREEN_OFFSET[axis^1] += screenScale * pixelRatio * labelPad[axis+2]\n      shader.uniforms.dataAxis     = ZERO_2\n      shader.uniforms.screenOffset = SCREEN_OFFSET\n      shader.uniforms.color        = labelColor[axis+2]\n      shader.uniforms.angle        = labelAngle[axis+2]\n      gl.drawArrays(\n        gl.TRIANGLES,\n        labelOffset,\n        labelCount)\n    }\n\n  }\n})()\n\nproto.drawTitle = (function() {\n  var DATA_AXIS = [0,0]\n  var SCREEN_OFFSET = [0,0]\n\n  return function() {\n    var plot        = this.plot\n    var shader      = this.shader\n    var gl          = plot.gl\n    var screenBox   = plot.screenBox\n    var titleCenter = plot.titleCenter\n    var titleAngle  = plot.titleAngle\n    var titleColor  = plot.titleColor\n    var pixelRatio  = plot.pixelRatio\n\n    if(!this.titleCount) {\n      return\n    }\n\n    for(var i=0; i<2; ++i) {\n      SCREEN_OFFSET[i] = 2.0 * (titleCenter[i]*pixelRatio - screenBox[i]) /\n        (screenBox[2+i] - screenBox[i]) - 1\n    }\n\n    shader.bind()\n    shader.uniforms.dataAxis      = DATA_AXIS\n    shader.uniforms.screenOffset  = SCREEN_OFFSET\n    shader.uniforms.angle         = titleAngle\n    shader.uniforms.color         = titleColor\n\n    gl.drawArrays(gl.TRIANGLES, this.titleOffset, this.titleCount)\n  }\n})()\n\nproto.bind = (function() {\n  var DATA_SHIFT = [0,0]\n  var DATA_SCALE = [0,0]\n  var TEXT_SCALE = [0,0]\n\n  return function() {\n    var plot      = this.plot\n    var shader    = this.shader\n    var bounds    = plot._tickBounds\n    var dataBox   = plot.dataBox\n    var screenBox = plot.screenBox\n    var viewBox   = plot.viewBox\n\n    shader.bind()\n\n    //Set up coordinate scaling uniforms\n    for(var i=0; i<2; ++i) {\n\n      var lo = bounds[i]\n      var hi = bounds[i+2]\n      var boundScale = hi - lo\n      var dataCenter  = 0.5 * (dataBox[i+2] + dataBox[i])\n      var dataWidth   = (dataBox[i+2] - dataBox[i])\n\n      var viewLo = viewBox[i]\n      var viewHi = viewBox[i+2]\n      var viewScale = viewHi - viewLo\n      var screenLo = screenBox[i]\n      var screenHi = screenBox[i+2]\n      var screenScale = screenHi - screenLo\n\n      DATA_SCALE[i] = 2.0 * boundScale / dataWidth * viewScale / screenScale\n      DATA_SHIFT[i] = 2.0 * (lo - dataCenter) / dataWidth * viewScale / screenScale\n    }\n\n    TEXT_SCALE[1] = 2.0 * plot.pixelRatio / (screenBox[3] - screenBox[1])\n    TEXT_SCALE[0] = TEXT_SCALE[1] * (screenBox[3] - screenBox[1]) / (screenBox[2] - screenBox[0])\n\n    shader.uniforms.dataScale = DATA_SCALE\n    shader.uniforms.dataShift = DATA_SHIFT\n    shader.uniforms.textScale = TEXT_SCALE\n\n    //Set attributes\n    this.vbo.bind()\n    shader.attributes.textCoordinate.pointer()\n  }\n})()\n\nproto.update = function(options) {\n  var vertices  = []\n  var axesTicks = options.ticks\n  var bounds    = options.bounds\n  var i, j, k, data, scale, dimension\n\n  for(dimension=0; dimension<2; ++dimension) {\n    var offsets = [Math.floor(vertices.length/3)], tickX = [-Infinity]\n\n    //Copy vertices over to buffer\n    var ticks = axesTicks[dimension]\n    for(i=0; i<ticks.length; ++i) {\n      var tick  = ticks[i]\n      var x     = tick.x\n      var text  = tick.text\n      var font  = tick.font || 'sans-serif'\n      scale = (tick.fontSize || 12)\n\n      var coordScale = 1.0 / (bounds[dimension+2] - bounds[dimension])\n      var coordShift = bounds[dimension]\n\n      var rows = text.split('\\n')\n      for(var r = 0; r < rows.length; r++) {\n        data = getText(font, rows[r]).data\n        for (j = 0; j < data.length; j += 2) {\n          vertices.push(\n              data[j] * scale,\n              -data[j + 1] * scale - r * scale * 1.2,\n              (x - coordShift) * coordScale)\n        }\n      }\n\n      offsets.push(Math.floor(vertices.length/3))\n      tickX.push(x)\n    }\n\n    this.tickOffset[dimension] = offsets\n    this.tickX[dimension] = tickX\n  }\n\n  //Add labels\n  for(dimension=0; dimension<2; ++dimension) {\n    this.labelOffset[dimension] = Math.floor(vertices.length/3)\n\n    data  = getText(options.labelFont[dimension], options.labels[dimension], { textAlign: 'center' }).data\n    scale = options.labelSize[dimension]\n    for(i=0; i<data.length; i+=2) {\n      vertices.push(data[i]*scale, -data[i+1]*scale, 0)\n    }\n\n    this.labelCount[dimension] =\n      Math.floor(vertices.length/3) - this.labelOffset[dimension]\n  }\n\n  //Add title\n  this.titleOffset = Math.floor(vertices.length/3)\n  data = getText(options.titleFont, options.title).data\n  scale = options.titleSize\n  for(i=0; i<data.length; i+=2) {\n    vertices.push(data[i]*scale, -data[i+1]*scale, 0)\n  }\n  this.titleCount = Math.floor(vertices.length/3) - this.titleOffset\n\n  //Upload new vertices\n  this.vbo.update(vertices)\n}\n\nproto.dispose = function() {\n  this.vbo.dispose()\n  this.shader.dispose()\n}\n\nfunction createTextElements(plot) {\n  var gl = plot.gl\n  var vbo = createBuffer(gl)\n  var shader = createShader(gl, shaders.textVert, shaders.textFrag)\n  var text = new TextElements(plot, vbo, shader)\n  return text\n}\n\n},{\"./shaders\":283,\"binary-search-bounds\":285,\"gl-buffer\":240,\"gl-shader\":300,\"text-cache\":523}],285:[function(_dereq_,module,exports){\narguments[4][104][0].apply(exports,arguments)\n},{\"dup\":104}],286:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createGLPlot2D\n\nvar createPick = _dereq_('gl-select-static')\n\nvar createGrid = _dereq_('./lib/grid')\nvar createText = _dereq_('./lib/text')\nvar createLine = _dereq_('./lib/line')\nvar createBox  = _dereq_('./lib/box')\n\nfunction GLPlot2D(gl, pickBuffer) {\n  this.gl               = gl\n  this.pickBuffer       = pickBuffer\n\n  this.screenBox        = [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight]\n  this.viewBox          = [0, 0, 0, 0]\n  this.dataBox          = [-10, -10, 10, 10]\n\n  this.gridLineEnable   = [true,true]\n  this.gridLineWidth    = [1,1]\n  this.gridLineColor    = [[0,0,0,1],\n                           [0,0,0,1]]\n\n  this.pixelRatio       = 1\n\n  this.tickMarkLength   = [0,0,0,0]\n  this.tickMarkWidth    = [0,0,0,0]\n  this.tickMarkColor    = [[0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1]]\n\n  this.tickPad          = [15,15,15,15]\n  this.tickAngle        = [0,0,0,0]\n  this.tickEnable       = [true,true,true,true]\n  this.tickColor        = [[0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1]]\n\n  this.labelPad         = [15,15,15,15]\n  this.labelAngle       = [0,Math.PI/2,0,3.0*Math.PI/2]\n  this.labelEnable      = [true,true,true,true]\n  this.labelColor       = [[0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1]]\n\n  this.titleCenter      = [0,0]\n  this.titleEnable      = true\n  this.titleAngle       = 0\n  this.titleColor       = [0,0,0,1]\n\n  this.borderColor      = [0,0,0,0]\n  this.backgroundColor  = [0,0,0,0]\n\n  this.zeroLineEnable   = [true, true]\n  this.zeroLineWidth    = [4, 4]\n  this.zeroLineColor    = [[0, 0, 0, 1],[0, 0, 0, 1]]\n\n  this.borderLineEnable = [true,true,true,true]\n  this.borderLineWidth  = [2,2,2,2]\n  this.borderLineColor  = [[0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1]]\n\n  //Drawing parameters\n  this.grid             = null\n  this.text             = null\n  this.line             = null\n  this.box              = null\n  this.objects          = []\n  this.overlays         = []\n\n  this._tickBounds      = [Infinity, Infinity, -Infinity, -Infinity]\n\n  this.static = false\n\n  this.dirty        = false\n  this.pickDirty    = false\n  this.pickDelay    = 120\n  this.pickRadius   = 10\n  this._pickTimeout = null\n  this._drawPick    = this.drawPick.bind(this)\n\n  this._depthCounter = 0\n}\n\nvar proto = GLPlot2D.prototype\n\nproto.setDirty = function() {\n  this.dirty = this.pickDirty = true\n}\n\nproto.setOverlayDirty = function() {\n  this.dirty = true\n}\n\nproto.nextDepthValue = function() {\n  return (this._depthCounter++) / 65536.0\n}\n\nfunction lerp(a, b, t) {\n  var s = 0.5 * (t + 1.0)\n  return Math.floor((1.0-s)*a + s*b)|0\n}\n\nproto.draw = (function() {\nvar TICK_MARK_BOX = [0,0,0,0]\nreturn function() {\n  var gl         = this.gl\n  var screenBox  = this.screenBox\n  var viewPixels = this.viewBox\n  var dataBox    = this.dataBox\n  var pixelRatio = this.pixelRatio\n  var grid       = this.grid\n  var line       = this.line\n  var text       = this.text\n  var objects    = this.objects\n\n  this._depthCounter = 0\n\n  if(this.pickDirty) {\n    if(this._pickTimeout) {\n      clearTimeout(this._pickTimeout)\n    }\n    this.pickDirty = false\n    this._pickTimeout = setTimeout(this._drawPick, this.pickDelay)\n  }\n\n  if(!this.dirty) {\n    return\n  }\n  this.dirty = false\n\n  gl.bindFramebuffer(gl.FRAMEBUFFER, null)\n\n  //Turn on scissor\n  gl.enable(gl.SCISSOR_TEST)\n\n  //Turn off depth buffer\n  gl.disable(gl.DEPTH_TEST)\n  gl.depthFunc(gl.LESS)\n  gl.depthMask(false)\n\n  //Configure premultiplied alpha blending\n  gl.enable(gl.BLEND)\n  gl.blendEquation(gl.FUNC_ADD, gl.FUNC_ADD);\n  gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n\n  //Draw border\n  if (this.borderColor) {\n    gl.scissor(\n      screenBox[0],\n      screenBox[1],\n      screenBox[2]-screenBox[0],\n      screenBox[3]-screenBox[1])\n    var borderColor = this.borderColor\n    gl.clearColor(\n      borderColor[0]*borderColor[3],\n      borderColor[1]*borderColor[3],\n      borderColor[2]*borderColor[3],\n      borderColor[3])\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)\n  }\n\n  //Draw center pane\n  gl.scissor(\n    viewPixels[0],\n    viewPixels[1],\n    viewPixels[2]-viewPixels[0],\n    viewPixels[3]-viewPixels[1])\n  gl.viewport(\n    viewPixels[0],\n    viewPixels[1],\n    viewPixels[2]-viewPixels[0],\n    viewPixels[3]-viewPixels[1])\n  var backgroundColor = this.backgroundColor\n  gl.clearColor(\n    backgroundColor[0]*backgroundColor[3],\n    backgroundColor[1]*backgroundColor[3],\n    backgroundColor[2]*backgroundColor[3],\n    backgroundColor[3])\n  gl.clear(gl.COLOR_BUFFER_BIT)\n\n  //Draw grid\n  grid.draw()\n\n  //Draw zero lines separately\n  var zeroLineEnable = this.zeroLineEnable\n  var zeroLineColor  = this.zeroLineColor\n  var zeroLineWidth  = this.zeroLineWidth\n  if(zeroLineEnable[0] || zeroLineEnable[1]) {\n    line.bind()\n    for(var i=0; i<2; ++i) {\n      if(!zeroLineEnable[i] ||\n        !(dataBox[i] <= 0 && dataBox[i+2] >= 0)) {\n        continue\n      }\n\n      var zeroIntercept = screenBox[i] -\n        dataBox[i] * (screenBox[i+2] - screenBox[i]) / (dataBox[i+2] - dataBox[i])\n\n      if(i === 0) {\n        line.drawLine(\n          zeroIntercept, screenBox[1], zeroIntercept, screenBox[3],\n          zeroLineWidth[i],\n          zeroLineColor[i])\n      } else {\n        line.drawLine(\n          screenBox[0], zeroIntercept, screenBox[2], zeroIntercept,\n          zeroLineWidth[i],\n          zeroLineColor[i])\n      }\n    }\n  }\n\n  //Draw traces\n  for(var i=0; i<objects.length; ++i) {\n    objects[i].draw()\n  }\n\n  //Return viewport to default\n  gl.viewport(\n    screenBox[0],\n    screenBox[1],\n    screenBox[2]-screenBox[0],\n    screenBox[3]-screenBox[1])\n  gl.scissor(\n    screenBox[0],\n    screenBox[1],\n    screenBox[2]-screenBox[0],\n    screenBox[3]-screenBox[1])\n\n  //Draw tick marks\n  this.grid.drawTickMarks()\n\n  //Draw line elements\n  line.bind()\n\n  //Draw border lines\n  var borderLineEnable = this.borderLineEnable\n  var borderLineWidth  = this.borderLineWidth\n  var borderLineColor  = this.borderLineColor\n  if(borderLineEnable[1]) {\n    line.drawLine(\n      viewPixels[0], viewPixels[1] - 0.5*borderLineWidth[1]*pixelRatio,\n      viewPixels[0], viewPixels[3] + 0.5*borderLineWidth[3]*pixelRatio,\n      borderLineWidth[1], borderLineColor[1])\n  }\n  if(borderLineEnable[0]) {\n    line.drawLine(\n      viewPixels[0] - 0.5*borderLineWidth[0]*pixelRatio, viewPixels[1],\n      viewPixels[2] + 0.5*borderLineWidth[2]*pixelRatio, viewPixels[1],\n      borderLineWidth[0], borderLineColor[0])\n  }\n  if(borderLineEnable[3]) {\n    line.drawLine(\n      viewPixels[2], viewPixels[1] - 0.5*borderLineWidth[1]*pixelRatio,\n      viewPixels[2], viewPixels[3] + 0.5*borderLineWidth[3]*pixelRatio,\n      borderLineWidth[3], borderLineColor[3])\n  }\n  if(borderLineEnable[2]) {\n    line.drawLine(\n      viewPixels[0] - 0.5*borderLineWidth[0]*pixelRatio, viewPixels[3],\n      viewPixels[2] + 0.5*borderLineWidth[2]*pixelRatio, viewPixels[3],\n      borderLineWidth[2], borderLineColor[2])\n  }\n\n  //Draw text elements\n  text.bind()\n  for(var i=0; i<2; ++i) {\n    text.drawTicks(i)\n  }\n  if(this.titleEnable) {\n    text.drawTitle()\n  }\n\n  //Draw other overlay elements (select boxes, etc.)\n  var overlays = this.overlays\n  for(var i=0; i<overlays.length; ++i) {\n    overlays[i].draw()\n  }\n\n  //Turn off scissor test\n  gl.disable(gl.SCISSOR_TEST)\n  gl.disable(gl.BLEND)\n  gl.depthMask(true)\n}\n})()\n\nproto.drawPick = (function() {\n\nreturn function() {\n  if (this.static) return;\n\n  var pickBuffer = this.pickBuffer\n  var gl = this.gl\n\n  this._pickTimeout = null\n  pickBuffer.begin()\n\n  var pickOffset = 1\n  var objects = this.objects\n  for(var i=0; i<objects.length; ++i) {\n    pickOffset = objects[i].drawPick(pickOffset)\n  }\n\n  pickBuffer.end()\n}\n})()\n\nproto.pick = (function() {\nreturn function(x, y) {\n  if (this.static) return;\n\n  var pixelRatio     = this.pixelRatio\n  var pickPixelRatio = this.pickPixelRatio\n  var viewBox        = this.viewBox\n\n  var scrX = Math.round((x - viewBox[0] / pixelRatio) * pickPixelRatio)|0\n  var scrY = Math.round((y - viewBox[1] / pixelRatio) * pickPixelRatio)|0\n\n  var pickResult = this.pickBuffer.query(scrX, scrY, this.pickRadius)\n  if(!pickResult) {\n    return null\n  }\n\n  var pickValue = pickResult.id +\n    (pickResult.value[0]<<8)  +\n    (pickResult.value[1]<<16) +\n    (pickResult.value[2]<<24)\n\n  var objects = this.objects\n  for(var i=0; i<objects.length; ++i) {\n    var result = objects[i].pick(scrX, scrY, pickValue)\n    if(result) {\n      return result\n    }\n  }\n\n  return null\n}\n})()\n\nfunction deepClone(array) {\n  var result = array.slice()\n  for(var i=0; i<result.length; ++i) {\n    result[i] = result[i].slice()\n  }\n  return result\n}\n\nfunction compareTicks(a, b) {\n  return a.x - b.x\n}\n\nproto.setScreenBox = function(nbox) {\n  var screenBox = this.screenBox\n  var pixelRatio = this.pixelRatio\n\n  screenBox[0] = Math.round(nbox[0] * pixelRatio) | 0\n  screenBox[1] = Math.round(nbox[1] * pixelRatio) | 0\n  screenBox[2] = Math.round(nbox[2] * pixelRatio) | 0\n  screenBox[3] = Math.round(nbox[3] * pixelRatio) | 0\n\n  this.setDirty()\n}\n\nproto.setDataBox = function(nbox) {\n  var dataBox = this.dataBox\n\n  var different =\n    dataBox[0] !== nbox[0] ||\n    dataBox[1] !== nbox[1] ||\n    dataBox[2] !== nbox[2] ||\n    dataBox[3] !== nbox[3]\n\n  if(different) {\n    dataBox[0] = nbox[0]\n    dataBox[1] = nbox[1]\n    dataBox[2] = nbox[2]\n    dataBox[3] = nbox[3]\n\n    this.setDirty()\n  }\n}\n\nproto.setViewBox = function(nbox) {\n  var pixelRatio = this.pixelRatio\n  var viewBox = this.viewBox\n\n  viewBox[0] = Math.round(nbox[0] * pixelRatio)|0\n  viewBox[1] = Math.round(nbox[1] * pixelRatio)|0\n  viewBox[2] = Math.round(nbox[2] * pixelRatio)|0\n  viewBox[3] = Math.round(nbox[3] * pixelRatio)|0\n\n  var pickPixelRatio = this.pickPixelRatio\n  this.pickBuffer.shape = [\n    Math.round((nbox[2] - nbox[0]) * pickPixelRatio)|0,\n    Math.round((nbox[3] - nbox[1]) * pickPixelRatio)|0 ]\n\n  this.setDirty()\n}\n\nproto.update = function(options) {\n  options = options || {}\n\n  var gl = this.gl\n\n  this.pixelRatio      = options.pixelRatio || 1\n\n  var pixelRatio       = this.pixelRatio\n  this.pickPixelRatio  = Math.max(pixelRatio, 1)\n\n  this.setScreenBox(options.screenBox ||\n    [0, 0, gl.drawingBufferWidth/pixelRatio, gl.drawingBufferHeight/pixelRatio])\n\n  var screenBox = this.screenBox\n  this.setViewBox(options.viewBox ||\n    [0.125*(this.screenBox[2]-this.screenBox[0])/pixelRatio,\n     0.125*(this.screenBox[3]-this.screenBox[1])/pixelRatio,\n     0.875*(this.screenBox[2]-this.screenBox[0])/pixelRatio,\n     0.875*(this.screenBox[3]-this.screenBox[1])/pixelRatio])\n\n  var viewBox = this.viewBox\n  var aspectRatio = (viewBox[2] - viewBox[0]) / (viewBox[3] - viewBox[1])\n  this.setDataBox(options.dataBox || [-10, -10/aspectRatio, 10, 10/aspectRatio])\n\n  this.borderColor     = options.borderColor !== false ? (options.borderColor || [0,0,0,0]).slice() : false\n  this.backgroundColor = (options.backgroundColor || [0,0,0,0]).slice()\n\n  this.gridLineEnable  = (options.gridLineEnable || [true,true]).slice()\n  this.gridLineWidth   = (options.gridLineWidth || [1,1]).slice()\n  this.gridLineColor   = deepClone(options.gridLineColor ||\n    [[0.5,0.5,0.5,1],[0.5,0.5,0.5,1]])\n\n  this.zeroLineEnable   = (options.zeroLineEnable || [true, true]).slice()\n  this.zeroLineWidth    = (options.zeroLineWidth || [4, 4]).slice()\n  this.zeroLineColor    = deepClone(options.zeroLineColor ||\n    [[0, 0, 0, 1],[0, 0, 0, 1]])\n\n  this.tickMarkLength   = (options.tickMarkLength || [0,0,0,0]).slice()\n  this.tickMarkWidth    = (options.tickMarkWidth || [0,0,0,0]).slice()\n  this.tickMarkColor    = deepClone(options.tickMarkColor ||\n    [[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]])\n\n  this.titleCenter      = (options.titleCenter || [\n    0.5*(viewBox[0]+viewBox[2])/pixelRatio,(viewBox[3]+120)/pixelRatio]).slice()\n  this.titleEnable      = !('titleEnable' in options) || !!options.titleEnable\n  this.titleAngle       = options.titleAngle || 0\n  this.titleColor       = (options.titleColor || [0,0,0,1]).slice()\n\n  this.labelPad         = (options.labelPad || [15,15,15,15]).slice()\n  this.labelAngle       = (options.labelAngle ||\n    [0,Math.PI/2,0,3.0*Math.PI/2]).slice()\n  this.labelEnable      = (options.labelEnable || [true,true,true,true]).slice()\n  this.labelColor       = deepClone(options.labelColor ||\n    [[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]])\n\n  this.tickPad         = (options.tickPad || [15,15,15,15]).slice()\n  this.tickAngle       = (options.tickAngle || [0,0,0,0]).slice()\n  this.tickEnable      = (options.tickEnable || [true,true,true,true]).slice()\n  this.tickColor       = deepClone(options.tickColor ||\n    [[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]])\n\n  this.borderLineEnable = (options.borderLineEnable ||\n                            [true,true,true,true]).slice()\n  this.borderLineWidth  = (options.borderLineWidth || [2,2,2,2]).slice()\n  this.borderLineColor  = deepClone(options.borderLineColor ||\n                          [[0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1],\n                           [0,0,0,1]])\n\n  var ticks = options.ticks || [ [], [] ]\n\n  //Compute bounds on ticks\n  var bounds = this._tickBounds\n  bounds[0] = bounds[1] =  Infinity\n  bounds[2] = bounds[3] = -Infinity\n  for(var i=0; i<2; ++i) {\n    var axisTicks = ticks[i].slice(0)\n    if(axisTicks.length === 0) {\n      continue\n    }\n    axisTicks.sort(compareTicks)\n    bounds[i]   = Math.min(bounds[i], axisTicks[0].x)\n    bounds[i+2] = Math.max(bounds[i+2], axisTicks[axisTicks.length-1].x)\n  }\n\n  //Update grid\n  this.grid.update({\n    bounds: bounds,\n    ticks:  ticks\n  })\n\n  //Update text\n  this.text.update({\n    bounds:     bounds,\n    ticks:      ticks,\n    labels:     options.labels    || ['x', 'y'],\n    labelSize:  options.labelSize || [12,12],\n    labelFont:  options.labelFont || ['sans-serif', 'sans-serif'],\n    title:      options.title     || '',\n    titleSize:  options.titleSize || 18,\n    titleFont:  options.titleFont || 'sans-serif'\n  })\n\n  this.static = !!options.static;\n\n  this.setDirty()\n}\n\nproto.dispose = function() {\n  this.box.dispose()\n  this.grid.dispose()\n  this.text.dispose()\n  this.line.dispose()\n  for(var i=this.objects.length-1; i>=0; --i) {\n    this.objects[i].dispose()\n  }\n  this.objects.length = 0\n  for(var i=this.overlays.length-1; i>=0; --i) {\n    this.overlays[i].dispose()\n  }\n  this.overlays.length = 0\n\n  this.gl = null\n}\n\nproto.addObject = function(object) {\n  if(this.objects.indexOf(object) < 0) {\n    this.objects.push(object)\n    this.setDirty()\n  }\n}\n\nproto.removeObject = function(object) {\n  var objects = this.objects\n  for(var i=0; i<objects.length; ++i) {\n    if(objects[i] === object) {\n      objects.splice(i,1)\n      this.setDirty()\n      break\n    }\n  }\n}\n\nproto.addOverlay = function(object) {\n  if(this.overlays.indexOf(object) < 0) {\n    this.overlays.push(object)\n    this.setOverlayDirty()\n  }\n}\n\nproto.removeOverlay = function(object) {\n  var objects = this.overlays\n  for(var i=0; i<objects.length; ++i) {\n    if(objects[i] === object) {\n      objects.splice(i,1)\n      this.setOverlayDirty()\n      break\n    }\n  }\n}\n\nfunction createGLPlot2D(options) {\n  var gl = options.gl\n  var pickBuffer = createPick(gl, [\n    gl.drawingBufferWidth, gl.drawingBufferHeight])\n  var plot = new GLPlot2D(gl, pickBuffer)\n  plot.grid = createGrid(plot)\n  plot.text = createText(plot)\n  plot.line = createLine(plot)\n  plot.box  = createBox(plot)\n  plot.update(options)\n  return plot\n}\n\n},{\"./lib/box\":280,\"./lib/grid\":281,\"./lib/line\":282,\"./lib/text\":284,\"gl-select-static\":299}],287:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createCamera\n\nvar now         = _dereq_('right-now')\nvar createView  = _dereq_('3d-view')\nvar mouseChange = _dereq_('mouse-change')\nvar mouseWheel  = _dereq_('mouse-wheel')\nvar mouseOffset = _dereq_('mouse-event-offset')\nvar hasPassive  = _dereq_('has-passive-events')\n\nfunction createCamera(element, options) {\n  element = element || document.body\n  options = options || {}\n\n  var limits  = [ 0.01, Infinity ]\n  if('distanceLimits' in options) {\n    limits[0] = options.distanceLimits[0]\n    limits[1] = options.distanceLimits[1]\n  }\n  if('zoomMin' in options) {\n    limits[0] = options.zoomMin\n  }\n  if('zoomMax' in options) {\n    limits[1] = options.zoomMax\n  }\n\n  var view = createView({\n    center: options.center || [0,0,0],\n    up:     options.up     || [0,1,0],\n    eye:    options.eye    || [0,0,10],\n    mode:   options.mode   || 'orbit',\n    distanceLimits: limits\n  })\n\n  var pmatrix = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]\n  var distance = 0.0\n  var width   = element.clientWidth\n  var height  = element.clientHeight\n\n  var camera = {\n    keyBindingMode: 'rotate',\n    enableWheel: true,\n    view:               view,\n    element:            element,\n    delay:              options.delay          || 16,\n    rotateSpeed:        options.rotateSpeed    || 1,\n    zoomSpeed:          options.zoomSpeed      || 1,\n    translateSpeed:     options.translateSpeed || 1,\n    flipX:              !!options.flipX,\n    flipY:              !!options.flipY,\n    modes:              view.modes,\n    _ortho: options._ortho || (options.projection && options.projection.type === 'orthographic') || false,\n    tick: function() {\n      var t = now()\n      var delay = this.delay\n      var ctime = t - 2 * delay\n      view.idle(t-delay)\n      view.recalcMatrix(ctime)\n      view.flush(t-(100+delay*2))\n      var allEqual = true\n      var matrix = view.computedMatrix\n      for(var i=0; i<16; ++i) {\n        allEqual = allEqual && (pmatrix[i] === matrix[i])\n        pmatrix[i] = matrix[i]\n      }\n      var sizeChanged =\n          element.clientWidth === width &&\n          element.clientHeight === height\n      width  = element.clientWidth\n      height = element.clientHeight\n      if(allEqual) {\n        return !sizeChanged\n      }\n      distance = Math.exp(view.computedRadius[0])\n      return true\n    },\n    lookAt: function(eye, center, up) {\n      view.lookAt(view.lastT(), eye, center, up)\n    },\n    rotate: function(pitch, yaw, roll) {\n      view.rotate(view.lastT(), pitch, yaw, roll)\n    },\n    pan: function(dx, dy, dz) {\n      view.pan(view.lastT(), dx, dy, dz)\n    },\n    translate: function(dx, dy, dz) {\n      view.translate(view.lastT(), dx, dy, dz)\n    }\n  }\n\n  Object.defineProperties(camera, {\n    matrix: {\n      get: function() {\n        return view.computedMatrix\n      },\n      set: function(mat) {\n        view.setMatrix(view.lastT(), mat)\n        return view.computedMatrix\n      },\n      enumerable: true\n    },\n    mode: {\n      get: function() {\n        return view.getMode()\n      },\n      set: function(mode) {\n        var curUp = view.computedUp.slice()\n        var curEye = view.computedEye.slice()\n        var curCenter = view.computedCenter.slice()\n        view.setMode(mode)\n        if(mode === 'turntable') {\n          // Hacky time warping stuff to generate smooth animation\n          var t0 = now()\n          view._active.lookAt(t0, curEye, curCenter, curUp)\n          view._active.lookAt(t0 + 500, curEye, curCenter, [0, 0, 1])\n          view._active.flush(t0)\n        }\n        return view.getMode()\n      },\n      enumerable: true\n    },\n    center: {\n      get: function() {\n        return view.computedCenter\n      },\n      set: function(ncenter) {\n        view.lookAt(view.lastT(), null, ncenter)\n        return view.computedCenter\n      },\n      enumerable: true\n    },\n    eye: {\n      get: function() {\n        return view.computedEye\n      },\n      set: function(neye) {\n        view.lookAt(view.lastT(), neye)\n        return view.computedEye\n      },\n      enumerable: true\n    },\n    up: {\n      get: function() {\n        return view.computedUp\n      },\n      set: function(nup) {\n        view.lookAt(view.lastT(), null, null, nup)\n        return view.computedUp\n      },\n      enumerable: true\n    },\n    distance: {\n      get: function() {\n        return distance\n      },\n      set: function(d) {\n        view.setDistance(view.lastT(), d)\n        return d\n      },\n      enumerable: true\n    },\n    distanceLimits: {\n      get: function() {\n        return view.getDistanceLimits(limits)\n      },\n      set: function(v) {\n        view.setDistanceLimits(v)\n        return v\n      },\n      enumerable: true\n    }\n  })\n\n  element.addEventListener('contextmenu', function(ev) {\n    ev.preventDefault()\n    return false\n  })\n\n  camera._lastX = -1\n  camera._lastY = -1\n  camera._lastMods = {shift: false, control: false, alt: false, meta: false}\n\n  camera.enableMouseListeners = function() {\n\n    camera.mouseListener = mouseChange(element, handleInteraction)\n\n    //enable simple touch interactions\n    element.addEventListener('touchstart', function (ev) {\n      var xy = mouseOffset(ev.changedTouches[0], element)\n      handleInteraction(0, xy[0], xy[1], camera._lastMods)\n      handleInteraction(1, xy[0], xy[1], camera._lastMods)\n\n      ev.preventDefault()\n    }, hasPassive ? {passive: false} : false)\n\n    element.addEventListener('touchmove', function (ev) {\n      var xy = mouseOffset(ev.changedTouches[0], element)\n      handleInteraction(1, xy[0], xy[1], camera._lastMods)\n\n      ev.preventDefault()\n    }, hasPassive ? {passive: false} : false)\n\n    element.addEventListener('touchend', function (ev) {\n\n      handleInteraction(0, camera._lastX, camera._lastY, camera._lastMods)\n\n      ev.preventDefault()\n    }, hasPassive ? {passive: false} : false)\n\n    function handleInteraction (buttons, x, y, mods) {\n      var keyBindingMode = camera.keyBindingMode\n\n      if(keyBindingMode === false) return\n\n      var rotate = keyBindingMode === 'rotate'\n      var pan = keyBindingMode === 'pan'\n      var zoom = keyBindingMode === 'zoom'\n\n      var ctrl = !!mods.control\n      var alt = !!mods.alt\n      var shift = !!mods.shift\n      var left = !!(buttons & 1)\n      var right = !!(buttons & 2)\n      var middle = !!(buttons & 4)\n\n      var scale = 1.0 / element.clientHeight\n      var dx    = scale * (x - camera._lastX)\n      var dy    = scale * (y - camera._lastY)\n\n      var flipX = camera.flipX ? 1 : -1\n      var flipY = camera.flipY ? 1 : -1\n\n      var drot  = Math.PI * camera.rotateSpeed\n\n      var t = now()\n\n      if(camera._lastX !== -1 && camera._lastY !== -1) {\n        if((rotate && left && !ctrl && !alt && !shift) || (left && !ctrl && !alt && shift)) {\n          // Rotate\n          view.rotate(t, flipX * drot * dx, -flipY * drot * dy, 0)\n        }\n\n        if((pan && left && !ctrl && !alt && !shift) || right || (left && ctrl && !alt && !shift)) {\n          // Pan\n          view.pan(t, -camera.translateSpeed * dx * distance, camera.translateSpeed * dy * distance, 0)\n        }\n\n        if((zoom && left && !ctrl && !alt && !shift) || middle || (left && !ctrl && alt && !shift)) {\n          // Zoom\n          var kzoom = -camera.zoomSpeed * dy / window.innerHeight * (t - view.lastT()) * 100\n          view.pan(t, 0, 0, distance * (Math.exp(kzoom) - 1))\n        }\n      }\n\n      camera._lastX = x\n      camera._lastY = y\n      camera._lastMods = mods\n\n      return true\n    }\n\n    camera.wheelListener = mouseWheel(element, function(dx, dy) {\n      // TODO remove now that we can disable scroll via scrollZoom?\n      if(camera.keyBindingMode === false) return\n      if(!camera.enableWheel) return\n\n      var flipX = camera.flipX ? 1 : -1\n      var flipY = camera.flipY ? 1 : -1\n      var t = now()\n      if(Math.abs(dx) > Math.abs(dy)) {\n        view.rotate(t, 0, 0, -dx * flipX * Math.PI * camera.rotateSpeed / window.innerWidth)\n      } else {\n        if(!camera._ortho) {\n          var kzoom = -camera.zoomSpeed * flipY * dy / window.innerHeight * (t - view.lastT()) / 20.0\n          view.pan(t, 0, 0, distance * (Math.exp(kzoom) - 1))\n        }\n      }\n    }, true)\n  }\n\n  camera.enableMouseListeners()\n\n  return camera\n}\n\n},{\"3d-view\":50,\"has-passive-events\":406,\"mouse-change\":430,\"mouse-event-offset\":431,\"mouse-wheel\":433,\"right-now\":491}],288:[function(_dereq_,module,exports){\nvar glslify      = _dereq_('glslify')\nvar createShader = _dereq_('gl-shader')\n\nvar vertSrc = glslify([\"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}\"])\nvar fragSrc = glslify([\"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}\"])\n\nmodule.exports = function(gl) {\n  return createShader(gl, vertSrc, fragSrc, null, [ { name: 'position', type: 'vec2'}])\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],289:[function(_dereq_,module,exports){\n'use strict'\n\nvar createCamera = _dereq_('./camera.js')\nvar createAxes   = _dereq_('gl-axes3d')\nvar axesRanges   = _dereq_('gl-axes3d/properties')\nvar createSpikes = _dereq_('gl-spikes3d')\nvar createSelect = _dereq_('gl-select-static')\nvar createFBO    = _dereq_('gl-fbo')\nvar drawTriangle = _dereq_('a-big-triangle')\nvar mouseChange  = _dereq_('mouse-change')\nvar mouseWheel   = _dereq_('mouse-wheel')\nvar perspective  = _dereq_('gl-mat4/perspective')\nvar ortho        = _dereq_('gl-mat4/ortho')\nvar createShader = _dereq_('./lib/shader')\nvar isMobile = _dereq_('is-mobile')({ tablet: true })\n\nmodule.exports = {\n  createScene: createScene,\n  createCamera: createCamera\n}\n\nfunction MouseSelect() {\n  this.mouse          = [-1,-1]\n  this.screen         = null\n  this.distance       = Infinity\n  this.index          = null\n  this.dataCoordinate = null\n  this.dataPosition   = null\n  this.object         = null\n  this.data           = null\n}\n\nfunction getContext(canvas, options) {\n  var gl = null\n  try {\n    gl = canvas.getContext('webgl', options)\n    if(!gl) {\n      gl = canvas.getContext('experimental-webgl', options)\n    }\n  } catch(e) {\n    return null\n  }\n  return gl\n}\n\nfunction roundUpPow10(x) {\n  var y = Math.round(Math.log(Math.abs(x)) / Math.log(10))\n  if(y < 0) {\n    var base = Math.round(Math.pow(10, -y))\n    return Math.ceil(x*base) / base\n  } else if(y > 0) {\n    var base = Math.round(Math.pow(10, y))\n    return Math.ceil(x/base) * base\n  }\n  return Math.ceil(x)\n}\n\nfunction defaultBool(x) {\n  if(typeof x === 'boolean') {\n    return x\n  }\n  return true\n}\n\nfunction createScene(options) {\n  options = options || {}\n  options.camera = options.camera || {}\n\n  var canvas = options.canvas\n  if(!canvas) {\n    canvas = document.createElement('canvas')\n    if(options.container) {\n      var container = options.container\n      container.appendChild(canvas)\n    } else {\n      document.body.appendChild(canvas)\n    }\n  }\n\n  var gl = options.gl\n  if(!gl) {\n    gl = getContext(canvas,\n      options.glOptions || {\n        premultipliedAlpha: true,\n        antialias: true,\n        preserveDrawingBuffer: isMobile\n      })\n  }\n  if(!gl) {\n    throw new Error('webgl not supported')\n  }\n\n  //Initial bounds\n  var bounds = options.bounds || [[-10,-10,-10], [10,10,10]]\n\n  //Create selection\n  var selection = new MouseSelect()\n\n  //Accumulation buffer\n  var accumBuffer = createFBO(gl,\n    [gl.drawingBufferWidth, gl.drawingBufferHeight], {\n      preferFloat: !isMobile\n    })\n\n  var accumShader = createShader(gl)\n\n  var isOrtho =\n    (options.cameraObject && options.cameraObject._ortho === true) ||\n    (options.camera.projection && options.camera.projection.type === 'orthographic') ||\n    false\n\n  //Create a camera\n  var cameraOptions = {\n    eye:     options.camera.eye     || [2,0,0],\n    center:  options.camera.center  || [0,0,0],\n    up:      options.camera.up      || [0,1,0],\n    zoomMin: options.camera.zoomMax || 0.1,\n    zoomMax: options.camera.zoomMin || 100,\n    mode:    options.camera.mode    || 'turntable',\n    _ortho:  isOrtho\n  }\n\n  //Create axes\n  var axesOptions = options.axes || {}\n  var axes = createAxes(gl, axesOptions)\n  axes.enable = !axesOptions.disable\n\n  //Create spikes\n  var spikeOptions = options.spikes || {}\n  var spikes = createSpikes(gl, spikeOptions)\n\n  //Object list is empty initially\n  var objects         = []\n  var pickBufferIds   = []\n  var pickBufferCount = []\n  var pickBuffers     = []\n\n  //Dirty flag, skip redraw if scene static\n  var dirty       = true\n  var pickDirty   = true\n\n  var projection     = new Array(16)\n  var model          = new Array(16)\n\n  var cameraParams = {\n    view:         null,\n    projection:   projection,\n    model:        model,\n    _ortho:        false\n  }\n\n  var pickDirty = true\n\n  var viewShape = [ gl.drawingBufferWidth, gl.drawingBufferHeight ]\n\n  var camera = options.cameraObject || createCamera(canvas, cameraOptions)\n\n  //Create scene object\n  var scene = {\n    gl:           gl,\n    contextLost:  false,\n    pixelRatio:   options.pixelRatio || 1,\n    canvas:       canvas,\n    selection:    selection,\n    camera:       camera,\n    axes:         axes,\n    axesPixels:   null,\n    spikes:       spikes,\n    bounds:       bounds,\n    objects:      objects,\n    shape:        viewShape,\n    aspect:       options.aspectRatio || [1,1,1],\n    pickRadius:   options.pickRadius || 10,\n    zNear:        options.zNear || 0.01,\n    zFar:         options.zFar  || 1000,\n    fovy:         options.fovy  || Math.PI/4,\n    clearColor:   options.clearColor || [0,0,0,0],\n    autoResize:   defaultBool(options.autoResize),\n    autoBounds:   defaultBool(options.autoBounds),\n    autoScale:    !!options.autoScale,\n    autoCenter:   defaultBool(options.autoCenter),\n    clipToBounds: defaultBool(options.clipToBounds),\n    snapToData:   !!options.snapToData,\n    onselect:     options.onselect || null,\n    onrender:     options.onrender || null,\n    onclick:      options.onclick  || null,\n    cameraParams: cameraParams,\n    oncontextloss: null,\n    mouseListener: null,\n    _stopped: false\n  }\n\n  var pickShape = [ (gl.drawingBufferWidth/scene.pixelRatio)|0, (gl.drawingBufferHeight/scene.pixelRatio)|0 ]\n\n  function resizeListener() {\n    if(scene._stopped) {\n      return\n    }\n    if(!scene.autoResize) {\n      return\n    }\n    var parent = canvas.parentNode\n    var width  = 1\n    var height = 1\n    if(parent && parent !== document.body) {\n      width  = parent.clientWidth\n      height = parent.clientHeight\n    } else {\n      width  = window.innerWidth\n      height = window.innerHeight\n    }\n    var nextWidth  = Math.ceil(width  * scene.pixelRatio)|0\n    var nextHeight = Math.ceil(height * scene.pixelRatio)|0\n    if(nextWidth !== canvas.width || nextHeight !== canvas.height) {\n      canvas.width   = nextWidth\n      canvas.height  = nextHeight\n      var style = canvas.style\n      style.position = style.position || 'absolute'\n      style.left     = '0px'\n      style.top      = '0px'\n      style.width    = width  + 'px'\n      style.height   = height + 'px'\n      dirty = true\n    }\n  }\n  if(scene.autoResize) {\n    resizeListener()\n  }\n  window.addEventListener('resize', resizeListener)\n\n  function reallocPickIds() {\n    var numObjs = objects.length\n    var numPick = pickBuffers.length\n    for(var i=0; i<numPick; ++i) {\n      pickBufferCount[i] = 0\n    }\n    obj_loop:\n    for(var i=0; i<numObjs; ++i) {\n      var obj = objects[i]\n      var pickCount = obj.pickSlots\n      if(!pickCount) {\n        pickBufferIds[i] = -1\n        continue\n      }\n      for(var j=0; j<numPick; ++j) {\n        if(pickBufferCount[j] + pickCount < 255) {\n          pickBufferIds[i] = j\n          obj.setPickBase(pickBufferCount[j]+1)\n          pickBufferCount[j] += pickCount\n          continue obj_loop\n        }\n      }\n      //Create new pick buffer\n      var nbuffer = createSelect(gl, viewShape)\n      pickBufferIds[i] = numPick\n      pickBuffers.push(nbuffer)\n      pickBufferCount.push(pickCount)\n      obj.setPickBase(1)\n      numPick += 1\n    }\n    while(numPick > 0 && pickBufferCount[numPick-1] === 0) {\n      pickBufferCount.pop()\n      pickBuffers.pop().dispose()\n    }\n  }\n\n  scene.update = function(options) {\n\n    if(scene._stopped) {\n      return\n    }\n    options = options || {}\n    dirty = true\n    pickDirty = true\n  }\n\n  scene.add = function(obj) {\n    if(scene._stopped) {\n      return\n    }\n    obj.axes = axes\n    objects.push(obj)\n    pickBufferIds.push(-1)\n    dirty = true\n    pickDirty = true\n    reallocPickIds()\n  }\n\n  scene.remove = function(obj) {\n    if(scene._stopped) {\n      return\n    }\n    var idx = objects.indexOf(obj)\n    if(idx < 0) {\n      return\n    }\n    objects.splice(idx, 1)\n    pickBufferIds.pop()\n    dirty = true\n    pickDirty = true\n    reallocPickIds()\n  }\n\n  scene.dispose = function() {\n    if(scene._stopped) {\n      return\n    }\n\n    scene._stopped = true\n\n    window.removeEventListener('resize', resizeListener)\n    canvas.removeEventListener('webglcontextlost', checkContextLoss)\n    scene.mouseListener.enabled = false\n\n    if(scene.contextLost) {\n      return\n    }\n\n    //Destroy objects\n    axes.dispose()\n    spikes.dispose()\n    for(var i=0; i<objects.length; ++i) {\n      objects[i].dispose()\n    }\n\n    //Clean up buffers\n    accumBuffer.dispose()\n    for(var i=0; i<pickBuffers.length; ++i) {\n      pickBuffers[i].dispose()\n    }\n\n    //Clean up shaders\n    accumShader.dispose()\n\n    //Release all references\n    gl = null\n    axes = null\n    spikes = null\n    objects = []\n  }\n\n  scene.wheelListener = mouseWheel(canvas, function(dx, dy) {\n    // TODO remove now that we can disable scroll via scrollZoom?\n    if(camera.keyBindingMode === false) return\n    if(!camera.enableWheel) return\n\n    if(camera._ortho) {\n      var s = (dx > dy) ? 1.1 : 1.0 / 1.1\n\n      scene.aspect[0] *= s\n      scene.aspect[1] *= s\n      scene.aspect[2] *= s\n      scene.redraw()\n    }\n  }, true)\n\n  //Update mouse position\n  scene._mouseRotating = false\n  scene._prevButtons = 0\n\n  scene.enableMouseListeners = function() {\n\n    scene.mouseListener = mouseChange(canvas, function(buttons, x, y) {\n      if(scene._stopped) {\n        return\n      }\n\n      var numPick = pickBuffers.length\n      var numObjs = objects.length\n      var prevObj = selection.object\n\n      selection.distance = Infinity\n      selection.mouse[0] = x\n      selection.mouse[1] = y\n      selection.object = null\n      selection.screen = null\n      selection.dataCoordinate = selection.dataPosition = null\n\n      var change = false\n\n      if(buttons && scene._prevButtons) {\n        scene._mouseRotating = true\n      } else {\n        if(scene._mouseRotating) {\n          pickDirty = true\n        }\n        scene._mouseRotating = false\n\n        for(var i=0; i<numPick; ++i) {\n          var result = pickBuffers[i].query(x, pickShape[1] - y - 1, scene.pickRadius)\n          if(result) {\n            if(result.distance > selection.distance) {\n              continue\n            }\n            for(var j=0; j<numObjs; ++j) {\n              var obj = objects[j]\n              if(pickBufferIds[j] !== i) {\n                continue\n              }\n              var objPick = obj.pick(result)\n              if(objPick) {\n                selection.buttons        = buttons\n                selection.screen         = result.coord\n                selection.distance       = result.distance\n                selection.object         = obj\n                selection.index          = objPick.distance\n                selection.dataPosition   = objPick.position\n                selection.dataCoordinate = objPick.dataCoordinate\n                selection.data           = objPick\n                change = true\n              }\n            }\n          }\n        }\n      }\n\n      if(prevObj && prevObj !== selection.object) {\n        if(prevObj.highlight) {\n          prevObj.highlight(null)\n        }\n        dirty = true\n      }\n      if(selection.object) {\n        if(selection.object.highlight) {\n          selection.object.highlight(selection.data)\n        }\n        dirty = true\n      }\n\n      change = change || (selection.object !== prevObj)\n      if(change && scene.onselect) {\n        scene.onselect(selection)\n      }\n\n      if((buttons & 1) && !(scene._prevButtons & 1) && scene.onclick) {\n        scene.onclick(selection)\n      }\n      scene._prevButtons = buttons\n    })\n  }\n\n  function checkContextLoss() {\n    if(scene.contextLost) {\n      return true\n    }\n    if(gl.isContextLost()) {\n      scene.contextLost = true\n      scene.mouseListener.enabled = false\n      scene.selection.object = null\n      if(scene.oncontextloss) {\n        scene.oncontextloss()\n      }\n    }\n  }\n\n  canvas.addEventListener('webglcontextlost', checkContextLoss)\n\n  //Render the scene for mouse picking\n  function renderPick() {\n    if(checkContextLoss()) {\n      return\n    }\n\n    gl.colorMask(true, true, true, true)\n    gl.depthMask(true)\n    gl.disable(gl.BLEND)\n    gl.enable(gl.DEPTH_TEST)\n\n    var numObjs = objects.length\n    var numPick = pickBuffers.length\n    for(var j=0; j<numPick; ++j) {\n      var buf = pickBuffers[j]\n      buf.shape = pickShape\n      buf.begin()\n      for(var i=0; i<numObjs; ++i) {\n        if(pickBufferIds[i] !== j) {\n          continue\n        }\n        var obj = objects[i]\n        if(obj.drawPick) {\n          obj.pixelRatio = 1\n          obj.drawPick(cameraParams)\n        }\n      }\n      buf.end()\n    }\n  }\n\n  var nBounds = [\n    [ Infinity, Infinity, Infinity],\n    [-Infinity,-Infinity,-Infinity]]\n\n  var prevBounds = [nBounds[0].slice(), nBounds[1].slice()]\n\n  function redraw() {\n    if(checkContextLoss()) {\n      return\n    }\n\n    resizeListener()\n\n    //Tick camera\n    var cameraMoved = scene.camera.tick()\n    cameraParams.view = scene.camera.matrix\n    dirty     = dirty || cameraMoved\n    pickDirty = pickDirty || cameraMoved\n\n      //Set pixel ratio\n    axes.pixelRatio   = scene.pixelRatio\n    spikes.pixelRatio = scene.pixelRatio\n\n    //Check if any objects changed, recalculate bounds\n    var numObjs = objects.length\n    var lo = nBounds[0]\n    var hi = nBounds[1]\n    lo[0] = lo[1] = lo[2] =  Infinity\n    hi[0] = hi[1] = hi[2] = -Infinity\n    for(var i=0; i<numObjs; ++i) {\n      var obj = objects[i]\n\n      //Set the axes properties for each object\n      obj.pixelRatio = scene.pixelRatio\n      obj.axes = scene.axes\n\n      dirty = dirty || !!obj.dirty\n      pickDirty = pickDirty || !!obj.dirty\n      var obb = obj.bounds\n      if(obb) {\n        var olo = obb[0]\n        var ohi = obb[1]\n        for(var j=0; j<3; ++j) {\n          lo[j] = Math.min(lo[j], olo[j])\n          hi[j] = Math.max(hi[j], ohi[j])\n        }\n      }\n    }\n\n    //Recalculate bounds\n    var bounds = scene.bounds\n    if(scene.autoBounds) {\n      for(var j=0; j<3; ++j) {\n        if(hi[j] < lo[j]) {\n          lo[j] = -1\n          hi[j] = 1\n        } else {\n          if(lo[j] === hi[j]) {\n            lo[j] -= 1\n            hi[j] += 1\n          }\n          var padding = 0.05 * (hi[j] - lo[j])\n          lo[j] = lo[j] - padding\n          hi[j] = hi[j] + padding\n        }\n        bounds[0][j] = lo[j]\n        bounds[1][j] = hi[j]\n      }\n    }\n\n    var boundsChanged = false\n    for(var j=0; j<3; ++j) {\n        boundsChanged = boundsChanged ||\n            (prevBounds[0][j] !== bounds[0][j])  ||\n            (prevBounds[1][j] !== bounds[1][j])\n        prevBounds[0][j] = bounds[0][j]\n        prevBounds[1][j] = bounds[1][j]\n    }\n\n    //Recalculate bounds\n    pickDirty = pickDirty || boundsChanged\n    dirty = dirty || boundsChanged\n\n    if(!dirty) {\n      return\n    }\n\n    if(boundsChanged) {\n      var tickSpacing = [0,0,0]\n      for(var i=0; i<3; ++i) {\n        tickSpacing[i] = roundUpPow10((bounds[1][i]-bounds[0][i]) / 10.0)\n      }\n      if(axes.autoTicks) {\n        axes.update({\n          bounds: bounds,\n          tickSpacing: tickSpacing\n        })\n      } else {\n        axes.update({\n          bounds: bounds\n        })\n      }\n    }\n\n    //Get scene\n    var width  = gl.drawingBufferWidth\n    var height = gl.drawingBufferHeight\n    viewShape[0] = width\n    viewShape[1] = height\n    pickShape[0] = Math.max(width/scene.pixelRatio, 1)|0\n    pickShape[1] = Math.max(height/scene.pixelRatio, 1)|0\n\n    //Compute camera parameters\n\n    if(isOrtho) {\n      ortho(projection,\n        -width/height,\n        width/height,\n        -1,\n        1,\n        scene.zNear,\n        scene.zFar\n      )\n      cameraParams._ortho = true\n    } else {\n      perspective(projection,\n        scene.fovy,\n        width/height,\n        scene.zNear,\n        scene.zFar\n      )\n      cameraParams._ortho = false\n    }\n\n    //Compute model matrix\n    for(var i=0; i<16; ++i) {\n      model[i] = 0\n    }\n    model[15] = 1\n\n    var maxS = 0\n    for(var i=0; i<3; ++i) {\n      maxS = Math.max(maxS, bounds[1][i] - bounds[0][i])\n    }\n\n    for(var i=0; i<3; ++i) {\n      if(scene.autoScale) {\n        model[5*i] = scene.aspect[i] / (bounds[1][i] - bounds[0][i])\n      } else {\n        model[5*i] = 1  / maxS\n      }\n      if(scene.autoCenter) {\n        model[12+i] = -model[5*i] * 0.5 * (bounds[0][i] + bounds[1][i])\n      }\n    }\n\n    //Apply axes/clip bounds\n    for(var i=0; i<numObjs; ++i) {\n      var obj = objects[i]\n\n      //Set axes bounds\n      obj.axesBounds = bounds\n\n      //Set clip bounds\n      if(scene.clipToBounds) {\n        obj.clipBounds = bounds\n      }\n    }\n    //Set spike parameters\n    if(selection.object) {\n      if(scene.snapToData) {\n        spikes.position = selection.dataCoordinate\n      } else {\n        spikes.position = selection.dataPosition\n      }\n      spikes.bounds = bounds\n    }\n\n    //If state changed, then redraw pick buffers\n    if(pickDirty) {\n      pickDirty = false\n      renderPick()\n    }\n\n    //Recalculate pixel data\n    scene.axesPixels = axesRanges(scene.axes, cameraParams, width, height)\n\n    //Call render callback\n    if(scene.onrender) {\n      scene.onrender()\n    }\n\n    //Read value\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null)\n    gl.viewport(0, 0, width, height)\n\n    //General strategy: 3 steps\n    //  1. render non-transparent objects\n    //  2. accumulate transparent objects into separate fbo\n    //  3. composite final scene\n\n    //Clear FBO\n    var clearColor = scene.clearColor\n    gl.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3])\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)\n    gl.depthMask(true)\n    gl.colorMask(true, true, true, true)\n    gl.enable(gl.DEPTH_TEST)\n    gl.depthFunc(gl.LEQUAL)\n    gl.disable(gl.BLEND)\n    gl.disable(gl.CULL_FACE)  //most visualization surfaces are 2 sided\n\n    //Render opaque pass\n    var hasTransparent = false\n    if(axes.enable) {\n      hasTransparent = hasTransparent || axes.isTransparent()\n      axes.draw(cameraParams)\n    }\n    spikes.axes = axes\n    if(selection.object) {\n      spikes.draw(cameraParams)\n    }\n\n    gl.disable(gl.CULL_FACE)  //most visualization surfaces are 2 sided\n\n    for(var i=0; i<numObjs; ++i) {\n      var obj = objects[i]\n      obj.axes = axes\n      obj.pixelRatio = scene.pixelRatio\n      if(obj.isOpaque && obj.isOpaque()) {\n        obj.draw(cameraParams)\n      }\n      if(obj.isTransparent && obj.isTransparent()) {\n        hasTransparent = true\n      }\n    }\n\n    if(hasTransparent) {\n      //Render transparent pass\n      accumBuffer.shape = viewShape\n      accumBuffer.bind()\n      gl.clear(gl.DEPTH_BUFFER_BIT)\n      gl.colorMask(false, false, false, false)\n      gl.depthMask(true)\n      gl.depthFunc(gl.LESS)\n\n      //Render forward facing objects\n      if(axes.enable && axes.isTransparent()) {\n        axes.drawTransparent(cameraParams)\n      }\n      for(var i=0; i<numObjs; ++i) {\n        var obj = objects[i]\n        if(obj.isOpaque && obj.isOpaque()) {\n          obj.draw(cameraParams)\n        }\n      }\n\n      //Render transparent pass\n      gl.enable(gl.BLEND)\n      gl.blendEquation(gl.FUNC_ADD)\n      gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)\n      gl.colorMask(true, true, true, true)\n      gl.depthMask(false)\n      gl.clearColor(0,0,0,0)\n      gl.clear(gl.COLOR_BUFFER_BIT)\n\n      if(axes.isTransparent()) {\n        axes.drawTransparent(cameraParams)\n      }\n\n      for(var i=0; i<numObjs; ++i) {\n        var obj = objects[i]\n        if(obj.isTransparent && obj.isTransparent()) {\n          obj.drawTransparent(cameraParams)\n        }\n      }\n\n      //Unbind framebuffer\n      gl.bindFramebuffer(gl.FRAMEBUFFER, null)\n\n      //Draw composite pass\n      gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)\n      gl.disable(gl.DEPTH_TEST)\n      accumShader.bind()\n      accumBuffer.color[0].bind(0)\n      accumShader.uniforms.accumBuffer = 0\n      drawTriangle(gl)\n\n      //Turn off blending\n      gl.disable(gl.BLEND)\n    }\n\n    //Clear dirty flags\n    dirty = false\n    for(var i=0; i<numObjs; ++i) {\n      objects[i].dirty = false\n    }\n  }\n\n  //Draw the whole scene\n  function render() {\n    if(scene._stopped || scene.contextLost) {\n      return\n    }\n    // this order is important: ios safari sometimes has sync raf\n    redraw()\n    requestAnimationFrame(render)\n  }\n\n  scene.enableMouseListeners()\n  render()\n\n  //Force redraw of whole scene\n  scene.redraw = function() {\n    if(scene._stopped) {\n      return\n    }\n    dirty = true\n    redraw()\n  }\n\n  return scene\n}\n\n},{\"./camera.js\":287,\"./lib/shader\":288,\"a-big-triangle\":52,\"gl-axes3d\":232,\"gl-axes3d/properties\":239,\"gl-fbo\":248,\"gl-mat4/ortho\":267,\"gl-mat4/perspective\":268,\"gl-select-static\":299,\"gl-spikes3d\":309,\"is-mobile\":415,\"mouse-change\":430,\"mouse-wheel\":433}],290:[function(_dereq_,module,exports){\nvar glslify = _dereq_('glslify')\n\nexports.pointVertex       = glslify([\"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}\"])\nexports.pointFragment     = glslify([\"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\"])\nexports.pickVertex        = glslify([\"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\"])\nexports.pickFragment      = glslify([\"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\"])\n\n},{\"glslify\":404}],291:[function(_dereq_,module,exports){\n'use strict'\n\nvar createShader = _dereq_('gl-shader')\nvar createBuffer = _dereq_('gl-buffer')\n\nvar pool = _dereq_('typedarray-pool')\n\nvar SHADERS = _dereq_('./lib/shader')\n\nmodule.exports = createPointcloud2D\n\nfunction Pointcloud2D(plot, offsetBuffer, pickBuffer, shader, pickShader) {\n  this.plot           = plot\n  this.offsetBuffer   = offsetBuffer\n  this.pickBuffer     = pickBuffer\n  this.shader         = shader\n  this.pickShader     = pickShader\n  this.sizeMin        = 0.5\n  this.sizeMinCap     = 2\n  this.sizeMax        = 20\n  this.areaRatio      = 1.0\n  this.pointCount     = 0\n  this.color          = [1, 0, 0, 1]\n  this.borderColor    = [0, 0, 0, 1]\n  this.blend          = false\n  this.pickOffset     = 0\n  this.points         = null\n}\n\nvar proto = Pointcloud2D.prototype\n\nproto.dispose = function() {\n  this.shader.dispose()\n  this.pickShader.dispose()\n  this.offsetBuffer.dispose()\n  this.pickBuffer.dispose()\n  this.plot.removeObject(this)\n}\n\nproto.update = function(options) {\n\n  var i\n\n  options = options || {}\n\n  function dflt(opt, value) {\n    if(opt in options) {\n      return options[opt]\n    }\n    return value\n  }\n\n  this.sizeMin      = dflt('sizeMin', 0.5)\n  // this.sizeMinCap      = dflt('sizeMinCap', 2)\n  this.sizeMax      = dflt('sizeMax', 20)\n  this.color        = dflt('color', [1, 0, 0, 1]).slice()\n  this.areaRatio    = dflt('areaRatio', 1)\n  this.borderColor  = dflt('borderColor', [0, 0, 0, 1]).slice()\n  this.blend        = dflt('blend', false)\n\n  //Update point data\n\n  // Attempt straight-through processing (STP) to avoid allocation and copy\n  // TODO eventually abstract out STP logic, maybe into `pool` or a layer above\n  var pointCount = options.positions.length >>> 1\n  var dataStraightThrough = options.positions instanceof Float32Array\n  var idStraightThrough = options.idToIndex instanceof Int32Array && options.idToIndex.length >= pointCount // permit larger to help reuse\n\n  var data          = options.positions\n  var packed        = dataStraightThrough ? data : pool.mallocFloat32(data.length)\n  var packedId      = idStraightThrough ? options.idToIndex : pool.mallocInt32(pointCount)\n\n  if(!dataStraightThrough) {\n    packed.set(data)\n  }\n\n  if(!idStraightThrough) {\n    packed.set(data)\n    for(i = 0; i < pointCount; i++) {\n      packedId[i] = i\n    }\n  }\n\n  this.points       = data\n\n  this.offsetBuffer.update(packed)\n  this.pickBuffer.update(packedId)\n\n  if(!dataStraightThrough) {\n    pool.free(packed)\n  }\n\n  if(!idStraightThrough) {\n    pool.free(packedId)\n  }\n\n  this.pointCount = pointCount\n  this.pickOffset = 0\n}\n\nfunction count(points, dataBox) {\n  var visiblePointCountEstimate = 0\n  var length = points.length >>> 1\n  var i\n  for(i = 0; i < length; i++) {\n    var x = points[i * 2]\n    var y = points[i * 2 + 1]\n    if(x >= dataBox[0] && x <= dataBox[2] && y >= dataBox[1] && y <= dataBox[3])\n      visiblePointCountEstimate++\n  }\n  return visiblePointCountEstimate\n}\n\nproto.unifiedDraw = (function() {\n  var MATRIX = [1, 0, 0,\n                0, 1, 0,\n                0, 0, 1]\n  var PICK_VEC4 = [0, 0, 0, 0]\nreturn function(pickOffset) {\n  var pick = pickOffset !== void(0)\n\n  var shader        = pick ? this.pickShader : this.shader\n  var gl            = this.plot.gl\n  var dataBox       = this.plot.dataBox\n\n  if(this.pointCount === 0) {\n    return pickOffset\n  }\n\n  var dataX   = dataBox[2] - dataBox[0]\n  var dataY   = dataBox[3] - dataBox[1]\n\n  var visiblePointCountEstimate = count(this.points, dataBox)\n  var basicPointSize =  this.plot.pickPixelRatio * Math.max(Math.min(this.sizeMinCap, this.sizeMin), Math.min(this.sizeMax, this.sizeMax / Math.pow(visiblePointCountEstimate, 0.33333)))\n\n  MATRIX[0] = 2.0 / dataX\n  MATRIX[4] = 2.0 / dataY\n  MATRIX[6] = -2.0 * dataBox[0] / dataX - 1.0\n  MATRIX[7] = -2.0 * dataBox[1] / dataY - 1.0\n\n  this.offsetBuffer.bind()\n\n  shader.bind()\n  shader.attributes.position.pointer()\n  shader.uniforms.matrix      = MATRIX\n  shader.uniforms.color       = this.color\n  shader.uniforms.borderColor = this.borderColor\n  shader.uniforms.pointCloud = basicPointSize < 5\n  shader.uniforms.pointSize = basicPointSize\n  shader.uniforms.centerFraction = Math.min(1, Math.max(0, Math.sqrt(1 - this.areaRatio)))\n\n  if(pick) {\n\n    PICK_VEC4[0] = ( pickOffset        & 0xff)\n    PICK_VEC4[1] = ((pickOffset >> 8)  & 0xff)\n    PICK_VEC4[2] = ((pickOffset >> 16) & 0xff)\n    PICK_VEC4[3] = ((pickOffset >> 24) & 0xff)\n\n    this.pickBuffer.bind()\n    shader.attributes.pickId.pointer(gl.UNSIGNED_BYTE)\n    shader.uniforms.pickOffset = PICK_VEC4\n    this.pickOffset = pickOffset\n  }\n\n  // Worth switching these off, but we can't make assumptions about other\n  // renderers, so let's restore it after each draw\n  var blend = gl.getParameter(gl.BLEND)\n  var dither = gl.getParameter(gl.DITHER)\n\n  if(blend && !this.blend)\n    gl.disable(gl.BLEND)\n  if(dither)\n    gl.disable(gl.DITHER)\n\n  gl.drawArrays(gl.POINTS, 0, this.pointCount)\n\n  if(blend && !this.blend)\n    gl.enable(gl.BLEND)\n  if(dither)\n    gl.enable(gl.DITHER)\n\n  return pickOffset + this.pointCount\n}\n})()\n\nproto.draw = proto.unifiedDraw\nproto.drawPick = proto.unifiedDraw\n\nproto.pick = function(x, y, value) {\n  var pickOffset = this.pickOffset\n  var pointCount = this.pointCount\n  if(value < pickOffset || value >= pickOffset + pointCount) {\n    return null\n  }\n  var pointId = value - pickOffset\n  var points = this.points\n  return {\n    object: this,\n    pointId: pointId,\n    dataCoord: [points[2 * pointId], points[2 * pointId + 1] ]\n  }\n}\n\nfunction createPointcloud2D(plot, options) {\n  var gl = plot.gl\n  var buffer = createBuffer(gl)\n  var pickBuffer = createBuffer(gl)\n  var shader = createShader(gl, SHADERS.pointVertex, SHADERS.pointFragment)\n  var pickShader = createShader(gl, SHADERS.pickVertex, SHADERS.pickFragment)\n\n  var result = new Pointcloud2D(plot, buffer, pickBuffer, shader, pickShader)\n  result.update(options)\n\n  //Register with plot\n  plot.addObject(result)\n\n  return result\n}\n\n},{\"./lib/shader\":290,\"gl-buffer\":240,\"gl-shader\":300,\"typedarray-pool\":532}],292:[function(_dereq_,module,exports){\nmodule.exports = slerp\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n */\nfunction slerp (out, a, b, t) {\n  // benchmarks:\n  //    http://jsperf.com/quaternion-slerp-implementations\n\n  var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n    bx = b[0], by = b[1], bz = b[2], bw = b[3]\n\n  var omega, cosom, sinom, scale0, scale1\n\n  // calc cosine\n  cosom = ax * bx + ay * by + az * bz + aw * bw\n  // adjust signs (if necessary)\n  if (cosom < 0.0) {\n    cosom = -cosom\n    bx = -bx\n    by = -by\n    bz = -bz\n    bw = -bw\n  }\n  // calculate coefficients\n  if ((1.0 - cosom) > 0.000001) {\n    // standard case (slerp)\n    omega = Math.acos(cosom)\n    sinom = Math.sin(omega)\n    scale0 = Math.sin((1.0 - t) * omega) / sinom\n    scale1 = Math.sin(t * omega) / sinom\n  } else {\n    // \"from\" and \"to\" quaternions are very close\n    //  ... so we can do a linear interpolation\n    scale0 = 1.0 - t\n    scale1 = t\n  }\n  // calculate final values\n  out[0] = scale0 * ax + scale1 * bx\n  out[1] = scale0 * ay + scale1 * by\n  out[2] = scale0 * az + scale1 * bz\n  out[3] = scale0 * aw + scale1 * bw\n\n  return out\n}\n\n},{}],293:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = function(a){\n  return (!a && a !== 0) ? '' : a.toString();\n}\n\n},{}],294:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar vectorizeText = _dereq_(\"vectorize-text\")\n\nmodule.exports = getGlyph\n\nvar GLYPH_CACHE = {}\n\nfunction getGlyph(symbol, font, pixelRatio) {\n  var fontCache = GLYPH_CACHE[font]\n  if(!fontCache) {\n    fontCache = GLYPH_CACHE[font] = {}\n  }\n  if(symbol in fontCache) {\n    return fontCache[symbol]\n  }\n\n  var config = {\n    textAlign: \"center\",\n    textBaseline: \"middle\",\n    lineHeight: 1.0,\n    font: font,\n    lineSpacing: 1.25,\n    styletags: {\n      breaklines:true,\n      bolds: true,\n      italics: true,\n      subscripts:true,\n      superscripts:true\n    }\n  }\n\n  //Get line and triangle meshes for glyph\n  config.triangles = true\n  var triSymbol = vectorizeText(symbol, config)\n  config.triangles = false\n  var lineSymbol = vectorizeText(symbol, config)\n\n  var i, j\n\n  if(pixelRatio && pixelRatio !== 1) {\n    for(i = 0; i < triSymbol.positions.length; ++i){\n      for(j = 0; j < triSymbol.positions[i].length; ++j){\n        triSymbol.positions[i][j] /= pixelRatio;\n      }\n    }\n\n    for(i = 0; i < lineSymbol.positions.length; ++i){\n      for(j = 0; j < lineSymbol.positions[i].length; ++j){\n        lineSymbol.positions[i][j] /= pixelRatio;\n      }\n    }\n  }\n\n  //Calculate bounding box\n  var bounds = [[Infinity,Infinity], [-Infinity,-Infinity]]\n  var n = lineSymbol.positions.length\n  for(i = 0; i < n; ++i) {\n    var p = lineSymbol.positions[i]\n    for(j=0; j<2; ++j) {\n      bounds[0][j] = Math.min(bounds[0][j], p[j])\n      bounds[1][j] = Math.max(bounds[1][j], p[j])\n    }\n  }\n\n  //Save cached symbol\n  return fontCache[symbol] = [triSymbol, lineSymbol, bounds]\n}\n},{\"vectorize-text\":537}],295:[function(_dereq_,module,exports){\nvar createShaderWrapper = _dereq_('gl-shader')\nvar glslify = _dereq_('glslify')\n\nvar perspectiveVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\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 (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\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}\"])\nvar orthographicVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\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}\"])\nvar projectionVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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 (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\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\"])\nvar drawFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float opacity;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (\\n    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\\n    interpColor.a * opacity == 0.\\n  ) discard;\\n  gl_FragColor = interpColor * opacity;\\n}\\n\"])\nvar pickFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float pickGroup;\\n\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\n\\n  gl_FragColor = vec4(pickGroup, pickId.bgr);\\n}\"])\n\nvar ATTRIBUTES = [\n  {name: 'position', type: 'vec3'},\n  {name: 'color', type: 'vec4'},\n  {name: 'glyph', type: 'vec2'},\n  {name: 'id', type: 'vec4'}\n]\n\nvar perspective = {\n    vertex: perspectiveVertSrc,\n    fragment: drawFragSrc,\n    attributes: ATTRIBUTES\n  },\n  ortho = {\n    vertex: orthographicVertSrc,\n    fragment: drawFragSrc,\n    attributes: ATTRIBUTES\n  },\n  project = {\n    vertex: projectionVertSrc,\n    fragment: drawFragSrc,\n    attributes: ATTRIBUTES\n  },\n  pickPerspective = {\n    vertex: perspectiveVertSrc,\n    fragment: pickFragSrc,\n    attributes: ATTRIBUTES\n  },\n  pickOrtho = {\n    vertex: orthographicVertSrc,\n    fragment: pickFragSrc,\n    attributes: ATTRIBUTES\n  },\n  pickProject = {\n    vertex: projectionVertSrc,\n    fragment: pickFragSrc,\n    attributes: ATTRIBUTES\n  }\n\nfunction createShader(gl, src) {\n  var shader = createShaderWrapper(gl, src)\n  var attr = shader.attributes\n  attr.position.location = 0\n  attr.color.location = 1\n  attr.glyph.location = 2\n  attr.id.location = 3\n  return shader\n}\n\nexports.createPerspective = function(gl) {\n  return createShader(gl, perspective)\n}\nexports.createOrtho = function(gl) {\n  return createShader(gl, ortho)\n}\nexports.createProject = function(gl) {\n  return createShader(gl, project)\n}\nexports.createPickPerspective = function(gl) {\n  return createShader(gl, pickPerspective)\n}\nexports.createPickOrtho = function(gl) {\n  return createShader(gl, pickOrtho)\n}\nexports.createPickProject = function(gl) {\n  return createShader(gl, pickProject)\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],296:[function(_dereq_,module,exports){\n'use strict'\n\nvar isAllBlank      = _dereq_('is-string-blank')\nvar createBuffer    = _dereq_('gl-buffer')\nvar createVAO       = _dereq_('gl-vao')\nvar pool            = _dereq_('typedarray-pool')\nvar mat4mult        = _dereq_('gl-mat4/multiply')\nvar shaders         = _dereq_('./lib/shaders')\nvar getGlyph        = _dereq_('./lib/glyphs')\nvar getSimpleString = _dereq_('./lib/get-simple-string')\n\nvar IDENTITY = [1,0,0,0,\n                0,1,0,0,\n                0,0,1,0,\n                0,0,0,1]\n\nmodule.exports = createPointCloud\n\nfunction transformMat4(x, m) {\n  var x0 = x[0]\n  var x1 = x[1]\n  var x2 = x[2]\n  var x3 = x[3]\n  x[0] = m[0] * x0 + m[4] * x1 + m[8]  * x2 + m[12] * x3\n  x[1] = m[1] * x0 + m[5] * x1 + m[9]  * x2 + m[13] * x3\n  x[2] = m[2] * x0 + m[6] * x1 + m[10] * x2 + m[14] * x3\n  x[3] = m[3] * x0 + m[7] * x1 + m[11] * x2 + m[15] * x3\n  return x\n}\n\nfunction project(p, v, m, x) {\n  transformMat4(x, x, m)\n  transformMat4(x, x, v)\n  return transformMat4(x, x, p)\n}\n\nfunction ScatterPlotPickResult(index, position) {\n  this.index = index\n  this.dataCoordinate = this.position = position\n}\n\nfunction fixOpacity(a) {\n  if(a === true) return 1\n  if(a > 1) return 1\n  return a\n}\n\nfunction PointCloud(\n  gl,\n  shader,\n  orthoShader,\n  projectShader,\n  pointBuffer,\n  colorBuffer,\n  glyphBuffer,\n  idBuffer,\n  vao,\n  pickPerspectiveShader,\n  pickOrthoShader,\n  pickProjectShader) {\n\n  this.gl              = gl\n\n  this.pixelRatio      = 1\n\n  this.shader          = shader\n  this.orthoShader     = orthoShader\n  this.projectShader   = projectShader\n\n  this.pointBuffer     = pointBuffer\n  this.colorBuffer     = colorBuffer\n  this.glyphBuffer     = glyphBuffer\n  this.idBuffer        = idBuffer\n  this.vao             = vao\n  this.vertexCount     = 0\n  this.lineVertexCount = 0\n\n  this.opacity         = 1\n  this.hasAlpha        = false\n\n  this.lineWidth       = 0\n  this.projectScale    = [2.0/3.0, 2.0/3.0, 2.0/3.0]\n  this.projectOpacity  = [1, 1, 1]\n  this.projectHasAlpha  = false\n\n  this.pickId                = 0\n  this.pickPerspectiveShader = pickPerspectiveShader\n  this.pickOrthoShader       = pickOrthoShader\n  this.pickProjectShader     = pickProjectShader\n  this.points                = []\n\n  this._selectResult = new ScatterPlotPickResult(0, [0,0,0])\n\n  this.useOrtho = true\n  this.bounds   = [[ Infinity,Infinity,Infinity],\n                   [-Infinity,-Infinity,-Infinity]]\n\n  //Axes projections\n  this.axesProject = [ true, true, true ]\n  this.axesBounds = [[-Infinity,-Infinity,-Infinity],\n                     [ Infinity, Infinity, Infinity]]\n\n  this.highlightId    = [1,1,1,1]\n  this.highlightScale = 2\n\n  this.clipBounds = [[-Infinity,-Infinity,-Infinity],\n                     [ Infinity, Infinity, Infinity]]\n\n  this.dirty = true\n}\n\nvar proto = PointCloud.prototype\n\nproto.pickSlots = 1\n\nproto.setPickBase = function(pickBase) {\n  this.pickId = pickBase\n}\n\nproto.isTransparent = function() {\n  if(this.hasAlpha)  {\n    return true\n  }\n  for(var i=0; i<3; ++i) {\n    if(this.axesProject[i] && this.projectHasAlpha) {\n      return true\n    }\n  }\n  return false\n}\n\nproto.isOpaque = function() {\n  if(!this.hasAlpha)  {\n    return true\n  }\n  for(var i=0; i<3; ++i) {\n    if(this.axesProject[i] && !this.projectHasAlpha) {\n      return true\n    }\n  }\n  return false\n}\n\nvar VIEW_SHAPE = [0,0]\nvar U_VEC = [0,0,0]\nvar V_VEC = [0,0,0]\nvar MU_VEC = [0,0,0,1]\nvar MV_VEC = [0,0,0,1]\nvar SCRATCH_MATRIX = IDENTITY.slice()\nvar SCRATCH_VEC = [0,0,0]\nvar CLIP_BOUNDS = [[0,0,0], [0,0,0]]\n\nfunction zeroVec(a) {\n  a[0] = a[1] = a[2] = 0\n  return a\n}\n\nfunction augment(hg, af) {\n  hg[0] = af[0]\n  hg[1] = af[1]\n  hg[2] = af[2]\n  hg[3] = 1\n  return hg\n}\n\nfunction setComponent(out, v, i, x) {\n  out[0] = v[0]\n  out[1] = v[1]\n  out[2] = v[2]\n  out[i] = x\n  return out\n}\n\nfunction getClipBounds(bounds) {\n  var result = CLIP_BOUNDS\n  for(var i=0; i<2; ++i) {\n    for(var j=0; j<3; ++j) {\n      result[i][j] = Math.max(Math.min(bounds[i][j], 1e8), -1e8)\n    }\n  }\n  return result\n}\n\nfunction drawProject(shader, points, camera, pixelRatio) {\n  var axesProject = points.axesProject\n\n  var gl         = points.gl\n  var uniforms   = shader.uniforms\n  var model      = camera.model      || IDENTITY\n  var view       = camera.view       || IDENTITY\n  var projection = camera.projection || IDENTITY\n  var bounds     = points.axesBounds\n  var clipBounds = getClipBounds(points.clipBounds)\n\n  var cubeAxis\n  if(points.axes && points.axes.lastCubeProps) {\n    cubeAxis = points.axes.lastCubeProps.axis\n  } else {\n    cubeAxis = [1,1,1]\n  }\n\n  VIEW_SHAPE[0] = 2.0/gl.drawingBufferWidth\n  VIEW_SHAPE[1] = 2.0/gl.drawingBufferHeight\n\n  shader.bind()\n  uniforms.view           = view\n  uniforms.projection     = projection\n  uniforms.screenSize     = VIEW_SHAPE\n  uniforms.highlightId    = points.highlightId\n  uniforms.highlightScale = points.highlightScale\n  uniforms.clipBounds     = clipBounds\n  uniforms.pickGroup      = points.pickId / 255.0\n  uniforms.pixelRatio     = pixelRatio\n\n  for(var i=0; i<3; ++i) {\n    if(!axesProject[i]) {\n      continue\n    }\n\n    uniforms.scale          = points.projectScale[i]\n    uniforms.opacity        = points.projectOpacity[i]\n\n    //Project model matrix\n    var pmodel = SCRATCH_MATRIX\n    for(var j=0; j<16; ++j) {\n      pmodel[j] = 0\n    }\n    for(var j=0; j<4; ++j) {\n      pmodel[5*j] = 1\n    }\n    pmodel[5*i] = 0\n    if(cubeAxis[i] < 0) {\n      pmodel[12+i] = bounds[0][i]\n    } else {\n      pmodel[12+i] = bounds[1][i]\n    }\n    mat4mult(pmodel, model, pmodel)\n    uniforms.model = pmodel\n\n    //Compute initial axes\n    var u = (i+1)%3\n    var v = (i+2)%3\n    var du = zeroVec(U_VEC)\n    var dv = zeroVec(V_VEC)\n    du[u] = 1\n    dv[v] = 1\n\n    //Align orientation relative to viewer\n    var mdu = project(projection, view, model, augment(MU_VEC, du))\n    var mdv = project(projection, view, model, augment(MV_VEC, dv))\n    if(Math.abs(mdu[1]) > Math.abs(mdv[1])) {\n      var tmp = mdu\n      mdu = mdv\n      mdv = tmp\n      tmp = du\n      du = dv\n      dv = tmp\n      var t = u\n      u = v\n      v = t\n    }\n    if(mdu[0] < 0) {\n      du[u] = -1\n    }\n    if(mdv[1] > 0) {\n      dv[v] = -1\n    }\n    var su = 0.0\n    var sv = 0.0\n    for(var j=0; j<4; ++j) {\n      su += Math.pow(model[4*u+j], 2)\n      sv += Math.pow(model[4*v+j], 2)\n    }\n    du[u] /= Math.sqrt(su)\n    dv[v] /= Math.sqrt(sv)\n    uniforms.axes[0] = du\n    uniforms.axes[1] = dv\n\n    //Update fragment clip bounds\n    uniforms.fragClipBounds[0] = setComponent(SCRATCH_VEC, clipBounds[0], i, -1e8)\n    uniforms.fragClipBounds[1] = setComponent(SCRATCH_VEC, clipBounds[1], i, 1e8)\n\n    points.vao.bind()\n\n    //Draw interior\n    points.vao.draw(gl.TRIANGLES, points.vertexCount)\n\n    //Draw edges\n    if(points.lineWidth > 0) {\n      gl.lineWidth(points.lineWidth * pixelRatio)\n      points.vao.draw(gl.LINES, points.lineVertexCount, points.vertexCount)\n    }\n\n    points.vao.unbind()\n  }\n}\n\n\nvar NEG_INFINITY3 = [-1e8, -1e8, -1e8]\nvar POS_INFINITY3 = [1e8, 1e8, 1e8]\nvar CLIP_GROUP    = [NEG_INFINITY3, POS_INFINITY3]\n\nfunction drawFull(shader, pshader, points, camera, pixelRatio, transparent, forceDraw) {\n  var gl = points.gl\n\n  if(transparent === points.projectHasAlpha || forceDraw) {\n    drawProject(pshader, points, camera, pixelRatio)\n  }\n\n  if(transparent === points.hasAlpha || forceDraw) {\n\n    shader.bind()\n    var uniforms = shader.uniforms\n\n    uniforms.model      = camera.model      || IDENTITY\n    uniforms.view       = camera.view       || IDENTITY\n    uniforms.projection = camera.projection || IDENTITY\n\n    VIEW_SHAPE[0]       = 2.0/gl.drawingBufferWidth\n    VIEW_SHAPE[1]       = 2.0/gl.drawingBufferHeight\n    uniforms.screenSize = VIEW_SHAPE\n\n    uniforms.highlightId    = points.highlightId\n    uniforms.highlightScale = points.highlightScale\n\n    uniforms.fragClipBounds = CLIP_GROUP\n    uniforms.clipBounds     = points.axes.bounds\n\n    uniforms.opacity    = points.opacity\n    uniforms.pickGroup  = points.pickId / 255.0\n\n    uniforms.pixelRatio = pixelRatio\n\n    points.vao.bind()\n\n    //Draw interior\n    points.vao.draw(gl.TRIANGLES, points.vertexCount)\n\n    //Draw edges\n    if(points.lineWidth > 0) {\n      gl.lineWidth(points.lineWidth * pixelRatio)\n      points.vao.draw(gl.LINES, points.lineVertexCount, points.vertexCount)\n    }\n\n    points.vao.unbind()\n  }\n\n\n}\n\nproto.draw = function(camera) {\n  var shader = this.useOrtho ? this.orthoShader : this.shader\n  drawFull(shader, this.projectShader, this, camera, this.pixelRatio, false, false)\n}\n\nproto.drawTransparent = function(camera) {\n  var shader = this.useOrtho ? this.orthoShader : this.shader\n  drawFull(shader, this.projectShader, this, camera, this.pixelRatio, true, false)\n}\n\nproto.drawPick = function(camera) {\n  var shader = this.useOrtho ? this.pickOrthoShader : this.pickPerspectiveShader\n  drawFull(shader, this.pickProjectShader, this, camera, 1, true, true)\n}\n\nproto.pick = function(selected) {\n  if(!selected) {\n    return null\n  }\n  if(selected.id !== this.pickId) {\n    return null\n  }\n  var x = selected.value[2] + (selected.value[1]<<8) + (selected.value[0]<<16)\n  if(x >= this.pointCount || x < 0) {\n    return null\n  }\n\n  //Unpack result\n  var coord = this.points[x]\n  var result = this._selectResult\n  result.index = x\n  for(var i=0; i<3; ++i) {\n    result.position[i] = result.dataCoordinate[i] = coord[i]\n  }\n  return result\n}\n\nproto.highlight = function(selection) {\n  if(!selection) {\n    this.highlightId = [1,1,1,1]\n  } else {\n    var pointId = selection.index\n    var a0 =  pointId     &0xff\n    var a1 = (pointId>>8) &0xff\n    var a2 = (pointId>>16)&0xff\n    this.highlightId = [a0/255.0, a1/255.0, a2/255.0, 0]\n  }\n}\n\nfunction get_glyphData(glyphs, index, font, pixelRatio) {\n  var str\n\n  // use the data if presented in an array\n  if(Array.isArray(glyphs)) {\n    if(index < glyphs.length) {\n      str = glyphs[index]\n    } else {\n      str = undefined\n    }\n  } else {\n    str = glyphs\n  }\n\n  str = getSimpleString(str) // this would handle undefined cases\n\n  var visible = true\n  if(isAllBlank(str)) {\n    str = '▼' // Note: this special character may have minimum number of surfaces\n    visible = false\n  }\n\n  var glyph = getGlyph(str, font, pixelRatio)\n\n  return { mesh:glyph[0],\n          lines:glyph[1],\n         bounds:glyph[2],\n        visible:visible };\n}\n\n\n\nproto.update = function(options) {\n\n  options = options || {}\n\n  if('perspective' in options) {\n    this.useOrtho = !options.perspective\n  }\n  if('orthographic' in options) {\n    this.useOrtho = !!options.orthographic\n  }\n  if('lineWidth' in options) {\n    this.lineWidth = options.lineWidth\n  }\n  if('project' in options) {\n    if(Array.isArray(options.project)) {\n      this.axesProject = options.project\n    } else {\n      var v = !!options.project\n      this.axesProject = [v,v,v]\n    }\n  }\n  if('projectScale' in options) {\n    if(Array.isArray(options.projectScale)) {\n      this.projectScale = options.projectScale.slice()\n    } else {\n      var s = +options.projectScale\n      this.projectScale = [s,s,s]\n    }\n  }\n\n  this.projectHasAlpha = false // default to no transparent draw\n  if('projectOpacity' in options) {\n    if(Array.isArray(options.projectOpacity)) {\n      this.projectOpacity = options.projectOpacity.slice()\n    } else {\n      var s = +options.projectOpacity\n      this.projectOpacity = [s,s,s]\n    }\n    for(var i=0; i<3; ++i) {\n      this.projectOpacity[i] = fixOpacity(this.projectOpacity[i]);\n      if(this.projectOpacity[i] < 1) {\n        this.projectHasAlpha = true;\n      }\n    }\n  }\n\n  this.hasAlpha = false // default to no transparent draw\n  if('opacity' in options) {\n    this.opacity = fixOpacity(options.opacity)\n    if(this.opacity < 1) {\n      this.hasAlpha = true;\n    }\n  }\n\n  //Set dirty flag\n  this.dirty = true\n\n  //Create new buffers\n  var points = options.position\n\n  //Text font\n  var font      = options.font      || 'normal'\n  var alignment = options.alignment || [0,0]\n\n  var alignmentX;\n  var alignmentY;\n  if (alignment.length === 2) {\n    alignmentX = alignment[0]\n    alignmentY = alignment[1]\n  } else {\n    alignmentX = []\n    alignmentY = []\n    for (var i = 0; i < alignment.length; ++i) {\n      alignmentX[i] = alignment[i][0]\n      alignmentY[i] = alignment[i][1]\n    }\n  }\n\n  //Bounds\n  var lowerBound = [ Infinity, Infinity, Infinity]\n  var upperBound = [-Infinity,-Infinity,-Infinity]\n\n  //Unpack options\n  var glyphs     = options.glyph\n  var colors     = options.color\n  var sizes      = options.size\n  var angles     = options.angle\n  var lineColors = options.lineColor\n\n  //Picking geometry\n  var pickCounter = -1\n\n  //First do pass to compute buffer sizes\n  var triVertexCount  = 0\n  var lineVertexCount = 0\n\n  var numPoints = 0;\n\n  if(points.length) {\n\n    //Count number of points and buffer size\n    numPoints = points.length\n\n  count_loop:\n    for(var i=0; i<numPoints; ++i) {\n      var x = points[i]\n      for(var j=0; j<3; ++j) {\n        if(isNaN(x[j]) || !isFinite(x[j])) {\n          continue count_loop\n        }\n      }\n\n      var glyphData = get_glyphData(glyphs, i, font, this.pixelRatio)\n\n      var glyphMesh   = glyphData.mesh\n      var glyphLines  = glyphData.lines\n      var glyphBounds = glyphData.bounds\n\n      triVertexCount  += glyphMesh.cells.length * 3\n      lineVertexCount += glyphLines.edges.length * 2\n    }\n  }\n\n  var vertexCount   = triVertexCount + lineVertexCount\n\n  //Preallocate data\n  var positionArray = pool.mallocFloat(3*vertexCount)\n  var colorArray    = pool.mallocFloat(4*vertexCount)\n  var glyphArray    = pool.mallocFloat(2*vertexCount)\n  var idArray       = pool.mallocUint32(vertexCount)\n\n  if(vertexCount > 0) {\n    var triOffset  = 0\n    var lineOffset = triVertexCount\n    var color      = [0,0,0,1]\n    var lineColor  = [0,0,0,1]\n\n    var isColorArray      = Array.isArray(colors)     && Array.isArray(colors[0])\n    var isLineColorArray  = Array.isArray(lineColors) && Array.isArray(lineColors[0])\n\n  fill_loop:\n    for(var i=0; i<numPoints; ++i) {\n      //Increment pickCounter\n      pickCounter += 1\n\n      var x = points[i]\n      for(var j=0; j<3; ++j) {\n        if(isNaN(x[j]) || !isFinite(x[j])) {\n          continue fill_loop\n        }\n\n        upperBound[j] = Math.max(upperBound[j], x[j])\n        lowerBound[j] = Math.min(lowerBound[j], x[j])\n      }\n\n      var glyphData = get_glyphData(glyphs, i, font, this.pixelRatio)\n\n      var glyphMesh   = glyphData.mesh\n      var glyphLines  = glyphData.lines\n      var glyphBounds = glyphData.bounds\n      var glyphVisible = glyphData.visible\n\n      //Get color\n      if(!glyphVisible) color = [1,1,1,0]\n      else if(Array.isArray(colors)) {\n        var c\n        if(isColorArray) {\n          if(i < colors.length) {\n            c = colors[i]\n          } else {\n            c = [0,0,0,0]\n          }\n        } else {\n          c = colors\n        }\n\n        if(c.length === 3) {\n          for(var j=0; j<3; ++j) {\n            color[j] = c[j]\n          }\n          color[3] = 1\n        } else if(c.length === 4) {\n          for(var j=0; j<4; ++j) {\n            color[j] = c[j]\n          }\n          if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n        }\n      } else {\n        color[0] = color[1] = color[2] = 0\n        color[3] = 1\n      }\n\n\n      //Get lineColor\n      if(!glyphVisible) lineColor = [1,1,1,0]\n      else if(Array.isArray(lineColors)) {\n        var c\n        if(isLineColorArray) {\n          if(i < lineColors.length) {\n            c = lineColors[i]\n          } else {\n            c = [0,0,0,0]\n          }\n        } else {\n          c = lineColors\n        }\n\n        if(c.length === 3) {\n          for(var j=0; j<3; ++j) {\n            lineColor[j] = c[j]\n          }\n          lineColor[j] = 1\n        } else if(c.length === 4) {\n          for(var j=0; j<4; ++j) {\n            lineColor[j] = c[j]\n          }\n          if(!this.hasAlpha && c[3] < 1) this.hasAlpha = true\n        }\n      } else {\n        lineColor[0] = lineColor[1] = lineColor[2] = 0\n        lineColor[3] = 1\n      }\n\n\n      var size = 0.5\n      if(!glyphVisible) size = 0.0\n      else if(Array.isArray(sizes)) {\n        if(i < sizes.length) {\n          size = +sizes[i]\n        } else {\n          size = 12\n        }\n      } else if(sizes) {\n        size = +sizes\n      } else if(this.useOrtho) {\n        size = 12\n      }\n\n\n      var angle = 0\n      if(Array.isArray(angles)) {\n        if(i < angles.length) {\n          angle = +angles[i]\n        } else {\n          angle = 0\n        }\n      } else if(angles) {\n        angle = +angles\n      }\n\n      //Loop through markers and append to buffers\n      var cos = Math.cos(angle)\n      var sin = Math.sin(angle)\n\n      var x = points[i]\n      for(var j=0; j<3; ++j) {\n        upperBound[j] = Math.max(upperBound[j], x[j])\n        lowerBound[j] = Math.min(lowerBound[j], x[j])\n      }\n\n      //Calculate text offset\n      var textOffsetX = alignmentX\n      var textOffsetY = alignmentY\n\n      var textOffsetX = 0\n      if(Array.isArray(alignmentX)) {\n        if(i < alignmentX.length) {\n          textOffsetX = alignmentX[i]\n        } else {\n          textOffsetX = 0\n        }\n      } else if(alignmentX) {\n        textOffsetX = alignmentX\n      }\n\n      var textOffsetY = 0\n      if(Array.isArray(alignmentY)) {\n        if(i < alignmentY.length) {\n          textOffsetY = alignmentY[i]\n        } else {\n          textOffsetY = 0\n        }\n      } else if(alignmentY) {\n        textOffsetY = alignmentY\n      }\n\n      textOffsetX *= (textOffsetX > 0) ? (1 - glyphBounds[0][0]) :\n                     (textOffsetX < 0) ? (1 + glyphBounds[1][0]) : 1;\n\n      textOffsetY *= (textOffsetY > 0) ? (1 - glyphBounds[0][1]) :\n                     (textOffsetY < 0) ? (1 + glyphBounds[1][1]) : 1;\n\n      var textOffset = [textOffsetX, textOffsetY]\n\n      //Write out inner marker\n      var cells = glyphMesh.cells || []\n      var verts = glyphMesh.positions || []\n\n      for(var j=0; j<cells.length; ++j) {\n        var cell = cells[j]\n        for(var k=0; k<3; ++k) {\n          for(var l=0; l<3; ++l) {\n            positionArray[3*triOffset+l] = x[l]\n          }\n          for(var l=0; l<4; ++l) {\n            colorArray[4*triOffset+l] = color[l]\n          }\n          idArray[triOffset] = pickCounter\n          var p = verts[cell[k]]\n          glyphArray[2*triOffset]   = size * (cos*p[0] - sin*p[1] + textOffset[0])\n          glyphArray[2*triOffset+1] = size * (sin*p[0] + cos*p[1] + textOffset[1])\n          triOffset += 1\n        }\n      }\n\n      var cells = glyphLines.edges\n      var verts = glyphLines.positions\n\n      for(var j=0; j<cells.length; ++j) {\n        var cell = cells[j]\n        for(var k=0; k<2; ++k) {\n          for(var l=0; l<3; ++l) {\n            positionArray[3*lineOffset+l] = x[l]\n          }\n          for(var l=0; l<4; ++l) {\n            colorArray[4*lineOffset+l] = lineColor[l]\n          }\n          idArray[lineOffset] = pickCounter\n          var p = verts[cell[k]]\n          glyphArray[2*lineOffset]   = size * (cos*p[0] - sin*p[1] + textOffset[0])\n          glyphArray[2*lineOffset+1] = size * (sin*p[0] + cos*p[1] + textOffset[1])\n          lineOffset += 1\n        }\n      }\n\n    }\n\n\n\n  }\n\n  //Update bounds\n  this.bounds = [lowerBound, upperBound]\n\n  //Save points\n  this.points = points\n\n  //Save number of points\n  this.pointCount = points.length\n\n  //Update vertex counts\n  this.vertexCount      = triVertexCount\n  this.lineVertexCount  = lineVertexCount\n\n  this.pointBuffer.update(positionArray)\n  this.colorBuffer.update(colorArray)\n  this.glyphBuffer.update(glyphArray)\n  //this.idBuffer.update(new Uint32Array(idArray))\n  this.idBuffer.update(idArray)\n\n  pool.free(positionArray)\n  pool.free(colorArray)\n  pool.free(glyphArray)\n  pool.free(idArray)\n}\n\nproto.dispose = function() {\n  //Shaders\n  this.shader.dispose()\n  this.orthoShader.dispose()\n  this.pickPerspectiveShader.dispose()\n  this.pickOrthoShader.dispose()\n\n  //Vertex array\n  this.vao.dispose()\n\n  //Buffers\n  this.pointBuffer.dispose()\n  this.colorBuffer.dispose()\n  this.glyphBuffer.dispose()\n  this.idBuffer.dispose()\n}\n\nfunction createPointCloud(options) {\n  var gl = options.gl\n\n  var shader                = shaders.createPerspective(gl)\n  var orthoShader           = shaders.createOrtho(gl)\n  var projectShader         = shaders.createProject(gl)\n  var pickPerspectiveShader = shaders.createPickPerspective(gl)\n  var pickOrthoShader       = shaders.createPickOrtho(gl)\n  var pickProjectShader     = shaders.createPickProject(gl)\n\n  var pointBuffer = createBuffer(gl)\n  var colorBuffer = createBuffer(gl)\n  var glyphBuffer = createBuffer(gl)\n  var idBuffer    = createBuffer(gl)\n  var vao = createVAO(gl, [\n    {\n      buffer: pointBuffer,\n      size: 3,\n      type: gl.FLOAT\n    },\n    {\n      buffer: colorBuffer,\n      size: 4,\n      type: gl.FLOAT\n    },\n    {\n      buffer: glyphBuffer,\n      size: 2,\n      type: gl.FLOAT\n    },\n    {\n      buffer: idBuffer,\n      size: 4,\n      type: gl.UNSIGNED_BYTE,\n      normalized: true\n    }\n  ])\n\n  var pointCloud = new PointCloud(\n    gl,\n    shader,\n    orthoShader,\n    projectShader,\n    pointBuffer,\n    colorBuffer,\n    glyphBuffer,\n    idBuffer,\n    vao,\n    pickPerspectiveShader,\n    pickOrthoShader,\n    pickProjectShader)\n\n  pointCloud.update(options)\n\n  return pointCloud\n}\n\n},{\"./lib/get-simple-string\":293,\"./lib/glyphs\":294,\"./lib/shaders\":295,\"gl-buffer\":240,\"gl-mat4/multiply\":266,\"gl-vao\":322,\"is-string-blank\":418,\"typedarray-pool\":532}],297:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify = _dereq_('glslify')\n\nexports.boxVertex = glslify([\"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\"])\nexports.boxFragment = glslify([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\n\\nvoid main() {\\n  gl_FragColor = color;\\n}\\n\"])\n\n},{\"glslify\":404}],298:[function(_dereq_,module,exports){\n'use strict'\n\nvar createShader = _dereq_('gl-shader')\nvar createBuffer = _dereq_('gl-buffer')\n\nvar SHADERS = _dereq_('./lib/shaders')\n\nmodule.exports = createSelectBox\n\nfunction SelectBox(plot, boxBuffer, boxShader) {\n  this.plot = plot\n  this.boxBuffer = boxBuffer\n  this.boxShader = boxShader\n\n  this.enabled = true\n\n  this.selectBox = [Infinity,Infinity,-Infinity,-Infinity]\n\n  this.borderColor = [0,0,0,1]\n  this.innerFill   = false\n  this.innerColor  = [0,0,0,0.25]\n  this.outerFill   = true\n  this.outerColor  = [0,0,0,0.5]\n  this.borderWidth = 10\n}\n\nvar proto = SelectBox.prototype\n\nproto.draw = function() {\n  if(!this.enabled) {\n    return\n  }\n\n  var plot         = this.plot\n  var selectBox    = this.selectBox\n  var lineWidth    = this.borderWidth\n\n  var innerFill    = this.innerFill\n  var innerColor   = this.innerColor\n  var outerFill    = this.outerFill\n  var outerColor   = this.outerColor\n  var borderColor  = this.borderColor\n\n  var boxes        = plot.box\n  var screenBox    = plot.screenBox\n  var dataBox      = plot.dataBox\n  var viewBox      = plot.viewBox\n  var pixelRatio   = plot.pixelRatio\n\n  //Map select box into pixel coordinates\n  var loX = (selectBox[0]-dataBox[0])*(viewBox[2]-viewBox[0])/(dataBox[2]-dataBox[0])+viewBox[0]\n  var loY = (selectBox[1]-dataBox[1])*(viewBox[3]-viewBox[1])/(dataBox[3]-dataBox[1])+viewBox[1]\n  var hiX = (selectBox[2]-dataBox[0])*(viewBox[2]-viewBox[0])/(dataBox[2]-dataBox[0])+viewBox[0]\n  var hiY = (selectBox[3]-dataBox[1])*(viewBox[3]-viewBox[1])/(dataBox[3]-dataBox[1])+viewBox[1]\n\n  loX = Math.max(loX, viewBox[0])\n  loY = Math.max(loY, viewBox[1])\n  hiX = Math.min(hiX, viewBox[2])\n  hiY = Math.min(hiY, viewBox[3])\n\n  if(hiX < loX || hiY < loY) {\n    return\n  }\n\n  boxes.bind()\n\n  //Draw box\n  var screenWidth  = screenBox[2] - screenBox[0]\n  var screenHeight = screenBox[3] - screenBox[1]\n\n  if(this.outerFill) {\n    boxes.drawBox(0, 0, screenWidth, loY, outerColor)\n    boxes.drawBox(0, loY, loX, hiY, outerColor)\n    boxes.drawBox(0, hiY, screenWidth, screenHeight, outerColor)\n    boxes.drawBox(hiX, loY, screenWidth, hiY, outerColor)\n  }\n\n  if(this.innerFill) {\n    boxes.drawBox(loX, loY, hiX, hiY, innerColor)\n  }\n\n  //Draw border\n  if(lineWidth > 0) {\n\n    //Draw border\n    var w = lineWidth * pixelRatio\n    boxes.drawBox(loX-w, loY-w, hiX+w, loY+w, borderColor)\n    boxes.drawBox(loX-w, hiY-w, hiX+w, hiY+w, borderColor)\n    boxes.drawBox(loX-w, loY-w, loX+w, hiY+w, borderColor)\n    boxes.drawBox(hiX-w, loY-w, hiX+w, hiY+w, borderColor)\n  }\n}\n\nproto.update = function(options) {\n  options = options || {}\n\n  this.innerFill    = !!options.innerFill\n  this.outerFill    = !!options.outerFill\n  this.innerColor   = (options.innerColor   || [0,0,0,0.5]).slice()\n  this.outerColor   = (options.outerColor   || [0,0,0,0.5]).slice()\n  this.borderColor  = (options.borderColor || [0,0,0,1]).slice()\n  this.borderWidth  = options.borderWidth || 0\n  this.selectBox    = (options.selectBox || this.selectBox).slice()\n}\n\nproto.dispose = function() {\n  this.boxBuffer.dispose()\n  this.boxShader.dispose()\n  this.plot.removeOverlay(this)\n}\n\nfunction createSelectBox(plot, options) {\n  var gl = plot.gl\n  var buffer = createBuffer(gl, [\n    0, 0,\n    0, 1,\n    1, 0,\n    1, 1 ])\n  var shader = createShader(gl, SHADERS.boxVertex, SHADERS.boxFragment)\n  var selectBox = new SelectBox(plot, buffer, shader)\n  selectBox.update(options)\n  plot.addOverlay(selectBox)\n  return selectBox\n}\n\n},{\"./lib/shaders\":297,\"gl-buffer\":240,\"gl-shader\":300}],299:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createSelectBuffer\n\nvar createFBO = _dereq_('gl-fbo')\nvar pool      = _dereq_('typedarray-pool')\nvar ndarray   = _dereq_('ndarray')\n\nvar nextPow2  = _dereq_('bit-twiddle').nextPow2\n\nvar selectRange = _dereq_('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_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f<this_closestD2&&(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}\",\"args\":[{\"name\":\"_inline_16_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg1_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg3_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg4_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg5_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_16_arg6_\",\"lvalue\":false,\"rvalue\":true,\"count\":4}],\"thisVars\":[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],\"localVars\":[\"_inline_16_a\",\"_inline_16_f\",\"_inline_16_l\"]},\"post\":{\"body\":\"{return[this_closestX,this_closestY,this_closestD2]}\",\"args\":[],\"thisVars\":[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],\"localVars\":[]},\"debug\":false,\"funcName\":\"cwise\",\"blockSize\":64})\n\nfunction SelectResult(x, y, id, value, distance) {\n  this.coord = [x, y]\n  this.id = id\n  this.value = value\n  this.distance = distance\n}\n\nfunction SelectBuffer(gl, fbo, buffer) {\n  this.gl     = gl\n  this.fbo    = fbo\n  this.buffer = buffer\n  this._readTimeout = null\n  var self = this\n\n  this._readCallback = function() {\n    if(!self.gl) {\n      return\n    }\n    fbo.bind()\n    gl.readPixels(0,0,fbo.shape[0],fbo.shape[1],gl.RGBA,gl.UNSIGNED_BYTE,self.buffer)\n    self._readTimeout = null\n  }\n}\n\nvar proto = SelectBuffer.prototype\n\nObject.defineProperty(proto, 'shape', {\n  get: function() {\n    if(!this.gl) {\n      return [0,0]\n    }\n    return this.fbo.shape.slice()\n  },\n  set: function(v) {\n    if(!this.gl) {\n      return\n    }\n    this.fbo.shape = v\n    var c = this.fbo.shape[0]\n    var r = this.fbo.shape[1]\n    if(r*c*4 > this.buffer.length) {\n      pool.free(this.buffer)\n      var buffer = this.buffer = pool.mallocUint8(nextPow2(r*c*4))\n      for(var i=0; i<r*c*4; ++i) {\n        buffer[i] = 0xff\n      }\n    }\n    return v\n  }\n})\n\nproto.begin = function() {\n  var gl = this.gl\n  var shape = this.shape\n  if(!gl) {\n    return\n  }\n\n  this.fbo.bind()\n  gl.clearColor(1,1,1,1)\n  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)\n}\n\nproto.end = function() {\n  var gl = this.gl\n  if(!gl) {\n    return\n  }\n  gl.bindFramebuffer(gl.FRAMEBUFFER, null)\n  if(!this._readTimeout) {\n    clearTimeout(this._readTimeout)\n  }\n  this._readTimeout = setTimeout(this._readCallback, 1)\n}\n\nproto.query = function(x, y, radius) {\n  if(!this.gl) {\n    return null\n  }\n\n  var shape = this.fbo.shape.slice()\n\n  x = x|0\n  y = y|0\n  if(typeof radius !== 'number') {\n    radius = 1.0\n  }\n\n  var x0 = Math.min(Math.max(x - radius, 0), shape[0])|0\n  var x1 = Math.min(Math.max(x + radius, 0), shape[0])|0\n  var y0 = Math.min(Math.max(y - radius, 0), shape[1])|0\n  var y1 = Math.min(Math.max(y + radius, 0), shape[1])|0\n\n  if(x1 <= x0 || y1 <= y0) {\n    return null\n  }\n\n  var dims   = [x1-x0,y1-y0]\n  var region = ndarray(\n    this.buffer,\n    [dims[0], dims[1], 4],\n    [4, shape[0]*4, 1],\n    4*(x0 + shape[0]*y0));\n\n  var closest = selectRange(region.hi(dims[0],dims[1],1), radius, radius)\n  var dx = closest[0]\n  var dy = closest[1]\n  if(dx < 0 || Math.pow(this.radius, 2) < closest[2]) {\n    return null\n  }\n\n  var c0 = region.get(dx, dy, 0)\n  var c1 = region.get(dx, dy, 1)\n  var c2 = region.get(dx, dy, 2)\n  var c3 = region.get(dx, dy, 3)\n\n  return new SelectResult(\n     (dx + x0)|0,\n     (dy + y0)|0,\n     c0,\n     [c1, c2, c3],\n     Math.sqrt(closest[2]))\n}\n\nproto.dispose = function() {\n  if(!this.gl) {\n    return\n  }\n  this.fbo.dispose()\n  pool.free(this.buffer)\n  this.gl = null\n  if(this._readTimeout) {\n    clearTimeout(this._readTimeout)\n  }\n}\n\nfunction createSelectBuffer(gl, shape) {\n  var fbo = createFBO(gl, shape)\n  var buffer = pool.mallocUint8(shape[0]*shape[1]*4)\n  return new SelectBuffer(gl, fbo, buffer)\n}\n\n},{\"bit-twiddle\":85,\"cwise/lib/wrapper\":142,\"gl-fbo\":248,\"ndarray\":445,\"typedarray-pool\":532}],300:[function(_dereq_,module,exports){\n'use strict'\n\nvar createUniformWrapper   = _dereq_('./lib/create-uniforms')\nvar createAttributeWrapper = _dereq_('./lib/create-attributes')\nvar makeReflect            = _dereq_('./lib/reflect')\nvar shaderCache            = _dereq_('./lib/shader-cache')\nvar runtime                = _dereq_('./lib/runtime-reflect')\nvar GLError                = _dereq_(\"./lib/GLError\")\n\n//Shader object\nfunction Shader(gl) {\n  this.gl         = gl\n  this.gl.lastAttribCount = 0  // fixme where else should we store info, safe but not nice on the gl object\n\n  //Default initialize these to null\n  this._vref      =\n  this._fref      =\n  this._relink    =\n  this.vertShader =\n  this.fragShader =\n  this.program    =\n  this.attributes =\n  this.uniforms   =\n  this.types      = null\n}\n\nvar proto = Shader.prototype\n\nproto.bind = function() {\n  if(!this.program) {\n    this._relink()\n  }\n\n  // ensuring that we have the right number of enabled vertex attributes\n  var i\n  var newAttribCount = this.gl.getProgramParameter(this.program, this.gl.ACTIVE_ATTRIBUTES) // more robust approach\n  //var newAttribCount = Object.keys(this.attributes).length // avoids the probably immaterial introspection slowdown\n  var oldAttribCount = this.gl.lastAttribCount\n  if(newAttribCount > oldAttribCount) {\n    for(i = oldAttribCount; i < newAttribCount; i++) {\n      this.gl.enableVertexAttribArray(i)\n    }\n  } else if(oldAttribCount > newAttribCount) {\n    for(i = newAttribCount; i < oldAttribCount; i++) {\n      this.gl.disableVertexAttribArray(i)\n    }\n  }\n\n  this.gl.lastAttribCount = newAttribCount\n\n  this.gl.useProgram(this.program)\n}\n\nproto.dispose = function() {\n\n  // disabling vertex attributes so new shader starts with zero\n  // and it's also useful if all shaders are disposed but the\n  // gl context is reused for subsequent replotting\n  var oldAttribCount = this.gl.lastAttribCount\n  for (var i = 0; i < oldAttribCount; i++) {\n    this.gl.disableVertexAttribArray(i)\n  }\n  this.gl.lastAttribCount = 0\n\n  if(this._fref) {\n    this._fref.dispose()\n  }\n  if(this._vref) {\n    this._vref.dispose()\n  }\n  this.attributes =\n  this.types      =\n  this.vertShader =\n  this.fragShader =\n  this.program    =\n  this._relink    =\n  this._fref      =\n  this._vref      = null\n}\n\nfunction compareAttributes(a, b) {\n  if(a.name < b.name) {\n    return -1\n  }\n  return 1\n}\n\n//Update export hook for glslify-live\nproto.update = function(\n    vertSource\n  , fragSource\n  , uniforms\n  , attributes) {\n\n  //If only one object passed, assume glslify style output\n  if(!fragSource || arguments.length === 1) {\n    var obj = vertSource\n    vertSource = obj.vertex\n    fragSource = obj.fragment\n    uniforms   = obj.uniforms\n    attributes = obj.attributes\n  }\n\n  var wrapper = this\n  var gl      = wrapper.gl\n\n  //Compile vertex and fragment shaders\n  var pvref = wrapper._vref\n  wrapper._vref = shaderCache.shader(gl, gl.VERTEX_SHADER, vertSource)\n  if(pvref) {\n    pvref.dispose()\n  }\n  wrapper.vertShader = wrapper._vref.shader\n  var pfref = this._fref\n  wrapper._fref = shaderCache.shader(gl, gl.FRAGMENT_SHADER, fragSource)\n  if(pfref) {\n    pfref.dispose()\n  }\n  wrapper.fragShader = wrapper._fref.shader\n\n  //If uniforms/attributes is not specified, use RT reflection\n  if(!uniforms || !attributes) {\n\n    //Create initial test program\n    var testProgram = gl.createProgram()\n    gl.attachShader(testProgram, wrapper.fragShader)\n    gl.attachShader(testProgram, wrapper.vertShader)\n    gl.linkProgram(testProgram)\n    if(!gl.getProgramParameter(testProgram, gl.LINK_STATUS)) {\n      var errLog = gl.getProgramInfoLog(testProgram)\n      throw new GLError(errLog, 'Error linking program:' + errLog)\n    }\n\n    //Load data from runtime\n    uniforms   = uniforms   || runtime.uniforms(gl, testProgram)\n    attributes = attributes || runtime.attributes(gl, testProgram)\n\n    //Release test program\n    gl.deleteProgram(testProgram)\n  }\n\n  //Sort attributes lexicographically\n  // overrides undefined WebGL behavior for attribute locations\n  attributes = attributes.slice()\n  attributes.sort(compareAttributes)\n\n  //Convert attribute types, read out locations\n  var attributeUnpacked  = []\n  var attributeNames     = []\n  var attributeLocations = []\n  var i\n  for(i=0; i<attributes.length; ++i) {\n    var attr = attributes[i]\n    if(attr.type.indexOf('mat') >= 0) {\n      var size = attr.type.charAt(attr.type.length-1)|0\n      var locVector = new Array(size)\n      for(var j=0; j<size; ++j) {\n        locVector[j] = attributeLocations.length\n        attributeNames.push(attr.name + '[' + j + ']')\n        if(typeof attr.location === 'number') {\n          attributeLocations.push(attr.location + j)\n        } else if(Array.isArray(attr.location) &&\n                  attr.location.length === size &&\n                  typeof attr.location[j] === 'number') {\n          attributeLocations.push(attr.location[j]|0)\n        } else {\n          attributeLocations.push(-1)\n        }\n      }\n      attributeUnpacked.push({\n        name: attr.name,\n        type: attr.type,\n        locations: locVector\n      })\n    } else {\n      attributeUnpacked.push({\n        name: attr.name,\n        type: attr.type,\n        locations: [ attributeLocations.length ]\n      })\n      attributeNames.push(attr.name)\n      if(typeof attr.location === 'number') {\n        attributeLocations.push(attr.location|0)\n      } else {\n        attributeLocations.push(-1)\n      }\n    }\n  }\n\n  //For all unspecified attributes, assign them lexicographically min attribute\n  var curLocation = 0\n  for(i=0; i<attributeLocations.length; ++i) {\n    if(attributeLocations[i] < 0) {\n      while(attributeLocations.indexOf(curLocation) >= 0) {\n        curLocation += 1\n      }\n      attributeLocations[i] = curLocation\n    }\n  }\n\n  //Rebuild program and recompute all uniform locations\n  var uniformLocations = new Array(uniforms.length)\n  function relink() {\n    wrapper.program = shaderCache.program(\n        gl\n      , wrapper._vref\n      , wrapper._fref\n      , attributeNames\n      , attributeLocations)\n\n    for(var i=0; i<uniforms.length; ++i) {\n      uniformLocations[i] = gl.getUniformLocation(\n          wrapper.program\n        , uniforms[i].name)\n    }\n  }\n\n  //Perform initial linking, reuse program used for reflection\n  relink()\n\n  //Save relinking procedure, defer until runtime\n  wrapper._relink = relink\n\n  //Generate type info\n  wrapper.types = {\n    uniforms:   makeReflect(uniforms),\n    attributes: makeReflect(attributes)\n  }\n\n  //Generate attribute wrappers\n  wrapper.attributes = createAttributeWrapper(\n      gl\n    , wrapper\n    , attributeUnpacked\n    , attributeLocations)\n\n  //Generate uniform wrappers\n  Object.defineProperty(wrapper, 'uniforms', createUniformWrapper(\n      gl\n    , wrapper\n    , uniforms\n    , uniformLocations))\n}\n\n//Compiles and links a shader program with the given attribute and vertex list\nfunction createShader(\n    gl\n  , vertSource\n  , fragSource\n  , uniforms\n  , attributes) {\n\n  var shader = new Shader(gl)\n\n  shader.update(\n      vertSource\n    , fragSource\n    , uniforms\n    , attributes)\n\n  return shader\n}\n\nmodule.exports = createShader\n\n},{\"./lib/GLError\":301,\"./lib/create-attributes\":302,\"./lib/create-uniforms\":303,\"./lib/reflect\":304,\"./lib/runtime-reflect\":305,\"./lib/shader-cache\":306}],301:[function(_dereq_,module,exports){\nfunction GLError (rawError, shortMessage, longMessage) {\n    this.shortMessage = shortMessage || ''\n    this.longMessage = longMessage || ''\n    this.rawError = rawError || ''\n    this.message =\n      'gl-shader: ' + (shortMessage || rawError || '') +\n      (longMessage ? '\\n'+longMessage : '')\n    this.stack = (new Error()).stack\n}\nGLError.prototype = new Error\nGLError.prototype.name = 'GLError'\nGLError.prototype.constructor = GLError\nmodule.exports = GLError\n\n},{}],302:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createAttributeWrapper\n\nvar GLError = _dereq_(\"./GLError\")\n\nfunction ShaderAttribute(\n    gl\n  , wrapper\n  , index\n  , locations\n  , dimension\n  , constFunc) {\n  this._gl        = gl\n  this._wrapper   = wrapper\n  this._index     = index\n  this._locations = locations\n  this._dimension = dimension\n  this._constFunc = constFunc\n}\n\nvar proto = ShaderAttribute.prototype\n\nproto.pointer = function setAttribPointer(\n    type\n  , normalized\n  , stride\n  , offset) {\n\n  var self      = this\n  var gl        = self._gl\n  var location  = self._locations[self._index]\n\n  gl.vertexAttribPointer(\n      location\n    , self._dimension\n    , type || gl.FLOAT\n    , !!normalized\n    , stride || 0\n    , offset || 0)\n  gl.enableVertexAttribArray(location)\n}\n\nproto.set = function(x0, x1, x2, x3) {\n  return this._constFunc(this._locations[this._index], x0, x1, x2, x3)\n}\n\nObject.defineProperty(proto, 'location', {\n  get: function() {\n    return this._locations[this._index]\n  }\n  , set: function(v) {\n    if(v !== this._locations[this._index]) {\n      this._locations[this._index] = v|0\n      this._wrapper.program = null\n    }\n    return v|0\n  }\n})\n\n//Adds a vector attribute to obj\nfunction addVectorAttribute(\n    gl\n  , wrapper\n  , index\n  , locations\n  , dimension\n  , obj\n  , name) {\n\n  //Construct constant function\n  var constFuncArgs = [ 'gl', 'v' ]\n  var varNames = []\n  for(var i=0; i<dimension; ++i) {\n    constFuncArgs.push('x'+i)\n    varNames.push('x'+i)\n  }\n  constFuncArgs.push(\n    'if(x0.length===void 0){return gl.vertexAttrib' +\n    dimension + 'f(v,' +\n    varNames.join() +\n    ')}else{return gl.vertexAttrib' +\n    dimension +\n    'fv(v,x0)}')\n  var constFunc = Function.apply(null, constFuncArgs)\n\n  //Create attribute wrapper\n  var attr = new ShaderAttribute(\n      gl\n    , wrapper\n    , index\n    , locations\n    , dimension\n    , constFunc)\n\n  //Create accessor\n  Object.defineProperty(obj, name, {\n    set: function(x) {\n      gl.disableVertexAttribArray(locations[index])\n      constFunc(gl, locations[index], x)\n      return x\n    }\n    , get: function() {\n      return attr\n    }\n    , enumerable: true\n  })\n}\n\nfunction addMatrixAttribute(\n    gl\n  , wrapper\n  , index\n  , locations\n  , dimension\n  , obj\n  , name) {\n\n  var parts = new Array(dimension)\n  var attrs = new Array(dimension)\n  for(var i=0; i<dimension; ++i) {\n    addVectorAttribute(\n        gl\n      , wrapper\n      , index[i]\n      , locations\n      , dimension\n      , parts\n      , i)\n    attrs[i] = parts[i]\n  }\n\n  Object.defineProperty(parts, 'location', {\n    set: function(v) {\n      if(Array.isArray(v)) {\n        for(var i=0; i<dimension; ++i) {\n          attrs[i].location = v[i]\n        }\n      } else {\n        for(var i=0; i<dimension; ++i) {\n          attrs[i].location = v + i\n        }\n      }\n      return v\n    }\n    , get: function() {\n      var result = new Array(dimension)\n      for(var i=0; i<dimension; ++i) {\n        result[i] = locations[index[i]]\n      }\n      return result\n    }\n    , enumerable: true\n  })\n\n  parts.pointer = function(type, normalized, stride, offset) {\n    type       = type || gl.FLOAT\n    normalized = !!normalized\n    stride     = stride || (dimension * dimension)\n    offset     = offset || 0\n    for(var i=0; i<dimension; ++i) {\n      var location = locations[index[i]]\n      gl.vertexAttribPointer(\n            location\n          , dimension\n          , type\n          , normalized\n          , stride\n          , offset + i * dimension)\n      gl.enableVertexAttribArray(location)\n    }\n  }\n\n  var scratch = new Array(dimension)\n  var vertexAttrib = gl['vertexAttrib' + dimension + 'fv']\n\n  Object.defineProperty(obj, name, {\n    set: function(x) {\n      for(var i=0; i<dimension; ++i) {\n        var loc = locations[index[i]]\n        gl.disableVertexAttribArray(loc)\n        if(Array.isArray(x[0])) {\n          vertexAttrib.call(gl, loc, x[i])\n        } else {\n          for(var j=0; j<dimension; ++j) {\n            scratch[j] = x[dimension*i + j]\n          }\n          vertexAttrib.call(gl, loc, scratch)\n        }\n      }\n      return x\n    }\n    , get: function() {\n      return parts\n    }\n    , enumerable: true\n  })\n}\n\n//Create shims for attributes\nfunction createAttributeWrapper(\n    gl\n  , wrapper\n  , attributes\n  , locations) {\n\n  var obj = {}\n  for(var i=0, n=attributes.length; i<n; ++i) {\n\n    var a = attributes[i]\n    var name = a.name\n    var type = a.type\n    var locs = a.locations\n\n    switch(type) {\n      case 'bool':\n      case 'int':\n      case 'float':\n        addVectorAttribute(\n            gl\n          , wrapper\n          , locs[0]\n          , locations\n          , 1\n          , obj\n          , name)\n      break\n\n      default:\n        if(type.indexOf('vec') >= 0) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid data type for attribute ' + name + ': ' + type)\n          }\n          addVectorAttribute(\n              gl\n            , wrapper\n            , locs[0]\n            , locations\n            , d\n            , obj\n            , name)\n        } else if(type.indexOf('mat') >= 0) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid data type for attribute ' + name + ': ' + type)\n          }\n          addMatrixAttribute(\n              gl\n            , wrapper\n            , locs\n            , locations\n            , d\n            , obj\n            , name)\n        } else {\n          throw new GLError('', 'Unknown data type for attribute ' + name + ': ' + type)\n        }\n      break\n    }\n  }\n  return obj\n}\n\n},{\"./GLError\":301}],303:[function(_dereq_,module,exports){\n'use strict'\n\nvar coallesceUniforms = _dereq_('./reflect')\nvar GLError = _dereq_(\"./GLError\")\n\nmodule.exports = createUniformWrapper\n\n//Binds a function and returns a value\nfunction identity(x) {\n  var c = new Function('y', 'return function(){return y}')\n  return c(x)\n}\n\nfunction makeVector(length, fill) {\n  var result = new Array(length)\n  for(var i=0; i<length; ++i) {\n    result[i] = fill\n  }\n  return result\n}\n\n//Create shims for uniforms\nfunction createUniformWrapper(gl, wrapper, uniforms, locations) {\n\n  function makeGetter(index) {\n    var proc = new Function(\n        'gl'\n      , 'wrapper'\n      , 'locations'\n      , 'return function(){return gl.getUniform(wrapper.program,locations[' + index + '])}')\n    return proc(gl, wrapper, locations)\n  }\n\n  function makePropSetter(path, index, type) {\n    switch(type) {\n      case 'bool':\n      case 'int':\n      case 'sampler2D':\n      case 'samplerCube':\n        return 'gl.uniform1i(locations[' + index + '],obj' + path + ')'\n      case 'float':\n        return 'gl.uniform1f(locations[' + index + '],obj' + path + ')'\n      default:\n        var vidx = type.indexOf('vec')\n        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid data type')\n          }\n          switch(type.charAt(0)) {\n            case 'b':\n            case 'i':\n              return 'gl.uniform' + d + 'iv(locations[' + index + '],obj' + path + ')'\n            case 'v':\n              return 'gl.uniform' + d + 'fv(locations[' + index + '],obj' + path + ')'\n            default:\n              throw new GLError('', 'Unrecognized data type for vector ' + name + ': ' + type)\n          }\n        } else if(type.indexOf('mat') === 0 && type.length === 4) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid uniform dimension type for matrix ' + name + ': ' + type)\n          }\n          return 'gl.uniformMatrix' + d + 'fv(locations[' + index + '],false,obj' + path + ')'\n        } else {\n          throw new GLError('', 'Unknown uniform data type for ' + name + ': ' + type)\n        }\n      break\n    }\n  }\n\n  function enumerateIndices(prefix, type) {\n    if(typeof type !== 'object') {\n      return [ [prefix, type] ]\n    }\n    var indices = []\n    for(var id in type) {\n      var prop = type[id]\n      var tprefix = prefix\n      if(parseInt(id) + '' === id) {\n        tprefix += '[' + id + ']'\n      } else {\n        tprefix += '.' + id\n      }\n      if(typeof prop === 'object') {\n        indices.push.apply(indices, enumerateIndices(tprefix, prop))\n      } else {\n        indices.push([tprefix, prop])\n      }\n    }\n    return indices\n  }\n\n  function makeSetter(type) {\n    var code = [ 'return function updateProperty(obj){' ]\n    var indices = enumerateIndices('', type)\n    for(var i=0; i<indices.length; ++i) {\n      var item = indices[i]\n      var path = item[0]\n      var idx  = item[1]\n      if(locations[idx]) {\n        code.push(makePropSetter(path, idx, uniforms[idx].type))\n      }\n    }\n    code.push('return obj}')\n    var proc = new Function('gl', 'locations', code.join('\\n'))\n    return proc(gl, locations)\n  }\n\n  function defaultValue(type) {\n    switch(type) {\n      case 'bool':\n        return false\n      case 'int':\n      case 'sampler2D':\n      case 'samplerCube':\n        return 0\n      case 'float':\n        return 0.0\n      default:\n        var vidx = type.indexOf('vec')\n        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid data type')\n          }\n          if(type.charAt(0) === 'b') {\n            return makeVector(d, false)\n          }\n          return makeVector(d, 0)\n        } else if(type.indexOf('mat') === 0 && type.length === 4) {\n          var d = type.charCodeAt(type.length-1) - 48\n          if(d < 2 || d > 4) {\n            throw new GLError('', 'Invalid uniform dimension type for matrix ' + name + ': ' + type)\n          }\n          return makeVector(d*d, 0)\n        } else {\n          throw new GLError('', 'Unknown uniform data type for ' + name + ': ' + type)\n        }\n      break\n    }\n  }\n\n  function storeProperty(obj, prop, type) {\n    if(typeof type === 'object') {\n      var child = processObject(type)\n      Object.defineProperty(obj, prop, {\n        get: identity(child),\n        set: makeSetter(type),\n        enumerable: true,\n        configurable: false\n      })\n    } else {\n      if(locations[type]) {\n        Object.defineProperty(obj, prop, {\n          get: makeGetter(type),\n          set: makeSetter(type),\n          enumerable: true,\n          configurable: false\n        })\n      } else {\n        obj[prop] = defaultValue(uniforms[type].type)\n      }\n    }\n  }\n\n  function processObject(obj) {\n    var result\n    if(Array.isArray(obj)) {\n      result = new Array(obj.length)\n      for(var i=0; i<obj.length; ++i) {\n        storeProperty(result, i, obj[i])\n      }\n    } else {\n      result = {}\n      for(var id in obj) {\n        storeProperty(result, id, obj[id])\n      }\n    }\n    return result\n  }\n\n  //Return data\n  var coallesced = coallesceUniforms(uniforms, true)\n  return {\n    get: identity(processObject(coallesced)),\n    set: makeSetter(coallesced),\n    enumerable: true,\n    configurable: true\n  }\n}\n\n},{\"./GLError\":301,\"./reflect\":304}],304:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = makeReflectTypes\n\n//Construct type info for reflection.\n//\n// This iterates over the flattened list of uniform type values and smashes them into a JSON object.\n//\n// The leaves of the resulting object are either indices or type strings representing primitive glslify types\nfunction makeReflectTypes(uniforms, useIndex) {\n  var obj = {}\n  for(var i=0; i<uniforms.length; ++i) {\n    var n = uniforms[i].name\n    var parts = n.split(\".\")\n    var o = obj\n    for(var j=0; j<parts.length; ++j) {\n      var x = parts[j].split(\"[\")\n      if(x.length > 1) {\n        if(!(x[0] in o)) {\n          o[x[0]] = []\n        }\n        o = o[x[0]]\n        for(var k=1; k<x.length; ++k) {\n          var y = parseInt(x[k])\n          if(k<x.length-1 || j<parts.length-1) {\n            if(!(y in o)) {\n              if(k < x.length-1) {\n                o[y] = []\n              } else {\n                o[y] = {}\n              }\n            }\n            o = o[y]\n          } else {\n            if(useIndex) {\n              o[y] = i\n            } else {\n              o[y] = uniforms[i].type\n            }\n          }\n        }\n      } else if(j < parts.length-1) {\n        if(!(x[0] in o)) {\n          o[x[0]] = {}\n        }\n        o = o[x[0]]\n      } else {\n        if(useIndex) {\n          o[x[0]] = i\n        } else {\n          o[x[0]] = uniforms[i].type\n        }\n      }\n    }\n  }\n  return obj\n}\n},{}],305:[function(_dereq_,module,exports){\n'use strict'\n\nexports.uniforms    = runtimeUniforms\nexports.attributes  = runtimeAttributes\n\nvar GL_TO_GLSL_TYPES = {\n  'FLOAT':       'float',\n  'FLOAT_VEC2':  'vec2',\n  'FLOAT_VEC3':  'vec3',\n  'FLOAT_VEC4':  'vec4',\n  'INT':         'int',\n  'INT_VEC2':    'ivec2',\n  'INT_VEC3':    'ivec3',\n  'INT_VEC4':    'ivec4',\n  'BOOL':        'bool',\n  'BOOL_VEC2':   'bvec2',\n  'BOOL_VEC3':   'bvec3',\n  'BOOL_VEC4':   'bvec4',\n  'FLOAT_MAT2':  'mat2',\n  'FLOAT_MAT3':  'mat3',\n  'FLOAT_MAT4':  'mat4',\n  'SAMPLER_2D':  'sampler2D',\n  'SAMPLER_CUBE':'samplerCube'\n}\n\nvar GL_TABLE = null\n\nfunction getType(gl, type) {\n  if(!GL_TABLE) {\n    var typeNames = Object.keys(GL_TO_GLSL_TYPES)\n    GL_TABLE = {}\n    for(var i=0; i<typeNames.length; ++i) {\n      var tn = typeNames[i]\n      GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn]\n    }\n  }\n  return GL_TABLE[type]\n}\n\nfunction runtimeUniforms(gl, program) {\n  var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS)\n  var result = []\n  for(var i=0; i<numUniforms; ++i) {\n    var info = gl.getActiveUniform(program, i)\n    if(info) {\n      var type = getType(gl, info.type)\n      if(info.size > 1) {\n        for(var j=0; j<info.size; ++j) {\n          result.push({\n            name: info.name.replace('[0]', '[' + j + ']'),\n            type: type\n          })\n        }\n      } else {\n        result.push({\n          name: info.name,\n          type: type\n        })\n      }\n    }\n  }\n  return result\n}\n\nfunction runtimeAttributes(gl, program) {\n  var numAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES)\n  var result = []\n  for(var i=0; i<numAttributes; ++i) {\n    var info = gl.getActiveAttrib(program, i)\n    if(info) {\n      result.push({\n        name: info.name,\n        type: getType(gl, info.type)\n      })\n    }\n  }\n  return result\n}\n\n},{}],306:[function(_dereq_,module,exports){\n'use strict'\n\nexports.shader   = getShaderReference\nexports.program  = createProgram\n\nvar GLError = _dereq_(\"./GLError\")\nvar formatCompilerError = _dereq_('gl-format-compiler-error');\n\nvar weakMap = typeof WeakMap === 'undefined' ? _dereq_('weakmap-shim') : WeakMap\nvar CACHE = new weakMap()\n\nvar SHADER_COUNTER = 0\n\nfunction ShaderReference(id, src, type, shader, programs, count, cache) {\n  this.id       = id\n  this.src      = src\n  this.type     = type\n  this.shader   = shader\n  this.count    = count\n  this.programs = []\n  this.cache    = cache\n}\n\nShaderReference.prototype.dispose = function() {\n  if(--this.count === 0) {\n    var cache    = this.cache\n    var gl       = cache.gl\n\n    //Remove program references\n    var programs = this.programs\n    for(var i=0, n=programs.length; i<n; ++i) {\n      var p = cache.programs[programs[i]]\n      if(p) {\n        delete cache.programs[i]\n        gl.deleteProgram(p)\n      }\n    }\n\n    //Remove shader reference\n    gl.deleteShader(this.shader)\n    delete cache.shaders[(this.type === gl.FRAGMENT_SHADER)|0][this.src]\n  }\n}\n\nfunction ContextCache(gl) {\n  this.gl       = gl\n  this.shaders  = [{}, {}]\n  this.programs = {}\n}\n\nvar proto = ContextCache.prototype\n\nfunction compileShader(gl, type, src) {\n  var shader = gl.createShader(type)\n  gl.shaderSource(shader, src)\n  gl.compileShader(shader)\n  if(!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n    var errLog = gl.getShaderInfoLog(shader)\n    try {\n        var fmt = formatCompilerError(errLog, src, type);\n    } catch (e){\n        console.warn('Failed to format compiler error: ' + e);\n        throw new GLError(errLog, 'Error compiling shader:\\n' + errLog)\n    }\n    throw new GLError(errLog, fmt.short, fmt.long)\n  }\n  return shader\n}\n\nproto.getShaderReference = function(type, src) {\n  var gl      = this.gl\n  var shaders = this.shaders[(type === gl.FRAGMENT_SHADER)|0]\n  var shader  = shaders[src]\n  if(!shader || !gl.isShader(shader.shader)) {\n    var shaderObj = compileShader(gl, type, src)\n    shader = shaders[src] = new ShaderReference(\n      SHADER_COUNTER++,\n      src,\n      type,\n      shaderObj,\n      [],\n      1,\n      this)\n  } else {\n    shader.count += 1\n  }\n  return shader\n}\n\nfunction linkProgram(gl, vshader, fshader, attribs, locations) {\n  var program = gl.createProgram()\n  gl.attachShader(program, vshader)\n  gl.attachShader(program, fshader)\n  for(var i=0; i<attribs.length; ++i) {\n    gl.bindAttribLocation(program, locations[i], attribs[i])\n  }\n  gl.linkProgram(program)\n  if(!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n    var errLog = gl.getProgramInfoLog(program)\n    throw new GLError(errLog, 'Error linking program: ' + errLog)\n  }\n  return program\n}\n\nproto.getProgram = function(vref, fref, attribs, locations) {\n  var token = [vref.id, fref.id, attribs.join(':'), locations.join(':')].join('@')\n  var prog  = this.programs[token]\n  if(!prog || !this.gl.isProgram(prog)) {\n    this.programs[token] = prog = linkProgram(\n      this.gl,\n      vref.shader,\n      fref.shader,\n      attribs,\n      locations)\n    vref.programs.push(token)\n    fref.programs.push(token)\n  }\n  return prog\n}\n\nfunction getCache(gl) {\n  var ctxCache = CACHE.get(gl)\n  if(!ctxCache) {\n    ctxCache = new ContextCache(gl)\n    CACHE.set(gl, ctxCache)\n  }\n  return ctxCache\n}\n\nfunction getShaderReference(gl, type, src) {\n  return getCache(gl).getShaderReference(type, src)\n}\n\nfunction createProgram(gl, vref, fref, attribs, locations) {\n  return getCache(gl).getProgram(vref, fref, attribs, locations)\n}\n\n},{\"./GLError\":301,\"gl-format-compiler-error\":249,\"weakmap-shim\":542}],307:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createSpikes2D\n\nfunction GLSpikes2D(plot) {\n  this.plot = plot\n  this.enable = [true, true, false, false]\n  this.width  = [1, 1, 1, 1]\n  this.color  = [[0,0,0,1],\n                 [0,0,0,1],\n                 [0,0,0,1],\n                 [0,0,0,1]]\n  this.center = [Infinity, Infinity]\n}\n\nvar proto = GLSpikes2D.prototype\n\nproto.update = function(options) {\n  options = options || {}\n  this.enable = (options.enable || [true,true,false,false]).slice()\n  this.width  = (options.width || [1,1,1,1]).slice()\n  this.color  = (options.color || [\n                  [0,0,0,1],\n                  [0,0,0,1],\n                  [0,0,0,1],\n                  [0,0,0,1]]).map(function(x) { return x.slice() })\n  this.center = (options.center || [Infinity,Infinity]).slice()\n  this.plot.setOverlayDirty()\n}\n\nproto.draw = function() {\n  var spikeEnable = this.enable\n  var spikeWidth  = this.width\n  var spikeColor  = this.color\n  var spikeCenter = this.center\n  var plot        = this.plot\n  var line        = plot.line\n\n  var dataBox     = plot.dataBox\n  var viewPixels  = plot.viewBox\n\n  line.bind()\n\n  if(dataBox[0] <= spikeCenter[0] && spikeCenter[0] <= dataBox[2] &&\n     dataBox[1] <= spikeCenter[1] && spikeCenter[1] <= dataBox[3]) {\n\n    var centerX = viewPixels[0] + (spikeCenter[0] - dataBox[0]) / (dataBox[2] - dataBox[0]) * (viewPixels[2] - viewPixels[0])\n    var centerY = viewPixels[1] + (spikeCenter[1] - dataBox[1]) / (dataBox[3] - dataBox[1]) * (viewPixels[3] - viewPixels[1])\n\n    if(spikeEnable[0]) {\n     line.drawLine(\n       centerX, centerY,\n       viewPixels[0], centerY,\n       spikeWidth[0], spikeColor[0])\n    }\n    if(spikeEnable[1]) {\n     line.drawLine(\n       centerX, centerY,\n       centerX, viewPixels[1],\n       spikeWidth[1], spikeColor[1])\n    }\n    if(spikeEnable[2]) {\n      line.drawLine(\n        centerX, centerY,\n        viewPixels[2], centerY,\n        spikeWidth[2], spikeColor[2])\n    }\n    if(spikeEnable[3]) {\n      line.drawLine(\n        centerX, centerY,\n        centerX, viewPixels[3],\n        spikeWidth[3], spikeColor[3])\n    }\n  }\n}\n\nproto.dispose = function() {\n  this.plot.removeOverlay(this)\n}\n\nfunction createSpikes2D(plot, options) {\n  var spikes = new GLSpikes2D(plot)\n  spikes.update(options)\n  plot.addOverlay(spikes)\n  return spikes\n}\n\n},{}],308:[function(_dereq_,module,exports){\n'use strict'\n\nvar glslify      = _dereq_('glslify')\nvar createShader = _dereq_('gl-shader')\n\nvar vertSrc = glslify([\"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\"])\nvar fragSrc = glslify([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  gl_FragColor = fragColor;\\n}\"])\n\nmodule.exports = function(gl) {\n  return createShader(gl, vertSrc, fragSrc, null, [\n    {name: 'position', type: 'vec3'},\n    {name: 'color', type: 'vec3'},\n    {name: 'weight', type: 'float'}\n  ])\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],309:[function(_dereq_,module,exports){\n'use strict'\n\nvar createBuffer = _dereq_('gl-buffer')\nvar createVAO = _dereq_('gl-vao')\nvar createShader = _dereq_('./shaders/index')\n\nmodule.exports = createSpikes\n\nvar identity = [1,0,0,0,\n                0,1,0,0,\n                0,0,1,0,\n                0,0,0,1]\n\nfunction AxisSpikes(gl, buffer, vao, shader) {\n  this.gl         = gl\n  this.buffer     = buffer\n  this.vao        = vao\n  this.shader     = shader\n  this.pixelRatio = 1\n  this.bounds     = [[-1000,-1000,-1000], [1000,1000,1000]]\n  this.position   = [0,0,0]\n  this.lineWidth  = [2,2,2]\n  this.colors     = [[0,0,0,1], [0,0,0,1], [0,0,0,1]]\n  this.enabled    = [true,true,true]\n  this.drawSides  = [true,true,true]\n  this.axes       = null\n}\n\nvar proto = AxisSpikes.prototype\n\nvar OUTER_FACE = [0,0,0]\nvar INNER_FACE = [0,0,0]\n\nvar SHAPE = [0,0]\n\nproto.isTransparent = function() {\n  return false\n}\n\nproto.drawTransparent = function(camera) {}\n\nproto.draw = function(camera) {\n  var gl = this.gl\n  var vao = this.vao\n  var shader = this.shader\n\n  vao.bind()\n  shader.bind()\n\n  var model      = camera.model || identity\n  var view       = camera.view || identity\n  var projection = camera.projection || identity\n\n  var axis\n  if(this.axes) {\n    axis = this.axes.lastCubeProps.axis\n  }\n\n  var outerFace = OUTER_FACE\n  var innerFace = INNER_FACE\n  for(var i=0; i<3; ++i) {\n    if(axis && axis[i] < 0) {\n      outerFace[i] = this.bounds[0][i]\n      innerFace[i] = this.bounds[1][i]\n    } else {\n      outerFace[i] = this.bounds[1][i]\n      innerFace[i] = this.bounds[0][i]\n    }\n  }\n\n  SHAPE[0] = gl.drawingBufferWidth\n  SHAPE[1] = gl.drawingBufferHeight\n\n  shader.uniforms.model       = model\n  shader.uniforms.view        = view\n  shader.uniforms.projection  = projection\n  shader.uniforms.coordinates = [this.position, outerFace, innerFace]\n  shader.uniforms.colors      = this.colors\n  shader.uniforms.screenShape = SHAPE\n\n  for(var i=0; i<3; ++i) {\n    shader.uniforms.lineWidth = this.lineWidth[i] * this.pixelRatio\n    if(this.enabled[i]) {\n      vao.draw(gl.TRIANGLES, 6, 6*i)\n      if(this.drawSides[i]) {\n        vao.draw(gl.TRIANGLES, 12, 18+12*i)\n      }\n    }\n  }\n\n  vao.unbind()\n}\n\nproto.update = function(options) {\n  if(!options) {\n    return\n  }\n  if(\"bounds\" in options) {\n    this.bounds = options.bounds\n  }\n  if(\"position\" in options) {\n    this.position = options.position\n  }\n  if(\"lineWidth\" in options) {\n    this.lineWidth = options.lineWidth\n  }\n  if(\"colors\" in options) {\n    this.colors = options.colors\n  }\n  if(\"enabled\" in options) {\n    this.enabled = options.enabled\n  }\n  if(\"drawSides\" in options) {\n    this.drawSides = options.drawSides\n  }\n}\n\nproto.dispose = function() {\n  this.vao.dispose()\n  this.buffer.dispose()\n  this.shader.dispose()\n}\n\n\n\nfunction createSpikes(gl, options) {\n  //Create buffers\n  var data = [ ]\n\n  function line(x,y,z,i,l,h) {\n    var row = [x,y,z,  0,0,0,  1]\n    row[i+3] = 1\n    row[i] = l\n    data.push.apply(data, row)\n    row[6] = -1\n    data.push.apply(data, row)\n    row[i] = h\n    data.push.apply(data, row)\n    data.push.apply(data, row)\n    row[6] = 1\n    data.push.apply(data, row)\n    row[i] = l\n    data.push.apply(data, row)\n  }\n\n  line(0,0,0, 0, 0, 1)\n  line(0,0,0, 1, 0, 1)\n  line(0,0,0, 2, 0, 1)\n\n  line(1,0,0,  1,  -1,1)\n  line(1,0,0,  2,  -1,1)\n\n  line(0,1,0,  0,  -1,1)\n  line(0,1,0,  2,  -1,1)\n\n  line(0,0,1,  0,  -1,1)\n  line(0,0,1,  1,  -1,1)\n\n  var buffer = createBuffer(gl, data)\n  var vao = createVAO(gl, [{\n    type: gl.FLOAT,\n    buffer: buffer,\n    size: 3,\n    offset: 0,\n    stride: 28\n  }, {\n    type: gl.FLOAT,\n    buffer: buffer,\n    size: 3,\n    offset: 12,\n    stride: 28\n  }, {\n    type: gl.FLOAT,\n    buffer: buffer,\n    size: 1,\n    offset: 24,\n    stride: 28\n  }])\n\n  //Create shader\n  var shader = createShader(gl)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location = 1\n  shader.attributes.weight.location = 2\n\n  //Create spike object\n  var spikes = new AxisSpikes(gl, buffer, vao, shader)\n\n  //Set parameters\n  spikes.update(options)\n\n  //Return resulting object\n  return spikes\n}\n\n},{\"./shaders/index\":308,\"gl-buffer\":240,\"gl-vao\":322}],310:[function(_dereq_,module,exports){\nvar glslify       = _dereq_('glslify')\n\nvar triVertSrc = glslify([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the tube vertex and normal at the given index.\\n//\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\n//\\n// Each tube segment is made up of a ring of vertices.\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\n// The indexes of tube segments run from 0 to 8.\\n//\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\n  float segmentCount = 8.0;\\n\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d);\\n  vec3 y = v * sin(angle) * length(d);\\n  vec3 v3 = x + y;\\n\\n  normal = normalize(v3);\\n\\n  return v3;\\n}\\n\\nattribute vec4 vector;\\nattribute vec4 color, position;\\nattribute vec2 uv;\\nuniform float vectorScale;\\nuniform float tubeScale;\\n\\nuniform mat4 model\\n           , view\\n           , projection\\n           , inverseModel;\\nuniform vec3 eyePosition\\n           , lightPosition;\\n\\nvarying vec3 f_normal\\n           , f_lightDirection\\n           , f_eyeDirection\\n           , f_data\\n           , f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  // Scale the vector magnitude to stay constant with\\n  // model & view changes.\\n  vec3 normal;\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * tubePosition;\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\\n\\n  // vec4 m_position  = model * vec4(tubePosition, 1.0);\\n  vec4 t_position  = view * tubePosition;\\n  gl_Position      = projection * t_position;\\n\\n  f_color          = color;\\n  f_data           = tubePosition.xyz;\\n  f_position       = position.xyz;\\n  f_uv             = uv;\\n}\\n\"])\nvar triFragSrc = glslify([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(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\\nfloat cookTorranceSpecular(\\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(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\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\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\\n           , f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\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 = min(1.0, max(0.0, cookTorranceSpecular(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}\\n\"])\nvar pickVertSrc = glslify([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the tube vertex and normal at the given index.\\n//\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\n//\\n// Each tube segment is made up of a ring of vertices.\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\n// The indexes of tube segments run from 0 to 8.\\n//\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\n  float segmentCount = 8.0;\\n\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d);\\n  vec3 y = v * sin(angle) * length(d);\\n  vec3 v3 = x + y;\\n\\n  normal = normalize(v3);\\n\\n  return v3;\\n}\\n\\nattribute vec4 vector;\\nattribute vec4 position;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform float tubeScale;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  vec3 normal;\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  gl_Position = projection * view * tubePosition;\\n  f_id        = id;\\n  f_position  = position.xyz;\\n}\\n\"])\nvar pickFragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"])\n\nexports.meshShader = {\n  vertex:   triVertSrc,\n  fragment: triFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec4'},\n    {name: 'normal', type: 'vec3'},\n    {name: 'color', type: 'vec4'},\n    {name: 'uv', type: 'vec2'},\n    {name: 'vector', type: 'vec4'}\n  ]\n}\nexports.pickShader = {\n  vertex:   pickVertSrc,\n  fragment: pickFragSrc,\n  attributes: [\n    {name: 'position', type: 'vec4'},\n    {name: 'id', type: 'vec4'},\n    {name: 'vector', type: 'vec4'}\n  ]\n}\n\n},{\"glslify\":404}],311:[function(_dereq_,module,exports){\n'use strict'\n\nvar DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small\nvar DEFAULT_FACE_NORMALS_EPSILON = 1e-6;\n\nvar createShader  = _dereq_('gl-shader')\nvar createBuffer  = _dereq_('gl-buffer')\nvar createVAO     = _dereq_('gl-vao')\nvar createTexture = _dereq_('gl-texture2d')\nvar normals       = _dereq_('normals')\nvar multiply      = _dereq_('gl-mat4/multiply')\nvar invert        = _dereq_('gl-mat4/invert')\nvar ndarray       = _dereq_('ndarray')\nvar colormap      = _dereq_('colormap')\nvar getContour    = _dereq_('simplicial-complex-contour')\nvar pool          = _dereq_('typedarray-pool')\nvar shaders       = _dereq_('./shaders')\n\nvar meshShader    = shaders.meshShader\nvar pickShader    = shaders.pickShader\n\nvar IDENTITY = [\n  1,0,0,0,\n  0,1,0,0,\n  0,0,1,0,\n  0,0,0,1]\n\nfunction SimplicialMesh(gl\n  , texture\n  , triShader\n  , pickShader\n  , trianglePositions\n  , triangleVectors\n  , triangleIds\n  , triangleColors\n  , triangleUVs\n  , triangleNormals\n  , triangleVAO\n  , edgePositions\n  , edgeIds\n  , edgeColors\n  , edgeUVs\n  , edgeVAO\n  , pointPositions\n  , pointIds\n  , pointColors\n  , pointUVs\n  , pointSizes\n  , pointVAO\n  , contourPositions\n  , contourVAO) {\n\n  this.gl                = gl\n  this.cells             = []\n  this.positions         = []\n  this.intensity         = []\n  this.texture           = texture\n  this.dirty             = true\n\n  this.triShader         = triShader\n  this.pickShader        = pickShader\n\n  this.trianglePositions = trianglePositions\n  this.triangleVectors   = triangleVectors\n  this.triangleColors    = triangleColors\n  this.triangleNormals   = triangleNormals\n  this.triangleUVs       = triangleUVs\n  this.triangleIds       = triangleIds\n  this.triangleVAO       = triangleVAO\n  this.triangleCount     = 0\n\n  this.lineWidth         = 1\n  this.edgePositions     = edgePositions\n  this.edgeColors        = edgeColors\n  this.edgeUVs           = edgeUVs\n  this.edgeIds           = edgeIds\n  this.edgeVAO           = edgeVAO\n  this.edgeCount         = 0\n\n  this.pointPositions    = pointPositions\n  this.pointColors       = pointColors\n  this.pointUVs          = pointUVs\n  this.pointSizes        = pointSizes\n  this.pointIds          = pointIds\n  this.pointVAO          = pointVAO\n  this.pointCount        = 0\n\n  this.contourLineWidth  = 1\n  this.contourPositions  = contourPositions\n  this.contourVAO        = contourVAO\n  this.contourCount      = 0\n  this.contourColor      = [0,0,0]\n  this.contourEnable     = false\n\n  this.pickId            = 1\n  this.bounds            = [\n    [ Infinity, Infinity, Infinity],\n    [-Infinity,-Infinity,-Infinity] ]\n  this.clipBounds        = [\n    [-Infinity,-Infinity,-Infinity],\n    [ Infinity, Infinity, Infinity] ]\n\n  this.lightPosition = [1e5, 1e5, 0]\n  this.ambientLight  = 0.8\n  this.diffuseLight  = 0.8\n  this.specularLight = 2.0\n  this.roughness     = 0.5\n  this.fresnel       = 1.5\n\n  this.opacity       = 1.0\n\n  this.tubeScale     = 1.0\n\n  this._model       = IDENTITY\n  this._view        = IDENTITY\n  this._projection  = IDENTITY\n  this._resolution  = [1,1]\n  this.pixelRatio   = 1\n}\n\nvar proto = SimplicialMesh.prototype\n\nproto.isOpaque = function() {\n  return this.opacity >= 1\n}\n\nproto.isTransparent = function() {\n  return this.opacity < 1\n}\n\nproto.pickSlots = 1\n\nproto.setPickBase = function(id) {\n  this.pickId = id\n}\n\nfunction genColormap(param) {\n  var colors = colormap({\n      colormap: param\n    , nshades:  256\n    , format:  'rgba'\n  })\n\n  var result = new Uint8Array(256*4)\n  for(var i=0; i<256; ++i) {\n    var c = colors[i]\n    for(var j=0; j<3; ++j) {\n      result[4*i+j] = c[j]\n    }\n    result[4*i+3] = c[3]*255\n  }\n\n  return ndarray(result, [256,256,4], [4,0,1])\n}\n\nfunction unpackIntensity(cells, numVerts, cellIntensity) {\n  var result = new Array(numVerts)\n  for(var i=0; i<numVerts; ++i) {\n    result[i] = 0\n  }\n  var numCells = cells.length\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      result[c[j]] = cellIntensity[i]\n    }\n  }\n  return result\n}\n\nfunction takeZComponent(array) {\n  var n = array.length\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = array[i][2]\n  }\n  return result\n}\n\nproto.highlight = function(selection) {\n  if(!selection || !this.contourEnable) {\n    this.contourCount = 0\n    return\n  }\n  var level = getContour(this.cells, this.intensity, selection.intensity)\n  var cells         = level.cells\n  var vertexIds     = level.vertexIds\n  var vertexWeights = level.vertexWeights\n  var numCells = cells.length\n  var result = pool.mallocFloat32(2 * 3 * numCells)\n  var ptr = 0\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    for(var j=0; j<2; ++j) {\n      var v = c[0]\n      if(c.length === 2) {\n        v = c[j]\n      }\n      var a = vertexIds[v][0]\n      var b = vertexIds[v][1]\n      var w = vertexWeights[v]\n      var wi = 1.0 - w\n      var pa = this.positions[a]\n      var pb = this.positions[b]\n      for(var k=0; k<3; ++k) {\n        result[ptr++] = w * pa[k] + wi * pb[k]\n      }\n    }\n  }\n  this.contourCount = (ptr / 3)|0\n  this.contourPositions.update(result.subarray(0, ptr))\n  pool.free(result)\n}\n\nproto.update = function(params) {\n  params = params || {}\n  var gl = this.gl\n\n  this.dirty = true\n\n  if('contourEnable' in params) {\n    this.contourEnable = params.contourEnable\n  }\n  if('contourColor' in params) {\n    this.contourColor = params.contourColor\n  }\n  if('lineWidth' in params) {\n    this.lineWidth = params.lineWidth\n  }\n  if('lightPosition' in params) {\n    this.lightPosition = params.lightPosition\n  }\n  if('opacity' in params) {\n    this.opacity = params.opacity\n  }\n  if('ambient' in params) {\n    this.ambientLight  = params.ambient\n  }\n  if('diffuse' in params) {\n    this.diffuseLight = params.diffuse\n  }\n  if('specular' in params) {\n    this.specularLight = params.specular\n  }\n  if('roughness' in params) {\n    this.roughness = params.roughness\n  }\n  if('fresnel' in params) {\n    this.fresnel = params.fresnel\n  }\n\n  if(params.texture) {\n    this.texture.dispose()\n    this.texture = createTexture(gl, params.texture)\n  } else if (params.colormap) {\n    this.texture.shape = [256,256]\n    this.texture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n    this.texture.magFilter = gl.LINEAR\n    this.texture.setPixels(genColormap(params.colormap))\n    this.texture.generateMipmap()\n  }\n\n  var cells = params.cells\n  var positions = params.positions\n  var vectors = params.vectors\n\n  if(!positions || !cells || !vectors) {\n    return\n  }\n\n  if (params.tubeScale !== undefined) {\n    this.tubeScale = params.tubeScale;\n  }\n\n  var tPos = []\n  var tVec = []\n  var tCol = []\n  var tNor = []\n  var tUVs = []\n  var tIds = []\n\n  var ePos = []\n  var eCol = []\n  var eUVs = []\n  var eIds = []\n\n  var pPos = []\n  var pCol = []\n  var pUVs = []\n  var pSiz = []\n  var pIds = []\n\n  //Save geometry data for picking calculations\n  this.cells     = cells\n  this.positions = positions\n  this.vectors   = vectors\n\n  //Compute normals\n  var vertexNormals = params.vertexNormals\n  var cellNormals   = params.cellNormals\n  var vertexNormalsEpsilon = params.vertexNormalsEpsilon === void(0) ? DEFAULT_VERTEX_NORMALS_EPSILON : params.vertexNormalsEpsilon\n  var faceNormalsEpsilon = params.faceNormalsEpsilon === void(0) ? DEFAULT_FACE_NORMALS_EPSILON : params.faceNormalsEpsilon\n  if(params.useFacetNormals && !cellNormals) {\n    cellNormals = normals.faceNormals(cells, positions, faceNormalsEpsilon)\n  }\n  if(!cellNormals && !vertexNormals) {\n    vertexNormals = normals.vertexNormals(cells, positions, vertexNormalsEpsilon)\n  }\n\n  //Compute colors\n  var vertexColors    = params.vertexColors\n  var cellColors      = params.cellColors\n  var meshColor       = params.meshColor || [1,1,1,1]\n\n  //UVs\n  var vertexUVs       = params.vertexUVs\n  var vertexIntensity = params.vertexIntensity\n  var cellUVs         = params.cellUVs\n  var cellIntensity   = params.cellIntensity\n\n  var intensityLo     = Infinity\n  var intensityHi     = -Infinity\n  if(!vertexUVs && !cellUVs) {\n    if(vertexIntensity) {\n      if(params.vertexIntensityBounds) {\n        intensityLo = +params.vertexIntensityBounds[0]\n        intensityHi = +params.vertexIntensityBounds[1]\n      } else {\n        for(var i=0; i<vertexIntensity.length; ++i) {\n          var f = vertexIntensity[i]\n          intensityLo = Math.min(intensityLo, f)\n          intensityHi = Math.max(intensityHi, f)\n        }\n      }\n    } else if(cellIntensity) {\n      for(var i=0; i<cellIntensity.length; ++i) {\n        var f = cellIntensity[i]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    } else {\n      for(var i=0; i<positions.length; ++i) {\n        var f = positions[i][2]\n        intensityLo = Math.min(intensityLo, f)\n        intensityHi = Math.max(intensityHi, f)\n      }\n    }\n  }\n\n  if(vertexIntensity) {\n    this.intensity = vertexIntensity\n  } else if(cellIntensity) {\n    this.intensity = unpackIntensity(cells, positions.length, cellIntensity)\n  } else {\n    this.intensity = takeZComponent(positions)\n  }\n\n  //Point size\n  var pointSizes      = params.pointSizes\n  var meshPointSize   = params.pointSize || 1.0\n\n  //Update bounds\n  this.bounds       = [[Infinity,Infinity,Infinity], [-Infinity,-Infinity,-Infinity]]\n  for(var i=0; i<positions.length; ++i) {\n    var p = positions[i]\n    for(var j=0; j<3; ++j) {\n      if(isNaN(p[j]) || !isFinite(p[j])) {\n        continue\n      }\n      this.bounds[0][j] = Math.min(this.bounds[0][j], p[j])\n      this.bounds[1][j] = Math.max(this.bounds[1][j], p[j])\n    }\n  }\n\n  //Pack cells into buffers\n  var triangleCount = 0\n  var edgeCount = 0\n  var pointCount = 0\n\nfill_loop:\n  for(var i=0; i<cells.length; ++i) {\n    var cell = cells[i]\n    switch(cell.length) {\n      case 1:\n\n        var v = cell[0]\n        var p = positions[v]\n\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          if(isNaN(p[j]) || !isFinite(p[j])) {\n            continue fill_loop\n          }\n        }\n\n        pPos.push(p[0], p[1], p[2], p[3])\n\n        var c\n        if(vertexColors) {\n          c = vertexColors[v]\n        } else if(cellColors) {\n          c = cellColors[i]\n        } else {\n          c = meshColor\n        }\n        if(c.length === 3) {\n          pCol.push(c[0], c[1], c[2], 1)\n        } else {\n          pCol.push(c[0], c[1], c[2], c[3])\n        }\n\n        var uv\n        if(vertexUVs) {\n          uv = vertexUVs[v]\n        } else if(vertexIntensity) {\n          uv = [\n            (vertexIntensity[v] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else if(cellUVs) {\n          uv = cellUVs[i]\n        } else if(cellIntensity) {\n          uv = [\n            (cellIntensity[i] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        } else {\n          uv = [\n            (p[2] - intensityLo) /\n            (intensityHi - intensityLo), 0]\n        }\n        pUVs.push(uv[0], uv[1])\n\n        if(pointSizes) {\n          pSiz.push(pointSizes[v])\n        } else {\n          pSiz.push(meshPointSize)\n        }\n\n        pIds.push(i)\n\n        pointCount += 1\n      break\n\n      case 2:\n\n        //Check NaNs\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<2; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n\n          ePos.push(p[0], p[1], p[2])\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n          if(c.length === 3) {\n            eCol.push(c[0], c[1], c[2], 1)\n          } else {\n            eCol.push(c[0], c[1], c[2], c[3])\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          eUVs.push(uv[0], uv[1])\n\n          eIds.push(i)\n        }\n        edgeCount += 1\n      break\n\n      case 3:\n        //Check NaNs\n        for(var j=0; j<3; ++j) {\n          var v = cell[j]\n          var p = positions[v]\n          for(var k=0; k<3; ++k) {\n            if(isNaN(p[k]) || !isFinite(p[k])) {\n              continue fill_loop\n            }\n          }\n        }\n\n        for(var j=0; j<3; ++j) {\n          var v = cell[2 - j]\n\n          var p = positions[v]\n          tPos.push(p[0], p[1], p[2], p[3])\n\n          var w = vectors[v]\n          tVec.push(w[0], w[1], w[2], w[3]);\n\n          var c\n          if(vertexColors) {\n            c = vertexColors[v]\n          } else if(cellColors) {\n            c = cellColors[i]\n          } else {\n            c = meshColor\n          }\n          if(c.length === 3) {\n            tCol.push(c[0], c[1], c[2], 1)\n          } else {\n            tCol.push(c[0], c[1], c[2], c[3])\n          }\n\n          var uv\n          if(vertexUVs) {\n            uv = vertexUVs[v]\n          } else if(vertexIntensity) {\n            uv = [\n              (vertexIntensity[v] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else if(cellUVs) {\n            uv = cellUVs[i]\n          } else if(cellIntensity) {\n            uv = [\n              (cellIntensity[i] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          } else {\n            uv = [\n              (p[2] - intensityLo) /\n              (intensityHi - intensityLo), 0]\n          }\n          tUVs.push(uv[0], uv[1])\n\n          var q\n          if(vertexNormals) {\n            q = vertexNormals[v]\n          } else {\n            q = cellNormals[i]\n          }\n          tNor.push(q[0], q[1], q[2])\n\n          tIds.push(i)\n        }\n        triangleCount += 1\n      break\n\n      default:\n      break\n    }\n  }\n\n  this.pointCount     = pointCount\n  this.edgeCount      = edgeCount\n  this.triangleCount  = triangleCount\n\n  this.pointPositions.update(pPos)\n  this.pointColors.update(pCol)\n  this.pointUVs.update(pUVs)\n  this.pointSizes.update(pSiz)\n  this.pointIds.update(new Uint32Array(pIds))\n\n  this.edgePositions.update(ePos)\n  this.edgeColors.update(eCol)\n  this.edgeUVs.update(eUVs)\n  this.edgeIds.update(new Uint32Array(eIds))\n\n  this.trianglePositions.update(tPos)\n  this.triangleVectors.update(tVec)\n  this.triangleColors.update(tCol)\n  this.triangleUVs.update(tUVs)\n  this.triangleNormals.update(tNor)\n  this.triangleIds.update(new Uint32Array(tIds))\n}\n\nproto.drawTransparent = proto.draw = function(params) {\n  params = params || {}\n  var gl          = this.gl\n  var model       = params.model      || IDENTITY\n  var view        = params.view       || IDENTITY\n  var projection  = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    inverseModel: IDENTITY.slice(),\n\n    clipBounds: clipBounds,\n\n    kambient:   this.ambientLight,\n    kdiffuse:   this.diffuseLight,\n    kspecular:  this.specularLight,\n    roughness:  this.roughness,\n    fresnel:    this.fresnel,\n\n    eyePosition:   [0,0,0],\n    lightPosition: [0,0,0],\n\n    opacity:  this.opacity,\n\n    tubeScale: this.tubeScale,\n\n    contourColor: this.contourColor,\n\n    texture:    0\n  }\n\n  uniforms.inverseModel = invert(uniforms.inverseModel, uniforms.model)\n\n  gl.disable(gl.CULL_FACE)\n\n  this.texture.bind(0)\n\n  var invCameraMatrix = new Array(16)\n  multiply(invCameraMatrix, uniforms.view, uniforms.model)\n  multiply(invCameraMatrix, uniforms.projection, invCameraMatrix)\n  invert(invCameraMatrix, invCameraMatrix)\n\n  for(var i=0; i<3; ++i) {\n    uniforms.eyePosition[i] = invCameraMatrix[12+i] / invCameraMatrix[15]\n  }\n\n  var w = invCameraMatrix[15]\n  for(var i=0; i<3; ++i) {\n    w += this.lightPosition[i] * invCameraMatrix[4*i+3]\n  }\n  for(var i=0; i<3; ++i) {\n    var s = invCameraMatrix[12+i]\n    for(var j=0; j<3; ++j) {\n      s += invCameraMatrix[4*j+i] * this.lightPosition[j]\n    }\n    uniforms.lightPosition[i] = s / w\n  }\n\n  if(this.triangleCount > 0) {\n    var shader = this.triShader\n    shader.bind()\n    shader.uniforms = uniforms\n\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n}\n\nproto.drawPick = function(params) {\n  params = params || {}\n\n  var gl         = this.gl\n\n  var model      = params.model      || IDENTITY\n  var view       = params.view       || IDENTITY\n  var projection = params.projection || IDENTITY\n\n  var clipBounds = [[-1e6,-1e6,-1e6],[1e6,1e6,1e6]]\n  for(var i=0; i<3; ++i) {\n    clipBounds[0][i] = Math.max(clipBounds[0][i], this.clipBounds[0][i])\n    clipBounds[1][i] = Math.min(clipBounds[1][i], this.clipBounds[1][i])\n  }\n\n  //Save camera parameters\n  this._model      = [].slice.call(model)\n  this._view       = [].slice.call(view)\n  this._projection = [].slice.call(projection)\n  this._resolution = [gl.drawingBufferWidth, gl.drawingBufferHeight]\n\n  var uniforms = {\n    model:      model,\n    view:       view,\n    projection: projection,\n    clipBounds: clipBounds,\n\n    tubeScale: this.tubeScale,\n\n    pickId:     this.pickId / 255.0,\n  }\n\n  var shader = this.pickShader\n  shader.bind()\n  shader.uniforms = uniforms\n\n  if(this.triangleCount > 0) {\n    this.triangleVAO.bind()\n    gl.drawArrays(gl.TRIANGLES, 0, this.triangleCount*3)\n    this.triangleVAO.unbind()\n  }\n\n  if(this.edgeCount > 0) {\n    this.edgeVAO.bind()\n    gl.lineWidth(this.lineWidth * this.pixelRatio)\n    gl.drawArrays(gl.LINES, 0, this.edgeCount*2)\n    this.edgeVAO.unbind()\n  }\n\n}\n\n\nproto.pick = function(pickData) {\n  if(!pickData) {\n    return null\n  }\n  if(pickData.id !== this.pickId) {\n    return null\n  }\n\n  var cellId = pickData.value[0] + 256*pickData.value[1] + 65536*pickData.value[2]\n  var cell = this.cells[cellId]\n\n  var pos = this.positions[cell[1]].slice(0, 3)\n  var intensity = this.intensity[cell[1]]\n  var velocity = this.vectors[cell[1]].slice(0, 3)\n  var divergence = this.vectors[cell[1]][3]\n\n  return {\n    index: cellId,\n    position: pos,\n    intensity: intensity,\n    velocity: velocity,\n    divergence: divergence,\n    dataCoordinate: pos\n  }\n}\n\n\nproto.dispose = function() {\n  this.texture.dispose()\n\n  this.triShader.dispose()\n  this.pickShader.dispose()\n\n  this.triangleVAO.dispose()\n  this.trianglePositions.dispose()\n  this.triangleVectors.dispose()\n  this.triangleColors.dispose()\n  this.triangleUVs.dispose()\n  this.triangleNormals.dispose()\n  this.triangleIds.dispose()\n\n  this.edgeVAO.dispose()\n  this.edgePositions.dispose()\n  this.edgeColors.dispose()\n  this.edgeUVs.dispose()\n  this.edgeIds.dispose()\n\n  this.pointVAO.dispose()\n  this.pointPositions.dispose()\n  this.pointColors.dispose()\n  this.pointUVs.dispose()\n  this.pointSizes.dispose()\n  this.pointIds.dispose()\n\n  this.contourVAO.dispose()\n  this.contourPositions.dispose()\n}\n\nfunction createMeshShader(gl) {\n  var shader = createShader(gl, meshShader.vertex, meshShader.fragment, null, meshShader.attributes)\n  shader.attributes.position.location = 0\n  shader.attributes.color.location    = 2\n  shader.attributes.uv.location       = 3\n  shader.attributes.vector.location   = 5\n  return shader\n}\n\n\nfunction createPickShader(gl) {\n  var shader = createShader(gl, pickShader.vertex, pickShader.fragment, null, pickShader.attributes)\n  shader.attributes.position.location = 0\n  shader.attributes.id.location       = 1\n  shader.attributes.vector.location   = 5\n  return shader\n}\n\n\nfunction createSimplicialMesh(gl, params) {\n  if (arguments.length === 1) {\n    params = gl;\n    gl = params.gl;\n  }\n\n  var triShader       = params.triShader || createMeshShader(gl)\n  var pickShader      = createPickShader(gl)\n\n  var meshTexture       = createTexture(gl,\n    ndarray(new Uint8Array([255,255,255,255]), [1,1,4]))\n  meshTexture.generateMipmap()\n  meshTexture.minFilter = gl.LINEAR_MIPMAP_LINEAR\n  meshTexture.magFilter = gl.LINEAR\n\n  var trianglePositions = createBuffer(gl)\n  var triangleVectors   = createBuffer(gl)\n  var triangleColors    = createBuffer(gl)\n  var triangleUVs       = createBuffer(gl)\n  var triangleNormals   = createBuffer(gl)\n  var triangleIds       = createBuffer(gl)\n  var triangleVAO       = createVAO(gl, [\n    { buffer: trianglePositions,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: triangleIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: triangleColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: triangleUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: triangleNormals,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: triangleVectors,\n      type: gl.FLOAT,\n      size: 4\n    }\n  ])\n\n  var edgePositions = createBuffer(gl)\n  var edgeColors    = createBuffer(gl)\n  var edgeUVs       = createBuffer(gl)\n  var edgeIds       = createBuffer(gl)\n  var edgeVAO       = createVAO(gl, [\n    { buffer: edgePositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: edgeIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: edgeColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: edgeUVs,\n      type: gl.FLOAT,\n      size: 2\n    }\n  ])\n\n  var pointPositions  = createBuffer(gl)\n  var pointColors     = createBuffer(gl)\n  var pointUVs        = createBuffer(gl)\n  var pointSizes      = createBuffer(gl)\n  var pointIds        = createBuffer(gl)\n  var pointVAO        = createVAO(gl, [\n    { buffer: pointPositions,\n      type: gl.FLOAT,\n      size: 3\n    },\n    { buffer: pointIds,\n      type: gl.UNSIGNED_BYTE,\n      size: 4,\n      normalized: true\n    },\n    { buffer: pointColors,\n      type: gl.FLOAT,\n      size: 4\n    },\n    { buffer: pointUVs,\n      type: gl.FLOAT,\n      size: 2\n    },\n    { buffer: pointSizes,\n      type: gl.FLOAT,\n      size: 1\n    }\n  ])\n\n  var contourPositions = createBuffer(gl)\n  var contourVAO       = createVAO(gl, [\n    { buffer: contourPositions,\n      type:   gl.FLOAT,\n      size:   3\n    }])\n\n  var mesh = new SimplicialMesh(gl\n    , meshTexture\n    , triShader\n    , pickShader\n    , trianglePositions\n    , triangleVectors\n    , triangleIds\n    , triangleColors\n    , triangleUVs\n    , triangleNormals\n    , triangleVAO\n    , edgePositions\n    , edgeIds\n    , edgeColors\n    , edgeUVs\n    , edgeVAO\n    , pointPositions\n    , pointIds\n    , pointColors\n    , pointUVs\n    , pointSizes\n    , pointVAO\n    , contourPositions\n    , contourVAO)\n\n  mesh.update(params)\n\n  return mesh\n}\n\nmodule.exports = createSimplicialMesh\n\n},{\"./shaders\":310,\"colormap\":119,\"gl-buffer\":240,\"gl-mat4/invert\":264,\"gl-mat4/multiply\":266,\"gl-shader\":300,\"gl-texture2d\":317,\"gl-vao\":322,\"ndarray\":445,\"normals\":448,\"simplicial-complex-contour\":505,\"typedarray-pool\":532}],312:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar vec3 = _dereq_('gl-vec3');\nvar vec4 = _dereq_('gl-vec4');\n\nvar streamToTube = function(stream, maxDivergence, minDistance, maxNorm) {\n\tvar points = stream.points;\n\tvar velocities = stream.velocities;\n\tvar divergences = stream.divergences;\n\n\tvar p, fwd, r, u, v, up;\n\tup = vec3.set(vec3.create(), 0, 1, 0);\n\tu = vec3.create();\n\tv = vec3.create();\n\tvar p2 = vec3.create();\n\n\tvar verts = [];\n\tvar faces = [];\n\tvar vectors = [];\n\tvar previousVerts = [];\n\tvar currentVerts = [];\n\tvar intensities = [];\n\tvar previousIntensity = 0;\n\tvar currentIntensity = 0;\n\tvar currentVector = vec4.create();\n\tvar previousVector = vec4.create();\n\n\tvar facets = 8;\n\n\tfor (var i = 0; i < points.length; i++) {\n\t\tp = points[i];\n\t\tfwd = velocities[i];\n\t\tr = divergences[i];\n\t\tif (maxDivergence === 0) {\n\t\t\tr = minDistance * 0.05;\n\t\t}\n\t\tcurrentIntensity = vec3.length(fwd) / maxNorm;\n\t\tcurrentVector = vec4.create();\n\t\tvec3.copy(currentVector, fwd);\n\t\tcurrentVector[3] = r;\n\t\t\n\t\tfor (var a = 0; a < facets; a++) {\n\t\t\tcurrentVerts[a] = [p[0], p[1], p[2], a];\n\t\t}\n\t\tif (previousVerts.length > 0) {\n\t\t\tfor (var a = 0; a < facets; a++) {\n\t\t\t\tvar a1 = (a+1) % facets;\n\t\t\t\tverts.push(\n\t\t\t\t\tpreviousVerts[a],\n\t\t\t\t\tcurrentVerts[a],\n\t\t\t\t\tcurrentVerts[a1],\n\n\t\t\t\t\tcurrentVerts[a1],\n\t\t\t\t\tpreviousVerts[a1],\n\t\t\t\t\tpreviousVerts[a]\n\t\t\t\t);\n\t\t\t\tvectors.push(\n\t\t\t\t\tpreviousVector,\n\t\t\t\t\tcurrentVector,\n\t\t\t\t\tcurrentVector,\n\n\t\t\t\t\tcurrentVector,\n\t\t\t\t\tpreviousVector,\n\t\t\t\t\tpreviousVector\n\t\t\t\t);\n\t\t\t\tintensities.push(\n\t\t\t\t\tpreviousIntensity,\n\t\t\t\t\tcurrentIntensity,\n\t\t\t\t\tcurrentIntensity,\n\n\t\t\t\t\tcurrentIntensity,\n\t\t\t\t\tpreviousIntensity,\n\t\t\t\t\tpreviousIntensity\n\t\t\t\t);\n\t\t\t\tfaces.push(\n\t\t\t\t\t[verts.length-6, verts.length-5, verts.length-4],\n\t\t\t\t\t[verts.length-3, verts.length-2, verts.length-1]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tvar tmp = previousVerts;\n\t\tpreviousVerts = currentVerts;\n\t\tcurrentVerts = tmp;\n\t\ttmp = previousVector;\n\t\tpreviousVector = currentVector;\n\t\tcurrentVector = tmp;\n\t\ttmp = previousIntensity;\n\t\tpreviousIntensity = currentIntensity;\n\t\tcurrentIntensity = tmp;\n\t}\n\treturn {\n\t\tpositions: verts,\n\t\tcells: faces,\n\t\tvectors: vectors,\n\t\tvertexIntensity: intensities\n\t};\n\n};\n\nvar createTubes = function(streams, colormap, maxDivergence, minDistance) {\n\n\tvar maxNorm = 0;\n\tfor (var i=0; i<streams.length; i++) {\n\t\tvar velocities = streams[i].velocities;\n\t\tfor (var j=0; j<velocities.length; j++) {\n\t\t\tvar norm = vec3.length(velocities[j]);\n\t\t\tif (norm > maxNorm) {\n\t\t\t\tmaxNorm = norm;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar tubes = streams.map(function(s) {\n\t\treturn streamToTube(s, maxDivergence, minDistance, maxNorm);\n\t});\n\n\tvar positions = [];\n\tvar cells = [];\n\tvar vectors = [];\n\tvar vertexIntensity = [];\n\tfor (var i=0; i < tubes.length; i++) {\n\t\tvar tube = tubes[i];\n\t\tvar offset = positions.length;\n\t\tpositions = positions.concat(tube.positions);\n\t\tvectors = vectors.concat(tube.vectors);\n\t\tvertexIntensity = vertexIntensity.concat(tube.vertexIntensity);\n\t\tfor (var j=0; j<tube.cells.length; j++) {\n\t\t\tvar cell = tube.cells[j];\n\t\t\tvar newCell = [];\n\t\t\tcells.push(newCell);\n\t\t\tfor (var k=0; k<cell.length; k++) {\n\t\t\t\tnewCell.push(cell[k] + offset);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tpositions: positions,\n\t\tcells: cells,\n\t\tvectors: vectors,\n\t\tvertexIntensity: vertexIntensity,\n\t\tcolormap: colormap\n\t};\n};\n\nvar defaultGetDivergence = function(p, v0) {\n\tvar dp = vec3.create();\n\tvar e = 1/10000;\n\n\tvec3.add(dp, p, [e, 0, 0]);\n\tvar vx = this.getVelocity(dp);\n\tvec3.subtract(vx, vx, v0);\n\tvec3.scale(vx, vx, 1/e);\n\n\tvec3.add(dp, p, [0, e, 0]);\n\tvar vy = this.getVelocity(dp);\n\tvec3.subtract(vy, vy, v0);\n\tvec3.scale(vy, vy, 1/e);\n\n\tvec3.add(dp, p, [0, 0, e]);\n\tvar vz = this.getVelocity(dp);\n\tvec3.subtract(vz, vz, v0);\n\tvec3.scale(vz, vz, 1/e);\n\n\tvec3.add(dp, vx, vy);\n\tvec3.add(dp, dp, vz);\n\treturn dp;\n};\n\nvar defaultGetVelocity = function(p) {\n    var u = sampleMeshgrid(p, this.vectors, this.meshgrid, this.clampBorders);\n    return u;\n};\n\n\nvar findLastSmallerIndex = function(points, v) {\n  for (var i=0; i<points.length; i++) {\n  \tvar p = points[i];\n  \tif (p === v) return i;\n    if (p > v) return i-1;\n  }\n  return i;\n};\n\nvar tmp = vec3.create();\nvar tmp2 = vec3.create();\n\nvar clamp = function(v, min, max) {\n\treturn v < min ? min : (v > max ? max : v);\n};\n\nvar sampleMeshgrid = function(point, array, meshgrid, clampOverflow) {\n\tvar x = point[0];\n\tvar y = point[1];\n\tvar z = point[2];\n\n\tvar w = meshgrid[0].length;\n\tvar h = meshgrid[1].length;\n\tvar d = meshgrid[2].length;\n\n\t// Find the index of the nearest smaller value in the meshgrid for each coordinate of (x,y,z).\n\t// The nearest smaller value index for x is the index x0 such that\n\t// meshgrid[0][x0] < x and for all x1 > x0, meshgrid[0][x1] >= x.\n\tvar x0 = findLastSmallerIndex(meshgrid[0], x);\n\tvar y0 = findLastSmallerIndex(meshgrid[1], y);\n\tvar z0 = findLastSmallerIndex(meshgrid[2], z);\n\n\t// Get the nearest larger meshgrid value indices.\n\t// From the above \"nearest smaller value\", we know that\n\t//   meshgrid[0][x0] < x\n\t//   meshgrid[0][x0+1] >= x\n\tvar x1 = x0 + 1;\n\tvar y1 = y0 + 1;\n\tvar z1 = z0 + 1;\n\n\tif (meshgrid[0][x0] === x) x1 = x0;\n\tif (meshgrid[1][y0] === y) y1 = y0;\n\tif (meshgrid[2][z0] === z) z1 = z0;\n\n\tif (clampOverflow) {\n\t\tx0 = clamp(x0, 0, w-1);\n\t\tx1 = clamp(x1, 0, w-1);\n\t\ty0 = clamp(y0, 0, h-1);\n\t\ty1 = clamp(y1, 0, h-1);\n\t\tz0 = clamp(z0, 0, d-1);\n\t\tz1 = clamp(z1, 0, d-1);\n\t}\n\n\t// Reject points outside the meshgrid, return a zero vector.\n\tif (x0 < 0 || y0 < 0 || z0 < 0 || x1 >= w || y1 >= h || z1 >= d) {\n\t\treturn vec3.create();\n\t}\n\n\t// Normalize point coordinates to 0..1 scaling factor between x0 and x1.\n\tvar xf = (x - meshgrid[0][x0]) / (meshgrid[0][x1] - meshgrid[0][x0]);\n\tvar yf = (y - meshgrid[1][y0]) / (meshgrid[1][y1] - meshgrid[1][y0]);\n\tvar zf = (z - meshgrid[2][z0]) / (meshgrid[2][z1] - meshgrid[2][z0]);\n\n\tif (xf < 0 || xf > 1 || isNaN(xf)) xf = 0;\n\tif (yf < 0 || yf > 1 || isNaN(yf)) yf = 0;\n\tif (zf < 0 || zf > 1 || isNaN(zf)) zf = 0;\n\n\tvar z0off = z0*w*h;\n\tvar z1off = z1*w*h;\n\n\tvar y0off = y0*w;\n\tvar y1off = y1*w;\n\n\tvar x0off = x0;\n\tvar x1off = x1;\n\n\t// Sample data array around the (x,y,z) point.\n\t//  vZYX = array[zZoff + yYoff + xXoff]\n\tvar v000 = array[y0off + z0off + x0off];\n\tvar v001 = array[y0off + z0off + x1off];\n\tvar v010 = array[y1off + z0off + x0off];\n\tvar v011 = array[y1off + z0off + x1off];\n\tvar v100 = array[y0off + z1off + x0off];\n\tvar v101 = array[y0off + z1off + x1off];\n\tvar v110 = array[y1off + z1off + x0off];\n\tvar v111 = array[y1off + z1off + x1off];\n\n\tvar result = vec3.create();\n\n\t// Average samples according to distance to point.\n\tvec3.lerp(result, v000, v001, xf);\n\tvec3.lerp(tmp, v010, v011, xf);\n\tvec3.lerp(result, result, tmp, yf);\n\tvec3.lerp(tmp, v100, v101, xf);\n\tvec3.lerp(tmp2, v110, v111, xf);\n\tvec3.lerp(tmp, tmp, tmp2, yf);\n\tvec3.lerp(result, result, tmp, zf);\n\n\treturn result;\n};\n\n\nvar vabs = function(dst, v) {\n\tvar x = v[0];\n\tvar y = v[1];\n\tvar z = v[2];\n\tdst[0] = x >= 0 ? x : -x;\n\tdst[1] = y >= 0 ? y : -y;\n\tdst[2] = z >= 0 ? z : -z;\n\treturn dst;\n};\n\nvar findMinSeparation = function(xs) {\n\tvar minSeparation = 1/0;\n\txs.sort(function(a, b) { return a - b; });\n\tfor (var i=1; i<xs.length; i++) {\n\t\tvar d = Math.abs(xs[i] - xs[i-1]);\n\t\tif (d < minSeparation) {\n\t\t\tminSeparation = d;\n\t\t}\n\t}\n\treturn minSeparation;\n};\n\n// Finds the minimum per-component distance in positions.\n// \nvar calculateMinPositionDistance = function(positions) {\n\tvar xs = [], ys = [], zs = [];\n\tvar xi = {}, yi = {}, zi = {};\n\tfor (var i=0; i<positions.length; i++) {\n\t\tvar p = positions[i];\n\t\tvar x = p[0], y = p[1], z = p[2];\n\n\t\t// Split the positions array into arrays of unique component values.\n\t\t//\n\t\t// Why go through the trouble of using a uniqueness hash table vs\n\t\t// sort and uniq: \n\t\t//\n\t\t// Suppose you've got a million positions in a 100x100x100 grid.\n\t\t//\n\t\t// Using a uniqueness hash table, you're doing 1M array reads, \n\t\t// 3M hash table lookups from 100-element hashes, 300 hash table inserts, then\n\t\t// sorting three 100-element arrays and iterating over them.\n\t\t// Roughly, 1M + 3M * ln(100) + 300 * ln(100/2) + 3 * 100 * ln(100) + 3 * 100 = \n\t\t//          1M + 13.8M + 0.0012M +  0.0014M + 0.0003M \n\t\t//          =~ 15M\n\t\t//\n\t\t// Sort and uniq solution would do 1M array reads, 3M array inserts,\n\t\t// sort three 1M-element arrays and iterate over them.\n\t\t// Roughly, 1M + 3M + 3 * 1M * ln(1M) + 3 * 1M = \n\t\t//          1M + 3M + 41.4M + 3M \n\t\t//          =~ 48.4M\n\t\t//\n\t\t// Guessing that a hard-coded sort & uniq would be faster due to not having\n\t\t// to run a hashing function on everything. More memory usage though \n\t\t// (bunch of small hash tables vs. duplicating the input array.)\n\t\t//\n\t\t// In JS-land, who knows. Maybe xi[x] casts x to string and destroys perf, \n\t\t// maybe numeric keys get special-cased, maybe the object lookups run at near O(1)-speeds.\n\t\t// Maybe the sorting comparison function is expensive to call, maybe it gets inlined or special-cased.\n\t\t//\n\t\t// ... You're probably not going to call this with more than 10k positions anyhow, so this is very academic.\n\t\t//\n\t\tif (!xi[x]) {\n\t\t\txs.push(x);\n\t\t\txi[x] = true;\n\t\t}\n\t\tif (!yi[y]) {\n\t\t\tys.push(y);\n\t\t\tyi[y] = true;\n\t\t}\n\t\tif (!zi[z]) {\n\t\t\tzs.push(z);\n\t\t\tzi[z] = true;\n\t\t}\n\t}\n\tvar xSep = findMinSeparation(xs);\n\tvar ySep = findMinSeparation(ys);\n\tvar zSep = findMinSeparation(zs);\n\tvar minSeparation = Math.min(xSep, ySep, zSep);\n\tif (!isFinite(minSeparation)) {\n\t\treturn 1;\n\t}\n\treturn minSeparation;\n};\n\nmodule.exports = function(vectorField, bounds) {\n\tvar positions = vectorField.startingPositions;\n\tvar maxLength = vectorField.maxLength || 1000;\n\tvar tubeSize = vectorField.tubeSize || 1;\n\tvar absoluteTubeSize = vectorField.absoluteTubeSize;\n\n\tif (!vectorField.getDivergence) {\n\t\tvectorField.getDivergence = defaultGetDivergence;\n\t}\n\n\tif (!vectorField.getVelocity) {\n\t\tvectorField.getVelocity = defaultGetVelocity;\n\t}\n\n\tif (vectorField.clampBorders === undefined) {\n\t\tvectorField.clampBorders = true;\n\t}\n\n\tvar streams = [];\n\n\tvar minX = bounds[0][0], minY = bounds[0][1], minZ = bounds[0][2];\n\tvar maxX = bounds[1][0], maxY = bounds[1][1], maxZ = bounds[1][2];\n\n\tvar inBounds = function(bounds, p) {\n\t\tvar x = p[0];\n\t\tvar y = p[1];\n\t\tvar z = p[2];\n\t\treturn (\n\t\t\tx >= minX && x <= maxX &&\n\t\t\ty >= minY && y <= maxY &&\n\t\t\tz >= minZ && z <= maxZ\n\t\t);\n\t};\n\n\tvar boundsSize = vec3.distance(bounds[0], bounds[1]);\n\tvar maxStepSize = 10 * boundsSize / maxLength;\n\tvar maxStepSizeSq = maxStepSize * maxStepSize;\n\n\tvar minDistance = 1;\n\tvar maxDivergence = 0; // For component-wise divergence vec3.create();\n\tvar tmp = vec3.create();\n\n\tif (positions.length >= 2) {\n\t\tminDistance = calculateMinPositionDistance(positions);\n\t}\n\n\tfor (var i = 0; i < positions.length; i++) {\n\t\tvar p = vec3.create();\n\t\tvec3.copy(p, positions[i]);\n\n\t\tvar stream = [p];\n\t\tvar velocities = [];\n\t\tvar v = vectorField.getVelocity(p);\n\t\tvar op = p;\n\t\tvelocities.push(v);\n\n\t\tvar divergences = [];\n\n\t\tvar dv = vectorField.getDivergence(p, v);\n\t\tvar dvLength = vec3.length(dv);\n\t\tif (dvLength > maxDivergence && !isNaN(dvLength) && isFinite(dvLength)) {\n\t\t\tmaxDivergence = dvLength;\n\t\t}\n\t\t// In case we need to do component-wise divergence visualization\n\t\t// vec3.max(maxDivergence, maxDivergence, vabs(tmp, dv));\n\t\tdivergences.push(dvLength);\n\n\t\tstreams.push({points: stream, velocities: velocities, divergences: divergences});\n\n\t\tvar j = 0;\n\n\t\twhile (j < maxLength * 100 && stream.length < maxLength && inBounds(bounds, p)) {\n\t\t\tj++;\n\t\t\tvar np = vec3.clone(v);\n\t\t\tvar sqLen = vec3.squaredLength(np);\n\t\t\tif (sqLen === 0) {\n\t\t\t\tbreak;\n\t\t\t} else if (sqLen > maxStepSizeSq) {\n\t\t\t\tvec3.scale(np, np, maxStepSize / Math.sqrt(sqLen));\n\t\t\t}\n\t\t\tvec3.add(np, np, p);\n\n\t\t\tv = vectorField.getVelocity(np);\n\n\t\t\tif (vec3.squaredDistance(op, np) - maxStepSizeSq > -0.0001 * maxStepSizeSq) {\n\t\t\t\tstream.push(np);\n\t\t\t\top = np;\n\t\t\t\tvelocities.push(v);\n\t\t\t\tvar dv = vectorField.getDivergence(np, v);\n\t\t\t\tvar dvLength = vec3.length(dv);\n\t\t\t\tif (dvLength > maxDivergence && !isNaN(dvLength) && isFinite(dvLength)) {\n\t\t\t\t\tmaxDivergence = dvLength;\n\t\t\t\t}\n\t\t\t\t// In case we need to do component-wise divergence visualization\n\t\t\t\t//vec3.max(maxDivergence, maxDivergence, vabs(tmp, dv));\n\t\t\t\tdivergences.push(dvLength);\n\t\t\t}\n\n\t\t\tp = np;\n\t\t}\n\t}\n\n\t// Replace NaNs and Infinities with non-NaN, finite maxDivergence\n\tfor (var i=0; i<divergences.length; i++) {\n\t\tvar dvLength = divergences[i];\n\t\tif (isNaN(dvLength) || !isFinite(dvLength)) {\n\t\t\tdivergences[i] = maxDivergence;\n\t\t}\n\t}\n\n\tvar tubes = createTubes(streams, vectorField.colormap, maxDivergence, minDistance);\n\n\tif (absoluteTubeSize) {\n\t\ttubes.tubeScale = absoluteTubeSize;\n\t} else {\n\t\t// Avoid division by zero.\n\t\tif (maxDivergence === 0) {\n\t\t\tmaxDivergence = 1;\n\t\t}\n\t\ttubes.tubeScale = tubeSize * 0.5 * minDistance / maxDivergence;\n\t}\n\n\treturn tubes;\n};\n\nmodule.exports.createTubeMesh = _dereq_('./lib/tubemesh');\n\n},{\"./lib/tubemesh\":311,\"gl-vec3\":341,\"gl-vec4\":377}],313:[function(_dereq_,module,exports){\nvar createShader = _dereq_('gl-shader')\nvar glslify = _dereq_('glslify')\n\nvar vertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 uv;\\nattribute vec3 f;\\nattribute vec3 normal;\\n\\nuniform vec3 objectOffset;\\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  vec3 localCoordinate = vec3(uv.zw, f.x);\\n  worldCoordinate = objectOffset + localCoordinate;\\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\"])\nvar fragSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(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\\nfloat beckmannSpecular(\\n  vec3 lightDirection,\\n  vec3 viewDirection,\\n  vec3 surfaceNormal,\\n  float roughness) {\\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\\n}\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\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      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\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(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 — in vertex or in fragment\\n  vec4 surfaceColor =\\n    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\\n    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\"])\nvar contourVertSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 uv;\\nattribute float f;\\n\\nuniform vec3 objectOffset;\\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  worldCoordinate = objectOffset + dataCoordinate;\\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\\n\\n  vec4 clipPosition = projection * view * worldPosition;\\n  clipPosition.z += zOffset;\\n\\n  gl_Position = clipPosition;\\n  value = f + objectOffset.z;\\n  kill = -1.0;\\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\"])\nvar pickSrc = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\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      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) 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\"])\n\nexports.createShader = function (gl) {\n  var shader = createShader(gl, vertSrc, fragSrc, null, [\n    {name: 'uv', type: 'vec4'},\n    {name: 'f', type: 'vec3'},\n    {name: 'normal', type: 'vec3'}\n  ])\n  shader.attributes.uv.location = 0\n  shader.attributes.f.location = 1\n  shader.attributes.normal.location = 2\n  return shader\n}\nexports.createPickShader = function (gl) {\n  var shader = createShader(gl, vertSrc, pickSrc, null, [\n    {name: 'uv', type: 'vec4'},\n    {name: 'f', type: 'vec3'},\n    {name: 'normal', type: 'vec3'}\n  ])\n  shader.attributes.uv.location = 0\n  shader.attributes.f.location = 1\n  shader.attributes.normal.location = 2\n  return shader\n}\nexports.createContourShader = function (gl) {\n  var shader = createShader(gl, contourVertSrc, fragSrc, null, [\n    {name: 'uv', type: 'vec4'},\n    {name: 'f', type: 'float'}\n  ])\n  shader.attributes.uv.location = 0\n  shader.attributes.f.location = 1\n  return shader\n}\nexports.createPickContourShader = function (gl) {\n  var shader = createShader(gl, contourVertSrc, pickSrc, null, [\n    {name: 'uv', type: 'vec4'},\n    {name: 'f', type: 'float'}\n  ])\n  shader.attributes.uv.location = 0\n  shader.attributes.f.location = 1\n  return shader\n}\n\n},{\"gl-shader\":300,\"glslify\":404}],314:[function(_dereq_,module,exports){\narguments[4][104][0].apply(exports,arguments)\n},{\"dup\":104}],315:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createSurfacePlot\n\nvar bits = _dereq_('bit-twiddle')\nvar createBuffer = _dereq_('gl-buffer')\nvar createVAO = _dereq_('gl-vao')\nvar createTexture = _dereq_('gl-texture2d')\nvar pool = _dereq_('typedarray-pool')\nvar colormap = _dereq_('colormap')\nvar ops = _dereq_('ndarray-ops')\nvar pack = _dereq_('ndarray-pack')\nvar ndarray = _dereq_('ndarray')\nvar surfaceNets = _dereq_('surface-nets')\nvar multiply = _dereq_('gl-mat4/multiply')\nvar invert = _dereq_('gl-mat4/invert')\nvar bsearch = _dereq_('binary-search-bounds')\nvar gradient = _dereq_('ndarray-gradient')\nvar shaders = _dereq_('./lib/shaders')\n\nvar createShader = shaders.createShader\nvar createContourShader = shaders.createContourShader\nvar createPickShader = shaders.createPickShader\nvar createPickContourShader = shaders.createPickContourShader\n\nvar SURFACE_VERTEX_SIZE = 4 * (4 + 3 + 3)\n\nvar IDENTITY = [\n  1, 0, 0, 0,\n  0, 1, 0, 0,\n  0, 0, 1, 0,\n  0, 0, 0, 1 ]\n\nvar QUAD = [\n  [0, 0],\n  [0, 1],\n  [1, 0],\n  [1, 1],\n  [1, 0],\n  [0, 1]\n]\n\nvar PERMUTATIONS = [\n  [0, 0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0, 0]\n]\n\n;(function () {\n  for (var i = 0; i < 3; ++i) {\n    var p = PERMUTATIONS[i]\n    var u = (i + 1) % 3\n    var v = (i + 2) % 3\n    p[u + 0] = 1\n    p[v + 3] = 1\n    p[i + 6] = 1\n  }\n})()\n\nfunction SurfacePickResult (position, index, uv, level, dataCoordinate) {\n  this.position = position\n  this.index = index\n  this.uv = uv\n  this.level = level\n  this.dataCoordinate = dataCoordinate\n}\n\nvar N_COLORS = 256\n\nfunction genColormap (name) {\n  var x = pack([colormap({\n    colormap: name,\n    nshades: N_COLORS,\n    format: 'rgba'\n  }).map(function (c) {\n    return [c[0], c[1], c[2], 255 * c[3]]\n  })])\n  ops.divseq(x, 255.0)\n  return x\n}\n\nfunction SurfacePlot (\n  gl,\n  shape,\n  bounds,\n  shader,\n  pickShader,\n  coordinates,\n  vao,\n  colorMap,\n  contourShader,\n  contourPickShader,\n  contourBuffer,\n  contourVAO,\n  dynamicBuffer,\n  dynamicVAO,\n  objectOffset) {\n  this.gl = gl\n  this.shape = shape\n  this.bounds = bounds\n  this.objectOffset = objectOffset\n  this.intensityBounds = []\n\n  this._shader = shader\n  this._pickShader = pickShader\n  this._coordinateBuffer = coordinates\n  this._vao = vao\n  this._colorMap = colorMap\n\n  this._contourShader = contourShader\n  this._contourPickShader = contourPickShader\n  this._contourBuffer = contourBuffer\n  this._contourVAO = contourVAO\n  this._contourOffsets = [[], [], []]\n  this._contourCounts = [[], [], []]\n  this._vertexCount = 0\n\n  this._pickResult = new SurfacePickResult([0, 0, 0], [0, 0], [0, 0], [0, 0, 0], [0, 0, 0])\n\n  this._dynamicBuffer = dynamicBuffer\n  this._dynamicVAO = dynamicVAO\n  this._dynamicOffsets = [0, 0, 0]\n  this._dynamicCounts = [0, 0, 0]\n\n  this.contourWidth = [ 1, 1, 1 ]\n  this.contourLevels = [[1], [1], [1]]\n  this.contourTint = [0, 0, 0]\n  this.contourColor = [[0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1]]\n\n  this.showContour = true\n  this.showSurface = true\n\n  this.enableHighlight = [true, true, true]\n  this.highlightColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]\n  this.highlightTint = [ 1, 1, 1 ]\n  this.highlightLevel = [-1, -1, -1]\n\n  // Dynamic contour options\n  this.enableDynamic = [ true, true, true ]\n  this.dynamicLevel = [ NaN, NaN, NaN ]\n  this.dynamicColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ]\n  this.dynamicTint = [ 1, 1, 1 ]\n  this.dynamicWidth = [ 1, 1, 1 ]\n\n  this.axesBounds = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]]\n  this.surfaceProject = [ false, false, false ]\n  this.contourProject = [[ false, false, false ],\n    [ false, false, false ],\n    [ false, false, false ]]\n\n  this.colorBounds = [ false, false ]\n\n  // Store xyz fields, need this for picking\n  this._field = [\n    ndarray(pool.mallocFloat(1024), [0, 0]),\n    ndarray(pool.mallocFloat(1024), [0, 0]),\n    ndarray(pool.mallocFloat(1024), [0, 0]) ]\n\n  this.pickId = 1\n  this.clipBounds = [[-Infinity, -Infinity, -Infinity], [Infinity, Infinity, Infinity]]\n\n  this.snapToData = false\n\n  this.pixelRatio = 1\n\n  this.opacity = 1.0\n\n  this.lightPosition = [10, 10000, 0]\n  this.ambientLight = 0.8\n  this.diffuseLight = 0.8\n  this.specularLight = 2.0\n  this.roughness = 0.5\n  this.fresnel = 1.5\n  this.vertexColor = 0\n\n  this.dirty = true\n}\n\nvar proto = SurfacePlot.prototype\n\nproto.isTransparent = function () {\n  return this.opacity < 1\n}\n\nproto.isOpaque = function () {\n  if (this.opacity >= 1) {\n    return true\n  }\n  for (var i = 0; i < 3; ++i) {\n    if (this._contourCounts[i].length > 0 || this._dynamicCounts[i] > 0) {\n      return true\n    }\n  }\n  return false\n}\n\nproto.pickSlots = 1\n\nproto.setPickBase = function (id) {\n  this.pickId = id\n}\n\nvar ZERO_VEC = [0, 0, 0]\n\nvar PROJECT_DATA = {\n  showSurface: false,\n  showContour: false,\n  projections: [IDENTITY.slice(), IDENTITY.slice(), IDENTITY.slice()],\n  clipBounds: [\n    [[0, 0, 0], [0, 0, 0]],\n    [[0, 0, 0], [0, 0, 0]],\n    [[0, 0, 0], [0, 0, 0]]]\n}\n\nfunction computeProjectionData (camera, obj) {\n  var i, j, k\n\n  // Compute cube properties\n  var cubeAxis = (obj.axes && obj.axes.lastCubeProps.axis) || ZERO_VEC\n\n  var showSurface = obj.showSurface\n  var showContour = obj.showContour\n\n  for (i = 0; i < 3; ++i) {\n    showSurface = showSurface || obj.surfaceProject[i]\n    for (j = 0; j < 3; ++j) {\n      showContour = showContour || obj.contourProject[i][j]\n    }\n  }\n\n  for (i = 0; i < 3; ++i) {\n    // Construct projection onto axis\n    var axisSquish = PROJECT_DATA.projections[i]\n    for (j = 0; j < 16; ++j) {\n      axisSquish[j] = 0\n    }\n    for (j = 0; j < 4; ++j) {\n      axisSquish[5 * j] = 1\n    }\n    axisSquish[5 * i] = 0\n    axisSquish[12 + i] = obj.axesBounds[+(cubeAxis[i] > 0)][i]\n    multiply(axisSquish, camera.model, axisSquish)\n\n    var nclipBounds = PROJECT_DATA.clipBounds[i]\n    for (k = 0; k < 2; ++k) {\n      for (j = 0; j < 3; ++j) {\n        nclipBounds[k][j] = camera.clipBounds[k][j]\n      }\n    }\n    nclipBounds[0][i] = -1e8\n    nclipBounds[1][i] = 1e8\n  }\n\n  PROJECT_DATA.showSurface = showSurface\n  PROJECT_DATA.showContour = showContour\n\n  return PROJECT_DATA\n}\n\nvar UNIFORMS = {\n  model: IDENTITY,\n  view: IDENTITY,\n  projection: IDENTITY,\n  inverseModel: IDENTITY.slice(),\n  lowerBound: [0, 0, 0],\n  upperBound: [0, 0, 0],\n  colorMap: 0,\n  clipBounds: [[0, 0, 0], [0, 0, 0]],\n  height: 0.0,\n  contourTint: 0,\n  contourColor: [0, 0, 0, 1],\n  permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1],\n  zOffset: -1e-4,\n  objectOffset: [0, 0, 0],\n  kambient: 1,\n  kdiffuse: 1,\n  kspecular: 1,\n  lightPosition: [1000, 1000, 1000],\n  eyePosition: [0, 0, 0],\n  roughness: 1,\n  fresnel: 1,\n  opacity: 1,\n  vertexColor: 0\n}\n\nvar MATRIX_INVERSE = IDENTITY.slice()\nvar DEFAULT_PERM = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n\nfunction drawCore (params, transparent) {\n  params = params || {}\n  var gl = this.gl\n\n  gl.disable(gl.CULL_FACE)\n\n  this._colorMap.bind(0)\n\n  var uniforms = UNIFORMS\n  uniforms.model = params.model || IDENTITY\n  uniforms.view = params.view || IDENTITY\n  uniforms.projection = params.projection || IDENTITY\n  uniforms.lowerBound = [this.bounds[0][0], this.bounds[0][1], this.colorBounds[0] || this.bounds[0][2]]\n  uniforms.upperBound = [this.bounds[1][0], this.bounds[1][1], this.colorBounds[1] || this.bounds[1][2]]\n  uniforms.objectOffset = this.objectOffset\n  uniforms.contourColor = this.contourColor[0]\n\n  uniforms.inverseModel = invert(uniforms.inverseModel, uniforms.model)\n\n  for (var i = 0; i < 2; ++i) {\n    var clipClamped = uniforms.clipBounds[i]\n    for (var j = 0; j < 3; ++j) {\n      clipClamped[j] = Math.min(Math.max(this.clipBounds[i][j], -1e8), 1e8)\n    }\n  }\n\n  uniforms.kambient = this.ambientLight\n  uniforms.kdiffuse = this.diffuseLight\n  uniforms.kspecular = this.specularLight\n\n  uniforms.roughness = this.roughness\n  uniforms.fresnel = this.fresnel\n  uniforms.opacity = this.opacity\n\n  uniforms.height = 0.0\n  uniforms.permutation = DEFAULT_PERM\n\n  uniforms.vertexColor = this.vertexColor\n\n  // Compute camera matrix inverse\n  var invCameraMatrix = MATRIX_INVERSE\n  multiply(invCameraMatrix, uniforms.view, uniforms.model)\n  multiply(invCameraMatrix, uniforms.projection, invCameraMatrix)\n  invert(invCameraMatrix, invCameraMatrix)\n\n  for (i = 0; i < 3; ++i) {\n    uniforms.eyePosition[i] = invCameraMatrix[12 + i] / invCameraMatrix[15]\n  }\n\n  var w = invCameraMatrix[15]\n  for (i = 0; i < 3; ++i) {\n    w += this.lightPosition[i] * invCameraMatrix[4 * i + 3]\n  }\n  for (i = 0; i < 3; ++i) {\n    var s = invCameraMatrix[12 + i]\n    for (j = 0; j < 3; ++j) {\n      s += invCameraMatrix[4 * j + i] * this.lightPosition[j]\n    }\n    uniforms.lightPosition[i] = s / w\n  }\n\n  var projectData = computeProjectionData(uniforms, this)\n\n  if (projectData.showSurface && (transparent === (this.opacity < 1))) {\n    // Set up uniforms\n    this._shader.bind()\n    this._shader.uniforms = uniforms\n\n    // Draw it\n    this._vao.bind()\n\n    if (this.showSurface && this._vertexCount) {\n      this._vao.draw(gl.TRIANGLES, this._vertexCount)\n    }\n\n    // Draw projections of surface\n    for (i = 0; i < 3; ++i) {\n      if (!this.surfaceProject[i] || !this.vertexCount) {\n        continue\n      }\n      this._shader.uniforms.model = projectData.projections[i]\n      this._shader.uniforms.clipBounds = projectData.clipBounds[i]\n      this._vao.draw(gl.TRIANGLES, this._vertexCount)\n    }\n\n    this._vao.unbind()\n  }\n\n  if (projectData.showContour && !transparent) {\n    var shader = this._contourShader\n\n    // Don't apply lighting to contours\n    uniforms.kambient = 1.0\n    uniforms.kdiffuse = 0.0\n    uniforms.kspecular = 0.0\n    uniforms.opacity = 1.0\n\n    shader.bind()\n    shader.uniforms = uniforms\n\n    // Draw contour lines\n    var vao = this._contourVAO\n    vao.bind()\n\n    // Draw contour levels\n    for (i = 0; i < 3; ++i) {\n      shader.uniforms.permutation = PERMUTATIONS[i]\n      gl.lineWidth(this.contourWidth[i] * this.pixelRatio)\n\n      for (j = 0; j < this.contourLevels[i].length; ++j) {\n        if (j === this.highlightLevel[i]) {\n          shader.uniforms.contourColor = this.highlightColor[i]\n          shader.uniforms.contourTint = this.highlightTint[i]\n        } else if (j === 0 || (j - 1) === this.highlightLevel[i]) {\n          shader.uniforms.contourColor = this.contourColor[i]\n          shader.uniforms.contourTint = this.contourTint[i]\n        }\n        if (!this._contourCounts[i][j]) {\n          continue\n        }\n\n        shader.uniforms.height = this.contourLevels[i][j]\n        vao.draw(gl.LINES, this._contourCounts[i][j], this._contourOffsets[i][j])\n      }\n    }\n\n    // Draw projections of surface\n    for (i = 0; i < 3; ++i) {\n      shader.uniforms.model = projectData.projections[i]\n      shader.uniforms.clipBounds = projectData.clipBounds[i]\n      for (j = 0; j < 3; ++j) {\n        if (!this.contourProject[i][j]) {\n          continue\n        }\n        shader.uniforms.permutation = PERMUTATIONS[j]\n        gl.lineWidth(this.contourWidth[j] * this.pixelRatio)\n        for (var k = 0; k < this.contourLevels[j].length; ++k) {\n          if (k === this.highlightLevel[j]) {\n            shader.uniforms.contourColor = this.highlightColor[j]\n            shader.uniforms.contourTint = this.highlightTint[j]\n          } else if (k === 0 || (k - 1) === this.highlightLevel[j]) {\n            shader.uniforms.contourColor = this.contourColor[j]\n            shader.uniforms.contourTint = this.contourTint[j]\n          }\n          if (!this._contourCounts[j][k]) {\n            continue\n          }\n\n          shader.uniforms.height = this.contourLevels[j][k]\n          vao.draw(gl.LINES, this._contourCounts[j][k], this._contourOffsets[j][k])\n        }\n      }\n    }\n\n    vao.unbind()\n\n    // Draw dynamic contours\n    vao = this._dynamicVAO\n    vao.bind()\n\n    // Draw contour levels\n    for (i = 0; i < 3; ++i) {\n      if (this._dynamicCounts[i] === 0) {\n        continue\n      }\n\n      shader.uniforms.model = uniforms.model\n      shader.uniforms.clipBounds = uniforms.clipBounds\n      shader.uniforms.permutation = PERMUTATIONS[i]\n      gl.lineWidth(this.dynamicWidth[i] * this.pixelRatio)\n\n      shader.uniforms.contourColor = this.dynamicColor[i]\n      shader.uniforms.contourTint = this.dynamicTint[i]\n      shader.uniforms.height = this.dynamicLevel[i]\n      vao.draw(gl.LINES, this._dynamicCounts[i], this._dynamicOffsets[i])\n\n      for (j = 0; j < 3; ++j) {\n        if (!this.contourProject[j][i]) {\n          continue\n        }\n\n        shader.uniforms.model = projectData.projections[j]\n        shader.uniforms.clipBounds = projectData.clipBounds[j]\n        vao.draw(gl.LINES, this._dynamicCounts[i], this._dynamicOffsets[i])\n      }\n    }\n\n    vao.unbind()\n  }\n}\n\nproto.draw = function (params) {\n  return drawCore.call(this, params, false)\n}\n\nproto.drawTransparent = function (params) {\n  return drawCore.call(this, params, true)\n}\n\nvar PICK_UNIFORMS = {\n  model: IDENTITY,\n  view: IDENTITY,\n  projection: IDENTITY,\n  inverseModel: IDENTITY,\n  clipBounds: [[0, 0, 0], [0, 0, 0]],\n  height: 0.0,\n  shape: [0, 0],\n  pickId: 0,\n  lowerBound: [0, 0, 0],\n  upperBound: [0, 0, 0],\n  zOffset: 0.0,\n  objectOffset: [0, 0, 0],\n  permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1],\n  lightPosition: [0, 0, 0],\n  eyePosition: [0, 0, 0]\n}\n\nproto.drawPick = function (params) {\n  params = params || {}\n  var gl = this.gl\n  gl.disable(gl.CULL_FACE)\n\n  var uniforms = PICK_UNIFORMS\n  uniforms.model = params.model || IDENTITY\n  uniforms.view = params.view || IDENTITY\n  uniforms.projection = params.projection || IDENTITY\n  uniforms.shape = this._field[2].shape\n  uniforms.pickId = this.pickId / 255.0\n  uniforms.lowerBound = this.bounds[0]\n  uniforms.upperBound = this.bounds[1]\n  uniforms.objectOffset = this.objectOffset\n  uniforms.permutation = DEFAULT_PERM\n\n  for (var i = 0; i < 2; ++i) {\n    var clipClamped = uniforms.clipBounds[i]\n    for (var j = 0; j < 3; ++j) {\n      clipClamped[j] = Math.min(Math.max(this.clipBounds[i][j], -1e8), 1e8)\n    }\n  }\n\n  var projectData = computeProjectionData(uniforms, this)\n\n  if (projectData.showSurface) {\n    // Set up uniforms\n    this._pickShader.bind()\n    this._pickShader.uniforms = uniforms\n\n    // Draw it\n    this._vao.bind()\n    this._vao.draw(gl.TRIANGLES, this._vertexCount)\n\n    // Draw projections of surface\n    for (i = 0; i < 3; ++i) {\n      if (!this.surfaceProject[i]) {\n        continue\n      }\n      this._pickShader.uniforms.model = projectData.projections[i]\n      this._pickShader.uniforms.clipBounds = projectData.clipBounds[i]\n      this._vao.draw(gl.TRIANGLES, this._vertexCount)\n    }\n\n    this._vao.unbind()\n  }\n\n  if (projectData.showContour) {\n    var shader = this._contourPickShader\n\n    shader.bind()\n    shader.uniforms = uniforms\n\n    var vao = this._contourVAO\n    vao.bind()\n\n    for (j = 0; j < 3; ++j) {\n      gl.lineWidth(this.contourWidth[j] * this.pixelRatio)\n      shader.uniforms.permutation = PERMUTATIONS[j]\n      for (i = 0; i < this.contourLevels[j].length; ++i) {\n        if (this._contourCounts[j][i]) {\n          shader.uniforms.height = this.contourLevels[j][i]\n          vao.draw(gl.LINES, this._contourCounts[j][i], this._contourOffsets[j][i])\n        }\n      }\n    }\n\n    // Draw projections of surface\n    for (i = 0; i < 3; ++i) {\n      shader.uniforms.model = projectData.projections[i]\n      shader.uniforms.clipBounds = projectData.clipBounds[i]\n\n      for (j = 0; j < 3; ++j) {\n        if (!this.contourProject[i][j]) {\n          continue\n        }\n\n        shader.uniforms.permutation = PERMUTATIONS[j]\n        gl.lineWidth(this.contourWidth[j] * this.pixelRatio)\n        for (var k = 0; k < this.contourLevels[j].length; ++k) {\n          if (this._contourCounts[j][k]) {\n            shader.uniforms.height = this.contourLevels[j][k]\n            vao.draw(gl.LINES, this._contourCounts[j][k], this._contourOffsets[j][k])\n          }\n        }\n      }\n    }\n\n    vao.unbind()\n  }\n}\n\nproto.pick = function (selection) {\n  if (!selection) {\n    return null\n  }\n\n  if (selection.id !== this.pickId) {\n    return null\n  }\n\n  var shape = this._field[2].shape\n\n  var result = this._pickResult\n\n  // Compute uv coordinate\n  var x = shape[0] * (selection.value[0] + (selection.value[2] >> 4) / 16.0) / 255.0\n  var ix = Math.floor(x)\n  var fx = x - ix\n\n  var y = shape[1] * (selection.value[1] + (selection.value[2] & 15) / 16.0) / 255.0\n  var iy = Math.floor(y)\n  var fy = y - iy\n\n  ix += 1\n  iy += 1\n\n  // Compute xyz coordinate\n  var pos = result.position\n  pos[0] = pos[1] = pos[2] = 0\n  for (var dx = 0; dx < 2; ++dx) {\n    var s = dx ? fx : 1.0 - fx\n    for (var dy = 0; dy < 2; ++dy) {\n      var t = dy ? fy : 1.0 - fy\n\n      var r = ix + dx\n      var c = iy + dy\n      var w = s * t\n\n      for (var i = 0; i < 3; ++i) {\n        pos[i] += this._field[i].get(r, c) * w\n      }\n    }\n  }\n\n  // Find closest level\n  var levelIndex = this._pickResult.level\n  for (var j = 0; j < 3; ++j) {\n    levelIndex[j] = bsearch.le(this.contourLevels[j], pos[j])\n    if (levelIndex[j] < 0) {\n      if (this.contourLevels[j].length > 0) {\n        levelIndex[j] = 0\n      }\n    } else if (levelIndex[j] < this.contourLevels[j].length - 1) {\n      var a = this.contourLevels[j][levelIndex[j]]\n      var b = this.contourLevels[j][levelIndex[j] + 1]\n      if (Math.abs(a - pos[j]) > Math.abs(b - pos[j])) {\n        levelIndex[j] += 1\n      }\n    }\n  }\n\n  result.index[0] = fx < 0.5 ? ix : (ix + 1)\n  result.index[1] = fy < 0.5 ? iy : (iy + 1)\n\n  result.uv[0] = x / shape[0]\n  result.uv[1] = y / shape[1]\n\n  for (i = 0; i < 3; ++i) {\n    result.dataCoordinate[i] = this._field[i].get(result.index[0], result.index[1])\n  }\n\n  return result\n}\n\nproto.padField = function(dstField, srcField) {\n  var srcShape = srcField.shape.slice()\n  var dstShape = dstField.shape.slice()\n\n  // Center\n  ops.assign(dstField.lo(1, 1).hi(srcShape[0], srcShape[1]), srcField)\n\n  // Edges\n  ops.assign(dstField.lo(1).hi(srcShape[0], 1),\n    srcField.hi(srcShape[0], 1))\n  ops.assign(dstField.lo(1, dstShape[1] - 1).hi(srcShape[0], 1),\n    srcField.lo(0, srcShape[1] - 1).hi(srcShape[0], 1))\n  ops.assign(dstField.lo(0, 1).hi(1, srcShape[1]),\n    srcField.hi(1))\n  ops.assign(dstField.lo(dstShape[0] - 1, 1).hi(1, srcShape[1]),\n    srcField.lo(srcShape[0] - 1))\n  // Corners\n  dstField.set(0, 0, srcField.get(0, 0))\n  dstField.set(0, dstShape[1] - 1, srcField.get(0, srcShape[1] - 1))\n  dstField.set(dstShape[0] - 1, 0, srcField.get(srcShape[0] - 1, 0))\n  dstField.set(dstShape[0] - 1, dstShape[1] - 1, srcField.get(srcShape[0] - 1, srcShape[1] - 1))\n}\n\nfunction handleArray (param, ctor) {\n  if (Array.isArray(param)) {\n    return [ ctor(param[0]), ctor(param[1]), ctor(param[2]) ]\n  }\n  return [ ctor(param), ctor(param), ctor(param) ]\n}\n\nfunction toColor (x) {\n  if (Array.isArray(x)) {\n    if (x.length === 3) {\n      return [x[0], x[1], x[2], 1]\n    }\n    return [x[0], x[1], x[2], x[3]]\n  }\n  return [0, 0, 0, 1]\n}\n\nfunction handleColor (param) {\n  if (Array.isArray(param)) {\n    if (Array.isArray(param)) {\n      return [\n        toColor(param[0]),\n        toColor(param[1]),\n        toColor(param[2]) ]\n    } else {\n      var c = toColor(param)\n      return [\n        c.slice(),\n        c.slice(),\n        c.slice() ]\n    }\n  }\n}\n\nproto.update = function (params) {\n  params = params || {}\n\n  this.objectOffset = params.objectOffset || this.objectOffset\n\n  this.dirty = true\n\n  if ('contourWidth' in params) {\n    this.contourWidth = handleArray(params.contourWidth, Number)\n  }\n  if ('showContour' in params) {\n    this.showContour = handleArray(params.showContour, Boolean)\n  }\n  if ('showSurface' in params) {\n    this.showSurface = !!params.showSurface\n  }\n  if ('contourTint' in params) {\n    this.contourTint = handleArray(params.contourTint, Boolean)\n  }\n  if ('contourColor' in params) {\n    this.contourColor = handleColor(params.contourColor)\n  }\n  if ('contourProject' in params) {\n    this.contourProject = handleArray(params.contourProject, function (x) {\n      return handleArray(x, Boolean)\n    })\n  }\n  if ('surfaceProject' in params) {\n    this.surfaceProject = params.surfaceProject\n  }\n  if ('dynamicColor' in params) {\n    this.dynamicColor = handleColor(params.dynamicColor)\n  }\n  if ('dynamicTint' in params) {\n    this.dynamicTint = handleArray(params.dynamicTint, Number)\n  }\n  if ('dynamicWidth' in params) {\n    this.dynamicWidth = handleArray(params.dynamicWidth, Number)\n  }\n  if ('opacity' in params) {\n    this.opacity = params.opacity\n  }\n  if ('colorBounds' in params) {\n    this.colorBounds = params.colorBounds\n  }\n  if ('vertexColor' in params) {\n    this.vertexColor = params.vertexColor ? 1 : 0;\n  }\n\n  var field = params.field || (params.coords && params.coords[2]) || null\n  var levelsChanged = false\n\n  if (!field) {\n    if (this._field[2].shape[0] || this._field[2].shape[2]) {\n      field = this._field[2].lo(1, 1).hi(this._field[2].shape[0] - 2, this._field[2].shape[1] - 2)\n    } else {\n      field = this._field[2].hi(0, 0)\n    }\n  }\n\n  // Update field\n  if ('field' in params || 'coords' in params) {\n    var fsize = (field.shape[0] + 2) * (field.shape[1] + 2)\n\n    // Resize if necessary\n    if (fsize > this._field[2].data.length) {\n      pool.freeFloat(this._field[2].data)\n      this._field[2].data = pool.mallocFloat(bits.nextPow2(fsize))\n    }\n\n    // Pad field\n    this._field[2] = ndarray(this._field[2].data, [field.shape[0] + 2, field.shape[1] + 2])\n    this.padField(this._field[2], field)\n\n    // Save shape of field\n    this.shape = field.shape.slice()\n    var shape = this.shape\n\n    // Resize coordinate fields if necessary\n    for (var i = 0; i < 2; ++i) {\n      if (this._field[2].size > this._field[i].data.length) {\n        pool.freeFloat(this._field[i].data)\n        this._field[i].data = pool.mallocFloat(this._field[2].size)\n      }\n      this._field[i] = ndarray(this._field[i].data, [shape[0] + 2, shape[1] + 2])\n    }\n\n    // Generate x/y coordinates\n    if (params.coords) {\n      var coords = params.coords\n      if (!Array.isArray(coords) || coords.length !== 3) {\n        throw new Error('gl-surface: invalid coordinates for x/y')\n      }\n      for (i = 0; i < 2; ++i) {\n        var coord = coords[i]\n        for (j = 0; j < 2; ++j) {\n          if (coord.shape[j] !== shape[j]) {\n            throw new Error('gl-surface: coords have incorrect shape')\n          }\n        }\n        this.padField(this._field[i], coord)\n      }\n    } else if (params.ticks) {\n      var ticks = params.ticks\n      if (!Array.isArray(ticks) || ticks.length !== 2) {\n        throw new Error('gl-surface: invalid ticks')\n      }\n      for (i = 0; i < 2; ++i) {\n        var tick = ticks[i]\n        if (Array.isArray(tick) || tick.length) {\n          tick = ndarray(tick)\n        }\n        if (tick.shape[0] !== shape[i]) {\n          throw new Error('gl-surface: invalid tick length')\n        }\n        // Make a copy view of the tick array\n        var tick2 = ndarray(tick.data, shape)\n        tick2.stride[i] = tick.stride[0]\n        tick2.stride[i ^ 1] = 0\n\n        // Fill in field array\n        this.padField(this._field[i], tick2)\n      }\n    } else {\n      for (i = 0; i < 2; ++i) {\n        var offset = [0, 0]\n        offset[i] = 1\n        this._field[i] = ndarray(this._field[i].data, [shape[0] + 2, shape[1] + 2], offset, 0)\n      }\n      this._field[0].set(0, 0, 0)\n      for (var j = 0; j < shape[0]; ++j) {\n        this._field[0].set(j + 1, 0, j)\n      }\n      this._field[0].set(shape[0] + 1, 0, shape[0] - 1)\n      this._field[1].set(0, 0, 0)\n      for (j = 0; j < shape[1]; ++j) {\n        this._field[1].set(0, j + 1, j)\n      }\n      this._field[1].set(0, shape[1] + 1, shape[1] - 1)\n    }\n\n    // Save shape\n    var fields = this._field\n\n    // Compute surface normals\n    var dfields = ndarray(pool.mallocFloat(fields[2].size * 3 * 2), [3, shape[0] + 2, shape[1] + 2, 2])\n    for (i = 0; i < 3; ++i) {\n      gradient(dfields.pick(i), fields[i], 'mirror')\n    }\n    var normals = ndarray(pool.mallocFloat(fields[2].size * 3), [shape[0] + 2, shape[1] + 2, 3])\n    for (i = 0; i < shape[0] + 2; ++i) {\n      for (j = 0; j < shape[1] + 2; ++j) {\n        var dxdu = dfields.get(0, i, j, 0)\n        var dxdv = dfields.get(0, i, j, 1)\n        var dydu = dfields.get(1, i, j, 0)\n        var dydv = dfields.get(1, i, j, 1)\n        var dzdu = dfields.get(2, i, j, 0)\n        var dzdv = dfields.get(2, i, j, 1)\n\n        var nx = dydu * dzdv - dydv * dzdu\n        var ny = dzdu * dxdv - dzdv * dxdu\n        var nz = dxdu * dydv - dxdv * dydu\n\n        var nl = Math.sqrt(nx * nx + ny * ny + nz * nz)\n        if (nl < 1e-8) {\n          nl = Math.max(Math.abs(nx), Math.abs(ny), Math.abs(nz))\n          if (nl < 1e-8) {\n            nz = 1.0\n            ny = nx = 0.0\n            nl = 1.0\n          } else {\n            nl = 1.0 / nl\n          }\n        } else {\n          nl = 1.0 / Math.sqrt(nl)\n        }\n\n        normals.set(i, j, 0, nx * nl)\n        normals.set(i, j, 1, ny * nl)\n        normals.set(i, j, 2, nz * nl)\n      }\n    }\n    pool.free(dfields.data)\n\n    // Initialize surface\n    var lo = [ Infinity, Infinity, Infinity ]\n    var hi = [ -Infinity, -Infinity, -Infinity ]\n    var lo_intensity = Infinity\n    var hi_intensity = -Infinity\n    var count = (shape[0] - 1) * (shape[1] - 1) * 6\n    var tverts = pool.mallocFloat(bits.nextPow2(10 * count))\n    var tptr = 0\n    var vertexCount = 0\n    for (i = 0; i < shape[0] - 1; ++i) {\n      j_loop:\n      for (j = 0; j < shape[1] - 1; ++j) {\n        // Test for NaNs\n        for (var dx = 0; dx < 2; ++dx) {\n          for (var dy = 0; dy < 2; ++dy) {\n            for (var k = 0; k < 3; ++k) {\n              var f = this._field[k].get(1 + i + dx, 1 + j + dy)\n              if (isNaN(f) || !isFinite(f)) {\n                continue j_loop\n              }\n            }\n          }\n        }\n        for (k = 0; k < 6; ++k) {\n          var r = i + QUAD[k][0]\n          var c = j + QUAD[k][1]\n\n          var tx = this._field[0].get(r + 1, c + 1)\n          var ty = this._field[1].get(r + 1, c + 1)\n          f =      this._field[2].get(r + 1, c + 1)\n\n          nx = normals.get(r + 1, c + 1, 0)\n          ny = normals.get(r + 1, c + 1, 1)\n          nz = normals.get(r + 1, c + 1, 2)\n\n          if (params.intensity) {\n            vf = params.intensity.get(r, c)\n          }\n\n          var vf = (params.intensity) ?\n            params.intensity.get(r, c) :\n            f + this.objectOffset[2];\n\n          tverts[tptr++] = r\n          tverts[tptr++] = c\n          tverts[tptr++] = tx\n          tverts[tptr++] = ty\n          tverts[tptr++] = f\n          tverts[tptr++] = 0\n          tverts[tptr++] = vf\n          tverts[tptr++] = nx\n          tverts[tptr++] = ny\n          tverts[tptr++] = nz\n\n          lo[0] = Math.min(lo[0], tx + this.objectOffset[0])\n          lo[1] = Math.min(lo[1], ty + this.objectOffset[1])\n          lo[2] = Math.min(lo[2], f  + this.objectOffset[2])\n          lo_intensity = Math.min(lo_intensity, vf)\n\n          hi[0] = Math.max(hi[0], tx + this.objectOffset[0])\n          hi[1] = Math.max(hi[1], ty + this.objectOffset[1])\n          hi[2] = Math.max(hi[2], f  + this.objectOffset[2])\n          hi_intensity = Math.max(hi_intensity, vf)\n\n          vertexCount += 1\n        }\n      }\n    }\n\n    if (params.intensityBounds) {\n      lo_intensity = +params.intensityBounds[0]\n      hi_intensity = +params.intensityBounds[1]\n    }\n\n    // Scale all vertex intensities\n    for (i = 6; i < tptr; i += 10) {\n      tverts[i] = (tverts[i] - lo_intensity) / (hi_intensity - lo_intensity)\n    }\n\n    this._vertexCount = vertexCount\n    this._coordinateBuffer.update(tverts.subarray(0, tptr))\n    pool.freeFloat(tverts)\n    pool.free(normals.data)\n\n    // Update bounds\n    this.bounds = [lo, hi]\n\n    // Save intensity\n    this.intensity = params.intensity || this._field[2]\n\n    if(this.intensityBounds[0] !== lo_intensity || this.intensityBounds[1] !== hi_intensity) {\n        levelsChanged = true\n    }\n\n    // Save intensity bound\n    this.intensityBounds = [lo_intensity, hi_intensity]\n  }\n\n  // Update level crossings\n  if ('levels' in params) {\n    var levels = params.levels\n    if (!Array.isArray(levels[0])) {\n      levels = [ [], [], levels ]\n    } else {\n      levels = levels.slice()\n    }\n    for (i = 0; i < 3; ++i) {\n      levels[i] = levels[i].slice()\n      levels[i].sort(function (a, b) {\n        return a - b\n      })\n    }\n    for (i = 0; i < 3; ++i) {\n      for (j = 0; j < levels[i].length; ++j) {\n        levels[i][j] -= this.objectOffset[i]\n      }\n    }\n    change_test:\n    for (i = 0; i < 3; ++i) {\n      if (levels[i].length !== this.contourLevels[i].length) {\n        levelsChanged = true\n        break\n      }\n      for (j = 0; j < levels[i].length; ++j) {\n        if (levels[i][j] !== this.contourLevels[i][j]) {\n          levelsChanged = true\n          break change_test\n        }\n      }\n    }\n    this.contourLevels = levels\n  }\n\n  if (levelsChanged) {\n    fields = this._field\n    shape = this.shape\n\n    // Update contour lines\n    var contourVerts = []\n\n    for (var dim = 0; dim < 3; ++dim) {\n      var contourLevel = this.contourLevels[dim]\n\n      var levelOffsets = []\n      var levelCounts = []\n\n      var parts = [0, 0, 0]\n\n      for (i = 0; i < contourLevel.length; ++i) {\n        var graph = surfaceNets(this._field[dim], contourLevel[i])\n\n        levelOffsets.push((contourVerts.length / 5) | 0)\n        vertexCount = 0\n\n        edge_loop:\n        for (j = 0; j < graph.cells.length; ++j) {\n          var e = graph.cells[j]\n          for (k = 0; k < 2; ++k) {\n            var p = graph.positions[e[k]]\n\n            var x = p[0]\n            var ix = Math.floor(x) | 0\n            var fx = x - ix\n\n            var y = p[1]\n            var iy = Math.floor(y) | 0\n            var fy = y - iy\n\n            var hole = false\n            axis_loop:\n            for (var axis = 0; axis < 3; ++axis) {\n              parts[axis] = 0.0\n              var iu = (dim + axis + 1) % 3\n              for (dx = 0; dx < 2; ++dx) {\n                var s = dx ? fx : 1.0 - fx\n                r = Math.min(Math.max(ix + dx, 0), shape[0]) | 0\n                for (dy = 0; dy < 2; ++dy) {\n                  var t = dy ? fy : 1.0 - fy\n                  c = Math.min(Math.max(iy + dy, 0), shape[1]) | 0\n\n                  if (axis < 2) {\n                    f = this._field[iu].get(r, c)\n                  } else {\n                    f = (this.intensity.get(r, c) - this.intensityBounds[0]) / (this.intensityBounds[1] - this.intensityBounds[0])\n                  }\n                  if (!isFinite(f) || isNaN(f)) {\n                    hole = true\n                    break axis_loop\n                  }\n\n                  var w = s * t\n                  parts[axis] += w * f\n                }\n              }\n            }\n\n            if (!hole) {\n              contourVerts.push(\n                parts[0],\n                parts[1],\n                p[0],\n                p[1],\n                parts[2]\n              )\n              vertexCount += 1\n            } else {\n              if (k > 0) {\n                // If we already added first edge, pop off verts\n                for (var l = 0; l < 5; ++l) {\n                  contourVerts.pop()\n                }\n                vertexCount -= 1\n              }\n              continue edge_loop\n            }\n          }\n        }\n        levelCounts.push(vertexCount)\n      }\n\n      // Store results\n      this._contourOffsets[dim] = levelOffsets\n      this._contourCounts[dim] = levelCounts\n\n    }\n\n    var floatBuffer = pool.mallocFloat(contourVerts.length)\n    for (i = 0; i < contourVerts.length; ++i) {\n      floatBuffer[i] = contourVerts[i]\n    }\n    this._contourBuffer.update(floatBuffer)\n    pool.freeFloat(floatBuffer)\n  }\n\n  if (params.colormap) {\n    this._colorMap.setPixels(genColormap(params.colormap))\n  }\n}\n\nproto.dispose = function () {\n  this._shader.dispose()\n  this._vao.dispose()\n  this._coordinateBuffer.dispose()\n  this._colorMap.dispose()\n  this._contourBuffer.dispose()\n  this._contourVAO.dispose()\n  this._contourShader.dispose()\n  this._contourPickShader.dispose()\n  this._dynamicBuffer.dispose()\n  this._dynamicVAO.dispose()\n  for (var i = 0; i < 3; ++i) {\n    pool.freeFloat(this._field[i].data)\n  }\n}\n\nproto.highlight = function (selection) {\n  var i\n\n  if (!selection) {\n    this._dynamicCounts = [0, 0, 0]\n    this.dyanamicLevel = [NaN, NaN, NaN]\n    this.highlightLevel = [-1, -1, -1]\n    return\n  }\n\n  for (i = 0; i < 3; ++i) {\n    if (this.enableHighlight[i]) {\n      this.highlightLevel[i] = selection.level[i]\n    } else {\n      this.highlightLevel[i] = -1\n    }\n  }\n\n  var levels\n  if (this.snapToData) {\n    levels = selection.dataCoordinate\n  } else {\n    levels = selection.position\n  }\n  for (i = 0; i < 3; ++i) {\n    levels[i] -= this.objectOffset[i]\n  }\n  if ((!this.enableDynamic[0] || levels[0] === this.dynamicLevel[0]) &&\n    (!this.enableDynamic[1] || levels[1] === this.dynamicLevel[1]) &&\n    (!this.enableDynamic[2] || levels[2] === this.dynamicLevel[2])) {\n    return\n  }\n\n  var vertexCount = 0\n  var shape = this.shape\n  var scratchBuffer = pool.mallocFloat(12 * shape[0] * shape[1])\n\n  for (var d = 0; d < 3; ++d) {\n    if (!this.enableDynamic[d]) {\n      this.dynamicLevel[d] = NaN\n      this._dynamicCounts[d] = 0\n      continue\n    }\n\n    this.dynamicLevel[d] = levels[d]\n\n    var u = (d + 1) % 3\n    var v = (d + 2) % 3\n\n    var f = this._field[d]\n    var g = this._field[u]\n    var h = this._field[v]\n\n    var graph = surfaceNets(f, levels[d])\n    var edges = graph.cells\n    var positions = graph.positions\n\n    this._dynamicOffsets[d] = vertexCount\n\n    for (i = 0; i < edges.length; ++i) {\n      var e = edges[i]\n      for (var j = 0; j < 2; ++j) {\n        var p = positions[e[j]]\n\n        var x = +p[0]\n        var ix = x | 0\n        var jx = Math.min(ix + 1, shape[0]) | 0\n        var fx = x - ix\n        var hx = 1.0 - fx\n\n        var y = +p[1]\n        var iy = y | 0\n        var jy = Math.min(iy + 1, shape[1]) | 0\n        var fy = y - iy\n        var hy = 1.0 - fy\n\n        var w00 = hx * hy\n        var w01 = hx * fy\n        var w10 = fx * hy\n        var w11 = fx * fy\n\n        var cu = w00 * g.get(ix, iy) +\n          w01 * g.get(ix, jy) +\n          w10 * g.get(jx, iy) +\n          w11 * g.get(jx, jy)\n\n        var cv = w00 * h.get(ix, iy) +\n          w01 * h.get(ix, jy) +\n          w10 * h.get(jx, iy) +\n          w11 * h.get(jx, jy)\n\n        if (isNaN(cu) || isNaN(cv)) {\n          if (j) {\n            vertexCount -= 1\n          }\n          break\n        }\n\n        scratchBuffer[2 * vertexCount + 0] = cu\n        scratchBuffer[2 * vertexCount + 1] = cv\n\n        vertexCount += 1\n      }\n    }\n\n    this._dynamicCounts[d] = vertexCount - this._dynamicOffsets[d]\n  }\n\n  this._dynamicBuffer.update(scratchBuffer.subarray(0, 2 * vertexCount))\n  pool.freeFloat(scratchBuffer)\n}\n\nfunction createSurfacePlot (params) {\n  var gl = params.gl\n\n  var shader = createShader(gl)\n  var pickShader = createPickShader(gl)\n  var contourShader = createContourShader(gl)\n  var contourPickShader = createPickContourShader(gl)\n\n  var coordinateBuffer = createBuffer(gl)\n  var vao = createVAO(gl, [\n    { buffer: coordinateBuffer,\n      size: 4,\n      stride: SURFACE_VERTEX_SIZE,\n      offset: 0\n    },\n    { buffer: coordinateBuffer,\n      size: 3,\n      stride: SURFACE_VERTEX_SIZE,\n      offset: 16\n    },\n    {\n      buffer: coordinateBuffer,\n      size: 3,\n      stride: SURFACE_VERTEX_SIZE,\n      offset: 28\n    }\n  ])\n\n  var contourBuffer = createBuffer(gl)\n  var contourVAO = createVAO(gl, [\n    {\n      buffer: contourBuffer,\n      size: 4,\n      stride: 20,\n      offset: 0\n    },\n    {\n      buffer: contourBuffer,\n      size: 1,\n      stride: 20,\n      offset: 16\n    }\n  ])\n\n  var dynamicBuffer = createBuffer(gl)\n  var dynamicVAO = createVAO(gl, [\n    {\n      buffer: dynamicBuffer,\n      size: 2,\n      type: gl.FLOAT\n    }])\n\n  var cmap = createTexture(gl, 1, N_COLORS, gl.RGBA, gl.UNSIGNED_BYTE)\n  cmap.minFilter = gl.LINEAR\n  cmap.magFilter = gl.LINEAR\n\n  var surface = new SurfacePlot(\n    gl,\n    [0, 0], // shape\n    [[0, 0, 0], [0, 0, 0]], // bounds\n    shader,\n    pickShader,\n    coordinateBuffer,\n    vao,\n    cmap,\n    contourShader,\n    contourPickShader,\n    contourBuffer,\n    contourVAO,\n    dynamicBuffer,\n    dynamicVAO,\n    [0, 0, 0] // objectOffset\n  )\n\n  var nparams = {\n    levels: [[], [], []]\n  }\n  for (var id in params) {\n    nparams[id] = params[id]\n  }\n  nparams.colormap = nparams.colormap || 'jet'\n\n  surface.update(nparams)\n\n  return surface\n}\n\n},{\"./lib/shaders\":313,\"binary-search-bounds\":314,\"bit-twiddle\":85,\"colormap\":119,\"gl-buffer\":240,\"gl-mat4/invert\":264,\"gl-mat4/multiply\":266,\"gl-texture2d\":317,\"gl-vao\":322,\"ndarray\":445,\"ndarray-gradient\":436,\"ndarray-ops\":439,\"ndarray-pack\":440,\"surface-nets\":518,\"typedarray-pool\":532}],316:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar Font = _dereq_('css-font')\r\nvar pick = _dereq_('pick-by-alias')\r\nvar createRegl = _dereq_('regl')\r\nvar createGl = _dereq_('gl-util/context')\r\nvar WeakMap = _dereq_('es6-weak-map')\r\nvar rgba = _dereq_('color-normalize')\r\nvar fontAtlas = _dereq_('font-atlas')\r\nvar pool = _dereq_('typedarray-pool')\r\nvar parseRect = _dereq_('parse-rect')\r\nvar isObj = _dereq_('is-plain-obj')\r\nvar parseUnit = _dereq_('parse-unit')\r\nvar px = _dereq_('to-px')\r\nvar kerning = _dereq_('detect-kerning')\r\nvar extend = _dereq_('object-assign')\r\nvar metrics = _dereq_('font-measure')\r\nvar flatten = _dereq_('flatten-vertex-data')\r\nvar ref = _dereq_('bit-twiddle');\nvar nextPow2 = ref.nextPow2;\r\n\r\nvar shaderCache = new WeakMap\r\n\r\n\r\n// Safari does not support font-stretch\r\nvar isStretchSupported = false\r\nif (document.body) {\r\n    var el = document.body.appendChild(document.createElement('div'))\r\n    el.style.font = 'italic small-caps bold condensed 16px/2 cursive'\r\n    if (getComputedStyle(el).fontStretch) {\r\n        isStretchSupported = true\r\n    }\r\n    document.body.removeChild(el)\r\n}\r\n\r\nvar GlText = function GlText (o) {\r\n\tif (isRegl(o)) {\r\n\t\to = {regl: o}\r\n\t\tthis.gl = o.regl._gl\r\n\t}\r\n\telse {\r\n\t\tthis.gl = createGl(o)\r\n\t}\r\n\r\n\tthis.shader = shaderCache.get(this.gl)\r\n\r\n\tif (!this.shader) {\r\n\t\tthis.regl = o.regl || createRegl({ gl: this.gl })\r\n\t}\r\n\telse {\r\n\t\tthis.regl = this.shader.regl\r\n\t}\r\n\r\n\tthis.charBuffer = this.regl.buffer({ type: 'uint8', usage: 'stream' })\r\n\tthis.sizeBuffer = this.regl.buffer({ type: 'float', usage: 'stream' })\r\n\r\n\tif (!this.shader) {\r\n\t\tthis.shader = this.createShader()\r\n\t\tshaderCache.set(this.gl, this.shader)\r\n\t}\r\n\r\n\tthis.batch = []\r\n\r\n\t// multiple options initial state\r\n\tthis.fontSize = []\r\n\tthis.font = []\r\n\tthis.fontAtlas = []\r\n\r\n\tthis.draw = this.shader.draw.bind(this)\r\n\tthis.render = function () {\r\n\t\t// FIXME: add Safari regl report here:\r\n\t\t// charBuffer and width just do not trigger\r\n\t\tthis.regl._refresh()\r\n\t\tthis.draw(this.batch)\r\n\t}\r\n\tthis.canvas = this.gl.canvas\r\n\r\n\tthis.update(isObj(o) ? o : {})\r\n};\r\n\r\nGlText.prototype.createShader = function createShader () {\r\n\tvar regl = this.regl\r\n\r\n\t// FIXME: store 2 shader versions: with normal viewport and without\r\n\t// draw texture method\r\n\tvar draw = regl({\r\n\t\tblend: {\r\n\t\t\tenable: true,\r\n\t\t\tcolor: [0,0,0,1],\r\n\r\n\t\t\tfunc: {\r\n\t\t\t\tsrcRGB: 'src alpha',\r\n\t\t\t\tdstRGB: 'one minus src alpha',\r\n\t\t\t\tsrcAlpha: 'one minus dst alpha',\r\n\t\t\t\tdstAlpha: 'one'\r\n\t\t\t}\r\n\t\t},\r\n\t\tstencil: {enable: false},\r\n\t\tdepth: {enable: false},\r\n\r\n\t\tcount: regl.prop('count'),\r\n\t\toffset: regl.prop('offset'),\r\n\t\tattributes: {\r\n\t\t\tcharOffset: {\r\n\t\t\t\toffset: 4,\r\n\t\t\t\tstride: 8,\r\n\t\t\t\tbuffer: regl.this('sizeBuffer')\r\n\t\t\t},\r\n\t\t\twidth: {\r\n\t\t\t\toffset: 0,\r\n\t\t\t\tstride: 8,\r\n\t\t\t\tbuffer: regl.this('sizeBuffer')\r\n\t\t\t},\r\n\t\t\tchar: regl.this('charBuffer'),\r\n\t\t\tposition: regl.this('position')\r\n\t\t},\r\n\t\tuniforms: {\r\n\t\t\tatlasSize: function (c, p) { return [p.atlas.width, p.atlas.height]; },\r\n\t\t\tatlasDim: function (c, p) { return [p.atlas.cols, p.atlas.rows]; },\r\n\t\t\tatlas: function (c, p) { return p.atlas.texture; },\r\n\t\t\tcharStep: function (c, p) { return p.atlas.step; },\r\n\t\t\tem: function (c, p) { return p.atlas.em; },\r\n\t\t\tcolor: regl.prop('color'),\r\n\t\t\topacity: regl.prop('opacity'),\r\n\t\t\tviewport: regl.this('viewportArray'),\r\n\t\t\tscale: regl.this('scale'),\r\n\t\t\talign: regl.prop('align'),\r\n\t\t\tbaseline: regl.prop('baseline'),\r\n\t\t\ttranslate: regl.this('translate'),\r\n\t\t\tpositionOffset: regl.prop('positionOffset')\r\n\t\t},\r\n\t\tprimitive: 'points',\r\n\t\tviewport: regl.this('viewport'),\r\n\r\n\t\tvert: (\"\\n\\t\\t\\tprecision highp float;\\n\\t\\t\\tattribute float width, charOffset, char;\\n\\t\\t\\tattribute vec2 position;\\n\\t\\t\\tuniform float fontSize, charStep, em, align, baseline;\\n\\t\\t\\tuniform vec4 viewport;\\n\\t\\t\\tuniform vec4 color;\\n\\t\\t\\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\\n\\t\\t\\tvarying vec2 charCoord, charId;\\n\\t\\t\\tvarying float charWidth;\\n\\t\\t\\tvarying vec4 fontColor;\\n\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\" + (!GlText.normalViewport ? 'vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);' : '') + \"\\n\\n\\t\\t\\t\\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\\n\\t\\t\\t\\t\\t+ positionOffset))\\n\\t\\t\\t\\t\\t/ (viewport.zw * scale.xy);\\n\\n\\t\\t\\t\\tvec2 position = (position + translate) * scale;\\n\\t\\t\\t\\tposition += offset * scale;\\n\\n\\t\\t\\t\\t\" + (GlText.normalViewport ? 'position.y = 1. - position.y;' : '') + \"\\n\\n\\t\\t\\t\\tcharCoord = position * viewport.zw + viewport.xy;\\n\\n\\t\\t\\t\\tgl_Position = vec4(position * 2. - 1., 0, 1);\\n\\n\\t\\t\\t\\tgl_PointSize = charStep;\\n\\n\\t\\t\\t\\tcharId.x = mod(char, atlasDim.x);\\n\\t\\t\\t\\tcharId.y = floor(char / atlasDim.x);\\n\\n\\t\\t\\t\\tcharWidth = width * em;\\n\\n\\t\\t\\t\\tfontColor = color / 255.;\\n\\t\\t\\t}\"),\r\n\r\n\t\tfrag: \"\\n\\t\\t\\tprecision highp float;\\n\\t\\t\\tuniform sampler2D atlas;\\n\\t\\t\\tuniform float fontSize, charStep, opacity;\\n\\t\\t\\tuniform vec2 atlasSize;\\n\\t\\t\\tuniform vec4 viewport;\\n\\t\\t\\tvarying vec4 fontColor;\\n\\t\\t\\tvarying vec2 charCoord, charId;\\n\\t\\t\\tvarying float charWidth;\\n\\n\\t\\t\\tfloat lightness(vec4 color) {\\n\\t\\t\\t\\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\\n\\t\\t\\t}\\n\\n\\t\\t\\tvoid main () {\\n\\t\\t\\t\\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\\n\\t\\t\\t\\tfloat halfCharStep = floor(charStep * .5 + .5);\\n\\n\\t\\t\\t\\t// invert y and shift by 1px (FF expecially needs that)\\n\\t\\t\\t\\tuv.y = charStep - uv.y;\\n\\n\\t\\t\\t\\t// ignore points outside of character bounding box\\n\\t\\t\\t\\tfloat halfCharWidth = ceil(charWidth * .5);\\n\\t\\t\\t\\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\\n\\t\\t\\t\\t\\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\\n\\n\\t\\t\\t\\tuv += charId * charStep;\\n\\t\\t\\t\\tuv = uv / atlasSize;\\n\\n\\t\\t\\t\\tvec4 color = fontColor;\\n\\t\\t\\t\\tvec4 mask = texture2D(atlas, uv);\\n\\n\\t\\t\\t\\tfloat maskY = lightness(mask);\\n\\t\\t\\t\\t// float colorY = lightness(color);\\n\\t\\t\\t\\tcolor.a *= maskY;\\n\\t\\t\\t\\tcolor.a *= opacity;\\n\\n\\t\\t\\t\\t// color.a += .1;\\n\\n\\t\\t\\t\\t// antialiasing, see yiq color space y-channel formula\\n\\t\\t\\t\\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\\n\\n\\t\\t\\t\\tgl_FragColor = color;\\n\\t\\t\\t}\"\r\n\t})\r\n\r\n\t// per font-size atlas\r\n\tvar atlas = {}\r\n\r\n\treturn { regl: regl, draw: draw, atlas: atlas }\r\n};\r\n\r\nGlText.prototype.update = function update (o) {\n\t\tvar this$1 = this;\n\r\n\tif (typeof o === 'string') { o = { text: o } }\r\n\telse if (!o) { return }\r\n\r\n\t// FIXME: make this a static transform or more general approact\r\n\to = pick(o, {\r\n\t\tposition: 'position positions coord coords coordinates',\r\n\t\tfont: 'font fontFace fontface typeface cssFont css-font family fontFamily',\r\n\t\tfontSize: 'fontSize fontsize size font-size',\r\n\t\ttext: 'text texts chars characters value values symbols',\r\n\t\talign: 'align alignment textAlign textbaseline',\r\n\t\tbaseline: 'baseline textBaseline textbaseline',\r\n\t\tdirection: 'dir direction textDirection',\r\n\t\tcolor: 'color colour fill fill-color fillColor textColor textcolor',\r\n\t\tkerning: 'kerning kern',\r\n\t\trange: 'range dataBox',\r\n\t\tviewport: 'vp viewport viewBox viewbox viewPort',\r\n\t\topacity: 'opacity alpha transparency visible visibility opaque',\r\n\t\toffset: 'offset positionOffset padding shift indent indentation'\r\n\t}, true)\r\n\r\n\r\n\tif (o.opacity != null) {\r\n\t\tif (Array.isArray(o.opacity)) {\r\n\t\t\tthis.opacity = o.opacity.map(function (o) { return parseFloat(o); })\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.opacity = parseFloat(o.opacity)\r\n\t\t}\r\n\t}\r\n\r\n\tif (o.viewport != null) {\r\n\t\tthis.viewport = parseRect(o.viewport)\r\n\r\n\t\tif (GlText.normalViewport) {\r\n\t\t\tthis.viewport.y = this.canvas.height - this.viewport.y - this.viewport.height\r\n\t\t}\r\n\r\n\t\tthis.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]\r\n\r\n\t}\r\n\tif (this.viewport == null) {\r\n\t\tthis.viewport = {\r\n\t\t\tx: 0, y: 0,\r\n\t\t\twidth: this.gl.drawingBufferWidth,\r\n\t\t\theight: this.gl.drawingBufferHeight\r\n\t\t}\r\n\t\tthis.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]\r\n\t}\r\n\r\n\tif (o.kerning != null) { this.kerning = o.kerning }\r\n\r\n\tif (o.offset != null) {\r\n\t\tif (typeof o.offset === 'number') { o.offset = [o.offset, 0] }\r\n\r\n\t\tthis.positionOffset = flatten(o.offset)\r\n\t}\r\n\r\n\tif (o.direction) { this.direction = o.direction }\r\n\r\n\tif (o.range) {\r\n\t\tthis.range = o.range\r\n\t\tthis.scale = [1 / (o.range[2] - o.range[0]), 1 / (o.range[3] - o.range[1])]\r\n\t\tthis.translate = [-o.range[0], -o.range[1]]\r\n\t}\r\n\tif (o.scale) { this.scale = o.scale }\r\n\tif (o.translate) { this.translate = o.translate }\r\n\r\n\t// default scale corresponds to viewport\r\n\tif (!this.scale) { this.scale = [1 / this.viewport.width, 1 / this.viewport.height] }\r\n\r\n\tif (!this.translate) { this.translate = [0, 0] }\r\n\r\n\tif (!this.font.length && !o.font) { o.font = GlText.baseFontSize + 'px sans-serif' }\r\n\r\n\t// normalize font caching string\r\n\tvar newFont = false, newFontSize = false\r\n\r\n\t// obtain new font data\r\n\tif (o.font) {\r\n\t\t(Array.isArray(o.font) ? o.font : [o.font]).forEach(function (font, i) {\r\n\t\t\t// normalize font\r\n\t\t\tif (typeof font === 'string') {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfont = Font.parse(font)\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tfont = Font.parse(GlText.baseFontSize + 'px ' + font)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse { font = Font.parse(Font.stringify(font)) }\r\n\r\n\t\t\tvar baseString = Font.stringify({\r\n\t\t\t\tsize: GlText.baseFontSize,\r\n\t\t\t\tfamily: font.family,\r\n\t\t\t\tstretch: isStretchSupported ? font.stretch : undefined,\r\n\t\t\t\tvariant: font.variant,\r\n\t\t\t\tweight: font.weight,\r\n\t\t\t\tstyle: font.style\r\n\t\t\t})\r\n\r\n\t\t\tvar unit = parseUnit(font.size)\r\n\t\t\tvar fs = Math.round(unit[0] * px(unit[1]))\r\n\t\t\tif (fs !== this$1.fontSize[i]) {\r\n\t\t\t\tnewFontSize = true\r\n\t\t\t\tthis$1.fontSize[i] = fs\r\n\t\t\t}\r\n\r\n\t\t\t// calc new font metrics/atlas\r\n\t\t\tif (!this$1.font[i] || baseString != this$1.font[i].baseString) {\r\n\t\t\t\tnewFont = true\r\n\r\n\t\t\t\t// obtain font cache or create one\r\n\t\t\t\tthis$1.font[i] = GlText.fonts[baseString]\r\n\t\t\t\tif (!this$1.font[i]) {\r\n\t\t\t\t\tvar family = font.family.join(', ')\r\n\t\t\t\t\tvar style = [font.style]\r\n\t\t\t\t\tif (font.style != font.variant) { style.push(font.variant) }\r\n\t\t\t\t\tif (font.variant != font.weight) { style.push(font.weight) }\r\n\t\t\t\t\tif (isStretchSupported && font.weight != font.stretch) { style.push(font.stretch) }\r\n\r\n\t\t\t\t\tthis$1.font[i] = {\r\n\t\t\t\t\t\tbaseString: baseString,\r\n\r\n\t\t\t\t\t\t// typeface\r\n\t\t\t\t\t\tfamily: family,\r\n\t\t\t\t\t\tweight: font.weight,\r\n\t\t\t\t\t\tstretch: font.stretch,\r\n\t\t\t\t\t\tstyle: font.style,\r\n\t\t\t\t\t\tvariant: font.variant,\r\n\r\n\t\t\t\t\t\t// widths of characters\r\n\t\t\t\t\t\twidth: {},\r\n\r\n\t\t\t\t\t\t// kernin pairs offsets\r\n\t\t\t\t\t\tkerning: {},\r\n\r\n\t\t\t\t\t\tmetrics: metrics(family, {\r\n\t\t\t\t\t\t\torigin: 'top',\r\n\t\t\t\t\t\t\tfontSize: GlText.baseFontSize,\r\n\t\t\t\t\t\t\tfontStyle: style.join(' ')\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tGlText.fonts[baseString] = this$1.font[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\t// FIXME: make independend font-size\r\n\t// if (o.fontSize) {\r\n\t// let unit = parseUnit(o.fontSize)\r\n\t// let fs = Math.round(unit[0] * px(unit[1]))\r\n\r\n\t// if (fs != this.fontSize) {\r\n\t// \tnewFontSize = true\r\n\t// \tthis.fontSize = fs\r\n\t// }\r\n\t// }\r\n\r\n\tif (newFont || newFontSize) {\r\n\t\tthis.font.forEach(function (font, i) {\r\n\t\t\tvar fontString = Font.stringify({\r\n\t\t\t\tsize: this$1.fontSize[i],\r\n\t\t\t\tfamily: font.family,\r\n\t\t\t\tstretch: isStretchSupported ? font.stretch : undefined,\r\n\t\t\t\tvariant: font.variant,\r\n\t\t\t\tweight: font.weight,\r\n\t\t\t\tstyle: font.style\r\n\t\t\t})\r\n\r\n\t\t\t// calc new font size atlas\r\n\t\t\tthis$1.fontAtlas[i] = this$1.shader.atlas[fontString]\r\n\r\n\t\t\tif (!this$1.fontAtlas[i]) {\r\n\t\t\t\tvar metrics = font.metrics\r\n\r\n\t\t\t\tthis$1.shader.atlas[fontString] =\r\n\t\t\t\tthis$1.fontAtlas[i] = {\r\n\t\t\t\t\tfontString: fontString,\r\n\t\t\t\t\t// even step is better for rendered characters\r\n\t\t\t\t\tstep: Math.ceil(this$1.fontSize[i] * metrics.bottom * .5) * 2,\r\n\t\t\t\t\tem: this$1.fontSize[i],\r\n\t\t\t\t\tcols: 0,\r\n\t\t\t\t\trows: 0,\r\n\t\t\t\t\theight: 0,\r\n\t\t\t\t\twidth: 0,\r\n\t\t\t\t\tchars: [],\r\n\t\t\t\t\tids: {},\r\n\t\t\t\t\ttexture: this$1.regl.texture()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// bump atlas characters\r\n\t\t\tif (o.text == null) { o.text = this$1.text }\r\n\t\t})\r\n\t}\r\n\r\n\t// if multiple positions - duplicate text arguments\r\n\t// FIXME: this possibly can be done better to avoid array spawn\r\n\tif (typeof o.text === 'string' && o.position && o.position.length > 2) {\r\n\t\tvar textArray = Array(o.position.length * .5)\r\n\t\tfor (var i = 0; i < textArray.length; i++) {\r\n\t\t\ttextArray[i] = o.text\r\n\t\t}\r\n\t\to.text = textArray\r\n\t}\r\n\r\n\t// calculate offsets for the new font/text\r\n\tvar newAtlasChars\r\n\tif (o.text != null || newFont) {\r\n\t\t// FIXME: ignore spaces\r\n\t\t// text offsets within the text buffer\r\n\t\tthis.textOffsets = [0]\r\n\r\n\t\tif (Array.isArray(o.text)) {\r\n\t\t\tthis.count = o.text[0].length\r\n\t\t\tthis.counts = [this.count]\r\n\t\t\tfor (var i$1 = 1; i$1 < o.text.length; i$1++) {\r\n\t\t\t\tthis$1.textOffsets[i$1] = this$1.textOffsets[i$1 - 1] + o.text[i$1 - 1].length\r\n\t\t\t\tthis$1.count += o.text[i$1].length\r\n\t\t\t\tthis$1.counts.push(o.text[i$1].length)\r\n\t\t\t}\r\n\t\t\tthis.text = o.text.join('')\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.text = o.text\r\n\t\t\tthis.count = this.text.length\r\n\t\t\tthis.counts = [this.count]\r\n\t\t}\r\n\r\n\t\tnewAtlasChars = []\r\n\r\n\t\t// detect & measure new characters\r\n\t\tthis.font.forEach(function (font, idx) {\r\n\t\t\tGlText.atlasContext.font = font.baseString\r\n\r\n\t\t\tvar atlas = this$1.fontAtlas[idx]\r\n\r\n\t\t\tfor (var i = 0; i < this$1.text.length; i++) {\r\n\t\t\t\tvar char = this$1.text.charAt(i)\r\n\r\n\t\t\t\tif (atlas.ids[char] == null) {\r\n\t\t\t\t\tatlas.ids[char] = atlas.chars.length\r\n\t\t\t\t\tatlas.chars.push(char)\r\n\t\t\t\t\tnewAtlasChars.push(char)\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (font.width[char] == null) {\r\n\t\t\t\t\tfont.width[char] = GlText.atlasContext.measureText(char).width / GlText.baseFontSize\r\n\r\n\t\t\t\t\t// measure kerning pairs for the new character\r\n\t\t\t\t\tif (this$1.kerning) {\r\n\t\t\t\t\t\tvar pairs = []\r\n\t\t\t\t\t\tfor (var baseChar in font.width) {\r\n\t\t\t\t\t\t\tpairs.push(baseChar + char, char + baseChar)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\textend(font.kerning, kerning(font.family, {\r\n\t\t\t\t\t\t\tpairs: pairs\r\n\t\t\t\t\t\t}))\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\t// create single position buffer (faster than batch or multiple separate instances)\r\n\tif (o.position) {\r\n\t\tif (o.position.length > 2) {\r\n\t\t\tvar flat = !o.position[0].length\r\n\t\t\tvar positionData = pool.mallocFloat(this.count * 2)\r\n\t\t\tfor (var i$2 = 0, ptr = 0; i$2 < this.counts.length; i$2++) {\r\n\t\t\t\tvar count = this$1.counts[i$2]\r\n\t\t\t\tif (flat) {\r\n\t\t\t\t\tfor (var j = 0; j < count; j++) {\r\n\t\t\t\t\t\tpositionData[ptr++] = o.position[i$2 * 2]\r\n\t\t\t\t\t\tpositionData[ptr++] = o.position[i$2 * 2 + 1]\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor (var j$1 = 0; j$1 < count; j$1++) {\r\n\t\t\t\t\t\tpositionData[ptr++] = o.position[i$2][0]\r\n\t\t\t\t\t\tpositionData[ptr++] = o.position[i$2][1]\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.position.call) {\r\n\t\t\t\tthis.position({\r\n\t\t\t\t\ttype: 'float',\r\n\t\t\t\t\tdata: positionData\r\n\t\t\t\t})\r\n\t\t\t} else {\r\n\t\t\t\tthis.position = this.regl.buffer({\r\n\t\t\t\t\ttype: 'float',\r\n\t\t\t\t\tdata: positionData\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\tpool.freeFloat(positionData)\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.position.destroy) { this.position.destroy() }\r\n\t\t\tthis.position = {\r\n\t\t\t\tconstant: o.position\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// populate text/offset buffers if font/text has changed\r\n\t// as [charWidth, offset, charWidth, offset...]\r\n\t// that is in em units since font-size can change often\r\n\tif (o.text || newFont) {\r\n\t\tvar charIds = pool.mallocUint8(this.count)\r\n\t\tvar sizeData = pool.mallocFloat(this.count * 2)\r\n\t\tthis.textWidth = []\r\n\r\n\t\tfor (var i$3 = 0, ptr$1 = 0; i$3 < this.counts.length; i$3++) {\r\n\t\t\tvar count$1 = this$1.counts[i$3]\r\n\t\t\tvar font = this$1.font[i$3] || this$1.font[0]\r\n\t\t\tvar atlas = this$1.fontAtlas[i$3] || this$1.fontAtlas[0]\r\n\r\n\t\t\tfor (var j$2 = 0; j$2 < count$1; j$2++) {\r\n\t\t\t\tvar char = this$1.text.charAt(ptr$1)\r\n\t\t\t\tvar prevChar = this$1.text.charAt(ptr$1 - 1)\r\n\r\n\t\t\t\tcharIds[ptr$1] = atlas.ids[char]\r\n\t\t\t\tsizeData[ptr$1 * 2] = font.width[char]\r\n\r\n\t\t\t\tif (j$2) {\r\n\t\t\t\t\tvar prevWidth = sizeData[ptr$1 * 2 - 2]\r\n\t\t\t\t\tvar currWidth = sizeData[ptr$1 * 2]\r\n\t\t\t\t\tvar prevOffset = sizeData[ptr$1 * 2 - 1]\r\n\t\t\t\t\tvar offset = prevOffset + prevWidth * .5 + currWidth * .5;\r\n\r\n\t\t\t\t\tif (this$1.kerning) {\r\n\t\t\t\t\t\tvar kerning$1 = font.kerning[prevChar + char]\r\n\t\t\t\t\t\tif (kerning$1) {\r\n\t\t\t\t\t\t\toffset += kerning$1 * 1e-3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsizeData[ptr$1 * 2 + 1] = offset\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tsizeData[ptr$1 * 2 + 1] = sizeData[ptr$1 * 2] * .5\r\n\t\t\t\t}\r\n\r\n\t\t\t\tptr$1++\r\n\t\t\t}\r\n\t\t\tthis$1.textWidth.push(\r\n\t\t\t\t!sizeData.length ? 0 :\r\n\t\t\t\t// last offset + half last width\r\n\t\t\t\tsizeData[ptr$1 * 2 - 2] * .5 + sizeData[ptr$1 * 2 - 1]\r\n\t\t\t)\r\n\t\t}\r\n\r\n\r\n\t\t// bump recalc align offset\r\n\t\tif (!o.align) { o.align = this.align }\r\n\t\tthis.charBuffer({data: charIds, type: 'uint8', usage: 'stream'})\r\n\t\tthis.sizeBuffer({data: sizeData, type: 'float', usage: 'stream'})\r\n\t\tpool.freeUint8(charIds)\r\n\t\tpool.freeFloat(sizeData)\r\n\r\n\t\t// udpate font atlas and texture\r\n\t\tif (newAtlasChars.length) {\r\n\t\t\tthis.font.forEach(function (font, i) {\r\n\t\t\t\tvar atlas = this$1.fontAtlas[i]\r\n\r\n\t\t\t\t// FIXME: insert metrics-based ratio here\r\n\t\t\t\tvar step = atlas.step\r\n\r\n\t\t\t\tvar maxCols = Math.floor(GlText.maxAtlasSize / step)\r\n\t\t\t\tvar cols = Math.min(maxCols, atlas.chars.length)\r\n\t\t\t\tvar rows = Math.ceil(atlas.chars.length / cols)\r\n\r\n\t\t\t\tvar atlasWidth = nextPow2( cols * step )\r\n\t\t\t\t// let atlasHeight = Math.min(rows * step + step * .5, GlText.maxAtlasSize);\r\n\t\t\t\tvar atlasHeight = nextPow2( rows * step );\r\n\r\n\t\t\t\tatlas.width = atlasWidth\r\n\t\t\t\tatlas.height = atlasHeight;\r\n\t\t\t\tatlas.rows = rows\r\n\t\t\t\tatlas.cols = cols\r\n\r\n\t\t\t\tif (!atlas.em) { return }\r\n\r\n\t\t\t\tatlas.texture({\r\n\t\t\t\t\tdata: fontAtlas({\r\n\t\t\t\t\t\tcanvas: GlText.atlasCanvas,\r\n\t\t\t\t\t\tfont: atlas.fontString,\r\n\t\t\t\t\t\tchars: atlas.chars,\r\n\t\t\t\t\t\tshape: [atlasWidth, atlasHeight],\r\n\t\t\t\t\t\tstep: [step, step]\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tif (o.align) {\r\n\t\tthis.align = o.align\r\n\t\tthis.alignOffset = this.textWidth.map(function (textWidth, i) {\r\n\t\t\tvar align = !Array.isArray(this$1.align) ? this$1.align : this$1.align.length > 1 ? this$1.align[i] : this$1.align[0]\r\n\r\n\t\t\tif (typeof align === 'number') { return align }\r\n\t\t\tswitch (align) {\r\n\t\t\t\tcase 'right':\r\n\t\t\t\tcase 'end':\r\n\t\t\t\t\treturn -textWidth\r\n\t\t\t\tcase 'center':\r\n\t\t\t\tcase 'centre':\r\n\t\t\t\tcase 'middle':\r\n\t\t\t\t\treturn -textWidth * .5\r\n\t\t\t}\r\n\r\n\t\t\treturn 0\r\n\t\t})\r\n\t}\r\n\r\n\tif (this.baseline == null && o.baseline == null) {\r\n\t\to.baseline = 0\r\n\t}\r\n\tif (o.baseline != null) {\r\n\t\tthis.baseline = o.baseline\r\n\t\tif (!Array.isArray(this.baseline)) { this.baseline = [this.baseline] }\r\n\t\tthis.baselineOffset = this.baseline.map(function (baseline, i) {\r\n\t\t\tvar m = (this$1.font[i] || this$1.font[0]).metrics\r\n\t\t\tvar base = 0\r\n\r\n\t\t\tbase += m.bottom * .5\r\n\r\n\t\t\tif (typeof baseline === 'number') {\r\n\t\t\t\tbase += (baseline - m.baseline)\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbase += -m[baseline]\r\n\t\t\t}\r\n\r\n\t\t\tif (!GlText.normalViewport) { base *= -1 }\r\n\t\t\treturn base\r\n\t\t})\r\n\t}\r\n\r\n\t// flatten colors to a single uint8 array\r\n\tif (o.color != null) {\r\n\t\tif (!o.color) { o.color = 'transparent' }\r\n\r\n\t\t// single color\r\n\t\tif (typeof o.color === 'string' || !isNaN(o.color)) {\r\n\t\t\tthis.color = rgba(o.color, 'uint8')\r\n\t\t}\r\n\t\t// array\r\n\t\telse {\r\n\t\t\tvar colorData\r\n\r\n\t\t\t// flat array\r\n\t\t\tif (typeof o.color[0] === 'number' && o.color.length > this.counts.length) {\r\n\t\t\t\tvar l = o.color.length\r\n\t\t\t\tcolorData = pool.mallocUint8(l)\r\n\t\t\t\tvar sub = (o.color.subarray || o.color.slice).bind(o.color)\r\n\t\t\t\tfor (var i$4 = 0; i$4 < l; i$4 += 4) {\r\n\t\t\t\t\tcolorData.set(rgba(sub(i$4, i$4 + 4), 'uint8'), i$4)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// nested array\r\n\t\t\telse {\r\n\t\t\t\tvar l$1 = o.color.length\r\n\t\t\t\tcolorData = pool.mallocUint8(l$1 * 4)\r\n\t\t\t\tfor (var i$5 = 0; i$5 < l$1; i$5++) {\r\n\t\t\t\t\tcolorData.set(rgba(o.color[i$5] || 0, 'uint8'), i$5 * 4)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.color = colorData\r\n\t\t}\r\n\t}\r\n\r\n\t// update render batch\r\n\tif (o.position || o.text || o.color || o.baseline || o.align || o.font || o.offset || o.opacity) {\r\n\t\tvar isBatch = (this.color.length > 4)\r\n\t\t\t|| (this.baselineOffset.length > 1)\r\n\t\t\t|| (this.align && this.align.length > 1)\r\n\t\t\t|| (this.fontAtlas.length > 1)\r\n\t\t\t|| (this.positionOffset.length > 2)\r\n\t\tif (isBatch) {\r\n\t\t\tvar length = Math.max(\r\n\t\t\t\tthis.position.length * .5 || 0,\r\n\t\t\t\tthis.color.length * .25 || 0,\r\n\t\t\t\tthis.baselineOffset.length || 0,\r\n\t\t\t\tthis.alignOffset.length || 0,\r\n\t\t\t\tthis.font.length || 0,\r\n\t\t\t\tthis.opacity.length || 0,\r\n\t\t\t\tthis.positionOffset.length * .5 || 0\r\n\t\t\t)\r\n\t\t\tthis.batch = Array(length)\r\n\t\t\tfor (var i$6 = 0; i$6 < this.batch.length; i$6++) {\r\n\t\t\t\tthis$1.batch[i$6] = {\r\n\t\t\t\t\tcount: this$1.counts.length > 1 ? this$1.counts[i$6] : this$1.counts[0],\r\n\t\t\t\t\toffset: this$1.textOffsets.length > 1 ? this$1.textOffsets[i$6] : this$1.textOffsets[0],\r\n\t\t\t\t\tcolor: !this$1.color ? [0,0,0,255] : this$1.color.length <= 4 ? this$1.color : this$1.color.subarray(i$6 * 4, i$6 * 4 + 4),\r\n\t\t\t\t\topacity: Array.isArray(this$1.opacity) ? this$1.opacity[i$6] : this$1.opacity,\r\n\t\t\t\t\tbaseline: this$1.baselineOffset[i$6] != null ? this$1.baselineOffset[i$6] : this$1.baselineOffset[0],\r\n\t\t\t\t\talign: !this$1.align ? 0 : this$1.alignOffset[i$6] != null ? this$1.alignOffset[i$6] : this$1.alignOffset[0],\r\n\t\t\t\t\tatlas: this$1.fontAtlas[i$6] || this$1.fontAtlas[0],\r\n\t\t\t\t\tpositionOffset: this$1.positionOffset.length > 2 ? this$1.positionOffset.subarray(i$6 * 2, i$6 * 2 + 2) : this$1.positionOffset\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// single-color, single-baseline, single-align batch is faster to render\r\n\t\telse {\r\n\t\t\tif (this.count) {\r\n\t\t\t\tthis.batch = [{\r\n\t\t\t\t\tcount: this.count,\r\n\t\t\t\t\toffset: 0,\r\n\t\t\t\t\tcolor: this.color || [0,0,0,255],\r\n\t\t\t\t\topacity: Array.isArray(this.opacity) ? this.opacity[0] : this.opacity,\r\n\t\t\t\t\tbaseline: this.baselineOffset[0],\r\n\t\t\t\t\talign: this.alignOffset ? this.alignOffset[0] : 0,\r\n\t\t\t\t\tatlas: this.fontAtlas[0],\r\n\t\t\t\t\tpositionOffset: this.positionOffset\r\n\t\t\t\t}]\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.batch = []\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nGlText.prototype.destroy = function destroy () {\r\n\t// TODO: count instances of atlases and destroy all on null\r\n};\r\n\r\n\r\n// defaults\r\nGlText.prototype.kerning = true\r\nGlText.prototype.position = { constant: new Float32Array(2) }\r\nGlText.prototype.translate = null\r\nGlText.prototype.scale = null\r\nGlText.prototype.font = null\r\nGlText.prototype.text = ''\r\nGlText.prototype.positionOffset = [0, 0]\r\nGlText.prototype.opacity = 1\r\nGlText.prototype.color = new Uint8Array([0, 0, 0, 255])\r\nGlText.prototype.alignOffset = [0, 0]\r\n\r\n\r\n// whether viewport should be top↓bottom 2d one (true) or webgl one (false)\r\nGlText.normalViewport = false\r\n\r\n// size of an atlas\r\nGlText.maxAtlasSize = 1024\r\n\r\n// font atlas canvas is singleton\r\nGlText.atlasCanvas = document.createElement('canvas')\r\nGlText.atlasContext = GlText.atlasCanvas.getContext('2d', {alpha: false})\r\n\r\n// font-size used for metrics, atlas step calculation\r\nGlText.baseFontSize = 64\r\n\r\n// fonts storage\r\nGlText.fonts = {}\r\n\r\n// max number of different font atlases/textures cached\r\n// FIXME: enable atlas size limitation via LRU\r\n// GlText.atlasCacheSize = 64\r\n\r\nfunction isRegl (o) {\r\n\treturn typeof o === 'function' &&\r\n\to._gl &&\r\n\to.prop &&\r\n\to.texture &&\r\n\to.buffer\r\n}\r\n\r\n\r\nmodule.exports = GlText\r\n\n\n},{\"bit-twiddle\":85,\"color-normalize\":113,\"css-font\":132,\"detect-kerning\":160,\"es6-weak-map\":219,\"flatten-vertex-data\":226,\"font-atlas\":227,\"font-measure\":228,\"gl-util/context\":318,\"is-plain-obj\":417,\"object-assign\":449,\"parse-rect\":454,\"parse-unit\":456,\"pick-by-alias\":460,\"regl\":489,\"to-px\":526,\"typedarray-pool\":532}],317:[function(_dereq_,module,exports){\n'use strict'\n\nvar ndarray = _dereq_('ndarray')\nvar ops     = _dereq_('ndarray-ops')\nvar pool    = _dereq_('typedarray-pool')\n\nmodule.exports = createTexture2D\n\nvar linearTypes = null\nvar filterTypes = null\nvar wrapTypes   = null\n\nfunction lazyInitLinearTypes(gl) {\n  linearTypes = [\n    gl.LINEAR,\n    gl.NEAREST_MIPMAP_LINEAR,\n    gl.LINEAR_MIPMAP_NEAREST,\n    gl.LINEAR_MIPMAP_NEAREST\n  ]\n  filterTypes = [\n    gl.NEAREST,\n    gl.LINEAR,\n    gl.NEAREST_MIPMAP_NEAREST,\n    gl.NEAREST_MIPMAP_LINEAR,\n    gl.LINEAR_MIPMAP_NEAREST,\n    gl.LINEAR_MIPMAP_LINEAR\n  ]\n  wrapTypes = [\n    gl.REPEAT,\n    gl.CLAMP_TO_EDGE,\n    gl.MIRRORED_REPEAT\n  ]\n}\n\nfunction acceptTextureDOM (obj) {\n  return (\n    ('undefined' != typeof HTMLCanvasElement && obj instanceof HTMLCanvasElement) ||\n    ('undefined' != typeof HTMLImageElement && obj instanceof HTMLImageElement) ||\n    ('undefined' != typeof HTMLVideoElement && obj instanceof HTMLVideoElement) ||\n    ('undefined' != typeof ImageData && obj instanceof ImageData))\n}\n\nvar convertFloatToUint8 = function(out, inp) {\n  ops.muls(out, inp, 255.0)\n}\n\nfunction reshapeTexture(tex, w, h) {\n  var gl = tex.gl\n  var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE)\n  if(w < 0 || w > maxSize || h < 0 || h > maxSize) {\n    throw new Error('gl-texture2d: Invalid texture size')\n  }\n  tex._shape = [w, h]\n  tex.bind()\n  gl.texImage2D(gl.TEXTURE_2D, 0, tex.format, w, h, 0, tex.format, tex.type, null)\n  tex._mipLevels = [0]\n  return tex\n}\n\nfunction Texture2D(gl, handle, width, height, format, type) {\n  this.gl = gl\n  this.handle = handle\n  this.format = format\n  this.type = type\n  this._shape = [width, height]\n  this._mipLevels = [0]\n  this._magFilter = gl.NEAREST\n  this._minFilter = gl.NEAREST\n  this._wrapS = gl.CLAMP_TO_EDGE\n  this._wrapT = gl.CLAMP_TO_EDGE\n  this._anisoSamples = 1\n\n  var parent = this\n  var wrapVector = [this._wrapS, this._wrapT]\n  Object.defineProperties(wrapVector, [\n    {\n      get: function() {\n        return parent._wrapS\n      },\n      set: function(v) {\n        return parent.wrapS = v\n      }\n    },\n    {\n      get: function() {\n        return parent._wrapT\n      },\n      set: function(v) {\n        return parent.wrapT = v\n      }\n    }\n  ])\n  this._wrapVector = wrapVector\n\n  var shapeVector = [this._shape[0], this._shape[1]]\n  Object.defineProperties(shapeVector, [\n    {\n      get: function() {\n        return parent._shape[0]\n      },\n      set: function(v) {\n        return parent.width = v\n      }\n    },\n    {\n      get: function() {\n        return parent._shape[1]\n      },\n      set: function(v) {\n        return parent.height = v\n      }\n    }\n  ])\n  this._shapeVector = shapeVector\n}\n\nvar proto = Texture2D.prototype\n\nObject.defineProperties(proto, {\n  minFilter: {\n    get: function() {\n      return this._minFilter\n    },\n    set: function(v) {\n      this.bind()\n      var gl = this.gl\n      if(this.type === gl.FLOAT && linearTypes.indexOf(v) >= 0) {\n        if(!gl.getExtension('OES_texture_float_linear')) {\n          v = gl.NEAREST\n        }\n      }\n      if(filterTypes.indexOf(v) < 0) {\n        throw new Error('gl-texture2d: Unknown filter mode ' + v)\n      }\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, v)\n      return this._minFilter = v\n    }\n  },\n  magFilter: {\n    get: function() {\n      return this._magFilter\n    },\n    set: function(v) {\n      this.bind()\n      var gl = this.gl\n      if(this.type === gl.FLOAT && linearTypes.indexOf(v) >= 0) {\n        if(!gl.getExtension('OES_texture_float_linear')) {\n          v = gl.NEAREST\n        }\n      }\n      if(filterTypes.indexOf(v) < 0) {\n        throw new Error('gl-texture2d: Unknown filter mode ' + v)\n      }\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, v)\n      return this._magFilter = v\n    }\n  },\n  mipSamples: {\n    get: function() {\n      return this._anisoSamples\n    },\n    set: function(i) {\n      var psamples = this._anisoSamples\n      this._anisoSamples = Math.max(i, 1)|0\n      if(psamples !== this._anisoSamples) {\n        var ext = this.gl.getExtension('EXT_texture_filter_anisotropic')\n        if(ext) {\n          this.gl.texParameterf(this.gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, this._anisoSamples)\n        }\n      }\n      return this._anisoSamples\n    }\n  },\n  wrapS: {\n    get: function() {\n      return this._wrapS\n    },\n    set: function(v) {\n      this.bind()\n      if(wrapTypes.indexOf(v) < 0) {\n        throw new Error('gl-texture2d: Unknown wrap mode ' + v)\n      }\n      this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, v)\n      return this._wrapS = v\n    }\n  },\n  wrapT: {\n    get: function() {\n      return this._wrapT\n    },\n    set: function(v) {\n      this.bind()\n      if(wrapTypes.indexOf(v) < 0) {\n        throw new Error('gl-texture2d: Unknown wrap mode ' + v)\n      }\n      this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, v)\n      return this._wrapT = v\n    }\n  },\n  wrap: {\n    get: function() {\n      return this._wrapVector\n    },\n    set: function(v) {\n      if(!Array.isArray(v)) {\n        v = [v,v]\n      }\n      if(v.length !== 2) {\n        throw new Error('gl-texture2d: Must specify wrap mode for rows and columns')\n      }\n      for(var i=0; i<2; ++i) {\n        if(wrapTypes.indexOf(v[i]) < 0) {\n          throw new Error('gl-texture2d: Unknown wrap mode ' + v)\n        }\n      }\n      this._wrapS = v[0]\n      this._wrapT = v[1]\n\n      var gl = this.gl\n      this.bind()\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, this._wrapS)\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, this._wrapT)\n\n      return v\n    }\n  },\n  shape: {\n    get: function() {\n      return this._shapeVector\n    },\n    set: function(x) {\n      if(!Array.isArray(x)) {\n        x = [x|0,x|0]\n      } else {\n        if(x.length !== 2) {\n          throw new Error('gl-texture2d: Invalid texture shape')\n        }\n      }\n      reshapeTexture(this, x[0]|0, x[1]|0)\n      return [x[0]|0, x[1]|0]\n    }\n  },\n  width: {\n    get: function() {\n      return this._shape[0]\n    },\n    set: function(w) {\n      w = w|0\n      reshapeTexture(this, w, this._shape[1])\n      return w\n    }\n  },\n  height: {\n    get: function() {\n      return this._shape[1]\n    },\n    set: function(h) {\n      h = h|0\n      reshapeTexture(this, this._shape[0], h)\n      return h\n    }\n  }\n})\n\nproto.bind = function(unit) {\n  var gl = this.gl\n  if(unit !== undefined) {\n    gl.activeTexture(gl.TEXTURE0 + (unit|0))\n  }\n  gl.bindTexture(gl.TEXTURE_2D, this.handle)\n  if(unit !== undefined) {\n    return (unit|0)\n  }\n  return gl.getParameter(gl.ACTIVE_TEXTURE) - gl.TEXTURE0\n}\n\nproto.dispose = function() {\n  this.gl.deleteTexture(this.handle)\n}\n\nproto.generateMipmap = function() {\n  this.bind()\n  this.gl.generateMipmap(this.gl.TEXTURE_2D)\n\n  //Update mip levels\n  var l = Math.min(this._shape[0], this._shape[1])\n  for(var i=0; l>0; ++i, l>>>=1) {\n    if(this._mipLevels.indexOf(i) < 0) {\n      this._mipLevels.push(i)\n    }\n  }\n}\n\nproto.setPixels = function(data, x_off, y_off, mip_level) {\n  var gl = this.gl\n  this.bind()\n  if(Array.isArray(x_off)) {\n    mip_level = y_off\n    y_off = x_off[1]|0\n    x_off = x_off[0]|0\n  } else {\n    x_off = x_off || 0\n    y_off = y_off || 0\n  }\n  mip_level = mip_level || 0\n  var directData = acceptTextureDOM(data) ? data : data.raw\n  if(directData) {\n    var needsMip = this._mipLevels.indexOf(mip_level) < 0\n    if(needsMip) {\n      gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, this.type, directData)\n      this._mipLevels.push(mip_level)\n    } else {\n      gl.texSubImage2D(gl.TEXTURE_2D, mip_level, x_off, y_off, this.format, this.type, directData)\n    }\n  } else if(data.shape && data.stride && data.data) {\n    if(data.shape.length < 2 ||\n       x_off + data.shape[1] > this._shape[1]>>>mip_level ||\n       y_off + data.shape[0] > this._shape[0]>>>mip_level ||\n       x_off < 0 ||\n       y_off < 0) {\n      throw new Error('gl-texture2d: Texture dimensions are out of bounds')\n    }\n    texSubImageArray(gl, x_off, y_off, mip_level, this.format, this.type, this._mipLevels, data)\n  } else {\n    throw new Error('gl-texture2d: Unsupported data type')\n  }\n}\n\n\nfunction isPacked(shape, stride) {\n  if(shape.length === 3) {\n    return  (stride[2] === 1) &&\n            (stride[1] === shape[0]*shape[2]) &&\n            (stride[0] === shape[2])\n  }\n  return  (stride[0] === 1) &&\n          (stride[1] === shape[0])\n}\n\nfunction texSubImageArray(gl, x_off, y_off, mip_level, cformat, ctype, mipLevels, array) {\n  var dtype = array.dtype\n  var shape = array.shape.slice()\n  if(shape.length < 2 || shape.length > 3) {\n    throw new Error('gl-texture2d: Invalid ndarray, must be 2d or 3d')\n  }\n  var type = 0, format = 0\n  var packed = isPacked(shape, array.stride.slice())\n  if(dtype === 'float32') {\n    type = gl.FLOAT\n  } else if(dtype === 'float64') {\n    type = gl.FLOAT\n    packed = false\n    dtype = 'float32'\n  } else if(dtype === 'uint8') {\n    type = gl.UNSIGNED_BYTE\n  } else {\n    type = gl.UNSIGNED_BYTE\n    packed = false\n    dtype = 'uint8'\n  }\n  var channels = 1\n  if(shape.length === 2) {\n    format = gl.LUMINANCE\n    shape = [shape[0], shape[1], 1]\n    array = ndarray(array.data, shape, [array.stride[0], array.stride[1], 1], array.offset)\n  } else if(shape.length === 3) {\n    if(shape[2] === 1) {\n      format = gl.ALPHA\n    } else if(shape[2] === 2) {\n      format = gl.LUMINANCE_ALPHA\n    } else if(shape[2] === 3) {\n      format = gl.RGB\n    } else if(shape[2] === 4) {\n      format = gl.RGBA\n    } else {\n      throw new Error('gl-texture2d: Invalid shape for pixel coords')\n    }\n    channels = shape[2]\n  } else {\n    throw new Error('gl-texture2d: Invalid shape for texture')\n  }\n  //For 1-channel textures allow conversion between formats\n  if((format  === gl.LUMINANCE || format  === gl.ALPHA) &&\n     (cformat === gl.LUMINANCE || cformat === gl.ALPHA)) {\n    format = cformat\n  }\n  if(format !== cformat) {\n    throw new Error('gl-texture2d: Incompatible texture format for setPixels')\n  }\n  var size = array.size\n  var needsMip = mipLevels.indexOf(mip_level) < 0\n  if(needsMip) {\n    mipLevels.push(mip_level)\n  }\n  if(type === ctype && packed) {\n    //Array data types are compatible, can directly copy into texture\n    if(array.offset === 0 && array.data.length === size) {\n      if(needsMip) {\n        gl.texImage2D(gl.TEXTURE_2D, mip_level, cformat, shape[0], shape[1], 0, cformat, ctype, array.data)\n      } else {\n        gl.texSubImage2D(gl.TEXTURE_2D, mip_level, x_off, y_off, shape[0], shape[1], cformat, ctype, array.data)\n      }\n    } else {\n      if(needsMip) {\n        gl.texImage2D(gl.TEXTURE_2D, mip_level, cformat, shape[0], shape[1], 0, cformat, ctype, array.data.subarray(array.offset, array.offset+size))\n      } else {\n        gl.texSubImage2D(gl.TEXTURE_2D, mip_level, x_off, y_off, shape[0], shape[1], cformat, ctype, array.data.subarray(array.offset, array.offset+size))\n      }\n    }\n  } else {\n    //Need to do type conversion to pack data into buffer\n    var pack_buffer\n    if(ctype === gl.FLOAT) {\n      pack_buffer = pool.mallocFloat32(size)\n    } else {\n      pack_buffer = pool.mallocUint8(size)\n    }\n    var pack_view = ndarray(pack_buffer, shape, [shape[2], shape[2]*shape[0], 1])\n    if(type === gl.FLOAT && ctype === gl.UNSIGNED_BYTE) {\n      convertFloatToUint8(pack_view, array)\n    } else {\n      ops.assign(pack_view, array)\n    }\n    if(needsMip) {\n      gl.texImage2D(gl.TEXTURE_2D, mip_level, cformat, shape[0], shape[1], 0, cformat, ctype, pack_buffer.subarray(0, size))\n    } else {\n      gl.texSubImage2D(gl.TEXTURE_2D, mip_level, x_off, y_off, shape[0], shape[1], cformat, ctype, pack_buffer.subarray(0, size))\n    }\n    if(ctype === gl.FLOAT) {\n      pool.freeFloat32(pack_buffer)\n    } else {\n      pool.freeUint8(pack_buffer)\n    }\n  }\n}\n\nfunction initTexture(gl) {\n  var tex = gl.createTexture()\n  gl.bindTexture(gl.TEXTURE_2D, tex)\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST)\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)\n  return tex\n}\n\nfunction createTextureShape(gl, width, height, format, type) {\n  var maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE)\n  if(width < 0 || width > maxTextureSize || height < 0 || height  > maxTextureSize) {\n    throw new Error('gl-texture2d: Invalid texture shape')\n  }\n  if(type === gl.FLOAT && !gl.getExtension('OES_texture_float')) {\n    throw new Error('gl-texture2d: Floating point textures not supported on this platform')\n  }\n  var tex = initTexture(gl)\n  gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, type, null)\n  return new Texture2D(gl, tex, width, height, format, type)\n}\n\nfunction createTextureDOM(gl, directData, width, height, format, type) {\n  var tex = initTexture(gl)\n  gl.texImage2D(gl.TEXTURE_2D, 0, format, format, type, directData)\n  return new Texture2D(gl, tex, width, height, format, type)\n}\n\n//Creates a texture from an ndarray\nfunction createTextureArray(gl, array) {\n  var dtype = array.dtype\n  var shape = array.shape.slice()\n  var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE)\n  if(shape[0] < 0 || shape[0] > maxSize || shape[1] < 0 || shape[1] > maxSize) {\n    throw new Error('gl-texture2d: Invalid texture size')\n  }\n  var packed = isPacked(shape, array.stride.slice())\n  var type = 0\n  if(dtype === 'float32') {\n    type = gl.FLOAT\n  } else if(dtype === 'float64') {\n    type = gl.FLOAT\n    packed = false\n    dtype = 'float32'\n  } else if(dtype === 'uint8') {\n    type = gl.UNSIGNED_BYTE\n  } else {\n    type = gl.UNSIGNED_BYTE\n    packed = false\n    dtype = 'uint8'\n  }\n  var format = 0\n  if(shape.length === 2) {\n    format = gl.LUMINANCE\n    shape = [shape[0], shape[1], 1]\n    array = ndarray(array.data, shape, [array.stride[0], array.stride[1], 1], array.offset)\n  } else if(shape.length === 3) {\n    if(shape[2] === 1) {\n      format = gl.ALPHA\n    } else if(shape[2] === 2) {\n      format = gl.LUMINANCE_ALPHA\n    } else if(shape[2] === 3) {\n      format = gl.RGB\n    } else if(shape[2] === 4) {\n      format = gl.RGBA\n    } else {\n      throw new Error('gl-texture2d: Invalid shape for pixel coords')\n    }\n  } else {\n    throw new Error('gl-texture2d: Invalid shape for texture')\n  }\n  if(type === gl.FLOAT && !gl.getExtension('OES_texture_float')) {\n    type = gl.UNSIGNED_BYTE\n    packed = false\n  }\n  var buffer, buf_store\n  var size = array.size\n  if(!packed) {\n    var stride = [shape[2], shape[2]*shape[0], 1]\n    buf_store = pool.malloc(size, dtype)\n    var buf_array = ndarray(buf_store, shape, stride, 0)\n    if((dtype === 'float32' || dtype === 'float64') && type === gl.UNSIGNED_BYTE) {\n      convertFloatToUint8(buf_array, array)\n    } else {\n      ops.assign(buf_array, array)\n    }\n    buffer = buf_store.subarray(0, size)\n  } else if (array.offset === 0 && array.data.length === size) {\n    buffer = array.data\n  } else {\n    buffer = array.data.subarray(array.offset, array.offset + size)\n  }\n  var tex = initTexture(gl)\n  gl.texImage2D(gl.TEXTURE_2D, 0, format, shape[0], shape[1], 0, format, type, buffer)\n  if(!packed) {\n    pool.free(buf_store)\n  }\n  return new Texture2D(gl, tex, shape[0], shape[1], format, type)\n}\n\nfunction createTexture2D(gl) {\n  if(arguments.length <= 1) {\n    throw new Error('gl-texture2d: Missing arguments for texture2d constructor')\n  }\n  if(!linearTypes) {\n    lazyInitLinearTypes(gl)\n  }\n  if(typeof arguments[1] === 'number') {\n    return createTextureShape(gl, arguments[1], arguments[2], arguments[3]||gl.RGBA, arguments[4]||gl.UNSIGNED_BYTE)\n  }\n  if(Array.isArray(arguments[1])) {\n    return createTextureShape(gl, arguments[1][0]|0, arguments[1][1]|0, arguments[2]||gl.RGBA, arguments[3]||gl.UNSIGNED_BYTE)\n  }\n  if(typeof arguments[1] === 'object') {\n    var obj = arguments[1]\n    var directData = acceptTextureDOM(obj) ? obj : obj.raw\n    if (directData) {\n      return createTextureDOM(gl, directData, obj.width|0, obj.height|0, arguments[2]||gl.RGBA, arguments[3]||gl.UNSIGNED_BYTE)\n    } else if(obj.shape && obj.data && obj.stride) {\n      return createTextureArray(gl, obj)\n    }\n  }\n  throw new Error('gl-texture2d: Invalid arguments for texture2d constructor')\n}\n\n},{\"ndarray\":445,\"ndarray-ops\":439,\"typedarray-pool\":532}],318:[function(_dereq_,module,exports){\n/** @module  gl-util/context */\r\n'use strict'\r\n\r\nvar pick = _dereq_('pick-by-alias')\r\n\r\nmodule.exports = function setContext (o) {\r\n\tif (!o) o = {}\r\n\telse if (typeof o === 'string') o = {container: o}\r\n\r\n\t// HTMLCanvasElement\r\n\tif (isCanvas(o)) {\r\n\t\to = {container: o}\r\n\t}\r\n\t// HTMLElement\r\n\telse if (isElement(o)) {\r\n\t\to = {container: o}\r\n\t}\r\n\t// WebGLContext\r\n\telse if (isContext(o)) {\r\n\t\to = {gl: o}\r\n\t}\r\n\t// options object\r\n\telse {\r\n\t\to = pick(o, {\r\n\t\t\tcontainer: 'container target element el canvas holder parent parentNode wrapper use ref root node',\r\n\t\t\tgl: 'gl context webgl glContext',\r\n\t\t\tattrs: 'attributes attrs contextAttributes',\r\n\t\t\tpixelRatio: 'pixelRatio pxRatio px ratio pxratio pixelratio'\r\n\t\t}, true)\r\n\t}\r\n\r\n\tif (!o.pixelRatio) o.pixelRatio = window.pixelRatio || 1\r\n\r\n\t// make sure there is container and canvas\r\n\tif (o.gl) {\r\n\t\treturn o.gl\r\n\t}\r\n\tif (o.canvas) {\r\n\t\to.container = o.canvas.parentNode\r\n\t}\r\n\tif (o.container) {\r\n\t\tif (typeof o.container === 'string') {\r\n\t\t\tvar c = document.querySelector(o.container)\r\n\t\t\tif (!c) throw Error('Element ' + o.container + ' is not found')\r\n\t\t\to.container = c\r\n\t\t}\r\n\t\tif (isCanvas(o.container)) {\r\n\t\t\to.canvas = o.container\r\n\t\t\to.container = o.canvas.parentNode\r\n\t\t}\r\n\t\telse if (!o.canvas) {\r\n\t\t\to.canvas = document.createElement('canvas')\r\n\t\t\to.container.appendChild(o.canvas)\r\n\t\t\tresize(o)\r\n\t\t}\r\n\t}\r\n\t// blank new canvas\r\n\telse if (!o.canvas) {\r\n\t\to.container = document.body || document.documentElement\r\n\t\to.canvas = document.createElement('canvas')\r\n\t\to.canvas.style.position = 'absolute'\r\n\t\to.canvas.style.top = 0\r\n\t\to.canvas.style.left = 0\r\n\t\to.container.appendChild(o.canvas)\r\n\t\tresize(o)\r\n\t}\r\n\r\n\t// make sure there is context\r\n\tif (!o.gl) {\r\n\t\ttry {\r\n\t\t\to.gl = o.canvas.getContext('webgl', o.attrs)\r\n\t\t} catch (e) {\r\n\t\t\ttry {\r\n\t\t\t\to.gl = o.canvas.getContext('experimental-webgl', o.attrs)\r\n\t\t\t}\r\n\t\t\tcatch (e) {\r\n\t\t\t\to.gl = o.canvas.getContext('webgl-experimental', o.attrs)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn o.gl\r\n}\r\n\r\n\r\nfunction resize (o) {\r\n\tif (o.container) {\r\n\t\tif (o.container == document.body) {\r\n\t\t\tif (!document.body.style.width) o.canvas.width = o.width || (o.pixelRatio * window.innerWidth)\r\n\t\t\tif (!document.body.style.height) o.canvas.height = o.height || (o.pixelRatio * window.innerHeight)\r\n\t\t}\r\n\t\telse {\r\n\t\t\tvar bounds = o.container.getBoundingClientRect()\r\n\t\t\to.canvas.width = o.width || (bounds.right - bounds.left)\r\n\t\t\to.canvas.height = o.height || (bounds.bottom - bounds.top)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction isCanvas (e) {\r\n\treturn typeof e.getContext === 'function'\r\n\t\t&& 'width' in e\r\n\t\t&& 'height' in e\r\n}\r\n\r\nfunction isElement (e) {\r\n\treturn typeof e.nodeName === 'string' &&\r\n\t\ttypeof e.appendChild === 'function' &&\r\n\t\ttypeof e.getBoundingClientRect === 'function'\r\n}\r\n\r\nfunction isContext (e) {\r\n\treturn typeof e.drawArrays === 'function' ||\r\n\t\ttypeof e.drawElements === 'function'\r\n}\r\n\n},{\"pick-by-alias\":460}],319:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction doBind(gl, elements, attributes) {\n  if(elements) {\n    elements.bind()\n  } else {\n    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null)\n  }\n  var nattribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS)|0\n  if(attributes) {\n    if(attributes.length > nattribs) {\n      throw new Error(\"gl-vao: Too many vertex attributes\")\n    }\n    for(var i=0; i<attributes.length; ++i) {\n      var attrib = attributes[i]\n      if(attrib.buffer) {\n        var buffer = attrib.buffer\n        var size = attrib.size || 4\n        var type = attrib.type || gl.FLOAT\n        var normalized = !!attrib.normalized\n        var stride = attrib.stride || 0\n        var offset = attrib.offset || 0\n        buffer.bind()\n        gl.enableVertexAttribArray(i)\n        gl.vertexAttribPointer(i, size, type, normalized, stride, offset)\n      } else {\n        if(typeof attrib === \"number\") {\n          gl.vertexAttrib1f(i, attrib)\n        } else if(attrib.length === 1) {\n          gl.vertexAttrib1f(i, attrib[0])\n        } else if(attrib.length === 2) {\n          gl.vertexAttrib2f(i, attrib[0], attrib[1])\n        } else if(attrib.length === 3) {\n          gl.vertexAttrib3f(i, attrib[0], attrib[1], attrib[2])\n        } else if(attrib.length === 4) {\n          gl.vertexAttrib4f(i, attrib[0], attrib[1], attrib[2], attrib[3])\n        } else {\n          throw new Error(\"gl-vao: Invalid vertex attribute\")\n        }\n        gl.disableVertexAttribArray(i)\n      }\n    }\n    for(; i<nattribs; ++i) {\n      gl.disableVertexAttribArray(i)\n    }\n  } else {\n    gl.bindBuffer(gl.ARRAY_BUFFER, null)\n    for(var i=0; i<nattribs; ++i) {\n      gl.disableVertexAttribArray(i)\n    }\n  }\n}\n\nmodule.exports = doBind\n},{}],320:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar bindAttribs = _dereq_(\"./do-bind.js\")\n\nfunction VAOEmulated(gl) {\n  this.gl = gl\n  this._elements = null\n  this._attributes = null\n  this._elementsType = gl.UNSIGNED_SHORT\n}\n\nVAOEmulated.prototype.bind = function() {\n  bindAttribs(this.gl, this._elements, this._attributes)\n}\n\nVAOEmulated.prototype.update = function(attributes, elements, elementsType) {\n  this._elements = elements\n  this._attributes = attributes\n  this._elementsType = elementsType || this.gl.UNSIGNED_SHORT\n}\n\nVAOEmulated.prototype.dispose = function() { }\nVAOEmulated.prototype.unbind = function() { }\n\nVAOEmulated.prototype.draw = function(mode, count, offset) {\n  offset = offset || 0\n  var gl = this.gl\n  if(this._elements) {\n    gl.drawElements(mode, count, this._elementsType, offset)\n  } else {\n    gl.drawArrays(mode, offset, count)\n  }\n}\n\nfunction createVAOEmulated(gl) {\n  return new VAOEmulated(gl)\n}\n\nmodule.exports = createVAOEmulated\n},{\"./do-bind.js\":319}],321:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar bindAttribs = _dereq_(\"./do-bind.js\")\n\nfunction VertexAttribute(location, dimension, a, b, c, d) {\n  this.location = location\n  this.dimension = dimension\n  this.a = a\n  this.b = b\n  this.c = c\n  this.d = d\n}\n\nVertexAttribute.prototype.bind = function(gl) {\n  switch(this.dimension) {\n    case 1:\n      gl.vertexAttrib1f(this.location, this.a)\n    break\n    case 2:\n      gl.vertexAttrib2f(this.location, this.a, this.b)\n    break\n    case 3:\n      gl.vertexAttrib3f(this.location, this.a, this.b, this.c)\n    break\n    case 4:\n      gl.vertexAttrib4f(this.location, this.a, this.b, this.c, this.d)\n    break\n  }\n}\n\nfunction VAONative(gl, ext, handle) {\n  this.gl = gl\n  this._ext = ext\n  this.handle = handle\n  this._attribs = []\n  this._useElements = false\n  this._elementsType = gl.UNSIGNED_SHORT\n}\n\nVAONative.prototype.bind = function() {\n  this._ext.bindVertexArrayOES(this.handle)\n  for(var i=0; i<this._attribs.length; ++i) {\n    this._attribs[i].bind(this.gl)\n  }\n}\n\nVAONative.prototype.unbind = function() {\n  this._ext.bindVertexArrayOES(null)\n}\n\nVAONative.prototype.dispose = function() {\n  this._ext.deleteVertexArrayOES(this.handle)\n}\n\nVAONative.prototype.update = function(attributes, elements, elementsType) {\n  this.bind()\n  bindAttribs(this.gl, elements, attributes)\n  this.unbind()\n  this._attribs.length = 0\n  if(attributes)\n  for(var i=0; i<attributes.length; ++i) {\n    var a = attributes[i]\n    if(typeof a === \"number\") {\n      this._attribs.push(new VertexAttribute(i, 1, a))\n    } else if(Array.isArray(a)) {\n      this._attribs.push(new VertexAttribute(i, a.length, a[0], a[1], a[2], a[3]))\n    }\n  }\n  this._useElements = !!elements\n  this._elementsType = elementsType || this.gl.UNSIGNED_SHORT\n}\n\nVAONative.prototype.draw = function(mode, count, offset) {\n  offset = offset || 0\n  var gl = this.gl\n  if(this._useElements) {\n    gl.drawElements(mode, count, this._elementsType, offset)\n  } else {\n    gl.drawArrays(mode, offset, count)\n  }\n}\n\nfunction createVAONative(gl, ext) {\n  return new VAONative(gl, ext, ext.createVertexArrayOES())\n}\n\nmodule.exports = createVAONative\n},{\"./do-bind.js\":319}],322:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar createVAONative = _dereq_(\"./lib/vao-native.js\")\nvar createVAOEmulated = _dereq_(\"./lib/vao-emulated.js\")\n\nfunction ExtensionShim (gl) {\n  this.bindVertexArrayOES = gl.bindVertexArray.bind(gl)\n  this.createVertexArrayOES = gl.createVertexArray.bind(gl)\n  this.deleteVertexArrayOES = gl.deleteVertexArray.bind(gl)\n}\n\nfunction createVAO(gl, attributes, elements, elementsType) {\n  var ext = gl.createVertexArray\n    ? new ExtensionShim(gl)\n    : gl.getExtension('OES_vertex_array_object')\n  var vao\n\n  if(ext) {\n    vao = createVAONative(gl, ext)\n  } else {\n    vao = createVAOEmulated(gl)\n  }\n  vao.update(attributes, elements, elementsType)\n  return vao\n}\n\nmodule.exports = createVAO\n\n},{\"./lib/vao-emulated.js\":320,\"./lib/vao-native.js\":321}],323:[function(_dereq_,module,exports){\nmodule.exports = add;\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction add(out, a, b) {\n    out[0] = a[0] + b[0]\n    out[1] = a[1] + b[1]\n    out[2] = a[2] + b[2]\n    return out\n}\n},{}],324:[function(_dereq_,module,exports){\nmodule.exports = angle\n\nvar fromValues = _dereq_('./fromValues')\nvar normalize = _dereq_('./normalize')\nvar dot = _dereq_('./dot')\n\n/**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\nfunction angle(a, b) {\n    var tempA = fromValues(a[0], a[1], a[2])\n    var tempB = fromValues(b[0], b[1], b[2])\n \n    normalize(tempA, tempA)\n    normalize(tempB, tempB)\n \n    var cosine = dot(tempA, tempB)\n\n    if(cosine > 1.0){\n        return 0\n    } else {\n        return Math.acos(cosine)\n    }     \n}\n\n},{\"./dot\":334,\"./fromValues\":340,\"./normalize\":351}],325:[function(_dereq_,module,exports){\nmodule.exports = ceil\n\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to ceil\n * @returns {vec3} out\n */\nfunction ceil(out, a) {\n  out[0] = Math.ceil(a[0])\n  out[1] = Math.ceil(a[1])\n  out[2] = Math.ceil(a[2])\n  return out\n}\n\n},{}],326:[function(_dereq_,module,exports){\nmodule.exports = clone;\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nfunction clone(a) {\n    var out = new Float32Array(3)\n    out[0] = a[0]\n    out[1] = a[1]\n    out[2] = a[2]\n    return out\n}\n},{}],327:[function(_dereq_,module,exports){\nmodule.exports = copy;\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\nfunction copy(out, a) {\n    out[0] = a[0]\n    out[1] = a[1]\n    out[2] = a[2]\n    return out\n}\n},{}],328:[function(_dereq_,module,exports){\nmodule.exports = create;\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nfunction create() {\n    var out = new Float32Array(3)\n    out[0] = 0\n    out[1] = 0\n    out[2] = 0\n    return out\n}\n},{}],329:[function(_dereq_,module,exports){\nmodule.exports = cross;\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction cross(out, a, b) {\n    var ax = a[0], ay = a[1], az = a[2],\n        bx = b[0], by = b[1], bz = b[2]\n\n    out[0] = ay * bz - az * by\n    out[1] = az * bx - ax * bz\n    out[2] = ax * by - ay * bx\n    return out\n}\n},{}],330:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./distance')\n\n},{\"./distance\":331}],331:[function(_dereq_,module,exports){\nmodule.exports = distance;\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\nfunction distance(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2]\n    return Math.sqrt(x*x + y*y + z*z)\n}\n},{}],332:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./divide')\n\n},{\"./divide\":333}],333:[function(_dereq_,module,exports){\nmodule.exports = divide;\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction divide(out, a, b) {\n    out[0] = a[0] / b[0]\n    out[1] = a[1] / b[1]\n    out[2] = a[2] / b[2]\n    return out\n}\n},{}],334:[function(_dereq_,module,exports){\nmodule.exports = dot;\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nfunction dot(a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]\n}\n},{}],335:[function(_dereq_,module,exports){\nmodule.exports = 0.000001\n\n},{}],336:[function(_dereq_,module,exports){\nmodule.exports = equals\n\nvar EPSILON = _dereq_('./epsilon')\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nfunction equals(a, b) {\n  var a0 = a[0]\n  var a1 = a[1]\n  var a2 = a[2]\n  var b0 = b[0]\n  var b1 = b[1]\n  var b2 = b[2]\n  return (Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n          Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n          Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)))\n}\n\n},{\"./epsilon\":335}],337:[function(_dereq_,module,exports){\nmodule.exports = exactEquals\n\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nfunction exactEquals(a, b) {\n  return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]\n}\n\n},{}],338:[function(_dereq_,module,exports){\nmodule.exports = floor\n\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to floor\n * @returns {vec3} out\n */\nfunction floor(out, a) {\n  out[0] = Math.floor(a[0])\n  out[1] = Math.floor(a[1])\n  out[2] = Math.floor(a[2])\n  return out\n}\n\n},{}],339:[function(_dereq_,module,exports){\nmodule.exports = forEach;\n\nvar vec = _dereq_('./create')()\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nfunction forEach(a, stride, offset, count, fn, arg) {\n        var i, l\n        if(!stride) {\n            stride = 3\n        }\n\n        if(!offset) {\n            offset = 0\n        }\n        \n        if(count) {\n            l = Math.min((count * stride) + offset, a.length)\n        } else {\n            l = a.length\n        }\n\n        for(i = offset; i < l; i += stride) {\n            vec[0] = a[i] \n            vec[1] = a[i+1] \n            vec[2] = a[i+2]\n            fn(vec, vec, arg)\n            a[i] = vec[0] \n            a[i+1] = vec[1] \n            a[i+2] = vec[2]\n        }\n        \n        return a\n}\n},{\"./create\":328}],340:[function(_dereq_,module,exports){\nmodule.exports = fromValues;\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nfunction fromValues(x, y, z) {\n    var out = new Float32Array(3)\n    out[0] = x\n    out[1] = y\n    out[2] = z\n    return out\n}\n},{}],341:[function(_dereq_,module,exports){\nmodule.exports = {\n  EPSILON: _dereq_('./epsilon')\n  , create: _dereq_('./create')\n  , clone: _dereq_('./clone')\n  , angle: _dereq_('./angle')\n  , fromValues: _dereq_('./fromValues')\n  , copy: _dereq_('./copy')\n  , set: _dereq_('./set')\n  , equals: _dereq_('./equals')\n  , exactEquals: _dereq_('./exactEquals')\n  , add: _dereq_('./add')\n  , subtract: _dereq_('./subtract')\n  , sub: _dereq_('./sub')\n  , multiply: _dereq_('./multiply')\n  , mul: _dereq_('./mul')\n  , divide: _dereq_('./divide')\n  , div: _dereq_('./div')\n  , min: _dereq_('./min')\n  , max: _dereq_('./max')\n  , floor: _dereq_('./floor')\n  , ceil: _dereq_('./ceil')\n  , round: _dereq_('./round')\n  , scale: _dereq_('./scale')\n  , scaleAndAdd: _dereq_('./scaleAndAdd')\n  , distance: _dereq_('./distance')\n  , dist: _dereq_('./dist')\n  , squaredDistance: _dereq_('./squaredDistance')\n  , sqrDist: _dereq_('./sqrDist')\n  , length: _dereq_('./length')\n  , len: _dereq_('./len')\n  , squaredLength: _dereq_('./squaredLength')\n  , sqrLen: _dereq_('./sqrLen')\n  , negate: _dereq_('./negate')\n  , inverse: _dereq_('./inverse')\n  , normalize: _dereq_('./normalize')\n  , dot: _dereq_('./dot')\n  , cross: _dereq_('./cross')\n  , lerp: _dereq_('./lerp')\n  , random: _dereq_('./random')\n  , transformMat4: _dereq_('./transformMat4')\n  , transformMat3: _dereq_('./transformMat3')\n  , transformQuat: _dereq_('./transformQuat')\n  , rotateX: _dereq_('./rotateX')\n  , rotateY: _dereq_('./rotateY')\n  , rotateZ: _dereq_('./rotateZ')\n  , forEach: _dereq_('./forEach')\n}\n\n},{\"./add\":323,\"./angle\":324,\"./ceil\":325,\"./clone\":326,\"./copy\":327,\"./create\":328,\"./cross\":329,\"./dist\":330,\"./distance\":331,\"./div\":332,\"./divide\":333,\"./dot\":334,\"./epsilon\":335,\"./equals\":336,\"./exactEquals\":337,\"./floor\":338,\"./forEach\":339,\"./fromValues\":340,\"./inverse\":342,\"./len\":343,\"./length\":344,\"./lerp\":345,\"./max\":346,\"./min\":347,\"./mul\":348,\"./multiply\":349,\"./negate\":350,\"./normalize\":351,\"./random\":352,\"./rotateX\":353,\"./rotateY\":354,\"./rotateZ\":355,\"./round\":356,\"./scale\":357,\"./scaleAndAdd\":358,\"./set\":359,\"./sqrDist\":360,\"./sqrLen\":361,\"./squaredDistance\":362,\"./squaredLength\":363,\"./sub\":364,\"./subtract\":365,\"./transformMat3\":366,\"./transformMat4\":367,\"./transformQuat\":368}],342:[function(_dereq_,module,exports){\nmodule.exports = inverse;\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\nfunction inverse(out, a) {\n  out[0] = 1.0 / a[0]\n  out[1] = 1.0 / a[1]\n  out[2] = 1.0 / a[2]\n  return out\n}\n},{}],343:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./length')\n\n},{\"./length\":344}],344:[function(_dereq_,module,exports){\nmodule.exports = length;\n\n/**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nfunction length(a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2]\n    return Math.sqrt(x*x + y*y + z*z)\n}\n},{}],345:[function(_dereq_,module,exports){\nmodule.exports = lerp;\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec3} out\n */\nfunction lerp(out, a, b, t) {\n    var ax = a[0],\n        ay = a[1],\n        az = a[2]\n    out[0] = ax + t * (b[0] - ax)\n    out[1] = ay + t * (b[1] - ay)\n    out[2] = az + t * (b[2] - az)\n    return out\n}\n},{}],346:[function(_dereq_,module,exports){\nmodule.exports = max;\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction max(out, a, b) {\n    out[0] = Math.max(a[0], b[0])\n    out[1] = Math.max(a[1], b[1])\n    out[2] = Math.max(a[2], b[2])\n    return out\n}\n},{}],347:[function(_dereq_,module,exports){\nmodule.exports = min;\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction min(out, a, b) {\n    out[0] = Math.min(a[0], b[0])\n    out[1] = Math.min(a[1], b[1])\n    out[2] = Math.min(a[2], b[2])\n    return out\n}\n},{}],348:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./multiply')\n\n},{\"./multiply\":349}],349:[function(_dereq_,module,exports){\nmodule.exports = multiply;\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction multiply(out, a, b) {\n    out[0] = a[0] * b[0]\n    out[1] = a[1] * b[1]\n    out[2] = a[2] * b[2]\n    return out\n}\n},{}],350:[function(_dereq_,module,exports){\nmodule.exports = negate;\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\nfunction negate(out, a) {\n    out[0] = -a[0]\n    out[1] = -a[1]\n    out[2] = -a[2]\n    return out\n}\n},{}],351:[function(_dereq_,module,exports){\nmodule.exports = normalize;\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\nfunction normalize(out, a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2]\n    var len = x*x + y*y + z*z\n    if (len > 0) {\n        //TODO: evaluate use of glm_invsqrt here?\n        len = 1 / Math.sqrt(len)\n        out[0] = a[0] * len\n        out[1] = a[1] * len\n        out[2] = a[2] * len\n    }\n    return out\n}\n},{}],352:[function(_dereq_,module,exports){\nmodule.exports = random;\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\nfunction random(out, scale) {\n    scale = scale || 1.0\n\n    var r = Math.random() * 2.0 * Math.PI\n    var z = (Math.random() * 2.0) - 1.0\n    var zScale = Math.sqrt(1.0-z*z) * scale\n\n    out[0] = Math.cos(r) * zScale\n    out[1] = Math.sin(r) * zScale\n    out[2] = z * scale\n    return out\n}\n},{}],353:[function(_dereq_,module,exports){\nmodule.exports = rotateX;\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nfunction rotateX(out, a, b, c){\n    var by = b[1]\n    var bz = b[2]\n\n    // Translate point to the origin\n    var py = a[1] - by\n    var pz = a[2] - bz\n\n    var sc = Math.sin(c)\n    var cc = Math.cos(c)\n\n    // perform rotation and translate to correct position\n    out[0] = a[0]\n    out[1] = by + py * cc - pz * sc\n    out[2] = bz + py * sc + pz * cc\n\n    return out\n}\n\n},{}],354:[function(_dereq_,module,exports){\nmodule.exports = rotateY;\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nfunction rotateY(out, a, b, c){\n    var bx = b[0]\n    var bz = b[2]\n\n    // translate point to the origin\n    var px = a[0] - bx\n    var pz = a[2] - bz\n    \n    var sc = Math.sin(c)\n    var cc = Math.cos(c)\n  \n    // perform rotation and translate to correct position\n    out[0] = bx + pz * sc + px * cc\n    out[1] = a[1]\n    out[2] = bz + pz * cc - px * sc\n  \n    return out\n}\n\n},{}],355:[function(_dereq_,module,exports){\nmodule.exports = rotateZ;\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nfunction rotateZ(out, a, b, c){\n    var bx = b[0]\n    var by = b[1]\n\n    //Translate point to the origin\n    var px = a[0] - bx\n    var py = a[1] - by\n  \n    var sc = Math.sin(c)\n    var cc = Math.cos(c)\n\n    // perform rotation and translate to correct position\n    out[0] = bx + px * cc - py * sc\n    out[1] = by + px * sc + py * cc\n    out[2] = a[2]\n  \n    return out\n}\n\n},{}],356:[function(_dereq_,module,exports){\nmodule.exports = round\n\n/**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to round\n * @returns {vec3} out\n */\nfunction round(out, a) {\n  out[0] = Math.round(a[0])\n  out[1] = Math.round(a[1])\n  out[2] = Math.round(a[2])\n  return out\n}\n\n},{}],357:[function(_dereq_,module,exports){\nmodule.exports = scale;\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nfunction scale(out, a, b) {\n    out[0] = a[0] * b\n    out[1] = a[1] * b\n    out[2] = a[2] * b\n    return out\n}\n},{}],358:[function(_dereq_,module,exports){\nmodule.exports = scaleAndAdd;\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nfunction scaleAndAdd(out, a, b, scale) {\n    out[0] = a[0] + (b[0] * scale)\n    out[1] = a[1] + (b[1] * scale)\n    out[2] = a[2] + (b[2] * scale)\n    return out\n}\n},{}],359:[function(_dereq_,module,exports){\nmodule.exports = set;\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nfunction set(out, x, y, z) {\n    out[0] = x\n    out[1] = y\n    out[2] = z\n    return out\n}\n},{}],360:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./squaredDistance')\n\n},{\"./squaredDistance\":362}],361:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./squaredLength')\n\n},{\"./squaredLength\":363}],362:[function(_dereq_,module,exports){\nmodule.exports = squaredDistance;\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nfunction squaredDistance(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2]\n    return x*x + y*y + z*z\n}\n},{}],363:[function(_dereq_,module,exports){\nmodule.exports = squaredLength;\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nfunction squaredLength(a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2]\n    return x*x + y*y + z*z\n}\n},{}],364:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('./subtract')\n\n},{\"./subtract\":365}],365:[function(_dereq_,module,exports){\nmodule.exports = subtract;\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nfunction subtract(out, a, b) {\n    out[0] = a[0] - b[0]\n    out[1] = a[1] - b[1]\n    out[2] = a[2] - b[2]\n    return out\n}\n},{}],366:[function(_dereq_,module,exports){\nmodule.exports = transformMat3;\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nfunction transformMat3(out, a, m) {\n    var x = a[0], y = a[1], z = a[2]\n    out[0] = x * m[0] + y * m[3] + z * m[6]\n    out[1] = x * m[1] + y * m[4] + z * m[7]\n    out[2] = x * m[2] + y * m[5] + z * m[8]\n    return out\n}\n},{}],367:[function(_dereq_,module,exports){\nmodule.exports = transformMat4;\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\nfunction transformMat4(out, a, m) {\n    var x = a[0], y = a[1], z = a[2],\n        w = m[3] * x + m[7] * y + m[11] * z + m[15]\n    w = w || 1.0\n    out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w\n    out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w\n    out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w\n    return out\n}\n},{}],368:[function(_dereq_,module,exports){\nmodule.exports = transformQuat;\n\n/**\n * Transforms the vec3 with a quat\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\nfunction transformQuat(out, a, q) {\n    // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\n    var x = a[0], y = a[1], z = a[2],\n        qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n        // calculate quat * vec\n        ix = qw * x + qy * z - qz * y,\n        iy = qw * y + qz * x - qx * z,\n        iz = qw * z + qx * y - qy * x,\n        iw = -qx * x - qy * y - qz * z\n\n    // calculate result * inverse quat\n    out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy\n    out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz\n    out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx\n    return out\n}\n},{}],369:[function(_dereq_,module,exports){\nmodule.exports = add\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction add (out, a, b) {\n  out[0] = a[0] + b[0]\n  out[1] = a[1] + b[1]\n  out[2] = a[2] + b[2]\n  out[3] = a[3] + b[3]\n  return out\n}\n\n},{}],370:[function(_dereq_,module,exports){\nmodule.exports = clone\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nfunction clone (a) {\n  var out = new Float32Array(4)\n  out[0] = a[0]\n  out[1] = a[1]\n  out[2] = a[2]\n  out[3] = a[3]\n  return out\n}\n\n},{}],371:[function(_dereq_,module,exports){\nmodule.exports = copy\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\nfunction copy (out, a) {\n  out[0] = a[0]\n  out[1] = a[1]\n  out[2] = a[2]\n  out[3] = a[3]\n  return out\n}\n\n},{}],372:[function(_dereq_,module,exports){\nmodule.exports = create\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nfunction create () {\n  var out = new Float32Array(4)\n  out[0] = 0\n  out[1] = 0\n  out[2] = 0\n  out[3] = 0\n  return out\n}\n\n},{}],373:[function(_dereq_,module,exports){\nmodule.exports = distance\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\nfunction distance (a, b) {\n  var x = b[0] - a[0],\n    y = b[1] - a[1],\n    z = b[2] - a[2],\n    w = b[3] - a[3]\n  return Math.sqrt(x * x + y * y + z * z + w * w)\n}\n\n},{}],374:[function(_dereq_,module,exports){\nmodule.exports = divide\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction divide (out, a, b) {\n  out[0] = a[0] / b[0]\n  out[1] = a[1] / b[1]\n  out[2] = a[2] / b[2]\n  out[3] = a[3] / b[3]\n  return out\n}\n\n},{}],375:[function(_dereq_,module,exports){\nmodule.exports = dot\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nfunction dot (a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]\n}\n\n},{}],376:[function(_dereq_,module,exports){\nmodule.exports = fromValues\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nfunction fromValues (x, y, z, w) {\n  var out = new Float32Array(4)\n  out[0] = x\n  out[1] = y\n  out[2] = z\n  out[3] = w\n  return out\n}\n\n},{}],377:[function(_dereq_,module,exports){\nmodule.exports = {\n  create: _dereq_('./create'),\n  clone: _dereq_('./clone'),\n  fromValues: _dereq_('./fromValues'),\n  copy: _dereq_('./copy'),\n  set: _dereq_('./set'),\n  add: _dereq_('./add'),\n  subtract: _dereq_('./subtract'),\n  multiply: _dereq_('./multiply'),\n  divide: _dereq_('./divide'),\n  min: _dereq_('./min'),\n  max: _dereq_('./max'),\n  scale: _dereq_('./scale'),\n  scaleAndAdd: _dereq_('./scaleAndAdd'),\n  distance: _dereq_('./distance'),\n  squaredDistance: _dereq_('./squaredDistance'),\n  length: _dereq_('./length'),\n  squaredLength: _dereq_('./squaredLength'),\n  negate: _dereq_('./negate'),\n  inverse: _dereq_('./inverse'),\n  normalize: _dereq_('./normalize'),\n  dot: _dereq_('./dot'),\n  lerp: _dereq_('./lerp'),\n  random: _dereq_('./random'),\n  transformMat4: _dereq_('./transformMat4'),\n  transformQuat: _dereq_('./transformQuat')\n}\n\n},{\"./add\":369,\"./clone\":370,\"./copy\":371,\"./create\":372,\"./distance\":373,\"./divide\":374,\"./dot\":375,\"./fromValues\":376,\"./inverse\":378,\"./length\":379,\"./lerp\":380,\"./max\":381,\"./min\":382,\"./multiply\":383,\"./negate\":384,\"./normalize\":385,\"./random\":386,\"./scale\":387,\"./scaleAndAdd\":388,\"./set\":389,\"./squaredDistance\":390,\"./squaredLength\":391,\"./subtract\":392,\"./transformMat4\":393,\"./transformQuat\":394}],378:[function(_dereq_,module,exports){\nmodule.exports = inverse\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\nfunction inverse (out, a) {\n  out[0] = 1.0 / a[0]\n  out[1] = 1.0 / a[1]\n  out[2] = 1.0 / a[2]\n  out[3] = 1.0 / a[3]\n  return out\n}\n\n},{}],379:[function(_dereq_,module,exports){\nmodule.exports = length\n\n/**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nfunction length (a) {\n  var x = a[0],\n    y = a[1],\n    z = a[2],\n    w = a[3]\n  return Math.sqrt(x * x + y * y + z * z + w * w)\n}\n\n},{}],380:[function(_dereq_,module,exports){\nmodule.exports = lerp\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec4} out\n */\nfunction lerp (out, a, b, t) {\n  var ax = a[0],\n    ay = a[1],\n    az = a[2],\n    aw = a[3]\n  out[0] = ax + t * (b[0] - ax)\n  out[1] = ay + t * (b[1] - ay)\n  out[2] = az + t * (b[2] - az)\n  out[3] = aw + t * (b[3] - aw)\n  return out\n}\n\n},{}],381:[function(_dereq_,module,exports){\nmodule.exports = max\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction max (out, a, b) {\n  out[0] = Math.max(a[0], b[0])\n  out[1] = Math.max(a[1], b[1])\n  out[2] = Math.max(a[2], b[2])\n  out[3] = Math.max(a[3], b[3])\n  return out\n}\n\n},{}],382:[function(_dereq_,module,exports){\nmodule.exports = min\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction min (out, a, b) {\n  out[0] = Math.min(a[0], b[0])\n  out[1] = Math.min(a[1], b[1])\n  out[2] = Math.min(a[2], b[2])\n  out[3] = Math.min(a[3], b[3])\n  return out\n}\n\n},{}],383:[function(_dereq_,module,exports){\nmodule.exports = multiply\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction multiply (out, a, b) {\n  out[0] = a[0] * b[0]\n  out[1] = a[1] * b[1]\n  out[2] = a[2] * b[2]\n  out[3] = a[3] * b[3]\n  return out\n}\n\n},{}],384:[function(_dereq_,module,exports){\nmodule.exports = negate\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\nfunction negate (out, a) {\n  out[0] = -a[0]\n  out[1] = -a[1]\n  out[2] = -a[2]\n  out[3] = -a[3]\n  return out\n}\n\n},{}],385:[function(_dereq_,module,exports){\nmodule.exports = normalize\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\nfunction normalize (out, a) {\n  var x = a[0],\n    y = a[1],\n    z = a[2],\n    w = a[3]\n  var len = x * x + y * y + z * z + w * w\n  if (len > 0) {\n    len = 1 / Math.sqrt(len)\n    out[0] = x * len\n    out[1] = y * len\n    out[2] = z * len\n    out[3] = w * len\n  }\n  return out\n}\n\n},{}],386:[function(_dereq_,module,exports){\nvar vecNormalize = _dereq_('./normalize')\nvar vecScale = _dereq_('./scale')\n\nmodule.exports = random\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\nfunction random (out, scale) {\n  scale = scale || 1.0\n\n  // TODO: This is a pretty awful way of doing this. Find something better.\n  out[0] = Math.random()\n  out[1] = Math.random()\n  out[2] = Math.random()\n  out[3] = Math.random()\n  vecNormalize(out, out)\n  vecScale(out, out, scale)\n  return out\n}\n\n},{\"./normalize\":385,\"./scale\":387}],387:[function(_dereq_,module,exports){\nmodule.exports = scale\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nfunction scale (out, a, b) {\n  out[0] = a[0] * b\n  out[1] = a[1] * b\n  out[2] = a[2] * b\n  out[3] = a[3] * b\n  return out\n}\n\n},{}],388:[function(_dereq_,module,exports){\nmodule.exports = scaleAndAdd\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nfunction scaleAndAdd (out, a, b, scale) {\n  out[0] = a[0] + (b[0] * scale)\n  out[1] = a[1] + (b[1] * scale)\n  out[2] = a[2] + (b[2] * scale)\n  out[3] = a[3] + (b[3] * scale)\n  return out\n}\n\n},{}],389:[function(_dereq_,module,exports){\nmodule.exports = set\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nfunction set (out, x, y, z, w) {\n  out[0] = x\n  out[1] = y\n  out[2] = z\n  out[3] = w\n  return out\n}\n\n},{}],390:[function(_dereq_,module,exports){\nmodule.exports = squaredDistance\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nfunction squaredDistance (a, b) {\n  var x = b[0] - a[0],\n    y = b[1] - a[1],\n    z = b[2] - a[2],\n    w = b[3] - a[3]\n  return x * x + y * y + z * z + w * w\n}\n\n},{}],391:[function(_dereq_,module,exports){\nmodule.exports = squaredLength\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nfunction squaredLength (a) {\n  var x = a[0],\n    y = a[1],\n    z = a[2],\n    w = a[3]\n  return x * x + y * y + z * z + w * w\n}\n\n},{}],392:[function(_dereq_,module,exports){\nmodule.exports = subtract\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nfunction subtract (out, a, b) {\n  out[0] = a[0] - b[0]\n  out[1] = a[1] - b[1]\n  out[2] = a[2] - b[2]\n  out[3] = a[3] - b[3]\n  return out\n}\n\n},{}],393:[function(_dereq_,module,exports){\nmodule.exports = transformMat4\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\nfunction transformMat4 (out, a, m) {\n  var x = a[0], y = a[1], z = a[2], w = a[3]\n  out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w\n  out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w\n  out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w\n  out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w\n  return out\n}\n\n},{}],394:[function(_dereq_,module,exports){\nmodule.exports = transformQuat\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\nfunction transformQuat (out, a, q) {\n  var x = a[0], y = a[1], z = a[2],\n    qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n    // calculate quat * vec\n    ix = qw * x + qy * z - qz * y,\n    iy = qw * y + qz * x - qx * z,\n    iz = qw * z + qx * y - qy * x,\n    iw = -qx * x - qy * y - qz * z\n\n  // calculate result * inverse quat\n  out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy\n  out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz\n  out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx\n  out[3] = a[3]\n  return out\n}\n\n},{}],395:[function(_dereq_,module,exports){\nmodule.exports = decodeFloat\n\nvar UINT8_VIEW = new Uint8Array(4)\nvar FLOAT_VIEW = new Float32Array(UINT8_VIEW.buffer)\n\nfunction decodeFloat(x, y, z, w) {\n  UINT8_VIEW[0] = w\n  UINT8_VIEW[1] = z\n  UINT8_VIEW[2] = y\n  UINT8_VIEW[3] = x\n  return FLOAT_VIEW[0]\n}\n\n},{}],396:[function(_dereq_,module,exports){\nvar tokenize = _dereq_('glsl-tokenizer')\nvar atob     = _dereq_('atob-lite')\n\nmodule.exports = getName\n\nfunction getName(src) {\n  var tokens = Array.isArray(src)\n    ? src\n    : tokenize(src)\n\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n    if (token.type !== 'preprocessor') continue\n    var match = token.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/)\n    if (!match) continue\n    if (!match[2]) continue\n\n    var b64  = match[1]\n    var name = match[2]\n\n    return (b64 ? atob(name) : name).trim()\n  }\n}\n\n},{\"atob-lite\":65,\"glsl-tokenizer\":403}],397:[function(_dereq_,module,exports){\nmodule.exports = tokenize\n\nvar literals100 = _dereq_('./lib/literals')\n  , operators = _dereq_('./lib/operators')\n  , builtins100 = _dereq_('./lib/builtins')\n  , literals300es = _dereq_('./lib/literals-300es')\n  , builtins300es = _dereq_('./lib/builtins-300es')\n\nvar NORMAL = 999          // <-- never emitted\n  , TOKEN = 9999          // <-- never emitted\n  , BLOCK_COMMENT = 0\n  , LINE_COMMENT = 1\n  , PREPROCESSOR = 2\n  , OPERATOR = 3\n  , INTEGER = 4\n  , FLOAT = 5\n  , IDENT = 6\n  , BUILTIN = 7\n  , KEYWORD = 8\n  , WHITESPACE = 9\n  , EOF = 10\n  , HEX = 11\n\nvar map = [\n    'block-comment'\n  , 'line-comment'\n  , 'preprocessor'\n  , 'operator'\n  , 'integer'\n  , 'float'\n  , 'ident'\n  , 'builtin'\n  , 'keyword'\n  , 'whitespace'\n  , 'eof'\n  , 'integer'\n]\n\nfunction tokenize(opt) {\n  var i = 0\n    , total = 0\n    , mode = NORMAL\n    , c\n    , last\n    , content = []\n    , tokens = []\n    , token_idx = 0\n    , token_offs = 0\n    , line = 1\n    , col = 0\n    , start = 0\n    , isnum = false\n    , isoperator = false\n    , input = ''\n    , len\n\n  opt = opt || {}\n  var allBuiltins = builtins100\n  var allLiterals = literals100\n  if (opt.version === '300 es') {\n    allBuiltins = builtins300es\n    allLiterals = literals300es\n  }\n\n  return function(data) {\n    tokens = []\n    if (data !== null) return write(data.replace ? data.replace(/\\r\\n/g, '\\n') : data)\n    return end()\n  }\n\n  function token(data) {\n    if (data.length) {\n      tokens.push({\n        type: map[mode]\n      , data: data\n      , position: start\n      , line: line\n      , column: col\n      })\n    }\n  }\n\n  function write(chunk) {\n    i = 0\n    input += chunk\n    len = input.length\n\n    var last\n\n    while(c = input[i], i < len) {\n      last = i\n\n      switch(mode) {\n        case BLOCK_COMMENT: i = block_comment(); break\n        case LINE_COMMENT: i = line_comment(); break\n        case PREPROCESSOR: i = preprocessor(); break\n        case OPERATOR: i = operator(); break\n        case INTEGER: i = integer(); break\n        case HEX: i = hex(); break\n        case FLOAT: i = decimal(); break\n        case TOKEN: i = readtoken(); break\n        case WHITESPACE: i = whitespace(); break\n        case NORMAL: i = normal(); break\n      }\n\n      if(last !== i) {\n        switch(input[last]) {\n          case '\\n': col = 0; ++line; break\n          default: ++col; break\n        }\n      }\n    }\n\n    total += i\n    input = input.slice(i)\n    return tokens\n  }\n\n  function end(chunk) {\n    if(content.length) {\n      token(content.join(''))\n    }\n\n    mode = EOF\n    token('(eof)')\n    return tokens\n  }\n\n  function normal() {\n    content = content.length ? [] : content\n\n    if(last === '/' && c === '*') {\n      start = total + i - 1\n      mode = BLOCK_COMMENT\n      last = c\n      return i + 1\n    }\n\n    if(last === '/' && c === '/') {\n      start = total + i - 1\n      mode = LINE_COMMENT\n      last = c\n      return i + 1\n    }\n\n    if(c === '#') {\n      mode = PREPROCESSOR\n      start = total + i\n      return i\n    }\n\n    if(/\\s/.test(c)) {\n      mode = WHITESPACE\n      start = total + i\n      return i\n    }\n\n    isnum = /\\d/.test(c)\n    isoperator = /[^\\w_]/.test(c)\n\n    start = total + i\n    mode = isnum ? INTEGER : isoperator ? OPERATOR : TOKEN\n    return i\n  }\n\n  function whitespace() {\n    if(/[^\\s]/g.test(c)) {\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function preprocessor() {\n    if((c === '\\r' || c === '\\n') && last !== '\\\\') {\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function line_comment() {\n    return preprocessor()\n  }\n\n  function block_comment() {\n    if(c === '/' && last === '*') {\n      content.push(c)\n      token(content.join(''))\n      mode = NORMAL\n      return i + 1\n    }\n\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function operator() {\n    if(last === '.' && /\\d/.test(c)) {\n      mode = FLOAT\n      return i\n    }\n\n    if(last === '/' && c === '*') {\n      mode = BLOCK_COMMENT\n      return i\n    }\n\n    if(last === '/' && c === '/') {\n      mode = LINE_COMMENT\n      return i\n    }\n\n    if(c === '.' && content.length) {\n      while(determine_operator(content));\n\n      mode = FLOAT\n      return i\n    }\n\n    if(c === ';' || c === ')' || c === '(') {\n      if(content.length) while(determine_operator(content));\n      token(c)\n      mode = NORMAL\n      return i + 1\n    }\n\n    var is_composite_operator = content.length === 2 && c !== '='\n    if(/[\\w_\\d\\s]/.test(c) || is_composite_operator) {\n      while(determine_operator(content));\n      mode = NORMAL\n      return i\n    }\n\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function determine_operator(buf) {\n    var j = 0\n      , idx\n      , res\n\n    do {\n      idx = operators.indexOf(buf.slice(0, buf.length + j).join(''))\n      res = operators[idx]\n\n      if(idx === -1) {\n        if(j-- + buf.length > 0) continue\n        res = buf.slice(0, 1).join('')\n      }\n\n      token(res)\n\n      start += res.length\n      content = content.slice(res.length)\n      return content.length\n    } while(1)\n  }\n\n  function hex() {\n    if(/[^a-fA-F0-9]/.test(c)) {\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function integer() {\n    if(c === '.') {\n      content.push(c)\n      mode = FLOAT\n      last = c\n      return i + 1\n    }\n\n    if(/[eE]/.test(c)) {\n      content.push(c)\n      mode = FLOAT\n      last = c\n      return i + 1\n    }\n\n    if(c === 'x' && content.length === 1 && content[0] === '0') {\n      mode = HEX\n      content.push(c)\n      last = c\n      return i + 1\n    }\n\n    if(/[^\\d]/.test(c)) {\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function decimal() {\n    if(c === 'f') {\n      content.push(c)\n      last = c\n      i += 1\n    }\n\n    if(/[eE]/.test(c)) {\n      content.push(c)\n      last = c\n      return i + 1\n    }\n\n    if (c === '-' && /[eE]/.test(last)) {\n      content.push(c)\n      last = c\n      return i + 1\n    }\n\n    if(/[^\\d]/.test(c)) {\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n\n    content.push(c)\n    last = c\n    return i + 1\n  }\n\n  function readtoken() {\n    if(/[^\\d\\w_]/.test(c)) {\n      var contentstr = content.join('')\n      if(allLiterals.indexOf(contentstr) > -1) {\n        mode = KEYWORD\n      } else if(allBuiltins.indexOf(contentstr) > -1) {\n        mode = BUILTIN\n      } else {\n        mode = IDENT\n      }\n      token(content.join(''))\n      mode = NORMAL\n      return i\n    }\n    content.push(c)\n    last = c\n    return i + 1\n  }\n}\n\n},{\"./lib/builtins\":399,\"./lib/builtins-300es\":398,\"./lib/literals\":401,\"./lib/literals-300es\":400,\"./lib/operators\":402}],398:[function(_dereq_,module,exports){\n// 300es builtins/reserved words that were previously valid in v100\nvar v100 = _dereq_('./builtins')\n\n// The texture2D|Cube functions have been removed\n// And the gl_ features are updated\nv100 = v100.slice().filter(function (b) {\n  return !/^(gl\\_|texture)/.test(b)\n})\n\nmodule.exports = v100.concat([\n  // the updated gl_ constants\n    'gl_VertexID'\n  , 'gl_InstanceID'\n  , 'gl_Position'\n  , 'gl_PointSize'\n  , 'gl_FragCoord'\n  , 'gl_FrontFacing'\n  , 'gl_FragDepth'\n  , 'gl_PointCoord'\n  , 'gl_MaxVertexAttribs'\n  , 'gl_MaxVertexUniformVectors'\n  , 'gl_MaxVertexOutputVectors'\n  , 'gl_MaxFragmentInputVectors'\n  , 'gl_MaxVertexTextureImageUnits'\n  , 'gl_MaxCombinedTextureImageUnits'\n  , 'gl_MaxTextureImageUnits'\n  , 'gl_MaxFragmentUniformVectors'\n  , 'gl_MaxDrawBuffers'\n  , 'gl_MinProgramTexelOffset'\n  , 'gl_MaxProgramTexelOffset'\n  , 'gl_DepthRangeParameters'\n  , 'gl_DepthRange'\n\n  // other builtins\n  , 'trunc'\n  , 'round'\n  , 'roundEven'\n  , 'isnan'\n  , 'isinf'\n  , 'floatBitsToInt'\n  , 'floatBitsToUint'\n  , 'intBitsToFloat'\n  , 'uintBitsToFloat'\n  , 'packSnorm2x16'\n  , 'unpackSnorm2x16'\n  , 'packUnorm2x16'\n  , 'unpackUnorm2x16'\n  , 'packHalf2x16'\n  , 'unpackHalf2x16'\n  , 'outerProduct'\n  , 'transpose'\n  , 'determinant'\n  , 'inverse'\n  , 'texture'\n  , 'textureSize'\n  , 'textureProj'\n  , 'textureLod'\n  , 'textureOffset'\n  , 'texelFetch'\n  , 'texelFetchOffset'\n  , 'textureProjOffset'\n  , 'textureLodOffset'\n  , 'textureProjLod'\n  , 'textureProjLodOffset'\n  , 'textureGrad'\n  , 'textureGradOffset'\n  , 'textureProjGrad'\n  , 'textureProjGradOffset'\n])\n\n},{\"./builtins\":399}],399:[function(_dereq_,module,exports){\nmodule.exports = [\n  // Keep this list sorted\n  'abs'\n  , 'acos'\n  , 'all'\n  , 'any'\n  , 'asin'\n  , 'atan'\n  , 'ceil'\n  , 'clamp'\n  , 'cos'\n  , 'cross'\n  , 'dFdx'\n  , 'dFdy'\n  , 'degrees'\n  , 'distance'\n  , 'dot'\n  , 'equal'\n  , 'exp'\n  , 'exp2'\n  , 'faceforward'\n  , 'floor'\n  , 'fract'\n  , 'gl_BackColor'\n  , 'gl_BackLightModelProduct'\n  , 'gl_BackLightProduct'\n  , 'gl_BackMaterial'\n  , 'gl_BackSecondaryColor'\n  , 'gl_ClipPlane'\n  , 'gl_ClipVertex'\n  , 'gl_Color'\n  , 'gl_DepthRange'\n  , 'gl_DepthRangeParameters'\n  , 'gl_EyePlaneQ'\n  , 'gl_EyePlaneR'\n  , 'gl_EyePlaneS'\n  , 'gl_EyePlaneT'\n  , 'gl_Fog'\n  , 'gl_FogCoord'\n  , 'gl_FogFragCoord'\n  , 'gl_FogParameters'\n  , 'gl_FragColor'\n  , 'gl_FragCoord'\n  , 'gl_FragData'\n  , 'gl_FragDepth'\n  , 'gl_FragDepthEXT'\n  , 'gl_FrontColor'\n  , 'gl_FrontFacing'\n  , 'gl_FrontLightModelProduct'\n  , 'gl_FrontLightProduct'\n  , 'gl_FrontMaterial'\n  , 'gl_FrontSecondaryColor'\n  , 'gl_LightModel'\n  , 'gl_LightModelParameters'\n  , 'gl_LightModelProducts'\n  , 'gl_LightProducts'\n  , 'gl_LightSource'\n  , 'gl_LightSourceParameters'\n  , 'gl_MaterialParameters'\n  , 'gl_MaxClipPlanes'\n  , 'gl_MaxCombinedTextureImageUnits'\n  , 'gl_MaxDrawBuffers'\n  , 'gl_MaxFragmentUniformComponents'\n  , 'gl_MaxLights'\n  , 'gl_MaxTextureCoords'\n  , 'gl_MaxTextureImageUnits'\n  , 'gl_MaxTextureUnits'\n  , 'gl_MaxVaryingFloats'\n  , 'gl_MaxVertexAttribs'\n  , 'gl_MaxVertexTextureImageUnits'\n  , 'gl_MaxVertexUniformComponents'\n  , 'gl_ModelViewMatrix'\n  , 'gl_ModelViewMatrixInverse'\n  , 'gl_ModelViewMatrixInverseTranspose'\n  , 'gl_ModelViewMatrixTranspose'\n  , 'gl_ModelViewProjectionMatrix'\n  , 'gl_ModelViewProjectionMatrixInverse'\n  , 'gl_ModelViewProjectionMatrixInverseTranspose'\n  , 'gl_ModelViewProjectionMatrixTranspose'\n  , 'gl_MultiTexCoord0'\n  , 'gl_MultiTexCoord1'\n  , 'gl_MultiTexCoord2'\n  , 'gl_MultiTexCoord3'\n  , 'gl_MultiTexCoord4'\n  , 'gl_MultiTexCoord5'\n  , 'gl_MultiTexCoord6'\n  , 'gl_MultiTexCoord7'\n  , 'gl_Normal'\n  , 'gl_NormalMatrix'\n  , 'gl_NormalScale'\n  , 'gl_ObjectPlaneQ'\n  , 'gl_ObjectPlaneR'\n  , 'gl_ObjectPlaneS'\n  , 'gl_ObjectPlaneT'\n  , 'gl_Point'\n  , 'gl_PointCoord'\n  , 'gl_PointParameters'\n  , 'gl_PointSize'\n  , 'gl_Position'\n  , 'gl_ProjectionMatrix'\n  , 'gl_ProjectionMatrixInverse'\n  , 'gl_ProjectionMatrixInverseTranspose'\n  , 'gl_ProjectionMatrixTranspose'\n  , 'gl_SecondaryColor'\n  , 'gl_TexCoord'\n  , 'gl_TextureEnvColor'\n  , 'gl_TextureMatrix'\n  , 'gl_TextureMatrixInverse'\n  , 'gl_TextureMatrixInverseTranspose'\n  , 'gl_TextureMatrixTranspose'\n  , 'gl_Vertex'\n  , 'greaterThan'\n  , 'greaterThanEqual'\n  , 'inversesqrt'\n  , 'length'\n  , 'lessThan'\n  , 'lessThanEqual'\n  , 'log'\n  , 'log2'\n  , 'matrixCompMult'\n  , 'max'\n  , 'min'\n  , 'mix'\n  , 'mod'\n  , 'normalize'\n  , 'not'\n  , 'notEqual'\n  , 'pow'\n  , 'radians'\n  , 'reflect'\n  , 'refract'\n  , 'sign'\n  , 'sin'\n  , 'smoothstep'\n  , 'sqrt'\n  , 'step'\n  , 'tan'\n  , 'texture2D'\n  , 'texture2DLod'\n  , 'texture2DProj'\n  , 'texture2DProjLod'\n  , 'textureCube'\n  , 'textureCubeLod'\n  , 'texture2DLodEXT'\n  , 'texture2DProjLodEXT'\n  , 'textureCubeLodEXT'\n  , 'texture2DGradEXT'\n  , 'texture2DProjGradEXT'\n  , 'textureCubeGradEXT'\n]\n\n},{}],400:[function(_dereq_,module,exports){\nvar v100 = _dereq_('./literals')\n\nmodule.exports = v100.slice().concat([\n   'layout'\n  , 'centroid'\n  , 'smooth'\n  , 'case'\n  , 'mat2x2'\n  , 'mat2x3'\n  , 'mat2x4'\n  , 'mat3x2'\n  , 'mat3x3'\n  , 'mat3x4'\n  , 'mat4x2'\n  , 'mat4x3'\n  , 'mat4x4'\n  , 'uint'\n  , 'uvec2'\n  , 'uvec3'\n  , 'uvec4'\n  , 'samplerCubeShadow'\n  , 'sampler2DArray'\n  , 'sampler2DArrayShadow'\n  , 'isampler2D'\n  , 'isampler3D'\n  , 'isamplerCube'\n  , 'isampler2DArray'\n  , 'usampler2D'\n  , 'usampler3D'\n  , 'usamplerCube'\n  , 'usampler2DArray'\n  , 'coherent'\n  , 'restrict'\n  , 'readonly'\n  , 'writeonly'\n  , 'resource'\n  , 'atomic_uint'\n  , 'noperspective'\n  , 'patch'\n  , 'sample'\n  , 'subroutine'\n  , 'common'\n  , 'partition'\n  , 'active'\n  , 'filter'\n  , 'image1D'\n  , 'image2D'\n  , 'image3D'\n  , 'imageCube'\n  , 'iimage1D'\n  , 'iimage2D'\n  , 'iimage3D'\n  , 'iimageCube'\n  , 'uimage1D'\n  , 'uimage2D'\n  , 'uimage3D'\n  , 'uimageCube'\n  , 'image1DArray'\n  , 'image2DArray'\n  , 'iimage1DArray'\n  , 'iimage2DArray'\n  , 'uimage1DArray'\n  , 'uimage2DArray'\n  , 'image1DShadow'\n  , 'image2DShadow'\n  , 'image1DArrayShadow'\n  , 'image2DArrayShadow'\n  , 'imageBuffer'\n  , 'iimageBuffer'\n  , 'uimageBuffer'\n  , 'sampler1DArray'\n  , 'sampler1DArrayShadow'\n  , 'isampler1D'\n  , 'isampler1DArray'\n  , 'usampler1D'\n  , 'usampler1DArray'\n  , 'isampler2DRect'\n  , 'usampler2DRect'\n  , 'samplerBuffer'\n  , 'isamplerBuffer'\n  , 'usamplerBuffer'\n  , 'sampler2DMS'\n  , 'isampler2DMS'\n  , 'usampler2DMS'\n  , 'sampler2DMSArray'\n  , 'isampler2DMSArray'\n  , 'usampler2DMSArray'\n])\n\n},{\"./literals\":401}],401:[function(_dereq_,module,exports){\nmodule.exports = [\n  // current\n    'precision'\n  , 'highp'\n  , 'mediump'\n  , 'lowp'\n  , 'attribute'\n  , 'const'\n  , 'uniform'\n  , 'varying'\n  , 'break'\n  , 'continue'\n  , 'do'\n  , 'for'\n  , 'while'\n  , 'if'\n  , 'else'\n  , 'in'\n  , 'out'\n  , 'inout'\n  , 'float'\n  , 'int'\n  , 'void'\n  , 'bool'\n  , 'true'\n  , 'false'\n  , 'discard'\n  , 'return'\n  , 'mat2'\n  , 'mat3'\n  , 'mat4'\n  , 'vec2'\n  , 'vec3'\n  , 'vec4'\n  , 'ivec2'\n  , 'ivec3'\n  , 'ivec4'\n  , 'bvec2'\n  , 'bvec3'\n  , 'bvec4'\n  , 'sampler1D'\n  , 'sampler2D'\n  , 'sampler3D'\n  , 'samplerCube'\n  , 'sampler1DShadow'\n  , 'sampler2DShadow'\n  , 'struct'\n\n  // future\n  , 'asm'\n  , 'class'\n  , 'union'\n  , 'enum'\n  , 'typedef'\n  , 'template'\n  , 'this'\n  , 'packed'\n  , 'goto'\n  , 'switch'\n  , 'default'\n  , 'inline'\n  , 'noinline'\n  , 'volatile'\n  , 'public'\n  , 'static'\n  , 'extern'\n  , 'external'\n  , 'interface'\n  , 'long'\n  , 'short'\n  , 'double'\n  , 'half'\n  , 'fixed'\n  , 'unsigned'\n  , 'input'\n  , 'output'\n  , 'hvec2'\n  , 'hvec3'\n  , 'hvec4'\n  , 'dvec2'\n  , 'dvec3'\n  , 'dvec4'\n  , 'fvec2'\n  , 'fvec3'\n  , 'fvec4'\n  , 'sampler2DRect'\n  , 'sampler3DRect'\n  , 'sampler2DRectShadow'\n  , 'sizeof'\n  , 'cast'\n  , 'namespace'\n  , 'using'\n]\n\n},{}],402:[function(_dereq_,module,exports){\nmodule.exports = [\n    '<<='\n  , '>>='\n  , '++'\n  , '--'\n  , '<<'\n  , '>>'\n  , '<='\n  , '>='\n  , '=='\n  , '!='\n  , '&&'\n  , '||'\n  , '+='\n  , '-='\n  , '*='\n  , '/='\n  , '%='\n  , '&='\n  , '^^'\n  , '^='\n  , '|='\n  , '('\n  , ')'\n  , '['\n  , ']'\n  , '.'\n  , '!'\n  , '~'\n  , '*'\n  , '/'\n  , '%'\n  , '+'\n  , '-'\n  , '<'\n  , '>'\n  , '&'\n  , '^'\n  , '|'\n  , '?'\n  , ':'\n  , '='\n  , ','\n  , ';'\n  , '{'\n  , '}'\n]\n\n},{}],403:[function(_dereq_,module,exports){\nvar tokenize = _dereq_('./index')\n\nmodule.exports = tokenizeString\n\nfunction tokenizeString(str, opt) {\n  var generator = tokenize(opt)\n  var tokens = []\n\n  tokens = tokens.concat(generator(str))\n  tokens = tokens.concat(generator(null))\n\n  return tokens\n}\n\n},{\"./index\":397}],404:[function(_dereq_,module,exports){\nmodule.exports = function(strings) {\r\n  if (typeof strings === 'string') strings = [strings]\r\n  var exprs = [].slice.call(arguments,1)\r\n  var parts = []\r\n  for (var i = 0; i < strings.length-1; i++) {\r\n    parts.push(strings[i], exprs[i] || '')\r\n  }\r\n  parts.push(strings[i])\r\n  return parts.join('')\r\n}\r\n\n},{}],405:[function(_dereq_,module,exports){\n(function (global){\n'use strict'\r\n\r\nvar isBrowser = _dereq_('is-browser')\r\nvar hasHover\r\n\r\nif (typeof global.matchMedia === 'function') {\r\n\thasHover = !global.matchMedia('(hover: none)').matches\r\n}\r\nelse {\r\n\thasHover = isBrowser\r\n}\r\n\r\nmodule.exports = hasHover\r\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"is-browser\":412}],406:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar isBrowser = _dereq_('is-browser')\r\n\r\nfunction detect() {\r\n\tvar supported = false\r\n\r\n\ttry {\r\n\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\tget: function() {\r\n\t\t\t\tsupported = true\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\twindow.addEventListener('test', null, opts)\r\n\t\twindow.removeEventListener('test', null, opts)\r\n\t} catch(e) {\r\n\t\tsupported = false\r\n\t}\r\n\r\n\treturn supported\r\n}\r\n\r\nmodule.exports = isBrowser && detect()\r\n\n},{\"is-browser\":412}],407:[function(_dereq_,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n\n},{}],408:[function(_dereq_,module,exports){\n\"use strict\"\n\n//High level idea:\n// 1. Use Clarkson's incremental construction to find convex hull\n// 2. Point location in triangulation by jump and walk\n\nmodule.exports = incrementalConvexHull\n\nvar orient = _dereq_(\"robust-orientation\")\nvar compareCell = _dereq_(\"simplicial-complex\").compareCells\n\nfunction compareInt(a, b) {\n  return a - b\n}\n\nfunction Simplex(vertices, adjacent, boundary) {\n  this.vertices = vertices\n  this.adjacent = adjacent\n  this.boundary = boundary\n  this.lastVisited = -1\n}\n\nSimplex.prototype.flip = function() {\n  var t = this.vertices[0]\n  this.vertices[0] = this.vertices[1]\n  this.vertices[1] = t\n  var u = this.adjacent[0]\n  this.adjacent[0] = this.adjacent[1]\n  this.adjacent[1] = u\n}\n\nfunction GlueFacet(vertices, cell, index) {\n  this.vertices = vertices\n  this.cell = cell\n  this.index = index\n}\n\nfunction compareGlue(a, b) {\n  return compareCell(a.vertices, b.vertices)\n}\n\nfunction bakeOrient(d) {\n  var code = [\"function orient(){var tuple=this.tuple;return test(\"]\n  for(var i=0; i<=d; ++i) {\n    if(i > 0) {\n      code.push(\",\")\n    }\n    code.push(\"tuple[\", i, \"]\")\n  }\n  code.push(\")}return orient\")\n  var proc = new Function(\"test\", code.join(\"\"))\n  var test = orient[d+1]\n  if(!test) {\n    test = orient\n  }\n  return proc(test)\n}\n\nvar BAKED = []\n\nfunction Triangulation(dimension, vertices, simplices) {\n  this.dimension = dimension\n  this.vertices = vertices\n  this.simplices = simplices\n  this.interior = simplices.filter(function(c) {\n    return !c.boundary\n  })\n\n  this.tuple = new Array(dimension+1)\n  for(var i=0; i<=dimension; ++i) {\n    this.tuple[i] = this.vertices[i]\n  }\n\n  var o = BAKED[dimension]\n  if(!o) {\n    o = BAKED[dimension] = bakeOrient(dimension)\n  }\n  this.orient = o\n}\n\nvar proto = Triangulation.prototype\n\n//Degenerate situation where we are on boundary, but coplanar to face\nproto.handleBoundaryDegeneracy = function(cell, point) {\n  var d = this.dimension\n  var n = this.vertices.length - 1\n  var tuple = this.tuple\n  var verts = this.vertices\n\n  //Dumb solution: Just do dfs from boundary cell until we find any peak, or terminate\n  var toVisit = [ cell ]\n  cell.lastVisited = -n\n  while(toVisit.length > 0) {\n    cell = toVisit.pop()\n    var cellVerts = cell.vertices\n    var cellAdj = cell.adjacent\n    for(var i=0; i<=d; ++i) {\n      var neighbor = cellAdj[i]\n      if(!neighbor.boundary || neighbor.lastVisited <= -n) {\n        continue\n      }\n      var nv = neighbor.vertices\n      for(var j=0; j<=d; ++j) {\n        var vv = nv[j]\n        if(vv < 0) {\n          tuple[j] = point\n        } else {\n          tuple[j] = verts[vv]\n        }\n      }\n      var o = this.orient()\n      if(o > 0) {\n        return neighbor\n      }\n      neighbor.lastVisited = -n\n      if(o === 0) {\n        toVisit.push(neighbor)\n      }\n    }\n  }\n  return null\n}\n\nproto.walk = function(point, random) {\n  //Alias local properties\n  var n = this.vertices.length - 1\n  var d = this.dimension\n  var verts = this.vertices\n  var tuple = this.tuple\n\n  //Compute initial jump cell\n  var initIndex = random ? (this.interior.length * Math.random())|0 : (this.interior.length-1)\n  var cell = this.interior[ initIndex ]\n\n  //Start walking\nouterLoop:\n  while(!cell.boundary) {\n    var cellVerts = cell.vertices\n    var cellAdj = cell.adjacent\n\n    for(var i=0; i<=d; ++i) {\n      tuple[i] = verts[cellVerts[i]]\n    }\n    cell.lastVisited = n\n\n    //Find farthest adjacent cell\n    for(var i=0; i<=d; ++i) {\n      var neighbor = cellAdj[i]\n      if(neighbor.lastVisited >= n) {\n        continue\n      }\n      var prev = tuple[i]\n      tuple[i] = point\n      var o = this.orient()\n      tuple[i] = prev\n      if(o < 0) {\n        cell = neighbor\n        continue outerLoop\n      } else {\n        if(!neighbor.boundary) {\n          neighbor.lastVisited = n\n        } else {\n          neighbor.lastVisited = -n\n        }\n      }\n    }\n    return\n  }\n\n  return cell\n}\n\nproto.addPeaks = function(point, cell) {\n  var n = this.vertices.length - 1\n  var d = this.dimension\n  var verts = this.vertices\n  var tuple = this.tuple\n  var interior = this.interior\n  var simplices = this.simplices\n\n  //Walking finished at boundary, time to add peaks\n  var tovisit = [ cell ]\n\n  //Stretch initial boundary cell into a peak\n  cell.lastVisited = n\n  cell.vertices[cell.vertices.indexOf(-1)] = n\n  cell.boundary = false\n  interior.push(cell)\n\n  //Record a list of all new boundaries created by added peaks so we can glue them together when we are all done\n  var glueFacets = []\n\n  //Do a traversal of the boundary walking outward from starting peak\n  while(tovisit.length > 0) {\n    //Pop off peak and walk over adjacent cells\n    var cell = tovisit.pop()\n    var cellVerts = cell.vertices\n    var cellAdj = cell.adjacent\n    var indexOfN = cellVerts.indexOf(n)\n    if(indexOfN < 0) {\n      continue\n    }\n\n    for(var i=0; i<=d; ++i) {\n      if(i === indexOfN) {\n        continue\n      }\n\n      //For each boundary neighbor of the cell\n      var neighbor = cellAdj[i]\n      if(!neighbor.boundary || neighbor.lastVisited >= n) {\n        continue\n      }\n\n      var nv = neighbor.vertices\n\n      //Test if neighbor is a peak\n      if(neighbor.lastVisited !== -n) {      \n        //Compute orientation of p relative to each boundary peak\n        var indexOfNeg1 = 0\n        for(var j=0; j<=d; ++j) {\n          if(nv[j] < 0) {\n            indexOfNeg1 = j\n            tuple[j] = point\n          } else {\n            tuple[j] = verts[nv[j]]\n          }\n        }\n        var o = this.orient()\n\n        //Test if neighbor cell is also a peak\n        if(o > 0) {\n          nv[indexOfNeg1] = n\n          neighbor.boundary = false\n          interior.push(neighbor)\n          tovisit.push(neighbor)\n          neighbor.lastVisited = n\n          continue\n        } else {\n          neighbor.lastVisited = -n\n        }\n      }\n\n      var na = neighbor.adjacent\n\n      //Otherwise, replace neighbor with new face\n      var vverts = cellVerts.slice()\n      var vadj = cellAdj.slice()\n      var ncell = new Simplex(vverts, vadj, true)\n      simplices.push(ncell)\n\n      //Connect to neighbor\n      var opposite = na.indexOf(cell)\n      if(opposite < 0) {\n        continue\n      }\n      na[opposite] = ncell\n      vadj[indexOfN] = neighbor\n\n      //Connect to cell\n      vverts[i] = -1\n      vadj[i] = cell\n      cellAdj[i] = ncell\n\n      //Flip facet\n      ncell.flip()\n\n      //Add to glue list\n      for(var j=0; j<=d; ++j) {\n        var uu = vverts[j]\n        if(uu < 0 || uu === n) {\n          continue\n        }\n        var nface = new Array(d-1)\n        var nptr = 0\n        for(var k=0; k<=d; ++k) {\n          var vv = vverts[k]\n          if(vv < 0 || k === j) {\n            continue\n          }\n          nface[nptr++] = vv\n        }\n        glueFacets.push(new GlueFacet(nface, ncell, j))\n      }\n    }\n  }\n\n  //Glue boundary facets together\n  glueFacets.sort(compareGlue)\n\n  for(var i=0; i+1<glueFacets.length; i+=2) {\n    var a = glueFacets[i]\n    var b = glueFacets[i+1]\n    var ai = a.index\n    var bi = b.index\n    if(ai < 0 || bi < 0) {\n      continue\n    }\n    a.cell.adjacent[a.index] = b.cell\n    b.cell.adjacent[b.index] = a.cell\n  }\n}\n\nproto.insert = function(point, random) {\n  //Add point\n  var verts = this.vertices\n  verts.push(point)\n\n  var cell = this.walk(point, random)\n  if(!cell) {\n    return\n  }\n\n  //Alias local properties\n  var d = this.dimension\n  var tuple = this.tuple\n\n  //Degenerate case: If point is coplanar to cell, then walk until we find a non-degenerate boundary\n  for(var i=0; i<=d; ++i) {\n    var vv = cell.vertices[i]\n    if(vv < 0) {\n      tuple[i] = point\n    } else {\n      tuple[i] = verts[vv]\n    }\n  }\n  var o = this.orient(tuple)\n  if(o < 0) {\n    return\n  } else if(o === 0) {\n    cell = this.handleBoundaryDegeneracy(cell, point)\n    if(!cell) {\n      return\n    }\n  }\n\n  //Add peaks\n  this.addPeaks(point, cell)\n}\n\n//Extract all boundary cells\nproto.boundary = function() {\n  var d = this.dimension\n  var boundary = []\n  var cells = this.simplices\n  var nc = cells.length\n  for(var i=0; i<nc; ++i) {\n    var c = cells[i]\n    if(c.boundary) {\n      var bcell = new Array(d)\n      var cv = c.vertices\n      var ptr = 0\n      var parity = 0\n      for(var j=0; j<=d; ++j) {\n        if(cv[j] >= 0) {\n          bcell[ptr++] = cv[j]\n        } else {\n          parity = j&1\n        }\n      }\n      if(parity === (d&1)) {\n        var t = bcell[0]\n        bcell[0] = bcell[1]\n        bcell[1] = t\n      }\n      boundary.push(bcell)\n    }\n  }\n  return boundary\n}\n\nfunction incrementalConvexHull(points, randomSearch) {\n  var n = points.length\n  if(n === 0) {\n    throw new Error(\"Must have at least d+1 points\")\n  }\n  var d = points[0].length\n  if(n <= d) {\n    throw new Error(\"Must input at least d+1 points\")\n  }\n\n  //FIXME: This could be degenerate, but need to select d+1 non-coplanar points to bootstrap process\n  var initialSimplex = points.slice(0, d+1)\n\n  //Make sure initial simplex is positively oriented\n  var o = orient.apply(void 0, initialSimplex)\n  if(o === 0) {\n    throw new Error(\"Input not in general position\")\n  }\n  var initialCoords = new Array(d+1)\n  for(var i=0; i<=d; ++i) {\n    initialCoords[i] = i\n  }\n  if(o < 0) {\n    initialCoords[0] = 1\n    initialCoords[1] = 0\n  }\n\n  //Create initial topological index, glue pointers together (kind of messy)\n  var initialCell = new Simplex(initialCoords, new Array(d+1), false)\n  var boundary = initialCell.adjacent\n  var list = new Array(d+2)\n  for(var i=0; i<=d; ++i) {\n    var verts = initialCoords.slice()\n    for(var j=0; j<=d; ++j) {\n      if(j === i) {\n        verts[j] = -1\n      }\n    }\n    var t = verts[0]\n    verts[0] = verts[1]\n    verts[1] = t\n    var cell = new Simplex(verts, new Array(d+1), true)\n    boundary[i] = cell\n    list[i] = cell\n  }\n  list[d+1] = initialCell\n  for(var i=0; i<=d; ++i) {\n    var verts = boundary[i].vertices\n    var adj = boundary[i].adjacent\n    for(var j=0; j<=d; ++j) {\n      var v = verts[j]\n      if(v < 0) {\n        adj[j] = initialCell\n        continue\n      }\n      for(var k=0; k<=d; ++k) {\n        if(boundary[k].vertices.indexOf(v) < 0) {\n          adj[j] = boundary[k]\n        }\n      }\n    }\n  }\n\n  //Initialize triangles\n  var triangles = new Triangulation(d, initialSimplex, list)\n\n  //Insert remaining points\n  var useRandom = !!randomSearch\n  for(var i=d+1; i<n; ++i) {\n    triangles.insert(points[i], useRandom)\n  }\n  \n  //Extract boundary cells\n  return triangles.boundary()\n}\n},{\"robust-orientation\":497,\"simplicial-complex\":507}],409:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar bounds = _dereq_(\"binary-search-bounds\")\n\nvar NOT_FOUND = 0\nvar SUCCESS = 1\nvar EMPTY = 2\n\nmodule.exports = createWrapper\n\nfunction IntervalTreeNode(mid, left, right, leftPoints, rightPoints) {\n  this.mid = mid\n  this.left = left\n  this.right = right\n  this.leftPoints = leftPoints\n  this.rightPoints = rightPoints\n  this.count = (left ? left.count : 0) + (right ? right.count : 0) + leftPoints.length\n}\n\nvar proto = IntervalTreeNode.prototype\n\nfunction copy(a, b) {\n  a.mid = b.mid\n  a.left = b.left\n  a.right = b.right\n  a.leftPoints = b.leftPoints\n  a.rightPoints = b.rightPoints\n  a.count = b.count\n}\n\nfunction rebuild(node, intervals) {\n  var ntree = createIntervalTree(intervals)\n  node.mid = ntree.mid\n  node.left = ntree.left\n  node.right = ntree.right\n  node.leftPoints = ntree.leftPoints\n  node.rightPoints = ntree.rightPoints\n  node.count = ntree.count\n}\n\nfunction rebuildWithInterval(node, interval) {\n  var intervals = node.intervals([])\n  intervals.push(interval)\n  rebuild(node, intervals)    \n}\n\nfunction rebuildWithoutInterval(node, interval) {\n  var intervals = node.intervals([])\n  var idx = intervals.indexOf(interval)\n  if(idx < 0) {\n    return NOT_FOUND\n  }\n  intervals.splice(idx, 1)\n  rebuild(node, intervals)\n  return SUCCESS\n}\n\nproto.intervals = function(result) {\n  result.push.apply(result, this.leftPoints)\n  if(this.left) {\n    this.left.intervals(result)\n  }\n  if(this.right) {\n    this.right.intervals(result)\n  }\n  return result\n}\n\nproto.insert = function(interval) {\n  var weight = this.count - this.leftPoints.length\n  this.count += 1\n  if(interval[1] < this.mid) {\n    if(this.left) {\n      if(4*(this.left.count+1) > 3*(weight+1)) {\n        rebuildWithInterval(this, interval)\n      } else {\n        this.left.insert(interval)\n      }\n    } else {\n      this.left = createIntervalTree([interval])\n    }\n  } else if(interval[0] > this.mid) {\n    if(this.right) {\n      if(4*(this.right.count+1) > 3*(weight+1)) {\n        rebuildWithInterval(this, interval)\n      } else {\n        this.right.insert(interval)\n      }\n    } else {\n      this.right = createIntervalTree([interval])\n    }\n  } else {\n    var l = bounds.ge(this.leftPoints, interval, compareBegin)\n    var r = bounds.ge(this.rightPoints, interval, compareEnd)\n    this.leftPoints.splice(l, 0, interval)\n    this.rightPoints.splice(r, 0, interval)\n  }\n}\n\nproto.remove = function(interval) {\n  var weight = this.count - this.leftPoints\n  if(interval[1] < this.mid) {\n    if(!this.left) {\n      return NOT_FOUND\n    }\n    var rw = this.right ? this.right.count : 0\n    if(4 * rw > 3 * (weight-1)) {\n      return rebuildWithoutInterval(this, interval)\n    }\n    var r = this.left.remove(interval)\n    if(r === EMPTY) {\n      this.left = null\n      this.count -= 1\n      return SUCCESS\n    } else if(r === SUCCESS) {\n      this.count -= 1\n    }\n    return r\n  } else if(interval[0] > this.mid) {\n    if(!this.right) {\n      return NOT_FOUND\n    }\n    var lw = this.left ? this.left.count : 0\n    if(4 * lw > 3 * (weight-1)) {\n      return rebuildWithoutInterval(this, interval)\n    }\n    var r = this.right.remove(interval)\n    if(r === EMPTY) {\n      this.right = null\n      this.count -= 1\n      return SUCCESS\n    } else if(r === SUCCESS) {\n      this.count -= 1\n    }\n    return r\n  } else {\n    if(this.count === 1) {\n      if(this.leftPoints[0] === interval) {\n        return EMPTY\n      } else {\n        return NOT_FOUND\n      }\n    }\n    if(this.leftPoints.length === 1 && this.leftPoints[0] === interval) {\n      if(this.left && this.right) {\n        var p = this\n        var n = this.left\n        while(n.right) {\n          p = n\n          n = n.right\n        }\n        if(p === this) {\n          n.right = this.right\n        } else {\n          var l = this.left\n          var r = this.right\n          p.count -= n.count\n          p.right = n.left\n          n.left = l\n          n.right = r\n        }\n        copy(this, n)\n        this.count = (this.left?this.left.count:0) + (this.right?this.right.count:0) + this.leftPoints.length\n      } else if(this.left) {\n        copy(this, this.left)\n      } else {\n        copy(this, this.right)\n      }\n      return SUCCESS\n    }\n    for(var l = bounds.ge(this.leftPoints, interval, compareBegin); l<this.leftPoints.length; ++l) {\n      if(this.leftPoints[l][0] !== interval[0]) {\n        break\n      }\n      if(this.leftPoints[l] === interval) {\n        this.count -= 1\n        this.leftPoints.splice(l, 1)\n        for(var r = bounds.ge(this.rightPoints, interval, compareEnd); r<this.rightPoints.length; ++r) {\n          if(this.rightPoints[r][1] !== interval[1]) {\n            break\n          } else if(this.rightPoints[r] === interval) {\n            this.rightPoints.splice(r, 1)\n            return SUCCESS\n          }\n        }\n      }\n    }\n    return NOT_FOUND\n  }\n}\n\nfunction reportLeftRange(arr, hi, cb) {\n  for(var i=0; i<arr.length && arr[i][0] <= hi; ++i) {\n    var r = cb(arr[i])\n    if(r) { return r }\n  }\n}\n\nfunction reportRightRange(arr, lo, cb) {\n  for(var i=arr.length-1; i>=0 && arr[i][1] >= lo; --i) {\n    var r = cb(arr[i])\n    if(r) { return r }\n  }\n}\n\nfunction reportRange(arr, cb) {\n  for(var i=0; i<arr.length; ++i) {\n    var r = cb(arr[i])\n    if(r) { return r }\n  }\n}\n\nproto.queryPoint = function(x, cb) {\n  if(x < this.mid) {\n    if(this.left) {\n      var r = this.left.queryPoint(x, cb)\n      if(r) { return r }\n    }\n    return reportLeftRange(this.leftPoints, x, cb)\n  } else if(x > this.mid) {\n    if(this.right) {\n      var r = this.right.queryPoint(x, cb)\n      if(r) { return r }\n    }\n    return reportRightRange(this.rightPoints, x, cb)\n  } else {\n    return reportRange(this.leftPoints, cb)\n  }\n}\n\nproto.queryInterval = function(lo, hi, cb) {\n  if(lo < this.mid && this.left) {\n    var r = this.left.queryInterval(lo, hi, cb)\n    if(r) { return r }\n  }\n  if(hi > this.mid && this.right) {\n    var r = this.right.queryInterval(lo, hi, cb)\n    if(r) { return r }\n  }\n  if(hi < this.mid) {\n    return reportLeftRange(this.leftPoints, hi, cb)\n  } else if(lo > this.mid) {\n    return reportRightRange(this.rightPoints, lo, cb)\n  } else {\n    return reportRange(this.leftPoints, cb)\n  }\n}\n\nfunction compareNumbers(a, b) {\n  return a - b\n}\n\nfunction compareBegin(a, b) {\n  var d = a[0] - b[0]\n  if(d) { return d }\n  return a[1] - b[1]\n}\n\nfunction compareEnd(a, b) {\n  var d = a[1] - b[1]\n  if(d) { return d }\n  return a[0] - b[0]\n}\n\nfunction createIntervalTree(intervals) {\n  if(intervals.length === 0) {\n    return null\n  }\n  var pts = []\n  for(var i=0; i<intervals.length; ++i) {\n    pts.push(intervals[i][0], intervals[i][1])\n  }\n  pts.sort(compareNumbers)\n\n  var mid = pts[pts.length>>1]\n\n  var leftIntervals = []\n  var rightIntervals = []\n  var centerIntervals = []\n  for(var i=0; i<intervals.length; ++i) {\n    var s = intervals[i]\n    if(s[1] < mid) {\n      leftIntervals.push(s)\n    } else if(mid < s[0]) {\n      rightIntervals.push(s)\n    } else {\n      centerIntervals.push(s)\n    }\n  }\n\n  //Split center intervals\n  var leftPoints = centerIntervals\n  var rightPoints = centerIntervals.slice()\n  leftPoints.sort(compareBegin)\n  rightPoints.sort(compareEnd)\n\n  return new IntervalTreeNode(mid, \n    createIntervalTree(leftIntervals),\n    createIntervalTree(rightIntervals),\n    leftPoints,\n    rightPoints)\n}\n\n//User friendly wrapper that makes it possible to support empty trees\nfunction IntervalTree(root) {\n  this.root = root\n}\n\nvar tproto = IntervalTree.prototype\n\ntproto.insert = function(interval) {\n  if(this.root) {\n    this.root.insert(interval)\n  } else {\n    this.root = new IntervalTreeNode(interval[0], null, null, [interval], [interval])\n  }\n}\n\ntproto.remove = function(interval) {\n  if(this.root) {\n    var r = this.root.remove(interval)\n    if(r === EMPTY) {\n      this.root = null\n    }\n    return r !== NOT_FOUND\n  }\n  return false\n}\n\ntproto.queryPoint = function(p, cb) {\n  if(this.root) {\n    return this.root.queryPoint(p, cb)\n  }\n}\n\ntproto.queryInterval = function(lo, hi, cb) {\n  if(lo <= hi && this.root) {\n    return this.root.queryInterval(lo, hi, cb)\n  }\n}\n\nObject.defineProperty(tproto, \"count\", {\n  get: function() {\n    if(this.root) {\n      return this.root.count\n    }\n    return 0\n  }\n})\n\nObject.defineProperty(tproto, \"intervals\", {\n  get: function() {\n    if(this.root) {\n      return this.root.intervals([])\n    }\n    return []\n  }\n})\n\nfunction createWrapper(intervals) {\n  if(!intervals || intervals.length === 0) {\n    return new IntervalTree(null)\n  }\n  return new IntervalTree(createIntervalTree(intervals))\n}\n\n},{\"binary-search-bounds\":84}],410:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction invertPermutation(pi, result) {\n  result = result || new Array(pi.length)\n  for(var i=0; i<pi.length; ++i) {\n    result[pi[i]] = i\n  }\n  return result\n}\n\nmodule.exports = invertPermutation\n},{}],411:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction iota(n) {\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = i\n  }\n  return result\n}\n\nmodule.exports = iota\n},{}],412:[function(_dereq_,module,exports){\nmodule.exports = true;\n},{}],413:[function(_dereq_,module,exports){\n/*!\n * Determine if an object is a Buffer\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n  return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n},{}],414:[function(_dereq_,module,exports){\n'use strict';\nmodule.exports = typeof navigator !== 'undefined' &&\n\t(/MSIE/.test(navigator.userAgent) || /Trident\\//.test(navigator.appVersion));\n\n},{}],415:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = isMobile;\nmodule.exports.isMobile = isMobile;\n\nvar mobileRE = /(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;\n\nvar tabletRE = /(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|android|ipad|playbook|silk/i;\n\nfunction isMobile (opts) {\n  if (!opts) opts = {}\n  var ua = opts.ua\n  if (!ua && typeof navigator !== 'undefined') ua = navigator.userAgent;\n  if (ua && ua.headers && typeof ua.headers['user-agent'] === 'string') {\n    ua = ua.headers['user-agent'];\n  }\n  if (typeof ua !== 'string') return false;\n\n  return opts.tablet\n    ? tabletRE.test(ua)\n    : mobileRE.test(ua);\n}\n\n},{}],416:[function(_dereq_,module,exports){\n'use strict';\nmodule.exports = function (x) {\n\tvar type = typeof x;\n\treturn x !== null && (type === 'object' || type === 'function');\n};\n\n},{}],417:[function(_dereq_,module,exports){\n'use strict';\nvar toString = Object.prototype.toString;\n\nmodule.exports = function (x) {\n\tvar prototype;\n\treturn toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));\n};\n\n},{}],418:[function(_dereq_,module,exports){\n'use strict';\r\n\r\n/**\r\n * Is this string all whitespace?\r\n * This solution kind of makes my brain hurt, but it's significantly faster\r\n * than !str.trim() or any other solution I could find.\r\n *\r\n * whitespace codes from: http://en.wikipedia.org/wiki/Whitespace_character\r\n * and verified with:\r\n *\r\n *  for(var i = 0; i < 65536; i++) {\r\n *      var s = String.fromCharCode(i);\r\n *      if(+s===0 && !s.trim()) console.log(i, s);\r\n *  }\r\n *\r\n * which counts a couple of these as *not* whitespace, but finds nothing else\r\n * that *is* whitespace. Note that charCodeAt stops at 16 bits, but it appears\r\n * that there are no whitespace characters above this, and code points above\r\n * this do not map onto white space characters.\r\n */\r\n\r\nmodule.exports = function(str){\r\n    var l = str.length,\r\n        a;\r\n    for(var i = 0; i < l; i++) {\r\n        a = str.charCodeAt(i);\r\n        if((a < 9 || a > 13) && (a !== 32) && (a !== 133) && (a !== 160) &&\r\n            (a !== 5760) && (a !== 6158) && (a < 8192 || a > 8205) &&\r\n            (a !== 8232) && (a !== 8233) && (a !== 8239) && (a !== 8287) &&\r\n            (a !== 8288) && (a !== 12288) && (a !== 65279)) {\r\n                return false;\r\n        }\r\n    }\r\n    return true;\r\n}\r\n\n},{}],419:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = function isPath(str) {\r\n\tif (typeof str !== 'string') return false\r\n\r\n\tstr = str.trim()\r\n\r\n\t// https://www.w3.org/TR/SVG/paths.html#PathDataBNF\r\n\tif (/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(str) && /[\\dz]$/i.test(str) && str.length > 4) return true\r\n\r\n\treturn false\r\n}\r\n\n},{}],420:[function(_dereq_,module,exports){\nfunction lerp(v0, v1, t) {\n    return v0*(1-t)+v1*t\n}\nmodule.exports = lerp\n},{}],421:[function(_dereq_,module,exports){\n(function (global){\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.mapboxgl = factory());\n}(this, (function () { 'use strict';\n\n/* eslint-disable */\n\nvar shared, worker, mapboxgl;\n// define gets called three times: one for each chunk. we rely on the order\n// they're imported to know which is which\nfunction define(_, chunk) {\nif (!shared) {\n    shared = chunk;\n} else if (!worker) {\n    worker = chunk;\n} else {\n    var workerBundleString = 'var sharedChunk = {}; (' + shared + ')(sharedChunk); (' + worker + ')(sharedChunk);'\n\n    var sharedChunk = {};\n    shared(sharedChunk);\n    mapboxgl = chunk(sharedChunk);\n    mapboxgl.workerUrl = window.URL.createObjectURL(new Blob([workerBundleString], { type: 'text/javascript' }));\n}\n}\n\n\ndefine([\"exports\"],function(t){\"use strict\";var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o;function o(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;}o.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},o.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},o.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},o.prototype.solveCurveX=function(t,e){var r,n,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s;}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?r=i:n=i,i=.5*(n-r)+r;}return i},o.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=function(t,e,r){this.column=t,this.row=e,this.zoom=r;};a.prototype.clone=function(){return new a(this.column,this.row,this.zoom)},a.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},a.prototype.sub=function(t){return this.clone()._sub(t)},a.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},a.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var s=u;function u(t,e){this.x=t,this.y=e;}function l(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}}u.prototype={clone:function(){return new u(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(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)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},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},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,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},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(t){return t instanceof u?t:Array.isArray(t)?new u(t[0],t[1]):t};var p=l(.25,.1,.25,1);function c(t,e,r){return Math.min(r,Math.max(e,t))}function h(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a];}return t}var f=1;function y(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e));});}function d(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function m(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function g(t){return Array.isArray(t)?t.map(g):\"object\"==typeof t&&t?v(t,g):t}var x={};function b(t){x[t]||(\"undefined\"!=typeof console&&console.warn(t),x[t]=!0);}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function _(t){for(var e=0,r=0,n=t.length,i=n-1,o=void 0,a=void 0;r<n;i=r++)o=t[r],e+=((a=t[i]).x-o.x)*(o.y+a.y);return e}var A={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(A);var k=function(t){function e(e,r,n){t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e;}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+\": \"+this.message+\" (\"+this.status+\"): \"+this.url},e}(Error);function z(t){var e=new self.XMLHttpRequest;for(var r in e.open(\"GET\",t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials=\"include\"===t.credentials,e}var S=function(t,e){var r=z(t);return r.responseType=\"arraybuffer\",r.onerror=function(){e(new Error(r.statusText));},r.onload=function(){var n=r.response;if(0===n.byteLength&&200===r.status)return e(new Error(\"http status 200 returned without content.\"));r.status>=200&&r.status<300&&r.response?e(null,{data:n,cacheControl:r.getResponseHeader(\"Cache-Control\"),expires:r.getResponseHeader(\"Expires\")}):e(new k(r.statusText,r.status,t.url));},r.send(),r};function M(t,e,r){r[t]=r[t]||[],r[t].push(e);}function V(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1);}}var B=function(t,e){void 0===e&&(e={}),h(this,e),this.type=t;},C=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,\"error\",h({error:e},r));}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(B),I=function(){};I.prototype.on=function(t,e){return this._listeners=this._listeners||{},M(t,e,this._listeners),this},I.prototype.off=function(t,e){return V(t,e,this._listeners),V(t,e,this._oneTimeListeners),this},I.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},M(t,e,this._oneTimeListeners),this},I.prototype.fire=function(t){\"string\"==typeof t&&(t=new B(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,n=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];r<n.length;r+=1){n[r].call(this,t);}for(var i=0,o=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i<o.length;i+=1){var a=o[i];V(e,a,this._oneTimeListeners),a.call(this,t);}var s=this._eventedParent;s&&(h(t,\"function\"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t));}else d(e,\"error\")?console.error(t&&t.error||t||\"Empty error event\"):d(e,\"warning\")&&console.warn(t&&t.warning||t||\"Empty warning event\");return this},I.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},I.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var E={$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\"},light:{type:\"light\"},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_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],source_vector:{type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},\"*\":{type:\"*\"}},source_raster:{type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},\"*\":{type:\"*\"}},source_raster_dem:{type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{}},default:\"mapbox\"},\"*\":{type:\"*\"}},source_geojson:{type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{type:\"*\"},maxzoom:{type:\"number\",default:18},buffer:{type:\"number\",default:128,maximum:512,minimum:0},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},lineMetrics:{type:\"boolean\",default:!1}},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:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},layout:[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],layout_background:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_fill:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_circle:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_line:{\"line-cap\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-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,requires:[{\"line-join\":\"miter\"}]},\"line-round-limit\":{type:\"number\",default:1.05,function:\"interpolated\",\"zoom-function\":!0,requires:[{\"line-join\":\"round\"}]},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{point:{},line:{}},default:\"point\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,function:\"interpolated\",\"zoom-function\":!0,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}]},\"symbol-avoid-edges\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1},\"icon-allow-overlap\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1,requires:[\"icon-image\"]},\"icon-ignore-placement\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1,requires:[\"icon-image\"]},\"icon-optional\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1,requires:[\"icon-image\",\"text-field\"]},\"icon-rotation-alignment\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"]},\"icon-size\":{type:\"number\",default:1,minimum:0,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,units:\"factor of the original icon size\",requires:[\"icon-image\"]},\"icon-text-fit\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{none:{},width:{},height:{},both:{}},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,requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}]},\"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,units:\"pixels\",requires:[\"icon-image\"]},\"icon-keep-upright\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-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\"]},\"icon-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:[\"icon-image\"]},\"icon-pitch-alignment\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"]},\"text-pitch-alignment\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"]},\"text-rotation-alignment\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{},auto:{}},default:\"auto\",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:\"ems\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,requires:[\"text-field\"]},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",function:\"interpolated\",\"zoom-function\":!0,requires:[\"text-field\"]},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",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,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,requires:[\"text-field\"]},\"text-keep-upright\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-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,default:!1,requires:[\"text-field\"]},\"text-ignore-placement\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1,requires:[\"text-field\"]},\"text-optional\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-function\":!0,default:!1,requires:[\"text-field\",\"icon-image\"]},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},layout_hillshade:{visibility:{type:\"enum\",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:{}}},function_stop:{type:\"array\",minimum:0,maximum:22,value:[\"number\",\"color\"],length:2},expression:{type:\"array\",value:\"*\",minimum:1},expression_name:{type:\"enum\",values:{let:{group:\"Variable binding\"},var:{group:\"Variable binding\"},literal:{group:\"Types\"},array:{group:\"Types\"},at:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},ln2:{group:\"Math\"},pi:{group:\"Math\"},e:{group:\"Math\"},typeof:{group:\"Types\"},string:{group:\"Types\"},number:{group:\"Types\"},boolean:{group:\"Types\"},object:{group:\"Types\"},collator:{group:\"Types\"},\"to-string\":{group:\"Types\"},\"to-number\":{group:\"Types\"},\"to-boolean\":{group:\"Types\"},\"to-rgba\":{group:\"Color\"},\"to-color\":{group:\"Types\"},rgb:{group:\"Color\"},rgba:{group:\"Color\"},get:{group:\"Lookup\"},has:{group:\"Lookup\"},length:{group:\"Lookup\"},properties:{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Heatmap\"},\"+\":{group:\"Math\"},\"*\":{group:\"Math\"},\"-\":{group:\"Math\"},\"/\":{group:\"Math\"},\"%\":{group:\"Math\"},\"^\":{group:\"Math\"},sqrt:{group:\"Math\"},log10:{group:\"Math\"},ln:{group:\"Math\"},log2:{group:\"Math\"},sin:{group:\"Math\"},cos:{group:\"Math\"},tan:{group:\"Math\"},asin:{group:\"Math\"},acos:{group:\"Math\"},atan:{group:\"Math\"},min:{group:\"Math\"},max:{group:\"Math\"},round:{group:\"Math\"},abs:{group:\"Math\"},ceil:{group:\"Math\"},floor:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},\"is-supported-script\":{group:\"String\"},upcase:{group:\"String\"},downcase:{group:\"String\"},concat:{group:\"String\"},\"resolved-locale\":{group:\"String\"}}},light:{anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},transition:!1,\"zoom-function\":!0,\"property-function\":!1,function:\"piecewise-constant\"},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",transition:!0,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1},color:{type:\"color\",default:\"#ffffff\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1,transition:!0},intensity:{type:\"number\",default:.5,minimum:0,maximum:1,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1,transition:!0}},paint:[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],paint_fill:{\"fill-antialias\":{type:\"boolean\",function:\"piecewise-constant\",\"zoom-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,transition:!0,units:\"pixels\"},\"fill-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"]},\"fill-pattern\":{type:\"string\",function:\"piecewise-constant\",\"zoom-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,transition:!0,units:\"pixels\"},\"line-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-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,minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}]},\"line-pattern\":{type:\"string\",function:\"piecewise-constant\",\"zoom-function\":!0,transition:!0},\"line-gradient\":{type:\"color\",function:\"interpolated\",\"zoom-function\":!1,\"property-function\":!1,transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!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,transition:!0,units:\"pixels\"},\"circle-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"]},\"circle-pitch-scale\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"map\"},\"circle-pitch-alignment\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"viewport\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!0,units:\"pixels\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!0},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!0}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!0,units:\"pixels\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!1},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1,transition:!0},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],function:\"interpolated\",\"zoom-function\":!1,\"property-function\":!1,transition:!1},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1,transition:!0}},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,transition:!0,units:\"pixels\",requires:[\"icon-image\"]},\"icon-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-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,transition:!0,units:\"pixels\",requires:[\"text-field\"]},\"text-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-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:!1,units:\"milliseconds\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,function:\"interpolated\",\"zoom-function\":!0,transition:!1},\"hillshade-illumination-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"viewport\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,function:\"interpolated\",\"zoom-function\":!0,transition:!0},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",function:\"interpolated\",\"zoom-function\":!0,transition:!0},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",function:\"interpolated\",\"zoom-function\":!0,transition:!0},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",function:\"interpolated\",\"zoom-function\":!0,transition:!0}},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\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\"}},function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!1,default:1,minimum:0,maximum:1,transition:!0},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],function:\"interpolated\",\"zoom-function\":!0,transition:!0,units:\"pixels\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",function:\"piecewise-constant\",\"zoom-function\":!0,values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{type:\"string\",function:\"piecewise-constant\",\"zoom-function\":!0,transition:!0},\"fill-extrusion-height\":{type:\"number\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,default:0,minimum:0,units:\"meters\",transition:!0},\"fill-extrusion-base\":{type:\"number\",function:\"interpolated\",\"zoom-function\":!0,\"property-function\":!0,default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"]}}},F=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__);};function P(t){var e=t.key,r=t.value;return r?[new F(e,r,\"constants have been deprecated as of v8\")]:[]}function T(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a];}return t}function O(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function L(t){return Array.isArray(t)?t.map(L):O(t)}var j=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e;}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),q=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i[0],a=i[1];this.bindings[o]=a;}};q.prototype.concat=function(t){return new q(this,t)},q.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+\" not found in scope.\")},q.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var R={kind:\"null\"},U={kind:\"number\"},D={kind:\"string\"},N={kind:\"boolean\"},Z={kind:\"color\"},K={kind:\"object\"},J={kind:\"value\"},$={kind:\"collator\"};function H(t,e){return{kind:\"array\",itemType:t,N:e}}function X(t){if(\"array\"===t.kind){var e=X(t.itemType);return\"number\"==typeof t.N?\"array<\"+e+\", \"+t.N+\">\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var G=[R,U,D,N,Z,K,H(J)];function Y(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&!Y(t.itemType,e.itemType)&&(\"number\"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(\"value\"===t.kind)for(var r=0,n=G;r<n.length;r+=1){if(!Y(n[r],e))return null}}return\"Expected \"+X(t)+\" but found \"+X(e)+\" instead.\"}var W=n(function(t,e){var r={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]};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 o(t){return\"%\"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function a(t){return\"%\"===t[t.length-1]?i(parseFloat(t)/100):i(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}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,\"\").toLowerCase();if(i in r)return r[i].slice();if(\"#\"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf(\"(\"),l=i.indexOf(\")\");if(-1!==u&&l+1===i.length){var p=i.substr(0,u),c=i.substr(u+1,l-(u+1)).split(\",\"),h=1;switch(p){case\"rgba\":if(4!==c.length)return null;h=a(c.pop());case\"rgb\":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),h];case\"hsla\":if(4!==c.length)return null;h=a(c.pop());case\"hsl\":if(3!==c.length)return null;var f=(parseFloat(c[0])%360+360)%360/360,y=a(c[1]),d=a(c[2]),v=d<=.5?d*(y+1):d+y-d*y,m=2*d-v;return[n(255*s(m,v,f+1/3)),n(255*s(m,v,f)),n(255*s(m,v,f-1/3)),h];default:return null}}return null};}catch(t){}}).parseCSSColor,Q=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n;};Q.parse=function(t){if(t){if(t instanceof Q)return t;if(\"string\"==typeof t){var e=W(t);if(e)return new Q(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Q.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return\"rgba(\"+Math.round(e)+\",\"+Math.round(r)+\",\"+Math.round(n)+\",\"+i+\")\"},Q.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},Q.black=new Q(0,0,0,1),Q.white=new Q(1,1,1,1),Q.transparent=new Q(0,0,0,0);var tt=function(t,e,r){this.sensitivity=t?e?\"variant\":\"case\":e?\"accent\":\"base\",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"});};tt.prototype.compare=function(t,e){return this.collator.compare(t,e)},tt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var et=function(t,e,r){this.type=$,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e;};function rt(t,e,r,n){return\"number\"==typeof t&&t>=0&&t<=255&&\"number\"==typeof e&&e>=0&&e<=255&&\"number\"==typeof r&&r>=0&&r<=255?void 0===n||\"number\"==typeof n&&n>=0&&n<=1?null:\"Invalid rgba value [\"+[t,e,r,n].join(\", \")+\"]: 'a' must be between 0 and 1.\":\"Invalid rgba value [\"+(\"number\"==typeof n?[t,e,r,n]:[t,e,r]).join(\", \")+\"]: 'r', 'g', and 'b' must be between 0 and 255.\"}function nt(t){if(null===t)return R;if(\"string\"==typeof t)return D;if(\"boolean\"==typeof t)return N;if(\"number\"==typeof t)return U;if(t instanceof Q)return Z;if(t instanceof tt)return $;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var o=nt(i[n]);if(e){if(e===o)continue;e=J;break}e=o;}return H(e||J,r)}return K}et.parse=function(t,e){if(2!==t.length)return e.error(\"Expected one argument.\");var r=t[1];if(\"object\"!=typeof r||Array.isArray(r))return e.error(\"Collator options argument must be an object.\");var n=e.parse(void 0!==r[\"case-sensitive\"]&&r[\"case-sensitive\"],1,N);if(!n)return null;var i=e.parse(void 0!==r[\"diacritic-sensitive\"]&&r[\"diacritic-sensitive\"],1,N);if(!i)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,D))?null:new et(n,i,o)},et.prototype.evaluate=function(t){return new tt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},et.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale);},et.prototype.possibleOutputs=function(){return[void 0]},et.prototype.serialize=function(){var t={};return t[\"case-sensitive\"]=this.caseSensitive.serialize(),t[\"diacritic-sensitive\"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),[\"collator\",t]};var it=function(t,e){this.type=t,this.value=e;};it.parse=function(t,e){if(2!==t.length)return e.error(\"'literal' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(!function t(e){if(null===e)return!0;if(\"string\"==typeof e)return!0;if(\"boolean\"==typeof e)return!0;if(\"number\"==typeof e)return!0;if(e instanceof Q)return!0;if(e instanceof tt)return!0;if(Array.isArray(e)){for(var r=0,n=e;r<n.length;r+=1)if(!t(n[r]))return!1;return!0}if(\"object\"==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error(\"invalid value\");var r=t[1],n=nt(r),i=e.expectedType;return\"array\"!==n.kind||0!==n.N||!i||\"array\"!==i.kind||\"number\"==typeof i.N&&0!==i.N||(n=i),new it(n,r)},it.prototype.evaluate=function(){return this.value},it.prototype.eachChild=function(){},it.prototype.possibleOutputs=function(){return[this.value]},it.prototype.serialize=function(){return\"array\"===this.type.kind||\"object\"===this.type.kind?[\"literal\",this.value]:this.value instanceof Q?[\"rgba\"].concat(this.value.toArray()):this.value};var ot=function(t){this.name=\"ExpressionEvaluationError\",this.message=t;};ot.prototype.toJSON=function(){return this.message};var at={string:D,number:U,boolean:N,object:K},st=function(t,e){this.type=t,this.args=e;};st.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");for(var r=t[0],n=at[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,J);if(!a)return null;i.push(a);}return new st(n,i)},st.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Y(this.type,nt(r)))return r;if(e===this.args.length-1)throw new ot(\"Expected value to be of type \"+X(this.type)+\", but found \"+X(nt(r))+\" instead.\")}return null},st.prototype.eachChild=function(t){this.args.forEach(t);},st.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t;},st.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var ut={string:D,number:U,boolean:N},lt=function(t,e){this.type=t,this.input=e;};lt.parse=function(t,e){if(t.length<2||t.length>4)return e.error(\"Expected 1, 2, or 3 arguments, but found \"+(t.length-1)+\" instead.\");var r,n;if(t.length>2){var i=t[1];if(\"string\"!=typeof i||!(i in ut))return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);r=ut[i];}else r=J;if(t.length>3){if(\"number\"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to \"array\" must be a positive integer literal',2);n=t[2];}var o=H(r,n),a=e.parse(t[t.length-1],t.length-1,J);return a?new lt(o,a):null},lt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(Y(this.type,nt(e)))throw new ot(\"Expected value to be of type \"+X(this.type)+\", but found \"+X(nt(e))+\" instead.\");return e},lt.prototype.eachChild=function(t){t(this.input);},lt.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},lt.prototype.serialize=function(){var t=[\"array\"],e=this.type.itemType;if(\"string\"===e.kind||\"number\"===e.kind||\"boolean\"===e.kind){t.push(e.kind);var r=this.type.N;\"number\"==typeof r&&t.push(r);}return t.push(this.input.serialize()),t};var pt={\"to-number\":U,\"to-color\":Z},ct=function(t,e){this.type=t,this.args=e;};ct.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");for(var r=t[0],n=pt[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,J);if(!a)return null;i.push(a);}return new ct(n,i)},ct.prototype.evaluate=function(t){if(\"color\"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,\"string\"==typeof(e=i[n].evaluate(t))){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":rt(e[0],e[1],e[2],e[3])))return new Q(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ot(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:JSON.stringify(e))+\"'\")}for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null!==(a=u[s].evaluate(t))){var l=Number(a);if(!isNaN(l))return l}}throw new ot(\"Could not convert \"+JSON.stringify(a)+\" to number.\")},ct.prototype.eachChild=function(t){this.args.forEach(t);},ct.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t;},ct.prototype.serialize=function(){var t=[\"to-\"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize());}),t};var ht=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],ft=function(){this._parseColorCache={};};ft.prototype.id=function(){return this.feature&&\"id\"in this.feature?this.feature.id:null},ft.prototype.geometryType=function(){return this.feature?\"number\"==typeof this.feature.type?ht[this.feature.type]:this.feature.type:null},ft.prototype.properties=function(){return this.feature&&this.feature.properties||{}},ft.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Q.parse(t)),e};var yt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n;};function dt(t){if(t instanceof yt){if(\"get\"===t.name&&1===t.args.length)return!1;if(\"has\"===t.name&&1===t.args.length)return!1;if(\"properties\"===t.name||\"geometry-type\"===t.name||\"id\"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!dt(t)&&(e=!1);}),e}function vt(t,e){if(t instanceof yt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!vt(t,e)&&(r=!1);}),r}yt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},yt.prototype.eachChild=function(t){this.args.forEach(t);},yt.prototype.possibleOutputs=function(){return[void 0]},yt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},yt.parse=function(t,e){var r=t[0],n=yt.definitions[r];if(!n)return e.error('Unknown expression \"'+r+'\". If you wanted a literal array, use [\"literal\", [...]].',0);for(var i=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=o.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),s=[],u=1;u<t.length;u++){var l=t[u],p=void 0;if(1===a.length){var c=a[0][0];p=Array.isArray(c)?c[u-1]:c.type;}var h=e.parse(l,1+s.length,p);if(!h)return null;s.push(h);}for(var f=null,y=0,d=a;y<d.length;y+=1){var v=d[y],m=v[0],g=v[1];if(f=new gt(e.registry,e.path,null,e.scope),Array.isArray(m)&&m.length!==s.length)f.error(\"Expected \"+m.length+\" arguments, but found \"+s.length+\" instead.\");else{for(var x=0;x<s.length;x++){var b=Array.isArray(m)?m[x]:m.type,w=s[x];f.concat(x+1).checkSubtype(b,w.type);}if(0===f.errors.length)return new yt(r,i,g,s)}}if(1===a.length)e.errors.push.apply(e.errors,f.errors);else{var _=(a.length?a:o).map(function(t){var e,r=t[0];return e=r,Array.isArray(e)?\"(\"+e.map(X).join(\", \")+\")\":\"(\"+X(e.type)+\"...)\"}).join(\" | \"),A=s.map(function(t){return X(t.type)}).join(\", \");e.error(\"Expected arguments of type \"+_+\", but found (\"+A+\") instead.\");}return null},yt.register=function(t,e){for(var r in yt.definitions=e,e)t[r]=yt;};var mt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e;};mt.parse=function(t,e){if(2!==t.length||\"string\"!=typeof t[1])return e.error(\"'var' expression requires exactly one string literal argument.\");var r=t[1];return e.scope.has(r)?new mt(r,e.scope.get(r)):e.error('Unknown variable \"'+r+'\". Make sure \"'+r+'\" has been bound in an enclosing \"let\" expression before using it.',1)},mt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},mt.prototype.eachChild=function(){},mt.prototype.possibleOutputs=function(){return[void 0]},mt.prototype.serialize=function(){return[\"var\",this.name]};var gt=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new q),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return\"[\"+t+\"]\"}).join(\"\"),this.scope=n,this.errors=i,this.expectedType=r;};function xt(t,e){for(var r,n,i=0,o=t.length-1,a=0;i<=o;){if(r=t[a=Math.floor((i+o)/2)],n=t[a+1],e===r||e>r&&e<n)return a;if(r<e)i=a+1;else{if(!(r>e))throw new ot(\"Input is not a number.\");o=a-1;}}return Math.max(a-1,0)}gt.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},gt.prototype._parse=function(t,e){if(null!==t&&\"string\"!=typeof t&&\"boolean\"!=typeof t&&\"number\"!=typeof t||(t=[\"literal\",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');var r=t[0];if(\"string\"!=typeof r)return this.error(\"Expression name must be a string, but found \"+typeof r+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var n=this.registry[r];if(n){var i=n.parse(t,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,a=i.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind||\"value\"!==a.kind)if(\"array\"===o.kind&&\"value\"===a.kind)e.omitTypeAnnotations||(i=new lt(o,i));else if(\"color\"!==o.kind||\"value\"!==a.kind&&\"string\"!==a.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new ct(o,[i]));else e.omitTypeAnnotations||(i=new st(o,[i]));}if(!(i instanceof it)&&function t(e){if(e instanceof mt)return t(e.boundExpression);if(e instanceof yt&&\"error\"===e.name)return!1;if(e instanceof et)return!1;var r=e instanceof ct||e instanceof st||e instanceof lt;var n=!0;e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof it;});if(!n)return!1;return dt(e)&&vt(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"is-supported-script\"])}(i)){var s=new ft;try{i=new it(i.type,i.evaluate(s));}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression \"'+r+'\". If you wanted a literal array, use [\"literal\", [...]].',0)}return void 0===t?this.error(\"'undefined' value invalid. Use null instead.\"):\"object\"==typeof t?this.error('Bare objects invalid. Use [\"literal\", {...}] instead.'):this.error(\"Expected an array, but found \"+typeof t+\" instead.\")},gt.prototype.concat=function(t,e,r){var n=\"number\"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new gt(this.registry,n,e||null,i,this.errors)},gt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=\"\"+this.key+e.map(function(t){return\"[\"+t+\"]\"}).join(\"\");this.errors.push(new j(n,t));},gt.prototype.checkSubtype=function(t,e){var r=Y(t,e);return r&&this.error(r),r};var bt=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var o=i[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s);}};function wt(t,e,r){return t*(1-r)+e*r}bt.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1<4)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if((t.length-1)%2!=0)return e.error(\"Expected an even number of arguments.\");if(!(r=e.parse(r,1,U)))return null;var i=[],o=null;e.expectedType&&\"value\"!==e.expectedType.kind&&(o=e.expectedType),n.unshift(-1/0);for(var a=0;a<n.length;a+=2){var s=n[a],u=n[a+1],l=a+1,p=a+2;if(\"number\"!=typeof s)return e.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(u,p,o);if(!c)return null;o=o||c.type,i.push([s,c]);}return new bt(o,r,i)},bt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[xt(e,n)].evaluate(t)},bt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e]);}},bt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t;},bt.prototype.serialize=function(){for(var t=[\"step\",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var _t=Object.freeze({number:wt,color:function(t,e,r){return new Q(wt(t.r,e.r,r),wt(t.g,e.g,r),wt(t.b,e.b,r),wt(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return wt(t,e[n],r)})}}),At=function(t,e,r,n){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var i=0,o=n;i<o.length;i+=1){var a=o[i],s=a[0],u=a[1];this.labels.push(s),this.outputs.push(u);}};function kt(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}At.interpolationFactor=function(t,e,r,n){var o=0;if(\"exponential\"===t.name)o=kt(e,t.base,r,n);else if(\"linear\"===t.name)o=kt(e,1,r,n);else if(\"cubic-bezier\"===t.name){var a=t.controlPoints;o=new i(a[0],a[1],a[2],a[3]).solve(kt(e,1,r,n));}return o},At.parse=function(t,e){var r=t[1],n=t[2],i=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error(\"Expected an interpolation type expression.\",1);if(\"linear\"===r[0])r={name:\"linear\"};else if(\"exponential\"===r[0]){var o=r[1];if(\"number\"!=typeof o)return e.error(\"Exponential interpolation requires a numeric base.\",1,1);r={name:\"exponential\",base:o};}else{if(\"cubic-bezier\"!==r[0])return e.error(\"Unknown interpolation type \"+String(r[0]),1,0);var a=r.slice(1);if(4!==a.length||a.some(function(t){return\"number\"!=typeof t||t<0||t>1}))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);r={name:\"cubic-bezier\",controlPoints:a};}if(t.length-1<4)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if((t.length-1)%2!=0)return e.error(\"Expected an even number of arguments.\");if(!(n=e.parse(n,2,U)))return null;var s=[],u=null;e.expectedType&&\"value\"!==e.expectedType.kind&&(u=e.expectedType);for(var l=0;l<i.length;l+=2){var p=i[l],c=i[l+1],h=l+3,f=l+4;if(\"number\"!=typeof p)return e.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&&s[s.length-1][0]>=p)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',h);var y=e.parse(c,f,u);if(!y)return null;u=u||y.type,s.push([p,y]);}return\"number\"===u.kind||\"color\"===u.kind||\"array\"===u.kind&&\"number\"===u.itemType.kind&&\"number\"==typeof u.N?new At(u,r,n,s):e.error(\"Type \"+X(u)+\" is not interpolatable.\")},At.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=xt(e,n),a=e[o],s=e[o+1],u=At.interpolationFactor(this.interpolation,n,a,s),l=r[o].evaluate(t),p=r[o+1].evaluate(t);return _t[this.type.kind.toLowerCase()](l,p,u)},At.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e]);}},At.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t;},At.prototype.serialize=function(){for(var t=[\"interpolate\",\"linear\"===this.interpolation.name?[\"linear\"]:\"exponential\"===this.interpolation.name?1===this.interpolation.base?[\"linear\"]:[\"exponential\",this.interpolation.base]:[\"cubic-bezier\"].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e<this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var zt=function(t,e){this.type=t,this.args=e;};zt.parse=function(t,e){if(t.length<2)return e.error(\"Expectected at least one argument.\");var r=null,n=e.expectedType;n&&\"value\"!==n.kind&&(r=n);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+i.length,r,void 0,{omitTypeAnnotations:!0});if(!u)return null;r=r||u.type,i.push(u);}var l=n&&i.some(function(t){return Y(n,t.type)});return new zt(l?J:r,i)},zt.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r<n.length;r+=1){if(null!==(e=n[r].evaluate(t)))break}return e},zt.prototype.eachChild=function(t){this.args.forEach(t);},zt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t;},zt.prototype.serialize=function(){var t=[\"coalesce\"];return this.eachChild(function(e){t.push(e.serialize());}),t};var St=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e;};St.prototype.evaluate=function(t){return this.result.evaluate(t)},St.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1]);}t(this.result);},St.parse=function(t,e){if(t.length<4)return e.error(\"Expected at least 3 arguments, but found \"+(t.length-1)+\" instead.\");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if(\"string\"!=typeof i)return e.error(\"Expected string, but found \"+typeof i+\" instead.\",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(\"Variable names must contain only alphanumeric characters or '_'.\",n);var o=e.parse(t[n+1],n+1);if(!o)return null;r.push([i,o]);}var a=e.parse(t[t.length-1],t.length-1,void 0,r);return a?new St(r,a):null},St.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},St.prototype.serialize=function(){for(var t=[\"let\"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t.push(i,o.serialize());}return t.push(this.result.serialize()),t};var Mt=function(t,e,r){this.type=t,this.index=e,this.input=r;};Mt.parse=function(t,e){if(3!==t.length)return e.error(\"Expected 2 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,H(e.expectedType||J));if(!r||!n)return null;var i=n.type;return new Mt(i.itemType,r,n)},Mt.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ot(\"Array index out of bounds: \"+e+\" < 0.\");if(e>=r.length)throw new ot(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ot(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},Mt.prototype.eachChild=function(t){t(this.index),t(this.input);},Mt.prototype.possibleOutputs=function(){return[void 0]},Mt.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var Vt=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o;};Vt.parse=function(t,e){if(t.length<5)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if(t.length%2!=1)return e.error(\"Expected an even number of arguments.\");var r,n;e.expectedType&&\"value\"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error(\"Expected at least one branch label.\");for(var p=0,c=s;p<c.length;p+=1){var h=c[p];if(\"number\"!=typeof h&&\"string\"!=typeof h)return l.error(\"Branch labels must be numbers or strings.\");if(\"number\"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return l.error(\"Branch labels must be integers no larger than \"+Number.MAX_SAFE_INTEGER+\".\");if(\"number\"==typeof h&&Math.floor(h)!==h)return l.error(\"Numeric branch labels must be integer values.\");if(r){if(l.checkSubtype(r,nt(h)))return null}else r=nt(h);if(void 0!==i[String(h)])return l.error(\"Branch labels must be unique.\");i[String(h)]=o.length;}var f=e.parse(u,a,n);if(!f)return null;n=n||f.type,o.push(f);}var y=e.parse(t[1],1,r);if(!y)return null;var d=e.parse(t[t.length-1],t.length-1,n);return d?new Vt(r,n,y,i,o,d):null},Vt.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Vt.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise);},Vt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t;},Vt.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i],s=n[t.cases[a]];void 0===s?(n[t.cases[a]]=r.length,r.push([t.cases[a],[a]])):r[s][1].push(a);}for(var u=function(e){return\"number\"===t.input.type.kind?Number(e):e},l=0,p=r;l<p.length;l+=1){var c=p[l],h=c[0],f=c[1];1===f.length?e.push(u(f[0])):e.push(f.map(u)),e.push(t.outputs[h].serialize());}return e.push(this.otherwise.serialize()),e};var Bt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r;};function Ct(t){return\"string\"===t.kind||\"number\"===t.kind||\"boolean\"===t.kind||\"null\"===t.kind}function It(t,e){return function(){function r(t,e,r){this.type=N,this.lhs=t,this.rhs=e,this.collator=r;}return r.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error(\"Expected two or three arguments.\");var n=e.parse(t[1],1,J);if(!n)return null;var i=e.parse(t[2],2,J);if(!i)return null;if(!Ct(n.type)&&!Ct(i.type))return e.error(\"Expected at least one argument to be a string, number, boolean, or null, but found (\"+X(n.type)+\", \"+X(i.type)+\") instead.\");if(n.type.kind!==i.type.kind&&\"value\"!==n.type.kind&&\"value\"!==i.type.kind)return e.error(\"Cannot compare \"+X(n.type)+\" and \"+X(i.type)+\".\");var o=null;if(4===t.length){if(\"string\"!==n.type.kind&&\"string\"!==i.type.kind)return e.error(\"Cannot use collator to compare non-string types.\");if(!(o=e.parse(t[3],3,$)))return null}return new r(n,i,o)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator);},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize());}),e},r}()}Bt.parse=function(t,e){if(t.length<4)return e.error(\"Expected at least 3 arguments, but found only \"+(t.length-1)+\".\");if(t.length%2!=0)return e.error(\"Expected an odd number of arguments.\");var r;e.expectedType&&\"value\"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,N);if(!o)return null;var a=e.parse(t[i+1],i+1,r);if(!a)return null;n.push([o,a]),r=r||a.type;}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Bt(r,n,s):null},Bt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Bt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t(i),t(o);}t(this.otherwise);},Bt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){t[0];return t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t;},Bt.prototype.serialize=function(){var t=[\"case\"];return this.eachChild(function(e){t.push(e.serialize());}),t};var Et=It(\"==\",!1),Ft=It(\"!=\",!0),Pt=function(t){this.type=U,this.input=t;};Pt.parse=function(t,e){if(2!==t.length)return e.error(\"Expected 1 argument, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1);return r?\"array\"!==r.type.kind&&\"string\"!==r.type.kind&&\"value\"!==r.type.kind?e.error(\"Expected argument of type string or array, but found \"+X(r.type)+\" instead.\"):new Pt(r):null},Pt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(\"string\"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ot(\"Expected value to be of type string or array, but found \"+X(nt(e))+\" instead.\")},Pt.prototype.eachChild=function(t){t(this.input);},Pt.prototype.possibleOutputs=function(){return[void 0]},Pt.prototype.serialize=function(){var t=[\"length\"];return this.eachChild(function(e){t.push(e.serialize());}),t};var Tt={\"==\":Et,\"!=\":Ft,array:lt,at:Mt,boolean:st,case:Bt,coalesce:zt,collator:et,interpolate:At,length:Pt,let:St,literal:it,match:Vt,number:st,object:st,step:bt,string:st,\"to-color\":ct,\"to-number\":ct,var:mt};function Ot(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=rt(r,n,i,a);if(s)throw new ot(s);return new Q(r/255*a,n/255*a,i/255*a,a)}function Lt(t,e){return t in e}function jt(t,e){var r=e[t];return void 0===r?null:r}function qt(t,e){var r=e[0],n=e[1];return r.evaluate(t)<n.evaluate(t)}function Rt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>n.evaluate(t)}function Ut(t,e){var r=e[0],n=e[1];return r.evaluate(t)<=n.evaluate(t)}function Dt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>=n.evaluate(t)}function Nt(t){return{type:t}}function Zt(t){return{result:\"success\",value:t}}function Kt(t){return{result:\"error\",value:t}}yt.register(Tt,{error:[{kind:\"error\"},[D],function(t,e){var r=e[0];throw new ot(r.evaluate(t))}],typeof:[D,[J],function(t,e){return X(nt(e[0].evaluate(t)))}],\"to-string\":[D,[J],function(t,e){var r=e[0],n=typeof(r=r.evaluate(t));return null===r?\"\":\"string\"===n||\"number\"===n||\"boolean\"===n?String(r):r instanceof Q?r.toString():JSON.stringify(r)}],\"to-boolean\":[N,[J],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],\"to-rgba\":[H(U,4),[Z],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Z,[U,U,U],Ot],rgba:[Z,[U,U,U,U],Ot],has:{type:N,overloads:[[[D],function(t,e){return Lt(e[0].evaluate(t),t.properties())}],[[D,K],function(t,e){var r=e[0],n=e[1];return Lt(r.evaluate(t),n.evaluate(t))}]]},get:{type:J,overloads:[[[D],function(t,e){return jt(e[0].evaluate(t),t.properties())}],[[D,K],function(t,e){var r=e[0],n=e[1];return jt(r.evaluate(t),n.evaluate(t))}]]},properties:[K,[],function(t){return t.properties()}],\"geometry-type\":[D,[],function(t){return t.geometryType()}],id:[J,[],function(t){return t.id()}],zoom:[U,[],function(t){return t.globals.zoom}],\"heatmap-density\":[U,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[U,[],function(t){return t.globals.lineProgress||0}],\"+\":[U,Nt(U),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1){r+=i[n].evaluate(t);}return r}],\"*\":[U,Nt(U),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1){r*=i[n].evaluate(t);}return r}],\"-\":{type:U,overloads:[[[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[U],function(t,e){return-e[0].evaluate(t)}]]},\"/\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],\"%\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[U,[],function(){return Math.LN2}],pi:[U,[],function(){return Math.PI}],e:[U,[],function(){return Math.E}],\"^\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[U,[U],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[U,[U],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[U,[U],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[U,[U],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[U,[U],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[U,[U],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[U,[U],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[U,[U],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[U,[U],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[U,[U],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[U,Nt(U),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[U,Nt(U),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[U,[U],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[U,[U],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[U,[U],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[U,[U],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],\"filter-==\":[N,[D,J],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],\"filter-id-==\":[N,[J],function(t,e){var r=e[0];return t.id()===r.value}],\"filter-type-==\":[N,[D],function(t,e){var r=e[0];return t.geometryType()===r.value}],\"filter-<\":[N,[D,J],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<o}],\"filter-id-<\":[N,[J],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],\"filter->\":[N,[D,J],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],\"filter-id->\":[N,[J],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[N,[D,J],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],\"filter-id-<=\":[N,[J],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[N,[D,J],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],\"filter-id->=\":[N,[J],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[N,[J],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[N,[],function(t){return null!==t.id()}],\"filter-type-in\":[N,[H(D)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[N,[H(J)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[N,[D,H(J)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[N,[D,H(J)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1;}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],\">\":{type:N,overloads:[[[U,U],Rt],[[D,D],Rt],[[D,D,$],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>0}]]},\"<\":{type:N,overloads:[[[U,U],qt],[[D,D],qt],[[D,D,$],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<0}]]},\">=\":{type:N,overloads:[[[U,U],Dt],[[D,D],Dt],[[D,D,$],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>=0}]]},\"<=\":{type:N,overloads:[[[U,U],Ut],[[D,D],Ut],[[D,D,$],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<=0}]]},all:{type:N,overloads:[[[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Nt(N),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(!n[r].evaluate(t))return!1}return!0}]]},any:{type:N,overloads:[[[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Nt(N),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(n[r].evaluate(t))return!0}return!1}]]},\"!\":[N,[N],function(t,e){return!e[0].evaluate(t)}],\"is-supported-script\":[N,[D],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[D,[D],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[D,[D],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[D,Nt(D),function(t,e){return e.map(function(e){return e.evaluate(t)}).join(\"\")}],\"resolved-locale\":[D,[$],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Jt=.95047,$t=1,Ht=1.08883,Xt=4/29,Gt=6/29,Yt=3*Gt*Gt,Wt=Gt*Gt*Gt,Qt=Math.PI/180,te=180/Math.PI;function ee(t){return t>Wt?Math.pow(t,1/3):t/Yt+Xt}function re(t){return t>Gt?t*t*t:Yt*(t-Xt)}function ne(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ie(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oe(t){var e=ie(t.r),r=ie(t.g),n=ie(t.b),i=ee((.4124564*e+.3575761*r+.1804375*n)/Jt),o=ee((.2126729*e+.7151522*r+.072175*n)/$t);return{l:116*o-16,a:500*(i-o),b:200*(o-ee((.0193339*e+.119192*r+.9503041*n)/Ht)),alpha:t.a}}function ae(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=$t*re(e),r=Jt*re(r),n=Ht*re(n),new Q(ne(3.2404542*r-1.5371385*e-.4985314*n),ne(-.969266*r+1.8760108*e+.041556*n),ne(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var se={forward:oe,reverse:ae,interpolate:function(t,e,r){return{l:wt(t.l,e.l,r),a:wt(t.a,e.a,r),b:wt(t.b,e.b,r),alpha:wt(t.alpha,e.alpha,r)}}},ue={forward:function(t){var e=oe(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*te;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Qt,r=t.c;return ae({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:wt(t.c,e.c,r),l:wt(t.l,e.l,r),alpha:wt(t.alpha,e.alpha,r)}}},le=Object.freeze({lab:se,hcl:ue});function pe(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function ce(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function he(t){return t}function fe(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ye(t,e,r,n,i){return fe(typeof r===i?n[r]:void 0,t.default,e.default)}function de(t,e,r){if(\"number\"!==pe(r))return fe(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=ge(t.stops,r);return t.stops[i][1]}function ve(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==pe(r))return fe(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o=ge(t.stops,r),a=function(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=_t[e.type]||he;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var p=le[t.colorSpace];l=function(t,e){return p.reverse(p.interpolate(p.forward(t),p.forward(e),a))};}return\"function\"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return l(r,n,a)}}:l(s,u,a)}function me(t,e,r){return\"color\"===e.type?r=Q.parse(r):pe(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),fe(r,t.default,e.default)}function ge(t,e){for(var r,n,i=0,o=t.length-1,a=0;i<=o;){if(r=t[a=Math.floor((i+o)/2)][0],n=t[a+1][0],e===r||e>r&&e<n)return a;r<e?i=a+1:r>e&&(o=a-1);}return Math.max(a-1,0)}var xe=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue=\"color\"===(r=e).type&&ce(r.default)?new Q(0,0,0,0):\"color\"===r.type?Q.parse(r.default)||null:void 0===r.default?null:r.default,\"enum\"===e.type&&(this._enumValues=e.values);};function be(t){return Array.isArray(t)&&t.length>0&&\"string\"==typeof t[0]&&t[0]in Tt}function we(t,e){var r=new gt(Tt,[],function(t){var e={color:Z,string:D,number:U,enum:D,boolean:N};if(\"array\"===t.type)return H(e[t.value]||J,t.length);return e[t.type]||null}(e)),n=r.parse(t);return n?Zt(new xe(n,e)):Kt(r.errors)}xe.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new ft),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},xe.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new ft),this._evaluator.globals=t,this._evaluator.feature=e;try{var r=this.expression.evaluate(this._evaluator);if(null==r)return this._defaultValue;if(this._enumValues&&!(r in this._enumValues))throw new ot(\"Expected value to be one of \"+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(\", \")+\", but found \"+JSON.stringify(r)+\" instead.\");return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var _e=function(t,e){this.kind=t,this._styleExpression=e;};_e.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},_e.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Ae=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,r instanceof At&&(this._interpolationType=r.interpolation);};function ke(t,e){if(\"error\"===(t=we(t,e)).result)return t;var r=t.value.expression,n=dt(r);if(!n&&!e[\"property-function\"])return Kt([new j(\"\",\"property expressions not supported\")]);var i=vt(r,[\"zoom\"]);if(!i&&!1===e[\"zoom-function\"])return Kt([new j(\"\",\"zoom expressions not supported\")]);var o=function t(e){var r=null;if(e instanceof St)r=t(e.result);else if(e instanceof zt)for(var n=0,i=e.args;n<i.length;n+=1){var o=i[n];if(r=t(o))break}else(e instanceof bt||e instanceof At)&&e.input instanceof yt&&\"zoom\"===e.input.name&&(r=e);if(r instanceof j)return r;e.eachChild(function(e){var n=t(e);n instanceof j?r=n:!r&&n?r=new j(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):r&&n&&r!==n&&(r=new j(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'));});return r}(r);return o||i?o instanceof j?Kt([o]):o instanceof At&&\"piecewise-constant\"===e.function?Kt([new j(\"\",'\"interpolate\" expressions cannot be used with this property')]):Zt(o?new Ae(n?\"camera\":\"composite\",t.value,o):new _e(n?\"constant\":\"source\",t.value)):Kt([new j(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')])}Ae.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Ae.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Ae.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?At.interpolationFactor(this._interpolationType,t,e,r):0};var ze=function(t,e){this._parameters=t,this._specification=e,T(this,function t(e,r){var n,i,o,a=\"color\"===r.type,s=e.stops&&\"object\"==typeof e.stops[0][0],u=s||void 0!==e.property,l=s||!u,p=e.type||(\"interpolated\"===r.function?\"exponential\":\"interval\");if(a&&((e=T({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Q.parse(t[1])]})),e.default?e.default=Q.parse(e.default):e.default=Q.parse(r.default)),e.colorSpace&&\"rgb\"!==e.colorSpace&&!le[e.colorSpace])throw new Error(\"Unknown color space: \"+e.colorSpace);if(\"exponential\"===p)n=ve;else if(\"interval\"===p)n=de;else if(\"categorical\"===p){n=ye,i=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var f=h[c];i[f[0]]=f[1];}o=typeof e.stops[0][0];}else{if(\"identity\"!==p)throw new Error('Unknown function type \"'+p+'\"');n=me;}if(s){for(var y={},d=[],v=0;v<e.stops.length;v++){var m=e.stops[v],g=m[0].zoom;void 0===y[g]&&(y[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},d.push(g)),y[g].stops.push([m[0].value,m[1]]);}for(var x=[],b=0,w=d;b<w.length;b+=1){var _=w[b];x.push([y[_].zoom,t(y[_],r)]);}return{kind:\"composite\",interpolationFactor:At.interpolationFactor.bind(void 0,{name:\"linear\"}),zoomStops:x.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return ve({stops:x,base:e.base},r,i).evaluate(i,n)}}}return l?{kind:\"camera\",interpolationFactor:\"exponential\"===p?At.interpolationFactor.bind(void 0,{name:\"exponential\",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var a=t.zoom;return n(e,r,a,i,o)}}:{kind:\"source\",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?fe(e.default,r.default):n(e,r,s,i,o)}}}(this._parameters,this._specification));};function Se(t,e){if(ce(t))return new ze(t,e);if(be(t)){var r=ke(t,e);if(\"error\"===r.result)throw new Error(r.value.map(function(t){return t.key+\": \"+t.message}).join(\", \"));return r.value}var n=t;return\"string\"==typeof t&&\"color\"===e.type&&(n=Q.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}function Me(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=pe(r);if(\"object\"!==u)return[new F(e,r,\"object expected, \"+u+\" found\")];for(var l in r){var p=l.split(\".\")[0],c=n[p]||n[\"*\"],h=void 0;if(i[p])h=i[p];else if(n[p])h=Ye;else if(i[\"*\"])h=i[\"*\"];else{if(!n[\"*\"]){s.push(new F(e,r[l],'unknown property \"'+l+'\"'));continue}h=Ye;}s=s.concat(h({key:(e?e+\".\":e)+l,value:r[l],valueSpec:c,style:o,styleSpec:a,object:r,objectKey:l},r));}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new F(e,r,'missing required property \"'+f+'\"'));return s}function Ve(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Ye;if(\"array\"!==pe(e))return[new F(o,e,\"array expected, \"+pe(e)+\" found\")];if(r.length&&e.length!==r.length)return[new F(o,e,\"array length \"+r.length+\" expected, length \"+e.length+\" found\")];if(r[\"min-length\"]&&e.length<r[\"min-length\"])return[new F(o,e,\"array length at least \"+r[\"min-length\"]+\" expected, length \"+e.length+\" found\")];var s={type:r.value};i.$version<7&&(s.function=r.function),\"object\"===pe(r.value)&&(s=r.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:n,styleSpec:i,key:o+\"[\"+l+\"]\"}));return u}function Be(t){var e=t.key,r=t.value,n=t.valueSpec,i=pe(r);return\"number\"!==i?[new F(e,r,\"number expected, \"+i+\" found\")]:\"minimum\"in n&&r<n.minimum?[new F(e,r,r+\" is less than the minimum value \"+n.minimum)]:\"maximum\"in n&&r>n.maximum?[new F(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function Ce(t){var e,r,n,i=t.valueSpec,o=O(t.value.type),a={},s=\"categorical\"!==o&&void 0===t.value.property,u=!s,l=\"array\"===pe(t.value.stops)&&\"array\"===pe(t.value.stops[0])&&\"object\"===pe(t.value.stops[0][0]),p=Me({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(\"identity\"===o)return[new F(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat(Ve({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),\"array\"===pe(r)&&0===r.length&&e.push(new F(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return Ye({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===o&&s&&p.push(new F(t.key,t.value,'missing required property \"property\"')),\"identity\"===o||t.value.stops||p.push(new F(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===o&&\"piecewise-constant\"===t.valueSpec.function&&p.push(new F(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(u&&!t.valueSpec[\"property-function\"]?p.push(new F(t.key,t.value,\"property functions not supported\")):s&&!t.valueSpec[\"zoom-function\"]&&\"heatmap-color\"!==t.objectKey&&\"line-gradient\"!==t.objectKey&&p.push(new F(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==o&&!l||void 0!==t.value.property||p.push(new F(t.key,t.value,'\"property\" property is required')),p;function c(t){var e=[],o=t.value,s=t.key;if(\"array\"!==pe(o))return[new F(s,o,\"array expected, \"+pe(o)+\" found\")];if(2!==o.length)return[new F(s,o,\"array length 2 expected, length \"+o.length+\" found\")];if(l){if(\"object\"!==pe(o[0]))return[new F(s,o,\"object expected, \"+pe(o[0])+\" found\")];if(void 0===o[0].zoom)return[new F(s,o,\"object stop key must have zoom\")];if(void 0===o[0].value)return[new F(s,o,\"object stop key must have value\")];if(n&&n>O(o[0].zoom))return[new F(s,o[0].zoom,\"stop zoom values must appear in ascending order\")];O(o[0].zoom)!==n&&(n=O(o[0].zoom),r=void 0,a={}),e=e.concat(Me({key:s+\"[0]\",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Be,value:h}}));}else e=e.concat(h({key:s+\"[0]\",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(Ye({key:s+\"[1]\",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=pe(t.value),u=O(t.value),l=null!==t.value?t.value:n;if(e){if(s!==e)return[new F(t.key,l,s+\" stop domain type must match previous stop domain type \"+e)]}else e=s;if(\"number\"!==s&&\"string\"!==s&&\"boolean\"!==s)return[new F(t.key,l,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==s&&\"categorical\"!==o){var p=\"number expected, \"+s+\" found\";return i[\"property-function\"]&&void 0===o&&(p+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new F(t.key,l,p)]}return\"categorical\"!==o||\"number\"!==s||isFinite(u)&&Math.floor(u)===u?\"categorical\"!==o&&\"number\"===s&&void 0!==r&&u<r?[new F(t.key,l,\"stop domain values must appear in ascending order\")]:(r=u,\"categorical\"===o&&u in a?[new F(t.key,l,\"stop domain values must be unique\")]:(a[u]=!0,[])):[new F(t.key,l,\"integer expected, found \"+u)]}}function Ie(t){var e=(\"property\"===t.expressionContext?ke:we)(L(t.value),t.valueSpec);return\"error\"===e.result?e.value.map(function(e){return new F(\"\"+t.key+e.key,t.value,e.message)}):\"property\"===t.expressionContext&&\"text-font\"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new F(t.key,t.value,'Invalid data expression for \"text-font\". Output values must be contained as literals within the expression.')]:[]}function Ee(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(O(r))&&i.push(new F(e,r,\"expected one of [\"+n.values.join(\", \")+\"], \"+JSON.stringify(r)+\" found\")):-1===Object.keys(n.values).indexOf(O(r))&&i.push(new F(e,r,\"expected one of [\"+Object.keys(n.values).join(\", \")+\"], \"+JSON.stringify(r)+\" found\")),i}function Fe(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case\"has\":return t.length>=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case\"any\":case\"all\":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!Fe(n)&&\"boolean\"!=typeof n)return!1}return!0;default:return!0}}ze.deserialize=function(t){return new ze(t._parameters,t._specification)},ze.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var Pe={type:\"boolean\",default:!1,function:!0,\"property-function\":!0,\"zoom-function\":!0};function Te(t){if(!t)return function(){return!0};Fe(t)||(t=Le(t));var e=we(t,Pe);if(\"error\"===e.result)throw new Error(e.value.map(function(t){return t.key+\": \"+t.message}).join(\", \"));return function(t,r){return e.value.evaluate(t,r)}}function Oe(t,e){return t<e?-1:t>e?1:0}function Le(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?je(t[1],t[2],\"==\"):\"!=\"===r?Ue(je(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?je(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(Le))):\"all\"===r?[\"all\"].concat(t.slice(1).map(Le)):\"none\"===r?[\"all\"].concat(t.slice(1).map(Le).map(Ue)):\"in\"===r?qe(t[1],t.slice(2)):\"!in\"===r?Ue(qe(t[1],t.slice(2))):\"has\"===r?Re(t[1]):\"!has\"!==r||Ue(Re(t[1]))}function je(t,e,r){switch(t){case\"$type\":return[\"filter-type-\"+r,e];case\"$id\":return[\"filter-id-\"+r,e];default:return[\"filter-\"+r,t,e]}}function qe(t,e){if(0===e.length)return!1;switch(t){case\"$type\":return[\"filter-type-in\",[\"literal\",e]];case\"$id\":return[\"filter-id-in\",[\"literal\",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?[\"filter-in-large\",t,[\"literal\",e.sort(Oe)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function Re(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function Ue(t){return[\"!\",t]}function De(t){return Fe(L(t.value))?Ie(T({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value;var n=e.key;if(\"array\"!==pe(r))return[new F(n,r,\"array expected, \"+pe(r)+\" found\")];var i=e.styleSpec;var o;var a=[];if(r.length<1)return[new F(n,r,\"filter array must have at least 1 element\")];a=a.concat(Ee({key:n+\"[0]\",value:r[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec}));switch(O(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===O(r[1])&&a.push(new F(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&a.push(new F(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(o=pe(r[1]))&&a.push(new F(n+\"[1]\",r[1],\"string expected, \"+o+\" found\"));for(var s=2;s<r.length;s++)o=pe(r[s]),\"$type\"===O(r[1])?a=a.concat(Ee({key:n+\"[\"+s+\"]\",value:r[s],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):\"string\"!==o&&\"number\"!==o&&\"boolean\"!==o&&a.push(new F(n+\"[\"+s+\"]\",r[s],\"string, number, or boolean expected, \"+o+\" found\"));break;case\"any\":case\"all\":case\"none\":for(var u=1;u<r.length;u++)a=a.concat(t({key:n+\"[\"+u+\"]\",value:r[u],style:e.style,styleSpec:e.styleSpec}));break;case\"has\":case\"!has\":o=pe(r[1]),2!==r.length?a.push(new F(n,r,'filter array for \"'+r[0]+'\" operator must have 2 elements')):\"string\"!==o&&a.push(new F(n+\"[1]\",r[1],\"string expected, \"+o+\" found\"));}return a}(t)}function Ne(t,e){var r=t.key,n=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+\"_\"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if(\"paint\"===e&&u&&s[u[1]]&&s[u[1]].transition)return Ye({key:r,value:o,valueSpec:i.transition,style:n,styleSpec:i});var l,p=t.valueSpec||s[a];if(!p)return[new F(r,o,'unknown property \"'+a+'\"')];if(\"string\"===pe(o)&&p[\"property-function\"]&&!p.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new F(r,o,'\"'+a+'\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": '+JSON.stringify(l[1])+\" }`.\")];var c=[];return\"symbol\"===t.layerType&&(\"text-field\"===a&&n&&!n.glyphs&&c.push(new F(r,o,'use of \"text-field\" requires a style \"glyphs\" property')),\"text-font\"===a&&ce(L(o))&&\"identity\"===O(o.type)&&c.push(new F(r,o,'\"text-font\" does not support identity functions'))),c.concat(Ye({key:t.key,value:o,valueSpec:p,style:n,styleSpec:i,expressionContext:\"property\",propertyKey:a}))}function Ze(t){return Ne(t,\"paint\")}function Ke(t){return Ne(t,\"layout\")}function Je(t){var e=[],r=t.value,n=t.key,i=t.style,o=t.styleSpec;r.type||r.ref||e.push(new F(n,r,'either \"type\" or \"ref\" is required'));var a,s=O(r.type),u=O(r.ref);if(r.id)for(var l=O(r.id),p=0;p<t.arrayIndex;p++){var c=i.layers[p];O(c.id)===l&&e.push(new F(n,r.id,'duplicate layer id \"'+r.id+'\", previously used at line '+c.id.__line__));}if(\"ref\"in r)[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(function(t){t in r&&e.push(new F(n,r[t],'\"'+t+'\" is prohibited for ref layers'));}),i.layers.forEach(function(t){O(t.id)===u&&(a=t);}),a?a.ref?e.push(new F(n,r.ref,\"ref cannot reference another ref layer\")):s=O(a.type):e.push(new F(n,r.ref,'ref layer \"'+u+'\" not found'));else if(\"background\"!==s)if(r.source){var h=i.sources&&i.sources[r.source],f=h&&O(h.type);h?\"vector\"===f&&\"raster\"===s?e.push(new F(n,r.source,'layer \"'+r.id+'\" requires a raster source')):\"raster\"===f&&\"raster\"!==s?e.push(new F(n,r.source,'layer \"'+r.id+'\" requires a vector source')):\"vector\"!==f||r[\"source-layer\"]?\"raster-dem\"===f&&\"hillshade\"!==s?e.push(new F(n,r.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):\"line\"!==s||!r.paint||!r.paint[\"line-gradient\"]||\"geojson\"===f&&h.lineMetrics||e.push(new F(n,r,'layer \"'+r.id+'\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new F(n,r,'layer \"'+r.id+'\" must specify a \"source-layer\"')):e.push(new F(n,r.source,'source \"'+r.source+'\" not found'));}else e.push(new F(n,r,'missing required property \"source\"'));return e=e.concat(Me({key:n,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(){return[]},type:function(){return Ye({key:n+\".type\",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:\"type\"})},filter:De,layout:function(t){return Me({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return Ke(T({layerType:s},t))}}})},paint:function(t){return Me({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return Ze(T({layerType:s},t))}}})}}}))}function $e(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new F(r,e,'\"type\" is required')];var o=O(e.type),a=[];switch(o){case\"vector\":case\"raster\":case\"raster-dem\":if(a=a.concat(Me({key:r,value:e,valueSpec:n[\"source_\"+o.replace(\"-\",\"_\")],style:t.style,styleSpec:n})),\"url\"in e)for(var s in e)[\"type\",\"url\",\"tileSize\"].indexOf(s)<0&&a.push(new F(r+\".\"+s,e[s],'a source with a \"url\" property may not include a \"'+s+'\" property'));return a;case\"geojson\":return Me({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n});case\"video\":return Me({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case\"image\":return Me({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case\"canvas\":return a.push(new F(r,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")),a;default:return Ee({key:r+\".type\",value:e.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:i,styleSpec:n})}}function He(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,o=[],a=pe(e);if(void 0===e)return o;if(\"object\"!==a)return o=o.concat([new F(\"light\",e,\"object expected, \"+a+\" found\")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&n[u[1]]&&n[u[1]].transition?o.concat(Ye({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?o.concat(Ye({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):o.concat([new F(s,e[s],'unknown property \"'+s+'\"')]);}return o}function Xe(t){var e=t.value,r=t.key,n=pe(e);return\"string\"!==n?[new F(r,e,\"string expected, \"+n+\" found\")]:[]}var Ge={\"*\":function(){return[]},array:Ve,boolean:function(t){var e=t.value,r=t.key,n=pe(e);return\"boolean\"!==n?[new F(r,e,\"boolean expected, \"+n+\" found\")]:[]},number:Be,color:function(t){var e=t.key,r=t.value,n=pe(r);return\"string\"!==n?[new F(e,r,\"color expected, \"+n+\" found\")]:null===W(r)?[new F(e,r,'color expected, \"'+r+'\" found')]:[]},constants:P,enum:Ee,filter:De,function:Ce,layer:Je,object:Me,source:$e,light:He,string:Xe};function Ye(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.function&&ce(O(e))?Ce(t):r.function&&be(L(e))?Ie(t):r.type&&Ge[r.type]?Ge[r.type](t):Me(T({},t,{valueSpec:r.type?n[r.type]:r}))}function We(t){var e=t.value,r=t.key,n=Xe(t);return n.length?n:(-1===e.indexOf(\"{fontstack}\")&&n.push(new F(r,e,'\"glyphs\" url must include a \"{fontstack}\" token')),-1===e.indexOf(\"{range}\")&&n.push(new F(r,e,'\"glyphs\" url must include a \"{range}\" token')),n)}function Qe(t,e){e=e||E;var r=[];return r=r.concat(Ye({key:\"\",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:We,\"*\":function(){return[]}}})),t.constants&&(r=r.concat(P({key:\"constants\",value:t.constants,style:t,styleSpec:e}))),tr(r)}function tr(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function er(t){return function(){return tr(t.apply(this,arguments))}}Qe.source=er($e),Qe.light=er(He),Qe.layer=er(Je),Qe.filter=er(De),Qe.paintProperty=er(Ze),Qe.layoutProperty=er(Ke);var rr=Qe,nr=Qe.light,ir=Qe.paintProperty,or=Qe.layoutProperty;function ar(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var o=i[n];t.fire(new C(new Error(o.message))),r=!0;}return r}var sr=lr,ur=3;function lr(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=i[ur+o],s=i[ur+o+1];n.push(a===s?null:i.subarray(a,s));}var u=i[ur+n.length],l=i[ur+n.length+1];this.keys=i.subarray(u,l),this.bboxes=i.subarray(l),this.insert=this._insertReadonly;}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)n.push([]);this.keys=[],this.bboxes=[];}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var c=r/e*t;this.min=-c,this.max=t+c;}lr.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);},lr.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},lr.prototype._insertCell=function(t,e,r,n,i,o){this.cells[i].push(o);},lr.prototype.query=function(t,e,r,n){var i=this.min,o=this.max;if(t<=i&&e<=i&&o<=r&&o<=n)return Array.prototype.slice.call(this.keys);var a=[];return this._forEachCell(t,e,r,n,this._queryCell,a,{}),a},lr.prototype._queryCell=function(t,e,r,n,i,o,a){var s=this.cells[i];if(null!==s)for(var u=this.keys,l=this.bboxes,p=0;p<s.length;p++){var c=s[p];if(void 0===a[c]){var h=4*c;t<=l[h+2]&&e<=l[h+3]&&r>=l[h+0]&&n>=l[h+1]?(a[c]=!0,o.push(u[c])):a[c]=!1;}}},lr.prototype._forEachCell=function(t,e,r,n,i,o,a){for(var s=this._convertToCellCoord(t),u=this._convertToCellCoord(e),l=this._convertToCellCoord(r),p=this._convertToCellCoord(n),c=s;c<=l;c++)for(var h=u;h<=p;h++){var f=this.d*h+c;if(i.call(this,t,e,r,n,f,o,a))return}},lr.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},lr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ur+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];i[ur+a]=o,i.set(s,o),o+=s.length;}return i[ur+t.length]=o,i.set(this.keys,o),o+=this.keys.length,i[ur+t.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var pr=self.ImageData,cr={};function hr(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,\"_classRegistryKey\",{value:t,writeable:!1}),cr[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]};}for(var fr in hr(\"Object\",Object),sr.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),r},sr.deserialize=function(t){return new sr(t)},hr(\"Grid\",sr),hr(\"Color\",Q),hr(\"Error\",Error),hr(\"StylePropertyFunction\",ze),hr(\"StyleExpression\",xe,{omit:[\"_evaluator\"]}),hr(\"ZoomDependentExpression\",Ae),hr(\"ZoomConstantExpression\",_e),hr(\"CompoundExpression\",yt,{omit:[\"_evaluate\"]}),Tt)Tt[fr]._classRegistryKey||hr(\"Expression_\"+fr,Tt[fr]);function yr(t,e){if(null==t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof pr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,o=t;i<o.length;i+=1){var a=o[i];n.push(yr(a,e));}return n}if(\"object\"==typeof t){var s=t.constructor,u=s._classRegistryKey;if(!u)throw new Error(\"can't serialize object of unregistered class\");var l={};if(s.serialize)l._serialized=s.serialize(t,e);else{for(var p in t)if(t.hasOwnProperty(p)&&!(cr[u].omit.indexOf(p)>=0)){var c=t[p];l[p]=cr[u].shallow.indexOf(p)>=0?c:yr(c,e);}t instanceof Error&&(l.message=t.message);}return{name:u,properties:l}}throw new Error(\"can't serialize object of type \"+typeof t)}function dr(t){if(null==t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof pr)return t;if(Array.isArray(t))return t.map(function(t){return dr(t)});if(\"object\"==typeof t){var e=t,r=e.name,n=e.properties;if(!r)throw new Error(\"can't deserialize object of anonymous class\");var i=cr[r].klass;if(!i)throw new Error(\"can't deserialize unregistered class \"+r);if(i.deserialize)return i.deserialize(n._serialized);for(var o=Object.create(i.prototype),a=0,s=Object.keys(n);a<s.length;a+=1){var u=s[a];o[u]=cr[r].shallow.indexOf(u)>=0?n[u]:dr(n[u]);}return o}throw new Error(\"can't deserialize object of type \"+typeof t)}var vr=function(){this.first=!0;};vr.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var mr={\"Latin-1 Supplement\":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},\"Arabic Supplement\":function(t){return t>=1872&&t<=1919},\"Arabic Extended-A\":function(t){return t>=2208&&t<=2303},\"Hangul Jamo\":function(t){return t>=4352&&t<=4607},\"Unified Canadian Aboriginal Syllabics\":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},\"Unified Canadian Aboriginal Syllabics Extended\":function(t){return t>=6320&&t<=6399},\"General Punctuation\":function(t){return t>=8192&&t<=8303},\"Letterlike Symbols\":function(t){return t>=8448&&t<=8527},\"Number Forms\":function(t){return t>=8528&&t<=8591},\"Miscellaneous Technical\":function(t){return t>=8960&&t<=9215},\"Control Pictures\":function(t){return t>=9216&&t<=9279},\"Optical Character Recognition\":function(t){return t>=9280&&t<=9311},\"Enclosed Alphanumerics\":function(t){return t>=9312&&t<=9471},\"Geometric Shapes\":function(t){return t>=9632&&t<=9727},\"Miscellaneous Symbols\":function(t){return t>=9728&&t<=9983},\"Miscellaneous Symbols and Arrows\":function(t){return t>=11008&&t<=11263},\"CJK Radicals Supplement\":function(t){return t>=11904&&t<=12031},\"Kangxi Radicals\":function(t){return t>=12032&&t<=12255},\"Ideographic Description Characters\":function(t){return t>=12272&&t<=12287},\"CJK Symbols and Punctuation\":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},\"Hangul Compatibility Jamo\":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},\"Bopomofo Extended\":function(t){return t>=12704&&t<=12735},\"CJK Strokes\":function(t){return t>=12736&&t<=12783},\"Katakana Phonetic Extensions\":function(t){return t>=12784&&t<=12799},\"Enclosed CJK Letters and Months\":function(t){return t>=12800&&t<=13055},\"CJK Compatibility\":function(t){return t>=13056&&t<=13311},\"CJK Unified Ideographs Extension A\":function(t){return t>=13312&&t<=19903},\"Yijing Hexagram Symbols\":function(t){return t>=19904&&t<=19967},\"CJK Unified Ideographs\":function(t){return t>=19968&&t<=40959},\"Yi Syllables\":function(t){return t>=40960&&t<=42127},\"Yi Radicals\":function(t){return t>=42128&&t<=42191},\"Hangul Jamo Extended-A\":function(t){return t>=43360&&t<=43391},\"Hangul Syllables\":function(t){return t>=44032&&t<=55215},\"Hangul Jamo Extended-B\":function(t){return t>=55216&&t<=55295},\"Private Use Area\":function(t){return t>=57344&&t<=63743},\"CJK Compatibility Ideographs\":function(t){return t>=63744&&t<=64255},\"Arabic Presentation Forms-A\":function(t){return t>=64336&&t<=65023},\"Vertical Forms\":function(t){return t>=65040&&t<=65055},\"CJK Compatibility Forms\":function(t){return t>=65072&&t<=65103},\"Small Form Variants\":function(t){return t>=65104&&t<=65135},\"Arabic Presentation Forms-B\":function(t){return t>=65136&&t<=65279},\"Halfwidth and Fullwidth Forms\":function(t){return t>=65280&&t<=65519}};function gr(t){for(var e=0,r=t;e<r.length;e+=1){if(br(r[e].charCodeAt(0)))return!0}return!1}function xr(t){return!mr.Arabic(t)&&(!mr[\"Arabic Supplement\"](t)&&(!mr[\"Arabic Extended-A\"](t)&&(!mr[\"Arabic Presentation Forms-A\"](t)&&!mr[\"Arabic Presentation Forms-B\"](t))))}function br(t){return 746===t||747===t||!(t<4352)&&(!!mr[\"Bopomofo Extended\"](t)||(!!mr.Bopomofo(t)||(!(!mr[\"CJK Compatibility Forms\"](t)||t>=65097&&t<=65103)||(!!mr[\"CJK Compatibility Ideographs\"](t)||(!!mr[\"CJK Compatibility\"](t)||(!!mr[\"CJK Radicals Supplement\"](t)||(!!mr[\"CJK Strokes\"](t)||(!(!mr[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!mr[\"CJK Unified Ideographs Extension A\"](t)||(!!mr[\"CJK Unified Ideographs\"](t)||(!!mr[\"Enclosed CJK Letters and Months\"](t)||(!!mr[\"Hangul Compatibility Jamo\"](t)||(!!mr[\"Hangul Jamo Extended-A\"](t)||(!!mr[\"Hangul Jamo Extended-B\"](t)||(!!mr[\"Hangul Jamo\"](t)||(!!mr[\"Hangul Syllables\"](t)||(!!mr.Hiragana(t)||(!!mr[\"Ideographic Description Characters\"](t)||(!!mr.Kanbun(t)||(!!mr[\"Kangxi Radicals\"](t)||(!!mr[\"Katakana Phonetic Extensions\"](t)||(!(!mr.Katakana(t)||12540===t)||(!(!mr[\"Halfwidth and Fullwidth Forms\"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!mr[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!mr[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!mr[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!mr[\"Vertical Forms\"](t)||(!!mr[\"Yijing Hexagram Symbols\"](t)||(!!mr[\"Yi Syllables\"](t)||!!mr[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function wr(t){return!(br(t)||function(t){return!!(mr[\"Latin-1 Supplement\"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||mr[\"General Punctuation\"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||mr[\"Letterlike Symbols\"](t)||mr[\"Number Forms\"](t)||mr[\"Miscellaneous Technical\"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||mr[\"Control Pictures\"](t)&&9251!==t||mr[\"Optical Character Recognition\"](t)||mr[\"Enclosed Alphanumerics\"](t)||mr[\"Geometric Shapes\"](t)||mr[\"Miscellaneous Symbols\"](t)&&!(t>=9754&&t<=9759)||mr[\"Miscellaneous Symbols and Arrows\"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||mr[\"CJK Symbols and Punctuation\"](t)||mr.Katakana(t)||mr[\"Private Use Area\"](t)||mr[\"CJK Compatibility Forms\"](t)||mr[\"Small Form Variants\"](t)||mr[\"Halfwidth and Fullwidth Forms\"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function _r(t,e){return!(!e&&(t>=1424&&t<=2303||mr[\"Arabic Presentation Forms-A\"](t)||mr[\"Arabic Presentation Forms-B\"](t)))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||mr.Khmer(t))}var Ar,kr=!1,zr=null,Sr=!1,Mr=new I,Vr={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Sr||null!=Vr.applyArabicShaping}},Br=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vr,this.transition={});};Br.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!_r(n[r].charCodeAt(0),e))return!1;return!0}(t,Vr.isLoaded())},Br.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var Cr=function(t,e){this.property=t,this.value=e,this.expression=Se(void 0===e?t.specification.default:e,t.specification);};Cr.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},Cr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Ir=function(t){this.property=t,this.value=new Cr(t,void 0);};Ir.prototype.transitioned=function(t,e){return new Fr(this.property,this.value,e,h({},t.transition,this.transition),t.now)},Ir.prototype.untransitioned=function(){return new Fr(this.property,this.value,null,{},0)};var Er=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues);};Er.prototype.getValue=function(t){return g(this._values[t].value.value)},Er.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ir(this._values[t].property)),this._values[t].value=new Cr(this._values[t].property,null===e?void 0:g(e));},Er.prototype.getTransition=function(t){return g(this._values[t].transition)},Er.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ir(this._values[t].property)),this._values[t].transition=g(e)||void 0;},Er.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var o=this.getTransition(n);void 0!==o&&(t[n+\"-transition\"]=o);}return t},Er.prototype.transitioned=function(t,e){for(var r=new Pr(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var o=i[n];r._values[o]=this._values[o].transitioned(t,e._values[o]);}return r},Er.prototype.untransitioned=function(){for(var t=new Pr(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned();}return t};var Fr=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r);};Fr.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,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)}(i))}return r};var Pr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues);};Pr.prototype.possiblyEvaluate=function(t){for(var e=new Lr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t);}return e},Pr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Tr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues);};Tr.prototype.getValue=function(t){return g(this._values[t].value)},Tr.prototype.setValue=function(t,e){this._values[t]=new Cr(this._values[t].property,null===e?void 0:g(e));},Tr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);}return t},Tr.prototype.possiblyEvaluate=function(t){for(var e=new Lr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t);}return e};var Or=function(t,e,r){this.property=t,this.value=e,this.globals=r;};Or.prototype.isConstant=function(){return\"constant\"===this.value.kind},Or.prototype.constantOr=function(t){return\"constant\"===this.value.kind?this.value.value:t},Or.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Lr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues);};Lr.prototype.get=function(t){return this._values[t]};var jr=function(t){this.specification=t;};jr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},jr.prototype.interpolate=function(t,e,r){var n=_t[this.specification.type];return n?n(t,e,r):t};var qr=function(t){this.specification=t;};qr.prototype.possiblyEvaluate=function(t,e){return\"constant\"===t.expression.kind||\"camera\"===t.expression.kind?new Or(this,{kind:\"constant\",value:t.expression.evaluate(e)},e):new Or(this,t.expression,e)},qr.prototype.interpolate=function(t,e,r){if(\"constant\"!==t.value.kind||\"constant\"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Or(this,{kind:\"constant\",value:void 0},t.globals);var n=_t[this.specification.type];return n?new Or(this,{kind:\"constant\",value:n(t.value.value,e.value.value,r)},t.globals):t},qr.prototype.evaluate=function(t,e,r){return\"constant\"===t.kind?t.value:t.evaluate(e,r)};var Rr=function(t){this.specification=t;};Rr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Br(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Br(Math.floor(e.zoom),e)),t.expression.evaluate(new Br(Math.floor(e.zoom+1),e)),e)}},Rr.prototype._calculate=function(t,e,r,n){var i=n.zoom,o=i-Math.floor(i),a=n.crossFadingFactor();return i>n.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}},Rr.prototype.interpolate=function(t){return t};var Ur=function(t){this.specification=t;};Ur.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ur.prototype.interpolate=function(){return!1};var Dr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new Cr(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Ir(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({});}};hr(\"DataDrivenProperty\",qr),hr(\"DataConstantProperty\",jr),hr(\"CrossFadedProperty\",Rr),hr(\"ColorRampProperty\",Ur);var Nr=function(t){function e(e,r){for(var n in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility=\"visible\",\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&&(this._unevaluatedLayout=new Tr(r.layout)),this._transitionablePaint=new Er(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned();}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(or,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=\"none\"===e?e:\"visible\";},e.prototype.getPaintProperty=function(t){return d(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(ir,n,t,e,r))return}d(t,\"-transition\")?this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0):this._transitionablePaint.setValue(t,e);},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||\"none\"===this.visibility)},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint);},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t);},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return\"none\"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility=\"none\"),m(t,function(t,e){return!(void 0===t||\"layout\"===e&&!Object.keys(t).length||\"paint\"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&&ar(this,t.call(rr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:E,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(I),Zr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Kr=function(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;},Jr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0);};function $r(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,o=(i=t.type,Zr[i].BYTES_PER_ELEMENT),a=r=Hr(r,Math.max(e,o)),s=t.components||1;return n=Math.max(n,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:Hr(r,Math.max(n,e)),alignment:e}}function Hr(t,e){return Math.ceil(t/e)*e}Jr.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Jr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Jr.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews());},Jr.prototype.clear=function(){this.length=0;},Jr.prototype.resize=function(t){this.reserve(t),this.length=t;},Jr.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e);}},Jr.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var Xr=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.int16[n+0]=t,this.int16[n+1]=e,r},e}(Jr);Xr.prototype.bytesPerElement=4,hr(\"StructArrayLayout2i4\",Xr);var Gr=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var o=4*i;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=r,this.int16[o+3]=n,i},e}(Jr);Gr.prototype.bytesPerElement=8,hr(\"StructArrayLayout4i8\",Gr);var Yr=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=o,a},e}(Jr);Yr.prototype.bytesPerElement=12,hr(\"StructArrayLayout2i4i12\",Yr);var Wr=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var u=this.length;this.resize(u+1);var l=6*u,p=12*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=r,this.int16[l+3]=n,this.uint8[p+8]=i,this.uint8[p+9]=o,this.uint8[p+10]=a,this.uint8[p+11]=s,u},e}(Jr);Wr.prototype.bytesPerElement=12,hr(\"StructArrayLayout4i4ub12\",Wr);var Qr=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var u=this.length;this.resize(u+1);var l=8*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=r,this.int16[l+3]=n,this.uint16[l+4]=i,this.uint16[l+5]=o,this.uint16[l+6]=a,this.uint16[l+7]=s,u},e}(Jr);Qr.prototype.bytesPerElement=16,hr(\"StructArrayLayout4i4ui16\",Qr);var tn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=r,n},e}(Jr);tn.prototype.bytesPerElement=12,hr(\"StructArrayLayout3f12\",tn);var en=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e}(Jr);en.prototype.bytesPerElement=4,hr(\"StructArrayLayout1ul4\",en);var rn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,p){var c=this.length;this.resize(c+1);var h=12*c,f=6*c;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=r,this.int16[h+3]=n,this.int16[h+4]=i,this.int16[h+5]=o,this.uint32[f+3]=a,this.uint16[h+8]=s,this.uint16[h+9]=u,this.int16[h+10]=l,this.int16[h+11]=p,c},e}(Jr);rn.prototype.bytesPerElement=24,hr(\"StructArrayLayout6i1ul2ui2i24\",rn);var nn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=o,a},e}(Jr);nn.prototype.bytesPerElement=12,hr(\"StructArrayLayout2i2i2i12\",nn);var on=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=4*r;return this.uint8[n+0]=t,this.uint8[n+1]=e,r},e}(Jr);on.prototype.bytesPerElement=4,hr(\"StructArrayLayout2ub4\",on);var an=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,p,c,h,f){var y=this.length;this.resize(y+1);var d=20*y,v=10*y,m=40*y;return this.int16[d+0]=t,this.int16[d+1]=e,this.uint16[d+2]=r,this.uint16[d+3]=n,this.uint32[v+2]=i,this.uint32[v+3]=o,this.uint32[v+4]=a,this.uint16[d+10]=s,this.uint16[d+11]=u,this.uint16[d+12]=l,this.float32[v+7]=p,this.float32[v+8]=c,this.uint8[m+36]=h,this.uint8[m+37]=f,y},e}(Jr);an.prototype.bytesPerElement=40,hr(\"StructArrayLayout2i2ui3ul3ui2f2ub40\",an);var sn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e}(Jr);sn.prototype.bytesPerElement=4,hr(\"StructArrayLayout1f4\",sn);var un=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=r,n},e}(Jr);un.prototype.bytesPerElement=6,hr(\"StructArrayLayout3i6\",un);var ln=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=2*n,o=4*n;return this.uint32[i+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=r,n},e}(Jr);ln.prototype.bytesPerElement=8,hr(\"StructArrayLayout1ul2ui8\",ln);var pn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=r,n},e}(Jr);pn.prototype.bytesPerElement=6,hr(\"StructArrayLayout3ui6\",pn);var cn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.uint16[n+0]=t,this.uint16[n+1]=e,r},e}(Jr);cn.prototype.bytesPerElement=4,hr(\"StructArrayLayout2ui4\",cn);var hn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.float32[n+0]=t,this.float32[n+1]=e,r},e}(Jr);hn.prototype.bytesPerElement=8,hr(\"StructArrayLayout2f8\",hn);var fn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var o=4*i;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=r,this.float32[o+3]=n,i},e}(Jr);fn.prototype.bytesPerElement=16,hr(\"StructArrayLayout4f16\",fn);var yn=function(t){function e(){t.apply(this,arguments);}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t;},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t;},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t;},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t;},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t;},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t;},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t;},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t;},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t;},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t;},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t;},r.anchorPoint.get=function(){return new s(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Kr);yn.prototype.size=24;var dn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new yn(this,t)},e}(rn);hr(\"CollisionBoxArray\",dn);var vn=function(t){function e(){t.apply(this,arguments);}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t;},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t;},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t;},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t;},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t;},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t;},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t;},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t;},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t;},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t;},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t;},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t;},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t;},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t;},Object.defineProperties(e.prototype,r),e}(Kr);vn.prototype.size=40;var mn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new vn(this,t)},e}(an);hr(\"PlacedSymbolArray\",mn);var gn=function(t){function e(){t.apply(this,arguments);}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t;},Object.defineProperties(e.prototype,r),e}(Kr);gn.prototype.size=4;var xn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new gn(this,t)},e}(sn);hr(\"GlyphOffsetArray\",xn);var bn=function(t){function e(){t.apply(this,arguments);}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t;},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t;},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t;},Object.defineProperties(e.prototype,r),e}(Kr);bn.prototype.size=6;var wn=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new bn(this,t)},e}(un);hr(\"SymbolLineVertexArray\",wn);var _n=function(t){function e(){t.apply(this,arguments);}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t;},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t;},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t;},Object.defineProperties(e.prototype,r),e}(Kr);_n.prototype.size=8;var An=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new _n(this,t)},e}(ln);hr(\"FeatureIndexArray\",An);var kn=$r([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,zn=function(t){void 0===t&&(t=[]),this.segments=t;};zn.prototype.prepareSegment=function(t,e,r){var n=this.segments[this.segments.length-1];return t>zn.MAX_VERTEX_ARRAY_LENGTH&&b(\"Max vertices per segment is \"+zn.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!n||n.vertexLength+t>zn.MAX_VERTEX_ARRAY_LENGTH)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},zn.prototype.get=function(){return this.segments},zn.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy();}},zn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,hr(\"SegmentVector\",zn);var Sn=function(t,e){return 256*(t=c(Math.floor(t),0,255))+(e=c(Math.floor(e),0,255))};function Mn(t){return[Sn(255*t.r,255*t.g),Sn(255*t.b,255*t.a)]}var Vn=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0};};Vn.prototype.defines=function(){return[\"#define HAS_UNIFORM_u_\"+this.name]},Vn.prototype.populatePaintArray=function(){},Vn.prototype.upload=function(){},Vn.prototype.destroy=function(){},Vn.prototype.setUniforms=function(t,e,r,n){var i=n.constantOr(this.value),o=t.gl;\"color\"===this.type?o.uniform4f(e.uniforms[\"u_\"+this.name],i.r,i.g,i.b,i.a):o.uniform1f(e.uniforms[\"u_\"+this.name],i);};var Bn=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var n=\"color\"===r?hn:sn;this.paintVertexAttributes=[{name:\"a_\"+e,type:\"Float32\",components:\"color\"===r?2:1,offset:0}],this.paintVertexArray=new n;};Bn.prototype.defines=function(){return[]},Bn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Br(0),e);if(\"color\"===this.type)for(var o=Mn(i),a=n;a<t;a++)r.emplaceBack(o[0],o[1]);else{for(var s=n;s<t;s++)r.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i);}},Bn.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes));},Bn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy();},Bn.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms[\"a_\"+this.name+\"_t\"],0);};var Cn=function(t,e,r,n,i){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=n,this.zoom=i,this.statistics={max:-1/0};var o=\"color\"===r?fn:hn;this.paintVertexAttributes=[{name:\"a_\"+e,type:\"Float32\",components:\"color\"===r?4:2,offset:0}],this.paintVertexArray=new o;};Cn.prototype.defines=function(){return[]},Cn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Br(this.zoom),e),o=this.expression.evaluate(new Br(this.zoom+1),e);if(\"color\"===this.type)for(var a=Mn(i),s=Mn(o),u=n;u<t;u++)r.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=n;l<t;l++)r.emplaceBack(i,o);this.statistics.max=Math.max(this.statistics.max,i,o);}},Cn.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes));},Cn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy();},Cn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},Cn.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms[\"a_\"+this.name+\"_t\"],this.interpolationFactor(r.zoom));};var In=function(){this.binders={},this.cacheKey=\"\",this._buffers=[];};In.createDynamic=function(t,e,r){var n=new In,i=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof Or&&a.property.specification[\"property-function\"]){var s=Fn(o,t.type),u=a.property.specification.type,l=a.property.useIntegerZoom;\"constant\"===a.value.kind?(n.binders[o]=new Vn(a.value,s,u),i.push(\"/u_\"+s)):\"source\"===a.value.kind?(n.binders[o]=new Bn(a.value,s,u),i.push(\"/a_\"+s)):(n.binders[o]=new Cn(a.value,s,u,l,e),i.push(\"/z_\"+s));}}return n.cacheKey=i.sort().join(\"\"),n},In.prototype.populatePaintArrays=function(t,e){for(var r in this.binders)this.binders[r].populatePaintArray(t,e);},In.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},In.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders){this.binders[i].setUniforms(t,e,n,r.get(i));}},In.prototype.getPaintVertexBuffers=function(){return this._buffers},In.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Bn||i instanceof Cn)&&i.paintVertexBuffer&&r.push(i.paintVertexBuffer);}this._buffers=r;},In.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy();};var En=function(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var i=0,o=e;i<o.length;i+=1){var a=o[i];this.programConfigurations[a.id]=In.createDynamic(a,r,n),this.programConfigurations[a.id].layoutAttributes=t;}};function Fn(t,e){return{\"text-opacity\":\"opacity\",\"icon-opacity\":\"opacity\",\"text-color\":\"fill_color\",\"icon-color\":\"fill_color\",\"text-halo-color\":\"halo_color\",\"icon-halo-color\":\"halo_color\",\"text-halo-blur\":\"halo_blur\",\"icon-halo-blur\":\"halo_blur\",\"text-halo-width\":\"halo_width\",\"icon-halo-width\":\"halo_width\",\"line-gap-width\":\"gapwidth\"}[t]||t.replace(e+\"-\",\"\").replace(/-/g,\"_\")}En.prototype.populatePaintArrays=function(t,e){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e);},En.prototype.get=function(t){return this.programConfigurations[t]},En.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);},En.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy();},hr(\"ConstantBinder\",Vn),hr(\"SourceExpressionBinder\",Bn),hr(\"CompositeExpressionBinder\",Cn),hr(\"ProgramConfiguration\",In,{omit:[\"_buffers\"]}),hr(\"ProgramConfigurationSet\",En);var Pn=8192;var Tn,On=(Tn=16,{min:-1*Math.pow(2,Tn-1),max:Math.pow(2,Tn-1)-1});function Ln(t){for(var e=Pn/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.length;o++){var a=i[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<On.min||a.x>On.max||a.y<On.min||a.y>On.max)&&b(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\");}return r}function jn(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2);}var qn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Xr,this.indexArray=new pn,this.segments=new zn,this.programConfigurations=new En(kn,t.layers,t.zoom);};function Rn(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(Xn(i,e))return!0;if(Jn(e,i,r))return!0}return!1}function Un(t,e){if(1===t.length&&1===t[0].length)return Hn(e,t[0][0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(Hn(t,n[i]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(Hn(e,a[s]))return!0;for(var u=0;u<e.length;u++)if(Zn(a,e[u]))return!0}return!1}function Dn(t,e,r){for(var n=0;n<e.length;n++)for(var i=e[n],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var s=0;s<i.length;s++)if(Xn(a,i[s]))return!0;if(Nn(a,i,r))return!0}return!1}function Nn(t,e,r){if(t.length>1){if(Zn(t,e))return!0;for(var n=0;n<e.length;n++)if(Jn(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(Jn(t[i],e,r))return!0;return!1}function Zn(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],o=0;o<e.length-1;o++){if(Kn(n,i,e[o],e[o+1]))return!0}return!1}function Kn(t,e,r,n){return w(t,r,n)!==w(e,r,n)&&w(t,e,r)!==w(t,e,n)}function Jn(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($n(t,e[i-1],e[i])<n)return!0}return!1}function $n(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))}function Hn(t,e){for(var r,n,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(r=t[a]).length-1;s<r.length;u=s++)n=r[s],i=r[u],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function Xn(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var o=t[n],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r);}return r}function Gn(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function Yn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Wn(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=s.convert(e);\"viewport\"===r&&o._rotate(-n);for(var a=[],u=0;u<t.length;u++){for(var l=t[u],p=[],c=0;c<l.length;c++)p.push(l[c].sub(o._mult(i)));a.push(p);}return a}qn.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Br(this.zoom),o)){var u=Ln(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index);}}},qn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},qn.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kn),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t);},qn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy());},qn.prototype.addFeature=function(t,e){for(var r=0,n=e;r<n.length;r+=1)for(var i=0,o=n[r];i<o.length;i+=1){var a=o[i],s=a.x,u=a.y;if(!(s<0||s>=Pn||u<0||u>=Pn)){var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=l.vertexLength;jn(this.layoutVertexArray,s,u,-1,-1),jn(this.layoutVertexArray,s,u,1,-1),jn(this.layoutVertexArray,s,u,1,1),jn(this.layoutVertexArray,s,u,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),l.vertexLength+=4,l.primitiveLength+=2;}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t);},hr(\"CircleBucket\",qn,{omit:[\"layers\"]});var Qn={paint:new Dr({\"circle-radius\":new qr(E.paint_circle[\"circle-radius\"]),\"circle-color\":new qr(E.paint_circle[\"circle-color\"]),\"circle-blur\":new qr(E.paint_circle[\"circle-blur\"]),\"circle-opacity\":new qr(E.paint_circle[\"circle-opacity\"]),\"circle-translate\":new jr(E.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new jr(E.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new jr(E.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new jr(E.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new qr(E.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new qr(E.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new qr(E.paint_circle[\"circle-stroke-opacity\"])})},ti=n(function(t,e){var r;t.exports=((r=new Float32Array(3))[0]=0,r[1]=0,r[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0;}(),{vec3:{transformMat3:function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}},vec4:{transformMat4:function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(r),u=Math.cos(r);return t[0]=n*u+o*s,t[1]=i*u+a*s,t[2]=n*-s+o*u,t[3]=i*-s+a*u,t},scale:function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=r[0],u=r[1];return t[0]=n*s,t[1]=i*s,t[2]=o*u,t[3]=a*u,t}},mat3:{create:function(){var t=new Float32Array(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},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}},mat4:{create: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},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},translate:function(t,e,r){var n,i,o,a,s,u,l,p,c,h,f,y,d=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*d+e[4]*v+e[8]*m+e[12],t[13]=e[1]*d+e[5]*v+e[9]*m+e[13],t[14]=e[2]*d+e[6]*v+e[10]*m+e[14],t[15]=e[3]*d+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],y=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=p,t[8]=c,t[9]=h,t[10]=f,t[11]=y,t[12]=n*d+s*v+c*m+e[12],t[13]=i*d+u*v+h*m+e[13],t[14]=o*d+l*v+f*m+e[14],t[15]=a*d+p*v+y*m+e[15]),t},scale:function(t,e,r){var n=r[0],i=r[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],y=e[11],d=e[12],v=e[13],m=e[14],g=e[15],x=r[0],b=r[1],w=r[2],_=r[3];return t[0]=x*n+b*s+w*c+_*d,t[1]=x*i+b*u+w*h+_*v,t[2]=x*o+b*l+w*f+_*m,t[3]=x*a+b*p+w*y+_*g,x=r[4],b=r[5],w=r[6],_=r[7],t[4]=x*n+b*s+w*c+_*d,t[5]=x*i+b*u+w*h+_*v,t[6]=x*o+b*l+w*f+_*m,t[7]=x*a+b*p+w*y+_*g,x=r[8],b=r[9],w=r[10],_=r[11],t[8]=x*n+b*s+w*c+_*d,t[9]=x*i+b*u+w*h+_*v,t[10]=x*o+b*l+w*f+_*m,t[11]=x*a+b*p+w*y+_*g,x=r[12],b=r[13],w=r[14],_=r[15],t[12]=x*n+b*s+w*c+_*d,t[13]=x*i+b*u+w*h+_*v,t[14]=x*o+b*l+w*f+_*m,t[15]=x*a+b*p+w*y+_*g,t},perspective:function(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t},rotateX:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],p=e[9],c=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]=o*i+l*n,t[5]=a*i+p*n,t[6]=s*i+c*n,t[7]=u*i+h*n,t[8]=l*i-o*n,t[9]=p*i-a*n,t[10]=c*i-s*n,t[11]=h*i-u*n,t},rotateZ:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],p=e[5],c=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]=o*i+l*n,t[1]=a*i+p*n,t[2]=s*i+c*n,t[3]=u*i+h*n,t[4]=l*i-o*n,t[5]=p*i-a*n,t[6]=c*i-s*n,t[7]=h*i-u*n,t},invert:function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],p=e[8],c=e[9],h=e[10],f=e[11],y=e[12],d=e[13],v=e[14],m=e[15],g=r*s-n*a,x=r*u-i*a,b=r*l-o*a,w=n*u-i*s,_=n*l-o*s,A=i*l-o*u,k=p*d-c*y,z=p*v-h*y,S=p*m-f*y,M=c*v-h*d,V=c*m-f*d,B=h*m-f*v,C=g*B-x*V+b*M+w*S-_*z+A*k;return C?(C=1/C,t[0]=(s*B-u*V+l*M)*C,t[1]=(i*V-n*B-o*M)*C,t[2]=(d*A-v*_+m*w)*C,t[3]=(h*_-c*A-f*w)*C,t[4]=(u*S-a*B-l*z)*C,t[5]=(r*B-i*S+o*z)*C,t[6]=(v*b-y*A-m*x)*C,t[7]=(p*A-h*b+f*x)*C,t[8]=(a*V-s*S+l*k)*C,t[9]=(n*S-r*V-o*k)*C,t[10]=(y*_-d*b+m*g)*C,t[11]=(c*b-p*_-f*g)*C,t[12]=(s*z-a*M-u*k)*C,t[13]=(r*M-n*z+i*k)*C,t[14]=(d*x-y*w-v*g)*C,t[15]=(p*w-c*x+h*g)*C,t):null},ortho:function(t,e,r,n,i,o,a){var s=1/(e-r),u=1/(n-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*u,t[14]=(a+o)*l,t[15]=1,t}}});}),ei=(ti.vec3,ti.vec4),ri=(ti.mat2,ti.mat3,ti.mat4),ni=function(t){function e(e){t.call(this,e,Qn);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new qn(t)},e.prototype.queryRadius=function(t){var e=t;return Gn(\"circle-radius\",this,e)+Gn(\"circle-stroke-width\",this,e)+Yn(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a){for(var s=Wn(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),i.angle,o),u=this.paint.get(\"circle-radius\").evaluate(e)+this.paint.get(\"circle-stroke-width\").evaluate(e),l=\"map\"===this.paint.get(\"circle-pitch-alignment\"),p=l?s:function(t,e,r){return t.map(function(t){return t.map(function(t){return ii(t,e,r)})})}(s,a,i),c=l?u*o:u,h=0,f=r;h<f.length;h+=1)for(var y=0,d=f[h];y<d.length;y+=1){var v=d[y],m=l?v:ii(v,a,i),g=c,x=ei.transformMat4([],[v.x,v.y,0,1],a);if(\"viewport\"===this.paint.get(\"circle-pitch-scale\")&&\"map\"===this.paint.get(\"circle-pitch-alignment\")?g*=x[3]/i.cameraToCenterDistance:\"map\"===this.paint.get(\"circle-pitch-scale\")&&\"viewport\"===this.paint.get(\"circle-pitch-alignment\")&&(g*=i.cameraToCenterDistance/x[3]),Rn(p,m,g))return!0}return!1},e}(Nr);function ii(t,e,r){var n=ei.transformMat4([],[t.x,t.y,0,1],e);return new s((n[0]/n[3]+1)*r.width*.5,(n[1]/n[3]+1)*r.height*.5)}var oi=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(qn);function ai(t,e,r,n){var i=e.width,o=e.height;if(n){if(n.length!==i*o*r)throw new RangeError(\"mismatched image size\")}else n=new Uint8Array(i*o*r);return t.width=i,t.height=o,t.data=n,t}function si(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var o=ai({},{width:n,height:i},r);ui(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=o.data;}}function ui(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError(\"out of range source coordinates for image copy\");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError(\"out of range destination coordinates for image copy\");for(var a=t.data,s=e.data,u=0;u<i.height;u++)for(var l=((r.y+u)*t.width+r.x)*o,p=((n.y+u)*e.width+n.x)*o,c=0;c<i.width*o;c++)s[p+c]=a[l+c];return e}hr(\"HeatmapBucket\",oi,{omit:[\"layers\"]});var li=function(t,e){ai(this,t,1,e);};li.prototype.resize=function(t){si(this,t,1);},li.prototype.clone=function(){return new li({width:this.width,height:this.height},new Uint8Array(this.data))},li.copy=function(t,e,r,n,i){ui(t,e,r,n,i,1);};var pi=function(t,e){ai(this,t,4,e);};pi.prototype.resize=function(t){si(this,t,4);},pi.prototype.clone=function(){return new pi({width:this.width,height:this.height},new Uint8Array(this.data))},pi.copy=function(t,e,r,n,i){ui(t,e,r,n,i,4);},hr(\"AlphaImage\",li),hr(\"RGBAImage\",pi);var ci={paint:new Dr({\"heatmap-radius\":new qr(E.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new qr(E.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new jr(E.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new Ur(E.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new jr(E.paint_heatmap[\"heatmap-opacity\"])})};function hi(t,e){for(var r=new Uint8Array(1024),n={},i=0,o=0;i<256;i++,o+=4){n[e]=i/255;var a=t.evaluate(n);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a);}return new pi({width:256,height:1},r)}var fi=function(t){function e(e){t.call(this,e,ci),this._updateColorRamp();}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new oi(t)},e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\"heatmap-color\"===e&&this._updateColorRamp();},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[\"heatmap-color\"].value.expression;this.colorRamp=hi(t,\"heatmapDensity\"),this.colorRampTexture=null;},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null);},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\"heatmap-opacity\")&&\"none\"!==this.visibility},e}(Nr),yi={paint:new Dr({\"hillshade-illumination-direction\":new jr(E.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new jr(E.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new jr(E.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new jr(E.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new jr(E.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new jr(E.paint_hillshade[\"hillshade-accent-color\"])})},di=function(t){function e(e){t.call(this,e,yi);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\"hillshade-exaggeration\")&&\"none\"!==this.visibility},e}(Nr),vi=$r([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,mi=xi,gi=xi;function xi(t,e,r){r=r||2;var n,i,o,a,s,u,l,p=e&&e.length,c=p?e[0]*r:t.length,h=bi(t,0,c,r,!0),f=[];if(!h)return f;if(p&&(h=function(t,e,r,n){var i,o,a,s,u,l=[];for(i=0,o=e.length;i<o;i++)a=e[i]*n,s=i<o-1?e[i+1]*n:t.length,(u=bi(t,a,s,n,!1))===u.next&&(u.steiner=!0),l.push(Ci(u));for(l.sort(Mi),i=0;i<l.length;i++)Vi(l[i],r),r=wi(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=o=t[0],i=a=t[1];for(var y=r;y<c;y+=r)(s=t[y])<n&&(n=s),(u=t[y+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-n,a-i))?1/l:0;}return _i(h,f,r,n,i,l),f}function bi(t,e,r,n,i){var o,a;if(i===Ui(t,e,r,n)>0)for(o=e;o<r;o+=n)a=ji(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=ji(o,t[o],t[o+1],a);return a&&Pi(a,a.next)&&(qi(a),a=a.next),a}function wi(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Pi(n,n.next)&&0!==Fi(n.prev,n,n.next))n=n.next;else{if(qi(n),(n=e=n.prev)===n.next)break;r=!0;}}while(r||n!==e);return e}function _i(t,e,r,n,i,o,a){if(t){!a&&o&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Bi(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,o,a,s,u,l=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<l&&(s++,n=n.nextZ);e++);for(u=l;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n;}o.nextZ=null,l*=2;}while(a>1)}(i);}(t,n,i,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?ki(t,n,i,o):Ai(t))e.push(s.i/r),e.push(t.i/r),e.push(u.i/r),qi(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?_i(t=zi(t,e,r),e,r,n,i,o,2):2===a&&Si(t,e,r,n,i,o):_i(wi(t),e,r,n,i,o,1);break}}}function Ai(t){var e=t.prev,r=t,n=t.next;if(Fi(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Ii(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Fi(i.prev,i,i.next)>=0)return!1;i=i.next;}return!0}function ki(t,e,r,n){var i=t.prev,o=t,a=t.next;if(Fi(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,p=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,c=Bi(s,u,e,r,n),h=Bi(l,p,e,r,n),f=t.prevZ,y=t.nextZ;f&&f.z>=c&&y&&y.z<=h;){if(f!==t.prev&&f!==t.next&&Ii(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Fi(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,y!==t.prev&&y!==t.next&&Ii(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&Fi(y.prev,y,y.next)>=0)return!1;y=y.nextZ;}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&Ii(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Fi(f.prev,f,f.next)>=0)return!1;f=f.prevZ;}for(;y&&y.z<=h;){if(y!==t.prev&&y!==t.next&&Ii(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&Fi(y.prev,y,y.next)>=0)return!1;y=y.nextZ;}return!0}function zi(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!Pi(i,o)&&Ti(i,n,n.next,o)&&Oi(i,o)&&Oi(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),qi(n),qi(n.next),n=t=o),n=n.next;}while(n!==t);return n}function Si(t,e,r,n,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Ei(a,s)){var u=Li(a,s);return a=wi(a,a.next),u=wi(u,u.next),_i(a,e,r,n,i,o),void _i(u,e,r,n,i,o)}s=s.next;}a=a.next;}while(a!==t)}function Mi(t,e){return t.x-e.x}function Vi(t,e){if(e=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===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===a)return r.prev;var u,l=r,p=r.x,c=r.y,h=1/0;n=r.next;for(;n!==l;)i>=n.x&&n.x>=p&&i!==n.x&&Ii(o<c?i:a,o,p,c,o<c?a:i,o,n.x,n.y)&&((u=Math.abs(o-n.y)/(i-n.x))<h||u===h&&n.x>r.x)&&Oi(n,t)&&(r=n,h=u),n=n.next;return r}(t,e)){var r=Li(e,t);wi(r,r.next);}}function Bi(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ci(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next;}while(e!==t);return r}function Ii(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function Ei(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&&Ti(r,r.next,t,e))return!0;r=r.next;}while(r!==t);return!1}(t,e)&&Oi(t,e)&&Oi(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;}while(r!==t);return n}(t,e)}function Fi(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Pi(t,e){return t.x===e.x&&t.y===e.y}function Ti(t,e,r,n){return!!(Pi(t,e)&&Pi(r,n)||Pi(t,n)&&Pi(r,e))||Fi(t,e,r)>0!=Fi(t,e,n)>0&&Fi(r,n,t)>0!=Fi(r,n,e)>0}function Oi(t,e){return Fi(t.prev,t,t.next)<0?Fi(t,e,t.next)>=0&&Fi(t,t.prev,e)>=0:Fi(t,e,t.prev)<0||Fi(t,t.next,e)<0}function Li(t,e){var r=new Ri(t.i,t.x,t.y),n=new Ri(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function ji(t,e,r,n){var i=new Ri(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 qi(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 Ri(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 Ui(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}xi.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(Ui(t,0,o,r));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*r,p=s<u-1?e[s+1]*r:t.length;a-=Math.abs(Ui(t,l,p,r));}var c=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,f=n[s+1]*r,y=n[s+2]*r;c+=Math.abs((t[h]-t[y])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[y+1]-t[h+1]));}return 0===a&&0===c?0:Math.abs((c-a)/a)},xi.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 o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n));}return r},mi.default=gi;var Di=Zi,Ni=Zi;function Zi(t,e,r,n,i){!function t(e,r,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,s=r-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1),c=Math.max(n,Math.floor(r-s*l/a+p)),h=Math.min(i,Math.floor(r+(a-s)*l/a+p));t(e,r,c,h,o);}var f=e[r],y=n,d=i;for(Ki(e,n,r),o(e[i],f)>0&&Ki(e,n,i);y<d;){for(Ki(e,y,d),y++,d--;o(e[y],f)<0;)y++;for(;o(e[d],f)>0;)d--;}0===o(e[n],f)?Ki(e,n,d):Ki(e,++d,i),d<=r&&(n=d+1),r<=d&&(i=d-1);}}(t,e,r||0,n||t.length-1,i||Ji);}function Ki(t,e,r){var n=t[e];t[e]=t[r],t[r]=n;}function Ji(t,e){return t<e?-1:t>e?1:0}function $i(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,o=[],a=0;a<r;a++){var s=_(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&o.push(n),n=[t[a]]):n.push(t[a]));}if(n&&o.push(n),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(Di(o[u],e,1,o[u].length-1,Hi),o[u]=o[u].slice(0,e));return o}function Hi(t,e){return e.area-t.area}Di.default=Ni;var Xi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Xr,this.indexArray=new pn,this.indexArray2=new cn,this.programConfigurations=new En(vi,t.layers,t.zoom),this.segments=new zn,this.segments2=new zn;};Xi.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Br(this.zoom),o)){var u=Ln(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index);}}},Xi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Xi.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,vi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t);},Xi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy());},Xi.prototype.addFeature=function(t,e){for(var r=0,n=$i(e,500);r<n.length;r+=1){for(var i=n[r],o=0,a=0,s=i;a<s.length;a+=1){o+=s[a].length;}for(var u=this.segments.prepareSegment(o,this.layoutVertexArray,this.indexArray),l=u.vertexLength,p=[],c=[],h=0,f=i;h<f.length;h+=1){var y=f[h];if(0!==y.length){y!==i[0]&&c.push(p.length/2);var d=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),v=d.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(v+y.length-1,v),p.push(y[0].x),p.push(y[0].y);for(var m=1;m<y.length;m++)this.layoutVertexArray.emplaceBack(y[m].x,y[m].y),this.indexArray2.emplaceBack(v+m-1,v+m),p.push(y[m].x),p.push(y[m].y);d.vertexLength+=y.length,d.primitiveLength+=y.length;}}for(var g=mi(p,c),x=0;x<g.length;x+=3)this.indexArray.emplaceBack(l+g[x],l+g[x+1],l+g[x+2]);u.vertexLength+=o,u.primitiveLength+=g.length/3;}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t);},hr(\"FillBucket\",Xi,{omit:[\"layers\"]});var Gi={paint:new Dr({\"fill-antialias\":new jr(E.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new qr(E.paint_fill[\"fill-opacity\"]),\"fill-color\":new qr(E.paint_fill[\"fill-color\"]),\"fill-outline-color\":new qr(E.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new jr(E.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new jr(E.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new Rr(E.paint_fill[\"fill-pattern\"])})},Yi=function(t){function e(e){t.call(this,e,Gi);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values[\"fill-outline-color\"];\"constant\"===e.value.kind&&void 0===e.value.value&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"]);},e.prototype.createBucket=function(t){return new Xi(t)},e.prototype.queryRadius=function(){return Yn(this.paint.get(\"fill-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){return Un(Wn(t,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),i.angle,o),r)},e}(Nr),Wi=$r([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4).members,Qi=Math.pow(2,13);function to(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,2*Math.floor(n*Qi)+a,i*Qi*2,o*Qi*2,Math.round(s));}var eo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Yr,this.indexArray=new pn,this.programConfigurations=new En(Wi,t.layers,t.zoom),this.segments=new zn;};function ro(t,e){return t.x===e.x&&(t.x<0||t.x>Pn)||t.y===e.y&&(t.y<0||t.y>Pn)}function no(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Pn})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Pn})}eo.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Br(this.zoom),o)){var u=Ln(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index);}}},eo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},eo.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t);},eo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy());},eo.prototype.addFeature=function(t,e){for(var r=0,n=$i(e,500);r<n.length;r+=1){for(var i=n[r],o=0,a=0,s=i;a<s.length;a+=1){o+=s[a].length;}for(var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),l=0,p=i;l<p.length;l+=1){var c=p[l];if(0!==c.length&&!no(c))for(var h=0,f=0;f<c.length;f++){var y=c[f];if(f>=1){var d=c[f-1];if(!ro(y,d)){u.vertexLength+4>zn.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=y.sub(d)._perp()._unit(),m=d.dist(y);h+m>32768&&(h=0),to(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,0,h),to(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,1,h),h+=m,to(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,0,h),to(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,1,h);var g=u.vertexLength;this.indexArray.emplaceBack(g,g+1,g+2),this.indexArray.emplaceBack(g+1,g+2,g+3),u.vertexLength+=4,u.primitiveLength+=2;}}}}u.vertexLength+o>zn.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(o,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],w=u.vertexLength,_=0,A=i;_<A.length;_+=1){var k=A[_];if(0!==k.length){k!==i[0]&&b.push(x.length/2);for(var z=0;z<k.length;z++){var S=k[z];to(this.layoutVertexArray,S.x,S.y,0,0,1,1,0),x.push(S.x),x.push(S.y);}}}for(var M=mi(x,b),V=0;V<M.length;V+=3)this.indexArray.emplaceBack(w+M[V],w+M[V+1],w+M[V+2]);u.primitiveLength+=M.length/3,u.vertexLength+=o;}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t);},hr(\"FillExtrusionBucket\",eo,{omit:[\"layers\"]});var io={paint:new Dr({\"fill-extrusion-opacity\":new jr(E[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new qr(E[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new jr(E[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new jr(E[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new Rr(E[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new qr(E[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new qr(E[\"paint_fill-extrusion\"][\"fill-extrusion-base\"])})},oo=function(t){function e(e){t.call(this,e,io);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new eo(t)},e.prototype.queryRadius=function(){return Yn(this.paint.get(\"fill-extrusion-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){return Un(Wn(t,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),i.angle,o),r)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\"fill-extrusion-opacity\")&&\"none\"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null);},e}(Nr),ao=$r([{name:\"a_pos_normal\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4).members,so=uo;function uo(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(lo,this,e);}function lo(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);}function po(t){for(var e,r,n=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],n+=((r=t[a]).x-e.x)*(e.y+r.y);return n}uo.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],uo.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,a=0,u=[];t.pos<r;){if(i<=0){var l=t.readVarint();n=7&l,i=l>>3;}if(i--,1===n||2===n)o+=t.readSVarint(),a+=t.readSVarint(),1===n&&(e&&u.push(e),e=[]),e.push(new s(o,a));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone());}}return e&&u.push(e),u},uo.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(n<=0){var p=t.readVarint();r=7&p,n=p>>3;}if(n--,1===r||2===r)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==r)throw new Error(\"unknown command \"+r)}return[a,u,s,l]},uo.prototype.toGeoJSON=function(t,e,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=uo.types[this.type];function p(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90];}}switch(this.type){case 1:var c=[];for(n=0;n<u.length;n++)c[n]=u[n][0];p(u=c);break;case 2:for(n=0;n<u.length;n++)p(u[n]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],o=0;o<e;o++){var a=po(t[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(r&&i.push(r),r=[t[o]]):r.push(t[o]));}r&&i.push(r);return i}(u),n=0;n<u.length;n++)for(i=0;i<u[n].length;i++)p(u[n][i]);}1===u.length?u=u[0]:l=\"Multi\"+l;var h={type:\"Feature\",geometry:{type:l,coordinates:u},properties:this.properties};return\"id\"in this&&(h.id=this.id),h};var co=ho;function ho(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(fo,this,e),this.length=this._features.length;}function fo(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));}function yo(t,e,r){if(3===t){var n=new co(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n);}}ho.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 so(this._pbf,e,this.extent,this._keys,this._values)};var vo={VectorTile:function(t,e){this.layers=t.readFields(yo,{},e);},VectorTileFeature:so,VectorTileLayer:co},mo=vo.VectorTileFeature.types,go=63,xo=Math.cos(Math.PI/180*37.5),bo=.5,wo=Math.pow(2,14)/bo;function _o(t,e,r,n,i,o,a){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(go*r.x)+128,Math.round(go*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*bo&63)<<2,a*bo>>6);}var Ao=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Wr,this.indexArray=new pn,this.programConfigurations=new En(ao,t.layers,t.zoom),this.segments=new zn;};function ko(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(wo-1)}Ao.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Br(this.zoom),o)){var u=Ln(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index);}}},Ao.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ao.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ao),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t);},Ao.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy());},Ao.prototype.addFeature=function(t,e){for(var r=this.layers[0].layout,n=r.get(\"line-join\").evaluate(t),i=r.get(\"line-cap\"),o=r.get(\"line-miter-limit\"),a=r.get(\"line-round-limit\"),s=0,u=e;s<u.length;s+=1){var l=u[s];this.addLine(l,t,n,i,o,a);}},Ao.prototype.addLine=function(t,e,r,n,i,o){var a=null;e.properties&&e.properties.hasOwnProperty(\"mapbox_clip_start\")&&e.properties.hasOwnProperty(\"mapbox_clip_end\")&&(a={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s=\"Polygon\"===mo[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var l=0;l<u-1&&t[l].equals(t[l+1]);)l++;if(!(u<(s?3:2))){a&&(a.tileTotal=function(t,e,r){for(var n,i,o=0,a=e;a<r-1;a++)n=t[a],i=t[a+1],o+=n.dist(i);return o}(t,l,u)),\"bevel\"===r&&(i=1.05);var p=Pn/(512*this.overscaling)*15,c=t[l],h=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.distance=0;var f,y,d,v=n,m=s?\"butt\":n,g=!0,x=void 0,b=void 0,w=void 0,_=void 0;this.e1=this.e2=this.e3=-1,s&&(f=t[u-2],_=c.sub(f)._unit()._perp());for(var A=l;A<u;A++)if(!(b=s&&A===u-1?t[l+1]:t[A+1])||!t[A].equals(b)){_&&(w=_),f&&(x=f),f=t[A],_=b?b.sub(f)._unit()._perp():w;var k=(w=w||_).add(_);0===k.x&&0===k.y||k._unit();var z=k.x*_.x+k.y*_.y,S=0!==z?1/z:1/0,M=z<xo&&x&&b;if(M&&A>l){var V=f.dist(x);if(V>2*p){var B=f.sub(f.sub(x)._mult(p/V)._round());this.distance+=B.dist(x),this.addCurrentVertex(B,this.distance,w.mult(1),0,0,!1,h,a),x=B;}}var C=x&&b,I=C?r:b?v:m;if(C&&\"round\"===I&&(S<o?I=\"miter\":S<=2&&(I=\"fakeround\")),\"miter\"===I&&S>i&&(I=\"bevel\"),\"bevel\"===I&&(S>2&&(I=\"flipbevel\"),S<i&&(I=\"miter\")),x&&(this.distance+=f.dist(x)),\"miter\"===I)k._mult(S),this.addCurrentVertex(f,this.distance,k,0,0,!1,h,a);else if(\"flipbevel\"===I){if(S>100)k=_.clone().mult(-1);else{var E=w.x*_.y-w.y*_.x>0?-1:1,F=S*w.add(_).mag()/w.sub(_).mag();k._perp()._mult(F*E);}this.addCurrentVertex(f,this.distance,k,0,0,!1,h,a),this.addCurrentVertex(f,this.distance,k.mult(-1),0,0,!1,h,a);}else if(\"bevel\"===I||\"fakeround\"===I){var P=w.x*_.y-w.y*_.x>0,T=-Math.sqrt(S*S-1);if(P?(d=0,y=T):(y=0,d=T),g||this.addCurrentVertex(f,this.distance,w,y,d,!1,h,a),\"fakeround\"===I){for(var O=Math.floor(8*(.5-(z-.5))),L=void 0,j=0;j<O;j++)L=_.mult((j+1)/(O+1))._add(w)._unit(),this.addPieSliceVertex(f,this.distance,L,P,h,a);this.addPieSliceVertex(f,this.distance,k,P,h,a);for(var q=O-1;q>=0;q--)L=w.mult((q+1)/(O+1))._add(_)._unit(),this.addPieSliceVertex(f,this.distance,L,P,h,a);}b&&this.addCurrentVertex(f,this.distance,_,-y,-d,!1,h,a);}else\"butt\"===I?(g||this.addCurrentVertex(f,this.distance,w,0,0,!1,h,a),b&&this.addCurrentVertex(f,this.distance,_,0,0,!1,h,a)):\"square\"===I?(g||(this.addCurrentVertex(f,this.distance,w,1,1,!1,h,a),this.e1=this.e2=-1),b&&this.addCurrentVertex(f,this.distance,_,-1,-1,!1,h,a)):\"round\"===I&&(g||(this.addCurrentVertex(f,this.distance,w,0,0,!1,h,a),this.addCurrentVertex(f,this.distance,w,1,1,!0,h,a),this.e1=this.e2=-1),b&&(this.addCurrentVertex(f,this.distance,_,-1,-1,!0,h,a),this.addCurrentVertex(f,this.distance,_,0,0,!1,h,a)));if(M&&A<u-1){var R=f.dist(b);if(R>2*p){var U=f.add(b.sub(f)._mult(p/R)._round());this.distance+=U.dist(f),this.addCurrentVertex(U,this.distance,_.mult(1),0,0,!1,h,a),f=U;}}g=!1;}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e);}},Ao.prototype.addCurrentVertex=function(t,e,r,n,i,o,a,s){var u,l=this.layoutVertexArray,p=this.indexArray;s&&(e=ko(e,s)),u=r.clone(),n&&u._sub(r.perp()._mult(n)),_o(l,t,u,o,!1,n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,u=r.mult(-1),i&&u._sub(r.perp()._mult(i)),_o(l,t,u,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>wo/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,o,a));},Ao.prototype.addPieSliceVertex=function(t,e,r,n,i,o){r=r.mult(n?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=ko(e,o)),_o(a,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3;},hr(\"LineBucket\",Ao,{omit:[\"layers\"]});var zo=new Dr({\"line-cap\":new jr(E.layout_line[\"line-cap\"]),\"line-join\":new qr(E.layout_line[\"line-join\"]),\"line-miter-limit\":new jr(E.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new jr(E.layout_line[\"line-round-limit\"])}),So={paint:new Dr({\"line-opacity\":new qr(E.paint_line[\"line-opacity\"]),\"line-color\":new qr(E.paint_line[\"line-color\"]),\"line-translate\":new jr(E.paint_line[\"line-translate\"]),\"line-translate-anchor\":new jr(E.paint_line[\"line-translate-anchor\"]),\"line-width\":new qr(E.paint_line[\"line-width\"]),\"line-gap-width\":new qr(E.paint_line[\"line-gap-width\"]),\"line-offset\":new qr(E.paint_line[\"line-offset\"]),\"line-blur\":new qr(E.paint_line[\"line-blur\"]),\"line-dasharray\":new Rr(E.paint_line[\"line-dasharray\"]),\"line-pattern\":new Rr(E.paint_line[\"line-pattern\"]),\"line-gradient\":new Ur(E.paint_line[\"line-gradient\"])}),layout:zo},Mo=new(function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Br(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n){return r=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n)},e}(qr))(So.paint.properties[\"line-width\"].specification);Mo.useIntegerZoom=!0;var Vo=function(t){function e(e){t.call(this,e,So);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\"line-gradient\"===e&&this._updateGradient();},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=hi(t,\"lineProgress\"),this.gradientTexture=null;},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values[\"line-floorwidth\"]=Mo.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e);},e.prototype.createBucket=function(t){return new Ao(t)},e.prototype.queryRadius=function(t){var e=t,r=Bo(Gn(\"line-width\",this,e),Gn(\"line-gap-width\",this,e)),n=Gn(\"line-offset\",this,e);return r/2+Math.abs(n)+Yn(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){var a=Wn(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),i.angle,o),u=o/2*Bo(this.paint.get(\"line-width\").evaluate(e),this.paint.get(\"line-gap-width\").evaluate(e)),l=this.paint.get(\"line-offset\").evaluate(e);return l&&(r=function(t,e){for(var r=[],n=new s(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],u=0;u<o.length;u++){var l=o[u-1],p=o[u],c=o[u+1],h=0===u?n:p.sub(l)._unit()._perp(),f=u===o.length-1?n:c.sub(p)._unit()._perp(),y=h._add(f)._unit(),d=y.x*f.x+y.y*f.y;y._mult(1/d),a.push(y._mult(e)._add(p));}r.push(a);}return r}(r,l*o)),Dn(a,r,u)},e}(Nr);function Bo(t,e){return e>0?e+2*t:t}var Co=$r([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"}]),Io=$r([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Eo=($r([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),$r([{name:\"a_placed\",components:2,type:\"Uint8\"}],4)),Fo=($r([{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:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"},{type:\"Int16\",name:\"radius\"},{type:\"Int16\",name:\"signedDistanceFromAnchor\"}]),$r([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),Po=$r([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4);$r([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"hidden\"}]),$r([{type:\"Float32\",name:\"offsetX\"}]),$r([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function To(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r);return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),Vr.applyArabicShaping&&(t=Vr.applyArabicShaping(t)),t}var Oo={\"!\":\"︕\",\"#\":\"＃\",$:\"＄\",\"%\":\"％\",\"&\":\"＆\",\"(\":\"︵\",\")\":\"︶\",\"*\":\"＊\",\"+\":\"＋\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\"/\":\"／\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\"=\":\"＝\",\">\":\"﹀\",\"?\":\"︖\",\"@\":\"＠\",\"[\":\"﹇\",\"\\\\\":\"＼\",\"]\":\"﹈\",\"^\":\"＾\",_:\"︳\",\"`\":\"｀\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"～\",\"¢\":\"￠\",\"£\":\"￡\",\"¥\":\"￥\",\"¦\":\"￤\",\"¬\":\"￢\",\"¯\":\"￣\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"￦\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"！\":\"︕\",\"（\":\"︵\",\"）\":\"︶\",\"，\":\"︐\",\"－\":\"︲\",\"．\":\"・\",\"：\":\"︓\",\"；\":\"︔\",\"＜\":\"︿\",\"＞\":\"﹀\",\"？\":\"︖\",\"［\":\"﹇\",\"］\":\"﹈\",\"＿\":\"︳\",\"｛\":\"︷\",\"｜\":\"―\",\"｝\":\"︸\",\"｟\":\"︵\",\"｠\":\"︶\",\"｡\":\"︒\",\"｢\":\"﹁\",\"｣\":\"﹂\"};var Lo=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(s);function jo(t,e){var r=e.expression;if(\"constant\"===r.kind)return{functionType:\"constant\",layoutSize:r.evaluate(new Br(t+1))};if(\"source\"===r.kind)return{functionType:\"source\"};for(var n=r.zoomStops,i=0;i<n.length&&n[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<n.length&&n[o]<t+1;)o++;o=Math.min(n.length-1,o);var a={min:n[i],max:n[o]};return\"composite\"===r.kind?{functionType:\"composite\",zoomRange:a,propertyValue:e.value}:{functionType:\"camera\",layoutSize:r.evaluate(new Br(t+1)),zoomRange:a,sizeRange:{min:r.evaluate(new Br(a.min)),max:r.evaluate(new Br(a.max))},propertyValue:e.value}}hr(\"Anchor\",Lo);var qo=vo.VectorTileFeature.types,Ro=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function Uo(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),o,a,s?s[0]:0,s?s[1]:0);}function Do(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r);}var No=function(t){this.layoutVertexArray=new Qr,this.indexArray=new pn,this.programConfigurations=t,this.segments=new zn,this.dynamicLayoutVertexArray=new tn,this.opacityVertexArray=new en,this.placedSymbolArray=new mn;};No.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Co.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Io.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Ro,!0),this.opacityVertexBuffer.itemSize=1;},No.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy());},hr(\"SymbolBuffers\",No);var Zo=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new zn,this.collisionVertexArray=new on;};Zo.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Eo.members,!0);},Zo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy());},hr(\"CollisionBuffers\",Zo);var Ko=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=jo(this.zoom,e[\"text-size\"]),this.iconSizeData=jo(this.zoom,e[\"icon-size\"]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get(\"text-allow-overlap\")||r.get(\"icon-allow-overlap\")||r.get(\"text-ignore-placement\")||r.get(\"icon-ignore-placement\");};Ko.prototype.createArrays=function(){this.text=new No(new En(Co.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new No(new En(Co.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new Zo(nn,Fo.members,cn),this.collisionCircle=new Zo(nn,Po.members,pn),this.glyphOffsetArray=new xn,this.lineVertexArray=new wn;},Ko.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get(\"text-font\"),o=n.get(\"text-field\"),a=n.get(\"icon-image\"),s=(\"constant\"!==o.value.kind||o.value.value.length>0)&&(\"constant\"!==i.value.kind||i.value.value.length>0),u=\"constant\"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||u){for(var l=e.iconDependencies,p=e.glyphDependencies,c=new Br(this.zoom),h=0,f=t;h<f.length;h+=1){var y=f[h],d=y.feature,v=y.index,m=y.sourceLayerIndex;if(r._featureFilter(c,d)){var g=void 0;s&&(g=To(g=r.getValueAndResolveTokens(\"text-field\",d),r,d));var x=void 0;if(u&&(x=r.getValueAndResolveTokens(\"icon-image\",d)),g||x){var b={text:g,icon:x,index:v,sourceLayerIndex:m,geometry:Ln(d),properties:d.properties,type:qo[d.type]};if(void 0!==d.id&&(b.id=d.id),this.features.push(b),x&&(l[x]=!0),g)for(var w=i.evaluate(d).join(\",\"),_=p[w]=p[w]||{},A=\"map\"===n.get(\"text-rotation-alignment\")&&\"line\"===n.get(\"symbol-placement\"),k=gr(g),z=0;z<g.length;z++)if(_[g.charCodeAt(z)]=!0,A&&k){var S=Oo[g.charAt(z)];S&&(_[S.charCodeAt(0)]=!0);}}}}\"line\"===n.get(\"symbol-placement\")&&(this.features=function(t){var e={},r={},n=[],i=0;function o(e){n.push(t[e]),i++;}function a(t,e,i){var o=r[t];return delete r[t],r[e]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(i[0]),o}function s(t,r,i){var o=e[r];return delete e[r],e[t]=o,n[o].geometry[0].shift(),n[o].geometry[0]=i[0].concat(n[o].geometry[0]),o}function u(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\":\"+n.x+\":\"+n.y}for(var l=0;l<t.length;l++){var p=t[l],c=p.geometry,h=p.text;if(h){var f=u(h,c),y=u(h,c,!0);if(f in r&&y in e&&r[f]!==e[y]){var d=s(f,y,c),v=a(f,y,n[d].geometry);delete e[f],delete r[y],r[u(h,n[v].geometry,!0)]=v,n[d].geometry=null;}else f in r?a(f,y,c):y in e?s(f,y,c):(o(l),e[f]=i-1,r[y]=i-1);}else o(l);}return n.filter(function(t){return t.geometry})}(this.features));}},Ko.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Ko.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t);},Ko.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy();},Ko.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:n},a<e.length-1&&(n+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor);}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ko.prototype.addSymbols=function(t,e,r,n,i,o,a,s,u,l){for(var p=t.indexArray,c=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),y=this.glyphOffsetArray.length,d=f.vertexLength,v=0,m=e;v<m.length;v+=1){var g=m[v],x=g.tl,b=g.tr,w=g.bl,_=g.br,A=g.tex,k=f.vertexLength,z=g.glyphOffset[1];Uo(c,s.x,s.y,x.x,z+x.y,A.x,A.y,r),Uo(c,s.x,s.y,b.x,z+b.y,A.x+A.w,A.y,r),Uo(c,s.x,s.y,w.x,z+w.y,A.x,A.y+A.h,r),Uo(c,s.x,s.y,_.x,z+_.y,A.x+A.w,A.y+A.h,r),Do(h,s,0),p.emplaceBack(k,k+1,k+2),p.emplaceBack(k+1,k+2,k+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(g.glyphOffset[0]);}t.placedSymbolArray.emplaceBack(s.x,s.y,y,this.glyphOffsetArray.length-y,d,u,l,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o);},Ko.prototype._addCollisionDebugVertex=function(t,e,r,n,i){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n.x,n.y,Math.round(i.x),Math.round(i.y))},Ko.prototype.addCollisionDebugVertices=function(t,e,r,n,i,o,a,u){var l=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),p=l.vertexLength,c=i.layoutVertexArray,h=i.collisionVertexArray;if(this._addCollisionDebugVertex(c,h,o,a.anchor,new s(t,e)),this._addCollisionDebugVertex(c,h,o,a.anchor,new s(r,e)),this._addCollisionDebugVertex(c,h,o,a.anchor,new s(r,n)),this._addCollisionDebugVertex(c,h,o,a.anchor,new s(t,n)),l.vertexLength+=4,u){var f=i.indexArray;f.emplaceBack(p,p+1,p+2),f.emplaceBack(p,p+2,p+3),l.primitiveLength+=2;}else{var y=i.indexArray;y.emplaceBack(p,p+1),y.emplaceBack(p+1,p+2),y.emplaceBack(p+2,p+3),y.emplaceBack(p+3,p),l.primitiveLength+=4;}},Ko.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t<e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var n=0;n<2;n++){var i=r[0===n?\"textCollisionFeature\":\"iconCollisionFeature\"];if(i)for(var o=i.boxStartIndex;o<i.boxEndIndex;o++){var a=this.collisionBoxArray.get(o),s=a.x1,u=a.y1,l=a.x2,p=a.y2,c=a.radius>0;this.addCollisionDebugVertices(s,u,l,p,c?this.collisionCircle:this.collisionBox,a.anchorPoint,r,c);}}}},Ko.prototype.deserializeCollisionBoxes=function(t,e,r,n,i){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex);o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1);}for(var u=n;u<i;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY},o.iconFeatureIndex=l.featureIndex;break}}return o},Ko.prototype.hasTextData=function(){return this.text.segments.get().length>0},Ko.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ko.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ko.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ko.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],n=0;n<this.symbolInstances.length;n++)r.push(n);var i=Math.sin(t),o=Math.cos(t);r.sort(function(t,r){var n=e.symbolInstances[t],a=e.symbolInstances[r];return(i*n.anchor.x+o*n.anchor.y|0)-(i*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-n.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var a=0,s=r;a<s.length;a+=1){var u=s[a],l=e.symbolInstances[u];e.featureSortOrder.push(l.featureIndex);for(var p=0,c=l.placedTextSymbolIndices;p<c.length;p+=1)for(var h=c[p],f=e.text.placedSymbolArray.get(h),y=f.vertexStartIndex+4*f.numGlyphs,d=f.vertexStartIndex;d<y;d+=4)e.text.indexArray.emplaceBack(d,d+1,d+2),e.text.indexArray.emplaceBack(d+1,d+2,d+3);var v=e.icon.placedSymbolArray.get(u);if(v.numGlyphs){var m=v.vertexStartIndex;e.icon.indexArray.emplaceBack(m,m+1,m+2),e.icon.indexArray.emplaceBack(m+1,m+2,m+3);}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray);}},hr(\"SymbolBucket\",Ko,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"],shallow:[\"symbolInstances\"]}),Ko.MAX_GLYPHS=65535,Ko.addDynamicAttributes=Do;var Jo=new Dr({\"symbol-placement\":new jr(E.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new jr(E.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new jr(E.layout_symbol[\"symbol-avoid-edges\"]),\"icon-allow-overlap\":new jr(E.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new jr(E.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new jr(E.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new jr(E.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new qr(E.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new jr(E.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new jr(E.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new qr(E.layout_symbol[\"icon-image\"]),\"icon-rotate\":new qr(E.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new jr(E.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new jr(E.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new qr(E.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new qr(E.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new jr(E.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new jr(E.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new jr(E.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new qr(E.layout_symbol[\"text-field\"]),\"text-font\":new qr(E.layout_symbol[\"text-font\"]),\"text-size\":new qr(E.layout_symbol[\"text-size\"]),\"text-max-width\":new qr(E.layout_symbol[\"text-max-width\"]),\"text-line-height\":new jr(E.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new qr(E.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new qr(E.layout_symbol[\"text-justify\"]),\"text-anchor\":new qr(E.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new jr(E.layout_symbol[\"text-max-angle\"]),\"text-rotate\":new qr(E.layout_symbol[\"text-rotate\"]),\"text-padding\":new jr(E.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new jr(E.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new qr(E.layout_symbol[\"text-transform\"]),\"text-offset\":new qr(E.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new jr(E.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new jr(E.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new jr(E.layout_symbol[\"text-optional\"])}),$o={paint:new Dr({\"icon-opacity\":new qr(E.paint_symbol[\"icon-opacity\"]),\"icon-color\":new qr(E.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new qr(E.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new qr(E.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new qr(E.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new jr(E.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new jr(E.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new qr(E.paint_symbol[\"text-opacity\"]),\"text-color\":new qr(E.paint_symbol[\"text-color\"]),\"text-halo-color\":new qr(E.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new qr(E.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new qr(E.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new jr(E.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new jr(E.paint_symbol[\"text-translate-anchor\"])}),layout:Jo},Ho=function(t){function e(e){t.call(this,e,$o);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"line\"===this.layout.get(\"symbol-placement\")?this.layout._values[\"icon-rotation-alignment\"]=\"map\":this.layout._values[\"icon-rotation-alignment\"]=\"viewport\"),\"auto\"===this.layout.get(\"text-rotation-alignment\")&&(\"line\"===this.layout.get(\"symbol-placement\")?this.layout._values[\"text-rotation-alignment\"]=\"map\":this.layout._values[\"text-rotation-alignment\"]=\"viewport\"),\"auto\"===this.layout.get(\"text-pitch-alignment\")&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")),\"auto\"===this.layout.get(\"icon-pitch-alignment\")&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\"));},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||be(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):\"\"}))},e.prototype.createBucket=function(t){return new Ko(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Nr),Xo={paint:new Dr({\"background-color\":new jr(E.paint_background[\"background-color\"]),\"background-pattern\":new Rr(E.paint_background[\"background-pattern\"]),\"background-opacity\":new jr(E.paint_background[\"background-opacity\"])})},Go=function(t){function e(e){t.call(this,e,Xo);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nr),Yo={paint:new Dr({\"raster-opacity\":new jr(E.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new jr(E.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new jr(E.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new jr(E.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new jr(E.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new jr(E.paint_raster[\"raster-contrast\"]),\"raster-fade-duration\":new jr(E.paint_raster[\"raster-fade-duration\"])})},Wo={circle:ni,heatmap:fi,hillshade:di,fill:Yi,\"fill-extrusion\":oo,line:Vo,symbol:Ho,background:Go,raster:function(t){function e(e){t.call(this,e,Yo);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nr)};var Qo=n(function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0;}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,o,a=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&&n){if(!(o=this.packOne(r,n,i)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o);}return this.shrink(),a},t.prototype.packOne=function(t,r,n){var i,o,a,s,u,l,p,c,h={freebin:-1,shelf:-1,waste:1/0},f=0;if(\"string\"==typeof n||\"number\"==typeof n){if(i=this.getBin(n))return this.ref(i),i;\"number\"==typeof n&&(this.maxId=Math.max(n,this.maxId));}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(r===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,r,n);r>i.maxh||t>i.maxw||r<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*r)<h.waste&&(h.waste=a,h.freebin=s);}for(s=0;s<this.shelves.length;s++)if(f+=(o=this.shelves[s]).h,!(t>o.free)){if(r===o.h)return this.allocShelf(s,t,r,n);r>o.h||r<o.h&&(a=(o.h-r)*t)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=s);}return-1!==h.freebin?this.allocFreebin(h.freebin,t,r,n):-1!==h.shelf?this.allocShelf(h.shelf,t,r,n):r<=this.h-f&&t<=this.w?(o=new e(f,this.w,r),this.allocShelf(this.shelves.push(o)-1,t,r,n)):this.autoResize?(u=l=this.h,((p=c=this.w)<=u||t>p)&&(c=2*Math.max(t,p)),(u<p||r>u)&&(l=2*Math.max(r,u)),this.resize(c,l),this.packOne(t,r,n)):null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t].alloc(e,r,n);return this.bins[n]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t);}this.resize(t,e);}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e]);}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0;},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,r){if(t>this.free||e>this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new function(t,e,r,n,i,o,a){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=o||n,this.maxh=a||i,this.refcount=0;}(r,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}();}),ta=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r;},ea={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};ea.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ea.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ea.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(ta.prototype,ea);var ra=function(t){var e=new pi({width:0,height:0}),r={},n=new Qo(0,0,{autoResize:!0});for(var i in t){var o=t[i],a=n.packOne(o.data.width+2,o.data.height+2);e.resize({width:n.w,height:n.h}),pi.copy(o.data,e,{x:0,y:0},{x:a.x+1,y:a.y+1},o.data),r[i]=new ta(a,o);}n.shrink(),e.resize({width:n.w,height:n.h}),this.image=e,this.positions=r;};hr(\"ImagePosition\",ta),hr(\"ImageAtlas\",ra);var na=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,p=-7,c=r?i-1:0,h=r?-1:1,f=t[e+c];for(c+=h,o=f&(1<<-p)-1,f>>=-p,p+=s;p>0;o=256*o+t[e+c],c+=h,p-=8);for(a=o&(1<<-p)-1,o>>=-p,p+=n;p>0;a=256*a+t[e+c],c+=h,p-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=l;}return(f?-1:1)*a*Math.pow(2,o-n)},ia=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,p=(1<<l)-1,c=p>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,y=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=p?(s=0,a=p):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=y,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[r+f]=255&a,f+=y,a/=256,l-=8);t[r+f-y]|=128*d;},oa=aa;function aa(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length;}aa.Varint=0,aa.Fixed64=1,aa.Bytes=2,aa.Fixed32=5;function sa(t){return t.type===aa.Bytes?t.readVarint()+t.pos:t.pos+1}function ua(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function la(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i];}function pa(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r]);}function ca(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r]);}function ha(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r]);}function fa(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r]);}function ya(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r]);}function da(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r]);}function va(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r]);}function ma(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r]);}function ga(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r]);}function xa(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function ba(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24;}function wa(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}aa.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,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n);}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=xa(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wa(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=xa(this.buf,this.pos)+4294967296*xa(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=xa(this.buf,this.pos)+4294967296*wa(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=na(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=na(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(i=o[r.pos++],n=(112&i)>>4,i<128)return ua(t,n,e);if(i=o[r.pos++],n|=(127&i)<<3,i<128)return ua(t,n,e);if(i=o[r.pos++],n|=(127&i)<<10,i<128)return ua(t,n,e);if(i=o[r.pos++],n|=(127&i)<<17,i<128)return ua(t,n,e);if(i=o[r.pos++],n|=(127&i)<<24,i<128)return ua(t,n,e);if(i=o[r.pos++],n|=(1&i)<<31,i<128)return ua(t,n,e);throw new Error(\"Expected varint not more than 10 bytes\")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},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=function(t,e,r){var n=\"\",i=e;for(;i<r;){var o,a,s,u=t[i],l=null,p=u>239?4:u>223?3:u>191?2:1;if(i+p>r)break;1===p?u<128&&(l=u):2===p?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===p?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===p&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,p=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=p;}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=sa(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=sa(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===aa.Varint)for(;this.buf[this.pos++]>127;);else if(e===aa.Bytes)this.pos=this.readVarint()+this.pos;else if(e===aa.Fixed32)this.pos+=4;else{if(e!==aa.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 Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e;}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),ba(this.buf,t,this.pos),this.pos+=4;},writeSFixed32:function(t){this.realloc(4),ba(this.buf,t,this.pos),this.pos+=4;},writeFixed64:function(t){this.realloc(8),ba(this.buf,-1&t,this.pos),ba(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8;},writeSFixed64:function(t){this.realloc(8),ba(this.buf,-1&t,this.pos),ba(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8;},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error(\"Given varint doesn't fit into 10 bytes\");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t;}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t;}(n,e);}(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),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null;}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128);}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&la(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r;},writeFloat:function(t){this.realloc(4),ia(this.buf,t,this.pos,!0,23,4),this.pos+=4;},writeDouble:function(t){this.realloc(8),ia(this.buf,t,this.pos,!0,52,8),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&&la(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n;},writeMessage:function(t,e,r){this.writeTag(t,aa.Bytes),this.writeRawMessage(e,r);},writePackedVarint:function(t,e){this.writeMessage(t,pa,e);},writePackedSVarint:function(t,e){this.writeMessage(t,ca,e);},writePackedBoolean:function(t,e){this.writeMessage(t,ya,e);},writePackedFloat:function(t,e){this.writeMessage(t,ha,e);},writePackedDouble:function(t,e){this.writeMessage(t,fa,e);},writePackedFixed32:function(t,e){this.writeMessage(t,da,e);},writePackedSFixed32:function(t,e){this.writeMessage(t,va,e);},writePackedFixed64:function(t,e){this.writeMessage(t,ma,e);},writePackedSFixed64:function(t,e){this.writeMessage(t,ga,e);},writeBytesField:function(t,e){this.writeTag(t,aa.Bytes),this.writeBytes(e);},writeFixed32Field:function(t,e){this.writeTag(t,aa.Fixed32),this.writeFixed32(e);},writeSFixed32Field:function(t,e){this.writeTag(t,aa.Fixed32),this.writeSFixed32(e);},writeFixed64Field:function(t,e){this.writeTag(t,aa.Fixed64),this.writeFixed64(e);},writeSFixed64Field:function(t,e){this.writeTag(t,aa.Fixed64),this.writeSFixed64(e);},writeVarintField:function(t,e){this.writeTag(t,aa.Varint),this.writeVarint(e);},writeSVarintField:function(t,e){this.writeTag(t,aa.Varint),this.writeSVarint(e);},writeStringField:function(t,e){this.writeTag(t,aa.Bytes),this.writeString(e);},writeFloatField:function(t,e){this.writeTag(t,aa.Fixed32),this.writeFloat(e);},writeDoubleField:function(t,e){this.writeTag(t,aa.Fixed64),this.writeDouble(e);},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e));}};var _a=3;function Aa(t,e,r){1===t&&r.readMessage(ka,e);}function ka(t,e,r){if(3===t){var n=r.readMessage(za,{}),i=n.id,o=n.bitmap,a=n.width,s=n.height,u=n.left,l=n.top,p=n.advance;e.push({id:i,bitmap:new li({width:a+2*_a,height:s+2*_a},o),metrics:{width:a,height:s,left:u,top:l,advance:p}});}}function za(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());}var Sa=_a,Ma=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,y([\"receive\"],this),this.target.addEventListener(\"message\",this.receive,!1);};Ma.prototype.send=function(t,e,r,n){var i=r?this.mapId+\":\"+this.callbackID++:null;r&&(this.callbacks[i]=r);var o=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(i),data:yr(e,o)},o);},Ma.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var o=function(t,e){var n=[];r.target.postMessage({sourceMapId:r.mapId,type:\"<response>\",id:String(i),error:t?yr(t):null,data:yr(e,n)},n);};if(\"<response>\"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(dr(n.error)):e&&e(null,dr(n.data));else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.sourceMapId,dr(n.data),o);else if(void 0!==n.id&&this.parent.getWorkerSource){var a=n.type.split(\".\");this.parent.getWorkerSource(n.sourceMapId,a[0],a[1])[a[2]](dr(n.data),o);}else this.parent[n.type](dr(n.data));}},Ma.prototype.remove=function(){this.target.removeEventListener(\"message\",this.receive,!1);};var Va=r(n(function(t,e){!function(t){function e(t,e,n){e=Math.pow(2,n)-e-1;var i=r(256*t,256*e,n),o=r(256*(t+1),256*(e+1),n);return i[0]+\",\"+i[1]+\",\"+o[0]+\",\"+o[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r),i=t*n-2*Math.PI*6378137/2,o=e*n-2*Math.PI*6378137/2;return[i,o]}t.getURL=function(t,r,n,i,o,a){return a=a||{},t+\"?\"+[\"bbox=\"+e(n,i,o),\"format=\"+(a.format||\"image/png\"),\"service=\"+(a.service||\"WMS\"),\"version=\"+(a.version||\"1.1.1\"),\"request=\"+(a.request||\"GetMap\"),\"srs=\"+(a.srs||\"EPSG:3857\"),\"width=\"+(a.width||256),\"height=\"+(a.height||256),\"layers=\"+r].join(\"&\")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,\"__esModule\",{value:!0});}(e);})),Ba=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Ea(0,t,e,r);};Ba.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Ba.prototype.url=function(t,e){var r=Va.getTileBBox(this.x,this.y,this.z),n=function(t,e,r){for(var n,i=\"\",o=t;o>0;o--)i+=(e&(n=1<<o-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}\",String(this.z)).replace(\"{x}\",String(this.x)).replace(\"{y}\",String(\"tms\"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(\"{quadkey}\",n).replace(\"{bbox-epsg-3857}\",r)};var Ca=function(t,e){this.wrap=t,this.canonical=e,this.key=Ea(t,e.z,e.x,e.y);},Ia=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Ba(r,+n,+i),this.key=Ea(e,t,n,i);};function Ea(t,e,r,n){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*n+r)+e}Ia.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Ia.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Ia(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ia(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Ia.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Ia.prototype.children=function(t){if(this.overscaledZ>=t)return[new Ia(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Ia(e,this.wrap,e,r,n),new Ia(e,this.wrap,e,r+1,n),new Ia(e,this.wrap,e,r,n+1),new Ia(e,this.wrap,e,r+1,n+1)]},Ia.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Ia.prototype.wrapped=function(){return new Ia(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Ia.prototype.unwrapTo=function(t){return new Ia(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Ia.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Ia.prototype.toUnwrapped=function(){return new Ca(this.wrap,this.canonical)},Ia.prototype.toString=function(){return this.overscaledZ+\"/\"+this.canonical.x+\"/\"+this.canonical.y},Ia.prototype.toCoordinate=function(){return new a(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},hr(\"CanonicalTileID\",Ba),hr(\"OverscaledTileID\",Ia,{omit:[\"posMatrix\"]});var Fa=function(t,e,r){if(t<=0)throw new RangeError(\"Level must have positive dimension\");this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border));};Fa.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536;},Fa.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Fa.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+this.border)*this.stride+(t+this.border)},hr(\"Level\",Fa);var Pa=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new Fa(256,512),this.loaded=!!r;};Pa.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError(\"DEM tiles must be square\");if(e&&\"mapbox\"!==e&&\"terrarium\"!==e)return b('\"'+e+'\" is not a valid encoding type. Valid types include \"mapbox\" and \"terrarium\".');var r=this.level=new Fa(t.width,t.width/2),n=t.data;this._unpackData(r,n,e||\"mapbox\");for(var i=0;i<r.dim;i++)r.set(-1,i,r.get(0,i)),r.set(r.dim,i,r.get(r.dim-1,i)),r.set(i,-1,r.get(i,0)),r.set(i,r.dim,r.get(i,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0;},Pa.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Pa.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Pa.prototype._unpackData=function(t,e,r){for(var n={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],i=0;i<t.dim;i++)for(var o=0;o<t.dim;o++){var a=4*(i*t.dim+o);t.set(o,i,this.scale*n(e[a],e[a+1],e[a+2]));}},Pa.prototype.getPixels=function(){return new pi({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Pa.prototype.backfillBorder=function(t,e,r){var n=this.level,i=t.level;if(n.dim!==i.dim)throw new Error(\"level mismatch (dem dimension)\");var o=e*n.dim,a=e*n.dim+n.dim,s=r*n.dim,u=r*n.dim+n.dim;switch(e){case-1:o=a-1;break;case 1:a=o+1;}switch(r){case-1:s=u-1;break;case 1:u=s+1;}for(var l=c(o,-n.border,n.dim+n.border),p=c(a,-n.border,n.dim+n.border),h=c(s,-n.border,n.dim+n.border),f=c(u,-n.border,n.dim+n.border),y=-e*n.dim,d=-r*n.dim,v=h;v<f;v++)for(var m=l;m<p;m++)n.set(m,v,i.get(m+y,v+d));},hr(\"DEMData\",Pa);var Ta=function(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;}};Ta.prototype.encode=function(t){return this._stringToNumber[t]},Ta.prototype.decode=function(t){return this._numberToString[t]};var Oa=function(t,e,r,n){this.type=\"Feature\",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id);},La={geometry:{configurable:!0}};La.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},La.geometry.set=function(t){this._geometry=t;},Oa.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)\"_geometry\"!==e&&\"_vectorTileFeature\"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Oa.prototype,La);var ja=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new sr(Pn,16,0),this.featureIndexArray=r||new An;};function qa(t,e){return e-t}ja.prototype.insert=function(t,e,r,n,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var a=0;a<e.length;a++){for(var s=e[a],u=[1/0,1/0,-1/0,-1/0],l=0;l<s.length;l++){var p=s[l];u[0]=Math.min(u[0],p.x),u[1]=Math.min(u[1],p.y),u[2]=Math.max(u[2],p.x),u[3]=Math.max(u[3],p.y);}u[0]<Pn&&u[1]<Pn&&u[2]>=0&&u[3]>=0&&this.grid.insert(o,u[0],u[1],u[2],u[3]);}},ja.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vo.VectorTile(new oa(this.rawTileData)).layers,this.sourceLayerCoder=new Ta(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},ja.prototype.query=function(t,e){var r=this;this.loadVTLayers();for(var n=t.params||{},i=Pn/t.tileSize/t.scale,o=Te(n.filter),a=t.queryGeometry,s=t.queryPadding*i,u=1/0,l=1/0,p=-1/0,c=-1/0,h=0;h<a.length;h++)for(var f=a[h],y=0;y<f.length;y++){var d=f[y];u=Math.min(u,d.x),l=Math.min(l,d.y),p=Math.max(p,d.x),c=Math.max(c,d.y);}var v=this.grid.query(u-s,l-s,p+s,c+s);v.sort(qa);for(var m,g={},x=function(s){var u=v[s];if(u!==m){m=u;var l=r.featureIndexArray.get(u),p=null;r.loadMatchingFeature(g,l.bucketIndex,l.sourceLayerIndex,l.featureIndex,o,n.layers,e,function(e,n){return p||(p=Ln(e)),n.queryIntersectsFeature(a,e,p,r.z,t.transform,i,t.posMatrix)});}},b=0;b<v.length;b++)x(b);return g},ja.prototype.loadMatchingFeature=function(t,e,r,n,i,o,a,s){var u=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,u)){var l=this.sourceLayerCoder.decode(r),p=this.vtLayers[l].feature(n);if(i(new Br(this.tileID.overscaledZ),p))for(var c=0;c<u.length;c++){var h=u[c];if(!(o&&o.indexOf(h)<0)){var f=a[h];if(f&&(!s||s(p,f))){var y=new Oa(p,this.z,this.x,this.y);y.layer=f.serialize();var d=t[h];void 0===d&&(d=t[h]=[]),d.push({featureIndex:n,feature:y});}}}}},ja.prototype.lookupSymbolFeatures=function(t,e,r,n,i,o){var a={};this.loadVTLayers();for(var s=Te(n),u=0,l=t;u<l.length;u+=1){var p=l[u];this.loadMatchingFeature(a,e,r,p,s,i,o);}return a},ja.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1){if(t===i[n])return!0}return!1},hr(\"FeatureIndex\",ja,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});var Ra={horizontal:1,vertical:2,horizontalOnly:3};var Ua={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Da={};function Na(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function Za(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Ka(t,e,r,n,i,o){for(var a=null,s=Na(e,r,i,o),u=0,l=n;u<l.length;u+=1){var p=l[u],c=Na(e-p.x,r,i,o)+p.badness;c<=s&&(a=p,s=c);}return{index:t,x:e,priorBreak:a,badness:s}}function Ja(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,o=[],a=function(t,e,r,n){for(var i=0,o=0;o<t.length;o++){var a=n[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e);}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,u=0;u<t.length;u++){var l=t.charCodeAt(u),p=n[l];p&&!Ua[l]&&(s+=p.metrics.advance+e),u<t.length-1&&(Da[l]||!((i=l)<11904)&&(mr[\"Bopomofo Extended\"](i)||mr.Bopomofo(i)||mr[\"CJK Compatibility Forms\"](i)||mr[\"CJK Compatibility Ideographs\"](i)||mr[\"CJK Compatibility\"](i)||mr[\"CJK Radicals Supplement\"](i)||mr[\"CJK Strokes\"](i)||mr[\"CJK Symbols and Punctuation\"](i)||mr[\"CJK Unified Ideographs Extension A\"](i)||mr[\"CJK Unified Ideographs\"](i)||mr[\"Enclosed CJK Letters and Months\"](i)||mr[\"Halfwidth and Fullwidth Forms\"](i)||mr.Hiragana(i)||mr[\"Ideographic Description Characters\"](i)||mr[\"Kangxi Radicals\"](i)||mr[\"Katakana Phonetic Extensions\"](i)||mr.Katakana(i)||mr[\"Vertical Forms\"](i)||mr[\"Yi Radicals\"](i)||mr[\"Yi Syllables\"](i)))&&o.push(Ka(u+1,s,a,o,Za(l,t.charCodeAt(u+1)),!1));}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Ka(t.length,s,a,o,0,!0))}function $a(t){var e=.5,r=.5;switch(t){case\"right\":case\"top-right\":case\"bottom-right\":e=1;break;case\"left\":case\"top-left\":case\"bottom-left\":e=0;}switch(t){case\"bottom\":case\"bottom-right\":case\"bottom-left\":r=1;break;case\"top\":case\"top-right\":case\"top-left\":r=0;}return{horizontalAlign:e,verticalAlign:r}}function Ha(t,e,r,n,i){if(i){var o=e[t[n].glyph];if(o)for(var a=o.metrics.advance,s=(t[n].x+a)*i,u=r;u<=n;u++)t[u].x-=s;}}Da[10]=!0,Da[32]=!0,Da[38]=!0,Da[40]=!0,Da[41]=!0,Da[43]=!0,Da[45]=!0,Da[47]=!0,Da[173]=!0,Da[183]=!0,Da[8203]=!0,Da[8208]=!0,Da[8211]=!0,Da[8231]=!0,t.commonjsGlobal=e,t.unwrapExports=r,t.createCommonjsModule=n,t.default=self,t.default$1=s,t.getJSON=function(t,e){var r=z(t);return r.setRequestHeader(\"Accept\",\"application/json\"),r.onerror=function(){e(new Error(r.statusText));},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var n;try{n=JSON.parse(r.response);}catch(t){return e(t)}e(null,n);}else 401===r.status&&t.url.match(/mapbox.com/)?e(new k(r.statusText+\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens\",r.status,t.url)):e(new k(r.statusText,r.status,t.url));},r.send(),r},t.getImage=function(t,e){return S(t,function(t,r){if(t)e(t);else if(r){var n=new self.Image,i=self.URL||self.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src);};var o=new self.Blob([new Uint8Array(r.data)],{type:\"image/png\"});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(o):\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";}})},t.ResourceType=A,t.RGBAImage=pi,t.default$2=Qo,t.ImagePosition=ta,t.getArrayBuffer=S,t.default$3=function(t){return new oa(t).readFields(Aa,[])},t.default$4=mr,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--n&&r(o,i);});});},t.AlphaImage=li,t.default$5=E,t.endsWith=d,t.extend=h,t.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},t.Evented=I,t.validateStyle=rr,t.validateLight=nr,t.emitValidationErrors=ar,t.default$6=Q,t.number=wt,t.Properties=Dr,t.Transitionable=Er,t.Transitioning=Pr,t.PossiblyEvaluated=Lr,t.DataConstantProperty=jr,t.warnOnce=b,t.uniqueId=function(){return f++},t.default$7=Ma,t.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},t.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},t.clamp=c,t.Event=B,t.ErrorEvent=C,t.OverscaledTileID=Ia,t.default$8=Pn,t.createLayout=$r,t.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-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),i=Math.max(i,t[o].row);var s=n-e,u=i-r,l=Math.max(s,u),p=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new a((e+n)/2,(r+i)/2,0).zoomTo(p)},t.CanonicalTileID=Ba,t.RasterBoundsArray=Gr,t.getVideo=function(t,e){var r,n,i=self.document.createElement(\"video\");i.onloadstart=function(){e(null,i);};for(var o=0;o<t.length;o++){var a=self.document.createElement(\"source\");r=t[o],n=void 0,(n=self.document.createElement(\"a\")).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(i.crossOrigin=\"Anonymous\"),a.src=t[o],i.appendChild(a);}return i},t.default$9=F,t.bindAll=y,t.default$10=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},t.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,function(t,r,n,i){var o=n||i;return e[r]=!o||o.toLowerCase(),\"\"}),e[\"max-age\"]){var r=parseInt(e[\"max-age\"],10);isNaN(r)?delete e[\"max-age\"]:e[\"max-age\"]=r;}return e},t.default$11=ja,t.default$12=Oa,t.default$13=Te,t.default$14=Ko,t.CollisionBoxArray=dn,t.default$15=zn,t.TriangleIndexArray=pn,t.default$16=Br,t.default$17=a,t.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},t.default$18=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"],t.mat4=ri,t.vec4=ei,t.getSizeData=jo,t.evaluateSizeForFeature=function(t,e,r){var n=e;return\"source\"===t.functionType?r.lowerSize/10:\"composite\"===t.functionType?wt(r.lowerSize/10,r.upperSize/10,n.uSizeT):n.uSize},t.evaluateSizeForZoom=function(t,e,r){if(\"constant\"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if(\"source\"===t.functionType)return{uSizeT:0,uSize:0};if(\"camera\"===t.functionType){var n=t.propertyValue,i=t.zoomRange,o=t.sizeRange,a=c(Se(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,u=t.zoomRange;return{uSizeT:c(Se(s,r.specification).interpolationFactor(e,u.min,u.max),0,1),uSize:0}},t.addDynamicAttributes=Do,t.default$19=$o,t.WritingMode=Ra,t.multiPolygonIntersectsBufferedPoint=Rn,t.multiPolygonIntersectsMultiPolygon=Un,t.multiPolygonIntersectsBufferedMultiLine=Dn,t.polygonIntersectsPolygon=function(t,e){for(var r=0;r<t.length;r++)if(Xn(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(Xn(t,e[n]))return!0;return!!Zn(t,e)},t.distToSegmentSquared=$n,t.default$20=ti,t.default$21=Nr,t.default$22=function(t){return new Wo[t.type](t)},t.clone=g,t.filterObject=m,t.mapObject=v,t.registerForPluginAvailability=function(t){return zr?t({pluginURL:zr,completionCallback:Ar}):Mr.once(\"pluginAvailable\",t),t},t.evented=Mr,t.default$23=vr,t.default$24=In,t.PosArray=Xr,t.UnwrappedTileID=Ca,t.ease=p,t.bezier=l,t.setRTLTextPlugin=function(t,e){if(kr)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");kr=!0,zr=t,Ar=function(t){t?(kr=!1,zr=null,e&&e(t)):Sr=!0;},Mr.fire(new B(\"pluginAvailable\",{pluginURL:zr,completionCallback:Ar}));},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.default$25=Lo,t.register=hr,t.GLYPH_PBF_BORDER=Sa,t.shapeText=function(t,e,r,n,i,o,a,s,u,l){var p=t.trim();l===Ra.vertical&&(p=function(t){for(var e=\"\",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&wr(n)&&!Oo[t[r+1]]||i&&wr(i)&&!Oo[t[r-1]]||!Oo[t[r]]?e+=t[r]:e+=Oo[t[r]];}return e}(p));var c=[],h={positionedGlyphs:c,text:p,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:l},f=Vr.processBidirectionalText;return function(t,e,r,n,i,o,a,s,u){for(var l=0,p=-17,c=0,h=t.positionedGlyphs,f=\"right\"===o?1:\"left\"===o?0:.5,y=0,d=r;y<d.length;y+=1){var v=d[y];if((v=v.trim()).length){for(var m=h.length,g=0;g<v.length;g++){var x=v.charCodeAt(g),b=e[x];b&&(br(x)&&a!==Ra.horizontal?(h.push({glyph:x,x:l,y:0,vertical:!0}),l+=u+s):(h.push({glyph:x,x:l,y:p,vertical:!1}),l+=b.metrics.advance+s));}if(h.length!==m){var w=l-s;c=Math.max(w,c),Ha(h,e,m,h.length-1,f);}l=0,p+=n;}else p+=n;}var _=$a(i),A=_.horizontalAlign,k=_.verticalAlign;!function(t,e,r,n,i,o,a){for(var s=(e-r)*i,u=(-n*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u;}(h,f,A,k,c,n,r.length);var z=r.length*n;t.top+=-k*z,t.bottom=t.top+z,t.left+=-A*c,t.right=t.left+c;}(h,e,f?f(p,Ja(p,a,r,e)):function(t,e){for(var r=[],n=0,i=0,o=e;i<o.length;i+=1){var a=o[i];r.push(t.substring(n,a)),n=a;}return n<t.length&&r.push(t.substring(n,t.length)),r}(p,Ja(p,a,r,e)),n,i,o,l,a,u),!!c.length&&h},t.shapeIcon=function(t,e,r){var n=$a(r),i=n.horizontalAlign,o=n.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*i,l=u+t.displaySize[0],p=s-t.displaySize[1]*o;return{image:t,top:p,bottom:p+t.displaySize[1],left:u,right:l}},t.allowsVerticalWritingMode=gr,t.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!xr(r[e].charCodeAt(0)))return!1;return!0},t.default$26=$i,t.default$27=Ta,t.default$28=ra,t.default$29=vo,t.default$30=oa,t.default$31=Pa,t.__moduleExports=vo,t.default$32=s,t.__moduleExports$1=oa,t.plugin=Vr;});\n\ndefine([\"./chunk1.js\"],function(e){\"use strict\";function t(e){var i=typeof e;if(\"number\"===i||\"boolean\"===i||\"string\"===i||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var r=\"[\",n=0,o=e;n<o.length;n+=1){r+=t(o[n])+\",\";}return r+\"]\"}for(var a=Object.keys(e).sort(),s=\"{\",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+\":\"+t(e[a[l]])+\",\";return s+\"}\"}function i(i){for(var r=\"\",n=0,o=e.default$18;n<o.length;n+=1){r+=\"/\"+t(i[o[n]]);}return r}var r=function(e){e&&this.replace(e);};function n(e,t,i,r,n){if(void 0===t.segment)return!0;for(var o=t,a=t.segment+1,s=0;s>-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a];}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;s<i/2;){var h=e[a-1],c=e[a],f=e[a+1];if(!f)return!1;var p=h.angleTo(c)-c.angleTo(f);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),u+=p;s-l[0].distance>r;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=c.dist(f);}return!0}function o(t,i,r,o,a,s,l,u,h){var c=o?.6*s*l:0,f=Math.max(o?o.right-o.left:0,a?a.right-a.left:0),p=0===t[0].x||t[0].x===h||0===t[0].y||t[0].y===h;return i-f*l<i/4&&(i=f*l+i/4),function t(i,r,o,a,s,l,u,h,c){var f=l/2;var p=0;for(var d=0;d<i.length-1;d++)p+=i[d].dist(i[d+1]);var g=0,v=r-o;var y=[];for(var m=0;m<i.length-1;m++){for(var x=i[m],w=i[m+1],S=x.dist(w),M=w.angleTo(x);v+o<g+S;){var b=((v+=o)-g)/S,_=e.number(x.x,w.x,b),I=e.number(x.y,w.y,b);if(_>=0&&_<c&&I>=0&&I<c&&v-f>=0&&v+f<=p){var z=new e.default$25(_,I,M,m);z._round(),a&&!n(i,z,l,a,s)||y.push(z);}}g+=S;}h||y.length||u||(y=t(i,g/2,o,a,s,l,u,!0,c));return y}(t,p?i/2*u%i:(f/2+2*s)*l*u%i,i,c,r,f*l,p,!1,h)}r.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[]);},r.prototype.update=function(t,r){for(var n=this,o=0,a=t;o<a.length;o+=1){var s=a[o];n._layerConfigs[s.id]=s;var l=n._layers[s.id]=e.default$22(s);l._featureFilter=e.default$13(l.filter);}for(var u=0,h=r;u<h.length;u+=1){var c=h[u];delete n._layerConfigs[c],delete n._layers[c];}this.familiesBySource={};for(var f=0,p=function(e){for(var t={},r=0;r<e.length;r++){var n=i(e[r]),o=t[n];o||(o=t[n]=[]),o.push(e[r]);}var a=[];for(var s in t)a.push(t[s]);return a}(e.values(this._layerConfigs));f<p.length;f+=1){var d=p[f].map(function(e){return n._layers[e.id]}),g=d[0];if(\"none\"!==g.visibility){var v=g.source||\"\",y=n.familiesBySource[v];y||(y=n.familiesBySource[v]={});var m=g.sourceLayer||\"_geojsonTileLayer\",x=y[m];x||(x=y[m]=[]),x.push(d);}}};var a=function(){this.opacity=0,this.targetOpacity=0,this.time=0;};a.prototype.clone=function(){var e=new a;return e.opacity=this.opacity,e.targetOpacity=this.targetOpacity,e.time=this.time,e},e.register(\"OpacityState\",a);var s=function(e,t,i,r,n,o,a,s,l,u,h){var c=a.top*s-l,f=a.bottom*s+l,p=a.left*s-l,d=a.right*s+l;if(this.boxStartIndex=e.length,u){var g=f-c,v=d-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(e,t,i,i.segment,v,g,r,n,o,h));}else e.emplaceBack(i.x,i.y,p,c,d,f,r,n,o,0,0);this.boxEndIndex=e.length;};s.prototype._addLineCollisionCircles=function(e,t,i,r,n,o,a,s,l,u){var h=o/2,c=Math.floor(n/h),f=1+.4*Math.log(u)/Math.LN2,p=Math.floor(c*f/2),d=-o/2,g=i,v=r+1,y=d,m=-n/2,x=m-n/4;do{if(--v<0){if(y>m)return;v=0;break}y-=t[v].dist(g),g=t[v];}while(y>x);for(var w=t[v].dist(t[v+1]),S=-p;S<c+p;S++){var M=S*h,b=m+M;if(M<0&&(b+=M),M>n&&(b+=M-n),!(b<y)){for(;y+w<b;){if(y+=w,++v+1>=t.length)return;w=t[v].dist(t[v+1]);}var _=b-y,I=t[v],z=t[v+1].sub(I)._unit()._mult(_)._add(I)._round(),T=Math.abs(b-d)<h?0:.8*(b-d);e.emplaceBack(z.x,z.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,T);}}};var l=h,u=h;function h(e,t){if(!(this instanceof h))return new h(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||c,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i);}function c(e,t){return e<t?-1:e>t?1:0}function f(t,i,r){void 0===i&&(i=1),void 0===r&&(r=!1);for(var n=1/0,o=1/0,a=-1/0,s=-1/0,u=t[0],h=0;h<u.length;h++){var c=u[h];(!h||c.x<n)&&(n=c.x),(!h||c.y<o)&&(o=c.y),(!h||c.x>a)&&(a=c.x),(!h||c.y>s)&&(s=c.y);}var f=a-n,g=s-o,v=Math.min(f,g),y=v/2,m=new l(null,p);if(0===v)return new e.default$1(n,o);for(var x=n;x<a;x+=v)for(var w=o;w<s;w+=v)m.push(new d(x+y,w+y,y,t));for(var S=function(e){for(var t=0,i=0,r=0,n=e[0],o=0,a=n.length,s=a-1;o<a;s=o++){var l=n[o],u=n[s],h=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*h,r+=(l.y+u.y)*h,t+=3*h;}return new d(i/t,r/t,0,e)}(t),M=m.length;m.length;){var b=m.pop();(b.d>S.d||!S.d)&&(S=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,M)),b.max-S.d<=i||(y=b.h/2,m.push(new d(b.p.x-y,b.p.y-y,y,t)),m.push(new d(b.p.x+y,b.p.y-y,y,t)),m.push(new d(b.p.x-y,b.p.y+y,y,t)),m.push(new d(b.p.x+y,b.p.y+y,y,t)),M+=4);}return r&&(console.log(\"num probes: \"+M),console.log(\"best distance: \"+S.d)),S.p}function p(e,t){return t.max-e.max}function d(t,i,r,n){this.p=new e.default$1(t,i),this.h=r,this.d=function(t,i){for(var r=!1,n=1/0,o=0;o<i.length;o++)for(var a=i[o],s=0,l=a.length,u=l-1;s<l;u=s++){var h=a[s],c=a[u];h.y>t.y!=c.y>t.y&&t.x<(c.x-h.x)*(t.y-h.y)/(c.y-h.y)+h.x&&(r=!r),n=Math.min(n,e.distToSegmentSquared(t,h,c));}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2;}function g(t,i,r,n,o,a){t.createArrays(),t.symbolInstances=[];var s=512*t.overscaling;t.tilePixelRatio=e.default$8/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,h={};if(\"composite\"===t.textSizeData.functionType){var c=t.textSizeData.zoomRange,f=c.min,p=c.max;h.compositeTextSizes=[u[\"text-size\"].possiblyEvaluate(new e.default$16(f)),u[\"text-size\"].possiblyEvaluate(new e.default$16(p))];}if(\"composite\"===t.iconSizeData.functionType){var d=t.iconSizeData.zoomRange,g=d.min,y=d.max;h.compositeIconSizes=[u[\"icon-size\"].possiblyEvaluate(new e.default$16(g)),u[\"icon-size\"].possiblyEvaluate(new e.default$16(y))];}h.layoutTextSize=u[\"text-size\"].possiblyEvaluate(new e.default$16(t.zoom+1)),h.layoutIconSize=u[\"icon-size\"].possiblyEvaluate(new e.default$16(t.zoom+1)),h.textMaxSize=u[\"text-size\"].possiblyEvaluate(new e.default$16(18));for(var m=24*l.get(\"text-line-height\"),x=\"map\"===l.get(\"text-rotation-alignment\")&&\"line\"===l.get(\"symbol-placement\"),w=l.get(\"text-keep-upright\"),S=0,M=t.features;S<M.length;S+=1){var b=M[S],_=l.get(\"text-font\").evaluate(b).join(\",\"),I=i[_]||{},z=r[_]||{},T={},P=b.text;if(P){var k=l.get(\"text-offset\").evaluate(b).map(function(e){return 24*e}),L=24*l.get(\"text-letter-spacing\").evaluate(b),$=e.allowsLetterSpacing(P)?L:0,D=l.get(\"text-anchor\").evaluate(b),O=l.get(\"text-justify\").evaluate(b),C=\"line\"!==l.get(\"symbol-placement\")?24*l.get(\"text-max-width\").evaluate(b):0;T.horizontal=e.shapeText(P,I,C,m,D,O,$,k,24,e.WritingMode.horizontal),e.allowsVerticalWritingMode(P)&&x&&w&&(T.vertical=e.shapeText(P,I,C,m,D,O,$,k,24,e.WritingMode.vertical));}var A=void 0;if(b.icon){var E=n[b.icon];E&&(A=e.shapeIcon(o[b.icon],l.get(\"icon-offset\").evaluate(b),l.get(\"icon-anchor\").evaluate(b)),void 0===t.sdfIcons?t.sdfIcons=E.sdf:t.sdfIcons!==E.sdf&&e.warnOnce(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),E.pixelRatio!==t.pixelRatio?t.iconsNeedLinear=!0:0!==l.get(\"icon-rotate\").constantOr(1)&&(t.iconsNeedLinear=!0));}(T.horizontal||A)&&v(t,b,T,A,z,h);}a&&t.generateCollisionDebugBuffers();}function v(t,i,r,n,l,u){var h=u.layoutTextSize.evaluate(i),c=u.layoutIconSize.evaluate(i),p=u.textMaxSize.evaluate(i);void 0===p&&(p=h);var d=t.layers[0].layout,g=d.get(\"text-offset\").evaluate(i),v=d.get(\"icon-offset\").evaluate(i),x=h/24,w=t.tilePixelRatio*x,S=t.tilePixelRatio*p/24,M=t.tilePixelRatio*c,b=t.tilePixelRatio*d.get(\"symbol-spacing\"),_=d.get(\"text-padding\")*t.tilePixelRatio,I=d.get(\"icon-padding\")*t.tilePixelRatio,z=d.get(\"text-max-angle\")/180*Math.PI,T=\"map\"===d.get(\"text-rotation-alignment\")&&\"line\"===d.get(\"symbol-placement\"),P=\"map\"===d.get(\"icon-rotation-alignment\")&&\"line\"===d.get(\"symbol-placement\"),k=b/2,L=function(o,h){h.x<0||h.x>=e.default$8||h.y<0||h.y>=e.default$8||t.symbolInstances.push(function(t,i,r,n,o,l,u,h,c,f,p,d,g,v,m,x,w,S,M,b,_){var I,z,T=t.addToLineVertexArray(i,r),P=0,k=0,L=0,$=n.horizontal?n.horizontal.text:\"\",D=[];n.horizontal&&(I=new s(u,r,i,h,c,f,n.horizontal,p,d,g,t.overscaling),k+=y(t,i,n.horizontal,l,g,M,v,T,n.vertical?e.WritingMode.horizontal:e.WritingMode.horizontalOnly,D,b,_),n.vertical&&(L+=y(t,i,n.vertical,l,g,M,v,T,e.WritingMode.vertical,D,b,_)));var O=I?I.boxStartIndex:t.collisionBoxArray.length,C=I?I.boxEndIndex:t.collisionBoxArray.length;if(o){var A=function(t,i,r,n,o,a){var s,l,u,h,c=i.image,f=r.layout,p=i.top-1/c.pixelRatio,d=i.left-1/c.pixelRatio,g=i.bottom+1/c.pixelRatio,v=i.right+1/c.pixelRatio;if(\"none\"!==f.get(\"icon-text-fit\")&&o){var y=v-d,m=g-p,x=f.get(\"text-size\").evaluate(a)/24,w=o.left*x,S=o.right*x,M=o.top*x,b=S-w,_=o.bottom*x-M,I=f.get(\"icon-text-fit-padding\")[0],z=f.get(\"icon-text-fit-padding\")[1],T=f.get(\"icon-text-fit-padding\")[2],P=f.get(\"icon-text-fit-padding\")[3],k=\"width\"===f.get(\"icon-text-fit\")?.5*(_-m):0,L=\"height\"===f.get(\"icon-text-fit\")?.5*(b-y):0,$=\"width\"===f.get(\"icon-text-fit\")||\"both\"===f.get(\"icon-text-fit\")?b:y,D=\"height\"===f.get(\"icon-text-fit\")||\"both\"===f.get(\"icon-text-fit\")?_:m;s=new e.default$1(w+L-P,M+k-I),l=new e.default$1(w+L+z+$,M+k-I),u=new e.default$1(w+L+z+$,M+k+T+D),h=new e.default$1(w+L-P,M+k+T+D);}else s=new e.default$1(d,p),l=new e.default$1(v,p),u=new e.default$1(v,g),h=new e.default$1(d,g);var O=r.layout.get(\"icon-rotate\").evaluate(a)*Math.PI/180;if(O){var C=Math.sin(O),A=Math.cos(O),E=[A,-C,C,A];s._matMult(E),l._matMult(E),h._matMult(E),u._matMult(E);}return[{tl:s,tr:l,bl:h,br:u,tex:c.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,l,0,n.horizontal,M);z=new s(u,r,i,h,c,f,o,m,x,!1,t.overscaling),P=4*A.length;var E=t.iconSizeData,N=null;\"source\"===E.functionType?N=[10*l.layout.get(\"icon-size\").evaluate(M)]:\"composite\"===E.functionType&&(N=[10*_.compositeIconSizes[0].evaluate(M),10*_.compositeIconSizes[1].evaluate(M)]),t.addSymbols(t.icon,A,N,S,w,M,!1,i,T.lineStartIndex,T.lineLength);}var R=z?z.boxStartIndex:t.collisionBoxArray.length,B=z?z.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=e.default$14.MAX_GLYPHS&&e.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");var F=new a,G=new a;return{key:$,textBoxStartIndex:O,textBoxEndIndex:C,iconBoxStartIndex:R,iconBoxEndIndex:B,textOffset:v,iconOffset:S,anchor:i,line:r,featureIndex:h,feature:M,numGlyphVertices:k,numVerticalGlyphVertices:L,numIconVertices:P,textOpacityState:F,iconOpacityState:G,isDuplicate:!1,placedTextSymbolIndices:D,crossTileID:0}}(t,h,o,r,n,t.layers[0],t.collisionBoxArray,i.index,i.sourceLayerIndex,t.index,w,_,T,g,M,I,P,v,i,l,u));};if(\"line\"===d.get(\"symbol-placement\"))for(var $=0,D=function(t,i,r,n,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,h=0;h<l.length-1;h++){var c=l[h],f=l[h+1];c.x<i&&f.x<i||(c.x<i?c=new e.default$1(i,c.y+(f.y-c.y)*((i-c.x)/(f.x-c.x)))._round():f.x<i&&(f=new e.default$1(i,c.y+(f.y-c.y)*((i-c.x)/(f.x-c.x)))._round()),c.y<r&&f.y<r||(c.y<r?c=new e.default$1(c.x+(f.x-c.x)*((r-c.y)/(f.y-c.y)),r)._round():f.y<r&&(f=new e.default$1(c.x+(f.x-c.x)*((r-c.y)/(f.y-c.y)),r)._round()),c.x>=n&&f.x>=n||(c.x>=n?c=new e.default$1(n,c.y+(f.y-c.y)*((n-c.x)/(f.x-c.x)))._round():f.x>=n&&(f=new e.default$1(n,c.y+(f.y-c.y)*((n-c.x)/(f.x-c.x)))._round()),c.y>=o&&f.y>=o||(c.y>=o?c=new e.default$1(c.x+(f.x-c.x)*((o-c.y)/(f.y-c.y)),o)._round():f.y>=o&&(f=new e.default$1(c.x+(f.x-c.x)*((o-c.y)/(f.y-c.y)),o)._round()),u&&c.equals(u[u.length-1])||(u=[c],a.push(u)),u.push(f)))));}return a}(i.geometry,0,0,e.default$8,e.default$8);$<D.length;$+=1)for(var O=D[$],C=0,A=o(O,b,z,r.vertical||r.horizontal,n,24,S,t.overscaling,e.default$8);C<A.length;C+=1){var E=A[C],N=r.horizontal;N&&m(t,N.text,k,E)||L(O,E);}else if(\"Polygon\"===i.type)for(var R=0,B=e.default$26(i.geometry,0);R<B.length;R+=1){var F=B[R],G=f(F,16);L(F[0],new e.default$25(G.x,G.y,0));}else if(\"LineString\"===i.type)for(var V=0,J=i.geometry;V<J.length;V+=1){var W=J[V];L(W,new e.default$25(W[0].x,W[0].y,0));}else if(\"Point\"===i.type)for(var Y=0,Z=i.geometry;Y<Z.length;Y+=1)for(var j=0,X=Z[Y];j<X.length;j+=1){var q=X[j];L([q],new e.default$25(q.x,q.y,0));}}function y(t,i,r,n,o,a,s,l,u,h,c,f){var p=function(t,i,r,n,o,a){for(var s=r.layout.get(\"text-rotate\").evaluate(o)*Math.PI/180,l=r.layout.get(\"text-offset\").evaluate(o).map(function(e){return 24*e}),u=i.positionedGlyphs,h=[],c=0;c<u.length;c++){var f=u[c],p=a[f.glyph];if(p){var d=p.rect;if(d){var g=e.GLYPH_PBF_BORDER+1,v=p.metrics.advance/2,y=n?[f.x+v,f.y]:[0,0],m=n?[0,0]:[f.x+v+l[0],f.y+l[1]],x=p.metrics.left-g-v+m[0],w=-p.metrics.top-g+m[1],S=x+d.w,M=w+d.h,b=new e.default$1(x,w),_=new e.default$1(S,w),I=new e.default$1(x,M),z=new e.default$1(S,M);if(n&&f.vertical){var T=new e.default$1(-v,v),P=-Math.PI/2,k=new e.default$1(5,0);b._rotateAround(P,T)._add(k),_._rotateAround(P,T)._add(k),I._rotateAround(P,T)._add(k),z._rotateAround(P,T)._add(k);}if(s){var L=Math.sin(s),$=Math.cos(s),D=[$,-L,L,$];b._matMult(D),_._matMult(D),I._matMult(D),z._matMult(D);}h.push({tl:b,tr:_,bl:I,br:z,tex:d,writingMode:i.writingMode,glyphOffset:y});}}}return h}(0,r,n,o,a,c),d=t.textSizeData,g=null;return\"source\"===d.functionType?g=[10*n.layout.get(\"text-size\").evaluate(a)]:\"composite\"===d.functionType&&(g=[10*f.compositeTextSizes[0].evaluate(a),10*f.compositeTextSizes[1].evaluate(a)]),t.addSymbols(t.text,p,g,s,o,a,u,i,l.lineStartIndex,l.lineLength),h.push(t.text.placedSymbolArray.length-1),4*p.length}function m(e,t,i,r){var n=e.compareText;if(t in n){for(var o=n[t],a=o.length-1;a>=0;a--)if(r.dist(o[a])<i)return!0}else n[t]=[];return n[t].push(r),!1}h.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1);},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,i=this.compare,r=t[e];e>0;){var n=e-1>>1,o=t[n];if(i(r,o)>=0)break;t[e]=o,e=n;}t[e]=r;},_down:function(e){for(var t=this.data,i=this.compare,r=this.length>>1,n=t[e];e<r;){var o=1+(e<<1),a=o+1,s=t[o];if(a<this.length&&i(t[a],s)<0&&(o=a,s=t[a]),i(s,n)>=0)break;t[e]=s,e=o;}t[e]=n;}},l.default=u;var x=function(t){var i=new e.AlphaImage({width:0,height:0}),r={},n=new e.default$2(0,0,{autoResize:!0});for(var o in t){var a=t[o],s=r[o]={};for(var l in a){var u=a[+l];if(u&&0!==u.bitmap.width&&0!==u.bitmap.height){var h=n.packOne(u.bitmap.width+2,u.bitmap.height+2);i.resize({width:n.w,height:n.h}),e.AlphaImage.copy(u.bitmap,i,{x:0,y:0},{x:h.x+1,y:h.y+1},u.bitmap),s[l]={rect:h,metrics:u.metrics};}}}n.shrink(),i.resize({width:n.w,height:n.h}),this.image=i,this.positions=r;};e.register(\"GlyphAtlas\",x);var w=function(t){this.tileID=new e.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming;};function S(t,i){for(var r=new e.default$16(i),n=0,o=t;n<o.length;n+=1){o[n].recalculate(r);}}w.prototype.parse=function(t,i,r,n){var o=this;this.status=\"parsing\",this.data=t,this.collisionBoxArray=new e.CollisionBoxArray;var a=new e.default$27(Object.keys(t.layers).sort()),s=new e.default$11(this.tileID);s.bucketLayerIDs=[];var l,u,h,c={},f={featureIndex:s,iconDependencies:{},glyphDependencies:{}},p=i.familiesBySource[this.source];for(var d in p){var v=t.layers[d];if(v){1===v.version&&e.warnOnce('Vector tile source \"'+o.source+'\" layer \"'+d+'\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var y=a.encode(d),m=[],w=0;w<v.length;w++){var M=v.feature(w);m.push({feature:M,index:w,sourceLayerIndex:y});}for(var b=0,_=p[d];b<_.length;b+=1){var I=_[b],z=I[0];if(!(z.minzoom&&o.zoom<Math.floor(z.minzoom)))if(!(z.maxzoom&&o.zoom>=z.maxzoom))if(\"none\"!==z.visibility)S(I,o.zoom),(c[z.id]=z.createBucket({index:s.bucketLayerIDs.length,layers:I,zoom:o.zoom,pixelRatio:o.pixelRatio,overscaling:o.overscaling,collisionBoxArray:o.collisionBoxArray,sourceLayerIndex:y})).populate(m,f),s.bucketLayerIDs.push(I.map(function(e){return e.id}));}}}var T=e.mapObject(f.glyphDependencies,function(e){return Object.keys(e).map(Number)});Object.keys(T).length?r.send(\"getGlyphs\",{uid:this.uid,stacks:T},function(e,t){l||(l=e,u=t,k.call(o));}):u={};var P=Object.keys(f.iconDependencies);function k(){if(l)return n(l);if(u&&h){var t=new x(u),i=new e.default$28(h);for(var r in c){var o=c[r];o instanceof e.default$14&&(S(o.layers,this.zoom),g(o,u,t.positions,h,i.positions,this.showCollisionBoxes));}this.status=\"done\",n(null,{buckets:e.values(c).filter(function(e){return!e.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,iconAtlasImage:i.image});}}P.length?r.send(\"getImages\",{icons:P},function(e,t){l||(l=e,h=t,k.call(o));}):h={},k.call(this);};var M=function(e){return!(!performance||!performance.getEntriesByName)&&performance.getEntriesByName(e)};function b(t,i){var r=e.getArrayBuffer(t.request,function(t,r){t?i(t):r&&i(null,{vectorTile:new e.default$29.VectorTile(new e.default$30(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires});});return function(){r.abort(),i();}}var _=function(e,t,i){this.actor=e,this.layerIndex=t,this.loadVectorData=i||b,this.loading={},this.loaded={};};_.prototype.loadTile=function(t,i){var r=this,n=t.uid;this.loading||(this.loading={});var o=this.loading[n]=new w(t);o.abort=this.loadVectorData(t,function(a,s){if(delete r.loading[n],a||!s)return i(a);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var h={};if(t.request&&t.request.collectResourceTiming){var c=M(t.request.url);c&&(h.resourceTiming=JSON.parse(JSON.stringify(c)));}o.vectorTile=s.vectorTile,o.parse(s.vectorTile,r.layerIndex,r.actor,function(t,r){if(t||!r)return i(t);i(null,e.extend({rawTileData:l.slice(0)},r,u,h));}),r.loaded=r.loaded||{},r.loaded[n]=o;});},_.prototype.reloadTile=function(e,t){var i=this.loaded,r=e.uid,n=this;if(i&&i[r]){var o=i[r];o.showCollisionBoxes=e.showCollisionBoxes;var a=function(e,i){var r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,n.layerIndex,n.actor,r)),t(e,i);};\"parsing\"===o.status?o.reloadCallback=a:\"done\"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,a);}},_.prototype.abortTile=function(e,t){var i=this.loading,r=e.uid;i&&i[r]&&i[r].abort&&(i[r].abort(),delete i[r]),t();},_.prototype.removeTile=function(e,t){var i=this.loaded,r=e.uid;i&&i[r]&&delete i[r],t();};var I=function(){this.loading={},this.loaded={};};I.prototype.loadTile=function(t,i){var r=t.uid,n=t.encoding,o=new e.default$31(r);this.loading[r]=o,o.loadFromImage(t.rawImageData,n),delete this.loading[r],this.loaded=this.loaded||{},this.loaded[r]=o,i(null,o);},I.prototype.removeTile=function(e){var t=this.loaded,i=e.uid;t&&t[i]&&delete t[i];};var z={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function T(e){var t=0;if(e&&e.length>0){t+=Math.abs(P(e[0]));for(var i=1;i<e.length;i++)t-=Math.abs(P(e[i]));}return t}function P(e){var t,i,r,n,o,a,s=0,l=e.length;if(l>2){for(a=0;a<l;a++)a===l-2?(r=l-2,n=l-1,o=0):a===l-1?(r=l-1,n=0,o=1):(r=a,n=a+1,o=a+2),t=e[r],i=e[n],s+=(k(e[o][0])-k(t[0]))*Math.sin(k(i[1]));s=s*z.RADIUS*z.RADIUS/2;}return s}function k(e){return e*Math.PI/180}var L={geometry:function e(t){var i,r=0;switch(t.type){case\"Polygon\":return T(t.coordinates);case\"MultiPolygon\":for(i=0;i<t.coordinates.length;i++)r+=T(t.coordinates[i]);return r;case\"Point\":case\"MultiPoint\":case\"LineString\":case\"MultiLineString\":return 0;case\"GeometryCollection\":for(i=0;i<t.geometries.length;i++)r+=e(t.geometries[i]);return r}},ring:P},$=function e(t,i){switch(t&&t.type||null){case\"FeatureCollection\":return t.features=t.features.map(D(e,i)),t;case\"Feature\":return t.geometry=e(t.geometry,i),t;case\"Polygon\":case\"MultiPolygon\":return function(e,t){\"Polygon\"===e.type?e.coordinates=O(e.coordinates,t):\"MultiPolygon\"===e.type&&(e.coordinates=e.coordinates.map(D(O,t)));return e}(t,i);default:return t}};function D(e,t){return function(i){return e(i,t)}}function O(e,t){t=!!t,e[0]=C(e[0],t);for(var i=1;i<e.length;i++)e[i]=C(e[i],!t);return e}function C(e,t){return function(e){return L.ring(e)>=0}(e)===t?e:e.reverse()}var A=e.default$29.VectorTileFeature.prototype.toGeoJSON,E=function(t){this._feature=t,this.extent=e.default$8,this.type=t.type,this.properties=t.tags,\"id\"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10));};E.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],i=0,r=this._feature.geometry;i<r.length;i+=1){var n=r[i];t.push([new e.default$1(n[0],n[1])]);}return t}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,h=s[a];u<h.length;u+=1){var c=h[u];l.push(new e.default$1(c[0],c[1]));}o.push(l);}return o},E.prototype.toGeoJSON=function(e,t,i){return A.call(this,e,t,i)};var N=function(t){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=e.default$8,this.length=t.length,this._features=t;};N.prototype.feature=function(e){return new E(this._features[e])};var R=e.__moduleExports.VectorTileFeature,B=F;function F(e,t){this.options=t||{},this.features=e,this.length=e.length;}function G(e,t){this.id=\"number\"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096;}F.prototype.feature=function(e){return new G(this.features[e],this.options.extent)},G.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var i=0;i<t.length;i++){for(var r=t[i],n=[],o=0;o<r.length;o++)n.push(new e.default$32(r[o][0],r[o][1]));this.geometry.push(n);}return this.geometry},G.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,i=-1/0,r=1/0,n=-1/0,o=0;o<e.length;o++)for(var a=e[o],s=0;s<a.length;s++){var l=a[s];t=Math.min(t,l.x),i=Math.max(i,l.x),r=Math.min(r,l.y),n=Math.max(n,l.y);}return[t,r,i,n]},G.prototype.toGeoJSON=R.prototype.toGeoJSON;var V=Z,J=Z,W=function(e,t){t=t||{};var i={};for(var r in e)i[r]=new B(e[r].features,t),i[r].name=r,i[r].version=t.version,i[r].extent=t.extent;return Z({layers:i})},Y=B;function Z(t){var i=new e.__moduleExports$1;return function(e,t){for(var i in e.layers)t.writeMessage(3,j,e.layers[i]);}(t,i),i.finish()}function j(e,t){var i;t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||\"\"),t.writeVarintField(5,e.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(i=0;i<e.length;i++)r.feature=e.feature(i),t.writeMessage(2,X,r);var n=r.keys;for(i=0;i<n.length;i++)t.writeStringField(3,n[i]);var o=r.values;for(i=0;i<o.length;i++)t.writeMessage(4,K,o[i]);}function X(e,t){var i=e.feature;void 0!==i.id&&t.writeVarintField(1,i.id),t.writeMessage(2,q,e),t.writeVarintField(3,i.type),t.writeMessage(4,Q,i);}function q(e,t){var i=e.feature,r=e.keys,n=e.values,o=e.keycache,a=e.valuecache;for(var s in i.properties){var l=o[s];void 0===l&&(r.push(s),l=r.length-1,o[s]=l),t.writeVarint(l);var u=i.properties[s],h=typeof u;\"string\"!==h&&\"boolean\"!==h&&\"number\"!==h&&(u=JSON.stringify(u));var c=h+\":\"+u,f=a[c];void 0===f&&(n.push(u),f=n.length-1,a[c]=f),t.writeVarint(f);}}function U(e,t){return(t<<3)+(7&e)}function H(e){return e<<1^e>>31}function Q(e,t){for(var i=e.loadGeometry(),r=e.type,n=0,o=0,a=i.length,s=0;s<a;s++){var l=i[s],u=1;1===r&&(u=l.length),t.writeVarint(U(1,u));for(var h=3===r?l.length-1:l.length,c=0;c<h;c++){1===c&&1!==r&&t.writeVarint(U(2,h-1));var f=l[c].x-n,p=l[c].y-o;t.writeVarint(H(f)),t.writeVarint(H(p)),n+=f,o+=p;}3===r&&t.writeVarint(U(7,0));}}function K(e,t){var i=typeof e;\"string\"===i?t.writeStringField(1,e):\"boolean\"===i?t.writeBooleanField(7,e):\"number\"===i&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e));}V.fromVectorTileJs=J,V.fromGeojsonVt=W,V.GeoJSONWrapper=Y;var ee=function e(t,i,r,n,o,a){if(o-n<=r)return;var s=Math.floor((n+o)/2);!function e(t,i,r,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,l=r-n+1,u=Math.log(s),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(s-h)/s)*(l-s/2<0?-1:1),f=Math.max(n,Math.floor(r-l*h/s+c)),p=Math.min(o,Math.floor(r+(s-l)*h/s+c));e(t,i,r,f,p,a);}var d=i[2*r+a],g=n,v=o;for(te(t,i,n,r),i[2*o+a]>d&&te(t,i,n,o);g<v;){for(te(t,i,g,v),g++,v--;i[2*g+a]<d;)g++;for(;i[2*v+a]>d;)v--;}i[2*n+a]===d?te(t,i,n,v):te(t,i,++v,o),v<=r&&(n=v+1),r<=v&&(o=v-1);}}(t,i,s,n,o,a%2);e(t,i,r,n,s-1,a+1);e(t,i,r,s+1,o,a+1);};function te(e,t,i,r){ie(e,i,r),ie(t,2*i,2*r),ie(t,2*i+1,2*r+1);}function ie(e,t,i){var r=e[t];e[t]=e[i],e[i]=r;}var re=function(e,t,i,r,n,o,a){var s,l,u=[0,e.length-1,0],h=[];for(;u.length;){var c=u.pop(),f=u.pop(),p=u.pop();if(f-p<=a)for(var d=p;d<=f;d++)s=t[2*d],l=t[2*d+1],s>=i&&s<=n&&l>=r&&l<=o&&h.push(e[d]);else{var g=Math.floor((p+f)/2);s=t[2*g],l=t[2*g+1],s>=i&&s<=n&&l>=r&&l<=o&&h.push(e[g]);var v=(c+1)%2;(0===c?i<=s:r<=l)&&(u.push(p),u.push(g-1),u.push(v)),(0===c?n>=s:o>=l)&&(u.push(g+1),u.push(f),u.push(v));}}return h};var ne=function(e,t,i,r,n,o){var a=[0,e.length-1,0],s=[],l=n*n;for(;a.length;){var u=a.pop(),h=a.pop(),c=a.pop();if(h-c<=o)for(var f=c;f<=h;f++)oe(t[2*f],t[2*f+1],i,r)<=l&&s.push(e[f]);else{var p=Math.floor((c+h)/2),d=t[2*p],g=t[2*p+1];oe(d,g,i,r)<=l&&s.push(e[p]);var v=(u+1)%2;(0===u?i-n<=d:r-n<=g)&&(a.push(c),a.push(p-1),a.push(v)),(0===u?i+n>=d:r+n>=g)&&(a.push(p+1),a.push(h),a.push(v));}}return s};function oe(e,t,i,r){var n=e-i,o=t-r;return n*n+o*o}var ae=function(e,t,i,r,n){return new se(e,t,i,r,n)};function se(e,t,i,r,n){t=t||le,i=i||ue,n=n||Array,this.nodeSize=r||64,this.points=e,this.ids=new n(e.length),this.coords=new n(2*e.length);for(var o=0;o<e.length;o++)this.ids[o]=o,this.coords[2*o]=t(e[o]),this.coords[2*o+1]=i(e[o]);ee(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0);}function le(e){return e[0]}function ue(e){return e[1]}se.prototype={range:function(e,t,i,r){return re(this.ids,this.coords,e,t,i,r,this.nodeSize)},within:function(e,t,i){return ne(this.ids,this.coords,e,t,i,this.nodeSize)}};var he=function(e){return new ce(e)};function ce(e){this.options=me(Object.create(this.options),e),this.trees=new Array(this.options.maxZoom+1);}function fe(e,t,i,r,n){return{x:e,y:t,zoom:1/0,id:r,properties:n,parentId:-1,numPoints:i}}function pe(e,t){var i=e.geometry.coordinates;return{x:ve(i[0]),y:ye(i[1]),zoom:1/0,id:t,parentId:-1}}function de(e){return{type:\"Feature\",properties:ge(e),geometry:{type:\"Point\",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,i=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(i))/Math.PI-90)]}};var t,i,r;}function ge(e){var t=e.numPoints,i=t>=1e4?Math.round(t/1e3)+\"k\":t>=1e3?Math.round(t/100)/10+\"k\":t;return me(me({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:i})}function ve(e){return e/360+.5}function ye(e){var t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function me(e,t){for(var i in t)e[i]=t[i];return e}function xe(e){return e.x}function we(e){return e.y}function Se(e,t,i,r,n,o){var a=n-i,s=o-r;if(0!==a||0!==s){var l=((e-i)*a+(t-r)*s)/(a*a+s*s);l>1?(i=n,r=o):l>0&&(i+=a*l,r+=s*l);}return(a=e-i)*a+(s=t-r)*s}function Me(e,t,i,r){var n={id:e||null,type:t,geometry:i,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,i=e.type;if(\"Point\"===i||\"MultiPoint\"===i||\"LineString\"===i)be(e,t);else if(\"Polygon\"===i||\"MultiLineString\"===i)for(var r=0;r<t.length;r++)be(e,t[r]);else if(\"MultiPolygon\"===i)for(r=0;r<t.length;r++)for(var n=0;n<t[r].length;n++)be(e,t[r][n]);}(n),n}function be(e,t){for(var i=0;i<t.length;i+=3)e.minX=Math.min(e.minX,t[i]),e.minY=Math.min(e.minY,t[i+1]),e.maxX=Math.max(e.maxX,t[i]),e.maxY=Math.max(e.maxY,t[i+1]);}function _e(e,t,i){if(t.geometry){var r=t.geometry.coordinates,n=t.geometry.type,o=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2),a=[];if(\"Point\"===n)Ie(r,a);else if(\"MultiPoint\"===n)for(var s=0;s<r.length;s++)Ie(r[s],a);else if(\"LineString\"===n)ze(r,a,o,!1);else if(\"MultiLineString\"===n)if(i.lineMetrics)for(s=0;s<r.length;s++)return a=[],ze(r[s],a,o,!1),void e.push(Me(t.id,\"LineString\",a,t.properties));else Te(r,a,o,!1);else if(\"Polygon\"===n)Te(r,a,o,!0);else{if(\"MultiPolygon\"!==n){if(\"GeometryCollection\"===n){for(s=0;s<t.geometry.geometries.length;s++)_e(e,{id:t.id,geometry:t.geometry.geometries[s],properties:t.properties},i);return}throw new Error(\"Input data is not a valid GeoJSON object.\")}for(s=0;s<r.length;s++){var l=[];Te(r[s],l,o,!0),a.push(l);}}e.push(Me(t.id,n,a,t.properties));}}function Ie(e,t){t.push(Pe(e[0])),t.push(ke(e[1])),t.push(0);}function ze(e,t,i,r){for(var n,o,a=0,s=0;s<e.length;s++){var l=Pe(e[s][0]),u=ke(e[s][1]);t.push(l),t.push(u),t.push(0),s>0&&(a+=r?(n*u-l*o)/2:Math.sqrt(Math.pow(l-n,2)+Math.pow(u-o,2))),n=l,o=u;}var h=t.length-3;t[2]=1,function e(t,i,r,n){for(var o,a=n,s=t[i],l=t[i+1],u=t[r],h=t[r+1],c=i+3;c<r;c+=3){var f=Se(t[c],t[c+1],s,l,u,h);f>a&&(o=c,a=f);}a>n&&(o-i>3&&e(t,i,o,n),t[o+2]=a,r-o>3&&e(t,o,r,n));}(t,0,h,i),t[h+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size;}function Te(e,t,i,r){for(var n=0;n<e.length;n++){var o=[];ze(e[n],o,i,r),t.push(o);}}function Pe(e){return e/360+.5}function ke(e){var t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function Le(e,t,i,r,n,o,a,s){if(r/=t,o>=(i/=t)&&a<=r)return e;if(o>r||a<i)return null;for(var l=[],u=0;u<e.length;u++){var h=e[u],c=h.geometry,f=h.type,p=0===n?h.minX:h.minY,d=0===n?h.maxX:h.maxY;if(p>=i&&d<=r)l.push(h);else if(!(p>r||d<i)){var g=[];if(\"Point\"===f||\"MultiPoint\"===f)$e(c,g,i,r,n);else if(\"LineString\"===f)De(c,g,i,r,n,!1,s.lineMetrics);else if(\"MultiLineString\"===f)Ce(c,g,i,r,n,!1);else if(\"Polygon\"===f)Ce(c,g,i,r,n,!0);else if(\"MultiPolygon\"===f)for(var v=0;v<c.length;v++){var y=[];Ce(c[v],y,i,r,n,!0),y.length&&g.push(y);}if(g.length){if(s.lineMetrics&&\"LineString\"===f){for(v=0;v<g.length;v++)l.push(Me(h.id,f,g[v],h.tags));continue}\"LineString\"!==f&&\"MultiLineString\"!==f||(1===g.length?(f=\"LineString\",g=g[0]):f=\"MultiLineString\"),\"Point\"!==f&&\"MultiPoint\"!==f||(f=3===g.length?\"Point\":\"MultiPoint\"),l.push(Me(h.id,f,g,h.tags));}}}return l.length?l:null}function $e(e,t,i,r,n){for(var o=0;o<e.length;o+=3){var a=e[o+n];a>=i&&a<=r&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]));}}function De(e,t,i,r,n,o,a){for(var s,l,u=Oe(e),h=0===n?Ee:Ne,c=e.start,f=0;f<e.length-3;f+=3){var p=e[f],d=e[f+1],g=e[f+2],v=e[f+3],y=e[f+4],m=0===n?p:d,x=0===n?v:y,w=!1;a&&(s=Math.sqrt(Math.pow(p-v,2)+Math.pow(d-y,2))),m<i?x>=i&&(l=h(u,p,d,v,y,i),a&&(u.start=c+s*l)):m>r?x<=r&&(l=h(u,p,d,v,y,r),a&&(u.start=c+s*l)):Ae(u,p,d,g),x<i&&m>=i&&(l=h(u,p,d,v,y,i),w=!0),x>r&&m<=r&&(l=h(u,p,d,v,y,r),w=!0),!o&&w&&(a&&(u.end=c+s*l),t.push(u),u=Oe(e)),a&&(c+=s);}var S=e.length-3;p=e[S],d=e[S+1],g=e[S+2],(m=0===n?p:d)>=i&&m<=r&&Ae(u,p,d,g),S=u.length-3,o&&S>=3&&(u[S]!==u[0]||u[S+1]!==u[1])&&Ae(u,u[0],u[1],u[2]),u.length&&t.push(u);}function Oe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function Ce(e,t,i,r,n,o){for(var a=0;a<e.length;a++)De(e[a],t,i,r,n,o,!1);}function Ae(e,t,i,r){e.push(t),e.push(i),e.push(r);}function Ee(e,t,i,r,n,o){var a=(o-t)/(r-t);return e.push(o),e.push(i+(n-i)*a),e.push(1),a}function Ne(e,t,i,r,n,o){var a=(o-i)/(n-i);return e.push(t+(r-t)*a),e.push(o),e.push(1),a}function Re(e,t){for(var i=[],r=0;r<e.length;r++){var n,o=e[r],a=o.type;if(\"Point\"===a||\"MultiPoint\"===a||\"LineString\"===a)n=Be(o.geometry,t);else if(\"MultiLineString\"===a||\"Polygon\"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(Be(o.geometry[s],t));}else if(\"MultiPolygon\"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(Be(o.geometry[s][u],t));n.push(l);}i.push(Me(o.id,a,n,o.tags));}return i}function Be(e,t){var i=[];i.size=e.size,void 0!==e.start&&(i.start=e.start,i.end=e.end);for(var r=0;r<e.length;r+=3)i.push(e[r]+t,e[r+1],e[r+2]);return i}function Fe(e,t){if(e.transformed)return e;var i,r,n,o=1<<e.z,a=e.x,s=e.y;for(i=0;i<e.features.length;i++){var l=e.features[i],u=l.geometry,h=l.type;if(l.geometry=[],1===h)for(r=0;r<u.length;r+=2)l.geometry.push(Ge(u[r],u[r+1],t,o,a,s));else for(r=0;r<u.length;r++){var c=[];for(n=0;n<u[r].length;n+=2)c.push(Ge(u[r][n],u[r][n+1],t,o,a,s));l.geometry.push(c);}}return e.transformed=!0,e}function Ge(e,t,i,r,n,o){return[Math.round(i*(e*r-n)),Math.round(i*(t*r-o))]}function Ve(e,t,i,r,n){for(var o=t===n.maxZoom?0:n.tolerance/((1<<t)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:i,y:r,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<e.length;s++){a.numFeatures++,Je(a,e[s],o,n);var l=e[s].minX,u=e[s].minY,h=e[s].maxX,c=e[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),h>a.maxX&&(a.maxX=h),c>a.maxY&&(a.maxY=c);}return a}function Je(e,t,i,r){var n=t.geometry,o=t.type,a=[];if(\"Point\"===o||\"MultiPoint\"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),e.numPoints++,e.numSimplified++;else if(\"LineString\"===o)We(a,n,e,i,!1,!1);else if(\"MultiLineString\"===o||\"Polygon\"===o)for(s=0;s<n.length;s++)We(a,n[s],e,i,\"Polygon\"===o,0===s);else if(\"MultiPolygon\"===o)for(var l=0;l<n.length;l++){var u=n[l];for(s=0;s<u.length;s++)We(a,u[s],e,i,!0,0===s);}if(a.length){var h=t.tags||null;if(\"LineString\"===o&&r.lineMetrics){for(var c in h={},t.tags)h[c]=t.tags[c];h.mapbox_clip_start=n.start/n.size,h.mapbox_clip_end=n.end/n.size;}var f={geometry:a,type:\"Polygon\"===o||\"MultiPolygon\"===o?3:\"LineString\"===o||\"MultiLineString\"===o?2:1,tags:h};null!==t.id&&(f.id=t.id),e.features.push(f);}}function We(e,t,i,r,n,o){var a=r*r;if(r>0&&t.size<(n?a:r))i.numPoints+=t.length/3;else{for(var s=[],l=0;l<t.length;l+=3)(0===r||t[l+2]>a)&&(i.numSimplified++,s.push(t[l]),s.push(t[l+1])),i.numPoints++;n&&function(e,t){for(var i=0,r=0,n=e.length,o=n-2;r<n;o=r,r+=2)i+=(e[r]-e[o])*(e[r+1]+e[o+1]);if(i>0===t)for(r=0,n=e.length;r<n/2;r+=2){var a=e[r],s=e[r+1];e[r]=e[n-2-r],e[r+1]=e[n-1-r],e[n-2-r]=a,e[n-1-r]=s;}}(s,o),e.push(s);}}function Ye(e,t){var i=(t=this.options=function(e,t){for(var i in t)e[i]=t[i];return e}(Object.create(this.options),t)).debug;if(i&&console.time(\"preprocess data\"),t.maxZoom<0||t.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");var r=function(e,t){var i=[];if(\"FeatureCollection\"===e.type)for(var r=0;r<e.features.length;r++)_e(i,e.features[r],t);else\"Feature\"===e.type?_e(i,e,t):_e(i,{geometry:e},t);return i}(e,t);this.tiles={},this.tileCoords=[],i&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",t.indexMaxZoom,t.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),(r=function(e,t){var i=t.buffer/t.extent,r=e,n=Le(e,1,-1-i,i,0,-1,2,t),o=Le(e,1,1-i,2+i,0,-1,2,t);return(n||o)&&(r=Le(e,1,-i,1+i,0,-1,2,t)||[],n&&(r=Re(n,1).concat(r)),o&&(r=r.concat(Re(o,-1)))),r}(r,t)).length&&this.splitTile(r,0,0,0),i&&(r.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 Ze(e,t,i){return 32*((1<<e)*i+t)+e}function je(e,t){var i=e.tileID.canonical;if(!this._geoJSONIndex)return t(null,null);var r=this._geoJSONIndex.getTile(i.z,i.x,i.y);if(!r)return t(null,null);var n=new N(r.features),o=V(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),t(null,{vectorTile:n,rawData:o.buffer});}ce.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(e){return e}},load:function(e){var t=this.options.log;t&&console.time(\"total time\");var i=\"prepare \"+e.length+\" points\";t&&console.time(i),this.points=e;var r=e.map(pe);t&&console.timeEnd(i);for(var n=this.options.maxZoom;n>=this.options.minZoom;n--){var o=+Date.now();this.trees[n+1]=ae(r,xe,we,this.options.nodeSize,Float32Array),r=this._cluster(r,n),t&&console.log(\"z%d: %d clusters in %dms\",n,r.length,+Date.now()-o);}return this.trees[this.options.minZoom]=ae(r,xe,we,this.options.nodeSize,Float32Array),t&&console.timeEnd(\"total time\"),this},getClusters:function(e,t){for(var i=this.trees[this._limitZoom(t)],r=i.range(ve(e[0]),ye(e[3]),ve(e[2]),ye(e[1])),n=[],o=0;o<r.length;o++){var a=i.points[r[o]];n.push(a.numPoints?de(a):this.points[a.id]);}return n},getChildren:function(e,t){for(var i=this.trees[t+1].points[e],r=this.options.radius/(this.options.extent*Math.pow(2,t)),n=this.trees[t+1].within(i.x,i.y,r),o=[],a=0;a<n.length;a++){var s=this.trees[t+1].points[n[a]];s.parentId===e&&o.push(s.numPoints?de(s):this.points[s.id]);}return o},getLeaves:function(e,t,i,r){i=i||10,r=r||0;var n=[];return this._appendLeaves(n,e,t,i,r,0),n},getTile:function(e,t,i){var r=this.trees[this._limitZoom(e)],n=Math.pow(2,e),o=this.options.extent,a=this.options.radius/o,s=(i-a)/n,l=(i+1+a)/n,u={features:[]};return this._addTileFeatures(r.range((t-a)/n,s,(t+1+a)/n,l),r.points,t,i,n,u),0===t&&this._addTileFeatures(r.range(1-a/n,s,1,l),r.points,n,i,n,u),t===n-1&&this._addTileFeatures(r.range(0,s,a/n,l),r.points,-1,i,n,u),u.features.length?u:null},getClusterExpansionZoom:function(e,t){for(;t<this.options.maxZoom;){var i=this.getChildren(e,t);if(t++,1!==i.length)break;e=i[0].properties.cluster_id;}return t},_appendLeaves:function(e,t,i,r,n,o){for(var a=this.getChildren(t,i),s=0;s<a.length;s++){var l=a[s].properties;if(l.cluster?o+l.point_count<=n?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,i+1,r,n,o):o<n?o++:e.push(a[s]),e.length===r)break}return o},_addTileFeatures:function(e,t,i,r,n,o){for(var a=0;a<e.length;a++){var s=t[e[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*n-i)),Math.round(this.options.extent*(s.y*n-r))]],tags:s.numPoints?ge(s):this.points[s.id].properties});}},_limitZoom:function(e){return Math.max(this.options.minZoom,Math.min(e,this.options.maxZoom+1))},_cluster:function(e,t){for(var i=[],r=this.options.radius/(this.options.extent*Math.pow(2,t)),n=0;n<e.length;n++){var o=e[n];if(!(o.zoom<=t)){o.zoom=t;var a=this.trees[t+1],s=a.within(o.x,o.y,r),l=o.numPoints||1,u=o.x*l,h=o.y*l,c=null;this.options.reduce&&(c=this.options.initial(),this._accumulate(c,o));for(var f=0;f<s.length;f++){var p=a.points[s[f]];if(t<p.zoom){var d=p.numPoints||1;p.zoom=t,u+=p.x*d,h+=p.y*d,l+=d,p.parentId=n,this.options.reduce&&this._accumulate(c,p);}}1===l?i.push(o):(o.parentId=n,i.push(fe(u/l,h/l,l,n,c)));}}return i},_accumulate:function(e,t){var i=t.numPoints?t.properties:this.options.map(this.points[t.id].properties);this.options.reduce(e,i);}},Ye.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},Ye.prototype.splitTile=function(e,t,i,r,n,o,a){for(var s=[e,t,i,r],l=this.options,u=l.debug;s.length;){r=s.pop(),i=s.pop(),t=s.pop(),e=s.pop();var h=1<<t,c=Ze(t,i,r),f=this.tiles[c];if(!f&&(u>1&&console.time(\"creation\"),f=this.tiles[c]=Ve(e,t,i,r,l),this.tileCoords.push({z:t,x:i,y:r}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",t,i,r,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd(\"creation\"));var p=\"z\"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++;}if(f.source=e,n){if(t===l.maxZoom||t===n)continue;var d=1<<n-t;if(i!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(t===l.indexMaxZoom||f.numPoints<=l.indexMaxPoints)continue;if(f.source=null,0!==e.length){u>1&&console.time(\"clipping\");var g,v,y,m,x,w,S=.5*l.buffer/l.extent,M=.5-S,b=.5+S,_=1+S;g=v=y=m=null,x=Le(e,h,i-S,i+b,0,f.minX,f.maxX,l),w=Le(e,h,i+M,i+_,0,f.minX,f.maxX,l),e=null,x&&(g=Le(x,h,r-S,r+b,1,f.minY,f.maxY,l),v=Le(x,h,r+M,r+_,1,f.minY,f.maxY,l),x=null),w&&(y=Le(w,h,r-S,r+b,1,f.minY,f.maxY,l),m=Le(w,h,r+M,r+_,1,f.minY,f.maxY,l),w=null),u>1&&console.timeEnd(\"clipping\"),s.push(g||[],t+1,2*i,2*r),s.push(v||[],t+1,2*i,2*r+1),s.push(y||[],t+1,2*i+1,2*r),s.push(m||[],t+1,2*i+1,2*r+1);}}},Ye.prototype.getTile=function(e,t,i){var r=this.options,n=r.extent,o=r.debug;if(e<0||e>24)return null;var a=1<<e,s=Ze(e,t=(t%a+a)%a,i);if(this.tiles[s])return Fe(this.tiles[s],n);o>1&&console.log(\"drilling down to z%d-%d-%d\",e,t,i);for(var l,u=e,h=t,c=i;!l&&u>0;)u--,h=Math.floor(h/2),c=Math.floor(c/2),l=this.tiles[Ze(u,h,c)];return l&&l.source?(o>1&&console.log(\"found parent tile z%d-%d-%d\",u,h,c),o>1&&console.time(\"drilling down\"),this.splitTile(l.source,u,h,c,e,t,i),o>1&&console.timeEnd(\"drilling down\"),this.tiles[s]?Fe(this.tiles[s],n):null):null};var Xe=function(t){function i(e,i,r){t.call(this,e,i,je),r&&(this.loadGeoJSON=r);}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&\"Idle\"!==this._state?this._state=\"NeedsLoadData\":(this._state=\"Coalescing\",this._loadData());},i.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var t=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(i,function(r,n){if(r||!n)return t(r);if(\"object\"!=typeof n)return t(new Error(\"Input data is not a valid GeoJSON object.\"));$(n,!0);try{e._geoJSONIndex=i.cluster?he(i.superclusterOptions).load(n.features):function(e,t){return new Ye(e,t)}(n,i.geojsonVtOptions);}catch(r){return t(r)}e.loaded={};var o={};if(i.request&&i.request.collectResourceTiming){var a=M(i.request.url);a&&(o.resourceTiming={},o.resourceTiming[i.source]=JSON.parse(JSON.stringify(a)));}t(null,o);});}},i.prototype.coalesce=function(){\"Coalescing\"===this._state?this._state=\"Idle\":\"NeedsLoadData\"===this._state&&(this._state=\"Coalescing\",this._loadData());},i.prototype.reloadTile=function(e,i){var r=this.loaded,n=e.uid;return r&&r[n]?t.prototype.reloadTile.call(this,e,i):this.loadTile(e,i)},i.prototype.loadGeoJSON=function(t,i){if(t.request)e.getJSON(t.request,i);else{if(\"string\"!=typeof t.data)return i(new Error(\"Input data is not a valid GeoJSON object.\"));try{return i(null,JSON.parse(t.data))}catch(e){return i(new Error(\"Input data is not a valid GeoJSON object.\"))}}},i.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t();},i}(_),qe=function(t){var i=this;this.self=t,this.actor=new e.default$7(t,this),this.layerIndexes={},this.workerSourceTypes={vector:_,geojson:Xe},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(e,t){if(i.workerSourceTypes[e])throw new Error('Worker source with name \"'+e+'\" already registered.');i.workerSourceTypes[e]=t;},this.self.registerRTLTextPlugin=function(t){if(e.plugin.isLoaded())throw new Error(\"RTL text plugin already registered.\");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText;};};return qe.prototype.setLayers=function(e,t,i){this.getLayerIndex(e).replace(t),i();},qe.prototype.updateLayers=function(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i();},qe.prototype.loadTile=function(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i);},qe.prototype.loadDEMTile=function(e,t,i){this.getDEMWorkerSource(e,t.source).loadTile(t,i);},qe.prototype.reloadTile=function(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i);},qe.prototype.abortTile=function(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i);},qe.prototype.removeTile=function(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i);},qe.prototype.removeDEMTile=function(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t);},qe.prototype.removeSource=function(e,t,i){if(this.workerSources[e]&&this.workerSources[e][t.type]&&this.workerSources[e][t.type][t.source]){var r=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==r.removeSource?r.removeSource(t,i):i();}},qe.prototype.loadWorkerSource=function(e,t,i){try{this.self.importScripts(t.url),i();}catch(e){i(e.toString());}},qe.prototype.loadRTLTextPlugin=function(t,i,r){try{e.plugin.isLoaded()||(this.self.importScripts(i),r(e.plugin.isLoaded()?null:new Error(\"RTL Text Plugin failed to import scripts from \"+i)));}catch(e){r(e.toString());}},qe.prototype.getLayerIndex=function(e){var t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new r),t},qe.prototype.getWorkerSource=function(e,t,i){var r=this;if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){var n={send:function(t,i,n){r.actor.send(t,i,n,e);}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e));}return this.workerSources[e][t][i]},qe.prototype.getDEMWorkerSource=function(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new I),this.demWorkerSources[e][t]},\"undefined\"!=typeof WorkerGlobalScope&&\"undefined\"!=typeof self&&self instanceof WorkerGlobalScope&&new qe(self),qe});\n\ndefine([\"./chunk1.js\"],function(t){\"use strict\";var e=t.createCommonjsModule(function(t){function e(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&&function(){if(!(\"Worker\"in window&&\"Blob\"in window&&\"URL\"in window))return!1;var t,e,i=new Blob([\"\"],{type:\"text/javascript\"}),n=URL.createObjectURL(i);try{e=new Worker(n),t=!0;}catch(e){t=!1;}e&&e.terminate();return URL.revokeObjectURL(n),t}()&&\"Uint8ClampedArray\"in window&&function(t){void 0===i[t]&&(i[t]=function(t){var i=document.createElement(\"canvas\"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,i.probablySupportsContext?i.probablySupportsContext(\"webgl\",n)||i.probablySupportsContext(\"experimental-webgl\",n):i.supportsContext?i.supportsContext(\"webgl\",n)||i.supportsContext(\"experimental-webgl\",n):i.getContext(\"webgl\",n)||i.getContext(\"experimental-webgl\",n)}(t));return i[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var i={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};}),i=t.default.performance&&t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),n=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,o=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,r={now:i,frame:function(t){return n(t)},cancelFrame:function(t){return o(t)},getImageData:function(e){var i=t.default.document.createElement(\"canvas\"),n=i.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return i.width=e.width,i.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var a=t.default.document.createElement(\"img\");a.onload=function(){r.supportsWebp=!0;},a.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\";}var s={create:function(e,i,n){var o=t.default.document.createElement(e);return i&&(o.className=i),n&&n.appendChild(o),o},createNS:function(e,i){return t.default.document.createElementNS(e,i)}},l=t.default.document?t.default.document.documentElement.style:null;function c(t){if(!l)return null;for(var e=0;e<t.length;e++)if(t[e]in l)return t[e];return t[0]}var u,h=c([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]);s.disableDrag=function(){l&&h&&(u=l[h],l[h]=\"none\");},s.enableDrag=function(){l&&h&&(l[h]=u);};var p=c([\"transform\",\"WebkitTransform\"]);s.setTransform=function(t,e){t.style[p]=e;};var d=!1;try{var f=Object.defineProperty({},\"passive\",{get:function(){d=!0;}});t.default.addEventListener(\"test\",f,f),t.default.removeEventListener(\"test\",f,f);}catch(t){d=!1;}s.addEventListener=function(t,e,i,n){void 0===n&&(n={}),\"passive\"in n&&d?t.addEventListener(e,i,n):t.addEventListener(e,i,n.capture);},s.removeEventListener=function(t,e,i,n){void 0===n&&(n={}),\"passive\"in n&&d?t.removeEventListener(e,i,n):t.removeEventListener(e,i,n.capture);};var m=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener(\"click\",m,!0);};s.suppressClick=function(){t.default.addEventListener(\"click\",m,!0),t.default.setTimeout(function(){t.default.removeEventListener(\"click\",m,!0);},0);},s.mousePos=function(e,i){var n=e.getBoundingClientRect();return i=i.touches?i.touches[0]:i,new t.default$1(i.clientX-n.left-e.clientLeft,i.clientY-n.top-e.clientTop)},s.touchPos=function(e,i){for(var n=e.getBoundingClientRect(),o=[],r=\"touchend\"===i.type?i.changedTouches:i.touches,a=0;a<r.length;a++)o.push(new t.default$1(r[a].clientX-n.left-e.clientLeft,r[a].clientY-n.top-e.clientTop));return o},s.mouseButton=function(e){return void 0!==t.default.InstallTrigger&&2===e.button&&e.ctrlKey&&t.default.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0?0:e.button},s.remove=function(t){t.parentNode&&t.parentNode.removeChild(t);};var _={API_URL:\"https://api.mapbox.com\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},g=\"See https://www.mapbox.com/api-documentation/#access-tokens\";function v(t,e){var i=C(_.API_URL);if(t.protocol=i.protocol,t.authority=i.authority,\"/\"!==i.path&&(t.path=\"\"+i.path+t.path),!_.REQUIRE_ACCESS_TOKEN)return S(t);if(!(e=e||_.ACCESS_TOKEN))throw new Error(\"An API access token is required to use Mapbox GL. \"+g);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+g);return t.params.push(\"access_token=\"+e),S(t)}function y(t){return 0===t.indexOf(\"mapbox:\")}var x=function(t,e){if(!y(t))return t;var i=C(t);return i.path=\"/fonts/v1\"+i.path,v(i,e)},b=function(t,e){if(!y(t))return t;var i=C(t);return i.path=\"/v4/\"+i.authority+\".json\",i.params.push(\"secure\"),v(i,e)},w=function(t,e,i,n){var o=C(t);return y(t)?(o.path=\"/styles/v1\"+o.path+\"/sprite\"+e+i,v(o,n)):(o.path+=\"\"+e+i,S(o))},E=/(\\.(png|jpg)\\d*)(?=$)/,T=function(t,e,i){if(!e||!y(e))return t;var n=C(t),o=r.devicePixelRatio>=2||512===i?\"@2x\":\"\",a=r.supportsWebp?\".webp\":\"$1\";return n.path=n.path.replace(E,\"\"+o+a),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf(\"access_token=tk.\")&&(t[e]=\"access_token=\"+(_.ACCESS_TOKEN||\"\"));}(n.params),S(n)};var I=/^(\\w+):\\/\\/([^/?]*)(\\/[^?]+)?\\??(.+)?/;function C(t){var e=t.match(I);if(!e)throw new Error(\"Unable to parse URL object\");return{protocol:e[1],authority:e[2],path:e[3]||\"/\",params:e[4]?e[4].split(\"&\"):[]}}function S(t){var e=t.params.length?\"?\"+t.params.join(\"&\"):\"\";return t.protocol+\"://\"+t.authority+t.path+e}var z=t.default.HTMLImageElement,A=t.default.HTMLCanvasElement,R=t.default.HTMLVideoElement,D=t.default.ImageData,M=function(t,e,i,n){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,n);};M.prototype.update=function(t,e){var i=t.width,n=t.height,o=!this.size||this.size[0]!==i||this.size[1]!==n,r=this.context,a=r.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),o?(this.size=[i,n],r.pixelStoreUnpack.set(1),this.format!==a.RGBA||e&&!1===e.premultiply||r.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof z||t instanceof A||t instanceof R||t instanceof D?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,i,n,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof z||t instanceof A||t instanceof R||t instanceof D?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,i,n,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D);},M.prototype.bind=function(t,e,i){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),i!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,i||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e);},M.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},M.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null;};var L=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0;};L.prototype.isLoaded=function(){return this.loaded},L.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,i=this.requestors;e<i.length;e+=1){var n=i[e],o=n.ids,r=n.callback;this._notify(o,r);}this.requestors=[];}},L.prototype.getImage=function(t){return this.images[t]},L.prototype.addImage=function(t,e){this.images[t]=e;},L.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t]);},L.prototype.getImages=function(t,e){var i=!0;if(!this.isLoaded())for(var n=0,o=t;n<o.length;n+=1){var r=o[n];this.images[r]||(i=!1);}this.isLoaded()||i?this._notify(t,e):this.requestors.push({ids:t,callback:e});},L.prototype._notify=function(t,e){for(var i={},n=0,o=t;n<o.length;n+=1){var r=o[n],a=this.images[r];a&&(i[r]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf});}e(null,i);},L.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},L.prototype.getPattern=function(e){var i=this.patterns[e];if(i)return i.position;var n=this.getImage(e);if(!n)return null;var o=n.data.width+2,r=n.data.height+2,a=this.shelfPack.packOne(o,r);if(!a)return null;this.atlasImage.resize(this.getPixelSize());var s=n.data,l=this.atlasImage,c=a.x+1,u=a.y+1,h=s.width,p=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u},{width:h,height:p}),t.RGBAImage.copy(s,l,{x:0,y:p-1},{x:c,y:u-1},{width:h,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u+p},{width:h,height:1}),t.RGBAImage.copy(s,l,{x:h-1,y:0},{x:c-1,y:u},{width:1,height:p}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c+h,y:u},{width:1,height:p}),this.dirty=!0;var d=new t.ImagePosition(a,n);return this.patterns[e]={bin:a,position:d},d},L.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new M(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE);};var P=B,k=1e20;function B(t,e,i,n,o,r){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=o||\"sans-serif\",this.fontWeight=r||\"normal\",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(\"canvas\"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext(\"2d\"),this.ctx.font=this.fontWeight+\" \"+this.fontSize+\"px \"+this.fontFamily,this.ctx.textBaseline=\"middle\",this.ctx.fillStyle=\"black\",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf(\"Gecko/\")>=0?1.2:1));}function O(t,e,i,n,o,r,a){for(var s=0;s<e;s++){for(var l=0;l<i;l++)n[l]=t[l*e+s];for(F(n,o,r,a,i),l=0;l<i;l++)t[l*e+s]=o[l];}for(l=0;l<i;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(F(n,o,r,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(o[s]);}}function F(t,e,i,n,o){i[0]=0,n[0]=-k,n[1]=+k;for(var r=1,a=0;r<o;r++){for(var s=(t[r]+r*r-(t[i[a]]+i[a]*i[a]))/(2*r-2*i[a]);s<=n[a];)a--,s=(t[r]+r*r-(t[i[a]]+i[a]*i[a]))/(2*r-2*i[a]);i[++a]=r,n[a]=s,n[a+1]=+k;}for(r=0,a=0;r<o;r++){for(;n[a+1]<r;)a++;e[r]=(r-i[a])*(r-i[a])+t[i[a]];}}B.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var o=e.data[4*n+3]/255;this.gridOuter[n]=1===o?0:0===o?k:Math.pow(Math.max(0,.5-o),2),this.gridInner[n]=1===o?k:0===o?0:Math.pow(Math.max(0,o-.5),2);}for(O(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),O(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var r=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(r/this.radius+this.cutoff))));}return i};var N=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={};};N.prototype.setURL=function(t){this.url=t;},N.prototype.getGlyphs=function(e,i){var n=this,o=[];for(var r in e)for(var a=0,s=e[r];a<s.length;a+=1){var l=s[a];o.push({stack:r,id:l});}t.asyncAll(o,function(t,e){var i=t.stack,o=t.id,r=n.entries[i];r||(r=n.entries[i]={glyphs:{},requests:{}});var a=r.glyphs[o];if(void 0===a)if(a=n._tinySDF(r,i,o))e(null,{stack:i,id:o,glyph:a});else{var s=Math.floor(o/256);if(256*s>65535)e(new Error(\"glyphs > 65535 not supported\"));else{var l=r.requests[s];l||(l=r.requests[s]=[],N.loadGlyphRange(i,s,n.url,n.requestTransform,function(t,e){if(e)for(var i in e)r.glyphs[+i]=e[+i];for(var n=0,o=l;n<o.length;n+=1){(0,o[n])(t,e);}delete r.requests[s];})),l.push(function(t,n){t?e(t):n&&e(null,{stack:i,id:o,glyph:n[o]||null});});}}else e(null,{stack:i,id:o,glyph:a});},function(t,e){if(t)i(t);else if(e){for(var n={},o=0,r=e;o<r.length;o+=1){var a=r[o],s=a.stack,l=a.id,c=a.glyph;(n[s]||(n[s]={}))[l]=c&&{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics};}i(null,n);}});},N.prototype._tinySDF=function(e,i,n){var o=this.localIdeographFontFamily;if(o&&(t.default$4[\"CJK Unified Ideographs\"](n)||t.default$4[\"Hangul Syllables\"](n))){var r=e.tinySDF;if(!r){var a=\"400\";/bold/i.test(i)?a=\"900\":/medium/i.test(i)?a=\"500\":/light/i.test(i)&&(a=\"200\"),r=e.tinySDF=new N.TinySDF(24,3,8,.25,o,a);}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},r.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},N.loadGlyphRange=function(e,i,n,o,r){var a=256*i,s=a+255,l=o(x(n).replace(\"{fontstack}\",e).replace(\"{range}\",a+\"-\"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,i){if(e)r(e);else if(i){for(var n={},o=0,a=t.default$3(i.data);o<a.length;o+=1){var s=a[o];n[s.id]=s;}r(null,n);}});},N.TinySDF=P;var U=function(){this.specification=t.default$5.light.position;};U.prototype.possiblyEvaluate=function(e,i){return t.sphericalToCartesian(e.expression.evaluate(i))},U.prototype.interpolate=function(e,i,n){return{x:t.number(e.x,i.x,n),y:t.number(e.y,i.y,n),z:t.number(e.z,i.z,n)}};var Z=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new U,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),V=function(e){function i(i){e.call(this),this._transitionable=new t.Transitionable(Z),this.setLight(i),this._transitioning=this._transitionable.untransitioned();}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.getLight=function(){return this._transitionable.serialize()},i.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var i in e){var n=e[i];t.endsWith(i,\"-transition\")?this._transitionable.setTransition(i.slice(0,-\"-transition\".length),n):this._transitionable.setValue(i,n);}},i.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning);},i.prototype.hasTransition=function(){return this._transitioning.hasTransition()},i.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t);},i.prototype._validate=function(e,i){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},i}(t.Evented),j=function(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={};};j.prototype.getDash=function(t,e){var i=t.join(\",\")+String(e);return this.positions[i]||(this.positions[i]=this.addDash(t,e)),this.positions[i]},j.prototype.addDash=function(e,i){var n=i?7:0,o=2*n+1;if(this.nextRow+o>this.height)return t.warnOnce(\"LineAtlas out of space\"),null;for(var r=0,a=0;a<e.length;a++)r+=e[a];for(var s=this.width/r,l=s/2,c=e.length%2==1,u=-n;u<=n;u++)for(var h=this.nextRow+n+u,p=this.width*h,d=c?-e[e.length-1]:0,f=e[0],m=1,_=0;_<this.width;_++){for(;f<_/s;)d=f,f+=e[m],c&&m===e.length-1&&(f+=e[0]),m++;var g=Math.abs(_-d*s),v=Math.abs(_-f*s),y=Math.min(g,v),x=m%2==1,b=void 0;if(i){var w=n?u/n*(l+1):0;if(x){var E=l-Math.abs(w);b=Math.sqrt(y*y+E*E);}else b=l-Math.sqrt(y*y+w*w);}else b=(x?1:-1)*y;this.data[3+4*(p+_)]=Math.max(0,Math.min(255,b+128));}var T={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:r};return this.nextRow+=o,this.dirty=!0,T},j.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data));};var $=function e(i,n){this.workerPool=i,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var o=this.workerPool.acquire(this.id),r=0;r<o.length;r++){var a=o[r],s=new e.Actor(a,n,this.id);s.name=\"Worker \"+r,this.actors.push(s);}};function G(e,i,n){var o=function(e,i){if(e)return n(e);if(i){var o=t.pick(i,[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"mapbox_logo\",\"bounds\"]);i.vector_layers&&(o.vectorLayers=i.vector_layers,o.vectorLayerIds=o.vectorLayers.map(function(t){return t.id})),n(null,o);}};e.url?t.getJSON(i(b(e.url),t.ResourceType.Source),o):r.frame(function(){return o(null,e)});}$.prototype.broadcast=function(e,i,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,i,n);},n);},$.prototype.send=function(t,e,i,n){return(\"number\"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,i),n},$.prototype.remove=function(){this.actors.forEach(function(t){t.remove();}),this.actors=[],this.workerPool.release(this.id);},$.Actor=t.default$7;var W=function(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\")};W.prototype.wrap=function(){return new W(t.wrap(this.lng,-180,180),this.lat)},W.prototype.toArray=function(){return[this.lng,this.lat]},W.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},W.prototype.toBounds=function(t){var e=360*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new q(new W(this.lng-i,this.lat-e),new W(this.lng+i,this.lat+e))},W.convert=function(t){if(t instanceof W)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new W(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new W(Number(t.lng),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")};var q=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]));};q.prototype.setNorthEast=function(t){return this._ne=t instanceof W?new W(t.lng,t.lat):W.convert(t),this},q.prototype.setSouthWest=function(t){return this._sw=t instanceof W?new W(t.lng,t.lat):W.convert(t),this},q.prototype.extend=function(t){var e,i,n=this._sw,o=this._ne;if(t instanceof W)e=t,i=t;else{if(!(t instanceof q))return Array.isArray(t)?t.every(Array.isArray)?this.extend(q.convert(t)):this.extend(W.convert(t)):this;if(e=t._sw,i=t._ne,!e||!i)return this}return n||o?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),o.lng=Math.max(i.lng,o.lng),o.lat=Math.max(i.lat,o.lat)):(this._sw=new W(e.lng,e.lat),this._ne=new W(i.lng,i.lat)),this},q.prototype.getCenter=function(){return new W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},q.prototype.getSouthWest=function(){return this._sw},q.prototype.getNorthEast=function(){return this._ne},q.prototype.getNorthWest=function(){return new W(this.getWest(),this.getNorth())},q.prototype.getSouthEast=function(){return new W(this.getEast(),this.getSouth())},q.prototype.getWest=function(){return this._sw.lng},q.prototype.getSouth=function(){return this._sw.lat},q.prototype.getEast=function(){return this._ne.lng},q.prototype.getNorth=function(){return this._ne.lat},q.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},q.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},q.prototype.isEmpty=function(){return!(this._sw&&this._ne)},q.convert=function(t){return!t||t instanceof q?t:new q(t)};var X=function(t,e,i){this.bounds=q.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=i||24;};X.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},X.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),i=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),o=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<n&&t.y>=i&&t.y<o},X.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},X.prototype.latY=function(e,i){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),o=Math.pow(2,i)/(2*Math.PI);return Math.pow(2,i-1)+.5*Math.log((1+n)/(1-n))*-o};var H=function(e){function i(i,n,o,r){if(e.call(this),this.id=i,this.dispatcher=o,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,[\"url\",\"scheme\",\"tileSize\"])),this._options=t.extend({type:\"vector\"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(r);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),G(this._options,this.map._transformRequest,function(i,n){i?e.fire(new t.ErrorEvent(i)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new X(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})));});},i.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},i.prototype.onAdd=function(t){this.map=t,this.load();},i.prototype.serialize=function(){return t.extend({},this._options)},i.prototype.loadTile=function(e,i){var n=T(e.tileID.canonical.url(this.tiles,this.scheme),this.url),o={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:r.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function a(t,n){return e.aborted?i(null):t?i(t):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),i(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}o.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||\"expired\"===e.state?e.workerID=this.dispatcher.send(\"loadTile\",o,a.bind(this)):\"loading\"===e.state?e.reloadCallback=i:this.dispatcher.send(\"reloadTile\",o,a.bind(this),e.workerID);},i.prototype.abortTile=function(t){this.dispatcher.send(\"abortTile\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID);},i.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID);},i.prototype.hasTransition=function(){return!1},i}(t.Evented),K=function(e){function i(i,n,o,r){e.call(this),this.id=i,this.dispatcher=o,this.setEventedParent(r),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,[\"url\",\"scheme\",\"tileSize\"]));}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),G(this._options,this.map._transformRequest,function(i,n){i?e.fire(new t.ErrorEvent(i)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new X(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})));});},i.prototype.onAdd=function(t){this.map=t,this.load();},i.prototype.serialize=function(){return t.extend({},this._options)},i.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},i.prototype.loadTile=function(e,i){var n=this,o=T(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(o,t.ResourceType.Tile),function(t,o){if(delete e.request,e.aborted)e.state=\"unloaded\",i(null);else if(t)e.state=\"errored\",i(t);else if(o){n.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var r=n.map.painter.context,a=r.gl;e.texture=n.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new M(r,o,a.RGBA,{useMipmap:!0}),e.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),r.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.extTextureFilterAnisotropicMax)),e.state=\"loaded\",i(null);}});},i.prototype.abortTile=function(t,e){t.request&&(t.request.abort(),delete t.request),e();},i.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e();},i.prototype.hasTransition=function(){return!1},i}(t.Evented),Y=function(e){function i(i,n,o,r){e.call(this,i,n,o,r),this.type=\"raster-dem\",this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||\"mapbox\";}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.serialize=function(){return{type:\"raster-dem\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},i.prototype.loadTile=function(e,i){var n=T(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(t,n){if(delete e.request,e.aborted)e.state=\"unloaded\",i(null);else if(t)e.state=\"errored\",i(t);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=r.getImageData(n),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&\"expired\"!==e.state||(e.workerID=this.dispatcher.send(\"loadDEMTile\",a,function(t,n){t&&(e.state=\"errored\",i(t));n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state=\"loaded\",i(null));}.bind(this)));}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID);},i.prototype._getNeighboringTiles=function(e){var i=e.canonical,n=Math.pow(2,i.z),o=(i.x-1+n)%n,r=0===i.x?e.wrap-1:e.wrap,a=(i.x+1+n)%n,s=i.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,r,i.z,o,i.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y).key]={backfilled:!1},i.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,r,i.z,o,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y-1).key]={backfilled:!1}),i.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,r,i.z,o,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,i.z,a,i.y+1).key]={backfilled:!1}),l},i.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state=\"unloaded\",this.dispatcher.send(\"removeDEMTile\",{uid:t.uid,source:this.id},void 0,t.workerID);},i}(K),J=function(e){function i(i,n,o,r){e.call(this),this.id=i,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=o,this.setEventedParent(r),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type);var a=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*a,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*a,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(n.clusterRadius||50)*a,log:!1}},n.workerOptions);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(i){if(i)e.fire(new t.ErrorEvent(i));else{var n={dataType:\"source\",sourceDataType:\"metadata\"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(\"data\",n));}});},i.prototype.onAdd=function(t){this.map=t,this.load();},i.prototype.setData=function(e){var i=this;return this._data=e,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(e){if(e)return i.fire(new t.ErrorEvent(e));var n={dataType:\"source\",sourceDataType:\"content\"};i._collectResourceTiming&&i._resourceTiming&&i._resourceTiming.length>0&&(n.resourceTiming=i._resourceTiming,i._resourceTiming=[]),i.fire(new t.Event(\"data\",n));}),this},i.prototype._updateWorkerData=function(e){var i,n,o=this,r=t.extend({},this.workerOptions),a=this._data;\"string\"==typeof a?(r.request=this.map._transformRequest((i=a,(n=t.default.document.createElement(\"a\")).href=i,n.href),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(a),this.workerID=this.dispatcher.send(this.type+\".\"+r.source+\".loadData\",r,function(t,i){o._removed||i&&i.abandoned||(o._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[o.id]&&(o._resourceTiming=i.resourceTiming[o.id].slice(0)),o.dispatcher.send(o.type+\".\"+r.source+\".coalesce\",null,null,o.workerID),e(t));},this.workerID);},i.prototype.loadTile=function(t,e){var i=this,n=void 0===t.workerID?\"loadTile\":\"reloadTile\",o={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:r.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,o,function(o,r){return t.unloadVectorData(),t.aborted?e(null):o?e(o):(t.loadVectorData(r,i.map.painter,\"reloadTile\"===n),e(null))},this.workerID);},i.prototype.abortTile=function(t){t.aborted=!0;},i.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},null,t.workerID);},i.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send(\"removeSource\",{type:this.type,source:this.id},null,this.workerID);},i.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},i.prototype.hasTransition=function(){return!1},i}(t.Evented);var Q=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),tt=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null;};tt.prototype.bind=function(t,e,i,n,o,r,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c<n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&&(l=!0);var u=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==i||l||this.boundIndexBuffer!==o||this.boundVertexOffset!==r||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||u?this.freshBind(e,i,n,o,r,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),o&&o.dynamicDraw&&o.bind(),s&&s.bind());},tt.prototype.freshBind=function(t,e,i,n,o,r,a){var s,l=t.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=n,this.boundVertexOffset=o,this.boundDynamicVertexBuffer=r,this.boundDynamicVertexBuffer2=a;else{s=c.currentNumAttributes||0;for(var h=l;h<s;h++)u.disableVertexAttribArray(h);}e.enableAttributes(u,t);for(var p=0,d=i;p<d.length;p+=1){d[p].enableAttributes(u,t);}r&&r.enableAttributes(u,t),a&&a.enableAttributes(u,t),e.bind(),e.setVertexAttribPointers(u,t,o);for(var f=0,m=i;f<m.length;f+=1){var _=m[f];_.bind(),_.setVertexAttribPointers(u,t,o);}r&&(r.bind(),r.setVertexAttribPointers(u,t,o)),n&&n.bind(),a&&(a.bind(),a.setVertexAttribPointers(u,t,o)),c.currentNumAttributes=l;},tt.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null);};var et=function(e){function i(t,i,n,o){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=i.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(o),this.options=i;}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this;this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(i,n){i?e.fire(new t.ErrorEvent(i)):n&&(e.image=r.getImageData(n),e._finishLoading());});},i.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})));},i.prototype.onAdd=function(t){this.map=t,this.load();},i.prototype.setCoordinates=function(e){this.coordinates=e;var i=this.map,n=e.map(function(t){return i.transform.locationCoordinate(W.convert(t)).zoomTo(0)}),o=this.centerCoord=t.getCoordinatesCenter(n);o.column=Math.floor(o.column),o.row=Math.floor(o.row),this.tileID=new t.CanonicalTileID(o.zoom,o.column,o.row),this.minzoom=this.maxzoom=o.zoom;var r=n.map(function(e){var i=e.zoomTo(o.zoom);return new t.default$1(Math.round((i.column-o.column)*t.default$8),Math.round((i.row-o.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(r[0].x,r[0].y,0,0),this._boundsArray.emplaceBack(r[1].x,r[1].y,t.default$8,0),this._boundsArray.emplaceBack(r[3].x,r[3].y,0,t.default$8),this._boundsArray.emplaceBack(r[2].x,r[2].y,t.default$8,t.default$8),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this},i.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,e=t.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,Q.members)),this.boundsVAO||(this.boundsVAO=new tt),this.texture||(this.texture=new M(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];\"loaded\"!==n.state&&(n.state=\"loaded\",n.texture=this.texture);}}},i.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=\"errored\",e(null));},i.prototype.serialize=function(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return!1},i}(t.Evented),it=function(e){function i(t,i,n,o){e.call(this,t,i,n,o),this.roundZoom=!0,this.type=\"video\",this.options=i;}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){var e=this,i=this.options;this.urls=[];for(var n=0,o=i.urls;n<o.length;n+=1){var r=o[n];e.urls.push(e.map._transformRequest(r,t.ResourceType.Source).url);}t.getVideo(this.urls,function(i,n){i?e.fire(new t.ErrorEvent(i)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener(\"playing\",function(){e.map._rerender();}),e.map&&e.video.play(),e._finishLoading());});},i.prototype.getVideo=function(){return this.video},i.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)));},i.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,Q.members)),this.boundsVAO||(this.boundsVAO=new tt),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new M(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];\"loaded\"!==n.state&&(n.state=\"loaded\",n.texture=this.texture);}}},i.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this.video&&!this.video.paused},i}(et),nt=function(e){function i(i,n,o,r){e.call(this,i,n,o,r),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return\"number\"!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9(\"sources.\"+i,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9(\"sources.\"+i,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.default$9(\"sources.\"+i,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9(\"sources.\"+i,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9(\"sources.\"+i,null,'missing required property \"canvas\"'))),this.options=n,this.animate=void 0===n.animate||n.animate;}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(\"Canvas dimensions cannot be less than or equal to zero.\"))):(this.play=function(){this._playing=!0,this.map._rerender();},this.pause=function(){this._playing=!1;},this._finishLoading());},i.prototype.getCanvas=function(){return this.canvas},i.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play();},i.prototype.onRemove=function(){this.pause();},i.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e=this.map.painter.context,i=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,Q.members)),this.boundsVAO||(this.boundsVAO=new tt),this.texture?t?this.texture.update(this.canvas):this._playing&&(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.canvas)):(this.texture=new M(e,this.canvas,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var o=this.tiles[n];\"loaded\"!==o.state&&(o.state=\"loaded\",o.texture=this.texture);}}},i.prototype.serialize=function(){return{type:\"canvas\",coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this._playing},i.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var i=e[t];if(isNaN(i)||i<=0)return!0}return!1},i}(et),ot={vector:H,raster:K,\"raster-dem\":Y,geojson:J,video:it,image:et,canvas:nt},rt=function(e,i,n,o){var r=new ot[i.type](e,i,n,o);if(r.id!==e)throw new Error(\"Expected Source id to be \"+e+\" instead of \"+r.id);return t.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],r),r};function at(t,e,i,n,o){var r=o.maxPitchScaleFactor(),a=t.tilesIn(i,r);a.sort(st);for(var s=[],l=0,c=a;l<c.length;l+=1){var u=c[l];s.push({wrappedTileID:u.tileID.wrapped().key,queryResults:u.tile.queryRenderedFeatures(e,u.queryGeometry,u.scale,n,o,r,t.transform.calculatePosMatrix(u.tileID.toUnwrapped()))});}return function(t){for(var e={},i={},n=0,o=t;n<o.length;n+=1){var r=o[n],a=r.queryResults,s=r.wrappedTileID,l=i[s]=i[s]||{};for(var c in a)for(var u=a[c],h=l[c]=l[c]||{},p=e[c]=e[c]||[],d=0,f=u;d<f.length;d+=1){var m=f[d];h[m.featureIndex]||(h[m.featureIndex]=!0,p.push(m.feature));}}return e}(s)}function st(t,e){var i=t.tileID,n=e.tileID;return i.overscaledZ-n.overscaledZ||i.canonical.y-n.canonical.y||i.wrap-n.wrap||i.canonical.x-n.canonical.x}var lt=function(e,i){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state=\"loading\";};lt.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<r.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e);},lt.prototype.wasRequested=function(){return\"errored\"===this.state||\"loaded\"===this.state||\"reloading\"===this.state},lt.prototype.loadVectorData=function(e,i,n){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",e){if(e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var i={};if(!e)return i;for(var n=0,o=t;n<o.length;n+=1){var r=o[n],a=r.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==a.length){r.layers=a;for(var s=0,l=a;s<l.length;s+=1)i[l[s].id]=r;}}return i}(e.buckets,i.style),n)for(var o in this.buckets){var r=this.buckets[o];r instanceof t.default$14&&(r.justReloaded=!0);}for(var a in this.queryPadding=0,this.buckets){var s=this.buckets[a];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(s.layerIds[0]).queryRadius(s));}e.iconAtlasImage&&(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage);}else this.collisionBoxArray=new t.CollisionBoxArray;},lt.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\";},lt.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state=\"unloaded\";},lt.prototype.getBucket=function(t){return this.buckets[t.id]},lt.prototype.upload=function(t){for(var e in this.buckets){var i=this.buckets[e];i.uploaded||(i.upload(t),i.uploaded=!0);}var n=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new M(t,this.iconAtlasImage,n.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new M(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null);},lt.prototype.queryRenderedFeatures=function(t,e,i,n,o,r,a){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:i,tileSize:this.tileSize,posMatrix:a,transform:o,params:n,queryPadding:this.queryPadding*r},t):{}},lt.prototype.querySourceFeatures=function(e,i){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),o=i?i.sourceLayer:\"\",r=n._geojsonTileLayer||n[o];if(r)for(var a=t.default$13(i&&i.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},l=0;l<r.length;l++){var c=r.feature(l);if(a(new t.default$16(this.tileID.overscaledZ),c)){var u=new t.default$12(c,s.z,s.x,s.y);u.tile=s,e.push(u);}}}},lt.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer);},lt.prototype.setMask=function(e,i){if(!t.default$10(this.mask,e)&&(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var n=new t.RasterBoundsArray,o=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,n,o);for(var r=Object.keys(e),a=0;a<r.length;a++){var s=e[r[a]],l=t.default$8>>s.z,c=new t.default$1(s.x*l,s.y*l),u=new t.default$1(c.x+l,c.y+l),h=this.segments.prepareSegment(4,n,o);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(u.x,c.y,u.x,c.y),n.emplaceBack(c.x,u.y,c.x,u.y),n.emplaceBack(u.x,u.y,u.x,u.y);var p=h.vertexLength;o.emplaceBack(p,p+1,p+2),o.emplaceBack(p+1,p+2,p+3),h.vertexLength+=4,h.primitiveLength+=2;}this.maskedBoundsBuffer=i.createVertexBuffer(n,Q.members),this.maskedIndexBuffer=i.createIndexBuffer(o);}},lt.prototype.hasData=function(){return\"loaded\"===this.state||\"reloading\"===this.state||\"expired\"===this.state},lt.prototype.setExpiryData=function(e){var i=this.expirationTime;if(e.cacheControl){var n=t.parseCacheControl(e.cacheControl);n[\"max-age\"]&&(this.expirationTime=Date.now()+1e3*n[\"max-age\"]);}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var o=Date.now(),r=!1;if(this.expirationTime>o)r=!1;else if(i)if(this.expirationTime<i)r=!0;else{var a=this.expirationTime-i;a?this.expirationTime=o+Math.max(a,3e4):r=!0;}else r=!0;r?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0;}},lt.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var ct=function(t,e){this.max=t,this.onRemove=e,this.reset();};ct.prototype.reset=function(){for(var t in this.data)for(var e=0,i=this.data[t];e<i.length;e+=1){var n=i[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value);}return this.data={},this.order=[],this},ct.prototype.add=function(t,e,i){var n=this,o=t.wrapped().key;void 0===this.data[o]&&(this.data[o]=[]);var r={value:e,timeout:void 0};if(void 0!==i&&(r.timeout=setTimeout(function(){n.remove(t,r);},i)),this.data[o].push(r),this.order.push(o),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a);}return this},ct.prototype.has=function(t){return t.wrapped().key in this.data},ct.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},ct.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},ct.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},ct.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,n=void 0===e?0:this.data[i].indexOf(e),o=this.data[i][n];return this.data[i].splice(n,1),o.timeout&&clearTimeout(o.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(o.value),this.order.splice(this.order.indexOf(i),1),this},ct.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e);}return this};var ut=function(t,e,i){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer;};ut.prototype.unbindVAO=function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null);},ut.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer);},ut.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer);},ut.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer);};var ht={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"},pt=function(t,e,i,n){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var o=t.gl;this.buffer=o.createBuffer(),t.bindVertexBuffer.set(this.buffer),o.bufferData(o.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?o.DYNAMIC_DRAW:o.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer;};pt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer);},pt.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer);},pt.prototype.enableAttributes=function(t,e){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.enableVertexAttribArray(o);}},pt.prototype.setVertexAttribPointers=function(t,e,i){for(var n=0;n<this.attributes.length;n++){var o=this.attributes[n],r=e.attributes[o.name];void 0!==r&&t.vertexAttribPointer(r,o.components,t[ht[o.type]],!1,this.itemSize,o.offset+this.itemSize*(i||0));}},pt.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer);};var dt=function(e){this.context=e,this.current=t.default$6.transparent;};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t);};var ft=function(t){this.context=t,this.current=1;};ft.prototype.get=function(){return this.current},ft.prototype.set=function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t);};var mt=function(t){this.context=t,this.current=0;};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t);};var _t=function(t){this.context=t,this.current=[!0,!0,!0,!0];};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t);};var gt=function(t){this.context=t,this.current=!0;};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t);};var vt=function(t){this.context=t,this.current=255;};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t);};var yt=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255};};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t);};var xt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP];};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t);};var bt=function(t){this.context=t,this.current=!1;};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t;}};var wt=function(t){this.context=t,this.current=[0,1];};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t);};var Et=function(t){this.context=t,this.current=!1;};Et.prototype.get=function(){return this.current},Et.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t;}};var Tt=function(t){this.context=t,this.current=t.gl.LESS;};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t);};var It=function(t){this.context=t,this.current=!1;};It.prototype.get=function(){return this.current},It.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t;}};var Ct=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO];};Ct.prototype.get=function(){return this.current},Ct.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t);};var St=function(e){this.context=e,this.current=t.default$6.transparent;};St.prototype.get=function(){return this.current},St.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t);};var zt=function(t){this.context=t,this.current=null;};zt.prototype.get=function(){return this.current},zt.prototype.set=function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t);};var At=function(t){this.context=t,this.current=1;};At.prototype.get=function(){return this.current},At.prototype.set=function(e){var i=this.context.lineWidthRange,n=t.clamp(e,i[0],i[1]);this.current!==n&&(this.context.gl.lineWidth(n),this.current=e);};var Rt=function(t){this.context=t,this.current=t.gl.TEXTURE0;};Rt.prototype.get=function(){return this.current},Rt.prototype.set=function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t);};var Dt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight];};Dt.prototype.get=function(){return this.current},Dt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t);};var Mt=function(t){this.context=t,this.current=null;};Mt.prototype.get=function(){return this.current},Mt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t;}};var Lt=function(t){this.context=t,this.current=null;};Lt.prototype.get=function(){return this.current},Lt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t;}};var Pt=function(t){this.context=t,this.current=null;};Pt.prototype.get=function(){return this.current},Pt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t;}};var kt=function(t){this.context=t,this.current=null;};kt.prototype.get=function(){return this.current},kt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t;}};var Bt=function(t){this.context=t,this.current=null;};Bt.prototype.get=function(){return this.current},Bt.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t;};var Ot=function(t){this.context=t,this.current=null;};Ot.prototype.get=function(){return this.current},Ot.prototype.set=function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t);};var Ft=function(t){this.context=t,this.current=4;};Ft.prototype.get=function(){return this.current},Ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t;}};var Nt=function(t){this.context=t,this.current=!1;};Nt.prototype.get=function(){return this.current},Nt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t;}};var Ut=function(t,e){this.context=t,this.current=null,this.parent=e;};Ut.prototype.get=function(){return this.current};var Zt=function(t){function e(e,i){t.call(this,e,i),this.dirty=!1;}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1;}},e.prototype.setDirty=function(){this.dirty=!0;},e}(Ut),Vt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t;}},e}(Ut),jt=function(t,e,i){this.context=t,this.width=e,this.height=i;var n=t.gl,o=this.framebuffer=n.createFramebuffer();this.colorAttachment=new Zt(t,o),this.depthAttachment=new Vt(t,o);};jt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var i=this.depthAttachment.get();i&&t.deleteRenderbuffer(i),t.deleteFramebuffer(this.framebuffer);};var $t=function(t,e,i){this.func=t,this.mask=e,this.range=i;};$t.ReadOnly=!1,$t.ReadWrite=!0,$t.disabled=new $t(519,$t.ReadOnly,[0,1]);var Gt=function(t,e,i,n,o,r){this.test=t,this.ref=e,this.mask=i,this.fail=n,this.depthFail=o,this.pass=r;};Gt.disabled=new Gt({func:519,mask:0},0,0,7680,7680,7680);var Wt=function(t,e,i){this.blendFunction=t,this.blendColor=e,this.mask=i;};Wt.Replace=[1,0],Wt.disabled=new Wt(Wt.Replace,t.default$6.transparent,[!1,!1,!1,!1]),Wt.unblended=new Wt(Wt.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Wt.alphaBlended=new Wt([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var qt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(\"OES_vertex_array_object\"),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new dt(this),this.clearDepth=new ft(this),this.clearStencil=new mt(this),this.colorMask=new _t(this),this.depthMask=new gt(this),this.stencilMask=new vt(this),this.stencilFunc=new yt(this),this.stencilOp=new xt(this),this.stencilTest=new bt(this),this.depthRange=new wt(this),this.depthTest=new Et(this),this.depthFunc=new Tt(this),this.blend=new It(this),this.blendFunc=new Ct(this),this.blendColor=new St(this),this.program=new zt(this),this.lineWidth=new At(this),this.activeTexture=new Rt(this),this.viewport=new Dt(this),this.bindFramebuffer=new Mt(this),this.bindRenderbuffer=new Lt(this),this.bindTexture=new Pt(this),this.bindVertexBuffer=new kt(this),this.bindElementBuffer=new Bt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Ot(this),this.pixelStoreUnpack=new Ft(this),this.pixelStoreUnpackPremultiplyAlpha=new Nt(this),this.extTextureFilterAnisotropic=t.getExtension(\"EXT_texture_filter_anisotropic\")||t.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||t.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(\"OES_texture_half_float\"),this.extTextureHalfFloat&&t.getExtension(\"OES_texture_half_float_linear\");};qt.prototype.createIndexBuffer=function(t,e){return new ut(this,t,e)},qt.prototype.createVertexBuffer=function(t,e,i){return new pt(this,t,e,i)},qt.prototype.createRenderbuffer=function(t,e,i){var n=this.gl,o=n.createRenderbuffer();return this.bindRenderbuffer.set(o),n.renderbufferStorage(n.RENDERBUFFER,t,e,i),this.bindRenderbuffer.set(null),o},qt.prototype.createFramebuffer=function(t,e){return new jt(this,t,e)},qt.prototype.clear=function(t){var e=t.color,i=t.depth,n=this.gl,o=0;e&&(o|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(o|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(o);},qt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1);},qt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1);},qt.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Wt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask);};var Xt=function(e){function i(t,i,n){var o=this;e.call(this),this.id=t,this.dispatcher=n,this.on(\"data\",function(t){\"source\"===t.dataType&&\"metadata\"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&\"source\"===t.dataType&&\"content\"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform));}),this.on(\"error\",function(){o._sourceErrored=!0;}),this._source=rt(t,i,n,this),this._tiles={},this._cache=new ct(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={};}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t);},i.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t);},i.prototype.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},i.prototype.getSource=function(){return this._source},i.prototype.pause=function(){this._paused=!0;},i.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform);}},i.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},i.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},i.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},i.prototype.serialize=function(){return this._source.serialize()},i.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[e].upload(t);},i.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(i,n){var o=e._tiles[i].tileID,r=e._tiles[n].tileID,a=new t.default$1(o.canonical.x,o.canonical.y).rotate(e.transform.angle),s=new t.default$1(r.canonical.x,r.canonical.y).rotate(e.transform.angle);return o.overscaledZ-r.overscaledZ||s.y-a.y||s.x-a.x})},i.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},i.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)},i.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},i.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,\"reloading\");},i.prototype._reloadTile=function(t,e){var i=this._tiles[t];i&&(\"loading\"!==i.state&&(i.state=e),this._loadTile(i,this._tileLoaded.bind(this,i,t,e)));},i.prototype._tileLoaded=function(e,i,n,o){if(o)return e.state=\"errored\",void(404!==o.status?this._source.fire(new t.ErrorEvent(o,{tile:e})):this.update(this.transform));e.timeAdded=r.now(),\"expired\"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),\"raster-dem\"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._source.fire(new t.Event(\"data\",{dataType:\"source\",tile:e,coord:e.tileID})),this.map&&(this.map.painter.tileExtentVAO.vao=null);},i.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),i=0;i<e.length;i++){var n=e[i];if(t.neighboringTiles&&t.neighboringTiles[n]){var o=this.getTileByID(n);r(t,o),r(o,t);}}function r(t,e){t.needsHillshadePrepare=!0;var i=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,o=Math.pow(2,t.tileID.canonical.z),r=e.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+o)?i+=o:1===Math.abs(i-o)&&(i-=o)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,i,n),t.neighboringTiles&&t.neighboringTiles[r]&&(t.neighboringTiles[r].backfilled=!0)));}},i.prototype.getTile=function(t){return this.getTileByID(t.key)},i.prototype.getTileByID=function(t){return this._tiles[t]},i.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},i.prototype._findLoadedChildren=function(t,e,i){var n=!1;for(var o in this._tiles){var r=this._tiles[o];if(!(i[o]||!r.hasData()||r.tileID.overscaledZ<=t.overscaledZ||r.tileID.overscaledZ>e)){var a=Math.pow(2,r.tileID.canonical.z-t.canonical.z);if(Math.floor(r.tileID.canonical.x/a)===t.canonical.x&&Math.floor(r.tileID.canonical.y/a)===t.canonical.y)for(i[o]=r.tileID,n=!0;r&&r.tileID.overscaledZ-1>t.overscaledZ;){var s=r.tileID.scaledTo(r.tileID.overscaledZ-1);if(!s)break;(r=this._tiles[s.key])&&r.hasData()&&(delete i[o],i[s.key]=s);}}}return n},i.prototype.findLoadedParent=function(t,e,i){for(var n=t.overscaledZ-1;n>=e;n--){var o=t.scaledTo(n);if(!o)return;var r=String(o.key),a=this._tiles[r];if(a&&a.hasData())return i[r]=o,a;if(this._cache.has(o))return i[r]=o,this._cache.get(o)}},i.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=Math.floor(5*e),n=\"number\"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(n);},i.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,i=Math.round(e);if(this._prevLng=t,i){var n={};for(var o in this._tiles){var r=this._tiles[o];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+i),n[r.tileID.key]=r;}for(var a in this._tiles=n,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l);}}},i.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var o;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?o=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(o=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(o=o.filter(function(t){return n._source.hasTile(t)}))):o=[];var a,s=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),l=Math.max(s-i.maxOverzooming,this._source.minzoom),c=Math.max(s+i.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(o,s),h={};if(Kt(this._source.type))for(var p=Object.keys(u),d=0;d<p.length;d++){var f=p[d],m=u[f],_=n._tiles[f];if(_&&(void 0===_.fadeEndTime||_.fadeEndTime>=r.now())){n._findLoadedChildren(m,c,u)&&(u[f]=m);var g=n.findLoadedParent(m,l,h);g&&n._addTile(g.tileID);}}for(a in h)u[a]||(n._coveredTiles[a]=!0);for(a in h)u[a]=h[a];for(var v=t.keysDifference(this._tiles,u),y=0;y<v.length;y++)n._removeTile(v[y]);}},i.prototype._updateRetainedTiles=function(t,e){for(var n={},o={},r=Math.max(e-i.maxOverzooming,this._source.minzoom),a=Math.max(e+i.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var l=t[s],c=this._addTile(l),u=!1;if(c.hasData())n[l.key]=l;else{u=c.wasRequested(),n[l.key]=l;var h=!0;if(e+1>this._source.maxzoom){var p=l.children(this._source.maxzoom)[0],d=this.getTile(p);d&&d.hasData()?n[p.key]=p:h=!1;}else{this._findLoadedChildren(l,a,n);for(var f=l.children(this._source.maxzoom),m=0;m<f.length;m++)if(!n[f[m].key]){h=!1;break}}if(!h)for(var _=l.overscaledZ-1;_>=r;--_){var g=l.scaledTo(_);if(o[g.key])break;if(o[g.key]=!0,!(c=this.getTile(g))&&u&&(c=this._addTile(g)),c&&(n[g.key]=g,u=c.wasRequested(),c.hasData()))break}}}return n},i.prototype._addTile=function(e){var i=this._tiles[e.key];if(i)return i;(i=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,i),i.tileID=e);var n=Boolean(i);return n||(i=new lt(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,this._tileLoaded.bind(this,i,e.key,i.state))),i?(i.uses++,this._tiles[e.key]=i,n||this._source.fire(new t.Event(\"dataloading\",{tile:i,coord:i.tileID,dataType:\"source\"})),i):null},i.prototype._setTileReloadTimer=function(t,e){var i=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){i._reloadTile(t,\"expired\"),delete i._timers[t];},n));},i.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))));},i.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset();},i.prototype.tilesIn=function(e,i){for(var n=[],o=this.getIds(),r=1/0,a=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u<e.length;u++){var h=e[u];r=Math.min(r,h.column),a=Math.min(a,h.row),s=Math.max(s,h.column),l=Math.max(l,h.row);}for(var p=0;p<o.length;p++){var d=this._tiles[o[p]],f=d.tileID,m=Math.pow(2,this.transform.zoom-d.tileID.overscaledZ),_=i*d.queryPadding*t.default$8/d.tileSize/m,g=[Ht(f,new t.default$17(r,a,c)),Ht(f,new t.default$17(s,l,c))];if(g[0].x-_<t.default$8&&g[0].y-_<t.default$8&&g[1].x+_>=0&&g[1].y+_>=0){for(var v=[],y=0;y<e.length;y++)v.push(Ht(f,e[y]));n.push({tile:d,tileID:f,queryGeometry:[v],scale:m});}}return n},i.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),i=0,n=e;i<n.length;i+=1){var o=n[i];o.posMatrix=t.transform.calculatePosMatrix(o.toUnwrapped());}return e},i.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Kt(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=r.now())return!0}return!1},i}(t.Evented);function Ht(e,i){var n=i.zoomTo(e.canonical.z);return new t.default$1((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(n.row-e.canonical.y)*t.default$8)}function Kt(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Yt(){return new t.default.Worker(Rn.workerUrl)}Xt.maxOverzooming=10,Xt.maxUnderzooming=3;var Jt,Qt=function(){this.active={};};function te(e,i){var n={};for(var o in e)\"ref\"!==o&&(n[o]=e[o]);return t.default$18.forEach(function(t){t in i&&(n[t]=i[t]);}),n}function ee(t){t=t.slice();for(var e=Object.create(null),i=0;i<t.length;i++)e[t[i].id]=t[i];for(var n=0;n<t.length;n++)\"ref\"in t[n]&&(t[n]=te(t[n],e[t[n].ref]));return t}Qt.prototype.acquire=function(t){if(!this.workers){var e=Rn.workerCount;for(this.workers=[];this.workers.length<e;)this.workers.push(new Yt);}return this.active[t]=!0,this.workers.slice()},Qt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate();}),this.workers=null);};var ie={setStyle:\"setStyle\",addLayer:\"addLayer\",removeLayer:\"removeLayer\",setPaintProperty:\"setPaintProperty\",setLayoutProperty:\"setLayoutProperty\",setFilter:\"setFilter\",addSource:\"addSource\",removeSource:\"removeSource\",setGeoJSONSourceData:\"setGeoJSONSourceData\",setLayerZoomRange:\"setLayerZoomRange\",setLayerProperty:\"setLayerProperty\",setCenter:\"setCenter\",setZoom:\"setZoom\",setBearing:\"setBearing\",setPitch:\"setPitch\",setSprite:\"setSprite\",setGlyphs:\"setGlyphs\",setTransition:\"setTransition\",setLight:\"setLight\"};function ne(t,e,i){i.push({command:ie.addSource,args:[t,e[t]]});}function oe(t,e,i){e.push({command:ie.removeSource,args:[t]}),i[t]=!0;}function re(t,e,i,n){oe(t,i,n),ne(t,e,i);}function ae(e,i,n){var o;for(o in e[n])if(e[n].hasOwnProperty(o)&&\"data\"!==o&&!t.default$10(e[n][o],i[n][o]))return!1;for(o in i[n])if(i[n].hasOwnProperty(o)&&\"data\"!==o&&!t.default$10(e[n][o],i[n][o]))return!1;return!0}function se(e,i,n,o,r,a){var s;for(s in i=i||{},e=e||{})e.hasOwnProperty(s)&&(t.default$10(e[s],i[s])||n.push({command:a,args:[o,s,i[s],r]}));for(s in i)i.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.default$10(e[s],i[s])||n.push({command:a,args:[o,s,i[s],r]}));}function le(t){return t.id}function ce(t,e){return t[e.id]=e,t}function ue(e,i){if(!e)return[{command:ie.setStyle,args:[i]}];var n=[];try{if(!t.default$10(e.version,i.version))return[{command:ie.setStyle,args:[i]}];t.default$10(e.center,i.center)||n.push({command:ie.setCenter,args:[i.center]}),t.default$10(e.zoom,i.zoom)||n.push({command:ie.setZoom,args:[i.zoom]}),t.default$10(e.bearing,i.bearing)||n.push({command:ie.setBearing,args:[i.bearing]}),t.default$10(e.pitch,i.pitch)||n.push({command:ie.setPitch,args:[i.pitch]}),t.default$10(e.sprite,i.sprite)||n.push({command:ie.setSprite,args:[i.sprite]}),t.default$10(e.glyphs,i.glyphs)||n.push({command:ie.setGlyphs,args:[i.glyphs]}),t.default$10(e.transition,i.transition)||n.push({command:ie.setTransition,args:[i.transition]}),t.default$10(e.light,i.light)||n.push({command:ie.setLight,args:[i.light]});var o={},r=[];!function(e,i,n,o){var r;for(r in i=i||{},e=e||{})e.hasOwnProperty(r)&&(i.hasOwnProperty(r)||oe(r,n,o));for(r in i)i.hasOwnProperty(r)&&(e.hasOwnProperty(r)?t.default$10(e[r],i[r])||(\"geojson\"===e[r].type&&\"geojson\"===i[r].type&&ae(e,i,r)?n.push({command:ie.setGeoJSONSourceData,args:[r,i[r].data]}):re(r,i,n,o)):ne(r,i,n));}(e.sources,i.sources,r,o);var a=[];e.layers&&e.layers.forEach(function(t){o[t.source]?n.push({command:ie.removeLayer,args:[t.id]}):a.push(t);}),n=n.concat(r),function(e,i,n){i=i||[];var o,r,a,s,l,c,u,h=(e=e||[]).map(le),p=i.map(le),d=e.reduce(ce,{}),f=i.reduce(ce,{}),m=h.slice(),_=Object.create(null);for(o=0,r=0;o<h.length;o++)a=h[o],f.hasOwnProperty(a)?r++:(n.push({command:ie.removeLayer,args:[a]}),m.splice(m.indexOf(a,r),1));for(o=0,r=0;o<p.length;o++)a=p[p.length-1-o],m[m.length-1-o]!==a&&(d.hasOwnProperty(a)?(n.push({command:ie.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-r),1)):r++,c=m[m.length-o],n.push({command:ie.addLayer,args:[f[a],c]}),m.splice(m.length-o,0,a),_[a]=!0);for(o=0;o<p.length;o++)if(s=d[a=p[o]],l=f[a],!_[a]&&!t.default$10(s,l))if(t.default$10(s.source,l.source)&&t.default$10(s[\"source-layer\"],l[\"source-layer\"])&&t.default$10(s.type,l.type)){for(u in se(s.layout,l.layout,n,a,null,ie.setLayoutProperty),se(s.paint,l.paint,n,a,null,ie.setPaintProperty),t.default$10(s.filter,l.filter)||n.push({command:ie.setFilter,args:[a,l.filter]}),t.default$10(s.minzoom,l.minzoom)&&t.default$10(s.maxzoom,l.maxzoom)||n.push({command:ie.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&&\"layout\"!==u&&\"paint\"!==u&&\"filter\"!==u&&\"metadata\"!==u&&\"minzoom\"!==u&&\"maxzoom\"!==u&&(0===u.indexOf(\"paint.\")?se(s[u],l[u],n,a,u.slice(6),ie.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ie.setLayerProperty,args:[a,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&\"layout\"!==u&&\"paint\"!==u&&\"filter\"!==u&&\"metadata\"!==u&&\"minzoom\"!==u&&\"maxzoom\"!==u&&(0===u.indexOf(\"paint.\")?se(s[u],l[u],n,a,u.slice(6),ie.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ie.setLayerProperty,args:[a,u,l[u]]}));}else n.push({command:ie.removeLayer,args:[a]}),c=m[m.lastIndexOf(a)+1],n.push({command:ie.addLayer,args:[l,c]});}(a,i.layers,n);}catch(t){console.warn(\"Unable to compute style diff:\",t),n=[{command:ie.setStyle,args:[i]}];}return n}var he=function(t,e,i){var n=this.boxCells=[],o=this.circleCells=[];this.xCellCount=Math.ceil(t/i),this.yCellCount=Math.ceil(e/i);for(var r=0;r<this.xCellCount*this.yCellCount;r++)n.push([]),o.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0;};he.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},he.prototype.insert=function(t,e,i,n,o){this._forEachCell(e,i,n,o,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(o);},he.prototype.insertCircle=function(t,e,i,n){this._forEachCell(e-n,i-n,e+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(i),this.circles.push(n);},he.prototype._insertBoxCell=function(t,e,i,n,o,r){this.boxCells[o].push(r);},he.prototype._insertCircleCell=function(t,e,i,n,o,r){this.circleCells[o].push(r);},he.prototype._query=function(t,e,i,n,o){if(i<0||t>this.width||n<0||e>this.height)return!o&&[];var r=[];if(t<=0&&e<=0&&this.width<=i&&this.height<=n){if(o)return!0;for(var a=0;a<this.boxKeys.length;a++)r.push({key:this.boxKeys[a],x1:this.bboxes[4*a],y1:this.bboxes[4*a+1],x2:this.bboxes[4*a+2],y2:this.bboxes[4*a+3]});for(var s=0;s<this.circleKeys.length;s++){var l=this.circles[3*s],c=this.circles[3*s+1],u=this.circles[3*s+2];r.push({key:this.circleKeys[s],x1:l-u,y1:c-u,x2:l+u,y2:c+u});}}else{var h={hitTest:o,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,i,n,this._queryCell,r,h);}return o?r.length>0:r},he.prototype._queryCircle=function(t,e,i,n){var o=t-i,r=t+i,a=e-i,s=e+i;if(r<0||o>this.width||s<0||a>this.height)return!n&&[];var l=[],c={hitTest:n,circle:{x:t,y:e,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,a,r,s,this._queryCellCircle,l,c),n?l.length>0:l},he.prototype.query=function(t,e,i,n){return this._query(t,e,i,n,!1)},he.prototype.hitTest=function(t,e,i,n){return this._query(t,e,i,n,!0)},he.prototype.hitTestCircle=function(t,e,i){return this._queryCircle(t,e,i,!0)},he.prototype._queryCell=function(t,e,i,n,o,r,a){var s=a.seenUids,l=this.boxCells[o];if(null!==l)for(var c=this.bboxes,u=0,h=l;u<h.length;u+=1){var p=h[u];if(!s.box[p]){s.box[p]=!0;var d=4*p;if(t<=c[d+2]&&e<=c[d+3]&&i>=c[d+0]&&n>=c[d+1]){if(a.hitTest)return r.push(!0),!0;r.push({key:this.boxKeys[p],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]});}}}var f=this.circleCells[o];if(null!==f)for(var m=this.circles,_=0,g=f;_<g.length;_+=1){var v=g[_];if(!s.circle[v]){s.circle[v]=!0;var y=3*v;if(this._circleAndRectCollide(m[y],m[y+1],m[y+2],t,e,i,n)){if(a.hitTest)return r.push(!0),!0;var x=m[y],b=m[y+1],w=m[y+2];r.push({key:this.circleKeys[v],x1:x-w,y1:b-w,x2:x+w,y2:b+w});}}}},he.prototype._queryCellCircle=function(t,e,i,n,o,r,a){var s=a.circle,l=a.seenUids,c=this.boxCells[o];if(null!==c)for(var u=this.bboxes,h=0,p=c;h<p.length;h+=1){var d=p[h];if(!l.box[d]){l.box[d]=!0;var f=4*d;if(this._circleAndRectCollide(s.x,s.y,s.radius,u[f+0],u[f+1],u[f+2],u[f+3]))return r.push(!0),!0}}var m=this.circleCells[o];if(null!==m)for(var _=this.circles,g=0,v=m;g<v.length;g+=1){var y=v[g];if(!l.circle[y]){l.circle[y]=!0;var x=3*y;if(this._circlesCollide(_[x],_[x+1],_[x+2],s.x,s.y,s.radius))return r.push(!0),!0}}},he.prototype._forEachCell=function(t,e,i,n,o,r,a){for(var s=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(i),u=this._convertToYCellCoord(n),h=s;h<=c;h++)for(var p=l;p<=u;p++){var d=this.xCellCount*p+h;if(o.call(this,t,e,i,n,d,r,a))return}},he.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},he.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},he.prototype._circlesCollide=function(t,e,i,n,o,r){var a=n-t,s=o-e,l=i+r;return l*l>a*a+s*s},he.prototype._circleAndRectCollide=function(t,e,i,n,o,r,a){var s=(r-n)/2,l=Math.abs(t-(n+s));if(l>s+i)return!1;var c=(a-o)/2,u=Math.abs(e-(o+c));if(u>c+i)return!1;if(l<=s||u<=c)return!0;var h=l-s,p=u-c;return h*h+p*p<=i*i};var pe=t.default$19.layout;function de(e,i,n,o,r){var a=t.mat4.identity(new Float32Array(16));return i?(t.mat4.identity(a),t.mat4.scale(a,a,[1/r,1/r,1]),n||t.mat4.rotateZ(a,a,o.angle)):(t.mat4.scale(a,a,[o.width/2,-o.height/2,1]),t.mat4.translate(a,a,[1,-1,0]),t.mat4.multiply(a,a,e)),a}function fe(e,i,n,o,r){var a=t.mat4.identity(new Float32Array(16));return i?(t.mat4.multiply(a,a,e),t.mat4.scale(a,a,[r,r,1]),n||t.mat4.rotateZ(a,a,-o.angle)):(t.mat4.scale(a,a,[1,-1,1]),t.mat4.translate(a,a,[-1,-1,0]),t.mat4.scale(a,a,[2/o.width,2/o.height,1])),a}function me(e,i){var n=[e.x,e.y,0,1];Ie(n,n,i);var o=n[3];return{point:new t.default$1(n[0]/o,n[1]/o),signedDistanceFromCamera:o}}function _e(t,e){var i=t[0]/t[3],n=t[1]/t[3];return i>=-e[0]&&i<=e[0]&&n>=-e[1]&&n<=e[1]}function ge(e,i,n,o,r,a,s,l){var c=o?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom,pe.properties[o?\"text-size\":\"icon-size\"]),h=[256/n.width*2+1,256/n.height*2+1],p=o?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;p.clear();for(var d=e.lineVertexArray,f=o?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=n.transform.width/n.transform.height,_=!1,g=0;g<f.length;g++){var v=f.get(g);if(v.hidden||v.writingMode===t.WritingMode.vertical&&!_)Te(v.numGlyphs,p);else{_=!1;var y=[v.anchorX,v.anchorY,0,1];if(t.vec4.transformMat4(y,y,i),_e(y,h)){var x=.5+y[3]/n.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(c,u,v),w=s?b*x:b/x,E=new t.default$1(v.anchorX,v.anchorY),T=me(E,r).point,I={},C=xe(v,w,!1,l,i,r,a,e.glyphOffsetArray,d,p,T,E,I,m);_=C.useVertical,(C.notEnoughRoom||_||C.needsFlipping&&xe(v,w,!0,l,i,r,a,e.glyphOffsetArray,d,p,T,E,I,m).notEnoughRoom)&&Te(v.numGlyphs,p);}else Te(v.numGlyphs,p);}}o?e.text.dynamicLayoutVertexBuffer.updateData(p):e.icon.dynamicLayoutVertexBuffer.updateData(p);}function ve(t,e,i,n,o,r,a,s,l,c,u,h){var p=s.glyphStartIndex+s.numGlyphs,d=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),_=e.getoffsetX(p-1),g=we(t*m,i,n,o,r,a,s.segment,d,f,l,c,u,h);if(!g)return null;var v=we(t*_,i,n,o,r,a,s.segment,d,f,l,c,u,h);return v?{first:g,last:v}:null}function ye(e,i,n,o){if(e===t.WritingMode.horizontal&&Math.abs(n.y-i.y)>Math.abs(n.x-i.x)*o)return{useVertical:!0};return(e===t.WritingMode.vertical?i.y<n.y:i.x>n.x)?{needsFlipping:!0}:null}function xe(e,i,n,o,r,a,s,l,c,u,h,p,d,f){var m,_=i/24,g=e.lineOffsetX*i,v=e.lineOffsetY*i;if(e.numGlyphs>1){var y=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=ve(_,l,g,v,n,h,p,e,c,a,d,!1);if(!w)return{notEnoughRoom:!0};var E=me(w.first.point,s).point,T=me(w.last.point,s).point;if(o&&!n){var I=ye(e.writingMode,E,T,f);if(I)return I}m=[w.first];for(var C=e.glyphStartIndex+1;C<y-1;C++)m.push(we(_*l.getoffsetX(C),g,v,n,h,p,e.segment,x,b,c,a,d,!1));m.push(w.last);}else{if(o&&!n){var S=me(p,r).point,z=e.lineStartIndex+e.segment+1,A=new t.default$1(c.getx(z),c.gety(z)),R=me(A,r),D=R.signedDistanceFromCamera>0?R.point:be(p,A,S,1,r),M=ye(e.writingMode,S,D,f);if(M)return M}var L=we(_*l.getoffsetX(e.glyphStartIndex),g,v,n,h,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,a,d,!1);if(!L)return{notEnoughRoom:!0};m=[L];}for(var P=0,k=m;P<k.length;P+=1){var B=k[P];t.addDynamicAttributes(u,B.point,B.angle);}return{}}function be(t,e,i,n,o){var r=me(t.add(t.sub(e)._unit()),o).point,a=i.sub(r);return i.add(a._mult(n/a.mag()))}function we(e,i,n,o,r,a,s,l,c,u,h,p,d){var f=o?e-i:e+i,m=f>0?1:-1,_=0;o&&(m*=-1,_=Math.PI),m<0&&(_+=Math.PI);for(var g=m>0?l+s:l+s+1,v=g,y=r,x=r,b=0,w=0,E=Math.abs(f);b+w<=E;){if((g+=m)<l||g>=c)return null;if(x=y,void 0===(y=p[g])){var T=new t.default$1(u.getx(g),u.gety(g)),I=me(T,h);if(I.signedDistanceFromCamera>0)y=p[g]=I.point;else{var C=g-m;y=be(0===b?a:new t.default$1(u.getx(C),u.gety(C)),T,x,E-b+1,h);}}b+=w,w=x.dist(y);}var S=(E-b)/w,z=y.sub(x),A=z.mult(S)._add(x);return A._add(z._unit()._perp()._mult(n*m)),{point:A,angle:_+Math.atan2(y.y-x.y,y.x-x.x),tileDistance:d?{prevTileDistance:g-m===v?0:u.gettileUnitDistanceFromAnchor(g-m),lastSegmentViewportDistance:E-b}:null}}var Ee=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Te(t,e){for(var i=0;i<t;i++){var n=e.length;e.resize(n+4),e.float32.set(Ee,3*n);}}function Ie(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[4]*o+i[12],t[1]=i[1]*n+i[5]*o+i[13],t[3]=i[3]*n+i[7]*o+i[15],t}t.default$20.mat4;var Ce=function(t,e,i){void 0===e&&(e=new he(t.width+200,t.height+200,25)),void 0===i&&(i=new he(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=i,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100;};function Se(t,e,i){t[e+4]=i?1:0;}function ze(e,i,n){return i*(t.default$8/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}Ce.prototype.placeCollisionBox=function(t,e,i,n){var o=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),r=i*o.perspectiveRatio,a=t.x1*r+o.point.x,s=t.y1*r+o.point.y,l=t.x2*r+o.point.x,c=t.y2*r+o.point.y;return!e&&this.grid.hitTest(a,s,l,c)?{box:[],offscreen:!1}:{box:[a,s,l,c],offscreen:this.isOffscreen(a,s,l,c)}},Ce.prototype.approximateTileDistance=function(t,e,i,n,o){var r=o?1:n/this.pitchfactor,a=t.lastSegmentViewportDistance*i;return t.prevTileDistance+a+(r-1)*a*Math.abs(Math.sin(e))},Ce.prototype.placeCollisionCircles=function(e,i,n,o,r,a,s,l,c,u,h,p,d){var f=[],m=this.projectAnchor(u,a.anchorX,a.anchorY),_=c/24,g=a.lineOffsetX*c,v=a.lineOffsetY*c,y=new t.default$1(a.anchorX,a.anchorY),x=ve(_,l,g,v,!1,me(y,h).point,y,a,s,h,{},!0),b=!1,w=!0,E=m.perspectiveRatio*o,T=1/(o*n),I=0,C=0;x&&(I=this.approximateTileDistance(x.first.tileDistance,x.first.angle,T,m.cameraDistance,d),C=this.approximateTileDistance(x.last.tileDistance,x.last.angle,T,m.cameraDistance,d));for(var S=0;S<e.length;S+=5){var z=e[S],A=e[S+1],R=e[S+2],D=e[S+3];if(!x||D<-I||D>C)Se(e,S,!1);else{var M=this.projectPoint(u,z,A),L=R*E;if(f.length>0){var P=M.x-f[f.length-4],k=M.y-f[f.length-3];if(L*L*2>P*P+k*k)if(S+8<e.length){var B=e[S+8];if(B>-I&&B<C){Se(e,S,!1);continue}}}var O=S/5;if(f.push(M.x,M.y,L,O),Se(e,S,!0),w=w&&this.isOffscreen(M.x-L,M.y-L,M.x+L,M.y+L),!i&&this.grid.hitTestCircle(M.x,M.y,L)){if(!p)return{circles:[],offscreen:!1};b=!0;}}}return{circles:b?[]:f,offscreen:w}},Ce.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var i=[],n=1/0,o=1/0,r=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var c=l[s],u=new t.default$1(c.x+100,c.y+100);n=Math.min(n,u.x),o=Math.min(o,u.y),r=Math.max(r,u.x),a=Math.max(a,u.y),i.push(u);}for(var h={},p={},d=0,f=this.grid.query(n,o,r,a).concat(this.ignoredGrid.query(n,o,r,a));d<f.length;d+=1){var m=f[d],_=m.key;if(void 0===h[_.bucketInstanceId]&&(h[_.bucketInstanceId]={}),!h[_.bucketInstanceId][_.featureIndex]){var g=[new t.default$1(m.x1,m.y1),new t.default$1(m.x2,m.y1),new t.default$1(m.x2,m.y2),new t.default$1(m.x1,m.y2)];t.polygonIntersectsPolygon(i,g)&&(h[_.bucketInstanceId][_.featureIndex]=!0,void 0===p[_.bucketInstanceId]&&(p[_.bucketInstanceId]=[]),p[_.bucketInstanceId].push(_.featureIndex));}}return p},Ce.prototype.insertCollisionBox=function(t,e,i,n){var o={bucketInstanceId:i,featureIndex:n};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3]);},Ce.prototype.insertCollisionCircles=function(t,e,i,n){for(var o=e?this.ignoredGrid:this.grid,r={bucketInstanceId:i,featureIndex:n},a=0;a<t.length;a+=4)o.insertCircle(r,t[a],t[a+1],t[a+2]);},Ce.prototype.projectAnchor=function(t,e,i){var n=[e,i,0,1];return Ie(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Ce.prototype.projectPoint=function(e,i,n){var o=[i,n,0,1];return Ie(o,o,e),new t.default$1((o[0]/o[3]+1)/2*this.transform.width+100,(-o[1]/o[3]+1)/2*this.transform.height+100)},Ce.prototype.projectAndGetPerspectiveRatio=function(e,i,n){var o=[i,n,0,1];return Ie(o,o,e),{point:new t.default$1((o[0]/o[3]+1)/2*this.transform.width+100,(-o[1]/o[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/o[3]*.5}},Ce.prototype.isOffscreen=function(t,e,i,n){return i<100||t>=this.screenRightBoundary||n<100||e>this.screenBottomBoundary};var Ae=t.default$19.layout,Re=function(t,e,i,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&i?1:0,this.placed=i;};Re.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var De=function(t,e,i,n,o){this.text=new Re(t?t.text:null,e,i,o),this.icon=new Re(t?t.icon:null,e,n,o);};De.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Me=function(t,e,i){this.text=t,this.icon=e,this.skipFade=i;},Le=function(t,e){this.transform=t.clone(),this.collisionIndex=new Ce(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={};};function Pe(t,e,i){t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0),t.emplaceBack(e?1:0,i?1:0);}Le.prototype.placeLayerTile=function(e,i,n,o){var r=i.getBucket(e),a=i.latestFeatureIndex;if(r&&a&&e.id===r.layerIds[0]){var s=i.collisionBoxArray,l=r.layers[0].layout,c=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),u=i.tileSize/t.default$8,h=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),p=de(h,\"map\"===l.get(\"text-pitch-alignment\"),\"map\"===l.get(\"text-rotation-alignment\"),this.transform,ze(i,1,this.transform.zoom)),d=de(h,\"map\"===l.get(\"icon-pitch-alignment\"),\"map\"===l.get(\"icon-rotation-alignment\"),this.transform,ze(i,1,this.transform.zoom));this.retainedQueryData[r.bucketInstanceId]=new function(t,e,i,n,o){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=i,this.bucketIndex=n,this.tileID=o;}(r.bucketInstanceId,a,r.sourceLayerIndex,r.index,i.tileID),this.placeLayerBucket(r,h,p,d,c,u,n,o,s);}},Le.prototype.placeLayerBucket=function(e,i,n,o,r,a,s,l,c){for(var u=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,Ae.properties[\"text-size\"]),p=!e.hasTextData()||u.get(\"text-optional\"),d=!e.hasIconData()||u.get(\"icon-optional\"),f=0,m=e.symbolInstances;f<m.length;f+=1){var _=m[f];if(!l[_.crossTileID]){var g=void 0!==_.feature.text,v=void 0!==_.feature.icon,y=!0,x=null,b=null,w=null,E=0,T=0;_.collisionArrays||(_.collisionArrays=e.deserializeCollisionBoxes(c,_.textBoxStartIndex,_.textBoxEndIndex,_.iconBoxStartIndex,_.iconBoxEndIndex)),_.collisionArrays.textFeatureIndex&&(E=_.collisionArrays.textFeatureIndex),_.collisionArrays.textBox&&(g=(x=this.collisionIndex.placeCollisionBox(_.collisionArrays.textBox,u.get(\"text-allow-overlap\"),a,i)).box.length>0,y=y&&x.offscreen);var I=_.collisionArrays.textCircles;if(I){var C=e.text.placedSymbolArray.get(_.placedTextSymbolIndices[0]),S=t.evaluateSizeForFeature(e.textSizeData,h,C);b=this.collisionIndex.placeCollisionCircles(I,u.get(\"text-allow-overlap\"),r,a,_.key,C,e.lineVertexArray,e.glyphOffsetArray,S,i,n,s,\"map\"===u.get(\"text-pitch-alignment\")),g=u.get(\"text-allow-overlap\")||b.circles.length>0,y=y&&b.offscreen;}_.collisionArrays.iconFeatureIndex&&(T=_.collisionArrays.iconFeatureIndex),_.collisionArrays.iconBox&&(v=(w=this.collisionIndex.placeCollisionBox(_.collisionArrays.iconBox,u.get(\"icon-allow-overlap\"),a,i)).box.length>0,y=y&&w.offscreen),p||d?d?p||(v=v&&g):g=v&&g:v=g=v&&g,g&&x&&this.collisionIndex.insertCollisionBox(x.box,u.get(\"text-ignore-placement\"),e.bucketInstanceId,E),v&&w&&this.collisionIndex.insertCollisionBox(w.box,u.get(\"icon-ignore-placement\"),e.bucketInstanceId,T),g&&b&&this.collisionIndex.insertCollisionCircles(b.circles,u.get(\"text-ignore-placement\"),e.bucketInstanceId,E),this.placements[_.crossTileID]=new Me(g,v,y||e.justReloaded),l[_.crossTileID]=!0;}}e.justReloaded=!1;},Le.prototype.commit=function(t,e){this.commitTime=e;var i=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,o=t?t.opacities:{};for(var r in this.placements){var a=this.placements[r],s=o[r];s?(this.opacities[r]=new De(s,n,a.text,a.icon),i=i||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[r]=new De(null,n,a.text,a.icon,a.skipFade),i=i||a.text||a.icon);}for(var l in o){var c=o[l];if(!this.opacities[l]){var u=new De(c,n,!1,!1);u.isHidden()||(this.opacities[l]=u,i=i||c.text.placed||c.icon.placed);}}i?this.lastPlacementChangeTime=e:\"number\"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e);},Le.prototype.updateLayerOpacities=function(t,e){for(var i={},n=0,o=e;n<o.length;n+=1){var r=o[n],a=r.getBucket(t);a&&r.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,i,r.collisionBoxArray);}},Le.prototype.updateBucketOpacities=function(t,e,i){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var n=t.layers[0].layout,o=new De(null,0,!1,!1,!0),r=new De(null,0,n.get(\"text-allow-overlap\"),n.get(\"icon-allow-overlap\"),!0),a=0;a<t.symbolInstances.length;a++){var s=t.symbolInstances[a],l=e[s.crossTileID],c=this.opacities[s.crossTileID];l?c=o:c||(c=r,this.opacities[s.crossTileID]=c),e[s.crossTileID]=!0;var u=s.numGlyphVertices>0||s.numVerticalGlyphVertices>0,h=s.numIconVertices>0;if(u){for(var p=Ve(c.text),d=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,f=0;f<d;f++)t.text.opacityVertexArray.emplaceBack(p);for(var m=0,_=s.placedTextSymbolIndices;m<_.length;m+=1){var g=_[m];t.text.placedSymbolArray.get(g).hidden=c.text.isHidden();}}if(h){for(var v=Ve(c.icon),y=0;y<s.numIconVertices/4;y++)t.icon.opacityVertexArray.emplaceBack(v);t.icon.placedSymbolArray.get(a).hidden=c.icon.isHidden();}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(i,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var x=s.collisionArrays;if(x){x.textBox&&t.hasCollisionBoxData()&&Pe(t.collisionBox.collisionVertexArray,c.text.placed,!1),x.iconBox&&t.hasCollisionBoxData()&&Pe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var b=x.textCircles;if(b&&t.hasCollisionCircleData())for(var w=0;w<b.length;w+=5){var E=l||0===b[w+4];Pe(t.collisionCircle.collisionVertexArray,c.text.placed,E);}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray);},Le.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},Le.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Le.prototype.stillRecent=function(t){return\"undefined\"!==this.commitTime&&this.commitTime+this.fadeDuration>t},Le.prototype.setStale=function(){this.stale=!0;};var ke=Math.pow(2,25),Be=Math.pow(2,24),Oe=Math.pow(2,17),Fe=Math.pow(2,16),Ne=Math.pow(2,9),Ue=Math.pow(2,8),Ze=Math.pow(2,1);function Ve(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,i=Math.floor(127*t.opacity);return i*ke+e*Be+i*Oe+e*Fe+i*Ne+e*Ue+i*Ze+e}var je=function(){this._currentTileIndex=0,this._seenCrossTileIDs={};};je.prototype.continuePlacement=function(t,e,i,n,o){for(;this._currentTileIndex<t.length;){var r=t[this._currentTileIndex];if(e.placeLayerTile(n,r,i,this._seenCrossTileIDs),this._currentTileIndex++,o())return!0}};var $e=function(t,e,i,n,o){this.placement=new Le(t,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=n,this._done=!1;};$e.prototype.isDone=function(){return this._done},$e.prototype.continuePlacement=function(t,e,i){for(var n=this,o=r.now(),a=function(){var t=r.now()-o;return!n._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=e[t[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(n._inProgressLayer||(n._inProgressLayer=new je),n._inProgressLayer.continuePlacement(i[s.source],n.placement,n._showCollisionBoxes,s,a))return;delete n._inProgressLayer;}n._currentPlacementIndex--;}this._done=!0;},$e.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Ge=512/t.default$8/2,We=function(t,e,i){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=i;for(var n=0,o=e;n<o.length;n+=1){var r=o[n],a=r.key;this.indexedSymbolInstances[a]||(this.indexedSymbolInstances[a]=[]),this.indexedSymbolInstances[a].push({crossTileID:r.crossTileID,coord:this.getScaledCoordinates(r,t)});}};We.prototype.getScaledCoordinates=function(e,i){var n=i.canonical.z-this.tileID.canonical.z,o=Ge/Math.pow(2,n),r=e.anchor;return{x:Math.floor((i.canonical.x*t.default$8+r.x)*o),y:Math.floor((i.canonical.y*t.default$8+r.y)*o)}},We.prototype.findMatches=function(t,e,i){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),o=0,r=t;o<r.length;o+=1){var a=r[o];if(!a.crossTileID){var s=this.indexedSymbolInstances[a.key];if(s)for(var l=this.getScaledCoordinates(a,e),c=0,u=s;c<u.length;c+=1){var h=u[c];if(Math.abs(h.coord.x-l.x)<=n&&Math.abs(h.coord.y-l.y)<=n&&!i[h.crossTileID]){i[h.crossTileID]=!0,a.crossTileID=h.crossTileID;break}}}}};var qe=function(){this.maxCrossTileID=0;};qe.prototype.generate=function(){return++this.maxCrossTileID};var Xe=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0;};Xe.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var i in this.indexes){var n=this.indexes[i],o={};for(var r in n){var a=n[r];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),o[a.tileID.key]=a;}this.indexes[i]=o;}this.lng=t;},Xe.prototype.addBucket=function(t,e,i){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key]);}for(var n=0,o=e.symbolInstances;n<o.length;n+=1){o[n].crossTileID=0;}this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var r=this.usedCrossTileIDs[t.overscaledZ];for(var a in this.indexes){var s=this.indexes[a];if(Number(a)>t.overscaledZ)for(var l in s){var c=s[l];c.tileID.isChildOf(t)&&c.findMatches(e.symbolInstances,t,r);}else{var u=s[t.scaledTo(Number(a)).key];u&&u.findMatches(e.symbolInstances,t,r);}}for(var h=0,p=e.symbolInstances;h<p.length;h+=1){var d=p[h];d.crossTileID||(d.crossTileID=i.generate(),r[d.crossTileID]=!0);}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new We(t,e.symbolInstances,e.bucketInstanceId),!0},Xe.prototype.removeBucketCrossTileIDs=function(t,e){for(var i in e.indexedSymbolInstances)for(var n=0,o=e.indexedSymbolInstances[i];n<o.length;n+=1){var r=o[n];delete this.usedCrossTileIDs[t][r.crossTileID];}},Xe.prototype.removeStaleBuckets=function(t){var e=!1;for(var i in this.indexes){var n=this.indexes[i];for(var o in n)t[n[o].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,n[o]),delete n[o],e=!0);}return e};var He=function(){this.layerIndexes={},this.crossTileIDs=new qe,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={};};He.prototype.addLayer=function(t,e,i){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new Xe);var o=!1,r={};n.handleWrapJump(i);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],c=l.getBucket(t);c&&t.id===c.layerIds[0]&&(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&&(o=!0),r[c.bucketInstanceId]=!0);}return n.removeStaleBuckets(r)&&(o=!0),o},He.prototype.pruneUnusedLayers=function(t){var e={};for(var i in t.forEach(function(t){e[t]=!0;}),this.layerIndexes)e[i]||delete this.layerIndexes[i];};var Ke=function(e,i){return t.emitValidationErrors(e,i&&i.filter(function(t){return\"source.canvas\"!==t.identifier}))},Ye=t.pick(ie,[\"addLayer\",\"removeLayer\",\"setPaintProperty\",\"setLayoutProperty\",\"setFilter\",\"addSource\",\"removeSource\",\"setLayerZoomRange\",\"setLight\",\"setTransition\",\"setGeoJSONSourceData\"]),Je=t.pick(ie,[\"setCenter\",\"setZoom\",\"setBearing\",\"setPitch\"]),Qe=function(e){function i(n,o){var r=this;void 0===o&&(o={}),e.call(this),this.map=n,this.dispatcher=new $((Jt||(Jt=new Qt),Jt),this),this.imageManager=new L,this.glyphManager=new N(n._transformRequest,o.localIdeographFontFamily),this.lineAtlas=new j(256,512),this.crossTileSymbolIndex=new He,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var a=this;this._rtlTextPluginCallback=i.registerForPluginAvailability(function(t){for(var e in a.dispatcher.broadcast(\"loadRTLTextPlugin\",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload();}),this.on(\"data\",function(t){if(\"source\"===t.dataType&&\"metadata\"===t.sourceDataType){var e=r.sourceCaches[t.sourceId];if(e){var i=e.getSource();if(i&&i.vectorLayerIds)for(var n in r._layers){var o=r._layers[n];o.source===i.id&&r._validateLayer(o);}}}});}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.loadURL=function(e,i){var n=this;void 0===i&&(i={}),this.fire(new t.Event(\"dataloading\",{dataType:\"style\"}));var o=\"boolean\"==typeof i.validate?i.validate:!y(e);e=function(t,e){if(!y(t))return t;var i=C(t);return i.path=\"/styles/v1\"+i.path,v(i,e)}(e,i.accessToken);var r=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(r,function(e,i){e?n.fire(new t.ErrorEvent(e)):i&&n._load(i,o);});},i.prototype.loadJSON=function(e,i){var n=this;void 0===i&&(i={}),this.fire(new t.Event(\"dataloading\",{dataType:\"style\"})),r.frame(function(){n._load(e,!1!==i.validate);});},i.prototype._load=function(e,i){var n=this;if(!i||!Ke(this,t.validateStyle(e))){for(var o in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(o,e.sources[o],{validate:!1});e.sprite?function(e,i,n){var o,a,s,l=r.devicePixelRatio>1?\"@2x\":\"\";function c(){if(s)n(s);else if(o&&a){var e=r.getImageData(a),i={};for(var l in o){var c=o[l],u=c.width,h=c.height,p=c.x,d=c.y,f=c.sdf,m=c.pixelRatio,_=new t.RGBAImage({width:u,height:h});t.RGBAImage.copy(e,_,{x:p,y:d},{x:0,y:0},{width:u,height:h}),i[l]={data:_,pixelRatio:m,sdf:f};}n(null,i);}}t.getJSON(i(w(e,l,\".json\"),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,o=e,c());}),t.getImage(i(w(e,l,\".png\"),t.ResourceType.SpriteImage),function(t,e){s||(s=t,a=e,c());});}(e.sprite,this.map._transformRequest,function(e,i){if(e)n.fire(new t.ErrorEvent(e));else if(i)for(var o in i)n.imageManager.addImage(o,i[o]);n.imageManager.setLoaded(!0),n.fire(new t.Event(\"data\",{dataType:\"style\"}));}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var a=ee(this.stylesheet.layers);this._order=a.map(function(t){return t.id}),this._layers={};for(var s=0,l=a;s<l.length;s+=1){var c=l[s];(c=t.default$22(c)).setEventedParent(n,{layer:{id:c.id}}),n._layers[c.id]=c;}this.dispatcher.broadcast(\"setLayers\",this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new t.Event(\"data\",{dataType:\"style\"})),this.fire(new t.Event(\"style.load\"));}},i.prototype._validateLayer=function(e){var i=this.sourceCaches[e.source];if(i){var n=e.sourceLayer;if(n){var o=i.getSource();(\"geojson\"===o.type||o.vectorLayerIds&&-1===o.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer \"'+n+'\" does not exist on source \"'+o.id+'\" as specified by style layer \"'+e.id+'\"')));}}},i.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},i.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},i.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},i.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},i.prototype.update=function(e){if(this._loaded){if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var r=this._updatedSources[o];\"reload\"===r?this._reloadSource(o):\"clear\"===r&&this._clearSource(o);}for(var a in this._updatedPaintProps)this._layers[a].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event(\"data\",{dataType:\"style\"}));}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,c=this._order;l<c.length;l+=1){var u=c[l],h=this._layers[u];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0);}this.light.recalculate(e),this.z=e.zoom;}},i.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(t),removedIds:e});},i.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={};},i.prototype.setState=function(e){var i=this;if(this._checkLoaded(),Ke(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=ee(e.layers);var n=ue(this.serialize(),e).filter(function(t){return!(t.command in Je)});if(0===n.length)return!1;var o=n.filter(function(t){return!(t.command in Ye)});if(o.length>0)throw new Error(\"Unimplemented: \"+o.map(function(t){return t.command}).join(\", \")+\".\");return n.forEach(function(t){\"setTransition\"!==t.command&&i[t.command].apply(i,t.args);}),this.stylesheet=e,!0},i.prototype.addImage=function(e,i){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\"An image with this name already exists.\")));this.imageManager.addImage(e,i),this.fire(new t.Event(\"data\",{dataType:\"style\"}));},i.prototype.getImage=function(t){return this.imageManager.getImage(t)},i.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\"No image with this name exists.\")));this.imageManager.removeImage(e),this.fire(new t.Event(\"data\",{dataType:\"style\"}));},i.prototype.addSource=function(e,i,n){var o=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!i.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(i).join(\", \")+\".\");if(!([\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(i.type)>=0)||!this._validate(t.validateStyle.source,\"sources.\"+e,i,null,n)){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);var r=this.sourceCaches[e]=new Xt(e,i,this.dispatcher);r.style=this,r.setEventedParent(this,function(){return{isSourceLoaded:o.loaded(),source:r.serialize(),sourceId:e}}),r.onAdd(this.map),this._changed=!0;}},i.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");for(var i in this._layers)if(this._layers[i].source===e)return this.fire(new t.ErrorEvent(new Error('Source \"'+e+'\" cannot be removed while layer \"'+i+'\" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0;},i.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0;},i.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},i.prototype.addLayer=function(e,i,n){this._checkLoaded();var o=e.id;if(this.getLayer(o))this.fire(new t.ErrorEvent(new Error('Layer with id \"'+o+'\" already exists on this map')));else if(\"object\"==typeof e.source&&(this.addSource(o,e.source),e=t.clone(e),e=t.extend(e,{source:o})),!this._validate(t.validateStyle.layer,\"layers.\"+o,e,{arrayIndex:-1},n)){var r=t.default$22(e);this._validateLayer(r),r.setEventedParent(this,{layer:{id:o}});var a=i?this._order.indexOf(i):this._order.length;if(i&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id \"'+i+'\" does not exist on this map.')));else{if(this._order.splice(a,0,o),this._layerOrderChanged=!0,this._layers[o]=r,this._removedLayers[o]&&r.source){var s=this._removedLayers[o];delete this._removedLayers[o],s.type!==r.type?this._updatedSources[r.source]=\"clear\":(this._updatedSources[r.source]=\"reload\",this.sourceCaches[r.source].pause());}this._updateLayer(r);}}},i.prototype.moveLayer=function(e,i){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==i){var n=this._order.indexOf(e);this._order.splice(n,1);var o=i?this._order.indexOf(i):this._order.length;i&&-1===o?this.fire(new t.ErrorEvent(new Error('Layer with id \"'+i+'\" does not exist on this map.'))):(this._order.splice(o,0,e),this._layerOrderChanged=!0);}}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")));},i.prototype.removeLayer=function(e){this._checkLoaded();var i=this._layers[e];if(i){i.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e];}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")));},i.prototype.getLayer=function(t){return this._layers[t]},i.prototype.setLayerZoomRange=function(e,i,n){this._checkLoaded();var o=this.getLayer(e);o?o.minzoom===i&&o.maxzoom===n||(null!=i&&(o.minzoom=i),null!=n&&(o.maxzoom=n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")));},i.prototype.setFilter=function(e,i){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.default$10(n.filter,i))return null==i?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,\"layers.\"+n.id+\".filter\",i)||(n.filter=t.clone(i),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")));},i.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},i.prototype.setLayoutProperty=function(e,i,n){this._checkLoaded();var o=this.getLayer(e);o?t.default$10(o.getLayoutProperty(i),n)||(o.setLayoutProperty(i,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")));},i.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},i.prototype.setPaintProperty=function(e,i,n){this._checkLoaded();var o=this.getLayer(e);if(o){if(!t.default$10(o.getPaintProperty(i),n)){var r=o._transitionablePaint._values[i].value.isDataDriven();o.setPaintProperty(i,n),(o._transitionablePaint._values[i].value.isDataDriven()||r)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0;}}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")));},i.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},i.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},i.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,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:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},i.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0;},i.prototype._flattenRenderedFeatures=function(t){for(var e=[],i=this._order.length-1;i>=0;i--)for(var n=this._order[i],o=0,r=t;o<r.length;o+=1){var a=r[o][n];if(a)for(var s=0,l=a;s<l.length;s+=1){var c=l[s];e.push(c);}}return e},i.prototype.queryRenderedFeatures=function(e,i,n){i&&i.filter&&this._validate(t.validateStyle.filter,\"queryRenderedFeatures.filter\",i.filter);var o={};if(i&&i.layers){if(!Array.isArray(i.layers))return this.fire(new t.ErrorEvent(new Error(\"parameters.layers must be an Array.\"))),[];for(var r=0,a=i.layers;r<a.length;r+=1){var s=a[r],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(\"The layer '\"+s+\"' does not exist in the map's style and cannot be queried for features.\"))),[];o[l.source]=!0;}}var c=[];for(var u in this.sourceCaches)i.layers&&!o[u]||c.push(at(this.sourceCaches[u],this._layers,e.worldCoordinate,i,n));return this.placement&&c.push(function(t,e,i,n,o){for(var r={},a=n.queryRenderedSymbols(e),s=[],l=0,c=Object.keys(a).map(Number);l<c.length;l+=1){var u=c[l];s.push(o[u]);}s.sort(st);for(var h=function(){var e=d[p],n=e.featureIndex.lookupSymbolFeatures(a[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,i.filter,i.layers,t);for(var o in n){var s=r[o]=r[o]||[],l=n[o];l.sort(function(t,i){var n=e.featureSortOrder;if(n){var o=n.indexOf(t.featureIndex);return n.indexOf(i.featureIndex)-o}return i.featureIndex-t.featureIndex});for(var c=0,u=l;c<u.length;c+=1){var h=u[c];s.push(h.feature);}}},p=0,d=s;p<d.length;p+=1)h();return r}(this._layers,e.viewport,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(c)},i.prototype.querySourceFeatures=function(e,i){i&&i.filter&&this._validate(t.validateStyle.filter,\"querySourceFeatures.filter\",i.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var i=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],o={},r=0;r<i.length;r++){var a=i[r],s=a.tileID.canonical.key;o[s]||(o[s]=!0,a.querySourceFeatures(n,e));}return n}(n,i):[]},i.prototype.addSourceType=function(t,e,n){return i.getSourceType(t)?n(new Error('A source type called \"'+t+'\" already exists.')):(i.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\"loadWorkerSource\",{name:t,url:e.workerSourceURL},n):n(null,null))},i.prototype.getLight=function(){return this.light.getLight()},i.prototype.setLight=function(e){this._checkLoaded();var i=this.light.getLight(),n=!1;for(var o in e)if(!t.default$10(e[o],i[o])){n=!0;break}if(n){var a={now:r.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(a);}},i.prototype._validate=function(e,i,n,o,r){return(!r||!1!==r.validate)&&Ke(this,e.call(t.validateStyle,t.extend({key:i,style:this.serialize(),value:n,styleSpec:t.default$5},o)))},i.prototype._remove=function(){for(var e in t.evented.off(\"pluginAvailable\",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove();},i.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles();},i.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload();},i.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t);},i.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t);},i.prototype._updatePlacement=function(t,e,i){for(var n=!1,o=!1,a={},s=0,l=this._order;s<l.length;s+=1){var c=l[s],u=this._layers[c];if(\"symbol\"===u.type){if(!a[u.source]){var h=this.sourceCaches[u.source];a[u.source]=h.getRenderableIds().map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)});}var p=this.crossTileSymbolIndex.addLayer(u,a[u.source],t.center.lng);n=n||p;}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(r.now()))&&(this.pauseablePlacement=new $e(t,this._order,d,e,i),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,a),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,r.now()),o=!0),n&&this.pauseablePlacement.placement.setStale()),o||n)for(var f=0,m=this._order;f<m.length;f+=1){var _=m[f],g=this._layers[_];\"symbol\"===g.type&&this.placement.updateLayerOpacities(g,a[g.source]);}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(r.now())},i.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i);},i.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i);},i}(t.Evented);Qe.getSourceType=function(t){return ot[t]},Qe.setSourceType=function(t,e){ot[t]=e;},Qe.registerForPluginAvailability=t.registerForPluginAvailability;var ti=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2}]),ei={prelude:{fragmentSource:\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\",vertexSource:\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\\n// Unpack a pair of values that have been packed into a single float.\\n// The packed values are assumed to be 8-bit unsigned integers, and are\\n// packed like so:\\n// packedValue = floor(input[0]) * 256 + input[1],\\nvec2 unpack_float(const float packedValue) {\\n    int packedIntValue = int(packedValue);\\n    int v0 = packedIntValue / 256;\\n    return vec2(v0, packedIntValue - v0 * 256);\\n}\\n\\nvec2 unpack_opacity(const float packedOpacity) {\\n    int intOpacity = int(packedOpacity) / 2;\\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\\n}\\n\\n// To minimize the number of attributes needed, we encode a 4-component\\n// color into a pair of floats (i.e. a vec2) as follows:\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\n//   floor(color.b * 255) * 256 + color.g * 255 ]\\nvec4 decode_color(const vec2 encodedColor) {\\n    return vec4(\\n        unpack_float(encodedColor[0]) / 255.0,\\n        unpack_float(encodedColor[1]) / 255.0\\n    );\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\n    return mix(packedValue[0], packedValue[1], t);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\n    return mix(minColor, maxColor, t);\\n}\\n\\n// The offset depends on how many pixels are between the world origin and 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 and the edge of the tile.\\n// The glsl spec only guarantees 16 bits of 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:\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\n\\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\\n}\\n\"},background:{fragmentSource:\"uniform vec4 u_color;\\nuniform float u_opacity;\\n\\nvoid main() {\\n    gl_FragColor = u_color * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},backgroundPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform vec2 u_texsize;\\nuniform float u_mix;\\nuniform float u_opacity;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\nvoid main() {\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, 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_texsize, u_pattern_br_b / u_texsize, 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:\"uniform 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\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},circle:{fragmentSource:\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec3 v_data;\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize mediump float radius\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize highp vec4 stroke_color\\n    #pragma mapbox: initialize mediump float stroke_width\\n    #pragma mapbox: initialize lowp float stroke_opacity\\n\\n    vec2 extrude = v_data.xy;\\n    float extrude_length = length(extrude);\\n\\n    lowp float antialiasblur = v_data.z;\\n    float antialiased_blur = -max(blur, antialiasblur);\\n\\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\n\\n    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\n        antialiased_blur,\\n        0.0,\\n        extrude_length - radius / (radius + stroke_width)\\n    );\\n\\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform bool u_scale_with_map;\\nuniform bool u_pitch_with_map;\\nuniform vec2 u_extrude_scale;\\nuniform highp float u_camera_to_center_distance;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec3 v_data;\\n\\nvoid main(void) {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize mediump float radius\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize highp vec4 stroke_color\\n    #pragma mapbox: initialize mediump float stroke_width\\n    #pragma mapbox: initialize lowp float stroke_opacity\\n\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n    // in extrusion data\\n    vec2 circle_center = floor(a_pos * 0.5);\\n    if (u_pitch_with_map) {\\n        vec2 corner_position = circle_center;\\n        if (u_scale_with_map) {\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\\n        } else {\\n            // Pitching the circle with the map effectively scales it with the map\\n            // To counteract the effect for pitch-scale: viewport, we rescale the\\n            // whole circle based on the pitch scaling effect at its central point\\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\\n        }\\n\\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\\n    } else {\\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\\n\\n        if (u_scale_with_map) {\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\\n        } else {\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\\n        }\\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    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\n\\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\\n}\\n\"},clippingMask:{fragmentSource:\"void main() {\\n    gl_FragColor = vec4(1.0);\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},heatmap:{fragmentSource:\"#pragma mapbox: define highp float weight\\n\\nuniform highp float u_intensity;\\nvarying vec2 v_extrude;\\n\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\n#define GAUSS_COEF 0.3989422804014327\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp float weight\\n\\n    // Kernel density estimation with a Gaussian kernel of size 5x5\\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\\n\\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"#pragma mapbox: define highp float weight\\n#pragma mapbox: define mediump float radius\\n\\nuniform mat4 u_matrix;\\nuniform float u_extrude_scale;\\nuniform float u_opacity;\\nuniform float u_intensity;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_extrude;\\n\\n// Effective \\\"0\\\" in the kernel density texture to adjust the kernel size to;\\n// this empirically chosen number minimizes artifacts on overlapping kernels\\n// for typical heatmap cases (assuming clustered source)\\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\\n\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\n#define GAUSS_COEF 0.3989422804014327\\n\\nvoid main(void) {\\n    #pragma mapbox: initialize highp float weight\\n    #pragma mapbox: initialize mediump float radius\\n\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\\n    // it to produce the vertices of a square mesh framing the point feature\\n    // we're adding to the kernel density texture.  We'll also pass it as\\n    // a varying, so that the fragment shader can determine the distance of\\n    // each fragment from the point feature.\\n    // Before we do so, we need to scale it up sufficiently so that the\\n    // kernel falls effectively to zero at the edge of the mesh.\\n    // That is, we want to know S such that\\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\\n    // Which solves to:\\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\\n\\n    // Pass the varying in units of radius\\n    v_extrude = S * unscaled_extrude;\\n\\n    // Scale by radius and the zoom-based scale factor to produce actual\\n    // mesh position\\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\\n\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n    // in extrusion data\\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\\n\\n    gl_Position = u_matrix * pos;\\n}\\n\"},heatmapTexture:{fragmentSource:\"uniform sampler2D u_image;\\nuniform sampler2D u_color_ramp;\\nuniform float u_opacity;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    float t = texture2D(u_image, v_pos).r;\\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\\n    gl_FragColor = color * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\n\\n    v_pos.x = a_pos.x;\\n    v_pos.y = 1.0 - a_pos.y;\\n}\\n\"},collisionBox:{fragmentSource:\"\\nvarying float v_placed;\\nvarying float v_notUsed;\\n\\nvoid main() {\\n\\n    float alpha = 0.5;\\n\\n    // Red = collision, hide label\\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n\\n    // Blue = no collision, label is showing\\n    if (v_placed > 0.5) {\\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\n    }\\n\\n    if (v_notUsed > 0.5) {\\n        // This box not used, fade it out\\n        gl_FragColor *= .1;\\n    }\\n}\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_anchor_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_placed;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_extrude_scale;\\nuniform float u_camera_to_center_distance;\\n\\nvarying float v_placed;\\nvarying float v_notUsed;\\n\\nvoid main() {\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\n    highp float collision_perspective_ratio = clamp(\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\\n        4.0);\\n\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\\n\\n    v_placed = a_placed.x;\\n    v_notUsed = a_placed.y;\\n}\\n\"},collisionCircle:{fragmentSource:\"uniform float u_overscale_factor;\\n\\nvarying float v_placed;\\nvarying float v_notUsed;\\nvarying float v_radius;\\nvarying vec2 v_extrude;\\nvarying vec2 v_extrude_scale;\\n\\nvoid main() {\\n    float alpha = 0.5;\\n\\n    // Red = collision, hide label\\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n\\n    // Blue = no collision, label is showing\\n    if (v_placed > 0.5) {\\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\n    }\\n\\n    if (v_notUsed > 0.5) {\\n        // This box not used, fade it out\\n        color *= .2;\\n    }\\n\\n    float extrude_scale_length = length(v_extrude_scale);\\n    float extrude_length = length(v_extrude) * extrude_scale_length;\\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\\n    float radius = v_radius * extrude_scale_length;\\n\\n    float distance_to_edge = abs(extrude_length - radius);\\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\\n\\n    gl_FragColor = opacity_t * color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_anchor_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_placed;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_extrude_scale;\\nuniform float u_camera_to_center_distance;\\n\\nvarying float v_placed;\\nvarying float v_notUsed;\\nvarying float v_radius;\\n\\nvarying vec2 v_extrude;\\nvarying vec2 v_extrude_scale;\\n\\nvoid main() {\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\n    highp float collision_perspective_ratio = clamp(\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\\n        4.0);\\n\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\n\\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\\n\\n    v_placed = a_placed.x;\\n    v_notUsed = a_placed.y;\\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\\n\\n    v_extrude = a_extrude * padding_factor;\\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\\n}\\n\"},debug:{fragmentSource:\"uniform highp vec4 u_color;\\n\\nvoid main() {\\n    gl_FragColor = u_color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fill:{fragmentSource:\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp 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:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fillOutline:{fragmentSource:\"#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 outline_color\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    float dist = length(v_pos - gl_FragCoord.xy);\\n    float alpha = 1.0 - smoothstep(0.0, 1.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:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_world;\\n\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp 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\"},fillOutlinePattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform vec2 u_texsize;\\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\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, 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_texsize, u_pattern_br_b / u_texsize, 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 = 1.0 - smoothstep(0.0, 1.0, dist);\\n\\n\\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\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;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n\\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform vec2 u_texsize;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, 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_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\n    vec4 color2 = texture2D(u_image, pos2);\\n\\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform 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\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},fillExtrusion:{fragmentSource:\"varying vec4 v_color;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define highp vec4 color\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float base\\n    #pragma mapbox: initialize lowp float height\\n    #pragma mapbox: initialize highp vec4 color\\n\\n    gl_FragColor = v_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_normal_ed;\\n\\nvarying vec4 v_color;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\n#pragma mapbox: define highp vec4 color\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float base\\n    #pragma mapbox: initialize lowp float height\\n    #pragma mapbox: initialize highp vec4 color\\n\\n    vec3 normal = a_normal_ed.xyz;\\n\\n    base = max(0.0, base);\\n    height = max(0.0, height);\\n\\n    float t = mod(normal.x, 2.0);\\n\\n    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\n\\n    // Relative luminance (how dark/bright is the surface color?)\\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\n\\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n    // Add slight ambient lighting so no extrusions are totally black\\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\n    color += ambientlight;\\n\\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\\n\\n    // Adjust directional so that\\n    // the range of values for highlight/shading is narrower\\n    // with lower light intensity\\n    // and with lighter/brighter surface colors\\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\n\\n    // Add gradient along z axis of side surfaces\\n    if (normal.y != 0.0) {\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n    }\\n\\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\n    // with lower bounds adjusted to hue of light\\n    // so that shading is tinted with the complementary (opposite) color to the light color\\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\n}\\n\"},fillExtrusionPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform vec2 u_texsize;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float base\\n    #pragma mapbox: initialize lowp float height\\n\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, 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_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\n    vec4 color2 = texture2D(u_image, pos2);\\n\\n    vec4 mixedColor = mix(color1, color2, u_mix);\\n\\n    gl_FragColor = mixedColor * v_lighting;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform 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;\\nuniform float u_height_factor;\\n\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_normal_ed;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\nvarying float v_directional;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float base\\n    #pragma mapbox: initialize lowp float height\\n\\n    vec3 normal = a_normal_ed.xyz;\\n    float edgedistance = a_normal_ed.w;\\n\\n    base = max(0.0, base);\\n    height = max(0.0, height);\\n\\n    float t = mod(normal.x, 2.0);\\n    float z = t > 0.0 ? height : base;\\n\\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\\n\\n    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\\n        ? a_pos // extrusion top\\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\\n\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\n\\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\n\\n    if (normal.y != 0.0) {\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n    }\\n\\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\n}\\n\"},extrusionTexture:{fragmentSource:\"uniform sampler2D u_image;\\nuniform float u_opacity;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\n\\n    v_pos.x = a_pos.x;\\n    v_pos.y = 1.0 - a_pos.y;\\n}\\n\"},hillshadePrepare:{fragmentSource:\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\n\\nuniform sampler2D u_image;\\nvarying vec2 v_pos;\\nuniform vec2 u_dimension;\\nuniform float u_zoom;\\nuniform float u_maxzoom;\\n\\nfloat getElevation(vec2 coord, float bias) {\\n    // Convert encoded elevation value to meters\\n    vec4 data = texture2D(u_image, coord) * 255.0;\\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\\n}\\n\\nvoid main() {\\n    vec2 epsilon = 1.0 / u_dimension;\\n\\n    // queried pixels:\\n    // +-----------+\\n    // |   |   |   |\\n    // | a | b | c |\\n    // |   |   |   |\\n    // +-----------+\\n    // |   |   |   |\\n    // | d | e | f |\\n    // |   |   |   |\\n    // +-----------+\\n    // |   |   |   |\\n    // | g | h | i |\\n    // |   |   |   |\\n    // +-----------+\\n\\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\\n    float e = getElevation(v_pos, 0.0);\\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\\n\\n    // here we divide the x and y slopes by 8 * pixel size\\n    // where pixel size (aka meters/pixel) is:\\n    // circumference of the world / (pixels per tile * number of tiles)\\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\\n    // we want to vertically exaggerate the hillshading though, because otherwise\\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\\n    // Here we use a=0.3 which works out to the expression below. see \\n    // nickidlugash's awesome breakdown for more info\\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\\n\\n    vec2 deriv = vec2(\\n        (c + f + f + i) - (a + d + d + g),\\n        (g + h + h + i) - (a + b + b + c)\\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\\n\\n    gl_FragColor = clamp(vec4(\\n        deriv.x / 2.0 + 0.5,\\n        deriv.y / 2.0 + 0.5,\\n        1.0,\\n        1.0), 0.0, 1.0);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\\n}\\n\"},hillshade:{fragmentSource:\"uniform sampler2D u_image;\\nvarying vec2 v_pos;\\n\\nuniform vec2 u_latrange;\\nuniform vec2 u_light;\\nuniform vec4 u_shadow;\\nuniform vec4 u_highlight;\\nuniform vec4 u_accent;\\n\\n#define PI 3.141592653589793\\n\\nvoid main() {\\n    vec4 pixel = texture2D(u_image, v_pos);\\n\\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\\n\\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\\n    // to account for mercator projection distortion. see #4807 for details\\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\\n    // We also multiply the slope by an arbitrary z-factor of 1.25\\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\\n\\n    float intensity = u_light.x;\\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\\n    float azimuth = u_light.y + PI;\\n\\n    // We scale the slope exponentially based on intensity, using a calculation similar to\\n    // the exponential interpolation function in the style spec:\\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\\n    // so that higher intensity values create more opaque hillshading.\\n    float base = 1.875 - intensity * 1.75;\\n    float maxValue = 0.5 * PI;\\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\\n\\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\\n    // so that the accent color's rate of change eases in while the shade color's eases out.\\n    float accent = cos(scaledSlope);\\n    // We multiply both the accent and shade color by a clamped intensity value\\n    // so that intensities >= 0.5 do not additionally affect the color values\\n    // while intensity values < 0.5 make the overall color more transparent.\\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n    v_pos = a_texture_pos / 8192.0;\\n}\\n\"},line:{fragmentSource:\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    // Calculate the distance of the pixel from the line in pixels.\\n    float dist = length(v_normal) * v_width2.s;\\n\\n    // Calculate the antialiasing fade factor. This is either when fading in\\n    // the line in case of an offset line (v_width2.t) or when fading out\\n    // (v_width2.s)\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n    gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\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 vec4 a_pos_normal;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\nvarying highp float v_linesofar;\\n\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize mediump float gapwidth\\n    #pragma mapbox: initialize lowp float offset\\n    #pragma mapbox: initialize mediump float width\\n\\n    vec2 a_extrude = a_data.xy - 128.0;\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\\n\\n    vec2 pos = a_pos_normal.xy;\\n\\n    // x is 1 if it's a round cap, 0 otherwise\\n    // y is 1 if the normal points up, and -1 if it points down\\n    mediump vec2 normal = a_pos_normal.zw;\\n    v_normal = normal;\\n\\n    // these transformations used to be applied in the JS and native code bases.\\n    // moved them into the shader for clarity and simplicity.\\n    gapwidth = gapwidth / 2.0;\\n    float halfwidth = width / 2.0;\\n    offset = -1.0 * offset;\\n\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + 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 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n    // calculate how much the perspective view squishes or stretches the extrude\\n    float extrude_length_without_perspective = length(dist);\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n    v_width2 = vec2(outset, inset);\\n}\\n\"},lineGradient:{fragmentSource:\"\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\nvarying highp float v_lineprogress;\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    // Calculate the distance of the pixel from the line in pixels.\\n    float dist = length(v_normal) * v_width2.s;\\n\\n    // Calculate the antialiasing fade factor. This is either when fading in\\n    // the line in case of an offset line (v_width2.t) or when fading out\\n    // (v_width2.s)\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\\n\\n    gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n// the attribute conveying progress along a line is scaled to [0, 2^15)\\n#define MAX_LINE_DISTANCE 32767.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\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 vec4 a_pos_normal;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\nvarying highp float v_lineprogress;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize mediump float gapwidth\\n    #pragma mapbox: initialize lowp float offset\\n    #pragma mapbox: initialize mediump float width\\n\\n    vec2 a_extrude = a_data.xy - 128.0;\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\\n\\n    vec2 pos = a_pos_normal.xy;\\n\\n    // x is 1 if it's a round cap, 0 otherwise\\n    // y is 1 if the normal points up, and -1 if it points down\\n    mediump vec2 normal = a_pos_normal.zw;\\n    v_normal = normal;\\n\\n    // these transformations used to be applied in the JS and native code bases.\\n    // moved them into the shader for clarity and simplicity.\\n    gapwidth = gapwidth / 2.0;\\n    float halfwidth = width / 2.0;\\n    offset = -1.0 * offset;\\n\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + 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 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n    // calculate how much the perspective view squishes or stretches the extrude\\n    float extrude_length_without_perspective = length(dist);\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n    v_width2 = vec2(outset, inset);\\n}\\n\"},linePattern:{fragmentSource:\"uniform 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 vec2 u_texsize;\\nuniform float u_fade;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    // Calculate the distance of the pixel from the line in pixels.\\n    float dist = length(v_normal) * v_width2.s;\\n\\n    // Calculate the antialiasing fade factor. This is either when fading in\\n    // the line in case of an offset line (v_width2.t) or when fading out\\n    // (v_width2.s)\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 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\\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\\n    // the texture coordinate\\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\\n\\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\n\\n    gl_FragColor = color * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// 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\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec4 a_pos_normal;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define mediump float width\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize lowp float offset\\n    #pragma mapbox: initialize mediump float gapwidth\\n    #pragma mapbox: initialize mediump float width\\n\\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    vec2 pos = a_pos_normal.xy;\\n\\n    // x is 1 if it's a round cap, 0 otherwise\\n    // y is 1 if the normal points up, and -1 if it points down\\n    mediump vec2 normal = a_pos_normal.zw;\\n    v_normal = normal;\\n\\n    // these transformations used to be applied in the JS and native code bases.\\n    // moved them into the shader for clarity and simplicity.\\n    gapwidth = gapwidth / 2.0;\\n    float halfwidth = width / 2.0;\\n    offset = -1.0 * offset;\\n\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + 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 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n    // calculate how much the perspective view squishes or stretches the extrude\\n    float extrude_length_without_perspective = length(dist);\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n    v_linesofar = a_linesofar;\\n    v_width2 = vec2(outset, inset);\\n}\\n\"},lineSDF:{fragmentSource:\"\\nuniform sampler2D u_image;\\nuniform float u_sdfgamma;\\nuniform float u_mix;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize mediump float width\\n    #pragma mapbox: initialize lowp float floorwidth\\n\\n    // Calculate the distance of the pixel from the line in pixels.\\n    float dist = length(v_normal) * v_width2.s;\\n\\n    // Calculate the antialiasing fade factor. This is either when fading in\\n    // the line in case of an offset line (v_width2.t) or when fading out\\n    // (v_width2.s)\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 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 / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\\n\\n    gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// 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\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec4 a_pos_normal;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_patternscale_a;\\nuniform float u_tex_y_a;\\nuniform vec2 u_patternscale_b;\\nuniform float u_tex_y_b;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 color\\n    #pragma mapbox: initialize lowp float blur\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize mediump float gapwidth\\n    #pragma mapbox: initialize lowp float offset\\n    #pragma mapbox: initialize mediump float width\\n    #pragma mapbox: initialize lowp float floorwidth\\n\\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    vec2 pos = a_pos_normal.xy;\\n\\n    // x is 1 if it's a round cap, 0 otherwise\\n    // y is 1 if the normal points up, and -1 if it points down\\n    mediump vec2 normal = a_pos_normal.zw;\\n    v_normal = normal;\\n\\n    // these transformations used to be applied in the JS and native code bases.\\n    // moved them into the shader for clarity and simplicity.\\n    gapwidth = gapwidth / 2.0;\\n    float halfwidth = width / 2.0;\\n    offset = -1.0 * offset;\\n\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + 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 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n    // calculate how much the perspective view squishes or stretches the extrude\\n    float extrude_length_without_perspective = length(dist);\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\\n\\n    v_width2 = vec2(outset, inset);\\n}\\n\"},raster:{fragmentSource:\"uniform float u_fade_t;\\nuniform float u_opacity;\\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    if (color0.a > 0.0) {\\n        color0.rgb = color0.rgb / color0.a;\\n    }\\n    if (color1.a > 0.0) {\\n        color1.rgb = color1.rgb / color1.a;\\n    }\\n    vec4 color = mix(color0, color1, u_fade_t);\\n    color.a *= u_opacity;\\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, color.a);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform 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    // We are using Int16 for texture position coordinates to give us enough precision for\\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\\n    // as an arbitrarily high number to preserve adequate precision when rendering.\\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\\n    // so math for modifying either is consistent.\\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\n}\\n\"},symbolIcon:{fragmentSource:\"uniform sampler2D u_texture;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_tex;\\nvarying float v_fade_opacity;\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    lowp float alpha = opacity * v_fade_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:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec4 a_data;\\nattribute vec3 a_projected_pos;\\nattribute float a_fade_opacity;\\n\\nuniform bool u_is_size_zoom_constant;\\nuniform bool u_is_size_feature_constant;\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\nuniform highp float u_size; // used when size is both zoom and feature constant\\nuniform highp float u_camera_to_center_distance;\\nuniform highp float u_pitch;\\nuniform bool u_rotate_symbol;\\nuniform highp float u_aspect_ratio;\\nuniform float u_fade_change;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nuniform mat4 u_matrix;\\nuniform mat4 u_label_plane_matrix;\\nuniform mat4 u_gl_coord_matrix;\\n\\nuniform bool u_is_text;\\nuniform bool u_pitch_with_map;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying float v_fade_opacity;\\n\\nvoid main() {\\n    #pragma mapbox: initialize lowp float opacity\\n\\n    vec2 a_pos = a_pos_offset.xy;\\n    vec2 a_offset = a_pos_offset.zw;\\n\\n    vec2 a_tex = a_data.xy;\\n    vec2 a_size = a_data.zw;\\n\\n    highp float segment_angle = -a_projected_pos[2];\\n\\n    float size;\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\n        size = a_size[0] / 10.0;\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\n        size = u_size;\\n    } else {\\n        size = u_size;\\n    }\\n\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\n    // See comments in symbol_sdf.vertex\\n    highp float distance_ratio = u_pitch_with_map ?\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\n    highp float perspective_ratio = clamp(\\n            0.5 + 0.5 * distance_ratio,\\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\n            4.0);\\n\\n    size *= perspective_ratio;\\n\\n    float fontScale = u_is_text ? size / 24.0 : size;\\n\\n    highp float symbol_rotation = 0.0;\\n    if (u_rotate_symbol) {\\n        // See comments in symbol_sdf.vertex\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\n\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\n\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\n    }\\n\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\n\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\n\\n    v_tex = a_tex / u_texsize;\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\n}\\n\"},symbolSDF:{fragmentSource:\"#define SDF_PX 8.0\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\n\\nuniform bool u_is_halo;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform sampler2D u_texture;\\nuniform highp float u_gamma_scale;\\nuniform bool u_is_text;\\n\\nvarying vec2 v_data0;\\nvarying vec3 v_data1;\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 fill_color\\n    #pragma mapbox: initialize highp vec4 halo_color\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize lowp float halo_width\\n    #pragma mapbox: initialize lowp float halo_blur\\n\\n    vec2 tex = v_data0.xy;\\n    float gamma_scale = v_data1.x;\\n    float size = v_data1.y;\\n    float fade_opacity = v_data1[2];\\n\\n    float fontScale = u_is_text ? size / 24.0 : size;\\n\\n    lowp vec4 color = fill_color;\\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\\n    lowp float buff = (256.0 - 64.0) / 256.0;\\n    if (u_is_halo) {\\n        color = halo_color;\\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\\n    }\\n\\n    lowp float dist = texture2D(u_texture, tex).a;\\n    highp float gamma_scaled = gamma * gamma_scale;\\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\\n\\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n    gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec4 a_data;\\nattribute vec3 a_projected_pos;\\nattribute float a_fade_opacity;\\n\\n// contents of a_size vary based on the type of property value\\n// used for {text,icon}-size.\\n// For constants, a_size is disabled.\\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\\n// For composite functions:\\n// [ text-size(lowerZoomStop, feature),\\n//   text-size(upperZoomStop, feature) ]\\nuniform bool u_is_size_zoom_constant;\\nuniform bool u_is_size_feature_constant;\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\nuniform highp float u_size; // used when size is both zoom and feature constant\\n\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform mat4 u_matrix;\\nuniform mat4 u_label_plane_matrix;\\nuniform mat4 u_gl_coord_matrix;\\n\\nuniform bool u_is_text;\\nuniform bool u_pitch_with_map;\\nuniform highp float u_pitch;\\nuniform bool u_rotate_symbol;\\nuniform highp float u_aspect_ratio;\\nuniform highp float u_camera_to_center_distance;\\nuniform float u_fade_change;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_data0;\\nvarying vec3 v_data1;\\n\\nvoid main() {\\n    #pragma mapbox: initialize highp vec4 fill_color\\n    #pragma mapbox: initialize highp vec4 halo_color\\n    #pragma mapbox: initialize lowp float opacity\\n    #pragma mapbox: initialize lowp float halo_width\\n    #pragma mapbox: initialize lowp float halo_blur\\n\\n    vec2 a_pos = a_pos_offset.xy;\\n    vec2 a_offset = a_pos_offset.zw;\\n\\n    vec2 a_tex = a_data.xy;\\n    vec2 a_size = a_data.zw;\\n\\n    highp float segment_angle = -a_projected_pos[2];\\n    float size;\\n\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\n        size = a_size[0] / 10.0;\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\n        size = u_size;\\n    } else {\\n        size = u_size;\\n    }\\n\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\n    // If the label is pitched with the map, layout is done in pitched space,\\n    // which makes labels in the distance smaller relative to viewport space.\\n    // We counteract part of that effect by multiplying by the perspective ratio.\\n    // If the label isn't pitched with the map, we do layout in viewport space,\\n    // which makes labels in the distance larger relative to the features around\\n    // them. We counteract part of that effect by dividing by the perspective ratio.\\n    highp float distance_ratio = u_pitch_with_map ?\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\n    highp float perspective_ratio = clamp(\\n        0.5 + 0.5 * distance_ratio,\\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\n        4.0);\\n\\n    size *= perspective_ratio;\\n\\n    float fontScale = u_is_text ? size / 24.0 : size;\\n\\n    highp float symbol_rotation = 0.0;\\n    if (u_rotate_symbol) {\\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\\n        // space, project it, and measure its angle in projected space.\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\n\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\n\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\n    }\\n\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\n\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\n    float gamma_scale = gl_Position.w;\\n\\n    vec2 tex = a_tex / u_texsize;\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\n\\n    v_data0 = vec2(tex.x, tex.y);\\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\\n}\\n\"}},ii=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,ni=function(t){var e=ei[t],i={};e.fragmentSource=e.fragmentSource.replace(ii,function(t,e,n,o,r){return i[r]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+r+\"\\nvarying \"+n+\" \"+o+\" \"+r+\";\\n#else\\nuniform \"+n+\" \"+o+\" u_\"+r+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+r+\"\\n    \"+n+\" \"+o+\" \"+r+\" = u_\"+r+\";\\n#endif\\n\"}),e.vertexSource=e.vertexSource.replace(ii,function(t,e,n,o,r){var a=\"float\"===o?\"vec2\":\"vec4\";return i[r]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+r+\"\\nuniform lowp float a_\"+r+\"_t;\\nattribute \"+n+\" \"+a+\" a_\"+r+\";\\nvarying \"+n+\" \"+o+\" \"+r+\";\\n#else\\nuniform \"+n+\" \"+o+\" u_\"+r+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+r+\"\\n    \"+r+\" = unpack_mix_\"+a+\"(a_\"+r+\", a_\"+r+\"_t);\\n#else\\n    \"+n+\" \"+o+\" \"+r+\" = u_\"+r+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+r+\"\\nuniform lowp float a_\"+r+\"_t;\\nattribute \"+n+\" \"+a+\" a_\"+r+\";\\n#else\\nuniform \"+n+\" \"+o+\" u_\"+r+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+r+\"\\n    \"+n+\" \"+o+\" \"+r+\" = unpack_mix_\"+a+\"(a_\"+r+\", a_\"+r+\"_t);\\n#else\\n    \"+n+\" \"+o+\" \"+r+\" = u_\"+r+\";\\n#endif\\n\"});};for(var oi in ei)ni(oi);var ri=ei,ai=function(t,e,i,n){var o=t.gl;this.program=o.createProgram();var a=i.defines().concat(\"#define DEVICE_PIXEL_RATIO \"+r.devicePixelRatio.toFixed(1));n&&a.push(\"#define OVERDRAW_INSPECTOR;\");var s=a.concat(ri.prelude.fragmentSource,e.fragmentSource).join(\"\\n\"),l=a.concat(ri.prelude.vertexSource,e.vertexSource).join(\"\\n\"),c=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(c,s),o.compileShader(c),o.attachShader(this.program,c);var u=o.createShader(o.VERTEX_SHADER);o.shaderSource(u,l),o.compileShader(u),o.attachShader(this.program,u);for(var h=i.layoutAttributes||[],p=0;p<h.length;p++)o.bindAttribLocation(this.program,p,h[p].name);o.linkProgram(this.program),this.numAttributes=o.getProgramParameter(this.program,o.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var d=0;d<this.numAttributes;d++){var f=o.getActiveAttrib(this.program,d);f&&(this.attributes[f.name]=o.getAttribLocation(this.program,f.name));}for(var m=o.getProgramParameter(this.program,o.ACTIVE_UNIFORMS),_=0;_<m;_++){var g=o.getActiveUniform(this.program,_);g&&(this.uniforms[g.name]=o.getUniformLocation(this.program,g.name));}};function si(e,i,n,o,r){for(var a=0;a<n.length;a++){var s=n[a];if(o.isLessThan(s.tileID))break;if(i.key===s.tileID.key)return;if(s.tileID.isChildOf(i)){for(var l=i.children(1/0),c=0;c<l.length;c++){si(e,l[c],n.slice(a),o,r);}return}}var u=i.overscaledZ-e.overscaledZ,h=new t.CanonicalTileID(u,i.canonical.x-(e.canonical.x<<u),i.canonical.y-(e.canonical.y<<u));r[h.key]=r[h.key]||h;}function li(t,e,i,n,o){var r=t.context,a=r.gl,s=o?t.useProgram(\"collisionCircle\"):t.useProgram(\"collisionBox\");r.setDepthMode($t.disabled),r.setStencilMode(Gt.disabled),r.setColorMode(t.colorModeForRenderPass());for(var l=0;l<n.length;l++){var c=n[l],u=e.getTile(c),h=u.getBucket(i);if(h){var p=o?h.collisionCircle:h.collisionBox;if(p){a.uniformMatrix4fv(s.uniforms.u_matrix,!1,c.posMatrix),o||r.lineWidth.set(1),a.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var d=ze(u,1,t.transform.zoom),f=Math.pow(2,t.transform.zoom-u.tileID.overscaledZ);a.uniform1f(s.uniforms.u_pixels_to_tile_units,d),a.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(d*f),t.transform.pixelsToGLUnits[1]/(d*f)),a.uniform1f(s.uniforms.u_overscale_factor,u.tileID.overscaleFactor()),s.draw(r,o?a.TRIANGLES:a.LINES,i.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,null,p.collisionVertexBuffer,null);}}}}ai.prototype.draw=function(t,e,i,n,o,r,a,s,l){for(var c,u=t.gl,h=(c={},c[u.LINES]=2,c[u.TRIANGLES]=3,c)[e],p=0,d=r.get();p<d.length;p+=1){var f=d[p],m=f.vaos||(f.vaos={});(m[i]||(m[i]=new tt)).bind(t,this,n,a?a.getPaintVertexBuffers():[],o,f.vertexOffset,s,l),u.drawElements(e,f.primitiveLength*h,u.UNSIGNED_SHORT,f.primitiveOffset*h*2);}};var ci=t.mat4.identity(new Float32Array(16)),ui=t.default$19.layout;function hi(t,e,i,n,o,r,a,s,l,c){var u,h=t.context,p=h.gl,d=t.transform,f=\"map\"===s,m=\"map\"===l,_=f&&\"line\"===i.layout.get(\"symbol-placement\"),g=f&&!m&&!_,v=m;h.setDepthMode(v?t.depthModeForSublayer(0,$t.ReadOnly):$t.disabled);for(var y=0,x=n;y<x.length;y+=1){var b=x[y],w=e.getTile(b),E=w.getBucket(i);if(E){var T=o?E.text:E.icon;if(T&&T.segments.get().length){var I=T.programConfigurations.get(i.id),C=o||E.sdfIcons,S=o?E.textSizeData:E.iconSizeData;if(u||(u=t.useProgram(C?\"symbolSDF\":\"symbolIcon\",I),I.setUniforms(t.context,u,i.paint,{zoom:t.transform.zoom}),pi(u,t,i,o,g,m,S)),h.activeTexture.set(p.TEXTURE0),p.uniform1i(u.uniforms.u_texture,0),o)w.glyphAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),p.uniform2fv(u.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var z=1!==i.layout.get(\"icon-size\").constantOr(0)||E.iconsNeedLinear,A=m||0!==d.pitch;w.iconAtlasTexture.bind(C||t.options.rotating||t.options.zooming||z||A?p.LINEAR:p.NEAREST,p.CLAMP_TO_EDGE),p.uniform2fv(u.uniforms.u_texsize,w.iconAtlasTexture.size);}p.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.translatePosMatrix(b.posMatrix,w,r,a));var R=ze(w,1,t.transform.zoom),D=de(b.posMatrix,m,f,t.transform,R),M=fe(b.posMatrix,m,f,t.transform,R);p.uniformMatrix4fv(u.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(M,w,r,a,!0)),_?(p.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,ci),ge(E,b.posMatrix,t,o,D,M,m,c)):p.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,D),p.uniform1f(u.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),di(u,I,t,i,w,T,o,C,m);}}}}function pi(e,i,n,o,r,a,s){var l=i.context.gl,c=i.transform;l.uniform1i(e.uniforms.u_pitch_with_map,a?1:0),l.uniform1f(e.uniforms.u_is_text,o?1:0),l.uniform1f(e.uniforms.u_pitch,c.pitch/360*2*Math.PI);var u=\"constant\"===s.functionType||\"source\"===s.functionType,h=\"constant\"===s.functionType||\"camera\"===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,u?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,h?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var p=t.evaluateSizeForZoom(s,c.zoom,ui.properties[o?\"text-size\":\"icon-size\"]);void 0!==p.uSizeT&&l.uniform1f(e.uniforms.u_size_t,p.uSizeT),void 0!==p.uSize&&l.uniform1f(e.uniforms.u_size,p.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(e.uniforms.u_rotate_symbol,r?1:0);}function di(t,e,i,n,o,r,a,s,l){var c=i.context,u=c.gl,h=i.transform;if(s){var p=0!==n.paint.get(a?\"text-halo-width\":\"icon-halo-width\").constantOr(1),d=l?Math.cos(h._pitch)*h.cameraToCenterDistance:1;u.uniform1f(t.uniforms.u_gamma_scale,d),p&&(u.uniform1f(t.uniforms.u_is_halo,1),fi(r,n,c,t)),u.uniform1f(t.uniforms.u_is_halo,0);}fi(r,n,c,t);}function fi(t,e,i,n){n.draw(i,i.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer);}function mi(t,e,i,n,o,a,s,l,c){var u,h,p,d,f=e.context,m=f.gl,_=o.paint.get(\"line-dasharray\"),g=o.paint.get(\"line-pattern\");if(l||c){var v=1/ze(i,1,e.transform.tileZoom);if(_){u=e.lineAtlas.getDash(_.from,\"round\"===o.layout.get(\"line-cap\")),h=e.lineAtlas.getDash(_.to,\"round\"===o.layout.get(\"line-cap\"));var y=u.width*_.fromScale,x=h.width*_.toScale;m.uniform2f(t.uniforms.u_patternscale_a,v/y,-u.height/2),m.uniform2f(t.uniforms.u_patternscale_b,v/x,-h.height/2),m.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(y,x)*r.devicePixelRatio)/2);}else if(g){if(p=e.imageManager.getPattern(g.from),d=e.imageManager.getPattern(g.to),!p||!d)return;m.uniform2f(t.uniforms.u_pattern_size_a,p.displaySize[0]*g.fromScale/v,p.displaySize[1]),m.uniform2f(t.uniforms.u_pattern_size_b,d.displaySize[0]*g.toScale/v,d.displaySize[1]);var b=e.imageManager.getPixelSize(),w=b.width,E=b.height;m.uniform2fv(t.uniforms.u_texsize,[w,E]);}m.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1]);}l&&(_?(m.uniform1i(t.uniforms.u_image,0),f.activeTexture.set(m.TEXTURE0),e.lineAtlas.bind(f),m.uniform1f(t.uniforms.u_tex_y_a,u.y),m.uniform1f(t.uniforms.u_tex_y_b,h.y),m.uniform1f(t.uniforms.u_mix,_.t)):g&&(m.uniform1i(t.uniforms.u_image,0),f.activeTexture.set(m.TEXTURE0),e.imageManager.bind(f),m.uniform2fv(t.uniforms.u_pattern_tl_a,p.tl),m.uniform2fv(t.uniforms.u_pattern_br_a,p.br),m.uniform2fv(t.uniforms.u_pattern_tl_b,d.tl),m.uniform2fv(t.uniforms.u_pattern_br_b,d.br),m.uniform1f(t.uniforms.u_fade,g.t))),f.setStencilMode(e.stencilModeForClipping(a));var T=e.translatePosMatrix(a.posMatrix,i,o.paint.get(\"line-translate\"),o.paint.get(\"line-translate-anchor\"));if(m.uniformMatrix4fv(t.uniforms.u_matrix,!1,T),m.uniform1f(t.uniforms.u_ratio,1/ze(i,1,e.transform.zoom)),o.paint.get(\"line-gradient\")){f.activeTexture.set(m.TEXTURE0);var I=o.gradientTexture;if(!o.gradient)return;I||(I=o.gradientTexture=new M(f,o.gradient,m.RGBA)),I.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.uniform1i(t.uniforms.u_image,0);}t.draw(f,m.TRIANGLES,o.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s);}var _i=function(t,e){if(!t)return!1;var i=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!i||!n},gi=function(t,e,i){var n=e.context,o=n.gl,r=e.imageManager.getPattern(t.from),a=e.imageManager.getPattern(t.to);o.uniform1i(i.uniforms.u_image,0),o.uniform2fv(i.uniforms.u_pattern_tl_a,r.tl),o.uniform2fv(i.uniforms.u_pattern_br_a,r.br),o.uniform2fv(i.uniforms.u_pattern_tl_b,a.tl),o.uniform2fv(i.uniforms.u_pattern_br_b,a.br);var s=e.imageManager.getPixelSize(),l=s.width,c=s.height;o.uniform2fv(i.uniforms.u_texsize,[l,c]),o.uniform1f(i.uniforms.u_mix,t.t),o.uniform2fv(i.uniforms.u_pattern_size_a,r.displaySize),o.uniform2fv(i.uniforms.u_pattern_size_b,a.displaySize),o.uniform1f(i.uniforms.u_scale_a,t.fromScale),o.uniform1f(i.uniforms.u_scale_b,t.toScale),n.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context);},vi=function(t,e,i){var n=e.context.gl;n.uniform1f(i.uniforms.u_tile_units_to_pixels,1/ze(t,1,e.transform.tileZoom));var o=Math.pow(2,t.tileID.overscaledZ),r=t.tileSize*Math.pow(2,e.transform.tileZoom)/o,a=r*(t.tileID.canonical.x+t.tileID.wrap*o),s=r*t.tileID.canonical.y;n.uniform2f(i.uniforms.u_pixel_coord_upper,a>>16,s>>16),n.uniform2f(i.uniforms.u_pixel_coord_lower,65535&a,65535&s);};function yi(t,e,i,n,o){if(!_i(i.paint.get(\"fill-pattern\"),t))for(var r=!0,a=0,s=n;a<s.length;a+=1){var l=s[a],c=e.getTile(l),u=c.getBucket(i);u&&(t.context.setStencilMode(t.stencilModeForClipping(l)),o(t,e,i,c,l,u,r),r=!1);}}function xi(t,e,i,n,o,r,a){var s=t.context.gl,l=r.programConfigurations.get(i.id);wi(\"fill\",i.paint.get(\"fill-pattern\"),t,l,i,n,o,a).draw(t.context,s.TRIANGLES,i.id,r.layoutVertexBuffer,r.indexBuffer,r.segments,l);}function bi(t,e,i,n,o,r,a){var s=t.context.gl,l=r.programConfigurations.get(i.id),c=wi(\"fillOutline\",i.getPaintProperty(\"fill-outline-color\")?null:i.paint.get(\"fill-pattern\"),t,l,i,n,o,a);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,i.id,r.layoutVertexBuffer,r.indexBuffer2,r.segments2,l);}function wi(t,e,i,n,o,r,a,s){var l,c=i.context.program.get();return e?(l=i.useProgram(t+\"Pattern\",n),(s||l.program!==c)&&(n.setUniforms(i.context,l,o.paint,{zoom:i.transform.zoom}),gi(e,i,l)),vi(r,i,l)):(l=i.useProgram(t,n),(s||l.program!==c)&&n.setUniforms(i.context,l,o.paint,{zoom:i.transform.zoom})),i.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,i.translatePosMatrix(a.posMatrix,r,o.paint.get(\"fill-translate\"),o.paint.get(\"fill-translate-anchor\"))),l}var Ei=t.default$20.mat3,Ti=t.default$20.mat4,Ii=t.default$20.vec3;function Ci(t,e,i,n,o,r,a){var s=t.context,l=s.gl,c=i.paint.get(\"fill-extrusion-pattern\"),u=t.context.program.get(),h=r.programConfigurations.get(i.id),p=t.useProgram(c?\"fillExtrusionPattern\":\"fillExtrusion\",h);if((a||p.program!==u)&&h.setUniforms(s,p,i.paint,{zoom:t.transform.zoom}),c){if(_i(c,t))return;gi(c,t,p),vi(n,t,p),l.uniform1f(p.uniforms.u_height_factor,-Math.pow(2,o.overscaledZ)/n.tileSize/8);}t.context.gl.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.translatePosMatrix(o.posMatrix,n,i.paint.get(\"fill-extrusion-translate\"),i.paint.get(\"fill-extrusion-translate-anchor\"))),function(t,e){var i=e.context.gl,n=e.style.light,o=n.properties.get(\"position\"),r=[o.x,o.y,o.z],a=Ei.create();\"viewport\"===n.properties.get(\"anchor\")&&Ei.fromRotation(a,-e.transform.angle);Ii.transformMat3(r,r,a);var s=n.properties.get(\"color\");i.uniform3fv(t.uniforms.u_lightpos,r),i.uniform1f(t.uniforms.u_lightintensity,n.properties.get(\"intensity\")),i.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b);}(p,t),p.draw(s,l.TRIANGLES,i.id,r.layoutVertexBuffer,r.indexBuffer,r.segments,h);}function Si(e,i,n){var o=e.context,r=o.gl,a=i.fbo;if(a){var s=e.useProgram(\"hillshade\"),l=e.transform.calculatePosMatrix(i.tileID.toUnwrapped(),!0);!function(t,e,i){var n=i.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);\"viewport\"===i.paint.get(\"hillshade-illumination-anchor\")&&(n-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,i.paint.get(\"hillshade-exaggeration\"),n);}(s,e,n);var c=function(e,i){var n=i.toCoordinate(),o=new t.default$17(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(o).lat]}(e,i.tileID);o.activeTexture.set(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,a.colorAttachment.get()),r.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),r.uniform2fv(s.uniforms.u_latrange,c),r.uniform1i(s.uniforms.u_image,0);var u=n.paint.get(\"hillshade-shadow-color\");r.uniform4f(s.uniforms.u_shadow,u.r,u.g,u.b,u.a);var h=n.paint.get(\"hillshade-highlight-color\");r.uniform4f(s.uniforms.u_highlight,h.r,h.g,h.b,h.a);var p=n.paint.get(\"hillshade-accent-color\");if(r.uniform4f(s.uniforms.u_accent,p.r,p.g,p.b,p.a),i.maskedBoundsBuffer&&i.maskedIndexBuffer&&i.segments)s.draw(o,r.TRIANGLES,n.id,i.maskedBoundsBuffer,i.maskedIndexBuffer,i.segments);else{var d=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(o,s,d,[]),r.drawArrays(r.TRIANGLE_STRIP,0,d.length);}}}function zi(e,i,n){var o=e.context,r=o.gl;if(i.dem&&i.dem.level){var a=i.dem.level.dim,s=i.dem.getPixels();if(o.activeTexture.set(r.TEXTURE1),o.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||e.getTileTexture(i.tileSize),i.demTexture){var l=i.demTexture;l.update(s,{premultiply:!1}),l.bind(r.NEAREST,r.CLAMP_TO_EDGE);}else i.demTexture=new M(o,s,r.RGBA,{premultiply:!1}),i.demTexture.bind(r.NEAREST,r.CLAMP_TO_EDGE);o.activeTexture.set(r.TEXTURE0);var c=i.fbo;if(!c){var u=new M(o,{width:a,height:a,data:null},r.RGBA);u.bind(r.LINEAR,r.CLAMP_TO_EDGE),(c=i.fbo=o.createFramebuffer(a,a)).colorAttachment.set(u.texture);}o.bindFramebuffer.set(c.framebuffer),o.viewport.set([0,0,a,a]);var h=t.mat4.create();t.mat4.ortho(h,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(h,h,[0,-t.default$8,0]);var p=e.useProgram(\"hillshadePrepare\");r.uniformMatrix4fv(p.uniforms.u_matrix,!1,h),r.uniform1f(p.uniforms.u_zoom,i.tileID.overscaledZ),r.uniform2fv(p.uniforms.u_dimension,[2*a,2*a]),r.uniform1i(p.uniforms.u_image,1),r.uniform1f(p.uniforms.u_maxzoom,n);var d=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(o,p,d,[]),r.drawArrays(r.TRIANGLE_STRIP,0,d.length),i.needsHillshadePrepare=!1;}}function Ai(e,i,n,o,a){var s=o.paint.get(\"raster-fade-duration\");if(s>0){var l=r.now(),c=(l-e.timeAdded)/s,u=i?(l-i.timeAdded)/s:-1,h=n.getSource(),p=a.coveringZoomLevel({tileSize:h.tileSize,roundZoom:h.roundZoom}),d=!i||Math.abs(i.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=d&&e.refreshedUponExpiration?1:t.clamp(d?c:1-u,0,1);return e.refreshedUponExpiration&&c>=1&&(e.refreshedUponExpiration=!1),i?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function Ri(e,i,n){var o=e.context,a=o.gl;o.lineWidth.set(1*r.devicePixelRatio);var s=n.posMatrix,l=e.useProgram(\"debug\");o.setDepthMode($t.disabled),o.setStencilMode(Gt.disabled),o.setColorMode(e.colorModeForRenderPass()),a.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),a.uniform4f(l.uniforms.u_color,1,0,0,1),e.debugVAO.bind(o,l,e.debugBuffer,[]),a.drawArrays(a.LINE_STRIP,0,e.debugBuffer.length);for(var c=function(t,e,i,n){n=n||1;var o,r,a,s,l,c,u,h,p=[];for(o=0,r=t.length;o<r;o++)if(l=Di[t[o]]){for(h=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?h=null:(c=e+l[1][a]*n,u=i-l[1][a+1]*n,h&&p.push(h.x,h.y,c,u),h={x:c,y:u});e+=l[0]*n;}return p}(n.toString(),50,200,5),u=new t.PosArray,h=0;h<c.length;h+=2)u.emplaceBack(c[h],c[h+1]);var p=o.createVertexBuffer(u,ti.members);(new tt).bind(o,l,p,[]),a.uniform4f(l.uniforms.u_color,1,1,1,1);for(var d=i.getTile(n).tileSize,f=t.default$8/(Math.pow(2,e.transform.zoom-n.overscaledZ)*d),m=[[-1,-1],[-1,1],[1,-1],[1,1]],_=0;_<m.length;_++){var g=m[_];a.uniformMatrix4fv(l.uniforms.u_matrix,!1,t.mat4.translate([],s,[f*g[0],f*g[1],0])),a.drawArrays(a.LINES,0,p.length);}a.uniform4f(l.uniforms.u_color,0,0,0,1),a.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),a.drawArrays(a.LINES,0,p.length);}var Di={\" \":[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]]};var Mi={symbol:function(t,e,i,n){if(\"translucent\"===t.renderPass){var o=t.context;o.setStencilMode(Gt.disabled),o.setColorMode(t.colorModeForRenderPass()),0!==i.paint.get(\"icon-opacity\").constantOr(1)&&hi(t,e,i,n,!1,i.paint.get(\"icon-translate\"),i.paint.get(\"icon-translate-anchor\"),i.layout.get(\"icon-rotation-alignment\"),i.layout.get(\"icon-pitch-alignment\"),i.layout.get(\"icon-keep-upright\")),0!==i.paint.get(\"text-opacity\").constantOr(1)&&hi(t,e,i,n,!0,i.paint.get(\"text-translate\"),i.paint.get(\"text-translate-anchor\"),i.layout.get(\"text-rotation-alignment\"),i.layout.get(\"text-pitch-alignment\"),i.layout.get(\"text-keep-upright\")),e.map.showCollisionBoxes&&function(t,e,i,n){li(t,e,i,n,!1),li(t,e,i,n,!0);}(t,e,i,n);}},circle:function(t,e,i,n){if(\"translucent\"===t.renderPass){var o=i.paint.get(\"circle-opacity\"),r=i.paint.get(\"circle-stroke-width\"),a=i.paint.get(\"circle-stroke-opacity\");if(0!==o.constantOr(1)||0!==r.constantOr(1)&&0!==a.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,$t.ReadOnly)),s.setStencilMode(Gt.disabled),s.setColorMode(t.colorModeForRenderPass());for(var c=!0,u=0;u<n.length;u++){var h=n[u],p=e.getTile(h),d=p.getBucket(i);if(d){var f=t.context.program.get(),m=d.programConfigurations.get(i.id),_=t.useProgram(\"circle\",m);if((c||_.program!==f)&&(m.setUniforms(s,_,i.paint,{zoom:t.transform.zoom}),c=!1),l.uniform1f(_.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(_.uniforms.u_scale_with_map,\"map\"===i.paint.get(\"circle-pitch-scale\")?1:0),\"map\"===i.paint.get(\"circle-pitch-alignment\")){l.uniform1i(_.uniforms.u_pitch_with_map,1);var g=ze(p,1,t.transform.zoom);l.uniform2f(_.uniforms.u_extrude_scale,g,g);}else l.uniform1i(_.uniforms.u_pitch_with_map,0),l.uniform2fv(_.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(_.uniforms.u_matrix,!1,t.translatePosMatrix(h.posMatrix,p,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\"))),_.draw(s,l.TRIANGLES,i.id,d.layoutVertexBuffer,d.indexBuffer,d.segments,m);}}}}},heatmap:function(e,i,n,o){if(0!==n.paint.get(\"heatmap-opacity\"))if(\"offscreen\"===e.renderPass){var r=e.context,a=r.gl;r.setDepthMode(e.depthModeForSublayer(0,$t.ReadOnly)),r.setStencilMode(Gt.disabled),function(t,e,i){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var o=i.heatmapFbo;if(o)n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),t.bindFramebuffer.set(o.framebuffer);else{var r=n.createTexture();n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),o=i.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,i,n,o){var r=e.gl;r.texImage2D(r.TEXTURE_2D,0,r.RGBA,i.width/4,i.height/4,0,r.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:r.UNSIGNED_BYTE,null),o.colorAttachment.set(n),e.extTextureHalfFloat&&r.checkFramebufferStatus(r.FRAMEBUFFER)!==r.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,o.colorAttachment.setDirty(),t(e,i,n,o));}(t,e,r,o);}}(r,e,n),r.clear({color:t.default$6.transparent}),r.setColorMode(new Wt([a.ONE,a.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l<o.length;l++){var c=o[l];if(!i.hasRenderableParent(c)){var u=i.getTile(c),h=u.getBucket(n);if(h){var p=e.context.program.get(),d=h.programConfigurations.get(n.id),f=e.useProgram(\"heatmap\",d),m=e.transform.zoom;(s||f.program!==p)&&(d.setUniforms(e.context,f,n.paint,{zoom:m}),s=!1),a.uniform1f(f.uniforms.u_extrude_scale,ze(u,1,m)),a.uniform1f(f.uniforms.u_intensity,n.paint.get(\"heatmap-intensity\")),a.uniformMatrix4fv(f.uniforms.u_matrix,!1,c.posMatrix),f.draw(r,a.TRIANGLES,n.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,d);}}}r.viewport.set([0,0,e.width,e.height]);}else\"translucent\"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,i){var n=e.context,o=n.gl,r=i.heatmapFbo;if(r){n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,r.colorAttachment.get()),n.activeTexture.set(o.TEXTURE1);var a=i.colorRampTexture;a||(a=i.colorRampTexture=new M(n,i.colorRamp,o.RGBA)),a.bind(o.LINEAR,o.CLAMP_TO_EDGE),n.setDepthMode($t.disabled);var s=e.useProgram(\"heatmapTexture\"),l=i.paint.get(\"heatmap-opacity\");o.uniform1f(s.uniforms.u_opacity,l),o.uniform1i(s.uniforms.u_image,0),o.uniform1i(s.uniforms.u_color_ramp,1);var c=t.mat4.create();t.mat4.ortho(c,0,e.width,e.height,0,0,1),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,c),o.uniform2f(s.uniforms.u_world,o.drawingBufferWidth,o.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),o.drawArrays(o.TRIANGLE_STRIP,0,4);}}(e,n));},line:function(t,e,i,n){if(\"translucent\"===t.renderPass&&0!==i.paint.get(\"line-opacity\").constantOr(1)){var o=t.context;o.setDepthMode(t.depthModeForSublayer(0,$t.ReadOnly)),o.setColorMode(t.colorModeForRenderPass());for(var r,a=i.paint.get(\"line-dasharray\")?\"lineSDF\":i.paint.get(\"line-pattern\")?\"linePattern\":i.paint.get(\"line-gradient\")?\"lineGradient\":\"line\",s=!0,l=0,c=n;l<c.length;l+=1){var u=c[l],h=e.getTile(u),p=h.getBucket(i);if(p){var d=p.programConfigurations.get(i.id),f=t.context.program.get(),m=t.useProgram(a,d),_=s||m.program!==f,g=r!==h.tileID.overscaledZ;_&&d.setUniforms(t.context,m,i.paint,{zoom:t.transform.zoom}),mi(m,t,h,p,i,u,d,_,g),r=h.tileID.overscaledZ,s=!1;}}}},fill:function(e,i,n,o){var r=n.paint.get(\"fill-color\"),a=n.paint.get(\"fill-opacity\");if(0!==a.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=n.paint.get(\"fill-pattern\")||1!==r.constantOr(t.default$6.transparent).a||1!==a.constantOr(0)?\"translucent\":\"opaque\";e.renderPass===l&&(s.setDepthMode(e.depthModeForSublayer(1,\"opaque\"===e.renderPass?$t.ReadWrite:$t.ReadOnly)),yi(e,i,n,o,xi)),\"translucent\"===e.renderPass&&n.paint.get(\"fill-antialias\")&&(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(n.getPaintProperty(\"fill-outline-color\")?2:0,$t.ReadOnly)),yi(e,i,n,o,bi));}},\"fill-extrusion\":function(e,i,n,o){if(0!==n.paint.get(\"fill-extrusion-opacity\"))if(\"offscreen\"===e.renderPass){!function(e,i){var n=e.context,o=n.gl,r=i.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!r){var a=new M(n,{width:e.width,height:e.height,data:null},o.RGBA);a.bind(o.LINEAR,o.CLAMP_TO_EDGE),(r=i.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture);}n.bindFramebuffer.set(r.framebuffer),r.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.default$6.transparent}),n.setStencilMode(Gt.disabled),n.setDepthMode(new $t(o.LEQUAL,$t.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass());}(e,n);for(var r=!0,a=0,s=o;a<s.length;a+=1){var l=s[a],c=i.getTile(l),u=c.getBucket(n);u&&(Ci(e,0,n,c,l,u,r),r=!1);}}else\"translucent\"===e.renderPass&&function(t,e){var i=e.viewportFrame;if(i){var n=t.context,o=n.gl,r=t.useProgram(\"extrusionTexture\");n.setStencilMode(Gt.disabled),n.setDepthMode($t.disabled),n.setColorMode(t.colorModeForRenderPass()),n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,i.colorAttachment.get()),o.uniform1f(r.uniforms.u_opacity,e.paint.get(\"fill-extrusion-opacity\")),o.uniform1i(r.uniforms.u_image,0);var a=Ti.create();Ti.ortho(a,0,t.width,t.height,0,0,1),o.uniformMatrix4fv(r.uniforms.u_matrix,!1,a),o.uniform2f(r.uniforms.u_world,o.drawingBufferWidth,o.drawingBufferHeight),t.viewportVAO.bind(n,r,t.viewportBuffer,[]),o.drawArrays(o.TRIANGLE_STRIP,0,4);}}(e,n);},hillshade:function(t,e,i,n){if(\"offscreen\"===t.renderPass||\"translucent\"===t.renderPass){var o=t.context,r=e.getSource().maxzoom;o.setDepthMode(t.depthModeForSublayer(0,$t.ReadOnly)),o.setStencilMode(Gt.disabled),o.setColorMode(t.colorModeForRenderPass());for(var a=0,s=n;a<s.length;a+=1){var l=s[a],c=e.getTile(l);c.needsHillshadePrepare&&\"offscreen\"===t.renderPass?zi(t,c,r):\"translucent\"===t.renderPass&&Si(t,c,i);}o.viewport.set([0,0,t.width,t.height]);}},raster:function(t,e,i,n){if(\"translucent\"===t.renderPass&&0!==i.paint.get(\"raster-opacity\")){var o,r,a=t.context,s=a.gl,l=e.getSource(),c=t.useProgram(\"raster\");a.setStencilMode(Gt.disabled),a.setColorMode(t.colorModeForRenderPass()),s.uniform1f(c.uniforms.u_brightness_low,i.paint.get(\"raster-brightness-min\")),s.uniform1f(c.uniforms.u_brightness_high,i.paint.get(\"raster-brightness-max\")),s.uniform1f(c.uniforms.u_saturation_factor,(o=i.paint.get(\"raster-saturation\"))>0?1-1/(1.001-o):-o),s.uniform1f(c.uniforms.u_contrast_factor,(r=i.paint.get(\"raster-contrast\"))>0?1/(1-r):1+r),s.uniform3fv(c.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),i=Math.cos(t);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}(i.paint.get(\"raster-hue-rotate\"))),s.uniform1f(c.uniforms.u_buffer_scale,1),s.uniform1i(c.uniforms.u_image0,0),s.uniform1i(c.uniforms.u_image1,1);for(var u=n.length&&n[0].overscaledZ,h=0,p=n;h<p.length;h+=1){var d=p[h];a.setDepthMode(t.depthModeForSublayer(d.overscaledZ-u,1===i.paint.get(\"raster-opacity\")?$t.ReadWrite:$t.ReadOnly,s.LESS));var f=e.getTile(d),m=t.transform.calculatePosMatrix(d.toUnwrapped(),!0);f.registerFadeDuration(i.paint.get(\"raster-fade-duration\")),s.uniformMatrix4fv(c.uniforms.u_matrix,!1,m);var _=e.findLoadedParent(d,0,{}),g=Ai(f,_,e,i,t.transform),v=void 0,y=void 0;if(a.activeTexture.set(s.TEXTURE0),f.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(s.TEXTURE1),_?(_.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),v=Math.pow(2,_.tileID.overscaledZ-f.tileID.overscaledZ),y=[f.tileID.canonical.x*v%1,f.tileID.canonical.y*v%1]):f.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(c.uniforms.u_tl_parent,y||[0,0]),s.uniform1f(c.uniforms.u_scale_parent,v||1),s.uniform1f(c.uniforms.u_fade_t,g.mix),s.uniform1f(c.uniforms.u_opacity,g.opacity*i.paint.get(\"raster-opacity\")),l instanceof et){var x=l.boundsBuffer;l.boundsVAO.bind(a,c,x,[]),s.drawArrays(s.TRIANGLE_STRIP,0,x.length);}else if(f.maskedBoundsBuffer&&f.maskedIndexBuffer&&f.segments)c.draw(a,s.TRIANGLES,i.id,f.maskedBoundsBuffer,f.maskedIndexBuffer,f.segments);else{var b=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(a,c,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length);}}}},background:function(t,e,i){var n=i.paint.get(\"background-color\"),o=i.paint.get(\"background-opacity\");if(0!==o){var r=t.context,a=r.gl,s=t.transform,l=s.tileSize,c=i.paint.get(\"background-pattern\"),u=c||1!==n.a||1!==o?\"translucent\":\"opaque\";if(t.renderPass===u){var h;if(r.setStencilMode(Gt.disabled),r.setDepthMode(t.depthModeForSublayer(0,\"opaque\"===u?$t.ReadWrite:$t.ReadOnly)),r.setColorMode(t.colorModeForRenderPass()),c){if(_i(c,t))return;h=t.useProgram(\"backgroundPattern\"),gi(c,t,h),t.tileExtentPatternVAO.bind(r,h,t.tileExtentBuffer,[]);}else h=t.useProgram(\"background\"),a.uniform4fv(h.uniforms.u_color,[n.r,n.g,n.b,n.a]),t.tileExtentVAO.bind(r,h,t.tileExtentBuffer,[]);a.uniform1f(h.uniforms.u_opacity,o);for(var p=0,d=s.coveringTiles({tileSize:l});p<d.length;p+=1){var f=d[p];c&&vi({tileID:f,tileSize:l},t,h),a.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(f.toUnwrapped())),a.drawArrays(a.TRIANGLE_STRIP,0,t.tileExtentBuffer.length);}}}},debug:function(t,e,i){for(var n=0;n<i.length;n++)Ri(t,e,i[n]);}},Li=function(e,i){this.context=new qt(e),this.transform=i,this._tileTextures={},this.setup(),this.numSublayers=Xt.maxUnderzooming+Xt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new He;};function Pi(t,e){if(t.row>e.row){var i=t;t=e,e=i;}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function ki(t,e,i,n,o){var r=Math.max(i,Math.floor(e.y0)),a=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,h=e.dx<0,p=r;p<a;p++){var d=l*Math.max(0,Math.min(t.dy,p+u-t.y0))+t.x0,f=c*Math.max(0,Math.min(e.dy,p+h-e.y0))+e.x0;o(Math.floor(f),Math.ceil(d),p);}}function Bi(t,e,i,n,o,r){var a,s=Pi(t,e),l=Pi(e,i),c=Pi(i,t);s.dy>l.dy&&(a=s,s=l,l=a),s.dy>c.dy&&(a=s,s=c,c=a),l.dy>c.dy&&(a=l,l=c,c=a),s.dy&&ki(c,s,n,o,r),l.dy&&ki(c,l,n,o,r);}Li.prototype.resize=function(t,e){var i=this.context.gl;if(this.width=t*r.devicePixelRatio,this.height=e*r.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,o=this.style._order;n<o.length;n+=1){var a=o[n];this.style._layers[a].resize();}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null);},Li.prototype.setup=function(){var e=this.context,i=new t.PosArray;i.emplaceBack(0,0),i.emplaceBack(t.default$8,0),i.emplaceBack(0,t.default$8),i.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(i,ti.members),this.tileExtentVAO=new tt,this.tileExtentPatternVAO=new tt;var n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(t.default$8,t.default$8),n.emplaceBack(0,t.default$8),n.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(n,ti.members),this.debugVAO=new tt;var o=new t.RasterBoundsArray;o.emplaceBack(0,0,0,0),o.emplaceBack(t.default$8,0,t.default$8,0),o.emplaceBack(0,t.default$8,0,t.default$8),o.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(o,Q.members),this.rasterBoundsVAO=new tt;var r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(1,0),r.emplaceBack(0,1),r.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(r,ti.members),this.viewportVAO=new tt;},Li.prototype.clearStencil=function(){var e=this.context,i=e.gl;e.setColorMode(Wt.disabled),e.setDepthMode($t.disabled),e.setStencilMode(new Gt({func:i.ALWAYS,mask:0},0,255,i.ZERO,i.ZERO,i.ZERO));var n=t.mat4.create();t.mat4.ortho(n,0,this.width,this.height,0,0,1),t.mat4.scale(n,n,[i.drawingBufferWidth,i.drawingBufferHeight,0]);var o=this.useProgram(\"clippingMask\");i.uniformMatrix4fv(o.uniforms.u_matrix,!1,n),this.viewportVAO.bind(e,o,this.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4);},Li.prototype._renderTileClippingMasks=function(t){var e=this.context,i=e.gl;e.setColorMode(Wt.disabled),e.setDepthMode($t.disabled);var n=1;this._tileClippingMaskIDs={};for(var o=0,r=t;o<r.length;o+=1){var a=r[o],s=this._tileClippingMaskIDs[a.key]=n++;e.setStencilMode(new Gt({func:i.ALWAYS,mask:0},s,255,i.KEEP,i.KEEP,i.REPLACE));var l=this.useProgram(\"clippingMask\");i.uniformMatrix4fv(l.uniforms.u_matrix,!1,a.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,this.tileExtentBuffer.length);}},Li.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Gt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},Li.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){return new Wt([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0])}return\"opaque\"===this.renderPass?Wt.unblended:Wt.alphaBlended},Li.prototype.depthModeForSublayer=function(t,e,i){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,o=n-1+this.depthRange;return new $t(i||this.context.gl.LEQUAL,e,[o,n])},Li.prototype.render=function(e,i){var n=this;for(var o in this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(r.now()),e.sourceCaches){var a=n.style.sourceCaches[o];a.used&&a.prepare(n.context);}var s=this.style._order,l=t.filterObject(this.style.sourceCaches,function(t){return\"raster\"===t.getSource().type||\"raster-dem\"===t.getSource().type}),c=function(e){var i=l[e];!function(e,i){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),o=0;o<n.length;o++){var r={},a=n[o],s=n.slice(o+1);si(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),r),a.setMask(r,i);}}(i.getVisibleCoordinates().map(function(t){return i.getTile(t)}),n.context);};for(var u in l)c(u);this.renderPass=\"offscreen\";var h,p=[];this.depthRboNeedsClear=!0;for(var d=0;d<s.length;d++){var f=n.style._layers[s[d]];f.hasOffscreenPass()&&!f.isHidden(n.transform.zoom)&&(f.source!==(h&&h.id)&&(p=[],(h=n.style.sourceCaches[f.source])&&(p=h.getVisibleCoordinates()).reverse()),p.length&&n.renderLayer(n,h,f,p));}this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass=\"opaque\";var m,_=[];for(this.currentLayer=s.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var g=n.style._layers[s[n.currentLayer]];g.source!==(m&&m.id)&&(_=[],(m=n.style.sourceCaches[g.source])&&(n.clearStencil(),_=m.getVisibleCoordinates(),m.getSource().isTileClipped&&n._renderTileClippingMasks(_))),n.renderLayer(n,m,g,_);}this.renderPass=\"translucent\";var v,y=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<s.length;this.currentLayer++){var x=n.style._layers[s[n.currentLayer]];x.source!==(v&&v.id)&&(y=[],(v=n.style.sourceCaches[x.source])&&(n.clearStencil(),y=v.getVisibleCoordinates(),v.getSource().isTileClipped&&n._renderTileClippingMasks(y)),y.reverse()),n.renderLayer(n,v,x,y);}if(this.options.showTileBoundaries){var b=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];b&&Mi.debug(this,b,b.getVisibleCoordinates());}},Li.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height));},Li.prototype.renderLayer=function(t,e,i,n){i.isHidden(this.transform.zoom)||(\"background\"===i.type||n.length)&&(this.id=i.id,Mi[i.type](t,e,i,n));},Li.prototype.translatePosMatrix=function(e,i,n,o,r){if(!n[0]&&!n[1])return e;var a=r?\"map\"===o?this.transform.angle:0:\"viewport\"===o?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l];}var c=[r?n[0]:ze(i,n[0],this.transform.zoom),r?n[1]:ze(i,n[1],this.transform.zoom),0],u=new Float32Array(16);return t.mat4.translate(u,e,c),u},Li.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t];},Li.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},Li.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var i=\"\"+t+(e.cacheKey||\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[i]||(this.cache[i]=new ai(this.context,ri[t],e,this._showOverdrawInspector)),this.cache[i]},Li.prototype.useProgram=function(t,e){var i=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(i.program),i};var Oi=t.default$20.vec4,Fi=t.default$20.mat4,Ni=t.default$20.mat2,Ui=function(t,e,i){this.tileSize=512,this._renderWorldCopies=void 0===i||i,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new W(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={};},Zi={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Ui.prototype.clone=function(){var t=new Ui(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Zi.minZoom.get=function(){return this._minZoom},Zi.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t));},Zi.maxZoom.get=function(){return this._maxZoom},Zi.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t));},Zi.renderWorldCopies.get=function(){return this._renderWorldCopies},Zi.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t;},Zi.worldSize.get=function(){return this.tileSize*this.scale},Zi.centerPoint.get=function(){return this.size._div(2)},Zi.size.get=function(){return new t.default$1(this.width,this.height)},Zi.bearing.get=function(){return-this.angle/Math.PI*180},Zi.bearing.set=function(e){var i=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=Ni.create(),Ni.rotate(this.rotationMatrix,this.rotationMatrix,this.angle));},Zi.pitch.get=function(){return this._pitch/Math.PI*180},Zi.pitch.set=function(e){var i=t.clamp(e,0,60)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices());},Zi.fov.get=function(){return this._fov/Math.PI*180},Zi.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices());},Zi.zoom.get=function(){return this._zoom},Zi.zoom.set=function(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._constrain(),this._calcMatrices());},Zi.center.get=function(){return this._center},Zi.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices());},Ui.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Ui.prototype.getVisibleUnwrappedCoordinates=function(e){var i=this.pointCoordinate(new t.default$1(0,0),0),n=this.pointCoordinate(new t.default$1(this.width,0),0),o=Math.floor(i.column),r=Math.floor(n.column),a=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=o;s<=r;s++)0!==s&&a.push(new t.UnwrappedTileID(s,e));return a},Ui.prototype.coveringTiles=function(e){var i=this.coveringZoomLevel(e),n=i;if(void 0!==e.minzoom&&i<e.minzoom)return[];void 0!==e.maxzoom&&i>e.maxzoom&&(i=e.maxzoom);var o=this.pointCoordinate(this.centerPoint,i),r=new t.default$1(o.column-.5,o.row-.5);return function(e,i,n,o){void 0===o&&(o=!0);var r=1<<e,a={};function s(i,s,l){var c,u,h,p;if(l>=0&&l<=r)for(c=i;c<s;c++)u=Math.floor(c/r),h=(c%r+r)%r,0!==u&&!0!==o||(p=new t.OverscaledTileID(n,u,e,h,l),a[p.key]=p);}return Bi(i[0],i[1],i[2],0,r,s),Bi(i[2],i[3],i[0],0,r,s),Object.keys(a).map(function(t){return a[t]})}(i,[this.pointCoordinate(new t.default$1(0,0),i),this.pointCoordinate(new t.default$1(this.width,0),i),this.pointCoordinate(new t.default$1(this.width,this.height),i),this.pointCoordinate(new t.default$1(0,this.height),i)],e.reparseOverscaled?n:i,this._renderWorldCopies).sort(function(t,e){return r.dist(t.canonical)-r.dist(e.canonical)})},Ui.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices();},Zi.unmodified.get=function(){return this._unmodified},Ui.prototype.zoomScale=function(t){return Math.pow(2,t)},Ui.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Ui.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Ui.prototype.unproject=function(t){return new W(this.xLng(t.x),this.yLat(t.y))},Zi.x.get=function(){return this.lngX(this.center.lng)},Zi.y.get=function(){return this.latY(this.center.lat)},Zi.point.get=function(){return new t.default$1(this.x,this.y)},Ui.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Ui.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Ui.prototype.xLng=function(t){return 360*t/this.worldSize-180},Ui.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Ui.prototype.setLocationAtPoint=function(t,e){var i=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(i)),this._renderWorldCopies&&(this.center=this.center.wrap());},Ui.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Ui.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Ui.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Ui.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new W(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Ui.prototype.pointCoordinate=function(e,i){void 0===i&&(i=this.tileZoom);var n=[e.x,e.y,0,1],o=[e.x,e.y,1,1];Oi.transformMat4(n,n,this.pixelMatrixInverse),Oi.transformMat4(o,o,this.pixelMatrixInverse);var r=n[3],a=o[3],s=n[0]/r,l=o[0]/a,c=n[1]/r,u=o[1]/a,h=n[2]/r,p=o[2]/a,d=h===p?0:(0-h)/(p-h);return new t.default$17(t.number(s,l,d)/this.tileSize,t.number(c,u,d)/this.tileSize,this.zoom)._zoomTo(i)},Ui.prototype.coordinatePoint=function(e){var i=e.zoomTo(this.zoom),n=[i.column*this.tileSize,i.row*this.tileSize,0,1];return Oi.transformMat4(n,n,this.pixelMatrix),new t.default$1(n[0]/n[3],n[1]/n[3])},Ui.prototype.calculatePosMatrix=function(e,i){void 0===i&&(i=!1);var n=e.key,o=i?this._alignedPosMatrixCache:this._posMatrixCache;if(o[n])return o[n];var r=e.canonical,a=this.worldSize/this.zoomScale(r.z),s=r.x+Math.pow(2,r.z)*e.wrap,l=Fi.identity(new Float64Array(16));return Fi.translate(l,l,[s*a,r.y*a,0]),Fi.scale(l,l,[a/t.default$8,a/t.default$8,1]),Fi.multiply(l,i?this.alignedProjMatrix:this.projMatrix,l),o[n]=new Float32Array(l),o[n]},Ui.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,i,n,o,r=-90,a=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var h=this.latRange;r=this.latY(h[1]),e=(a=this.latY(h[0]))-r<c.y?c.y/(a-r):0;}if(this.lngRange){var p=this.lngRange;s=this.lngX(p[0]),i=(l=this.lngX(p[1]))-s<c.x?c.x/(l-s):0;}var d=Math.max(i||0,e||0);if(d)return this.center=this.unproject(new t.default$1(i?(l+s)/2:this.x,e?(a+r)/2:this.y)),this.zoom+=this.scaleZoom(d),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var f=this.y,m=c.y/2;f-m<r&&(o=r+m),f+m>a&&(o=a-m);}if(this.lngRange){var _=this.x,g=c.x/2;_-g<s&&(n=s+g),_+g>l&&(n=l-g);}void 0===n&&void 0===o||(this.center=this.unproject(new t.default$1(void 0!==n?n:this.x,void 0!==o?o:this.y))),this._unmodified=u,this._constraining=!1;}},Ui.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,i=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=this.x,o=this.y,r=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),a=new Float64Array(16);Fi.perspective(a,this._fov,this.width/this.height,1,r),Fi.scale(a,a,[1,-1,1]),Fi.translate(a,a,[0,0,-this.cameraToCenterDistance]),Fi.rotateX(a,a,this._pitch),Fi.rotateZ(a,a,this.angle),Fi.translate(a,a,[-n,-o,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Fi.scale(a,a,[1,1,s,1]),this.projMatrix=a;var l=this.width%2/2,c=this.height%2/2,u=Math.cos(this.angle),h=Math.sin(this.angle),p=n-Math.round(n)+u*l+h*c,d=o-Math.round(o)+u*c+h*l,f=new Float64Array(a);if(Fi.translate(f,f,[p>.5?p-1:p,d>.5?d-1:d,0]),this.alignedProjMatrix=f,a=Fi.create(),Fi.scale(a,a,[this.width/2,-this.height/2,1]),Fi.translate(a,a,[1,-1,0]),this.pixelMatrix=Fi.multiply(new Float64Array(16),a,this.projMatrix),!(a=Fi.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=a,this._posMatrixCache={},this._alignedPosMatrixCache={};}},Ui.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),i=[e.column*this.tileSize,e.row*this.tileSize,0,1];return Oi.transformMat4(i,i,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Ui.prototype,Zi);var Vi=function(){var e,i,n,o,r;t.bindAll([\"_onHashChange\",\"_updateHash\"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),i=300,n=!1,o=0,r=function(){o=0,n&&(e(),o=setTimeout(r,i),n=!1);},function(){return n=!0,o||r(),o});};Vi.prototype.addTo=function(e){return this._map=e,t.default.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Vi.prototype.remove=function(){return t.default.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Vi.prototype.getHashString=function(t){var e=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,n=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,n),r=Math.round(e.lng*o)/o,a=Math.round(e.lat*o)/o,s=this._map.getBearing(),l=this._map.getPitch(),c=\"\";return c+=t?\"#/\"+r+\"/\"+a+\"/\"+i:\"#\"+i+\"/\"+a+\"/\"+r,(s||l)&&(c+=\"/\"+Math.round(10*s)/10),l&&(c+=\"/\"+Math.round(l)),c},Vi.prototype._onHashChange=function(){var e=t.default.location.hash.replace(\"#\",\"\").split(\"/\");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},Vi.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,\"\",e);};var ji=function(e){function i(i,n,o,r){void 0===r&&(r={});var a=s.mousePos(n.getCanvasContainer(),o),l=n.unproject(a);e.call(this,i,t.extend({point:a,lngLat:l,originalEvent:o},r)),this._defaultPrevented=!1,this.target=n;}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0;},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),$i=function(e){function i(i,n,o){var r=s.touchPos(n.getCanvasContainer(),o),a=r.map(function(t){return n.unproject(t)}),l=r.reduce(function(t,e,i,n){return t.add(e.div(n.length))},new t.default$1(0,0)),c=n.unproject(l);e.call(this,i,{points:r,point:l,lngLats:a,lngLat:c,originalEvent:o}),this._defaultPrevented=!1;}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0;},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Gi=function(t){function e(e,i,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1;}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0;},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,i),e}(t.Event),Wi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this);};Wi.prototype.isEnabled=function(){return!!this._enabled},Wi.prototype.isActive=function(){return!!this._active},Wi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around);},Wi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1);},Wi.prototype.onWheel=function(e){if(this.isEnabled()){var i=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=r.now(),o=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==i&&i%4.000244140625==0?this._type=\"wheel\":0!==i&&Math.abs(i)<4?this._type=\"trackpad\":o>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(o*i)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this.isActive()||this._start(e)),e.preventDefault();}},Wi.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this.isActive()||this._start(t);},Wi.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event(\"movestart\",{originalEvent:e})),this._map.fire(new t.Event(\"zoomstart\",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var i=s.mousePos(this._el,e);this._around=W.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame));}},Wi.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var i=this._map.transform;if(0!==this._delta){var n=\"wheel\"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,o=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==o&&(o=1/o);var a=\"number\"==typeof this._targetZoom?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(a*o))),\"wheel\"===this._type&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0;}var s=!1;if(\"wheel\"===this._type){var l=Math.min((r.now()-this._lastWheelEventTime)/200,1),c=this._easing(l);i.zoom=t.number(this._startZoom,this._targetZoom,c),l<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):s=!0;}else i.zoom=this._targetZoom,s=!0;i.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(\"move\",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(\"zoom\",{originalEvent:this._lastWheelEvent})),s&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event(\"zoomend\",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(\"moveend\",{originalEvent:e._lastWheelEvent})),delete e._targetZoom;},200));}},Wi.prototype._smoothOutEasing=function(e){var i=t.ease;if(this._prevEase){var n=this._prevEase,o=(r.now()-n.start)/n.duration,a=n.easing(o+.01)-n.easing(o),s=.27/Math.sqrt(a*a+1e-4)*.01,l=Math.sqrt(.0729-s*s);i=t.bezier(s,l,.25,1);}return this._prevEase={start:r.now(),duration:e,easing:i},i};var qi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll([\"_onMouseMove\",\"_onMouseUp\",\"_onKeyDown\"],this);};qi.prototype.isEnabled=function(){return!!this._enabled},qi.prototype.isActive=function(){return!!this._active},qi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0);},qi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1);},qi.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.default.document.addEventListener(\"mousemove\",this._onMouseMove,!1),t.default.document.addEventListener(\"keydown\",this._onKeyDown,!1),t.default.document.addEventListener(\"mouseup\",this._onMouseUp,!1),s.disableDrag(),this._startPos=s.mousePos(this._el,e),this._active=!0);},qi.prototype._onMouseMove=function(t){var e=this._startPos,i=s.mousePos(this._el,t);this._box||(this._box=s.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",t));var n=Math.min(e.x,i.x),o=Math.max(e.x,i.x),r=Math.min(e.y,i.y),a=Math.max(e.y,i.y);s.setTransform(this._box,\"translate(\"+n+\"px,\"+r+\"px)\"),this._box.style.width=o-n+\"px\",this._box.style.height=a-r+\"px\";},qi.prototype._onMouseUp=function(e){if(0===e.button){var i=this._startPos,n=s.mousePos(this._el,e),o=(new q).extend(this._map.unproject(i)).extend(this._map.unproject(n));this._finish(),s.suppressClick(),i.x===n.x&&i.y===n.y?this._fireEvent(\"boxzoomcancel\",e):this._map.fitBounds(o,{linear:!0}).fire(new t.Event(\"boxzoomend\",{originalEvent:e,boxZoomBounds:o}));}},qi.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent(\"boxzoomcancel\",t));},qi.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener(\"mousemove\",this._onMouseMove,!1),t.default.document.removeEventListener(\"keydown\",this._onKeyDown,!1),t.default.document.removeEventListener(\"mouseup\",this._onMouseUp,!1),this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(s.remove(this._box),this._box=null),s.enableDrag();},qi.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,{originalEvent:i}))};var Xi=t.bezier(0,0,.25,1),Hi=function(e,i){this._map=e,this._el=i.element||e.getCanvasContainer(),this._state=\"disabled\",this._button=i.button||\"right\",this._bearingSnap=i.bearingSnap||0,this._pitchWithRotate=!1!==i.pitchWithRotate,t.bindAll([\"_onMouseMove\",\"_onMouseUp\",\"_onBlur\",\"_onDragFrame\"],this);};Hi.prototype.isEnabled=function(){return\"disabled\"!==this._state},Hi.prototype.isActive=function(){return\"active\"===this._state},Hi.prototype.enable=function(){this.isEnabled()||(this._state=\"enabled\");},Hi.prototype.disable=function(){if(this.isEnabled())switch(this._state){case\"active\":this._state=\"disabled\",this._unbind(),this._deactivate(),this._fireEvent(\"rotateend\"),this._pitchWithRotate&&this._fireEvent(\"pitchend\"),this._fireEvent(\"moveend\");break;case\"pending\":this._state=\"disabled\",this._unbind();break;default:this._state=\"disabled\";}},Hi.prototype.onMouseDown=function(e){if(\"enabled\"===this._state){if(\"right\"===this._button){if(this._eventButton=s.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==s.mouseButton(e))return;this._eventButton=0;}s.disableDrag(),t.default.document.addEventListener(\"mousemove\",this._onMouseMove,{capture:!0}),t.default.document.addEventListener(\"mouseup\",this._onMouseUp),t.default.addEventListener(\"blur\",this._onBlur),this._state=\"pending\",this._inertia=[[r.now(),this._map.getBearing()]],this._previousPos=s.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault();}},Hi.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=s.mousePos(this._el,t),\"pending\"===this._state&&(this._state=\"active\",this._fireEvent(\"rotatestart\",t),this._fireEvent(\"movestart\",t),this._pitchWithRotate&&this._fireEvent(\"pitchstart\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame));},Hi.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,i=this._previousPos,n=this._pos,o=.8*(i.x-n.x),a=-.5*(i.y-n.y),s=e.bearing-o,l=e.pitch-a,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([r.now(),this._map._normalizeBearing(s,u[1])]),e.bearing=s,this._pitchWithRotate&&(this._fireEvent(\"pitch\",t),e.pitch=l),this._fireEvent(\"rotate\",t),this._fireEvent(\"move\",t),delete this._lastMoveEvent,this._previousPos=this._pos;}},Hi.prototype._onMouseUp=function(t){if(s.mouseButton(t)===this._eventButton)switch(this._state){case\"active\":this._state=\"enabled\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case\"pending\":this._state=\"enabled\",this._unbind();}},Hi.prototype._onBlur=function(t){switch(this._state){case\"active\":this._state=\"enabled\",this._unbind(),this._deactivate(),this._fireEvent(\"rotateend\",t),this._pitchWithRotate&&this._fireEvent(\"pitchend\",t),this._fireEvent(\"moveend\",t);break;case\"pending\":this._state=\"enabled\",this._unbind();}},Hi.prototype._unbind=function(){t.default.document.removeEventListener(\"mousemove\",this._onMouseMove,{capture:!0}),t.default.document.removeEventListener(\"mouseup\",this._onMouseUp),t.default.removeEventListener(\"blur\",this._onBlur),s.enableDrag();},Hi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos;},Hi.prototype._inertialRotate=function(t){var e=this;this._fireEvent(\"rotateend\",t),this._drainInertiaBuffer();var i=this._map,n=i.getBearing(),o=this._inertia,r=function(){Math.abs(n)<e._bearingSnap?i.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(\"moveend\",t),e._pitchWithRotate&&e._fireEvent(\"pitchend\",t);};if(o.length<2)r();else{var a=o[0],s=o[o.length-1],l=o[o.length-2],c=i._normalizeBearing(n,l[1]),u=s[1]-a[1],h=u<0?-1:1,p=(s[0]-a[0])/1e3;if(0!==u&&0!==p){var d=Math.abs(u*(.25/p));d>180&&(d=180);var f=d/180;c+=h*d*(f/2),Math.abs(i._normalizeBearing(c,0))<this._bearingSnap&&(c=i._normalizeBearing(0,c)),i.rotateTo(c,{duration:1e3*f,easing:Xi,noMoveStart:!0},{originalEvent:t});}else r();}},Hi.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,i?{originalEvent:i}:{}))},Hi.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=r.now();t.length>0&&e-t[0][0]>160;)t.shift();};var Ki=t.bezier(0,0,.3,1),Yi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state=\"disabled\",t.bindAll([\"_onMove\",\"_onMouseUp\",\"_onTouchEnd\",\"_onBlur\",\"_onDragFrame\"],this);};Yi.prototype.isEnabled=function(){return\"disabled\"!==this._state},Yi.prototype.isActive=function(){return\"active\"===this._state},Yi.prototype.enable=function(){this.isEnabled()||(this._el.classList.add(\"mapboxgl-touch-drag-pan\"),this._state=\"enabled\");},Yi.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(\"mapboxgl-touch-drag-pan\"),this._state){case\"active\":this._state=\"disabled\",this._unbind(),this._deactivate(),this._fireEvent(\"dragend\"),this._fireEvent(\"moveend\");break;case\"pending\":this._state=\"disabled\",this._unbind();break;default:this._state=\"disabled\";}},Yi.prototype.onMouseDown=function(e){\"enabled\"===this._state&&(e.ctrlKey||0!==s.mouseButton(e)||(s.addEventListener(t.default.document,\"mousemove\",this._onMove,{capture:!0}),s.addEventListener(t.default.document,\"mouseup\",this._onMouseUp),this._start(e)));},Yi.prototype.onTouchStart=function(e){\"enabled\"===this._state&&(e.touches.length>1||(s.addEventListener(t.default.document,\"touchmove\",this._onMove,{capture:!0,passive:!1}),s.addEventListener(t.default.document,\"touchend\",this._onTouchEnd),this._start(e)));},Yi.prototype._start=function(e){t.default.addEventListener(\"blur\",this._onBlur),this._state=\"pending\",this._previousPos=s.mousePos(this._el,e),this._inertia=[[r.now(),this._previousPos]];},Yi.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=s.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([r.now(),this._pos]),\"pending\"===this._state&&(this._state=\"active\",this._fireEvent(\"dragstart\",t),this._fireEvent(\"movestart\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame));},Yi.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent(\"drag\",t),this._fireEvent(\"move\",t),this._previousPos=this._pos,delete this._lastMoveEvent;}},Yi.prototype._onMouseUp=function(t){if(0===s.mouseButton(t))switch(this._state){case\"active\":this._state=\"enabled\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case\"pending\":this._state=\"enabled\",this._unbind();}},Yi.prototype._onTouchEnd=function(t){switch(this._state){case\"active\":this._state=\"enabled\",this._unbind(),this._deactivate(),this._inertialPan(t);break;case\"pending\":this._state=\"enabled\",this._unbind();}},Yi.prototype._onBlur=function(t){switch(this._state){case\"active\":this._state=\"enabled\",this._unbind(),this._deactivate(),this._fireEvent(\"dragend\",t),this._fireEvent(\"moveend\",t);break;case\"pending\":this._state=\"enabled\",this._unbind();}},Yi.prototype._unbind=function(){s.removeEventListener(t.default.document,\"touchmove\",this._onMove,{capture:!0,passive:!1}),s.removeEventListener(t.default.document,\"touchend\",this._onTouchEnd),s.removeEventListener(t.default.document,\"mousemove\",this._onMove,{capture:!0}),s.removeEventListener(t.default.document,\"mouseup\",this._onMouseUp),s.removeEventListener(t.default,\"blur\",this._onBlur);},Yi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos;},Yi.prototype._inertialPan=function(t){this._fireEvent(\"dragend\",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent(\"moveend\",t);else{var i=e[e.length-1],n=e[0],o=i[1].sub(n[1]),r=(i[0]-n[0])/1e3;if(0===r||i[1].equals(n[1]))this._fireEvent(\"moveend\",t);else{var a=o.mult(.3/r),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var l=s/750,c=a.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:Ki,noMoveStart:!0},{originalEvent:t});}}},Yi.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,i?{originalEvent:i}:{}))},Yi.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=r.now();t.length>0&&e-t[0][0]>160;)t.shift();};var Ji=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\"_onKeyDown\"],this);};function Qi(t){return t*(2-t)}Ji.prototype.isEnabled=function(){return!!this._enabled},Ji.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"keydown\",this._onKeyDown,!1),this._enabled=!0);},Ji.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"keydown\",this._onKeyDown),this._enabled=!1);},Ji.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,i=0,n=0,o=0,r=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?i=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?i=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),r=-1);break;case 40:t.shiftKey?n=-1:(r=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),l={duration:300,delayEndEvents:500,easing:Qi,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*i,pitch:a.getPitch()+10*n,offset:[100*-o,100*-r],center:a.getCenter()};a.easeTo(l,{originalEvent:t});}};var tn=function(e){this._map=e,t.bindAll([\"_onDblClick\",\"_onZoomEnd\"],this);};tn.prototype.isEnabled=function(){return!!this._enabled},tn.prototype.isActive=function(){return!!this._active},tn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0);},tn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1);},tn.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null;},300)));},tn.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t));},tn.prototype._zoom=function(t){this._active=!0,this._map.on(\"zoomend\",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t);},tn.prototype._onZoomEnd=function(){this._active=!1,this._map.off(\"zoomend\",this._onZoomEnd);};var en=t.bezier(0,0,.15,1),nn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\"_onMove\",\"_onEnd\",\"_onTouchFrame\"],this);};nn.prototype.isEnabled=function(){return!!this._enabled},nn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add(\"mapboxgl-touch-zoom-rotate\"),this._enabled=!0,this._aroundCenter=!!t&&\"center\"===t.around);},nn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\"),this._enabled=!1);},nn.prototype.disableRotation=function(){this._rotationDisabled=!0;},nn.prototype.enableRotation=function(){this._rotationDisabled=!1;},nn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var i=s.mousePos(this._el,e.touches[0]),n=s.mousePos(this._el,e.touches[1]);this._startVec=i.sub(n),this._gestureIntent=void 0,this._inertia=[],s.addEventListener(t.default.document,\"touchmove\",this._onMove,{passive:!1}),s.addEventListener(t.default.document,\"touchend\",this._onEnd);}},nn.prototype._getTouchEventData=function(t){var e=s.mousePos(this._el,t.touches[0]),i=s.mousePos(this._el,t.touches[1]),n=e.sub(i);return{vec:n,center:e.add(i).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},nn.prototype._onMove=function(e){if(2===e.touches.length){var i=this._getTouchEventData(e),n=i.vec,o=i.scale,r=i.bearing;if(!this._gestureIntent){var a=Math.abs(1-o)>.15;Math.abs(r)>10?this._gestureIntent=\"rotate\":a&&(this._gestureIntent=\"zoom\"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+\"start\",{originalEvent:e})),this._map.fire(new t.Event(\"movestart\",{originalEvent:e})),this._startVec=n);}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault();}},nn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var i=this._map.transform;this._startScale||(this._startScale=i.scale,this._startBearing=i.bearing);var n=this._getTouchEventData(this._lastTouchEvent),o=n.center,a=n.bearing,s=n.scale,l=i.pointLocation(o),c=i.locationPoint(l);\"rotate\"===e&&(i.bearing=this._startBearing+a),i.zoom=i.scaleZoom(this._startScale*s),i.setLocationAtPoint(l,c),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event(\"move\",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([r.now(),s,o]);}},nn.prototype._onEnd=function(e){s.removeEventListener(t.default.document,\"touchmove\",this._onMove,{passive:!1}),s.removeEventListener(t.default.document,\"touchend\",this._onEnd);var i=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,i){this._map.fire(new t.Event(i+\"end\",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,r=this._map;if(o.length<2)r.snapToNorth({},{originalEvent:e});else{var a=o[o.length-1],l=o[0],c=r.transform.scaleZoom(n*a[1]),u=r.transform.scaleZoom(n*l[1]),h=c-u,p=(a[0]-l[0])/1e3,d=a[2];if(0!==p&&c!==u){var f=.15*h/p;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var m=1e3*Math.abs(f/(12*.15)),_=c+f*m/2e3;_<0&&(_=0),r.easeTo({zoom:_,duration:m,easing:en,around:this._aroundCenter?r.getCenter():r.unproject(d),noMoveStart:!0},{originalEvent:e});}else r.snapToNorth({},{originalEvent:e});}}},nn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=r.now();t.length>2&&e-t[0][0]>160;)t.shift();};var on={scrollZoom:Wi,boxZoom:qi,dragRotate:Hi,dragPan:Yi,keyboard:Ji,doubleClickZoom:tn,touchZoomRotate:nn};var rn=function(e){function i(i,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=n.bearingSnap,t.bindAll([\"_renderFrameCallback\"],this);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return this.transform.center},i.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},i.prototype.panBy=function(e,i,n){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},i),n)},i.prototype.panTo=function(e,i,n){return this.easeTo(t.extend({center:e},i),n)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},i.prototype.zoomTo=function(e,i,n){return this.easeTo(t.extend({zoom:e},i),n)},i.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},i.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},i.prototype.rotateTo=function(e,i,n){return this.easeTo(t.extend({bearing:e},i),n)},i.prototype.resetNorth=function(e,i){return this.rotateTo(0,t.extend({duration:1e3},e),i),this},i.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},i.prototype.getPitch=function(){return this.transform.pitch},i.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},i.prototype.fitBounds=function(e,i,n){if(\"number\"==typeof(i=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var o=i.padding;i.padding={top:o,bottom:o,right:o,left:o};}if(!t.default$10(Object.keys(i.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),[\"bottom\",\"left\",\"right\",\"top\"]))return t.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\"),this;e=q.convert(e);var r=[(i.padding.left-i.padding.right)/2,(i.padding.top-i.padding.bottom)/2],a=Math.min(i.padding.right,i.padding.left),s=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+r[0],i.offset[1]+r[1]];var l=t.default$1.convert(i.offset),c=this.transform,u=c.project(e.getNorthWest()),h=c.project(e.getSouthEast()),p=h.sub(u),d=(c.width-2*a-2*Math.abs(l.x))/p.x,f=(c.height-2*s-2*Math.abs(l.y))/p.y;return f<0||d<0?(t.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\"),this):(i.center=c.unproject(u.add(h).div(2)),i.zoom=Math.min(c.scaleZoom(c.scale*Math.min(d,f)),i.maxZoom),i.bearing=0,i.linear?this.easeTo(i,n):this.flyTo(i,n))},i.prototype.jumpTo=function(e,i){this.stop();var n=this.transform,o=!1,r=!1,a=!1;return\"zoom\"in e&&n.zoom!==+e.zoom&&(o=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=W.convert(e.center)),\"bearing\"in e&&n.bearing!==+e.bearing&&(r=!0,n.bearing=+e.bearing),\"pitch\"in e&&n.pitch!==+e.pitch&&(a=!0,n.pitch=+e.pitch),this.fire(new t.Event(\"movestart\",i)).fire(new t.Event(\"move\",i)),o&&this.fire(new t.Event(\"zoomstart\",i)).fire(new t.Event(\"zoom\",i)).fire(new t.Event(\"zoomend\",i)),r&&this.fire(new t.Event(\"rotatestart\",i)).fire(new t.Event(\"rotate\",i)).fire(new t.Event(\"rotateend\",i)),a&&this.fire(new t.Event(\"pitchstart\",i)).fire(new t.Event(\"pitch\",i)).fire(new t.Event(\"pitchend\",i)),this.fire(new t.Event(\"moveend\",i))},i.prototype.easeTo=function(e,i){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var o=this.transform,r=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=\"zoom\"in e?+e.zoom:r,c=\"bearing\"in e?this._normalizeBearing(e.bearing,a):a,u=\"pitch\"in e?+e.pitch:s,h=o.centerPoint.add(t.default$1.convert(e.offset)),p=o.pointLocation(h),d=W.convert(e.center||p);this._normalizeCenter(d);var f,m,_=o.project(p),g=o.project(d).sub(_),v=o.zoomScale(l-r);return e.around&&(f=W.convert(e.around),m=o.locationPoint(f)),this._zooming=l!==r,this._rotating=a!==c,this._pitching=u!==s,this._prepareEase(i,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(o.zoom=t.number(r,l,e)),n._rotating&&(o.bearing=t.number(a,c,e)),n._pitching&&(o.pitch=t.number(s,u,e)),f)o.setLocationAtPoint(f,m);else{var p=o.zoomScale(o.zoom-r),d=l>r?Math.min(2,v):Math.max(.5,v),y=Math.pow(d,1-e),x=o.unproject(_.add(g.mult(e*y)).mult(p));o.setLocationAtPoint(o.renderWorldCopies?x.wrap():x,h);}n._fireMoveEvents(i);},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(i)},e.delayEndEvents):n._afterEase(i);},e),this},i.prototype._prepareEase=function(e,i){this._moving=!0,i||this.fire(new t.Event(\"movestart\",e)),this._zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&this.fire(new t.Event(\"pitchstart\",e));},i.prototype._fireMoveEvents=function(e){this.fire(new t.Event(\"move\",e)),this._zooming&&this.fire(new t.Event(\"zoom\",e)),this._rotating&&this.fire(new t.Event(\"rotate\",e)),this._pitching&&this.fire(new t.Event(\"pitch\",e));},i.prototype._afterEase=function(e){var i=this._zooming,n=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,i&&this.fire(new t.Event(\"zoomend\",e)),n&&this.fire(new t.Event(\"rotateend\",e)),o&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e));},i.prototype.flyTo=function(e,i){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,r=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=\"zoom\"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):r,c=\"bearing\"in e?this._normalizeBearing(e.bearing,a):a,u=\"pitch\"in e?+e.pitch:s,h=o.zoomScale(l-r),p=o.centerPoint.add(t.default$1.convert(e.offset)),d=o.pointLocation(p),f=W.convert(e.center||d);this._normalizeCenter(f);var m=o.project(d),_=o.project(f).sub(m),g=e.curve,v=Math.max(o.width,o.height),y=v/h,x=_.mag();if(\"minZoom\"in e){var b=t.clamp(Math.min(e.minZoom,r,l),o.minZoom,o.maxZoom),w=v/o.zoomScale(b-r);g=Math.sqrt(w/x*2);}var E=g*g;function T(t){var e=(y*y-v*v+(t?-1:1)*E*E*x*x)/(2*(t?y:v)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function I(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var S=T(0),z=function(t){return C(S)/C(S+g*t)},A=function(t){return v*((C(S)*(I(e=S+g*t)/C(e))-I(S))/E)/x;var e;},R=(T(1)-S)/g;if(Math.abs(x)<1e-6||!isFinite(R)){if(Math.abs(v-y)<1e-6)return this.easeTo(e,i);var D=y<v?-1:1;R=Math.abs(Math.log(y/v))/g,A=function(){return 0},z=function(t){return Math.exp(D*g*t)};}if(\"duration\"in e)e.duration=+e.duration;else{var M=\"screenSpeed\"in e?+e.screenSpeed/g:+e.speed;e.duration=1e3*R/M;}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==c,this._pitching=u!==s,this._prepareEase(i,!1),this._ease(function(e){var l=e*R,h=1/z(l);o.zoom=r+o.scaleZoom(h),n._rotating&&(o.bearing=t.number(a,c,e)),n._pitching&&(o.pitch=t.number(s,u,e));var d=o.unproject(m.add(_.mult(A(l))).mult(h));o.setLocationAtPoint(o.renderWorldCopies?d.wrap():d,p),n._fireMoveEvents(i);},function(){return n._afterEase(i)},e),this},i.prototype.isEasing=function(){return!!this._easeFrameId},i.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this);}return this},i.prototype._ease=function(t,e,i){!1===i.animate||0===i.duration?(t(1),e()):(this._easeStart=r.now(),this._easeOptions=i,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback));},i.prototype._renderFrameCallback=function(){var t=Math.min((r.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop();},i.prototype._normalizeBearing=function(e,i){e=t.wrap(e,-180,180);var n=Math.abs(e-i);return Math.abs(e-360-i)<n&&(e-=360),Math.abs(e+360-i)<n&&(e+=360),e},i.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var i=t.lng-e.center.lng;t.lng+=i>180?-360:i<-180?360:0;}},i}(t.Evented),an=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this);};an.prototype.getDefaultPosition=function(){return\"bottom-right\"},an.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=s.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"moveend\",this._updateEditLink),void 0===e&&(this._map.on(\"resize\",this._updateCompact),this._updateCompact()),this._container},an.prototype.onRemove=function(){s.remove(this._container),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0;},an.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var e=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:_.ACCESS_TOKEN}];if(t){var i=e.reduce(function(t,i,n){return i.value&&(t+=i.key+\"=\"+i.value+(n<e.length-1?\"&\":\"\")),t},\"?\");t.href=\"https://www.mapbox.com/feedback/\"+i+(this._map._hash?this._map._hash.getHashString(!0):\"\");}},an.prototype._updateData=function(t){t&&\"metadata\"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink());},an.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id;}var i=this._map.style.sourceCaches;for(var n in i){var o=i[n].getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution);}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,i){for(var n=i+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0})).length?(this._container.innerHTML=t.join(\" | \"),this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null;}},an.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\");};var sn=function(){t.bindAll([\"_updateLogo\"],this);};sn.prototype.onAdd=function(t){this._map=t,this._container=s.create(\"div\",\"mapboxgl-ctrl\");var e=s.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",\"Mapbox logo\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._container},sn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo);},sn.prototype.getDefaultPosition=function(){return\"bottom-left\"},sn.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\");},sn.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t){if(t[e].getSource().mapbox_logo)return!0}return!1}};var ln=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1;};ln.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},ln.prototype.remove=function(t){for(var e=this._currentlyRunning,i=0,n=e?this._queue.concat(e):this._queue;i<n.length;i+=1){var o=n[i];if(o.id===t)return void(o.cancelled=!0)}},ln.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(!n.cancelled&&(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1;},ln.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[];};var cn=t.default.HTMLImageElement,un=t.default.HTMLElement,hn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,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,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},pn=function(i){function n(e){if(null!=(e=t.extend({},hn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than minZoom\");var n=new Ui(e.minZoom,e.maxZoom,e.renderWorldCopies);i.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new ln;var o=e.transformRequest;if(this._transformRequest=o?function(t,e){return o(t,e)||{url:t}}:function(t){return{url:t}},\"string\"==typeof e.container){var r=t.default.document.getElementById(e.container);if(!r)throw new Error(\"Container '\"+e.container+\"' not found.\");this._container=r;}else{if(!(e.container instanceof un))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container;}e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\",\"_update\",\"_render\",\"_onData\",\"_onDataLoading\"],this),this._setupContainer(),this._setupPainter(),this.on(\"move\",this._update.bind(this,!1)),this.on(\"zoom\",this._update.bind(this,!0)),void 0!==t.default&&(t.default.addEventListener(\"online\",this._onWindowOnline,!1),t.default.addEventListener(\"resize\",this._onWindowResize,!1)),function(t,e){var i=t.getCanvasContainer(),n=null,o=!1;for(var r in on)t[r]=new on[r](t,e),e.interactive&&e[r]&&t[r].enable(e[r]);s.addEventListener(i,\"mouseout\",function(e){t.fire(new ji(\"mouseout\",t,e));}),s.addEventListener(i,\"mousedown\",function(i){o=!0;var n=new ji(\"mousedown\",t,i);t.fire(n),n.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(i),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(i),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(i));}),s.addEventListener(i,\"mouseup\",function(e){var i=t.dragRotate.isActive();n&&!i&&t.fire(new ji(\"contextmenu\",t,n)),n=null,o=!1,t.fire(new ji(\"mouseup\",t,e));}),s.addEventListener(i,\"mousemove\",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var n=e.toElement||e.target;n&&n!==i;)n=n.parentNode;n===i&&t.fire(new ji(\"mousemove\",t,e));}}),s.addEventListener(i,\"mouseover\",function(e){for(var n=e.toElement||e.target;n&&n!==i;)n=n.parentNode;n===i&&t.fire(new ji(\"mouseover\",t,e));}),s.addEventListener(i,\"touchstart\",function(i){var n=new $i(\"touchstart\",t,i);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(i),t.touchZoomRotate.onStart(i),t.doubleClickZoom.onTouchStart(n));},{passive:!1}),s.addEventListener(i,\"touchmove\",function(e){t.fire(new $i(\"touchmove\",t,e));},{passive:!1}),s.addEventListener(i,\"touchend\",function(e){t.fire(new $i(\"touchend\",t,e));}),s.addEventListener(i,\"touchcancel\",function(e){t.fire(new $i(\"touchcancel\",t,e));}),s.addEventListener(i,\"click\",function(e){t.fire(new ji(\"click\",t,e));}),s.addEventListener(i,\"dblclick\",function(e){var i=new ji(\"dblclick\",t,e);t.fire(i),i.defaultPrevented||t.doubleClickZoom.onDblClick(i);}),s.addEventListener(i,\"contextmenu\",function(e){var i=t.dragRotate.isActive();o||i?o&&(n=e):t.fire(new ji(\"contextmenu\",t,e)),e.preventDefault();}),s.addEventListener(i,\"wheel\",function(e){var i=new Gi(\"wheel\",t,e);t.fire(i),i.defaultPrevented||t.scrollZoom.onWheel(e);},{passive:!1});}(this,e),this._hash=e.hash&&(new Vi).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new an),this.addControl(new sn,e.logoPosition),this.on(\"style.load\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet);}),this.on(\"data\",this._onData),this.on(\"dataloading\",this._onDataLoading);}i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\"top-right\");var i=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf(\"bottom\")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var i=this._containerDimensions(),n=i[0],o=i[1];return this._resizeCanvas(n,o),this.transform.resize(n,o),this.painter.resize(n,o),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e)).fire(new t.Event(\"resize\",e)).fire(new t.Event(\"moveend\",e))},n.prototype.getBounds=function(){var e=new q(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new q([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=q.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update();}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==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\")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(W.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,n){var o,r=this;if(void 0===n)return i.prototype.on.call(this,t,e);var a=function(){if(\"mouseenter\"===t||\"mouseover\"===t){var i=!1;return{layer:e,listener:n,delegates:{mousemove:function(o){var a=r.getLayer(e)?r.queryRenderedFeatures(o.point,{layers:[e]}):[];a.length?i||(i=!0,n.call(r,new ji(t,r,o.originalEvent,{features:a}))):i=!1;},mouseout:function(){i=!1;}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var a=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){(r.getLayer(e)?r.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,n.call(r,new ji(t,r,i.originalEvent)));},mouseout:function(e){a&&(a=!1,n.call(r,new ji(t,r,e.originalEvent)));}}}}return{layer:e,listener:n,delegates:(o={},o[t]=function(t){var i=r.getLayer(e)?r.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,n.call(r,t),delete t.features);},o)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)r.on(s,a.delegates[s]);return this},n.prototype.off=function(t,e,n){if(void 0===n)return i.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var o=this._delegatedListeners[t],r=0;r<o.length;r++){var a=o[r];if(a.layer===e&&a.listener===n){for(var s in a.delegates)this.off(s,a.delegates[s]);return o.splice(r,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,i){var n;return 2===arguments.length?(e=arguments[0],i=arguments[1]):1===arguments.length&&((n=arguments[0])instanceof t.default$1||Array.isArray(n))?(e=arguments[0],i={}):1===arguments.length?(e=void 0,i=arguments[0]):(e=void 0,i={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),i,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var i,n=this;if(void 0===e&&(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||\"number\"==typeof e[0]){i=[t.default$1.convert(e)];}else{var o=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];i=[o[0],new t.default$1(o[1].x,o[0].y),o[1],new t.default$1(o[0].x,o[1].y),o[0]];}return{viewport:i,worldCoordinate:i.map(function(t){return n.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,i){if((!i||!1!==i.diff&&!i.localIdeographFontFamily)&&this.style&&e&&\"object\"==typeof e)try{return this.style.setState(e)&&this._update(!0),this}catch(e){t.warnOnce(\"Unable to perform style diff: \"+(e.message||e.error||e)+\".  Rebuilding the style from scratch.\");}return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Qe(this,i||{}),this.style.setEventedParent(this,{style:this.style}),\"string\"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(\"There is no style added to the map.\")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var i=this.style&&this.style.sourceCaches[e];if(void 0!==i)return i.loaded();this.fire(new t.ErrorEvent(new Error(\"There is no source with ID '\"+e+\"'\")));},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var i=t[e]._tiles;for(var n in i){var o=i[n];if(\"loaded\"!==o.state&&\"errored\"!==o.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,i){return this.style.addSourceType(t,e,i)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,i,n){void 0===n&&(n={});var o=n.pixelRatio;void 0===o&&(o=1);var a=n.sdf;if(void 0===a&&(a=!1),i instanceof cn){var s=r.getImageData(i),l=s.width,c=s.height,u=s.data;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:o,sdf:a});}else{if(void 0===i.width||void 0===i.height)return this.fire(new t.ErrorEvent(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));var h=i.width,p=i.height,d=i.data;this.style.addImage(e,{data:new t.RGBAImage({width:h,height:p},d.slice(0)),pixelRatio:o,sdf:a});}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(\"Missing required image id\"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t);},n.prototype.loadImage=function(e,i){t.getImage(this._transformRequest(e,t.ResourceType.Image),i);},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,i){return this.style.setPaintProperty(t,e,i),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,i){return this.style.setLayoutProperty(t,e,i),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\"),(this._missingCSSContainer=s.create(\"div\",\"mapboxgl-missing-css\",t)).innerHTML=\"Missing Mapbox GL JS CSS\";var e=this._canvasContainer=s.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=s.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.style.position=\"absolute\",this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",\"0\"),this._canvas.setAttribute(\"aria-label\",\"Map\");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=s.create(\"div\",\"mapboxgl-control-container\",t),o=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){o[t]=s.create(\"div\",\"mapboxgl-ctrl-\"+t,n);});},n.prototype._resizeCanvas=function(e,i){var n=t.default.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*i,this._canvas.style.width=e+\"px\",this._canvas.style.height=i+\"px\";},n.prototype._setupPainter=function(){var i=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext(\"webgl\",i)||this._canvas.getContext(\"experimental-webgl\",i);n?this.painter=new Li(n,this.transform):this.fire(new t.ErrorEvent(new Error(\"Failed to initialize WebGL\")));},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&&(r.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event(\"webglcontextlost\",{originalEvent:e}));},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(\"webglcontextrestored\",{originalEvent:e}));},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender());},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t);},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var i=this.transform.zoom,n=r.now();this.style.zoomHistory.update(i,n);var o=new t.default$16(i,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),a=o.crossFadingFactor();1===a&&a===this._crossFadingFactor||(e=!0,this._crossFadingFactor=a),this.style.update(o);}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event(\"load\"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},n.prototype.remove=function(){this._hash&&this._hash.remove(),r.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&&(t.default.removeEventListener(\"resize\",this._onWindowResize,!1),t.default.removeEventListener(\"online\",this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");e&&e.loseContext(),dn(this._canvasContainer),dn(this._controlContainer),dn(this._missingCSSContainer),this._container.classList.remove(\"mapboxgl-map\"),this.fire(new t.Event(\"remove\"));},n.prototype._rerender=function(){var t=this;this.style&&!this._frameId&&(this._frameId=r.frame(function(){t._frameId=null,t._render();}));},n.prototype._onWindowOnline=function(){this._update();},n.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update();},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update());},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update());},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update());},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update();},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update();},n.prototype._onData=function(e){this._update(\"style\"===e.dataType),this.fire(new t.Event(e.dataType+\"data\",e));},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+\"dataloading\",e));},Object.defineProperties(n.prototype,o),n}(rn);function dn(t){t.parentNode&&t.parentNode.removeChild(t);}var fn={showCompass:!0,showZoom:!0},mn=function(e){var i=this;this.options=t.extend({},fn,e),this._container=s.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton(\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in\",\"Zoom In\",function(){return i._map.zoomIn()}),this._zoomOutButton=this._createButton(\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out\",\"Zoom Out\",function(){return i._map.zoomOut()})),this.options.showCompass&&(t.bindAll([\"_rotateCompassArrow\"],this),this._compass=this._createButton(\"mapboxgl-ctrl-icon mapboxgl-ctrl-compass\",\"Reset North\",function(){return i._map.resetNorth()}),this._compassArrow=s.create(\"span\",\"mapboxgl-ctrl-compass-arrow\",this._compass));};function _n(t,e,i){if(t=new W(t.lng,t.lat),e){var n=new W(t.lng-360,t.lat),o=new W(t.lng+360,t.lat),r=i.locationPoint(t).distSqr(e);i.locationPoint(n).distSqr(e)<r?t=n:i.locationPoint(o).distSqr(e)<r&&(t=o);}for(;Math.abs(t.lng-i.center.lng)>180;){var a=i.locationPoint(t);if(a.x>=0&&a.y>=0&&a.x<=i.width&&a.y<=i.height)break;t.lng>i.center.lng?t.lng-=360:t.lng+=360;}return t}mn.prototype._rotateCompassArrow=function(){var t=\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassArrow.style.transform=t;},mn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Hi(t,{button:\"left\",element:this._compass}),this._handler.enable()),this._container},mn.prototype.onRemove=function(){s.remove(this._container),this.options.showCompass&&(this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map;},mn.prototype._createButton=function(t,e,i){var n=s.create(\"button\",t,this._container);return n.type=\"button\",n.setAttribute(\"aria-label\",e),n.addEventListener(\"click\",i),n};var gn={center:\"translate(-50%,-50%)\",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%)\"};function vn(t,e,i){var n=t.classList;for(var o in gn)n.remove(\"mapboxgl-\"+i+\"-anchor-\"+o);n.add(\"mapboxgl-\"+i+\"-anchor-\"+e);}var yn=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&&(e=t.extend({element:e},arguments[1])),t.bindAll([\"_update\",\"_onMapClick\"],this),this._anchor=e&&e.anchor||\"center\",this._color=e&&e.color||\"#3FB1CE\",e&&e.element)this._element=e.element,this._offset=t.default$1.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=s.create(\"div\");var i=s.createNS(\"http://www.w3.org/2000/svg\",\"svg\");i.setAttributeNS(null,\"height\",\"41px\"),i.setAttributeNS(null,\"width\",\"27px\"),i.setAttributeNS(null,\"viewBox\",\"0 0 27 41\");var n=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");n.setAttributeNS(null,\"stroke\",\"none\"),n.setAttributeNS(null,\"stroke-width\",\"1\"),n.setAttributeNS(null,\"fill\",\"none\"),n.setAttributeNS(null,\"fill-rule\",\"evenodd\");var o=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");o.setAttributeNS(null,\"fill-rule\",\"nonzero\");var r=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");r.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),r.setAttributeNS(null,\"fill\",\"#000000\");for(var a=0,l=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}];a<l.length;a+=1){var c=l[a],u=s.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");u.setAttributeNS(null,\"opacity\",\"0.04\"),u.setAttributeNS(null,\"cx\",\"10.5\"),u.setAttributeNS(null,\"cy\",\"5.80029008\"),u.setAttributeNS(null,\"rx\",c.rx),u.setAttributeNS(null,\"ry\",c.ry),r.appendChild(u);}var h=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");h.setAttributeNS(null,\"fill\",this._color);var p=s.createNS(\"http://www.w3.org/2000/svg\",\"path\");p.setAttributeNS(null,\"d\",\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\"),h.appendChild(p);var d=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");d.setAttributeNS(null,\"opacity\",\"0.25\"),d.setAttributeNS(null,\"fill\",\"#000000\");var f=s.createNS(\"http://www.w3.org/2000/svg\",\"path\");f.setAttributeNS(null,\"d\",\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\"),d.appendChild(f);var m=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");m.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),m.setAttributeNS(null,\"fill\",\"#FFFFFF\");var _=s.createNS(\"http://www.w3.org/2000/svg\",\"g\");_.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");var g=s.createNS(\"http://www.w3.org/2000/svg\",\"circle\");g.setAttributeNS(null,\"fill\",\"#000000\"),g.setAttributeNS(null,\"opacity\",\"0.25\"),g.setAttributeNS(null,\"cx\",\"5.5\"),g.setAttributeNS(null,\"cy\",\"5.5\"),g.setAttributeNS(null,\"r\",\"5.4999962\");var v=s.createNS(\"http://www.w3.org/2000/svg\",\"circle\");v.setAttributeNS(null,\"fill\",\"#FFFFFF\"),v.setAttributeNS(null,\"cx\",\"5.5\"),v.setAttributeNS(null,\"cy\",\"5.5\"),v.setAttributeNS(null,\"r\",\"5.4999962\"),_.appendChild(g),_.appendChild(v),o.appendChild(r),o.appendChild(h),o.appendChild(d),o.appendChild(m),o.appendChild(_),i.appendChild(o),this._element.appendChild(i),this._offset=t.default$1.convert(e&&e.offset||[0,-14]);}this._element.classList.add(\"mapboxgl-marker\"),this._popup=null;};yn.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this._update(),this._map.on(\"click\",this._onMapClick),this},yn.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),delete this._map),s.remove(this._element),this._popup&&this._popup.remove(),this},yn.prototype.getLngLat=function(){return this._lngLat},yn.prototype.setLngLat=function(t){return this._lngLat=W.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},yn.prototype.getElement=function(){return this._element},yn.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!(\"offset\"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-38.1],\"bottom-left\":[e,-1*(24.6+e)],\"bottom-right\":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset;}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat);}return this},yn.prototype._onMapClick=function(t){var e=t.originalEvent.target,i=this._element;this._popup&&(e===i||i.contains(e))&&this.togglePopup();},yn.prototype.getPopup=function(){return this._popup},yn.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},yn.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=_n(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&\"moveend\"!==t.type||(this._pos=this._pos.round()),s.setTransform(this._element,gn[this._anchor]+\" translate(\"+this._pos.x+\"px, \"+this._pos.y+\"px)\"),vn(this._element,this._anchor,\"marker\"));},yn.prototype.getOffset=function(){return this._offset},yn.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var xn,bn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0};var wn=function(e){function i(i){e.call(this),this.options=t.extend({},bn,i),t.bindAll([\"_onSuccess\",\"_onError\",\"_finish\",\"_setupUI\",\"_updateCamera\",\"_updateMarker\"],this);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=s.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),i=this._setupUI,void 0!==xn?i(xn):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:\"geolocation\"}).then(function(t){xn=\"denied\"!==t.state,i(xn);}):(xn=!!t.default.navigator.geolocation,i(xn)),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),s.remove(this._container),this._map=void 0;},i.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");}this.options.showUserLocation&&\"OFF\"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&\"ACTIVE_LOCK\"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"geolocate\",e)),this._finish();},i.prototype._updateCamera=function(t){var e=new W(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy;this._map.fitBounds(e.toBounds(i),this.options.fitBoundsOptions,{geolocateSource:!0});},i.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove();},i.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish();},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0;},i.prototype._setupUI=function(e){var i=this;!1!==e&&(this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this._geolocateButton=s.create(\"button\",\"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate\",this._container),this._geolocateButton.type=\"button\",this._geolocateButton.setAttribute(\"aria-label\",\"Geolocate\"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=s.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new yn(this._dotElement),this.options.trackUserLocation&&(this._watchState=\"OFF\")),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",function(e){e.geolocateSource||\"ACTIVE_LOCK\"!==i._watchState||(i._watchState=\"BACKGROUND\",i._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),i._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),i.fire(new t.Event(\"trackuserlocationend\")));}));},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new t.Event(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this.fire(new t.Event(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(\"trackuserlocationstart\"));}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"BACKGROUND\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break;case\"BACKGROUND_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\");}\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions));}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null);},i}(t.Evented),En={maxWidth:100,unit:\"metric\"},Tn=function(e){this.options=t.extend({},En,e),t.bindAll([\"_onMove\",\"setUnit\"],this);};function In(t,e,i){var n,o,r,a,s,l,c=i&&i.maxWidth||100,u=t._container.clientHeight/2,h=(n=t.unproject([0,u]),o=t.unproject([c,u]),r=Math.PI/180,a=n.lat*r,s=o.lat*r,l=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((o.lng-n.lng)*r),6371e3*Math.acos(Math.min(l,1)));if(i&&\"imperial\"===i.unit){var p=3.2808*h;if(p>5280)Cn(e,c,p/5280,\"mi\");else Cn(e,c,p,\"ft\");}else if(i&&\"nautical\"===i.unit){Cn(e,c,h/1852,\"nm\");}else Cn(e,c,h,\"m\");}function Cn(t,e,i,n){var o,r,a,s=(o=i,(r=Math.pow(10,(\"\"+Math.floor(o)).length-1))*(a=(a=o/r)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),l=s/i;\"m\"===n&&s>=1e3&&(s/=1e3,n=\"km\"),t.style.width=e*l+\"px\",t.innerHTML=s+n;}Tn.prototype.getDefaultPosition=function(){return\"bottom-left\"},Tn.prototype._onMove=function(){In(this._map,this._container,this.options);},Tn.prototype.onAdd=function(t){return this._map=t,this._container=s.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Tn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0;},Tn.prototype.setUnit=function(t){this.options.unit=t,In(this._map,this._container,this.options);};var Sn=function(){this._fullscreen=!1,t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.default.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.default.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.default.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.default.document&&(this._fullscreenchange=\"MSFullscreenChange\"),this._className=\"mapboxgl-ctrl\";};Sn.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=s.create(\"div\",this._className+\" mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._container},Sn.prototype.onRemove=function(){s.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon);},Sn.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},Sn.prototype._setupUI=function(){var e=this._fullscreenButton=s.create(\"button\",this._className+\"-icon \"+this._className+\"-fullscreen\",this._container);e.setAttribute(\"aria-label\",\"Toggle fullscreen\"),e.type=\"button\",this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon);},Sn.prototype._isFullscreen=function(){return this._fullscreen},Sn.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+\"-shrink\"),this._fullscreenButton.classList.toggle(this._className+\"-fullscreen\"));},Sn.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&&t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen();};var zn={closeButton:!0,closeOnClick:!0},An=function(e){function i(i){e.call(this),this.options=t.extend(Object.create(zn),i),t.bindAll([\"_update\",\"_onClickClose\"],this);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map=e,this._map.on(\"move\",this._update),this.options.closeOnClick&&this._map.on(\"click\",this._onClickClose),this._update(),this.fire(new t.Event(\"open\")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&s.remove(this._content),this._container&&(s.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"click\",this._onClickClose),delete this._map),this.fire(new t.Event(\"close\")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(t){return this._lngLat=W.convert(t),this._pos=null,this._update(),this},i.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},i.prototype.setHTML=function(e){var i,n=t.default.document.createDocumentFragment(),o=t.default.document.createElement(\"body\");for(o.innerHTML=e;i=o.firstChild;)n.appendChild(i);return this.setDOMContent(n)},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype._createContent=function(){this._content&&s.remove(this._content),this._content=s.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=s.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClickClose));},i.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=s.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=s.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=_n(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),i=this.options.anchor,n=function e(i){if(i){if(\"number\"==typeof i){var n=Math.round(Math.sqrt(.5*Math.pow(i,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,i),\"top-left\":new t.default$1(n,n),\"top-right\":new t.default$1(-n,n),bottom:new t.default$1(0,-i),\"bottom-left\":new t.default$1(n,-n),\"bottom-right\":new t.default$1(-n,-n),left:new t.default$1(i,0),right:new t.default$1(-i,0)}}if(i instanceof t.default$1||Array.isArray(i)){var o=t.default$1.convert(i);return{center:o,top:o,\"top-left\":o,\"top-right\":o,bottom:o,\"bottom-left\":o,\"bottom-right\":o,left:o,right:o}}return{center:t.default$1.convert(i.center||[0,0]),top:t.default$1.convert(i.top||[0,0]),\"top-left\":t.default$1.convert(i[\"top-left\"]||[0,0]),\"top-right\":t.default$1.convert(i[\"top-right\"]||[0,0]),bottom:t.default$1.convert(i.bottom||[0,0]),\"bottom-left\":t.default$1.convert(i[\"bottom-left\"]||[0,0]),\"bottom-right\":t.default$1.convert(i[\"bottom-right\"]||[0,0]),left:t.default$1.convert(i.left||[0,0]),right:t.default$1.convert(i.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!i){var o,r=this._container.offsetWidth,a=this._container.offsetHeight;o=e.y+n.bottom.y<a?[\"top\"]:e.y>this._map.transform.height-a?[\"bottom\"]:[],e.x<r/2?o.push(\"left\"):e.x>this._map.transform.width-r/2&&o.push(\"right\"),i=0===o.length?\"bottom\":o.join(\"-\");}var l=e.add(n[i]).round();s.setTransform(this._container,gn[i]+\" translate(\"+l.x+\"px,\"+l.y+\"px)\"),vn(this._container,i,\"popup\");}},i.prototype._onClickClose=function(){this.remove();},i}(t.Evented);var Rn={version:\"0.45.0\",supported:e,workerCount:Math.max(Math.floor(r.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:pn,NavigationControl:mn,GeolocateControl:wn,AttributionControl:an,ScaleControl:Tn,FullscreenControl:Sn,Popup:An,Marker:yn,Style:Qe,LngLat:W,LngLatBounds:q,Point:t.default$1,Evented:t.Evented,config:_,get accessToken(){return _.ACCESS_TOKEN},set accessToken(t){_.ACCESS_TOKEN=t;},workerUrl:\"\"};return Rn});\n\n//\n\nreturn mapboxgl;\n\n})));\n\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],422:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createTable\n\nvar chull = _dereq_('convex-hull')\n\nfunction constructVertex(d, a, b) {\n  var x = new Array(d)\n  for(var i=0; i<d; ++i) {\n    x[i] = 0.0\n    if(i === a) {\n      x[i] += 0.5\n    }\n    if(i === b) {\n      x[i] += 0.5\n    }\n  }\n  return x\n}\n\nfunction constructCell(dimension, mask) {\n  if(mask === 0 || mask === (1<<(dimension+1))-1) {\n    return []\n  }\n  var points = []\n  var index  = []\n  for(var i=0; i<=dimension; ++i) {\n    if(mask & (1<<i)) {\n      points.push(constructVertex(dimension, i-1, i-1))\n      index.push(null)\n      for(var j=0; j<=dimension; ++j) {\n        if(~mask & (1<<j)) {\n          points.push(constructVertex(dimension, i-1, j-1))\n          index.push([i,j])\n        }\n      }\n    }\n  }\n  \n  //Preprocess points so first d+1 points are linearly independent\n  var hull = chull(points)\n  var faces = []\ni_loop:\n  for(var i=0; i<hull.length; ++i) {\n    var face = hull[i]\n    var nface = []\n    for(var j=0; j<face.length; ++j) {\n      if(!index[face[j]]) {\n        continue i_loop\n      }\n      nface.push(index[face[j]].slice())\n    }\n    faces.push(nface)\n  }\n  return faces\n}\n\nfunction createTable(dimension) {\n  var numCells = 1<<(dimension+1)\n  var result = new Array(numCells)\n  for(var i=0; i<numCells; ++i) {\n    result[i] = constructCell(dimension, i)\n  }\n  return result\n}\n},{\"convex-hull\":123}],423:[function(_dereq_,module,exports){\n/*jshint unused:true*/\n/*\nInput:  matrix      ; a 4x4 matrix\nOutput: translation ; a 3 component vector\n        scale       ; a 3 component vector\n        skew        ; skew factors XY,XZ,YZ represented as a 3 component vector\n        perspective ; a 4 component vector\n        quaternion  ; a 4 component vector\nReturns false if the matrix cannot be decomposed, true if it can\n\n\nReferences:\nhttps://github.com/kamicane/matrix3d/blob/master/lib/Matrix3d.js\nhttps://github.com/ChromiumWebApps/chromium/blob/master/ui/gfx/transform_util.cc\nhttp://www.w3.org/TR/css3-transforms/#decomposing-a-3d-matrix\n*/\n\nvar normalize = _dereq_('./normalize')\n\nvar create = _dereq_('gl-mat4/create')\nvar clone = _dereq_('gl-mat4/clone')\nvar determinant = _dereq_('gl-mat4/determinant')\nvar invert = _dereq_('gl-mat4/invert')\nvar transpose = _dereq_('gl-mat4/transpose')\nvar vec3 = {\n    length: _dereq_('gl-vec3/length'),\n    normalize: _dereq_('gl-vec3/normalize'),\n    dot: _dereq_('gl-vec3/dot'),\n    cross: _dereq_('gl-vec3/cross')\n}\n\nvar tmp = create()\nvar perspectiveMatrix = create()\nvar tmpVec4 = [0, 0, 0, 0]\nvar row = [ [0,0,0], [0,0,0], [0,0,0] ]\nvar pdum3 = [0,0,0]\n\nmodule.exports = function decomposeMat4(matrix, translation, scale, skew, perspective, quaternion) {\n    if (!translation) translation = [0,0,0]\n    if (!scale) scale = [0,0,0]\n    if (!skew) skew = [0,0,0]\n    if (!perspective) perspective = [0,0,0,1]\n    if (!quaternion) quaternion = [0,0,0,1]\n\n    //normalize, if not possible then bail out early\n    if (!normalize(tmp, matrix))\n        return false\n\n    // perspectiveMatrix is used to solve for perspective, but it also provides\n    // an easy way to test for singularity of the upper 3x3 component.\n    clone(perspectiveMatrix, tmp)\n\n    perspectiveMatrix[3] = 0\n    perspectiveMatrix[7] = 0\n    perspectiveMatrix[11] = 0\n    perspectiveMatrix[15] = 1\n\n    // If the perspectiveMatrix is not invertible, we are also unable to\n    // decompose, so we'll bail early. Constant taken from SkMatrix44::invert.\n    if (Math.abs(determinant(perspectiveMatrix) < 1e-8))\n        return false\n\n    var a03 = tmp[3], a13 = tmp[7], a23 = tmp[11],\n            a30 = tmp[12], a31 = tmp[13], a32 = tmp[14], a33 = tmp[15]\n\n    // First, isolate perspective.\n    if (a03 !== 0 || a13 !== 0 || a23 !== 0) {\n        tmpVec4[0] = a03\n        tmpVec4[1] = a13\n        tmpVec4[2] = a23\n        tmpVec4[3] = a33\n\n        // Solve the equation by inverting perspectiveMatrix and multiplying\n        // rightHandSide by the inverse.\n        // resuing the perspectiveMatrix here since it's no longer needed\n        var ret = invert(perspectiveMatrix, perspectiveMatrix)\n        if (!ret) return false\n        transpose(perspectiveMatrix, perspectiveMatrix)\n\n        //multiply by transposed inverse perspective matrix, into perspective vec4\n        vec4multMat4(perspective, tmpVec4, perspectiveMatrix)\n    } else { \n        //no perspective\n        perspective[0] = perspective[1] = perspective[2] = 0\n        perspective[3] = 1\n    }\n\n    // Next take care of translation\n    translation[0] = a30\n    translation[1] = a31\n    translation[2] = a32\n\n    // Now get scale and shear. 'row' is a 3 element array of 3 component vectors\n    mat3from4(row, tmp)\n\n    // Compute X scale factor and normalize first row.\n    scale[0] = vec3.length(row[0])\n    vec3.normalize(row[0], row[0])\n\n    // Compute XY shear factor and make 2nd row orthogonal to 1st.\n    skew[0] = vec3.dot(row[0], row[1])\n    combine(row[1], row[1], row[0], 1.0, -skew[0])\n\n    // Now, compute Y scale and normalize 2nd row.\n    scale[1] = vec3.length(row[1])\n    vec3.normalize(row[1], row[1])\n    skew[0] /= scale[1]\n\n    // Compute XZ and YZ shears, orthogonalize 3rd row\n    skew[1] = vec3.dot(row[0], row[2])\n    combine(row[2], row[2], row[0], 1.0, -skew[1])\n    skew[2] = vec3.dot(row[1], row[2])\n    combine(row[2], row[2], row[1], 1.0, -skew[2])\n\n    // Next, get Z scale and normalize 3rd row.\n    scale[2] = vec3.length(row[2])\n    vec3.normalize(row[2], row[2])\n    skew[1] /= scale[2]\n    skew[2] /= scale[2]\n\n\n    // At this point, the matrix (in rows) is orthonormal.\n    // Check for a coordinate system flip.  If the determinant\n    // is -1, then negate the matrix and the scaling factors.\n    vec3.cross(pdum3, row[1], row[2])\n    if (vec3.dot(row[0], pdum3) < 0) {\n        for (var i = 0; i < 3; i++) {\n            scale[i] *= -1;\n            row[i][0] *= -1\n            row[i][1] *= -1\n            row[i][2] *= -1\n        }\n    }\n\n    // Now, get the rotations out\n    quaternion[0] = 0.5 * Math.sqrt(Math.max(1 + row[0][0] - row[1][1] - row[2][2], 0))\n    quaternion[1] = 0.5 * Math.sqrt(Math.max(1 - row[0][0] + row[1][1] - row[2][2], 0))\n    quaternion[2] = 0.5 * Math.sqrt(Math.max(1 - row[0][0] - row[1][1] + row[2][2], 0))\n    quaternion[3] = 0.5 * Math.sqrt(Math.max(1 + row[0][0] + row[1][1] + row[2][2], 0))\n\n    if (row[2][1] > row[1][2])\n        quaternion[0] = -quaternion[0]\n    if (row[0][2] > row[2][0])\n        quaternion[1] = -quaternion[1]\n    if (row[1][0] > row[0][1])\n        quaternion[2] = -quaternion[2]\n    return true\n}\n\n//will be replaced by gl-vec4 eventually\nfunction vec4multMat4(out, a, m) {\n    var x = a[0], y = a[1], z = a[2], w = a[3];\n    out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n    out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n    out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n    out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n    return out;\n}\n\n//gets upper-left of a 4x4 matrix into a 3x3 of vectors\nfunction mat3from4(out, mat4x4) {\n    out[0][0] = mat4x4[0]\n    out[0][1] = mat4x4[1]\n    out[0][2] = mat4x4[2]\n    \n    out[1][0] = mat4x4[4]\n    out[1][1] = mat4x4[5]\n    out[1][2] = mat4x4[6]\n\n    out[2][0] = mat4x4[8]\n    out[2][1] = mat4x4[9]\n    out[2][2] = mat4x4[10]\n}\n\nfunction combine(out, a, b, scale1, scale2) {\n    out[0] = a[0] * scale1 + b[0] * scale2\n    out[1] = a[1] * scale1 + b[1] * scale2\n    out[2] = a[2] * scale1 + b[2] * scale2\n}\n},{\"./normalize\":424,\"gl-mat4/clone\":258,\"gl-mat4/create\":259,\"gl-mat4/determinant\":260,\"gl-mat4/invert\":264,\"gl-mat4/transpose\":275,\"gl-vec3/cross\":329,\"gl-vec3/dot\":334,\"gl-vec3/length\":344,\"gl-vec3/normalize\":351}],424:[function(_dereq_,module,exports){\nmodule.exports = function normalize(out, mat) {\n    var m44 = mat[15]\n    // Cannot normalize.\n    if (m44 === 0) \n        return false\n    var scale = 1 / m44\n    for (var i=0; i<16; i++)\n        out[i] = mat[i] * scale\n    return true\n}\n},{}],425:[function(_dereq_,module,exports){\nvar lerp = _dereq_('gl-vec3/lerp')\n\nvar recompose = _dereq_('mat4-recompose')\nvar decompose = _dereq_('mat4-decompose')\nvar determinant = _dereq_('gl-mat4/determinant')\nvar slerp = _dereq_('quat-slerp')\n\nvar state0 = state()\nvar state1 = state()\nvar tmp = state()\n\nmodule.exports = interpolate\nfunction interpolate(out, start, end, alpha) {\n    if (determinant(start) === 0 || determinant(end) === 0)\n        return false\n\n    //decompose the start and end matrices into individual components\n    var r0 = decompose(start, state0.translate, state0.scale, state0.skew, state0.perspective, state0.quaternion)\n    var r1 = decompose(end, state1.translate, state1.scale, state1.skew, state1.perspective, state1.quaternion)\n    if (!r0 || !r1)\n        return false    \n\n\n    //now lerp/slerp the start and end components into a temporary     lerp(tmptranslate, state0.translate, state1.translate, alpha)\n    lerp(tmp.translate, state0.translate, state1.translate, alpha)\n    lerp(tmp.skew, state0.skew, state1.skew, alpha)\n    lerp(tmp.scale, state0.scale, state1.scale, alpha)\n    lerp(tmp.perspective, state0.perspective, state1.perspective, alpha)\n    slerp(tmp.quaternion, state0.quaternion, state1.quaternion, alpha)\n\n    //and recompose into our 'out' matrix\n    recompose(out, tmp.translate, tmp.scale, tmp.skew, tmp.perspective, tmp.quaternion)\n    return true\n}\n\nfunction state() {\n    return {\n        translate: vec3(),\n        scale: vec3(1),\n        skew: vec3(),\n        perspective: vec4(),\n        quaternion: vec4()\n    }\n}\n\nfunction vec3(n) {\n    return [n||0,n||0,n||0]\n}\n\nfunction vec4() {\n    return [0,0,0,1]\n}\n},{\"gl-mat4/determinant\":260,\"gl-vec3/lerp\":345,\"mat4-decompose\":423,\"mat4-recompose\":426,\"quat-slerp\":478}],426:[function(_dereq_,module,exports){\n/*\nInput:  translation ; a 3 component vector\n        scale       ; a 3 component vector\n        skew        ; skew factors XY,XZ,YZ represented as a 3 component vector\n        perspective ; a 4 component vector\n        quaternion  ; a 4 component vector\nOutput: matrix      ; a 4x4 matrix\n\nFrom: http://www.w3.org/TR/css3-transforms/#recomposing-to-a-3d-matrix\n*/\n\nvar mat4 = {\n    identity: _dereq_('gl-mat4/identity'),\n    translate: _dereq_('gl-mat4/translate'),\n    multiply: _dereq_('gl-mat4/multiply'),\n    create: _dereq_('gl-mat4/create'),\n    scale: _dereq_('gl-mat4/scale'),\n    fromRotationTranslation: _dereq_('gl-mat4/fromRotationTranslation')\n}\n\nvar rotationMatrix = mat4.create()\nvar temp = mat4.create()\n\nmodule.exports = function recomposeMat4(matrix, translation, scale, skew, perspective, quaternion) {\n    mat4.identity(matrix)\n\n    //apply translation & rotation\n    mat4.fromRotationTranslation(matrix, quaternion, translation)\n\n    //apply perspective\n    matrix[3] = perspective[0]\n    matrix[7] = perspective[1]\n    matrix[11] = perspective[2]\n    matrix[15] = perspective[3]\n        \n    // apply skew\n    // temp is a identity 4x4 matrix initially\n    mat4.identity(temp)\n\n    if (skew[2] !== 0) {\n        temp[9] = skew[2]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    if (skew[1] !== 0) {\n        temp[9] = 0\n        temp[8] = skew[1]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    if (skew[0] !== 0) {\n        temp[8] = 0\n        temp[4] = skew[0]\n        mat4.multiply(matrix, matrix, temp)\n    }\n\n    //apply scale\n    mat4.scale(matrix, matrix, scale)\n    return matrix\n}\n},{\"gl-mat4/create\":259,\"gl-mat4/fromRotationTranslation\":262,\"gl-mat4/identity\":263,\"gl-mat4/multiply\":266,\"gl-mat4/scale\":273,\"gl-mat4/translate\":274}],427:[function(_dereq_,module,exports){\n'use strict';\nmodule.exports = Math.log2 || function (x) {\n\treturn Math.log(x) * Math.LOG2E;\n};\n\n},{}],428:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar bsearch   = _dereq_('binary-search-bounds')\r\nvar m4interp  = _dereq_('mat4-interpolate')\r\nvar invert44  = _dereq_('gl-mat4/invert')\r\nvar rotateX   = _dereq_('gl-mat4/rotateX')\r\nvar rotateY   = _dereq_('gl-mat4/rotateY')\r\nvar rotateZ   = _dereq_('gl-mat4/rotateZ')\r\nvar lookAt    = _dereq_('gl-mat4/lookAt')\r\nvar translate = _dereq_('gl-mat4/translate')\r\nvar scale     = _dereq_('gl-mat4/scale')\r\nvar normalize = _dereq_('gl-vec3/normalize')\r\n\r\nvar DEFAULT_CENTER = [0,0,0]\r\n\r\nmodule.exports = createMatrixCameraController\r\n\r\nfunction MatrixCameraController(initialMatrix) {\r\n  this._components    = initialMatrix.slice()\r\n  this._time          = [0]\r\n  this.prevMatrix     = initialMatrix.slice()\r\n  this.nextMatrix     = initialMatrix.slice()\r\n  this.computedMatrix = initialMatrix.slice()\r\n  this.computedInverse = initialMatrix.slice()\r\n  this.computedEye    = [0,0,0]\r\n  this.computedUp     = [0,0,0]\r\n  this.computedCenter = [0,0,0]\r\n  this.computedRadius = [0]\r\n  this._limits        = [-Infinity, Infinity]\r\n}\r\n\r\nvar proto = MatrixCameraController.prototype\r\n\r\nproto.recalcMatrix = function(t) {\r\n  var time = this._time\r\n  var tidx = bsearch.le(time, t)\r\n  var mat = this.computedMatrix\r\n  if(tidx < 0) {\r\n    return\r\n  }\r\n  var comps = this._components\r\n  if(tidx === time.length-1) {\r\n    var ptr = 16*tidx\r\n    for(var i=0; i<16; ++i) {\r\n      mat[i] = comps[ptr++]\r\n    }\r\n  } else {\r\n    var dt = (time[tidx+1] - time[tidx])\r\n    var ptr = 16*tidx\r\n    var prev = this.prevMatrix\r\n    var allEqual = true\r\n    for(var i=0; i<16; ++i) {\r\n      prev[i] = comps[ptr++]\r\n    }\r\n    var next = this.nextMatrix\r\n    for(var i=0; i<16; ++i) {\r\n      next[i] = comps[ptr++]\r\n      allEqual = allEqual && (prev[i] === next[i])\r\n    }\r\n    if(dt < 1e-6 || allEqual) {\r\n      for(var i=0; i<16; ++i) {\r\n        mat[i] = prev[i]\r\n      }\r\n    } else {\r\n      m4interp(mat, prev, next, (t - time[tidx])/dt)\r\n    }\r\n  }\r\n\r\n  var up = this.computedUp\r\n  up[0] = mat[1]\r\n  up[1] = mat[5]\r\n  up[2] = mat[9]\r\n  normalize(up, up)\r\n\r\n  var imat = this.computedInverse\r\n  invert44(imat, mat)\r\n  var eye = this.computedEye\r\n  var w = imat[15]\r\n  eye[0] = imat[12]/w\r\n  eye[1] = imat[13]/w\r\n  eye[2] = imat[14]/w\r\n\r\n  var center = this.computedCenter\r\n  var radius = Math.exp(this.computedRadius[0])\r\n  for(var i=0; i<3; ++i) {\r\n    center[i] = eye[i] - mat[2+4*i] * radius\r\n  }\r\n}\r\n\r\nproto.idle = function(t) {\r\n  if(t < this.lastT()) {\r\n    return\r\n  }\r\n  var mc = this._components\r\n  var ptr = mc.length-16\r\n  for(var i=0; i<16; ++i) {\r\n    mc.push(mc[ptr++])\r\n  }\r\n  this._time.push(t)\r\n}\r\n\r\nproto.flush = function(t) {\r\n  var idx = bsearch.gt(this._time, t) - 2\r\n  if(idx < 0) {\r\n    return\r\n  }\r\n  this._time.splice(0, idx)\r\n  this._components.splice(0, 16*idx)\r\n}\r\n\r\nproto.lastT = function() {\r\n  return this._time[this._time.length-1]\r\n}\r\n\r\nproto.lookAt = function(t, eye, center, up) {\r\n  this.recalcMatrix(t)\r\n  eye    = eye || this.computedEye\r\n  center = center || DEFAULT_CENTER\r\n  up     = up || this.computedUp\r\n  this.setMatrix(t, lookAt(this.computedMatrix, eye, center, up))\r\n  var d2 = 0.0\r\n  for(var i=0; i<3; ++i) {\r\n    d2 += Math.pow(center[i] - eye[i], 2)\r\n  }\r\n  d2 = Math.log(Math.sqrt(d2))\r\n  this.computedRadius[0] = d2\r\n}\r\n\r\nproto.rotate = function(t, yaw, pitch, roll) {\r\n  this.recalcMatrix(t)\r\n  var mat = this.computedInverse\r\n  if(yaw)   rotateY(mat, mat, yaw)\r\n  if(pitch) rotateX(mat, mat, pitch)\r\n  if(roll)  rotateZ(mat, mat, roll)\r\n  this.setMatrix(t, invert44(this.computedMatrix, mat))\r\n}\r\n\r\nvar tvec = [0,0,0]\r\n\r\nproto.pan = function(t, dx, dy, dz) {\r\n  tvec[0] = -(dx || 0.0)\r\n  tvec[1] = -(dy || 0.0)\r\n  tvec[2] = -(dz || 0.0)\r\n  this.recalcMatrix(t)\r\n  var mat = this.computedInverse\r\n  translate(mat, mat, tvec)\r\n  this.setMatrix(t, invert44(mat, mat))\r\n}\r\n\r\nproto.translate = function(t, dx, dy, dz) {\r\n  tvec[0] = dx || 0.0\r\n  tvec[1] = dy || 0.0\r\n  tvec[2] = dz || 0.0\r\n  this.recalcMatrix(t)\r\n  var mat = this.computedMatrix\r\n  translate(mat, mat, tvec)\r\n  this.setMatrix(t, mat)\r\n}\r\n\r\nproto.setMatrix = function(t, mat) {\r\n  if(t < this.lastT()) {\r\n    return\r\n  }\r\n  this._time.push(t)\r\n  for(var i=0; i<16; ++i) {\r\n    this._components.push(mat[i])\r\n  }\r\n}\r\n\r\nproto.setDistance = function(t, d) {\r\n  this.computedRadius[0] = d\r\n}\r\n\r\nproto.setDistanceLimits = function(a,b) {\r\n  var lim = this._limits\r\n  lim[0] = a\r\n  lim[1] = b\r\n}\r\n\r\nproto.getDistanceLimits = function(out) {\r\n  var lim = this._limits\r\n  if(out) {\r\n    out[0] = lim[0]\r\n    out[1] = lim[1]\r\n    return out\r\n  }\r\n  return lim\r\n}\r\n\r\nfunction createMatrixCameraController(options) {\r\n  options = options || {}\r\n  var matrix = options.matrix || \r\n              [1,0,0,0,\r\n               0,1,0,0,\r\n               0,0,1,0,\r\n               0,0,0,1]\r\n  return new MatrixCameraController(matrix)\r\n}\r\n\n},{\"binary-search-bounds\":84,\"gl-mat4/invert\":264,\"gl-mat4/lookAt\":265,\"gl-mat4/rotateX\":270,\"gl-mat4/rotateY\":271,\"gl-mat4/rotateZ\":272,\"gl-mat4/scale\":273,\"gl-mat4/translate\":274,\"gl-vec3/normalize\":351,\"mat4-interpolate\":425}],429:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = monotoneConvexHull2D\n\nvar orient = _dereq_('robust-orientation')[3]\n\nfunction monotoneConvexHull2D(points) {\n  var n = points.length\n\n  if(n < 3) {\n    var result = new Array(n)\n    for(var i=0; i<n; ++i) {\n      result[i] = i\n    }\n\n    if(n === 2 &&\n       points[0][0] === points[1][0] &&\n       points[0][1] === points[1][1]) {\n      return [0]\n    }\n\n    return result\n  }\n\n  //Sort point indices along x-axis\n  var sorted = new Array(n)\n  for(var i=0; i<n; ++i) {\n    sorted[i] = i\n  }\n  sorted.sort(function(a,b) {\n    var d = points[a][0]-points[b][0]\n    if(d) {\n      return d\n    }\n    return points[a][1] - points[b][1]\n  })\n\n  //Construct upper and lower hulls\n  var lower = [sorted[0], sorted[1]]\n  var upper = [sorted[0], sorted[1]]\n\n  for(var i=2; i<n; ++i) {\n    var idx = sorted[i]\n    var p   = points[idx]\n\n    //Insert into lower list\n    var m = lower.length\n    while(m > 1 && orient(\n        points[lower[m-2]], \n        points[lower[m-1]], \n        p) <= 0) {\n      m -= 1\n      lower.pop()\n    }\n    lower.push(idx)\n\n    //Insert into upper list\n    m = upper.length\n    while(m > 1 && orient(\n        points[upper[m-2]], \n        points[upper[m-1]], \n        p) >= 0) {\n      m -= 1\n      upper.pop()\n    }\n    upper.push(idx)\n  }\n\n  //Merge lists together\n  var result = new Array(upper.length + lower.length - 2)\n  var ptr    = 0\n  for(var i=0, nl=lower.length; i<nl; ++i) {\n    result[ptr++] = lower[i]\n  }\n  for(var j=upper.length-2; j>0; --j) {\n    result[ptr++] = upper[j]\n  }\n\n  //Return result\n  return result\n}\n},{\"robust-orientation\":497}],430:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = mouseListen\n\nvar mouse = _dereq_('mouse-event')\n\nfunction mouseListen (element, callback) {\n  if (!callback) {\n    callback = element\n    element = window\n  }\n\n  var buttonState = 0\n  var x = 0\n  var y = 0\n  var mods = {\n    shift: false,\n    alt: false,\n    control: false,\n    meta: false\n  }\n  var attached = false\n\n  function updateMods (ev) {\n    var changed = false\n    if ('altKey' in ev) {\n      changed = changed || ev.altKey !== mods.alt\n      mods.alt = !!ev.altKey\n    }\n    if ('shiftKey' in ev) {\n      changed = changed || ev.shiftKey !== mods.shift\n      mods.shift = !!ev.shiftKey\n    }\n    if ('ctrlKey' in ev) {\n      changed = changed || ev.ctrlKey !== mods.control\n      mods.control = !!ev.ctrlKey\n    }\n    if ('metaKey' in ev) {\n      changed = changed || ev.metaKey !== mods.meta\n      mods.meta = !!ev.metaKey\n    }\n    return changed\n  }\n\n  function handleEvent (nextButtons, ev) {\n    var nextX = mouse.x(ev)\n    var nextY = mouse.y(ev)\n    if ('buttons' in ev) {\n      nextButtons = ev.buttons | 0\n    }\n    if (nextButtons !== buttonState ||\n      nextX !== x ||\n      nextY !== y ||\n      updateMods(ev)) {\n      buttonState = nextButtons | 0\n      x = nextX || 0\n      y = nextY || 0\n      callback && callback(buttonState, x, y, mods)\n    }\n  }\n\n  function clearState (ev) {\n    handleEvent(0, ev)\n  }\n\n  function handleBlur () {\n    if (buttonState ||\n      x ||\n      y ||\n      mods.shift ||\n      mods.alt ||\n      mods.meta ||\n      mods.control) {\n      x = y = 0\n      buttonState = 0\n      mods.shift = mods.alt = mods.control = mods.meta = false\n      callback && callback(0, 0, 0, mods)\n    }\n  }\n\n  function handleMods (ev) {\n    if (updateMods(ev)) {\n      callback && callback(buttonState, x, y, mods)\n    }\n  }\n\n  function handleMouseMove (ev) {\n    if (mouse.buttons(ev) === 0) {\n      handleEvent(0, ev)\n    } else {\n      handleEvent(buttonState, ev)\n    }\n  }\n\n  function handleMouseDown (ev) {\n    handleEvent(buttonState | mouse.buttons(ev), ev)\n  }\n\n  function handleMouseUp (ev) {\n    handleEvent(buttonState & ~mouse.buttons(ev), ev)\n  }\n\n  function attachListeners () {\n    if (attached) {\n      return\n    }\n    attached = true\n\n    element.addEventListener('mousemove', handleMouseMove)\n\n    element.addEventListener('mousedown', handleMouseDown)\n\n    element.addEventListener('mouseup', handleMouseUp)\n\n    element.addEventListener('mouseleave', clearState)\n    element.addEventListener('mouseenter', clearState)\n    element.addEventListener('mouseout', clearState)\n    element.addEventListener('mouseover', clearState)\n\n    element.addEventListener('blur', handleBlur)\n\n    element.addEventListener('keyup', handleMods)\n    element.addEventListener('keydown', handleMods)\n    element.addEventListener('keypress', handleMods)\n\n    if (element !== window) {\n      window.addEventListener('blur', handleBlur)\n\n      window.addEventListener('keyup', handleMods)\n      window.addEventListener('keydown', handleMods)\n      window.addEventListener('keypress', handleMods)\n    }\n  }\n\n  function detachListeners () {\n    if (!attached) {\n      return\n    }\n    attached = false\n\n    element.removeEventListener('mousemove', handleMouseMove)\n\n    element.removeEventListener('mousedown', handleMouseDown)\n\n    element.removeEventListener('mouseup', handleMouseUp)\n\n    element.removeEventListener('mouseleave', clearState)\n    element.removeEventListener('mouseenter', clearState)\n    element.removeEventListener('mouseout', clearState)\n    element.removeEventListener('mouseover', clearState)\n\n    element.removeEventListener('blur', handleBlur)\n\n    element.removeEventListener('keyup', handleMods)\n    element.removeEventListener('keydown', handleMods)\n    element.removeEventListener('keypress', handleMods)\n\n    if (element !== window) {\n      window.removeEventListener('blur', handleBlur)\n\n      window.removeEventListener('keyup', handleMods)\n      window.removeEventListener('keydown', handleMods)\n      window.removeEventListener('keypress', handleMods)\n    }\n  }\n\n  // Attach listeners\n  attachListeners()\n\n  var result = {\n    element: element\n  }\n\n  Object.defineProperties(result, {\n    enabled: {\n      get: function () { return attached },\n      set: function (f) {\n        if (f) {\n          attachListeners()\n        } else {\n          detachListeners()\n        }\n      },\n      enumerable: true\n    },\n    buttons: {\n      get: function () { return buttonState },\n      enumerable: true\n    },\n    x: {\n      get: function () { return x },\n      enumerable: true\n    },\n    y: {\n      get: function () { return y },\n      enumerable: true\n    },\n    mods: {\n      get: function () { return mods },\n      enumerable: true\n    }\n  })\n\n  return result\n}\n\n},{\"mouse-event\":432}],431:[function(_dereq_,module,exports){\nvar rootPosition = { left: 0, top: 0 }\n\nmodule.exports = mouseEventOffset\nfunction mouseEventOffset (ev, target, out) {\n  target = target || ev.currentTarget || ev.srcElement\n  if (!Array.isArray(out)) {\n    out = [ 0, 0 ]\n  }\n  var cx = ev.clientX || 0\n  var cy = ev.clientY || 0\n  var rect = getBoundingClientOffset(target)\n  out[0] = cx - rect.left\n  out[1] = cy - rect.top\n  return out\n}\n\nfunction getBoundingClientOffset (element) {\n  if (element === window ||\n      element === document ||\n      element === document.body) {\n    return rootPosition\n  } else {\n    return element.getBoundingClientRect()\n  }\n}\n\n},{}],432:[function(_dereq_,module,exports){\n'use strict'\n\nfunction mouseButtons(ev) {\n  if(typeof ev === 'object') {\n    if('buttons' in ev) {\n      return ev.buttons\n    } else if('which' in ev) {\n      var b = ev.which\n      if(b === 2) {\n        return 4\n      } else if(b === 3) {\n        return 2\n      } else if(b > 0) {\n        return 1<<(b-1)\n      }\n    } else if('button' in ev) {\n      var b = ev.button\n      if(b === 1) {\n        return 4\n      } else if(b === 2) {\n        return 2\n      } else if(b >= 0) {\n        return 1<<b\n      }\n    }\n  }\n  return 0\n}\nexports.buttons = mouseButtons\n\nfunction mouseElement(ev) {\n  return ev.target || ev.srcElement || window\n}\nexports.element = mouseElement\n\nfunction mouseRelativeX(ev) {\n  if(typeof ev === 'object') {\n    if('offsetX' in ev) {\n      return ev.offsetX\n    }\n    var target = mouseElement(ev)\n    var bounds = target.getBoundingClientRect()\n    return ev.clientX - bounds.left\n  }\n  return 0\n}\nexports.x = mouseRelativeX\n\nfunction mouseRelativeY(ev) {\n  if(typeof ev === 'object') {\n    if('offsetY' in ev) {\n      return ev.offsetY\n    }\n    var target = mouseElement(ev)\n    var bounds = target.getBoundingClientRect()\n    return ev.clientY - bounds.top\n  }\n  return 0\n}\nexports.y = mouseRelativeY\n\n},{}],433:[function(_dereq_,module,exports){\n'use strict'\n\nvar toPX = _dereq_('to-px')\n\nmodule.exports = mouseWheelListen\n\nfunction mouseWheelListen(element, callback, noScroll) {\n  if(typeof element === 'function') {\n    noScroll = !!callback\n    callback = element\n    element = window\n  }\n  var lineHeight = toPX('ex', element)\n  var listener = function(ev) {\n    if(noScroll) {\n      ev.preventDefault()\n    }\n    var dx = ev.deltaX || 0\n    var dy = ev.deltaY || 0\n    var dz = ev.deltaZ || 0\n    var mode = ev.deltaMode\n    var scale = 1\n    switch(mode) {\n      case 1:\n        scale = lineHeight\n      break\n      case 2:\n        scale = window.innerHeight\n      break\n    }\n    dx *= scale\n    dy *= scale\n    dz *= scale\n    if(dx || dy || dz) {\n      return callback(dx, dy, dz, ev)\n    }\n  }\n  element.addEventListener('wheel', listener)\n  return listener\n}\n\n},{\"to-px\":526}],434:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar pool = _dereq_(\"typedarray-pool\")\n\nmodule.exports = createSurfaceExtractor\n\n//Helper macros\nfunction array(i) {\n  return \"a\" + i\n}\nfunction data(i) {\n  return \"d\" + i\n}\nfunction cube(i,bitmask) {\n  return \"c\" + i + \"_\" + bitmask\n}\nfunction shape(i) {\n  return \"s\" + i\n}\nfunction stride(i,j) {\n  return \"t\" + i + \"_\" + j\n}\nfunction offset(i) {\n  return \"o\" + i\n}\nfunction scalar(i) {\n  return \"x\" + i\n}\nfunction pointer(i) {\n  return \"p\" + i\n}\nfunction delta(i,bitmask) {\n  return \"d\" + i + \"_\" + bitmask\n}\nfunction index(i) {\n  return \"i\" + i\n}\nfunction step(i,j) {\n  return \"u\" + i + \"_\" + j\n}\nfunction pcube(bitmask) {\n  return \"b\" + bitmask\n}\nfunction qcube(bitmask) {\n  return \"y\" + bitmask\n}\nfunction pdelta(bitmask) {\n  return \"e\" + bitmask\n}\nfunction vert(i) {\n  return \"v\" + i\n}\nvar VERTEX_IDS = \"V\"\nvar PHASES = \"P\"\nvar VERTEX_COUNT = \"N\"\nvar POOL_SIZE = \"Q\"\nvar POINTER = \"X\"\nvar TEMPORARY = \"T\"\n\nfunction permBitmask(dimension, mask, order) {\n  var r = 0\n  for(var i=0; i<dimension; ++i) {\n    if(mask & (1<<i)) {\n      r |= (1<<order[i])\n    }\n  }\n  return r\n}\n\n//Generates the surface procedure\nfunction compileSurfaceProcedure(vertexFunc, faceFunc, phaseFunc, scalarArgs, order, typesig) {\n  var arrayArgs = typesig.length\n  var dimension = order.length\n\n  if(dimension < 2) {\n    throw new Error(\"ndarray-extract-contour: Dimension must be at least 2\")\n  }\n\n  var funcName = \"extractContour\" + order.join(\"_\")\n  var code = []\n  var vars = []\n  var args = []\n\n  //Assemble arguments\n  for(var i=0; i<arrayArgs; ++i) {\n    args.push(array(i))  \n  }\n  for(var i=0; i<scalarArgs; ++i) {\n    args.push(scalar(i))\n  }\n\n  //Shape\n  for(var i=0; i<dimension; ++i) {\n    vars.push(shape(i) + \"=\" + array(0) + \".shape[\" + i + \"]|0\")\n  }\n  //Data, stride, offset pointers\n  for(var i=0; i<arrayArgs; ++i) {\n    vars.push(data(i) + \"=\" + array(i) + \".data\",\n              offset(i) + \"=\" + array(i) + \".offset|0\")\n    for(var j=0; j<dimension; ++j) {\n      vars.push(stride(i,j) + \"=\" + array(i) + \".stride[\" + j + \"]|0\")\n    }\n  }\n  //Pointer, delta and cube variables\n  for(var i=0; i<arrayArgs; ++i) {\n    vars.push(pointer(i) + \"=\" + offset(i))\n    vars.push(cube(i,0))\n    for(var j=1; j<(1<<dimension); ++j) {\n      var ptrStr = []\n      for(var k=0; k<dimension; ++k) {\n        if(j & (1<<k)) {\n          ptrStr.push(\"-\" + stride(i,k))\n        }\n      }\n      vars.push(delta(i,j) + \"=(\" + ptrStr.join(\"\") + \")|0\")\n      vars.push(cube(i,j) + \"=0\")\n    }\n  }\n  //Create step variables\n  for(var i=0; i<arrayArgs; ++i) {\n    for(var j=0; j<dimension; ++j) {\n      var stepVal = [ stride(i,order[j]) ]\n      if(j > 0) {\n        stepVal.push(stride(i, order[j-1]) + \"*\" + shape(order[j-1]) )\n      }\n      vars.push(step(i,order[j]) + \"=(\" + stepVal.join(\"-\") + \")|0\")\n    }\n  }\n  //Create index variables\n  for(var i=0; i<dimension; ++i) {\n    vars.push(index(i) + \"=0\")\n  }\n  //Vertex count\n  vars.push(VERTEX_COUNT + \"=0\")\n  //Compute pool size, initialize pool step\n  var sizeVariable = [\"2\"]\n  for(var i=dimension-2; i>=0; --i) {\n    sizeVariable.push(shape(order[i]))\n  }\n  //Previous phases and vertex_ids\n  vars.push(POOL_SIZE + \"=(\" + sizeVariable.join(\"*\") + \")|0\",\n            PHASES + \"=mallocUint32(\" + POOL_SIZE + \")\",\n            VERTEX_IDS + \"=mallocUint32(\" + POOL_SIZE + \")\",\n            POINTER + \"=0\")\n  //Create cube variables for phases\n  vars.push(pcube(0) + \"=0\")\n  for(var j=1; j<(1<<dimension); ++j) {\n    var cubeDelta = []\n    var cubeStep = [ ]\n    for(var k=0; k<dimension; ++k) {\n      if(j & (1<<k)) {\n        if(cubeStep.length === 0) {\n          cubeDelta.push(\"1\")\n        } else {\n          cubeDelta.unshift(cubeStep.join(\"*\"))\n        }\n      }\n      cubeStep.push(shape(order[k]))\n    }\n    var signFlag = \"\"\n    if(cubeDelta[0].indexOf(shape(order[dimension-2])) < 0) {\n      signFlag = \"-\"\n    }\n    var jperm = permBitmask(dimension, j, order)\n    vars.push(pdelta(jperm) + \"=(-\" + cubeDelta.join(\"-\") + \")|0\",\n              qcube(jperm) + \"=(\" + signFlag + cubeDelta.join(\"-\") + \")|0\",\n              pcube(jperm) + \"=0\")\n  }\n  vars.push(vert(0) + \"=0\", TEMPORARY + \"=0\")\n\n  function forLoopBegin(i, start) {\n    code.push(\"for(\", index(order[i]), \"=\", start, \";\",\n      index(order[i]), \"<\", shape(order[i]), \";\",\n      \"++\", index(order[i]), \"){\")\n  }\n\n  function forLoopEnd(i) {\n    for(var j=0; j<arrayArgs; ++j) {\n      code.push(pointer(j), \"+=\", step(j,order[i]), \";\")\n    }\n    code.push(\"}\")\n  }\n\n  function fillEmptySlice(k) {\n    for(var i=k-1; i>=0; --i) {\n      forLoopBegin(i, 0) \n    }\n    var phaseFuncArgs = []\n    for(var i=0; i<arrayArgs; ++i) {\n      if(typesig[i]) {\n        phaseFuncArgs.push(data(i) + \".get(\" + pointer(i) + \")\")\n      } else {\n        phaseFuncArgs.push(data(i) + \"[\" + pointer(i) + \"]\")\n      }\n    }\n    for(var i=0; i<scalarArgs; ++i) {\n      phaseFuncArgs.push(scalar(i))\n    }\n    code.push(PHASES, \"[\", POINTER, \"++]=phase(\", phaseFuncArgs.join(), \");\")\n    for(var i=0; i<k; ++i) {\n      forLoopEnd(i)\n    }\n    for(var j=0; j<arrayArgs; ++j) {\n      code.push(pointer(j), \"+=\", step(j,order[k]), \";\")\n    }\n  }\n\n  function processGridCell(mask) {\n    //Read in local data\n    for(var i=0; i<arrayArgs; ++i) {\n      if(typesig[i]) {\n        code.push(cube(i,0), \"=\", data(i), \".get(\", pointer(i), \");\")\n      } else {\n        code.push(cube(i,0), \"=\", data(i), \"[\", pointer(i), \"];\")\n      }\n    }\n\n    //Read in phase\n    var phaseFuncArgs = []\n    for(var i=0; i<arrayArgs; ++i) {\n      phaseFuncArgs.push(cube(i,0))\n    }\n    for(var i=0; i<scalarArgs; ++i) {\n      phaseFuncArgs.push(scalar(i))\n    }\n    \n    code.push(pcube(0), \"=\", PHASES, \"[\", POINTER, \"]=phase(\", phaseFuncArgs.join(), \");\")\n    \n    //Read in other cube data\n    for(var j=1; j<(1<<dimension); ++j) {\n      code.push(pcube(j), \"=\", PHASES, \"[\", POINTER, \"+\", pdelta(j), \"];\")\n    }\n\n    //Check for boundary crossing\n    var vertexPredicate = []\n    for(var j=1; j<(1<<dimension); ++j) {\n      vertexPredicate.push(\"(\" + pcube(0) + \"!==\" + pcube(j) + \")\")\n    }\n    code.push(\"if(\", vertexPredicate.join(\"||\"), \"){\")\n\n    //Read in boundary data\n    var vertexArgs = []\n    for(var i=0; i<dimension; ++i) {\n      vertexArgs.push(index(i))\n    }\n    for(var i=0; i<arrayArgs; ++i) {\n      vertexArgs.push(cube(i,0))\n      for(var j=1; j<(1<<dimension); ++j) {\n        if(typesig[i]) {\n          code.push(cube(i,j), \"=\", data(i), \".get(\", pointer(i), \"+\", delta(i,j), \");\")\n        } else {\n          code.push(cube(i,j), \"=\", data(i), \"[\", pointer(i), \"+\", delta(i,j), \"];\")\n        }\n        vertexArgs.push(cube(i,j))\n      }\n    }\n    for(var i=0; i<(1<<dimension); ++i) {\n      vertexArgs.push(pcube(i))\n    }\n    for(var i=0; i<scalarArgs; ++i) {\n      vertexArgs.push(scalar(i))\n    }\n\n    //Generate vertex\n    code.push(\"vertex(\", vertexArgs.join(), \");\",\n      vert(0), \"=\", VERTEX_IDS, \"[\", POINTER, \"]=\", VERTEX_COUNT, \"++;\")\n\n    //Check for face crossings\n    var base = (1<<dimension)-1\n    var corner = pcube(base)\n    for(var j=0; j<dimension; ++j) {\n      if((mask & ~(1<<j))===0) {\n        //Check face\n        var subset = base^(1<<j)\n        var edge = pcube(subset)\n        var faceArgs = [ ]\n        for(var k=subset; k>0; k=(k-1)&subset) {\n          faceArgs.push(VERTEX_IDS + \"[\" + POINTER + \"+\" + pdelta(k) + \"]\")\n        }\n        faceArgs.push(vert(0))\n        for(var k=0; k<arrayArgs; ++k) {\n          if(j&1) {\n            faceArgs.push(cube(k,base), cube(k,subset))\n          } else {\n            faceArgs.push(cube(k,subset), cube(k,base))\n          }\n        }\n        if(j&1) {\n          faceArgs.push(corner, edge)\n        } else {\n          faceArgs.push(edge, corner)\n        }\n        for(var k=0; k<scalarArgs; ++k) {\n          faceArgs.push(scalar(k))\n        }\n        code.push(\"if(\", corner, \"!==\", edge, \"){\",\n          \"face(\", faceArgs.join(), \")}\")\n      }\n    }\n    \n    //Increment pointer, close off if statement\n    code.push(\"}\",\n      POINTER, \"+=1;\")\n  }\n\n  function flip() {\n    for(var j=1; j<(1<<dimension); ++j) {\n      code.push(TEMPORARY, \"=\", pdelta(j), \";\",\n                pdelta(j), \"=\", qcube(j), \";\",\n                qcube(j), \"=\", TEMPORARY, \";\")\n    }\n  }\n\n  function createLoop(i, mask) {\n    if(i < 0) {\n      processGridCell(mask)\n      return\n    }\n    fillEmptySlice(i)\n    code.push(\"if(\", shape(order[i]), \">0){\",\n      index(order[i]), \"=1;\")\n    createLoop(i-1, mask|(1<<order[i]))\n\n    for(var j=0; j<arrayArgs; ++j) {\n      code.push(pointer(j), \"+=\", step(j,order[i]), \";\")\n    }\n    if(i === dimension-1) {\n      code.push(POINTER, \"=0;\")\n      flip()\n    }\n    forLoopBegin(i, 2)\n    createLoop(i-1, mask)\n    if(i === dimension-1) {\n      code.push(\"if(\", index(order[dimension-1]), \"&1){\",\n        POINTER, \"=0;}\")\n      flip()\n    }\n    forLoopEnd(i)\n    code.push(\"}\")\n  }\n\n  createLoop(dimension-1, 0)\n\n  //Release scratch memory\n  code.push(\"freeUint32(\", VERTEX_IDS, \");freeUint32(\", PHASES, \");\")\n\n  //Compile and link procedure\n  var procedureCode = [\n    \"'use strict';\",\n    \"function \", funcName, \"(\", args.join(), \"){\",\n      \"var \", vars.join(), \";\",\n      code.join(\"\"),\n    \"}\",\n    \"return \", funcName ].join(\"\")\n\n  var proc = new Function(\n    \"vertex\", \n    \"face\", \n    \"phase\", \n    \"mallocUint32\", \n    \"freeUint32\",\n    procedureCode)\n  return proc(\n    vertexFunc, \n    faceFunc, \n    phaseFunc, \n    pool.mallocUint32, \n    pool.freeUint32)\n}\n\nfunction createSurfaceExtractor(args) {\n  function error(msg) {\n    throw new Error(\"ndarray-extract-contour: \" + msg)\n  }\n  if(typeof args !== \"object\") {\n    error(\"Must specify arguments\")\n  }\n  var order = args.order\n  if(!Array.isArray(order)) {\n    error(\"Must specify order\")\n  }\n  var arrays = args.arrayArguments||1\n  if(arrays < 1) {\n    error(\"Must have at least one array argument\")\n  }\n  var scalars = args.scalarArguments||0\n  if(scalars < 0) {\n    error(\"Scalar arg count must be > 0\")\n  }\n  if(typeof args.vertex !== \"function\") {\n    error(\"Must specify vertex creation function\")\n  }\n  if(typeof args.cell !== \"function\") {\n    error(\"Must specify cell creation function\")\n  }\n  if(typeof args.phase !== \"function\") {\n    error(\"Must specify phase function\")\n  }\n  var getters = args.getters || []\n  var typesig = new Array(arrays)\n  for(var i=0; i<arrays; ++i) {\n    if(getters.indexOf(i) >= 0) {\n      typesig[i] = true\n    } else {\n      typesig[i] = false\n    }\n  }\n  return compileSurfaceProcedure(\n    args.vertex,\n    args.cell,\n    args.phase,\n    scalars,\n    order,\n    typesig)\n}\n},{\"typedarray-pool\":532}],435:[function(_dereq_,module,exports){\n\"use strict\"\n\n\n\nvar fill = _dereq_('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\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_1_arg1_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_1_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1}],\"thisVars\":[],\"localVars\":[]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"debug\":false,\"funcName\":\"cwise\",\"blockSize\":64})\n\nmodule.exports = function(array, f) {\n  fill(array, f)\n  return array\n}\n\n},{\"cwise/lib/wrapper\":142}],436:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports      = gradient\n\nvar dup             = _dereq_('dup')\nvar cwiseCompiler   = _dereq_('cwise-compiler')\n\nvar TEMPLATE_CACHE  = {}\nvar GRADIENT_CACHE  = {}\n\nvar EmptyProc = {\n  body: \"\",\n  args: [],\n  thisVars: [],\n  localVars: []\n}\n\nvar centralDiff = cwiseCompiler({\n  args: [ 'array', 'array', 'array' ],\n  pre: EmptyProc,\n  post: EmptyProc,\n  body: {\n    args: [ {\n      name: 'out', \n      lvalue: true,\n      rvalue: false,\n      count: 1\n    }, {\n      name: 'left', \n      lvalue: false,\n      rvalue: true,\n      count: 1\n    }, {\n      name: 'right', \n      lvalue: false,\n      rvalue: true,\n      count: 1\n    }],\n    body: \"out=0.5*(left-right)\",\n    thisVars: [],\n    localVars: []\n  },\n  funcName: 'cdiff'\n})\n\nvar zeroOut = cwiseCompiler({\n  args: [ 'array' ],\n  pre: EmptyProc,\n  post: EmptyProc,\n  body: {\n    args: [ {\n      name: 'out', \n      lvalue: true,\n      rvalue: false,\n      count: 1\n    }],\n    body: \"out=0\",\n    thisVars: [],\n    localVars: []\n  },\n  funcName: 'zero'\n})\n\nfunction generateTemplate(d) {\n  if(d in TEMPLATE_CACHE) {\n    return TEMPLATE_CACHE[d]\n  }\n  var code = []\n  for(var i=0; i<d; ++i) {\n    code.push('out', i, 's=0.5*(inp', i, 'l-inp', i, 'r);')\n  }\n  var args = [ 'array' ]\n  var names = ['junk']\n  for(var i=0; i<d; ++i) {\n    args.push('array')\n    names.push('out' + i + 's')\n    var o = dup(d)\n    o[i] = -1\n    args.push({\n      array: 0,\n      offset: o.slice()\n    })\n    o[i] = 1\n    args.push({\n      array: 0,\n      offset: o.slice()\n    })\n    names.push('inp' + i + 'l', 'inp' + i + 'r')\n  }\n  return TEMPLATE_CACHE[d] = cwiseCompiler({\n    args: args,\n    pre:  EmptyProc,\n    post: EmptyProc,\n    body: {\n      body: code.join(''),\n      args: names.map(function(n) {\n        return {\n          name: n,\n          lvalue: n.indexOf('out') === 0,\n          rvalue: n.indexOf('inp') === 0,\n          count: (n!=='junk')|0\n        }\n      }),\n      thisVars: [],\n      localVars: []\n    },\n    funcName: 'fdTemplate' + d\n  })\n}\n\nfunction generateGradient(boundaryConditions) {\n  var token = boundaryConditions.join()\n  var proc = GRADIENT_CACHE[token]\n  if(proc) {\n    return proc\n  }\n\n  var d = boundaryConditions.length\n  var code = ['function gradient(dst,src){var s=src.shape.slice();' ]\n  \n  function handleBoundary(facet) {\n    var cod = d - facet.length\n\n    var loStr = []\n    var hiStr = []\n    var pickStr = []\n    for(var i=0; i<d; ++i) {\n      if(facet.indexOf(i+1) >= 0) {\n        pickStr.push('0')\n      } else if(facet.indexOf(-(i+1)) >= 0) {\n        pickStr.push('s['+i+']-1')\n      } else {\n        pickStr.push('-1')\n        loStr.push('1')\n        hiStr.push('s['+i+']-2')\n      }\n    }\n    var boundStr = '.lo(' + loStr.join() + ').hi(' + hiStr.join() + ')'\n    if(loStr.length === 0) {\n      boundStr = ''\n    }\n        \n    if(cod > 0) {\n      code.push('if(1') \n      for(var i=0; i<d; ++i) {\n        if(facet.indexOf(i+1) >= 0 || facet.indexOf(-(i+1)) >= 0) {\n          continue\n        }\n        code.push('&&s[', i, ']>2')\n      }\n      code.push('){grad', cod, '(src.pick(', pickStr.join(), ')', boundStr)\n      for(var i=0; i<d; ++i) {\n        if(facet.indexOf(i+1) >= 0 || facet.indexOf(-(i+1)) >= 0) {\n          continue\n        }\n        code.push(',dst.pick(', pickStr.join(), ',', i, ')', boundStr)\n      }\n      code.push(');')\n    }\n\n    for(var i=0; i<facet.length; ++i) {\n      var bnd = Math.abs(facet[i])-1\n      var outStr = 'dst.pick(' + pickStr.join() + ',' + bnd + ')' + boundStr\n      switch(boundaryConditions[bnd]) {\n\n        case 'clamp':\n          var cPickStr = pickStr.slice()\n          var dPickStr = pickStr.slice()\n          if(facet[i] < 0) {\n            cPickStr[bnd] = 's[' + bnd + ']-2'\n          } else {\n            dPickStr[bnd] = '1'\n          }\n          if(cod === 0) {\n            code.push('if(s[', bnd, ']>1){dst.set(',\n              pickStr.join(), ',', bnd, ',0.5*(src.get(',\n                cPickStr.join(), ')-src.get(',\n                dPickStr.join(), ')))}else{dst.set(',\n              pickStr.join(), ',', bnd, ',0)};')\n          } else {\n            code.push('if(s[', bnd, ']>1){diff(', outStr, \n                ',src.pick(', cPickStr.join(), ')', boundStr, \n                ',src.pick(', dPickStr.join(), ')', boundStr, \n                ');}else{zero(', outStr, ');};')\n          }\n        break\n\n        case 'mirror':\n          if(cod === 0) {\n            code.push('dst.set(', pickStr.join(), ',', bnd, ',0);')\n          } else {\n            code.push('zero(', outStr, ');')\n          }\n        break\n\n        case 'wrap':\n          var aPickStr = pickStr.slice()\n          var bPickStr = pickStr.slice()\n          if(facet[i] < 0) {\n            aPickStr[bnd] = 's[' + bnd + ']-2'\n            bPickStr[bnd] = '0'\n            \n          } else {\n            aPickStr[bnd] = 's[' + bnd + ']-1'\n            bPickStr[bnd] = '1'\n          }\n          if(cod === 0) {\n            code.push('if(s[', bnd, ']>2){dst.set(',\n              pickStr.join(), ',', bnd, ',0.5*(src.get(',\n                aPickStr.join(), ')-src.get(',\n                bPickStr.join(), ')))}else{dst.set(',\n              pickStr.join(), ',', bnd, ',0)};')\n          } else {\n            code.push('if(s[', bnd, ']>2){diff(', outStr, \n                ',src.pick(', aPickStr.join(), ')', boundStr, \n                ',src.pick(', bPickStr.join(), ')', boundStr, \n                ');}else{zero(', outStr, ');};')\n          }\n        break\n\n        default:\n          throw new Error('ndarray-gradient: Invalid boundary condition')\n      }\n    }\n\n    if(cod > 0) {\n      code.push('};')\n    }\n  }\n\n  //Enumerate ridges, facets, etc. of hypercube\n  for(var i=0; i<(1<<d); ++i) {\n    var faces = []\n    for(var j=0; j<d; ++j) {\n      if(i & (1<<j)) {\n        faces.push(j+1)\n      }\n    }\n    for(var k=0; k<(1<<faces.length); ++k) {\n      var sfaces = faces.slice()\n      for(var j=0; j<faces.length; ++j) {\n        if(k & (1<<j)) {\n          sfaces[j] = -sfaces[j]\n        }\n      }\n      handleBoundary(sfaces)\n    }\n  }\n\n  code.push('return dst;};return gradient')\n\n  //Compile and link routine, save cached procedure\n  var linkNames = [ 'diff', 'zero' ]\n  var linkArgs  = [ centralDiff, zeroOut ]\n  for(var i=1; i<=d; ++i) {\n    linkNames.push('grad' + i)\n    linkArgs.push(generateTemplate(i))\n  }\n  linkNames.push(code.join(''))\n\n  var link = Function.apply(void 0, linkNames)\n  var proc = link.apply(void 0, linkArgs)\n  TEMPLATE_CACHE[token] = proc\n  return proc\n}\n\nfunction gradient(out, inp, bc) {\n  if(Array.isArray(bc)) {\n    if(bc.length !== inp.dimension) {\n      throw new Error('ndarray-gradient: invalid boundary conditions')\n    }\n  } else if(typeof bc === 'string') {\n    bc = dup(inp.dimension, bc)\n  } else {\n    bc = dup(inp.dimension, 'clamp')\n  }\n  if(out.dimension !== inp.dimension + 1) {\n    throw new Error('ndarray-gradient: output dimension must be +1 input dimension')\n  }\n  if(out.shape[inp.dimension] !== inp.dimension) {\n    throw new Error('ndarray-gradient: output shape must match input shape')\n  }\n  for(var i=0; i<inp.dimension; ++i) {\n    if(out.shape[i] !== inp.shape[i]) {\n      throw new Error('ndarray-gradient: shape mismatch')\n    }\n  }\n  if(inp.size === 0) {\n    return out\n  }\n  if(inp.dimension <= 0) {\n    out.set(0)\n    return out\n  }\n  var cached = generateGradient(bc)\n  return cached(out, inp)\n}\n},{\"cwise-compiler\":139,\"dup\":164}],437:[function(_dereq_,module,exports){\n'use strict'\n\nvar warp = _dereq_('ndarray-warp')\nvar invert = _dereq_('gl-matrix-invert')\n\nmodule.exports = applyHomography\n\nfunction applyHomography(dest, src, Xi) {\n  var n = src.dimension\n  var X = invert([], Xi)\n  warp(dest, src, function(out_c, inp_c) {\n    for(var i=0; i<n; ++i) {\n      out_c[i] = X[(n+1)*n + i]\n      for(var j=0; j<n; ++j) {\n        out_c[i] += X[(n+1)*j+i] * inp_c[j]\n      }\n    }\n    var w = X[(n+1)*(n+1)-1]\n    for(var j=0; j<n; ++j) {\n      w += X[(n+1)*j+n] * inp_c[j]\n    }\n    var wr = 1.0 / w\n    for(var i=0; i<n; ++i) {\n      out_c[i] *= wr\n    }\n    return out_c\n  })\n  return dest\n}\n},{\"gl-matrix-invert\":276,\"ndarray-warp\":444}],438:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction interp1d(arr, x) {\n  var ix = Math.floor(x)\n    , fx = x - ix\n    , s0 = 0 <= ix   && ix   < arr.shape[0]\n    , s1 = 0 <= ix+1 && ix+1 < arr.shape[0]\n    , w0 = s0 ? +arr.get(ix)   : 0.0\n    , w1 = s1 ? +arr.get(ix+1) : 0.0\n  return (1.0-fx)*w0 + fx*w1\n}\n\nfunction interp2d(arr, x, y) {\n  var ix = Math.floor(x)\n    , fx = x - ix\n    , s0 = 0 <= ix   && ix   < arr.shape[0]\n    , s1 = 0 <= ix+1 && ix+1 < arr.shape[0]\n    , iy = Math.floor(y)\n    , fy = y - iy\n    , t0 = 0 <= iy   && iy   < arr.shape[1]\n    , t1 = 0 <= iy+1 && iy+1 < arr.shape[1]\n    , w00 = s0&&t0 ? arr.get(ix  ,iy  ) : 0.0\n    , w01 = s0&&t1 ? arr.get(ix  ,iy+1) : 0.0\n    , w10 = s1&&t0 ? arr.get(ix+1,iy  ) : 0.0\n    , w11 = s1&&t1 ? arr.get(ix+1,iy+1) : 0.0\n  return (1.0-fy) * ((1.0-fx)*w00 + fx*w10) + fy * ((1.0-fx)*w01 + fx*w11)\n}\n\nfunction interp3d(arr, x, y, z) {\n  var ix = Math.floor(x)\n    , fx = x - ix\n    , s0 = 0 <= ix   && ix   < arr.shape[0]\n    , s1 = 0 <= ix+1 && ix+1 < arr.shape[0]\n    , iy = Math.floor(y)\n    , fy = y - iy\n    , t0 = 0 <= iy   && iy   < arr.shape[1]\n    , t1 = 0 <= iy+1 && iy+1 < arr.shape[1]\n    , iz = Math.floor(z)\n    , fz = z - iz\n    , u0 = 0 <= iz   && iz   < arr.shape[2]\n    , u1 = 0 <= iz+1 && iz+1 < arr.shape[2]\n    , w000 = s0&&t0&&u0 ? arr.get(ix,iy,iz)       : 0.0\n    , w010 = s0&&t1&&u0 ? arr.get(ix,iy+1,iz)     : 0.0\n    , w100 = s1&&t0&&u0 ? arr.get(ix+1,iy,iz)     : 0.0\n    , w110 = s1&&t1&&u0 ? arr.get(ix+1,iy+1,iz)   : 0.0\n    , w001 = s0&&t0&&u1 ? arr.get(ix,iy,iz+1)     : 0.0\n    , w011 = s0&&t1&&u1 ? arr.get(ix,iy+1,iz+1)   : 0.0\n    , w101 = s1&&t0&&u1 ? arr.get(ix+1,iy,iz+1)   : 0.0\n    , w111 = s1&&t1&&u1 ? arr.get(ix+1,iy+1,iz+1) : 0.0\n  return (1.0-fz) * ((1.0-fy) * ((1.0-fx)*w000 + fx*w100) + fy * ((1.0-fx)*w010 + fx*w110)) + fz * ((1.0-fy) * ((1.0-fx)*w001 + fx*w101) + fy * ((1.0-fx)*w011 + fx*w111))\n}\n\nfunction interpNd(arr) {\n  var d = arr.shape.length|0\n    , ix = new Array(d)\n    , fx = new Array(d)\n    , s0 = new Array(d)\n    , s1 = new Array(d)\n    , i, t\n  for(i=0; i<d; ++i) {\n    t = +arguments[i+1]\n    ix[i] = Math.floor(t)\n    fx[i] = t - ix[i]\n    s0[i] = (0 <= ix[i]   && ix[i]   < arr.shape[i])\n    s1[i] = (0 <= ix[i]+1 && ix[i]+1 < arr.shape[i])\n  }\n  var r = 0.0, j, w, idx\ni_loop:\n  for(i=0; i<(1<<d); ++i) {\n    w = 1.0\n    idx = arr.offset\n    for(j=0; j<d; ++j) {\n      if(i & (1<<j)) {\n        if(!s1[j]) {\n          continue i_loop\n        }\n        w *= fx[j]\n        idx += arr.stride[j] * (ix[j] + 1)\n      } else {\n        if(!s0[j]) {\n          continue i_loop\n        }\n        w *= 1.0 - fx[j]\n        idx += arr.stride[j] * ix[j]\n      }\n    }\n    r += w * arr.data[idx]\n  }\n  return r\n}\n\nfunction interpolate(arr, x, y, z) {\n  switch(arr.shape.length) {\n    case 0:\n      return 0.0\n    case 1:\n      return interp1d(arr, x)\n    case 2:\n      return interp2d(arr, x, y)\n    case 3:\n      return interp3d(arr, x, y, z)\n    default:\n      return interpNd.apply(undefined, arguments)\n  }\n}\nmodule.exports = interpolate\nmodule.exports.d1 = interp1d\nmodule.exports.d2 = interp2d\nmodule.exports.d3 = interp3d\n\n},{}],439:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar compile = _dereq_(\"cwise-compiler\")\n\nvar EmptyProc = {\n  body: \"\",\n  args: [],\n  thisVars: [],\n  localVars: []\n}\n\nfunction fixup(x) {\n  if(!x) {\n    return EmptyProc\n  }\n  for(var i=0; i<x.args.length; ++i) {\n    var a = x.args[i]\n    if(i === 0) {\n      x.args[i] = {name: a, lvalue:true, rvalue: !!x.rvalue, count:x.count||1 }\n    } else {\n      x.args[i] = {name: a, lvalue:false, rvalue:true, count: 1}\n    }\n  }\n  if(!x.thisVars) {\n    x.thisVars = []\n  }\n  if(!x.localVars) {\n    x.localVars = []\n  }\n  return x\n}\n\nfunction pcompile(user_args) {\n  return compile({\n    args:     user_args.args,\n    pre:      fixup(user_args.pre),\n    body:     fixup(user_args.body),\n    post:     fixup(user_args.proc),\n    funcName: user_args.funcName\n  })\n}\n\nfunction makeOp(user_args) {\n  var args = []\n  for(var i=0; i<user_args.args.length; ++i) {\n    args.push(\"a\"+i)\n  }\n  var wrapper = new Function(\"P\", [\n    \"return function \", user_args.funcName, \"_ndarrayops(\", args.join(\",\"), \") {P(\", args.join(\",\"), \");return a0}\"\n  ].join(\"\"))\n  return wrapper(pcompile(user_args))\n}\n\nvar assign_ops = {\n  add:  \"+\",\n  sub:  \"-\",\n  mul:  \"*\",\n  div:  \"/\",\n  mod:  \"%\",\n  band: \"&\",\n  bor:  \"|\",\n  bxor: \"^\",\n  lshift: \"<<\",\n  rshift: \">>\",\n  rrshift: \">>>\"\n}\n;(function(){\n  for(var id in assign_ops) {\n    var op = assign_ops[id]\n    exports[id] = makeOp({\n      args: [\"array\",\"array\",\"array\"],\n      body: {args:[\"a\",\"b\",\"c\"],\n             body: \"a=b\"+op+\"c\"},\n      funcName: id\n    })\n    exports[id+\"eq\"] = makeOp({\n      args: [\"array\",\"array\"],\n      body: {args:[\"a\",\"b\"],\n             body:\"a\"+op+\"=b\"},\n      rvalue: true,\n      funcName: id+\"eq\"\n    })\n    exports[id+\"s\"] = makeOp({\n      args: [\"array\", \"array\", \"scalar\"],\n      body: {args:[\"a\",\"b\",\"s\"],\n             body:\"a=b\"+op+\"s\"},\n      funcName: id+\"s\"\n    })\n    exports[id+\"seq\"] = makeOp({\n      args: [\"array\",\"scalar\"],\n      body: {args:[\"a\",\"s\"],\n             body:\"a\"+op+\"=s\"},\n      rvalue: true,\n      funcName: id+\"seq\"\n    })\n  }\n})();\n\nvar unary_ops = {\n  not: \"!\",\n  bnot: \"~\",\n  neg: \"-\",\n  recip: \"1.0/\"\n}\n;(function(){\n  for(var id in unary_ops) {\n    var op = unary_ops[id]\n    exports[id] = makeOp({\n      args: [\"array\", \"array\"],\n      body: {args:[\"a\",\"b\"],\n             body:\"a=\"+op+\"b\"},\n      funcName: id\n    })\n    exports[id+\"eq\"] = makeOp({\n      args: [\"array\"],\n      body: {args:[\"a\"],\n             body:\"a=\"+op+\"a\"},\n      rvalue: true,\n      count: 2,\n      funcName: id+\"eq\"\n    })\n  }\n})();\n\nvar binary_ops = {\n  and: \"&&\",\n  or: \"||\",\n  eq: \"===\",\n  neq: \"!==\",\n  lt: \"<\",\n  gt: \">\",\n  leq: \"<=\",\n  geq: \">=\"\n}\n;(function() {\n  for(var id in binary_ops) {\n    var op = binary_ops[id]\n    exports[id] = makeOp({\n      args: [\"array\",\"array\",\"array\"],\n      body: {args:[\"a\", \"b\", \"c\"],\n             body:\"a=b\"+op+\"c\"},\n      funcName: id\n    })\n    exports[id+\"s\"] = makeOp({\n      args: [\"array\",\"array\",\"scalar\"],\n      body: {args:[\"a\", \"b\", \"s\"],\n             body:\"a=b\"+op+\"s\"},\n      funcName: id+\"s\"\n    })\n    exports[id+\"eq\"] = makeOp({\n      args: [\"array\", \"array\"],\n      body: {args:[\"a\", \"b\"],\n             body:\"a=a\"+op+\"b\"},\n      rvalue:true,\n      count:2,\n      funcName: id+\"eq\"\n    })\n    exports[id+\"seq\"] = makeOp({\n      args: [\"array\", \"scalar\"],\n      body: {args:[\"a\",\"s\"],\n             body:\"a=a\"+op+\"s\"},\n      rvalue:true,\n      count:2,\n      funcName: id+\"seq\"\n    })\n  }\n})();\n\nvar math_unary = [\n  \"abs\",\n  \"acos\",\n  \"asin\",\n  \"atan\",\n  \"ceil\",\n  \"cos\",\n  \"exp\",\n  \"floor\",\n  \"log\",\n  \"round\",\n  \"sin\",\n  \"sqrt\",\n  \"tan\"\n]\n;(function() {\n  for(var i=0; i<math_unary.length; ++i) {\n    var f = math_unary[i]\n    exports[f] = makeOp({\n                    args: [\"array\", \"array\"],\n                    pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                    body: {args:[\"a\",\"b\"], body:\"a=this_f(b)\", thisVars:[\"this_f\"]},\n                    funcName: f\n                  })\n    exports[f+\"eq\"] = makeOp({\n                      args: [\"array\"],\n                      pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                      body: {args: [\"a\"], body:\"a=this_f(a)\", thisVars:[\"this_f\"]},\n                      rvalue: true,\n                      count: 2,\n                      funcName: f+\"eq\"\n                    })\n  }\n})();\n\nvar math_comm = [\n  \"max\",\n  \"min\",\n  \"atan2\",\n  \"pow\"\n]\n;(function(){\n  for(var i=0; i<math_comm.length; ++i) {\n    var f= math_comm[i]\n    exports[f] = makeOp({\n                  args:[\"array\", \"array\", \"array\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\",\"c\"], body:\"a=this_f(b,c)\", thisVars:[\"this_f\"]},\n                  funcName: f\n                })\n    exports[f+\"s\"] = makeOp({\n                  args:[\"array\", \"array\", \"scalar\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\",\"c\"], body:\"a=this_f(b,c)\", thisVars:[\"this_f\"]},\n                  funcName: f+\"s\"\n                  })\n    exports[f+\"eq\"] = makeOp({ args:[\"array\", \"array\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\"], body:\"a=this_f(a,b)\", thisVars:[\"this_f\"]},\n                  rvalue: true,\n                  count: 2,\n                  funcName: f+\"eq\"\n                  })\n    exports[f+\"seq\"] = makeOp({ args:[\"array\", \"scalar\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\"], body:\"a=this_f(a,b)\", thisVars:[\"this_f\"]},\n                  rvalue:true,\n                  count:2,\n                  funcName: f+\"seq\"\n                  })\n  }\n})();\n\nvar math_noncomm = [\n  \"atan2\",\n  \"pow\"\n]\n;(function(){\n  for(var i=0; i<math_noncomm.length; ++i) {\n    var f= math_noncomm[i]\n    exports[f+\"op\"] = makeOp({\n                  args:[\"array\", \"array\", \"array\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\",\"c\"], body:\"a=this_f(c,b)\", thisVars:[\"this_f\"]},\n                  funcName: f+\"op\"\n                })\n    exports[f+\"ops\"] = makeOp({\n                  args:[\"array\", \"array\", \"scalar\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\",\"c\"], body:\"a=this_f(c,b)\", thisVars:[\"this_f\"]},\n                  funcName: f+\"ops\"\n                  })\n    exports[f+\"opeq\"] = makeOp({ args:[\"array\", \"array\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\"], body:\"a=this_f(b,a)\", thisVars:[\"this_f\"]},\n                  rvalue: true,\n                  count: 2,\n                  funcName: f+\"opeq\"\n                  })\n    exports[f+\"opseq\"] = makeOp({ args:[\"array\", \"scalar\"],\n                  pre: {args:[], body:\"this_f=Math.\"+f, thisVars:[\"this_f\"]},\n                  body: {args:[\"a\",\"b\"], body:\"a=this_f(b,a)\", thisVars:[\"this_f\"]},\n                  rvalue:true,\n                  count:2,\n                  funcName: f+\"opseq\"\n                  })\n  }\n})();\n\nexports.any = compile({\n  args:[\"array\"],\n  pre: EmptyProc,\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:1}], body: \"if(a){return true}\", localVars: [], thisVars: []},\n  post: {args:[], localVars:[], thisVars:[], body:\"return false\"},\n  funcName: \"any\"\n})\n\nexports.all = compile({\n  args:[\"array\"],\n  pre: EmptyProc,\n  body: {args:[{name:\"x\", lvalue:false, rvalue:true, count:1}], body: \"if(!x){return false}\", localVars: [], thisVars: []},\n  post: {args:[], localVars:[], thisVars:[], body:\"return true\"},\n  funcName: \"all\"\n})\n\nexports.sum = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:1}], body: \"this_s+=a\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n  funcName: \"sum\"\n})\n\nexports.prod = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=1\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:1}], body: \"this_s*=a\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n  funcName: \"prod\"\n})\n\nexports.norm2squared = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:2}], body: \"this_s+=a*a\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n  funcName: \"norm2squared\"\n})\n  \nexports.norm2 = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:2}], body: \"this_s+=a*a\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return Math.sqrt(this_s)\"},\n  funcName: \"norm2\"\n})\n  \n\nexports.norminf = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:4}], body:\"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n  funcName: \"norminf\"\n})\n\nexports.norm1 = compile({\n  args:[\"array\"],\n  pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n  body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:3}], body: \"this_s+=a<0?-a:a\", localVars: [], thisVars: [\"this_s\"]},\n  post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n  funcName: \"norm1\"\n})\n\nexports.sup = compile({\n  args: [ \"array\" ],\n  pre:\n   { body: \"this_h=-Infinity\",\n     args: [],\n     thisVars: [ \"this_h\" ],\n     localVars: [] },\n  body:\n   { body: \"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_\",\n     args: [{\"name\":\"_inline_1_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":2} ],\n     thisVars: [ \"this_h\" ],\n     localVars: [] },\n  post:\n   { body: \"return this_h\",\n     args: [],\n     thisVars: [ \"this_h\" ],\n     localVars: [] }\n })\n\nexports.inf = compile({\n  args: [ \"array\" ],\n  pre:\n   { body: \"this_h=Infinity\",\n     args: [],\n     thisVars: [ \"this_h\" ],\n     localVars: [] },\n  body:\n   { body: \"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_\",\n     args: [{\"name\":\"_inline_1_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":2} ],\n     thisVars: [ \"this_h\" ],\n     localVars: [] },\n  post:\n   { body: \"return this_h\",\n     args: [],\n     thisVars: [ \"this_h\" ],\n     localVars: [] }\n })\n\nexports.argmin = compile({\n  args:[\"index\",\"array\",\"shape\"],\n  pre:{\n    body:\"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}\",\n    args:[\n      {name:\"_inline_0_arg0_\",lvalue:false,rvalue:false,count:0},\n      {name:\"_inline_0_arg1_\",lvalue:false,rvalue:false,count:0},\n      {name:\"_inline_0_arg2_\",lvalue:false,rvalue:true,count:1}\n      ],\n    thisVars:[\"this_i\",\"this_v\"],\n    localVars:[]},\n  body:{\n    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]}}}\",\n    args:[\n      {name:\"_inline_1_arg0_\",lvalue:false,rvalue:true,count:2},\n      {name:\"_inline_1_arg1_\",lvalue:false,rvalue:true,count:2}],\n    thisVars:[\"this_i\",\"this_v\"],\n    localVars:[\"_inline_1_k\"]},\n  post:{\n    body:\"{return this_i}\",\n    args:[],\n    thisVars:[\"this_i\"],\n    localVars:[]}\n})\n\nexports.argmax = compile({\n  args:[\"index\",\"array\",\"shape\"],\n  pre:{\n    body:\"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}\",\n    args:[\n      {name:\"_inline_0_arg0_\",lvalue:false,rvalue:false,count:0},\n      {name:\"_inline_0_arg1_\",lvalue:false,rvalue:false,count:0},\n      {name:\"_inline_0_arg2_\",lvalue:false,rvalue:true,count:1}\n      ],\n    thisVars:[\"this_i\",\"this_v\"],\n    localVars:[]},\n  body:{\n    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]}}}\",\n    args:[\n      {name:\"_inline_1_arg0_\",lvalue:false,rvalue:true,count:2},\n      {name:\"_inline_1_arg1_\",lvalue:false,rvalue:true,count:2}],\n    thisVars:[\"this_i\",\"this_v\"],\n    localVars:[\"_inline_1_k\"]},\n  post:{\n    body:\"{return this_i}\",\n    args:[],\n    thisVars:[\"this_i\"],\n    localVars:[]}\n})  \n\nexports.random = makeOp({\n  args: [\"array\"],\n  pre: {args:[], body:\"this_f=Math.random\", thisVars:[\"this_f\"]},\n  body: {args: [\"a\"], body:\"a=this_f()\", thisVars:[\"this_f\"]},\n  funcName: \"random\"\n})\n\nexports.assign = makeOp({\n  args:[\"array\", \"array\"],\n  body: {args:[\"a\", \"b\"], body:\"a=b\"},\n  funcName: \"assign\" })\n\nexports.assigns = makeOp({\n  args:[\"array\", \"scalar\"],\n  body: {args:[\"a\", \"b\"], body:\"a=b\"},\n  funcName: \"assigns\" })\n\n\nexports.equals = compile({\n  args:[\"array\", \"array\"],\n  pre: EmptyProc,\n  body: {args:[{name:\"x\", lvalue:false, rvalue:true, count:1},\n               {name:\"y\", lvalue:false, rvalue:true, count:1}], \n        body: \"if(x!==y){return false}\", \n        localVars: [], \n        thisVars: []},\n  post: {args:[], localVars:[], thisVars:[], body:\"return true\"},\n  funcName: \"equals\"\n})\n\n\n\n},{\"cwise-compiler\":139}],440:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar ndarray = _dereq_(\"ndarray\")\nvar do_convert = _dereq_(\"./doConvert.js\")\n\nmodule.exports = function convert(arr, result) {\n  var shape = [], c = arr, sz = 1\n  while(Array.isArray(c)) {\n    shape.push(c.length)\n    sz *= c.length\n    c = c[0]\n  }\n  if(shape.length === 0) {\n    return ndarray()\n  }\n  if(!result) {\n    result = ndarray(new Float64Array(sz), shape)\n  }\n  do_convert(result, arr)\n  return result\n}\n\n},{\"./doConvert.js\":441,\"ndarray\":445}],441:[function(_dereq_,module,exports){\nmodule.exports=_dereq_('cwise-compiler')({\"args\":[\"array\",\"scalar\",\"index\"],\"pre\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"body\":{\"body\":\"{\\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\\n}\\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\\n}\",\"args\":[{\"name\":\"_inline_1_arg0_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_1_arg1_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_1_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":4}],\"thisVars\":[],\"localVars\":[\"_inline_1_i\",\"_inline_1_v\"]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"funcName\":\"convert\",\"blockSize\":64})\n\n},{\"cwise-compiler\":139}],442:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar pool = _dereq_(\"typedarray-pool\")\n\nvar INSERTION_SORT_THRESHOLD = 32\n\nfunction getMallocFree(dtype) {\n  switch(dtype) {\n    case \"uint8\":\n      return [pool.mallocUint8, pool.freeUint8]\n    case \"uint16\":\n      return [pool.mallocUint16, pool.freeUint16]\n    case \"uint32\":\n      return [pool.mallocUint32, pool.freeUint32]\n    case \"int8\":\n      return [pool.mallocInt8, pool.freeInt8]\n    case \"int16\":\n      return [pool.mallocInt16, pool.freeInt16]\n    case \"int32\":\n      return [pool.mallocInt32, pool.freeInt32]\n    case \"float32\":\n      return [pool.mallocFloat, pool.freeFloat]\n    case \"float64\":\n      return [pool.mallocDouble, pool.freeDouble]\n    default:\n      return null\n  }\n}\n\nfunction shapeArgs(dimension) {\n  var args = []\n  for(var i=0; i<dimension; ++i) {\n    args.push(\"s\"+i)\n  }\n  for(var i=0; i<dimension; ++i) {\n    args.push(\"n\"+i)\n  }\n  for(var i=1; i<dimension; ++i) {\n    args.push(\"d\"+i)\n  }\n  for(var i=1; i<dimension; ++i) {\n    args.push(\"e\"+i)\n  }\n  for(var i=1; i<dimension; ++i) {\n    args.push(\"f\"+i)\n  }\n  return args\n}\n\nfunction createInsertionSort(order, dtype) {\n\n  var code = [\"'use strict'\"]\n  var funcName = [\"ndarrayInsertionSort\", order.join(\"d\"), dtype].join(\"\")\n  var funcArgs = [\"left\", \"right\", \"data\", \"offset\" ].concat(shapeArgs(order.length))\n  var allocator = getMallocFree(dtype)\n  \n  var vars = [ \"i,j,cptr,ptr=left*s0+offset\" ]\n  \n  if(order.length > 1) {\n    var scratch_shape = []\n    for(var i=1; i<order.length; ++i) {\n      vars.push(\"i\"+i)\n      scratch_shape.push(\"n\"+i)\n    }\n    if(allocator) {\n      vars.push(\"scratch=malloc(\" + scratch_shape.join(\"*\") + \")\")\n    } else {\n      vars.push(\"scratch=new Array(\"+scratch_shape.join(\"*\") + \")\")\n    }\n    vars.push(\"dptr\",\"sptr\",\"a\",\"b\")\n  } else {\n    vars.push(\"scratch\")\n  }\n  \n  function dataRead(ptr) {\n    if(dtype === \"generic\") {\n      return [\"data.get(\", ptr, \")\"].join(\"\")\n    }\n    return [\"data[\",ptr,\"]\"].join(\"\")\n  }\n  \n  function dataWrite(ptr, v) {\n    if(dtype === \"generic\") {\n      return [\"data.set(\", ptr, \",\", v, \")\"].join(\"\")\n    }\n    return [\"data[\",ptr,\"]=\",v].join(\"\")\n  }\n  \n  //Create function header\n  code.push(\n    [\"function \", funcName, \"(\", funcArgs.join(\",\"), \"){var \", vars.join(\",\")].join(\"\"),\n      \"for(i=left+1;i<=right;++i){\",\n        \"j=i;ptr+=s0\",\n        \"cptr=ptr\")\n  \n  \n  if(order.length > 1) {\n  \n    //Copy data into scratch\n    code.push(\"dptr=0;sptr=ptr\")\n    for(var i=order.length-1; i>=0; --i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push([\"for(i\",j,\"=0;i\",j,\"<n\",j,\";++i\",j,\"){\"].join(\"\"))\n    }\n    code.push(\"scratch[dptr++]=\",dataRead(\"sptr\"))\n    for(var i=0; i<order.length; ++i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push(\"sptr+=d\"+j,\"}\")\n    }\n\n    \n    //Compare items in outer loop\n    code.push(\"__g:while(j-->left){\",\n              \"dptr=0\",\n              \"sptr=cptr-s0\")\n    for(var i=1; i<order.length; ++i) {\n      if(i === 1) {\n        code.push(\"__l:\")\n      }\n      code.push([\"for(i\",i,\"=0;i\",i,\"<n\",i,\";++i\",i,\"){\"].join(\"\"))\n    }\n    code.push([\"a=\", dataRead(\"sptr\"),\"\\nb=scratch[dptr]\\nif(a<b){break __g}\\nif(a>b){break __l}\"].join(\"\"))\n    for(var i=order.length-1; i>=1; --i) {\n      code.push(\n        \"sptr+=e\"+i,\n        \"dptr+=f\"+i,\n        \"}\")\n    }\n    \n    //Copy data back\n    code.push(\"dptr=cptr;sptr=cptr-s0\")\n    for(var i=order.length-1; i>=0; --i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push([\"for(i\",j,\"=0;i\",j,\"<n\",j,\";++i\",j,\"){\"].join(\"\"))\n    }\n    code.push(dataWrite(\"dptr\", dataRead(\"sptr\")))\n    for(var i=0; i<order.length; ++i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push([\"dptr+=d\",j,\";sptr+=d\",j].join(\"\"),\"}\")\n    }\n    \n    //Close while loop\n    code.push(\"cptr-=s0\\n}\")\n\n    //Copy scratch into cptr\n    code.push(\"dptr=cptr;sptr=0\")\n    for(var i=order.length-1; i>=0; --i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push([\"for(i\",j,\"=0;i\",j,\"<n\",j,\";++i\",j,\"){\"].join(\"\"))\n    }\n    code.push(dataWrite(\"dptr\", \"scratch[sptr++]\"))\n    for(var i=0; i<order.length; ++i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push(\"dptr+=d\"+j,\"}\")\n    }\n  } else {\n    code.push(\"scratch=\" + dataRead(\"ptr\"),\n              \"while((j-->left)&&(\"+dataRead(\"cptr-s0\")+\">scratch)){\",\n                dataWrite(\"cptr\", dataRead(\"cptr-s0\")),\n                \"cptr-=s0\",\n              \"}\",\n              dataWrite(\"cptr\", \"scratch\"))\n  }\n  \n  //Close outer loop body\n  code.push(\"}\")\n  if(order.length > 1 && allocator) {\n    code.push(\"free(scratch)\")\n  }\n  code.push(\"} return \" + funcName)\n  \n  //Compile and link function\n  if(allocator) {\n    var result = new Function(\"malloc\", \"free\", code.join(\"\\n\"))\n    return result(allocator[0], allocator[1])\n  } else {\n    var result = new Function(code.join(\"\\n\"))\n    return result()\n  }\n}\n\nfunction createQuickSort(order, dtype, insertionSort) {\n  var code = [ \"'use strict'\" ]\n  var funcName = [\"ndarrayQuickSort\", order.join(\"d\"), dtype].join(\"\")\n  var funcArgs = [\"left\", \"right\", \"data\", \"offset\" ].concat(shapeArgs(order.length))\n  var allocator = getMallocFree(dtype)\n  var labelCounter=0\n  \n  code.push([\"function \", funcName, \"(\", funcArgs.join(\",\"), \"){\"].join(\"\"))\n  \n  var vars = [\n    \"sixth=((right-left+1)/6)|0\",\n    \"index1=left+sixth\",\n    \"index5=right-sixth\",\n    \"index3=(left+right)>>1\",\n    \"index2=index3-sixth\",\n    \"index4=index3+sixth\",\n    \"el1=index1\",\n    \"el2=index2\",\n    \"el3=index3\",\n    \"el4=index4\",\n    \"el5=index5\",\n    \"less=left+1\",\n    \"great=right-1\",\n    \"pivots_are_equal=true\",\n    \"tmp\",\n    \"tmp0\",\n    \"x\",\n    \"y\",\n    \"z\",\n    \"k\",\n    \"ptr0\",\n    \"ptr1\",\n    \"ptr2\",\n    \"comp_pivot1=0\",\n    \"comp_pivot2=0\",\n    \"comp=0\"\n  ]\n  \n  if(order.length > 1) {\n    var ele_size = []\n    for(var i=1; i<order.length; ++i) {\n      ele_size.push(\"n\"+i)\n      vars.push(\"i\"+i)\n    }\n    for(var i=0; i<8; ++i) {\n      vars.push(\"b_ptr\"+i)\n    }\n    vars.push(\n      \"ptr3\",\n      \"ptr4\",\n      \"ptr5\",\n      \"ptr6\",\n      \"ptr7\",\n      \"pivot_ptr\",\n      \"ptr_shift\",\n      \"elementSize=\"+ele_size.join(\"*\"))\n    if(allocator) {\n      vars.push(\"pivot1=malloc(elementSize)\",\n                \"pivot2=malloc(elementSize)\")\n    } else {\n      vars.push(\"pivot1=new Array(elementSize),pivot2=new Array(elementSize)\")\n    }\n  } else {\n    vars.push(\"pivot1\", \"pivot2\")\n  }\n  \n  //Initialize local variables\n  code.push(\"var \" + vars.join(\",\"))\n  \n  function toPointer(v) {\n    return [\"(offset+\",v,\"*s0)\"].join(\"\")\n  }\n  \n  function dataRead(ptr) {\n    if(dtype === \"generic\") {\n      return [\"data.get(\", ptr, \")\"].join(\"\")\n    }\n    return [\"data[\",ptr,\"]\"].join(\"\")\n  }\n  \n  function dataWrite(ptr, v) {\n    if(dtype === \"generic\") {\n      return [\"data.set(\", ptr, \",\", v, \")\"].join(\"\")\n    }\n    return [\"data[\",ptr,\"]=\",v].join(\"\")\n  }\n  \n  function cacheLoop(ptrs, usePivot, body) {\n    if(ptrs.length === 1) {\n      code.push(\"ptr0=\"+toPointer(ptrs[0]))\n    } else {\n      for(var i=0; i<ptrs.length; ++i) {\n        code.push([\"b_ptr\",i,\"=s0*\",ptrs[i]].join(\"\"))\n      }\n    }\n    if(usePivot) {\n      code.push(\"pivot_ptr=0\")\n    }\n    code.push(\"ptr_shift=offset\")\n    for(var i=order.length-1; i>=0; --i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      code.push([\"for(i\",j,\"=0;i\",j,\"<n\",j,\";++i\",j,\"){\"].join(\"\"))\n    }\n    if(ptrs.length > 1) {\n      for(var i=0; i<ptrs.length; ++i) {\n        code.push([\"ptr\",i,\"=b_ptr\",i,\"+ptr_shift\"].join(\"\"))\n      }\n    }\n    code.push(body)\n    if(usePivot) {\n      code.push(\"++pivot_ptr\")\n    }\n    for(var i=0; i<order.length; ++i) {\n      var j = order[i]\n      if(j === 0) {\n        continue\n      }\n      if(ptrs.length>1) {\n        code.push(\"ptr_shift+=d\"+j)\n      } else {\n        code.push(\"ptr0+=d\"+j)\n      }\n      code.push(\"}\")\n    }\n  }\n  \n  function lexicoLoop(label, ptrs, usePivot, body) {\n    if(ptrs.length === 1) {\n      code.push(\"ptr0=\"+toPointer(ptrs[0]))\n    } else {\n      for(var i=0; i<ptrs.length; ++i) {\n        code.push([\"b_ptr\",i,\"=s0*\",ptrs[i]].join(\"\"))\n      }\n      code.push(\"ptr_shift=offset\")\n    }\n    if(usePivot) {\n      code.push(\"pivot_ptr=0\")\n    }\n    if(label) {\n      code.push(label+\":\")\n    }\n    for(var i=1; i<order.length; ++i) {\n      code.push([\"for(i\",i,\"=0;i\",i,\"<n\",i,\";++i\",i,\"){\"].join(\"\"))\n    }\n    if(ptrs.length > 1) {\n      for(var i=0; i<ptrs.length; ++i) {\n        code.push([\"ptr\",i,\"=b_ptr\",i,\"+ptr_shift\"].join(\"\"))\n      }\n    }\n    code.push(body)\n    for(var i=order.length-1; i>=1; --i) {\n      if(usePivot) {\n        code.push(\"pivot_ptr+=f\"+i)\n      }\n      if(ptrs.length > 1) {\n        code.push(\"ptr_shift+=e\"+i)\n      } else {\n        code.push(\"ptr0+=e\"+i)\n      }\n      code.push(\"}\")\n    }\n  }\n  \n  function cleanUp() {\n    if(order.length > 1 && allocator) {\n      code.push(\"free(pivot1)\", \"free(pivot2)\")\n    }\n  }\n  \n  function compareSwap(a_id, b_id) {\n    var a = \"el\"+a_id\n    var b = \"el\"+b_id\n    if(order.length > 1) {\n      var lbl = \"__l\" + (++labelCounter)\n      lexicoLoop(lbl, [a, b], false, [\n        \"comp=\",dataRead(\"ptr0\"),\"-\",dataRead(\"ptr1\"),\"\\n\",\n        \"if(comp>0){tmp0=\", a, \";\",a,\"=\",b,\";\", b,\"=tmp0;break \", lbl,\"}\\n\",\n        \"if(comp<0){break \", lbl, \"}\"\n      ].join(\"\"))\n    } else {\n      code.push([\"if(\", dataRead(toPointer(a)), \">\", dataRead(toPointer(b)), \"){tmp0=\", a, \";\",a,\"=\",b,\";\", b,\"=tmp0}\"].join(\"\"))\n    }\n  }\n  \n  compareSwap(1, 2)\n  compareSwap(4, 5)\n  compareSwap(1, 3)\n  compareSwap(2, 3)\n  compareSwap(1, 4)\n  compareSwap(3, 4)\n  compareSwap(2, 5)\n  compareSwap(2, 3)\n  compareSwap(4, 5)\n  \n  if(order.length > 1) {\n    cacheLoop([\"el1\", \"el2\", \"el3\", \"el4\", \"el5\", \"index1\", \"index3\", \"index5\"], true, [\n      \"pivot1[pivot_ptr]=\",dataRead(\"ptr1\"),\"\\n\",\n      \"pivot2[pivot_ptr]=\",dataRead(\"ptr3\"),\"\\n\",\n      \"pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\\n\",\n      \"x=\",dataRead(\"ptr0\"),\"\\n\",\n      \"y=\",dataRead(\"ptr2\"),\"\\n\",\n      \"z=\",dataRead(\"ptr4\"),\"\\n\",\n      dataWrite(\"ptr5\", \"x\"),\"\\n\",\n      dataWrite(\"ptr6\", \"y\"),\"\\n\",\n      dataWrite(\"ptr7\", \"z\")\n    ].join(\"\"))\n  } else {\n    code.push([\n      \"pivot1=\", dataRead(toPointer(\"el2\")), \"\\n\",\n      \"pivot2=\", dataRead(toPointer(\"el4\")), \"\\n\",\n      \"pivots_are_equal=pivot1===pivot2\\n\",\n      \"x=\", dataRead(toPointer(\"el1\")), \"\\n\",\n      \"y=\", dataRead(toPointer(\"el3\")), \"\\n\",\n      \"z=\", dataRead(toPointer(\"el5\")), \"\\n\",\n      dataWrite(toPointer(\"index1\"), \"x\"), \"\\n\",\n      dataWrite(toPointer(\"index3\"), \"y\"), \"\\n\",\n      dataWrite(toPointer(\"index5\"), \"z\")\n    ].join(\"\"))\n  }\n  \n\n  function moveElement(dst, src) {\n    if(order.length > 1) {\n      cacheLoop([dst, src], false,\n        dataWrite(\"ptr0\", dataRead(\"ptr1\"))\n      )\n    } else {\n      code.push(dataWrite(toPointer(dst), dataRead(toPointer(src))))\n    }\n  }\n  \n  moveElement(\"index2\", \"left\")\n  moveElement(\"index4\", \"right\")\n  \n  function comparePivot(result, ptr, n) {\n    if(order.length > 1) {\n      var lbl = \"__l\" + (++labelCounter)\n      lexicoLoop(lbl, [ptr], true, [\n        result,\"=\",dataRead(\"ptr0\"),\"-pivot\",n,\"[pivot_ptr]\\n\",\n        \"if(\",result,\"!==0){break \", lbl, \"}\"\n      ].join(\"\"))\n    } else {\n      code.push([result,\"=\", dataRead(toPointer(ptr)), \"-pivot\", n].join(\"\"))\n    }\n  }\n  \n  function swapElements(a, b) {\n    if(order.length > 1) {\n      cacheLoop([a,b],false,[\n        \"tmp=\",dataRead(\"ptr0\"),\"\\n\",\n        dataWrite(\"ptr0\", dataRead(\"ptr1\")),\"\\n\",\n        dataWrite(\"ptr1\", \"tmp\")\n      ].join(\"\"))\n    } else {\n      code.push([\n        \"ptr0=\",toPointer(a),\"\\n\",\n        \"ptr1=\",toPointer(b),\"\\n\",\n        \"tmp=\",dataRead(\"ptr0\"),\"\\n\",\n        dataWrite(\"ptr0\", dataRead(\"ptr1\")),\"\\n\",\n        dataWrite(\"ptr1\", \"tmp\")\n      ].join(\"\"))\n    }\n  }\n  \n  function tripleSwap(k, less, great) {\n    if(order.length > 1) {\n      cacheLoop([k,less,great], false, [\n        \"tmp=\",dataRead(\"ptr0\"),\"\\n\",\n        dataWrite(\"ptr0\", dataRead(\"ptr1\")),\"\\n\",\n        dataWrite(\"ptr1\", dataRead(\"ptr2\")),\"\\n\",\n        dataWrite(\"ptr2\", \"tmp\")\n      ].join(\"\"))\n      code.push(\"++\"+less, \"--\"+great)\n    } else {\n      code.push([\n        \"ptr0=\",toPointer(k),\"\\n\",\n        \"ptr1=\",toPointer(less),\"\\n\",\n        \"ptr2=\",toPointer(great),\"\\n\",\n        \"++\",less,\"\\n\",\n        \"--\",great,\"\\n\",\n        \"tmp=\", dataRead(\"ptr0\"), \"\\n\",\n        dataWrite(\"ptr0\", dataRead(\"ptr1\")), \"\\n\",\n        dataWrite(\"ptr1\", dataRead(\"ptr2\")), \"\\n\",\n        dataWrite(\"ptr2\", \"tmp\")\n      ].join(\"\"))\n    }\n  }\n  \n  function swapAndDecrement(k, great) {\n    swapElements(k, great)\n    code.push(\"--\"+great)\n  }\n    \n  code.push(\"if(pivots_are_equal){\")\n    //Pivots are equal case\n    code.push(\"for(k=less;k<=great;++k){\")\n      comparePivot(\"comp\", \"k\", 1)\n      code.push(\"if(comp===0){continue}\")\n      code.push(\"if(comp<0){\")\n        code.push(\"if(k!==less){\")\n          swapElements(\"k\", \"less\")\n        code.push(\"}\")\n        code.push(\"++less\")\n      code.push(\"}else{\")\n        code.push(\"while(true){\")\n          comparePivot(\"comp\", \"great\", 1)\n          code.push(\"if(comp>0){\")\n            code.push(\"great--\")\n          code.push(\"}else if(comp<0){\")\n            tripleSwap(\"k\", \"less\", \"great\")\n            code.push(\"break\")\n          code.push(\"}else{\")\n            swapAndDecrement(\"k\", \"great\")\n            code.push(\"break\")\n          code.push(\"}\")\n        code.push(\"}\")\n      code.push(\"}\")\n    code.push(\"}\")\n  code.push(\"}else{\")\n    //Pivots not equal case\n    code.push(\"for(k=less;k<=great;++k){\")\n      comparePivot(\"comp_pivot1\", \"k\", 1)\n      code.push(\"if(comp_pivot1<0){\")\n        code.push(\"if(k!==less){\")\n          swapElements(\"k\", \"less\")\n        code.push(\"}\")\n        code.push(\"++less\")\n      code.push(\"}else{\")\n        comparePivot(\"comp_pivot2\", \"k\", 2)\n        code.push(\"if(comp_pivot2>0){\")\n          code.push(\"while(true){\")\n            comparePivot(\"comp\", \"great\", 2)\n            code.push(\"if(comp>0){\")\n              code.push(\"if(--great<k){break}\")\n              code.push(\"continue\")\n            code.push(\"}else{\")\n              comparePivot(\"comp\", \"great\", 1)\n              code.push(\"if(comp<0){\")\n                tripleSwap(\"k\", \"less\", \"great\")\n              code.push(\"}else{\")\n                swapAndDecrement(\"k\", \"great\")\n              code.push(\"}\")\n              code.push(\"break\")\n            code.push(\"}\")\n          code.push(\"}\")\n        code.push(\"}\")\n      code.push(\"}\")\n    code.push(\"}\")\n  code.push(\"}\")\n  \n  //Move pivots to correct place\n  function storePivot(mem_dest, pivot_dest, pivot) {\n    if(order.length>1) {\n      cacheLoop([mem_dest, pivot_dest], true, [\n        dataWrite(\"ptr0\", dataRead(\"ptr1\")), \"\\n\",\n        dataWrite(\"ptr1\", [\"pivot\",pivot,\"[pivot_ptr]\"].join(\"\"))\n      ].join(\"\"))\n    } else {\n      code.push(\n          dataWrite(toPointer(mem_dest), dataRead(toPointer(pivot_dest))),\n          dataWrite(toPointer(pivot_dest), \"pivot\"+pivot))\n    }\n  }\n  \n  storePivot(\"left\", \"(less-1)\", 1)\n  storePivot(\"right\", \"(great+1)\", 2)\n\n  //Recursive sort call\n  function doSort(left, right) {\n    code.push([\n      \"if((\",right,\"-\",left,\")<=\",INSERTION_SORT_THRESHOLD,\"){\\n\",\n        \"insertionSort(\", left, \",\", right, \",data,offset,\", shapeArgs(order.length).join(\",\"), \")\\n\",\n      \"}else{\\n\",\n        funcName, \"(\", left, \",\", right, \",data,offset,\", shapeArgs(order.length).join(\",\"), \")\\n\",\n      \"}\"\n    ].join(\"\"))\n  }\n  doSort(\"left\", \"(less-2)\")\n  doSort(\"(great+2)\", \"right\")\n  \n  //If pivots are equal, then early out\n  code.push(\"if(pivots_are_equal){\")\n    cleanUp()\n    code.push(\"return\")\n  code.push(\"}\")\n  \n  function walkPointer(ptr, pivot, body) {\n    if(order.length > 1) {\n      code.push([\"__l\",++labelCounter,\":while(true){\"].join(\"\"))\n      cacheLoop([ptr], true, [\n        \"if(\", dataRead(\"ptr0\"), \"!==pivot\", pivot, \"[pivot_ptr]){break __l\", labelCounter, \"}\"\n      ].join(\"\"))\n      code.push(body, \"}\")\n    } else {\n      code.push([\"while(\", dataRead(toPointer(ptr)), \"===pivot\", pivot, \"){\", body, \"}\"].join(\"\"))\n    }\n  }\n  \n  //Check bounds\n  code.push(\"if(less<index1&&great>index5){\")\n  \n    walkPointer(\"less\", 1, \"++less\")\n    walkPointer(\"great\", 2, \"--great\")\n  \n    code.push(\"for(k=less;k<=great;++k){\")\n      comparePivot(\"comp_pivot1\", \"k\", 1)\n      code.push(\"if(comp_pivot1===0){\")\n        code.push(\"if(k!==less){\")\n          swapElements(\"k\", \"less\")\n        code.push(\"}\")\n        code.push(\"++less\")\n      code.push(\"}else{\")\n        comparePivot(\"comp_pivot2\", \"k\", 2)\n        code.push(\"if(comp_pivot2===0){\")\n          code.push(\"while(true){\")\n            comparePivot(\"comp\", \"great\", 2)\n            code.push(\"if(comp===0){\")\n              code.push(\"if(--great<k){break}\")\n              code.push(\"continue\")\n            code.push(\"}else{\")\n              comparePivot(\"comp\", \"great\", 1)\n              code.push(\"if(comp<0){\")\n                tripleSwap(\"k\", \"less\", \"great\")\n              code.push(\"}else{\")\n                swapAndDecrement(\"k\", \"great\")\n              code.push(\"}\")\n              code.push(\"break\")\n            code.push(\"}\")\n          code.push(\"}\")\n        code.push(\"}\")\n      code.push(\"}\")\n    code.push(\"}\")\n  code.push(\"}\")\n  \n  //Clean up and do a final sorting pass\n  cleanUp()\n  doSort(\"less\", \"great\")\n \n  //Close off main loop\n  code.push(\"}return \" + funcName)\n  \n  //Compile and link\n  if(order.length > 1 && allocator) {\n    var compiled = new Function(\"insertionSort\", \"malloc\", \"free\", code.join(\"\\n\"))\n    return compiled(insertionSort, allocator[0], allocator[1])\n  }\n  var compiled = new Function(\"insertionSort\", code.join(\"\\n\"))\n  return compiled(insertionSort)\n}\n\nfunction compileSort(order, dtype) {\n  var code = [\"'use strict'\"]\n  var funcName = [\"ndarraySortWrapper\", order.join(\"d\"), dtype].join(\"\")\n  var funcArgs = [ \"array\" ]\n  \n  code.push([\"function \", funcName, \"(\", funcArgs.join(\",\"), \"){\"].join(\"\"))\n  \n  //Unpack local variables from array\n  var vars = [\"data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride\"]\n  for(var i=0; i<order.length; ++i) {\n    vars.push([\"s\",i,\"=stride[\",i,\"]|0,n\",i,\"=shape[\",i,\"]|0\"].join(\"\"))\n  }\n  \n  var scratch_stride = new Array(order.length)\n  var nprod = []\n  for(var i=0; i<order.length; ++i) {\n    var k = order[i]\n    if(k === 0) {\n      continue\n    }\n    if(nprod.length === 0) {\n      scratch_stride[k] = \"1\"\n    } else {\n      scratch_stride[k] = nprod.join(\"*\")\n    }\n    nprod.push(\"n\"+k)\n  }\n  \n  var p = -1, q = -1\n  for(var i=0; i<order.length; ++i) {\n    var j = order[i]\n    if(j !== 0) {\n      if(p > 0) {\n        vars.push([\"d\",j,\"=s\",j,\"-d\",p,\"*n\",p].join(\"\"))\n      } else {\n        vars.push([\"d\",j,\"=s\",j].join(\"\"))\n      }\n      p = j\n    }\n    var k = order.length-1-i\n    if(k !== 0) {\n      if(q > 0) {\n        vars.push([\"e\",k,\"=s\",k,\"-e\",q,\"*n\",q,\n                  \",f\",k,\"=\",scratch_stride[k],\"-f\",q,\"*n\",q].join(\"\"))\n      } else {\n        vars.push([\"e\",k,\"=s\",k,\",f\",k,\"=\",scratch_stride[k]].join(\"\"))\n      }\n      q = k\n    }\n  }\n  \n  //Declare local variables\n  code.push(\"var \" + vars.join(\",\"))\n  \n  //Create arguments for subroutine\n  var sortArgs = [\"0\", \"n0-1\", \"data\", \"offset\"].concat(shapeArgs(order.length))\n  \n  //Call main sorting routine\n  code.push([\n    \"if(n0<=\",INSERTION_SORT_THRESHOLD,\"){\",\n      \"insertionSort(\", sortArgs.join(\",\"), \")}else{\",\n      \"quickSort(\", sortArgs.join(\",\"),\n    \")}\"\n  ].join(\"\"))\n  \n  //Return\n  code.push(\"}return \" + funcName)\n  \n  //Link everything together\n  var result = new Function(\"insertionSort\", \"quickSort\", code.join(\"\\n\"))\n  var insertionSort = createInsertionSort(order, dtype)\n  var quickSort = createQuickSort(order, dtype, insertionSort)\n  return result(insertionSort, quickSort)\n}\n\nmodule.exports = compileSort\n},{\"typedarray-pool\":532}],443:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar compile = _dereq_(\"./lib/compile_sort.js\")\nvar CACHE = {}\n\nfunction sort(array) {\n  var order = array.order\n  var dtype = array.dtype\n  var typeSig = [order, dtype ]\n  var typeName = typeSig.join(\":\")\n  var compiled = CACHE[typeName]\n  if(!compiled) {\n    CACHE[typeName] = compiled = compile(order, dtype)\n  }\n  compiled(array)\n  return array\n}\n\nmodule.exports = sort\n},{\"./lib/compile_sort.js\":442}],444:[function(_dereq_,module,exports){\n'use strict'\n\nvar interp  = _dereq_('ndarray-linear-interpolate')\n\n\nvar do_warp = _dereq_('cwise/lib/wrapper')({\"args\":[\"index\",\"array\",\"scalar\",\"scalar\",\"scalar\"],\"pre\":{\"body\":\"{this_warped=new Array(_inline_3_arg4_)}\",\"args\":[{\"name\":\"_inline_3_arg0_\",\"lvalue\":false,\"rvalue\":false,\"count\":0},{\"name\":\"_inline_3_arg1_\",\"lvalue\":false,\"rvalue\":false,\"count\":0},{\"name\":\"_inline_3_arg2_\",\"lvalue\":false,\"rvalue\":false,\"count\":0},{\"name\":\"_inline_3_arg3_\",\"lvalue\":false,\"rvalue\":false,\"count\":0},{\"name\":\"_inline_3_arg4_\",\"lvalue\":false,\"rvalue\":true,\"count\":1}],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"body\":{\"body\":\"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}\",\"args\":[{\"name\":\"_inline_4_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_4_arg1_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_4_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_4_arg3_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_4_arg4_\",\"lvalue\":false,\"rvalue\":false,\"count\":0}],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"debug\":false,\"funcName\":\"warpND\",\"blockSize\":64})\n\nvar do_warp_1 = _dereq_('cwise/lib/wrapper')({\"args\":[\"index\",\"array\",\"scalar\",\"scalar\",\"scalar\"],\"pre\":{\"body\":\"{this_warped=[0]}\",\"args\":[],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"body\":{\"body\":\"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}\",\"args\":[{\"name\":\"_inline_7_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_7_arg1_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_7_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_7_arg3_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_7_arg4_\",\"lvalue\":false,\"rvalue\":true,\"count\":1}],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"debug\":false,\"funcName\":\"warp1D\",\"blockSize\":64})\n\nvar do_warp_2 = _dereq_('cwise/lib/wrapper')({\"args\":[\"index\",\"array\",\"scalar\",\"scalar\",\"scalar\"],\"pre\":{\"body\":\"{this_warped=[0,0]}\",\"args\":[],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"body\":{\"body\":\"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}\",\"args\":[{\"name\":\"_inline_10_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_10_arg1_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_10_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_10_arg3_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_10_arg4_\",\"lvalue\":false,\"rvalue\":true,\"count\":1}],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"debug\":false,\"funcName\":\"warp2D\",\"blockSize\":64})\n\nvar do_warp_3 = _dereq_('cwise/lib/wrapper')({\"args\":[\"index\",\"array\",\"scalar\",\"scalar\",\"scalar\"],\"pre\":{\"body\":\"{this_warped=[0,0,0]}\",\"args\":[],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"body\":{\"body\":\"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}\",\"args\":[{\"name\":\"_inline_13_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_13_arg1_\",\"lvalue\":true,\"rvalue\":false,\"count\":1},{\"name\":\"_inline_13_arg2_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_13_arg3_\",\"lvalue\":false,\"rvalue\":true,\"count\":1},{\"name\":\"_inline_13_arg4_\",\"lvalue\":false,\"rvalue\":true,\"count\":1}],\"thisVars\":[\"this_warped\"],\"localVars\":[]},\"post\":{\"body\":\"{}\",\"args\":[],\"thisVars\":[],\"localVars\":[]},\"debug\":false,\"funcName\":\"warp3D\",\"blockSize\":64})\n\nmodule.exports = function warp(dest, src, func) {\n  switch(src.shape.length) {\n    case 1:\n      do_warp_1(dest, func, interp.d1, src)\n      break\n    case 2:\n      do_warp_2(dest, func, interp.d2, src)\n      break\n    case 3:\n      do_warp_3(dest, func, interp.d3, src)\n      break\n    default:\n      do_warp(dest, func, interp.bind(undefined, src), src.shape.length)\n      break\n  }\n  return dest\n}\n\n},{\"cwise/lib/wrapper\":142,\"ndarray-linear-interpolate\":438}],445:[function(_dereq_,module,exports){\nvar iota = _dereq_(\"iota-array\")\nvar isBuffer = _dereq_(\"is-buffer\")\n\nvar hasTypedArrays  = ((typeof Float64Array) !== \"undefined\")\n\nfunction compare1st(a, b) {\n  return a[0] - b[0]\n}\n\nfunction order() {\n  var stride = this.stride\n  var terms = new Array(stride.length)\n  var i\n  for(i=0; i<terms.length; ++i) {\n    terms[i] = [Math.abs(stride[i]), i]\n  }\n  terms.sort(compare1st)\n  var result = new Array(terms.length)\n  for(i=0; i<result.length; ++i) {\n    result[i] = terms[i][1]\n  }\n  return result\n}\n\nfunction compileConstructor(dtype, dimension) {\n  var className = [\"View\", dimension, \"d\", dtype].join(\"\")\n  if(dimension < 0) {\n    className = \"View_Nil\" + dtype\n  }\n  var useGetters = (dtype === \"generic\")\n\n  if(dimension === -1) {\n    //Special case for trivial arrays\n    var code =\n      \"function \"+className+\"(a){this.data=a;};\\\nvar proto=\"+className+\".prototype;\\\nproto.dtype='\"+dtype+\"';\\\nproto.index=function(){return -1};\\\nproto.size=0;\\\nproto.dimension=-1;\\\nproto.shape=proto.stride=proto.order=[];\\\nproto.lo=proto.hi=proto.transpose=proto.step=\\\nfunction(){return new \"+className+\"(this.data);};\\\nproto.get=proto.set=function(){};\\\nproto.pick=function(){return null};\\\nreturn function construct_\"+className+\"(a){return new \"+className+\"(a);}\"\n    var procedure = new Function(code)\n    return procedure()\n  } else if(dimension === 0) {\n    //Special case for 0d arrays\n    var code =\n      \"function \"+className+\"(a,d) {\\\nthis.data = a;\\\nthis.offset = d\\\n};\\\nvar proto=\"+className+\".prototype;\\\nproto.dtype='\"+dtype+\"';\\\nproto.index=function(){return this.offset};\\\nproto.dimension=0;\\\nproto.size=1;\\\nproto.shape=\\\nproto.stride=\\\nproto.order=[];\\\nproto.lo=\\\nproto.hi=\\\nproto.transpose=\\\nproto.step=function \"+className+\"_copy() {\\\nreturn new \"+className+\"(this.data,this.offset)\\\n};\\\nproto.pick=function \"+className+\"_pick(){\\\nreturn TrivialArray(this.data);\\\n};\\\nproto.valueOf=proto.get=function \"+className+\"_get(){\\\nreturn \"+(useGetters ? \"this.data.get(this.offset)\" : \"this.data[this.offset]\")+\n\"};\\\nproto.set=function \"+className+\"_set(v){\\\nreturn \"+(useGetters ? \"this.data.set(this.offset,v)\" : \"this.data[this.offset]=v\")+\"\\\n};\\\nreturn function construct_\"+className+\"(a,b,c,d){return new \"+className+\"(a,d)}\"\n    var procedure = new Function(\"TrivialArray\", code)\n    return procedure(CACHED_CONSTRUCTORS[dtype][0])\n  }\n\n  var code = [\"'use strict'\"]\n\n  //Create constructor for view\n  var indices = iota(dimension)\n  var args = indices.map(function(i) { return \"i\"+i })\n  var index_str = \"this.offset+\" + indices.map(function(i) {\n        return \"this.stride[\" + i + \"]*i\" + i\n      }).join(\"+\")\n  var shapeArg = indices.map(function(i) {\n      return \"b\"+i\n    }).join(\",\")\n  var strideArg = indices.map(function(i) {\n      return \"c\"+i\n    }).join(\",\")\n  code.push(\n    \"function \"+className+\"(a,\" + shapeArg + \",\" + strideArg + \",d){this.data=a\",\n      \"this.shape=[\" + shapeArg + \"]\",\n      \"this.stride=[\" + strideArg + \"]\",\n      \"this.offset=d|0}\",\n    \"var proto=\"+className+\".prototype\",\n    \"proto.dtype='\"+dtype+\"'\",\n    \"proto.dimension=\"+dimension)\n\n  //view.size:\n  code.push(\"Object.defineProperty(proto,'size',{get:function \"+className+\"_size(){\\\nreturn \"+indices.map(function(i) { return \"this.shape[\"+i+\"]\" }).join(\"*\"),\n\"}})\")\n\n  //view.order:\n  if(dimension === 1) {\n    code.push(\"proto.order=[0]\")\n  } else {\n    code.push(\"Object.defineProperty(proto,'order',{get:\")\n    if(dimension < 4) {\n      code.push(\"function \"+className+\"_order(){\")\n      if(dimension === 2) {\n        code.push(\"return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})\")\n      } else if(dimension === 3) {\n        code.push(\n\"var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);\\\nif(s0>s1){\\\nif(s1>s2){\\\nreturn [2,1,0];\\\n}else if(s0>s2){\\\nreturn [1,2,0];\\\n}else{\\\nreturn [1,0,2];\\\n}\\\n}else if(s0>s2){\\\nreturn [2,0,1];\\\n}else if(s2>s1){\\\nreturn [0,1,2];\\\n}else{\\\nreturn [0,2,1];\\\n}}})\")\n      }\n    } else {\n      code.push(\"ORDER})\")\n    }\n  }\n\n  //view.set(i0, ..., v):\n  code.push(\n\"proto.set=function \"+className+\"_set(\"+args.join(\",\")+\",v){\")\n  if(useGetters) {\n    code.push(\"return this.data.set(\"+index_str+\",v)}\")\n  } else {\n    code.push(\"return this.data[\"+index_str+\"]=v}\")\n  }\n\n  //view.get(i0, ...):\n  code.push(\"proto.get=function \"+className+\"_get(\"+args.join(\",\")+\"){\")\n  if(useGetters) {\n    code.push(\"return this.data.get(\"+index_str+\")}\")\n  } else {\n    code.push(\"return this.data[\"+index_str+\"]}\")\n  }\n\n  //view.index:\n  code.push(\n    \"proto.index=function \"+className+\"_index(\", args.join(), \"){return \"+index_str+\"}\")\n\n  //view.hi():\n  code.push(\"proto.hi=function \"+className+\"_hi(\"+args.join(\",\")+\"){return new \"+className+\"(this.data,\"+\n    indices.map(function(i) {\n      return [\"(typeof i\",i,\"!=='number'||i\",i,\"<0)?this.shape[\", i, \"]:i\", i,\"|0\"].join(\"\")\n    }).join(\",\")+\",\"+\n    indices.map(function(i) {\n      return \"this.stride[\"+i + \"]\"\n    }).join(\",\")+\",this.offset)}\")\n\n  //view.lo():\n  var a_vars = indices.map(function(i) { return \"a\"+i+\"=this.shape[\"+i+\"]\" })\n  var c_vars = indices.map(function(i) { return \"c\"+i+\"=this.stride[\"+i+\"]\" })\n  code.push(\"proto.lo=function \"+className+\"_lo(\"+args.join(\",\")+\"){var b=this.offset,d=0,\"+a_vars.join(\",\")+\",\"+c_vars.join(\",\"))\n  for(var i=0; i<dimension; ++i) {\n    code.push(\n\"if(typeof i\"+i+\"==='number'&&i\"+i+\">=0){\\\nd=i\"+i+\"|0;\\\nb+=c\"+i+\"*d;\\\na\"+i+\"-=d}\")\n  }\n  code.push(\"return new \"+className+\"(this.data,\"+\n    indices.map(function(i) {\n      return \"a\"+i\n    }).join(\",\")+\",\"+\n    indices.map(function(i) {\n      return \"c\"+i\n    }).join(\",\")+\",b)}\")\n\n  //view.step():\n  code.push(\"proto.step=function \"+className+\"_step(\"+args.join(\",\")+\"){var \"+\n    indices.map(function(i) {\n      return \"a\"+i+\"=this.shape[\"+i+\"]\"\n    }).join(\",\")+\",\"+\n    indices.map(function(i) {\n      return \"b\"+i+\"=this.stride[\"+i+\"]\"\n    }).join(\",\")+\",c=this.offset,d=0,ceil=Math.ceil\")\n  for(var i=0; i<dimension; ++i) {\n    code.push(\n\"if(typeof i\"+i+\"==='number'){\\\nd=i\"+i+\"|0;\\\nif(d<0){\\\nc+=b\"+i+\"*(a\"+i+\"-1);\\\na\"+i+\"=ceil(-a\"+i+\"/d)\\\n}else{\\\na\"+i+\"=ceil(a\"+i+\"/d)\\\n}\\\nb\"+i+\"*=d\\\n}\")\n  }\n  code.push(\"return new \"+className+\"(this.data,\"+\n    indices.map(function(i) {\n      return \"a\" + i\n    }).join(\",\")+\",\"+\n    indices.map(function(i) {\n      return \"b\" + i\n    }).join(\",\")+\",c)}\")\n\n  //view.transpose():\n  var tShape = new Array(dimension)\n  var tStride = new Array(dimension)\n  for(var i=0; i<dimension; ++i) {\n    tShape[i] = \"a[i\"+i+\"]\"\n    tStride[i] = \"b[i\"+i+\"]\"\n  }\n  code.push(\"proto.transpose=function \"+className+\"_transpose(\"+args+\"){\"+\n    args.map(function(n,idx) { return n + \"=(\" + n + \"===undefined?\" + idx + \":\" + n + \"|0)\"}).join(\";\"),\n    \"var a=this.shape,b=this.stride;return new \"+className+\"(this.data,\"+tShape.join(\",\")+\",\"+tStride.join(\",\")+\",this.offset)}\")\n\n  //view.pick():\n  code.push(\"proto.pick=function \"+className+\"_pick(\"+args+\"){var a=[],b=[],c=this.offset\")\n  for(var i=0; i<dimension; ++i) {\n    code.push(\"if(typeof i\"+i+\"==='number'&&i\"+i+\">=0){c=(c+this.stride[\"+i+\"]*i\"+i+\")|0}else{a.push(this.shape[\"+i+\"]);b.push(this.stride[\"+i+\"])}\")\n  }\n  code.push(\"var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}\")\n\n  //Add return statement\n  code.push(\"return function construct_\"+className+\"(data,shape,stride,offset){return new \"+className+\"(data,\"+\n    indices.map(function(i) {\n      return \"shape[\"+i+\"]\"\n    }).join(\",\")+\",\"+\n    indices.map(function(i) {\n      return \"stride[\"+i+\"]\"\n    }).join(\",\")+\",offset)}\")\n\n  //Compile procedure\n  var procedure = new Function(\"CTOR_LIST\", \"ORDER\", code.join(\"\\n\"))\n  return procedure(CACHED_CONSTRUCTORS[dtype], order)\n}\n\nfunction arrayDType(data) {\n  if(isBuffer(data)) {\n    return \"buffer\"\n  }\n  if(hasTypedArrays) {\n    switch(Object.prototype.toString.call(data)) {\n      case \"[object Float64Array]\":\n        return \"float64\"\n      case \"[object Float32Array]\":\n        return \"float32\"\n      case \"[object Int8Array]\":\n        return \"int8\"\n      case \"[object Int16Array]\":\n        return \"int16\"\n      case \"[object Int32Array]\":\n        return \"int32\"\n      case \"[object Uint8Array]\":\n        return \"uint8\"\n      case \"[object Uint16Array]\":\n        return \"uint16\"\n      case \"[object Uint32Array]\":\n        return \"uint32\"\n      case \"[object Uint8ClampedArray]\":\n        return \"uint8_clamped\"\n    }\n  }\n  if(Array.isArray(data)) {\n    return \"array\"\n  }\n  return \"generic\"\n}\n\nvar CACHED_CONSTRUCTORS = {\n  \"float32\":[],\n  \"float64\":[],\n  \"int8\":[],\n  \"int16\":[],\n  \"int32\":[],\n  \"uint8\":[],\n  \"uint16\":[],\n  \"uint32\":[],\n  \"array\":[],\n  \"uint8_clamped\":[],\n  \"buffer\":[],\n  \"generic\":[]\n}\n\n;(function() {\n  for(var id in CACHED_CONSTRUCTORS) {\n    CACHED_CONSTRUCTORS[id].push(compileConstructor(id, -1))\n  }\n});\n\nfunction wrappedNDArrayCtor(data, shape, stride, offset) {\n  if(data === undefined) {\n    var ctor = CACHED_CONSTRUCTORS.array[0]\n    return ctor([])\n  } else if(typeof data === \"number\") {\n    data = [data]\n  }\n  if(shape === undefined) {\n    shape = [ data.length ]\n  }\n  var d = shape.length\n  if(stride === undefined) {\n    stride = new Array(d)\n    for(var i=d-1, sz=1; i>=0; --i) {\n      stride[i] = sz\n      sz *= shape[i]\n    }\n  }\n  if(offset === undefined) {\n    offset = 0\n    for(var i=0; i<d; ++i) {\n      if(stride[i] < 0) {\n        offset -= (shape[i]-1)*stride[i]\n      }\n    }\n  }\n  var dtype = arrayDType(data)\n  var ctor_list = CACHED_CONSTRUCTORS[dtype]\n  while(ctor_list.length <= d+1) {\n    ctor_list.push(compileConstructor(dtype, ctor_list.length-1))\n  }\n  var ctor = ctor_list[d+1]\n  return ctor(data, shape, stride, offset)\n}\n\nmodule.exports = wrappedNDArrayCtor\n\n},{\"iota-array\":411,\"is-buffer\":413}],446:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar doubleBits = _dereq_(\"double-bits\")\n\nvar SMALLEST_DENORM = Math.pow(2, -1074)\nvar UINT_MAX = (-1)>>>0\n\nmodule.exports = nextafter\n\nfunction nextafter(x, y) {\n  if(isNaN(x) || isNaN(y)) {\n    return NaN\n  }\n  if(x === y) {\n    return x\n  }\n  if(x === 0) {\n    if(y < 0) {\n      return -SMALLEST_DENORM\n    } else {\n      return SMALLEST_DENORM\n    }\n  }\n  var hi = doubleBits.hi(x)\n  var lo = doubleBits.lo(x)\n  if((y > x) === (x > 0)) {\n    if(lo === UINT_MAX) {\n      hi += 1\n      lo = 0\n    } else {\n      lo += 1\n    }\n  } else {\n    if(lo === 0) {\n      lo = UINT_MAX\n      hi -= 1\n    } else {\n      lo -= 1\n    }\n  }\n  return doubleBits.pack(lo, hi)\n}\n},{\"double-bits\":161}],447:[function(_dereq_,module,exports){\n\nvar π = Math.PI\nvar _120 = radians(120)\n\nmodule.exports = normalize\n\n/**\n * describe `path` in terms of cubic bézier \n * curves and move commands\n *\n * @param {Array} path\n * @return {Array}\n */\n\nfunction normalize(path){\n\t// init state\n\tvar prev\n\tvar result = []\n\tvar bezierX = 0\n\tvar bezierY = 0\n\tvar startX = 0\n\tvar startY = 0\n\tvar quadX = null\n\tvar quadY = null\n\tvar x = 0\n\tvar y = 0\n\n\tfor (var i = 0, len = path.length; i < len; i++) {\n\t\tvar seg = path[i]\n\t\tvar command = seg[0]\n\t\tswitch (command) {\n\t\t\tcase 'M':\n\t\t\t\tstartX = seg[1]\n\t\t\t\tstartY = seg[2]\n\t\t\t\tbreak\n\t\t\tcase 'A':\n\t\t\t\tseg = arc(x, y,seg[1],seg[2],radians(seg[3]),seg[4],seg[5],seg[6],seg[7])\n\t\t\t\t// split multi part\n\t\t\t\tseg.unshift('C')\n\t\t\t\tif (seg.length > 7) {\n\t\t\t\t\tresult.push(seg.splice(0, 7))\n\t\t\t\t\tseg.unshift('C')\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'S':\n\t\t\t\t// default control point\n\t\t\t\tvar cx = x\n\t\t\t\tvar cy = y\n\t\t\t\tif (prev == 'C' || prev == 'S') {\n\t\t\t\t\tcx += cx - bezierX // reflect the previous command's control\n\t\t\t\t\tcy += cy - bezierY // point relative to the current point\n\t\t\t\t}\n\t\t\t\tseg = ['C', cx, cy, seg[1], seg[2], seg[3], seg[4]]\n\t\t\t\tbreak\n\t\t\tcase 'T':\n\t\t\t\tif (prev == 'Q' || prev == 'T') {\n\t\t\t\t\tquadX = x * 2 - quadX // as with 'S' reflect previous control point\n\t\t\t\t\tquadY = y * 2 - quadY\n\t\t\t\t} else {\n\t\t\t\t\tquadX = x\n\t\t\t\t\tquadY = y\n\t\t\t\t}\n\t\t\t\tseg = quadratic(x, y, quadX, quadY, seg[1], seg[2])\n\t\t\t\tbreak\n\t\t\tcase 'Q':\n\t\t\t\tquadX = seg[1]\n\t\t\t\tquadY = seg[2]\n\t\t\t\tseg = quadratic(x, y, seg[1], seg[2], seg[3], seg[4])\n\t\t\t\tbreak\n\t\t\tcase 'L':\n\t\t\t\tseg = line(x, y, seg[1], seg[2])\n\t\t\t\tbreak\n\t\t\tcase 'H':\n\t\t\t\tseg = line(x, y, seg[1], y)\n\t\t\t\tbreak\n\t\t\tcase 'V':\n\t\t\t\tseg = line(x, y, x, seg[1])\n\t\t\t\tbreak\n\t\t\tcase 'Z':\n\t\t\t\tseg = line(x, y, startX, startY)\n\t\t\t\tbreak\n\t\t}\n\n\t\t// update state\n\t\tprev = command\n\t\tx = seg[seg.length - 2]\n\t\ty = seg[seg.length - 1]\n\t\tif (seg.length > 4) {\n\t\t\tbezierX = seg[seg.length - 4]\n\t\t\tbezierY = seg[seg.length - 3]\n\t\t} else {\n\t\t\tbezierX = x\n\t\t\tbezierY = y\n\t\t}\n\t\tresult.push(seg)\n\t}\n\n\treturn result\n}\n\nfunction line(x1, y1, x2, y2){\n\treturn ['C', x1, y1, x2, y2, x2, y2]\n}\n\nfunction quadratic(x1, y1, cx, cy, x2, y2){\n\treturn [\n\t\t'C',\n\t\tx1/3 + (2/3) * cx,\n\t\ty1/3 + (2/3) * cy,\n\t\tx2/3 + (2/3) * cx,\n\t\ty2/3 + (2/3) * cy,\n\t\tx2,\n\t\ty2\n\t]\n}\n\n// This function is ripped from \n// github.com/DmitryBaranovskiy/raphael/blob/4d97d4/raphael.js#L2216-L2304 \n// which references w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n// TODO: make it human readable\n\nfunction arc(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n\tif (!recursive) {\n\t\tvar xy = rotate(x1, y1, -angle)\n\t\tx1 = xy.x\n\t\ty1 = xy.y\n\t\txy = rotate(x2, y2, -angle)\n\t\tx2 = xy.x\n\t\ty2 = xy.y\n\t\tvar x = (x1 - x2) / 2\n\t\tvar y = (y1 - y2) / 2\n\t\tvar h = (x * x) / (rx * rx) + (y * y) / (ry * ry)\n\t\tif (h > 1) {\n\t\t\th = Math.sqrt(h)\n\t\t\trx = h * rx\n\t\t\try = h * ry\n\t\t}\n\t\tvar rx2 = rx * rx\n\t\tvar ry2 = ry * ry\n\t\tvar k = (large_arc_flag == sweep_flag ? -1 : 1)\n\t\t\t* Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)))\n\t\tif (k == Infinity) k = 1 // neutralize\n\t\tvar cx = k * rx * y / ry + (x1 + x2) / 2\n\t\tvar cy = k * -ry * x / rx + (y1 + y2) / 2\n\t\tvar f1 = Math.asin(((y1 - cy) / ry).toFixed(9))\n\t\tvar f2 = Math.asin(((y2 - cy) / ry).toFixed(9))\n\n\t\tf1 = x1 < cx ? π - f1 : f1\n\t\tf2 = x2 < cx ? π - f2 : f2\n\t\tif (f1 < 0) f1 = π * 2 + f1\n\t\tif (f2 < 0) f2 = π * 2 + f2\n\t\tif (sweep_flag && f1 > f2) f1 = f1 - π * 2\n\t\tif (!sweep_flag && f2 > f1) f2 = f2 - π * 2\n\t} else {\n\t\tf1 = recursive[0]\n\t\tf2 = recursive[1]\n\t\tcx = recursive[2]\n\t\tcy = recursive[3]\n\t}\n\t// greater than 120 degrees requires multiple segments\n\tif (Math.abs(f2 - f1) > _120) {\n\t\tvar f2old = f2\n\t\tvar x2old = x2\n\t\tvar y2old = y2\n\t\tf2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1)\n\t\tx2 = cx + rx * Math.cos(f2)\n\t\ty2 = cy + ry * Math.sin(f2)\n\t\tvar res = arc(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy])\n\t}\n\tvar t = Math.tan((f2 - f1) / 4)\n\tvar hx = 4 / 3 * rx * t\n\tvar hy = 4 / 3 * ry * t\n\tvar curve = [\n\t\t2 * x1 - (x1 + hx * Math.sin(f1)),\n\t\t2 * y1 - (y1 - hy * Math.cos(f1)),\n\t\tx2 + hx * Math.sin(f2),\n\t\ty2 - hy * Math.cos(f2),\n\t\tx2,\n\t\ty2\n\t]\n\tif (recursive) return curve\n\tif (res) curve = curve.concat(res)\n\tfor (var i = 0; i < curve.length;) {\n\t\tvar rot = rotate(curve[i], curve[i+1], angle)\n\t\tcurve[i++] = rot.x\n\t\tcurve[i++] = rot.y\n\t}\n\treturn curve\n}\n\nfunction rotate(x, y, rad){\n\treturn {\n\t\tx: x * Math.cos(rad) - y * Math.sin(rad),\n\t\ty: x * Math.sin(rad) + y * Math.cos(rad)\n\t}\n}\n\nfunction radians(degress){\n\treturn degress * (π / 180)\n}\n\n},{}],448:[function(_dereq_,module,exports){\nvar DEFAULT_NORMALS_EPSILON = 1e-6;\nvar DEFAULT_FACE_EPSILON = 1e-6;\n\n//Estimate the vertex normals of a mesh\nexports.vertexNormals = function(faces, positions, specifiedEpsilon) {\n\n  var N         = positions.length;\n  var normals   = new Array(N);\n  var epsilon   = specifiedEpsilon === void(0) ? DEFAULT_NORMALS_EPSILON : specifiedEpsilon;\n\n  //Initialize normal array\n  for(var i=0; i<N; ++i) {\n    normals[i] = [0.0, 0.0, 0.0];\n  }\n\n  //Walk over all the faces and add per-vertex contribution to normal weights\n  for(var i=0; i<faces.length; ++i) {\n    var f = faces[i];\n    var p = 0;\n    var c = f[f.length-1];\n    var n = f[0];\n    for(var j=0; j<f.length; ++j) {\n\n      //Shift indices back\n      p = c;\n      c = n;\n      n = f[(j+1) % f.length];\n\n      var v0 = positions[p];\n      var v1 = positions[c];\n      var v2 = positions[n];\n\n      //Compute infineteismal arcs\n      var d01 = new Array(3);\n      var m01 = 0.0;\n      var d21 = new Array(3);\n      var m21 = 0.0;\n      for(var k=0; k<3; ++k) {\n        d01[k] = v0[k]  - v1[k];\n        m01   += d01[k] * d01[k];\n        d21[k] = v2[k]  - v1[k];\n        m21   += d21[k] * d21[k];\n      }\n\n      //Accumulate values in normal\n      if(m01 * m21 > epsilon) {\n        var norm = normals[c];\n        var w = 1.0 / Math.sqrt(m01 * m21);\n        for(var k=0; k<3; ++k) {\n          var u = (k+1)%3;\n          var v = (k+2)%3;\n          norm[k] += w * (d21[u] * d01[v] - d21[v] * d01[u]);\n        }\n      }\n    }\n  }\n\n  //Scale all normals to unit length\n  for(var i=0; i<N; ++i) {\n    var norm = normals[i];\n    var m = 0.0;\n    for(var k=0; k<3; ++k) {\n      m += norm[k] * norm[k];\n    }\n    if(m > epsilon) {\n      var w = 1.0 / Math.sqrt(m);\n      for(var k=0; k<3; ++k) {\n        norm[k] *= w;\n      }\n    } else {\n      for(var k=0; k<3; ++k) {\n        norm[k] = 0.0;\n      }\n    }\n  }\n\n  //Return the resulting set of patches\n  return normals;\n}\n\n//Compute face normals of a mesh\nexports.faceNormals = function(faces, positions, specifiedEpsilon) {\n\n  var N         = faces.length;\n  var normals   = new Array(N);\n  var epsilon   = specifiedEpsilon === void(0) ? DEFAULT_FACE_EPSILON : specifiedEpsilon;\n\n  for(var i=0; i<N; ++i) {\n    var f = faces[i];\n    var pos = new Array(3);\n    for(var j=0; j<3; ++j) {\n      pos[j] = positions[f[j]];\n    }\n\n    var d01 = new Array(3);\n    var d21 = new Array(3);\n    for(var j=0; j<3; ++j) {\n      d01[j] = pos[1][j] - pos[0][j];\n      d21[j] = pos[2][j] - pos[0][j];\n    }\n\n    var n = new Array(3);\n    var l = 0.0;\n    for(var j=0; j<3; ++j) {\n      var u = (j+1)%3;\n      var v = (j+2)%3;\n      n[j] = d01[u] * d21[v] - d01[v] * d21[u];\n      l += n[j] * n[j];\n    }\n    if(l > epsilon) {\n      l = 1.0 / Math.sqrt(l);\n    } else {\n      l = 0.0;\n    }\n    for(var j=0; j<3; ++j) {\n      n[j] *= l;\n    }\n    normals[i] = n;\n  }\n  return normals;\n}\n\n\n\n},{}],449:[function(_dereq_,module,exports){\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],450:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = quatFromFrame\n\nfunction quatFromFrame(\n  out,\n  rx, ry, rz,\n  ux, uy, uz,\n  fx, fy, fz) {\n  var tr = rx + uy + fz\n  if(l > 0) {\n    var l = Math.sqrt(tr + 1.0)\n    out[0] = 0.5 * (uz - fy) / l\n    out[1] = 0.5 * (fx - rz) / l\n    out[2] = 0.5 * (ry - uy) / l\n    out[3] = 0.5 * l\n  } else {\n    var tf = Math.max(rx, uy, fz)\n    var l = Math.sqrt(2 * tf - tr + 1.0)\n    if(rx >= tf) {\n      //x y z  order\n      out[0] = 0.5 * l\n      out[1] = 0.5 * (ux + ry) / l\n      out[2] = 0.5 * (fx + rz) / l\n      out[3] = 0.5 * (uz - fy) / l\n    } else if(uy >= tf) {\n      //y z x  order\n      out[0] = 0.5 * (ry + ux) / l\n      out[1] = 0.5 * l\n      out[2] = 0.5 * (fy + uz) / l\n      out[3] = 0.5 * (fx - rz) / l\n    } else {\n      //z x y  order\n      out[0] = 0.5 * (rz + fx) / l\n      out[1] = 0.5 * (uz + fy) / l\n      out[2] = 0.5 * l\n      out[3] = 0.5 * (ry - ux) / l\n    }\n  }\n  return out\n}\n},{}],451:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createOrbitController\n\nvar filterVector  = _dereq_('filtered-vector')\nvar lookAt        = _dereq_('gl-mat4/lookAt')\nvar mat4FromQuat  = _dereq_('gl-mat4/fromQuat')\nvar invert44      = _dereq_('gl-mat4/invert')\nvar quatFromFrame = _dereq_('./lib/quatFromFrame')\n\nfunction len3(x,y,z) {\n  return Math.sqrt(Math.pow(x,2) + Math.pow(y,2) + Math.pow(z,2))\n}\n\nfunction len4(w,x,y,z) {\n  return Math.sqrt(Math.pow(w,2) + Math.pow(x,2) + Math.pow(y,2) + Math.pow(z,2))\n}\n\nfunction normalize4(out, a) {\n  var ax = a[0]\n  var ay = a[1]\n  var az = a[2]\n  var aw = a[3]\n  var al = len4(ax, ay, az, aw)\n  if(al > 1e-6) {\n    out[0] = ax/al\n    out[1] = ay/al\n    out[2] = az/al\n    out[3] = aw/al\n  } else {\n    out[0] = out[1] = out[2] = 0.0\n    out[3] = 1.0\n  }\n}\n\nfunction OrbitCameraController(initQuat, initCenter, initRadius) {\n  this.radius    = filterVector([initRadius])\n  this.center    = filterVector(initCenter)\n  this.rotation  = filterVector(initQuat)\n\n  this.computedRadius   = this.radius.curve(0)\n  this.computedCenter   = this.center.curve(0)\n  this.computedRotation = this.rotation.curve(0)\n  this.computedUp       = [0.1,0,0]\n  this.computedEye      = [0.1,0,0]\n  this.computedMatrix   = [0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]\n\n  this.recalcMatrix(0)\n}\n\nvar proto = OrbitCameraController.prototype\n\nproto.lastT = function() {\n  return Math.max(\n    this.radius.lastT(),\n    this.center.lastT(),\n    this.rotation.lastT())\n}\n\nproto.recalcMatrix = function(t) {\n  this.radius.curve(t)\n  this.center.curve(t)\n  this.rotation.curve(t)\n\n  var quat = this.computedRotation\n  normalize4(quat, quat)\n\n  var mat = this.computedMatrix\n  mat4FromQuat(mat, quat)\n\n  var center = this.computedCenter\n  var eye    = this.computedEye\n  var up     = this.computedUp\n  var radius = Math.exp(this.computedRadius[0])\n\n  eye[0] = center[0] + radius * mat[2]\n  eye[1] = center[1] + radius * mat[6]\n  eye[2] = center[2] + radius * mat[10]\n  up[0] = mat[1]\n  up[1] = mat[5]\n  up[2] = mat[9]\n\n  for(var i=0; i<3; ++i) {\n    var rr = 0.0\n    for(var j=0; j<3; ++j) {\n      rr += mat[i+4*j] * eye[j]\n    }\n    mat[12+i] = -rr\n  }\n}\n\nproto.getMatrix = function(t, result) {\n  this.recalcMatrix(t)\n  var m = this.computedMatrix\n  if(result) {\n    for(var i=0; i<16; ++i) {\n      result[i] = m[i]\n    }\n    return result\n  }\n  return m\n}\n\nproto.idle = function(t) {\n  this.center.idle(t)\n  this.radius.idle(t)\n  this.rotation.idle(t)\n}\n\nproto.flush = function(t) {\n  this.center.flush(t)\n  this.radius.flush(t)\n  this.rotation.flush(t)\n}\n\nproto.pan = function(t, dx, dy, dz) {\n  dx = dx || 0.0\n  dy = dy || 0.0\n  dz = dz || 0.0\n\n  this.recalcMatrix(t)\n  var mat = this.computedMatrix\n\n  var ux = mat[1]\n  var uy = mat[5]\n  var uz = mat[9]\n  var ul = len3(ux, uy, uz)\n  ux /= ul\n  uy /= ul\n  uz /= ul\n\n  var rx = mat[0]\n  var ry = mat[4]\n  var rz = mat[8]\n  var ru = rx * ux + ry * uy + rz * uz\n  rx -= ux * ru\n  ry -= uy * ru\n  rz -= uz * ru\n  var rl = len3(rx, ry, rz)\n  rx /= rl\n  ry /= rl\n  rz /= rl\n\n  var fx = mat[2]\n  var fy = mat[6]\n  var fz = mat[10]\n  var fu = fx * ux + fy * uy + fz * uz\n  var fr = fx * rx + fy * ry + fz * rz\n  fx -= fu * ux + fr * rx\n  fy -= fu * uy + fr * ry\n  fz -= fu * uz + fr * rz\n  var fl = len3(fx, fy, fz)\n  fx /= fl\n  fy /= fl\n  fz /= fl\n\n  var vx = rx * dx + ux * dy\n  var vy = ry * dx + uy * dy\n  var vz = rz * dx + uz * dy\n\n  this.center.move(t, vx, vy, vz)\n\n  //Update z-component of radius\n  var radius = Math.exp(this.computedRadius[0])\n  radius = Math.max(1e-4, radius + dz)\n  this.radius.set(t, Math.log(radius))\n}\n\nproto.rotate = function(t, dx, dy, dz) {\n  this.recalcMatrix(t)\n\n  dx = dx||0.0\n  dy = dy||0.0\n\n  var mat = this.computedMatrix\n\n  var rx = mat[0]\n  var ry = mat[4]\n  var rz = mat[8]\n\n  var ux = mat[1]\n  var uy = mat[5]\n  var uz = mat[9]\n\n  var fx = mat[2]\n  var fy = mat[6]\n  var fz = mat[10]\n\n  var qx = dx * rx + dy * ux\n  var qy = dx * ry + dy * uy\n  var qz = dx * rz + dy * uz\n\n  var bx = -(fy * qz - fz * qy)\n  var by = -(fz * qx - fx * qz)\n  var bz = -(fx * qy - fy * qx)  \n  var bw = Math.sqrt(Math.max(0.0, 1.0 - Math.pow(bx,2) - Math.pow(by,2) - Math.pow(bz,2)))\n  var bl = len4(bx, by, bz, bw)\n  if(bl > 1e-6) {\n    bx /= bl\n    by /= bl\n    bz /= bl\n    bw /= bl\n  } else {\n    bx = by = bz = 0.0\n    bw = 1.0\n  }\n\n  var rotation = this.computedRotation\n  var ax = rotation[0]\n  var ay = rotation[1]\n  var az = rotation[2]\n  var aw = rotation[3]\n\n  var cx = ax*bw + aw*bx + ay*bz - az*by\n  var cy = ay*bw + aw*by + az*bx - ax*bz\n  var cz = az*bw + aw*bz + ax*by - ay*bx\n  var cw = aw*bw - ax*bx - ay*by - az*bz\n  \n  //Apply roll\n  if(dz) {\n    bx = fx\n    by = fy\n    bz = fz\n    var s = Math.sin(dz) / len3(bx, by, bz)\n    bx *= s\n    by *= s\n    bz *= s\n    bw = Math.cos(dx)\n    cx = cx*bw + cw*bx + cy*bz - cz*by\n    cy = cy*bw + cw*by + cz*bx - cx*bz\n    cz = cz*bw + cw*bz + cx*by - cy*bx\n    cw = cw*bw - cx*bx - cy*by - cz*bz\n  }\n\n  var cl = len4(cx, cy, cz, cw)\n  if(cl > 1e-6) {\n    cx /= cl\n    cy /= cl\n    cz /= cl\n    cw /= cl\n  } else {\n    cx = cy = cz = 0.0\n    cw = 1.0\n  }\n\n  this.rotation.set(t, cx, cy, cz, cw)\n}\n\nproto.lookAt = function(t, eye, center, up) {\n  this.recalcMatrix(t)\n\n  center = center || this.computedCenter\n  eye    = eye    || this.computedEye\n  up     = up     || this.computedUp\n\n  var mat = this.computedMatrix\n  lookAt(mat, eye, center, up)\n\n  var rotation = this.computedRotation\n  quatFromFrame(rotation,\n    mat[0], mat[1], mat[2],\n    mat[4], mat[5], mat[6],\n    mat[8], mat[9], mat[10])\n  normalize4(rotation, rotation)\n  this.rotation.set(t, rotation[0], rotation[1], rotation[2], rotation[3])\n\n  var fl = 0.0\n  for(var i=0; i<3; ++i) {\n    fl += Math.pow(center[i] - eye[i], 2)\n  }\n  this.radius.set(t, 0.5 * Math.log(Math.max(fl, 1e-6)))\n\n  this.center.set(t, center[0], center[1], center[2])\n}\n\nproto.translate = function(t, dx, dy, dz) {\n  this.center.move(t,\n    dx||0.0,\n    dy||0.0,\n    dz||0.0)\n}\n\nproto.setMatrix = function(t, matrix) {\n\n  var rotation = this.computedRotation\n  quatFromFrame(rotation,\n    matrix[0], matrix[1], matrix[2],\n    matrix[4], matrix[5], matrix[6],\n    matrix[8], matrix[9], matrix[10])\n  normalize4(rotation, rotation)\n  this.rotation.set(t, rotation[0], rotation[1], rotation[2], rotation[3])\n\n  var mat = this.computedMatrix\n  invert44(mat, matrix)\n  var w = mat[15]\n  if(Math.abs(w) > 1e-6) {\n    var cx = mat[12]/w\n    var cy = mat[13]/w\n    var cz = mat[14]/w\n\n    this.recalcMatrix(t)  \n    var r = Math.exp(this.computedRadius[0])\n    this.center.set(t, cx-mat[2]*r, cy-mat[6]*r, cz-mat[10]*r)\n    this.radius.idle(t)\n  } else {\n    this.center.idle(t)\n    this.radius.idle(t)\n  }\n}\n\nproto.setDistance = function(t, d) {\n  if(d > 0) {\n    this.radius.set(t, Math.log(d))\n  }\n}\n\nproto.setDistanceLimits = function(lo, hi) {\n  if(lo > 0) {\n    lo = Math.log(lo)\n  } else {\n    lo = -Infinity    \n  }\n  if(hi > 0) {\n    hi = Math.log(hi)\n  } else {\n    hi = Infinity\n  }\n  hi = Math.max(hi, lo)\n  this.radius.bounds[0][0] = lo\n  this.radius.bounds[1][0] = hi\n}\n\nproto.getDistanceLimits = function(out) {\n  var bounds = this.radius.bounds\n  if(out) {\n    out[0] = Math.exp(bounds[0][0])\n    out[1] = Math.exp(bounds[1][0])\n    return out\n  }\n  return [ Math.exp(bounds[0][0]), Math.exp(bounds[1][0]) ]\n}\n\nproto.toJSON = function() {\n  this.recalcMatrix(this.lastT())\n  return {\n    center:   this.computedCenter.slice(),\n    rotation: this.computedRotation.slice(),\n    distance: Math.log(this.computedRadius[0]),\n    zoomMin:  this.radius.bounds[0][0],\n    zoomMax:  this.radius.bounds[1][0]\n  }\n}\n\nproto.fromJSON = function(options) {\n  var t = this.lastT()\n  var c = options.center\n  if(c) {\n    this.center.set(t, c[0], c[1], c[2])\n  }\n  var r = options.rotation\n  if(r) {\n    this.rotation.set(t, r[0], r[1], r[2], r[3])\n  }\n  var d = options.distance\n  if(d && d > 0) {\n    this.radius.set(t, Math.log(d))\n  }\n  this.setDistanceLimits(options.zoomMin, options.zoomMax)\n}\n\nfunction createOrbitController(options) {\n  options = options || {}\n  var center   = options.center   || [0,0,0]\n  var rotation = options.rotation || [0,0,0,1]\n  var radius   = options.radius   || 1.0\n\n  center = [].slice.call(center, 0, 3)\n  rotation = [].slice.call(rotation, 0, 4)\n  normalize4(rotation, rotation)\n\n  var result = new OrbitCameraController(\n    rotation,\n    center,\n    Math.log(radius))\n\n  result.setDistanceLimits(options.zoomMin, options.zoomMax)\n\n  if('eye' in options || 'up' in options) {\n    result.lookAt(0, options.eye, options.center, options.up)\n  }\n\n  return result\n}\n},{\"./lib/quatFromFrame\":450,\"filtered-vector\":225,\"gl-mat4/fromQuat\":261,\"gl-mat4/invert\":264,\"gl-mat4/lookAt\":265}],452:[function(_dereq_,module,exports){\n/*!\n * pad-left <https://github.com/jonschlinkert/pad-left>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar repeat = _dereq_('repeat-string');\n\nmodule.exports = function padLeft(str, num, ch) {\n  ch = typeof ch !== 'undefined' ? (ch + '') : ' ';\n  return repeat(ch, num) + str;\n};\n},{\"repeat-string\":490}],453:[function(_dereq_,module,exports){\n'use strict'\r\n\r\n/**\r\n * @module parenthesis\r\n */\r\n\r\nfunction parse (str, opts) {\r\n\t// pretend non-string parsed per-se\r\n\tif (typeof str !== 'string') return [str]\r\n\r\n\tvar res = [str]\r\n\r\n\tif (typeof opts === 'string' || Array.isArray(opts)) {\r\n\t\topts = {brackets: opts}\r\n\t}\r\n\telse if (!opts) opts = {}\r\n\r\n\tvar brackets = opts.brackets ? (Array.isArray(opts.brackets) ? opts.brackets : [opts.brackets]) : ['{}', '[]', '()']\r\n\r\n\tvar escape = opts.escape || '___'\r\n\r\n\tvar flat = !!opts.flat\r\n\r\n\tbrackets.forEach(function (bracket) {\r\n\t\t// create parenthesis regex\r\n\t\tvar pRE = new RegExp(['\\\\', bracket[0], '[^\\\\', bracket[0], '\\\\', bracket[1], ']*\\\\', bracket[1]].join(''))\r\n\r\n\t\tvar ids = []\r\n\r\n\t\tfunction replaceToken(token, idx, str){\r\n\t\t\t// save token to res\r\n\t\t\tvar refId = res.push(token.slice(bracket[0].length, -bracket[1].length)) - 1\r\n\r\n\t\t\tids.push(refId)\r\n\r\n\t\t\treturn escape + refId\r\n\t\t}\r\n\r\n\t\tres.forEach(function (str, i) {\r\n\t\t\tvar prevStr\r\n\r\n\t\t\t// replace paren tokens till there’s none\r\n\t\t\tvar a = 0\r\n\t\t\twhile (str != prevStr) {\r\n\t\t\t\tprevStr = str\r\n\t\t\t\tstr = str.replace(pRE, replaceToken)\r\n\t\t\t\tif (a++ > 10e3) throw Error('References have circular dependency. Please, check them.')\r\n\t\t\t}\r\n\r\n\t\t\tres[i] = str\r\n\t\t})\r\n\r\n\t\t// wrap found refs to brackets\r\n\t\tids = ids.reverse()\r\n\t\tres = res.map(function (str) {\r\n\t\t\tids.forEach(function (id) {\r\n\t\t\t\tstr = str.replace(new RegExp('(\\\\' + escape + id + '(?![0-9]))', 'g'), bracket[0] + '$1' + bracket[1])\r\n\t\t\t})\r\n\t\t\treturn str\r\n\t\t})\r\n\t})\r\n\r\n\tvar re = new RegExp('\\\\' + escape + '([0-9]+)')\r\n\r\n\t// transform references to tree\r\n\tfunction nest (str, refs, escape) {\r\n\t\tvar res = [], match\r\n\r\n\t\tvar a = 0\r\n\t\twhile (match = re.exec(str)) {\r\n\t\t\tif (a++ > 10e3) throw Error('Circular references in parenthesis')\r\n\r\n\t\t\tres.push(str.slice(0, match.index))\r\n\r\n\t\t\tres.push(nest(refs[match[1]], refs))\r\n\r\n\t\t\tstr = str.slice(match.index + match[0].length)\r\n\t\t}\r\n\r\n\t\tres.push(str)\r\n\r\n\t\treturn res\r\n\t}\r\n\r\n\treturn flat ? res : nest(res[0], res)\r\n}\r\n\r\nfunction stringify (arg, opts) {\r\n\tif (opts && opts.flat) {\r\n\t\tvar escape = opts && opts.escape || '___'\r\n\r\n\t\tvar str = arg[0], prevStr\r\n\r\n\t\t// pretend bad string stringified with no parentheses\r\n\t\tif (!str) return ''\r\n\r\n\r\n\t\tvar re = new RegExp('\\\\' + escape + '([0-9]+)')\r\n\r\n\t\tvar a = 0\r\n\t\twhile (str != prevStr) {\r\n\t\t\tif (a++ > 10e3) throw Error('Circular references in ' + arg)\r\n\t\t\tprevStr = str\r\n\t\t\tstr = str.replace(re, replaceRef)\r\n\t\t}\r\n\r\n\t\treturn str\r\n\t}\r\n\r\n\treturn arg.reduce(function f (prev, curr) {\r\n\t\tif (Array.isArray(curr)) {\r\n\t\t\tcurr = curr.reduce(f, '')\r\n\t\t}\r\n\t\treturn prev + curr\r\n\t}, '')\r\n\r\n\tfunction replaceRef(match, idx){\r\n\t\tif (arg[idx] == null) throw Error('Reference ' + idx + 'is undefined')\r\n\t\treturn arg[idx]\r\n\t}\r\n}\r\n\r\nfunction parenthesis (arg, opts) {\r\n\tif (Array.isArray(arg)) {\r\n\t\treturn stringify(arg, opts)\r\n\t}\r\n\telse {\r\n\t\treturn parse(arg, opts)\r\n\t}\r\n}\r\n\r\nparenthesis.parse = parse\r\nparenthesis.stringify = stringify\r\n\r\nmodule.exports = parenthesis\r\n\n},{}],454:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar pick = _dereq_('pick-by-alias')\r\n\r\nmodule.exports = parseRect\r\n\r\nfunction parseRect (arg) {\r\n  var rect\r\n\r\n  // direct arguments sequence\r\n  if (arguments.length > 1) {\r\n    arg = arguments\r\n  }\r\n\r\n  // svg viewbox\r\n  if (typeof arg === 'string') {\r\n    arg = arg.split(/\\s/).map(parseFloat)\r\n  }\r\n  else if (typeof arg === 'number') {\r\n    arg = [arg]\r\n  }\r\n\r\n  // 0, 0, 100, 100 - array-like\r\n  if (arg.length && typeof arg[0] === 'number') {\r\n    // [w, w]\r\n    if (arg.length === 1) {\r\n      rect = {\r\n        width: arg[0],\r\n        height: arg[0],\r\n        x: 0, y: 0\r\n      }\r\n    }\r\n    // [w, h]\r\n    else if (arg.length === 2) {\r\n      rect = {\r\n        width: arg[0],\r\n        height: arg[1],\r\n        x: 0, y: 0\r\n      }\r\n    }\r\n    // [l, t, r, b]\r\n    else {\r\n      rect = {\r\n        x: arg[0],\r\n        y: arg[1],\r\n        width: (arg[2] - arg[0]) || 0,\r\n        height: (arg[3] - arg[1]) || 0\r\n      }\r\n    }\r\n  }\r\n  // {x, y, w, h} or {l, t, b, r}\r\n  else if (arg) {\r\n    arg = pick(arg, {\r\n      left: 'x l left Left',\r\n      top: 'y t top Top',\r\n      width: 'w width W Width',\r\n      height: 'h height W Width',\r\n      bottom: 'b bottom Bottom',\r\n      right: 'r right Right'\r\n    })\r\n\r\n    rect = {\r\n      x: arg.left || 0,\r\n      y: arg.top || 0\r\n    }\r\n\r\n    if (arg.width == null) {\r\n      if (arg.right) rect.width = arg.right - rect.x\r\n      else rect.width = 0\r\n    }\r\n    else {\r\n      rect.width = arg.width\r\n    }\r\n\r\n    if (arg.height == null) {\r\n      if (arg.bottom) rect.height = arg.bottom - rect.y\r\n      else rect.height = 0\r\n    }\r\n    else {\r\n      rect.height = arg.height\r\n    }\r\n  }\r\n\r\n  return rect\r\n}\r\n\n},{\"pick-by-alias\":460}],455:[function(_dereq_,module,exports){\n\nmodule.exports = parse\n\n/**\n * expected argument lengths\n * @type {Object}\n */\n\nvar length = {a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0}\n\n/**\n * segment pattern\n * @type {RegExp}\n */\n\nvar segment = /([astvzqmhlc])([^astvzqmhlc]*)/ig\n\n/**\n * parse an svg path data string. Generates an Array\n * of commands where each command is an Array of the\n * form `[command, arg1, arg2, ...]`\n *\n * @param {String} path\n * @return {Array}\n */\n\nfunction parse(path) {\n\tvar data = []\n\tpath.replace(segment, function(_, command, args){\n\t\tvar type = command.toLowerCase()\n\t\targs = parseValues(args)\n\n\t\t// overloaded moveTo\n\t\tif (type == 'm' && args.length > 2) {\n\t\t\tdata.push([command].concat(args.splice(0, 2)))\n\t\t\ttype = 'l'\n\t\t\tcommand = command == 'm' ? 'l' : 'L'\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (args.length == length[type]) {\n\t\t\t\targs.unshift(command)\n\t\t\t\treturn data.push(args)\n\t\t\t}\n\t\t\tif (args.length < length[type]) throw new Error('malformed path data')\n\t\t\tdata.push([command].concat(args.splice(0, length[type])))\n\t\t}\n\t})\n\treturn data\n}\n\nvar number = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig\n\nfunction parseValues(args) {\n\tvar numbers = args.match(number)\n\treturn numbers ? numbers.map(Number) : []\n}\n\n},{}],456:[function(_dereq_,module,exports){\nmodule.exports = function parseUnit(str, out) {\n    if (!out)\n        out = [ 0, '' ]\n\n    str = String(str)\n    var num = parseFloat(str, 10)\n    out[0] = num\n    out[1] = str.match(/[\\d.\\-\\+]*\\s*(.*)/)[1] || ''\n    return out\n}\n},{}],457:[function(_dereq_,module,exports){\n(function (process){\n// Generated by CoffeeScript 1.12.2\n(function() {\n  var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n  if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n    module.exports = function() {\n      return performance.now();\n    };\n  } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n    module.exports = function() {\n      return (getNanoSeconds() - nodeLoadTime) / 1e6;\n    };\n    hrtime = process.hrtime;\n    getNanoSeconds = function() {\n      var hr;\n      hr = hrtime();\n      return hr[0] * 1e9 + hr[1];\n    };\n    moduleLoadTime = getNanoSeconds();\n    upTime = process.uptime() * 1e9;\n    nodeLoadTime = moduleLoadTime - upTime;\n  } else if (Date.now) {\n    module.exports = function() {\n      return Date.now() - loadTime;\n    };\n    loadTime = Date.now();\n  } else {\n    module.exports = function() {\n      return new Date().getTime() - loadTime;\n    };\n    loadTime = new Date().getTime();\n  }\n\n}).call(this);\n\n\n\n}).call(this,_dereq_('_process'))\n},{\"_process\":477}],458:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = permutationSign\n\nvar BRUTE_FORCE_CUTOFF = 32\n\nvar pool = _dereq_(\"typedarray-pool\")\n\nfunction permutationSign(p) {\n  var n = p.length\n  if(n < BRUTE_FORCE_CUTOFF) {\n    //Use quadratic algorithm for small n\n    var sgn = 1\n    for(var i=0; i<n; ++i) {\n      for(var j=0; j<i; ++j) {\n        if(p[i] < p[j]) {\n          sgn = -sgn\n        } else if(p[i] === p[j]) {\n          return 0\n        }\n      }\n    }\n    return sgn\n  } else {\n    //Otherwise use linear time algorithm\n    var visited = pool.mallocUint8(n)\n    for(var i=0; i<n; ++i) {\n      visited[i] = 0\n    }\n    var sgn = 1\n    for(var i=0; i<n; ++i) {\n      if(!visited[i]) {\n        var count = 1\n        visited[i] = 1\n        for(var j=p[i]; j!==i; j=p[j]) {\n          if(visited[j]) {\n            pool.freeUint8(visited)\n            return 0\n          }\n          count += 1\n          visited[j] = 1\n        }\n        if(!(count & 1)) {\n          sgn = -sgn\n        }\n      }\n    }\n    pool.freeUint8(visited)\n    return sgn\n  }\n}\n},{\"typedarray-pool\":532}],459:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar pool = _dereq_(\"typedarray-pool\")\nvar inverse = _dereq_(\"invert-permutation\")\n\nfunction rank(permutation) {\n  var n = permutation.length\n  switch(n) {\n    case 0:\n    case 1:\n      return 0\n    case 2:\n      return permutation[1]\n    default:\n      break\n  }\n  var p = pool.mallocUint32(n)\n  var pinv = pool.mallocUint32(n)\n  var r = 0, s, t, i\n  inverse(permutation, pinv)\n  for(i=0; i<n; ++i) {\n    p[i] = permutation[i]\n  }\n  for(i=n-1; i>0; --i) {\n    t = pinv[i]\n    s = p[i]\n    p[i] = p[t]\n    p[t] = s\n    pinv[i] = pinv[s]\n    pinv[s] = t\n    r = (r + s) * i\n  }\n  pool.freeUint32(pinv)\n  pool.freeUint32(p)\n  return r\n}\n\nfunction unrank(n, r, p) {\n  switch(n) {\n    case 0:\n      if(p) { return p }\n      return []\n    case 1:\n      if(p) {\n        p[0] = 0\n        return p\n      } else {\n        return [0]\n      }\n    case 2:\n      if(p) {\n        if(r) {\n          p[0] = 0\n          p[1] = 1\n        } else {\n          p[0] = 1\n          p[1] = 0\n        }\n        return p\n      } else {\n        return r ? [0,1] : [1,0]\n      }\n    default:\n      break\n  }\n  p = p || new Array(n)\n  var s, t, i, nf=1\n  p[0] = 0\n  for(i=1; i<n; ++i) {\n    p[i] = i\n    nf = (nf*i)|0\n  }\n  for(i=n-1; i>0; --i) {\n    s = (r / nf)|0\n    r = (r - s * nf)|0\n    nf = (nf / i)|0\n    t = p[i]|0\n    p[i] = p[s]|0\n    p[s] = t|0\n  }\n  return p\n}\n\nexports.rank = rank\nexports.unrank = unrank\n\n},{\"invert-permutation\":410,\"typedarray-pool\":532}],460:[function(_dereq_,module,exports){\n'use strict'\r\n\r\n\r\nmodule.exports = function pick (src, props, keepRest) {\r\n\tvar result = {}, prop, i\r\n\r\n\tif (typeof props === 'string') props = toList(props)\r\n\tif (Array.isArray(props)) {\r\n\t\tvar res = {}\r\n\t\tfor (i = 0; i < props.length; i++) {\r\n\t\t\tres[props[i]] = true\r\n\t\t}\r\n\t\tprops = res\r\n\t}\r\n\r\n\t// convert strings to lists\r\n\tfor (prop in props) {\r\n\t\tprops[prop] = toList(props[prop])\r\n\t}\r\n\r\n\t// keep-rest strategy requires unmatched props to be preserved\r\n\tvar occupied = {}\r\n\r\n\tfor (prop in props) {\r\n\t\tvar aliases = props[prop]\r\n\r\n\t\tif (Array.isArray(aliases)) {\r\n\t\t\tfor (i = 0; i < aliases.length; i++) {\r\n\t\t\t\tvar alias = aliases[i]\r\n\r\n\t\t\t\tif (keepRest) {\r\n\t\t\t\t\toccupied[alias] = true\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (alias in src) {\r\n\t\t\t\t\tresult[prop] = src[alias]\r\n\r\n\t\t\t\t\tif (keepRest) {\r\n\t\t\t\t\t\tfor (var j = i; j < aliases.length; j++) {\r\n\t\t\t\t\t\t\toccupied[aliases[j]] = true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (prop in src) {\r\n\t\t\tif (props[prop]) {\r\n\t\t\t\tresult[prop] = src[prop]\r\n\t\t\t}\r\n\r\n\t\t\tif (keepRest) {\r\n\t\t\t\toccupied[prop] = true\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (keepRest) {\r\n\t\tfor (prop in src) {\r\n\t\t\tif (occupied[prop]) continue\r\n\t\t\tresult[prop] = src[prop]\r\n\t\t}\r\n\t}\r\n\r\n\treturn result\r\n}\r\n\r\nvar CACHE = {}\r\n\r\nfunction toList(arg) {\r\n\tif (CACHE[arg]) return CACHE[arg]\r\n\tif (typeof arg === 'string') {\r\n\t\targ = CACHE[arg] = arg.split(/\\s*,\\s*|\\s+/)\r\n\t}\r\n\treturn arg\r\n}\r\n\n},{}],461:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = planarDual\n\nvar compareAngle = _dereq_(\"compare-angle\")\n\nfunction planarDual(cells, positions) {\n\n  var numVertices = positions.length|0\n  var numEdges = cells.length\n  var adj = [new Array(numVertices), new Array(numVertices)]\n  for(var i=0; i<numVertices; ++i) {\n    adj[0][i] = []\n    adj[1][i] = []\n  }\n  for(var i=0; i<numEdges; ++i) {\n    var c = cells[i]\n    adj[0][c[0]].push(c)\n    adj[1][c[1]].push(c)\n  }\n\n  var cycles = []\n\n  //Add isolated vertices as trivial case\n  for(var i=0; i<numVertices; ++i) {\n    if(adj[0][i].length + adj[1][i].length === 0) {\n      cycles.push( [i] )\n    }\n  }\n\n  //Remove a half edge\n  function cut(c, i) {\n    var a = adj[i][c[i]]\n    a.splice(a.indexOf(c), 1)\n  }\n\n  //Find next vertex and cut edge\n  function next(a, b, noCut) {\n    var nextCell, nextVertex, nextDir\n    for(var i=0; i<2; ++i) {\n      if(adj[i][b].length > 0) {\n        nextCell = adj[i][b][0]\n        nextDir = i\n        break\n      }\n    }\n    nextVertex = nextCell[nextDir^1]\n\n    for(var dir=0; dir<2; ++dir) {\n      var nbhd = adj[dir][b]\n      for(var k=0; k<nbhd.length; ++k) {\n        var e = nbhd[k]\n        var p = e[dir^1]\n        var cmp = compareAngle(\n            positions[a], \n            positions[b], \n            positions[nextVertex],\n            positions[p])\n        if(cmp > 0) {\n          nextCell = e\n          nextVertex = p\n          nextDir = dir\n        }\n      }\n    }\n    if(noCut) {\n      return nextVertex\n    }\n    if(nextCell) {\n      cut(nextCell, nextDir)\n    }\n    return nextVertex\n  }\n\n  function extractCycle(v, dir) {\n    var e0 = adj[dir][v][0]\n    var cycle = [v]\n    cut(e0, dir)\n    var u = e0[dir^1]\n    var d0 = dir\n    while(true) {\n      while(u !== v) {\n        cycle.push(u)\n        u = next(cycle[cycle.length-2], u, false)\n      }\n      if(adj[0][v].length + adj[1][v].length === 0) {\n        break\n      }\n      var a = cycle[cycle.length-1]\n      var b = v\n      var c = cycle[1]\n      var d = next(a, b, true)\n      if(compareAngle(positions[a], positions[b], positions[c], positions[d]) < 0) {\n        break\n      }\n      cycle.push(v)\n      u = next(a, b)\n    }\n    return cycle\n  }\n\n  function shouldGlue(pcycle, ncycle) {\n    return (ncycle[1] === ncycle[ncycle.length-1])\n  }\n\n  for(var i=0; i<numVertices; ++i) {\n    for(var j=0; j<2; ++j) {\n      var pcycle = []\n      while(adj[j][i].length > 0) {\n        var ni = adj[0][i].length\n        var ncycle = extractCycle(i,j)\n        if(shouldGlue(pcycle, ncycle)) {\n          //Glue together trivial cycles\n          pcycle.push.apply(pcycle, ncycle)\n        } else {\n          if(pcycle.length > 0) {\n            cycles.push(pcycle)\n          }\n          pcycle = ncycle\n        }\n      }\n      if(pcycle.length > 0) {\n        cycles.push(pcycle)\n      }\n    }\n  }\n\n  //Combine paths and loops together\n  return cycles\n}\n},{\"compare-angle\":120}],462:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = trimLeaves\n\nvar e2a = _dereq_('edges-to-adjacency-list')\n\nfunction trimLeaves(edges, positions) {\n  var adj = e2a(edges, positions.length)\n  var live = new Array(positions.length)\n  var nbhd = new Array(positions.length)\n\n  var dead = []\n  for(var i=0; i<positions.length; ++i) {\n    var count = adj[i].length\n    nbhd[i] = count\n    live[i] = true\n    if(count <= 1) {\n      dead.push(i)\n    }\n  }\n\n  while(dead.length > 0) {\n    var v = dead.pop()\n    live[v] = false\n    var n = adj[v]\n    for(var i=0; i<n.length; ++i) {\n      var u = n[i]\n      if(--nbhd[u] === 0) {\n        dead.push(u)\n      }\n    }\n  }\n\n  var newIndex = new Array(positions.length)\n  var npositions = []\n  for(var i=0; i<positions.length; ++i) {\n    if(live[i]) {\n      var v = npositions.length\n      newIndex[i] = v\n      npositions.push(positions[i])\n    } else {\n      newIndex[i] = -1\n    }\n  }\n\n  var nedges = []\n  for(var i=0; i<edges.length; ++i) {\n    var e = edges[i]\n    if(live[e[0]] && live[e[1]]) {\n      nedges.push([ newIndex[e[0]], newIndex[e[1]] ])\n    }\n  }\n  \n  return [ nedges, npositions ]\n}\n},{\"edges-to-adjacency-list\":166}],463:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = planarGraphToPolyline\n\nvar e2a = _dereq_('edges-to-adjacency-list')\nvar planarDual = _dereq_('planar-dual')\nvar preprocessPolygon = _dereq_('point-in-big-polygon')\nvar twoProduct = _dereq_('two-product')\nvar robustSum = _dereq_('robust-sum')\nvar uniq = _dereq_('uniq')\nvar trimLeaves = _dereq_('./lib/trim-leaves')\n\nfunction makeArray(length, fill) {\n  var result = new Array(length)\n  for(var i=0; i<length; ++i) {\n    result[i] = fill\n  }\n  return result\n}\n\nfunction makeArrayOfArrays(length) {\n  var result = new Array(length)\n  for(var i=0; i<length; ++i) {\n    result[i] = []\n  }\n  return result\n}\n\n\nfunction planarGraphToPolyline(edges, positions) {\n\n  //Trim leaves\n  var result = trimLeaves(edges, positions)\n  edges = result[0]\n  positions = result[1]\n\n  var numVertices = positions.length\n  var numEdges = edges.length\n\n  //Calculate adjacency list, check manifold\n  var adj = e2a(edges, positions.length)\n  for(var i=0; i<numVertices; ++i) {\n    if(adj[i].length % 2 === 1) {\n      throw new Error('planar-graph-to-polyline: graph must be manifold')\n    }\n  }\n\n  //Get faces\n  var faces = planarDual(edges, positions)\n\n  //Check orientation of a polygon using exact arithmetic\n  function ccw(c) {\n    var n = c.length\n    var area = [0]\n    for(var j=0; j<n; ++j) {\n      var a = positions[c[j]]\n      var b = positions[c[(j+1)%n]]\n      var t00 = twoProduct(-a[0], a[1])\n      var t01 = twoProduct(-a[0], b[1])\n      var t10 = twoProduct( b[0], a[1])\n      var t11 = twoProduct( b[0], b[1])\n      area = robustSum(area, robustSum(robustSum(t00, t01), robustSum(t10, t11)))\n    }\n    return area[area.length-1] > 0\n  }\n\n  //Extract all clockwise faces\n  faces = faces.filter(ccw)\n\n  //Detect which loops are contained in one another to handle parent-of relation\n  var numFaces = faces.length\n  var parent = new Array(numFaces)\n  var containment = new Array(numFaces)\n  for(var i=0; i<numFaces; ++i) {\n    parent[i] = i\n    var row = new Array(numFaces)\n    var loopVertices = faces[i].map(function(v) {\n      return positions[v]\n    })\n    var pmc = preprocessPolygon([loopVertices])\n    var count = 0\n    outer:\n    for(var j=0; j<numFaces; ++j) {\n      row[j] = 0\n      if(i === j) {\n        continue\n      }\n      var c = faces[j]\n      var n = c.length\n      for(var k=0; k<n; ++k) {\n        var d = pmc(positions[c[k]])\n        if(d !== 0) {\n          if(d < 0) {\n            row[j] = 1\n            count += 1\n          }\n          continue outer\n        }\n      }\n      row[j] = 1\n      count += 1\n    }\n    containment[i] = [count, i, row]\n  }\n  containment.sort(function(a,b) {\n    return b[0] - a[0]\n  })\n  for(var i=0; i<numFaces; ++i) {\n    var row = containment[i]\n    var idx = row[1]\n    var children = row[2]\n    for(var j=0; j<numFaces; ++j) {\n      if(children[j]) {\n        parent[j] = idx\n      }\n    }\n  }\n\n  //Initialize face adjacency list\n  var fadj = makeArrayOfArrays(numFaces)\n  for(var i=0; i<numFaces; ++i) {\n    fadj[i].push(parent[i])\n    fadj[parent[i]].push(i)\n  }\n\n  //Build adjacency matrix for edges\n  var edgeAdjacency = {}\n  var internalVertices = makeArray(numVertices, false)\n  for(var i=0; i<numFaces; ++i) {\n    var c = faces[i]\n    var n = c.length\n    for(var j=0; j<n; ++j) {\n      var a = c[j]\n      var b = c[(j+1)%n]\n      var key = Math.min(a,b) + \":\" + Math.max(a,b)\n      if(key in edgeAdjacency) {\n        var neighbor = edgeAdjacency[key]\n        fadj[neighbor].push(i)\n        fadj[i].push(neighbor)\n        internalVertices[a] = internalVertices[b] = true\n      } else {\n        edgeAdjacency[key] = i\n      }\n    }\n  }\n\n  function sharedBoundary(c) {\n    var n = c.length\n    for(var i=0; i<n; ++i) {\n      if(!internalVertices[c[i]]) {\n        return false\n      }\n    }\n    return true\n  }\n\n  var toVisit = []\n  var parity = makeArray(numFaces, -1)\n  for(var i=0; i<numFaces; ++i) {\n    if(parent[i] === i && !sharedBoundary(faces[i])) {\n      toVisit.push(i)\n      parity[i] = 0\n    } else {\n      parity[i] = -1\n    }\n  }\n\n  //Using face adjacency, classify faces as in/out\n  var result = []\n  while(toVisit.length > 0) {\n    var top = toVisit.pop()\n    var nbhd = fadj[top]\n    uniq(nbhd, function(a,b) {\n      return a-b\n    })\n    var nnbhr = nbhd.length\n    var p = parity[top]\n    var polyline\n    if(p === 0) {\n      var c = faces[top]\n      polyline = [c]\n    }\n    for(var i=0; i<nnbhr; ++i) {\n      var f = nbhd[i]\n      if(parity[f] >= 0) {\n        continue\n      }\n      parity[f] = p^1\n      toVisit.push(f)\n      if(p === 0) {\n        var c = faces[f]\n        if(!sharedBoundary(c)) {\n          c.reverse()\n          polyline.push(c)\n        }\n      }\n    }\n    if(p === 0) {\n      result.push(polyline)\n    }\n  }\n\n  return result\n}\n},{\"./lib/trim-leaves\":462,\"edges-to-adjacency-list\":166,\"planar-dual\":461,\"point-in-big-polygon\":467,\"robust-sum\":502,\"two-product\":530,\"uniq\":534}],464:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = _dereq_('./quad')\r\n},{\"./quad\":466}],465:[function(_dereq_,module,exports){\narguments[4][104][0].apply(exports,arguments)\n},{\"dup\":104}],466:[function(_dereq_,module,exports){\n/**\r\n * @module  point-cluster/quad\r\n *\r\n * Bucket based quad tree clustering\r\n */\r\n\r\n'use strict'\r\n\r\nvar search = _dereq_('binary-search-bounds')\r\nvar clamp = _dereq_('clamp')\r\nvar rect = _dereq_('parse-rect')\r\nvar getBounds = _dereq_('array-bounds')\r\nvar pick = _dereq_('pick-by-alias')\r\nvar defined = _dereq_('defined')\r\nvar flatten = _dereq_('flatten-vertex-data')\r\nvar isObj = _dereq_('is-obj')\r\nvar dtype = _dereq_('dtype')\r\nvar log2 = _dereq_('math-log2')\r\n\r\n\r\nmodule.exports = function cluster (srcPoints, options) {\r\n\tif (!options) { options = {} }\r\n\r\n\tsrcPoints = flatten(srcPoints, 'float64')\r\n\r\n\toptions = pick(options, {\r\n\t\tbounds: 'range bounds dataBox databox',\r\n\t\tmaxDepth: 'depth maxDepth maxdepth level maxLevel maxlevel levels',\r\n\t\tdtype: 'type dtype format out dst output destination'\r\n\t\t// sort: 'sortBy sortby sort',\r\n\t\t// pick: 'pick levelPoint',\r\n\t\t// nodeSize: 'node nodeSize minNodeSize minSize size'\r\n\t})\r\n\r\n\t// let nodeSize = defined(options.nodeSize, 1)\r\n\tvar maxDepth = defined(options.maxDepth, 255)\r\n\tvar bounds = defined(options.bounds, getBounds(srcPoints, 2))\r\n\tif (bounds[0] === bounds[2]) { bounds[2]++ }\r\n\tif (bounds[1] === bounds[3]) { bounds[3]++ }\r\n\r\n\tvar points = normalize(srcPoints, bounds)\r\n\r\n\t// init variables\r\n\tvar n = srcPoints.length >>> 1\r\n\tvar ids\r\n\tif (!options.dtype) { options.dtype = 'array' }\r\n\r\n\tif (typeof options.dtype === 'string') {\r\n\t\tids = new (dtype(options.dtype))(n)\r\n\t}\r\n\telse if (options.dtype) {\r\n\t\tids = options.dtype\r\n\t\tif (Array.isArray(ids)) { ids.length = n }\r\n\t}\r\n\tfor (var i = 0; i < n; ++i) {\r\n\t\tids[i] = i\r\n\t}\r\n\r\n\t// point indexes for levels [0: [a,b,c,d], 1: [a,b,c,d,e,f,...], ...]\r\n\tvar levels = []\r\n\r\n\t// starting indexes of subranges in sub levels, levels.length * 4\r\n\tvar sublevels = []\r\n\r\n\t// unique group ids, sorted in z-curve fashion within levels\r\n\tvar groups = []\r\n\r\n\t// level offsets in `ids`\r\n\tvar offsets = []\r\n\r\n\r\n\t// sort points\r\n\tsort(0, 0, 1, ids, 0, 1)\r\n\r\n\r\n\t// return reordered ids with provided methods\r\n\t// save level offsets in output buffer\r\n\tvar offset = 0\r\n\tfor (var level = 0; level < levels.length; level++) {\r\n\t\tvar levelItems = levels[level]\r\n\t\tif (ids.set) { ids.set(levelItems, offset) }\r\n\t\telse {\r\n\t\t\tfor (var i$1 = 0, l = levelItems.length; i$1 < l; i$1++) {\r\n\t\t\t\tids[i$1 + offset] = levelItems[i$1]\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar nextOffset = offset + levels[level].length\r\n\t\toffsets[level] = [offset, nextOffset]\r\n\t\toffset = nextOffset\r\n\t}\r\n\r\n\tids.range = range\r\n\r\n\treturn ids\r\n\r\n\r\n\r\n\t// FIXME: it is possible to create one typed array heap and reuse that to avoid memory blow\r\n\tfunction sort (x, y, diam, ids, level, group) {\r\n\t\tif (!ids.length) { return null }\r\n\r\n\t\t// save first point as level representative\r\n\t\tvar levelItems = levels[level] || (levels[level] = [])\r\n\t\tvar levelGroups = groups[level] || (groups[level] = [])\r\n\t\tvar sublevel = sublevels[level] || (sublevels[level] = [])\r\n\t\tvar offset = levelItems.length\r\n\r\n\t\tlevel++\r\n\r\n\t\t// max depth reached - put all items into a first group\r\n\t\tif (level > maxDepth) {\r\n\t\t\tfor (var i = 0; i < ids.length; i++) {\r\n\t\t\t\tlevelItems.push(ids[i])\r\n\t\t\t\tlevelGroups.push(group)\r\n\t\t\t\tsublevel.push(null, null, null, null)\r\n\t\t\t}\r\n\r\n\t\t\treturn offset\r\n\t\t}\r\n\r\n\t\tlevelItems.push(ids[0])\r\n\t\tlevelGroups.push(group)\r\n\r\n\t\tif (ids.length <= 1) {\r\n\t\t\tsublevel.push(null, null, null, null)\r\n\t\t\treturn offset\r\n\t\t}\r\n\r\n\r\n\t\tvar d2 = diam * .5\r\n\t\tvar cx = x + d2, cy = y + d2\r\n\r\n\t\t// distribute points by 4 buckets\r\n\t\tvar lolo = [], lohi = [], hilo = [], hihi = []\r\n\r\n\t\tfor (var i$1 = 1, l = ids.length; i$1 < l; i$1++) {\r\n\t\t\tvar idx = ids[i$1],\r\n\t\t\t\tx$1 = points[idx * 2],\r\n\t\t\t\ty$1 = points[idx * 2 + 1]\r\n\t\t\tx$1 < cx ? (y$1 < cy ? lolo.push(idx) : lohi.push(idx)) : (y$1 < cy ? hilo.push(idx) : hihi.push(idx))\r\n\t\t}\r\n\r\n\t\tgroup <<= 2\r\n\t\tsublevel.push(\r\n\t\t\tsort(x, y, d2, lolo, level, group),\r\n\t\t\tsort(x, cy, d2, lohi, level, group + 1),\r\n\t\t\tsort(cx, y, d2, hilo, level, group + 2),\r\n\t\t\tsort(cx, cy, d2, hihi, level, group + 3)\r\n\t\t)\r\n\r\n\t\treturn offset\r\n\t}\r\n\r\n\t// get all points within the passed range\r\n\tfunction range () {\n\t\tvar args = [], len = arguments.length;\n\t\twhile ( len-- ) args[ len ] = arguments[ len ];\n\r\n\t\tvar options\r\n\r\n\t\tif (isObj(args[args.length - 1])) {\r\n\t\t\tvar arg = args.pop()\r\n\r\n\t\t\t// detect if that was a rect object\r\n\t\t\tif (!args.length && (arg.x != null || arg.l != null || arg.left != null)) {\r\n\t\t\t\targs = [arg]\r\n\t\t\t\toptions = {}\r\n\t\t\t}\r\n\r\n\t\t\toptions = pick(arg, {\r\n\t\t\t\tlevel: 'level maxLevel',\r\n\t\t\t\td: 'd diam diameter r radius px pxSize pixel pixelSize maxD size minSize',\r\n\t\t\t\tlod: 'lod details ranges offsets'\r\n\t\t\t})\r\n\t\t}\r\n\t\telse {\r\n\t\t\toptions = {}\r\n\t\t}\r\n\r\n\t\tif (!args.length) { args = bounds }\r\n\r\n\t\tvar box = rect.apply( void 0, args )\r\n\r\n\t\tvar ref = [\r\n\t\t\tMath.min(box.x, box.x + box.width),\r\n\t\t\tMath.min(box.y, box.y + box.height),\r\n\t\t\tMath.max(box.x, box.x + box.width),\r\n\t\t\tMath.max(box.y, box.y + box.height)\r\n\t\t];\n\t\tvar minX = ref[0];\n\t\tvar minY = ref[1];\n\t\tvar maxX = ref[2];\n\t\tvar maxY = ref[3];\r\n\r\n\t\tvar ref$1 = normalize([minX, minY, maxX, maxY], bounds );\n\t\tvar nminX = ref$1[0];\n\t\tvar nminY = ref$1[1];\n\t\tvar nmaxX = ref$1[2];\n\t\tvar nmaxY = ref$1[3];\r\n\r\n\t\tvar maxLevel = defined(options.level, levels.length)\r\n\r\n\t\t// limit maxLevel by px size\r\n\t\tif (options.d != null) {\r\n\t\t\tvar d\r\n\t\t\tif (typeof options.d === 'number') { d = [options.d, options.d] }\r\n\t\t\telse if (options.d.length) { d = options.d }\r\n\r\n\t\t\tmaxLevel = Math.min(\r\n\t\t\t\tMath.max(\r\n\t\t\t\t\tMath.ceil(-log2(Math.abs(d[0]) / (bounds[2] - bounds[0]))),\r\n\t\t\t\t\tMath.ceil(-log2(Math.abs(d[1]) / (bounds[3] - bounds[1])))\r\n\t\t\t\t),\r\n\t\t\t\tmaxLevel\r\n\t\t\t)\r\n\t\t}\r\n\t\tmaxLevel = Math.min(maxLevel, levels.length)\r\n\r\n\t\t// return levels of details\r\n\t\tif (options.lod) {\r\n\t\t\treturn lod(nminX, nminY, nmaxX, nmaxY, maxLevel)\r\n\t\t}\r\n\r\n\r\n\r\n\t\t// do selection ids\r\n\t\tvar selection = []\r\n\r\n\t\t// FIXME: probably we can do LOD here beforehead\r\n\t\tselect( 0, 0, 1, 0, 0, 1)\r\n\r\n\t\tfunction select ( lox, loy, d, level, from, to ) {\r\n\t\t\tif (from === null || to === null) { return }\r\n\r\n\t\t\tvar hix = lox + d\r\n\t\t\tvar hiy = loy + d\r\n\r\n\t\t\t// if box does not intersect level - ignore\r\n\t\t\tif ( nminX > hix || nminY > hiy || nmaxX < lox || nmaxY < loy ) { return }\r\n\t\t\tif ( level >= maxLevel ) { return }\r\n\t\t\tif ( from === to ) { return }\r\n\r\n\t\t\t// if points fall into box range - take it\r\n\t\t\tvar levelItems = levels[level]\r\n\r\n\t\t\tif (to === undefined) { to = levelItems.length }\r\n\r\n\t\t\tfor (var i = from; i < to; i++) {\r\n\t\t\t\tvar id = levelItems[i]\r\n\r\n\t\t\t\tvar px = srcPoints[ id * 2 ]\r\n\t\t\t\tvar py = srcPoints[ id * 2 + 1 ]\r\n\r\n\t\t\t\tif ( px >= minX && px <= maxX && py >= minY && py <= maxY ) {selection.push(id)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// for every subsection do select\r\n\t\t\tvar offsets = sublevels[ level ]\r\n\t\t\tvar off0 = offsets[ from * 4 + 0 ]\r\n\t\t\tvar off1 = offsets[ from * 4 + 1 ]\r\n\t\t\tvar off2 = offsets[ from * 4 + 2 ]\r\n\t\t\tvar off3 = offsets[ from * 4 + 3 ]\r\n\t\t\tvar end = nextOffset(offsets, from + 1)\r\n\r\n\t\t\tvar d2 = d * .5\r\n\t\t\tvar nextLevel = level + 1\r\n\t\t\tselect( lox, loy, d2, nextLevel, off0, off1 || off2 || off3 || end)\r\n\t\t\tselect( lox, loy + d2, d2, nextLevel, off1, off2 || off3 || end)\r\n\t\t\tselect( lox + d2, loy, d2, nextLevel, off2, off3 || end)\r\n\t\t\tselect( lox + d2, loy + d2, d2, nextLevel, off3, end)\r\n\t\t}\r\n\r\n\t\tfunction nextOffset(offsets, from) {\r\n\t\t\tvar offset = null, i = 0\r\n\t\t\twhile(offset === null) {\r\n\t\t\t\toffset = offsets[ from * 4 + i ]\r\n\t\t\t\ti++\r\n\t\t\t\tif (i > offsets.length) { return null }\r\n\t\t\t}\r\n\t\t\treturn offset\r\n\t\t}\r\n\r\n\t\treturn selection\r\n\t}\r\n\r\n\t// get range offsets within levels to render lods appropriate for zoom level\r\n\t// TODO: it is possible to store minSize of a point to optimize neede level calc\r\n\tfunction lod (lox, loy, hix, hiy, maxLevel) {\r\n\t\tvar ranges = []\r\n\r\n\t\tfor (var level = 0; level < maxLevel; level++) {\r\n\t\t\tvar levelGroups = groups[level]\r\n\t\t\tvar from = offsets[level][0]\r\n\r\n\t\t\tvar levelGroupStart = group(lox, loy, level)\r\n\t\t\tvar levelGroupEnd = group(hix, hiy, level)\r\n\r\n\t\t\t// FIXME: utilize sublevels to speed up search range here\r\n\t\t\tvar startOffset = search.ge(levelGroups, levelGroupStart)\r\n\t\t\tvar endOffset = search.gt(levelGroups, levelGroupEnd, startOffset, levelGroups.length - 1)\r\n\r\n\t\t\tranges[level] = [startOffset + from, endOffset + from]\r\n\t\t}\r\n\r\n\t\treturn ranges\r\n\t}\r\n\r\n\t// get group id closest to the x,y coordinate, corresponding to a level\r\n\tfunction group (x, y, level) {\r\n\t\tvar group = 1\r\n\r\n\t\tvar cx = .5, cy = .5\r\n\t\tvar diam = .5\r\n\r\n\t\tfor (var i = 0; i < level; i++) {\r\n\t\t\tgroup <<= 2\r\n\r\n\t\t\tgroup += x < cx ? (y < cy ? 0 : 1) : (y < cy ? 2 : 3)\r\n\r\n\t\t\tdiam *= .5\r\n\r\n\t\t\tcx += x < cx ? -diam : diam\r\n\t\t\tcy += y < cy ? -diam : diam\r\n\t\t}\r\n\r\n\t\treturn group\r\n\t}\r\n}\r\n\r\n\r\n// normalize points by bounds\r\nfunction normalize (pts, bounds) {\r\n\tvar lox = bounds[0];\n\tvar loy = bounds[1];\n\tvar hix = bounds[2];\n\tvar hiy = bounds[3];\r\n\tvar scaleX = 1.0 / (hix - lox)\r\n\tvar scaleY = 1.0 / (hiy - loy)\r\n\tvar result = new Array(pts.length)\r\n\r\n\tfor (var i = 0, n = pts.length / 2; i < n; i++) {\r\n\t\tresult[2*i] = clamp((pts[2*i] - lox) * scaleX, 0, 1)\r\n\t\tresult[2*i+1] = clamp((pts[2*i+1] - loy) * scaleY, 0, 1)\r\n\t}\r\n\r\n\treturn result\r\n}\r\n},{\"array-bounds\":58,\"binary-search-bounds\":465,\"clamp\":108,\"defined\":158,\"dtype\":163,\"flatten-vertex-data\":226,\"is-obj\":416,\"math-log2\":427,\"parse-rect\":454,\"pick-by-alias\":460}],467:[function(_dereq_,module,exports){\nmodule.exports = preprocessPolygon\n\nvar orient = _dereq_('robust-orientation')[3]\nvar makeSlabs = _dereq_('slab-decomposition')\nvar makeIntervalTree = _dereq_('interval-tree-1d')\nvar bsearch = _dereq_('binary-search-bounds')\n\nfunction visitInterval() {\n  return true\n}\n\nfunction intervalSearch(table) {\n  return function(x, y) {\n    var tree = table[x]\n    if(tree) {\n      return !!tree.queryPoint(y, visitInterval)\n    }\n    return false\n  }\n}\n\nfunction buildVerticalIndex(segments) {\n  var table = {}\n  for(var i=0; i<segments.length; ++i) {\n    var s = segments[i]\n    var x = s[0][0]\n    var y0 = s[0][1]\n    var y1 = s[1][1]\n    var p = [ Math.min(y0, y1), Math.max(y0, y1) ]\n    if(x in table) {\n      table[x].push(p)\n    } else {\n      table[x] = [ p ]\n    }\n  }\n  var intervalTable = {}\n  var keys = Object.keys(table)\n  for(var i=0; i<keys.length; ++i) {\n    var segs = table[keys[i]]\n    intervalTable[keys[i]] = makeIntervalTree(segs)\n  }\n  return intervalSearch(intervalTable)\n}\n\nfunction buildSlabSearch(slabs, coordinates) {\n  return function(p) {\n    var bucket = bsearch.le(coordinates, p[0])\n    if(bucket < 0) {\n      return 1\n    }\n    var root = slabs[bucket]\n    if(!root) {\n      if(bucket > 0 && coordinates[bucket] === p[0]) {\n        root = slabs[bucket-1]\n      } else {\n        return 1\n      }\n    }\n    var lastOrientation = 1\n    while(root) {\n      var s = root.key\n      var o = orient(p, s[0], s[1])\n      if(s[0][0] < s[1][0]) {\n        if(o < 0) {\n          root = root.left\n        } else if(o > 0) {\n          lastOrientation = -1\n          root = root.right\n        } else {\n          return 0\n        }\n      } else {\n        if(o > 0) {\n          root = root.left\n        } else if(o < 0) {\n          lastOrientation = 1\n          root = root.right\n        } else {\n          return 0\n        }\n      }\n    }\n    return lastOrientation\n  }\n}\n\nfunction classifyEmpty(p) {\n  return 1\n}\n\nfunction createClassifyVertical(testVertical) {\n  return function classify(p) {\n    if(testVertical(p[0], p[1])) {\n      return 0\n    }\n    return 1\n  }\n}\n\nfunction createClassifyPointDegen(testVertical, testNormal) {\n  return function classify(p) {\n    if(testVertical(p[0], p[1])) {\n      return 0\n    }\n    return testNormal(p)\n  }\n}\n\nfunction preprocessPolygon(loops) {\n  //Compute number of loops\n  var numLoops = loops.length\n\n  //Unpack segments\n  var segments = []\n  var vsegments = []\n  var ptr = 0\n  for(var i=0; i<numLoops; ++i) {\n    var loop = loops[i]\n    var numVertices = loop.length\n    for(var s=numVertices-1,t=0; t<numVertices; s=(t++)) {\n      var a = loop[s]\n      var b = loop[t]\n      if(a[0] === b[0]) {\n        vsegments.push([a,b])\n      } else {\n        segments.push([a,b])\n      }\n    }\n  }\n\n  //Degenerate case: All loops are empty\n  if(segments.length === 0) {\n    if(vsegments.length === 0) {\n      return classifyEmpty\n    } else {\n      return createClassifyVertical(buildVerticalIndex(vsegments))\n    }\n  }\n\n  //Build slab decomposition\n  var slabs = makeSlabs(segments)\n  var testSlab = buildSlabSearch(slabs.slabs, slabs.coordinates)\n\n  if(vsegments.length === 0) {\n    return testSlab\n  } else {\n    return createClassifyPointDegen(\n      buildVerticalIndex(vsegments),\n      testSlab)\n  }\n}\n},{\"binary-search-bounds\":84,\"interval-tree-1d\":409,\"robust-orientation\":497,\"slab-decomposition\":513}],468:[function(_dereq_,module,exports){\n/*\n * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc\n * @license MIT\n * @preserve Project Home: https://github.com/voidqk/polybooljs\n */\n\nvar BuildLog = _dereq_('./lib/build-log');\nvar Epsilon = _dereq_('./lib/epsilon');\nvar Intersecter = _dereq_('./lib/intersecter');\nvar SegmentChainer = _dereq_('./lib/segment-chainer');\nvar SegmentSelector = _dereq_('./lib/segment-selector');\nvar GeoJSON = _dereq_('./lib/geojson');\n\nvar buildLog = false;\nvar epsilon = Epsilon();\n\nvar PolyBool;\nPolyBool = {\n\t// getter/setter for buildLog\n\tbuildLog: function(bl){\n\t\tif (bl === true)\n\t\t\tbuildLog = BuildLog();\n\t\telse if (bl === false)\n\t\t\tbuildLog = false;\n\t\treturn buildLog === false ? false : buildLog.list;\n\t},\n\t// getter/setter for epsilon\n\tepsilon: function(v){\n\t\treturn epsilon.epsilon(v);\n\t},\n\n\t// core API\n\tsegments: function(poly){\n\t\tvar i = Intersecter(true, epsilon, buildLog);\n\t\tpoly.regions.forEach(i.addRegion);\n\t\treturn {\n\t\t\tsegments: i.calculate(poly.inverted),\n\t\t\tinverted: poly.inverted\n\t\t};\n\t},\n\tcombine: function(segments1, segments2){\n\t\tvar i3 = Intersecter(false, epsilon, buildLog);\n\t\treturn {\n\t\t\tcombined: i3.calculate(\n\t\t\t\tsegments1.segments, segments1.inverted,\n\t\t\t\tsegments2.segments, segments2.inverted\n\t\t\t),\n\t\t\tinverted1: segments1.inverted,\n\t\t\tinverted2: segments2.inverted\n\t\t};\n\t},\n\tselectUnion: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.union(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 || combined.inverted2\n\t\t}\n\t},\n\tselectIntersect: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.intersect(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 && combined.inverted2\n\t\t}\n\t},\n\tselectDifference: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.difference(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 && !combined.inverted2\n\t\t}\n\t},\n\tselectDifferenceRev: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.differenceRev(combined.combined, buildLog),\n\t\t\tinverted: !combined.inverted1 && combined.inverted2\n\t\t}\n\t},\n\tselectXor: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.xor(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 !== combined.inverted2\n\t\t}\n\t},\n\tpolygon: function(segments){\n\t\treturn {\n\t\t\tregions: SegmentChainer(segments.segments, epsilon, buildLog),\n\t\t\tinverted: segments.inverted\n\t\t};\n\t},\n\n\t// GeoJSON converters\n\tpolygonFromGeoJSON: function(geojson){\n\t\treturn GeoJSON.toPolygon(PolyBool, geojson);\n\t},\n\tpolygonToGeoJSON: function(poly){\n\t\treturn GeoJSON.fromPolygon(PolyBool, epsilon, poly);\n\t},\n\n\t// helper functions for common operations\n\tunion: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectUnion);\n\t},\n\tintersect: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectIntersect);\n\t},\n\tdifference: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectDifference);\n\t},\n\tdifferenceRev: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectDifferenceRev);\n\t},\n\txor: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectXor);\n\t}\n};\n\nfunction operate(poly1, poly2, selector){\n\tvar seg1 = PolyBool.segments(poly1);\n\tvar seg2 = PolyBool.segments(poly2);\n\tvar comb = PolyBool.combine(seg1, seg2);\n\tvar seg3 = selector(comb);\n\treturn PolyBool.polygon(seg3);\n}\n\nif (typeof window === 'object')\n\twindow.PolyBool = PolyBool;\n\nmodule.exports = PolyBool;\n\n},{\"./lib/build-log\":469,\"./lib/epsilon\":470,\"./lib/geojson\":471,\"./lib/intersecter\":472,\"./lib/segment-chainer\":474,\"./lib/segment-selector\":475}],469:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// used strictly for logging the processing of the algorithm... only useful if you intend on\n// looking under the covers (for pretty UI's or debugging)\n//\n\nfunction BuildLog(){\n\tvar my;\n\tvar nextSegmentId = 0;\n\tvar curVert = false;\n\n\tfunction push(type, data){\n\t\tmy.list.push({\n\t\t\ttype: type,\n\t\t\tdata: data ? JSON.parse(JSON.stringify(data)) : void 0\n\t\t});\n\t\treturn my;\n\t}\n\n\tmy = {\n\t\tlist: [],\n\t\tsegmentId: function(){\n\t\t\treturn nextSegmentId++;\n\t\t},\n\t\tcheckIntersection: function(seg1, seg2){\n\t\t\treturn push('check', { seg1: seg1, seg2: seg2 });\n\t\t},\n\t\tsegmentChop: function(seg, end){\n\t\t\tpush('div_seg', { seg: seg, pt: end });\n\t\t\treturn push('chop', { seg: seg, pt: end });\n\t\t},\n\t\tstatusRemove: function(seg){\n\t\t\treturn push('pop_seg', { seg: seg });\n\t\t},\n\t\tsegmentUpdate: function(seg){\n\t\t\treturn push('seg_update', { seg: seg });\n\t\t},\n\t\tsegmentNew: function(seg, primary){\n\t\t\treturn push('new_seg', { seg: seg, primary: primary });\n\t\t},\n\t\tsegmentRemove: function(seg){\n\t\t\treturn push('rem_seg', { seg: seg });\n\t\t},\n\t\ttempStatus: function(seg, above, below){\n\t\t\treturn push('temp_status', { seg: seg, above: above, below: below });\n\t\t},\n\t\trewind: function(seg){\n\t\t\treturn push('rewind', { seg: seg });\n\t\t},\n\t\tstatus: function(seg, above, below){\n\t\t\treturn push('status', { seg: seg, above: above, below: below });\n\t\t},\n\t\tvert: function(x){\n\t\t\tif (x === curVert)\n\t\t\t\treturn my;\n\t\t\tcurVert = x;\n\t\t\treturn push('vert', { x: x });\n\t\t},\n\t\tlog: function(data){\n\t\t\tif (typeof data !== 'string')\n\t\t\t\tdata = JSON.stringify(data, false, '  ');\n\t\t\treturn push('log', { txt: data });\n\t\t},\n\t\treset: function(){\n\t\t\treturn push('reset');\n\t\t},\n\t\tselected: function(segs){\n\t\t\treturn push('selected', { segs: segs });\n\t\t},\n\t\tchainStart: function(seg){\n\t\t\treturn push('chain_start', { seg: seg });\n\t\t},\n\t\tchainRemoveHead: function(index, pt){\n\t\t\treturn push('chain_rem_head', { index: index, pt: pt });\n\t\t},\n\t\tchainRemoveTail: function(index, pt){\n\t\t\treturn push('chain_rem_tail', { index: index, pt: pt });\n\t\t},\n\t\tchainNew: function(pt1, pt2){\n\t\t\treturn push('chain_new', { pt1: pt1, pt2: pt2 });\n\t\t},\n\t\tchainMatch: function(index){\n\t\t\treturn push('chain_match', { index: index });\n\t\t},\n\t\tchainClose: function(index){\n\t\t\treturn push('chain_close', { index: index });\n\t\t},\n\t\tchainAddHead: function(index, pt){\n\t\t\treturn push('chain_add_head', { index: index, pt: pt });\n\t\t},\n\t\tchainAddTail: function(index, pt){\n\t\t\treturn push('chain_add_tail', { index: index, pt: pt, });\n\t\t},\n\t\tchainConnect: function(index1, index2){\n\t\t\treturn push('chain_con', { index1: index1, index2: index2 });\n\t\t},\n\t\tchainReverse: function(index){\n\t\t\treturn push('chain_rev', { index: index });\n\t\t},\n\t\tchainJoin: function(index1, index2){\n\t\t\treturn push('chain_join', { index1: index1, index2: index2 });\n\t\t},\n\t\tdone: function(){\n\t\t\treturn push('done');\n\t\t}\n\t};\n\treturn my;\n}\n\nmodule.exports = BuildLog;\n\n},{}],470:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// provides the raw computation functions that takes epsilon into account\n//\n// zero is defined to be between (-epsilon, epsilon) exclusive\n//\n\nfunction Epsilon(eps){\n\tif (typeof eps !== 'number')\n\t\teps = 0.0000000001; // sane default? sure why not\n\tvar my = {\n\t\tepsilon: function(v){\n\t\t\tif (typeof v === 'number')\n\t\t\t\teps = v;\n\t\t\treturn eps;\n\t\t},\n\t\tpointAboveOrOnLine: function(pt, left, right){\n\t\t\tvar Ax = left[0];\n\t\t\tvar Ay = left[1];\n\t\t\tvar Bx = right[0];\n\t\t\tvar By = right[1];\n\t\t\tvar Cx = pt[0];\n\t\t\tvar Cy = pt[1];\n\t\t\treturn (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax) >= -eps;\n\t\t},\n\t\tpointBetween: function(p, left, right){\n\t\t\t// p must be collinear with left->right\n\t\t\t// returns false if p == left, p == right, or left == right\n\t\t\tvar d_py_ly = p[1] - left[1];\n\t\t\tvar d_rx_lx = right[0] - left[0];\n\t\t\tvar d_px_lx = p[0] - left[0];\n\t\t\tvar d_ry_ly = right[1] - left[1];\n\n\t\t\tvar dot = d_px_lx * d_rx_lx + d_py_ly * d_ry_ly;\n\t\t\t// if `dot` is 0, then `p` == `left` or `left` == `right` (reject)\n\t\t\t// if `dot` is less than 0, then `p` is to the left of `left` (reject)\n\t\t\tif (dot < eps)\n\t\t\t\treturn false;\n\n\t\t\tvar sqlen = d_rx_lx * d_rx_lx + d_ry_ly * d_ry_ly;\n\t\t\t// if `dot` > `sqlen`, then `p` is to the right of `right` (reject)\n\t\t\t// therefore, if `dot - sqlen` is greater than 0, then `p` is to the right of `right` (reject)\n\t\t\tif (dot - sqlen > -eps)\n\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t},\n\t\tpointsSameX: function(p1, p2){\n\t\t\treturn Math.abs(p1[0] - p2[0]) < eps;\n\t\t},\n\t\tpointsSameY: function(p1, p2){\n\t\t\treturn Math.abs(p1[1] - p2[1]) < eps;\n\t\t},\n\t\tpointsSame: function(p1, p2){\n\t\t\treturn my.pointsSameX(p1, p2) && my.pointsSameY(p1, p2);\n\t\t},\n\t\tpointsCompare: function(p1, p2){\n\t\t\t// returns -1 if p1 is smaller, 1 if p2 is smaller, 0 if equal\n\t\t\tif (my.pointsSameX(p1, p2))\n\t\t\t\treturn my.pointsSameY(p1, p2) ? 0 : (p1[1] < p2[1] ? -1 : 1);\n\t\t\treturn p1[0] < p2[0] ? -1 : 1;\n\t\t},\n\t\tpointsCollinear: function(pt1, pt2, pt3){\n\t\t\t// does pt1->pt2->pt3 make a straight line?\n\t\t\t// essentially this is just checking to see if the slope(pt1->pt2) === slope(pt2->pt3)\n\t\t\t// if slopes are equal, then they must be collinear, because they share pt2\n\t\t\tvar dx1 = pt1[0] - pt2[0];\n\t\t\tvar dy1 = pt1[1] - pt2[1];\n\t\t\tvar dx2 = pt2[0] - pt3[0];\n\t\t\tvar dy2 = pt2[1] - pt3[1];\n\t\t\treturn Math.abs(dx1 * dy2 - dx2 * dy1) < eps;\n\t\t},\n\t\tlinesIntersect: function(a0, a1, b0, b1){\n\t\t\t// returns false if the lines are coincident (e.g., parallel or on top of each other)\n\t\t\t//\n\t\t\t// returns an object if the lines intersect:\n\t\t\t//   {\n\t\t\t//     pt: [x, y],    where the intersection point is at\n\t\t\t//     alongA: where intersection point is along A,\n\t\t\t//     alongB: where intersection point is along B\n\t\t\t//   }\n\t\t\t//\n\t\t\t//  alongA and alongB will each be one of: -2, -1, 0, 1, 2\n\t\t\t//\n\t\t\t//  with the following meaning:\n\t\t\t//\n\t\t\t//    -2   intersection point is before segment's first point\n\t\t\t//    -1   intersection point is directly on segment's first point\n\t\t\t//     0   intersection point is between segment's first and second points (exclusive)\n\t\t\t//     1   intersection point is directly on segment's second point\n\t\t\t//     2   intersection point is after segment's second point\n\t\t\tvar adx = a1[0] - a0[0];\n\t\t\tvar ady = a1[1] - a0[1];\n\t\t\tvar bdx = b1[0] - b0[0];\n\t\t\tvar bdy = b1[1] - b0[1];\n\n\t\t\tvar axb = adx * bdy - ady * bdx;\n\t\t\tif (Math.abs(axb) < eps)\n\t\t\t\treturn false; // lines are coincident\n\n\t\t\tvar dx = a0[0] - b0[0];\n\t\t\tvar dy = a0[1] - b0[1];\n\n\t\t\tvar A = (bdx * dy - bdy * dx) / axb;\n\t\t\tvar B = (adx * dy - ady * dx) / axb;\n\n\t\t\tvar ret = {\n\t\t\t\talongA: 0,\n\t\t\t\talongB: 0,\n\t\t\t\tpt: [\n\t\t\t\t\ta0[0] + A * adx,\n\t\t\t\t\ta0[1] + A * ady\n\t\t\t\t]\n\t\t\t};\n\n\t\t\t// categorize where intersection point is along A and B\n\n\t\t\tif (A <= -eps)\n\t\t\t\tret.alongA = -2;\n\t\t\telse if (A < eps)\n\t\t\t\tret.alongA = -1;\n\t\t\telse if (A - 1 <= -eps)\n\t\t\t\tret.alongA = 0;\n\t\t\telse if (A - 1 < eps)\n\t\t\t\tret.alongA = 1;\n\t\t\telse\n\t\t\t\tret.alongA = 2;\n\n\t\t\tif (B <= -eps)\n\t\t\t\tret.alongB = -2;\n\t\t\telse if (B < eps)\n\t\t\t\tret.alongB = -1;\n\t\t\telse if (B - 1 <= -eps)\n\t\t\t\tret.alongB = 0;\n\t\t\telse if (B - 1 < eps)\n\t\t\t\tret.alongB = 1;\n\t\t\telse\n\t\t\t\tret.alongB = 2;\n\n\t\t\treturn ret;\n\t\t},\n\t\tpointInsideRegion: function(pt, region){\n\t\t\tvar x = pt[0];\n\t\t\tvar y = pt[1];\n\t\t\tvar last_x = region[region.length - 1][0];\n\t\t\tvar last_y = region[region.length - 1][1];\n\t\t\tvar inside = false;\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tvar curr_x = region[i][0];\n\t\t\t\tvar curr_y = region[i][1];\n\n\t\t\t\t// if y is between curr_y and last_y, and\n\t\t\t\t// x is to the right of the boundary created by the line\n\t\t\t\tif ((curr_y - y > eps) != (last_y - y > eps) &&\n\t\t\t\t\t(last_x - curr_x) * (y - curr_y) / (last_y - curr_y) + curr_x - x > eps)\n\t\t\t\t\tinside = !inside\n\n\t\t\t\tlast_x = curr_x;\n\t\t\t\tlast_y = curr_y;\n\t\t\t}\n\t\t\treturn inside;\n\t\t}\n\t};\n\treturn my;\n}\n\nmodule.exports = Epsilon;\n\n},{}],471:[function(_dereq_,module,exports){\n// (c) Copyright 2017, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// convert between PolyBool polygon format and GeoJSON formats (Polygon and MultiPolygon)\n//\n\nvar GeoJSON = {\n\t// convert a GeoJSON object to a PolyBool polygon\n\ttoPolygon: function(PolyBool, geojson){\n\n\t\t// converts list of LineString's to segments\n\t\tfunction GeoPoly(coords){\n\t\t\t// check for empty coords\n\t\t\tif (coords.length <= 0)\n\t\t\t\treturn PolyBool.segments({ inverted: false, regions: [] });\n\n\t\t\t// convert LineString to segments\n\t\t\tfunction LineString(ls){\n\t\t\t\t// remove tail which should be the same as head\n\t\t\t\tvar reg = ls.slice(0, ls.length - 1);\n\t\t\t\treturn PolyBool.segments({ inverted: false, regions: [reg] });\n\t\t\t}\n\n\t\t\t// the first LineString is considered the outside\n\t\t\tvar out = LineString(coords[0]);\n\n\t\t\t// the rest of the LineStrings are considered interior holes, so subtract them from the\n\t\t\t// current result\n\t\t\tfor (var i = 1; i < coords.length; i++)\n\t\t\t\tout = PolyBool.selectDifference(PolyBool.combine(out, LineString(coords[i])));\n\n\t\t\treturn out;\n\t\t}\n\n\t\tif (geojson.type === 'Polygon'){\n\t\t\t// single polygon, so just convert it and we're done\n\t\t\treturn PolyBool.polygon(GeoPoly(geojson.coordinates));\n\t\t}\n\t\telse if (geojson.type === 'MultiPolygon'){\n\t\t\t// multiple polygons, so union all the polygons together\n\t\t\tvar out = PolyBool.segments({ inverted: false, regions: [] });\n\t\t\tfor (var i = 0; i < geojson.coordinates.length; i++)\n\t\t\t\tout = PolyBool.selectUnion(PolyBool.combine(out, GeoPoly(geojson.coordinates[i])));\n\t\t\treturn PolyBool.polygon(out);\n\t\t}\n\t\tthrow new Error('PolyBool: Cannot convert GeoJSON object to PolyBool polygon');\n\t},\n\n\t// convert a PolyBool polygon to a GeoJSON object\n\tfromPolygon: function(PolyBool, eps, poly){\n\t\t// make sure out polygon is clean\n\t\tpoly = PolyBool.polygon(PolyBool.segments(poly));\n\n\t\t// test if r1 is inside r2\n\t\tfunction regionInsideRegion(r1, r2){\n\t\t\t// we're guaranteed no lines intersect (because the polygon is clean), but a vertex\n\t\t\t// could be on the edge -- so we just average pt[0] and pt[1] to produce a point on the\n\t\t\t// edge of the first line, which cannot be on an edge\n\t\t\treturn eps.pointInsideRegion([\n\t\t\t\t(r1[0][0] + r1[1][0]) * 0.5,\n\t\t\t\t(r1[0][1] + r1[1][1]) * 0.5\n\t\t\t], r2);\n\t\t}\n\n\t\t// calculate inside heirarchy\n\t\t//\n\t\t//  _____________________   _______    roots -> A       -> F\n\t\t// |          A          | |   F   |            |          |\n\t\t// |  _______   _______  | |  ___  |            +-- B      +-- G\n\t\t// | |   B   | |   C   | | | |   | |            |   |\n\t\t// | |  ___  | |  ___  | | | |   | |            |   +-- D\n\t\t// | | | D | | | | E | | | | | G | |            |\n\t\t// | | |___| | | |___| | | | |   | |            +-- C\n\t\t// | |_______| |_______| | | |___| |                |\n\t\t// |_____________________| |_______|                +-- E\n\n\t\tfunction newNode(region){\n\t\t\treturn {\n\t\t\t\tregion: region,\n\t\t\t\tchildren: []\n\t\t\t};\n\t\t}\n\n\t\tvar roots = newNode(null);\n\n\t\tfunction addChild(root, region){\n\t\t\t// first check if we're inside any children\n\t\t\tfor (var i = 0; i < root.children.length; i++){\n\t\t\t\tvar child = root.children[i];\n\t\t\t\tif (regionInsideRegion(region, child.region)){\n\t\t\t\t\t// we are, so insert inside them instead\n\t\t\t\t\taddChild(child, region);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// not inside any children, so check to see if any children are inside us\n\t\t\tvar node = newNode(region);\n\t\t\tfor (var i = 0; i < root.children.length; i++){\n\t\t\t\tvar child = root.children[i];\n\t\t\t\tif (regionInsideRegion(child.region, region)){\n\t\t\t\t\t// oops... move the child beneath us, and remove them from root\n\t\t\t\t\tnode.children.push(child);\n\t\t\t\t\troot.children.splice(i, 1);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we can add ourselves\n\t\t\troot.children.push(node);\n\t\t}\n\n\t\t// add all regions to the root\n\t\tfor (var i = 0; i < poly.regions.length; i++){\n\t\t\tvar region = poly.regions[i];\n\t\t\tif (region.length < 3) // regions must have at least 3 points (sanity check)\n\t\t\t\tcontinue;\n\t\t\taddChild(roots, region);\n\t\t}\n\n\t\t// with our heirarchy, we can distinguish between exterior borders, and interior holes\n\t\t// the root nodes are exterior, children are interior, children's children are exterior,\n\t\t// children's children's children are interior, etc\n\n\t\t// while we're at it, exteriors are counter-clockwise, and interiors are clockwise\n\n\t\tfunction forceWinding(region, clockwise){\n\t\t\t// first, see if we're clockwise or counter-clockwise\n\t\t\t// https://en.wikipedia.org/wiki/Shoelace_formula\n\t\t\tvar winding = 0;\n\t\t\tvar last_x = region[region.length - 1][0];\n\t\t\tvar last_y = region[region.length - 1][1];\n\t\t\tvar copy = [];\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tvar curr_x = region[i][0];\n\t\t\t\tvar curr_y = region[i][1];\n\t\t\t\tcopy.push([curr_x, curr_y]); // create a copy while we're at it\n\t\t\t\twinding += curr_y * last_x - curr_x * last_y;\n\t\t\t\tlast_x = curr_x;\n\t\t\t\tlast_y = curr_y;\n\t\t\t}\n\t\t\t// this assumes Cartesian coordinates (Y is positive going up)\n\t\t\tvar isclockwise = winding < 0;\n\t\t\tif (isclockwise !== clockwise)\n\t\t\t\tcopy.reverse();\n\t\t\t// while we're here, the last point must be the first point...\n\t\t\tcopy.push([copy[0][0], copy[0][1]]);\n\t\t\treturn copy;\n\t\t}\n\n\t\tvar geopolys = [];\n\n\t\tfunction addExterior(node){\n\t\t\tvar poly = [forceWinding(node.region, false)];\n\t\t\tgeopolys.push(poly);\n\t\t\t// children of exteriors are interior\n\t\t\tfor (var i = 0; i < node.children.length; i++)\n\t\t\t\tpoly.push(getInterior(node.children[i]));\n\t\t}\n\n\t\tfunction getInterior(node){\n\t\t\t// children of interiors are exterior\n\t\t\tfor (var i = 0; i < node.children.length; i++)\n\t\t\t\taddExterior(node.children[i]);\n\t\t\t// return the clockwise interior\n\t\t\treturn forceWinding(node.region, true);\n\t\t}\n\n\t\t// root nodes are exterior\n\t\tfor (var i = 0; i < roots.children.length; i++)\n\t\t\taddExterior(roots.children[i]);\n\n\t\t// lastly, construct the approrpriate GeoJSON object\n\n\t\tif (geopolys.length <= 0) // empty GeoJSON Polygon\n\t\t\treturn { type: 'Polygon', coordinates: [] };\n\t\tif (geopolys.length == 1) // use a GeoJSON Polygon\n\t\t\treturn { type: 'Polygon', coordinates: geopolys[0] };\n\t\treturn { // otherwise, use a GeoJSON MultiPolygon\n\t\t\ttype: 'MultiPolygon',\n\t\t\tcoordinates: geopolys\n\t\t};\n\t}\n};\n\nmodule.exports = GeoJSON;\n\n},{}],472:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// this is the core work-horse\n//\n\nvar LinkedList = _dereq_('./linked-list');\n\nfunction Intersecter(selfIntersection, eps, buildLog){\n\t// selfIntersection is true/false depending on the phase of the overall algorithm\n\n\t//\n\t// segment creation\n\t//\n\n\tfunction segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null  // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}\n\n\tfunction segmentCopy(start, end, seg){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: seg.myFill.above,\n\t\t\t\tbelow: seg.myFill.below\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}\n\n\t//\n\t// event logic\n\t//\n\n\tvar event_root = LinkedList.create();\n\n\tfunction eventCompare(p1_isStart, p1_1, p1_2, p2_isStart, p2_1, p2_2){\n\t\t// compare the selected points first\n\t\tvar comp = eps.pointsCompare(p1_1, p2_1);\n\t\tif (comp !== 0)\n\t\t\treturn comp;\n\t\t// the selected points are the same\n\n\t\tif (eps.pointsSame(p1_2, p2_2)) // if the non-selected points are the same too...\n\t\t\treturn 0; // then the segments are equal\n\n\t\tif (p1_isStart !== p2_isStart) // if one is a start and the other isn't...\n\t\t\treturn p1_isStart ? 1 : -1; // favor the one that isn't the start\n\n\t\t// otherwise, we'll have to calculate which one is below the other manually\n\t\treturn eps.pointAboveOrOnLine(p1_2,\n\t\t\tp2_isStart ? p2_1 : p2_2, // order matters\n\t\t\tp2_isStart ? p2_2 : p2_1\n\t\t) ? 1 : -1;\n\t}\n\n\tfunction eventAdd(ev, other_pt){\n\t\tevent_root.insertBefore(ev, function(here){\n\t\t\t// should ev be inserted before here?\n\t\t\tvar comp = eventCompare(\n\t\t\t\tev  .isStart, ev  .pt,      other_pt,\n\t\t\t\there.isStart, here.pt, here.other.pt\n\t\t\t);\n\t\t\treturn comp < 0;\n\t\t});\n\t}\n\n\tfunction eventAddSegmentStart(seg, primary){\n\t\tvar ev_start = LinkedList.node({\n\t\t\tisStart: true,\n\t\t\tpt: seg.start,\n\t\t\tseg: seg,\n\t\t\tprimary: primary,\n\t\t\tother: null,\n\t\t\tstatus: null\n\t\t});\n\t\teventAdd(ev_start, seg.end);\n\t\treturn ev_start;\n\t}\n\n\tfunction eventAddSegmentEnd(ev_start, seg, primary){\n\t\tvar ev_end = LinkedList.node({\n\t\t\tisStart: false,\n\t\t\tpt: seg.end,\n\t\t\tseg: seg,\n\t\t\tprimary: primary,\n\t\t\tother: ev_start,\n\t\t\tstatus: null\n\t\t});\n\t\tev_start.other = ev_end;\n\t\teventAdd(ev_end, ev_start.pt);\n\t}\n\n\tfunction eventAddSegment(seg, primary){\n\t\tvar ev_start = eventAddSegmentStart(seg, primary);\n\t\teventAddSegmentEnd(ev_start, seg, primary);\n\t\treturn ev_start;\n\t}\n\n\tfunction eventUpdateEnd(ev, end){\n\t\t// slides an end backwards\n\t\t//   (start)------------(end)    to:\n\t\t//   (start)---(end)\n\n\t\tif (buildLog)\n\t\t\tbuildLog.segmentChop(ev.seg, end);\n\n\t\tev.other.remove();\n\t\tev.seg.end = end;\n\t\tev.other.pt = end;\n\t\teventAdd(ev.other, ev.pt);\n\t}\n\n\tfunction eventDivide(ev, pt){\n\t\tvar ns = segmentCopy(pt, ev.seg.end, ev.seg);\n\t\teventUpdateEnd(ev, pt);\n\t\treturn eventAddSegment(ns, ev.primary);\n\t}\n\n\tfunction calculate(primaryPolyInverted, secondaryPolyInverted){\n\t\t// if selfIntersection is true then there is no secondary polygon, so that isn't used\n\n\t\t//\n\t\t// status logic\n\t\t//\n\n\t\tvar status_root = LinkedList.create();\n\n\t\tfunction statusCompare(ev1, ev2){\n\t\t\tvar a1 = ev1.seg.start;\n\t\t\tvar a2 = ev1.seg.end;\n\t\t\tvar b1 = ev2.seg.start;\n\t\t\tvar b2 = ev2.seg.end;\n\n\t\t\tif (eps.pointsCollinear(a1, b1, b2)){\n\t\t\t\tif (eps.pointsCollinear(a2, b1, b2))\n\t\t\t\t\treturn 1;//eventCompare(true, a1, a2, true, b1, b2);\n\t\t\t\treturn eps.pointAboveOrOnLine(a2, b1, b2) ? 1 : -1;\n\t\t\t}\n\t\t\treturn eps.pointAboveOrOnLine(a1, b1, b2) ? 1 : -1;\n\t\t}\n\n\t\tfunction statusFindSurrounding(ev){\n\t\t\treturn status_root.findTransition(function(here){\n\t\t\t\tvar comp = statusCompare(ev, here.ev);\n\t\t\t\treturn comp > 0;\n\t\t\t});\n\t\t}\n\n\t\tfunction checkIntersection(ev1, ev2){\n\t\t\t// returns the segment equal to ev1, or false if nothing equal\n\n\t\t\tvar seg1 = ev1.seg;\n\t\t\tvar seg2 = ev2.seg;\n\t\t\tvar a1 = seg1.start;\n\t\t\tvar a2 = seg1.end;\n\t\t\tvar b1 = seg2.start;\n\t\t\tvar b2 = seg2.end;\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.checkIntersection(seg1, seg2);\n\n\t\t\tvar i = eps.linesIntersect(a1, a2, b1, b2);\n\n\t\t\tif (i === false){\n\t\t\t\t// segments are parallel or coincident\n\n\t\t\t\t// if points aren't collinear, then the segments are parallel, so no intersections\n\t\t\t\tif (!eps.pointsCollinear(a1, a2, b1))\n\t\t\t\t\treturn false;\n\t\t\t\t// otherwise, segments are on top of each other somehow (aka coincident)\n\n\t\t\t\tif (eps.pointsSame(a1, b2) || eps.pointsSame(a2, b1))\n\t\t\t\t\treturn false; // segments touch at endpoints... no intersection\n\n\t\t\t\tvar a1_equ_b1 = eps.pointsSame(a1, b1);\n\t\t\t\tvar a2_equ_b2 = eps.pointsSame(a2, b2);\n\n\t\t\t\tif (a1_equ_b1 && a2_equ_b2)\n\t\t\t\t\treturn ev2; // segments are exactly equal\n\n\t\t\t\tvar a1_between = !a1_equ_b1 && eps.pointBetween(a1, b1, b2);\n\t\t\t\tvar a2_between = !a2_equ_b2 && eps.pointBetween(a2, b1, b2);\n\n\t\t\t\t// handy for debugging:\n\t\t\t\t// buildLog.log({\n\t\t\t\t//\ta1_equ_b1: a1_equ_b1,\n\t\t\t\t//\ta2_equ_b2: a2_equ_b2,\n\t\t\t\t//\ta1_between: a1_between,\n\t\t\t\t//\ta2_between: a2_between\n\t\t\t\t// });\n\n\t\t\t\tif (a1_equ_b1){\n\t\t\t\t\tif (a2_between){\n\t\t\t\t\t\t//  (a1)---(a2)\n\t\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//  (a1)----------(a2)\n\t\t\t\t\t\t//  (b1)---(b2)\n\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t\t}\n\t\t\t\t\treturn ev2;\n\t\t\t\t}\n\t\t\t\telse if (a1_between){\n\t\t\t\t\tif (!a2_equ_b2){\n\t\t\t\t\t\t// make a2 equal to b2\n\t\t\t\t\t\tif (a2_between){\n\t\t\t\t\t\t\t//         (a1)---(a2)\n\t\t\t\t\t\t\t//  (b1)-----------------(b2)\n\t\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//         (a1)----------(a2)\n\t\t\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//         (a1)---(a2)\n\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\teventDivide(ev2, a1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// otherwise, lines intersect at i.pt, which may or may not be between the endpoints\n\n\t\t\t\t// is A divided between its endpoints? (exclusive)\n\t\t\t\tif (i.alongA === 0){\n\t\t\t\t\tif (i.alongB === -1) // yes, at exactly b1\n\t\t\t\t\t\teventDivide(ev1, b1);\n\t\t\t\t\telse if (i.alongB === 0) // yes, somewhere between B's endpoints\n\t\t\t\t\t\teventDivide(ev1, i.pt);\n\t\t\t\t\telse if (i.alongB === 1) // yes, at exactly b2\n\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t}\n\n\t\t\t\t// is B divided between its endpoints? (exclusive)\n\t\t\t\tif (i.alongB === 0){\n\t\t\t\t\tif (i.alongA === -1) // yes, at exactly a1\n\t\t\t\t\t\teventDivide(ev2, a1);\n\t\t\t\t\telse if (i.alongA === 0) // yes, somewhere between A's endpoints (exclusive)\n\t\t\t\t\t\teventDivide(ev2, i.pt);\n\t\t\t\t\telse if (i.alongA === 1) // yes, at exactly a2\n\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t//\n\t\t// main event loop\n\t\t//\n\t\tvar segments = [];\n\t\twhile (!event_root.isEmpty()){\n\t\t\tvar ev = event_root.getHead();\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.vert(ev.pt[0]);\n\n\t\t\tif (ev.isStart){\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.segmentNew(ev.seg, ev.primary);\n\n\t\t\t\tvar surrounding = statusFindSurrounding(ev);\n\t\t\t\tvar above = surrounding.before ? surrounding.before.ev : null;\n\t\t\t\tvar below = surrounding.after ? surrounding.after.ev : null;\n\n\t\t\t\tif (buildLog){\n\t\t\t\t\tbuildLog.tempStatus(\n\t\t\t\t\t\tev.seg,\n\t\t\t\t\t\tabove ? above.seg : false,\n\t\t\t\t\t\tbelow ? below.seg : false\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfunction checkBothIntersections(){\n\t\t\t\t\tif (above){\n\t\t\t\t\t\tvar eve = checkIntersection(ev, above);\n\t\t\t\t\t\tif (eve)\n\t\t\t\t\t\t\treturn eve;\n\t\t\t\t\t}\n\t\t\t\t\tif (below)\n\t\t\t\t\t\treturn checkIntersection(ev, below);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar eve = checkBothIntersections();\n\t\t\t\tif (eve){\n\t\t\t\t\t// ev and eve are equal\n\t\t\t\t\t// we'll keep eve and throw away ev\n\n\t\t\t\t\t// merge ev.seg's fill information into eve.seg\n\n\t\t\t\t\tif (selfIntersection){\n\t\t\t\t\t\tvar toggle; // are we a toggling edge?\n\t\t\t\t\t\tif (ev.seg.myFill.below === null)\n\t\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttoggle = ev.seg.myFill.above !== ev.seg.myFill.below;\n\n\t\t\t\t\t\t// merge two segments that belong to the same polygon\n\t\t\t\t\t\t// think of this as sandwiching two segments together, where `eve.seg` is\n\t\t\t\t\t\t// the bottom -- this will cause the above fill flag to toggle\n\t\t\t\t\t\tif (toggle)\n\t\t\t\t\t\t\teve.seg.myFill.above = !eve.seg.myFill.above;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// merge two segments that belong to different polygons\n\t\t\t\t\t\t// each segment has distinct knowledge, so no special logic is needed\n\t\t\t\t\t\t// note that this can only happen once per segment in this phase, because we\n\t\t\t\t\t\t// are guaranteed that all self-intersections are gone\n\t\t\t\t\t\teve.seg.otherFill = ev.seg.myFill;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.segmentUpdate(eve.seg);\n\n\t\t\t\t\tev.other.remove();\n\t\t\t\t\tev.remove();\n\t\t\t\t}\n\n\t\t\t\tif (event_root.getHead() !== ev){\n\t\t\t\t\t// something was inserted before us in the event queue, so loop back around and\n\t\t\t\t\t// process it before continuing\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.rewind(ev.seg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// calculate fill flags\n\t\t\t\t//\n\t\t\t\tif (selfIntersection){\n\t\t\t\t\tvar toggle; // are we a toggling edge?\n\t\t\t\t\tif (ev.seg.myFill.below === null) // if we are a new segment...\n\t\t\t\t\t\ttoggle = true; // then we toggle\n\t\t\t\t\telse // we are a segment that has previous knowledge from a division\n\t\t\t\t\t\ttoggle = ev.seg.myFill.above !== ev.seg.myFill.below; // calculate toggle\n\n\t\t\t\t\t// next, calculate whether we are filled below us\n\t\t\t\t\tif (!below){ // if nothing is below us...\n\t\t\t\t\t\t// we are filled below us if the polygon is inverted\n\t\t\t\t\t\tev.seg.myFill.below = primaryPolyInverted;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// otherwise, we know the answer -- it's the same if whatever is below\n\t\t\t\t\t\t// us is filled above it\n\t\t\t\t\t\tev.seg.myFill.below = below.seg.myFill.above;\n\t\t\t\t\t}\n\n\t\t\t\t\t// since now we know if we're filled below us, we can calculate whether\n\t\t\t\t\t// we're filled above us by applying toggle to whatever is below us\n\t\t\t\t\tif (toggle)\n\t\t\t\t\t\tev.seg.myFill.above = !ev.seg.myFill.below;\n\t\t\t\t\telse\n\t\t\t\t\t\tev.seg.myFill.above = ev.seg.myFill.below;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// now we fill in any missing transition information, since we are all-knowing\n\t\t\t\t\t// at this point\n\n\t\t\t\t\tif (ev.seg.otherFill === null){\n\t\t\t\t\t\t// if we don't have other information, then we need to figure out if we're\n\t\t\t\t\t\t// inside the other polygon\n\t\t\t\t\t\tvar inside;\n\t\t\t\t\t\tif (!below){\n\t\t\t\t\t\t\t// if nothing is below us, then we're inside if the other polygon is\n\t\t\t\t\t\t\t// inverted\n\t\t\t\t\t\t\tinside =\n\t\t\t\t\t\t\t\tev.primary ? secondaryPolyInverted : primaryPolyInverted;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ // otherwise, something is below us\n\t\t\t\t\t\t\t// so copy the below segment's other polygon's above\n\t\t\t\t\t\t\tif (ev.primary === below.primary)\n\t\t\t\t\t\t\t\tinside = below.seg.otherFill.above;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinside = below.seg.myFill.above;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tev.seg.otherFill = {\n\t\t\t\t\t\t\tabove: inside,\n\t\t\t\t\t\t\tbelow: inside\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (buildLog){\n\t\t\t\t\tbuildLog.status(\n\t\t\t\t\t\tev.seg,\n\t\t\t\t\t\tabove ? above.seg : false,\n\t\t\t\t\t\tbelow ? below.seg : false\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// insert the status and remember it for later removal\n\t\t\t\tev.other.status = surrounding.insert(LinkedList.node({ ev: ev }));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar st = ev.status;\n\n\t\t\t\tif (st === null){\n\t\t\t\t\tthrow new Error('PolyBool: Zero-length segment detected; your epsilon is ' +\n\t\t\t\t\t\t'probably too small or too large');\n\t\t\t\t}\n\n\t\t\t\t// removing the status will create two new adjacent edges, so we'll need to check\n\t\t\t\t// for those\n\t\t\t\tif (status_root.exists(st.prev) && status_root.exists(st.next))\n\t\t\t\t\tcheckIntersection(st.prev.ev, st.next.ev);\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.statusRemove(st.ev.seg);\n\n\t\t\t\t// remove the status\n\t\t\t\tst.remove();\n\n\t\t\t\t// if we've reached this point, we've calculated everything there is to know, so\n\t\t\t\t// save the segment for reporting\n\t\t\t\tif (!ev.primary){\n\t\t\t\t\t// make sure `seg.myFill` actually points to the primary polygon though\n\t\t\t\t\tvar s = ev.seg.myFill;\n\t\t\t\t\tev.seg.myFill = ev.seg.otherFill;\n\t\t\t\t\tev.seg.otherFill = s;\n\t\t\t\t}\n\t\t\t\tsegments.push(ev.seg);\n\t\t\t}\n\n\t\t\t// remove the event and continue\n\t\t\tevent_root.getHead().remove();\n\t\t}\n\n\t\tif (buildLog)\n\t\t\tbuildLog.done();\n\n\t\treturn segments;\n\t}\n\n\t// return the appropriate API depending on what we're doing\n\tif (!selfIntersection){\n\t\t// performing combination of polygons, so only deal with already-processed segments\n\t\treturn {\n\t\t\tcalculate: function(segments1, inverted1, segments2, inverted2){\n\t\t\t\t// segmentsX come from the self-intersection API, or this API\n\t\t\t\t// invertedX is whether we treat that list of segments as an inverted polygon or not\n\t\t\t\t// returns segments that can be used for further operations\n\t\t\t\tsegments1.forEach(function(seg){\n\t\t\t\t\teventAddSegment(segmentCopy(seg.start, seg.end, seg), true);\n\t\t\t\t});\n\t\t\t\tsegments2.forEach(function(seg){\n\t\t\t\t\teventAddSegment(segmentCopy(seg.start, seg.end, seg), false);\n\t\t\t\t});\n\t\t\t\treturn calculate(inverted1, inverted2);\n\t\t\t}\n\t\t};\n\t}\n\n\t// otherwise, performing self-intersection, so deal with regions\n\treturn {\n\t\taddRegion: function(region){\n\t\t\t// regions are a list of points:\n\t\t\t//  [ [0, 0], [100, 0], [50, 100] ]\n\t\t\t// you can add multiple regions before running calculate\n\t\t\tvar pt1;\n\t\t\tvar pt2 = region[region.length - 1];\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tpt1 = pt2;\n\t\t\t\tpt2 = region[i];\n\n\t\t\t\tvar forward = eps.pointsCompare(pt1, pt2);\n\t\t\t\tif (forward === 0) // points are equal, so we have a zero-length segment\n\t\t\t\t\tcontinue; // just skip it\n\n\t\t\t\teventAddSegment(\n\t\t\t\t\tsegmentNew(\n\t\t\t\t\t\tforward < 0 ? pt1 : pt2,\n\t\t\t\t\t\tforward < 0 ? pt2 : pt1\n\t\t\t\t\t),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tcalculate: function(inverted){\n\t\t\t// is the polygon inverted?\n\t\t\t// returns segments\n\t\t\treturn calculate(inverted, false);\n\t\t}\n\t};\n}\n\nmodule.exports = Intersecter;\n\n},{\"./linked-list\":473}],473:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// simple linked list implementation that allows you to traverse down nodes and save positions\n//\n\nvar LinkedList = {\n\tcreate: function(){\n\t\tvar my = {\n\t\t\troot: { root: true, next: null },\n\t\t\texists: function(node){\n\t\t\t\tif (node === null || node === my.root)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tisEmpty: function(){\n\t\t\t\treturn my.root.next === null;\n\t\t\t},\n\t\t\tgetHead: function(){\n\t\t\t\treturn my.root.next;\n\t\t\t},\n\t\t\tinsertBefore: function(node, check){\n\t\t\t\tvar last = my.root;\n\t\t\t\tvar here = my.root.next;\n\t\t\t\twhile (here !== null){\n\t\t\t\t\tif (check(here)){\n\t\t\t\t\t\tnode.prev = here.prev;\n\t\t\t\t\t\tnode.next = here;\n\t\t\t\t\t\there.prev.next = node;\n\t\t\t\t\t\there.prev = node;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlast = here;\n\t\t\t\t\there = here.next;\n\t\t\t\t}\n\t\t\t\tlast.next = node;\n\t\t\t\tnode.prev = last;\n\t\t\t\tnode.next = null;\n\t\t\t},\n\t\t\tfindTransition: function(check){\n\t\t\t\tvar prev = my.root;\n\t\t\t\tvar here = my.root.next;\n\t\t\t\twhile (here !== null){\n\t\t\t\t\tif (check(here))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tprev = here;\n\t\t\t\t\there = here.next;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tbefore: prev === my.root ? null : prev,\n\t\t\t\t\tafter: here,\n\t\t\t\t\tinsert: function(node){\n\t\t\t\t\t\tnode.prev = prev;\n\t\t\t\t\t\tnode.next = here;\n\t\t\t\t\t\tprev.next = node;\n\t\t\t\t\t\tif (here !== null)\n\t\t\t\t\t\t\there.prev = node;\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\treturn my;\n\t},\n\tnode: function(data){\n\t\tdata.prev = null;\n\t\tdata.next = null;\n\t\tdata.remove = function(){\n\t\t\tdata.prev.next = data.next;\n\t\t\tif (data.next)\n\t\t\t\tdata.next.prev = data.prev;\n\t\t\tdata.prev = null;\n\t\t\tdata.next = null;\n\t\t};\n\t\treturn data;\n\t}\n};\n\nmodule.exports = LinkedList;\n\n},{}],474:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// converts a list of segments into a list of regions, while also removing unnecessary verticies\n//\n\nfunction SegmentChainer(segments, eps, buildLog){\n\tvar chains = [];\n\tvar regions = [];\n\n\tsegments.forEach(function(seg){\n\t\tvar pt1 = seg.start;\n\t\tvar pt2 = seg.end;\n\t\tif (eps.pointsSame(pt1, pt2)){\n\t\t\tconsole.warn('PolyBool: Warning: Zero-length segment detected; your epsilon is ' +\n\t\t\t\t'probably too small or too large');\n\t\t\treturn;\n\t\t}\n\n\t\tif (buildLog)\n\t\t\tbuildLog.chainStart(seg);\n\n\t\t// search for two chains that this segment matches\n\t\tvar first_match = {\n\t\t\tindex: 0,\n\t\t\tmatches_head: false,\n\t\t\tmatches_pt1: false\n\t\t};\n\t\tvar second_match = {\n\t\t\tindex: 0,\n\t\t\tmatches_head: false,\n\t\t\tmatches_pt1: false\n\t\t};\n\t\tvar next_match = first_match;\n\t\tfunction setMatch(index, matches_head, matches_pt1){\n\t\t\t// return true if we've matched twice\n\t\t\tnext_match.index = index;\n\t\t\tnext_match.matches_head = matches_head;\n\t\t\tnext_match.matches_pt1 = matches_pt1;\n\t\t\tif (next_match === first_match){\n\t\t\t\tnext_match = second_match;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tnext_match = null;\n\t\t\treturn true; // we've matched twice, we're done here\n\t\t}\n\t\tfor (var i = 0; i < chains.length; i++){\n\t\t\tvar chain = chains[i];\n\t\t\tvar head  = chain[0];\n\t\t\tvar head2 = chain[1];\n\t\t\tvar tail  = chain[chain.length - 1];\n\t\t\tvar tail2 = chain[chain.length - 2];\n\t\t\tif (eps.pointsSame(head, pt1)){\n\t\t\t\tif (setMatch(i, true, true))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(head, pt2)){\n\t\t\t\tif (setMatch(i, true, false))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(tail, pt1)){\n\t\t\t\tif (setMatch(i, false, true))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(tail, pt2)){\n\t\t\t\tif (setMatch(i, false, false))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (next_match === first_match){\n\t\t\t// we didn't match anything, so create a new chain\n\t\t\tchains.push([ pt1, pt2 ]);\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainNew(pt1, pt2);\n\t\t\treturn;\n\t\t}\n\n\t\tif (next_match === second_match){\n\t\t\t// we matched a single chain\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainMatch(first_match.index);\n\n\t\t\t// add the other point to the apporpriate end, and check to see if we've closed the\n\t\t\t// chain into a loop\n\n\t\t\tvar index = first_match.index;\n\t\t\tvar pt = first_match.matches_pt1 ? pt2 : pt1; // if we matched pt1, then we add pt2, etc\n\t\t\tvar addToHead = first_match.matches_head; // if we matched at head, then add to the head\n\n\t\t\tvar chain = chains[index];\n\t\t\tvar grow  = addToHead ? chain[0] : chain[chain.length - 1];\n\t\t\tvar grow2 = addToHead ? chain[1] : chain[chain.length - 2];\n\t\t\tvar oppo  = addToHead ? chain[chain.length - 1] : chain[0];\n\t\t\tvar oppo2 = addToHead ? chain[chain.length - 2] : chain[1];\n\n\t\t\tif (eps.pointsCollinear(grow2, grow, pt)){\n\t\t\t\t// grow isn't needed because it's directly between grow2 and pt:\n\t\t\t\t// grow2 ---grow---> pt\n\t\t\t\tif (addToHead){\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.chainRemoveHead(first_match.index, pt);\n\t\t\t\t\tchain.shift();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.chainRemoveTail(first_match.index, pt);\n\t\t\t\t\tchain.pop();\n\t\t\t\t}\n\t\t\t\tgrow = grow2; // old grow is gone... new grow is what grow2 was\n\t\t\t}\n\n\t\t\tif (eps.pointsSame(oppo, pt)){\n\t\t\t\t// we're closing the loop, so remove chain from chains\n\t\t\t\tchains.splice(index, 1);\n\n\t\t\t\tif (eps.pointsCollinear(oppo2, oppo, grow)){\n\t\t\t\t\t// oppo isn't needed because it's directly between oppo2 and grow:\n\t\t\t\t\t// oppo2 ---oppo--->grow\n\t\t\t\t\tif (addToHead){\n\t\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\t\tbuildLog.chainRemoveTail(first_match.index, grow);\n\t\t\t\t\t\tchain.pop();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\t\tbuildLog.chainRemoveHead(first_match.index, grow);\n\t\t\t\t\t\tchain.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainClose(first_match.index);\n\n\t\t\t\t// we have a closed chain!\n\t\t\t\tregions.push(chain);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// not closing a loop, so just add it to the apporpriate side\n\t\t\tif (addToHead){\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainAddHead(first_match.index, pt);\n\t\t\t\tchain.unshift(pt);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainAddTail(first_match.index, pt);\n\t\t\t\tchain.push(pt);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// otherwise, we matched two chains, so we need to combine those chains together\n\n\t\tfunction reverseChain(index){\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainReverse(index);\n\t\t\tchains[index].reverse(); // gee, that's easy\n\t\t}\n\n\t\tfunction appendChain(index1, index2){\n\t\t\t// index1 gets index2 appended to it, and index2 is removed\n\t\t\tvar chain1 = chains[index1];\n\t\t\tvar chain2 = chains[index2];\n\t\t\tvar tail  = chain1[chain1.length - 1];\n\t\t\tvar tail2 = chain1[chain1.length - 2];\n\t\t\tvar head  = chain2[0];\n\t\t\tvar head2 = chain2[1];\n\n\t\t\tif (eps.pointsCollinear(tail2, tail, head)){\n\t\t\t\t// tail isn't needed because it's directly between tail2 and head\n\t\t\t\t// tail2 ---tail---> head\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainRemoveTail(index1, tail);\n\t\t\t\tchain1.pop();\n\t\t\t\ttail = tail2; // old tail is gone... new tail is what tail2 was\n\t\t\t}\n\n\t\t\tif (eps.pointsCollinear(tail, head, head2)){\n\t\t\t\t// head isn't needed because it's directly between tail and head2\n\t\t\t\t// tail ---head---> head2\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainRemoveHead(index2, head);\n\t\t\t\tchain2.shift();\n\t\t\t}\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainJoin(index1, index2);\n\t\t\tchains[index1] = chain1.concat(chain2);\n\t\t\tchains.splice(index2, 1);\n\t\t}\n\n\t\tvar F = first_match.index;\n\t\tvar S = second_match.index;\n\n\t\tif (buildLog)\n\t\t\tbuildLog.chainConnect(F, S);\n\n\t\tvar reverseF = chains[F].length < chains[S].length; // reverse the shorter chain, if needed\n\t\tif (first_match.matches_head){\n\t\t\tif (second_match.matches_head){\n\t\t\t\tif (reverseF){\n\t\t\t\t\t// <<<< F <<<< --- >>>> S >>>>\n\t\t\t\t\treverseChain(F);\n\t\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\t\tappendChain(F, S);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// <<<< F <<<< --- >>>> S >>>>\n\t\t\t\t\treverseChain(S);\n\t\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\t\tappendChain(S, F);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\tappendChain(S, F);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (second_match.matches_head){\n\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\tappendChain(F, S);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (reverseF){\n\t\t\t\t\t// >>>> F >>>> --- <<<< S <<<<\n\t\t\t\t\treverseChain(F);\n\t\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\t\tappendChain(S, F);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// >>>> F >>>> --- <<<< S <<<<\n\t\t\t\t\treverseChain(S);\n\t\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\t\tappendChain(F, S);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn regions;\n}\n\nmodule.exports = SegmentChainer;\n\n},{}],475:[function(_dereq_,module,exports){\n// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// filter a list of segments based on boolean operations\n//\n\nfunction select(segments, selection, buildLog){\n\tvar result = [];\n\tsegments.forEach(function(seg){\n\t\tvar index =\n\t\t\t(seg.myFill.above ? 8 : 0) +\n\t\t\t(seg.myFill.below ? 4 : 0) +\n\t\t\t((seg.otherFill && seg.otherFill.above) ? 2 : 0) +\n\t\t\t((seg.otherFill && seg.otherFill.below) ? 1 : 0);\n\t\tif (selection[index] !== 0){\n\t\t\t// copy the segment to the results, while also calculating the fill status\n\t\t\tresult.push({\n\t\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\t\tstart: seg.start,\n\t\t\t\tend: seg.end,\n\t\t\t\tmyFill: {\n\t\t\t\t\tabove: selection[index] === 1, // 1 if filled above\n\t\t\t\t\tbelow: selection[index] === 2  // 2 if filled below\n\t\t\t\t},\n\t\t\t\totherFill: null\n\t\t\t});\n\t\t}\n\t});\n\n\tif (buildLog)\n\t\tbuildLog.selected(result);\n\n\treturn result;\n}\n\nvar SegmentSelector = {\n\tunion: function(segments, buildLog){ // primary | secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   yes filled below    2\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   no                  0\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   yes filled above    1\n\t\t//    1      0      1      1   =>   no                  0\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   no                  0\n\t\t//    1      1      1      0   =>   no                  0\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t2, 2, 0, 0,\n\t\t\t1, 0, 1, 0,\n\t\t\t0, 0, 0, 0\n\t\t], buildLog);\n\t},\n\tintersect: function(segments, buildLog){ // primary & secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   no                  0\n\t\t//    0      0      1      0   =>   no                  0\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   no                  0\n\t\t//    0      1      0      1   =>   yes filled below    2\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   yes filled below    2\n\t\t//    1      0      0      0   =>   no                  0\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   yes filled above    1\n\t\t//    1      0      1      1   =>   yes filled above    1\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled below    2\n\t\t//    1      1      1      0   =>   yes filled above    1\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 0, 0, 0,\n\t\t\t0, 2, 0, 2,\n\t\t\t0, 0, 1, 1,\n\t\t\t0, 2, 1, 0\n\t\t], buildLog);\n\t},\n\tdifference: function(segments, buildLog){ // primary - secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   no                  0\n\t\t//    0      0      1      0   =>   no                  0\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   yes filled below    2\n\t\t//    0      1      1      1   =>   no                  0\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   yes filled above    1\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   no                  0\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled above    1\n\t\t//    1      1      1      0   =>   yes filled below    2\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 0, 0, 0,\n\t\t\t2, 0, 2, 0,\n\t\t\t1, 1, 0, 0,\n\t\t\t0, 1, 2, 0\n\t\t], buildLog);\n\t},\n\tdifferenceRev: function(segments, buildLog){ // secondary - primary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   no                  0\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   yes filled above    1\n\t\t//    0      1      1      1   =>   yes filled above    1\n\t\t//    1      0      0      0   =>   no                  0\n\t\t//    1      0      0      1   =>   yes filled below    2\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   yes filled below    2\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   no                  0\n\t\t//    1      1      1      0   =>   no                  0\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t0, 0, 1, 1,\n\t\t\t0, 2, 0, 2,\n\t\t\t0, 0, 0, 0\n\t\t], buildLog);\n\t},\n\txor: function(segments, buildLog){ // primary ^ secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   yes filled above    1\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   yes filled below    2\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled above    1\n\t\t//    1      1      1      0   =>   yes filled below    2\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t2, 0, 0, 1,\n\t\t\t1, 0, 0, 2,\n\t\t\t0, 1, 2, 0\n\t\t], buildLog);\n\t}\n};\n\nmodule.exports = SegmentSelector;\n\n},{}],476:[function(_dereq_,module,exports){\n//Optimized version for triangle closest point\n// Based on Eberly's WildMagick codes\n// http://www.geometrictools.com/LibMathematics/Distance/Distance.html\n\"use strict\";\n\nvar diff = new Float64Array(4);\nvar edge0 = new Float64Array(4);\nvar edge1 = new Float64Array(4);\n\nfunction closestPoint2d(V0, V1, V2, point, result) {\n  //Reallocate buffers if necessary\n  if(diff.length < point.length) {\n    diff = new Float64Array(point.length);\n    edge0 = new Float64Array(point.length);\n    edge1 = new Float64Array(point.length);\n  }\n  //Compute edges\n  for(var i=0; i<point.length; ++i) {\n    diff[i]  = V0[i] - point[i];\n    edge0[i] = V1[i] - V0[i];\n    edge1[i] = V2[i] - V0[i];\n  }\n  //Compute coefficients for quadratic func\n  var a00 = 0.0\n    , a01 = 0.0\n    , a11 = 0.0\n    , b0  = 0.0\n    , b1  = 0.0\n    , c   = 0.0;\n  for(var i=0; i<point.length; ++i) {\n    var e0 = edge0[i]\n      , e1 = edge1[i]\n      , d  = diff[i];\n    a00 += e0 * e0;\n    a01 += e0 * e1;\n    a11 += e1 * e1;\n    b0  += d * e0;\n    b1  += d * e1;\n    c   += d * d;\n  }\n  //Compute determinant/coeffs\n  var det = Math.abs(a00*a11 - a01*a01);\n  var s   = a01*b1 - a11*b0;\n  var t   = a01*b0 - a00*b1;\n  var sqrDistance;\n  //Hardcoded Voronoi diagram classification\n  if (s + t <= det) {\n    if (s < 0) {\n      if (t < 0) { // region 4\n        if (b0 < 0) {\n          t = 0;\n          if (-b0 >= a00) {\n            s = 1.0;\n            sqrDistance = a00 + 2.0*b0 + c;\n          } else {\n            s = -b0/a00;\n            sqrDistance = b0*s + c;\n          }\n        } else {\n          s = 0;\n          if (b1 >= 0) {\n            t = 0;\n            sqrDistance = c;\n          } else if (-b1 >= a11) {\n            t = 1;\n            sqrDistance = a11 + 2.0*b1 + c;\n          } else {\n            t = -b1/a11;\n            sqrDistance = b1*t + c;\n          }\n        }\n      } else {  // region 3\n        s = 0;\n        if (b1 >= 0) {\n          t = 0;\n          sqrDistance = c;\n        } else if (-b1 >= a11) {\n          t = 1;\n          sqrDistance = a11 + 2.0*b1 + c;\n        } else {\n          t = -b1/a11;\n          sqrDistance = b1*t + c;\n        }\n      }\n    } else if (t < 0) { // region 5\n      t = 0;\n      if (b0 >= 0) {\n        s = 0;\n        sqrDistance = c;\n      } else if (-b0 >= a00) {\n        s = 1;\n        sqrDistance = a00 + 2.0*b0 + c;\n      } else {\n        s = -b0/a00;\n        sqrDistance = b0*s + c;\n      }\n    } else {  // region 0\n      // minimum at interior point\n      var invDet = 1.0 / det;\n      s *= invDet;\n      t *= invDet;\n      sqrDistance = s*(a00*s + a01*t + 2.0*b0) + t*(a01*s + a11*t + 2.0*b1) + c;\n    }\n  } else {\n    var tmp0, tmp1, numer, denom;\n    \n    if (s < 0) {  // region 2\n      tmp0 = a01 + b0;\n      tmp1 = a11 + b1;\n      if (tmp1 > tmp0) {\n        numer = tmp1 - tmp0;\n        denom = a00 - 2.0*a01 + a11;\n        if (numer >= denom) {\n          s = 1;\n          t = 0;\n          sqrDistance = a00 + 2.0*b0 + c;\n        } else {\n          s = numer/denom;\n          t = 1 - s;\n          sqrDistance = s*(a00*s + a01*t + 2.0*b0) +\n          t*(a01*s + a11*t + 2.0*b1) + c;\n        }\n      } else {\n        s = 0;\n        if (tmp1 <= 0) {\n          t = 1;\n          sqrDistance = a11 + 2.0*b1 + c;\n        } else if (b1 >= 0) {\n          t = 0;\n          sqrDistance = c;\n        } else {\n          t = -b1/a11;\n          sqrDistance = b1*t + c;\n        }\n      }\n    } else if (t < 0) {  // region 6\n      tmp0 = a01 + b1;\n      tmp1 = a00 + b0;\n      if (tmp1 > tmp0) {\n        numer = tmp1 - tmp0;\n        denom = a00 - 2.0*a01 + a11;\n        if (numer >= denom) {\n          t = 1;\n          s = 0;\n          sqrDistance = a11 + 2.0*b1 + c;\n        } else {\n          t = numer/denom;\n          s = 1 - t;\n          sqrDistance = s*(a00*s + a01*t + 2.0*b0) +\n          t*(a01*s + a11*t + 2.0*b1) + c;\n        }\n      } else {\n        t = 0;\n        if (tmp1 <= 0) {\n          s = 1;\n          sqrDistance = a00 + 2.0*b0 + c;\n        } else if (b0 >= 0) {\n          s = 0;\n          sqrDistance = c;\n        } else {\n          s = -b0/a00;\n          sqrDistance = b0*s + c;\n        }\n      }\n    } else {  // region 1\n      numer = a11 + b1 - a01 - b0;\n      if (numer <= 0) {\n        s = 0;\n        t = 1;\n        sqrDistance = a11 + 2.0*b1 + c;\n      } else {\n        denom = a00 - 2.0*a01 + a11;\n        if (numer >= denom) {\n          s = 1;\n          t = 0;\n          sqrDistance = a00 + 2.0*b0 + c;\n        } else {\n          s = numer/denom;\n          t = 1 - s;\n          sqrDistance = s*(a00*s + a01*t + 2.0*b0) +\n          t*(a01*s + a11*t + 2.0*b1) + c;\n        }\n      }\n    }\n  }\n  var u = 1.0 - s - t;\n  for(var i=0; i<point.length; ++i) {\n    result[i] = u * V0[i] + s * V1[i] + t * V2[i];\n  }\n  if(sqrDistance < 0) {\n    return 0;\n  }\n  return sqrDistance;\n}\n\nmodule.exports = closestPoint2d;\n\n},{}],477:[function(_dereq_,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],478:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('gl-quat/slerp')\n},{\"gl-quat/slerp\":292}],479:[function(_dereq_,module,exports){\n(function (global){\nvar now = _dereq_('performance-now')\n  , root = typeof window === 'undefined' ? global : window\n  , vendors = ['moz', 'webkit']\n  , suffix = 'AnimationFrame'\n  , raf = root['request' + suffix]\n  , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n  raf = root[vendors[i] + 'Request' + suffix]\n  caf = root[vendors[i] + 'Cancel' + suffix]\n      || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n  var last = 0\n    , id = 0\n    , queue = []\n    , frameDuration = 1000 / 60\n\n  raf = function(callback) {\n    if(queue.length === 0) {\n      var _now = now()\n        , next = Math.max(0, frameDuration - (_now - last))\n      last = next + _now\n      setTimeout(function() {\n        var cp = queue.slice(0)\n        // Clear queue here to prevent\n        // callbacks from appending listeners\n        // to the current frame's queue\n        queue.length = 0\n        for(var i = 0; i < cp.length; i++) {\n          if(!cp[i].cancelled) {\n            try{\n              cp[i].callback(last)\n            } catch(e) {\n              setTimeout(function() { throw e }, 0)\n            }\n          }\n        }\n      }, Math.round(next))\n    }\n    queue.push({\n      handle: ++id,\n      callback: callback,\n      cancelled: false\n    })\n    return id\n  }\n\n  caf = function(handle) {\n    for(var i = 0; i < queue.length; i++) {\n      if(queue[i].handle === handle) {\n        queue[i].cancelled = true\n      }\n    }\n  }\n}\n\nmodule.exports = function(fn) {\n  // Wrap in a new function to prevent\n  // `cancel` potentially being assigned\n  // to the native rAF function\n  return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n  caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n  if (!object) {\n    object = root;\n  }\n  object.requestAnimationFrame = raf\n  object.cancelAnimationFrame = caf\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"performance-now\":457}],480:[function(_dereq_,module,exports){\n'use strict'\n\nvar bnadd = _dereq_('big-rat/add')\n\nmodule.exports = add\n\nfunction add (a, b) {\n  var n = a.length\n  var r = new Array(n)\n  for (var i=0; i<n; ++i) {\n    r[i] = bnadd(a[i], b[i])\n  }\n  return r\n}\n\n},{\"big-rat/add\":68}],481:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = float2rat\n\nvar rat = _dereq_('big-rat')\n\nfunction float2rat(v) {\n  var result = new Array(v.length)\n  for(var i=0; i<v.length; ++i) {\n    result[i] = rat(v[i])\n  }\n  return result\n}\n\n},{\"big-rat\":71}],482:[function(_dereq_,module,exports){\n'use strict'\n\nvar rat = _dereq_('big-rat')\nvar mul = _dereq_('big-rat/mul')\n\nmodule.exports = muls\n\nfunction muls(a, x) {\n  var s = rat(x)\n  var n = a.length\n  var r = new Array(n)\n  for(var i=0; i<n; ++i) {\n    r[i] = mul(a[i], s)\n  }\n  return r\n}\n\n},{\"big-rat\":71,\"big-rat/mul\":80}],483:[function(_dereq_,module,exports){\n'use strict'\n\nvar bnsub = _dereq_('big-rat/sub')\n\nmodule.exports = sub\n\nfunction sub(a, b) {\n  var n = a.length\n  var r = new Array(n)\n    for(var i=0; i<n; ++i) {\n    r[i] = bnsub(a[i], b[i])\n  }\n  return r\n}\n\n},{\"big-rat/sub\":82}],484:[function(_dereq_,module,exports){\n'use strict'\n\nvar compareCell = _dereq_('compare-cell')\nvar compareOrientedCell = _dereq_('compare-oriented-cell')\nvar orientation = _dereq_('cell-orientation')\n\nmodule.exports = reduceCellComplex\n\nfunction reduceCellComplex(cells) {\n  cells.sort(compareOrientedCell)\n  var n = cells.length\n  var ptr = 0\n  for(var i=0; i<n; ++i) {\n    var c = cells[i]\n    var o = orientation(c)\n    if(o === 0) {\n      continue\n    }\n    if(ptr > 0) {\n      var f = cells[ptr-1]\n      if(compareCell(c, f) === 0 &&\n         orientation(f)    !== o) {\n        ptr -= 1\n        continue\n      }\n    }\n    cells[ptr++] = c\n  }\n  cells.length = ptr\n  return cells\n}\n\n},{\"cell-orientation\":105,\"compare-cell\":121,\"compare-oriented-cell\":122}],485:[function(_dereq_,module,exports){\n'use strict'\n\nvar getBounds = _dereq_('array-bounds')\nvar rgba = _dereq_('color-normalize')\nvar updateDiff = _dereq_('update-diff')\nvar pick = _dereq_('pick-by-alias')\nvar extend = _dereq_('object-assign')\nvar flatten = _dereq_('flatten-vertex-data')\nvar ref = _dereq_('to-float32');\nvar float32 = ref.float32;\nvar fract32 = ref.fract32;\n\nmodule.exports = Error2D\n\nvar WEIGHTS = [\n\t//direction, lineWidth shift, capSize shift\n\n\t// x-error bar\n\t[1, 0, 0, 1, 0, 0],\n\t[1, 0, 0, -1, 0, 0],\n\t[-1, 0, 0, -1, 0, 0],\n\n\t[-1, 0, 0, -1, 0, 0],\n\t[-1, 0, 0, 1, 0, 0],\n\t[1, 0, 0, 1, 0, 0],\n\n\t// x-error right cap\n\t[1, 0, -1, 0, 0, 1],\n\t[1, 0, -1, 0, 0, -1],\n\t[1, 0, 1, 0, 0, -1],\n\n\t[1, 0, 1, 0, 0, -1],\n\t[1, 0, 1, 0, 0, 1],\n\t[1, 0, -1, 0, 0, 1],\n\n\t// x-error left cap\n\t[-1, 0, -1, 0, 0, 1],\n\t[-1, 0, -1, 0, 0, -1],\n\t[-1, 0, 1, 0, 0, -1],\n\n\t[-1, 0, 1, 0, 0, -1],\n\t[-1, 0, 1, 0, 0, 1],\n\t[-1, 0, -1, 0, 0, 1],\n\n\t// y-error bar\n\t[0, 1, 1, 0, 0, 0],\n\t[0, 1, -1, 0, 0, 0],\n\t[0, -1, -1, 0, 0, 0],\n\n\t[0, -1, -1, 0, 0, 0],\n\t[0, 1, 1, 0, 0, 0],\n\t[0, -1, 1, 0, 0, 0],\n\n\t// y-error top cap\n\t[0, 1, 0, -1, 1, 0],\n\t[0, 1, 0, -1, -1, 0],\n\t[0, 1, 0, 1, -1, 0],\n\n\t[0, 1, 0, 1, 1, 0],\n\t[0, 1, 0, -1, 1, 0],\n\t[0, 1, 0, 1, -1, 0],\n\n\t// y-error bottom cap\n\t[0, -1, 0, -1, 1, 0],\n\t[0, -1, 0, -1, -1, 0],\n\t[0, -1, 0, 1, -1, 0],\n\n\t[0, -1, 0, 1, 1, 0],\n\t[0, -1, 0, -1, 1, 0],\n\t[0, -1, 0, 1, -1, 0]\n]\n\n\nfunction Error2D (regl, options) {\n\tif (typeof regl === 'function') {\n\t\tif (!options) { options = {} }\n\t\toptions.regl = regl\n\t}\n\telse {\n\t\toptions = regl\n\t}\n\tif (options.length) { options.positions = options }\n\tregl = options.regl\n\n\tif (!regl.hasExtension('ANGLE_instanced_arrays')) {\n\t\tthrow Error('regl-error2d: `ANGLE_instanced_arrays` extension should be enabled');\n\t}\n\n\t// persistent variables\n\tvar gl = regl._gl, drawErrors, positionBuffer, positionFractBuffer, colorBuffer, errorBuffer, meshBuffer,\n\t\t\tdefaults = {\n\t\t\t\tcolor: 'black',\n\t\t\t\tcapSize: 5,\n\t\t\t\tlineWidth: 1,\n\t\t\t\topacity: 1,\n\t\t\t\tviewport: null,\n\t\t\t\trange: null,\n\t\t\t\toffset: 0,\n\t\t\t\tcount: 0,\n\t\t\t\tbounds: null,\n\t\t\t\tpositions: [],\n\t\t\t\terrors: []\n\t\t\t}, groups = []\n\n\t//color per-point\n\tcolorBuffer = regl.buffer({\n\t\tusage: 'dynamic',\n\t\ttype: 'uint8',\n\t\tdata: new Uint8Array(0)\n\t})\n\t//xy-position per-point\n\tpositionBuffer = regl.buffer({\n\t\tusage: 'dynamic',\n\t\ttype: 'float',\n\t\tdata: new Uint8Array(0)\n\t})\n\t//xy-position float32-fraction\n\tpositionFractBuffer = regl.buffer({\n\t\tusage: 'dynamic',\n\t\ttype: 'float',\n\t\tdata: new Uint8Array(0)\n\t})\n\t//4 errors per-point\n\terrorBuffer = regl.buffer({\n\t\tusage: 'dynamic',\n\t\ttype: 'float',\n\t\tdata: new Uint8Array(0)\n\t})\n\t//error bar mesh\n\tmeshBuffer = regl.buffer({\n\t\tusage: 'static',\n\t\ttype: 'float',\n\t\tdata: WEIGHTS\n\t})\n\n\tupdate(options)\n\n\t//drawing method\n\tdrawErrors = regl({\n\t\tvert: \"\\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\",\n\n\t\tfrag: \"\\n\\t\\tprecision highp 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\",\n\n\t\tuniforms: {\n\t\t\trange: regl.prop('range'),\n\t\t\tlineWidth: regl.prop('lineWidth'),\n\t\t\tcapSize: regl.prop('capSize'),\n\t\t\topacity: regl.prop('opacity'),\n\t\t\tscale: regl.prop('scale'),\n\t\t\ttranslate: regl.prop('translate'),\n\t\t\tscaleFract: regl.prop('scaleFract'),\n\t\t\ttranslateFract: regl.prop('translateFract'),\n\t\t\tviewport: function (ctx, prop) { return [prop.viewport.x, prop.viewport.y, ctx.viewportWidth, ctx.viewportHeight]; }\n\t\t},\n\n\t\tattributes: {\n\t\t\t//dynamic attributes\n\t\t\tcolor: {\n\t\t\t\tbuffer: colorBuffer,\n\t\t\t\toffset: function (ctx, prop) { return prop.offset * 4; },\n\t\t\t\tdivisor: 1,\n\t\t\t},\n\t\t\tposition: {\n\t\t\t\tbuffer: positionBuffer,\n\t\t\t\toffset: function (ctx, prop) { return prop.offset * 8; },\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\tpositionFract: {\n\t\t\t\tbuffer: positionFractBuffer,\n\t\t\t\toffset: function (ctx, prop) { return prop.offset * 8; },\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tbuffer: errorBuffer,\n\t\t\t\toffset: function (ctx, prop) { return prop.offset * 16; },\n\t\t\t\tdivisor: 1\n\t\t\t},\n\n\t\t\t//static attributes\n\t\t\tdirection: {\n\t\t\t\tbuffer: meshBuffer,\n\t\t\t\tstride: 24,\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\tlineOffset: {\n\t\t\t\tbuffer: meshBuffer,\n\t\t\t\tstride: 24,\n\t\t\t\toffset: 8\n\t\t\t},\n\t\t\tcapOffset: {\n\t\t\t\tbuffer: meshBuffer,\n\t\t\t\tstride: 24,\n\t\t\t\toffset: 16\n\t\t\t}\n\t\t},\n\n\t\tprimitive: 'triangles',\n\n\t\tblend: {\n\t\t\tenable: true,\n\t\t\tcolor: [0,0,0,0],\n\t\t\tequation: {\n\t\t\t\trgb: 'add',\n\t\t\t\talpha: 'add'\n\t\t\t},\n\t\t\tfunc: {\n\t\t\t\tsrcRGB: 'src alpha',\n\t\t\t\tdstRGB: 'one minus src alpha',\n\t\t\t\tsrcAlpha: 'one minus dst alpha',\n\t\t\t\tdstAlpha: 'one'\n\t\t\t}\n\t\t},\n\n\t\tdepth: {\n\t\t\tenable: false\n\t\t},\n\n\t\tscissor: {\n\t\t\tenable: true,\n\t\t\tbox: regl.prop('viewport')\n\t\t},\n\t\tviewport: regl.prop('viewport'),\n\t\tstencil: false,\n\n\t\tinstances: regl.prop('count'),\n\t\tcount: WEIGHTS.length\n\t})\n\n\t//expose API\n\textend(error2d, {\n\t\tupdate: update,\n\t\tdraw: draw,\n\t\tdestroy: destroy,\n\t\tregl: regl,\n\t\tgl: gl,\n\t\tcanvas: gl.canvas,\n\t\tgroups: groups\n\t})\n\n\treturn error2d\n\n\tfunction error2d (opts) {\n\t\t//update\n\t\tif (opts) {\n\t\t\tupdate(opts)\n\t\t}\n\n\t\t//destroy\n\t\telse if (opts === null) {\n\t\t\tdestroy()\n\t\t}\n\n\t\tdraw()\n\t}\n\n\n\t//main draw method\n\tfunction draw (options) {\n\t\tif (typeof options === 'number') { return drawGroup(options) }\n\n\t\t//make options a batch\n\t\tif (options && !Array.isArray(options)) { options = [options] }\n\n\n\t\tregl._refresh()\n\n\t\t//render multiple polylines via regl batch\n\t\tgroups.forEach(function (s, i) {\n\t\t\tif (!s) { return }\n\n\t\t\tif (options) {\n\t\t\t\tif (!options[i]) { s.draw = false }\n\t\t\t\telse { s.draw = true }\n\t\t\t}\n\n\t\t\t//ignore draw flag for one pass\n\t\t\tif (!s.draw) {\n\t\t\t\ts.draw = true;\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tdrawGroup(i)\n\t\t})\n\t}\n\n\t//draw single error group by id\n\tfunction drawGroup (s) {\n\t\tif (typeof s === 'number') { s = groups[s] }\n\t\tif (s == null) { return }\n\n\t\tif (!(s && s.count && s.color && s.opacity && s.positions && s.positions.length > 1)) { return }\n\n\t\ts.scaleRatio = [\n\t\t\ts.scale[0] * s.viewport.width,\n\t\t\ts.scale[1] * s.viewport.height\n\t\t]\n\n\t\tdrawErrors(s)\n\n\t\tif (s.after) { s.after(s) }\n\t}\n\n\tfunction update (options) {\n\t\tif (!options) { return }\n\n\t\t//direct points argument\n\t\tif (options.length != null) {\n\t\t\tif (typeof options[0] === 'number') { options = [{positions: options}] }\n\t\t}\n\n\t\t//make options a batch\n\t\telse if (!Array.isArray(options)) { options = [options] }\n\n\t\t//global count of points\n\t\tvar pointCount = 0, errorCount = 0\n\n\t\terror2d.groups = groups = options.map(function (options, i) {\n\t\t\tvar group = groups[i]\n\n\t\t\tif (!options) { return group }\n\t\t\telse if (typeof options === 'function') { options = {after: options} }\n\t\t\telse if (typeof options[0] === 'number') { options = {positions: options} }\n\n\t\t\t//copy options to avoid mutation & handle aliases\n\t\t\toptions = pick(options, {\n\t\t\t\tcolor: 'color colors fill',\n\t\t\t\tcapSize: 'capSize cap capsize cap-size',\n\t\t\t\tlineWidth: 'lineWidth line-width width line thickness',\n\t\t\t\topacity: 'opacity alpha',\n\t\t\t\trange: 'range dataBox',\n\t\t\t\tviewport: 'viewport viewBox',\n\t\t\t\terrors: 'errors error',\n\t\t\t\tpositions: 'positions position data points'\n\t\t\t})\n\n\t\t\tif (!group) {\n\t\t\t\tgroups[i] = group = {\n\t\t\t\t\tid: i,\n\t\t\t\t\tscale: null,\n\t\t\t\t\ttranslate: null,\n\t\t\t\t\tscaleFract: null,\n\t\t\t\t\ttranslateFract: null,\n\t\t\t\t\tdraw: true\n\t\t\t\t}\n\t\t\t\toptions = extend({}, defaults, options)\n\t\t\t}\n\n\t\t\tupdateDiff(group, options, [{\n\t\t\t\tlineWidth: function (v) { return +v * .5; },\n\t\t\t\tcapSize: function (v) { return +v * .5; },\n\t\t\t\topacity: parseFloat,\n\t\t\t\terrors: function (errors) {\n\t\t\t\t\terrors = flatten(errors)\n\n\t\t\t\t\terrorCount += errors.length\n\t\t\t\t\treturn errors\n\t\t\t\t},\n\t\t\t\tpositions: function (positions, state) {\n\t\t\t\t\tpositions = flatten(positions, 'float64')\n\t\t\t\t\tstate.count = Math.floor(positions.length / 2)\n\t\t\t\t\tstate.bounds = getBounds(positions, 2)\n\t\t\t\t\tstate.offset = pointCount\n\n\t\t\t\t\tpointCount += state.count\n\n\t\t\t\t\treturn positions\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tcolor: function (colors, state) {\n\t\t\t\t\tvar count = state.count\n\n\t\t\t\t\tif (!colors) { colors = 'transparent' }\n\n\t\t\t\t\t// 'black' or [0,0,0,0] case\n\t\t\t\t\tif (!Array.isArray(colors) || typeof colors[0] === 'number') {\n\t\t\t\t\t\tvar color = colors\n\t\t\t\t\t\tcolors = Array(count)\n\t\t\t\t\t\tfor (var i = 0; i < count; i++) {\n\t\t\t\t\t\t\tcolors[i] = color\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (colors.length < count) { throw Error('Not enough colors') }\n\n\t\t\t\t\tvar colorData = new Uint8Array(count * 4)\n\n\t\t\t\t\t//convert colors to float arrays\n\t\t\t\t\tfor (var i$1 = 0; i$1 < count; i$1++) {\n\t\t\t\t\t\tvar c = rgba(colors[i$1], 'uint8')\n\t\t\t\t\t\tcolorData.set(c, i$1 * 4)\n\t\t\t\t\t}\n\n\t\t\t\t\treturn colorData\n\t\t\t\t},\n\n\t\t\t\trange: function (range, state, options) {\n\t\t\t\t\tvar bounds = state.bounds\n\t\t\t\t\tif (!range) { range = bounds }\n\n\t\t\t\t\tstate.scale = [1 / (range[2] - range[0]), 1 / (range[3] - range[1])]\n\t\t\t\t\tstate.translate = [-range[0], -range[1]]\n\n\t\t\t\t\tstate.scaleFract = fract32(state.scale)\n\t\t\t\t\tstate.translateFract = fract32(state.translate)\n\n\t\t\t\t\treturn range\n\t\t\t\t},\n\n\t\t\t\tviewport: function (vp) {\n\t\t\t\t\tvar viewport\n\n\t\t\t\t\tif (Array.isArray(vp)) {\n\t\t\t\t\t\tviewport = {\n\t\t\t\t\t\t\tx: vp[0],\n\t\t\t\t\t\t\ty: vp[1],\n\t\t\t\t\t\t\twidth: vp[2] - vp[0],\n\t\t\t\t\t\t\theight: vp[3] - vp[1]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (vp) {\n\t\t\t\t\t\tviewport = {\n\t\t\t\t\t\t\tx: vp.x || vp.left || 0,\n\t\t\t\t\t\t\ty: vp.y || vp.top || 0\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (vp.right) { viewport.width = vp.right - viewport.x }\n\t\t\t\t\t\telse { viewport.width = vp.w || vp.width || 0 }\n\n\t\t\t\t\t\tif (vp.bottom) { viewport.height = vp.bottom - viewport.y }\n\t\t\t\t\t\telse { viewport.height = vp.h || vp.height || 0 }\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tviewport = {\n\t\t\t\t\t\t\tx: 0, y: 0,\n\t\t\t\t\t\t\twidth: gl.drawingBufferWidth,\n\t\t\t\t\t\t\theight: gl.drawingBufferHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn viewport\n\t\t\t\t}\n\t\t\t}])\n\n\t\t\treturn group\n\t\t})\n\n\t\tif (pointCount || errorCount) {\n\t\t\tvar len = groups.reduce(function (acc, group, i) {\n\t\t\t\treturn acc + (group ? group.count : 0)\n\t\t\t}, 0)\n\n\t\t\tvar positionData = new Float64Array(len * 2)\n\t\t\tvar colorData = new Uint8Array(len * 4)\n\t\t\tvar errorData = new Float32Array(len * 4)\n\n\t\t\tgroups.forEach(function (group, i) {\n\t\t\t\tif (!group) { return }\n\t\t\t\tvar positions = group.positions;\n\t\t\t\tvar count = group.count;\n\t\t\t\tvar offset = group.offset;\n\t\t\t\tvar color = group.color;\n\t\t\t\tvar errors = group.errors;\n\t\t\t\tif (!count) { return }\n\n\t\t\t\tcolorData.set(color, offset * 4)\n\t\t\t\terrorData.set(errors, offset * 4)\n\t\t\t\tpositionData.set(positions, offset * 2)\n\t\t\t})\n\n\t\t\tpositionBuffer(float32(positionData))\n\t\t\tpositionFractBuffer(fract32(positionData))\n\t\t\tcolorBuffer(colorData)\n\t\t\terrorBuffer(errorData)\n\t\t}\n\n\t}\n\n\tfunction destroy () {\n\t\tpositionBuffer.destroy()\n\t\tpositionFractBuffer.destroy()\n\t\tcolorBuffer.destroy()\n\t\terrorBuffer.destroy()\n\t\tmeshBuffer.destroy()\n\t}\n}\n\n},{\"array-bounds\":58,\"color-normalize\":113,\"flatten-vertex-data\":226,\"object-assign\":449,\"pick-by-alias\":460,\"to-float32\":525,\"update-diff\":536}],486:[function(_dereq_,module,exports){\n'use strict'\n\n\nvar rgba = _dereq_('color-normalize')\nvar getBounds = _dereq_('array-bounds')\nvar extend = _dereq_('object-assign')\nvar glslify = _dereq_('glslify')\nvar pick = _dereq_('pick-by-alias')\nvar flatten = _dereq_('flatten-vertex-data')\nvar triangulate = _dereq_('earcut')\nvar normalize = _dereq_('array-normalize')\nvar ref = _dereq_('to-float32');\nvar float32 = ref.float32;\nvar fract32 = ref.fract32;\nvar WeakMap = _dereq_('es6-weak-map')\nvar parseRect = _dereq_('parse-rect')\n\n\nmodule.exports = Line2D\n\n\n/** @constructor */\nfunction Line2D (regl, options) {\n\tif (!(this instanceof Line2D)) { return new Line2D(regl, options) }\n\n\tif (typeof regl === 'function') {\n\t\tif (!options) { options = {} }\n\t\toptions.regl = regl\n\t}\n\telse {\n\t\toptions = regl\n\t}\n\tif (options.length) { options.positions = options }\n\tregl = options.regl\n\n\tif (!regl.hasExtension('ANGLE_instanced_arrays')) {\n\t\tthrow Error('regl-error2d: `ANGLE_instanced_arrays` extension should be enabled');\n\t}\n\n\t// persistent variables\n\tthis.gl = regl._gl\n\tthis.regl = regl\n\n\t// list of options for lines\n\tthis.passes = []\n\n\t// cached shaders instance\n\tthis.shaders = Line2D.shaders.has(regl) ? Line2D.shaders.get(regl) : Line2D.shaders.set(regl, Line2D.createShaders(regl)).get(regl)\n\n\n\t// init defaults\n\tthis.update(options)\n}\n\n\nLine2D.dashMult = 2\nLine2D.maxPatternLength = 256\nLine2D.precisionThreshold = 3e6\nLine2D.maxPoints = 1e4\nLine2D.maxLines = 2048\n\n\n// cache of created draw calls per-regl instance\nLine2D.shaders = new WeakMap()\n\n\n// create static shaders once\nLine2D.createShaders = function (regl) {\n\tvar offsetBuffer = regl.buffer({\n\t\tusage: 'static',\n\t\ttype: 'float',\n\t\tdata: [0,1, 0,0, 1,1, 1,0]\n\t})\n\n\tvar shaderOptions = {\n\t\tprimitive: 'triangle strip',\n\t\tinstances: regl.prop('count'),\n\t\tcount: 4,\n\t\toffset: 0,\n\n\t\tuniforms: {\n\t\t\tmiterMode: function (ctx, prop) { return prop.join === 'round' ? 2 : 1; },\n\t\t\tmiterLimit: regl.prop('miterLimit'),\n\t\t\tscale: regl.prop('scale'),\n\t\t\tscaleFract: regl.prop('scaleFract'),\n\t\t\ttranslateFract: regl.prop('translateFract'),\n\t\t\ttranslate: regl.prop('translate'),\n\t\t\tthickness: regl.prop('thickness'),\n\t\t\tdashPattern: regl.prop('dashTexture'),\n\t\t\topacity: regl.prop('opacity'),\n\t\t\tpixelRatio: regl.context('pixelRatio'),\n\t\t\tid: regl.prop('id'),\n\t\t\tdashSize: regl.prop('dashLength'),\n\t\t\tviewport: function (c, p) { return [p.viewport.x, p.viewport.y, c.viewportWidth, c.viewportHeight]; },\n\t\t\tdepth: regl.prop('depth')\n\t\t},\n\n\t\tblend: {\n\t\t\tenable: true,\n\t\t\tcolor: [0,0,0,0],\n\t\t\tequation: {\n\t\t\t\trgb: 'add',\n\t\t\t\talpha: 'add'\n\t\t\t},\n\t\t\tfunc: {\n\t\t\t\tsrcRGB: 'src alpha',\n\t\t\t\tdstRGB: 'one minus src alpha',\n\t\t\t\tsrcAlpha: 'one minus dst alpha',\n\t\t\t\tdstAlpha: 'one'\n\t\t\t}\n\t\t},\n\t\tdepth: {\n\t\t\tenable: function (c, p) {\n\t\t\t\treturn !p.overlay\n\t\t\t}\n\t\t},\n\t\tstencil: {enable: false},\n\t\tscissor: {\n\t\t\tenable: true,\n\t\t\tbox: regl.prop('viewport')\n\t\t},\n\t\tviewport: regl.prop('viewport')\n\t}\n\n\n\t// simplified rectangular line shader\n\tvar drawRectLine = regl(extend({\n\t\tvert: glslify([\"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;\\nuniform float thickness, pixelRatio, id, depth;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\n\\t// the order is important\\n\\treturn position * scale + translate\\n       + positionFract * scale + translateFract\\n       + position * scaleFract\\n       + positionFract * scaleFract;\\n}\\n\\nvoid main() {\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineOffset = lineTop * 2. - 1.;\\n\\n\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\n\\ttangent = normalize(diff * scale * viewport.zw);\\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\"]),\n\t\tfrag: glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\n\\nuniform float dashSize, 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) / dashSize) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\n\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),\n\n\t\tattributes: {\n\t\t\t// if point is at the end of segment\n\t\t\tlineEnd: {\n\t\t\t\tbuffer: offsetBuffer,\n\t\t\t\tdivisor: 0,\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t// if point is at the top of segment\n\t\t\tlineTop: {\n\t\t\t\tbuffer: offsetBuffer,\n\t\t\t\tdivisor: 0,\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 4\n\t\t\t},\n\t\t\t// beginning of line coordinate\n\t\t\taCoord: {\n\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 8,\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\t// end of line coordinate\n\t\t\tbCoord: {\n\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 16,\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\taCoordFract: {\n\t\t\t\tbuffer: regl.prop('positionFractBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 8,\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\tbCoordFract: {\n\t\t\t\tbuffer: regl.prop('positionFractBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 16,\n\t\t\t\tdivisor: 1\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tbuffer: regl.prop('colorBuffer'),\n\t\t\t\tstride: 4,\n\t\t\t\toffset: 0,\n\t\t\t\tdivisor: 1\n\t\t\t}\n\t\t}\n\t}, shaderOptions))\n\n\t// create regl draw\n\tvar drawMiterLine\n\n\ttry {\n\t\tdrawMiterLine = regl(extend({\n\t\t\t// culling removes polygon creasing\n\t\t\tcull: {\n\t\t\t\tenable: true,\n\t\t\t\tface: 'back'\n\t\t\t},\n\n\t\t\tvert: glslify([\"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;\\nuniform float thickness, pixelRatio, id, depth;\\nuniform vec4 viewport;\\nuniform float miterLimit, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 tangent;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nconst float REVERSE_THRESHOLD = -.875;\\nconst float MIN_DIFF = 1e-6;\\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// TODO: refactor to rectangular algorithm\\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\\n  vec2 adjustedScale;\\n  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\\n  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\\n\\n  vec2 scaleRatio = adjustedScale * viewport.zw;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineBot = 1. - lineTop;\\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 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\\t// FIXME: there should be more elegant solution\\n\\tvec2 prevTanDiff = abs(prevTangent - currTangent);\\n\\tvec2 nextTanDiff = abs(nextTangent - currTangent);\\n\\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\\n\\t\\tstartJoinDirection = currNormal;\\n\\t}\\n\\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\\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) * adjustedScale + translate;\\n\\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\\n\\n\\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\\n\\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\\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 * scaleRatio + translate * viewport.zw + viewport.xy;\\n\\tendCoord = bCoord * scaleRatio + translate * viewport.zw + 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 * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\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 * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\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 * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\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 * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n}\\n\"]),\n\t\t\tfrag: glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\nuniform float dashSize, 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) / dashSize) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\n\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),\n\n\t\t\tattributes: {\n\t\t\t\t// is line end\n\t\t\t\tlineEnd: {\n\t\t\t\t\tbuffer: offsetBuffer,\n\t\t\t\t\tdivisor: 0,\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 0\n\t\t\t\t},\n\t\t\t\t// is line top\n\t\t\t\tlineTop: {\n\t\t\t\t\tbuffer: offsetBuffer,\n\t\t\t\t\tdivisor: 0,\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 4\n\t\t\t\t},\n\t\t\t\t// left color\n\t\t\t\taColor: {\n\t\t\t\t\tbuffer: regl.prop('colorBuffer'),\n\t\t\t\t\tstride: 4,\n\t\t\t\t\toffset: 0,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t},\n\t\t\t\t// right color\n\t\t\t\tbColor: {\n\t\t\t\t\tbuffer: regl.prop('colorBuffer'),\n\t\t\t\t\tstride: 4,\n\t\t\t\t\toffset: 4,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t},\n\t\t\t\tprevCoord: {\n\t\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 0,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t},\n\t\t\t\taCoord: {\n\t\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 8,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t},\n\t\t\t\tbCoord: {\n\t\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 16,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t},\n\t\t\t\tnextCoord: {\n\t\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\t\tstride: 8,\n\t\t\t\t\toffset: 24,\n\t\t\t\t\tdivisor: 1\n\t\t\t\t}\n\t\t\t}\n\t\t}, shaderOptions))\n\t} catch (e) {\n\t\t// IE/bad Webkit fallback\n\t\tdrawMiterLine = drawRectLine\n\t}\n\n\t// fill shader\n\tvar drawFill = regl({\n\t\tprimitive: 'triangle',\n\t\telements: function (ctx, prop) { return prop.triangles; },\n\t\toffset: 0,\n\n\t\tvert: glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\n\\nuniform vec4 color;\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio, id;\\nuniform vec4 viewport;\\nuniform float opacity;\\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 * scale + translate\\n       + positionFract * scale + translateFract\\n       + position * scaleFract\\n       + positionFract * scaleFract;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n\\tfragColor.a *= opacity;\\n}\\n\"]),\n\t\tfrag: glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n\\tgl_FragColor = fragColor;\\n}\\n\"]),\n\n\t\tuniforms: {\n\t\t\tscale: regl.prop('scale'),\n\t\t\tcolor: regl.prop('fill'),\n\t\t\tscaleFract: regl.prop('scaleFract'),\n\t\t\ttranslateFract: regl.prop('translateFract'),\n\t\t\ttranslate: regl.prop('translate'),\n\t\t\topacity: regl.prop('opacity'),\n\t\t\tpixelRatio: regl.context('pixelRatio'),\n\t\t\tid: regl.prop('id'),\n\t\t\tviewport: function (ctx, prop) { return [prop.viewport.x, prop.viewport.y, ctx.viewportWidth, ctx.viewportHeight]; }\n\t\t},\n\n\t\tattributes: {\n\t\t\tposition: {\n\t\t\t\tbuffer: regl.prop('positionBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 8\n\t\t\t},\n\t\t\tpositionFract: {\n\t\t\t\tbuffer: regl.prop('positionFractBuffer'),\n\t\t\t\tstride: 8,\n\t\t\t\toffset: 8\n\t\t\t}\n\t\t},\n\n\t\tblend: shaderOptions.blend,\n\n\t\tdepth: { enable: false },\n\t\tscissor: shaderOptions.scissor,\n\t\tstencil: shaderOptions.stencil,\n\t\tviewport: shaderOptions.viewport\n\t})\n\n\treturn {\n\t\tfill: drawFill, rect: drawRectLine, miter: drawMiterLine\n\t}\n}\n\n\n// used to for new lines instances\nLine2D.defaults = {\n\tdashes: null,\n\tjoin: 'miter',\n\tmiterLimit: 1,\n\tthickness: 10,\n\tcap: 'square',\n\tcolor: 'black',\n\topacity: 1,\n\toverlay: false,\n\tviewport: null,\n\trange: null,\n\tclose: false,\n\tfill: null\n}\n\n\nLine2D.prototype.render = function () {\n\tvar ref;\n\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\tif (args.length) {\n\t\t(ref = this).update.apply(ref, args)\n\t}\n\n\tthis.draw()\n}\n\n\nLine2D.prototype.draw = function () {\n\tvar this$1 = this;\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\n\t// render multiple polylines via regl batch\n\t(args.length ? args : this.passes).forEach(function (s, i) {\n\t\tvar ref;\n\n\t\t// render array pass as a list of passes\n\t\tif (s && Array.isArray(s)) { return (ref = this$1).draw.apply(ref, s) }\n\n\t\tif (typeof s === 'number') { s = this$1.passes[s] }\n\n\t\tif (!(s && s.count > 1 && s.opacity)) { return }\n\n\t\tthis$1.regl._refresh()\n\n\t\tif (s.fill && s.triangles && s.triangles.length > 2) {\n\t\t\tthis$1.shaders.fill(s)\n\t\t}\n\n\t\tif (!s.thickness) { return }\n\n\t\t// high scale is only available for rect mode with precision\n\t\tif (s.scale[0] * s.viewport.width > Line2D.precisionThreshold || s.scale[1] * s.viewport.height > Line2D.precisionThreshold) {\n\t\t\tthis$1.shaders.rect(s)\n\t\t}\n\n\t\t// thin this.passes or too many points are rendered as simplified rect shader\n\t\telse if (s.join === 'rect' || (!s.join && (s.thickness <= 2 || s.count >= Line2D.maxPoints))) {\n\t\t\tthis$1.shaders.rect(s)\n\t\t}\n\t\telse {\n\t\t\tthis$1.shaders.miter(s)\n\t\t}\n\t})\n\n\treturn this\n}\n\nLine2D.prototype.update = function (options) {\n\tvar this$1 = this;\n\n\tif (!options) { return }\n\n\tif (options.length != null) {\n\t\tif (typeof options[0] === 'number') { options = [{positions: options}] }\n\t}\n\n\t// make options a batch\n\telse if (!Array.isArray(options)) { options = [options] }\n\n\tvar ref = this;\n\tvar regl = ref.regl;\n\tvar gl = ref.gl;\n\n\t// process per-line settings\n\toptions.forEach(function (o, i) {\n\t\tvar state = this$1.passes[i]\n\n\t\tif (o === undefined) { return }\n\n\t\t// null-argument removes pass\n\t\tif (o === null) {\n\t\t\tthis$1.passes[i] = null\n\t\t\treturn\n\t\t}\n\n\t\tif (typeof o[0] === 'number') { o = {positions: o} }\n\n\t\t// handle aliases\n\t\to = pick(o, {\n\t\t\tpositions: 'positions points data coords',\n\t\t\tthickness: 'thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth',\n\t\t\tjoin: 'lineJoin linejoin join type mode',\n\t\t\tmiterLimit: 'miterlimit miterLimit',\n\t\t\tdashes: 'dash dashes dasharray dash-array dashArray',\n\t\t\tcolor: 'color colour stroke colors colours stroke-color strokeColor',\n\t\t\tfill: 'fill fill-color fillColor',\n\t\t\topacity: 'alpha opacity',\n\t\t\toverlay: 'overlay crease overlap intersect',\n\t\t\tclose: 'closed close closed-path closePath',\n\t\t\trange: 'range dataBox',\n\t\t\tviewport: 'viewport viewBox',\n\t\t\thole: 'holes hole hollow'\n\t\t})\n\n\t\t// init state\n\t\tif (!state) {\n\t\t\tthis$1.passes[i] = state = {\n\t\t\t\tid: i,\n\t\t\t\tscale: null,\n\t\t\t\tscaleFract: null,\n\t\t\t\ttranslate: null,\n\t\t\t\ttranslateFract: null,\n\t\t\t\tcount: 0,\n\t\t\t\thole: [],\n\t\t\t\tdepth: 0,\n\n\t\t\t\tdashLength: 1,\n\t\t\t\tdashTexture: regl.texture({\n\t\t\t\t\tchannels: 1,\n\t\t\t\t\tdata: new Uint8Array([255]),\n\t\t\t\t\twidth: 1,\n\t\t\t\t\theight: 1,\n\t\t\t\t\tmag: 'linear',\n\t\t\t\t\tmin: 'linear'\n\t\t\t\t}),\n\n\t\t\t\tcolorBuffer: regl.buffer({\n\t\t\t\t\tusage: 'dynamic',\n\t\t\t\t\ttype: 'uint8',\n\t\t\t\t\tdata: new Uint8Array()\n\t\t\t\t}),\n\t\t\t\tpositionBuffer: regl.buffer({\n\t\t\t\t\tusage: 'dynamic',\n\t\t\t\t\ttype: 'float',\n\t\t\t\t\tdata: new Uint8Array()\n\t\t\t\t}),\n\t\t\t\tpositionFractBuffer: regl.buffer({\n\t\t\t\t\tusage: 'dynamic',\n\t\t\t\t\ttype: 'float',\n\t\t\t\t\tdata: new Uint8Array()\n\t\t\t\t})\n\t\t\t}\n\n\t\t\to = extend({}, Line2D.defaults, o)\n\t\t}\n\t\tif (o.thickness != null) { state.thickness = parseFloat(o.thickness) }\n\t\tif (o.opacity != null) { state.opacity = parseFloat(o.opacity) }\n\t\tif (o.miterLimit != null) { state.miterLimit = parseFloat(o.miterLimit) }\n\t\tif (o.overlay != null) {\n\t\t\tstate.overlay = !!o.overlay\n\t\t\tif (i < Line2D.maxLines) {\n\t\t\t\tstate.depth = 2 * (Line2D.maxLines - 1 - i % Line2D.maxLines) / Line2D.maxLines - 1.;\n\t\t\t}\n\t\t}\n\t\tif (o.join != null) { state.join = o.join }\n\t\tif (o.hole != null) { state.hole = o.hole }\n\t\tif (o.fill != null) { state.fill = !o.fill ? null : rgba(o.fill, 'uint8') }\n\t\tif (o.viewport != null) { state.viewport = parseRect(o.viewport) }\n\n\t\tif (!state.viewport) {\n\t\t\tstate.viewport = parseRect([\n\t\t\t\tgl.drawingBufferWidth,\n\t\t\t\tgl.drawingBufferHeight\n\t\t\t])\n\t\t}\n\n\t\tif (o.close != null) { state.close = o.close }\n\n\t\t// reset positions\n\t\tif (o.positions === null) { o.positions = [] }\n\t\tif (o.positions) {\n\t\t\tvar positions, count\n\n\t\t\t// if positions are an object with x/y\n\t\t\tif (o.positions.x && o.positions.y) {\n\t\t\t\tvar xPos = o.positions.x\n\t\t\t\tvar yPos = o.positions.y\n\t\t\t\tcount = state.count = Math.max(\n\t\t\t\t\txPos.length,\n\t\t\t\t\tyPos.length\n\t\t\t\t)\n\t\t\t\tpositions = new Float64Array(count * 2)\n\t\t\t\tfor (var i$1 = 0; i$1 < count; i$1++) {\n\t\t\t\t\tpositions[i$1 * 2] = xPos[i$1]\n\t\t\t\t\tpositions[i$1 * 2 + 1] = yPos[i$1]\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpositions = flatten(o.positions, 'float64')\n\t\t\t\tcount = state.count = Math.floor(positions.length / 2)\n\t\t\t}\n\n\t\t\tvar bounds = state.bounds = getBounds(positions, 2)\n\n\t\t\t// create fill positions\n\t\t\t// FIXME: fill positions can be set only along with positions\n\t\t\tif (state.fill) {\n\t\t\t\tvar pos = []\n\n\t\t\t\t// filter bad vertices and remap triangles to ensure shape\n\t\t\t\tvar ids = {}\n\t\t\t\tvar lastId = 0\n\n\t\t\t\tfor (var i$2 = 0, ptr = 0, l = state.count; i$2 < l; i$2++) {\n\t\t\t\t\tvar x = positions[i$2*2]\n\t\t\t\t\tvar y = positions[i$2*2 + 1]\n\t\t\t\t\tif (isNaN(x) || isNaN(y) || x == null || y == null) {\n\t\t\t\t\t\tx = positions[lastId*2]\n\t\t\t\t\t\ty = positions[lastId*2 + 1]\n\t\t\t\t\t\tids[i$2] = lastId\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlastId = i$2\n\t\t\t\t\t}\n\t\t\t\t\tpos[ptr++] = x\n\t\t\t\t\tpos[ptr++] = y\n\t\t\t\t}\n\n\t\t\t\tvar triangles = triangulate(pos, state.hole || [])\n\n\t\t\t\tfor (var i$3 = 0, l$1 = triangles.length; i$3 < l$1; i$3++) {\n\t\t\t\t\tif (ids[triangles[i$3]] != null) { triangles[i$3] = ids[triangles[i$3]] }\n\t\t\t\t}\n\n\t\t\t\tstate.triangles = triangles\n\t\t\t}\n\n\t\t\t// update position buffers\n\t\t\tvar npos = new Float64Array(positions)\n\t\t\tnormalize(npos, 2, bounds)\n\n\t\t\tvar positionData = new Float64Array(count * 2 + 6)\n\n\t\t\t// rotate first segment join\n\t\t\tif (state.close) {\n\t\t\t\tif (positions[0] === positions[count*2 - 2] &&\n\t\t\t\t\tpositions[1] === positions[count*2 - 1]) {\n\t\t\t\t\tpositionData[0] = npos[count*2 - 4]\n\t\t\t\t\tpositionData[1] = npos[count*2 - 3]\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpositionData[0] = npos[count*2 - 2]\n\t\t\t\t\tpositionData[1] = npos[count*2 - 1]\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpositionData[0] = npos[0]\n\t\t\t\tpositionData[1] = npos[1]\n\t\t\t}\n\n\t\t\tpositionData.set(npos, 2)\n\n\t\t\t// add last segment\n\t\t\tif (state.close) {\n\t\t\t\t// ignore coinciding start/end\n\t\t\t\tif (positions[0] === positions[count*2 - 2] &&\n\t\t\t\t\tpositions[1] === positions[count*2 - 1]) {\n\t\t\t\t\tpositionData[count*2 + 2] = npos[2]\n\t\t\t\t\tpositionData[count*2 + 3] = npos[3]\n\t\t\t\t\tstate.count -= 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpositionData[count*2 + 2] = npos[0]\n\t\t\t\t\tpositionData[count*2 + 3] = npos[1]\n\t\t\t\t\tpositionData[count*2 + 4] = npos[2]\n\t\t\t\t\tpositionData[count*2 + 5] = npos[3]\n\t\t\t\t}\n\t\t\t}\n\t\t\t// add stub\n\t\t\telse {\n\t\t\t\tpositionData[count*2 + 2] = npos[count*2 - 2]\n\t\t\t\tpositionData[count*2 + 3] = npos[count*2 - 1]\n\t\t\t\tpositionData[count*2 + 4] = npos[count*2 - 2]\n\t\t\t\tpositionData[count*2 + 5] = npos[count*2 - 1]\n\t\t\t}\n\n\t\t\tstate.positionBuffer(float32(positionData))\n\t\t\tstate.positionFractBuffer(fract32(positionData))\n\t\t}\n\n\t\tif (o.range) {\n\t\t\tstate.range = o.range\n\t\t} else if (!state.range) {\n\t\t\tstate.range = state.bounds\n\t\t}\n\n\t\tif ((o.range || o.positions) && state.count) {\n\t\t\tvar bounds$1 = state.bounds\n\n\t\t\tvar boundsW = bounds$1[2] - bounds$1[0],\n\t\t\t\tboundsH = bounds$1[3] - bounds$1[1]\n\n\t\t\tvar rangeW = state.range[2] - state.range[0],\n\t\t\t\trangeH = state.range[3] - state.range[1]\n\n\t\t\tstate.scale = [\n\t\t\t\tboundsW / rangeW,\n\t\t\t\tboundsH / rangeH\n\t\t\t]\n\t\t\tstate.translate = [\n\t\t\t\t-state.range[0] / rangeW + bounds$1[0] / rangeW || 0,\n\t\t\t\t-state.range[1] / rangeH + bounds$1[1] / rangeH || 0\n\t\t\t]\n\n\t\t\tstate.scaleFract = fract32(state.scale)\n\t\t\tstate.translateFract = fract32(state.translate)\n\t\t}\n\n\t\tif (o.dashes) {\n\t\t\tvar dashLength = 0., dashData\n\n\t\t\tif (!o.dashes || o.dashes.length < 2) {\n\t\t\t\tdashLength = 1.\n\t\t\t\tdashData = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255])\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tdashLength = 0.;\n\t\t\t\tfor(var i$4 = 0; i$4 < o.dashes.length; ++i$4) {\n\t\t\t\t\tdashLength += o.dashes[i$4]\n\t\t\t\t}\n\t\t\t\tdashData = new Uint8Array(dashLength * Line2D.dashMult)\n\t\t\t\tvar ptr$1 = 0\n\t\t\t\tvar fillColor = 255\n\n\t\t\t\t// repeat texture two times to provide smooth 0-step\n\t\t\t\tfor (var k = 0; k < 2; k++) {\n\t\t\t\t\tfor(var i$5 = 0; i$5 < o.dashes.length; ++i$5) {\n\t\t\t\t\t\tfor(var j = 0, l$2 = o.dashes[i$5] * Line2D.dashMult * .5; j < l$2; ++j) {\n\t\t\t\t\t\t\tdashData[ptr$1++] = fillColor\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfillColor ^= 255\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.dashLength = dashLength\n\t\t\tstate.dashTexture({\n\t\t\t\tchannels: 1,\n\t\t\t\tdata: dashData,\n\t\t\t\twidth: dashData.length,\n\t\t\t\theight: 1,\n\t\t\t\tmag: 'linear',\n\t\t\t\tmin: 'linear'\n\t\t\t}, 0, 0)\n\t\t}\n\n\t\tif (o.color) {\n\t\t\tvar count$1 = state.count\n\t\t\tvar colors = o.color\n\n\t\t\tif (!colors) { colors = 'transparent' }\n\n\t\t\tvar colorData = new Uint8Array(count$1 * 4 + 4)\n\n\t\t\t// convert colors to typed arrays\n\t\t\tif (!Array.isArray(colors) || typeof colors[0] === 'number') {\n\t\t\t\tvar c = rgba(colors, 'uint8')\n\n\t\t\t\tfor (var i$6 = 0; i$6 < count$1 + 1; i$6++) {\n\t\t\t\t\tcolorData.set(c, i$6 * 4)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var i$7 = 0; i$7 < count$1; i$7++) {\n\t\t\t\t\tvar c$1 = rgba(colors[i$7], 'uint8')\n\t\t\t\t\tcolorData.set(c$1, i$7 * 4)\n\t\t\t\t}\n\t\t\t\tcolorData.set(rgba(colors[0], 'uint8'), count$1 * 4)\n\t\t\t}\n\n\t\t\tstate.colorBuffer({\n\t\t\t\tusage: 'dynamic',\n\t\t\t\ttype: 'uint8',\n\t\t\t\tdata: colorData\n\t\t\t})\n\t\t}\n\t})\n\n\t// remove unmentioned passes\n\tif (options.length < this.passes.length) {\n\t\tfor (var i = options.length; i < this.passes.length; i++) {\n\t\t\tvar pass = this$1.passes[i]\n\t\t\tif (!pass) { continue }\n\t\t\tpass.colorBuffer.destroy()\n\t\t\tpass.positionBuffer.destroy()\n\t\t\tpass.dashTexture.destroy()\n\t\t}\n\t\tthis.passes.length = options.length\n\t}\n\n\t// remove null items\n\tvar passes = []\n\tfor (var i$1 = 0; i$1 < this.passes.length; i$1++) {\n\t\tif (this$1.passes[i$1] !== null) { passes.push(this$1.passes[i$1]) }\n\t}\n\tthis.passes = passes\n\n\treturn this\n}\n\nLine2D.prototype.destroy = function () {\n\tthis.passes.forEach(function (pass) {\n\t\tpass.colorBuffer.destroy()\n\t\tpass.positionBuffer.destroy()\n\t\tpass.dashTexture.destroy()\n\t})\n\n\tthis.passes.length = 0\n\n\treturn this\n}\n\n},{\"array-bounds\":58,\"array-normalize\":59,\"color-normalize\":113,\"earcut\":165,\"es6-weak-map\":219,\"flatten-vertex-data\":226,\"glslify\":404,\"object-assign\":449,\"parse-rect\":454,\"pick-by-alias\":460,\"to-float32\":525}],487:[function(_dereq_,module,exports){\n'use strict';\n\nfunction _slicedToArray(arr, i) {\n  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n    return arr2;\n  }\n}\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nvar rgba = _dereq_('color-normalize');\n\nvar getBounds = _dereq_('array-bounds');\n\nvar colorId = _dereq_('color-id');\n\nvar cluster = _dereq_('point-cluster');\n\nvar extend = _dereq_('object-assign');\n\nvar glslify = _dereq_('glslify');\n\nvar pick = _dereq_('pick-by-alias');\n\nvar updateDiff = _dereq_('update-diff');\n\nvar flatten = _dereq_('flatten-vertex-data');\n\nvar ie = _dereq_('is-iexplorer');\n\nvar f32 = _dereq_('to-float32');\n\nvar parseRect = _dereq_('parse-rect');\n\nvar scatter = Scatter;\n\nfunction Scatter(regl, options) {\n  var _this = this;\n\n  if (!(this instanceof Scatter)) return new Scatter(regl, options);\n\n  if (typeof regl === 'function') {\n    if (!options) options = {};\n    options.regl = regl;\n  } else {\n    options = regl;\n    regl = null;\n  }\n\n  if (options && options.length) options.positions = options;\n  regl = options.regl; // persistent variables\n\n  var gl = regl._gl,\n      paletteTexture,\n      palette = [],\n      paletteIds = {},\n      // state\n  groups = [],\n      // textures for marker keys\n  markerTextures = [null],\n      markerCache = [null];\n  var maxColors = 255,\n      maxSize = 100; // direct color buffer mode\n  // IE does not support palette anyways\n\n  this.tooManyColors = ie; // texture with color palette\n\n  paletteTexture = regl.texture({\n    data: new Uint8Array(maxColors * 4),\n    width: maxColors,\n    height: 1,\n    type: 'uint8',\n    format: 'rgba',\n    wrapS: 'clamp',\n    wrapT: 'clamp',\n    mag: 'nearest',\n    min: 'nearest'\n  });\n  extend(this, {\n    regl: regl,\n    gl: gl,\n    groups: groups,\n    markerCache: markerCache,\n    markerTextures: markerTextures,\n    palette: palette,\n    paletteIds: paletteIds,\n    paletteTexture: paletteTexture,\n    maxColors: maxColors,\n    maxSize: maxSize,\n    canvas: gl.canvas\n  });\n  this.update(options); // common shader options\n\n  var shaderOptions = {\n    uniforms: {\n      pixelRatio: regl.context('pixelRatio'),\n      palette: paletteTexture,\n      paletteSize: function paletteSize(ctx, prop) {\n        return [_this.tooManyColors ? 0 : maxColors, paletteTexture.height];\n      },\n      scale: regl.prop('scale'),\n      scaleFract: regl.prop('scaleFract'),\n      translate: regl.prop('translate'),\n      translateFract: regl.prop('translateFract'),\n      opacity: regl.prop('opacity'),\n      marker: regl.prop('markerTexture')\n    },\n    attributes: {\n      // FIXME: optimize these parts\n      x: function x(ctx, prop) {\n        return prop.xAttr || {\n          buffer: prop.positionBuffer,\n          stride: 8,\n          offset: 0\n        };\n      },\n      y: function y(ctx, prop) {\n        return prop.yAttr || {\n          buffer: prop.positionBuffer,\n          stride: 8,\n          offset: 4\n        };\n      },\n      xFract: function xFract(ctx, prop) {\n        return prop.xAttr ? {\n          constant: [0, 0]\n        } : {\n          buffer: prop.positionFractBuffer,\n          stride: 8,\n          offset: 0\n        };\n      },\n      yFract: function yFract(ctx, prop) {\n        return prop.yAttr ? {\n          constant: [0, 0]\n        } : {\n          buffer: prop.positionFractBuffer,\n          stride: 8,\n          offset: 4\n        };\n      },\n      size: function size(ctx, prop) {\n        return prop.size.length ? {\n          buffer: prop.sizeBuffer,\n          stride: 2,\n          offset: 0\n        } : {\n          constant: [Math.round(prop.size * 255 / _this.maxSize)]\n        };\n      },\n      borderSize: function borderSize(ctx, prop) {\n        return prop.borderSize.length ? {\n          buffer: prop.sizeBuffer,\n          stride: 2,\n          offset: 1\n        } : {\n          constant: [Math.round(prop.borderSize * 255 / _this.maxSize)]\n        };\n      },\n      colorId: function colorId(ctx, prop) {\n        return prop.color.length ? {\n          buffer: prop.colorBuffer,\n          stride: _this.tooManyColors ? 8 : 4,\n          offset: 0\n        } : {\n          constant: _this.tooManyColors ? palette.slice(prop.color * 4, prop.color * 4 + 4) : [prop.color]\n        };\n      },\n      borderColorId: function borderColorId(ctx, prop) {\n        return prop.borderColor.length ? {\n          buffer: prop.colorBuffer,\n          stride: _this.tooManyColors ? 8 : 4,\n          offset: _this.tooManyColors ? 4 : 2\n        } : {\n          constant: _this.tooManyColors ? palette.slice(prop.borderColor * 4, prop.borderColor * 4 + 4) : [prop.borderColor]\n        };\n      },\n      isActive: function isActive(ctx, prop) {\n        return prop.activation === true ? {\n          constant: [1]\n        } : prop.activation ? prop.activation : {\n          constant: [0]\n        };\n      }\n    },\n    blend: {\n      enable: true,\n      color: [0, 0, 0, 1],\n      // photoshop blending\n      func: {\n        srcRGB: 'src alpha',\n        dstRGB: 'one minus src alpha',\n        srcAlpha: 'one minus dst alpha',\n        dstAlpha: 'one'\n      }\n    },\n    scissor: {\n      enable: true,\n      box: regl.prop('viewport')\n    },\n    viewport: regl.prop('viewport'),\n    stencil: {\n      enable: false\n    },\n    depth: {\n      enable: false\n    },\n    elements: regl.prop('elements'),\n    count: regl.prop('count'),\n    offset: regl.prop('offset'),\n    primitive: 'points' // draw sdf-marker\n\n  };\n  var markerOptions = extend({}, shaderOptions);\n  markerOptions.frag = glslify([\"precision highp 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 * opacity);\\n  }\\n  else {\\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\\n}\\n\"]);\n  markerOptions.vert = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute float x, y, xFract, yFract;\\nattribute float size, borderSize;\\nattribute vec4 colorId, borderColorId;\\nattribute float isActive;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float maxSize = 100.;\\nconst float borderLevel = .5;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n  return isDirect ? id / 255. : texture2D(palette,\\n    vec2(\\n      (id.x + .5) / paletteSize.x,\\n      (id.y + .5) / paletteSize.y\\n    )\\n  );\\n}\\n\\nvoid main() {\\n  if (isActive == 0.) return;\\n\\n  vec2 position = vec2(x, y);\\n  vec2 positionFract = vec2(xFract, yFract);\\n\\n  vec4 color = getColor(colorId);\\n  vec4 borderColor = getColor(borderColorId);\\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  this.drawMarker = regl(markerOptions); // draw circle\n\n  var circleOptions = extend({}, shaderOptions);\n  circleOptions.frag = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\n\\nuniform float opacity;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat smoothStep(float edge0, float edge1, float x) {\\n\\tfloat t;\\n\\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\\n\\treturn t * t * (3.0 - 2.0 * t);\\n}\\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}\\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\"]);\n  circleOptions.vert = glslify([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute float x, y, xFract, yFract;\\nattribute float size, borderSize;\\nattribute vec4 colorId, borderColorId;\\nattribute float isActive;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\nuniform vec2 paletteSize;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n  return isDirect ? id / 255. : texture2D(palette,\\n    vec2(\\n      (id.x + .5) / paletteSize.x,\\n      (id.y + .5) / paletteSize.y\\n    )\\n  );\\n}\\n\\nvoid main() {\\n  // ignore inactive points\\n  if (isActive == 0.) return;\\n\\n  vec2 position = vec2(x, y);\\n  vec2 positionFract = vec2(xFract, yFract);\\n\\n  vec4 color = getColor(colorId);\\n  vec4 borderColor = getColor(borderColorId);\\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      + (positionFract + translateFract) * scale\\n      + (position + translate) * scaleFract\\n      + (positionFract + translateFract) * scaleFract;\\n\\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\\n  fragColor = color;\\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\\n  fragWidth = 1. / gl_PointSize;\\n}\\n\"]); // polyfill IE\n\n  if (ie) {\n    circleOptions.frag = circleOptions.frag.replace('smoothstep', 'smoothStep');\n    markerOptions.frag = markerOptions.frag.replace('smoothstep', 'smoothStep');\n  }\n\n  this.drawCircle = regl(circleOptions);\n} // single pass defaults\n\n\nScatter.defaults = {\n  color: 'black',\n  borderColor: 'transparent',\n  borderSize: 0,\n  size: 12,\n  opacity: 1,\n  marker: undefined,\n  viewport: null,\n  range: null,\n  pixelSize: null,\n  count: 0,\n  offset: 0,\n  bounds: null,\n  positions: [],\n  snap: 1e4 // update & redraw\n\n};\n\nScatter.prototype.render = function () {\n  if (arguments.length) {\n    this.update.apply(this, arguments);\n  }\n\n  this.draw();\n  return this;\n}; // draw all groups or only indicated ones\n\n\nScatter.prototype.draw = function () {\n  var _this2 = this;\n\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  var groups = this.groups; // if directly array passed - treat as passes\n\n  if (args.length === 1 && Array.isArray(args[0]) && (args[0][0] === null || Array.isArray(args[0][0]))) {\n    args = args[0];\n  } // FIXME: remove once https://github.com/regl-project/regl/issues/474 resolved\n\n\n  this.regl._refresh();\n\n  if (args.length) {\n    for (var i = 0; i < args.length; i++) {\n      this.drawItem(i, args[i]);\n    }\n  } // draw all passes\n  else {\n      groups.forEach(function (group, i) {\n        _this2.drawItem(i);\n      });\n    }\n\n  return this;\n}; // draw specific scatter group\n\n\nScatter.prototype.drawItem = function (id, els) {\n  var groups = this.groups;\n  var group = groups[id]; // debug viewport\n  // let { viewport } = group\n  // gl.enable(gl.SCISSOR_TEST);\n  // gl.scissor(viewport.x, viewport.y, viewport.width, viewport.height);\n  // gl.clearColor(0, 0, 0, .5);\n  // gl.clear(gl.COLOR_BUFFER_BIT);\n\n  if (typeof els === 'number') {\n    id = els;\n    group = groups[els];\n    els = null;\n  }\n\n  if (!(group && group.count && group.opacity)) return; // draw circles\n\n  if (group.activation[0]) {\n    // TODO: optimize this performance by making groups and regl.this props\n    this.drawCircle(this.getMarkerDrawOptions(0, group, els));\n  } // draw all other available markers\n\n\n  var batch = [];\n\n  for (var i = 1; i < group.activation.length; i++) {\n    if (!group.activation[i] || group.activation[i] !== true && !group.activation[i].data.length) continue;\n    batch.push.apply(batch, _toConsumableArray(this.getMarkerDrawOptions(i, group, els)));\n  }\n\n  if (batch.length) {\n    this.drawMarker(batch);\n  }\n}; // get options for the marker ids\n\n\nScatter.prototype.getMarkerDrawOptions = function (markerId, group, elements) {\n  var range = group.range,\n      tree = group.tree,\n      viewport = group.viewport,\n      activation = group.activation,\n      selectionBuffer = group.selectionBuffer,\n      count = group.count;\n  var regl = this.regl; // direct points\n\n  if (!tree) {\n    // if elements array - draw unclustered points\n    if (elements) {\n      return [extend({}, group, {\n        markerTexture: this.markerTextures[markerId],\n        activation: activation[markerId],\n        count: elements.length,\n        elements: elements,\n        offset: 0\n      })];\n    }\n\n    return [extend({}, group, {\n      markerTexture: this.markerTextures[markerId],\n      activation: activation[markerId],\n      offset: 0\n    })];\n  } // clustered points\n\n\n  var batch = [];\n  var lod = tree.range(range, {\n    lod: true,\n    px: [(range[2] - range[0]) / viewport.width, (range[3] - range[1]) / viewport.height]\n  }); // enable elements by using selection buffer\n\n  if (elements) {\n    var markerActivation = activation[markerId];\n    var mask = markerActivation.data;\n    var data = new Uint8Array(count);\n\n    for (var i = 0; i < elements.length; i++) {\n      var id = elements[i];\n      data[id] = mask ? mask[id] : 1;\n    }\n\n    selectionBuffer.subdata(data);\n  }\n\n  for (var l = lod.length; l--;) {\n    var _lod$l = _slicedToArray(lod[l], 2),\n        from = _lod$l[0],\n        to = _lod$l[1];\n\n    batch.push(extend({}, group, {\n      markerTexture: this.markerTextures[markerId],\n      activation: elements ? selectionBuffer : activation[markerId],\n      offset: from,\n      count: to - from\n    }));\n  }\n\n  return batch;\n}; // update groups options\n\n\nScatter.prototype.update = function () {\n  var _this3 = this;\n\n  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    args[_key2] = arguments[_key2];\n  }\n\n  if (!args.length) return; // passes are as single array\n\n  if (args.length === 1 && Array.isArray(args[0])) args = args[0];\n  var groups = this.groups,\n      gl = this.gl,\n      regl = this.regl,\n      maxSize = this.maxSize,\n      maxColors = this.maxColors,\n      palette = this.palette;\n  this.groups = groups = args.map(function (options, i) {\n    var group = groups[i];\n    if (options === undefined) return group;\n    if (options === null) options = {\n      positions: null\n    };else if (typeof options === 'function') options = {\n      ondraw: options\n    };else if (typeof options[0] === 'number') options = {\n      positions: options // copy options to avoid mutation & handle aliases\n\n    };\n    options = pick(options, {\n      positions: 'positions data points',\n      snap: 'snap cluster lod tree',\n      size: 'sizes size radius',\n      borderSize: 'borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline',\n      color: 'colors color fill fill-color fillColor',\n      borderColor: 'borderColors borderColor stroke stroke-color strokeColor',\n      marker: 'markers marker shape',\n      range: 'range dataBox databox',\n      viewport: 'viewport viewPort viewBox viewbox',\n      opacity: 'opacity alpha transparency',\n      bounds: 'bound bounds boundaries limits',\n      tooManyColors: 'tooManyColors palette paletteMode optimizePalette enablePalette'\n    });\n    if (options.positions === null) options.positions = [];\n    if (options.tooManyColors != null) _this3.tooManyColors = options.tooManyColors;\n\n    if (!group) {\n      groups[i] = group = {\n        id: i,\n        scale: null,\n        translate: null,\n        scaleFract: null,\n        translateFract: null,\n        // buffers for active markers\n        activation: [],\n        // buffer for filtered markers\n        selectionBuffer: regl.buffer({\n          data: new Uint8Array(0),\n          usage: 'stream',\n          type: 'uint8'\n        }),\n        // buffers with data: it is faster to switch them per-pass\n        // than provide one congregate buffer\n        sizeBuffer: regl.buffer({\n          data: new Uint8Array(0),\n          usage: 'dynamic',\n          type: 'uint8'\n        }),\n        colorBuffer: regl.buffer({\n          data: new Uint8Array(0),\n          usage: 'dynamic',\n          type: 'uint8'\n        }),\n        positionBuffer: regl.buffer({\n          data: new Uint8Array(0),\n          usage: 'dynamic',\n          type: 'float'\n        }),\n        positionFractBuffer: regl.buffer({\n          data: new Uint8Array(0),\n          usage: 'dynamic',\n          type: 'float'\n        })\n      };\n      options = extend({}, Scatter.defaults, options);\n    } // force update triggers\n\n\n    if (options.positions && !('marker' in options)) {\n      options.marker = group.marker;\n      delete group.marker;\n    } // updating markers cause recalculating snapping\n\n\n    if (options.marker && !('positions' in options)) {\n      options.positions = group.positions;\n      delete group.positions;\n    } // global count of points\n\n\n    var hasSize = 0,\n        hasColor = 0;\n    updateDiff(group, options, [{\n      snap: true,\n      size: function size(s, group) {\n        if (s == null) s = Scatter.defaults.size;\n        hasSize += s && s.length ? 1 : 0;\n        return s;\n      },\n      borderSize: function borderSize(s, group) {\n        if (s == null) s = Scatter.defaults.borderSize;\n        hasSize += s && s.length ? 1 : 0;\n        return s;\n      },\n      opacity: parseFloat,\n      // add colors to palette, save references\n      color: function color(c, group) {\n        if (c == null) c = Scatter.defaults.color;\n        c = _this3.updateColor(c);\n        hasColor++;\n        return c;\n      },\n      borderColor: function borderColor(c, group) {\n        if (c == null) c = Scatter.defaults.borderColor;\n        c = _this3.updateColor(c);\n        hasColor++;\n        return c;\n      },\n      bounds: function bounds(_bounds, group, options) {\n        if (!('range' in options)) options.range = null;\n        return _bounds;\n      },\n      positions: function positions(_positions, group, options) {\n        var snap = group.snap;\n        var positionBuffer = group.positionBuffer,\n            positionFractBuffer = group.positionFractBuffer,\n            selectionBuffer = group.selectionBuffer; // separate buffers for x/y coordinates\n\n        if (_positions.x || _positions.y) {\n          if (_positions.x.length) {\n            group.xAttr = {\n              buffer: regl.buffer(_positions.x),\n              offset: 0,\n              stride: 4,\n              count: _positions.x.length\n            };\n          } else {\n            group.xAttr = {\n              buffer: _positions.x.buffer,\n              offset: _positions.x.offset * 4 || 0,\n              stride: (_positions.x.stride || 1) * 4,\n              count: _positions.x.count\n            };\n          }\n\n          if (_positions.y.length) {\n            group.yAttr = {\n              buffer: regl.buffer(_positions.y),\n              offset: 0,\n              stride: 4,\n              count: _positions.y.length\n            };\n          } else {\n            group.yAttr = {\n              buffer: _positions.y.buffer,\n              offset: _positions.y.offset * 4 || 0,\n              stride: (_positions.y.stride || 1) * 4,\n              count: _positions.y.count\n            };\n          }\n\n          group.count = Math.max(group.xAttr.count, group.yAttr.count);\n          return _positions;\n        }\n\n        _positions = flatten(_positions, 'float64');\n        var count = group.count = Math.floor(_positions.length / 2);\n        var bounds = group.bounds = count ? getBounds(_positions, 2) : null; // if range is not provided updated - recalc it\n\n        if (!options.range && !group.range) {\n          delete group.range;\n          options.range = bounds;\n        } // reset marker\n\n\n        if (!options.marker && !group.marker) {\n          delete group.marker;\n          options.marker = null;\n        } // build cluster tree if required\n\n\n        if (snap && (snap === true || count > snap)) {\n          group.tree = cluster(_positions, {\n            bounds: bounds\n          });\n        } // existing tree instance\n        else if (snap && snap.length) {\n            group.tree = snap;\n          }\n\n        if (group.tree) {\n          var opts = {\n            primitive: 'points',\n            usage: 'static',\n            data: group.tree,\n            type: 'uint32'\n          };\n          if (group.elements) group.elements(opts);else group.elements = regl.elements(opts);\n        } // update position buffers\n\n\n        positionBuffer({\n          data: f32.float(_positions),\n          usage: 'dynamic'\n        });\n        positionFractBuffer({\n          data: f32.fract(_positions),\n          usage: 'dynamic'\n        }); // expand selectionBuffer\n\n        selectionBuffer({\n          data: new Uint8Array(count),\n          type: 'uint8',\n          usage: 'stream'\n        });\n        return _positions;\n      }\n    }, {\n      // create marker ids corresponding to known marker textures\n      marker: function marker(markers, group, options) {\n        var activation = group.activation; // reset marker elements\n\n        activation.forEach(function (buffer) {\n          return buffer && buffer.destroy && buffer.destroy();\n        });\n        activation.length = 0; // single sdf marker\n\n        if (!markers || typeof markers[0] === 'number') {\n          var id = _this3.addMarker(markers);\n\n          activation[id] = true;\n        } // per-point markers use mask buffers to enable markers in vert shader\n        else {\n            var markerMasks = [];\n\n            for (var _i = 0, l = Math.min(markers.length, group.count); _i < l; _i++) {\n              var _id = _this3.addMarker(markers[_i]);\n\n              if (!markerMasks[_id]) markerMasks[_id] = new Uint8Array(group.count); // enable marker by default\n\n              markerMasks[_id][_i] = 1;\n            }\n\n            for (var _id2 = 0; _id2 < markerMasks.length; _id2++) {\n              if (!markerMasks[_id2]) continue;\n              var opts = {\n                data: markerMasks[_id2],\n                type: 'uint8',\n                usage: 'static'\n              };\n\n              if (!activation[_id2]) {\n                activation[_id2] = regl.buffer(opts);\n              } else {\n                activation[_id2](opts);\n              }\n\n              activation[_id2].data = markerMasks[_id2];\n            }\n          }\n\n        return markers;\n      },\n      range: function range(_range, group, options) {\n        var bounds = group.bounds; // FIXME: why do we need this?\n\n        if (!bounds) return;\n        if (!_range) _range = bounds;\n        group.scale = [1 / (_range[2] - _range[0]), 1 / (_range[3] - _range[1])];\n        group.translate = [-_range[0], -_range[1]];\n        group.scaleFract = f32.fract(group.scale);\n        group.translateFract = f32.fract(group.translate);\n        return _range;\n      },\n      viewport: function viewport(vp) {\n        var rect = parseRect(vp || [gl.drawingBufferWidth, gl.drawingBufferHeight]); // normalize viewport to the canvas coordinates\n        // rect.y = gl.drawingBufferHeight - rect.height - rect.y\n\n        return rect;\n      }\n    }]); // update size buffer, if needed\n\n    if (hasSize) {\n      var _group = group,\n          count = _group.count,\n          size = _group.size,\n          borderSize = _group.borderSize,\n          sizeBuffer = _group.sizeBuffer;\n      var sizes = new Uint8Array(count * 2);\n\n      if (size.length || borderSize.length) {\n        for (var _i2 = 0; _i2 < count; _i2++) {\n          // we downscale size to allow for fractions\n          sizes[_i2 * 2] = Math.round((size[_i2] == null ? size : size[_i2]) * 255 / maxSize);\n          sizes[_i2 * 2 + 1] = Math.round((borderSize[_i2] == null ? borderSize : borderSize[_i2]) * 255 / maxSize);\n        }\n      }\n\n      sizeBuffer({\n        data: sizes,\n        usage: 'dynamic'\n      });\n    } // update color buffer if needed\n\n\n    if (hasColor) {\n      var _group2 = group,\n          _count = _group2.count,\n          color = _group2.color,\n          borderColor = _group2.borderColor,\n          colorBuffer = _group2.colorBuffer;\n      var colors; // if too many colors - put colors to buffer directly\n\n      if (_this3.tooManyColors) {\n        if (color.length || borderColor.length) {\n          colors = new Uint8Array(_count * 8);\n\n          for (var _i3 = 0; _i3 < _count; _i3++) {\n            var _colorId = color[_i3];\n            colors[_i3 * 8] = palette[_colorId * 4];\n            colors[_i3 * 8 + 1] = palette[_colorId * 4 + 1];\n            colors[_i3 * 8 + 2] = palette[_colorId * 4 + 2];\n            colors[_i3 * 8 + 3] = palette[_colorId * 4 + 3];\n            var borderColorId = borderColor[_i3];\n            colors[_i3 * 8 + 4] = palette[borderColorId * 4];\n            colors[_i3 * 8 + 5] = palette[borderColorId * 4 + 1];\n            colors[_i3 * 8 + 6] = palette[borderColorId * 4 + 2];\n            colors[_i3 * 8 + 7] = palette[borderColorId * 4 + 3];\n          }\n        }\n      } // if limited amount of colors - keep palette color picking\n      // that saves significant memory\n      else {\n          if (color.length || borderColor.length) {\n            // we need slight data increase by 2 due to vec4 borderId in shader\n            colors = new Uint8Array(_count * 4 + 2);\n\n            for (var _i4 = 0; _i4 < _count; _i4++) {\n              // put color coords in palette texture\n              if (color[_i4] != null) {\n                colors[_i4 * 4] = color[_i4] % maxColors;\n                colors[_i4 * 4 + 1] = Math.floor(color[_i4] / maxColors);\n              }\n\n              if (borderColor[_i4] != null) {\n                colors[_i4 * 4 + 2] = borderColor[_i4] % maxColors;\n                colors[_i4 * 4 + 3] = Math.floor(borderColor[_i4] / maxColors);\n              }\n            }\n          }\n        }\n\n      colorBuffer({\n        data: colors || new Uint8Array(0),\n        type: 'uint8',\n        usage: 'dynamic'\n      });\n    }\n\n    return group;\n  });\n}; // get (and create) marker texture id\n\n\nScatter.prototype.addMarker = function (sdf) {\n  var markerTextures = this.markerTextures,\n      regl = this.regl,\n      markerCache = this.markerCache;\n  var pos = sdf == null ? 0 : markerCache.indexOf(sdf);\n  if (pos >= 0) return pos; // convert sdf to 0..255 range\n\n  var distArr;\n\n  if (sdf instanceof Uint8Array || sdf instanceof Uint8ClampedArray) {\n    distArr = sdf;\n  } else {\n    distArr = new Uint8Array(sdf.length);\n\n    for (var i = 0, l = sdf.length; i < l; i++) {\n      distArr[i] = sdf[i] * 255;\n    }\n  }\n\n  var radius = Math.floor(Math.sqrt(distArr.length));\n  pos = markerTextures.length;\n  markerCache.push(sdf);\n  markerTextures.push(regl.texture({\n    channels: 1,\n    data: distArr,\n    radius: radius,\n    mag: 'linear',\n    min: 'linear'\n  }));\n  return pos;\n}; // register color to palette, return it's index or list of indexes\n\n\nScatter.prototype.updateColor = function (colors) {\n  var paletteIds = this.paletteIds,\n      palette = this.palette,\n      maxColors = this.maxColors;\n\n  if (!Array.isArray(colors)) {\n    colors = [colors];\n  }\n\n  var idx = []; // if color groups - flatten them\n\n  if (typeof colors[0] === 'number') {\n    var grouped = [];\n\n    if (Array.isArray(colors)) {\n      for (var i = 0; i < colors.length; i += 4) {\n        grouped.push(colors.slice(i, i + 4));\n      }\n    } else {\n      for (var _i5 = 0; _i5 < colors.length; _i5 += 4) {\n        grouped.push(colors.subarray(_i5, _i5 + 4));\n      }\n    }\n\n    colors = grouped;\n  }\n\n  for (var _i6 = 0; _i6 < colors.length; _i6++) {\n    var color = colors[_i6];\n    color = rgba(color, 'uint8');\n    var id = colorId(color, false); // if new color - save it\n\n    if (paletteIds[id] == null) {\n      var pos = palette.length;\n      paletteIds[id] = Math.floor(pos / 4);\n      palette[pos] = color[0];\n      palette[pos + 1] = color[1];\n      palette[pos + 2] = color[2];\n      palette[pos + 3] = color[3];\n    }\n\n    idx[_i6] = paletteIds[id];\n  } // detect if too many colors in palette\n\n\n  if (!this.tooManyColors && palette.length > maxColors * 4) this.tooManyColors = true; // limit max color\n\n  this.updatePalette(palette); // keep static index for single-color property\n\n  return idx.length === 1 ? idx[0] : idx;\n};\n\nScatter.prototype.updatePalette = function (palette) {\n  if (this.tooManyColors) return;\n  var maxColors = this.maxColors,\n      paletteTexture = this.paletteTexture;\n  var requiredHeight = Math.ceil(palette.length * .25 / maxColors); // pad data\n\n  if (requiredHeight > 1) {\n    palette = palette.slice();\n\n    for (var i = palette.length * .25 % maxColors; i < requiredHeight * maxColors; i++) {\n      palette.push(0, 0, 0, 0);\n    }\n  } // ensure height\n\n\n  if (paletteTexture.height < requiredHeight) {\n    paletteTexture.resize(maxColors, requiredHeight);\n  } // update full data\n\n\n  paletteTexture.subimage({\n    width: Math.min(palette.length * .25, maxColors),\n    height: requiredHeight,\n    data: palette\n  }, 0, 0);\n}; // remove unused stuff\n\n\nScatter.prototype.destroy = function () {\n  this.groups.forEach(function (group) {\n    group.sizeBuffer.destroy();\n    group.positionBuffer.destroy();\n    group.positionFractBuffer.destroy();\n    group.colorBuffer.destroy();\n    group.activation.forEach(function (b) {\n      return b && b.destroy && b.destroy();\n    });\n    group.selectionBuffer.destroy();\n    if (group.elements) group.elements.destroy();\n  });\n  this.groups.length = 0;\n  this.paletteTexture.destroy();\n  this.markerTextures.forEach(function (txt) {\n    return txt && txt.destroy && txt.destroy();\n  });\n  return this;\n};\n\nvar extend$1 = _dereq_('object-assign');\n\nvar reglScatter2d = function reglScatter2d(regl, options) {\n  var scatter$$1 = new scatter(regl, options);\n  var render = scatter$$1.render.bind(scatter$$1); // expose API\n\n  extend$1(render, {\n    render: render,\n    update: scatter$$1.update.bind(scatter$$1),\n    draw: scatter$$1.draw.bind(scatter$$1),\n    destroy: scatter$$1.destroy.bind(scatter$$1),\n    regl: scatter$$1.regl,\n    gl: scatter$$1.gl,\n    canvas: scatter$$1.gl.canvas,\n    groups: scatter$$1.groups,\n    markers: scatter$$1.markerCache,\n    palette: scatter$$1.palette\n  });\n  return render;\n};\n\nmodule.exports = reglScatter2d;\n\n},{\"array-bounds\":58,\"color-id\":111,\"color-normalize\":113,\"flatten-vertex-data\":226,\"glslify\":404,\"is-iexplorer\":414,\"object-assign\":449,\"parse-rect\":454,\"pick-by-alias\":460,\"point-cluster\":464,\"to-float32\":525,\"update-diff\":536}],488:[function(_dereq_,module,exports){\n'use strict'\n\n\nvar createScatter = _dereq_('regl-scatter2d')\nvar pick = _dereq_('pick-by-alias')\nvar getBounds = _dereq_('array-bounds')\nvar raf = _dereq_('raf')\nvar arrRange = _dereq_('array-range')\nvar rect = _dereq_('parse-rect')\nvar flatten = _dereq_('flatten-vertex-data')\n\n\nmodule.exports = SPLOM\n\n\n// @constructor\nfunction SPLOM (regl, options) {\n\tif (!(this instanceof SPLOM)) { return new SPLOM(regl, options) }\n\n\t// render passes\n\tthis.traces = []\n\n\t// passes for scatter, combined across traces\n\tthis.passes = {}\n\n\tthis.regl = regl\n\n\t// main scatter drawing instance\n\tthis.scatter = createScatter(regl)\n\n\tthis.canvas = this.scatter.canvas\n}\n\n\n// update & draw passes once per frame\nSPLOM.prototype.render = function () {\n\tvar this$1 = this;\n\tvar ref;\n\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\tif (args.length) {\n\t\t(ref = this).update.apply(ref, args)\n\t}\n\n\tif (this.regl.attributes.preserveDrawingBuffer) { return this.draw() }\n\n\t// make sure draw is not called more often than once a frame\n\tif (this.dirty) {\n\t\tif (this.planned == null) {\n\t\t\tthis.planned = raf(function () {\n\t\t\t\tthis$1.draw()\n\t\t\t\tthis$1.dirty = true\n\t\t\t\tthis$1.planned = null\n\t\t\t})\n\t\t}\n\t}\n\telse {\n\t\tthis.draw()\n\t\tthis.dirty = true\n\t\traf(function () {\n\t\t\tthis$1.dirty = false\n\t\t})\n\t}\n\n\treturn this\n}\n\n\n// update passes\nSPLOM.prototype.update = function () {\n\tvar this$1 = this;\n\tvar ref;\n\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\tif (!args.length) { return }\n\n\tfor (var i = 0; i < args.length; i++) {\n\t\tthis$1.updateItem(i, args[i])\n\t}\n\n\t// remove nulled passes\n\tthis.traces = this.traces.filter(Boolean)\n\n\t// FIXME: update passes independently\n\tvar passes = []\n\tvar offset = 0\n\tfor (var i$1 = 0; i$1 < this.traces.length; i$1++) {\n\t\tvar trace = this$1.traces[i$1]\n\t\tvar tracePasses = this$1.traces[i$1].passes\n\t\tfor (var j = 0; j < tracePasses.length; j++) {\n\t\t\tpasses.push(this$1.passes[tracePasses[j]])\n\t\t}\n\t\t// save offset of passes\n\t\ttrace.passOffset = offset\n\t\toffset += trace.passes.length\n\t}\n\n\t(ref = this.scatter).update.apply(ref, passes)\n\n\treturn this\n}\n\n\n// update trace by index, not supposed to be called directly\nSPLOM.prototype.updateItem = function (i, options) {\n\tvar this$1 = this;\n\n\tvar ref = this;\n\tvar regl = ref.regl;\n\n\t// remove pass if null\n\tif (options === null) {\n\t\tthis.traces[i] = null\n\t\treturn this\n\t}\n\n\tif (!options) { return this }\n\n\tvar o = pick(options, {\n\t\tdata: 'data items columns rows values dimensions samples x',\n\t\tsnap: 'snap cluster',\n\t\tsize: 'sizes size radius',\n\t\tcolor: 'colors color fill fill-color fillColor',\n\t\topacity: 'opacity alpha transparency opaque',\n\t\tborderSize: 'borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline',\n\t\tborderColor: 'borderColors borderColor bordercolor stroke stroke-color strokeColor',\n\t\tmarker: 'markers marker shape',\n\t\trange: 'range ranges databox dataBox',\n\t\tviewport: 'viewport viewBox viewbox',\n\t\tdomain: 'domain domains area areas',\n\t\tpadding: 'pad padding paddings pads margin margins',\n\t\ttranspose: 'transpose transposed',\n\t\tdiagonal: 'diagonal diag showDiagonal',\n\t\tupper: 'upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf',\n\t\tlower: 'lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower'\n\t})\n\n\t// we provide regl buffer per-trace, since trace data can be changed\n\tvar trace = (this.traces[i] || (this.traces[i] = {\n\t\tid: i,\n\t\tbuffer: regl.buffer({\n\t\t\tusage: 'dynamic',\n\t\t\ttype: 'float',\n\t\t\tdata: new Uint8Array()\n\t\t}),\n\t\tcolor: 'black',\n\t\tmarker: null,\n\t\tsize: 12,\n\t\tborderColor: 'transparent',\n\t\tborderSize: 1,\n\t\tviewport:  rect([regl._gl.drawingBufferWidth, regl._gl.drawingBufferHeight]),\n\t\tpadding: [0, 0, 0, 0],\n\t\topacity: 1,\n\t\tdiagonal: true,\n\t\tupper: true,\n\t\tlower: true\n\t}))\n\n\n\t// save styles\n\tif (o.color != null) {\n\t\ttrace.color = o.color\n\t}\n\tif (o.size != null) {\n\t\ttrace.size = o.size\n\t}\n\tif (o.marker != null) {\n\t\ttrace.marker = o.marker\n\t}\n\tif (o.borderColor != null) {\n\t\ttrace.borderColor = o.borderColor\n\t}\n\tif (o.borderSize != null) {\n\t\ttrace.borderSize = o.borderSize\n\t}\n\tif (o.opacity != null) {\n\t\ttrace.opacity = o.opacity\n\t}\n\tif (o.viewport) {\n\t\ttrace.viewport = rect(o.viewport)\n\t}\n\tif (o.diagonal != null) { trace.diagonal = o.diagonal }\n\tif (o.upper != null) { trace.upper = o.upper }\n\tif (o.lower != null) { trace.lower = o.lower }\n\n\t// put flattened data into buffer\n\tif (o.data) {\n\t\ttrace.buffer(flatten(o.data))\n\t\ttrace.columns = o.data.length\n\t\ttrace.count = o.data[0].length\n\n\t\t// detect bounds per-column\n\t\ttrace.bounds = []\n\n\t\tfor (var i$1 = 0; i$1 < trace.columns; i$1++) {\n\t\t\ttrace.bounds[i$1] = getBounds(o.data[i$1], 1)\n\t\t}\n\t}\n\n\t// add proper range updating markers\n\tvar multirange\n\tif (o.range) {\n\t\ttrace.range = o.range\n\t\tmultirange = trace.range && typeof trace.range[0] !== 'number'\n\t}\n\n\tif (o.domain) {\n\t\ttrace.domain = o.domain\n\t}\n\tvar multipadding = false\n\tif (o.padding != null) {\n\t\t// multiple paddings\n\t\tif (Array.isArray(o.padding) && o.padding.length === trace.columns && typeof o.padding[o.padding.length - 1] === 'number') {\n\t\t\ttrace.padding = o.padding.map(getPad)\n\t\t\tmultipadding = true\n\t\t}\n\t\t// single padding\n\t\telse {\n\t\t\ttrace.padding = getPad(o.padding)\n\t\t}\n\t}\n\n\t// create passes\n\tvar m = trace.columns\n\tvar n = trace.count\n\n\tvar w = trace.viewport.width\n\tvar h = trace.viewport.height\n\tvar left = trace.viewport.x\n\tvar top = trace.viewport.y\n\tvar iw = w / m\n\tvar ih = h / m\n\n\ttrace.passes = []\n\n\tfor (var i$2 = 0; i$2 < m; i$2++) {\n\t\tfor (var j = 0; j < m; j++) {\n\t\t\tif (!trace.diagonal && j === i$2) { continue }\n\t\t\tif (!trace.upper && i$2 > j) { continue }\n\t\t\tif (!trace.lower && i$2 < j) { continue }\n\n\t\t\tvar key = passId(trace.id, i$2, j)\n\n\t\t\tvar pass = this$1.passes[key] || (this$1.passes[key] = {})\n\n\t\t\tif (o.data) {\n\t\t\t\tif (o.transpose) {\n\t\t\t\t\tpass.positions = {\n\t\t\t\t\t\tx: {buffer: trace.buffer, offset: j, count: n, stride: m},\n\t\t\t\t\t\ty: {buffer: trace.buffer, offset: i$2, count: n, stride: m}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpass.positions = {\n\t\t\t\t\t\tx: {buffer: trace.buffer, offset: j * n, count: n},\n\t\t\t\t\t\ty: {buffer: trace.buffer, offset: i$2 * n, count: n}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpass.bounds = getBox(trace.bounds, i$2, j)\n\t\t\t}\n\n\t\t\tif (o.domain || o.viewport || o.data) {\n\t\t\t\tvar pad = multipadding ? getBox(trace.padding, i$2, j) : trace.padding\n\t\t\t\tif (trace.domain) {\n\t\t\t\t\tvar ref$1 = getBox(trace.domain, i$2, j);\n\t\t\t\t\tvar lox = ref$1[0];\n\t\t\t\t\tvar loy = ref$1[1];\n\t\t\t\t\tvar hix = ref$1[2];\n\t\t\t\t\tvar hiy = ref$1[3];\n\n\t\t\t\t\tpass.viewport = [\n\t\t\t\t\t\tleft + lox * w + pad[0],\n\t\t\t\t\t\ttop + loy * h + pad[1],\n\t\t\t\t\t\tleft + hix * w - pad[2],\n\t\t\t\t\t\ttop + hiy * h - pad[3]\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\t// consider auto-domain equipartial\n\t\t\t\telse {\n\t\t\t\t\tpass.viewport = [\n\t\t\t\t\t\tleft + j * iw + iw * pad[0],\n\t\t\t\t\t\ttop + i$2 * ih + ih * pad[1],\n\t\t\t\t\t\tleft + (j + 1) * iw - iw * pad[2],\n\t\t\t\t\t\ttop + (i$2 + 1) * ih - ih * pad[3]\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (o.color) { pass.color = trace.color }\n\t\t\tif (o.size) { pass.size = trace.size }\n\t\t\tif (o.marker) { pass.marker = trace.marker }\n\t\t\tif (o.borderSize) { pass.borderSize = trace.borderSize }\n\t\t\tif (o.borderColor) { pass.borderColor = trace.borderColor }\n\t\t\tif (o.opacity) { pass.opacity = trace.opacity }\n\n\t\t\tif (o.range) {\n\t\t\t\tpass.range = multirange ? getBox(trace.range, i$2, j) : trace.range || pass.bounds\n\t\t\t}\n\n\t\t\ttrace.passes.push(key)\n\t\t}\n\t}\n\n\treturn this\n}\n\n\n// draw all or passed passes\nSPLOM.prototype.draw = function () {\n\tvar this$1 = this;\n\tvar ref$2;\n\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\tif (!args.length) {\n\t\tthis.scatter.draw()\n\t}\n\telse {\n\t\tvar idx = []\n\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t// draw(0, 2, 5) - draw traces\n\t\t\tif (typeof args[i] === 'number' ) {\n\t\t\t\tvar ref = this$1.traces[args[i]];\n\t\t\t\tvar passes = ref.passes;\n\t\t\t\tvar passOffset = ref.passOffset;\n\t\t\t\tidx.push.apply(idx, arrRange(passOffset, passOffset + passes.length))\n\t\t\t}\n\t\t\t// draw([0, 1, 2 ...], [3, 4, 5]) - draw points\n\t\t\telse if (args[i].length) {\n\t\t\t\tvar els = args[i]\n\t\t\t\tvar ref$1 = this$1.traces[i];\n\t\t\t\tvar passes$1 = ref$1.passes;\n\t\t\t\tvar passOffset$1 = ref$1.passOffset;\n\t\t\t\tpasses$1 = passes$1.map(function (passId, i) {\n\t\t\t\t\tidx[passOffset$1 + i] = els\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\t(ref$2 = this.scatter).draw.apply(ref$2, idx)\n\t}\n\n\treturn this\n}\n\n\n// dispose resources\nSPLOM.prototype.destroy = function () {\n\tthis.traces.forEach(function (trace) {\n\t\tif (trace.buffer && trace.buffer.destroy) { trace.buffer.destroy() }\n\t})\n\tthis.traces = null\n\tthis.passes = null\n\n\tthis.scatter.destroy()\n\n\treturn this\n}\n\n\n// return pass corresponding to trace i- j- square\nfunction passId (trace, i, j) {\n\tvar id = (trace.id != null ? trace.id : trace)\n\tvar n = i\n\tvar m = j\n\tvar key = id << 16 | (n & 0xff) << 8 | m & 0xff\n\n\treturn key\n}\n\n\n// return bounding box corresponding to a pass\nfunction getBox (items, i, j) {\n\tvar ilox, iloy, ihix, ihiy, jlox, jloy, jhix, jhiy\n\tvar iitem = items[i], jitem = items[j]\n\n\tif (iitem.length > 2) {\n\t\tilox = iitem[0]\n\t\tihix = iitem[2]\n\t\tiloy = iitem[1]\n\t\tihiy = iitem[3]\n\t}\n\telse if (iitem.length) {\n\t\tilox = iloy = iitem[0]\n\t\tihix = ihiy = iitem[1]\n\t}\n\telse {\n\t\tilox = iitem.x\n\t\tiloy = iitem.y\n\t\tihix = iitem.x + iitem.width\n\t\tihiy = iitem.y + iitem.height\n\t}\n\n\tif (jitem.length > 2) {\n\t\tjlox = jitem[0]\n\t\tjhix = jitem[2]\n\t\tjloy = jitem[1]\n\t\tjhiy = jitem[3]\n\t}\n\telse if (jitem.length) {\n\t\tjlox = jloy = jitem[0]\n\t\tjhix = jhiy = jitem[1]\n\t}\n\telse {\n\t\tjlox = jitem.x\n\t\tjloy = jitem.y\n\t\tjhix = jitem.x + jitem.width\n\t\tjhiy = jitem.y + jitem.height\n\t}\n\n\treturn [ jlox, iloy, jhix, ihiy ]\n}\n\n\nfunction getPad (arg) {\n\tif (typeof arg === 'number') { return [arg, arg, arg, arg] }\n\telse if (arg.length === 2) { return [arg[0], arg[1], arg[0], arg[1]] }\n\telse {\n\t\tvar box = rect(arg)\n\t\treturn [box.x, box.y, box.x + box.width, box.y + box.height]\n\t}\n}\n\n},{\"array-bounds\":58,\"array-range\":60,\"flatten-vertex-data\":226,\"parse-rect\":454,\"pick-by-alias\":460,\"raf\":479,\"regl-scatter2d\":487}],489:[function(_dereq_,module,exports){\n(function(aa,ia){\"object\"===typeof exports&&\"undefined\"!==typeof module?module.exports=ia():\"function\"===typeof define&&define.amd?define(ia):aa.createREGL=ia()})(this,function(){function aa(a,b){this.id=Ab++;this.type=a;this.data=b}function ia(a){if(0===a.length)return[];var b=a.charAt(0),c=a.charAt(a.length-1);if(1<a.length&&b===c&&('\"'===b||\"'\"===b))return['\"'+a.substr(1,a.length-2).replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];if(b=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(a))return ia(a.substr(0,\nb.index)).concat(ia(b[1])).concat(ia(a.substr(b.index+b[0].length)));b=a.split(\".\");if(1===b.length)return['\"'+a.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];a=[];for(c=0;c<b.length;++c)a=a.concat(ia(b[c]));return a}function Za(a){return\"[\"+ia(a).join(\"][\")+\"]\"}function Bb(){var a={\"\":0},b=[\"\"];return{id:function(c){var e=a[c];if(e)return e;e=a[c]=b.length;b.push(c);return e},str:function(a){return b[a]}}}function Cb(a,b,c){function e(){var b=window.innerWidth,e=window.innerHeight;a!==document.body&&\n(e=a.getBoundingClientRect(),b=e.right-e.left,e=e.bottom-e.top);g.width=c*b;g.height=c*e;E(g.style,{width:b+\"px\",height:e+\"px\"})}var g=document.createElement(\"canvas\");E(g.style,{border:0,margin:0,padding:0,top:0,left:0});a.appendChild(g);a===document.body&&(g.style.position=\"absolute\",E(a.style,{margin:0,padding:0}));window.addEventListener(\"resize\",e,!1);e();return{canvas:g,onDestroy:function(){window.removeEventListener(\"resize\",e);a.removeChild(g)}}}function Db(a,b){function c(c){try{return a.getContext(c,\nb)}catch(g){return null}}return c(\"webgl\")||c(\"experimental-webgl\")||c(\"webgl-experimental\")}function $a(a){return\"string\"===typeof a?a.split():a}function ab(a){return\"string\"===typeof a?document.querySelector(a):a}function Eb(a){var b=a||{},c,e,g,d;a={};var n=[],f=[],r=\"undefined\"===typeof window?1:window.devicePixelRatio,q=!1,t=function(a){},m=function(){};\"string\"===typeof b?c=document.querySelector(b):\"object\"===typeof b&&(\"string\"===typeof b.nodeName&&\"function\"===typeof b.appendChild&&\"function\"===\ntypeof b.getBoundingClientRect?c=b:\"function\"===typeof b.drawArrays||\"function\"===typeof b.drawElements?(d=b,g=d.canvas):(\"gl\"in b?d=b.gl:\"canvas\"in b?g=ab(b.canvas):\"container\"in b&&(e=ab(b.container)),\"attributes\"in b&&(a=b.attributes),\"extensions\"in b&&(n=$a(b.extensions)),\"optionalExtensions\"in b&&(f=$a(b.optionalExtensions)),\"onDone\"in b&&(t=b.onDone),\"profile\"in b&&(q=!!b.profile),\"pixelRatio\"in b&&(r=+b.pixelRatio)));c&&(\"canvas\"===c.nodeName.toLowerCase()?g=c:e=c);if(!d){if(!g){c=Cb(e||document.body,\nt,r);if(!c)return null;g=c.canvas;m=c.onDestroy}d=Db(g,a)}return d?{gl:d,canvas:g,container:e,extensions:n,optionalExtensions:f,pixelRatio:r,profile:q,onDone:t,onDestroy:m}:(m(),t(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function Fb(a,b){function c(b){b=b.toLowerCase();var c;try{c=e[b]=a.getExtension(b)}catch(g){}return!!c}for(var e={},g=0;g<b.extensions.length;++g){var d=b.extensions[g];if(!c(d))return b.onDestroy(),b.onDone('\"'+d+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),\nnull}b.optionalExtensions.forEach(c);return{extensions:e,restore:function(){Object.keys(e).forEach(function(a){if(e[a]&&!c(a))throw Error(\"(regl): error restoring extension \"+a);})}}}function J(a,b){for(var c=Array(a),e=0;e<a;++e)c[e]=b(e);return c}function bb(a){var b,c;b=(65535<a)<<4;a>>>=b;c=(255<a)<<3;a>>>=c;b|=c;c=(15<a)<<2;a>>>=c;b|=c;c=(3<a)<<1;return b|c|a>>>c>>1}function cb(){function a(a){a:{for(var b=16;268435456>=b;b*=16)if(a<=b){a=b;break a}a=0}b=c[bb(a)>>2];return 0<b.length?b.pop():\nnew ArrayBuffer(a)}function b(a){c[bb(a.byteLength)>>2].push(a)}var c=J(8,function(){return[]});return{alloc:a,free:b,allocType:function(b,c){var d=null;switch(b){case 5120:d=new Int8Array(a(c),0,c);break;case 5121:d=new Uint8Array(a(c),0,c);break;case 5122:d=new Int16Array(a(2*c),0,c);break;case 5123:d=new Uint16Array(a(2*c),0,c);break;case 5124:d=new Int32Array(a(4*c),0,c);break;case 5125:d=new Uint32Array(a(4*c),0,c);break;case 5126:d=new Float32Array(a(4*c),0,c);break;default:return null}return d.length!==\nc?d.subarray(0,c):d},freeType:function(a){b(a.buffer)}}}function ma(a){return!!a&&\"object\"===typeof a&&Array.isArray(a.shape)&&Array.isArray(a.stride)&&\"number\"===typeof a.offset&&a.shape.length===a.stride.length&&(Array.isArray(a.data)||M(a.data))}function db(a,b,c,e,g,d){for(var n=0;n<b;++n)for(var f=a[n],r=0;r<c;++r)for(var q=f[r],t=0;t<e;++t)g[d++]=q[t]}function eb(a,b,c,e,g){for(var d=1,n=c+1;n<b.length;++n)d*=b[n];var f=b[c];if(4===b.length-c){var r=b[c+1],q=b[c+2];b=b[c+3];for(n=0;n<f;++n)db(a[n],\nr,q,b,e,g),g+=d}else for(n=0;n<f;++n)eb(a[n],b,c+1,e,g),g+=d}function Ha(a){return Ia[Object.prototype.toString.call(a)]|0}function fb(a,b){for(var c=0;c<b.length;++c)a[c]=b[c]}function gb(a,b,c,e,g,d,n){for(var f=0,r=0;r<c;++r)for(var q=0;q<e;++q)a[f++]=b[g*r+d*q+n]}function Gb(a,b,c,e){function g(b){this.id=r++;this.buffer=a.createBuffer();this.type=b;this.usage=35044;this.byteLength=0;this.dimension=1;this.dtype=5121;this.persistentData=null;c.profile&&(this.stats={size:0})}function d(b,c,k){b.byteLength=\nc.byteLength;a.bufferData(b.type,c,k)}function n(a,b,c,h,l,e){a.usage=c;if(Array.isArray(b)){if(a.dtype=h||5126,0<b.length)if(Array.isArray(b[0])){l=hb(b);for(var v=h=1;v<l.length;++v)h*=l[v];a.dimension=h;b=Qa(b,l,a.dtype);d(a,b,c);e?a.persistentData=b:x.freeType(b)}else\"number\"===typeof b[0]?(a.dimension=l,l=x.allocType(a.dtype,b.length),fb(l,b),d(a,l,c),e?a.persistentData=l:x.freeType(l)):M(b[0])&&(a.dimension=b[0].length,a.dtype=h||Ha(b[0])||5126,b=Qa(b,[b.length,b[0].length],a.dtype),d(a,b,c),\ne?a.persistentData=b:x.freeType(b))}else if(M(b))a.dtype=h||Ha(b),a.dimension=l,d(a,b,c),e&&(a.persistentData=new Uint8Array(new Uint8Array(b.buffer)));else if(ma(b)){l=b.shape;var g=b.stride,v=b.offset,f=0,q=0,r=0,t=0;1===l.length?(f=l[0],q=1,r=g[0],t=0):2===l.length&&(f=l[0],q=l[1],r=g[0],t=g[1]);a.dtype=h||Ha(b.data)||5126;a.dimension=q;l=x.allocType(a.dtype,f*q);gb(l,b.data,f,q,r,t,v);d(a,l,c);e?a.persistentData=l:x.freeType(l)}}function f(c){b.bufferCount--;for(var d=0;d<e.state.length;++d){var k=\ne.state[d];k.buffer===c&&(a.disableVertexAttribArray(d),k.buffer=null)}a.deleteBuffer(c.buffer);c.buffer=null;delete q[c.id]}var r=0,q={};g.prototype.bind=function(){a.bindBuffer(this.type,this.buffer)};g.prototype.destroy=function(){f(this)};var t=[];c.profile&&(b.getTotalBufferSize=function(){var a=0;Object.keys(q).forEach(function(b){a+=q[b].stats.size});return a});return{create:function(m,e,d,h){function l(b){var m=35044,e=null,d=0,k=0,g=1;Array.isArray(b)||M(b)||ma(b)?e=b:\"number\"===typeof b?\nd=b|0:b&&(\"data\"in b&&(e=b.data),\"usage\"in b&&(m=jb[b.usage]),\"type\"in b&&(k=Ra[b.type]),\"dimension\"in b&&(g=b.dimension|0),\"length\"in b&&(d=b.length|0));u.bind();e?n(u,e,m,k,g,h):(d&&a.bufferData(u.type,d,m),u.dtype=k||5121,u.usage=m,u.dimension=g,u.byteLength=d);c.profile&&(u.stats.size=u.byteLength*ja[u.dtype]);return l}b.bufferCount++;var u=new g(e);q[u.id]=u;d||l(m);l._reglType=\"buffer\";l._buffer=u;l.subdata=function(b,c){var m=(c||0)|0,e;u.bind();if(M(b))a.bufferSubData(u.type,m,b);else if(Array.isArray(b)){if(0<\nb.length)if(\"number\"===typeof b[0]){var d=x.allocType(u.dtype,b.length);fb(d,b);a.bufferSubData(u.type,m,d);x.freeType(d)}else if(Array.isArray(b[0])||M(b[0]))e=hb(b),d=Qa(b,e,u.dtype),a.bufferSubData(u.type,m,d),x.freeType(d)}else if(ma(b)){e=b.shape;var h=b.stride,k=d=0,g=0,F=0;1===e.length?(d=e[0],k=1,g=h[0],F=0):2===e.length&&(d=e[0],k=e[1],g=h[0],F=h[1]);e=Array.isArray(b.data)?u.dtype:Ha(b.data);e=x.allocType(e,d*k);gb(e,b.data,d,k,g,F,b.offset);a.bufferSubData(u.type,m,e);x.freeType(e)}return l};\nc.profile&&(l.stats=u.stats);l.destroy=function(){f(u)};return l},createStream:function(a,b){var c=t.pop();c||(c=new g(a));c.bind();n(c,b,35040,0,1,!1);return c},destroyStream:function(a){t.push(a)},clear:function(){S(q).forEach(f);t.forEach(f)},getBuffer:function(a){return a&&a._buffer instanceof g?a._buffer:null},restore:function(){S(q).forEach(function(b){b.buffer=a.createBuffer();a.bindBuffer(b.type,b.buffer);a.bufferData(b.type,b.persistentData||b.byteLength,b.usage)})},_initBuffer:n}}function Hb(a,\nb,c,e){function g(a){this.id=r++;f[this.id]=this;this.buffer=a;this.primType=4;this.type=this.vertCount=0}function d(e,d,g,h,l,u,v){e.buffer.bind();if(d){var f=v;v||M(d)&&(!ma(d)||M(d.data))||(f=b.oes_element_index_uint?5125:5123);c._initBuffer(e.buffer,d,g,f,3)}else a.bufferData(34963,u,g),e.buffer.dtype=f||5121,e.buffer.usage=g,e.buffer.dimension=3,e.buffer.byteLength=u;f=v;if(!v){switch(e.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}e.buffer.dtype=\nf}e.type=f;d=l;0>d&&(d=e.buffer.byteLength,5123===f?d>>=1:5125===f&&(d>>=2));e.vertCount=d;d=h;0>h&&(d=4,h=e.buffer.dimension,1===h&&(d=0),2===h&&(d=1),3===h&&(d=4));e.primType=d}function n(a){e.elementsCount--;delete f[a.id];a.buffer.destroy();a.buffer=null}var f={},r=0,q={uint8:5121,uint16:5123};b.oes_element_index_uint&&(q.uint32=5125);g.prototype.bind=function(){this.buffer.bind()};var t=[];return{create:function(a,b){function k(a){if(a)if(\"number\"===typeof a)h(a),l.primType=4,l.vertCount=a|0,\nl.type=5121;else{var b=null,c=35044,e=-1,g=-1,f=0,m=0;if(Array.isArray(a)||M(a)||ma(a))b=a;else if(\"data\"in a&&(b=a.data),\"usage\"in a&&(c=jb[a.usage]),\"primitive\"in a&&(e=Sa[a.primitive]),\"count\"in a&&(g=a.count|0),\"type\"in a&&(m=q[a.type]),\"length\"in a)f=a.length|0;else if(f=g,5123===m||5122===m)f*=2;else if(5125===m||5124===m)f*=4;d(l,b,c,e,g,f,m)}else h(),l.primType=4,l.vertCount=0,l.type=5121;return k}var h=c.create(null,34963,!0),l=new g(h._buffer);e.elementsCount++;k(a);k._reglType=\"elements\";\nk._elements=l;k.subdata=function(a,b){h.subdata(a,b);return k};k.destroy=function(){n(l)};return k},createStream:function(a){var b=t.pop();b||(b=new g(c.create(null,34963,!0,!1)._buffer));d(b,a,35040,-1,-1,0,0);return b},destroyStream:function(a){t.push(a)},getElements:function(a){return\"function\"===typeof a&&a._elements instanceof g?a._elements:null},clear:function(){S(f).forEach(n)}}}function kb(a){for(var b=x.allocType(5123,a.length),c=0;c<a.length;++c)if(isNaN(a[c]))b[c]=65535;else if(Infinity===\na[c])b[c]=31744;else if(-Infinity===a[c])b[c]=64512;else{lb[0]=a[c];var e=Ib[0],g=e>>>31<<15,d=(e<<1>>>24)-127,e=e>>13&1023;b[c]=-24>d?g:-14>d?g+(e+1024>>-14-d):15<d?g+31744:g+(d+15<<10)+e}return b}function pa(a){return Array.isArray(a)||M(a)}function Ea(a){return\"[object \"+a+\"]\"}function mb(a){return Array.isArray(a)&&(0===a.length||\"number\"===typeof a[0])}function nb(a){return Array.isArray(a)&&0!==a.length&&pa(a[0])?!0:!1}function na(a){return Object.prototype.toString.call(a)}function Ta(a){if(!a)return!1;\nvar b=na(a);return 0<=Jb.indexOf(b)?!0:mb(a)||nb(a)||ma(a)}function ob(a,b){36193===a.type?(a.data=kb(b),x.freeType(b)):a.data=b}function Ja(a,b,c,e,g,d){a=\"undefined\"!==typeof y[a]?y[a]:L[a]*qa[b];d&&(a*=6);if(g){for(e=0;1<=c;)e+=a*c*c,c/=2;return e}return a*c*e}function Kb(a,b,c,e,g,d,n){function f(){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 r(a,\nb){a.internalformat=b.internalformat;a.format=b.format;a.type=b.type;a.compressed=b.compressed;a.premultiplyAlpha=b.premultiplyAlpha;a.flipY=b.flipY;a.unpackAlignment=b.unpackAlignment;a.colorSpace=b.colorSpace;a.width=b.width;a.height=b.height;a.channels=b.channels}function q(a,b){if(\"object\"===typeof b&&b){\"premultiplyAlpha\"in b&&(a.premultiplyAlpha=b.premultiplyAlpha);\"flipY\"in b&&(a.flipY=b.flipY);\"alignment\"in b&&(a.unpackAlignment=b.alignment);\"colorSpace\"in b&&(a.colorSpace=wa[b.colorSpace]);\n\"type\"in b&&(a.type=G[b.type]);var c=a.width,e=a.height,d=a.channels,h=!1;\"shape\"in b?(c=b.shape[0],e=b.shape[1],3===b.shape.length&&(d=b.shape[2],h=!0)):(\"radius\"in b&&(c=e=b.radius),\"width\"in b&&(c=b.width),\"height\"in b&&(e=b.height),\"channels\"in b&&(d=b.channels,h=!0));a.width=c|0;a.height=e|0;a.channels=d|0;c=!1;\"format\"in b&&(c=b.format,e=a.internalformat=U[c],a.format=Lb[e],c in G&&!(\"type\"in b)&&(a.type=G[c]),c in W&&(a.compressed=!0),c=!0);!h&&c?a.channels=L[a.format]:h&&!c&&a.channels!==\nLa[a.format]&&(a.format=a.internalformat=La[a.channels])}}function t(b){a.pixelStorei(37440,b.flipY);a.pixelStorei(37441,b.premultiplyAlpha);a.pixelStorei(37443,b.colorSpace);a.pixelStorei(3317,b.unpackAlignment)}function m(){f.call(this);this.yOffset=this.xOffset=0;this.data=null;this.needsFree=!1;this.element=null;this.needsCopy=!1}function C(a,b){var c=null;Ta(b)?c=b:b&&(q(a,b),\"x\"in b&&(a.xOffset=b.x|0),\"y\"in b&&(a.yOffset=b.y|0),Ta(b.data)&&(c=b.data));if(b.copy){var e=g.viewportWidth,d=g.viewportHeight;\na.width=a.width||e-a.xOffset;a.height=a.height||d-a.yOffset;a.needsCopy=!0}else if(!c)a.width=a.width||1,a.height=a.height||1,a.channels=a.channels||4;else if(M(c))a.channels=a.channels||4,a.data=c,\"type\"in b||5121!==a.type||(a.type=Ia[Object.prototype.toString.call(c)]|0);else if(mb(c)){a.channels=a.channels||4;e=c;d=e.length;switch(a.type){case 5121:case 5123:case 5125:case 5126:d=x.allocType(a.type,d);d.set(e);a.data=d;break;case 36193:a.data=kb(e)}a.alignment=1;a.needsFree=!0}else if(ma(c)){e=\nc.data;Array.isArray(e)||5121!==a.type||(a.type=Ia[Object.prototype.toString.call(e)]|0);var d=c.shape,h=c.stride,f,l,p,w;3===d.length?(p=d[2],w=h[2]):w=p=1;f=d[0];l=d[1];d=h[0];h=h[1];a.alignment=1;a.width=f;a.height=l;a.channels=p;a.format=a.internalformat=La[p];a.needsFree=!0;f=w;c=c.offset;p=a.width;w=a.height;l=a.channels;for(var z=x.allocType(36193===a.type?5126:a.type,p*w*l),I=0,fa=0;fa<w;++fa)for(var ga=0;ga<p;++ga)for(var xa=0;xa<l;++xa)z[I++]=e[d*ga+h*fa+f*xa+c];ob(a,z)}else if(na(c)===\nUa||na(c)===pb)na(c)===Ua?a.element=c:a.element=c.canvas,a.width=a.element.width,a.height=a.element.height,a.channels=4;else if(na(c)===qb)a.element=c,a.width=c.width,a.height=c.height,a.channels=4;else if(na(c)===rb)a.element=c,a.width=c.naturalWidth,a.height=c.naturalHeight,a.channels=4;else if(na(c)===sb)a.element=c,a.width=c.videoWidth,a.height=c.videoHeight,a.channels=4;else if(nb(c)){e=a.width||c[0].length;d=a.height||c.length;h=a.channels;h=pa(c[0][0])?h||c[0][0].length:h||1;f=Ma.shape(c);\np=1;for(w=0;w<f.length;++w)p*=f[w];p=x.allocType(36193===a.type?5126:a.type,p);Ma.flatten(c,f,\"\",p);ob(a,p);a.alignment=1;a.width=e;a.height=d;a.channels=h;a.format=a.internalformat=La[h];a.needsFree=!0}}function k(b,c,d,h,f){var g=b.element,l=b.data,k=b.internalformat,p=b.format,w=b.type,z=b.width,I=b.height;t(b);g?a.texSubImage2D(c,f,d,h,p,w,g):b.compressed?a.compressedTexSubImage2D(c,f,d,h,k,z,I,l):b.needsCopy?(e(),a.copyTexSubImage2D(c,f,d,h,b.xOffset,b.yOffset,z,I)):a.texSubImage2D(c,f,d,h,z,\nI,p,w,l)}function h(){return P.pop()||new m}function l(a){a.needsFree&&x.freeType(a.data);m.call(a);P.push(a)}function u(){f.call(this);this.genMipmaps=!1;this.mipmapHint=4352;this.mipmask=0;this.images=Array(16)}function v(a,b,c){var d=a.images[0]=h();a.mipmask=1;d.width=a.width=b;d.height=a.height=c;d.channels=a.channels=4}function N(a,b){var c=null;if(Ta(b))c=a.images[0]=h(),r(c,a),C(c,b),a.mipmask=1;else if(q(a,b),Array.isArray(b.mipmap))for(var d=b.mipmap,e=0;e<d.length;++e)c=a.images[e]=h(),\nr(c,a),c.width>>=e,c.height>>=e,C(c,d[e]),a.mipmask|=1<<e;else c=a.images[0]=h(),r(c,a),C(c,b),a.mipmask=1;r(a,a.images[0])}function B(b,c){for(var d=b.images,h=0;h<d.length&&d[h];++h){var f=d[h],g=c,l=h,k=f.element,p=f.data,w=f.internalformat,z=f.format,I=f.type,fa=f.width,ga=f.height,xa=f.channels;t(f);k?a.texImage2D(g,l,z,z,I,k):f.compressed?a.compressedTexImage2D(g,l,w,fa,ga,0,p):f.needsCopy?(e(),a.copyTexImage2D(g,l,z,f.xOffset,f.yOffset,fa,ga,0)):((f=!p)&&(p=x.zero.allocType(I,fa*ga*xa)),a.texImage2D(g,\nl,z,fa,ga,0,z,I,p),f&&p&&x.zero.freeType(p))}}function D(){var a=tb.pop()||new u;f.call(a);for(var b=a.mipmask=0;16>b;++b)a.images[b]=null;return a}function ib(a){for(var b=a.images,c=0;c<b.length;++c)b[c]&&l(b[c]),b[c]=null;tb.push(a)}function y(){this.magFilter=this.minFilter=9728;this.wrapT=this.wrapS=33071;this.anisotropic=1;this.genMipmaps=!1;this.mipmapHint=4352}function O(a,b){\"min\"in b&&(a.minFilter=Va[b.min],0<=Mb.indexOf(a.minFilter)&&!(\"faces\"in b)&&(a.genMipmaps=!0));\"mag\"in b&&(a.magFilter=\nV[b.mag]);var c=a.wrapS,d=a.wrapT;if(\"wrap\"in b){var e=b.wrap;\"string\"===typeof e?c=d=K[e]:Array.isArray(e)&&(c=K[e[0]],d=K[e[1]])}else\"wrapS\"in b&&(c=K[b.wrapS]),\"wrapT\"in b&&(d=K[b.wrapT]);a.wrapS=c;a.wrapT=d;\"anisotropic\"in b&&(a.anisotropic=b.anisotropic);if(\"mipmap\"in b){c=!1;switch(typeof b.mipmap){case \"string\":a.mipmapHint=ua[b.mipmap];c=a.genMipmaps=!0;break;case \"boolean\":c=a.genMipmaps=b.mipmap;break;case \"object\":a.genMipmaps=!1,c=!0}!c||\"min\"in b||(a.minFilter=9984)}}function R(c,d){a.texParameteri(d,\n10241,c.minFilter);a.texParameteri(d,10240,c.magFilter);a.texParameteri(d,10242,c.wrapS);a.texParameteri(d,10243,c.wrapT);b.ext_texture_filter_anisotropic&&a.texParameteri(d,34046,c.anisotropic);c.genMipmaps&&(a.hint(33170,c.mipmapHint),a.generateMipmap(d))}function F(b){f.call(this);this.mipmask=0;this.internalformat=6408;this.id=ya++;this.refCount=1;this.target=b;this.texture=a.createTexture();this.unit=-1;this.bindCount=0;this.texInfo=new y;n.profile&&(this.stats={size:0})}function T(b){a.activeTexture(33984);\na.bindTexture(b.target,b.texture)}function Aa(){var b=ha[0];b?a.bindTexture(b.target,b.texture):a.bindTexture(3553,null)}function A(b){var c=b.texture,e=b.unit,h=b.target;0<=e&&(a.activeTexture(33984+e),a.bindTexture(h,null),ha[e]=null);a.deleteTexture(c);b.texture=null;b.params=null;b.pixels=null;b.refCount=0;delete X[b.id];d.textureCount--}var ua={\"don't care\":4352,\"dont care\":4352,nice:4354,fast:4353},K={repeat:10497,clamp:33071,mirror:33648},V={nearest:9728,linear:9729},Va=E({mipmap:9987,\"nearest mipmap nearest\":9984,\n\"linear mipmap nearest\":9985,\"nearest mipmap linear\":9986,\"linear mipmap linear\":9987},V),wa={none:0,browser:37444},G={uint8:5121,rgba4:32819,rgb565:33635,\"rgb5 a1\":32820},U={alpha:6406,luminance:6409,\"luminance alpha\":6410,rgb:6407,rgba:6408,rgba4:32854,\"rgb5 a1\":32855,rgb565:36194},W={};b.ext_srgb&&(U.srgb=35904,U.srgba=35906);b.oes_texture_float&&(G.float32=G[\"float\"]=5126);b.oes_texture_half_float&&(G.float16=G[\"half float\"]=36193);b.webgl_depth_texture&&(E(U,{depth:6402,\"depth stencil\":34041}),\nE(G,{uint16:5123,uint32:5125,\"depth stencil\":34042}));b.webgl_compressed_texture_s3tc&&E(W,{\"rgb s3tc dxt1\":33776,\"rgba s3tc dxt1\":33777,\"rgba s3tc dxt3\":33778,\"rgba s3tc dxt5\":33779});b.webgl_compressed_texture_atc&&E(W,{\"rgb atc\":35986,\"rgba atc explicit alpha\":35987,\"rgba atc interpolated alpha\":34798});b.webgl_compressed_texture_pvrtc&&E(W,{\"rgb pvrtc 4bppv1\":35840,\"rgb pvrtc 2bppv1\":35841,\"rgba pvrtc 4bppv1\":35842,\"rgba pvrtc 2bppv1\":35843});b.webgl_compressed_texture_etc1&&(W[\"rgb etc1\"]=36196);\nvar Nb=Array.prototype.slice.call(a.getParameter(34467));Object.keys(W).forEach(function(a){var b=W[a];0<=Nb.indexOf(b)&&(U[a]=b)});var ca=Object.keys(U);c.textureFormats=ca;var J=[];Object.keys(U).forEach(function(a){J[U[a]]=a});var da=[];Object.keys(G).forEach(function(a){da[G[a]]=a});var oa=[];Object.keys(V).forEach(function(a){oa[V[a]]=a});var za=[];Object.keys(Va).forEach(function(a){za[Va[a]]=a});var ka=[];Object.keys(K).forEach(function(a){ka[K[a]]=a});var Lb=ca.reduce(function(a,b){var c=\nU[b];6409===c||6406===c||6409===c||6410===c||6402===c||34041===c?a[c]=c:32855===c||0<=b.indexOf(\"rgba\")?a[c]=6408:a[c]=6407;return a},{}),P=[],tb=[],ya=0,X={},ea=c.maxTextureUnits,ha=Array(ea).map(function(){return null});E(F.prototype,{bind:function(){this.bindCount+=1;var b=this.unit;if(0>b){for(var c=0;c<ea;++c){var e=ha[c];if(e){if(0<e.bindCount)continue;e.unit=-1}ha[c]=this;b=c;break}n.profile&&d.maxTextureUnits<b+1&&(d.maxTextureUnits=b+1);this.unit=b;a.activeTexture(33984+b);a.bindTexture(this.target,\nthis.texture)}return b},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&A(this)}});n.profile&&(d.getTotalTextureSize=function(){var a=0;Object.keys(X).forEach(function(b){a+=X[b].stats.size});return a});return{create2D:function(b,c){function e(a,b){var c=f.texInfo;y.call(c);var d=D();\"number\"===typeof a?\"number\"===typeof b?v(d,a|0,b|0):v(d,a|0,a|0):a?(O(c,a),N(d,a)):v(d,1,1);c.genMipmaps&&(d.mipmask=(d.width<<1)-1);f.mipmask=d.mipmask;r(f,d);f.internalformat=d.internalformat;\ne.width=d.width;e.height=d.height;T(f);B(d,3553);R(c,3553);Aa();ib(d);n.profile&&(f.stats.size=Ja(f.internalformat,f.type,d.width,d.height,c.genMipmaps,!1));e.format=J[f.internalformat];e.type=da[f.type];e.mag=oa[c.magFilter];e.min=za[c.minFilter];e.wrapS=ka[c.wrapS];e.wrapT=ka[c.wrapT];return e}var f=new F(3553);X[f.id]=f;d.textureCount++;e(b,c);e.subimage=function(a,b,c,d){b|=0;c|=0;d|=0;var p=h();r(p,f);p.width=0;p.height=0;C(p,a);p.width=p.width||(f.width>>d)-b;p.height=p.height||(f.height>>d)-\nc;T(f);k(p,3553,b,c,d);Aa();l(p);return e};e.resize=function(b,c){var d=b|0,h=c|0||d;if(d===f.width&&h===f.height)return e;e.width=f.width=d;e.height=f.height=h;T(f);for(var p,w=f.channels,z=f.type,I=0;f.mipmask>>I;++I){var fa=d>>I,ga=h>>I;if(!fa||!ga)break;p=x.zero.allocType(z,fa*ga*w);a.texImage2D(3553,I,f.format,fa,ga,0,f.format,f.type,p);p&&x.zero.freeType(p)}Aa();n.profile&&(f.stats.size=Ja(f.internalformat,f.type,d,h,!1,!1));return e};e._reglType=\"texture2d\";e._texture=f;n.profile&&(e.stats=\nf.stats);e.destroy=function(){f.decRef()};return e},createCube:function(b,c,e,f,g,ua){function A(a,b,c,d,e,f){var H,Y=m.texInfo;y.call(Y);for(H=0;6>H;++H)p[H]=D();if(\"number\"===typeof a||!a)for(a=a|0||1,H=0;6>H;++H)v(p[H],a,a);else if(\"object\"===typeof a)if(b)N(p[0],a),N(p[1],b),N(p[2],c),N(p[3],d),N(p[4],e),N(p[5],f);else if(O(Y,a),q(m,a),\"faces\"in a)for(a=a.faces,H=0;6>H;++H)r(p[H],m),N(p[H],a[H]);else for(H=0;6>H;++H)N(p[H],a);r(m,p[0]);m.mipmask=Y.genMipmaps?(p[0].width<<1)-1:p[0].mipmask;m.internalformat=\np[0].internalformat;A.width=p[0].width;A.height=p[0].height;T(m);for(H=0;6>H;++H)B(p[H],34069+H);R(Y,34067);Aa();n.profile&&(m.stats.size=Ja(m.internalformat,m.type,A.width,A.height,Y.genMipmaps,!0));A.format=J[m.internalformat];A.type=da[m.type];A.mag=oa[Y.magFilter];A.min=za[Y.minFilter];A.wrapS=ka[Y.wrapS];A.wrapT=ka[Y.wrapT];for(H=0;6>H;++H)ib(p[H]);return A}var m=new F(34067);X[m.id]=m;d.cubeCount++;var p=Array(6);A(b,c,e,f,g,ua);A.subimage=function(a,b,c,p,d){c|=0;p|=0;d|=0;var e=h();r(e,m);\ne.width=0;e.height=0;C(e,b);e.width=e.width||(m.width>>d)-c;e.height=e.height||(m.height>>d)-p;T(m);k(e,34069+a,c,p,d);Aa();l(e);return A};A.resize=function(b){b|=0;if(b!==m.width){A.width=m.width=b;A.height=m.height=b;T(m);for(var c=0;6>c;++c)for(var p=0;m.mipmask>>p;++p)a.texImage2D(34069+c,p,m.format,b>>p,b>>p,0,m.format,m.type,null);Aa();n.profile&&(m.stats.size=Ja(m.internalformat,m.type,A.width,A.height,!1,!0));return A}};A._reglType=\"textureCube\";A._texture=m;n.profile&&(A.stats=m.stats);A.destroy=\nfunction(){m.decRef()};return A},clear:function(){for(var b=0;b<ea;++b)a.activeTexture(33984+b),a.bindTexture(3553,null),ha[b]=null;S(X).forEach(A);d.cubeCount=0;d.textureCount=0},getTexture:function(a){return null},restore:function(){for(var b=0;b<ea;++b){var c=ha[b];c&&(c.bindCount=0,c.unit=-1,ha[b]=null)}S(X).forEach(function(b){b.texture=a.createTexture();a.bindTexture(b.target,b.texture);for(var c=0;32>c;++c)if(0!==(b.mipmask&1<<c))if(3553===b.target)a.texImage2D(3553,c,b.internalformat,b.width>>\nc,b.height>>c,0,b.internalformat,b.type,null);else for(var d=0;6>d;++d)a.texImage2D(34069+d,c,b.internalformat,b.width>>c,b.height>>c,0,b.internalformat,b.type,null);R(b.texInfo,b.target)})}}}function Ob(a,b,c,e,g,d){function n(a,b,c){this.target=a;this.texture=b;this.renderbuffer=c;var d=a=0;b?(a=b.width,d=b.height):c&&(a=c.width,d=c.height);this.width=a;this.height=d}function f(a){a&&(a.texture&&a.texture._texture.decRef(),a.renderbuffer&&a.renderbuffer._renderbuffer.decRef())}function r(a,b,c){a&&\n(a.texture?a.texture._texture.refCount+=1:a.renderbuffer._renderbuffer.refCount+=1)}function q(b,c){c&&(c.texture?a.framebufferTexture2D(36160,b,c.target,c.texture._texture.texture,0):a.framebufferRenderbuffer(36160,b,36161,c.renderbuffer._renderbuffer.renderbuffer))}function t(a){var b=3553,c=null,d=null,e=a;\"object\"===typeof a&&(e=a.data,\"target\"in a&&(b=a.target|0));a=e._reglType;\"texture2d\"===a?c=e:\"textureCube\"===a?c=e:\"renderbuffer\"===a&&(d=e,b=36161);return new n(b,c,d)}function m(a,b,c,d,\nf){if(c)return a=e.create2D({width:a,height:b,format:d,type:f}),a._texture.refCount=0,new n(3553,a,null);a=g.create({width:a,height:b,format:d});a._renderbuffer.refCount=0;return new n(36161,null,a)}function C(a){return a&&(a.texture||a.renderbuffer)}function k(a,b,c){a&&(a.texture?a.texture.resize(b,c):a.renderbuffer&&a.renderbuffer.resize(b,c),a.width=b,a.height=c)}function h(){this.id=O++;R[this.id]=this;this.framebuffer=a.createFramebuffer();this.height=this.width=0;this.colorAttachments=[];this.depthStencilAttachment=\nthis.stencilAttachment=this.depthAttachment=null}function l(a){a.colorAttachments.forEach(f);f(a.depthAttachment);f(a.stencilAttachment);f(a.depthStencilAttachment)}function u(b){a.deleteFramebuffer(b.framebuffer);b.framebuffer=null;d.framebufferCount--;delete R[b.id]}function v(b){var d;a.bindFramebuffer(36160,b.framebuffer);var e=b.colorAttachments;for(d=0;d<e.length;++d)q(36064+d,e[d]);for(d=e.length;d<c.maxColorAttachments;++d)a.framebufferTexture2D(36160,36064+d,3553,null,0);a.framebufferTexture2D(36160,\n33306,3553,null,0);a.framebufferTexture2D(36160,36096,3553,null,0);a.framebufferTexture2D(36160,36128,3553,null,0);q(36096,b.depthAttachment);q(36128,b.stencilAttachment);q(33306,b.depthStencilAttachment);a.checkFramebufferStatus(36160);a.isContextLost();a.bindFramebuffer(36160,B.next?B.next.framebuffer:null);B.cur=B.next;a.getError()}function N(a,b){function c(a,b){var d,f=0,h=0,g=!0,k=!0;d=null;var q=!0,u=\"rgba\",n=\"uint8\",N=1,da=null,oa=null,B=null,ka=!1;if(\"number\"===typeof a)f=a|0,h=b|0||f;else if(a){\"shape\"in\na?(h=a.shape,f=h[0],h=h[1]):(\"radius\"in a&&(f=h=a.radius),\"width\"in a&&(f=a.width),\"height\"in a&&(h=a.height));if(\"color\"in a||\"colors\"in a)d=a.color||a.colors,Array.isArray(d);if(!d){\"colorCount\"in a&&(N=a.colorCount|0);\"colorTexture\"in a&&(q=!!a.colorTexture,u=\"rgba4\");if(\"colorType\"in a&&(n=a.colorType,!q))if(\"half float\"===n||\"float16\"===n)u=\"rgba16f\";else if(\"float\"===n||\"float32\"===n)u=\"rgba32f\";\"colorFormat\"in a&&(u=a.colorFormat,0<=x.indexOf(u)?q=!0:0<=D.indexOf(u)&&(q=!1))}if(\"depthTexture\"in\na||\"depthStencilTexture\"in a)ka=!(!a.depthTexture&&!a.depthStencilTexture);\"depth\"in a&&(\"boolean\"===typeof a.depth?g=a.depth:(da=a.depth,k=!1));\"stencil\"in a&&(\"boolean\"===typeof a.stencil?k=a.stencil:(oa=a.stencil,g=!1));\"depthStencil\"in a&&(\"boolean\"===typeof a.depthStencil?g=k=a.depthStencil:(B=a.depthStencil,k=g=!1))}else f=h=1;var F=null,y=null,E=null,T=null;if(Array.isArray(d))F=d.map(t);else if(d)F=[t(d)];else for(F=Array(N),d=0;d<N;++d)F[d]=m(f,h,q,u,n);f=f||F[0].width;h=h||F[0].height;da?\ny=t(da):g&&!k&&(y=m(f,h,ka,\"depth\",\"uint32\"));oa?E=t(oa):k&&!g&&(E=m(f,h,!1,\"stencil\",\"uint8\"));B?T=t(B):!da&&!oa&&k&&g&&(T=m(f,h,ka,\"depth stencil\",\"depth stencil\"));g=null;for(d=0;d<F.length;++d)r(F[d],f,h),F[d]&&F[d].texture&&(k=Wa[F[d].texture._texture.format]*Na[F[d].texture._texture.type],null===g&&(g=k));r(y,f,h);r(E,f,h);r(T,f,h);l(e);e.width=f;e.height=h;e.colorAttachments=F;e.depthAttachment=y;e.stencilAttachment=E;e.depthStencilAttachment=T;c.color=F.map(C);c.depth=C(y);c.stencil=C(E);\nc.depthStencil=C(T);c.width=e.width;c.height=e.height;v(e);return c}var e=new h;d.framebufferCount++;c(a,b);return E(c,{resize:function(a,b){var d=Math.max(a|0,1),f=Math.max(b|0||d,1);if(d===e.width&&f===e.height)return c;for(var h=e.colorAttachments,g=0;g<h.length;++g)k(h[g],d,f);k(e.depthAttachment,d,f);k(e.stencilAttachment,d,f);k(e.depthStencilAttachment,d,f);e.width=c.width=d;e.height=c.height=f;v(e);return c},_reglType:\"framebuffer\",_framebuffer:e,destroy:function(){u(e);l(e)},use:function(a){B.setFBO({framebuffer:c},\na)}})}var B={cur:null,next:null,dirty:!1,setFBO:null},x=[\"rgba\"],D=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];b.ext_srgb&&D.push(\"srgba\");b.ext_color_buffer_half_float&&D.push(\"rgba16f\",\"rgb16f\");b.webgl_color_buffer_float&&D.push(\"rgba32f\");var y=[\"uint8\"];b.oes_texture_half_float&&y.push(\"half float\",\"float16\");b.oes_texture_float&&y.push(\"float\",\"float32\");var O=0,R={};return E(B,{getFramebuffer:function(a){return\"function\"===typeof a&&\"framebuffer\"===a._reglType&&(a=a._framebuffer,a instanceof h)?a:null},create:N,\ncreateCube:function(a){function b(a){var d,f={color:null},h=0,g=null;d=\"rgba\";var l=\"uint8\",m=1;if(\"number\"===typeof a)h=a|0;else if(a){\"shape\"in a?h=a.shape[0]:(\"radius\"in a&&(h=a.radius|0),\"width\"in a?h=a.width|0:\"height\"in a&&(h=a.height|0));if(\"color\"in a||\"colors\"in a)g=a.color||a.colors,Array.isArray(g);g||(\"colorCount\"in a&&(m=a.colorCount|0),\"colorType\"in a&&(l=a.colorType),\"colorFormat\"in a&&(d=a.colorFormat));\"depth\"in a&&(f.depth=a.depth);\"stencil\"in a&&(f.stencil=a.stencil);\"depthStencil\"in\na&&(f.depthStencil=a.depthStencil)}else h=1;if(g)if(Array.isArray(g))for(a=[],d=0;d<g.length;++d)a[d]=g[d];else a=[g];else for(a=Array(m),g={radius:h,format:d,type:l},d=0;d<m;++d)a[d]=e.createCube(g);f.color=Array(a.length);for(d=0;d<a.length;++d)m=a[d],h=h||m.width,f.color[d]={target:34069,data:a[d]};for(d=0;6>d;++d){for(m=0;m<a.length;++m)f.color[m].target=34069+d;0<d&&(f.depth=c[0].depth,f.stencil=c[0].stencil,f.depthStencil=c[0].depthStencil);if(c[d])c[d](f);else c[d]=N(f)}return E(b,{width:h,\nheight:h,color:a})}var c=Array(6);b(a);return E(b,{faces:c,resize:function(a){var d=a|0;if(d===b.width)return b;var e=b.color;for(a=0;a<e.length;++a)e[a].resize(d);for(a=0;6>a;++a)c[a].resize(d);b.width=b.height=d;return b},_reglType:\"framebufferCube\",destroy:function(){c.forEach(function(a){a.destroy()})}})},clear:function(){S(R).forEach(u)},restore:function(){B.cur=null;B.next=null;B.dirty=!0;S(R).forEach(function(b){b.framebuffer=a.createFramebuffer();v(b)})}})}function ub(){this.w=this.z=this.y=\nthis.x=this.state=0;this.buffer=null;this.size=0;this.normalized=!1;this.type=5126;this.divisor=this.stride=this.offset=0}function Pb(a,b,c,e){a=c.maxAttributes;b=Array(a);for(c=0;c<a;++c)b[c]=new ub;return{Record:ub,scope:{},state:b}}function Qb(a,b,c,e){function g(a,b,c,d){this.name=a;this.id=b;this.location=c;this.info=d}function d(a,b){for(var c=0;c<a.length;++c)if(a[c].id===b.id){a[c].location=b.location;return}a.push(b)}function n(c,d,e){e=35632===c?q:t;var f=e[d];if(!f){var g=b.str(d),f=a.createShader(c);\na.shaderSource(f,g);a.compileShader(f);e[d]=f}return f}function f(a,b){this.id=k++;this.fragId=a;this.vertId=b;this.program=null;this.uniforms=[];this.attributes=[];e.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function r(c,f){var m,k;m=n(35632,c.fragId);k=n(35633,c.vertId);var q=c.program=a.createProgram();a.attachShader(q,m);a.attachShader(q,k);a.linkProgram(q);var r=a.getProgramParameter(q,35718);e.profile&&(c.stats.uniformsCount=r);var t=c.uniforms;for(m=0;m<r;++m)if(k=a.getActiveUniform(q,\nm))if(1<k.size)for(var C=0;C<k.size;++C){var y=k.name.replace(\"[0]\",\"[\"+C+\"]\");d(t,new g(y,b.id(y),a.getUniformLocation(q,y),k))}else d(t,new g(k.name,b.id(k.name),a.getUniformLocation(q,k.name),k));r=a.getProgramParameter(q,35721);e.profile&&(c.stats.attributesCount=r);t=c.attributes;for(m=0;m<r;++m)(k=a.getActiveAttrib(q,m))&&d(t,new g(k.name,b.id(k.name),a.getAttribLocation(q,k.name),k))}var q={},t={},m={},C=[],k=0;e.profile&&(c.getMaxUniformsCount=function(){var a=0;C.forEach(function(b){b.stats.uniformsCount>\na&&(a=b.stats.uniformsCount)});return a},c.getMaxAttributesCount=function(){var a=0;C.forEach(function(b){b.stats.attributesCount>a&&(a=b.stats.attributesCount)});return a});return{clear:function(){var b=a.deleteShader.bind(a);S(q).forEach(b);q={};S(t).forEach(b);t={};C.forEach(function(b){a.deleteProgram(b.program)});C.length=0;m={};c.shaderCount=0},program:function(a,b,d){var e=m[b];e||(e=m[b]={});var g=e[a];g||(g=new f(b,a),c.shaderCount++,r(g,d),e[a]=g,C.push(g));return g},restore:function(){q=\n{};t={};for(var a=0;a<C.length;++a)r(C[a])},shader:n,frag:-1,vert:-1}}function Rb(a,b,c,e,g,d,n){function f(d){var f;f=null===b.next?5121:b.next.colorAttachments[0].texture._texture.type;var g=0,r=0,k=e.framebufferWidth,h=e.framebufferHeight,l=null;M(d)?l=d:d&&(g=d.x|0,r=d.y|0,k=(d.width||e.framebufferWidth-g)|0,h=(d.height||e.framebufferHeight-r)|0,l=d.data||null);c();d=k*h*4;l||(5121===f?l=new Uint8Array(d):5126===f&&(l=l||new Float32Array(d)));a.pixelStorei(3333,4);a.readPixels(g,r,k,h,6408,f,\nl);return l}function r(a){var c;b.setFBO({framebuffer:a.framebuffer},function(){c=f(a)});return c}return function(a){return a&&\"framebuffer\"in a?r(a):f(a)}}function Ba(a){return Array.prototype.slice.call(a)}function Ca(a){return Ba(a).join(\"\")}function Sb(){function a(){var a=[],b=[];return E(function(){a.push.apply(a,Ba(arguments))},{def:function(){var d=\"v\"+c++;b.push(d);0<arguments.length&&(a.push(d,\"=\"),a.push.apply(a,Ba(arguments)),a.push(\";\"));return d},toString:function(){return Ca([0<b.length?\n\"var \"+b+\";\":\"\",Ca(a)])}})}function b(){function b(a,e){d(a,e,\"=\",c.def(a,e),\";\")}var c=a(),d=a(),e=c.toString,g=d.toString;return E(function(){c.apply(c,Ba(arguments))},{def:c.def,entry:c,exit:d,save:b,set:function(a,d,e){b(a,d);c(a,d,\"=\",e,\";\")},toString:function(){return e()+g()}})}var c=0,e=[],g=[],d=a(),n={};return{global:d,link:function(a){for(var b=0;b<g.length;++b)if(g[b]===a)return e[b];b=\"g\"+c++;e.push(b);g.push(a);return b},block:a,proc:function(a,c){function d(){var a=\"a\"+e.length;e.push(a);\nreturn a}var e=[];c=c||0;for(var g=0;g<c;++g)d();var g=b(),C=g.toString;return n[a]=E(g,{arg:d,toString:function(){return Ca([\"function(\",e.join(),\"){\",C(),\"}\"])}})},scope:b,cond:function(){var a=Ca(arguments),c=b(),d=b(),e=c.toString,g=d.toString;return E(c,{then:function(){c.apply(c,Ba(arguments));return this},\"else\":function(){d.apply(d,Ba(arguments));return this},toString:function(){var b=g();b&&(b=\"else{\"+b+\"}\");return Ca([\"if(\",a,\"){\",e(),\"}\",b])}})},compile:function(){var a=['\"use strict\";',\nd,\"return {\"];Object.keys(n).forEach(function(b){a.push('\"',b,'\":',n[b].toString(),\",\")});a.push(\"}\");var b=Ca(a).replace(/;/g,\";\\n\").replace(/}/g,\"}\\n\").replace(/{/g,\"{\\n\");return Function.apply(null,e.concat(b)).apply(null,g)}}}function Oa(a){return Array.isArray(a)||M(a)||ma(a)}function vb(a){return a.sort(function(a,c){return\"viewport\"===a?-1:\"viewport\"===c?1:a<c?-1:1})}function Z(a,b,c,e){this.thisDep=a;this.contextDep=b;this.propDep=c;this.append=e}function va(a){return a&&!(a.thisDep||a.contextDep||\na.propDep)}function D(a){return new Z(!1,!1,!1,a)}function P(a,b){var c=a.type;return 0===c?(c=a.data.length,new Z(!0,1<=c,2<=c,b)):4===c?(c=a.data,new Z(c.thisDep,c.contextDep,c.propDep,b)):new Z(3===c,2===c,1===c,b)}function Tb(a,b,c,e,g,d,n,f,r,q,t,m,C,k,h){function l(a){return a.replace(\".\",\"_\")}function u(a,b,c){var d=l(a);Ka.push(a);Fa[d]=ra[d]=!!c;sa[d]=b}function v(a,b,c){var d=l(a);Ka.push(a);Array.isArray(c)?(ra[d]=c.slice(),Fa[d]=c.slice()):ra[d]=Fa[d]=c;ta[d]=b}function N(){var a=Sb(),\nc=a.link,d=a.global;a.id=qa++;a.batchId=\"0\";var e=c(na),f=a.shared={props:\"a0\"};Object.keys(na).forEach(function(a){f[a]=d.def(e,\".\",a)});var g=a.next={},xa=a.current={};Object.keys(ta).forEach(function(a){Array.isArray(ra[a])&&(g[a]=d.def(f.next,\".\",a),xa[a]=d.def(f.current,\".\",a))});var H=a.constants={};Object.keys(aa).forEach(function(a){H[a]=d.def(JSON.stringify(aa[a]))});a.invoke=function(b,d){switch(d.type){case 0:var e=[\"this\",f.context,f.props,a.batchId];return b.def(c(d.data),\".call(\",e.slice(0,\nMath.max(d.data.length+1,4)),\")\");case 1:return b.def(f.props,d.data);case 2:return b.def(f.context,d.data);case 3:return b.def(\"this\",d.data);case 4:return d.data.append(a,b),d.data.ref}};a.attribCache={};var Y={};a.scopeAttrib=function(a){a=b.id(a);if(a in Y)return Y[a];var d=q.scope[a];d||(d=q.scope[a]=new ya);return Y[a]=c(d)};return a}function B(a){var b=a[\"static\"];a=a.dynamic;var c;if(\"profile\"in b){var d=!!b.profile;c=D(function(a,b){return d});c.enable=d}else if(\"profile\"in a){var e=a.profile;\nc=P(e,function(a,b){return a.invoke(b,e)})}return c}function y(a,b){var c=a[\"static\"],d=a.dynamic;if(\"framebuffer\"in c){var e=c.framebuffer;return e?(e=f.getFramebuffer(e),D(function(a,b){var c=a.link(e),d=a.shared;b.set(d.framebuffer,\".next\",c);d=d.context;b.set(d,\".framebufferWidth\",c+\".width\");b.set(d,\".framebufferHeight\",c+\".height\");return c})):D(function(a,b){var c=a.shared;b.set(c.framebuffer,\".next\",\"null\");c=c.context;b.set(c,\".framebufferWidth\",c+\".drawingBufferWidth\");b.set(c,\".framebufferHeight\",\nc+\".drawingBufferHeight\");return\"null\"})}if(\"framebuffer\"in d){var g=d.framebuffer;return P(g,function(a,b){var c=a.invoke(b,g),d=a.shared,e=d.framebuffer,c=b.def(e,\".getFramebuffer(\",c,\")\");b.set(e,\".next\",c);d=d.context;b.set(d,\".framebufferWidth\",c+\"?\"+c+\".width:\"+d+\".drawingBufferWidth\");b.set(d,\".framebufferHeight\",c+\"?\"+c+\".height:\"+d+\".drawingBufferHeight\");return c})}return null}function x(a,b,c){function d(a){if(a in e){var c=e[a];a=!0;var p=c.x|0,ba=c.y|0,g,h;\"width\"in c?g=c.width|0:a=!1;\n\"height\"in c?h=c.height|0:a=!1;return new Z(!a&&b&&b.thisDep,!a&&b&&b.contextDep,!a&&b&&b.propDep,function(a,b){var d=a.shared.context,e=g;\"width\"in c||(e=b.def(d,\".\",\"framebufferWidth\",\"-\",p));var f=h;\"height\"in c||(f=b.def(d,\".\",\"framebufferHeight\",\"-\",ba));return[p,ba,e,f]})}if(a in f){var z=f[a];a=P(z,function(a,b){var c=a.invoke(b,z),d=a.shared.context,e=b.def(c,\".x|0\"),p=b.def(c,\".y|0\"),Y=b.def('\"width\" in ',c,\"?\",c,\".width|0:\",\"(\",d,\".\",\"framebufferWidth\",\"-\",e,\")\"),c=b.def('\"height\" in ',\nc,\"?\",c,\".height|0:\",\"(\",d,\".\",\"framebufferHeight\",\"-\",p,\")\");return[e,p,Y,c]});b&&(a.thisDep=a.thisDep||b.thisDep,a.contextDep=a.contextDep||b.contextDep,a.propDep=a.propDep||b.propDep);return a}return b?new Z(b.thisDep,b.contextDep,b.propDep,function(a,b){var c=a.shared.context;return[0,0,b.def(c,\".\",\"framebufferWidth\"),b.def(c,\".\",\"framebufferHeight\")]}):null}var e=a[\"static\"],f=a.dynamic;if(a=d(\"viewport\")){var g=a;a=new Z(a.thisDep,a.contextDep,a.propDep,function(a,b){var c=g.append(a,b),d=a.shared.context;\nb.set(d,\".viewportWidth\",c[2]);b.set(d,\".viewportHeight\",c[3]);return c})}return{viewport:a,scissor_box:d(\"scissor.box\")}}function E(a){function c(a){if(a in d){var p=b.id(d[a]);a=D(function(){return p});a.id=p;return a}if(a in e){var f=e[a];return P(f,function(a,b){var c=a.invoke(b,f);return b.def(a.shared.strings,\".id(\",c,\")\")})}return null}var d=a[\"static\"],e=a.dynamic,f=c(\"frag\"),g=c(\"vert\"),h=null;va(f)&&va(g)?(h=t.program(g.id,f.id),a=D(function(a,b){return a.link(h)})):a=new Z(f&&f.thisDep||\ng&&g.thisDep,f&&f.contextDep||g&&g.contextDep,f&&f.propDep||g&&g.propDep,function(a,b){var c=a.shared.shader,d;d=f?f.append(a,b):b.def(c,\".\",\"frag\");var e;e=g?g.append(a,b):b.def(c,\".\",\"vert\");return b.def(c+\".program(\"+e+\",\"+d+\")\")});return{frag:f,vert:g,progVar:a,program:h}}function O(a,b){function c(a,b){if(a in e){var d=e[a]|0;return D(function(a,c){b&&(a.OFFSET=d);return d})}if(a in f){var p=f[a];return P(p,function(a,c){var d=a.invoke(c,p);b&&(a.OFFSET=d);return d})}return b&&g?D(function(a,\nb){a.OFFSET=\"0\";return 0}):null}var e=a[\"static\"],f=a.dynamic,g=function(){if(\"elements\"in e){var a=e.elements;Oa(a)?a=d.getElements(d.create(a,!0)):a&&(a=d.getElements(a));var b=D(function(b,c){if(a){var d=b.link(a);return b.ELEMENTS=d}return b.ELEMENTS=null});b.value=a;return b}if(\"elements\"in f){var c=f.elements;return P(c,function(a,b){var d=a.shared,e=d.isBufferArgs,d=d.elements,p=a.invoke(b,c),f=b.def(\"null\"),e=b.def(e,\"(\",p,\")\"),p=a.cond(e).then(f,\"=\",d,\".createStream(\",p,\");\")[\"else\"](f,\"=\",\nd,\".getElements(\",p,\");\");b.entry(p);b.exit(a.cond(e).then(d,\".destroyStream(\",f,\");\"));return a.ELEMENTS=f})}return null}(),h=c(\"offset\",!0);return{elements:g,primitive:function(){if(\"primitive\"in e){var a=e.primitive;return D(function(b,c){return Sa[a]})}if(\"primitive\"in f){var b=f.primitive;return P(b,function(a,c){var d=a.constants.primTypes,e=a.invoke(c,b);return c.def(d,\"[\",e,\"]\")})}return g?va(g)?g.value?D(function(a,b){return b.def(a.ELEMENTS,\".primType\")}):D(function(){return 4}):new Z(g.thisDep,\ng.contextDep,g.propDep,function(a,b){var c=a.ELEMENTS;return b.def(c,\"?\",c,\".primType:\",4)}):null}(),count:function(){if(\"count\"in e){var a=e.count|0;return D(function(){return a})}if(\"count\"in f){var b=f.count;return P(b,function(a,c){return a.invoke(c,b)})}return g?va(g)?g?h?new Z(h.thisDep,h.contextDep,h.propDep,function(a,b){return b.def(a.ELEMENTS,\".vertCount-\",a.OFFSET)}):D(function(a,b){return b.def(a.ELEMENTS,\".vertCount\")}):D(function(){return-1}):new Z(g.thisDep||h.thisDep,g.contextDep||\nh.contextDep,g.propDep||h.propDep,function(a,b){var c=a.ELEMENTS;return a.OFFSET?b.def(c,\"?\",c,\".vertCount-\",a.OFFSET,\":-1\"):b.def(c,\"?\",c,\".vertCount:-1\")}):null}(),instances:c(\"instances\",!1),offset:h}}function R(a,b){var c=a[\"static\"],d=a.dynamic,e={};Ka.forEach(function(a){function b(f,g){if(a in c){var w=f(c[a]);e[p]=D(function(){return w})}else if(a in d){var h=d[a];e[p]=P(h,function(a,b){return g(a,b,a.invoke(b,h))})}}var p=l(a);switch(a){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 b(function(a){return a},\nfunction(a,b,c){return c});case \"depth.func\":return b(function(a){return Xa[a]},function(a,b,c){return b.def(a.constants.compareFuncs,\"[\",c,\"]\")});case \"depth.range\":return b(function(a){return a},function(a,b,c){a=b.def(\"+\",c,\"[0]\");b=b.def(\"+\",c,\"[1]\");return[a,b]});case \"blend.func\":return b(function(a){return[Ga[\"srcRGB\"in a?a.srcRGB:a.src],Ga[\"dstRGB\"in a?a.dstRGB:a.dst],Ga[\"srcAlpha\"in a?a.srcAlpha:a.src],Ga[\"dstAlpha\"in a?a.dstAlpha:a.dst]]},function(a,b,c){function d(a,e){return b.def('\"',\na,e,'\" in ',c,\"?\",c,\".\",a,e,\":\",c,\".\",a)}a=a.constants.blendFuncs;var e=d(\"src\",\"RGB\"),p=d(\"dst\",\"RGB\"),e=b.def(a,\"[\",e,\"]\"),f=b.def(a,\"[\",d(\"src\",\"Alpha\"),\"]\"),p=b.def(a,\"[\",p,\"]\");a=b.def(a,\"[\",d(\"dst\",\"Alpha\"),\"]\");return[e,p,f,a]});case \"blend.equation\":return b(function(a){if(\"string\"===typeof a)return[X[a],X[a]];if(\"object\"===typeof a)return[X[a.rgb],X[a.alpha]]},function(a,b,c){var d=a.constants.blendEquations,e=b.def(),p=b.def();a=a.cond(\"typeof \",c,'===\"string\"');a.then(e,\"=\",p,\"=\",d,\"[\",\nc,\"];\");a[\"else\"](e,\"=\",d,\"[\",c,\".rgb];\",p,\"=\",d,\"[\",c,\".alpha];\");b(a);return[e,p]});case \"blend.color\":return b(function(a){return J(4,function(b){return+a[b]})},function(a,b,c){return J(4,function(a){return b.def(\"+\",c,\"[\",a,\"]\")})});case \"stencil.mask\":return b(function(a){return a|0},function(a,b,c){return b.def(c,\"|0\")});case \"stencil.func\":return b(function(a){return[Xa[a.cmp||\"keep\"],a.ref||0,\"mask\"in a?a.mask:-1]},function(a,b,c){a=b.def('\"cmp\" in ',c,\"?\",a.constants.compareFuncs,\"[\",c,\".cmp]\",\n\":\",7680);var d=b.def(c,\".ref|0\");b=b.def('\"mask\" in ',c,\"?\",c,\".mask|0:-1\");return[a,d,b]});case \"stencil.opFront\":case \"stencil.opBack\":return b(function(b){return[\"stencil.opBack\"===a?1029:1028,Pa[b.fail||\"keep\"],Pa[b.zfail||\"keep\"],Pa[b.zpass||\"keep\"]]},function(b,c,d){function e(a){return c.def('\"',a,'\" in ',d,\"?\",p,\"[\",d,\".\",a,\"]:\",7680)}var p=b.constants.stencilOps;return[\"stencil.opBack\"===a?1029:1028,e(\"fail\"),e(\"zfail\"),e(\"zpass\")]});case \"polygonOffset.offset\":return b(function(a){return[a.factor|\n0,a.units|0]},function(a,b,c){a=b.def(c,\".factor|0\");b=b.def(c,\".units|0\");return[a,b]});case \"cull.face\":return b(function(a){var b=0;\"front\"===a?b=1028:\"back\"===a&&(b=1029);return b},function(a,b,c){return b.def(c,'===\"front\"?',1028,\":\",1029)});case \"lineWidth\":return b(function(a){return a},function(a,b,c){return c});case \"frontFace\":return b(function(a){return wb[a]},function(a,b,c){return b.def(c+'===\"cw\"?2304:2305')});case \"colorMask\":return b(function(a){return a.map(function(a){return!!a})},\nfunction(a,b,c){return J(4,function(a){return\"!!\"+c+\"[\"+a+\"]\"})});case \"sample.coverage\":return b(function(a){return[\"value\"in a?a.value:1,!!a.invert]},function(a,b,c){a=b.def('\"value\" in ',c,\"?+\",c,\".value:1\");b=b.def(\"!!\",c,\".invert\");return[a,b]})}});return e}function F(a,b){var c=a[\"static\"],d=a.dynamic,e={};Object.keys(c).forEach(function(a){var b=c[a],d;if(\"number\"===typeof b||\"boolean\"===typeof b)d=D(function(){return b});else if(\"function\"===typeof b){var p=b._reglType;if(\"texture2d\"===p||\n\"textureCube\"===p)d=D(function(a){return a.link(b)});else if(\"framebuffer\"===p||\"framebufferCube\"===p)d=D(function(a){return a.link(b.color[0])})}else pa(b)&&(d=D(function(a){return a.global.def(\"[\",J(b.length,function(a){return b[a]}),\"]\")}));d.value=b;e[a]=d});Object.keys(d).forEach(function(a){var b=d[a];e[a]=P(b,function(a,c){return a.invoke(c,b)})});return e}function T(a,c){var d=a[\"static\"],e=a.dynamic,f={};Object.keys(d).forEach(function(a){var c=d[a],e=b.id(a),p=new ya;if(Oa(c))p.state=1,\np.buffer=g.getBuffer(g.create(c,34962,!1,!0)),p.type=0;else{var w=g.getBuffer(c);if(w)p.state=1,p.buffer=w,p.type=0;else if(\"constant\"in c){var h=c.constant;p.buffer=\"null\";p.state=2;\"number\"===typeof h?p.x=h:Da.forEach(function(a,b){b<h.length&&(p[a]=h[b])})}else{var w=Oa(c.buffer)?g.getBuffer(g.create(c.buffer,34962,!1,!0)):g.getBuffer(c.buffer),k=c.offset|0,m=c.stride|0,I=c.size|0,l=!!c.normalized,n=0;\"type\"in c&&(n=Ra[c.type]);c=c.divisor|0;p.buffer=w;p.state=1;p.size=I;p.normalized=l;p.type=\nn||w.dtype;p.offset=k;p.stride=m;p.divisor=c}}f[a]=D(function(a,b){var c=a.attribCache;if(e in c)return c[e];var d={isStream:!1};Object.keys(p).forEach(function(a){d[a]=p[a]});p.buffer&&(d.buffer=a.link(p.buffer),d.type=d.type||d.buffer+\".dtype\");return c[e]=d})});Object.keys(e).forEach(function(a){var b=e[a];f[a]=P(b,function(a,c){function d(a){c(w[a],\"=\",e,\".\",a,\"|0;\")}var e=a.invoke(c,b),p=a.shared,f=p.isBufferArgs,g=p.buffer,w={isStream:c.def(!1)},h=new ya;h.state=1;Object.keys(h).forEach(function(a){w[a]=\nc.def(\"\"+h[a])});var z=w.buffer,k=w.type;c(\"if(\",f,\"(\",e,\")){\",w.isStream,\"=true;\",z,\"=\",g,\".createStream(\",34962,\",\",e,\");\",k,\"=\",z,\".dtype;\",\"}else{\",z,\"=\",g,\".getBuffer(\",e,\");\",\"if(\",z,\"){\",k,\"=\",z,\".dtype;\",'}else if(\"constant\" in ',e,\"){\",w.state,\"=\",2,\";\",\"if(typeof \"+e+'.constant === \"number\"){',w[Da[0]],\"=\",e,\".constant;\",Da.slice(1).map(function(a){return w[a]}).join(\"=\"),\"=0;\",\"}else{\",Da.map(function(a,b){return w[a]+\"=\"+e+\".constant.length>\"+b+\"?\"+e+\".constant[\"+b+\"]:0;\"}).join(\"\"),\"}}else{\",\n\"if(\",f,\"(\",e,\".buffer)){\",z,\"=\",g,\".createStream(\",34962,\",\",e,\".buffer);\",\"}else{\",z,\"=\",g,\".getBuffer(\",e,\".buffer);\",\"}\",k,'=\"type\" in ',e,\"?\",p.glTypes,\"[\",e,\".type]:\",z,\".dtype;\",w.normalized,\"=!!\",e,\".normalized;\");d(\"size\");d(\"offset\");d(\"stride\");d(\"divisor\");c(\"}}\");c.exit(\"if(\",w.isStream,\"){\",g,\".destroyStream(\",z,\");\",\"}\");return w})});return f}function M(a){var b=a[\"static\"],c=a.dynamic,d={};Object.keys(b).forEach(function(a){var c=b[a];d[a]=D(function(a,b){return\"number\"===typeof c||\n\"boolean\"===typeof c?\"\"+c:a.link(c)})});Object.keys(c).forEach(function(a){var b=c[a];d[a]=P(b,function(a,c){return a.invoke(c,b)})});return d}function A(a,b,c,d,e){var f=y(a,e),g=x(a,f,e),h=O(a,e),k=R(a,e),m=E(a,e),ba=g.viewport;ba&&(k.viewport=ba);ba=l(\"scissor.box\");(g=g[ba])&&(k[ba]=g);g=0<Object.keys(k).length;f={framebuffer:f,draw:h,shader:m,state:k,dirty:g};f.profile=B(a,e);f.uniforms=F(c,e);f.attributes=T(b,e);f.context=M(d,e);return f}function ua(a,b,c){var d=a.shared.context,e=a.scope();\nObject.keys(c).forEach(function(f){b.save(d,\".\"+f);e(d,\".\",f,\"=\",c[f].append(a,b),\";\")});b(e)}function K(a,b,c,d){var e=a.shared,f=e.gl,g=e.framebuffer,h;ha&&(h=b.def(e.extensions,\".webgl_draw_buffers\"));var k=a.constants,e=k.drawBuffer,k=k.backBuffer;a=c?c.append(a,b):b.def(g,\".next\");d||b(\"if(\",a,\"!==\",g,\".cur){\");b(\"if(\",a,\"){\",f,\".bindFramebuffer(\",36160,\",\",a,\".framebuffer);\");ha&&b(h,\".drawBuffersWEBGL(\",e,\"[\",a,\".colorAttachments.length]);\");b(\"}else{\",f,\".bindFramebuffer(\",36160,\",null);\");\nha&&b(h,\".drawBuffersWEBGL(\",k,\");\");b(\"}\",g,\".cur=\",a,\";\");d||b(\"}\")}function V(a,b,c){var d=a.shared,e=d.gl,f=a.current,g=a.next,h=d.current,k=d.next,m=a.cond(h,\".dirty\");Ka.forEach(function(b){b=l(b);if(!(b in c.state)){var d,w;if(b in g){d=g[b];w=f[b];var I=J(ra[b].length,function(a){return m.def(d,\"[\",a,\"]\")});m(a.cond(I.map(function(a,b){return a+\"!==\"+w+\"[\"+b+\"]\"}).join(\"||\")).then(e,\".\",ta[b],\"(\",I,\");\",I.map(function(a,b){return w+\"[\"+b+\"]=\"+a}).join(\";\"),\";\"))}else d=m.def(k,\".\",b),I=a.cond(d,\n\"!==\",h,\".\",b),m(I),b in sa?I(a.cond(d).then(e,\".enable(\",sa[b],\");\")[\"else\"](e,\".disable(\",sa[b],\");\"),h,\".\",b,\"=\",d,\";\"):I(e,\".\",ta[b],\"(\",d,\");\",h,\".\",b,\"=\",d,\";\")}});0===Object.keys(c.state).length&&m(h,\".dirty=false;\");b(m)}function Q(a,b,c,d){var e=a.shared,f=a.current,g=e.current,h=e.gl;vb(Object.keys(c)).forEach(function(e){var k=c[e];if(!d||d(k)){var m=k.append(a,b);if(sa[e]){var l=sa[e];va(k)?m?b(h,\".enable(\",l,\");\"):b(h,\".disable(\",l,\");\"):b(a.cond(m).then(h,\".enable(\",l,\");\")[\"else\"](h,\n\".disable(\",l,\");\"));b(g,\".\",e,\"=\",m,\";\")}else if(pa(m)){var n=f[e];b(h,\".\",ta[e],\"(\",m,\");\",m.map(function(a,b){return n+\"[\"+b+\"]=\"+a}).join(\";\"),\";\")}else b(h,\".\",ta[e],\"(\",m,\");\",g,\".\",e,\"=\",m,\";\")}})}function wa(a,b){ea&&(a.instancing=b.def(a.shared.extensions,\".angle_instanced_arrays\"))}function G(a,b,c,d,e){function f(){return\"undefined\"===typeof performance?\"Date.now()\":\"performance.now()\"}function g(a){t=b.def();a(t,\"=\",f(),\";\");\"string\"===typeof e?a(ba,\".count+=\",e,\";\"):a(ba,\".count++;\");\nk&&(d?(r=b.def(),a(r,\"=\",q,\".getNumPendingQueries();\")):a(q,\".beginQuery(\",ba,\");\"))}function h(a){a(ba,\".cpuTime+=\",f(),\"-\",t,\";\");k&&(d?a(q,\".pushScopeStats(\",r,\",\",q,\".getNumPendingQueries(),\",ba,\");\"):a(q,\".endQuery();\"))}function m(a){var c=b.def(n,\".profile\");b(n,\".profile=\",a,\";\");b.exit(n,\".profile=\",c,\";\")}var l=a.shared,ba=a.stats,n=l.current,q=l.timer;c=c.profile;var t,r;if(c){if(va(c)){c.enable?(g(b),h(b.exit),m(\"true\")):m(\"false\");return}c=c.append(a,b);m(c)}else c=b.def(n,\".profile\");\nl=a.block();g(l);b(\"if(\",c,\"){\",l,\"}\");a=a.block();h(a);b.exit(\"if(\",c,\"){\",a,\"}\")}function U(a,b,c,d,e){function f(a){switch(a){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}}function g(c,d,e){function f(){b(\"if(!\",z,\".buffer){\",k,\".enableVertexAttribArray(\",l,\");}\");var c=e.type,g;g=e.size?b.def(e.size,\"||\",d):d;b(\"if(\",z,\".type!==\",c,\"||\",z,\".size!==\",g,\"||\",q.map(function(a){return z+\".\"+a+\"!==\"+e[a]}).join(\"||\"),\n\"){\",k,\".bindBuffer(\",34962,\",\",I,\".buffer);\",k,\".vertexAttribPointer(\",[l,g,c,e.normalized,e.stride,e.offset],\");\",z,\".type=\",c,\";\",z,\".size=\",g,\";\",q.map(function(a){return z+\".\"+a+\"=\"+e[a]+\";\"}).join(\"\"),\"}\");ea&&(c=e.divisor,b(\"if(\",z,\".divisor!==\",c,\"){\",a.instancing,\".vertexAttribDivisorANGLE(\",[l,c],\");\",z,\".divisor=\",c,\";}\"))}function m(){b(\"if(\",z,\".buffer){\",k,\".disableVertexAttribArray(\",l,\");\",\"}if(\",Da.map(function(a,b){return z+\".\"+a+\"!==\"+n[b]}).join(\"||\"),\"){\",k,\".vertexAttrib4f(\",\nl,\",\",n,\");\",Da.map(function(a,b){return z+\".\"+a+\"=\"+n[b]+\";\"}).join(\"\"),\"}\")}var k=h.gl,l=b.def(c,\".location\"),z=b.def(h.attributes,\"[\",l,\"]\");c=e.state;var I=e.buffer,n=[e.x,e.y,e.z,e.w],q=[\"buffer\",\"normalized\",\"offset\",\"stride\"];1===c?f():2===c?m():(b(\"if(\",c,\"===\",1,\"){\"),f(),b(\"}else{\"),m(),b(\"}\"))}var h=a.shared;d.forEach(function(d){var h=d.name,k=c.attributes[h],m;if(k){if(!e(k))return;m=k.append(a,b)}else{if(!e(xb))return;var l=a.scopeAttrib(h);m={};Object.keys(new ya).forEach(function(a){m[a]=\nb.def(l,\".\",a)})}g(a.link(d),f(d.info.type),m)})}function W(a,c,d,e,f){for(var g=a.shared,h=g.gl,k,m=0;m<e.length;++m){var l=e[m],n=l.name,q=l.info.type,t=d.uniforms[n],l=a.link(l)+\".location\",r;if(t){if(!f(t))continue;if(va(t)){n=t.value;if(35678===q||35680===q)q=a.link(n._texture||n.color[0]._texture),c(h,\".uniform1i(\",l,\",\",q+\".bind());\"),c.exit(q,\".unbind();\");else if(35674===q||35675===q||35676===q)n=a.global.def(\"new Float32Array([\"+Array.prototype.slice.call(n)+\"])\"),t=2,35675===q?t=3:35676===\nq&&(t=4),c(h,\".uniformMatrix\",t,\"fv(\",l,\",false,\",n,\");\");else{switch(q){case 5126:k=\"1f\";break;case 35664:k=\"2f\";break;case 35665:k=\"3f\";break;case 35666:k=\"4f\";break;case 35670:k=\"1i\";break;case 5124:k=\"1i\";break;case 35671:k=\"2i\";break;case 35667:k=\"2i\";break;case 35672:k=\"3i\";break;case 35668:k=\"3i\";break;case 35673:k=\"4i\";break;case 35669:k=\"4i\"}c(h,\".uniform\",k,\"(\",l,\",\",pa(n)?Array.prototype.slice.call(n):n,\");\")}continue}else r=t.append(a,c)}else{if(!f(xb))continue;r=c.def(g.uniforms,\"[\",\nb.id(n),\"]\")}35678===q?c(\"if(\",r,\"&&\",r,'._reglType===\"framebuffer\"){',r,\"=\",r,\".color[0];\",\"}\"):35680===q&&c(\"if(\",r,\"&&\",r,'._reglType===\"framebufferCube\"){',r,\"=\",r,\".color[0];\",\"}\");n=1;switch(q){case 35678:case 35680:q=c.def(r,\"._texture\");c(h,\".uniform1i(\",l,\",\",q,\".bind());\");c.exit(q,\".unbind();\");continue;case 5124:case 35670:k=\"1i\";break;case 35667:case 35671:k=\"2i\";n=2;break;case 35668:case 35672:k=\"3i\";n=3;break;case 35669:case 35673:k=\"4i\";n=4;break;case 5126:k=\"1f\";break;case 35664:k=\n\"2f\";n=2;break;case 35665:k=\"3f\";n=3;break;case 35666:k=\"4f\";n=4;break;case 35674:k=\"Matrix2fv\";break;case 35675:k=\"Matrix3fv\";break;case 35676:k=\"Matrix4fv\"}c(h,\".uniform\",k,\"(\",l,\",\");if(\"M\"===k.charAt(0)){var l=Math.pow(q-35674+2,2),v=a.global.def(\"new Float32Array(\",l,\")\");c(\"false,(Array.isArray(\",r,\")||\",r,\" instanceof Float32Array)?\",r,\":(\",J(l,function(a){return v+\"[\"+a+\"]=\"+r+\"[\"+a+\"]\"}),\",\",v,\")\")}else 1<n?c(J(n,function(a){return r+\"[\"+a+\"]\"})):c(r);c(\");\")}}function S(a,b,c,d){function e(f){var g=\nl[f];return g?g.contextDep&&d.contextDynamic||g.propDep?g.append(a,c):g.append(a,b):b.def(m,\".\",f)}function f(){function a(){c(u,\".drawElementsInstancedANGLE(\",[q,t,C,r+\"<<((\"+C+\"-5121)>>1)\",v],\");\")}function b(){c(u,\".drawArraysInstancedANGLE(\",[q,r,t,v],\");\")}n?da?a():(c(\"if(\",n,\"){\"),a(),c(\"}else{\"),b(),c(\"}\")):b()}function g(){function a(){c(k+\".drawElements(\"+[q,t,C,r+\"<<((\"+C+\"-5121)>>1)\"]+\");\")}function b(){c(k+\".drawArrays(\"+[q,r,t]+\");\")}n?da?a():(c(\"if(\",n,\"){\"),a(),c(\"}else{\"),b(),c(\"}\")):\nb()}var h=a.shared,k=h.gl,m=h.draw,l=d.draw,n=function(){var e=l.elements,f=b;if(e){if(e.contextDep&&d.contextDynamic||e.propDep)f=c;e=e.append(a,f)}else e=f.def(m,\".\",\"elements\");e&&f(\"if(\"+e+\")\"+k+\".bindBuffer(34963,\"+e+\".buffer.buffer);\");return e}(),q=e(\"primitive\"),r=e(\"offset\"),t=function(){var e=l.count,f=b;if(e){if(e.contextDep&&d.contextDynamic||e.propDep)f=c;e=e.append(a,f)}else e=f.def(m,\".\",\"count\");return e}();if(\"number\"===typeof t){if(0===t)return}else c(\"if(\",t,\"){\"),c.exit(\"}\");var v,\nu;ea&&(v=e(\"instances\"),u=a.instancing);var C=n+\".type\",da=l.elements&&va(l.elements);ea&&(\"number\"!==typeof v||0<=v)?\"string\"===typeof v?(c(\"if(\",v,\">0){\"),f(),c(\"}else if(\",v,\"<0){\"),g(),c(\"}\")):f():g()}function ca(a,b,c,d,e){b=N();e=b.proc(\"body\",e);ea&&(b.instancing=e.def(b.shared.extensions,\".angle_instanced_arrays\"));a(b,e,c,d);return b.compile().body}function L(a,b,c,d){wa(a,b);U(a,b,c,d.attributes,function(){return!0});W(a,b,c,d.uniforms,function(){return!0});S(a,b,b,c)}function da(a,b){var c=\na.proc(\"draw\",1);wa(a,c);ua(a,c,b.context);K(a,c,b.framebuffer);V(a,c,b);Q(a,c,b.state);G(a,c,b,!1,!0);var d=b.shader.progVar.append(a,c);c(a.shared.gl,\".useProgram(\",d,\".program);\");if(b.shader.program)L(a,c,b,b.shader.program);else{var e=a.global.def(\"{}\"),f=c.def(d,\".id\"),g=c.def(e,\"[\",f,\"]\");c(a.cond(g).then(g,\".call(this,a0);\")[\"else\"](g,\"=\",e,\"[\",f,\"]=\",a.link(function(c){return ca(L,a,b,c,1)}),\"(\",d,\");\",g,\".call(this,a0);\"))}0<Object.keys(b.state).length&&c(a.shared.current,\".dirty=true;\")}\nfunction oa(a,b,c,d){function e(){return!0}a.batchId=\"a1\";wa(a,b);U(a,b,c,d.attributes,e);W(a,b,c,d.uniforms,e);S(a,b,b,c)}function za(a,b,c,d){function e(a){return a.contextDep&&g||a.propDep}function f(a){return!e(a)}wa(a,b);var g=c.contextDep,h=b.def(),k=b.def();a.shared.props=k;a.batchId=h;var m=a.scope(),l=a.scope();b(m.entry,\"for(\",h,\"=0;\",h,\"<\",\"a1\",\";++\",h,\"){\",k,\"=\",\"a0\",\"[\",h,\"];\",l,\"}\",m.exit);c.needsContext&&ua(a,l,c.context);c.needsFramebuffer&&K(a,l,c.framebuffer);Q(a,l,c.state,e);c.profile&&\ne(c.profile)&&G(a,l,c,!1,!0);d?(U(a,m,c,d.attributes,f),U(a,l,c,d.attributes,e),W(a,m,c,d.uniforms,f),W(a,l,c,d.uniforms,e),S(a,m,l,c)):(b=a.global.def(\"{}\"),d=c.shader.progVar.append(a,l),k=l.def(d,\".id\"),m=l.def(b,\"[\",k,\"]\"),l(a.shared.gl,\".useProgram(\",d,\".program);\",\"if(!\",m,\"){\",m,\"=\",b,\"[\",k,\"]=\",a.link(function(b){return ca(oa,a,c,b,2)}),\"(\",d,\");}\",m,\".call(this,a0[\",h,\"],\",h,\");\"))}function ka(a,b){function c(a){return a.contextDep&&e||a.propDep}var d=a.proc(\"batch\",2);a.batchId=\"0\";wa(a,\nd);var e=!1,f=!0;Object.keys(b.context).forEach(function(a){e=e||b.context[a].propDep});e||(ua(a,d,b.context),f=!1);var g=b.framebuffer,h=!1;g?(g.propDep?e=h=!0:g.contextDep&&e&&(h=!0),h||K(a,d,g)):K(a,d,null);b.state.viewport&&b.state.viewport.propDep&&(e=!0);V(a,d,b);Q(a,d,b.state,function(a){return!c(a)});b.profile&&c(b.profile)||G(a,d,b,!1,\"a1\");b.contextDep=e;b.needsContext=f;b.needsFramebuffer=h;f=b.shader.progVar;if(f.contextDep&&e||f.propDep)za(a,d,b,null);else if(f=f.append(a,d),d(a.shared.gl,\n\".useProgram(\",f,\".program);\"),b.shader.program)za(a,d,b,b.shader.program);else{var g=a.global.def(\"{}\"),h=d.def(f,\".id\"),k=d.def(g,\"[\",h,\"]\");d(a.cond(k).then(k,\".call(this,a0,a1);\")[\"else\"](k,\"=\",g,\"[\",h,\"]=\",a.link(function(c){return ca(za,a,b,c,2)}),\"(\",f,\");\",k,\".call(this,a0,a1);\"))}0<Object.keys(b.state).length&&d(a.shared.current,\".dirty=true;\")}function ia(a,c){function d(b){var g=c.shader[b];g&&e.set(f.shader,\".\"+b,g.append(a,e))}var e=a.proc(\"scope\",3);a.batchId=\"a2\";var f=a.shared,g=f.current;\nua(a,e,c.context);c.framebuffer&&c.framebuffer.append(a,e);vb(Object.keys(c.state)).forEach(function(b){var d=c.state[b].append(a,e);pa(d)?d.forEach(function(c,d){e.set(a.next[b],\"[\"+d+\"]\",c)}):e.set(f.next,\".\"+b,d)});G(a,e,c,!0,!0);[\"elements\",\"offset\",\"count\",\"instances\",\"primitive\"].forEach(function(b){var d=c.draw[b];d&&e.set(f.draw,\".\"+b,\"\"+d.append(a,e))});Object.keys(c.uniforms).forEach(function(d){e.set(f.uniforms,\"[\"+b.id(d)+\"]\",c.uniforms[d].append(a,e))});Object.keys(c.attributes).forEach(function(b){var d=\nc.attributes[b].append(a,e),f=a.scopeAttrib(b);Object.keys(new ya).forEach(function(a){e.set(f,\".\"+a,d[a])})});d(\"vert\");d(\"frag\");0<Object.keys(c.state).length&&(e(g,\".dirty=true;\"),e.exit(g,\".dirty=true;\"));e(\"a1(\",a.shared.context,\",a0,\",a.batchId,\");\")}function ma(a){if(\"object\"===typeof a&&!pa(a)){for(var b=Object.keys(a),c=0;c<b.length;++c)if(la.isDynamic(a[b[c]]))return!0;return!1}}function ja(a,b,c){function d(a,b){g.forEach(function(c){var d=e[c];la.isDynamic(d)&&(d=a.invoke(b,d),b(l,\".\",\nc,\"=\",d,\";\"))})}var e=b[\"static\"][c];if(e&&ma(e)){var f=a.global,g=Object.keys(e),h=!1,k=!1,m=!1,l=a.global.def(\"{}\");g.forEach(function(b){var c=e[b];if(la.isDynamic(c))\"function\"===typeof c&&(c=e[b]=la.unbox(c)),b=P(c,null),h=h||b.thisDep,m=m||b.propDep,k=k||b.contextDep;else{f(l,\".\",b,\"=\");switch(typeof c){case \"number\":f(c);break;case \"string\":f('\"',c,'\"');break;case \"object\":Array.isArray(c)&&f(\"[\",c.join(),\"]\");break;default:f(a.link(c))}f(\";\")}});b.dynamic[c]=new la.DynamicVariable(4,{thisDep:h,\ncontextDep:k,propDep:m,ref:l,append:d});delete b[\"static\"][c]}}var ya=q.Record,X={add:32774,subtract:32778,\"reverse subtract\":32779};c.ext_blend_minmax&&(X.min=32775,X.max=32776);var ea=c.angle_instanced_arrays,ha=c.webgl_draw_buffers,ra={dirty:!0,profile:h.profile},Fa={},Ka=[],sa={},ta={};u(\"dither\",3024);u(\"blend.enable\",3042);v(\"blend.color\",\"blendColor\",[0,0,0,0]);v(\"blend.equation\",\"blendEquationSeparate\",[32774,32774]);v(\"blend.func\",\"blendFuncSeparate\",[1,0,1,0]);u(\"depth.enable\",2929,!0);\nv(\"depth.func\",\"depthFunc\",513);v(\"depth.range\",\"depthRange\",[0,1]);v(\"depth.mask\",\"depthMask\",!0);v(\"colorMask\",\"colorMask\",[!0,!0,!0,!0]);u(\"cull.enable\",2884);v(\"cull.face\",\"cullFace\",1029);v(\"frontFace\",\"frontFace\",2305);v(\"lineWidth\",\"lineWidth\",1);u(\"polygonOffset.enable\",32823);v(\"polygonOffset.offset\",\"polygonOffset\",[0,0]);u(\"sample.alpha\",32926);u(\"sample.enable\",32928);v(\"sample.coverage\",\"sampleCoverage\",[1,!1]);u(\"stencil.enable\",2960);v(\"stencil.mask\",\"stencilMask\",-1);v(\"stencil.func\",\n\"stencilFunc\",[519,0,-1]);v(\"stencil.opFront\",\"stencilOpSeparate\",[1028,7680,7680,7680]);v(\"stencil.opBack\",\"stencilOpSeparate\",[1029,7680,7680,7680]);u(\"scissor.enable\",3089);v(\"scissor.box\",\"scissor\",[0,0,a.drawingBufferWidth,a.drawingBufferHeight]);v(\"viewport\",\"viewport\",[0,0,a.drawingBufferWidth,a.drawingBufferHeight]);var na={gl:a,context:C,strings:b,next:Fa,current:ra,draw:m,elements:d,buffer:g,shader:t,attributes:q.state,uniforms:r,framebuffer:f,extensions:c,timer:k,isBufferArgs:Oa},aa={primTypes:Sa,\ncompareFuncs:Xa,blendFuncs:Ga,blendEquations:X,stencilOps:Pa,glTypes:Ra,orientationType:wb};ha&&(aa.backBuffer=[1029],aa.drawBuffer=J(e.maxDrawbuffers,function(a){return 0===a?[0]:J(a,function(a){return 36064+a})}));var qa=0;return{next:Fa,current:ra,procs:function(){var a=N(),b=a.proc(\"poll\"),c=a.proc(\"refresh\"),d=a.block();b(d);c(d);var f=a.shared,g=f.gl,h=f.next,k=f.current;d(k,\".dirty=false;\");K(a,b);K(a,c,null,!0);var m;ea&&(m=a.link(ea));for(var l=0;l<e.maxAttributes;++l){var n=c.def(f.attributes,\n\"[\",l,\"]\"),q=a.cond(n,\".buffer\");q.then(g,\".enableVertexAttribArray(\",l,\");\",g,\".bindBuffer(\",34962,\",\",n,\".buffer.buffer);\",g,\".vertexAttribPointer(\",l,\",\",n,\".size,\",n,\".type,\",n,\".normalized,\",n,\".stride,\",n,\".offset);\")[\"else\"](g,\".disableVertexAttribArray(\",l,\");\",g,\".vertexAttrib4f(\",l,\",\",n,\".x,\",n,\".y,\",n,\".z,\",n,\".w);\",n,\".buffer=null;\");c(q);ea&&c(m,\".vertexAttribDivisorANGLE(\",l,\",\",n,\".divisor);\")}Object.keys(sa).forEach(function(e){var f=sa[e],m=d.def(h,\".\",e),l=a.block();l(\"if(\",m,\"){\",\ng,\".enable(\",f,\")}else{\",g,\".disable(\",f,\")}\",k,\".\",e,\"=\",m,\";\");c(l);b(\"if(\",m,\"!==\",k,\".\",e,\"){\",l,\"}\")});Object.keys(ta).forEach(function(e){var f=ta[e],m=ra[e],l,n,q=a.block();q(g,\".\",f,\"(\");pa(m)?(f=m.length,l=a.global.def(h,\".\",e),n=a.global.def(k,\".\",e),q(J(f,function(a){return l+\"[\"+a+\"]\"}),\");\",J(f,function(a){return n+\"[\"+a+\"]=\"+l+\"[\"+a+\"];\"}).join(\"\")),b(\"if(\",J(f,function(a){return l+\"[\"+a+\"]!==\"+n+\"[\"+a+\"]\"}).join(\"||\"),\"){\",q,\"}\")):(l=d.def(h,\".\",e),n=d.def(k,\".\",e),q(l,\");\",k,\".\",e,\n\"=\",l,\";\"),b(\"if(\",l,\"!==\",n,\"){\",q,\"}\"));c(q)});return a.compile()}(),compile:function(a,b,c,d,e){var f=N();f.stats=f.link(e);Object.keys(b[\"static\"]).forEach(function(a){ja(f,b,a)});Ub.forEach(function(b){ja(f,a,b)});c=A(a,b,c,d,f);da(f,c);ia(f,c);ka(f,c);return f.compile()}}}function yb(a,b){for(var c=0;c<a.length;++c)if(a[c]===b)return c;return-1}var E=function(a,b){for(var c=Object.keys(b),e=0;e<c.length;++e)a[c[e]]=b[c[e]];return a},Ab=0,la={DynamicVariable:aa,define:function(a,b){return new aa(a,\nZa(b+\"\"))},isDynamic:function(a){return\"function\"===typeof a&&!a._reglType||a instanceof aa},unbox:function(a,b){return\"function\"===typeof a?new aa(0,a):a},accessor:Za},Ya={next:\"function\"===typeof requestAnimationFrame?function(a){return requestAnimationFrame(a)}:function(a){return setTimeout(a,16)},cancel:\"function\"===typeof cancelAnimationFrame?function(a){return cancelAnimationFrame(a)}:clearTimeout},zb=\"undefined\"!==typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},\nx=cb();x.zero=cb();var Vb=function(a,b){var c=1;b.ext_texture_filter_anisotropic&&(c=a.getParameter(34047));var e=1,g=1;b.webgl_draw_buffers&&(e=a.getParameter(34852),g=a.getParameter(36063));var d=!!b.oes_texture_float;if(d){d=a.createTexture();a.bindTexture(3553,d);a.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var n=a.createFramebuffer();a.bindFramebuffer(36160,n);a.framebufferTexture2D(36160,36064,3553,d,0);a.bindTexture(3553,null);if(36053!==a.checkFramebufferStatus(36160))d=!1;else{a.viewport(0,\n0,1,1);a.clearColor(1,0,0,1);a.clear(16384);var f=x.allocType(5126,4);a.readPixels(0,0,1,1,6408,5126,f);a.getError()?d=!1:(a.deleteFramebuffer(n),a.deleteTexture(d),d=1===f[0]);x.freeType(f)}}f=!0;\"undefined\"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(f=a.createTexture(),n=x.allocType(5121,36),a.activeTexture(33984),a.bindTexture(34067,f),a.texImage2D(34069,0,6408,3,3,0,6408,5121,n),x.freeType(n),a.bindTexture(34067,\nnull),a.deleteTexture(f),f=!a.getError());return{colorBits:[a.getParameter(3410),a.getParameter(3411),a.getParameter(3412),a.getParameter(3413)],depthBits:a.getParameter(3414),stencilBits:a.getParameter(3415),subpixelBits:a.getParameter(3408),extensions:Object.keys(b).filter(function(a){return!!b[a]}),maxAnisotropic:c,maxDrawbuffers:e,maxColorAttachments:g,pointSizeDims:a.getParameter(33901),lineWidthDims:a.getParameter(33902),maxViewportDims:a.getParameter(3386),maxCombinedTextureUnits:a.getParameter(35661),\nmaxCubeMapSize:a.getParameter(34076),maxRenderbufferSize:a.getParameter(34024),maxTextureUnits:a.getParameter(34930),maxTextureSize:a.getParameter(3379),maxAttributes:a.getParameter(34921),maxVertexUniforms:a.getParameter(36347),maxVertexTextureUnits:a.getParameter(35660),maxVaryingVectors:a.getParameter(36348),maxFragmentUniforms:a.getParameter(36349),glsl:a.getParameter(35724),renderer:a.getParameter(7937),vendor:a.getParameter(7936),version:a.getParameter(7938),readFloat:d,npotTextureCube:f}},\nM=function(a){return a instanceof Uint8Array||a instanceof Uint16Array||a instanceof Uint32Array||a instanceof Int8Array||a instanceof Int16Array||a instanceof Int32Array||a instanceof Float32Array||a instanceof Float64Array||a instanceof Uint8ClampedArray},S=function(a){return Object.keys(a).map(function(b){return a[b]})},Ma={shape:function(a){for(var b=[];a.length;a=a[0])b.push(a.length);return b},flatten:function(a,b,c,e){var g=1;if(b.length)for(var d=0;d<b.length;++d)g*=b[d];else g=0;c=e||x.allocType(c,\ng);switch(b.length){case 0:break;case 1:e=b[0];for(b=0;b<e;++b)c[b]=a[b];break;case 2:e=b[0];b=b[1];for(d=g=0;d<e;++d)for(var n=a[d],f=0;f<b;++f)c[g++]=n[f];break;case 3:db(a,b[0],b[1],b[2],c,0);break;default:eb(a,b,0,c,0)}return c}},Ia={\"[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},\nRa={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,\"float\":5126,float32:5126},jb={dynamic:35048,stream:35040,\"static\":35044},Qa=Ma.flatten,hb=Ma.shape,ja=[];ja[5120]=1;ja[5122]=2;ja[5124]=4;ja[5121]=1;ja[5123]=2;ja[5125]=4;ja[5126]=4;var Sa={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},lb=new Float32Array(1),Ib=new Uint32Array(lb.buffer),Mb=[9984,9986,9985,9987],La=[0,6409,6410,6407,6408],L={};L[6409]=\nL[6406]=L[6402]=1;L[34041]=L[6410]=2;L[6407]=L[35904]=3;L[6408]=L[35906]=4;var Ua=Ea(\"HTMLCanvasElement\"),pb=Ea(\"CanvasRenderingContext2D\"),qb=Ea(\"ImageBitmap\"),rb=Ea(\"HTMLImageElement\"),sb=Ea(\"HTMLVideoElement\"),Jb=Object.keys(Ia).concat([Ua,pb,qb,rb,sb]),qa=[];qa[5121]=1;qa[5126]=4;qa[36193]=2;qa[5123]=2;qa[5125]=4;var y=[];y[32854]=2;y[32855]=2;y[36194]=2;y[34041]=4;y[33776]=.5;y[33777]=.5;y[33778]=1;y[33779]=1;y[35986]=.5;y[35987]=1;y[34798]=1;y[35840]=.5;y[35841]=.25;y[35842]=.5;y[35843]=.25;\ny[36196]=.5;var Q=[];Q[32854]=2;Q[32855]=2;Q[36194]=2;Q[33189]=2;Q[36168]=1;Q[34041]=4;Q[35907]=4;Q[34836]=16;Q[34842]=8;Q[34843]=6;var Wb=function(a,b,c,e,g){function d(a){this.id=q++;this.refCount=1;this.renderbuffer=a;this.format=32854;this.height=this.width=0;g.profile&&(this.stats={size:0})}function n(b){var c=b.renderbuffer;a.bindRenderbuffer(36161,null);a.deleteRenderbuffer(c);b.renderbuffer=null;b.refCount=0;delete t[b.id];e.renderbufferCount--}var f={rgba4:32854,rgb565:36194,\"rgb5 a1\":32855,\ndepth:33189,stencil:36168,\"depth stencil\":34041};b.ext_srgb&&(f.srgba=35907);b.ext_color_buffer_half_float&&(f.rgba16f=34842,f.rgb16f=34843);b.webgl_color_buffer_float&&(f.rgba32f=34836);var r=[];Object.keys(f).forEach(function(a){r[f[a]]=a});var q=0,t={};d.prototype.decRef=function(){0>=--this.refCount&&n(this)};g.profile&&(e.getTotalRenderbufferSize=function(){var a=0;Object.keys(t).forEach(function(b){a+=t[b].stats.size});return a});return{create:function(b,c){function k(b,c){var d=0,e=0,m=32854;\n\"object\"===typeof b&&b?(\"shape\"in b?(e=b.shape,d=e[0]|0,e=e[1]|0):(\"radius\"in b&&(d=e=b.radius|0),\"width\"in b&&(d=b.width|0),\"height\"in b&&(e=b.height|0)),\"format\"in b&&(m=f[b.format])):\"number\"===typeof b?(d=b|0,e=\"number\"===typeof c?c|0:d):b||(d=e=1);if(d!==h.width||e!==h.height||m!==h.format)return k.width=h.width=d,k.height=h.height=e,h.format=m,a.bindRenderbuffer(36161,h.renderbuffer),a.renderbufferStorage(36161,m,d,e),g.profile&&(h.stats.size=Q[h.format]*h.width*h.height),k.format=r[h.format],\nk}var h=new d(a.createRenderbuffer());t[h.id]=h;e.renderbufferCount++;k(b,c);k.resize=function(b,c){var d=b|0,e=c|0||d;if(d===h.width&&e===h.height)return k;k.width=h.width=d;k.height=h.height=e;a.bindRenderbuffer(36161,h.renderbuffer);a.renderbufferStorage(36161,h.format,d,e);g.profile&&(h.stats.size=Q[h.format]*h.width*h.height);return k};k._reglType=\"renderbuffer\";k._renderbuffer=h;g.profile&&(k.stats=h.stats);k.destroy=function(){h.decRef()};return k},clear:function(){S(t).forEach(n)},restore:function(){S(t).forEach(function(b){b.renderbuffer=\na.createRenderbuffer();a.bindRenderbuffer(36161,b.renderbuffer);a.renderbufferStorage(36161,b.format,b.width,b.height)});a.bindRenderbuffer(36161,null)}}},Wa=[];Wa[6408]=4;Wa[6407]=3;var Na=[];Na[5121]=1;Na[5126]=4;Na[36193]=2;var Da=[\"x\",\"y\",\"z\",\"w\"],Ub=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Ga={0:0,1:1,zero:0,one:1,\"src color\":768,\"one minus src color\":769,\"src alpha\":770,\"one minus src alpha\":771,\n\"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},Xa={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},Pa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,\ninvert:5386},wb={cw:2304,ccw:2305},xb=new Z(!1,!1,!1,function(){}),Xb=function(a,b){function c(){this.endQueryIndex=this.startQueryIndex=-1;this.sum=0;this.stats=null}function e(a,b,d){var e=n.pop()||new c;e.startQueryIndex=a;e.endQueryIndex=b;e.sum=0;e.stats=d;f.push(e)}if(!b.ext_disjoint_timer_query)return null;var g=[],d=[],n=[],f=[],r=[],q=[];return{beginQuery:function(a){var c=g.pop()||b.ext_disjoint_timer_query.createQueryEXT();b.ext_disjoint_timer_query.beginQueryEXT(35007,c);d.push(c);e(d.length-\n1,d.length,a)},endQuery:function(){b.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:e,update:function(){var a,c;a=d.length;if(0!==a){q.length=Math.max(q.length,a+1);r.length=Math.max(r.length,a+1);r[0]=0;var e=q[0]=0;for(c=a=0;c<d.length;++c){var k=d[c];b.ext_disjoint_timer_query.getQueryObjectEXT(k,34919)?(e+=b.ext_disjoint_timer_query.getQueryObjectEXT(k,34918),g.push(k)):d[a++]=k;r[c+1]=e;q[c+1]=a}d.length=a;for(c=a=0;c<f.length;++c){var e=f[c],h=e.startQueryIndex,k=e.endQueryIndex;\ne.sum+=r[k]-r[h];h=q[h];k=q[k];k===h?(e.stats.gpuTime+=e.sum/1E6,n.push(e)):(e.startQueryIndex=h,e.endQueryIndex=k,f[a++]=e)}f.length=a}},getNumPendingQueries:function(){return d.length},clear:function(){g.push.apply(g,d);for(var a=0;a<g.length;a++)b.ext_disjoint_timer_query.deleteQueryEXT(g[a]);d.length=0;g.length=0},restore:function(){d.length=0;g.length=0}}};return function(a){function b(){if(0===G.length)B&&B.update(),ca=null;else{ca=Ya.next(b);t();for(var a=G.length-1;0<=a;--a){var c=G[a];c&&\nc(O,null,0)}k.flush();B&&B.update()}}function c(){!ca&&0<G.length&&(ca=Ya.next(b))}function e(){ca&&(Ya.cancel(b),ca=null)}function g(a){a.preventDefault();e();U.forEach(function(a){a()})}function d(a){k.getError();l.restore();Q.restore();F.restore();A.restore();M.restore();K.restore();B&&B.restore();V.procs.refresh();c();W.forEach(function(a){a()})}function n(a){function b(a){var c={},d={};Object.keys(a).forEach(function(b){var e=a[b];la.isDynamic(e)?d[b]=la.unbox(e,b):c[b]=e});return{dynamic:d,\n\"static\":c}}function c(a){for(;m.length<a;)m.push(null);return m}var d=b(a.context||{}),e=b(a.uniforms||{}),f=b(a.attributes||{}),g=b(function(a){function b(a){if(a in c){var d=c[a];delete c[a];Object.keys(d).forEach(function(b){c[a+\".\"+b]=d[b]})}}var c=E({},a);delete c.uniforms;delete c.attributes;delete c.context;\"stencil\"in c&&c.stencil.op&&(c.stencil.opBack=c.stencil.opFront=c.stencil.op,delete c.stencil.op);b(\"blend\");b(\"depth\");b(\"cull\");b(\"stencil\");b(\"polygonOffset\");b(\"scissor\");b(\"sample\");\nreturn c}(a));a={gpuTime:0,cpuTime:0,count:0};var d=V.compile(g,f,e,d,a),h=d.draw,k=d.batch,l=d.scope,m=[];return E(function(a,b){var d;if(\"function\"===typeof a)return l.call(this,null,a,0);if(\"function\"===typeof b)if(\"number\"===typeof a)for(d=0;d<a;++d)l.call(this,null,b,d);else if(Array.isArray(a))for(d=0;d<a.length;++d)l.call(this,a[d],b,d);else return l.call(this,a,b,0);else if(\"number\"===typeof a){if(0<a)return k.call(this,c(a|0),a|0)}else if(Array.isArray(a)){if(a.length)return k.call(this,\na,a.length)}else return h.call(this,a)},{stats:a})}function f(a,b){var c=0;V.procs.poll();var d=b.color;d&&(k.clearColor(+d[0]||0,+d[1]||0,+d[2]||0,+d[3]||0),c|=16384);\"depth\"in b&&(k.clearDepth(+b.depth),c|=256);\"stencil\"in b&&(k.clearStencil(b.stencil|0),c|=1024);k.clear(c)}function r(a){G.push(a);c();return{cancel:function(){function b(){var a=yb(G,b);G[a]=G[G.length-1];--G.length;0>=G.length&&e()}var c=yb(G,a);G[c]=b}}}function q(){var a=S.viewport,b=S.scissor_box;a[0]=a[1]=b[0]=b[1]=0;O.viewportWidth=\nO.framebufferWidth=O.drawingBufferWidth=a[2]=b[2]=k.drawingBufferWidth;O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=a[3]=b[3]=k.drawingBufferHeight}function t(){O.tick+=1;O.time=y();q();V.procs.poll()}function m(){q();V.procs.refresh();B&&B.update()}function y(){return(zb()-D)/1E3}a=Eb(a);if(!a)return null;var k=a.gl,h=k.getContextAttributes();k.isContextLost();var l=Fb(k,a);if(!l)return null;var u=Bb(),v={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,\ncubeCount:0,renderbufferCount:0,maxTextureUnits:0},x=l.extensions,B=Xb(k,x),D=zb(),J=k.drawingBufferWidth,P=k.drawingBufferHeight,O={tick:0,time:0,viewportWidth:J,viewportHeight:P,framebufferWidth:J,framebufferHeight:P,drawingBufferWidth:J,drawingBufferHeight:P,pixelRatio:a.pixelRatio},R=Vb(k,x),J=Pb(k,x,R,u),F=Gb(k,v,a,J),T=Hb(k,x,F,v),Q=Qb(k,u,v,a),A=Kb(k,x,R,function(){V.procs.poll()},O,v,a),M=Wb(k,x,R,v,a),K=Ob(k,x,R,A,M,v),V=Tb(k,u,x,R,F,T,A,K,{},J,Q,{elements:null,primitive:4,count:-1,offset:0,\ninstances:-1},O,B,a),u=Rb(k,K,V.procs.poll,O,h,x,R),S=V.next,L=k.canvas,G=[],U=[],W=[],Z=[a.onDestroy],ca=null;L&&(L.addEventListener(\"webglcontextlost\",g,!1),L.addEventListener(\"webglcontextrestored\",d,!1));var aa=K.setFBO=n({framebuffer:la.define.call(null,1,\"framebuffer\")});m();h=E(n,{clear:function(a){if(\"framebuffer\"in a)if(a.framebuffer&&\"framebufferCube\"===a.framebuffer_reglType)for(var b=0;6>b;++b)aa(E({framebuffer:a.framebuffer.faces[b]},a),f);else aa(a,f);else f(null,a)},prop:la.define.bind(null,\n1),context:la.define.bind(null,2),\"this\":la.define.bind(null,3),draw:n({}),buffer:function(a){return F.create(a,34962,!1,!1)},elements:function(a){return T.create(a,!1)},texture:A.create2D,cube:A.createCube,renderbuffer:M.create,framebuffer:K.create,framebufferCube:K.createCube,attributes:h,frame:r,on:function(a,b){var c;switch(a){case \"frame\":return r(b);case \"lost\":c=U;break;case \"restore\":c=W;break;case \"destroy\":c=Z}c.push(b);return{cancel:function(){for(var a=0;a<c.length;++a)if(c[a]===b){c[a]=\nc[c.length-1];c.pop();break}}}},limits:R,hasExtension:function(a){return 0<=R.extensions.indexOf(a.toLowerCase())},read:u,destroy:function(){G.length=0;e();L&&(L.removeEventListener(\"webglcontextlost\",g),L.removeEventListener(\"webglcontextrestored\",d));Q.clear();K.clear();M.clear();A.clear();T.clear();F.clear();B&&B.clear();Z.forEach(function(a){a()})},_gl:k,_refresh:m,poll:function(){t();B&&B.update()},now:y,stats:v});a.onDone(null,h);return h}});\n\n},{}],490:[function(_dereq_,module,exports){\n/*!\n * repeat-string <https://github.com/jonschlinkert/repeat-string>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n  if (typeof str !== 'string') {\n    throw new TypeError('expected a string');\n  }\n\n  // cover common, quick use cases\n  if (num === 1) return str;\n  if (num === 2) return str + str;\n\n  var max = str.length * num;\n  if (cache !== str || typeof cache === 'undefined') {\n    cache = str;\n    res = '';\n  } else if (res.length >= max) {\n    return res.substr(0, max);\n  }\n\n  while (max > res.length && num > 1) {\n    if (num & 1) {\n      res += str;\n    }\n\n    num >>= 1;\n    str += str;\n  }\n\n  res += str;\n  res = res.substr(0, max);\n  return res;\n}\n\n},{}],491:[function(_dereq_,module,exports){\n(function (global){\nmodule.exports =\n  global.performance &&\n  global.performance.now ? function now() {\n    return performance.now()\n  } : Date.now || function now() {\n    return +new Date\n  }\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],492:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = compressExpansion\n\nfunction compressExpansion(e) {\n  var m = e.length\n  var Q = e[e.length-1]\n  var bottom = m\n  for(var i=m-2; i>=0; --i) {\n    var a = Q\n    var b = e[i]\n    Q = a + b\n    var bv = Q - a\n    var q = b - bv\n    if(q) {\n      e[--bottom] = Q\n      Q = q\n    }\n  }\n  var top = 0\n  for(var i=bottom; i<m; ++i) {\n    var a = e[i]\n    var b = Q\n    Q = a + b\n    var bv = Q - a\n    var q = b - bv\n    if(q) {\n      e[top++] = q\n    }\n  }\n  e[top++] = Q\n  e.length = top\n  return e\n}\n},{}],493:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar twoProduct = _dereq_(\"two-product\")\nvar robustSum = _dereq_(\"robust-sum\")\nvar robustScale = _dereq_(\"robust-scale\")\nvar compress = _dereq_(\"robust-compress\")\n\nvar NUM_EXPANDED = 6\n\nfunction cofactor(m, c) {\n  var result = new Array(m.length-1)\n  for(var i=1; i<m.length; ++i) {\n    var r = result[i-1] = new Array(m.length-1)\n    for(var j=0,k=0; j<m.length; ++j) {\n      if(j === c) {\n        continue\n      }\n      r[k++] = m[i][j]\n    }\n  }\n  return result\n}\n\nfunction matrix(n) {\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = new Array(n)\n    for(var j=0; j<n; ++j) {\n      result[i][j] = [\"m[\", i, \"][\", j, \"]\"].join(\"\")\n    }\n  }\n  return result\n}\n\nfunction sign(n) {\n  if(n & 1) {\n    return \"-\"\n  }\n  return \"\"\n}\n\nfunction generateSum(expr) {\n  if(expr.length === 1) {\n    return expr[0]\n  } else if(expr.length === 2) {\n    return [\"sum(\", expr[0], \",\", expr[1], \")\"].join(\"\")\n  } else {\n    var m = expr.length>>1\n    return [\"sum(\", generateSum(expr.slice(0, m)), \",\", generateSum(expr.slice(m)), \")\"].join(\"\")\n  }\n}\n\nfunction determinant(m) {\n  if(m.length === 2) {\n    return [\"sum(prod(\", m[0][0], \",\", m[1][1], \"),prod(-\", m[0][1], \",\", m[1][0], \"))\"].join(\"\")\n  } else {\n    var expr = []\n    for(var i=0; i<m.length; ++i) {\n      expr.push([\"scale(\", determinant(cofactor(m, i)), \",\", sign(i), m[0][i], \")\"].join(\"\"))\n    }\n    return generateSum(expr)\n  }\n}\n\nfunction compileDeterminant(n) {\n  var proc = new Function(\"sum\", \"scale\", \"prod\", \"compress\", [\n    \"function robustDeterminant\",n, \"(m){return compress(\", \n      determinant(matrix(n)),\n    \")};return robustDeterminant\", n].join(\"\"))\n  return proc(robustSum, robustScale, twoProduct, compress)\n}\n\nvar CACHE = [\n  function robustDeterminant0() { return [0] },\n  function robustDeterminant1(m) { return [m[0][0]] }\n]\n\nfunction generateDispatch() {\n  while(CACHE.length < NUM_EXPANDED) {\n    CACHE.push(compileDeterminant(CACHE.length))\n  }\n  var procArgs = []\n  var code = [\"function robustDeterminant(m){switch(m.length){\"]\n  for(var i=0; i<NUM_EXPANDED; ++i) {\n    procArgs.push(\"det\" + i)\n    code.push(\"case \", i, \":return det\", i, \"(m);\")\n  }\n  code.push(\"}\\\nvar det=CACHE[m.length];\\\nif(!det)\\\ndet=CACHE[m.length]=gen(m.length);\\\nreturn det(m);\\\n}\\\nreturn robustDeterminant\")\n  procArgs.push(\"CACHE\", \"gen\", code.join(\"\"))\n  var proc = Function.apply(undefined, procArgs)\n  module.exports = proc.apply(undefined, CACHE.concat([CACHE, compileDeterminant]))\n  for(var i=0; i<CACHE.length; ++i) {\n    module.exports[i] = CACHE[i]\n  }\n}\n\ngenerateDispatch()\n},{\"robust-compress\":492,\"robust-scale\":499,\"robust-sum\":502,\"two-product\":530}],494:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar twoProduct = _dereq_(\"two-product\")\nvar robustSum = _dereq_(\"robust-sum\")\n\nmodule.exports = robustDotProduct\n\nfunction robustDotProduct(a, b) {\n  var r = twoProduct(a[0], b[0])\n  for(var i=1; i<a.length; ++i) {\n    r = robustSum(r, twoProduct(a[i], b[i]))\n  }\n  return r\n}\n},{\"robust-sum\":502,\"two-product\":530}],495:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar twoProduct = _dereq_(\"two-product\")\nvar robustSum = _dereq_(\"robust-sum\")\nvar robustDiff = _dereq_(\"robust-subtract\")\nvar robustScale = _dereq_(\"robust-scale\")\n\nvar NUM_EXPAND = 6\n\nfunction cofactor(m, c) {\n  var result = new Array(m.length-1)\n  for(var i=1; i<m.length; ++i) {\n    var r = result[i-1] = new Array(m.length-1)\n    for(var j=0,k=0; j<m.length; ++j) {\n      if(j === c) {\n        continue\n      }\n      r[k++] = m[i][j]\n    }\n  }\n  return result\n}\n\nfunction matrix(n) {\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = new Array(n)\n    for(var j=0; j<n; ++j) {\n      result[i][j] = [\"m\", j, \"[\", (n-i-2), \"]\"].join(\"\")\n    }\n  }\n  return result\n}\n\nfunction generateSum(expr) {\n  if(expr.length === 1) {\n    return expr[0]\n  } else if(expr.length === 2) {\n    return [\"sum(\", expr[0], \",\", expr[1], \")\"].join(\"\")\n  } else {\n    var m = expr.length>>1\n    return [\"sum(\", generateSum(expr.slice(0, m)), \",\", generateSum(expr.slice(m)), \")\"].join(\"\")\n  }\n}\n\nfunction makeProduct(a, b) {\n  if(a.charAt(0) === \"m\") {\n    if(b.charAt(0) === \"w\") {\n      var toks = a.split(\"[\")\n      return [\"w\", b.substr(1), \"m\", toks[0].substr(1)].join(\"\")\n    } else {\n      return [\"prod(\", a, \",\", b, \")\"].join(\"\")\n    }\n  } else {\n    return makeProduct(b, a)\n  }\n}\n\nfunction sign(s) {\n  if(s & 1 !== 0) {\n    return \"-\"\n  }\n  return \"\"\n}\n\nfunction determinant(m) {\n  if(m.length === 2) {\n    return [[\"diff(\", makeProduct(m[0][0], m[1][1]), \",\", makeProduct(m[1][0], m[0][1]), \")\"].join(\"\")]\n  } else {\n    var expr = []\n    for(var i=0; i<m.length; ++i) {\n      expr.push([\"scale(\", generateSum(determinant(cofactor(m, i))), \",\", sign(i), m[0][i], \")\"].join(\"\"))\n    }\n    return expr\n  }\n}\n\nfunction makeSquare(d, n) {\n  var terms = []\n  for(var i=0; i<n-2; ++i) {\n    terms.push([\"prod(m\", d, \"[\", i, \"],m\", d, \"[\", i, \"])\"].join(\"\"))\n  }\n  return generateSum(terms)\n}\n\nfunction orientation(n) {\n  var pos = []\n  var neg = []\n  var m = matrix(n)\n  for(var i=0; i<n; ++i) {\n    m[0][i] = \"1\"\n    m[n-1][i] = \"w\"+i\n  } \n  for(var i=0; i<n; ++i) {\n    if((i&1)===0) {\n      pos.push.apply(pos,determinant(cofactor(m, i)))\n    } else {\n      neg.push.apply(neg,determinant(cofactor(m, i)))\n    }\n  }\n  var posExpr = generateSum(pos)\n  var negExpr = generateSum(neg)\n  var funcName = \"exactInSphere\" + n\n  var funcArgs = []\n  for(var i=0; i<n; ++i) {\n    funcArgs.push(\"m\" + i)\n  }\n  var code = [\"function \", funcName, \"(\", funcArgs.join(), \"){\"]\n  for(var i=0; i<n; ++i) {\n    code.push(\"var w\",i,\"=\",makeSquare(i,n),\";\")\n    for(var j=0; j<n; ++j) {\n      if(j !== i) {\n        code.push(\"var w\",i,\"m\",j,\"=scale(w\",i,\",m\",j,\"[0]);\")\n      }\n    }\n  }\n  code.push(\"var p=\", posExpr, \",n=\", negExpr, \",d=diff(p,n);return d[d.length-1];}return \", funcName)\n  var proc = new Function(\"sum\", \"diff\", \"prod\", \"scale\", code.join(\"\"))\n  return proc(robustSum, robustDiff, twoProduct, robustScale)\n}\n\nfunction inSphere0() { return 0 }\nfunction inSphere1() { return 0 }\nfunction inSphere2() { return 0 }\n\nvar CACHED = [\n  inSphere0,\n  inSphere1,\n  inSphere2\n]\n\nfunction slowInSphere(args) {\n  var proc = CACHED[args.length]\n  if(!proc) {\n    proc = CACHED[args.length] = orientation(args.length)\n  }\n  return proc.apply(undefined, args)\n}\n\nfunction generateInSphereTest() {\n  while(CACHED.length <= NUM_EXPAND) {\n    CACHED.push(orientation(CACHED.length))\n  }\n  var args = []\n  var procArgs = [\"slow\"]\n  for(var i=0; i<=NUM_EXPAND; ++i) {\n    args.push(\"a\" + i)\n    procArgs.push(\"o\" + i)\n  }\n  var code = [\n    \"function testInSphere(\", args.join(), \"){switch(arguments.length){case 0:case 1:return 0;\"\n  ]\n  for(var i=2; i<=NUM_EXPAND; ++i) {\n    code.push(\"case \", i, \":return o\", i, \"(\", args.slice(0, i).join(), \");\")\n  }\n  code.push(\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere\")\n  procArgs.push(code.join(\"\"))\n\n  var proc = Function.apply(undefined, procArgs)\n\n  module.exports = proc.apply(undefined, [slowInSphere].concat(CACHED))\n  for(var i=0; i<=NUM_EXPAND; ++i) {\n    module.exports[i] = CACHED[i]\n  }\n}\n\ngenerateInSphereTest()\n},{\"robust-scale\":499,\"robust-subtract\":501,\"robust-sum\":502,\"two-product\":530}],496:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar determinant = _dereq_(\"robust-determinant\")\n\nvar NUM_EXPAND = 6\n\nfunction generateSolver(n) {\n  var funcName = \"robustLinearSolve\" + n + \"d\"\n  var code = [\"function \", funcName, \"(A,b){return [\"]\n  for(var i=0; i<n; ++i) {\n    code.push(\"det([\")\n    for(var j=0; j<n; ++j) {\n      if(j > 0) {\n        code.push(\",\")\n      }\n      code.push(\"[\")\n      for(var k=0; k<n; ++k) {\n        if(k > 0) {\n          code.push(\",\")\n        }\n        if(k === i) {\n          code.push(\"+b[\", j, \"]\")\n        } else {\n          code.push(\"+A[\", j, \"][\", k, \"]\")\n        }\n      }\n      code.push(\"]\")\n    }\n    code.push(\"]),\")\n  }\n  code.push(\"det(A)]}return \", funcName)\n  var proc = new Function(\"det\", code.join(\"\"))\n  if(n < 6) {\n    return proc(determinant[n])\n  }\n  return proc(determinant)\n}\n\nfunction robustLinearSolve0d() {\n  return [ 0 ]\n}\n\nfunction robustLinearSolve1d(A, b) {\n  return [ [ b[0] ], [ A[0][0] ] ]\n}\n\nvar CACHE = [\n  robustLinearSolve0d,\n  robustLinearSolve1d\n]\n\nfunction generateDispatch() {\n  while(CACHE.length < NUM_EXPAND) {\n    CACHE.push(generateSolver(CACHE.length))\n  }\n  var procArgs = []\n  var code = [\"function dispatchLinearSolve(A,b){switch(A.length){\"]\n  for(var i=0; i<NUM_EXPAND; ++i) {\n    procArgs.push(\"s\" + i)\n    code.push(\"case \", i, \":return s\", i, \"(A,b);\")\n  }\n  code.push(\"}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve\")\n  procArgs.push(\"CACHE\", \"g\", code.join(\"\"))\n  var proc = Function.apply(undefined, procArgs)\n  module.exports = proc.apply(undefined, CACHE.concat([CACHE, generateSolver]))\n  for(var i=0; i<NUM_EXPAND; ++i) {\n    module.exports[i] = CACHE[i]\n  }\n}\n\ngenerateDispatch()\n},{\"robust-determinant\":493}],497:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar twoProduct = _dereq_(\"two-product\")\nvar robustSum = _dereq_(\"robust-sum\")\nvar robustScale = _dereq_(\"robust-scale\")\nvar robustSubtract = _dereq_(\"robust-subtract\")\n\nvar NUM_EXPAND = 5\n\nvar EPSILON     = 1.1102230246251565e-16\nvar ERRBOUND3   = (3.0 + 16.0 * EPSILON) * EPSILON\nvar ERRBOUND4   = (7.0 + 56.0 * EPSILON) * EPSILON\n\nfunction cofactor(m, c) {\n  var result = new Array(m.length-1)\n  for(var i=1; i<m.length; ++i) {\n    var r = result[i-1] = new Array(m.length-1)\n    for(var j=0,k=0; j<m.length; ++j) {\n      if(j === c) {\n        continue\n      }\n      r[k++] = m[i][j]\n    }\n  }\n  return result\n}\n\nfunction matrix(n) {\n  var result = new Array(n)\n  for(var i=0; i<n; ++i) {\n    result[i] = new Array(n)\n    for(var j=0; j<n; ++j) {\n      result[i][j] = [\"m\", j, \"[\", (n-i-1), \"]\"].join(\"\")\n    }\n  }\n  return result\n}\n\nfunction sign(n) {\n  if(n & 1) {\n    return \"-\"\n  }\n  return \"\"\n}\n\nfunction generateSum(expr) {\n  if(expr.length === 1) {\n    return expr[0]\n  } else if(expr.length === 2) {\n    return [\"sum(\", expr[0], \",\", expr[1], \")\"].join(\"\")\n  } else {\n    var m = expr.length>>1\n    return [\"sum(\", generateSum(expr.slice(0, m)), \",\", generateSum(expr.slice(m)), \")\"].join(\"\")\n  }\n}\n\nfunction determinant(m) {\n  if(m.length === 2) {\n    return [[\"sum(prod(\", m[0][0], \",\", m[1][1], \"),prod(-\", m[0][1], \",\", m[1][0], \"))\"].join(\"\")]\n  } else {\n    var expr = []\n    for(var i=0; i<m.length; ++i) {\n      expr.push([\"scale(\", generateSum(determinant(cofactor(m, i))), \",\", sign(i), m[0][i], \")\"].join(\"\"))\n    }\n    return expr\n  }\n}\n\nfunction orientation(n) {\n  var pos = []\n  var neg = []\n  var m = matrix(n)\n  var args = []\n  for(var i=0; i<n; ++i) {\n    if((i&1)===0) {\n      pos.push.apply(pos, determinant(cofactor(m, i)))\n    } else {\n      neg.push.apply(neg, determinant(cofactor(m, i)))\n    }\n    args.push(\"m\" + i)\n  }\n  var posExpr = generateSum(pos)\n  var negExpr = generateSum(neg)\n  var funcName = \"orientation\" + n + \"Exact\"\n  var code = [\"function \", funcName, \"(\", args.join(), \"){var p=\", posExpr, \",n=\", negExpr, \",d=sub(p,n);\\\nreturn d[d.length-1];};return \", funcName].join(\"\")\n  var proc = new Function(\"sum\", \"prod\", \"scale\", \"sub\", code)\n  return proc(robustSum, twoProduct, robustScale, robustSubtract)\n}\n\nvar orientation3Exact = orientation(3)\nvar orientation4Exact = orientation(4)\n\nvar CACHED = [\n  function orientation0() { return 0 },\n  function orientation1() { return 0 },\n  function orientation2(a, b) { \n    return b[0] - a[0]\n  },\n  function orientation3(a, b, c) {\n    var l = (a[1] - c[1]) * (b[0] - c[0])\n    var r = (a[0] - c[0]) * (b[1] - c[1])\n    var det = l - r\n    var s\n    if(l > 0) {\n      if(r <= 0) {\n        return det\n      } else {\n        s = l + r\n      }\n    } else if(l < 0) {\n      if(r >= 0) {\n        return det\n      } else {\n        s = -(l + r)\n      }\n    } else {\n      return det\n    }\n    var tol = ERRBOUND3 * s\n    if(det >= tol || det <= -tol) {\n      return det\n    }\n    return orientation3Exact(a, b, c)\n  },\n  function orientation4(a,b,c,d) {\n    var adx = a[0] - d[0]\n    var bdx = b[0] - d[0]\n    var cdx = c[0] - d[0]\n    var ady = a[1] - d[1]\n    var bdy = b[1] - d[1]\n    var cdy = c[1] - d[1]\n    var adz = a[2] - d[2]\n    var bdz = b[2] - d[2]\n    var cdz = c[2] - d[2]\n    var bdxcdy = bdx * cdy\n    var cdxbdy = cdx * bdy\n    var cdxady = cdx * ady\n    var adxcdy = adx * cdy\n    var adxbdy = adx * bdy\n    var bdxady = bdx * ady\n    var det = adz * (bdxcdy - cdxbdy) \n            + bdz * (cdxady - adxcdy)\n            + cdz * (adxbdy - bdxady)\n    var permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz)\n                  + (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz)\n                  + (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz)\n    var tol = ERRBOUND4 * permanent\n    if ((det > tol) || (-det > tol)) {\n      return det\n    }\n    return orientation4Exact(a,b,c,d)\n  }\n]\n\nfunction slowOrient(args) {\n  var proc = CACHED[args.length]\n  if(!proc) {\n    proc = CACHED[args.length] = orientation(args.length)\n  }\n  return proc.apply(undefined, args)\n}\n\nfunction generateOrientationProc() {\n  while(CACHED.length <= NUM_EXPAND) {\n    CACHED.push(orientation(CACHED.length))\n  }\n  var args = []\n  var procArgs = [\"slow\"]\n  for(var i=0; i<=NUM_EXPAND; ++i) {\n    args.push(\"a\" + i)\n    procArgs.push(\"o\" + i)\n  }\n  var code = [\n    \"function getOrientation(\", args.join(), \"){switch(arguments.length){case 0:case 1:return 0;\"\n  ]\n  for(var i=2; i<=NUM_EXPAND; ++i) {\n    code.push(\"case \", i, \":return o\", i, \"(\", args.slice(0, i).join(), \");\")\n  }\n  code.push(\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation\")\n  procArgs.push(code.join(\"\"))\n\n  var proc = Function.apply(undefined, procArgs)\n  module.exports = proc.apply(undefined, [slowOrient].concat(CACHED))\n  for(var i=0; i<=NUM_EXPAND; ++i) {\n    module.exports[i] = CACHED[i]\n  }\n}\n\ngenerateOrientationProc()\n},{\"robust-scale\":499,\"robust-subtract\":501,\"robust-sum\":502,\"two-product\":530}],498:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar robustSum = _dereq_(\"robust-sum\")\nvar robustScale = _dereq_(\"robust-scale\")\n\nmodule.exports = robustProduct\n\nfunction robustProduct(a, b) {\n  if(a.length === 1) {\n    return robustScale(b, a[0])\n  }\n  if(b.length === 1) {\n    return robustScale(a, b[0])\n  }\n  if(a.length === 0 || b.length === 0) {\n    return [0]\n  }\n  var r = [0]\n  if(a.length < b.length) {\n    for(var i=0; i<a.length; ++i) {\n      r = robustSum(r, robustScale(b, a[i]))\n    }\n  } else {\n    for(var i=0; i<b.length; ++i) {\n      r = robustSum(r, robustScale(a, b[i]))\n    }    \n  }\n  return r\n}\n},{\"robust-scale\":499,\"robust-sum\":502}],499:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar twoProduct = _dereq_(\"two-product\")\nvar twoSum = _dereq_(\"two-sum\")\n\nmodule.exports = scaleLinearExpansion\n\nfunction scaleLinearExpansion(e, scale) {\n  var n = e.length\n  if(n === 1) {\n    var ts = twoProduct(e[0], scale)\n    if(ts[0]) {\n      return ts\n    }\n    return [ ts[1] ]\n  }\n  var g = new Array(2 * n)\n  var q = [0.1, 0.1]\n  var t = [0.1, 0.1]\n  var count = 0\n  twoProduct(e[0], scale, q)\n  if(q[0]) {\n    g[count++] = q[0]\n  }\n  for(var i=1; i<n; ++i) {\n    twoProduct(e[i], scale, t)\n    var pq = q[1]\n    twoSum(pq, t[0], q)\n    if(q[0]) {\n      g[count++] = q[0]\n    }\n    var a = t[1]\n    var b = q[1]\n    var x = a + b\n    var bv = x - a\n    var y = b - bv\n    q[1] = x\n    if(y) {\n      g[count++] = y\n    }\n  }\n  if(q[1]) {\n    g[count++] = q[1]\n  }\n  if(count === 0) {\n    g[count++] = 0.0\n  }\n  g.length = count\n  return g\n}\n},{\"two-product\":530,\"two-sum\":531}],500:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = segmentsIntersect\n\nvar orient = _dereq_(\"robust-orientation\")[3]\n\nfunction checkCollinear(a0, a1, b0, b1) {\n\n  for(var d=0; d<2; ++d) {\n    var x0 = a0[d]\n    var y0 = a1[d]\n    var l0 = Math.min(x0, y0)\n    var h0 = Math.max(x0, y0)    \n\n    var x1 = b0[d]\n    var y1 = b1[d]\n    var l1 = Math.min(x1, y1)\n    var h1 = Math.max(x1, y1)    \n\n    if(h1 < l0 || h0 < l1) {\n      return false\n    }\n  }\n\n  return true\n}\n\nfunction segmentsIntersect(a0, a1, b0, b1) {\n  var x0 = orient(a0, b0, b1)\n  var y0 = orient(a1, b0, b1)\n  if((x0 > 0 && y0 > 0) || (x0 < 0 && y0 < 0)) {\n    return false\n  }\n\n  var x1 = orient(b0, a0, a1)\n  var y1 = orient(b1, a0, a1)\n  if((x1 > 0 && y1 > 0) || (x1 < 0 && y1 < 0)) {\n    return false\n  }\n\n  //Check for degenerate collinear case\n  if(x0 === 0 && y0 === 0 && x1 === 0 && y1 === 0) {\n    return checkCollinear(a0, a1, b0, b1)\n  }\n\n  return true\n}\n},{\"robust-orientation\":497}],501:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = robustSubtract\n\n//Easy case: Add two scalars\nfunction scalarScalar(a, b) {\n  var x = a + b\n  var bv = x - a\n  var av = x - bv\n  var br = b - bv\n  var ar = a - av\n  var y = ar + br\n  if(y) {\n    return [y, x]\n  }\n  return [x]\n}\n\nfunction robustSubtract(e, f) {\n  var ne = e.length|0\n  var nf = f.length|0\n  if(ne === 1 && nf === 1) {\n    return scalarScalar(e[0], -f[0])\n  }\n  var n = ne + nf\n  var g = new Array(n)\n  var count = 0\n  var eptr = 0\n  var fptr = 0\n  var abs = Math.abs\n  var ei = e[eptr]\n  var ea = abs(ei)\n  var fi = -f[fptr]\n  var fa = abs(fi)\n  var a, b\n  if(ea < fa) {\n    b = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    b = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n      fa = abs(fi)\n    }\n  }\n  if((eptr < ne && ea < fa) || (fptr >= nf)) {\n    a = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    a = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n      fa = abs(fi)\n    }\n  }\n  var x = a + b\n  var bv = x - a\n  var y = b - bv\n  var q0 = y\n  var q1 = x\n  var _x, _bv, _av, _br, _ar\n  while(eptr < ne && fptr < nf) {\n    if(ea < fa) {\n      a = ei\n      eptr += 1\n      if(eptr < ne) {\n        ei = e[eptr]\n        ea = abs(ei)\n      }\n    } else {\n      a = fi\n      fptr += 1\n      if(fptr < nf) {\n        fi = -f[fptr]\n        fa = abs(fi)\n      }\n    }\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n  }\n  while(eptr < ne) {\n    a = ei\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n    }\n  }\n  while(fptr < nf) {\n    a = fi\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    } \n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n    }\n  }\n  if(q0) {\n    g[count++] = q0\n  }\n  if(q1) {\n    g[count++] = q1\n  }\n  if(!count) {\n    g[count++] = 0.0  \n  }\n  g.length = count\n  return g\n}\n},{}],502:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = linearExpansionSum\n\n//Easy case: Add two scalars\nfunction scalarScalar(a, b) {\n  var x = a + b\n  var bv = x - a\n  var av = x - bv\n  var br = b - bv\n  var ar = a - av\n  var y = ar + br\n  if(y) {\n    return [y, x]\n  }\n  return [x]\n}\n\nfunction linearExpansionSum(e, f) {\n  var ne = e.length|0\n  var nf = f.length|0\n  if(ne === 1 && nf === 1) {\n    return scalarScalar(e[0], f[0])\n  }\n  var n = ne + nf\n  var g = new Array(n)\n  var count = 0\n  var eptr = 0\n  var fptr = 0\n  var abs = Math.abs\n  var ei = e[eptr]\n  var ea = abs(ei)\n  var fi = f[fptr]\n  var fa = abs(fi)\n  var a, b\n  if(ea < fa) {\n    b = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    b = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n      fa = abs(fi)\n    }\n  }\n  if((eptr < ne && ea < fa) || (fptr >= nf)) {\n    a = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    a = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n      fa = abs(fi)\n    }\n  }\n  var x = a + b\n  var bv = x - a\n  var y = b - bv\n  var q0 = y\n  var q1 = x\n  var _x, _bv, _av, _br, _ar\n  while(eptr < ne && fptr < nf) {\n    if(ea < fa) {\n      a = ei\n      eptr += 1\n      if(eptr < ne) {\n        ei = e[eptr]\n        ea = abs(ei)\n      }\n    } else {\n      a = fi\n      fptr += 1\n      if(fptr < nf) {\n        fi = f[fptr]\n        fa = abs(fi)\n      }\n    }\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n  }\n  while(eptr < ne) {\n    a = ei\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n    }\n  }\n  while(fptr < nf) {\n    a = fi\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    } \n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n    }\n  }\n  if(q0) {\n    g[count++] = q0\n  }\n  if(q1) {\n    g[count++] = q1\n  }\n  if(!count) {\n    g[count++] = 0.0  \n  }\n  g.length = count\n  return g\n}\n},{}],503:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = function signum(x) {\n  if(x < 0) { return -1 }\n  if(x > 0) { return 1 }\n  return 0.0\n}\n},{}],504:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = boundary\n\nvar bnd = _dereq_('boundary-cells')\nvar reduce = _dereq_('reduce-simplicial-complex')\n\nfunction boundary(cells) {\n  return reduce(bnd(cells))\n}\n\n},{\"boundary-cells\":88,\"reduce-simplicial-complex\":484}],505:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = extractContour\n\nvar ndarray = _dereq_('ndarray')\nvar pool    = _dereq_('typedarray-pool')\nvar ndsort  = _dereq_('ndarray-sort')\n\nvar contourAlgorithm = _dereq_('./lib/codegen')\n\nfunction getDimension(cells) {\n  var numCells = cells.length\n  var d = 0\n  for(var i=0; i<numCells; ++i) {\n    d = Math.max(d, cells[i].length)|0\n  }\n  return d-1\n}\n\nfunction getSigns(values, level) {\n  var numVerts    = values.length\n  var vertexSigns = pool.mallocUint8(numVerts)\n  for(var i=0; i<numVerts; ++i) {\n    vertexSigns[i] = (values[i] < level)|0\n  }\n  return vertexSigns\n}\n\nfunction getEdges(cells, d) {\n  var numCells = cells.length\n  var maxEdges = ((d * (d+1)/2) * numCells)|0\n  var edges    = pool.mallocUint32(maxEdges*2)\n  var ePtr     = 0\n  for(var i=0; i<numCells; ++i) {\n    var c = cells[i]\n    var d = c.length\n    for(var j=0; j<d; ++j) {\n      for(var k=0; k<j; ++k) {\n        var a = c[k]\n        var b = c[j]\n        edges[ePtr++] = Math.min(a,b)|0\n        edges[ePtr++] = Math.max(a,b)|0\n      }\n    }\n  }\n  var nedges = (ePtr/2)|0\n  ndsort(ndarray(edges, [nedges,2])) \n  var ptr = 2\n  for(var i=2; i<ePtr; i+=2) {\n    if(edges[i-2] === edges[i] &&\n       edges[i-1] === edges[i+1]) {\n      continue\n    }\n    edges[ptr++] = edges[i]\n    edges[ptr++] = edges[i+1]\n  }\n\n  return ndarray(edges, [(ptr/2)|0, 2])\n}\n\nfunction getCrossingWeights(edges, values, signs, level) {\n  var edata     = edges.data\n  var numEdges  = edges.shape[0]\n  var weights   = pool.mallocDouble(numEdges)\n  var ptr       = 0\n  for(var i=0; i<numEdges; ++i) {\n    var a  = edata[2*i]\n    var b  = edata[2*i+1]\n    if(signs[a] === signs[b]) {\n      continue\n    }\n    var va = values[a]\n    var vb = values[b]\n    edata[2*ptr]     = a\n    edata[2*ptr+1]   = b\n    weights[ptr++]   = (vb - level) / (vb - va)\n  }\n  edges.shape[0] = ptr\n  return ndarray(weights, [ptr])\n}\n\nfunction getCascade(edges, numVerts) {\n  var result   = pool.mallocInt32(numVerts*2)\n  var numEdges = edges.shape[0]\n  var edata    = edges.data\n  result[0]    = 0\n  var lastV    = 0\n  for(var i=0; i<numEdges; ++i) {\n    var a = edata[2*i]\n    if(a !== lastV) {\n      result[2*lastV+1] = i\n      while(++lastV < a) {\n        result[2*lastV] = i\n        result[2*lastV+1] = i\n      }\n      result[2*lastV] = i\n    }\n  }\n  result[2*lastV+1] = numEdges\n  while(++lastV < numVerts) {\n    result[2*lastV] = result[2*lastV+1] = numEdges\n  }\n  return result\n}\n\nfunction unpackEdges(edges) {\n  var ne = edges.shape[0]|0\n  var edata = edges.data\n  var result = new Array(ne)\n  for(var i=0; i<ne; ++i) {\n    result[i] = [edata[2*i], edata[2*i+1]]\n  }\n  return result\n}\n\nfunction extractContour(cells, values, level, d) {\n  level = level||0.0\n\n  //If user didn't specify `d`, use brute force scan\n  if(typeof d === 'undefined') {\n    d = getDimension(cells)\n  }\n\n  //Count number of cells\n  var numCells = cells.length\n  if(numCells === 0 || d < 1) {\n    return {\n      cells:         [],\n      vertexIds:     [],\n      vertexWeights: []\n    }\n  }\n\n  //Read in vertex signs\n  var vertexSigns = getSigns(values, +level)\n\n  //First get 1-skeleton, find all crossings\n  var edges   = getEdges(cells, d)\n  var weights = getCrossingWeights(edges, values, vertexSigns, +level)\n\n  //Build vertex cascade to speed up binary search\n  var vcascade = getCascade(edges, values.length|0)\n\n  //Then construct cells\n  var faces = contourAlgorithm(d)(cells, edges.data, vcascade, vertexSigns)\n\n  //Unpack data into pretty format\n  var uedges   = unpackEdges(edges)\n  var uweights = [].slice.call(weights.data, 0, weights.shape[0])\n\n  //Release data\n  pool.free(vertexSigns)\n  pool.free(edges.data)\n  pool.free(weights.data)\n  pool.free(vcascade)\n  \n  return {\n    cells:         faces,\n    vertexIds:     uedges,\n    vertexWeights: uweights\n  }\n}\n},{\"./lib/codegen\":506,\"ndarray\":445,\"ndarray-sort\":443,\"typedarray-pool\":532}],506:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = getPolygonizer\n\nvar pool = _dereq_('typedarray-pool')\nvar createMSTable = _dereq_('marching-simplex-table')\n\nvar CACHE = {}\n\nfunction createCellPolygonizer(d) {\n  var maxCellSize = 0\n  var tables = new Array(d+1)\n  tables[0] = [ [] ]\n  for(var i=1; i<=d; ++i) {\n    var tab = tables[i] = createMSTable(i)\n    for(var j=0; j<tab.length; ++j) {\n      maxCellSize = Math.max(maxCellSize, tab[i].length)\n    }\n  }\n\n  var code  = [\n  'function B(C,E,i,j){',\n    'var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];',\n    'while(l<h){',\n      'var m=(l+h)>>1,v=E[2*m+1];',\n      'if(v===b){return m}',\n      'if(b<v){h=m}else{l=m+1}',\n    '}',\n    'return l;',\n  '};',\n  'function getContour', d, 'd(F,E,C,S){',\n    'var n=F.length,R=[];',\n    'for(var i=0;i<n;++i){var c=F[i],l=c.length;'\n  ]\n\n  function generateCase(facets) {\n    if(facets.length <= 0) {\n      return\n    }\n    code.push('R.push(')\n    for(var i=0; i<facets.length; ++i) {\n      var facet = facets[i]\n      if(i > 0) {\n        code.push(',')\n      }\n      code.push('[')\n      for(var j=0; j<facet.length; ++j) {\n        var f = facet[j]\n        if(j > 0) {\n          code.push(',')\n        }\n        code.push('B(C,E,c[', f[0], '],c[', f[1], '])')\n      }\n      code.push(']')\n    }\n    code.push(');')\n  }\n\n  for(var i=d+1; i>1; --i) {\n    if(i < d+1) {\n      code.push('else ')\n    }\n    code.push('if(l===', i, '){')\n\n    //Generate mask\n    var maskStr = []\n    for(var j=0; j<i; ++j) {\n      maskStr.push('(S[c['+j+']]<<'+j+')')\n    }\n\n    //Perform table look up\n    code.push('var M=', maskStr.join('+'), \n      ';if(M===0||M===', (1<<i)-1, \n        '){continue}switch(M){')\n\n    var tab = tables[i-1]\n    for(var j=0; j<tab.length; ++j) {\n      code.push('case ', j, ':')\n      generateCase(tab[j])\n      code.push('break;')\n    }\n    code.push('}}')\n  }\n  code.push('}return R;};return getContour', d, 'd')\n\n  var proc = new Function('pool', code.join(''))\n  return proc(pool)\n}\n\nfunction getPolygonizer(d) {\n  var alg = CACHE[d]\n  if(!alg) {\n    alg = CACHE[d] = createCellPolygonizer(d) \n  }\n  return alg\n}\n},{\"marching-simplex-table\":422,\"typedarray-pool\":532}],507:[function(_dereq_,module,exports){\n\"use strict\"; \"use restrict\";\n\nvar bits      = _dereq_(\"bit-twiddle\")\n  , UnionFind = _dereq_(\"union-find\")\n\n//Returns the dimension of a cell complex\nfunction dimension(cells) {\n  var d = 0\n    , max = Math.max\n  for(var i=0, il=cells.length; i<il; ++i) {\n    d = max(d, cells[i].length)\n  }\n  return d-1\n}\nexports.dimension = dimension\n\n//Counts the number of vertices in faces\nfunction countVertices(cells) {\n  var vc = -1\n    , max = Math.max\n  for(var i=0, il=cells.length; i<il; ++i) {\n    var c = cells[i]\n    for(var j=0, jl=c.length; j<jl; ++j) {\n      vc = max(vc, c[j])\n    }\n  }\n  return vc+1\n}\nexports.countVertices = countVertices\n\n//Returns a deep copy of cells\nfunction cloneCells(cells) {\n  var ncells = new Array(cells.length)\n  for(var i=0, il=cells.length; i<il; ++i) {\n    ncells[i] = cells[i].slice(0)\n  }\n  return ncells\n}\nexports.cloneCells = cloneCells\n\n//Ranks a pair of cells up to permutation\nfunction compareCells(a, b) {\n  var n = a.length\n    , t = a.length - b.length\n    , min = Math.min\n  if(t) {\n    return t\n  }\n  switch(n) {\n    case 0:\n      return 0;\n    case 1:\n      return a[0] - b[0];\n    case 2:\n      var d = a[0]+a[1]-b[0]-b[1]\n      if(d) {\n        return d\n      }\n      return min(a[0],a[1]) - min(b[0],b[1])\n    case 3:\n      var l1 = a[0]+a[1]\n        , m1 = b[0]+b[1]\n      d = l1+a[2] - (m1+b[2])\n      if(d) {\n        return d\n      }\n      var l0 = min(a[0], a[1])\n        , m0 = min(b[0], b[1])\n        , d  = min(l0, a[2]) - min(m0, b[2])\n      if(d) {\n        return d\n      }\n      return min(l0+a[2], l1) - min(m0+b[2], m1)\n    \n    //TODO: Maybe optimize n=4 as well?\n    \n    default:\n      var as = a.slice(0)\n      as.sort()\n      var bs = b.slice(0)\n      bs.sort()\n      for(var i=0; i<n; ++i) {\n        t = as[i] - bs[i]\n        if(t) {\n          return t\n        }\n      }\n      return 0\n  }\n}\nexports.compareCells = compareCells\n\nfunction compareZipped(a, b) {\n  return compareCells(a[0], b[0])\n}\n\n//Puts a cell complex into normal order for the purposes of findCell queries\nfunction normalize(cells, attr) {\n  if(attr) {\n    var len = cells.length\n    var zipped = new Array(len)\n    for(var i=0; i<len; ++i) {\n      zipped[i] = [cells[i], attr[i]]\n    }\n    zipped.sort(compareZipped)\n    for(var i=0; i<len; ++i) {\n      cells[i] = zipped[i][0]\n      attr[i] = zipped[i][1]\n    }\n    return cells\n  } else {\n    cells.sort(compareCells)\n    return cells\n  }\n}\nexports.normalize = normalize\n\n//Removes all duplicate cells in the complex\nfunction unique(cells) {\n  if(cells.length === 0) {\n    return []\n  }\n  var ptr = 1\n    , len = cells.length\n  for(var i=1; i<len; ++i) {\n    var a = cells[i]\n    if(compareCells(a, cells[i-1])) {\n      if(i === ptr) {\n        ptr++\n        continue\n      }\n      cells[ptr++] = a\n    }\n  }\n  cells.length = ptr\n  return cells\n}\nexports.unique = unique;\n\n//Finds a cell in a normalized cell complex\nfunction findCell(cells, c) {\n  var lo = 0\n    , hi = cells.length-1\n    , r  = -1\n  while (lo <= hi) {\n    var mid = (lo + hi) >> 1\n      , s   = compareCells(cells[mid], c)\n    if(s <= 0) {\n      if(s === 0) {\n        r = mid\n      }\n      lo = mid + 1\n    } else if(s > 0) {\n      hi = mid - 1\n    }\n  }\n  return r\n}\nexports.findCell = findCell;\n\n//Builds an index for an n-cell.  This is more general than dual, but less efficient\nfunction incidence(from_cells, to_cells) {\n  var index = new Array(from_cells.length)\n  for(var i=0, il=index.length; i<il; ++i) {\n    index[i] = []\n  }\n  var b = []\n  for(var i=0, n=to_cells.length; i<n; ++i) {\n    var c = to_cells[i]\n    var cl = c.length\n    for(var k=1, kn=(1<<cl); k<kn; ++k) {\n      b.length = bits.popCount(k)\n      var l = 0\n      for(var j=0; j<cl; ++j) {\n        if(k & (1<<j)) {\n          b[l++] = c[j]\n        }\n      }\n      var idx=findCell(from_cells, b)\n      if(idx < 0) {\n        continue\n      }\n      while(true) {\n        index[idx++].push(i)\n        if(idx >= from_cells.length || compareCells(from_cells[idx], b) !== 0) {\n          break\n        }\n      }\n    }\n  }\n  return index\n}\nexports.incidence = incidence\n\n//Computes the dual of the mesh.  This is basically an optimized version of buildIndex for the situation where from_cells is just the list of vertices\nfunction dual(cells, vertex_count) {\n  if(!vertex_count) {\n    return incidence(unique(skeleton(cells, 0)), cells, 0)\n  }\n  var res = new Array(vertex_count)\n  for(var i=0; i<vertex_count; ++i) {\n    res[i] = []\n  }\n  for(var i=0, len=cells.length; i<len; ++i) {\n    var c = cells[i]\n    for(var j=0, cl=c.length; j<cl; ++j) {\n      res[c[j]].push(i)\n    }\n  }\n  return res\n}\nexports.dual = dual\n\n//Enumerates all cells in the complex\nfunction explode(cells) {\n  var result = []\n  for(var i=0, il=cells.length; i<il; ++i) {\n    var c = cells[i]\n      , cl = c.length|0\n    for(var j=1, jl=(1<<cl); j<jl; ++j) {\n      var b = []\n      for(var k=0; k<cl; ++k) {\n        if((j >>> k) & 1) {\n          b.push(c[k])\n        }\n      }\n      result.push(b)\n    }\n  }\n  return normalize(result)\n}\nexports.explode = explode\n\n//Enumerates all of the n-cells of a cell complex\nfunction skeleton(cells, n) {\n  if(n < 0) {\n    return []\n  }\n  var result = []\n    , k0     = (1<<(n+1))-1\n  for(var i=0; i<cells.length; ++i) {\n    var c = cells[i]\n    for(var k=k0; k<(1<<c.length); k=bits.nextCombination(k)) {\n      var b = new Array(n+1)\n        , l = 0\n      for(var j=0; j<c.length; ++j) {\n        if(k & (1<<j)) {\n          b[l++] = c[j]\n        }\n      }\n      result.push(b)\n    }\n  }\n  return normalize(result)\n}\nexports.skeleton = skeleton;\n\n//Computes the boundary of all cells, does not remove duplicates\nfunction boundary(cells) {\n  var res = []\n  for(var i=0,il=cells.length; i<il; ++i) {\n    var c = cells[i]\n    for(var j=0,cl=c.length; j<cl; ++j) {\n      var b = new Array(c.length-1)\n      for(var k=0, l=0; k<cl; ++k) {\n        if(k !== j) {\n          b[l++] = c[k]\n        }\n      }\n      res.push(b)\n    }\n  }\n  return normalize(res)\n}\nexports.boundary = boundary;\n\n//Computes connected components for a dense cell complex\nfunction connectedComponents_dense(cells, vertex_count) {\n  var labels = new UnionFind(vertex_count)\n  for(var i=0; i<cells.length; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      for(var k=j+1; k<c.length; ++k) {\n        labels.link(c[j], c[k])\n      }\n    }\n  }\n  var components = []\n    , component_labels = labels.ranks\n  for(var i=0; i<component_labels.length; ++i) {\n    component_labels[i] = -1\n  }\n  for(var i=0; i<cells.length; ++i) {\n    var l = labels.find(cells[i][0])\n    if(component_labels[l] < 0) {\n      component_labels[l] = components.length\n      components.push([cells[i].slice(0)])\n    } else {\n      components[component_labels[l]].push(cells[i].slice(0))\n    }\n  }\n  return components\n}\n\n//Computes connected components for a sparse graph\nfunction connectedComponents_sparse(cells) {\n  var vertices  = unique(normalize(skeleton(cells, 0)))\n    , labels    = new UnionFind(vertices.length)\n  for(var i=0; i<cells.length; ++i) {\n    var c = cells[i]\n    for(var j=0; j<c.length; ++j) {\n      var vj = findCell(vertices, [c[j]])\n      for(var k=j+1; k<c.length; ++k) {\n        labels.link(vj, findCell(vertices, [c[k]]))\n      }\n    }\n  }\n  var components        = []\n    , component_labels  = labels.ranks\n  for(var i=0; i<component_labels.length; ++i) {\n    component_labels[i] = -1\n  }\n  for(var i=0; i<cells.length; ++i) {\n    var l = labels.find(findCell(vertices, [cells[i][0]]));\n    if(component_labels[l] < 0) {\n      component_labels[l] = components.length\n      components.push([cells[i].slice(0)])\n    } else {\n      components[component_labels[l]].push(cells[i].slice(0))\n    }\n  }\n  return components\n}\n\n//Computes connected components for a cell complex\nfunction connectedComponents(cells, vertex_count) {\n  if(vertex_count) {\n    return connectedComponents_dense(cells, vertex_count)\n  }\n  return connectedComponents_sparse(cells)\n}\nexports.connectedComponents = connectedComponents\n\n},{\"bit-twiddle\":85,\"union-find\":533}],508:[function(_dereq_,module,exports){\narguments[4][85][0].apply(exports,arguments)\n},{\"dup\":85}],509:[function(_dereq_,module,exports){\narguments[4][507][0].apply(exports,arguments)\n},{\"bit-twiddle\":508,\"dup\":507,\"union-find\":510}],510:[function(_dereq_,module,exports){\n\"use strict\"; \"use restrict\";\n\nmodule.exports = UnionFind;\n\nfunction UnionFind(count) {\n  this.roots = new Array(count);\n  this.ranks = new Array(count);\n  \n  for(var i=0; i<count; ++i) {\n    this.roots[i] = i;\n    this.ranks[i] = 0;\n  }\n}\n\nUnionFind.prototype.length = function() {\n  return this.roots.length;\n}\n\nUnionFind.prototype.makeSet = function() {\n  var n = this.roots.length;\n  this.roots.push(n);\n  this.ranks.push(0);\n  return n;\n}\n\nUnionFind.prototype.find = function(x) {\n  var roots = this.roots;\n  while(roots[x] !== x) {\n    var y = roots[x];\n    roots[x] = roots[y];\n    x = y;\n  }\n  return x;\n}\n\nUnionFind.prototype.link = function(x, y) {\n  var xr = this.find(x)\n    , yr = this.find(y);\n  if(xr === yr) {\n    return;\n  }\n  var ranks = this.ranks\n    , roots = this.roots\n    , xd    = ranks[xr]\n    , yd    = ranks[yr];\n  if(xd < yd) {\n    roots[xr] = yr;\n  } else if(yd < xd) {\n    roots[yr] = xr;\n  } else {\n    roots[yr] = xr;\n    ++ranks[xr];\n  }\n}\n\n\n},{}],511:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = simplifyPolygon\n\nvar orient = _dereq_(\"robust-orientation\")\nvar sc = _dereq_(\"simplicial-complex\")\n\nfunction errorWeight(base, a, b) {\n  var area = Math.abs(orient(base, a, b))\n  var perim = Math.sqrt(Math.pow(a[0] - b[0], 2) + Math.pow(a[1]-b[1], 2))\n  return area / perim\n}\n\nfunction simplifyPolygon(cells, positions, minArea) {\n\n  var n = positions.length\n  var nc = cells.length\n  var inv = new Array(n)\n  var outv = new Array(n)\n  var weights = new Array(n)\n  var dead = new Array(n)\n  \n  //Initialize tables\n  for(var i=0; i<n; ++i) {\n    inv[i] = outv[i] = -1\n    weights[i] = Infinity\n    dead[i] = false\n  }\n\n  //Compute neighbors\n  for(var i=0; i<nc; ++i) {\n    var c = cells[i]\n    if(c.length !== 2) {\n      throw new Error(\"Input must be a graph\")\n    }\n    var s = c[1]\n    var t = c[0]\n    if(outv[t] !== -1) {\n      outv[t] = -2\n    } else {\n      outv[t] = s\n    }\n    if(inv[s] !== -1) {\n      inv[s] = -2\n    } else {\n      inv[s] = t\n    }\n  }\n\n  //Updates the weight for vertex i\n  function computeWeight(i) {\n    if(dead[i]) {\n      return Infinity\n    }\n    //TODO: Check that the line segment doesn't cross once simplified\n    var s = inv[i]\n    var t = outv[i]\n    if((s<0) || (t<0)) {\n      return Infinity\n    } else {\n      return errorWeight(positions[i], positions[s], positions[t])\n    }\n  }\n\n  //Swaps two nodes on the heap (i,j) are the index of the nodes\n  function heapSwap(i,j) {\n    var a = heap[i]\n    var b = heap[j]\n    heap[i] = b\n    heap[j] = a\n    index[a] = j\n    index[b] = i\n  }\n\n  //Returns the weight of node i on the heap\n  function heapWeight(i) {\n    return weights[heap[i]]\n  }\n\n  function heapParent(i) {\n    if(i & 1) {\n      return (i - 1) >> 1\n    }\n    return (i >> 1) - 1\n  }\n\n  //Bubble element i down the heap\n  function heapDown(i) {\n    var w = heapWeight(i)\n    while(true) {\n      var tw = w\n      var left  = 2*i + 1\n      var right = 2*(i + 1)\n      var next = i\n      if(left < heapCount) {\n        var lw = heapWeight(left)\n        if(lw < tw) {\n          next = left\n          tw = lw\n        }\n      }\n      if(right < heapCount) {\n        var rw = heapWeight(right)\n        if(rw < tw) {\n          next = right\n        }\n      }\n      if(next === i) {\n        return i\n      }\n      heapSwap(i, next)\n      i = next      \n    }\n  }\n\n  //Bubbles element i up the heap\n  function heapUp(i) {\n    var w = heapWeight(i)\n    while(i > 0) {\n      var parent = heapParent(i)\n      if(parent >= 0) {\n        var pw = heapWeight(parent)\n        if(w < pw) {\n          heapSwap(i, parent)\n          i = parent\n          continue\n        }\n      }\n      return i\n    }\n  }\n\n  //Pop minimum element\n  function heapPop() {\n    if(heapCount > 0) {\n      var head = heap[0]\n      heapSwap(0, heapCount-1)\n      heapCount -= 1\n      heapDown(0)\n      return head\n    }\n    return -1\n  }\n\n  //Update heap item i\n  function heapUpdate(i, w) {\n    var a = heap[i]\n    if(weights[a] === w) {\n      return i\n    }\n    weights[a] = -Infinity\n    heapUp(i)\n    heapPop()\n    weights[a] = w\n    heapCount += 1\n    return heapUp(heapCount-1)\n  }\n\n  //Kills a vertex (assume vertex already removed from heap)\n  function kill(i) {\n    if(dead[i]) {\n      return\n    }\n    //Kill vertex\n    dead[i] = true\n    //Fixup topology\n    var s = inv[i]\n    var t = outv[i]\n    if(inv[t] >= 0) {\n      inv[t] = s\n    }\n    if(outv[s] >= 0) {\n      outv[s] = t\n    }\n\n    //Update weights on s and t\n    if(index[s] >= 0) {\n      heapUpdate(index[s], computeWeight(s))\n    }\n    if(index[t] >= 0) {\n      heapUpdate(index[t], computeWeight(t))\n    }\n  }\n\n  //Initialize weights and heap\n  var heap = []\n  var index = new Array(n)\n  for(var i=0; i<n; ++i) {\n    var w = weights[i] = computeWeight(i)\n    if(w < Infinity) {\n      index[i] = heap.length\n      heap.push(i)\n    } else {\n      index[i] = -1\n    }\n  }\n  var heapCount = heap.length\n  for(var i=heapCount>>1; i>=0; --i) {\n    heapDown(i)\n  }\n  \n  //Kill vertices\n  while(true) {\n    var hmin = heapPop()\n    if((hmin < 0) || (weights[hmin] > minArea)) {\n      break\n    }\n    kill(hmin)\n  }\n\n  //Build collapsed vertex table\n  var npositions = []\n  for(var i=0; i<n; ++i) {\n    if(!dead[i]) {\n      index[i] = npositions.length\n      npositions.push(positions[i].slice())\n    }\n  }\n  var nv = npositions.length\n\n  function tortoiseHare(seq, start) {\n    if(seq[start] < 0) {\n      return start\n    }\n    var t = start\n    var h = start\n    do {\n      //Walk two steps with h\n      var nh = seq[h]\n      if(!dead[h] || nh < 0 || nh === h) {\n        break\n      }\n      h = nh\n      nh = seq[h]\n      if(!dead[h] || nh < 0 || nh === h) {\n        break\n      }\n      h = nh\n\n      //Walk one step with t\n      t = seq[t]\n    } while(t !== h)\n    //Compress cycles\n    for(var v=start; v!==h; v = seq[v]) {\n      seq[v] = h\n    }\n    return h\n  }\n\n  var ncells = []\n  cells.forEach(function(c) {\n    var tin = tortoiseHare(inv, c[0])\n    var tout = tortoiseHare(outv, c[1])\n    if(tin >= 0 && tout >= 0 && tin !== tout) {\n      var cin = index[tin]\n      var cout = index[tout]\n      if(cin !== cout) {\n        ncells.push([ cin, cout ])\n      }\n    }\n  })\n\n  //Normalize result\n  sc.unique(sc.normalize(ncells))\n\n  //Return final list of cells\n  return {\n    positions: npositions,\n    edges: ncells\n  }\n}\n},{\"robust-orientation\":497,\"simplicial-complex\":509}],512:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = orderSegments\n\nvar orient = _dereq_(\"robust-orientation\")\n\nfunction horizontalOrder(a, b) {\n  var bl, br\n  if(b[0][0] < b[1][0]) {\n    bl = b[0]\n    br = b[1]\n  } else if(b[0][0] > b[1][0]) {\n    bl = b[1]\n    br = b[0]\n  } else {\n    var alo = Math.min(a[0][1], a[1][1])\n    var ahi = Math.max(a[0][1], a[1][1])\n    var blo = Math.min(b[0][1], b[1][1])\n    var bhi = Math.max(b[0][1], b[1][1])\n    if(ahi < blo) {\n      return ahi - blo\n    }\n    if(alo > bhi) {\n      return alo - bhi\n    }\n    return ahi - bhi\n  }\n  var al, ar\n  if(a[0][1] < a[1][1]) {\n    al = a[0]\n    ar = a[1]\n  } else {\n    al = a[1]\n    ar = a[0]\n  }\n  var d = orient(br, bl, al)\n  if(d) {\n    return d\n  }\n  d = orient(br, bl, ar)\n  if(d) {\n    return d\n  }\n  return ar - br\n}\n\nfunction orderSegments(b, a) {\n  var al, ar\n  if(a[0][0] < a[1][0]) {\n    al = a[0]\n    ar = a[1]\n  } else if(a[0][0] > a[1][0]) {\n    al = a[1]\n    ar = a[0]\n  } else {\n    return horizontalOrder(a, b)\n  }\n  var bl, br\n  if(b[0][0] < b[1][0]) {\n    bl = b[0]\n    br = b[1]\n  } else if(b[0][0] > b[1][0]) {\n    bl = b[1]\n    br = b[0]\n  } else {\n    return -horizontalOrder(b, a)\n  }\n  var d1 = orient(al, ar, br)\n  var d2 = orient(al, ar, bl)\n  if(d1 < 0) {\n    if(d2 <= 0) {\n      return d1\n    }\n  } else if(d1 > 0) {\n    if(d2 >= 0) {\n      return d1\n    }\n  } else if(d2) {\n    return d2\n  }\n  d1 = orient(br, bl, ar)\n  d2 = orient(br, bl, al)\n  if(d1 < 0) {\n    if(d2 <= 0) {\n      return d1\n    }\n  } else if(d1 > 0) {\n    if(d2 >= 0) {\n      return d1\n    }\n  } else if(d2) {\n    return d2\n  }\n  return ar[0] - br[0]\n}\n},{\"robust-orientation\":497}],513:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = createSlabDecomposition\n\nvar bounds = _dereq_(\"binary-search-bounds\")\nvar createRBTree = _dereq_(\"functional-red-black-tree\")\nvar orient = _dereq_(\"robust-orientation\")\nvar orderSegments = _dereq_(\"./lib/order-segments\")\n\nfunction SlabDecomposition(slabs, coordinates, horizontal) {\n  this.slabs = slabs\n  this.coordinates = coordinates\n  this.horizontal = horizontal\n}\n\nvar proto = SlabDecomposition.prototype\n\nfunction compareHorizontal(e, y) {\n  return e.y - y\n}\n\nfunction searchBucket(root, p) {\n  var lastNode = null\n  while(root) {\n    var seg = root.key\n    var l, r\n    if(seg[0][0] < seg[1][0]) {\n      l = seg[0]\n      r = seg[1]\n    } else {\n      l = seg[1]\n      r = seg[0]\n    }\n    var o = orient(l, r, p)\n    if(o < 0) {\n      root = root.left\n    } else if(o > 0) {\n      if(p[0] !== seg[1][0]) {\n        lastNode = root\n        root = root.right\n      } else {\n        var val = searchBucket(root.right, p)\n        if(val) {\n          return val\n        }\n        root = root.left\n      }\n    } else {\n      if(p[0] !== seg[1][0]) {\n        return root\n      } else {\n        var val = searchBucket(root.right, p)\n        if(val) {\n          return val\n        }\n        root = root.left\n      }\n    }\n  }\n  return lastNode\n}\n\nproto.castUp = function(p) {\n  var bucket = bounds.le(this.coordinates, p[0])\n  if(bucket < 0) {\n    return -1\n  }\n  var root = this.slabs[bucket]\n  var hitNode = searchBucket(this.slabs[bucket], p)\n  var lastHit = -1\n  if(hitNode) {\n    lastHit = hitNode.value\n  }\n  //Edge case: need to handle horizontal segments (sucks)\n  if(this.coordinates[bucket] === p[0]) {\n    var lastSegment = null\n    if(hitNode) {\n      lastSegment = hitNode.key\n    }\n    if(bucket > 0) {\n      var otherHitNode = searchBucket(this.slabs[bucket-1], p)\n      if(otherHitNode) {\n        if(lastSegment) {\n          if(orderSegments(otherHitNode.key, lastSegment) > 0) {\n            lastSegment = otherHitNode.key\n            lastHit = otherHitNode.value\n          }\n        } else {\n          lastHit = otherHitNode.value\n          lastSegment = otherHitNode.key\n        }\n      }\n    }\n    var horiz = this.horizontal[bucket]\n    if(horiz.length > 0) {\n      var hbucket = bounds.ge(horiz, p[1], compareHorizontal)\n      if(hbucket < horiz.length) {\n        var e = horiz[hbucket]\n        if(p[1] === e.y) {\n          if(e.closed) {\n            return e.index\n          } else {\n            while(hbucket < horiz.length-1 && horiz[hbucket+1].y === p[1]) {\n              hbucket = hbucket+1\n              e = horiz[hbucket]\n              if(e.closed) {\n                return e.index\n              }\n            }\n            if(e.y === p[1] && !e.start) {\n              hbucket = hbucket+1\n              if(hbucket >= horiz.length) {\n                return lastHit\n              }\n              e = horiz[hbucket]\n            }\n          }\n        }\n        //Check if e is above/below last segment\n        if(e.start) {\n          if(lastSegment) {\n            var o = orient(lastSegment[0], lastSegment[1], [p[0], e.y])\n            if(lastSegment[0][0] > lastSegment[1][0]) {\n              o = -o\n            }\n            if(o > 0) {\n              lastHit = e.index\n            }\n          } else {\n            lastHit = e.index\n          }\n        } else if(e.y !== p[1]) {\n          lastHit = e.index\n        }\n      }\n    }\n  }\n  return lastHit\n}\n\nfunction IntervalSegment(y, index, start, closed) {\n  this.y = y\n  this.index = index\n  this.start = start\n  this.closed = closed\n}\n\nfunction Event(x, segment, create, index) {\n  this.x = x\n  this.segment = segment\n  this.create = create\n  this.index = index\n}\n\n\nfunction createSlabDecomposition(segments) {\n  var numSegments = segments.length\n  var numEvents = 2 * numSegments\n  var events = new Array(numEvents)\n  for(var i=0; i<numSegments; ++i) {\n    var s = segments[i]\n    var f = s[0][0] < s[1][0]\n    events[2*i] = new Event(s[0][0], s, f, i)\n    events[2*i+1] = new Event(s[1][0], s, !f, i)\n  }\n  events.sort(function(a,b) {\n    var d = a.x - b.x\n    if(d) {\n      return d\n    }\n    d = a.create - b.create\n    if(d) {\n      return d\n    }\n    return Math.min(a.segment[0][1], a.segment[1][1]) - Math.min(b.segment[0][1], b.segment[1][1])\n  })\n  var tree = createRBTree(orderSegments)\n  var slabs = []\n  var lines = []\n  var horizontal = []\n  var lastX = -Infinity\n  for(var i=0; i<numEvents; ) {\n    var x = events[i].x\n    var horiz = []\n    while(i < numEvents) {\n      var e = events[i]\n      if(e.x !== x) {\n        break\n      }\n      i += 1\n      if(e.segment[0][0] === e.x && e.segment[1][0] === e.x) {\n        if(e.create) {\n          if(e.segment[0][1] < e.segment[1][1]) {\n            horiz.push(new IntervalSegment(\n                e.segment[0][1],\n                e.index,\n                true,\n                true))\n            horiz.push(new IntervalSegment(\n                e.segment[1][1],\n                e.index,\n                false,\n                false))\n          } else {\n            horiz.push(new IntervalSegment(\n                e.segment[1][1],\n                e.index,\n                true,\n                false))\n            horiz.push(new IntervalSegment(\n                e.segment[0][1],\n                e.index,\n                false,\n                true))\n          }\n        }\n      } else {\n        if(e.create) {\n          tree = tree.insert(e.segment, e.index)\n        } else {\n          tree = tree.remove(e.segment)\n        }\n      }\n    }\n    slabs.push(tree.root)\n    lines.push(x)\n    horizontal.push(horiz)\n  }\n  return new SlabDecomposition(slabs, lines, horizontal)\n}\n},{\"./lib/order-segments\":512,\"binary-search-bounds\":84,\"functional-red-black-tree\":229,\"robust-orientation\":497}],514:[function(_dereq_,module,exports){\n\"use strict\"\n\nvar robustDot = _dereq_(\"robust-dot-product\")\nvar robustSum = _dereq_(\"robust-sum\")\n\nmodule.exports = splitPolygon\nmodule.exports.positive = positive\nmodule.exports.negative = negative\n\nfunction planeT(p, plane) {\n  var r = robustSum(robustDot(p, plane), [plane[plane.length-1]])\n  return r[r.length-1]\n}\n\n\n//Can't do this exactly and emit a floating point result\nfunction lerpW(a, wa, b, wb) {\n  var d = wb - wa\n  var t = -wa / d\n  if(t < 0.0) {\n    t = 0.0\n  } else if(t > 1.0) {\n    t = 1.0\n  }\n  var ti = 1.0 - t\n  var n = a.length\n  var r = new Array(n)\n  for(var i=0; i<n; ++i) {\n    r[i] = t * a[i] + ti * b[i]\n  }\n  return r\n}\n\nfunction splitPolygon(points, plane) {\n  var pos = []\n  var neg = []\n  var a = planeT(points[points.length-1], plane)\n  for(var s=points[points.length-1], t=points[0], i=0; i<points.length; ++i, s=t) {\n    t = points[i]\n    var b = planeT(t, plane)\n    if((a < 0 && b > 0) || (a > 0 && b < 0)) {\n      var p = lerpW(s, b, t, a)\n      pos.push(p)\n      neg.push(p.slice())\n    }\n    if(b < 0) {\n      neg.push(t.slice())\n    } else if(b > 0) {\n      pos.push(t.slice())\n    } else {\n      pos.push(t.slice())\n      neg.push(t.slice())\n    }\n    a = b\n  }\n  return { positive: pos, negative: neg }\n}\n\nfunction positive(points, plane) {\n  var pos = []\n  var a = planeT(points[points.length-1], plane)\n  for(var s=points[points.length-1], t=points[0], i=0; i<points.length; ++i, s=t) {\n    t = points[i]\n    var b = planeT(t, plane)\n    if((a < 0 && b > 0) || (a > 0 && b < 0)) {\n      pos.push(lerpW(s, b, t, a))\n    }\n    if(b >= 0) {\n      pos.push(t.slice())\n    }\n    a = b\n  }\n  return pos\n}\n\nfunction negative(points, plane) {\n  var neg = []\n  var a = planeT(points[points.length-1], plane)\n  for(var s=points[points.length-1], t=points[0], i=0; i<points.length; ++i, s=t) {\n    t = points[i]\n    var b = planeT(t, plane)\n    if((a < 0 && b > 0) || (a > 0 && b < 0)) {\n      neg.push(lerpW(s, b, t, a))\n    }\n    if(b <= 0) {\n      neg.push(t.slice())\n    }\n    a = b\n  }\n  return neg\n}\n},{\"robust-dot-product\":494,\"robust-sum\":502}],515:[function(_dereq_,module,exports){\n/* global window, exports, define */\n\n!function() {\n    'use strict'\n\n    var re = {\n        not_string: /[^s]/,\n        not_bool: /[^t]/,\n        not_type: /[^T]/,\n        not_primitive: /[^v]/,\n        number: /[diefg]/,\n        numeric_arg: /[bcdiefguxX]/,\n        json: /[j]/,\n        not_json: /[^j]/,\n        text: /^[^\\x25]+/,\n        modulo: /^\\x25{2}/,\n        placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n        key: /^([a-z_][a-z_\\d]*)/i,\n        key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n        index_access: /^\\[(\\d+)\\]/,\n        sign: /^[+-]/\n    }\n\n    function sprintf(key) {\n        // `arguments` is not an array, but should be fine for this call\n        return sprintf_format(sprintf_parse(key), arguments)\n    }\n\n    function vsprintf(fmt, argv) {\n        return sprintf.apply(null, [fmt].concat(argv || []))\n    }\n\n    function sprintf_format(parse_tree, argv) {\n        var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign\n        for (i = 0; i < tree_length; i++) {\n            if (typeof parse_tree[i] === 'string') {\n                output += parse_tree[i]\n            }\n            else if (typeof parse_tree[i] === 'object') {\n                ph = parse_tree[i] // convenience purposes only\n                if (ph.keys) { // keyword argument\n                    arg = argv[cursor]\n                    for (k = 0; k < ph.keys.length; k++) {\n                        if (arg == undefined) {\n                            throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\n                        }\n                        arg = arg[ph.keys[k]]\n                    }\n                }\n                else if (ph.param_no) { // positional argument (explicit)\n                    arg = argv[ph.param_no]\n                }\n                else { // positional argument (implicit)\n                    arg = argv[cursor++]\n                }\n\n                if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\n                    arg = arg()\n                }\n\n                if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {\n                    throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n                }\n\n                if (re.number.test(ph.type)) {\n                    is_positive = arg >= 0\n                }\n\n                switch (ph.type) {\n                    case 'b':\n                        arg = parseInt(arg, 10).toString(2)\n                        break\n                    case 'c':\n                        arg = String.fromCharCode(parseInt(arg, 10))\n                        break\n                    case 'd':\n                    case 'i':\n                        arg = parseInt(arg, 10)\n                        break\n                    case 'j':\n                        arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\n                        break\n                    case 'e':\n                        arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\n                        break\n                    case 'f':\n                        arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\n                        break\n                    case 'g':\n                        arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\n                        break\n                    case 'o':\n                        arg = (parseInt(arg, 10) >>> 0).toString(8)\n                        break\n                    case 's':\n                        arg = String(arg)\n                        arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n                        break\n                    case 't':\n                        arg = String(!!arg)\n                        arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n                        break\n                    case 'T':\n                        arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n                        arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n                        break\n                    case 'u':\n                        arg = parseInt(arg, 10) >>> 0\n                        break\n                    case 'v':\n                        arg = arg.valueOf()\n                        arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n                        break\n                    case 'x':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16)\n                        break\n                    case 'X':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n                        break\n                }\n                if (re.json.test(ph.type)) {\n                    output += arg\n                }\n                else {\n                    if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n                        sign = is_positive ? '+' : '-'\n                        arg = arg.toString().replace(re.sign, '')\n                    }\n                    else {\n                        sign = ''\n                    }\n                    pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\n                    pad_length = ph.width - (sign + arg).length\n                    pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n                    output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n                }\n            }\n        }\n        return output\n    }\n\n    var sprintf_cache = Object.create(null)\n\n    function sprintf_parse(fmt) {\n        if (sprintf_cache[fmt]) {\n            return sprintf_cache[fmt]\n        }\n\n        var _fmt = fmt, match, parse_tree = [], arg_names = 0\n        while (_fmt) {\n            if ((match = re.text.exec(_fmt)) !== null) {\n                parse_tree.push(match[0])\n            }\n            else if ((match = re.modulo.exec(_fmt)) !== null) {\n                parse_tree.push('%')\n            }\n            else if ((match = re.placeholder.exec(_fmt)) !== null) {\n                if (match[2]) {\n                    arg_names |= 1\n                    var field_list = [], replacement_field = match[2], field_match = []\n                    if ((field_match = re.key.exec(replacement_field)) !== null) {\n                        field_list.push(field_match[1])\n                        while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n                            if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else {\n                                throw new SyntaxError('[sprintf] failed to parse named argument key')\n                            }\n                        }\n                    }\n                    else {\n                        throw new SyntaxError('[sprintf] failed to parse named argument key')\n                    }\n                    match[2] = field_list\n                }\n                else {\n                    arg_names |= 2\n                }\n                if (arg_names === 3) {\n                    throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n                }\n\n                parse_tree.push(\n                    {\n                        placeholder: match[0],\n                        param_no:    match[1],\n                        keys:        match[2],\n                        sign:        match[3],\n                        pad_char:    match[4],\n                        align:       match[5],\n                        width:       match[6],\n                        precision:   match[7],\n                        type:        match[8]\n                    }\n                )\n            }\n            else {\n                throw new SyntaxError('[sprintf] unexpected placeholder')\n            }\n            _fmt = _fmt.substring(match[0].length)\n        }\n        return sprintf_cache[fmt] = parse_tree\n    }\n\n    /**\n     * export to either browser or node.js\n     */\n    /* eslint-disable quote-props */\n    if (typeof exports !== 'undefined') {\n        exports['sprintf'] = sprintf\n        exports['vsprintf'] = vsprintf\n    }\n    if (typeof window !== 'undefined') {\n        window['sprintf'] = sprintf\n        window['vsprintf'] = vsprintf\n\n        if (typeof define === 'function' && define['amd']) {\n            define(function() {\n                return {\n                    'sprintf': sprintf,\n                    'vsprintf': vsprintf\n                }\n            })\n        }\n    }\n    /* eslint-enable quote-props */\n}(); // eslint-disable-line\n\n},{}],516:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar paren = _dereq_('parenthesis')\r\n\r\nmodule.exports = function splitBy (string, separator, o) {\r\n\tif (string == null) throw Error('First argument should be a string')\r\n\tif (separator == null) throw Error('Separator should be a string or a RegExp')\r\n\r\n\tif (!o) o = {}\r\n\telse if (typeof o === 'string' || Array.isArray(o)) {\r\n\t\to = {ignore: o}\r\n\t}\r\n\r\n\tif (o.escape == null) o.escape = true\r\n\tif (o.ignore == null) o.ignore = ['[]', '()', '{}', '<>', '\"\"', \"''\", '``', '“”', '«»']\r\n\telse {\r\n\t\tif (typeof o.ignore === 'string') {o.ignore = [o.ignore]}\r\n\r\n\t\to.ignore = o.ignore.map(function (pair) {\r\n\t\t\t// '\"' → '\"\"'\r\n\t\t\tif (pair.length === 1) pair = pair + pair\r\n\t\t\treturn pair\r\n\t\t})\r\n\t}\r\n\r\n\tvar tokens = paren.parse(string, {flat: true, brackets: o.ignore})\r\n\tvar str = tokens[0]\r\n\r\n\tvar parts = str.split(separator)\r\n\r\n\t// join parts separated by escape\r\n\tif (o.escape) {\r\n\t\tvar cleanParts = []\r\n\t\tfor (var i = 0; i < parts.length; i++) {\r\n\t\t\tvar prev = parts[i]\r\n\t\t\tvar part = parts[i + 1]\r\n\r\n\t\t\tif (prev[prev.length - 1] === '\\\\' && prev[prev.length - 2] !== '\\\\') {\r\n\t\t\t\tcleanParts.push(prev + separator + part)\r\n\t\t\t\ti++\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcleanParts.push(prev)\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts = cleanParts\r\n\t}\r\n\r\n\t// open parens pack & apply unquotes, if any\r\n\tfor (var i = 0; i < parts.length; i++) {\r\n\t\ttokens[0] = parts[i]\r\n\t\tparts[i] = paren.stringify(tokens, {flat: true})\r\n\t}\r\n\r\n\treturn parts\r\n}\r\n\n},{\"parenthesis\":453}],517:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = stronglyConnectedComponents\n\nfunction stronglyConnectedComponents(adjList) {\n  var numVertices = adjList.length;\n  var index = new Array(numVertices)\n  var lowValue = new Array(numVertices)\n  var active = new Array(numVertices)\n  var child = new Array(numVertices)\n  var scc = new Array(numVertices)\n  var sccLinks = new Array(numVertices)\n  \n  //Initialize tables\n  for(var i=0; i<numVertices; ++i) {\n    index[i] = -1\n    lowValue[i] = 0\n    active[i] = false\n    child[i] = 0\n    scc[i] = -1\n    sccLinks[i] = []\n  }\n\n  // The strongConnect function\n  var count = 0\n  var components = []\n  var sccAdjList = []\n\n  function strongConnect(v) {\n    // To avoid running out of stack space, this emulates the recursive behaviour of the normal algorithm, effectively using T as the call stack.\n    var S = [v], T = [v]\n    index[v] = lowValue[v] = count\n    active[v] = true\n    count += 1\n    while(T.length > 0) {\n      v = T[T.length-1]\n      var e = adjList[v]\n      if (child[v] < e.length) { // If we're not done iterating over the children, first try finishing that.\n        for(var i=child[v]; i<e.length; ++i) { // Start where we left off.\n          var u = e[i]\n          if(index[u] < 0) {\n            index[u] = lowValue[u] = count\n            active[u] = true\n            count += 1\n            S.push(u)\n            T.push(u)\n            break // First recurse, then continue here (with the same child!).\n            // There is a slight change to Tarjan's algorithm here.\n            // Normally, after having recursed, we set lowValue like we do for an active child (although some variants of the algorithm do it slightly differently).\n            // Here, we only do so if the child we recursed on is still active.\n            // The reasoning is that if it is no longer active, it must have had a lowValue equal to its own index, which means that it is necessarily higher than our lowValue.\n          } else if (active[u]) {\n            lowValue[v] = Math.min(lowValue[v], lowValue[u])|0\n          }\n          if (scc[u] >= 0) {\n            // Node v is not yet assigned an scc, but once it is that scc can apparently reach scc[u].\n            sccLinks[v].push(scc[u])\n          }\n        }\n        child[v] = i // Remember where we left off.\n      } else { // If we're done iterating over the children, check whether we have an scc.\n        if(lowValue[v] === index[v]) { // TODO: It /might/ be true that T is always a prefix of S (at this point!!!), and if so, this could be used here.\n          var component = []\n          var links = [], linkCount = 0\n          for(var i=S.length-1; i>=0; --i) {\n            var w = S[i]\n            active[w] = false\n            component.push(w)\n            links.push(sccLinks[w])\n            linkCount += sccLinks[w].length\n            scc[w] = components.length\n            if(w === v) {\n              S.length = i\n              break\n            }\n          }\n          components.push(component)\n          var allLinks = new Array(linkCount)\n          for(var i=0; i<links.length; i++) {\n            for(var j=0; j<links[i].length; j++) {\n              allLinks[--linkCount] = links[i][j]\n            }\n          }\n          sccAdjList.push(allLinks)\n        }\n        T.pop() // Now we're finished exploring this particular node (normally corresponds to the return statement)\n      }\n    }\n  }\n\n  //Run strong connect starting from each vertex\n  for(var i=0; i<numVertices; ++i) {\n    if(index[i] < 0) {\n      strongConnect(i)\n    }\n  }\n  \n  // Compact sccAdjList\n  var newE\n  for(var i=0; i<sccAdjList.length; i++) {\n    var e = sccAdjList[i]\n    if (e.length === 0) continue\n    e.sort(function (a,b) { return a-b; })\n    newE = [e[0]]\n    for(var j=1; j<e.length; j++) {\n      if (e[j] !== e[j-1]) {\n        newE.push(e[j])\n      }\n    }\n    sccAdjList[i] = newE\n  }  \n\n  return {components: components, adjacencyList: sccAdjList}\n}\n\n},{}],518:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = surfaceNets\n\nvar generateContourExtractor = _dereq_(\"ndarray-extract-contour\")\nvar triangulateCube = _dereq_(\"triangulate-hypercube\")\nvar zeroCrossings = _dereq_(\"zero-crossings\")\n\nfunction buildSurfaceNets(order, dtype) {\n  var dimension = order.length\n  var code = [\"'use strict';\"]\n  var funcName = \"surfaceNets\" + order.join(\"_\") + \"d\" + dtype\n\n  //Contour extraction function\n  code.push(\n    \"var contour=genContour({\",\n      \"order:[\", order.join(), \"],\",\n      \"scalarArguments: 3,\",\n      \"phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },\")\n  if(dtype === \"generic\") {\n    code.push(\"getters:[0],\")\n  }\n\n  //Generate vertex function\n  var cubeArgs = []\n  var extraArgs = []\n  for(var i=0; i<dimension; ++i) {\n    cubeArgs.push(\"d\" + i)\n    extraArgs.push(\"d\" + i)\n  }\n  for(var i=0; i<(1<<dimension); ++i) {\n    cubeArgs.push(\"v\" + i)\n    extraArgs.push(\"v\" + i)\n  }\n  for(var i=0; i<(1<<dimension); ++i) {\n    cubeArgs.push(\"p\" + i)\n    extraArgs.push(\"p\" + i)\n  }\n  cubeArgs.push(\"a\", \"b\", \"c\")\n  extraArgs.push(\"a\", \"c\")\n  code.push(\"vertex:function vertexFunc(\", cubeArgs.join(), \"){\")\n  //Mask args together\n  var maskStr = []\n  for(var i=0; i<(1<<dimension); ++i) {\n    maskStr.push(\"(p\" + i + \"<<\" + i + \")\")\n  }\n  //Generate variables and giganto switch statement\n  code.push(\"var m=(\", maskStr.join(\"+\"), \")|0;if(m===0||m===\", (1<<(1<<dimension))-1, \"){return}\")\n  var extraFuncs = []\n  var currentFunc = []\n  if(1<<(1<<dimension) <= 128) {\n    code.push(\"switch(m){\")\n    currentFunc = code\n  } else {\n    code.push(\"switch(m>>>7){\")\n  }\n  for(var i=0; i<1<<(1<<dimension); ++i) {\n    if(1<<(1<<dimension) > 128) {\n      if((i%128)===0) {\n        if(extraFuncs.length > 0) {\n          currentFunc.push(\"}}\")\n        }\n        var efName = \"vExtra\" + extraFuncs.length\n        code.push(\"case \", (i>>>7), \":\", efName, \"(m&0x7f,\", extraArgs.join(), \");break;\")\n        currentFunc = [\n          \"function \", efName, \"(m,\", extraArgs.join(), \"){switch(m){\"\n        ]\n        extraFuncs.push(currentFunc)\n      }  \n    }\n    currentFunc.push(\"case \", (i&0x7f), \":\")\n    var crossings = new Array(dimension)\n    var denoms = new Array(dimension)\n    var crossingCount = new Array(dimension)\n    var bias = new Array(dimension)\n    var totalCrossings = 0\n    for(var j=0; j<dimension; ++j) {\n      crossings[j] = []\n      denoms[j] = []\n      crossingCount[j] = 0\n      bias[j] = 0\n    }\n    for(var j=0; j<(1<<dimension); ++j) {\n      for(var k=0; k<dimension; ++k) {\n        var u = j ^ (1<<k)\n        if(u > j) {\n          continue\n        }\n        if(!(i&(1<<u)) !== !(i&(1<<j))) {\n          var sign = 1\n          if(i&(1<<u)) {\n            denoms[k].push(\"v\" + u + \"-v\" + j)\n          } else {\n            denoms[k].push(\"v\" + j + \"-v\" + u)\n            sign = -sign\n          }\n          if(sign < 0) {\n            crossings[k].push(\"-v\" + j + \"-v\" + u)\n            crossingCount[k] += 2\n          } else {\n            crossings[k].push(\"v\" + j + \"+v\" + u)\n            crossingCount[k] -= 2            \n          }\n          totalCrossings += 1\n          for(var l=0; l<dimension; ++l) {\n            if(l === k) {\n              continue\n            }\n            if(u&(1<<l)) {\n              bias[l] += 1\n            } else {\n              bias[l] -= 1\n            }\n          }\n        }\n      }\n    }\n    var vertexStr = []\n    for(var k=0; k<dimension; ++k) {\n      if(crossings[k].length === 0) {\n        vertexStr.push(\"d\" + k + \"-0.5\")\n      } else {\n        var cStr = \"\"\n        if(crossingCount[k] < 0) {\n          cStr = crossingCount[k] + \"*c\"\n        } else if(crossingCount[k] > 0) {\n          cStr = \"+\" + crossingCount[k] + \"*c\"\n        }\n        var weight = 0.5 * (crossings[k].length / totalCrossings)\n        var shift = 0.5 + 0.5 * (bias[k] / totalCrossings)\n        vertexStr.push(\"d\" + k + \"-\" + shift + \"-\" + weight + \"*(\" + crossings[k].join(\"+\") + cStr + \")/(\" + denoms[k].join(\"+\") + \")\")\n        \n      }\n    }\n    currentFunc.push(\"a.push([\", vertexStr.join(), \"]);\",\n      \"break;\")\n  }\n  code.push(\"}},\")\n  if(extraFuncs.length > 0) {\n    currentFunc.push(\"}}\")\n  }\n\n  //Create face function\n  var faceArgs = []\n  for(var i=0; i<(1<<(dimension-1)); ++i) {\n    faceArgs.push(\"v\" + i)\n  }\n  faceArgs.push(\"c0\", \"c1\", \"p0\", \"p1\", \"a\", \"b\", \"c\")\n  code.push(\"cell:function cellFunc(\", faceArgs.join(), \"){\")\n\n  var facets = triangulateCube(dimension-1)\n  code.push(\"if(p0){b.push(\",\n    facets.map(function(f) {\n      return \"[\" + f.map(function(v) {\n        return \"v\" + v\n      }) + \"]\"\n    }).join(), \")}else{b.push(\",\n    facets.map(function(f) {\n      var e = f.slice()\n      e.reverse()\n      return \"[\" + e.map(function(v) {\n        return \"v\" + v\n      }) + \"]\"\n    }).join(),\n    \")}}});function \", funcName, \"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return \", funcName, \";\")\n\n  for(var i=0; i<extraFuncs.length; ++i) {\n    code.push(extraFuncs[i].join(\"\"))\n  }\n\n  //Compile and link\n  var proc = new Function(\"genContour\", code.join(\"\"))\n  return proc(generateContourExtractor)\n}\n\n//1D case: Need to handle specially\nfunction mesh1D(array, level) {\n  var zc = zeroCrossings(array, level)\n  var n = zc.length\n  var npos = new Array(n)\n  var ncel = new Array(n)\n  for(var i=0; i<n; ++i) {\n    npos[i] = [ zc[i] ]\n    ncel[i] = [ i ]\n  }\n  return {\n    positions: npos,\n    cells: ncel\n  }\n}\n\nvar CACHE = {}\n\nfunction surfaceNets(array,level) {\n  if(array.dimension <= 0) {\n    return { positions: [], cells: [] }\n  } else if(array.dimension === 1) {\n    return mesh1D(array, level)\n  }\n  var typesig = array.order.join() + \"-\" + array.dtype\n  var proc = CACHE[typesig]\n  var level = (+level) || 0.0\n  if(!proc) {\n    proc = CACHE[typesig] = buildSurfaceNets(array.order, array.dtype)\n  }\n  return proc(array,level)\n}\n},{\"ndarray-extract-contour\":434,\"triangulate-hypercube\":528,\"zero-crossings\":561}],519:[function(_dereq_,module,exports){\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar TAU = Math.PI * 2;\n\nvar mapToEllipse = function mapToEllipse(_ref, rx, ry, cosphi, sinphi, centerx, centery) {\n  var x = _ref.x,\n      y = _ref.y;\n\n  x *= rx;\n  y *= ry;\n\n  var xp = cosphi * x - sinphi * y;\n  var yp = sinphi * x + cosphi * y;\n\n  return {\n    x: xp + centerx,\n    y: yp + centery\n  };\n};\n\nvar approxUnitArc = function approxUnitArc(ang1, ang2) {\n  // See http://spencermortensen.com/articles/bezier-circle/ for the derivation\n  // of this constant.\n  // Note: We need to keep the sign of ang2, because this determines the\n  //       direction of the arc using the sweep-flag parameter.\n  var c = 0.551915024494 * (ang2 < 0 ? -1 : 1);\n\n  var x1 = Math.cos(ang1);\n  var y1 = Math.sin(ang1);\n  var x2 = Math.cos(ang1 + ang2);\n  var y2 = Math.sin(ang1 + ang2);\n\n  return [{\n    x: x1 - y1 * c,\n    y: y1 + x1 * c\n  }, {\n    x: x2 + y2 * c,\n    y: y2 - x2 * c\n  }, {\n    x: x2,\n    y: y2\n  }];\n};\n\nvar vectorAngle = function vectorAngle(ux, uy, vx, vy) {\n  var sign = ux * vy - uy * vx < 0 ? -1 : 1;\n  var umag = Math.sqrt(ux * ux + uy * uy);\n  var vmag = Math.sqrt(ux * ux + uy * uy);\n  var dot = ux * vx + uy * vy;\n\n  var div = dot / (umag * vmag);\n\n  if (div > 1) {\n    div = 1;\n  }\n\n  if (div < -1) {\n    div = -1;\n  }\n\n  return sign * Math.acos(div);\n};\n\nvar getArcCenter = function getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp) {\n  var rxsq = Math.pow(rx, 2);\n  var rysq = Math.pow(ry, 2);\n  var pxpsq = Math.pow(pxp, 2);\n  var pypsq = Math.pow(pyp, 2);\n\n  var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq;\n\n  if (radicant < 0) {\n    radicant = 0;\n  }\n\n  radicant /= rxsq * pypsq + rysq * pxpsq;\n  radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n\n  var centerxp = radicant * rx / ry * pyp;\n  var centeryp = radicant * -ry / rx * pxp;\n\n  var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2;\n  var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2;\n\n  var vx1 = (pxp - centerxp) / rx;\n  var vy1 = (pyp - centeryp) / ry;\n  var vx2 = (-pxp - centerxp) / rx;\n  var vy2 = (-pyp - centeryp) / ry;\n\n  var ang1 = vectorAngle(1, 0, vx1, vy1);\n  var ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n\n  if (sweepFlag === 0 && ang2 > 0) {\n    ang2 -= TAU;\n  }\n\n  if (sweepFlag === 1 && ang2 < 0) {\n    ang2 += TAU;\n  }\n\n  return [centerx, centery, ang1, ang2];\n};\n\nvar arcToBezier = function arcToBezier(_ref2) {\n  var px = _ref2.px,\n      py = _ref2.py,\n      cx = _ref2.cx,\n      cy = _ref2.cy,\n      rx = _ref2.rx,\n      ry = _ref2.ry,\n      _ref2$xAxisRotation = _ref2.xAxisRotation,\n      xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation,\n      _ref2$largeArcFlag = _ref2.largeArcFlag,\n      largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag,\n      _ref2$sweepFlag = _ref2.sweepFlag,\n      sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag;\n\n  var curves = [];\n\n  if (rx === 0 || ry === 0) {\n    return [];\n  }\n\n  var sinphi = Math.sin(xAxisRotation * TAU / 360);\n  var cosphi = Math.cos(xAxisRotation * TAU / 360);\n\n  var pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2;\n  var pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2;\n\n  if (pxp === 0 && pyp === 0) {\n    return [];\n  }\n\n  rx = Math.abs(rx);\n  ry = Math.abs(ry);\n\n  var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2);\n\n  if (lambda > 1) {\n    rx *= Math.sqrt(lambda);\n    ry *= Math.sqrt(lambda);\n  }\n\n  var _getArcCenter = getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp),\n      _getArcCenter2 = _slicedToArray(_getArcCenter, 4),\n      centerx = _getArcCenter2[0],\n      centery = _getArcCenter2[1],\n      ang1 = _getArcCenter2[2],\n      ang2 = _getArcCenter2[3];\n\n  // If 'ang2' == 90.0000000001, then `ratio` will evaluate to\n  // 1.0000000001. This causes `segments` to be greater than one, which is an\n  // unecessary split, and adds extra points to the bezier curve. To alleviate\n  // this issue, we round to 1.0 when the ratio is close to 1.0.\n\n\n  var ratio = Math.abs(ang2) / (TAU / 4);\n  if (Math.abs(1.0 - ratio) < 0.0000001) {\n    ratio = 1.0;\n  }\n\n  var segments = Math.max(Math.ceil(ratio), 1);\n\n  ang2 /= segments;\n\n  for (var i = 0; i < segments; i++) {\n    curves.push(approxUnitArc(ang1, ang2));\n    ang1 += ang2;\n  }\n\n  return curves.map(function (curve) {\n    var _mapToEllipse = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery),\n        x1 = _mapToEllipse.x,\n        y1 = _mapToEllipse.y;\n\n    var _mapToEllipse2 = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery),\n        x2 = _mapToEllipse2.x,\n        y2 = _mapToEllipse2.y;\n\n    var _mapToEllipse3 = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery),\n        x = _mapToEllipse3.x,\n        y = _mapToEllipse3.y;\n\n    return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y };\n  });\n};\n\nexports.default = arcToBezier;\nmodule.exports = exports.default;\n},{}],520:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar parse = _dereq_('parse-svg-path')\r\nvar abs = _dereq_('abs-svg-path')\r\nvar normalize = _dereq_('normalize-svg-path')\r\nvar isSvgPath = _dereq_('is-svg-path')\r\nvar assert = _dereq_('assert')\r\n\r\nmodule.exports = pathBounds\r\n\r\n\r\nfunction pathBounds(path) {\r\n  // ES6 string tpl call\r\n  if (Array.isArray(path) && path.length === 1 && typeof path[0] === 'string') path = path[0]\r\n\r\n  // svg path string\r\n  if (typeof path === 'string') {\r\n    assert(isSvgPath(path), 'String is not an SVG path.')\r\n    path = parse(path)\r\n  }\r\n\r\n  assert(Array.isArray(path), 'Argument should be a string or an array of path segments.')\r\n\r\n  path = abs(path)\r\n  path = normalize(path)\r\n\r\n  if (!path.length) return [0, 0, 0, 0]\r\n\r\n  var bounds = [Infinity, Infinity, -Infinity, -Infinity]\r\n\r\n  for (var i = 0, l = path.length; i < l; i++) {\r\n    var points = path[i].slice(1)\r\n\r\n    for (var j = 0; j < points.length; j += 2) {\r\n      if (points[j + 0] < bounds[0]) bounds[0] = points[j + 0]\r\n      if (points[j + 1] < bounds[1]) bounds[1] = points[j + 1]\r\n      if (points[j + 0] > bounds[2]) bounds[2] = points[j + 0]\r\n      if (points[j + 1] > bounds[3]) bounds[3] = points[j + 1]\r\n    }\r\n  }\r\n\r\n  return bounds\r\n}\r\n\n},{\"abs-svg-path\":53,\"assert\":61,\"is-svg-path\":419,\"normalize-svg-path\":521,\"parse-svg-path\":455}],521:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nmodule.exports = normalize\r\n\r\nvar arcToCurve = _dereq_('svg-arc-to-cubic-bezier')\r\n\r\nfunction normalize(path){\r\n  // init state\r\n  var prev\r\n  var result = []\r\n  var bezierX = 0\r\n  var bezierY = 0\r\n  var startX = 0\r\n  var startY = 0\r\n  var quadX = null\r\n  var quadY = null\r\n  var x = 0\r\n  var y = 0\r\n\r\n  for (var i = 0, len = path.length; i < len; i++) {\r\n    var seg = path[i]\r\n    var command = seg[0]\r\n\r\n    switch (command) {\r\n      case 'M':\r\n        startX = seg[1]\r\n        startY = seg[2]\r\n        break\r\n      case 'A':\r\n        var curves = arcToCurve({\r\n          px: x,\r\n          py: y,\r\n          cx: seg[6],\r\n          cy:  seg[7],\r\n          rx: seg[1],\r\n          ry: seg[2],\r\n          xAxisRotation: seg[3],\r\n          largeArcFlag: seg[4],\r\n          sweepFlag: seg[5]\r\n        })\r\n\r\n        // null-curves\r\n        if (!curves.length) continue\r\n\r\n        for (var j = 0, c; j < curves.length; j++) {\r\n          c = curves[j]\r\n          seg = ['C', c.x1, c.y1, c.x2, c.y2, c.x, c.y]\r\n          if (j < curves.length - 1) result.push(seg)\r\n        }\r\n\r\n        break\r\n      case 'S':\r\n        // default control point\r\n        var cx = x\r\n        var cy = y\r\n        if (prev == 'C' || prev == 'S') {\r\n          cx += cx - bezierX // reflect the previous command's control\r\n          cy += cy - bezierY // point relative to the current point\r\n        }\r\n        seg = ['C', cx, cy, seg[1], seg[2], seg[3], seg[4]]\r\n        break\r\n      case 'T':\r\n        if (prev == 'Q' || prev == 'T') {\r\n          quadX = x * 2 - quadX // as with 'S' reflect previous control point\r\n          quadY = y * 2 - quadY\r\n        } else {\r\n          quadX = x\r\n          quadY = y\r\n        }\r\n        seg = quadratic(x, y, quadX, quadY, seg[1], seg[2])\r\n        break\r\n      case 'Q':\r\n        quadX = seg[1]\r\n        quadY = seg[2]\r\n        seg = quadratic(x, y, seg[1], seg[2], seg[3], seg[4])\r\n        break\r\n      case 'L':\r\n        seg = line(x, y, seg[1], seg[2])\r\n        break\r\n      case 'H':\r\n        seg = line(x, y, seg[1], y)\r\n        break\r\n      case 'V':\r\n        seg = line(x, y, x, seg[1])\r\n        break\r\n      case 'Z':\r\n        seg = line(x, y, startX, startY)\r\n        break\r\n    }\r\n\r\n    // update state\r\n    prev = command\r\n    x = seg[seg.length - 2]\r\n    y = seg[seg.length - 1]\r\n    if (seg.length > 4) {\r\n      bezierX = seg[seg.length - 4]\r\n      bezierY = seg[seg.length - 3]\r\n    } else {\r\n      bezierX = x\r\n      bezierY = y\r\n    }\r\n    result.push(seg)\r\n  }\r\n\r\n  return result\r\n}\r\n\r\nfunction line(x1, y1, x2, y2){\r\n  return ['C', x1, y1, x2, y2, x2, y2]\r\n}\r\n\r\nfunction quadratic(x1, y1, cx, cy, x2, y2){\r\n  return [\r\n    'C',\r\n    x1/3 + (2/3) * cx,\r\n    y1/3 + (2/3) * cy,\r\n    x2/3 + (2/3) * cx,\r\n    y2/3 + (2/3) * cy,\r\n    x2,\r\n    y2\r\n  ]\r\n}\r\n\n},{\"svg-arc-to-cubic-bezier\":519}],522:[function(_dereq_,module,exports){\n'use strict'\r\n\r\nvar pathBounds = _dereq_('svg-path-bounds')\r\nvar parsePath = _dereq_('parse-svg-path')\r\nvar drawPath = _dereq_('draw-svg-path')\r\nvar isSvgPath = _dereq_('is-svg-path')\r\nvar bitmapSdf = _dereq_('bitmap-sdf')\r\n\r\nvar canvas = document.createElement('canvas')\r\nvar ctx = canvas.getContext('2d')\r\n\r\n\r\nmodule.exports = pathSdf\r\n\r\n\r\nfunction pathSdf (path, options) {\r\n\tif (!isSvgPath(path)) throw Error('Argument should be valid svg path string')\r\n\r\n\tif (!options) options = {}\r\n\r\n\tvar w, h\r\n\tif (options.shape) {\r\n\t\tw = options.shape[0]\r\n\t\th = options.shape[1]\r\n\t}\r\n\telse {\r\n\t\tw = canvas.width = options.w || options.width || 200\r\n\t\th = canvas.height = options.h || options.height || 200\r\n\t}\r\n\tvar size = Math.min(w, h)\r\n\r\n\tvar stroke = options.stroke || 0\r\n\r\n\tvar viewbox = options.viewbox || options.viewBox || pathBounds(path)\r\n\tvar scale = [w / (viewbox[2] - viewbox[0]), h / (viewbox[3] - viewbox[1])]\r\n\tvar maxScale = Math.min(scale[0] || 0, scale[1] || 0) / 2\r\n\r\n\t//clear ctx\r\n\tctx.fillStyle = 'black'\r\n\tctx.fillRect(0, 0, w, h)\r\n\r\n\tctx.fillStyle = 'white'\r\n\r\n\tif (stroke)\t{\r\n\t\tif (typeof stroke != 'number') stroke = 1\r\n\t\tif (stroke > 0) {\r\n\t\t\tctx.strokeStyle = 'white'\r\n\t\t}\r\n\t\telse {\r\n\t\t\tctx.strokeStyle = 'black'\r\n\t\t}\r\n\r\n\t\tctx.lineWidth = Math.abs(stroke)\r\n\t}\r\n\r\n\tctx.translate(w * .5, h * .5)\r\n\tctx.scale(maxScale, maxScale)\r\n\r\n\t//if canvas svg paths api is available\r\n\tif (isPath2DSupported()) {\r\n\t\tvar path2d = new Path2D(path)\r\n\t\tctx.fill(path2d)\r\n\t\tstroke && ctx.stroke(path2d)\r\n\t}\r\n\t//fallback to bezier-curves\r\n\telse {\r\n\t\tvar segments = parsePath(path)\r\n\t\tdrawPath(ctx, segments)\r\n\t\tctx.fill()\r\n\t\tstroke && ctx.stroke()\r\n\t}\r\n\r\n\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\r\n\tvar data = bitmapSdf(ctx, {\r\n\t\tcutoff: options.cutoff != null ? options.cutoff : .5,\r\n\t\tradius: options.radius != null ? options.radius : size * .5\r\n\t})\r\n\r\n\treturn data\r\n}\r\n\r\nvar path2DSupported\r\n\r\nfunction isPath2DSupported () {\r\n\tif (path2DSupported != null) return path2DSupported\r\n\r\n\tvar ctx = document.createElement('canvas').getContext('2d')\r\n\tctx.canvas.width = ctx.canvas.height = 1\r\n\r\n\tif (!window.Path2D) return path2DSupported = false\r\n\r\n\tvar path = new Path2D('M0,0h1v1h-1v-1Z')\r\n\r\n\tctx.fillStyle = 'black'\r\n\tctx.fill(path)\r\n\r\n\tvar idata = ctx.getImageData(0,0,1,1)\r\n\r\n\treturn path2DSupported = idata && idata.data && idata.data[3] === 255\r\n}\r\n\n},{\"bitmap-sdf\":86,\"draw-svg-path\":162,\"is-svg-path\":419,\"parse-svg-path\":455,\"svg-path-bounds\":520}],523:[function(_dereq_,module,exports){\n(function (process){\n'use strict'\n\nmodule.exports = textGet\n\nvar vectorizeText = _dereq_('vectorize-text')\n\nvar globals = window || process.global || {}\nvar __TEXT_CACHE  = globals.__TEXT_CACHE || {}\nglobals.__TEXT_CACHE = {}\n\nfunction unwrap(mesh) {\n  var cells     = mesh.cells\n  var positions = mesh.positions\n  var data      = new Float32Array(cells.length * 6)\n  var ptr       = 0\n  var shapeX    = 0\n  for(var i=0; i<cells.length; ++i) {\n    var tri = cells[i]\n    for(var j=0; j<3; ++j) {\n      var point = positions[tri[j]]\n      data[ptr++] = point[0]\n      data[ptr++] = point[1] + 1.4\n      shapeX      = Math.max(point[0], shapeX)\n    }\n  }\n  return {\n    data:  data,\n    shape: shapeX\n  }\n}\n\nfunction textGet(font, text, opts) {\n  var opts = opts || {}\n  var fontcache = __TEXT_CACHE[font]\n  if(!fontcache) {\n    fontcache = __TEXT_CACHE[font] = {\n      ' ': {\n        data:   new Float32Array(0),\n        shape: 0.2\n      }\n    }\n  }\n  var mesh = fontcache[text]\n  if(!mesh) {\n    if(text.length <= 1 || !/\\d/.test(text)) {\n      mesh = fontcache[text] = unwrap(vectorizeText(text, {\n        triangles:     true,\n        font:          font,\n        textAlign:     opts.textAlign || 'left',\n        textBaseline:  'alphabetic',\n        styletags: {\n            breaklines: true,\n                 bolds: true,\n               italics: true,\n            subscripts: true,\n          superscripts: true\n        }\n      }))\n    } else {\n      var parts = text.split(/(\\d|\\s)/)\n      var buffer = new Array(parts.length)\n      var bufferSize = 0\n      var shapeX = 0\n      for(var i=0; i<parts.length; ++i) {\n        buffer[i] = textGet(font, parts[i])\n        bufferSize += buffer[i].data.length\n        shapeX += buffer[i].shape\n        if(i>0) {\n          shapeX += 0.02\n        }\n      }\n\n      var data = new Float32Array(bufferSize)\n      var ptr     = 0\n      var xOffset = -0.5 * shapeX\n      for(var i=0; i<buffer.length; ++i) {\n        var bdata = buffer[i].data\n        for(var j=0; j<bdata.length; j+=2) {\n          data[ptr++] = bdata[j] + xOffset\n          data[ptr++] = bdata[j+1]\n        }\n        xOffset += buffer[i].shape + 0.02\n      }\n\n      mesh = fontcache[text] = {\n        data:  data,\n        shape: shapeX\n      }\n    }\n  }\n\n   return mesh\n}\n\n}).call(this,_dereq_('_process'))\n},{\"_process\":477,\"vectorize-text\":537}],524:[function(_dereq_,module,exports){\n// TinyColor v1.4.1\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n    trimRight = /\\s+$/,\n    tinyCounter = 0,\n    mathRound = Math.round,\n    mathMin = Math.min,\n    mathMax = Math.max,\n    mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n    color = (color) ? color : '';\n    opts = opts || { };\n\n    // If input is already a tinycolor, return itself\n    if (color instanceof tinycolor) {\n       return color;\n    }\n    // If we are called as a function, call using new instead\n    if (!(this instanceof tinycolor)) {\n        return new tinycolor(color, opts);\n    }\n\n    var rgb = inputToRGB(color);\n    this._originalInput = color,\n    this._r = rgb.r,\n    this._g = rgb.g,\n    this._b = rgb.b,\n    this._a = rgb.a,\n    this._roundA = mathRound(100*this._a) / 100,\n    this._format = opts.format || rgb.format;\n    this._gradientType = opts.gradientType;\n\n    // Don't let the range of [0,255] come back in [0,1].\n    // Potentially lose a little bit of precision here, but will fix issues where\n    // .5 gets interpreted as half of the total, instead of half of 1\n    // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n    if (this._r < 1) { this._r = mathRound(this._r); }\n    if (this._g < 1) { this._g = mathRound(this._g); }\n    if (this._b < 1) { this._b = mathRound(this._b); }\n\n    this._ok = rgb.ok;\n    this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n    isDark: function() {\n        return this.getBrightness() < 128;\n    },\n    isLight: function() {\n        return !this.isDark();\n    },\n    isValid: function() {\n        return this._ok;\n    },\n    getOriginalInput: function() {\n      return this._originalInput;\n    },\n    getFormat: function() {\n        return this._format;\n    },\n    getAlpha: function() {\n        return this._a;\n    },\n    getBrightness: function() {\n        //http://www.w3.org/TR/AERT#color-contrast\n        var rgb = this.toRgb();\n        return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n    },\n    getLuminance: function() {\n        //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n        var rgb = this.toRgb();\n        var RsRGB, GsRGB, BsRGB, R, G, B;\n        RsRGB = rgb.r/255;\n        GsRGB = rgb.g/255;\n        BsRGB = rgb.b/255;\n\n        if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n        if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n        if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n        return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n    },\n    setAlpha: function(value) {\n        this._a = boundAlpha(value);\n        this._roundA = mathRound(100*this._a) / 100;\n        return this;\n    },\n    toHsv: function() {\n        var hsv = rgbToHsv(this._r, this._g, this._b);\n        return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n    },\n    toHsvString: function() {\n        var hsv = rgbToHsv(this._r, this._g, this._b);\n        var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n        return (this._a == 1) ?\n          \"hsv(\"  + h + \", \" + s + \"%, \" + v + \"%)\" :\n          \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n    },\n    toHsl: function() {\n        var hsl = rgbToHsl(this._r, this._g, this._b);\n        return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n    },\n    toHslString: function() {\n        var hsl = rgbToHsl(this._r, this._g, this._b);\n        var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n        return (this._a == 1) ?\n          \"hsl(\"  + h + \", \" + s + \"%, \" + l + \"%)\" :\n          \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n    },\n    toHex: function(allow3Char) {\n        return rgbToHex(this._r, this._g, this._b, allow3Char);\n    },\n    toHexString: function(allow3Char) {\n        return '#' + this.toHex(allow3Char);\n    },\n    toHex8: function(allow4Char) {\n        return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n    },\n    toHex8String: function(allow4Char) {\n        return '#' + this.toHex8(allow4Char);\n    },\n    toRgb: function() {\n        return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n    },\n    toRgbString: function() {\n        return (this._a == 1) ?\n          \"rgb(\"  + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n          \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n    },\n    toPercentageRgb: function() {\n        return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n    },\n    toPercentageRgbString: function() {\n        return (this._a == 1) ?\n          \"rgb(\"  + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n          \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n    },\n    toName: function() {\n        if (this._a === 0) {\n            return \"transparent\";\n        }\n\n        if (this._a < 1) {\n            return false;\n        }\n\n        return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n    },\n    toFilter: function(secondColor) {\n        var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n        var secondHex8String = hex8String;\n        var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n        if (secondColor) {\n            var s = tinycolor(secondColor);\n            secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n        }\n\n        return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n    },\n    toString: function(format) {\n        var formatSet = !!format;\n        format = format || this._format;\n\n        var formattedString = false;\n        var hasAlpha = this._a < 1 && this._a >= 0;\n        var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n        if (needsAlphaFormat) {\n            // Special case for \"transparent\", all other non-alpha formats\n            // will return rgba when there is transparency.\n            if (format === \"name\" && this._a === 0) {\n                return this.toName();\n            }\n            return this.toRgbString();\n        }\n        if (format === \"rgb\") {\n            formattedString = this.toRgbString();\n        }\n        if (format === \"prgb\") {\n            formattedString = this.toPercentageRgbString();\n        }\n        if (format === \"hex\" || format === \"hex6\") {\n            formattedString = this.toHexString();\n        }\n        if (format === \"hex3\") {\n            formattedString = this.toHexString(true);\n        }\n        if (format === \"hex4\") {\n            formattedString = this.toHex8String(true);\n        }\n        if (format === \"hex8\") {\n            formattedString = this.toHex8String();\n        }\n        if (format === \"name\") {\n            formattedString = this.toName();\n        }\n        if (format === \"hsl\") {\n            formattedString = this.toHslString();\n        }\n        if (format === \"hsv\") {\n            formattedString = this.toHsvString();\n        }\n\n        return formattedString || this.toHexString();\n    },\n    clone: function() {\n        return tinycolor(this.toString());\n    },\n\n    _applyModification: function(fn, args) {\n        var color = fn.apply(null, [this].concat([].slice.call(args)));\n        this._r = color._r;\n        this._g = color._g;\n        this._b = color._b;\n        this.setAlpha(color._a);\n        return this;\n    },\n    lighten: function() {\n        return this._applyModification(lighten, arguments);\n    },\n    brighten: function() {\n        return this._applyModification(brighten, arguments);\n    },\n    darken: function() {\n        return this._applyModification(darken, arguments);\n    },\n    desaturate: function() {\n        return this._applyModification(desaturate, arguments);\n    },\n    saturate: function() {\n        return this._applyModification(saturate, arguments);\n    },\n    greyscale: function() {\n        return this._applyModification(greyscale, arguments);\n    },\n    spin: function() {\n        return this._applyModification(spin, arguments);\n    },\n\n    _applyCombination: function(fn, args) {\n        return fn.apply(null, [this].concat([].slice.call(args)));\n    },\n    analogous: function() {\n        return this._applyCombination(analogous, arguments);\n    },\n    complement: function() {\n        return this._applyCombination(complement, arguments);\n    },\n    monochromatic: function() {\n        return this._applyCombination(monochromatic, arguments);\n    },\n    splitcomplement: function() {\n        return this._applyCombination(splitcomplement, arguments);\n    },\n    triad: function() {\n        return this._applyCombination(triad, arguments);\n    },\n    tetrad: function() {\n        return this._applyCombination(tetrad, arguments);\n    }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n    if (typeof color == \"object\") {\n        var newColor = {};\n        for (var i in color) {\n            if (color.hasOwnProperty(i)) {\n                if (i === \"a\") {\n                    newColor[i] = color[i];\n                }\n                else {\n                    newColor[i] = convertToPercentage(color[i]);\n                }\n            }\n        }\n        color = newColor;\n    }\n\n    return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n//     \"red\"\n//     \"#f00\" or \"f00\"\n//     \"#ff0000\" or \"ff0000\"\n//     \"#ff000000\" or \"ff000000\"\n//     \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n//     \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n//     \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n//     \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n//     \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n//     \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n//     \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n    var rgb = { r: 0, g: 0, b: 0 };\n    var a = 1;\n    var s = null;\n    var v = null;\n    var l = null;\n    var ok = false;\n    var format = false;\n\n    if (typeof color == \"string\") {\n        color = stringInputToObject(color);\n    }\n\n    if (typeof color == \"object\") {\n        if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n            rgb = rgbToRgb(color.r, color.g, color.b);\n            ok = true;\n            format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n        }\n        else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n            s = convertToPercentage(color.s);\n            v = convertToPercentage(color.v);\n            rgb = hsvToRgb(color.h, s, v);\n            ok = true;\n            format = \"hsv\";\n        }\n        else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n            s = convertToPercentage(color.s);\n            l = convertToPercentage(color.l);\n            rgb = hslToRgb(color.h, s, l);\n            ok = true;\n            format = \"hsl\";\n        }\n\n        if (color.hasOwnProperty(\"a\")) {\n            a = color.a;\n        }\n    }\n\n    a = boundAlpha(a);\n\n    return {\n        ok: ok,\n        format: color.format || format,\n        r: mathMin(255, mathMax(rgb.r, 0)),\n        g: mathMin(255, mathMax(rgb.g, 0)),\n        b: mathMin(255, mathMax(rgb.b, 0)),\n        a: a\n    };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// <http://www.w3.org/TR/css3-color/>\n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n    return {\n        r: bound01(r, 255) * 255,\n        g: bound01(g, 255) * 255,\n        b: bound01(b, 255) * 255\n    };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n    r = bound01(r, 255);\n    g = bound01(g, 255);\n    b = bound01(b, 255);\n\n    var max = mathMax(r, g, b), min = mathMin(r, g, b);\n    var h, s, l = (max + min) / 2;\n\n    if(max == min) {\n        h = s = 0; // achromatic\n    }\n    else {\n        var d = max - min;\n        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n        switch(max) {\n            case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n            case g: h = (b - r) / d + 2; break;\n            case b: h = (r - g) / d + 4; break;\n        }\n\n        h /= 6;\n    }\n\n    return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n    var r, g, b;\n\n    h = bound01(h, 360);\n    s = bound01(s, 100);\n    l = bound01(l, 100);\n\n    function hue2rgb(p, q, t) {\n        if(t < 0) t += 1;\n        if(t > 1) t -= 1;\n        if(t < 1/6) return p + (q - p) * 6 * t;\n        if(t < 1/2) return q;\n        if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n        return p;\n    }\n\n    if(s === 0) {\n        r = g = b = l; // achromatic\n    }\n    else {\n        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n        var p = 2 * l - q;\n        r = hue2rgb(p, q, h + 1/3);\n        g = hue2rgb(p, q, h);\n        b = hue2rgb(p, q, h - 1/3);\n    }\n\n    return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n    r = bound01(r, 255);\n    g = bound01(g, 255);\n    b = bound01(b, 255);\n\n    var max = mathMax(r, g, b), min = mathMin(r, g, b);\n    var h, s, v = max;\n\n    var d = max - min;\n    s = max === 0 ? 0 : d / max;\n\n    if(max == min) {\n        h = 0; // achromatic\n    }\n    else {\n        switch(max) {\n            case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n            case g: h = (b - r) / d + 2; break;\n            case b: h = (r - g) / d + 4; break;\n        }\n        h /= 6;\n    }\n    return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n    h = bound01(h, 360) * 6;\n    s = bound01(s, 100);\n    v = bound01(v, 100);\n\n    var i = Math.floor(h),\n        f = h - i,\n        p = v * (1 - s),\n        q = v * (1 - f * s),\n        t = v * (1 - (1 - f) * s),\n        mod = i % 6,\n        r = [v, q, p, p, t, v][mod],\n        g = [t, v, v, q, p, p][mod],\n        b = [p, p, t, v, v, q][mod];\n\n    return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n    var hex = [\n        pad2(mathRound(r).toString(16)),\n        pad2(mathRound(g).toString(16)),\n        pad2(mathRound(b).toString(16))\n    ];\n\n    // Return a 3 character hex if possible\n    if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n        return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n    }\n\n    return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n    var hex = [\n        pad2(mathRound(r).toString(16)),\n        pad2(mathRound(g).toString(16)),\n        pad2(mathRound(b).toString(16)),\n        pad2(convertDecimalToHex(a))\n    ];\n\n    // Return a 4 character hex if possible\n    if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n        return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n    }\n\n    return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n    var hex = [\n        pad2(convertDecimalToHex(a)),\n        pad2(mathRound(r).toString(16)),\n        pad2(mathRound(g).toString(16)),\n        pad2(mathRound(b).toString(16))\n    ];\n\n    return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n    if (!color1 || !color2) { return false; }\n    return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n    return tinycolor.fromRatio({\n        r: mathRandom(),\n        g: mathRandom(),\n        b: mathRandom()\n    });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\nfunction desaturate(color, amount) {\n    amount = (amount === 0) ? 0 : (amount || 10);\n    var hsl = tinycolor(color).toHsl();\n    hsl.s -= amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n    amount = (amount === 0) ? 0 : (amount || 10);\n    var hsl = tinycolor(color).toHsl();\n    hsl.s += amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n    return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n    amount = (amount === 0) ? 0 : (amount || 10);\n    var hsl = tinycolor(color).toHsl();\n    hsl.l += amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n    amount = (amount === 0) ? 0 : (amount || 10);\n    var rgb = tinycolor(color).toRgb();\n    rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n    rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n    rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n    return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n    amount = (amount === 0) ? 0 : (amount || 10);\n    var hsl = tinycolor(color).toHsl();\n    hsl.l -= amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n    var hsl = tinycolor(color).toHsl();\n    var hue = (hsl.h + amount) % 360;\n    hsl.h = hue < 0 ? 360 + hue : hue;\n    return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\nfunction complement(color) {\n    var hsl = tinycolor(color).toHsl();\n    hsl.h = (hsl.h + 180) % 360;\n    return tinycolor(hsl);\n}\n\nfunction triad(color) {\n    var hsl = tinycolor(color).toHsl();\n    var h = hsl.h;\n    return [\n        tinycolor(color),\n        tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n        tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n    ];\n}\n\nfunction tetrad(color) {\n    var hsl = tinycolor(color).toHsl();\n    var h = hsl.h;\n    return [\n        tinycolor(color),\n        tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n        tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n        tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n    ];\n}\n\nfunction splitcomplement(color) {\n    var hsl = tinycolor(color).toHsl();\n    var h = hsl.h;\n    return [\n        tinycolor(color),\n        tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n        tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n    ];\n}\n\nfunction analogous(color, results, slices) {\n    results = results || 6;\n    slices = slices || 30;\n\n    var hsl = tinycolor(color).toHsl();\n    var part = 360 / slices;\n    var ret = [tinycolor(color)];\n\n    for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n        hsl.h = (hsl.h + part) % 360;\n        ret.push(tinycolor(hsl));\n    }\n    return ret;\n}\n\nfunction monochromatic(color, results) {\n    results = results || 6;\n    var hsv = tinycolor(color).toHsv();\n    var h = hsv.h, s = hsv.s, v = hsv.v;\n    var ret = [];\n    var modification = 1 / results;\n\n    while (results--) {\n        ret.push(tinycolor({ h: h, s: s, v: v}));\n        v = (v + modification) % 1;\n    }\n\n    return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n    amount = (amount === 0) ? 0 : (amount || 50);\n\n    var rgb1 = tinycolor(color1).toRgb();\n    var rgb2 = tinycolor(color2).toRgb();\n\n    var p = amount / 100;\n\n    var rgba = {\n        r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n        g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n        b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n        a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n    };\n\n    return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n// `contrast`\n// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\ntinycolor.readability = function(color1, color2) {\n    var c1 = tinycolor(color1);\n    var c2 = tinycolor(color2);\n    return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);\n};\n\n// `isReadable`\n// Ensure that foreground and background color combinations meet WCAG2 guidelines.\n// The third argument is an optional Object.\n//      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n//      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n// If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n// *Example*\n//    tinycolor.isReadable(\"#000\", \"#111\") => false\n//    tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n    var readability = tinycolor.readability(color1, color2);\n    var wcag2Parms, out;\n\n    out = false;\n\n    wcag2Parms = validateWCAG2Parms(wcag2);\n    switch (wcag2Parms.level + wcag2Parms.size) {\n        case \"AAsmall\":\n        case \"AAAlarge\":\n            out = readability >= 4.5;\n            break;\n        case \"AAlarge\":\n            out = readability >= 3;\n            break;\n        case \"AAAsmall\":\n            out = readability >= 7;\n            break;\n    }\n    return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n//    tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n//    tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\n//    tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n//    tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n    var bestColor = null;\n    var bestScore = 0;\n    var readability;\n    var includeFallbackColors, level, size ;\n    args = args || {};\n    includeFallbackColors = args.includeFallbackColors ;\n    level = args.level;\n    size = args.size;\n\n    for (var i= 0; i < colorList.length ; i++) {\n        readability = tinycolor.readability(baseColor, colorList[i]);\n        if (readability > bestScore) {\n            bestScore = readability;\n            bestColor = tinycolor(colorList[i]);\n        }\n    }\n\n    if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n        return bestColor;\n    }\n    else {\n        args.includeFallbackColors=false;\n        return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n    }\n};\n\n\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\nvar names = tinycolor.names = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"0ff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"00f\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    burntsienna: \"ea7e5d\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"0ff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkgrey: \"a9a9a9\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkslategrey: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dimgrey: \"696969\",\n    dodgerblue: \"1e90ff\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"f0f\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    grey: \"808080\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgray: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightgrey: \"d3d3d3\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslategray: \"789\",\n    lightslategrey: \"789\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"0f0\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"f0f\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370db\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"db7093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    rebeccapurple: \"663399\",\n    red: \"f00\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    slategrey: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    wheat: \"f5deb3\",\n    white: \"fff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ff0\",\n    yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n    var flipped = { };\n    for (var i in o) {\n        if (o.hasOwnProperty(i)) {\n            flipped[o[i]] = i;\n        }\n    }\n    return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n    a = parseFloat(a);\n\n    if (isNaN(a) || a < 0 || a > 1) {\n        a = 1;\n    }\n\n    return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n    if (isOnePointZero(n)) { n = \"100%\"; }\n\n    var processPercent = isPercentage(n);\n    n = mathMin(max, mathMax(0, parseFloat(n)));\n\n    // Automatically convert percentage into number\n    if (processPercent) {\n        n = parseInt(n * max, 10) / 100;\n    }\n\n    // Handle floating point rounding errors\n    if ((Math.abs(n - max) < 0.000001)) {\n        return 1;\n    }\n\n    // Convert into [0, 1] range if it isn't already\n    return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n    return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n    return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nfunction isOnePointZero(n) {\n    return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n    return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n    return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n    if (n <= 1) {\n        n = (n * 100) + \"%\";\n    }\n\n    return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n    return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n    return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n    // <http://www.w3.org/TR/css3-values/#integers>\n    var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n    // <http://www.w3.org/TR/css3-values/#number-value>\n    var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n    // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.\n    var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n    // Actual matching.\n    // Parentheses and commas are optional, but not required.\n    // Whitespace can take the place of commas or opening paren\n    var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n    var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n    return {\n        CSS_UNIT: new RegExp(CSS_UNIT),\n        rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n        rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n        hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n        hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n        hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n        hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n        hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n        hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n        hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n        hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n    };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n    return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing.  Take in a number of formats, and output an object\n// based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n    color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n    var named = false;\n    if (names[color]) {\n        color = names[color];\n        named = true;\n    }\n    else if (color == 'transparent') {\n        return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n    }\n\n    // Try to match string input using regular expressions.\n    // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n    // Just return an object and let the conversion functions handle that.\n    // This way the result will be the same whether the tinycolor is initialized with string or object.\n    var match;\n    if ((match = matchers.rgb.exec(color))) {\n        return { r: match[1], g: match[2], b: match[3] };\n    }\n    if ((match = matchers.rgba.exec(color))) {\n        return { r: match[1], g: match[2], b: match[3], a: match[4] };\n    }\n    if ((match = matchers.hsl.exec(color))) {\n        return { h: match[1], s: match[2], l: match[3] };\n    }\n    if ((match = matchers.hsla.exec(color))) {\n        return { h: match[1], s: match[2], l: match[3], a: match[4] };\n    }\n    if ((match = matchers.hsv.exec(color))) {\n        return { h: match[1], s: match[2], v: match[3] };\n    }\n    if ((match = matchers.hsva.exec(color))) {\n        return { h: match[1], s: match[2], v: match[3], a: match[4] };\n    }\n    if ((match = matchers.hex8.exec(color))) {\n        return {\n            r: parseIntFromHex(match[1]),\n            g: parseIntFromHex(match[2]),\n            b: parseIntFromHex(match[3]),\n            a: convertHexToDecimal(match[4]),\n            format: named ? \"name\" : \"hex8\"\n        };\n    }\n    if ((match = matchers.hex6.exec(color))) {\n        return {\n            r: parseIntFromHex(match[1]),\n            g: parseIntFromHex(match[2]),\n            b: parseIntFromHex(match[3]),\n            format: named ? \"name\" : \"hex\"\n        };\n    }\n    if ((match = matchers.hex4.exec(color))) {\n        return {\n            r: parseIntFromHex(match[1] + '' + match[1]),\n            g: parseIntFromHex(match[2] + '' + match[2]),\n            b: parseIntFromHex(match[3] + '' + match[3]),\n            a: convertHexToDecimal(match[4] + '' + match[4]),\n            format: named ? \"name\" : \"hex8\"\n        };\n    }\n    if ((match = matchers.hex3.exec(color))) {\n        return {\n            r: parseIntFromHex(match[1] + '' + match[1]),\n            g: parseIntFromHex(match[2] + '' + match[2]),\n            b: parseIntFromHex(match[3] + '' + match[3]),\n            format: named ? \"name\" : \"hex\"\n        };\n    }\n\n    return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n    // return valid WCAG2 parms for isReadable.\n    // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n    var level, size;\n    parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n    level = (parms.level || \"AA\").toUpperCase();\n    size = (parms.size || \"small\").toLowerCase();\n    if (level !== \"AA\" && level !== \"AAA\") {\n        level = \"AA\";\n    }\n    if (size !== \"small\" && size !== \"large\") {\n        size = \"small\";\n    }\n    return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n    module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n    define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n    window.tinycolor = tinycolor;\n}\n\n})(Math);\n\n},{}],525:[function(_dereq_,module,exports){\n/* @module to-float32 */\r\n\r\n'use strict'\r\n\r\nmodule.exports = float32\r\nmodule.exports.float32 =\r\nmodule.exports.float = float32\r\nmodule.exports.fract32 =\r\nmodule.exports.fract = fract32\r\n\r\nvar narr = new Float32Array(1)\r\n\r\n// return fractional part of float32 array\r\nfunction fract32 (arr) {\r\n\tif (arr.length) {\r\n\t\tvar fract = float32(arr)\r\n\t\tfor (var i = 0, l = fract.length; i < l; i++) {\r\n\t\t\tfract[i] = arr[i] - fract[i]\r\n\t\t}\r\n\t\treturn fract\r\n\t}\r\n\r\n\t// number\r\n\treturn float32(arr - float32(arr))\r\n}\r\n\r\n// make sure data is float32 array\r\nfunction float32 (arr) {\r\n\tif (arr.length) {\r\n\t\tif (arr instanceof Float32Array) return arr\r\n\t\tvar float = new Float32Array(arr)\r\n\t\tfloat.set(arr)\r\n\t\treturn float\r\n\t}\r\n\r\n\t// number\r\n\tnarr[0] = arr\r\n\treturn narr[0]\r\n}\r\n\n},{}],526:[function(_dereq_,module,exports){\n'use strict'\n\nvar parseUnit = _dereq_('parse-unit')\n\nmodule.exports = toPX\n\nvar PIXELS_PER_INCH = 96\n\nfunction getPropertyInPX(element, prop) {\n  var parts = parseUnit(getComputedStyle(element).getPropertyValue(prop))\n  return parts[0] * toPX(parts[1], element)\n}\n\n//This brutal hack is needed\nfunction getSizeBrutal(unit, element) {\n  var testDIV = document.createElement('div')\n  testDIV.style['font-size'] = '128' + unit\n  element.appendChild(testDIV)\n  var size = getPropertyInPX(testDIV, 'font-size') / 128\n  element.removeChild(testDIV)\n  return size\n}\n\nfunction toPX(str, element) {\n  element = element || document.body\n  str = (str || 'px').trim().toLowerCase()\n  if(element === window || element === document) {\n    element = document.body \n  }\n  switch(str) {\n    case '%':  //Ambiguous, not sure if we should use width or height\n      return element.clientHeight / 100.0\n    case 'ch':\n    case 'ex':\n      return getSizeBrutal(str, element)\n    case 'em':\n      return getPropertyInPX(element, 'font-size')\n    case 'rem':\n      return getPropertyInPX(document.body, 'font-size')\n    case 'vw':\n      return window.innerWidth/100\n    case 'vh':\n      return window.innerHeight/100\n    case 'vmin':\n      return Math.min(window.innerWidth, window.innerHeight) / 100\n    case 'vmax':\n      return Math.max(window.innerWidth, window.innerHeight) / 100\n    case 'in':\n      return PIXELS_PER_INCH\n    case 'cm':\n      return PIXELS_PER_INCH / 2.54\n    case 'mm':\n      return PIXELS_PER_INCH / 25.4\n    case 'pt':\n      return PIXELS_PER_INCH / 72\n    case 'pc':\n      return PIXELS_PER_INCH / 6\n  }\n  return 1\n}\n},{\"parse-unit\":456}],527:[function(_dereq_,module,exports){\n// https://github.com/topojson/topojson-client Version 2.1.0. Copyright 2016 Mike Bostock.\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n  typeof define === 'function' && define.amd ? define(['exports'], factory) :\n  (factory((global.topojson = global.topojson || {})));\n}(this, (function (exports) { 'use strict';\n\nvar identity = function(x) {\n  return x;\n};\n\nvar transform = function(topology) {\n  if ((transform = topology.transform) == null) return identity;\n  var transform,\n      x0,\n      y0,\n      kx = transform.scale[0],\n      ky = transform.scale[1],\n      dx = transform.translate[0],\n      dy = transform.translate[1];\n  return function(point, i) {\n    if (!i) x0 = y0 = 0;\n    point[0] = (x0 += point[0]) * kx + dx;\n    point[1] = (y0 += point[1]) * ky + dy;\n    return point;\n  };\n};\n\nvar bbox = function(topology) {\n  var bbox = topology.bbox;\n\n  function bboxPoint(p0) {\n    p1[0] = p0[0], p1[1] = p0[1], t(p1);\n    if (p1[0] < x0) x0 = p1[0];\n    if (p1[0] > x1) x1 = p1[0];\n    if (p1[1] < y0) y0 = p1[1];\n    if (p1[1] > y1) y1 = p1[1];\n  }\n\n  function bboxGeometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(bboxGeometry); break;\n      case \"Point\": bboxPoint(o.coordinates); break;\n      case \"MultiPoint\": o.coordinates.forEach(bboxPoint); break;\n    }\n  }\n\n  if (!bbox) {\n    var t = transform(topology), p0, p1 = new Array(2), name,\n        x0 = Infinity, y0 = x0, x1 = -x0, y1 = -x0;\n\n    topology.arcs.forEach(function(arc) {\n      var i = -1, n = arc.length;\n      while (++i < n) {\n        p0 = arc[i], p1[0] = p0[0], p1[1] = p0[1], t(p1, i);\n        if (p1[0] < x0) x0 = p1[0];\n        if (p1[0] > x1) x1 = p1[0];\n        if (p1[1] < y0) y0 = p1[1];\n        if (p1[1] > y1) y1 = p1[1];\n      }\n    });\n\n    for (name in topology.objects) {\n      bboxGeometry(topology.objects[name]);\n    }\n\n    bbox = topology.bbox = [x0, y0, x1, y1];\n  }\n\n  return bbox;\n};\n\nvar reverse = function(array, n) {\n  var t, j = array.length, i = j - n;\n  while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;\n};\n\nvar feature = function(topology, o) {\n  return o.type === \"GeometryCollection\"\n      ? {type: \"FeatureCollection\", features: o.geometries.map(function(o) { return feature$1(topology, o); })}\n      : feature$1(topology, o);\n};\n\nfunction feature$1(topology, o) {\n  var id = o.id,\n      bbox = o.bbox,\n      properties = o.properties == null ? {} : o.properties,\n      geometry = object(topology, o);\n  return id == null && bbox == null ? {type: \"Feature\", properties: properties, geometry: geometry}\n      : bbox == null ? {type: \"Feature\", id: id, properties: properties, geometry: geometry}\n      : {type: \"Feature\", id: id, bbox: bbox, properties: properties, geometry: geometry};\n}\n\nfunction object(topology, o) {\n  var transformPoint = transform(topology),\n      arcs = topology.arcs;\n\n  function arc(i, points) {\n    if (points.length) points.pop();\n    for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {\n      points.push(transformPoint(a[k].slice(), k));\n    }\n    if (i < 0) reverse(points, n);\n  }\n\n  function point(p) {\n    return transformPoint(p.slice());\n  }\n\n  function line(arcs) {\n    var points = [];\n    for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points);\n    if (points.length < 2) points.push(points[0].slice());\n    return points;\n  }\n\n  function ring(arcs) {\n    var points = line(arcs);\n    while (points.length < 4) points.push(points[0].slice());\n    return points;\n  }\n\n  function polygon(arcs) {\n    return arcs.map(ring);\n  }\n\n  function geometry(o) {\n    var type = o.type, coordinates;\n    switch (type) {\n      case \"GeometryCollection\": return {type: type, geometries: o.geometries.map(geometry)};\n      case \"Point\": coordinates = point(o.coordinates); break;\n      case \"MultiPoint\": coordinates = o.coordinates.map(point); break;\n      case \"LineString\": coordinates = line(o.arcs); break;\n      case \"MultiLineString\": coordinates = o.arcs.map(line); break;\n      case \"Polygon\": coordinates = polygon(o.arcs); break;\n      case \"MultiPolygon\": coordinates = o.arcs.map(polygon); break;\n      default: return null;\n    }\n    return {type: type, coordinates: coordinates};\n  }\n\n  return geometry(o);\n}\n\nvar stitch = function(topology, arcs) {\n  var stitchedArcs = {},\n      fragmentByStart = {},\n      fragmentByEnd = {},\n      fragments = [],\n      emptyIndex = -1;\n\n  // Stitch empty arcs first, since they may be subsumed by other arcs.\n  arcs.forEach(function(i, j) {\n    var arc = topology.arcs[i < 0 ? ~i : i], t;\n    if (arc.length < 3 && !arc[1][0] && !arc[1][1]) {\n      t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t;\n    }\n  });\n\n  arcs.forEach(function(i) {\n    var e = ends(i),\n        start = e[0],\n        end = e[1],\n        f, g;\n\n    if (f = fragmentByEnd[start]) {\n      delete fragmentByEnd[f.end];\n      f.push(i);\n      f.end = end;\n      if (g = fragmentByStart[end]) {\n        delete fragmentByStart[g.start];\n        var fg = g === f ? f : f.concat(g);\n        fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else if (f = fragmentByStart[end]) {\n      delete fragmentByStart[f.start];\n      f.unshift(i);\n      f.start = start;\n      if (g = fragmentByEnd[start]) {\n        delete fragmentByEnd[g.end];\n        var gf = g === f ? f : g.concat(f);\n        fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else {\n      f = [i];\n      fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f;\n    }\n  });\n\n  function ends(i) {\n    var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1;\n    if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; });\n    else p1 = arc[arc.length - 1];\n    return i < 0 ? [p1, p0] : [p0, p1];\n  }\n\n  function flush(fragmentByEnd, fragmentByStart) {\n    for (var k in fragmentByEnd) {\n      var f = fragmentByEnd[k];\n      delete fragmentByStart[f.start];\n      delete f.start;\n      delete f.end;\n      f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; });\n      fragments.push(f);\n    }\n  }\n\n  flush(fragmentByEnd, fragmentByStart);\n  flush(fragmentByStart, fragmentByEnd);\n  arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); });\n\n  return fragments;\n};\n\nvar mesh = function(topology) {\n  return object(topology, meshArcs.apply(this, arguments));\n};\n\nfunction meshArcs(topology, object$$1, filter) {\n  var arcs, i, n;\n  if (arguments.length > 1) arcs = extractArcs(topology, object$$1, filter);\n  else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i;\n  return {type: \"MultiLineString\", arcs: stitch(topology, arcs)};\n}\n\nfunction extractArcs(topology, object$$1, filter) {\n  var arcs = [],\n      geomsByArc = [],\n      geom;\n\n  function extract0(i) {\n    var j = i < 0 ? ~i : i;\n    (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom});\n  }\n\n  function extract1(arcs) {\n    arcs.forEach(extract0);\n  }\n\n  function extract2(arcs) {\n    arcs.forEach(extract1);\n  }\n\n  function extract3(arcs) {\n    arcs.forEach(extract2);\n  }\n\n  function geometry(o) {\n    switch (geom = o, o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n      case \"LineString\": extract1(o.arcs); break;\n      case \"MultiLineString\": case \"Polygon\": extract2(o.arcs); break;\n      case \"MultiPolygon\": extract3(o.arcs); break;\n    }\n  }\n\n  geometry(object$$1);\n\n  geomsByArc.forEach(filter == null\n      ? function(geoms) { arcs.push(geoms[0].i); }\n      : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); });\n\n  return arcs;\n}\n\nfunction planarRingArea(ring) {\n  var i = -1, n = ring.length, a, b = ring[n - 1], area = 0;\n  while (++i < n) a = b, b = ring[i], area += a[0] * b[1] - a[1] * b[0];\n  return Math.abs(area); // Note: doubled area!\n}\n\nvar merge = function(topology) {\n  return object(topology, mergeArcs.apply(this, arguments));\n};\n\nfunction mergeArcs(topology, objects) {\n  var polygonsByArc = {},\n      polygons = [],\n      groups = [];\n\n  objects.forEach(geometry);\n\n  function geometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n      case \"Polygon\": extract(o.arcs); break;\n      case \"MultiPolygon\": o.arcs.forEach(extract); break;\n    }\n  }\n\n  function extract(polygon) {\n    polygon.forEach(function(ring) {\n      ring.forEach(function(arc) {\n        (polygonsByArc[arc = arc < 0 ? ~arc : arc] || (polygonsByArc[arc] = [])).push(polygon);\n      });\n    });\n    polygons.push(polygon);\n  }\n\n  function area(ring) {\n    return planarRingArea(object(topology, {type: \"Polygon\", arcs: [ring]}).coordinates[0]);\n  }\n\n  polygons.forEach(function(polygon) {\n    if (!polygon._) {\n      var group = [],\n          neighbors = [polygon];\n      polygon._ = 1;\n      groups.push(group);\n      while (polygon = neighbors.pop()) {\n        group.push(polygon);\n        polygon.forEach(function(ring) {\n          ring.forEach(function(arc) {\n            polygonsByArc[arc < 0 ? ~arc : arc].forEach(function(polygon) {\n              if (!polygon._) {\n                polygon._ = 1;\n                neighbors.push(polygon);\n              }\n            });\n          });\n        });\n      }\n    }\n  });\n\n  polygons.forEach(function(polygon) {\n    delete polygon._;\n  });\n\n  return {\n    type: \"MultiPolygon\",\n    arcs: groups.map(function(polygons) {\n      var arcs = [], n;\n\n      // Extract the exterior (unique) arcs.\n      polygons.forEach(function(polygon) {\n        polygon.forEach(function(ring) {\n          ring.forEach(function(arc) {\n            if (polygonsByArc[arc < 0 ? ~arc : arc].length < 2) {\n              arcs.push(arc);\n            }\n          });\n        });\n      });\n\n      // Stitch the arcs into one or more rings.\n      arcs = stitch(topology, arcs);\n\n      // If more than one ring is returned,\n      // at most one of these rings can be the exterior;\n      // choose the one with the greatest absolute area.\n      if ((n = arcs.length) > 1) {\n        for (var i = 1, k = area(arcs[0]), ki, t; i < n; ++i) {\n          if ((ki = area(arcs[i])) > k) {\n            t = arcs[0], arcs[0] = arcs[i], arcs[i] = t, k = ki;\n          }\n        }\n      }\n\n      return arcs;\n    })\n  };\n}\n\nvar bisect = function(a, x) {\n  var lo = 0, hi = a.length;\n  while (lo < hi) {\n    var mid = lo + hi >>> 1;\n    if (a[mid] < x) lo = mid + 1;\n    else hi = mid;\n  }\n  return lo;\n};\n\nvar neighbors = function(objects) {\n  var indexesByArc = {}, // arc index -> array of object indexes\n      neighbors = objects.map(function() { return []; });\n\n  function line(arcs, i) {\n    arcs.forEach(function(a) {\n      if (a < 0) a = ~a;\n      var o = indexesByArc[a];\n      if (o) o.push(i);\n      else indexesByArc[a] = [i];\n    });\n  }\n\n  function polygon(arcs, i) {\n    arcs.forEach(function(arc) { line(arc, i); });\n  }\n\n  function geometry(o, i) {\n    if (o.type === \"GeometryCollection\") o.geometries.forEach(function(o) { geometry(o, i); });\n    else if (o.type in geometryType) geometryType[o.type](o.arcs, i);\n  }\n\n  var geometryType = {\n    LineString: line,\n    MultiLineString: polygon,\n    Polygon: polygon,\n    MultiPolygon: function(arcs, i) { arcs.forEach(function(arc) { polygon(arc, i); }); }\n  };\n\n  objects.forEach(geometry);\n\n  for (var i in indexesByArc) {\n    for (var indexes = indexesByArc[i], m = indexes.length, j = 0; j < m; ++j) {\n      for (var k = j + 1; k < m; ++k) {\n        var ij = indexes[j], ik = indexes[k], n;\n        if ((n = neighbors[ij])[i = bisect(n, ik)] !== ik) n.splice(i, 0, ik);\n        if ((n = neighbors[ik])[i = bisect(n, ij)] !== ij) n.splice(i, 0, ij);\n      }\n    }\n  }\n\n  return neighbors;\n};\n\nvar quantize = function(topology, n) {\n  if (!((n = Math.floor(n)) >= 2)) throw new Error(\"n must be ≥2\");\n  if (topology.transform) throw new Error(\"already quantized\");\n  var bb = bbox(topology), name,\n      dx = bb[0], kx = (bb[2] - dx) / (n - 1) || 1,\n      dy = bb[1], ky = (bb[3] - dy) / (n - 1) || 1;\n\n  function quantizePoint(p) {\n    p[0] = Math.round((p[0] - dx) / kx);\n    p[1] = Math.round((p[1] - dy) / ky);\n  }\n\n  function quantizeGeometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(quantizeGeometry); break;\n      case \"Point\": quantizePoint(o.coordinates); break;\n      case \"MultiPoint\": o.coordinates.forEach(quantizePoint); break;\n    }\n  }\n\n  topology.arcs.forEach(function(arc) {\n    var i = 1,\n        j = 1,\n        n = arc.length,\n        pi = arc[0],\n        x0 = pi[0] = Math.round((pi[0] - dx) / kx),\n        y0 = pi[1] = Math.round((pi[1] - dy) / ky),\n        pj,\n        x1,\n        y1;\n\n    for (; i < n; ++i) {\n      pi = arc[i];\n      x1 = Math.round((pi[0] - dx) / kx);\n      y1 = Math.round((pi[1] - dy) / ky);\n      if (x1 !== x0 || y1 !== y0) {\n        pj = arc[j++];\n        pj[0] = x1 - x0, x0 = x1;\n        pj[1] = y1 - y0, y0 = y1;\n      }\n    }\n\n    if (j < 2) {\n      pj = arc[j++];\n      pj[0] = 0;\n      pj[1] = 0;\n    }\n\n    arc.length = j;\n  });\n\n  for (name in topology.objects) {\n    quantizeGeometry(topology.objects[name]);\n  }\n\n  topology.transform = {\n    scale: [kx, ky],\n    translate: [dx, dy]\n  };\n\n  return topology;\n};\n\nvar untransform = function(topology) {\n  if ((transform = topology.transform) == null) return identity;\n  var transform,\n      x0,\n      y0,\n      kx = transform.scale[0],\n      ky = transform.scale[1],\n      dx = transform.translate[0],\n      dy = transform.translate[1];\n  return function(point, i) {\n    if (!i) x0 = y0 = 0;\n    var x1 = Math.round((point[0] - dx) / kx),\n        y1 = Math.round((point[1] - dy) / ky);\n    point[0] = x1 - x0, x0 = x1;\n    point[1] = y1 - y0, y0 = y1;\n    return point;\n  };\n};\n\nexports.bbox = bbox;\nexports.feature = feature;\nexports.mesh = mesh;\nexports.meshArcs = meshArcs;\nexports.merge = merge;\nexports.mergeArcs = mergeArcs;\nexports.neighbors = neighbors;\nexports.quantize = quantize;\nexports.transform = transform;\nexports.untransform = untransform;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],528:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = triangulateCube\n\nvar perm = _dereq_(\"permutation-rank\")\nvar sgn = _dereq_(\"permutation-parity\")\nvar gamma = _dereq_(\"gamma\")\n\nfunction triangulateCube(dimension) {\n  if(dimension < 0) {\n    return [ ]\n  }\n  if(dimension === 0) {\n    return [ [0] ]\n  }\n  var dfactorial = Math.round(gamma(dimension+1))|0\n  var result = []\n  for(var i=0; i<dfactorial; ++i) {\n    var p = perm.unrank(dimension, i)\n    var cell = [ 0 ]\n    var v = 0\n    for(var j=0; j<p.length; ++j) {\n      v += (1<<p[j])\n      cell.push(v)\n    }\n    if(sgn(p) < 1) {\n      cell[0] = v\n      cell[dimension] = 0\n    }\n    result.push(cell)\n  }\n  return result\n}\n},{\"gamma\":230,\"permutation-parity\":458,\"permutation-rank\":459}],529:[function(_dereq_,module,exports){\n'use strict'\n\nmodule.exports = createTurntableController\n\nvar filterVector = _dereq_('filtered-vector')\nvar invert44     = _dereq_('gl-mat4/invert')\nvar rotateM      = _dereq_('gl-mat4/rotate')\nvar cross        = _dereq_('gl-vec3/cross')\nvar normalize3   = _dereq_('gl-vec3/normalize')\nvar dot3         = _dereq_('gl-vec3/dot')\n\nfunction len3(x, y, z) {\n  return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2))\n}\n\nfunction clamp1(x) {\n  return Math.min(1.0, Math.max(-1.0, x))\n}\n\nfunction findOrthoPair(v) {\n  var vx = Math.abs(v[0])\n  var vy = Math.abs(v[1])\n  var vz = Math.abs(v[2])\n\n  var u = [0,0,0]\n  if(vx > Math.max(vy, vz)) {\n    u[2] = 1\n  } else if(vy > Math.max(vx, vz)) {\n    u[0] = 1\n  } else {\n    u[1] = 1\n  }\n\n  var vv = 0\n  var uv = 0\n  for(var i=0; i<3; ++i ) {\n    vv += v[i] * v[i]\n    uv += u[i] * v[i]\n  }\n  for(var i=0; i<3; ++i) {\n    u[i] -= (uv / vv) *  v[i]\n  }\n  normalize3(u, u)\n  return u\n}\n\nfunction TurntableController(zoomMin, zoomMax, center, up, right, radius, theta, phi) {\n  this.center = filterVector(center)\n  this.up     = filterVector(up)\n  this.right  = filterVector(right)\n  this.radius = filterVector([radius])\n  this.angle  = filterVector([theta, phi])\n  this.angle.bounds = [[-Infinity,-Math.PI/2], [Infinity,Math.PI/2]]\n  this.setDistanceLimits(zoomMin, zoomMax)\n\n  this.computedCenter = this.center.curve(0)\n  this.computedUp     = this.up.curve(0)\n  this.computedRight  = this.right.curve(0)\n  this.computedRadius = this.radius.curve(0)\n  this.computedAngle  = this.angle.curve(0)\n  this.computedToward = [0,0,0]\n  this.computedEye    = [0,0,0]\n  this.computedMatrix = new Array(16)\n  for(var i=0; i<16; ++i) {\n    this.computedMatrix[i] = 0.5\n  }\n\n  this.recalcMatrix(0)\n}\n\nvar proto = TurntableController.prototype\n\nproto.setDistanceLimits = function(minDist, maxDist) {\n  if(minDist > 0) {\n    minDist = Math.log(minDist)\n  } else {\n    minDist = -Infinity\n  }\n  if(maxDist > 0) {\n    maxDist = Math.log(maxDist)\n  } else {\n    maxDist = Infinity\n  }\n  maxDist = Math.max(maxDist, minDist)\n  this.radius.bounds[0][0] = minDist\n  this.radius.bounds[1][0] = maxDist\n}\n\nproto.getDistanceLimits = function(out) {\n  var bounds = this.radius.bounds[0]\n  if(out) {\n    out[0] = Math.exp(bounds[0][0])\n    out[1] = Math.exp(bounds[1][0])\n    return out\n  }\n  return [ Math.exp(bounds[0][0]), Math.exp(bounds[1][0]) ]\n}\n\nproto.recalcMatrix = function(t) {\n  //Recompute curves\n  this.center.curve(t)\n  this.up.curve(t)\n  this.right.curve(t)\n  this.radius.curve(t)\n  this.angle.curve(t)\n\n  //Compute frame for camera matrix\n  var up     = this.computedUp\n  var right  = this.computedRight\n  var uu = 0.0\n  var ur = 0.0\n  for(var i=0; i<3; ++i) {\n    ur += up[i] * right[i]\n    uu += up[i] * up[i]\n  }\n  var ul = Math.sqrt(uu)\n  var rr = 0.0\n  for(var i=0; i<3; ++i) {\n    right[i] -= up[i] * ur / uu\n    rr       += right[i] * right[i]\n    up[i]    /= ul\n  }\n  var rl = Math.sqrt(rr)\n  for(var i=0; i<3; ++i) {\n    right[i] /= rl\n  }\n\n  //Compute toward vector\n  var toward = this.computedToward\n  cross(toward, up, right)\n  normalize3(toward, toward)\n\n  //Compute angular parameters\n  var radius = Math.exp(this.computedRadius[0])\n  var theta  = this.computedAngle[0]\n  var phi    = this.computedAngle[1]\n\n  var ctheta = Math.cos(theta)\n  var stheta = Math.sin(theta)\n  var cphi   = Math.cos(phi)\n  var sphi   = Math.sin(phi)\n\n  var center = this.computedCenter\n\n  var wx = ctheta * cphi \n  var wy = stheta * cphi\n  var wz = sphi\n\n  var sx = -ctheta * sphi\n  var sy = -stheta * sphi\n  var sz = cphi\n\n  var eye = this.computedEye\n  var mat = this.computedMatrix\n  for(var i=0; i<3; ++i) {\n    var x      = wx * right[i] + wy * toward[i] + wz * up[i]\n    mat[4*i+1] = sx * right[i] + sy * toward[i] + sz * up[i]\n    mat[4*i+2] = x\n    mat[4*i+3] = 0.0\n  }\n\n  var ax = mat[1]\n  var ay = mat[5]\n  var az = mat[9]\n  var bx = mat[2]\n  var by = mat[6]\n  var bz = mat[10]\n  var cx = ay * bz - az * by\n  var cy = az * bx - ax * bz\n  var cz = ax * by - ay * bx\n  var cl = len3(cx, cy, cz)\n  cx /= cl\n  cy /= cl\n  cz /= cl\n  mat[0] = cx\n  mat[4] = cy\n  mat[8] = cz\n\n  for(var i=0; i<3; ++i) {\n    eye[i] = center[i] + mat[2+4*i]*radius\n  }\n\n  for(var i=0; i<3; ++i) {\n    var rr = 0.0\n    for(var j=0; j<3; ++j) {\n      rr += mat[i+4*j] * eye[j]\n    }\n    mat[12+i] = -rr\n  }\n  mat[15] = 1.0\n}\n\nproto.getMatrix = function(t, result) {\n  this.recalcMatrix(t)\n  var mat = this.computedMatrix\n  if(result) {\n    for(var i=0; i<16; ++i) {\n      result[i] = mat[i]\n    }\n    return result\n  }\n  return mat\n}\n\nvar zAxis = [0,0,0]\nproto.rotate = function(t, dtheta, dphi, droll) {\n  this.angle.move(t, dtheta, dphi)\n  if(droll) {\n    this.recalcMatrix(t)\n\n    var mat = this.computedMatrix\n    zAxis[0] = mat[2]\n    zAxis[1] = mat[6]\n    zAxis[2] = mat[10]\n\n    var up     = this.computedUp\n    var right  = this.computedRight\n    var toward = this.computedToward\n\n    for(var i=0; i<3; ++i) {\n      mat[4*i]   = up[i]\n      mat[4*i+1] = right[i]\n      mat[4*i+2] = toward[i]\n    }\n    rotateM(mat, mat, droll, zAxis)\n    for(var i=0; i<3; ++i) {\n      up[i] =    mat[4*i]\n      right[i] = mat[4*i+1]\n    }\n\n    this.up.set(t, up[0], up[1], up[2])\n    this.right.set(t, right[0], right[1], right[2])\n  }\n}\n\nproto.pan = function(t, dx, dy, dz) {\n  dx = dx || 0.0\n  dy = dy || 0.0\n  dz = dz || 0.0\n\n  this.recalcMatrix(t)\n  var mat = this.computedMatrix\n\n  var dist = Math.exp(this.computedRadius[0])\n\n  var ux = mat[1]\n  var uy = mat[5]\n  var uz = mat[9]\n  var ul = len3(ux, uy, uz)\n  ux /= ul\n  uy /= ul\n  uz /= ul\n\n  var rx = mat[0]\n  var ry = mat[4]\n  var rz = mat[8]\n  var ru = rx * ux + ry * uy + rz * uz\n  rx -= ux * ru\n  ry -= uy * ru\n  rz -= uz * ru\n  var rl = len3(rx, ry, rz)\n  rx /= rl\n  ry /= rl\n  rz /= rl\n\n  var vx = rx * dx + ux * dy\n  var vy = ry * dx + uy * dy\n  var vz = rz * dx + uz * dy\n  this.center.move(t, vx, vy, vz)\n\n  //Update z-component of radius\n  var radius = Math.exp(this.computedRadius[0])\n  radius = Math.max(1e-4, radius + dz)\n  this.radius.set(t, Math.log(radius))\n}\n\nproto.translate = function(t, dx, dy, dz) {\n  this.center.move(t,\n    dx||0.0,\n    dy||0.0,\n    dz||0.0)\n}\n\n//Recenters the coordinate axes\nproto.setMatrix = function(t, mat, axes, noSnap) {\n  \n  //Get the axes for tare\n  var ushift = 1\n  if(typeof axes === 'number') {\n    ushift = (axes)|0\n  } \n  if(ushift < 0 || ushift > 3) {\n    ushift = 1\n  }\n  var vshift = (ushift + 2) % 3\n  var fshift = (ushift + 1) % 3\n\n  //Recompute state for new t value\n  if(!mat) { \n    this.recalcMatrix(t)\n    mat = this.computedMatrix\n  }\n\n  //Get right and up vectors\n  var ux = mat[ushift]\n  var uy = mat[ushift+4]\n  var uz = mat[ushift+8]\n  if(!noSnap) {\n    var ul = len3(ux, uy, uz)\n    ux /= ul\n    uy /= ul\n    uz /= ul\n  } else {\n    var ax = Math.abs(ux)\n    var ay = Math.abs(uy)\n    var az = Math.abs(uz)\n    var am = Math.max(ax,ay,az)\n    if(ax === am) {\n      ux = (ux < 0) ? -1 : 1\n      uy = uz = 0\n    } else if(az === am) {\n      uz = (uz < 0) ? -1 : 1\n      ux = uy = 0\n    } else {\n      uy = (uy < 0) ? -1 : 1\n      ux = uz = 0\n    }\n  }\n\n  var rx = mat[vshift]\n  var ry = mat[vshift+4]\n  var rz = mat[vshift+8]\n  var ru = rx * ux + ry * uy + rz * uz\n  rx -= ux * ru\n  ry -= uy * ru\n  rz -= uz * ru\n  var rl = len3(rx, ry, rz)\n  rx /= rl\n  ry /= rl\n  rz /= rl\n  \n  var fx = uy * rz - uz * ry\n  var fy = uz * rx - ux * rz\n  var fz = ux * ry - uy * rx\n  var fl = len3(fx, fy, fz)\n  fx /= fl\n  fy /= fl\n  fz /= fl\n\n  this.center.jump(t, ex, ey, ez)\n  this.radius.idle(t)\n  this.up.jump(t, ux, uy, uz)\n  this.right.jump(t, rx, ry, rz)\n\n  var phi, theta\n  if(ushift === 2) {\n    var cx = mat[1]\n    var cy = mat[5]\n    var cz = mat[9]\n    var cr = cx * rx + cy * ry + cz * rz\n    var cf = cx * fx + cy * fy + cz * fz\n    if(tu < 0) {\n      phi = -Math.PI/2\n    } else {\n      phi = Math.PI/2\n    }\n    theta = Math.atan2(cf, cr)\n  } else {\n    var tx = mat[2]\n    var ty = mat[6]\n    var tz = mat[10]\n    var tu = tx * ux + ty * uy + tz * uz\n    var tr = tx * rx + ty * ry + tz * rz\n    var tf = tx * fx + ty * fy + tz * fz\n\n    phi = Math.asin(clamp1(tu))\n    theta = Math.atan2(tf, tr)\n  }\n\n  this.angle.jump(t, theta, phi)\n\n  this.recalcMatrix(t)\n  var dx = mat[2]\n  var dy = mat[6]\n  var dz = mat[10]\n\n  var imat = this.computedMatrix\n  invert44(imat, mat)\n  var w  = imat[15]\n  var ex = imat[12] / w\n  var ey = imat[13] / w\n  var ez = imat[14] / w\n\n  var gs = Math.exp(this.computedRadius[0])\n  this.center.jump(t, ex-dx*gs, ey-dy*gs, ez-dz*gs)\n}\n\nproto.lastT = function() {\n  return Math.max(\n    this.center.lastT(),\n    this.up.lastT(),\n    this.right.lastT(),\n    this.radius.lastT(),\n    this.angle.lastT())\n}\n\nproto.idle = function(t) {\n  this.center.idle(t)\n  this.up.idle(t)\n  this.right.idle(t)\n  this.radius.idle(t)\n  this.angle.idle(t)\n}\n\nproto.flush = function(t) {\n  this.center.flush(t)\n  this.up.flush(t)\n  this.right.flush(t)\n  this.radius.flush(t)\n  this.angle.flush(t)\n}\n\nproto.setDistance = function(t, d) {\n  if(d > 0) {\n    this.radius.set(t, Math.log(d))\n  }\n}\n\nproto.lookAt = function(t, eye, center, up) {\n  this.recalcMatrix(t)\n\n  eye    = eye    || this.computedEye\n  center = center || this.computedCenter\n  up     = up     || this.computedUp\n\n  var ux = up[0]\n  var uy = up[1]\n  var uz = up[2]\n  var ul = len3(ux, uy, uz)\n  if(ul < 1e-6) {\n    return\n  }\n  ux /= ul\n  uy /= ul\n  uz /= ul\n\n  var tx = eye[0] - center[0]\n  var ty = eye[1] - center[1]\n  var tz = eye[2] - center[2]\n  var tl = len3(tx, ty, tz)\n  if(tl < 1e-6) {\n    return\n  }\n  tx /= tl\n  ty /= tl\n  tz /= tl\n\n  var right = this.computedRight\n  var rx = right[0]\n  var ry = right[1]\n  var rz = right[2]\n  var ru = ux*rx + uy*ry + uz*rz\n  rx -= ru * ux\n  ry -= ru * uy\n  rz -= ru * uz\n  var rl = len3(rx, ry, rz)\n\n  if(rl < 0.01) {\n    rx = uy * tz - uz * ty\n    ry = uz * tx - ux * tz\n    rz = ux * ty - uy * tx\n    rl = len3(rx, ry, rz)\n    if(rl < 1e-6) {\n      return\n    }\n  }\n  rx /= rl\n  ry /= rl\n  rz /= rl\n\n  this.up.set(t, ux, uy, uz)\n  this.right.set(t, rx, ry, rz)\n  this.center.set(t, center[0], center[1], center[2])\n  this.radius.set(t, Math.log(tl))\n\n  var fx = uy * rz - uz * ry\n  var fy = uz * rx - ux * rz\n  var fz = ux * ry - uy * rx\n  var fl = len3(fx, fy, fz)\n  fx /= fl\n  fy /= fl\n  fz /= fl\n\n  var tu = ux*tx + uy*ty + uz*tz\n  var tr = rx*tx + ry*ty + rz*tz\n  var tf = fx*tx + fy*ty + fz*tz\n\n  var phi   = Math.asin(clamp1(tu))\n  var theta = Math.atan2(tf, tr)\n\n  var angleState = this.angle._state\n  var lastTheta  = angleState[angleState.length-1]\n  var lastPhi    = angleState[angleState.length-2]\n  lastTheta      = lastTheta % (2.0 * Math.PI)\n  var dp = Math.abs(lastTheta + 2.0 * Math.PI - theta)\n  var d0 = Math.abs(lastTheta - theta)\n  var dn = Math.abs(lastTheta - 2.0 * Math.PI - theta)\n  if(dp < d0) {\n    lastTheta += 2.0 * Math.PI\n  }\n  if(dn < d0) {\n    lastTheta -= 2.0 * Math.PI\n  }\n\n  this.angle.jump(this.angle.lastT(), lastTheta, lastPhi)\n  this.angle.set(t, theta, phi)\n}\n\nfunction createTurntableController(options) {\n  options = options || {}\n\n  var center = options.center || [0,0,0]\n  var up     = options.up     || [0,1,0]\n  var right  = options.right  || findOrthoPair(up)\n  var radius = options.radius || 1.0\n  var theta  = options.theta  || 0.0\n  var phi    = options.phi    || 0.0\n\n  center = [].slice.call(center, 0, 3)\n\n  up = [].slice.call(up, 0, 3)\n  normalize3(up, up)\n\n  right = [].slice.call(right, 0, 3)\n  normalize3(right, right)\n\n  if('eye' in options) {\n    var eye = options.eye\n    var toward = [\n      eye[0]-center[0],\n      eye[1]-center[1],\n      eye[2]-center[2]\n    ]\n    cross(right, toward, up)\n    if(len3(right[0], right[1], right[2]) < 1e-6) {\n      right = findOrthoPair(up)\n    } else {\n      normalize3(right, right)\n    }\n\n    radius = len3(toward[0], toward[1], toward[2])\n\n    var ut = dot3(up, toward) / radius\n    var rt = dot3(right, toward) / radius\n    phi    = Math.acos(ut)\n    theta  = Math.acos(rt)\n  }\n\n  //Use logarithmic coordinates for radius\n  radius = Math.log(radius)\n\n  //Return the controller\n  return new TurntableController(\n    options.zoomMin,\n    options.zoomMax,\n    center,\n    up,\n    right,\n    radius,\n    theta,\n    phi)\n}\n},{\"filtered-vector\":225,\"gl-mat4/invert\":264,\"gl-mat4/rotate\":269,\"gl-vec3/cross\":329,\"gl-vec3/dot\":334,\"gl-vec3/normalize\":351}],530:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = twoProduct\n\nvar SPLITTER = +(Math.pow(2, 27) + 1.0)\n\nfunction twoProduct(a, b, result) {\n  var x = a * b\n\n  var c = SPLITTER * a\n  var abig = c - a\n  var ahi = c - abig\n  var alo = a - ahi\n\n  var d = SPLITTER * b\n  var bbig = d - b\n  var bhi = d - bbig\n  var blo = b - bhi\n\n  var err1 = x - (ahi * bhi)\n  var err2 = err1 - (alo * bhi)\n  var err3 = err2 - (ahi * blo)\n\n  var y = alo * blo - err3\n\n  if(result) {\n    result[0] = y\n    result[1] = x\n    return result\n  }\n\n  return [ y, x ]\n}\n},{}],531:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = fastTwoSum\n\nfunction fastTwoSum(a, b, result) {\n\tvar x = a + b\n\tvar bv = x - a\n\tvar av = x - bv\n\tvar br = b - bv\n\tvar ar = a - av\n\tif(result) {\n\t\tresult[0] = ar + br\n\t\tresult[1] = x\n\t\treturn result\n\t}\n\treturn [ar+br, x]\n}\n},{}],532:[function(_dereq_,module,exports){\n(function (global,Buffer){\n'use strict'\n\nvar bits = _dereq_('bit-twiddle')\nvar dup = _dereq_('dup')\n\n//Legacy pool support\nif(!global.__TYPEDARRAY_POOL) {\n  global.__TYPEDARRAY_POOL = {\n      UINT8   : dup([32, 0])\n    , UINT16  : dup([32, 0])\n    , UINT32  : dup([32, 0])\n    , INT8    : dup([32, 0])\n    , INT16   : dup([32, 0])\n    , INT32   : dup([32, 0])\n    , FLOAT   : dup([32, 0])\n    , DOUBLE  : dup([32, 0])\n    , DATA    : dup([32, 0])\n    , UINT8C  : dup([32, 0])\n    , BUFFER  : dup([32, 0])\n  }\n}\n\nvar hasUint8C = (typeof Uint8ClampedArray) !== 'undefined'\nvar POOL = global.__TYPEDARRAY_POOL\n\n//Upgrade pool\nif(!POOL.UINT8C) {\n  POOL.UINT8C = dup([32, 0])\n}\nif(!POOL.BUFFER) {\n  POOL.BUFFER = dup([32, 0])\n}\n\n//New technique: Only allocate from ArrayBufferView and Buffer\nvar DATA    = POOL.DATA\n  , BUFFER  = POOL.BUFFER\n\nexports.free = function free(array) {\n  if(Buffer.isBuffer(array)) {\n    BUFFER[bits.log2(array.length)].push(array)\n  } else {\n    if(Object.prototype.toString.call(array) !== '[object ArrayBuffer]') {\n      array = array.buffer\n    }\n    if(!array) {\n      return\n    }\n    var n = array.length || array.byteLength\n    var log_n = bits.log2(n)|0\n    DATA[log_n].push(array)\n  }\n}\n\nfunction freeArrayBuffer(buffer) {\n  if(!buffer) {\n    return\n  }\n  var n = buffer.length || buffer.byteLength\n  var log_n = bits.log2(n)\n  DATA[log_n].push(buffer)\n}\n\nfunction freeTypedArray(array) {\n  freeArrayBuffer(array.buffer)\n}\n\nexports.freeUint8 =\nexports.freeUint16 =\nexports.freeUint32 =\nexports.freeInt8 =\nexports.freeInt16 =\nexports.freeInt32 =\nexports.freeFloat32 = \nexports.freeFloat =\nexports.freeFloat64 = \nexports.freeDouble = \nexports.freeUint8Clamped = \nexports.freeDataView = freeTypedArray\n\nexports.freeArrayBuffer = freeArrayBuffer\n\nexports.freeBuffer = function freeBuffer(array) {\n  BUFFER[bits.log2(array.length)].push(array)\n}\n\nexports.malloc = function malloc(n, dtype) {\n  if(dtype === undefined || dtype === 'arraybuffer') {\n    return mallocArrayBuffer(n)\n  } else {\n    switch(dtype) {\n      case 'uint8':\n        return mallocUint8(n)\n      case 'uint16':\n        return mallocUint16(n)\n      case 'uint32':\n        return mallocUint32(n)\n      case 'int8':\n        return mallocInt8(n)\n      case 'int16':\n        return mallocInt16(n)\n      case 'int32':\n        return mallocInt32(n)\n      case 'float':\n      case 'float32':\n        return mallocFloat(n)\n      case 'double':\n      case 'float64':\n        return mallocDouble(n)\n      case 'uint8_clamped':\n        return mallocUint8Clamped(n)\n      case 'buffer':\n        return mallocBuffer(n)\n      case 'data':\n      case 'dataview':\n        return mallocDataView(n)\n\n      default:\n        return null\n    }\n  }\n  return null\n}\n\nfunction mallocArrayBuffer(n) {\n  var n = bits.nextPow2(n)\n  var log_n = bits.log2(n)\n  var d = DATA[log_n]\n  if(d.length > 0) {\n    return d.pop()\n  }\n  return new ArrayBuffer(n)\n}\nexports.mallocArrayBuffer = mallocArrayBuffer\n\nfunction mallocUint8(n) {\n  return new Uint8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocUint8 = mallocUint8\n\nfunction mallocUint16(n) {\n  return new Uint16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocUint16 = mallocUint16\n\nfunction mallocUint32(n) {\n  return new Uint32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocUint32 = mallocUint32\n\nfunction mallocInt8(n) {\n  return new Int8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocInt8 = mallocInt8\n\nfunction mallocInt16(n) {\n  return new Int16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocInt16 = mallocInt16\n\nfunction mallocInt32(n) {\n  return new Int32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocInt32 = mallocInt32\n\nfunction mallocFloat(n) {\n  return new Float32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocFloat32 = exports.mallocFloat = mallocFloat\n\nfunction mallocDouble(n) {\n  return new Float64Array(mallocArrayBuffer(8*n), 0, n)\n}\nexports.mallocFloat64 = exports.mallocDouble = mallocDouble\n\nfunction mallocUint8Clamped(n) {\n  if(hasUint8C) {\n    return new Uint8ClampedArray(mallocArrayBuffer(n), 0, n)\n  } else {\n    return mallocUint8(n)\n  }\n}\nexports.mallocUint8Clamped = mallocUint8Clamped\n\nfunction mallocDataView(n) {\n  return new DataView(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocDataView = mallocDataView\n\nfunction mallocBuffer(n) {\n  n = bits.nextPow2(n)\n  var log_n = bits.log2(n)\n  var cache = BUFFER[log_n]\n  if(cache.length > 0) {\n    return cache.pop()\n  }\n  return new Buffer(n)\n}\nexports.mallocBuffer = mallocBuffer\n\nexports.clearCache = function clearCache() {\n  for(var i=0; i<32; ++i) {\n    POOL.UINT8[i].length = 0\n    POOL.UINT16[i].length = 0\n    POOL.UINT32[i].length = 0\n    POOL.INT8[i].length = 0\n    POOL.INT16[i].length = 0\n    POOL.INT32[i].length = 0\n    POOL.FLOAT[i].length = 0\n    POOL.DOUBLE[i].length = 0\n    POOL.UINT8C[i].length = 0\n    DATA[i].length = 0\n    BUFFER[i].length = 0\n  }\n}\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {},_dereq_(\"buffer\").Buffer)\n},{\"bit-twiddle\":85,\"buffer\":98,\"dup\":164}],533:[function(_dereq_,module,exports){\n\"use strict\"; \"use restrict\";\n\nmodule.exports = UnionFind;\n\nfunction UnionFind(count) {\n  this.roots = new Array(count);\n  this.ranks = new Array(count);\n  \n  for(var i=0; i<count; ++i) {\n    this.roots[i] = i;\n    this.ranks[i] = 0;\n  }\n}\n\nvar proto = UnionFind.prototype\n\nObject.defineProperty(proto, \"length\", {\n  \"get\": function() {\n    return this.roots.length\n  }\n})\n\nproto.makeSet = function() {\n  var n = this.roots.length;\n  this.roots.push(n);\n  this.ranks.push(0);\n  return n;\n}\n\nproto.find = function(x) {\n  var x0 = x\n  var roots = this.roots;\n  while(roots[x] !== x) {\n    x = roots[x]\n  }\n  while(roots[x0] !== x) {\n    var y = roots[x0]\n    roots[x0] = x\n    x0 = y\n  }\n  return x;\n}\n\nproto.link = function(x, y) {\n  var xr = this.find(x)\n    , yr = this.find(y);\n  if(xr === yr) {\n    return;\n  }\n  var ranks = this.ranks\n    , roots = this.roots\n    , xd    = ranks[xr]\n    , yd    = ranks[yr];\n  if(xd < yd) {\n    roots[xr] = yr;\n  } else if(yd < xd) {\n    roots[yr] = xr;\n  } else {\n    roots[yr] = xr;\n    ++ranks[xr];\n  }\n}\n},{}],534:[function(_dereq_,module,exports){\n\"use strict\"\n\nfunction unique_pred(list, compare) {\n  var ptr = 1\n    , len = list.length\n    , a=list[0], b=list[0]\n  for(var i=1; i<len; ++i) {\n    b = a\n    a = list[i]\n    if(compare(a, b)) {\n      if(i === ptr) {\n        ptr++\n        continue\n      }\n      list[ptr++] = a\n    }\n  }\n  list.length = ptr\n  return list\n}\n\nfunction unique_eq(list) {\n  var ptr = 1\n    , len = list.length\n    , a=list[0], b = list[0]\n  for(var i=1; i<len; ++i, b=a) {\n    b = a\n    a = list[i]\n    if(a !== b) {\n      if(i === ptr) {\n        ptr++\n        continue\n      }\n      list[ptr++] = a\n    }\n  }\n  list.length = ptr\n  return list\n}\n\nfunction unique(list, compare, sorted) {\n  if(list.length === 0) {\n    return list\n  }\n  if(compare) {\n    if(!sorted) {\n      list.sort(compare)\n    }\n    return unique_pred(list, compare)\n  }\n  if(!sorted) {\n    list.sort()\n  }\n  return unique_eq(list)\n}\n\nmodule.exports = unique\n\n},{}],535:[function(_dereq_,module,exports){\nvar reg = /[\\'\\\"]/\n\nmodule.exports = function unquote(str) {\n  if (!str) {\n    return ''\n  }\n  if (reg.test(str.charAt(0))) {\n    str = str.substr(1)\n  }\n  if (reg.test(str.charAt(str.length - 1))) {\n    str = str.substr(0, str.length - 1)\n  }\n  return str\n}\n\n},{}],536:[function(_dereq_,module,exports){\n/**\r\n * @module update-diff\r\n */\r\n\r\n'use strict'\r\n\r\nmodule.exports = function updateDiff (obj, diff, mappers) {\r\n\tif (!Array.isArray(mappers)) mappers = [].slice.call(arguments, 2)\r\n\r\n\tfor (var i = 0, l = mappers.length; i < l; i++) {\r\n\t\tvar dict = mappers[i]\r\n\t\tfor (var prop in dict) {\r\n\t\t\tif (diff[prop] !== undefined && !Array.isArray(diff[prop]) && obj[prop] === diff[prop]) continue\r\n\r\n\t\t\tif (prop in diff) {\r\n\t\t\t\tvar result\r\n\r\n\t\t\t\tif (dict[prop] === true) result = diff[prop]\r\n\t\t\t\telse if (dict[prop] === false) continue\r\n\t\t\t\telse if (typeof dict[prop] === 'function') {\r\n\t\t\t\t\tresult = dict[prop](diff[prop], obj, diff)\r\n\t\t\t\t\tif (result === undefined) continue\r\n\t\t\t\t}\r\n\r\n\t\t\t\tobj[prop] = result\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn obj\r\n}\r\n\n},{}],537:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = createText\n\nvar vectorizeText = _dereq_(\"./lib/vtext\")\nvar defaultCanvas = null\nvar defaultContext = null\n\nif(typeof document !== 'undefined') {\n  defaultCanvas = document.createElement('canvas')\n  defaultCanvas.width = 8192\n  defaultCanvas.height = 1024\n  defaultContext = defaultCanvas.getContext(\"2d\")\n}\n\nfunction createText(str, options) {\n  if((typeof options !== \"object\") || (options === null)) {\n    options = {}\n  }\n  return vectorizeText(\n    str,\n    options.canvas || defaultCanvas,\n    options.context || defaultContext,\n    options)\n}\n\n},{\"./lib/vtext\":538}],538:[function(_dereq_,module,exports){\nmodule.exports = vectorizeText\nmodule.exports.processPixels = processPixels\n\nvar surfaceNets = _dereq_('surface-nets')\nvar ndarray = _dereq_('ndarray')\nvar simplify = _dereq_('simplify-planar-graph')\nvar cleanPSLG = _dereq_('clean-pslg')\nvar cdt2d = _dereq_('cdt2d')\nvar toPolygonCrappy = _dereq_('planar-graph-to-polyline')\n\nvar TAG_bold = \"b\"\nvar CHR_bold = 'b|'\n\nvar TAG_italic = \"i\"\nvar CHR_italic = 'i|'\n\nvar TAG_super = \"sup\"\nvar CHR_super0 = '+'\nvar CHR_super = '+1'\n\nvar TAG_sub = \"sub\"\nvar CHR_sub0 = '-'\nvar CHR_sub = '-1'\n\nfunction parseTag(tag, TAG_CHR, str, map) {\n\n  var opnTag =  \"<\"  + tag + \">\"\n  var clsTag =  \"</\" + tag + \">\"\n\n  var nOPN = opnTag.length\n  var nCLS = clsTag.length\n\n  var isRecursive = (TAG_CHR[0] === CHR_super0) ||\n                    (TAG_CHR[0] === CHR_sub0);\n\n  var a = 0\n  var b = -nCLS\n  while (a > -1) {\n    a = str.indexOf(opnTag, a)\n    if(a === -1) break\n\n    b = str.indexOf(clsTag, a + nOPN)\n    if(b === -1) break\n\n    if(b <= a) break\n\n    for(var i = a; i < b + nCLS; ++i){\n      if((i < a + nOPN) || (i >= b)) {\n        map[i] = null\n        str = str.substr(0, i) + \" \" + str.substr(i + 1)\n      } else {\n        if(map[i] !== null) {\n          var pos = map[i].indexOf(TAG_CHR[0])\n          if(pos === -1) {\n            map[i] += TAG_CHR\n          } else { // i.e. to handle multiple sub/super-scripts\n            if(isRecursive) {\n              // i.e to increase the sub/sup number\n              map[i] = map[i].substr(0, pos + 1) + (1 + parseInt(map[i][pos + 1])) + map[i].substr(pos + 2)\n            }\n          }\n        }\n      }\n    }\n\n    var start = a + nOPN\n    var remainingStr = str.substr(start, b - start)\n\n    var c = remainingStr.indexOf(opnTag)\n    if(c !== -1) a = c\n    else a = b + nCLS\n  }\n\n  return map\n}\n\nfunction transformPositions(positions, options, size) {\n  var align = options.textAlign || \"start\"\n  var baseline = options.textBaseline || \"alphabetic\"\n\n  var lo = [1<<30, 1<<30]\n  var hi = [0,0]\n  var n = positions.length\n  for(var i=0; i<n; ++i) {\n    var p = positions[i]\n    for(var j=0; j<2; ++j) {\n      lo[j] = Math.min(lo[j], p[j])|0\n      hi[j] = Math.max(hi[j], p[j])|0\n    }\n  }\n\n  var xShift = 0\n  switch(align) {\n    case \"center\":\n      xShift = -0.5 * (lo[0] + hi[0])\n    break\n\n    case \"right\":\n    case \"end\":\n      xShift = -hi[0]\n    break\n\n    case \"left\":\n    case \"start\":\n      xShift = -lo[0]\n    break\n\n    default:\n      throw new Error(\"vectorize-text: Unrecognized textAlign: '\" + align + \"'\")\n  }\n\n  var yShift = 0\n  switch(baseline) {\n    case \"hanging\":\n    case \"top\":\n      yShift = -lo[1]\n    break\n\n    case \"middle\":\n      yShift = -0.5 * (lo[1] + hi[1])\n    break\n\n    case \"alphabetic\":\n    case \"ideographic\":\n      yShift = -3 * size\n    break\n\n    case \"bottom\":\n      yShift = -hi[1]\n    break\n\n    default:\n      throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\" + baseline + \"'\")\n  }\n\n  var scale = 1.0 / size\n  if(\"lineHeight\" in options) {\n    scale *= +options.lineHeight\n  } else if(\"width\" in options) {\n    scale = options.width / (hi[0] - lo[0])\n  } else if(\"height\" in options) {\n    scale = options.height / (hi[1] - lo[1])\n  }\n\n  return positions.map(function(p) {\n    return [ scale * (p[0] + xShift), scale * (p[1] + yShift) ]\n  })\n}\n\nfunction getPixels(canvas, context, rawString, fontSize, lineSpacing, styletags) {\n\n  rawString = rawString.replace(/\\n/g, '') // don't accept \\n in the input\n\n  if(styletags.breaklines === true) {\n    rawString = rawString.replace(/\\<br\\>/g, '\\n') // replace <br> tags with \\n in the string\n  } else {\n    rawString = rawString.replace(/\\<br\\>/g, ' ') // don't accept <br> tags in the input and replace with space in this case\n  }\n\n  var activeStyle = \"\"\n  var map = []\n  for(j = 0; j < rawString.length; ++j) {\n    map[j] = activeStyle\n  }\n\n  if(styletags.bolds === true) map = parseTag(TAG_bold, CHR_bold, rawString, map)\n  if(styletags.italics === true) map = parseTag(TAG_italic, CHR_italic, rawString, map)\n  if(styletags.superscripts === true) map = parseTag(TAG_super, CHR_super, rawString, map)\n  if(styletags.subscripts === true) map = parseTag(TAG_sub, CHR_sub, rawString, map)\n\n  var allStyles = []\n  var plainText = \"\"\n  for(j = 0; j < rawString.length; ++j) {\n    if(map[j] !== null) {\n      plainText += rawString[j]\n      allStyles.push(map[j])\n    }\n  }\n\n  var allTexts = plainText.split('\\n')\n\n  var numberOfLines = allTexts.length\n  var lineHeight = Math.round(lineSpacing * fontSize)\n  var offsetX = fontSize\n  var offsetY = fontSize * 2\n  var maxWidth = 0\n  var minHeight = numberOfLines * lineHeight + offsetY\n\n  if(canvas.height < minHeight) {\n    canvas.height = minHeight\n  }\n\n  context.fillStyle = \"#000\"\n  context.fillRect(0, 0, canvas.width, canvas.height)\n\n  context.fillStyle = \"#fff\"\n  var i, j, xPos, yPos, zPos\n  var nDone = 0\n\n  var buffer = \"\"\n  function writeBuffer() {\n    if(buffer !== \"\") {\n      var delta = context.measureText(buffer).width\n\n      context.fillText(buffer, offsetX + xPos, offsetY + yPos)\n      xPos += delta\n    }\n  }\n\n  function getTextFontSize() {\n    return \"\" + Math.round(zPos) + \"px \";\n  }\n\n  function changeStyle(oldStyle, newStyle) {\n    var ctxFont = \"\" + context.font;\n\n    if(styletags.subscripts === true) {\n      var oldIndex_Sub = oldStyle.indexOf(CHR_sub0);\n      var newIndex_Sub = newStyle.indexOf(CHR_sub0);\n\n      var oldSub = (oldIndex_Sub > -1) ? parseInt(oldStyle[1 + oldIndex_Sub]) : 0;\n      var newSub = (newIndex_Sub > -1) ? parseInt(newStyle[1 + newIndex_Sub]) : 0;\n\n      if(oldSub !== newSub) {\n        ctxFont = ctxFont.replace(getTextFontSize(), \"?px \")\n        zPos *= Math.pow(0.75, (newSub - oldSub))\n        ctxFont = ctxFont.replace(\"?px \", getTextFontSize())\n      }\n      yPos += 0.25 * lineHeight * (newSub - oldSub);\n    }\n\n    if(styletags.superscripts === true) {\n      var oldIndex_Super = oldStyle.indexOf(CHR_super0);\n      var newIndex_Super = newStyle.indexOf(CHR_super0);\n\n      var oldSuper = (oldIndex_Super > -1) ? parseInt(oldStyle[1 + oldIndex_Super]) : 0;\n      var newSuper = (newIndex_Super > -1) ? parseInt(newStyle[1 + newIndex_Super]) : 0;\n\n      if(oldSuper !== newSuper) {\n        ctxFont = ctxFont.replace(getTextFontSize(), \"?px \")\n        zPos *= Math.pow(0.75, (newSuper - oldSuper))\n        ctxFont = ctxFont.replace(\"?px \", getTextFontSize())\n      }\n      yPos -= 0.25 * lineHeight * (newSuper - oldSuper);\n    }\n\n    if(styletags.bolds === true) {\n      var wasBold = (oldStyle.indexOf(CHR_bold) > -1)\n      var is_Bold = (newStyle.indexOf(CHR_bold) > -1)\n\n      if(!wasBold && is_Bold) {\n        if(wasItalic) {\n          ctxFont = ctxFont.replace(\"italic \", \"italic bold \")\n        } else {\n          ctxFont = \"bold \" + ctxFont\n        }\n      }\n      if(wasBold && !is_Bold) {\n        ctxFont = ctxFont.replace(\"bold \", '')\n      }\n    }\n\n    if(styletags.italics === true) {\n      var wasItalic = (oldStyle.indexOf(CHR_italic) > -1)\n      var is_Italic = (newStyle.indexOf(CHR_italic) > -1)\n\n      if(!wasItalic && is_Italic) {\n        ctxFont = \"italic \" + ctxFont\n      }\n      if(wasItalic && !is_Italic) {\n        ctxFont = ctxFont.replace(\"italic \", '')\n      }\n    }\n    context.font = ctxFont\n  }\n\n  for(i = 0; i < numberOfLines; ++i) {\n    var txt = allTexts[i] + '\\n'\n    xPos = 0\n    yPos = i * lineHeight\n    zPos = fontSize\n\n    buffer = \"\"\n    \n    for(j = 0; j < txt.length; ++j) {\n      var style = (j + nDone < allStyles.length) ? allStyles[j + nDone] : allStyles[allStyles.length - 1]\n      if(activeStyle === style) {\n        buffer += txt[j]\n      } else {\n        writeBuffer()\n        buffer = txt[j]\n\n        if(style !== undefined) {\n          changeStyle(activeStyle, style)\n          activeStyle = style\n        }\n      }\n    }\n    writeBuffer()\n\n    nDone += txt.length\n\n    var width = Math.round(xPos + 2 * offsetX) | 0\n    if(maxWidth < width) maxWidth = width\n  }\n\n  //Cut pixels from image\n  var xCut = maxWidth\n  var yCut = offsetY + lineHeight * numberOfLines\n  var pixels = ndarray(context.getImageData(0, 0, xCut, yCut).data, [yCut, xCut, 4])\n  return pixels.pick(-1, -1, 0).transpose(1, 0)\n}\n\nfunction getContour(pixels, doSimplify) {\n  var contour = surfaceNets(pixels, 128)\n  if(doSimplify) {\n    return simplify(contour.cells, contour.positions, 0.25)\n  }\n  return {\n    edges: contour.cells,\n    positions: contour.positions\n  }\n}\n\nfunction processPixelsImpl(pixels, options, size, simplify) {\n  //Extract contour\n  var contour = getContour(pixels, simplify)\n\n  //Apply warp to positions\n  var positions = transformPositions(contour.positions, options, size)\n  var edges     = contour.edges\n  var flip = \"ccw\" === options.orientation\n\n  //Clean up the PSLG, resolve self intersections, etc.\n  cleanPSLG(positions, edges)\n\n  //If triangulate flag passed, triangulate the result\n  if(options.polygons || options.polygon || options.polyline) {\n    var result = toPolygonCrappy(edges, positions)\n    var nresult = new Array(result.length)\n    for(var i=0; i<result.length; ++i) {\n      var loops = result[i]\n      var nloops = new Array(loops.length)\n      for(var j=0; j<loops.length; ++j) {\n        var loop = loops[j]\n        var nloop = new Array(loop.length)\n        for(var k=0; k<loop.length; ++k) {\n          nloop[k] = positions[loop[k]].slice()\n        }\n        if(flip) {\n          nloop.reverse()\n        }\n        nloops[j] = nloop\n      }\n      nresult[i] = nloops\n    }\n    return nresult\n  } else if(options.triangles || options.triangulate || options.triangle) {\n    return {\n      cells: cdt2d(positions, edges, {\n        delaunay: false,\n        exterior: false,\n        interior: true\n      }),\n      positions: positions\n    }\n  } else {\n    return {\n      edges:     edges,\n      positions: positions\n    }\n  }\n}\n\nfunction processPixels(pixels, options, size) {\n  try {\n    return processPixelsImpl(pixels, options, size, true)\n  } catch(e) {}\n  try {\n    return processPixelsImpl(pixels, options, size, false)\n  } catch(e) {}\n  if(options.polygons || options.polyline || options.polygon) {\n    return []\n  }\n  if(options.triangles || options.triangulate || options.triangle) {\n    return {\n      cells: [],\n      positions: []\n    }\n  }\n  return {\n    edges: [],\n    positions: []\n  }\n}\n\nfunction vectorizeText(str, canvas, context, options) {\n  var size = 64\n  var lineSpacing = 1.25\n  var styletags = {\n    breaklines: false,\n    bolds: false,\n    italics: false,\n    subscripts: false,\n    superscripts: false\n  }\n\n  if(options) {\n\n    if(options.size &&\n       options.size > 0) size =\n       options.size\n\n    if(options.lineSpacing &&\n       options.lineSpacing > 0) lineSpacing =\n       options.lineSpacing\n\n    if(options.styletags &&\n       options.styletags.breaklines) styletags.breaklines =\n       options.styletags.breaklines ? true : false\n\n    if(options.styletags &&\n       options.styletags.bolds) styletags.bolds =\n       options.styletags.bolds ? true : false\n\n    if(options.styletags &&\n       options.styletags.italics) styletags.italics =\n       options.styletags.italics ? true : false\n\n    if(options.styletags &&\n       options.styletags.subscripts) styletags.subscripts =\n       options.styletags.subscripts ? true : false\n\n    if(options.styletags &&\n       options.styletags.superscripts) styletags.superscripts =\n       options.styletags.superscripts ? true : false\n  }\n\n  context.font = [\n    options.fontStyle,\n    options.fontVariant,\n    options.fontWeight,\n    size + \"px\",\n    options.font\n  ].filter(function(d) {return d}).join(\" \")\n  context.textAlign = \"start\"\n  context.textBaseline = \"alphabetic\"\n  context.direction = \"ltr\"\n\n  var pixels = getPixels(canvas, context, str, size, lineSpacing, styletags)\n\n  return processPixels(pixels, options, size)\n}\n\n},{\"cdt2d\":99,\"clean-pslg\":109,\"ndarray\":445,\"planar-graph-to-polyline\":463,\"simplify-planar-graph\":511,\"surface-nets\":518}],539:[function(_dereq_,module,exports){\n// Copyright (C) 2011 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Install a leaky WeakMap emulation on platforms that\n * don't provide a built-in one.\n *\n * <p>Assumes that an ES5 platform where, if {@code WeakMap} is\n * already present, then it conforms to the anticipated ES6\n * specification. To run this file on an ES5 or almost ES5\n * implementation where the {@code WeakMap} specification does not\n * quite conform, run <code>repairES5.js</code> first.\n *\n * <p>Even though WeakMapModule is not global, the linter thinks it\n * is, which is why it is in the overrides list below.\n *\n * <p>NOTE: Before using this WeakMap emulation in a non-SES\n * environment, see the note below about hiddenRecord.\n *\n * @author Mark S. Miller\n * @requires crypto, ArrayBuffer, Uint8Array, navigator, console\n * @overrides WeakMap, ses, Proxy\n * @overrides WeakMapModule\n */\n\n/**\n * This {@code WeakMap} emulation is observably equivalent to the\n * ES-Harmony WeakMap, but with leakier garbage collection properties.\n *\n * <p>As with true WeakMaps, in this emulation, a key does not\n * retain maps indexed by that key and (crucially) a map does not\n * retain the keys it indexes. A map by itself also does not retain\n * the values associated with that map.\n *\n * <p>However, the values associated with a key in some map are\n * retained so long as that key is retained and those associations are\n * not overridden. For example, when used to support membranes, all\n * values exported from a given membrane will live for the lifetime\n * they would have had in the absence of an interposed membrane. Even\n * when the membrane is revoked, all objects that would have been\n * reachable in the absence of revocation will still be reachable, as\n * far as the GC can tell, even though they will no longer be relevant\n * to ongoing computation.\n *\n * <p>The API implemented here is approximately the API as implemented\n * in FF6.0a1 and agreed to by MarkM, Andreas Gal, and Dave Herman,\n * rather than the offially approved proposal page. TODO(erights):\n * upgrade the ecmascript WeakMap proposal page to explain this API\n * change and present to EcmaScript committee for their approval.\n *\n * <p>The first difference between the emulation here and that in\n * FF6.0a1 is the presence of non enumerable {@code get___, has___,\n * set___, and delete___} methods on WeakMap instances to represent\n * what would be the hidden internal properties of a primitive\n * implementation. Whereas the FF6.0a1 WeakMap.prototype methods\n * require their {@code this} to be a genuine WeakMap instance (i.e.,\n * an object of {@code [[Class]]} \"WeakMap}), since there is nothing\n * unforgeable about the pseudo-internal method names used here,\n * nothing prevents these emulated prototype methods from being\n * applied to non-WeakMaps with pseudo-internal methods of the same\n * names.\n *\n * <p>Another difference is that our emulated {@code\n * WeakMap.prototype} is not itself a WeakMap. A problem with the\n * current FF6.0a1 API is that WeakMap.prototype is itself a WeakMap\n * providing ambient mutability and an ambient communications\n * channel. Thus, if a WeakMap is already present and has this\n * problem, repairES5.js wraps it in a safe wrappper in order to\n * prevent access to this channel. (See\n * PATCH_MUTABLE_FROZEN_WEAKMAP_PROTO in repairES5.js).\n */\n\n/**\n * If this is a full <a href=\n * \"http://code.google.com/p/es-lab/wiki/SecureableES5\"\n * >secureable ES5</a> platform and the ES-Harmony {@code WeakMap} is\n * absent, install an approximate emulation.\n *\n * <p>If WeakMap is present but cannot store some objects, use our approximate\n * emulation as a wrapper.\n *\n * <p>If this is almost a secureable ES5 platform, then WeakMap.js\n * should be run after repairES5.js.\n *\n * <p>See {@code WeakMap} for documentation of the garbage collection\n * properties of this WeakMap emulation.\n */\n(function WeakMapModule() {\n  \"use strict\";\n\n  if (typeof ses !== 'undefined' && ses.ok && !ses.ok()) {\n    // already too broken, so give up\n    return;\n  }\n\n  /**\n   * In some cases (current Firefox), we must make a choice betweeen a\n   * WeakMap which is capable of using all varieties of host objects as\n   * keys and one which is capable of safely using proxies as keys. See\n   * comments below about HostWeakMap and DoubleWeakMap for details.\n   *\n   * This function (which is a global, not exposed to guests) marks a\n   * WeakMap as permitted to do what is necessary to index all host\n   * objects, at the cost of making it unsafe for proxies.\n   *\n   * Do not apply this function to anything which is not a genuine\n   * fresh WeakMap.\n   */\n  function weakMapPermitHostObjects(map) {\n    // identity of function used as a secret -- good enough and cheap\n    if (map.permitHostObjects___) {\n      map.permitHostObjects___(weakMapPermitHostObjects);\n    }\n  }\n  if (typeof ses !== 'undefined') {\n    ses.weakMapPermitHostObjects = weakMapPermitHostObjects;\n  }\n\n  // IE 11 has no Proxy but has a broken WeakMap such that we need to patch\n  // it using DoubleWeakMap; this flag tells DoubleWeakMap so.\n  var doubleWeakMapCheckSilentFailure = false;\n\n  // Check if there is already a good-enough WeakMap implementation, and if so\n  // exit without replacing it.\n  if (typeof WeakMap === 'function') {\n    var HostWeakMap = WeakMap;\n    // There is a WeakMap -- is it good enough?\n    if (typeof navigator !== 'undefined' &&\n        /Firefox/.test(navigator.userAgent)) {\n      // We're now *assuming not*, because as of this writing (2013-05-06)\n      // Firefox's WeakMaps have a miscellany of objects they won't accept, and\n      // we don't want to make an exhaustive list, and testing for just one\n      // will be a problem if that one is fixed alone (as they did for Event).\n\n      // If there is a platform that we *can* reliably test on, here's how to\n      // do it:\n      //  var problematic = ... ;\n      //  var testHostMap = new HostWeakMap();\n      //  try {\n      //    testHostMap.set(problematic, 1);  // Firefox 20 will throw here\n      //    if (testHostMap.get(problematic) === 1) {\n      //      return;\n      //    }\n      //  } catch (e) {}\n\n    } else {\n      // IE 11 bug: WeakMaps silently fail to store frozen objects.\n      var testMap = new HostWeakMap();\n      var testObject = Object.freeze({});\n      testMap.set(testObject, 1);\n      if (testMap.get(testObject) !== 1) {\n        doubleWeakMapCheckSilentFailure = true;\n        // Fall through to installing our WeakMap.\n      } else {\n        module.exports = WeakMap;\n        return;\n      }\n    }\n  }\n\n  var hop = Object.prototype.hasOwnProperty;\n  var gopn = Object.getOwnPropertyNames;\n  var defProp = Object.defineProperty;\n  var isExtensible = Object.isExtensible;\n\n  /**\n   * Security depends on HIDDEN_NAME being both <i>unguessable</i> and\n   * <i>undiscoverable</i> by untrusted code.\n   *\n   * <p>Given the known weaknesses of Math.random() on existing\n   * browsers, it does not generate unguessability we can be confident\n   * of.\n   *\n   * <p>It is the monkey patching logic in this file that is intended\n   * to ensure undiscoverability. The basic idea is that there are\n   * three fundamental means of discovering properties of an object:\n   * The for/in loop, Object.keys(), and Object.getOwnPropertyNames(),\n   * as well as some proposed ES6 extensions that appear on our\n   * whitelist. The first two only discover enumerable properties, and\n   * we only use HIDDEN_NAME to name a non-enumerable property, so the\n   * only remaining threat should be getOwnPropertyNames and some\n   * proposed ES6 extensions that appear on our whitelist. We monkey\n   * patch them to remove HIDDEN_NAME from the list of properties they\n   * returns.\n   *\n   * <p>TODO(erights): On a platform with built-in Proxies, proxies\n   * could be used to trap and thereby discover the HIDDEN_NAME, so we\n   * need to monkey patch Proxy.create, Proxy.createFunction, etc, in\n   * order to wrap the provided handler with the real handler which\n   * filters out all traps using HIDDEN_NAME.\n   *\n   * <p>TODO(erights): Revisit Mike Stay's suggestion that we use an\n   * encapsulated function at a not-necessarily-secret name, which\n   * uses the Stiegler shared-state rights amplification pattern to\n   * reveal the associated value only to the WeakMap in which this key\n   * is associated with that value. Since only the key retains the\n   * function, the function can also remember the key without causing\n   * leakage of the key, so this doesn't violate our general gc\n   * goals. In addition, because the name need not be a guarded\n   * secret, we could efficiently handle cross-frame frozen keys.\n   */\n  var HIDDEN_NAME_PREFIX = 'weakmap:';\n  var HIDDEN_NAME = HIDDEN_NAME_PREFIX + 'ident:' + Math.random() + '___';\n\n  if (typeof crypto !== 'undefined' &&\n      typeof crypto.getRandomValues === 'function' &&\n      typeof ArrayBuffer === 'function' &&\n      typeof Uint8Array === 'function') {\n    var ab = new ArrayBuffer(25);\n    var u8s = new Uint8Array(ab);\n    crypto.getRandomValues(u8s);\n    HIDDEN_NAME = HIDDEN_NAME_PREFIX + 'rand:' +\n      Array.prototype.map.call(u8s, function(u8) {\n        return (u8 % 36).toString(36);\n      }).join('') + '___';\n  }\n\n  function isNotHiddenName(name) {\n    return !(\n        name.substr(0, HIDDEN_NAME_PREFIX.length) == HIDDEN_NAME_PREFIX &&\n        name.substr(name.length - 3) === '___');\n  }\n\n  /**\n   * Monkey patch getOwnPropertyNames to avoid revealing the\n   * HIDDEN_NAME.\n   *\n   * <p>The ES5.1 spec requires each name to appear only once, but as\n   * of this writing, this requirement is controversial for ES6, so we\n   * made this code robust against this case. If the resulting extra\n   * search turns out to be expensive, we can probably relax this once\n   * ES6 is adequately supported on all major browsers, iff no browser\n   * versions we support at that time have relaxed this constraint\n   * without providing built-in ES6 WeakMaps.\n   */\n  defProp(Object, 'getOwnPropertyNames', {\n    value: function fakeGetOwnPropertyNames(obj) {\n      return gopn(obj).filter(isNotHiddenName);\n    }\n  });\n\n  /**\n   * getPropertyNames is not in ES5 but it is proposed for ES6 and\n   * does appear in our whitelist, so we need to clean it too.\n   */\n  if ('getPropertyNames' in Object) {\n    var originalGetPropertyNames = Object.getPropertyNames;\n    defProp(Object, 'getPropertyNames', {\n      value: function fakeGetPropertyNames(obj) {\n        return originalGetPropertyNames(obj).filter(isNotHiddenName);\n      }\n    });\n  }\n\n  /**\n   * <p>To treat objects as identity-keys with reasonable efficiency\n   * on ES5 by itself (i.e., without any object-keyed collections), we\n   * need to add a hidden property to such key objects when we\n   * can. This raises several issues:\n   * <ul>\n   * <li>Arranging to add this property to objects before we lose the\n   *     chance, and\n   * <li>Hiding the existence of this new property from most\n   *     JavaScript code.\n   * <li>Preventing <i>certification theft</i>, where one object is\n   *     created falsely claiming to be the key of an association\n   *     actually keyed by another object.\n   * <li>Preventing <i>value theft</i>, where untrusted code with\n   *     access to a key object but not a weak map nevertheless\n   *     obtains access to the value associated with that key in that\n   *     weak map.\n   * </ul>\n   * We do so by\n   * <ul>\n   * <li>Making the name of the hidden property unguessable, so \"[]\"\n   *     indexing, which we cannot intercept, cannot be used to access\n   *     a property without knowing the name.\n   * <li>Making the hidden property non-enumerable, so we need not\n   *     worry about for-in loops or {@code Object.keys},\n   * <li>monkey patching those reflective methods that would\n   *     prevent extensions, to add this hidden property first,\n   * <li>monkey patching those methods that would reveal this\n   *     hidden property.\n   * </ul>\n   * Unfortunately, because of same-origin iframes, we cannot reliably\n   * add this hidden property before an object becomes\n   * non-extensible. Instead, if we encounter a non-extensible object\n   * without a hidden record that we can detect (whether or not it has\n   * a hidden record stored under a name secret to us), then we just\n   * use the key object itself to represent its identity in a brute\n   * force leaky map stored in the weak map, losing all the advantages\n   * of weakness for these.\n   */\n  function getHiddenRecord(key) {\n    if (key !== Object(key)) {\n      throw new TypeError('Not an object: ' + key);\n    }\n    var hiddenRecord = key[HIDDEN_NAME];\n    if (hiddenRecord && hiddenRecord.key === key) { return hiddenRecord; }\n    if (!isExtensible(key)) {\n      // Weak map must brute force, as explained in doc-comment above.\n      return void 0;\n    }\n\n    // The hiddenRecord and the key point directly at each other, via\n    // the \"key\" and HIDDEN_NAME properties respectively. The key\n    // field is for quickly verifying that this hidden record is an\n    // own property, not a hidden record from up the prototype chain.\n    //\n    // NOTE: Because this WeakMap emulation is meant only for systems like\n    // SES where Object.prototype is frozen without any numeric\n    // properties, it is ok to use an object literal for the hiddenRecord.\n    // This has two advantages:\n    // * It is much faster in a performance critical place\n    // * It avoids relying on Object.create(null), which had been\n    //   problematic on Chrome 28.0.1480.0. See\n    //   https://code.google.com/p/google-caja/issues/detail?id=1687\n    hiddenRecord = { key: key };\n\n    // When using this WeakMap emulation on platforms where\n    // Object.prototype might not be frozen and Object.create(null) is\n    // reliable, use the following two commented out lines instead.\n    // hiddenRecord = Object.create(null);\n    // hiddenRecord.key = key;\n\n    // Please contact us if you need this to work on platforms where\n    // Object.prototype might not be frozen and\n    // Object.create(null) might not be reliable.\n\n    try {\n      defProp(key, HIDDEN_NAME, {\n        value: hiddenRecord,\n        writable: false,\n        enumerable: false,\n        configurable: false\n      });\n      return hiddenRecord;\n    } catch (error) {\n      // Under some circumstances, isExtensible seems to misreport whether\n      // the HIDDEN_NAME can be defined.\n      // The circumstances have not been isolated, but at least affect\n      // Node.js v0.10.26 on TravisCI / Linux, but not the same version of\n      // Node.js on OS X.\n      return void 0;\n    }\n  }\n\n  /**\n   * Monkey patch operations that would make their argument\n   * non-extensible.\n   *\n   * <p>The monkey patched versions throw a TypeError if their\n   * argument is not an object, so it should only be done to functions\n   * that should throw a TypeError anyway if their argument is not an\n   * object.\n   */\n  (function(){\n    var oldFreeze = Object.freeze;\n    defProp(Object, 'freeze', {\n      value: function identifyingFreeze(obj) {\n        getHiddenRecord(obj);\n        return oldFreeze(obj);\n      }\n    });\n    var oldSeal = Object.seal;\n    defProp(Object, 'seal', {\n      value: function identifyingSeal(obj) {\n        getHiddenRecord(obj);\n        return oldSeal(obj);\n      }\n    });\n    var oldPreventExtensions = Object.preventExtensions;\n    defProp(Object, 'preventExtensions', {\n      value: function identifyingPreventExtensions(obj) {\n        getHiddenRecord(obj);\n        return oldPreventExtensions(obj);\n      }\n    });\n  })();\n\n  function constFunc(func) {\n    func.prototype = null;\n    return Object.freeze(func);\n  }\n\n  var calledAsFunctionWarningDone = false;\n  function calledAsFunctionWarning() {\n    // Future ES6 WeakMap is currently (2013-09-10) expected to reject WeakMap()\n    // but we used to permit it and do it ourselves, so warn only.\n    if (!calledAsFunctionWarningDone && typeof console !== 'undefined') {\n      calledAsFunctionWarningDone = true;\n      console.warn('WeakMap should be invoked as new WeakMap(), not ' +\n          'WeakMap(). This will be an error in the future.');\n    }\n  }\n\n  var nextId = 0;\n\n  var OurWeakMap = function() {\n    if (!(this instanceof OurWeakMap)) {  // approximate test for new ...()\n      calledAsFunctionWarning();\n    }\n\n    // We are currently (12/25/2012) never encountering any prematurely\n    // non-extensible keys.\n    var keys = []; // brute force for prematurely non-extensible keys.\n    var values = []; // brute force for corresponding values.\n    var id = nextId++;\n\n    function get___(key, opt_default) {\n      var index;\n      var hiddenRecord = getHiddenRecord(key);\n      if (hiddenRecord) {\n        return id in hiddenRecord ? hiddenRecord[id] : opt_default;\n      } else {\n        index = keys.indexOf(key);\n        return index >= 0 ? values[index] : opt_default;\n      }\n    }\n\n    function has___(key) {\n      var hiddenRecord = getHiddenRecord(key);\n      if (hiddenRecord) {\n        return id in hiddenRecord;\n      } else {\n        return keys.indexOf(key) >= 0;\n      }\n    }\n\n    function set___(key, value) {\n      var index;\n      var hiddenRecord = getHiddenRecord(key);\n      if (hiddenRecord) {\n        hiddenRecord[id] = value;\n      } else {\n        index = keys.indexOf(key);\n        if (index >= 0) {\n          values[index] = value;\n        } else {\n          // Since some browsers preemptively terminate slow turns but\n          // then continue computing with presumably corrupted heap\n          // state, we here defensively get keys.length first and then\n          // use it to update both the values and keys arrays, keeping\n          // them in sync.\n          index = keys.length;\n          values[index] = value;\n          // If we crash here, values will be one longer than keys.\n          keys[index] = key;\n        }\n      }\n      return this;\n    }\n\n    function delete___(key) {\n      var hiddenRecord = getHiddenRecord(key);\n      var index, lastIndex;\n      if (hiddenRecord) {\n        return id in hiddenRecord && delete hiddenRecord[id];\n      } else {\n        index = keys.indexOf(key);\n        if (index < 0) {\n          return false;\n        }\n        // Since some browsers preemptively terminate slow turns but\n        // then continue computing with potentially corrupted heap\n        // state, we here defensively get keys.length first and then use\n        // it to update both the keys and the values array, keeping\n        // them in sync. We update the two with an order of assignments,\n        // such that any prefix of these assignments will preserve the\n        // key/value correspondence, either before or after the delete.\n        // Note that this needs to work correctly when index === lastIndex.\n        lastIndex = keys.length - 1;\n        keys[index] = void 0;\n        // If we crash here, there's a void 0 in the keys array, but\n        // no operation will cause a \"keys.indexOf(void 0)\", since\n        // getHiddenRecord(void 0) will always throw an error first.\n        values[index] = values[lastIndex];\n        // If we crash here, values[index] cannot be found here,\n        // because keys[index] is void 0.\n        keys[index] = keys[lastIndex];\n        // If index === lastIndex and we crash here, then keys[index]\n        // is still void 0, since the aliasing killed the previous key.\n        keys.length = lastIndex;\n        // If we crash here, keys will be one shorter than values.\n        values.length = lastIndex;\n        return true;\n      }\n    }\n\n    return Object.create(OurWeakMap.prototype, {\n      get___:    { value: constFunc(get___) },\n      has___:    { value: constFunc(has___) },\n      set___:    { value: constFunc(set___) },\n      delete___: { value: constFunc(delete___) }\n    });\n  };\n\n  OurWeakMap.prototype = Object.create(Object.prototype, {\n    get: {\n      /**\n       * Return the value most recently associated with key, or\n       * opt_default if none.\n       */\n      value: function get(key, opt_default) {\n        return this.get___(key, opt_default);\n      },\n      writable: true,\n      configurable: true\n    },\n\n    has: {\n      /**\n       * Is there a value associated with key in this WeakMap?\n       */\n      value: function has(key) {\n        return this.has___(key);\n      },\n      writable: true,\n      configurable: true\n    },\n\n    set: {\n      /**\n       * Associate value with key in this WeakMap, overwriting any\n       * previous association if present.\n       */\n      value: function set(key, value) {\n        return this.set___(key, value);\n      },\n      writable: true,\n      configurable: true\n    },\n\n    'delete': {\n      /**\n       * Remove any association for key in this WeakMap, returning\n       * whether there was one.\n       *\n       * <p>Note that the boolean return here does not work like the\n       * {@code delete} operator. The {@code delete} operator returns\n       * whether the deletion succeeds at bringing about a state in\n       * which the deleted property is absent. The {@code delete}\n       * operator therefore returns true if the property was already\n       * absent, whereas this {@code delete} method returns false if\n       * the association was already absent.\n       */\n      value: function remove(key) {\n        return this.delete___(key);\n      },\n      writable: true,\n      configurable: true\n    }\n  });\n\n  if (typeof HostWeakMap === 'function') {\n    (function() {\n      // If we got here, then the platform has a WeakMap but we are concerned\n      // that it may refuse to store some key types. Therefore, make a map\n      // implementation which makes use of both as possible.\n\n      // In this mode we are always using double maps, so we are not proxy-safe.\n      // This combination does not occur in any known browser, but we had best\n      // be safe.\n      if (doubleWeakMapCheckSilentFailure && typeof Proxy !== 'undefined') {\n        Proxy = undefined;\n      }\n\n      function DoubleWeakMap() {\n        if (!(this instanceof OurWeakMap)) {  // approximate test for new ...()\n          calledAsFunctionWarning();\n        }\n\n        // Preferable, truly weak map.\n        var hmap = new HostWeakMap();\n\n        // Our hidden-property-based pseudo-weak-map. Lazily initialized in the\n        // 'set' implementation; thus we can avoid performing extra lookups if\n        // we know all entries actually stored are entered in 'hmap'.\n        var omap = undefined;\n\n        // Hidden-property maps are not compatible with proxies because proxies\n        // can observe the hidden name and either accidentally expose it or fail\n        // to allow the hidden property to be set. Therefore, we do not allow\n        // arbitrary WeakMaps to switch to using hidden properties, but only\n        // those which need the ability, and unprivileged code is not allowed\n        // to set the flag.\n        //\n        // (Except in doubleWeakMapCheckSilentFailure mode in which case we\n        // disable proxies.)\n        var enableSwitching = false;\n\n        function dget(key, opt_default) {\n          if (omap) {\n            return hmap.has(key) ? hmap.get(key)\n                : omap.get___(key, opt_default);\n          } else {\n            return hmap.get(key, opt_default);\n          }\n        }\n\n        function dhas(key) {\n          return hmap.has(key) || (omap ? omap.has___(key) : false);\n        }\n\n        var dset;\n        if (doubleWeakMapCheckSilentFailure) {\n          dset = function(key, value) {\n            hmap.set(key, value);\n            if (!hmap.has(key)) {\n              if (!omap) { omap = new OurWeakMap(); }\n              omap.set(key, value);\n            }\n            return this;\n          };\n        } else {\n          dset = function(key, value) {\n            if (enableSwitching) {\n              try {\n                hmap.set(key, value);\n              } catch (e) {\n                if (!omap) { omap = new OurWeakMap(); }\n                omap.set___(key, value);\n              }\n            } else {\n              hmap.set(key, value);\n            }\n            return this;\n          };\n        }\n\n        function ddelete(key) {\n          var result = !!hmap['delete'](key);\n          if (omap) { return omap.delete___(key) || result; }\n          return result;\n        }\n\n        return Object.create(OurWeakMap.prototype, {\n          get___:    { value: constFunc(dget) },\n          has___:    { value: constFunc(dhas) },\n          set___:    { value: constFunc(dset) },\n          delete___: { value: constFunc(ddelete) },\n          permitHostObjects___: { value: constFunc(function(token) {\n            if (token === weakMapPermitHostObjects) {\n              enableSwitching = true;\n            } else {\n              throw new Error('bogus call to permitHostObjects___');\n            }\n          })}\n        });\n      }\n      DoubleWeakMap.prototype = OurWeakMap.prototype;\n      module.exports = DoubleWeakMap;\n\n      // define .constructor to hide OurWeakMap ctor\n      Object.defineProperty(WeakMap.prototype, 'constructor', {\n        value: WeakMap,\n        enumerable: false,  // as default .constructor is\n        configurable: true,\n        writable: true\n      });\n    })();\n  } else {\n    // There is no host WeakMap, so we must use the emulation.\n\n    // Emulated WeakMaps are incompatible with native proxies (because proxies\n    // can observe the hidden name), so we must disable Proxy usage (in\n    // ArrayLike and Domado, currently).\n    if (typeof Proxy !== 'undefined') {\n      Proxy = undefined;\n    }\n\n    module.exports = OurWeakMap;\n  }\n})();\n\n},{}],540:[function(_dereq_,module,exports){\nvar hiddenStore = _dereq_('./hidden-store.js');\n\nmodule.exports = createStore;\n\nfunction createStore() {\n    var key = {};\n\n    return function (obj) {\n        if ((typeof obj !== 'object' || obj === null) &&\n            typeof obj !== 'function'\n        ) {\n            throw new Error('Weakmap-shim: Key must be object')\n        }\n\n        var store = obj.valueOf(key);\n        return store && store.identity === key ?\n            store : hiddenStore(obj, key);\n    };\n}\n\n},{\"./hidden-store.js\":541}],541:[function(_dereq_,module,exports){\nmodule.exports = hiddenStore;\n\nfunction hiddenStore(obj, key) {\n    var store = { identity: key };\n    var valueOf = obj.valueOf;\n\n    Object.defineProperty(obj, \"valueOf\", {\n        value: function (value) {\n            return value !== key ?\n                valueOf.apply(this, arguments) : store;\n        },\n        writable: true\n    });\n\n    return store;\n}\n\n},{}],542:[function(_dereq_,module,exports){\n// Original - @Gozola.\n// https://gist.github.com/Gozala/1269991\n// This is a reimplemented version (with a few bug fixes).\n\nvar createStore = _dereq_('./create-store.js');\n\nmodule.exports = weakMap;\n\nfunction weakMap() {\n    var privates = createStore();\n\n    return {\n        'get': function (key, fallback) {\n            var store = privates(key)\n            return store.hasOwnProperty('value') ?\n                store.value : fallback\n        },\n        'set': function (key, value) {\n            privates(key).value = value;\n            return this;\n        },\n        'has': function(key) {\n            return 'value' in privates(key);\n        },\n        'delete': function (key) {\n            return delete privates(key).value;\n        }\n    }\n}\n\n},{\"./create-store.js\":540}],543:[function(_dereq_,module,exports){\nvar getContext = _dereq_('get-canvas-context')\n\nmodule.exports = function getWebGLContext (opt) {\n  return getContext('webgl', opt)\n}\n\n},{\"get-canvas-context\":231}],544:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Traditional Chinese calendar for jQuery v2.0.2.\n   Written by Nicolas Riesco (enquiries@nicolasriesco.net) December 2016.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\nvar gregorianCalendar = main.instance();\n\n/** Implementation of the traditional Chinese calendar.\n    Source of calendar tables https://github.com/isee15/Lunar-Solar-Calendar-Converter .\n    @class ChineseCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction ChineseCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nChineseCalendar.prototype = new main.baseCalendar;\n\nassign(ChineseCalendar.prototype, {\n    /** The calendar name.\n        @memberof ChineseCalendar */\n    name: 'Chinese',\n     /** Julian date of start of Gregorian epoch: 1 January 0001 CE.\n        @memberof GregorianCalendar */\n    jdEpoch: 1721425.5,\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof ChineseCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        This calendar uses month indices to account for intercalary months. \n        @memberof ChineseCalendar */\n    minMonth: 0,\n    /** The first month in the year.\n        This calendar uses month indices to account for intercalary months. \n        @memberof ChineseCalendar */\n    firstMonth: 0,\n    /** The minimum day number.\n        @memberof ChineseCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof ChineseCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Chinese',\n            epochs: ['BEC', 'EC'],\n            monthNumbers: function(date, padded) {\n                if (typeof date === 'string') {\n                    var match = date.match(MONTH_NUMBER_REGEXP);\n                    return (match) ? match[0] : '';\n                }\n\n                var year = this._validateYear(date);\n                var monthIndex = date.month();\n\n                var month = '' + this.toChineseMonth(year, monthIndex);\n\n                if (padded && month.length < 2) {\n                    month = \"0\" + month;\n                }\n\n                if (this.isIntercalaryMonth(year, monthIndex)) {\n                    month += 'i';\n                }\n\n                return month;\n            },\n            monthNames: function(date) {\n                if (typeof date === 'string') {\n                    var match = date.match(MONTH_NAME_REGEXP);\n                    return (match) ? match[0] : '';\n                }\n\n                var year = this._validateYear(date);\n                var monthIndex = date.month();\n\n                var month = this.toChineseMonth(year, monthIndex);\n\n                var monthName = ['一月','二月','三月','四月','五月','六月',\n                    '七月','八月','九月','十月','十一月','十二月'][month - 1];\n\n                if (this.isIntercalaryMonth(year, monthIndex)) {\n                    monthName = '闰' + monthName;\n                }\n\n                return monthName;\n            },\n            monthNamesShort: function(date) {\n                if (typeof date === 'string') {\n                    var match = date.match(MONTH_SHORT_NAME_REGEXP);\n                    return (match) ? match[0] : '';\n                }\n\n                var year = this._validateYear(date);\n                var monthIndex = date.month();\n\n                var month = this.toChineseMonth(year, monthIndex);\n\n                var monthName = ['一','二','三','四','五','六',\n                    '七','八','九','十','十一','十二'][month - 1];\n\n                if (this.isIntercalaryMonth(year, monthIndex)) {\n                    monthName = '闰' + monthName;\n                }\n\n                return monthName;\n            },\n            parseMonth: function(year, monthString) {\n                year = this._validateYear(year);\n                var month = parseInt(monthString);\n                var isIntercalary;\n\n                if (!isNaN(month)) {\n                    var i = monthString[monthString.length - 1];\n                    isIntercalary = (i === 'i' || i === 'I');\n                } else {\n                    if (monthString[0] === '闰') {\n                        isIntercalary = true;\n                        monthString = monthString.substring(1);\n                    }\n                    if (monthString[monthString.length - 1] === '月') {\n                        monthString = monthString.substring(0, monthString.length - 1);\n                    }\n                    month = 1 +\n                        ['一','二','三','四','五','六',\n                        '七','八','九','十','十一','十二'].indexOf(monthString);\n                }\n\n                var monthIndex = this.toMonthIndex(year, month, isIntercalary);\n                return monthIndex;\n            },\n            dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 1,\n            isRTL: false\n        }\n    },\n\n    /** Check that a candidate date is from the same calendar and is valid.\n        @memberof BaseCalendar\n        @private\n        @param year {CDate|number} The date or the year to validate.\n        @param error {string} Error message if invalid.\n        @return {number} The year.\n        @throws Error if year out of range. */\n    _validateYear: function(year, error) {\n        if (year.year) {\n            year = year.year();\n        }\n\n        if (typeof year !== 'number' || year < 1888 || year > 2111) {\n            throw error.replace(/\\{0\\}/, this.local.name);\n        }\n\n        return year;\n    },\n\n    /** Retrieve the month index (i.e. accounting for intercalary months).\n        @memberof ChineseCalendar\n        @param year {number} The year.\n        @param month {number} The month (1 for first month).\n        @param [isIntercalary=false] {boolean} If month is intercalary.\n        @return {number} The month index (0 for first month).\n        @throws Error if an invalid month/year or a different calendar used. */\n    toMonthIndex: function(year, month, isIntercalary) {\n        // compute intercalary month in the year (0 if none)\n        var intercalaryMonth = this.intercalaryMonth(year);\n\n        // validate month\n        var invalidIntercalaryMonth = \n            (isIntercalary && month !== intercalaryMonth);\n        if (invalidIntercalaryMonth || month < 1 || month > 12) {\n            throw main.local.invalidMonth\n                .replace(/\\{0\\}/, this.local.name);\n        }\n\n        // compute month index\n        var monthIndex;\n\n        if (!intercalaryMonth) {\n            monthIndex = month - 1;\n        } else if(!isIntercalary && month <= intercalaryMonth) {\n            monthIndex = month - 1;\n        } else {\n            monthIndex = month;\n        }\n\n        return monthIndex;\n    },\n\n    /** Retrieve the month (i.e. accounting for intercalary months).\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date or the year to examine.\n        @param monthIndex {number} The month index (0 for first month).\n        @return {number} The month (1 for first month).\n        @throws Error if an invalid month/year or a different calendar used. */\n    toChineseMonth: function(year, monthIndex) {\n        if (year.year) {\n            year = year.year();\n            monthIndex = year.month();\n        }\n\n        // compute intercalary month in the year (0 if none)\n        var intercalaryMonth = this.intercalaryMonth(year);\n\n        // validate month\n        var maxMonthIndex = (intercalaryMonth) ? 12 : 11;\n        if (monthIndex < 0 || monthIndex > maxMonthIndex) {\n            throw main.local.invalidMonth\n                .replace(/\\{0\\}/, this.local.name);\n        }\n\n        // compute Chinese month\n        var month;\n\n        if (!intercalaryMonth) {\n            month = monthIndex + 1;\n        } else if(monthIndex < intercalaryMonth) {\n            month = monthIndex + 1;\n        } else {\n            month = monthIndex;\n        }\n\n        return month;\n    },\n\n    /** Determine the intercalary month of a year (if any).\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The intercalary month number, or 0 if none.\n        @throws Error if an invalid year or a different calendar used. */\n    intercalaryMonth: function(year) {\n        year = this._validateYear(year);\n\n        var monthDaysTable = LUNAR_MONTH_DAYS[year - LUNAR_MONTH_DAYS[0]];\n        var intercalaryMonth = monthDaysTable >> 13;\n\n        return intercalaryMonth;\n    },\n\n    /** Determine whether this date is an intercalary month.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [monthIndex] {number} The month index to examine.\n        @return {boolean} <code>true</code> if this is an intercalary month, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    isIntercalaryMonth: function(year, monthIndex) {\n        if (year.year) {\n            year = year.year();\n            monthIndex = year.month();\n        }\n\n        var intercalaryMonth = this.intercalaryMonth(year);\n\n        return !!intercalaryMonth && intercalaryMonth === monthIndex;\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        return (this.intercalaryMonth(year) !== 0);\n    },\n\n    /** Determine the week of the year for a date - ISO 8601.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [monthIndex] {number} The month index to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, monthIndex, day) {\n        // compute Chinese new year\n        var validatedYear =\n            this._validateYear(year, main.local.invalidyear);\n        var packedDate =\n            CHINESE_NEW_YEAR[validatedYear - CHINESE_NEW_YEAR[0]];\n\n        var y = (packedDate >> 9) & 0xFFF;\n        var m = (packedDate >> 5) & 0x0F;\n        var d = packedDate & 0x1F;\n        \n        // find first Thrusday of the year\n        var firstThursday;\n        firstThursday = gregorianCalendar.newDate(y, m, d);\n        firstThursday.add(4 - (firstThursday.dayOfWeek() || 7), 'd');\n\n        // compute days from first Thursday\n        var offset =\n            this.toJD(year, monthIndex, day) - firstThursday.toJD();\n        return 1 + Math.floor(offset / 7);\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        return (this.leapYear(year)) ? 13 : 12;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [monthIndex] {number} The month index.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, monthIndex) {\n        if (year.year) {\n            monthIndex = year.month();\n            year = year.year();\n        }\n\n        year = this._validateYear(year);\n\n        var monthDaysTable = LUNAR_MONTH_DAYS[year - LUNAR_MONTH_DAYS[0]];\n\n        var intercalaryMonth = monthDaysTable >> 13;\n        var maxMonthIndex = (intercalaryMonth) ? 12 : 11;\n        if (monthIndex > maxMonthIndex) {\n            throw main.local.invalidMonth\n                .replace(/\\{0\\}/, this.local.name);\n        }\n\n        var daysInMonth = (monthDaysTable & (1 << (12 - monthIndex))) ?\n            30 : 29;\n\n        return daysInMonth;\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [monthIndex] {number} The month index to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, monthIndex, day) {\n        return (this.dayOfWeek(year, monthIndex, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof ChineseCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [monthIndex] {number} The month index to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, monthIndex, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = this._validateYear(date.year());\n        monthIndex = date.month();\n        day = date.day();\n\n        var isIntercalary = this.isIntercalaryMonth(year, monthIndex);\n        var month = this.toChineseMonth(year, monthIndex);\n\n        var solar = toSolar(year, month, day, isIntercalary);\n\n        return gregorianCalendar.toJD(solar.year, solar.month, solar.day);\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof ChineseCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        var date = gregorianCalendar.fromJD(jd);\n        var lunar = toLunar(date.year(), date.month(), date.day());\n        var monthIndex = this.toMonthIndex(\n            lunar.year, lunar.month, lunar.isIntercalary);\n        return this.newDate(lunar.year, monthIndex, lunar.day);\n    },\n\n    /** Create a new date from a string.\n        @memberof ChineseCalendar\n        @param dateString {string} String representing a Chinese date\n        @return {CDate} The new date.\n        @throws Error if an invalid date. */\n    fromString: function(dateString) {\n        var match = dateString.match(DATE_REGEXP);\n\n        var year = this._validateYear(+match[1]);\n\n        var month = +match[2];\n        var isIntercalary = !!match[3];\n        var monthIndex = this.toMonthIndex(year, month, isIntercalary);\n\n        var day = +match[4];\n\n        return this.newDate(year, monthIndex, day);\n    },\n\n    /** Add period(s) to a date.\n        Cater for no year zero.\n        @memberof ChineseCalendar\n        @param date {CDate} The starting date.\n        @param offset {number} The number of periods to adjust by.\n        @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.\n        @return {CDate} The updated date.\n        @throws Error if a different calendar used. */\n    add: function(date, offset, period) {\n        var year = date.year();\n        var monthIndex = date.month();\n        var isIntercalary = this.isIntercalaryMonth(year, monthIndex);\n        var month = this.toChineseMonth(year, monthIndex);\n\n        var cdate = Object.getPrototypeOf(ChineseCalendar.prototype)\n            .add.call(this, date, offset, period);\n\n        if (period === 'y') {\n            // Resync month\n            var resultYear = cdate.year();\n            var resultMonthIndex = cdate.month();\n\n            // Using the fact the month index of an intercalary month\n            // equals its month number:\n            var resultCanBeIntercalaryMonth =\n                this.isIntercalaryMonth(resultYear, month);\n\n            var correctedMonthIndex =\n                (isIntercalary && resultCanBeIntercalaryMonth) ?\n                this.toMonthIndex(resultYear, month, true) :\n                this.toMonthIndex(resultYear, month, false);\n\n            if (correctedMonthIndex !== resultMonthIndex) {\n                cdate.month(correctedMonthIndex);\n            }\n        }\n\n        return cdate;\n    },\n});\n\n// Used by ChineseCalendar.prototype.fromString\nvar DATE_REGEXP = /^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m;\nvar MONTH_NUMBER_REGEXP = /^\\d?\\d[iI]?/m;\nvar MONTH_NAME_REGEXP = /^闰?十?[一二三四五六七八九]?月/m;\nvar MONTH_SHORT_NAME_REGEXP = /^闰?十?[一二三四五六七八九]?/m;\n\n// Chinese calendar implementation\nmain.calendars.chinese = ChineseCalendar;\n\n// Chinese calendar tables from year 1888 to 2111\n//\n// Source:\n// https://github.com/isee15/Lunar-Solar-Calendar-Converter.git\n\n// Table of intercalary months and days per month from year 1888 to 2111\n//\n// bit (12 - i):        days in the i^th month\n//                      (= 0 if i^th lunar month has 29 days)\n//                      (= 1 if i^th lunar month has 30 days)\n//                      (first month in lunar year is i = 0)\n// bits (13,14,15,16):  intercalary month\n//                      (= 0 if lunar year has no intercalary month)\nvar LUNAR_MONTH_DAYS = [1887, 0x1694, 0x16aa, 0x4ad5,\n    0xab6, 0xc4b7, 0x4ae, 0xa56, 0xb52a, 0x1d2a, 0xd54, 0x75aa, 0x156a,\n    0x1096d, 0x95c, 0x14ae, 0xaa4d, 0x1a4c, 0x1b2a, 0x8d55, 0xad4,\n    0x135a, 0x495d, 0x95c, 0xd49b, 0x149a, 0x1a4a, 0xbaa5, 0x16a8,\n    0x1ad4, 0x52da, 0x12b6, 0xe937, 0x92e, 0x1496, 0xb64b, 0xd4a,\n    0xda8, 0x95b5, 0x56c, 0x12ae, 0x492f, 0x92e, 0xcc96, 0x1a94,\n    0x1d4a, 0xada9, 0xb5a, 0x56c, 0x726e, 0x125c, 0xf92d, 0x192a,\n    0x1a94, 0xdb4a, 0x16aa, 0xad4, 0x955b, 0x4ba, 0x125a, 0x592b,\n    0x152a, 0xf695, 0xd94, 0x16aa, 0xaab5, 0x9b4, 0x14b6, 0x6a57,\n    0xa56, 0x1152a, 0x1d2a, 0xd54, 0xd5aa, 0x156a, 0x96c, 0x94ae,\n    0x14ae, 0xa4c, 0x7d26, 0x1b2a, 0xeb55, 0xad4, 0x12da, 0xa95d,\n    0x95a, 0x149a, 0x9a4d, 0x1a4a, 0x11aa5, 0x16a8, 0x16d4, 0xd2da,\n    0x12b6, 0x936, 0x9497, 0x1496, 0x1564b, 0xd4a, 0xda8, 0xd5b4,\n    0x156c, 0x12ae, 0xa92f, 0x92e, 0xc96, 0x6d4a, 0x1d4a, 0x10d65,\n    0xb58, 0x156c, 0xb26d, 0x125c, 0x192c, 0x9a95, 0x1a94, 0x1b4a,\n    0x4b55, 0xad4, 0xf55b, 0x4ba, 0x125a, 0xb92b, 0x152a, 0x1694,\n    0x96aa, 0x15aa, 0x12ab5, 0x974, 0x14b6, 0xca57, 0xa56, 0x1526,\n    0x8e95, 0xd54, 0x15aa, 0x49b5, 0x96c, 0xd4ae, 0x149c, 0x1a4c,\n    0xbd26, 0x1aa6, 0xb54, 0x6d6a, 0x12da, 0x1695d, 0x95a, 0x149a,\n    0xda4b, 0x1a4a, 0x1aa4, 0xbb54, 0x16b4, 0xada, 0x495b, 0x936,\n    0xf497, 0x1496, 0x154a, 0xb6a5, 0xda4, 0x15b4, 0x6ab6, 0x126e,\n    0x1092f, 0x92e, 0xc96, 0xcd4a, 0x1d4a, 0xd64, 0x956c, 0x155c,\n    0x125c, 0x792e, 0x192c, 0xfa95, 0x1a94, 0x1b4a, 0xab55, 0xad4,\n    0x14da, 0x8a5d, 0xa5a, 0x1152b, 0x152a, 0x1694, 0xd6aa, 0x15aa,\n    0xab4, 0x94ba, 0x14b6, 0xa56, 0x7527, 0xd26, 0xee53, 0xd54, 0x15aa,\n    0xa9b5, 0x96c, 0x14ae, 0x8a4e, 0x1a4c, 0x11d26, 0x1aa4, 0x1b54,\n    0xcd6a, 0xada, 0x95c, 0x949d, 0x149a, 0x1a2a, 0x5b25, 0x1aa4,\n    0xfb52, 0x16b4, 0xaba, 0xa95b, 0x936, 0x1496, 0x9a4b, 0x154a,\n    0x136a5, 0xda4, 0x15ac];\n\n// Table of Chinese New Years from year 1888 to 2111\n// \n// bits (0 to 4):   solar day\n// bits (5 to 8):   solar month\n// bits (9 to 20):  solar year\nvar CHINESE_NEW_YEAR = [1887, 0xec04c, 0xec23f, 0xec435, 0xec649,\n    0xec83e, 0xeca51, 0xecc46, 0xece3a, 0xed04d, 0xed242, 0xed436,\n    0xed64a, 0xed83f, 0xeda53, 0xedc48, 0xede3d, 0xee050, 0xee244,\n    0xee439, 0xee64d, 0xee842, 0xeea36, 0xeec4a, 0xeee3e, 0xef052,\n    0xef246, 0xef43a, 0xef64e, 0xef843, 0xefa37, 0xefc4b, 0xefe41,\n    0xf0054, 0xf0248, 0xf043c, 0xf0650, 0xf0845, 0xf0a38, 0xf0c4d,\n    0xf0e42, 0xf1037, 0xf124a, 0xf143e, 0xf1651, 0xf1846, 0xf1a3a,\n    0xf1c4e, 0xf1e44, 0xf2038, 0xf224b, 0xf243f, 0xf2653, 0xf2848,\n    0xf2a3b, 0xf2c4f, 0xf2e45, 0xf3039, 0xf324d, 0xf3442, 0xf3636,\n    0xf384a, 0xf3a3d, 0xf3c51, 0xf3e46, 0xf403b, 0xf424e, 0xf4443,\n    0xf4638, 0xf484c, 0xf4a3f, 0xf4c52, 0xf4e48, 0xf503c, 0xf524f,\n    0xf5445, 0xf5639, 0xf584d, 0xf5a42, 0xf5c35, 0xf5e49, 0xf603e,\n    0xf6251, 0xf6446, 0xf663b, 0xf684f, 0xf6a43, 0xf6c37, 0xf6e4b,\n    0xf703f, 0xf7252, 0xf7447, 0xf763c, 0xf7850, 0xf7a45, 0xf7c39,\n    0xf7e4d, 0xf8042, 0xf8254, 0xf8449, 0xf863d, 0xf8851, 0xf8a46,\n    0xf8c3b, 0xf8e4f, 0xf9044, 0xf9237, 0xf944a, 0xf963f, 0xf9853,\n    0xf9a47, 0xf9c3c, 0xf9e50, 0xfa045, 0xfa238, 0xfa44c, 0xfa641,\n    0xfa836, 0xfaa49, 0xfac3d, 0xfae52, 0xfb047, 0xfb23a, 0xfb44e,\n    0xfb643, 0xfb837, 0xfba4a, 0xfbc3f, 0xfbe53, 0xfc048, 0xfc23c,\n    0xfc450, 0xfc645, 0xfc839, 0xfca4c, 0xfcc41, 0xfce36, 0xfd04a,\n    0xfd23d, 0xfd451, 0xfd646, 0xfd83a, 0xfda4d, 0xfdc43, 0xfde37,\n    0xfe04b, 0xfe23f, 0xfe453, 0xfe648, 0xfe83c, 0xfea4f, 0xfec44,\n    0xfee38, 0xff04c, 0xff241, 0xff436, 0xff64a, 0xff83e, 0xffa51,\n    0xffc46, 0xffe3a, 0x10004e, 0x100242, 0x100437, 0x10064b, 0x100841,\n    0x100a53, 0x100c48, 0x100e3c, 0x10104f, 0x101244, 0x101438,\n    0x10164c, 0x101842, 0x101a35, 0x101c49, 0x101e3d, 0x102051,\n    0x102245, 0x10243a, 0x10264e, 0x102843, 0x102a37, 0x102c4b,\n    0x102e3f, 0x103053, 0x103247, 0x10343b, 0x10364f, 0x103845,\n    0x103a38, 0x103c4c, 0x103e42, 0x104036, 0x104249, 0x10443d,\n    0x104651, 0x104846, 0x104a3a, 0x104c4e, 0x104e43, 0x105038,\n    0x10524a, 0x10543e, 0x105652, 0x105847, 0x105a3b, 0x105c4f,\n    0x105e45, 0x106039, 0x10624c, 0x106441, 0x106635, 0x106849,\n    0x106a3d, 0x106c51, 0x106e47, 0x10703c, 0x10724f, 0x107444,\n    0x107638, 0x10784c, 0x107a3f, 0x107c53, 0x107e48];\n\nfunction toLunar(yearOrDate, monthOrResult, day, result) {\n    var solarDate;\n    var lunarDate;\n\n    if(typeof yearOrDate === 'object') {\n        solarDate = yearOrDate;\n        lunarDate = monthOrResult || {};\n\n    } else {\n        var isValidYear = (typeof yearOrDate === 'number') &&\n            (yearOrDate >= 1888) && (yearOrDate <= 2111);\n        if(!isValidYear)\n            throw new Error(\"Solar year outside range 1888-2111\");\n\n        var isValidMonth = (typeof monthOrResult === 'number') &&\n            (monthOrResult >= 1) && (monthOrResult <= 12);\n        if(!isValidMonth)\n            throw new Error(\"Solar month outside range 1 - 12\");\n\n        var isValidDay = (typeof day === 'number') && (day >= 1) && (day <= 31);\n        if(!isValidDay)\n            throw new Error(\"Solar day outside range 1 - 31\");\n\n        solarDate = {\n            year: yearOrDate,\n            month: monthOrResult,\n            day: day,\n        };\n        lunarDate = result || {};\n    }\n\n    // Compute Chinese new year and lunar year\n    var chineseNewYearPackedDate =\n        CHINESE_NEW_YEAR[solarDate.year - CHINESE_NEW_YEAR[0]];\n\n    var packedDate = (solarDate.year << 9) | (solarDate.month << 5)\n        | solarDate.day;\n\n    lunarDate.year = (packedDate >= chineseNewYearPackedDate) ?\n        solarDate.year :\n        solarDate.year - 1;\n\n    chineseNewYearPackedDate =\n        CHINESE_NEW_YEAR[lunarDate.year - CHINESE_NEW_YEAR[0]];\n\n    var y = (chineseNewYearPackedDate >> 9) & 0xFFF;\n    var m = (chineseNewYearPackedDate >> 5) & 0x0F;\n    var d = chineseNewYearPackedDate & 0x1F;\n\n    // Compute days from new year\n    var daysFromNewYear;\n\n    var chineseNewYearJSDate = new Date(y, m -1, d);\n    var jsDate = new Date(solarDate.year, solarDate.month - 1, solarDate.day);\n\n    daysFromNewYear = Math.round(\n        (jsDate - chineseNewYearJSDate) / (24 * 3600 * 1000));\n\n    // Compute lunar month and day\n    var monthDaysTable = LUNAR_MONTH_DAYS[lunarDate.year - LUNAR_MONTH_DAYS[0]];\n\n    var i;\n    for(i = 0; i < 13; i++) {\n        var daysInMonth = (monthDaysTable & (1 << (12 - i))) ? 30 : 29;\n\n        if (daysFromNewYear < daysInMonth) {\n            break;\n        }\n\n        daysFromNewYear -= daysInMonth;\n    }\n\n    var intercalaryMonth = monthDaysTable >> 13;\n    if (!intercalaryMonth || i < intercalaryMonth) {\n        lunarDate.isIntercalary = false;\n        lunarDate.month = 1 + i;\n    } else if (i === intercalaryMonth) {\n        lunarDate.isIntercalary = true;\n        lunarDate.month = i;\n    } else {\n        lunarDate.isIntercalary = false;\n        lunarDate.month = i;\n    }\n\n    lunarDate.day = 1 + daysFromNewYear;\n\n    return lunarDate;\n}\n\nfunction toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result) {\n    var solarDate;\n    var lunarDate;\n\n    if(typeof yearOrDate === 'object') {\n        lunarDate = yearOrDate;\n        solarDate = monthOrResult || {};\n\n    } else {\n        var isValidYear = (typeof yearOrDate === 'number') &&\n            (yearOrDate >= 1888) && (yearOrDate <= 2111);\n        if(!isValidYear)\n            throw new Error(\"Lunar year outside range 1888-2111\");\n\n        var isValidMonth = (typeof monthOrResult === 'number') &&\n            (monthOrResult >= 1) && (monthOrResult <= 12);\n        if(!isValidMonth)\n            throw new Error(\"Lunar month outside range 1 - 12\");\n\n        var isValidDay = (typeof day === 'number') && (day >= 1) && (day <= 30);\n        if(!isValidDay)\n            throw new Error(\"Lunar day outside range 1 - 30\");\n\n        var isIntercalary;\n        if(typeof isIntercalaryOrResult === 'object') {\n            isIntercalary = false;\n            solarDate = isIntercalaryOrResult;\n        } else {\n            isIntercalary = !!isIntercalaryOrResult;\n            solarDate = result || {};\n        }\n\n        lunarDate = {\n            year: yearOrDate,\n            month: monthOrResult,\n            day: day,\n            isIntercalary: isIntercalary,\n        };\n    }\n\n    // Compute days from new year\n    var daysFromNewYear;\n\n    daysFromNewYear = lunarDate.day - 1;\n\n    var monthDaysTable = LUNAR_MONTH_DAYS[lunarDate.year - LUNAR_MONTH_DAYS[0]];\n    var intercalaryMonth = monthDaysTable >> 13;\n\n    var monthsFromNewYear;\n    if (!intercalaryMonth) {\n        monthsFromNewYear = lunarDate.month - 1;\n    } else if (lunarDate.month > intercalaryMonth) {\n        monthsFromNewYear = lunarDate.month;\n    } else if (lunarDate.isIntercalary) {\n        monthsFromNewYear = lunarDate.month;\n    } else {\n        monthsFromNewYear = lunarDate.month - 1;\n    }\n\n    for(var i = 0; i < monthsFromNewYear; i++) {\n        var daysInMonth = (monthDaysTable & (1 << (12 - i))) ? 30 : 29;\n        daysFromNewYear += daysInMonth;\n    }\n\n    // Compute Chinese new year\n    var packedDate = CHINESE_NEW_YEAR[lunarDate.year - CHINESE_NEW_YEAR[0]];\n\n    var y = (packedDate >> 9) & 0xFFF;\n    var m = (packedDate >> 5) & 0x0F;\n    var d = packedDate & 0x1F;\n\n    // Compute solar date\n    var jsDate = new Date(y, m - 1, d + daysFromNewYear);\n\n    solarDate.year = jsDate.getFullYear();\n    solarDate.month = 1 + jsDate.getMonth();\n    solarDate.day = jsDate.getDate();\n\n    return solarDate;\n}\n\n\n},{\"../main\":558,\"object-assign\":449}],545:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Coptic calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) February 2010.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Coptic calendar.\n    See <a href=\"http://en.wikipedia.org/wiki/Coptic_calendar\">http://en.wikipedia.org/wiki/Coptic_calendar</a>.\n    See also Calendrical Calculations: The Millennium Edition\n    (<a href=\"http://emr.cs.iit.edu/home/reingold/calendar-book/index.shtml\">http://emr.cs.iit.edu/home/reingold/calendar-book/index.shtml</a>).\n    @class CopticCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction CopticCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nCopticCalendar.prototype = new main.baseCalendar;\n\nassign(CopticCalendar.prototype, {\n    /** The calendar name.\n        @memberof CopticCalendar */\n    name: 'Coptic',\n    /** Julian date of start of Coptic epoch: 29 August 284 CE (Gregorian).\n        @memberof CopticCalendar */\n    jdEpoch: 1825029.5,\n    /** Days per month in a common year.\n        @memberof CopticCalendar */\n    daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof CopticCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof CopticCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof CopticCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof CopticCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof CopticCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Coptic',\n            epochs: ['BAM', 'AM'],\n            monthNames: ['Thout', 'Paopi', 'Hathor', 'Koiak', 'Tobi', 'Meshir',\n            'Paremhat', 'Paremoude', 'Pashons', 'Paoni', 'Epip', 'Mesori', 'Pi Kogi Enavot'],\n            monthNamesShort: ['Tho', 'Pao', 'Hath', 'Koi', 'Tob', 'Mesh',\n            'Pat', 'Pad', 'Pash', 'Pao', 'Epi', 'Meso', 'PiK'],\n            dayNames: ['Tkyriaka', 'Pesnau', 'Pshoment', 'Peftoou', 'Ptiou', 'Psoou', 'Psabbaton'],\n            dayNamesShort: ['Tky', 'Pes', 'Psh', 'Pef', 'Pti', 'Pso', 'Psa'],\n            dayNamesMin: ['Tk', 'Pes', 'Psh', 'Pef', 'Pt', 'Pso', 'Psa'],\n            digits: null,\n            dateFormat: 'dd/mm/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = date.year() + (date.year() < 0 ? 1 : 0); // No year zero\n        return year % 4 === 3 || year % 4 === -1;\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay,\n            main.local.invalidYear || main.regionalOptions[''].invalidYear);\n        return 13;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number) the month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 13 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param month {number} The month to examine.\n        @param day {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof CopticCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number) the month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        if (year < 0) { year++; } // No year zero\n        return date.day() + (date.month() - 1) * 30 +\n            (year - 1) * 365 + Math.floor(year / 4) + this.jdEpoch - 1;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof CopticCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        var c = Math.floor(jd) + 0.5 - this.jdEpoch;\n        var year = Math.floor((c - Math.floor((c + 366) / 1461)) / 365) + 1;\n        if (year <= 0) { year--; } // No year zero\n        c = Math.floor(jd) + 0.5 - this.newDate(year, 1, 1).toJD();\n        var month = Math.floor(c / 30) + 1;\n        var day = c - (month - 1) * 30 + 1;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Coptic calendar implementation\nmain.calendars.coptic = CopticCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],546:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Discworld calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2016.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Discworld calendar - Unseen University version.\n    See also <a href=\"http://wiki.lspace.org/mediawiki/Discworld_calendar\">http://wiki.lspace.org/mediawiki/Discworld_calendar</a>\n    and <a href=\"http://discworld.wikia.com/wiki/Discworld_calendar\">http://discworld.wikia.com/wiki/Discworld_calendar</a>.\n    @class DiscworldCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction DiscworldCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nDiscworldCalendar.prototype = new main.baseCalendar;\n\nassign(DiscworldCalendar.prototype, {\n    /** The calendar name.\n        @memberof DiscworldCalendar */\n    name: 'Discworld',\n    /** Julian date of start of Discworld epoch: 1 January 0001 CE.\n        @memberof DiscworldCalendar */\n    jdEpoch: 1721425.5,\n    /** Days per month in a common year.\n        @memberof DiscworldCalendar */\n    daysPerMonth: [16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof DiscworldCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof DiscworldCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof DiscworldCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof DiscworldCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof DiscworldCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Discworld',\n            epochs: ['BUC', 'UC'],\n            monthNames: ['Ick', 'Offle', 'February', 'March', 'April', 'May', 'June',\n            'Grune', 'August', 'Spune', 'Sektober', 'Ember', 'December'],\n            monthNamesShort: ['Ick', 'Off', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Gru', 'Aug', 'Spu', 'Sek', 'Emb', 'Dec'],\n            dayNames: ['Sunday', 'Octeday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Oct', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Oc', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 2,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return false;\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return 13;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return 400;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 8) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1];\n    },\n\n    /** Retrieve the number of days in a week.\n        @memberof DiscworldCalendar\n        @return {number} The number of days. */\n    daysInWeek: function() {\n        return 8;\n    },\n\n    /** Retrieve the day of the week for a date.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The day of the week: 0 to number of days - 1.\n        @throws Error if an invalid date or a different calendar used. */\n    dayOfWeek: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        return (date.day() + 1) % 8;\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        var dow = this.dayOfWeek(year, month, day);\n        return (dow >= 2 && dow <= 6);\n    },\n\n    /** Retrieve additional information about a date.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {object} Additional information - contents depends on calendar.\n        @throws Error if an invalid date or a different calendar used. */\n    extraInfo: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        return {century: centuries[Math.floor((date.year() - 1) / 100) + 1] || ''};\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof DiscworldCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year() + (date.year() < 0 ? 1 : 0);\n        month = date.month();\n        day = date.day();\n        return day + (month > 1 ? 16 : 0) + (month > 2 ? (month - 2) * 32 : 0) +\n            (year - 1) * 400 + this.jdEpoch - 1;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof DiscworldCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd + 0.5) - Math.floor(this.jdEpoch) - 1;\n        var year = Math.floor(jd / 400) + 1;\n        jd -= (year - 1) * 400;\n        jd += (jd > 15 ? 16 : 0);\n        var month = Math.floor(jd / 32) + 1;\n        var day = jd - (month - 1) * 32 + 1;\n        return this.newDate(year <= 0 ? year - 1 : year, month, day);\n    }\n});\n\n// Names of the centuries\nvar centuries = {\n    20: 'Fruitbat',\n    21: 'Anchovy'\n};\n\n// Discworld calendar implementation\nmain.calendars.discworld = DiscworldCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],547:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Ethiopian calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) February 2010.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Ethiopian calendar.\n    See <a href=\"http://en.wikipedia.org/wiki/Ethiopian_calendar\">http://en.wikipedia.org/wiki/Ethiopian_calendar</a>.\n    See also Calendrical Calculations: The Millennium Edition\n    (<a href=\"http://emr.cs.iit.edu/home/reingold/calendar-book/index.shtml\">http://emr.cs.iit.edu/home/reingold/calendar-book/index.shtml</a>).\n    @class EthiopianCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction EthiopianCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nEthiopianCalendar.prototype = new main.baseCalendar;\n\nassign(EthiopianCalendar.prototype, {\n    /** The calendar name.\n        @memberof EthiopianCalendar */\n    name: 'Ethiopian',\n    /** Julian date of start of Ethiopian epoch: 27 August 8 CE (Gregorian).\n        @memberof EthiopianCalendar */\n    jdEpoch: 1724220.5,\n    /** Days per month in a common year.\n        @memberof EthiopianCalendar */\n    daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof EthiopianCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof EthiopianCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof EthiopianCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof EthiopianCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof EthiopianCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Ethiopian',\n            epochs: ['BEE', 'EE'],\n            monthNames: ['Meskerem', 'Tikemet', 'Hidar', 'Tahesas', 'Tir', 'Yekatit',\n            'Megabit', 'Miazia', 'Genbot', 'Sene', 'Hamle', 'Nehase', 'Pagume'],\n            monthNamesShort: ['Mes', 'Tik', 'Hid', 'Tah', 'Tir', 'Yek',\n            'Meg', 'Mia', 'Gen', 'Sen', 'Ham', 'Neh', 'Pag'],\n            dayNames: ['Ehud', 'Segno', 'Maksegno', 'Irob', 'Hamus', 'Arb', 'Kidame'],\n            dayNamesShort: ['Ehu', 'Seg', 'Mak', 'Iro', 'Ham', 'Arb', 'Kid'],\n            dayNamesMin: ['Eh', 'Se', 'Ma', 'Ir', 'Ha', 'Ar', 'Ki'],\n            digits: null,\n            dateFormat: 'dd/mm/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = date.year() + (date.year() < 0 ? 1 : 0); // No year zero\n        return year % 4 === 3 || year % 4 === -1;\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay,\n            main.local.invalidYear || main.regionalOptions[''].invalidYear);\n        return 13;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 13 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof EthiopianCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        if (year < 0) { year++; } // No year zero\n        return date.day() + (date.month() - 1) * 30 +\n            (year - 1) * 365 + Math.floor(year / 4) + this.jdEpoch - 1;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof EthiopianCalendar\n        @param jd {number} the Julian date to convert.\n        @return {CDate} the equivalent date. */\n    fromJD: function(jd) {\n        var c = Math.floor(jd) + 0.5 - this.jdEpoch;\n        var year = Math.floor((c - Math.floor((c + 366) / 1461)) / 365) + 1;\n        if (year <= 0) { year--; } // No year zero\n        c = Math.floor(jd) + 0.5 - this.newDate(year, 1, 1).toJD();\n        var month = Math.floor(c / 30) + 1;\n        var day = c - (month - 1) * 30 + 1;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Ethiopian calendar implementation\nmain.calendars.ethiopian = EthiopianCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],548:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Hebrew calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Hebrew civil calendar.\n    Based on code from <a href=\"http://www.fourmilab.ch/documents/calendar/\">http://www.fourmilab.ch/documents/calendar/</a>.\n    See also <a href=\"http://en.wikipedia.org/wiki/Hebrew_calendar\">http://en.wikipedia.org/wiki/Hebrew_calendar</a>.\n    @class HebrewCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction HebrewCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nHebrewCalendar.prototype = new main.baseCalendar;\n\nassign(HebrewCalendar.prototype, {\n    /** The calendar name.\n        @memberof HebrewCalendar */\n    name: 'Hebrew',\n    /** Julian date of start of Hebrew epoch: 7 October 3761 BCE.\n        @memberof HebrewCalendar */\n    jdEpoch: 347995.5,\n    /** Days per month in a common year.\n        @memberof HebrewCalendar */\n    daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof HebrewCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof HebrewCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof HebrewCalendar */\n    firstMonth: 7,\n    /** The minimum day number.\n        @memberof HebrewCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof HebrewCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Hebrew',\n            epochs: ['BAM', 'AM'],\n            monthNames: ['Nisan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul',\n            'Tishrei', 'Cheshvan', 'Kislev', 'Tevet', 'Shevat', 'Adar', 'Adar II'],\n            monthNamesShort: ['Nis', 'Iya', 'Siv', 'Tam', 'Av', 'Elu', 'Tis', 'Che', 'Kis', 'Tev', 'She', 'Ada', 'Ad2'],\n            dayNames: ['Yom Rishon', 'Yom Sheni', 'Yom Shlishi', 'Yom Revi\\'i', 'Yom Chamishi', 'Yom Shishi', 'Yom Shabbat'],\n            dayNamesShort: ['Ris', 'She', 'Shl', 'Rev', 'Cha', 'Shi', 'Sha'],\n            dayNamesMin: ['Ri','She','Shl','Re','Ch','Shi','Sha'],\n            digits: null,\n            dateFormat: 'dd/mm/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return this._leapYear(date.year());\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof HebrewCalendar\n        @private\n        @param year {number} The year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    _leapYear: function(year) {\n        year = (year < 0 ? year + 1 : year);\n        return mod(year * 7 + 1, 19) < 7;\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return this._leapYear(year.year ? year.year() : year) ? 13 : 12;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        year = date.year();\n        return this.toJD((year === -1 ? +1 : year + 1), 7, 1) - this.toJD(year, 7, 1);\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        if (year.year) {\n            month = year.month();\n            year = year.year();\n        }\n        this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return (month === 12 && this.leapYear(year) ? 30 : // Adar I\n                (month === 8 && mod(this.daysInYear(year), 10) === 5 ? 30 : // Cheshvan in shlemah year\n                (month === 9 && mod(this.daysInYear(year), 10) === 3 ? 29 : // Kislev in chaserah year\n                this.daysPerMonth[month - 1])));\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return this.dayOfWeek(year, month, day) !== 6;\n    },\n\n    /** Retrieve additional information about a date - year type.\n        @memberof HebrewCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {object} Additional information - contents depends on calendar.\n        @throws Error if an invalid date or a different calendar used. */\n    extraInfo: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        return {yearType: (this.leapYear(date) ? 'embolismic' : 'common') + ' ' +\n            ['deficient', 'regular', 'complete'][this.daysInYear(date) % 10 - 3]};\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof HebrewCalendar\n        @param year {CDate)|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        month = date.month();\n        day = date.day();\n        var adjYear = (year <= 0 ? year + 1 : year);\n        var jd = this.jdEpoch + this._delay1(adjYear) +\n            this._delay2(adjYear) + day + 1;\n        if (month < 7) {\n            for (var m = 7; m <= this.monthsInYear(year); m++) {\n                jd += this.daysInMonth(year, m);\n            }\n            for (var m = 1; m < month; m++) {\n                jd += this.daysInMonth(year, m);\n            }\n        }\n        else {\n            for (var m = 7; m < month; m++) {\n                jd += this.daysInMonth(year, m);\n            }\n        }\n        return jd;\n    },\n\n    /** Test for delay of start of new year and to avoid\n        Sunday, Wednesday, or Friday as start of the new year.\n        @memberof HebrewCalendar\n        @private\n        @param year {number} The year to examine.\n        @return {number} The days to offset by. */\n    _delay1: function(year) {\n        var months = Math.floor((235 * year - 234) / 19);\n        var parts = 12084 + 13753 * months;\n        var day = months * 29 + Math.floor(parts / 25920);\n        if (mod(3 * (day + 1), 7) < 3) {\n            day++;\n        }\n        return day;\n    },\n\n    /** Check for delay in start of new year due to length of adjacent years.\n        @memberof HebrewCalendar\n        @private\n        @param year {number} The year to examine.\n        @return {number} The days to offset by. */\n    _delay2: function(year) {\n        var last = this._delay1(year - 1);\n        var present = this._delay1(year);\n        var next = this._delay1(year + 1);\n        return ((next - present) === 356 ? 2 : ((present - last) === 382 ? 1 : 0));\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof HebrewCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd) + 0.5;\n        var year = Math.floor(((jd - this.jdEpoch) * 98496.0) / 35975351.0) - 1;\n        while (jd >= this.toJD((year === -1 ? +1 : year + 1), 7, 1)) {\n            year++;\n        }\n        var month = (jd < this.toJD(year, 1, 1)) ? 7 : 1;\n        while (jd > this.toJD(year, month, this.daysInMonth(year, month))) {\n            month++;\n        }\n        var day = jd - this.toJD(year, month, 1) + 1;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Modulus function which works for non-integers.\nfunction mod(a, b) {\n    return a - (b * Math.floor(a / b));\n}\n\n// Hebrew calendar implementation\nmain.calendars.hebrew = HebrewCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],549:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Islamic calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Islamic or '16 civil' calendar.\n    Based on code from <a href=\"http://www.iranchamber.com/calendar/converter/iranian_calendar_converter.php\">http://www.iranchamber.com/calendar/converter/iranian_calendar_converter.php</a>.\n    See also <a href=\"http://en.wikipedia.org/wiki/Islamic_calendar\">http://en.wikipedia.org/wiki/Islamic_calendar</a>.\n    @class IslamicCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction IslamicCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nIslamicCalendar.prototype = new main.baseCalendar;\n\nassign(IslamicCalendar.prototype, {\n    /** The calendar name.\n        @memberof IslamicCalendar */\n    name: 'Islamic',\n    /** Julian date of start of Islamic epoch: 16 July 622 CE.\n        @memberof IslamicCalendar */\n    jdEpoch: 1948439.5,\n    /** Days per month in a common year.\n        @memberof IslamicCalendar */\n    daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof IslamicCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof IslamicCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof IslamicCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof IslamicCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof IslamicCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Islamic',\n            epochs: ['BH', 'AH'],\n            monthNames: ['Muharram', 'Safar', 'Rabi\\' al-awwal', 'Rabi\\' al-thani', 'Jumada al-awwal', 'Jumada al-thani',\n            'Rajab', 'Sha\\'aban', 'Ramadan', 'Shawwal', 'Dhu al-Qi\\'dah', 'Dhu al-Hijjah'],\n            monthNamesShort: ['Muh', 'Saf', 'Rab1', 'Rab2', 'Jum1', 'Jum2', 'Raj', 'Sha\\'', 'Ram', 'Shaw', 'DhuQ', 'DhuH'],\n            dayNames: ['Yawm al-ahad', 'Yawm al-ithnayn', 'Yawm ath-thulaathaa\\'',\n            'Yawm al-arbi\\'aa\\'', 'Yawm al-khamīs', 'Yawm al-jum\\'a', 'Yawm as-sabt'],\n            dayNamesShort: ['Aha', 'Ith', 'Thu', 'Arb', 'Kha', 'Jum', 'Sab'],\n            dayNamesMin: ['Ah','It','Th','Ar','Kh','Ju','Sa'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 6,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return (date.year() * 11 + 14) % 30 < 11;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        return (this.leapYear(year) ? 355 : 354);\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 12 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return this.dayOfWeek(year, month, day) !== 5;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof IslamicCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        month = date.month();\n        day = date.day();\n        year = (year <= 0 ? year + 1 : year);\n        return day + Math.ceil(29.5 * (month - 1)) + (year - 1) * 354 +\n            Math.floor((3 + (11 * year)) / 30) + this.jdEpoch - 1;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof IslamicCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd) + 0.5;\n        var year = Math.floor((30 * (jd - this.jdEpoch) + 10646) / 10631);\n        year = (year <= 0 ? year - 1 : year);\n        var month = Math.min(12, Math.ceil((jd - 29 - this.toJD(year, 1, 1)) / 29.5) + 1);\n        var day = jd - this.toJD(year, month, 1) + 1;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Islamic (16 civil) calendar implementation\nmain.calendars.islamic = IslamicCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],550:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Julian calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Julian calendar.\n    Based on code from <a href=\"http://www.fourmilab.ch/documents/calendar/\">http://www.fourmilab.ch/documents/calendar/</a>.\n    See also <a href=\"http://en.wikipedia.org/wiki/Julian_calendar\">http://en.wikipedia.org/wiki/Julian_calendar</a>.\n    @class JulianCalendar\n    @augments BaseCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction JulianCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nJulianCalendar.prototype = new main.baseCalendar;\n\nassign(JulianCalendar.prototype, {\n    /** The calendar name.\n        @memberof JulianCalendar */\n    name: 'Julian',\n    /** Julian date of start of Julian epoch: 1 January 0001 AD = 30 December 0001 BCE.\n        @memberof JulianCalendar */\n    jdEpoch: 1721423.5,\n    /** Days per month in a common year.\n        @memberof JulianCalendar */\n    daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof JulianCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof JulianCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof JulianCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof JulianCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof JulianCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Julian',\n            epochs: ['BC', 'AD'],\n            monthNames: ['January', 'February', 'March', 'April', 'May', 'June',\n            'July', 'August', 'September', 'October', 'November', 'December'],\n            monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n            dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'mm/dd/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof JulianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = (date.year() < 0 ? date.year() + 1 : date.year()); // No year zero\n        return (year % 4) === 0;\n    },\n\n    /** Determine the week of the year for a date - ISO 8601.\n        @memberof JulianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Thursday of this week starting on Monday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(4 - (checkDate.dayOfWeek() || 7), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof JulianCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 2 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof JulianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} True if a week day, false if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof JulianCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        month = date.month();\n        day = date.day();\n        if (year < 0) { year++; } // No year zero\n        // Jean Meeus algorithm, \"Astronomical Algorithms\", 1991\n        if (month <= 2) {\n            year--;\n            month += 12;\n        }\n        return Math.floor(365.25 * (year + 4716)) +\n            Math.floor(30.6001 * (month + 1)) + day - 1524.5;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof JulianCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        // Jean Meeus algorithm, \"Astronomical Algorithms\", 1991\n        var a = Math.floor(jd + 0.5);\n        var b = a + 1524;\n        var c = Math.floor((b - 122.1) / 365.25);\n        var d = Math.floor(365.25 * c);\n        var e = Math.floor((b - d) / 30.6001);\n        var month = e - Math.floor(e < 14 ? 1 : 13);\n        var year = c - Math.floor(month > 2 ? 4716 : 4715);\n        var day = b - d - Math.floor(30.6001 * e);\n        if (year <= 0) { year--; } // No year zero\n        return this.newDate(year, month, day);\n    }\n});\n\n// Julian calendar implementation\nmain.calendars.julian = JulianCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],551:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Mayan calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Mayan Long Count calendar.\n    See also <a href=\"http://en.wikipedia.org/wiki/Mayan_calendar\">http://en.wikipedia.org/wiki/Mayan_calendar</a>.\n    @class MayanCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction MayanCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nMayanCalendar.prototype = new main.baseCalendar;\n\nassign(MayanCalendar.prototype, {\n    /** The calendar name.\n        @memberof MayanCalendar */\n    name: 'Mayan',\n    /** Julian date of start of Mayan epoch: 11 August 3114 BCE.\n        @memberof MayanCalendar */\n    jdEpoch: 584282.5,\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof MayanCalendar */\n    hasYearZero: true,\n    /** The minimum month number.\n        @memberof MayanCalendar */\n    minMonth: 0,\n    /** The first month in the year.\n        @memberof MayanCalendar */\n    firstMonth: 0,\n    /** The minimum day number.\n        @memberof MayanCalendar */\n    minDay: 0,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof MayanCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left.\n        @property haabMonths {string[]} The names of the Haab months.\n        @property tzolkinMonths {string[]} The names of the Tzolkin months. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Mayan',\n            epochs: ['', ''],\n            monthNames: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n            '10', '11', '12', '13', '14', '15', '16', '17'],\n            monthNamesShort: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n            '10', '11', '12', '13', '14', '15', '16', '17'],\n            dayNames: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n            '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'],\n            dayNamesShort: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n            '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'],\n            dayNamesMin: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n            '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'],\n            digits: null,\n            dateFormat: 'YYYY.m.d',\n            firstDay: 0,\n            isRTL: false,\n            haabMonths: ['Pop', 'Uo', 'Zip', 'Zotz', 'Tzec', 'Xul', 'Yaxkin', 'Mol', 'Chen', 'Yax',\n            'Zac', 'Ceh', 'Mac', 'Kankin', 'Muan', 'Pax', 'Kayab', 'Cumku', 'Uayeb'],\n            tzolkinMonths: ['Imix', 'Ik', 'Akbal', 'Kan', 'Chicchan', 'Cimi', 'Manik', 'Lamat', 'Muluc', 'Oc',\n            'Chuen', 'Eb', 'Ben', 'Ix', 'Men', 'Cib', 'Caban', 'Etznab', 'Cauac', 'Ahau']\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return false;\n    },\n\n    /** Format the year, if not a simple sequential number.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to format or the year to format.\n        @return {string} The formatted year.\n        @throws Error if an invalid year or a different calendar used. */\n    formatYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        year = date.year();\n        var baktun = Math.floor(year / 400);\n        year = year % 400;\n        year += (year < 0 ? 400 : 0);\n        var katun = Math.floor(year / 20);\n        return baktun + '.' + katun + '.' + (year % 20);\n    },\n\n    /** Convert from the formatted year back to a single number.\n        @memberof MayanCalendar\n        @param years {string} The year as n.n.n.\n        @return {number} The sequential year.\n        @throws Error if an invalid value is supplied. */\n    forYear: function(years) {\n        years = years.split('.');\n        if (years.length < 3) {\n            throw 'Invalid Mayan year';\n        }\n        var year = 0;\n        for (var i = 0; i < years.length; i++) {\n            var y = parseInt(years[i], 10);\n            if (Math.abs(y) > 19 || (i > 0 && y < 0)) {\n                throw 'Invalid Mayan year';\n            }\n            year = year * 20 + y;\n        }\n        return year;\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return 18;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        this._validate(year, month, day, main.local.invalidDate);\n        return 0;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return 360;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return 20;\n    },\n\n    /** Retrieve the number of days in a week.\n        @memberof MayanCalendar\n        @return {number} The number of days. */\n    daysInWeek: function() {\n        return 5; // Just for formatting\n    },\n\n    /** Retrieve the day of the week for a date.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The day of the week: 0 to number of days - 1.\n        @throws Error if an invalid date or a different calendar used. */\n    dayOfWeek: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        return date.day();\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        this._validate(year, month, day, main.local.invalidDate);\n        return true;\n    },\n\n    /** Retrieve additional information about a date - Haab and Tzolkin equivalents.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {object} Additional information - contents depends on calendar.\n        @throws Error if an invalid date or a different calendar used. */\n    extraInfo: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        var jd = date.toJD();\n        var haab = this._toHaab(jd);\n        var tzolkin = this._toTzolkin(jd);\n        return {haabMonthName: this.local.haabMonths[haab[0] - 1],\n            haabMonth: haab[0], haabDay: haab[1],\n            tzolkinDayName: this.local.tzolkinMonths[tzolkin[0] - 1],\n            tzolkinDay: tzolkin[0], tzolkinTrecena: tzolkin[1]};\n    },\n\n    /** Retrieve Haab date from a Julian date.\n        @memberof MayanCalendar\n        @private\n        @param jd  {number} The Julian date.\n        @return {number[]} Corresponding Haab month and day. */\n    _toHaab: function(jd) {\n        jd -= this.jdEpoch;\n        var day = mod(jd + 8 + ((18 - 1) * 20), 365);\n        return [Math.floor(day / 20) + 1, mod(day, 20)];\n    },\n\n    /** Retrieve Tzolkin date from a Julian date.\n        @memberof MayanCalendar\n        @private\n        @param jd {number} The Julian date.\n        @return {number[]} Corresponding Tzolkin day and trecena. */\n    _toTzolkin: function(jd) {\n        jd -= this.jdEpoch;\n        return [amod(jd + 20, 20), amod(jd + 4, 13)];\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof MayanCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        return date.day() + (date.month() * 20) + (date.year() * 360) + this.jdEpoch;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof MayanCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd) + 0.5 - this.jdEpoch;\n        var year = Math.floor(jd / 360);\n        jd = jd % 360;\n        jd += (jd < 0 ? 360 : 0);\n        var month = Math.floor(jd / 20);\n        var day = jd % 20;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Modulus function which works for non-integers.\nfunction mod(a, b) {\n    return a - (b * Math.floor(a / b));\n}\n\n// Modulus function which returns numerator if modulus is zero.\nfunction amod(a, b) {\n    return mod(a - 1, b) + 1;\n}\n\n// Mayan calendar implementation\nmain.calendars.mayan = MayanCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],552:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* http://keith-wood.name/calendars.html\n   Nanakshahi calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2016.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Nanakshahi calendar.\n    See also <a href=\"https://en.wikipedia.org/wiki/Nanakshahi_calendar\">https://en.wikipedia.org/wiki/Nanakshahi_calendar</a>.\n    @class NanakshahiCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction NanakshahiCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nNanakshahiCalendar.prototype = new main.baseCalendar;\n\nvar gregorian = main.instance('gregorian');\n\nassign(NanakshahiCalendar.prototype, {\n    /** The calendar name.\n        @memberof NanakshahiCalendar */\n    name: 'Nanakshahi',\n    /** Julian date of start of Nanakshahi epoch: 14 March 1469 CE.\n        @memberof NanakshahiCalendar */\n    jdEpoch: 2257673.5,\n    /** Days per month in a common year.\n        @memberof NanakshahiCalendar */\n    daysPerMonth: [31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 30, 30],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof NanakshahiCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof NanakshahiCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof NanakshahiCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof NanakshahiCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof NanakshahiCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Nanakshahi',\n            epochs: ['BN', 'AN'],\n            monthNames: ['Chet', 'Vaisakh', 'Jeth', 'Harh', 'Sawan', 'Bhadon',\n            'Assu', 'Katak', 'Maghar', 'Poh', 'Magh', 'Phagun'],\n            monthNamesShort: ['Che', 'Vai', 'Jet', 'Har', 'Saw', 'Bha', 'Ass', 'Kat', 'Mgr', 'Poh', 'Mgh', 'Pha'],\n            dayNames: ['Somvaar', 'Mangalvar', 'Budhvaar', 'Veervaar', 'Shukarvaar', 'Sanicharvaar', 'Etvaar'],\n            dayNamesShort: ['Som', 'Mangal', 'Budh', 'Veer', 'Shukar', 'Sanichar', 'Et'],\n            dayNamesMin: ['So', 'Ma', 'Bu', 'Ve', 'Sh', 'Sa', 'Et'],\n            digits: null,\n            dateFormat: 'dd-mm-yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof NanakshahiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay,\n            main.local.invalidYear || main.regionalOptions[''].invalidYear);\n        return gregorian.leapYear(date.year() + (date.year() < 1 ? 1 : 0) + 1469);\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof NanakshahiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Monday of this week starting on Monday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(1 - (checkDate.dayOfWeek() || 7), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof NanakshahiCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 12 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof NanakshahiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof NanakshahiCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidMonth);\n        var year = date.year();\n        if (year < 0) { year++; } // No year zero\n        var doy = date.day();\n        for (var m = 1; m < date.month(); m++) {\n            doy += this.daysPerMonth[m - 1];\n        }\n        return doy + gregorian.toJD(year + 1468, 3, 13);\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof NanakshahiCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd + 0.5);\n        var year = Math.floor((jd - (this.jdEpoch - 1)) / 366);\n        while (jd >= this.toJD(year + 1, 1, 1)) {\n            year++;\n        }\n        var day = jd - Math.floor(this.toJD(year, 1, 1) + 0.5) + 1;\n        var month = 1;\n        while (day > this.daysInMonth(year, month)) {\n            day -= this.daysInMonth(year, month);\n            month++;\n        }\n        return this.newDate(year, month, day);\n    }\n});\n\n// Nanakshahi calendar implementation\nmain.calendars.nanakshahi = NanakshahiCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],553:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Nepali calendar for jQuery v2.0.2.\n   Written by Artur Neumann (ict.projects{at}nepal.inf.org) April 2013.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Nepali civil calendar.\n    Based on the ideas from \n    <a href=\"http://codeissue.com/articles/a04e050dea7468f/algorithm-to-convert-english-date-to-nepali-date-using-c-net\">http://codeissue.com/articles/a04e050dea7468f/algorithm-to-convert-english-date-to-nepali-date-using-c-net</a>\n    and <a href=\"http://birenj2ee.blogspot.com/2011/04/nepali-calendar-in-java.html\">http://birenj2ee.blogspot.com/2011/04/nepali-calendar-in-java.html</a>\n    See also <a href=\"http://en.wikipedia.org/wiki/Nepali_calendar\">http://en.wikipedia.org/wiki/Nepali_calendar</a>\n    and <a href=\"https://en.wikipedia.org/wiki/Bikram_Samwat\">https://en.wikipedia.org/wiki/Bikram_Samwat</a>.\n    @class NepaliCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction NepaliCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nNepaliCalendar.prototype = new main.baseCalendar;\n\nassign(NepaliCalendar.prototype, {\n    /** The calendar name.\n        @memberof NepaliCalendar */\n    name: 'Nepali',\n    /** Julian date of start of Nepali epoch: 14 April 57 BCE.\n        @memberof NepaliCalendar */\n    jdEpoch: 1700709.5,\n    /** Days per month in a common year.\n        @memberof NepaliCalendar */\n    daysPerMonth: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof NepaliCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof NepaliCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof NepaliCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof NepaliCalendar */\n    minDay: 1, \n    /** The number of days in the year.\n        @memberof NepaliCalendar */\n    daysPerYear: 365,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof NepaliCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Nepali',\n            epochs: ['BBS', 'ABS'],\n            monthNames: ['Baisakh', 'Jestha', 'Ashadh', 'Shrawan', 'Bhadra', 'Ashwin',\n            'Kartik', 'Mangsir', 'Paush', 'Mangh', 'Falgun', 'Chaitra'],\n            monthNamesShort: ['Bai', 'Je', 'As', 'Shra', 'Bha', 'Ash', 'Kar', 'Mang', 'Pau', 'Ma', 'Fal', 'Chai'],\n            dayNames: ['Aaitabaar', 'Sombaar', 'Manglbaar', 'Budhabaar', 'Bihibaar', 'Shukrabaar', 'Shanibaar'],\n            dayNamesShort: ['Aaita', 'Som', 'Mangl', 'Budha', 'Bihi', 'Shukra', 'Shani'],\n            dayNamesMin: ['Aai', 'So', 'Man', 'Bu', 'Bi', 'Shu', 'Sha'],\n            digits: null,\n            dateFormat: 'dd/mm/yyyy',\n            firstDay: 1,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof NepaliCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        return this.daysInYear(year) !== this.daysPerYear;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof NepaliCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof NepaliCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        year = date.year();\n        if (typeof this.NEPALI_CALENDAR_DATA[year] === 'undefined') {\n            return this.daysPerYear;\n        }\n        var daysPerYear = 0;\n        for (var month_number = this.minMonth; month_number <= 12; month_number++) {\n            daysPerYear += this.NEPALI_CALENDAR_DATA[year][month_number];\n        }\n        return daysPerYear;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof NepaliCalendar\n        @param year {CDate|number| The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        if (year.year) {\n            month = year.month();\n            year = year.year();\n        }\n        this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return (typeof this.NEPALI_CALENDAR_DATA[year] === 'undefined' ?\n            this.daysPerMonth[month - 1] : this.NEPALI_CALENDAR_DATA[year][month]);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof NepaliCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return this.dayOfWeek(year, month, day) !== 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof NepaliCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(nepaliYear, nepaliMonth, nepaliDay) {\n        var date = this._validate(nepaliYear, nepaliMonth, nepaliDay, main.local.invalidDate);\n        nepaliYear = date.year();\n        nepaliMonth = date.month();\n        nepaliDay = date.day();\n        var gregorianCalendar = main.instance();\n        var gregorianDayOfYear = 0; // We will add all the days that went by since\n        // the 1st. January and then we can get the Gregorian Date\n        var nepaliMonthToCheck = nepaliMonth;\n        var nepaliYearToCheck = nepaliYear;\n        this._createMissingCalendarData(nepaliYear);\n        // Get the correct year\n        var gregorianYear = nepaliYear - (nepaliMonthToCheck > 9 || (nepaliMonthToCheck === 9 &&\n            nepaliDay >= this.NEPALI_CALENDAR_DATA[nepaliYearToCheck][0]) ? 56 : 57);\n        // First we add the amount of days in the actual Nepali month as the day of year in the\n        // Gregorian one because at least this days are gone since the 1st. Jan. \n        if (nepaliMonth !== 9) {\n            gregorianDayOfYear = nepaliDay;\n            nepaliMonthToCheck--;\n        }\n        // Now we loop throw all Nepali month and add the amount of days to gregorianDayOfYear \n        // we do this till we reach Paush (9th month). 1st. January always falls in this month  \n        while (nepaliMonthToCheck !== 9) {\n            if (nepaliMonthToCheck <= 0) {\n                nepaliMonthToCheck = 12;\n                nepaliYearToCheck--;\n            }                \n            gregorianDayOfYear += this.NEPALI_CALENDAR_DATA[nepaliYearToCheck][nepaliMonthToCheck];\n            nepaliMonthToCheck--;\n        }        \n        // If the date that has to be converted is in Paush (month no. 9) we have to do some other calculation\n        if (nepaliMonth === 9) {\n            // Add the days that are passed since the first day of Paush and substract the\n            // amount of days that lie between 1st. Jan and 1st Paush\n            gregorianDayOfYear += nepaliDay - this.NEPALI_CALENDAR_DATA[nepaliYearToCheck][0];\n            // For the first days of Paush we are now in negative values,\n            // because in the end of the gregorian year we substract\n            // 365 / 366 days (P.S. remember math in school + - gives -)\n            if (gregorianDayOfYear < 0) {\n                gregorianDayOfYear += gregorianCalendar.daysInYear(gregorianYear);\n            }\n        }\n        else {\n            gregorianDayOfYear += this.NEPALI_CALENDAR_DATA[nepaliYearToCheck][9] -\n                this.NEPALI_CALENDAR_DATA[nepaliYearToCheck][0];\n        }        \n        return gregorianCalendar.newDate(gregorianYear, 1 ,1).add(gregorianDayOfYear, 'd').toJD();\n    },\n    \n    /** Create a new date from a Julian date.\n        @memberof NepaliCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        var gregorianCalendar =  main.instance();\n        var gregorianDate = gregorianCalendar.fromJD(jd);\n        var gregorianYear = gregorianDate.year();\n        var gregorianDayOfYear = gregorianDate.dayOfYear();\n        var nepaliYear = gregorianYear + 56; //this is not final, it could be also +57 but +56 is always true for 1st Jan.\n        this._createMissingCalendarData(nepaliYear);\n        var nepaliMonth = 9; // Jan 1 always fall in Nepali month Paush which is the 9th month of Nepali calendar.\n        // Get the Nepali day in Paush (month 9) of 1st January \n        var dayOfFirstJanInPaush = this.NEPALI_CALENDAR_DATA[nepaliYear][0];\n        // Check how many days are left of Paush .\n        // Days calculated from 1st Jan till the end of the actual Nepali month, \n        // we use this value to check if the gregorian Date is in the actual Nepali month.\n        var daysSinceJanFirstToEndOfNepaliMonth =\n            this.NEPALI_CALENDAR_DATA[nepaliYear][nepaliMonth] - dayOfFirstJanInPaush + 1;\n        // If the gregorian day-of-year is smaller o equal than the sum of days between the 1st January and \n        // the end of the actual nepali month we found the correct nepali month.\n        // Example: \n        // The 4th February 2011 is the gregorianDayOfYear 35 (31 days of January + 4)\n        // 1st January 2011 is in the nepali year 2067, where 1st. January is in the 17th day of Paush (9th month)\n        // In 2067 Paush has 30days, This means (30-17+1=14) there are 14days between 1st January and end of Paush \n        // (including 17th January)\n        // The gregorianDayOfYear (35) is bigger than 14, so we check the next month\n        // The next nepali month (Mangh) has 29 days \n        // 29+14=43, this is bigger than gregorianDayOfYear(35) so, we found the correct nepali month\n        while (gregorianDayOfYear > daysSinceJanFirstToEndOfNepaliMonth) {\n            nepaliMonth++;\n            if (nepaliMonth > 12) {\n                nepaliMonth = 1;\n                nepaliYear++;\n            }    \n            daysSinceJanFirstToEndOfNepaliMonth += this.NEPALI_CALENDAR_DATA[nepaliYear][nepaliMonth];\n        }\n        // The last step is to calculate the nepali day-of-month\n        // to continue our example from before:\n        // we calculated there are 43 days from 1st. January (17 Paush) till end of Mangh (29 days)\n        // when we subtract from this 43 days the day-of-year of the the Gregorian date (35),\n        // we know how far the searched day is away from the end of the Nepali month.\n        // So we simply subtract this number from the amount of days in this month (30) \n        var nepaliDayOfMonth = this.NEPALI_CALENDAR_DATA[nepaliYear][nepaliMonth] -\n            (daysSinceJanFirstToEndOfNepaliMonth - gregorianDayOfYear);        \n        return this.newDate(nepaliYear, nepaliMonth, nepaliDayOfMonth);\n    },\n    \n    /** Creates missing data in the NEPALI_CALENDAR_DATA table.\n        This data will not be correct but just give an estimated result. Mostly -/+ 1 day\n        @private\n        @param nepaliYear {number} The missing year number. */\n    _createMissingCalendarData: function(nepaliYear) {\n        var tmp_calendar_data = this.daysPerMonth.slice(0);\n        tmp_calendar_data.unshift(17);\n        for (var nepaliYearToCreate = (nepaliYear - 1); nepaliYearToCreate < (nepaliYear + 2); nepaliYearToCreate++) {\n            if (typeof this.NEPALI_CALENDAR_DATA[nepaliYearToCreate] === 'undefined') {\n                this.NEPALI_CALENDAR_DATA[nepaliYearToCreate] = tmp_calendar_data;\n            }\n        }\n    },\n    \n    NEPALI_CALENDAR_DATA:  {\n        // These data are from http://www.ashesh.com.np\n        1970: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1971: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],\n        1972: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        1973: [19, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        1974: [19, 31, 31, 32, 30, 31, 31, 30, 29, 30, 29, 30, 30],\n        1975: [18, 31, 31, 32, 32, 30, 31, 30, 29, 30, 29, 30, 30],\n        1976: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        1977: [18, 31, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31],\n        1978: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1979: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        1980: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        1981: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        1982: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1983: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        1984: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        1985: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        1986: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1987: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        1988: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        1989: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        1990: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1991: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],    \n        // These data are from http://nepalicalendar.rat32.com/index.php\n        1992: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        1993: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        1994: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1995: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        1996: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        1997: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1998: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        1999: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2000: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2001: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2002: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2003: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2004: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2005: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2006: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2007: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2008: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],\n        2009: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2010: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2011: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2012: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        2013: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2014: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2015: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2016: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        2017: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2018: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2019: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2020: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2021: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2022: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        2023: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2024: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2025: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2026: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2027: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2028: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2029: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],\n        2030: [17, 31, 32, 31, 32, 31, 30, 30, 30, 30, 30, 30, 31],\n        2031: [17, 31, 32, 31, 32, 31, 31, 31, 31, 31, 31, 31, 31],\n        2032: [17, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32],\n        2033: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2034: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2035: [17, 30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],\n        2036: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2037: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2038: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2039: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        2040: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2041: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2042: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2043: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        2044: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2045: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2046: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2047: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2048: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2049: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        2050: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2051: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2052: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2053: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        2054: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2055: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 29, 30],\n        2056: [17, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],\n        2057: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2058: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2059: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2060: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2061: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2062: [17, 30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31],\n        2063: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2064: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2065: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2066: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],\n        2067: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2068: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2069: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2070: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],\n        2071: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2072: [17, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2073: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],\n        2074: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2075: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2076: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        2077: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],\n        2078: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],\n        2079: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],\n        2080: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],\n        // These data are from http://www.ashesh.com.np/nepali-calendar/\n        2081: [17, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2082: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2083: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],\n        2084: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],\n        2085: [17, 31, 32, 31, 32, 31, 31, 30, 30, 29, 30, 30, 30],\n        2086: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2087: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30],\n        2088: [16, 30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30],\n        2089: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2090: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2091: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30],\n        2092: [16, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2093: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2094: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],\n        2095: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30],\n        2096: [17, 30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],\n        2097: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],\n        2098: [17, 31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 30, 31],\n        2099: [17, 31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30],\n        2100: [17, 31, 32, 31, 32, 30, 31, 30, 29, 30, 29, 30, 30]    \n    }\n});    \n\n// Nepali calendar implementation\nmain.calendars.nepali = NepaliCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],554:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Persian calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the Persian or Jalali calendar.\n    Based on code from <a href=\"http://www.iranchamber.com/calendar/converter/iranian_calendar_converter.php\">http://www.iranchamber.com/calendar/converter/iranian_calendar_converter.php</a>.\n    See also <a href=\"http://en.wikipedia.org/wiki/Iranian_calendar\">http://en.wikipedia.org/wiki/Iranian_calendar</a>.\n    @class PersianCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction PersianCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nPersianCalendar.prototype = new main.baseCalendar;\n\nassign(PersianCalendar.prototype, {\n    /** The calendar name.\n        @memberof PersianCalendar */\n    name: 'Persian',\n    /** Julian date of start of Persian epoch: 19 March 622 CE.\n        @memberof PersianCalendar */\n    jdEpoch: 1948320.5,\n    /** Days per month in a common year.\n        @memberof PersianCalendar */\n    daysPerMonth: [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof PersianCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof PersianCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof PersianCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof PersianCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof PersianCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Persian',\n            epochs: ['BP', 'AP'],\n            monthNames: ['Farvardin', 'Ordibehesht', 'Khordad', 'Tir', 'Mordad', 'Shahrivar',\n            'Mehr', 'Aban', 'Azar', 'Day', 'Bahman', 'Esfand'],\n            monthNamesShort: ['Far', 'Ord', 'Kho', 'Tir', 'Mor', 'Sha', 'Meh', 'Aba', 'Aza', 'Day', 'Bah', 'Esf'],\n            dayNames: ['Yekshambe', 'Doshambe', 'Seshambe', 'Chæharshambe', 'Panjshambe', 'Jom\\'e', 'Shambe'],\n            dayNamesShort: ['Yek', 'Do', 'Se', 'Chæ', 'Panj', 'Jom', 'Sha'],\n            dayNamesMin: ['Ye','Do','Se','Ch','Pa','Jo','Sh'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 6,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof PersianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return (((((date.year() - (date.year() > 0 ? 474 : 473)) % 2820) +\n            474 + 38) * 682) % 2816) < 682;\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof PersianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Saturday of this week starting on Saturday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-((checkDate.dayOfWeek() + 1) % 7), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof PersianCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 12 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof PersianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return this.dayOfWeek(year, month, day) !== 5;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof PersianCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        year = date.year();\n        month = date.month();\n        day = date.day();\n        var epBase = year - (year >= 0 ? 474 : 473);\n        var epYear = 474 + mod(epBase, 2820);\n        return day + (month <= 7 ? (month - 1) * 31 : (month - 1) * 30 + 6) +\n            Math.floor((epYear * 682 - 110) / 2816) + (epYear - 1) * 365 +\n            Math.floor(epBase / 2820) * 1029983 + this.jdEpoch - 1;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof PersianCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        jd = Math.floor(jd) + 0.5;\n        var depoch = jd - this.toJD(475, 1, 1);\n        var cycle = Math.floor(depoch / 1029983);\n        var cyear = mod(depoch, 1029983);\n        var ycycle = 2820;\n        if (cyear !== 1029982) {\n            var aux1 = Math.floor(cyear / 366);\n            var aux2 = mod(cyear, 366);\n            ycycle = Math.floor(((2134 * aux1) + (2816 * aux2) + 2815) / 1028522) + aux1 + 1;\n        }\n        var year = ycycle + (2820 * cycle) + 474;\n        year = (year <= 0 ? year - 1 : year);\n        var yday = jd - this.toJD(year, 1, 1) + 1;\n        var month = (yday <= 186 ? Math.ceil(yday / 31) : Math.ceil((yday - 6) / 30));\n        var day = jd - this.toJD(year, month, 1) + 1;\n        return this.newDate(year, month, day);\n    }\n});\n\n// Modulus function which works for non-integers.\nfunction mod(a, b) {\n    return a - (b * Math.floor(a / b));\n}\n\n// Persian (Jalali) calendar implementation\nmain.calendars.persian = PersianCalendar;\nmain.calendars.jalali = PersianCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],555:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Taiwanese (Minguo) calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) February 2010.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\nvar gregorianCalendar = main.instance();\n\n/** Implementation of the Taiwanese calendar.\n    See http://en.wikipedia.org/wiki/Minguo_calendar.\n    @class TaiwanCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction TaiwanCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nTaiwanCalendar.prototype = new main.baseCalendar;\n\nassign(TaiwanCalendar.prototype, {\n    /** The calendar name.\n        @memberof TaiwanCalendar */\n    name: 'Taiwan',\n    /** Julian date of start of Taiwan epoch: 1 January 1912 CE (Gregorian).\n        @memberof TaiwanCalendar */\n    jdEpoch: 2419402.5,\n    /** Difference in years between Taiwan and Gregorian calendars.\n        @memberof TaiwanCalendar */\n    yearsOffset: 1911,\n    /** Days per month in a common year.\n        @memberof TaiwanCalendar */\n    daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof TaiwanCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof TaiwanCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof TaiwanCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof TaiwanCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof TaiwanCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Taiwan',\n            epochs: ['BROC', 'ROC'],\n            monthNames: ['January', 'February', 'March', 'April', 'May', 'June',\n            'July', 'August', 'September', 'October', 'November', 'December'],\n            monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n            dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 1,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof TaiwanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.leapYear(year);\n    },\n\n    /** Determine the week of the year for a date - ISO 8601.\n        @memberof TaiwanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.weekOfYear(year, date.month(), date.day());\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof TaiwanCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 2 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof TaiwanCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof TaiwanCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.toJD(year, date.month(), date.day());\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof TaiwanCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        var date = gregorianCalendar.fromJD(jd);\n        var year = this._g2tYear(date.year());\n        return this.newDate(year, date.month(), date.day());\n    },\n\n    /** Convert Taiwanese to Gregorian year.\n        @memberof TaiwanCalendar\n        @private\n        @param year {number} The Taiwanese year.\n        @return {number} The corresponding Gregorian year. */\n    _t2gYear: function(year) {\n        return year + this.yearsOffset + (year >= -this.yearsOffset && year <= -1 ? 1 : 0);\n    },\n\n    /** Convert Gregorian to Taiwanese year.\n        @memberof TaiwanCalendar\n        @private\n        @param year {number} The Gregorian year.\n        @return {number} The corresponding Taiwanese year. */\n    _g2tYear: function(year) {\n        return year - this.yearsOffset - (year >= 1 && year <= this.yearsOffset ? 1 : 0);\n    }\n});\n\n// Taiwan calendar implementation\nmain.calendars.taiwan = TaiwanCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],556:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Thai calendar for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) February 2010.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\nvar gregorianCalendar = main.instance();\n\n/** Implementation of the Thai calendar.\n    See http://en.wikipedia.org/wiki/Thai_calendar.\n    @class ThaiCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction ThaiCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nThaiCalendar.prototype = new main.baseCalendar;\n\nassign(ThaiCalendar.prototype, {\n    /** The calendar name.\n        @memberof ThaiCalendar */\n    name: 'Thai',\n    /** Julian date of start of Thai epoch: 1 January 543 BCE (Gregorian).\n        @memberof ThaiCalendar */\n    jdEpoch: 1523098.5,\n    /** Difference in years between Thai and Gregorian calendars.\n        @memberof ThaiCalendar */\n    yearsOffset: 543, \n    /** Days per month in a common year.\n        @memberof ThaiCalendar */\n    daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof ThaiCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof ThaiCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof ThaiCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof ThaiCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof ThaiCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Thai',\n            epochs: ['BBE', 'BE'],\n            monthNames: ['January', 'February', 'March', 'April', 'May', 'June',\n            'July', 'August', 'September', 'October', 'November', 'December'],\n            monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n            dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'dd/mm/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof ThaiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.leapYear(year);\n    },\n\n    /** Determine the week of the year for a date - ISO 8601.\n        @memberof ThaiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.weekOfYear(year, date.month(), date.day());\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof ThaiCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 2 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof ThaiCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof ThaiCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        var year = this._t2gYear(date.year());\n        return gregorianCalendar.toJD(year, date.month(), date.day());\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof ThaiCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        var date = gregorianCalendar.fromJD(jd);\n        var year = this._g2tYear(date.year());\n        return this.newDate(year, date.month(), date.day());\n    },\n\n    /** Convert Thai to Gregorian year.\n        @memberof ThaiCalendar\n        @private\n        @param year {number} The Thai year.\n        @return {number} The corresponding Gregorian year. */\n    _t2gYear: function(year) {\n        return year - this.yearsOffset - (year >= 1 && year <= this.yearsOffset ? 1 : 0);\n    },\n\n    /** Convert Gregorian to Thai year.\n        @memberof ThaiCalendar\n        @private\n        @param year {number} The Gregorian year.\n        @return {number} The corresponding Thai year. */\n    _g2tYear: function(year) {\n        return year + this.yearsOffset + (year >= -this.yearsOffset && year <= -1 ? 1 : 0);\n    }\n});\n\n// Thai calendar implementation\nmain.calendars.thai = ThaiCalendar;\n\n\n},{\"../main\":558,\"object-assign\":449}],557:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   UmmAlQura calendar for jQuery v2.0.2.\n   Written by Amro Osama March 2013.\n   Modified by Binnooh.com & www.elm.sa - 2014 - Added dates back to 1276 Hijri year.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar main = _dereq_('../main');\nvar assign = _dereq_('object-assign');\n\n\n/** Implementation of the UmmAlQura or 'saudi' calendar.\n    See also <a href=\"http://en.wikipedia.org/wiki/Islamic_calendar#Saudi_Arabia.27s_Umm_al-Qura_calendar\">http://en.wikipedia.org/wiki/Islamic_calendar#Saudi_Arabia.27s_Umm_al-Qura_calendar</a>.\n    <a href=\"http://www.ummulqura.org.sa/About.aspx\">http://www.ummulqura.org.sa/About.aspx</a>\n    <a href=\"http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm\">http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm</a>\n    @class UmmAlQuraCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction UmmAlQuraCalendar(language) {\n    this.local = this.regionalOptions[language || ''] || this.regionalOptions[''];\n}\n\nUmmAlQuraCalendar.prototype = new main.baseCalendar;\n\nassign(UmmAlQuraCalendar.prototype, {\n    /** The calendar name.\n        @memberof UmmAlQuraCalendar */\n    name: 'UmmAlQura',\n    //jdEpoch: 1948440, // Julian date of start of UmmAlQura epoch: 14 March 1937 CE\n    //daysPerMonth: // Days per month in a common year, replaced by a method.\n    /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof UmmAlQuraCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof UmmAlQuraCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof UmmAlQuraCalendar */\n    firstMonth: 1,\n    /** The minimum day number.\n        @memberof UmmAlQuraCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof UmmAlQuraCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Umm al-Qura',\n            epochs: ['BH', 'AH'],\n            monthNames: ['Al-Muharram', 'Safar', 'Rabi\\' al-awwal', 'Rabi\\' Al-Thani', 'Jumada Al-Awwal', 'Jumada Al-Thani',\n            'Rajab', 'Sha\\'aban', 'Ramadan', 'Shawwal', 'Dhu al-Qi\\'dah', 'Dhu al-Hijjah'],\n            monthNamesShort: ['Muh', 'Saf', 'Rab1', 'Rab2', 'Jum1', 'Jum2', 'Raj', 'Sha\\'', 'Ram', 'Shaw', 'DhuQ', 'DhuH'],\n            dayNames: ['Yawm al-Ahad', 'Yawm al-Ithnain', 'Yawm al-Thalāthā’', 'Yawm al-Arba‘ā’', 'Yawm al-Khamīs', 'Yawm al-Jum‘a', 'Yawm al-Sabt'],\n            dayNamesMin: ['Ah', 'Ith', 'Th', 'Ar', 'Kh', 'Ju', 'Sa'],\n            digits: null,\n            dateFormat: 'yyyy/mm/dd',\n            firstDay: 6,\n            isRTL: true\n        }\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function (year) {\n        var date = this._validate(year, this.minMonth, this.minDay, main.local.invalidYear);\n        return (this.daysInYear(date.year()) === 355);\n    },\n\n    /** Determine the week of the year for a date.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function (year, month, day) {\n        // Find Sunday of this week starting on Sunday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(-checkDate.dayOfWeek(), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function (year) {\n        var daysCount = 0;\n        for (var i = 1; i <= 12; i++) {\n            daysCount += this.daysInMonth(year, i);\n        }\n        return daysCount;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function (year, month) {\n        var date = this._validate(year, month, this.minDay, main.local.invalidMonth);\n        var mcjdn = date.toJD() - 2400000 + 0.5; // Modified Chronological Julian Day Number (MCJDN)\n        // the MCJDN's of the start of the lunations in the Umm al-Qura calendar are stored in the 'ummalqura_dat' array\n        var index = 0;\n        for (var i = 0; i < ummalqura_dat.length; i++) {\n            if (ummalqura_dat[i] > mcjdn) {\n                return (ummalqura_dat[index] - ummalqura_dat[index - 1]);\n            }\n            index++;\n        }\n        return 30; // Unknown outside\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function (year, month, day) {\n        return this.dayOfWeek(year, month, day) !== 5;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof UmmAlQuraCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function (year, month, day) {\n        var date = this._validate(year, month, day, main.local.invalidDate);\n        var index = (12 * (date.year() - 1)) + date.month() - 15292;\n        var mcjdn = date.day() + ummalqura_dat[index - 1] - 1;\n        return mcjdn + 2400000 - 0.5; // Modified Chronological Julian Day Number (MCJDN)\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof UmmAlQuraCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function (jd) {\n        var mcjdn = jd - 2400000 + 0.5; // Modified Chronological Julian Day Number (MCJDN)\n        // the MCJDN's of the start of the lunations in the Umm al-Qura calendar \n        // are stored in the 'ummalqura_dat' array\n        var index = 0;\n        for (var i = 0; i < ummalqura_dat.length; i++) {\n            if (ummalqura_dat[i] > mcjdn) break;\n            index++;\n        }\n        var lunation = index + 15292; //UmmAlQura Lunation Number\n        var ii = Math.floor((lunation - 1) / 12);\n        var year = ii + 1;\n        var month = lunation - 12 * ii;\n        var day = mcjdn - ummalqura_dat[index - 1] + 1;\n        return this.newDate(year, month, day);\n    },\n\n    /** Determine whether a date is valid for this calendar.\n        @memberof UmmAlQuraCalendar\n        @param year {number} The year to examine.\n        @param month {number} The month to examine.\n        @param day {number} The day to examine.\n        @return {boolean} <code>true</code> if a valid date, <code>false</code> if not. */\n    isValid: function(year, month, day) {\n        var valid = main.baseCalendar.prototype.isValid.apply(this, arguments);\n        if (valid) {\n            year = (year.year != null ? year.year : year);\n            valid = (year >= 1276 && year <= 1500);\n        }\n        return valid;\n    },\n\n    /** Check that a candidate date is from the same calendar and is valid.\n        @memberof UmmAlQuraCalendar\n        @private\n        @param year {CDate|number} The date to validate or the year to validate.\n        @param month {number} The month to validate.\n        @param day {number} The day to validate.\n        @param error {string} Error message if invalid.\n        @throws Error if different calendars used or invalid date. */\n    _validate: function(year, month, day, error) {\n        var date = main.baseCalendar.prototype._validate.apply(this, arguments);\n        if (date.year < 1276 || date.year > 1500) {\n            throw error.replace(/\\{0\\}/, this.local.name);\n        }\n        return date;\n    }\n});\n\n// UmmAlQura calendar implementation\nmain.calendars.ummalqura = UmmAlQuraCalendar;\n\nvar ummalqura_dat = [\n    20,    50,    79,    109,   138,   168,   197,   227,   256,   286,   315,   345,   374,   404,   433,   463,   492,   522,   551,   581, \n    611,   641,   670,   700,   729,   759,   788,   818,   847,   877,   906,   936,   965,   995,   1024,  1054,  1083,  1113,  1142,  1172,\n    1201,  1231,  1260,  1290,  1320,  1350,  1379,  1409,  1438,  1468,  1497,  1527,  1556,  1586,  1615,  1645,  1674,  1704,  1733,  1763,\n    1792,  1822,  1851,  1881,  1910,  1940,  1969,  1999,  2028,  2058,  2087,  2117,  2146,  2176,  2205,  2235,  2264,  2294,  2323,  2353,\n    2383,  2413,  2442,  2472,  2501,  2531,  2560,  2590,  2619,  2649,  2678,  2708,  2737,  2767,  2796,  2826,  2855,  2885,  2914,  2944,\n    2973,  3003,  3032,  3062,  3091,  3121,  3150,  3180,  3209,  3239,  3268,  3298,  3327,  3357,  3386,  3416,  3446,  3476,  3505,  3535,\n    3564,  3594,  3623,  3653,  3682,  3712,  3741,  3771,  3800,  3830,  3859,  3889,  3918,  3948,  3977,  4007,  4036,  4066,  4095,  4125,\n    4155,  4185,  4214,  4244,  4273,  4303,  4332,  4362,  4391,  4421,  4450,  4480,  4509,  4539,  4568,  4598,  4627,  4657,  4686,  4716,\n    4745,  4775,  4804,  4834,  4863,  4893,  4922,  4952,  4981,  5011,  5040,  5070,  5099,  5129,  5158,  5188,  5218,  5248,  5277,  5307,\n    5336,  5366,  5395,  5425,  5454,  5484,  5513,  5543,  5572,  5602,  5631,  5661,  5690,  5720,  5749,  5779,  5808,  5838,  5867,  5897,\n    5926,  5956,  5985,  6015,  6044,  6074,  6103,  6133,  6162,  6192,  6221,  6251,  6281,  6311,  6340,  6370,  6399,  6429,  6458,  6488,\n    6517,  6547,  6576,  6606,  6635,  6665,  6694,  6724,  6753,  6783,  6812,  6842,  6871,  6901,  6930,  6960,  6989,  7019,  7048,  7078,\n    7107,  7137,  7166,  7196,  7225,  7255,  7284,  7314,  7344,  7374,  7403,  7433,  7462,  7492,  7521,  7551,  7580,  7610,  7639,  7669,\n    7698,  7728,  7757,  7787,  7816,  7846,  7875,  7905,  7934,  7964,  7993,  8023,  8053,  8083,  8112,  8142,  8171,  8201,  8230,  8260,\n    8289,  8319,  8348,  8378,  8407,  8437,  8466,  8496,  8525,  8555,  8584,  8614,  8643,  8673,  8702,  8732,  8761,  8791,  8821,  8850,\n    8880,  8909,  8938,  8968,  8997,  9027,  9056,  9086,  9115,  9145,  9175,  9205,  9234,  9264,  9293,  9322,  9352,  9381,  9410,  9440,\n    9470,  9499,  9529,  9559,  9589,  9618,  9648,  9677,  9706,  9736,  9765,  9794,  9824,  9853,  9883,  9913,  9943,  9972,  10002, 10032,\n    10061, 10090, 10120, 10149, 10178, 10208, 10237, 10267, 10297, 10326, 10356, 10386, 10415, 10445, 10474, 10504, 10533, 10562, 10592, 10621,\n    10651, 10680, 10710, 10740, 10770, 10799, 10829, 10858, 10888, 10917, 10947, 10976, 11005, 11035, 11064, 11094, 11124, 11153, 11183, 11213,\n    11242, 11272, 11301, 11331, 11360, 11389, 11419, 11448, 11478, 11507, 11537, 11567, 11596, 11626, 11655, 11685, 11715, 11744, 11774, 11803,\n    11832, 11862, 11891, 11921, 11950, 11980, 12010, 12039, 12069, 12099, 12128, 12158, 12187, 12216, 12246, 12275, 12304, 12334, 12364, 12393,\n    12423, 12453, 12483, 12512, 12542, 12571, 12600, 12630, 12659, 12688, 12718, 12747, 12777, 12807, 12837, 12866, 12896, 12926, 12955, 12984,\n    13014, 13043, 13072, 13102, 13131, 13161, 13191, 13220, 13250, 13280, 13310, 13339, 13368, 13398, 13427, 13456, 13486, 13515, 13545, 13574,\n    13604, 13634, 13664, 13693, 13723, 13752, 13782, 13811, 13840, 13870, 13899, 13929, 13958, 13988, 14018, 14047, 14077, 14107, 14136, 14166,\n    14195, 14224, 14254, 14283, 14313, 14342, 14372, 14401, 14431, 14461, 14490, 14520, 14550, 14579, 14609, 14638, 14667, 14697, 14726, 14756,\n    14785, 14815, 14844, 14874, 14904, 14933, 14963, 14993, 15021, 15051, 15081, 15110, 15140, 15169, 15199, 15228, 15258, 15287, 15317, 15347,\n    15377, 15406, 15436, 15465, 15494, 15524, 15553, 15582, 15612, 15641, 15671, 15701, 15731, 15760, 15790, 15820, 15849, 15878, 15908, 15937,\n    15966, 15996, 16025, 16055, 16085, 16114, 16144, 16174, 16204, 16233, 16262, 16292, 16321, 16350, 16380, 16409, 16439, 16468, 16498, 16528,\n    16558, 16587, 16617, 16646, 16676, 16705, 16734, 16764, 16793, 16823, 16852, 16882, 16912, 16941, 16971, 17001, 17030, 17060, 17089, 17118,\n    17148, 17177, 17207, 17236, 17266, 17295, 17325, 17355, 17384, 17414, 17444, 17473, 17502, 17532, 17561, 17591, 17620, 17650, 17679, 17709,\n    17738, 17768, 17798, 17827, 17857, 17886, 17916, 17945, 17975, 18004, 18034, 18063, 18093, 18122, 18152, 18181, 18211, 18241, 18270, 18300,\n    18330, 18359, 18388, 18418, 18447, 18476, 18506, 18535, 18565, 18595, 18625, 18654, 18684, 18714, 18743, 18772, 18802, 18831, 18860, 18890,\n    18919, 18949, 18979, 19008, 19038, 19068, 19098, 19127, 19156, 19186, 19215, 19244, 19274, 19303, 19333, 19362, 19392, 19422, 19452, 19481,\n    19511, 19540, 19570, 19599, 19628, 19658, 19687, 19717, 19746, 19776, 19806, 19836, 19865, 19895, 19924, 19954, 19983, 20012, 20042, 20071,\n    20101, 20130, 20160, 20190, 20219, 20249, 20279, 20308, 20338, 20367, 20396, 20426, 20455, 20485, 20514, 20544, 20573, 20603, 20633, 20662,\n    20692, 20721, 20751, 20780, 20810, 20839, 20869, 20898, 20928, 20957, 20987, 21016, 21046, 21076, 21105, 21135, 21164, 21194, 21223, 21253,\n    21282, 21312, 21341, 21371, 21400, 21430, 21459, 21489, 21519, 21548, 21578, 21607, 21637, 21666, 21696, 21725, 21754, 21784, 21813, 21843,\n    21873, 21902, 21932, 21962, 21991, 22021, 22050, 22080, 22109, 22138, 22168, 22197, 22227, 22256, 22286, 22316, 22346, 22375, 22405, 22434,\n    22464, 22493, 22522, 22552, 22581, 22611, 22640, 22670, 22700, 22730, 22759, 22789, 22818, 22848, 22877, 22906, 22936, 22965, 22994, 23024,\n    23054, 23083, 23113, 23143, 23173, 23202, 23232, 23261, 23290, 23320, 23349, 23379, 23408, 23438, 23467, 23497, 23527, 23556, 23586, 23616,\n    23645, 23674, 23704, 23733, 23763, 23792, 23822, 23851, 23881, 23910, 23940, 23970, 23999, 24029, 24058, 24088, 24117, 24147, 24176, 24206,\n    24235, 24265, 24294, 24324, 24353, 24383, 24413, 24442, 24472, 24501, 24531, 24560, 24590, 24619, 24648, 24678, 24707, 24737, 24767, 24796,\n    24826, 24856, 24885, 24915, 24944, 24974, 25003, 25032, 25062, 25091, 25121, 25150, 25180, 25210, 25240, 25269, 25299, 25328, 25358, 25387,\n    25416, 25446, 25475, 25505, 25534, 25564, 25594, 25624, 25653, 25683, 25712, 25742, 25771, 25800, 25830, 25859, 25888, 25918, 25948, 25977,\n    26007, 26037, 26067, 26096, 26126, 26155, 26184, 26214, 26243, 26272, 26302, 26332, 26361, 26391, 26421, 26451, 26480, 26510, 26539, 26568,\n    26598, 26627, 26656, 26686, 26715, 26745, 26775, 26805, 26834, 26864, 26893, 26923, 26952, 26982, 27011, 27041, 27070, 27099, 27129, 27159,\n    27188, 27218, 27248, 27277, 27307, 27336, 27366, 27395, 27425, 27454, 27484, 27513, 27542, 27572, 27602, 27631, 27661, 27691, 27720, 27750,\n    27779, 27809, 27838, 27868, 27897, 27926, 27956, 27985, 28015, 28045, 28074, 28104, 28134, 28163, 28193, 28222, 28252, 28281, 28310, 28340,\n    28369, 28399, 28428, 28458, 28488, 28517, 28547, 28577,\n    // From 1356\n    28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167,\n    29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759,\n    29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348,\n    30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939,\n    30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530,\n    31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120,\n    32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711,\n    32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302,\n    33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893,\n    33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483,\n    34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074,\n    35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665,\n    35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254,\n    36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845,\n    36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436,\n    37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027,\n    38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617,\n    38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208,\n    39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798,\n    39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389,\n    40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980,\n    41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570,\n    41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161,\n    42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751,\n    42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342,\n    43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932,\n    43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523,\n    44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114,\n    45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704,\n    45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295,\n    46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885,\n    46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476,\n    47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066,\n    48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657,\n    48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248,\n    49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838,\n    49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429,\n    50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019,\n    51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611,\n    51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200,\n    52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792,\n    52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383,\n    53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973,\n    54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564,\n    54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154,\n    55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745,\n    55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335,\n    56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926,\n    56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517,\n    57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107,\n    58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698,\n    58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288,\n    59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879,\n    59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469,\n    60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061,\n    61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651,\n    61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242,\n    62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832,\n    62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423,\n    63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014,\n    64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603,\n    64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195,\n    65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785,\n    65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376,\n    66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967,\n    66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557,\n    67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68000, 68030, 68060, 68089, 68119, 68148,\n    68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738,\n    68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330,\n    69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919,\n    69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510,\n    70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101,\n    71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691,\n    71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282,\n    72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872,\n    72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464,\n    73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053,\n    74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645,\n    74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235,\n    75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826,\n    75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416,\n    76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007,\n    77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598,\n    77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188,\n    78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779,\n    78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369,\n    79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960,\n    79990];\n\n\n},{\"../main\":558,\"object-assign\":449}],558:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Calendars for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar assign = _dereq_('object-assign');\n\n\nfunction Calendars() {\n    this.regionalOptions = [];\n    this.regionalOptions[''] = {\n        invalidCalendar: 'Calendar {0} not found',\n        invalidDate: 'Invalid {0} date',\n        invalidMonth: 'Invalid {0} month',\n        invalidYear: 'Invalid {0} year',\n        differentCalendars: 'Cannot mix {0} and {1} dates'\n    };\n    this.local = this.regionalOptions[''];\n    this.calendars = {};\n    this._localCals = {};\n}\n\n/** Create the calendars plugin.\n    <p>Provides support for various world calendars in a consistent manner.</p>\n     @class Calendars\n    @example _exports.instance('julian').newDate(2014, 12, 25) */\nassign(Calendars.prototype, {\n\n    /** Obtain a calendar implementation and localisation.\n        @memberof Calendars\n        @param [name='gregorian'] {string} The name of the calendar, e.g. 'gregorian', 'persian', 'islamic'.\n        @param [language=''] {string} The language code to use for localisation (default is English).\n        @return {Calendar} The calendar and localisation.\n        @throws Error if calendar not found. */\n    instance: function(name, language) {\n        name = (name || 'gregorian').toLowerCase();\n        language = language || '';\n        var cal = this._localCals[name + '-' + language];\n        if (!cal && this.calendars[name]) {\n            cal = new this.calendars[name](language);\n            this._localCals[name + '-' + language] = cal;\n        }\n        if (!cal) {\n            throw (this.local.invalidCalendar || this.regionalOptions[''].invalidCalendar).\n                replace(/\\{0\\}/, name);\n        }\n        return cal;\n    },\n\n    /** Create a new date - for today if no other parameters given.\n        @memberof Calendars\n        @param year {CDate|number} The date to copy or the year for the date.\n        @param [month] {number} The month for the date.\n        @param [day] {number} The day for the date.\n        @param [calendar='gregorian'] {BaseCalendar|string} The underlying calendar or the name of the calendar.\n        @param [language=''] {string} The language to use for localisation (default English).\n        @return {CDate} The new date.\n        @throws Error if an invalid date. */\n    newDate: function(year, month, day, calendar, language) {\n        calendar = (year != null && year.year ? year.calendar() : (typeof calendar === 'string' ?\n            this.instance(calendar, language) : calendar)) || this.instance();\n        return calendar.newDate(year, month, day);\n    },\n    \n    /** A simple digit substitution function for localising numbers via the Calendar digits option.\n        @member Calendars\n        @param digits {string[]} The substitute digits, for 0 through 9.\n        @return {function} The substitution function. */\n    substituteDigits: function(digits) {\n        return function(value) {\n            return (value + '').replace(/[0-9]/g, function(digit) {\n                return digits[digit];\n            });\n        }\n    },\n    \n    /** Digit substitution function for localising Chinese style numbers via the Calendar digits option.\n        @member Calendars\n        @param digits {string[]} The substitute digits, for 0 through 9.\n        @param powers {string[]} The characters denoting powers of 10, i.e. 1, 10, 100, 1000.\n        @return {function} The substitution function. */\n    substituteChineseDigits: function(digits, powers) {\n        return function(value) {\n            var localNumber = '';\n            var power = 0;\n            while (value > 0) {\n                var units = value % 10;\n                localNumber = (units === 0 ? '' : digits[units] + powers[power]) + localNumber;\n                power++;\n                value = Math.floor(value / 10);\n            }\n            if (localNumber.indexOf(digits[1] + powers[1]) === 0) {\n                localNumber = localNumber.substr(1);\n            }\n            return localNumber || digits[0];\n        }\n    }\n});\n\n/** Generic date, based on a particular calendar.\n    @class CDate\n    @param calendar {BaseCalendar} The underlying calendar implementation.\n    @param year {number} The year for this date.\n    @param month {number} The month for this date.\n    @param day {number} The day for this date.\n    @return {CDate} The date object.\n    @throws Error if an invalid date. */\nfunction CDate(calendar, year, month, day) {\n    this._calendar = calendar;\n    this._year = year;\n    this._month = month;\n    this._day = day;\n    if (this._calendar._validateLevel === 0 &&\n            !this._calendar.isValid(this._year, this._month, this._day)) {\n        throw (_exports.local.invalidDate || _exports.regionalOptions[''].invalidDate).\n            replace(/\\{0\\}/, this._calendar.local.name);\n    }\n}\n\n/** Pad a numeric value with leading zeroes.\n    @private\n    @param value {number} The number to format.\n    @param length {number} The minimum length.\n    @return {string} The formatted number. */\nfunction pad(value, length) {\n    value = '' + value;\n    return '000000'.substring(0, length - value.length) + value;\n}\n\nassign(CDate.prototype, {\n\n    /** Create a new date.\n        @memberof CDate\n        @param [year] {CDate|number} The date to copy or the year for the date (default this date).\n        @param [month] {number} The month for the date.\n        @param [day] {number} The day for the date.\n        @return {CDate} The new date.\n        @throws Error if an invalid date. */\n    newDate: function(year, month, day) {\n        return this._calendar.newDate((year == null ? this : year), month, day);\n    },\n\n    /** Set or retrieve the year for this date.\n        @memberof CDate\n        @param [year] {number} The year for the date.\n        @return {number|CDate} The date's year (if no parameter) or the updated date.\n        @throws Error if an invalid date. */\n    year: function(year) {\n        return (arguments.length === 0 ? this._year : this.set(year, 'y'));\n    },\n\n    /** Set or retrieve the month for this date.\n        @memberof CDate\n        @param [month] {number} The month for the date.\n        @return {number|CDate} The date's month (if no parameter) or the updated date.\n        @throws Error if an invalid date. */\n    month: function(month) {\n        return (arguments.length === 0 ? this._month : this.set(month, 'm'));\n    },\n\n    /** Set or retrieve the day for this date.\n        @memberof CDate\n        @param [day] {number} The day for the date.\n        @return {number|CData} The date's day (if no parameter) or the updated date.\n        @throws Error if an invalid date. */\n    day: function(day) {\n        return (arguments.length === 0 ? this._day : this.set(day, 'd'));\n    },\n\n    /** Set new values for this date.\n        @memberof CDate\n        @param year {number} The year for the date.\n        @param month {number} The month for the date.\n        @param day {number} The day for the date.\n        @return {CDate} The updated date.\n        @throws Error if an invalid date. */\n    date: function(year, month, day) {\n        if (!this._calendar.isValid(year, month, day)) {\n            throw (_exports.local.invalidDate || _exports.regionalOptions[''].invalidDate).\n                replace(/\\{0\\}/, this._calendar.local.name);\n        }\n        this._year = year;\n        this._month = month;\n        this._day = day;\n        return this;\n    },\n\n    /** Determine whether this date is in a leap year.\n        @memberof CDate\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not. */\n    leapYear: function() {\n        return this._calendar.leapYear(this);\n    },\n\n    /** Retrieve the epoch designator for this date, e.g. BCE or CE.\n        @memberof CDate\n        @return {string} The current epoch. */\n    epoch: function() {\n        return this._calendar.epoch(this);\n    },\n\n    /** Format the year, if not a simple sequential number.\n        @memberof CDate\n        @return {string} The formatted year. */\n    formatYear: function() {\n        return this._calendar.formatYear(this);\n    },\n\n    /** Retrieve the month of the year for this date,\n        i.e. the month's position within a numbered year.\n        @memberof CDate\n        @return {number} The month of the year: <code>minMonth</code> to months per year. */\n    monthOfYear: function() {\n        return this._calendar.monthOfYear(this);\n    },\n\n    /** Retrieve the week of the year for this date.\n        @memberof CDate\n        @return {number} The week of the year: 1 to weeks per year. */\n    weekOfYear: function() {\n        return this._calendar.weekOfYear(this);\n    },\n\n    /** Retrieve the number of days in the year for this date.\n        @memberof CDate\n        @return {number} The number of days in this year. */\n    daysInYear: function() {\n        return this._calendar.daysInYear(this);\n    },\n\n    /** Retrieve the day of the year for this date.\n        @memberof CDate\n        @return {number} The day of the year: 1 to days per year. */\n    dayOfYear: function() {\n        return this._calendar.dayOfYear(this);\n    },\n\n    /** Retrieve the number of days in the month for this date.\n        @memberof CDate\n        @return {number} The number of days. */\n    daysInMonth: function() {\n        return this._calendar.daysInMonth(this);\n    },\n\n    /** Retrieve the day of the week for this date.\n        @memberof CDate\n        @return {number} The day of the week: 0 to number of days - 1. */\n    dayOfWeek: function() {\n        return this._calendar.dayOfWeek(this);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof CDate\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not. */\n    weekDay: function() {\n        return this._calendar.weekDay(this);\n    },\n\n    /** Retrieve additional information about this date.\n        @memberof CDate\n        @return {object} Additional information - contents depends on calendar. */\n    extraInfo: function() {\n        return this._calendar.extraInfo(this);\n    },\n\n    /** Add period(s) to a date.\n        @memberof CDate\n        @param offset {number} The number of periods to adjust by.\n        @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.\n        @return {CDate} The updated date. */\n    add: function(offset, period) {\n        return this._calendar.add(this, offset, period);\n    },\n\n    /** Set a portion of the date.\n        @memberof CDate\n        @param value {number} The new value for the period.\n        @param period {string} One of 'y' for year, 'm' for month, 'd' for day.\n        @return {CDate} The updated date.\n        @throws Error if not a valid date. */\n    set: function(value, period) {\n        return this._calendar.set(this, value, period);\n    },\n\n    /** Compare this date to another date.\n        @memberof CDate\n        @param date {CDate} The other date.\n        @return {number} -1 if this date is before the other date,\n                0 if they are equal, or +1 if this date is after the other date. */\n    compareTo: function(date) {\n        if (this._calendar.name !== date._calendar.name) {\n            throw (_exports.local.differentCalendars || _exports.regionalOptions[''].differentCalendars).\n                replace(/\\{0\\}/, this._calendar.local.name).replace(/\\{1\\}/, date._calendar.local.name);\n        }\n        var c = (this._year !== date._year ? this._year - date._year :\n            this._month !== date._month ? this.monthOfYear() - date.monthOfYear() :\n            this._day - date._day);\n        return (c === 0 ? 0 : (c < 0 ? -1 : +1));\n    },\n\n    /** Retrieve the calendar backing this date.\n        @memberof CDate\n        @return {BaseCalendar} The calendar implementation. */\n    calendar: function() {\n        return this._calendar;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof CDate\n        @return {number} The equivalent Julian date. */\n    toJD: function() {\n        return this._calendar.toJD(this);\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof CDate\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        return this._calendar.fromJD(jd);\n    },\n\n    /** Convert this date to a standard (Gregorian) JavaScript Date.\n        @memberof CDate\n        @return {Date} The equivalent JavaScript date. */\n    toJSDate: function() {\n        return this._calendar.toJSDate(this);\n    },\n\n    /** Create a new date from a standard (Gregorian) JavaScript Date.\n        @memberof CDate\n        @param jsd {Date} The JavaScript date to convert.\n        @return {CDate} The equivalent date. */\n    fromJSDate: function(jsd) {\n        return this._calendar.fromJSDate(jsd);\n    },\n\n    /** Convert to a string for display.\n        @memberof CDate\n        @return {string} This date as a string. */\n    toString: function() {\n        return (this.year() < 0 ? '-' : '') + pad(Math.abs(this.year()), 4) +\n            '-' + pad(this.month(), 2) + '-' + pad(this.day(), 2);\n    }\n});\n\n/** Basic functionality for all calendars.\n    Other calendars should extend this:\n    <pre>OtherCalendar.prototype = new BaseCalendar;</pre>\n    @class BaseCalendar */\nfunction BaseCalendar() {\n    this.shortYearCutoff = '+10';\n}\n\nassign(BaseCalendar.prototype, {\n    _validateLevel: 0, // \"Stack\" to turn validation on/off\n\n    /** Create a new date within this calendar - today if no parameters given.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to duplicate or the year for the date.\n        @param [month] {number} The month for the date.\n        @param [day] {number} The day for the date.\n        @return {CDate} The new date.\n        @throws Error if not a valid date or a different calendar used. */\n    newDate: function(year, month, day) {\n        if (year == null) {\n            return this.today();\n        }\n        if (year.year) {\n            this._validate(year, month, day,\n                _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n            day = year.day();\n            month = year.month();\n            year = year.year();\n        }\n        return new CDate(this, year, month, day);\n    },\n\n    /** Create a new date for today.\n        @memberof BaseCalendar\n        @return {CDate} Today's date. */\n    today: function() {\n        return this.fromJSDate(new Date());\n    },\n\n    /** Retrieve the epoch designator for this date.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {string} The current epoch.\n        @throws Error if an invalid year or a different calendar used. */\n    epoch: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay,\n            _exports.local.invalidYear || _exports.regionalOptions[''].invalidYear);\n        return (date.year() < 0 ? this.local.epochs[0] : this.local.epochs[1]);\n    },\n\n    /** Format the year, if not a simple sequential number\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to format or the year to format.\n        @return {string} The formatted year.\n        @throws Error if an invalid year or a different calendar used. */\n    formatYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay,\n            _exports.local.invalidYear || _exports.regionalOptions[''].invalidYear);\n        return (date.year() < 0 ? '-' : '') + pad(Math.abs(date.year()), 4)\n    },\n\n    /** Retrieve the number of months in a year.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of months.\n        @throws Error if an invalid year or a different calendar used. */\n    monthsInYear: function(year) {\n        this._validate(year, this.minMonth, this.minDay,\n            _exports.local.invalidYear || _exports.regionalOptions[''].invalidYear);\n        return 12;\n    },\n\n    /** Calculate the month's ordinal position within the year -\n        for those calendars that don't start at month 1!\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param month {number} The month to examine.\n        @return {number} The ordinal position, starting from <code>minMonth</code>.\n        @throws Error if an invalid year/month or a different calendar used. */\n    monthOfYear: function(year, month) {\n        var date = this._validate(year, month, this.minDay,\n            _exports.local.invalidMonth || _exports.regionalOptions[''].invalidMonth);\n        return (date.month() + this.monthsInYear(date) - this.firstMonth) %\n            this.monthsInYear(date) + this.minMonth;\n    },\n\n    /** Calculate actual month from ordinal position, starting from minMonth.\n        @memberof BaseCalendar\n        @param year {number} The year to examine.\n        @param ord {number} The month's ordinal position.\n        @return {number} The month's number.\n        @throws Error if an invalid year/month. */\n    fromMonthOfYear: function(year, ord) {\n        var m = (ord + this.firstMonth - 2 * this.minMonth) %\n            this.monthsInYear(year) + this.minMonth;\n        this._validate(year, m, this.minDay,\n            _exports.local.invalidMonth || _exports.regionalOptions[''].invalidMonth);\n        return m;\n    },\n\n    /** Retrieve the number of days in a year.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {number} The number of days.\n        @throws Error if an invalid year or a different calendar used. */\n    daysInYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay,\n            _exports.local.invalidYear || _exports.regionalOptions[''].invalidYear);\n        return (this.leapYear(date) ? 366 : 365);\n    },\n\n    /** Retrieve the day of the year for a date.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The day of the year.\n        @throws Error if an invalid date or a different calendar used. */\n    dayOfYear: function(year, month, day) {\n        var date = this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        return date.toJD() - this.newDate(date.year(),\n            this.fromMonthOfYear(date.year(), this.minMonth), this.minDay).toJD() + 1;\n    },\n\n    /** Retrieve the number of days in a week.\n        @memberof BaseCalendar\n        @return {number} The number of days. */\n    daysInWeek: function() {\n        return 7;\n    },\n\n    /** Retrieve the day of the week for a date.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The day of the week: 0 to number of days - 1.\n        @throws Error if an invalid date or a different calendar used. */\n    dayOfWeek: function(year, month, day) {\n        var date = this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        return (Math.floor(this.toJD(date)) + 2) % this.daysInWeek();\n    },\n\n    /** Retrieve additional information about a date.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {object} Additional information - contents depends on calendar.\n        @throws Error if an invalid date or a different calendar used. */\n    extraInfo: function(year, month, day) {\n        this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        return {};\n    },\n\n    /** Add period(s) to a date.\n        Cater for no year zero.\n        @memberof BaseCalendar\n        @param date {CDate} The starting date.\n        @param offset {number} The number of periods to adjust by.\n        @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.\n        @return {CDate} The updated date.\n        @throws Error if a different calendar used. */\n    add: function(date, offset, period) {\n        this._validate(date, this.minMonth, this.minDay,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        return this._correctAdd(date, this._add(date, offset, period), offset, period);\n    },\n\n    /** Add period(s) to a date.\n        @memberof BaseCalendar\n        @private\n        @param date {CDate} The starting date.\n        @param offset {number} The number of periods to adjust by.\n        @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.\n        @return {CDate} The updated date. */\n    _add: function(date, offset, period) {\n        this._validateLevel++;\n        if (period === 'd' || period === 'w') {\n            var jd = date.toJD() + offset * (period === 'w' ? this.daysInWeek() : 1);\n            var d = date.calendar().fromJD(jd);\n            this._validateLevel--;\n            return [d.year(), d.month(), d.day()];\n        }\n        try {\n            var y = date.year() + (period === 'y' ? offset : 0);\n            var m = date.monthOfYear() + (period === 'm' ? offset : 0);\n            var d = date.day();// + (period === 'd' ? offset : 0) +\n                //(period === 'w' ? offset * this.daysInWeek() : 0);\n            var resyncYearMonth = function(calendar) {\n                while (m < calendar.minMonth) {\n                    y--;\n                    m += calendar.monthsInYear(y);\n                }\n                var yearMonths = calendar.monthsInYear(y);\n                while (m > yearMonths - 1 + calendar.minMonth) {\n                    y++;\n                    m -= yearMonths;\n                    yearMonths = calendar.monthsInYear(y);\n                }\n            };\n            if (period === 'y') {\n                if (date.month() !== this.fromMonthOfYear(y, m)) { // Hebrew\n                    m = this.newDate(y, date.month(), this.minDay).monthOfYear();\n                }\n                m = Math.min(m, this.monthsInYear(y));\n                d = Math.min(d, this.daysInMonth(y, this.fromMonthOfYear(y, m)));\n            }\n            else if (period === 'm') {\n                resyncYearMonth(this);\n                d = Math.min(d, this.daysInMonth(y, this.fromMonthOfYear(y, m)));\n            }\n            var ymd = [y, this.fromMonthOfYear(y, m), d];\n            this._validateLevel--;\n            return ymd;\n        }\n        catch (e) {\n            this._validateLevel--;\n            throw e;\n        }\n    },\n\n    /** Correct a candidate date after adding period(s) to a date.\n        Handle no year zero if necessary.\n        @memberof BaseCalendar\n        @private\n        @param date {CDate} The starting date.\n        @param ymd {number[]} The added date.\n        @param offset {number} The number of periods to adjust by.\n        @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.\n        @return {CDate} The updated date. */\n    _correctAdd: function(date, ymd, offset, period) {\n        if (!this.hasYearZero && (period === 'y' || period === 'm')) {\n            if (ymd[0] === 0 || // In year zero\n                    (date.year() > 0) !== (ymd[0] > 0)) { // Crossed year zero\n                var adj = {y: [1, 1, 'y'], m: [1, this.monthsInYear(-1), 'm'],\n                    w: [this.daysInWeek(), this.daysInYear(-1), 'd'],\n                    d: [1, this.daysInYear(-1), 'd']}[period];\n                var dir = (offset < 0 ? -1 : +1);\n                ymd = this._add(date, offset * adj[0] + dir * adj[1], adj[2]);\n            }\n        }\n        return date.date(ymd[0], ymd[1], ymd[2]);\n    },\n\n    /** Set a portion of the date.\n        @memberof BaseCalendar\n        @param date {CDate} The starting date.\n        @param value {number} The new value for the period.\n        @param period {string} One of 'y' for year, 'm' for month, 'd' for day.\n        @return {CDate} The updated date.\n        @throws Error if an invalid date or a different calendar used. */\n    set: function(date, value, period) {\n        this._validate(date, this.minMonth, this.minDay,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        var y = (period === 'y' ? value : date.year());\n        var m = (period === 'm' ? value : date.month());\n        var d = (period === 'd' ? value : date.day());\n        if (period === 'y' || period === 'm') {\n            d = Math.min(d, this.daysInMonth(y, m));\n        }\n        return date.date(y, m, d);\n    },\n\n    /** Determine whether a date is valid for this calendar.\n        @memberof BaseCalendar\n        @param year {number} The year to examine.\n        @param month {number} The month to examine.\n        @param day {number} The day to examine.\n        @return {boolean} <code>true</code> if a valid date, <code>false</code> if not. */\n    isValid: function(year, month, day) {\n        this._validateLevel++;\n        var valid = (this.hasYearZero || year !== 0);\n        if (valid) {\n            var date = this.newDate(year, month, this.minDay);\n            valid = (month >= this.minMonth && month - this.minMonth < this.monthsInYear(date)) &&\n                (day >= this.minDay && day - this.minDay < this.daysInMonth(date));\n        }\n        this._validateLevel--;\n        return valid;\n    },\n\n    /** Convert the date to a standard (Gregorian) JavaScript Date.\n        @memberof BaseCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {Date} The equivalent JavaScript date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJSDate: function(year, month, day) {\n        var date = this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        return _exports.instance().fromJD(this.toJD(date)).toJSDate();\n    },\n\n    /** Convert the date from a standard (Gregorian) JavaScript Date.\n        @memberof BaseCalendar\n        @param jsd {Date} The JavaScript date.\n        @return {CDate} The equivalent calendar date. */\n    fromJSDate: function(jsd) {\n        return this.fromJD(_exports.instance().fromJSDate(jsd).toJD());\n    },\n\n    /** Check that a candidate date is from the same calendar and is valid.\n        @memberof BaseCalendar\n        @private\n        @param year {CDate|number} The date to validate or the year to validate.\n        @param [month] {number} The month to validate.\n        @param [day] {number} The day to validate.\n        @param error {string} Rrror message if invalid.\n        @throws Error if different calendars used or invalid date. */\n    _validate: function(year, month, day, error) {\n        if (year.year) {\n            if (this._validateLevel === 0 && this.name !== year.calendar().name) {\n                throw (_exports.local.differentCalendars || _exports.regionalOptions[''].differentCalendars).\n                    replace(/\\{0\\}/, this.local.name).replace(/\\{1\\}/, year.calendar().local.name);\n            }\n            return year;\n        }\n        try {\n            this._validateLevel++;\n            if (this._validateLevel === 1 && !this.isValid(year, month, day)) {\n                throw error.replace(/\\{0\\}/, this.local.name);\n            }\n            var date = this.newDate(year, month, day);\n            this._validateLevel--;\n            return date;\n        }\n        catch (e) {\n            this._validateLevel--;\n            throw e;\n        }\n    }\n});\n\n/** Implementation of the Proleptic Gregorian Calendar.\n    See <a href=\":http://en.wikipedia.org/wiki/Gregorian_calendar\">http://en.wikipedia.org/wiki/Gregorian_calendar</a>\n    and <a href=\"http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar\">http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar</a>.\n    @class GregorianCalendar\n    @augments BaseCalendar\n    @param [language=''] {string} The language code (default English) for localisation. */\nfunction GregorianCalendar(language) {\n    this.local = this.regionalOptions[language] || this.regionalOptions[''];\n}\n\nGregorianCalendar.prototype = new BaseCalendar;\n\nassign(GregorianCalendar.prototype, {\n    /** The calendar name.\n        @memberof GregorianCalendar */\n    name: 'Gregorian',\n     /** Julian date of start of Gregorian epoch: 1 January 0001 CE.\n        @memberof GregorianCalendar */\n    jdEpoch: 1721425.5,\n     /** Days per month in a common year.\n        @memberof GregorianCalendar */\n    daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n     /** <code>true</code> if has a year zero, <code>false</code> if not.\n        @memberof GregorianCalendar */\n    hasYearZero: false,\n    /** The minimum month number.\n        @memberof GregorianCalendar */\n    minMonth: 1,\n    /** The first month in the year.\n        @memberof GregorianCalendar */\n    firstMonth: 1,\n     /** The minimum day number.\n        @memberof GregorianCalendar */\n    minDay: 1,\n\n    /** Localisations for the plugin.\n        Entries are objects indexed by the language code ('' being the default US/English).\n        Each object has the following attributes.\n        @memberof GregorianCalendar\n        @property name {string} The calendar name.\n        @property epochs {string[]} The epoch names.\n        @property monthNames {string[]} The long names of the months of the year.\n        @property monthNamesShort {string[]} The short names of the months of the year.\n        @property dayNames {string[]} The long names of the days of the week.\n        @property dayNamesShort {string[]} The short names of the days of the week.\n        @property dayNamesMin {string[]} The minimal names of the days of the week.\n        @property dateFormat {string} The date format for this calendar.\n                See the options on <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a> for details.\n        @property firstDay {number} The number of the first day of the week, starting at 0.\n        @property isRTL {number} <code>true</code> if this localisation reads right-to-left. */\n    regionalOptions: { // Localisations\n        '': {\n            name: 'Gregorian',\n            epochs: ['BCE', 'CE'],\n            monthNames: ['January', 'February', 'March', 'April', 'May', 'June',\n            'July', 'August', 'September', 'October', 'November', 'December'],\n            monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n            dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n            dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n            dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n            digits: null,\n            dateFormat: 'mm/dd/yyyy',\n            firstDay: 0,\n            isRTL: false\n        }\n    },\n    \n    /** Determine whether this date is in a leap year.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @return {boolean} <code>true</code> if this is a leap year, <code>false</code> if not.\n        @throws Error if an invalid year or a different calendar used. */\n    leapYear: function(year) {\n        var date = this._validate(year, this.minMonth, this.minDay,\n            _exports.local.invalidYear || _exports.regionalOptions[''].invalidYear);\n        var year = date.year() + (date.year() < 0 ? 1 : 0); // No year zero\n        return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n    },\n\n    /** Determine the week of the year for a date - ISO 8601.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {number} The week of the year, starting from 1.\n        @throws Error if an invalid date or a different calendar used. */\n    weekOfYear: function(year, month, day) {\n        // Find Thursday of this week starting on Monday\n        var checkDate = this.newDate(year, month, day);\n        checkDate.add(4 - (checkDate.dayOfWeek() || 7), 'd');\n        return Math.floor((checkDate.dayOfYear() - 1) / 7) + 1;\n    },\n\n    /** Retrieve the number of days in a month.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to examine or the year of the month.\n        @param [month] {number} The month.\n        @return {number} The number of days in this month.\n        @throws Error if an invalid month/year or a different calendar used. */\n    daysInMonth: function(year, month) {\n        var date = this._validate(year, month, this.minDay,\n            _exports.local.invalidMonth || _exports.regionalOptions[''].invalidMonth);\n        return this.daysPerMonth[date.month() - 1] +\n            (date.month() === 2 && this.leapYear(date.year()) ? 1 : 0);\n    },\n\n    /** Determine whether this date is a week day.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to examine or the year to examine.\n        @param [month] {number} The month to examine.\n        @param [day] {number} The day to examine.\n        @return {boolean} <code>true</code> if a week day, <code>false</code> if not.\n        @throws Error if an invalid date or a different calendar used. */\n    weekDay: function(year, month, day) {\n        return (this.dayOfWeek(year, month, day) || 7) < 6;\n    },\n\n    /** Retrieve the Julian date equivalent for this date,\n        i.e. days since January 1, 4713 BCE Greenwich noon.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {number} The equivalent Julian date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJD: function(year, month, day) {\n        var date = this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        year = date.year();\n        month = date.month();\n        day = date.day();\n        if (year < 0) { year++; } // No year zero\n        // Jean Meeus algorithm, \"Astronomical Algorithms\", 1991\n        if (month < 3) {\n            month += 12;\n            year--;\n        }\n        var a = Math.floor(year / 100);\n        var b = 2 - a + Math.floor(a / 4);\n        return Math.floor(365.25 * (year + 4716)) +\n            Math.floor(30.6001 * (month + 1)) + day + b - 1524.5;\n    },\n\n    /** Create a new date from a Julian date.\n        @memberof GregorianCalendar\n        @param jd {number} The Julian date to convert.\n        @return {CDate} The equivalent date. */\n    fromJD: function(jd) {\n        // Jean Meeus algorithm, \"Astronomical Algorithms\", 1991\n        var z = Math.floor(jd + 0.5);\n        var a = Math.floor((z - 1867216.25) / 36524.25);\n        a = z + 1 + a - Math.floor(a / 4);\n        var b = a + 1524;\n        var c = Math.floor((b - 122.1) / 365.25);\n        var d = Math.floor(365.25 * c);\n        var e = Math.floor((b - d) / 30.6001);\n        var day = b - d - Math.floor(e * 30.6001);\n        var month = e - (e > 13.5 ? 13 : 1);\n        var year = c - (month > 2.5 ? 4716 : 4715);\n        if (year <= 0) { year--; } // No year zero\n        return this.newDate(year, month, day);\n    },\n\n    /** Convert this date to a standard (Gregorian) JavaScript Date.\n        @memberof GregorianCalendar\n        @param year {CDate|number} The date to convert or the year to convert.\n        @param [month] {number} The month to convert.\n        @param [day] {number} The day to convert.\n        @return {Date} The equivalent JavaScript date.\n        @throws Error if an invalid date or a different calendar used. */\n    toJSDate: function(year, month, day) {\n        var date = this._validate(year, month, day,\n            _exports.local.invalidDate || _exports.regionalOptions[''].invalidDate);\n        var jsd = new Date(date.year(), date.month() - 1, date.day());\n        jsd.setHours(0);\n        jsd.setMinutes(0);\n        jsd.setSeconds(0);\n        jsd.setMilliseconds(0);\n        // Hours may be non-zero on daylight saving cut-over:\n        // > 12 when midnight changeover, but then cannot generate\n        // midnight datetime, so jump to 1AM, otherwise reset.\n        jsd.setHours(jsd.getHours() > 12 ? jsd.getHours() + 2 : 0);\n        return jsd;\n    },\n\n    /** Create a new date from a standard (Gregorian) JavaScript Date.\n        @memberof GregorianCalendar\n        @param jsd {Date} The JavaScript date to convert.\n        @return {CDate} The equivalent date. */\n    fromJSDate: function(jsd) {\n        return this.newDate(jsd.getFullYear(), jsd.getMonth() + 1, jsd.getDate());\n    }\n});\n\n// Singleton manager\nvar _exports = module.exports = new Calendars();\n\n// Date template\n_exports.cdate = CDate;\n\n// Base calendar template\n_exports.baseCalendar = BaseCalendar;\n\n// Gregorian calendar implementation\n_exports.calendars.gregorian = GregorianCalendar;\n\n\n},{\"object-assign\":449}],559:[function(_dereq_,module,exports){\n/*\n * World Calendars\n * https://github.com/alexcjohnson/world-calendars\n *\n * Batch-converted from kbwood/calendars\n * Many thanks to Keith Wood and all of the contributors to the original project!\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n﻿/* http://keith-wood.name/calendars.html\n   Calendars extras for jQuery v2.0.2.\n   Written by Keith Wood (wood.keith{at}optusnet.com.au) August 2009.\n   Available under the MIT (http://keith-wood.name/licence.html) license. \n   Please attribute the author if you use it. */\n\nvar assign = _dereq_('object-assign');\nvar main = _dereq_('./main');\n\n\nassign(main.regionalOptions[''], {\n    invalidArguments: 'Invalid arguments',\n    invalidFormat: 'Cannot format a date from another calendar',\n    missingNumberAt: 'Missing number at position {0}',\n    unknownNameAt: 'Unknown name at position {0}',\n    unexpectedLiteralAt: 'Unexpected literal at position {0}',\n    unexpectedText: 'Additional text found at end'\n});\nmain.local = main.regionalOptions[''];\n\nassign(main.cdate.prototype, {\n\n    /** Format this date.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof CDate\n        @param [format] {string} The date format to use (see <a href=\"BaseCalendar.html#formatDate\"><code>formatDate</code></a>).\n        @param [settings] {object} Options for the <code>formatDate</code> function.\n        @return {string} The formatted date. */\n    formatDate: function(format, settings) {\n        if (typeof format !== 'string') {\n            settings = format;\n            format = '';\n        }\n        return this._calendar.formatDate(format || '', this, settings);\n    }\n});\n\nassign(main.baseCalendar.prototype, {\n\n    UNIX_EPOCH: main.instance().newDate(1970, 1, 1).toJD(),\n    SECS_PER_DAY: 24 * 60 * 60,\n    TICKS_EPOCH: main.instance().jdEpoch, // 1 January 0001 CE\n    TICKS_PER_DAY: 24 * 60 * 60 * 10000000,\n\n    /** Date form for ATOM (RFC 3339/ISO 8601).\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    ATOM: 'yyyy-mm-dd',\n    /** Date form for cookies.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    COOKIE: 'D, dd M yyyy',\n    /** Date form for full date.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    FULL: 'DD, MM d, yyyy',\n    /** Date form for ISO 8601.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    ISO_8601: 'yyyy-mm-dd',\n    /** Date form for Julian date.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    JULIAN: 'J',\n    /** Date form for RFC 822.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RFC_822: 'D, d M yy',\n    /** Date form for RFC 850.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RFC_850: 'DD, dd-M-yy',\n    /** Date form for RFC 1036.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RFC_1036: 'D, d M yy',\n    /** Date form for RFC 1123.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RFC_1123: 'D, d M yyyy',\n    /** Date form for RFC 2822.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RFC_2822: 'D, d M yyyy',\n    /** Date form for RSS (RFC 822).\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    RSS: 'D, d M yy',\n    /** Date form for Windows ticks.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    TICKS: '!',\n    /** Date form for Unix timestamp.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    TIMESTAMP: '@',\n    /** Date form for W3c (ISO 8601).\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar */\n    W3C: 'yyyy-mm-dd',\n\n    /** Format a date object into a string value.\n        The format can be combinations of the following:\n        <ul>\n        <li>d  - day of month (no leading zero)</li>\n        <li>dd - day of month (two digit)</li>\n        <li>o  - day of year (no leading zeros)</li>\n        <li>oo - day of year (three digit)</li>\n        <li>D  - day name short</li>\n        <li>DD - day name long</li>\n        <li>w  - week of year (no leading zero)</li>\n        <li>ww - week of year (two digit)</li>\n        <li>m  - month of year (no leading zero)</li>\n        <li>mm - month of year (two digit)</li>\n        <li>M  - month name short</li>\n        <li>MM - month name long</li>\n        <li>yy - year (two digit)</li>\n        <li>yyyy - year (four digit)</li>\n        <li>YYYY - formatted year</li>\n        <li>J  - Julian date (days since January 1, 4713 BCE Greenwich noon)</li>\n        <li>@  - Unix timestamp (s since 01/01/1970)</li>\n        <li>!  - Windows ticks (100ns since 01/01/0001)</li>\n        <li>'...' - literal text</li>\n        <li>'' - single quote</li>\n        </ul>\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar\n        @param [format] {string} The desired format of the date (defaults to calendar format).\n        @param date {CDate} The date value to format.\n        @param [settings] {object} Addition options, whose attributes include:\n        @property [dayNamesShort] {string[]} Abbreviated names of the days from Sunday.\n        @property [dayNames] {string[]} Names of the days from Sunday.\n        @property [monthNamesShort] {string[]} Abbreviated names of the months.\n        @property [monthNames] {string[]} Names of the months.\n        @property [calculateWeek] {CalendarsPickerCalculateWeek} Function that determines week of the year.\n        @property [localNumbers=false] {boolean} <code>true</code> to localise numbers (if available),\n                  <code>false</code> to use normal Arabic numerals.\n        @return {string} The date in the above format.\n        @throws Errors if the date is from a different calendar. */\n    formatDate: function(format, date, settings) {\n        if (typeof format !== 'string') {\n            settings = date;\n            date = format;\n            format = '';\n        }\n        if (!date) {\n            return '';\n        }\n        if (date.calendar() !== this) {\n            throw main.local.invalidFormat || main.regionalOptions[''].invalidFormat;\n        }\n        format = format || this.local.dateFormat;\n        settings = settings || {};\n        var dayNamesShort = settings.dayNamesShort || this.local.dayNamesShort;\n        var dayNames = settings.dayNames || this.local.dayNames;\n        var monthNumbers = settings.monthNumbers || this.local.monthNumbers;\n        var monthNamesShort = settings.monthNamesShort || this.local.monthNamesShort;\n        var monthNames = settings.monthNames || this.local.monthNames;\n        var calculateWeek = settings.calculateWeek || this.local.calculateWeek;\n        // Check whether a format character is doubled\n        var doubled = function(match, step) {\n            var matches = 1;\n            while (iFormat + matches < format.length && format.charAt(iFormat + matches) === match) {\n                matches++;\n            }\n            iFormat += matches - 1;\n            return Math.floor(matches / (step || 1)) > 1;\n        };\n        // Format a number, with leading zeroes if necessary\n        var formatNumber = function(match, value, len, step) {\n            var num = '' + value;\n            if (doubled(match, step)) {\n                while (num.length < len) {\n                    num = '0' + num;\n                }\n            }\n            return num;\n        };\n        // Format a name, short or long as requested\n        var formatName = function(match, value, shortNames, longNames) {\n            return (doubled(match) ? longNames[value] : shortNames[value]);\n        };\n        // Format month number\n        // (e.g. Chinese calendar needs to account for intercalary months)\n        var calendar = this;\n        var formatMonth = function(date) {\n            return (typeof monthNumbers === 'function') ?\n                monthNumbers.call(calendar, date, doubled('m')) :\n                localiseNumbers(formatNumber('m', date.month(), 2));\n        };\n        // Format a month name, short or long as requested\n        var formatMonthName = function(date, useLongName) {\n            if (useLongName) {\n                return (typeof monthNames === 'function') ?\n                    monthNames.call(calendar, date) :\n                    monthNames[date.month() - calendar.minMonth];\n            } else {\n                return (typeof monthNamesShort === 'function') ?\n                    monthNamesShort.call(calendar, date) :\n                    monthNamesShort[date.month() - calendar.minMonth];\n            }\n        };\n        // Localise numbers if requested and available\n        var digits = this.local.digits;\n        var localiseNumbers = function(value) {\n            return (settings.localNumbers && digits ? digits(value) : value);\n        };\n        var output = '';\n        var literal = false;\n        for (var iFormat = 0; iFormat < format.length; iFormat++) {\n            if (literal) {\n                if (format.charAt(iFormat) === \"'\" && !doubled(\"'\")) {\n                    literal = false;\n                }\n                else {\n                    output += format.charAt(iFormat);\n                }\n            }\n            else {\n                switch (format.charAt(iFormat)) {\n                    case 'd': output += localiseNumbers(formatNumber('d', date.day(), 2)); break;\n                    case 'D': output += formatName('D', date.dayOfWeek(),\n                        dayNamesShort, dayNames); break;\n                    case 'o': output += formatNumber('o', date.dayOfYear(), 3); break;\n                    case 'w': output += formatNumber('w', date.weekOfYear(), 2); break;\n                    case 'm': output += formatMonth(date); break;\n                    case 'M': output += formatMonthName(date, doubled('M')); break;\n                    case 'y':\n                        output += (doubled('y', 2) ? date.year() :\n                            (date.year() % 100 < 10 ? '0' : '') + date.year() % 100);\n                        break;\n                    case 'Y':\n                        doubled('Y', 2);\n                        output += date.formatYear();\n                        break;\n                    case 'J': output += date.toJD(); break;\n                    case '@': output += (date.toJD() - this.UNIX_EPOCH) * this.SECS_PER_DAY; break;\n                    case '!': output += (date.toJD() - this.TICKS_EPOCH) * this.TICKS_PER_DAY; break;\n                    case \"'\":\n                        if (doubled(\"'\")) {\n                            output += \"'\";\n                        }\n                        else {\n                            literal = true;\n                        }\n                        break;\n                    default:\n                        output += format.charAt(iFormat);\n                }\n            }\n        }\n        return output;\n    },\n\n    /** Parse a string value into a date object.\n        See <a href=\"#formatDate\"><code>formatDate</code></a> for the possible formats, plus:\n        <ul>\n        <li>* - ignore rest of string</li>\n        </ul>\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar\n        @param format {string} The expected format of the date ('' for default calendar format).\n        @param value {string} The date in the above format.\n        @param [settings] {object} Additional options whose attributes include:\n        @property [shortYearCutoff] {number} The cutoff year for determining the century.\n        @property [dayNamesShort] {string[]} Abbreviated names of the days from Sunday.\n        @property [dayNames] {string[]} Names of the days from Sunday.\n        @property [monthNamesShort] {string[]} Abbreviated names of the months.\n        @property [monthNames] {string[]} Names of the months.\n        @return {CDate} The extracted date value or <code>null</code> if value is blank.\n        @throws Errors if the format and/or value are missing,\n                if the value doesn't match the format, or if the date is invalid. */\n    parseDate: function(format, value, settings) {\n        if (value == null) {\n            throw main.local.invalidArguments || main.regionalOptions[''].invalidArguments;\n        }\n        value = (typeof value === 'object' ? value.toString() : value + '');\n        if (value === '') {\n            return null;\n        }\n        format = format || this.local.dateFormat;\n        settings = settings || {};\n        var shortYearCutoff = settings.shortYearCutoff || this.shortYearCutoff;\n        shortYearCutoff = (typeof shortYearCutoff !== 'string' ? shortYearCutoff :\n            this.today().year() % 100 + parseInt(shortYearCutoff, 10));\n        var dayNamesShort = settings.dayNamesShort || this.local.dayNamesShort;\n        var dayNames = settings.dayNames || this.local.dayNames;\n        var parseMonth = settings.parseMonth || this.local.parseMonth;\n        var monthNumbers = settings.monthNumbers || this.local.monthNumbers;\n        var monthNamesShort = settings.monthNamesShort || this.local.monthNamesShort;\n        var monthNames = settings.monthNames || this.local.monthNames;\n        var jd = -1;\n        var year = -1;\n        var month = -1;\n        var day = -1;\n        var doy = -1;\n        var shortYear = false;\n        var literal = false;\n        // Check whether a format character is doubled\n        var doubled = function(match, step) {\n            var matches = 1;\n            while (iFormat + matches < format.length && format.charAt(iFormat + matches) === match) {\n                matches++;\n            }\n            iFormat += matches - 1;\n            return Math.floor(matches / (step || 1)) > 1;\n        };\n        // Extract a number from the string value\n        var getNumber = function(match, step) {\n            var isDoubled = doubled(match, step);\n            var size = [2, 3, isDoubled ? 4 : 2, isDoubled ? 4 : 2, 10, 11, 20]['oyYJ@!'.indexOf(match) + 1];\n            var digits = new RegExp('^-?\\\\d{1,' + size + '}');\n            var num = value.substring(iValue).match(digits);\n            if (!num) {\n                throw (main.local.missingNumberAt || main.regionalOptions[''].missingNumberAt).\n                    replace(/\\{0\\}/, iValue);\n            }\n            iValue += num[0].length;\n            return parseInt(num[0], 10);\n        };\n        // Extract a month number from the string value\n        var calendar = this;\n        var getMonthNumber = function() {\n            if (typeof monthNumbers === 'function') {\n                doubled('m');  // update iFormat\n                var month = monthNumbers.call(calendar, value.substring(iValue));\n                iValue += month.length;\n                return month;\n            }\n\n            return getNumber('m');\n        };\n        // Extract a name from the string value and convert to an index\n        var getName = function(match, shortNames, longNames, step) {\n            var names = (doubled(match, step) ? longNames : shortNames);\n            for (var i = 0; i < names.length; i++) {\n                if (value.substr(iValue, names[i].length).toLowerCase() === names[i].toLowerCase()) {\n                    iValue += names[i].length;\n                    return i + calendar.minMonth;\n                }\n            }\n            throw (main.local.unknownNameAt || main.regionalOptions[''].unknownNameAt).\n                replace(/\\{0\\}/, iValue);\n        };\n        // Extract a month number from the string value\n        var getMonthName = function() {\n            if (typeof monthNames === 'function') {\n                var month = doubled('M') ?\n                    monthNames.call(calendar, value.substring(iValue)) :\n                    monthNamesShort.call(calendar, value.substring(iValue));\n                iValue += month.length;\n                return month;\n            }\n\n            return getName('M', monthNamesShort, monthNames);\n        };\n        // Confirm that a literal character matches the string value\n        var checkLiteral = function() {\n            if (value.charAt(iValue) !== format.charAt(iFormat)) {\n                throw (main.local.unexpectedLiteralAt ||\n                    main.regionalOptions[''].unexpectedLiteralAt).replace(/\\{0\\}/, iValue);\n            }\n            iValue++;\n        };\n        var iValue = 0;\n        for (var iFormat = 0; iFormat < format.length; iFormat++) {\n            if (literal) {\n                if (format.charAt(iFormat) === \"'\" && !doubled(\"'\")) {\n                    literal = false;\n                }\n                else {\n                    checkLiteral();\n                }\n            }\n            else {\n                switch (format.charAt(iFormat)) {\n                    case 'd': day = getNumber('d'); break;\n                    case 'D': getName('D', dayNamesShort, dayNames); break;\n                    case 'o': doy = getNumber('o'); break;\n                    case 'w': getNumber('w'); break;\n                    case 'm': month = getMonthNumber(); break;\n                    case 'M': month = getMonthName(); break;\n                    case 'y':\n                        var iSave = iFormat;\n                        shortYear = !doubled('y', 2);\n                        iFormat = iSave;\n                        year = getNumber('y', 2);\n                        break;\n                    case 'Y': year = getNumber('Y', 2); break;\n                    case 'J':\n                        jd = getNumber('J') + 0.5;\n                        if (value.charAt(iValue) === '.') {\n                            iValue++;\n                            getNumber('J');\n                        }\n                        break;\n                    case '@': jd = getNumber('@') / this.SECS_PER_DAY + this.UNIX_EPOCH; break;\n                    case '!': jd = getNumber('!') / this.TICKS_PER_DAY + this.TICKS_EPOCH; break;\n                    case '*': iValue = value.length; break;\n                    case \"'\":\n                        if (doubled(\"'\")) {\n                            checkLiteral();\n                        }\n                        else {\n                            literal = true;\n                        }\n                        break;\n                    default: checkLiteral();\n                }\n            }\n        }\n        if (iValue < value.length) {\n            throw main.local.unexpectedText || main.regionalOptions[''].unexpectedText;\n        }\n        if (year === -1) {\n            year = this.today().year();\n        }\n        else if (year < 100 && shortYear) {\n            year += (shortYearCutoff === -1 ? 1900 : this.today().year() -\n                this.today().year() % 100 - (year <= shortYearCutoff ? 0 : 100));\n        }\n        if (typeof month === 'string') {\n            month = parseMonth.call(this, year, month);\n        }\n        if (doy > -1) {\n            month = 1;\n            day = doy;\n            for (var dim = this.daysInMonth(year, month); day > dim; dim = this.daysInMonth(year, month)) {\n                month++;\n                day -= dim;\n            }\n        }\n        return (jd > -1 ? this.fromJD(jd) : this.newDate(year, month, day));\n    },\n\n    /** A date may be specified as an exact value or a relative one.\n        Found in the <code>jquery.calendars.plus.js</code> module.\n        @memberof BaseCalendar\n        @param dateSpec {CDate|number|string} The date as an object or string in the given format or\n                an offset - numeric days from today, or string amounts and periods, e.g. '+1m +2w'.\n        @param defaultDate {CDate} The date to use if no other supplied, may be <code>null</code>.\n        @param currentDate {CDate} The current date as a possible basis for relative dates,\n                if <code>null</code> today is used (optional)\n        @param [dateFormat] {string} The expected date format - see <a href=\"#formatDate\"><code>formatDate</code></a>.\n        @param [settings] {object} Additional options whose attributes include:\n        @property [shortYearCutoff] {number} The cutoff year for determining the century.\n        @property [dayNamesShort] {string[]} Abbreviated names of the days from Sunday.\n        @property [dayNames] {string[]} Names of the days from Sunday.\n        @property [monthNamesShort] {string[]} Abbreviated names of the months.\n        @property [monthNames] {string[]} Names of the months.\n        @return {CDate} The decoded date. */\n    determineDate: function(dateSpec, defaultDate, currentDate, dateFormat, settings) {\n        if (currentDate && typeof currentDate !== 'object') {\n            settings = dateFormat;\n            dateFormat = currentDate;\n            currentDate = null;\n        }\n        if (typeof dateFormat !== 'string') {\n            settings = dateFormat;\n            dateFormat = '';\n        }\n        var calendar = this;\n        var offsetString = function(offset) {\n            try {\n                return calendar.parseDate(dateFormat, offset, settings);\n            }\n            catch (e) {\n                // Ignore\n            }\n            offset = offset.toLowerCase();\n            var date = (offset.match(/^c/) && currentDate ?\n                currentDate.newDate() : null) || calendar.today();\n            var pattern = /([+-]?[0-9]+)\\s*(d|w|m|y)?/g;\n            var matches = pattern.exec(offset);\n            while (matches) {\n                date.add(parseInt(matches[1], 10), matches[2] || 'd');\n                matches = pattern.exec(offset);\n            }\n            return date;\n        };\n        defaultDate = (defaultDate ? defaultDate.newDate() : null);\n        dateSpec = (dateSpec == null ? defaultDate :\n            (typeof dateSpec === 'string' ? offsetString(dateSpec) : (typeof dateSpec === 'number' ?\n            (isNaN(dateSpec) || dateSpec === Infinity || dateSpec === -Infinity ? defaultDate :\n            calendar.today().add(dateSpec, 'd')) : calendar.newDate(dateSpec))));\n        return dateSpec;\n    }\n});\n\n\n},{\"./main\":558,\"object-assign\":449}],560:[function(_dereq_,module,exports){\nmodule.exports = _dereq_('cwise-compiler')({\n    args: ['array', {\n        offset: [1],\n        array: 0\n    }, 'scalar', 'scalar', 'index'],\n    pre: {\n        \"body\": \"{}\",\n        \"args\": [],\n        \"thisVars\": [],\n        \"localVars\": []\n    },\n    post: {\n        \"body\": \"{}\",\n        \"args\": [],\n        \"thisVars\": [],\n        \"localVars\": []\n    },\n    body: {\n        \"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      }\",\n        \"args\": [{\n            \"name\": \"_inline_1_arg0_\",\n            \"lvalue\": false,\n            \"rvalue\": true,\n            \"count\": 1\n        }, {\n            \"name\": \"_inline_1_arg1_\",\n            \"lvalue\": false,\n            \"rvalue\": true,\n            \"count\": 1\n        }, {\n            \"name\": \"_inline_1_arg2_\",\n            \"lvalue\": false,\n            \"rvalue\": true,\n            \"count\": 1\n        }, {\n            \"name\": \"_inline_1_arg3_\",\n            \"lvalue\": false,\n            \"rvalue\": true,\n            \"count\": 2\n        }, {\n            \"name\": \"_inline_1_arg4_\",\n            \"lvalue\": false,\n            \"rvalue\": true,\n            \"count\": 1\n        }],\n        \"thisVars\": [],\n        \"localVars\": [\"_inline_1_da\", \"_inline_1_db\"]\n    },\n    funcName: 'zeroCrossings'\n})\n\n},{\"cwise-compiler\":139}],561:[function(_dereq_,module,exports){\n\"use strict\"\n\nmodule.exports = findZeroCrossings\n\nvar core = _dereq_(\"./lib/zc-core\")\n\nfunction findZeroCrossings(array, level) {\n  var cross = []\n  level = +level || 0.0\n  core(array.hi(array.shape[0]-1), cross, level)\n  return cross\n}\n},{\"./lib/zc-core\":560}],562:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * All paths are tuned for maximum scalability of the arrowhead,\n * ie throughout arrowwidth=0.3..3 the head is joined smoothly\n * to the line, with the line coming from the left and ending at (0, 0).\n *\n * `backoff` is the distance to move the arrowhead and the end of the line,\n * in order that the arrowhead points to the desired place, either at\n * the tip of the arrow or (in the case of circle or square)\n * the center of the symbol.\n *\n * `noRotate`, if truthy, says that this arrowhead should not rotate with the\n * arrow. That's the case for squares, which should always be straight, and\n * circles, for which it's irrelevant.\n */\n\nmodule.exports = [\n    // no arrow\n    {\n        path: '',\n        backoff: 0\n    },\n    // wide with flat back\n    {\n        path: 'M-2.4,-3V3L0.6,0Z',\n        backoff: 0.6\n    },\n    // narrower with flat back\n    {\n        path: 'M-3.7,-2.5V2.5L1.3,0Z',\n        backoff: 1.3\n    },\n    // barbed\n    {\n        path: 'M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z',\n        backoff: 1.55\n    },\n    // wide line-drawn\n    {\n        path: 'M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z',\n        backoff: 1.6\n    },\n    // narrower line-drawn\n    {\n        path: 'M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z',\n        backoff: 2\n    },\n    // circle\n    {\n        path: 'M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z',\n        backoff: 0,\n        noRotate: true\n    },\n    // square\n    {\n        path: 'M2,2V-2H-2V2Z',\n        backoff: 0,\n        noRotate: true\n    }\n];\n\n},{}],563:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar ARROWPATHS = _dereq_('./arrow_paths');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar cartesianConstants = _dereq_('../../plots/cartesian/constants');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\n\nmodule.exports = templatedArray('annotation', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc+arraydraw',\n        \n    },\n\n    text: {\n        valType: 'string',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    textangle: {\n        valType: 'angle',\n        dflt: 0,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    font: fontAttrs({\n        editType: 'calc+arraydraw',\n        colorEditType: 'arraydraw',\n        \n    }),\n    width: {\n        valType: 'number',\n        min: 1,\n        dflt: null,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    height: {\n        valType: 'number',\n        min: 1,\n        dflt: null,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    opacity: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 1,\n        \n        editType: 'arraydraw',\n        \n    },\n    align: {\n        valType: 'enumerated',\n        values: ['left', 'center', 'right'],\n        dflt: 'center',\n        \n        editType: 'arraydraw',\n        \n    },\n    valign: {\n        valType: 'enumerated',\n        values: ['top', 'middle', 'bottom'],\n        dflt: 'middle',\n        \n        editType: 'arraydraw',\n        \n    },\n    bgcolor: {\n        valType: 'color',\n        dflt: 'rgba(0,0,0,0)',\n        \n        editType: 'arraydraw',\n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: 'rgba(0,0,0,0)',\n        \n        editType: 'arraydraw',\n        \n    },\n    borderpad: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    borderwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    // arrow\n    showarrow: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    arrowcolor: {\n        valType: 'color',\n        \n        editType: 'arraydraw',\n        \n    },\n    arrowhead: {\n        valType: 'integer',\n        min: 0,\n        max: ARROWPATHS.length,\n        dflt: 1,\n        \n        editType: 'arraydraw',\n        \n    },\n    startarrowhead: {\n        valType: 'integer',\n        min: 0,\n        max: ARROWPATHS.length,\n        dflt: 1,\n        \n        editType: 'arraydraw',\n        \n    },\n    arrowside: {\n        valType: 'flaglist',\n        flags: ['end', 'start'],\n        extras: ['none'],\n        dflt: 'end',\n        \n        editType: 'arraydraw',\n        \n    },\n    arrowsize: {\n        valType: 'number',\n        min: 0.3,\n        dflt: 1,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    startarrowsize: {\n        valType: 'number',\n        min: 0.3,\n        dflt: 1,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    arrowwidth: {\n        valType: 'number',\n        min: 0.1,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    standoff: {\n        valType: 'number',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    startstandoff: {\n        valType: 'number',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    ax: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    ay: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    axref: {\n        valType: 'enumerated',\n        dflt: 'pixel',\n        values: [\n            'pixel',\n            cartesianConstants.idRegex.x.toString()\n        ],\n        \n        editType: 'calc',\n        \n    },\n    ayref: {\n        valType: 'enumerated',\n        dflt: 'pixel',\n        values: [\n            'pixel',\n            cartesianConstants.idRegex.y.toString()\n        ],\n        \n        editType: 'calc',\n        \n    },\n    // positioning\n    xref: {\n        valType: 'enumerated',\n        values: [\n            'paper',\n            cartesianConstants.idRegex.x.toString()\n        ],\n        \n        editType: 'calc',\n        \n    },\n    x: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    xanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'left', 'center', 'right'],\n        dflt: 'auto',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    xshift: {\n        valType: 'number',\n        dflt: 0,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    yref: {\n        valType: 'enumerated',\n        values: [\n            'paper',\n            cartesianConstants.idRegex.y.toString()\n        ],\n        \n        editType: 'calc',\n        \n    },\n    y: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'top', 'middle', 'bottom'],\n        dflt: 'auto',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    yshift: {\n        valType: 'number',\n        dflt: 0,\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    clicktoshow: {\n        valType: 'enumerated',\n        values: [false, 'onoff', 'onout'],\n        dflt: false,\n        \n        editType: 'arraydraw',\n        \n    },\n    xclick: {\n        valType: 'any',\n        \n        editType: 'arraydraw',\n        \n    },\n    yclick: {\n        valType: 'any',\n        \n        editType: 'arraydraw',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        editType: 'arraydraw',\n        \n    },\n    hoverlabel: {\n        bgcolor: {\n            valType: 'color',\n            \n            editType: 'arraydraw',\n            \n        },\n        bordercolor: {\n            valType: 'color',\n            \n            editType: 'arraydraw',\n            \n        },\n        font: fontAttrs({\n            editType: 'arraydraw',\n            \n        }),\n        editType: 'arraydraw'\n    },\n    captureevents: {\n        valType: 'boolean',\n        \n        editType: 'arraydraw',\n        \n    },\n    editType: 'calc',\n\n    _deprecated: {\n        ref: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        }\n    }\n});\n\n},{\"../../plot_api/plot_template\":741,\"../../plots/cartesian/constants\":757,\"../../plots/font_attributes\":777,\"./arrow_paths\":562}],564:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar draw = _dereq_('./draw').draw;\n\n\nmodule.exports = function calcAutorange(gd) {\n    var fullLayout = gd._fullLayout;\n    var annotationList = Lib.filterVisible(fullLayout.annotations);\n\n    if(annotationList.length && gd._fullData.length) {\n        return Lib.syncOrAsync([draw, annAutorange], gd);\n    }\n};\n\nfunction annAutorange(gd) {\n    var fullLayout = gd._fullLayout;\n\n    // find the bounding boxes for each of these annotations'\n    // relative to their anchor points\n    // use the arrow and the text bg rectangle,\n    // as the whole anno may include hidden text in its bbox\n    Lib.filterVisible(fullLayout.annotations).forEach(function(ann) {\n        var xa = Axes.getFromId(gd, ann.xref);\n        var ya = Axes.getFromId(gd, ann.yref);\n\n        ann._extremes = {};\n        if(xa) calcAxisExpansion(ann, xa);\n        if(ya) calcAxisExpansion(ann, ya);\n    });\n}\n\nfunction calcAxisExpansion(ann, ax) {\n    var axId = ax._id;\n    var letter = axId.charAt(0);\n    var pos = ann[letter];\n    var apos = ann['a' + letter];\n    var ref = ann[letter + 'ref'];\n    var aref = ann['a' + letter + 'ref'];\n    var padplus = ann['_' + letter + 'padplus'];\n    var padminus = ann['_' + letter + 'padminus'];\n    var shift = {x: 1, y: -1}[letter] * ann[letter + 'shift'];\n    var headSize = 3 * ann.arrowsize * ann.arrowwidth || 0;\n    var headPlus = headSize + shift;\n    var headMinus = headSize - shift;\n    var startHeadSize = 3 * ann.startarrowsize * ann.arrowwidth || 0;\n    var startHeadPlus = startHeadSize + shift;\n    var startHeadMinus = startHeadSize - shift;\n    var extremes;\n\n    if(aref === ref) {\n        // expand for the arrowhead (padded by arrowhead)\n        var extremeArrowHead = Axes.findExtremes(ax, [ax.r2c(pos)], {\n            ppadplus: headPlus,\n            ppadminus: headMinus\n        });\n        // again for the textbox (padded by textbox)\n        var extremeText = Axes.findExtremes(ax, [ax.r2c(apos)], {\n            ppadplus: Math.max(padplus, startHeadPlus),\n            ppadminus: Math.max(padminus, startHeadMinus)\n        });\n        extremes = {\n            min: [extremeArrowHead.min[0], extremeText.min[0]],\n            max: [extremeArrowHead.max[0], extremeText.max[0]]\n        };\n    } else {\n        startHeadPlus = apos ? startHeadPlus + apos : startHeadPlus;\n        startHeadMinus = apos ? startHeadMinus - apos : startHeadMinus;\n        extremes = Axes.findExtremes(ax, [ax.r2c(pos)], {\n            ppadplus: Math.max(padplus, headPlus, startHeadPlus),\n            ppadminus: Math.max(padminus, headMinus, startHeadMinus)\n        });\n    }\n\n    ann._extremes[axId] = extremes;\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"./draw\":569}],565:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\nvar arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;\n\nmodule.exports = {\n    hasClickToShow: hasClickToShow,\n    onClick: onClick\n};\n\n/*\n * hasClickToShow: does the given hoverData have ANY annotations which will\n * turn ON if we click here? (used by hover events to set cursor)\n *\n * gd: graphDiv\n * hoverData: a hoverData array, as included with the *plotly_hover* or\n *     *plotly_click* events in the `points` attribute\n *\n * returns: boolean\n */\nfunction hasClickToShow(gd, hoverData) {\n    var sets = getToggleSets(gd, hoverData);\n    return sets.on.length > 0 || sets.explicitOff.length > 0;\n}\n\n/*\n * onClick: perform the toggling (via Plotly.update) implied by clicking\n * at this hoverData\n *\n * gd: graphDiv\n * hoverData: a hoverData array, as included with the *plotly_hover* or\n *     *plotly_click* events in the `points` attribute\n *\n * returns: Promise that the update is complete\n */\nfunction onClick(gd, hoverData) {\n    var toggleSets = getToggleSets(gd, hoverData);\n    var onSet = toggleSets.on;\n    var offSet = toggleSets.off.concat(toggleSets.explicitOff);\n    var update = {};\n    var annotationsOut = gd._fullLayout.annotations;\n    var i, editHelpers;\n\n    if(!(onSet.length || offSet.length)) return;\n\n    for(i = 0; i < onSet.length; i++) {\n        editHelpers = arrayEditor(gd.layout, 'annotations', annotationsOut[onSet[i]]);\n        editHelpers.modifyItem('visible', true);\n        Lib.extendFlat(update, editHelpers.getUpdateObj());\n    }\n\n    for(i = 0; i < offSet.length; i++) {\n        editHelpers = arrayEditor(gd.layout, 'annotations', annotationsOut[offSet[i]]);\n        editHelpers.modifyItem('visible', false);\n        Lib.extendFlat(update, editHelpers.getUpdateObj());\n    }\n\n    return Registry.call('update', gd, {}, update);\n}\n\n/*\n * getToggleSets: find the annotations which will turn on or off at this\n * hoverData\n *\n * gd: graphDiv\n * hoverData: a hoverData array, as included with the *plotly_hover* or\n *     *plotly_click* events in the `points` attribute\n *\n * returns: {\n *   on: Array (indices of annotations to turn on),\n *   off: Array (indices to turn off because you're not hovering on them),\n *   explicitOff: Array (indices to turn off because you *are* hovering on them)\n * }\n */\nfunction getToggleSets(gd, hoverData) {\n    var annotations = gd._fullLayout.annotations;\n    var onSet = [];\n    var offSet = [];\n    var explicitOffSet = [];\n    var hoverLen = (hoverData || []).length;\n\n    var i, j, anni, showMode, pointj, xa, ya, toggleType;\n\n    for(i = 0; i < annotations.length; i++) {\n        anni = annotations[i];\n        showMode = anni.clicktoshow;\n\n        if(showMode) {\n            for(j = 0; j < hoverLen; j++) {\n                pointj = hoverData[j];\n                xa = pointj.xaxis;\n                ya = pointj.yaxis;\n\n                if(xa._id === anni.xref &&\n                    ya._id === anni.yref &&\n                    xa.d2r(pointj.x) === clickData2r(anni._xclick, xa) &&\n                    ya.d2r(pointj.y) === clickData2r(anni._yclick, ya)\n                ) {\n                    // match! toggle this annotation\n                    // regardless of its clicktoshow mode\n                    // but if it's onout mode, off is implicit\n                    if(anni.visible) {\n                        if(showMode === 'onout') toggleType = offSet;\n                        else toggleType = explicitOffSet;\n                    } else {\n                        toggleType = onSet;\n                    }\n                    toggleType.push(i);\n                    break;\n                }\n            }\n\n            if(j === hoverLen) {\n                // no match - only turn this annotation OFF, and only if\n                // showmode is 'onout'\n                if(anni.visible && showMode === 'onout') offSet.push(i);\n            }\n        }\n    }\n\n    return {on: onSet, off: offSet, explicitOff: explicitOffSet};\n}\n\n// to handle log axes until v2\nfunction clickData2r(d, ax) {\n    return ax.type === 'log' ? ax.l2r(d) : ax.d2r(d);\n}\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../registry\":831}],566:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../color');\n\n// defaults common to 'annotations' and 'annotations3d'\nmodule.exports = function handleAnnotationCommonDefaults(annIn, annOut, fullLayout, coerce) {\n    coerce('opacity');\n    var bgColor = coerce('bgcolor');\n\n    var borderColor = coerce('bordercolor');\n    var borderOpacity = Color.opacity(borderColor);\n\n    coerce('borderpad');\n\n    var borderWidth = coerce('borderwidth');\n    var showArrow = coerce('showarrow');\n\n    coerce('text', showArrow ? ' ' : fullLayout._dfltTitle.annotation);\n    coerce('textangle');\n    Lib.coerceFont(coerce, 'font', fullLayout.font);\n\n    coerce('width');\n    coerce('align');\n\n    var h = coerce('height');\n    if(h) coerce('valign');\n\n    if(showArrow) {\n        var arrowside = coerce('arrowside');\n        var arrowhead;\n        var arrowsize;\n\n        if(arrowside.indexOf('end') !== -1) {\n            arrowhead = coerce('arrowhead');\n            arrowsize = coerce('arrowsize');\n        }\n\n        if(arrowside.indexOf('start') !== -1) {\n            coerce('startarrowhead', arrowhead);\n            coerce('startarrowsize', arrowsize);\n        }\n        coerce('arrowcolor', borderOpacity ? annOut.bordercolor : Color.defaultLine);\n        coerce('arrowwidth', ((borderOpacity && borderWidth) || 1) * 2);\n        coerce('standoff');\n        coerce('startstandoff');\n    }\n\n    var hoverText = coerce('hovertext');\n    var globalHoverLabel = fullLayout.hoverlabel || {};\n\n    if(hoverText) {\n        var hoverBG = coerce('hoverlabel.bgcolor', globalHoverLabel.bgcolor ||\n            (Color.opacity(bgColor) ? Color.rgb(bgColor) : Color.defaultLine)\n        );\n\n        var hoverBorder = coerce('hoverlabel.bordercolor', globalHoverLabel.bordercolor ||\n            Color.contrast(hoverBG)\n        );\n\n        Lib.coerceFont(coerce, 'hoverlabel.font', {\n            family: globalHoverLabel.font.family,\n            size: globalHoverLabel.font.size,\n            color: globalHoverLabel.font.color || hoverBorder\n        });\n    }\n\n    coerce('captureevents', !!hoverText);\n};\n\n},{\"../../lib\":703,\"../color\":580}],567:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar toLogRange = _dereq_('../../lib/to_log_range');\n\n/*\n * convertCoords: when converting an axis between log and linear\n * you need to alter any annotations on that axis to keep them\n * pointing at the same data point.\n * In v2.0 this will become obsolete\n *\n * gd: the plot div\n * ax: the axis being changed\n * newType: the type it's getting\n * doExtra: function(attr, val) from inside relayout that sets the attribute.\n *     Use this to make the changes as it's aware if any other changes in the\n *     same relayout call should override this conversion.\n */\nmodule.exports = function convertCoords(gd, ax, newType, doExtra) {\n    ax = ax || {};\n\n    var toLog = (newType === 'log') && (ax.type === 'linear');\n    var fromLog = (newType === 'linear') && (ax.type === 'log');\n\n    if(!(toLog || fromLog)) return;\n\n    var annotations = gd._fullLayout.annotations;\n    var axLetter = ax._id.charAt(0);\n    var ann;\n    var attrPrefix;\n\n    function convert(attr) {\n        var currentVal = ann[attr];\n        var newVal = null;\n\n        if(toLog) newVal = toLogRange(currentVal, ax.range);\n        else newVal = Math.pow(10, currentVal);\n\n        // if conversion failed, delete the value so it gets a default value\n        if(!isNumeric(newVal)) newVal = null;\n\n        doExtra(attrPrefix + attr, newVal);\n    }\n\n    for(var i = 0; i < annotations.length; i++) {\n        ann = annotations[i];\n        attrPrefix = 'annotations[' + i + '].';\n\n        if(ann[axLetter + 'ref'] === ax._id) convert(axLetter);\n        if(ann['a' + axLetter + 'ref'] === ax._id) convert('a' + axLetter);\n    }\n};\n\n},{\"../../lib/to_log_range\":729,\"fast-isnumeric\":224}],568:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar handleAnnotationCommonDefaults = _dereq_('./common_defaults');\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    handleArrayContainerDefaults(layoutIn, layoutOut, {\n        name: 'annotations',\n        handleItemDefaults: handleAnnotationDefaults\n    });\n};\n\nfunction handleAnnotationDefaults(annIn, annOut, fullLayout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(annIn, annOut, attributes, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n    var clickToShow = coerce('clicktoshow');\n\n    if(!(visible || clickToShow)) return;\n\n    handleAnnotationCommonDefaults(annIn, annOut, fullLayout, coerce);\n\n    var showArrow = annOut.showarrow;\n\n    // positioning\n    var axLetters = ['x', 'y'];\n    var arrowPosDflt = [-10, -30];\n    var gdMock = {_fullLayout: fullLayout};\n\n    for(var i = 0; i < 2; i++) {\n        var axLetter = axLetters[i];\n\n        // xref, yref\n        var axRef = Axes.coerceRef(annIn, annOut, gdMock, axLetter, '', 'paper');\n\n        if(axRef !== 'paper') {\n            var ax = Axes.getFromId(gdMock, axRef);\n            ax._annIndices.push(annOut._index);\n        }\n\n        // x, y\n        Axes.coercePosition(annOut, gdMock, coerce, axRef, axLetter, 0.5);\n\n        if(showArrow) {\n            var arrowPosAttr = 'a' + axLetter;\n            // axref, ayref\n            var aaxRef = Axes.coerceRef(annIn, annOut, gdMock, arrowPosAttr, 'pixel');\n\n            // for now the arrow can only be on the same axis or specified as pixels\n            // TODO: sometime it might be interesting to allow it to be on *any* axis\n            // but that would require updates to drawing & autorange code and maybe more\n            if(aaxRef !== 'pixel' && aaxRef !== axRef) {\n                aaxRef = annOut[arrowPosAttr] = 'pixel';\n            }\n\n            // ax, ay\n            var aDflt = (aaxRef === 'pixel') ? arrowPosDflt[i] : 0.4;\n            Axes.coercePosition(annOut, gdMock, coerce, aaxRef, arrowPosAttr, aDflt);\n        }\n\n        // xanchor, yanchor\n        coerce(axLetter + 'anchor');\n\n        // xshift, yshift\n        coerce(axLetter + 'shift');\n    }\n\n    // if you have one coordinate you should have both\n    Lib.noneOrAll(annIn, annOut, ['x', 'y']);\n\n    // if you have one part of arrow length you should have both\n    if(showArrow) {\n        Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);\n    }\n\n    if(clickToShow) {\n        var xClick = coerce('xclick');\n        var yClick = coerce('yclick');\n\n        // put the actual click data to bind to into private attributes\n        // so we don't have to do this little bit of logic on every hover event\n        annOut._xclick = (xClick === undefined) ?\n            annOut.x :\n            Axes.cleanPosition(xClick, gdMock, annOut.xref);\n        annOut._yclick = (yClick === undefined) ?\n            annOut.y :\n            Axes.cleanPosition(yClick, gdMock, annOut.yref);\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/cartesian/axes\":751,\"./attributes\":563,\"./common_defaults\":566}],569:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Plots = _dereq_('../../plots/plots');\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\nvar Fx = _dereq_('../fx');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar setCursor = _dereq_('../../lib/setcursor');\nvar dragElement = _dereq_('../dragelement');\nvar arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;\n\nvar drawArrowHead = _dereq_('./draw_arrow_head');\n\n// Annotations are stored in gd.layout.annotations, an array of objects\n// index can point to one item in this array,\n//  or non-numeric to simply add a new one\n//  or -1 to modify all existing\n// opt can be the full options object, or one key (to be set to value)\n//  or undefined to simply redraw\n// if opt is blank, val can be 'add' or a full options object to add a new\n//  annotation at that point in the array, or 'remove' to delete this one\n\nmodule.exports = {\n    draw: draw,\n    drawOne: drawOne,\n    drawRaw: drawRaw\n};\n\n/*\n * draw: draw all annotations without any new modifications\n */\nfunction draw(gd) {\n    var fullLayout = gd._fullLayout;\n\n    fullLayout._infolayer.selectAll('.annotation').remove();\n\n    for(var i = 0; i < fullLayout.annotations.length; i++) {\n        if(fullLayout.annotations[i].visible) {\n            drawOne(gd, i);\n        }\n    }\n\n    return Plots.previousPromises(gd);\n}\n\n/*\n * drawOne: draw a single cartesian or paper-ref annotation, potentially with modifications\n *\n * index (int): the annotation to draw\n */\nfunction drawOne(gd, index) {\n    var fullLayout = gd._fullLayout;\n    var options = fullLayout.annotations[index] || {};\n    var xa = Axes.getFromId(gd, options.xref);\n    var ya = Axes.getFromId(gd, options.yref);\n\n    if(xa) xa.setScale();\n    if(ya) ya.setScale();\n\n    drawRaw(gd, options, index, false, xa, ya);\n}\n\n/**\n * drawRaw: draw a single annotation, potentially with modifications\n *\n * @param {DOM element} gd\n * @param {object} options : this annotation's fullLayout options\n * @param {integer} index : index in 'annotations' container of the annotation to draw\n * @param {string} subplotId : id of the annotation's subplot\n *  - use false for 2d (i.e. cartesian or paper-ref) annotations\n * @param {object | undefined} xa : full x-axis object to compute subplot pos-to-px\n * @param {object | undefined} ya : ... y-axis\n */\nfunction drawRaw(gd, options, index, subplotId, xa, ya) {\n    var fullLayout = gd._fullLayout;\n    var gs = gd._fullLayout._size;\n    var edits = gd._context.edits;\n\n    var className, containerStr;\n\n    if(subplotId) {\n        className = 'annotation-' + subplotId;\n        containerStr = subplotId + '.annotations';\n    } else {\n        className = 'annotation';\n        containerStr = 'annotations';\n    }\n\n    var editHelpers = arrayEditor(gd.layout, containerStr, options);\n    var modifyBase = editHelpers.modifyBase;\n    var modifyItem = editHelpers.modifyItem;\n    var getUpdateObj = editHelpers.getUpdateObj;\n\n    // remove the existing annotation if there is one\n    fullLayout._infolayer\n        .selectAll('.' + className + '[data-index=\"' + index + '\"]')\n        .remove();\n\n    var annClipID = 'clip' + fullLayout._uid + '_ann' + index;\n\n    // this annotation is gone - quit now after deleting it\n    // TODO: use d3 idioms instead of deleting and redrawing every time\n    if(!options._input || options.visible === false) {\n        d3.selectAll('#' + annClipID).remove();\n        return;\n    }\n\n    // calculated pixel positions\n    // x & y each will get text, head, and tail as appropriate\n    var annPosPx = {x: {}, y: {}};\n    var textangle = +options.textangle || 0;\n\n    // create the components\n    // made a single group to contain all, so opacity can work right\n    // with border/arrow together this could handle a whole bunch of\n    // cleanup at this point, but works for now\n    var annGroup = fullLayout._infolayer.append('g')\n        .classed(className, true)\n        .attr('data-index', String(index))\n        .style('opacity', options.opacity);\n\n    // another group for text+background so that they can rotate together\n    var annTextGroup = annGroup.append('g')\n        .classed('annotation-text-g', true);\n\n    var editTextPosition = edits[options.showarrow ? 'annotationTail' : 'annotationPosition'];\n    var textEvents = options.captureevents || edits.annotationText || editTextPosition;\n\n    var annTextGroupInner = annTextGroup.append('g')\n        .style('pointer-events', textEvents ? 'all' : null)\n        .call(setCursor, 'pointer')\n        .on('click', function() {\n            gd._dragging = false;\n\n            var eventData = {\n                index: index,\n                annotation: options._input,\n                fullAnnotation: options,\n                event: d3.event\n            };\n\n            if(subplotId) {\n                eventData.subplotId = subplotId;\n            }\n\n            gd.emit('plotly_clickannotation', eventData);\n        });\n\n    if(options.hovertext) {\n        annTextGroupInner\n        .on('mouseover', function() {\n            var hoverOptions = options.hoverlabel;\n            var hoverFont = hoverOptions.font;\n            var bBox = this.getBoundingClientRect();\n            var bBoxRef = gd.getBoundingClientRect();\n\n            Fx.loneHover({\n                x0: bBox.left - bBoxRef.left,\n                x1: bBox.right - bBoxRef.left,\n                y: (bBox.top + bBox.bottom) / 2 - bBoxRef.top,\n                text: options.hovertext,\n                color: hoverOptions.bgcolor,\n                borderColor: hoverOptions.bordercolor,\n                fontFamily: hoverFont.family,\n                fontSize: hoverFont.size,\n                fontColor: hoverFont.color\n            }, {\n                container: fullLayout._hoverlayer.node(),\n                outerContainer: fullLayout._paper.node(),\n                gd: gd\n            });\n        })\n        .on('mouseout', function() {\n            Fx.loneUnhover(fullLayout._hoverlayer.node());\n        });\n    }\n\n    var borderwidth = options.borderwidth;\n    var borderpad = options.borderpad;\n    var borderfull = borderwidth + borderpad;\n\n    var annTextBG = annTextGroupInner.append('rect')\n        .attr('class', 'bg')\n        .style('stroke-width', borderwidth + 'px')\n        .call(Color.stroke, options.bordercolor)\n        .call(Color.fill, options.bgcolor);\n\n    var isSizeConstrained = options.width || options.height;\n\n    var annTextClip = fullLayout._topclips\n        .selectAll('#' + annClipID)\n        .data(isSizeConstrained ? [0] : []);\n\n    annTextClip.enter().append('clipPath')\n        .classed('annclip', true)\n        .attr('id', annClipID)\n      .append('rect');\n    annTextClip.exit().remove();\n\n    var font = options.font;\n\n    var text = fullLayout._meta ?\n        Lib.templateString(options.text, fullLayout._meta) :\n        options.text;\n\n    var annText = annTextGroupInner.append('text')\n        .classed('annotation-text', true)\n        .text(text);\n\n    function textLayout(s) {\n        s.call(Drawing.font, font)\n        .attr({\n            'text-anchor': {\n                left: 'start',\n                right: 'end'\n            }[options.align] || 'middle'\n        });\n\n        svgTextUtils.convertToTspans(s, gd, drawGraphicalElements);\n        return s;\n    }\n\n    function drawGraphicalElements() {\n        // if the text has *only* a link, make the whole box into a link\n        var anchor3 = annText.selectAll('a');\n        if(anchor3.size() === 1 && anchor3.text() === annText.text()) {\n            var wholeLink = annTextGroupInner.insert('a', ':first-child').attr({\n                'xlink:xlink:href': anchor3.attr('xlink:href'),\n                'xlink:xlink:show': anchor3.attr('xlink:show')\n            })\n            .style({cursor: 'pointer'});\n\n            wholeLink.node().appendChild(annTextBG.node());\n        }\n\n        var mathjaxGroup = annTextGroupInner.select('.annotation-text-math-group');\n        var hasMathjax = !mathjaxGroup.empty();\n        var anntextBB = Drawing.bBox(\n                (hasMathjax ? mathjaxGroup : annText).node());\n        var textWidth = anntextBB.width;\n        var textHeight = anntextBB.height;\n        var annWidth = options.width || textWidth;\n        var annHeight = options.height || textHeight;\n        var outerWidth = Math.round(annWidth + 2 * borderfull);\n        var outerHeight = Math.round(annHeight + 2 * borderfull);\n\n        function shiftFraction(v, anchor) {\n            if(anchor === 'auto') {\n                if(v < 1 / 3) anchor = 'left';\n                else if(v > 2 / 3) anchor = 'right';\n                else anchor = 'center';\n            }\n            return {\n                center: 0,\n                middle: 0,\n                left: 0.5,\n                bottom: -0.5,\n                right: -0.5,\n                top: 0.5\n            }[anchor];\n        }\n\n        var annotationIsOffscreen = false;\n        var letters = ['x', 'y'];\n\n        for(var i = 0; i < letters.length; i++) {\n            var axLetter = letters[i];\n            var axRef = options[axLetter + 'ref'] || axLetter;\n            var tailRef = options['a' + axLetter + 'ref'];\n            var ax = {x: xa, y: ya}[axLetter];\n            var dimAngle = (textangle + (axLetter === 'x' ? 0 : -90)) * Math.PI / 180;\n            // note that these two can be either positive or negative\n            var annSizeFromWidth = outerWidth * Math.cos(dimAngle);\n            var annSizeFromHeight = outerHeight * Math.sin(dimAngle);\n            // but this one is the positive total size\n            var annSize = Math.abs(annSizeFromWidth) + Math.abs(annSizeFromHeight);\n            var anchor = options[axLetter + 'anchor'];\n            var overallShift = options[axLetter + 'shift'] * (axLetter === 'x' ? 1 : -1);\n            var posPx = annPosPx[axLetter];\n            var basePx;\n            var textPadShift;\n            var alignPosition;\n            var autoAlignFraction;\n            var textShift;\n\n            /*\n             * calculate the *primary* pixel position\n             * which is the arrowhead if there is one,\n             * otherwise the text anchor point\n             */\n            if(ax) {\n                // check if annotation is off screen, to bypass DOM manipulations\n                var posFraction = ax.r2fraction(options[axLetter]);\n                if(posFraction < 0 || posFraction > 1) {\n                    if(tailRef === axRef) {\n                        posFraction = ax.r2fraction(options['a' + axLetter]);\n                        if(posFraction < 0 || posFraction > 1) {\n                            annotationIsOffscreen = true;\n                        }\n                    } else {\n                        annotationIsOffscreen = true;\n                    }\n                }\n                basePx = ax._offset + ax.r2p(options[axLetter]);\n                autoAlignFraction = 0.5;\n            } else {\n                if(axLetter === 'x') {\n                    alignPosition = options[axLetter];\n                    basePx = gs.l + gs.w * alignPosition;\n                } else {\n                    alignPosition = 1 - options[axLetter];\n                    basePx = gs.t + gs.h * alignPosition;\n                }\n                autoAlignFraction = options.showarrow ? 0.5 : alignPosition;\n            }\n\n            // now translate this into pixel positions of head, tail, and text\n            // as well as paddings for autorange\n            if(options.showarrow) {\n                posPx.head = basePx;\n\n                var arrowLength = options['a' + axLetter];\n\n                // with an arrow, the text rotates around the anchor point\n                textShift = annSizeFromWidth * shiftFraction(0.5, options.xanchor) -\n                    annSizeFromHeight * shiftFraction(0.5, options.yanchor);\n\n                if(tailRef === axRef) {\n                    posPx.tail = ax._offset + ax.r2p(arrowLength);\n                    // tail is data-referenced: autorange pads the text in px from the tail\n                    textPadShift = textShift;\n                } else {\n                    posPx.tail = basePx + arrowLength;\n                    // tail is specified in px from head, so autorange also pads vs head\n                    textPadShift = textShift + arrowLength;\n                }\n\n                posPx.text = posPx.tail + textShift;\n\n                // constrain pixel/paper referenced so the draggers are at least\n                // partially visible\n                var maxPx = fullLayout[(axLetter === 'x') ? 'width' : 'height'];\n                if(axRef === 'paper') {\n                    posPx.head = Lib.constrain(posPx.head, 1, maxPx - 1);\n                }\n                if(tailRef === 'pixel') {\n                    var shiftPlus = -Math.max(posPx.tail - 3, posPx.text);\n                    var shiftMinus = Math.min(posPx.tail + 3, posPx.text) - maxPx;\n                    if(shiftPlus > 0) {\n                        posPx.tail += shiftPlus;\n                        posPx.text += shiftPlus;\n                    } else if(shiftMinus > 0) {\n                        posPx.tail -= shiftMinus;\n                        posPx.text -= shiftMinus;\n                    }\n                }\n\n                posPx.tail += overallShift;\n                posPx.head += overallShift;\n            } else {\n                // with no arrow, the text rotates and *then* we put the anchor\n                // relative to the new bounding box\n                textShift = annSize * shiftFraction(autoAlignFraction, anchor);\n                textPadShift = textShift;\n                posPx.text = basePx + textShift;\n            }\n\n            posPx.text += overallShift;\n            textShift += overallShift;\n            textPadShift += overallShift;\n\n            // padplus/minus are used by autorange\n            options['_' + axLetter + 'padplus'] = (annSize / 2) + textPadShift;\n            options['_' + axLetter + 'padminus'] = (annSize / 2) - textPadShift;\n\n            // size/shift are used during dragging\n            options['_' + axLetter + 'size'] = annSize;\n            options['_' + axLetter + 'shift'] = textShift;\n        }\n\n        // We have everything we need for calcAutorange at this point,\n        // we can safely exit - unless we're currently dragging the plot\n        if(!gd._dragging && annotationIsOffscreen) {\n            annTextGroupInner.remove();\n            return;\n        }\n\n        var xShift = 0;\n        var yShift = 0;\n\n        if(options.align !== 'left') {\n            xShift = (annWidth - textWidth) * (options.align === 'center' ? 0.5 : 1);\n        }\n        if(options.valign !== 'top') {\n            yShift = (annHeight - textHeight) * (options.valign === 'middle' ? 0.5 : 1);\n        }\n\n        if(hasMathjax) {\n            mathjaxGroup.select('svg').attr({\n                x: borderfull + xShift - 1,\n                y: borderfull + yShift\n            })\n            .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null, gd);\n        } else {\n            var texty = borderfull + yShift - anntextBB.top;\n            var textx = borderfull + xShift - anntextBB.left;\n\n            annText.call(svgTextUtils.positionText, textx, texty)\n                .call(Drawing.setClipUrl, isSizeConstrained ? annClipID : null, gd);\n        }\n\n        annTextClip.select('rect').call(Drawing.setRect, borderfull, borderfull,\n            annWidth, annHeight);\n\n        annTextBG.call(Drawing.setRect, borderwidth / 2, borderwidth / 2,\n            outerWidth - borderwidth, outerHeight - borderwidth);\n\n        annTextGroupInner.call(Drawing.setTranslate,\n            Math.round(annPosPx.x.text - outerWidth / 2),\n            Math.round(annPosPx.y.text - outerHeight / 2));\n\n        /*\n         * rotate text and background\n         * we already calculated the text center position *as rotated*\n         * because we needed that for autoranging anyway, so now whether\n         * we have an arrow or not, we rotate about the text center.\n         */\n        annTextGroup.attr({transform: 'rotate(' + textangle + ',' +\n                            annPosPx.x.text + ',' + annPosPx.y.text + ')'});\n\n        /*\n         * add the arrow\n         * uses options[arrowwidth,arrowcolor,arrowhead] for styling\n         * dx and dy are normally zero, but when you are dragging the textbox\n         * while the head stays put, dx and dy are the pixel offsets\n         */\n        var drawArrow = function(dx, dy) {\n            annGroup\n                .selectAll('.annotation-arrow-g')\n                .remove();\n\n            var headX = annPosPx.x.head;\n            var headY = annPosPx.y.head;\n            var tailX = annPosPx.x.tail + dx;\n            var tailY = annPosPx.y.tail + dy;\n            var textX = annPosPx.x.text + dx;\n            var textY = annPosPx.y.text + dy;\n\n            // find the edge of the text box, where we'll start the arrow:\n            // create transform matrix to rotate the text box corners\n            var transform = Lib.rotationXYMatrix(textangle, textX, textY);\n            var applyTransform = Lib.apply2DTransform(transform);\n            var applyTransform2 = Lib.apply2DTransform2(transform);\n\n            // calculate and transform bounding box\n            var width = +annTextBG.attr('width');\n            var height = +annTextBG.attr('height');\n            var xLeft = textX - 0.5 * width;\n            var xRight = xLeft + width;\n            var yTop = textY - 0.5 * height;\n            var yBottom = yTop + height;\n            var edges = [\n                [xLeft, yTop, xLeft, yBottom],\n                [xLeft, yBottom, xRight, yBottom],\n                [xRight, yBottom, xRight, yTop],\n                [xRight, yTop, xLeft, yTop]\n            ].map(applyTransform2);\n\n            // Remove the line if it ends inside the box.  Use ray\n            // casting for rotated boxes: see which edges intersect a\n            // line from the arrowhead to far away and reduce with xor\n            // to get the parity of the number of intersections.\n            if(edges.reduce(function(a, x) {\n                return a ^\n                    !!Lib.segmentsIntersect(headX, headY, headX + 1e6, headY + 1e6,\n                            x[0], x[1], x[2], x[3]);\n            }, false)) {\n                // no line or arrow - so quit drawArrow now\n                return;\n            }\n\n            edges.forEach(function(x) {\n                var p = Lib.segmentsIntersect(tailX, tailY, headX, headY,\n                            x[0], x[1], x[2], x[3]);\n                if(p) {\n                    tailX = p.x;\n                    tailY = p.y;\n                }\n            });\n\n            var strokewidth = options.arrowwidth;\n            var arrowColor = options.arrowcolor;\n            var arrowSide = options.arrowside;\n\n            var arrowGroup = annGroup.append('g')\n                .style({opacity: Color.opacity(arrowColor)})\n                .classed('annotation-arrow-g', true);\n\n            var arrow = arrowGroup.append('path')\n                .attr('d', 'M' + tailX + ',' + tailY + 'L' + headX + ',' + headY)\n                .style('stroke-width', strokewidth + 'px')\n                .call(Color.stroke, Color.rgb(arrowColor));\n\n            drawArrowHead(arrow, arrowSide, options);\n\n            // the arrow dragger is a small square right at the head, then a line to the tail,\n            // all expanded by a stroke width of 6px plus the arrow line width\n            if(edits.annotationPosition && arrow.node().parentNode && !subplotId) {\n                var arrowDragHeadX = headX;\n                var arrowDragHeadY = headY;\n                if(options.standoff) {\n                    var arrowLength = Math.sqrt(Math.pow(headX - tailX, 2) + Math.pow(headY - tailY, 2));\n                    arrowDragHeadX += options.standoff * (tailX - headX) / arrowLength;\n                    arrowDragHeadY += options.standoff * (tailY - headY) / arrowLength;\n                }\n                var arrowDrag = arrowGroup.append('path')\n                    .classed('annotation-arrow', true)\n                    .classed('anndrag', true)\n                    .classed('cursor-move', true)\n                    .attr({\n                        d: 'M3,3H-3V-3H3ZM0,0L' + (tailX - arrowDragHeadX) + ',' + (tailY - arrowDragHeadY),\n                        transform: 'translate(' + arrowDragHeadX + ',' + arrowDragHeadY + ')'\n                    })\n                    .style('stroke-width', (strokewidth + 6) + 'px')\n                    .call(Color.stroke, 'rgba(0,0,0,0)')\n                    .call(Color.fill, 'rgba(0,0,0,0)');\n\n                var annx0, anny0;\n\n                // dragger for the arrow & head: translates the whole thing\n                // (head/tail/text) all together\n                dragElement.init({\n                    element: arrowDrag.node(),\n                    gd: gd,\n                    prepFn: function() {\n                        var pos = Drawing.getTranslate(annTextGroupInner);\n\n                        annx0 = pos.x;\n                        anny0 = pos.y;\n                        if(xa && xa.autorange) {\n                            modifyBase(xa._name + '.autorange', true);\n                        }\n                        if(ya && ya.autorange) {\n                            modifyBase(ya._name + '.autorange', true);\n                        }\n                    },\n                    moveFn: function(dx, dy) {\n                        var annxy0 = applyTransform(annx0, anny0);\n                        var xcenter = annxy0[0] + dx;\n                        var ycenter = annxy0[1] + dy;\n                        annTextGroupInner.call(Drawing.setTranslate, xcenter, ycenter);\n\n                        modifyItem('x', xa ?\n                            xa.p2r(xa.r2p(options.x) + dx) :\n                            (options.x + (dx / gs.w)));\n                        modifyItem('y', ya ?\n                            ya.p2r(ya.r2p(options.y) + dy) :\n                            (options.y - (dy / gs.h)));\n\n                        if(options.axref === options.xref) {\n                            modifyItem('ax', xa.p2r(xa.r2p(options.ax) + dx));\n                        }\n\n                        if(options.ayref === options.yref) {\n                            modifyItem('ay', ya.p2r(ya.r2p(options.ay) + dy));\n                        }\n\n                        arrowGroup.attr('transform', 'translate(' + dx + ',' + dy + ')');\n                        annTextGroup.attr({\n                            transform: 'rotate(' + textangle + ',' +\n                                   xcenter + ',' + ycenter + ')'\n                        });\n                    },\n                    doneFn: function() {\n                        Registry.call('_guiRelayout', gd, getUpdateObj());\n                        var notesBox = document.querySelector('.js-notes-box-panel');\n                        if(notesBox) notesBox.redraw(notesBox.selectedObj);\n                    }\n                });\n            }\n        };\n\n        if(options.showarrow) drawArrow(0, 0);\n\n        // user dragging the annotation (text, not arrow)\n        if(editTextPosition) {\n            var baseTextTransform;\n\n            // dragger for the textbox: if there's an arrow, just drag the\n            // textbox and tail, leave the head untouched\n            dragElement.init({\n                element: annTextGroupInner.node(),\n                gd: gd,\n                prepFn: function() {\n                    baseTextTransform = annTextGroup.attr('transform');\n                },\n                moveFn: function(dx, dy) {\n                    var csr = 'pointer';\n                    if(options.showarrow) {\n                        if(options.axref === options.xref) {\n                            modifyItem('ax', xa.p2r(xa.r2p(options.ax) + dx));\n                        } else {\n                            modifyItem('ax', options.ax + dx);\n                        }\n\n                        if(options.ayref === options.yref) {\n                            modifyItem('ay', ya.p2r(ya.r2p(options.ay) + dy));\n                        } else {\n                            modifyItem('ay', options.ay + dy);\n                        }\n\n                        drawArrow(dx, dy);\n                    } else if(!subplotId) {\n                        var xUpdate, yUpdate;\n                        if(xa) {\n                            xUpdate = xa.p2r(xa.r2p(options.x) + dx);\n                        } else {\n                            var widthFraction = options._xsize / gs.w;\n                            var xLeft = options.x + (options._xshift - options.xshift) / gs.w - widthFraction / 2;\n\n                            xUpdate = dragElement.align(xLeft + dx / gs.w,\n                                widthFraction, 0, 1, options.xanchor);\n                        }\n\n                        if(ya) {\n                            yUpdate = ya.p2r(ya.r2p(options.y) + dy);\n                        } else {\n                            var heightFraction = options._ysize / gs.h;\n                            var yBottom = options.y - (options._yshift + options.yshift) / gs.h - heightFraction / 2;\n\n                            yUpdate = dragElement.align(yBottom - dy / gs.h,\n                                heightFraction, 0, 1, options.yanchor);\n                        }\n                        modifyItem('x', xUpdate);\n                        modifyItem('y', yUpdate);\n                        if(!xa || !ya) {\n                            csr = dragElement.getCursor(\n                                xa ? 0.5 : xUpdate,\n                                ya ? 0.5 : yUpdate,\n                                options.xanchor, options.yanchor\n                            );\n                        }\n                    } else return;\n\n                    annTextGroup.attr({\n                        transform: 'translate(' + dx + ',' + dy + ')' + baseTextTransform\n                    });\n\n                    setCursor(annTextGroupInner, csr);\n                },\n                doneFn: function() {\n                    setCursor(annTextGroupInner);\n                    Registry.call('_guiRelayout', gd, getUpdateObj());\n                    var notesBox = document.querySelector('.js-notes-box-panel');\n                    if(notesBox) notesBox.redraw(notesBox.selectedObj);\n                }\n            });\n        }\n    }\n\n    if(edits.annotationText) {\n        annText.call(svgTextUtils.makeEditable, {delegate: annTextGroupInner, gd: gd})\n            .call(textLayout)\n            .on('edit', function(_text) {\n                options.text = _text;\n\n                this.call(textLayout);\n\n                modifyItem('text', _text);\n\n                if(xa && xa.autorange) {\n                    modifyBase(xa._name + '.autorange', true);\n                }\n                if(ya && ya.autorange) {\n                    modifyBase(ya._name + '.autorange', true);\n                }\n\n                Registry.call('_guiRelayout', gd, getUpdateObj());\n            });\n    } else annText.call(textLayout);\n}\n\n},{\"../../lib\":703,\"../../lib/setcursor\":723,\"../../lib/svg_text_utils\":727,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/axes\":751,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../dragelement\":598,\"../drawing\":601,\"../fx\":619,\"./draw_arrow_head\":570,\"d3\":157}],570:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Color = _dereq_('../color');\n\nvar ARROWPATHS = _dereq_('./arrow_paths');\n\n/**\n * Add arrowhead(s) to a path or line element\n *\n * @param {d3.selection} el3: a d3-selected line or path element\n *\n * @param {string} ends: 'none', 'start', 'end', or 'start+end' for which ends get arrowheads\n *\n * @param {object} options: style information. Must have all the following:\n * @param {number} options.arrowhead: end head style - see ./arrow_paths\n * @param {number} options.startarrowhead: start head style - see ./arrow_paths\n * @param {number} options.arrowsize: relative size of the end head vs line width\n * @param {number} options.startarrowsize: relative size of the start head vs line width\n * @param {number} options.standoff: distance in px to move the end arrow point from its target\n * @param {number} options.startstandoff: distance in px to move the start arrow point from its target\n * @param {number} options.arrowwidth: width of the arrow line\n * @param {string} options.arrowcolor: color of the arrow line, for the head to match\n *     Note that the opacity of this color is ignored, as it's assumed the container\n *     of both the line and head has opacity applied to it so there isn't greater opacity\n *     where they overlap.\n */\nmodule.exports = function drawArrowHead(el3, ends, options) {\n    var el = el3.node();\n    var headStyle = ARROWPATHS[options.arrowhead || 0];\n    var startHeadStyle = ARROWPATHS[options.startarrowhead || 0];\n    var scale = (options.arrowwidth || 1) * (options.arrowsize || 1);\n    var startScale = (options.arrowwidth || 1) * (options.startarrowsize || 1);\n    var doStart = ends.indexOf('start') >= 0;\n    var doEnd = ends.indexOf('end') >= 0;\n    var backOff = headStyle.backoff * scale + options.standoff;\n    var startBackOff = startHeadStyle.backoff * startScale + options.startstandoff;\n\n    var start, end, startRot, endRot;\n\n    if(el.nodeName === 'line') {\n        start = {x: +el3.attr('x1'), y: +el3.attr('y1')};\n        end = {x: +el3.attr('x2'), y: +el3.attr('y2')};\n\n        var dx = start.x - end.x;\n        var dy = start.y - end.y;\n\n        startRot = Math.atan2(dy, dx);\n        endRot = startRot + Math.PI;\n        if(backOff && startBackOff) {\n            if(backOff + startBackOff > Math.sqrt(dx * dx + dy * dy)) {\n                hideLine();\n                return;\n            }\n        }\n\n        if(backOff) {\n            if(backOff * backOff > dx * dx + dy * dy) {\n                hideLine();\n                return;\n            }\n            var backOffX = backOff * Math.cos(startRot);\n            var backOffY = backOff * Math.sin(startRot);\n\n            end.x += backOffX;\n            end.y += backOffY;\n            el3.attr({x2: end.x, y2: end.y});\n        }\n\n        if(startBackOff) {\n            if(startBackOff * startBackOff > dx * dx + dy * dy) {\n                hideLine();\n                return;\n            }\n            var startBackOffX = startBackOff * Math.cos(startRot);\n            var startbackOffY = startBackOff * Math.sin(startRot);\n\n            start.x -= startBackOffX;\n            start.y -= startbackOffY;\n            el3.attr({x1: start.x, y1: start.y});\n        }\n    } else if(el.nodeName === 'path') {\n        var pathlen = el.getTotalLength();\n        // using dash to hide the backOff region of the path.\n        // if we ever allow dash for the arrow we'll have to\n        // do better than this hack... maybe just manually\n        // combine the two\n        var dashArray = '';\n\n        if(pathlen < backOff + startBackOff) {\n            hideLine();\n            return;\n        }\n\n\n        var start0 = el.getPointAtLength(0);\n        var dstart = el.getPointAtLength(0.1);\n\n        startRot = Math.atan2(start0.y - dstart.y, start0.x - dstart.x);\n        start = el.getPointAtLength(Math.min(startBackOff, pathlen));\n\n        dashArray = '0px,' + startBackOff + 'px,';\n\n        var end0 = el.getPointAtLength(pathlen);\n        var dend = el.getPointAtLength(pathlen - 0.1);\n\n        endRot = Math.atan2(end0.y - dend.y, end0.x - dend.x);\n        end = el.getPointAtLength(Math.max(0, pathlen - backOff));\n\n        var shortening = dashArray ? startBackOff + backOff : backOff;\n        dashArray += (pathlen - shortening) + 'px,' + pathlen + 'px';\n\n        el3.style('stroke-dasharray', dashArray);\n    }\n\n    function hideLine() { el3.style('stroke-dasharray', '0px,100px'); }\n\n    function drawhead(arrowHeadStyle, p, rot, arrowScale) {\n        if(!arrowHeadStyle.path) return;\n        if(arrowHeadStyle.noRotate) rot = 0;\n\n        d3.select(el.parentNode).append('path')\n            .attr({\n                'class': el3.attr('class'),\n                d: arrowHeadStyle.path,\n                transform:\n                    'translate(' + p.x + ',' + p.y + ')' +\n                    (rot ? 'rotate(' + (rot * 180 / Math.PI) + ')' : '') +\n                    'scale(' + arrowScale + ')'\n            })\n            .style({\n                fill: Color.rgb(options.arrowcolor),\n                'stroke-width': 0\n            });\n    }\n\n    if(doStart) drawhead(startHeadStyle, start, startRot, startScale);\n    if(doEnd) drawhead(headStyle, end, endRot, scale);\n};\n\n},{\"../color\":580,\"./arrow_paths\":562,\"d3\":157}],571:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar drawModule = _dereq_('./draw');\nvar clickModule = _dereq_('./click');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'annotations',\n\n    layoutAttributes: _dereq_('./attributes'),\n    supplyLayoutDefaults: _dereq_('./defaults'),\n    includeBasePlot: _dereq_('../../plots/cartesian/include_components')('annotations'),\n\n    calcAutorange: _dereq_('./calc_autorange'),\n    draw: drawModule.draw,\n    drawOne: drawModule.drawOne,\n    drawRaw: drawModule.drawRaw,\n\n    hasClickToShow: clickModule.hasClickToShow,\n    onClick: clickModule.onClick,\n\n    convertCoords: _dereq_('./convert_coords')\n};\n\n},{\"../../plots/cartesian/include_components\":761,\"./attributes\":563,\"./calc_autorange\":564,\"./click\":565,\"./convert_coords\":567,\"./defaults\":568,\"./draw\":569}],572:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar annAtts = _dereq_('../annotations/attributes');\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nmodule.exports = overrideAll(templatedArray('annotation', {\n    visible: annAtts.visible,\n    x: {\n        valType: 'any',\n        \n        \n    },\n    y: {\n        valType: 'any',\n        \n        \n    },\n    z: {\n        valType: 'any',\n        \n        \n    },\n    ax: {\n        valType: 'number',\n        \n        \n    },\n    ay: {\n        valType: 'number',\n        \n        \n    },\n\n    xanchor: annAtts.xanchor,\n    xshift: annAtts.xshift,\n    yanchor: annAtts.yanchor,\n    yshift: annAtts.yshift,\n\n    text: annAtts.text,\n    textangle: annAtts.textangle,\n    font: annAtts.font,\n    width: annAtts.width,\n    height: annAtts.height,\n    opacity: annAtts.opacity,\n    align: annAtts.align,\n    valign: annAtts.valign,\n    bgcolor: annAtts.bgcolor,\n    bordercolor: annAtts.bordercolor,\n    borderpad: annAtts.borderpad,\n    borderwidth: annAtts.borderwidth,\n    showarrow: annAtts.showarrow,\n    arrowcolor: annAtts.arrowcolor,\n    arrowhead: annAtts.arrowhead,\n    startarrowhead: annAtts.startarrowhead,\n    arrowside: annAtts.arrowside,\n    arrowsize: annAtts.arrowsize,\n    startarrowsize: annAtts.startarrowsize,\n    arrowwidth: annAtts.arrowwidth,\n    standoff: annAtts.standoff,\n    startstandoff: annAtts.startstandoff,\n    hovertext: annAtts.hovertext,\n    hoverlabel: annAtts.hoverlabel,\n    captureevents: annAtts.captureevents,\n\n    // maybes later?\n    // clicktoshow: annAtts.clicktoshow,\n    // xclick: annAtts.xclick,\n    // yclick: annAtts.yclick,\n\n    // not needed!\n    // axref: 'pixel'\n    // ayref: 'pixel'\n    // xref: 'x'\n    // yref: 'y\n    // zref: 'z'\n}), 'calc', 'from-root');\n\n},{\"../../plot_api/edit_types\":734,\"../../plot_api/plot_template\":741,\"../annotations/attributes\":563}],573:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nmodule.exports = function convert(scene) {\n    var fullSceneLayout = scene.fullSceneLayout;\n    var anns = fullSceneLayout.annotations;\n\n    for(var i = 0; i < anns.length; i++) {\n        mockAnnAxes(anns[i], scene);\n    }\n\n    scene.fullLayout._infolayer\n        .selectAll('.annotation-' + scene.id)\n        .remove();\n};\n\nfunction mockAnnAxes(ann, scene) {\n    var fullSceneLayout = scene.fullSceneLayout;\n    var domain = fullSceneLayout.domain;\n    var size = scene.fullLayout._size;\n\n    var base = {\n        // this gets fill in on render\n        pdata: null,\n\n        // to get setConvert to not execute cleanly\n        type: 'linear',\n\n        // don't try to update them on `editable: true`\n        autorange: false,\n\n        // set infinite range so that annotation draw routine\n        // does not try to remove 'outside-range' annotations,\n        // this case is handled in the render loop\n        range: [-Infinity, Infinity]\n    };\n\n    ann._xa = {};\n    Lib.extendFlat(ann._xa, base);\n    Axes.setConvert(ann._xa);\n    ann._xa._offset = size.l + domain.x[0] * size.w;\n    ann._xa.l2p = function() {\n        return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);\n    };\n\n    ann._ya = {};\n    Lib.extendFlat(ann._ya, base);\n    Axes.setConvert(ann._ya);\n    ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;\n    ann._ya.l2p = function() {\n        return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);\n    };\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751}],574:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\nvar handleAnnotationCommonDefaults = _dereq_('../annotations/common_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {\n    handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {\n        name: 'annotations',\n        handleItemDefaults: handleAnnotationDefaults,\n        fullLayout: opts.fullLayout\n    });\n};\n\nfunction handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(annIn, annOut, attributes, attr, dflt);\n    }\n\n    function coercePosition(axLetter) {\n        var axName = axLetter + 'axis';\n\n        // mock in such way that getFromId grabs correct 3D axis\n        var gdMock = { _fullLayout: {} };\n        gdMock._fullLayout[axName] = sceneLayout[axName];\n\n        return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);\n    }\n\n\n    var visible = coerce('visible');\n    if(!visible) return;\n\n    handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);\n\n    coercePosition('x');\n    coercePosition('y');\n    coercePosition('z');\n\n    // if you have one coordinate you should all three\n    Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);\n\n    // hard-set here for completeness\n    annOut.xref = 'x';\n    annOut.yref = 'y';\n    annOut.zref = 'z';\n\n    coerce('xanchor');\n    coerce('yanchor');\n    coerce('xshift');\n    coerce('yshift');\n\n    if(annOut.showarrow) {\n        annOut.axref = 'pixel';\n        annOut.ayref = 'pixel';\n\n        // TODO maybe default values should be bigger than the 2D case?\n        coerce('ax', -10);\n        coerce('ay', -30);\n\n        // if you have one part of arrow length you should have both\n        Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/cartesian/axes\":751,\"../annotations/common_defaults\":566,\"./attributes\":572}],575:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar drawRaw = _dereq_('../annotations/draw').drawRaw;\nvar project = _dereq_('../../plots/gl3d/project');\nvar axLetters = ['x', 'y', 'z'];\n\nmodule.exports = function draw(scene) {\n    var fullSceneLayout = scene.fullSceneLayout;\n    var dataScale = scene.dataScale;\n    var anns = fullSceneLayout.annotations;\n\n    for(var i = 0; i < anns.length; i++) {\n        var ann = anns[i];\n        var annotationIsOffscreen = false;\n\n        for(var j = 0; j < 3; j++) {\n            var axLetter = axLetters[j];\n            var pos = ann[axLetter];\n            var ax = fullSceneLayout[axLetter + 'axis'];\n            var posFraction = ax.r2fraction(pos);\n\n            if(posFraction < 0 || posFraction > 1) {\n                annotationIsOffscreen = true;\n                break;\n            }\n        }\n\n        if(annotationIsOffscreen) {\n            scene.fullLayout._infolayer\n                .select('.annotation-' + scene.id + '[data-index=\"' + i + '\"]')\n                .remove();\n        } else {\n            ann._pdata = project(scene.glplot.cameraParams, [\n                fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],\n                fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],\n                fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]\n            ]);\n\n            drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);\n        }\n    }\n};\n\n},{\"../../plots/gl3d/project\":800,\"../annotations/draw\":569}],576:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'annotations3d',\n\n    schema: {\n        subplots: {\n            scene: {annotations: _dereq_('./attributes')}\n        }\n    },\n\n    layoutAttributes: _dereq_('./attributes'),\n    handleDefaults: _dereq_('./defaults'),\n    includeBasePlot: includeGL3D,\n\n    convert: _dereq_('./convert'),\n    draw: _dereq_('./draw')\n};\n\nfunction includeGL3D(layoutIn, layoutOut) {\n    var GL3D = Registry.subplotsRegistry.gl3d;\n    if(!GL3D) return;\n\n    var attrRegex = GL3D.attrRegex;\n\n    var keys = Object.keys(layoutIn);\n    for(var i = 0; i < keys.length; i++) {\n        var k = keys[i];\n        if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {\n            Lib.pushUnique(layoutOut._basePlotModules, GL3D);\n            Lib.pushUnique(layoutOut._subplots.gl3d, k);\n        }\n    }\n}\n\n},{\"../../lib\":703,\"../../registry\":831,\"./attributes\":572,\"./convert\":573,\"./defaults\":574,\"./draw\":575}],577:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// a trimmed down version of:\n// https://github.com/alexcjohnson/world-calendars/blob/master/dist/index.js\n\nmodule.exports = _dereq_('world-calendars/dist/main');\n\n_dereq_('world-calendars/dist/plus');\n\n_dereq_('world-calendars/dist/calendars/chinese');\n_dereq_('world-calendars/dist/calendars/coptic');\n_dereq_('world-calendars/dist/calendars/discworld');\n_dereq_('world-calendars/dist/calendars/ethiopian');\n_dereq_('world-calendars/dist/calendars/hebrew');\n_dereq_('world-calendars/dist/calendars/islamic');\n_dereq_('world-calendars/dist/calendars/julian');\n_dereq_('world-calendars/dist/calendars/mayan');\n_dereq_('world-calendars/dist/calendars/nanakshahi');\n_dereq_('world-calendars/dist/calendars/nepali');\n_dereq_('world-calendars/dist/calendars/persian');\n_dereq_('world-calendars/dist/calendars/taiwan');\n_dereq_('world-calendars/dist/calendars/thai');\n_dereq_('world-calendars/dist/calendars/ummalqura');\n\n},{\"world-calendars/dist/calendars/chinese\":544,\"world-calendars/dist/calendars/coptic\":545,\"world-calendars/dist/calendars/discworld\":546,\"world-calendars/dist/calendars/ethiopian\":547,\"world-calendars/dist/calendars/hebrew\":548,\"world-calendars/dist/calendars/islamic\":549,\"world-calendars/dist/calendars/julian\":550,\"world-calendars/dist/calendars/mayan\":551,\"world-calendars/dist/calendars/nanakshahi\":552,\"world-calendars/dist/calendars/nepali\":553,\"world-calendars/dist/calendars/persian\":554,\"world-calendars/dist/calendars/taiwan\":555,\"world-calendars/dist/calendars/thai\":556,\"world-calendars/dist/calendars/ummalqura\":557,\"world-calendars/dist/main\":558,\"world-calendars/dist/plus\":559}],578:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar calendars = _dereq_('./calendars');\n\nvar Lib = _dereq_('../../lib');\nvar constants = _dereq_('../../constants/numerical');\n\nvar EPOCHJD = constants.EPOCHJD;\nvar ONEDAY = constants.ONEDAY;\n\nvar attributes = {\n    valType: 'enumerated',\n    values: Object.keys(calendars.calendars),\n    \n    editType: 'calc',\n    dflt: 'gregorian'\n};\n\nvar handleDefaults = function(contIn, contOut, attr, dflt) {\n    var attrs = {};\n    attrs[attr] = attributes;\n\n    return Lib.coerce(contIn, contOut, attrs, attr, dflt);\n};\n\nvar handleTraceDefaults = function(traceIn, traceOut, coords, layout) {\n    for(var i = 0; i < coords.length; i++) {\n        handleDefaults(traceIn, traceOut, coords[i] + 'calendar', layout.calendar);\n    }\n};\n\n// each calendar needs its own default canonical tick. I would love to use\n// 2000-01-01 (or even 0000-01-01) for them all but they don't necessarily\n// all support either of those dates. Instead I'll use the most significant\n// number they *do* support, biased toward the present day.\nvar CANONICAL_TICK = {\n    chinese: '2000-01-01',\n    coptic: '2000-01-01',\n    discworld: '2000-01-01',\n    ethiopian: '2000-01-01',\n    hebrew: '5000-01-01',\n    islamic: '1000-01-01',\n    julian: '2000-01-01',\n    mayan: '5000-01-01',\n    nanakshahi: '1000-01-01',\n    nepali: '2000-01-01',\n    persian: '1000-01-01',\n    jalali: '1000-01-01',\n    taiwan: '1000-01-01',\n    thai: '2000-01-01',\n    ummalqura: '1400-01-01'\n};\n\n// Start on a Sunday - for week ticks\n// Discworld and Mayan calendars don't have 7-day weeks but we're going to give them\n// 7-day week ticks so start on our Sundays.\n// If anyone really cares we can customize the auto tick spacings for these calendars.\nvar CANONICAL_SUNDAY = {\n    chinese: '2000-01-02',\n    coptic: '2000-01-03',\n    discworld: '2000-01-03',\n    ethiopian: '2000-01-05',\n    hebrew: '5000-01-01',\n    islamic: '1000-01-02',\n    julian: '2000-01-03',\n    mayan: '5000-01-01',\n    nanakshahi: '1000-01-05',\n    nepali: '2000-01-05',\n    persian: '1000-01-01',\n    jalali: '1000-01-01',\n    taiwan: '1000-01-04',\n    thai: '2000-01-04',\n    ummalqura: '1400-01-06'\n};\n\nvar DFLTRANGE = {\n    chinese: ['2000-01-01', '2001-01-01'],\n    coptic: ['1700-01-01', '1701-01-01'],\n    discworld: ['1800-01-01', '1801-01-01'],\n    ethiopian: ['2000-01-01', '2001-01-01'],\n    hebrew: ['5700-01-01', '5701-01-01'],\n    islamic: ['1400-01-01', '1401-01-01'],\n    julian: ['2000-01-01', '2001-01-01'],\n    mayan: ['5200-01-01', '5201-01-01'],\n    nanakshahi: ['0500-01-01', '0501-01-01'],\n    nepali: ['2000-01-01', '2001-01-01'],\n    persian: ['1400-01-01', '1401-01-01'],\n    jalali: ['1400-01-01', '1401-01-01'],\n    taiwan: ['0100-01-01', '0101-01-01'],\n    thai: ['2500-01-01', '2501-01-01'],\n    ummalqura: ['1400-01-01', '1401-01-01']\n};\n\n/*\n * convert d3 templates to world-calendars templates, so our users only need\n * to know d3's specifiers. Map space padding to no padding, and unknown fields\n * to an ugly placeholder\n */\nvar UNKNOWN = '##';\nvar d3ToWorldCalendars = {\n    'd': {'0': 'dd', '-': 'd'}, // 2-digit or unpadded day of month\n    'e': {'0': 'd', '-': 'd'}, // alternate, always unpadded day of month\n    'a': {'0': 'D', '-': 'D'}, // short weekday name\n    'A': {'0': 'DD', '-': 'DD'}, // full weekday name\n    'j': {'0': 'oo', '-': 'o'}, // 3-digit or unpadded day of the year\n    'W': {'0': 'ww', '-': 'w'}, // 2-digit or unpadded week of the year (Monday first)\n    'm': {'0': 'mm', '-': 'm'}, // 2-digit or unpadded month number\n    'b': {'0': 'M', '-': 'M'}, // short month name\n    'B': {'0': 'MM', '-': 'MM'}, // full month name\n    'y': {'0': 'yy', '-': 'yy'}, // 2-digit year (map unpadded to zero-padded)\n    'Y': {'0': 'yyyy', '-': 'yyyy'}, // 4-digit year (map unpadded to zero-padded)\n    'U': UNKNOWN, // Sunday-first week of the year\n    'w': UNKNOWN, // day of the week [0(sunday),6]\n    // combined format, we replace the date part with the world-calendar version\n    // and the %X stays there for d3 to handle with time parts\n    'c': {'0': 'D M d %X yyyy', '-': 'D M d %X yyyy'},\n    'x': {'0': 'mm/dd/yyyy', '-': 'mm/dd/yyyy'}\n};\n\nfunction worldCalFmt(fmt, x, calendar) {\n    var dateJD = Math.floor((x + 0.05) / ONEDAY) + EPOCHJD;\n    var cDate = getCal(calendar).fromJD(dateJD);\n    var i = 0;\n    var modifier, directive, directiveLen, directiveObj, replacementPart;\n\n    while((i = fmt.indexOf('%', i)) !== -1) {\n        modifier = fmt.charAt(i + 1);\n        if(modifier === '0' || modifier === '-' || modifier === '_') {\n            directiveLen = 3;\n            directive = fmt.charAt(i + 2);\n            if(modifier === '_') modifier = '-';\n        } else {\n            directive = modifier;\n            modifier = '0';\n            directiveLen = 2;\n        }\n        directiveObj = d3ToWorldCalendars[directive];\n        if(!directiveObj) {\n            i += directiveLen;\n        } else {\n            // code is recognized as a date part but world-calendars doesn't support it\n            if(directiveObj === UNKNOWN) replacementPart = UNKNOWN;\n\n            // format the cDate according to the translated directive\n            else replacementPart = cDate.formatDate(directiveObj[modifier]);\n\n            fmt = fmt.substr(0, i) + replacementPart + fmt.substr(i + directiveLen);\n            i += replacementPart.length;\n        }\n    }\n    return fmt;\n}\n\n// cache world calendars, so we don't have to reinstantiate\n// during each date-time conversion\nvar allCals = {};\nfunction getCal(calendar) {\n    var calendarObj = allCals[calendar];\n    if(calendarObj) return calendarObj;\n\n    calendarObj = allCals[calendar] = calendars.instance(calendar);\n    return calendarObj;\n}\n\nfunction makeAttrs(description) {\n    return Lib.extendFlat({}, attributes, { description: description });\n}\n\nfunction makeTraceAttrsDescription(coord) {\n    return 'Sets the calendar system to use with `' + coord + '` date data.';\n}\n\nvar xAttrs = {\n    xcalendar: makeAttrs(makeTraceAttrsDescription('x'))\n};\n\nvar xyAttrs = Lib.extendFlat({}, xAttrs, {\n    ycalendar: makeAttrs(makeTraceAttrsDescription('y'))\n});\n\nvar xyzAttrs = Lib.extendFlat({}, xyAttrs, {\n    zcalendar: makeAttrs(makeTraceAttrsDescription('z'))\n});\n\nvar axisAttrs = makeAttrs([\n    'Sets the calendar system to use for `range` and `tick0`',\n    'if this is a date axis. This does not set the calendar for',\n    'interpreting data on this axis, that\\'s specified in the trace',\n    'or via the global `layout.calendar`'\n].join(' '));\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'calendars',\n\n    schema: {\n        traces: {\n            scatter: xyAttrs,\n            bar: xyAttrs,\n            box: xyAttrs,\n            heatmap: xyAttrs,\n            contour: xyAttrs,\n            histogram: xyAttrs,\n            histogram2d: xyAttrs,\n            histogram2dcontour: xyAttrs,\n            scatter3d: xyzAttrs,\n            surface: xyzAttrs,\n            mesh3d: xyzAttrs,\n            scattergl: xyAttrs,\n            ohlc: xAttrs,\n            candlestick: xAttrs\n        },\n        layout: {\n            calendar: makeAttrs([\n                'Sets the default calendar system to use for interpreting and',\n                'displaying dates throughout the plot.'\n            ].join(' '))\n        },\n        subplots: {\n            xaxis: {calendar: axisAttrs},\n            yaxis: {calendar: axisAttrs},\n            scene: {\n                xaxis: {calendar: axisAttrs},\n                // TODO: it's actually redundant to include yaxis and zaxis here\n                // because in the scene attributes these are the same object so merging\n                // into one merges into them all. However, I left them in for parity with\n                // cartesian, where yaxis is unused until we Plotschema.get() when we\n                // use its presence or absence to determine whether to delete attributes\n                // from yaxis if they only apply to x (rangeselector/rangeslider)\n                yaxis: {calendar: axisAttrs},\n                zaxis: {calendar: axisAttrs}\n            },\n            polar: {\n                radialaxis: {calendar: axisAttrs}\n            }\n        },\n        transforms: {\n            filter: {\n                valuecalendar: makeAttrs([\n                    'Sets the calendar system to use for `value`, if it is a date.'\n                ].join(' ')),\n                targetcalendar: makeAttrs([\n                    'Sets the calendar system to use for `target`, if it is an',\n                    'array of dates. If `target` is a string (eg *x*) we use the',\n                    'corresponding trace attribute (eg `xcalendar`) if it exists,',\n                    'even if `targetcalendar` is provided.'\n                ].join(' '))\n            }\n        }\n    },\n\n    layoutAttributes: attributes,\n\n    handleDefaults: handleDefaults,\n    handleTraceDefaults: handleTraceDefaults,\n\n    CANONICAL_SUNDAY: CANONICAL_SUNDAY,\n    CANONICAL_TICK: CANONICAL_TICK,\n    DFLTRANGE: DFLTRANGE,\n\n    getCal: getCal,\n    worldCalFmt: worldCalFmt\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"./calendars\":577}],579:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\n// IMPORTANT - default colors should be in hex for compatibility\nexports.defaults = [\n    '#1f77b4',  // muted blue\n    '#ff7f0e',  // safety orange\n    '#2ca02c',  // cooked asparagus green\n    '#d62728',  // brick red\n    '#9467bd',  // muted purple\n    '#8c564b',  // chestnut brown\n    '#e377c2',  // raspberry yogurt pink\n    '#7f7f7f',  // middle gray\n    '#bcbd22',  // curry yellow-green\n    '#17becf'   // blue-teal\n];\n\nexports.defaultLine = '#444';\n\nexports.lightLine = '#eee';\n\nexports.background = '#fff';\n\nexports.borderLine = '#BEC8D9';\n\n// with axis.color and Color.interp we aren't using lightLine\n// itself anymore, instead interpolating between axis.color\n// and the background color using tinycolor.mix. lightFraction\n// gives back exactly lightLine if the other colors are defaults.\nexports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4);\n\n},{}],580:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar tinycolor = _dereq_('tinycolor2');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar color = module.exports = {};\n\nvar colorAttrs = _dereq_('./attributes');\ncolor.defaults = colorAttrs.defaults;\nvar defaultLine = color.defaultLine = colorAttrs.defaultLine;\ncolor.lightLine = colorAttrs.lightLine;\nvar background = color.background = colorAttrs.background;\n\n/*\n * tinyRGB: turn a tinycolor into an rgb string, but\n * unlike the built-in tinycolor.toRgbString this never includes alpha\n */\ncolor.tinyRGB = function(tc) {\n    var c = tc.toRgb();\n    return 'rgb(' + Math.round(c.r) + ', ' +\n        Math.round(c.g) + ', ' + Math.round(c.b) + ')';\n};\n\ncolor.rgb = function(cstr) { return color.tinyRGB(tinycolor(cstr)); };\n\ncolor.opacity = function(cstr) { return cstr ? tinycolor(cstr).getAlpha() : 0; };\n\ncolor.addOpacity = function(cstr, op) {\n    var c = tinycolor(cstr).toRgb();\n    return 'rgba(' + Math.round(c.r) + ', ' +\n        Math.round(c.g) + ', ' + Math.round(c.b) + ', ' + op + ')';\n};\n\n// combine two colors into one apparent color\n// if back has transparency or is missing,\n// color.background is assumed behind it\ncolor.combine = function(front, back) {\n    var fc = tinycolor(front).toRgb();\n    if(fc.a === 1) return tinycolor(front).toRgbString();\n\n    var bc = tinycolor(back || background).toRgb();\n    var bcflat = bc.a === 1 ? bc : {\n        r: 255 * (1 - bc.a) + bc.r * bc.a,\n        g: 255 * (1 - bc.a) + bc.g * bc.a,\n        b: 255 * (1 - bc.a) + bc.b * bc.a\n    };\n    var fcflat = {\n        r: bcflat.r * (1 - fc.a) + fc.r * fc.a,\n        g: bcflat.g * (1 - fc.a) + fc.g * fc.a,\n        b: bcflat.b * (1 - fc.a) + fc.b * fc.a\n    };\n    return tinycolor(fcflat).toRgbString();\n};\n\n/*\n * Create a color that contrasts with cstr.\n *\n * If cstr is a dark color, we lighten it; if it's light, we darken.\n *\n * If lightAmount / darkAmount are used, we adjust by these percentages,\n * otherwise we go all the way to white or black.\n */\ncolor.contrast = function(cstr, lightAmount, darkAmount) {\n    var tc = tinycolor(cstr);\n\n    if(tc.getAlpha() !== 1) tc = tinycolor(color.combine(cstr, background));\n\n    var newColor = tc.isDark() ?\n        (lightAmount ? tc.lighten(lightAmount) : background) :\n        (darkAmount ? tc.darken(darkAmount) : defaultLine);\n\n    return newColor.toString();\n};\n\ncolor.stroke = function(s, c) {\n    var tc = tinycolor(c);\n    s.style({'stroke': color.tinyRGB(tc), 'stroke-opacity': tc.getAlpha()});\n};\n\ncolor.fill = function(s, c) {\n    var tc = tinycolor(c);\n    s.style({\n        'fill': color.tinyRGB(tc),\n        'fill-opacity': tc.getAlpha()\n    });\n};\n\n// search container for colors with the deprecated rgb(fractions) format\n// and convert them to rgb(0-255 values)\ncolor.clean = function(container) {\n    if(!container || typeof container !== 'object') return;\n\n    var keys = Object.keys(container);\n    var i, j, key, val;\n\n    for(i = 0; i < keys.length; i++) {\n        key = keys[i];\n        val = container[key];\n\n        if(key.substr(key.length - 5) === 'color') {\n            // only sanitize keys that end in \"color\" or \"colorscale\"\n\n            if(Array.isArray(val)) {\n                for(j = 0; j < val.length; j++) val[j] = cleanOne(val[j]);\n            } else container[key] = cleanOne(val);\n        } else if(key.substr(key.length - 10) === 'colorscale' && Array.isArray(val)) {\n            // colorscales have the format [[0, color1], [frac, color2], ... [1, colorN]]\n\n            for(j = 0; j < val.length; j++) {\n                if(Array.isArray(val[j])) val[j][1] = cleanOne(val[j][1]);\n            }\n        } else if(Array.isArray(val)) {\n            // recurse into arrays of objects, and plain objects\n\n            var el0 = val[0];\n            if(!Array.isArray(el0) && el0 && typeof el0 === 'object') {\n                for(j = 0; j < val.length; j++) color.clean(val[j]);\n            }\n        } else if(val && typeof val === 'object') color.clean(val);\n    }\n};\n\nfunction cleanOne(val) {\n    if(isNumeric(val) || typeof val !== 'string') return val;\n\n    var valTrim = val.trim();\n    if(valTrim.substr(0, 3) !== 'rgb') return val;\n\n    var match = valTrim.match(/^rgba?\\s*\\(([^()]*)\\)$/);\n    if(!match) return val;\n\n    var parts = match[1].trim().split(/\\s*[\\s,]\\s*/);\n    var rgba = valTrim.charAt(3) === 'a' && parts.length === 4;\n    if(!rgba && parts.length !== 3) return val;\n\n    for(var i = 0; i < parts.length; i++) {\n        if(!parts[i].length) return val;\n        parts[i] = Number(parts[i]);\n\n        if(!(parts[i] >= 0)) {\n            // all parts must be non-negative numbers\n\n            return val;\n        }\n\n        if(i === 3) {\n            // alpha>1 gets clipped to 1\n\n            if(parts[i] > 1) parts[i] = 1;\n        } else if(parts[i] >= 1) {\n            // r, g, b must be < 1 (ie 1 itself is not allowed)\n\n            return val;\n        }\n    }\n\n    var rgbStr = Math.round(parts[0] * 255) + ', ' +\n        Math.round(parts[1] * 255) + ', ' +\n        Math.round(parts[2] * 255);\n\n    if(rgba) return 'rgba(' + rgbStr + ', ' + parts[3] + ')';\n    return 'rgb(' + rgbStr + ')';\n}\n\n},{\"./attributes\":579,\"fast-isnumeric\":224,\"tinycolor2\":524}],581:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar axesAttrs = _dereq_('../../plots/cartesian/layout_attributes');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\n\nmodule.exports = overrideAll({\n// TODO: only right is supported currently\n//     orient: {\n//         valType: 'enumerated',\n//         \n//         values: ['left', 'right', 'top', 'bottom'],\n//         dflt: 'right',\n//         \n//     },\n    thicknessmode: {\n        valType: 'enumerated',\n        values: ['fraction', 'pixels'],\n        \n        dflt: 'pixels',\n        \n    },\n    thickness: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 30,\n        \n    },\n    lenmode: {\n        valType: 'enumerated',\n        values: ['fraction', 'pixels'],\n        \n        dflt: 'fraction',\n        \n    },\n    len: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        \n    },\n    x: {\n        valType: 'number',\n        dflt: 1.02,\n        min: -2,\n        max: 3,\n        \n        \n    },\n    xanchor: {\n        valType: 'enumerated',\n        values: ['left', 'center', 'right'],\n        dflt: 'left',\n        \n        \n    },\n    xpad: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 10,\n        \n    },\n    y: {\n        valType: 'number',\n        \n        dflt: 0.5,\n        min: -2,\n        max: 3,\n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['top', 'middle', 'bottom'],\n        \n        dflt: 'middle',\n        \n    },\n    ypad: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 10,\n        \n    },\n    // a possible line around the bar itself\n    outlinecolor: axesAttrs.linecolor,\n    outlinewidth: axesAttrs.linewidth,\n    // Should outlinewidth have {dflt: 0} ?\n    // another possible line outside the padding and tick labels\n    bordercolor: axesAttrs.linecolor,\n    borderwidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 0,\n        \n    },\n    bgcolor: {\n        valType: 'color',\n        \n        dflt: 'rgba(0,0,0,0)',\n        \n    },\n    // tick and title properties named and function exactly as in axes\n    tickmode: axesAttrs.tickmode,\n    nticks: axesAttrs.nticks,\n    tick0: axesAttrs.tick0,\n    dtick: axesAttrs.dtick,\n    tickvals: axesAttrs.tickvals,\n    ticktext: axesAttrs.ticktext,\n    ticks: extendFlat({}, axesAttrs.ticks, {dflt: ''}),\n    ticklen: axesAttrs.ticklen,\n    tickwidth: axesAttrs.tickwidth,\n    tickcolor: axesAttrs.tickcolor,\n    showticklabels: axesAttrs.showticklabels,\n    tickfont: fontAttrs({\n        \n    }),\n    tickangle: axesAttrs.tickangle,\n    tickformat: axesAttrs.tickformat,\n    tickformatstops: axesAttrs.tickformatstops,\n    tickprefix: axesAttrs.tickprefix,\n    showtickprefix: axesAttrs.showtickprefix,\n    ticksuffix: axesAttrs.ticksuffix,\n    showticksuffix: axesAttrs.showticksuffix,\n    separatethousands: axesAttrs.separatethousands,\n    exponentformat: axesAttrs.exponentformat,\n    showexponent: axesAttrs.showexponent,\n    title: {\n        text: {\n            valType: 'string',\n            \n            \n        },\n        font: fontAttrs({\n            \n        }),\n        side: {\n            valType: 'enumerated',\n            values: ['right', 'top', 'bottom'],\n            \n            dflt: 'top',\n            \n        }\n    },\n\n    _deprecated: {\n        title: {\n            valType: 'string',\n            \n            \n        },\n        titlefont: fontAttrs({\n            \n        }),\n        titleside: {\n            valType: 'enumerated',\n            values: ['right', 'top', 'bottom'],\n            \n            dflt: 'top',\n            \n        }\n    }\n}, 'colorbars', 'from-root');\n\n},{\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/cartesian/layout_attributes\":763,\"../../plots/font_attributes\":777}],582:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    cn: {\n        colorbar: 'colorbar',\n        cbbg: 'cbbg',\n        cbfill: 'cbfill',\n        cbfills: 'cbfills',\n        cbline: 'cbline',\n        cblines: 'cblines',\n        cbaxis: 'cbaxis',\n        cbtitleunshift: 'cbtitleunshift',\n        cbtitle: 'cbtitle',\n        cboutline: 'cboutline',\n        crisp: 'crisp',\n        jsPlaceholder: 'js-placeholder'\n    }\n};\n\n},{}],583:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar handleTickValueDefaults = _dereq_('../../plots/cartesian/tick_value_defaults');\nvar handleTickMarkDefaults = _dereq_('../../plots/cartesian/tick_mark_defaults');\nvar handleTickLabelDefaults = _dereq_('../../plots/cartesian/tick_label_defaults');\n\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function colorbarDefaults(containerIn, containerOut, layout) {\n    var colorbarOut = Template.newContainer(containerOut, 'colorbar');\n    var colorbarIn = containerIn.colorbar || {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(colorbarIn, colorbarOut, attributes, attr, dflt);\n    }\n\n    var thicknessmode = coerce('thicknessmode');\n    coerce('thickness', (thicknessmode === 'fraction') ?\n        30 / (layout.width - layout.margin.l - layout.margin.r) :\n        30\n    );\n\n    var lenmode = coerce('lenmode');\n    coerce('len', (lenmode === 'fraction') ?\n        1 :\n        layout.height - layout.margin.t - layout.margin.b\n    );\n\n    coerce('x');\n    coerce('xanchor');\n    coerce('xpad');\n    coerce('y');\n    coerce('yanchor');\n    coerce('ypad');\n    Lib.noneOrAll(colorbarIn, colorbarOut, ['x', 'y']);\n\n    coerce('outlinecolor');\n    coerce('outlinewidth');\n    coerce('bordercolor');\n    coerce('borderwidth');\n    coerce('bgcolor');\n\n    handleTickValueDefaults(colorbarIn, colorbarOut, coerce, 'linear');\n\n    var opts = {outerTicks: false, font: layout.font};\n    handleTickLabelDefaults(colorbarIn, colorbarOut, coerce, 'linear', opts);\n    handleTickMarkDefaults(colorbarIn, colorbarOut, coerce, 'linear', opts);\n\n    coerce('title.text', layout._dfltTitle.colorbar);\n    Lib.coerceFont(coerce, 'title.font', layout.font);\n    coerce('title.side');\n};\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/tick_label_defaults\":770,\"../../plots/cartesian/tick_mark_defaults\":771,\"../../plots/cartesian/tick_value_defaults\":772,\"./attributes\":581}],584:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Plots = _dereq_('../../plots/plots');\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar dragElement = _dereq_('../dragelement');\nvar Lib = _dereq_('../../lib');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar setCursor = _dereq_('../../lib/setcursor');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\nvar Titles = _dereq_('../titles');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar flipScale = _dereq_('../colorscale/helpers').flipScale;\n\nvar handleAxisDefaults = _dereq_('../../plots/cartesian/axis_defaults');\nvar handleAxisPositionDefaults = _dereq_('../../plots/cartesian/position_defaults');\nvar axisLayoutAttrs = _dereq_('../../plots/cartesian/layout_attributes');\n\nvar alignmentConstants = _dereq_('../../constants/alignment');\nvar LINE_SPACING = alignmentConstants.LINE_SPACING;\nvar FROM_TL = alignmentConstants.FROM_TL;\nvar FROM_BR = alignmentConstants.FROM_BR;\n\nvar cn = _dereq_('./constants').cn;\n\nfunction draw(gd) {\n    var fullLayout = gd._fullLayout;\n\n    var colorBars = fullLayout._infolayer\n        .selectAll('g.' + cn.colorbar)\n        .data(makeColorBarData(gd), function(opts) { return opts._id; });\n\n    colorBars.enter().append('g')\n        .attr('class', function(opts) { return opts._id; })\n        .classed(cn.colorbar, true);\n\n    colorBars.each(function(opts) {\n        var g = d3.select(this);\n\n        Lib.ensureSingle(g, 'rect', cn.cbbg);\n        Lib.ensureSingle(g, 'g', cn.cbfills);\n        Lib.ensureSingle(g, 'g', cn.cblines);\n        Lib.ensureSingle(g, 'g', cn.cbaxis, function(s) { s.classed(cn.crisp, true); });\n        Lib.ensureSingle(g, 'g', cn.cbtitleunshift, function(s) { s.append('g').classed(cn.cbtitle, true); });\n        Lib.ensureSingle(g, 'rect', cn.cboutline);\n\n        var done = drawColorBar(g, opts, gd);\n        if(done && done.then) (gd._promises || []).push(done);\n\n        if(gd._context.edits.colorbarPosition) {\n            makeEditable(g, opts, gd);\n        }\n    });\n\n    colorBars.exit()\n        .each(function(opts) { Plots.autoMargin(gd, opts._id); })\n        .remove();\n\n    colorBars.order();\n}\n\nfunction makeColorBarData(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcdata = gd.calcdata;\n    var out = [];\n\n    // single out item\n    var opts;\n    // colorbar attr parent container\n    var cont;\n    // trace attr container\n    var trace;\n    // colorbar options\n    var cbOpt;\n\n    function initOpts(opts) {\n        return extendFlat(opts, {\n            // fillcolor can be a d3 scale, domain is z values, range is colors\n            // or leave it out for no fill,\n            // or set to a string constant for single-color fill\n            _fillcolor: null,\n            // line.color has the same options as fillcolor\n            _line: {color: null, width: null, dash: null},\n            // levels of lines to draw.\n            // note that this DOES NOT determine the extent of the bar\n            // that's given by the domain of fillcolor\n            // (or line.color if no fillcolor domain)\n            _levels: {start: null, end: null, size: null},\n            // separate fill levels (for example, heatmap coloring of a\n            // contour map) if this is omitted, fillcolors will be\n            // evaluated halfway between levels\n            _filllevels: null,\n            // for continuous colorscales: fill with a gradient instead of explicit levels\n            // value should be the colorscale [[0, c0], [v1, c1], ..., [1, cEnd]]\n            _fillgradient: null,\n            // when using a gradient, we need the data range specified separately\n            _zrange: null\n        });\n    }\n\n    function calcOpts() {\n        if(typeof cbOpt.calc === 'function') {\n            cbOpt.calc(gd, trace, opts);\n        } else {\n            opts._fillgradient = cont.reversescale ?\n                flipScale(cont.colorscale) :\n                cont.colorscale;\n            opts._zrange = [cont[cbOpt.min], cont[cbOpt.max]];\n        }\n    }\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        trace = cd[0].trace;\n        var moduleOpts = trace._module.colorbar;\n\n        if(trace.visible === true && moduleOpts) {\n            var allowsMultiplotCbs = Array.isArray(moduleOpts);\n            var cbOpts = allowsMultiplotCbs ? moduleOpts : [moduleOpts];\n\n            for(var j = 0; j < cbOpts.length; j++) {\n                cbOpt = cbOpts[j];\n                var contName = cbOpt.container;\n                cont = contName ? trace[contName] : trace;\n\n                if(cont && cont.showscale) {\n                    opts = initOpts(cont.colorbar);\n                    opts._id = 'cb' + trace.uid + (allowsMultiplotCbs && contName ? '-' + contName : '');\n                    opts._traceIndex = trace.index;\n                    opts._propPrefix = (contName ? contName + '.' : '') + 'colorbar.';\n                    opts._meta = trace._meta;\n                    calcOpts();\n                    out.push(opts);\n                }\n            }\n        }\n    }\n\n    for(var k in fullLayout._colorAxes) {\n        cont = fullLayout[k];\n\n        if(cont.showscale) {\n            var colorAxOpts = fullLayout._colorAxes[k];\n\n            opts = initOpts(cont.colorbar);\n            opts._id = 'cb' + k;\n            opts._propPrefix = k + '.colorbar.';\n            opts._meta = fullLayout._meta;\n\n            cbOpt = {min: 'cmin', max: 'cmax'};\n            if(colorAxOpts[0] !== 'heatmap') {\n                trace = colorAxOpts[1];\n                cbOpt.calc = trace._module.colorbar.calc;\n            }\n\n            calcOpts();\n            out.push(opts);\n        }\n    }\n\n    return out;\n}\n\nfunction drawColorBar(g, opts, gd) {\n    var fullLayout = gd._fullLayout;\n    var gs = fullLayout._size;\n\n    var fillColor = opts._fillcolor;\n    var line = opts._line;\n    var title = opts.title;\n    var titleSide = title.side;\n\n    var zrange = opts._zrange ||\n        d3.extent((typeof fillColor === 'function' ? fillColor : line.color).domain());\n\n    var lineColormap = typeof line.color === 'function' ?\n        line.color :\n        function() { return line.color; };\n    var fillColormap = typeof fillColor === 'function' ?\n        fillColor :\n        function() { return fillColor; };\n\n    var levelsIn = opts._levels;\n    var levelsOut = calcLevels(gd, opts, zrange);\n    var fillLevels = levelsOut.fill;\n    var lineLevels = levelsOut.line;\n\n    // we calculate pixel sizes based on the specified graph size,\n    // not the actual (in case something pushed the margins around)\n    // which is a little odd but avoids an odd iterative effect\n    // when the colorbar itself is pushing the margins.\n    // but then the fractional size is calculated based on the\n    // actual graph size, so that the axes will size correctly.\n    var thickPx = Math.round(opts.thickness * (opts.thicknessmode === 'fraction' ? gs.w : 1));\n    var thickFrac = thickPx / gs.w;\n    var lenPx = Math.round(opts.len * (opts.lenmode === 'fraction' ? gs.h : 1));\n    var lenFrac = lenPx / gs.h;\n    var xpadFrac = opts.xpad / gs.w;\n    var yExtraPx = (opts.borderwidth + opts.outlinewidth) / 2;\n    var ypadFrac = opts.ypad / gs.h;\n\n    // x positioning: do it initially just for left anchor,\n    // then fix at the end (since we don't know the width yet)\n    var xLeft = Math.round(opts.x * gs.w + opts.xpad);\n    // for dragging... this is getting a little muddled...\n    var xLeftFrac = opts.x - thickFrac * ({middle: 0.5, right: 1}[opts.xanchor] || 0);\n\n    // y positioning we can do correctly from the start\n    var yBottomFrac = opts.y + lenFrac * (({top: -0.5, bottom: 0.5}[opts.yanchor] || 0) - 0.5);\n    var yBottomPx = Math.round(gs.h * (1 - yBottomFrac));\n    var yTopPx = yBottomPx - lenPx;\n\n    // stash a few things for makeEditable\n    opts._lenFrac = lenFrac;\n    opts._thickFrac = thickFrac;\n    opts._xLeftFrac = xLeftFrac;\n    opts._yBottomFrac = yBottomFrac;\n\n    var ax = mockColorBarAxis(gd, opts, zrange);\n\n    // position can't go in through supplyDefaults\n    // because that restricts it to [0,1]\n    ax.position = opts.x + xpadFrac + thickFrac;\n\n    if(['top', 'bottom'].indexOf(titleSide) !== -1) {\n        ax.title.side = titleSide;\n        ax.titlex = opts.x + xpadFrac;\n        ax.titley = yBottomFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);\n    }\n\n    if(line.color && opts.tickmode === 'auto') {\n        ax.tickmode = 'linear';\n        ax.tick0 = levelsIn.start;\n        var dtick = levelsIn.size;\n        // expand if too many contours, so we don't get too many ticks\n        var autoNtick = Lib.constrain((yBottomPx - yTopPx) / 50, 4, 15) + 1;\n        var dtFactor = (zrange[1] - zrange[0]) / ((opts.nticks || autoNtick) * dtick);\n        if(dtFactor > 1) {\n            var dtexp = Math.pow(10, Math.floor(Math.log(dtFactor) / Math.LN10));\n            dtick *= dtexp * Lib.roundUp(dtFactor / dtexp, [2, 5, 10]);\n            // if the contours are at round multiples, reset tick0\n            // so they're still at round multiples. Otherwise,\n            // keep the first label on the first contour level\n            if((Math.abs(levelsIn.start) / levelsIn.size + 1e-6) % 1 < 2e-6) {\n                ax.tick0 = 0;\n            }\n        }\n        ax.dtick = dtick;\n    }\n\n    // set domain after init, because we may want to\n    // allow it outside [0,1]\n    ax.domain = [\n        yBottomFrac + ypadFrac,\n        yBottomFrac + lenFrac - ypadFrac\n    ];\n\n    ax.setScale();\n\n    g.attr('transform', 'translate(' + Math.round(gs.l) + ',' + Math.round(gs.t) + ')');\n\n    var titleCont = g.select('.' + cn.cbtitleunshift)\n        .attr('transform', 'translate(-' + Math.round(gs.l) + ',-' + Math.round(gs.t) + ')');\n\n    var axLayer = g.select('.' + cn.cbaxis);\n    var titleEl;\n    var titleHeight = 0;\n\n    function drawTitle(titleClass, titleOpts) {\n        var dfltTitleOpts = {\n            propContainer: ax,\n            propName: opts._propPrefix + 'title',\n            traceIndex: opts._traceIndex,\n            _meta: opts._meta,\n            placeholder: fullLayout._dfltTitle.colorbar,\n            containerGroup: g.select('.' + cn.cbtitle)\n        };\n\n        // this class-to-rotate thing with convertToTspans is\n        // getting hackier and hackier... delete groups with the\n        // wrong class (in case earlier the colorbar was drawn on\n        // a different side, I think?)\n        var otherClass = titleClass.charAt(0) === 'h' ?\n            titleClass.substr(1) :\n            'h' + titleClass;\n        g.selectAll('.' + otherClass + ',.' + otherClass + '-math-group').remove();\n\n        Titles.draw(gd, titleClass, extendFlat(dfltTitleOpts, titleOpts || {}));\n    }\n\n    function drawDummyTitle() {\n        if(['top', 'bottom'].indexOf(titleSide) !== -1) {\n            // draw the title so we know how much room it needs\n            // when we squish the axis. This one only applies to\n            // top or bottom titles, not right side.\n            var x = gs.l + (opts.x + xpadFrac) * gs.w;\n            var fontSize = ax.title.font.size;\n            var y;\n\n            if(titleSide === 'top') {\n                y = (1 - (yBottomFrac + lenFrac - ypadFrac)) * gs.h +\n                    gs.t + 3 + fontSize * 0.75;\n            } else {\n                y = (1 - (yBottomFrac + ypadFrac)) * gs.h +\n                    gs.t - 3 - fontSize * 0.25;\n            }\n            drawTitle(ax._id + 'title', {\n                attributes: {x: x, y: y, 'text-anchor': 'start'}\n            });\n        }\n    }\n\n    function drawCbTitle() {\n        if(['top', 'bottom'].indexOf(titleSide) === -1) {\n            var fontSize = ax.title.font.size;\n            var y = ax._offset + ax._length / 2;\n            var x = gs.l + (ax.position || 0) * gs.w + ((ax.side === 'right') ?\n                10 + fontSize * ((ax.showticklabels ? 1 : 0.5)) :\n                -10 - fontSize * ((ax.showticklabels ? 0.5 : 0)));\n\n            // the 'h' + is a hack to get around the fact that\n            // convertToTspans rotates any 'y...' class by 90 degrees.\n            // TODO: find a better way to control this.\n            drawTitle('h' + ax._id + 'title', {\n                avoid: {\n                    selection: d3.select(gd).selectAll('g.' + ax._id + 'tick'),\n                    side: titleSide,\n                    offsetLeft: gs.l,\n                    offsetTop: 0,\n                    maxShift: fullLayout.width\n                },\n                attributes: {x: x, y: y, 'text-anchor': 'middle'},\n                transform: {rotate: '-90', offset: 0}\n            });\n        }\n    }\n\n    function drawAxis() {\n        if(['top', 'bottom'].indexOf(titleSide) !== -1) {\n            // squish the axis top to make room for the title\n            var titleGroup = g.select('.' + cn.cbtitle);\n            var titleText = titleGroup.select('text');\n            var titleTrans = [-opts.outlinewidth / 2, opts.outlinewidth / 2];\n            var mathJaxNode = titleGroup\n                .select('.h' + ax._id + 'title-math-group')\n                .node();\n            var lineSize = 15.6;\n            if(titleText.node()) {\n                lineSize = parseInt(titleText.node().style.fontSize, 10) * LINE_SPACING;\n            }\n            if(mathJaxNode) {\n                titleHeight = Drawing.bBox(mathJaxNode).height;\n                if(titleHeight > lineSize) {\n                    // not entirely sure how mathjax is doing\n                    // vertical alignment, but this seems to work.\n                    titleTrans[1] -= (titleHeight - lineSize) / 2;\n                }\n            } else if(titleText.node() && !titleText.classed(cn.jsPlaceholder)) {\n                titleHeight = Drawing.bBox(titleText.node()).height;\n            }\n            if(titleHeight) {\n                // buffer btwn colorbar and title\n                // TODO: configurable\n                titleHeight += 5;\n\n                if(titleSide === 'top') {\n                    ax.domain[1] -= titleHeight / gs.h;\n                    titleTrans[1] *= -1;\n                } else {\n                    ax.domain[0] += titleHeight / gs.h;\n                    var nlines = svgTextUtils.lineCount(titleText);\n                    titleTrans[1] += (1 - nlines) * lineSize;\n                }\n\n                titleGroup.attr('transform', 'translate(' + titleTrans + ')');\n                ax.setScale();\n            }\n        }\n\n        g.selectAll('.' + cn.cbfills + ',.' + cn.cblines)\n            .attr('transform', 'translate(0,' + Math.round(gs.h * (1 - ax.domain[1])) + ')');\n\n        axLayer.attr('transform', 'translate(0,' + Math.round(-gs.t) + ')');\n\n        var fills = g.select('.' + cn.cbfills)\n            .selectAll('rect.' + cn.cbfill)\n            .data(fillLevels);\n        fills.enter().append('rect')\n            .classed(cn.cbfill, true)\n            .style('stroke', 'none');\n        fills.exit().remove();\n\n        var zBounds = zrange\n            .map(ax.c2p)\n            .map(Math.round)\n            .sort(function(a, b) { return a - b; });\n\n        fills.each(function(d, i) {\n            var z = [\n                (i === 0) ? zrange[0] : (fillLevels[i] + fillLevels[i - 1]) / 2,\n                (i === fillLevels.length - 1) ? zrange[1] : (fillLevels[i] + fillLevels[i + 1]) / 2\n            ]\n            .map(ax.c2p)\n            .map(Math.round);\n\n            // offset the side adjoining the next rectangle so they\n            // overlap, to prevent antialiasing gaps\n            z[1] = Lib.constrain(z[1] + (z[1] > z[0]) ? 1 : -1, zBounds[0], zBounds[1]);\n\n\n            // Colorbar cannot currently support opacities so we\n            // use an opaque fill even when alpha channels present\n            var fillEl = d3.select(this).attr({\n                x: xLeft,\n                width: Math.max(thickPx, 2),\n                y: d3.min(z),\n                height: Math.max(d3.max(z) - d3.min(z), 2),\n            });\n\n            if(opts._fillgradient) {\n                Drawing.gradient(fillEl, gd, opts._id, 'vertical', opts._fillgradient, 'fill');\n            } else {\n                // tinycolor can't handle exponents and\n                // at this scale, removing it makes no difference.\n                var colorString = fillColormap(d).replace('e-', '');\n                fillEl.attr('fill', tinycolor(colorString).toHexString());\n            }\n        });\n\n        var lines = g.select('.' + cn.cblines)\n            .selectAll('path.' + cn.cbline)\n            .data(line.color && line.width ? lineLevels : []);\n        lines.enter().append('path')\n            .classed(cn.cbline, true);\n        lines.exit().remove();\n        lines.each(function(d) {\n            d3.select(this)\n                .attr('d', 'M' + xLeft + ',' +\n                    (Math.round(ax.c2p(d)) + (line.width / 2) % 1) + 'h' + thickPx)\n                .call(Drawing.lineGroupStyle, line.width, lineColormap(d), line.dash);\n        });\n\n        // force full redraw of labels and ticks\n        axLayer.selectAll('g.' + ax._id + 'tick,path').remove();\n\n        var shift = xLeft + thickPx +\n            (opts.outlinewidth || 0) / 2 - (opts.ticks === 'outside' ? 1 : 0);\n\n        var vals = Axes.calcTicks(ax);\n        var transFn = Axes.makeTransFn(ax);\n        var tickSign = Axes.getTickSigns(ax)[2];\n\n        Axes.drawTicks(gd, ax, {\n            vals: ax.ticks === 'inside' ? Axes.clipEnds(ax, vals) : vals,\n            layer: axLayer,\n            path: Axes.makeTickPath(ax, shift, tickSign),\n            transFn: transFn\n        });\n\n        return Axes.drawLabels(gd, ax, {\n            vals: vals,\n            layer: axLayer,\n            transFn: transFn,\n            labelFns: Axes.makeLabelFns(ax, shift)\n        });\n    }\n\n    // wait for the axis & title to finish rendering before\n    // continuing positioning\n    // TODO: why are we redrawing multiple times now with this?\n    // I guess autoMargin doesn't like being post-promise?\n    function positionCB() {\n        var innerWidth = thickPx + opts.outlinewidth / 2 + Drawing.bBox(axLayer.node()).width;\n        titleEl = titleCont.select('text');\n\n        if(titleEl.node() && !titleEl.classed(cn.jsPlaceholder)) {\n            var mathJaxNode = titleCont.select('.h' + ax._id + 'title-math-group').node();\n            var titleWidth;\n            if(mathJaxNode && ['top', 'bottom'].indexOf(titleSide) !== -1) {\n                titleWidth = Drawing.bBox(mathJaxNode).width;\n            } else {\n                // note: the formula below works for all title sides,\n                // (except for top/bottom mathjax, above)\n                // but the weird gs.l is because the titleunshift\n                // transform gets removed by Drawing.bBox\n                titleWidth = Drawing.bBox(titleCont.node()).right - xLeft - gs.l;\n            }\n            innerWidth = Math.max(innerWidth, titleWidth);\n        }\n\n        var outerwidth = 2 * opts.xpad + innerWidth + opts.borderwidth + opts.outlinewidth / 2;\n        var outerheight = yBottomPx - yTopPx;\n\n        g.select('.' + cn.cbbg).attr({\n            x: xLeft - opts.xpad - (opts.borderwidth + opts.outlinewidth) / 2,\n            y: yTopPx - yExtraPx,\n            width: Math.max(outerwidth, 2),\n            height: Math.max(outerheight + 2 * yExtraPx, 2)\n        })\n        .call(Color.fill, opts.bgcolor)\n        .call(Color.stroke, opts.bordercolor)\n        .style('stroke-width', opts.borderwidth);\n\n        g.selectAll('.' + cn.cboutline).attr({\n            x: xLeft,\n            y: yTopPx + opts.ypad + (titleSide === 'top' ? titleHeight : 0),\n            width: Math.max(thickPx, 2),\n            height: Math.max(outerheight - 2 * opts.ypad - titleHeight, 2)\n        })\n        .call(Color.stroke, opts.outlinecolor)\n        .style({\n            fill: 'none',\n            'stroke-width': opts.outlinewidth\n        });\n\n        // fix positioning for xanchor!='left'\n        var xoffset = ({center: 0.5, right: 1}[opts.xanchor] || 0) * outerwidth;\n        g.attr('transform', 'translate(' + (gs.l - xoffset) + ',' + gs.t + ')');\n\n        // auto margin adjustment\n        var marginOpts = {};\n        var tFrac = FROM_TL[opts.yanchor];\n        var bFrac = FROM_BR[opts.yanchor];\n        if(opts.lenmode === 'pixels') {\n            marginOpts.y = opts.y;\n            marginOpts.t = outerheight * tFrac;\n            marginOpts.b = outerheight * bFrac;\n        } else {\n            marginOpts.t = marginOpts.b = 0;\n            marginOpts.yt = opts.y + opts.len * tFrac;\n            marginOpts.yb = opts.y - opts.len * bFrac;\n        }\n\n        var lFrac = FROM_TL[opts.xanchor];\n        var rFrac = FROM_BR[opts.xanchor];\n        if(opts.thicknessmode === 'pixels') {\n            marginOpts.x = opts.x;\n            marginOpts.l = outerwidth * lFrac;\n            marginOpts.r = outerwidth * rFrac;\n        } else {\n            var extraThickness = outerwidth - thickPx;\n            marginOpts.l = extraThickness * lFrac;\n            marginOpts.r = extraThickness * rFrac;\n            marginOpts.xl = opts.x - opts.thickness * lFrac;\n            marginOpts.xr = opts.x + opts.thickness * rFrac;\n        }\n\n        Plots.autoMargin(gd, opts._id, marginOpts);\n    }\n\n    return Lib.syncOrAsync([\n        Plots.previousPromises,\n        drawDummyTitle,\n        drawAxis,\n        drawCbTitle,\n        Plots.previousPromises,\n        positionCB\n    ], gd);\n}\n\nfunction makeEditable(g, opts, gd) {\n    var fullLayout = gd._fullLayout;\n    var gs = fullLayout._size;\n    var t0, xf, yf;\n\n    dragElement.init({\n        element: g.node(),\n        gd: gd,\n        prepFn: function() {\n            t0 = g.attr('transform');\n            setCursor(g);\n        },\n        moveFn: function(dx, dy) {\n            g.attr('transform', t0 + ' ' + 'translate(' + dx + ',' + dy + ')');\n\n            xf = dragElement.align(opts._xLeftFrac + (dx / gs.w), opts._thickFrac,\n                0, 1, opts.xanchor);\n            yf = dragElement.align(opts._yBottomFrac - (dy / gs.h), opts._lenFrac,\n                0, 1, opts.yanchor);\n\n            var csr = dragElement.getCursor(xf, yf, opts.xanchor, opts.yanchor);\n            setCursor(g, csr);\n        },\n        doneFn: function() {\n            setCursor(g);\n\n            if(xf !== undefined && yf !== undefined) {\n                var update = {};\n                update[opts._propPrefix + 'x'] = xf;\n                update[opts._propPrefix + 'y'] = yf;\n                if(opts._traceIndex !== undefined) {\n                    Registry.call('_guiRestyle', gd, update, opts._traceIndex);\n                } else {\n                    Registry.call('_guiRelayout', gd, update);\n                }\n            }\n        }\n    });\n}\n\nfunction calcLevels(gd, opts, zrange) {\n    var levelsIn = opts._levels;\n    var lineLevels = [];\n    var fillLevels = [];\n    var l;\n    var i;\n\n    var l0 = levelsIn.end + levelsIn.size / 100;\n    var ls = levelsIn.size;\n    var zr0 = (1.001 * zrange[0] - 0.001 * zrange[1]);\n    var zr1 = (1.001 * zrange[1] - 0.001 * zrange[0]);\n\n    for(i = 0; i < 1e5; i++) {\n        l = levelsIn.start + i * ls;\n        if(ls > 0 ? (l >= l0) : (l <= l0)) break;\n        if(l > zr0 && l < zr1) lineLevels.push(l);\n    }\n\n    if(opts._fillgradient) {\n        fillLevels = [0];\n    } else if(typeof opts._fillcolor === 'function') {\n        var fillLevelsIn = opts._filllevels;\n\n        if(fillLevelsIn) {\n            l0 = fillLevelsIn.end + fillLevelsIn.size / 100;\n            ls = fillLevelsIn.size;\n            for(i = 0; i < 1e5; i++) {\n                l = fillLevelsIn.start + i * ls;\n                if(ls > 0 ? (l >= l0) : (l <= l0)) break;\n                if(l > zrange[0] && l < zrange[1]) fillLevels.push(l);\n            }\n        } else {\n            fillLevels = lineLevels.map(function(v) {\n                return v - levelsIn.size / 2;\n            });\n            fillLevels.push(fillLevels[fillLevels.length - 1] + levelsIn.size);\n        }\n    } else if(opts._fillcolor && typeof opts._fillcolor === 'string') {\n        // doesn't matter what this value is, with a single value\n        // we'll make a single fill rect covering the whole bar\n        fillLevels = [0];\n    }\n\n    if(levelsIn.size < 0) {\n        lineLevels.reverse();\n        fillLevels.reverse();\n    }\n\n    return {line: lineLevels, fill: fillLevels};\n}\n\nfunction mockColorBarAxis(gd, opts, zrange) {\n    var fullLayout = gd._fullLayout;\n\n    var cbAxisIn = {\n        type: 'linear',\n        range: zrange,\n        tickmode: opts.tickmode,\n        nticks: opts.nticks,\n        tick0: opts.tick0,\n        dtick: opts.dtick,\n        tickvals: opts.tickvals,\n        ticktext: opts.ticktext,\n        ticks: opts.ticks,\n        ticklen: opts.ticklen,\n        tickwidth: opts.tickwidth,\n        tickcolor: opts.tickcolor,\n        showticklabels: opts.showticklabels,\n        tickfont: opts.tickfont,\n        tickangle: opts.tickangle,\n        tickformat: opts.tickformat,\n        exponentformat: opts.exponentformat,\n        separatethousands: opts.separatethousands,\n        showexponent: opts.showexponent,\n        showtickprefix: opts.showtickprefix,\n        tickprefix: opts.tickprefix,\n        showticksuffix: opts.showticksuffix,\n        ticksuffix: opts.ticksuffix,\n        title: opts.title,\n        showline: true,\n        anchor: 'free',\n        side: 'right',\n        position: 1\n    };\n\n    var cbAxisOut = {\n        type: 'linear',\n        _id: 'y' + opts._id\n    };\n\n    var axisOptions = {\n        letter: 'y',\n        font: fullLayout.font,\n        noHover: true,\n        noTickson: true,\n        calendar: fullLayout.calendar  // not really necessary (yet?)\n    };\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(cbAxisIn, cbAxisOut, axisLayoutAttrs, attr, dflt);\n    }\n\n    handleAxisDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions, fullLayout);\n    handleAxisPositionDefaults(cbAxisIn, cbAxisOut, coerce, axisOptions);\n\n    return cbAxisOut;\n}\n\nmodule.exports = {\n    draw: draw\n};\n\n},{\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/extend\":693,\"../../lib/setcursor\":723,\"../../lib/svg_text_utils\":727,\"../../plots/cartesian/axes\":751,\"../../plots/cartesian/axis_defaults\":753,\"../../plots/cartesian/layout_attributes\":763,\"../../plots/cartesian/position_defaults\":766,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../colorscale/helpers\":591,\"../dragelement\":598,\"../drawing\":601,\"../titles\":668,\"./constants\":582,\"d3\":157,\"tinycolor2\":524}],585:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n\nmodule.exports = function hasColorbar(container) {\n    return Lib.isPlainObject(container.colorbar);\n};\n\n},{\"../../lib\":703}],586:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'colorbar',\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n\n    draw: _dereq_('./draw').draw,\n    hasColorbar: _dereq_('./has_colorbar')\n};\n\n},{\"./attributes\":581,\"./defaults\":583,\"./draw\":584,\"./has_colorbar\":585}],587:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorbarAttrs = _dereq_('../colorbar/attributes');\nvar counterRegex = _dereq_('../../lib/regex').counter;\n\nvar palettes = _dereq_('./scales.js').scales;\nvar paletteStr = Object.keys(palettes);\n\nfunction code(s) {\n    return '`' + s + '`';\n}\n\n/**\n * Make colorscale attribute declarations for\n *\n * - colorscale,\n * - (c|z)auto, (c|z)min, (c|z)max,\n * - autocolorscale, reversescale,\n * - showscale (optionally)\n * - color (optionally)\n *\n * @param {string} context (dflt: '', i.e. from trace root):\n *     the container this is in ('', *marker*, *marker.line* etc)\n *\n * @param {object} opts:\n *   - cLetter {string} (dflt: 'c'):\n *     leading letter for 'min', 'max and 'auto' attribute (either 'z' or 'c')\n *\n *   - colorAttr {string} (dflt: 'z' if `cLetter: 'z'`, 'color' if `cLetter: 'c'`):\n *     (for descriptions) sets the name of the color attribute that maps to the colorscale.\n *\n *     N.B. if `colorAttr: 'color'`, we include the `color` declaration here.\n *\n *   - onlyIfNumerical {string} (dflt: false' if `cLetter: 'z'`, true if `cLetter: 'c'`):\n *     (for descriptions) set to true if colorscale attribute only\n *\n *   - colorscaleDflt {string}:\n *     overrides the colorscale dflt\n *\n *   - autoColorDflt {boolean} (dflt true):\n *     normally autocolorscale.dflt is `true`, but pass `false` to override\n *\n *   - noScale {boolean} (dflt: true if `context: 'marker.line'`, false otherwise):\n *     set to `false` to not include showscale attribute (e.g. for 'marker.line')\n *\n *   - showScaleDflt {boolean} (dflt: true if `cLetter: 'z'`, false otherwise)\n *\n *   - editTypeOverride {boolean} (dflt: ''):\n *     most of these attributes already require a recalc, but the ones that do not\n *     have editType *style* or *plot* unless you override (presumably with *calc*)\n *\n *   - anim {boolean) (dflt: undefined): is 'color' animatable?\n *\n * @return {object}\n */\nmodule.exports = function colorScaleAttrs(context, opts) {\n    context = context || '';\n    opts = opts || {};\n\n    var cLetter = opts.cLetter || 'c';\n    var onlyIfNumerical = ('onlyIfNumerical' in opts) ? opts.onlyIfNumerical : Boolean(context);\n    var noScale = ('noScale' in opts) ? opts.noScale : context === 'marker.line';\n    var showScaleDflt = ('showScaleDflt' in opts) ? opts.showScaleDflt : cLetter === 'z';\n    var colorscaleDflt = typeof opts.colorscaleDflt === 'string' ? palettes[opts.colorscaleDflt] : null;\n    var editTypeOverride = opts.editTypeOverride || '';\n    var contextHead = context ? (context + '.') : '';\n\n    var colorAttr, colorAttrFull;\n\n    if('colorAttr' in opts) {\n        colorAttr = opts.colorAttr;\n        colorAttrFull = opts.colorAttr;\n    } else {\n        colorAttr = {z: 'z', c: 'color'}[cLetter];\n        colorAttrFull = 'in ' + code(contextHead + colorAttr);\n    }\n\n    var effectDesc = onlyIfNumerical ?\n        ' Has an effect only if ' + colorAttrFull + 'is set to a numerical array.' :\n        '';\n\n    var auto = cLetter + 'auto';\n    var min = cLetter + 'min';\n    var max = cLetter + 'max';\n    var mid = cLetter + 'mid';\n    var autoFull = code(contextHead + auto);\n    var minFull = code(contextHead + min);\n    var maxFull = code(contextHead + max);\n    var minmaxFull = minFull + ' and ' + maxFull;\n    var autoImpliedEdits = {};\n    autoImpliedEdits[min] = autoImpliedEdits[max] = undefined;\n    var minmaxImpliedEdits = {};\n    minmaxImpliedEdits[auto] = false;\n\n    var attrs = {};\n\n    if(colorAttr === 'color') {\n        attrs.color = {\n            valType: 'color',\n            arrayOk: true,\n            \n            editType: editTypeOverride || 'style',\n            \n        };\n\n        if(opts.anim) {\n            attrs.color.anim = true;\n        }\n    }\n\n    attrs[auto] = {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc',\n        impliedEdits: autoImpliedEdits,\n        \n    };\n\n    attrs[min] = {\n        valType: 'number',\n        \n        dflt: null,\n        editType: editTypeOverride || 'plot',\n        impliedEdits: minmaxImpliedEdits,\n        \n    };\n\n    attrs[max] = {\n        valType: 'number',\n        \n        dflt: null,\n        editType: editTypeOverride || 'plot',\n        impliedEdits: minmaxImpliedEdits,\n        \n    };\n\n    attrs[mid] = {\n        valType: 'number',\n        \n        dflt: null,\n        editType: 'calc',\n        impliedEdits: autoImpliedEdits,\n        \n    };\n\n    attrs.colorscale = {\n        valType: 'colorscale',\n        \n        editType: 'calc',\n        dflt: colorscaleDflt,\n        impliedEdits: {autocolorscale: false},\n        \n    };\n\n    attrs.autocolorscale = {\n        valType: 'boolean',\n        \n        // gets overrode in 'heatmap' & 'surface' for backwards comp.\n        dflt: opts.autoColorDflt === false ? false : true,\n        editType: 'calc',\n        impliedEdits: {colorscale: undefined},\n        \n    };\n\n    attrs.reversescale = {\n        valType: 'boolean',\n        \n        dflt: false,\n        editType: 'plot',\n        \n    };\n\n    if(!noScale) {\n        attrs.showscale = {\n            valType: 'boolean',\n            \n            dflt: showScaleDflt,\n            editType: 'calc',\n            \n        };\n\n        attrs.colorbar = colorbarAttrs;\n    }\n\n    if(!opts.noColorAxis) {\n        attrs.coloraxis = {\n            valType: 'subplotid',\n            \n            regex: counterRegex('coloraxis'),\n            dflt: null,\n            editType: 'calc',\n            \n        };\n    }\n\n    return attrs;\n};\n\n},{\"../../lib/regex\":719,\"../colorbar/attributes\":581,\"./scales.js\":595}],588:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar extractOpts = _dereq_('./helpers').extractOpts;\n\nmodule.exports = function calc(gd, trace, opts) {\n    var fullLayout = gd._fullLayout;\n    var vals = opts.vals;\n    var containerStr = opts.containerStr;\n\n    var container = containerStr ?\n        Lib.nestedProperty(trace, containerStr).get() :\n        trace;\n\n    var cOpts = extractOpts(container);\n    var auto = cOpts.auto !== false;\n    var min = cOpts.min;\n    var max = cOpts.max;\n    var mid = cOpts.mid;\n\n    var minVal = function() { return Lib.aggNums(Math.min, null, vals); };\n    var maxVal = function() { return Lib.aggNums(Math.max, null, vals); };\n\n    if(min === undefined) {\n        min = minVal();\n    } else if(auto) {\n        if(container._colorAx && isNumeric(min)) {\n            min = Math.min(min, minVal());\n        } else {\n            min = minVal();\n        }\n    }\n\n    if(max === undefined) {\n        max = maxVal();\n    } else if(auto) {\n        if(container._colorAx && isNumeric(max)) {\n            max = Math.max(max, maxVal());\n        } else {\n            max = maxVal();\n        }\n    }\n\n    if(auto && mid !== undefined) {\n        if(max - mid > mid - min) {\n            min = mid - (max - mid);\n        } else if(max - mid < mid - min) {\n            max = mid + (mid - min);\n        }\n    }\n\n    if(min === max) {\n        min -= 0.5;\n        max += 0.5;\n    }\n\n    cOpts._sync('min', min);\n    cOpts._sync('max', max);\n\n    if(cOpts.autocolorscale) {\n        var scl;\n        if(min * max < 0) scl = fullLayout.colorscale.diverging;\n        else if(min >= 0) scl = fullLayout.colorscale.sequential;\n        else scl = fullLayout.colorscale.sequentialminus;\n        cOpts._sync('colorscale', scl);\n    }\n};\n\n},{\"../../lib\":703,\"./helpers\":591,\"fast-isnumeric\":224}],589:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar hasColorscale = _dereq_('./helpers').hasColorscale;\nvar extractOpts = _dereq_('./helpers').extractOpts;\n\nmodule.exports = function crossTraceDefaults(fullData, fullLayout) {\n    function replace(cont, k) {\n        var val = cont['_' + k];\n        if(val !== undefined) {\n            cont[k] = val;\n        }\n    }\n\n    function relinkColorAtts(outerCont, cbOpt) {\n        var cont = cbOpt.container ?\n            Lib.nestedProperty(outerCont, cbOpt.container).get() :\n            outerCont;\n\n        if(cont) {\n            if(cont.coloraxis) {\n                // stash ref to color axis\n                cont._colorAx = fullLayout[cont.coloraxis];\n            } else {\n                var cOpts = extractOpts(cont);\n                var isAuto = cOpts.auto;\n\n                if(isAuto || cOpts.min === undefined) {\n                    replace(cont, cbOpt.min);\n                }\n                if(isAuto || cOpts.max === undefined) {\n                    replace(cont, cbOpt.max);\n                }\n                if(cOpts.autocolorscale) {\n                    replace(cont, 'colorscale');\n                }\n            }\n        }\n    }\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n        var cbOpts = trace._module.colorbar;\n\n        if(cbOpts) {\n            if(Array.isArray(cbOpts)) {\n                for(var j = 0; j < cbOpts.length; j++) {\n                    relinkColorAtts(trace, cbOpts[j]);\n                }\n            } else {\n                relinkColorAtts(trace, cbOpts);\n            }\n        }\n\n        if(hasColorscale(trace, 'marker.line')) {\n            relinkColorAtts(trace, {\n                container: 'marker.line',\n                min: 'cmin',\n                max: 'cmax'\n            });\n        }\n    }\n\n    for(var k in fullLayout._colorAxes) {\n        relinkColorAtts(fullLayout[k], {min: 'cmin', max: 'cmax'});\n    }\n};\n\n},{\"../../lib\":703,\"./helpers\":591}],590:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar hasColorbar = _dereq_('../colorbar/has_colorbar');\nvar colorbarDefaults = _dereq_('../colorbar/defaults');\n\nvar isValidScale = _dereq_('./scales').isValid;\nvar traceIs = _dereq_('../../registry').traceIs;\n\nfunction npMaybe(parentCont, prefix) {\n    var containerStr = prefix.slice(0, prefix.length - 1);\n    return prefix ?\n        Lib.nestedProperty(parentCont, containerStr).get() || {} :\n        parentCont;\n}\n\n/**\n * Colorscale / colorbar default handler\n *\n * @param {object} parentContIn : user (input) parent container (e.g. trace or layout coloraxis object)\n * @param {object} parentContOut : full parent container\n * @param {object} layout : (full) layout object\n * @param {fn} coerce : Lib.coerce wrapper\n * @param {object} opts :\n * - prefix {string} : attr string prefix to colorscale container from parent root\n * - cLetter {string} : 'c or 'z' color letter\n */\nmodule.exports = function colorScaleDefaults(parentContIn, parentContOut, layout, coerce, opts) {\n    var prefix = opts.prefix;\n    var cLetter = opts.cLetter;\n    var inTrace = '_module' in parentContOut;\n    var containerIn = npMaybe(parentContIn, prefix);\n    var containerOut = npMaybe(parentContOut, prefix);\n    var template = npMaybe(parentContOut._template || {}, prefix) || {};\n\n    // colorScaleDefaults wrapper called if-ever we need to reset the colorscale\n    // attributes for containers that were linked to invalid color axes\n    var thisFn = function() {\n        delete parentContIn.coloraxis;\n        delete parentContOut.coloraxis;\n        return colorScaleDefaults(parentContIn, parentContOut, layout, coerce, opts);\n    };\n\n    if(inTrace) {\n        var colorAxes = layout._colorAxes || {};\n        var colorAx = coerce(prefix + 'coloraxis');\n\n        if(colorAx) {\n            var colorbarVisuals = (\n                traceIs(parentContOut, 'contour') &&\n                Lib.nestedProperty(parentContOut, 'contours.coloring').get()\n            ) || 'heatmap';\n\n            var stash = colorAxes[colorAx];\n\n            if(stash) {\n                stash[2].push(thisFn);\n\n                if(stash[0] !== colorbarVisuals) {\n                    stash[0] = false;\n                    Lib.warn([\n                        'Ignoring coloraxis:', colorAx, 'setting',\n                        'as it is linked to incompatible colorscales.'\n                    ].join(' '));\n                }\n            } else {\n                // stash:\n                // - colorbar visual 'type'\n                // - colorbar options to help in Colorbar.draw\n                // - list of colorScaleDefaults wrapper functions\n                colorAxes[colorAx] = [colorbarVisuals, parentContOut, [thisFn]];\n            }\n            return;\n        }\n    }\n\n    var minIn = containerIn[cLetter + 'min'];\n    var maxIn = containerIn[cLetter + 'max'];\n    var validMinMax = isNumeric(minIn) && isNumeric(maxIn) && (minIn < maxIn);\n    var auto = coerce(prefix + cLetter + 'auto', !validMinMax);\n\n    if(auto) {\n        coerce(prefix + cLetter + 'mid');\n    } else {\n        coerce(prefix + cLetter + 'min');\n        coerce(prefix + cLetter + 'max');\n    }\n\n    // handles both the trace case (autocolorscale is false by default) and\n    // the marker and marker.line case (autocolorscale is true by default)\n    var sclIn = containerIn.colorscale;\n    var sclTemplate = template.colorscale;\n    var autoColorscaleDflt;\n    if(sclIn !== undefined) autoColorscaleDflt = !isValidScale(sclIn);\n    if(sclTemplate !== undefined) autoColorscaleDflt = !isValidScale(sclTemplate);\n    coerce(prefix + 'autocolorscale', autoColorscaleDflt);\n\n    coerce(prefix + 'colorscale');\n    coerce(prefix + 'reversescale');\n\n    if(prefix !== 'marker.line.') {\n        // handles both the trace case where the dflt is listed in attributes and\n        // the marker case where the dflt is determined by hasColorbar\n        var showScaleDflt;\n        if(prefix && inTrace) showScaleDflt = hasColorbar(containerIn);\n\n        var showScale = coerce(prefix + 'showscale', showScaleDflt);\n        if(showScale) colorbarDefaults(containerIn, containerOut, layout);\n    }\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"../colorbar/defaults\":583,\"../colorbar/has_colorbar\":585,\"./scales\":595,\"fast-isnumeric\":224}],591:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../color');\n\nvar isValidScale = _dereq_('./scales').isValid;\n\nfunction hasColorscale(trace, containerStr) {\n    var container = containerStr ?\n        Lib.nestedProperty(trace, containerStr).get() || {} :\n        trace;\n    var color = container.color;\n\n    var isArrayWithOneNumber = false;\n    if(Lib.isArrayOrTypedArray(color)) {\n        for(var i = 0; i < color.length; i++) {\n            if(isNumeric(color[i])) {\n                isArrayWithOneNumber = true;\n                break;\n            }\n        }\n    }\n\n    return (\n        Lib.isPlainObject(container) && (\n            isArrayWithOneNumber ||\n            container.showscale === true ||\n            (isNumeric(container.cmin) && isNumeric(container.cmax)) ||\n            isValidScale(container.colorscale) ||\n            Lib.isPlainObject(container.colorbar)\n        )\n    );\n}\n\nvar constantAttrs = ['showscale', 'autocolorscale', 'colorscale', 'reversescale', 'colorbar'];\nvar letterAttrs = ['min', 'max', 'mid', 'auto'];\n\n/**\n * Extract 'c' / 'z', trace / color axis colorscale options\n *\n * Note that it would be nice to replace all z* with c* equivalents in v2\n *\n * @param {object} cont : attribute container\n * @return {object}:\n *  - min: cmin or zmin\n *  - max: cmax or zmax\n *  - mid: cmid or zmid\n *  - auto: cauto or zauto\n *  - *scale: *scale attrs\n *  - colorbar: colorbar\n *  - _sync: function syncing attr and underscore dual (useful when calc'ing min/max)\n */\nfunction extractOpts(cont) {\n    var colorAx = cont._colorAx;\n    var cont2 = colorAx ? colorAx : cont;\n    var out = {};\n    var cLetter;\n    var i, k;\n\n    for(i = 0; i < constantAttrs.length; i++) {\n        k = constantAttrs[i];\n        out[k] = cont2[k];\n    }\n\n    if(colorAx) {\n        cLetter = 'c';\n        for(i = 0; i < letterAttrs.length; i++) {\n            k = letterAttrs[i];\n            out[k] = cont2['c' + k];\n        }\n    } else {\n        var k2;\n        for(i = 0; i < letterAttrs.length; i++) {\n            k = letterAttrs[i];\n            k2 = 'c' + k;\n            if(k2 in cont2) {\n                out[k] = cont2[k2];\n                continue;\n            }\n            k2 = 'z' + k;\n            if(k2 in cont2) {\n                out[k] = cont2[k2];\n            }\n        }\n        cLetter = k2.charAt(0);\n    }\n\n    out._sync = function(k, v) {\n        var k2 = letterAttrs.indexOf(k) !== -1 ? cLetter + k : k;\n        cont2[k2] = cont2['_' + k2] = v;\n    };\n\n    return out;\n}\n\n/**\n * Extract colorscale into numeric domain and color range.\n *\n * @param {object} cont colorscale container (e.g. trace, marker)\n *  - colorscale {array of arrays}\n *  - cmin/zmin {number}\n *  - cmax/zmax {number}\n *  - reversescale {boolean}\n *\n * @return {object}\n *  - domain {array}\n *  - range {array}\n */\nfunction extractScale(cont) {\n    var cOpts = extractOpts(cont);\n    var cmin = cOpts.min;\n    var cmax = cOpts.max;\n\n    var scl = cOpts.reversescale ?\n        flipScale(cOpts.colorscale) :\n        cOpts.colorscale;\n\n    var N = scl.length;\n    var domain = new Array(N);\n    var range = new Array(N);\n\n    for(var i = 0; i < N; i++) {\n        var si = scl[i];\n        domain[i] = cmin + si[0] * (cmax - cmin);\n        range[i] = si[1];\n    }\n\n    return {domain: domain, range: range};\n}\n\nfunction flipScale(scl) {\n    var N = scl.length;\n    var sclNew = new Array(N);\n\n    for(var i = N - 1, j = 0; i >= 0; i--, j++) {\n        var si = scl[i];\n        sclNew[j] = [1 - si[0], si[1]];\n    }\n    return sclNew;\n}\n\n/**\n * General colorscale function generator.\n *\n * @param {object} specs output of Colorscale.extractScale or precomputed domain, range.\n *  - domain {array}\n *  - range {array}\n *\n * @param {object} opts\n *  - noNumericCheck {boolean} if true, scale func bypasses numeric checks\n *  - returnArray {boolean} if true, scale func return 4-item array instead of color strings\n *\n * @return {function}\n */\nfunction makeColorScaleFunc(specs, opts) {\n    opts = opts || {};\n\n    var domain = specs.domain;\n    var range = specs.range;\n    var N = range.length;\n    var _range = new Array(N);\n\n    for(var i = 0; i < N; i++) {\n        var rgba = tinycolor(range[i]).toRgb();\n        _range[i] = [rgba.r, rgba.g, rgba.b, rgba.a];\n    }\n\n    var _sclFunc = d3.scale.linear()\n        .domain(domain)\n        .range(_range)\n        .clamp(true);\n\n    var noNumericCheck = opts.noNumericCheck;\n    var returnArray = opts.returnArray;\n    var sclFunc;\n\n    if(noNumericCheck && returnArray) {\n        sclFunc = _sclFunc;\n    } else if(noNumericCheck) {\n        sclFunc = function(v) {\n            return colorArray2rbga(_sclFunc(v));\n        };\n    } else if(returnArray) {\n        sclFunc = function(v) {\n            if(isNumeric(v)) return _sclFunc(v);\n            else if(tinycolor(v).isValid()) return v;\n            else return Color.defaultLine;\n        };\n    } else {\n        sclFunc = function(v) {\n            if(isNumeric(v)) return colorArray2rbga(_sclFunc(v));\n            else if(tinycolor(v).isValid()) return v;\n            else return Color.defaultLine;\n        };\n    }\n\n    // colorbar draw looks into the d3 scale closure for domain and range\n    sclFunc.domain = _sclFunc.domain;\n    sclFunc.range = function() { return range; };\n\n    return sclFunc;\n}\n\nfunction makeColorScaleFuncFromTrace(trace, opts) {\n    return makeColorScaleFunc(extractScale(trace), opts);\n}\n\nfunction colorArray2rbga(colorArray) {\n    var colorObj = {\n        r: colorArray[0],\n        g: colorArray[1],\n        b: colorArray[2],\n        a: colorArray[3]\n    };\n\n    return tinycolor(colorObj).toRgbString();\n}\n\nmodule.exports = {\n    hasColorscale: hasColorscale,\n    extractOpts: extractOpts,\n    extractScale: extractScale,\n    flipScale: flipScale,\n    makeColorScaleFunc: makeColorScaleFunc,\n    makeColorScaleFuncFromTrace: makeColorScaleFuncFromTrace\n};\n\n},{\"../../lib\":703,\"../color\":580,\"./scales\":595,\"d3\":157,\"fast-isnumeric\":224,\"tinycolor2\":524}],592:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scales = _dereq_('./scales');\nvar helpers = _dereq_('./helpers');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'colorscale',\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    handleDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('./cross_trace_defaults'),\n\n    calc: _dereq_('./calc'),\n\n    // ./scales.js is required in lib/coerce.js ;\n    // it needs to be a seperate module to avoid circular a dependency\n    scales: scales.scales,\n    defaultScale: scales.defaultScale,\n    getScale: scales.get,\n    isValidScale: scales.isValid,\n\n    hasColorscale: helpers.hasColorscale,\n    extractOpts: helpers.extractOpts,\n    extractScale: helpers.extractScale,\n    flipScale: helpers.flipScale,\n    makeColorScaleFunc: helpers.makeColorScaleFunc,\n    makeColorScaleFuncFromTrace: helpers.makeColorScaleFuncFromTrace\n};\n\n},{\"./attributes\":587,\"./calc\":588,\"./cross_trace_defaults\":589,\"./defaults\":590,\"./helpers\":591,\"./layout_attributes\":593,\"./layout_defaults\":594,\"./scales\":595}],593:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar colorScaleAttrs = _dereq_('./attributes');\nvar scales = _dereq_('./scales').scales;\n\nvar msg = 'Note that `autocolorscale` must be true for this attribute to work.';\n\nmodule.exports = {\n    editType: 'calc',\n\n    colorscale: {\n        editType: 'calc',\n\n        sequential: {\n            valType: 'colorscale',\n            dflt: scales.Reds,\n            \n            editType: 'calc',\n            \n        },\n        sequentialminus: {\n            valType: 'colorscale',\n            dflt: scales.Blues,\n            \n            editType: 'calc',\n            \n        },\n        diverging: {\n            valType: 'colorscale',\n            dflt: scales.RdBu,\n            \n            editType: 'calc',\n            \n        }\n    },\n\n    coloraxis: extendFlat({\n        // not really a 'subplot' attribute container,\n        // but this is the flag we use to denote attributes that\n        // support yaxis, yaxis2, yaxis3, ... counters\n        _isSubplotObj: true,\n        editType: 'calc',\n        \n    }, colorScaleAttrs('', {\n        colorAttr: 'corresponding trace color array(s)',\n        noColorAxis: true,\n        showScaleDflt: true\n    }))\n};\n\n},{\"../../lib/extend\":693,\"./attributes\":587,\"./scales\":595}],594:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar colorScaleAttrs = _dereq_('./layout_attributes');\nvar colorScaleDefaults = _dereq_('./defaults');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, colorScaleAttrs, attr, dflt);\n    }\n\n    coerce('colorscale.sequential');\n    coerce('colorscale.sequentialminus');\n    coerce('colorscale.diverging');\n\n    var colorAxes = layoutOut._colorAxes;\n    var colorAxIn, colorAxOut;\n\n    function coerceAx(attr, dflt) {\n        return Lib.coerce(colorAxIn, colorAxOut, colorScaleAttrs.coloraxis, attr, dflt);\n    }\n\n    for(var k in colorAxes) {\n        var stash = colorAxes[k];\n\n        if(stash[0]) {\n            colorAxIn = layoutIn[k] || {};\n            colorAxOut = Template.newContainer(layoutOut, k, 'coloraxis');\n            colorAxOut._name = k;\n            colorScaleDefaults(colorAxIn, colorAxOut, layoutOut, coerceAx, {prefix: '', cLetter: 'c'});\n        } else {\n            // re-coerce colorscale attributes w/o coloraxis\n            for(var i = 0; i < stash[2].length; i++) {\n                stash[2][i]();\n            }\n            delete layoutOut._colorAxes[k];\n        }\n    }\n};\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"./defaults\":590,\"./layout_attributes\":593}],595:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar tinycolor = _dereq_('tinycolor2');\n\nvar scales = {\n    'Greys': [\n        [0, 'rgb(0,0,0)'], [1, 'rgb(255,255,255)']\n    ],\n\n    'YlGnBu': [\n        [0, 'rgb(8,29,88)'], [0.125, 'rgb(37,52,148)'],\n        [0.25, 'rgb(34,94,168)'], [0.375, 'rgb(29,145,192)'],\n        [0.5, 'rgb(65,182,196)'], [0.625, 'rgb(127,205,187)'],\n        [0.75, 'rgb(199,233,180)'], [0.875, 'rgb(237,248,217)'],\n        [1, 'rgb(255,255,217)']\n    ],\n\n    'Greens': [\n        [0, 'rgb(0,68,27)'], [0.125, 'rgb(0,109,44)'],\n        [0.25, 'rgb(35,139,69)'], [0.375, 'rgb(65,171,93)'],\n        [0.5, 'rgb(116,196,118)'], [0.625, 'rgb(161,217,155)'],\n        [0.75, 'rgb(199,233,192)'], [0.875, 'rgb(229,245,224)'],\n        [1, 'rgb(247,252,245)']\n    ],\n\n    'YlOrRd': [\n        [0, 'rgb(128,0,38)'], [0.125, 'rgb(189,0,38)'],\n        [0.25, 'rgb(227,26,28)'], [0.375, 'rgb(252,78,42)'],\n        [0.5, 'rgb(253,141,60)'], [0.625, 'rgb(254,178,76)'],\n        [0.75, 'rgb(254,217,118)'], [0.875, 'rgb(255,237,160)'],\n        [1, 'rgb(255,255,204)']\n    ],\n\n    'Bluered': [\n        [0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']\n    ],\n\n    // modified RdBu based on\n    // http://www.kennethmoreland.com/color-maps/\n    'RdBu': [\n        [0, 'rgb(5,10,172)'], [0.35, 'rgb(106,137,247)'],\n        [0.5, 'rgb(190,190,190)'], [0.6, 'rgb(220,170,132)'],\n        [0.7, 'rgb(230,145,90)'], [1, 'rgb(178,10,28)']\n    ],\n\n    // Scale for non-negative numeric values\n    'Reds': [\n        [0, 'rgb(220,220,220)'], [0.2, 'rgb(245,195,157)'],\n        [0.4, 'rgb(245,160,105)'], [1, 'rgb(178,10,28)']\n    ],\n\n    // Scale for non-positive numeric values\n    'Blues': [\n        [0, 'rgb(5,10,172)'], [0.35, 'rgb(40,60,190)'],\n        [0.5, 'rgb(70,100,245)'], [0.6, 'rgb(90,120,245)'],\n        [0.7, 'rgb(106,137,247)'], [1, 'rgb(220,220,220)']\n    ],\n\n    'Picnic': [\n        [0, 'rgb(0,0,255)'], [0.1, 'rgb(51,153,255)'],\n        [0.2, 'rgb(102,204,255)'], [0.3, 'rgb(153,204,255)'],\n        [0.4, 'rgb(204,204,255)'], [0.5, 'rgb(255,255,255)'],\n        [0.6, 'rgb(255,204,255)'], [0.7, 'rgb(255,153,255)'],\n        [0.8, 'rgb(255,102,204)'], [0.9, 'rgb(255,102,102)'],\n        [1, 'rgb(255,0,0)']\n    ],\n\n    'Rainbow': [\n        [0, 'rgb(150,0,90)'], [0.125, 'rgb(0,0,200)'],\n        [0.25, 'rgb(0,25,255)'], [0.375, 'rgb(0,152,255)'],\n        [0.5, 'rgb(44,255,150)'], [0.625, 'rgb(151,255,0)'],\n        [0.75, 'rgb(255,234,0)'], [0.875, 'rgb(255,111,0)'],\n        [1, 'rgb(255,0,0)']\n    ],\n\n    'Portland': [\n        [0, 'rgb(12,51,131)'], [0.25, 'rgb(10,136,186)'],\n        [0.5, 'rgb(242,211,56)'], [0.75, 'rgb(242,143,56)'],\n        [1, 'rgb(217,30,30)']\n    ],\n\n    'Jet': [\n        [0, 'rgb(0,0,131)'], [0.125, 'rgb(0,60,170)'],\n        [0.375, 'rgb(5,255,255)'], [0.625, 'rgb(255,255,0)'],\n        [0.875, 'rgb(250,0,0)'], [1, 'rgb(128,0,0)']\n    ],\n\n    'Hot': [\n        [0, 'rgb(0,0,0)'], [0.3, 'rgb(230,0,0)'],\n        [0.6, 'rgb(255,210,0)'], [1, 'rgb(255,255,255)']\n    ],\n\n    'Blackbody': [\n        [0, 'rgb(0,0,0)'], [0.2, 'rgb(230,0,0)'],\n        [0.4, 'rgb(230,210,0)'], [0.7, 'rgb(255,255,255)'],\n        [1, 'rgb(160,200,255)']\n    ],\n\n    'Earth': [\n        [0, 'rgb(0,0,130)'], [0.1, 'rgb(0,180,180)'],\n        [0.2, 'rgb(40,210,40)'], [0.4, 'rgb(230,230,50)'],\n        [0.6, 'rgb(120,70,20)'], [1, 'rgb(255,255,255)']\n    ],\n\n    'Electric': [\n        [0, 'rgb(0,0,0)'], [0.15, 'rgb(30,0,100)'],\n        [0.4, 'rgb(120,0,100)'], [0.6, 'rgb(160,90,0)'],\n        [0.8, 'rgb(230,200,0)'], [1, 'rgb(255,250,220)']\n    ],\n\n    'Viridis': [\n        [0, '#440154'], [0.06274509803921569, '#48186a'],\n        [0.12549019607843137, '#472d7b'], [0.18823529411764706, '#424086'],\n        [0.25098039215686274, '#3b528b'], [0.3137254901960784, '#33638d'],\n        [0.3764705882352941, '#2c728e'], [0.4392156862745098, '#26828e'],\n        [0.5019607843137255, '#21918c'], [0.5647058823529412, '#1fa088'],\n        [0.6274509803921569, '#28ae80'], [0.6901960784313725, '#3fbc73'],\n        [0.7529411764705882, '#5ec962'], [0.8156862745098039, '#84d44b'],\n        [0.8784313725490196, '#addc30'], [0.9411764705882353, '#d8e219'],\n        [1, '#fde725']\n    ],\n\n    'Cividis': [\n        [0.000000, 'rgb(0,32,76)'], [0.058824, 'rgb(0,42,102)'],\n        [0.117647, 'rgb(0,52,110)'], [0.176471, 'rgb(39,63,108)'],\n        [0.235294, 'rgb(60,74,107)'], [0.294118, 'rgb(76,85,107)'],\n        [0.352941, 'rgb(91,95,109)'], [0.411765, 'rgb(104,106,112)'],\n        [0.470588, 'rgb(117,117,117)'], [0.529412, 'rgb(131,129,120)'],\n        [0.588235, 'rgb(146,140,120)'], [0.647059, 'rgb(161,152,118)'],\n        [0.705882, 'rgb(176,165,114)'], [0.764706, 'rgb(192,177,109)'],\n        [0.823529, 'rgb(209,191,102)'], [0.882353, 'rgb(225,204,92)'],\n        [0.941176, 'rgb(243,219,79)'], [1.000000, 'rgb(255,233,69)']\n    ]\n};\n\nvar defaultScale = scales.RdBu;\n\nfunction getScale(scl, dflt) {\n    if(!dflt) dflt = defaultScale;\n    if(!scl) return dflt;\n\n    function parseScale() {\n        try {\n            scl = scales[scl] || JSON.parse(scl);\n        } catch(e) {\n            scl = dflt;\n        }\n    }\n\n    if(typeof scl === 'string') {\n        parseScale();\n        // occasionally scl is double-JSON encoded...\n        if(typeof scl === 'string') parseScale();\n    }\n\n    if(!isValidScaleArray(scl)) return dflt;\n    return scl;\n}\n\n\nfunction isValidScaleArray(scl) {\n    var highestVal = 0;\n\n    if(!Array.isArray(scl) || scl.length < 2) return false;\n\n    if(!scl[0] || !scl[scl.length - 1]) return false;\n\n    if(+scl[0][0] !== 0 || +scl[scl.length - 1][0] !== 1) return false;\n\n    for(var i = 0; i < scl.length; i++) {\n        var si = scl[i];\n\n        if(si.length !== 2 || +si[0] < highestVal || !tinycolor(si[1]).isValid()) {\n            return false;\n        }\n\n        highestVal = +si[0];\n    }\n\n    return true;\n}\n\nfunction isValidScale(scl) {\n    if(scales[scl] !== undefined) return true;\n    else return isValidScaleArray(scl);\n}\n\nmodule.exports = {\n    scales: scales,\n    defaultScale: defaultScale,\n\n    get: getScale,\n    isValid: isValidScale\n};\n\n},{\"tinycolor2\":524}],596:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n// for automatic alignment on dragging, <1/3 means left align,\n// >2/3 means right, and between is center. Pick the right fraction\n// based on where you are, and return the fraction corresponding to\n// that position on the object\nmodule.exports = function align(v, dv, v0, v1, anchor) {\n    var vmin = (v - v0) / (v1 - v0);\n    var vmax = vmin + dv / (v1 - v0);\n    var vc = (vmin + vmax) / 2;\n\n    // explicitly specified anchor\n    if(anchor === 'left' || anchor === 'bottom') return vmin;\n    if(anchor === 'center' || anchor === 'middle') return vc;\n    if(anchor === 'right' || anchor === 'top') return vmax;\n\n    // automatic based on position\n    if(vmin < (2 / 3) - vc) return vmin;\n    if(vmax > (4 / 3) - vc) return vmax;\n    return vc;\n};\n\n},{}],597:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n\n// set cursors pointing toward the closest corner/side,\n// to indicate alignment\n// x and y are 0-1, fractions of the plot area\nvar cursorset = [\n    ['sw-resize', 's-resize', 'se-resize'],\n    ['w-resize', 'move', 'e-resize'],\n    ['nw-resize', 'n-resize', 'ne-resize']\n];\n\nmodule.exports = function getCursor(x, y, xanchor, yanchor) {\n    if(xanchor === 'left') x = 0;\n    else if(xanchor === 'center') x = 1;\n    else if(xanchor === 'right') x = 2;\n    else x = Lib.constrain(Math.floor(x * 3), 0, 2);\n\n    if(yanchor === 'bottom') y = 0;\n    else if(yanchor === 'middle') y = 1;\n    else if(yanchor === 'top') y = 2;\n    else y = Lib.constrain(Math.floor(y * 3), 0, 2);\n\n    return cursorset[y][x];\n};\n\n},{\"../../lib\":703}],598:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar mouseOffset = _dereq_('mouse-event-offset');\nvar hasHover = _dereq_('has-hover');\nvar supportsPassive = _dereq_('has-passive-events');\n\nvar removeElement = _dereq_('../../lib').removeElement;\nvar constants = _dereq_('../../plots/cartesian/constants');\nvar interactConstants = _dereq_('../../constants/interactions');\n\nvar dragElement = module.exports = {};\n\ndragElement.align = _dereq_('./align');\ndragElement.getCursor = _dereq_('./cursor');\n\nvar unhover = _dereq_('./unhover');\ndragElement.unhover = unhover.wrapped;\ndragElement.unhoverRaw = unhover.raw;\n\n/**\n * Abstracts click & drag interactions\n *\n * During the interaction, a \"coverSlip\" element - a transparent\n * div covering the whole page - is created, which has two key effects:\n * - Lets you drag beyond the boundaries of the plot itself without\n *   dropping (but if you drag all the way out of the browser window the\n *   interaction will end)\n * - Freezes the cursor: whatever mouse cursor the drag element had when the\n *   interaction started gets copied to the coverSlip for use until mouseup\n *\n * If the user executes a drag bigger than MINDRAG, callbacks will fire as:\n *      prepFn, moveFn (1 or more times), doneFn\n * If the user does not drag enough, prepFn and clickFn will fire.\n *\n * Note: If you cancel contextmenu, clickFn will fire even with a right click\n * (unlike native events) so you'll get a `plotly_click` event. Cancel context eg:\n *    gd.addEventListener('contextmenu', function(e) { e.preventDefault(); });\n * TODO: we should probably turn this into a `config` parameter, so we can fix it\n * such that if you *don't* cancel contextmenu, we can prevent partial drags, which\n * put you in a weird state.\n *\n * If the user clicks multiple times quickly, clickFn will fire each time\n * but numClicks will increase to help you recognize doubleclicks.\n *\n * @param {object} options with keys:\n *      element (required) the DOM element to drag\n *      prepFn (optional) function(event, startX, startY)\n *          executed on mousedown\n *          startX and startY are the clientX and clientY pixel position\n *          of the mousedown event\n *      moveFn (optional) function(dx, dy)\n *          executed on move, ONLY after we've exceeded MINDRAG\n *          (we keep executing moveFn if you move back to where you started)\n *          dx and dy are the net pixel offset of the drag,\n *          dragged is true/false, has the mouse moved enough to\n *          constitute a drag\n *      doneFn (optional) function(e)\n *          executed on mouseup, ONLY if we exceeded MINDRAG (so you can be\n *          sure that moveFn has been called at least once)\n *          numClicks is how many clicks we've registered within\n *          a doubleclick time\n *          e is the original mouseup event\n *      clickFn (optional) function(numClicks, e)\n *          executed on mouseup if we have NOT exceeded MINDRAG (ie moveFn\n *          has not been called at all)\n *          numClicks is how many clicks we've registered within\n *          a doubleclick time\n *          e is the original mousedown event\n *      clampFn (optional, function(dx, dy) return [dx2, dy2])\n *          Provide custom clamping function for small displacements.\n *          By default, clamping is done using `minDrag` to x and y displacements\n *          independently.\n */\ndragElement.init = function init(options) {\n    var gd = options.gd;\n    var numClicks = 1;\n    var DBLCLICKDELAY = interactConstants.DBLCLICKDELAY;\n    var element = options.element;\n\n    var startX,\n        startY,\n        newMouseDownTime,\n        cursor,\n        dragCover,\n        initialEvent,\n        initialTarget,\n        rightClick;\n\n    if(!gd._mouseDownTime) gd._mouseDownTime = 0;\n\n    element.style.pointerEvents = 'all';\n\n    element.onmousedown = onStart;\n\n    if(!supportsPassive) {\n        element.ontouchstart = onStart;\n    } else {\n        if(element._ontouchstart) {\n            element.removeEventListener('touchstart', element._ontouchstart);\n        }\n        element._ontouchstart = onStart;\n        element.addEventListener('touchstart', onStart, {passive: false});\n    }\n\n    function _clampFn(dx, dy, minDrag) {\n        if(Math.abs(dx) < minDrag) dx = 0;\n        if(Math.abs(dy) < minDrag) dy = 0;\n        return [dx, dy];\n    }\n\n    var clampFn = options.clampFn || _clampFn;\n\n    function onStart(e) {\n        // make dragging and dragged into properties of gd\n        // so that others can look at and modify them\n        gd._dragged = false;\n        gd._dragging = true;\n        var offset = pointerOffset(e);\n        startX = offset[0];\n        startY = offset[1];\n        initialTarget = e.target;\n        initialEvent = e;\n        rightClick = e.buttons === 2 || e.ctrlKey;\n\n        // fix Fx.hover for touch events\n        if(typeof e.clientX === 'undefined' && typeof e.clientY === 'undefined') {\n            e.clientX = startX;\n            e.clientY = startY;\n        }\n\n        newMouseDownTime = (new Date()).getTime();\n        if(newMouseDownTime - gd._mouseDownTime < DBLCLICKDELAY) {\n            // in a click train\n            numClicks += 1;\n        } else {\n            // new click train\n            numClicks = 1;\n            gd._mouseDownTime = newMouseDownTime;\n        }\n\n        if(options.prepFn) options.prepFn(e, startX, startY);\n\n        if(hasHover && !rightClick) {\n            dragCover = coverSlip();\n            dragCover.style.cursor = window.getComputedStyle(element).cursor;\n        } else if(!hasHover) {\n            // document acts as a dragcover for mobile, bc we can't create dragcover dynamically\n            dragCover = document;\n            cursor = window.getComputedStyle(document.documentElement).cursor;\n            document.documentElement.style.cursor = window.getComputedStyle(element).cursor;\n        }\n\n        document.addEventListener('mouseup', onDone);\n        document.addEventListener('touchend', onDone);\n\n        if(options.dragmode !== false) {\n            e.preventDefault();\n            document.addEventListener('mousemove', onMove);\n            document.addEventListener('touchmove', onMove);\n        }\n\n        return;\n    }\n\n    function onMove(e) {\n        e.preventDefault();\n\n        var offset = pointerOffset(e);\n        var minDrag = options.minDrag || constants.MINDRAG;\n        var dxdy = clampFn(offset[0] - startX, offset[1] - startY, minDrag);\n        var dx = dxdy[0];\n        var dy = dxdy[1];\n\n        if(dx || dy) {\n            gd._dragged = true;\n            dragElement.unhover(gd);\n        }\n\n        if(gd._dragged && options.moveFn && !rightClick) {\n            gd._dragdata = {\n                element: element,\n                dx: dx,\n                dy: dy\n            };\n            options.moveFn(dx, dy);\n        }\n\n        return;\n    }\n\n    function onDone(e) {\n        delete gd._dragdata;\n\n        if(options.dragmode !== false) {\n            e.preventDefault();\n            document.removeEventListener('mousemove', onMove);\n            document.removeEventListener('touchmove', onMove);\n        }\n\n        document.removeEventListener('mouseup', onDone);\n        document.removeEventListener('touchend', onDone);\n\n        if(hasHover) {\n            removeElement(dragCover);\n        } else if(cursor) {\n            dragCover.documentElement.style.cursor = cursor;\n            cursor = null;\n        }\n\n        if(!gd._dragging) {\n            gd._dragged = false;\n            return;\n        }\n        gd._dragging = false;\n\n        // don't count as a dblClick unless the mouseUp is also within\n        // the dblclick delay\n        if((new Date()).getTime() - gd._mouseDownTime > DBLCLICKDELAY) {\n            numClicks = Math.max(numClicks - 1, 1);\n        }\n\n        if(gd._dragged) {\n            if(options.doneFn) options.doneFn();\n        } else {\n            if(options.clickFn) options.clickFn(numClicks, initialEvent);\n\n            // If we haven't dragged, this should be a click. But because of the\n            // coverSlip changing the element, the natural system might not generate one,\n            // so we need to make our own. But right clicks don't normally generate\n            // click events, only contextmenu events, which happen on mousedown.\n            if(!rightClick) {\n                var e2;\n\n                try {\n                    e2 = new MouseEvent('click', e);\n                } catch(err) {\n                    var offset = pointerOffset(e);\n                    e2 = document.createEvent('MouseEvents');\n                    e2.initMouseEvent('click',\n                        e.bubbles, e.cancelable,\n                        e.view, e.detail,\n                        e.screenX, e.screenY,\n                        offset[0], offset[1],\n                        e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\n                        e.button, e.relatedTarget);\n                }\n\n                initialTarget.dispatchEvent(e2);\n            }\n        }\n\n        gd._dragging = false;\n        gd._dragged = false;\n        return;\n    }\n};\n\nfunction coverSlip() {\n    var cover = document.createElement('div');\n\n    cover.className = 'dragcover';\n    var cStyle = cover.style;\n    cStyle.position = 'fixed';\n    cStyle.left = 0;\n    cStyle.right = 0;\n    cStyle.top = 0;\n    cStyle.bottom = 0;\n    cStyle.zIndex = 999999999;\n    cStyle.background = 'none';\n\n    document.body.appendChild(cover);\n\n    return cover;\n}\n\ndragElement.coverSlip = coverSlip;\n\nfunction pointerOffset(e) {\n    return mouseOffset(\n        e.changedTouches ? e.changedTouches[0] : e,\n        document.body\n    );\n}\n\n},{\"../../constants/interactions\":679,\"../../lib\":703,\"../../plots/cartesian/constants\":757,\"./align\":596,\"./cursor\":597,\"./unhover\":599,\"has-hover\":405,\"has-passive-events\":406,\"mouse-event-offset\":431}],599:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nvar Events = _dereq_('../../lib/events');\nvar throttle = _dereq_('../../lib/throttle');\nvar getGraphDiv = _dereq_('../../lib/get_graph_div');\n\nvar hoverConstants = _dereq_('../fx/constants');\n\nvar unhover = module.exports = {};\n\n\nunhover.wrapped = function(gd, evt, subplot) {\n    gd = getGraphDiv(gd);\n\n    // Important, clear any queued hovers\n    if(gd._fullLayout) {\n        throttle.clear(gd._fullLayout._uid + hoverConstants.HOVERID);\n    }\n\n    unhover.raw(gd, evt, subplot);\n};\n\n\n// remove hover effects on mouse out, and emit unhover event\nunhover.raw = function raw(gd, evt) {\n    var fullLayout = gd._fullLayout;\n    var oldhoverdata = gd._hoverdata;\n\n    if(!evt) evt = {};\n    if(evt.target &&\n       Events.triggerHandler(gd, 'plotly_beforehover', evt) === false) {\n        return;\n    }\n\n    fullLayout._hoverlayer.selectAll('g').remove();\n    fullLayout._hoverlayer.selectAll('line').remove();\n    fullLayout._hoverlayer.selectAll('circle').remove();\n    gd._hoverdata = undefined;\n\n    if(evt.target && oldhoverdata) {\n        gd.emit('plotly_unhover', {\n            event: evt,\n            points: oldhoverdata\n        });\n    }\n};\n\n},{\"../../lib/events\":692,\"../../lib/get_graph_div\":699,\"../../lib/throttle\":728,\"../fx/constants\":613}],600:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nexports.dash = {\n    valType: 'string',\n    // string type usually doesn't take values... this one should really be\n    // a special type or at least a special coercion function, from the GUI\n    // you only get these values but elsewhere the user can supply a list of\n    // dash lengths in px, and it will be honored\n    values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'],\n    dflt: 'solid',\n    \n    editType: 'style',\n    \n};\n\n},{}],601:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Registry = _dereq_('../../registry');\nvar Color = _dereq_('../color');\nvar Colorscale = _dereq_('../colorscale');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\n\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\nvar alignment = _dereq_('../../constants/alignment');\nvar LINE_SPACING = alignment.LINE_SPACING;\nvar DESELECTDIM = _dereq_('../../constants/interactions').DESELECTDIM;\n\nvar subTypes = _dereq_('../../traces/scatter/subtypes');\nvar makeBubbleSizeFn = _dereq_('../../traces/scatter/make_bubble_size_func');\n\nvar drawing = module.exports = {};\n\n// -----------------------------------------------------\n// styling functions for plot elements\n// -----------------------------------------------------\n\ndrawing.font = function(s, family, size, color) {\n    // also allow the form font(s, {family, size, color})\n    if(Lib.isPlainObject(family)) {\n        color = family.color;\n        size = family.size;\n        family = family.family;\n    }\n    if(family) s.style('font-family', family);\n    if(size + 1) s.style('font-size', size + 'px');\n    if(color) s.call(Color.fill, color);\n};\n\n/*\n * Positioning helpers\n * Note: do not use `setPosition` with <text> nodes modified by\n * `svgTextUtils.convertToTspans`. Use `svgTextUtils.positionText`\n * instead, so that <tspan.line> elements get updated to match.\n */\ndrawing.setPosition = function(s, x, y) { s.attr('x', x).attr('y', y); };\ndrawing.setSize = function(s, w, h) { s.attr('width', w).attr('height', h); };\ndrawing.setRect = function(s, x, y, w, h) {\n    s.call(drawing.setPosition, x, y).call(drawing.setSize, w, h);\n};\n\n/** Translate node\n *\n * @param {object} d : calcdata point item\n * @param {sel} sel : d3 selction of node to translate\n * @param {object} xa : corresponding full xaxis object\n * @param {object} ya : corresponding full yaxis object\n *\n * @return {boolean} :\n *  true if selection got translated\n *  false if selection could not get translated\n */\ndrawing.translatePoint = function(d, sel, xa, ya) {\n    var x = xa.c2p(d.x);\n    var y = ya.c2p(d.y);\n\n    if(isNumeric(x) && isNumeric(y) && sel.node()) {\n        // for multiline text this works better\n        if(sel.node().nodeName === 'text') {\n            sel.attr('x', x).attr('y', y);\n        } else {\n            sel.attr('transform', 'translate(' + x + ',' + y + ')');\n        }\n    } else {\n        return false;\n    }\n\n    return true;\n};\n\ndrawing.translatePoints = function(s, xa, ya) {\n    s.each(function(d) {\n        var sel = d3.select(this);\n        drawing.translatePoint(d, sel, xa, ya);\n    });\n};\n\ndrawing.hideOutsideRangePoint = function(d, sel, xa, ya, xcalendar, ycalendar) {\n    sel.attr(\n        'display',\n        (xa.isPtWithinRange(d, xcalendar) && ya.isPtWithinRange(d, ycalendar)) ? null : 'none'\n    );\n};\n\ndrawing.hideOutsideRangePoints = function(traceGroups, subplot) {\n    if(!subplot._hasClipOnAxisFalse) return;\n\n    var xa = subplot.xaxis;\n    var ya = subplot.yaxis;\n\n    traceGroups.each(function(d) {\n        var trace = d[0].trace;\n        var xcalendar = trace.xcalendar;\n        var ycalendar = trace.ycalendar;\n        var selector = Registry.traceIs(trace, 'bar-like') ? '.bartext' : '.point,.textpoint';\n\n        traceGroups.selectAll(selector).each(function(d) {\n            drawing.hideOutsideRangePoint(d, d3.select(this), xa, ya, xcalendar, ycalendar);\n        });\n    });\n};\n\ndrawing.crispRound = function(gd, lineWidth, dflt) {\n    // for lines that disable antialiasing we want to\n    // make sure the width is an integer, and at least 1 if it's nonzero\n\n    if(!lineWidth || !isNumeric(lineWidth)) return dflt || 0;\n\n    // but not for static plots - these don't get antialiased anyway.\n    if(gd._context.staticPlot) return lineWidth;\n\n    if(lineWidth < 1) return 1;\n    return Math.round(lineWidth);\n};\n\ndrawing.singleLineStyle = function(d, s, lw, lc, ld) {\n    s.style('fill', 'none');\n    var line = (((d || [])[0] || {}).trace || {}).line || {};\n    var lw1 = lw || line.width || 0;\n    var dash = ld || line.dash || '';\n\n    Color.stroke(s, lc || line.color);\n    drawing.dashLine(s, dash, lw1);\n};\n\ndrawing.lineGroupStyle = function(s, lw, lc, ld) {\n    s.style('fill', 'none')\n    .each(function(d) {\n        var line = (((d || [])[0] || {}).trace || {}).line || {};\n        var lw1 = lw || line.width || 0;\n        var dash = ld || line.dash || '';\n\n        d3.select(this)\n            .call(Color.stroke, lc || line.color)\n            .call(drawing.dashLine, dash, lw1);\n    });\n};\n\ndrawing.dashLine = function(s, dash, lineWidth) {\n    lineWidth = +lineWidth || 0;\n\n    dash = drawing.dashStyle(dash, lineWidth);\n\n    s.style({\n        'stroke-dasharray': dash,\n        'stroke-width': lineWidth + 'px'\n    });\n};\n\ndrawing.dashStyle = function(dash, lineWidth) {\n    lineWidth = +lineWidth || 1;\n    var dlw = Math.max(lineWidth, 3);\n\n    if(dash === 'solid') dash = '';\n    else if(dash === 'dot') dash = dlw + 'px,' + dlw + 'px';\n    else if(dash === 'dash') dash = (3 * dlw) + 'px,' + (3 * dlw) + 'px';\n    else if(dash === 'longdash') dash = (5 * dlw) + 'px,' + (5 * dlw) + 'px';\n    else if(dash === 'dashdot') {\n        dash = (3 * dlw) + 'px,' + dlw + 'px,' + dlw + 'px,' + dlw + 'px';\n    } else if(dash === 'longdashdot') {\n        dash = (5 * dlw) + 'px,' + (2 * dlw) + 'px,' + dlw + 'px,' + (2 * dlw) + 'px';\n    }\n    // otherwise user wrote the dasharray themselves - leave it be\n\n    return dash;\n};\n\n// Same as fillGroupStyle, except in this case the selection may be a transition\ndrawing.singleFillStyle = function(sel) {\n    var node = d3.select(sel.node());\n    var data = node.data();\n    var fillcolor = (((data[0] || [])[0] || {}).trace || {}).fillcolor;\n    if(fillcolor) {\n        sel.call(Color.fill, fillcolor);\n    }\n};\n\ndrawing.fillGroupStyle = function(s) {\n    s.style('stroke-width', 0)\n    .each(function(d) {\n        var shape = d3.select(this);\n        // N.B. 'd' won't be a calcdata item when\n        // fill !== 'none' on a segment-less and marker-less trace\n        if(d[0].trace) {\n            shape.call(Color.fill, d[0].trace.fillcolor);\n        }\n    });\n};\n\nvar SYMBOLDEFS = _dereq_('./symbol_defs');\n\ndrawing.symbolNames = [];\ndrawing.symbolFuncs = [];\ndrawing.symbolNeedLines = {};\ndrawing.symbolNoDot = {};\ndrawing.symbolNoFill = {};\ndrawing.symbolList = [];\n\nObject.keys(SYMBOLDEFS).forEach(function(k) {\n    var symDef = SYMBOLDEFS[k];\n    drawing.symbolList = drawing.symbolList.concat(\n        [symDef.n, k, symDef.n + 100, k + '-open']);\n    drawing.symbolNames[symDef.n] = k;\n    drawing.symbolFuncs[symDef.n] = symDef.f;\n    if(symDef.needLine) {\n        drawing.symbolNeedLines[symDef.n] = true;\n    }\n    if(symDef.noDot) {\n        drawing.symbolNoDot[symDef.n] = true;\n    } else {\n        drawing.symbolList = drawing.symbolList.concat(\n            [symDef.n + 200, k + '-dot', symDef.n + 300, k + '-open-dot']);\n    }\n    if(symDef.noFill) {\n        drawing.symbolNoFill[symDef.n] = true;\n    }\n});\n\nvar MAXSYMBOL = drawing.symbolNames.length;\n// add a dot in the middle of the symbol\nvar DOTPATH = 'M0,0.5L0.5,0L0,-0.5L-0.5,0Z';\n\ndrawing.symbolNumber = function(v) {\n    if(typeof v === 'string') {\n        var vbase = 0;\n        if(v.indexOf('-open') > 0) {\n            vbase = 100;\n            v = v.replace('-open', '');\n        }\n        if(v.indexOf('-dot') > 0) {\n            vbase += 200;\n            v = v.replace('-dot', '');\n        }\n        v = drawing.symbolNames.indexOf(v);\n        if(v >= 0) { v += vbase; }\n    }\n    if((v % 100 >= MAXSYMBOL) || v >= 400) { return 0; }\n    return Math.floor(Math.max(v, 0));\n};\n\nfunction makePointPath(symbolNumber, r) {\n    var base = symbolNumber % 100;\n    return drawing.symbolFuncs[base](r) + (symbolNumber >= 200 ? DOTPATH : '');\n}\n\nvar HORZGRADIENT = {x1: 1, x2: 0, y1: 0, y2: 0};\nvar VERTGRADIENT = {x1: 0, x2: 0, y1: 1, y2: 0};\nvar stopFormatter = d3.format('~.1f');\nvar gradientInfo = {\n    radial: {node: 'radialGradient'},\n    radialreversed: {node: 'radialGradient', reversed: true},\n    horizontal: {node: 'linearGradient', attrs: HORZGRADIENT},\n    horizontalreversed: {node: 'linearGradient', attrs: HORZGRADIENT, reversed: true},\n    vertical: {node: 'linearGradient', attrs: VERTGRADIENT},\n    verticalreversed: {node: 'linearGradient', attrs: VERTGRADIENT, reversed: true}\n};\n\n/**\n * gradient: create and apply a gradient fill\n *\n * @param {object} sel: d3 selection to apply this gradient to\n *     You can use `selection.call(Drawing.gradient, ...)`\n * @param {DOM element} gd: the graph div `sel` is part of\n * @param {string} gradientID: a unique (within this plot) identifier\n *     for this gradient, so that we don't create unnecessary definitions\n * @param {string} type: 'radial', 'horizontal', or 'vertical', optionally with\n *     'reversed' at the end. Normally radial goes center to edge,\n *     horizontal goes right to left, and vertical goes bottom to top\n * @param {array} colorscale: as in attribute values, [[fraction, color], ...]\n * @param {string} prop: the property to apply to, 'fill' or 'stroke'\n */\ndrawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {\n    var len = colorscale.length;\n    var info = gradientInfo[type];\n    var colorStops = new Array(len);\n    for(var i = 0; i < len; i++) {\n        if(info.reversed) {\n            colorStops[len - 1 - i] = [stopFormatter((1 - colorscale[i][0]) * 100), colorscale[i][1]];\n        } else {\n            colorStops[i] = [stopFormatter(colorscale[i][0] * 100), colorscale[i][1]];\n        }\n    }\n\n    var fullID = 'g' + gd._fullLayout._uid + '-' + gradientID;\n\n    var gradient = gd._fullLayout._defs.select('.gradients')\n        .selectAll('#' + fullID)\n        .data([type + colorStops.join(';')], Lib.identity);\n\n    gradient.exit().remove();\n\n    gradient.enter()\n        .append(info.node)\n        .each(function() {\n            var el = d3.select(this);\n            if(info.attrs) el.attr(info.attrs);\n\n            el.attr('id', fullID);\n\n            var stops = el.selectAll('stop')\n                .data(colorStops);\n            stops.exit().remove();\n            stops.enter().append('stop');\n\n            stops.each(function(d) {\n                var tc = tinycolor(d[1]);\n                d3.select(this).attr({\n                    offset: d[0] + '%',\n                    'stop-color': Color.tinyRGB(tc),\n                    'stop-opacity': tc.getAlpha()\n                });\n            });\n        });\n\n    sel.style(prop, getFullUrl(fullID, gd))\n        .style(prop + '-opacity', null);\n};\n\n/*\n * Make the gradients container and clear out any previous gradients.\n * We never collect all the gradients we need in one place,\n * so we can't ever remove gradients that have stopped being useful,\n * except all at once before a full redraw.\n * The upside of this is arbitrary points can share gradient defs\n */\ndrawing.initGradients = function(gd) {\n    var gradientsGroup = Lib.ensureSingle(gd._fullLayout._defs, 'g', 'gradients');\n    gradientsGroup.selectAll('linearGradient,radialGradient').remove();\n};\n\n\ndrawing.pointStyle = function(s, trace, gd) {\n    if(!s.size()) return;\n\n    var fns = drawing.makePointStyleFns(trace);\n\n    s.each(function(d) {\n        drawing.singlePointStyle(d, d3.select(this), trace, fns, gd);\n    });\n};\n\ndrawing.singlePointStyle = function(d, sel, trace, fns, gd) {\n    var marker = trace.marker;\n    var markerLine = marker.line;\n\n    sel.style('opacity',\n        fns.selectedOpacityFn ? fns.selectedOpacityFn(d) :\n            (d.mo === undefined ? marker.opacity : d.mo)\n    );\n\n    if(fns.ms2mrc) {\n        var r;\n\n        // handle multi-trace graph edit case\n        if(d.ms === 'various' || marker.size === 'various') {\n            r = 3;\n        } else {\n            r = fns.ms2mrc(d.ms);\n        }\n\n        // store the calculated size so hover can use it\n        d.mrc = r;\n\n        if(fns.selectedSizeFn) {\n            r = d.mrc = fns.selectedSizeFn(d);\n        }\n\n        // turn the symbol into a sanitized number\n        var x = drawing.symbolNumber(d.mx || marker.symbol) || 0;\n\n        // save if this marker is open\n        // because that impacts how to handle colors\n        d.om = x % 200 >= 100;\n\n        sel.attr('d', makePointPath(x, r));\n    }\n\n    var perPointGradient = false;\n    var fillColor, lineColor, lineWidth;\n\n    // 'so' is suspected outliers, for box plots\n    if(d.so) {\n        lineWidth = markerLine.outlierwidth;\n        lineColor = markerLine.outliercolor;\n        fillColor = marker.outliercolor;\n    } else {\n        var markerLineWidth = (markerLine || {}).width;\n\n        lineWidth = (\n            d.mlw + 1 ||\n            markerLineWidth + 1 ||\n            // TODO: we need the latter for legends... can we get rid of it?\n            (d.trace ? (d.trace.marker.line || {}).width : 0) + 1\n        ) - 1 || 0;\n\n        if('mlc' in d) lineColor = d.mlcc = fns.lineScale(d.mlc);\n        // weird case: array wasn't long enough to apply to every point\n        else if(Lib.isArrayOrTypedArray(markerLine.color)) lineColor = Color.defaultLine;\n        else lineColor = markerLine.color;\n\n        if(Lib.isArrayOrTypedArray(marker.color)) {\n            fillColor = Color.defaultLine;\n            perPointGradient = true;\n        }\n\n        if('mc' in d) {\n            fillColor = d.mcc = fns.markerScale(d.mc);\n        } else {\n            fillColor = marker.color || 'rgba(0,0,0,0)';\n        }\n\n        if(fns.selectedColorFn) {\n            fillColor = fns.selectedColorFn(d);\n        }\n    }\n\n    if(d.om) {\n        // open markers can't have zero linewidth, default to 1px,\n        // and use fill color as stroke color\n        sel.call(Color.stroke, fillColor)\n            .style({\n                'stroke-width': (lineWidth || 1) + 'px',\n                fill: 'none'\n            });\n    } else {\n        sel.style('stroke-width', lineWidth + 'px');\n\n        var markerGradient = marker.gradient;\n\n        var gradientType = d.mgt;\n        if(gradientType) perPointGradient = true;\n        else gradientType = markerGradient && markerGradient.type;\n\n        // for legend - arrays will propagate through here, but we don't need\n        // to treat it as per-point.\n        if(Array.isArray(gradientType)) {\n            gradientType = gradientType[0];\n            if(!gradientInfo[gradientType]) gradientType = 0;\n        }\n\n        if(gradientType && gradientType !== 'none') {\n            var gradientColor = d.mgc;\n            if(gradientColor) perPointGradient = true;\n            else gradientColor = markerGradient.color;\n\n            var gradientID = trace.uid;\n            if(perPointGradient) gradientID += '-' + d.i;\n\n            drawing.gradient(sel, gd, gradientID, gradientType,\n                [[0, gradientColor], [1, fillColor]], 'fill');\n        } else {\n            Color.fill(sel, fillColor);\n        }\n\n        if(lineWidth) {\n            Color.stroke(sel, lineColor);\n        }\n    }\n};\n\ndrawing.makePointStyleFns = function(trace) {\n    var out = {};\n    var marker = trace.marker;\n\n    // allow array marker and marker line colors to be\n    // scaled by given max and min to colorscales\n    out.markerScale = drawing.tryColorscale(marker, '');\n    out.lineScale = drawing.tryColorscale(marker, 'line');\n\n    if(Registry.traceIs(trace, 'symbols')) {\n        out.ms2mrc = subTypes.isBubble(trace) ?\n            makeBubbleSizeFn(trace) :\n            function() { return (marker.size || 6) / 2; };\n    }\n\n    if(trace.selectedpoints) {\n        Lib.extendFlat(out, drawing.makeSelectedPointStyleFns(trace));\n    }\n\n    return out;\n};\n\ndrawing.makeSelectedPointStyleFns = function(trace) {\n    var out = {};\n\n    var selectedAttrs = trace.selected || {};\n    var unselectedAttrs = trace.unselected || {};\n\n    var marker = trace.marker || {};\n    var selectedMarker = selectedAttrs.marker || {};\n    var unselectedMarker = unselectedAttrs.marker || {};\n\n    var mo = marker.opacity;\n    var smo = selectedMarker.opacity;\n    var usmo = unselectedMarker.opacity;\n    var smoIsDefined = smo !== undefined;\n    var usmoIsDefined = usmo !== undefined;\n\n    if(Lib.isArrayOrTypedArray(mo) || smoIsDefined || usmoIsDefined) {\n        out.selectedOpacityFn = function(d) {\n            var base = d.mo === undefined ? marker.opacity : d.mo;\n\n            if(d.selected) {\n                return smoIsDefined ? smo : base;\n            } else {\n                return usmoIsDefined ? usmo : DESELECTDIM * base;\n            }\n        };\n    }\n\n    var mc = marker.color;\n    var smc = selectedMarker.color;\n    var usmc = unselectedMarker.color;\n\n    if(smc || usmc) {\n        out.selectedColorFn = function(d) {\n            var base = d.mcc || mc;\n\n            if(d.selected) {\n                return smc || base;\n            } else {\n                return usmc || base;\n            }\n        };\n    }\n\n    var ms = marker.size;\n    var sms = selectedMarker.size;\n    var usms = unselectedMarker.size;\n    var smsIsDefined = sms !== undefined;\n    var usmsIsDefined = usms !== undefined;\n\n    if(Registry.traceIs(trace, 'symbols') && (smsIsDefined || usmsIsDefined)) {\n        out.selectedSizeFn = function(d) {\n            var base = d.mrc || ms / 2;\n\n            if(d.selected) {\n                return smsIsDefined ? sms / 2 : base;\n            } else {\n                return usmsIsDefined ? usms / 2 : base;\n            }\n        };\n    }\n\n    return out;\n};\n\ndrawing.makeSelectedTextStyleFns = function(trace) {\n    var out = {};\n\n    var selectedAttrs = trace.selected || {};\n    var unselectedAttrs = trace.unselected || {};\n\n    var textFont = trace.textfont || {};\n    var selectedTextFont = selectedAttrs.textfont || {};\n    var unselectedTextFont = unselectedAttrs.textfont || {};\n\n    var tc = textFont.color;\n    var stc = selectedTextFont.color;\n    var utc = unselectedTextFont.color;\n\n    out.selectedTextColorFn = function(d) {\n        var base = d.tc || tc;\n\n        if(d.selected) {\n            return stc || base;\n        } else {\n            if(utc) return utc;\n            else return stc ? base : Color.addOpacity(base, DESELECTDIM);\n        }\n    };\n\n    return out;\n};\n\ndrawing.selectedPointStyle = function(s, trace) {\n    if(!s.size() || !trace.selectedpoints) return;\n\n    var fns = drawing.makeSelectedPointStyleFns(trace);\n    var marker = trace.marker || {};\n    var seq = [];\n\n    if(fns.selectedOpacityFn) {\n        seq.push(function(pt, d) {\n            pt.style('opacity', fns.selectedOpacityFn(d));\n        });\n    }\n\n    if(fns.selectedColorFn) {\n        seq.push(function(pt, d) {\n            Color.fill(pt, fns.selectedColorFn(d));\n        });\n    }\n\n    if(fns.selectedSizeFn) {\n        seq.push(function(pt, d) {\n            var mx = d.mx || marker.symbol || 0;\n            var mrc2 = fns.selectedSizeFn(d);\n\n            pt.attr('d', makePointPath(drawing.symbolNumber(mx), mrc2));\n\n            // save for Drawing.selectedTextStyle\n            d.mrc2 = mrc2;\n        });\n    }\n\n    if(seq.length) {\n        s.each(function(d) {\n            var pt = d3.select(this);\n            for(var i = 0; i < seq.length; i++) {\n                seq[i](pt, d);\n            }\n        });\n    }\n};\n\ndrawing.tryColorscale = function(marker, prefix) {\n    var cont = prefix ? Lib.nestedProperty(marker, prefix).get() : marker;\n\n    if(cont) {\n        var colorArray = cont.color;\n        if((cont.colorscale || cont._colorAx) && Lib.isArrayOrTypedArray(colorArray)) {\n            return Colorscale.makeColorScaleFuncFromTrace(cont);\n        }\n    }\n    return Lib.identity;\n};\n\nvar TEXTOFFSETSIGN = {\n    start: 1, end: -1, middle: 0, bottom: 1, top: -1\n};\n\nfunction textPointPosition(s, textPosition, fontSize, markerRadius) {\n    var group = d3.select(s.node().parentNode);\n\n    var v = textPosition.indexOf('top') !== -1 ?\n        'top' :\n        textPosition.indexOf('bottom') !== -1 ? 'bottom' : 'middle';\n    var h = textPosition.indexOf('left') !== -1 ?\n        'end' :\n        textPosition.indexOf('right') !== -1 ? 'start' : 'middle';\n\n    // if markers are shown, offset a little more than\n    // the nominal marker size\n    // ie 2/1.6 * nominal, bcs some markers are a bit bigger\n    var r = markerRadius ? markerRadius / 0.8 + 1 : 0;\n\n    var numLines = (svgTextUtils.lineCount(s) - 1) * LINE_SPACING + 1;\n    var dx = TEXTOFFSETSIGN[h] * r;\n    var dy = fontSize * 0.75 + TEXTOFFSETSIGN[v] * r +\n        (TEXTOFFSETSIGN[v] - 1) * numLines * fontSize / 2;\n\n    // fix the overall text group position\n    s.attr('text-anchor', h);\n    group.attr('transform', 'translate(' + dx + ',' + dy + ')');\n}\n\nfunction extracTextFontSize(d, trace) {\n    var fontSize = d.ts || trace.textfont.size;\n    return (isNumeric(fontSize) && fontSize > 0) ? fontSize : 0;\n}\n\n// draw text at points\ndrawing.textPointStyle = function(s, trace, gd) {\n    if(!s.size()) return;\n\n    var selectedTextColorFn;\n\n    if(trace.selectedpoints) {\n        var fns = drawing.makeSelectedTextStyleFns(trace);\n        selectedTextColorFn = fns.selectedTextColorFn;\n    }\n\n    s.each(function(d) {\n        var p = d3.select(this);\n        var text = Lib.extractOption(d, trace, 'tx', 'text');\n\n        if(!text && text !== 0) {\n            p.remove();\n            return;\n        }\n\n        var pos = d.tp || trace.textposition;\n        var fontSize = extracTextFontSize(d, trace);\n        var fontColor = selectedTextColorFn ?\n            selectedTextColorFn(d) :\n            (d.tc || trace.textfont.color);\n\n        p.call(drawing.font,\n                d.tf || trace.textfont.family,\n                fontSize,\n                fontColor)\n            .text(text)\n            .call(svgTextUtils.convertToTspans, gd)\n            .call(textPointPosition, pos, fontSize, d.mrc);\n    });\n};\n\ndrawing.selectedTextStyle = function(s, trace) {\n    if(!s.size() || !trace.selectedpoints) return;\n\n    var fns = drawing.makeSelectedTextStyleFns(trace);\n\n    s.each(function(d) {\n        var tx = d3.select(this);\n        var tc = fns.selectedTextColorFn(d);\n        var tp = d.tp || trace.textposition;\n        var fontSize = extracTextFontSize(d, trace);\n\n        Color.fill(tx, tc);\n        textPointPosition(tx, tp, fontSize, d.mrc2 || d.mrc);\n    });\n};\n\n// generalized Catmull-Rom splines, per\n// http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\nvar CatmullRomExp = 0.5;\ndrawing.smoothopen = function(pts, smoothness) {\n    if(pts.length < 3) { return 'M' + pts.join('L');}\n    var path = 'M' + pts[0];\n    var tangents = [];\n    var i;\n    for(i = 1; i < pts.length - 1; i++) {\n        tangents.push(makeTangent(pts[i - 1], pts[i], pts[i + 1], smoothness));\n    }\n    path += 'Q' + tangents[0][0] + ' ' + pts[1];\n    for(i = 2; i < pts.length - 1; i++) {\n        path += 'C' + tangents[i - 2][1] + ' ' + tangents[i - 1][0] + ' ' + pts[i];\n    }\n    path += 'Q' + tangents[pts.length - 3][1] + ' ' + pts[pts.length - 1];\n    return path;\n};\n\ndrawing.smoothclosed = function(pts, smoothness) {\n    if(pts.length < 3) { return 'M' + pts.join('L') + 'Z'; }\n    var path = 'M' + pts[0];\n    var pLast = pts.length - 1;\n    var tangents = [makeTangent(pts[pLast], pts[0], pts[1], smoothness)];\n    var i;\n    for(i = 1; i < pLast; i++) {\n        tangents.push(makeTangent(pts[i - 1], pts[i], pts[i + 1], smoothness));\n    }\n    tangents.push(\n        makeTangent(pts[pLast - 1], pts[pLast], pts[0], smoothness)\n    );\n\n    for(i = 1; i <= pLast; i++) {\n        path += 'C' + tangents[i - 1][1] + ' ' + tangents[i][0] + ' ' + pts[i];\n    }\n    path += 'C' + tangents[pLast][1] + ' ' + tangents[0][0] + ' ' + pts[0] + 'Z';\n    return path;\n};\n\nfunction makeTangent(prevpt, thispt, nextpt, smoothness) {\n    var d1x = prevpt[0] - thispt[0];\n    var d1y = prevpt[1] - thispt[1];\n    var d2x = nextpt[0] - thispt[0];\n    var d2y = nextpt[1] - thispt[1];\n    var d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2);\n    var d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2);\n    var numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness;\n    var numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness;\n    var denom1 = 3 * d2a * (d1a + d2a);\n    var denom2 = 3 * d1a * (d1a + d2a);\n    return [\n        [\n            d3.round(thispt[0] + (denom1 && numx / denom1), 2),\n            d3.round(thispt[1] + (denom1 && numy / denom1), 2)\n        ], [\n            d3.round(thispt[0] - (denom2 && numx / denom2), 2),\n            d3.round(thispt[1] - (denom2 && numy / denom2), 2)\n        ]\n    ];\n}\n\n// step paths - returns a generator function for paths\n// with the given step shape\nvar STEPPATH = {\n    hv: function(p0, p1) {\n        return 'H' + d3.round(p1[0], 2) + 'V' + d3.round(p1[1], 2);\n    },\n    vh: function(p0, p1) {\n        return 'V' + d3.round(p1[1], 2) + 'H' + d3.round(p1[0], 2);\n    },\n    hvh: function(p0, p1) {\n        return 'H' + d3.round((p0[0] + p1[0]) / 2, 2) + 'V' +\n            d3.round(p1[1], 2) + 'H' + d3.round(p1[0], 2);\n    },\n    vhv: function(p0, p1) {\n        return 'V' + d3.round((p0[1] + p1[1]) / 2, 2) + 'H' +\n            d3.round(p1[0], 2) + 'V' + d3.round(p1[1], 2);\n    }\n};\nvar STEPLINEAR = function(p0, p1) {\n    return 'L' + d3.round(p1[0], 2) + ',' + d3.round(p1[1], 2);\n};\ndrawing.steps = function(shape) {\n    var onestep = STEPPATH[shape] || STEPLINEAR;\n    return function(pts) {\n        var path = 'M' + d3.round(pts[0][0], 2) + ',' + d3.round(pts[0][1], 2);\n        for(var i = 1; i < pts.length; i++) {\n            path += onestep(pts[i - 1], pts[i]);\n        }\n        return path;\n    };\n};\n\n// off-screen svg render testing element, shared by the whole page\n// uses the id 'js-plotly-tester' and stores it in drawing.tester\ndrawing.makeTester = function() {\n    var tester = Lib.ensureSingleById(d3.select('body'), 'svg', 'js-plotly-tester', function(s) {\n        s.attr(xmlnsNamespaces.svgAttrs)\n            .style({\n                position: 'absolute',\n                left: '-10000px',\n                top: '-10000px',\n                width: '9000px',\n                height: '9000px',\n                'z-index': '1'\n            });\n    });\n\n    // browsers differ on how they describe the bounding rect of\n    // the svg if its contents spill over... so make a 1x1px\n    // reference point we can measure off of.\n    var testref = Lib.ensureSingle(tester, 'path', 'js-reference-point', function(s) {\n        s.attr('d', 'M0,0H1V1H0Z')\n            .style({\n                'stroke-width': 0,\n                fill: 'black'\n            });\n    });\n\n    drawing.tester = tester;\n    drawing.testref = testref;\n};\n\n/*\n * use our offscreen tester to get a clientRect for an element,\n * in a reference frame where it isn't translated (or transformed) and\n * its anchor point is at (0,0)\n * always returns a copy of the bbox, so the caller can modify it safely\n *\n * @param {SVGElement} node: the element to measure. If possible this should be\n *   a <text> or MathJax <g> element that's already passed through\n *   `convertToTspans` because in that case we can cache the results, but it's\n *   possible to pass in any svg element.\n *\n * @param {boolean} inTester: is this element already in `drawing.tester`?\n *   If you are measuring a dummy element, rather than one you really intend\n *   to use on the plot, making it in `drawing.tester` in the first place\n *   allows us to test faster because it cuts out cloning and appending it.\n *\n * @param {string} hash: for internal use only, if we already know the cache key\n *   for this element beforehand.\n *\n * @return {object}: a plain object containing the width, height, left, right,\n *   top, and bottom of `node`\n */\ndrawing.savedBBoxes = {};\nvar savedBBoxesCount = 0;\nvar maxSavedBBoxes = 10000;\n\ndrawing.bBox = function(node, inTester, hash) {\n    /*\n     * Cache elements we've already measured so we don't have to\n     * remeasure the same thing many times\n     * We have a few bBox callers though who pass a node larger than\n     * a <text> or a MathJax <g>, such as an axis group containing many labels.\n     * These will not generate a hash (unless we figure out an appropriate\n     * hash key for them) and thus we will not hash them.\n     */\n    if(!hash) hash = nodeHash(node);\n    var out;\n    if(hash) {\n        out = drawing.savedBBoxes[hash];\n        if(out) return Lib.extendFlat({}, out);\n    } else if(node.childNodes.length === 1) {\n        /*\n         * If we have only one child element, which is itself hashable, make\n         * a new hash from this element plus its x,y,transform\n         * These bounding boxes *include* x,y,transform - mostly for use by\n         * callers trying to avoid overlaps (ie titles)\n         */\n        var innerNode = node.childNodes[0];\n\n        hash = nodeHash(innerNode);\n        if(hash) {\n            var x = +innerNode.getAttribute('x') || 0;\n            var y = +innerNode.getAttribute('y') || 0;\n            var transform = innerNode.getAttribute('transform');\n\n            if(!transform) {\n                // in this case, just varying x and y, don't bother caching\n                // the final bBox because the alteration is quick.\n                var innerBB = drawing.bBox(innerNode, false, hash);\n                if(x) {\n                    innerBB.left += x;\n                    innerBB.right += x;\n                }\n                if(y) {\n                    innerBB.top += y;\n                    innerBB.bottom += y;\n                }\n                return innerBB;\n            }\n            /*\n             * else we have a transform - rather than make a complicated\n             * (and error-prone and probably slow) transform parser/calculator,\n             * just continue on calculating the boundingClientRect of the group\n             * and use the new composite hash to cache it.\n             * That said, `innerNode.transform.baseVal` is an array of\n             * `SVGTransform` objects, that *do* seem to have a nice matrix\n             * multiplication interface that we could use to avoid making\n             * another getBoundingClientRect call...\n             */\n            hash += '~' + x + '~' + y + '~' + transform;\n\n            out = drawing.savedBBoxes[hash];\n            if(out) return Lib.extendFlat({}, out);\n        }\n    }\n    var testNode, tester;\n    if(inTester) {\n        testNode = node;\n    } else {\n        tester = drawing.tester.node();\n\n        // copy the node to test into the tester\n        testNode = node.cloneNode(true);\n        tester.appendChild(testNode);\n    }\n\n    // standardize its position (and newline tspans if any)\n    d3.select(testNode)\n        .attr('transform', null)\n        .call(svgTextUtils.positionText, 0, 0);\n\n    var testRect = testNode.getBoundingClientRect();\n    var refRect = drawing.testref\n        .node()\n        .getBoundingClientRect();\n\n    if(!inTester) tester.removeChild(testNode);\n\n    var bb = {\n        height: testRect.height,\n        width: testRect.width,\n        left: testRect.left - refRect.left,\n        top: testRect.top - refRect.top,\n        right: testRect.right - refRect.left,\n        bottom: testRect.bottom - refRect.top\n    };\n\n    // make sure we don't have too many saved boxes,\n    // or a long session could overload on memory\n    // by saving boxes for long-gone elements\n    if(savedBBoxesCount >= maxSavedBBoxes) {\n        drawing.savedBBoxes = {};\n        savedBBoxesCount = 0;\n    }\n\n    // cache this bbox\n    if(hash) drawing.savedBBoxes[hash] = bb;\n    savedBBoxesCount++;\n\n    return Lib.extendFlat({}, bb);\n};\n\n// capture everything about a node (at least in our usage) that\n// impacts its bounding box, given that bBox clears x, y, and transform\nfunction nodeHash(node) {\n    var inputText = node.getAttribute('data-unformatted');\n    if(inputText === null) return;\n    return inputText +\n        node.getAttribute('data-math') +\n        node.getAttribute('text-anchor') +\n        node.getAttribute('style');\n}\n\n/**\n * Set clipPath URL in a way that work for all situations.\n *\n * In details, graphs on pages with <base> HTML tags need to prepend\n * the clip path ids with the page's base url EXCEPT during toImage exports.\n *\n * @param {d3 selection} s : node to add clip-path attribute\n * @param {string} localId : local clip-path (w/o base url) id\n * @param {DOM element || object} gd\n * - context._baseUrl {string}\n * - context._exportedPlot {boolean}\n */\ndrawing.setClipUrl = function(s, localId, gd) {\n    s.attr('clip-path', getFullUrl(localId, gd));\n};\n\nfunction getFullUrl(localId, gd) {\n    if(!localId) return null;\n\n    var context = gd._context;\n    var baseUrl = context._exportedPlot ? '' : (context._baseUrl || '');\n    return 'url(\\'' + baseUrl + '#' + localId + '\\')';\n}\n\ndrawing.getTranslate = function(element) {\n    // Note the separator [^\\d] between x and y in this regex\n    // We generally use ',' but IE will convert it to ' '\n    var re = /.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/;\n    var getter = element.attr ? 'attr' : 'getAttribute';\n    var transform = element[getter]('transform') || '';\n\n    var translate = transform.replace(re, function(match, p1, p2) {\n        return [p1, p2].join(' ');\n    })\n    .split(' ');\n\n    return {\n        x: +translate[0] || 0,\n        y: +translate[1] || 0\n    };\n};\n\ndrawing.setTranslate = function(element, x, y) {\n    var re = /(\\btranslate\\(.*?\\);?)/;\n    var getter = element.attr ? 'attr' : 'getAttribute';\n    var setter = element.attr ? 'attr' : 'setAttribute';\n    var transform = element[getter]('transform') || '';\n\n    x = x || 0;\n    y = y || 0;\n\n    transform = transform.replace(re, '').trim();\n    transform += ' translate(' + x + ', ' + y + ')';\n    transform = transform.trim();\n\n    element[setter]('transform', transform);\n\n    return transform;\n};\n\ndrawing.getScale = function(element) {\n    var re = /.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/;\n    var getter = element.attr ? 'attr' : 'getAttribute';\n    var transform = element[getter]('transform') || '';\n\n    var translate = transform.replace(re, function(match, p1, p2) {\n        return [p1, p2].join(' ');\n    })\n    .split(' ');\n\n    return {\n        x: +translate[0] || 1,\n        y: +translate[1] || 1\n    };\n};\n\ndrawing.setScale = function(element, x, y) {\n    var re = /(\\bscale\\(.*?\\);?)/;\n    var getter = element.attr ? 'attr' : 'getAttribute';\n    var setter = element.attr ? 'attr' : 'setAttribute';\n    var transform = element[getter]('transform') || '';\n\n    x = x || 1;\n    y = y || 1;\n\n    transform = transform.replace(re, '').trim();\n    transform += ' scale(' + x + ', ' + y + ')';\n    transform = transform.trim();\n\n    element[setter]('transform', transform);\n\n    return transform;\n};\n\nvar SCALE_RE = /\\s*sc.*/;\n\ndrawing.setPointGroupScale = function(selection, xScale, yScale) {\n    xScale = xScale || 1;\n    yScale = yScale || 1;\n\n    if(!selection) return;\n\n    // The same scale transform for every point:\n    var scale = (xScale === 1 && yScale === 1) ?\n        '' :\n        ' scale(' + xScale + ',' + yScale + ')';\n\n    selection.each(function() {\n        var t = (this.getAttribute('transform') || '').replace(SCALE_RE, '');\n        t += scale;\n        t = t.trim();\n        this.setAttribute('transform', t);\n    });\n};\n\nvar TEXT_POINT_LAST_TRANSLATION_RE = /translate\\([^)]*\\)\\s*$/;\n\ndrawing.setTextPointsScale = function(selection, xScale, yScale) {\n    if(!selection) return;\n\n    selection.each(function() {\n        var transforms;\n        var el = d3.select(this);\n        var text = el.select('text');\n\n        if(!text.node()) return;\n\n        var x = parseFloat(text.attr('x') || 0);\n        var y = parseFloat(text.attr('y') || 0);\n\n        var existingTransform = (el.attr('transform') || '').match(TEXT_POINT_LAST_TRANSLATION_RE);\n\n        if(xScale === 1 && yScale === 1) {\n            transforms = [];\n        } else {\n            transforms = [\n                'translate(' + x + ',' + y + ')',\n                'scale(' + xScale + ',' + yScale + ')',\n                'translate(' + (-x) + ',' + (-y) + ')',\n            ];\n        }\n\n        if(existingTransform) {\n            transforms.push(existingTransform);\n        }\n\n        el.attr('transform', transforms.join(' '));\n    });\n};\n\n},{\"../../constants/alignment\":675,\"../../constants/interactions\":679,\"../../constants/xmlns_namespaces\":681,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../registry\":831,\"../../traces/scatter/make_bubble_size_func\":1091,\"../../traces/scatter/subtypes\":1098,\"../color\":580,\"../colorscale\":592,\"./symbol_defs\":602,\"d3\":157,\"fast-isnumeric\":224,\"tinycolor2\":524}],602:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\n/** Marker symbol definitions\n * users can specify markers either by number or name\n * add 100 (or '-open') and you get an open marker\n *  open markers have no fill and use line color as the stroke color\n * add 200 (or '-dot') and you get a dot in the middle\n * add both and you get both\n */\n\nmodule.exports = {\n    circle: {\n        n: 0,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs +\n                'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z';\n        }\n    },\n    square: {\n        n: 1,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z';\n        }\n    },\n    diamond: {\n        n: 2,\n        f: function(r) {\n            var rd = d3.round(r * 1.3, 2);\n            return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z';\n        }\n    },\n    cross: {\n        n: 3,\n        f: function(r) {\n            var rc = d3.round(r * 0.4, 2);\n            var rc2 = d3.round(r * 1.2, 2);\n            return 'M' + rc2 + ',' + rc + 'H' + rc + 'V' + rc2 + 'H-' + rc +\n                'V' + rc + 'H-' + rc2 + 'V-' + rc + 'H-' + rc + 'V-' + rc2 +\n                'H' + rc + 'V-' + rc + 'H' + rc2 + 'Z';\n        }\n    },\n    x: {\n        n: 4,\n        f: function(r) {\n            var rx = d3.round(r * 0.8 / Math.sqrt(2), 2);\n            var ne = 'l' + rx + ',' + rx;\n            var se = 'l' + rx + ',-' + rx;\n            var sw = 'l-' + rx + ',-' + rx;\n            var nw = 'l-' + rx + ',' + rx;\n            return 'M0,' + rx + ne + se + sw + se + sw + nw + sw + nw + ne + nw + ne + 'Z';\n        }\n    },\n    'triangle-up': {\n        n: 5,\n        f: function(r) {\n            var rt = d3.round(r * 2 / Math.sqrt(3), 2);\n            var r2 = d3.round(r / 2, 2);\n            var rs = d3.round(r, 2);\n            return 'M-' + rt + ',' + r2 + 'H' + rt + 'L0,-' + rs + 'Z';\n        }\n    },\n    'triangle-down': {\n        n: 6,\n        f: function(r) {\n            var rt = d3.round(r * 2 / Math.sqrt(3), 2);\n            var r2 = d3.round(r / 2, 2);\n            var rs = d3.round(r, 2);\n            return 'M-' + rt + ',-' + r2 + 'H' + rt + 'L0,' + rs + 'Z';\n        }\n    },\n    'triangle-left': {\n        n: 7,\n        f: function(r) {\n            var rt = d3.round(r * 2 / Math.sqrt(3), 2);\n            var r2 = d3.round(r / 2, 2);\n            var rs = d3.round(r, 2);\n            return 'M' + r2 + ',-' + rt + 'V' + rt + 'L-' + rs + ',0Z';\n        }\n    },\n    'triangle-right': {\n        n: 8,\n        f: function(r) {\n            var rt = d3.round(r * 2 / Math.sqrt(3), 2);\n            var r2 = d3.round(r / 2, 2);\n            var rs = d3.round(r, 2);\n            return 'M-' + r2 + ',-' + rt + 'V' + rt + 'L' + rs + ',0Z';\n        }\n    },\n    'triangle-ne': {\n        n: 9,\n        f: function(r) {\n            var r1 = d3.round(r * 0.6, 2);\n            var r2 = d3.round(r * 1.2, 2);\n            return 'M-' + r2 + ',-' + r1 + 'H' + r1 + 'V' + r2 + 'Z';\n        }\n    },\n    'triangle-se': {\n        n: 10,\n        f: function(r) {\n            var r1 = d3.round(r * 0.6, 2);\n            var r2 = d3.round(r * 1.2, 2);\n            return 'M' + r1 + ',-' + r2 + 'V' + r1 + 'H-' + r2 + 'Z';\n        }\n    },\n    'triangle-sw': {\n        n: 11,\n        f: function(r) {\n            var r1 = d3.round(r * 0.6, 2);\n            var r2 = d3.round(r * 1.2, 2);\n            return 'M' + r2 + ',' + r1 + 'H-' + r1 + 'V-' + r2 + 'Z';\n        }\n    },\n    'triangle-nw': {\n        n: 12,\n        f: function(r) {\n            var r1 = d3.round(r * 0.6, 2);\n            var r2 = d3.round(r * 1.2, 2);\n            return 'M-' + r1 + ',' + r2 + 'V-' + r1 + 'H' + r2 + 'Z';\n        }\n    },\n    pentagon: {\n        n: 13,\n        f: function(r) {\n            var x1 = d3.round(r * 0.951, 2);\n            var x2 = d3.round(r * 0.588, 2);\n            var y0 = d3.round(-r, 2);\n            var y1 = d3.round(r * -0.309, 2);\n            var y2 = d3.round(r * 0.809, 2);\n            return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2 + 'H-' + x2 +\n                'L-' + x1 + ',' + y1 + 'L0,' + y0 + 'Z';\n        }\n    },\n    hexagon: {\n        n: 14,\n        f: function(r) {\n            var y0 = d3.round(r, 2);\n            var y1 = d3.round(r / 2, 2);\n            var x = d3.round(r * Math.sqrt(3) / 2, 2);\n            return 'M' + x + ',-' + y1 + 'V' + y1 + 'L0,' + y0 +\n                'L-' + x + ',' + y1 + 'V-' + y1 + 'L0,-' + y0 + 'Z';\n        }\n    },\n    hexagon2: {\n        n: 15,\n        f: function(r) {\n            var x0 = d3.round(r, 2);\n            var x1 = d3.round(r / 2, 2);\n            var y = d3.round(r * Math.sqrt(3) / 2, 2);\n            return 'M-' + x1 + ',' + y + 'H' + x1 + 'L' + x0 +\n                ',0L' + x1 + ',-' + y + 'H-' + x1 + 'L-' + x0 + ',0Z';\n        }\n    },\n    octagon: {\n        n: 16,\n        f: function(r) {\n            var a = d3.round(r * 0.924, 2);\n            var b = d3.round(r * 0.383, 2);\n            return 'M-' + b + ',-' + a + 'H' + b + 'L' + a + ',-' + b + 'V' + b +\n                'L' + b + ',' + a + 'H-' + b + 'L-' + a + ',' + b + 'V-' + b + 'Z';\n        }\n    },\n    star: {\n        n: 17,\n        f: function(r) {\n            var rs = r * 1.4;\n            var x1 = d3.round(rs * 0.225, 2);\n            var x2 = d3.round(rs * 0.951, 2);\n            var x3 = d3.round(rs * 0.363, 2);\n            var x4 = d3.round(rs * 0.588, 2);\n            var y0 = d3.round(-rs, 2);\n            var y1 = d3.round(rs * -0.309, 2);\n            var y3 = d3.round(rs * 0.118, 2);\n            var y4 = d3.round(rs * 0.809, 2);\n            var y5 = d3.round(rs * 0.382, 2);\n            return 'M' + x1 + ',' + y1 + 'H' + x2 + 'L' + x3 + ',' + y3 +\n                'L' + x4 + ',' + y4 + 'L0,' + y5 + 'L-' + x4 + ',' + y4 +\n                'L-' + x3 + ',' + y3 + 'L-' + x2 + ',' + y1 + 'H-' + x1 +\n                'L0,' + y0 + 'Z';\n        }\n    },\n    hexagram: {\n        n: 18,\n        f: function(r) {\n            var y = d3.round(r * 0.66, 2);\n            var x1 = d3.round(r * 0.38, 2);\n            var x2 = d3.round(r * 0.76, 2);\n            return 'M-' + x2 + ',0l-' + x1 + ',-' + y + 'h' + x2 +\n                'l' + x1 + ',-' + y + 'l' + x1 + ',' + y + 'h' + x2 +\n                'l-' + x1 + ',' + y + 'l' + x1 + ',' + y + 'h-' + x2 +\n                'l-' + x1 + ',' + y + 'l-' + x1 + ',-' + y + 'h-' + x2 + 'Z';\n        }\n    },\n    'star-triangle-up': {\n        n: 19,\n        f: function(r) {\n            var x = d3.round(r * Math.sqrt(3) * 0.8, 2);\n            var y1 = d3.round(r * 0.8, 2);\n            var y2 = d3.round(r * 1.6, 2);\n            var rc = d3.round(r * 4, 2);\n            var aPart = 'A ' + rc + ',' + rc + ' 0 0 1 ';\n            return 'M-' + x + ',' + y1 + aPart + x + ',' + y1 +\n                aPart + '0,-' + y2 + aPart + '-' + x + ',' + y1 + 'Z';\n        }\n    },\n    'star-triangle-down': {\n        n: 20,\n        f: function(r) {\n            var x = d3.round(r * Math.sqrt(3) * 0.8, 2);\n            var y1 = d3.round(r * 0.8, 2);\n            var y2 = d3.round(r * 1.6, 2);\n            var rc = d3.round(r * 4, 2);\n            var aPart = 'A ' + rc + ',' + rc + ' 0 0 1 ';\n            return 'M' + x + ',-' + y1 + aPart + '-' + x + ',-' + y1 +\n                aPart + '0,' + y2 + aPart + x + ',-' + y1 + 'Z';\n        }\n    },\n    'star-square': {\n        n: 21,\n        f: function(r) {\n            var rp = d3.round(r * 1.1, 2);\n            var rc = d3.round(r * 2, 2);\n            var aPart = 'A ' + rc + ',' + rc + ' 0 0 1 ';\n            return 'M-' + rp + ',-' + rp + aPart + '-' + rp + ',' + rp +\n                aPart + rp + ',' + rp + aPart + rp + ',-' + rp +\n                aPart + '-' + rp + ',-' + rp + 'Z';\n        }\n    },\n    'star-diamond': {\n        n: 22,\n        f: function(r) {\n            var rp = d3.round(r * 1.4, 2);\n            var rc = d3.round(r * 1.9, 2);\n            var aPart = 'A ' + rc + ',' + rc + ' 0 0 1 ';\n            return 'M-' + rp + ',0' + aPart + '0,' + rp +\n                aPart + rp + ',0' + aPart + '0,-' + rp +\n                aPart + '-' + rp + ',0' + 'Z';\n        }\n    },\n    'diamond-tall': {\n        n: 23,\n        f: function(r) {\n            var x = d3.round(r * 0.7, 2);\n            var y = d3.round(r * 1.4, 2);\n            return 'M0,' + y + 'L' + x + ',0L0,-' + y + 'L-' + x + ',0Z';\n        }\n    },\n    'diamond-wide': {\n        n: 24,\n        f: function(r) {\n            var x = d3.round(r * 1.4, 2);\n            var y = d3.round(r * 0.7, 2);\n            return 'M0,' + y + 'L' + x + ',0L0,-' + y + 'L-' + x + ',0Z';\n        }\n    },\n    hourglass: {\n        n: 25,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M' + rs + ',' + rs + 'H-' + rs + 'L' + rs + ',-' + rs + 'H-' + rs + 'Z';\n        },\n        noDot: true\n    },\n    bowtie: {\n        n: 26,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M' + rs + ',' + rs + 'V-' + rs + 'L-' + rs + ',' + rs + 'V-' + rs + 'Z';\n        },\n        noDot: true\n    },\n    'circle-cross': {\n        n: 27,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M0,' + rs + 'V-' + rs + 'M' + rs + ',0H-' + rs +\n                'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs +\n                'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z';\n        },\n        needLine: true,\n        noDot: true\n    },\n    'circle-x': {\n        n: 28,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            var rc = d3.round(r / Math.sqrt(2), 2);\n            return 'M' + rc + ',' + rc + 'L-' + rc + ',-' + rc +\n                'M' + rc + ',-' + rc + 'L-' + rc + ',' + rc +\n                'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs +\n                'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z';\n        },\n        needLine: true,\n        noDot: true\n    },\n    'square-cross': {\n        n: 29,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M0,' + rs + 'V-' + rs + 'M' + rs + ',0H-' + rs +\n                'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z';\n        },\n        needLine: true,\n        noDot: true\n    },\n    'square-x': {\n        n: 30,\n        f: function(r) {\n            var rs = d3.round(r, 2);\n            return 'M' + rs + ',' + rs + 'L-' + rs + ',-' + rs +\n                'M' + rs + ',-' + rs + 'L-' + rs + ',' + rs +\n                'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z';\n        },\n        needLine: true,\n        noDot: true\n    },\n    'diamond-cross': {\n        n: 31,\n        f: function(r) {\n            var rd = d3.round(r * 1.3, 2);\n            return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z' +\n                'M0,-' + rd + 'V' + rd + 'M-' + rd + ',0H' + rd;\n        },\n        needLine: true,\n        noDot: true\n    },\n    'diamond-x': {\n        n: 32,\n        f: function(r) {\n            var rd = d3.round(r * 1.3, 2);\n            var r2 = d3.round(r * 0.65, 2);\n            return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z' +\n                'M-' + r2 + ',-' + r2 + 'L' + r2 + ',' + r2 +\n                'M-' + r2 + ',' + r2 + 'L' + r2 + ',-' + r2;\n        },\n        needLine: true,\n        noDot: true\n    },\n    'cross-thin': {\n        n: 33,\n        f: function(r) {\n            var rc = d3.round(r * 1.4, 2);\n            return 'M0,' + rc + 'V-' + rc + 'M' + rc + ',0H-' + rc;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'x-thin': {\n        n: 34,\n        f: function(r) {\n            var rx = d3.round(r, 2);\n            return 'M' + rx + ',' + rx + 'L-' + rx + ',-' + rx +\n                'M' + rx + ',-' + rx + 'L-' + rx + ',' + rx;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    asterisk: {\n        n: 35,\n        f: function(r) {\n            var rc = d3.round(r * 1.2, 2);\n            var rs = d3.round(r * 0.85, 2);\n            return 'M0,' + rc + 'V-' + rc + 'M' + rc + ',0H-' + rc +\n                'M' + rs + ',' + rs + 'L-' + rs + ',-' + rs +\n                'M' + rs + ',-' + rs + 'L-' + rs + ',' + rs;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    hash: {\n        n: 36,\n        f: function(r) {\n            var r1 = d3.round(r / 2, 2);\n            var r2 = d3.round(r, 2);\n            return 'M' + r1 + ',' + r2 + 'V-' + r2 +\n                'm-' + r2 + ',0V' + r2 +\n                'M' + r2 + ',' + r1 + 'H-' + r2 +\n                'm0,-' + r2 + 'H' + r2;\n        },\n        needLine: true,\n        noFill: true\n    },\n    'y-up': {\n        n: 37,\n        f: function(r) {\n            var x = d3.round(r * 1.2, 2);\n            var y0 = d3.round(r * 1.6, 2);\n            var y1 = d3.round(r * 0.8, 2);\n            return 'M-' + x + ',' + y1 + 'L0,0M' + x + ',' + y1 + 'L0,0M0,-' + y0 + 'L0,0';\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'y-down': {\n        n: 38,\n        f: function(r) {\n            var x = d3.round(r * 1.2, 2);\n            var y0 = d3.round(r * 1.6, 2);\n            var y1 = d3.round(r * 0.8, 2);\n            return 'M-' + x + ',-' + y1 + 'L0,0M' + x + ',-' + y1 + 'L0,0M0,' + y0 + 'L0,0';\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'y-left': {\n        n: 39,\n        f: function(r) {\n            var y = d3.round(r * 1.2, 2);\n            var x0 = d3.round(r * 1.6, 2);\n            var x1 = d3.round(r * 0.8, 2);\n            return 'M' + x1 + ',' + y + 'L0,0M' + x1 + ',-' + y + 'L0,0M-' + x0 + ',0L0,0';\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'y-right': {\n        n: 40,\n        f: function(r) {\n            var y = d3.round(r * 1.2, 2);\n            var x0 = d3.round(r * 1.6, 2);\n            var x1 = d3.round(r * 0.8, 2);\n            return 'M-' + x1 + ',' + y + 'L0,0M-' + x1 + ',-' + y + 'L0,0M' + x0 + ',0L0,0';\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'line-ew': {\n        n: 41,\n        f: function(r) {\n            var rc = d3.round(r * 1.4, 2);\n            return 'M' + rc + ',0H-' + rc;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'line-ns': {\n        n: 42,\n        f: function(r) {\n            var rc = d3.round(r * 1.4, 2);\n            return 'M0,' + rc + 'V-' + rc;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'line-ne': {\n        n: 43,\n        f: function(r) {\n            var rx = d3.round(r, 2);\n            return 'M' + rx + ',-' + rx + 'L-' + rx + ',' + rx;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    },\n    'line-nw': {\n        n: 44,\n        f: function(r) {\n            var rx = d3.round(r, 2);\n            return 'M' + rx + ',' + rx + 'L-' + rx + ',-' + rx;\n        },\n        needLine: true,\n        noDot: true,\n        noFill: true\n    }\n};\n\n},{\"d3\":157}],603:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    visible: {\n        valType: 'boolean',\n        \n        editType: 'calc',\n        \n    },\n    type: {\n        valType: 'enumerated',\n        values: ['percent', 'constant', 'sqrt', 'data'],\n        \n        editType: 'calc',\n        \n    },\n    symmetric: {\n        valType: 'boolean',\n        \n        editType: 'calc',\n        \n    },\n    array: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    arrayminus: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    value: {\n        valType: 'number',\n        min: 0,\n        dflt: 10,\n        \n        editType: 'calc',\n        \n    },\n    valueminus: {\n        valType: 'number',\n        min: 0,\n        dflt: 10,\n        \n        editType: 'calc',\n        \n    },\n    traceref: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'style'\n    },\n    tracerefminus: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'style'\n    },\n    copy_ystyle: {\n        valType: 'boolean',\n        \n        editType: 'plot'\n    },\n    copy_zstyle: {\n        valType: 'boolean',\n        \n        editType: 'style'\n    },\n    color: {\n        valType: 'color',\n        \n        editType: 'style',\n        \n    },\n    thickness: {\n        valType: 'number',\n        min: 0,\n        dflt: 2,\n        \n        editType: 'style',\n        \n    },\n    width: {\n        valType: 'number',\n        min: 0,\n        \n        editType: 'plot',\n        \n    },\n    editType: 'calc',\n\n    _deprecated: {\n        opacity: {\n            valType: 'number',\n            \n            editType: 'style',\n            \n        }\n    }\n};\n\n},{}],604:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\n\nvar makeComputeError = _dereq_('./compute_error');\n\nmodule.exports = function calc(gd) {\n    var calcdata = gd.calcdata;\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var calcTrace = calcdata[i];\n        var trace = calcTrace[0].trace;\n\n        if(trace.visible === true && Registry.traceIs(trace, 'errorBarsOK')) {\n            var xa = Axes.getFromId(gd, trace.xaxis);\n            var ya = Axes.getFromId(gd, trace.yaxis);\n            calcOneAxis(calcTrace, trace, xa, 'x');\n            calcOneAxis(calcTrace, trace, ya, 'y');\n        }\n    }\n};\n\nfunction calcOneAxis(calcTrace, trace, axis, coord) {\n    var opts = trace['error_' + coord] || {};\n    var isVisible = (opts.visible && ['linear', 'log'].indexOf(axis.type) !== -1);\n    var vals = [];\n\n    if(!isVisible) return;\n\n    var computeError = makeComputeError(opts);\n\n    for(var i = 0; i < calcTrace.length; i++) {\n        var calcPt = calcTrace[i];\n\n        var iIn = calcPt.i;\n\n        // for types that don't include `i` in each calcdata point\n        if(iIn === undefined) iIn = i;\n\n        // for stacked area inserted points\n        // TODO: errorbars have been tested cursorily with stacked area,\n        // but not thoroughly. It's not even really clear what you want to do:\n        // Should it just be calculated based on that trace's size data?\n        // Should you add errors from below in quadrature?\n        // And what about normalization, where in principle the errors shrink\n        // again when you get up to the top end?\n        // One option would be to forbid errorbars with stacking until we\n        // decide how to handle these questions.\n        else if(iIn === null) continue;\n\n        var calcCoord = calcPt[coord];\n\n        if(!isNumeric(axis.c2l(calcCoord))) continue;\n\n        var errors = computeError(calcCoord, iIn);\n        if(isNumeric(errors[0]) && isNumeric(errors[1])) {\n            var shoe = calcPt[coord + 's'] = calcCoord - errors[0];\n            var hat = calcPt[coord + 'h'] = calcCoord + errors[1];\n            vals.push(shoe, hat);\n        }\n    }\n\n    var axId = axis._id;\n    var baseExtremes = trace._extremes[axId];\n    var extremes = Axes.findExtremes(\n        axis,\n        vals,\n        Lib.extendFlat({tozero: baseExtremes.opts.tozero}, {padded: true})\n    );\n    baseExtremes.min = baseExtremes.min.concat(extremes.min);\n    baseExtremes.max = baseExtremes.max.concat(extremes.max);\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"./compute_error\":605,\"fast-isnumeric\":224}],605:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n/**\n * Error bar computing function generator\n *\n * N.B. The generated function does not clean the dataPt entries. Non-numeric\n * entries result in undefined error magnitudes.\n *\n * @param {object} opts error bar attributes\n *\n * @return {function} :\n *      @param {numeric} dataPt data point from where to compute the error magnitude\n *      @param {number} index index of dataPt in its corresponding data array\n *      @return {array}\n *        - error[0] : error magnitude in the negative direction\n *        - error[1] : \" \" \" \" positive \"\n */\nmodule.exports = function makeComputeError(opts) {\n    var type = opts.type;\n    var symmetric = opts.symmetric;\n\n    if(type === 'data') {\n        var array = opts.array || [];\n\n        if(symmetric) {\n            return function computeError(dataPt, index) {\n                var val = +(array[index]);\n                return [val, val];\n            };\n        } else {\n            var arrayminus = opts.arrayminus || [];\n            return function computeError(dataPt, index) {\n                var val = +array[index];\n                var valMinus = +arrayminus[index];\n                // in case one is present and the other is missing, fill in 0\n                // so we still see the present one. Mostly useful during manual\n                // data entry.\n                if(!isNaN(val) || !isNaN(valMinus)) {\n                    return [valMinus || 0, val || 0];\n                }\n                return [NaN, NaN];\n            };\n        }\n    } else {\n        var computeErrorValue = makeComputeErrorValue(type, opts.value);\n        var computeErrorValueMinus = makeComputeErrorValue(type, opts.valueminus);\n\n        if(symmetric || opts.valueminus === undefined) {\n            return function computeError(dataPt) {\n                var val = computeErrorValue(dataPt);\n                return [val, val];\n            };\n        } else {\n            return function computeError(dataPt) {\n                return [\n                    computeErrorValueMinus(dataPt),\n                    computeErrorValue(dataPt)\n                ];\n            };\n        }\n    }\n};\n\n/**\n * Compute error bar magnitude (for all types except data)\n *\n * @param {string} type error bar type\n * @param {numeric} value error bar value\n *\n * @return {function} :\n *      @param {numeric} dataPt\n */\nfunction makeComputeErrorValue(type, value) {\n    if(type === 'percent') {\n        return function(dataPt) {\n            return Math.abs(dataPt * value / 100);\n        };\n    }\n    if(type === 'constant') {\n        return function() {\n            return Math.abs(value);\n        };\n    }\n    if(type === 'sqrt') {\n        return function(dataPt) {\n            return Math.sqrt(Math.abs(dataPt));\n        };\n    }\n}\n\n},{}],606:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function(traceIn, traceOut, defaultColor, opts) {\n    var objName = 'error_' + opts.axis;\n    var containerOut = Template.newContainer(traceOut, objName);\n    var containerIn = traceIn[objName] || {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);\n    }\n\n    var hasErrorBars = (\n        containerIn.array !== undefined ||\n        containerIn.value !== undefined ||\n        containerIn.type === 'sqrt'\n    );\n\n    var visible = coerce('visible', hasErrorBars);\n\n    if(visible === false) return;\n\n    var type = coerce('type', 'array' in containerIn ? 'data' : 'percent');\n    var symmetric = true;\n\n    if(type !== 'sqrt') {\n        symmetric = coerce('symmetric',\n            !((type === 'data' ? 'arrayminus' : 'valueminus') in containerIn));\n    }\n\n    if(type === 'data') {\n        coerce('array');\n        coerce('traceref');\n        if(!symmetric) {\n            coerce('arrayminus');\n            coerce('tracerefminus');\n        }\n    } else if(type === 'percent' || type === 'constant') {\n        coerce('value');\n        if(!symmetric) coerce('valueminus');\n    }\n\n    var copyAttr = 'copy_' + opts.inherit + 'style';\n    if(opts.inherit) {\n        var inheritObj = traceOut['error_' + opts.inherit];\n        if((inheritObj || {}).visible) {\n            coerce(copyAttr, !(containerIn.color ||\n                               isNumeric(containerIn.thickness) ||\n                               isNumeric(containerIn.width)));\n        }\n    }\n    if(!opts.inherit || !containerOut[copyAttr]) {\n        coerce('color', defaultColor);\n        coerce('thickness');\n        coerce('width', Registry.traceIs(traceOut, 'gl3d') ? 0 : 4);\n    }\n};\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../registry\":831,\"./attributes\":603,\"fast-isnumeric\":224}],607:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar attributes = _dereq_('./attributes');\n\nvar xyAttrs = {\n    error_x: Lib.extendFlat({}, attributes),\n    error_y: Lib.extendFlat({}, attributes)\n};\ndelete xyAttrs.error_x.copy_zstyle;\ndelete xyAttrs.error_y.copy_zstyle;\ndelete xyAttrs.error_y.copy_ystyle;\n\nvar xyzAttrs = {\n    error_x: Lib.extendFlat({}, attributes),\n    error_y: Lib.extendFlat({}, attributes),\n    error_z: Lib.extendFlat({}, attributes)\n};\ndelete xyzAttrs.error_x.copy_ystyle;\ndelete xyzAttrs.error_y.copy_ystyle;\ndelete xyzAttrs.error_z.copy_ystyle;\ndelete xyzAttrs.error_z.copy_zstyle;\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'errorbars',\n\n    schema: {\n        traces: {\n            scatter: xyAttrs,\n            bar: xyAttrs,\n            histogram: xyAttrs,\n            scatter3d: overrideAll(xyzAttrs, 'calc', 'nested'),\n            scattergl: overrideAll(xyAttrs, 'calc', 'nested')\n        }\n    },\n\n    supplyDefaults: _dereq_('./defaults'),\n\n    calc: _dereq_('./calc'),\n    makeComputeError: _dereq_('./compute_error'),\n\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style'),\n    hoverInfo: hoverInfo\n};\n\nfunction hoverInfo(calcPoint, trace, hoverPoint) {\n    if((trace.error_y || {}).visible) {\n        hoverPoint.yerr = calcPoint.yh - calcPoint.y;\n        if(!trace.error_y.symmetric) hoverPoint.yerrneg = calcPoint.y - calcPoint.ys;\n    }\n    if((trace.error_x || {}).visible) {\n        hoverPoint.xerr = calcPoint.xh - calcPoint.x;\n        if(!trace.error_x.symmetric) hoverPoint.xerrneg = calcPoint.x - calcPoint.xs;\n    }\n}\n\n},{\"../../lib\":703,\"../../plot_api/edit_types\":734,\"./attributes\":603,\"./calc\":604,\"./compute_error\":605,\"./defaults\":606,\"./plot\":608,\"./style\":609}],608:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Drawing = _dereq_('../drawing');\nvar subTypes = _dereq_('../../traces/scatter/subtypes');\n\nmodule.exports = function plot(gd, traces, plotinfo, transitionOpts) {\n    var isNew;\n\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    var hasAnimation = transitionOpts && transitionOpts.duration > 0;\n\n    traces.each(function(d) {\n        var trace = d[0].trace;\n        // || {} is in case the trace (specifically scatterternary)\n        // doesn't support error bars at all, but does go through\n        // the scatter.plot mechanics, which calls ErrorBars.plot\n        // internally\n        var xObj = trace.error_x || {};\n        var yObj = trace.error_y || {};\n\n        var keyFunc;\n\n        if(trace.ids) {\n            keyFunc = function(d) {return d.id;};\n        }\n\n        var sparse = (\n            subTypes.hasMarkers(trace) &&\n            trace.marker.maxdisplayed > 0\n        );\n\n        if(!yObj.visible && !xObj.visible) d = [];\n\n        var errorbars = d3.select(this).selectAll('g.errorbar')\n            .data(d, keyFunc);\n\n        errorbars.exit().remove();\n\n        if(!d.length) return;\n\n        if(!xObj.visible) errorbars.selectAll('path.xerror').remove();\n        if(!yObj.visible) errorbars.selectAll('path.yerror').remove();\n\n        errorbars.style('opacity', 1);\n\n        var enter = errorbars.enter().append('g')\n            .classed('errorbar', true);\n\n        if(hasAnimation) {\n            enter.style('opacity', 0).transition()\n                .duration(transitionOpts.duration)\n                .style('opacity', 1);\n        }\n\n        Drawing.setClipUrl(errorbars, plotinfo.layerClipId, gd);\n\n        errorbars.each(function(d) {\n            var errorbar = d3.select(this);\n            var coords = errorCoords(d, xa, ya);\n\n            if(sparse && !d.vis) return;\n\n            var path;\n\n            var yerror = errorbar.select('path.yerror');\n            if(yObj.visible && isNumeric(coords.x) &&\n                    isNumeric(coords.yh) &&\n                    isNumeric(coords.ys)) {\n                var yw = yObj.width;\n\n                path = 'M' + (coords.x - yw) + ',' +\n                    coords.yh + 'h' + (2 * yw) + // hat\n                    'm-' + yw + ',0V' + coords.ys; // bar\n\n\n                if(!coords.noYS) path += 'm-' + yw + ',0h' + (2 * yw); // shoe\n\n                isNew = !yerror.size();\n\n                if(isNew) {\n                    yerror = errorbar.append('path')\n                        .style('vector-effect', 'non-scaling-stroke')\n                        .classed('yerror', true);\n                } else if(hasAnimation) {\n                    yerror = yerror\n                        .transition()\n                            .duration(transitionOpts.duration)\n                            .ease(transitionOpts.easing);\n                }\n\n                yerror.attr('d', path);\n            } else yerror.remove();\n\n            var xerror = errorbar.select('path.xerror');\n            if(xObj.visible && isNumeric(coords.y) &&\n                    isNumeric(coords.xh) &&\n                    isNumeric(coords.xs)) {\n                var xw = (xObj.copy_ystyle ? yObj : xObj).width;\n\n                path = 'M' + coords.xh + ',' +\n                    (coords.y - xw) + 'v' + (2 * xw) + // hat\n                    'm0,-' + xw + 'H' + coords.xs; // bar\n\n                if(!coords.noXS) path += 'm0,-' + xw + 'v' + (2 * xw); // shoe\n\n                isNew = !xerror.size();\n\n                if(isNew) {\n                    xerror = errorbar.append('path')\n                        .style('vector-effect', 'non-scaling-stroke')\n                        .classed('xerror', true);\n                } else if(hasAnimation) {\n                    xerror = xerror\n                        .transition()\n                            .duration(transitionOpts.duration)\n                            .ease(transitionOpts.easing);\n                }\n\n                xerror.attr('d', path);\n            } else xerror.remove();\n        });\n    });\n};\n\n// compute the coordinates of the error-bar objects\nfunction errorCoords(d, xa, ya) {\n    var out = {\n        x: xa.c2p(d.x),\n        y: ya.c2p(d.y)\n    };\n\n    // calculate the error bar size and hat and shoe locations\n    if(d.yh !== undefined) {\n        out.yh = ya.c2p(d.yh);\n        out.ys = ya.c2p(d.ys);\n\n        // if the shoes go off-scale (ie log scale, error bars past zero)\n        // clip the bar and hide the shoes\n        if(!isNumeric(out.ys)) {\n            out.noYS = true;\n            out.ys = ya.c2p(d.ys, true);\n        }\n    }\n\n    if(d.xh !== undefined) {\n        out.xh = xa.c2p(d.xh);\n        out.xs = xa.c2p(d.xs);\n\n        if(!isNumeric(out.xs)) {\n            out.noXS = true;\n            out.xs = xa.c2p(d.xs, true);\n        }\n    }\n\n    return out;\n}\n\n},{\"../../traces/scatter/subtypes\":1098,\"../drawing\":601,\"d3\":157,\"fast-isnumeric\":224}],609:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Color = _dereq_('../color');\n\n\nmodule.exports = function style(traces) {\n    traces.each(function(d) {\n        var trace = d[0].trace;\n        var yObj = trace.error_y || {};\n        var xObj = trace.error_x || {};\n\n        var s = d3.select(this);\n\n        s.selectAll('path.yerror')\n            .style('stroke-width', yObj.thickness + 'px')\n            .call(Color.stroke, yObj.color);\n\n        if(xObj.copy_ystyle) xObj = yObj;\n\n        s.selectAll('path.xerror')\n            .style('stroke-width', xObj.thickness + 'px')\n            .call(Color.stroke, xObj.color);\n    });\n};\n\n},{\"../color\":580,\"d3\":157}],610:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar hoverLabelAttrs = _dereq_('./layout_attributes').hoverlabel;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    hoverlabel: {\n        bgcolor: extendFlat({}, hoverLabelAttrs.bgcolor, {\n            arrayOk: true,\n            \n        }),\n        bordercolor: extendFlat({}, hoverLabelAttrs.bordercolor, {\n            arrayOk: true,\n            \n        }),\n        font: fontAttrs({\n            arrayOk: true,\n            editType: 'none',\n            \n        }),\n        align: extendFlat({}, hoverLabelAttrs.align, {arrayOk: true}),\n        namelength: extendFlat({}, hoverLabelAttrs.namelength, {arrayOk: true}),\n        editType: 'none'\n    }\n};\n\n},{\"../../lib/extend\":693,\"../../plots/font_attributes\":777,\"./layout_attributes\":620}],611:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nmodule.exports = function calc(gd) {\n    var calcdata = gd.calcdata;\n    var fullLayout = gd._fullLayout;\n\n    function makeCoerceHoverInfo(trace) {\n        return function(val) {\n            return Lib.coerceHoverinfo({hoverinfo: val}, {_module: trace._module}, fullLayout);\n        };\n    }\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var trace = cd[0].trace;\n\n        // don't include hover calc fields for pie traces\n        // as calcdata items might be sorted by value and\n        // won't match the data array order.\n        if(Registry.traceIs(trace, 'pie-like')) continue;\n\n        var fillFn = Registry.traceIs(trace, '2dMap') ? paste : Lib.fillArray;\n\n        fillFn(trace.hoverinfo, cd, 'hi', makeCoerceHoverInfo(trace));\n\n        if(trace.hovertemplate) fillFn(trace.hovertemplate, cd, 'ht');\n\n        if(!trace.hoverlabel) continue;\n\n        fillFn(trace.hoverlabel.bgcolor, cd, 'hbg');\n        fillFn(trace.hoverlabel.bordercolor, cd, 'hbc');\n        fillFn(trace.hoverlabel.font.size, cd, 'hts');\n        fillFn(trace.hoverlabel.font.color, cd, 'htc');\n        fillFn(trace.hoverlabel.font.family, cd, 'htf');\n        fillFn(trace.hoverlabel.namelength, cd, 'hnl');\n        fillFn(trace.hoverlabel.align, cd, 'hta');\n    }\n};\n\nfunction paste(traceAttr, cd, cdAttr, fn) {\n    fn = fn || Lib.identity;\n\n    if(Array.isArray(traceAttr)) {\n        cd[0][cdAttr] = fn(traceAttr);\n    }\n}\n\n},{\"../../lib\":703,\"../../registry\":831}],612:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar hover = _dereq_('./hover').hover;\n\nmodule.exports = function click(gd, evt, subplot) {\n    var annotationsDone = Registry.getComponentMethod('annotations', 'onClick')(gd, gd._hoverdata);\n\n    // fallback to fail-safe in case the plot type's hover method doesn't pass the subplot.\n    // Ternary, for example, didn't, but it was caught because tested.\n    if(subplot !== undefined) {\n        // The true flag at the end causes it to re-run the hover computation to figure out *which*\n        // point is being clicked. Without this, clicking is somewhat unreliable.\n        hover(gd, evt, subplot, true);\n    }\n\n    function emitClick() { gd.emit('plotly_click', {points: gd._hoverdata, event: evt}); }\n\n    if(gd._hoverdata && evt && evt.target) {\n        if(annotationsDone && annotationsDone.then) {\n            annotationsDone.then(emitClick);\n        } else emitClick();\n\n        // why do we get a double event without this???\n        if(evt.stopImmediatePropagation) evt.stopImmediatePropagation();\n    }\n};\n\n},{\"../../registry\":831,\"./hover\":616}],613:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    // hover labels for multiple horizontal bars get tilted by this angle\n    YANGLE: 60,\n\n    // size and display constants for hover text\n\n    // pixel size of hover arrows\n    HOVERARROWSIZE: 6,\n    // pixels padding around text\n    HOVERTEXTPAD: 3,\n    // hover font\n    HOVERFONTSIZE: 13,\n    HOVERFONT: 'Arial, sans-serif',\n\n    // minimum time (msec) between hover calls\n    HOVERMINTIME: 50,\n\n    // ID suffix (with fullLayout._uid) for hover events in the throttle cache\n    HOVERID: '-hover'\n};\n\n},{}],614:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar handleHoverLabelDefaults = _dereq_('./hoverlabel_defaults');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var opts = Lib.extendFlat({}, layout.hoverlabel);\n    if(traceOut.hovertemplate) opts.namelength = -1;\n\n    handleHoverLabelDefaults(traceIn, traceOut, coerce, opts);\n};\n\n},{\"../../lib\":703,\"./attributes\":610,\"./hoverlabel_defaults\":617}],615:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n// look for either subplot or xaxis and yaxis attributes\n// does not handle splom case\nexports.getSubplot = function getSubplot(trace) {\n    return trace.subplot || (trace.xaxis + trace.yaxis) || trace.geo;\n};\n\n// is trace in given list of subplots?\n// does handle splom case\nexports.isTraceInSubplots = function isTraceInSubplots(trace, subplots) {\n    if(trace.type === 'splom') {\n        var xaxes = trace.xaxes || [];\n        var yaxes = trace.yaxes || [];\n        for(var i = 0; i < xaxes.length; i++) {\n            for(var j = 0; j < yaxes.length; j++) {\n                if(subplots.indexOf(xaxes[i] + yaxes[j]) !== -1) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    return subplots.indexOf(exports.getSubplot(trace)) !== -1;\n};\n\n// convenience functions for mapping all relevant axes\nexports.flat = function flat(subplots, v) {\n    var out = new Array(subplots.length);\n    for(var i = 0; i < subplots.length; i++) {\n        out[i] = v;\n    }\n    return out;\n};\n\nexports.p2c = function p2c(axArray, v) {\n    var out = new Array(axArray.length);\n    for(var i = 0; i < axArray.length; i++) {\n        out[i] = axArray[i].p2c(v);\n    }\n    return out;\n};\n\nexports.getDistanceFunction = function getDistanceFunction(mode, dx, dy, dxy) {\n    if(mode === 'closest') return dxy || exports.quadrature(dx, dy);\n    return mode === 'x' ? dx : dy;\n};\n\nexports.getClosest = function getClosest(cd, distfn, pointData) {\n    // do we already have a point number? (array mode only)\n    if(pointData.index !== false) {\n        if(pointData.index >= 0 && pointData.index < cd.length) {\n            pointData.distance = 0;\n        } else pointData.index = false;\n    } else {\n        // apply the distance function to each data point\n        // this is the longest loop... if this bogs down, we may need\n        // to create pre-sorted data (by x or y), not sure how to\n        // do this for 'closest'\n        for(var i = 0; i < cd.length; i++) {\n            var newDistance = distfn(cd[i]);\n            if(newDistance <= pointData.distance) {\n                pointData.index = i;\n                pointData.distance = newDistance;\n            }\n        }\n    }\n    return pointData;\n};\n\n/*\n * pseudo-distance function for hover effects on areas: inside the region\n * distance is finite (`passVal`), outside it's Infinity.\n *\n * @param {number} v0: signed difference between the current position and the left edge\n * @param {number} v1: signed difference between the current position and the right edge\n * @param {number} passVal: the value to return on success\n */\nexports.inbox = function inbox(v0, v1, passVal) {\n    return (v0 * v1 < 0 || v0 === 0) ? passVal : Infinity;\n};\n\nexports.quadrature = function quadrature(dx, dy) {\n    return function(di) {\n        var x = dx(di);\n        var y = dy(di);\n        return Math.sqrt(x * x + y * y);\n    };\n};\n\n/** Fill event data point object for hover and selection.\n *  Invokes _module.eventData if present.\n *\n * N.B. note that point 'index' corresponds to input data array index\n *  whereas 'number' is its post-transform version.\n *\n * If the hovered/selected pt corresponds to an multiple input points\n * (e.g. for histogram and transformed traces), 'pointNumbers` and 'pointIndices'\n * are include in the event data.\n *\n * @param {object} pt\n * @param {object} trace\n * @param {object} cd\n * @return {object}\n */\nexports.makeEventData = function makeEventData(pt, trace, cd) {\n    // hover uses 'index', select uses 'pointNumber'\n    var pointNumber = 'index' in pt ? pt.index : pt.pointNumber;\n\n    var out = {\n        data: trace._input,\n        fullData: trace,\n        curveNumber: trace.index,\n        pointNumber: pointNumber\n    };\n\n    if(trace._indexToPoints) {\n        var pointIndices = trace._indexToPoints[pointNumber];\n\n        if(pointIndices.length === 1) {\n            out.pointIndex = pointIndices[0];\n        } else {\n            out.pointIndices = pointIndices;\n        }\n    } else {\n        out.pointIndex = pointNumber;\n    }\n\n    if(trace._module.eventData) {\n        out = trace._module.eventData(out, pt, trace, cd, pointNumber);\n    } else {\n        if('xVal' in pt) out.x = pt.xVal;\n        else if('x' in pt) out.x = pt.x;\n\n        if('yVal' in pt) out.y = pt.yVal;\n        else if('y' in pt) out.y = pt.y;\n\n        if(pt.xa) out.xaxis = pt.xa;\n        if(pt.ya) out.yaxis = pt.ya;\n        if(pt.zLabelVal !== undefined) out.z = pt.zLabelVal;\n    }\n\n    exports.appendArrayPointValue(out, trace, pointNumber);\n\n    return out;\n};\n\n/** Appends values inside array attributes corresponding to given point number\n *\n * @param {object} pointData : point data object (gets mutated here)\n * @param {object} trace : full trace object\n * @param {number|Array(number)} pointNumber : point number. May be a length-2 array\n *     [row, col] to dig into 2D arrays\n */\nexports.appendArrayPointValue = function(pointData, trace, pointNumber) {\n    var arrayAttrs = trace._arrayAttrs;\n\n    if(!arrayAttrs) {\n        return;\n    }\n\n    for(var i = 0; i < arrayAttrs.length; i++) {\n        var astr = arrayAttrs[i];\n        var key = getPointKey(astr);\n\n        if(pointData[key] === undefined) {\n            var val = Lib.nestedProperty(trace, astr).get();\n            var pointVal = getPointData(val, pointNumber);\n\n            if(pointVal !== undefined) pointData[key] = pointVal;\n        }\n    }\n};\n\n/**\n * Appends values inside array attributes corresponding to given point number array\n * For use when pointData references a plot entity that arose (or potentially arose)\n * from multiple points in the input data\n *\n * @param {object} pointData : point data object (gets mutated here)\n * @param {object} trace : full trace object\n * @param {Array(number)|Array(Array(number))} pointNumbers : Array of point numbers.\n *     Each entry in the array may itself be a length-2 array [row, col] to dig into 2D arrays\n */\nexports.appendArrayMultiPointValues = function(pointData, trace, pointNumbers) {\n    var arrayAttrs = trace._arrayAttrs;\n\n    if(!arrayAttrs) {\n        return;\n    }\n\n    for(var i = 0; i < arrayAttrs.length; i++) {\n        var astr = arrayAttrs[i];\n        var key = getPointKey(astr);\n\n        if(pointData[key] === undefined) {\n            var val = Lib.nestedProperty(trace, astr).get();\n            var keyVal = new Array(pointNumbers.length);\n\n            for(var j = 0; j < pointNumbers.length; j++) {\n                keyVal[j] = getPointData(val, pointNumbers[j]);\n            }\n            pointData[key] = keyVal;\n        }\n    }\n};\n\nvar pointKeyMap = {\n    ids: 'id',\n    locations: 'location',\n    labels: 'label',\n    values: 'value',\n    'marker.colors': 'color',\n    parents: 'parent'\n};\n\nfunction getPointKey(astr) {\n    return pointKeyMap[astr] || astr;\n}\n\nfunction getPointData(val, pointNumber) {\n    if(Array.isArray(pointNumber)) {\n        if(Array.isArray(val) && Array.isArray(val[pointNumber[0]])) {\n            return val[pointNumber[0]][pointNumber[1]];\n        }\n    } else {\n        return val[pointNumber];\n    }\n}\n\n},{\"../../lib\":703}],616:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Lib = _dereq_('../../lib');\nvar Events = _dereq_('../../lib/events');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar overrideCursor = _dereq_('../../lib/override_cursor');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\nvar dragElement = _dereq_('../dragelement');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Registry = _dereq_('../../registry');\n\nvar helpers = _dereq_('./helpers');\nvar constants = _dereq_('./constants');\n\n// hover labels for multiple horizontal bars get tilted by some angle,\n// then need to be offset differently if they overlap\nvar YANGLE = constants.YANGLE;\nvar YA_RADIANS = Math.PI * YANGLE / 180;\n\n// expansion of projected height\nvar YFACTOR = 1 / Math.sin(YA_RADIANS);\n\n// to make the appropriate post-rotation x offset,\n// you need both x and y offsets\nvar YSHIFTX = Math.cos(YA_RADIANS);\nvar YSHIFTY = Math.sin(YA_RADIANS);\n\n// size and display constants for hover text\nvar HOVERARROWSIZE = constants.HOVERARROWSIZE;\nvar HOVERTEXTPAD = constants.HOVERTEXTPAD;\n\n// fx.hover: highlight data on hover\n// evt can be a mousemove event, or an object with data about what points\n//   to hover on\n//      {xpx,ypx[,hovermode]} - pixel locations from top left\n//          (with optional overriding hovermode)\n//      {xval,yval[,hovermode]} - data values\n//      [{curveNumber,(pointNumber|xval and/or yval)}] -\n//              array of specific points to highlight\n//          pointNumber is a single integer if gd.data[curveNumber] is 1D,\n//              or a two-element array if it's 2D\n//          xval and yval are data values,\n//              1D data may specify either or both,\n//              2D data must specify both\n// subplot is an id string (default \"xy\")\n// makes use of gl.hovermode, which can be:\n//      x (find the points with the closest x values, ie a column),\n//      closest (find the single closest point)\n//    internally there are two more that occasionally get used:\n//      y (pick out a row - only used for multiple horizontal bar charts)\n//      array (used when the user specifies an explicit\n//          array of points to hover on)\n//\n// We wrap the hovers in a timer, to limit their frequency.\n// The actual rendering is done by private function _hover.\nexports.hover = function hover(gd, evt, subplot, noHoverEvent) {\n    gd = Lib.getGraphDiv(gd);\n\n    Lib.throttle(\n        gd._fullLayout._uid + constants.HOVERID,\n        constants.HOVERMINTIME,\n        function() { _hover(gd, evt, subplot, noHoverEvent); }\n    );\n};\n\n/*\n * Draw a single hover item or an array of hover item in a pre-existing svg container somewhere\n * hoverItem should have keys:\n *    - x and y (or x0, x1, y0, and y1):\n *      the pixel position to mark, relative to opts.container\n *    - xLabel, yLabel, zLabel, text, and name:\n *      info to go in the label\n *    - color:\n *      the background color for the label.\n *    - idealAlign (optional):\n *      'left' or 'right' for which side of the x/y box to try to put this on first\n *    - borderColor (optional):\n *      color for the border, defaults to strongest contrast with color\n *    - fontFamily (optional):\n *      string, the font for this label, defaults to constants.HOVERFONT\n *    - fontSize (optional):\n *      the label font size, defaults to constants.HOVERFONTSIZE\n *    - fontColor (optional):\n *      defaults to borderColor\n * opts should have keys:\n *    - bgColor:\n *      the background color this is against, used if the trace is\n *      non-opaque, and for the name, which goes outside the box\n *    - container:\n *      a <svg> or <g> element to add the hover label to\n *    - outerContainer:\n *      normally a parent of `container`, sets the bounding box to use to\n *      constrain the hover label and determine whether to show it on the left or right\n * opts can have optional keys:\n *    - anchorIndex:\n        the index of the hover item used as an anchor for positioning.\n        The other hover items will be pushed up or down to prevent overlap.\n */\nexports.loneHover = function loneHover(hoverItems, opts) {\n    var multiHover = true;\n    if(!Array.isArray(hoverItems)) {\n        multiHover = false;\n        hoverItems = [hoverItems];\n    }\n\n    var pointsData = hoverItems.map(function(hoverItem) {\n        return {\n            color: hoverItem.color || Color.defaultLine,\n            x0: hoverItem.x0 || hoverItem.x || 0,\n            x1: hoverItem.x1 || hoverItem.x || 0,\n            y0: hoverItem.y0 || hoverItem.y || 0,\n            y1: hoverItem.y1 || hoverItem.y || 0,\n            xLabel: hoverItem.xLabel,\n            yLabel: hoverItem.yLabel,\n            zLabel: hoverItem.zLabel,\n            text: hoverItem.text,\n            name: hoverItem.name,\n            idealAlign: hoverItem.idealAlign,\n\n            // optional extra bits of styling\n            borderColor: hoverItem.borderColor,\n            fontFamily: hoverItem.fontFamily,\n            fontSize: hoverItem.fontSize,\n            fontColor: hoverItem.fontColor,\n            nameLength: hoverItem.nameLength,\n            textAlign: hoverItem.textAlign,\n\n            // filler to make createHoverText happy\n            trace: hoverItem.trace || {\n                index: 0,\n                hoverinfo: ''\n            },\n            xa: {_offset: 0},\n            ya: {_offset: 0},\n            index: 0,\n\n            hovertemplate: hoverItem.hovertemplate || false,\n            eventData: hoverItem.eventData || false,\n            hovertemplateLabels: hoverItem.hovertemplateLabels || false,\n        };\n    });\n\n    var container3 = d3.select(opts.container);\n    var outerContainer3 = opts.outerContainer ? d3.select(opts.outerContainer) : container3;\n\n    var fullOpts = {\n        hovermode: 'closest',\n        rotateLabels: false,\n        bgColor: opts.bgColor || Color.background,\n        container: container3,\n        outerContainer: outerContainer3\n    };\n\n    var hoverLabel = createHoverText(pointsData, fullOpts, opts.gd);\n\n    // Fix vertical overlap\n    var tooltipSpacing = 5;\n    var lastBottomY = 0;\n    var anchor = 0;\n    hoverLabel\n        .sort(function(a, b) {return a.y0 - b.y0;})\n        .each(function(d, i) {\n            var topY = d.y0 - d.by / 2;\n\n            if((topY - tooltipSpacing) < lastBottomY) {\n                d.offset = (lastBottomY - topY) + tooltipSpacing;\n            } else {\n                d.offset = 0;\n            }\n\n            lastBottomY = topY + d.by + d.offset;\n\n            if(i === opts.anchorIndex || 0) anchor = d.offset;\n        })\n        .each(function(d) {\n            d.offset -= anchor;\n        });\n\n    alignHoverText(hoverLabel, fullOpts.rotateLabels);\n\n    return multiHover ? hoverLabel : hoverLabel.node();\n};\n\n// The actual implementation is here:\nfunction _hover(gd, evt, subplot, noHoverEvent) {\n    if(!subplot) subplot = 'xy';\n\n    // if the user passed in an array of subplots,\n    // use those instead of finding overlayed plots\n    var subplots = Array.isArray(subplot) ? subplot : [subplot];\n\n    var fullLayout = gd._fullLayout;\n    var plots = fullLayout._plots || [];\n    var plotinfo = plots[subplot];\n    var hasCartesian = fullLayout._has('cartesian');\n\n    // list of all overlaid subplots to look at\n    if(plotinfo) {\n        var overlayedSubplots = plotinfo.overlays.map(function(pi) {\n            return pi.id;\n        });\n\n        subplots = subplots.concat(overlayedSubplots);\n    }\n\n    var len = subplots.length;\n    var xaArray = new Array(len);\n    var yaArray = new Array(len);\n    var supportsCompare = false;\n\n    for(var i = 0; i < len; i++) {\n        var spId = subplots[i];\n\n        // 'cartesian' case\n        var plotObj = plots[spId];\n        if(plotObj) {\n            supportsCompare = true;\n\n            // TODO make sure that fullLayout_plots axis refs\n            // get updated properly so that we don't have\n            // to use Axes.getFromId in general.\n\n            xaArray[i] = Axes.getFromId(gd, plotObj.xaxis._id);\n            yaArray[i] = Axes.getFromId(gd, plotObj.yaxis._id);\n            continue;\n        }\n\n        // other subplot types\n        var _subplot = fullLayout[spId]._subplot;\n        xaArray[i] = _subplot.xaxis;\n        yaArray[i] = _subplot.yaxis;\n    }\n\n    var hovermode = evt.hovermode || fullLayout.hovermode;\n\n    if(hovermode && !supportsCompare) hovermode = 'closest';\n\n    if(['x', 'y', 'closest'].indexOf(hovermode) === -1 || !gd.calcdata ||\n            gd.querySelector('.zoombox') || gd._dragging) {\n        return dragElement.unhoverRaw(gd, evt);\n    }\n\n    var hoverdistance = fullLayout.hoverdistance === -1 ? Infinity : fullLayout.hoverdistance;\n    var spikedistance = fullLayout.spikedistance === -1 ? Infinity : fullLayout.spikedistance;\n\n    // hoverData: the set of candidate points we've found to highlight\n    var hoverData = [];\n\n    // searchData: the data to search in. Mostly this is just a copy of\n    // gd.calcdata, filtered to the subplot and overlays we're on\n    // but if a point array is supplied it will be a mapping\n    // of indicated curves\n    var searchData = [];\n\n    // [x|y]valArray: the axis values of the hover event\n    // mapped onto each of the currently selected overlaid subplots\n    var xvalArray, yvalArray;\n\n    var itemnum, curvenum, cd, trace, subplotId, subploti, mode,\n        xval, yval, pointData, closedataPreviousLength;\n\n    // spikePoints: the set of candidate points we've found to draw spikes to\n    var spikePoints = {\n        hLinePoint: null,\n        vLinePoint: null\n    };\n\n    // does subplot have one (or more) horizontal traces?\n    // This is used to determine whether we rotate the labels or not\n    var hasOneHorizontalTrace = false;\n\n    // Figure out what we're hovering on:\n    // mouse location or user-supplied data\n\n    if(Array.isArray(evt)) {\n        // user specified an array of points to highlight\n        hovermode = 'array';\n        for(itemnum = 0; itemnum < evt.length; itemnum++) {\n            cd = gd.calcdata[evt[itemnum].curveNumber || 0];\n            if(cd) {\n                trace = cd[0].trace;\n                if(cd[0].trace.hoverinfo !== 'skip') {\n                    searchData.push(cd);\n                    if(trace.orientation === 'h') {\n                        hasOneHorizontalTrace = true;\n                    }\n                }\n            }\n        }\n    } else {\n        for(curvenum = 0; curvenum < gd.calcdata.length; curvenum++) {\n            cd = gd.calcdata[curvenum];\n            trace = cd[0].trace;\n            if(trace.hoverinfo !== 'skip' && helpers.isTraceInSubplots(trace, subplots)) {\n                searchData.push(cd);\n                if(trace.orientation === 'h') {\n                    hasOneHorizontalTrace = true;\n                }\n            }\n        }\n\n        // [x|y]px: the pixels (from top left) of the mouse location\n        // on the currently selected plot area\n        // add pointerX|Y property for drawing the spikes in spikesnap 'cursor' situation\n        var hasUserCalledHover = !evt.target;\n        var xpx, ypx;\n\n        if(hasUserCalledHover) {\n            if('xpx' in evt) xpx = evt.xpx;\n            else xpx = xaArray[0]._length / 2;\n\n            if('ypx' in evt) ypx = evt.ypx;\n            else ypx = yaArray[0]._length / 2;\n        } else {\n            // fire the beforehover event and quit if it returns false\n            // note that we're only calling this on real mouse events, so\n            // manual calls to fx.hover will always run.\n            if(Events.triggerHandler(gd, 'plotly_beforehover', evt) === false) {\n                return;\n            }\n\n            var dbb = evt.target.getBoundingClientRect();\n\n            xpx = evt.clientX - dbb.left;\n            ypx = evt.clientY - dbb.top;\n\n            // in case hover was called from mouseout into hovertext,\n            // it's possible you're not actually over the plot anymore\n            if(xpx < 0 || xpx > xaArray[0]._length || ypx < 0 || ypx > yaArray[0]._length) {\n                return dragElement.unhoverRaw(gd, evt);\n            }\n        }\n\n        evt.pointerX = xpx + xaArray[0]._offset;\n        evt.pointerY = ypx + yaArray[0]._offset;\n\n        if('xval' in evt) xvalArray = helpers.flat(subplots, evt.xval);\n        else xvalArray = helpers.p2c(xaArray, xpx);\n\n        if('yval' in evt) yvalArray = helpers.flat(subplots, evt.yval);\n        else yvalArray = helpers.p2c(yaArray, ypx);\n\n        if(!isNumeric(xvalArray[0]) || !isNumeric(yvalArray[0])) {\n            Lib.warn('Fx.hover failed', evt, gd);\n            return dragElement.unhoverRaw(gd, evt);\n        }\n    }\n\n    // the pixel distance to beat as a matching point\n    // in 'x' or 'y' mode this resets for each trace\n    var distance = Infinity;\n\n    // find the closest point in each trace\n    // this is minimum dx and/or dy, depending on mode\n    // and the pixel position for the label (labelXpx, labelYpx)\n    for(curvenum = 0; curvenum < searchData.length; curvenum++) {\n        cd = searchData[curvenum];\n\n        // filter out invisible or broken data\n        if(!cd || !cd[0] || !cd[0].trace) continue;\n\n        trace = cd[0].trace;\n\n        if(trace.visible !== true || trace._length === 0) continue;\n\n        // Explicitly bail out for these two. I don't know how to otherwise prevent\n        // the rest of this function from running and failing\n        if(['carpet', 'contourcarpet'].indexOf(trace._module.name) !== -1) continue;\n\n        if(trace.type === 'splom') {\n            // splom traces do not generate overlay subplots,\n            // it is safe to assume here splom traces correspond to the 0th subplot\n            subploti = 0;\n            subplotId = subplots[subploti];\n        } else {\n            subplotId = helpers.getSubplot(trace);\n            subploti = subplots.indexOf(subplotId);\n        }\n\n        // within one trace mode can sometimes be overridden\n        mode = hovermode;\n\n        // container for new point, also used to pass info into module.hoverPoints\n        pointData = {\n            // trace properties\n            cd: cd,\n            trace: trace,\n            xa: xaArray[subploti],\n            ya: yaArray[subploti],\n\n            // max distances for hover and spikes - for points that want to show but do not\n            // want to override other points, set distance/spikeDistance equal to max*Distance\n            // and it will not get filtered out but it will be guaranteed to have a greater\n            // distance than any point that calculated a real distance.\n            maxHoverDistance: hoverdistance,\n            maxSpikeDistance: spikedistance,\n\n            // point properties - override all of these\n            index: false, // point index in trace - only used by plotly.js hoverdata consumers\n            distance: Math.min(distance, hoverdistance), // pixel distance or pseudo-distance\n\n            // distance/pseudo-distance for spikes. This distance should always be calculated\n            // as if in \"closest\" mode, and should only be set if this point should\n            // generate a spike.\n            spikeDistance: Infinity,\n\n            // in some cases the spikes have different positioning from the hover label\n            // they don't need x0/x1, just one position\n            xSpike: undefined,\n            ySpike: undefined,\n\n            // where and how to display the hover label\n            color: Color.defaultLine, // trace color\n            name: trace.name,\n            x0: undefined,\n            x1: undefined,\n            y0: undefined,\n            y1: undefined,\n            xLabelVal: undefined,\n            yLabelVal: undefined,\n            zLabelVal: undefined,\n            text: undefined\n        };\n\n        // add ref to subplot object (non-cartesian case)\n        if(fullLayout[subplotId]) {\n            pointData.subplot = fullLayout[subplotId]._subplot;\n        }\n        // add ref to splom scene\n        if(fullLayout._splomScenes && fullLayout._splomScenes[trace.uid]) {\n            pointData.scene = fullLayout._splomScenes[trace.uid];\n        }\n\n        closedataPreviousLength = hoverData.length;\n\n        // for a highlighting array, figure out what\n        // we're searching for with this element\n        if(mode === 'array') {\n            var selection = evt[curvenum];\n            if('pointNumber' in selection) {\n                pointData.index = selection.pointNumber;\n                mode = 'closest';\n            } else {\n                mode = '';\n                if('xval' in selection) {\n                    xval = selection.xval;\n                    mode = 'x';\n                }\n                if('yval' in selection) {\n                    yval = selection.yval;\n                    mode = mode ? 'closest' : 'y';\n                }\n            }\n        } else {\n            xval = xvalArray[subploti];\n            yval = yvalArray[subploti];\n        }\n\n        // Now if there is range to look in, find the points to hover.\n        if(hoverdistance !== 0) {\n            if(trace._module && trace._module.hoverPoints) {\n                var newPoints = trace._module.hoverPoints(pointData, xval, yval, mode, fullLayout._hoverlayer);\n                if(newPoints) {\n                    var newPoint;\n                    for(var newPointNum = 0; newPointNum < newPoints.length; newPointNum++) {\n                        newPoint = newPoints[newPointNum];\n                        if(isNumeric(newPoint.x0) && isNumeric(newPoint.y0)) {\n                            hoverData.push(cleanPoint(newPoint, hovermode));\n                        }\n                    }\n                }\n            } else {\n                Lib.log('Unrecognized trace type in hover:', trace);\n            }\n        }\n\n        // in closest mode, remove any existing (farther) points\n        // and don't look any farther than this latest point (or points, some\n        // traces like box & violin make multiple hover labels at once)\n        if(hovermode === 'closest' && hoverData.length > closedataPreviousLength) {\n            hoverData.splice(0, closedataPreviousLength);\n            distance = hoverData[0].distance;\n        }\n\n        // Now if there is range to look in, find the points to draw the spikelines\n        // Do it only if there is no hoverData\n        if(hasCartesian && (spikedistance !== 0)) {\n            if(hoverData.length === 0) {\n                pointData.distance = spikedistance;\n                pointData.index = false;\n                var closestPoints = trace._module.hoverPoints(pointData, xval, yval, 'closest', fullLayout._hoverlayer);\n                if(closestPoints) {\n                    closestPoints = closestPoints.filter(function(point) {\n                        // some hover points, like scatter fills, do not allow spikes,\n                        // so will generate a hover point but without a valid spikeDistance\n                        return point.spikeDistance <= spikedistance;\n                    });\n                }\n                if(closestPoints && closestPoints.length) {\n                    var tmpPoint;\n                    var closestVPoints = closestPoints.filter(function(point) {\n                        return point.xa.showspikes;\n                    });\n                    if(closestVPoints.length) {\n                        var closestVPt = closestVPoints[0];\n                        if(isNumeric(closestVPt.x0) && isNumeric(closestVPt.y0)) {\n                            tmpPoint = fillSpikePoint(closestVPt);\n                            if(!spikePoints.vLinePoint || (spikePoints.vLinePoint.spikeDistance > tmpPoint.spikeDistance)) {\n                                spikePoints.vLinePoint = tmpPoint;\n                            }\n                        }\n                    }\n\n                    var closestHPoints = closestPoints.filter(function(point) {\n                        return point.ya.showspikes;\n                    });\n                    if(closestHPoints.length) {\n                        var closestHPt = closestHPoints[0];\n                        if(isNumeric(closestHPt.x0) && isNumeric(closestHPt.y0)) {\n                            tmpPoint = fillSpikePoint(closestHPt);\n                            if(!spikePoints.hLinePoint || (spikePoints.hLinePoint.spikeDistance > tmpPoint.spikeDistance)) {\n                                spikePoints.hLinePoint = tmpPoint;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    function selectClosestPoint(pointsData, spikedistance) {\n        var resultPoint = null;\n        var minDistance = Infinity;\n        var thisSpikeDistance;\n        for(var i = 0; i < pointsData.length; i++) {\n            thisSpikeDistance = pointsData[i].spikeDistance;\n            if(thisSpikeDistance < minDistance && thisSpikeDistance <= spikedistance) {\n                resultPoint = pointsData[i];\n                minDistance = thisSpikeDistance;\n            }\n        }\n        return resultPoint;\n    }\n\n    function fillSpikePoint(point) {\n        if(!point) return null;\n        return {\n            xa: point.xa,\n            ya: point.ya,\n            x: point.xSpike !== undefined ? point.xSpike : (point.x0 + point.x1) / 2,\n            y: point.ySpike !== undefined ? point.ySpike : (point.y0 + point.y1) / 2,\n            distance: point.distance,\n            spikeDistance: point.spikeDistance,\n            curveNumber: point.trace.index,\n            color: point.color,\n            pointNumber: point.index\n        };\n    }\n\n    var spikelineOpts = {\n        fullLayout: fullLayout,\n        container: fullLayout._hoverlayer,\n        outerContainer: fullLayout._paperdiv,\n        event: evt\n    };\n    var oldspikepoints = gd._spikepoints;\n    var newspikepoints = {\n        vLinePoint: spikePoints.vLinePoint,\n        hLinePoint: spikePoints.hLinePoint\n    };\n    gd._spikepoints = newspikepoints;\n\n    // Now if it is not restricted by spikedistance option, set the points to draw the spikelines\n    if(hasCartesian && (spikedistance !== 0)) {\n        if(hoverData.length !== 0) {\n            var tmpHPointData = hoverData.filter(function(point) {\n                return point.ya.showspikes;\n            });\n            var tmpHPoint = selectClosestPoint(tmpHPointData, spikedistance);\n            spikePoints.hLinePoint = fillSpikePoint(tmpHPoint);\n\n            var tmpVPointData = hoverData.filter(function(point) {\n                return point.xa.showspikes;\n            });\n            var tmpVPoint = selectClosestPoint(tmpVPointData, spikedistance);\n            spikePoints.vLinePoint = fillSpikePoint(tmpVPoint);\n        }\n    }\n\n    // if hoverData is empty check for the spikes to draw and quit if there are none\n    if(hoverData.length === 0) {\n        var result = dragElement.unhoverRaw(gd, evt);\n        if(hasCartesian && ((spikePoints.hLinePoint !== null) || (spikePoints.vLinePoint !== null))) {\n            if(spikesChanged(oldspikepoints)) {\n                createSpikelines(spikePoints, spikelineOpts);\n            }\n        }\n        return result;\n    }\n\n    if(hasCartesian) {\n        if(spikesChanged(oldspikepoints)) {\n            createSpikelines(spikePoints, spikelineOpts);\n        }\n    }\n\n    hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; });\n\n    // lastly, emit custom hover/unhover events\n    var oldhoverdata = gd._hoverdata;\n    var newhoverdata = [];\n\n    // pull out just the data that's useful to\n    // other people and send it to the event\n    for(itemnum = 0; itemnum < hoverData.length; itemnum++) {\n        var pt = hoverData[itemnum];\n        var eventData = helpers.makeEventData(pt, pt.trace, pt.cd);\n\n        if(pt.hovertemplate !== false) {\n            var ht = false;\n            if(pt.cd[pt.index] && pt.cd[pt.index].ht) {\n                ht = pt.cd[pt.index].ht;\n            }\n            pt.hovertemplate = ht || pt.trace.hovertemplate || false;\n        }\n\n        pt.eventData = [eventData];\n        newhoverdata.push(eventData);\n    }\n\n    gd._hoverdata = newhoverdata;\n\n    var rotateLabels = (\n        (hovermode === 'y' && (searchData.length > 1 || hoverData.length > 1)) ||\n        (hovermode === 'closest' && hasOneHorizontalTrace && hoverData.length > 1)\n    );\n\n    var bgColor = Color.combine(\n        fullLayout.plot_bgcolor || Color.background,\n        fullLayout.paper_bgcolor\n    );\n\n    var labelOpts = {\n        hovermode: hovermode,\n        rotateLabels: rotateLabels,\n        bgColor: bgColor,\n        container: fullLayout._hoverlayer,\n        outerContainer: fullLayout._paperdiv,\n        commonLabelOpts: fullLayout.hoverlabel,\n        hoverdistance: fullLayout.hoverdistance\n    };\n\n    var hoverLabels = createHoverText(hoverData, labelOpts, gd);\n\n    hoverAvoidOverlaps(hoverLabels, rotateLabels ? 'xa' : 'ya', fullLayout);\n\n    alignHoverText(hoverLabels, rotateLabels);\n\n    // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true\n    // we should improve the \"fx\" API so other plots can use it without these hack.\n    if(evt.target && evt.target.tagName) {\n        var hasClickToShow = Registry.getComponentMethod('annotations', 'hasClickToShow')(gd, newhoverdata);\n        overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : '');\n    }\n\n    // don't emit events if called manually\n    if(!evt.target || noHoverEvent || !hoverChanged(gd, evt, oldhoverdata)) return;\n\n    if(oldhoverdata) {\n        gd.emit('plotly_unhover', {\n            event: evt,\n            points: oldhoverdata\n        });\n    }\n\n    gd.emit('plotly_hover', {\n        event: evt,\n        points: gd._hoverdata,\n        xaxes: xaArray,\n        yaxes: yaArray,\n        xvals: xvalArray,\n        yvals: yvalArray\n    });\n}\n\nvar EXTRA_STRING_REGEX = /<extra>([\\s\\S]*)<\\/extra>/;\n\nfunction createHoverText(hoverData, opts, gd) {\n    var fullLayout = gd._fullLayout;\n    var hovermode = opts.hovermode;\n    var rotateLabels = opts.rotateLabels;\n    var bgColor = opts.bgColor;\n    var container = opts.container;\n    var outerContainer = opts.outerContainer;\n    var commonLabelOpts = opts.commonLabelOpts || {};\n\n    // opts.fontFamily/Size are used for the common label\n    // and as defaults for each hover label, though the individual labels\n    // can override this.\n    var fontFamily = opts.fontFamily || constants.HOVERFONT;\n    var fontSize = opts.fontSize || constants.HOVERFONTSIZE;\n\n    var c0 = hoverData[0];\n    var xa = c0.xa;\n    var ya = c0.ya;\n    var commonAttr = hovermode === 'y' ? 'yLabel' : 'xLabel';\n    var t0 = c0[commonAttr];\n    var t00 = (String(t0) || '').split(' ')[0];\n    var outerContainerBB = outerContainer.node().getBoundingClientRect();\n    var outerTop = outerContainerBB.top;\n    var outerWidth = outerContainerBB.width;\n    var outerHeight = outerContainerBB.height;\n\n    // show the common label, if any, on the axis\n    // never show a common label in array mode,\n    // even if sometimes there could be one\n    var showCommonLabel = (\n        (t0 !== undefined) &&\n        (c0.distance <= opts.hoverdistance) &&\n        (hovermode === 'x' || hovermode === 'y')\n    );\n\n    // all hover traces hoverinfo must contain the hovermode\n    // to have common labels\n    if(showCommonLabel) {\n        var allHaveZ = true;\n        var i, traceHoverinfo;\n        for(i = 0; i < hoverData.length; i++) {\n            if(allHaveZ && hoverData[i].zLabel === undefined) allHaveZ = false;\n\n            traceHoverinfo = hoverData[i].hoverinfo || hoverData[i].trace.hoverinfo;\n            if(traceHoverinfo) {\n                var parts = Array.isArray(traceHoverinfo) ? traceHoverinfo : traceHoverinfo.split('+');\n                if(parts.indexOf('all') === -1 &&\n                    parts.indexOf(hovermode) === -1) {\n                    showCommonLabel = false;\n                    break;\n                }\n            }\n        }\n\n        // xyz labels put all info in their main label, so have no need of a common label\n        if(allHaveZ) showCommonLabel = false;\n    }\n\n    var commonLabel = container.selectAll('g.axistext')\n        .data(showCommonLabel ? [0] : []);\n    commonLabel.enter().append('g')\n        .classed('axistext', true);\n    commonLabel.exit().remove();\n\n    commonLabel.each(function() {\n        var label = d3.select(this);\n        var lpath = Lib.ensureSingle(label, 'path', '', function(s) {\n            s.style({'stroke-width': '1px'});\n        });\n        var ltext = Lib.ensureSingle(label, 'text', '', function(s) {\n            // prohibit tex interpretation until we can handle\n            // tex and regular text together\n            s.attr('data-notex', 1);\n        });\n\n        var commonBgColor = commonLabelOpts.bgcolor || Color.defaultLine;\n        var commonStroke = commonLabelOpts.bordercolor || Color.contrast(commonBgColor);\n        var contrastColor = Color.contrast(commonBgColor);\n\n        lpath.style({\n            fill: commonBgColor,\n            stroke: commonStroke\n        });\n\n        ltext.text(t0)\n            .call(Drawing.font,\n                commonLabelOpts.font.family || fontFamily,\n                commonLabelOpts.font.size || fontSize,\n                commonLabelOpts.font.color || contrastColor\n             )\n            .call(svgTextUtils.positionText, 0, 0)\n            .call(svgTextUtils.convertToTspans, gd);\n\n        label.attr('transform', '');\n\n        var tbb = ltext.node().getBoundingClientRect();\n        if(hovermode === 'x') {\n            ltext.attr('text-anchor', 'middle')\n                .call(svgTextUtils.positionText, 0, (xa.side === 'top' ?\n                    (outerTop - tbb.bottom - HOVERARROWSIZE - HOVERTEXTPAD) :\n                    (outerTop - tbb.top + HOVERARROWSIZE + HOVERTEXTPAD)));\n\n            var topsign = xa.side === 'top' ? '-' : '';\n            lpath.attr('d', 'M0,0' +\n                'L' + HOVERARROWSIZE + ',' + topsign + HOVERARROWSIZE +\n                'H' + (HOVERTEXTPAD + tbb.width / 2) +\n                'v' + topsign + (HOVERTEXTPAD * 2 + tbb.height) +\n                'H-' + (HOVERTEXTPAD + tbb.width / 2) +\n                'V' + topsign + HOVERARROWSIZE + 'H-' + HOVERARROWSIZE + 'Z');\n\n            label.attr('transform', 'translate(' +\n                (xa._offset + (c0.x0 + c0.x1) / 2) + ',' +\n                (ya._offset + (xa.side === 'top' ? 0 : ya._length)) + ')');\n        } else {\n            ltext.attr('text-anchor', ya.side === 'right' ? 'start' : 'end')\n                .call(svgTextUtils.positionText,\n                    (ya.side === 'right' ? 1 : -1) * (HOVERTEXTPAD + HOVERARROWSIZE),\n                    outerTop - tbb.top - tbb.height / 2);\n\n            var leftsign = ya.side === 'right' ? '' : '-';\n            lpath.attr('d', 'M0,0' +\n                'L' + leftsign + HOVERARROWSIZE + ',' + HOVERARROWSIZE +\n                'V' + (HOVERTEXTPAD + tbb.height / 2) +\n                'h' + leftsign + (HOVERTEXTPAD * 2 + tbb.width) +\n                'V-' + (HOVERTEXTPAD + tbb.height / 2) +\n                'H' + leftsign + HOVERARROWSIZE + 'V-' + HOVERARROWSIZE + 'Z');\n\n            label.attr('transform', 'translate(' +\n                (xa._offset + (ya.side === 'right' ? xa._length : 0)) + ',' +\n                (ya._offset + (c0.y0 + c0.y1) / 2) + ')');\n        }\n        // remove the \"close but not quite\" points\n        // because of error bars, only take up to a space\n        hoverData = hoverData.filter(function(d) {\n            return (d.zLabelVal !== undefined) ||\n                (d[commonAttr] || '').split(' ')[0] === t00;\n        });\n    });\n\n    // show all the individual labels\n\n\n    // first create the objects\n    var hoverLabels = container.selectAll('g.hovertext')\n        .data(hoverData, function(d) {\n            return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa, d.ya || ''].join(',');\n        });\n    hoverLabels.enter().append('g')\n        .classed('hovertext', true)\n        .each(function() {\n            var g = d3.select(this);\n            // trace name label (rect and text.name)\n            g.append('rect')\n                .call(Color.fill, Color.addOpacity(bgColor, 0.8));\n            g.append('text').classed('name', true);\n            // trace data label (path and text.nums)\n            g.append('path')\n                .style('stroke-width', '1px');\n            g.append('text').classed('nums', true)\n                .call(Drawing.font, fontFamily, fontSize);\n        });\n    hoverLabels.exit().remove();\n\n    // then put the text in, position the pointer to the data,\n    // and figure out sizes\n    hoverLabels.each(function(d) {\n        var g = d3.select(this).attr('transform', '');\n        var name = '';\n        var text = '';\n\n        // combine possible non-opaque trace color with bgColor\n        var color0 = d.bgcolor || d.color;\n        // color for 'nums' part of the label\n        var numsColor = Color.combine(\n            Color.opacity(color0) ? color0 : Color.defaultLine,\n            bgColor\n        );\n        // color for 'name' part of the label\n        var nameColor = Color.combine(\n            Color.opacity(d.color) ? d.color : Color.defaultLine,\n            bgColor\n        );\n        // find a contrasting color for border and text\n        var contrastColor = d.borderColor || Color.contrast(numsColor);\n\n        // to get custom 'name' labels pass cleanPoint\n        if(d.nameOverride !== undefined) d.name = d.nameOverride;\n\n        if(d.name) {\n            if(d.trace._meta) {\n                d.name = Lib.templateString(d.name, d.trace._meta);\n            }\n            name = plainText(d.name, d.nameLength);\n        }\n\n        if(d.zLabel !== undefined) {\n            if(d.xLabel !== undefined) text += 'x: ' + d.xLabel + '<br>';\n            if(d.yLabel !== undefined) text += 'y: ' + d.yLabel + '<br>';\n            text += (text ? 'z: ' : '') + d.zLabel;\n        } else if(showCommonLabel && d[hovermode + 'Label'] === t0) {\n            text = d[(hovermode === 'x' ? 'y' : 'x') + 'Label'] || '';\n        } else if(d.xLabel === undefined) {\n            if(d.yLabel !== undefined && d.trace.type !== 'scattercarpet') text = d.yLabel;\n        } else if(d.yLabel === undefined) text = d.xLabel;\n        else text = '(' + d.xLabel + ', ' + d.yLabel + ')';\n\n        if((d.text || d.text === 0) && !Array.isArray(d.text)) {\n            text += (text ? '<br>' : '') + d.text;\n        }\n\n        // used by other modules (initially just ternary) that\n        // manage their own hoverinfo independent of cleanPoint\n        // the rest of this will still apply, so such modules\n        // can still put things in (x|y|z)Label, text, and name\n        // and hoverinfo will still determine their visibility\n        if(d.extraText !== undefined) text += (text ? '<br>' : '') + d.extraText;\n\n        // if 'text' is empty at this point,\n        // and hovertemplate is not defined,\n        // put 'name' in main label and don't show secondary label\n        if(text === '' && !d.hovertemplate) {\n            // if 'name' is also empty, remove entire label\n            if(name === '') g.remove();\n            text = name;\n        }\n\n        // hovertemplate\n        var d3locale = fullLayout._d3locale;\n        var hovertemplate = d.hovertemplate || false;\n        var hovertemplateLabels = d.hovertemplateLabels || d;\n        var eventData = d.eventData[0] || {};\n        if(hovertemplate) {\n            text = Lib.hovertemplateString(\n                hovertemplate,\n                hovertemplateLabels,\n                d3locale,\n                eventData,\n                d.trace._meta\n            );\n\n            text = text.replace(EXTRA_STRING_REGEX, function(match, extra) {\n                // assign name for secondary text label\n                name = plainText(extra, d.nameLength);\n                // remove from main text label\n                return '';\n            });\n        }\n\n        // main label\n        var tx = g.select('text.nums')\n            .call(Drawing.font,\n                d.fontFamily || fontFamily,\n                d.fontSize || fontSize,\n                d.fontColor || contrastColor)\n            .text(text)\n            .attr('data-notex', 1)\n            .call(svgTextUtils.positionText, 0, 0)\n            .call(svgTextUtils.convertToTspans, gd);\n\n        var tx2 = g.select('text.name');\n        var tx2width = 0;\n        var tx2height = 0;\n\n        // secondary label for non-empty 'name'\n        if(name && name !== text) {\n            tx2.call(Drawing.font,\n                    d.fontFamily || fontFamily,\n                    d.fontSize || fontSize,\n                    nameColor)\n                .text(name)\n                .attr('data-notex', 1)\n                .call(svgTextUtils.positionText, 0, 0)\n                .call(svgTextUtils.convertToTspans, gd);\n\n            var t2bb = tx2.node().getBoundingClientRect();\n            tx2width = t2bb.width + 2 * HOVERTEXTPAD;\n            tx2height = t2bb.height + 2 * HOVERTEXTPAD;\n        } else {\n            tx2.remove();\n            g.select('rect').remove();\n        }\n\n        g.select('path').style({\n            fill: numsColor,\n            stroke: contrastColor\n        });\n\n        var tbb = tx.node().getBoundingClientRect();\n        var htx = d.xa._offset + (d.x0 + d.x1) / 2;\n        var hty = d.ya._offset + (d.y0 + d.y1) / 2;\n        var dx = Math.abs(d.x1 - d.x0);\n        var dy = Math.abs(d.y1 - d.y0);\n        var txTotalWidth = tbb.width + HOVERARROWSIZE + HOVERTEXTPAD + tx2width;\n        var anchorStartOK, anchorEndOK;\n\n        d.ty0 = outerTop - tbb.top;\n        d.bx = tbb.width + 2 * HOVERTEXTPAD;\n        d.by = Math.max(tbb.height + 2 * HOVERTEXTPAD, tx2height);\n        d.anchor = 'start';\n        d.txwidth = tbb.width;\n        d.tx2width = tx2width;\n        d.offset = 0;\n\n        if(rotateLabels) {\n            d.pos = htx;\n            anchorStartOK = hty + dy / 2 + txTotalWidth <= outerHeight;\n            anchorEndOK = hty - dy / 2 - txTotalWidth >= 0;\n            if((d.idealAlign === 'top' || !anchorStartOK) && anchorEndOK) {\n                hty -= dy / 2;\n                d.anchor = 'end';\n            } else if(anchorStartOK) {\n                hty += dy / 2;\n                d.anchor = 'start';\n            } else d.anchor = 'middle';\n        } else {\n            d.pos = hty;\n            anchorStartOK = htx + dx / 2 + txTotalWidth <= outerWidth;\n            anchorEndOK = htx - dx / 2 - txTotalWidth >= 0;\n\n            if((d.idealAlign === 'left' || !anchorStartOK) && anchorEndOK) {\n                htx -= dx / 2;\n                d.anchor = 'end';\n            } else if(anchorStartOK) {\n                htx += dx / 2;\n                d.anchor = 'start';\n            } else {\n                d.anchor = 'middle';\n\n                var txHalfWidth = txTotalWidth / 2;\n                var overflowR = htx + txHalfWidth - outerWidth;\n                var overflowL = htx - txHalfWidth;\n                if(overflowR > 0) htx -= overflowR;\n                if(overflowL < 0) htx += -overflowL;\n            }\n        }\n\n        tx.attr('text-anchor', d.anchor);\n        if(tx2width) tx2.attr('text-anchor', d.anchor);\n        g.attr('transform', 'translate(' + htx + ',' + hty + ')' +\n            (rotateLabels ? 'rotate(' + YANGLE + ')' : ''));\n    });\n\n    return hoverLabels;\n}\n\n// Make groups of touching points, and within each group\n// move each point so that no labels overlap, but the average\n// label position is the same as it was before moving. Indicentally,\n// this is equivalent to saying all the labels are on equal linear\n// springs about their initial position. Initially, each point is\n// its own group, but as we find overlaps we will clump the points.\n//\n// Also, there are hard constraints at the edges of the graphs,\n// that push all groups to the middle so they are visible. I don't\n// know what happens if the group spans all the way from one edge to\n// the other, though it hardly matters - there's just too much\n// information then.\nfunction hoverAvoidOverlaps(hoverLabels, ax, fullLayout) {\n    var nummoves = 0;\n    var axSign = 1;\n    var nLabels = hoverLabels.size();\n\n    // make groups of touching points\n    var pointgroups = new Array(nLabels);\n\n    hoverLabels.each(function(d, i) {\n        var axis = d[ax];\n        var axIsX = axis._id.charAt(0) === 'x';\n        var rng = axis.range;\n        if(!i && rng && ((rng[0] > rng[1]) !== axIsX)) axSign = -1;\n        pointgroups[i] = [{\n            datum: d,\n            i: i,\n            traceIndex: d.trace.index,\n            dp: 0,\n            pos: d.pos,\n            posref: d.posref,\n            size: d.by * (axIsX ? YFACTOR : 1) / 2,\n            pmin: 0,\n            pmax: (axIsX ? fullLayout.width : fullLayout.height)\n        }];\n    });\n\n    pointgroups.sort(function(a, b) {\n        return (a[0].posref - b[0].posref) ||\n            // for equal positions, sort trace indices increasing or decreasing\n            // depending on whether the axis is reversed or not... so stacked\n            // traces will generally keep their order even if one trace adds\n            // nothing to the stack.\n            (axSign * (b[0].traceIndex - a[0].traceIndex));\n    });\n\n    var donepositioning, topOverlap, bottomOverlap, i, j, pti, sumdp;\n\n    function constrainGroup(grp) {\n        var minPt = grp[0];\n        var maxPt = grp[grp.length - 1];\n\n        // overlap with the top - positive vals are overlaps\n        topOverlap = minPt.pmin - minPt.pos - minPt.dp + minPt.size;\n\n        // overlap with the bottom - positive vals are overlaps\n        bottomOverlap = maxPt.pos + maxPt.dp + maxPt.size - minPt.pmax;\n\n        // check for min overlap first, so that we always\n        // see the largest labels\n        // allow for .01px overlap, so we don't get an\n        // infinite loop from rounding errors\n        if(topOverlap > 0.01) {\n            for(j = grp.length - 1; j >= 0; j--) grp[j].dp += topOverlap;\n            donepositioning = false;\n        }\n        if(bottomOverlap < 0.01) return;\n        if(topOverlap < -0.01) {\n            // make sure we're not pushing back and forth\n            for(j = grp.length - 1; j >= 0; j--) grp[j].dp -= bottomOverlap;\n            donepositioning = false;\n        }\n        if(!donepositioning) return;\n\n        // no room to fix positioning, delete off-screen points\n\n        // first see how many points we need to delete\n        var deleteCount = 0;\n        for(i = 0; i < grp.length; i++) {\n            pti = grp[i];\n            if(pti.pos + pti.dp + pti.size > minPt.pmax) deleteCount++;\n        }\n\n        // start by deleting points whose data is off screen\n        for(i = grp.length - 1; i >= 0; i--) {\n            if(deleteCount <= 0) break;\n            pti = grp[i];\n\n            // pos has already been constrained to [pmin,pmax]\n            // so look for points close to that to delete\n            if(pti.pos > minPt.pmax - 1) {\n                pti.del = true;\n                deleteCount--;\n            }\n        }\n        for(i = 0; i < grp.length; i++) {\n            if(deleteCount <= 0) break;\n            pti = grp[i];\n\n            // pos has already been constrained to [pmin,pmax]\n            // so look for points close to that to delete\n            if(pti.pos < minPt.pmin + 1) {\n                pti.del = true;\n                deleteCount--;\n\n                // shift the whole group minus into this new space\n                bottomOverlap = pti.size * 2;\n                for(j = grp.length - 1; j >= 0; j--) grp[j].dp -= bottomOverlap;\n            }\n        }\n        // then delete points that go off the bottom\n        for(i = grp.length - 1; i >= 0; i--) {\n            if(deleteCount <= 0) break;\n            pti = grp[i];\n            if(pti.pos + pti.dp + pti.size > minPt.pmax) {\n                pti.del = true;\n                deleteCount--;\n            }\n        }\n    }\n\n    // loop through groups, combining them if they overlap,\n    // until nothing moves\n    while(!donepositioning && nummoves <= nLabels) {\n        // to avoid infinite loops, don't move more times\n        // than there are traces\n        nummoves++;\n\n        // assume nothing will move in this iteration,\n        // reverse this if it does\n        donepositioning = true;\n        i = 0;\n        while(i < pointgroups.length - 1) {\n            // the higher (g0) and lower (g1) point group\n            var g0 = pointgroups[i];\n            var g1 = pointgroups[i + 1];\n\n            // the lowest point in the higher group (p0)\n            // the highest point in the lower group (p1)\n            var p0 = g0[g0.length - 1];\n            var p1 = g1[0];\n            topOverlap = p0.pos + p0.dp + p0.size - p1.pos - p1.dp + p1.size;\n\n            // Only group points that lie on the same axes\n            if(topOverlap > 0.01 && (p0.pmin === p1.pmin) && (p0.pmax === p1.pmax)) {\n                // push the new point(s) added to this group out of the way\n                for(j = g1.length - 1; j >= 0; j--) g1[j].dp += topOverlap;\n\n                // add them to the group\n                g0.push.apply(g0, g1);\n                pointgroups.splice(i + 1, 1);\n\n                // adjust for minimum average movement\n                sumdp = 0;\n                for(j = g0.length - 1; j >= 0; j--) sumdp += g0[j].dp;\n                bottomOverlap = sumdp / g0.length;\n                for(j = g0.length - 1; j >= 0; j--) g0[j].dp -= bottomOverlap;\n                donepositioning = false;\n            } else i++;\n        }\n\n        // check if we're going off the plot on either side and fix\n        pointgroups.forEach(constrainGroup);\n    }\n\n    // now put these offsets into hoverData\n    for(i = pointgroups.length - 1; i >= 0; i--) {\n        var grp = pointgroups[i];\n        for(j = grp.length - 1; j >= 0; j--) {\n            var pt = grp[j];\n            var hoverPt = pt.datum;\n            hoverPt.offset = pt.dp;\n            hoverPt.del = pt.del;\n        }\n    }\n}\n\nfunction alignHoverText(hoverLabels, rotateLabels) {\n    // finally set the text positioning relative to the data and draw the\n    // box around it\n    hoverLabels.each(function(d) {\n        var g = d3.select(this);\n        if(d.del) return g.remove();\n\n        var tx = g.select('text.nums');\n        var anchor = d.anchor;\n        var horzSign = anchor === 'end' ? -1 : 1;\n        var alignShift = {start: 1, end: -1, middle: 0}[anchor];\n        var txx = alignShift * (HOVERARROWSIZE + HOVERTEXTPAD);\n        var tx2x = txx + alignShift * (d.txwidth + HOVERTEXTPAD);\n        var offsetX = 0;\n        var offsetY = d.offset;\n\n        if(anchor === 'middle') {\n            txx -= d.tx2width / 2;\n            tx2x += d.txwidth / 2 + HOVERTEXTPAD;\n        }\n        if(rotateLabels) {\n            offsetY *= -YSHIFTY;\n            offsetX = d.offset * YSHIFTX;\n        }\n\n        g.select('path').attr('d', anchor === 'middle' ?\n            // middle aligned: rect centered on data\n            ('M-' + (d.bx / 2 + d.tx2width / 2) + ',' + (offsetY - d.by / 2) +\n              'h' + d.bx + 'v' + d.by + 'h-' + d.bx + 'Z') :\n            // left or right aligned: side rect with arrow to data\n            ('M0,0L' + (horzSign * HOVERARROWSIZE + offsetX) + ',' + (HOVERARROWSIZE + offsetY) +\n                'v' + (d.by / 2 - HOVERARROWSIZE) +\n                'h' + (horzSign * d.bx) +\n                'v-' + d.by +\n                'H' + (horzSign * HOVERARROWSIZE + offsetX) +\n                'V' + (offsetY - HOVERARROWSIZE) +\n                'Z'));\n\n        var posX = txx + offsetX;\n        var posY = offsetY + d.ty0 - d.by / 2 + HOVERTEXTPAD;\n        var textAlign = d.textAlign || 'auto';\n\n        if(textAlign !== 'auto') {\n            if(textAlign === 'left' && anchor !== 'start') {\n                tx.attr('text-anchor', 'start');\n                posX = anchor === 'middle' ?\n                    -d.bx / 2 - d.tx2width / 2 + HOVERTEXTPAD :\n                    -d.bx - HOVERTEXTPAD;\n            } else if(textAlign === 'right' && anchor !== 'end') {\n                tx.attr('text-anchor', 'end');\n                posX = anchor === 'middle' ?\n                    d.bx / 2 - d.tx2width / 2 - HOVERTEXTPAD :\n                    d.bx + HOVERTEXTPAD;\n            }\n        }\n\n        tx.call(svgTextUtils.positionText, posX, posY);\n\n        if(d.tx2width) {\n            g.select('text.name')\n                .call(svgTextUtils.positionText,\n                    tx2x + alignShift * HOVERTEXTPAD + offsetX,\n                    offsetY + d.ty0 - d.by / 2 + HOVERTEXTPAD);\n            g.select('rect')\n                .call(Drawing.setRect,\n                    tx2x + (alignShift - 1) * d.tx2width / 2 + offsetX,\n                    offsetY - d.by / 2 - 1,\n                    d.tx2width, d.by + 2);\n        }\n    });\n}\n\nfunction cleanPoint(d, hovermode) {\n    var index = d.index;\n    var trace = d.trace || {};\n    var cd0 = d.cd[0];\n    var cd = d.cd[index] || {};\n\n    function pass(v) {\n        return v || (isNumeric(v) && v === 0);\n    }\n\n    var getVal = Array.isArray(index) ?\n        function(calcKey, traceKey) {\n            var v = Lib.castOption(cd0, index, calcKey);\n            return pass(v) ? v : Lib.extractOption({}, trace, '', traceKey);\n        } :\n        function(calcKey, traceKey) {\n            return Lib.extractOption(cd, trace, calcKey, traceKey);\n        };\n\n    function fill(key, calcKey, traceKey) {\n        var val = getVal(calcKey, traceKey);\n        if(pass(val)) d[key] = val;\n    }\n\n    fill('hoverinfo', 'hi', 'hoverinfo');\n    fill('bgcolor', 'hbg', 'hoverlabel.bgcolor');\n    fill('borderColor', 'hbc', 'hoverlabel.bordercolor');\n    fill('fontFamily', 'htf', 'hoverlabel.font.family');\n    fill('fontSize', 'hts', 'hoverlabel.font.size');\n    fill('fontColor', 'htc', 'hoverlabel.font.color');\n    fill('nameLength', 'hnl', 'hoverlabel.namelength');\n    fill('textAlign', 'hta', 'hoverlabel.align');\n\n    d.posref = (hovermode === 'y' || (hovermode === 'closest' && trace.orientation === 'h')) ?\n        (d.xa._offset + (d.x0 + d.x1) / 2) :\n        (d.ya._offset + (d.y0 + d.y1) / 2);\n\n    // then constrain all the positions to be on the plot\n    d.x0 = Lib.constrain(d.x0, 0, d.xa._length);\n    d.x1 = Lib.constrain(d.x1, 0, d.xa._length);\n    d.y0 = Lib.constrain(d.y0, 0, d.ya._length);\n    d.y1 = Lib.constrain(d.y1, 0, d.ya._length);\n\n    // and convert the x and y label values into formatted text\n    if(d.xLabelVal !== undefined) {\n        d.xLabel = ('xLabel' in d) ? d.xLabel : Axes.hoverLabelText(d.xa, d.xLabelVal);\n        d.xVal = d.xa.c2d(d.xLabelVal);\n    }\n    if(d.yLabelVal !== undefined) {\n        d.yLabel = ('yLabel' in d) ? d.yLabel : Axes.hoverLabelText(d.ya, d.yLabelVal);\n        d.yVal = d.ya.c2d(d.yLabelVal);\n    }\n\n    // Traces like heatmaps generate the zLabel in their hoverPoints function\n    if(d.zLabelVal !== undefined && d.zLabel === undefined) {\n        d.zLabel = String(d.zLabelVal);\n    }\n\n    // for box means and error bars, add the range to the label\n    if(!isNaN(d.xerr) && !(d.xa.type === 'log' && d.xerr <= 0)) {\n        var xeText = Axes.tickText(d.xa, d.xa.c2l(d.xerr), 'hover').text;\n        if(d.xerrneg !== undefined) {\n            d.xLabel += ' +' + xeText + ' / -' +\n                Axes.tickText(d.xa, d.xa.c2l(d.xerrneg), 'hover').text;\n        } else d.xLabel += ' ± ' + xeText;\n\n        // small distance penalty for error bars, so that if there are\n        // traces with errors and some without, the error bar label will\n        // hoist up to the point\n        if(hovermode === 'x') d.distance += 1;\n    }\n    if(!isNaN(d.yerr) && !(d.ya.type === 'log' && d.yerr <= 0)) {\n        var yeText = Axes.tickText(d.ya, d.ya.c2l(d.yerr), 'hover').text;\n        if(d.yerrneg !== undefined) {\n            d.yLabel += ' +' + yeText + ' / -' +\n                Axes.tickText(d.ya, d.ya.c2l(d.yerrneg), 'hover').text;\n        } else d.yLabel += ' ± ' + yeText;\n\n        if(hovermode === 'y') d.distance += 1;\n    }\n\n    var infomode = d.hoverinfo || d.trace.hoverinfo;\n\n    if(infomode && infomode !== 'all') {\n        infomode = Array.isArray(infomode) ? infomode : infomode.split('+');\n        if(infomode.indexOf('x') === -1) d.xLabel = undefined;\n        if(infomode.indexOf('y') === -1) d.yLabel = undefined;\n        if(infomode.indexOf('z') === -1) d.zLabel = undefined;\n        if(infomode.indexOf('text') === -1) d.text = undefined;\n        if(infomode.indexOf('name') === -1) d.name = undefined;\n    }\n\n    return d;\n}\n\nfunction createSpikelines(closestPoints, opts) {\n    var container = opts.container;\n    var fullLayout = opts.fullLayout;\n    var evt = opts.event;\n    var showY = !!closestPoints.hLinePoint;\n    var showX = !!closestPoints.vLinePoint;\n\n    var xa, ya;\n\n    // Remove old spikeline items\n    container.selectAll('.spikeline').remove();\n\n    if(!(showX || showY)) return;\n\n    var contrastColor = Color.combine(fullLayout.plot_bgcolor, fullLayout.paper_bgcolor);\n\n    // Horizontal line (to y-axis)\n    if(showY) {\n        var hLinePoint = closestPoints.hLinePoint;\n        var hLinePointX, hLinePointY;\n\n        xa = hLinePoint && hLinePoint.xa;\n        ya = hLinePoint && hLinePoint.ya;\n        var ySnap = ya.spikesnap;\n\n        if(ySnap === 'cursor') {\n            hLinePointX = evt.pointerX;\n            hLinePointY = evt.pointerY;\n        } else {\n            hLinePointX = xa._offset + hLinePoint.x;\n            hLinePointY = ya._offset + hLinePoint.y;\n        }\n        var dfltHLineColor = tinycolor.readability(hLinePoint.color, contrastColor) < 1.5 ?\n            Color.contrast(contrastColor) : hLinePoint.color;\n        var yMode = ya.spikemode;\n        var yThickness = ya.spikethickness;\n        var yColor = ya.spikecolor || dfltHLineColor;\n        var yBB = ya._boundingBox;\n        var xEdge = ((yBB.left + yBB.right) / 2) < hLinePointX ? yBB.right : yBB.left;\n        var xBase, xEndSpike;\n\n        if(yMode.indexOf('toaxis') !== -1 || yMode.indexOf('across') !== -1) {\n            if(yMode.indexOf('toaxis') !== -1) {\n                xBase = xEdge;\n                xEndSpike = hLinePointX;\n            }\n            if(yMode.indexOf('across') !== -1) {\n                xBase = ya._counterSpan[0];\n                xEndSpike = ya._counterSpan[1];\n            }\n\n            // Foreground horizontal line (to y-axis)\n            container.insert('line', ':first-child')\n                .attr({\n                    x1: xBase,\n                    x2: xEndSpike,\n                    y1: hLinePointY,\n                    y2: hLinePointY,\n                    'stroke-width': yThickness,\n                    stroke: yColor,\n                    'stroke-dasharray': Drawing.dashStyle(ya.spikedash, yThickness)\n                })\n                .classed('spikeline', true)\n                .classed('crisp', true);\n\n            // Background horizontal Line (to y-axis)\n            container.insert('line', ':first-child')\n                .attr({\n                    x1: xBase,\n                    x2: xEndSpike,\n                    y1: hLinePointY,\n                    y2: hLinePointY,\n                    'stroke-width': yThickness + 2,\n                    stroke: contrastColor\n                })\n                .classed('spikeline', true)\n                .classed('crisp', true);\n        }\n        // Y axis marker\n        if(yMode.indexOf('marker') !== -1) {\n            container.insert('circle', ':first-child')\n                .attr({\n                    cx: xEdge + (ya.side !== 'right' ? yThickness : -yThickness),\n                    cy: hLinePointY,\n                    r: yThickness,\n                    fill: yColor\n                })\n                .classed('spikeline', true);\n        }\n    }\n\n    if(showX) {\n        var vLinePoint = closestPoints.vLinePoint;\n        var vLinePointX, vLinePointY;\n\n        xa = vLinePoint && vLinePoint.xa;\n        ya = vLinePoint && vLinePoint.ya;\n        var xSnap = xa.spikesnap;\n\n        if(xSnap === 'cursor') {\n            vLinePointX = evt.pointerX;\n            vLinePointY = evt.pointerY;\n        } else {\n            vLinePointX = xa._offset + vLinePoint.x;\n            vLinePointY = ya._offset + vLinePoint.y;\n        }\n        var dfltVLineColor = tinycolor.readability(vLinePoint.color, contrastColor) < 1.5 ?\n            Color.contrast(contrastColor) : vLinePoint.color;\n        var xMode = xa.spikemode;\n        var xThickness = xa.spikethickness;\n        var xColor = xa.spikecolor || dfltVLineColor;\n        var xBB = xa._boundingBox;\n        var yEdge = ((xBB.top + xBB.bottom) / 2) < vLinePointY ? xBB.bottom : xBB.top;\n        var yBase, yEndSpike;\n\n        if(xMode.indexOf('toaxis') !== -1 || xMode.indexOf('across') !== -1) {\n            if(xMode.indexOf('toaxis') !== -1) {\n                yBase = yEdge;\n                yEndSpike = vLinePointY;\n            }\n            if(xMode.indexOf('across') !== -1) {\n                yBase = xa._counterSpan[0];\n                yEndSpike = xa._counterSpan[1];\n            }\n\n            // Foreground vertical line (to x-axis)\n            container.insert('line', ':first-child')\n                .attr({\n                    x1: vLinePointX,\n                    x2: vLinePointX,\n                    y1: yBase,\n                    y2: yEndSpike,\n                    'stroke-width': xThickness,\n                    stroke: xColor,\n                    'stroke-dasharray': Drawing.dashStyle(xa.spikedash, xThickness)\n                })\n                .classed('spikeline', true)\n                .classed('crisp', true);\n\n            // Background vertical line (to x-axis)\n            container.insert('line', ':first-child')\n                .attr({\n                    x1: vLinePointX,\n                    x2: vLinePointX,\n                    y1: yBase,\n                    y2: yEndSpike,\n                    'stroke-width': xThickness + 2,\n                    stroke: contrastColor\n                })\n                .classed('spikeline', true)\n                .classed('crisp', true);\n        }\n\n        // X axis marker\n        if(xMode.indexOf('marker') !== -1) {\n            container.insert('circle', ':first-child')\n                .attr({\n                    cx: vLinePointX,\n                    cy: yEdge - (xa.side !== 'top' ? xThickness : -xThickness),\n                    r: xThickness,\n                    fill: xColor\n                })\n                .classed('spikeline', true);\n        }\n    }\n}\n\nfunction hoverChanged(gd, evt, oldhoverdata) {\n    // don't emit any events if nothing changed\n    if(!oldhoverdata || oldhoverdata.length !== gd._hoverdata.length) return true;\n\n    for(var i = oldhoverdata.length - 1; i >= 0; i--) {\n        var oldPt = oldhoverdata[i];\n        var newPt = gd._hoverdata[i];\n\n        if(oldPt.curveNumber !== newPt.curveNumber ||\n            String(oldPt.pointNumber) !== String(newPt.pointNumber) ||\n            String(oldPt.pointNumbers) !== String(newPt.pointNumbers)\n        ) {\n            return true;\n        }\n    }\n    return false;\n}\n\nfunction spikesChanged(gd, oldspikepoints) {\n    // don't relayout the plot because of new spikelines if spikelines points didn't change\n    if(!oldspikepoints) return true;\n    if(oldspikepoints.vLinePoint !== gd._spikepoints.vLinePoint ||\n        oldspikepoints.hLinePoint !== gd._spikepoints.hLinePoint\n    ) return true;\n    return false;\n}\n\nfunction plainText(s, len) {\n    return svgTextUtils.plainText(s || '', {\n        len: len,\n        allowedTags: ['br', 'sub', 'sup', 'b', 'i', 'em']\n    });\n}\n\n},{\"../../lib\":703,\"../../lib/events\":692,\"../../lib/override_cursor\":714,\"../../lib/svg_text_utils\":727,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../color\":580,\"../dragelement\":598,\"../drawing\":601,\"./constants\":613,\"./helpers\":615,\"d3\":157,\"fast-isnumeric\":224,\"tinycolor2\":524}],617:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function handleHoverLabelDefaults(contIn, contOut, coerce, opts) {\n    opts = opts || {};\n\n    coerce('hoverlabel.bgcolor', opts.bgcolor);\n    coerce('hoverlabel.bordercolor', opts.bordercolor);\n    coerce('hoverlabel.namelength', opts.namelength);\n    Lib.coerceFont(coerce, 'hoverlabel.font', opts.font);\n    coerce('hoverlabel.align', opts.align);\n};\n\n},{\"../../lib\":703}],618:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function(opts, extra) {\n    opts = opts || {};\n    extra = extra || {};\n\n    var descPart = extra.description ? ' ' + extra.description : '';\n    var keys = extra.keys || [];\n    if(keys.length > 0) {\n        var quotedKeys = [];\n        for(var i = 0; i < keys.length; i++) {\n            quotedKeys[i] = '`' + keys[i] + '`';\n        }\n        descPart = descPart + 'Finally, the template string has access to ';\n        if(keys.length === 1) {\n            descPart = 'variable ' + quotedKeys[0];\n        } else {\n            descPart = 'variables ' + quotedKeys.slice(0, -1).join(', ') + ' and ' + quotedKeys.slice(-1) + '.';\n        }\n    }\n\n    var hovertemplate = {\n        valType: 'string',\n        \n        dflt: '',\n        editType: opts.editType || 'none',\n        \n    };\n\n    if(opts.arrayOk !== false) {\n        hovertemplate.arrayOk = true;\n    }\n\n    return hovertemplate;\n};\n\n},{}],619:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../lib');\nvar dragElement = _dereq_('../dragelement');\nvar helpers = _dereq_('./helpers');\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar hoverModule = _dereq_('./hover');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'fx',\n\n    constants: _dereq_('./constants'),\n    schema: {\n        layout: layoutAttributes\n    },\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: layoutAttributes,\n\n    supplyLayoutGlobalDefaults: _dereq_('./layout_global_defaults'),\n    supplyDefaults: _dereq_('./defaults'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n\n    calc: _dereq_('./calc'),\n\n    getDistanceFunction: helpers.getDistanceFunction,\n    getClosest: helpers.getClosest,\n    inbox: helpers.inbox,\n    quadrature: helpers.quadrature,\n    appendArrayPointValue: helpers.appendArrayPointValue,\n\n    castHoverOption: castHoverOption,\n    castHoverinfo: castHoverinfo,\n\n    hover: hoverModule.hover,\n    unhover: dragElement.unhover,\n\n    loneHover: hoverModule.loneHover,\n    loneUnhover: loneUnhover,\n\n    click: _dereq_('./click')\n};\n\nfunction loneUnhover(containerOrSelection) {\n    // duck type whether the arg is a d3 selection because ie9 doesn't\n    // handle instanceof like modern browsers do.\n    var selection = Lib.isD3Selection(containerOrSelection) ?\n            containerOrSelection :\n            d3.select(containerOrSelection);\n\n    selection.selectAll('g.hovertext').remove();\n    selection.selectAll('.spikeline').remove();\n}\n\n// helpers for traces that use Fx.loneHover\n\nfunction castHoverOption(trace, ptNumber, attr) {\n    return Lib.castOption(trace, ptNumber, 'hoverlabel.' + attr);\n}\n\nfunction castHoverinfo(trace, fullLayout, ptNumber) {\n    function _coerce(val) {\n        return Lib.coerceHoverinfo({hoverinfo: val}, {_module: trace._module}, fullLayout);\n    }\n\n    return Lib.castOption(trace, ptNumber, 'hoverinfo', _coerce);\n}\n\n},{\"../../lib\":703,\"../dragelement\":598,\"./attributes\":610,\"./calc\":611,\"./click\":612,\"./constants\":613,\"./defaults\":614,\"./helpers\":615,\"./hover\":616,\"./layout_attributes\":620,\"./layout_defaults\":621,\"./layout_global_defaults\":622,\"d3\":157}],620:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar constants = _dereq_('./constants');\n\nvar fontAttrs = _dereq_('../../plots/font_attributes')({\n    editType: 'none',\n    \n});\nfontAttrs.family.dflt = constants.HOVERFONT;\nfontAttrs.size.dflt = constants.HOVERFONTSIZE;\n\nmodule.exports = {\n    clickmode: {\n        valType: 'flaglist',\n        \n        flags: ['event', 'select'],\n        dflt: 'event',\n        editType: 'plot',\n        extras: ['none'],\n        \n    },\n    dragmode: {\n        valType: 'enumerated',\n        \n        values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable', false],\n        dflt: 'zoom',\n        editType: 'modebar',\n        \n    },\n    hovermode: {\n        valType: 'enumerated',\n        \n        values: ['x', 'y', 'closest', false],\n        editType: 'modebar',\n        \n    },\n    hoverdistance: {\n        valType: 'integer',\n        min: -1,\n        dflt: 20,\n        \n        editType: 'none',\n        \n    },\n    spikedistance: {\n        valType: 'integer',\n        min: -1,\n        dflt: 20,\n        \n        editType: 'none',\n        \n    },\n    hoverlabel: {\n        bgcolor: {\n            valType: 'color',\n            \n            editType: 'none',\n            \n        },\n        bordercolor: {\n            valType: 'color',\n            \n            editType: 'none',\n            \n        },\n        font: fontAttrs,\n        align: {\n            valType: 'enumerated',\n            values: ['left', 'right', 'auto'],\n            dflt: 'auto',\n            \n            editType: 'none',\n            \n        },\n        namelength: {\n            valType: 'integer',\n            min: -1,\n            dflt: 15,\n            \n            editType: 'none',\n            \n        },\n        editType: 'none'\n    },\n    selectdirection: {\n        valType: 'enumerated',\n        \n        values: ['h', 'v', 'd', 'any'],\n        dflt: 'any',\n        \n        editType: 'none'\n    }\n};\n\n},{\"../../plots/font_attributes\":777,\"./constants\":613}],621:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    var clickmode = coerce('clickmode');\n\n    var dragMode = coerce('dragmode');\n    if(dragMode === 'select') coerce('selectdirection');\n\n    var hovermodeDflt;\n    if(layoutOut._has('cartesian')) {\n        if(clickmode.indexOf('select') > -1) {\n            hovermodeDflt = 'closest';\n        } else {\n            // flag for 'horizontal' plots:\n            // determines the state of the mode bar 'compare' hovermode button\n            layoutOut._isHoriz = isHoriz(fullData, layoutOut);\n            hovermodeDflt = layoutOut._isHoriz ? 'y' : 'x';\n        }\n    } else hovermodeDflt = 'closest';\n\n    var hoverMode = coerce('hovermode', hovermodeDflt);\n    if(hoverMode) {\n        coerce('hoverdistance');\n        coerce('spikedistance');\n    }\n\n    // if only mapbox or geo subplots is present on graph,\n    // reset 'zoom' dragmode to 'pan' until 'zoom' is implemented,\n    // so that the correct modebar button is active\n    var hasMapbox = layoutOut._has('mapbox');\n    var hasGeo = layoutOut._has('geo');\n    var len = layoutOut._basePlotModules.length;\n\n    if(layoutOut.dragmode === 'zoom' && (\n        ((hasMapbox || hasGeo) && len === 1) ||\n        (hasMapbox && hasGeo && len === 2)\n    )) {\n        layoutOut.dragmode = 'pan';\n    }\n};\n\nfunction isHoriz(fullData, fullLayout) {\n    var stackOpts = fullLayout._scatterStackOpts || {};\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n        var subplot = trace.xaxis + trace.yaxis;\n        var subplotStackOpts = stackOpts[subplot] || {};\n        var groupOpts = subplotStackOpts[trace.stackgroup] || {};\n\n        if(trace.orientation !== 'h' && groupOpts.orientation !== 'h') {\n            return false;\n        }\n    }\n\n    return true;\n}\n\n},{\"../../lib\":703,\"./layout_attributes\":620}],622:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleHoverLabelDefaults = _dereq_('./hoverlabel_defaults');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function supplyLayoutGlobalDefaults(layoutIn, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    handleHoverLabelDefaults(layoutIn, layoutOut, coerce);\n};\n\n},{\"../../lib\":703,\"./hoverlabel_defaults\":617,\"./layout_attributes\":620}],623:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar counterRegex = _dereq_('../../lib/regex').counter;\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\nvar cartesianIdRegex = _dereq_('../../plots/cartesian/constants').idRegex;\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar gridAttrs = {\n    rows: {\n        valType: 'integer',\n        min: 1,\n        \n        editType: 'plot',\n        \n    },\n    roworder: {\n        valType: 'enumerated',\n        values: ['top to bottom', 'bottom to top'],\n        dflt: 'top to bottom',\n        \n        editType: 'plot',\n        \n    },\n    columns: {\n        valType: 'integer',\n        min: 1,\n        \n        editType: 'plot',\n        \n    },\n    subplots: {\n        valType: 'info_array',\n        freeLength: true,\n        dimensions: 2,\n        items: {valType: 'enumerated', values: [counterRegex('xy').toString(), ''], editType: 'plot'},\n        \n        editType: 'plot',\n        \n    },\n    xaxes: {\n        valType: 'info_array',\n        freeLength: true,\n        items: {valType: 'enumerated', values: [cartesianIdRegex.x.toString(), ''], editType: 'plot'},\n        \n        editType: 'plot',\n        \n    },\n    yaxes: {\n        valType: 'info_array',\n        freeLength: true,\n        items: {valType: 'enumerated', values: [cartesianIdRegex.y.toString(), ''], editType: 'plot'},\n        \n        editType: 'plot',\n        \n    },\n    pattern: {\n        valType: 'enumerated',\n        values: ['independent', 'coupled'],\n        dflt: 'coupled',\n        \n        editType: 'plot',\n        \n    },\n    xgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'plot',\n        \n    },\n    ygap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'plot',\n        \n    },\n    domain: domainAttrs({name: 'grid', editType: 'plot', noGridCell: true}, {\n        \n    }),\n    xside: {\n        valType: 'enumerated',\n        values: ['bottom', 'bottom plot', 'top plot', 'top'],\n        dflt: 'bottom plot',\n        \n        editType: 'plot',\n        \n    },\n    yside: {\n        valType: 'enumerated',\n        values: ['left', 'left plot', 'right plot', 'right'],\n        dflt: 'left plot',\n        \n        editType: 'plot',\n        \n    },\n    editType: 'plot'\n};\n\nfunction getAxes(layout, grid, axLetter) {\n    var gridVal = grid[axLetter + 'axes'];\n    var splomVal = Object.keys((layout._splomAxes || {})[axLetter] || {});\n\n    if(Array.isArray(gridVal)) return gridVal;\n    if(splomVal.length) return splomVal;\n}\n\n// the shape of the grid - this needs to be done BEFORE supplyDataDefaults\n// so that non-subplot traces can place themselves in the grid\nfunction sizeDefaults(layoutIn, layoutOut) {\n    var gridIn = layoutIn.grid || {};\n    var xAxes = getAxes(layoutOut, gridIn, 'x');\n    var yAxes = getAxes(layoutOut, gridIn, 'y');\n\n    if(!layoutIn.grid && !xAxes && !yAxes) return;\n\n    var hasSubplotGrid = Array.isArray(gridIn.subplots) && Array.isArray(gridIn.subplots[0]);\n    var hasXaxes = Array.isArray(xAxes);\n    var hasYaxes = Array.isArray(yAxes);\n    var isSplomGenerated = (\n        hasXaxes && xAxes !== gridIn.xaxes &&\n        hasYaxes && yAxes !== gridIn.yaxes\n    );\n\n    var dfltRows, dfltColumns;\n\n    if(hasSubplotGrid) {\n        dfltRows = gridIn.subplots.length;\n        dfltColumns = gridIn.subplots[0].length;\n    } else {\n        if(hasYaxes) dfltRows = yAxes.length;\n        if(hasXaxes) dfltColumns = xAxes.length;\n    }\n\n    var gridOut = Template.newContainer(layoutOut, 'grid');\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(gridIn, gridOut, gridAttrs, attr, dflt);\n    }\n\n    var rows = coerce('rows', dfltRows);\n    var columns = coerce('columns', dfltColumns);\n\n    if(!(rows * columns > 1)) {\n        delete layoutOut.grid;\n        return;\n    }\n\n    if(!hasSubplotGrid && !hasXaxes && !hasYaxes) {\n        var useDefaultSubplots = coerce('pattern') === 'independent';\n        if(useDefaultSubplots) hasSubplotGrid = true;\n    }\n    gridOut._hasSubplotGrid = hasSubplotGrid;\n\n    var rowOrder = coerce('roworder');\n    var reversed = rowOrder === 'top to bottom';\n\n    var dfltGapX = hasSubplotGrid ? 0.2 : 0.1;\n    var dfltGapY = hasSubplotGrid ? 0.3 : 0.1;\n\n    var dfltSideX, dfltSideY;\n    if(isSplomGenerated && layoutOut._splomGridDflt) {\n        dfltSideX = layoutOut._splomGridDflt.xside;\n        dfltSideY = layoutOut._splomGridDflt.yside;\n    }\n\n    gridOut._domains = {\n        x: fillGridPositions('x', coerce, dfltGapX, dfltSideX, columns),\n        y: fillGridPositions('y', coerce, dfltGapY, dfltSideY, rows, reversed)\n    };\n}\n\n// coerce x or y sizing attributes and return an array of domains for this direction\nfunction fillGridPositions(axLetter, coerce, dfltGap, dfltSide, len, reversed) {\n    var dirGap = coerce(axLetter + 'gap', dfltGap);\n    var domain = coerce('domain.' + axLetter);\n    coerce(axLetter + 'side', dfltSide);\n\n    var out = new Array(len);\n    var start = domain[0];\n    var step = (domain[1] - start) / (len - dirGap);\n    var cellDomain = step * (1 - dirGap);\n    for(var i = 0; i < len; i++) {\n        var cellStart = start + step * i;\n        out[reversed ? (len - 1 - i) : i] = [cellStart, cellStart + cellDomain];\n    }\n    return out;\n}\n\n// the (cartesian) contents of the grid - this needs to happen AFTER supplyDataDefaults\n// so that we know what cartesian subplots are available\nfunction contentDefaults(layoutIn, layoutOut) {\n    var gridOut = layoutOut.grid;\n    // make sure we got to the end of handleGridSizing\n    if(!gridOut || !gridOut._domains) return;\n\n    var gridIn = layoutIn.grid || {};\n    var subplots = layoutOut._subplots;\n    var hasSubplotGrid = gridOut._hasSubplotGrid;\n    var rows = gridOut.rows;\n    var columns = gridOut.columns;\n    var useDefaultSubplots = gridOut.pattern === 'independent';\n\n    var i, j, xId, yId, subplotId, subplotsOut, yPos;\n\n    var axisMap = gridOut._axisMap = {};\n\n    if(hasSubplotGrid) {\n        var subplotsIn = gridIn.subplots || [];\n        subplotsOut = gridOut.subplots = new Array(rows);\n        var index = 1;\n\n        for(i = 0; i < rows; i++) {\n            var rowOut = subplotsOut[i] = new Array(columns);\n            var rowIn = subplotsIn[i] || [];\n            for(j = 0; j < columns; j++) {\n                if(useDefaultSubplots) {\n                    subplotId = (index === 1) ? 'xy' : ('x' + index + 'y' + index);\n                    index++;\n                } else subplotId = rowIn[j];\n\n                rowOut[j] = '';\n\n                if(subplots.cartesian.indexOf(subplotId) !== -1) {\n                    yPos = subplotId.indexOf('y');\n                    xId = subplotId.slice(0, yPos);\n                    yId = subplotId.slice(yPos);\n                    if((axisMap[xId] !== undefined && axisMap[xId] !== j) ||\n                        (axisMap[yId] !== undefined && axisMap[yId] !== i)\n                    ) {\n                        continue;\n                    }\n\n                    rowOut[j] = subplotId;\n                    axisMap[xId] = j;\n                    axisMap[yId] = i;\n                }\n            }\n        }\n    } else {\n        var xAxes = getAxes(layoutOut, gridIn, 'x');\n        var yAxes = getAxes(layoutOut, gridIn, 'y');\n        gridOut.xaxes = fillGridAxes(xAxes, subplots.xaxis, columns, axisMap, 'x');\n        gridOut.yaxes = fillGridAxes(yAxes, subplots.yaxis, rows, axisMap, 'y');\n    }\n\n    var anchors = gridOut._anchors = {};\n    var reversed = gridOut.roworder === 'top to bottom';\n\n    for(var axisId in axisMap) {\n        var axLetter = axisId.charAt(0);\n        var side = gridOut[axLetter + 'side'];\n\n        var i0, inc, iFinal;\n\n        if(side.length < 8) {\n            // grid edge -  ie not \"* plot\" - make these as free axes\n            // since we're not guaranteed to have a subplot there at all\n            anchors[axisId] = 'free';\n        } else if(axLetter === 'x') {\n            if((side.charAt(0) === 't') === reversed) {\n                i0 = 0;\n                inc = 1;\n                iFinal = rows;\n            } else {\n                i0 = rows - 1;\n                inc = -1;\n                iFinal = -1;\n            }\n            if(hasSubplotGrid) {\n                var column = axisMap[axisId];\n                for(i = i0; i !== iFinal; i += inc) {\n                    subplotId = subplotsOut[i][column];\n                    if(!subplotId) continue;\n                    yPos = subplotId.indexOf('y');\n                    if(subplotId.slice(0, yPos) === axisId) {\n                        anchors[axisId] = subplotId.slice(yPos);\n                        break;\n                    }\n                }\n            } else {\n                for(i = i0; i !== iFinal; i += inc) {\n                    yId = gridOut.yaxes[i];\n                    if(subplots.cartesian.indexOf(axisId + yId) !== -1) {\n                        anchors[axisId] = yId;\n                        break;\n                    }\n                }\n            }\n        } else {\n            if((side.charAt(0) === 'l')) {\n                i0 = 0;\n                inc = 1;\n                iFinal = columns;\n            } else {\n                i0 = columns - 1;\n                inc = -1;\n                iFinal = -1;\n            }\n            if(hasSubplotGrid) {\n                var row = axisMap[axisId];\n                for(i = i0; i !== iFinal; i += inc) {\n                    subplotId = subplotsOut[row][i];\n                    if(!subplotId) continue;\n                    yPos = subplotId.indexOf('y');\n                    if(subplotId.slice(yPos) === axisId) {\n                        anchors[axisId] = subplotId.slice(0, yPos);\n                        break;\n                    }\n                }\n            } else {\n                for(i = i0; i !== iFinal; i += inc) {\n                    xId = gridOut.xaxes[i];\n                    if(subplots.cartesian.indexOf(xId + axisId) !== -1) {\n                        anchors[axisId] = xId;\n                        break;\n                    }\n                }\n            }\n        }\n    }\n}\n\nfunction fillGridAxes(axesIn, axesAllowed, len, axisMap, axLetter) {\n    var out = new Array(len);\n    var i;\n\n    function fillOneAxis(i, axisId) {\n        if(axesAllowed.indexOf(axisId) !== -1 && axisMap[axisId] === undefined) {\n            out[i] = axisId;\n            axisMap[axisId] = i;\n        } else out[i] = '';\n    }\n\n    if(Array.isArray(axesIn)) {\n        for(i = 0; i < len; i++) {\n            fillOneAxis(i, axesIn[i]);\n        }\n    } else {\n        // default axis list is the first `len` axis ids\n        fillOneAxis(0, axLetter);\n        for(i = 1; i < len; i++) {\n            fillOneAxis(i, axLetter + (i + 1));\n        }\n    }\n\n    return out;\n}\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'grid',\n\n    schema: {\n        layout: {grid: gridAttrs}\n    },\n\n    layoutAttributes: gridAttrs,\n    sizeDefaults: sizeDefaults,\n    contentDefaults: contentDefaults\n};\n\n},{\"../../lib\":703,\"../../lib/regex\":719,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/constants\":757,\"../../plots/domain\":776}],624:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar cartesianConstants = _dereq_('../../plots/cartesian/constants');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\n\nmodule.exports = templatedArray('image', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'arraydraw',\n        \n    },\n\n    source: {\n        valType: 'string',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    layer: {\n        valType: 'enumerated',\n        values: ['below', 'above'],\n        dflt: 'above',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    sizex: {\n        valType: 'number',\n        \n        dflt: 0,\n        editType: 'arraydraw',\n        \n    },\n\n    sizey: {\n        valType: 'number',\n        \n        dflt: 0,\n        editType: 'arraydraw',\n        \n    },\n\n    sizing: {\n        valType: 'enumerated',\n        values: ['fill', 'contain', 'stretch'],\n        dflt: 'contain',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    opacity: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 1,\n        editType: 'arraydraw',\n        \n    },\n\n    x: {\n        valType: 'any',\n        \n        dflt: 0,\n        editType: 'arraydraw',\n        \n    },\n\n    y: {\n        valType: 'any',\n        \n        dflt: 0,\n        editType: 'arraydraw',\n        \n    },\n\n    xanchor: {\n        valType: 'enumerated',\n        values: ['left', 'center', 'right'],\n        dflt: 'left',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    yanchor: {\n        valType: 'enumerated',\n        values: ['top', 'middle', 'bottom'],\n        dflt: 'top',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    xref: {\n        valType: 'enumerated',\n        values: [\n            'paper',\n            cartesianConstants.idRegex.x.toString()\n        ],\n        dflt: 'paper',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    yref: {\n        valType: 'enumerated',\n        values: [\n            'paper',\n            cartesianConstants.idRegex.y.toString()\n        ],\n        dflt: 'paper',\n        \n        editType: 'arraydraw',\n        \n    },\n    editType: 'arraydraw'\n});\n\n},{\"../../plot_api/plot_template\":741,\"../../plots/cartesian/constants\":757}],625:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar toLogRange = _dereq_('../../lib/to_log_range');\n\n/*\n * convertCoords: when converting an axis between log and linear\n * you need to alter any images on that axis to keep them\n * pointing at the same data point.\n * In v2.0 this will become obsolete (or perhaps size will still need conversion?)\n * we convert size by declaring that the maximum extent *in data units* should be\n * the same, assuming the image is anchored by its center (could remove that restriction\n * if we think it's important) even though the actual left and right values will not be\n * quite the same since the scale becomes nonlinear (and central anchor means the pixel\n * center of the image, not the data units center)\n *\n * gd: the plot div\n * ax: the axis being changed\n * newType: the type it's getting\n * doExtra: function(attr, val) from inside relayout that sets the attribute.\n *     Use this to make the changes as it's aware if any other changes in the\n *     same relayout call should override this conversion.\n */\nmodule.exports = function convertCoords(gd, ax, newType, doExtra) {\n    ax = ax || {};\n\n    var toLog = (newType === 'log') && (ax.type === 'linear');\n    var fromLog = (newType === 'linear') && (ax.type === 'log');\n\n    if(!(toLog || fromLog)) return;\n\n    var images = gd._fullLayout.images;\n    var axLetter = ax._id.charAt(0);\n    var image;\n    var attrPrefix;\n\n    for(var i = 0; i < images.length; i++) {\n        image = images[i];\n        attrPrefix = 'images[' + i + '].';\n\n        if(image[axLetter + 'ref'] === ax._id) {\n            var currentPos = image[axLetter];\n            var currentSize = image['size' + axLetter];\n            var newPos = null;\n            var newSize = null;\n\n            if(toLog) {\n                newPos = toLogRange(currentPos, ax.range);\n\n                // this is the inverse of the conversion we do in fromLog below\n                // so that the conversion is reversible (notice the fromLog conversion\n                // is like sinh, and this one looks like arcsinh)\n                var dx = currentSize / Math.pow(10, newPos) / 2;\n                newSize = 2 * Math.log(dx + Math.sqrt(1 + dx * dx)) / Math.LN10;\n            } else {\n                newPos = Math.pow(10, currentPos);\n                newSize = newPos * (Math.pow(10, currentSize / 2) - Math.pow(10, -currentSize / 2));\n            }\n\n            // if conversion failed, delete the value so it can get a default later on\n            if(!isNumeric(newPos)) {\n                newPos = null;\n                newSize = null;\n            } else if(!isNumeric(newSize)) newSize = null;\n\n            doExtra(attrPrefix + axLetter, newPos);\n            doExtra(attrPrefix + 'size' + axLetter, newSize);\n        }\n    }\n};\n\n},{\"../../lib/to_log_range\":729,\"fast-isnumeric\":224}],626:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar name = 'images';\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    var opts = {\n        name: name,\n        handleItemDefaults: imageDefaults\n    };\n\n    handleArrayContainerDefaults(layoutIn, layoutOut, opts);\n};\n\n\nfunction imageDefaults(imageIn, imageOut, fullLayout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(imageIn, imageOut, attributes, attr, dflt);\n    }\n\n    var source = coerce('source');\n    var visible = coerce('visible', !!source);\n\n    if(!visible) return imageOut;\n\n    coerce('layer');\n    coerce('xanchor');\n    coerce('yanchor');\n    coerce('sizex');\n    coerce('sizey');\n    coerce('sizing');\n    coerce('opacity');\n\n    var gdMock = { _fullLayout: fullLayout };\n    var axLetters = ['x', 'y'];\n\n    for(var i = 0; i < 2; i++) {\n        // 'paper' is the fallback axref\n        var axLetter = axLetters[i];\n        var axRef = Axes.coerceRef(imageIn, imageOut, gdMock, axLetter, 'paper');\n\n        if(axRef !== 'paper') {\n            var ax = Axes.getFromId(gdMock, axRef);\n            ax._imgIndices.push(imageOut._index);\n        }\n\n        Axes.coercePosition(imageOut, gdMock, coerce, axRef, axLetter, 0);\n    }\n\n    return imageOut;\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/cartesian/axes\":751,\"./attributes\":624}],627:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Drawing = _dereq_('../drawing');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nmodule.exports = function draw(gd) {\n    var fullLayout = gd._fullLayout;\n    var imageDataAbove = [];\n    var imageDataSubplot = {};\n    var imageDataBelow = [];\n    var subplot;\n    var i;\n\n    // Sort into top, subplot, and bottom layers\n    for(i = 0; i < fullLayout.images.length; i++) {\n        var img = fullLayout.images[i];\n\n        if(img.visible) {\n            if(img.layer === 'below' && img.xref !== 'paper' && img.yref !== 'paper') {\n                subplot = img.xref + img.yref;\n\n                var plotinfo = fullLayout._plots[subplot];\n\n                if(!plotinfo) {\n                    // Fall back to _imageLowerLayer in case the requested subplot doesn't exist.\n                    // This can happen if you reference the image to an x / y axis combination\n                    // that doesn't have any data on it (and layer is below)\n                    imageDataBelow.push(img);\n                    continue;\n                }\n\n                if(plotinfo.mainplot) {\n                    subplot = plotinfo.mainplot.id;\n                }\n\n                if(!imageDataSubplot[subplot]) {\n                    imageDataSubplot[subplot] = [];\n                }\n                imageDataSubplot[subplot].push(img);\n            } else if(img.layer === 'above') {\n                imageDataAbove.push(img);\n            } else {\n                imageDataBelow.push(img);\n            }\n        }\n    }\n\n\n    var anchors = {\n        x: {\n            left: { sizing: 'xMin', offset: 0 },\n            center: { sizing: 'xMid', offset: -1 / 2 },\n            right: { sizing: 'xMax', offset: -1 }\n        },\n        y: {\n            top: { sizing: 'YMin', offset: 0 },\n            middle: { sizing: 'YMid', offset: -1 / 2 },\n            bottom: { sizing: 'YMax', offset: -1 }\n        }\n    };\n\n\n    // Images must be converted to dataURL's for exporting.\n    function setImage(d) {\n        var thisImage = d3.select(this);\n\n        if(this.img && this.img.src === d.source) {\n            return;\n        }\n\n        thisImage.attr('xmlns', xmlnsNamespaces.svg);\n\n        var imagePromise = new Promise(function(resolve) {\n            var img = new Image();\n            this.img = img;\n\n            // If not set, a `tainted canvas` error is thrown\n            img.setAttribute('crossOrigin', 'anonymous');\n            img.onerror = errorHandler;\n            img.onload = function() {\n                var canvas = document.createElement('canvas');\n                canvas.width = this.width;\n                canvas.height = this.height;\n\n                var ctx = canvas.getContext('2d');\n                ctx.drawImage(this, 0, 0);\n\n                var dataURL = canvas.toDataURL('image/png');\n\n                thisImage.attr('xlink:href', dataURL);\n\n                // resolve promise in onload handler instead of on 'load' to support IE11\n                // see https://github.com/plotly/plotly.js/issues/1685\n                // for more details\n                resolve();\n            };\n\n\n            thisImage.on('error', errorHandler);\n\n            img.src = d.source;\n\n            function errorHandler() {\n                thisImage.remove();\n                resolve();\n            }\n        }.bind(this));\n\n        gd._promises.push(imagePromise);\n    }\n\n    function applyAttributes(d) {\n        var thisImage = d3.select(this);\n\n        // Axes if specified\n        var xa = Axes.getFromId(gd, d.xref);\n        var ya = Axes.getFromId(gd, d.yref);\n\n        var size = fullLayout._size;\n        var width = xa ? Math.abs(xa.l2p(d.sizex) - xa.l2p(0)) : d.sizex * size.w;\n        var height = ya ? Math.abs(ya.l2p(d.sizey) - ya.l2p(0)) : d.sizey * size.h;\n\n        // Offsets for anchor positioning\n        var xOffset = width * anchors.x[d.xanchor].offset;\n        var yOffset = height * anchors.y[d.yanchor].offset;\n\n        var sizing = anchors.x[d.xanchor].sizing + anchors.y[d.yanchor].sizing;\n\n        // Final positions\n        var xPos = (xa ? xa.r2p(d.x) + xa._offset : d.x * size.w + size.l) + xOffset;\n        var yPos = (ya ? ya.r2p(d.y) + ya._offset : size.h - d.y * size.h + size.t) + yOffset;\n\n        // Construct the proper aspectRatio attribute\n        switch(d.sizing) {\n            case 'fill':\n                sizing += ' slice';\n                break;\n\n            case 'stretch':\n                sizing = 'none';\n                break;\n        }\n\n        thisImage.attr({\n            x: xPos,\n            y: yPos,\n            width: width,\n            height: height,\n            preserveAspectRatio: sizing,\n            opacity: d.opacity\n        });\n\n\n        // Set proper clipping on images\n        var xId = xa ? xa._id : '';\n        var yId = ya ? ya._id : '';\n        var clipAxes = xId + yId;\n\n        Drawing.setClipUrl(\n            thisImage,\n            clipAxes ? ('clip' + fullLayout._uid + clipAxes) : null,\n            gd\n        );\n    }\n\n    var imagesBelow = fullLayout._imageLowerLayer.selectAll('image')\n        .data(imageDataBelow);\n    var imagesAbove = fullLayout._imageUpperLayer.selectAll('image')\n        .data(imageDataAbove);\n\n    imagesBelow.enter().append('image');\n    imagesAbove.enter().append('image');\n\n    imagesBelow.exit().remove();\n    imagesAbove.exit().remove();\n\n    imagesBelow.each(function(d) {\n        setImage.bind(this)(d);\n        applyAttributes.bind(this)(d);\n    });\n    imagesAbove.each(function(d) {\n        setImage.bind(this)(d);\n        applyAttributes.bind(this)(d);\n    });\n\n    var allSubplots = Object.keys(fullLayout._plots);\n    for(i = 0; i < allSubplots.length; i++) {\n        subplot = allSubplots[i];\n        var subplotObj = fullLayout._plots[subplot];\n\n        // filter out overlaid plots (which havd their images on the main plot)\n        // and gl2d plots (which don't support below images, at least not yet)\n        if(!subplotObj.imagelayer) continue;\n\n        var imagesOnSubplot = subplotObj.imagelayer.selectAll('image')\n            // even if there are no images on this subplot, we need to run\n            // enter and exit in case there were previously\n            .data(imageDataSubplot[subplot] || []);\n\n        imagesOnSubplot.enter().append('image');\n        imagesOnSubplot.exit().remove();\n\n        imagesOnSubplot.each(function(d) {\n            setImage.bind(this)(d);\n            applyAttributes.bind(this)(d);\n        });\n    }\n};\n\n},{\"../../constants/xmlns_namespaces\":681,\"../../plots/cartesian/axes\":751,\"../drawing\":601,\"d3\":157}],628:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'images',\n\n    layoutAttributes: _dereq_('./attributes'),\n    supplyLayoutDefaults: _dereq_('./defaults'),\n    includeBasePlot: _dereq_('../../plots/cartesian/include_components')('images'),\n\n    draw: _dereq_('./draw'),\n\n    convertCoords: _dereq_('./convert_coords')\n};\n\n},{\"../../plots/cartesian/include_components\":761,\"./attributes\":624,\"./convert_coords\":625,\"./defaults\":626,\"./draw\":627}],629:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorAttrs = _dereq_('../color/attributes');\n\n\nmodule.exports = {\n    bgcolor: {\n        valType: 'color',\n        \n        editType: 'legend',\n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'legend',\n        \n    },\n    borderwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'legend',\n        \n    },\n    font: fontAttrs({\n        editType: 'legend',\n        \n    }),\n    orientation: {\n        valType: 'enumerated',\n        values: ['v', 'h'],\n        dflt: 'v',\n        \n        editType: 'legend',\n        \n    },\n    traceorder: {\n        valType: 'flaglist',\n        flags: ['reversed', 'grouped'],\n        extras: ['normal'],\n        \n        editType: 'legend',\n        \n    },\n    tracegroupgap: {\n        valType: 'number',\n        min: 0,\n        dflt: 10,\n        \n        editType: 'legend',\n        \n    },\n    itemsizing: {\n        valType: 'enumerated',\n        values: ['trace', 'constant'],\n        dflt: 'trace',\n        \n        editType: 'legend',\n        \n    },\n\n    itemclick: {\n        valType: 'enumerated',\n        values: ['toggle', 'toggleothers', false],\n        dflt: 'toggle',\n        \n        editType: 'legend',\n        \n    },\n    itemdoubleclick: {\n        valType: 'enumerated',\n        values: ['toggle', 'toggleothers', false],\n        dflt: 'toggleothers',\n        \n        editType: 'legend',\n        \n    },\n\n    x: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: 1.02,\n        \n        editType: 'legend',\n        \n    },\n    xanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'left', 'center', 'right'],\n        dflt: 'left',\n        \n        editType: 'legend',\n        \n    },\n    y: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: 1,\n        \n        editType: 'legend',\n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'top', 'middle', 'bottom'],\n        dflt: 'auto',\n        \n        editType: 'legend',\n        \n    },\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    valign: {\n        valType: 'enumerated',\n        values: ['top', 'middle', 'bottom'],\n        dflt: 'middle',\n        \n        editType: 'legend',\n        \n    },\n    editType: 'legend'\n};\n\n},{\"../../plots/font_attributes\":777,\"../color/attributes\":579}],630:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    scrollBarWidth: 6,\n    scrollBarMinHeight: 20,\n    scrollBarColor: '#808BA4',\n    scrollBarMargin: 4,\n    textOffsetX: 40\n};\n\n},{}],631:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar attributes = _dereq_('./attributes');\nvar basePlotLayoutAttributes = _dereq_('../../plots/layout_attributes');\nvar helpers = _dereq_('./helpers');\n\n\nmodule.exports = function legendDefaults(layoutIn, layoutOut, fullData) {\n    var containerIn = layoutIn.legend || {};\n\n    var legendTraceCount = 0;\n    var legendReallyHasATrace = false;\n    var defaultOrder = 'normal';\n\n    var defaultX, defaultY, defaultXAnchor, defaultYAnchor;\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n\n        if(!trace.visible) continue;\n\n        // Note that we explicitly count any trace that is either shown or\n        // *would* be shown by default, toward the two traces you need to\n        // ensure the legend is shown by default, because this can still help\n        // disambiguate.\n        if(trace.showlegend || trace._dfltShowLegend) {\n            legendTraceCount++;\n            if(trace.showlegend) {\n                legendReallyHasATrace = true;\n                // Always show the legend by default if there's a pie,\n                // or if there's only one trace but it's explicitly shown\n                if(Registry.traceIs(trace, 'pie-like') ||\n                    trace._input.showlegend === true\n                ) {\n                    legendTraceCount++;\n                }\n            }\n        }\n\n        if((Registry.traceIs(trace, 'bar') && layoutOut.barmode === 'stack') ||\n                ['tonextx', 'tonexty'].indexOf(trace.fill) !== -1) {\n            defaultOrder = helpers.isGrouped({traceorder: defaultOrder}) ?\n                'grouped+reversed' : 'reversed';\n        }\n\n        if(trace.legendgroup !== undefined && trace.legendgroup !== '') {\n            defaultOrder = helpers.isReversed({traceorder: defaultOrder}) ?\n                'reversed+grouped' : 'grouped';\n        }\n    }\n\n    var showLegend = Lib.coerce(layoutIn, layoutOut,\n        basePlotLayoutAttributes, 'showlegend',\n        legendReallyHasATrace && legendTraceCount > 1);\n\n    if(showLegend === false && !containerIn.uirevision) return;\n\n    var containerOut = Template.newContainer(layoutOut, 'legend');\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);\n    }\n\n    coerce('uirevision', layoutOut.uirevision);\n\n    if(showLegend === false) return;\n\n    coerce('bgcolor', layoutOut.paper_bgcolor);\n    coerce('bordercolor');\n    coerce('borderwidth');\n    Lib.coerceFont(coerce, 'font', layoutOut.font);\n\n    coerce('orientation');\n    if(containerOut.orientation === 'h') {\n        var xaxis = layoutIn.xaxis;\n        if(Registry.getComponentMethod('rangeslider', 'isVisible')(xaxis)) {\n            defaultX = 0;\n            defaultXAnchor = 'left';\n            defaultY = 1.1;\n            defaultYAnchor = 'bottom';\n        } else {\n            defaultX = 0;\n            defaultXAnchor = 'left';\n            defaultY = -0.1;\n            defaultYAnchor = 'top';\n        }\n    }\n\n    coerce('traceorder', defaultOrder);\n    if(helpers.isGrouped(layoutOut.legend)) coerce('tracegroupgap');\n\n    coerce('itemsizing');\n\n    coerce('itemclick');\n    coerce('itemdoubleclick');\n\n    coerce('x', defaultX);\n    coerce('xanchor', defaultXAnchor);\n    coerce('y', defaultY);\n    coerce('yanchor', defaultYAnchor);\n    coerce('valign');\n    Lib.noneOrAll(containerIn, containerOut, ['x', 'y']);\n};\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../plots/layout_attributes\":803,\"../../registry\":831,\"./attributes\":629,\"./helpers\":635}],632:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\nvar Plots = _dereq_('../../plots/plots');\nvar Registry = _dereq_('../../registry');\nvar Events = _dereq_('../../lib/events');\nvar dragElement = _dereq_('../dragelement');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar handleClick = _dereq_('./handle_click');\n\nvar constants = _dereq_('./constants');\nvar interactConstants = _dereq_('../../constants/interactions');\nvar alignmentConstants = _dereq_('../../constants/alignment');\nvar LINE_SPACING = alignmentConstants.LINE_SPACING;\nvar FROM_TL = alignmentConstants.FROM_TL;\nvar FROM_BR = alignmentConstants.FROM_BR;\n\nvar getLegendData = _dereq_('./get_legend_data');\nvar style = _dereq_('./style');\nvar helpers = _dereq_('./helpers');\n\nvar DBLCLICKDELAY = interactConstants.DBLCLICKDELAY;\n\nmodule.exports = function draw(gd) {\n    var fullLayout = gd._fullLayout;\n    var clipId = 'legend' + fullLayout._uid;\n\n    if(!fullLayout._infolayer || !gd.calcdata) return;\n\n    if(!gd._legendMouseDownTime) gd._legendMouseDownTime = 0;\n\n    var opts = fullLayout.legend;\n    var legendData = fullLayout.showlegend && getLegendData(gd.calcdata, opts);\n    var hiddenSlices = fullLayout.hiddenlabels || [];\n\n    if(!fullLayout.showlegend || !legendData.length) {\n        fullLayout._infolayer.selectAll('.legend').remove();\n        fullLayout._topdefs.select('#' + clipId).remove();\n\n        Plots.autoMargin(gd, 'legend');\n        return;\n    }\n\n    var maxLength = 0;\n    for(var i = 0; i < legendData.length; i++) {\n        for(var j = 0; j < legendData[i].length; j++) {\n            var item = legendData[i][j][0];\n            var trace = item.trace;\n            var isPieLike = Registry.traceIs(trace, 'pie-like');\n            var name = isPieLike ? item.label : trace.name;\n            maxLength = Math.max(maxLength, name && name.length || 0);\n        }\n    }\n\n    var firstRender = false;\n    var legend = Lib.ensureSingle(fullLayout._infolayer, 'g', 'legend', function(s) {\n        s.attr('pointer-events', 'all');\n        firstRender = true;\n    });\n\n    var clipPath = Lib.ensureSingleById(fullLayout._topdefs, 'clipPath', clipId, function(s) {\n        s.append('rect');\n    });\n\n    var bg = Lib.ensureSingle(legend, 'rect', 'bg', function(s) {\n        s.attr('shape-rendering', 'crispEdges');\n    });\n\n    bg.call(Color.stroke, opts.bordercolor)\n        .call(Color.fill, opts.bgcolor)\n        .style('stroke-width', opts.borderwidth + 'px');\n\n    var scrollBox = Lib.ensureSingle(legend, 'g', 'scrollbox');\n\n    var scrollBar = Lib.ensureSingle(legend, 'rect', 'scrollbar', function(s) {\n        s.attr({\n            rx: 20,\n            ry: 3,\n            width: 0,\n            height: 0\n        })\n        .call(Color.fill, '#808BA4');\n    });\n\n    var groups = scrollBox.selectAll('g.groups')\n        .data(legendData);\n\n    groups.enter().append('g')\n        .attr('class', 'groups');\n\n    groups.exit().remove();\n\n    var traces = groups.selectAll('g.traces')\n        .data(Lib.identity);\n\n    traces.enter().append('g').attr('class', 'traces');\n    traces.exit().remove();\n\n    traces.style('opacity', function(d) {\n        var trace = d[0].trace;\n        if(Registry.traceIs(trace, 'pie-like')) {\n            return hiddenSlices.indexOf(d[0].label) !== -1 ? 0.5 : 1;\n        } else {\n            return trace.visible === 'legendonly' ? 0.5 : 1;\n        }\n    })\n    .each(function() {\n        d3.select(this)\n            .call(drawTexts, gd, maxLength);\n    })\n    .call(style, gd)\n    .each(function() {\n        d3.select(this)\n            .call(setupTraceToggle, gd);\n    });\n\n    Lib.syncOrAsync([Plots.previousPromises,\n        function() {\n            if(firstRender) {\n                computeLegendDimensions(gd, groups, traces);\n                expandMargin(gd);\n            }\n\n            // Position and size the legend\n            var lxMin = 0;\n            var lxMax = fullLayout.width;\n            var lyMin = 0;\n            var lyMax = fullLayout.height;\n\n            computeLegendDimensions(gd, groups, traces);\n\n            if(opts._height > lyMax) {\n                // If the legend doesn't fit in the plot area,\n                // do not expand the vertical margins.\n                expandHorizontalMargin(gd);\n            } else {\n                expandMargin(gd);\n            }\n\n            // Scroll section must be executed after repositionLegend.\n            // It requires the legend width, height, x and y to position the scrollbox\n            // and these values are mutated in repositionLegend.\n            var gs = fullLayout._size;\n            var lx = gs.l + gs.w * opts.x;\n            var ly = gs.t + gs.h * (1 - opts.y);\n\n            if(Lib.isRightAnchor(opts)) {\n                lx -= opts._width;\n            } else if(Lib.isCenterAnchor(opts)) {\n                lx -= opts._width / 2;\n            }\n\n            if(Lib.isBottomAnchor(opts)) {\n                ly -= opts._height;\n            } else if(Lib.isMiddleAnchor(opts)) {\n                ly -= opts._height / 2;\n            }\n\n            // Make sure the legend left and right sides are visible\n            var legendWidth = opts._width;\n            var legendWidthMax = gs.w;\n\n            if(legendWidth > legendWidthMax) {\n                lx = gs.l;\n                legendWidth = legendWidthMax;\n            } else {\n                if(lx + legendWidth > lxMax) lx = lxMax - legendWidth;\n                if(lx < lxMin) lx = lxMin;\n                legendWidth = Math.min(lxMax - lx, opts._width);\n            }\n\n            // Make sure the legend top and bottom are visible\n            // (legends with a scroll bar are not allowed to stretch beyond the extended\n            // margins)\n            var legendHeight = opts._height;\n            var legendHeightMax = gs.h;\n\n            if(legendHeight > legendHeightMax) {\n                ly = gs.t;\n                legendHeight = legendHeightMax;\n            } else {\n                if(ly + legendHeight > lyMax) ly = lyMax - legendHeight;\n                if(ly < lyMin) ly = lyMin;\n                legendHeight = Math.min(lyMax - ly, opts._height);\n            }\n\n            // Set size and position of all the elements that make up a legend:\n            // legend, background and border, scroll box and scroll bar\n            Drawing.setTranslate(legend, lx, ly);\n\n            // to be safe, remove previous listeners\n            scrollBar.on('.drag', null);\n            legend.on('wheel', null);\n\n            if(opts._height <= legendHeight || gd._context.staticPlot) {\n                // if scrollbar should not be shown.\n                bg.attr({\n                    width: legendWidth - opts.borderwidth,\n                    height: legendHeight - opts.borderwidth,\n                    x: opts.borderwidth / 2,\n                    y: opts.borderwidth / 2\n                });\n\n                Drawing.setTranslate(scrollBox, 0, 0);\n\n                clipPath.select('rect').attr({\n                    width: legendWidth - 2 * opts.borderwidth,\n                    height: legendHeight - 2 * opts.borderwidth,\n                    x: opts.borderwidth,\n                    y: opts.borderwidth\n                });\n\n                Drawing.setClipUrl(scrollBox, clipId, gd);\n\n                Drawing.setRect(scrollBar, 0, 0, 0, 0);\n                delete opts._scrollY;\n            } else {\n                var scrollBarHeight = Math.max(constants.scrollBarMinHeight,\n                    legendHeight * legendHeight / opts._height);\n                var scrollBarYMax = legendHeight -\n                    scrollBarHeight -\n                    2 * constants.scrollBarMargin;\n                var scrollBoxYMax = opts._height - legendHeight;\n                var scrollRatio = scrollBarYMax / scrollBoxYMax;\n\n                var scrollBoxY = Math.min(opts._scrollY || 0, scrollBoxYMax);\n\n                // increase the background and clip-path width\n                // by the scrollbar width and margin\n                bg.attr({\n                    width: legendWidth -\n                        2 * opts.borderwidth +\n                        constants.scrollBarWidth +\n                        constants.scrollBarMargin,\n                    height: legendHeight - opts.borderwidth,\n                    x: opts.borderwidth / 2,\n                    y: opts.borderwidth / 2\n                });\n\n                clipPath.select('rect').attr({\n                    width: legendWidth -\n                        2 * opts.borderwidth +\n                        constants.scrollBarWidth +\n                        constants.scrollBarMargin,\n                    height: legendHeight - 2 * opts.borderwidth,\n                    x: opts.borderwidth,\n                    y: opts.borderwidth + scrollBoxY\n                });\n\n                Drawing.setClipUrl(scrollBox, clipId, gd);\n\n                scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);\n\n                legend.on('wheel', function() {\n                    scrollBoxY = Lib.constrain(\n                        opts._scrollY +\n                            d3.event.deltaY / scrollBarYMax * scrollBoxYMax,\n                        0, scrollBoxYMax);\n                    scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);\n                    if(scrollBoxY !== 0 && scrollBoxY !== scrollBoxYMax) {\n                        d3.event.preventDefault();\n                    }\n                });\n\n                var eventY0, scrollBoxY0;\n\n                var drag = d3.behavior.drag()\n                .on('dragstart', function() {\n                    eventY0 = d3.event.sourceEvent.clientY;\n                    scrollBoxY0 = scrollBoxY;\n                })\n                .on('drag', function() {\n                    var e = d3.event.sourceEvent;\n                    if(e.buttons === 2 || e.ctrlKey) return;\n\n                    scrollBoxY = Lib.constrain(\n                        (e.clientY - eventY0) / scrollRatio + scrollBoxY0,\n                        0, scrollBoxYMax);\n                    scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);\n                });\n\n                scrollBar.call(drag);\n            }\n\n\n            function scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio) {\n                opts._scrollY = gd._fullLayout.legend._scrollY = scrollBoxY;\n                Drawing.setTranslate(scrollBox, 0, -scrollBoxY);\n\n                Drawing.setRect(\n                    scrollBar,\n                    legendWidth,\n                    constants.scrollBarMargin + scrollBoxY * scrollRatio,\n                    constants.scrollBarWidth,\n                    scrollBarHeight\n                );\n                clipPath.select('rect').attr({\n                    y: opts.borderwidth + scrollBoxY\n                });\n            }\n\n            if(gd._context.edits.legendPosition) {\n                var xf, yf, x0, y0;\n\n                legend.classed('cursor-move', true);\n\n                dragElement.init({\n                    element: legend.node(),\n                    gd: gd,\n                    prepFn: function() {\n                        var transform = Drawing.getTranslate(legend);\n\n                        x0 = transform.x;\n                        y0 = transform.y;\n                    },\n                    moveFn: function(dx, dy) {\n                        var newX = x0 + dx;\n                        var newY = y0 + dy;\n\n                        Drawing.setTranslate(legend, newX, newY);\n\n                        xf = dragElement.align(newX, 0, gs.l, gs.l + gs.w, opts.xanchor);\n                        yf = dragElement.align(newY, 0, gs.t + gs.h, gs.t, opts.yanchor);\n                    },\n                    doneFn: function() {\n                        if(xf !== undefined && yf !== undefined) {\n                            Registry.call('_guiRelayout', gd, {'legend.x': xf, 'legend.y': yf});\n                        }\n                    },\n                    clickFn: function(numClicks, e) {\n                        var clickedTrace = fullLayout._infolayer.selectAll('g.traces').filter(function() {\n                            var bbox = this.getBoundingClientRect();\n                            return (\n                                e.clientX >= bbox.left && e.clientX <= bbox.right &&\n                                e.clientY >= bbox.top && e.clientY <= bbox.bottom\n                            );\n                        });\n                        if(clickedTrace.size() > 0) {\n                            clickOrDoubleClick(gd, legend, clickedTrace, numClicks, e);\n                        }\n                    }\n                });\n            }\n        }], gd);\n};\n\nfunction clickOrDoubleClick(gd, legend, legendItem, numClicks, evt) {\n    var trace = legendItem.data()[0][0].trace;\n\n    var evtData = {\n        event: evt,\n        node: legendItem.node(),\n        curveNumber: trace.index,\n        expandedIndex: trace._expandedIndex,\n        data: gd.data,\n        layout: gd.layout,\n        frames: gd._transitionData._frames,\n        config: gd._context,\n        fullData: gd._fullData,\n        fullLayout: gd._fullLayout\n    };\n\n    if(trace._group) {\n        evtData.group = trace._group;\n    }\n    if(Registry.traceIs(trace, 'pie-like')) {\n        evtData.label = legendItem.datum()[0].label;\n    }\n\n    var clickVal = Events.triggerHandler(gd, 'plotly_legendclick', evtData);\n    if(clickVal === false) return;\n\n    if(numClicks === 1) {\n        legend._clickTimeout = setTimeout(function() {\n            handleClick(legendItem, gd, numClicks);\n        }, DBLCLICKDELAY);\n    } else if(numClicks === 2) {\n        if(legend._clickTimeout) clearTimeout(legend._clickTimeout);\n        gd._legendMouseDownTime = 0;\n\n        var dblClickVal = Events.triggerHandler(gd, 'plotly_legenddoubleclick', evtData);\n        if(dblClickVal !== false) handleClick(legendItem, gd, numClicks);\n    }\n}\n\nfunction drawTexts(g, gd, maxLength) {\n    var legendItem = g.data()[0][0];\n    var fullLayout = gd._fullLayout;\n    var trace = legendItem.trace;\n    var isPieLike = Registry.traceIs(trace, 'pie-like');\n    var traceIndex = trace.index;\n    var isEditable = gd._context.edits.legendText && !isPieLike;\n\n    var name = isPieLike ? legendItem.label : trace.name;\n    if(trace._meta) {\n        name = Lib.templateString(name, trace._meta);\n    }\n\n    var textEl = Lib.ensureSingle(g, 'text', 'legendtext');\n\n    textEl.attr('text-anchor', 'start')\n        .classed('user-select-none', true)\n        .call(Drawing.font, fullLayout.legend.font)\n        .text(isEditable ? ensureLength(name, maxLength) : name);\n\n    svgTextUtils.positionText(textEl, constants.textOffsetX, 0);\n\n    function textLayout(s) {\n        svgTextUtils.convertToTspans(s, gd, function() {\n            computeTextDimensions(g, gd);\n        });\n    }\n\n    if(isEditable) {\n        textEl.call(svgTextUtils.makeEditable, {gd: gd, text: name})\n            .call(textLayout)\n            .on('edit', function(newName) {\n                this.text(ensureLength(newName, maxLength))\n                    .call(textLayout);\n\n                var fullInput = legendItem.trace._fullInput || {};\n                var update = {};\n\n                if(Registry.hasTransform(fullInput, 'groupby')) {\n                    var groupbyIndices = Registry.getTransformIndices(fullInput, 'groupby');\n                    var index = groupbyIndices[groupbyIndices.length - 1];\n\n                    var kcont = Lib.keyedContainer(fullInput, 'transforms[' + index + '].styles', 'target', 'value.name');\n\n                    kcont.set(legendItem.trace._group, newName);\n\n                    update = kcont.constructUpdate();\n                } else {\n                    update.name = newName;\n                }\n\n                return Registry.call('_guiRestyle', gd, update, traceIndex);\n            });\n    } else {\n        textLayout(textEl);\n    }\n}\n\n/*\n * Make sure we have a reasonably clickable region.\n * If this string is missing or very short, pad it with spaces out to at least\n * 4 characters, up to the max length of other labels, on the assumption that\n * most characters are wider than spaces so a string of spaces will usually be\n * no wider than the real labels.\n */\nfunction ensureLength(str, maxLength) {\n    var targetLength = Math.max(4, maxLength);\n    if(str && str.trim().length >= targetLength / 2) return str;\n    str = str || '';\n    for(var i = targetLength - str.length; i > 0; i--) str += ' ';\n    return str;\n}\n\nfunction setupTraceToggle(g, gd) {\n    var newMouseDownTime;\n    var numClicks = 1;\n\n    var traceToggle = Lib.ensureSingle(g, 'rect', 'legendtoggle', function(s) {\n        s.style('cursor', 'pointer')\n            .attr('pointer-events', 'all')\n            .call(Color.fill, 'rgba(0,0,0,0)');\n    });\n\n    traceToggle.on('mousedown', function() {\n        newMouseDownTime = (new Date()).getTime();\n        if(newMouseDownTime - gd._legendMouseDownTime < DBLCLICKDELAY) {\n            // in a click train\n            numClicks += 1;\n        } else {\n            // new click train\n            numClicks = 1;\n            gd._legendMouseDownTime = newMouseDownTime;\n        }\n    });\n    traceToggle.on('mouseup', function() {\n        if(gd._dragged || gd._editing) return;\n        var legend = gd._fullLayout.legend;\n\n        if((new Date()).getTime() - gd._legendMouseDownTime > DBLCLICKDELAY) {\n            numClicks = Math.max(numClicks - 1, 1);\n        }\n\n        clickOrDoubleClick(gd, legend, g, numClicks, d3.event);\n    });\n}\n\nfunction computeTextDimensions(g, gd) {\n    var legendItem = g.data()[0][0];\n\n    if(!legendItem.trace.showlegend) {\n        g.remove();\n        return;\n    }\n\n    var mathjaxGroup = g.select('g[class*=math-group]');\n    var mathjaxNode = mathjaxGroup.node();\n    var opts = gd._fullLayout.legend;\n    var lineHeight = opts.font.size * LINE_SPACING;\n    var height, width;\n\n    if(mathjaxNode) {\n        var mathjaxBB = Drawing.bBox(mathjaxNode);\n\n        height = mathjaxBB.height;\n        width = mathjaxBB.width;\n\n        Drawing.setTranslate(mathjaxGroup, 0, (height / 4));\n    } else {\n        var text = g.select('.legendtext');\n        var textLines = svgTextUtils.lineCount(text);\n        var textNode = text.node();\n\n        height = lineHeight * textLines;\n        width = textNode ? Drawing.bBox(textNode).width : 0;\n\n        // approximation to height offset to center the font\n        // to avoid getBoundingClientRect\n        var textY = lineHeight * (0.3 + (1 - textLines) / 2);\n        svgTextUtils.positionText(text, constants.textOffsetX, textY);\n    }\n\n    legendItem.lineHeight = lineHeight;\n    legendItem.height = Math.max(height, 16) + 3;\n    legendItem.width = width;\n}\n\nfunction computeLegendDimensions(gd, groups, traces) {\n    var fullLayout = gd._fullLayout;\n    var opts = fullLayout.legend;\n    var borderwidth = opts.borderwidth;\n    var isGrouped = helpers.isGrouped(opts);\n\n    var extraWidth = 0;\n\n    var traceGap = 5;\n\n    opts._width = 0;\n    opts._height = 0;\n\n    if(helpers.isVertical(opts)) {\n        if(isGrouped) {\n            groups.each(function(d, i) {\n                Drawing.setTranslate(this, 0, i * opts.tracegroupgap);\n            });\n        }\n\n        traces.each(function(d) {\n            var legendItem = d[0];\n            var textHeight = legendItem.height;\n            var textWidth = legendItem.width;\n\n            Drawing.setTranslate(this,\n                borderwidth,\n                (5 + borderwidth + opts._height + textHeight / 2));\n\n            opts._height += textHeight;\n            opts._width = Math.max(opts._width, textWidth);\n        });\n\n        opts._width += 45 + borderwidth * 2;\n        opts._height += 10 + borderwidth * 2;\n\n        if(isGrouped) {\n            opts._height += (opts._lgroupsLength - 1) * opts.tracegroupgap;\n        }\n\n        extraWidth = 40;\n    } else if(isGrouped) {\n        var maxHeight = 0;\n        var maxWidth = 0;\n        var groupData = groups.data();\n\n        var maxItems = 0;\n\n        var i;\n        for(i = 0; i < groupData.length; i++) {\n            var group = groupData[i];\n            var groupWidths = group.map(function(legendItemArray) {\n                return legendItemArray[0].width;\n            });\n\n            var groupWidth = Lib.aggNums(Math.max, null, groupWidths);\n            var groupHeight = group.reduce(function(a, b) {\n                return a + b[0].height;\n            }, 0);\n\n            maxWidth = Math.max(maxWidth, groupWidth);\n            maxHeight = Math.max(maxHeight, groupHeight);\n            maxItems = Math.max(maxItems, group.length);\n        }\n\n        maxWidth += traceGap;\n        maxWidth += 40;\n\n        var groupXOffsets = [opts._width];\n        var groupYOffsets = [];\n        var rowNum = 0;\n        for(i = 0; i < groupData.length; i++) {\n            if(fullLayout._size.w < (borderwidth + opts._width + traceGap + maxWidth)) {\n                groupXOffsets[groupXOffsets.length - 1] = groupXOffsets[0];\n                opts._width = maxWidth;\n                rowNum++;\n            } else {\n                opts._width += maxWidth + borderwidth;\n            }\n\n            var rowYOffset = (rowNum * maxHeight);\n            rowYOffset += rowNum > 0 ? opts.tracegroupgap : 0;\n\n            groupYOffsets.push(rowYOffset);\n            groupXOffsets.push(opts._width);\n        }\n\n        groups.each(function(d, i) {\n            Drawing.setTranslate(this, groupXOffsets[i], groupYOffsets[i]);\n        });\n\n        groups.each(function() {\n            var group = d3.select(this);\n            var groupTraces = group.selectAll('g.traces');\n            var groupHeight = 0;\n\n            groupTraces.each(function(d) {\n                var legendItem = d[0];\n                var textHeight = legendItem.height;\n\n                Drawing.setTranslate(this,\n                    0,\n                    (5 + borderwidth + groupHeight + textHeight / 2));\n\n                groupHeight += textHeight;\n            });\n        });\n\n        var maxYLegend = groupYOffsets[groupYOffsets.length - 1] + maxHeight;\n        opts._height = 10 + (borderwidth * 2) + maxYLegend;\n\n        var maxOffset = Math.max.apply(null, groupXOffsets);\n        opts._width = maxOffset + maxWidth + 40;\n        opts._width += borderwidth * 2;\n    } else {\n        var rowHeight = 0;\n        var maxTraceHeight = 0;\n        var maxTraceWidth = 0;\n        var offsetX = 0;\n        var fullTracesWidth = 0;\n\n        // calculate largest width for traces and use for width of all legend items\n        traces.each(function(d) {\n            maxTraceWidth = Math.max(40 + d[0].width, maxTraceWidth);\n            fullTracesWidth += 40 + d[0].width + traceGap;\n        });\n\n        // check if legend fits in one row\n        var oneRowLegend = fullLayout._size.w > borderwidth + fullTracesWidth - traceGap;\n\n        traces.each(function(d) {\n            var legendItem = d[0];\n            var traceWidth = oneRowLegend ? 40 + d[0].width : maxTraceWidth;\n\n            if((borderwidth + offsetX + traceGap + traceWidth) > fullLayout._size.w) {\n                offsetX = 0;\n                rowHeight += maxTraceHeight;\n                opts._height += maxTraceHeight;\n                // reset for next row\n                maxTraceHeight = 0;\n            }\n\n            Drawing.setTranslate(this,\n                (borderwidth + offsetX),\n                (5 + borderwidth + legendItem.height / 2) + rowHeight);\n\n            opts._width += traceGap + traceWidth;\n\n            // keep track of tallest trace in group\n            offsetX += traceGap + traceWidth;\n            maxTraceHeight = Math.max(legendItem.height, maxTraceHeight);\n        });\n\n        if(oneRowLegend) {\n            opts._height = maxTraceHeight;\n        } else {\n            opts._height += maxTraceHeight;\n        }\n\n        opts._width += borderwidth * 2;\n        opts._height += 10 + borderwidth * 2;\n    }\n\n    // make sure we're only getting full pixels\n    opts._width = Math.ceil(opts._width);\n    opts._height = Math.ceil(opts._height);\n\n    var isEditable = (\n        gd._context.edits.legendText ||\n        gd._context.edits.legendPosition\n    );\n\n    traces.each(function(d) {\n        var legendItem = d[0];\n        var bg = d3.select(this).select('.legendtoggle');\n\n        Drawing.setRect(bg,\n            0,\n            -legendItem.height / 2,\n            (isEditable ? 0 : opts._width) + extraWidth,\n            legendItem.height\n        );\n    });\n}\n\nfunction expandMargin(gd) {\n    var fullLayout = gd._fullLayout;\n    var opts = fullLayout.legend;\n\n    var xanchor = 'left';\n    if(Lib.isRightAnchor(opts)) {\n        xanchor = 'right';\n    } else if(Lib.isCenterAnchor(opts)) {\n        xanchor = 'center';\n    }\n\n    var yanchor = 'top';\n    if(Lib.isBottomAnchor(opts)) {\n        yanchor = 'bottom';\n    } else if(Lib.isMiddleAnchor(opts)) {\n        yanchor = 'middle';\n    }\n\n    // lastly check if the margin auto-expand has changed\n    Plots.autoMargin(gd, 'legend', {\n        x: opts.x,\n        y: opts.y,\n        l: opts._width * (FROM_TL[xanchor]),\n        r: opts._width * (FROM_BR[xanchor]),\n        b: opts._height * (FROM_BR[yanchor]),\n        t: opts._height * (FROM_TL[yanchor])\n    });\n}\n\nfunction expandHorizontalMargin(gd) {\n    var fullLayout = gd._fullLayout;\n    var opts = fullLayout.legend;\n\n    var xanchor = 'left';\n    if(Lib.isRightAnchor(opts)) {\n        xanchor = 'right';\n    } else if(Lib.isCenterAnchor(opts)) {\n        xanchor = 'center';\n    }\n\n    // lastly check if the margin auto-expand has changed\n    Plots.autoMargin(gd, 'legend', {\n        x: opts.x,\n        y: 0.5,\n        l: opts._width * (FROM_TL[xanchor]),\n        r: opts._width * (FROM_BR[xanchor]),\n        b: 0,\n        t: 0\n    });\n}\n\n},{\"../../constants/alignment\":675,\"../../constants/interactions\":679,\"../../lib\":703,\"../../lib/events\":692,\"../../lib/svg_text_utils\":727,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../dragelement\":598,\"../drawing\":601,\"./constants\":630,\"./get_legend_data\":633,\"./handle_click\":634,\"./helpers\":635,\"./style\":637,\"d3\":157}],633:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar helpers = _dereq_('./helpers');\n\nmodule.exports = function getLegendData(calcdata, opts) {\n    var lgroupToTraces = {};\n    var lgroups = [];\n    var hasOneNonBlankGroup = false;\n    var slicesShown = {};\n    var lgroupi = 0;\n    var i, j;\n\n    function addOneItem(legendGroup, legendItem) {\n        // each '' legend group is treated as a separate group\n        if(legendGroup === '' || !helpers.isGrouped(opts)) {\n            var uniqueGroup = '~~i' + lgroupi; // TODO: check this against fullData legendgroups?\n\n            lgroups.push(uniqueGroup);\n            lgroupToTraces[uniqueGroup] = [[legendItem]];\n            lgroupi++;\n        } else if(lgroups.indexOf(legendGroup) === -1) {\n            lgroups.push(legendGroup);\n            hasOneNonBlankGroup = true;\n            lgroupToTraces[legendGroup] = [[legendItem]];\n        } else lgroupToTraces[legendGroup].push([legendItem]);\n    }\n\n    // build an { legendgroup: [cd0, cd0], ... } object\n    for(i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n        var lgroup = trace.legendgroup;\n\n        if(!trace.visible || !trace.showlegend) continue;\n\n        if(Registry.traceIs(trace, 'pie-like')) {\n            if(!slicesShown[lgroup]) slicesShown[lgroup] = {};\n\n            for(j = 0; j < cd.length; j++) {\n                var labelj = cd[j].label;\n\n                if(!slicesShown[lgroup][labelj]) {\n                    addOneItem(lgroup, {\n                        label: labelj,\n                        color: cd[j].color,\n                        i: cd[j].i,\n                        trace: trace,\n                        pts: cd[j].pts\n                    });\n\n                    slicesShown[lgroup][labelj] = true;\n                }\n            }\n        } else addOneItem(lgroup, cd0);\n    }\n\n    // won't draw a legend in this case\n    if(!lgroups.length) return [];\n\n    // rearrange lgroupToTraces into a d3-friendly array of arrays\n    var lgroupsLength = lgroups.length;\n    var ltraces;\n    var legendData;\n\n    if(hasOneNonBlankGroup && helpers.isGrouped(opts)) {\n        legendData = new Array(lgroupsLength);\n\n        for(i = 0; i < lgroupsLength; i++) {\n            ltraces = lgroupToTraces[lgroups[i]];\n            legendData[i] = helpers.isReversed(opts) ? ltraces.reverse() : ltraces;\n        }\n    } else {\n        // collapse all groups into one if all groups are blank\n        legendData = [new Array(lgroupsLength)];\n\n        for(i = 0; i < lgroupsLength; i++) {\n            ltraces = lgroupToTraces[lgroups[i]][0];\n            legendData[0][helpers.isReversed(opts) ? lgroupsLength - i - 1 : i] = ltraces;\n        }\n        lgroupsLength = 1;\n    }\n\n    // needed in repositionLegend\n    opts._lgroupsLength = lgroupsLength;\n    return legendData;\n};\n\n},{\"../../registry\":831,\"./helpers\":635}],634:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar SHOWISOLATETIP = true;\n\nmodule.exports = function handleClick(g, gd, numClicks) {\n    var fullLayout = gd._fullLayout;\n\n    if(gd._dragged || gd._editing) return;\n\n    var itemClick = fullLayout.legend.itemclick;\n    var itemDoubleClick = fullLayout.legend.itemdoubleclick;\n\n    if(numClicks === 1 && itemClick === 'toggle' && itemDoubleClick === 'toggleothers' &&\n        SHOWISOLATETIP && gd.data && gd._context.showTips\n    ) {\n        Lib.notifier(Lib._(gd, 'Double-click on legend to isolate one trace'), 'long');\n        SHOWISOLATETIP = false;\n    } else {\n        SHOWISOLATETIP = false;\n    }\n\n    var mode;\n    if(numClicks === 1) mode = itemClick;\n    else if(numClicks === 2) mode = itemDoubleClick;\n    if(!mode) return;\n\n    var hiddenSlices = fullLayout.hiddenlabels ?\n        fullLayout.hiddenlabels.slice() :\n        [];\n\n    var legendItem = g.data()[0][0];\n    var fullData = gd._fullData;\n    var fullTrace = legendItem.trace;\n    var legendgroup = fullTrace.legendgroup;\n\n    var i, j, kcont, key, keys, val;\n    var attrUpdate = {};\n    var attrIndices = [];\n    var carrs = [];\n    var carrIdx = [];\n\n    function insertUpdate(traceIndex, key, value) {\n        var attrIndex = attrIndices.indexOf(traceIndex);\n        var valueArray = attrUpdate[key];\n        if(!valueArray) {\n            valueArray = attrUpdate[key] = [];\n        }\n\n        if(attrIndices.indexOf(traceIndex) === -1) {\n            attrIndices.push(traceIndex);\n            attrIndex = attrIndices.length - 1;\n        }\n\n        valueArray[attrIndex] = value;\n\n        return attrIndex;\n    }\n\n    function setVisibility(fullTrace, visibility) {\n        var fullInput = fullTrace._fullInput;\n        if(Registry.hasTransform(fullInput, 'groupby')) {\n            var kcont = carrs[fullInput.index];\n            if(!kcont) {\n                var groupbyIndices = Registry.getTransformIndices(fullInput, 'groupby');\n                var lastGroupbyIndex = groupbyIndices[groupbyIndices.length - 1];\n                kcont = Lib.keyedContainer(fullInput, 'transforms[' + lastGroupbyIndex + '].styles', 'target', 'value.visible');\n                carrs[fullInput.index] = kcont;\n            }\n\n            var curState = kcont.get(fullTrace._group);\n\n            // If not specified, assume visible. This happens if there are other style\n            // properties set for a group but not the visibility. There are many similar\n            // ways to do this (e.g. why not just `curState = fullTrace.visible`??? The\n            // answer is: because it breaks other things like groupby trace names in\n            // subtle ways.)\n            if(curState === undefined) {\n                curState = true;\n            }\n\n            if(curState !== false) {\n                // true -> legendonly. All others toggle to true:\n                kcont.set(fullTrace._group, visibility);\n            }\n            carrIdx[fullInput.index] = insertUpdate(fullInput.index, 'visible', fullInput.visible === false ? false : true);\n        } else {\n            // false -> false (not possible since will not be visible in legend)\n            // true -> legendonly\n            // legendonly -> true\n            var nextVisibility = fullInput.visible === false ? false : visibility;\n\n            insertUpdate(fullInput.index, 'visible', nextVisibility);\n        }\n    }\n\n    if(Registry.traceIs(fullTrace, 'pie-like')) {\n        var thisLabel = legendItem.label;\n        var thisLabelIndex = hiddenSlices.indexOf(thisLabel);\n\n        if(mode === 'toggle') {\n            if(thisLabelIndex === -1) hiddenSlices.push(thisLabel);\n            else hiddenSlices.splice(thisLabelIndex, 1);\n        } else if(mode === 'toggleothers') {\n            hiddenSlices = [];\n            gd.calcdata[0].forEach(function(d) {\n                if(thisLabel !== d.label) {\n                    hiddenSlices.push(d.label);\n                }\n            });\n            if(gd._fullLayout.hiddenlabels && gd._fullLayout.hiddenlabels.length === hiddenSlices.length && thisLabelIndex === -1) {\n                hiddenSlices = [];\n            }\n        }\n\n        Registry.call('_guiRelayout', gd, 'hiddenlabels', hiddenSlices);\n    } else {\n        var hasLegendgroup = legendgroup && legendgroup.length;\n        var traceIndicesInGroup = [];\n        var tracei;\n        if(hasLegendgroup) {\n            for(i = 0; i < fullData.length; i++) {\n                tracei = fullData[i];\n                if(!tracei.visible) continue;\n                if(tracei.legendgroup === legendgroup) {\n                    traceIndicesInGroup.push(i);\n                }\n            }\n        }\n\n        if(mode === 'toggle') {\n            var nextVisibility;\n\n            switch(fullTrace.visible) {\n                case true:\n                    nextVisibility = 'legendonly';\n                    break;\n                case false:\n                    nextVisibility = false;\n                    break;\n                case 'legendonly':\n                    nextVisibility = true;\n                    break;\n            }\n\n            if(hasLegendgroup) {\n                for(i = 0; i < fullData.length; i++) {\n                    if(fullData[i].visible !== false && fullData[i].legendgroup === legendgroup) {\n                        setVisibility(fullData[i], nextVisibility);\n                    }\n                }\n            } else {\n                setVisibility(fullTrace, nextVisibility);\n            }\n        } else if(mode === 'toggleothers') {\n            // Compute the clicked index. expandedIndex does what we want for expanded traces\n            // but also culls hidden traces. That means we have some work to do.\n            var isClicked, isInGroup, otherState;\n            var isIsolated = true;\n            for(i = 0; i < fullData.length; i++) {\n                isClicked = fullData[i] === fullTrace;\n                if(isClicked) continue;\n\n                isInGroup = (hasLegendgroup && fullData[i].legendgroup === legendgroup);\n\n                if(!isInGroup && fullData[i].visible === true && !Registry.traceIs(fullData[i], 'notLegendIsolatable')) {\n                    isIsolated = false;\n                    break;\n                }\n            }\n\n            for(i = 0; i < fullData.length; i++) {\n                // False is sticky; we don't change it.\n                if(fullData[i].visible === false) continue;\n\n                if(Registry.traceIs(fullData[i], 'notLegendIsolatable')) {\n                    continue;\n                }\n\n                switch(fullTrace.visible) {\n                    case 'legendonly':\n                        setVisibility(fullData[i], true);\n                        break;\n                    case true:\n                        otherState = isIsolated ? true : 'legendonly';\n                        isClicked = fullData[i] === fullTrace;\n                        isInGroup = isClicked || (hasLegendgroup && fullData[i].legendgroup === legendgroup);\n                        setVisibility(fullData[i], isInGroup ? true : otherState);\n                        break;\n                }\n            }\n        }\n\n        for(i = 0; i < carrs.length; i++) {\n            kcont = carrs[i];\n            if(!kcont) continue;\n            var update = kcont.constructUpdate();\n\n            var updateKeys = Object.keys(update);\n            for(j = 0; j < updateKeys.length; j++) {\n                key = updateKeys[j];\n                val = attrUpdate[key] = attrUpdate[key] || [];\n                val[carrIdx[i]] = update[key];\n            }\n        }\n\n        // The length of the value arrays should be equal and any unspecified\n        // values should be explicitly undefined for them to get properly culled\n        // as updates and not accidentally reset to the default value. This fills\n        // out sparse arrays with the required number of undefined values:\n        keys = Object.keys(attrUpdate);\n        for(i = 0; i < keys.length; i++) {\n            key = keys[i];\n            for(j = 0; j < attrIndices.length; j++) {\n                // Use hasOwnPropety to protect against falsey values:\n                if(!attrUpdate[key].hasOwnProperty(j)) {\n                    attrUpdate[key][j] = undefined;\n                }\n            }\n        }\n\n        Registry.call('_guiRestyle', gd, attrUpdate, attrIndices);\n    }\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],635:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nexports.isGrouped = function isGrouped(legendLayout) {\n    return (legendLayout.traceorder || '').indexOf('grouped') !== -1;\n};\n\nexports.isVertical = function isVertical(legendLayout) {\n    return legendLayout.orientation !== 'h';\n};\n\nexports.isReversed = function isReversed(legendLayout) {\n    return (legendLayout.traceorder || '').indexOf('reversed') !== -1;\n};\n\n},{}],636:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'legend',\n\n    layoutAttributes: _dereq_('./attributes'),\n    supplyLayoutDefaults: _dereq_('./defaults'),\n\n    draw: _dereq_('./draw'),\n    style: _dereq_('./style')\n};\n\n},{\"./attributes\":629,\"./defaults\":631,\"./draw\":632,\"./style\":637}],637:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\n\nvar subTypes = _dereq_('../../traces/scatter/subtypes');\nvar stylePie = _dereq_('../../traces/pie/style_one');\nvar pieCastOption = _dereq_('../../traces/pie/helpers').castOption;\n\nvar CST_MARKER_SIZE = 12;\nvar CST_LINE_WIDTH = 5;\nvar CST_MARKER_LINE_WIDTH = 2;\nvar MAX_LINE_WIDTH = 10;\nvar MAX_MARKER_LINE_WIDTH = 5;\n\nmodule.exports = function style(s, gd) {\n    var fullLayout = gd._fullLayout;\n    var legend = fullLayout.legend;\n    var constantItemSizing = legend.itemsizing === 'constant';\n\n    function boundLineWidth(mlw, cont, max, cst) {\n        var v;\n        if(mlw + 1) {\n            v = mlw;\n        } else if(cont && cont.width > 0) {\n            v = cont.width;\n        } else {\n            return 0;\n        }\n        return constantItemSizing ? cst : Math.min(v, max);\n    }\n\n    s.each(function(d) {\n        var traceGroup = d3.select(this);\n\n        var layers = Lib.ensureSingle(traceGroup, 'g', 'layers');\n        layers.style('opacity', d[0].trace.opacity);\n\n        var valign = legend.valign;\n        var lineHeight = d[0].lineHeight;\n        var height = d[0].height;\n\n        if(valign === 'middle' || !lineHeight || !height) {\n            layers.attr('transform', null);\n        } else {\n            var factor = {top: 1, bottom: -1}[valign];\n            var markerOffsetY = factor * (0.5 * (lineHeight - height + 3));\n            layers.attr('transform', 'translate(0,' + markerOffsetY + ')');\n        }\n\n        var fill = layers\n            .selectAll('g.legendfill')\n                .data([d]);\n        fill.enter().append('g')\n            .classed('legendfill', true);\n\n        var line = layers\n            .selectAll('g.legendlines')\n                .data([d]);\n        line.enter().append('g')\n            .classed('legendlines', true);\n\n        var symbol = layers\n            .selectAll('g.legendsymbols')\n                .data([d]);\n        symbol.enter().append('g')\n            .classed('legendsymbols', true);\n\n        symbol.selectAll('g.legendpoints')\n            .data([d])\n          .enter().append('g')\n            .classed('legendpoints', true);\n    })\n    .each(styleWaterfalls)\n    .each(styleFunnels)\n    .each(styleBars)\n    .each(styleBoxes)\n    .each(styleFunnelareas)\n    .each(stylePies)\n    .each(styleLines)\n    .each(stylePoints)\n    .each(styleCandles)\n    .each(styleOHLC);\n\n    function styleLines(d) {\n        var d0 = d[0];\n        var trace = d0.trace;\n        var showFill = trace.visible && trace.fill && trace.fill !== 'none';\n        var showLine = subTypes.hasLines(trace);\n        var contours = trace.contours;\n        var showGradientLine = false;\n        var showGradientFill = false;\n        var dMod, tMod;\n\n        if(contours) {\n            var coloring = contours.coloring;\n\n            if(coloring === 'lines') {\n                showGradientLine = true;\n            } else {\n                showLine = coloring === 'none' || coloring === 'heatmap' || contours.showlines;\n            }\n\n            if(contours.type === 'constraint') {\n                showFill = contours._operation !== '=';\n            } else if(coloring === 'fill' || coloring === 'heatmap') {\n                showGradientFill = true;\n            }\n        }\n\n        // with fill and no markers or text, move the line and fill up a bit\n        // so it's more centered\n        var markersOrText = subTypes.hasMarkers(trace) || subTypes.hasText(trace);\n        var anyFill = showFill || showGradientFill;\n        var anyLine = showLine || showGradientLine;\n        var pathStart = (markersOrText || !anyFill) ? 'M5,0' :\n            // with a line leave it slightly below center, to leave room for the\n            // line thickness and because the line is usually more prominent\n            anyLine ? 'M5,-2' : 'M5,-3';\n\n        var this3 = d3.select(this);\n\n        var fill = this3.select('.legendfill').selectAll('path')\n            .data(showFill || showGradientFill ? [d] : []);\n        fill.enter().append('path').classed('js-fill', true);\n        fill.exit().remove();\n        fill.attr('d', pathStart + 'h30v6h-30z')\n            .call(showFill ? Drawing.fillGroupStyle : fillGradient);\n\n        if(showLine || showGradientLine) {\n            var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);\n            tMod = Lib.minExtend(trace, {line: {width: lw}});\n            dMod = [Lib.minExtend(d0, {trace: tMod})];\n        }\n\n        var line = this3.select('.legendlines').selectAll('path')\n            .data(showLine || showGradientLine ? [dMod] : []);\n        line.enter().append('path').classed('js-line', true);\n        line.exit().remove();\n\n        // this is ugly... but you can't apply a gradient to a perfectly\n        // horizontal or vertical line. Presumably because then\n        // the system doesn't know how to scale vertical variation, even\n        // though there *is* no vertical variation in this case.\n        // so add an invisibly small angle to the line\n        // This issue (and workaround) exist across (Mac) Chrome, FF, and Safari\n        line.attr('d', pathStart + (showGradientLine ? 'l30,0.0001' : 'h30'))\n            .call(showLine ? Drawing.lineGroupStyle : lineGradient);\n\n        function fillGradient(s) {\n            if(s.size()) {\n                var gradientID = 'legendfill-' + trace.uid;\n                Drawing.gradient(s, gd, gradientID, 'horizontalreversed',\n                    trace.colorscale, 'fill');\n            }\n        }\n\n        function lineGradient(s) {\n            if(s.size()) {\n                var gradientID = 'legendline-' + trace.uid;\n                Drawing.lineGroupStyle(s);\n                Drawing.gradient(s, gd, gradientID, 'horizontalreversed',\n                    trace.colorscale, 'stroke');\n            }\n        }\n    }\n\n    function stylePoints(d) {\n        var d0 = d[0];\n        var trace = d0.trace;\n        var showMarkers = subTypes.hasMarkers(trace);\n        var showText = subTypes.hasText(trace);\n        var showLines = subTypes.hasLines(trace);\n        var dMod, tMod;\n\n        // 'scatter3d' don't use gd.calcdata,\n        // use d0.trace to infer arrayOk attributes\n\n        function boundVal(attrIn, arrayToValFn, bounds, cst) {\n            var valIn = Lib.nestedProperty(trace, attrIn).get();\n            var valToBound = (Lib.isArrayOrTypedArray(valIn) && arrayToValFn) ?\n                arrayToValFn(valIn) :\n                valIn;\n\n            if(constantItemSizing && valToBound && cst !== undefined) {\n                valToBound = cst;\n            }\n\n            if(bounds) {\n                if(valToBound < bounds[0]) return bounds[0];\n                else if(valToBound > bounds[1]) return bounds[1];\n            }\n            return valToBound;\n        }\n\n        function pickFirst(array) { return array[0]; }\n\n        // constrain text, markers, etc so they'll fit on the legend\n        if(showMarkers || showText || showLines) {\n            var dEdit = {};\n            var tEdit = {};\n\n            if(showMarkers) {\n                dEdit.mc = boundVal('marker.color', pickFirst);\n                dEdit.mx = boundVal('marker.symbol', pickFirst);\n                dEdit.mo = boundVal('marker.opacity', Lib.mean, [0.2, 1]);\n                dEdit.mlc = boundVal('marker.line.color', pickFirst);\n                dEdit.mlw = boundVal('marker.line.width', Lib.mean, [0, 5], CST_MARKER_LINE_WIDTH);\n                tEdit.marker = {\n                    sizeref: 1,\n                    sizemin: 1,\n                    sizemode: 'diameter'\n                };\n\n                var ms = boundVal('marker.size', Lib.mean, [2, 16], CST_MARKER_SIZE);\n                dEdit.ms = ms;\n                tEdit.marker.size = ms;\n            }\n\n            if(showLines) {\n                tEdit.line = {\n                    width: boundVal('line.width', pickFirst, [0, 10], CST_LINE_WIDTH)\n                };\n            }\n\n            if(showText) {\n                dEdit.tx = 'Aa';\n                dEdit.tp = boundVal('textposition', pickFirst);\n                dEdit.ts = 10;\n                dEdit.tc = boundVal('textfont.color', pickFirst);\n                dEdit.tf = boundVal('textfont.family', pickFirst);\n            }\n\n            dMod = [Lib.minExtend(d0, dEdit)];\n            tMod = Lib.minExtend(trace, tEdit);\n\n            // always show legend items in base state\n            tMod.selectedpoints = null;\n        }\n\n        var ptgroup = d3.select(this).select('g.legendpoints');\n\n        var pts = ptgroup.selectAll('path.scatterpts')\n            .data(showMarkers ? dMod : []);\n        // make sure marker is on the bottom, in case it enters after text\n        pts.enter().insert('path', ':first-child')\n            .classed('scatterpts', true)\n            .attr('transform', 'translate(20,0)');\n        pts.exit().remove();\n        pts.call(Drawing.pointStyle, tMod, gd);\n\n        // 'mrc' is set in pointStyle and used in textPointStyle:\n        // constrain it here\n        if(showMarkers) dMod[0].mrc = 3;\n\n        var txt = ptgroup.selectAll('g.pointtext')\n            .data(showText ? dMod : []);\n        txt.enter()\n            .append('g').classed('pointtext', true)\n                .append('text').attr('transform', 'translate(20,0)');\n        txt.exit().remove();\n        txt.selectAll('text').call(Drawing.textPointStyle, tMod, gd);\n    }\n\n    function styleWaterfalls(d) {\n        var trace = d[0].trace;\n\n        var ptsData = [];\n        if(trace.type === 'waterfall' && trace.visible) {\n            ptsData = d[0].hasTotals ?\n                [['increasing', 'M-6,-6V6H0Z'], ['totals', 'M6,6H0L-6,-6H-0Z'], ['decreasing', 'M6,6V-6H0Z']] :\n                [['increasing', 'M-6,-6V6H6Z'], ['decreasing', 'M6,6V-6H-6Z']];\n        }\n\n        var pts = d3.select(this).select('g.legendpoints')\n            .selectAll('path.legendwaterfall')\n            .data(ptsData);\n        pts.enter().append('path').classed('legendwaterfall', true)\n            .attr('transform', 'translate(20,0)')\n            .style('stroke-miterlimit', 1);\n        pts.exit().remove();\n\n        pts.each(function(dd) {\n            var pt = d3.select(this);\n            var cont = trace[dd[0]].marker;\n            var lw = boundLineWidth(undefined, cont.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n            pt.attr('d', dd[1])\n                .style('stroke-width', lw + 'px')\n                .call(Color.fill, cont.color);\n\n            if(lw) {\n                pt.call(Color.stroke, cont.line.color);\n            }\n        });\n    }\n\n    function styleBars(d) {\n        styleBarLike(d, this);\n    }\n\n    function styleFunnels(d) {\n        styleBarLike(d, this, 'funnel');\n    }\n\n    function styleBarLike(d, lThis, desiredType) {\n        var trace = d[0].trace;\n        var marker = trace.marker || {};\n        var markerLine = marker.line || {};\n\n        var isVisible = (!desiredType) ? Registry.traceIs(trace, 'bar') :\n            (trace.type === desiredType && trace.visible);\n\n        var barpath = d3.select(lThis).select('g.legendpoints')\n            .selectAll('path.legend' + desiredType)\n            .data(isVisible ? [d] : []);\n        barpath.enter().append('path').classed('legend' + desiredType, true)\n            .attr('d', 'M6,6H-6V-6H6Z')\n            .attr('transform', 'translate(20,0)');\n        barpath.exit().remove();\n\n        barpath.each(function(d) {\n            var p = d3.select(this);\n            var d0 = d[0];\n            var w = boundLineWidth(d0.mlw, marker.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n            p.style('stroke-width', w + 'px')\n                .call(Color.fill, d0.mc || marker.color);\n\n            if(w) Color.stroke(p, d0.mlc || markerLine.color);\n        });\n    }\n\n    function styleBoxes(d) {\n        var trace = d[0].trace;\n\n        var pts = d3.select(this).select('g.legendpoints')\n            .selectAll('path.legendbox')\n            .data(Registry.traceIs(trace, 'box-violin') && trace.visible ? [d] : []);\n        pts.enter().append('path').classed('legendbox', true)\n            // if we want the median bar, prepend M6,0H-6\n            .attr('d', 'M6,6H-6V-6H6Z')\n            .attr('transform', 'translate(20,0)');\n        pts.exit().remove();\n\n        pts.each(function() {\n            var p = d3.select(this);\n\n            if((trace.boxpoints === 'all' || trace.points === 'all') &&\n                Color.opacity(trace.fillcolor) === 0 && Color.opacity((trace.line || {}).color) === 0\n            ) {\n                var tMod = Lib.minExtend(trace, {\n                    marker: {\n                        size: constantItemSizing ? CST_MARKER_SIZE : Lib.constrain(trace.marker.size, 2, 16),\n                        sizeref: 1,\n                        sizemin: 1,\n                        sizemode: 'diameter'\n                    }\n                });\n                pts.call(Drawing.pointStyle, tMod, gd);\n            } else {\n                var w = boundLineWidth(undefined, trace.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n                p.style('stroke-width', w + 'px')\n                    .call(Color.fill, trace.fillcolor);\n\n                if(w) Color.stroke(p, trace.line.color);\n            }\n        });\n    }\n\n    function styleCandles(d) {\n        var trace = d[0].trace;\n\n        var pts = d3.select(this).select('g.legendpoints')\n            .selectAll('path.legendcandle')\n            .data(trace.type === 'candlestick' && trace.visible ? [d, d] : []);\n        pts.enter().append('path').classed('legendcandle', true)\n            .attr('d', function(_, i) {\n                if(i) return 'M-15,0H-8M-8,6V-6H8Z'; // increasing\n                return 'M15,0H8M8,-6V6H-8Z'; // decreasing\n            })\n            .attr('transform', 'translate(20,0)')\n            .style('stroke-miterlimit', 1);\n        pts.exit().remove();\n\n        pts.each(function(_, i) {\n            var p = d3.select(this);\n            var cont = trace[i ? 'increasing' : 'decreasing'];\n            var w = boundLineWidth(undefined, cont.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n            p.style('stroke-width', w + 'px')\n                .call(Color.fill, cont.fillcolor);\n\n            if(w) Color.stroke(p, cont.line.color);\n        });\n    }\n\n    function styleOHLC(d) {\n        var trace = d[0].trace;\n\n        var pts = d3.select(this).select('g.legendpoints')\n            .selectAll('path.legendohlc')\n            .data(trace.type === 'ohlc' && trace.visible ? [d, d] : []);\n        pts.enter().append('path').classed('legendohlc', true)\n            .attr('d', function(_, i) {\n                if(i) return 'M-15,0H0M-8,-6V0'; // increasing\n                return 'M15,0H0M8,6V0'; // decreasing\n            })\n            .attr('transform', 'translate(20,0)')\n            .style('stroke-miterlimit', 1);\n        pts.exit().remove();\n\n        pts.each(function(_, i) {\n            var p = d3.select(this);\n            var cont = trace[i ? 'increasing' : 'decreasing'];\n            var w = boundLineWidth(undefined, cont.line, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n            p.style('fill', 'none')\n                .call(Drawing.dashLine, cont.line.dash, w);\n\n            if(w) Color.stroke(p, cont.line.color);\n        });\n    }\n\n    function stylePies(d) {\n        stylePieLike(d, this, 'pie');\n    }\n\n    function styleFunnelareas(d) {\n        stylePieLike(d, this, 'funnelarea');\n    }\n\n    function stylePieLike(d, lThis, desiredType) {\n        var d0 = d[0];\n        var trace = d0.trace;\n\n        var isVisible = (!desiredType) ? Registry.traceIs(trace, desiredType) :\n            (trace.type === desiredType && trace.visible);\n\n        var pts = d3.select(lThis).select('g.legendpoints')\n            .selectAll('path.legend' + desiredType)\n            .data(isVisible ? [d] : []);\n        pts.enter().append('path').classed('legend' + desiredType, true)\n            .attr('d', 'M6,6H-6V-6H6Z')\n            .attr('transform', 'translate(20,0)');\n        pts.exit().remove();\n\n        if(pts.size()) {\n            var cont = (trace.marker || {}).line;\n            var lw = boundLineWidth(pieCastOption(cont.width, d0.pts), cont, MAX_MARKER_LINE_WIDTH, CST_MARKER_LINE_WIDTH);\n\n            var tMod = Lib.minExtend(trace, {marker: {line: {width: lw}}});\n            // since minExtend do not slice more than 3 items we need to patch line.color here\n            tMod.marker.line.color = cont.color;\n\n            var d0Mod = Lib.minExtend(d0, {trace: tMod});\n\n            stylePie(pts, d0Mod, tMod);\n        }\n    }\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"../../traces/pie/helpers\":1054,\"../../traces/pie/style_one\":1060,\"../../traces/scatter/subtypes\":1098,\"../color\":580,\"../drawing\":601,\"d3\":157}],638:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Plots = _dereq_('../../plots/plots');\nvar axisIds = _dereq_('../../plots/cartesian/axis_ids');\nvar Lib = _dereq_('../../lib');\nvar Icons = _dereq_('../../../build/ploticon');\n\nvar _ = Lib._;\n\nvar modeBarButtons = module.exports = {};\n\n/**\n * ModeBar buttons configuration\n *\n * @param {string} name\n *      name / id of the buttons (for tracking)\n * @param {string} title\n *      text that appears while hovering over the button,\n *      enter null, false or '' for no hover text\n * @param {string} icon\n *      svg icon object associated with the button\n *      can be linked to Plotly.Icons to use the default plotly icons\n * @param {string} [gravity]\n *      icon positioning\n * @param {function} click\n *      click handler associated with the button, a function of\n *      'gd' (the main graph object) and\n *      'ev' (the event object)\n * @param {string} [attr]\n *      attribute associated with button,\n *      use this with 'val' to keep track of the state\n * @param {*} [val]\n *      initial 'attr' value, can be a function of gd\n * @param {boolean} [toggle]\n *      is the button a toggle button?\n */\nmodeBarButtons.toImage = {\n    name: 'toImage',\n    title: function(gd) {\n        var opts = gd._context.toImageButtonOptions || {};\n        var format = opts.format || 'png';\n        return format === 'png' ?\n            _(gd, 'Download plot as a png') : // legacy text\n            _(gd, 'Download plot'); // generic non-PNG text\n    },\n    icon: Icons.camera,\n    click: function(gd) {\n        var toImageButtonOptions = gd._context.toImageButtonOptions;\n        var opts = {format: toImageButtonOptions.format || 'png'};\n\n        Lib.notifier(_(gd, 'Taking snapshot - this may take a few seconds'), 'long');\n\n        if(opts.format !== 'svg' && Lib.isIE()) {\n            Lib.notifier(_(gd, 'IE only supports svg.  Changing format to svg.'), 'long');\n            opts.format = 'svg';\n        }\n\n        ['filename', 'width', 'height', 'scale'].forEach(function(key) {\n            if(key in toImageButtonOptions) {\n                opts[key] = toImageButtonOptions[key];\n            }\n        });\n\n        Registry.call('downloadImage', gd, opts)\n          .then(function(filename) {\n              Lib.notifier(_(gd, 'Snapshot succeeded') + ' - ' + filename, 'long');\n          })\n          .catch(function() {\n              Lib.notifier(_(gd, 'Sorry, there was a problem downloading your snapshot!'), 'long');\n          });\n    }\n};\n\nmodeBarButtons.sendDataToCloud = {\n    name: 'sendDataToCloud',\n    title: function(gd) { return _(gd, 'Edit in Chart Studio'); },\n    icon: Icons.disk,\n    click: function(gd) {\n        Plots.sendDataToCloud(gd);\n    }\n};\n\nmodeBarButtons.zoom2d = {\n    name: 'zoom2d',\n    title: function(gd) { return _(gd, 'Zoom'); },\n    attr: 'dragmode',\n    val: 'zoom',\n    icon: Icons.zoombox,\n    click: handleCartesian\n};\n\nmodeBarButtons.pan2d = {\n    name: 'pan2d',\n    title: function(gd) { return _(gd, 'Pan'); },\n    attr: 'dragmode',\n    val: 'pan',\n    icon: Icons.pan,\n    click: handleCartesian\n};\n\nmodeBarButtons.select2d = {\n    name: 'select2d',\n    title: function(gd) { return _(gd, 'Box Select'); },\n    attr: 'dragmode',\n    val: 'select',\n    icon: Icons.selectbox,\n    click: handleCartesian\n};\n\nmodeBarButtons.lasso2d = {\n    name: 'lasso2d',\n    title: function(gd) { return _(gd, 'Lasso Select'); },\n    attr: 'dragmode',\n    val: 'lasso',\n    icon: Icons.lasso,\n    click: handleCartesian\n};\n\nmodeBarButtons.zoomIn2d = {\n    name: 'zoomIn2d',\n    title: function(gd) { return _(gd, 'Zoom in'); },\n    attr: 'zoom',\n    val: 'in',\n    icon: Icons.zoom_plus,\n    click: handleCartesian\n};\n\nmodeBarButtons.zoomOut2d = {\n    name: 'zoomOut2d',\n    title: function(gd) { return _(gd, 'Zoom out'); },\n    attr: 'zoom',\n    val: 'out',\n    icon: Icons.zoom_minus,\n    click: handleCartesian\n};\n\nmodeBarButtons.autoScale2d = {\n    name: 'autoScale2d',\n    title: function(gd) { return _(gd, 'Autoscale'); },\n    attr: 'zoom',\n    val: 'auto',\n    icon: Icons.autoscale,\n    click: handleCartesian\n};\n\nmodeBarButtons.resetScale2d = {\n    name: 'resetScale2d',\n    title: function(gd) { return _(gd, 'Reset axes'); },\n    attr: 'zoom',\n    val: 'reset',\n    icon: Icons.home,\n    click: handleCartesian\n};\n\nmodeBarButtons.hoverClosestCartesian = {\n    name: 'hoverClosestCartesian',\n    title: function(gd) { return _(gd, 'Show closest data on hover'); },\n    attr: 'hovermode',\n    val: 'closest',\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: handleCartesian\n};\n\nmodeBarButtons.hoverCompareCartesian = {\n    name: 'hoverCompareCartesian',\n    title: function(gd) { return _(gd, 'Compare data on hover'); },\n    attr: 'hovermode',\n    val: function(gd) {\n        return gd._fullLayout._isHoriz ? 'y' : 'x';\n    },\n    icon: Icons.tooltip_compare,\n    gravity: 'ne',\n    click: handleCartesian\n};\n\nfunction handleCartesian(gd, ev) {\n    var button = ev.currentTarget;\n    var astr = button.getAttribute('data-attr');\n    var val = button.getAttribute('data-val') || true;\n    var fullLayout = gd._fullLayout;\n    var aobj = {};\n    var axList = axisIds.list(gd, null, true);\n    var allSpikesEnabled = 'on';\n\n    var ax, i;\n\n    if(astr === 'zoom') {\n        var mag = (val === 'in') ? 0.5 : 2;\n        var r0 = (1 + mag) / 2;\n        var r1 = (1 - mag) / 2;\n        var axName;\n\n        for(i = 0; i < axList.length; i++) {\n            ax = axList[i];\n\n            if(!ax.fixedrange) {\n                axName = ax._name;\n                if(val === 'auto') aobj[axName + '.autorange'] = true;\n                else if(val === 'reset') {\n                    if(ax._rangeInitial === undefined) {\n                        aobj[axName + '.autorange'] = true;\n                    } else {\n                        var rangeInitial = ax._rangeInitial.slice();\n                        aobj[axName + '.range[0]'] = rangeInitial[0];\n                        aobj[axName + '.range[1]'] = rangeInitial[1];\n                    }\n                    if(ax._showSpikeInitial !== undefined) {\n                        aobj[axName + '.showspikes'] = ax._showSpikeInitial;\n                        if(allSpikesEnabled === 'on' && !ax._showSpikeInitial) {\n                            allSpikesEnabled = 'off';\n                        }\n                    }\n                } else {\n                    var rangeNow = [\n                        ax.r2l(ax.range[0]),\n                        ax.r2l(ax.range[1]),\n                    ];\n\n                    var rangeNew = [\n                        r0 * rangeNow[0] + r1 * rangeNow[1],\n                        r0 * rangeNow[1] + r1 * rangeNow[0]\n                    ];\n\n                    aobj[axName + '.range[0]'] = ax.l2r(rangeNew[0]);\n                    aobj[axName + '.range[1]'] = ax.l2r(rangeNew[1]);\n                }\n            }\n        }\n        fullLayout._cartesianSpikesEnabled = allSpikesEnabled;\n    } else {\n        // if ALL traces have orientation 'h', 'hovermode': 'x' otherwise: 'y'\n        if(astr === 'hovermode' && (val === 'x' || val === 'y')) {\n            val = fullLayout._isHoriz ? 'y' : 'x';\n            button.setAttribute('data-val', val);\n        } else if(astr === 'hovermode' && val === 'closest') {\n            for(i = 0; i < axList.length; i++) {\n                ax = axList[i];\n                if(allSpikesEnabled === 'on' && !ax.showspikes) {\n                    allSpikesEnabled = 'off';\n                }\n            }\n            fullLayout._cartesianSpikesEnabled = allSpikesEnabled;\n        }\n\n        aobj[astr] = val;\n    }\n\n    Registry.call('_guiRelayout', gd, aobj);\n}\n\nmodeBarButtons.zoom3d = {\n    name: 'zoom3d',\n    title: function(gd) { return _(gd, 'Zoom'); },\n    attr: 'scene.dragmode',\n    val: 'zoom',\n    icon: Icons.zoombox,\n    click: handleDrag3d\n};\n\nmodeBarButtons.pan3d = {\n    name: 'pan3d',\n    title: function(gd) { return _(gd, 'Pan'); },\n    attr: 'scene.dragmode',\n    val: 'pan',\n    icon: Icons.pan,\n    click: handleDrag3d\n};\n\nmodeBarButtons.orbitRotation = {\n    name: 'orbitRotation',\n    title: function(gd) { return _(gd, 'Orbital rotation'); },\n    attr: 'scene.dragmode',\n    val: 'orbit',\n    icon: Icons['3d_rotate'],\n    click: handleDrag3d\n};\n\nmodeBarButtons.tableRotation = {\n    name: 'tableRotation',\n    title: function(gd) { return _(gd, 'Turntable rotation'); },\n    attr: 'scene.dragmode',\n    val: 'turntable',\n    icon: Icons['z-axis'],\n    click: handleDrag3d\n};\n\nfunction handleDrag3d(gd, ev) {\n    var button = ev.currentTarget;\n    var attr = button.getAttribute('data-attr');\n    var val = button.getAttribute('data-val') || true;\n    var sceneIds = gd._fullLayout._subplots.gl3d;\n    var layoutUpdate = {};\n\n    var parts = attr.split('.');\n\n    for(var i = 0; i < sceneIds.length; i++) {\n        layoutUpdate[sceneIds[i] + '.' + parts[1]] = val;\n    }\n\n    // for multi-type subplots\n    var val2d = (val === 'pan') ? val : 'zoom';\n    layoutUpdate.dragmode = val2d;\n\n    Registry.call('_guiRelayout', gd, layoutUpdate);\n}\n\nmodeBarButtons.resetCameraDefault3d = {\n    name: 'resetCameraDefault3d',\n    title: function(gd) { return _(gd, 'Reset camera to default'); },\n    attr: 'resetDefault',\n    icon: Icons.home,\n    click: handleCamera3d\n};\n\nmodeBarButtons.resetCameraLastSave3d = {\n    name: 'resetCameraLastSave3d',\n    title: function(gd) { return _(gd, 'Reset camera to last save'); },\n    attr: 'resetLastSave',\n    icon: Icons.movie,\n    click: handleCamera3d\n};\n\nfunction handleCamera3d(gd, ev) {\n    var button = ev.currentTarget;\n    var attr = button.getAttribute('data-attr');\n    var fullLayout = gd._fullLayout;\n    var sceneIds = fullLayout._subplots.gl3d;\n    var aobj = {};\n\n    for(var i = 0; i < sceneIds.length; i++) {\n        var sceneId = sceneIds[i];\n        var key = sceneId + '.camera';\n        var scene = fullLayout[sceneId]._scene;\n\n        if(attr === 'resetLastSave') {\n            aobj[key + '.up'] = scene.viewInitial.up;\n            aobj[key + '.eye'] = scene.viewInitial.eye;\n            aobj[key + '.center'] = scene.viewInitial.center;\n        } else if(attr === 'resetDefault') {\n            aobj[key + '.up'] = null;\n            aobj[key + '.eye'] = null;\n            aobj[key + '.center'] = null;\n        }\n    }\n\n    Registry.call('_guiRelayout', gd, aobj);\n}\n\nmodeBarButtons.hoverClosest3d = {\n    name: 'hoverClosest3d',\n    title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },\n    attr: 'hovermode',\n    val: null,\n    toggle: true,\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: handleHover3d\n};\n\nfunction getNextHover3d(gd, ev) {\n    var button = ev.currentTarget;\n    var val = button._previousVal;\n    var fullLayout = gd._fullLayout;\n    var sceneIds = fullLayout._subplots.gl3d;\n\n    var axes = ['xaxis', 'yaxis', 'zaxis'];\n\n    // initialize 'current spike' object to be stored in the DOM\n    var currentSpikes = {};\n    var layoutUpdate = {};\n\n    if(val) {\n        layoutUpdate = val;\n        button._previousVal = null;\n    } else {\n        for(var i = 0; i < sceneIds.length; i++) {\n            var sceneId = sceneIds[i];\n            var sceneLayout = fullLayout[sceneId];\n\n            var hovermodeAStr = sceneId + '.hovermode';\n            currentSpikes[hovermodeAStr] = sceneLayout.hovermode;\n            layoutUpdate[hovermodeAStr] = false;\n\n            // copy all the current spike attrs\n            for(var j = 0; j < 3; j++) {\n                var axis = axes[j];\n                var spikeAStr = sceneId + '.' + axis + '.showspikes';\n                layoutUpdate[spikeAStr] = false;\n                currentSpikes[spikeAStr] = sceneLayout[axis].showspikes;\n            }\n        }\n\n        button._previousVal = currentSpikes;\n    }\n    return layoutUpdate;\n}\n\nfunction handleHover3d(gd, ev) {\n    var layoutUpdate = getNextHover3d(gd, ev);\n    Registry.call('_guiRelayout', gd, layoutUpdate);\n}\n\nmodeBarButtons.zoomInGeo = {\n    name: 'zoomInGeo',\n    title: function(gd) { return _(gd, 'Zoom in'); },\n    attr: 'zoom',\n    val: 'in',\n    icon: Icons.zoom_plus,\n    click: handleGeo\n};\n\nmodeBarButtons.zoomOutGeo = {\n    name: 'zoomOutGeo',\n    title: function(gd) { return _(gd, 'Zoom out'); },\n    attr: 'zoom',\n    val: 'out',\n    icon: Icons.zoom_minus,\n    click: handleGeo\n};\n\nmodeBarButtons.resetGeo = {\n    name: 'resetGeo',\n    title: function(gd) { return _(gd, 'Reset'); },\n    attr: 'reset',\n    val: null,\n    icon: Icons.autoscale,\n    click: handleGeo\n};\n\nmodeBarButtons.hoverClosestGeo = {\n    name: 'hoverClosestGeo',\n    title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },\n    attr: 'hovermode',\n    val: null,\n    toggle: true,\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: toggleHover\n};\n\nfunction handleGeo(gd, ev) {\n    var button = ev.currentTarget;\n    var attr = button.getAttribute('data-attr');\n    var val = button.getAttribute('data-val') || true;\n    var fullLayout = gd._fullLayout;\n    var geoIds = fullLayout._subplots.geo;\n\n    for(var i = 0; i < geoIds.length; i++) {\n        var id = geoIds[i];\n        var geoLayout = fullLayout[id];\n\n        if(attr === 'zoom') {\n            var scale = geoLayout.projection.scale;\n            var newScale = (val === 'in') ? 2 * scale : 0.5 * scale;\n\n            Registry.call('_guiRelayout', gd, id + '.projection.scale', newScale);\n        } else if(attr === 'reset') {\n            resetView(gd, 'geo');\n        }\n    }\n}\n\nmodeBarButtons.hoverClosestGl2d = {\n    name: 'hoverClosestGl2d',\n    title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },\n    attr: 'hovermode',\n    val: null,\n    toggle: true,\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: toggleHover\n};\n\nmodeBarButtons.hoverClosestPie = {\n    name: 'hoverClosestPie',\n    title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },\n    attr: 'hovermode',\n    val: 'closest',\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: toggleHover\n};\n\nfunction getNextHover(gd) {\n    var fullLayout = gd._fullLayout;\n\n    if(fullLayout.hovermode) return false;\n\n    if(fullLayout._has('cartesian')) {\n        return fullLayout._isHoriz ? 'y' : 'x';\n    }\n    return 'closest';\n}\n\nfunction toggleHover(gd) {\n    var newHover = getNextHover(gd);\n    Registry.call('_guiRelayout', gd, 'hovermode', newHover);\n}\n\nmodeBarButtons.resetViewSankey = {\n    name: 'resetSankeyGroup',\n    title: function(gd) { return _(gd, 'Reset view'); },\n    icon: Icons.home,\n    click: function(gd) {\n        var aObj = {\n            'node.groups': [],\n            'node.x': [],\n            'node.y': []\n        };\n        for(var i = 0; i < gd._fullData.length; i++) {\n            var viewInitial = gd._fullData[i]._viewInitial;\n            aObj['node.groups'].push(viewInitial.node.groups.slice());\n            aObj['node.x'].push(viewInitial.node.x.slice());\n            aObj['node.y'].push(viewInitial.node.y.slice());\n        }\n        Registry.call('restyle', gd, aObj);\n    }\n};\n\n// buttons when more then one plot types are present\n\nmodeBarButtons.toggleHover = {\n    name: 'toggleHover',\n    title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },\n    attr: 'hovermode',\n    val: null,\n    toggle: true,\n    icon: Icons.tooltip_basic,\n    gravity: 'ne',\n    click: function(gd, ev) {\n        var layoutUpdate = getNextHover3d(gd, ev);\n        layoutUpdate.hovermode = getNextHover(gd);\n\n        Registry.call('_guiRelayout', gd, layoutUpdate);\n    }\n};\n\nmodeBarButtons.resetViews = {\n    name: 'resetViews',\n    title: function(gd) { return _(gd, 'Reset views'); },\n    icon: Icons.home,\n    click: function(gd, ev) {\n        var button = ev.currentTarget;\n\n        button.setAttribute('data-attr', 'zoom');\n        button.setAttribute('data-val', 'reset');\n        handleCartesian(gd, ev);\n\n        button.setAttribute('data-attr', 'resetLastSave');\n        handleCamera3d(gd, ev);\n\n        resetView(gd, 'geo');\n        resetView(gd, 'mapbox');\n    }\n};\n\nmodeBarButtons.toggleSpikelines = {\n    name: 'toggleSpikelines',\n    title: function(gd) { return _(gd, 'Toggle Spike Lines'); },\n    icon: Icons.spikeline,\n    attr: '_cartesianSpikesEnabled',\n    val: 'on',\n    click: function(gd) {\n        var fullLayout = gd._fullLayout;\n\n        fullLayout._cartesianSpikesEnabled = fullLayout._cartesianSpikesEnabled === 'on' ? 'off' : 'on';\n\n        var aobj = setSpikelineVisibility(gd);\n\n        Registry.call('_guiRelayout', gd, aobj);\n    }\n};\n\nfunction setSpikelineVisibility(gd) {\n    var fullLayout = gd._fullLayout;\n    var axList = axisIds.list(gd, null, true);\n    var aobj = {};\n\n    var ax, axName;\n\n    for(var i = 0; i < axList.length; i++) {\n        ax = axList[i];\n        axName = ax._name;\n        aobj[axName + '.showspikes'] = fullLayout._cartesianSpikesEnabled === 'on' ? true : ax._showSpikeInitial;\n    }\n\n    return aobj;\n}\n\nmodeBarButtons.resetViewMapbox = {\n    name: 'resetViewMapbox',\n    title: function(gd) { return _(gd, 'Reset view'); },\n    attr: 'reset',\n    icon: Icons.home,\n    click: function(gd) {\n        resetView(gd, 'mapbox');\n    }\n};\n\nfunction resetView(gd, subplotType) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots[subplotType];\n    var aObj = {};\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var id = subplotIds[i];\n        var subplotObj = fullLayout[id]._subplot;\n        var viewInitial = subplotObj.viewInitial;\n        var viewKeys = Object.keys(viewInitial);\n\n        for(var j = 0; j < viewKeys.length; j++) {\n            var key = viewKeys[j];\n            aObj[id + '.' + key] = viewInitial[key];\n        }\n    }\n\n    Registry.call('_guiRelayout', gd, aObj);\n}\n\n},{\"../../../build/ploticon\":2,\"../../lib\":703,\"../../plots/cartesian/axis_ids\":754,\"../../plots/plots\":812,\"../../registry\":831}],639:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nexports.manage = _dereq_('./manage');\n\n},{\"./manage\":640}],640:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar axisIds = _dereq_('../../plots/cartesian/axis_ids');\nvar scatterSubTypes = _dereq_('../../traces/scatter/subtypes');\nvar Registry = _dereq_('../../registry');\n\nvar createModeBar = _dereq_('./modebar');\nvar modeBarButtons = _dereq_('./buttons');\n\n/**\n * ModeBar wrapper around 'create' and 'update',\n * chooses buttons to pass to ModeBar constructor based on\n * plot type and plot config.\n *\n * @param {object} gd main plot object\n *\n */\nmodule.exports = function manageModeBar(gd) {\n    var fullLayout = gd._fullLayout;\n    var context = gd._context;\n    var modeBar = fullLayout._modeBar;\n\n    if(!context.displayModeBar && !context.watermark) {\n        if(modeBar) {\n            modeBar.destroy();\n            delete fullLayout._modeBar;\n        }\n        return;\n    }\n\n    if(!Array.isArray(context.modeBarButtonsToRemove)) {\n        throw new Error([\n            '*modeBarButtonsToRemove* configuration options',\n            'must be an array.'\n        ].join(' '));\n    }\n\n    if(!Array.isArray(context.modeBarButtonsToAdd)) {\n        throw new Error([\n            '*modeBarButtonsToAdd* configuration options',\n            'must be an array.'\n        ].join(' '));\n    }\n\n    var customButtons = context.modeBarButtons;\n    var buttonGroups;\n\n    if(Array.isArray(customButtons) && customButtons.length) {\n        buttonGroups = fillCustomButton(customButtons);\n    } else if(!context.displayModeBar && context.watermark) {\n        buttonGroups = [];\n    } else {\n        buttonGroups = getButtonGroups(\n            gd,\n            context.modeBarButtonsToRemove,\n            context.modeBarButtonsToAdd,\n            context.showSendToCloud\n        );\n    }\n\n    if(modeBar) modeBar.update(gd, buttonGroups);\n    else fullLayout._modeBar = createModeBar(gd, buttonGroups);\n};\n\n// logic behind which buttons are displayed by default\nfunction getButtonGroups(gd, buttonsToRemove, buttonsToAdd, showSendToCloud) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n\n    var hasCartesian = fullLayout._has('cartesian');\n    var hasGL3D = fullLayout._has('gl3d');\n    var hasGeo = fullLayout._has('geo');\n    var hasPie = fullLayout._has('pie');\n    var hasFunnelarea = fullLayout._has('funnelarea');\n    var hasGL2D = fullLayout._has('gl2d');\n    var hasTernary = fullLayout._has('ternary');\n    var hasMapbox = fullLayout._has('mapbox');\n    var hasPolar = fullLayout._has('polar');\n    var hasSankey = fullLayout._has('sankey');\n    var allAxesFixed = areAllAxesFixed(fullLayout);\n\n    var groups = [];\n\n    function addGroup(newGroup) {\n        if(!newGroup.length) return;\n\n        var out = [];\n\n        for(var i = 0; i < newGroup.length; i++) {\n            var button = newGroup[i];\n            if(buttonsToRemove.indexOf(button) !== -1) continue;\n            out.push(modeBarButtons[button]);\n        }\n\n        groups.push(out);\n    }\n\n    // buttons common to all plot types\n    var commonGroup = ['toImage'];\n    if(showSendToCloud) commonGroup.push('sendDataToCloud');\n    addGroup(commonGroup);\n\n    var zoomGroup = [];\n    var hoverGroup = [];\n    var resetGroup = [];\n    var dragModeGroup = [];\n\n    if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasPolar > 1) {\n        // graphs with more than one plot types get 'union buttons'\n        // which reset the view or toggle hover labels across all subplots.\n        hoverGroup = ['toggleHover'];\n        resetGroup = ['resetViews'];\n    } else if(hasGeo) {\n        zoomGroup = ['zoomInGeo', 'zoomOutGeo'];\n        hoverGroup = ['hoverClosestGeo'];\n        resetGroup = ['resetGeo'];\n    } else if(hasGL3D) {\n        hoverGroup = ['hoverClosest3d'];\n        resetGroup = ['resetCameraDefault3d', 'resetCameraLastSave3d'];\n    } else if(hasMapbox) {\n        hoverGroup = ['toggleHover'];\n        resetGroup = ['resetViewMapbox'];\n    } else if(hasGL2D) {\n        hoverGroup = ['hoverClosestGl2d'];\n    } else if(hasPie) {\n        hoverGroup = ['hoverClosestPie'];\n    } else if(hasSankey) {\n        hoverGroup = ['hoverClosestCartesian', 'hoverCompareCartesian'];\n        resetGroup = ['resetViewSankey'];\n    } else { // hasPolar, hasTernary\n        // always show at least one hover icon.\n        hoverGroup = ['toggleHover'];\n    }\n    // if we have cartesian, allow switching between closest and compare\n    // regardless of what other types are on the plot, since they'll all\n    // just treat any truthy hovermode as 'closest'\n    if(hasCartesian) {\n        hoverGroup = ['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian'];\n    }\n\n    if((hasCartesian || hasGL2D) && !allAxesFixed) {\n        zoomGroup = ['zoomIn2d', 'zoomOut2d', 'autoScale2d'];\n        if(resetGroup[0] !== 'resetViews') resetGroup = ['resetScale2d'];\n    }\n\n    if(hasGL3D) {\n        dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];\n    } else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {\n        dragModeGroup = ['zoom2d', 'pan2d'];\n    } else if(hasMapbox || hasGeo) {\n        dragModeGroup = ['pan2d'];\n    } else if(hasPolar) {\n        dragModeGroup = ['zoom2d'];\n    }\n    if(isSelectable(fullData)) {\n        dragModeGroup.push('select2d', 'lasso2d');\n    }\n\n    addGroup(dragModeGroup);\n    addGroup(zoomGroup.concat(resetGroup));\n    addGroup(hoverGroup);\n\n    return appendButtonsToGroups(groups, buttonsToAdd);\n}\n\nfunction areAllAxesFixed(fullLayout) {\n    var axList = axisIds.list({_fullLayout: fullLayout}, null, true);\n\n    for(var i = 0; i < axList.length; i++) {\n        if(!axList[i].fixedrange) {\n            return false;\n        }\n    }\n\n    return true;\n}\n\n// look for traces that support selection\n// to be updated as we add more selectPoints handlers\nfunction isSelectable(fullData) {\n    var selectable = false;\n\n    for(var i = 0; i < fullData.length; i++) {\n        if(selectable) break;\n\n        var trace = fullData[i];\n\n        if(!trace._module || !trace._module.selectPoints) continue;\n\n        if(Registry.traceIs(trace, 'scatter-like')) {\n            if(scatterSubTypes.hasMarkers(trace) || scatterSubTypes.hasText(trace)) {\n                selectable = true;\n            }\n        } else if(Registry.traceIs(trace, 'box-violin')) {\n            if(trace.boxpoints === 'all' || trace.points === 'all') {\n                selectable = true;\n            }\n        } else {\n            // assume that in general if the trace module has selectPoints,\n            // then it's selectable. Scatter is an exception to this because it must\n            // have markers or text, not just be a scatter type.\n\n            selectable = true;\n        }\n    }\n\n    return selectable;\n}\n\nfunction appendButtonsToGroups(groups, buttons) {\n    if(buttons.length) {\n        if(Array.isArray(buttons[0])) {\n            for(var i = 0; i < buttons.length; i++) {\n                groups.push(buttons[i]);\n            }\n        } else groups.push(buttons);\n    }\n\n    return groups;\n}\n\n// fill in custom buttons referring to default mode bar buttons\nfunction fillCustomButton(customButtons) {\n    for(var i = 0; i < customButtons.length; i++) {\n        var buttonGroup = customButtons[i];\n\n        for(var j = 0; j < buttonGroup.length; j++) {\n            var button = buttonGroup[j];\n\n            if(typeof button === 'string') {\n                if(modeBarButtons[button] !== undefined) {\n                    customButtons[i][j] = modeBarButtons[button];\n                } else {\n                    throw new Error([\n                        '*modeBarButtons* configuration options',\n                        'invalid button name'\n                    ].join(' '));\n                }\n            }\n        }\n    }\n\n    return customButtons;\n}\n\n},{\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../../traces/scatter/subtypes\":1098,\"./buttons\":638,\"./modebar\":641}],641:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar Icons = _dereq_('../../../build/ploticon');\nvar Parser = new DOMParser();\n\n/**\n * UI controller for interactive plots\n * @Class\n * @Param {object} opts\n * @Param {object} opts.buttons    nested arrays of grouped buttons config objects\n * @Param {object} opts.container  container div to append modeBar\n * @Param {object} opts.graphInfo  primary plot object containing data and layout\n */\nfunction ModeBar(opts) {\n    this.container = opts.container;\n    this.element = document.createElement('div');\n\n    this.update(opts.graphInfo, opts.buttons);\n\n    this.container.appendChild(this.element);\n}\n\nvar proto = ModeBar.prototype;\n\n/**\n * Update modeBar (buttons and logo)\n *\n * @param {object} graphInfo  primary plot object containing data and layout\n * @param {array of arrays} buttons nested arrays of grouped buttons to initialize\n *\n */\nproto.update = function(graphInfo, buttons) {\n    this.graphInfo = graphInfo;\n\n    var context = this.graphInfo._context;\n    var fullLayout = this.graphInfo._fullLayout;\n    var modeBarId = 'modebar-' + fullLayout._uid;\n\n    this.element.setAttribute('id', modeBarId);\n    this._uid = modeBarId;\n\n    this.element.className = 'modebar';\n    if(context.displayModeBar === 'hover') this.element.className += ' modebar--hover ease-bg';\n\n    if(fullLayout.modebar.orientation === 'v') {\n        this.element.className += ' vertical';\n        buttons = buttons.reverse();\n    }\n\n    var style = fullLayout.modebar;\n    var bgSelector = context.displayModeBar === 'hover' ? '.js-plotly-plot .plotly:hover ' : '';\n\n    Lib.deleteRelatedStyleRule(modeBarId);\n    Lib.addRelatedStyleRule(modeBarId, bgSelector + '#' + modeBarId + ' .modebar-group', 'background-color: ' + style.bgcolor);\n    Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn .icon path', 'fill: ' + style.color);\n    Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn:hover .icon path', 'fill: ' + style.activecolor);\n    Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn.active .icon path', 'fill: ' + style.activecolor);\n\n    // if buttons or logo have changed, redraw modebar interior\n    var needsNewButtons = !this.hasButtons(buttons);\n    var needsNewLogo = (this.hasLogo !== context.displaylogo);\n    var needsNewLocale = (this.locale !== context.locale);\n\n    this.locale = context.locale;\n\n    if(needsNewButtons || needsNewLogo || needsNewLocale) {\n        this.removeAllButtons();\n\n        this.updateButtons(buttons);\n\n        if(context.watermark || context.displaylogo) {\n            var logoGroup = this.getLogo();\n            if(context.watermark) {\n                logoGroup.className = logoGroup.className + ' watermark';\n            }\n\n            if(fullLayout.modebar.orientation === 'v') {\n                this.element.insertBefore(logoGroup, this.element.childNodes[0]);\n            } else {\n                this.element.appendChild(logoGroup);\n            }\n\n            this.hasLogo = true;\n        }\n    }\n\n    this.updateActiveButton();\n};\n\nproto.updateButtons = function(buttons) {\n    var _this = this;\n\n    this.buttons = buttons;\n    this.buttonElements = [];\n    this.buttonsNames = [];\n\n    this.buttons.forEach(function(buttonGroup) {\n        var group = _this.createGroup();\n\n        buttonGroup.forEach(function(buttonConfig) {\n            var buttonName = buttonConfig.name;\n            if(!buttonName) {\n                throw new Error('must provide button \\'name\\' in button config');\n            }\n            if(_this.buttonsNames.indexOf(buttonName) !== -1) {\n                throw new Error('button name \\'' + buttonName + '\\' is taken');\n            }\n            _this.buttonsNames.push(buttonName);\n\n            var button = _this.createButton(buttonConfig);\n            _this.buttonElements.push(button);\n            group.appendChild(button);\n        });\n\n        _this.element.appendChild(group);\n    });\n};\n\n/**\n * Empty div for containing a group of buttons\n * @Return {HTMLelement}\n */\nproto.createGroup = function() {\n    var group = document.createElement('div');\n    group.className = 'modebar-group';\n    return group;\n};\n\n/**\n * Create a new button div and set constant and configurable attributes\n * @Param {object} config (see ./buttons.js for more info)\n * @Return {HTMLelement}\n */\nproto.createButton = function(config) {\n    var _this = this;\n    var button = document.createElement('a');\n\n    button.setAttribute('rel', 'tooltip');\n    button.className = 'modebar-btn';\n\n    var title = config.title;\n    if(title === undefined) title = config.name;\n    // for localization: allow title to be a callable that takes gd as arg\n    else if(typeof title === 'function') title = title(this.graphInfo);\n\n    if(title || title === 0) button.setAttribute('data-title', title);\n\n    if(config.attr !== undefined) button.setAttribute('data-attr', config.attr);\n\n    var val = config.val;\n    if(val !== undefined) {\n        if(typeof val === 'function') val = val(this.graphInfo);\n        button.setAttribute('data-val', val);\n    }\n\n    var click = config.click;\n    if(typeof click !== 'function') {\n        throw new Error('must provide button \\'click\\' function in button config');\n    } else {\n        button.addEventListener('click', function(ev) {\n            config.click(_this.graphInfo, ev);\n\n            // only needed for 'hoverClosestGeo' which does not call relayout\n            _this.updateActiveButton(ev.currentTarget);\n        });\n    }\n\n    button.setAttribute('data-toggle', config.toggle || false);\n    if(config.toggle) d3.select(button).classed('active', true);\n\n    var icon = config.icon;\n    if(typeof icon === 'function') {\n        button.appendChild(icon());\n    } else {\n        button.appendChild(this.createIcon(icon || Icons.question));\n    }\n    button.setAttribute('data-gravity', config.gravity || 'n');\n\n    return button;\n};\n\n/**\n * Add an icon to a button\n * @Param {object} thisIcon\n * @Param {number} thisIcon.width\n * @Param {string} thisIcon.path\n * @Param {string} thisIcon.color\n * @Return {HTMLelement}\n */\nproto.createIcon = function(thisIcon) {\n    var iconHeight = isNumeric(thisIcon.height) ?\n        Number(thisIcon.height) :\n        thisIcon.ascent - thisIcon.descent;\n    var svgNS = 'http://www.w3.org/2000/svg';\n    var icon;\n\n    if(thisIcon.path) {\n        icon = document.createElementNS(svgNS, 'svg');\n        icon.setAttribute('viewBox', [0, 0, thisIcon.width, iconHeight].join(' '));\n        icon.setAttribute('class', 'icon');\n\n        var path = document.createElementNS(svgNS, 'path');\n        path.setAttribute('d', thisIcon.path);\n\n        if(thisIcon.transform) {\n            path.setAttribute('transform', thisIcon.transform);\n        } else if(thisIcon.ascent !== undefined) {\n            // Legacy icon transform calculation\n            path.setAttribute('transform', 'matrix(1 0 0 -1 0 ' + thisIcon.ascent + ')');\n        }\n\n        icon.appendChild(path);\n    }\n\n    if(thisIcon.svg) {\n        var svgDoc = Parser.parseFromString(thisIcon.svg, 'application/xml');\n        icon = svgDoc.childNodes[0];\n    }\n\n    icon.setAttribute('height', '1em');\n    icon.setAttribute('width', '1em');\n\n    return icon;\n};\n\n/**\n * Updates active button with attribute specified in layout\n * @Param {object} graphInfo plot object containing data and layout\n * @Return {HTMLelement}\n */\nproto.updateActiveButton = function(buttonClicked) {\n    var fullLayout = this.graphInfo._fullLayout;\n    var dataAttrClicked = (buttonClicked !== undefined) ?\n        buttonClicked.getAttribute('data-attr') :\n        null;\n\n    this.buttonElements.forEach(function(button) {\n        var thisval = button.getAttribute('data-val') || true;\n        var dataAttr = button.getAttribute('data-attr');\n        var isToggleButton = (button.getAttribute('data-toggle') === 'true');\n        var button3 = d3.select(button);\n\n        // Use 'data-toggle' and 'buttonClicked' to toggle buttons\n        // that have no one-to-one equivalent in fullLayout\n        if(isToggleButton) {\n            if(dataAttr === dataAttrClicked) {\n                button3.classed('active', !button3.classed('active'));\n            }\n        } else {\n            var val = (dataAttr === null) ?\n                dataAttr :\n                Lib.nestedProperty(fullLayout, dataAttr).get();\n\n            button3.classed('active', val === thisval);\n        }\n    });\n};\n\n/**\n * Check if modeBar is configured as button configuration argument\n *\n * @Param {object} buttons 2d array of grouped button config objects\n * @Return {boolean}\n */\nproto.hasButtons = function(buttons) {\n    var currentButtons = this.buttons;\n\n    if(!currentButtons) return false;\n\n    if(buttons.length !== currentButtons.length) return false;\n\n    for(var i = 0; i < buttons.length; ++i) {\n        if(buttons[i].length !== currentButtons[i].length) return false;\n        for(var j = 0; j < buttons[i].length; j++) {\n            if(buttons[i][j].name !== currentButtons[i][j].name) return false;\n        }\n    }\n\n    return true;\n};\n\n/**\n * @return {HTMLDivElement} The logo image wrapped in a group\n */\nproto.getLogo = function() {\n    var group = this.createGroup();\n    var a = document.createElement('a');\n\n    a.href = 'https://plot.ly/';\n    a.target = '_blank';\n    a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));\n    a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';\n\n    a.appendChild(this.createIcon(Icons.newplotlylogo));\n\n    group.appendChild(a);\n    return group;\n};\n\nproto.removeAllButtons = function() {\n    while(this.element.firstChild) {\n        this.element.removeChild(this.element.firstChild);\n    }\n\n    this.hasLogo = false;\n};\n\nproto.destroy = function() {\n    Lib.removeElement(this.container.querySelector('.modebar'));\n    Lib.deleteRelatedStyleRule(this._uid);\n};\n\nfunction createModeBar(gd, buttons) {\n    var fullLayout = gd._fullLayout;\n\n    var modeBar = new ModeBar({\n        graphInfo: gd,\n        container: fullLayout._modebardiv.node(),\n        buttons: buttons\n    });\n\n    if(fullLayout._privateplot) {\n        d3.select(modeBar.element).append('span')\n            .classed('badge-private float--left', true)\n            .text('PRIVATE');\n    }\n\n    return modeBar;\n}\n\nmodule.exports = createModeBar;\n\n},{\"../../../build/ploticon\":2,\"../../lib\":703,\"d3\":157,\"fast-isnumeric\":224}],642:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorAttrs = _dereq_('../color/attributes');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nvar buttonAttrs = templatedArray('button', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'plot',\n        \n    },\n    step: {\n        valType: 'enumerated',\n        \n        values: ['month', 'year', 'day', 'hour', 'minute', 'second', 'all'],\n        dflt: 'month',\n        editType: 'plot',\n        \n    },\n    stepmode: {\n        valType: 'enumerated',\n        \n        values: ['backward', 'todate'],\n        dflt: 'backward',\n        editType: 'plot',\n        \n    },\n    count: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        editType: 'plot',\n        \n    },\n    label: {\n        valType: 'string',\n        \n        editType: 'plot',\n        \n    },\n    editType: 'plot',\n    \n});\n\nmodule.exports = {\n    visible: {\n        valType: 'boolean',\n        \n        editType: 'plot',\n        \n    },\n\n    buttons: buttonAttrs,\n\n    x: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        \n        editType: 'plot',\n        \n    },\n    xanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'left', 'center', 'right'],\n        dflt: 'left',\n        \n        editType: 'plot',\n        \n    },\n    y: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        \n        editType: 'plot',\n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'top', 'middle', 'bottom'],\n        dflt: 'bottom',\n        \n        editType: 'plot',\n        \n    },\n\n    font: fontAttrs({\n        editType: 'plot',\n        \n    }),\n\n    bgcolor: {\n        valType: 'color',\n        dflt: colorAttrs.lightLine,\n        \n        editType: 'plot',\n        \n    },\n    activecolor: {\n        valType: 'color',\n        \n        editType: 'plot',\n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'plot',\n        \n    },\n    borderwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'plot',\n        \n    },\n    editType: 'plot'\n};\n\n},{\"../../plot_api/plot_template\":741,\"../../plots/font_attributes\":777,\"../color/attributes\":579}],643:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n\n    // 'y' position pad above counter axis domain\n    yPad: 0.02,\n\n    // minimum button width (regardless of text size)\n    minButtonWidth: 30,\n\n    // buttons rect radii\n    rx: 3,\n    ry: 3,\n\n    // light fraction used to compute the 'activecolor' default\n    lightAmount: 25,\n    darkAmount: 10\n};\n\n},{}],644:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../color');\nvar Template = _dereq_('../../plot_api/plot_template');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar constants = _dereq_('./constants');\n\n\nmodule.exports = function handleDefaults(containerIn, containerOut, layout, counterAxes, calendar) {\n    var selectorIn = containerIn.rangeselector || {};\n    var selectorOut = Template.newContainer(containerOut, 'rangeselector');\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(selectorIn, selectorOut, attributes, attr, dflt);\n    }\n\n    var buttons = handleArrayContainerDefaults(selectorIn, selectorOut, {\n        name: 'buttons',\n        handleItemDefaults: buttonDefaults,\n        calendar: calendar\n    });\n\n    var visible = coerce('visible', buttons.length > 0);\n    if(visible) {\n        var posDflt = getPosDflt(containerOut, layout, counterAxes);\n        coerce('x', posDflt[0]);\n        coerce('y', posDflt[1]);\n        Lib.noneOrAll(containerIn, containerOut, ['x', 'y']);\n\n        coerce('xanchor');\n        coerce('yanchor');\n\n        Lib.coerceFont(coerce, 'font', layout.font);\n\n        var bgColor = coerce('bgcolor');\n        coerce('activecolor', Color.contrast(bgColor, constants.lightAmount, constants.darkAmount));\n        coerce('bordercolor');\n        coerce('borderwidth');\n    }\n};\n\nfunction buttonDefaults(buttonIn, buttonOut, selectorOut, opts) {\n    var calendar = opts.calendar;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(buttonIn, buttonOut, attributes.buttons, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n\n    if(visible) {\n        var step = coerce('step');\n        if(step !== 'all') {\n            if(calendar && calendar !== 'gregorian' && (step === 'month' || step === 'year')) {\n                buttonOut.stepmode = 'backward';\n            } else {\n                coerce('stepmode');\n            }\n\n            coerce('count');\n        }\n\n        coerce('label');\n    }\n}\n\nfunction getPosDflt(containerOut, layout, counterAxes) {\n    var anchoredList = counterAxes.filter(function(ax) {\n        return layout[ax].anchor === containerOut._id;\n    });\n\n    var posY = 0;\n    for(var i = 0; i < anchoredList.length; i++) {\n        var domain = layout[anchoredList[i]].domain;\n        if(domain) posY = Math.max(domain[1], posY);\n    }\n\n    return [containerOut.domain[0], posY + constants.yPad];\n}\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../plots/array_container_defaults\":747,\"../color\":580,\"./attributes\":642,\"./constants\":643}],645:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Plots = _dereq_('../../plots/plots');\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar axisIds = _dereq_('../../plots/cartesian/axis_ids');\n\nvar alignmentConstants = _dereq_('../../constants/alignment');\nvar LINE_SPACING = alignmentConstants.LINE_SPACING;\nvar FROM_TL = alignmentConstants.FROM_TL;\nvar FROM_BR = alignmentConstants.FROM_BR;\n\nvar constants = _dereq_('./constants');\nvar getUpdateObject = _dereq_('./get_update_object');\n\nmodule.exports = function draw(gd) {\n    var fullLayout = gd._fullLayout;\n\n    var selectors = fullLayout._infolayer.selectAll('.rangeselector')\n        .data(makeSelectorData(gd), selectorKeyFunc);\n\n    selectors.enter().append('g')\n        .classed('rangeselector', true);\n\n    selectors.exit().remove();\n\n    selectors.style({\n        cursor: 'pointer',\n        'pointer-events': 'all'\n    });\n\n    selectors.each(function(d) {\n        var selector = d3.select(this);\n        var axisLayout = d;\n        var selectorLayout = axisLayout.rangeselector;\n\n        var buttons = selector.selectAll('g.button')\n            .data(Lib.filterVisible(selectorLayout.buttons));\n\n        buttons.enter().append('g')\n            .classed('button', true);\n\n        buttons.exit().remove();\n\n        buttons.each(function(d) {\n            var button = d3.select(this);\n            var update = getUpdateObject(axisLayout, d);\n\n            d._isActive = isActive(axisLayout, d, update);\n\n            button.call(drawButtonRect, selectorLayout, d);\n            button.call(drawButtonText, selectorLayout, d, gd);\n\n            button.on('click', function() {\n                if(gd._dragged) return;\n\n                Registry.call('_guiRelayout', gd, update);\n            });\n\n            button.on('mouseover', function() {\n                d._isHovered = true;\n                button.call(drawButtonRect, selectorLayout, d);\n            });\n\n            button.on('mouseout', function() {\n                d._isHovered = false;\n                button.call(drawButtonRect, selectorLayout, d);\n            });\n        });\n\n        reposition(gd, buttons, selectorLayout, axisLayout._name, selector);\n    });\n};\n\nfunction makeSelectorData(gd) {\n    var axes = axisIds.list(gd, 'x', true);\n    var data = [];\n\n    for(var i = 0; i < axes.length; i++) {\n        var axis = axes[i];\n\n        if(axis.rangeselector && axis.rangeselector.visible) {\n            data.push(axis);\n        }\n    }\n\n    return data;\n}\n\nfunction selectorKeyFunc(d) {\n    return d._id;\n}\n\nfunction isActive(axisLayout, opts, update) {\n    if(opts.step === 'all') {\n        return axisLayout.autorange === true;\n    } else {\n        var keys = Object.keys(update);\n\n        return (\n            axisLayout.range[0] === update[keys[0]] &&\n            axisLayout.range[1] === update[keys[1]]\n        );\n    }\n}\n\nfunction drawButtonRect(button, selectorLayout, d) {\n    var rect = Lib.ensureSingle(button, 'rect', 'selector-rect', function(s) {\n        s.attr('shape-rendering', 'crispEdges');\n    });\n\n    rect.attr({\n        'rx': constants.rx,\n        'ry': constants.ry\n    });\n\n    rect.call(Color.stroke, selectorLayout.bordercolor)\n        .call(Color.fill, getFillColor(selectorLayout, d))\n        .style('stroke-width', selectorLayout.borderwidth + 'px');\n}\n\nfunction getFillColor(selectorLayout, d) {\n    return (d._isActive || d._isHovered) ?\n        selectorLayout.activecolor :\n        selectorLayout.bgcolor;\n}\n\nfunction drawButtonText(button, selectorLayout, d, gd) {\n    function textLayout(s) {\n        svgTextUtils.convertToTspans(s, gd);\n    }\n\n    var text = Lib.ensureSingle(button, 'text', 'selector-text', function(s) {\n        s.classed('user-select-none', true)\n            .attr('text-anchor', 'middle');\n    });\n\n    text.call(Drawing.font, selectorLayout.font)\n        .text(getLabel(d, gd._fullLayout._meta))\n        .call(textLayout);\n}\n\nfunction getLabel(opts, _meta) {\n    if(opts.label) {\n        return _meta ?\n            Lib.templateString(opts.label, _meta) :\n            opts.label;\n    }\n\n    if(opts.step === 'all') return 'all';\n\n    return opts.count + opts.step.charAt(0);\n}\n\nfunction reposition(gd, buttons, opts, axName, selector) {\n    var width = 0;\n    var height = 0;\n\n    var borderWidth = opts.borderwidth;\n\n    buttons.each(function() {\n        var button = d3.select(this);\n        var text = button.select('.selector-text');\n\n        var tHeight = opts.font.size * LINE_SPACING;\n        var hEff = Math.max(tHeight * svgTextUtils.lineCount(text), 16) + 3;\n\n        height = Math.max(height, hEff);\n    });\n\n    buttons.each(function() {\n        var button = d3.select(this);\n        var rect = button.select('.selector-rect');\n        var text = button.select('.selector-text');\n\n        var tWidth = text.node() && Drawing.bBox(text.node()).width;\n        var tHeight = opts.font.size * LINE_SPACING;\n        var tLines = svgTextUtils.lineCount(text);\n\n        var wEff = Math.max(tWidth + 10, constants.minButtonWidth);\n\n        // TODO add MathJax support\n\n        // TODO add buttongap attribute\n\n        button.attr('transform', 'translate(' +\n            (borderWidth + width) + ',' + borderWidth +\n        ')');\n\n        rect.attr({\n            x: 0,\n            y: 0,\n            width: wEff,\n            height: height\n        });\n\n        svgTextUtils.positionText(text, wEff / 2,\n            height / 2 - ((tLines - 1) * tHeight / 2) + 3);\n\n        width += wEff + 5;\n    });\n\n    var graphSize = gd._fullLayout._size;\n    var lx = graphSize.l + graphSize.w * opts.x;\n    var ly = graphSize.t + graphSize.h * (1 - opts.y);\n\n    var xanchor = 'left';\n    if(Lib.isRightAnchor(opts)) {\n        lx -= width;\n        xanchor = 'right';\n    }\n    if(Lib.isCenterAnchor(opts)) {\n        lx -= width / 2;\n        xanchor = 'center';\n    }\n\n    var yanchor = 'top';\n    if(Lib.isBottomAnchor(opts)) {\n        ly -= height;\n        yanchor = 'bottom';\n    }\n    if(Lib.isMiddleAnchor(opts)) {\n        ly -= height / 2;\n        yanchor = 'middle';\n    }\n\n    width = Math.ceil(width);\n    height = Math.ceil(height);\n    lx = Math.round(lx);\n    ly = Math.round(ly);\n\n    Plots.autoMargin(gd, axName + '-range-selector', {\n        x: opts.x,\n        y: opts.y,\n        l: width * FROM_TL[xanchor],\n        r: width * FROM_BR[xanchor],\n        b: height * FROM_BR[yanchor],\n        t: height * FROM_TL[yanchor]\n    });\n\n    selector.attr('transform', 'translate(' + lx + ',' + ly + ')');\n}\n\n},{\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plots/cartesian/axis_ids\":754,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../drawing\":601,\"./constants\":643,\"./get_update_object\":646,\"d3\":157}],646:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nmodule.exports = function getUpdateObject(axisLayout, buttonLayout) {\n    var axName = axisLayout._name;\n    var update = {};\n\n    if(buttonLayout.step === 'all') {\n        update[axName + '.autorange'] = true;\n    } else {\n        var xrange = getXRange(axisLayout, buttonLayout);\n\n        update[axName + '.range[0]'] = xrange[0];\n        update[axName + '.range[1]'] = xrange[1];\n    }\n\n    return update;\n};\n\nfunction getXRange(axisLayout, buttonLayout) {\n    var currentRange = axisLayout.range;\n    var base = new Date(axisLayout.r2l(currentRange[1]));\n    var step = buttonLayout.step;\n    var count = buttonLayout.count;\n    var range0;\n\n    switch(buttonLayout.stepmode) {\n        case 'backward':\n            range0 = axisLayout.l2r(+d3.time[step].utc.offset(base, -count));\n            break;\n\n        case 'todate':\n            var base2 = d3.time[step].utc.offset(base, -count);\n\n            range0 = axisLayout.l2r(+d3.time[step].utc.ceil(base2));\n            break;\n    }\n\n    var range1 = currentRange[1];\n\n    return [range0, range1];\n}\n\n},{\"d3\":157}],647:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'rangeselector',\n\n    schema: {\n        subplots: {\n            xaxis: {rangeselector: _dereq_('./attributes')}\n        }\n    },\n\n    layoutAttributes: _dereq_('./attributes'),\n    handleDefaults: _dereq_('./defaults'),\n\n    draw: _dereq_('./draw')\n};\n\n},{\"./attributes\":642,\"./defaults\":644,\"./draw\":645}],648:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorAttributes = _dereq_('../color/attributes');\n\nmodule.exports = {\n    bgcolor: {\n        valType: 'color',\n        dflt: colorAttributes.background,\n        \n        editType: 'plot',\n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: colorAttributes.defaultLine,\n        \n        editType: 'plot',\n        \n    },\n    borderwidth: {\n        valType: 'integer',\n        dflt: 0,\n        min: 0,\n        \n        editType: 'plot',\n        \n    },\n    autorange: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        impliedEdits: {'range[0]': undefined, 'range[1]': undefined},\n        \n    },\n    range: {\n        valType: 'info_array',\n        \n        items: [\n            {valType: 'any', editType: 'calc', impliedEdits: {'^autorange': false}},\n            {valType: 'any', editType: 'calc', impliedEdits: {'^autorange': false}}\n        ],\n        editType: 'calc',\n        impliedEdits: {'autorange': false},\n        \n    },\n    thickness: {\n        valType: 'number',\n        dflt: 0.15,\n        min: 0,\n        max: 1,\n        \n        editType: 'plot',\n        \n    },\n    visible: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    editType: 'calc'\n};\n\n},{\"../color/attributes\":579}],649:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar listAxes = _dereq_('../../plots/cartesian/axis_ids').list;\nvar getAutoRange = _dereq_('../../plots/cartesian/autorange').getAutoRange;\nvar constants = _dereq_('./constants');\n\nmodule.exports = function calcAutorange(gd) {\n    var axes = listAxes(gd, 'x', true);\n\n    // Compute new slider range using axis autorange if necessary.\n    //\n    // Copy back range to input range slider container to skip\n    // this step in subsequent draw calls.\n\n    for(var i = 0; i < axes.length; i++) {\n        var ax = axes[i];\n        var opts = ax[constants.name];\n\n        if(opts && opts.visible && opts.autorange) {\n            opts._input.autorange = true;\n            opts._input.range = opts.range = getAutoRange(gd, ax);\n        }\n    }\n};\n\n},{\"../../plots/cartesian/autorange\":750,\"../../plots/cartesian/axis_ids\":754,\"./constants\":650}],650:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n\n    // attribute container name\n    name: 'rangeslider',\n\n    // class names\n\n    containerClassName: 'rangeslider-container',\n    bgClassName: 'rangeslider-bg',\n    rangePlotClassName: 'rangeslider-rangeplot',\n\n    maskMinClassName: 'rangeslider-mask-min',\n    maskMaxClassName: 'rangeslider-mask-max',\n    slideBoxClassName: 'rangeslider-slidebox',\n\n    grabberMinClassName: 'rangeslider-grabber-min',\n    grabAreaMinClassName: 'rangeslider-grabarea-min',\n    handleMinClassName: 'rangeslider-handle-min',\n\n    grabberMaxClassName: 'rangeslider-grabber-max',\n    grabAreaMaxClassName: 'rangeslider-grabarea-max',\n    handleMaxClassName: 'rangeslider-handle-max',\n\n    maskMinOppAxisClassName: 'rangeslider-mask-min-opp-axis',\n    maskMaxOppAxisClassName: 'rangeslider-mask-max-opp-axis',\n\n    // style constants\n\n    maskColor: 'rgba(0,0,0,0.4)',\n    maskOppAxisColor: 'rgba(0,0,0,0.2)',\n\n    slideBoxFill: 'transparent',\n    slideBoxCursor: 'ew-resize',\n\n    grabAreaFill: 'transparent',\n    grabAreaCursor: 'col-resize',\n    grabAreaWidth: 10,\n\n    handleWidth: 4,\n    handleRadius: 1,\n    handleStrokeWidth: 1,\n\n    extraPad: 15\n};\n\n},{}],651:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Template = _dereq_('../../plot_api/plot_template');\nvar axisIds = _dereq_('../../plots/cartesian/axis_ids');\n\nvar attributes = _dereq_('./attributes');\nvar oppAxisAttrs = _dereq_('./oppaxis_attributes');\n\nmodule.exports = function handleDefaults(layoutIn, layoutOut, axName) {\n    var axIn = layoutIn[axName];\n    var axOut = layoutOut[axName];\n\n    if(!(axIn.rangeslider || layoutOut._requestRangeslider[axOut._id])) return;\n\n    // not super proud of this (maybe store _ in axis object instead\n    if(!Lib.isPlainObject(axIn.rangeslider)) {\n        axIn.rangeslider = {};\n    }\n\n    var containerIn = axIn.rangeslider;\n    var containerOut = Template.newContainer(axOut, 'rangeslider');\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);\n    }\n\n    var rangeContainerIn, rangeContainerOut;\n    function coerceRange(attr, dflt) {\n        return Lib.coerce(rangeContainerIn, rangeContainerOut, oppAxisAttrs, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n    if(!visible) return;\n\n    coerce('bgcolor', layoutOut.plot_bgcolor);\n    coerce('bordercolor');\n    coerce('borderwidth');\n    coerce('thickness');\n\n    coerce('autorange', !axOut.isValidRange(containerIn.range));\n    coerce('range');\n\n    var subplots = layoutOut._subplots;\n    if(subplots) {\n        var yIds = subplots.cartesian\n            .filter(function(subplotId) {\n                return subplotId.substr(0, subplotId.indexOf('y')) === axisIds.name2id(axName);\n            })\n            .map(function(subplotId) {\n                return subplotId.substr(subplotId.indexOf('y'), subplotId.length);\n            });\n        var yNames = Lib.simpleMap(yIds, axisIds.id2name);\n        for(var i = 0; i < yNames.length; i++) {\n            var yName = yNames[i];\n\n            rangeContainerIn = containerIn[yName] || {};\n            rangeContainerOut = Template.newContainer(containerOut, yName, 'yaxis');\n\n            var yAxOut = layoutOut[yName];\n\n            var rangemodeDflt;\n            if(rangeContainerIn.range && yAxOut.isValidRange(rangeContainerIn.range)) {\n                rangemodeDflt = 'fixed';\n            }\n\n            var rangeMode = coerceRange('rangemode', rangemodeDflt);\n            if(rangeMode !== 'match') {\n                coerceRange('range', yAxOut.range.slice());\n            }\n        }\n    }\n\n    // to map back range slider (auto) range\n    containerOut._input = containerIn;\n};\n\n},{\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/axis_ids\":754,\"./attributes\":648,\"./oppaxis_attributes\":655}],652:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Plots = _dereq_('../../plots/plots');\n\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\nvar Titles = _dereq_('../titles');\n\nvar Cartesian = _dereq_('../../plots/cartesian');\nvar axisIDs = _dereq_('../../plots/cartesian/axis_ids');\n\nvar dragElement = _dereq_('../dragelement');\nvar setCursor = _dereq_('../../lib/setcursor');\n\nvar constants = _dereq_('./constants');\n\nmodule.exports = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var rangeSliderData = fullLayout._rangeSliderData;\n    for(var i = 0; i < rangeSliderData.length; i++) {\n        var opts = rangeSliderData[i][constants.name];\n        // fullLayout._uid may not exist when we call makeData\n        opts._clipId = opts._id + '-' + fullLayout._uid;\n    }\n\n    /*\n     * <g container />\n     *  <rect bg />\n     *  < .... range plot />\n     *  <rect mask-min />\n     *  <rect mask-max />\n     *  <rect slidebox />\n     *  <g grabber-min />\n     *      <rect handle-min />\n     *      <rect grabare-min />\n     *  <g grabber-max />\n     *      <rect handle-max />\n     *      <rect grabare-max />\n     *\n     *  ...\n     */\n\n    function keyFunction(axisOpts) {\n        return axisOpts._name;\n    }\n\n    var rangeSliders = fullLayout._infolayer\n        .selectAll('g.' + constants.containerClassName)\n        .data(rangeSliderData, keyFunction);\n\n    // remove exiting sliders and their corresponding clip paths\n    rangeSliders.exit().each(function(axisOpts) {\n        var opts = axisOpts[constants.name];\n        fullLayout._topdefs.select('#' + opts._clipId).remove();\n    }).remove();\n\n    // return early if no range slider is visible\n    if(rangeSliderData.length === 0) return;\n\n    rangeSliders.enter().append('g')\n        .classed(constants.containerClassName, true)\n        .attr('pointer-events', 'all');\n\n    // for all present range sliders\n    rangeSliders.each(function(axisOpts) {\n        var rangeSlider = d3.select(this);\n        var opts = axisOpts[constants.name];\n        var oppAxisOpts = fullLayout[axisIDs.id2name(axisOpts.anchor)];\n        var oppAxisRangeOpts = opts[axisIDs.id2name(axisOpts.anchor)];\n\n        // update range\n        // Expand slider range to the axis range\n        if(opts.range) {\n            var rng = Lib.simpleMap(opts.range, axisOpts.r2l);\n            var axRng = Lib.simpleMap(axisOpts.range, axisOpts.r2l);\n            var newRng;\n\n            if(axRng[0] < axRng[1]) {\n                newRng = [\n                    Math.min(rng[0], axRng[0]),\n                    Math.max(rng[1], axRng[1])\n                ];\n            } else {\n                newRng = [\n                    Math.max(rng[0], axRng[0]),\n                    Math.min(rng[1], axRng[1])\n                ];\n            }\n\n            opts.range = opts._input.range = Lib.simpleMap(newRng, axisOpts.l2r);\n        }\n\n        axisOpts.cleanRange('rangeslider.range');\n\n        // update range slider dimensions\n\n        var margin = fullLayout.margin;\n        var graphSize = fullLayout._size;\n        var domain = axisOpts.domain;\n        var tickHeight = opts._tickHeight;\n\n        var oppBottom = opts._oppBottom;\n\n        opts._width = graphSize.w * (domain[1] - domain[0]);\n\n        var x = Math.round(margin.l + (graphSize.w * domain[0]));\n\n        var y = Math.round(\n            graphSize.t + graphSize.h * (1 - oppBottom) +\n            tickHeight +\n            opts._offsetShift + constants.extraPad\n        );\n\n        rangeSlider.attr('transform', 'translate(' + x + ',' + y + ')');\n\n        // update data <--> pixel coordinate conversion methods\n\n        var range0 = axisOpts.r2l(opts.range[0]);\n        var range1 = axisOpts.r2l(opts.range[1]);\n        var dist = range1 - range0;\n\n        opts.p2d = function(v) {\n            return (v / opts._width) * dist + range0;\n        };\n\n        opts.d2p = function(v) {\n            return (v - range0) / dist * opts._width;\n        };\n\n        opts._rl = [range0, range1];\n\n        if(oppAxisRangeOpts.rangemode !== 'match') {\n            var range0OppAxis = oppAxisOpts.r2l(oppAxisRangeOpts.range[0]);\n            var range1OppAxis = oppAxisOpts.r2l(oppAxisRangeOpts.range[1]);\n            var distOppAxis = range1OppAxis - range0OppAxis;\n\n            opts.d2pOppAxis = function(v) {\n                return (v - range0OppAxis) / distOppAxis * opts._height;\n            };\n        }\n\n        // update inner nodes\n\n        rangeSlider\n            .call(drawBg, gd, axisOpts, opts)\n            .call(addClipPath, gd, axisOpts, opts)\n            .call(drawRangePlot, gd, axisOpts, opts)\n            .call(drawMasks, gd, axisOpts, opts, oppAxisRangeOpts)\n            .call(drawSlideBox, gd, axisOpts, opts)\n            .call(drawGrabbers, gd, axisOpts, opts);\n\n        // setup drag element\n        setupDragElement(rangeSlider, gd, axisOpts, opts);\n\n        // update current range\n        setPixelRange(rangeSlider, gd, axisOpts, opts, oppAxisOpts, oppAxisRangeOpts);\n\n        // title goes next to range slider instead of tick labels, so\n        // just take it over and draw it from here\n        if(axisOpts.side === 'bottom') {\n            Titles.draw(gd, axisOpts._id + 'title', {\n                propContainer: axisOpts,\n                propName: axisOpts._name + '.title',\n                placeholder: fullLayout._dfltTitle.x,\n                attributes: {\n                    x: axisOpts._offset + axisOpts._length / 2,\n                    y: y + opts._height + opts._offsetShift + 10 + 1.5 * axisOpts.title.font.size,\n                    'text-anchor': 'middle'\n                }\n            });\n        }\n    });\n};\n\nfunction setupDragElement(rangeSlider, gd, axisOpts, opts) {\n    var slideBox = rangeSlider.select('rect.' + constants.slideBoxClassName).node();\n    var grabAreaMin = rangeSlider.select('rect.' + constants.grabAreaMinClassName).node();\n    var grabAreaMax = rangeSlider.select('rect.' + constants.grabAreaMaxClassName).node();\n\n    rangeSlider.on('mousedown', function() {\n        var event = d3.event;\n        var target = event.target;\n        var startX = event.clientX;\n        var offsetX = startX - rangeSlider.node().getBoundingClientRect().left;\n        var minVal = opts.d2p(axisOpts._rl[0]);\n        var maxVal = opts.d2p(axisOpts._rl[1]);\n\n        var dragCover = dragElement.coverSlip();\n\n        dragCover.addEventListener('mousemove', mouseMove);\n        dragCover.addEventListener('mouseup', mouseUp);\n\n        function mouseMove(e) {\n            var delta = +e.clientX - startX;\n            var pixelMin, pixelMax, cursor;\n\n            switch(target) {\n                case slideBox:\n                    cursor = 'ew-resize';\n                    pixelMin = minVal + delta;\n                    pixelMax = maxVal + delta;\n                    break;\n\n                case grabAreaMin:\n                    cursor = 'col-resize';\n                    pixelMin = minVal + delta;\n                    pixelMax = maxVal;\n                    break;\n\n                case grabAreaMax:\n                    cursor = 'col-resize';\n                    pixelMin = minVal;\n                    pixelMax = maxVal + delta;\n                    break;\n\n                default:\n                    cursor = 'ew-resize';\n                    pixelMin = offsetX;\n                    pixelMax = offsetX + delta;\n                    break;\n            }\n\n            if(pixelMax < pixelMin) {\n                var tmp = pixelMax;\n                pixelMax = pixelMin;\n                pixelMin = tmp;\n            }\n\n            opts._pixelMin = pixelMin;\n            opts._pixelMax = pixelMax;\n\n            setCursor(d3.select(dragCover), cursor);\n            setDataRange(rangeSlider, gd, axisOpts, opts);\n        }\n\n        function mouseUp() {\n            dragCover.removeEventListener('mousemove', mouseMove);\n            dragCover.removeEventListener('mouseup', mouseUp);\n            Lib.removeElement(dragCover);\n        }\n    });\n}\n\nfunction setDataRange(rangeSlider, gd, axisOpts, opts) {\n    function clamp(v) {\n        return axisOpts.l2r(Lib.constrain(v, opts._rl[0], opts._rl[1]));\n    }\n\n    var dataMin = clamp(opts.p2d(opts._pixelMin));\n    var dataMax = clamp(opts.p2d(opts._pixelMax));\n\n    window.requestAnimationFrame(function() {\n        Registry.call('_guiRelayout', gd, axisOpts._name + '.range', [dataMin, dataMax]);\n    });\n}\n\nfunction setPixelRange(rangeSlider, gd, axisOpts, opts, oppAxisOpts, oppAxisRangeOpts) {\n    var hw2 = constants.handleWidth / 2;\n\n    function clamp(v) {\n        return Lib.constrain(v, 0, opts._width);\n    }\n\n    function clampOppAxis(v) {\n        return Lib.constrain(v, 0, opts._height);\n    }\n\n    function clampHandle(v) {\n        return Lib.constrain(v, -hw2, opts._width + hw2);\n    }\n\n    var pixelMin = clamp(opts.d2p(axisOpts._rl[0]));\n    var pixelMax = clamp(opts.d2p(axisOpts._rl[1]));\n\n    rangeSlider.select('rect.' + constants.slideBoxClassName)\n        .attr('x', pixelMin)\n        .attr('width', pixelMax - pixelMin);\n\n    rangeSlider.select('rect.' + constants.maskMinClassName)\n        .attr('width', pixelMin);\n\n    rangeSlider.select('rect.' + constants.maskMaxClassName)\n        .attr('x', pixelMax)\n        .attr('width', opts._width - pixelMax);\n\n    if(oppAxisRangeOpts.rangemode !== 'match') {\n        var pixelMinOppAxis = opts._height - clampOppAxis(opts.d2pOppAxis(oppAxisOpts._rl[1]));\n        var pixelMaxOppAxis = opts._height - clampOppAxis(opts.d2pOppAxis(oppAxisOpts._rl[0]));\n\n        rangeSlider.select('rect.' + constants.maskMinOppAxisClassName)\n            .attr('x', pixelMin)\n            .attr('height', pixelMinOppAxis)\n            .attr('width', pixelMax - pixelMin);\n\n        rangeSlider.select('rect.' + constants.maskMaxOppAxisClassName)\n            .attr('x', pixelMin)\n            .attr('y', pixelMaxOppAxis)\n            .attr('height', opts._height - pixelMaxOppAxis)\n            .attr('width', pixelMax - pixelMin);\n\n        rangeSlider.select('rect.' + constants.slideBoxClassName)\n            .attr('y', pixelMinOppAxis)\n            .attr('height', pixelMaxOppAxis - pixelMinOppAxis);\n    }\n\n    // add offset for crispier corners\n    // https://github.com/plotly/plotly.js/pull/1409\n    var offset = 0.5;\n\n    var xMin = Math.round(clampHandle(pixelMin - hw2)) - offset;\n    var xMax = Math.round(clampHandle(pixelMax - hw2)) + offset;\n\n    rangeSlider.select('g.' + constants.grabberMinClassName)\n        .attr('transform', 'translate(' + xMin + ',' + offset + ')');\n\n    rangeSlider.select('g.' + constants.grabberMaxClassName)\n        .attr('transform', 'translate(' + xMax + ',' + offset + ')');\n}\n\nfunction drawBg(rangeSlider, gd, axisOpts, opts) {\n    var bg = Lib.ensureSingle(rangeSlider, 'rect', constants.bgClassName, function(s) {\n        s.attr({\n            x: 0,\n            y: 0,\n            'shape-rendering': 'crispEdges'\n        });\n    });\n\n    var borderCorrect = (opts.borderwidth % 2) === 0 ?\n        opts.borderwidth :\n        opts.borderwidth - 1;\n\n    var offsetShift = -opts._offsetShift;\n    var lw = Drawing.crispRound(gd, opts.borderwidth);\n\n    bg.attr({\n        width: opts._width + borderCorrect,\n        height: opts._height + borderCorrect,\n        transform: 'translate(' + offsetShift + ',' + offsetShift + ')',\n        fill: opts.bgcolor,\n        stroke: opts.bordercolor,\n        'stroke-width': lw\n    });\n}\n\nfunction addClipPath(rangeSlider, gd, axisOpts, opts) {\n    var fullLayout = gd._fullLayout;\n\n    var clipPath = Lib.ensureSingleById(fullLayout._topdefs, 'clipPath', opts._clipId, function(s) {\n        s.append('rect').attr({ x: 0, y: 0 });\n    });\n\n    clipPath.select('rect').attr({\n        width: opts._width,\n        height: opts._height\n    });\n}\n\nfunction drawRangePlot(rangeSlider, gd, axisOpts, opts) {\n    var calcData = gd.calcdata;\n\n    var rangePlots = rangeSlider.selectAll('g.' + constants.rangePlotClassName)\n        .data(axisOpts._subplotsWith, Lib.identity);\n\n    rangePlots.enter().append('g')\n        .attr('class', function(id) { return constants.rangePlotClassName + ' ' + id; })\n        .call(Drawing.setClipUrl, opts._clipId, gd);\n\n    rangePlots.order();\n\n    rangePlots.exit().remove();\n\n    var mainplotinfo;\n\n    rangePlots.each(function(id, i) {\n        var plotgroup = d3.select(this);\n        var isMainPlot = (i === 0);\n\n        var oppAxisOpts = axisIDs.getFromId(gd, id, 'y');\n        var oppAxisName = oppAxisOpts._name;\n        var oppAxisRangeOpts = opts[oppAxisName];\n\n        var mockFigure = {\n            data: [],\n            layout: {\n                xaxis: {\n                    type: axisOpts.type,\n                    domain: [0, 1],\n                    range: opts.range.slice(),\n                    calendar: axisOpts.calendar\n                },\n                width: opts._width,\n                height: opts._height,\n                margin: { t: 0, b: 0, l: 0, r: 0 }\n            },\n            _context: gd._context\n        };\n\n        mockFigure.layout[oppAxisName] = {\n            type: oppAxisOpts.type,\n            domain: [0, 1],\n            range: oppAxisRangeOpts.rangemode !== 'match' ? oppAxisRangeOpts.range.slice() : oppAxisOpts.range.slice(),\n            calendar: oppAxisOpts.calendar\n        };\n\n        Plots.supplyDefaults(mockFigure);\n\n        var xa = mockFigure._fullLayout.xaxis;\n        var ya = mockFigure._fullLayout[oppAxisName];\n\n        xa.clearCalc();\n        xa.setScale();\n        ya.clearCalc();\n        ya.setScale();\n\n        var plotinfo = {\n            id: id,\n            plotgroup: plotgroup,\n            xaxis: xa,\n            yaxis: ya,\n            isRangePlot: true\n        };\n\n        if(isMainPlot) mainplotinfo = plotinfo;\n        else {\n            plotinfo.mainplot = 'xy';\n            plotinfo.mainplotinfo = mainplotinfo;\n        }\n\n        Cartesian.rangePlot(gd, plotinfo, filterRangePlotCalcData(calcData, id));\n    });\n}\n\nfunction filterRangePlotCalcData(calcData, subplotId) {\n    var out = [];\n\n    for(var i = 0; i < calcData.length; i++) {\n        var calcTrace = calcData[i];\n        var trace = calcTrace[0].trace;\n\n        if(trace.xaxis + trace.yaxis === subplotId) {\n            out.push(calcTrace);\n        }\n    }\n\n    return out;\n}\n\nfunction drawMasks(rangeSlider, gd, axisOpts, opts, oppAxisRangeOpts) {\n    var maskMin = Lib.ensureSingle(rangeSlider, 'rect', constants.maskMinClassName, function(s) {\n        s.attr({\n            x: 0,\n            y: 0,\n            'shape-rendering': 'crispEdges'\n        });\n    });\n\n    maskMin\n        .attr('height', opts._height)\n        .call(Color.fill, constants.maskColor);\n\n    var maskMax = Lib.ensureSingle(rangeSlider, 'rect', constants.maskMaxClassName, function(s) {\n        s.attr({\n            y: 0,\n            'shape-rendering': 'crispEdges'\n        });\n    });\n\n    maskMax\n        .attr('height', opts._height)\n        .call(Color.fill, constants.maskColor);\n\n    // masks used for oppAxis zoom\n    if(oppAxisRangeOpts.rangemode !== 'match') {\n        var maskMinOppAxis = Lib.ensureSingle(rangeSlider, 'rect', constants.maskMinOppAxisClassName, function(s) {\n            s.attr({\n                y: 0,\n                'shape-rendering': 'crispEdges'\n            });\n        });\n\n        maskMinOppAxis\n            .attr('width', opts._width)\n            .call(Color.fill, constants.maskOppAxisColor);\n\n        var maskMaxOppAxis = Lib.ensureSingle(rangeSlider, 'rect', constants.maskMaxOppAxisClassName, function(s) {\n            s.attr({\n                y: 0,\n                'shape-rendering': 'crispEdges'\n            });\n        });\n\n        maskMaxOppAxis\n            .attr('width', opts._width)\n            .style('border-top', constants.maskOppBorder)\n            .call(Color.fill, constants.maskOppAxisColor);\n    }\n}\n\nfunction drawSlideBox(rangeSlider, gd, axisOpts, opts) {\n    if(gd._context.staticPlot) return;\n\n    var slideBox = Lib.ensureSingle(rangeSlider, 'rect', constants.slideBoxClassName, function(s) {\n        s.attr({\n            y: 0,\n            cursor: constants.slideBoxCursor,\n            'shape-rendering': 'crispEdges'\n        });\n    });\n\n    slideBox.attr({\n        height: opts._height,\n        fill: constants.slideBoxFill\n    });\n}\n\nfunction drawGrabbers(rangeSlider, gd, axisOpts, opts) {\n    // <g grabber />\n    var grabberMin = Lib.ensureSingle(rangeSlider, 'g', constants.grabberMinClassName);\n    var grabberMax = Lib.ensureSingle(rangeSlider, 'g', constants.grabberMaxClassName);\n\n    // <g handle />\n    var handleFixAttrs = {\n        x: 0,\n        width: constants.handleWidth,\n        rx: constants.handleRadius,\n        fill: Color.background,\n        stroke: Color.defaultLine,\n        'stroke-width': constants.handleStrokeWidth,\n        'shape-rendering': 'crispEdges'\n    };\n    var handleDynamicAttrs = {\n        y: Math.round(opts._height / 4),\n        height: Math.round(opts._height / 2),\n    };\n    var handleMin = Lib.ensureSingle(grabberMin, 'rect', constants.handleMinClassName, function(s) {\n        s.attr(handleFixAttrs);\n    });\n    handleMin.attr(handleDynamicAttrs);\n\n    var handleMax = Lib.ensureSingle(grabberMax, 'rect', constants.handleMaxClassName, function(s) {\n        s.attr(handleFixAttrs);\n    });\n    handleMax.attr(handleDynamicAttrs);\n\n    // <g grabarea />\n    if(gd._context.staticPlot) return;\n\n    var grabAreaFixAttrs = {\n        width: constants.grabAreaWidth,\n        x: 0,\n        y: 0,\n        fill: constants.grabAreaFill,\n        cursor: constants.grabAreaCursor\n    };\n\n    var grabAreaMin = Lib.ensureSingle(grabberMin, 'rect', constants.grabAreaMinClassName, function(s) {\n        s.attr(grabAreaFixAttrs);\n    });\n    grabAreaMin.attr('height', opts._height);\n\n    var grabAreaMax = Lib.ensureSingle(grabberMax, 'rect', constants.grabAreaMaxClassName, function(s) {\n        s.attr(grabAreaFixAttrs);\n    });\n    grabAreaMax.attr('height', opts._height);\n}\n\n},{\"../../lib\":703,\"../../lib/setcursor\":723,\"../../plots/cartesian\":762,\"../../plots/cartesian/axis_ids\":754,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../dragelement\":598,\"../drawing\":601,\"../titles\":668,\"./constants\":650,\"d3\":157}],653:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar axisIDs = _dereq_('../../plots/cartesian/axis_ids');\nvar constants = _dereq_('./constants');\nvar name = constants.name;\n\nfunction isVisible(ax) {\n    var rangeSlider = ax && ax[name];\n    return rangeSlider && rangeSlider.visible;\n}\nexports.isVisible = isVisible;\n\nexports.makeData = function(fullLayout) {\n    var axes = axisIDs.list({ _fullLayout: fullLayout }, 'x', true);\n    var margin = fullLayout.margin;\n    var rangeSliderData = [];\n\n    if(!fullLayout._has('gl2d')) {\n        for(var i = 0; i < axes.length; i++) {\n            var ax = axes[i];\n\n            if(isVisible(ax)) {\n                rangeSliderData.push(ax);\n\n                var opts = ax[name];\n                opts._id = name + ax._id;\n                opts._height = (fullLayout.height - margin.b - margin.t) * opts.thickness;\n                opts._offsetShift = Math.floor(opts.borderwidth / 2);\n            }\n        }\n    }\n\n    fullLayout._rangeSliderData = rangeSliderData;\n};\n\nexports.autoMarginOpts = function(gd, ax) {\n    var opts = ax[name];\n\n    var oppBottom = Infinity;\n    var counterAxes = ax._counterAxes;\n    for(var j = 0; j < counterAxes.length; j++) {\n        var counterId = counterAxes[j];\n        var oppAxis = axisIDs.getFromId(gd, counterId);\n        oppBottom = Math.min(oppBottom, oppAxis.domain[0]);\n    }\n    opts._oppBottom = oppBottom;\n\n    var tickHeight = (ax.side === 'bottom' && ax._boundingBox.height) || 0;\n    opts._tickHeight = tickHeight;\n\n    return {\n        x: 0,\n        y: oppBottom,\n        l: 0,\n        r: 0,\n        t: 0,\n        b: opts._height + gd._fullLayout.margin.b + tickHeight,\n        pad: constants.extraPad + opts._offsetShift * 2\n    };\n};\n\n},{\"../../plots/cartesian/axis_ids\":754,\"./constants\":650}],654:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attrs = _dereq_('./attributes');\nvar oppAxisAttrs = _dereq_('./oppaxis_attributes');\nvar helpers = _dereq_('./helpers');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'rangeslider',\n\n    schema: {\n        subplots: {\n            xaxis: {\n                rangeslider: Lib.extendFlat({}, attrs, {\n                    yaxis: oppAxisAttrs\n                })\n            }\n        }\n    },\n\n    layoutAttributes: _dereq_('./attributes'),\n    handleDefaults: _dereq_('./defaults'),\n    calcAutorange: _dereq_('./calc_autorange'),\n    draw: _dereq_('./draw'),\n    isVisible: helpers.isVisible,\n    makeData: helpers.makeData,\n    autoMarginOpts: helpers.autoMarginOpts\n};\n\n},{\"../../lib\":703,\"./attributes\":648,\"./calc_autorange\":649,\"./defaults\":651,\"./draw\":652,\"./helpers\":653,\"./oppaxis_attributes\":655}],655:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    // not really a 'subplot' attribute container,\n    // but this is the flag we use to denote attributes that\n    // support yaxis, yaxis2, yaxis3, ... counters\n    _isSubplotObj: true,\n\n    rangemode: {\n        valType: 'enumerated',\n        values: ['auto', 'fixed', 'match'],\n        dflt: 'match',\n        \n        editType: 'calc',\n        \n    },\n    range: {\n        valType: 'info_array',\n        \n        items: [\n            {valType: 'any', editType: 'plot'},\n            {valType: 'any', editType: 'plot'}\n        ],\n        editType: 'plot',\n        \n    },\n    editType: 'calc'\n};\n\n},{}],656:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar annAttrs = _dereq_('../annotations/attributes');\nvar scatterLineAttrs = _dereq_('../../traces/scatter/attributes').line;\nvar dash = _dereq_('../drawing/attributes').dash;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nmodule.exports = templatedArray('shape', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc+arraydraw',\n        \n    },\n\n    type: {\n        valType: 'enumerated',\n        values: ['circle', 'rect', 'path', 'line'],\n        \n        editType: 'calc+arraydraw',\n        \n    },\n\n    layer: {\n        valType: 'enumerated',\n        values: ['below', 'above'],\n        dflt: 'above',\n        \n        editType: 'arraydraw',\n        \n    },\n\n    xref: extendFlat({}, annAttrs.xref, {\n        \n    }),\n    xsizemode: {\n        valType: 'enumerated',\n        values: ['scaled', 'pixel'],\n        dflt: 'scaled',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    xanchor: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    x0: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    x1: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n\n    yref: extendFlat({}, annAttrs.yref, {\n        \n    }),\n    ysizemode: {\n        valType: 'enumerated',\n        values: ['scaled', 'pixel'],\n        dflt: 'scaled',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    yanchor: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    y0: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n    y1: {\n        valType: 'any',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n\n    path: {\n        valType: 'string',\n        \n        editType: 'calc+arraydraw',\n        \n    },\n\n    opacity: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 1,\n        \n        editType: 'arraydraw',\n        \n    },\n    line: {\n        color: extendFlat({}, scatterLineAttrs.color, {editType: 'arraydraw'}),\n        width: extendFlat({}, scatterLineAttrs.width, {editType: 'calc+arraydraw'}),\n        dash: extendFlat({}, dash, {editType: 'arraydraw'}),\n        \n        editType: 'calc+arraydraw'\n    },\n    fillcolor: {\n        valType: 'color',\n        dflt: 'rgba(0,0,0,0)',\n        \n        editType: 'arraydraw',\n        \n    },\n    editType: 'arraydraw'\n});\n\n},{\"../../lib/extend\":693,\"../../plot_api/plot_template\":741,\"../../traces/scatter/attributes\":1075,\"../annotations/attributes\":563,\"../drawing/attributes\":600}],657:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar constants = _dereq_('./constants');\nvar helpers = _dereq_('./helpers');\n\n\nmodule.exports = function calcAutorange(gd) {\n    var fullLayout = gd._fullLayout;\n    var shapeList = Lib.filterVisible(fullLayout.shapes);\n\n    if(!shapeList.length || !gd._fullData.length) return;\n\n    for(var i = 0; i < shapeList.length; i++) {\n        var shape = shapeList[i];\n        shape._extremes = {};\n\n        var ax, bounds;\n\n        if(shape.xref !== 'paper') {\n            var vx0 = shape.xsizemode === 'pixel' ? shape.xanchor : shape.x0;\n            var vx1 = shape.xsizemode === 'pixel' ? shape.xanchor : shape.x1;\n            ax = Axes.getFromId(gd, shape.xref);\n\n            bounds = shapeBounds(ax, vx0, vx1, shape.path, constants.paramIsX);\n            if(bounds) {\n                shape._extremes[ax._id] = Axes.findExtremes(ax, bounds, calcXPaddingOptions(shape));\n            }\n        }\n\n        if(shape.yref !== 'paper') {\n            var vy0 = shape.ysizemode === 'pixel' ? shape.yanchor : shape.y0;\n            var vy1 = shape.ysizemode === 'pixel' ? shape.yanchor : shape.y1;\n            ax = Axes.getFromId(gd, shape.yref);\n\n            bounds = shapeBounds(ax, vy0, vy1, shape.path, constants.paramIsY);\n            if(bounds) {\n                shape._extremes[ax._id] = Axes.findExtremes(ax, bounds, calcYPaddingOptions(shape));\n            }\n        }\n    }\n};\n\nfunction calcXPaddingOptions(shape) {\n    return calcPaddingOptions(shape.line.width, shape.xsizemode, shape.x0, shape.x1, shape.path, false);\n}\n\nfunction calcYPaddingOptions(shape) {\n    return calcPaddingOptions(shape.line.width, shape.ysizemode, shape.y0, shape.y1, shape.path, true);\n}\n\nfunction calcPaddingOptions(lineWidth, sizeMode, v0, v1, path, isYAxis) {\n    var ppad = lineWidth / 2;\n    var axisDirectionReverted = isYAxis;\n\n    if(sizeMode === 'pixel') {\n        var coords = path ?\n            helpers.extractPathCoords(path, isYAxis ? constants.paramIsY : constants.paramIsX) :\n            [v0, v1];\n        var maxValue = Lib.aggNums(Math.max, null, coords);\n        var minValue = Lib.aggNums(Math.min, null, coords);\n        var beforePad = minValue < 0 ? Math.abs(minValue) + ppad : ppad;\n        var afterPad = maxValue > 0 ? maxValue + ppad : ppad;\n\n        return {\n            ppad: ppad,\n            ppadplus: axisDirectionReverted ? beforePad : afterPad,\n            ppadminus: axisDirectionReverted ? afterPad : beforePad\n        };\n    } else {\n        return {ppad: ppad};\n    }\n}\n\nfunction shapeBounds(ax, v0, v1, path, paramsToUse) {\n    var convertVal = (ax.type === 'category' || ax.type === 'multicategory') ? ax.r2c : ax.d2c;\n\n    if(v0 !== undefined) return [convertVal(v0), convertVal(v1)];\n    if(!path) return;\n\n    var min = Infinity;\n    var max = -Infinity;\n    var segments = path.match(constants.segmentRE);\n    var i;\n    var segment;\n    var drawnParam;\n    var params;\n    var val;\n\n    if(ax.type === 'date') convertVal = helpers.decodeDate(convertVal);\n\n    for(i = 0; i < segments.length; i++) {\n        segment = segments[i];\n        drawnParam = paramsToUse[segment.charAt(0)].drawn;\n        if(drawnParam === undefined) continue;\n\n        params = segments[i].substr(1).match(constants.paramRE);\n        if(!params || params.length < drawnParam) continue;\n\n        val = convertVal(params[drawnParam]);\n        if(val < min) min = val;\n        if(val > max) max = val;\n    }\n    if(max >= min) return [min, max];\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"./constants\":658,\"./helpers\":661}],658:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = {\n    segmentRE: /[MLHVQCTSZ][^MLHVQCTSZ]*/g,\n    paramRE: /[^\\s,]+/g,\n\n    // which numbers in each path segment are x (or y) values\n    // drawn is which param is a drawn point, as opposed to a\n    // control point (which doesn't count toward autorange.\n    // TODO: this means curved paths could extend beyond the\n    // autorange bounds. This is a bit tricky to get right\n    // unless we revert to bounding boxes, but perhaps there's\n    // a calculation we could do...)\n    paramIsX: {\n        M: {0: true, drawn: 0},\n        L: {0: true, drawn: 0},\n        H: {0: true, drawn: 0},\n        V: {},\n        Q: {0: true, 2: true, drawn: 2},\n        C: {0: true, 2: true, 4: true, drawn: 4},\n        T: {0: true, drawn: 0},\n        S: {0: true, 2: true, drawn: 2},\n        // A: {0: true, 5: true},\n        Z: {}\n    },\n\n    paramIsY: {\n        M: {1: true, drawn: 1},\n        L: {1: true, drawn: 1},\n        H: {},\n        V: {0: true, drawn: 0},\n        Q: {1: true, 3: true, drawn: 3},\n        C: {1: true, 3: true, 5: true, drawn: 5},\n        T: {1: true, drawn: 1},\n        S: {1: true, 3: true, drawn: 5},\n        // A: {1: true, 6: true},\n        Z: {}\n    },\n\n    numParams: {\n        M: 2,\n        L: 2,\n        H: 1,\n        V: 1,\n        Q: 4,\n        C: 6,\n        T: 2,\n        S: 4,\n        // A: 7,\n        Z: 0\n    }\n};\n\n},{}],659:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar helpers = _dereq_('./helpers');\n\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    handleArrayContainerDefaults(layoutIn, layoutOut, {\n        name: 'shapes',\n        handleItemDefaults: handleShapeDefaults\n    });\n};\n\nfunction handleShapeDefaults(shapeIn, shapeOut, fullLayout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(shapeIn, shapeOut, attributes, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n\n    if(!visible) return;\n\n    coerce('layer');\n    coerce('opacity');\n    coerce('fillcolor');\n    coerce('line.color');\n    coerce('line.width');\n    coerce('line.dash');\n\n    var dfltType = shapeIn.path ? 'path' : 'rect';\n    var shapeType = coerce('type', dfltType);\n    var xSizeMode = coerce('xsizemode');\n    var ySizeMode = coerce('ysizemode');\n\n    // positioning\n    var axLetters = ['x', 'y'];\n    for(var i = 0; i < 2; i++) {\n        var axLetter = axLetters[i];\n        var attrAnchor = axLetter + 'anchor';\n        var sizeMode = axLetter === 'x' ? xSizeMode : ySizeMode;\n        var gdMock = {_fullLayout: fullLayout};\n        var ax;\n        var pos2r;\n        var r2pos;\n\n        // xref, yref\n        var axRef = Axes.coerceRef(shapeIn, shapeOut, gdMock, axLetter, '', 'paper');\n\n        if(axRef !== 'paper') {\n            ax = Axes.getFromId(gdMock, axRef);\n            ax._shapeIndices.push(shapeOut._index);\n            r2pos = helpers.rangeToShapePosition(ax);\n            pos2r = helpers.shapePositionToRange(ax);\n        } else {\n            pos2r = r2pos = Lib.identity;\n        }\n\n        // Coerce x0, x1, y0, y1\n        if(shapeType !== 'path') {\n            var dflt0 = 0.25;\n            var dflt1 = 0.75;\n\n            // hack until V2.0 when log has regular range behavior - make it look like other\n            // ranges to send to coerce, then put it back after\n            // this is all to give reasonable default position behavior on log axes, which is\n            // a pretty unimportant edge case so we could just ignore this.\n            var attr0 = axLetter + '0';\n            var attr1 = axLetter + '1';\n            var in0 = shapeIn[attr0];\n            var in1 = shapeIn[attr1];\n            shapeIn[attr0] = pos2r(shapeIn[attr0], true);\n            shapeIn[attr1] = pos2r(shapeIn[attr1], true);\n\n            if(sizeMode === 'pixel') {\n                coerce(attr0, 0);\n                coerce(attr1, 10);\n            } else {\n                Axes.coercePosition(shapeOut, gdMock, coerce, axRef, attr0, dflt0);\n                Axes.coercePosition(shapeOut, gdMock, coerce, axRef, attr1, dflt1);\n            }\n\n            // hack part 2\n            shapeOut[attr0] = r2pos(shapeOut[attr0]);\n            shapeOut[attr1] = r2pos(shapeOut[attr1]);\n            shapeIn[attr0] = in0;\n            shapeIn[attr1] = in1;\n        }\n\n        // Coerce xanchor and yanchor\n        if(sizeMode === 'pixel') {\n            // Hack for log axis described above\n            var inAnchor = shapeIn[attrAnchor];\n            shapeIn[attrAnchor] = pos2r(shapeIn[attrAnchor], true);\n\n            Axes.coercePosition(shapeOut, gdMock, coerce, axRef, attrAnchor, 0.25);\n\n            // Hack part 2\n            shapeOut[attrAnchor] = r2pos(shapeOut[attrAnchor]);\n            shapeIn[attrAnchor] = inAnchor;\n        }\n    }\n\n    if(shapeType === 'path') {\n        coerce('path');\n    } else {\n        Lib.noneOrAll(shapeIn, shapeOut, ['x0', 'x1', 'y0', 'y1']);\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/cartesian/axes\":751,\"./attributes\":656,\"./helpers\":661}],660:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\nvar arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;\n\nvar dragElement = _dereq_('../dragelement');\nvar setCursor = _dereq_('../../lib/setcursor');\n\nvar constants = _dereq_('./constants');\nvar helpers = _dereq_('./helpers');\n\n\n// Shapes are stored in gd.layout.shapes, an array of objects\n// index can point to one item in this array,\n//  or non-numeric to simply add a new one\n//  or -1 to modify all existing\n// opt can be the full options object, or one key (to be set to value)\n//  or undefined to simply redraw\n// if opt is blank, val can be 'add' or a full options object to add a new\n//  annotation at that point in the array, or 'remove' to delete this one\n\nmodule.exports = {\n    draw: draw,\n    drawOne: drawOne\n};\n\nfunction draw(gd) {\n    var fullLayout = gd._fullLayout;\n\n    // Remove previous shapes before drawing new in shapes in fullLayout.shapes\n    fullLayout._shapeUpperLayer.selectAll('path').remove();\n    fullLayout._shapeLowerLayer.selectAll('path').remove();\n\n    for(var k in fullLayout._plots) {\n        var shapelayer = fullLayout._plots[k].shapelayer;\n        if(shapelayer) shapelayer.selectAll('path').remove();\n    }\n\n    for(var i = 0; i < fullLayout.shapes.length; i++) {\n        if(fullLayout.shapes[i].visible) {\n            drawOne(gd, i);\n        }\n    }\n\n    // may need to resurrect this if we put text (LaTeX) in shapes\n    // return Plots.previousPromises(gd);\n}\n\nfunction drawOne(gd, index) {\n    // remove the existing shape if there is one.\n    // because indices can change, we need to look in all shape layers\n    gd._fullLayout._paperdiv\n        .selectAll('.shapelayer [data-index=\"' + index + '\"]')\n        .remove();\n\n    var options = gd._fullLayout.shapes[index] || {};\n\n    // this shape is gone - quit now after deleting it\n    // TODO: use d3 idioms instead of deleting and redrawing every time\n    if(!options._input || options.visible === false) return;\n\n    if(options.layer !== 'below') {\n        drawShape(gd._fullLayout._shapeUpperLayer);\n    } else if(options.xref === 'paper' || options.yref === 'paper') {\n        drawShape(gd._fullLayout._shapeLowerLayer);\n    } else {\n        var plotinfo = gd._fullLayout._plots[options.xref + options.yref];\n        if(plotinfo) {\n            var mainPlot = plotinfo.mainplotinfo || plotinfo;\n            drawShape(mainPlot.shapelayer);\n        } else {\n            // Fall back to _shapeLowerLayer in case the requested subplot doesn't exist.\n            // This can happen if you reference the shape to an x / y axis combination\n            // that doesn't have any data on it (and layer is below)\n            drawShape(gd._fullLayout._shapeLowerLayer);\n        }\n    }\n\n    function drawShape(shapeLayer) {\n        var attrs = {\n            'data-index': index,\n            'fill-rule': 'evenodd',\n            d: getPathString(gd, options)\n        };\n        var lineColor = options.line.width ? options.line.color : 'rgba(0,0,0,0)';\n\n        var path = shapeLayer.append('path')\n            .attr(attrs)\n            .style('opacity', options.opacity)\n            .call(Color.stroke, lineColor)\n            .call(Color.fill, options.fillcolor)\n            .call(Drawing.dashLine, options.line.dash, options.line.width);\n\n        setClipPath(path, gd, options);\n\n        if(gd._context.edits.shapePosition) setupDragElement(gd, path, options, index, shapeLayer);\n    }\n}\n\nfunction setClipPath(shapePath, gd, shapeOptions) {\n    // note that for layer=\"below\" the clipAxes can be different from the\n    // subplot we're drawing this in. This could cause problems if the shape\n    // spans two subplots. See https://github.com/plotly/plotly.js/issues/1452\n    var clipAxes = (shapeOptions.xref + shapeOptions.yref).replace(/paper/g, '');\n\n    Drawing.setClipUrl(\n        shapePath,\n        clipAxes ? 'clip' + gd._fullLayout._uid + clipAxes : null,\n        gd\n    );\n}\n\nfunction setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {\n    var MINWIDTH = 10;\n    var MINHEIGHT = 10;\n\n    var xPixelSized = shapeOptions.xsizemode === 'pixel';\n    var yPixelSized = shapeOptions.ysizemode === 'pixel';\n    var isLine = shapeOptions.type === 'line';\n    var isPath = shapeOptions.type === 'path';\n\n    var editHelpers = arrayEditor(gd.layout, 'shapes', shapeOptions);\n    var modifyItem = editHelpers.modifyItem;\n\n    var x0, y0, x1, y1, xAnchor, yAnchor;\n    var n0, s0, w0, e0, optN, optS, optW, optE;\n    var pathIn;\n\n    // setup conversion functions\n    var xa = Axes.getFromId(gd, shapeOptions.xref);\n    var ya = Axes.getFromId(gd, shapeOptions.yref);\n    var x2p = helpers.getDataToPixel(gd, xa);\n    var y2p = helpers.getDataToPixel(gd, ya, true);\n    var p2x = helpers.getPixelToData(gd, xa);\n    var p2y = helpers.getPixelToData(gd, ya, true);\n\n    var sensoryElement = obtainSensoryElement();\n    var dragOptions = {\n        element: sensoryElement.node(),\n        gd: gd,\n        prepFn: startDrag,\n        doneFn: endDrag,\n        clickFn: abortDrag\n    };\n    var dragMode;\n\n    dragElement.init(dragOptions);\n\n    sensoryElement.node().onmousemove = updateDragMode;\n\n    function obtainSensoryElement() {\n        return isLine ? createLineDragHandles() : shapePath;\n    }\n\n    function createLineDragHandles() {\n        var minSensoryWidth = 10;\n        var sensoryWidth = Math.max(shapeOptions.line.width, minSensoryWidth);\n\n        // Helper shapes group\n        // Note that by setting the `data-index` attr, it is ensured that\n        // the helper group is purged in this modules `draw` function\n        var g = shapeLayer.append('g')\n          .attr('data-index', index);\n\n        // Helper path for moving\n        g.append('path')\n          .attr('d', shapePath.attr('d'))\n          .style({\n              'cursor': 'move',\n              'stroke-width': sensoryWidth,\n              'stroke-opacity': '0' // ensure not visible\n          });\n\n        // Helper circles for resizing\n        var circleStyle = {\n            'fill-opacity': '0' // ensure not visible\n        };\n        var circleRadius = sensoryWidth / 2 > minSensoryWidth ? sensoryWidth / 2 : minSensoryWidth;\n\n        g.append('circle')\n          .attr({\n              'data-line-point': 'start-point',\n              'cx': xPixelSized ? x2p(shapeOptions.xanchor) + shapeOptions.x0 : x2p(shapeOptions.x0),\n              'cy': yPixelSized ? y2p(shapeOptions.yanchor) - shapeOptions.y0 : y2p(shapeOptions.y0),\n              'r': circleRadius\n          })\n          .style(circleStyle)\n          .classed('cursor-grab', true);\n\n        g.append('circle')\n          .attr({\n              'data-line-point': 'end-point',\n              'cx': xPixelSized ? x2p(shapeOptions.xanchor) + shapeOptions.x1 : x2p(shapeOptions.x1),\n              'cy': yPixelSized ? y2p(shapeOptions.yanchor) - shapeOptions.y1 : y2p(shapeOptions.y1),\n              'r': circleRadius\n          })\n          .style(circleStyle)\n          .classed('cursor-grab', true);\n\n        return g;\n    }\n\n    function updateDragMode(evt) {\n        if(isLine) {\n            if(evt.target.tagName === 'path') {\n                dragMode = 'move';\n            } else {\n                dragMode = evt.target.attributes['data-line-point'].value === 'start-point' ?\n                  'resize-over-start-point' : 'resize-over-end-point';\n            }\n        } else {\n            // element might not be on screen at time of setup,\n            // so obtain bounding box here\n            var dragBBox = dragOptions.element.getBoundingClientRect();\n\n            // choose 'move' or 'resize'\n            // based on initial position of cursor within the drag element\n            var w = dragBBox.right - dragBBox.left;\n            var h = dragBBox.bottom - dragBBox.top;\n            var x = evt.clientX - dragBBox.left;\n            var y = evt.clientY - dragBBox.top;\n            var cursor = (!isPath && w > MINWIDTH && h > MINHEIGHT && !evt.shiftKey) ?\n                dragElement.getCursor(x / w, 1 - y / h) :\n                'move';\n\n            setCursor(shapePath, cursor);\n\n            // possible values 'move', 'sw', 'w', 'se', 'e', 'ne', 'n', 'nw' and 'w'\n            dragMode = cursor.split('-')[0];\n        }\n    }\n\n    function startDrag(evt) {\n        // setup update strings and initial values\n        if(xPixelSized) {\n            xAnchor = x2p(shapeOptions.xanchor);\n        }\n        if(yPixelSized) {\n            yAnchor = y2p(shapeOptions.yanchor);\n        }\n\n        if(shapeOptions.type === 'path') {\n            pathIn = shapeOptions.path;\n        } else {\n            x0 = xPixelSized ? shapeOptions.x0 : x2p(shapeOptions.x0);\n            y0 = yPixelSized ? shapeOptions.y0 : y2p(shapeOptions.y0);\n            x1 = xPixelSized ? shapeOptions.x1 : x2p(shapeOptions.x1);\n            y1 = yPixelSized ? shapeOptions.y1 : y2p(shapeOptions.y1);\n        }\n\n        if(x0 < x1) {\n            w0 = x0;\n            optW = 'x0';\n            e0 = x1;\n            optE = 'x1';\n        } else {\n            w0 = x1;\n            optW = 'x1';\n            e0 = x0;\n            optE = 'x0';\n        }\n\n        // For fixed size shapes take opposing direction of y-axis into account.\n        // Hint: For data sized shapes this is done by the y2p function.\n        if((!yPixelSized && y0 < y1) || (yPixelSized && y0 > y1)) {\n            n0 = y0;\n            optN = 'y0';\n            s0 = y1;\n            optS = 'y1';\n        } else {\n            n0 = y1;\n            optN = 'y1';\n            s0 = y0;\n            optS = 'y0';\n        }\n\n        // setup dragMode and the corresponding handler\n        updateDragMode(evt);\n        renderVisualCues(shapeLayer, shapeOptions);\n        deactivateClipPathTemporarily(shapePath, shapeOptions, gd);\n        dragOptions.moveFn = (dragMode === 'move') ? moveShape : resizeShape;\n    }\n\n    function endDrag() {\n        setCursor(shapePath);\n        removeVisualCues(shapeLayer);\n\n        // Don't rely on clipPath being activated during re-layout\n        setClipPath(shapePath, gd, shapeOptions);\n        Registry.call('_guiRelayout', gd, editHelpers.getUpdateObj());\n    }\n\n    function abortDrag() {\n        removeVisualCues(shapeLayer);\n    }\n\n    function moveShape(dx, dy) {\n        if(shapeOptions.type === 'path') {\n            var noOp = function(coord) { return coord; };\n            var moveX = noOp;\n            var moveY = noOp;\n\n            if(xPixelSized) {\n                modifyItem('xanchor', shapeOptions.xanchor = p2x(xAnchor + dx));\n            } else {\n                moveX = function moveX(x) { return p2x(x2p(x) + dx); };\n                if(xa && xa.type === 'date') moveX = helpers.encodeDate(moveX);\n            }\n\n            if(yPixelSized) {\n                modifyItem('yanchor', shapeOptions.yanchor = p2y(yAnchor + dy));\n            } else {\n                moveY = function moveY(y) { return p2y(y2p(y) + dy); };\n                if(ya && ya.type === 'date') moveY = helpers.encodeDate(moveY);\n            }\n\n            modifyItem('path', shapeOptions.path = movePath(pathIn, moveX, moveY));\n        } else {\n            if(xPixelSized) {\n                modifyItem('xanchor', shapeOptions.xanchor = p2x(xAnchor + dx));\n            } else {\n                modifyItem('x0', shapeOptions.x0 = p2x(x0 + dx));\n                modifyItem('x1', shapeOptions.x1 = p2x(x1 + dx));\n            }\n\n            if(yPixelSized) {\n                modifyItem('yanchor', shapeOptions.yanchor = p2y(yAnchor + dy));\n            } else {\n                modifyItem('y0', shapeOptions.y0 = p2y(y0 + dy));\n                modifyItem('y1', shapeOptions.y1 = p2y(y1 + dy));\n            }\n        }\n\n        shapePath.attr('d', getPathString(gd, shapeOptions));\n        renderVisualCues(shapeLayer, shapeOptions);\n    }\n\n    function resizeShape(dx, dy) {\n        if(isPath) {\n            // TODO: implement path resize, don't forget to update dragMode code\n            var noOp = function(coord) { return coord; };\n            var moveX = noOp;\n            var moveY = noOp;\n\n            if(xPixelSized) {\n                modifyItem('xanchor', shapeOptions.xanchor = p2x(xAnchor + dx));\n            } else {\n                moveX = function moveX(x) { return p2x(x2p(x) + dx); };\n                if(xa && xa.type === 'date') moveX = helpers.encodeDate(moveX);\n            }\n\n            if(yPixelSized) {\n                modifyItem('yanchor', shapeOptions.yanchor = p2y(yAnchor + dy));\n            } else {\n                moveY = function moveY(y) { return p2y(y2p(y) + dy); };\n                if(ya && ya.type === 'date') moveY = helpers.encodeDate(moveY);\n            }\n\n            modifyItem('path', shapeOptions.path = movePath(pathIn, moveX, moveY));\n        } else if(isLine) {\n            if(dragMode === 'resize-over-start-point') {\n                var newX0 = x0 + dx;\n                var newY0 = yPixelSized ? y0 - dy : y0 + dy;\n                modifyItem('x0', shapeOptions.x0 = xPixelSized ? newX0 : p2x(newX0));\n                modifyItem('y0', shapeOptions.y0 = yPixelSized ? newY0 : p2y(newY0));\n            } else if(dragMode === 'resize-over-end-point') {\n                var newX1 = x1 + dx;\n                var newY1 = yPixelSized ? y1 - dy : y1 + dy;\n                modifyItem('x1', shapeOptions.x1 = xPixelSized ? newX1 : p2x(newX1));\n                modifyItem('y1', shapeOptions.y1 = yPixelSized ? newY1 : p2y(newY1));\n            }\n        } else {\n            var newN = (~dragMode.indexOf('n')) ? n0 + dy : n0;\n            var newS = (~dragMode.indexOf('s')) ? s0 + dy : s0;\n            var newW = (~dragMode.indexOf('w')) ? w0 + dx : w0;\n            var newE = (~dragMode.indexOf('e')) ? e0 + dx : e0;\n\n            // Do things in opposing direction for y-axis.\n            // Hint: for data-sized shapes the reversal of axis direction is done in p2y.\n            if(~dragMode.indexOf('n') && yPixelSized) newN = n0 - dy;\n            if(~dragMode.indexOf('s') && yPixelSized) newS = s0 - dy;\n\n            // Update shape eventually. Again, be aware of the\n            // opposing direction of the y-axis of fixed size shapes.\n            if((!yPixelSized && newS - newN > MINHEIGHT) ||\n              (yPixelSized && newN - newS > MINHEIGHT)) {\n                modifyItem(optN, shapeOptions[optN] = yPixelSized ? newN : p2y(newN));\n                modifyItem(optS, shapeOptions[optS] = yPixelSized ? newS : p2y(newS));\n            }\n            if(newE - newW > MINWIDTH) {\n                modifyItem(optW, shapeOptions[optW] = xPixelSized ? newW : p2x(newW));\n                modifyItem(optE, shapeOptions[optE] = xPixelSized ? newE : p2x(newE));\n            }\n        }\n\n        shapePath.attr('d', getPathString(gd, shapeOptions));\n        renderVisualCues(shapeLayer, shapeOptions);\n    }\n\n    function renderVisualCues(shapeLayer, shapeOptions) {\n        if(xPixelSized || yPixelSized) {\n            renderAnchor();\n        }\n\n        function renderAnchor() {\n            var isNotPath = shapeOptions.type !== 'path';\n\n            // d3 join with dummy data to satisfy d3 data-binding\n            var visualCues = shapeLayer.selectAll('.visual-cue').data([0]);\n\n            // Enter\n            var strokeWidth = 1;\n            visualCues.enter()\n              .append('path')\n              .attr({\n                  'fill': '#fff',\n                  'fill-rule': 'evenodd',\n                  'stroke': '#000',\n                  'stroke-width': strokeWidth\n              })\n              .classed('visual-cue', true);\n\n            // Update\n            var posX = x2p(\n              xPixelSized ?\n                shapeOptions.xanchor :\n                Lib.midRange(\n                  isNotPath ?\n                    [shapeOptions.x0, shapeOptions.x1] :\n                    helpers.extractPathCoords(shapeOptions.path, constants.paramIsX))\n            );\n            var posY = y2p(\n              yPixelSized ?\n                shapeOptions.yanchor :\n                Lib.midRange(\n                  isNotPath ?\n                    [shapeOptions.y0, shapeOptions.y1] :\n                    helpers.extractPathCoords(shapeOptions.path, constants.paramIsY))\n            );\n\n            posX = helpers.roundPositionForSharpStrokeRendering(posX, strokeWidth);\n            posY = helpers.roundPositionForSharpStrokeRendering(posY, strokeWidth);\n\n            if(xPixelSized && yPixelSized) {\n                var crossPath = 'M' + (posX - 1 - strokeWidth) + ',' + (posY - 1 - strokeWidth) +\n                  'h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z';\n                visualCues.attr('d', crossPath);\n            } else if(xPixelSized) {\n                var vBarPath = 'M' + (posX - 1 - strokeWidth) + ',' + (posY - 9 - strokeWidth) +\n                  'v18 h2 v-18 Z';\n                visualCues.attr('d', vBarPath);\n            } else {\n                var hBarPath = 'M' + (posX - 9 - strokeWidth) + ',' + (posY - 1 - strokeWidth) +\n                  'h18 v2 h-18 Z';\n                visualCues.attr('d', hBarPath);\n            }\n        }\n    }\n\n    function removeVisualCues(shapeLayer) {\n        shapeLayer.selectAll('.visual-cue').remove();\n    }\n\n    function deactivateClipPathTemporarily(shapePath, shapeOptions, gd) {\n        var xref = shapeOptions.xref;\n        var yref = shapeOptions.yref;\n        var xa = Axes.getFromId(gd, xref);\n        var ya = Axes.getFromId(gd, yref);\n\n        var clipAxes = '';\n        if(xref !== 'paper' && !xa.autorange) clipAxes += xref;\n        if(yref !== 'paper' && !ya.autorange) clipAxes += yref;\n\n        Drawing.setClipUrl(\n            shapePath,\n            clipAxes ? 'clip' + gd._fullLayout._uid + clipAxes : null,\n            gd\n        );\n    }\n}\n\nfunction getPathString(gd, options) {\n    var type = options.type;\n    var xa = Axes.getFromId(gd, options.xref);\n    var ya = Axes.getFromId(gd, options.yref);\n    var gs = gd._fullLayout._size;\n    var x2r, x2p, y2r, y2p;\n    var x0, x1, y0, y1;\n\n    if(xa) {\n        x2r = helpers.shapePositionToRange(xa);\n        x2p = function(v) { return xa._offset + xa.r2p(x2r(v, true)); };\n    } else {\n        x2p = function(v) { return gs.l + gs.w * v; };\n    }\n\n    if(ya) {\n        y2r = helpers.shapePositionToRange(ya);\n        y2p = function(v) { return ya._offset + ya.r2p(y2r(v, true)); };\n    } else {\n        y2p = function(v) { return gs.t + gs.h * (1 - v); };\n    }\n\n    if(type === 'path') {\n        if(xa && xa.type === 'date') x2p = helpers.decodeDate(x2p);\n        if(ya && ya.type === 'date') y2p = helpers.decodeDate(y2p);\n        return convertPath(options, x2p, y2p);\n    }\n\n    if(options.xsizemode === 'pixel') {\n        var xAnchorPos = x2p(options.xanchor);\n        x0 = xAnchorPos + options.x0;\n        x1 = xAnchorPos + options.x1;\n    } else {\n        x0 = x2p(options.x0);\n        x1 = x2p(options.x1);\n    }\n\n    if(options.ysizemode === 'pixel') {\n        var yAnchorPos = y2p(options.yanchor);\n        y0 = yAnchorPos - options.y0;\n        y1 = yAnchorPos - options.y1;\n    } else {\n        y0 = y2p(options.y0);\n        y1 = y2p(options.y1);\n    }\n\n    if(type === 'line') return 'M' + x0 + ',' + y0 + 'L' + x1 + ',' + y1;\n    if(type === 'rect') return 'M' + x0 + ',' + y0 + 'H' + x1 + 'V' + y1 + 'H' + x0 + 'Z';\n\n    // circle\n    var cx = (x0 + x1) / 2;\n    var cy = (y0 + y1) / 2;\n    var rx = Math.abs(cx - x0);\n    var ry = Math.abs(cy - y0);\n    var rArc = 'A' + rx + ',' + ry;\n    var rightPt = (cx + rx) + ',' + cy;\n    var topPt = cx + ',' + (cy - ry);\n    return 'M' + rightPt + rArc + ' 0 1,1 ' + topPt +\n        rArc + ' 0 0,1 ' + rightPt + 'Z';\n}\n\n\nfunction convertPath(options, x2p, y2p) {\n    var pathIn = options.path;\n    var xSizemode = options.xsizemode;\n    var ySizemode = options.ysizemode;\n    var xAnchor = options.xanchor;\n    var yAnchor = options.yanchor;\n\n    return pathIn.replace(constants.segmentRE, function(segment) {\n        var paramNumber = 0;\n        var segmentType = segment.charAt(0);\n        var xParams = constants.paramIsX[segmentType];\n        var yParams = constants.paramIsY[segmentType];\n        var nParams = constants.numParams[segmentType];\n\n        var paramString = segment.substr(1).replace(constants.paramRE, function(param) {\n            if(xParams[paramNumber]) {\n                if(xSizemode === 'pixel') param = x2p(xAnchor) + Number(param);\n                else param = x2p(param);\n            } else if(yParams[paramNumber]) {\n                if(ySizemode === 'pixel') param = y2p(yAnchor) - Number(param);\n                else param = y2p(param);\n            }\n            paramNumber++;\n\n            if(paramNumber > nParams) param = 'X';\n            return param;\n        });\n\n        if(paramNumber > nParams) {\n            paramString = paramString.replace(/[\\s,]*X.*/, '');\n            Lib.log('Ignoring extra params in segment ' + segment);\n        }\n\n        return segmentType + paramString;\n    });\n}\n\nfunction movePath(pathIn, moveX, moveY) {\n    return pathIn.replace(constants.segmentRE, function(segment) {\n        var paramNumber = 0;\n        var segmentType = segment.charAt(0);\n        var xParams = constants.paramIsX[segmentType];\n        var yParams = constants.paramIsY[segmentType];\n        var nParams = constants.numParams[segmentType];\n\n        var paramString = segment.substr(1).replace(constants.paramRE, function(param) {\n            if(paramNumber >= nParams) return param;\n\n            if(xParams[paramNumber]) param = moveX(param);\n            else if(yParams[paramNumber]) param = moveY(param);\n\n            paramNumber++;\n\n            return param;\n        });\n\n        return segmentType + paramString;\n    });\n}\n\n},{\"../../lib\":703,\"../../lib/setcursor\":723,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../color\":580,\"../dragelement\":598,\"../drawing\":601,\"./constants\":658,\"./helpers\":661}],661:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar constants = _dereq_('./constants');\n\nvar Lib = _dereq_('../../lib');\n\n// special position conversion functions... category axis positions can't be\n// specified by their data values, because they don't make a continuous mapping.\n// so these have to be specified in terms of the category serial numbers,\n// but can take fractional values. Other axis types we specify position based on\n// the actual data values.\n// TODO: in V2.0 (when log axis ranges are in data units) range and shape position\n// will be identical, so rangeToShapePosition and shapePositionToRange can be\n// removed entirely.\n\nexports.rangeToShapePosition = function(ax) {\n    return (ax.type === 'log') ? ax.r2d : function(v) { return v; };\n};\n\nexports.shapePositionToRange = function(ax) {\n    return (ax.type === 'log') ? ax.d2r : function(v) { return v; };\n};\n\nexports.decodeDate = function(convertToPx) {\n    return function(v) {\n        if(v.replace) v = v.replace('_', ' ');\n        return convertToPx(v);\n    };\n};\n\nexports.encodeDate = function(convertToDate) {\n    return function(v) { return convertToDate(v).replace(' ', '_'); };\n};\n\nexports.extractPathCoords = function(path, paramsToUse) {\n    var extractedCoordinates = [];\n\n    var segments = path.match(constants.segmentRE);\n    segments.forEach(function(segment) {\n        var relevantParamIdx = paramsToUse[segment.charAt(0)].drawn;\n        if(relevantParamIdx === undefined) return;\n\n        var params = segment.substr(1).match(constants.paramRE);\n        if(!params || params.length < relevantParamIdx) return;\n\n        extractedCoordinates.push(Lib.cleanNumber(params[relevantParamIdx]));\n    });\n\n    return extractedCoordinates;\n};\n\nexports.getDataToPixel = function(gd, axis, isVertical) {\n    var gs = gd._fullLayout._size;\n    var dataToPixel;\n\n    if(axis) {\n        var d2r = exports.shapePositionToRange(axis);\n\n        dataToPixel = function(v) {\n            return axis._offset + axis.r2p(d2r(v, true));\n        };\n\n        if(axis.type === 'date') dataToPixel = exports.decodeDate(dataToPixel);\n    } else if(isVertical) {\n        dataToPixel = function(v) { return gs.t + gs.h * (1 - v); };\n    } else {\n        dataToPixel = function(v) { return gs.l + gs.w * v; };\n    }\n\n    return dataToPixel;\n};\n\nexports.getPixelToData = function(gd, axis, isVertical) {\n    var gs = gd._fullLayout._size;\n    var pixelToData;\n\n    if(axis) {\n        var r2d = exports.rangeToShapePosition(axis);\n        pixelToData = function(p) { return r2d(axis.p2r(p - axis._offset)); };\n    } else if(isVertical) {\n        pixelToData = function(p) { return 1 - (p - gs.t) / gs.h; };\n    } else {\n        pixelToData = function(p) { return (p - gs.l) / gs.w; };\n    }\n\n    return pixelToData;\n};\n\n/**\n * Based on the given stroke width, rounds the passed\n * position value to represent either a full or half pixel.\n *\n * In case of an odd stroke width (e.g. 1), this measure ensures\n * that a stroke positioned at the returned position isn't rendered\n * blurry due to anti-aliasing.\n *\n * In case of an even stroke width (e.g. 2), this measure ensures\n * that the position value is transformed to a full pixel value\n * so that anti-aliasing doesn't take effect either.\n *\n * @param {number} pos The raw position value to be transformed\n * @param {number} strokeWidth The stroke width\n * @returns {number} either an integer or a .5 decimal number\n */\nexports.roundPositionForSharpStrokeRendering = function(pos, strokeWidth) {\n    var strokeWidthIsOdd = Math.round(strokeWidth % 2) === 1;\n    var posValAsInt = Math.round(pos);\n\n    return strokeWidthIsOdd ? posValAsInt + 0.5 : posValAsInt;\n};\n\n},{\"../../lib\":703,\"./constants\":658}],662:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar drawModule = _dereq_('./draw');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: 'shapes',\n\n    layoutAttributes: _dereq_('./attributes'),\n    supplyLayoutDefaults: _dereq_('./defaults'),\n    includeBasePlot: _dereq_('../../plots/cartesian/include_components')('shapes'),\n\n    calcAutorange: _dereq_('./calc_autorange'),\n    draw: drawModule.draw,\n    drawOne: drawModule.drawOne\n};\n\n},{\"../../plots/cartesian/include_components\":761,\"./attributes\":656,\"./calc_autorange\":657,\"./defaults\":659,\"./draw\":660}],663:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar padAttrs = _dereq_('../../plots/pad_attributes');\nvar extendDeepAll = _dereq_('../../lib/extend').extendDeepAll;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar animationAttrs = _dereq_('../../plots/animation_attributes');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\nvar constants = _dereq_('./constants');\n\nvar stepsAttrs = templatedArray('step', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n    method: {\n        valType: 'enumerated',\n        values: ['restyle', 'relayout', 'animate', 'update', 'skip'],\n        dflt: 'restyle',\n        \n        \n    },\n    args: {\n        valType: 'info_array',\n        \n        freeLength: true,\n        items: [\n            { valType: 'any' },\n            { valType: 'any' },\n            { valType: 'any' }\n        ],\n        \n    },\n    label: {\n        valType: 'string',\n        \n        \n    },\n    value: {\n        valType: 'string',\n        \n        \n    },\n    execute: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    }\n});\n\nmodule.exports = overrideAll(templatedArray('slider', {\n    visible: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n\n    active: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 0,\n        \n    },\n\n    steps: stepsAttrs,\n\n    lenmode: {\n        valType: 'enumerated',\n        values: ['fraction', 'pixels'],\n        \n        dflt: 'fraction',\n        \n    },\n    len: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        \n    },\n    x: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: 0,\n        \n        \n    },\n    pad: extendDeepAll(padAttrs({editType: 'arraydraw'}), {\n        \n    }, {t: {dflt: 20}}),\n    xanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'left', 'center', 'right'],\n        dflt: 'left',\n        \n        \n    },\n    y: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: 0,\n        \n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'top', 'middle', 'bottom'],\n        dflt: 'top',\n        \n        \n    },\n\n    transition: {\n        duration: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 150,\n            \n        },\n        easing: {\n            valType: 'enumerated',\n            values: animationAttrs.transition.easing.values,\n            \n            dflt: 'cubic-in-out',\n            \n        }\n    },\n\n    currentvalue: {\n        visible: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n\n        xanchor: {\n            valType: 'enumerated',\n            values: ['left', 'center', 'right'],\n            dflt: 'left',\n            \n            \n        },\n\n        offset: {\n            valType: 'number',\n            dflt: 10,\n            \n            \n        },\n\n        prefix: {\n            valType: 'string',\n            \n            \n        },\n\n        suffix: {\n            valType: 'string',\n            \n            \n        },\n\n        font: fontAttrs({\n            \n        })\n    },\n\n    font: fontAttrs({\n        \n    }),\n\n    activebgcolor: {\n        valType: 'color',\n        \n        dflt: constants.gripBgActiveColor,\n        \n    },\n    bgcolor: {\n        valType: 'color',\n        \n        dflt: constants.railBgColor,\n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: constants.railBorderColor,\n        \n        \n    },\n    borderwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: constants.railBorderWidth,\n        \n        \n    },\n    ticklen: {\n        valType: 'number',\n        min: 0,\n        dflt: constants.tickLength,\n        \n        \n    },\n    tickcolor: {\n        valType: 'color',\n        dflt: constants.tickColor,\n        \n        \n    },\n    tickwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        \n    },\n    minorticklen: {\n        valType: 'number',\n        min: 0,\n        dflt: constants.minorTickLength,\n        \n        \n    }\n}), 'arraydraw', 'from-root');\n\n},{\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plot_api/plot_template\":741,\"../../plots/animation_attributes\":746,\"../../plots/font_attributes\":777,\"../../plots/pad_attributes\":811,\"./constants\":664}],664:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = {\n\n    // layout attribute name\n    name: 'sliders',\n\n    // class names\n    containerClassName: 'slider-container',\n    groupClassName: 'slider-group',\n    inputAreaClass: 'slider-input-area',\n    railRectClass: 'slider-rail-rect',\n    railTouchRectClass: 'slider-rail-touch-rect',\n    gripRectClass: 'slider-grip-rect',\n    tickRectClass: 'slider-tick-rect',\n    inputProxyClass: 'slider-input-proxy',\n    labelsClass: 'slider-labels',\n    labelGroupClass: 'slider-label-group',\n    labelClass: 'slider-label',\n    currentValueClass: 'slider-current-value',\n\n    railHeight: 5,\n\n    // DOM attribute name in button group keeping track\n    // of active update menu\n    menuIndexAttrName: 'slider-active-index',\n\n    // id root pass to Plots.autoMargin\n    autoMarginIdRoot: 'slider-',\n\n    // min item width / height\n    minWidth: 30,\n    minHeight: 30,\n\n    // padding around item text\n    textPadX: 40,\n\n    // arrow offset off right edge\n    arrowOffsetX: 4,\n\n    railRadius: 2,\n    railWidth: 5,\n    railBorder: 4,\n    railBorderWidth: 1,\n    railBorderColor: '#bec8d9',\n    railBgColor: '#f8fafc',\n\n    // The distance of the rail from the edge of the touchable area\n    // Slightly less than the step inset because of the curved edges\n    // of the rail\n    railInset: 8,\n\n    // The distance from the extremal tick marks to the edge of the\n    // touchable area. This is basically the same as the grip radius,\n    // but for other styles it wouldn't really need to be.\n    stepInset: 10,\n\n    gripRadius: 10,\n    gripWidth: 20,\n    gripHeight: 20,\n    gripBorder: 20,\n    gripBorderWidth: 1,\n    gripBorderColor: '#bec8d9',\n    gripBgColor: '#f6f8fa',\n    gripBgActiveColor: '#dbdde0',\n\n    labelPadding: 8,\n    labelOffset: 0,\n\n    tickWidth: 1,\n    tickColor: '#333',\n    tickOffset: 25,\n    tickLength: 7,\n\n    minorTickOffset: 25,\n    minorTickColor: '#333',\n    minorTickLength: 4,\n\n    // Extra space below the current value label:\n    currentValuePadding: 8,\n    currentValueInset: 0,\n};\n\n},{}],665:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar constants = _dereq_('./constants');\n\nvar name = constants.name;\nvar stepAttrs = attributes.steps;\n\n\nmodule.exports = function slidersDefaults(layoutIn, layoutOut) {\n    handleArrayContainerDefaults(layoutIn, layoutOut, {\n        name: name,\n        handleItemDefaults: sliderDefaults\n    });\n};\n\nfunction sliderDefaults(sliderIn, sliderOut, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(sliderIn, sliderOut, attributes, attr, dflt);\n    }\n\n    var steps = handleArrayContainerDefaults(sliderIn, sliderOut, {\n        name: 'steps',\n        handleItemDefaults: stepDefaults\n    });\n\n    var stepCount = 0;\n    for(var i = 0; i < steps.length; i++) {\n        if(steps[i].visible) stepCount++;\n    }\n\n    var visible;\n    // If it has fewer than two options, it's not really a slider\n    if(stepCount < 2) visible = sliderOut.visible = false;\n    else visible = coerce('visible');\n    if(!visible) return;\n\n    sliderOut._stepCount = stepCount;\n    var visSteps = sliderOut._visibleSteps = Lib.filterVisible(steps);\n\n    var active = coerce('active');\n    if(!(steps[active] || {}).visible) sliderOut.active = visSteps[0]._index;\n\n    coerce('x');\n    coerce('y');\n    Lib.noneOrAll(sliderIn, sliderOut, ['x', 'y']);\n\n    coerce('xanchor');\n    coerce('yanchor');\n\n    coerce('len');\n    coerce('lenmode');\n\n    coerce('pad.t');\n    coerce('pad.r');\n    coerce('pad.b');\n    coerce('pad.l');\n\n    Lib.coerceFont(coerce, 'font', layoutOut.font);\n\n    var currentValueIsVisible = coerce('currentvalue.visible');\n\n    if(currentValueIsVisible) {\n        coerce('currentvalue.xanchor');\n        coerce('currentvalue.prefix');\n        coerce('currentvalue.suffix');\n        coerce('currentvalue.offset');\n\n        Lib.coerceFont(coerce, 'currentvalue.font', sliderOut.font);\n    }\n\n    coerce('transition.duration');\n    coerce('transition.easing');\n\n    coerce('bgcolor');\n    coerce('activebgcolor');\n    coerce('bordercolor');\n    coerce('borderwidth');\n    coerce('ticklen');\n    coerce('tickwidth');\n    coerce('tickcolor');\n    coerce('minorticklen');\n}\n\nfunction stepDefaults(valueIn, valueOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(valueIn, valueOut, stepAttrs, attr, dflt);\n    }\n\n    var visible;\n    if(valueIn.method !== 'skip' && !Array.isArray(valueIn.args)) {\n        visible = valueOut.visible = false;\n    } else visible = coerce('visible');\n\n    if(visible) {\n        coerce('method');\n        coerce('args');\n        var label = coerce('label', 'step-' + valueOut._index);\n        coerce('value', label);\n        coerce('execute');\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"./attributes\":663,\"./constants\":664}],666:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Plots = _dereq_('../../plots/plots');\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;\n\nvar constants = _dereq_('./constants');\nvar alignmentConstants = _dereq_('../../constants/alignment');\nvar LINE_SPACING = alignmentConstants.LINE_SPACING;\nvar FROM_TL = alignmentConstants.FROM_TL;\nvar FROM_BR = alignmentConstants.FROM_BR;\n\nmodule.exports = function draw(gd) {\n    var fullLayout = gd._fullLayout;\n    var sliderData = makeSliderData(fullLayout, gd);\n\n    // draw a container for *all* sliders:\n    var sliders = fullLayout._infolayer\n        .selectAll('g.' + constants.containerClassName)\n        .data(sliderData.length > 0 ? [0] : []);\n\n    sliders.enter().append('g')\n        .classed(constants.containerClassName, true)\n        .style('cursor', 'ew-resize');\n\n    function clearSlider(sliderOpts) {\n        if(sliderOpts._commandObserver) {\n            sliderOpts._commandObserver.remove();\n            delete sliderOpts._commandObserver;\n        }\n\n        // Most components don't need to explicitly remove autoMargin, because\n        // marginPushers does this - but slider updates don't go through\n        // a full replot so we need to explicitly remove it.\n        Plots.autoMargin(gd, autoMarginId(sliderOpts));\n    }\n\n    sliders.exit().each(function() {\n        d3.select(this).selectAll('g.' + constants.groupClassName)\n            .each(clearSlider);\n    })\n    .remove();\n\n    // Return early if no menus visible:\n    if(sliderData.length === 0) return;\n\n    var sliderGroups = sliders.selectAll('g.' + constants.groupClassName)\n        .data(sliderData, keyFunction);\n\n    sliderGroups.enter().append('g')\n        .classed(constants.groupClassName, true);\n\n    sliderGroups.exit()\n        .each(clearSlider)\n        .remove();\n\n    // Find the dimensions of the sliders:\n    for(var i = 0; i < sliderData.length; i++) {\n        var sliderOpts = sliderData[i];\n        findDimensions(gd, sliderOpts);\n    }\n\n    sliderGroups.each(function(sliderOpts) {\n        var gSlider = d3.select(this);\n\n        computeLabelSteps(sliderOpts);\n\n        Plots.manageCommandObserver(gd, sliderOpts, sliderOpts._visibleSteps, function(data) {\n            // NB: Same as below. This is *not* always the same as sliderOpts since\n            // if a new set of steps comes in, the reference in this callback would\n            // be invalid. We need to refetch it from the slider group, which is\n            // the join data that creates this slider. So if this slider still exists,\n            // the group should be valid, *to the best of my knowledge.* If not,\n            // we'd have to look it up by d3 data join index/key.\n            var opts = gSlider.data()[0];\n\n            if(opts.active === data.index) return;\n            if(opts._dragging) return;\n\n            setActive(gd, gSlider, opts, data.index, false, true);\n        });\n\n        drawSlider(gd, d3.select(this), sliderOpts);\n    });\n};\n\nfunction autoMarginId(sliderOpts) {\n    return constants.autoMarginIdRoot + sliderOpts._index;\n}\n\n// This really only just filters by visibility:\nfunction makeSliderData(fullLayout, gd) {\n    var contOpts = fullLayout[constants.name];\n    var sliderData = [];\n\n    for(var i = 0; i < contOpts.length; i++) {\n        var item = contOpts[i];\n        if(!item.visible) continue;\n        item._gd = gd;\n        sliderData.push(item);\n    }\n\n    return sliderData;\n}\n\n// This is set in the defaults step:\nfunction keyFunction(opts) {\n    return opts._index;\n}\n\n// Compute the dimensions (mutates sliderOpts):\nfunction findDimensions(gd, sliderOpts) {\n    var sliderLabels = Drawing.tester.selectAll('g.' + constants.labelGroupClass)\n        .data(sliderOpts._visibleSteps);\n\n    sliderLabels.enter().append('g')\n        .classed(constants.labelGroupClass, true);\n\n    // loop over fake buttons to find width / height\n    var maxLabelWidth = 0;\n    var labelHeight = 0;\n    sliderLabels.each(function(stepOpts) {\n        var labelGroup = d3.select(this);\n\n        var text = drawLabel(labelGroup, {step: stepOpts}, sliderOpts);\n\n        var textNode = text.node();\n        if(textNode) {\n            var bBox = Drawing.bBox(textNode);\n            labelHeight = Math.max(labelHeight, bBox.height);\n            maxLabelWidth = Math.max(maxLabelWidth, bBox.width);\n        }\n    });\n\n    sliderLabels.remove();\n\n    var dims = sliderOpts._dims = {};\n\n    dims.inputAreaWidth = Math.max(\n        constants.railWidth,\n        constants.gripHeight\n    );\n\n    // calculate some overall dimensions - some of these are needed for\n    // calculating the currentValue dimensions\n    var graphSize = gd._fullLayout._size;\n    dims.lx = graphSize.l + graphSize.w * sliderOpts.x;\n    dims.ly = graphSize.t + graphSize.h * (1 - sliderOpts.y);\n\n    if(sliderOpts.lenmode === 'fraction') {\n        // fraction:\n        dims.outerLength = Math.round(graphSize.w * sliderOpts.len);\n    } else {\n        // pixels:\n        dims.outerLength = sliderOpts.len;\n    }\n\n    // The length of the rail, *excluding* padding on either end:\n    dims.inputAreaStart = 0;\n    dims.inputAreaLength = Math.round(dims.outerLength - sliderOpts.pad.l - sliderOpts.pad.r);\n\n    var textableInputLength = dims.inputAreaLength - 2 * constants.stepInset;\n    var availableSpacePerLabel = textableInputLength / (sliderOpts._stepCount - 1);\n    var computedSpacePerLabel = maxLabelWidth + constants.labelPadding;\n    dims.labelStride = Math.max(1, Math.ceil(computedSpacePerLabel / availableSpacePerLabel));\n    dims.labelHeight = labelHeight;\n\n    // loop over all possible values for currentValue to find the\n    // area we need for it\n    dims.currentValueMaxWidth = 0;\n    dims.currentValueHeight = 0;\n    dims.currentValueTotalHeight = 0;\n    dims.currentValueMaxLines = 1;\n\n    if(sliderOpts.currentvalue.visible) {\n        // Get the dimensions of the current value label:\n        var dummyGroup = Drawing.tester.append('g');\n\n        sliderLabels.each(function(stepOpts) {\n            var curValPrefix = drawCurrentValue(dummyGroup, sliderOpts, stepOpts.label);\n            var curValSize = (curValPrefix.node() && Drawing.bBox(curValPrefix.node())) || {width: 0, height: 0};\n            var lines = svgTextUtils.lineCount(curValPrefix);\n            dims.currentValueMaxWidth = Math.max(dims.currentValueMaxWidth, Math.ceil(curValSize.width));\n            dims.currentValueHeight = Math.max(dims.currentValueHeight, Math.ceil(curValSize.height));\n            dims.currentValueMaxLines = Math.max(dims.currentValueMaxLines, lines);\n        });\n\n        dims.currentValueTotalHeight = dims.currentValueHeight + sliderOpts.currentvalue.offset;\n\n        dummyGroup.remove();\n    }\n\n    dims.height = dims.currentValueTotalHeight + constants.tickOffset + sliderOpts.ticklen + constants.labelOffset + dims.labelHeight + sliderOpts.pad.t + sliderOpts.pad.b;\n\n    var xanchor = 'left';\n    if(Lib.isRightAnchor(sliderOpts)) {\n        dims.lx -= dims.outerLength;\n        xanchor = 'right';\n    }\n    if(Lib.isCenterAnchor(sliderOpts)) {\n        dims.lx -= dims.outerLength / 2;\n        xanchor = 'center';\n    }\n\n    var yanchor = 'top';\n    if(Lib.isBottomAnchor(sliderOpts)) {\n        dims.ly -= dims.height;\n        yanchor = 'bottom';\n    }\n    if(Lib.isMiddleAnchor(sliderOpts)) {\n        dims.ly -= dims.height / 2;\n        yanchor = 'middle';\n    }\n\n    dims.outerLength = Math.ceil(dims.outerLength);\n    dims.height = Math.ceil(dims.height);\n    dims.lx = Math.round(dims.lx);\n    dims.ly = Math.round(dims.ly);\n\n    var marginOpts = {\n        y: sliderOpts.y,\n        b: dims.height * FROM_BR[yanchor],\n        t: dims.height * FROM_TL[yanchor]\n    };\n\n    if(sliderOpts.lenmode === 'fraction') {\n        marginOpts.l = 0;\n        marginOpts.xl = sliderOpts.x - sliderOpts.len * FROM_TL[xanchor];\n        marginOpts.r = 0;\n        marginOpts.xr = sliderOpts.x + sliderOpts.len * FROM_BR[xanchor];\n    } else {\n        marginOpts.x = sliderOpts.x;\n        marginOpts.l = dims.outerLength * FROM_TL[xanchor];\n        marginOpts.r = dims.outerLength * FROM_BR[xanchor];\n    }\n\n    Plots.autoMargin(gd, autoMarginId(sliderOpts), marginOpts);\n}\n\nfunction drawSlider(gd, sliderGroup, sliderOpts) {\n    // This is related to the other long notes in this file regarding what happens\n    // when slider steps disappear. This particular fix handles what happens when\n    // the *current* slider step is removed. The drawing functions will error out\n    // when they fail to find it, so the fix for now is that it will just draw the\n    // slider in the first position but will not execute the command.\n    if(!((sliderOpts.steps[sliderOpts.active] || {}).visible)) {\n        sliderOpts.active = sliderOpts._visibleSteps[0]._index;\n    }\n\n    // These are carefully ordered for proper z-ordering:\n    sliderGroup\n        .call(drawCurrentValue, sliderOpts)\n        .call(drawRail, sliderOpts)\n        .call(drawLabelGroup, sliderOpts)\n        .call(drawTicks, sliderOpts)\n        .call(drawTouchRect, gd, sliderOpts)\n        .call(drawGrip, gd, sliderOpts);\n\n    var dims = sliderOpts._dims;\n\n    // Position the rectangle:\n    Drawing.setTranslate(sliderGroup, dims.lx + sliderOpts.pad.l, dims.ly + sliderOpts.pad.t);\n\n    sliderGroup.call(setGripPosition, sliderOpts, false);\n    sliderGroup.call(drawCurrentValue, sliderOpts);\n}\n\nfunction drawCurrentValue(sliderGroup, sliderOpts, valueOverride) {\n    if(!sliderOpts.currentvalue.visible) return;\n\n    var dims = sliderOpts._dims;\n    var x0, textAnchor;\n\n    switch(sliderOpts.currentvalue.xanchor) {\n        case 'right':\n            // This is anchored left and adjusted by the width of the longest label\n            // so that the prefix doesn't move. The goal of this is to emphasize\n            // what's actually changing and make the update less distracting.\n            x0 = dims.inputAreaLength - constants.currentValueInset - dims.currentValueMaxWidth;\n            textAnchor = 'left';\n            break;\n        case 'center':\n            x0 = dims.inputAreaLength * 0.5;\n            textAnchor = 'middle';\n            break;\n        default:\n            x0 = constants.currentValueInset;\n            textAnchor = 'left';\n    }\n\n    var text = Lib.ensureSingle(sliderGroup, 'text', constants.labelClass, function(s) {\n        s.classed('user-select-none', true)\n            .attr({\n                'text-anchor': textAnchor,\n                'data-notex': 1\n            });\n    });\n\n    var str = sliderOpts.currentvalue.prefix ? sliderOpts.currentvalue.prefix : '';\n\n    if(typeof valueOverride === 'string') {\n        str += valueOverride;\n    } else {\n        var curVal = sliderOpts.steps[sliderOpts.active].label;\n        var _meta = sliderOpts._gd._fullLayout._meta;\n        if(_meta) curVal = Lib.templateString(curVal, _meta);\n        str += curVal;\n    }\n\n    if(sliderOpts.currentvalue.suffix) {\n        str += sliderOpts.currentvalue.suffix;\n    }\n\n    text.call(Drawing.font, sliderOpts.currentvalue.font)\n        .text(str)\n        .call(svgTextUtils.convertToTspans, sliderOpts._gd);\n\n    var lines = svgTextUtils.lineCount(text);\n\n    var y0 = (dims.currentValueMaxLines + 1 - lines) *\n        sliderOpts.currentvalue.font.size * LINE_SPACING;\n\n    svgTextUtils.positionText(text, x0, y0);\n\n    return text;\n}\n\nfunction drawGrip(sliderGroup, gd, sliderOpts) {\n    var grip = Lib.ensureSingle(sliderGroup, 'rect', constants.gripRectClass, function(s) {\n        s.call(attachGripEvents, gd, sliderGroup, sliderOpts)\n            .style('pointer-events', 'all');\n    });\n\n    grip.attr({\n        width: constants.gripWidth,\n        height: constants.gripHeight,\n        rx: constants.gripRadius,\n        ry: constants.gripRadius,\n    })\n    .call(Color.stroke, sliderOpts.bordercolor)\n    .call(Color.fill, sliderOpts.bgcolor)\n    .style('stroke-width', sliderOpts.borderwidth + 'px');\n}\n\nfunction drawLabel(item, data, sliderOpts) {\n    var text = Lib.ensureSingle(item, 'text', constants.labelClass, function(s) {\n        s.classed('user-select-none', true)\n            .attr({\n                'text-anchor': 'middle',\n                'data-notex': 1\n            });\n    });\n\n    var tx = data.step.label;\n    var _meta = sliderOpts._gd._fullLayout._meta;\n    if(_meta) tx = Lib.templateString(tx, _meta);\n\n    text.call(Drawing.font, sliderOpts.font)\n        .text(tx)\n        .call(svgTextUtils.convertToTspans, sliderOpts._gd);\n\n    return text;\n}\n\nfunction drawLabelGroup(sliderGroup, sliderOpts) {\n    var labels = Lib.ensureSingle(sliderGroup, 'g', constants.labelsClass);\n    var dims = sliderOpts._dims;\n\n    var labelItems = labels.selectAll('g.' + constants.labelGroupClass)\n        .data(dims.labelSteps);\n\n    labelItems.enter().append('g')\n        .classed(constants.labelGroupClass, true);\n\n    labelItems.exit().remove();\n\n    labelItems.each(function(d) {\n        var item = d3.select(this);\n\n        item.call(drawLabel, d, sliderOpts);\n\n        Drawing.setTranslate(item,\n            normalizedValueToPosition(sliderOpts, d.fraction),\n            constants.tickOffset +\n                sliderOpts.ticklen +\n                // position is the baseline of the top line of text only, even\n                // if the label spans multiple lines\n                sliderOpts.font.size * LINE_SPACING +\n                constants.labelOffset +\n                dims.currentValueTotalHeight\n        );\n    });\n}\n\nfunction handleInput(gd, sliderGroup, sliderOpts, normalizedPosition, doTransition) {\n    var quantizedPosition = Math.round(normalizedPosition * (sliderOpts._stepCount - 1));\n    var quantizedIndex = sliderOpts._visibleSteps[quantizedPosition]._index;\n\n    if(quantizedIndex !== sliderOpts.active) {\n        setActive(gd, sliderGroup, sliderOpts, quantizedIndex, true, doTransition);\n    }\n}\n\nfunction setActive(gd, sliderGroup, sliderOpts, index, doCallback, doTransition) {\n    var previousActive = sliderOpts.active;\n    sliderOpts.active = index;\n\n    // due to templating, it's possible this slider doesn't even exist yet\n    arrayEditor(gd.layout, constants.name, sliderOpts)\n        .applyUpdate('active', index);\n\n    var step = sliderOpts.steps[sliderOpts.active];\n\n    sliderGroup.call(setGripPosition, sliderOpts, doTransition);\n    sliderGroup.call(drawCurrentValue, sliderOpts);\n\n    gd.emit('plotly_sliderchange', {\n        slider: sliderOpts,\n        step: sliderOpts.steps[sliderOpts.active],\n        interaction: doCallback,\n        previousActive: previousActive\n    });\n\n    if(step && step.method && doCallback) {\n        if(sliderGroup._nextMethod) {\n            // If we've already queued up an update, just overwrite it with the most recent:\n            sliderGroup._nextMethod.step = step;\n            sliderGroup._nextMethod.doCallback = doCallback;\n            sliderGroup._nextMethod.doTransition = doTransition;\n        } else {\n            sliderGroup._nextMethod = {step: step, doCallback: doCallback, doTransition: doTransition};\n            sliderGroup._nextMethodRaf = window.requestAnimationFrame(function() {\n                var _step = sliderGroup._nextMethod.step;\n                if(!_step.method) return;\n\n                if(_step.execute) {\n                    Plots.executeAPICommand(gd, _step.method, _step.args);\n                }\n\n                sliderGroup._nextMethod = null;\n                sliderGroup._nextMethodRaf = null;\n            });\n        }\n    }\n}\n\nfunction attachGripEvents(item, gd, sliderGroup) {\n    var node = sliderGroup.node();\n    var $gd = d3.select(gd);\n\n    // NB: This is *not* the same as sliderOpts itself! These callbacks\n    // are in a closure so this array won't actually be correct if the\n    // steps have changed since this was initialized. The sliderGroup,\n    // however, has not changed since that *is* the slider, so it must\n    // be present to receive mouse events.\n    function getSliderOpts() {\n        return sliderGroup.data()[0];\n    }\n\n    item.on('mousedown', function() {\n        var sliderOpts = getSliderOpts();\n        gd.emit('plotly_sliderstart', {slider: sliderOpts});\n\n        var grip = sliderGroup.select('.' + constants.gripRectClass);\n\n        d3.event.stopPropagation();\n        d3.event.preventDefault();\n        grip.call(Color.fill, sliderOpts.activebgcolor);\n\n        var normalizedPosition = positionToNormalizedValue(sliderOpts, d3.mouse(node)[0]);\n        handleInput(gd, sliderGroup, sliderOpts, normalizedPosition, true);\n        sliderOpts._dragging = true;\n\n        $gd.on('mousemove', function() {\n            var sliderOpts = getSliderOpts();\n            var normalizedPosition = positionToNormalizedValue(sliderOpts, d3.mouse(node)[0]);\n            handleInput(gd, sliderGroup, sliderOpts, normalizedPosition, false);\n        });\n\n        $gd.on('mouseup', function() {\n            var sliderOpts = getSliderOpts();\n            sliderOpts._dragging = false;\n            grip.call(Color.fill, sliderOpts.bgcolor);\n            $gd.on('mouseup', null);\n            $gd.on('mousemove', null);\n\n            gd.emit('plotly_sliderend', {\n                slider: sliderOpts,\n                step: sliderOpts.steps[sliderOpts.active]\n            });\n        });\n    });\n}\n\nfunction drawTicks(sliderGroup, sliderOpts) {\n    var tick = sliderGroup.selectAll('rect.' + constants.tickRectClass)\n        .data(sliderOpts._visibleSteps);\n    var dims = sliderOpts._dims;\n\n    tick.enter().append('rect')\n        .classed(constants.tickRectClass, true);\n\n    tick.exit().remove();\n\n    tick.attr({\n        width: sliderOpts.tickwidth + 'px',\n        'shape-rendering': 'crispEdges'\n    });\n\n    tick.each(function(d, i) {\n        var isMajor = i % dims.labelStride === 0;\n        var item = d3.select(this);\n\n        item\n            .attr({height: isMajor ? sliderOpts.ticklen : sliderOpts.minorticklen})\n            .call(Color.fill, isMajor ? sliderOpts.tickcolor : sliderOpts.tickcolor);\n\n        Drawing.setTranslate(item,\n            normalizedValueToPosition(sliderOpts, i / (sliderOpts._stepCount - 1)) - 0.5 * sliderOpts.tickwidth,\n            (isMajor ? constants.tickOffset : constants.minorTickOffset) + dims.currentValueTotalHeight\n        );\n    });\n}\n\nfunction computeLabelSteps(sliderOpts) {\n    var dims = sliderOpts._dims;\n    dims.labelSteps = [];\n    var nsteps = sliderOpts._stepCount;\n\n    for(var i = 0; i < nsteps; i += dims.labelStride) {\n        dims.labelSteps.push({\n            fraction: i / (nsteps - 1),\n            step: sliderOpts._visibleSteps[i]\n        });\n    }\n}\n\nfunction setGripPosition(sliderGroup, sliderOpts, doTransition) {\n    var grip = sliderGroup.select('rect.' + constants.gripRectClass);\n\n    var quantizedIndex = 0;\n    for(var i = 0; i < sliderOpts._stepCount; i++) {\n        if(sliderOpts._visibleSteps[i]._index === sliderOpts.active) {\n            quantizedIndex = i;\n            break;\n        }\n    }\n\n    var x = normalizedValueToPosition(sliderOpts, quantizedIndex / (sliderOpts._stepCount - 1));\n\n    // If this is true, then *this component* is already invoking its own command\n    // and has triggered its own animation.\n    if(sliderOpts._invokingCommand) return;\n\n    var el = grip;\n    if(doTransition && sliderOpts.transition.duration > 0) {\n        el = el.transition()\n            .duration(sliderOpts.transition.duration)\n            .ease(sliderOpts.transition.easing);\n    }\n\n    // Drawing.setTranslate doesn't work here becasue of the transition duck-typing.\n    // It's also not necessary because there are no other transitions to preserve.\n    el.attr('transform', 'translate(' + (x - constants.gripWidth * 0.5) + ',' + (sliderOpts._dims.currentValueTotalHeight) + ')');\n}\n\n// Convert a number from [0-1] to a pixel position relative to the slider group container:\nfunction normalizedValueToPosition(sliderOpts, normalizedPosition) {\n    var dims = sliderOpts._dims;\n    return dims.inputAreaStart + constants.stepInset +\n        (dims.inputAreaLength - 2 * constants.stepInset) * Math.min(1, Math.max(0, normalizedPosition));\n}\n\n// Convert a position relative to the slider group to a nubmer in [0, 1]\nfunction positionToNormalizedValue(sliderOpts, position) {\n    var dims = sliderOpts._dims;\n    return Math.min(1, Math.max(0, (position - constants.stepInset - dims.inputAreaStart) / (dims.inputAreaLength - 2 * constants.stepInset - 2 * dims.inputAreaStart)));\n}\n\nfunction drawTouchRect(sliderGroup, gd, sliderOpts) {\n    var dims = sliderOpts._dims;\n    var rect = Lib.ensureSingle(sliderGroup, 'rect', constants.railTouchRectClass, function(s) {\n        s.call(attachGripEvents, gd, sliderGroup, sliderOpts)\n            .style('pointer-events', 'all');\n    });\n\n    rect.attr({\n        width: dims.inputAreaLength,\n        height: Math.max(dims.inputAreaWidth, constants.tickOffset + sliderOpts.ticklen + dims.labelHeight)\n    })\n        .call(Color.fill, sliderOpts.bgcolor)\n        .attr('opacity', 0);\n\n    Drawing.setTranslate(rect, 0, dims.currentValueTotalHeight);\n}\n\nfunction drawRail(sliderGroup, sliderOpts) {\n    var dims = sliderOpts._dims;\n    var computedLength = dims.inputAreaLength - constants.railInset * 2;\n    var rect = Lib.ensureSingle(sliderGroup, 'rect', constants.railRectClass);\n\n    rect.attr({\n        width: computedLength,\n        height: constants.railWidth,\n        rx: constants.railRadius,\n        ry: constants.railRadius,\n        'shape-rendering': 'crispEdges'\n    })\n    .call(Color.stroke, sliderOpts.bordercolor)\n    .call(Color.fill, sliderOpts.bgcolor)\n    .style('stroke-width', sliderOpts.borderwidth + 'px');\n\n    Drawing.setTranslate(rect,\n        constants.railInset,\n        (dims.inputAreaWidth - constants.railWidth) * 0.5 + dims.currentValueTotalHeight\n    );\n}\n\n},{\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plot_api/plot_template\":741,\"../../plots/plots\":812,\"../color\":580,\"../drawing\":601,\"./constants\":664,\"d3\":157}],667:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar constants = _dereq_('./constants');\n\nmodule.exports = {\n    moduleType: 'component',\n    name: constants.name,\n\n    layoutAttributes: _dereq_('./attributes'),\n    supplyLayoutDefaults: _dereq_('./defaults'),\n\n    draw: _dereq_('./draw')\n};\n\n},{\"./attributes\":663,\"./constants\":664,\"./defaults\":665,\"./draw\":666}],668:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Plots = _dereq_('../../plots/plots');\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../drawing');\nvar Color = _dereq_('../color');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar interactConstants = _dereq_('../../constants/interactions');\n\nmodule.exports = {\n    draw: draw\n};\n\nvar numStripRE = / [XY][0-9]* /;\n\n/**\n * Titles - (re)draw titles on the axes and plot:\n * @param {DOM element} gd - the graphDiv\n * @param {string} titleClass - the css class of this title\n * @param {object} options - how and what to draw\n *      propContainer - the layout object containing `title` and `titlefont`\n *          attributes that apply to this title\n *      propName - the full name of the title property (for Plotly.relayout)\n *      [traceIndex] - include only if this property applies to one trace\n *          (such as a colorbar title) - then editing pipes to Plotly.restyle\n *          instead of Plotly.relayout\n *      placeholder - placeholder text for an empty editable title\n *      [avoid] {object} - include if this title should move to avoid other elements\n *          selection - d3 selection of elements to avoid\n *          side - which direction to move if there is a conflict\n *          [offsetLeft] - if these elements are subject to a translation\n *              wrt the title element\n *          [offsetTop]\n *      attributes {object} - position and alignment attributes\n *          x - pixels\n *          y - pixels\n *          text-anchor - start|middle|end\n *      transform {object} - how to transform the title after positioning\n *          rotate - degrees\n *          offset - shift up/down in the rotated frame (unused?)\n *      containerGroup - if an svg <g> element already exists to hold this\n *          title, include here. Otherwise it will go in fullLayout._infolayer\n *      _meta {object (optional} - meta key-value to for title with\n *          Lib.templateString, default to fullLayout._meta, if not provided\n *\n *  @return {selection} d3 selection of title container group\n */\nfunction draw(gd, titleClass, options) {\n    var cont = options.propContainer;\n    var prop = options.propName;\n    var placeholder = options.placeholder;\n    var traceIndex = options.traceIndex;\n    var avoid = options.avoid || {};\n    var attributes = options.attributes;\n    var transform = options.transform;\n    var group = options.containerGroup;\n\n    var fullLayout = gd._fullLayout;\n\n    var opacity = 1;\n    var isplaceholder = false;\n    var title = cont.title;\n    var txt = (title && title.text ? title.text : '').trim();\n\n    var font = title && title.font ? title.font : {};\n    var fontFamily = font.family;\n    var fontSize = font.size;\n    var fontColor = font.color;\n\n    // only make this title editable if we positively identify its property\n    // as one that has editing enabled.\n    var editAttr;\n    if(prop === 'title.text') editAttr = 'titleText';\n    else if(prop.indexOf('axis') !== -1) editAttr = 'axisTitleText';\n    else if(prop.indexOf('colorbar' !== -1)) editAttr = 'colorbarTitleText';\n    var editable = gd._context.edits[editAttr];\n\n    if(txt === '') opacity = 0;\n    // look for placeholder text while stripping out numbers from eg X2, Y3\n    // this is just for backward compatibility with the old version that had\n    // \"Click to enter X2 title\" and may have gotten saved in some old plots,\n    // we don't want this to show up when these are displayed.\n    else if(txt.replace(numStripRE, ' % ') === placeholder.replace(numStripRE, ' % ')) {\n        opacity = 0.2;\n        isplaceholder = true;\n        if(!editable) txt = '';\n    }\n\n    if(options._meta) {\n        txt = Lib.templateString(txt, options._meta);\n    } else if(fullLayout._meta) {\n        txt = Lib.templateString(txt, fullLayout._meta);\n    }\n\n    var elShouldExist = txt || editable;\n\n    if(!group) {\n        group = Lib.ensureSingle(fullLayout._infolayer, 'g', 'g-' + titleClass);\n    }\n\n    var el = group.selectAll('text')\n        .data(elShouldExist ? [0] : []);\n    el.enter().append('text');\n    el.text(txt)\n        // this is hacky, but convertToTspans uses the class\n        // to determine whether to rotate mathJax...\n        // so we need to clear out any old class and put the\n        // correct one (only relevant for colorbars, at least\n        // for now) - ie don't use .classed\n        .attr('class', titleClass);\n    el.exit().remove();\n\n    if(!elShouldExist) return group;\n\n    function titleLayout(titleEl) {\n        Lib.syncOrAsync([drawTitle, scootTitle], titleEl);\n    }\n\n    function drawTitle(titleEl) {\n        var transformVal;\n\n        if(transform) {\n            transformVal = '';\n            if(transform.rotate) {\n                transformVal += 'rotate(' + [transform.rotate, attributes.x, attributes.y] + ')';\n            }\n            if(transform.offset) {\n                transformVal += 'translate(0, ' + transform.offset + ')';\n            }\n        } else {\n            transformVal = null;\n        }\n\n        titleEl.attr('transform', transformVal);\n\n        titleEl.style({\n            'font-family': fontFamily,\n            'font-size': d3.round(fontSize, 2) + 'px',\n            fill: Color.rgb(fontColor),\n            opacity: opacity * Color.opacity(fontColor),\n            'font-weight': Plots.fontWeight\n        })\n        .attr(attributes)\n        .call(svgTextUtils.convertToTspans, gd);\n\n        return Plots.previousPromises(gd);\n    }\n\n    function scootTitle(titleElIn) {\n        var titleGroup = d3.select(titleElIn.node().parentNode);\n\n        if(avoid && avoid.selection && avoid.side && txt) {\n            titleGroup.attr('transform', null);\n\n            // move toward avoid.side (= left, right, top, bottom) if needed\n            // can include pad (pixels, default 2)\n            var shift = 0;\n            var backside = {\n                left: 'right',\n                right: 'left',\n                top: 'bottom',\n                bottom: 'top'\n            }[avoid.side];\n            var shiftSign = (['left', 'top'].indexOf(avoid.side) !== -1) ?\n                    -1 : 1;\n            var pad = isNumeric(avoid.pad) ? avoid.pad : 2;\n            var titlebb = Drawing.bBox(titleGroup.node());\n            var paperbb = {\n                left: 0,\n                top: 0,\n                right: fullLayout.width,\n                bottom: fullLayout.height\n            };\n            var maxshift = avoid.maxShift || (\n                (paperbb[avoid.side] - titlebb[avoid.side]) *\n                ((avoid.side === 'left' || avoid.side === 'top') ? -1 : 1));\n            // Prevent the title going off the paper\n            if(maxshift < 0) shift = maxshift;\n            else {\n                // so we don't have to offset each avoided element,\n                // give the title the opposite offset\n                var offsetLeft = avoid.offsetLeft || 0;\n                var offsetTop = avoid.offsetTop || 0;\n                titlebb.left -= offsetLeft;\n                titlebb.right -= offsetLeft;\n                titlebb.top -= offsetTop;\n                titlebb.bottom -= offsetTop;\n\n                // iterate over a set of elements (avoid.selection)\n                // to avoid collisions with\n                avoid.selection.each(function() {\n                    var avoidbb = Drawing.bBox(this);\n\n                    if(Lib.bBoxIntersect(titlebb, avoidbb, pad)) {\n                        shift = Math.max(shift, shiftSign * (\n                            avoidbb[avoid.side] - titlebb[backside]) + pad);\n                    }\n                });\n                shift = Math.min(maxshift, shift);\n            }\n            if(shift > 0 || maxshift < 0) {\n                var shiftTemplate = {\n                    left: [-shift, 0],\n                    right: [shift, 0],\n                    top: [0, -shift],\n                    bottom: [0, shift]\n                }[avoid.side];\n                titleGroup.attr('transform',\n                    'translate(' + shiftTemplate + ')');\n            }\n        }\n    }\n\n    el.call(titleLayout);\n\n    function setPlaceholder() {\n        opacity = 0;\n        isplaceholder = true;\n        el.text(placeholder)\n            .on('mouseover.opacity', function() {\n                d3.select(this).transition()\n                    .duration(interactConstants.SHOW_PLACEHOLDER).style('opacity', 1);\n            })\n            .on('mouseout.opacity', function() {\n                d3.select(this).transition()\n                    .duration(interactConstants.HIDE_PLACEHOLDER).style('opacity', 0);\n            });\n    }\n\n    if(editable) {\n        if(!txt) setPlaceholder();\n        else el.on('.opacity', null);\n\n        el.call(svgTextUtils.makeEditable, {gd: gd})\n            .on('edit', function(text) {\n                if(traceIndex !== undefined) {\n                    Registry.call('_guiRestyle', gd, prop, text, traceIndex);\n                } else {\n                    Registry.call('_guiRelayout', gd, prop, text);\n                }\n            })\n            .on('cancel', function() {\n                this.text(this.attr('data-unformatted'))\n                    .call(titleLayout);\n            })\n            .on('input', function(d) {\n                this.text(d || ' ')\n                    .call(svgTextUtils.positionText, attributes.x, attributes.y);\n            });\n    }\n    el.classed('js-placeholder', isplaceholder);\n\n    return group;\n}\n\n},{\"../../constants/interactions\":679,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plots/plots\":812,\"../../registry\":831,\"../color\":580,\"../drawing\":601,\"d3\":157,\"fast-isnumeric\":224}],669:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorAttrs = _dereq_('../color/attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar padAttrs = _dereq_('../../plots/pad_attributes');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nvar buttonsAttrs = templatedArray('button', {\n    visible: {\n        valType: 'boolean',\n        \n        \n    },\n    method: {\n        valType: 'enumerated',\n        values: ['restyle', 'relayout', 'animate', 'update', 'skip'],\n        dflt: 'restyle',\n        \n        \n    },\n    args: {\n        valType: 'info_array',\n        \n        freeLength: true,\n        items: [\n            {valType: 'any'},\n            {valType: 'any'},\n            {valType: 'any'}\n        ],\n        \n    },\n    label: {\n        valType: 'string',\n        \n        dflt: '',\n        \n    },\n    execute: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    }\n});\n\nmodule.exports = overrideAll(templatedArray('updatemenu', {\n    _arrayAttrRegexps: [/^updatemenus\\[(0|[1-9][0-9]+)\\]\\.buttons/],\n\n    visible: {\n        valType: 'boolean',\n        \n        \n    },\n\n    type: {\n        valType: 'enumerated',\n        values: ['dropdown', 'buttons'],\n        dflt: 'dropdown',\n        \n        \n    },\n\n    direction: {\n        valType: 'enumerated',\n        values: ['left', 'right', 'up', 'down'],\n        dflt: 'down',\n        \n        \n    },\n\n    active: {\n        valType: 'integer',\n        \n        min: -1,\n        dflt: 0,\n        \n    },\n\n    showactive: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n\n    buttons: buttonsAttrs,\n\n    x: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: -0.05,\n        \n        \n    },\n    xanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'left', 'center', 'right'],\n        dflt: 'right',\n        \n        \n    },\n    y: {\n        valType: 'number',\n        min: -2,\n        max: 3,\n        dflt: 1,\n        \n        \n    },\n    yanchor: {\n        valType: 'enumerated',\n        values: ['auto', 'top', 'middle', 'bottom'],\n        dflt: 'top',\n        \n        \n    },\n\n    pad: extendFlat(padAttrs({editType: 'arraydraw'}), {\n        \n    }),\n\n    font: fontAttrs({\n        \n    }),\n\n    bgcolor: {\n        valType: 'color',\n        \n        \n    },\n    bordercolor: {\n        valType: 'color',\n        dflt: colorAttrs.borderLine,\n        \n        \n    },\n    borderwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'arraydraw',\n        \n    }\n}), 'arraydraw', 'from-root');\n\n},{\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plot_api/plot_template\":741,\"../../plots/font_attributes\":777,\"../../plots/pad_attributes\":811,\"../color/attributes\":579}],670:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = {\n\n    // layout attribute name\n    name: 'updatemenus',\n\n    // class names\n    containerClassName: 'updatemenu-container',\n    headerGroupClassName: 'updatemenu-header-group',\n    headerClassName: 'updatemenu-header',\n    headerArrowClassName: 'updatemenu-header-arrow',\n    dropdownButtonGroupClassName: 'updatemenu-dropdown-button-group',\n    dropdownButtonClassName: 'updatemenu-dropdown-button',\n    buttonClassName: 'updatemenu-button',\n    itemRectClassName: 'updatemenu-item-rect',\n    itemTextClassName: 'updatemenu-item-text',\n\n    // DOM attribute name in button group keeping track\n    // of active update menu\n    menuIndexAttrName: 'updatemenu-active-index',\n\n    // id root pass to Plots.autoMargin\n    autoMarginIdRoot: 'updatemenu-',\n\n    // options when 'active: -1'\n    blankHeaderOpts: { label: '  ' },\n\n    // min item width / height\n    minWidth: 30,\n    minHeight: 30,\n\n    // padding around item text\n    textPadX: 24,\n    arrowPadX: 16,\n\n    // item rect radii\n    rx: 2,\n    ry: 2,\n\n    // item  text x offset off left edge\n    textOffsetX: 12,\n\n    // item  text y offset (w.r.t. middle)\n    textOffsetY: 3,\n\n    // arrow offset off right edge\n    arrowOffsetX: 4,\n\n    // gap between header and buttons\n    gapButtonHeader: 5,\n\n    // gap between between buttons\n    gapButton: 2,\n\n    // color given to active buttons\n    activeColor: '#F4FAFF',\n\n    // color given to hovered buttons\n    hoverColor: '#F4FAFF',\n\n    // symbol for menu open arrow\n    arrowSymbol: {\n        left: '◄',\n        right: '►',\n        up: '▲',\n        down: '▼'\n    }\n};\n\n},{}],671:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar constants = _dereq_('./constants');\n\nvar name = constants.name;\nvar buttonAttrs = attributes.buttons;\n\n\nmodule.exports = function updateMenusDefaults(layoutIn, layoutOut) {\n    var opts = {\n        name: name,\n        handleItemDefaults: menuDefaults\n    };\n\n    handleArrayContainerDefaults(layoutIn, layoutOut, opts);\n};\n\nfunction menuDefaults(menuIn, menuOut, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(menuIn, menuOut, attributes, attr, dflt);\n    }\n\n    var buttons = handleArrayContainerDefaults(menuIn, menuOut, {\n        name: 'buttons',\n        handleItemDefaults: buttonDefaults\n    });\n\n    var visible = coerce('visible', buttons.length > 0);\n    if(!visible) return;\n\n    coerce('active');\n    coerce('direction');\n    coerce('type');\n    coerce('showactive');\n\n    coerce('x');\n    coerce('y');\n    Lib.noneOrAll(menuIn, menuOut, ['x', 'y']);\n\n    coerce('xanchor');\n    coerce('yanchor');\n\n    coerce('pad.t');\n    coerce('pad.r');\n    coerce('pad.b');\n    coerce('pad.l');\n\n    Lib.coerceFont(coerce, 'font', layoutOut.font);\n\n    coerce('bgcolor', layoutOut.paper_bgcolor);\n    coerce('bordercolor');\n    coerce('borderwidth');\n}\n\nfunction buttonDefaults(buttonIn, buttonOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(buttonIn, buttonOut, buttonAttrs, attr, dflt);\n    }\n\n    var visible = coerce('visible',\n        (buttonIn.method === 'skip' || Array.isArray(buttonIn.args)));\n    if(visible) {\n        coerce('method');\n        coerce('args');\n        coerce('label');\n        coerce('execute');\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"./attributes\":669,\"./constants\":670}],672:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Plots = _dereq_('../../plots/plots');\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;\n\nvar LINE_SPACING = _dereq_('../../constants/alignment').LINE_SPACING;\n\nvar constants = _dereq_('./constants');\nvar ScrollBox = _dereq_('./scrollbox');\n\nmodule.exports = function draw(gd) {\n    var fullLayout = gd._fullLayout;\n    var menuData = Lib.filterVisible(fullLayout[constants.name]);\n\n    /* Update menu data is bound to the header-group.\n     * The items in the header group are always present.\n     *\n     * Upon clicking on a header its corresponding button\n     * data is bound to the button-group.\n     *\n     * We draw all headers in one group before all buttons\n     * so that the buttons *always* appear above the headers.\n     *\n     * Note that only one set of buttons are visible at once.\n     *\n     * <g container />\n     *\n     *     <g header-group />\n     *         <g item header />\n     *         <text item header-arrow />\n     *     <g header-group />\n     *         <g item header />\n     *         <text item header-arrow />\n     *     ...\n     *\n     *     <g button-group />\n     *         <g item button />\n     *         <g item button />\n     *         ...\n     */\n\n    function clearAutoMargin(menuOpts) {\n        Plots.autoMargin(gd, autoMarginId(menuOpts));\n    }\n\n    // draw update menu container\n    var menus = fullLayout._menulayer\n        .selectAll('g.' + constants.containerClassName)\n        .data(menuData.length > 0 ? [0] : []);\n\n    menus.enter().append('g')\n        .classed(constants.containerClassName, true)\n        .style('cursor', 'pointer');\n\n    menus.exit().each(function() {\n        // Most components don't need to explicitly remove autoMargin, because\n        // marginPushers does this - but updatemenu updates don't go through\n        // a full replot so we need to explicitly remove it.\n        // This is for removing *all* updatemenus, removing individuals is\n        // handled below, in headerGroups.exit\n        d3.select(this).selectAll('g.' + constants.headerGroupClassName)\n            .each(clearAutoMargin);\n    }).remove();\n\n    // return early if no update menus are visible\n    if(menuData.length === 0) return;\n\n    // join header group\n    var headerGroups = menus.selectAll('g.' + constants.headerGroupClassName)\n        .data(menuData, keyFunction);\n\n    headerGroups.enter().append('g')\n        .classed(constants.headerGroupClassName, true);\n\n    // draw dropdown button container\n    var gButton = Lib.ensureSingle(menus, 'g', constants.dropdownButtonGroupClassName, function(s) {\n        s.style('pointer-events', 'all');\n    });\n\n    // find dimensions before plotting anything (this mutates menuOpts)\n    for(var i = 0; i < menuData.length; i++) {\n        var menuOpts = menuData[i];\n        findDimensions(gd, menuOpts);\n    }\n\n    // setup scrollbox\n    var scrollBoxId = 'updatemenus' + fullLayout._uid;\n    var scrollBox = new ScrollBox(gd, gButton, scrollBoxId);\n\n    // remove exiting header, remove dropped buttons and reset margins\n    if(headerGroups.enter().size()) {\n        // make sure gButton is on top of all headers\n        gButton.node().parentNode.appendChild(gButton.node());\n        gButton.call(removeAllButtons);\n    }\n\n    headerGroups.exit().each(function(menuOpts) {\n        gButton.call(removeAllButtons);\n        clearAutoMargin(menuOpts);\n    }).remove();\n\n    // draw headers!\n    headerGroups.each(function(menuOpts) {\n        var gHeader = d3.select(this);\n\n        var _gButton = menuOpts.type === 'dropdown' ? gButton : null;\n        Plots.manageCommandObserver(gd, menuOpts, menuOpts.buttons, function(data) {\n            setActive(gd, menuOpts, menuOpts.buttons[data.index], gHeader, _gButton, scrollBox, data.index, true);\n        });\n\n        if(menuOpts.type === 'dropdown') {\n            drawHeader(gd, gHeader, gButton, scrollBox, menuOpts);\n\n            // if this menu is active, update the dropdown container\n            if(isActive(gButton, menuOpts)) {\n                drawButtons(gd, gHeader, gButton, scrollBox, menuOpts);\n            }\n        } else {\n            drawButtons(gd, gHeader, null, null, menuOpts);\n        }\n    });\n};\n\n// Note that '_index' is set at the default step,\n// it corresponds to the menu index in the user layout update menu container.\n// Because a menu can be set invisible,\n// this is a more 'consistent' field than the index in the menuData.\nfunction keyFunction(menuOpts) {\n    return menuOpts._index;\n}\n\nfunction isFolded(gButton) {\n    return +gButton.attr(constants.menuIndexAttrName) === -1;\n}\n\nfunction isActive(gButton, menuOpts) {\n    return +gButton.attr(constants.menuIndexAttrName) === menuOpts._index;\n}\n\nfunction setActive(gd, menuOpts, buttonOpts, gHeader, gButton, scrollBox, buttonIndex, isSilentUpdate) {\n    // update 'active' attribute in menuOpts\n    menuOpts.active = buttonIndex;\n\n    // due to templating, it's possible this slider doesn't even exist yet\n    arrayEditor(gd.layout, constants.name, menuOpts)\n        .applyUpdate('active', buttonIndex);\n\n    if(menuOpts.type === 'buttons') {\n        drawButtons(gd, gHeader, null, null, menuOpts);\n    } else if(menuOpts.type === 'dropdown') {\n        // fold up buttons and redraw header\n        gButton.attr(constants.menuIndexAttrName, '-1');\n\n        drawHeader(gd, gHeader, gButton, scrollBox, menuOpts);\n\n        if(!isSilentUpdate) {\n            drawButtons(gd, gHeader, gButton, scrollBox, menuOpts);\n        }\n    }\n}\n\nfunction drawHeader(gd, gHeader, gButton, scrollBox, menuOpts) {\n    var header = Lib.ensureSingle(gHeader, 'g', constants.headerClassName, function(s) {\n        s.style('pointer-events', 'all');\n    });\n\n    var dims = menuOpts._dims;\n    var active = menuOpts.active;\n    var headerOpts = menuOpts.buttons[active] || constants.blankHeaderOpts;\n    var posOpts = { y: menuOpts.pad.t, yPad: 0, x: menuOpts.pad.l, xPad: 0, index: 0 };\n    var positionOverrides = {\n        width: dims.headerWidth,\n        height: dims.headerHeight\n    };\n\n    header\n        .call(drawItem, menuOpts, headerOpts, gd)\n        .call(setItemPosition, menuOpts, posOpts, positionOverrides);\n\n    // draw drop arrow at the right edge\n    var arrow = Lib.ensureSingle(gHeader, 'text', constants.headerArrowClassName, function(s) {\n        s.classed('user-select-none', true)\n            .attr('text-anchor', 'end')\n            .call(Drawing.font, menuOpts.font)\n            .text(constants.arrowSymbol[menuOpts.direction]);\n    });\n\n    arrow.attr({\n        x: dims.headerWidth - constants.arrowOffsetX + menuOpts.pad.l,\n        y: dims.headerHeight / 2 + constants.textOffsetY + menuOpts.pad.t\n    });\n\n    header.on('click', function() {\n        gButton.call(removeAllButtons,\n            String(isActive(gButton, menuOpts) ? -1 : menuOpts._index)\n        );\n\n        drawButtons(gd, gHeader, gButton, scrollBox, menuOpts);\n    });\n\n    header.on('mouseover', function() {\n        header.call(styleOnMouseOver);\n    });\n\n    header.on('mouseout', function() {\n        header.call(styleOnMouseOut, menuOpts);\n    });\n\n    // translate header group\n    Drawing.setTranslate(gHeader, dims.lx, dims.ly);\n}\n\nfunction drawButtons(gd, gHeader, gButton, scrollBox, menuOpts) {\n    // If this is a set of buttons, set pointer events = all since we play\n    // some minor games with which container is which in order to simplify\n    // the drawing of *either* buttons or menus\n    if(!gButton) {\n        gButton = gHeader;\n        gButton.attr('pointer-events', 'all');\n    }\n\n    var buttonData = (!isFolded(gButton) || menuOpts.type === 'buttons') ?\n        menuOpts.buttons :\n        [];\n\n    var klass = menuOpts.type === 'dropdown' ? constants.dropdownButtonClassName : constants.buttonClassName;\n\n    var buttons = gButton.selectAll('g.' + klass)\n        .data(Lib.filterVisible(buttonData));\n\n    var enter = buttons.enter().append('g')\n        .classed(klass, true);\n\n    var exit = buttons.exit();\n\n    if(menuOpts.type === 'dropdown') {\n        enter.attr('opacity', '0')\n            .transition()\n            .attr('opacity', '1');\n\n        exit.transition()\n            .attr('opacity', '0')\n            .remove();\n    } else {\n        exit.remove();\n    }\n\n    var x0 = 0;\n    var y0 = 0;\n    var dims = menuOpts._dims;\n\n    var isVertical = ['up', 'down'].indexOf(menuOpts.direction) !== -1;\n\n    if(menuOpts.type === 'dropdown') {\n        if(isVertical) {\n            y0 = dims.headerHeight + constants.gapButtonHeader;\n        } else {\n            x0 = dims.headerWidth + constants.gapButtonHeader;\n        }\n    }\n\n    if(menuOpts.type === 'dropdown' && menuOpts.direction === 'up') {\n        y0 = -constants.gapButtonHeader + constants.gapButton - dims.openHeight;\n    }\n\n    if(menuOpts.type === 'dropdown' && menuOpts.direction === 'left') {\n        x0 = -constants.gapButtonHeader + constants.gapButton - dims.openWidth;\n    }\n\n    var posOpts = {\n        x: dims.lx + x0 + menuOpts.pad.l,\n        y: dims.ly + y0 + menuOpts.pad.t,\n        yPad: constants.gapButton,\n        xPad: constants.gapButton,\n        index: 0,\n    };\n\n    var scrollBoxPosition = {\n        l: posOpts.x + menuOpts.borderwidth,\n        t: posOpts.y + menuOpts.borderwidth\n    };\n\n    buttons.each(function(buttonOpts, buttonIndex) {\n        var button = d3.select(this);\n\n        button\n            .call(drawItem, menuOpts, buttonOpts, gd)\n            .call(setItemPosition, menuOpts, posOpts);\n\n        button.on('click', function() {\n            // skip `dragend` events\n            if(d3.event.defaultPrevented) return;\n\n            setActive(gd, menuOpts, buttonOpts, gHeader, gButton, scrollBox, buttonIndex);\n\n            if(buttonOpts.execute) {\n                Plots.executeAPICommand(gd, buttonOpts.method, buttonOpts.args);\n            }\n\n            gd.emit('plotly_buttonclicked', {menu: menuOpts, button: buttonOpts, active: menuOpts.active});\n        });\n\n        button.on('mouseover', function() {\n            button.call(styleOnMouseOver);\n        });\n\n        button.on('mouseout', function() {\n            button.call(styleOnMouseOut, menuOpts);\n            buttons.call(styleButtons, menuOpts);\n        });\n    });\n\n    buttons.call(styleButtons, menuOpts);\n\n    if(isVertical) {\n        scrollBoxPosition.w = Math.max(dims.openWidth, dims.headerWidth);\n        scrollBoxPosition.h = posOpts.y - scrollBoxPosition.t;\n    } else {\n        scrollBoxPosition.w = posOpts.x - scrollBoxPosition.l;\n        scrollBoxPosition.h = Math.max(dims.openHeight, dims.headerHeight);\n    }\n\n    scrollBoxPosition.direction = menuOpts.direction;\n\n    if(scrollBox) {\n        if(buttons.size()) {\n            drawScrollBox(gd, gHeader, gButton, scrollBox, menuOpts, scrollBoxPosition);\n        } else {\n            hideScrollBox(scrollBox);\n        }\n    }\n}\n\nfunction drawScrollBox(gd, gHeader, gButton, scrollBox, menuOpts, position) {\n    // enable the scrollbox\n    var direction = menuOpts.direction;\n    var isVertical = (direction === 'up' || direction === 'down');\n    var dims = menuOpts._dims;\n\n    var active = menuOpts.active;\n    var translateX, translateY;\n    var i;\n    if(isVertical) {\n        translateY = 0;\n        for(i = 0; i < active; i++) {\n            translateY += dims.heights[i] + constants.gapButton;\n        }\n    } else {\n        translateX = 0;\n        for(i = 0; i < active; i++) {\n            translateX += dims.widths[i] + constants.gapButton;\n        }\n    }\n\n    scrollBox.enable(position, translateX, translateY);\n\n    if(scrollBox.hbar) {\n        scrollBox.hbar\n            .attr('opacity', '0')\n            .transition()\n            .attr('opacity', '1');\n    }\n\n    if(scrollBox.vbar) {\n        scrollBox.vbar\n            .attr('opacity', '0')\n            .transition()\n            .attr('opacity', '1');\n    }\n}\n\nfunction hideScrollBox(scrollBox) {\n    var hasHBar = !!scrollBox.hbar;\n    var hasVBar = !!scrollBox.vbar;\n\n    if(hasHBar) {\n        scrollBox.hbar\n            .transition()\n            .attr('opacity', '0')\n            .each('end', function() {\n                hasHBar = false;\n                if(!hasVBar) scrollBox.disable();\n            });\n    }\n\n    if(hasVBar) {\n        scrollBox.vbar\n            .transition()\n            .attr('opacity', '0')\n            .each('end', function() {\n                hasVBar = false;\n                if(!hasHBar) scrollBox.disable();\n            });\n    }\n}\n\nfunction drawItem(item, menuOpts, itemOpts, gd) {\n    item.call(drawItemRect, menuOpts)\n        .call(drawItemText, menuOpts, itemOpts, gd);\n}\n\nfunction drawItemRect(item, menuOpts) {\n    var rect = Lib.ensureSingle(item, 'rect', constants.itemRectClassName, function(s) {\n        s.attr({\n            rx: constants.rx,\n            ry: constants.ry,\n            'shape-rendering': 'crispEdges'\n        });\n    });\n\n    rect.call(Color.stroke, menuOpts.bordercolor)\n        .call(Color.fill, menuOpts.bgcolor)\n        .style('stroke-width', menuOpts.borderwidth + 'px');\n}\n\nfunction drawItemText(item, menuOpts, itemOpts, gd) {\n    var text = Lib.ensureSingle(item, 'text', constants.itemTextClassName, function(s) {\n        s.classed('user-select-none', true)\n            .attr({\n                'text-anchor': 'start',\n                'data-notex': 1\n            });\n    });\n\n    var tx = itemOpts.label;\n    var _meta = gd._fullLayout._meta;\n    if(_meta) tx = Lib.templateString(tx, _meta);\n\n    text.call(Drawing.font, menuOpts.font)\n        .text(tx)\n        .call(svgTextUtils.convertToTspans, gd);\n}\n\nfunction styleButtons(buttons, menuOpts) {\n    var active = menuOpts.active;\n\n    buttons.each(function(buttonOpts, i) {\n        var button = d3.select(this);\n\n        if(i === active && menuOpts.showactive) {\n            button.select('rect.' + constants.itemRectClassName)\n                .call(Color.fill, constants.activeColor);\n        }\n    });\n}\n\nfunction styleOnMouseOver(item) {\n    item.select('rect.' + constants.itemRectClassName)\n        .call(Color.fill, constants.hoverColor);\n}\n\nfunction styleOnMouseOut(item, menuOpts) {\n    item.select('rect.' + constants.itemRectClassName)\n        .call(Color.fill, menuOpts.bgcolor);\n}\n\n// find item dimensions (this mutates menuOpts)\nfunction findDimensions(gd, menuOpts) {\n    var dims = menuOpts._dims = {\n        width1: 0,\n        height1: 0,\n        heights: [],\n        widths: [],\n        totalWidth: 0,\n        totalHeight: 0,\n        openWidth: 0,\n        openHeight: 0,\n        lx: 0,\n        ly: 0\n    };\n\n    var fakeButtons = Drawing.tester.selectAll('g.' + constants.dropdownButtonClassName)\n        .data(Lib.filterVisible(menuOpts.buttons));\n\n    fakeButtons.enter().append('g')\n        .classed(constants.dropdownButtonClassName, true);\n\n    var isVertical = ['up', 'down'].indexOf(menuOpts.direction) !== -1;\n\n    // loop over fake buttons to find width / height\n    fakeButtons.each(function(buttonOpts, i) {\n        var button = d3.select(this);\n\n        button.call(drawItem, menuOpts, buttonOpts, gd);\n\n        var text = button.select('.' + constants.itemTextClassName);\n\n        // width is given by max width of all buttons\n        var tWidth = text.node() && Drawing.bBox(text.node()).width;\n        var wEff = Math.max(tWidth + constants.textPadX, constants.minWidth);\n\n        // height is determined by item text\n        var tHeight = menuOpts.font.size * LINE_SPACING;\n        var tLines = svgTextUtils.lineCount(text);\n        var hEff = Math.max(tHeight * tLines, constants.minHeight) + constants.textOffsetY;\n\n        hEff = Math.ceil(hEff);\n        wEff = Math.ceil(wEff);\n\n        // Store per-item sizes since a row of horizontal buttons, for example,\n        // don't all need to be the same width:\n        dims.widths[i] = wEff;\n        dims.heights[i] = hEff;\n\n        // Height and width of individual element:\n        dims.height1 = Math.max(dims.height1, hEff);\n        dims.width1 = Math.max(dims.width1, wEff);\n\n        if(isVertical) {\n            dims.totalWidth = Math.max(dims.totalWidth, wEff);\n            dims.openWidth = dims.totalWidth;\n            dims.totalHeight += hEff + constants.gapButton;\n            dims.openHeight += hEff + constants.gapButton;\n        } else {\n            dims.totalWidth += wEff + constants.gapButton;\n            dims.openWidth += wEff + constants.gapButton;\n            dims.totalHeight = Math.max(dims.totalHeight, hEff);\n            dims.openHeight = dims.totalHeight;\n        }\n    });\n\n    if(isVertical) {\n        dims.totalHeight -= constants.gapButton;\n    } else {\n        dims.totalWidth -= constants.gapButton;\n    }\n\n\n    dims.headerWidth = dims.width1 + constants.arrowPadX;\n    dims.headerHeight = dims.height1;\n\n    if(menuOpts.type === 'dropdown') {\n        if(isVertical) {\n            dims.width1 += constants.arrowPadX;\n            dims.totalHeight = dims.height1;\n        } else {\n            dims.totalWidth = dims.width1;\n        }\n        dims.totalWidth += constants.arrowPadX;\n    }\n\n    fakeButtons.remove();\n\n    var paddedWidth = dims.totalWidth + menuOpts.pad.l + menuOpts.pad.r;\n    var paddedHeight = dims.totalHeight + menuOpts.pad.t + menuOpts.pad.b;\n\n    var graphSize = gd._fullLayout._size;\n    dims.lx = graphSize.l + graphSize.w * menuOpts.x;\n    dims.ly = graphSize.t + graphSize.h * (1 - menuOpts.y);\n\n    var xanchor = 'left';\n    if(Lib.isRightAnchor(menuOpts)) {\n        dims.lx -= paddedWidth;\n        xanchor = 'right';\n    }\n    if(Lib.isCenterAnchor(menuOpts)) {\n        dims.lx -= paddedWidth / 2;\n        xanchor = 'center';\n    }\n\n    var yanchor = 'top';\n    if(Lib.isBottomAnchor(menuOpts)) {\n        dims.ly -= paddedHeight;\n        yanchor = 'bottom';\n    }\n    if(Lib.isMiddleAnchor(menuOpts)) {\n        dims.ly -= paddedHeight / 2;\n        yanchor = 'middle';\n    }\n\n    dims.totalWidth = Math.ceil(dims.totalWidth);\n    dims.totalHeight = Math.ceil(dims.totalHeight);\n    dims.lx = Math.round(dims.lx);\n    dims.ly = Math.round(dims.ly);\n\n    Plots.autoMargin(gd, autoMarginId(menuOpts), {\n        x: menuOpts.x,\n        y: menuOpts.y,\n        l: paddedWidth * ({right: 1, center: 0.5}[xanchor] || 0),\n        r: paddedWidth * ({left: 1, center: 0.5}[xanchor] || 0),\n        b: paddedHeight * ({top: 1, middle: 0.5}[yanchor] || 0),\n        t: paddedHeight * ({bottom: 1, middle: 0.5}[yanchor] || 0)\n    });\n}\n\nfunction autoMarginId(menuOpts) {\n    return constants.autoMarginIdRoot + menuOpts._index;\n}\n\n// set item positions (mutates posOpts)\nfunction setItemPosition(item, menuOpts, posOpts, overrideOpts) {\n    overrideOpts = overrideOpts || {};\n    var rect = item.select('.' + constants.itemRectClassName);\n    var text = item.select('.' + constants.itemTextClassName);\n    var borderWidth = menuOpts.borderwidth;\n    var index = posOpts.index;\n    var dims = menuOpts._dims;\n\n    Drawing.setTranslate(item, borderWidth + posOpts.x, borderWidth + posOpts.y);\n\n    var isVertical = ['up', 'down'].indexOf(menuOpts.direction) !== -1;\n    var finalHeight = overrideOpts.height || (isVertical ? dims.heights[index] : dims.height1);\n\n    rect.attr({\n        x: 0,\n        y: 0,\n        width: overrideOpts.width || (isVertical ? dims.width1 : dims.widths[index]),\n        height: finalHeight\n    });\n\n    var tHeight = menuOpts.font.size * LINE_SPACING;\n    var tLines = svgTextUtils.lineCount(text);\n    var spanOffset = ((tLines - 1) * tHeight / 2);\n\n    svgTextUtils.positionText(text, constants.textOffsetX,\n        finalHeight / 2 - spanOffset + constants.textOffsetY);\n\n    if(isVertical) {\n        posOpts.y += dims.heights[index] + posOpts.yPad;\n    } else {\n        posOpts.x += dims.widths[index] + posOpts.xPad;\n    }\n\n    posOpts.index++;\n}\n\nfunction removeAllButtons(gButton, newMenuIndexAttr) {\n    gButton\n        .attr(constants.menuIndexAttrName, newMenuIndexAttr || '-1')\n        .selectAll('g.' + constants.dropdownButtonClassName).remove();\n}\n\n},{\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plot_api/plot_template\":741,\"../../plots/plots\":812,\"../color\":580,\"../drawing\":601,\"./constants\":670,\"./scrollbox\":674,\"d3\":157}],673:[function(_dereq_,module,exports){\narguments[4][667][0].apply(exports,arguments)\n},{\"./attributes\":669,\"./constants\":670,\"./defaults\":671,\"./draw\":672,\"dup\":667}],674:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = ScrollBox;\n\nvar d3 = _dereq_('d3');\n\nvar Color = _dereq_('../color');\nvar Drawing = _dereq_('../drawing');\n\nvar Lib = _dereq_('../../lib');\n\n/**\n * Helper class to setup a scroll box\n *\n * @class\n * @param           gd          Plotly's graph div\n * @param           container   Container to be scroll-boxed (as a D3 selection)\n * @param {string}  id          Id for the clip path to implement the scroll box\n */\nfunction ScrollBox(gd, container, id) {\n    this.gd = gd;\n    this.container = container;\n    this.id = id;\n\n    // See ScrollBox.prototype.enable for further definition\n    this.position = null;  // scrollbox position\n    this.translateX = null;  // scrollbox horizontal translation\n    this.translateY = null;  // scrollbox vertical translation\n    this.hbar = null;  // horizontal scrollbar D3 selection\n    this.vbar = null;  // vertical scrollbar D3 selection\n\n    // <rect> element to capture pointer events\n    this.bg = this.container.selectAll('rect.scrollbox-bg').data([0]);\n\n    this.bg.exit()\n        .on('.drag', null)\n        .on('wheel', null)\n        .remove();\n\n    this.bg.enter().append('rect')\n        .classed('scrollbox-bg', true)\n        .style('pointer-events', 'all')\n        .attr({\n            opacity: 0,\n            x: 0,\n            y: 0,\n            width: 0,\n            height: 0\n        });\n}\n\n// scroll bar dimensions\nScrollBox.barWidth = 2;\nScrollBox.barLength = 20;\nScrollBox.barRadius = 2;\nScrollBox.barPad = 1;\nScrollBox.barColor = '#808BA4';\n\n/**\n * If needed, setup a clip path and scrollbars\n *\n * @method\n * @param {Object}  position\n * @param {number}  position.l  Left side position (in pixels)\n * @param {number}  position.t  Top side (in pixels)\n * @param {number}  position.w  Width (in pixels)\n * @param {number}  position.h  Height (in pixels)\n * @param {string}  [position.direction='down']\n *                  Either 'down', 'left', 'right' or 'up'\n * @param {number}  [translateX=0]  Horizontal offset (in pixels)\n * @param {number}  [translateY=0]  Vertical offset (in pixels)\n */\nScrollBox.prototype.enable = function enable(position, translateX, translateY) {\n    var fullLayout = this.gd._fullLayout;\n    var fullWidth = fullLayout.width;\n    var fullHeight = fullLayout.height;\n\n    // compute position of scrollbox\n    this.position = position;\n\n    var l = this.position.l;\n    var w = this.position.w;\n    var t = this.position.t;\n    var h = this.position.h;\n    var direction = this.position.direction;\n    var isDown = (direction === 'down');\n    var isLeft = (direction === 'left');\n    var isRight = (direction === 'right');\n    var isUp = (direction === 'up');\n    var boxW = w;\n    var boxH = h;\n    var boxL, boxR;\n    var boxT, boxB;\n\n    if(!isDown && !isLeft && !isRight && !isUp) {\n        this.position.direction = 'down';\n        isDown = true;\n    }\n\n    var isVertical = isDown || isUp;\n    if(isVertical) {\n        boxL = l;\n        boxR = boxL + boxW;\n\n        if(isDown) {\n            // anchor to top side\n            boxT = t;\n            boxB = Math.min(boxT + boxH, fullHeight);\n            boxH = boxB - boxT;\n        } else {\n            // anchor to bottom side\n            boxB = t + boxH;\n            boxT = Math.max(boxB - boxH, 0);\n            boxH = boxB - boxT;\n        }\n    } else {\n        boxT = t;\n        boxB = boxT + boxH;\n\n        if(isLeft) {\n            // anchor to right side\n            boxR = l + boxW;\n            boxL = Math.max(boxR - boxW, 0);\n            boxW = boxR - boxL;\n        } else {\n            // anchor to left side\n            boxL = l;\n            boxR = Math.min(boxL + boxW, fullWidth);\n            boxW = boxR - boxL;\n        }\n    }\n\n    this._box = {\n        l: boxL,\n        t: boxT,\n        w: boxW,\n        h: boxH\n    };\n\n    // compute position of horizontal scroll bar\n    var needsHorizontalScrollBar = (w > boxW);\n    var hbarW = ScrollBox.barLength + 2 * ScrollBox.barPad;\n    var hbarH = ScrollBox.barWidth + 2 * ScrollBox.barPad;\n    // draw horizontal scrollbar on the bottom side\n    var hbarL = l;\n    var hbarT = t + h;\n\n    if(hbarT + hbarH > fullHeight) hbarT = fullHeight - hbarH;\n\n    var hbar = this.container.selectAll('rect.scrollbar-horizontal').data(\n            (needsHorizontalScrollBar) ? [0] : []);\n\n    hbar.exit()\n        .on('.drag', null)\n        .remove();\n\n    hbar.enter().append('rect')\n        .classed('scrollbar-horizontal', true)\n        .call(Color.fill, ScrollBox.barColor);\n\n    if(needsHorizontalScrollBar) {\n        this.hbar = hbar.attr({\n            'rx': ScrollBox.barRadius,\n            'ry': ScrollBox.barRadius,\n            'x': hbarL,\n            'y': hbarT,\n            'width': hbarW,\n            'height': hbarH\n        });\n\n        // hbar center moves between hbarXMin and hbarXMin + hbarTranslateMax\n        this._hbarXMin = hbarL + hbarW / 2;\n        this._hbarTranslateMax = boxW - hbarW;\n    } else {\n        delete this.hbar;\n        delete this._hbarXMin;\n        delete this._hbarTranslateMax;\n    }\n\n    // compute position of vertical scroll bar\n    var needsVerticalScrollBar = (h > boxH);\n    var vbarW = ScrollBox.barWidth + 2 * ScrollBox.barPad;\n    var vbarH = ScrollBox.barLength + 2 * ScrollBox.barPad;\n    // draw vertical scrollbar on the right side\n    var vbarL = l + w;\n    var vbarT = t;\n\n    if(vbarL + vbarW > fullWidth) vbarL = fullWidth - vbarW;\n\n    var vbar = this.container.selectAll('rect.scrollbar-vertical').data(\n            (needsVerticalScrollBar) ? [0] : []);\n\n    vbar.exit()\n        .on('.drag', null)\n        .remove();\n\n    vbar.enter().append('rect')\n        .classed('scrollbar-vertical', true)\n        .call(Color.fill, ScrollBox.barColor);\n\n    if(needsVerticalScrollBar) {\n        this.vbar = vbar.attr({\n            'rx': ScrollBox.barRadius,\n            'ry': ScrollBox.barRadius,\n            'x': vbarL,\n            'y': vbarT,\n            'width': vbarW,\n            'height': vbarH\n        });\n\n        // vbar center moves between vbarYMin and vbarYMin + vbarTranslateMax\n        this._vbarYMin = vbarT + vbarH / 2;\n        this._vbarTranslateMax = boxH - vbarH;\n    } else {\n        delete this.vbar;\n        delete this._vbarYMin;\n        delete this._vbarTranslateMax;\n    }\n\n    // setup a clip path (if scroll bars are needed)\n    var clipId = this.id;\n    var clipL = boxL - 0.5;\n    var clipR = (needsVerticalScrollBar) ? boxR + vbarW + 0.5 : boxR + 0.5;\n    var clipT = boxT - 0.5;\n    var clipB = (needsHorizontalScrollBar) ? boxB + hbarH + 0.5 : boxB + 0.5;\n\n    var clipPath = fullLayout._topdefs.selectAll('#' + clipId)\n        .data((needsHorizontalScrollBar || needsVerticalScrollBar) ? [0] : []);\n\n    clipPath.exit().remove();\n\n    clipPath.enter()\n        .append('clipPath').attr('id', clipId)\n        .append('rect');\n\n    if(needsHorizontalScrollBar || needsVerticalScrollBar) {\n        this._clipRect = clipPath.select('rect').attr({\n            x: Math.floor(clipL),\n            y: Math.floor(clipT),\n            width: Math.ceil(clipR) - Math.floor(clipL),\n            height: Math.ceil(clipB) - Math.floor(clipT)\n        });\n\n        this.container.call(Drawing.setClipUrl, clipId, this.gd);\n\n        this.bg.attr({\n            x: l,\n            y: t,\n            width: w,\n            height: h\n        });\n    } else {\n        this.bg.attr({\n            width: 0,\n            height: 0\n        });\n        this.container\n            .on('wheel', null)\n            .on('.drag', null)\n            .call(Drawing.setClipUrl, null);\n        delete this._clipRect;\n    }\n\n    // set up drag listeners (if scroll bars are needed)\n    if(needsHorizontalScrollBar || needsVerticalScrollBar) {\n        var onBoxDrag = d3.behavior.drag()\n            .on('dragstart', function() {\n                d3.event.sourceEvent.preventDefault();\n            })\n            .on('drag', this._onBoxDrag.bind(this));\n\n        this.container\n            .on('wheel', null)\n            .on('wheel', this._onBoxWheel.bind(this))\n            .on('.drag', null)\n            .call(onBoxDrag);\n\n        var onBarDrag = d3.behavior.drag()\n            .on('dragstart', function() {\n                d3.event.sourceEvent.preventDefault();\n                d3.event.sourceEvent.stopPropagation();\n            })\n            .on('drag', this._onBarDrag.bind(this));\n\n        if(needsHorizontalScrollBar) {\n            this.hbar\n                .on('.drag', null)\n                .call(onBarDrag);\n        }\n\n        if(needsVerticalScrollBar) {\n            this.vbar\n                .on('.drag', null)\n                .call(onBarDrag);\n        }\n    }\n\n    // set scrollbox translation\n    this.setTranslate(translateX, translateY);\n};\n\n/**\n * If present, remove clip-path and scrollbars\n *\n * @method\n */\nScrollBox.prototype.disable = function disable() {\n    if(this.hbar || this.vbar) {\n        this.bg.attr({\n            width: 0,\n            height: 0\n        });\n        this.container\n            .on('wheel', null)\n            .on('.drag', null)\n            .call(Drawing.setClipUrl, null);\n        delete this._clipRect;\n    }\n\n    if(this.hbar) {\n        this.hbar.on('.drag', null);\n        this.hbar.remove();\n        delete this.hbar;\n        delete this._hbarXMin;\n        delete this._hbarTranslateMax;\n    }\n\n    if(this.vbar) {\n        this.vbar.on('.drag', null);\n        this.vbar.remove();\n        delete this.vbar;\n        delete this._vbarYMin;\n        delete this._vbarTranslateMax;\n    }\n};\n\n/**\n * Handles scroll box drag events\n *\n * @method\n */\nScrollBox.prototype._onBoxDrag = function _onBoxDrag() {\n    var translateX = this.translateX;\n    var translateY = this.translateY;\n\n    if(this.hbar) {\n        translateX -= d3.event.dx;\n    }\n\n    if(this.vbar) {\n        translateY -= d3.event.dy;\n    }\n\n    this.setTranslate(translateX, translateY);\n};\n\n/**\n * Handles scroll box wheel events\n *\n * @method\n */\nScrollBox.prototype._onBoxWheel = function _onBoxWheel() {\n    var translateX = this.translateX;\n    var translateY = this.translateY;\n\n    if(this.hbar) {\n        translateX += d3.event.deltaY;\n    }\n\n    if(this.vbar) {\n        translateY += d3.event.deltaY;\n    }\n\n    this.setTranslate(translateX, translateY);\n};\n\n/**\n * Handles scroll bar drag events\n *\n * @method\n */\nScrollBox.prototype._onBarDrag = function _onBarDrag() {\n    var translateX = this.translateX;\n    var translateY = this.translateY;\n\n    if(this.hbar) {\n        var xMin = translateX + this._hbarXMin;\n        var xMax = xMin + this._hbarTranslateMax;\n        var x = Lib.constrain(d3.event.x, xMin, xMax);\n        var xf = (x - xMin) / (xMax - xMin);\n\n        var translateXMax = this.position.w - this._box.w;\n\n        translateX = xf * translateXMax;\n    }\n\n    if(this.vbar) {\n        var yMin = translateY + this._vbarYMin;\n        var yMax = yMin + this._vbarTranslateMax;\n        var y = Lib.constrain(d3.event.y, yMin, yMax);\n        var yf = (y - yMin) / (yMax - yMin);\n\n        var translateYMax = this.position.h - this._box.h;\n\n        translateY = yf * translateYMax;\n    }\n\n    this.setTranslate(translateX, translateY);\n};\n\n/**\n * Set clip path and scroll bar translate transform\n *\n * @method\n * @param {number}  [translateX=0]  Horizontal offset (in pixels)\n * @param {number}  [translateY=0]  Vertical offset (in pixels)\n */\nScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY) {\n    // store translateX and translateY (needed by mouse event handlers)\n    var translateXMax = this.position.w - this._box.w;\n    var translateYMax = this.position.h - this._box.h;\n\n    translateX = Lib.constrain(translateX || 0, 0, translateXMax);\n    translateY = Lib.constrain(translateY || 0, 0, translateYMax);\n\n    this.translateX = translateX;\n    this.translateY = translateY;\n\n    this.container.call(Drawing.setTranslate,\n        this._box.l - this.position.l - translateX,\n        this._box.t - this.position.t - translateY);\n\n    if(this._clipRect) {\n        this._clipRect.attr({\n            x: Math.floor(this.position.l + translateX - 0.5),\n            y: Math.floor(this.position.t + translateY - 0.5)\n        });\n    }\n\n    if(this.hbar) {\n        var xf = translateX / translateXMax;\n\n        this.hbar.call(Drawing.setTranslate,\n            translateX + xf * this._hbarTranslateMax,\n            translateY);\n    }\n\n    if(this.vbar) {\n        var yf = translateY / translateYMax;\n\n        this.vbar.call(Drawing.setTranslate,\n            translateX,\n            translateY + yf * this._vbarTranslateMax);\n    }\n};\n\n},{\"../../lib\":703,\"../color\":580,\"../drawing\":601,\"d3\":157}],675:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// fraction of some size to get to a named position\nmodule.exports = {\n    // from bottom left: this is the origin of our paper-reference\n    // positioning system\n    FROM_BL: {\n        left: 0,\n        center: 0.5,\n        right: 1,\n        bottom: 0,\n        middle: 0.5,\n        top: 1\n    },\n    // from top left: this is the screen pixel positioning origin\n    FROM_TL: {\n        left: 0,\n        center: 0.5,\n        right: 1,\n        bottom: 1,\n        middle: 0.5,\n        top: 0\n    },\n    // from bottom right: sometimes you just need the opposite of ^^\n    FROM_BR: {\n        left: 1,\n        center: 0.5,\n        right: 0,\n        bottom: 0,\n        middle: 0.5,\n        top: 1\n    },\n    // multiple of fontSize to get the vertical offset between lines\n    LINE_SPACING: 1.3,\n\n    // multiple of fontSize to shift from the baseline\n    // to the cap (captical letter) line\n    // (to use when we don't calculate this shift from Drawing.bBox)\n    // This is an approximation since in reality cap height can differ\n    // from font to font. However, according to Wikipedia\n    //   an \"average\" font might have a cap height of 70% of the em\n    // https://en.wikipedia.org/wiki/Em_(typography)#History\n    CAP_SHIFT: 0.70,\n\n    // half the cap height (distance between baseline and cap line)\n    // of an \"average\" font (for more info see above).\n    MID_SHIFT: 0.35,\n\n    OPPOSITE_SIDE: {\n        left: 'right',\n        right: 'left',\n        top: 'bottom',\n        bottom: 'top'\n    }\n};\n\n},{}],676:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    COMPARISON_OPS: ['=', '!=', '<', '>=', '>', '<='],\n    COMPARISON_OPS2: ['=', '<', '>=', '>', '<='],\n    INTERVAL_OPS: ['[]', '()', '[)', '(]', '][', ')(', '](', ')['],\n    SET_OPS: ['{}', '}{'],\n    CONSTRAINT_REDUCTION: {\n        // for contour constraints, open/closed endpoints are equivalent\n        '=': '=',\n\n        '<': '<',\n        '<=': '<',\n\n        '>': '>',\n        '>=': '>',\n\n        '[]': '[]',\n        '()': '[]',\n        '[)': '[]',\n        '(]': '[]',\n\n        '][': '][',\n        ')(': '][',\n        '](': '][',\n        ')[': ']['\n    }\n};\n\n},{}],677:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    solid: [[], 0],\n    dot: [[0.5, 1], 200],\n    dash: [[0.5, 1], 50],\n    longdash: [[0.5, 1], 10],\n    dashdot: [[0.5, 0.625, 0.875, 1], 50],\n    longdashdot: [[0.5, 0.7, 0.8, 1], 10]\n};\n\n},{}],678:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    circle: '●',\n    'circle-open': '○',\n    square: '■',\n    'square-open': '□',\n    diamond: '◆',\n    'diamond-open': '◇',\n    cross: '+',\n    x: '❌'\n};\n\n},{}],679:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    /**\n     * Timing information for interactive elements\n     */\n    SHOW_PLACEHOLDER: 100,\n    HIDE_PLACEHOLDER: 1000,\n\n    // ms between first mousedown and 2nd mouseup to constitute dblclick...\n    // we don't seem to have access to the system setting\n    DBLCLICKDELAY: 300,\n\n    // opacity dimming fraction for points that are not in selection\n    DESELECTDIM: 0.2\n};\n\n},{}],680:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    /**\n     * Standardize all missing data in calcdata to use undefined\n     * never null or NaN.\n     * That way we can use !==undefined, or !== BADNUM,\n     * to test for real data\n     */\n    BADNUM: undefined,\n\n    /*\n     * Limit certain operations to well below floating point max value\n     * to avoid glitches: Make sure that even when you multiply it by the\n     * number of pixels on a giant screen it still works\n     */\n    FP_SAFE: Number.MAX_VALUE / 10000,\n\n    /*\n     * conversion of date units to milliseconds\n     * year and month constants are marked \"AVG\"\n     * to remind us that not all years and months\n     * have the same length\n     */\n    ONEAVGYEAR: 31557600000, // 365.25 days\n    ONEAVGMONTH: 2629800000, // 1/12 of ONEAVGYEAR\n    ONEDAY: 86400000,\n    ONEHOUR: 3600000,\n    ONEMIN: 60000,\n    ONESEC: 1000,\n\n    /*\n     * For fast conversion btwn world calendars and epoch ms, the Julian Day Number\n     * of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD()\n     */\n    EPOCHJD: 2440587.5,\n\n    /*\n     * Are two values nearly equal? Compare to 1PPM\n     */\n    ALMOST_EQUAL: 1 - 1e-6,\n\n    /*\n     * If we're asked to clip a non-positive log value, how far off-screen\n     * do we put it?\n     */\n    LOG_CLIP: 10,\n\n    /*\n     * not a number, but for displaying numbers: the \"minus sign\" symbol is\n     * wider than the regular ascii dash \"-\"\n     */\n    MINUS_SIGN: '\\u2212'\n};\n\n},{}],681:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nexports.xmlns = 'http://www.w3.org/2000/xmlns/';\nexports.svg = 'http://www.w3.org/2000/svg';\nexports.xlink = 'http://www.w3.org/1999/xlink';\n\n// the 'old' d3 quirk got fix in v3.5.7\n// https://github.com/mbostock/d3/commit/a6f66e9dd37f764403fc7c1f26be09ab4af24fed\nexports.svgAttrs = {\n    xmlns: exports.svg,\n    'xmlns:xlink': exports.xlink\n};\n\n},{}],682:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// package version injected by `npm run preprocess`\nexports.version = '1.48.3';\n\n// inject promise polyfill\n_dereq_('es6-promise').polyfill();\n\n// inject plot css\n_dereq_('../build/plotcss');\n\n// inject default MathJax config\n_dereq_('./fonts/mathjax_config')();\n\n// include registry module and expose register method\nvar Registry = _dereq_('./registry');\nvar register = exports.register = Registry.register;\n\n// expose plot api methods\nvar plotApi = _dereq_('./plot_api');\nvar methodNames = Object.keys(plotApi);\nfor(var i = 0; i < methodNames.length; i++) {\n    var name = methodNames[i];\n    // _ -> private API methods, but still registered for internal use\n    if(name.charAt(0) !== '_') exports[name] = plotApi[name];\n    register({\n        moduleType: 'apiMethod',\n        name: name,\n        fn: plotApi[name]\n    });\n}\n\n// scatter is the only trace included by default\nregister(_dereq_('./traces/scatter'));\n\n// register all registrable components modules\nregister([\n    _dereq_('./components/fx'),\n    _dereq_('./components/legend'),\n    _dereq_('./components/annotations'),\n    _dereq_('./components/annotations3d'),\n    _dereq_('./components/shapes'),\n    _dereq_('./components/images'),\n    _dereq_('./components/updatemenus'),\n    _dereq_('./components/sliders'),\n    _dereq_('./components/rangeslider'),\n    _dereq_('./components/rangeselector'),\n    _dereq_('./components/grid'),\n    _dereq_('./components/errorbars'),\n    _dereq_('./components/colorscale'),\n    _dereq_('./components/colorbar')\n]);\n\n// locales en and en-US are required for default behavior\nregister([\n    _dereq_('./locale-en'),\n    _dereq_('./locale-en-us')\n]);\n\n// plot icons\nexports.Icons = _dereq_('../build/ploticon');\n\n// unofficial 'beta' plot methods, use at your own risk\nexports.Plots = _dereq_('./plots/plots');\nexports.Fx = _dereq_('./components/fx');\nexports.Snapshot = _dereq_('./snapshot');\nexports.PlotSchema = _dereq_('./plot_api/plot_schema');\nexports.Queue = _dereq_('./lib/queue');\n\n// export d3 used in the bundle\nexports.d3 = _dereq_('d3');\n\n},{\"../build/plotcss\":1,\"../build/ploticon\":2,\"./components/annotations\":571,\"./components/annotations3d\":576,\"./components/colorbar\":586,\"./components/colorscale\":592,\"./components/errorbars\":607,\"./components/fx\":619,\"./components/grid\":623,\"./components/images\":628,\"./components/legend\":636,\"./components/rangeselector\":647,\"./components/rangeslider\":654,\"./components/shapes\":662,\"./components/sliders\":667,\"./components/updatemenus\":673,\"./fonts/mathjax_config\":683,\"./lib/queue\":718,\"./locale-en\":732,\"./locale-en-us\":731,\"./plot_api\":736,\"./plot_api/plot_schema\":740,\"./plots/plots\":812,\"./registry\":831,\"./snapshot\":836,\"./traces/scatter\":1086,\"d3\":157,\"es6-promise\":213}],683:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/* global MathJax:false */\n\nmodule.exports = function() {\n    if(typeof MathJax !== 'undefined') {\n        var globalConfig = (window.PlotlyConfig || {}).MathJaxConfig !== 'local';\n\n        if(globalConfig) {\n            MathJax.Hub.Config({\n                messageStyle: 'none',\n                skipStartupTypeset: true,\n                displayAlign: 'left',\n                tex2jax: {\n                    inlineMath: [['$', '$'], ['\\\\(', '\\\\)']]\n                }\n            });\n            MathJax.Hub.Configured();\n        }\n    }\n};\n\n},{}],684:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n/**\n * Determine the position anchor property of x/y xanchor/yanchor components.\n *\n * - values < 1/3 align the low side at that fraction,\n * - values [1/3, 2/3] align the center at that fraction,\n * - values > 2/3 align the right at that fraction.\n */\n\n\nexports.isLeftAnchor = function isLeftAnchor(opts) {\n    return (\n      opts.xanchor === 'left' ||\n      (opts.xanchor === 'auto' && opts.x <= 1 / 3)\n    );\n};\n\nexports.isCenterAnchor = function isCenterAnchor(opts) {\n    return (\n        opts.xanchor === 'center' ||\n        (opts.xanchor === 'auto' && opts.x > 1 / 3 && opts.x < 2 / 3)\n    );\n};\n\nexports.isRightAnchor = function isRightAnchor(opts) {\n    return (\n      opts.xanchor === 'right' ||\n      (opts.xanchor === 'auto' && opts.x >= 2 / 3)\n    );\n};\n\nexports.isTopAnchor = function isTopAnchor(opts) {\n    return (\n        opts.yanchor === 'top' ||\n        (opts.yanchor === 'auto' && opts.y >= 2 / 3)\n    );\n};\n\nexports.isMiddleAnchor = function isMiddleAnchor(opts) {\n    return (\n        opts.yanchor === 'middle' ||\n        (opts.yanchor === 'auto' && opts.y > 1 / 3 && opts.y < 2 / 3)\n    );\n};\n\nexports.isBottomAnchor = function isBottomAnchor(opts) {\n    return (\n      opts.yanchor === 'bottom' ||\n      (opts.yanchor === 'auto' && opts.y <= 1 / 3)\n    );\n};\n\n},{}],685:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar modModule = _dereq_('./mod');\nvar mod = modModule.mod;\nvar modHalf = modModule.modHalf;\n\nvar PI = Math.PI;\nvar twoPI = 2 * PI;\n\nfunction deg2rad(deg) { return deg / 180 * PI; }\n\nfunction rad2deg(rad) { return rad / PI * 180; }\n\n/**\n * is sector a full circle?\n * ... this comes up a lot in SVG path-drawing routines\n *\n * N.B. we consider all sectors that span more that 2pi 'full' circles\n *\n * @param {2-item array} aBnds : angular bounds in *radians*\n * @return {boolean}\n */\nfunction isFullCircle(aBnds) {\n    return Math.abs(aBnds[1] - aBnds[0]) > twoPI - 1e-14;\n}\n\n/**\n * angular delta between angle 'a' and 'b'\n * solution taken from: https://stackoverflow.com/a/2007279\n *\n * @param {number} a : first angle in *radians*\n * @param {number} b : second angle in *radians*\n * @return {number} angular delta in *radians*\n */\nfunction angleDelta(a, b) {\n    return modHalf(b - a, twoPI);\n}\n\n/**\n * angular distance between angle 'a' and 'b'\n *\n * @param {number} a : first angle in *radians*\n * @param {number} b : second angle in *radians*\n * @return {number} angular distance in *radians*\n */\nfunction angleDist(a, b) {\n    return Math.abs(angleDelta(a, b));\n}\n\n/**\n * is angle inside sector?\n *\n * @param {number} a : angle to test in *radians*\n * @param {2-item array} aBnds : sector's angular bounds in *radians*\n * @param {boolean}\n */\nfunction isAngleInsideSector(a, aBnds) {\n    if(isFullCircle(aBnds)) return true;\n\n    var s0, s1;\n\n    if(aBnds[0] < aBnds[1]) {\n        s0 = aBnds[0];\n        s1 = aBnds[1];\n    } else {\n        s0 = aBnds[1];\n        s1 = aBnds[0];\n    }\n\n    s0 = mod(s0, twoPI);\n    s1 = mod(s1, twoPI);\n    if(s0 > s1) s1 += twoPI;\n\n    var a0 = mod(a, twoPI);\n    var a1 = a0 + twoPI;\n\n    return (a0 >= s0 && a0 <= s1) || (a1 >= s0 && a1 <= s1);\n}\n\n/**\n * is pt (r,a) inside sector?\n *\n * @param {number} r : pt's radial coordinate\n * @param {number} a : pt's angular coordinate in *radians*\n * @param {2-item array} rBnds : sector's radial bounds\n * @param {2-item array} aBnds : sector's angular bounds in *radians*\n * @return {boolean}\n */\nfunction isPtInsideSector(r, a, rBnds, aBnds) {\n    if(!isAngleInsideSector(a, aBnds)) return false;\n\n    var r0, r1;\n\n    if(rBnds[0] < rBnds[1]) {\n        r0 = rBnds[0];\n        r1 = rBnds[1];\n    } else {\n        r0 = rBnds[1];\n        r1 = rBnds[0];\n    }\n\n    return r >= r0 && r <= r1;\n}\n\n// common to pathArc, pathSector and pathAnnulus\nfunction _path(r0, r1, a0, a1, cx, cy, isClosed) {\n    cx = cx || 0;\n    cy = cy || 0;\n\n    var isCircle = isFullCircle([a0, a1]);\n    var aStart, aMid, aEnd;\n    var rStart, rEnd;\n\n    if(isCircle) {\n        aStart = 0;\n        aMid = PI;\n        aEnd = twoPI;\n    } else {\n        if(a0 < a1) {\n            aStart = a0;\n            aEnd = a1;\n        } else {\n            aStart = a1;\n            aEnd = a0;\n        }\n    }\n\n    if(r0 < r1) {\n        rStart = r0;\n        rEnd = r1;\n    } else {\n        rStart = r1;\n        rEnd = r0;\n    }\n\n    // N.B. svg coordinates here, where y increases downward\n    function pt(r, a) {\n        return [r * Math.cos(a) + cx, cy - r * Math.sin(a)];\n    }\n\n    var largeArc = Math.abs(aEnd - aStart) <= PI ? 0 : 1;\n    function arc(r, a, cw) {\n        return 'A' + [r, r] + ' ' + [0, largeArc, cw] + ' ' + pt(r, a);\n    }\n\n    var p;\n\n    if(isCircle) {\n        if(rStart === null) {\n            p = 'M' + pt(rEnd, aStart) +\n                arc(rEnd, aMid, 0) +\n                arc(rEnd, aEnd, 0) + 'Z';\n        } else {\n            p = 'M' + pt(rStart, aStart) +\n                arc(rStart, aMid, 0) +\n                arc(rStart, aEnd, 0) + 'Z' +\n                'M' + pt(rEnd, aStart) +\n                arc(rEnd, aMid, 1) +\n                arc(rEnd, aEnd, 1) + 'Z';\n        }\n    } else {\n        if(rStart === null) {\n            p = 'M' + pt(rEnd, aStart) + arc(rEnd, aEnd, 0);\n            if(isClosed) p += 'L0,0Z';\n        } else {\n            p = 'M' + pt(rStart, aStart) +\n                'L' + pt(rEnd, aStart) +\n                arc(rEnd, aEnd, 0) +\n                'L' + pt(rStart, aEnd) +\n                arc(rStart, aStart, 1) + 'Z';\n        }\n    }\n\n    return p;\n}\n\n/**\n * path an arc\n *\n * @param {number} r : radius\n * @param {number} a0 : first angular coordinate in *radians*\n * @param {number} a1 : second angular coordinate in *radians*\n * @param {number (optional)} cx : x coordinate of center\n * @param {number (optional)} cy : y coordinate of center\n * @return {string} svg path\n */\nfunction pathArc(r, a0, a1, cx, cy) {\n    return _path(null, r, a0, a1, cx, cy, 0);\n}\n\n/**\n * path a sector\n *\n * @param {number} r : radius\n * @param {number} a0 : first angular coordinate in *radians*\n * @param {number} a1 : second angular coordinate in *radians*\n * @param {number (optional)} cx : x coordinate of center\n * @param {number (optional)} cy : y coordinate of center\n * @return {string} svg path\n */\nfunction pathSector(r, a0, a1, cx, cy) {\n    return _path(null, r, a0, a1, cx, cy, 1);\n}\n\n/**\n * path an annulus\n *\n * @param {number} r0 : first radial coordinate\n * @param {number} r1 : second radial coordinate\n * @param {number} a0 : first angular coordinate in *radians*\n * @param {number} a1 : second angular coordinate in *radians*\n * @param {number (optional)} cx : x coordinate of center\n * @param {number (optional)} cy : y coordinate of center\n * @return {string} svg path\n */\nfunction pathAnnulus(r0, r1, a0, a1, cx, cy) {\n    return _path(r0, r1, a0, a1, cx, cy, 1);\n}\n\nmodule.exports = {\n    deg2rad: deg2rad,\n    rad2deg: rad2deg,\n    angleDelta: angleDelta,\n    angleDist: angleDist,\n    isFullCircle: isFullCircle,\n    isAngleInsideSector: isAngleInsideSector,\n    isPtInsideSector: isPtInsideSector,\n    pathArc: pathArc,\n    pathSector: pathSector,\n    pathAnnulus: pathAnnulus\n};\n\n},{\"./mod\":710}],686:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArray = Array.isArray;\n\n// IE9 fallbacks\n\nvar ab = (typeof ArrayBuffer === 'undefined' || !ArrayBuffer.isView) ?\n    {isView: function() { return false; }} :\n    ArrayBuffer;\n\nvar dv = (typeof DataView === 'undefined') ?\n    function() {} :\n    DataView;\n\nfunction isTypedArray(a) {\n    return ab.isView(a) && !(a instanceof dv);\n}\nexports.isTypedArray = isTypedArray;\n\nfunction isArrayOrTypedArray(a) {\n    return isArray(a) || isTypedArray(a);\n}\nexports.isArrayOrTypedArray = isArrayOrTypedArray;\n\n/*\n * Test whether an input object is 1D.\n *\n * Assumes we already know the object is an array.\n *\n * Looks only at the first element, if the dimensionality is\n * not consistent we won't figure that out here.\n */\nfunction isArray1D(a) {\n    return !isArrayOrTypedArray(a[0]);\n}\nexports.isArray1D = isArray1D;\n\n/*\n * Ensures an array has the right amount of storage space. If it doesn't\n * exist, it creates an array. If it does exist, it returns it if too\n * short or truncates it in-place.\n *\n * The goal is to just reuse memory to avoid a bit of excessive garbage\n * collection.\n */\nexports.ensureArray = function(out, n) {\n    // TODO: typed array support here? This is only used in\n    // traces/carpet/compute_control_points\n    if(!isArray(out)) out = [];\n\n    // If too long, truncate. (If too short, it will grow\n    // automatically so we don't care about that case)\n    out.length = n;\n\n    return out;\n};\n\n/*\n * TypedArray-compatible concatenation of n arrays\n * if all arrays are the same type it will preserve that type,\n * otherwise it falls back on Array.\n * Also tries to avoid copying, in case one array has zero length\n * But never mutates an existing array\n */\nexports.concat = function() {\n    var args = [];\n    var allArray = true;\n    var totalLen = 0;\n\n    var _constructor, arg0, i, argi, posi, leni, out, j;\n\n    for(i = 0; i < arguments.length; i++) {\n        argi = arguments[i];\n        leni = argi.length;\n        if(leni) {\n            if(arg0) args.push(argi);\n            else {\n                arg0 = argi;\n                posi = leni;\n            }\n\n            if(isArray(argi)) {\n                _constructor = false;\n            } else {\n                allArray = false;\n                if(!totalLen) {\n                    _constructor = argi.constructor;\n                } else if(_constructor !== argi.constructor) {\n                    // TODO: in principle we could upgrade here,\n                    // ie keep typed array but convert all to Float64Array?\n                    _constructor = false;\n                }\n            }\n\n            totalLen += leni;\n        }\n    }\n\n    if(!totalLen) return [];\n    if(!args.length) return arg0;\n\n    if(allArray) return arg0.concat.apply(arg0, args);\n    if(_constructor) {\n        // matching typed arrays\n        out = new _constructor(totalLen);\n        out.set(arg0);\n        for(i = 0; i < args.length; i++) {\n            argi = args[i];\n            out.set(argi, posi);\n            posi += argi.length;\n        }\n        return out;\n    }\n\n    // mismatched types or Array + typed\n    out = new Array(totalLen);\n    for(j = 0; j < arg0.length; j++) out[j] = arg0[j];\n    for(i = 0; i < args.length; i++) {\n        argi = args[i];\n        for(j = 0; j < argi.length; j++) out[posi + j] = argi[j];\n        posi += j;\n    }\n    return out;\n};\n\nexports.maxRowLength = function(z) {\n    return _rowLength(z, Math.max, 0);\n};\n\nexports.minRowLength = function(z) {\n    return _rowLength(z, Math.min, Infinity);\n};\n\nfunction _rowLength(z, fn, len0) {\n    if(isArrayOrTypedArray(z)) {\n        if(isArrayOrTypedArray(z[0])) {\n            var len = len0;\n            for(var i = 0; i < z.length; i++) {\n                len = fn(len, z[i].length);\n            }\n            return len;\n        } else {\n            return z.length;\n        }\n    }\n    return 0;\n}\n\n},{}],687:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar BADNUM = _dereq_('../constants/numerical').BADNUM;\n\n// precompile for speed\nvar JUNK = /^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;\n\n/**\n * cleanNumber: remove common leading and trailing cruft\n * Always returns either a number or BADNUM.\n */\nmodule.exports = function cleanNumber(v) {\n    if(typeof v === 'string') {\n        v = v.replace(JUNK, '');\n    }\n\n    if(isNumeric(v)) return Number(v);\n\n    return BADNUM;\n};\n\n},{\"../constants/numerical\":680,\"fast-isnumeric\":224}],688:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Clear gl frame (if any). This is a common pattern as\n * we usually set `preserveDrawingBuffer: true` during\n * gl context creation (e.g. via `reglUtils.prepare`).\n *\n * @param {DOM node or object} gd : graph div object\n */\nmodule.exports = function clearGlCanvases(gd) {\n    var fullLayout = gd._fullLayout;\n\n    if(fullLayout._glcanvas && fullLayout._glcanvas.size()) {\n        fullLayout._glcanvas.each(function(d) {\n            if(d.regl) d.regl.clear({color: true, depth: true});\n        });\n    }\n};\n\n},{}],689:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Clear responsive handlers (if any).\n *\n * @param {DOM node or object} gd : graph div object\n */\nmodule.exports = function clearResponsive(gd) {\n    if(gd._responsiveChartHandler) {\n        window.removeEventListener('resize', gd._responsiveChartHandler);\n        delete gd._responsiveChartHandler;\n    }\n};\n\n},{}],690:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar baseTraceAttrs = _dereq_('../plots/attributes');\nvar colorscales = _dereq_('../components/colorscale/scales');\nvar DESELECTDIM = _dereq_('../constants/interactions').DESELECTDIM;\n\nvar nestedProperty = _dereq_('./nested_property');\nvar counterRegex = _dereq_('./regex').counter;\nvar modHalf = _dereq_('./mod').modHalf;\nvar isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;\n\nexports.valObjectMeta = {\n    data_array: {\n        // You can use *dflt=[] to force said array to exist though.\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            // TODO maybe `v: {type: 'float32', vals: [/* ... */]}` also\n            if(isArrayOrTypedArray(v)) propOut.set(v);\n            else if(dflt !== undefined) propOut.set(dflt);\n        }\n    },\n    enumerated: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            if(opts.coerceNumber) v = +v;\n            if(opts.values.indexOf(v) === -1) propOut.set(dflt);\n            else propOut.set(v);\n        },\n        validateFunction: function(v, opts) {\n            if(opts.coerceNumber) v = +v;\n\n            var values = opts.values;\n            for(var i = 0; i < values.length; i++) {\n                var k = String(values[i]);\n\n                if((k.charAt(0) === '/' && k.charAt(k.length - 1) === '/')) {\n                    var regex = new RegExp(k.substr(1, k.length - 2));\n                    if(regex.test(v)) return true;\n                } else if(v === values[i]) return true;\n            }\n            return false;\n        }\n    },\n    'boolean': {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            if(v === true || v === false) propOut.set(v);\n            else propOut.set(dflt);\n        }\n    },\n    number: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            if(!isNumeric(v) ||\n                    (opts.min !== undefined && v < opts.min) ||\n                    (opts.max !== undefined && v > opts.max)) {\n                propOut.set(dflt);\n            } else propOut.set(+v);\n        }\n    },\n    integer: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            if(v % 1 || !isNumeric(v) ||\n                    (opts.min !== undefined && v < opts.min) ||\n                    (opts.max !== undefined && v > opts.max)) {\n                propOut.set(dflt);\n            } else propOut.set(+v);\n        }\n    },\n    string: {\n        \n        \n        // TODO 'values shouldn't be in there (edge case: 'dash' in Scatter)\n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            if(typeof v !== 'string') {\n                var okToCoerce = (typeof v === 'number');\n\n                if(opts.strict === true || !okToCoerce) propOut.set(dflt);\n                else propOut.set(String(v));\n            } else if(opts.noBlank && !v) propOut.set(dflt);\n            else propOut.set(v);\n        }\n    },\n    color: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            if(tinycolor(v).isValid()) propOut.set(v);\n            else propOut.set(dflt);\n        }\n    },\n    colorlist: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            function isColor(color) {\n                return tinycolor(color).isValid();\n            }\n            if(!Array.isArray(v) || !v.length) propOut.set(dflt);\n            else if(v.every(isColor)) propOut.set(v);\n            else propOut.set(dflt);\n        }\n    },\n    colorscale: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            propOut.set(colorscales.get(v, dflt));\n        }\n    },\n    angle: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            if(v === 'auto') propOut.set('auto');\n            else if(!isNumeric(v)) propOut.set(dflt);\n            else propOut.set(modHalf(+v, 360));\n        }\n    },\n    subplotid: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            var regex = opts.regex || counterRegex(dflt);\n            if(typeof v === 'string' && regex.test(v)) {\n                propOut.set(v);\n                return;\n            }\n            propOut.set(dflt);\n        },\n        validateFunction: function(v, opts) {\n            var dflt = opts.dflt;\n\n            if(v === dflt) return true;\n            if(typeof v !== 'string') return false;\n            if(counterRegex(dflt).test(v)) return true;\n\n            return false;\n        }\n    },\n    flaglist: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            if(typeof v !== 'string') {\n                propOut.set(dflt);\n                return;\n            }\n            if((opts.extras || []).indexOf(v) !== -1) {\n                propOut.set(v);\n                return;\n            }\n            var vParts = v.split('+');\n            var i = 0;\n            while(i < vParts.length) {\n                var vi = vParts[i];\n                if(opts.flags.indexOf(vi) === -1 || vParts.indexOf(vi) < i) {\n                    vParts.splice(i, 1);\n                } else i++;\n            }\n            if(!vParts.length) propOut.set(dflt);\n            else propOut.set(vParts.join('+'));\n        }\n    },\n    any: {\n        \n        \n        \n        coerceFunction: function(v, propOut, dflt) {\n            if(v === undefined) propOut.set(dflt);\n            else propOut.set(v);\n        }\n    },\n    info_array: {\n        \n        \n        // set `dimensions=2` for a 2D array or '1-2' for either\n        // `items` may be a single object instead of an array, in which case\n        // `freeLength` must be true.\n        // if `dimensions='1-2'` and items is a 1D array, then the value can\n        // either be a matching 1D array or an array of such matching 1D arrays\n        \n        coerceFunction: function(v, propOut, dflt, opts) {\n            // simplified coerce function just for array items\n            function coercePart(v, opts, dflt) {\n                var out;\n                var propPart = {set: function(v) { out = v; }};\n\n                if(dflt === undefined) dflt = opts.dflt;\n\n                exports.valObjectMeta[opts.valType].coerceFunction(v, propPart, dflt, opts);\n\n                return out;\n            }\n\n            var twoD = opts.dimensions === 2 || (opts.dimensions === '1-2' && Array.isArray(v) && Array.isArray(v[0]));\n\n            if(!Array.isArray(v)) {\n                propOut.set(dflt);\n                return;\n            }\n\n            var items = opts.items;\n            var vOut = [];\n            var arrayItems = Array.isArray(items);\n            var arrayItems2D = arrayItems && twoD && Array.isArray(items[0]);\n            var innerItemsOnly = twoD && arrayItems && !arrayItems2D;\n            var len = (arrayItems && !innerItemsOnly) ? items.length : v.length;\n\n            var i, j, row, item, len2, vNew;\n\n            dflt = Array.isArray(dflt) ? dflt : [];\n\n            if(twoD) {\n                for(i = 0; i < len; i++) {\n                    vOut[i] = [];\n                    row = Array.isArray(v[i]) ? v[i] : [];\n                    if(innerItemsOnly) len2 = items.length;\n                    else if(arrayItems) len2 = items[i].length;\n                    else len2 = row.length;\n\n                    for(j = 0; j < len2; j++) {\n                        if(innerItemsOnly) item = items[j];\n                        else if(arrayItems) item = items[i][j];\n                        else item = items;\n\n                        vNew = coercePart(row[j], item, (dflt[i] || [])[j]);\n                        if(vNew !== undefined) vOut[i][j] = vNew;\n                    }\n                }\n            } else {\n                for(i = 0; i < len; i++) {\n                    vNew = coercePart(v[i], arrayItems ? items[i] : items, dflt[i]);\n                    if(vNew !== undefined) vOut[i] = vNew;\n                }\n            }\n\n            propOut.set(vOut);\n        },\n        validateFunction: function(v, opts) {\n            if(!Array.isArray(v)) return false;\n\n            var items = opts.items;\n            var arrayItems = Array.isArray(items);\n            var twoD = opts.dimensions === 2;\n\n            // when free length is off, input and declared lengths must match\n            if(!opts.freeLength && v.length !== items.length) return false;\n\n            // valid when all input items are valid\n            for(var i = 0; i < v.length; i++) {\n                if(twoD) {\n                    if(!Array.isArray(v[i]) || (!opts.freeLength && v[i].length !== items[i].length)) {\n                        return false;\n                    }\n                    for(var j = 0; j < v[i].length; j++) {\n                        if(!validate(v[i][j], arrayItems ? items[i][j] : items)) {\n                            return false;\n                        }\n                    }\n                } else if(!validate(v[i], arrayItems ? items[i] : items)) return false;\n            }\n\n            return true;\n        }\n    }\n};\n\n/**\n * Ensures that container[attribute] has a valid value.\n *\n * attributes[attribute] is an object with possible keys:\n * - valType: data_array, enumerated, boolean, ... as in valObjectMeta\n * - values: (enumerated only) array of allowed vals\n * - min, max: (number, integer only) inclusive bounds on allowed vals\n *      either or both may be omitted\n * - dflt: if attribute is invalid or missing, use this default\n *      if dflt is provided as an argument to lib.coerce it takes precedence\n *      as a convenience, returns the value it finally set\n */\nexports.coerce = function(containerIn, containerOut, attributes, attribute, dflt) {\n    var opts = nestedProperty(attributes, attribute).get();\n    var propIn = nestedProperty(containerIn, attribute);\n    var propOut = nestedProperty(containerOut, attribute);\n    var v = propIn.get();\n\n    var template = containerOut._template;\n    if(v === undefined && template) {\n        v = nestedProperty(template, attribute).get();\n        // already used the template value, so short-circuit the second check\n        template = 0;\n    }\n\n    if(dflt === undefined) dflt = opts.dflt;\n\n    /**\n     * arrayOk: value MAY be an array, then we do no value checking\n     * at this point, because it can be more complicated than the\n     * individual form (eg. some array vals can be numbers, even if the\n     * single values must be color strings)\n     */\n    if(opts.arrayOk && isArrayOrTypedArray(v)) {\n        propOut.set(v);\n        return v;\n    }\n\n    var coerceFunction = exports.valObjectMeta[opts.valType].coerceFunction;\n    coerceFunction(v, propOut, dflt, opts);\n\n    var out = propOut.get();\n    // in case v was provided but invalid, try the template again so it still\n    // overrides the regular default\n    if(template && out === dflt && !validate(v, opts)) {\n        v = nestedProperty(template, attribute).get();\n        coerceFunction(v, propOut, dflt, opts);\n        out = propOut.get();\n    }\n    return out;\n};\n\n/**\n * Variation on coerce\n *\n * Uses coerce to get attribute value if user input is valid,\n * returns attribute default if user input it not valid or\n * returns false if there is no user input.\n */\nexports.coerce2 = function(containerIn, containerOut, attributes, attribute, dflt) {\n    var propIn = nestedProperty(containerIn, attribute);\n    var propOut = exports.coerce(containerIn, containerOut, attributes, attribute, dflt);\n    var valIn = propIn.get();\n\n    return (valIn !== undefined && valIn !== null) ? propOut : false;\n};\n\n/*\n * Shortcut to coerce the three font attributes\n *\n * 'coerce' is a lib.coerce wrapper with implied first three arguments\n */\nexports.coerceFont = function(coerce, attr, dfltObj) {\n    var out = {};\n\n    dfltObj = dfltObj || {};\n\n    out.family = coerce(attr + '.family', dfltObj.family);\n    out.size = coerce(attr + '.size', dfltObj.size);\n    out.color = coerce(attr + '.color', dfltObj.color);\n\n    return out;\n};\n\n/** Coerce shortcut for 'hoverinfo'\n * handling 1-vs-multi-trace dflt logic\n *\n * @param {object} traceIn : user trace object\n * @param {object} traceOut : full trace object (requires _module ref)\n * @param {object} layoutOut : full layout object (require _dataLength ref)\n * @return {any} : the coerced value\n */\nexports.coerceHoverinfo = function(traceIn, traceOut, layoutOut) {\n    var moduleAttrs = traceOut._module.attributes;\n    var attrs = moduleAttrs.hoverinfo ? moduleAttrs : baseTraceAttrs;\n\n    var valObj = attrs.hoverinfo;\n    var dflt;\n\n    if(layoutOut._dataLength === 1) {\n        var flags = valObj.dflt === 'all' ?\n            valObj.flags.slice() :\n            valObj.dflt.split('+');\n\n        flags.splice(flags.indexOf('name'), 1);\n        dflt = flags.join('+');\n    }\n\n    return exports.coerce(traceIn, traceOut, attrs, 'hoverinfo', dflt);\n};\n\n/** Coerce shortcut for [un]selected.marker.opacity,\n *  which has special default logic, to ensure that it corresponds to the\n *  default selection behavior while allowing to be overtaken by any other\n *  [un]selected attribute.\n *\n *  N.B. This must be called *after* coercing all the other [un]selected attrs,\n *  to give the intended result.\n *\n * @param {object} traceOut : fullData item\n * @param {function} coerce : lib.coerce wrapper with implied first three arguments\n */\nexports.coerceSelectionMarkerOpacity = function(traceOut, coerce) {\n    if(!traceOut.marker) return;\n\n    var mo = traceOut.marker.opacity;\n    // you can still have a `marker` container with no markers if there's text\n    if(mo === undefined) return;\n\n    var smoDflt;\n    var usmoDflt;\n\n    // Don't give [un]selected.marker.opacity a default value if\n    // marker.opacity is an array: handle this during style step.\n    //\n    // Only give [un]selected.marker.opacity a default value if you don't\n    // set any other [un]selected attributes.\n    if(!isArrayOrTypedArray(mo) && !traceOut.selected && !traceOut.unselected) {\n        smoDflt = mo;\n        usmoDflt = DESELECTDIM * mo;\n    }\n\n    coerce('selected.marker.opacity', smoDflt);\n    coerce('unselected.marker.opacity', usmoDflt);\n};\n\nfunction validate(value, opts) {\n    var valObjectDef = exports.valObjectMeta[opts.valType];\n\n    if(opts.arrayOk && isArrayOrTypedArray(value)) return true;\n\n    if(valObjectDef.validateFunction) {\n        return valObjectDef.validateFunction(value, opts);\n    }\n\n    var failed = {};\n    var out = failed;\n    var propMock = { set: function(v) { out = v; } };\n\n    // 'failed' just something mutable that won't be === anything else\n\n    valObjectDef.coerceFunction(value, propMock, failed, opts);\n    return out !== failed;\n}\nexports.validate = validate;\n\n},{\"../components/colorscale/scales\":595,\"../constants/interactions\":679,\"../plots/attributes\":748,\"./array\":686,\"./mod\":710,\"./nested_property\":711,\"./regex\":719,\"fast-isnumeric\":224,\"tinycolor2\":524}],691:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Loggers = _dereq_('./loggers');\nvar mod = _dereq_('./mod').mod;\n\nvar constants = _dereq_('../constants/numerical');\nvar BADNUM = constants.BADNUM;\nvar ONEDAY = constants.ONEDAY;\nvar ONEHOUR = constants.ONEHOUR;\nvar ONEMIN = constants.ONEMIN;\nvar ONESEC = constants.ONESEC;\nvar EPOCHJD = constants.EPOCHJD;\n\nvar Registry = _dereq_('../registry');\n\nvar utcFormat = d3.time.format.utc;\n\nvar DATETIME_REGEXP = /^\\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;\n// special regex for chinese calendars to support yyyy-mmi-dd etc for intercalary months\nvar DATETIME_REGEXP_CN = /^\\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;\n\n// for 2-digit years, the first year we map them onto\nvar YFIRST = new Date().getFullYear() - 70;\n\nfunction isWorldCalendar(calendar) {\n    return (\n        calendar &&\n        Registry.componentsRegistry.calendars &&\n        typeof calendar === 'string' && calendar !== 'gregorian'\n    );\n}\n\n/*\n * dateTick0: get the canonical tick for this calendar\n *\n * bool sunday is for week ticks, shift it to a Sunday.\n */\nexports.dateTick0 = function(calendar, sunday) {\n    if(isWorldCalendar(calendar)) {\n        return sunday ?\n            Registry.getComponentMethod('calendars', 'CANONICAL_SUNDAY')[calendar] :\n            Registry.getComponentMethod('calendars', 'CANONICAL_TICK')[calendar];\n    } else {\n        return sunday ? '2000-01-02' : '2000-01-01';\n    }\n};\n\n/*\n * dfltRange: for each calendar, give a valid default range\n */\nexports.dfltRange = function(calendar) {\n    if(isWorldCalendar(calendar)) {\n        return Registry.getComponentMethod('calendars', 'DFLTRANGE')[calendar];\n    } else {\n        return ['2000-01-01', '2001-01-01'];\n    }\n};\n\n// is an object a javascript date?\nexports.isJSDate = function(v) {\n    return typeof v === 'object' && v !== null && typeof v.getTime === 'function';\n};\n\n// The absolute limits of our date-time system\n// This is a little weird: we use MIN_MS and MAX_MS in dateTime2ms\n// but we use dateTime2ms to calculate them (after defining it!)\nvar MIN_MS, MAX_MS;\n\n/**\n * dateTime2ms - turn a date object or string s into milliseconds\n * (relative to 1970-01-01, per javascript standard)\n * optional calendar (string) to use a non-gregorian calendar\n *\n * Returns BADNUM if it doesn't find a date\n *\n * strings should have the form:\n *\n *    -?YYYY-mm-dd<sep>HH:MM:SS.sss<tzInfo>?\n *\n * <sep>: space (our normal standard) or T or t (ISO-8601)\n * <tzInfo>: Z, z, or [+\\-]HH:?MM and we THROW IT AWAY\n * this format comes from https://tools.ietf.org/html/rfc3339#section-5.6\n * but we allow it even with a space as the separator\n *\n * May truncate after any full field, and sss can be any length\n * even >3 digits, though javascript dates truncate to milliseconds,\n * we keep as much as javascript numeric precision can hold, but we only\n * report back up to 100 microsecond precision, because most dates support\n * this precision (close to 1970 support more, very far away support less)\n *\n * Expanded to support negative years to -9999 but you must always\n * give 4 digits, except for 2-digit positive years which we assume are\n * near the present time.\n * Note that we follow ISO 8601:2004: there *is* a year 0, which\n * is 1BC/BCE, and -1===2BC etc.\n *\n * World calendars: not all of these *have* agreed extensions to this full range,\n * if you have another calendar system but want a date range outside its validity,\n * you can use a gregorian date string prefixed with 'G' or 'g'.\n *\n * Where to cut off 2-digit years between 1900s and 2000s?\n * from http://support.microsoft.com/kb/244664:\n *   1930-2029 (the most retro of all...)\n * but in my mac chrome from eg. d=new Date(Date.parse('8/19/50')):\n *   1950-2049\n * by Java, from http://stackoverflow.com/questions/2024273/:\n *   now-80 - now+19\n * or FileMaker Pro, from\n *      http://www.filemaker.com/12help/html/add_view_data.4.21.html:\n *   now-70 - now+29\n * but python strptime etc, via\n *      http://docs.python.org/py3k/library/time.html:\n *   1969-2068 (super forward-looking, but static, not sliding!)\n *\n * lets go with now-70 to now+29, and if anyone runs into this problem\n * they can learn the hard way not to use 2-digit years, as no choice we\n * make now will cover all possibilities. mostly this will all be taken\n * care of in initial parsing, should only be an issue for hand-entered data\n * currently (2016) this range is:\n *   1946-2045\n */\nexports.dateTime2ms = function(s, calendar) {\n    // first check if s is a date object\n    if(exports.isJSDate(s)) {\n        // Convert to the UTC milliseconds that give the same\n        // hours as this date has in the local timezone\n        var tzOffset = s.getTimezoneOffset() * ONEMIN;\n        var offsetTweak = (s.getUTCMinutes() - s.getMinutes()) * ONEMIN +\n            (s.getUTCSeconds() - s.getSeconds()) * ONESEC +\n            (s.getUTCMilliseconds() - s.getMilliseconds());\n\n        if(offsetTweak) {\n            var comb = 3 * ONEMIN;\n            tzOffset = tzOffset - comb / 2 + mod(offsetTweak - tzOffset + comb / 2, comb);\n        }\n        s = Number(s) - tzOffset;\n        if(s >= MIN_MS && s <= MAX_MS) return s;\n        return BADNUM;\n    }\n    // otherwise only accept strings and numbers\n    if(typeof s !== 'string' && typeof s !== 'number') return BADNUM;\n\n    s = String(s);\n\n    var isWorld = isWorldCalendar(calendar);\n\n    // to handle out-of-range dates in international calendars, accept\n    // 'G' as a prefix to force the built-in gregorian calendar.\n    var s0 = s.charAt(0);\n    if(isWorld && (s0 === 'G' || s0 === 'g')) {\n        s = s.substr(1);\n        calendar = '';\n    }\n\n    var isChinese = isWorld && calendar.substr(0, 7) === 'chinese';\n\n    var match = s.match(isChinese ? DATETIME_REGEXP_CN : DATETIME_REGEXP);\n    if(!match) return BADNUM;\n    var y = match[1];\n    var m = match[3] || '1';\n    var d = Number(match[5] || 1);\n    var H = Number(match[7] || 0);\n    var M = Number(match[9] || 0);\n    var S = Number(match[11] || 0);\n\n    if(isWorld) {\n        // disallow 2-digit years for world calendars\n        if(y.length === 2) return BADNUM;\n        y = Number(y);\n\n        var cDate;\n        try {\n            var calInstance = Registry.getComponentMethod('calendars', 'getCal')(calendar);\n            if(isChinese) {\n                var isIntercalary = m.charAt(m.length - 1) === 'i';\n                m = parseInt(m, 10);\n                cDate = calInstance.newDate(y, calInstance.toMonthIndex(y, m, isIntercalary), d);\n            } else {\n                cDate = calInstance.newDate(y, Number(m), d);\n            }\n        } catch(e) { return BADNUM; } // Invalid ... date\n\n        if(!cDate) return BADNUM;\n\n        return ((cDate.toJD() - EPOCHJD) * ONEDAY) +\n            (H * ONEHOUR) + (M * ONEMIN) + (S * ONESEC);\n    }\n\n    if(y.length === 2) {\n        y = (Number(y) + 2000 - YFIRST) % 100 + YFIRST;\n    } else y = Number(y);\n\n    // new Date uses months from 0; subtract 1 here just so we\n    // don't have to do it again during the validity test below\n    m -= 1;\n\n    // javascript takes new Date(0..99,m,d) to mean 1900-1999, so\n    // to support years 0-99 we need to use setFullYear explicitly\n    // Note that 2000 is a leap year.\n    var date = new Date(Date.UTC(2000, m, d, H, M));\n    date.setUTCFullYear(y);\n\n    if(date.getUTCMonth() !== m) return BADNUM;\n    if(date.getUTCDate() !== d) return BADNUM;\n\n    return date.getTime() + S * ONESEC;\n};\n\nMIN_MS = exports.MIN_MS = exports.dateTime2ms('-9999');\nMAX_MS = exports.MAX_MS = exports.dateTime2ms('9999-12-31 23:59:59.9999');\n\n// is string s a date? (see above)\nexports.isDateTime = function(s, calendar) {\n    return (exports.dateTime2ms(s, calendar) !== BADNUM);\n};\n\n// pad a number with zeroes, to given # of digits before the decimal point\nfunction lpad(val, digits) {\n    return String(val + Math.pow(10, digits)).substr(1);\n}\n\n/**\n * Turn ms into string of the form YYYY-mm-dd HH:MM:SS.ssss\n * Crop any trailing zeros in time, except never stop right after hours\n * (we could choose to crop '-01' from date too but for now we always\n * show the whole date)\n * Optional range r is the data range that applies, also in ms.\n * If rng is big, the later parts of time will be omitted\n */\nvar NINETYDAYS = 90 * ONEDAY;\nvar THREEHOURS = 3 * ONEHOUR;\nvar FIVEMIN = 5 * ONEMIN;\nexports.ms2DateTime = function(ms, r, calendar) {\n    if(typeof ms !== 'number' || !(ms >= MIN_MS && ms <= MAX_MS)) return BADNUM;\n\n    if(!r) r = 0;\n\n    var msecTenths = Math.floor(mod(ms + 0.05, 1) * 10);\n    var msRounded = Math.round(ms - msecTenths / 10);\n    var dateStr, h, m, s, msec10, d;\n\n    if(isWorldCalendar(calendar)) {\n        var dateJD = Math.floor(msRounded / ONEDAY) + EPOCHJD;\n        var timeMs = Math.floor(mod(ms, ONEDAY));\n        try {\n            dateStr = Registry.getComponentMethod('calendars', 'getCal')(calendar)\n                .fromJD(dateJD).formatDate('yyyy-mm-dd');\n        } catch(e) {\n            // invalid date in this calendar - fall back to Gyyyy-mm-dd\n            dateStr = utcFormat('G%Y-%m-%d')(new Date(msRounded));\n        }\n\n        // yyyy does NOT guarantee 4-digit years. YYYY mostly does, but does\n        // other things for a few calendars, so we can't trust it. Just pad\n        // it manually (after the '-' if there is one)\n        if(dateStr.charAt(0) === '-') {\n            while(dateStr.length < 11) dateStr = '-0' + dateStr.substr(1);\n        } else {\n            while(dateStr.length < 10) dateStr = '0' + dateStr;\n        }\n\n        // TODO: if this is faster, we could use this block for extracting\n        // the time components of regular gregorian too\n        h = (r < NINETYDAYS) ? Math.floor(timeMs / ONEHOUR) : 0;\n        m = (r < NINETYDAYS) ? Math.floor((timeMs % ONEHOUR) / ONEMIN) : 0;\n        s = (r < THREEHOURS) ? Math.floor((timeMs % ONEMIN) / ONESEC) : 0;\n        msec10 = (r < FIVEMIN) ? (timeMs % ONESEC) * 10 + msecTenths : 0;\n    } else {\n        d = new Date(msRounded);\n\n        dateStr = utcFormat('%Y-%m-%d')(d);\n\n        // <90 days: add hours and minutes - never *only* add hours\n        h = (r < NINETYDAYS) ? d.getUTCHours() : 0;\n        m = (r < NINETYDAYS) ? d.getUTCMinutes() : 0;\n        // <3 hours: add seconds\n        s = (r < THREEHOURS) ? d.getUTCSeconds() : 0;\n        // <5 minutes: add ms (plus one extra digit, this is msec*10)\n        msec10 = (r < FIVEMIN) ? d.getUTCMilliseconds() * 10 + msecTenths : 0;\n    }\n\n    return includeTime(dateStr, h, m, s, msec10);\n};\n\n// For converting old-style milliseconds to date strings,\n// we use the local timezone rather than UTC like we use\n// everywhere else, both for backward compatibility and\n// because that's how people mostly use javasript date objects.\n// Clip one extra day off our date range though so we can't get\n// thrown beyond the range by the timezone shift.\nexports.ms2DateTimeLocal = function(ms) {\n    if(!(ms >= MIN_MS + ONEDAY && ms <= MAX_MS - ONEDAY)) return BADNUM;\n\n    var msecTenths = Math.floor(mod(ms + 0.05, 1) * 10);\n    var d = new Date(Math.round(ms - msecTenths / 10));\n    var dateStr = d3.time.format('%Y-%m-%d')(d);\n    var h = d.getHours();\n    var m = d.getMinutes();\n    var s = d.getSeconds();\n    var msec10 = d.getUTCMilliseconds() * 10 + msecTenths;\n\n    return includeTime(dateStr, h, m, s, msec10);\n};\n\nfunction includeTime(dateStr, h, m, s, msec10) {\n    // include each part that has nonzero data in or after it\n    if(h || m || s || msec10) {\n        dateStr += ' ' + lpad(h, 2) + ':' + lpad(m, 2);\n        if(s || msec10) {\n            dateStr += ':' + lpad(s, 2);\n            if(msec10) {\n                var digits = 4;\n                while(msec10 % 10 === 0) {\n                    digits -= 1;\n                    msec10 /= 10;\n                }\n                dateStr += '.' + lpad(msec10, digits);\n            }\n        }\n    }\n    return dateStr;\n}\n\n// normalize date format to date string, in case it starts as\n// a Date object or milliseconds\n// optional dflt is the return value if cleaning fails\nexports.cleanDate = function(v, dflt, calendar) {\n    // let us use cleanDate to provide a missing default without an error\n    if(v === BADNUM) return dflt;\n    if(exports.isJSDate(v) || (typeof v === 'number' && isFinite(v))) {\n        // do not allow milliseconds (old) or jsdate objects (inherently\n        // described as gregorian dates) with world calendars\n        if(isWorldCalendar(calendar)) {\n            Loggers.error('JS Dates and milliseconds are incompatible with world calendars', v);\n            return dflt;\n        }\n\n        // NOTE: if someone puts in a year as a number rather than a string,\n        // this will mistakenly convert it thinking it's milliseconds from 1970\n        // that is: '2012' -> Jan. 1, 2012, but 2012 -> 2012 epoch milliseconds\n        v = exports.ms2DateTimeLocal(+v);\n        if(!v && dflt !== undefined) return dflt;\n    } else if(!exports.isDateTime(v, calendar)) {\n        Loggers.error('unrecognized date', v);\n        return dflt;\n    }\n    return v;\n};\n\n/*\n *  Date formatting for ticks and hovertext\n */\n\n/*\n * modDateFormat: Support world calendars, and add one item to\n * d3's vocabulary:\n * %{n}f where n is the max number of digits of fractional seconds\n */\nvar fracMatch = /%\\d?f/g;\nfunction modDateFormat(fmt, x, formatter, calendar) {\n    fmt = fmt.replace(fracMatch, function(match) {\n        var digits = Math.min(+(match.charAt(1)) || 6, 6);\n        var fracSecs = ((x / 1000 % 1) + 2)\n            .toFixed(digits)\n            .substr(2).replace(/0+$/, '') || '0';\n        return fracSecs;\n    });\n\n    var d = new Date(Math.floor(x + 0.05));\n\n    if(isWorldCalendar(calendar)) {\n        try {\n            fmt = Registry.getComponentMethod('calendars', 'worldCalFmt')(fmt, x, calendar);\n        } catch(e) {\n            return 'Invalid';\n        }\n    }\n    return formatter(fmt)(d);\n}\n\n/*\n * formatTime: create a time string from:\n *   x: milliseconds\n *   tr: tickround ('M', 'S', or # digits)\n * only supports UTC times (where every day is 24 hours and 0 is at midnight)\n */\nvar MAXSECONDS = [59, 59.9, 59.99, 59.999, 59.9999];\nfunction formatTime(x, tr) {\n    var timePart = mod(x + 0.05, ONEDAY);\n\n    var timeStr = lpad(Math.floor(timePart / ONEHOUR), 2) + ':' +\n        lpad(mod(Math.floor(timePart / ONEMIN), 60), 2);\n\n    if(tr !== 'M') {\n        if(!isNumeric(tr)) tr = 0; // should only be 'S'\n\n        /*\n         * this is a weird one - and shouldn't come up unless people\n         * monkey with tick0 in weird ways, but we need to do something!\n         * IN PARTICULAR we had better not display garbage (see below)\n         * for numbers we always round to the nearest increment of the\n         * precision we're showing, and this seems like the right way to\n         * handle seconds and milliseconds, as they have a decimal point\n         * and people will interpret that to mean rounding like numbers.\n         * but for larger increments we floor the value: it's always\n         * 2013 until the ball drops on the new year. We could argue about\n         * which field it is where we start rounding (should 12:08:59\n         * round to 12:09 if we're stopping at minutes?) but for now I'll\n         * say we round seconds but floor everything else. BUT that means\n         * we need to never round up to 60 seconds, ie 23:59:60\n         */\n        var sec = Math.min(mod(x / ONESEC, 60), MAXSECONDS[tr]);\n\n        var secStr = (100 + sec).toFixed(tr).substr(1);\n        if(tr > 0) {\n            secStr = secStr.replace(/0+$/, '').replace(/[\\.]$/, '');\n        }\n\n        timeStr += ':' + secStr;\n    }\n    return timeStr;\n}\n\n/*\n * formatDate: turn a date into tick or hover label text.\n *\n *   x: milliseconds, the value to convert\n *   fmt: optional, an explicit format string (d3 format, even for world calendars)\n *   tr: tickround ('y', 'm', 'd', 'M', 'S', or # digits)\n *      used if no explicit fmt is provided\n *   formatter: locale-aware d3 date formatter for standard gregorian calendars\n *      should be the result of exports.getD3DateFormat(gd)\n *   calendar: optional string, the world calendar system to use\n *\n * returns the date/time as a string, potentially with the leading portion\n * on a separate line (after '\\n')\n * Note that this means if you provide an explicit format which includes '\\n'\n * the axis may choose to strip things after it when they don't change from\n * one tick to the next (as it does with automatic formatting)\n */\nexports.formatDate = function(x, fmt, tr, formatter, calendar, extraFormat) {\n    calendar = isWorldCalendar(calendar) && calendar;\n\n    if(!fmt) {\n        if(tr === 'y') fmt = extraFormat.year;\n        else if(tr === 'm') fmt = extraFormat.month;\n        else if(tr === 'd') {\n            fmt = extraFormat.dayMonth + '\\n' + extraFormat.year;\n        } else {\n            return formatTime(x, tr) + '\\n' + modDateFormat(extraFormat.dayMonthYear, x, formatter, calendar);\n        }\n    }\n\n    return modDateFormat(fmt, x, formatter, calendar);\n};\n\n/*\n * incrementMonth: make a new milliseconds value from the given one,\n * having changed the month\n *\n * special case for world calendars: multiples of 12 are treated as years,\n * even for calendar systems that don't have (always or ever) 12 months/year\n * TODO: perhaps we need a different code for year increments to support this?\n *\n * ms (number): the initial millisecond value\n * dMonth (int): the (signed) number of months to shift\n * calendar (string): the calendar system to use\n *\n * changing month does not (and CANNOT) always preserve day, since\n * months have different lengths. The worst example of this is:\n *   d = new Date(1970,0,31); d.setMonth(1) -> Feb 31 turns into Mar 3\n *\n * But we want to be able to iterate over the last day of each month,\n * regardless of what its number is.\n * So shift 3 days forward, THEN set the new month, then unshift:\n *   1/31 -> 2/28 (or 29) -> 3/31 -> 4/30 -> ...\n *\n * Note that odd behavior still exists if you start from the 26th-28th:\n *   1/28 -> 2/28 -> 3/31\n * but at least you can't shift any dates into the wrong month,\n * and ticks on these days incrementing by month would be very unusual\n */\nvar THREEDAYS = 3 * ONEDAY;\nexports.incrementMonth = function(ms, dMonth, calendar) {\n    calendar = isWorldCalendar(calendar) && calendar;\n\n    // pull time out and operate on pure dates, then add time back at the end\n    // this gives maximum precision - not that we *normally* care if we're\n    // incrementing by month, but better to be safe!\n    var timeMs = mod(ms, ONEDAY);\n    ms = Math.round(ms - timeMs);\n\n    if(calendar) {\n        try {\n            var dateJD = Math.round(ms / ONEDAY) + EPOCHJD;\n            var calInstance = Registry.getComponentMethod('calendars', 'getCal')(calendar);\n            var cDate = calInstance.fromJD(dateJD);\n\n            if(dMonth % 12) calInstance.add(cDate, dMonth, 'm');\n            else calInstance.add(cDate, dMonth / 12, 'y');\n\n            return (cDate.toJD() - EPOCHJD) * ONEDAY + timeMs;\n        } catch(e) {\n            Loggers.error('invalid ms ' + ms + ' in calendar ' + calendar);\n            // then keep going in gregorian even though the result will be 'Invalid'\n        }\n    }\n\n    var y = new Date(ms + THREEDAYS);\n    return y.setUTCMonth(y.getUTCMonth() + dMonth) + timeMs - THREEDAYS;\n};\n\n/*\n * findExactDates: what fraction of data is exact days, months, or years?\n *\n * data: array of millisecond values\n * calendar (string) the calendar to test against\n */\nexports.findExactDates = function(data, calendar) {\n    var exactYears = 0;\n    var exactMonths = 0;\n    var exactDays = 0;\n    var blankCount = 0;\n    var d;\n    var di;\n\n    var calInstance = (\n        isWorldCalendar(calendar) &&\n        Registry.getComponentMethod('calendars', 'getCal')(calendar)\n    );\n\n    for(var i = 0; i < data.length; i++) {\n        di = data[i];\n\n        // not date data at all\n        if(!isNumeric(di)) {\n            blankCount ++;\n            continue;\n        }\n\n        // not an exact date\n        if(di % ONEDAY) continue;\n\n        if(calInstance) {\n            try {\n                d = calInstance.fromJD(di / ONEDAY + EPOCHJD);\n                if(d.day() === 1) {\n                    if(d.month() === 1) exactYears++;\n                    else exactMonths++;\n                } else exactDays++;\n            } catch(e) {\n                // invalid date in this calendar - ignore it here.\n            }\n        } else {\n            d = new Date(di);\n            if(d.getUTCDate() === 1) {\n                if(d.getUTCMonth() === 0) exactYears++;\n                else exactMonths++;\n            } else exactDays++;\n        }\n    }\n    exactMonths += exactYears;\n    exactDays += exactMonths;\n\n    var dataCount = data.length - blankCount;\n\n    return {\n        exactYears: exactYears / dataCount,\n        exactMonths: exactMonths / dataCount,\n        exactDays: exactDays / dataCount\n    };\n};\n\n},{\"../constants/numerical\":680,\"../registry\":831,\"./loggers\":707,\"./mod\":710,\"d3\":157,\"fast-isnumeric\":224}],692:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n/* global jQuery:false */\n\nvar EventEmitter = _dereq_('events').EventEmitter;\n\nvar Events = {\n\n    init: function(plotObj) {\n        /*\n         * If we have already instantiated an emitter for this plot\n         * return early.\n         */\n        if(plotObj._ev instanceof EventEmitter) return plotObj;\n\n        var ev = new EventEmitter();\n        var internalEv = new EventEmitter();\n\n        /*\n         * Assign to plot._ev while we still live in a land\n         * where plot is a DOM element with stuff attached to it.\n         * In the future we can make plot the event emitter itself.\n         */\n        plotObj._ev = ev;\n\n        /*\n         * Create a second event handler that will manage events *internally*.\n         * This allows parts of plotly to respond to thing like relayout without\n         * having to use the user-facing event handler. They cannot peacefully\n         * coexist on the same handler because a user invoking\n         * plotObj.removeAllListeners() would detach internal events, breaking\n         * plotly.\n         */\n        plotObj._internalEv = internalEv;\n\n        /*\n         * Assign bound methods from the ev to the plot object. These methods\n         * will reference the 'this' of plot._ev even though they are methods\n         * of plot. This will keep the event machinery away from the plot object\n         * which currently is often a DOM element but presents an API that will\n         * continue to function when plot becomes an emitter. Not all EventEmitter\n         * methods have been bound to `plot` as some do not currently add value to\n         * the Plotly event API.\n         */\n        plotObj.on = ev.on.bind(ev);\n        plotObj.once = ev.once.bind(ev);\n        plotObj.removeListener = ev.removeListener.bind(ev);\n        plotObj.removeAllListeners = ev.removeAllListeners.bind(ev);\n\n        /*\n         * Create functions for managing internal events. These are *only* triggered\n         * by the mirroring of external events via the emit function.\n         */\n        plotObj._internalOn = internalEv.on.bind(internalEv);\n        plotObj._internalOnce = internalEv.once.bind(internalEv);\n        plotObj._removeInternalListener = internalEv.removeListener.bind(internalEv);\n        plotObj._removeAllInternalListeners = internalEv.removeAllListeners.bind(internalEv);\n\n        /*\n         * We must wrap emit to continue to support JQuery events. The idea\n         * is to check to see if the user is using JQuery events, if they are\n         * we emit JQuery events to trigger user handlers as well as the EventEmitter\n         * events.\n         */\n        plotObj.emit = function(event, data) {\n            if(typeof jQuery !== 'undefined') {\n                jQuery(plotObj).trigger(event, data);\n            }\n\n            ev.emit(event, data);\n            internalEv.emit(event, data);\n        };\n\n        return plotObj;\n    },\n\n    /*\n     * This function behaves like jQuery's triggerHandler. It calls\n     * all handlers for a particular event and returns the return value\n     * of the LAST handler. This function also triggers jQuery's\n     * triggerHandler for backwards compatibility.\n     */\n    triggerHandler: function(plotObj, event, data) {\n        var jQueryHandlerValue;\n        var nodeEventHandlerValue;\n\n        /*\n         * If jQuery exists run all its handlers for this event and\n         * collect the return value of the LAST handler function\n         */\n        if(typeof jQuery !== 'undefined') {\n            jQueryHandlerValue = jQuery(plotObj).triggerHandler(event, data);\n        }\n\n        /*\n         * Now run all the node style event handlers\n         */\n        var ev = plotObj._ev;\n        if(!ev) return jQueryHandlerValue;\n\n        var handlers = ev._events[event];\n        if(!handlers) return jQueryHandlerValue;\n\n        // making sure 'this' is the EventEmitter instance\n        function apply(handler) {\n            // The 'once' case, we can't just call handler() as we need\n            // the return value here. So,\n            // - remove handler\n            // - call listener and grab return value!\n            // - stash 'fired' key to not call handler twice\n            if(handler.listener) {\n                ev.removeListener(event, handler.listener);\n                if(!handler.fired) {\n                    handler.fired = true;\n                    return handler.listener.apply(ev, [data]);\n                }\n            } else {\n                return handler.apply(ev, [data]);\n            }\n        }\n\n        // handlers can be function or an array of functions\n        handlers = Array.isArray(handlers) ? handlers : [handlers];\n\n        var i;\n        for(i = 0; i < handlers.length - 1; i++) {\n            apply(handlers[i]);\n        }\n        // now call the final handler and collect its value\n        nodeEventHandlerValue = apply(handlers[i]);\n\n        /*\n         * Return either the jQuery handler value if it exists or the\n         * nodeEventHandler value. jQuery event value supersedes nodejs\n         * events for backwards compatibility reasons.\n         */\n        return jQueryHandlerValue !== undefined ?\n            jQueryHandlerValue :\n            nodeEventHandlerValue;\n    },\n\n    purge: function(plotObj) {\n        delete plotObj._ev;\n        delete plotObj.on;\n        delete plotObj.once;\n        delete plotObj.removeListener;\n        delete plotObj.removeAllListeners;\n        delete plotObj.emit;\n\n        delete plotObj._ev;\n        delete plotObj._internalEv;\n        delete plotObj._internalOn;\n        delete plotObj._internalOnce;\n        delete plotObj._removeInternalListener;\n        delete plotObj._removeAllInternalListeners;\n\n        return plotObj;\n    }\n\n};\n\nmodule.exports = Events;\n\n},{\"events\":97}],693:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isPlainObject = _dereq_('./is_plain_object.js');\nvar isArray = Array.isArray;\n\nfunction primitivesLoopSplice(source, target) {\n    var i, value;\n    for(i = 0; i < source.length; i++) {\n        value = source[i];\n        if(value !== null && typeof(value) === 'object') {\n            return false;\n        }\n        if(value !== void(0)) {\n            target[i] = value;\n        }\n    }\n    return true;\n}\n\nexports.extendFlat = function() {\n    return _extend(arguments, false, false, false);\n};\n\nexports.extendDeep = function() {\n    return _extend(arguments, true, false, false);\n};\n\nexports.extendDeepAll = function() {\n    return _extend(arguments, true, true, false);\n};\n\nexports.extendDeepNoArrays = function() {\n    return _extend(arguments, true, false, true);\n};\n\n/*\n * Inspired by https://github.com/justmoon/node-extend/blob/master/index.js\n * All credit to the jQuery authors for perfecting this amazing utility.\n *\n * API difference with jQuery version:\n * - No optional boolean (true -> deep extend) first argument,\n *   use `extendFlat` for first-level only extend and\n *   use `extendDeep` for a deep extend.\n *\n * Other differences with jQuery version:\n * - Uses a modern (and faster) isPlainObject routine.\n * - Expected to work with object {} and array [] arguments only.\n * - Does not check for circular structure.\n *   FYI: jQuery only does a check across one level.\n *   Warning: this might result in infinite loops.\n *\n */\nfunction _extend(inputs, isDeep, keepAllKeys, noArrayCopies) {\n    var target = inputs[0];\n    var length = inputs.length;\n\n    var input, key, src, copy, copyIsArray, clone, allPrimitives;\n\n    // TODO does this do the right thing for typed arrays?\n\n    if(length === 2 && isArray(target) && isArray(inputs[1]) && target.length === 0) {\n        allPrimitives = primitivesLoopSplice(inputs[1], target);\n\n        if(allPrimitives) {\n            return target;\n        } else {\n            target.splice(0, target.length); // reset target and continue to next block\n        }\n    }\n\n    for(var i = 1; i < length; i++) {\n        input = inputs[i];\n\n        for(key in input) {\n            src = target[key];\n            copy = input[key];\n\n            if(noArrayCopies && isArray(copy)) {\n                // Stop early and just transfer the array if array copies are disallowed:\n\n                target[key] = copy;\n            } else if(isDeep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n                // recurse if we're merging plain objects or arrays\n\n                if(copyIsArray) {\n                    copyIsArray = false;\n                    clone = src && isArray(src) ? src : [];\n                } else {\n                    clone = src && isPlainObject(src) ? src : {};\n                }\n\n                // never move original objects, clone them\n                target[key] = _extend([clone, copy], isDeep, keepAllKeys, noArrayCopies);\n            } else if(typeof copy !== 'undefined' || keepAllKeys) {\n                // don't bring in undefined values, except for extendDeepAll\n\n                target[key] = copy;\n            }\n        }\n    }\n\n    return target;\n}\n\n},{\"./is_plain_object.js\":704}],694:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n/**\n * Return news array containing only the unique items\n * found in input array.\n *\n * IMPORTANT: Note that items are considered unique\n * if `String({})` is unique. For example;\n *\n *  Lib.filterUnique([ { a: 1 }, { b: 2 } ])\n *\n *  returns [{ a: 1 }]\n *\n * and\n *\n *  Lib.filterUnique([ '1', 1 ])\n *\n *  returns ['1']\n *\n *\n * @param {array} array base array\n * @return {array} new filtered array\n */\nmodule.exports = function filterUnique(array) {\n    var seen = {};\n    var out = [];\n    var j = 0;\n\n    for(var i = 0; i < array.length; i++) {\n        var item = array[i];\n\n        if(seen[item] !== 1) {\n            seen[item] = 1;\n            out[j++] = item;\n        }\n    }\n\n    return out;\n};\n\n},{}],695:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/** Filter out object items with visible !== true\n *  insider array container.\n *\n *  @param {array of objects} container\n *  @return {array of objects} of length <= container\n *\n */\nmodule.exports = function filterVisible(container) {\n    var filterFn = isCalcData(container) ? calcDataFilter : baseFilter;\n    var out = [];\n\n    for(var i = 0; i < container.length; i++) {\n        var item = container[i];\n        if(filterFn(item)) out.push(item);\n    }\n\n    return out;\n};\n\nfunction baseFilter(item) {\n    return item.visible === true;\n}\n\nfunction calcDataFilter(item) {\n    var trace = item[0].trace;\n    return trace.visible === true && trace._length !== 0;\n}\n\nfunction isCalcData(cont) {\n    return (\n        Array.isArray(cont) &&\n        Array.isArray(cont[0]) &&\n        cont[0][0] &&\n        cont[0][0].trace\n    );\n}\n\n},{}],696:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar countryRegex = _dereq_('country-regex');\nvar Lib = _dereq_('../lib');\n\n// make list of all country iso3 ids from at runtime\nvar countryIds = Object.keys(countryRegex);\n\nvar locationmodeToIdFinder = {\n    'ISO-3': Lib.identity,\n    'USA-states': Lib.identity,\n    'country names': countryNameToISO3\n};\n\nfunction countryNameToISO3(countryName) {\n    for(var i = 0; i < countryIds.length; i++) {\n        var iso3 = countryIds[i];\n        var regex = new RegExp(countryRegex[iso3]);\n\n        if(regex.test(countryName.trim().toLowerCase())) return iso3;\n    }\n\n    Lib.log('Unrecognized country name: ' + countryName + '.');\n\n    return false;\n}\n\nfunction locationToFeature(locationmode, location, features) {\n    if(!location || typeof location !== 'string') return false;\n\n    var locationId = locationmodeToIdFinder[locationmode](location);\n    var filteredFeatures;\n    var f, i;\n\n    if(locationId) {\n        if(locationmode === 'USA-states') {\n            // Filter out features out in USA\n            //\n            // This is important as the Natural Earth files\n            // include state/provinces from USA, Canada, Australia and Brazil\n            // which have some overlay in their two-letter ids. For example,\n            // 'WA' is used for both Washington state and Western Australia.\n            filteredFeatures = [];\n            for(i = 0; i < features.length; i++) {\n                f = features[i];\n                if(f.properties && f.properties.gu && f.properties.gu === 'USA') {\n                    filteredFeatures.push(f);\n                }\n            }\n        } else {\n            filteredFeatures = features;\n        }\n\n        for(i = 0; i < filteredFeatures.length; i++) {\n            f = filteredFeatures[i];\n            if(f.id === locationId) return f;\n        }\n\n        Lib.log([\n            'Location with id', locationId,\n            'does not have a matching topojson feature at this resolution.'\n        ].join(' '));\n    }\n\n    return false;\n}\n\nmodule.exports = {\n    locationToFeature: locationToFeature\n};\n\n},{\"../lib\":703,\"country-regex\":127}],697:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar BADNUM = _dereq_('../constants/numerical').BADNUM;\n\n/**\n * Convert calcTrace to GeoJSON 'MultiLineString' coordinate arrays\n *\n * @param {object} calcTrace\n *  gd.calcdata item.\n *  Note that calcTrace[i].lonlat is assumed to be defined\n *\n * @return {array}\n *  return line coords array (or array of arrays)\n *\n */\nexports.calcTraceToLineCoords = function(calcTrace) {\n    var trace = calcTrace[0].trace;\n    var connectgaps = trace.connectgaps;\n\n    var coords = [];\n    var lineString = [];\n\n    for(var i = 0; i < calcTrace.length; i++) {\n        var calcPt = calcTrace[i];\n        var lonlat = calcPt.lonlat;\n\n        if(lonlat[0] !== BADNUM) {\n            lineString.push(lonlat);\n        } else if(!connectgaps && lineString.length > 0) {\n            coords.push(lineString);\n            lineString = [];\n        }\n    }\n\n    if(lineString.length > 0) {\n        coords.push(lineString);\n    }\n\n    return coords;\n};\n\n\n/**\n * Make line ('LineString' or 'MultiLineString') GeoJSON\n *\n * @param {array} coords\n *  results form calcTraceToLineCoords\n * @return {object} out\n *  GeoJSON object\n *\n */\nexports.makeLine = function(coords) {\n    if(coords.length === 1) {\n        return {\n            type: 'LineString',\n            coordinates: coords[0]\n        };\n    } else {\n        return {\n            type: 'MultiLineString',\n            coordinates: coords\n        };\n    }\n};\n\n/**\n * Make polygon ('Polygon' or 'MultiPolygon') GeoJSON\n *\n * @param {array} coords\n *  results form calcTraceToLineCoords\n * @return {object} out\n *  GeoJSON object\n */\nexports.makePolygon = function(coords) {\n    if(coords.length === 1) {\n        return {\n            type: 'Polygon',\n            coordinates: coords\n        };\n    } else {\n        var _coords = new Array(coords.length);\n\n        for(var i = 0; i < coords.length; i++) {\n            _coords[i] = [coords[i]];\n        }\n\n        return {\n            type: 'MultiPolygon',\n            coordinates: _coords\n        };\n    }\n};\n\n/**\n * Make blank GeoJSON\n *\n * @return {object}\n *  Blank GeoJSON object\n *\n */\nexports.makeBlank = function() {\n    return {\n        type: 'Point',\n        coordinates: []\n    };\n};\n\n},{\"../constants/numerical\":680}],698:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar mod = _dereq_('./mod').mod;\n\n/*\n * look for intersection of two line segments\n *   (1->2 and 3->4) - returns array [x,y] if they do, null if not\n */\nexports.segmentsIntersect = segmentsIntersect;\nfunction segmentsIntersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n    var a = x2 - x1;\n    var b = x3 - x1;\n    var c = x4 - x3;\n    var d = y2 - y1;\n    var e = y3 - y1;\n    var f = y4 - y3;\n    var det = a * f - c * d;\n    // parallel lines? intersection is undefined\n    // ignore the case where they are colinear\n    if(det === 0) return null;\n    var t = (b * f - c * e) / det;\n    var u = (b * d - a * e) / det;\n    // segments do not intersect?\n    if(u < 0 || u > 1 || t < 0 || t > 1) return null;\n\n    return {x: x1 + a * t, y: y1 + d * t};\n}\n\n/*\n * find the minimum distance between two line segments (1->2 and 3->4)\n */\nexports.segmentDistance = function segmentDistance(x1, y1, x2, y2, x3, y3, x4, y4) {\n    if(segmentsIntersect(x1, y1, x2, y2, x3, y3, x4, y4)) return 0;\n\n    // the two segments and their lengths squared\n    var x12 = x2 - x1;\n    var y12 = y2 - y1;\n    var x34 = x4 - x3;\n    var y34 = y4 - y3;\n    var ll12 = x12 * x12 + y12 * y12;\n    var ll34 = x34 * x34 + y34 * y34;\n\n    // calculate distance squared, then take the sqrt at the very end\n    var dist2 = Math.min(\n        perpDistance2(x12, y12, ll12, x3 - x1, y3 - y1),\n        perpDistance2(x12, y12, ll12, x4 - x1, y4 - y1),\n        perpDistance2(x34, y34, ll34, x1 - x3, y1 - y3),\n        perpDistance2(x34, y34, ll34, x2 - x3, y2 - y3)\n    );\n\n    return Math.sqrt(dist2);\n};\n\n/*\n * distance squared from segment ab to point c\n * [xab, yab] is the vector b-a\n * [xac, yac] is the vector c-a\n * llab is the length squared of (b-a), just to simplify calculation\n */\nfunction perpDistance2(xab, yab, llab, xac, yac) {\n    var fcAB = (xac * xab + yac * yab);\n    if(fcAB < 0) {\n        // point c is closer to point a\n        return xac * xac + yac * yac;\n    } else if(fcAB > llab) {\n        // point c is closer to point b\n        var xbc = xac - xab;\n        var ybc = yac - yab;\n        return xbc * xbc + ybc * ybc;\n    } else {\n        // perpendicular distance is the shortest\n        var crossProduct = xac * yab - yac * xab;\n        return crossProduct * crossProduct / llab;\n    }\n}\n\n// a very short-term cache for getTextLocation, just because\n// we're often looping over the same locations multiple times\n// invalidated as soon as we look at a different path\nvar locationCache, workingPath, workingTextWidth;\n\n// turn a path and position along it into x, y, and angle for the given text\nexports.getTextLocation = function getTextLocation(path, totalPathLen, positionOnPath, textWidth) {\n    if(path !== workingPath || textWidth !== workingTextWidth) {\n        locationCache = {};\n        workingPath = path;\n        workingTextWidth = textWidth;\n    }\n    if(locationCache[positionOnPath]) {\n        return locationCache[positionOnPath];\n    }\n\n    // for the angle, use points on the path separated by the text width\n    // even though due to curvature, the text will cover a bit more than that\n    var p0 = path.getPointAtLength(mod(positionOnPath - textWidth / 2, totalPathLen));\n    var p1 = path.getPointAtLength(mod(positionOnPath + textWidth / 2, totalPathLen));\n    // note: atan handles 1/0 nicely\n    var theta = Math.atan((p1.y - p0.y) / (p1.x - p0.x));\n    // center the text at 2/3 of the center position plus 1/3 the p0/p1 midpoint\n    // that's the average position of this segment, assuming it's roughly quadratic\n    var pCenter = path.getPointAtLength(mod(positionOnPath, totalPathLen));\n    var x = (pCenter.x * 4 + p0.x + p1.x) / 6;\n    var y = (pCenter.y * 4 + p0.y + p1.y) / 6;\n\n    var out = {x: x, y: y, theta: theta};\n    locationCache[positionOnPath] = out;\n    return out;\n};\n\nexports.clearLocationCache = function() {\n    workingPath = null;\n};\n\n/*\n * Find the segment of `path` that's within the visible area\n * given by `bounds` {left, right, top, bottom}, to within a\n * precision of `buffer` px\n *\n * returns: undefined if nothing is visible, else object:\n * {\n *   min: position where the path first enters bounds, or 0 if it\n *        starts within bounds\n *   max: position where the path last exits bounds, or the path length\n *        if it finishes within bounds\n *   len: max - min, ie the length of visible path\n *   total: the total path length - just included so the caller doesn't\n *        need to call path.getTotalLength() again\n *   isClosed: true iff the start and end points of the path are both visible\n *        and are at the same point\n * }\n *\n * Works by starting from either end and repeatedly finding the distance from\n * that point to the plot area, and if it's outside the plot, moving along the\n * path by that distance (because the plot must be at least that far away on\n * the path). Note that if a path enters, exits, and re-enters the plot, we\n * will not capture this behavior.\n */\nexports.getVisibleSegment = function getVisibleSegment(path, bounds, buffer) {\n    var left = bounds.left;\n    var right = bounds.right;\n    var top = bounds.top;\n    var bottom = bounds.bottom;\n\n    var pMin = 0;\n    var pTotal = path.getTotalLength();\n    var pMax = pTotal;\n\n    var pt0, ptTotal;\n\n    function getDistToPlot(len) {\n        var pt = path.getPointAtLength(len);\n\n        // hold on to the start and end points for `closed`\n        if(len === 0) pt0 = pt;\n        else if(len === pTotal) ptTotal = pt;\n\n        var dx = (pt.x < left) ? left - pt.x : (pt.x > right ? pt.x - right : 0);\n        var dy = (pt.y < top) ? top - pt.y : (pt.y > bottom ? pt.y - bottom : 0);\n        return Math.sqrt(dx * dx + dy * dy);\n    }\n\n    var distToPlot = getDistToPlot(pMin);\n    while(distToPlot) {\n        pMin += distToPlot + buffer;\n        if(pMin > pMax) return;\n        distToPlot = getDistToPlot(pMin);\n    }\n\n    distToPlot = getDistToPlot(pMax);\n    while(distToPlot) {\n        pMax -= distToPlot + buffer;\n        if(pMin > pMax) return;\n        distToPlot = getDistToPlot(pMax);\n    }\n\n    return {\n        min: pMin,\n        max: pMax,\n        len: pMax - pMin,\n        total: pTotal,\n        isClosed: pMin === 0 && pMax === pTotal &&\n            Math.abs(pt0.x - ptTotal.x) < 0.1 &&\n            Math.abs(pt0.y - ptTotal.y) < 0.1\n    };\n};\n\n/**\n * Find point on SVG path corresponding to a given constraint coordinate\n *\n * @param {SVGPathElement} path\n * @param {Number} val : constraint coordinate value\n * @param {String} coord : 'x' or 'y' the constraint coordinate\n * @param {Object} opts :\n *  - {Number} pathLength : supply total path length before hand\n *  - {Number} tolerance\n *  - {Number} iterationLimit\n * @return {SVGPoint}\n */\nexports.findPointOnPath = function findPointOnPath(path, val, coord, opts) {\n    opts = opts || {};\n\n    var pathLength = opts.pathLength || path.getTotalLength();\n    var tolerance = opts.tolerance || 1e-3;\n    var iterationLimit = opts.iterationLimit || 30;\n\n    // if path starts at a val greater than the path tail (like on vertical violins),\n    // we must flip the sign of the computed diff.\n    var mul = path.getPointAtLength(0)[coord] > path.getPointAtLength(pathLength)[coord] ? -1 : 1;\n\n    var i = 0;\n    var b0 = 0;\n    var b1 = pathLength;\n    var mid;\n    var pt;\n    var diff;\n\n    while(i < iterationLimit) {\n        mid = (b0 + b1) / 2;\n        pt = path.getPointAtLength(mid);\n        diff = pt[coord] - val;\n\n        if(Math.abs(diff) < tolerance) {\n            return pt;\n        } else {\n            if(mul * diff > 0) {\n                b1 = mid;\n            } else {\n                b0 = mid;\n            }\n            i++;\n        }\n    }\n    return pt;\n};\n\n},{\"./mod\":710}],699:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Allow referencing a graph DOM element either directly\n * or by its id string\n *\n * @param {HTMLDivElement|string} gd: a graph element or its id\n *\n * @returns {HTMLDivElement} the DOM element of the graph\n */\nmodule.exports = function(gd) {\n    var gdElement;\n\n    if(typeof gd === 'string') {\n        gdElement = document.getElementById(gd);\n\n        if(gdElement === null) {\n            throw new Error('No DOM element with id \\'' + gd + '\\' exists on the page.');\n        }\n\n        return gdElement;\n    } else if(gd === null || gd === undefined) {\n        throw new Error('DOM element provided is null or undefined');\n    }\n\n    return gd;  // otherwise assume that gd is a DOM element\n};\n\n},{}],700:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar tinycolor = _dereq_('tinycolor2');\nvar rgba = _dereq_('color-normalize');\n\nvar Colorscale = _dereq_('../components/colorscale');\nvar colorDflt = _dereq_('../components/color/attributes').defaultLine;\nvar isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;\n\nvar colorDfltRgba = rgba(colorDflt);\nvar opacityDflt = 1;\n\nfunction calculateColor(colorIn, opacityIn) {\n    var colorOut = colorIn;\n    colorOut[3] *= opacityIn;\n    return colorOut;\n}\n\nfunction validateColor(colorIn) {\n    if(isNumeric(colorIn)) return colorDfltRgba;\n\n    var colorOut = rgba(colorIn);\n\n    return colorOut.length ? colorOut : colorDfltRgba;\n}\n\nfunction validateOpacity(opacityIn) {\n    return isNumeric(opacityIn) ? opacityIn : opacityDflt;\n}\n\nfunction formatColor(containerIn, opacityIn, len) {\n    var colorIn = containerIn.color;\n    var isArrayColorIn = isArrayOrTypedArray(colorIn);\n    var isArrayOpacityIn = isArrayOrTypedArray(opacityIn);\n    var cOpts = Colorscale.extractOpts(containerIn);\n    var colorOut = [];\n\n    var sclFunc, getColor, getOpacity, colori, opacityi;\n\n    if(cOpts.colorscale !== undefined) {\n        sclFunc = Colorscale.makeColorScaleFuncFromTrace(containerIn);\n    } else {\n        sclFunc = validateColor;\n    }\n\n    if(isArrayColorIn) {\n        getColor = function(c, i) {\n            // FIXME: there is double work, considering that sclFunc does the opposite\n            return c[i] === undefined ? colorDfltRgba : rgba(sclFunc(c[i]));\n        };\n    } else getColor = validateColor;\n\n    if(isArrayOpacityIn) {\n        getOpacity = function(o, i) {\n            return o[i] === undefined ? opacityDflt : validateOpacity(o[i]);\n        };\n    } else getOpacity = validateOpacity;\n\n    if(isArrayColorIn || isArrayOpacityIn) {\n        for(var i = 0; i < len; i++) {\n            colori = getColor(colorIn, i);\n            opacityi = getOpacity(opacityIn, i);\n            colorOut[i] = calculateColor(colori, opacityi);\n        }\n    } else colorOut = calculateColor(rgba(colorIn), opacityIn);\n\n    return colorOut;\n}\n\nfunction parseColorScale(cont, alpha) {\n    if(alpha === undefined) alpha = 1;\n\n    var cOpts = Colorscale.extractOpts(cont);\n\n    var colorscale = cOpts.reversescale ?\n        Colorscale.flipScale(cOpts.colorscale) :\n        cOpts.colorscale;\n\n    return colorscale.map(function(elem) {\n        var index = elem[0];\n        var color = tinycolor(elem[1]);\n        var rgb = color.toRgb();\n        return {\n            index: index,\n            rgb: [rgb.r, rgb.g, rgb.b, alpha]\n        };\n    });\n}\n\nmodule.exports = {\n    formatColor: formatColor,\n    parseColorScale: parseColorScale\n};\n\n},{\"../components/color/attributes\":579,\"../components/colorscale\":592,\"./array\":686,\"color-normalize\":113,\"fast-isnumeric\":224,\"tinycolor2\":524}],701:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar identity = _dereq_('./identity');\n\nfunction wrap(d) {return [d];}\n\nmodule.exports = {\n\n    // The D3 data binding concept and the General Update Pattern promotes the idea of\n    // traversing into the scenegraph by using the `.data(fun, keyFun)` call.\n    // The `fun` is most often a `repeat`, ie. the elements beneath a `<g>` element need\n    // access to the same data, or a `descend`, which fans a scenegraph node into a bunch of\n    // of elements, e.g. points, lines, rows, requiring an array as input.\n    // The role of the `keyFun` is to identify what elements are being entered/exited/updated,\n    // otherwise D3 reverts to using a plain index which would screw up `transition`s.\n    keyFun: function(d) {return d.key;},\n    repeat: wrap,\n    descend: identity,\n\n    // Plotly.js uses a convention of storing the actual contents of the `calcData` as the\n    // element zero of a container array. These helpers are just used for clarity as a\n    // newcomer to the codebase may not know what the `[0]` is, and whether there can be further\n    // elements (not atm).\n    wrap: wrap,\n    unwrap: function(d) {return d[0];}\n};\n\n},{\"./identity\":702}],702:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// Simple helper functions\n// none of these need any external deps\n\nmodule.exports = function identity(d) { return d; };\n\n},{}],703:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar numConstants = _dereq_('../constants/numerical');\nvar FP_SAFE = numConstants.FP_SAFE;\nvar BADNUM = numConstants.BADNUM;\n\nvar lib = module.exports = {};\n\nlib.nestedProperty = _dereq_('./nested_property');\nlib.keyedContainer = _dereq_('./keyed_container');\nlib.relativeAttr = _dereq_('./relative_attr');\nlib.isPlainObject = _dereq_('./is_plain_object');\nlib.toLogRange = _dereq_('./to_log_range');\nlib.relinkPrivateKeys = _dereq_('./relink_private');\n\nvar arrayModule = _dereq_('./array');\nlib.isTypedArray = arrayModule.isTypedArray;\nlib.isArrayOrTypedArray = arrayModule.isArrayOrTypedArray;\nlib.isArray1D = arrayModule.isArray1D;\nlib.ensureArray = arrayModule.ensureArray;\nlib.concat = arrayModule.concat;\nlib.maxRowLength = arrayModule.maxRowLength;\nlib.minRowLength = arrayModule.minRowLength;\n\nvar modModule = _dereq_('./mod');\nlib.mod = modModule.mod;\nlib.modHalf = modModule.modHalf;\n\nvar coerceModule = _dereq_('./coerce');\nlib.valObjectMeta = coerceModule.valObjectMeta;\nlib.coerce = coerceModule.coerce;\nlib.coerce2 = coerceModule.coerce2;\nlib.coerceFont = coerceModule.coerceFont;\nlib.coerceHoverinfo = coerceModule.coerceHoverinfo;\nlib.coerceSelectionMarkerOpacity = coerceModule.coerceSelectionMarkerOpacity;\nlib.validate = coerceModule.validate;\n\nvar datesModule = _dereq_('./dates');\nlib.dateTime2ms = datesModule.dateTime2ms;\nlib.isDateTime = datesModule.isDateTime;\nlib.ms2DateTime = datesModule.ms2DateTime;\nlib.ms2DateTimeLocal = datesModule.ms2DateTimeLocal;\nlib.cleanDate = datesModule.cleanDate;\nlib.isJSDate = datesModule.isJSDate;\nlib.formatDate = datesModule.formatDate;\nlib.incrementMonth = datesModule.incrementMonth;\nlib.dateTick0 = datesModule.dateTick0;\nlib.dfltRange = datesModule.dfltRange;\nlib.findExactDates = datesModule.findExactDates;\nlib.MIN_MS = datesModule.MIN_MS;\nlib.MAX_MS = datesModule.MAX_MS;\n\nvar searchModule = _dereq_('./search');\nlib.findBin = searchModule.findBin;\nlib.sorterAsc = searchModule.sorterAsc;\nlib.sorterDes = searchModule.sorterDes;\nlib.distinctVals = searchModule.distinctVals;\nlib.roundUp = searchModule.roundUp;\nlib.sort = searchModule.sort;\nlib.findIndexOfMin = searchModule.findIndexOfMin;\n\nvar statsModule = _dereq_('./stats');\nlib.aggNums = statsModule.aggNums;\nlib.len = statsModule.len;\nlib.mean = statsModule.mean;\nlib.median = statsModule.median;\nlib.midRange = statsModule.midRange;\nlib.variance = statsModule.variance;\nlib.stdev = statsModule.stdev;\nlib.interp = statsModule.interp;\n\nvar matrixModule = _dereq_('./matrix');\nlib.init2dArray = matrixModule.init2dArray;\nlib.transposeRagged = matrixModule.transposeRagged;\nlib.dot = matrixModule.dot;\nlib.translationMatrix = matrixModule.translationMatrix;\nlib.rotationMatrix = matrixModule.rotationMatrix;\nlib.rotationXYMatrix = matrixModule.rotationXYMatrix;\nlib.apply2DTransform = matrixModule.apply2DTransform;\nlib.apply2DTransform2 = matrixModule.apply2DTransform2;\n\nvar anglesModule = _dereq_('./angles');\nlib.deg2rad = anglesModule.deg2rad;\nlib.rad2deg = anglesModule.rad2deg;\nlib.angleDelta = anglesModule.angleDelta;\nlib.angleDist = anglesModule.angleDist;\nlib.isFullCircle = anglesModule.isFullCircle;\nlib.isAngleInsideSector = anglesModule.isAngleInsideSector;\nlib.isPtInsideSector = anglesModule.isPtInsideSector;\nlib.pathArc = anglesModule.pathArc;\nlib.pathSector = anglesModule.pathSector;\nlib.pathAnnulus = anglesModule.pathAnnulus;\n\nvar anchorUtils = _dereq_('./anchor_utils');\nlib.isLeftAnchor = anchorUtils.isLeftAnchor;\nlib.isCenterAnchor = anchorUtils.isCenterAnchor;\nlib.isRightAnchor = anchorUtils.isRightAnchor;\nlib.isTopAnchor = anchorUtils.isTopAnchor;\nlib.isMiddleAnchor = anchorUtils.isMiddleAnchor;\nlib.isBottomAnchor = anchorUtils.isBottomAnchor;\n\nvar geom2dModule = _dereq_('./geometry2d');\nlib.segmentsIntersect = geom2dModule.segmentsIntersect;\nlib.segmentDistance = geom2dModule.segmentDistance;\nlib.getTextLocation = geom2dModule.getTextLocation;\nlib.clearLocationCache = geom2dModule.clearLocationCache;\nlib.getVisibleSegment = geom2dModule.getVisibleSegment;\nlib.findPointOnPath = geom2dModule.findPointOnPath;\n\nvar extendModule = _dereq_('./extend');\nlib.extendFlat = extendModule.extendFlat;\nlib.extendDeep = extendModule.extendDeep;\nlib.extendDeepAll = extendModule.extendDeepAll;\nlib.extendDeepNoArrays = extendModule.extendDeepNoArrays;\n\nvar loggersModule = _dereq_('./loggers');\nlib.log = loggersModule.log;\nlib.warn = loggersModule.warn;\nlib.error = loggersModule.error;\n\nvar regexModule = _dereq_('./regex');\nlib.counterRegex = regexModule.counter;\n\nvar throttleModule = _dereq_('./throttle');\nlib.throttle = throttleModule.throttle;\nlib.throttleDone = throttleModule.done;\nlib.clearThrottle = throttleModule.clear;\n\nlib.getGraphDiv = _dereq_('./get_graph_div');\n\nlib.clearResponsive = _dereq_('./clear_responsive');\n\nlib.makeTraceGroups = _dereq_('./make_trace_groups');\n\nlib._ = _dereq_('./localize');\n\nlib.notifier = _dereq_('./notifier');\n\nlib.filterUnique = _dereq_('./filter_unique');\nlib.filterVisible = _dereq_('./filter_visible');\nlib.pushUnique = _dereq_('./push_unique');\n\nlib.cleanNumber = _dereq_('./clean_number');\n\nlib.ensureNumber = function ensureNumber(v) {\n    if(!isNumeric(v)) return BADNUM;\n    v = Number(v);\n    if(v < -FP_SAFE || v > FP_SAFE) return BADNUM;\n    return isNumeric(v) ? Number(v) : BADNUM;\n};\n\n/**\n * Is v a valid array index? Accepts numeric strings as well as numbers.\n *\n * @param {any} v: the value to test\n * @param {Optional[integer]} len: the array length we are indexing\n *\n * @return {bool}: v is a valid array index\n */\nlib.isIndex = function(v, len) {\n    if(len !== undefined && v >= len) return false;\n    return isNumeric(v) && (v >= 0) && (v % 1 === 0);\n};\n\nlib.noop = _dereq_('./noop');\nlib.identity = _dereq_('./identity');\n\n/**\n * create an array of length 'cnt' filled with 'v' at all indices\n *\n * @param {any} v\n * @param {number} cnt\n * @return {array}\n */\nlib.repeat = function(v, cnt) {\n    var out = new Array(cnt);\n    for(var i = 0; i < cnt; i++) {\n        out[i] = v;\n    }\n    return out;\n};\n\n/**\n * swap x and y of the same attribute in container cont\n * specify attr with a ? in place of x/y\n * you can also swap other things than x/y by providing part1 and part2\n */\nlib.swapAttrs = function(cont, attrList, part1, part2) {\n    if(!part1) part1 = 'x';\n    if(!part2) part2 = 'y';\n    for(var i = 0; i < attrList.length; i++) {\n        var attr = attrList[i];\n        var xp = lib.nestedProperty(cont, attr.replace('?', part1));\n        var yp = lib.nestedProperty(cont, attr.replace('?', part2));\n        var temp = xp.get();\n        xp.set(yp.get());\n        yp.set(temp);\n    }\n};\n\n/**\n * SVG painter's algo worked around with reinsertion\n */\nlib.raiseToTop = function raiseToTop(elem) {\n    elem.parentNode.appendChild(elem);\n};\n\n/**\n * cancel a possibly pending transition; returned selection may be used by caller\n */\nlib.cancelTransition = function(selection) {\n    return selection.transition().duration(0);\n};\n\n// constrain - restrict a number v to be between v0 and v1\nlib.constrain = function(v, v0, v1) {\n    if(v0 > v1) return Math.max(v1, Math.min(v0, v));\n    return Math.max(v0, Math.min(v1, v));\n};\n\n/**\n * do two bounding boxes from getBoundingClientRect,\n * ie {left,right,top,bottom,width,height}, overlap?\n * takes optional padding pixels\n */\nlib.bBoxIntersect = function(a, b, pad) {\n    pad = pad || 0;\n    return (a.left <= b.right + pad &&\n            b.left <= a.right + pad &&\n            a.top <= b.bottom + pad &&\n            b.top <= a.bottom + pad);\n};\n\n/*\n * simpleMap: alternative to Array.map that only\n * passes on the element and up to 2 extra args you\n * provide (but not the array index or the whole array)\n *\n * array: the array to map it to\n * func: the function to apply\n * x1, x2: optional extra args\n */\nlib.simpleMap = function(array, func, x1, x2) {\n    var len = array.length;\n    var out = new Array(len);\n    for(var i = 0; i < len; i++) out[i] = func(array[i], x1, x2);\n    return out;\n};\n\n/**\n * Random string generator\n *\n * @param {object} existing\n *     pass in strings to avoid as keys with truthy values\n * @param {int} bits\n *     bits of information in the output string, default 24\n * @param {int} base\n *     base of string representation, default 16. Should be a power of 2.\n */\nlib.randstr = function randstr(existing, bits, base, _recursion) {\n    if(!base) base = 16;\n    if(bits === undefined) bits = 24;\n    if(bits <= 0) return '0';\n\n    var digits = Math.log(Math.pow(2, bits)) / Math.log(base);\n    var res = '';\n    var i, b, x;\n\n    for(i = 2; digits === Infinity; i *= 2) {\n        digits = Math.log(Math.pow(2, bits / i)) / Math.log(base) * i;\n    }\n\n    var rem = digits - Math.floor(digits);\n\n    for(i = 0; i < Math.floor(digits); i++) {\n        x = Math.floor(Math.random() * base).toString(base);\n        res = x + res;\n    }\n\n    if(rem) {\n        b = Math.pow(base, rem);\n        x = Math.floor(Math.random() * b).toString(base);\n        res = x + res;\n    }\n\n    var parsed = parseInt(res, base);\n    if((existing && existing[res]) ||\n         (parsed !== Infinity && parsed >= Math.pow(2, bits))) {\n        if(_recursion > 10) {\n            lib.warn('randstr failed uniqueness');\n            return res;\n        }\n        return randstr(existing, bits, base, (_recursion || 0) + 1);\n    } else return res;\n};\n\nlib.OptionControl = function(opt, optname) {\n    /*\n     * An environment to contain all option setters and\n     * getters that collectively modify opts.\n     *\n     * You can call up opts from any function in new object\n     * as this.optname || this.opt\n     *\n     * See FitOpts for example of usage\n     */\n    if(!opt) opt = {};\n    if(!optname) optname = 'opt';\n\n    var self = {};\n    self.optionList = [];\n\n    self._newoption = function(optObj) {\n        optObj[optname] = opt;\n        self[optObj.name] = optObj;\n        self.optionList.push(optObj);\n    };\n\n    self['_' + optname] = opt;\n    return self;\n};\n\n/**\n * lib.smooth: smooth arrayIn by convolving with\n * a hann window with given full width at half max\n * bounce the ends in, so the output has the same length as the input\n */\nlib.smooth = function(arrayIn, FWHM) {\n    FWHM = Math.round(FWHM) || 0; // only makes sense for integers\n    if(FWHM < 2) return arrayIn;\n\n    var alen = arrayIn.length;\n    var alen2 = 2 * alen;\n    var wlen = 2 * FWHM - 1;\n    var w = new Array(wlen);\n    var arrayOut = new Array(alen);\n    var i;\n    var j;\n    var k;\n    var v;\n\n    // first make the window array\n    for(i = 0; i < wlen; i++) {\n        w[i] = (1 - Math.cos(Math.PI * (i + 1) / FWHM)) / (2 * FWHM);\n    }\n\n    // now do the convolution\n    for(i = 0; i < alen; i++) {\n        v = 0;\n        for(j = 0; j < wlen; j++) {\n            k = i + j + 1 - FWHM;\n\n            // multibounce\n            if(k < -alen) k -= alen2 * Math.round(k / alen2);\n            else if(k >= alen2) k -= alen2 * Math.floor(k / alen2);\n\n            // single bounce\n            if(k < 0) k = - 1 - k;\n            else if(k >= alen) k = alen2 - 1 - k;\n\n            v += arrayIn[k] * w[j];\n        }\n        arrayOut[i] = v;\n    }\n\n    return arrayOut;\n};\n\n/**\n * syncOrAsync: run a sequence of functions synchronously\n * as long as its returns are not promises (ie have no .then)\n * includes one argument arg to send to all functions...\n * this is mainly just to prevent us having to make wrapper functions\n * when the only purpose of the wrapper is to reference gd\n * and a final step to be executed at the end\n * TODO: if there's an error and everything is sync,\n * this doesn't happen yet because we want to make sure\n * that it gets reported\n */\nlib.syncOrAsync = function(sequence, arg, finalStep) {\n    var ret, fni;\n\n    function continueAsync() {\n        return lib.syncOrAsync(sequence, arg, finalStep);\n    }\n\n    while(sequence.length) {\n        fni = sequence.splice(0, 1)[0];\n        ret = fni(arg);\n\n        if(ret && ret.then) {\n            return ret.then(continueAsync)\n                .then(undefined, lib.promiseError);\n        }\n    }\n\n    return finalStep && finalStep(arg);\n};\n\n\n/**\n * Helper to strip trailing slash, from\n * http://stackoverflow.com/questions/6680825/return-string-without-trailing-slash\n */\nlib.stripTrailingSlash = function(str) {\n    if(str.substr(-1) === '/') return str.substr(0, str.length - 1);\n    return str;\n};\n\nlib.noneOrAll = function(containerIn, containerOut, attrList) {\n    /**\n     * some attributes come together, so if you have one of them\n     * in the input, you should copy the default values of the others\n     * to the input as well.\n     */\n    if(!containerIn) return;\n\n    var hasAny = false;\n    var hasAll = true;\n    var i;\n    var val;\n\n    for(i = 0; i < attrList.length; i++) {\n        val = containerIn[attrList[i]];\n        if(val !== undefined && val !== null) hasAny = true;\n        else hasAll = false;\n    }\n\n    if(hasAny && !hasAll) {\n        for(i = 0; i < attrList.length; i++) {\n            containerIn[attrList[i]] = containerOut[attrList[i]];\n        }\n    }\n};\n\n/** merges calcdata field (given by cdAttr) with traceAttr values\n *\n * N.B. Loop over minimum of cd.length and traceAttr.length\n * i.e. it does not try to fill in beyond traceAttr.length-1\n *\n * @param {array} traceAttr : trace attribute\n * @param {object} cd : calcdata trace\n * @param {string} cdAttr : calcdata key\n */\nlib.mergeArray = function(traceAttr, cd, cdAttr) {\n    if(lib.isArrayOrTypedArray(traceAttr)) {\n        var imax = Math.min(traceAttr.length, cd.length);\n        for(var i = 0; i < imax; i++) cd[i][cdAttr] = traceAttr[i];\n    }\n};\n\n/** fills calcdata field (given by cdAttr) with traceAttr values\n *  or function of traceAttr values (e.g. some fallback)\n *\n * N.B. Loops over all cd items.\n *\n * @param {array} traceAttr : trace attribute\n * @param {object} cd : calcdata trace\n * @param {string} cdAttr : calcdata key\n * @param {function} [fn] : optional function to apply to each array item\n */\nlib.fillArray = function(traceAttr, cd, cdAttr, fn) {\n    fn = fn || lib.identity;\n\n    if(lib.isArrayOrTypedArray(traceAttr)) {\n        for(var i = 0; i < cd.length; i++) {\n            cd[i][cdAttr] = fn(traceAttr[i]);\n        }\n    }\n};\n\n/** Handler for trace-wide vs per-point options\n *\n * @param {object} trace : (full) trace object\n * @param {number} ptNumber : index of the point in question\n * @param {string} astr : attribute string\n * @param {function} [fn] : optional function to apply to each array item\n *\n * @return {any}\n */\nlib.castOption = function(trace, ptNumber, astr, fn) {\n    fn = fn || lib.identity;\n\n    var val = lib.nestedProperty(trace, astr).get();\n\n    if(lib.isArrayOrTypedArray(val)) {\n        if(Array.isArray(ptNumber) && lib.isArrayOrTypedArray(val[ptNumber[0]])) {\n            return fn(val[ptNumber[0]][ptNumber[1]]);\n        } else {\n            return fn(val[ptNumber]);\n        }\n    } else {\n        return val;\n    }\n};\n\n/** Extract option from calcdata item, correctly falling back to\n *  trace value if not found.\n *\n *  @param {object} calcPt : calcdata[i][j] item\n *  @param {object} trace : (full) trace object\n *  @param {string} calcKey : calcdata key\n *  @param {string} traceKey : aka trace attribute string\n *  @return {any}\n */\nlib.extractOption = function(calcPt, trace, calcKey, traceKey) {\n    if(calcKey in calcPt) return calcPt[calcKey];\n\n    // fallback to trace value,\n    //   must check if value isn't itself an array\n    //   which means the trace attribute has a corresponding\n    //   calcdata key, but its value is falsy\n    var traceVal = lib.nestedProperty(trace, traceKey).get();\n    if(!Array.isArray(traceVal)) return traceVal;\n};\n\nfunction makePtIndex2PtNumber(indexToPoints) {\n    var ptIndex2ptNumber = {};\n    for(var k in indexToPoints) {\n        var pts = indexToPoints[k];\n        for(var j = 0; j < pts.length; j++) {\n            ptIndex2ptNumber[pts[j]] = +k;\n        }\n    }\n    return ptIndex2ptNumber;\n}\n\n/** Tag selected calcdata items\n *\n * N.B. note that point 'index' corresponds to input data array index\n *  whereas 'number' is its post-transform version.\n *\n * @param {array} calcTrace\n * @param {object} trace\n *  - selectedpoints {array}\n *  - _indexToPoints {object}\n * @param {ptNumber2cdIndex} ptNumber2cdIndex (optional)\n *  optional map object for trace types that do not have 1-to-1 point number to\n *  calcdata item index correspondence (e.g. histogram)\n */\nlib.tagSelected = function(calcTrace, trace, ptNumber2cdIndex) {\n    var selectedpoints = trace.selectedpoints;\n    var indexToPoints = trace._indexToPoints;\n    var ptIndex2ptNumber;\n\n    // make pt index-to-number map object, which takes care of transformed traces\n    if(indexToPoints) {\n        ptIndex2ptNumber = makePtIndex2PtNumber(indexToPoints);\n    }\n\n    function isCdIndexValid(v) {\n        return v !== undefined && v < calcTrace.length;\n    }\n\n    for(var i = 0; i < selectedpoints.length; i++) {\n        var ptIndex = selectedpoints[i];\n\n        if(lib.isIndex(ptIndex)) {\n            var ptNumber = ptIndex2ptNumber ? ptIndex2ptNumber[ptIndex] : ptIndex;\n            var cdIndex = ptNumber2cdIndex ? ptNumber2cdIndex[ptNumber] : ptNumber;\n\n            if(isCdIndexValid(cdIndex)) {\n                calcTrace[cdIndex].selected = 1;\n            }\n        }\n    }\n};\n\nlib.selIndices2selPoints = function(trace) {\n    var selectedpoints = trace.selectedpoints;\n    var indexToPoints = trace._indexToPoints;\n\n    if(indexToPoints) {\n        var ptIndex2ptNumber = makePtIndex2PtNumber(indexToPoints);\n        var out = [];\n\n        for(var i = 0; i < selectedpoints.length; i++) {\n            var ptIndex = selectedpoints[i];\n            if(lib.isIndex(ptIndex)) {\n                var ptNumber = ptIndex2ptNumber[ptIndex];\n                if(lib.isIndex(ptNumber)) {\n                    out.push(ptNumber);\n                }\n            }\n        }\n\n        return out;\n    } else {\n        return selectedpoints;\n    }\n};\n\n/** Returns target as set by 'target' transform attribute\n *\n * @param {object} trace : full trace object\n * @param {object} transformOpts : transform option object\n *  - target (string} :\n *      either an attribute string referencing an array in the trace object, or\n *      a set array.\n *\n * @return {array or false} : the target array (NOT a copy!!) or false if invalid\n */\nlib.getTargetArray = function(trace, transformOpts) {\n    var target = transformOpts.target;\n\n    if(typeof target === 'string' && target) {\n        var array = lib.nestedProperty(trace, target).get();\n        return Array.isArray(array) ? array : false;\n    } else if(Array.isArray(target)) {\n        return target;\n    }\n\n    return false;\n};\n\n/**\n * modified version of jQuery's extend to strip out private objs and functions,\n * and cut arrays down to first <arraylen> or 1 elements\n * because extend-like algorithms are hella slow\n * obj2 is assumed to already be clean of these things (including no arrays)\n */\nlib.minExtend = function(obj1, obj2) {\n    var objOut = {};\n    if(typeof obj2 !== 'object') obj2 = {};\n    var arrayLen = 3;\n    var keys = Object.keys(obj1);\n    var i, k, v;\n\n    for(i = 0; i < keys.length; i++) {\n        k = keys[i];\n        v = obj1[k];\n        if(k.charAt(0) === '_' || typeof v === 'function') continue;\n        else if(k === 'module') objOut[k] = v;\n        else if(Array.isArray(v)) {\n            if(k === 'colorscale') {\n                objOut[k] = v.slice();\n            } else {\n                objOut[k] = v.slice(0, arrayLen);\n            }\n        } else if(v && (typeof v === 'object')) objOut[k] = lib.minExtend(obj1[k], obj2[k]);\n        else objOut[k] = v;\n    }\n\n    keys = Object.keys(obj2);\n    for(i = 0; i < keys.length; i++) {\n        k = keys[i];\n        v = obj2[k];\n        if(typeof v !== 'object' || !(k in objOut) || typeof objOut[k] !== 'object') {\n            objOut[k] = v;\n        }\n    }\n\n    return objOut;\n};\n\nlib.titleCase = function(s) {\n    return s.charAt(0).toUpperCase() + s.substr(1);\n};\n\nlib.containsAny = function(s, fragments) {\n    for(var i = 0; i < fragments.length; i++) {\n        if(s.indexOf(fragments[i]) !== -1) return true;\n    }\n    return false;\n};\n\nlib.isPlotDiv = function(el) {\n    var el3 = d3.select(el);\n    return el3.node() instanceof HTMLElement &&\n        el3.size() &&\n        el3.classed('js-plotly-plot');\n};\n\nlib.removeElement = function(el) {\n    var elParent = el && el.parentNode;\n    if(elParent) elParent.removeChild(el);\n};\n\n/**\n * for dynamically adding style rules\n * makes one stylesheet that contains all rules added\n * by all calls to this function\n */\nlib.addStyleRule = function(selector, styleString) {\n    lib.addRelatedStyleRule('global', selector, styleString);\n};\n\n/**\n * for dynamically adding style rules\n * to a stylesheet uniquely identified by a uid\n */\nlib.addRelatedStyleRule = function(uid, selector, styleString) {\n    var id = 'plotly.js-style-' + uid;\n    var style = document.getElementById(id);\n    if(!style) {\n        style = document.createElement('style');\n        style.setAttribute('id', id);\n        // WebKit hack :(\n        style.appendChild(document.createTextNode(''));\n        document.head.appendChild(style);\n    }\n    var styleSheet = style.sheet;\n\n    if(styleSheet.insertRule) {\n        styleSheet.insertRule(selector + '{' + styleString + '}', 0);\n    } else if(styleSheet.addRule) {\n        styleSheet.addRule(selector, styleString, 0);\n    } else lib.warn('addStyleRule failed');\n};\n\n/**\n * to remove from the page a stylesheet identified by a given uid\n */\nlib.deleteRelatedStyleRule = function(uid) {\n    var id = 'plotly.js-style-' + uid;\n    var style = document.getElementById(id);\n    if(style) lib.removeElement(style);\n};\n\nlib.isIE = function() {\n    return typeof window.navigator.msSaveBlob !== 'undefined';\n};\n\n/**\n * Duck typing to recognize a d3 selection, mostly for IE9's benefit\n * because it doesn't handle instanceof like modern browsers\n */\nlib.isD3Selection = function(obj) {\n    return obj && (typeof obj.classed === 'function');\n};\n\n/**\n * Append element to DOM only if not present.\n *\n * @param {d3 selection} parent : parent selection of the element in question\n * @param {string} nodeType : node type of element to append\n * @param {string} className (optional) : class name of element in question\n * @param {fn} enterFn (optional) : optional fn applied to entering elements only\n * @return {d3 selection} selection of new layer\n *\n * Previously, we were using the following pattern:\n *\n * ```\n * var sel = parent.selectAll('.' + className)\n *     .data([0]);\n *\n * sel.enter().append(nodeType)\n *     .classed(className, true);\n *\n * return sel;\n * ```\n *\n * in numerous places in our codebase to achieve the same behavior.\n *\n * The logic below performs much better, mostly as we are using\n * `.select` instead `.selectAll` that is `querySelector` instead of\n * `querySelectorAll`.\n *\n */\nlib.ensureSingle = function(parent, nodeType, className, enterFn) {\n    var sel = parent.select(nodeType + (className ? '.' + className : ''));\n    if(sel.size()) return sel;\n\n    var layer = parent.append(nodeType);\n    if(className) layer.classed(className, true);\n    if(enterFn) layer.call(enterFn);\n\n    return layer;\n};\n\n/**\n * Same as Lib.ensureSingle, but using id as selector.\n * This version is mostly used for clipPath nodes.\n *\n * @param {d3 selection} parent : parent selection of the element in question\n * @param {string} nodeType : node type of element to append\n * @param {string} id : id of element in question\n * @param {fn} enterFn (optional) : optional fn applied to entering elements only\n * @return {d3 selection} selection of new layer\n */\nlib.ensureSingleById = function(parent, nodeType, id, enterFn) {\n    var sel = parent.select(nodeType + '#' + id);\n    if(sel.size()) return sel;\n\n    var layer = parent.append(nodeType).attr('id', id);\n    if(enterFn) layer.call(enterFn);\n\n    return layer;\n};\n\n/**\n * Converts a string path to an object.\n *\n * When given a string containing an array element, it will create a `null`\n * filled array of the given size.\n *\n * @example\n * lib.objectFromPath('nested.test[2].path', 'value');\n * // returns { nested: { test: [null, null, { path: 'value' }]}\n *\n * @param   {string}    path to nested value\n * @param   {*}         any value to be set\n *\n * @return {Object} the constructed object with a full nested path\n */\nlib.objectFromPath = function(path, value) {\n    var keys = path.split('.');\n    var tmpObj;\n    var obj = tmpObj = {};\n\n    for(var i = 0; i < keys.length; i++) {\n        var key = keys[i];\n        var el = null;\n\n        var parts = keys[i].match(/(.*)\\[([0-9]+)\\]/);\n\n        if(parts) {\n            key = parts[1];\n            el = parts[2];\n\n            tmpObj = tmpObj[key] = [];\n\n            if(i === keys.length - 1) {\n                tmpObj[el] = value;\n            } else {\n                tmpObj[el] = {};\n            }\n\n            tmpObj = tmpObj[el];\n        } else {\n            if(i === keys.length - 1) {\n                tmpObj[key] = value;\n            } else {\n                tmpObj[key] = {};\n            }\n\n            tmpObj = tmpObj[key];\n        }\n    }\n\n    return obj;\n};\n\n/**\n * Iterate through an object in-place, converting dotted properties to objects.\n *\n * Examples:\n *\n *   lib.expandObjectPaths({'nested.test.path': 'value'});\n *     => { nested: { test: {path: 'value'}}}\n *\n * It also handles array notation, e.g.:\n *\n *   lib.expandObjectPaths({'foo[1].bar': 'value'});\n *     => { foo: [null, {bar: value}] }\n *\n * It handles merges the results when two properties are specified in parallel:\n *\n *   lib.expandObjectPaths({'foo[1].bar': 10, 'foo[0].bar': 20});\n *     => { foo: [{bar: 10}, {bar: 20}] }\n *\n * It does NOT, however, merge mulitple mutliply-nested arrays::\n *\n *   lib.expandObjectPaths({'marker[1].range[1]': 5, 'marker[1].range[0]': 4})\n *     => { marker: [null, {range: 4}] }\n */\n\n// Store this to avoid recompiling regex on *every* prop since this may happen many\n// many times for animations. Could maybe be inside the function. Not sure about\n// scoping vs. recompilation tradeoff, but at least it's not just inlining it into\n// the inner loop.\nvar dottedPropertyRegex = /^([^\\[\\.]+)\\.(.+)?/;\nvar indexedPropertyRegex = /^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;\n\nlib.expandObjectPaths = function(data) {\n    var match, key, prop, datum, idx, dest, trailingPath;\n    if(typeof data === 'object' && !Array.isArray(data)) {\n        for(key in data) {\n            if(data.hasOwnProperty(key)) {\n                if((match = key.match(dottedPropertyRegex))) {\n                    datum = data[key];\n                    prop = match[1];\n\n                    delete data[key];\n\n                    data[prop] = lib.extendDeepNoArrays(data[prop] || {}, lib.objectFromPath(key, lib.expandObjectPaths(datum))[prop]);\n                } else if((match = key.match(indexedPropertyRegex))) {\n                    datum = data[key];\n\n                    prop = match[1];\n                    idx = parseInt(match[2]);\n\n                    delete data[key];\n\n                    data[prop] = data[prop] || [];\n\n                    if(match[3] === '.') {\n                        // This is the case where theere are subsequent properties into which\n                        // we must recurse, e.g. transforms[0].value\n                        trailingPath = match[4];\n                        dest = data[prop][idx] = data[prop][idx] || {};\n\n                        // NB: Extend deep no arrays prevents this from working on multiple\n                        // nested properties in the same object, e.g.\n                        //\n                        // {\n                        //   foo[0].bar[1].range\n                        //   foo[0].bar[0].range\n                        // }\n                        //\n                        // In this case, the extendDeepNoArrays will overwrite one array with\n                        // the other, so that both properties *will not* be present in the\n                        // result. Fixing this would require a more intelligent tracking\n                        // of changes and merging than extendDeepNoArrays currently accomplishes.\n                        lib.extendDeepNoArrays(dest, lib.objectFromPath(trailingPath, lib.expandObjectPaths(datum)));\n                    } else {\n                        // This is the case where this property is the end of the line,\n                        // e.g. xaxis.range[0]\n                        data[prop][idx] = lib.expandObjectPaths(datum);\n                    }\n                } else {\n                    data[key] = lib.expandObjectPaths(data[key]);\n                }\n            }\n        }\n    }\n\n    return data;\n};\n\n/**\n * Converts value to string separated by the provided separators.\n *\n * @example\n * lib.numSeparate(2016, '.,');\n * // returns '2016'\n *\n * @example\n * lib.numSeparate(3000, '.,', true);\n * // returns '3,000'\n *\n * @example\n * lib.numSeparate(1234.56, '|,')\n * // returns '1,234|56'\n *\n * @param   {string|number} value       the value to be converted\n * @param   {string}    separators  string of decimal, then thousands separators\n * @param   {boolean}    separatethousands  boolean, 4-digit integers are separated if true\n *\n * @return  {string}    the value that has been separated\n */\nlib.numSeparate = function(value, separators, separatethousands) {\n    if(!separatethousands) separatethousands = false;\n\n    if(typeof separators !== 'string' || separators.length === 0) {\n        throw new Error('Separator string required for formatting!');\n    }\n\n    if(typeof value === 'number') {\n        value = String(value);\n    }\n\n    var thousandsRe = /(\\d+)(\\d{3})/;\n    var decimalSep = separators.charAt(0);\n    var thouSep = separators.charAt(1);\n\n    var x = value.split('.');\n    var x1 = x[0];\n    var x2 = x.length > 1 ? decimalSep + x[1] : '';\n\n    // Years are ignored for thousands separators\n    if(thouSep && (x.length > 1 || x1.length > 4 || separatethousands)) {\n        while(thousandsRe.test(x1)) {\n            x1 = x1.replace(thousandsRe, '$1' + thouSep + '$2');\n        }\n    }\n\n    return x1 + x2;\n};\n\nlib.TEMPLATE_STRING_REGEX = /%{([^\\s%{}:]*)(:[^}]*)?}/g;\nvar SIMPLE_PROPERTY_REGEX = /^\\w*$/;\n\n/**\n * Substitute values from an object into a string\n *\n * Examples:\n *  Lib.templateString('name: %{trace}', {trace: 'asdf'}) --> 'name: asdf'\n *  Lib.templateString('name: %{trace[0].name}', {trace: [{name: 'asdf'}]}) --> 'name: asdf'\n *\n * @param {string}  input string containing %{...} template strings\n * @param {obj}     data object containing substitution values\n *\n * @return {string} templated string\n */\nlib.templateString = function(string, obj) {\n    // Not all that useful, but cache nestedProperty instantiation\n    // just in case it speeds things up *slightly*:\n    var getterCache = {};\n\n    return string.replace(lib.TEMPLATE_STRING_REGEX, function(dummy, key) {\n        if(SIMPLE_PROPERTY_REGEX.test(key)) {\n            return obj[key] || '';\n        }\n        getterCache[key] = getterCache[key] || lib.nestedProperty(obj, key).get;\n        return getterCache[key]() || '';\n    });\n};\n\nvar TEMPLATE_STRING_FORMAT_SEPARATOR = /^:/;\nvar numberOfHoverTemplateWarnings = 0;\nvar maximumNumberOfHoverTemplateWarnings = 10;\n/**\n * Substitute values from an object into a string and optionally formats them using d3-format,\n * or fallback to associated labels.\n *\n * Examples:\n *  Lib.hovertemplateString('name: %{trace}', {trace: 'asdf'}) --> 'name: asdf'\n *  Lib.hovertemplateString('name: %{trace[0].name}', {trace: [{name: 'asdf'}]}) --> 'name: asdf'\n *  Lib.hovertemplateString('price: %{y:$.2f}', {y: 1}) --> 'price: $1.00'\n *\n * @param {obj}     d3 locale\n * @param {string}  input string containing %{...:...} template strings\n * @param {obj}     data object containing fallback text when no formatting is specified, ex.: {yLabel: 'formattedYValue'}\n * @param {obj}     data objects containing substitution values\n *\n * @return {string} templated string\n */\nlib.hovertemplateString = function(string, labels, d3locale) {\n    var args = arguments;\n    // Not all that useful, but cache nestedProperty instantiation\n    // just in case it speeds things up *slightly*:\n    var getterCache = {};\n\n    return string.replace(lib.TEMPLATE_STRING_REGEX, function(match, key, format) {\n        var obj, value, i;\n        for(i = 3; i < args.length; i++) {\n            obj = args[i];\n            if(obj.hasOwnProperty(key)) {\n                value = obj[key];\n                break;\n            }\n\n            if(!SIMPLE_PROPERTY_REGEX.test(key)) {\n                value = getterCache[key] || lib.nestedProperty(obj, key).get();\n                if(value) getterCache[key] = value;\n            }\n            if(value !== undefined) break;\n        }\n\n        if(value === undefined) {\n            if(numberOfHoverTemplateWarnings < maximumNumberOfHoverTemplateWarnings) {\n                lib.warn('Variable \\'' + key + '\\' in hovertemplate could not be found!');\n                value = match;\n            }\n\n            if(numberOfHoverTemplateWarnings === maximumNumberOfHoverTemplateWarnings) {\n                lib.warn('Too many hovertemplate warnings - additional warnings will be suppressed');\n            }\n            numberOfHoverTemplateWarnings++;\n        }\n\n        if(format) {\n            var fmt;\n            if(d3locale) {\n                fmt = d3locale.numberFormat;\n            } else {\n                fmt = d3.format;\n            }\n            value = fmt(format.replace(TEMPLATE_STRING_FORMAT_SEPARATOR, ''))(value);\n        } else {\n            if(labels.hasOwnProperty(key + 'Label')) value = labels[key + 'Label'];\n        }\n        return value;\n    });\n};\n\n/*\n * alphanumeric string sort, tailored for subplot IDs like scene2, scene10, x10y13 etc\n */\nvar char0 = 48;\nvar char9 = 57;\nlib.subplotSort = function(a, b) {\n    var l = Math.min(a.length, b.length) + 1;\n    var numA = 0;\n    var numB = 0;\n    for(var i = 0; i < l; i++) {\n        var charA = a.charCodeAt(i) || 0;\n        var charB = b.charCodeAt(i) || 0;\n        var isNumA = charA >= char0 && charA <= char9;\n        var isNumB = charB >= char0 && charB <= char9;\n\n        if(isNumA) numA = 10 * numA + charA - char0;\n        if(isNumB) numB = 10 * numB + charB - char0;\n\n        if(!isNumA || !isNumB) {\n            if(numA !== numB) return numA - numB;\n            if(charA !== charB) return charA - charB;\n        }\n    }\n    return numB - numA;\n};\n\n// repeatable pseudorandom generator\nvar randSeed = 2000000000;\n\nlib.seedPseudoRandom = function() {\n    randSeed = 2000000000;\n};\n\nlib.pseudoRandom = function() {\n    var lastVal = randSeed;\n    randSeed = (69069 * randSeed + 1) % 4294967296;\n    // don't let consecutive vals be too close together\n    // gets away from really trying to be random, in favor of better local uniformity\n    if(Math.abs(randSeed - lastVal) < 429496729) return lib.pseudoRandom();\n    return randSeed / 4294967296;\n};\n\n\n/** Fill hover 'pointData' container with 'correct' hover text value\n *\n * - If trace hoverinfo contains a 'text' flag and hovertext is not set,\n *   the text elements will be seen in the hover labels.\n *\n * - If trace hoverinfo contains a 'text' flag and hovertext is set,\n *   hovertext takes precedence over text\n *   i.e. the hoverinfo elements will be seen in the hover labels\n *\n *  @param {object} calcPt\n *  @param {object} trace\n *  @param {object || array} contOut (mutated here)\n */\nlib.fillText = function(calcPt, trace, contOut) {\n    var fill = Array.isArray(contOut) ?\n        function(v) { contOut.push(v); } :\n        function(v) { contOut.text = v; };\n\n    var htx = lib.extractOption(calcPt, trace, 'htx', 'hovertext');\n    if(lib.isValidTextValue(htx)) return fill(htx);\n\n    var tx = lib.extractOption(calcPt, trace, 'tx', 'text');\n    if(lib.isValidTextValue(tx)) return fill(tx);\n};\n\n// accept all truthy values and 0 (which gets cast to '0' in the hover labels)\nlib.isValidTextValue = function(v) {\n    return v || v === 0;\n};\n\nlib.formatPercent = function(ratio, n) {\n    n = n || 0;\n    var str = (Math.round(100 * ratio * Math.pow(10, n)) * Math.pow(0.1, n)).toFixed(n) + '%';\n    for(var i = 0; i < n; i++) {\n        if(str.indexOf('.') !== -1) {\n            str = str.replace('0%', '%');\n            str = str.replace('.%', '%');\n        }\n    }\n    return str;\n};\n\n},{\"../constants/numerical\":680,\"./anchor_utils\":684,\"./angles\":685,\"./array\":686,\"./clean_number\":687,\"./clear_responsive\":689,\"./coerce\":690,\"./dates\":691,\"./extend\":693,\"./filter_unique\":694,\"./filter_visible\":695,\"./geometry2d\":698,\"./get_graph_div\":699,\"./identity\":702,\"./is_plain_object\":704,\"./keyed_container\":705,\"./localize\":706,\"./loggers\":707,\"./make_trace_groups\":708,\"./matrix\":709,\"./mod\":710,\"./nested_property\":711,\"./noop\":712,\"./notifier\":713,\"./push_unique\":717,\"./regex\":719,\"./relative_attr\":720,\"./relink_private\":721,\"./search\":722,\"./stats\":725,\"./throttle\":728,\"./to_log_range\":729,\"d3\":157,\"fast-isnumeric\":224}],704:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n// more info: http://stackoverflow.com/questions/18531624/isplainobject-thing\nmodule.exports = function isPlainObject(obj) {\n    // We need to be a little less strict in the `imagetest` container because\n    // of how async image requests are handled.\n    //\n    // N.B. isPlainObject(new Constructor()) will return true in `imagetest`\n    if(window && window.process && window.process.versions) {\n        return Object.prototype.toString.call(obj) === '[object Object]';\n    }\n\n    return (\n        Object.prototype.toString.call(obj) === '[object Object]' &&\n        Object.getPrototypeOf(obj) === Object.prototype\n    );\n};\n\n},{}],705:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar nestedProperty = _dereq_('./nested_property');\n\nvar SIMPLE_PROPERTY_REGEX = /^\\w*$/;\n\n// bitmask for deciding what's updated. Sometimes the name needs to be updated,\n// sometimes the value needs to be updated, and sometimes both do. This is just\n// a simple way to track what's updated such that it's a simple OR operation to\n// assimilate new updates.\n//\n// The only exception is the UNSET bit that tracks when we need to explicitly\n// unset and remove the property. This concrn arises because of the special\n// way in which nestedProperty handles null/undefined. When you specify `null`,\n// it prunes any unused items in the tree. I ran into some issues with it getting\n// null vs undefined confused, so UNSET is just a bit that forces the property\n// update to send `null`, removing the property explicitly rather than setting\n// it to undefined.\nvar NONE = 0;\nvar NAME = 1;\nvar VALUE = 2;\nvar BOTH = 3;\nvar UNSET = 4;\n\nmodule.exports = function keyedContainer(baseObj, path, keyName, valueName) {\n    keyName = keyName || 'name';\n    valueName = valueName || 'value';\n    var i, arr, baseProp;\n    var changeTypes = {};\n\n    if(path && path.length) {\n        baseProp = nestedProperty(baseObj, path);\n        arr = baseProp.get();\n    } else {\n        arr = baseObj;\n    }\n\n    path = path || '';\n\n    // Construct an index:\n    var indexLookup = {};\n    if(arr) {\n        for(i = 0; i < arr.length; i++) {\n            indexLookup[arr[i][keyName]] = i;\n        }\n    }\n\n    var isSimpleValueProp = SIMPLE_PROPERTY_REGEX.test(valueName);\n\n    var obj = {\n        set: function(name, value) {\n            var changeType = value === null ? UNSET : NONE;\n\n            // create the base array if necessary\n            if(!arr) {\n                if(!baseProp || changeType === UNSET) return;\n\n                arr = [];\n                baseProp.set(arr);\n            }\n\n            var idx = indexLookup[name];\n            if(idx === undefined) {\n                if(changeType === UNSET) return;\n\n                changeType = changeType | BOTH;\n                idx = arr.length;\n                indexLookup[name] = idx;\n            } else if(value !== (isSimpleValueProp ? arr[idx][valueName] : nestedProperty(arr[idx], valueName).get())) {\n                changeType = changeType | VALUE;\n            }\n\n            var newValue = arr[idx] = arr[idx] || {};\n            newValue[keyName] = name;\n\n            if(isSimpleValueProp) {\n                newValue[valueName] = value;\n            } else {\n                nestedProperty(newValue, valueName).set(value);\n            }\n\n            // If it's not an unset, force that bit to be unset. This is all related to the fact\n            // that undefined and null are a bit specially implemented in nestedProperties.\n            if(value !== null) {\n                changeType = changeType & ~UNSET;\n            }\n\n            changeTypes[idx] = changeTypes[idx] | changeType;\n\n            return obj;\n        },\n        get: function(name) {\n            if(!arr) return;\n\n            var idx = indexLookup[name];\n\n            if(idx === undefined) {\n                return undefined;\n            } else if(isSimpleValueProp) {\n                return arr[idx][valueName];\n            } else {\n                return nestedProperty(arr[idx], valueName).get();\n            }\n        },\n        rename: function(name, newName) {\n            var idx = indexLookup[name];\n\n            if(idx === undefined) return obj;\n            changeTypes[idx] = changeTypes[idx] | NAME;\n\n            indexLookup[newName] = idx;\n            delete indexLookup[name];\n\n            arr[idx][keyName] = newName;\n\n            return obj;\n        },\n        remove: function(name) {\n            var idx = indexLookup[name];\n\n            if(idx === undefined) return obj;\n\n            var object = arr[idx];\n            if(Object.keys(object).length > 2) {\n                // This object contains more than just the key/value, so unset\n                // the value without modifying the entry otherwise:\n                changeTypes[idx] = changeTypes[idx] | VALUE;\n                return obj.set(name, null);\n            }\n\n            if(isSimpleValueProp) {\n                for(i = idx; i < arr.length; i++) {\n                    changeTypes[i] = changeTypes[i] | BOTH;\n                }\n                for(i = idx; i < arr.length; i++) {\n                    indexLookup[arr[i][keyName]]--;\n                }\n                arr.splice(idx, 1);\n                delete(indexLookup[name]);\n            } else {\n                // Perform this update *strictly* so we can check whether the result's\n                // been pruned. If so, it's a removal. If not, it's a value unset only.\n                nestedProperty(object, valueName).set(null);\n\n                // Now check if the top level nested property has any keys left. If so,\n                // the object still has values so we only want to unset the key. If not,\n                // the entire object can be removed since there's no other data.\n                // var topLevelKeys = Object.keys(object[valueName.split('.')[0]] || []);\n\n                changeTypes[idx] = changeTypes[idx] | VALUE | UNSET;\n            }\n\n            return obj;\n        },\n        constructUpdate: function() {\n            var astr, idx;\n            var update = {};\n            var changed = Object.keys(changeTypes);\n            for(var i = 0; i < changed.length; i++) {\n                idx = changed[i];\n                astr = path + '[' + idx + ']';\n                if(arr[idx]) {\n                    if(changeTypes[idx] & NAME) {\n                        update[astr + '.' + keyName] = arr[idx][keyName];\n                    }\n                    if(changeTypes[idx] & VALUE) {\n                        if(isSimpleValueProp) {\n                            update[astr + '.' + valueName] = (changeTypes[idx] & UNSET) ? null : arr[idx][valueName];\n                        } else {\n                            update[astr + '.' + valueName] = (changeTypes[idx] & UNSET) ? null : nestedProperty(arr[idx], valueName).get();\n                        }\n                    }\n                } else {\n                    update[astr] = null;\n                }\n            }\n\n            return update;\n        }\n    };\n\n    return obj;\n};\n\n},{\"./nested_property\":711}],706:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\n\n/**\n * localize: translate a string for the current locale\n *\n * @param {object} gd: the graphDiv for context\n *  gd._context.locale determines the language (& optional region/country)\n *  the dictionary for each locale may either be supplied in\n *  gd._context.locales or globally via Plotly.register\n * @param {string} s: the string to translate\n */\nmodule.exports = function localize(gd, s) {\n    var locale = gd._context.locale;\n\n    /*\n     * Priority of lookup:\n     *     contextDicts[locale],\n     *     registeredDicts[locale],\n     *     contextDicts[baseLocale], (if baseLocale is distinct)\n     *     registeredDicts[baseLocale]\n     * Return the first translation we find.\n     * This way if you have a regionalization you are allowed to specify\n     * only what's different from the base locale, everything else will\n     * fall back on the base.\n     */\n    for(var i = 0; i < 2; i++) {\n        var locales = gd._context.locales;\n        for(var j = 0; j < 2; j++) {\n            var dict = (locales[locale] || {}).dictionary;\n            if(dict) {\n                var out = dict[s];\n                if(out) return out;\n            }\n            locales = Registry.localeRegistry;\n        }\n\n        var baseLocale = locale.split('-')[0];\n        if(baseLocale === locale) break;\n        locale = baseLocale;\n    }\n\n    return s;\n};\n\n},{\"../registry\":831}],707:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/* eslint-disable no-console */\n\nvar dfltConfig = _dereq_('../plot_api/plot_config').dfltConfig;\n\nvar loggers = module.exports = {};\n\n/**\n * ------------------------------------------\n * debugging tools\n * ------------------------------------------\n */\n\nloggers.log = function() {\n    if(dfltConfig.logging > 1) {\n        var messages = ['LOG:'];\n\n        for(var i = 0; i < arguments.length; i++) {\n            messages.push(arguments[i]);\n        }\n\n        apply(console.trace || console.log, messages);\n    }\n};\n\nloggers.warn = function() {\n    if(dfltConfig.logging > 0) {\n        var messages = ['WARN:'];\n\n        for(var i = 0; i < arguments.length; i++) {\n            messages.push(arguments[i]);\n        }\n\n        apply(console.trace || console.log, messages);\n    }\n};\n\nloggers.error = function() {\n    if(dfltConfig.logging > 0) {\n        var messages = ['ERROR:'];\n\n        for(var i = 0; i < arguments.length; i++) {\n            messages.push(arguments[i]);\n        }\n\n        apply(console.error, messages);\n    }\n};\n\n/*\n * Robust apply, for IE9 where console.log doesn't support\n * apply like other functions do\n */\nfunction apply(f, args) {\n    if(f && f.apply) {\n        try {\n            // `this` should always be console, since here we're always\n            // applying a method of the console object.\n            f.apply(console, args);\n            return;\n        } catch(e) { /* in case apply failed, fall back on the code below */ }\n    }\n\n    // no apply - just try calling the function on each arg independently\n    for(var i = 0; i < args.length; i++) {\n        try {\n            f(args[i]);\n        } catch(e) {\n            // still fails - last resort simple console.log\n            console.log(args[i]);\n        }\n    }\n}\n\n},{\"../plot_api/plot_config\":739}],708:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n/**\n * General helper to manage trace groups based on calcdata\n *\n * @param {d3.selection} traceLayer: a selection containing a single group\n *     to draw these traces into\n * @param {array} cdModule: array of calcdata items for this\n *     module and subplot combination. Assumes the calcdata item for each\n *     trace is an array with the fullData trace attached to the first item.\n * @param {string} cls: the class attribute to give each trace group\n *     so you can give multiple classes separated by spaces\n */\nmodule.exports = function makeTraceGroups(traceLayer, cdModule, cls) {\n    var traces = traceLayer.selectAll('g.' + cls.replace(/\\s/g, '.'))\n        .data(cdModule, function(cd) { return cd[0].trace.uid; });\n\n    traces.exit().remove();\n\n    traces.enter().append('g')\n        .attr('class', cls);\n\n    traces.order();\n\n    return traces;\n};\n\n},{}],709:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nexports.init2dArray = function(rowLength, colLength) {\n    var array = new Array(rowLength);\n    for(var i = 0; i < rowLength; i++) array[i] = new Array(colLength);\n    return array;\n};\n\n/**\n * transpose a (possibly ragged) 2d array z. inspired by\n * http://stackoverflow.com/questions/17428587/\n * transposing-a-2d-array-in-javascript\n */\nexports.transposeRagged = function(z) {\n    var maxlen = 0;\n    var zlen = z.length;\n    var i, j;\n    // Maximum row length:\n    for(i = 0; i < zlen; i++) maxlen = Math.max(maxlen, z[i].length);\n\n    var t = new Array(maxlen);\n    for(i = 0; i < maxlen; i++) {\n        t[i] = new Array(zlen);\n        for(j = 0; j < zlen; j++) t[i][j] = z[j][i];\n    }\n\n    return t;\n};\n\n// our own dot function so that we don't need to include numeric\nexports.dot = function(x, y) {\n    if(!(x.length && y.length) || x.length !== y.length) return null;\n\n    var len = x.length;\n    var out;\n    var i;\n\n    if(x[0].length) {\n        // mat-vec or mat-mat\n        out = new Array(len);\n        for(i = 0; i < len; i++) out[i] = exports.dot(x[i], y);\n    } else if(y[0].length) {\n        // vec-mat\n        var yTranspose = exports.transposeRagged(y);\n        out = new Array(yTranspose.length);\n        for(i = 0; i < yTranspose.length; i++) out[i] = exports.dot(x, yTranspose[i]);\n    } else {\n        // vec-vec\n        out = 0;\n        for(i = 0; i < len; i++) out += x[i] * y[i];\n    }\n\n    return out;\n};\n\n// translate by (x,y)\nexports.translationMatrix = function(x, y) {\n    return [[1, 0, x], [0, 1, y], [0, 0, 1]];\n};\n\n// rotate by alpha around (0,0)\nexports.rotationMatrix = function(alpha) {\n    var a = alpha * Math.PI / 180;\n    return [[Math.cos(a), -Math.sin(a), 0],\n            [Math.sin(a), Math.cos(a), 0],\n            [0, 0, 1]];\n};\n\n// rotate by alpha around (x,y)\nexports.rotationXYMatrix = function(a, x, y) {\n    return exports.dot(\n        exports.dot(exports.translationMatrix(x, y),\n                    exports.rotationMatrix(a)),\n        exports.translationMatrix(-x, -y));\n};\n\n// applies a 2D transformation matrix to either x and y params or an [x,y] array\nexports.apply2DTransform = function(transform) {\n    return function() {\n        var args = arguments;\n        if(args.length === 3) {\n            args = args[0];\n        }// from map\n        var xy = arguments.length === 1 ? args[0] : [args[0], args[1]];\n        return exports.dot(transform, [xy[0], xy[1], 1]).slice(0, 2);\n    };\n};\n\n// applies a 2D transformation matrix to an [x1,y1,x2,y2] array (to transform a segment)\nexports.apply2DTransform2 = function(transform) {\n    var at = exports.apply2DTransform(transform);\n    return function(xys) {\n        return at(xys.slice(0, 2)).concat(at(xys.slice(2, 4)));\n    };\n};\n\n},{}],710:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * sanitized modulus function that always returns in the range [0, d)\n * rather than (-d, 0] if v is negative\n */\nfunction mod(v, d) {\n    var out = v % d;\n    return out < 0 ? out + d : out;\n}\n\n/**\n * sanitized modulus function that always returns in the range [-d/2, d/2]\n * rather than (-d, 0] if v is negative\n */\nfunction modHalf(v, d) {\n    return Math.abs(v) > (d / 2) ?\n        v - Math.round(v / d) * d :\n        v;\n}\n\nmodule.exports = {\n    mod: mod,\n    modHalf: modHalf\n};\n\n},{}],711:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;\n\n/**\n * convert a string s (such as 'xaxis.range[0]')\n * representing a property of nested object into set and get methods\n * also return the string and object so we don't have to keep track of them\n * allows [-1] for an array index, to set a property inside all elements\n * of an array\n * eg if obj = {arr: [{a: 1}, {a: 2}]}\n * you can do p = nestedProperty(obj, 'arr[-1].a')\n * but you cannot set the array itself this way, to do that\n * just set the whole array.\n * eg if obj = {arr: [1, 2, 3]}\n * you can't do nestedProperty(obj, 'arr[-1]').set(5)\n * but you can do nestedProperty(obj, 'arr').set([5, 5, 5])\n */\nmodule.exports = function nestedProperty(container, propStr) {\n    if(isNumeric(propStr)) propStr = String(propStr);\n    else if(typeof propStr !== 'string' ||\n            propStr.substr(propStr.length - 4) === '[-1]') {\n        throw 'bad property string';\n    }\n\n    var j = 0;\n    var propParts = propStr.split('.');\n    var indexed;\n    var indices;\n    var i;\n\n    // check for parts of the nesting hierarchy that are numbers (ie array elements)\n    while(j < propParts.length) {\n        // look for non-bracket chars, then any number of [##] blocks\n        indexed = String(propParts[j]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/);\n        if(indexed) {\n            if(indexed[1]) propParts[j] = indexed[1];\n            // allow propStr to start with bracketed array indices\n            else if(j === 0) propParts.splice(0, 1);\n            else throw 'bad property string';\n\n            indices = indexed[2]\n                .substr(1, indexed[2].length - 2)\n                .split('][');\n\n            for(i = 0; i < indices.length; i++) {\n                j++;\n                propParts.splice(j, 0, Number(indices[i]));\n            }\n        }\n        j++;\n    }\n\n    if(typeof container !== 'object') {\n        return badContainer(container, propStr, propParts);\n    }\n\n    return {\n        set: npSet(container, propParts, propStr),\n        get: npGet(container, propParts),\n        astr: propStr,\n        parts: propParts,\n        obj: container\n    };\n};\n\nfunction npGet(cont, parts) {\n    return function() {\n        var curCont = cont;\n        var curPart;\n        var allSame;\n        var out;\n        var i;\n        var j;\n\n        for(i = 0; i < parts.length - 1; i++) {\n            curPart = parts[i];\n            if(curPart === -1) {\n                allSame = true;\n                out = [];\n                for(j = 0; j < curCont.length; j++) {\n                    out[j] = npGet(curCont[j], parts.slice(i + 1))();\n                    if(out[j] !== out[0]) allSame = false;\n                }\n                return allSame ? out[0] : out;\n            }\n            if(typeof curPart === 'number' && !isArrayOrTypedArray(curCont)) {\n                return undefined;\n            }\n            curCont = curCont[curPart];\n            if(typeof curCont !== 'object' || curCont === null) {\n                return undefined;\n            }\n        }\n\n        // only hit this if parts.length === 1\n        if(typeof curCont !== 'object' || curCont === null) return undefined;\n\n        out = curCont[parts[i]];\n        if(out === null) return undefined;\n        return out;\n    };\n}\n\n/*\n * Can this value be deleted? We can delete `undefined`, and `null` except INSIDE an\n * *args* array.\n *\n * Previously we also deleted some `{}` and `[]`, in order to try and make set/unset\n * a net noop; but this causes far more complication than it's worth, and still had\n * lots of exceptions. See https://github.com/plotly/plotly.js/issues/1410\n *\n * *args* arrays get passed directly to API methods and we should respect null if\n * the user put it there, but otherwise null is deleted as we use it as code\n * in restyle/relayout/update for \"delete this value\" whereas undefined means\n * \"ignore this edit\"\n */\nvar ARGS_PATTERN = /(^|\\.)args\\[/;\nfunction isDeletable(val, propStr) {\n    return (val === undefined) || (val === null && !propStr.match(ARGS_PATTERN));\n}\n\nfunction npSet(cont, parts, propStr) {\n    return function(val) {\n        var curCont = cont;\n        var propPart = '';\n        var containerLevels = [[cont, propPart]];\n        var toDelete = isDeletable(val, propStr);\n        var curPart;\n        var i;\n\n        for(i = 0; i < parts.length - 1; i++) {\n            curPart = parts[i];\n\n            if(typeof curPart === 'number' && !isArrayOrTypedArray(curCont)) {\n                throw 'array index but container is not an array';\n            }\n\n            // handle special -1 array index\n            if(curPart === -1) {\n                toDelete = !setArrayAll(curCont, parts.slice(i + 1), val, propStr);\n                if(toDelete) break;\n                else return;\n            }\n\n            if(!checkNewContainer(curCont, curPart, parts[i + 1], toDelete)) {\n                break;\n            }\n\n            curCont = curCont[curPart];\n\n            if(typeof curCont !== 'object' || curCont === null) {\n                throw 'container is not an object';\n            }\n\n            propPart = joinPropStr(propPart, curPart);\n\n            containerLevels.push([curCont, propPart]);\n        }\n\n        if(toDelete) {\n            if(i === parts.length - 1) {\n                delete curCont[parts[i]];\n\n                // The one bit of pruning we still do: drop `undefined` from the end of arrays.\n                // In case someone has already unset previous items, continue until we hit a\n                // non-undefined value.\n                if(Array.isArray(curCont) && +parts[i] === curCont.length - 1) {\n                    while(curCont.length && curCont[curCont.length - 1] === undefined) {\n                        curCont.pop();\n                    }\n                }\n            }\n        } else curCont[parts[i]] = val;\n    };\n}\n\nfunction joinPropStr(propStr, newPart) {\n    var toAdd = newPart;\n    if(isNumeric(newPart)) toAdd = '[' + newPart + ']';\n    else if(propStr) toAdd = '.' + newPart;\n\n    return propStr + toAdd;\n}\n\n// handle special -1 array index\nfunction setArrayAll(containerArray, innerParts, val, propStr) {\n    var arrayVal = isArrayOrTypedArray(val);\n    var allSet = true;\n    var thisVal = val;\n    var thisPropStr = propStr.replace('-1', 0);\n    var deleteThis = arrayVal ? false : isDeletable(val, thisPropStr);\n    var firstPart = innerParts[0];\n    var i;\n\n    for(i = 0; i < containerArray.length; i++) {\n        thisPropStr = propStr.replace('-1', i);\n        if(arrayVal) {\n            thisVal = val[i % val.length];\n            deleteThis = isDeletable(thisVal, thisPropStr);\n        }\n        if(deleteThis) allSet = false;\n        if(!checkNewContainer(containerArray, i, firstPart, deleteThis)) {\n            continue;\n        }\n        npSet(containerArray[i], innerParts, propStr.replace('-1', i))(thisVal);\n    }\n    return allSet;\n}\n\n/**\n * make new sub-container as needed.\n * returns false if there's no container and none is needed\n * because we're only deleting an attribute\n */\nfunction checkNewContainer(container, part, nextPart, toDelete) {\n    if(container[part] === undefined) {\n        if(toDelete) return false;\n\n        if(typeof nextPart === 'number') container[part] = [];\n        else container[part] = {};\n    }\n    return true;\n}\n\nfunction badContainer(container, propStr, propParts) {\n    return {\n        set: function() { throw 'bad container'; },\n        get: function() {},\n        astr: propStr,\n        parts: propParts,\n        obj: container\n    };\n}\n\n},{\"./array\":686,\"fast-isnumeric\":224}],712:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// Simple helper functions\n// none of these need any external deps\n\nmodule.exports = function noop() {};\n\n},{}],713:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar NOTEDATA = [];\n\n/**\n * notifier\n * @param {String} text The person's user name\n * @param {Number} [delay=1000] The delay time in milliseconds\n *          or 'long' which provides 2000 ms delay time.\n * @return {undefined} this function does not return a value\n */\nmodule.exports = function(text, displayLength) {\n    if(NOTEDATA.indexOf(text) !== -1) return;\n\n    NOTEDATA.push(text);\n\n    var ts = 1000;\n    if(isNumeric(displayLength)) ts = displayLength;\n    else if(displayLength === 'long') ts = 3000;\n\n    var notifierContainer = d3.select('body')\n        .selectAll('.plotly-notifier')\n        .data([0]);\n    notifierContainer.enter()\n        .append('div')\n        .classed('plotly-notifier', true);\n\n    var notes = notifierContainer.selectAll('.notifier-note').data(NOTEDATA);\n\n    function killNote(transition) {\n        transition\n            .duration(700)\n            .style('opacity', 0)\n            .each('end', function(thisText) {\n                var thisIndex = NOTEDATA.indexOf(thisText);\n                if(thisIndex !== -1) NOTEDATA.splice(thisIndex, 1);\n                d3.select(this).remove();\n            });\n    }\n\n    notes.enter().append('div')\n        .classed('notifier-note', true)\n        .style('opacity', 0)\n        .each(function(thisText) {\n            var note = d3.select(this);\n\n            note.append('button')\n                .classed('notifier-close', true)\n                .html('&times;')\n                .on('click', function() {\n                    note.transition().call(killNote);\n                });\n\n            var p = note.append('p');\n            var lines = thisText.split(/<br\\s*\\/?>/g);\n            for(var i = 0; i < lines.length; i++) {\n                if(i) p.append('br');\n                p.append('span').text(lines[i]);\n            }\n\n            note.transition()\n                    .duration(700)\n                    .style('opacity', 1)\n                .transition()\n                    .delay(ts)\n                    .call(killNote);\n        });\n};\n\n},{\"d3\":157,\"fast-isnumeric\":224}],714:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar setCursor = _dereq_('./setcursor');\n\nvar STASHATTR = 'data-savedcursor';\nvar NO_CURSOR = '!!';\n\n/*\n * works with our CSS cursor classes (see css/_cursor.scss)\n * to override a previous cursor set on d3 single-element selections,\n * by moving the name of the original cursor to the data-savedcursor attr.\n * omit cursor to revert to the previously set value.\n */\nmodule.exports = function overrideCursor(el3, csr) {\n    var savedCursor = el3.attr(STASHATTR);\n    if(csr) {\n        if(!savedCursor) {\n            var classes = (el3.attr('class') || '').split(' ');\n            for(var i = 0; i < classes.length; i++) {\n                var cls = classes[i];\n                if(cls.indexOf('cursor-') === 0) {\n                    el3.attr(STASHATTR, cls.substr(7))\n                        .classed(cls, false);\n                }\n            }\n            if(!el3.attr(STASHATTR)) {\n                el3.attr(STASHATTR, NO_CURSOR);\n            }\n        }\n        setCursor(el3, csr);\n    } else if(savedCursor) {\n        el3.attr(STASHATTR, null);\n\n        if(savedCursor === NO_CURSOR) setCursor(el3);\n        else setCursor(el3, savedCursor);\n    }\n};\n\n},{\"./setcursor\":723}],715:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar dot = _dereq_('./matrix').dot;\nvar BADNUM = _dereq_('../constants/numerical').BADNUM;\n\nvar polygon = module.exports = {};\n\n/**\n * Turn an array of [x, y] pairs into a polygon object\n * that can test if points are inside it\n *\n * @param ptsIn Array of [x, y] pairs\n *\n * @returns polygon Object {xmin, xmax, ymin, ymax, pts, contains}\n *      (x|y)(min|max) are the bounding rect of the polygon\n *      pts is the original array, with the first pair repeated at the end\n *      contains is a function: (pt, omitFirstEdge)\n *          pt is the [x, y] pair to test\n *          omitFirstEdge truthy means points exactly on the first edge don't\n *              count. This is for use adding one polygon to another so we\n *              don't double-count the edge where they meet.\n *          returns boolean: is pt inside the polygon (including on its edges)\n */\npolygon.tester = function tester(ptsIn) {\n    var pts = ptsIn.slice();\n    var xmin = pts[0][0];\n    var xmax = xmin;\n    var ymin = pts[0][1];\n    var ymax = ymin;\n    var i;\n\n    pts.push(pts[0]);\n    for(i = 1; i < pts.length; i++) {\n        xmin = Math.min(xmin, pts[i][0]);\n        xmax = Math.max(xmax, pts[i][0]);\n        ymin = Math.min(ymin, pts[i][1]);\n        ymax = Math.max(ymax, pts[i][1]);\n    }\n\n    // do we have a rectangle? Handle this here, so we can use the same\n    // tester for the rectangular case without sacrificing speed\n\n    var isRect = false;\n    var rectFirstEdgeTest;\n\n    if(pts.length === 5) {\n        if(pts[0][0] === pts[1][0]) { // vert, horz, vert, horz\n            if(pts[2][0] === pts[3][0] &&\n                    pts[0][1] === pts[3][1] &&\n                    pts[1][1] === pts[2][1]) {\n                isRect = true;\n                rectFirstEdgeTest = function(pt) { return pt[0] === pts[0][0]; };\n            }\n        } else if(pts[0][1] === pts[1][1]) { // horz, vert, horz, vert\n            if(pts[2][1] === pts[3][1] &&\n                    pts[0][0] === pts[3][0] &&\n                    pts[1][0] === pts[2][0]) {\n                isRect = true;\n                rectFirstEdgeTest = function(pt) { return pt[1] === pts[0][1]; };\n            }\n        }\n    }\n\n    function rectContains(pt, omitFirstEdge) {\n        var x = pt[0];\n        var y = pt[1];\n\n        if(x === BADNUM || x < xmin || x > xmax || y === BADNUM || y < ymin || y > ymax) {\n            // pt is outside the bounding box of polygon\n            return false;\n        }\n        if(omitFirstEdge && rectFirstEdgeTest(pt)) return false;\n\n        return true;\n    }\n\n    function contains(pt, omitFirstEdge) {\n        var x = pt[0];\n        var y = pt[1];\n\n        if(x === BADNUM || x < xmin || x > xmax || y === BADNUM || y < ymin || y > ymax) {\n            // pt is outside the bounding box of polygon\n            return false;\n        }\n\n        var imax = pts.length;\n        var x1 = pts[0][0];\n        var y1 = pts[0][1];\n        var crossings = 0;\n        var i;\n        var x0;\n        var y0;\n        var xmini;\n        var ycross;\n\n        for(i = 1; i < imax; i++) {\n            // find all crossings of a vertical line upward from pt with\n            // polygon segments\n            // crossings exactly at xmax don't count, unless the point is\n            // exactly on the segment, then it counts as inside.\n            x0 = x1;\n            y0 = y1;\n            x1 = pts[i][0];\n            y1 = pts[i][1];\n            xmini = Math.min(x0, x1);\n\n            if(x < xmini || x > Math.max(x0, x1) || y > Math.max(y0, y1)) {\n                // outside the bounding box of this segment, it's only a crossing\n                // if it's below the box.\n\n                continue;\n            } else if(y < Math.min(y0, y1)) {\n                // don't count the left-most point of the segment as a crossing\n                // because we don't want to double-count adjacent crossings\n                // UNLESS the polygon turns past vertical at exactly this x\n                // Note that this is repeated below, but we can't factor it out\n                // because\n                if(x !== xmini) crossings++;\n            } else {\n                // inside the bounding box, check the actual line intercept\n\n                // vertical segment - we know already that the point is exactly\n                // on the segment, so mark the crossing as exactly at the point.\n                if(x1 === x0) ycross = y;\n                // any other angle\n                else ycross = y0 + (x - x0) * (y1 - y0) / (x1 - x0);\n\n                // exactly on the edge: counts as inside the polygon, unless it's the\n                // first edge and we're omitting it.\n                if(y === ycross) {\n                    if(i === 1 && omitFirstEdge) return false;\n                    return true;\n                }\n\n                if(y <= ycross && x !== xmini) crossings++;\n            }\n        }\n\n        // if we've gotten this far, odd crossings means inside, even is outside\n        return crossings % 2 === 1;\n    }\n\n    // detect if poly is degenerate\n    var degenerate = true;\n    var lastPt = pts[0];\n    for(i = 1; i < pts.length; i++) {\n        if(lastPt[0] !== pts[i][0] || lastPt[1] !== pts[i][1]) {\n            degenerate = false;\n            break;\n        }\n    }\n\n    return {\n        xmin: xmin,\n        xmax: xmax,\n        ymin: ymin,\n        ymax: ymax,\n        pts: pts,\n        contains: isRect ? rectContains : contains,\n        isRect: isRect,\n        degenerate: degenerate\n    };\n};\n\n/**\n * Test if a segment of a points array is bent or straight\n *\n * @param pts Array of [x, y] pairs\n * @param start the index of the proposed start of the straight section\n * @param end the index of the proposed end point\n * @param tolerance the max distance off the line connecting start and end\n *      before the line counts as bent\n * @returns boolean: true means this segment is bent, false means straight\n */\npolygon.isSegmentBent = function isSegmentBent(pts, start, end, tolerance) {\n    var startPt = pts[start];\n    var segment = [pts[end][0] - startPt[0], pts[end][1] - startPt[1]];\n    var segmentSquared = dot(segment, segment);\n    var segmentLen = Math.sqrt(segmentSquared);\n    var unitPerp = [-segment[1] / segmentLen, segment[0] / segmentLen];\n    var i;\n    var part;\n    var partParallel;\n\n    for(i = start + 1; i < end; i++) {\n        part = [pts[i][0] - startPt[0], pts[i][1] - startPt[1]];\n        partParallel = dot(part, segment);\n\n        if(partParallel < 0 || partParallel > segmentSquared ||\n            Math.abs(dot(part, unitPerp)) > tolerance) return true;\n    }\n    return false;\n};\n\n/**\n * Make a filtering polygon, to minimize the number of segments\n *\n * @param pts Array of [x, y] pairs (must start with at least 1 pair)\n * @param tolerance the maximum deviation from straight allowed for\n *      removing points to simplify the polygon\n *\n * @returns Object {addPt, raw, filtered}\n *      addPt is a function(pt: [x, y] pair) to add a raw point and\n *          continue filtering\n *      raw is all the input points\n *      filtered is the resulting filtered Array of [x, y] pairs\n */\npolygon.filter = function filter(pts, tolerance) {\n    var ptsFiltered = [pts[0]];\n    var doneRawIndex = 0;\n    var doneFilteredIndex = 0;\n\n    function addPt(pt) {\n        pts.push(pt);\n        var prevFilterLen = ptsFiltered.length;\n        var iLast = doneRawIndex;\n        ptsFiltered.splice(doneFilteredIndex + 1);\n\n        for(var i = iLast + 1; i < pts.length; i++) {\n            if(i === pts.length - 1 || polygon.isSegmentBent(pts, iLast, i + 1, tolerance)) {\n                ptsFiltered.push(pts[i]);\n                if(ptsFiltered.length < prevFilterLen - 2) {\n                    doneRawIndex = i;\n                    doneFilteredIndex = ptsFiltered.length - 1;\n                }\n                iLast = i;\n            }\n        }\n    }\n\n    if(pts.length > 1) {\n        var lastPt = pts.pop();\n        addPt(lastPt);\n    }\n\n    return {\n        addPt: addPt,\n        raw: pts,\n        filtered: ptsFiltered\n    };\n};\n\n},{\"../constants/numerical\":680,\"./matrix\":709}],716:[function(_dereq_,module,exports){\n(function (global){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar showNoWebGlMsg = _dereq_('./show_no_webgl_msg');\n\n// Note that this module should be ONLY required into\n// files corresponding to regl trace modules\n// so that bundles with non-regl only don't include\n// regl and all its bytes.\nvar createRegl = _dereq_('regl');\n\n/**\n * Idempotent version of createRegl. Create regl instances\n * in the correct canvases with the correct attributes and\n * options\n *\n * @param {DOM node or object} gd : graph div object\n * @param {array} extensions : list of extension to pass to createRegl\n *\n * @return {boolean} true if all createRegl calls succeeded, false otherwise\n */\nmodule.exports = function prepareRegl(gd, extensions) {\n    var fullLayout = gd._fullLayout;\n    var success = true;\n\n    fullLayout._glcanvas.each(function(d) {\n        if(d.regl) return;\n        // only parcoords needs pick layer\n        if(d.pick && !fullLayout._has('parcoords')) return;\n\n        try {\n            d.regl = createRegl({\n                canvas: this,\n                attributes: {\n                    antialias: !d.pick,\n                    preserveDrawingBuffer: true\n                },\n                pixelRatio: gd._context.plotGlPixelRatio || global.devicePixelRatio,\n                extensions: extensions || []\n            });\n        } catch(e) {\n            success = false;\n        }\n\n        if(success) {\n            this.addEventListener('webglcontextlost', function(event) {\n                if(gd && gd.emit) {\n                    gd.emit('plotly_webglcontextlost', {\n                        event: event,\n                        layer: d.key\n                    });\n                }\n            }, false);\n        }\n    });\n\n    if(!success) {\n        showNoWebGlMsg({container: fullLayout._glcontainer.node()});\n    }\n    return success;\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./show_no_webgl_msg\":724,\"regl\":489}],717:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Push array with unique items\n *\n * Ignores falsy items, except 0 so we can use it to construct arrays of indices.\n *\n * @param {array} array\n *  array to be filled\n * @param {any} item\n *  item to be or not to be inserted\n * @return {array}\n *  ref to array (now possibly containing one more item)\n *\n */\nmodule.exports = function pushUnique(array, item) {\n    if(item instanceof RegExp) {\n        var itemStr = item.toString();\n        for(var i = 0; i < array.length; i++) {\n            if(array[i] instanceof RegExp && array[i].toString() === itemStr) {\n                return array;\n            }\n        }\n        array.push(item);\n    } else if((item || item === 0) && array.indexOf(item) === -1) array.push(item);\n\n    return array;\n};\n\n},{}],718:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar dfltConfig = _dereq_('../plot_api/plot_config').dfltConfig;\n\n/**\n * Copy arg array *without* removing `undefined` values from objects.\n *\n * @param gd\n * @param args\n * @returns {Array}\n */\nfunction copyArgArray(gd, args) {\n    var copy = [];\n    var arg;\n\n    for(var i = 0; i < args.length; i++) {\n        arg = args[i];\n\n        if(arg === gd) copy[i] = arg;\n        else if(typeof arg === 'object') {\n            copy[i] = Array.isArray(arg) ?\n                Lib.extendDeep([], arg) :\n                Lib.extendDeepAll({}, arg);\n        } else copy[i] = arg;\n    }\n\n    return copy;\n}\n\n\n// -----------------------------------------------------\n// Undo/Redo queue for plots\n// -----------------------------------------------------\n\n\nvar queue = {};\n\n// TODO: disable/enable undo and redo buttons appropriately\n\n/**\n * Add an item to the undoQueue for a graphDiv\n *\n * @param gd\n * @param undoFunc Function undo this operation\n * @param undoArgs Args to supply undoFunc with\n * @param redoFunc Function to redo this operation\n * @param redoArgs Args to supply redoFunc with\n */\nqueue.add = function(gd, undoFunc, undoArgs, redoFunc, redoArgs) {\n    var queueObj,\n        queueIndex;\n\n    // make sure we have the queue and our position in it\n    gd.undoQueue = gd.undoQueue || {index: 0, queue: [], sequence: false};\n    queueIndex = gd.undoQueue.index;\n\n    // if we're already playing an undo or redo, or if this is an auto operation\n    // (like pane resize... any others?) then we don't save this to the undo queue\n    if(gd.autoplay) {\n        if(!gd.undoQueue.inSequence) gd.autoplay = false;\n        return;\n    }\n\n    // if we're not in a sequence or are just starting, we need a new queue item\n    if(!gd.undoQueue.sequence || gd.undoQueue.beginSequence) {\n        queueObj = {undo: {calls: [], args: []}, redo: {calls: [], args: []}};\n        gd.undoQueue.queue.splice(queueIndex, gd.undoQueue.queue.length - queueIndex, queueObj);\n        gd.undoQueue.index += 1;\n    } else {\n        queueObj = gd.undoQueue.queue[queueIndex - 1];\n    }\n    gd.undoQueue.beginSequence = false;\n\n    // we unshift to handle calls for undo in a forward for loop later\n    if(queueObj) {\n        queueObj.undo.calls.unshift(undoFunc);\n        queueObj.undo.args.unshift(undoArgs);\n        queueObj.redo.calls.push(redoFunc);\n        queueObj.redo.args.push(redoArgs);\n    }\n\n    if(gd.undoQueue.queue.length > dfltConfig.queueLength) {\n        gd.undoQueue.queue.shift();\n        gd.undoQueue.index--;\n    }\n};\n\n/**\n * Begin a sequence of undoQueue changes\n *\n * @param gd\n */\nqueue.startSequence = function(gd) {\n    gd.undoQueue = gd.undoQueue || {index: 0, queue: [], sequence: false};\n    gd.undoQueue.sequence = true;\n    gd.undoQueue.beginSequence = true;\n};\n\n/**\n * Stop a sequence of undoQueue changes\n *\n * Call this *after* you're sure your undo chain has ended\n *\n * @param gd\n */\nqueue.stopSequence = function(gd) {\n    gd.undoQueue = gd.undoQueue || {index: 0, queue: [], sequence: false};\n    gd.undoQueue.sequence = false;\n    gd.undoQueue.beginSequence = false;\n};\n\n/**\n * Move one step back in the undo queue, and undo the object there.\n *\n * @param gd\n */\nqueue.undo = function undo(gd) {\n    var queueObj, i;\n\n    if(gd.framework && gd.framework.isPolar) {\n        gd.framework.undo();\n        return;\n    }\n    if(gd.undoQueue === undefined ||\n            isNaN(gd.undoQueue.index) ||\n            gd.undoQueue.index <= 0) {\n        return;\n    }\n\n    // index is pointing to next *forward* queueObj, point to the one we're undoing\n    gd.undoQueue.index--;\n\n    // get the queueObj for instructions on how to undo\n    queueObj = gd.undoQueue.queue[gd.undoQueue.index];\n\n    // this sequence keeps things from adding to the queue during undo/redo\n    gd.undoQueue.inSequence = true;\n    for(i = 0; i < queueObj.undo.calls.length; i++) {\n        queue.plotDo(gd, queueObj.undo.calls[i], queueObj.undo.args[i]);\n    }\n    gd.undoQueue.inSequence = false;\n    gd.autoplay = false;\n};\n\n/**\n * Redo the current object in the undo, then move forward in the queue.\n *\n * @param gd\n */\nqueue.redo = function redo(gd) {\n    var queueObj, i;\n\n    if(gd.framework && gd.framework.isPolar) {\n        gd.framework.redo();\n        return;\n    }\n    if(gd.undoQueue === undefined ||\n            isNaN(gd.undoQueue.index) ||\n            gd.undoQueue.index >= gd.undoQueue.queue.length) {\n        return;\n    }\n\n    // get the queueObj for instructions on how to undo\n    queueObj = gd.undoQueue.queue[gd.undoQueue.index];\n\n    // this sequence keeps things from adding to the queue during undo/redo\n    gd.undoQueue.inSequence = true;\n    for(i = 0; i < queueObj.redo.calls.length; i++) {\n        queue.plotDo(gd, queueObj.redo.calls[i], queueObj.redo.args[i]);\n    }\n    gd.undoQueue.inSequence = false;\n    gd.autoplay = false;\n\n    // index is pointing to the thing we just redid, move it\n    gd.undoQueue.index++;\n};\n\n/**\n * Called by undo/redo to make the actual changes.\n *\n * Not meant to be called publically, but included for mocking out in tests.\n *\n * @param gd\n * @param func\n * @param args\n */\nqueue.plotDo = function(gd, func, args) {\n    gd.autoplay = true;\n\n    // this *won't* copy gd and it preserves `undefined` properties!\n    args = copyArgArray(gd, args);\n\n    // call the supplied function\n    func.apply(null, args);\n};\n\nmodule.exports = queue;\n\n},{\"../lib\":703,\"../plot_api/plot_config\":739}],719:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * make a regex for matching counter ids/names ie xaxis, xaxis2, xaxis10...\n *\n * @param {string} head: the head of the pattern, eg 'x' matches 'x', 'x2', 'x10' etc.\n *      'xy' is a special case for cartesian subplots: it matches 'x2y3' etc\n * @param {Optional(string)} tail: a fixed piece after the id\n *      eg counterRegex('scene', '.annotations') for scene2.annotations etc.\n * @param {boolean} openEnded: if true, the string may continue past the match.\n * @param {boolean} matchBeginning: if false, the string may start before the match.\n */\nexports.counter = function(head, tail, openEnded, matchBeginning) {\n    var fullTail = (tail || '') + (openEnded ? '' : '$');\n    var startWithPrefix = matchBeginning === false ? '' : '^';\n    if(head === 'xy') {\n        return new RegExp(startWithPrefix + 'x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?' + fullTail);\n    }\n    return new RegExp(startWithPrefix + head + '([2-9]|[1-9][0-9]+)?' + fullTail);\n};\n\n},{}],720:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n// ASCEND: chop off the last nesting level - either [<n>] or .<key> - to ascend\n// the attribute tree. the remaining attrString is in match[1]\nvar ASCEND = /^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/;\n\n// SIMPLEATTR: is this an un-nested attribute? (no dots or brackets)\nvar SIMPLEATTR = /^[^\\.\\[\\]]+$/;\n\n/*\n * calculate a relative attribute string, similar to a relative path\n *\n * @param {string} baseAttr:\n *   an attribute string, such as 'annotations[3].x'. The \"current location\"\n *   is the attribute string minus the last component ('annotations[3]')\n * @param {string} relativeAttr:\n *   a route to the desired attribute string, using '^' to ascend\n *\n * @return {string} attrString:\n *   for example:\n *     relativeAttr('annotations[3].x', 'y') = 'annotations[3].y'\n *     relativeAttr('annotations[3].x', '^[2].z') = 'annotations[2].z'\n *     relativeAttr('annotations[3].x', '^^margin') = 'margin'\n *     relativeAttr('annotations[3].x', '^^margin.r') = 'margin.r'\n */\nmodule.exports = function(baseAttr, relativeAttr) {\n    while(relativeAttr) {\n        var match = baseAttr.match(ASCEND);\n\n        if(match) baseAttr = match[1];\n        else if(baseAttr.match(SIMPLEATTR)) baseAttr = '';\n        else throw new Error('bad relativeAttr call:' + [baseAttr, relativeAttr]);\n\n        if(relativeAttr.charAt(0) === '^') relativeAttr = relativeAttr.slice(1);\n        else break;\n    }\n\n    if(baseAttr && relativeAttr.charAt(0) !== '[') {\n        return baseAttr + '.' + relativeAttr;\n    }\n    return baseAttr + relativeAttr;\n};\n\n},{}],721:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;\nvar isPlainObject = _dereq_('./is_plain_object');\n\n/**\n * Relink private _keys and keys with a function value from one container\n * to the new container.\n * Relink means copying if object is pass-by-value and adding a reference\n * if object is pass-by-ref.\n * This prevents deepCopying massive structures like a webgl context.\n */\nmodule.exports = function relinkPrivateKeys(toContainer, fromContainer) {\n    for(var k in fromContainer) {\n        var fromVal = fromContainer[k];\n        var toVal = toContainer[k];\n\n        if(toVal === fromVal) {\n            continue;\n        }\n        if(k.charAt(0) === '_' || typeof fromVal === 'function') {\n            // if it already exists at this point, it's something\n            // that we recreate each time around, so ignore it\n            if(k in toContainer) continue;\n\n            toContainer[k] = fromVal;\n        } else if(isArrayOrTypedArray(fromVal) && isArrayOrTypedArray(toVal) && isPlainObject(fromVal[0])) {\n            // filter out data_array items that can contain user objects\n            // most of the time the toVal === fromVal check will catch these early\n            // but if the user makes new ones we also don't want to recurse in.\n            if(k === 'customdata' || k === 'ids') continue;\n\n            // recurse into arrays containers\n            var minLen = Math.min(fromVal.length, toVal.length);\n            for(var j = 0; j < minLen; j++) {\n                if((toVal[j] !== fromVal[j]) && isPlainObject(fromVal[j]) && isPlainObject(toVal[j])) {\n                    relinkPrivateKeys(toVal[j], fromVal[j]);\n                }\n            }\n        } else if(isPlainObject(fromVal) && isPlainObject(toVal)) {\n            // recurse into objects, but only if they still exist\n            relinkPrivateKeys(toVal, fromVal);\n\n            if(!Object.keys(toVal).length) delete toContainer[k];\n        }\n    }\n};\n\n},{\"./array\":686,\"./is_plain_object\":704}],722:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar loggers = _dereq_('./loggers');\nvar identity = _dereq_('./identity');\n\n// don't trust floating point equality - fraction of bin size to call\n// \"on the line\" and ensure that they go the right way specified by\n// linelow\nvar roundingError = 1e-9;\n\n\n/**\n * findBin - find the bin for val - note that it can return outside the\n * bin range any pos. or neg. integer for linear bins, or -1 or\n * bins.length-1 for explicit.\n * bins is either an object {start,size,end} or an array length #bins+1\n * bins can be either increasing or decreasing but must be monotonic\n * for linear bins, we can just calculate. For listed bins, run a binary\n * search linelow (truthy) says the bin boundary should be attributed to\n * the lower bin rather than the default upper bin\n */\nexports.findBin = function(val, bins, linelow) {\n    if(isNumeric(bins.start)) {\n        return linelow ?\n            Math.ceil((val - bins.start) / bins.size - roundingError) - 1 :\n            Math.floor((val - bins.start) / bins.size + roundingError);\n    } else {\n        var n1 = 0;\n        var n2 = bins.length;\n        var c = 0;\n        var binSize = (n2 > 1) ? (bins[n2 - 1] - bins[0]) / (n2 - 1) : 1;\n        var n, test;\n        if(binSize >= 0) {\n            test = linelow ? lessThan : lessOrEqual;\n        } else {\n            test = linelow ? greaterOrEqual : greaterThan;\n        }\n        val += binSize * roundingError * (linelow ? -1 : 1) * (binSize >= 0 ? 1 : -1);\n        // c is just to avoid infinite loops if there's an error\n        while(n1 < n2 && c++ < 100) {\n            n = Math.floor((n1 + n2) / 2);\n            if(test(bins[n], val)) n1 = n + 1;\n            else n2 = n;\n        }\n        if(c > 90) loggers.log('Long binary search...');\n        return n1 - 1;\n    }\n};\n\nfunction lessThan(a, b) { return a < b; }\nfunction lessOrEqual(a, b) { return a <= b; }\nfunction greaterThan(a, b) { return a > b; }\nfunction greaterOrEqual(a, b) { return a >= b; }\n\nexports.sorterAsc = function(a, b) { return a - b; };\nexports.sorterDes = function(a, b) { return b - a; };\n\n/**\n * find distinct values in an array, lumping together ones that appear to\n * just be off by a rounding error\n * return the distinct values and the minimum difference between any two\n */\nexports.distinctVals = function(valsIn) {\n    var vals = valsIn.slice();  // otherwise we sort the original array...\n    vals.sort(exports.sorterAsc);\n\n    var l = vals.length - 1;\n    var minDiff = (vals[l] - vals[0]) || 1;\n    var errDiff = minDiff / (l || 1) / 10000;\n    var v2 = [vals[0]];\n\n    for(var i = 0; i < l; i++) {\n        // make sure values aren't just off by a rounding error\n        if(vals[i + 1] > vals[i] + errDiff) {\n            minDiff = Math.min(minDiff, vals[i + 1] - vals[i]);\n            v2.push(vals[i + 1]);\n        }\n    }\n\n    return {vals: v2, minDiff: minDiff};\n};\n\n/**\n * return the smallest element from (sorted) array arrayIn that's bigger than val,\n * or (reverse) the largest element smaller than val\n * used to find the best tick given the minimum (non-rounded) tick\n * particularly useful for date/time where things are not powers of 10\n * binary search is probably overkill here...\n */\nexports.roundUp = function(val, arrayIn, reverse) {\n    var low = 0;\n    var high = arrayIn.length - 1;\n    var mid;\n    var c = 0;\n    var dlow = reverse ? 0 : 1;\n    var dhigh = reverse ? 1 : 0;\n    var rounded = reverse ? Math.ceil : Math.floor;\n    // c is just to avoid infinite loops if there's an error\n    while(low < high && c++ < 100) {\n        mid = rounded((low + high) / 2);\n        if(arrayIn[mid] <= val) low = mid + dlow;\n        else high = mid - dhigh;\n    }\n    return arrayIn[low];\n};\n\n/**\n * Tweak to Array.sort(sortFn) that improves performance for pre-sorted arrays\n *\n * Note that newer browsers (such as Chrome v70+) are starting to pick up\n * on pre-sorted arrays which may render the following optimization unnecessary\n * in the future.\n *\n * Motivation: sometimes we need to sort arrays but the input is likely to\n * already be sorted. Browsers don't seem to pick up on pre-sorted arrays,\n * and in fact Chrome is actually *slower* sorting pre-sorted arrays than purely\n * random arrays. FF is at least faster if the array is pre-sorted, but still\n * not as fast as it could be.\n * Here's how this plays out sorting a length-1e6 array:\n *\n * Calls to Sort FN  |  Chrome bare  |  FF bare  |  Chrome tweak  |  FF tweak\n *                   |  v68.0 Mac    |  v61.0 Mac|                |\n * ------------------+---------------+-----------+----------------+------------\n * ordered           |  30.4e6       |  10.1e6   |  1e6           |  1e6\n * reversed          |  29.4e6       |  9.9e6    |  1e6 + reverse |  1e6 + reverse\n * random            |  ~21e6        |  ~18.7e6  |  ~21e6         |  ~18.7e6\n *\n * So this is a substantial win for pre-sorted (ordered or exactly reversed)\n * arrays. Including this wrapper on an unsorted array adds a penalty that will\n * in general be only a few calls to the sort function. The only case this\n * penalty will be significant is if the array is mostly sorted but there are\n * a few unsorted items near the end, but the penalty is still at most N calls\n * out of (for N=1e6) ~20N total calls\n *\n * @param {Array} array: the array, to be sorted in place\n * @param {function} sortFn: As in Array.sort, function(a, b) that puts\n *     item a before item b if the return is negative, a after b if positive,\n *     and no change if zero.\n * @return {Array}: the original array, sorted in place.\n */\nexports.sort = function(array, sortFn) {\n    var notOrdered = 0;\n    var notReversed = 0;\n    for(var i = 1; i < array.length; i++) {\n        var pairOrder = sortFn(array[i], array[i - 1]);\n        if(pairOrder < 0) notOrdered = 1;\n        else if(pairOrder > 0) notReversed = 1;\n        if(notOrdered && notReversed) return array.sort(sortFn);\n    }\n    return notReversed ? array : array.reverse();\n};\n\n/**\n * find index in array 'arr' that minimizes 'fn'\n *\n * @param {array} arr : array where to search\n * @param {fn (optional)} fn : function to minimize,\n *   if not given, fn is the identity function\n * @return {integer}\n */\nexports.findIndexOfMin = function(arr, fn) {\n    fn = fn || identity;\n\n    var min = Infinity;\n    var ind;\n\n    for(var i = 0; i < arr.length; i++) {\n        var v = fn(arr[i]);\n        if(v < min) {\n            min = v;\n            ind = i;\n        }\n    }\n    return ind;\n};\n\n},{\"./identity\":702,\"./loggers\":707,\"fast-isnumeric\":224}],723:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n// works with our CSS cursor classes (see css/_cursor.scss)\n// to apply cursors to d3 single-element selections.\n// omit cursor to revert to the default.\nmodule.exports = function setCursor(el3, csr) {\n    (el3.attr('class') || '').split(' ').forEach(function(cls) {\n        if(cls.indexOf('cursor-') === 0) el3.classed(cls, false);\n    });\n\n    if(csr) el3.classed('cursor-' + csr, true);\n};\n\n},{}],724:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Color = _dereq_('../components/color');\n\nvar noop = function() {};\n\n\n/**\n * Prints a no webgl error message into the scene container\n * @param {scene instance} scene\n *\n * Expects 'scene' to have property 'container'\n *\n */\nmodule.exports = function showNoWebGlMsg(scene) {\n    for(var prop in scene) {\n        if(typeof scene[prop] === 'function') scene[prop] = noop;\n    }\n\n    scene.destroy = function() {\n        scene.container.parentNode.removeChild(scene.container);\n    };\n\n    var div = document.createElement('div');\n    div.className = 'no-webgl';\n    div.style.cursor = 'pointer';\n    div.style.fontSize = '24px';\n    div.style.color = Color.defaults[0];\n    div.style.position = 'absolute';\n    div.style.left = div.style.top = '0px';\n    div.style.width = div.style.height = '100%';\n    div.style['background-color'] = Color.lightLine;\n    div.style['z-index'] = 30;\n\n    var p = document.createElement('p');\n    p.textContent = 'WebGL is not supported by your browser - visit https://get.webgl.org for more info';\n    p.style.position = 'relative';\n    p.style.top = '50%';\n    p.style.left = '50%';\n    p.style.height = '30%';\n    p.style.width = '50%';\n    p.style.margin = '-15% 0 0 -25%';\n\n    div.appendChild(p);\n    scene.container.appendChild(div);\n    scene.container.style.background = '#FFFFFF';\n    scene.container.onclick = function() {\n        window.open('https://get.webgl.org');\n    };\n\n    // return before setting up camera and onrender methods\n    return false;\n};\n\n},{\"../components/color\":580}],725:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;\n\n/**\n * aggNums() returns the result of an aggregate function applied to an array of\n * values, where non-numerical values have been tossed out.\n *\n * @param {function} f - aggregation function (e.g., Math.min)\n * @param {Number} v - initial value (continuing from previous calls)\n *      if there's no continuing value, use null for selector-type\n *      functions (max,min), or 0 for summations\n * @param {Array} a - array to aggregate (may be nested, we will recurse,\n *                    but all elements must have the same dimension)\n * @param {Number} len - maximum length of a to aggregate\n * @return {Number} - result of f applied to a starting from v\n */\nexports.aggNums = function(f, v, a, len) {\n    var i,\n        b;\n    if(!len || len > a.length) len = a.length;\n    if(!isNumeric(v)) v = false;\n    if(isArrayOrTypedArray(a[0])) {\n        b = new Array(len);\n        for(i = 0; i < len; i++) b[i] = exports.aggNums(f, v, a[i]);\n        a = b;\n    }\n\n    for(i = 0; i < len; i++) {\n        if(!isNumeric(v)) v = a[i];\n        else if(isNumeric(a[i])) v = f(+v, +a[i]);\n    }\n    return v;\n};\n\n/**\n * mean & std dev functions using aggNums, so it handles non-numerics nicely\n * even need to use aggNums instead of .length, to toss out non-numerics\n */\nexports.len = function(data) {\n    return exports.aggNums(function(a) { return a + 1; }, 0, data);\n};\n\nexports.mean = function(data, len) {\n    if(!len) len = exports.len(data);\n    return exports.aggNums(function(a, b) { return a + b; }, 0, data) / len;\n};\n\nexports.midRange = function(numArr) {\n    if(numArr === undefined || numArr.length === 0) return undefined;\n    return (exports.aggNums(Math.max, null, numArr) + exports.aggNums(Math.min, null, numArr)) / 2;\n};\n\nexports.variance = function(data, len, mean) {\n    if(!len) len = exports.len(data);\n    if(!isNumeric(mean)) mean = exports.mean(data, len);\n\n    return exports.aggNums(function(a, b) {\n        return a + Math.pow(b - mean, 2);\n    }, 0, data) / len;\n};\n\nexports.stdev = function(data, len, mean) {\n    return Math.sqrt(exports.variance(data, len, mean));\n};\n\n/**\n * median of a finite set of numbers\n * reference page: https://en.wikipedia.org/wiki/Median#Finite_set_of_numbers\n**/\nexports.median = function(data) {\n    var b = data.slice().sort();\n    return exports.interp(b, 0.5);\n};\n\n/**\n * interp() computes a percentile (quantile) for a given distribution.\n * We interpolate the distribution (to compute quantiles, we follow method #10 here:\n * http://www.amstat.org/publications/jse/v14n3/langford.html).\n * Typically the index or rank (n * arr.length) may be non-integer.\n * For reference: ends are clipped to the extreme values in the array;\n * For box plots: index you get is half a point too high (see\n * http://en.wikipedia.org/wiki/Percentile#Nearest_rank) but note that this definition\n * indexes from 1 rather than 0, so we subtract 1/2 (instead of add).\n *\n * @param {Array} arr - This array contains the values that make up the distribution.\n * @param {Number} n - Between 0 and 1, n = p/100 is such that we compute the p^th percentile.\n * For example, the 50th percentile (or median) corresponds to n = 0.5\n * @return {Number} - percentile\n */\nexports.interp = function(arr, n) {\n    if(!isNumeric(n)) throw 'n should be a finite number';\n    n = n * arr.length - 0.5;\n    if(n < 0) return arr[0];\n    if(n > arr.length - 1) return arr[arr.length - 1];\n    var frac = n % 1;\n    return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)];\n};\n\n},{\"./array\":686,\"fast-isnumeric\":224}],726:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar rgba = _dereq_('color-normalize');\n\nfunction str2RgbaArray(color) {\n    if(!color) return [0, 0, 0, 1];\n    return rgba(color);\n}\n\nmodule.exports = str2RgbaArray;\n\n},{\"color-normalize\":113}],727:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n/* global MathJax:false */\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../lib');\nvar xmlnsNamespaces = _dereq_('../constants/xmlns_namespaces');\nvar LINE_SPACING = _dereq_('../constants/alignment').LINE_SPACING;\n\n// text converter\n\nfunction getSize(_selection, _dimension) {\n    return _selection.node().getBoundingClientRect()[_dimension];\n}\n\nvar FIND_TEX = /([^$]*)([$]+[^$]*[$]+)([^$]*)/;\n\nexports.convertToTspans = function(_context, gd, _callback) {\n    var str = _context.text();\n\n    // Until we get tex integrated more fully (so it can be used along with non-tex)\n    // allow some elements to prohibit it by attaching 'data-notex' to the original\n    var tex = (!_context.attr('data-notex')) &&\n        (typeof MathJax !== 'undefined') &&\n        str.match(FIND_TEX);\n\n    var parent = d3.select(_context.node().parentNode);\n    if(parent.empty()) return;\n    var svgClass = (_context.attr('class')) ? _context.attr('class').split(' ')[0] : 'text';\n    svgClass += '-math';\n    parent.selectAll('svg.' + svgClass).remove();\n    parent.selectAll('g.' + svgClass + '-group').remove();\n    _context.style('display', null)\n        .attr({\n            // some callers use data-unformatted *from the <text> element* in 'cancel'\n            // so we need it here even if we're going to turn it into math\n            // these two (plus style and text-anchor attributes) form the key we're\n            // going to use for Drawing.bBox\n            'data-unformatted': str,\n            'data-math': 'N'\n        });\n\n    function showText() {\n        if(!parent.empty()) {\n            svgClass = _context.attr('class') + '-math';\n            parent.select('svg.' + svgClass).remove();\n        }\n        _context.text('')\n            .style('white-space', 'pre');\n\n        var hasLink = buildSVGText(_context.node(), str);\n\n        if(hasLink) {\n            // at least in Chrome, pointer-events does not seem\n            // to be honored in children of <text> elements\n            // so if we have an anchor, we have to make the\n            // whole element respond\n            _context.style('pointer-events', 'all');\n        }\n\n        exports.positionText(_context);\n\n        if(_callback) _callback.call(_context);\n    }\n\n    if(tex) {\n        ((gd && gd._promises) || []).push(new Promise(function(resolve) {\n            _context.style('display', 'none');\n            var fontSize = parseInt(_context.node().style.fontSize, 10);\n            var config = {fontSize: fontSize};\n\n            texToSVG(tex[2], config, function(_svgEl, _glyphDefs, _svgBBox) {\n                parent.selectAll('svg.' + svgClass).remove();\n                parent.selectAll('g.' + svgClass + '-group').remove();\n\n                var newSvg = _svgEl && _svgEl.select('svg');\n                if(!newSvg || !newSvg.node()) {\n                    showText();\n                    resolve();\n                    return;\n                }\n\n                var mathjaxGroup = parent.append('g')\n                    .classed(svgClass + '-group', true)\n                    .attr({\n                        'pointer-events': 'none',\n                        'data-unformatted': str,\n                        'data-math': 'Y'\n                    });\n\n                mathjaxGroup.node().appendChild(newSvg.node());\n\n                // stitch the glyph defs\n                if(_glyphDefs && _glyphDefs.node()) {\n                    newSvg.node().insertBefore(_glyphDefs.node().cloneNode(true),\n                                               newSvg.node().firstChild);\n                }\n\n                newSvg.attr({\n                    'class': svgClass,\n                    height: _svgBBox.height,\n                    preserveAspectRatio: 'xMinYMin meet'\n                })\n                .style({overflow: 'visible', 'pointer-events': 'none'});\n\n                var fill = _context.node().style.fill || 'black';\n                var g = newSvg.select('g');\n                g.attr({fill: fill, stroke: fill});\n\n                var newSvgW = getSize(g, 'width');\n                var newSvgH = getSize(g, 'height');\n                var newX = +_context.attr('x') - newSvgW *\n                    {start: 0, middle: 0.5, end: 1}[_context.attr('text-anchor') || 'start'];\n                // font baseline is about 1/4 fontSize below centerline\n                var textHeight = fontSize || getSize(_context, 'height');\n                var dy = -textHeight / 4;\n\n                if(svgClass[0] === 'y') {\n                    mathjaxGroup.attr({\n                        transform: 'rotate(' + [-90, +_context.attr('x'), +_context.attr('y')] +\n                        ') translate(' + [-newSvgW / 2, dy - newSvgH / 2] + ')'\n                    });\n                    newSvg.attr({x: +_context.attr('x'), y: +_context.attr('y')});\n                } else if(svgClass[0] === 'l') {\n                    newSvg.attr({x: _context.attr('x'), y: dy - (newSvgH / 2)});\n                } else if(svgClass[0] === 'a' && svgClass.indexOf('atitle') !== 0) {\n                    newSvg.attr({x: 0, y: dy});\n                } else {\n                    newSvg.attr({x: newX, y: (+_context.attr('y') + dy - newSvgH / 2)});\n                }\n\n                if(_callback) _callback.call(_context, mathjaxGroup);\n                resolve(mathjaxGroup);\n            });\n        }));\n    } else showText();\n\n    return _context;\n};\n\n\n// MathJax\n\nvar LT_MATCH = /(<|&lt;|&#60;)/g;\nvar GT_MATCH = /(>|&gt;|&#62;)/g;\n\nfunction cleanEscapesForTex(s) {\n    return s.replace(LT_MATCH, '\\\\lt ')\n        .replace(GT_MATCH, '\\\\gt ');\n}\n\nfunction texToSVG(_texString, _config, _callback) {\n    var originalRenderer,\n        originalConfig,\n        originalProcessSectionDelay,\n        tmpDiv;\n\n    MathJax.Hub.Queue(\n    function() {\n        originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);\n\n        originalProcessSectionDelay = MathJax.Hub.processSectionDelay;\n        if(MathJax.Hub.processSectionDelay !== undefined) {\n            // MathJax 2.5+\n            MathJax.Hub.processSectionDelay = 0;\n        }\n\n        return MathJax.Hub.Config({\n            messageStyle: 'none',\n            tex2jax: {\n                inlineMath: [['$', '$'], ['\\\\(', '\\\\)']]\n            },\n            displayAlign: 'left',\n        });\n    },\n    function() {\n        // Get original renderer\n        originalRenderer = MathJax.Hub.config.menuSettings.renderer;\n        if(originalRenderer !== 'SVG') {\n            return MathJax.Hub.setRenderer('SVG');\n        }\n    },\n    function() {\n        var randomID = 'math-output-' + Lib.randstr({}, 64);\n        tmpDiv = d3.select('body').append('div')\n            .attr({id: randomID})\n            .style({visibility: 'hidden', position: 'absolute'})\n            .style({'font-size': _config.fontSize + 'px'})\n            .text(cleanEscapesForTex(_texString));\n\n        return MathJax.Hub.Typeset(tmpDiv.node());\n    },\n    function() {\n        var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');\n\n        if(tmpDiv.select('.MathJax_SVG').empty() || !tmpDiv.select('svg').node()) {\n            Lib.log('There was an error in the tex syntax.', _texString);\n            _callback();\n        } else {\n            var svgBBox = tmpDiv.select('svg').node().getBoundingClientRect();\n            _callback(tmpDiv.select('.MathJax_SVG'), glyphDefs, svgBBox);\n        }\n\n        tmpDiv.remove();\n\n        if(originalRenderer !== 'SVG') {\n            return MathJax.Hub.setRenderer(originalRenderer);\n        }\n    },\n    function() {\n        if(originalProcessSectionDelay !== undefined) {\n            MathJax.Hub.processSectionDelay = originalProcessSectionDelay;\n        }\n        return MathJax.Hub.Config(originalConfig);\n    });\n}\n\nvar TAG_STYLES = {\n    // would like to use baseline-shift for sub/sup but FF doesn't support it\n    // so we need to use dy along with the uber hacky shift-back-to\n    // baseline below\n    sup: 'font-size:70%',\n    sub: 'font-size:70%',\n    b: 'font-weight:bold',\n    i: 'font-style:italic',\n    a: 'cursor:pointer',\n    span: '',\n    em: 'font-style:italic;font-weight:bold'\n};\n\n// baseline shifts for sub and sup\nvar SHIFT_DY = {\n    sub: '0.3em',\n    sup: '-0.6em'\n};\n// reset baseline by adding a tspan (empty except for a zero-width space)\n// with dy of -70% * SHIFT_DY (because font-size=70%)\nvar RESET_DY = {\n    sub: '-0.21em',\n    sup: '0.42em'\n};\nvar ZERO_WIDTH_SPACE = '\\u200b';\n\n/*\n * Whitelist of protocols in user-supplied urls. Mostly we want to avoid javascript\n * and related attack vectors. The empty items are there for IE, that in various\n * versions treats relative paths as having different flavors of no protocol, while\n * other browsers have these explicitly inherit the protocol of the page they're in.\n */\nvar PROTOCOLS = ['http:', 'https:', 'mailto:', '', undefined, ':'];\n\nvar NEWLINES = /(\\r\\n?|\\n)/g;\n\nvar SPLIT_TAGS = /(<[^<>]*>)/;\n\nvar ONE_TAG = /<(\\/?)([^ >]*)(\\s+(.*))?>/i;\n\nvar BR_TAG = /<br(\\s+.*)?>/i;\n\n/*\n * style and href: pull them out of either single or double quotes. Also\n * - target: (_blank|_self|_parent|_top|framename)\n *     note that you can't use target to get a popup but if you use popup,\n *     a `framename` will be passed along as the name of the popup window.\n *     per the spec, cannot contain whitespace.\n *     for backward compatibility we default to '_blank'\n * - popup: a custom one for us to enable popup (new window) links. String\n *     for window.open -> strWindowFeatures, like 'menubar=yes,width=500,height=550'\n *     note that at least in Chrome, you need to give at least one property\n *     in this string or the page will open in a new tab anyway. We follow this\n *     convention and will not make a popup if this string is empty.\n *     per the spec, cannot contain whitespace.\n *\n * Because we hack in other attributes with style (sub & sup), drop any trailing\n * semicolon in user-supplied styles so we can consistently append the tag-dependent style\n *\n * These are for tag attributes; Chrome anyway will convert entities in\n * attribute values, but not in attribute names\n * you can test this by for example:\n * > p = document.createElement('p')\n * > p.innerHTML = '<span styl&#x65;=\"font-color:r&#x65;d;\">Hi</span>'\n * > p.innerHTML\n * <- '<span styl&#x65;=\"font-color:red;\">Hi</span>'\n */\nvar STYLEMATCH = /(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i;\nvar HREFMATCH = /(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i;\nvar TARGETMATCH = /(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i;\nvar POPUPMATCH = /(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;\n\n// dedicated matcher for these quoted regexes, that can return their results\n// in two different places\nfunction getQuotedMatch(_str, re) {\n    if(!_str) return null;\n    var match = _str.match(re);\n    var result = match && (match[3] || match[4]);\n    return result && convertEntities(result);\n}\n\nvar COLORMATCH = /(^|;)\\s*color:/;\n\n/**\n * Strip string of tags\n *\n * @param {string} _str : input string\n * @param {object} opts :\n * - len {number} max length of output string\n * - allowedTags {array} list of pseudo-html tags to NOT strip\n * @return {string}\n */\nexports.plainText = function(_str, opts) {\n    opts = opts || {};\n\n    var len = (opts.len !== undefined && opts.len !== -1) ? opts.len : Infinity;\n    var allowedTags = opts.allowedTags !== undefined ? opts.allowedTags : ['br'];\n\n    var ellipsis = '...';\n    var eLen = ellipsis.length;\n\n    var oldParts = _str.split(SPLIT_TAGS);\n    var newParts = [];\n    var prevTag = '';\n    var l = 0;\n\n    for(var i = 0; i < oldParts.length; i++) {\n        var p = oldParts[i];\n        var match = p.match(ONE_TAG);\n        var tagType = match && match[2].toLowerCase();\n\n        if(tagType) {\n            // N.B. tags do not count towards string length\n            if(allowedTags.indexOf(tagType) !== -1) {\n                newParts.push(p);\n                prevTag = tagType;\n            }\n        } else {\n            var pLen = p.length;\n\n            if((l + pLen) < len) {\n                newParts.push(p);\n                l += pLen;\n            } else if(l < len) {\n                var pLen2 = len - l;\n\n                if(prevTag && (prevTag !== 'br' || pLen2 <= eLen || pLen <= eLen)) {\n                    newParts.pop();\n                }\n\n                if(len > eLen) {\n                    newParts.push(p.substr(0, pLen2 - eLen) + ellipsis);\n                } else {\n                    newParts.push(p.substr(0, pLen2));\n                }\n                break;\n            }\n\n            prevTag = '';\n        }\n    }\n\n    return newParts.join('');\n};\n\n/*\n * N.B. HTML entities are listed without the leading '&' and trailing ';'\n * https://www.freeformatter.com/html-entities.html\n *\n * FWIW if we wanted to support the full set, it has 2261 entries:\n * https://www.w3.org/TR/html5/entities.json\n * though I notice that some of these are duplicates and/or are missing \";\"\n * eg: \"&amp;\", \"&amp\", \"&AMP;\", and \"&AMP\" all map to \"&\"\n * We no longer need to include numeric entities here, these are now handled\n * by String.fromCodePoint/fromCharCode\n *\n * Anyway the only ones that are really important to allow are the HTML special\n * chars <, >, and &, because these ones can trigger special processing if not\n * replaced by the corresponding entity.\n */\nvar entityToUnicode = {\n    mu: 'μ',\n    amp: '&',\n    lt: '<',\n    gt: '>',\n    nbsp: ' ',\n    times: '×',\n    plusmn: '±',\n    deg: '°'\n};\n\n// NOTE: in general entities can contain uppercase too (so [a-zA-Z]) but all the\n// ones we support use only lowercase. If we ever change that, update the regex.\nvar ENTITY_MATCH = /&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;\nfunction convertEntities(_str) {\n    return _str.replace(ENTITY_MATCH, function(fullMatch, innerMatch) {\n        var outChar;\n        if(innerMatch.charAt(0) === '#') {\n            // cannot use String.fromCodePoint in IE\n            outChar = fromCodePoint(\n                innerMatch.charAt(1) === 'x' ?\n                    parseInt(innerMatch.substr(2), 16) :\n                    parseInt(innerMatch.substr(1), 10)\n            );\n        } else outChar = entityToUnicode[innerMatch];\n\n        // as in regular HTML, if we didn't decode the entity just\n        // leave the raw text in place.\n        return outChar || fullMatch;\n    });\n}\nexports.convertEntities = convertEntities;\n\nfunction fromCodePoint(code) {\n    // Don't allow overflow. In Chrome this turns into � but I feel like it's\n    // more useful to just not convert it at all.\n    if(code > 0x10FFFF) return;\n    var stringFromCodePoint = String.fromCodePoint;\n    if(stringFromCodePoint) return stringFromCodePoint(code);\n\n    // IE doesn't have String.fromCodePoint\n    // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint\n    var stringFromCharCode = String.fromCharCode;\n    if(code <= 0xFFFF) return stringFromCharCode(code);\n    return stringFromCharCode(\n        (code >> 10) + 0xD7C0,\n        (code % 0x400) + 0xDC00\n    );\n}\n\n/*\n * buildSVGText: convert our pseudo-html into SVG tspan elements, and attach these\n * to containerNode\n *\n * @param {svg text element} containerNode: the <text> node to insert this text into\n * @param {string} str: the pseudo-html string to convert to svg\n *\n * @returns {bool}: does the result contain any links? We need to handle the text element\n *   somewhat differently if it does, so just keep track of this when it happens.\n */\nfunction buildSVGText(containerNode, str) {\n    /*\n     * Normalize behavior between IE and others wrt newlines and whitespace:pre\n     * this combination makes IE barf https://github.com/plotly/plotly.js/issues/746\n     * Chrome and FF display \\n, \\r, or \\r\\n as a space in this mode.\n     * I feel like at some point we turned these into <br> but currently we don't so\n     * I'm just going to cement what we do now in Chrome and FF\n     */\n    str = str.replace(NEWLINES, ' ');\n\n    var hasLink = false;\n\n    // as we're building the text, keep track of what elements we're nested inside\n    // nodeStack will be an array of {node, type, style, href, target, popup}\n    // where only type: 'a' gets the last 3 and node is only added when it's created\n    var nodeStack = [];\n    var currentNode;\n    var currentLine = -1;\n\n    function newLine() {\n        currentLine++;\n\n        var lineNode = document.createElementNS(xmlnsNamespaces.svg, 'tspan');\n        d3.select(lineNode).attr({\n            class: 'line',\n            dy: (currentLine * LINE_SPACING) + 'em'\n        });\n        containerNode.appendChild(lineNode);\n\n        currentNode = lineNode;\n\n        var oldNodeStack = nodeStack;\n        nodeStack = [{node: lineNode}];\n\n        if(oldNodeStack.length > 1) {\n            for(var i = 1; i < oldNodeStack.length; i++) {\n                enterNode(oldNodeStack[i]);\n            }\n        }\n    }\n\n    function enterNode(nodeSpec) {\n        var type = nodeSpec.type;\n        var nodeAttrs = {};\n        var nodeType;\n\n        if(type === 'a') {\n            nodeType = 'a';\n            var target = nodeSpec.target;\n            var href = nodeSpec.href;\n            var popup = nodeSpec.popup;\n            if(href) {\n                nodeAttrs = {\n                    'xlink:xlink:show': (target === '_blank' || target.charAt(0) !== '_') ? 'new' : 'replace',\n                    target: target,\n                    'xlink:xlink:href': href\n                };\n                if(popup) {\n                    // security: href and target are not inserted as code but\n                    // as attributes. popup is, but limited to /[A-Za-z0-9_=,]/\n                    nodeAttrs.onclick = 'window.open(this.href.baseVal,this.target.baseVal,\"' +\n                        popup + '\");return false;';\n                }\n            }\n        } else nodeType = 'tspan';\n\n        if(nodeSpec.style) nodeAttrs.style = nodeSpec.style;\n\n        var newNode = document.createElementNS(xmlnsNamespaces.svg, nodeType);\n\n        if(type === 'sup' || type === 'sub') {\n            addTextNode(currentNode, ZERO_WIDTH_SPACE);\n            currentNode.appendChild(newNode);\n\n            var resetter = document.createElementNS(xmlnsNamespaces.svg, 'tspan');\n            addTextNode(resetter, ZERO_WIDTH_SPACE);\n            d3.select(resetter).attr('dy', RESET_DY[type]);\n            nodeAttrs.dy = SHIFT_DY[type];\n\n            currentNode.appendChild(newNode);\n            currentNode.appendChild(resetter);\n        } else {\n            currentNode.appendChild(newNode);\n        }\n\n        d3.select(newNode).attr(nodeAttrs);\n\n        currentNode = nodeSpec.node = newNode;\n        nodeStack.push(nodeSpec);\n    }\n\n    function addTextNode(node, text) {\n        node.appendChild(document.createTextNode(text));\n    }\n\n    function exitNode(type) {\n        // A bare closing tag can't close the root node. If we encounter this it\n        // means there's an extra closing tag that can just be ignored:\n        if(nodeStack.length === 1) {\n            Lib.log('Ignoring unexpected end tag </' + type + '>.', str);\n            return;\n        }\n\n        var innerNode = nodeStack.pop();\n\n        if(type !== innerNode.type) {\n            Lib.log('Start tag <' + innerNode.type + '> doesnt match end tag <' +\n                type + '>. Pretending it did match.', str);\n        }\n        currentNode = nodeStack[nodeStack.length - 1].node;\n    }\n\n    var hasLines = BR_TAG.test(str);\n\n    if(hasLines) newLine();\n    else {\n        currentNode = containerNode;\n        nodeStack = [{node: containerNode}];\n    }\n\n    var parts = str.split(SPLIT_TAGS);\n    for(var i = 0; i < parts.length; i++) {\n        var parti = parts[i];\n        var match = parti.match(ONE_TAG);\n        var tagType = match && match[2].toLowerCase();\n        var tagStyle = TAG_STYLES[tagType];\n\n        if(tagType === 'br') {\n            newLine();\n        } else if(tagStyle === undefined) {\n            addTextNode(currentNode, convertEntities(parti));\n        } else {\n            // tag - open or close\n            if(match[1]) {\n                exitNode(tagType);\n            } else {\n                var extra = match[4];\n\n                var nodeSpec = {type: tagType};\n\n                // now add style, from both the tag name and any extra css\n                // Most of the svg css that users will care about is just like html,\n                // but font color is different (uses fill). Let our users ignore this.\n                var css = getQuotedMatch(extra, STYLEMATCH);\n                if(css) {\n                    css = css.replace(COLORMATCH, '$1 fill:');\n                    if(tagStyle) css += ';' + tagStyle;\n                } else if(tagStyle) css = tagStyle;\n\n                if(css) nodeSpec.style = css;\n\n                if(tagType === 'a') {\n                    hasLink = true;\n\n                    var href = getQuotedMatch(extra, HREFMATCH);\n\n                    if(href) {\n                        // check safe protocols\n                        var dummyAnchor = document.createElement('a');\n                        dummyAnchor.href = href;\n                        if(PROTOCOLS.indexOf(dummyAnchor.protocol) !== -1) {\n                            // Decode href to allow both already encoded and not encoded\n                            // URIs. Without decoding prior encoding, an already encoded\n                            // URI would be encoded twice producing a semantically different URI.\n                            nodeSpec.href = encodeURI(decodeURI(href));\n                            nodeSpec.target = getQuotedMatch(extra, TARGETMATCH) || '_blank';\n                            nodeSpec.popup = getQuotedMatch(extra, POPUPMATCH);\n                        }\n                    }\n                }\n\n                enterNode(nodeSpec);\n            }\n        }\n    }\n\n    return hasLink;\n}\n\nexports.lineCount = function lineCount(s) {\n    return s.selectAll('tspan.line').size() || 1;\n};\n\nexports.positionText = function positionText(s, x, y) {\n    return s.each(function() {\n        var text = d3.select(this);\n\n        function setOrGet(attr, val) {\n            if(val === undefined) {\n                val = text.attr(attr);\n                if(val === null) {\n                    text.attr(attr, 0);\n                    val = 0;\n                }\n            } else text.attr(attr, val);\n            return val;\n        }\n\n        var thisX = setOrGet('x', x);\n        var thisY = setOrGet('y', y);\n\n        if(this.nodeName === 'text') {\n            text.selectAll('tspan.line').attr({x: thisX, y: thisY});\n        }\n    });\n};\n\nfunction alignHTMLWith(_base, container, options) {\n    var alignH = options.horizontalAlign;\n    var alignV = options.verticalAlign || 'top';\n    var bRect = _base.node().getBoundingClientRect();\n    var cRect = container.node().getBoundingClientRect();\n    var thisRect;\n    var getTop;\n    var getLeft;\n\n    if(alignV === 'bottom') {\n        getTop = function() { return bRect.bottom - thisRect.height; };\n    } else if(alignV === 'middle') {\n        getTop = function() { return bRect.top + (bRect.height - thisRect.height) / 2; };\n    } else { // default: top\n        getTop = function() { return bRect.top; };\n    }\n\n    if(alignH === 'right') {\n        getLeft = function() { return bRect.right - thisRect.width; };\n    } else if(alignH === 'center') {\n        getLeft = function() { return bRect.left + (bRect.width - thisRect.width) / 2; };\n    } else { // default: left\n        getLeft = function() { return bRect.left; };\n    }\n\n    return function() {\n        thisRect = this.node().getBoundingClientRect();\n        this.style({\n            top: (getTop() - cRect.top) + 'px',\n            left: (getLeft() - cRect.left) + 'px',\n            'z-index': 1000\n        });\n        return this;\n    };\n}\n\n/*\n * Editable title\n * @param {d3.selection} context: the element being edited. Normally text,\n *   but if it isn't, you should provide the styling options\n * @param {object} options:\n *   @param {div} options.gd: graphDiv\n *   @param {d3.selection} options.delegate: item to bind events to if not this\n *   @param {boolean} options.immediate: start editing now (true) or on click (false, default)\n *   @param {string} options.fill: font color if not as shown\n *   @param {string} options.background: background color if not as shown\n *   @param {string} options.text: initial text, if not as shown\n *   @param {string} options.horizontalAlign: alignment of the edit box wrt. the bound element\n *   @param {string} options.verticalAlign: alignment of the edit box wrt. the bound element\n */\n\nexports.makeEditable = function(context, options) {\n    var gd = options.gd;\n    var _delegate = options.delegate;\n    var dispatch = d3.dispatch('edit', 'input', 'cancel');\n    var handlerElement = _delegate || context;\n\n    context.style({'pointer-events': _delegate ? 'none' : 'all'});\n\n    if(context.size() !== 1) throw new Error('boo');\n\n    function handleClick() {\n        appendEditable();\n        context.style({opacity: 0});\n        // also hide any mathjax svg\n        var svgClass = handlerElement.attr('class');\n        var mathjaxClass;\n        if(svgClass) mathjaxClass = '.' + svgClass.split(' ')[0] + '-math-group';\n        else mathjaxClass = '[class*=-math-group]';\n        if(mathjaxClass) {\n            d3.select(context.node().parentNode).select(mathjaxClass).style({opacity: 0});\n        }\n    }\n\n    function selectElementContents(_el) {\n        var el = _el.node();\n        var range = document.createRange();\n        range.selectNodeContents(el);\n        var sel = window.getSelection();\n        sel.removeAllRanges();\n        sel.addRange(range);\n        el.focus();\n    }\n\n    function appendEditable() {\n        var plotDiv = d3.select(gd);\n        var container = plotDiv.select('.svg-container');\n        var div = container.append('div');\n        var cStyle = context.node().style;\n        var fontSize = parseFloat(cStyle.fontSize || 12);\n\n        var initialText = options.text;\n        if(initialText === undefined) initialText = context.attr('data-unformatted');\n\n        div.classed('plugin-editable editable', true)\n            .style({\n                position: 'absolute',\n                'font-family': cStyle.fontFamily || 'Arial',\n                'font-size': fontSize,\n                color: options.fill || cStyle.fill || 'black',\n                opacity: 1,\n                'background-color': options.background || 'transparent',\n                outline: '#ffffff33 1px solid',\n                margin: [-fontSize / 8 + 1, 0, 0, -1].join('px ') + 'px',\n                padding: '0',\n                'box-sizing': 'border-box'\n            })\n            .attr({contenteditable: true})\n            .text(initialText)\n            .call(alignHTMLWith(context, container, options))\n            .on('blur', function() {\n                gd._editing = false;\n                context.text(this.textContent)\n                    .style({opacity: 1});\n                var svgClass = d3.select(this).attr('class');\n                var mathjaxClass;\n                if(svgClass) mathjaxClass = '.' + svgClass.split(' ')[0] + '-math-group';\n                else mathjaxClass = '[class*=-math-group]';\n                if(mathjaxClass) {\n                    d3.select(context.node().parentNode).select(mathjaxClass).style({opacity: 0});\n                }\n                var text = this.textContent;\n                d3.select(this).transition().duration(0).remove();\n                d3.select(document).on('mouseup', null);\n                dispatch.edit.call(context, text);\n            })\n            .on('focus', function() {\n                var editDiv = this;\n                gd._editing = true;\n                d3.select(document).on('mouseup', function() {\n                    if(d3.event.target === editDiv) return false;\n                    if(document.activeElement === div.node()) div.node().blur();\n                });\n            })\n            .on('keyup', function() {\n                if(d3.event.which === 27) {\n                    gd._editing = false;\n                    context.style({opacity: 1});\n                    d3.select(this)\n                        .style({opacity: 0})\n                        .on('blur', function() { return false; })\n                        .transition().remove();\n                    dispatch.cancel.call(context, this.textContent);\n                } else {\n                    dispatch.input.call(context, this.textContent);\n                    d3.select(this).call(alignHTMLWith(context, container, options));\n                }\n            })\n            .on('keydown', function() {\n                if(d3.event.which === 13) this.blur();\n            })\n            .call(selectElementContents);\n    }\n\n    if(options.immediate) handleClick();\n    else handlerElement.on('click', handleClick);\n\n    return d3.rebind(context, dispatch, 'on');\n};\n\n},{\"../constants/alignment\":675,\"../constants/xmlns_namespaces\":681,\"../lib\":703,\"d3\":157}],728:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar timerCache = {};\n\n/**\n * Throttle a callback. `callback` executes synchronously only if\n * more than `minInterval` milliseconds have already elapsed since the latest\n * call (if any). Otherwise we wait until `minInterval` is over and execute the\n * last callback received while waiting.\n * So the first and last events in a train are always executed (eventually)\n * but some of the events in the middle can be dropped.\n *\n * @param {string} id: an identifier to mark events to throttle together\n * @param {number} minInterval: minimum time, in milliseconds, between\n *   invocations of `callback`\n * @param {function} callback: the function to throttle. `callback` itself\n *   should be a purely synchronous function.\n */\nexports.throttle = function throttle(id, minInterval, callback) {\n    var cache = timerCache[id];\n    var now = Date.now();\n\n    if(!cache) {\n        /*\n         * Throw out old items before making a new one, to prevent the cache\n         * getting overgrown, for example from old plots that have been replaced.\n         * 1 minute age is arbitrary.\n         */\n        for(var idi in timerCache) {\n            if(timerCache[idi].ts < now - 60000) {\n                delete timerCache[idi];\n            }\n        }\n        cache = timerCache[id] = {ts: 0, timer: null};\n    }\n\n    _clearTimeout(cache);\n\n    function exec() {\n        callback();\n        cache.ts = Date.now();\n        if(cache.onDone) {\n            cache.onDone();\n            cache.onDone = null;\n        }\n    }\n\n    if(now > cache.ts + minInterval) {\n        exec();\n        return;\n    }\n\n    cache.timer = setTimeout(function() {\n        exec();\n        cache.timer = null;\n    }, minInterval);\n};\n\nexports.done = function(id) {\n    var cache = timerCache[id];\n    if(!cache || !cache.timer) return Promise.resolve();\n\n    return new Promise(function(resolve) {\n        var previousOnDone = cache.onDone;\n        cache.onDone = function onDone() {\n            if(previousOnDone) previousOnDone();\n            resolve();\n            cache.onDone = null;\n        };\n    });\n};\n\n/**\n * Clear the throttle cache for one or all timers\n * @param {optional string} id:\n *   if provided, clear just this timer\n *   if omitted, clear all timers (mainly useful for testing)\n */\nexports.clear = function(id) {\n    if(id) {\n        _clearTimeout(timerCache[id]);\n        delete timerCache[id];\n    } else {\n        for(var idi in timerCache) exports.clear(idi);\n    }\n};\n\nfunction _clearTimeout(cache) {\n    if(cache && cache.timer !== null) {\n        clearTimeout(cache.timer);\n        cache.timer = null;\n    }\n}\n\n},{}],729:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\n/**\n * convert a linear value into a logged value, folding negative numbers into\n * the given range\n */\nmodule.exports = function toLogRange(val, range) {\n    if(val > 0) return Math.log(val) / Math.LN10;\n\n    // move a negative value reference to a log axis - just put the\n    // result at the lowest range value on the plot (or if the range also went negative,\n    // one millionth of the top of the range)\n    var newVal = Math.log(Math.min(range[0], range[1])) / Math.LN10;\n    if(!isNumeric(newVal)) newVal = Math.log(Math.max(range[0], range[1])) / Math.LN10 - 6;\n    return newVal;\n};\n\n},{\"fast-isnumeric\":224}],730:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar topojsonUtils = module.exports = {};\n\nvar locationmodeToLayer = _dereq_('../plots/geo/constants').locationmodeToLayer;\nvar topojsonFeature = _dereq_('topojson-client').feature;\n\ntopojsonUtils.getTopojsonName = function(geoLayout) {\n    return [\n        geoLayout.scope.replace(/ /g, '-'), '_',\n        geoLayout.resolution.toString(), 'm'\n    ].join('');\n};\n\ntopojsonUtils.getTopojsonPath = function(topojsonURL, topojsonName) {\n    return topojsonURL + topojsonName + '.json';\n};\n\ntopojsonUtils.getTopojsonFeatures = function(trace, topojson) {\n    var layer = locationmodeToLayer[trace.locationmode];\n    var obj = topojson.objects[layer];\n\n    return topojsonFeature(topojson, obj).features;\n};\n\n},{\"../plots/geo/constants\":779,\"topojson-client\":527}],731:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'locale',\n    name: 'en-US',\n    dictionary: {\n        'Click to enter Colorscale title': 'Click to enter Colorscale title'\n    },\n    format: {\n        date: '%m/%d/%Y'\n    }\n};\n\n},{}],732:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'locale',\n    name: 'en',\n    dictionary: {\n        'Click to enter Colorscale title': 'Click to enter Colourscale title'\n    },\n    format: {\n        days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n        shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n        months: [\n            'January', 'February', 'March', 'April', 'May', 'June',\n            'July', 'August', 'September', 'October', 'November', 'December'\n        ],\n        shortMonths: [\n            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n        ],\n        periods: ['AM', 'PM'],\n        dateTime: '%a %b %e %X %Y',\n        date: '%d/%m/%Y',\n        time: '%H:%M:%S',\n        decimal: '.',\n        thousands: ',',\n        grouping: [3],\n        currency: ['$', ''],\n        year: '%Y',\n        month: '%b %Y',\n        dayMonth: '%b %-d',\n        dayMonthYear: '%b %-d, %Y'\n    }\n};\n\n},{}],733:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\n\n/*\n * containerArrayMatch: does this attribute string point into a\n * layout container array?\n *\n * @param {String} astr: an attribute string, like *annotations[2].text*\n *\n * @returns {Object | false} Returns false if `astr` doesn't match a container\n *  array. If it does, returns:\n *     {array: {String}, index: {Number}, property: {String}}\n *  ie the attribute string for the array, the index within the array (or ''\n *  if the whole array) and the property within that (or '' if the whole array\n *  or the whole object)\n */\nmodule.exports = function containerArrayMatch(astr) {\n    var rootContainers = Registry.layoutArrayContainers;\n    var regexpContainers = Registry.layoutArrayRegexes;\n    var rootPart = astr.split('[')[0];\n    var arrayStr;\n    var match;\n\n    // look for regexp matches first, because they may be nested inside root matches\n    // eg updatemenus[i].buttons is nested inside updatemenus\n    for(var i = 0; i < regexpContainers.length; i++) {\n        match = astr.match(regexpContainers[i]);\n        if(match && match.index === 0) {\n            arrayStr = match[0];\n            break;\n        }\n    }\n\n    // now look for root matches\n    if(!arrayStr) arrayStr = rootContainers[rootContainers.indexOf(rootPart)];\n\n    if(!arrayStr) return false;\n\n    var tail = astr.substr(arrayStr.length);\n    if(!tail) return {array: arrayStr, index: '', property: ''};\n\n    match = tail.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/);\n    if(!match) return false;\n\n    return {array: arrayStr, index: Number(match[1]), property: match[3] || ''};\n};\n\n},{\"../registry\":831}],734:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar extendFlat = Lib.extendFlat;\nvar isPlainObject = Lib.isPlainObject;\n\nvar traceOpts = {\n    valType: 'flaglist',\n    extras: ['none'],\n    flags: ['calc', 'clearAxisTypes', 'plot', 'style', 'markerSize', 'colorbars'],\n    \n};\n\nvar layoutOpts = {\n    valType: 'flaglist',\n    extras: ['none'],\n    flags: [\n        'calc', 'plot', 'legend', 'ticks', 'axrange',\n        'layoutstyle', 'modebar', 'camera', 'arraydraw', 'colorbars'\n    ],\n    \n};\n\n// flags for inside restyle/relayout include a few extras\n// that shouldn't be used in attributes, to deal with certain\n// combinations and conditionals efficiently\nvar traceEditTypeFlags = traceOpts.flags.slice()\n    .concat(['fullReplot']);\n\nvar layoutEditTypeFlags = layoutOpts.flags.slice()\n    .concat('layoutReplot');\n\nmodule.exports = {\n    traces: traceOpts,\n    layout: layoutOpts,\n    /*\n     * default (all false) edit flags for restyle (traces)\n     * creates a new object each call, so the caller can mutate freely\n     */\n    traceFlags: function() { return falseObj(traceEditTypeFlags); },\n\n    /*\n     * default (all false) edit flags for relayout\n     * creates a new object each call, so the caller can mutate freely\n     */\n    layoutFlags: function() { return falseObj(layoutEditTypeFlags); },\n\n    /*\n     * update `flags` with the `editType` values found in `attr`\n     */\n    update: function(flags, attr) {\n        var editType = attr.editType;\n        if(editType && editType !== 'none') {\n            var editTypeParts = editType.split('+');\n            for(var i = 0; i < editTypeParts.length; i++) {\n                flags[editTypeParts[i]] = true;\n            }\n        }\n    },\n\n    overrideAll: overrideAll\n};\n\nfunction falseObj(keys) {\n    var out = {};\n    for(var i = 0; i < keys.length; i++) out[keys[i]] = false;\n    return out;\n}\n\n/**\n * For attributes that are largely copied from elsewhere into a plot type that doesn't\n * support partial redraws - overrides the editType field of all attributes in the object\n *\n * @param {object} attrs: the attributes to override. Will not be mutated.\n * @param {string} editTypeOverride: the new editType to use\n * @param {'nested'|'from-root'} overrideContainers:\n *   - 'nested' will override editType for nested containers but not the root.\n *   - 'from-root' will also override editType of the root container.\n *   Containers below the absolute top level (trace or layout root) DO need an\n *   editType even if they are not `valObject`s themselves (eg `scatter.marker`)\n *   to handle the case where you edit the whole container.\n *\n * @return {object} a new attributes object with `editType` modified as directed\n */\nfunction overrideAll(attrs, editTypeOverride, overrideContainers) {\n    var out = extendFlat({}, attrs);\n    for(var key in out) {\n        var attr = out[key];\n        if(isPlainObject(attr)) {\n            out[key] = overrideOne(attr, editTypeOverride, overrideContainers, key);\n        }\n    }\n    if(overrideContainers === 'from-root') out.editType = editTypeOverride;\n\n    return out;\n}\n\nfunction overrideOne(attr, editTypeOverride, overrideContainers, key) {\n    if(attr.valType) {\n        var out = extendFlat({}, attr);\n        out.editType = editTypeOverride;\n\n        if(Array.isArray(attr.items)) {\n            out.items = new Array(attr.items.length);\n            for(var i = 0; i < attr.items.length; i++) {\n                out.items[i] = overrideOne(attr.items[i], editTypeOverride, 'from-root');\n            }\n        }\n        return out;\n    } else {\n        // don't provide an editType for the _deprecated container\n        return overrideAll(attr, editTypeOverride,\n            (key.charAt(0) === '_') ? 'nested' : 'from-root');\n    }\n}\n\n},{\"../lib\":703}],735:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar m4FromQuat = _dereq_('gl-mat4/fromQuat');\n\nvar Registry = _dereq_('../registry');\nvar Lib = _dereq_('../lib');\nvar Plots = _dereq_('../plots/plots');\nvar AxisIds = _dereq_('../plots/cartesian/axis_ids');\nvar Color = _dereq_('../components/color');\n\nvar cleanId = AxisIds.cleanId;\nvar getFromTrace = AxisIds.getFromTrace;\nvar traceIs = Registry.traceIs;\n\n// clear the promise queue if one of them got rejected\nexports.clearPromiseQueue = function(gd) {\n    if(Array.isArray(gd._promises) && gd._promises.length > 0) {\n        Lib.log('Clearing previous rejected promises from queue.');\n    }\n\n    gd._promises = [];\n};\n\n// make a few changes to the layout right away\n// before it gets used for anything\n// backward compatibility and cleanup of nonstandard options\nexports.cleanLayout = function(layout) {\n    var i, j;\n\n    if(!layout) layout = {};\n\n    // cannot have (x|y)axis1, numbering goes axis, axis2, axis3...\n    if(layout.xaxis1) {\n        if(!layout.xaxis) layout.xaxis = layout.xaxis1;\n        delete layout.xaxis1;\n    }\n    if(layout.yaxis1) {\n        if(!layout.yaxis) layout.yaxis = layout.yaxis1;\n        delete layout.yaxis1;\n    }\n    if(layout.scene1) {\n        if(!layout.scene) layout.scene = layout.scene1;\n        delete layout.scene1;\n    }\n\n    var axisAttrRegex = (Plots.subplotsRegistry.cartesian || {}).attrRegex;\n    var polarAttrRegex = (Plots.subplotsRegistry.polar || {}).attrRegex;\n    var ternaryAttrRegex = (Plots.subplotsRegistry.ternary || {}).attrRegex;\n    var sceneAttrRegex = (Plots.subplotsRegistry.gl3d || {}).attrRegex;\n\n    var keys = Object.keys(layout);\n    for(i = 0; i < keys.length; i++) {\n        var key = keys[i];\n\n        if(axisAttrRegex && axisAttrRegex.test(key)) {\n            // modifications to cartesian axes\n\n            var ax = layout[key];\n            if(ax.anchor && ax.anchor !== 'free') {\n                ax.anchor = cleanId(ax.anchor);\n            }\n            if(ax.overlaying) ax.overlaying = cleanId(ax.overlaying);\n\n            // old method of axis type - isdate and islog (before category existed)\n            if(!ax.type) {\n                if(ax.isdate) ax.type = 'date';\n                else if(ax.islog) ax.type = 'log';\n                else if(ax.isdate === false && ax.islog === false) ax.type = 'linear';\n            }\n            if(ax.autorange === 'withzero' || ax.autorange === 'tozero') {\n                ax.autorange = true;\n                ax.rangemode = 'tozero';\n            }\n            delete ax.islog;\n            delete ax.isdate;\n            delete ax.categories; // replaced by _categories\n\n            // prune empty domain arrays made before the new nestedProperty\n            if(emptyContainer(ax, 'domain')) delete ax.domain;\n\n            // autotick -> tickmode\n            if(ax.autotick !== undefined) {\n                if(ax.tickmode === undefined) {\n                    ax.tickmode = ax.autotick ? 'auto' : 'linear';\n                }\n                delete ax.autotick;\n            }\n\n            cleanTitle(ax);\n        } else if(polarAttrRegex && polarAttrRegex.test(key)) {\n            // modifications for polar\n\n            var polar = layout[key];\n            cleanTitle(polar.radialaxis);\n        } else if(ternaryAttrRegex && ternaryAttrRegex.test(key)) {\n            // modifications for ternary\n\n            var ternary = layout[key];\n            cleanTitle(ternary.aaxis);\n            cleanTitle(ternary.baxis);\n            cleanTitle(ternary.caxis);\n        } else if(sceneAttrRegex && sceneAttrRegex.test(key)) {\n            // modifications for 3D scenes\n\n            var scene = layout[key];\n\n            // clean old Camera coords\n            var cameraposition = scene.cameraposition;\n\n            if(Array.isArray(cameraposition) && cameraposition[0].length === 4) {\n                var rotation = cameraposition[0];\n                var center = cameraposition[1];\n                var radius = cameraposition[2];\n                var mat = m4FromQuat([], rotation);\n                var eye = [];\n\n                for(j = 0; j < 3; ++j) {\n                    eye[j] = center[j] + radius * mat[2 + 4 * j];\n                }\n\n                scene.camera = {\n                    eye: {x: eye[0], y: eye[1], z: eye[2]},\n                    center: {x: center[0], y: center[1], z: center[2]},\n                    up: {x: 0, y: 0, z: 1} // we just ignore calculating camera z up in this case\n                };\n\n                delete scene.cameraposition;\n            }\n\n            // clean axis titles\n            cleanTitle(scene.xaxis);\n            cleanTitle(scene.yaxis);\n            cleanTitle(scene.zaxis);\n        }\n    }\n\n    var annotationsLen = Array.isArray(layout.annotations) ? layout.annotations.length : 0;\n    for(i = 0; i < annotationsLen; i++) {\n        var ann = layout.annotations[i];\n\n        if(!Lib.isPlainObject(ann)) continue;\n\n        if(ann.ref) {\n            if(ann.ref === 'paper') {\n                ann.xref = 'paper';\n                ann.yref = 'paper';\n            } else if(ann.ref === 'data') {\n                ann.xref = 'x';\n                ann.yref = 'y';\n            }\n            delete ann.ref;\n        }\n\n        cleanAxRef(ann, 'xref');\n        cleanAxRef(ann, 'yref');\n    }\n\n    var shapesLen = Array.isArray(layout.shapes) ? layout.shapes.length : 0;\n    for(i = 0; i < shapesLen; i++) {\n        var shape = layout.shapes[i];\n\n        if(!Lib.isPlainObject(shape)) continue;\n\n        cleanAxRef(shape, 'xref');\n        cleanAxRef(shape, 'yref');\n    }\n\n    var legend = layout.legend;\n    if(legend) {\n        // check for old-style legend positioning (x or y is +/- 100)\n        if(legend.x > 3) {\n            legend.x = 1.02;\n            legend.xanchor = 'left';\n        } else if(legend.x < -2) {\n            legend.x = -0.02;\n            legend.xanchor = 'right';\n        }\n\n        if(legend.y > 3) {\n            legend.y = 1.02;\n            legend.yanchor = 'bottom';\n        } else if(legend.y < -2) {\n            legend.y = -0.02;\n            legend.yanchor = 'top';\n        }\n    }\n\n    // clean plot title\n    cleanTitle(layout);\n\n    /*\n     * Moved from rotate -> orbit for dragmode\n     */\n    if(layout.dragmode === 'rotate') layout.dragmode = 'orbit';\n\n    // sanitize rgb(fractions) and rgba(fractions) that old tinycolor\n    // supported, but new tinycolor does not because they're not valid css\n    Color.clean(layout);\n\n    // clean the layout container in layout.template\n    if(layout.template && layout.template.layout) {\n        exports.cleanLayout(layout.template.layout);\n    }\n\n    return layout;\n};\n\nfunction cleanAxRef(container, attr) {\n    var valIn = container[attr];\n    var axLetter = attr.charAt(0);\n    if(valIn && valIn !== 'paper') {\n        container[attr] = cleanId(valIn, axLetter);\n    }\n}\n\n/**\n * Cleans up old title attribute structure (flat) in favor of the new one (nested).\n *\n * @param {Object} titleContainer - an object potentially including deprecated title attributes\n */\nfunction cleanTitle(titleContainer) {\n    if(titleContainer) {\n        // title -> title.text\n        // (although title used to be a string attribute,\n        // numbers are accepted as well)\n        if(typeof titleContainer.title === 'string' || typeof titleContainer.title === 'number') {\n            titleContainer.title = {\n                text: titleContainer.title\n            };\n        }\n\n        rewireAttr('titlefont', 'font');\n        rewireAttr('titleposition', 'position');\n        rewireAttr('titleside', 'side');\n        rewireAttr('titleoffset', 'offset');\n    }\n\n    function rewireAttr(oldAttrName, newAttrName) {\n        var oldAttrSet = titleContainer[oldAttrName];\n        var newAttrSet = titleContainer.title && titleContainer.title[newAttrName];\n\n        if(oldAttrSet && !newAttrSet) {\n            // Ensure title object exists\n            if(!titleContainer.title) {\n                titleContainer.title = {};\n            }\n\n            titleContainer.title[newAttrName] = titleContainer[oldAttrName];\n            delete titleContainer[oldAttrName];\n        }\n    }\n}\n\n/*\n * cleanData: Make a few changes to the data for backward compatibility\n * before it gets used for anything. Modifies the data traces users provide.\n *\n * Important: if you're going to add something here that modifies a data array,\n * update it in place so the new array === the old one.\n */\nexports.cleanData = function(data) {\n    for(var tracei = 0; tracei < data.length; tracei++) {\n        var trace = data[tracei];\n        var i;\n\n        // use xbins to bin data in x, and ybins to bin data in y\n        if(trace.type === 'histogramy' && 'xbins' in trace && !('ybins' in trace)) {\n            trace.ybins = trace.xbins;\n            delete trace.xbins;\n        }\n\n        // error_y.opacity is obsolete - merge into color\n        if(trace.error_y && 'opacity' in trace.error_y) {\n            var dc = Color.defaults;\n            var yeColor = trace.error_y.color || (traceIs(trace, 'bar') ?\n                Color.defaultLine :\n                dc[tracei % dc.length]);\n            trace.error_y.color = Color.addOpacity(\n                Color.rgb(yeColor),\n                Color.opacity(yeColor) * trace.error_y.opacity);\n            delete trace.error_y.opacity;\n        }\n\n        // convert bardir to orientation, and put the data into\n        // the axes it's eventually going to be used with\n        if('bardir' in trace) {\n            if(trace.bardir === 'h' && (traceIs(trace, 'bar') ||\n                trace.type.substr(0, 9) === 'histogram')) {\n                trace.orientation = 'h';\n                exports.swapXYData(trace);\n            }\n            delete trace.bardir;\n        }\n\n        // now we have only one 1D histogram type, and whether\n        // it uses x or y data depends on trace.orientation\n        if(trace.type === 'histogramy') exports.swapXYData(trace);\n        if(trace.type === 'histogramx' || trace.type === 'histogramy') {\n            trace.type = 'histogram';\n        }\n\n        // scl->scale, reversescl->reversescale\n        if('scl' in trace && !('colorscale' in trace)) {\n            trace.colorscale = trace.scl;\n            delete trace.scl;\n        }\n        if('reversescl' in trace && !('reversescale' in trace)) {\n            trace.reversescale = trace.reversescl;\n            delete trace.reversescl;\n        }\n\n        // axis ids x1 -> x, y1-> y\n        if(trace.xaxis) trace.xaxis = cleanId(trace.xaxis, 'x');\n        if(trace.yaxis) trace.yaxis = cleanId(trace.yaxis, 'y');\n\n        // scene ids scene1 -> scene\n        if(traceIs(trace, 'gl3d') && trace.scene) {\n            trace.scene = Plots.subplotsRegistry.gl3d.cleanId(trace.scene);\n        }\n\n        if(!traceIs(trace, 'pie-like') && !traceIs(trace, 'bar-like')) {\n            if(Array.isArray(trace.textposition)) {\n                for(i = 0; i < trace.textposition.length; i++) {\n                    trace.textposition[i] = cleanTextPosition(trace.textposition[i]);\n                }\n            } else if(trace.textposition) {\n                trace.textposition = cleanTextPosition(trace.textposition);\n            }\n        }\n\n        // fix typo in colorscale definition\n        var _module = Registry.getModule(trace);\n        if(_module && _module.colorbar) {\n            var containerName = _module.colorbar.container;\n            var container = containerName ? trace[containerName] : trace;\n            if(container && container.colorscale) {\n                if(container.colorscale === 'YIGnBu') container.colorscale = 'YlGnBu';\n                if(container.colorscale === 'YIOrRd') container.colorscale = 'YlOrRd';\n            }\n        }\n\n        // fix typo in surface 'highlight*' definitions\n        if(trace.type === 'surface' && Lib.isPlainObject(trace.contours)) {\n            var dims = ['x', 'y', 'z'];\n\n            for(i = 0; i < dims.length; i++) {\n                var opts = trace.contours[dims[i]];\n\n                if(!Lib.isPlainObject(opts)) continue;\n\n                if(opts.highlightColor) {\n                    opts.highlightcolor = opts.highlightColor;\n                    delete opts.highlightColor;\n                }\n\n                if(opts.highlightWidth) {\n                    opts.highlightwidth = opts.highlightWidth;\n                    delete opts.highlightWidth;\n                }\n            }\n        }\n\n        // fixes from converting finance from transforms to real trace types\n        if(trace.type === 'candlestick' || trace.type === 'ohlc') {\n            var increasingShowlegend = (trace.increasing || {}).showlegend !== false;\n            var decreasingShowlegend = (trace.decreasing || {}).showlegend !== false;\n            var increasingName = cleanFinanceDir(trace.increasing);\n            var decreasingName = cleanFinanceDir(trace.decreasing);\n\n            // now figure out something smart to do with the separate direction\n            // names we removed\n            if((increasingName !== false) && (decreasingName !== false)) {\n                // both sub-names existed: base name previously had no effect\n                // so ignore it and try to find a shared part of the sub-names\n\n                var newName = commonPrefix(\n                    increasingName, decreasingName,\n                    increasingShowlegend, decreasingShowlegend\n                );\n                // if no common part, leave whatever name was (or wasn't) there\n                if(newName) trace.name = newName;\n            } else if((increasingName || decreasingName) && !trace.name) {\n                // one sub-name existed but not the base name - just use the sub-name\n                trace.name = increasingName || decreasingName;\n            }\n        }\n\n        // transforms backward compatibility fixes\n        if(Array.isArray(trace.transforms)) {\n            var transforms = trace.transforms;\n\n            for(i = 0; i < transforms.length; i++) {\n                var transform = transforms[i];\n\n                if(!Lib.isPlainObject(transform)) continue;\n\n                switch(transform.type) {\n                    case 'filter':\n                        if(transform.filtersrc) {\n                            transform.target = transform.filtersrc;\n                            delete transform.filtersrc;\n                        }\n\n                        if(transform.calendar) {\n                            if(!transform.valuecalendar) {\n                                transform.valuecalendar = transform.calendar;\n                            }\n                            delete transform.calendar;\n                        }\n                        break;\n\n                    case 'groupby':\n                        // Name has changed from `style` to `styles`, so use `style` but prefer `styles`:\n                        transform.styles = transform.styles || transform.style;\n\n                        if(transform.styles && !Array.isArray(transform.styles)) {\n                            var prevStyles = transform.styles;\n                            var styleKeys = Object.keys(prevStyles);\n\n                            transform.styles = [];\n                            for(var j = 0; j < styleKeys.length; j++) {\n                                transform.styles.push({\n                                    target: styleKeys[j],\n                                    value: prevStyles[styleKeys[j]]\n                                });\n                            }\n                        }\n                        break;\n                }\n            }\n        }\n\n        // prune empty containers made before the new nestedProperty\n        if(emptyContainer(trace, 'line')) delete trace.line;\n        if('marker' in trace) {\n            if(emptyContainer(trace.marker, 'line')) delete trace.marker.line;\n            if(emptyContainer(trace, 'marker')) delete trace.marker;\n        }\n\n        // sanitize rgb(fractions) and rgba(fractions) that old tinycolor\n        // supported, but new tinycolor does not because they're not valid css\n        Color.clean(trace);\n\n        // remove obsolete autobin(x|y) attributes, but only if true\n        // if false, this needs to happen in Histogram.calc because it\n        // can be a one-time autobin so we need to know the results before\n        // we can push them back into the trace.\n        if(trace.autobinx) {\n            delete trace.autobinx;\n            delete trace.xbins;\n        }\n        if(trace.autobiny) {\n            delete trace.autobiny;\n            delete trace.ybins;\n        }\n\n        cleanTitle(trace);\n        if(trace.colorbar) cleanTitle(trace.colorbar);\n        if(trace.marker && trace.marker.colorbar) cleanTitle(trace.marker.colorbar);\n        if(trace.line && trace.line.colorbar) cleanTitle(trace.line.colorbar);\n        if(trace.aaxis) cleanTitle(trace.aaxis);\n        if(trace.baxis) cleanTitle(trace.baxis);\n    }\n};\n\nfunction cleanFinanceDir(dirContainer) {\n    if(!Lib.isPlainObject(dirContainer)) return false;\n\n    var dirName = dirContainer.name;\n\n    delete dirContainer.name;\n    delete dirContainer.showlegend;\n\n    return (typeof dirName === 'string' || typeof dirName === 'number') && String(dirName);\n}\n\nfunction commonPrefix(name1, name2, show1, show2) {\n    // if only one is shown in the legend, use that\n    if(show1 && !show2) return name1;\n    if(show2 && !show1) return name2;\n\n    // if both or neither are in the legend, check if one is blank (or whitespace)\n    // and use the other one\n    // note that hover labels can still use the name even if the legend doesn't\n    if(!name1.trim()) return name2;\n    if(!name2.trim()) return name1;\n\n    var minLen = Math.min(name1.length, name2.length);\n    var i;\n    for(i = 0; i < minLen; i++) {\n        if(name1.charAt(i) !== name2.charAt(i)) break;\n    }\n\n    var out = name1.substr(0, i);\n    return out.trim();\n}\n\n// textposition - support partial attributes (ie just 'top')\n// and incorrect use of middle / center etc.\nfunction cleanTextPosition(textposition) {\n    var posY = 'middle';\n    var posX = 'center';\n\n    if(typeof textposition === 'string') {\n        if(textposition.indexOf('top') !== -1) posY = 'top';\n        else if(textposition.indexOf('bottom') !== -1) posY = 'bottom';\n\n        if(textposition.indexOf('left') !== -1) posX = 'left';\n        else if(textposition.indexOf('right') !== -1) posX = 'right';\n    }\n\n    return posY + ' ' + posX;\n}\n\nfunction emptyContainer(outer, innerStr) {\n    return (innerStr in outer) &&\n        (typeof outer[innerStr] === 'object') &&\n        (Object.keys(outer[innerStr]).length === 0);\n}\n\n\n// swap all the data and data attributes associated with x and y\nexports.swapXYData = function(trace) {\n    var i;\n    Lib.swapAttrs(trace, ['?', '?0', 'd?', '?bins', 'nbins?', 'autobin?', '?src', 'error_?']);\n    if(Array.isArray(trace.z) && Array.isArray(trace.z[0])) {\n        if(trace.transpose) delete trace.transpose;\n        else trace.transpose = true;\n    }\n    if(trace.error_x && trace.error_y) {\n        var errorY = trace.error_y;\n        var copyYstyle = ('copy_ystyle' in errorY) ?\n            errorY.copy_ystyle :\n            !(errorY.color || errorY.thickness || errorY.width);\n        Lib.swapAttrs(trace, ['error_?.copy_ystyle']);\n        if(copyYstyle) {\n            Lib.swapAttrs(trace, ['error_?.color', 'error_?.thickness', 'error_?.width']);\n        }\n    }\n    if(typeof trace.hoverinfo === 'string') {\n        var hoverInfoParts = trace.hoverinfo.split('+');\n        for(i = 0; i < hoverInfoParts.length; i++) {\n            if(hoverInfoParts[i] === 'x') hoverInfoParts[i] = 'y';\n            else if(hoverInfoParts[i] === 'y') hoverInfoParts[i] = 'x';\n        }\n        trace.hoverinfo = hoverInfoParts.join('+');\n    }\n};\n\n// coerce traceIndices input to array of trace indices\nexports.coerceTraceIndices = function(gd, traceIndices) {\n    if(isNumeric(traceIndices)) {\n        return [traceIndices];\n    } else if(!Array.isArray(traceIndices) || !traceIndices.length) {\n        return gd.data.map(function(_, i) { return i; });\n    } else if(Array.isArray(traceIndices)) {\n        var traceIndicesOut = [];\n        for(var i = 0; i < traceIndices.length; i++) {\n            if(Lib.isIndex(traceIndices[i], gd.data.length)) {\n                traceIndicesOut.push(traceIndices[i]);\n            } else {\n                Lib.warn('trace index (', traceIndices[i], ') is not a number or is out of bounds');\n            }\n        }\n        return traceIndicesOut;\n    }\n\n    return traceIndices;\n};\n\n/**\n * Manages logic around array container item creation / deletion / update\n * that nested property alone can't handle.\n *\n * @param {Object} np\n *  nested property of update attribute string about trace or layout object\n * @param {*} newVal\n *  update value passed to restyle / relayout / update\n * @param {Object} undoit\n *  undo hash (N.B. undoit may be mutated here).\n *\n */\nexports.manageArrayContainers = function(np, newVal, undoit) {\n    var obj = np.obj;\n    var parts = np.parts;\n    var pLength = parts.length;\n    var pLast = parts[pLength - 1];\n\n    var pLastIsNumber = isNumeric(pLast);\n\n    if(pLastIsNumber && newVal === null) {\n        // delete item\n\n        // Clear item in array container when new value is null\n        var contPath = parts.slice(0, pLength - 1).join('.');\n        var cont = Lib.nestedProperty(obj, contPath).get();\n        cont.splice(pLast, 1);\n\n        // Note that nested property clears null / undefined at end of\n        // array container, but not within them.\n    } else if(pLastIsNumber && np.get() === undefined) {\n        // create item\n\n        // When adding a new item, make sure undo command will remove it\n        if(np.get() === undefined) undoit[np.astr] = null;\n\n        np.set(newVal);\n    } else {\n        // update item\n\n        // If the last part of attribute string isn't a number,\n        // np.set is all we need.\n        np.set(newVal);\n    }\n};\n\n/*\n * Match the part to strip off to turn an attribute into its parent\n * really it should be either '.some_characters' or '[number]'\n * but we're a little more permissive here and match either\n * '.not_brackets_or_dot' or '[not_brackets_or_dot]'\n */\nvar ATTR_TAIL_RE = /(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;\n\nfunction getParent(attr) {\n    var tail = attr.search(ATTR_TAIL_RE);\n    if(tail > 0) return attr.substr(0, tail);\n}\n\n/*\n * hasParent: does an attribute object contain a parent of the given attribute?\n * for example, given 'images[2].x' do we also have 'images' or 'images[2]'?\n *\n * @param {Object} aobj\n *  update object, whose keys are attribute strings and values are their new settings\n * @param {string} attr\n *  the attribute string to test against\n * @returns {Boolean}\n *  is a parent of attr present in aobj?\n */\nexports.hasParent = function(aobj, attr) {\n    var attrParent = getParent(attr);\n    while(attrParent) {\n        if(attrParent in aobj) return true;\n        attrParent = getParent(attrParent);\n    }\n    return false;\n};\n\n/**\n * Empty out types for all axes containing these traces so we auto-set them again\n *\n * @param {object} gd\n * @param {[integer]} traces: trace indices to search for axes to clear the types of\n * @param {object} layoutUpdate: any update being done concurrently to the layout,\n *   which may supercede clearing the axis types\n */\nvar axLetters = ['x', 'y', 'z'];\nexports.clearAxisTypes = function(gd, traces, layoutUpdate) {\n    for(var i = 0; i < traces.length; i++) {\n        var trace = gd._fullData[i];\n        for(var j = 0; j < 3; j++) {\n            var ax = getFromTrace(gd, trace, axLetters[j]);\n\n            // do not clear log type - that's never an auto result so must have been intentional\n            if(ax && ax.type !== 'log') {\n                var axAttr = ax._name;\n                var sceneName = ax._id.substr(1);\n                if(sceneName.substr(0, 5) === 'scene') {\n                    if(layoutUpdate[sceneName] !== undefined) continue;\n                    axAttr = sceneName + '.' + axAttr;\n                }\n                var typeAttr = axAttr + '.type';\n\n                if(layoutUpdate[axAttr] === undefined && layoutUpdate[typeAttr] === undefined) {\n                    Lib.nestedProperty(gd.layout, typeAttr).set(null);\n                }\n            }\n        }\n    }\n};\n\n},{\"../components/color\":580,\"../lib\":703,\"../plots/cartesian/axis_ids\":754,\"../plots/plots\":812,\"../registry\":831,\"fast-isnumeric\":224,\"gl-mat4/fromQuat\":261}],736:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar main = _dereq_('./plot_api');\n\nexports.plot = main.plot;\nexports.newPlot = main.newPlot;\nexports.restyle = main.restyle;\nexports.relayout = main.relayout;\nexports.redraw = main.redraw;\nexports.update = main.update;\nexports._guiRestyle = main._guiRestyle;\nexports._guiRelayout = main._guiRelayout;\nexports._guiUpdate = main._guiUpdate;\nexports._storeDirectGUIEdit = main._storeDirectGUIEdit;\nexports.react = main.react;\nexports.extendTraces = main.extendTraces;\nexports.prependTraces = main.prependTraces;\nexports.addTraces = main.addTraces;\nexports.deleteTraces = main.deleteTraces;\nexports.moveTraces = main.moveTraces;\nexports.purge = main.purge;\nexports.addFrames = main.addFrames;\nexports.deleteFrames = main.deleteFrames;\nexports.animate = main.animate;\nexports.setPlotConfig = main.setPlotConfig;\n\nexports.toImage = _dereq_('./to_image');\nexports.validate = _dereq_('./validate');\nexports.downloadImage = _dereq_('../snapshot/download');\n\nvar templateApi = _dereq_('./template_api');\nexports.makeTemplate = templateApi.makeTemplate;\nexports.validateTemplate = templateApi.validateTemplate;\n\n},{\"../snapshot/download\":833,\"./plot_api\":738,\"./template_api\":743,\"./to_image\":744,\"./validate\":745}],737:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isPlainObject = _dereq_('../lib/is_plain_object');\nvar noop = _dereq_('../lib/noop');\nvar Loggers = _dereq_('../lib/loggers');\nvar sorterAsc = _dereq_('../lib/search').sorterAsc;\nvar Registry = _dereq_('../registry');\n\n\nexports.containerArrayMatch = _dereq_('./container_array_match');\n\nvar isAddVal = exports.isAddVal = function isAddVal(val) {\n    return val === 'add' || isPlainObject(val);\n};\n\nvar isRemoveVal = exports.isRemoveVal = function isRemoveVal(val) {\n    return val === null || val === 'remove';\n};\n\n/*\n * applyContainerArrayChanges: for managing arrays of layout components in relayout\n * handles them all with a consistent interface.\n *\n * Here are the supported actions -> relayout calls -> edits we get here\n * (as prepared in _relayout):\n *\n * add an empty obj -> {'annotations[2]': 'add'} -> {2: {'': 'add'}}\n * add a specific obj -> {'annotations[2]': {attrs}} -> {2: {'': {attrs}}}\n * delete an obj -> {'annotations[2]': 'remove'} -> {2: {'': 'remove'}}\n *               -> {'annotations[2]': null} -> {2: {'': null}}\n * delete the whole array -> {'annotations': 'remove'} -> {'': {'': 'remove'}}\n *                        -> {'annotations': null} -> {'': {'': null}}\n * edit an object -> {'annotations[2].text': 'boo'} -> {2: {'text': 'boo'}}\n *\n * You can combine many edits to different objects. Objects are added and edited\n * in ascending order, then removed in descending order.\n * For example, starting with [a, b, c], if you want to:\n * - replace b with d:\n *   {'annotations[1]': d, 'annotations[2]': null} (b is item 2 after adding d)\n * - add a new item d between a and b, and edit b:\n *    {'annotations[1]': d, 'annotations[2].x': newX} (b is item 2 after adding d)\n * - delete b and edit c:\n *    {'annotations[1]': null, 'annotations[2].x': newX} (c is edited before b is removed)\n *\n * You CANNOT combine adding/deleting an item at index `i` with edits to the same index `i`\n * You CANNOT combine replacing/deleting the whole array with anything else (for the same array).\n *\n * @param {HTMLDivElement} gd\n *  the DOM element of the graph container div\n * @param {Lib.nestedProperty} componentType: the array we are editing\n * @param {Object} edits\n *  the changes to make; keys are indices to edit, values are themselves objects:\n *  {attr: newValue} of changes to make to that index (with add/remove behavior\n *  in special values of the empty attr)\n * @param {Object} flags\n *  the flags for which actions we're going to perform to display these (and\n *  any other) changes. If we're already `recalc`ing, we don't need to redraw\n *  individual items\n * @param {function} _nestedProperty\n *  a (possibly modified for gui edits) nestedProperty constructor\n *  The modified version takes a 3rd argument, for a prefix to the attribute\n *  string necessary for storing GUI edits\n *\n * @returns {bool} `true` if it managed to complete drawing of the changes\n *  `false` would mean the parent should replot.\n */\nexports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np, edits, flags, _nestedProperty) {\n    var componentType = np.astr;\n    var supplyComponentDefaults = Registry.getComponentMethod(componentType, 'supplyLayoutDefaults');\n    var draw = Registry.getComponentMethod(componentType, 'draw');\n    var drawOne = Registry.getComponentMethod(componentType, 'drawOne');\n    var replotLater = flags.replot || flags.recalc || (supplyComponentDefaults === noop) || (draw === noop);\n    var layout = gd.layout;\n    var fullLayout = gd._fullLayout;\n\n    if(edits['']) {\n        if(Object.keys(edits).length > 1) {\n            Loggers.warn('Full array edits are incompatible with other edits',\n                componentType);\n        }\n\n        var fullVal = edits[''][''];\n\n        if(isRemoveVal(fullVal)) np.set(null);\n        else if(Array.isArray(fullVal)) np.set(fullVal);\n        else {\n            Loggers.warn('Unrecognized full array edit value', componentType, fullVal);\n            return true;\n        }\n\n        if(replotLater) return false;\n\n        supplyComponentDefaults(layout, fullLayout);\n        draw(gd);\n        return true;\n    }\n\n    var componentNums = Object.keys(edits).map(Number).sort(sorterAsc);\n    var componentArrayIn = np.get();\n    var componentArray = componentArrayIn || [];\n    // componentArrayFull is used just to keep splices in line between\n    // full and input arrays, so private keys can be copied over after\n    // redoing supplyDefaults\n    // TODO: this assumes componentArray is in gd.layout - which will not be\n    // true after we extend this to restyle\n    var componentArrayFull = _nestedProperty(fullLayout, componentType).get();\n\n    var deletes = [];\n    var firstIndexChange = -1;\n    var maxIndex = componentArray.length;\n    var i;\n    var j;\n    var componentNum;\n    var objEdits;\n    var objKeys;\n    var objVal;\n    var adding, prefix;\n\n    // first make the add and edit changes\n    for(i = 0; i < componentNums.length; i++) {\n        componentNum = componentNums[i];\n        objEdits = edits[componentNum];\n        objKeys = Object.keys(objEdits);\n        objVal = objEdits[''],\n        adding = isAddVal(objVal);\n\n        if(componentNum < 0 || componentNum > componentArray.length - (adding ? 0 : 1)) {\n            Loggers.warn('index out of range', componentType, componentNum);\n            continue;\n        }\n\n        if(objVal !== undefined) {\n            if(objKeys.length > 1) {\n                Loggers.warn(\n                    'Insertion & removal are incompatible with edits to the same index.',\n                    componentType, componentNum);\n            }\n\n            if(isRemoveVal(objVal)) {\n                deletes.push(componentNum);\n            } else if(adding) {\n                if(objVal === 'add') objVal = {};\n                componentArray.splice(componentNum, 0, objVal);\n                if(componentArrayFull) componentArrayFull.splice(componentNum, 0, {});\n            } else {\n                Loggers.warn('Unrecognized full object edit value',\n                    componentType, componentNum, objVal);\n            }\n\n            if(firstIndexChange === -1) firstIndexChange = componentNum;\n        } else {\n            for(j = 0; j < objKeys.length; j++) {\n                prefix = componentType + '[' + componentNum + '].';\n                _nestedProperty(componentArray[componentNum], objKeys[j], prefix)\n                    .set(objEdits[objKeys[j]]);\n            }\n        }\n    }\n\n    // now do deletes\n    for(i = deletes.length - 1; i >= 0; i--) {\n        componentArray.splice(deletes[i], 1);\n        // TODO: this drops private keys that had been stored in componentArrayFull\n        // does this have any ill effects?\n        if(componentArrayFull) componentArrayFull.splice(deletes[i], 1);\n    }\n\n    if(!componentArray.length) np.set(null);\n    else if(!componentArrayIn) np.set(componentArray);\n\n    if(replotLater) return false;\n\n    supplyComponentDefaults(layout, fullLayout);\n\n    // finally draw all the components we need to\n    // if we added or removed any, redraw all after it\n    if(drawOne !== noop) {\n        var indicesToDraw;\n        if(firstIndexChange === -1) {\n            // there's no re-indexing to do, so only redraw components that changed\n            indicesToDraw = componentNums;\n        } else {\n            // in case the component array was shortened, we still need do call\n            // drawOne on the latter items so they get properly removed\n            maxIndex = Math.max(componentArray.length, maxIndex);\n            indicesToDraw = [];\n            for(i = 0; i < componentNums.length; i++) {\n                componentNum = componentNums[i];\n                if(componentNum >= firstIndexChange) break;\n                indicesToDraw.push(componentNum);\n            }\n            for(i = firstIndexChange; i < maxIndex; i++) {\n                indicesToDraw.push(i);\n            }\n        }\n        for(i = 0; i < indicesToDraw.length; i++) {\n            drawOne(gd, indicesToDraw[i]);\n        }\n    } else draw(gd);\n\n    return true;\n};\n\n},{\"../lib/is_plain_object\":704,\"../lib/loggers\":707,\"../lib/noop\":712,\"../lib/search\":722,\"../registry\":831,\"./container_array_match\":733}],738:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\nvar hasHover = _dereq_('has-hover');\n\nvar Lib = _dereq_('../lib');\nvar nestedProperty = Lib.nestedProperty;\n\nvar Events = _dereq_('../lib/events');\nvar Queue = _dereq_('../lib/queue');\n\nvar Registry = _dereq_('../registry');\nvar PlotSchema = _dereq_('./plot_schema');\nvar Plots = _dereq_('../plots/plots');\nvar Polar = _dereq_('../plots/polar/legacy');\n\nvar Axes = _dereq_('../plots/cartesian/axes');\nvar Drawing = _dereq_('../components/drawing');\nvar Color = _dereq_('../components/color');\nvar initInteractions = _dereq_('../plots/cartesian/graph_interact').initInteractions;\nvar xmlnsNamespaces = _dereq_('../constants/xmlns_namespaces');\nvar svgTextUtils = _dereq_('../lib/svg_text_utils');\nvar clearSelect = _dereq_('../plots/cartesian/select').clearSelect;\n\nvar dfltConfig = _dereq_('./plot_config').dfltConfig;\nvar manageArrays = _dereq_('./manage_arrays');\nvar helpers = _dereq_('./helpers');\nvar subroutines = _dereq_('./subroutines');\nvar editTypes = _dereq_('./edit_types');\n\nvar AX_NAME_PATTERN = _dereq_('../plots/cartesian/constants').AX_NAME_PATTERN;\n\nvar numericNameWarningCount = 0;\nvar numericNameWarningCountLimit = 5;\n\n/**\n * Main plot-creation function\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n * @param {array of objects} data\n *      array of traces, containing the data and display information for each trace\n * @param {object} layout\n *      object describing the overall display of the plot,\n *      all the stuff that doesn't pertain to any individual trace\n * @param {object} config\n *      configuration options (see ./plot_config.js for more info)\n *\n * OR\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n * @param {object} figure\n *      object containing `data`, `layout`, `config`, and `frames` members\n *\n */\nfunction plot(gd, data, layout, config) {\n    var frames;\n\n    gd = Lib.getGraphDiv(gd);\n\n    // Events.init is idempotent and bails early if gd has already been init'd\n    Events.init(gd);\n\n    if(Lib.isPlainObject(data)) {\n        var obj = data;\n        data = obj.data;\n        layout = obj.layout;\n        config = obj.config;\n        frames = obj.frames;\n    }\n\n    var okToPlot = Events.triggerHandler(gd, 'plotly_beforeplot', [data, layout, config]);\n    if(okToPlot === false) return Promise.reject();\n\n    // if there's no data or layout, and this isn't yet a plotly plot\n    // container, log a warning to help plotly.js users debug\n    if(!data && !layout && !Lib.isPlotDiv(gd)) {\n        Lib.warn('Calling Plotly.plot as if redrawing ' +\n            'but this container doesn\\'t yet have a plot.', gd);\n    }\n\n    function addFrames() {\n        if(frames) {\n            return exports.addFrames(gd, frames);\n        }\n    }\n\n    // transfer configuration options to gd until we move over to\n    // a more OO like model\n    setPlotContext(gd, config);\n\n    if(!layout) layout = {};\n\n    // hook class for plots main container (in case of plotly.js\n    // this won't be #embedded-graph or .js-tab-contents)\n    d3.select(gd).classed('js-plotly-plot', true);\n\n    // off-screen getBoundingClientRect testing space,\n    // in #js-plotly-tester (and stored as Drawing.tester)\n    // so we can share cached text across tabs\n    Drawing.makeTester();\n\n    // collect promises for any async actions during plotting\n    // any part of the plotting code can push to gd._promises, then\n    // before we move to the next step, we check that they're all\n    // complete, and empty out the promise list again.\n    if(!Array.isArray(gd._promises)) gd._promises = [];\n\n    var graphWasEmpty = ((gd.data || []).length === 0 && Array.isArray(data));\n\n    // if there is already data on the graph, append the new data\n    // if you only want to redraw, pass a non-array for data\n    if(Array.isArray(data)) {\n        helpers.cleanData(data);\n\n        if(graphWasEmpty) gd.data = data;\n        else gd.data.push.apply(gd.data, data);\n\n        // for routines outside graph_obj that want a clean tab\n        // (rather than appending to an existing one) gd.empty\n        // is used to determine whether to make a new tab\n        gd.empty = false;\n    }\n\n    if(!gd.layout || graphWasEmpty) {\n        gd.layout = helpers.cleanLayout(layout);\n    }\n\n    Plots.supplyDefaults(gd);\n\n    var fullLayout = gd._fullLayout;\n    var hasCartesian = fullLayout._has('cartesian');\n\n    // Legacy polar plots\n    if(!fullLayout._has('polar') && data && data[0] && data[0].r) {\n        Lib.log('Legacy polar charts are deprecated!');\n        return plotLegacyPolar(gd, data, layout);\n    }\n\n    // so we don't try to re-call Plotly.plot from inside\n    // legend and colorbar, if margins changed\n    fullLayout._replotting = true;\n\n    // make or remake the framework if we need to\n    if(graphWasEmpty) makePlotFramework(gd);\n\n    // polar need a different framework\n    if(gd.framework !== makePlotFramework) {\n        gd.framework = makePlotFramework;\n        makePlotFramework(gd);\n    }\n\n    // clear gradient defs on each .plot call, because we know we'll loop through all traces\n    Drawing.initGradients(gd);\n\n    // save initial show spikes once per graph\n    if(graphWasEmpty) Axes.saveShowSpikeInitial(gd);\n\n    // prepare the data and find the autorange\n\n    // generate calcdata, if we need to\n    // to force redoing calcdata, just delete it before calling Plotly.plot\n    var recalc = !gd.calcdata || gd.calcdata.length !== (gd._fullData || []).length;\n    if(recalc) Plots.doCalcdata(gd);\n\n    // in case it has changed, attach fullData traces to calcdata\n    for(var i = 0; i < gd.calcdata.length; i++) {\n        gd.calcdata[i][0].trace = gd._fullData[i];\n    }\n\n    // make the figure responsive\n    if(gd._context.responsive) {\n        if(!gd._responsiveChartHandler) {\n            // Keep a reference to the resize handler to purge it down the road\n            gd._responsiveChartHandler = function() { Plots.resize(gd); };\n\n            // Listen to window resize\n            window.addEventListener('resize', gd._responsiveChartHandler);\n        }\n    } else {\n        Lib.clearResponsive(gd);\n    }\n\n    /*\n     * start async-friendly code - now we're actually drawing things\n     */\n\n    var oldMargins = Lib.extendFlat({}, fullLayout._size);\n\n    // draw framework first so that margin-pushing\n    // components can position themselves correctly\n    var drawFrameworkCalls = 0;\n    function drawFramework() {\n        var basePlotModules = fullLayout._basePlotModules;\n\n        for(var i = 0; i < basePlotModules.length; i++) {\n            if(basePlotModules[i].drawFramework) {\n                basePlotModules[i].drawFramework(gd);\n            }\n        }\n\n        if(!fullLayout._glcanvas && fullLayout._has('gl')) {\n            fullLayout._glcanvas = fullLayout._glcontainer.selectAll('.gl-canvas').data([{\n                key: 'contextLayer',\n                context: true,\n                pick: false\n            }, {\n                key: 'focusLayer',\n                context: false,\n                pick: false\n            }, {\n                key: 'pickLayer',\n                context: false,\n                pick: true\n            }], function(d) { return d.key; });\n\n            fullLayout._glcanvas.enter().append('canvas')\n                .attr('class', function(d) {\n                    return 'gl-canvas gl-canvas-' + d.key.replace('Layer', '');\n                })\n                .style({\n                    position: 'absolute',\n                    top: 0,\n                    left: 0,\n                    overflow: 'visible',\n                    'pointer-events': 'none'\n                });\n        }\n\n        if(fullLayout._glcanvas) {\n            fullLayout._glcanvas\n                .attr('width', fullLayout.width)\n                .attr('height', fullLayout.height);\n\n            var regl = fullLayout._glcanvas.data()[0].regl;\n            if(regl) {\n                // Unfortunately, this can happen when relayouting to large\n                // width/height on some browsers.\n                if(Math.floor(fullLayout.width) !== regl._gl.drawingBufferWidth ||\n                    Math.floor(fullLayout.height) !== regl._gl.drawingBufferHeight\n                 ) {\n                    var msg = 'WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.';\n                    if(drawFrameworkCalls) {\n                        Lib.error(msg);\n                    } else {\n                        Lib.log(msg + ' Clearing graph and plotting again.');\n                        Plots.cleanPlot([], {}, gd._fullData, fullLayout);\n                        Plots.supplyDefaults(gd);\n                        fullLayout = gd._fullLayout;\n                        Plots.doCalcdata(gd);\n                        drawFrameworkCalls++;\n                        return drawFramework();\n                    }\n                }\n            }\n        }\n\n        if(fullLayout.modebar.orientation === 'h') {\n            fullLayout._modebardiv\n              .style('height', null)\n              .style('width', '100%');\n        } else {\n            fullLayout._modebardiv\n              .style('width', null)\n              .style('height', fullLayout.height + 'px');\n        }\n\n        return Plots.previousPromises(gd);\n    }\n\n    // draw anything that can affect margins.\n    function marginPushers() {\n        // First reset the list of things that are allowed to change the margins\n        // So any deleted traces or components will be wiped out of the\n        // automargin calculation.\n        // This means *every* margin pusher must be listed here, even if it\n        // doesn't actually try to push the margins until later.\n        Plots.clearAutoMarginIds(gd);\n\n        subroutines.drawMarginPushers(gd);\n        Axes.allowAutoMargin(gd);\n\n        Plots.doAutoMargin(gd);\n        return Plots.previousPromises(gd);\n    }\n\n    // in case the margins changed, draw margin pushers again\n    function marginPushersAgain() {\n        if(!Plots.didMarginChange(oldMargins, fullLayout._size)) return;\n\n        return Lib.syncOrAsync([\n            marginPushers,\n            subroutines.layoutStyles\n        ], gd);\n    }\n\n    function positionAndAutorange() {\n        if(!recalc) {\n            doAutoRangeAndConstraints();\n            return;\n        }\n\n        // TODO: autosize extra for text markers and images\n        // see https://github.com/plotly/plotly.js/issues/1111\n        return Lib.syncOrAsync([\n            Registry.getComponentMethod('shapes', 'calcAutorange'),\n            Registry.getComponentMethod('annotations', 'calcAutorange'),\n            doAutoRangeAndConstraints\n        ], gd);\n    }\n\n    function doAutoRangeAndConstraints() {\n        if(gd._transitioning) return;\n\n        subroutines.doAutoRangeAndConstraints(gd);\n\n        // store initial ranges *after* enforcing constraints, otherwise\n        // we will never look like we're at the initial ranges\n        if(graphWasEmpty) Axes.saveRangeInitial(gd);\n\n        // this one is different from shapes/annotations calcAutorange\n        // the others incorporate those components into ax._extremes,\n        // this one actually sets the ranges in rangesliders.\n        Registry.getComponentMethod('rangeslider', 'calcAutorange')(gd);\n    }\n\n    // draw ticks, titles, and calculate axis scaling (._b, ._m)\n    function drawAxes() {\n        return Axes.draw(gd, graphWasEmpty ? '' : 'redraw');\n    }\n\n    var seq = [\n        Plots.previousPromises,\n        addFrames,\n        drawFramework,\n        marginPushers,\n        marginPushersAgain\n    ];\n\n    if(hasCartesian) seq.push(positionAndAutorange);\n\n    seq.push(subroutines.layoutStyles);\n    if(hasCartesian) seq.push(drawAxes);\n\n    seq.push(\n        subroutines.drawData,\n        subroutines.finalDraw,\n        initInteractions,\n        Plots.addLinks,\n        Plots.rehover,\n        Plots.redrag,\n        // TODO: doAutoMargin is only needed here for axis automargin, which\n        // happens outside of marginPushers where all the other automargins are\n        // calculated. Would be much better to separate margin calculations from\n        // component drawing - see https://github.com/plotly/plotly.js/issues/2704\n        Plots.doAutoMargin,\n        Plots.previousPromises\n    );\n\n    // even if everything we did was synchronous, return a promise\n    // so that the caller doesn't care which route we took\n    var plotDone = Lib.syncOrAsync(seq, gd);\n    if(!plotDone || !plotDone.then) plotDone = Promise.resolve();\n\n    return plotDone.then(function() {\n        emitAfterPlot(gd);\n        return gd;\n    });\n}\n\nfunction emitAfterPlot(gd) {\n    var fullLayout = gd._fullLayout;\n\n    if(fullLayout._redrawFromAutoMarginCount) {\n        fullLayout._redrawFromAutoMarginCount--;\n    } else {\n        gd.emit('plotly_afterplot');\n    }\n}\n\nfunction setPlotConfig(obj) {\n    return Lib.extendFlat(dfltConfig, obj);\n}\n\nfunction setBackground(gd, bgColor) {\n    try {\n        gd._fullLayout._paper.style('background', bgColor);\n    } catch(e) {\n        Lib.error(e);\n    }\n}\n\nfunction opaqueSetBackground(gd, bgColor) {\n    var blend = Color.combine(bgColor, 'white');\n    setBackground(gd, blend);\n}\n\nfunction setPlotContext(gd, config) {\n    if(!gd._context) {\n        gd._context = Lib.extendDeep({}, dfltConfig);\n\n        // stash <base> href, used to make robust clipPath URLs\n        var base = d3.select('base');\n        gd._context._baseUrl = base.size() && base.attr('href') ?\n            window.location.href.split('#')[0] :\n            '';\n    }\n\n    var context = gd._context;\n\n    var i, keys, key;\n\n    if(config) {\n        keys = Object.keys(config);\n        for(i = 0; i < keys.length; i++) {\n            key = keys[i];\n            if(key === 'editable' || key === 'edits') continue;\n            if(key in context) {\n                if(key === 'setBackground' && config[key] === 'opaque') {\n                    context[key] = opaqueSetBackground;\n                } else {\n                    context[key] = config[key];\n                }\n            }\n        }\n\n        // map plot3dPixelRatio to plotGlPixelRatio for backward compatibility\n        if(config.plot3dPixelRatio && !context.plotGlPixelRatio) {\n            context.plotGlPixelRatio = context.plot3dPixelRatio;\n        }\n\n        // now deal with editable and edits - first editable overrides\n        // everything, then edits refines\n        var editable = config.editable;\n        if(editable !== undefined) {\n            // we're not going to *use* context.editable, we're only going to\n            // use context.edits... but keep it for the record\n            context.editable = editable;\n\n            keys = Object.keys(context.edits);\n            for(i = 0; i < keys.length; i++) {\n                context.edits[keys[i]] = editable;\n            }\n        }\n        if(config.edits) {\n            keys = Object.keys(config.edits);\n            for(i = 0; i < keys.length; i++) {\n                key = keys[i];\n                if(key in context.edits) {\n                    context.edits[key] = config.edits[key];\n                }\n            }\n        }\n\n        // not part of the user-facing config options\n        context._exportedPlot = config._exportedPlot;\n    }\n\n    // staticPlot forces a bunch of others:\n    if(context.staticPlot) {\n        context.editable = false;\n        context.edits = {};\n        context.autosizable = false;\n        context.scrollZoom = false;\n        context.doubleClick = false;\n        context.showTips = false;\n        context.showLink = false;\n        context.displayModeBar = false;\n    }\n\n    // make sure hover-only devices have mode bar visible\n    if(context.displayModeBar === 'hover' && !hasHover) {\n        context.displayModeBar = true;\n    }\n\n    // default and fallback for setBackground\n    if(context.setBackground === 'transparent' || typeof context.setBackground !== 'function') {\n        context.setBackground = setBackground;\n    }\n\n    // Check if gd has a specified widht/height to begin with\n    context._hasZeroHeight = context._hasZeroHeight || gd.clientHeight === 0;\n    context._hasZeroWidth = context._hasZeroWidth || gd.clientWidth === 0;\n\n    // fill context._scrollZoom helper to help manage scrollZoom flaglist\n    var szIn = context.scrollZoom;\n    var szOut = context._scrollZoom = {};\n    if(szIn === true) {\n        szOut.cartesian = 1;\n        szOut.gl3d = 1;\n        szOut.geo = 1;\n        szOut.mapbox = 1;\n    } else if(typeof szIn === 'string') {\n        var parts = szIn.split('+');\n        for(i = 0; i < parts.length; i++) {\n            szOut[parts[i]] = 1;\n        }\n    } else if(szIn !== false) {\n        szOut.gl3d = 1;\n        szOut.geo = 1;\n        szOut.mapbox = 1;\n    }\n}\n\nfunction plotLegacyPolar(gd, data, layout) {\n    // build or reuse the container skeleton\n    var plotContainer = d3.select(gd).selectAll('.plot-container')\n        .data([0]);\n    plotContainer.enter()\n        .insert('div', ':first-child')\n        .classed('plot-container plotly', true);\n    var paperDiv = plotContainer.selectAll('.svg-container')\n        .data([0]);\n    paperDiv.enter().append('div')\n        .classed('svg-container', true)\n        .style('position', 'relative');\n\n    // empty it everytime for now\n    paperDiv.html('');\n\n    // fulfill gd requirements\n    if(data) gd.data = data;\n    if(layout) gd.layout = layout;\n    Polar.manager.fillLayout(gd);\n\n    // resize canvas\n    paperDiv.style({\n        width: gd._fullLayout.width + 'px',\n        height: gd._fullLayout.height + 'px'\n    });\n\n    // instantiate framework\n    gd.framework = Polar.manager.framework(gd);\n\n    // plot\n    gd.framework({data: gd.data, layout: gd.layout}, paperDiv.node());\n\n    // set undo point\n    gd.framework.setUndoPoint();\n\n    // get the resulting svg for extending it\n    var polarPlotSVG = gd.framework.svg();\n\n    // editable title\n    var opacity = 1;\n    var txt = gd._fullLayout.title ? gd._fullLayout.title.text : '';\n    if(txt === '' || !txt) opacity = 0;\n\n    var titleLayout = function() {\n        this.call(svgTextUtils.convertToTspans, gd);\n        // TODO: html/mathjax\n        // TODO: center title\n    };\n\n    var title = polarPlotSVG.select('.title-group text')\n        .call(titleLayout);\n\n    if(gd._context.edits.titleText) {\n        var placeholderText = Lib._(gd, 'Click to enter Plot title');\n        if(!txt || txt === placeholderText) {\n            opacity = 0.2;\n            // placeholder is not going through convertToTspans\n            // so needs explicit data-unformatted\n            title.attr({'data-unformatted': placeholderText})\n                .text(placeholderText)\n                .style({opacity: opacity})\n                .on('mouseover.opacity', function() {\n                    d3.select(this).transition().duration(100)\n                        .style('opacity', 1);\n                })\n                .on('mouseout.opacity', function() {\n                    d3.select(this).transition().duration(1000)\n                        .style('opacity', 0);\n                });\n        }\n\n        var setContenteditable = function() {\n            this.call(svgTextUtils.makeEditable, {gd: gd})\n                .on('edit', function(text) {\n                    gd.framework({layout: {title: {text: text}}});\n                    this.text(text)\n                        .call(titleLayout);\n                    this.call(setContenteditable);\n                })\n                .on('cancel', function() {\n                    var txt = this.attr('data-unformatted');\n                    this.text(txt).call(titleLayout);\n                });\n        };\n        title.call(setContenteditable);\n    }\n\n    gd._context.setBackground(gd, gd._fullLayout.paper_bgcolor);\n    Plots.addLinks(gd);\n\n    return Promise.resolve();\n}\n\n// convenience function to force a full redraw, mostly for use by plotly.js\nfunction redraw(gd) {\n    gd = Lib.getGraphDiv(gd);\n\n    if(!Lib.isPlotDiv(gd)) {\n        throw new Error('This element is not a Plotly plot: ' + gd);\n    }\n\n    helpers.cleanData(gd.data);\n    helpers.cleanLayout(gd.layout);\n\n    gd.calcdata = undefined;\n    return exports.plot(gd).then(function() {\n        gd.emit('plotly_redraw');\n        return gd;\n    });\n}\n\n/**\n * Convenience function to make idempotent plot option obvious to users.\n *\n * @param gd\n * @param {Object[]} data\n * @param {Object} layout\n * @param {Object} config\n */\nfunction newPlot(gd, data, layout, config) {\n    gd = Lib.getGraphDiv(gd);\n\n    // remove gl contexts\n    Plots.cleanPlot([], {}, gd._fullData || [], gd._fullLayout || {});\n\n    Plots.purge(gd);\n    return exports.plot(gd, data, layout, config);\n}\n\n/**\n * Wrap negative indicies to their positive counterparts.\n *\n * @param {Number[]} indices An array of indices\n * @param {Number} maxIndex The maximum index allowable (arr.length - 1)\n */\nfunction positivifyIndices(indices, maxIndex) {\n    var parentLength = maxIndex + 1;\n    var positiveIndices = [];\n    var i;\n    var index;\n\n    for(i = 0; i < indices.length; i++) {\n        index = indices[i];\n        if(index < 0) {\n            positiveIndices.push(parentLength + index);\n        } else {\n            positiveIndices.push(index);\n        }\n    }\n    return positiveIndices;\n}\n\n/**\n * Ensures that an index array for manipulating gd.data is valid.\n *\n * Intended for use with addTraces, deleteTraces, and moveTraces.\n *\n * @param gd\n * @param indices\n * @param arrayName\n */\nfunction assertIndexArray(gd, indices, arrayName) {\n    var i,\n        index;\n\n    for(i = 0; i < indices.length; i++) {\n        index = indices[i];\n\n        // validate that indices are indeed integers\n        if(index !== parseInt(index, 10)) {\n            throw new Error('all values in ' + arrayName + ' must be integers');\n        }\n\n        // check that all indices are in bounds for given gd.data array length\n        if(index >= gd.data.length || index < -gd.data.length) {\n            throw new Error(arrayName + ' must be valid indices for gd.data.');\n        }\n\n        // check that indices aren't repeated\n        if(indices.indexOf(index, i + 1) > -1 ||\n                index >= 0 && indices.indexOf(-gd.data.length + index) > -1 ||\n                index < 0 && indices.indexOf(gd.data.length + index) > -1) {\n            throw new Error('each index in ' + arrayName + ' must be unique.');\n        }\n    }\n}\n\n/**\n * Private function used by Plotly.moveTraces to check input args\n *\n * @param gd\n * @param currentIndices\n * @param newIndices\n */\nfunction checkMoveTracesArgs(gd, currentIndices, newIndices) {\n    // check that gd has attribute 'data' and 'data' is array\n    if(!Array.isArray(gd.data)) {\n        throw new Error('gd.data must be an array.');\n    }\n\n    // validate currentIndices array\n    if(typeof currentIndices === 'undefined') {\n        throw new Error('currentIndices is a required argument.');\n    } else if(!Array.isArray(currentIndices)) {\n        currentIndices = [currentIndices];\n    }\n    assertIndexArray(gd, currentIndices, 'currentIndices');\n\n    // validate newIndices array if it exists\n    if(typeof newIndices !== 'undefined' && !Array.isArray(newIndices)) {\n        newIndices = [newIndices];\n    }\n    if(typeof newIndices !== 'undefined') {\n        assertIndexArray(gd, newIndices, 'newIndices');\n    }\n\n    // check currentIndices and newIndices are the same length if newIdices exists\n    if(typeof newIndices !== 'undefined' && currentIndices.length !== newIndices.length) {\n        throw new Error('current and new indices must be of equal length.');\n    }\n}\n/**\n * A private function to reduce the type checking clutter in addTraces.\n *\n * @param gd\n * @param traces\n * @param newIndices\n */\nfunction checkAddTracesArgs(gd, traces, newIndices) {\n    var i, value;\n\n    // check that gd has attribute 'data' and 'data' is array\n    if(!Array.isArray(gd.data)) {\n        throw new Error('gd.data must be an array.');\n    }\n\n    // make sure traces exists\n    if(typeof traces === 'undefined') {\n        throw new Error('traces must be defined.');\n    }\n\n    // make sure traces is an array\n    if(!Array.isArray(traces)) {\n        traces = [traces];\n    }\n\n    // make sure each value in traces is an object\n    for(i = 0; i < traces.length; i++) {\n        value = traces[i];\n        if(typeof value !== 'object' || (Array.isArray(value) || value === null)) {\n            throw new Error('all values in traces array must be non-array objects');\n        }\n    }\n\n    // make sure we have an index for each trace\n    if(typeof newIndices !== 'undefined' && !Array.isArray(newIndices)) {\n        newIndices = [newIndices];\n    }\n    if(typeof newIndices !== 'undefined' && newIndices.length !== traces.length) {\n        throw new Error(\n            'if indices is specified, traces.length must equal indices.length'\n        );\n    }\n}\n\n/**\n * A private function to reduce the type checking clutter in spliceTraces.\n * Get all update Properties from gd.data. Validate inputs and outputs.\n * Used by prependTrace and extendTraces\n *\n * @param gd\n * @param update\n * @param indices\n * @param maxPoints\n */\nfunction assertExtendTracesArgs(gd, update, indices, maxPoints) {\n    var maxPointsIsObject = Lib.isPlainObject(maxPoints);\n\n    if(!Array.isArray(gd.data)) {\n        throw new Error('gd.data must be an array');\n    }\n    if(!Lib.isPlainObject(update)) {\n        throw new Error('update must be a key:value object');\n    }\n\n    if(typeof indices === 'undefined') {\n        throw new Error('indices must be an integer or array of integers');\n    }\n\n    assertIndexArray(gd, indices, 'indices');\n\n    for(var key in update) {\n        /*\n         * Verify that the attribute to be updated contains as many trace updates\n         * as indices. Failure must result in throw and no-op\n         */\n        if(!Array.isArray(update[key]) || update[key].length !== indices.length) {\n            throw new Error('attribute ' + key + ' must be an array of length equal to indices array length');\n        }\n\n        /*\n         * if maxPoints is an object it must match keys and array lengths of 'update' 1:1\n         */\n        if(maxPointsIsObject &&\n            (!(key in maxPoints) || !Array.isArray(maxPoints[key]) ||\n            maxPoints[key].length !== update[key].length)) {\n            throw new Error('when maxPoints is set as a key:value object it must contain a 1:1 ' +\n                            'corrispondence with the keys and number of traces in the update object');\n        }\n    }\n}\n\n/**\n * A private function to reduce the type checking clutter in spliceTraces.\n *\n * @param {Object|HTMLDivElement} gd\n * @param {Object} update\n * @param {Number[]} indices\n * @param {Number||Object} maxPoints\n * @return {Object[]}\n */\nfunction getExtendProperties(gd, update, indices, maxPoints) {\n    var maxPointsIsObject = Lib.isPlainObject(maxPoints);\n    var updateProps = [];\n    var trace, target, prop, insert, maxp;\n\n    // allow scalar index to represent a single trace position\n    if(!Array.isArray(indices)) indices = [indices];\n\n    // negative indices are wrapped around to their positive value. Equivalent to python indexing.\n    indices = positivifyIndices(indices, gd.data.length - 1);\n\n    // loop through all update keys and traces and harvest validated data.\n    for(var key in update) {\n        for(var j = 0; j < indices.length; j++) {\n            /*\n             * Choose the trace indexed by the indices map argument and get the prop setter-getter\n             * instance that references the key and value for this particular trace.\n             */\n            trace = gd.data[indices[j]];\n            prop = nestedProperty(trace, key);\n\n            /*\n             * Target is the existing gd.data.trace.dataArray value like \"x\" or \"marker.size\"\n             * Target must exist as an Array to allow the extend operation to be performed.\n             */\n            target = prop.get();\n            insert = update[key][j];\n\n            if(!Lib.isArrayOrTypedArray(insert)) {\n                throw new Error('attribute: ' + key + ' index: ' + j + ' must be an array');\n            }\n            if(!Lib.isArrayOrTypedArray(target)) {\n                throw new Error('cannot extend missing or non-array attribute: ' + key);\n            }\n            if(target.constructor !== insert.constructor) {\n                throw new Error('cannot extend array with an array of a different type: ' + key);\n            }\n\n            /*\n             * maxPoints may be an object map or a scalar. If object select the key:value, else\n             * Use the scalar maxPoints for all key and trace combinations.\n             */\n            maxp = maxPointsIsObject ? maxPoints[key][j] : maxPoints;\n\n            // could have chosen null here, -1 just tells us to not take a window\n            if(!isNumeric(maxp)) maxp = -1;\n\n            /*\n             * Wrap the nestedProperty in an object containing required data\n             * for lengthening and windowing this particular trace - key combination.\n             * Flooring maxp mirrors the behaviour of floats in the Array.slice JSnative function.\n             */\n            updateProps.push({\n                prop: prop,\n                target: target,\n                insert: insert,\n                maxp: Math.floor(maxp)\n            });\n        }\n    }\n\n    // all target and insertion data now validated\n    return updateProps;\n}\n\n/**\n * A private function to key Extend and Prepend traces DRY\n *\n * @param {Object|HTMLDivElement} gd\n * @param {Object} update\n * @param {Number[]} indices\n * @param {Number||Object} maxPoints\n * @param {Function} updateArray\n * @return {Object}\n */\nfunction spliceTraces(gd, update, indices, maxPoints, updateArray) {\n    assertExtendTracesArgs(gd, update, indices, maxPoints);\n\n    var updateProps = getExtendProperties(gd, update, indices, maxPoints);\n    var undoUpdate = {};\n    var undoPoints = {};\n\n    for(var i = 0; i < updateProps.length; i++) {\n        var prop = updateProps[i].prop;\n        var maxp = updateProps[i].maxp;\n\n        // return new array and remainder\n        var out = updateArray(updateProps[i].target, updateProps[i].insert, maxp);\n        prop.set(out[0]);\n\n        // build the inverse update object for the undo operation\n        if(!Array.isArray(undoUpdate[prop.astr])) undoUpdate[prop.astr] = [];\n        undoUpdate[prop.astr].push(out[1]);\n\n         // build the matching maxPoints undo object containing original trace lengths\n        if(!Array.isArray(undoPoints[prop.astr])) undoPoints[prop.astr] = [];\n        undoPoints[prop.astr].push(updateProps[i].target.length);\n    }\n\n    return {update: undoUpdate, maxPoints: undoPoints};\n}\n\nfunction concatTypedArray(arr0, arr1) {\n    var arr2 = new arr0.constructor(arr0.length + arr1.length);\n    arr2.set(arr0);\n    arr2.set(arr1, arr0.length);\n    return arr2;\n}\n\n/**\n * extend && prepend traces at indices with update arrays, window trace lengths to maxPoints\n *\n * Extend and Prepend have identical APIs. Prepend inserts an array at the head while Extend\n * inserts an array off the tail. Prepend truncates the tail of the array - counting maxPoints\n * from the head, whereas Extend truncates the head of the array, counting backward maxPoints\n * from the tail.\n *\n * If maxPoints is undefined, nonNumeric, negative or greater than extended trace length no\n * truncation / windowing will be performed. If its zero, well the whole trace is truncated.\n *\n * @param {Object|HTMLDivElement} gd The graph div\n * @param {Object} update The key:array map of target attributes to extend\n * @param {Number|Number[]} indices The locations of traces to be extended\n * @param {Number|Object} [maxPoints] Number of points for trace window after lengthening.\n *\n */\nfunction extendTraces(gd, update, indices, maxPoints) {\n    gd = Lib.getGraphDiv(gd);\n\n    function updateArray(target, insert, maxp) {\n        var newArray, remainder;\n\n        if(Lib.isTypedArray(target)) {\n            if(maxp < 0) {\n                var none = new target.constructor(0);\n                var both = concatTypedArray(target, insert);\n\n                if(maxp < 0) {\n                    newArray = both;\n                    remainder = none;\n                } else {\n                    newArray = none;\n                    remainder = both;\n                }\n            } else {\n                newArray = new target.constructor(maxp);\n                remainder = new target.constructor(target.length + insert.length - maxp);\n\n                if(maxp === insert.length) {\n                    newArray.set(insert);\n                    remainder.set(target);\n                } else if(maxp < insert.length) {\n                    var numberOfItemsFromInsert = insert.length - maxp;\n\n                    newArray.set(insert.subarray(numberOfItemsFromInsert));\n                    remainder.set(target);\n                    remainder.set(insert.subarray(0, numberOfItemsFromInsert), target.length);\n                } else {\n                    var numberOfItemsFromTarget = maxp - insert.length;\n                    var targetBegin = target.length - numberOfItemsFromTarget;\n\n                    newArray.set(target.subarray(targetBegin));\n                    newArray.set(insert, numberOfItemsFromTarget);\n                    remainder.set(target.subarray(0, targetBegin));\n                }\n            }\n        } else {\n            newArray = target.concat(insert);\n            remainder = (maxp >= 0 && maxp < newArray.length) ?\n                newArray.splice(0, newArray.length - maxp) :\n                [];\n        }\n\n        return [newArray, remainder];\n    }\n\n    var undo = spliceTraces(gd, update, indices, maxPoints, updateArray);\n    var promise = exports.redraw(gd);\n    var undoArgs = [gd, undo.update, indices, undo.maxPoints];\n    Queue.add(gd, exports.prependTraces, undoArgs, extendTraces, arguments);\n\n    return promise;\n}\n\nfunction prependTraces(gd, update, indices, maxPoints) {\n    gd = Lib.getGraphDiv(gd);\n\n    function updateArray(target, insert, maxp) {\n        var newArray, remainder;\n\n        if(Lib.isTypedArray(target)) {\n            if(maxp <= 0) {\n                var none = new target.constructor(0);\n                var both = concatTypedArray(insert, target);\n\n                if(maxp < 0) {\n                    newArray = both;\n                    remainder = none;\n                } else {\n                    newArray = none;\n                    remainder = both;\n                }\n            } else {\n                newArray = new target.constructor(maxp);\n                remainder = new target.constructor(target.length + insert.length - maxp);\n\n                if(maxp === insert.length) {\n                    newArray.set(insert);\n                    remainder.set(target);\n                } else if(maxp < insert.length) {\n                    var numberOfItemsFromInsert = insert.length - maxp;\n\n                    newArray.set(insert.subarray(0, numberOfItemsFromInsert));\n                    remainder.set(insert.subarray(numberOfItemsFromInsert));\n                    remainder.set(target, numberOfItemsFromInsert);\n                } else {\n                    var numberOfItemsFromTarget = maxp - insert.length;\n\n                    newArray.set(insert);\n                    newArray.set(target.subarray(0, numberOfItemsFromTarget), insert.length);\n                    remainder.set(target.subarray(numberOfItemsFromTarget));\n                }\n            }\n        } else {\n            newArray = insert.concat(target);\n            remainder = (maxp >= 0 && maxp < newArray.length) ?\n                newArray.splice(maxp, newArray.length) :\n                [];\n        }\n\n        return [newArray, remainder];\n    }\n\n    var undo = spliceTraces(gd, update, indices, maxPoints, updateArray);\n    var promise = exports.redraw(gd);\n    var undoArgs = [gd, undo.update, indices, undo.maxPoints];\n    Queue.add(gd, exports.extendTraces, undoArgs, prependTraces, arguments);\n\n    return promise;\n}\n\n/**\n * Add data traces to an existing graph div.\n *\n * @param {Object|HTMLDivElement} gd The graph div\n * @param {Object[]} gd.data The array of traces we're adding to\n * @param {Object[]|Object} traces The object or array of objects to add\n * @param {Number[]|Number} [newIndices=[gd.data.length]] Locations to add traces\n *\n */\nfunction addTraces(gd, traces, newIndices) {\n    gd = Lib.getGraphDiv(gd);\n\n    var currentIndices = [];\n    var undoFunc = exports.deleteTraces;\n    var redoFunc = addTraces;\n    var undoArgs = [gd, currentIndices];\n    var redoArgs = [gd, traces];  // no newIndices here\n    var i;\n    var promise;\n\n    // all validation is done elsewhere to remove clutter here\n    checkAddTracesArgs(gd, traces, newIndices);\n\n    // make sure traces is an array\n    if(!Array.isArray(traces)) {\n        traces = [traces];\n    }\n\n    // make sure traces do not repeat existing ones\n    traces = traces.map(function(trace) {\n        return Lib.extendFlat({}, trace);\n    });\n\n    helpers.cleanData(traces);\n\n    // add the traces to gd.data (no redrawing yet!)\n    for(i = 0; i < traces.length; i++) {\n        gd.data.push(traces[i]);\n    }\n\n    // to continue, we need to call moveTraces which requires currentIndices\n    for(i = 0; i < traces.length; i++) {\n        currentIndices.push(-traces.length + i);\n    }\n\n    // if the user didn't define newIndices, they just want the traces appended\n    // i.e., we can simply redraw and be done\n    if(typeof newIndices === 'undefined') {\n        promise = exports.redraw(gd);\n        Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n        return promise;\n    }\n\n    // make sure indices is property defined\n    if(!Array.isArray(newIndices)) {\n        newIndices = [newIndices];\n    }\n\n    try {\n        // this is redundant, but necessary to not catch later possible errors!\n        checkMoveTracesArgs(gd, currentIndices, newIndices);\n    } catch(error) {\n        // something went wrong, reset gd to be safe and rethrow error\n        gd.data.splice(gd.data.length - traces.length, traces.length);\n        throw error;\n    }\n\n    // if we're here, the user has defined specific places to place the new traces\n    // this requires some extra work that moveTraces will do\n    Queue.startSequence(gd);\n    Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n    promise = exports.moveTraces(gd, currentIndices, newIndices);\n    Queue.stopSequence(gd);\n    return promise;\n}\n\n/**\n * Delete traces at `indices` from gd.data array.\n *\n * @param {Object|HTMLDivElement} gd The graph div\n * @param {Object[]} gd.data The array of traces we're removing from\n * @param {Number|Number[]} indices The indices\n */\nfunction deleteTraces(gd, indices) {\n    gd = Lib.getGraphDiv(gd);\n\n    var traces = [];\n    var undoFunc = exports.addTraces;\n    var redoFunc = deleteTraces;\n    var undoArgs = [gd, traces, indices];\n    var redoArgs = [gd, indices];\n    var i;\n    var deletedTrace;\n\n    // make sure indices are defined\n    if(typeof indices === 'undefined') {\n        throw new Error('indices must be an integer or array of integers.');\n    } else if(!Array.isArray(indices)) {\n        indices = [indices];\n    }\n    assertIndexArray(gd, indices, 'indices');\n\n    // convert negative indices to positive indices\n    indices = positivifyIndices(indices, gd.data.length - 1);\n\n    // we want descending here so that splicing later doesn't affect indexing\n    indices.sort(Lib.sorterDes);\n    for(i = 0; i < indices.length; i += 1) {\n        deletedTrace = gd.data.splice(indices[i], 1)[0];\n        traces.push(deletedTrace);\n    }\n\n    var promise = exports.redraw(gd);\n    Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n\n    return promise;\n}\n\n/**\n * Move traces at currentIndices array to locations in newIndices array.\n *\n * If newIndices is omitted, currentIndices will be moved to the end. E.g.,\n * these are equivalent:\n *\n * Plotly.moveTraces(gd, [1, 2, 3], [-3, -2, -1])\n * Plotly.moveTraces(gd, [1, 2, 3])\n *\n * @param {Object|HTMLDivElement} gd The graph div\n * @param {Object[]} gd.data The array of traces we're removing from\n * @param {Number|Number[]} currentIndices The locations of traces to be moved\n * @param {Number|Number[]} [newIndices] The locations to move traces to\n *\n * Example calls:\n *\n *      // move trace i to location x\n *      Plotly.moveTraces(gd, i, x)\n *\n *      // move trace i to end of array\n *      Plotly.moveTraces(gd, i)\n *\n *      // move traces i, j, k to end of array (i != j != k)\n *      Plotly.moveTraces(gd, [i, j, k])\n *\n *      // move traces [i, j, k] to [x, y, z] (i != j != k) (x != y != z)\n *      Plotly.moveTraces(gd, [i, j, k], [x, y, z])\n *\n *      // reorder all traces (assume there are 5--a, b, c, d, e)\n *      Plotly.moveTraces(gd, [b, d, e, a, c])  // same as 'move to end'\n */\nfunction moveTraces(gd, currentIndices, newIndices) {\n    gd = Lib.getGraphDiv(gd);\n\n    var newData = [];\n    var movingTraceMap = [];\n    var undoFunc = moveTraces;\n    var redoFunc = moveTraces;\n    var undoArgs = [gd, newIndices, currentIndices];\n    var redoArgs = [gd, currentIndices, newIndices];\n    var i;\n\n    // to reduce complexity here, check args elsewhere\n    // this throws errors where appropriate\n    checkMoveTracesArgs(gd, currentIndices, newIndices);\n\n    // make sure currentIndices is an array\n    currentIndices = Array.isArray(currentIndices) ? currentIndices : [currentIndices];\n\n    // if undefined, define newIndices to point to the end of gd.data array\n    if(typeof newIndices === 'undefined') {\n        newIndices = [];\n        for(i = 0; i < currentIndices.length; i++) {\n            newIndices.push(-currentIndices.length + i);\n        }\n    }\n\n    // make sure newIndices is an array if it's user-defined\n    newIndices = Array.isArray(newIndices) ? newIndices : [newIndices];\n\n    // convert negative indices to positive indices (they're the same length)\n    currentIndices = positivifyIndices(currentIndices, gd.data.length - 1);\n    newIndices = positivifyIndices(newIndices, gd.data.length - 1);\n\n    // at this point, we've coerced the index arrays into predictable forms\n\n    // get the traces that aren't being moved around\n    for(i = 0; i < gd.data.length; i++) {\n        // if index isn't in currentIndices, include it in ignored!\n        if(currentIndices.indexOf(i) === -1) {\n            newData.push(gd.data[i]);\n        }\n    }\n\n    // get a mapping of indices to moving traces\n    for(i = 0; i < currentIndices.length; i++) {\n        movingTraceMap.push({newIndex: newIndices[i], trace: gd.data[currentIndices[i]]});\n    }\n\n    // reorder this mapping by newIndex, ascending\n    movingTraceMap.sort(function(a, b) {\n        return a.newIndex - b.newIndex;\n    });\n\n    // now, add the moving traces back in, in order!\n    for(i = 0; i < movingTraceMap.length; i += 1) {\n        newData.splice(movingTraceMap[i].newIndex, 0, movingTraceMap[i].trace);\n    }\n\n    gd.data = newData;\n\n    var promise = exports.redraw(gd);\n    Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n\n    return promise;\n}\n\n/**\n * restyle: update trace attributes of an existing plot\n *\n * Can be called two ways.\n *\n * Signature 1:\n * @param {String | HTMLDivElement} gd\n *  the id or DOM element of the graph container div\n * @param {String} astr\n *  attribute string (like `'marker.symbol'`) to update\n * @param {*} val\n *  value to give this attribute\n * @param {Number[] | Number} [traces]\n *  integer or array of integers for the traces to alter (all if omitted)\n *\n * Signature 2:\n * @param {String | HTMLDivElement} gd\n *  (as in signature 1)\n * @param {Object} aobj\n *  attribute object `{astr1: val1, astr2: val2 ...}`\n *  allows setting multiple attributes simultaneously\n * @param {Number[] | Number} [traces]\n *  (as in signature 1)\n *\n * `val` (or `val1`, `val2` ... in the object form) can be an array,\n * to apply different values to each trace.\n *\n * If the array is too short, it will wrap around (useful for\n * style files that want to specify cyclical default values).\n */\nfunction restyle(gd, astr, val, _traces) {\n    gd = Lib.getGraphDiv(gd);\n    helpers.clearPromiseQueue(gd);\n\n    var aobj = {};\n    if(typeof astr === 'string') aobj[astr] = val;\n    else if(Lib.isPlainObject(astr)) {\n        // the 3-arg form\n        aobj = Lib.extendFlat({}, astr);\n        if(_traces === undefined) _traces = val;\n    } else {\n        Lib.warn('Restyle fail.', astr, val, _traces);\n        return Promise.reject();\n    }\n\n    if(Object.keys(aobj).length) gd.changed = true;\n\n    var traces = helpers.coerceTraceIndices(gd, _traces);\n\n    var specs = _restyle(gd, aobj, traces);\n    var flags = specs.flags;\n\n    // clear calcdata and/or axis types if required so they get regenerated\n    if(flags.calc) gd.calcdata = undefined;\n    if(flags.clearAxisTypes) helpers.clearAxisTypes(gd, traces, {});\n\n    // fill in redraw sequence\n    var seq = [];\n\n    if(flags.fullReplot) {\n        seq.push(exports.plot);\n    } else {\n        seq.push(Plots.previousPromises);\n\n        // maybe only call Plots.supplyDataDefaults in the splom case,\n        // to skip over long and slow axes defaults\n        Plots.supplyDefaults(gd);\n\n        if(flags.markerSize) {\n            Plots.doCalcdata(gd);\n            addAxRangeSequence(seq);\n\n            // TODO\n            // if all axes have autorange:false, then\n            // proceed to subroutines.doTraceStyle(),\n            // otherwise we must go through addAxRangeSequence,\n            // which in general must redraws 'all' axes\n        }\n\n        if(flags.style) seq.push(subroutines.doTraceStyle);\n        if(flags.colorbars) seq.push(subroutines.doColorBars);\n\n        seq.push(emitAfterPlot);\n    }\n\n    seq.push(Plots.rehover, Plots.redrag);\n\n    Queue.add(gd,\n        restyle, [gd, specs.undoit, specs.traces],\n        restyle, [gd, specs.redoit, specs.traces]\n    );\n\n    var plotDone = Lib.syncOrAsync(seq, gd);\n    if(!plotDone || !plotDone.then) plotDone = Promise.resolve();\n\n    return plotDone.then(function() {\n        gd.emit('plotly_restyle', specs.eventData);\n        return gd;\n    });\n}\n\n// for undo: undefined initial vals must be turned into nulls\n// so that we unset rather than ignore them\nfunction undefinedToNull(val) {\n    if(val === undefined) return null;\n    return val;\n}\n\n/**\n * Factory function to wrap nestedProperty with GUI edits if necessary\n * with GUI edits we add an optional prefix to the nestedProperty constructor\n * to prepend to the attribute string in the preGUI store.\n */\nfunction makeNP(preGUI, guiEditFlag) {\n    if(!guiEditFlag) return nestedProperty;\n\n    return function(container, attr, prefix) {\n        var np = nestedProperty(container, attr);\n        var npSet = np.set;\n        np.set = function(val) {\n            var fullAttr = (prefix || '') + attr;\n            storeCurrent(fullAttr, np.get(), val, preGUI);\n            npSet(val);\n        };\n        return np;\n    };\n}\n\nfunction storeCurrent(attr, val, newVal, preGUI) {\n    if(Array.isArray(val) || Array.isArray(newVal)) {\n        var arrayVal = Array.isArray(val) ? val : [];\n        var arrayNew = Array.isArray(newVal) ? newVal : [];\n        var maxLen = Math.max(arrayVal.length, arrayNew.length);\n        for(var i = 0; i < maxLen; i++) {\n            storeCurrent(attr + '[' + i + ']', arrayVal[i], arrayNew[i], preGUI);\n        }\n    } else if(Lib.isPlainObject(val) || Lib.isPlainObject(newVal)) {\n        var objVal = Lib.isPlainObject(val) ? val : {};\n        var objNew = Lib.isPlainObject(newVal) ? newVal : {};\n        var objBoth = Lib.extendFlat({}, objVal, objNew);\n        for(var key in objBoth) {\n            storeCurrent(attr + '.' + key, objVal[key], objNew[key], preGUI);\n        }\n    } else if(preGUI[attr] === undefined) {\n        preGUI[attr] = undefinedToNull(val);\n    }\n}\n\n/**\n * storeDirectGUIEdit: for routines that skip restyle/relayout and mock it\n * by emitting a plotly_restyle or plotly_relayout event, this routine\n * keeps track of the initial state in _preGUI for use by uirevision\n * Does *not* apply these changes to data/layout - that's the responsibility\n * of the calling routine.\n *\n * @param {object} container: the input attributes container (eg `layout` or a `trace`)\n * @param {object} preGUI: where original values should be stored, either\n *     `layout._preGUI` or `layout._tracePreGUI[uid]`\n * @param {object} edits: the {attr: val} object as normally passed to `relayout` etc\n */\nfunction _storeDirectGUIEdit(container, preGUI, edits) {\n    for(var attr in edits) {\n        var np = nestedProperty(container, attr);\n        storeCurrent(attr, np.get(), edits[attr], preGUI);\n    }\n}\n\nfunction _restyle(gd, aobj, traces) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n    var data = gd.data;\n    var guiEditFlag = fullLayout._guiEditing;\n    var layoutNP = makeNP(fullLayout._preGUI, guiEditFlag);\n    var eventData = Lib.extendDeepAll({}, aobj);\n    var i;\n\n    cleanDeprecatedAttributeKeys(aobj);\n\n    // initialize flags\n    var flags = editTypes.traceFlags();\n\n    // copies of the change (and previous values of anything affected)\n    // for the undo / redo queue\n    var redoit = {};\n    var undoit = {};\n    var axlist;\n\n    // make a new empty vals array for undoit\n    function a0() { return traces.map(function() { return undefined; }); }\n\n    // for autoranging multiple axes\n    function addToAxlist(axid) {\n        var axName = Axes.id2name(axid);\n        if(axlist.indexOf(axName) === -1) axlist.push(axName);\n    }\n\n    function autorangeAttr(axName) { return 'LAYOUT' + axName + '.autorange'; }\n\n    function rangeAttr(axName) { return 'LAYOUT' + axName + '.range'; }\n\n    function getFullTrace(traceIndex) {\n        // usually fullData maps 1:1 onto data, but with groupby transforms\n        // the fullData index can be greater. Take the *first* matching trace.\n        for(var j = traceIndex; j < fullData.length; j++) {\n            if(fullData[j]._input === data[traceIndex]) return fullData[j];\n        }\n        // should never get here - and if we *do* it should cause an error\n        // later on undefined fullTrace is passed to nestedProperty.\n    }\n\n    // for attrs that interact (like scales & autoscales), save the\n    // old vals before making the change\n    // val=undefined will not set a value, just record what the value was.\n    // val=null will delete the attribute\n    // attr can be an array to set several at once (all to the same val)\n    function doextra(attr, val, i) {\n        if(Array.isArray(attr)) {\n            attr.forEach(function(a) { doextra(a, val, i); });\n            return;\n        }\n        // quit if explicitly setting this elsewhere\n        if(attr in aobj || helpers.hasParent(aobj, attr)) return;\n\n        var extraparam;\n        if(attr.substr(0, 6) === 'LAYOUT') {\n            extraparam = layoutNP(gd.layout, attr.replace('LAYOUT', ''));\n        } else {\n            var tracei = traces[i];\n            var preGUI = fullLayout._tracePreGUI[getFullTrace(tracei)._fullInput.uid];\n            extraparam = makeNP(preGUI, guiEditFlag)(data[tracei], attr);\n        }\n\n        if(!(attr in undoit)) {\n            undoit[attr] = a0();\n        }\n        if(undoit[attr][i] === undefined) {\n            undoit[attr][i] = undefinedToNull(extraparam.get());\n        }\n        if(val !== undefined) {\n            extraparam.set(val);\n        }\n    }\n\n    function allBins(binAttr) {\n        return function(j) {\n            return fullData[j][binAttr];\n        };\n    }\n\n    function arrayBins(binAttr) {\n        return function(vij, j) {\n            return vij === false ? fullData[traces[j]][binAttr] : null;\n        };\n    }\n\n    // now make the changes to gd.data (and occasionally gd.layout)\n    // and figure out what kind of graphics update we need to do\n    for(var ai in aobj) {\n        if(helpers.hasParent(aobj, ai)) {\n            throw new Error('cannot set ' + ai + ' and a parent attribute simultaneously');\n        }\n\n        var vi = aobj[ai];\n        var cont;\n        var contFull;\n        var param;\n        var oldVal;\n        var newVal;\n        var valObject;\n\n        // Backward compatibility shim for turning histogram autobin on,\n        // or freezing previous autobinned values.\n        // Replace obsolete `autobin(x|y): true` with `(x|y)bins: null`\n        // and `autobin(x|y): false` with the `(x|y)bins` in `fullData`\n        if(ai === 'autobinx' || ai === 'autobiny') {\n            ai = ai.charAt(ai.length - 1) + 'bins';\n            if(Array.isArray(vi)) vi = vi.map(arrayBins(ai));\n            else if(vi === false) vi = traces.map(allBins(ai));\n            else vi = null;\n        }\n\n        redoit[ai] = vi;\n\n        if(ai.substr(0, 6) === 'LAYOUT') {\n            param = layoutNP(gd.layout, ai.replace('LAYOUT', ''));\n            undoit[ai] = [undefinedToNull(param.get())];\n            // since we're allowing val to be an array, allow it here too,\n            // even though that's meaningless\n            param.set(Array.isArray(vi) ? vi[0] : vi);\n            // ironically, the layout attrs in restyle only require replot,\n            // not relayout\n            flags.calc = true;\n            continue;\n        }\n\n        // set attribute in gd.data\n        undoit[ai] = a0();\n        for(i = 0; i < traces.length; i++) {\n            cont = data[traces[i]];\n            contFull = getFullTrace(traces[i]);\n            var preGUI = fullLayout._tracePreGUI[contFull._fullInput.uid];\n            param = makeNP(preGUI, guiEditFlag)(cont, ai);\n            oldVal = param.get();\n            newVal = Array.isArray(vi) ? vi[i % vi.length] : vi;\n\n            if(newVal === undefined) continue;\n\n            var finalPart = param.parts[param.parts.length - 1];\n            var prefix = ai.substr(0, ai.length - finalPart.length - 1);\n            var prefixDot = prefix ? prefix + '.' : '';\n            var innerContFull = prefix ?\n                nestedProperty(contFull, prefix).get() : contFull;\n\n            valObject = PlotSchema.getTraceValObject(contFull, param.parts);\n\n            if(valObject && valObject.impliedEdits && newVal !== null) {\n                for(var impliedKey in valObject.impliedEdits) {\n                    doextra(Lib.relativeAttr(ai, impliedKey), valObject.impliedEdits[impliedKey], i);\n                }\n            } else if((finalPart === 'thicknessmode' || finalPart === 'lenmode') &&\n                    oldVal !== newVal &&\n                    (newVal === 'fraction' || newVal === 'pixels') &&\n                    innerContFull\n            ) {\n                // changing colorbar size modes,\n                // make the resulting size not change\n                // note that colorbar fractional sizing is based on the\n                // original plot size, before anything (like a colorbar)\n                // increases the margins\n\n                var gs = fullLayout._size;\n                var orient = innerContFull.orient;\n                var topOrBottom = (orient === 'top') || (orient === 'bottom');\n                if(finalPart === 'thicknessmode') {\n                    var thicknorm = topOrBottom ? gs.h : gs.w;\n                    doextra(prefixDot + 'thickness', innerContFull.thickness *\n                        (newVal === 'fraction' ? 1 / thicknorm : thicknorm), i);\n                } else {\n                    var lennorm = topOrBottom ? gs.w : gs.h;\n                    doextra(prefixDot + 'len', innerContFull.len *\n                        (newVal === 'fraction' ? 1 / lennorm : lennorm), i);\n                }\n            } else if(ai === 'type' && (\n                (newVal === 'pie') !== (oldVal === 'pie') ||\n                (newVal === 'funnelarea') !== (oldVal === 'funnelarea')\n            )) {\n                var labelsTo = 'x';\n                var valuesTo = 'y';\n                if((newVal === 'bar' || oldVal === 'bar') && cont.orientation === 'h') {\n                    labelsTo = 'y';\n                    valuesTo = 'x';\n                }\n                Lib.swapAttrs(cont, ['?', '?src'], 'labels', labelsTo);\n                Lib.swapAttrs(cont, ['d?', '?0'], 'label', labelsTo);\n                Lib.swapAttrs(cont, ['?', '?src'], 'values', valuesTo);\n\n                if(oldVal === 'pie' || oldVal === 'funnelarea') {\n                    nestedProperty(cont, 'marker.color')\n                        .set(nestedProperty(cont, 'marker.colors').get());\n\n                    // super kludgy - but if all pies are gone we won't remove them otherwise\n                    fullLayout._pielayer.selectAll('g.trace').remove();\n                } else if(Registry.traceIs(cont, 'cartesian')) {\n                    nestedProperty(cont, 'marker.colors')\n                        .set(nestedProperty(cont, 'marker.color').get());\n                }\n            }\n\n            undoit[ai][i] = undefinedToNull(oldVal);\n            // set the new value - if val is an array, it's one el per trace\n            // first check for attributes that get more complex alterations\n            var swapAttrs = [\n                'swapxy', 'swapxyaxes', 'orientation', 'orientationaxes'\n            ];\n            if(swapAttrs.indexOf(ai) !== -1) {\n                // setting an orientation: make sure it's changing\n                // before we swap everything else\n                if(ai === 'orientation') {\n                    param.set(newVal);\n                    // obnoxious that we need this level of coupling... but in order to\n                    // properly handle setting orientation to `null` we need to mimic\n                    // the logic inside Bars.supplyDefaults for default orientation\n                    var defaultOrientation = (cont.x && !cont.y) ? 'h' : 'v';\n                    if((param.get() || defaultOrientation) === contFull.orientation) {\n                        continue;\n                    }\n                } else if(ai === 'orientationaxes') {\n                    // orientationaxes has no value,\n                    // it flips everything and the axes\n\n                    cont.orientation =\n                        {v: 'h', h: 'v'}[contFull.orientation];\n                }\n                helpers.swapXYData(cont);\n                flags.calc = flags.clearAxisTypes = true;\n            } else if(Plots.dataArrayContainers.indexOf(param.parts[0]) !== -1) {\n                // TODO: use manageArrays.applyContainerArrayChanges here too\n                helpers.manageArrayContainers(param, newVal, undoit);\n                flags.calc = true;\n            } else {\n                if(valObject) {\n                    // must redo calcdata when restyling array values of arrayOk attributes\n                    // ... but no need to this for regl-based traces\n                    if(valObject.arrayOk &&\n                        !Registry.traceIs(contFull, 'regl') &&\n                        (Lib.isArrayOrTypedArray(newVal) || Lib.isArrayOrTypedArray(oldVal))\n                    ) {\n                        flags.calc = true;\n                    } else editTypes.update(flags, valObject);\n                } else {\n                    /*\n                     * if we couldn't find valObject,  assume a full recalc.\n                     * This can happen if you're changing type and making\n                     * some other edits too, so the modules we're\n                     * looking at don't have these attributes in them.\n                     */\n                    flags.calc = true;\n                }\n\n                // all the other ones, just modify that one attribute\n                param.set(newVal);\n            }\n        }\n\n        // swap the data attributes of the relevant x and y axes?\n        if(['swapxyaxes', 'orientationaxes'].indexOf(ai) !== -1) {\n            Axes.swap(gd, traces);\n        }\n\n        // swap hovermode if set to \"compare x/y data\"\n        if(ai === 'orientationaxes') {\n            var hovermode = nestedProperty(gd.layout, 'hovermode');\n            if(hovermode.get() === 'x') {\n                hovermode.set('y');\n            } else if(hovermode.get() === 'y') {\n                hovermode.set('x');\n            }\n        }\n\n        // Major enough changes deserve autoscale and\n        // non-reversed axes so people don't get confused\n        //\n        // Note: autobin (or its new analog bin clearing) is not included here\n        // since we're not pushing bins back to gd.data, so if we have bin\n        // info it was explicitly provided by the user.\n        if(['orientation', 'type'].indexOf(ai) !== -1) {\n            axlist = [];\n            for(i = 0; i < traces.length; i++) {\n                var trace = data[traces[i]];\n\n                if(Registry.traceIs(trace, 'cartesian')) {\n                    addToAxlist(trace.xaxis || 'x');\n                    addToAxlist(trace.yaxis || 'y');\n                }\n            }\n\n            doextra(axlist.map(autorangeAttr), true, 0);\n            doextra(axlist.map(rangeAttr), [0, 1], 0);\n        }\n    }\n\n    if(flags.calc || flags.plot) {\n        flags.fullReplot = true;\n    }\n\n    return {\n        flags: flags,\n        undoit: undoit,\n        redoit: redoit,\n        traces: traces,\n        eventData: Lib.extendDeepNoArrays([], [eventData, traces])\n    };\n}\n\n/**\n * Converts deprecated attribute keys to\n * the current API to ensure backwards compatibility.\n *\n * This is needed for the update mechanism to determine which\n * subroutines to run based on the actual attribute\n * definitions (that don't include the deprecated ones).\n *\n * E.g. Maps {'xaxis.title': 'A chart'} to {'xaxis.title.text': 'A chart'}\n * and {titlefont: {...}} to {'title.font': {...}}.\n *\n * @param aobj\n */\nfunction cleanDeprecatedAttributeKeys(aobj) {\n    var oldAxisTitleRegex = Lib.counterRegex('axis', '\\.title', false, false);\n    var colorbarRegex = /colorbar\\.title$/;\n    var keys = Object.keys(aobj);\n    var i, key, value;\n\n    for(i = 0; i < keys.length; i++) {\n        key = keys[i];\n        value = aobj[key];\n\n        if((key === 'title' || oldAxisTitleRegex.test(key) || colorbarRegex.test(key)) &&\n          (typeof value === 'string' || typeof value === 'number')) {\n            replace(key, key.replace('title', 'title.text'));\n        } else if(key.indexOf('titlefont') > -1) {\n            replace(key, key.replace('titlefont', 'title.font'));\n        } else if(key.indexOf('titleposition') > -1) {\n            replace(key, key.replace('titleposition', 'title.position'));\n        } else if(key.indexOf('titleside') > -1) {\n            replace(key, key.replace('titleside', 'title.side'));\n        } else if(key.indexOf('titleoffset') > -1) {\n            replace(key, key.replace('titleoffset', 'title.offset'));\n        }\n    }\n\n    function replace(oldAttrStr, newAttrStr) {\n        aobj[newAttrStr] = aobj[oldAttrStr];\n        delete aobj[oldAttrStr];\n    }\n}\n\n/**\n * relayout: update layout attributes of an existing plot\n *\n * Can be called two ways:\n *\n * Signature 1:\n * @param {String | HTMLDivElement} gd\n *  the id or dom element of the graph container div\n * @param {String} astr\n *  attribute string (like `'xaxis.range[0]'`) to update\n * @param {*} val\n *  value to give this attribute\n *\n * Signature 2:\n * @param {String | HTMLDivElement} gd\n *  (as in signature 1)\n * @param {Object} aobj\n *  attribute object `{astr1: val1, astr2: val2 ...}`\n *  allows setting multiple attributes simultaneously\n */\nfunction relayout(gd, astr, val) {\n    gd = Lib.getGraphDiv(gd);\n    helpers.clearPromiseQueue(gd);\n\n    if(gd.framework && gd.framework.isPolar) {\n        return Promise.resolve(gd);\n    }\n\n    var aobj = {};\n    if(typeof astr === 'string') {\n        aobj[astr] = val;\n    } else if(Lib.isPlainObject(astr)) {\n        aobj = Lib.extendFlat({}, astr);\n    } else {\n        Lib.warn('Relayout fail.', astr, val);\n        return Promise.reject();\n    }\n\n    if(Object.keys(aobj).length) gd.changed = true;\n\n    var specs = _relayout(gd, aobj);\n    var flags = specs.flags;\n\n    // clear calcdata if required\n    if(flags.calc) gd.calcdata = undefined;\n\n    // fill in redraw sequence\n\n    // even if we don't have anything left in aobj,\n    // something may have happened within relayout that we\n    // need to wait for\n    var seq = [Plots.previousPromises];\n\n    if(flags.layoutReplot) {\n        seq.push(subroutines.layoutReplot);\n    } else if(Object.keys(aobj).length) {\n        axRangeSupplyDefaultsByPass(gd, flags, specs) || Plots.supplyDefaults(gd);\n\n        if(flags.legend) seq.push(subroutines.doLegend);\n        if(flags.layoutstyle) seq.push(subroutines.layoutStyles);\n        if(flags.axrange) addAxRangeSequence(seq, specs.rangesAltered);\n        if(flags.ticks) seq.push(subroutines.doTicksRelayout);\n        if(flags.modebar) seq.push(subroutines.doModeBar);\n        if(flags.camera) seq.push(subroutines.doCamera);\n        if(flags.colorbars) seq.push(subroutines.doColorBars);\n\n        seq.push(emitAfterPlot);\n    }\n\n    seq.push(Plots.rehover, Plots.redrag);\n\n    Queue.add(gd,\n        relayout, [gd, specs.undoit],\n        relayout, [gd, specs.redoit]\n    );\n\n    var plotDone = Lib.syncOrAsync(seq, gd);\n    if(!plotDone || !plotDone.then) plotDone = Promise.resolve(gd);\n\n    return plotDone.then(function() {\n        gd.emit('plotly_relayout', specs.eventData);\n        return gd;\n    });\n}\n\n// Optimization mostly for large splom traces where\n// Plots.supplyDefaults can take > 100ms\nfunction axRangeSupplyDefaultsByPass(gd, flags, specs) {\n    var fullLayout = gd._fullLayout;\n\n    if(!flags.axrange) return false;\n\n    for(var k in flags) {\n        if(k !== 'axrange' && flags[k]) return false;\n    }\n\n    for(var axId in specs.rangesAltered) {\n        var axName = Axes.id2name(axId);\n        var axIn = gd.layout[axName];\n        var axOut = fullLayout[axName];\n        axOut.autorange = axIn.autorange;\n        axOut.range = axIn.range.slice();\n        axOut.cleanRange();\n\n        if(axOut._matchGroup) {\n            for(var axId2 in axOut._matchGroup) {\n                if(axId2 !== axId) {\n                    var ax2 = fullLayout[Axes.id2name(axId2)];\n                    ax2.autorange = axOut.autorange;\n                    ax2.range = axOut.range.slice();\n                    ax2._input.range = axOut.range.slice();\n                }\n            }\n        }\n    }\n\n    return true;\n}\n\nfunction addAxRangeSequence(seq, rangesAltered) {\n    // N.B. leave as sequence of subroutines (for now) instead of\n    // subroutine of its own so that finalDraw always gets\n    // executed after drawData\n    var drawAxes = rangesAltered ?\n        function(gd) {\n            var axIds = [];\n            var skipTitle = true;\n\n            for(var id in rangesAltered) {\n                var ax = Axes.getFromId(gd, id);\n                axIds.push(id);\n\n                if(ax._matchGroup) {\n                    for(var id2 in ax._matchGroup) {\n                        if(!rangesAltered[id2]) {\n                            axIds.push(id2);\n                        }\n                    }\n                }\n\n                if(ax.automargin) skipTitle = false;\n            }\n\n            return Axes.draw(gd, axIds, {skipTitle: skipTitle});\n        } :\n        function(gd) {\n            return Axes.draw(gd, 'redraw');\n        };\n\n    seq.push(\n        clearSelect,\n        subroutines.doAutoRangeAndConstraints,\n        drawAxes,\n        subroutines.drawData,\n        subroutines.finalDraw\n    );\n}\n\nvar AX_RANGE_RE = /^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/;\nvar AX_AUTORANGE_RE = /^[xyz]axis[0-9]*\\.autorange$/;\nvar AX_DOMAIN_RE = /^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;\n\nfunction _relayout(gd, aobj) {\n    var layout = gd.layout;\n    var fullLayout = gd._fullLayout;\n    var guiEditFlag = fullLayout._guiEditing;\n    var layoutNP = makeNP(fullLayout._preGUI, guiEditFlag);\n    var keys = Object.keys(aobj);\n    var axes = Axes.list(gd);\n    var eventData = Lib.extendDeepAll({}, aobj);\n    var arrayEdits = {};\n\n    var arrayStr, i, j;\n\n    cleanDeprecatedAttributeKeys(aobj);\n    keys = Object.keys(aobj);\n\n    // look for 'allaxes', split out into all axes\n    // in case of 3D the axis are nested within a scene which is held in _id\n    for(i = 0; i < keys.length; i++) {\n        if(keys[i].indexOf('allaxes') === 0) {\n            for(j = 0; j < axes.length; j++) {\n                var scene = axes[j]._id.substr(1);\n                var axisAttr = (scene.indexOf('scene') !== -1) ? (scene + '.') : '';\n                var newkey = keys[i].replace('allaxes', axisAttr + axes[j]._name);\n\n                if(!aobj[newkey]) aobj[newkey] = aobj[keys[i]];\n            }\n\n            delete aobj[keys[i]];\n        }\n    }\n\n    // initialize flags\n    var flags = editTypes.layoutFlags();\n\n    // copies of the change (and previous values of anything affected)\n    // for the undo / redo queue\n    var redoit = {};\n    var undoit = {};\n\n    // for attrs that interact (like scales & autoscales), save the\n    // old vals before making the change\n    // val=undefined will not set a value, just record what the value was.\n    // attr can be an array to set several at once (all to the same val)\n    function doextra(attr, val) {\n        if(Array.isArray(attr)) {\n            attr.forEach(function(a) { doextra(a, val); });\n            return;\n        }\n\n        // if we have another value for this attribute (explicitly or\n        // via a parent) do not override with this auto-generated extra\n        if(attr in aobj || helpers.hasParent(aobj, attr)) return;\n\n        var p = layoutNP(layout, attr);\n        if(!(attr in undoit)) {\n            undoit[attr] = undefinedToNull(p.get());\n        }\n        if(val !== undefined) p.set(val);\n    }\n\n    // for constraint enforcement: keep track of all axes (as {id: name})\n    // we're editing the (auto)range of, so we can tell the others constrained\n    // to scale with them that it's OK for them to shrink\n    var rangesAltered = {};\n    var axId;\n\n    function recordAlteredAxis(pleafPlus) {\n        var axId = Axes.name2id(pleafPlus.split('.')[0]);\n        rangesAltered[axId] = 1;\n        return axId;\n    }\n\n    // alter gd.layout\n    for(var ai in aobj) {\n        if(helpers.hasParent(aobj, ai)) {\n            throw new Error('cannot set ' + ai + ' and a parent attribute simultaneously');\n        }\n\n        var p = layoutNP(layout, ai);\n        var vi = aobj[ai];\n        var plen = p.parts.length;\n        // p.parts may end with an index integer if the property is an array\n        var pend = plen - 1;\n        while(pend > 0 && typeof p.parts[pend] !== 'string') pend--;\n        // last property in chain (leaf node)\n        var pleaf = p.parts[pend];\n        // leaf plus immediate parent\n        var pleafPlus = p.parts[pend - 1] + '.' + pleaf;\n        // trunk nodes (everything except the leaf)\n        var ptrunk = p.parts.slice(0, pend).join('.');\n        var parentIn = nestedProperty(gd.layout, ptrunk).get();\n        var parentFull = nestedProperty(fullLayout, ptrunk).get();\n        var vOld = p.get();\n\n        if(vi === undefined) continue;\n\n        redoit[ai] = vi;\n\n        // axis reverse is special - it is its own inverse\n        // op and has no flag.\n        undoit[ai] = (pleaf === 'reverse') ? vi : undefinedToNull(vOld);\n\n        var valObject = PlotSchema.getLayoutValObject(fullLayout, p.parts);\n\n        if(valObject && valObject.impliedEdits && vi !== null) {\n            for(var impliedKey in valObject.impliedEdits) {\n                doextra(Lib.relativeAttr(ai, impliedKey), valObject.impliedEdits[impliedKey]);\n            }\n        }\n\n        // Setting width or height to null must reset the graph's width / height\n        // back to its initial value as computed during the first pass in Plots.plotAutoSize.\n        //\n        // To do so, we must manually set them back here using the _initialAutoSize cache.\n        // can't use impliedEdits for this because behavior depends on vi\n        if(['width', 'height'].indexOf(ai) !== -1) {\n            if(vi) {\n                doextra('autosize', null);\n                // currently we don't support autosize one dim only - so\n                // explicitly set the other one. Note that doextra will\n                // ignore this if the same relayout call also provides oppositeAttr\n                var oppositeAttr = ai === 'height' ? 'width' : 'height';\n                doextra(oppositeAttr, fullLayout[oppositeAttr]);\n            } else {\n                fullLayout[ai] = gd._initialAutoSize[ai];\n            }\n        } else if(ai === 'autosize') {\n            // depends on vi here too, so again can't use impliedEdits\n            doextra('width', vi ? null : fullLayout.width);\n            doextra('height', vi ? null : fullLayout.height);\n        } else if(pleafPlus.match(AX_RANGE_RE)) {\n            // check autorange vs range\n\n            recordAlteredAxis(pleafPlus);\n            nestedProperty(fullLayout, ptrunk + '._inputRange').set(null);\n        } else if(pleafPlus.match(AX_AUTORANGE_RE)) {\n            recordAlteredAxis(pleafPlus);\n            nestedProperty(fullLayout, ptrunk + '._inputRange').set(null);\n            var axFull = nestedProperty(fullLayout, ptrunk).get();\n            if(axFull._inputDomain) {\n                // if we're autoranging and this axis has a constrained domain,\n                // reset it so we don't get locked into a shrunken size\n                axFull._input.domain = axFull._inputDomain.slice();\n            }\n        } else if(pleafPlus.match(AX_DOMAIN_RE)) {\n            nestedProperty(fullLayout, ptrunk + '._inputDomain').set(null);\n        }\n\n        // toggling axis type between log and linear: we need to convert\n        // positions for components that are still using linearized values,\n        // not data values like newer components.\n        // previously we did this for log <-> not-log, but now only do it\n        // for log <-> linear\n        if(pleaf === 'type') {\n            var ax = parentIn;\n            var toLog = parentFull.type === 'linear' && vi === 'log';\n            var fromLog = parentFull.type === 'log' && vi === 'linear';\n\n            if(toLog || fromLog) {\n                if(!ax || !ax.range) {\n                    // 2D never gets here, but 3D does\n                    // I don't think this is needed, but left here in case there\n                    // are edge cases I'm not thinking of.\n                    doextra(ptrunk + '.autorange', true);\n                } else if(!parentFull.autorange) {\n                    // toggling log without autorange: need to also recalculate ranges\n                    // because log axes use linearized values for range endpoints\n                    var r0 = ax.range[0];\n                    var r1 = ax.range[1];\n                    if(toLog) {\n                        // if both limits are negative, autorange\n                        if(r0 <= 0 && r1 <= 0) {\n                            doextra(ptrunk + '.autorange', true);\n                        }\n                        // if one is negative, set it 6 orders below the other.\n                        if(r0 <= 0) r0 = r1 / 1e6;\n                        else if(r1 <= 0) r1 = r0 / 1e6;\n                        // now set the range values as appropriate\n                        doextra(ptrunk + '.range[0]', Math.log(r0) / Math.LN10);\n                        doextra(ptrunk + '.range[1]', Math.log(r1) / Math.LN10);\n                    } else {\n                        doextra(ptrunk + '.range[0]', Math.pow(10, r0));\n                        doextra(ptrunk + '.range[1]', Math.pow(10, r1));\n                    }\n                } else if(toLog) {\n                    // just make sure the range is positive and in the right\n                    // order, it'll get recalculated later\n                    ax.range = (ax.range[1] > ax.range[0]) ? [1, 2] : [2, 1];\n                }\n\n                // clear polar view initial stash for radial range so that\n                // value get recomputed in correct units\n                if(Array.isArray(fullLayout._subplots.polar) &&\n                    fullLayout._subplots.polar.length &&\n                    fullLayout[p.parts[0]] &&\n                    p.parts[1] === 'radialaxis'\n                ) {\n                    delete fullLayout[p.parts[0]]._subplot.viewInitial['radialaxis.range'];\n                }\n\n                // Annotations and images also need to convert to/from linearized coords\n                // Shapes do not need this :)\n                Registry.getComponentMethod('annotations', 'convertCoords')(gd, parentFull, vi, doextra);\n                Registry.getComponentMethod('images', 'convertCoords')(gd, parentFull, vi, doextra);\n            } else {\n                // any other type changes: the range from the previous type\n                // will not make sense, so autorange it.\n                doextra(ptrunk + '.autorange', true);\n                doextra(ptrunk + '.range', null);\n            }\n            nestedProperty(fullLayout, ptrunk + '._inputRange').set(null);\n        } else if(pleaf.match(AX_NAME_PATTERN)) {\n            var fullProp = nestedProperty(fullLayout, ai).get();\n            var newType = (vi || {}).type;\n\n            // This can potentially cause strange behavior if the autotype is not\n            // numeric (linear, because we don't auto-log) but the previous type\n            // was log. That's a very strange edge case though\n            if(!newType || newType === '-') newType = 'linear';\n            Registry.getComponentMethod('annotations', 'convertCoords')(gd, fullProp, newType, doextra);\n            Registry.getComponentMethod('images', 'convertCoords')(gd, fullProp, newType, doextra);\n        }\n\n        // alter gd.layout\n\n        // collect array component edits for execution all together\n        // so we can ensure consistent behavior adding/removing items\n        // and order-independence for add/remove/edit all together in\n        // one relayout call\n        var containerArrayMatch = manageArrays.containerArrayMatch(ai);\n        if(containerArrayMatch) {\n            arrayStr = containerArrayMatch.array;\n            i = containerArrayMatch.index;\n            var propStr = containerArrayMatch.property;\n            var updateValObject = valObject || {editType: 'calc'};\n\n            if(i !== '' && propStr === '') {\n                // special handling of undoit if we're adding or removing an element\n                // ie 'annotations[2]' which can be {...} (add) or null,\n                // does not work when replacing the entire array\n                if(manageArrays.isAddVal(vi)) {\n                    undoit[ai] = null;\n                } else if(manageArrays.isRemoveVal(vi)) {\n                    undoit[ai] = (nestedProperty(layout, arrayStr).get() || [])[i];\n                } else {\n                    Lib.warn('unrecognized full object value', aobj);\n                }\n            }\n            editTypes.update(flags, updateValObject);\n\n            // prepare the edits object we'll send to applyContainerArrayChanges\n            if(!arrayEdits[arrayStr]) arrayEdits[arrayStr] = {};\n            var objEdits = arrayEdits[arrayStr][i];\n            if(!objEdits) objEdits = arrayEdits[arrayStr][i] = {};\n            objEdits[propStr] = vi;\n\n            delete aobj[ai];\n        } else if(pleaf === 'reverse') {\n            // handle axis reversal explicitly, as there's no 'reverse' attribute\n\n            if(parentIn.range) parentIn.range.reverse();\n            else {\n                doextra(ptrunk + '.autorange', true);\n                parentIn.range = [1, 0];\n            }\n\n            if(parentFull.autorange) flags.calc = true;\n            else flags.plot = true;\n        } else {\n            if((fullLayout._has('scatter-like') && fullLayout._has('regl')) &&\n                (ai === 'dragmode' &&\n                (vi === 'lasso' || vi === 'select') &&\n                !(vOld === 'lasso' || vOld === 'select'))\n            ) {\n                flags.plot = true;\n            } else if(fullLayout._has('gl2d')) {\n                flags.plot = true;\n            } else if(valObject) editTypes.update(flags, valObject);\n            else flags.calc = true;\n\n            p.set(vi);\n        }\n    }\n\n    // now we've collected component edits - execute them all together\n    for(arrayStr in arrayEdits) {\n        var finished = manageArrays.applyContainerArrayChanges(gd,\n            layoutNP(layout, arrayStr), arrayEdits[arrayStr], flags, layoutNP);\n        if(!finished) flags.plot = true;\n    }\n\n    // figure out if we need to recalculate axis constraints\n    var constraints = fullLayout._axisConstraintGroups || [];\n    for(axId in rangesAltered) {\n        for(i = 0; i < constraints.length; i++) {\n            var group = constraints[i];\n            if(group[axId]) {\n                // Always recalc if we're changing constrained ranges.\n                // Otherwise it's possible to violate the constraints by\n                // specifying arbitrary ranges for all axes in the group.\n                // this way some ranges may expand beyond what's specified,\n                // as they do at first draw, to satisfy the constraints.\n                flags.calc = true;\n                for(var groupAxId in group) {\n                    if(!rangesAltered[groupAxId]) {\n                        Axes.getFromId(gd, groupAxId)._constraintShrinkable = true;\n                    }\n                }\n            }\n        }\n    }\n\n    // If the autosize changed or height or width was explicitly specified,\n    // this triggers a redraw\n    // TODO: do we really need special aobj.height/width handling here?\n    // couldn't editType do this?\n    if(updateAutosize(gd) || aobj.height || aobj.width) flags.plot = true;\n\n    if(flags.plot || flags.calc) {\n        flags.layoutReplot = true;\n    }\n\n    // now all attribute mods are done, as are\n    // redo and undo so we can save them\n\n    return {\n        flags: flags,\n        rangesAltered: rangesAltered,\n        undoit: undoit,\n        redoit: redoit,\n        eventData: eventData\n    };\n}\n\n/*\n * updateAutosize: we made a change, does it change the autosize result?\n * puts the new size into fullLayout\n * returns true if either height or width changed\n */\nfunction updateAutosize(gd) {\n    var fullLayout = gd._fullLayout;\n    var oldWidth = fullLayout.width;\n    var oldHeight = fullLayout.height;\n\n    // calculate autosizing\n    if(gd.layout.autosize) Plots.plotAutoSize(gd, gd.layout, fullLayout);\n\n    return (fullLayout.width !== oldWidth) || (fullLayout.height !== oldHeight);\n}\n\n/**\n * update: update trace and layout attributes of an existing plot\n *\n * @param {String | HTMLDivElement} gd\n *  the id or DOM element of the graph container div\n * @param {Object} traceUpdate\n *  attribute object `{astr1: val1, astr2: val2 ...}`\n *  corresponding to updates in the plot's traces\n * @param {Object} layoutUpdate\n *  attribute object `{astr1: val1, astr2: val2 ...}`\n *  corresponding to updates in the plot's layout\n * @param {Number[] | Number} [traces]\n *  integer or array of integers for the traces to alter (all if omitted)\n *\n */\nfunction update(gd, traceUpdate, layoutUpdate, _traces) {\n    gd = Lib.getGraphDiv(gd);\n    helpers.clearPromiseQueue(gd);\n\n    if(gd.framework && gd.framework.isPolar) {\n        return Promise.resolve(gd);\n    }\n\n    if(!Lib.isPlainObject(traceUpdate)) traceUpdate = {};\n    if(!Lib.isPlainObject(layoutUpdate)) layoutUpdate = {};\n\n    if(Object.keys(traceUpdate).length) gd.changed = true;\n    if(Object.keys(layoutUpdate).length) gd.changed = true;\n\n    var traces = helpers.coerceTraceIndices(gd, _traces);\n\n    var restyleSpecs = _restyle(gd, Lib.extendFlat({}, traceUpdate), traces);\n    var restyleFlags = restyleSpecs.flags;\n\n    var relayoutSpecs = _relayout(gd, Lib.extendFlat({}, layoutUpdate));\n    var relayoutFlags = relayoutSpecs.flags;\n\n    // clear calcdata and/or axis types if required\n    if(restyleFlags.calc || relayoutFlags.calc) gd.calcdata = undefined;\n    if(restyleFlags.clearAxisTypes) helpers.clearAxisTypes(gd, traces, layoutUpdate);\n\n    // fill in redraw sequence\n    var seq = [];\n\n    if(relayoutFlags.layoutReplot) {\n        // N.B. works fine when both\n        // relayoutFlags.layoutReplot and restyleFlags.fullReplot are true\n        seq.push(subroutines.layoutReplot);\n    } else if(restyleFlags.fullReplot) {\n        seq.push(exports.plot);\n    } else {\n        seq.push(Plots.previousPromises);\n        axRangeSupplyDefaultsByPass(gd, relayoutFlags, relayoutSpecs) || Plots.supplyDefaults(gd);\n\n        if(restyleFlags.style) seq.push(subroutines.doTraceStyle);\n        if(restyleFlags.colorbars || relayoutFlags.colorbars) seq.push(subroutines.doColorBars);\n        if(relayoutFlags.legend) seq.push(subroutines.doLegend);\n        if(relayoutFlags.layoutstyle) seq.push(subroutines.layoutStyles);\n        if(relayoutFlags.axrange) addAxRangeSequence(seq, relayoutSpecs.rangesAltered);\n        if(relayoutFlags.ticks) seq.push(subroutines.doTicksRelayout);\n        if(relayoutFlags.modebar) seq.push(subroutines.doModeBar);\n        if(relayoutFlags.camera) seq.push(subroutines.doCamera);\n\n        seq.push(emitAfterPlot);\n    }\n\n    seq.push(Plots.rehover, Plots.redrag);\n\n    Queue.add(gd,\n        update, [gd, restyleSpecs.undoit, relayoutSpecs.undoit, restyleSpecs.traces],\n        update, [gd, restyleSpecs.redoit, relayoutSpecs.redoit, restyleSpecs.traces]\n    );\n\n    var plotDone = Lib.syncOrAsync(seq, gd);\n    if(!plotDone || !plotDone.then) plotDone = Promise.resolve(gd);\n\n    return plotDone.then(function() {\n        gd.emit('plotly_update', {\n            data: restyleSpecs.eventData,\n            layout: relayoutSpecs.eventData\n        });\n\n        return gd;\n    });\n}\n\n/*\n * internal-use-only restyle/relayout/update variants that record the initial\n * values in (fullLayout|fullTrace)._preGUI so changes can be persisted across\n * Plotly.react data updates, dependent on uirevision attributes\n */\nfunction guiEdit(func) {\n    return function wrappedEdit(gd) {\n        gd._fullLayout._guiEditing = true;\n        var p = func.apply(null, arguments);\n        gd._fullLayout._guiEditing = false;\n        return p;\n    };\n}\n\n// For connecting edited layout attributes to uirevision attrs\n// If no `attr` we use `match[1] + '.uirevision'`\n// Ordered by most common edits first, to minimize our search time\nvar layoutUIControlPatterns = [\n    {pattern: /^hiddenlabels/, attr: 'legend.uirevision'},\n    {pattern: /^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},\n\n    // showspikes and modes include those nested inside scenes\n    {pattern: /axis\\d*\\.showspikes$/, attr: 'modebar.uirevision'},\n    {pattern: /(hover|drag)mode$/, attr: 'modebar.uirevision'},\n\n    {pattern: /^(scene\\d*)\\.camera/},\n    {pattern: /^(geo\\d*)\\.(projection|center)/},\n    {pattern: /^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},\n    {pattern: /^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},\n    {pattern: /^(polar\\d*\\.angularaxis)\\.rotation/},\n    {pattern: /^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},\n\n    {pattern: /^legend\\.(x|y)$/, attr: 'editrevision'},\n    {pattern: /^(shapes|annotations)/, attr: 'editrevision'},\n    {pattern: /^title\\.text$/, attr: 'editrevision'}\n];\n\n// same for trace attributes: if `attr` is given it's in layout,\n// or with no `attr` we use `trace.uirevision`\nvar traceUIControlPatterns = [\n    {pattern: /^selectedpoints$/, attr: 'selectionrevision'},\n    // \"visible\" includes trace.transforms[i].styles[j].value.visible\n    {pattern: /(^|value\\.)visible$/, attr: 'legend.uirevision'},\n    {pattern: /^dimensions\\[\\d+\\]\\.constraintrange/},\n    {pattern: /^node\\.(x|y|groups)/}, // for Sankey nodes\n    {pattern: /^level$/}, // for Sunburst traces\n\n    // below this you must be in editable: true mode\n    // TODO: I still put name and title with `trace.uirevision`\n    // reasonable or should these be `editrevision`?\n    // Also applies to axis titles up in the layout section\n\n    // \"name\" also includes transform.styles\n    {pattern: /(^|value\\.)name$/},\n    // including nested colorbar attributes (ie marker.colorbar)\n    {pattern: /colorbar\\.title\\.text$/},\n    {pattern: /colorbar\\.(x|y)$/, attr: 'editrevision'}\n];\n\nfunction findUIPattern(key, patternSpecs) {\n    for(var i = 0; i < patternSpecs.length; i++) {\n        var spec = patternSpecs[i];\n        var match = key.match(spec.pattern);\n        if(match) {\n            return {head: match[1], attr: spec.attr};\n        }\n    }\n}\n\n// We're finding the new uirevision before supplyDefaults, so do the\n// inheritance manually. Note that only `undefined` inherits - other\n// falsy values are returned.\nfunction getNewRev(revAttr, container) {\n    var newRev = nestedProperty(container, revAttr).get();\n    if(newRev !== undefined) return newRev;\n\n    var parts = revAttr.split('.');\n    parts.pop();\n    while(parts.length > 1) {\n        parts.pop();\n        newRev = nestedProperty(container, parts.join('.') + '.uirevision').get();\n        if(newRev !== undefined) return newRev;\n    }\n\n    return container.uirevision;\n}\n\nfunction getFullTraceIndexFromUid(uid, fullData) {\n    for(var i = 0; i < fullData.length; i++) {\n        if(fullData[i]._fullInput.uid === uid) return i;\n    }\n    return -1;\n}\n\nfunction getTraceIndexFromUid(uid, data, tracei) {\n    for(var i = 0; i < data.length; i++) {\n        if(data[i].uid === uid) return i;\n    }\n    // fall back on trace order, but only if user didn't provide a uid for that trace\n    return (!data[tracei] || data[tracei].uid) ? -1 : tracei;\n}\n\nfunction valsMatch(v1, v2) {\n    var v1IsObj = Lib.isPlainObject(v1);\n    var v1IsArray = Array.isArray(v1);\n    if(v1IsObj || v1IsArray) {\n        return (\n            (v1IsObj && Lib.isPlainObject(v2)) ||\n            (v1IsArray && Array.isArray(v2))\n        ) && JSON.stringify(v1) === JSON.stringify(v2);\n    }\n    return v1 === v2;\n}\n\nfunction applyUIRevisions(data, layout, oldFullData, oldFullLayout) {\n    var layoutPreGUI = oldFullLayout._preGUI;\n    var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;\n    var bothInheritAutorange = [];\n    var newRangeAccepted = {};\n    for(key in layoutPreGUI) {\n        match = findUIPattern(key, layoutUIControlPatterns);\n        if(match) {\n            revAttr = match.attr || (match.head + '.uirevision');\n            oldRev = nestedProperty(oldFullLayout, revAttr).get();\n            newRev = oldRev && getNewRev(revAttr, layout);\n            if(newRev && (newRev === oldRev)) {\n                preGUIVal = layoutPreGUI[key];\n                if(preGUIVal === null) preGUIVal = undefined;\n                newNP = nestedProperty(layout, key);\n                newVal = newNP.get();\n                if(valsMatch(newVal, preGUIVal)) {\n                    if(newVal === undefined && key.substr(key.length - 9) === 'autorange') {\n                        bothInheritAutorange.push(key.substr(0, key.length - 10));\n                    }\n                    newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));\n                    continue;\n                }\n            }\n        } else {\n            Lib.warn('unrecognized GUI edit: ' + key);\n        }\n        // if we got this far, the new value was accepted as the new starting\n        // point (either because it changed or revision changed)\n        // so remove it from _preGUI for next time.\n        delete layoutPreGUI[key];\n\n        if(key.substr(key.length - 8, 6) === 'range[') {\n            newRangeAccepted[key.substr(0, key.length - 9)] = 1;\n        }\n    }\n\n    // Special logic for `autorange`, since it interacts with `range`:\n    // If the new figure's matching `range` was kept, and `autorange`\n    // wasn't supplied explicitly in either the original or the new figure,\n    // we shouldn't alter that - but we may just have done that, so fix it.\n    for(var i = 0; i < bothInheritAutorange.length; i++) {\n        var axAttr = bothInheritAutorange[i];\n        if(newRangeAccepted[axAttr]) {\n            var newAx = nestedProperty(layout, axAttr).get();\n            if(newAx) delete newAx.autorange;\n        }\n    }\n\n    // Now traces - try to match them up by uid (in case we added/deleted in\n    // the middle), then fall back on index.\n    var allTracePreGUI = oldFullLayout._tracePreGUI;\n    for(var uid in allTracePreGUI) {\n        var tracePreGUI = allTracePreGUI[uid];\n        var newTrace = null;\n        var fullInput;\n        for(key in tracePreGUI) {\n            // wait until we know we have preGUI values to look for traces\n            // but if we don't find both, stop looking at this uid\n            if(!newTrace) {\n                var fulli = getFullTraceIndexFromUid(uid, oldFullData);\n                if(fulli < 0) {\n                    // Somehow we didn't even have this trace in oldFullData...\n                    // I guess this could happen with `deleteTraces` or something\n                    delete allTracePreGUI[uid];\n                    break;\n                }\n                var fullTrace = oldFullData[fulli];\n                fullInput = fullTrace._fullInput;\n\n                var newTracei = getTraceIndexFromUid(uid, data, fullInput.index);\n                if(newTracei < 0) {\n                    // No match in new data\n                    delete allTracePreGUI[uid];\n                    break;\n                }\n                newTrace = data[newTracei];\n            }\n\n            match = findUIPattern(key, traceUIControlPatterns);\n            if(match) {\n                if(match.attr) {\n                    oldRev = nestedProperty(oldFullLayout, match.attr).get();\n                    newRev = oldRev && getNewRev(match.attr, layout);\n                } else {\n                    oldRev = fullInput.uirevision;\n                    // inheritance for trace.uirevision is simple, just layout.uirevision\n                    newRev = newTrace.uirevision;\n                    if(newRev === undefined) newRev = layout.uirevision;\n                }\n\n                if(newRev && newRev === oldRev) {\n                    preGUIVal = tracePreGUI[key];\n                    if(preGUIVal === null) preGUIVal = undefined;\n                    newNP = nestedProperty(newTrace, key);\n                    newVal = newNP.get();\n                    if(valsMatch(newVal, preGUIVal)) {\n                        newNP.set(undefinedToNull(nestedProperty(fullInput, key).get()));\n                        continue;\n                    }\n                }\n            } else {\n                Lib.warn('unrecognized GUI edit: ' + key + ' in trace uid ' + uid);\n            }\n            delete tracePreGUI[key];\n        }\n    }\n}\n\n/**\n * Plotly.react:\n * A plot/update method that takes the full plot state (same API as plot/newPlot)\n * and diffs to determine the minimal update pathway\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n * @param {array of objects} data\n *      array of traces, containing the data and display information for each trace\n * @param {object} layout\n *      object describing the overall display of the plot,\n *      all the stuff that doesn't pertain to any individual trace\n * @param {object} config\n *      configuration options (see ./plot_config.js for more info)\n *\n * OR\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n * @param {object} figure\n *      object containing `data`, `layout`, `config`, and `frames` members\n *\n */\nfunction react(gd, data, layout, config) {\n    var frames, plotDone;\n\n    function addFrames() { return exports.addFrames(gd, frames); }\n\n    gd = Lib.getGraphDiv(gd);\n\n    var oldFullData = gd._fullData;\n    var oldFullLayout = gd._fullLayout;\n\n    // you can use this as the initial draw as well as to update\n    if(!Lib.isPlotDiv(gd) || !oldFullData || !oldFullLayout) {\n        plotDone = exports.newPlot(gd, data, layout, config);\n    } else {\n        if(Lib.isPlainObject(data)) {\n            var obj = data;\n            data = obj.data;\n            layout = obj.layout;\n            config = obj.config;\n            frames = obj.frames;\n        }\n\n        var configChanged = false;\n        // assume that if there's a config at all, we're reacting to it too,\n        // and completely replace the previous config\n        if(config) {\n            var oldConfig = Lib.extendDeep({}, gd._context);\n            gd._context = undefined;\n            setPlotContext(gd, config);\n            configChanged = diffConfig(oldConfig, gd._context);\n        }\n\n        gd.data = data || [];\n        helpers.cleanData(gd.data);\n        gd.layout = layout || {};\n        helpers.cleanLayout(gd.layout);\n\n        applyUIRevisions(gd.data, gd.layout, oldFullData, oldFullLayout);\n\n        // \"true\" skips updating calcdata and remapping arrays from calcTransforms,\n        // which supplyDefaults usually does at the end, but we may need to NOT do\n        // if the diff (which we haven't determined yet) says we'll recalc\n        Plots.supplyDefaults(gd, {skipUpdateCalc: true});\n\n        var newFullData = gd._fullData;\n        var newFullLayout = gd._fullLayout;\n        var immutable = newFullLayout.datarevision === undefined;\n        var transition = newFullLayout.transition;\n\n        var relayoutFlags = diffLayout(gd, oldFullLayout, newFullLayout, immutable, transition);\n        var newDataRevision = relayoutFlags.newDataRevision;\n        var restyleFlags = diffData(gd, oldFullData, newFullData, immutable, transition, newDataRevision);\n\n        // TODO: how to translate this part of relayout to Plotly.react?\n        // // Setting width or height to null must reset the graph's width / height\n        // // back to its initial value as computed during the first pass in Plots.plotAutoSize.\n        // //\n        // // To do so, we must manually set them back here using the _initialAutoSize cache.\n        // if(['width', 'height'].indexOf(ai) !== -1 && vi === null) {\n        //     fullLayout[ai] = gd._initialAutoSize[ai];\n        // }\n\n        if(updateAutosize(gd)) relayoutFlags.layoutReplot = true;\n\n        // clear calcdata if required\n        if(restyleFlags.calc || relayoutFlags.calc) gd.calcdata = undefined;\n        // otherwise do the calcdata updates and calcTransform array remaps that we skipped earlier\n        else Plots.supplyDefaultsUpdateCalc(gd.calcdata, newFullData);\n\n        // Note: what restyle/relayout use impliedEdits and clearAxisTypes for\n        // must be handled by the user when using Plotly.react.\n\n        // fill in redraw sequence\n        var seq = [];\n\n        if(frames) {\n            gd._transitionData = {};\n            Plots.createTransitionData(gd);\n            seq.push(addFrames);\n        }\n\n        // Transition pathway,\n        // only used when 'transition' is set by user and\n        // when at least one animatable attribute has changed,\n        // N.B. config changed aren't animatable\n        if(newFullLayout.transition && !configChanged && (restyleFlags.anim || relayoutFlags.anim)) {\n            Plots.doCalcdata(gd);\n            subroutines.doAutoRangeAndConstraints(gd);\n\n            seq.push(function() {\n                return Plots.transitionFromReact(gd, restyleFlags, relayoutFlags, oldFullLayout);\n            });\n        } else if(restyleFlags.fullReplot || relayoutFlags.layoutReplot || configChanged) {\n            gd._fullLayout._skipDefaults = true;\n            seq.push(exports.plot);\n        } else {\n            for(var componentType in relayoutFlags.arrays) {\n                var indices = relayoutFlags.arrays[componentType];\n                if(indices.length) {\n                    var drawOne = Registry.getComponentMethod(componentType, 'drawOne');\n                    if(drawOne !== Lib.noop) {\n                        for(var i = 0; i < indices.length; i++) {\n                            drawOne(gd, indices[i]);\n                        }\n                    } else {\n                        var draw = Registry.getComponentMethod(componentType, 'draw');\n                        if(draw === Lib.noop) {\n                            throw new Error('cannot draw components: ' + componentType);\n                        }\n                        draw(gd);\n                    }\n                }\n            }\n\n            seq.push(Plots.previousPromises);\n            if(restyleFlags.style) seq.push(subroutines.doTraceStyle);\n            if(restyleFlags.colorbars || relayoutFlags.colorbars) seq.push(subroutines.doColorBars);\n            if(relayoutFlags.legend) seq.push(subroutines.doLegend);\n            if(relayoutFlags.layoutstyle) seq.push(subroutines.layoutStyles);\n            if(relayoutFlags.axrange) addAxRangeSequence(seq);\n            if(relayoutFlags.ticks) seq.push(subroutines.doTicksRelayout);\n            if(relayoutFlags.modebar) seq.push(subroutines.doModeBar);\n            if(relayoutFlags.camera) seq.push(subroutines.doCamera);\n            seq.push(emitAfterPlot);\n        }\n\n        seq.push(Plots.rehover, Plots.redrag);\n\n        plotDone = Lib.syncOrAsync(seq, gd);\n        if(!plotDone || !plotDone.then) plotDone = Promise.resolve(gd);\n    }\n\n    return plotDone.then(function() {\n        gd.emit('plotly_react', {\n            data: data,\n            layout: layout\n        });\n\n        return gd;\n    });\n}\n\nfunction diffData(gd, oldFullData, newFullData, immutable, transition, newDataRevision) {\n    var sameTraceLength = oldFullData.length === newFullData.length;\n\n    if(!transition && !sameTraceLength) {\n        return {\n            fullReplot: true,\n            calc: true\n        };\n    }\n\n    var flags = editTypes.traceFlags();\n    flags.arrays = {};\n    flags.nChanges = 0;\n    flags.nChangesAnim = 0;\n\n    var i, trace;\n\n    function getTraceValObject(parts) {\n        return PlotSchema.getTraceValObject(trace, parts);\n    }\n\n    var diffOpts = {\n        getValObject: getTraceValObject,\n        flags: flags,\n        immutable: immutable,\n        transition: transition,\n        newDataRevision: newDataRevision,\n        gd: gd\n    };\n\n    var seenUIDs = {};\n\n    for(i = 0; i < oldFullData.length; i++) {\n        if(newFullData[i]) {\n            trace = newFullData[i]._fullInput;\n            if(Plots.hasMakesDataTransform(trace)) trace = newFullData[i];\n            if(seenUIDs[trace.uid]) continue;\n            seenUIDs[trace.uid] = 1;\n\n            getDiffFlags(oldFullData[i]._fullInput, trace, [], diffOpts);\n        }\n    }\n\n    if(flags.calc || flags.plot) {\n        flags.fullReplot = true;\n    }\n\n    if(transition && flags.nChanges && flags.nChangesAnim) {\n        flags.anim = (flags.nChanges === flags.nChangesAnim) && sameTraceLength ? 'all' : 'some';\n    }\n\n    return flags;\n}\n\nfunction diffLayout(gd, oldFullLayout, newFullLayout, immutable, transition) {\n    var flags = editTypes.layoutFlags();\n    flags.arrays = {};\n    flags.rangesAltered = {};\n    flags.nChanges = 0;\n    flags.nChangesAnim = 0;\n\n    function getLayoutValObject(parts) {\n        return PlotSchema.getLayoutValObject(newFullLayout, parts);\n    }\n\n    var diffOpts = {\n        getValObject: getLayoutValObject,\n        flags: flags,\n        immutable: immutable,\n        transition: transition,\n        gd: gd\n    };\n\n    getDiffFlags(oldFullLayout, newFullLayout, [], diffOpts);\n\n    if(flags.plot || flags.calc) {\n        flags.layoutReplot = true;\n    }\n\n    if(transition && flags.nChanges && flags.nChangesAnim) {\n        flags.anim = flags.nChanges === flags.nChangesAnim ? 'all' : 'some';\n    }\n\n    return flags;\n}\n\nfunction getDiffFlags(oldContainer, newContainer, outerparts, opts) {\n    var valObject, key, astr;\n\n    var getValObject = opts.getValObject;\n    var flags = opts.flags;\n    var immutable = opts.immutable;\n    var inArray = opts.inArray;\n    var arrayIndex = opts.arrayIndex;\n\n    function changed() {\n        var editType = valObject.editType;\n        if(inArray && editType.indexOf('arraydraw') !== -1) {\n            Lib.pushUnique(flags.arrays[inArray], arrayIndex);\n            return;\n        }\n        editTypes.update(flags, valObject);\n\n        if(editType !== 'none') {\n            flags.nChanges++;\n        }\n\n        // track animatable changes\n        if(opts.transition && valObject.anim) {\n            flags.nChangesAnim++;\n        }\n\n        // track cartesian axes with altered ranges\n        if(AX_RANGE_RE.test(astr) || AX_AUTORANGE_RE.test(astr)) {\n            flags.rangesAltered[outerparts[0]] = 1;\n        }\n\n        // clear _inputDomain on cartesian axes with altered domains\n        if(AX_DOMAIN_RE.test(astr)) {\n            nestedProperty(newContainer, '_inputDomain').set(null);\n        }\n\n        // track datarevision changes\n        if(key === 'datarevision') {\n            flags.newDataRevision = 1;\n        }\n    }\n\n    function valObjectCanBeDataArray(valObject) {\n        return valObject.valType === 'data_array' || valObject.arrayOk;\n    }\n\n    for(key in oldContainer) {\n        // short-circuit based on previous calls or previous keys that already maximized the pathway\n        if(flags.calc && !opts.transition) return;\n\n        var oldVal = oldContainer[key];\n        var newVal = newContainer[key];\n        var parts = outerparts.concat(key);\n        astr = parts.join('.');\n\n        if(key.charAt(0) === '_' || typeof oldVal === 'function' || oldVal === newVal) continue;\n\n        // FIXME: ax.tick0 and dtick get filled in during plotting (except for geo subplots),\n        // and unlike other auto values they don't make it back into the input,\n        // so newContainer won't have them.\n        if((key === 'tick0' || key === 'dtick') && outerparts[0] !== 'geo') {\n            var tickMode = newContainer.tickmode;\n            if(tickMode === 'auto' || tickMode === 'array' || !tickMode) continue;\n        }\n        // FIXME: Similarly for axis ranges for 3D\n        // contourcarpet doesn't HAVE zmin/zmax, they're just auto-added. It needs them.\n        if(key === 'range' && newContainer.autorange) continue;\n        if((key === 'zmin' || key === 'zmax') && newContainer.type === 'contourcarpet') continue;\n\n        valObject = getValObject(parts);\n\n        // in case type changed, we may not even *have* a valObject.\n        if(!valObject) continue;\n\n        if(valObject._compareAsJSON && JSON.stringify(oldVal) === JSON.stringify(newVal)) continue;\n\n        var valType = valObject.valType;\n        var i;\n\n        var canBeDataArray = valObjectCanBeDataArray(valObject);\n        var wasArray = Array.isArray(oldVal);\n        var nowArray = Array.isArray(newVal);\n\n        // hack for traces that modify the data in supplyDefaults, like\n        // converting 1D to 2D arrays, which will always create new objects\n        if(wasArray && nowArray) {\n            var inputKey = '_input_' + key;\n            var oldValIn = oldContainer[inputKey];\n            var newValIn = newContainer[inputKey];\n            if(Array.isArray(oldValIn) && oldValIn === newValIn) continue;\n        }\n\n        if(newVal === undefined) {\n            if(canBeDataArray && wasArray) flags.calc = true;\n            else changed();\n        } else if(valObject._isLinkedToArray) {\n            var arrayEditIndices = [];\n            var extraIndices = false;\n            if(!inArray) flags.arrays[key] = arrayEditIndices;\n\n            var minLen = Math.min(oldVal.length, newVal.length);\n            var maxLen = Math.max(oldVal.length, newVal.length);\n            if(minLen !== maxLen) {\n                if(valObject.editType === 'arraydraw') {\n                    extraIndices = true;\n                } else {\n                    changed();\n                    continue;\n                }\n            }\n\n            for(i = 0; i < minLen; i++) {\n                getDiffFlags(oldVal[i], newVal[i], parts.concat(i),\n                    // add array indices, but not if we're already in an array\n                    Lib.extendFlat({inArray: key, arrayIndex: i}, opts));\n            }\n\n            // put this at the end so that we know our collected array indices are sorted\n            // but the check for length changes happens up front so we can short-circuit\n            // diffing if appropriate\n            if(extraIndices) {\n                for(i = minLen; i < maxLen; i++) {\n                    arrayEditIndices.push(i);\n                }\n            }\n        } else if(!valType && Lib.isPlainObject(oldVal)) {\n            getDiffFlags(oldVal, newVal, parts, opts);\n        } else if(canBeDataArray) {\n            if(wasArray && nowArray) {\n                // don't try to diff two data arrays. If immutable we know the data changed,\n                // if not, assume it didn't and let `layout.datarevision` tell us if it did\n                if(immutable) {\n                    flags.calc = true;\n                }\n\n                // look for animatable attributes when the data changed\n                if(immutable || opts.newDataRevision) {\n                    changed();\n                }\n            } else if(wasArray !== nowArray) {\n                flags.calc = true;\n            } else changed();\n        } else if(wasArray && nowArray) {\n            // info array, colorscale, 'any' - these are short, just stringify.\n            // I don't *think* that covers up any real differences post-validation, does it?\n            // otherwise we need to dive in 1 (info_array) or 2 (colorscale) levels and compare\n            // all elements.\n            if(oldVal.length !== newVal.length || String(oldVal) !== String(newVal)) {\n                changed();\n            }\n        } else {\n            changed();\n        }\n    }\n\n    for(key in newContainer) {\n        if(!(key in oldContainer || key.charAt(0) === '_' || typeof newContainer[key] === 'function')) {\n            valObject = getValObject(outerparts.concat(key));\n\n            if(valObjectCanBeDataArray(valObject) && Array.isArray(newContainer[key])) {\n                flags.calc = true;\n                return;\n            } else changed();\n        }\n    }\n}\n\n/*\n * simple diff for config - for now, just treat all changes as equivalent\n */\nfunction diffConfig(oldConfig, newConfig) {\n    var key;\n\n    for(key in oldConfig) {\n        if(key.charAt(0) === '_') continue;\n        var oldVal = oldConfig[key];\n        var newVal = newConfig[key];\n        if(oldVal !== newVal) {\n            if(Lib.isPlainObject(oldVal) && Lib.isPlainObject(newVal)) {\n                if(diffConfig(oldVal, newVal)) {\n                    return true;\n                }\n            } else if(Array.isArray(oldVal) && Array.isArray(newVal)) {\n                if(oldVal.length !== newVal.length) {\n                    return true;\n                }\n                for(var i = 0; i < oldVal.length; i++) {\n                    if(oldVal[i] !== newVal[i]) {\n                        if(Lib.isPlainObject(oldVal[i]) && Lib.isPlainObject(newVal[i])) {\n                            if(diffConfig(oldVal[i], newVal[i])) {\n                                return true;\n                            }\n                        } else {\n                            return true;\n                        }\n                    }\n                }\n            } else {\n                return true;\n            }\n        }\n    }\n}\n\n/**\n * Animate to a frame, sequence of frame, frame group, or frame definition\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n *\n * @param {string or object or array of strings or array of objects} frameOrGroupNameOrFrameList\n *      a single frame, array of frames, or group to which to animate. The intent is\n *      inferred by the type of the input. Valid inputs are:\n *\n *      - string, e.g. 'groupname': animate all frames of a given `group` in the order\n *            in which they are defined via `Plotly.addFrames`.\n *\n *      - array of strings, e.g. ['frame1', frame2']: a list of frames by name to which\n *            to animate in sequence\n *\n *      - object: {data: ...}: a frame definition to which to animate. The frame is not\n *            and does not need to be added via `Plotly.addFrames`. It may contain any of\n *            the properties of a frame, including `data`, `layout`, and `traces`. The\n *            frame is used as provided and does not use the `baseframe` property.\n *\n *      - array of objects, e.g. [{data: ...}, {data: ...}]: a list of frame objects,\n *            each following the same rules as a single `object`.\n *\n * @param {object} animationOpts\n *      configuration for the animation\n */\nfunction animate(gd, frameOrGroupNameOrFrameList, animationOpts) {\n    gd = Lib.getGraphDiv(gd);\n\n    if(!Lib.isPlotDiv(gd)) {\n        throw new Error(\n            'This element is not a Plotly plot: ' + gd + '. It\\'s likely that you\\'ve failed ' +\n            'to create a plot before animating it. For more details, see ' +\n            'https://plot.ly/javascript/animations/'\n        );\n    }\n\n    var trans = gd._transitionData;\n\n    // This is the queue of frames that will be animated as soon as possible. They\n    // are popped immediately upon the *start* of a transition:\n    if(!trans._frameQueue) {\n        trans._frameQueue = [];\n    }\n\n    animationOpts = Plots.supplyAnimationDefaults(animationOpts);\n    var transitionOpts = animationOpts.transition;\n    var frameOpts = animationOpts.frame;\n\n    // Since frames are popped immediately, an empty queue only means all frames have\n    // *started* to transition, not that the animation is complete. To solve that,\n    // track a separate counter that increments at the same time as frames are added\n    // to the queue, but decrements only when the transition is complete.\n    if(trans._frameWaitingCnt === undefined) {\n        trans._frameWaitingCnt = 0;\n    }\n\n    function getTransitionOpts(i) {\n        if(Array.isArray(transitionOpts)) {\n            if(i >= transitionOpts.length) {\n                return transitionOpts[0];\n            } else {\n                return transitionOpts[i];\n            }\n        } else {\n            return transitionOpts;\n        }\n    }\n\n    function getFrameOpts(i) {\n        if(Array.isArray(frameOpts)) {\n            if(i >= frameOpts.length) {\n                return frameOpts[0];\n            } else {\n                return frameOpts[i];\n            }\n        } else {\n            return frameOpts;\n        }\n    }\n\n    // Execute a callback after the wrapper function has been called n times.\n    // This is used to defer the resolution until a transition has resovled *and*\n    // the frame has completed. If it's not done this way, then we get a race\n    // condition in which the animation might resolve before a transition is complete\n    // or vice versa.\n    function callbackOnNthTime(cb, n) {\n        var cnt = 0;\n        return function() {\n            if(cb && ++cnt === n) {\n                return cb();\n            }\n        };\n    }\n\n    return new Promise(function(resolve, reject) {\n        function discardExistingFrames() {\n            if(trans._frameQueue.length === 0) {\n                return;\n            }\n\n            while(trans._frameQueue.length) {\n                var next = trans._frameQueue.pop();\n                if(next.onInterrupt) {\n                    next.onInterrupt();\n                }\n            }\n\n            gd.emit('plotly_animationinterrupted', []);\n        }\n\n        function queueFrames(frameList) {\n            if(frameList.length === 0) return;\n\n            for(var i = 0; i < frameList.length; i++) {\n                var computedFrame;\n\n                if(frameList[i].type === 'byname') {\n                    // If it's a named frame, compute it:\n                    computedFrame = Plots.computeFrame(gd, frameList[i].name);\n                } else {\n                    // Otherwise we must have been given a simple object, so treat\n                    // the input itself as the computed frame.\n                    computedFrame = frameList[i].data;\n                }\n\n                var frameOpts = getFrameOpts(i);\n                var transitionOpts = getTransitionOpts(i);\n\n                // It doesn't make much sense for the transition duration to be greater than\n                // the frame duration, so limit it:\n                transitionOpts.duration = Math.min(transitionOpts.duration, frameOpts.duration);\n\n                var nextFrame = {\n                    frame: computedFrame,\n                    name: frameList[i].name,\n                    frameOpts: frameOpts,\n                    transitionOpts: transitionOpts,\n                };\n                if(i === frameList.length - 1) {\n                    // The last frame in this .animate call stores the promise resolve\n                    // and reject callbacks. This is how we ensure that the animation\n                    // loop (which may exist as a result of a *different* .animate call)\n                    // still resolves or rejecdts this .animate call's promise. once it's\n                    // complete.\n                    nextFrame.onComplete = callbackOnNthTime(resolve, 2);\n                    nextFrame.onInterrupt = reject;\n                }\n\n                trans._frameQueue.push(nextFrame);\n            }\n\n            // Set it as never having transitioned to a frame. This will cause the animation\n            // loop to immediately transition to the next frame (which, for immediate mode,\n            // is the first frame in the list since all others would have been discarded\n            // below)\n            if(animationOpts.mode === 'immediate') {\n                trans._lastFrameAt = -Infinity;\n            }\n\n            // Only it's not already running, start a RAF loop. This could be avoided in the\n            // case that there's only one frame, but it significantly complicated the logic\n            // and only sped things up by about 5% or so for a lorenz attractor simulation.\n            // It would be a fine thing to implement, but the benefit of that optimization\n            // doesn't seem worth the extra complexity.\n            if(!trans._animationRaf) {\n                beginAnimationLoop();\n            }\n        }\n\n        function stopAnimationLoop() {\n            gd.emit('plotly_animated');\n\n            // Be sure to unset also since it's how we know whether a loop is already running:\n            window.cancelAnimationFrame(trans._animationRaf);\n            trans._animationRaf = null;\n        }\n\n        function nextFrame() {\n            if(trans._currentFrame && trans._currentFrame.onComplete) {\n                // Execute the callback and unset it to ensure it doesn't\n                // accidentally get called twice\n                trans._currentFrame.onComplete();\n            }\n\n            var newFrame = trans._currentFrame = trans._frameQueue.shift();\n\n            if(newFrame) {\n                // Since it's sometimes necessary to do deep digging into frame data,\n                // we'll consider it not 100% impossible for nulls or numbers to sneak through,\n                // so check when casting the name, just to be absolutely certain:\n                var stringName = newFrame.name ? newFrame.name.toString() : null;\n                gd._fullLayout._currentFrame = stringName;\n\n                trans._lastFrameAt = Date.now();\n                trans._timeToNext = newFrame.frameOpts.duration;\n\n                // This is simply called and it's left to .transition to decide how to manage\n                // interrupting current transitions. That means we don't need to worry about\n                // how it resolves or what happens after this:\n                Plots.transition(gd,\n                    newFrame.frame.data,\n                    newFrame.frame.layout,\n                    helpers.coerceTraceIndices(gd, newFrame.frame.traces),\n                    newFrame.frameOpts,\n                    newFrame.transitionOpts\n                ).then(function() {\n                    if(newFrame.onComplete) {\n                        newFrame.onComplete();\n                    }\n                });\n\n                gd.emit('plotly_animatingframe', {\n                    name: stringName,\n                    frame: newFrame.frame,\n                    animation: {\n                        frame: newFrame.frameOpts,\n                        transition: newFrame.transitionOpts,\n                    }\n                });\n            } else {\n                // If there are no more frames, then stop the RAF loop:\n                stopAnimationLoop();\n            }\n        }\n\n        function beginAnimationLoop() {\n            gd.emit('plotly_animating');\n\n            // If no timer is running, then set last frame = long ago so that the next\n            // frame is immediately transitioned:\n            trans._lastFrameAt = -Infinity;\n            trans._timeToNext = 0;\n            trans._runningTransitions = 0;\n            trans._currentFrame = null;\n\n            var doFrame = function() {\n                // This *must* be requested before nextFrame since nextFrame may decide\n                // to cancel it if there's nothing more to animated:\n                trans._animationRaf = window.requestAnimationFrame(doFrame);\n\n                // Check if we're ready for a new frame:\n                if(Date.now() - trans._lastFrameAt > trans._timeToNext) {\n                    nextFrame();\n                }\n            };\n\n            doFrame();\n        }\n\n        // This is an animate-local counter that helps match up option input list\n        // items with the particular frame.\n        var configCounter = 0;\n        function setTransitionConfig(frame) {\n            if(Array.isArray(transitionOpts)) {\n                if(configCounter >= transitionOpts.length) {\n                    frame.transitionOpts = transitionOpts[configCounter];\n                } else {\n                    frame.transitionOpts = transitionOpts[0];\n                }\n            } else {\n                frame.transitionOpts = transitionOpts;\n            }\n            configCounter++;\n            return frame;\n        }\n\n        // Disambiguate what's sort of frames have been received\n        var i, frame;\n        var frameList = [];\n        var allFrames = frameOrGroupNameOrFrameList === undefined || frameOrGroupNameOrFrameList === null;\n        var isFrameArray = Array.isArray(frameOrGroupNameOrFrameList);\n        var isSingleFrame = !allFrames && !isFrameArray && Lib.isPlainObject(frameOrGroupNameOrFrameList);\n\n        if(isSingleFrame) {\n            // In this case, a simple object has been passed to animate.\n            frameList.push({\n                type: 'object',\n                data: setTransitionConfig(Lib.extendFlat({}, frameOrGroupNameOrFrameList))\n            });\n        } else if(allFrames || ['string', 'number'].indexOf(typeof frameOrGroupNameOrFrameList) !== -1) {\n            // In this case, null or undefined has been passed so that we want to\n            // animate *all* currently defined frames\n            for(i = 0; i < trans._frames.length; i++) {\n                frame = trans._frames[i];\n\n                if(!frame) continue;\n\n                if(allFrames || String(frame.group) === String(frameOrGroupNameOrFrameList)) {\n                    frameList.push({\n                        type: 'byname',\n                        name: String(frame.name),\n                        data: setTransitionConfig({name: frame.name})\n                    });\n                }\n            }\n        } else if(isFrameArray) {\n            for(i = 0; i < frameOrGroupNameOrFrameList.length; i++) {\n                var frameOrName = frameOrGroupNameOrFrameList[i];\n                if(['number', 'string'].indexOf(typeof frameOrName) !== -1) {\n                    frameOrName = String(frameOrName);\n                    // In this case, there's an array and this frame is a string name:\n                    frameList.push({\n                        type: 'byname',\n                        name: frameOrName,\n                        data: setTransitionConfig({name: frameOrName})\n                    });\n                } else if(Lib.isPlainObject(frameOrName)) {\n                    frameList.push({\n                        type: 'object',\n                        data: setTransitionConfig(Lib.extendFlat({}, frameOrName))\n                    });\n                }\n            }\n        }\n\n        // Verify that all of these frames actually exist; return and reject if not:\n        for(i = 0; i < frameList.length; i++) {\n            frame = frameList[i];\n            if(frame.type === 'byname' && !trans._frameHash[frame.data.name]) {\n                Lib.warn('animate failure: frame not found: \"' + frame.data.name + '\"');\n                reject();\n                return;\n            }\n        }\n\n        // If the mode is either next or immediate, then all currently queued frames must\n        // be dumped and the corresponding .animate promises rejected.\n        if(['next', 'immediate'].indexOf(animationOpts.mode) !== -1) {\n            discardExistingFrames();\n        }\n\n        if(animationOpts.direction === 'reverse') {\n            frameList.reverse();\n        }\n\n        var currentFrame = gd._fullLayout._currentFrame;\n        if(currentFrame && animationOpts.fromcurrent) {\n            var idx = -1;\n            for(i = 0; i < frameList.length; i++) {\n                frame = frameList[i];\n                if(frame.type === 'byname' && frame.name === currentFrame) {\n                    idx = i;\n                    break;\n                }\n            }\n\n            if(idx > 0 && idx < frameList.length - 1) {\n                var filteredFrameList = [];\n                for(i = 0; i < frameList.length; i++) {\n                    frame = frameList[i];\n                    if(frameList[i].type !== 'byname' || i > idx) {\n                        filteredFrameList.push(frame);\n                    }\n                }\n                frameList = filteredFrameList;\n            }\n        }\n\n        if(frameList.length > 0) {\n            queueFrames(frameList);\n        } else {\n            // This is the case where there were simply no frames. It's a little strange\n            // since there's not much to do:\n            gd.emit('plotly_animated');\n            resolve();\n        }\n    });\n}\n\n/**\n * Register new frames\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n *\n * @param {array of objects} frameList\n *      list of frame definitions, in which each object includes any of:\n *      - name: {string} name of frame to add\n *      - data: {array of objects} trace data\n *      - layout {object} layout definition\n *      - traces {array} trace indices\n *      - baseframe {string} name of frame from which this frame gets defaults\n *\n *  @param {array of integers} indices\n *      an array of integer indices matching the respective frames in `frameList`. If not\n *      provided, an index will be provided in serial order. If already used, the frame\n *      will be overwritten.\n */\nfunction addFrames(gd, frameList, indices) {\n    gd = Lib.getGraphDiv(gd);\n\n    if(frameList === null || frameList === undefined) {\n        return Promise.resolve();\n    }\n\n    if(!Lib.isPlotDiv(gd)) {\n        throw new Error(\n            'This element is not a Plotly plot: ' + gd + '. It\\'s likely that you\\'ve failed ' +\n            'to create a plot before adding frames. For more details, see ' +\n            'https://plot.ly/javascript/animations/'\n        );\n    }\n\n    var i, frame, j, idx;\n    var _frames = gd._transitionData._frames;\n    var _frameHash = gd._transitionData._frameHash;\n\n\n    if(!Array.isArray(frameList)) {\n        throw new Error('addFrames failure: frameList must be an Array of frame definitions' + frameList);\n    }\n\n    // Create a sorted list of insertions since we run into lots of problems if these\n    // aren't in ascending order of index:\n    //\n    // Strictly for sorting. Make sure this is guaranteed to never collide with any\n    // already-exisisting indices:\n    var bigIndex = _frames.length + frameList.length * 2;\n\n    var insertions = [];\n    var _frameHashLocal = {};\n    for(i = frameList.length - 1; i >= 0; i--) {\n        if(!Lib.isPlainObject(frameList[i])) continue;\n\n        // The entire logic for checking for this type of name collision can be removed once we migrate to ES6 and\n        // use a Map instead of an Object instance, as Map keys aren't converted to strings.\n        var lookupName = frameList[i].name;\n        var name = (_frameHash[lookupName] || _frameHashLocal[lookupName] || {}).name;\n        var newName = frameList[i].name;\n        var collisionPresent = _frameHash[name] || _frameHashLocal[name];\n\n        if(name && newName && typeof newName === 'number' && collisionPresent && numericNameWarningCount < numericNameWarningCountLimit) {\n            numericNameWarningCount++;\n\n            Lib.warn('addFrames: overwriting frame \"' + (_frameHash[name] || _frameHashLocal[name]).name +\n                '\" with a frame whose name of type \"number\" also equates to \"' +\n                name + '\". This is valid but may potentially lead to unexpected ' +\n                'behavior since all plotly.js frame names are stored internally ' +\n                'as strings.');\n\n            if(numericNameWarningCount === numericNameWarningCountLimit) {\n                Lib.warn('addFrames: This API call has yielded too many of these warnings. ' +\n                    'For the rest of this call, further warnings about numeric frame ' +\n                    'names will be suppressed.');\n            }\n        }\n\n        _frameHashLocal[lookupName] = {name: lookupName};\n\n        insertions.push({\n            frame: Plots.supplyFrameDefaults(frameList[i]),\n            index: (indices && indices[i] !== undefined && indices[i] !== null) ? indices[i] : bigIndex + i\n        });\n    }\n\n    // Sort this, taking note that undefined insertions end up at the end:\n    insertions.sort(function(a, b) {\n        if(a.index > b.index) return -1;\n        if(a.index < b.index) return 1;\n        return 0;\n    });\n\n    var ops = [];\n    var revops = [];\n    var frameCount = _frames.length;\n\n    for(i = insertions.length - 1; i >= 0; i--) {\n        frame = insertions[i].frame;\n\n        if(typeof frame.name === 'number') {\n            Lib.warn('Warning: addFrames accepts frames with numeric names, but the numbers are' +\n                'implicitly cast to strings');\n        }\n\n        if(!frame.name) {\n            // Repeatedly assign a default name, incrementing the counter each time until\n            // we get a name that's not in the hashed lookup table:\n            while(_frameHash[(frame.name = 'frame ' + gd._transitionData._counter++)]);\n        }\n\n        if(_frameHash[frame.name]) {\n            // If frame is present, overwrite its definition:\n            for(j = 0; j < _frames.length; j++) {\n                if((_frames[j] || {}).name === frame.name) break;\n            }\n            ops.push({type: 'replace', index: j, value: frame});\n            revops.unshift({type: 'replace', index: j, value: _frames[j]});\n        } else {\n            // Otherwise insert it at the end of the list:\n            idx = Math.max(0, Math.min(insertions[i].index, frameCount));\n\n            ops.push({type: 'insert', index: idx, value: frame});\n            revops.unshift({type: 'delete', index: idx});\n            frameCount++;\n        }\n    }\n\n    var undoFunc = Plots.modifyFrames;\n    var redoFunc = Plots.modifyFrames;\n    var undoArgs = [gd, revops];\n    var redoArgs = [gd, ops];\n\n    if(Queue) Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n\n    return Plots.modifyFrames(gd, ops);\n}\n\n/**\n * Delete frame\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n *\n * @param {array of integers} frameList\n *      list of integer indices of frames to be deleted\n */\nfunction deleteFrames(gd, frameList) {\n    gd = Lib.getGraphDiv(gd);\n\n    if(!Lib.isPlotDiv(gd)) {\n        throw new Error('This element is not a Plotly plot: ' + gd);\n    }\n\n    var i, idx;\n    var _frames = gd._transitionData._frames;\n    var ops = [];\n    var revops = [];\n\n    if(!frameList) {\n        frameList = [];\n        for(i = 0; i < _frames.length; i++) {\n            frameList.push(i);\n        }\n    }\n\n    frameList = frameList.slice(0);\n    frameList.sort();\n\n    for(i = frameList.length - 1; i >= 0; i--) {\n        idx = frameList[i];\n        ops.push({type: 'delete', index: idx});\n        revops.unshift({type: 'insert', index: idx, value: _frames[idx]});\n    }\n\n    var undoFunc = Plots.modifyFrames;\n    var redoFunc = Plots.modifyFrames;\n    var undoArgs = [gd, revops];\n    var redoArgs = [gd, ops];\n\n    if(Queue) Queue.add(gd, undoFunc, undoArgs, redoFunc, redoArgs);\n\n    return Plots.modifyFrames(gd, ops);\n}\n\n/**\n * Purge a graph container div back to its initial pre-Plotly.plot state\n *\n * @param {string id or DOM element} gd\n *      the id or DOM element of the graph container div\n */\nfunction purge(gd) {\n    gd = Lib.getGraphDiv(gd);\n\n    var fullLayout = gd._fullLayout || {};\n    var fullData = gd._fullData || [];\n\n    // remove gl contexts\n    Plots.cleanPlot([], {}, fullData, fullLayout);\n\n    // purge properties\n    Plots.purge(gd);\n\n    // purge event emitter methods\n    Events.purge(gd);\n\n    // remove plot container\n    if(fullLayout._container) fullLayout._container.remove();\n\n    // in contrast to Plotly.Plots.purge which does NOT clear _context!\n    delete gd._context;\n\n    return gd;\n}\n\n// -------------------------------------------------------\n// makePlotFramework: Create the plot container and axes\n// -------------------------------------------------------\nfunction makePlotFramework(gd) {\n    var gd3 = d3.select(gd);\n    var fullLayout = gd._fullLayout;\n\n    // Plot container\n    fullLayout._container = gd3.selectAll('.plot-container').data([0]);\n    fullLayout._container.enter().insert('div', ':first-child')\n        .classed('plot-container', true)\n        .classed('plotly', true);\n\n    // Make the svg container\n    fullLayout._paperdiv = fullLayout._container.selectAll('.svg-container').data([0]);\n    fullLayout._paperdiv.enter().append('div')\n        .classed('svg-container', true)\n        .style('position', 'relative');\n\n    // Make the graph containers\n    // start fresh each time we get here, so we know the order comes out\n    // right, rather than enter/exit which can muck up the order\n    // TODO: sort out all the ordering so we don't have to\n    // explicitly delete anything\n    // FIXME: parcoords reuses this object, not the best pattern\n    fullLayout._glcontainer = fullLayout._paperdiv.selectAll('.gl-container')\n        .data([{}]);\n\n    fullLayout._glcontainer.enter().append('div')\n        .classed('gl-container', true);\n\n    fullLayout._paperdiv.selectAll('.main-svg').remove();\n    fullLayout._paperdiv.select('.modebar-container').remove();\n\n    fullLayout._paper = fullLayout._paperdiv.insert('svg', ':first-child')\n        .classed('main-svg', true);\n\n    fullLayout._toppaper = fullLayout._paperdiv.append('svg')\n        .classed('main-svg', true);\n\n    fullLayout._modebardiv = fullLayout._paperdiv.append('div');\n\n    fullLayout._hoverpaper = fullLayout._paperdiv.append('svg')\n        .classed('main-svg', true);\n\n    if(!fullLayout._uid) {\n        var otherUids = {};\n        d3.selectAll('defs').each(function() {\n            if(this.id) otherUids[this.id.split('-')[1]] = 1;\n        });\n        fullLayout._uid = Lib.randstr(otherUids);\n    }\n\n    fullLayout._paperdiv.selectAll('.main-svg')\n        .attr(xmlnsNamespaces.svgAttrs);\n\n    fullLayout._defs = fullLayout._paper.append('defs')\n        .attr('id', 'defs-' + fullLayout._uid);\n\n    fullLayout._clips = fullLayout._defs.append('g')\n        .classed('clips', true);\n\n    fullLayout._topdefs = fullLayout._toppaper.append('defs')\n        .attr('id', 'topdefs-' + fullLayout._uid);\n\n    fullLayout._topclips = fullLayout._topdefs.append('g')\n        .classed('clips', true);\n\n    fullLayout._bgLayer = fullLayout._paper.append('g')\n        .classed('bglayer', true);\n\n    fullLayout._draggers = fullLayout._paper.append('g')\n        .classed('draglayer', true);\n\n    // lower shape/image layer - note that this is behind\n    // all subplots data/grids but above the backgrounds\n    // except inset subplots, whose backgrounds are drawn\n    // inside their own group so that they appear above\n    // the data for the main subplot\n    // lower shapes and images which are fully referenced to\n    // a subplot still get drawn within the subplot's group\n    // so they will work correctly on insets\n    var layerBelow = fullLayout._paper.append('g')\n        .classed('layer-below', true);\n    fullLayout._imageLowerLayer = layerBelow.append('g')\n        .classed('imagelayer', true);\n    fullLayout._shapeLowerLayer = layerBelow.append('g')\n        .classed('shapelayer', true);\n\n    // single cartesian layer for the whole plot\n    fullLayout._cartesianlayer = fullLayout._paper.append('g').classed('cartesianlayer', true);\n\n    // single polar layer for the whole plot\n    fullLayout._polarlayer = fullLayout._paper.append('g').classed('polarlayer', true);\n\n    // single ternary layer for the whole plot\n    fullLayout._ternarylayer = fullLayout._paper.append('g').classed('ternarylayer', true);\n\n    // single geo layer for the whole plot\n    fullLayout._geolayer = fullLayout._paper.append('g').classed('geolayer', true);\n\n    // single funnelarea layer for the whole plot\n    fullLayout._funnelarealayer = fullLayout._paper.append('g').classed('funnelarealayer', true);\n\n    // single pie layer for the whole plot\n    fullLayout._pielayer = fullLayout._paper.append('g').classed('pielayer', true);\n\n    // single sunburst layer for the whole plot\n    fullLayout._sunburstlayer = fullLayout._paper.append('g').classed('sunburstlayer', true);\n\n    // fill in image server scrape-svg\n    fullLayout._glimages = fullLayout._paper.append('g').classed('glimages', true);\n\n    // lastly upper shapes, info (legend, annotations) and hover layers go on top\n    // these are in a different svg element normally, but get collapsed into a single\n    // svg when exporting (after inserting 3D)\n    // upper shapes/images are only those drawn above the whole plot, including subplots\n    var layerAbove = fullLayout._toppaper.append('g')\n        .classed('layer-above', true);\n    fullLayout._imageUpperLayer = layerAbove.append('g')\n        .classed('imagelayer', true);\n    fullLayout._shapeUpperLayer = layerAbove.append('g')\n        .classed('shapelayer', true);\n\n    fullLayout._infolayer = fullLayout._toppaper.append('g').classed('infolayer', true);\n    fullLayout._menulayer = fullLayout._toppaper.append('g').classed('menulayer', true);\n    fullLayout._zoomlayer = fullLayout._toppaper.append('g').classed('zoomlayer', true);\n    fullLayout._hoverlayer = fullLayout._hoverpaper.append('g').classed('hoverlayer', true);\n\n    // Make the modebar container\n    fullLayout._modebardiv\n        .classed('modebar-container', true)\n        .style('position', 'absolute')\n        .style('top', '0px')\n        .style('right', '0px');\n\n    gd.emit('plotly_framework');\n}\n\nexports.animate = animate;\nexports.addFrames = addFrames;\nexports.deleteFrames = deleteFrames;\n\nexports.addTraces = addTraces;\nexports.deleteTraces = deleteTraces;\nexports.extendTraces = extendTraces;\nexports.moveTraces = moveTraces;\nexports.prependTraces = prependTraces;\n\nexports.newPlot = newPlot;\nexports.plot = plot;\nexports.purge = purge;\n\nexports.react = react;\nexports.redraw = redraw;\nexports.relayout = relayout;\nexports.restyle = restyle;\n\nexports.setPlotConfig = setPlotConfig;\n\nexports.update = update;\n\nexports._guiRelayout = guiEdit(relayout);\nexports._guiRestyle = guiEdit(restyle);\nexports._guiUpdate = guiEdit(update);\n\nexports._storeDirectGUIEdit = _storeDirectGUIEdit;\n\n},{\"../components/color\":580,\"../components/drawing\":601,\"../constants/xmlns_namespaces\":681,\"../lib\":703,\"../lib/events\":692,\"../lib/queue\":718,\"../lib/svg_text_utils\":727,\"../plots/cartesian/axes\":751,\"../plots/cartesian/constants\":757,\"../plots/cartesian/graph_interact\":760,\"../plots/cartesian/select\":768,\"../plots/plots\":812,\"../plots/polar/legacy\":820,\"../registry\":831,\"./edit_types\":734,\"./helpers\":735,\"./manage_arrays\":737,\"./plot_config\":739,\"./plot_schema\":740,\"./subroutines\":742,\"d3\":157,\"fast-isnumeric\":224,\"has-hover\":405}],739:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * This will be transferred over to gd and overridden by\n * config args to Plotly.plot.\n *\n * The defaults are the appropriate settings for plotly.js,\n * so we get the right experience without any config argument.\n *\n * N.B. the config options are not coerced using Lib.coerce so keys\n * like `valType` and `values` are only set for documentation purposes\n * at the moment.\n */\n\nvar configAttributes = {\n    staticPlot: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n\n    plotlyServerURL: {\n        valType: 'string',\n        dflt: 'https://plot.ly',\n        \n    },\n\n    editable: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    edits: {\n        annotationPosition: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        annotationTail: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        annotationText: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        axisTitleText: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        colorbarPosition: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        colorbarTitleText: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        legendPosition: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        legendText: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        shapePosition: {\n            valType: 'boolean',\n            dflt: false,\n            \n        },\n        titleText: {\n            valType: 'boolean',\n            dflt: false,\n            \n        }\n    },\n\n    autosizable: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    responsive: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    fillFrame: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    frameMargins: {\n        valType: 'number',\n        dflt: 0,\n        min: 0,\n        max: 0.5,\n        \n    },\n\n    scrollZoom: {\n        valType: 'flaglist',\n        flags: ['cartesian', 'gl3d', 'geo', 'mapbox'],\n        extras: [true, false],\n        dflt: 'gl3d+geo+mapbox',\n        \n    },\n    doubleClick: {\n        valType: 'enumerated',\n        values: [false, 'reset', 'autosize', 'reset+autosize'],\n        dflt: 'reset+autosize',\n        \n    },\n\n    showAxisDragHandles: {\n        valType: 'boolean',\n        dflt: true,\n        \n    },\n    showAxisRangeEntryBoxes: {\n        valType: 'boolean',\n        dflt: true,\n        \n    },\n\n    showTips: {\n        valType: 'boolean',\n        dflt: true,\n        \n    },\n\n    showLink: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    linkText: {\n        valType: 'string',\n        dflt: 'Edit chart',\n        noBlank: true,\n        \n    },\n    sendData: {\n        valType: 'boolean',\n        dflt: true,\n        \n    },\n    showSources: {\n        valType: 'any',\n        dflt: false,\n        \n    },\n\n    displayModeBar: {\n        valType: 'enumerated',\n        values: ['hover', true, false],\n        dflt: 'hover',\n        \n    },\n    showSendToCloud: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n    modeBarButtonsToRemove: {\n        valType: 'any',\n        dflt: [],\n        \n    },\n    modeBarButtonsToAdd: {\n        valType: 'any',\n        dflt: [],\n        \n    },\n    modeBarButtons: {\n        valType: 'any',\n        dflt: false,\n        \n    },\n    toImageButtonOptions: {\n        valType: 'any',\n        dflt: {},\n        \n    },\n    displaylogo: {\n        valType: 'boolean',\n        dflt: true,\n        \n    },\n    watermark: {\n        valType: 'boolean',\n        dflt: false,\n        \n    },\n\n    plotGlPixelRatio: {\n        valType: 'number',\n        dflt: 2,\n        min: 1,\n        max: 4,\n        \n    },\n\n    setBackground: {\n        valType: 'any',\n        dflt: 'transparent',\n        \n    },\n\n    topojsonURL: {\n        valType: 'string',\n        noBlank: true,\n        dflt: 'https://cdn.plot.ly/',\n        \n    },\n\n    mapboxAccessToken: {\n        valType: 'string',\n        dflt: null,\n        \n    },\n\n    logging: {\n        valType: 'boolean',\n        dflt: 1,\n        \n    },\n\n    queueLength: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n    },\n\n    globalTransforms: {\n        valType: 'any',\n        dflt: [],\n        \n    },\n\n    locale: {\n        valType: 'string',\n        dflt: 'en-US',\n        \n    },\n\n    locales: {\n        valType: 'any',\n        dflt: {},\n        \n    }\n};\n\nvar dfltConfig = {};\n\nfunction crawl(src, target) {\n    for(var k in src) {\n        var obj = src[k];\n        if(obj.valType) {\n            target[k] = obj.dflt;\n        } else {\n            if(!target[k]) {\n                target[k] = {};\n            }\n            crawl(obj, target[k]);\n        }\n    }\n}\n\ncrawl(configAttributes, dfltConfig);\n\nmodule.exports = {\n    configAttributes: configAttributes,\n    dfltConfig: dfltConfig\n};\n\n},{}],740:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\nvar Lib = _dereq_('../lib');\n\nvar baseAttributes = _dereq_('../plots/attributes');\nvar baseLayoutAttributes = _dereq_('../plots/layout_attributes');\nvar frameAttributes = _dereq_('../plots/frame_attributes');\nvar animationAttributes = _dereq_('../plots/animation_attributes');\nvar configAttributes = _dereq_('./plot_config').configAttributes;\n\n// polar attributes are not part of the Registry yet\nvar polarAreaAttrs = _dereq_('../plots/polar/legacy/area_attributes');\nvar polarAxisAttrs = _dereq_('../plots/polar/legacy/axis_attributes');\n\nvar editTypes = _dereq_('./edit_types');\n\nvar extendFlat = Lib.extendFlat;\nvar extendDeepAll = Lib.extendDeepAll;\nvar isPlainObject = Lib.isPlainObject;\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\nvar nestedProperty = Lib.nestedProperty;\nvar valObjectMeta = Lib.valObjectMeta;\n\nvar IS_SUBPLOT_OBJ = '_isSubplotObj';\nvar IS_LINKED_TO_ARRAY = '_isLinkedToArray';\nvar ARRAY_ATTR_REGEXPS = '_arrayAttrRegexps';\nvar DEPRECATED = '_deprecated';\nvar UNDERSCORE_ATTRS = [IS_SUBPLOT_OBJ, IS_LINKED_TO_ARRAY, ARRAY_ATTR_REGEXPS, DEPRECATED];\n\nexports.IS_SUBPLOT_OBJ = IS_SUBPLOT_OBJ;\nexports.IS_LINKED_TO_ARRAY = IS_LINKED_TO_ARRAY;\nexports.DEPRECATED = DEPRECATED;\nexports.UNDERSCORE_ATTRS = UNDERSCORE_ATTRS;\n\n/** Outputs the full plotly.js plot schema\n *\n * @return {object}\n *  - defs\n *  - traces\n *  - layout\n *  - transforms\n *  - frames\n *  - animations\n *  - config\n */\nexports.get = function() {\n    var traces = {};\n\n    Registry.allTypes.concat('area').forEach(function(type) {\n        traces[type] = getTraceAttributes(type);\n    });\n\n    var transforms = {};\n\n    Object.keys(Registry.transformsRegistry).forEach(function(type) {\n        transforms[type] = getTransformAttributes(type);\n    });\n\n    return {\n        defs: {\n            valObjects: valObjectMeta,\n            metaKeys: UNDERSCORE_ATTRS.concat(['description', 'role', 'editType', 'impliedEdits']),\n            editType: {\n                traces: editTypes.traces,\n                layout: editTypes.layout\n            },\n            impliedEdits: {\n                \n            }\n        },\n\n        traces: traces,\n        layout: getLayoutAttributes(),\n\n        transforms: transforms,\n\n        frames: getFramesAttributes(),\n        animation: formatAttributes(animationAttributes),\n\n        config: formatAttributes(configAttributes)\n    };\n};\n\n/**\n * Crawl the attribute tree, recursively calling a callback function\n *\n * @param {object} attrs\n *  The node of the attribute tree (e.g. the root) from which recursion originates\n * @param {Function} callback\n *  A callback function with the signature:\n *          @callback callback\n *          @param {object} attr an attribute\n *          @param {String} attrName name string\n *          @param {object[]} attrs all the attributes\n *          @param {Number} level the recursion level, 0 at the root\n *          @param {String} fullAttrString full attribute name (ie 'marker.line')\n * @param {Number} [specifiedLevel]\n *  The level in the tree, in order to let the callback function detect descend or backtrack,\n *  typically unsupplied (implied 0), just used by the self-recursive call.\n *  The necessity arises because the tree traversal is not controlled by callback return values.\n *  The decision to not use callback return values for controlling tree pruning arose from\n *  the goal of keeping the crawler backwards compatible. Observe that one of the pruning conditions\n *  precedes the callback call.\n * @param {string} [attrString]\n *  the path to the current attribute, as an attribute string (ie 'marker.line')\n *  typically unsupplied, but you may supply it if you want to disambiguate which attrs tree you\n *  are starting from\n *\n * @return {object} transformOut\n *  copy of transformIn that contains attribute defaults\n */\nexports.crawl = function(attrs, callback, specifiedLevel, attrString) {\n    var level = specifiedLevel || 0;\n    attrString = attrString || '';\n\n    Object.keys(attrs).forEach(function(attrName) {\n        var attr = attrs[attrName];\n\n        if(UNDERSCORE_ATTRS.indexOf(attrName) !== -1) return;\n\n        var fullAttrString = (attrString ? attrString + '.' : '') + attrName;\n        callback(attr, attrName, attrs, level, fullAttrString);\n\n        if(exports.isValObject(attr)) return;\n\n        if(isPlainObject(attr) && attrName !== 'impliedEdits') {\n            exports.crawl(attr, callback, level + 1, fullAttrString);\n        }\n    });\n};\n\n/** Is object a value object (or a container object)?\n *\n * @param {object} obj\n * @return {boolean}\n *  returns true for a valid value object and\n *  false for tree nodes in the attribute hierarchy\n */\nexports.isValObject = function(obj) {\n    return obj && obj.valType !== undefined;\n};\n\n/**\n * Find all data array attributes in a given trace object - including\n * `arrayOk` attributes.\n *\n * @param {object} trace\n *  full trace object that contains a reference to `_module.attributes`\n *\n * @return {array} arrayAttributes\n *  list of array attributes for the given trace\n */\nexports.findArrayAttributes = function(trace) {\n    var arrayAttributes = [];\n    var stack = [];\n    var isArrayStack = [];\n    var baseContainer, baseAttrName;\n\n    function callback(attr, attrName, attrs, level) {\n        stack = stack.slice(0, level).concat([attrName]);\n        isArrayStack = isArrayStack.slice(0, level).concat([attr && attr._isLinkedToArray]);\n\n        var splittableAttr = (\n            attr &&\n            (attr.valType === 'data_array' || attr.arrayOk === true) &&\n            !(stack[level - 1] === 'colorbar' && (attrName === 'ticktext' || attrName === 'tickvals'))\n        );\n\n        // Manually exclude 'colorbar.tickvals' and 'colorbar.ticktext' for now\n        // which are declared as `valType: 'data_array'` but scale independently of\n        // the coordinate arrays.\n        //\n        // Down the road, we might want to add a schema field (e.g `uncorrelatedArray: true`)\n        // to distinguish attributes of the likes.\n\n        if(!splittableAttr) return;\n\n        crawlIntoTrace(baseContainer, 0, '');\n    }\n\n    function crawlIntoTrace(container, i, astrPartial) {\n        var item = container[stack[i]];\n        var newAstrPartial = astrPartial + stack[i];\n        if(i === stack.length - 1) {\n            if(isArrayOrTypedArray(item)) {\n                arrayAttributes.push(baseAttrName + newAstrPartial);\n            }\n        } else {\n            if(isArrayStack[i]) {\n                if(Array.isArray(item)) {\n                    for(var j = 0; j < item.length; j++) {\n                        if(isPlainObject(item[j])) {\n                            crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');\n                        }\n                    }\n                }\n            } else if(isPlainObject(item)) {\n                crawlIntoTrace(item, i + 1, newAstrPartial + '.');\n            }\n        }\n    }\n\n    baseContainer = trace;\n    baseAttrName = '';\n    exports.crawl(baseAttributes, callback);\n    if(trace._module && trace._module.attributes) {\n        exports.crawl(trace._module.attributes, callback);\n    }\n\n    var transforms = trace.transforms;\n    if(transforms) {\n        for(var i = 0; i < transforms.length; i++) {\n            var transform = transforms[i];\n            var module = transform._module;\n\n            if(module) {\n                baseAttrName = 'transforms[' + i + '].';\n                baseContainer = transform;\n\n                exports.crawl(module.attributes, callback);\n            }\n        }\n    }\n\n    return arrayAttributes;\n};\n\n/*\n * Find the valObject for one attribute in an existing trace\n *\n * @param {object} trace\n *  full trace object that contains a reference to `_module.attributes`\n * @param {object} parts\n *  an array of parts, like ['transforms', 1, 'value']\n *  typically from nestedProperty(...).parts\n *\n * @return {object|false}\n *  the valObject for this attribute, or the last found parent\n *  in some cases the innermost valObject will not exist, for example\n *  `valType: 'any'` attributes where we might set a part of the attribute.\n *  In that case, stop at the deepest valObject we *do* find.\n */\nexports.getTraceValObject = function(trace, parts) {\n    var head = parts[0];\n    var i = 1; // index to start recursing from\n    var moduleAttrs, valObject;\n\n    if(head === 'transforms') {\n        if(parts.length === 1) {\n            return baseAttributes.transforms;\n        }\n        var transforms = trace.transforms;\n        if(!Array.isArray(transforms) || !transforms.length) return false;\n        var tNum = parts[1];\n        if(!isIndex(tNum) || tNum >= transforms.length) {\n            return false;\n        }\n        moduleAttrs = (Registry.transformsRegistry[transforms[tNum].type] || {}).attributes;\n        valObject = moduleAttrs && moduleAttrs[parts[2]];\n        i = 3; // start recursing only inside the transform\n    } else if(trace.type === 'area') {\n        valObject = polarAreaAttrs[head];\n    } else {\n        // first look in the module for this trace\n        // components have already merged their trace attributes in here\n        var _module = trace._module;\n        if(!_module) _module = (Registry.modules[trace.type || baseAttributes.type.dflt] || {})._module;\n        if(!_module) return false;\n\n        moduleAttrs = _module.attributes;\n        valObject = moduleAttrs && moduleAttrs[head];\n\n        // then look in the subplot attributes\n        if(!valObject) {\n            var subplotModule = _module.basePlotModule;\n            if(subplotModule && subplotModule.attributes) {\n                valObject = subplotModule.attributes[head];\n            }\n        }\n\n        // finally look in the global attributes\n        if(!valObject) valObject = baseAttributes[head];\n    }\n\n    return recurseIntoValObject(valObject, parts, i);\n};\n\n/*\n * Find the valObject for one layout attribute\n *\n * @param {array} parts\n *  an array of parts, like ['annotations', 1, 'x']\n *  typically from nestedProperty(...).parts\n *\n * @return {object|false}\n *  the valObject for this attribute, or the last found parent\n *  in some cases the innermost valObject will not exist, for example\n *  `valType: 'any'` attributes where we might set a part of the attribute.\n *  In that case, stop at the deepest valObject we *do* find.\n */\nexports.getLayoutValObject = function(fullLayout, parts) {\n    var valObject = layoutHeadAttr(fullLayout, parts[0]);\n\n    return recurseIntoValObject(valObject, parts, 1);\n};\n\nfunction layoutHeadAttr(fullLayout, head) {\n    var i, key, _module, attributes;\n\n    // look for attributes of the subplot types used on the plot\n    var basePlotModules = fullLayout._basePlotModules;\n    if(basePlotModules) {\n        var out;\n        for(i = 0; i < basePlotModules.length; i++) {\n            _module = basePlotModules[i];\n            if(_module.attrRegex && _module.attrRegex.test(head)) {\n                // if a module defines overrides, these take precedence\n                // initially this is to allow gl2d different editTypes from svg cartesian\n                if(_module.layoutAttrOverrides) return _module.layoutAttrOverrides;\n\n                // otherwise take the first attributes we find\n                if(!out && _module.layoutAttributes) out = _module.layoutAttributes;\n            }\n\n            // a module can also override the behavior of base (and component) module layout attrs\n            // again see gl2d for initial use case\n            var baseOverrides = _module.baseLayoutAttrOverrides;\n            if(baseOverrides && head in baseOverrides) return baseOverrides[head];\n        }\n        if(out) return out;\n    }\n\n    // look for layout attributes contributed by traces on the plot\n    var modules = fullLayout._modules;\n    if(modules) {\n        for(i = 0; i < modules.length; i++) {\n            attributes = modules[i].layoutAttributes;\n            if(attributes && head in attributes) {\n                return attributes[head];\n            }\n        }\n    }\n\n    /*\n     * Next look in components.\n     * Components that define a schema have already merged this into\n     * base and subplot attribute defs, so ignore these.\n     * Others (older style) all put all their attributes\n     * inside a container matching the module `name`\n     * eg `attributes` (array) or `legend` (object)\n     */\n    for(key in Registry.componentsRegistry) {\n        _module = Registry.componentsRegistry[key];\n        if(_module.name === 'colorscale' && head.indexOf('coloraxis') === 0) {\n            return _module.layoutAttributes[head];\n        } else if(!_module.schema && (head === _module.name)) {\n            return _module.layoutAttributes;\n        }\n    }\n\n    if(head in baseLayoutAttributes) return baseLayoutAttributes[head];\n\n    // Polar doesn't populate _modules or _basePlotModules\n    // just fall back on these when the others fail\n    if(head === 'radialaxis' || head === 'angularaxis') {\n        return polarAxisAttrs[head];\n    }\n    return polarAxisAttrs.layout[head] || false;\n}\n\nfunction recurseIntoValObject(valObject, parts, i) {\n    if(!valObject) return false;\n\n    if(valObject._isLinkedToArray) {\n        // skip array index, abort if we try to dive into an array without an index\n        if(isIndex(parts[i])) i++;\n        else if(i < parts.length) return false;\n    }\n\n    // now recurse as far as we can. Occasionally we have an attribute\n    // setting an internal part below what's in the schema; just return\n    // the innermost schema item we find.\n    for(; i < parts.length; i++) {\n        var newValObject = valObject[parts[i]];\n        if(isPlainObject(newValObject)) valObject = newValObject;\n        else break;\n\n        if(i === parts.length - 1) break;\n\n        if(valObject._isLinkedToArray) {\n            i++;\n            if(!isIndex(parts[i])) return false;\n        } else if(valObject.valType === 'info_array') {\n            i++;\n            var index = parts[i];\n            if(!isIndex(index)) return false;\n\n            var items = valObject.items;\n            if(Array.isArray(items)) {\n                if(index >= items.length) return false;\n                if(valObject.dimensions === 2) {\n                    i++;\n                    if(parts.length === i) return valObject;\n                    var index2 = parts[i];\n                    if(!isIndex(index2)) return false;\n                    valObject = items[index][index2];\n                } else valObject = items[index];\n            } else {\n                valObject = items;\n            }\n        }\n    }\n\n    return valObject;\n}\n\n// note: this is different from Lib.isIndex, this one doesn't accept numeric\n// strings, only actual numbers.\nfunction isIndex(val) {\n    return val === Math.round(val) && val >= 0;\n}\n\nfunction getTraceAttributes(type) {\n    var _module, basePlotModule;\n\n    if(type === 'area') {\n        _module = { attributes: polarAreaAttrs };\n        basePlotModule = {};\n    } else {\n        _module = Registry.modules[type]._module,\n        basePlotModule = _module.basePlotModule;\n    }\n\n    var attributes = {};\n\n    // make 'type' the first attribute in the object\n    attributes.type = null;\n\n    var copyBaseAttributes = extendDeepAll({}, baseAttributes);\n    var copyModuleAttributes = extendDeepAll({}, _module.attributes);\n\n    // prune global-level trace attributes that are already defined in a trace\n    exports.crawl(copyModuleAttributes, function(attr, attrName, attrs, level, fullAttrString) {\n        nestedProperty(copyBaseAttributes, fullAttrString).set(undefined);\n        // Prune undefined attributes\n        if(attr === undefined) nestedProperty(copyModuleAttributes, fullAttrString).set(undefined);\n    });\n\n    // base attributes (same for all trace types)\n    extendDeepAll(attributes, copyBaseAttributes);\n\n    // prune-out base attributes based on trace module categories\n    if(Registry.traceIs(type, 'noOpacity')) {\n        delete attributes.opacity;\n    }\n    if(!Registry.traceIs(type, 'showLegend')) {\n        delete attributes.showlegend;\n        delete attributes.legendgroup;\n    }\n    if(Registry.traceIs(type, 'noHover')) {\n        delete attributes.hoverinfo;\n        delete attributes.hoverlabel;\n    }\n    if(!_module.selectPoints) {\n        delete attributes.selectedpoints;\n    }\n\n    // module attributes\n    extendDeepAll(attributes, copyModuleAttributes);\n\n    // subplot attributes\n    if(basePlotModule.attributes) {\n        extendDeepAll(attributes, basePlotModule.attributes);\n    }\n\n    // 'type' gets overwritten by baseAttributes; reset it here\n    attributes.type = type;\n\n    var out = {\n        meta: _module.meta || {},\n        categories: _module.categories || {},\n        type: type,\n        attributes: formatAttributes(attributes),\n    };\n\n    // trace-specific layout attributes\n    if(_module.layoutAttributes) {\n        var layoutAttributes = {};\n\n        extendDeepAll(layoutAttributes, _module.layoutAttributes);\n        out.layoutAttributes = formatAttributes(layoutAttributes);\n    }\n\n    return out;\n}\n\nfunction getLayoutAttributes() {\n    var layoutAttributes = {};\n    var key, _module;\n\n    // global layout attributes\n    extendDeepAll(layoutAttributes, baseLayoutAttributes);\n\n    // add base plot module layout attributes\n    for(key in Registry.subplotsRegistry) {\n        _module = Registry.subplotsRegistry[key];\n\n        if(!_module.layoutAttributes) continue;\n\n        if(Array.isArray(_module.attr)) {\n            for(var i = 0; i < _module.attr.length; i++) {\n                handleBasePlotModule(layoutAttributes, _module, _module.attr[i]);\n            }\n        } else {\n            var astr = _module.attr === 'subplot' ? _module.name : _module.attr;\n            handleBasePlotModule(layoutAttributes, _module, astr);\n        }\n    }\n\n    // polar layout attributes\n    layoutAttributes = assignPolarLayoutAttrs(layoutAttributes);\n\n    // add registered components layout attributes\n    for(key in Registry.componentsRegistry) {\n        _module = Registry.componentsRegistry[key];\n        var schema = _module.schema;\n\n        if(schema && (schema.subplots || schema.layout)) {\n            /*\n             * Components with defined schema have already been merged in at register time\n             * but a few components define attributes that apply only to xaxis\n             * not yaxis (rangeselector, rangeslider) - delete from y schema.\n             * Note that the input attributes for xaxis/yaxis are the same object\n             * so it's not possible to only add them to xaxis from the start.\n             * If we ever have such asymmetry the other way, or anywhere else,\n             * we will need to extend both this code and mergeComponentAttrsToSubplot\n             * (which will not find yaxis only for example)\n             */\n            var subplots = schema.subplots;\n            if(subplots && subplots.xaxis && !subplots.yaxis) {\n                for(var xkey in subplots.xaxis) {\n                    delete layoutAttributes.yaxis[xkey];\n                }\n            }\n        } else if(_module.name === 'colorscale') {\n            extendDeepAll(layoutAttributes, _module.layoutAttributes);\n        } else if(_module.layoutAttributes) {\n            // older style without schema need to be explicitly merged in now\n            insertAttrs(layoutAttributes, _module.layoutAttributes, _module.name);\n        }\n    }\n\n    return {\n        layoutAttributes: formatAttributes(layoutAttributes)\n    };\n}\n\nfunction getTransformAttributes(type) {\n    var _module = Registry.transformsRegistry[type];\n    var attributes = extendDeepAll({}, _module.attributes);\n\n    // add registered components transform attributes\n    Object.keys(Registry.componentsRegistry).forEach(function(k) {\n        var _module = Registry.componentsRegistry[k];\n\n        if(_module.schema && _module.schema.transforms && _module.schema.transforms[type]) {\n            Object.keys(_module.schema.transforms[type]).forEach(function(v) {\n                insertAttrs(attributes, _module.schema.transforms[type][v], v);\n            });\n        }\n    });\n\n    return {\n        attributes: formatAttributes(attributes)\n    };\n}\n\nfunction getFramesAttributes() {\n    var attrs = {\n        frames: extendDeepAll({}, frameAttributes)\n    };\n\n    formatAttributes(attrs);\n\n    return attrs.frames;\n}\n\nfunction formatAttributes(attrs) {\n    mergeValTypeAndRole(attrs);\n    formatArrayContainers(attrs);\n    stringify(attrs);\n\n    return attrs;\n}\n\nfunction mergeValTypeAndRole(attrs) {\n    function makeSrcAttr(attrName) {\n        return {\n            valType: 'string',\n            \n            \n            editType: 'none'\n        };\n    }\n\n    function callback(attr, attrName, attrs) {\n        if(exports.isValObject(attr)) {\n            if(attr.valType === 'data_array') {\n                // all 'data_array' attrs have role 'data'\n                attr.role = 'data';\n                // all 'data_array' attrs have a corresponding 'src' attr\n                attrs[attrName + 'src'] = makeSrcAttr(attrName);\n            } else if(attr.arrayOk === true) {\n                // all 'arrayOk' attrs have a corresponding 'src' attr\n                attrs[attrName + 'src'] = makeSrcAttr(attrName);\n            }\n        } else if(isPlainObject(attr)) {\n            // all attrs container objects get role 'object'\n            attr.role = 'object';\n        }\n    }\n\n    exports.crawl(attrs, callback);\n}\n\nfunction formatArrayContainers(attrs) {\n    function callback(attr, attrName, attrs) {\n        if(!attr) return;\n\n        var itemName = attr[IS_LINKED_TO_ARRAY];\n\n        if(!itemName) return;\n\n        delete attr[IS_LINKED_TO_ARRAY];\n\n        attrs[attrName] = { items: {} };\n        attrs[attrName].items[itemName] = attr;\n        attrs[attrName].role = 'object';\n    }\n\n    exports.crawl(attrs, callback);\n}\n\n// this can take around 10ms and should only be run from PlotSchema.get(),\n// to ensure JSON.stringify(PlotSchema.get()) gives the intended result.\nfunction stringify(attrs) {\n    function walk(attr) {\n        for(var k in attr) {\n            if(isPlainObject(attr[k])) {\n                walk(attr[k]);\n            } else if(Array.isArray(attr[k])) {\n                for(var i = 0; i < attr[k].length; i++) {\n                    walk(attr[k][i]);\n                }\n            } else {\n                // as JSON.stringify(/test/) // => {}\n                if(attr[k] instanceof RegExp) {\n                    attr[k] = attr[k].toString();\n                }\n            }\n        }\n    }\n\n    walk(attrs);\n}\n\nfunction assignPolarLayoutAttrs(layoutAttributes) {\n    extendFlat(layoutAttributes, {\n        radialaxis: polarAxisAttrs.radialaxis,\n        angularaxis: polarAxisAttrs.angularaxis\n    });\n\n    extendFlat(layoutAttributes, polarAxisAttrs.layout);\n\n    return layoutAttributes;\n}\n\nfunction handleBasePlotModule(layoutAttributes, _module, astr) {\n    var np = nestedProperty(layoutAttributes, astr);\n    var attrs = extendDeepAll({}, _module.layoutAttributes);\n\n    attrs[IS_SUBPLOT_OBJ] = true;\n    np.set(attrs);\n}\n\nfunction insertAttrs(baseAttrs, newAttrs, astr) {\n    var np = nestedProperty(baseAttrs, astr);\n\n    np.set(extendDeepAll(np.get() || {}, newAttrs));\n}\n\n},{\"../lib\":703,\"../plots/animation_attributes\":746,\"../plots/attributes\":748,\"../plots/frame_attributes\":778,\"../plots/layout_attributes\":803,\"../plots/polar/legacy/area_attributes\":818,\"../plots/polar/legacy/axis_attributes\":819,\"../registry\":831,\"./edit_types\":734,\"./plot_config\":739}],741:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar plotAttributes = _dereq_('../plots/attributes');\n\nvar TEMPLATEITEMNAME = 'templateitemname';\n\nvar templateAttrs = {\n    name: {\n        valType: 'string',\n        \n        editType: 'none',\n        \n    }\n};\ntemplateAttrs[TEMPLATEITEMNAME] = {\n    valType: 'string',\n    \n    editType: 'calc',\n    \n};\n\n/**\n * templatedArray: decorate an attributes object with templating (and array)\n * properties.\n *\n * @param {string} name: the singular form of the array name. Sets\n *     `_isLinkedToArray` to this, so the schema knows to treat this as an array.\n * @param {object} attrs: the item attributes. Since all callers are expected\n *     to be constructing this object on the spot, we mutate it here for\n *     performance, rather than extending a new object with it.\n *\n * @returns {object}: the decorated `attrs` object\n */\nexports.templatedArray = function(name, attrs) {\n    attrs._isLinkedToArray = name;\n    attrs.name = templateAttrs.name;\n    attrs[TEMPLATEITEMNAME] = templateAttrs[TEMPLATEITEMNAME];\n    return attrs;\n};\n\n/**\n * traceTemplater: logic for matching traces to trace templates\n *\n * @param {object} dataTemplate: collection of {traceType: [{template}, ...]}\n *     ie each type the template applies to contains a list of template objects,\n *     to be provided cyclically to data traces of that type.\n *\n * @returns {object}: {newTrace}, a function:\n *     newTrace(traceIn): that takes the input traceIn, coerces its type, then\n *         uses that type to find the next template to apply. returns the output\n *         traceOut with template attached, ready to continue supplyDefaults.\n */\nexports.traceTemplater = function(dataTemplate) {\n    var traceCounts = {};\n    var traceType, typeTemplates;\n\n    for(traceType in dataTemplate) {\n        typeTemplates = dataTemplate[traceType];\n        if(Array.isArray(typeTemplates) && typeTemplates.length) {\n            traceCounts[traceType] = 0;\n        }\n    }\n\n    function newTrace(traceIn) {\n        traceType = Lib.coerce(traceIn, {}, plotAttributes, 'type');\n        var traceOut = {type: traceType, _template: null};\n        if(traceType in traceCounts) {\n            typeTemplates = dataTemplate[traceType];\n            // cycle through traces in the template set for this type\n            var typei = traceCounts[traceType] % typeTemplates.length;\n            traceCounts[traceType]++;\n            traceOut._template = typeTemplates[typei];\n        } else {\n            // TODO: anything we should do for types missing from the template?\n            // try to apply some other type? Or just bail as we do here?\n            // Actually I think yes, we should apply other types; would be nice\n            // if all scatter* could inherit from each other, and if histogram\n            // could inherit from bar, etc... but how to specify this? And do we\n            // compose them, or if a type is present require it to be complete?\n            // Actually this could apply to layout too - 3D annotations\n            // inheriting from 2D, axes of different types inheriting from each\n            // other...\n        }\n        return traceOut;\n    }\n\n    return {\n        newTrace: newTrace\n        // TODO: function to figure out what's left & what didn't work\n    };\n};\n\n/**\n * newContainer: Create a new sub-container inside `container` and propagate any\n * applicable template to it. If there's no template, still propagates\n * `undefined` so relinkPrivate will not retain an old template!\n *\n * @param {object} container: the outer container, should already have _template\n *     if there *is* a template for this plot\n * @param {string} name: the key of the new container to make\n * @param {string} baseName: if applicable, a base attribute to take the\n *     template from, ie for xaxis3 the base would be xaxis\n *\n * @returns {object}: an object for inclusion _full*, empty except for the\n *     appropriate template piece\n */\nexports.newContainer = function(container, name, baseName) {\n    var template = container._template;\n    var part = template && (template[name] || (baseName && template[baseName]));\n    if(!Lib.isPlainObject(part)) part = null;\n\n    var out = container[name] = {_template: part};\n    return out;\n};\n\n/**\n * arrayTemplater: special logic for templating both defaults and specific items\n * in a container array (annotations etc)\n *\n * @param {object} container: the outer container, should already have _template\n *     if there *is* a template for this plot\n * @param {string} name: the name of the array to template (ie 'annotations')\n *     will be used to find default ('annotationdefaults' object) and specific\n *     ('annotations' array) template specs.\n * @param {string} inclusionAttr: the attribute determining this item's\n *     inclusion in the output, usually 'visible' or 'enabled'\n *\n * @returns {object}: {newItem, defaultItems}, both functions:\n *     newItem(itemIn): create an output item, bare except for the correct\n *         template and name(s), as the base for supplyDefaults\n *     defaultItems(): to be called after all newItem calls, return any\n *         specific template items that have not already beeen included,\n *         also as bare output items ready for supplyDefaults.\n */\nexports.arrayTemplater = function(container, name, inclusionAttr) {\n    var template = container._template;\n    var defaultsTemplate = template && template[arrayDefaultKey(name)];\n    var templateItems = template && template[name];\n    if(!Array.isArray(templateItems) || !templateItems.length) {\n        templateItems = [];\n    }\n\n    var usedNames = {};\n\n    function newItem(itemIn) {\n        // include name and templateitemname in the output object for ALL\n        // container array items. Note: you could potentially use different\n        // name and templateitemname, if you're using one template to make\n        // another template. templateitemname would be the name in the original\n        // template, and name is the new \"subclassed\" item name.\n        var out = {name: itemIn.name, _input: itemIn};\n        var templateItemName = out[TEMPLATEITEMNAME] = itemIn[TEMPLATEITEMNAME];\n\n        // no itemname: use the default template\n        if(!validItemName(templateItemName)) {\n            out._template = defaultsTemplate;\n            return out;\n        }\n\n        // look for an item matching this itemname\n        // note these do not inherit from the default template, only the item.\n        for(var i = 0; i < templateItems.length; i++) {\n            var templateItem = templateItems[i];\n            if(templateItem.name === templateItemName) {\n                // Note: it's OK to use a template item more than once\n                // but using it at least once will stop it from generating\n                // a default item at the end.\n                usedNames[templateItemName] = 1;\n                out._template = templateItem;\n                return out;\n            }\n        }\n\n        // Didn't find a matching template item, so since this item is intended\n        // to only be modifications it's most likely broken. Hide it unless\n        // it's explicitly marked visible - in which case it gets NO template,\n        // not even the default.\n        out[inclusionAttr] = itemIn[inclusionAttr] || false;\n        // special falsy value we can look for in validateTemplate\n        out._template = false;\n        return out;\n    }\n\n    function defaultItems() {\n        var out = [];\n        for(var i = 0; i < templateItems.length; i++) {\n            var templateItem = templateItems[i];\n            var name = templateItem.name;\n            // only allow named items to be added as defaults,\n            // and only allow each name once\n            if(validItemName(name) && !usedNames[name]) {\n                var outi = {\n                    _template: templateItem,\n                    name: name,\n                    _input: {_templateitemname: name}\n                };\n                outi[TEMPLATEITEMNAME] = templateItem[TEMPLATEITEMNAME];\n                out.push(outi);\n                usedNames[name] = 1;\n            }\n        }\n        return out;\n    }\n\n    return {\n        newItem: newItem,\n        defaultItems: defaultItems\n    };\n};\n\nfunction validItemName(name) {\n    return name && typeof name === 'string';\n}\n\nfunction arrayDefaultKey(name) {\n    var lastChar = name.length - 1;\n    if(name.charAt(lastChar) !== 's') {\n        Lib.warn('bad argument to arrayDefaultKey: ' + name);\n    }\n    return name.substr(0, name.length - 1) + 'defaults';\n}\nexports.arrayDefaultKey = arrayDefaultKey;\n\n/**\n * arrayEditor: helper for editing array items that may have come from\n *     template defaults (in which case they will not exist in the input yet)\n *\n * @param {object} parentIn: the input container (eg gd.layout)\n * @param {string} containerStr: the attribute string for the container inside\n *     `parentIn`.\n * @param {object} itemOut: the _full* item (eg gd._fullLayout.annotations[0])\n *     that we'll be editing. Assumed to have been created by `arrayTemplater`.\n *\n * @returns {object}: {modifyBase, modifyItem, getUpdateObj, applyUpdate}, all functions:\n *     modifyBase(attr, value): Add an update that's *not* related to the item.\n *         `attr` is the full attribute string.\n *     modifyItem(attr, value): Add an update to the item. `attr` is just the\n *         portion of the attribute string inside the item.\n *     getUpdateObj(): Get the final constructed update object, to use in\n *         `restyle` or `relayout`. Also resets the update object in case this\n *         update was canceled.\n *     applyUpdate(attr, value): optionally add an update `attr: value`,\n *         then apply it to `parent` which should be the parent of `containerIn`,\n *         ie the object to which `containerStr` is the attribute string.\n */\nexports.arrayEditor = function(parentIn, containerStr, itemOut) {\n    var lengthIn = (Lib.nestedProperty(parentIn, containerStr).get() || []).length;\n    var index = itemOut._index;\n    // Check that we are indeed off the end of this container.\n    // Otherwise a devious user could put a key `_templateitemname` in their\n    // own input and break lots of things.\n    var templateItemName = (index >= lengthIn) && (itemOut._input || {})._templateitemname;\n    if(templateItemName) index = lengthIn;\n    var itemStr = containerStr + '[' + index + ']';\n\n    var update;\n    function resetUpdate() {\n        update = {};\n        if(templateItemName) {\n            update[itemStr] = {};\n            update[itemStr][TEMPLATEITEMNAME] = templateItemName;\n        }\n    }\n    resetUpdate();\n\n    function modifyBase(attr, value) {\n        update[attr] = value;\n    }\n\n    function modifyItem(attr, value) {\n        if(templateItemName) {\n            // we're making a new object: edit that object\n            Lib.nestedProperty(update[itemStr], attr).set(value);\n        } else {\n            // we're editing an existing object: include *just* the edit\n            update[itemStr + '.' + attr] = value;\n        }\n    }\n\n    function getUpdateObj() {\n        var updateOut = update;\n        resetUpdate();\n        return updateOut;\n    }\n\n    function applyUpdate(attr, value) {\n        if(attr) modifyItem(attr, value);\n        var updateToApply = getUpdateObj();\n        for(var key in updateToApply) {\n            Lib.nestedProperty(parentIn, key).set(updateToApply[key]);\n        }\n    }\n\n    return {\n        modifyBase: modifyBase,\n        modifyItem: modifyItem,\n        getUpdateObj: getUpdateObj,\n        applyUpdate: applyUpdate\n    };\n};\n\n},{\"../lib\":703,\"../plots/attributes\":748}],742:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Registry = _dereq_('../registry');\nvar Plots = _dereq_('../plots/plots');\n\nvar Lib = _dereq_('../lib');\nvar clearGlCanvases = _dereq_('../lib/clear_gl_canvases');\n\nvar Color = _dereq_('../components/color');\nvar Drawing = _dereq_('../components/drawing');\nvar Titles = _dereq_('../components/titles');\nvar ModeBar = _dereq_('../components/modebar');\n\nvar Axes = _dereq_('../plots/cartesian/axes');\nvar alignmentConstants = _dereq_('../constants/alignment');\nvar axisConstraints = _dereq_('../plots/cartesian/constraints');\nvar enforceAxisConstraints = axisConstraints.enforce;\nvar cleanAxisConstraints = axisConstraints.clean;\nvar doAutoRange = _dereq_('../plots/cartesian/autorange').doAutoRange;\n\nvar SVG_TEXT_ANCHOR_START = 'start';\nvar SVG_TEXT_ANCHOR_MIDDLE = 'middle';\nvar SVG_TEXT_ANCHOR_END = 'end';\n\nexports.layoutStyles = function(gd) {\n    return Lib.syncOrAsync([Plots.doAutoMargin, lsInner], gd);\n};\n\nfunction overlappingDomain(xDomain, yDomain, domains) {\n    for(var i = 0; i < domains.length; i++) {\n        var existingX = domains[i][0];\n        var existingY = domains[i][1];\n\n        if(existingX[0] >= xDomain[1] || existingX[1] <= xDomain[0]) {\n            continue;\n        }\n        if(existingY[0] < yDomain[1] && existingY[1] > yDomain[0]) {\n            return true;\n        }\n    }\n    return false;\n}\n\nfunction lsInner(gd) {\n    var fullLayout = gd._fullLayout;\n    var gs = fullLayout._size;\n    var pad = gs.p;\n    var axList = Axes.list(gd, '', true);\n    var i, subplot, plotinfo, ax, xa, ya;\n\n    fullLayout._paperdiv.style({\n        width: (gd._context.responsive && fullLayout.autosize && !gd._context._hasZeroWidth && !gd.layout.width) ? '100%' : fullLayout.width + 'px',\n        height: (gd._context.responsive && fullLayout.autosize && !gd._context._hasZeroHeight && !gd.layout.height) ? '100%' : fullLayout.height + 'px'\n    })\n    .selectAll('.main-svg')\n    .call(Drawing.setSize, fullLayout.width, fullLayout.height);\n    gd._context.setBackground(gd, fullLayout.paper_bgcolor);\n\n    exports.drawMainTitle(gd);\n    ModeBar.manage(gd);\n\n    // _has('cartesian') means SVG specifically, not GL2D - but GL2D\n    // can still get here because it makes some of the SVG structure\n    // for shared features like selections.\n    if(!fullLayout._has('cartesian')) {\n        return gd._promises.length && Promise.all(gd._promises);\n    }\n\n    function getLinePosition(ax, counterAx, side) {\n        var lwHalf = ax._lw / 2;\n\n        if(ax._id.charAt(0) === 'x') {\n            if(!counterAx) return gs.t + gs.h * (1 - (ax.position || 0)) + (lwHalf % 1);\n            else if(side === 'top') return counterAx._offset - pad - lwHalf;\n            return counterAx._offset + counterAx._length + pad + lwHalf;\n        }\n\n        if(!counterAx) return gs.l + gs.w * (ax.position || 0) + (lwHalf % 1);\n        else if(side === 'right') return counterAx._offset + counterAx._length + pad + lwHalf;\n        return counterAx._offset - pad - lwHalf;\n    }\n\n    // some preparation of axis position info\n    for(i = 0; i < axList.length; i++) {\n        ax = axList[i];\n\n        var counterAx = ax._anchorAxis;\n\n        // clear axis line positions, to be set in the subplot loop below\n        ax._linepositions = {};\n\n        // stash crispRounded linewidth so we don't need to pass gd all over the place\n        ax._lw = Drawing.crispRound(gd, ax.linewidth, 1);\n\n        // figure out the main axis line and main mirror line position.\n        // it's easier to follow the logic if we handle these separately from\n        // ax._linepositions, which are only used by mirror=allticks\n        // for non-main-subplot ticks, and mirror=all(ticks)? for zero line\n        // hiding logic\n        ax._mainLinePosition = getLinePosition(ax, counterAx, ax.side);\n        ax._mainMirrorPosition = (ax.mirror && counterAx) ?\n            getLinePosition(ax, counterAx,\n                alignmentConstants.OPPOSITE_SIDE[ax.side]) : null;\n    }\n\n    // figure out which backgrounds we need to draw,\n    // and in which layers to put them\n    var lowerBackgroundIDs = [];\n    var backgroundIds = [];\n    var lowerDomains = [];\n    // no need to draw background when paper and plot color are the same color,\n    // activate mode just for large splom (which benefit the most from this\n    // optimization), but this could apply to all cartesian subplots.\n    var noNeedForBg = (\n        Color.opacity(fullLayout.paper_bgcolor) === 1 &&\n        Color.opacity(fullLayout.plot_bgcolor) === 1 &&\n        fullLayout.paper_bgcolor === fullLayout.plot_bgcolor\n    );\n\n    for(subplot in fullLayout._plots) {\n        plotinfo = fullLayout._plots[subplot];\n\n        if(plotinfo.mainplot) {\n            // mainplot is a reference to the main plot this one is overlaid on\n            // so if it exists, this is an overlaid plot and we don't need to\n            // give it its own background\n            if(plotinfo.bg) {\n                plotinfo.bg.remove();\n            }\n            plotinfo.bg = undefined;\n        } else {\n            var xDomain = plotinfo.xaxis.domain;\n            var yDomain = plotinfo.yaxis.domain;\n            var plotgroup = plotinfo.plotgroup;\n\n            if(overlappingDomain(xDomain, yDomain, lowerDomains)) {\n                var pgNode = plotgroup.node();\n                var plotgroupBg = plotinfo.bg = Lib.ensureSingle(plotgroup, 'rect', 'bg');\n                pgNode.insertBefore(plotgroupBg.node(), pgNode.childNodes[0]);\n                backgroundIds.push(subplot);\n            } else {\n                plotgroup.select('rect.bg').remove();\n                lowerDomains.push([xDomain, yDomain]);\n                if(!noNeedForBg) {\n                    lowerBackgroundIDs.push(subplot);\n                    backgroundIds.push(subplot);\n                }\n            }\n        }\n    }\n\n    // now create all the lower-layer backgrounds at once now that\n    // we have the list of subplots that need them\n    var lowerBackgrounds = fullLayout._bgLayer.selectAll('.bg')\n        .data(lowerBackgroundIDs);\n\n    lowerBackgrounds.enter().append('rect')\n        .classed('bg', true);\n\n    lowerBackgrounds.exit().remove();\n\n    lowerBackgrounds.each(function(subplot) {\n        fullLayout._plots[subplot].bg = d3.select(this);\n    });\n\n    // style all backgrounds\n    for(i = 0; i < backgroundIds.length; i++) {\n        plotinfo = fullLayout._plots[backgroundIds[i]];\n        xa = plotinfo.xaxis;\n        ya = plotinfo.yaxis;\n\n        if(plotinfo.bg) {\n            plotinfo.bg\n                .call(Drawing.setRect,\n                    xa._offset - pad, ya._offset - pad,\n                    xa._length + 2 * pad, ya._length + 2 * pad)\n                .call(Color.fill, fullLayout.plot_bgcolor)\n                .style('stroke-width', 0);\n        }\n    }\n\n    if(!fullLayout._hasOnlyLargeSploms) {\n        for(subplot in fullLayout._plots) {\n            plotinfo = fullLayout._plots[subplot];\n            xa = plotinfo.xaxis;\n            ya = plotinfo.yaxis;\n\n            // Clip so that data only shows up on the plot area.\n            var clipId = plotinfo.clipId = 'clip' + fullLayout._uid + subplot + 'plot';\n\n            var plotClip = Lib.ensureSingleById(fullLayout._clips, 'clipPath', clipId, function(s) {\n                s.classed('plotclip', true)\n                    .append('rect');\n            });\n\n            plotinfo.clipRect = plotClip.select('rect').attr({\n                width: xa._length,\n                height: ya._length\n            });\n\n            Drawing.setTranslate(plotinfo.plot, xa._offset, ya._offset);\n\n            var plotClipId;\n            var layerClipId;\n\n            if(plotinfo._hasClipOnAxisFalse) {\n                plotClipId = null;\n                layerClipId = clipId;\n            } else {\n                plotClipId = clipId;\n                layerClipId = null;\n            }\n\n            Drawing.setClipUrl(plotinfo.plot, plotClipId, gd);\n\n            // stash layer clipId value (null or same as clipId)\n            // to DRY up Drawing.setClipUrl calls on trace-module and trace layers\n            // downstream\n            plotinfo.layerClipId = layerClipId;\n        }\n    }\n\n    var xLinesXLeft, xLinesXRight, xLinesYBottom, xLinesYTop,\n        leftYLineWidth, rightYLineWidth;\n    var yLinesYBottom, yLinesYTop, yLinesXLeft, yLinesXRight,\n        connectYBottom, connectYTop;\n    var extraSubplot;\n\n    function xLinePath(y) {\n        return 'M' + xLinesXLeft + ',' + y + 'H' + xLinesXRight;\n    }\n\n    function xLinePathFree(y) {\n        return 'M' + xa._offset + ',' + y + 'h' + xa._length;\n    }\n\n    function yLinePath(x) {\n        return 'M' + x + ',' + yLinesYTop + 'V' + yLinesYBottom;\n    }\n\n    function yLinePathFree(x) {\n        return 'M' + x + ',' + ya._offset + 'v' + ya._length;\n    }\n\n    function mainPath(ax, pathFn, pathFnFree) {\n        if(!ax.showline || subplot !== ax._mainSubplot) return '';\n        if(!ax._anchorAxis) return pathFnFree(ax._mainLinePosition);\n        var out = pathFn(ax._mainLinePosition);\n        if(ax.mirror) out += pathFn(ax._mainMirrorPosition);\n        return out;\n    }\n\n    for(subplot in fullLayout._plots) {\n        plotinfo = fullLayout._plots[subplot];\n        xa = plotinfo.xaxis;\n        ya = plotinfo.yaxis;\n\n        /*\n         * x lines get longer where they meet y lines, to make a crisp corner.\n         * The x lines get the padding (margin.pad) plus the y line width to\n         * fill up the corner nicely. Free x lines are excluded - they always\n         * span exactly the data area of the plot\n         *\n         *  | XXXXX\n         *  | XXXXX\n         *  |\n         *  +------\n         *     x1\n         *    -----\n         *     x2\n         */\n        var xPath = 'M0,0';\n        if(shouldShowLinesOrTicks(xa, subplot)) {\n            leftYLineWidth = findCounterAxisLineWidth(xa, 'left', ya, axList);\n            xLinesXLeft = xa._offset - (leftYLineWidth ? (pad + leftYLineWidth) : 0);\n            rightYLineWidth = findCounterAxisLineWidth(xa, 'right', ya, axList);\n            xLinesXRight = xa._offset + xa._length + (rightYLineWidth ? (pad + rightYLineWidth) : 0);\n            xLinesYBottom = getLinePosition(xa, ya, 'bottom');\n            xLinesYTop = getLinePosition(xa, ya, 'top');\n\n            // save axis line positions for extra ticks to reference\n            // each subplot that gets ticks from \"allticks\" gets an entry:\n            //    [left or bottom, right or top]\n            extraSubplot = (!xa._anchorAxis || subplot !== xa._mainSubplot);\n            if(extraSubplot && (xa.mirror === 'allticks' || xa.mirror === 'all')) {\n                xa._linepositions[subplot] = [xLinesYBottom, xLinesYTop];\n            }\n\n            xPath = mainPath(xa, xLinePath, xLinePathFree);\n            if(extraSubplot && xa.showline && (xa.mirror === 'all' || xa.mirror === 'allticks')) {\n                xPath += xLinePath(xLinesYBottom) + xLinePath(xLinesYTop);\n            }\n\n            plotinfo.xlines\n                .style('stroke-width', xa._lw + 'px')\n                .call(Color.stroke, xa.showline ?\n                    xa.linecolor : 'rgba(0,0,0,0)');\n        }\n        plotinfo.xlines.attr('d', xPath);\n\n        /*\n         * y lines that meet x axes get longer only by margin.pad, because\n         * the x axes fill in the corner space. Free y axes, like free x axes,\n         * always span exactly the data area of the plot\n         *\n         *   |   | XXXX\n         * y2| y1| XXXX\n         *   |   | XXXX\n         *       |\n         *       +-----\n         */\n        var yPath = 'M0,0';\n        if(shouldShowLinesOrTicks(ya, subplot)) {\n            connectYBottom = findCounterAxisLineWidth(ya, 'bottom', xa, axList);\n            yLinesYBottom = ya._offset + ya._length + (connectYBottom ? pad : 0);\n            connectYTop = findCounterAxisLineWidth(ya, 'top', xa, axList);\n            yLinesYTop = ya._offset - (connectYTop ? pad : 0);\n            yLinesXLeft = getLinePosition(ya, xa, 'left');\n            yLinesXRight = getLinePosition(ya, xa, 'right');\n\n            extraSubplot = (!ya._anchorAxis || subplot !== ya._mainSubplot);\n            if(extraSubplot && (ya.mirror === 'allticks' || ya.mirror === 'all')) {\n                ya._linepositions[subplot] = [yLinesXLeft, yLinesXRight];\n            }\n\n            yPath = mainPath(ya, yLinePath, yLinePathFree);\n            if(extraSubplot && ya.showline && (ya.mirror === 'all' || ya.mirror === 'allticks')) {\n                yPath += yLinePath(yLinesXLeft) + yLinePath(yLinesXRight);\n            }\n\n            plotinfo.ylines\n                .style('stroke-width', ya._lw + 'px')\n                .call(Color.stroke, ya.showline ?\n                    ya.linecolor : 'rgba(0,0,0,0)');\n        }\n        plotinfo.ylines.attr('d', yPath);\n    }\n\n    Axes.makeClipPaths(gd);\n\n    return gd._promises.length && Promise.all(gd._promises);\n}\n\nfunction shouldShowLinesOrTicks(ax, subplot) {\n    return (ax.ticks || ax.showline) &&\n        (subplot === ax._mainSubplot || ax.mirror === 'all' || ax.mirror === 'allticks');\n}\n\n/*\n * should we draw a line on counterAx at this side of ax?\n * It's assumed that counterAx is known to overlay the subplot we're working on\n * but it may not be its main axis.\n */\nfunction shouldShowLineThisSide(ax, side, counterAx) {\n    // does counterAx get a line at all?\n    if(!counterAx.showline || !counterAx._lw) return false;\n\n    // are we drawing *all* lines for counterAx?\n    if(counterAx.mirror === 'all' || counterAx.mirror === 'allticks') return true;\n\n    var anchorAx = counterAx._anchorAxis;\n\n    // is this a free axis? free axes can only have a subplot side-line with all(ticks)? mirroring\n    if(!anchorAx) return false;\n\n    // in order to handle cases where the user forgot to anchor this axis correctly\n    // (because its default anchor has the same domain on the relevant end)\n    // check whether the relevant position is the same.\n    var sideIndex = alignmentConstants.FROM_BL[side];\n    if(counterAx.side === side) {\n        return anchorAx.domain[sideIndex] === ax.domain[sideIndex];\n    }\n    return counterAx.mirror && anchorAx.domain[1 - sideIndex] === ax.domain[1 - sideIndex];\n}\n\n/*\n * Is there another axis intersecting `side` end of `ax`?\n * First look at `counterAx` (the axis for this subplot),\n * then at all other potential counteraxes on or overlaying this subplot.\n * Take the line width from the first one that has a line.\n */\nfunction findCounterAxisLineWidth(ax, side, counterAx, axList) {\n    if(shouldShowLineThisSide(ax, side, counterAx)) {\n        return counterAx._lw;\n    }\n    for(var i = 0; i < axList.length; i++) {\n        var axi = axList[i];\n        if(axi._mainAxis === counterAx._mainAxis && shouldShowLineThisSide(ax, side, axi)) {\n            return axi._lw;\n        }\n    }\n    return 0;\n}\n\nexports.drawMainTitle = function(gd) {\n    var fullLayout = gd._fullLayout;\n\n    var textAnchor = getMainTitleTextAnchor(fullLayout);\n    var dy = getMainTitleDy(fullLayout);\n\n    Titles.draw(gd, 'gtitle', {\n        propContainer: fullLayout,\n        propName: 'title.text',\n        placeholder: fullLayout._dfltTitle.plot,\n        attributes: {\n            x: getMainTitleX(fullLayout, textAnchor),\n            y: getMainTitleY(fullLayout, dy),\n            'text-anchor': textAnchor,\n            dy: dy\n        }\n    });\n};\n\nfunction getMainTitleX(fullLayout, textAnchor) {\n    var title = fullLayout.title;\n    var gs = fullLayout._size;\n    var hPadShift = 0;\n\n    if(textAnchor === SVG_TEXT_ANCHOR_START) {\n        hPadShift = title.pad.l;\n    } else if(textAnchor === SVG_TEXT_ANCHOR_END) {\n        hPadShift = -title.pad.r;\n    }\n\n    switch(title.xref) {\n        case 'paper':\n            return gs.l + gs.w * title.x + hPadShift;\n        case 'container':\n        default:\n            return fullLayout.width * title.x + hPadShift;\n    }\n}\n\nfunction getMainTitleY(fullLayout, dy) {\n    var title = fullLayout.title;\n    var gs = fullLayout._size;\n    var vPadShift = 0;\n\n    if(dy === '0em' || !dy) {\n        vPadShift = -title.pad.b;\n    } else if(dy === alignmentConstants.CAP_SHIFT + 'em') {\n        vPadShift = title.pad.t;\n    }\n\n    if(title.y === 'auto') {\n        return gs.t / 2;\n    } else {\n        switch(title.yref) {\n            case 'paper':\n                return gs.t + gs.h - gs.h * title.y + vPadShift;\n            case 'container':\n            default:\n                return fullLayout.height - fullLayout.height * title.y + vPadShift;\n        }\n    }\n}\n\nfunction getMainTitleTextAnchor(fullLayout) {\n    var title = fullLayout.title;\n\n    var textAnchor = SVG_TEXT_ANCHOR_MIDDLE;\n    if(Lib.isRightAnchor(title)) {\n        textAnchor = SVG_TEXT_ANCHOR_END;\n    } else if(Lib.isLeftAnchor(title)) {\n        textAnchor = SVG_TEXT_ANCHOR_START;\n    }\n\n    return textAnchor;\n}\n\nfunction getMainTitleDy(fullLayout) {\n    var title = fullLayout.title;\n\n    var dy = '0em';\n    if(Lib.isTopAnchor(title)) {\n        dy = alignmentConstants.CAP_SHIFT + 'em';\n    } else if(Lib.isMiddleAnchor(title)) {\n        dy = alignmentConstants.MID_SHIFT + 'em';\n    }\n\n    return dy;\n}\n\nexports.doTraceStyle = function(gd) {\n    var calcdata = gd.calcdata;\n    var editStyleCalls = [];\n    var i;\n\n    for(i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var cd0 = cd[0] || {};\n        var trace = cd0.trace || {};\n        var _module = trace._module || {};\n\n        // See if we need to do arraysToCalcdata\n        // call it regardless of what change we made, in case\n        // supplyDefaults brought in an array that was already\n        // in gd.data but not in gd._fullData previously\n        var arraysToCalcdata = _module.arraysToCalcdata;\n        if(arraysToCalcdata) arraysToCalcdata(cd, trace);\n\n        var editStyle = _module.editStyle;\n        if(editStyle) editStyleCalls.push({fn: editStyle, cd0: cd0});\n    }\n\n    if(editStyleCalls.length) {\n        for(i = 0; i < editStyleCalls.length; i++) {\n            var edit = editStyleCalls[i];\n            edit.fn(gd, edit.cd0);\n        }\n        clearGlCanvases(gd);\n        exports.redrawReglTraces(gd);\n    }\n\n    Plots.style(gd);\n    Registry.getComponentMethod('legend', 'draw')(gd);\n\n    return Plots.previousPromises(gd);\n};\n\nexports.doColorBars = function(gd) {\n    Registry.getComponentMethod('colorbar', 'draw')(gd);\n    return Plots.previousPromises(gd);\n};\n\n// force plot() to redo the layout and replot with the modified layout\nexports.layoutReplot = function(gd) {\n    var layout = gd.layout;\n    gd.layout = undefined;\n    return Registry.call('plot', gd, '', layout);\n};\n\nexports.doLegend = function(gd) {\n    Registry.getComponentMethod('legend', 'draw')(gd);\n    return Plots.previousPromises(gd);\n};\n\nexports.doTicksRelayout = function(gd) {\n    Axes.draw(gd, 'redraw');\n\n    if(gd._fullLayout._hasOnlyLargeSploms) {\n        Registry.subplotsRegistry.splom.updateGrid(gd);\n        clearGlCanvases(gd);\n        exports.redrawReglTraces(gd);\n    }\n\n    exports.drawMainTitle(gd);\n    return Plots.previousPromises(gd);\n};\n\nexports.doModeBar = function(gd) {\n    var fullLayout = gd._fullLayout;\n\n    ModeBar.manage(gd);\n\n    for(var i = 0; i < fullLayout._basePlotModules.length; i++) {\n        var updateFx = fullLayout._basePlotModules[i].updateFx;\n        if(updateFx) updateFx(gd);\n    }\n\n    return Plots.previousPromises(gd);\n};\n\nexports.doCamera = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var sceneIds = fullLayout._subplots.gl3d;\n\n    for(var i = 0; i < sceneIds.length; i++) {\n        var sceneLayout = fullLayout[sceneIds[i]];\n        var scene = sceneLayout._scene;\n\n        var cameraData = sceneLayout.camera;\n        scene.setCamera(cameraData);\n    }\n};\n\nexports.drawData = function(gd) {\n    var fullLayout = gd._fullLayout;\n\n    clearGlCanvases(gd);\n\n    // loop over the base plot modules present on graph\n    var basePlotModules = fullLayout._basePlotModules;\n    for(var i = 0; i < basePlotModules.length; i++) {\n        basePlotModules[i].plot(gd);\n    }\n\n    exports.redrawReglTraces(gd);\n\n    // styling separate from drawing\n    Plots.style(gd);\n\n    // show annotations and shapes\n    Registry.getComponentMethod('shapes', 'draw')(gd);\n    Registry.getComponentMethod('annotations', 'draw')(gd);\n\n    // Mark the first render as complete\n    fullLayout._replotting = false;\n\n    return Plots.previousPromises(gd);\n};\n\n// Draw (or redraw) all regl-based traces in one go,\n// useful during drag and selection where buffers of targeted traces are updated,\n// but all traces need to be redrawn following clearGlCanvases.\n//\n// Note that _module.plot for regl trace does NOT draw things\n// on the canvas, they only update the buffers.\n// Drawing is perform here.\n//\n// TODO try adding per-subplot option using gl.SCISSOR_TEST for\n// non-overlaying, disjoint subplots.\n//\n// TODO try to include parcoords in here.\n// https://github.com/plotly/plotly.js/issues/3069\nexports.redrawReglTraces = function(gd) {\n    var fullLayout = gd._fullLayout;\n\n    if(fullLayout._has('regl')) {\n        var fullData = gd._fullData;\n        var cartesianIds = [];\n        var polarIds = [];\n        var i, sp;\n\n        if(fullLayout._hasOnlyLargeSploms) {\n            fullLayout._splomGrid.draw();\n        }\n\n        // N.B.\n        // - Loop over fullData (not _splomScenes) to preserve splom trace-to-trace ordering\n        // - Fill list if subplot ids (instead of fullLayout._subplots) to handle cases where all traces\n        //   of a given module are `visible !== true`\n        for(i = 0; i < fullData.length; i++) {\n            var trace = fullData[i];\n\n            if(trace.visible === true && trace._length !== 0) {\n                if(trace.type === 'splom') {\n                    fullLayout._splomScenes[trace.uid].draw();\n                } else if(trace.type === 'scattergl') {\n                    Lib.pushUnique(cartesianIds, trace.xaxis + trace.yaxis);\n                } else if(trace.type === 'scatterpolargl') {\n                    Lib.pushUnique(polarIds, trace.subplot);\n                }\n            }\n        }\n\n        for(i = 0; i < cartesianIds.length; i++) {\n            sp = fullLayout._plots[cartesianIds[i]];\n            if(sp._scene) sp._scene.draw();\n        }\n\n        for(i = 0; i < polarIds.length; i++) {\n            sp = fullLayout[polarIds[i]]._subplot;\n            if(sp._scene) sp._scene.draw();\n        }\n    }\n};\n\nexports.doAutoRangeAndConstraints = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var axList = Axes.list(gd, '', true);\n    var matchGroups = fullLayout._axisMatchGroups || [];\n    var ax;\n    var axRng;\n\n    for(var i = 0; i < axList.length; i++) {\n        ax = axList[i];\n        cleanAxisConstraints(gd, ax);\n        doAutoRange(gd, ax);\n    }\n\n    enforceAxisConstraints(gd);\n\n    groupLoop:\n    for(var j = 0; j < matchGroups.length; j++) {\n        var group = matchGroups[j];\n        var rng = null;\n        var id;\n\n        for(id in group) {\n            ax = Axes.getFromId(gd, id);\n            if(ax.autorange === false) continue groupLoop;\n\n            axRng = Lib.simpleMap(ax.range, ax.r2l);\n            if(rng) {\n                if(rng[0] < rng[1]) {\n                    rng[0] = Math.min(rng[0], axRng[0]);\n                    rng[1] = Math.max(rng[1], axRng[1]);\n                } else {\n                    rng[0] = Math.max(rng[0], axRng[0]);\n                    rng[1] = Math.min(rng[1], axRng[1]);\n                }\n            } else {\n                rng = axRng;\n            }\n        }\n\n        for(id in group) {\n            ax = Axes.getFromId(gd, id);\n            ax.range = Lib.simpleMap(rng, ax.l2r);\n            ax._input.range = ax.range.slice();\n            ax.setScale();\n        }\n    }\n};\n\n// An initial paint must be completed before these components can be\n// correctly sized and the whole plot re-margined. fullLayout._replotting must\n// be set to false before these will work properly.\nexports.finalDraw = function(gd) {\n    Registry.getComponentMethod('shapes', 'draw')(gd);\n    Registry.getComponentMethod('images', 'draw')(gd);\n    Registry.getComponentMethod('annotations', 'draw')(gd);\n    // TODO: rangesliders really belong in marginPushers but they need to be\n    // drawn after data - can we at least get the margin pushing part separated\n    // out and done earlier?\n    Registry.getComponentMethod('rangeslider', 'draw')(gd);\n    // TODO: rangeselector only needs to be here (in addition to drawMarginPushers)\n    // because the margins need to be fully determined before we can call\n    // autorange and update axis ranges (which rangeselector needs to know which\n    // button is active). Can we break out its automargin step from its draw step?\n    Registry.getComponentMethod('rangeselector', 'draw')(gd);\n};\n\nexports.drawMarginPushers = function(gd) {\n    Registry.getComponentMethod('legend', 'draw')(gd);\n    Registry.getComponentMethod('rangeselector', 'draw')(gd);\n    Registry.getComponentMethod('sliders', 'draw')(gd);\n    Registry.getComponentMethod('updatemenus', 'draw')(gd);\n    Registry.getComponentMethod('colorbar', 'draw')(gd);\n};\n\n},{\"../components/color\":580,\"../components/drawing\":601,\"../components/modebar\":639,\"../components/titles\":668,\"../constants/alignment\":675,\"../lib\":703,\"../lib/clear_gl_canvases\":688,\"../plots/cartesian/autorange\":750,\"../plots/cartesian/axes\":751,\"../plots/cartesian/constraints\":758,\"../plots/plots\":812,\"../registry\":831,\"d3\":157}],743:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar isPlainObject = Lib.isPlainObject;\nvar PlotSchema = _dereq_('./plot_schema');\nvar Plots = _dereq_('../plots/plots');\nvar plotAttributes = _dereq_('../plots/attributes');\nvar Template = _dereq_('./plot_template');\nvar dfltConfig = _dereq_('./plot_config').dfltConfig;\n\n/**\n * Plotly.makeTemplate: create a template off an existing figure to reuse\n * style attributes on other figures.\n *\n * Note: separated from the rest of templates because otherwise we get circular\n * references due to PlotSchema.\n *\n * @param {object|DOM element|string} figure: The figure to base the template on\n *     should contain a trace array `figure.data`\n *     and a layout object `figure.layout`\n * @returns {object} template: the extracted template - can then be used as\n *     `layout.template` in another figure.\n */\nexports.makeTemplate = function(figure) {\n    figure = Lib.isPlainObject(figure) ? figure : Lib.getGraphDiv(figure);\n    figure = Lib.extendDeep({_context: dfltConfig}, {data: figure.data, layout: figure.layout});\n    Plots.supplyDefaults(figure);\n    var data = figure.data || [];\n    var layout = figure.layout || {};\n    // copy over a few items to help follow the schema\n    layout._basePlotModules = figure._fullLayout._basePlotModules;\n    layout._modules = figure._fullLayout._modules;\n\n    var template = {\n        data: {},\n        layout: {}\n    };\n\n    /*\n     * Note: we do NOT validate template values, we just take what's in the\n     * user inputs data and layout, not the validated values in fullData and\n     * fullLayout. Even if we were to validate here, there's no guarantee that\n     * these values would still be valid when applied to a new figure, which\n     * may contain different trace modes, different axes, etc. So it's\n     * important that when applying a template we still validate the template\n     * values, rather than just using them as defaults.\n     */\n\n    data.forEach(function(trace) {\n        // TODO: What if no style info is extracted for this trace. We may\n        // not want an empty object as the null value.\n        // TODO: allow transforms to contribute to templates?\n        // as it stands they are ignored, which may be for the best...\n\n        var traceTemplate = {};\n        walkStyleKeys(trace, traceTemplate, getTraceInfo.bind(null, trace));\n\n        var traceType = Lib.coerce(trace, {}, plotAttributes, 'type');\n        var typeTemplates = template.data[traceType];\n        if(!typeTemplates) typeTemplates = template.data[traceType] = [];\n        typeTemplates.push(traceTemplate);\n    });\n\n    walkStyleKeys(layout, template.layout, getLayoutInfo.bind(null, layout));\n\n    /*\n     * Compose the new template with an existing one to the same effect\n     *\n     * NOTE: there's a possibility of slightly different behavior: if the plot\n     * has an invalid value and the old template has a valid value for the same\n     * attribute, the plot will use the old template value but this routine\n     * will pull the invalid value (resulting in the original default).\n     * In the general case it's not possible to solve this with a single value,\n     * since valid options can be context-dependent. It could be solved with\n     * a *list* of values, but that would be huge complexity for little gain.\n     */\n    delete template.layout.template;\n    var oldTemplate = layout.template;\n    if(isPlainObject(oldTemplate)) {\n        var oldLayoutTemplate = oldTemplate.layout;\n\n        var i, traceType, oldTypeTemplates, oldTypeLen, typeTemplates, typeLen;\n\n        if(isPlainObject(oldLayoutTemplate)) {\n            mergeTemplates(oldLayoutTemplate, template.layout);\n        }\n        var oldDataTemplate = oldTemplate.data;\n        if(isPlainObject(oldDataTemplate)) {\n            for(traceType in template.data) {\n                oldTypeTemplates = oldDataTemplate[traceType];\n                if(Array.isArray(oldTypeTemplates)) {\n                    typeTemplates = template.data[traceType];\n                    typeLen = typeTemplates.length;\n                    oldTypeLen = oldTypeTemplates.length;\n                    for(i = 0; i < typeLen; i++) {\n                        mergeTemplates(oldTypeTemplates[i % oldTypeLen], typeTemplates[i]);\n                    }\n                    for(i = typeLen; i < oldTypeLen; i++) {\n                        typeTemplates.push(Lib.extendDeep({}, oldTypeTemplates[i]));\n                    }\n                }\n            }\n            for(traceType in oldDataTemplate) {\n                if(!(traceType in template.data)) {\n                    template.data[traceType] = Lib.extendDeep([], oldDataTemplate[traceType]);\n                }\n            }\n        }\n    }\n\n    return template;\n};\n\nfunction mergeTemplates(oldTemplate, newTemplate) {\n    // we don't care about speed here, just make sure we have a totally\n    // distinct object from the previous template\n    oldTemplate = Lib.extendDeep({}, oldTemplate);\n\n    // sort keys so we always get annotationdefaults before annotations etc\n    // so arrayTemplater will work right\n    var oldKeys = Object.keys(oldTemplate).sort();\n    var i, j;\n\n    function mergeOne(oldVal, newVal, key) {\n        if(isPlainObject(newVal) && isPlainObject(oldVal)) {\n            mergeTemplates(oldVal, newVal);\n        } else if(Array.isArray(newVal) && Array.isArray(oldVal)) {\n            // Note: omitted `inclusionAttr` from arrayTemplater here,\n            // it's irrelevant as we only want the resulting `_template`.\n            var templater = Template.arrayTemplater({_template: oldTemplate}, key);\n            for(j = 0; j < newVal.length; j++) {\n                var item = newVal[j];\n                var oldItem = templater.newItem(item)._template;\n                if(oldItem) mergeTemplates(oldItem, item);\n            }\n            var defaultItems = templater.defaultItems();\n            for(j = 0; j < defaultItems.length; j++) newVal.push(defaultItems[j]._template);\n\n            // templateitemname only applies to receiving plots\n            for(j = 0; j < newVal.length; j++) delete newVal[j].templateitemname;\n        }\n    }\n\n    for(i = 0; i < oldKeys.length; i++) {\n        var key = oldKeys[i];\n        var oldVal = oldTemplate[key];\n        if(key in newTemplate) {\n            mergeOne(oldVal, newTemplate[key], key);\n        } else newTemplate[key] = oldVal;\n\n        // if this is a base key from the old template (eg xaxis), look for\n        // extended keys (eg xaxis2) in the new template to merge into\n        if(getBaseKey(key) === key) {\n            for(var key2 in newTemplate) {\n                var baseKey2 = getBaseKey(key2);\n                if(key2 !== baseKey2 && baseKey2 === key && !(key2 in oldTemplate)) {\n                    mergeOne(oldVal, newTemplate[key2], key);\n                }\n            }\n        }\n    }\n}\n\nfunction getBaseKey(key) {\n    return key.replace(/[0-9]+$/, '');\n}\n\nfunction walkStyleKeys(parent, templateOut, getAttributeInfo, path, basePath) {\n    var pathAttr = basePath && getAttributeInfo(basePath);\n    for(var key in parent) {\n        var child = parent[key];\n        var nextPath = getNextPath(parent, key, path);\n        var nextBasePath = getNextPath(parent, key, basePath);\n        var attr = getAttributeInfo(nextBasePath);\n        if(!attr) {\n            var baseKey = getBaseKey(key);\n            if(baseKey !== key) {\n                nextBasePath = getNextPath(parent, baseKey, basePath);\n                attr = getAttributeInfo(nextBasePath);\n            }\n        }\n\n        // we'll get an attr if path starts with a valid part, then has an\n        // invalid ending. Make sure we got all the way to the end.\n        if(pathAttr && (pathAttr === attr)) continue;\n\n        if(!attr || attr._noTemplating ||\n            attr.valType === 'data_array' ||\n            (attr.arrayOk && Array.isArray(child))\n        ) {\n            continue;\n        }\n\n        if(!attr.valType && isPlainObject(child)) {\n            walkStyleKeys(child, templateOut, getAttributeInfo, nextPath, nextBasePath);\n        } else if(attr._isLinkedToArray && Array.isArray(child)) {\n            var dfltDone = false;\n            var namedIndex = 0;\n            var usedNames = {};\n            for(var i = 0; i < child.length; i++) {\n                var item = child[i];\n                if(isPlainObject(item)) {\n                    var name = item.name;\n                    if(name) {\n                        if(!usedNames[name]) {\n                            // named array items: allow all attributes except data arrays\n                            walkStyleKeys(item, templateOut, getAttributeInfo,\n                                getNextPath(child, namedIndex, nextPath),\n                                getNextPath(child, namedIndex, nextBasePath));\n                            namedIndex++;\n                            usedNames[name] = 1;\n                        }\n                    } else if(!dfltDone) {\n                        var dfltKey = Template.arrayDefaultKey(key);\n                        var dfltPath = getNextPath(parent, dfltKey, path);\n\n                        // getAttributeInfo will fail if we try to use dfltKey directly.\n                        // Instead put this item into the next array element, then\n                        // pull it out and move it to dfltKey.\n                        var pathInArray = getNextPath(child, namedIndex, nextPath);\n                        walkStyleKeys(item, templateOut, getAttributeInfo, pathInArray,\n                            getNextPath(child, namedIndex, nextBasePath));\n                        var itemPropInArray = Lib.nestedProperty(templateOut, pathInArray);\n                        var dfltProp = Lib.nestedProperty(templateOut, dfltPath);\n                        dfltProp.set(itemPropInArray.get());\n                        itemPropInArray.set(null);\n\n                        dfltDone = true;\n                    }\n                }\n            }\n        } else {\n            var templateProp = Lib.nestedProperty(templateOut, nextPath);\n            templateProp.set(child);\n        }\n    }\n}\n\nfunction getLayoutInfo(layout, path) {\n    return PlotSchema.getLayoutValObject(\n        layout, Lib.nestedProperty({}, path).parts\n    );\n}\n\nfunction getTraceInfo(trace, path) {\n    return PlotSchema.getTraceValObject(\n        trace, Lib.nestedProperty({}, path).parts\n    );\n}\n\nfunction getNextPath(parent, key, path) {\n    var nextPath;\n    if(!path) nextPath = key;\n    else if(Array.isArray(parent)) nextPath = path + '[' + key + ']';\n    else nextPath = path + '.' + key;\n\n    return nextPath;\n}\n\n/**\n * validateTemplate: Test for consistency between the given figure and\n * a template, either already included in the figure or given separately.\n * Note that not every issue we identify here is necessarily a problem,\n * it depends on what you're using the template for.\n *\n * @param {object|DOM element} figure: the plot, with {data, layout} members,\n *     to test the template against\n * @param {Optional(object)} template: the template, with its own {data, layout},\n *     to test. If omitted, we will look for a template already attached as the\n *     plot's `layout.template` attribute.\n *\n * @returns {array} array of error objects each containing:\n *  - {string} code\n *      error code ('missing', 'unused', 'reused', 'noLayout', 'noData')\n *  - {string} msg\n *      a full readable description of the issue.\n */\nexports.validateTemplate = function(figureIn, template) {\n    var figure = Lib.extendDeep({}, {\n        _context: dfltConfig,\n        data: figureIn.data,\n        layout: figureIn.layout\n    });\n    var layout = figure.layout || {};\n    if(!isPlainObject(template)) template = layout.template || {};\n    var layoutTemplate = template.layout;\n    var dataTemplate = template.data;\n    var errorList = [];\n\n    figure.layout = layout;\n    figure.layout.template = template;\n    Plots.supplyDefaults(figure);\n\n    var fullLayout = figure._fullLayout;\n    var fullData = figure._fullData;\n\n    var layoutPaths = {};\n    function crawlLayoutForContainers(obj, paths) {\n        for(var key in obj) {\n            if(key.charAt(0) !== '_' && isPlainObject(obj[key])) {\n                var baseKey = getBaseKey(key);\n                var nextPaths = [];\n                var i;\n                for(i = 0; i < paths.length; i++) {\n                    nextPaths.push(getNextPath(obj, key, paths[i]));\n                    if(baseKey !== key) nextPaths.push(getNextPath(obj, baseKey, paths[i]));\n                }\n                for(i = 0; i < nextPaths.length; i++) {\n                    layoutPaths[nextPaths[i]] = 1;\n                }\n                crawlLayoutForContainers(obj[key], nextPaths);\n            }\n        }\n    }\n\n    function crawlLayoutTemplateForContainers(obj, path) {\n        for(var key in obj) {\n            if(key.indexOf('defaults') === -1 && isPlainObject(obj[key])) {\n                var nextPath = getNextPath(obj, key, path);\n                if(layoutPaths[nextPath]) {\n                    crawlLayoutTemplateForContainers(obj[key], nextPath);\n                } else {\n                    errorList.push({code: 'unused', path: nextPath});\n                }\n            }\n        }\n    }\n\n    if(!isPlainObject(layoutTemplate)) {\n        errorList.push({code: 'layout'});\n    } else {\n        crawlLayoutForContainers(fullLayout, ['layout']);\n        crawlLayoutTemplateForContainers(layoutTemplate, 'layout');\n    }\n\n    if(!isPlainObject(dataTemplate)) {\n        errorList.push({code: 'data'});\n    } else {\n        var typeCount = {};\n        var traceType;\n        for(var i = 0; i < fullData.length; i++) {\n            var fullTrace = fullData[i];\n            traceType = fullTrace.type;\n            typeCount[traceType] = (typeCount[traceType] || 0) + 1;\n            if(!fullTrace._fullInput._template) {\n                // this takes care of the case of traceType in the data but not\n                // the template\n                errorList.push({\n                    code: 'missing',\n                    index: fullTrace._fullInput.index,\n                    traceType: traceType\n                });\n            }\n        }\n        for(traceType in dataTemplate) {\n            var templateCount = dataTemplate[traceType].length;\n            var dataCount = typeCount[traceType] || 0;\n            if(templateCount > dataCount) {\n                errorList.push({\n                    code: 'unused',\n                    traceType: traceType,\n                    templateCount: templateCount,\n                    dataCount: dataCount\n                });\n            } else if(dataCount > templateCount) {\n                errorList.push({\n                    code: 'reused',\n                    traceType: traceType,\n                    templateCount: templateCount,\n                    dataCount: dataCount\n                });\n            }\n        }\n    }\n\n    // _template: false is when someone tried to modify an array item\n    // but there was no template with matching name\n    function crawlForMissingTemplates(obj, path) {\n        for(var key in obj) {\n            if(key.charAt(0) === '_') continue;\n            var val = obj[key];\n            var nextPath = getNextPath(obj, key, path);\n            if(isPlainObject(val)) {\n                if(Array.isArray(obj) && val._template === false && val.templateitemname) {\n                    errorList.push({\n                        code: 'missing',\n                        path: nextPath,\n                        templateitemname: val.templateitemname\n                    });\n                }\n                crawlForMissingTemplates(val, nextPath);\n            } else if(Array.isArray(val) && hasPlainObject(val)) {\n                crawlForMissingTemplates(val, nextPath);\n            }\n        }\n    }\n    crawlForMissingTemplates({data: fullData, layout: fullLayout}, '');\n\n    if(errorList.length) return errorList.map(format);\n};\n\nfunction hasPlainObject(arr) {\n    for(var i = 0; i < arr.length; i++) {\n        if(isPlainObject(arr[i])) return true;\n    }\n}\n\nfunction format(opts) {\n    var msg;\n    switch(opts.code) {\n        case 'data':\n            msg = 'The template has no key data.';\n            break;\n        case 'layout':\n            msg = 'The template has no key layout.';\n            break;\n        case 'missing':\n            if(opts.path) {\n                msg = 'There are no templates for item ' + opts.path +\n                    ' with name ' + opts.templateitemname;\n            } else {\n                msg = 'There are no templates for trace ' + opts.index +\n                    ', of type ' + opts.traceType + '.';\n            }\n            break;\n        case 'unused':\n            if(opts.path) {\n                msg = 'The template item at ' + opts.path +\n                    ' was not used in constructing the plot.';\n            } else if(opts.dataCount) {\n                msg = 'Some of the templates of type ' + opts.traceType +\n                    ' were not used. The template has ' + opts.templateCount +\n                    ' traces, the data only has ' + opts.dataCount +\n                    ' of this type.';\n            } else {\n                msg = 'The template has ' + opts.templateCount +\n                    ' traces of type ' + opts.traceType +\n                    ' but there are none in the data.';\n            }\n            break;\n        case 'reused':\n            msg = 'Some of the templates of type ' + opts.traceType +\n                ' were used more than once. The template has ' +\n                opts.templateCount + ' traces, the data has ' +\n                opts.dataCount + ' of this type.';\n            break;\n    }\n    opts.msg = msg;\n\n    return opts;\n}\n\n},{\"../lib\":703,\"../plots/attributes\":748,\"../plots/plots\":812,\"./plot_config\":739,\"./plot_schema\":740,\"./plot_template\":741}],744:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar plotApi = _dereq_('./plot_api');\nvar Lib = _dereq_('../lib');\n\nvar helpers = _dereq_('../snapshot/helpers');\nvar toSVG = _dereq_('../snapshot/tosvg');\nvar svgToImg = _dereq_('../snapshot/svgtoimg');\n\nvar attrs = {\n    format: {\n        valType: 'enumerated',\n        values: ['png', 'jpeg', 'webp', 'svg'],\n        dflt: 'png',\n        \n    },\n    width: {\n        valType: 'number',\n        min: 1,\n        \n    },\n    height: {\n        valType: 'number',\n        min: 1,\n        \n    },\n    scale: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n    },\n    setBackground: {\n        valType: 'any',\n        dflt: false,\n        \n    },\n    imageDataOnly: {\n        valType: 'boolean',\n        dflt: false,\n        \n    }\n};\n\nvar IMAGE_URL_PREFIX = /^data:image\\/\\w+;base64,/;\n\n/** Plotly.toImage\n *\n * @param {object | string | HTML div} gd\n *   can either be a data/layout/config object\n *   or an existing graph <div>\n *   or an id to an existing graph <div>\n * @param {object} opts (see above)\n * @return {promise}\n */\nfunction toImage(gd, opts) {\n    opts = opts || {};\n\n    var data;\n    var layout;\n    var config;\n    var fullLayout;\n\n    if(Lib.isPlainObject(gd)) {\n        data = gd.data || [];\n        layout = gd.layout || {};\n        config = gd.config || {};\n        fullLayout = {};\n    } else {\n        gd = Lib.getGraphDiv(gd);\n        data = Lib.extendDeep([], gd.data);\n        layout = Lib.extendDeep({}, gd.layout);\n        config = gd._context;\n        fullLayout = gd._fullLayout || {};\n    }\n\n    function isImpliedOrValid(attr) {\n        return !(attr in opts) || Lib.validate(opts[attr], attrs[attr]);\n    }\n\n    if((!isImpliedOrValid('width') && opts.width !== null) ||\n        (!isImpliedOrValid('height') && opts.height !== null)) {\n        throw new Error('Height and width should be pixel values.');\n    }\n\n    if(!isImpliedOrValid('format')) {\n        throw new Error('Image format is not jpeg, png, svg or webp.');\n    }\n\n    var fullOpts = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(opts, fullOpts, attrs, attr, dflt);\n    }\n\n    var format = coerce('format');\n    var width = coerce('width');\n    var height = coerce('height');\n    var scale = coerce('scale');\n    var setBackground = coerce('setBackground');\n    var imageDataOnly = coerce('imageDataOnly');\n\n    // put the cloned div somewhere off screen before attaching to DOM\n    var clonedGd = document.createElement('div');\n    clonedGd.style.position = 'absolute';\n    clonedGd.style.left = '-5000px';\n    document.body.appendChild(clonedGd);\n\n    // extend layout with image options\n    var layoutImage = Lib.extendFlat({}, layout);\n    if(width) {\n        layoutImage.width = width;\n    } else if(opts.width === null && isNumeric(fullLayout.width)) {\n        layoutImage.width = fullLayout.width;\n    }\n    if(height) {\n        layoutImage.height = height;\n    } else if(opts.height === null && isNumeric(fullLayout.height)) {\n        layoutImage.height = fullLayout.height;\n    }\n\n    // extend config for static plot\n    var configImage = Lib.extendFlat({}, config, {\n        _exportedPlot: true,\n        staticPlot: true,\n        setBackground: setBackground\n    });\n\n    var redrawFunc = helpers.getRedrawFunc(clonedGd);\n\n    function wait() {\n        return new Promise(function(resolve) {\n            setTimeout(resolve, helpers.getDelay(clonedGd._fullLayout));\n        });\n    }\n\n    function convert() {\n        return new Promise(function(resolve, reject) {\n            var svg = toSVG(clonedGd, format, scale);\n            var width = clonedGd._fullLayout.width;\n            var height = clonedGd._fullLayout.height;\n\n            plotApi.purge(clonedGd);\n            document.body.removeChild(clonedGd);\n\n            if(format === 'svg') {\n                if(imageDataOnly) {\n                    return resolve(svg);\n                } else {\n                    return resolve('data:image/svg+xml,' + encodeURIComponent(svg));\n                }\n            }\n\n            var canvas = document.createElement('canvas');\n            canvas.id = Lib.randstr();\n\n            svgToImg({\n                format: format,\n                width: width,\n                height: height,\n                scale: scale,\n                canvas: canvas,\n                svg: svg,\n                // ask svgToImg to return a Promise\n                //  rather than EventEmitter\n                //  leave EventEmitter for backward\n                //  compatibility\n                promise: true\n            })\n            .then(resolve)\n            .catch(reject);\n        });\n    }\n\n    function urlToImageData(url) {\n        if(imageDataOnly) {\n            return url.replace(IMAGE_URL_PREFIX, '');\n        } else {\n            return url;\n        }\n    }\n\n    return new Promise(function(resolve, reject) {\n        plotApi.plot(clonedGd, data, layoutImage, configImage)\n            .then(redrawFunc)\n            .then(wait)\n            .then(convert)\n            .then(function(url) { resolve(urlToImageData(url)); })\n            .catch(function(err) { reject(err); });\n    });\n}\n\nmodule.exports = toImage;\n\n},{\"../lib\":703,\"../snapshot/helpers\":835,\"../snapshot/svgtoimg\":837,\"../snapshot/tosvg\":839,\"./plot_api\":738,\"fast-isnumeric\":224}],745:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar Plots = _dereq_('../plots/plots');\nvar PlotSchema = _dereq_('./plot_schema');\nvar dfltConfig = _dereq_('./plot_config').dfltConfig;\n\nvar isPlainObject = Lib.isPlainObject;\nvar isArray = Array.isArray;\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\n\n/**\n * Validate a data array and layout object.\n *\n * @param {array} data\n * @param {object} layout\n *\n * @return {array} array of error objects each containing:\n *  - {string} code\n *      error code ('object', 'array', 'schema', 'unused', 'invisible' or 'value')\n *  - {string} container\n *      container where the error occurs ('data' or 'layout')\n *  - {number} trace\n *      trace index of the 'data' container where the error occurs\n *  - {array} path\n *      nested path to the key that causes the error\n *  - {string} astr\n *      attribute string variant of 'path' compatible with Plotly.restyle and\n *      Plotly.relayout.\n *  - {string} msg\n *      error message (shown in console in logger config argument is enable)\n */\nmodule.exports = function validate(data, layout) {\n    var schema = PlotSchema.get();\n    var errorList = [];\n    var gd = {_context: Lib.extendFlat({}, dfltConfig)};\n\n    var dataIn, layoutIn;\n\n    if(isArray(data)) {\n        gd.data = Lib.extendDeep([], data);\n        dataIn = data;\n    } else {\n        gd.data = [];\n        dataIn = [];\n        errorList.push(format('array', 'data'));\n    }\n\n    if(isPlainObject(layout)) {\n        gd.layout = Lib.extendDeep({}, layout);\n        layoutIn = layout;\n    } else {\n        gd.layout = {};\n        layoutIn = {};\n        if(arguments.length > 1) {\n            errorList.push(format('object', 'layout'));\n        }\n    }\n\n    // N.B. dataIn and layoutIn are in general not the same as\n    // gd.data and gd.layout after supplyDefaults as some attributes\n    // in gd.data and gd.layout (still) get mutated during this step.\n\n    Plots.supplyDefaults(gd);\n\n    var dataOut = gd._fullData;\n    var len = dataIn.length;\n\n    for(var i = 0; i < len; i++) {\n        var traceIn = dataIn[i];\n        var base = ['data', i];\n\n        if(!isPlainObject(traceIn)) {\n            errorList.push(format('object', base));\n            continue;\n        }\n\n        var traceOut = dataOut[i];\n        var traceType = traceOut.type;\n        var traceSchema = schema.traces[traceType].attributes;\n\n        // PlotSchema does something fancy with trace 'type', reset it here\n        // to make the trace schema compatible with Lib.validate.\n        traceSchema.type = {\n            valType: 'enumerated',\n            values: [traceType]\n        };\n\n        if(traceOut.visible === false && traceIn.visible !== false) {\n            errorList.push(format('invisible', base));\n        }\n\n        crawl(traceIn, traceOut, traceSchema, errorList, base);\n\n        var transformsIn = traceIn.transforms;\n        var transformsOut = traceOut.transforms;\n\n        if(transformsIn) {\n            if(!isArray(transformsIn)) {\n                errorList.push(format('array', base, ['transforms']));\n            }\n\n            base.push('transforms');\n\n            for(var j = 0; j < transformsIn.length; j++) {\n                var path = ['transforms', j];\n                var transformType = transformsIn[j].type;\n\n                if(!isPlainObject(transformsIn[j])) {\n                    errorList.push(format('object', base, path));\n                    continue;\n                }\n\n                var transformSchema = schema.transforms[transformType] ?\n                    schema.transforms[transformType].attributes :\n                    {};\n\n                // add 'type' to transform schema to validate the transform type\n                transformSchema.type = {\n                    valType: 'enumerated',\n                    values: Object.keys(schema.transforms)\n                };\n\n                crawl(transformsIn[j], transformsOut[j], transformSchema, errorList, base, path);\n            }\n        }\n    }\n\n    var layoutOut = gd._fullLayout;\n    var layoutSchema = fillLayoutSchema(schema, dataOut);\n\n    crawl(layoutIn, layoutOut, layoutSchema, errorList, 'layout');\n\n    // return undefined if no validation errors were found\n    return (errorList.length === 0) ? void(0) : errorList;\n};\n\nfunction crawl(objIn, objOut, schema, list, base, path) {\n    path = path || [];\n\n    var keys = Object.keys(objIn);\n\n    for(var i = 0; i < keys.length; i++) {\n        var k = keys[i];\n\n        // transforms are handled separately\n        if(k === 'transforms') continue;\n\n        var p = path.slice();\n        p.push(k);\n\n        var valIn = objIn[k];\n        var valOut = objOut[k];\n\n        var nestedSchema = getNestedSchema(schema, k);\n        var isInfoArray = (nestedSchema || {}).valType === 'info_array';\n        var isColorscale = (nestedSchema || {}).valType === 'colorscale';\n        var items = (nestedSchema || {}).items;\n\n        if(!isInSchema(schema, k)) {\n            list.push(format('schema', base, p));\n        } else if(isPlainObject(valIn) && isPlainObject(valOut)) {\n            crawl(valIn, valOut, nestedSchema, list, base, p);\n        } else if(isInfoArray && isArray(valIn)) {\n            if(valIn.length > valOut.length) {\n                list.push(format('unused', base, p.concat(valOut.length)));\n            }\n            var len = valOut.length;\n            var arrayItems = Array.isArray(items);\n            if(arrayItems) len = Math.min(len, items.length);\n            var m, n, item, valInPart, valOutPart;\n            if(nestedSchema.dimensions === 2) {\n                for(n = 0; n < len; n++) {\n                    if(isArray(valIn[n])) {\n                        if(valIn[n].length > valOut[n].length) {\n                            list.push(format('unused', base, p.concat(n, valOut[n].length)));\n                        }\n                        var len2 = valOut[n].length;\n                        for(m = 0; m < (arrayItems ? Math.min(len2, items[n].length) : len2); m++) {\n                            item = arrayItems ? items[n][m] : items;\n                            valInPart = valIn[n][m];\n                            valOutPart = valOut[n][m];\n                            if(!Lib.validate(valInPart, item)) {\n                                list.push(format('value', base, p.concat(n, m), valInPart));\n                            } else if(valOutPart !== valInPart && valOutPart !== +valInPart) {\n                                list.push(format('dynamic', base, p.concat(n, m), valInPart, valOutPart));\n                            }\n                        }\n                    } else {\n                        list.push(format('array', base, p.concat(n), valIn[n]));\n                    }\n                }\n            } else {\n                for(n = 0; n < len; n++) {\n                    item = arrayItems ? items[n] : items;\n                    valInPart = valIn[n];\n                    valOutPart = valOut[n];\n                    if(!Lib.validate(valInPart, item)) {\n                        list.push(format('value', base, p.concat(n), valInPart));\n                    } else if(valOutPart !== valInPart && valOutPart !== +valInPart) {\n                        list.push(format('dynamic', base, p.concat(n), valInPart, valOutPart));\n                    }\n                }\n            }\n        } else if(nestedSchema.items && !isInfoArray && isArray(valIn)) {\n            var _nestedSchema = items[Object.keys(items)[0]];\n            var indexList = [];\n\n            var j, _p;\n\n            // loop over valOut items while keeping track of their\n            // corresponding input container index (given by _index)\n            for(j = 0; j < valOut.length; j++) {\n                var _index = valOut[j]._index || j;\n\n                _p = p.slice();\n                _p.push(_index);\n\n                if(isPlainObject(valIn[_index]) && isPlainObject(valOut[j])) {\n                    indexList.push(_index);\n                    var valInj = valIn[_index];\n                    var valOutj = valOut[j];\n                    if(isPlainObject(valInj) && valInj.visible !== false && valOutj.visible === false) {\n                        list.push(format('invisible', base, _p));\n                    } else crawl(valInj, valOutj, _nestedSchema, list, base, _p);\n                }\n            }\n\n            // loop over valIn to determine where it went wrong for some items\n            for(j = 0; j < valIn.length; j++) {\n                _p = p.slice();\n                _p.push(j);\n\n                if(!isPlainObject(valIn[j])) {\n                    list.push(format('object', base, _p, valIn[j]));\n                } else if(indexList.indexOf(j) === -1) {\n                    list.push(format('unused', base, _p));\n                }\n            }\n        } else if(!isPlainObject(valIn) && isPlainObject(valOut)) {\n            list.push(format('object', base, p, valIn));\n        } else if(!isArrayOrTypedArray(valIn) && isArrayOrTypedArray(valOut) && !isInfoArray && !isColorscale) {\n            list.push(format('array', base, p, valIn));\n        } else if(!(k in objOut)) {\n            list.push(format('unused', base, p, valIn));\n        } else if(!Lib.validate(valIn, nestedSchema)) {\n            list.push(format('value', base, p, valIn));\n        } else if(nestedSchema.valType === 'enumerated' &&\n            ((nestedSchema.coerceNumber && valIn !== +valOut) || valIn !== valOut)\n        ) {\n            list.push(format('dynamic', base, p, valIn, valOut));\n        }\n    }\n\n    return list;\n}\n\n// the 'full' layout schema depends on the traces types presents\nfunction fillLayoutSchema(schema, dataOut) {\n    var layoutSchema = schema.layout.layoutAttributes;\n\n    for(var i = 0; i < dataOut.length; i++) {\n        var traceOut = dataOut[i];\n        var traceSchema = schema.traces[traceOut.type];\n        var traceLayoutAttr = traceSchema.layoutAttributes;\n\n        if(traceLayoutAttr) {\n            if(traceOut.subplot) {\n                Lib.extendFlat(layoutSchema[traceSchema.attributes.subplot.dflt], traceLayoutAttr);\n            } else {\n                Lib.extendFlat(layoutSchema, traceLayoutAttr);\n            }\n        }\n    }\n\n    return layoutSchema;\n}\n\n// validation error codes\nvar code2msgFunc = {\n    object: function(base, astr) {\n        var prefix;\n\n        if(base === 'layout' && astr === '') prefix = 'The layout argument';\n        else if(base[0] === 'data' && astr === '') {\n            prefix = 'Trace ' + base[1] + ' in the data argument';\n        } else prefix = inBase(base) + 'key ' + astr;\n\n        return prefix + ' must be linked to an object container';\n    },\n    array: function(base, astr) {\n        var prefix;\n\n        if(base === 'data') prefix = 'The data argument';\n        else prefix = inBase(base) + 'key ' + astr;\n\n        return prefix + ' must be linked to an array container';\n    },\n    schema: function(base, astr) {\n        return inBase(base) + 'key ' + astr + ' is not part of the schema';\n    },\n    unused: function(base, astr, valIn) {\n        var target = isPlainObject(valIn) ? 'container' : 'key';\n\n        return inBase(base) + target + ' ' + astr + ' did not get coerced';\n    },\n    dynamic: function(base, astr, valIn, valOut) {\n        return [\n            inBase(base) + 'key',\n            astr,\n            '(set to \\'' + valIn + '\\')',\n            'got reset to',\n            '\\'' + valOut + '\\'',\n            'during defaults.'\n        ].join(' ');\n    },\n    invisible: function(base, astr) {\n        return (\n            astr ? (inBase(base) + 'item ' + astr) : ('Trace ' + base[1])\n        ) + ' got defaulted to be not visible';\n    },\n    value: function(base, astr, valIn) {\n        return [\n            inBase(base) + 'key ' + astr,\n            'is set to an invalid value (' + valIn + ')'\n        ].join(' ');\n    }\n};\n\nfunction inBase(base) {\n    if(isArray(base)) return 'In data trace ' + base[1] + ', ';\n\n    return 'In ' + base + ', ';\n}\n\nfunction format(code, base, path, valIn, valOut) {\n    path = path || '';\n\n    var container, trace;\n\n    // container is either 'data' or 'layout\n    // trace is the trace index if 'data', null otherwise\n\n    if(isArray(base)) {\n        container = base[0];\n        trace = base[1];\n    } else {\n        container = base;\n        trace = null;\n    }\n\n    var astr = convertPathToAttributeString(path);\n    var msg = code2msgFunc[code](base, astr, valIn, valOut);\n\n    // log to console if logger config option is enabled\n    Lib.log(msg);\n\n    return {\n        code: code,\n        container: container,\n        trace: trace,\n        path: path,\n        astr: astr,\n        msg: msg\n    };\n}\n\nfunction isInSchema(schema, key) {\n    var parts = splitKey(key);\n    var keyMinusId = parts.keyMinusId;\n    var id = parts.id;\n\n    if((keyMinusId in schema) && schema[keyMinusId]._isSubplotObj && id) {\n        return true;\n    }\n\n    return (key in schema);\n}\n\nfunction getNestedSchema(schema, key) {\n    if(key in schema) return schema[key];\n\n    var parts = splitKey(key);\n\n    return schema[parts.keyMinusId];\n}\n\nvar idRegex = Lib.counterRegex('([a-z]+)');\n\nfunction splitKey(key) {\n    var idMatch = key.match(idRegex);\n\n    return {\n        keyMinusId: idMatch && idMatch[1],\n        id: idMatch && idMatch[2]\n    };\n}\n\nfunction convertPathToAttributeString(path) {\n    if(!isArray(path)) return String(path);\n\n    var astr = '';\n\n    for(var i = 0; i < path.length; i++) {\n        var p = path[i];\n\n        if(typeof p === 'number') {\n            astr = astr.substr(0, astr.length - 1) + '[' + p + ']';\n        } else {\n            astr += p;\n        }\n\n        if(i < path.length - 1) astr += '.';\n    }\n\n    return astr;\n}\n\n},{\"../lib\":703,\"../plots/plots\":812,\"./plot_config\":739,\"./plot_schema\":740}],746:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    mode: {\n        valType: 'enumerated',\n        dflt: 'afterall',\n        \n        values: ['immediate', 'next', 'afterall'],\n        \n    },\n    direction: {\n        valType: 'enumerated',\n        \n        values: ['forward', 'reverse'],\n        dflt: 'forward',\n        \n    },\n    fromcurrent: {\n        valType: 'boolean',\n        dflt: false,\n        \n        \n    },\n    frame: {\n        duration: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 500,\n            \n        },\n        redraw: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n    },\n    transition: {\n        duration: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 500,\n            editType: 'none',\n            \n        },\n        easing: {\n            valType: 'enumerated',\n            dflt: 'cubic-in-out',\n            values: [\n                'linear',\n                'quad',\n                'cubic',\n                'sin',\n                'exp',\n                'circle',\n                'elastic',\n                'back',\n                'bounce',\n                'linear-in',\n                'quad-in',\n                'cubic-in',\n                'sin-in',\n                'exp-in',\n                'circle-in',\n                'elastic-in',\n                'back-in',\n                'bounce-in',\n                'linear-out',\n                'quad-out',\n                'cubic-out',\n                'sin-out',\n                'exp-out',\n                'circle-out',\n                'elastic-out',\n                'back-out',\n                'bounce-out',\n                'linear-in-out',\n                'quad-in-out',\n                'cubic-in-out',\n                'sin-in-out',\n                'exp-in-out',\n                'circle-in-out',\n                'elastic-in-out',\n                'back-in-out',\n                'bounce-in-out'\n            ],\n            \n            editType: 'none',\n            \n        },\n        ordering: {\n            valType: 'enumerated',\n            values: ['layout first', 'traces first'],\n            dflt: 'layout first',\n            \n            editType: 'none',\n            \n        }\n    }\n};\n\n},{}],747:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar Template = _dereq_('../plot_api/plot_template');\n\n/** Convenience wrapper for making array container logic DRY and consistent\n *\n * @param {object} parentObjIn\n *  user input object where the container in question is linked\n *  (i.e. either a user trace object or the user layout object)\n *\n * @param {object} parentObjOut\n *  full object where the coerced container will be linked\n *  (i.e. either a full trace object or the full layout object)\n *\n * @param {object} opts\n *  options object:\n *   - name {string}\n *      name of the key linking the container in question\n *   - inclusionAttr {string}\n *      name of the item attribute for inclusion/exclusion. Default is 'visible'.\n *      Since inclusion is true, use eg 'enabled' instead of 'disabled'.\n *   - handleItemDefaults {function}\n *      defaults method to be called on each item in the array container in question\n *\n *      Its arguments are:\n *          - itemIn {object} item in user layout\n *          - itemOut {object} item in full layout\n *          - parentObj {object} (as in closure)\n *          - opts {object} (as in closure)\n * N.B.\n *\n *  - opts is passed to handleItemDefaults so it can also store\n *    links to supplementary data (e.g. fullData for layout components)\n *\n */\nmodule.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut, opts) {\n    var name = opts.name;\n    var inclusionAttr = opts.inclusionAttr || 'visible';\n\n    var previousContOut = parentObjOut[name];\n\n    var contIn = Lib.isArrayOrTypedArray(parentObjIn[name]) ? parentObjIn[name] : [];\n    var contOut = parentObjOut[name] = [];\n    var templater = Template.arrayTemplater(parentObjOut, name, inclusionAttr);\n    var i, itemOut;\n\n    for(i = 0; i < contIn.length; i++) {\n        var itemIn = contIn[i];\n\n        if(!Lib.isPlainObject(itemIn)) {\n            itemOut = templater.newItem({});\n            itemOut[inclusionAttr] = false;\n        } else {\n            itemOut = templater.newItem(itemIn);\n        }\n\n        itemOut._index = i;\n\n        if(itemOut[inclusionAttr] !== false) {\n            opts.handleItemDefaults(itemIn, itemOut, parentObjOut, opts);\n        }\n\n        contOut.push(itemOut);\n    }\n\n    var defaultItems = templater.defaultItems();\n    for(i = 0; i < defaultItems.length; i++) {\n        itemOut = defaultItems[i];\n        itemOut._index = contOut.length;\n        opts.handleItemDefaults({}, itemOut, parentObjOut, opts, {});\n        contOut.push(itemOut);\n    }\n\n    // in case this array gets its defaults rebuilt independent of the whole layout,\n    // relink the private keys just for this array.\n    if(Lib.isArrayOrTypedArray(previousContOut)) {\n        var len = Math.min(previousContOut.length, contOut.length);\n        for(i = 0; i < len; i++) {\n            Lib.relinkPrivateKeys(contOut[i], previousContOut[i]);\n        }\n    }\n\n    return contOut;\n};\n\n},{\"../lib\":703,\"../plot_api/plot_template\":741}],748:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fxAttrs = _dereq_('../components/fx/attributes');\n\nmodule.exports = {\n    type: {\n        valType: 'enumerated',\n        \n        values: [],     // listed dynamically\n        dflt: 'scatter',\n        editType: 'calc+clearAxisTypes',\n        _noTemplating: true // we handle this at a higher level\n    },\n    visible: {\n        valType: 'enumerated',\n        values: [true, false, 'legendonly'],\n        \n        dflt: true,\n        editType: 'calc',\n        \n    },\n    showlegend: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'style',\n        \n    },\n    legendgroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'style',\n        \n    },\n    opacity: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 1,\n        editType: 'style',\n        \n    },\n    name: {\n        valType: 'string',\n        \n        editType: 'style',\n        \n    },\n    uid: {\n        valType: 'string',\n        \n        editType: 'plot',\n        anim: true,\n        \n    },\n    ids: {\n        valType: 'data_array',\n        editType: 'calc',\n        anim: true,\n        \n    },\n    customdata: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    meta: {\n        valType: 'any',\n        arrayOk: true,\n        \n        editType: 'plot',\n        \n    },\n\n    // N.B. these cannot be 'data_array' as they do not have the same length as\n    // other data arrays and arrayOk attributes in general\n    //\n    // Maybe add another valType:\n    // https://github.com/plotly/plotly.js/issues/1894\n    selectedpoints: {\n        valType: 'any',\n        \n        editType: 'calc',\n        \n    },\n\n    hoverinfo: {\n        valType: 'flaglist',\n        \n        flags: ['x', 'y', 'z', 'text', 'name'],\n        extras: ['all', 'none', 'skip'],\n        arrayOk: true,\n        dflt: 'all',\n        editType: 'none',\n        \n    },\n    hoverlabel: fxAttrs.hoverlabel,\n    stream: {\n        token: {\n            valType: 'string',\n            noBlank: true,\n            strict: true,\n            \n            editType: 'calc',\n            \n        },\n        maxpoints: {\n            valType: 'number',\n            min: 0,\n            max: 10000,\n            dflt: 500,\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    },\n    transforms: {\n        _isLinkedToArray: 'transform',\n        editType: 'calc',\n        \n    },\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    }\n};\n\n},{\"../components/fx/attributes\":610}],749:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    xaxis: {\n        valType: 'subplotid',\n        \n        dflt: 'x',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    yaxis: {\n        valType: 'subplotid',\n        \n        dflt: 'y',\n        editType: 'calc+clearAxisTypes',\n        \n    }\n};\n\n},{}],750:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar FP_SAFE = _dereq_('../../constants/numerical').FP_SAFE;\nvar Registry = _dereq_('../../registry');\n\nmodule.exports = {\n    getAutoRange: getAutoRange,\n    makePadFn: makePadFn,\n    doAutoRange: doAutoRange,\n    findExtremes: findExtremes,\n    concatExtremes: concatExtremes\n};\n\n/**\n * getAutoRange\n *\n * Collects all _extremes values corresponding to a given axis\n * and computes its auto range.\n *\n * Note that getAutoRange uses return values from findExtremes.\n *\n * @param {object} gd:\n *   graph div object with filled-in fullData and fullLayout, in particular\n *   with filled-in '_extremes' containers:\n *   {\n *      val: calcdata value,\n *      pad: extra pixels beyond this value,\n *      extrapad: bool, does this point want 5% extra padding\n *   }\n * @param {object} ax:\n *   full axis object, in particular with filled-in '_traceIndices'\n *   and '_annIndices' / '_shapeIndices' if applicable\n * @return {array}\n *   an array of [min, max]. These are calcdata for log and category axes\n *   and data for linear and date axes.\n *\n * TODO: we want to change log to data as well, but it's hard to do this\n * maintaining backward compatibility. category will always have to use calcdata\n * though, because otherwise values between categories (or outside all categories)\n * would be impossible.\n */\nfunction getAutoRange(gd, ax) {\n    var i, j;\n    var newRange = [];\n\n    var getPad = makePadFn(ax);\n    var extremes = concatExtremes(gd, ax);\n    var minArray = extremes.min;\n    var maxArray = extremes.max;\n\n    if(minArray.length === 0 || maxArray.length === 0) {\n        return Lib.simpleMap(ax.range, ax.r2l);\n    }\n\n    var minmin = minArray[0].val;\n    var maxmax = maxArray[0].val;\n\n    for(i = 1; i < minArray.length; i++) {\n        if(minmin !== maxmax) break;\n        minmin = Math.min(minmin, minArray[i].val);\n    }\n    for(i = 1; i < maxArray.length; i++) {\n        if(minmin !== maxmax) break;\n        maxmax = Math.max(maxmax, maxArray[i].val);\n    }\n\n    var axReverse = false;\n\n    if(ax.range) {\n        var rng = Lib.simpleMap(ax.range, ax.r2l);\n        axReverse = rng[1] < rng[0];\n    }\n    // one-time setting to easily reverse the axis\n    // when plotting from code\n    if(ax.autorange === 'reversed') {\n        axReverse = true;\n        ax.autorange = true;\n    }\n\n    var rangeMode = ax.rangemode;\n    var toZero = rangeMode === 'tozero';\n    var nonNegative = rangeMode === 'nonnegative';\n    var axLen = ax._length;\n    // don't allow padding to reduce the data to < 10% of the length\n    var minSpan = axLen / 10;\n\n    var mbest = 0;\n    var minpt, maxpt, minbest, maxbest, dp, dv;\n\n    for(i = 0; i < minArray.length; i++) {\n        minpt = minArray[i];\n        for(j = 0; j < maxArray.length; j++) {\n            maxpt = maxArray[j];\n            dv = maxpt.val - minpt.val;\n            if(dv > 0) {\n                dp = axLen - getPad(minpt) - getPad(maxpt);\n                if(dp > minSpan) {\n                    if(dv / dp > mbest) {\n                        minbest = minpt;\n                        maxbest = maxpt;\n                        mbest = dv / dp;\n                    }\n                } else if(dv / axLen > mbest) {\n                    // in case of padding longer than the axis\n                    // at least include the unpadded data values.\n                    minbest = {val: minpt.val, pad: 0};\n                    maxbest = {val: maxpt.val, pad: 0};\n                    mbest = dv / axLen;\n                }\n            }\n        }\n    }\n\n    function getMaxPad(prev, pt) {\n        return Math.max(prev, getPad(pt));\n    }\n\n    if(minmin === maxmax) {\n        var lower = minmin - 1;\n        var upper = minmin + 1;\n        if(toZero) {\n            if(minmin === 0) {\n                // The only value we have on this axis is 0, and we want to\n                // autorange so zero is one end.\n                // In principle this could be [0, 1] or [-1, 0] but usually\n                // 'tozero' pins 0 to the low end, so follow that.\n                newRange = [0, 1];\n            } else {\n                var maxPad = (minmin > 0 ? maxArray : minArray).reduce(getMaxPad, 0);\n                // we're pushing a single value away from the edge due to its\n                // padding, with the other end clamped at zero\n                // 0.5 means don't push it farther than the center.\n                var rangeEnd = minmin / (1 - Math.min(0.5, maxPad / axLen));\n                newRange = minmin > 0 ? [0, rangeEnd] : [rangeEnd, 0];\n            }\n        } else if(nonNegative) {\n            newRange = [Math.max(0, lower), Math.max(1, upper)];\n        } else {\n            newRange = [lower, upper];\n        }\n    } else {\n        if(toZero) {\n            if(minbest.val >= 0) {\n                minbest = {val: 0, pad: 0};\n            }\n            if(maxbest.val <= 0) {\n                maxbest = {val: 0, pad: 0};\n            }\n        } else if(nonNegative) {\n            if(minbest.val - mbest * getPad(minbest) < 0) {\n                minbest = {val: 0, pad: 0};\n            }\n            if(maxbest.val <= 0) {\n                maxbest = {val: 1, pad: 0};\n            }\n        }\n\n        // in case it changed again...\n        mbest = (maxbest.val - minbest.val) /\n            (axLen - getPad(minbest) - getPad(maxbest));\n\n        newRange = [\n            minbest.val - mbest * getPad(minbest),\n            maxbest.val + mbest * getPad(maxbest)\n        ];\n    }\n\n    // maintain reversal\n    if(axReverse) newRange.reverse();\n\n    return Lib.simpleMap(newRange, ax.l2r || Number);\n}\n\n/*\n * calculate the pixel padding for ax._min and ax._max entries with\n * optional extrapad as 5% of the total axis length\n */\nfunction makePadFn(ax) {\n    // 5% padding for points that specify extrapad: true\n    var extrappad = ax._length / 20;\n\n    // domain-constrained axes: base extrappad on the unconstrained\n    // domain so it's consistent as the domain changes\n    if((ax.constrain === 'domain') && ax._inputDomain) {\n        extrappad *= (ax._inputDomain[1] - ax._inputDomain[0]) /\n            (ax.domain[1] - ax.domain[0]);\n    }\n\n    return function getPad(pt) { return pt.pad + (pt.extrapad ? extrappad : 0); };\n}\n\nfunction concatExtremes(gd, ax) {\n    var axId = ax._id;\n    var fullData = gd._fullData;\n    var fullLayout = gd._fullLayout;\n    var minArray = [];\n    var maxArray = [];\n    var i, j, d;\n\n    function _concat(cont, indices) {\n        for(i = 0; i < indices.length; i++) {\n            var item = cont[indices[i]];\n            var extremes = (item._extremes || {})[axId];\n            if(item.visible === true && extremes) {\n                for(j = 0; j < extremes.min.length; j++) {\n                    d = extremes.min[j];\n                    collapseMinArray(minArray, d.val, d.pad, {extrapad: d.extrapad});\n                }\n                for(j = 0; j < extremes.max.length; j++) {\n                    d = extremes.max[j];\n                    collapseMaxArray(maxArray, d.val, d.pad, {extrapad: d.extrapad});\n                }\n            }\n        }\n    }\n\n    _concat(fullData, ax._traceIndices);\n    _concat(fullLayout.annotations || [], ax._annIndices || []);\n    _concat(fullLayout.shapes || [], ax._shapeIndices || []);\n\n    return {min: minArray, max: maxArray};\n}\n\nfunction doAutoRange(gd, ax) {\n    ax.setScale();\n\n    if(ax.autorange) {\n        ax.range = getAutoRange(gd, ax);\n\n        ax._r = ax.range.slice();\n        ax._rl = Lib.simpleMap(ax._r, ax.r2l);\n\n        // doAutoRange will get called on fullLayout,\n        // but we want to report its results back to layout\n\n        var axIn = ax._input;\n\n        // before we edit _input, store preGUI values\n        var edits = {};\n        edits[ax._attr + '.range'] = ax.range;\n        edits[ax._attr + '.autorange'] = ax.autorange;\n        Registry.call('_storeDirectGUIEdit', gd.layout, gd._fullLayout._preGUI, edits);\n\n        axIn.range = ax.range.slice();\n        axIn.autorange = ax.autorange;\n    }\n\n    var anchorAx = ax._anchorAxis;\n\n    if(anchorAx && anchorAx.rangeslider) {\n        var axeRangeOpts = anchorAx.rangeslider[ax._name];\n        if(axeRangeOpts) {\n            if(axeRangeOpts.rangemode === 'auto') {\n                axeRangeOpts.range = getAutoRange(gd, ax);\n            }\n        }\n        anchorAx._input.rangeslider[ax._name] = Lib.extendFlat({}, axeRangeOpts);\n    }\n}\n\n/**\n * findExtremes\n *\n * Find min/max extremes of an array of coordinates on a given axis.\n *\n * Note that findExtremes is called during `calc`, when we don't yet know the axis\n * length; all the inputs should be based solely on the trace data, nothing\n * about the axis layout.\n *\n * Note that `ppad` and `vpad` as well as their asymmetric variants refer to\n * the before and after padding of the passed `data` array, not to the whole axis.\n *\n * @param {object} ax: full axis object\n *   relies on\n *   - ax.type\n *   - ax._m (just its sign)\n *   - ax.d2l\n * @param {array} data:\n *  array of numbers (i.e. already run though ax.d2c)\n * @param {object} opts:\n *  available keys are:\n *      vpad: (number or number array) pad values (data value +-vpad)\n *      ppad: (number or number array) pad pixels (pixel location +-ppad)\n *      ppadplus, ppadminus, vpadplus, vpadminus:\n *          separate padding for each side, overrides symmetric\n *      padded: (boolean) add 5% padding to both ends\n *          (unless one end is overridden by tozero)\n *      tozero: (boolean) make sure to include zero if axis is linear,\n *          and make it a tight bound if possible\n *\n * @return {object}\n *  - min {array of objects}\n *  - max {array of objects}\n *  each object item has fields:\n *    - val {number}\n *    - pad {number}\n *    - extrappad {number}\n *  - opts {object}: a ref to the passed \"options\" object\n */\nfunction findExtremes(ax, data, opts) {\n    if(!opts) opts = {};\n    if(!ax._m) ax.setScale();\n\n    var minArray = [];\n    var maxArray = [];\n\n    var len = data.length;\n    var extrapad = opts.padded || false;\n    var tozero = opts.tozero && (ax.type === 'linear' || ax.type === '-');\n    var isLog = ax.type === 'log';\n    var hasArrayOption = false;\n    var i, v, di, dmin, dmax, ppadiplus, ppadiminus, vmin, vmax;\n\n    function makePadAccessor(item) {\n        if(Array.isArray(item)) {\n            hasArrayOption = true;\n            return function(i) { return Math.max(Number(item[i]||0), 0); };\n        } else {\n            var v = Math.max(Number(item||0), 0);\n            return function() { return v; };\n        }\n    }\n\n    var ppadplus = makePadAccessor((ax._m > 0 ?\n        opts.ppadplus : opts.ppadminus) || opts.ppad || 0);\n    var ppadminus = makePadAccessor((ax._m > 0 ?\n        opts.ppadminus : opts.ppadplus) || opts.ppad || 0);\n    var vpadplus = makePadAccessor(opts.vpadplus || opts.vpad);\n    var vpadminus = makePadAccessor(opts.vpadminus || opts.vpad);\n\n    if(!hasArrayOption) {\n        // with no arrays other than `data` we don't need to consider\n        // every point, only the extreme data points\n        vmin = Infinity;\n        vmax = -Infinity;\n\n        if(isLog) {\n            for(i = 0; i < len; i++) {\n                v = data[i];\n                // data is not linearized yet so we still have to filter out negative logs\n                if(v < vmin && v > 0) vmin = v;\n                if(v > vmax && v < FP_SAFE) vmax = v;\n            }\n        } else {\n            for(i = 0; i < len; i++) {\n                v = data[i];\n                if(v < vmin && v > -FP_SAFE) vmin = v;\n                if(v > vmax && v < FP_SAFE) vmax = v;\n            }\n        }\n\n        data = [vmin, vmax];\n        len = 2;\n    }\n\n    var collapseOpts = {tozero: tozero, extrapad: extrapad};\n\n    function addItem(i) {\n        di = data[i];\n        if(!isNumeric(di)) return;\n        ppadiplus = ppadplus(i);\n        ppadiminus = ppadminus(i);\n        vmin = di - vpadminus(i);\n        vmax = di + vpadplus(i);\n        // special case for log axes: if vpad makes this object span\n        // more than an order of mag, clip it to one order. This is so\n        // we don't have non-positive errors or absurdly large lower\n        // range due to rounding errors\n        if(isLog && vmin < vmax / 10) vmin = vmax / 10;\n\n        dmin = ax.c2l(vmin);\n        dmax = ax.c2l(vmax);\n\n        if(tozero) {\n            dmin = Math.min(0, dmin);\n            dmax = Math.max(0, dmax);\n        }\n        if(goodNumber(dmin)) {\n            collapseMinArray(minArray, dmin, ppadiminus, collapseOpts);\n        }\n        if(goodNumber(dmax)) {\n            collapseMaxArray(maxArray, dmax, ppadiplus, collapseOpts);\n        }\n    }\n\n    // For efficiency covering monotonic or near-monotonic data,\n    // check a few points at both ends first and then sweep\n    // through the middle\n    var iMax = Math.min(6, len);\n    for(i = 0; i < iMax; i++) addItem(i);\n    for(i = len - 1; i >= iMax; i--) addItem(i);\n\n    return {\n        min: minArray,\n        max: maxArray,\n        opts: opts\n    };\n}\n\nfunction collapseMinArray(array, newVal, newPad, opts) {\n    collapseArray(array, newVal, newPad, opts, lessOrEqual);\n}\n\nfunction collapseMaxArray(array, newVal, newPad, opts) {\n    collapseArray(array, newVal, newPad, opts, greaterOrEqual);\n}\n\n/**\n * collapseArray\n *\n * Takes items from 'array' and compares them to 'newVal', 'newPad'.\n *\n * @param {array} array:\n *  current set of min or max extremes\n * @param {number} newVal:\n *  new value to compare against\n * @param {number} newPad:\n *  pad value associated with 'newVal'\n * @param {object} opts:\n *  - tozero {boolean}\n *  - extrapad {number}\n * @param {function} atLeastAsExtreme:\n *  comparison function, use\n *  - lessOrEqual for min 'array' and\n *  - greaterOrEqual for max 'array'\n *\n * In practice, 'array' is either\n *  - 'extremes[ax._id].min' or\n *  - 'extremes[ax._id].max\n *  found in traces and layout items that affect autorange.\n *\n * Since we don't yet know the relationship between pixels and values\n * (that's what we're trying to figure out!) AND we don't yet know how\n * many pixels `extrapad` represents (it's going to be 5% of the length,\n * but we don't want to have to redo calc just because length changed)\n * two point must satisfy three criteria simultaneously for one to supersede the other:\n *  - at least as extreme a `val`\n *  - at least as big a `pad`\n *  - an unpadded point cannot supersede a padded point, but any other combination can\n *\n * Then:\n * - If the item supersedes the new point, set includeThis false\n * - If the new pt supersedes the item, delete it from 'array'\n */\nfunction collapseArray(array, newVal, newPad, opts, atLeastAsExtreme) {\n    var tozero = opts.tozero;\n    var extrapad = opts.extrapad;\n    var includeThis = true;\n\n    for(var j = 0; j < array.length && includeThis; j++) {\n        var v = array[j];\n        if(atLeastAsExtreme(v.val, newVal) && v.pad >= newPad && (v.extrapad || !extrapad)) {\n            includeThis = false;\n            break;\n        } else if(atLeastAsExtreme(newVal, v.val) && v.pad <= newPad && (extrapad || !v.extrapad)) {\n            array.splice(j, 1);\n            j--;\n        }\n    }\n    if(includeThis) {\n        var clipAtZero = (tozero && newVal === 0);\n        array.push({\n            val: newVal,\n            pad: clipAtZero ? 0 : newPad,\n            extrapad: clipAtZero ? false : extrapad\n        });\n    }\n}\n\n// In order to stop overflow errors, don't consider points\n// too close to the limits of js floating point\nfunction goodNumber(v) {\n    return isNumeric(v) && Math.abs(v) < FP_SAFE;\n}\n\nfunction lessOrEqual(v0, v1) { return v0 <= v1; }\nfunction greaterOrEqual(v0, v1) { return v0 >= v1; }\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../registry\":831,\"fast-isnumeric\":224}],751:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\nvar Plots = _dereq_('../../plots/plots');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar Titles = _dereq_('../../components/titles');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\n\nvar axAttrs = _dereq_('./layout_attributes');\nvar cleanTicks = _dereq_('./clean_ticks');\n\nvar constants = _dereq_('../../constants/numerical');\nvar ONEAVGYEAR = constants.ONEAVGYEAR;\nvar ONEAVGMONTH = constants.ONEAVGMONTH;\nvar ONEDAY = constants.ONEDAY;\nvar ONEHOUR = constants.ONEHOUR;\nvar ONEMIN = constants.ONEMIN;\nvar ONESEC = constants.ONESEC;\nvar MINUS_SIGN = constants.MINUS_SIGN;\nvar BADNUM = constants.BADNUM;\n\nvar MID_SHIFT = _dereq_('../../constants/alignment').MID_SHIFT;\nvar LINE_SPACING = _dereq_('../../constants/alignment').LINE_SPACING;\n\nvar axes = module.exports = {};\n\naxes.setConvert = _dereq_('./set_convert');\nvar autoType = _dereq_('./axis_autotype');\n\nvar axisIds = _dereq_('./axis_ids');\naxes.id2name = axisIds.id2name;\naxes.name2id = axisIds.name2id;\naxes.cleanId = axisIds.cleanId;\naxes.list = axisIds.list;\naxes.listIds = axisIds.listIds;\naxes.getFromId = axisIds.getFromId;\naxes.getFromTrace = axisIds.getFromTrace;\n\nvar autorange = _dereq_('./autorange');\naxes.getAutoRange = autorange.getAutoRange;\naxes.findExtremes = autorange.findExtremes;\n\n/*\n * find the list of possible axes to reference with an xref or yref attribute\n * and coerce it to that list\n *\n * attr: the attribute we're generating a reference for. Should end in 'x' or 'y'\n *     but can be prefixed, like 'ax' for annotation's arrow x\n * dflt: the default to coerce to, or blank to use the first axis (falling back on\n *     extraOption if there is no axis)\n * extraOption: aside from existing axes with this letter, what non-axis value is allowed?\n *     Only required if it's different from `dflt`\n */\naxes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption) {\n    var axLetter = attr.charAt(attr.length - 1);\n    var axlist = gd._fullLayout._subplots[axLetter + 'axis'];\n    var refAttr = attr + 'ref';\n    var attrDef = {};\n\n    if(!dflt) dflt = axlist[0] || extraOption;\n    if(!extraOption) extraOption = dflt;\n\n    // data-ref annotations are not supported in gl2d yet\n\n    attrDef[refAttr] = {\n        valType: 'enumerated',\n        values: axlist.concat(extraOption ? [extraOption] : []),\n        dflt: dflt\n    };\n\n    // xref, yref\n    return Lib.coerce(containerIn, containerOut, attrDef, refAttr);\n};\n\n/*\n * coerce position attributes (range-type) that can be either on axes or absolute\n * (paper or pixel) referenced. The biggest complication here is that we don't know\n * before looking at the axis whether the value must be a number or not (it may be\n * a date string), so we can't use the regular valType='number' machinery\n *\n * axRef (string): the axis this position is referenced to, or:\n *     paper: fraction of the plot area\n *     pixel: pixels relative to some starting position\n * attr (string): the attribute in containerOut we are coercing\n * dflt (number): the default position, as a fraction or pixels. If the attribute\n *     is to be axis-referenced, this will be converted to an axis data value\n *\n * Also cleans the values, since the attribute definition itself has to say\n * valType: 'any' to handle date axes. This allows us to accept:\n * - for category axes: category names, and convert them here into serial numbers.\n *   Note that this will NOT work for axis range endpoints, because we don't know\n *   the category list yet (it's set by ax.makeCalcdata during calc)\n *   but it works for component (note, shape, images) positions.\n * - for date axes: JS Dates or milliseconds, and convert to date strings\n * - for other types: coerce them to numbers\n */\naxes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {\n    var cleanPos, pos;\n\n    if(axRef === 'paper' || axRef === 'pixel') {\n        cleanPos = Lib.ensureNumber;\n        pos = coerce(attr, dflt);\n    } else {\n        var ax = axes.getFromId(gd, axRef);\n        dflt = ax.fraction2r(dflt);\n        pos = coerce(attr, dflt);\n        cleanPos = ax.cleanPos;\n    }\n\n    containerOut[attr] = cleanPos(pos);\n};\n\naxes.cleanPosition = function(pos, gd, axRef) {\n    var cleanPos = (axRef === 'paper' || axRef === 'pixel') ?\n        Lib.ensureNumber :\n        axes.getFromId(gd, axRef).cleanPos;\n\n    return cleanPos(pos);\n};\n\naxes.redrawComponents = function(gd, axIds) {\n    axIds = axIds ? axIds : axes.listIds(gd);\n\n    var fullLayout = gd._fullLayout;\n\n    function _redrawOneComp(moduleName, methodName, stashName, shortCircuit) {\n        var method = Registry.getComponentMethod(moduleName, methodName);\n        var stash = {};\n\n        for(var i = 0; i < axIds.length; i++) {\n            var ax = fullLayout[axes.id2name(axIds[i])];\n            var indices = ax[stashName];\n\n            for(var j = 0; j < indices.length; j++) {\n                var ind = indices[j];\n\n                if(!stash[ind]) {\n                    method(gd, ind);\n                    stash[ind] = 1;\n                    // once is enough for images (which doesn't use the `i` arg anyway)\n                    if(shortCircuit) return;\n                }\n            }\n        }\n    }\n\n    // annotations and shapes 'draw' method is slow,\n    // use the finer-grained 'drawOne' method instead\n    _redrawOneComp('annotations', 'drawOne', '_annIndices');\n    _redrawOneComp('shapes', 'drawOne', '_shapeIndices');\n    _redrawOneComp('images', 'draw', '_imgIndices', true);\n};\n\nvar getDataConversions = axes.getDataConversions = function(gd, trace, target, targetArray) {\n    var ax;\n\n    // If target points to an axis, use the type we already have for that\n    // axis to find the data type. Otherwise use the values to autotype.\n    var d2cTarget = (target === 'x' || target === 'y' || target === 'z') ?\n        target :\n        targetArray;\n\n    // In the case of an array target, make a mock data array\n    // and call supplyDefaults to the data type and\n    // setup the data-to-calc method.\n    if(Array.isArray(d2cTarget)) {\n        ax = {\n            type: autoType(targetArray),\n            _categories: []\n        };\n        axes.setConvert(ax);\n\n        // build up ax._categories (usually done during ax.makeCalcdata()\n        if(ax.type === 'category') {\n            for(var i = 0; i < targetArray.length; i++) {\n                ax.d2c(targetArray[i]);\n            }\n        }\n        // TODO what to do for transforms?\n    } else {\n        ax = axes.getFromTrace(gd, trace, d2cTarget);\n    }\n\n    // if 'target' has corresponding axis\n    // -> use setConvert method\n    if(ax) return {d2c: ax.d2c, c2d: ax.c2d};\n\n    // special case for 'ids'\n    // -> cast to String\n    if(d2cTarget === 'ids') return {d2c: toString, c2d: toString};\n\n    // otherwise (e.g. numeric-array of 'marker.color' or 'marker.size')\n    // -> cast to Number\n\n    return {d2c: toNum, c2d: toNum};\n};\n\nfunction toNum(v) { return +v; }\nfunction toString(v) { return String(v); }\n\naxes.getDataToCoordFunc = function(gd, trace, target, targetArray) {\n    return getDataConversions(gd, trace, target, targetArray).d2c;\n};\n\n// get counteraxis letter for this axis (name or id)\n// this can also be used as the id for default counter axis\naxes.counterLetter = function(id) {\n    var axLetter = id.charAt(0);\n    if(axLetter === 'x') return 'y';\n    if(axLetter === 'y') return 'x';\n};\n\n// incorporate a new minimum difference and first tick into\n// forced\n// note that _forceTick0 is linearized, so needs to be turned into\n// a range value for setting tick0\naxes.minDtick = function(ax, newDiff, newFirst, allow) {\n    // doesn't make sense to do forced min dTick on log or category axes,\n    // and the plot itself may decide to cancel (ie non-grouped bars)\n    if(['log', 'category', 'multicategory'].indexOf(ax.type) !== -1 || !allow) {\n        ax._minDtick = 0;\n    } else if(ax._minDtick === undefined) {\n        // undefined means there's nothing there yet\n\n        ax._minDtick = newDiff;\n        ax._forceTick0 = newFirst;\n    } else if(ax._minDtick) {\n        if((ax._minDtick / newDiff + 1e-6) % 1 < 2e-6 &&\n            // existing minDtick is an integer multiple of newDiff\n            // (within rounding err)\n            // and forceTick0 can be shifted to newFirst\n\n                (((newFirst - ax._forceTick0) / newDiff % 1) +\n                    1.000001) % 1 < 2e-6) {\n            ax._minDtick = newDiff;\n            ax._forceTick0 = newFirst;\n        } else if((newDiff / ax._minDtick + 1e-6) % 1 > 2e-6 ||\n            // if the converse is true (newDiff is a multiple of minDtick and\n            // newFirst can be shifted to forceTick0) then do nothing - same\n            // forcing stands. Otherwise, cancel forced minimum\n\n                (((newFirst - ax._forceTick0) / ax._minDtick % 1) +\n                    1.000001) % 1 > 2e-6) {\n            ax._minDtick = 0;\n        }\n    }\n};\n\n// save a copy of the initial axis ranges in fullLayout\n// use them in mode bar and dblclick events\naxes.saveRangeInitial = function(gd, overwrite) {\n    var axList = axes.list(gd, '', true);\n    var hasOneAxisChanged = false;\n\n    for(var i = 0; i < axList.length; i++) {\n        var ax = axList[i];\n        var isNew = (ax._rangeInitial === undefined);\n        var hasChanged = isNew || !(\n            ax.range[0] === ax._rangeInitial[0] &&\n            ax.range[1] === ax._rangeInitial[1]\n        );\n\n        if((isNew && ax.autorange === false) || (overwrite && hasChanged)) {\n            ax._rangeInitial = ax.range.slice();\n            hasOneAxisChanged = true;\n        }\n    }\n\n    return hasOneAxisChanged;\n};\n\n// save a copy of the initial spike visibility\naxes.saveShowSpikeInitial = function(gd, overwrite) {\n    var axList = axes.list(gd, '', true);\n    var hasOneAxisChanged = false;\n    var allSpikesEnabled = 'on';\n\n    for(var i = 0; i < axList.length; i++) {\n        var ax = axList[i];\n        var isNew = (ax._showSpikeInitial === undefined);\n        var hasChanged = isNew || !(ax.showspikes === ax._showspikes);\n\n        if(isNew || (overwrite && hasChanged)) {\n            ax._showSpikeInitial = ax.showspikes;\n            hasOneAxisChanged = true;\n        }\n\n        if(allSpikesEnabled === 'on' && !ax.showspikes) {\n            allSpikesEnabled = 'off';\n        }\n    }\n    gd._fullLayout._cartesianSpikesEnabled = allSpikesEnabled;\n    return hasOneAxisChanged;\n};\n\naxes.autoBin = function(data, ax, nbins, is2d, calendar, size) {\n    var dataMin = Lib.aggNums(Math.min, null, data);\n    var dataMax = Lib.aggNums(Math.max, null, data);\n\n    if(ax.type === 'category' || ax.type === 'multicategory') {\n        return {\n            start: dataMin - 0.5,\n            end: dataMax + 0.5,\n            size: Math.max(1, Math.round(size) || 1),\n            _dataSpan: dataMax - dataMin,\n        };\n    }\n\n    if(!calendar) calendar = ax.calendar;\n\n    // piggyback off tick code to make \"nice\" bin sizes and edges\n    var dummyAx;\n    if(ax.type === 'log') {\n        dummyAx = {\n            type: 'linear',\n            range: [dataMin, dataMax]\n        };\n    } else {\n        dummyAx = {\n            type: ax.type,\n            range: Lib.simpleMap([dataMin, dataMax], ax.c2r, 0, calendar),\n            calendar: calendar\n        };\n    }\n    axes.setConvert(dummyAx);\n\n    size = size && cleanTicks.dtick(size, dummyAx.type);\n\n    if(size) {\n        dummyAx.dtick = size;\n        dummyAx.tick0 = cleanTicks.tick0(undefined, dummyAx.type, calendar);\n    } else {\n        var size0;\n        if(nbins) size0 = ((dataMax - dataMin) / nbins);\n        else {\n            // totally auto: scale off std deviation so the highest bin is\n            // somewhat taller than the total number of bins, but don't let\n            // the size get smaller than the 'nice' rounded down minimum\n            // difference between values\n            var distinctData = Lib.distinctVals(data);\n            var msexp = Math.pow(10, Math.floor(\n                Math.log(distinctData.minDiff) / Math.LN10));\n            var minSize = msexp * Lib.roundUp(\n                distinctData.minDiff / msexp, [0.9, 1.9, 4.9, 9.9], true);\n            size0 = Math.max(minSize, 2 * Lib.stdev(data) /\n                Math.pow(data.length, is2d ? 0.25 : 0.4));\n\n            // fallback if ax.d2c output BADNUMs\n            // e.g. when user try to plot categorical bins\n            // on a layout.xaxis.type: 'linear'\n            if(!isNumeric(size0)) size0 = 1;\n        }\n\n        axes.autoTicks(dummyAx, size0);\n    }\n\n    var finalSize = dummyAx.dtick;\n    var binStart = axes.tickIncrement(\n            axes.tickFirst(dummyAx), finalSize, 'reverse', calendar);\n    var binEnd, bincount;\n\n    // check for too many data points right at the edges of bins\n    // (>50% within 1% of bin edges) or all data points integral\n    // and offset the bins accordingly\n    if(typeof finalSize === 'number') {\n        binStart = autoShiftNumericBins(binStart, data, dummyAx, dataMin, dataMax);\n\n        bincount = 1 + Math.floor((dataMax - binStart) / finalSize);\n        binEnd = binStart + bincount * finalSize;\n    } else {\n        // month ticks - should be the only nonlinear kind we have at this point.\n        // dtick (as supplied by axes.autoTick) only has nonlinear values on\n        // date and log axes, but even if you display a histogram on a log axis\n        // we bin it on a linear axis (which one could argue against, but that's\n        // a separate issue)\n        if(dummyAx.dtick.charAt(0) === 'M') {\n            binStart = autoShiftMonthBins(binStart, data, finalSize, dataMin, calendar);\n        }\n\n        // calculate the endpoint for nonlinear ticks - you have to\n        // just increment until you're done\n        binEnd = binStart;\n        bincount = 0;\n        while(binEnd <= dataMax) {\n            binEnd = axes.tickIncrement(binEnd, finalSize, false, calendar);\n            bincount++;\n        }\n    }\n\n    return {\n        start: ax.c2r(binStart, 0, calendar),\n        end: ax.c2r(binEnd, 0, calendar),\n        size: finalSize,\n        _dataSpan: dataMax - dataMin\n    };\n};\n\n\nfunction autoShiftNumericBins(binStart, data, ax, dataMin, dataMax) {\n    var edgecount = 0;\n    var midcount = 0;\n    var intcount = 0;\n    var blankCount = 0;\n\n    function nearEdge(v) {\n        // is a value within 1% of a bin edge?\n        return (1 + (v - binStart) * 100 / ax.dtick) % 100 < 2;\n    }\n\n    for(var i = 0; i < data.length; i++) {\n        if(data[i] % 1 === 0) intcount++;\n        else if(!isNumeric(data[i])) blankCount++;\n\n        if(nearEdge(data[i])) edgecount++;\n        if(nearEdge(data[i] + ax.dtick / 2)) midcount++;\n    }\n    var dataCount = data.length - blankCount;\n\n    if(intcount === dataCount && ax.type !== 'date') {\n        if(ax.dtick < 1) {\n            // all integers: if bin size is <1, it's because\n            // that was specifically requested (large nbins)\n            // so respect that... but center the bins containing\n            // integers on those integers\n\n            binStart = dataMin - 0.5 * ax.dtick;\n        } else {\n            // otherwise start half an integer down regardless of\n            // the bin size, just enough to clear up endpoint\n            // ambiguity about which integers are in which bins.\n\n            binStart -= 0.5;\n            if(binStart + ax.dtick < dataMin) binStart += ax.dtick;\n        }\n    } else if(midcount < dataCount * 0.1) {\n        if(edgecount > dataCount * 0.3 ||\n                nearEdge(dataMin) || nearEdge(dataMax)) {\n            // lots of points at the edge, not many in the middle\n            // shift half a bin\n            var binshift = ax.dtick / 2;\n            binStart += (binStart + binshift < dataMin) ? binshift : -binshift;\n        }\n    }\n    return binStart;\n}\n\n\nfunction autoShiftMonthBins(binStart, data, dtick, dataMin, calendar) {\n    var stats = Lib.findExactDates(data, calendar);\n    // number of data points that needs to be an exact value\n    // to shift that increment to (near) the bin center\n    var threshold = 0.8;\n\n    if(stats.exactDays > threshold) {\n        var numMonths = Number(dtick.substr(1));\n\n        if((stats.exactYears > threshold) && (numMonths % 12 === 0)) {\n            // The exact middle of a non-leap-year is 1.5 days into July\n            // so if we start the bins here, all but leap years will\n            // get hover-labeled as exact years.\n            binStart = axes.tickIncrement(binStart, 'M6', 'reverse') + ONEDAY * 1.5;\n        } else if(stats.exactMonths > threshold) {\n            // Months are not as clean, but if we shift half the *longest*\n            // month (31/2 days) then 31-day months will get labeled exactly\n            // and shorter months will get labeled with the correct month\n            // but shifted 12-36 hours into it.\n            binStart = axes.tickIncrement(binStart, 'M1', 'reverse') + ONEDAY * 15.5;\n        } else {\n            // Shifting half a day is exact, but since these are month bins it\n            // will always give a somewhat odd-looking label, until we do something\n            // smarter like showing the bin boundaries (or the bounds of the actual\n            // data in each bin)\n            binStart -= ONEDAY / 2;\n        }\n        var nextBinStart = axes.tickIncrement(binStart, dtick);\n\n        if(nextBinStart <= dataMin) return nextBinStart;\n    }\n    return binStart;\n}\n\n// ----------------------------------------------------\n// Ticks and grids\n// ----------------------------------------------------\n\n// ensure we have tick0, dtick, and tick rounding calculated\naxes.prepTicks = function(ax) {\n    var rng = Lib.simpleMap(ax.range, ax.r2l);\n\n    // calculate max number of (auto) ticks to display based on plot size\n    if(ax.tickmode === 'auto' || !ax.dtick) {\n        var nt = ax.nticks;\n        var minPx;\n\n        if(!nt) {\n            if(ax.type === 'category' || ax.type === 'multicategory') {\n                minPx = ax.tickfont ? (ax.tickfont.size || 12) * 1.2 : 15;\n                nt = ax._length / minPx;\n            } else {\n                minPx = ax._id.charAt(0) === 'y' ? 40 : 80;\n                nt = Lib.constrain(ax._length / minPx, 4, 9) + 1;\n            }\n\n            // radial axes span half their domain,\n            // multiply nticks value by two to get correct number of auto ticks.\n            if(ax._name === 'radialaxis') nt *= 2;\n        }\n\n        // add a couple of extra digits for filling in ticks when we\n        // have explicit tickvals without tick text\n        if(ax.tickmode === 'array') nt *= 100;\n\n        axes.autoTicks(ax, Math.abs(rng[1] - rng[0]) / nt);\n        // check for a forced minimum dtick\n        if(ax._minDtick > 0 && ax.dtick < ax._minDtick * 2) {\n            ax.dtick = ax._minDtick;\n            ax.tick0 = ax.l2r(ax._forceTick0);\n        }\n    }\n\n    // check for missing tick0\n    if(!ax.tick0) {\n        ax.tick0 = (ax.type === 'date') ? '2000-01-01' : 0;\n    }\n\n    // ensure we don't try to make ticks below our minimum precision\n    // see https://github.com/plotly/plotly.js/issues/2892\n    if(ax.type === 'date' && ax.dtick < 0.1) ax.dtick = 0.1;\n\n    // now figure out rounding of tick values\n    autoTickRound(ax);\n};\n\n// calculate the ticks: text, values, positioning\n// if ticks are set to automatic, determine the right values (tick0,dtick)\n// in any case, set tickround to # of digits to round tick labels to,\n// or codes to this effect for log and date scales\naxes.calcTicks = function calcTicks(ax) {\n    axes.prepTicks(ax);\n    var rng = Lib.simpleMap(ax.range, ax.r2l);\n\n    // now that we've figured out the auto values for formatting\n    // in case we're missing some ticktext, we can break out for array ticks\n    if(ax.tickmode === 'array') return arrayTicks(ax);\n\n    // find the first tick\n    ax._tmin = axes.tickFirst(ax);\n\n    // add a tiny bit so we get ticks which may have rounded out\n    var startTick = rng[0] * 1.0001 - rng[1] * 0.0001;\n    var endTick = rng[1] * 1.0001 - rng[0] * 0.0001;\n    // check for reversed axis\n    var axrev = (rng[1] < rng[0]);\n\n    // No visible ticks? Quit.\n    // I've only seen this on category axes with all categories off the edge.\n    if((ax._tmin < startTick) !== axrev) return [];\n\n    // return the full set of tick vals\n    var vals = [];\n    if(ax.type === 'category' || ax.type === 'multicategory') {\n        endTick = (axrev) ? Math.max(-0.5, endTick) :\n            Math.min(ax._categories.length - 0.5, endTick);\n    }\n\n    var xPrevious = null;\n    var maxTicks = Math.max(1000, ax._length || 0);\n    for(var x = ax._tmin;\n            (axrev) ? (x >= endTick) : (x <= endTick);\n            x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)) {\n        // prevent infinite loops - no more than one tick per pixel,\n        // and make sure each value is different from the previous\n        if(vals.length > maxTicks || x === xPrevious) break;\n        xPrevious = x;\n\n        vals.push(x);\n    }\n\n    // If same angle over a full circle, the last tick vals is a duplicate.\n    // TODO must do something similar for angular date axes.\n    if(isAngular(ax) && Math.abs(rng[1] - rng[0]) === 360) {\n        vals.pop();\n    }\n\n    // save the last tick as well as first, so we can\n    // show the exponent only on the last one\n    ax._tmax = vals[vals.length - 1];\n\n    // for showing the rest of a date when the main tick label is only the\n    // latter part: ax._prevDateHead holds what we showed most recently.\n    // Start with it cleared and mark that we're in calcTicks (ie calculating a\n    // whole string of these so we should care what the previous date head was!)\n    ax._prevDateHead = '';\n    ax._inCalcTicks = true;\n\n    var ticksOut = new Array(vals.length);\n    for(var i = 0; i < vals.length; i++) ticksOut[i] = axes.tickText(ax, vals[i]);\n\n    ax._inCalcTicks = false;\n\n    return ticksOut;\n};\n\nfunction arrayTicks(ax) {\n    var vals = ax.tickvals;\n    var text = ax.ticktext;\n    var ticksOut = new Array(vals.length);\n    var rng = Lib.simpleMap(ax.range, ax.r2l);\n    var r0expanded = rng[0] * 1.0001 - rng[1] * 0.0001;\n    var r1expanded = rng[1] * 1.0001 - rng[0] * 0.0001;\n    var tickMin = Math.min(r0expanded, r1expanded);\n    var tickMax = Math.max(r0expanded, r1expanded);\n    var j = 0;\n\n    // without a text array, just format the given values as any other ticks\n    // except with more precision to the numbers\n    if(!Array.isArray(text)) text = [];\n\n    // make sure showing ticks doesn't accidentally add new categories\n    // TODO multicategory, if we allow ticktext / tickvals\n    var tickVal2l = ax.type === 'category' ? ax.d2l_noadd : ax.d2l;\n\n    // array ticks on log axes always show the full number\n    // (if no explicit ticktext overrides it)\n    if(ax.type === 'log' && String(ax.dtick).charAt(0) !== 'L') {\n        ax.dtick = 'L' + Math.pow(10, Math.floor(Math.min(ax.range[0], ax.range[1])) - 1);\n    }\n\n    for(var i = 0; i < vals.length; i++) {\n        var vali = tickVal2l(vals[i]);\n        if(vali > tickMin && vali < tickMax) {\n            if(text[i] === undefined) ticksOut[j] = axes.tickText(ax, vali);\n            else ticksOut[j] = tickTextObj(ax, vali, String(text[i]));\n            j++;\n        }\n    }\n\n    if(j < vals.length) ticksOut.splice(j, vals.length - j);\n\n    return ticksOut;\n}\n\nvar roundBase10 = [2, 5, 10];\nvar roundBase24 = [1, 2, 3, 6, 12];\nvar roundBase60 = [1, 2, 5, 10, 15, 30];\n// 2&3 day ticks are weird, but need something btwn 1&7\nvar roundDays = [1, 2, 3, 7, 14];\n// approx. tick positions for log axes, showing all (1) and just 1, 2, 5 (2)\n// these don't have to be exact, just close enough to round to the right value\nvar roundLog1 = [-0.046, 0, 0.301, 0.477, 0.602, 0.699, 0.778, 0.845, 0.903, 0.954, 1];\nvar roundLog2 = [-0.301, 0, 0.301, 0.699, 1];\n// N.B. `thetaunit; 'radians' angular axes must be converted to degrees\nvar roundAngles = [15, 30, 45, 90, 180];\n\nfunction roundDTick(roughDTick, base, roundingSet) {\n    return base * Lib.roundUp(roughDTick / base, roundingSet);\n}\n\n// autoTicks: calculate best guess at pleasant ticks for this axis\n// inputs:\n//      ax - an axis object\n//      roughDTick - rough tick spacing (to be turned into a nice round number)\n// outputs (into ax):\n//   tick0: starting point for ticks (not necessarily on the graph)\n//      usually 0 for numeric (=10^0=1 for log) or jan 1, 2000 for dates\n//   dtick: the actual, nice round tick spacing, usually a little larger than roughDTick\n//      if the ticks are spaced linearly (linear scale, categories,\n//          log with only full powers, date ticks < month),\n//          this will just be a number\n//      months: M#\n//      years: M# where # is 12*number of years\n//      log with linear ticks: L# where # is the linear tick spacing\n//      log showing powers plus some intermediates:\n//          D1 shows all digits, D2 shows 2 and 5\naxes.autoTicks = function(ax, roughDTick) {\n    var base;\n\n    function getBase(v) {\n        return Math.pow(v, Math.floor(Math.log(roughDTick) / Math.LN10));\n    }\n\n    if(ax.type === 'date') {\n        ax.tick0 = Lib.dateTick0(ax.calendar);\n        // the criteria below are all based on the rough spacing we calculate\n        // being > half of the final unit - so precalculate twice the rough val\n        var roughX2 = 2 * roughDTick;\n\n        if(roughX2 > ONEAVGYEAR) {\n            roughDTick /= ONEAVGYEAR;\n            base = getBase(10);\n            ax.dtick = 'M' + (12 * roundDTick(roughDTick, base, roundBase10));\n        } else if(roughX2 > ONEAVGMONTH) {\n            roughDTick /= ONEAVGMONTH;\n            ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);\n        } else if(roughX2 > ONEDAY) {\n            ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);\n            // get week ticks on sunday\n            // this will also move the base tick off 2000-01-01 if dtick is\n            // 2 or 3 days... but that's a weird enough case that we'll ignore it.\n            ax.tick0 = Lib.dateTick0(ax.calendar, true);\n        } else if(roughX2 > ONEHOUR) {\n            ax.dtick = roundDTick(roughDTick, ONEHOUR, roundBase24);\n        } else if(roughX2 > ONEMIN) {\n            ax.dtick = roundDTick(roughDTick, ONEMIN, roundBase60);\n        } else if(roughX2 > ONESEC) {\n            ax.dtick = roundDTick(roughDTick, ONESEC, roundBase60);\n        } else {\n            // milliseconds\n            base = getBase(10);\n            ax.dtick = roundDTick(roughDTick, base, roundBase10);\n        }\n    } else if(ax.type === 'log') {\n        ax.tick0 = 0;\n        var rng = Lib.simpleMap(ax.range, ax.r2l);\n\n        if(roughDTick > 0.7) {\n            // only show powers of 10\n            ax.dtick = Math.ceil(roughDTick);\n        } else if(Math.abs(rng[1] - rng[0]) < 1) {\n            // span is less than one power of 10\n            var nt = 1.5 * Math.abs((rng[1] - rng[0]) / roughDTick);\n\n            // ticks on a linear scale, labeled fully\n            roughDTick = Math.abs(Math.pow(10, rng[1]) -\n                Math.pow(10, rng[0])) / nt;\n            base = getBase(10);\n            ax.dtick = 'L' + roundDTick(roughDTick, base, roundBase10);\n        } else {\n            // include intermediates between powers of 10,\n            // labeled with small digits\n            // ax.dtick = \"D2\" (show 2 and 5) or \"D1\" (show all digits)\n            ax.dtick = (roughDTick > 0.3) ? 'D2' : 'D1';\n        }\n    } else if(ax.type === 'category' || ax.type === 'multicategory') {\n        ax.tick0 = 0;\n        ax.dtick = Math.ceil(Math.max(roughDTick, 1));\n    } else if(isAngular(ax)) {\n        ax.tick0 = 0;\n        base = 1;\n        ax.dtick = roundDTick(roughDTick, base, roundAngles);\n    } else {\n        // auto ticks always start at 0\n        ax.tick0 = 0;\n        base = getBase(10);\n        ax.dtick = roundDTick(roughDTick, base, roundBase10);\n    }\n\n    // prevent infinite loops\n    if(ax.dtick === 0) ax.dtick = 1;\n\n    // TODO: this is from log axis histograms with autorange off\n    if(!isNumeric(ax.dtick) && typeof ax.dtick !== 'string') {\n        var olddtick = ax.dtick;\n        ax.dtick = 1;\n        throw 'ax.dtick error: ' + String(olddtick);\n    }\n};\n\n// after dtick is already known, find tickround = precision\n// to display in tick labels\n//   for numeric ticks, integer # digits after . to round to\n//   for date ticks, the last date part to show (y,m,d,H,M,S)\n//      or an integer # digits past seconds\nfunction autoTickRound(ax) {\n    var dtick = ax.dtick;\n\n    ax._tickexponent = 0;\n    if(!isNumeric(dtick) && typeof dtick !== 'string') {\n        dtick = 1;\n    }\n\n    if(ax.type === 'category' || ax.type === 'multicategory') {\n        ax._tickround = null;\n    }\n    if(ax.type === 'date') {\n        // If tick0 is unusual, give tickround a bit more information\n        // not necessarily *all* the information in tick0 though, if it's really odd\n        // minimal string length for tick0: 'd' is 10, 'M' is 16, 'S' is 19\n        // take off a leading minus (year < 0) and i (intercalary month) so length is consistent\n        var tick0ms = ax.r2l(ax.tick0);\n        var tick0str = ax.l2r(tick0ms).replace(/(^-|i)/g, '');\n        var tick0len = tick0str.length;\n\n        if(String(dtick).charAt(0) === 'M') {\n            // any tick0 more specific than a year: alway show the full date\n            if(tick0len > 10 || tick0str.substr(5) !== '01-01') ax._tickround = 'd';\n            // show the month unless ticks are full multiples of a year\n            else ax._tickround = (+(dtick.substr(1)) % 12 === 0) ? 'y' : 'm';\n        } else if((dtick >= ONEDAY && tick0len <= 10) || (dtick >= ONEDAY * 15)) ax._tickround = 'd';\n        else if((dtick >= ONEMIN && tick0len <= 16) || (dtick >= ONEHOUR)) ax._tickround = 'M';\n        else if((dtick >= ONESEC && tick0len <= 19) || (dtick >= ONEMIN)) ax._tickround = 'S';\n        else {\n            // tickround is a number of digits of fractional seconds\n            // of any two adjacent ticks, at least one will have the maximum fractional digits\n            // of all possible ticks - so take the max. length of tick0 and the next one\n            var tick1len = ax.l2r(tick0ms + dtick).replace(/^-/, '').length;\n            ax._tickround = Math.max(tick0len, tick1len) - 20;\n\n            // We shouldn't get here... but in case there's a situation I'm\n            // not thinking of where tick0str and tick1str are identical or\n            // something, fall back on maximum precision\n            if(ax._tickround < 0) ax._tickround = 4;\n        }\n    } else if(isNumeric(dtick) || dtick.charAt(0) === 'L') {\n        // linear or log (except D1, D2)\n        var rng = ax.range.map(ax.r2d || Number);\n        if(!isNumeric(dtick)) dtick = Number(dtick.substr(1));\n        // 2 digits past largest digit of dtick\n        ax._tickround = 2 - Math.floor(Math.log(dtick) / Math.LN10 + 0.01);\n\n        var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1]));\n\n        var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01);\n        if(Math.abs(rangeexp) > 3) {\n            if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) {\n                ax._tickexponent = 3 * Math.round((rangeexp - 1) / 3);\n            } else ax._tickexponent = rangeexp;\n        }\n    } else {\n        // D1 or D2 (log)\n        ax._tickround = null;\n    }\n}\n\n// months and years don't have constant millisecond values\n// (but a year is always 12 months so we only need months)\n// log-scale ticks are also not consistently spaced, except\n// for pure powers of 10\n// numeric ticks always have constant differences, other datetime ticks\n// can all be calculated as constant number of milliseconds\naxes.tickIncrement = function(x, dtick, axrev, calendar) {\n    var axSign = axrev ? -1 : 1;\n\n    // includes linear, all dates smaller than month, and pure 10^n in log\n    if(isNumeric(dtick)) return x + axSign * dtick;\n\n    // everything else is a string, one character plus a number\n    var tType = dtick.charAt(0);\n    var dtSigned = axSign * Number(dtick.substr(1));\n\n    // Dates: months (or years - see Lib.incrementMonth)\n    if(tType === 'M') return Lib.incrementMonth(x, dtSigned, calendar);\n\n    // Log scales: Linear, Digits\n    else if(tType === 'L') return Math.log(Math.pow(10, x) + dtSigned) / Math.LN10;\n\n    // log10 of 2,5,10, or all digits (logs just have to be\n    // close enough to round)\n    else if(tType === 'D') {\n        var tickset = (dtick === 'D2') ? roundLog2 : roundLog1;\n        var x2 = x + axSign * 0.01;\n        var frac = Lib.roundUp(Lib.mod(x2, 1), tickset, axrev);\n\n        return Math.floor(x2) +\n            Math.log(d3.round(Math.pow(10, frac), 1)) / Math.LN10;\n    } else throw 'unrecognized dtick ' + String(dtick);\n};\n\n// calculate the first tick on an axis\naxes.tickFirst = function(ax) {\n    var r2l = ax.r2l || Number;\n    var rng = Lib.simpleMap(ax.range, r2l);\n    var axrev = rng[1] < rng[0];\n    var sRound = axrev ? Math.floor : Math.ceil;\n    // add a tiny extra bit to make sure we get ticks\n    // that may have been rounded out\n    var r0 = rng[0] * 1.0001 - rng[1] * 0.0001;\n    var dtick = ax.dtick;\n    var tick0 = r2l(ax.tick0);\n\n    if(isNumeric(dtick)) {\n        var tmin = sRound((r0 - tick0) / dtick) * dtick + tick0;\n\n        // make sure no ticks outside the category list\n        if(ax.type === 'category' || ax.type === 'multicategory') {\n            tmin = Lib.constrain(tmin, 0, ax._categories.length - 1);\n        }\n        return tmin;\n    }\n\n    var tType = dtick.charAt(0);\n    var dtNum = Number(dtick.substr(1));\n\n    // Dates: months (or years)\n    if(tType === 'M') {\n        var cnt = 0;\n        var t0 = tick0;\n        var t1, mult, newDTick;\n\n        // This algorithm should work for *any* nonlinear (but close to linear!)\n        // tick spacing. Limit to 10 iterations, for gregorian months it's normally <=3.\n        while(cnt < 10) {\n            t1 = axes.tickIncrement(t0, dtick, axrev, ax.calendar);\n            if((t1 - r0) * (t0 - r0) <= 0) {\n                // t1 and t0 are on opposite sides of r0! we've succeeded!\n                if(axrev) return Math.min(t0, t1);\n                return Math.max(t0, t1);\n            }\n            mult = (r0 - ((t0 + t1) / 2)) / (t1 - t0);\n            newDTick = tType + ((Math.abs(Math.round(mult)) || 1) * dtNum);\n            t0 = axes.tickIncrement(t0, newDTick, mult < 0 ? !axrev : axrev, ax.calendar);\n            cnt++;\n        }\n        Lib.error('tickFirst did not converge', ax);\n        return t0;\n    } else if(tType === 'L') {\n        // Log scales: Linear, Digits\n\n        return Math.log(sRound(\n            (Math.pow(10, r0) - tick0) / dtNum) * dtNum + tick0) / Math.LN10;\n    } else if(tType === 'D') {\n        var tickset = (dtick === 'D2') ? roundLog2 : roundLog1;\n        var frac = Lib.roundUp(Lib.mod(r0, 1), tickset, axrev);\n\n        return Math.floor(r0) +\n            Math.log(d3.round(Math.pow(10, frac), 1)) / Math.LN10;\n    } else throw 'unrecognized dtick ' + String(dtick);\n};\n\n// draw the text for one tick.\n// px,py are the location on gd.paper\n// prefix is there so the x axis ticks can be dropped a line\n// ax is the axis layout, x is the tick value\n// hover is a (truthy) flag for whether to show numbers with a bit\n// more precision for hovertext\naxes.tickText = function(ax, x, hover) {\n    var out = tickTextObj(ax, x);\n    var arrayMode = ax.tickmode === 'array';\n    var extraPrecision = hover || arrayMode;\n    var axType = ax.type;\n    // TODO multicategory, if we allow ticktext / tickvals\n    var tickVal2l = axType === 'category' ? ax.d2l_noadd : ax.d2l;\n    var i;\n\n    if(arrayMode && Array.isArray(ax.ticktext)) {\n        var rng = Lib.simpleMap(ax.range, ax.r2l);\n        var minDiff = Math.abs(rng[1] - rng[0]) / 10000;\n\n        for(i = 0; i < ax.ticktext.length; i++) {\n            if(Math.abs(x - tickVal2l(ax.tickvals[i])) < minDiff) break;\n        }\n        if(i < ax.ticktext.length) {\n            out.text = String(ax.ticktext[i]);\n            return out;\n        }\n    }\n\n    function isHidden(showAttr) {\n        if(showAttr === undefined) return true;\n        if(hover) return showAttr === 'none';\n\n        var firstOrLast = {\n            first: ax._tmin,\n            last: ax._tmax\n        }[showAttr];\n\n        return showAttr !== 'all' && x !== firstOrLast;\n    }\n\n    var hideexp = hover ?\n        'never' :\n        ax.exponentformat !== 'none' && isHidden(ax.showexponent) ? 'hide' : '';\n\n    if(axType === 'date') formatDate(ax, out, hover, extraPrecision);\n    else if(axType === 'log') formatLog(ax, out, hover, extraPrecision, hideexp);\n    else if(axType === 'category') formatCategory(ax, out);\n    else if(axType === 'multicategory') formatMultiCategory(ax, out, hover);\n    else if(isAngular(ax)) formatAngle(ax, out, hover, extraPrecision, hideexp);\n    else formatLinear(ax, out, hover, extraPrecision, hideexp);\n\n    // add prefix and suffix\n    if(ax.tickprefix && !isHidden(ax.showtickprefix)) out.text = ax.tickprefix + out.text;\n    if(ax.ticksuffix && !isHidden(ax.showticksuffix)) out.text += ax.ticksuffix;\n\n    // Setup ticks and grid lines boundaries\n    // at 1/2 a 'category' to the left/bottom\n    if(ax.tickson === 'boundaries' || ax.showdividers) {\n        var inbounds = function(v) {\n            var p = ax.l2p(v);\n            return p >= 0 && p <= ax._length ? v : null;\n        };\n\n        out.xbnd = [\n            inbounds(out.x - 0.5),\n            inbounds(out.x + ax.dtick - 0.5)\n        ];\n    }\n\n    return out;\n};\n\n/**\n * create text for a hover label on this axis, with special handling of\n * log axes (where negative values can't be displayed but can appear in hover text)\n *\n * @param {object} ax: the axis to format text for\n * @param {number} val: calcdata value to format\n * @param {Optional(number)} val2: a second value to display\n *\n * @returns {string} `val` formatted as a string appropriate to this axis, or\n *     `val` and `val2` as a range (ie '<val> - <val2>') if `val2` is provided and\n *     it's different from `val`.\n */\naxes.hoverLabelText = function(ax, val, val2) {\n    if(val2 !== BADNUM && val2 !== val) {\n        return axes.hoverLabelText(ax, val) + ' - ' + axes.hoverLabelText(ax, val2);\n    }\n\n    var logOffScale = (ax.type === 'log' && val <= 0);\n    var tx = axes.tickText(ax, ax.c2l(logOffScale ? -val : val), 'hover').text;\n\n    if(logOffScale) {\n        return val === 0 ? '0' : MINUS_SIGN + tx;\n    }\n\n    // TODO: should we do something special if the axis calendar and\n    // the data calendar are different? Somehow display both dates with\n    // their system names? Right now it will just display in the axis calendar\n    // but users could add the other one as text.\n    return tx;\n};\n\nfunction tickTextObj(ax, x, text) {\n    var tf = ax.tickfont || {};\n\n    return {\n        x: x,\n        dx: 0,\n        dy: 0,\n        text: text || '',\n        fontSize: tf.size,\n        font: tf.family,\n        fontColor: tf.color\n    };\n}\n\nfunction formatDate(ax, out, hover, extraPrecision) {\n    var tr = ax._tickround;\n    var fmt = (hover && ax.hoverformat) || axes.getTickFormat(ax);\n\n    if(extraPrecision) {\n        // second or sub-second precision: extra always shows max digits.\n        // for other fields, extra precision just adds one field.\n        if(isNumeric(tr)) tr = 4;\n        else tr = {y: 'm', m: 'd', d: 'M', M: 'S', S: 4}[tr];\n    }\n\n    var dateStr = Lib.formatDate(out.x, fmt, tr, ax._dateFormat, ax.calendar, ax._extraFormat);\n    var headStr;\n\n    var splitIndex = dateStr.indexOf('\\n');\n    if(splitIndex !== -1) {\n        headStr = dateStr.substr(splitIndex + 1);\n        dateStr = dateStr.substr(0, splitIndex);\n    }\n\n    if(extraPrecision) {\n        // if extraPrecision led to trailing zeros, strip them off\n        // actually, this can lead to removing even more zeros than\n        // in the original rounding, but that's fine because in these\n        // contexts uniformity is not so important (if there's even\n        // anything to be uniform with!)\n\n        // can we remove the whole time part?\n        if(dateStr === '00:00:00' || dateStr === '00:00') {\n            dateStr = headStr;\n            headStr = '';\n        } else if(dateStr.length === 8) {\n            // strip off seconds if they're zero (zero fractional seconds\n            // are already omitted)\n            // but we never remove minutes and leave just hours\n            dateStr = dateStr.replace(/:00$/, '');\n        }\n    }\n\n    if(headStr) {\n        if(hover) {\n            // hover puts it all on one line, so headPart works best up front\n            // except for year headPart: turn this into \"Jan 1, 2000\" etc.\n            if(tr === 'd') dateStr += ', ' + headStr;\n            else dateStr = headStr + (dateStr ? ', ' + dateStr : '');\n        } else if(!ax._inCalcTicks || (headStr !== ax._prevDateHead)) {\n            dateStr += '<br>' + headStr;\n            ax._prevDateHead = headStr;\n        }\n    }\n\n    out.text = dateStr;\n}\n\nfunction formatLog(ax, out, hover, extraPrecision, hideexp) {\n    var dtick = ax.dtick;\n    var x = out.x;\n    var tickformat = ax.tickformat;\n    var dtChar0 = typeof dtick === 'string' && dtick.charAt(0);\n\n    if(hideexp === 'never') {\n        // If this is a hover label, then we must *never* hide the exponent\n        // for the sake of display, which could give the wrong value by\n        // potentially many orders of magnitude. If hideexp was 'never', then\n        // it's now succeeded by preventing the other condition from automating\n        // this choice. Thus we can unset it so that the axis formatting takes\n        // precedence.\n        hideexp = '';\n    }\n\n    if(extraPrecision && (dtChar0 !== 'L')) {\n        dtick = 'L3';\n        dtChar0 = 'L';\n    }\n\n    if(tickformat || (dtChar0 === 'L')) {\n        out.text = numFormat(Math.pow(10, x), ax, hideexp, extraPrecision);\n    } else if(isNumeric(dtick) || ((dtChar0 === 'D') && (Lib.mod(x + 0.01, 1) < 0.1))) {\n        var p = Math.round(x);\n        var absP = Math.abs(p);\n        var exponentFormat = ax.exponentformat;\n        if(exponentFormat === 'power' || (isSIFormat(exponentFormat) && beyondSI(p))) {\n            if(p === 0) out.text = 1;\n            else if(p === 1) out.text = '10';\n            else out.text = '10<sup>' + (p > 1 ? '' : MINUS_SIGN) + absP + '</sup>';\n\n            out.fontSize *= 1.25;\n        } else if((exponentFormat === 'e' || exponentFormat === 'E') && absP > 2) {\n            out.text = '1' + exponentFormat + (p > 0 ? '+' : MINUS_SIGN) + absP;\n        } else {\n            out.text = numFormat(Math.pow(10, x), ax, '', 'fakehover');\n            if(dtick === 'D1' && ax._id.charAt(0) === 'y') {\n                out.dy -= out.fontSize / 6;\n            }\n        }\n    } else if(dtChar0 === 'D') {\n        out.text = String(Math.round(Math.pow(10, Lib.mod(x, 1))));\n        out.fontSize *= 0.75;\n    } else throw 'unrecognized dtick ' + String(dtick);\n\n    // if 9's are printed on log scale, move the 10's away a bit\n    if(ax.dtick === 'D1') {\n        var firstChar = String(out.text).charAt(0);\n        if(firstChar === '0' || firstChar === '1') {\n            if(ax._id.charAt(0) === 'y') {\n                out.dx -= out.fontSize / 4;\n            } else {\n                out.dy += out.fontSize / 2;\n                out.dx += (ax.range[1] > ax.range[0] ? 1 : -1) *\n                    out.fontSize * (x < 0 ? 0.5 : 0.25);\n            }\n        }\n    }\n}\n\nfunction formatCategory(ax, out) {\n    var tt = ax._categories[Math.round(out.x)];\n    if(tt === undefined) tt = '';\n    out.text = String(tt);\n}\n\nfunction formatMultiCategory(ax, out, hover) {\n    var v = Math.round(out.x);\n    var cats = ax._categories[v] || [];\n    var tt = cats[1] === undefined ? '' : String(cats[1]);\n    var tt2 = cats[0] === undefined ? '' : String(cats[0]);\n\n    if(hover) {\n        // TODO is this what we want?\n        out.text = tt2 + ' - ' + tt;\n    } else {\n        // setup for secondary labels\n        out.text = tt;\n        out.text2 = tt2;\n    }\n}\n\nfunction formatLinear(ax, out, hover, extraPrecision, hideexp) {\n    if(hideexp === 'never') {\n        // If this is a hover label, then we must *never* hide the exponent\n        // for the sake of display, which could give the wrong value by\n        // potentially many orders of magnitude. If hideexp was 'never', then\n        // it's now succeeded by preventing the other condition from automating\n        // this choice. Thus we can unset it so that the axis formatting takes\n        // precedence.\n        hideexp = '';\n    } else if(ax.showexponent === 'all' && Math.abs(out.x / ax.dtick) < 1e-6) {\n        // don't add an exponent to zero if we're showing all exponents\n        // so the only reason you'd show an exponent on zero is if it's the\n        // ONLY tick to get an exponent (first or last)\n        hideexp = 'hide';\n    }\n    out.text = numFormat(out.x, ax, hideexp, extraPrecision);\n}\n\nfunction formatAngle(ax, out, hover, extraPrecision, hideexp) {\n    if(ax.thetaunit === 'radians' && !hover) {\n        var num = out.x / 180;\n\n        if(num === 0) {\n            out.text = '0';\n        } else {\n            var frac = num2frac(num);\n\n            if(frac[1] >= 100) {\n                out.text = numFormat(Lib.deg2rad(out.x), ax, hideexp, extraPrecision);\n            } else {\n                var isNeg = out.x < 0;\n\n                if(frac[1] === 1) {\n                    if(frac[0] === 1) out.text = 'π';\n                    else out.text = frac[0] + 'π';\n                } else {\n                    out.text = [\n                        '<sup>', frac[0], '</sup>',\n                        '⁄',\n                        '<sub>', frac[1], '</sub>',\n                        'π'\n                    ].join('');\n                }\n\n                if(isNeg) out.text = MINUS_SIGN + out.text;\n            }\n        }\n    } else {\n        out.text = numFormat(out.x, ax, hideexp, extraPrecision);\n    }\n}\n\n// inspired by\n// https://github.com/yisibl/num2fraction/blob/master/index.js\nfunction num2frac(num) {\n    function almostEq(a, b) {\n        return Math.abs(a - b) <= 1e-6;\n    }\n\n    function findGCD(a, b) {\n        return almostEq(b, 0) ? a : findGCD(b, a % b);\n    }\n\n    function findPrecision(n) {\n        var e = 1;\n        while(!almostEq(Math.round(n * e) / e, n)) {\n            e *= 10;\n        }\n        return e;\n    }\n\n    var precision = findPrecision(num);\n    var number = num * precision;\n    var gcd = Math.abs(findGCD(number, precision));\n\n    return [\n        // numerator\n        Math.round(number / gcd),\n        // denominator\n        Math.round(precision / gcd)\n    ];\n}\n\n// format a number (tick value) according to the axis settings\n// new, more reliable procedure than d3.round or similar:\n// add half the rounding increment, then stringify and truncate\n// also automatically switch to sci. notation\nvar SIPREFIXES = ['f', 'p', 'n', 'μ', 'm', '', 'k', 'M', 'G', 'T'];\n\nfunction isSIFormat(exponentFormat) {\n    return exponentFormat === 'SI' || exponentFormat === 'B';\n}\n\n// are we beyond the range of common SI prefixes?\n// 10^-16 -> 1x10^-16\n// 10^-15 -> 1f\n// ...\n// 10^14 -> 100T\n// 10^15 -> 1x10^15\n// 10^16 -> 1x10^16\nfunction beyondSI(exponent) {\n    return exponent > 14 || exponent < -15;\n}\n\nfunction numFormat(v, ax, fmtoverride, hover) {\n    var isNeg = v < 0;\n    // max number of digits past decimal point to show\n    var tickRound = ax._tickround;\n    var exponentFormat = fmtoverride || ax.exponentformat || 'B';\n    var exponent = ax._tickexponent;\n    var tickformat = axes.getTickFormat(ax);\n    var separatethousands = ax.separatethousands;\n\n    // special case for hover: set exponent just for this value, and\n    // add a couple more digits of precision over tick labels\n    if(hover) {\n        // make a dummy axis obj to get the auto rounding and exponent\n        var ah = {\n            exponentformat: exponentFormat,\n            dtick: ax.showexponent === 'none' ? ax.dtick :\n                (isNumeric(v) ? Math.abs(v) || 1 : 1),\n            // if not showing any exponents, don't change the exponent\n            // from what we calculate\n            range: ax.showexponent === 'none' ? ax.range.map(ax.r2d) : [0, v || 1]\n        };\n        autoTickRound(ah);\n        tickRound = (Number(ah._tickround) || 0) + 4;\n        exponent = ah._tickexponent;\n        if(ax.hoverformat) tickformat = ax.hoverformat;\n    }\n\n    if(tickformat) return ax._numFormat(tickformat)(v).replace(/-/g, MINUS_SIGN);\n\n    // 'epsilon' - rounding increment\n    var e = Math.pow(10, -tickRound) / 2;\n\n    // exponentFormat codes:\n    // 'e' (1.2e+6, default)\n    // 'E' (1.2E+6)\n    // 'SI' (1.2M)\n    // 'B' (same as SI except 10^9=B not G)\n    // 'none' (1200000)\n    // 'power' (1.2x10^6)\n    // 'hide' (1.2, use 3rd argument=='hide' to eg\n    //      only show exponent on last tick)\n    if(exponentFormat === 'none') exponent = 0;\n\n    // take the sign out, put it back manually at the end\n    // - makes cases easier\n    v = Math.abs(v);\n    if(v < e) {\n        // 0 is just 0, but may get exponent if it's the last tick\n        v = '0';\n        isNeg = false;\n    } else {\n        v += e;\n        // take out a common exponent, if any\n        if(exponent) {\n            v *= Math.pow(10, -exponent);\n            tickRound += exponent;\n        }\n        // round the mantissa\n        if(tickRound === 0) v = String(Math.floor(v));\n        else if(tickRound < 0) {\n            v = String(Math.round(v));\n            v = v.substr(0, v.length + tickRound);\n            for(var i = tickRound; i < 0; i++) v += '0';\n        } else {\n            v = String(v);\n            var dp = v.indexOf('.') + 1;\n            if(dp) v = v.substr(0, dp + tickRound).replace(/\\.?0+$/, '');\n        }\n        // insert appropriate decimal point and thousands separator\n        v = Lib.numSeparate(v, ax._separators, separatethousands);\n    }\n\n    // add exponent\n    if(exponent && exponentFormat !== 'hide') {\n        if(isSIFormat(exponentFormat) && beyondSI(exponent)) exponentFormat = 'power';\n\n        var signedExponent;\n        if(exponent < 0) signedExponent = MINUS_SIGN + -exponent;\n        else if(exponentFormat !== 'power') signedExponent = '+' + exponent;\n        else signedExponent = String(exponent);\n\n        if(exponentFormat === 'e' || exponentFormat === 'E') {\n            v += exponentFormat + signedExponent;\n        } else if(exponentFormat === 'power') {\n            v += '×10<sup>' + signedExponent + '</sup>';\n        } else if(exponentFormat === 'B' && exponent === 9) {\n            v += 'B';\n        } else if(isSIFormat(exponentFormat)) {\n            v += SIPREFIXES[exponent / 3 + 5];\n        }\n    }\n\n    // put sign back in and return\n    // replace standard minus character (which is technically a hyphen)\n    // with a true minus sign\n    if(isNeg) return MINUS_SIGN + v;\n    return v;\n}\n\naxes.getTickFormat = function(ax) {\n    var i;\n\n    function convertToMs(dtick) {\n        return typeof dtick !== 'string' ? dtick : Number(dtick.replace('M', '')) * ONEAVGMONTH;\n    }\n\n    function compareLogTicks(left, right) {\n        var priority = ['L', 'D'];\n        if(typeof left === typeof right) {\n            if(typeof left === 'number') {\n                return left - right;\n            } else {\n                var leftPriority = priority.indexOf(left.charAt(0));\n                var rightPriority = priority.indexOf(right.charAt(0));\n                if(leftPriority === rightPriority) {\n                    return Number(left.replace(/(L|D)/g, '')) - Number(right.replace(/(L|D)/g, ''));\n                } else {\n                    return leftPriority - rightPriority;\n                }\n            }\n        } else {\n            return typeof left === 'number' ? 1 : -1;\n        }\n    }\n\n    function isProperStop(dtick, range, convert) {\n        var convertFn = convert || function(x) { return x;};\n        var leftDtick = range[0];\n        var rightDtick = range[1];\n        return ((!leftDtick && typeof leftDtick !== 'number') || convertFn(leftDtick) <= convertFn(dtick)) &&\n               ((!rightDtick && typeof rightDtick !== 'number') || convertFn(rightDtick) >= convertFn(dtick));\n    }\n\n    function isProperLogStop(dtick, range) {\n        var isLeftDtickNull = range[0] === null;\n        var isRightDtickNull = range[1] === null;\n        var isDtickInRangeLeft = compareLogTicks(dtick, range[0]) >= 0;\n        var isDtickInRangeRight = compareLogTicks(dtick, range[1]) <= 0;\n        return (isLeftDtickNull || isDtickInRangeLeft) && (isRightDtickNull || isDtickInRangeRight);\n    }\n\n    var tickstop, stopi;\n    if(ax.tickformatstops && ax.tickformatstops.length > 0) {\n        switch(ax.type) {\n            case 'date':\n            case 'linear': {\n                for(i = 0; i < ax.tickformatstops.length; i++) {\n                    stopi = ax.tickformatstops[i];\n                    if(stopi.enabled && isProperStop(ax.dtick, stopi.dtickrange, convertToMs)) {\n                        tickstop = stopi;\n                        break;\n                    }\n                }\n                break;\n            }\n            case 'log': {\n                for(i = 0; i < ax.tickformatstops.length; i++) {\n                    stopi = ax.tickformatstops[i];\n                    if(stopi.enabled && isProperLogStop(ax.dtick, stopi.dtickrange)) {\n                        tickstop = stopi;\n                        break;\n                    }\n                }\n                break;\n            }\n            default:\n        }\n    }\n    return tickstop ? tickstop.value : ax.tickformat;\n};\n\n// getSubplots - extract all subplot IDs we need\n// as an array of items like 'xy', 'x2y', 'x2y2'...\n// sorted by x (x,x2,x3...) then y\n// optionally restrict to only subplots containing axis object ax\n//\n// NOTE: this is currently only used OUTSIDE plotly.js (toolpanel, webapp)\n// ideally we get rid of it there (or just copy this there) and remove it here\naxes.getSubplots = function(gd, ax) {\n    var subplotObj = gd._fullLayout._subplots;\n    var allSubplots = subplotObj.cartesian.concat(subplotObj.gl2d || []);\n\n    var out = ax ? axes.findSubplotsWithAxis(allSubplots, ax) : allSubplots;\n\n    out.sort(function(a, b) {\n        var aParts = a.substr(1).split('y');\n        var bParts = b.substr(1).split('y');\n\n        if(aParts[0] === bParts[0]) return +aParts[1] - +bParts[1];\n        return +aParts[0] - +bParts[0];\n    });\n\n    return out;\n};\n\n// find all subplots with axis 'ax'\n// NOTE: this is only used in axes.getSubplots (only used outside plotly.js) and\n// gl2d/convert (where it restricts axis subplots to only those with gl2d)\naxes.findSubplotsWithAxis = function(subplots, ax) {\n    var axMatch = new RegExp(\n        (ax._id.charAt(0) === 'x') ? ('^' + ax._id + 'y') : (ax._id + '$')\n    );\n    var subplotsWithAx = [];\n\n    for(var i = 0; i < subplots.length; i++) {\n        var sp = subplots[i];\n        if(axMatch.test(sp)) subplotsWithAx.push(sp);\n    }\n\n    return subplotsWithAx;\n};\n\n// makeClipPaths: prepare clipPaths for all single axes and all possible xy pairings\naxes.makeClipPaths = function(gd) {\n    var fullLayout = gd._fullLayout;\n\n    // for more info: https://github.com/plotly/plotly.js/issues/2595\n    if(fullLayout._hasOnlyLargeSploms) return;\n\n    var fullWidth = {_offset: 0, _length: fullLayout.width, _id: ''};\n    var fullHeight = {_offset: 0, _length: fullLayout.height, _id: ''};\n    var xaList = axes.list(gd, 'x', true);\n    var yaList = axes.list(gd, 'y', true);\n    var clipList = [];\n    var i, j;\n\n    for(i = 0; i < xaList.length; i++) {\n        clipList.push({x: xaList[i], y: fullHeight});\n        for(j = 0; j < yaList.length; j++) {\n            if(i === 0) clipList.push({x: fullWidth, y: yaList[j]});\n            clipList.push({x: xaList[i], y: yaList[j]});\n        }\n    }\n\n    // selectors don't work right with camelCase tags,\n    // have to use class instead\n    // https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I\n    var axClips = fullLayout._clips.selectAll('.axesclip')\n        .data(clipList, function(d) { return d.x._id + d.y._id; });\n\n    axClips.enter().append('clipPath')\n        .classed('axesclip', true)\n        .attr('id', function(d) { return 'clip' + fullLayout._uid + d.x._id + d.y._id; })\n      .append('rect');\n\n    axClips.exit().remove();\n\n    axClips.each(function(d) {\n        d3.select(this).select('rect').attr({\n            x: d.x._offset || 0,\n            y: d.y._offset || 0,\n            width: d.x._length || 1,\n            height: d.y._length || 1\n        });\n    });\n};\n\n/**\n * Main multi-axis drawing routine!\n *\n * @param {DOM element} gd : graph div\n * @param {string or array of strings} arg : polymorphic argument\n * @param {object} opts:\n * - @param {boolean} skipTitle : optional flag to skip axis title draw/update\n *\n * Signature 1: Axes.draw(gd, 'redraw')\n *   use this to clear and redraw all axes on graph\n *\n * Signature 2: Axes.draw(gd, '')\n *   use this to draw all axes on graph w/o the selectAll().remove()\n *   of the 'redraw' signature\n *\n * Signature 3: Axes.draw(gd, [axId, axId2, ...])\n *   where the items are axis id string,\n *   use this to update multiple axes in one call\n *\n * N.B draw updates:\n * - ax._r (stored range for use by zoom/pan)\n * - ax._rl (stored linearized range for use by zoom/pan)\n */\naxes.draw = function(gd, arg, opts) {\n    var fullLayout = gd._fullLayout;\n\n    if(arg === 'redraw') {\n        fullLayout._paper.selectAll('g.subplot').each(function(d) {\n            var id = d[0];\n            var plotinfo = fullLayout._plots[id];\n            var xa = plotinfo.xaxis;\n            var ya = plotinfo.yaxis;\n\n            plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick').remove();\n            plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick').remove();\n            plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick2').remove();\n            plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick2').remove();\n            plotinfo.xaxislayer.selectAll('.' + xa._id + 'divider').remove();\n            plotinfo.yaxislayer.selectAll('.' + ya._id + 'divider').remove();\n\n            if(plotinfo.gridlayer) plotinfo.gridlayer.selectAll('path').remove();\n            if(plotinfo.zerolinelayer) plotinfo.zerolinelayer.selectAll('path').remove();\n\n            fullLayout._infolayer.select('.g-' + xa._id + 'title').remove();\n            fullLayout._infolayer.select('.g-' + ya._id + 'title').remove();\n        });\n    }\n\n    var axList = (!arg || arg === 'redraw') ? axes.listIds(gd) : arg;\n\n    return Lib.syncOrAsync(axList.map(function(axId) {\n        return function() {\n            if(!axId) return;\n\n            var ax = axes.getFromId(gd, axId);\n            var axDone = axes.drawOne(gd, ax, opts);\n\n            ax._r = ax.range.slice();\n            ax._rl = Lib.simpleMap(ax._r, ax.r2l);\n\n            return axDone;\n        };\n    }));\n};\n\n/**\n * Draw one cartesian axis\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n * @param {object} opts\n * - @param {boolean} skipTitle (set to true to skip axis title draw call)\n */\naxes.drawOne = function(gd, ax, opts) {\n    opts = opts || {};\n\n    var i, sp, plotinfo;\n\n    ax.setScale();\n\n    var fullLayout = gd._fullLayout;\n    var axId = ax._id;\n    var axLetter = axId.charAt(0);\n    var counterLetter = axes.counterLetter(axId);\n    var mainSubplot = ax._mainSubplot;\n    var mainLinePosition = ax._mainLinePosition;\n    var mainMirrorPosition = ax._mainMirrorPosition;\n    var mainPlotinfo = fullLayout._plots[mainSubplot];\n    var mainAxLayer = mainPlotinfo[axLetter + 'axislayer'];\n    var subplotsWithAx = ax._subplotsWith;\n\n    var vals = ax._vals = axes.calcTicks(ax);\n\n    // Add a couple of axis properties that should cause us to recreate\n    // elements. Used in d3 data function.\n    var axInfo = [ax.mirror, mainLinePosition, mainMirrorPosition].join('_');\n    for(i = 0; i < vals.length; i++) {\n        vals[i].axInfo = axInfo;\n    }\n\n    if(!ax.visible) return;\n\n    // stash selections to avoid DOM queries e.g.\n    // - stash tickLabels selection, so that drawTitle can use it to scoot title\n    ax._selections = {};\n    // stash tick angle (including the computed 'auto' values) per tick-label class\n    ax._tickAngles = {};\n\n    var transFn = axes.makeTransFn(ax);\n    var tickVals;\n    // We remove zero lines, grid lines, and inside ticks if they're within 1px of the end\n    // The key case here is removing zero lines when the axis bound is zero\n    var valsClipped;\n\n    if(ax.tickson === 'boundaries') {\n        var boundaryVals = getBoundaryVals(ax, vals);\n        valsClipped = axes.clipEnds(ax, boundaryVals);\n        tickVals = ax.ticks === 'inside' ? valsClipped : boundaryVals;\n    } else {\n        valsClipped = axes.clipEnds(ax, vals);\n        tickVals = ax.ticks === 'inside' ? valsClipped : vals;\n    }\n\n    var gridVals = ax._gridVals = valsClipped;\n    var dividerVals = getDividerVals(ax, vals);\n\n    if(!fullLayout._hasOnlyLargeSploms) {\n        // keep track of which subplots (by main conteraxis) we've already\n        // drawn grids for, so we don't overdraw overlaying subplots\n        var finishedGrids = {};\n\n        for(i = 0; i < subplotsWithAx.length; i++) {\n            sp = subplotsWithAx[i];\n            plotinfo = fullLayout._plots[sp];\n\n            var counterAxis = plotinfo[counterLetter + 'axis'];\n            var mainCounterID = counterAxis._mainAxis._id;\n            if(finishedGrids[mainCounterID]) continue;\n            finishedGrids[mainCounterID] = 1;\n\n            var gridPath = axLetter === 'x' ?\n                'M0,' + counterAxis._offset + 'v' + counterAxis._length :\n                'M' + counterAxis._offset + ',0h' + counterAxis._length;\n\n            axes.drawGrid(gd, ax, {\n                vals: gridVals,\n                counterAxis: counterAxis,\n                layer: plotinfo.gridlayer.select('.' + axId),\n                path: gridPath,\n                transFn: transFn\n            });\n            axes.drawZeroLine(gd, ax, {\n                counterAxis: counterAxis,\n                layer: plotinfo.zerolinelayer,\n                path: gridPath,\n                transFn: transFn\n            });\n        }\n    }\n\n    var tickSigns = axes.getTickSigns(ax);\n    var tickSubplots = [];\n\n    if(ax.ticks) {\n        var mainTickPath = axes.makeTickPath(ax, mainLinePosition, tickSigns[2]);\n        var mirrorTickPath;\n        var fullTickPath;\n        if(ax._anchorAxis && ax.mirror && ax.mirror !== true) {\n            mirrorTickPath = axes.makeTickPath(ax, mainMirrorPosition, tickSigns[3]);\n            fullTickPath = mainTickPath + mirrorTickPath;\n        } else {\n            mirrorTickPath = '';\n            fullTickPath = mainTickPath;\n        }\n\n        var tickPath;\n        if(ax.showdividers && ax.ticks === 'outside' && ax.tickson === 'boundaries') {\n            var dividerLookup = {};\n            for(i = 0; i < dividerVals.length; i++) {\n                dividerLookup[dividerVals[i].x] = 1;\n            }\n            tickPath = function(d) {\n                return dividerLookup[d.x] ? mirrorTickPath : fullTickPath;\n            };\n        } else {\n            tickPath = fullTickPath;\n        }\n\n        axes.drawTicks(gd, ax, {\n            vals: tickVals,\n            layer: mainAxLayer,\n            path: tickPath,\n            transFn: transFn\n        });\n\n        tickSubplots = Object.keys(ax._linepositions || {});\n    }\n\n    for(i = 0; i < tickSubplots.length; i++) {\n        sp = tickSubplots[i];\n        plotinfo = fullLayout._plots[sp];\n        // [bottom or left, top or right], free and main are handled above\n        var linepositions = ax._linepositions[sp] || [];\n        var spTickPath = axes.makeTickPath(ax, linepositions[0], tickSigns[0]) +\n            axes.makeTickPath(ax, linepositions[1], tickSigns[1]);\n\n        axes.drawTicks(gd, ax, {\n            vals: tickVals,\n            layer: plotinfo[axLetter + 'axislayer'],\n            path: spTickPath,\n            transFn: transFn\n        });\n    }\n\n    var seq = [];\n\n    // tick labels - for now just the main labels.\n    // TODO: mirror labels, esp for subplots\n\n    seq.push(function() {\n        return axes.drawLabels(gd, ax, {\n            vals: vals,\n            layer: mainAxLayer,\n            transFn: transFn,\n            labelFns: axes.makeLabelFns(ax, mainLinePosition)\n        });\n    });\n\n    if(ax.type === 'multicategory') {\n        var labelLength = 0;\n        var pad = {x: 2, y: 10}[axLetter];\n        var sgn = tickSigns[2] * (ax.ticks === 'inside' ? -1 : 1);\n\n        seq.push(function() {\n            labelLength += getLabelLevelSpan(ax, axId + 'tick') + pad;\n            labelLength += ax._tickAngles[axId + 'tick'] ? ax.tickfont.size * LINE_SPACING : 0;\n\n            return axes.drawLabels(gd, ax, {\n                vals: getSecondaryLabelVals(ax, vals),\n                layer: mainAxLayer,\n                cls: axId + 'tick2',\n                repositionOnUpdate: true,\n                secondary: true,\n                transFn: transFn,\n                labelFns: axes.makeLabelFns(ax, mainLinePosition + labelLength * sgn)\n            });\n        });\n\n        seq.push(function() {\n            labelLength += getLabelLevelSpan(ax, axId + 'tick2');\n            ax._labelLength = labelLength;\n\n            return drawDividers(gd, ax, {\n                vals: dividerVals,\n                layer: mainAxLayer,\n                path: axes.makeTickPath(ax, mainLinePosition, sgn, labelLength),\n                transFn: transFn\n            });\n        });\n    }\n\n    function extendRange(range, newRange) {\n        range[0] = Math.min(range[0], newRange[0]);\n        range[1] = Math.max(range[1], newRange[1]);\n    }\n\n    function calcBoundingBox() {\n        if(ax.showticklabels) {\n            var gdBB = gd.getBoundingClientRect();\n            var bBox = mainAxLayer.node().getBoundingClientRect();\n\n            /*\n             * the way we're going to use this, the positioning that matters\n             * is relative to the origin of gd. This is important particularly\n             * if gd is scrollable, and may have been scrolled between the time\n             * we calculate this and the time we use it\n             */\n\n            ax._boundingBox = {\n                width: bBox.width,\n                height: bBox.height,\n                left: bBox.left - gdBB.left,\n                right: bBox.right - gdBB.left,\n                top: bBox.top - gdBB.top,\n                bottom: bBox.bottom - gdBB.top\n            };\n        } else {\n            var gs = fullLayout._size;\n            var pos;\n\n            // set dummy bbox for ticklabel-less axes\n\n            if(axLetter === 'x') {\n                pos = ax.anchor === 'free' ?\n                    gs.t + gs.h * (1 - ax.position) :\n                    gs.t + gs.h * (1 - ax._anchorAxis.domain[{bottom: 0, top: 1}[ax.side]]);\n\n                ax._boundingBox = {\n                    top: pos,\n                    bottom: pos,\n                    left: ax._offset,\n                    right: ax._offset + ax._length,\n                    width: ax._length,\n                    height: 0\n                };\n            } else {\n                pos = ax.anchor === 'free' ?\n                    gs.l + gs.w * ax.position :\n                    gs.l + gs.w * ax._anchorAxis.domain[{left: 0, right: 1}[ax.side]];\n\n                ax._boundingBox = {\n                    left: pos,\n                    right: pos,\n                    bottom: ax._offset + ax._length,\n                    top: ax._offset,\n                    height: ax._length,\n                    width: 0\n                };\n            }\n        }\n\n        /*\n         * for spikelines: what's the full domain of positions in the\n         * opposite direction that are associated with this axis?\n         * This means any axes that we make a subplot with, plus the\n         * position of the axis itself if it's free.\n         */\n        if(subplotsWithAx) {\n            var fullRange = ax._counterSpan = [Infinity, -Infinity];\n\n            for(var i = 0; i < subplotsWithAx.length; i++) {\n                var plotinfo = fullLayout._plots[subplotsWithAx[i]];\n                var counterAxis = plotinfo[(axLetter === 'x') ? 'yaxis' : 'xaxis'];\n\n                extendRange(fullRange, [\n                    counterAxis._offset,\n                    counterAxis._offset + counterAxis._length\n                ]);\n            }\n\n            if(ax.anchor === 'free') {\n                extendRange(fullRange, (axLetter === 'x') ?\n                    [ax._boundingBox.bottom, ax._boundingBox.top] :\n                    [ax._boundingBox.right, ax._boundingBox.left]);\n            }\n        }\n    }\n\n    var hasRangeSlider = Registry.getComponentMethod('rangeslider', 'isVisible')(ax);\n\n    function doAutoMargins() {\n        var s = ax.side.charAt(0);\n        var push;\n        var rangeSliderPush;\n\n        if(hasRangeSlider) {\n            rangeSliderPush = Registry.getComponentMethod('rangeslider', 'autoMarginOpts')(gd, ax);\n        }\n        Plots.autoMargin(gd, rangeSliderAutoMarginID(ax), rangeSliderPush);\n\n        if(ax.automargin && (!hasRangeSlider || s !== 'b')) {\n            push = {x: 0, y: 0, r: 0, l: 0, t: 0, b: 0};\n\n            var bbox = ax._boundingBox;\n            var titleOffset = getTitleOffset(gd, ax);\n            var anchorAxDomainIndex;\n            var offset;\n\n            switch(axLetter + s) {\n                case 'xb':\n                    anchorAxDomainIndex = 0;\n                    offset = bbox.top - titleOffset;\n                    push[s] = bbox.height;\n                    break;\n                case 'xt':\n                    anchorAxDomainIndex = 1;\n                    offset = titleOffset - bbox.bottom;\n                    push[s] = bbox.height;\n                    break;\n                case 'yl':\n                    anchorAxDomainIndex = 0;\n                    offset = titleOffset - bbox.right;\n                    push[s] = bbox.width;\n                    break;\n                case 'yr':\n                    anchorAxDomainIndex = 1;\n                    offset = bbox.left - titleOffset;\n                    push[s] = bbox.width;\n                    break;\n            }\n\n            push[counterLetter] = ax.anchor === 'free' ?\n                ax.position :\n                ax._anchorAxis.domain[anchorAxDomainIndex];\n\n            if(push[s] > 0) {\n                push[s] += offset;\n            }\n\n            if(ax.title.text !== fullLayout._dfltTitle[axLetter]) {\n                push[s] += ax.title.font.size;\n            }\n\n            if(axLetter === 'x' && bbox.width > 0) {\n                var rExtra = bbox.right - (ax._offset + ax._length);\n                if(rExtra > 0) {\n                    push.x = 1;\n                    push.r = rExtra;\n                }\n                var lExtra = ax._offset - bbox.left;\n                if(lExtra > 0) {\n                    push.x = 0;\n                    push.l = lExtra;\n                }\n            } else if(axLetter === 'y' && bbox.height > 0) {\n                var bExtra = bbox.bottom - (ax._offset + ax._length);\n                if(bExtra > 0) {\n                    push.y = 0;\n                    push.b = bExtra;\n                }\n                var tExtra = ax._offset - bbox.top;\n                if(tExtra > 0) {\n                    push.y = 1;\n                    push.t = tExtra;\n                }\n            }\n        }\n\n        Plots.autoMargin(gd, axAutoMarginID(ax), push);\n    }\n\n    seq.push(calcBoundingBox, doAutoMargins);\n\n    if(!opts.skipTitle &&\n        !(hasRangeSlider && ax._boundingBox && ax.side === 'bottom')\n    ) {\n        seq.push(function() { return drawTitle(gd, ax); });\n    }\n\n    return Lib.syncOrAsync(seq);\n};\n\nfunction getBoundaryVals(ax, vals) {\n    var out = [];\n    var i;\n\n    // boundaryVals are never used for labels;\n    // no need to worry about the other tickTextObj keys\n    var _push = function(d, bndIndex) {\n        var xb = d.xbnd[bndIndex];\n        if(xb !== null) {\n            out.push(Lib.extendFlat({}, d, {x: xb}));\n        }\n    };\n\n    if(vals.length) {\n        for(i = 0; i < vals.length; i++) {\n            _push(vals[i], 0);\n        }\n        _push(vals[i - 1], 1);\n    }\n\n    return out;\n}\n\nfunction getSecondaryLabelVals(ax, vals) {\n    var out = [];\n    var lookup = {};\n\n    for(var i = 0; i < vals.length; i++) {\n        var d = vals[i];\n        if(lookup[d.text2]) {\n            lookup[d.text2].push(d.x);\n        } else {\n            lookup[d.text2] = [d.x];\n        }\n    }\n\n    for(var k in lookup) {\n        out.push(tickTextObj(ax, Lib.interp(lookup[k], 0.5), k));\n    }\n\n    return out;\n}\n\nfunction getDividerVals(ax, vals) {\n    var out = [];\n    var i, current;\n\n    // never used for labels;\n    // no need to worry about the other tickTextObj keys\n    var _push = function(d, bndIndex) {\n        var xb = d.xbnd[bndIndex];\n        if(xb !== null) {\n            out.push(Lib.extendFlat({}, d, {x: xb}));\n        }\n    };\n\n    if(ax.showdividers && vals.length) {\n        for(i = 0; i < vals.length; i++) {\n            var d = vals[i];\n            if(d.text2 !== current) {\n                _push(d, 0);\n            }\n            current = d.text2;\n        }\n        _push(vals[i - 1], 1);\n    }\n\n    return out;\n}\n\nfunction getLabelLevelSpan(ax, cls) {\n    var axLetter = ax._id.charAt(0);\n    var angle = ax._tickAngles[cls] || 0;\n    var rad = Lib.deg2rad(angle);\n    var sinA = Math.sin(rad);\n    var cosA = Math.cos(rad);\n    var maxX = 0;\n    var maxY = 0;\n\n    // N.B. Drawing.bBox does not take into account rotate transforms\n\n    ax._selections[cls].each(function() {\n        var thisLabel = selectTickLabel(this);\n        var bb = Drawing.bBox(thisLabel.node());\n        var w = bb.width;\n        var h = bb.height;\n        maxX = Math.max(maxX, cosA * w, sinA * h);\n        maxY = Math.max(maxY, sinA * w, cosA * h);\n    });\n\n    return {x: maxY, y: maxX}[axLetter];\n}\n\n/**\n * Which direction do the 'ax.side' values, and free ticks go?\n *\n * @param {object} ax (full) axis object\n *  - {string} _id (starting with 'x' or 'y')\n *  - {string} side\n *  - {string} ticks\n * @return {array} all entries are either -1 or 1\n *  - [0]: sign for top/right ticks (i.e. negative SVG direction)\n *  - [1]: sign for bottom/left ticks (i.e. positive SVG direction)\n *  - [2]: sign for ticks corresponding to 'ax.side'\n *  - [3]: sign for ticks mirroring 'ax.side'\n */\naxes.getTickSigns = function(ax) {\n    var axLetter = ax._id.charAt(0);\n    var sideOpposite = {x: 'top', y: 'right'}[axLetter];\n    var main = ax.side === sideOpposite ? 1 : -1;\n    var out = [-1, 1, main, -main];\n    // then we flip if outside XOR y axis\n    if((ax.ticks !== 'inside') === (axLetter === 'x')) {\n        out = out.map(function(v) { return -v; });\n    }\n    return out;\n};\n\n/**\n * Make axis translate transform function\n *\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {number} _offset\n *  - {fn} l2p\n * @return {fn} function of calcTicks items\n */\naxes.makeTransFn = function(ax) {\n    var axLetter = ax._id.charAt(0);\n    var offset = ax._offset;\n    return axLetter === 'x' ?\n        function(d) { return 'translate(' + (offset + ax.l2p(d.x)) + ',0)'; } :\n        function(d) { return 'translate(0,' + (offset + ax.l2p(d.x)) + ')'; };\n};\n\n/**\n * Make axis tick path string\n *\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {number} ticklen\n *  - {number} linewidth\n * @param {number} shift along direction of ticklen\n * @param {1 or -1} sng tick sign\n * @param {number (optional)} len tick length\n * @return {string}\n */\naxes.makeTickPath = function(ax, shift, sgn, len) {\n    len = len !== undefined ? len : ax.ticklen;\n\n    var axLetter = ax._id.charAt(0);\n    var pad = (ax.linewidth || 1) / 2;\n\n    return axLetter === 'x' ?\n        'M0,' + (shift + pad * sgn) + 'v' + (len * sgn) :\n        'M' + (shift + pad * sgn) + ',0h' + (len * sgn);\n};\n\n/**\n * Make axis tick label x, y and anchor functions\n *\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {string} ticks\n *  - {number} ticklen\n *  - {string} side\n *  - {number} linewidth\n *  - {number} tickfont.size\n *  - {boolean} showline\n * @param {number} shift\n * @param {number} angle [in degrees] ...\n * @return {object}\n *  - {fn} xFn\n *  - {fn} yFn\n *  - {fn} anchorFn\n *  - {fn} heightFn\n *  - {number} labelStandoff (gap parallel to ticks)\n *  - {number} labelShift (gap perpendicular to ticks)\n */\naxes.makeLabelFns = function(ax, shift, angle) {\n    var axLetter = ax._id.charAt(0);\n    var ticksOnOutsideLabels = ax.tickson !== 'boundaries' && ax.ticks === 'outside';\n\n    var labelStandoff = 0;\n    var labelShift = 0;\n\n    if(ticksOnOutsideLabels) {\n        labelStandoff += ax.ticklen;\n    }\n    if(angle && ax.ticks === 'outside') {\n        var rad = Lib.deg2rad(angle);\n        labelStandoff = ax.ticklen * Math.cos(rad) + 1;\n        labelShift = ax.ticklen * Math.sin(rad);\n    }\n    if(ax.showticklabels && (ticksOnOutsideLabels || ax.showline)) {\n        labelStandoff += 0.2 * ax.tickfont.size;\n    }\n    labelStandoff += (ax.linewidth || 1) / 2;\n\n    var out = {\n        labelStandoff: labelStandoff,\n        labelShift: labelShift\n    };\n\n    var x0, y0, ff, flipIt;\n\n    if(axLetter === 'x') {\n        flipIt = ax.side === 'bottom' ? 1 : -1;\n        x0 = labelShift * flipIt;\n        y0 = shift + labelStandoff * flipIt;\n        ff = ax.side === 'bottom' ? 1 : -0.2;\n\n        out.xFn = function(d) { return d.dx + x0; };\n        out.yFn = function(d) { return d.dy + y0 + d.fontSize * ff; };\n        out.anchorFn = function(d, a) {\n            if(!isNumeric(a) || a === 0 || a === 180) {\n                return 'middle';\n            }\n            return (a * flipIt < 0) ? 'end' : 'start';\n        };\n        out.heightFn = function(d, a, h) {\n            return (a < -60 || a > 60) ? -0.5 * h :\n                ax.side === 'top' ? -h :\n                0;\n        };\n    } else if(axLetter === 'y') {\n        flipIt = ax.side === 'right' ? 1 : -1;\n        x0 = labelStandoff;\n        y0 = -labelShift * flipIt;\n        ff = Math.abs(ax.tickangle) === 90 ? 0.5 : 0;\n\n        out.xFn = function(d) { return d.dx + shift + (x0 + d.fontSize * ff) * flipIt; };\n        out.yFn = function(d) { return d.dy + y0 + d.fontSize * MID_SHIFT; };\n        out.anchorFn = function(d, a) {\n            if(isNumeric(a) && Math.abs(a) === 90) {\n                return 'middle';\n            }\n            return ax.side === 'right' ? 'start' : 'end';\n        };\n        out.heightFn = function(d, a, h) {\n            a *= ax.side === 'left' ? 1 : -1;\n            return a < -30 ? -h :\n                a < 30 ? -0.5 * h :\n                0;\n        };\n    }\n\n    return out;\n};\n\nfunction tickDataFn(d) {\n    return [d.text, d.x, d.axInfo, d.font, d.fontSize, d.fontColor].join('_');\n}\n\n/**\n * Draw axis ticks\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {string} ticks\n *  - {number} linewidth\n *  - {string} tickcolor\n * @param {object} opts\n * - {array of object} vals (calcTicks output-like)\n * - {d3 selection} layer\n * - {string or fn} path\n * - {fn} transFn\n * - {boolean} crisp (set to false to unset crisp-edge SVG rendering)\n */\naxes.drawTicks = function(gd, ax, opts) {\n    opts = opts || {};\n\n    var cls = ax._id + 'tick';\n\n    var ticks = opts.layer.selectAll('path.' + cls)\n        .data(ax.ticks ? opts.vals : [], tickDataFn);\n\n    ticks.exit().remove();\n\n    ticks.enter().append('path')\n        .classed(cls, 1)\n        .classed('ticks', 1)\n        .classed('crisp', opts.crisp !== false)\n        .call(Color.stroke, ax.tickcolor)\n        .style('stroke-width', Drawing.crispRound(gd, ax.tickwidth, 1) + 'px')\n        .attr('d', opts.path);\n\n    ticks.attr('transform', opts.transFn);\n};\n\n/**\n * Draw axis grid\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {boolean} showgrid\n *  - {string} gridcolor\n *  - {string} gridwidth\n *  - {boolean} zeroline\n *  - {string} type\n *  - {string} dtick\n * @param {object} opts\n * - {array of object} vals (calcTicks output-like)\n * - {d3 selection} layer\n * - {object} counterAxis (full axis object corresponding to counter axis)\n *     optional - only required if this axis supports zero lines\n * - {string or fn} path\n * - {fn} transFn\n * - {boolean} crisp (set to false to unset crisp-edge SVG rendering)\n */\naxes.drawGrid = function(gd, ax, opts) {\n    opts = opts || {};\n\n    var cls = ax._id + 'grid';\n    var vals = opts.vals;\n    var counterAx = opts.counterAxis;\n    if(ax.showgrid === false) {\n        vals = [];\n    } else if(counterAx && axes.shouldShowZeroLine(gd, ax, counterAx)) {\n        var isArrayMode = ax.tickmode === 'array';\n        for(var i = 0; i < vals.length; i++) {\n            var xi = vals[i].x;\n            if(isArrayMode ? !xi : (Math.abs(xi) < ax.dtick / 100)) {\n                vals = vals.slice(0, i).concat(vals.slice(i + 1));\n                // In array mode you can in principle have multiple\n                // ticks at 0, so test them all. Otherwise once we found\n                // one we can stop.\n                if(isArrayMode) i--;\n                else break;\n            }\n        }\n    }\n\n    var grid = opts.layer.selectAll('path.' + cls)\n        .data(vals, tickDataFn);\n\n    grid.exit().remove();\n\n    grid.enter().append('path')\n        .classed(cls, 1)\n        .classed('crisp', opts.crisp !== false);\n\n    ax._gw = Drawing.crispRound(gd, ax.gridwidth, 1);\n\n    grid.attr('transform', opts.transFn)\n        .attr('d', opts.path)\n        .call(Color.stroke, ax.gridcolor || '#ddd')\n        .style('stroke-width', ax._gw + 'px');\n\n    if(typeof opts.path === 'function') grid.attr('d', opts.path);\n};\n\n/**\n * Draw axis zero-line\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {boolean} zeroline\n *  - {number} zerolinewidth\n *  - {string} zerolinecolor\n *  - {number (optional)} _gridWidthCrispRound\n * @param {object} opts\n * - {d3 selection} layer\n * - {object} counterAxis (full axis object corresponding to counter axis)\n * - {string or fn} path\n * - {fn} transFn\n * - {boolean} crisp (set to false to unset crisp-edge SVG rendering)\n */\naxes.drawZeroLine = function(gd, ax, opts) {\n    opts = opts || opts;\n\n    var cls = ax._id + 'zl';\n    var show = axes.shouldShowZeroLine(gd, ax, opts.counterAxis);\n\n    var zl = opts.layer.selectAll('path.' + cls)\n        .data(show ? [{x: 0, id: ax._id}] : []);\n\n    zl.exit().remove();\n\n    zl.enter().append('path')\n        .classed(cls, 1)\n        .classed('zl', 1)\n        .classed('crisp', opts.crisp !== false)\n        .each(function() {\n            // use the fact that only one element can enter to trigger a sort.\n            // If several zerolines enter at the same time we will sort once per,\n            // but generally this should be a minimal overhead.\n            opts.layer.selectAll('path').sort(function(da, db) {\n                return axisIds.idSort(da.id, db.id);\n            });\n        });\n\n    zl.attr('transform', opts.transFn)\n        .attr('d', opts.path)\n        .call(Color.stroke, ax.zerolinecolor || Color.defaultLine)\n        .style('stroke-width', Drawing.crispRound(gd, ax.zerolinewidth, ax._gw || 1) + 'px');\n};\n\n/**\n * Draw axis tick labels\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {boolean} showticklabels\n *  - {number} tickangle\n *  - {object (optional)} _selections\n *  - {object} (optional)} _tickAngles\n * @param {object} opts\n * - {array of object} vals (calcTicks output-like)\n * - {d3 selection} layer\n * - {string (optional)} cls (node className)\n * - {boolean} repositionOnUpdate (set to true to reposition update selection)\n * - {boolean} secondary\n * - {fn} transFn\n * - {object} labelFns\n *  + {fn} xFn\n *  + {fn} yFn\n *  + {fn} anchorFn\n *  + {fn} heightFn\n */\naxes.drawLabels = function(gd, ax, opts) {\n    opts = opts || {};\n\n    var axId = ax._id;\n    var axLetter = axId.charAt(0);\n    var cls = opts.cls || axId + 'tick';\n    var vals = opts.vals;\n    var labelFns = opts.labelFns;\n    var tickAngle = opts.secondary ? 0 : ax.tickangle;\n    var lastAngle = (ax._tickAngles || {})[cls];\n\n    var tickLabels = opts.layer.selectAll('g.' + cls)\n        .data(ax.showticklabels ? vals : [], tickDataFn);\n\n    var labelsReady = [];\n\n    tickLabels.enter().append('g')\n        .classed(cls, 1)\n        .append('text')\n            // only so tex has predictable alignment that we can\n            // alter later\n            .attr('text-anchor', 'middle')\n            .each(function(d) {\n                var thisLabel = d3.select(this);\n                var newPromise = gd._promises.length;\n\n                thisLabel\n                    .call(svgTextUtils.positionText, labelFns.xFn(d), labelFns.yFn(d))\n                    .call(Drawing.font, d.font, d.fontSize, d.fontColor)\n                    .text(d.text)\n                    .call(svgTextUtils.convertToTspans, gd);\n\n                if(gd._promises[newPromise]) {\n                    // if we have an async label, we'll deal with that\n                    // all here so take it out of gd._promises and\n                    // instead position the label and promise this in\n                    // labelsReady\n                    labelsReady.push(gd._promises.pop().then(function() {\n                        positionLabels(thisLabel, tickAngle);\n                    }));\n                } else {\n                    // sync label: just position it now.\n                    positionLabels(thisLabel, tickAngle);\n                }\n            });\n\n    tickLabels.exit().remove();\n\n    if(opts.repositionOnUpdate) {\n        tickLabels.each(function(d) {\n            d3.select(this).select('text')\n                .call(svgTextUtils.positionText, labelFns.xFn(d), labelFns.yFn(d));\n        });\n    }\n\n    function positionLabels(s, angle) {\n        s.each(function(d) {\n            var thisLabel = d3.select(this);\n            var mathjaxGroup = thisLabel.select('.text-math-group');\n            var anchor = labelFns.anchorFn(d, angle);\n\n            var transform = opts.transFn.call(thisLabel.node(), d) +\n                ((isNumeric(angle) && +angle !== 0) ?\n                (' rotate(' + angle + ',' + labelFns.xFn(d) + ',' +\n                    (labelFns.yFn(d) - d.fontSize / 2) + ')') :\n                '');\n\n            // how much to shift a multi-line label to center it vertically.\n            var nLines = svgTextUtils.lineCount(thisLabel);\n            var lineHeight = LINE_SPACING * d.fontSize;\n            var anchorHeight = labelFns.heightFn(d, isNumeric(angle) ? +angle : 0, (nLines - 1) * lineHeight);\n\n            if(anchorHeight) {\n                transform += ' translate(0, ' + anchorHeight + ')';\n            }\n\n            if(mathjaxGroup.empty()) {\n                thisLabel.select('text').attr({\n                    transform: transform,\n                    'text-anchor': anchor\n                });\n            } else {\n                var mjWidth = Drawing.bBox(mathjaxGroup.node()).width;\n                var mjShift = mjWidth * {end: -0.5, start: 0.5}[anchor];\n                mathjaxGroup.attr('transform', transform + (mjShift ? 'translate(' + mjShift + ',0)' : ''));\n            }\n        });\n    }\n\n    // make sure all labels are correctly positioned at their base angle\n    // the positionLabels call above is only for newly drawn labels.\n    // do this without waiting, using the last calculated angle to\n    // minimize flicker, then do it again when we know all labels are\n    // there, putting back the prescribed angle to check for overlaps.\n    positionLabels(tickLabels, lastAngle || tickAngle);\n\n    function allLabelsReady() {\n        return labelsReady.length && Promise.all(labelsReady);\n    }\n\n    function fixLabelOverlaps() {\n        positionLabels(tickLabels, tickAngle);\n\n        var autoangle = null;\n\n        // check for auto-angling if x labels overlap\n        // don't auto-angle at all for log axes with\n        // base and digit format\n        if(vals.length && axLetter === 'x' && !isNumeric(tickAngle) &&\n            (ax.type !== 'log' || String(ax.dtick).charAt(0) !== 'D')\n        ) {\n            autoangle = 0;\n\n            var maxFontSize = 0;\n            var lbbArray = [];\n            var i;\n\n            tickLabels.each(function(d) {\n                maxFontSize = Math.max(maxFontSize, d.fontSize);\n\n                var x = ax.l2p(d.x);\n                var thisLabel = selectTickLabel(this);\n                var bb = Drawing.bBox(thisLabel.node());\n\n                lbbArray.push({\n                    // ignore about y, just deal with x overlaps\n                    top: 0,\n                    bottom: 10,\n                    height: 10,\n                    left: x - bb.width / 2,\n                    // impose a 2px gap\n                    right: x + bb.width / 2 + 2,\n                    width: bb.width + 2\n                });\n            });\n\n            if((ax.tickson === 'boundaries' || ax.showdividers) && !opts.secondary) {\n                var gap = 2;\n                if(ax.ticks) gap += ax.tickwidth / 2;\n\n                // TODO should secondary labels also fall into this fix-overlap regime?\n\n                for(i = 0; i < lbbArray.length; i++) {\n                    var xbnd = vals[i].xbnd;\n                    var lbb = lbbArray[i];\n                    if(\n                        (xbnd[0] !== null && (lbb.left - ax.l2p(xbnd[0])) < gap) ||\n                        (xbnd[1] !== null && (ax.l2p(xbnd[1]) - lbb.right) < gap)\n                    ) {\n                        autoangle = 90;\n                        break;\n                    }\n                }\n            } else {\n                var vLen = vals.length;\n                var tickSpacing = Math.abs((vals[vLen - 1].x - vals[0].x) * ax._m) / (vLen - 1);\n                var rotate90 = (tickSpacing < maxFontSize * 2.5) || ax.type === 'multicategory';\n\n                // any overlap at all - set 30 degrees or 90 degrees\n                for(i = 0; i < lbbArray.length - 1; i++) {\n                    if(Lib.bBoxIntersect(lbbArray[i], lbbArray[i + 1])) {\n                        autoangle = rotate90 ? 90 : 30;\n                        break;\n                    }\n                }\n            }\n\n            if(autoangle) {\n                positionLabels(tickLabels, autoangle);\n            }\n        }\n\n        if(ax._tickAngles) {\n            ax._tickAngles[cls] = autoangle === null ?\n                (isNumeric(tickAngle) ? tickAngle : 0) :\n                autoangle;\n        }\n    }\n\n    if(ax._selections) {\n        ax._selections[cls] = tickLabels;\n    }\n\n    var done = Lib.syncOrAsync([allLabelsReady, fixLabelOverlaps]);\n    if(done && done.then) gd._promises.push(done);\n    return done;\n};\n\n/**\n * Draw axis dividers\n *\n * @param {DOM element} gd\n * @param {object} ax (full) axis object\n *  - {string} _id\n *  - {string} showdividers\n *  - {number} dividerwidth\n *  - {string} dividercolor\n * @param {object} opts\n * - {array of object} vals (calcTicks output-like)\n * - {d3 selection} layer\n * - {fn} path\n * - {fn} transFn\n */\nfunction drawDividers(gd, ax, opts) {\n    var cls = ax._id + 'divider';\n    var vals = opts.vals;\n\n    var dividers = opts.layer.selectAll('path.' + cls)\n        .data(vals, tickDataFn);\n\n    dividers.exit().remove();\n\n    dividers.enter().insert('path', ':first-child')\n        .classed(cls, 1)\n        .classed('crisp', 1)\n        .call(Color.stroke, ax.dividercolor)\n        .style('stroke-width', Drawing.crispRound(gd, ax.dividerwidth, 1) + 'px');\n\n    dividers\n        .attr('transform', opts.transFn)\n        .attr('d', opts.path);\n}\n\nfunction getTitleOffset(gd, ax) {\n    var gs = gd._fullLayout._size;\n    var axLetter = ax._id.charAt(0);\n    var side = ax.side;\n    var anchorAxis;\n\n    if(ax.anchor !== 'free') {\n        anchorAxis = axisIds.getFromId(gd, ax.anchor);\n    } else if(axLetter === 'x') {\n        anchorAxis = {\n            _offset: gs.t + (1 - (ax.position || 0)) * gs.h,\n            _length: 0\n        };\n    } else if(axLetter === 'y') {\n        anchorAxis = {\n            _offset: gs.l + (ax.position || 0) * gs.w,\n            _length: 0\n        };\n    }\n\n    if(side === 'top' || side === 'left') {\n        return anchorAxis._offset;\n    } else if(side === 'bottom' || side === 'right') {\n        return anchorAxis._offset + anchorAxis._length;\n    }\n}\n\nfunction drawTitle(gd, ax) {\n    var fullLayout = gd._fullLayout;\n    var axId = ax._id;\n    var axLetter = axId.charAt(0);\n    var fontSize = ax.title.font.size;\n\n    var titleStandoff;\n    if(ax.type === 'multicategory') {\n        titleStandoff = ax._labelLength;\n    } else {\n        var offsetBase = 1.5;\n        titleStandoff = 10 + fontSize * offsetBase + (ax.linewidth ? ax.linewidth - 1 : 0);\n    }\n\n    var titleOffset = getTitleOffset(gd, ax);\n\n    var transform, x, y;\n\n    if(axLetter === 'x') {\n        x = ax._offset + ax._length / 2;\n\n        if(ax.side === 'top') {\n            y = -titleStandoff - fontSize * (ax.showticklabels ? 1 : 0);\n        } else {\n            y = titleStandoff + fontSize * (ax.showticklabels ? 1.5 : 0.5);\n        }\n        y += titleOffset;\n    } else {\n        y = ax._offset + ax._length / 2;\n\n        if(ax.side === 'right') {\n            x = titleStandoff + fontSize * (ax.showticklabels ? 1 : 0.5);\n        } else {\n            x = -titleStandoff - fontSize * (ax.showticklabels ? 0.5 : 0);\n        }\n        x += titleOffset;\n\n        transform = {rotate: '-90', offset: 0};\n    }\n\n    var avoid;\n\n    if(ax.type !== 'multicategory') {\n        var tickLabels = ax._selections[ax._id + 'tick'];\n\n        avoid = {\n            selection: tickLabels,\n            side: ax.side\n        };\n\n        if(tickLabels && tickLabels.node() && tickLabels.node().parentNode) {\n            var translation = Drawing.getTranslate(tickLabels.node().parentNode);\n            avoid.offsetLeft = translation.x;\n            avoid.offsetTop = translation.y;\n        }\n    }\n\n    return Titles.draw(gd, axId + 'title', {\n        propContainer: ax,\n        propName: ax._name + '.title.text',\n        placeholder: fullLayout._dfltTitle[axLetter],\n        avoid: avoid,\n        transform: transform,\n        attributes: {x: x, y: y, 'text-anchor': 'middle'}\n    });\n}\n\naxes.shouldShowZeroLine = function(gd, ax, counterAxis) {\n    var rng = Lib.simpleMap(ax.range, ax.r2l);\n    return (\n        (rng[0] * rng[1] <= 0) &&\n        ax.zeroline &&\n        (ax.type === 'linear' || ax.type === '-') &&\n        ax._gridVals.length &&\n        (\n            clipEnds(ax, 0) ||\n            !anyCounterAxLineAtZero(gd, ax, counterAxis, rng) ||\n            hasBarsOrFill(gd, ax)\n        )\n    );\n};\n\naxes.clipEnds = function(ax, vals) {\n    return vals.filter(function(d) { return clipEnds(ax, d.x); });\n};\n\nfunction clipEnds(ax, l) {\n    var p = ax.l2p(l);\n    return (p > 1 && p < ax._length - 1);\n}\n\nfunction anyCounterAxLineAtZero(gd, ax, counterAxis, rng) {\n    var mainCounterAxis = counterAxis._mainAxis;\n    if(!mainCounterAxis) return;\n\n    var fullLayout = gd._fullLayout;\n    var axLetter = ax._id.charAt(0);\n    var counterLetter = axes.counterLetter(ax._id);\n\n    var zeroPosition = ax._offset + (\n        ((Math.abs(rng[0]) < Math.abs(rng[1])) === (axLetter === 'x')) ?\n        0 : ax._length\n    );\n\n    function lineNearZero(ax2) {\n        if(!ax2.showline || !ax2.linewidth) return false;\n        var tolerance = Math.max((ax2.linewidth + ax.zerolinewidth) / 2, 1);\n\n        function closeEnough(pos2) {\n            return typeof pos2 === 'number' && Math.abs(pos2 - zeroPosition) < tolerance;\n        }\n\n        if(closeEnough(ax2._mainLinePosition) || closeEnough(ax2._mainMirrorPosition)) {\n            return true;\n        }\n        var linePositions = ax2._linepositions || {};\n        for(var k in linePositions) {\n            if(closeEnough(linePositions[k][0]) || closeEnough(linePositions[k][1])) {\n                return true;\n            }\n        }\n    }\n\n    var plotinfo = fullLayout._plots[counterAxis._mainSubplot];\n    if(!(plotinfo.mainplotinfo || plotinfo).overlays.length) {\n        return lineNearZero(counterAxis, zeroPosition);\n    }\n\n    var counterLetterAxes = axes.list(gd, counterLetter);\n    for(var i = 0; i < counterLetterAxes.length; i++) {\n        var counterAxis2 = counterLetterAxes[i];\n        if(\n            counterAxis2._mainAxis === mainCounterAxis &&\n            lineNearZero(counterAxis2, zeroPosition)\n        ) {\n            return true;\n        }\n    }\n}\n\nfunction hasBarsOrFill(gd, ax) {\n    var fullData = gd._fullData;\n    var subplot = ax._mainSubplot;\n    var axLetter = ax._id.charAt(0);\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n\n        if(trace.visible === true && (trace.xaxis + trace.yaxis) === subplot) {\n            if(\n                Registry.traceIs(trace, 'bar-like') &&\n                trace.orientation === {x: 'h', y: 'v'}[axLetter]\n            ) return true;\n\n            if(\n                trace.fill &&\n                trace.fill.charAt(trace.fill.length - 1) === axLetter\n            ) return true;\n        }\n    }\n    return false;\n}\n\nfunction selectTickLabel(gTick) {\n    var s = d3.select(gTick);\n    var mj = s.select('.text-math-group');\n    return mj.empty() ? s.select('text') : mj;\n}\n\n/**\n * Find all margin pushers for 2D axes and reserve them for later use\n * Both label and rangeslider automargin calculations happen later so\n * we need to explicitly allow their ids in order to not delete them.\n *\n * TODO: can we pull the actual automargin calls forward to avoid this hack?\n * We're probably also doing multiple redraws in this case, would be faster\n * if we can just do the whole calculation ahead of time and draw once.\n */\naxes.allowAutoMargin = function(gd) {\n    var axList = axes.list(gd, '', true);\n    for(var i = 0; i < axList.length; i++) {\n        var ax = axList[i];\n        if(ax.automargin) {\n            Plots.allowAutoMargin(gd, axAutoMarginID(ax));\n        }\n        if(Registry.getComponentMethod('rangeslider', 'isVisible')(ax)) {\n            Plots.allowAutoMargin(gd, rangeSliderAutoMarginID(ax));\n        }\n    }\n};\n\nfunction axAutoMarginID(ax) { return ax._id + '.automargin'; }\nfunction rangeSliderAutoMarginID(ax) { return ax._id + '.rangeslider'; }\n\n// swap all the presentation attributes of the axes showing these traces\naxes.swap = function(gd, traces) {\n    var axGroups = makeAxisGroups(gd, traces);\n\n    for(var i = 0; i < axGroups.length; i++) {\n        swapAxisGroup(gd, axGroups[i].x, axGroups[i].y);\n    }\n};\n\nfunction makeAxisGroups(gd, traces) {\n    var groups = [];\n    var i, j;\n\n    for(i = 0; i < traces.length; i++) {\n        var groupsi = [];\n        var xi = gd._fullData[traces[i]].xaxis;\n        var yi = gd._fullData[traces[i]].yaxis;\n        if(!xi || !yi) continue; // not a 2D cartesian trace?\n\n        for(j = 0; j < groups.length; j++) {\n            if(groups[j].x.indexOf(xi) !== -1 || groups[j].y.indexOf(yi) !== -1) {\n                groupsi.push(j);\n            }\n        }\n\n        if(!groupsi.length) {\n            groups.push({x: [xi], y: [yi]});\n            continue;\n        }\n\n        var group0 = groups[groupsi[0]];\n        var groupj;\n\n        if(groupsi.length > 1) {\n            for(j = 1; j < groupsi.length; j++) {\n                groupj = groups[groupsi[j]];\n                mergeAxisGroups(group0.x, groupj.x);\n                mergeAxisGroups(group0.y, groupj.y);\n            }\n        }\n        mergeAxisGroups(group0.x, [xi]);\n        mergeAxisGroups(group0.y, [yi]);\n    }\n\n    return groups;\n}\n\nfunction mergeAxisGroups(intoSet, fromSet) {\n    for(var i = 0; i < fromSet.length; i++) {\n        if(intoSet.indexOf(fromSet[i]) === -1) intoSet.push(fromSet[i]);\n    }\n}\n\nfunction swapAxisGroup(gd, xIds, yIds) {\n    var xFullAxes = [];\n    var yFullAxes = [];\n    var layout = gd.layout;\n    var i, j;\n\n    for(i = 0; i < xIds.length; i++) xFullAxes.push(axes.getFromId(gd, xIds[i]));\n    for(i = 0; i < yIds.length; i++) yFullAxes.push(axes.getFromId(gd, yIds[i]));\n\n    var allAxKeys = Object.keys(axAttrs);\n\n    var noSwapAttrs = [\n        'anchor', 'domain', 'overlaying', 'position', 'side', 'tickangle', 'editType'\n    ];\n    var numericTypes = ['linear', 'log'];\n\n    for(i = 0; i < allAxKeys.length; i++) {\n        var keyi = allAxKeys[i];\n        var xVal = xFullAxes[0][keyi];\n        var yVal = yFullAxes[0][keyi];\n        var allEqual = true;\n        var coerceLinearX = false;\n        var coerceLinearY = false;\n        if(keyi.charAt(0) === '_' || typeof xVal === 'function' ||\n                noSwapAttrs.indexOf(keyi) !== -1) {\n            continue;\n        }\n        for(j = 1; j < xFullAxes.length && allEqual; j++) {\n            var xVali = xFullAxes[j][keyi];\n            if(keyi === 'type' && numericTypes.indexOf(xVal) !== -1 &&\n                    numericTypes.indexOf(xVali) !== -1 && xVal !== xVali) {\n                // type is special - if we find a mixture of linear and log,\n                // coerce them all to linear on flipping\n                coerceLinearX = true;\n            } else if(xVali !== xVal) allEqual = false;\n        }\n        for(j = 1; j < yFullAxes.length && allEqual; j++) {\n            var yVali = yFullAxes[j][keyi];\n            if(keyi === 'type' && numericTypes.indexOf(yVal) !== -1 &&\n                    numericTypes.indexOf(yVali) !== -1 && yVal !== yVali) {\n                // type is special - if we find a mixture of linear and log,\n                // coerce them all to linear on flipping\n                coerceLinearY = true;\n            } else if(yFullAxes[j][keyi] !== yVal) allEqual = false;\n        }\n        if(allEqual) {\n            if(coerceLinearX) layout[xFullAxes[0]._name].type = 'linear';\n            if(coerceLinearY) layout[yFullAxes[0]._name].type = 'linear';\n            swapAxisAttrs(layout, keyi, xFullAxes, yFullAxes, gd._fullLayout._dfltTitle);\n        }\n    }\n\n    // now swap x&y for any annotations anchored to these x & y\n    for(i = 0; i < gd._fullLayout.annotations.length; i++) {\n        var ann = gd._fullLayout.annotations[i];\n        if(xIds.indexOf(ann.xref) !== -1 &&\n                yIds.indexOf(ann.yref) !== -1) {\n            Lib.swapAttrs(layout.annotations[i], ['?']);\n        }\n    }\n}\n\nfunction swapAxisAttrs(layout, key, xFullAxes, yFullAxes, dfltTitle) {\n    // in case the value is the default for either axis,\n    // look at the first axis in each list and see if\n    // this key's value is undefined\n    var np = Lib.nestedProperty;\n    var xVal = np(layout[xFullAxes[0]._name], key).get();\n    var yVal = np(layout[yFullAxes[0]._name], key).get();\n    var i;\n\n    if(key === 'title') {\n        // special handling of placeholder titles\n        if(xVal && xVal.text === dfltTitle.x) {\n            xVal.text = dfltTitle.y;\n        }\n        if(yVal && yVal.text === dfltTitle.y) {\n            yVal.text = dfltTitle.x;\n        }\n    }\n\n    for(i = 0; i < xFullAxes.length; i++) {\n        np(layout, xFullAxes[i]._name + '.' + key).set(yVal);\n    }\n    for(i = 0; i < yFullAxes.length; i++) {\n        np(layout, yFullAxes[i]._name + '.' + key).set(xVal);\n    }\n}\n\nfunction isAngular(ax) {\n    return ax._id === 'angularaxis';\n}\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../components/titles\":668,\"../../constants/alignment\":675,\"../../constants/numerical\":680,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plots/plots\":812,\"../../registry\":831,\"./autorange\":750,\"./axis_autotype\":752,\"./axis_ids\":754,\"./clean_ticks\":756,\"./layout_attributes\":763,\"./set_convert\":769,\"d3\":157,\"fast-isnumeric\":224}],752:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function autoType(array, calendar, opts) {\n    opts = opts || {};\n\n    if(!opts.noMultiCategory && multiCategory(array)) return 'multicategory';\n    if(moreDates(array, calendar)) return 'date';\n    if(category(array)) return 'category';\n    if(linearOK(array)) return 'linear';\n    else return '-';\n};\n\n// is there at least one number in array? If not, we should leave\n// ax.type empty so it can be autoset later\nfunction linearOK(array) {\n    if(!array) return false;\n\n    for(var i = 0; i < array.length; i++) {\n        if(isNumeric(array[i])) return true;\n    }\n\n    return false;\n}\n\n// does the array a have mostly dates rather than numbers?\n// note: some values can be neither (such as blanks, text)\n// 2- or 4-digit integers can be both, so require twice as many\n// dates as non-dates, to exclude cases with mostly 2 & 4 digit\n// numbers and a few dates\n// as with categories, consider DISTINCT values only.\nfunction moreDates(a, calendar) {\n    // test at most 1000 points, evenly spaced\n    var inc = Math.max(1, (a.length - 1) / 1000);\n    var dcnt = 0;\n    var ncnt = 0;\n    var seen = {};\n\n    for(var i = 0; i < a.length; i += inc) {\n        var ai = a[Math.round(i)];\n        var stri = String(ai);\n        if(seen[stri]) continue;\n        seen[stri] = 1;\n\n        if(Lib.isDateTime(ai, calendar)) dcnt += 1;\n        if(isNumeric(ai)) ncnt += 1;\n    }\n\n    return (dcnt > ncnt * 2);\n}\n\n// are the (x,y)-values in gd.data mostly text?\n// require twice as many DISTINCT categories as distinct numbers\nfunction category(a) {\n    // test at most 1000 points\n    var inc = Math.max(1, (a.length - 1) / 1000);\n    var curvenums = 0;\n    var curvecats = 0;\n    var seen = {};\n\n    for(var i = 0; i < a.length; i += inc) {\n        var ai = a[Math.round(i)];\n        var stri = String(ai);\n        if(seen[stri]) continue;\n        seen[stri] = 1;\n\n        if(typeof ai === 'boolean') curvecats++;\n        else if(Lib.cleanNumber(ai) !== BADNUM) curvenums++;\n        else if(typeof ai === 'string') curvecats++;\n    }\n\n    return curvecats > curvenums * 2;\n}\n\n// very-loose requirements for multicategory,\n// trace modules that should never auto-type to multicategory\n// should be declared with 'noMultiCategory'\nfunction multiCategory(a) {\n    return Lib.isArrayOrTypedArray(a[0]) && Lib.isArrayOrTypedArray(a[1]);\n}\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"fast-isnumeric\":224}],753:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar handleTickValueDefaults = _dereq_('./tick_value_defaults');\nvar handleTickMarkDefaults = _dereq_('./tick_mark_defaults');\nvar handleTickLabelDefaults = _dereq_('./tick_label_defaults');\nvar handleCategoryOrderDefaults = _dereq_('./category_order_defaults');\nvar handleLineGridDefaults = _dereq_('./line_grid_defaults');\nvar setConvert = _dereq_('./set_convert');\n\n/**\n * options: object containing:\n *\n *  letter: 'x' or 'y'\n *  title: name of the axis (ie 'Colorbar') to go in default title\n *  font: the default font to inherit\n *  outerTicks: boolean, should ticks default to outside?\n *  showGrid: boolean, should gridlines be shown by default?\n *  noHover: boolean, this axis doesn't support hover effects?\n *  noTickson: boolean, this axis doesn't support 'tickson'\n *  data: the plot data, used to manage categories\n *  bgColor: the plot background color, to calculate default gridline colors\n *  calendar:\n *  splomStash:\n *  visibleDflt: boolean\n *  reverseDflt: boolean\n *  automargin: boolean\n */\nmodule.exports = function handleAxisDefaults(containerIn, containerOut, coerce, options, layoutOut) {\n    var letter = options.letter;\n    var font = options.font || {};\n    var splomStash = options.splomStash || {};\n\n    var visible = coerce('visible', !options.visibleDflt);\n\n    var axType = containerOut.type;\n\n    if(axType === 'date') {\n        var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults');\n        handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar);\n    }\n\n    setConvert(containerOut, layoutOut);\n\n    var autorangeDflt = !containerOut.isValidRange(containerIn.range);\n    if(autorangeDflt && options.reverseDflt) autorangeDflt = 'reversed';\n    var autoRange = coerce('autorange', autorangeDflt);\n    if(autoRange && (axType === 'linear' || axType === '-')) coerce('rangemode');\n\n    coerce('range');\n    containerOut.cleanRange();\n\n    handleCategoryOrderDefaults(containerIn, containerOut, coerce, options);\n\n    if(axType !== 'category' && !options.noHover) coerce('hoverformat');\n\n    var dfltColor = coerce('color');\n    // if axis.color was provided, use it for fonts too; otherwise,\n    // inherit from global font color in case that was provided.\n    // Compare to dflt rather than to containerIn, so we can provide color via\n    // template too.\n    var dfltFontColor = (dfltColor !== layoutAttributes.color.dflt) ? dfltColor : font.color;\n    // try to get default title from splom trace, fallback to graph-wide value\n    var dfltTitle = splomStash.label || layoutOut._dfltTitle[letter];\n\n    handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options, {pass: 1});\n    if(!visible) return containerOut;\n\n    coerce('title.text', dfltTitle);\n    Lib.coerceFont(coerce, 'title.font', {\n        family: font.family,\n        size: Math.round(font.size * 1.2),\n        color: dfltFontColor\n    });\n\n    handleTickValueDefaults(containerIn, containerOut, coerce, axType);\n    handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options, {pass: 2});\n    handleTickMarkDefaults(containerIn, containerOut, coerce, options);\n    handleLineGridDefaults(containerIn, containerOut, coerce, {\n        dfltColor: dfltColor,\n        bgColor: options.bgColor,\n        showGrid: options.showGrid,\n        attributes: layoutAttributes\n    });\n\n    if(containerOut.showline || containerOut.ticks) coerce('mirror');\n\n    if(options.automargin) coerce('automargin');\n\n    var isMultiCategory = containerOut.type === 'multicategory';\n\n    if(!options.noTickson &&\n        (containerOut.type === 'category' || isMultiCategory) &&\n        (containerOut.ticks || containerOut.showgrid)\n    ) {\n        var ticksonDflt;\n        if(isMultiCategory) ticksonDflt = 'boundaries';\n        coerce('tickson', ticksonDflt);\n    }\n\n    if(isMultiCategory) {\n        var showDividers = coerce('showdividers');\n        if(showDividers) {\n            coerce('dividercolor');\n            coerce('dividerwidth');\n        }\n    }\n\n    return containerOut;\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"./category_order_defaults\":755,\"./layout_attributes\":763,\"./line_grid_defaults\":765,\"./set_convert\":769,\"./tick_label_defaults\":770,\"./tick_mark_defaults\":771,\"./tick_value_defaults\":772}],754:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\n\nvar constants = _dereq_('./constants');\n\n\n// convert between axis names (xaxis, xaxis2, etc, elements of gd.layout)\n// and axis id's (x, x2, etc). Would probably have ditched 'xaxis'\n// completely in favor of just 'x' if it weren't ingrained in the API etc.\nexports.id2name = function id2name(id) {\n    if(typeof id !== 'string' || !id.match(constants.AX_ID_PATTERN)) return;\n    var axNum = id.substr(1);\n    if(axNum === '1') axNum = '';\n    return id.charAt(0) + 'axis' + axNum;\n};\n\nexports.name2id = function name2id(name) {\n    if(!name.match(constants.AX_NAME_PATTERN)) return;\n    var axNum = name.substr(5);\n    if(axNum === '1') axNum = '';\n    return name.charAt(0) + axNum;\n};\n\nexports.cleanId = function cleanId(id, axLetter) {\n    if(!id.match(constants.AX_ID_PATTERN)) return;\n    if(axLetter && id.charAt(0) !== axLetter) return;\n\n    var axNum = id.substr(1).replace(/^0+/, '');\n    if(axNum === '1') axNum = '';\n    return id.charAt(0) + axNum;\n};\n\n// get all axis objects, as restricted in listNames\nexports.list = function(gd, axLetter, only2d) {\n    var fullLayout = gd._fullLayout;\n    if(!fullLayout) return [];\n\n    var idList = exports.listIds(gd, axLetter);\n    var out = new Array(idList.length);\n    var i;\n\n    for(i = 0; i < idList.length; i++) {\n        var idi = idList[i];\n        out[i] = fullLayout[idi.charAt(0) + 'axis' + idi.substr(1)];\n    }\n\n    if(!only2d) {\n        var sceneIds3D = fullLayout._subplots.gl3d || [];\n\n        for(i = 0; i < sceneIds3D.length; i++) {\n            var scene = fullLayout[sceneIds3D[i]];\n\n            if(axLetter) out.push(scene[axLetter + 'axis']);\n            else out.push(scene.xaxis, scene.yaxis, scene.zaxis);\n        }\n    }\n\n    return out;\n};\n\n// get all axis ids, optionally restricted by letter\n// this only makes sense for 2d axes\nexports.listIds = function(gd, axLetter) {\n    var fullLayout = gd._fullLayout;\n    if(!fullLayout) return [];\n\n    var subplotLists = fullLayout._subplots;\n    if(axLetter) return subplotLists[axLetter + 'axis'];\n    return subplotLists.xaxis.concat(subplotLists.yaxis);\n};\n\n// get an axis object from its id 'x','x2' etc\n// optionally, id can be a subplot (ie 'x2y3') and type gets x or y from it\nexports.getFromId = function(gd, id, type) {\n    var fullLayout = gd._fullLayout;\n\n    if(type === 'x') id = id.replace(/y[0-9]*/, '');\n    else if(type === 'y') id = id.replace(/x[0-9]*/, '');\n\n    return fullLayout[exports.id2name(id)];\n};\n\n// get an axis object of specified type from the containing trace\nexports.getFromTrace = function(gd, fullTrace, type) {\n    var fullLayout = gd._fullLayout;\n    var ax = null;\n\n    if(Registry.traceIs(fullTrace, 'gl3d')) {\n        var scene = fullTrace.scene;\n        if(scene.substr(0, 5) === 'scene') {\n            ax = fullLayout[scene][type + 'axis'];\n        }\n    } else {\n        ax = exports.getFromId(gd, fullTrace[type + 'axis'] || type);\n    }\n\n    return ax;\n};\n\n// sort x, x2, x10, y, y2, y10...\nexports.idSort = function(id1, id2) {\n    var letter1 = id1.charAt(0);\n    var letter2 = id2.charAt(0);\n    if(letter1 !== letter2) return letter1 > letter2 ? 1 : -1;\n    return +(id1.substr(1) || 1) - +(id2.substr(1) || 1);\n};\n\nexports.getAxisGroup = function getAxisGroup(fullLayout, axId) {\n    var matchGroups = fullLayout._axisMatchGroups;\n\n    for(var i = 0; i < matchGroups.length; i++) {\n        var group = matchGroups[i];\n        if(group[axId]) return 'g' + i;\n    }\n    return axId;\n};\n\n},{\"../../registry\":831,\"./constants\":757}],755:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nfunction findCategories(ax, opts) {\n    var dataAttr = opts.dataAttr || ax._id.charAt(0);\n    var lookup = {};\n    var axData;\n    var i, j;\n\n    if(opts.axData) {\n        // non-x/y case\n        axData = opts.axData;\n    } else {\n        // x/y case\n        axData = [];\n        for(i = 0; i < opts.data.length; i++) {\n            var trace = opts.data[i];\n            if(trace[dataAttr + 'axis'] === ax._id) {\n                axData.push(trace);\n            }\n        }\n    }\n\n    for(i = 0; i < axData.length; i++) {\n        var vals = axData[i][dataAttr];\n        for(j = 0; j < vals.length; j++) {\n            var v = vals[j];\n            if(v !== null && v !== undefined) {\n                lookup[v] = 1;\n            }\n        }\n    }\n\n    return Object.keys(lookup);\n}\n\n/**\n * Fills in category* default and initial categories.\n *\n * @param {object} containerIn : input axis object\n * @param {object} containerOut : full axis object\n * @param {function} coerce : Lib.coerce fn wrapper\n * @param {object} opts :\n *   - data {array} : (full) data trace\n * OR\n *   - axData {array} : (full) data associated with axis being coerced here\n *   - dataAttr {string} : attribute name corresponding to coordinate array\n */\nmodule.exports = function handleCategoryOrderDefaults(containerIn, containerOut, coerce, opts) {\n    if(containerOut.type !== 'category') return;\n\n    var arrayIn = containerIn.categoryarray;\n    var isValidArray = (Array.isArray(arrayIn) && arrayIn.length > 0);\n\n    // override default 'categoryorder' value when non-empty array is supplied\n    var orderDefault;\n    if(isValidArray) orderDefault = 'array';\n\n    var order = coerce('categoryorder', orderDefault);\n    var array;\n\n    // coerce 'categoryarray' only in array order case\n    if(order === 'array') {\n        array = coerce('categoryarray');\n    }\n\n    // cannot set 'categoryorder' to 'array' with an invalid 'categoryarray'\n    if(!isValidArray && order === 'array') {\n        order = containerOut.categoryorder = 'trace';\n    }\n\n    // set up things for makeCalcdata\n    if(order === 'trace') {\n        containerOut._initialCategories = [];\n    } else if(order === 'array') {\n        containerOut._initialCategories = array.slice();\n    } else {\n        array = findCategories(containerOut, opts).sort();\n        if(order === 'category ascending') {\n            containerOut._initialCategories = array;\n        } else if(order === 'category descending') {\n            containerOut._initialCategories = array.reverse();\n        }\n    }\n};\n\n},{}],756:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar Lib = _dereq_('../../lib');\nvar ONEDAY = _dereq_('../../constants/numerical').ONEDAY;\n\n/**\n * Return a validated dtick value for this axis\n *\n * @param {any} dtick: the candidate dtick. valid values are numbers and strings,\n *     and further constrained depending on the axis type.\n * @param {string} axType: the axis type\n */\nexports.dtick = function(dtick, axType) {\n    var isLog = axType === 'log';\n    var isDate = axType === 'date';\n    var isCat = axType === 'category';\n    var dtickDflt = isDate ? ONEDAY : 1;\n\n    if(!dtick) return dtickDflt;\n\n    if(isNumeric(dtick)) {\n        dtick = Number(dtick);\n        if(dtick <= 0) return dtickDflt;\n        if(isCat) {\n            // category dtick must be positive integers\n            return Math.max(1, Math.round(dtick));\n        }\n        if(isDate) {\n            // date dtick must be at least 0.1ms (our current precision)\n            return Math.max(0.1, dtick);\n        }\n        return dtick;\n    }\n\n    if(typeof dtick !== 'string' || !(isDate || isLog)) {\n        return dtickDflt;\n    }\n\n    var prefix = dtick.charAt(0);\n    var dtickNum = dtick.substr(1);\n    dtickNum = isNumeric(dtickNum) ? Number(dtickNum) : 0;\n\n    if((dtickNum <= 0) || !(\n            // \"M<n>\" gives ticks every (integer) n months\n            (isDate && prefix === 'M' && dtickNum === Math.round(dtickNum)) ||\n            // \"L<f>\" gives ticks linearly spaced in data (not in position) every (float) f\n            (isLog && prefix === 'L') ||\n            // \"D1\" gives powers of 10 with all small digits between, \"D2\" gives only 2 and 5\n            (isLog && prefix === 'D' && (dtickNum === 1 || dtickNum === 2))\n        )) {\n        return dtickDflt;\n    }\n\n    return dtick;\n};\n\n/**\n * Return a validated tick0 for this axis\n *\n * @param {any} tick0: the candidate tick0. Valid values are numbers and strings,\n *     further constrained depending on the axis type\n * @param {string} axType: the axis type\n * @param {string} calendar: for date axes, the calendar to validate/convert with\n * @param {any} dtick: an already valid dtick. Only used for D1 and D2 log dticks,\n *     which do not support tick0 at all.\n */\nexports.tick0 = function(tick0, axType, calendar, dtick) {\n    if(axType === 'date') {\n        return Lib.cleanDate(tick0, Lib.dateTick0(calendar));\n    }\n    if(dtick === 'D1' || dtick === 'D2') {\n        // D1 and D2 modes ignore tick0 entirely\n        return undefined;\n    }\n    // Aside from date axes, tick0 must be numeric\n    return isNumeric(tick0) ? Number(tick0) : 0;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"fast-isnumeric\":224}],757:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\nvar counterRegex = _dereq_('../../lib/regex').counter;\n\n\nmodule.exports = {\n\n    idRegex: {\n        x: counterRegex('x'),\n        y: counterRegex('y')\n    },\n\n    attrRegex: counterRegex('[xy]axis'),\n\n    // axis match regular expression\n    xAxisMatch: counterRegex('xaxis'),\n    yAxisMatch: counterRegex('yaxis'),\n\n    // pattern matching axis ids and names\n    // note that this is more permissive than counterRegex, as\n    // id2name, name2id, and cleanId accept \"x1\" etc\n    AX_ID_PATTERN: /^[xyz][0-9]*$/,\n    AX_NAME_PATTERN: /^[xyz]axis[0-9]*$/,\n\n    // and for 2D subplots\n    SUBPLOT_PATTERN: /^x([0-9]*)y([0-9]*)$/,\n\n    // pixels to move mouse before you stop clamping to starting point\n    MINDRAG: 8,\n\n    // smallest dimension allowed for a select box\n    MINSELECT: 12,\n\n    // smallest dimension allowed for a zoombox\n    MINZOOM: 20,\n\n    // width of axis drag regions\n    DRAGGERSIZE: 20,\n\n    // max pixels off straight before a lasso select line counts as bent\n    BENDPX: 1.5,\n\n    // delay before a redraw (relayout) after smooth panning and zooming\n    REDRAWDELAY: 50,\n\n    // throttling limit (ms) for selectPoints calls\n    SELECTDELAY: 100,\n\n    // cache ID suffix for throttle\n    SELECTID: '-select',\n\n    // last resort axis ranges for x and y axes if we have no data\n    DFLTRANGEX: [-1, 6],\n    DFLTRANGEY: [-1, 4],\n\n    // Layers to keep trace types in the right order\n    // N.B. each  'unique' plot method must have its own layer\n    traceLayerClasses: [\n        'heatmaplayer',\n        'contourcarpetlayer', 'contourlayer',\n        'funnellayer', 'waterfalllayer', 'barlayer',\n        'carpetlayer',\n        'violinlayer',\n        'boxlayer',\n        'ohlclayer',\n        'scattercarpetlayer', 'scatterlayer'\n    ],\n\n    clipOnAxisFalseQuery: [\n        '.scatterlayer',\n        '.barlayer',\n        '.funnellayer',\n        '.waterfalllayer'\n    ],\n\n    layerValue2layerClass: {\n        'above traces': 'above',\n        'below traces': 'below'\n    }\n};\n\n},{\"../../lib/regex\":719}],758:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar id2name = _dereq_('./axis_ids').id2name;\nvar scaleZoom = _dereq_('./scale_zoom');\nvar makePadFn = _dereq_('./autorange').makePadFn;\nvar concatExtremes = _dereq_('./autorange').concatExtremes;\n\nvar ALMOST_EQUAL = _dereq_('../../constants/numerical').ALMOST_EQUAL;\nvar FROM_BL = _dereq_('../../constants/alignment').FROM_BL;\n\nexports.handleConstraintDefaults = function(containerIn, containerOut, coerce, allAxisIds, layoutOut) {\n    var constraintGroups = layoutOut._axisConstraintGroups;\n    var matchGroups = layoutOut._axisMatchGroups;\n    var axId = containerOut._id;\n    var axLetter = axId.charAt(0);\n    var splomStash = ((layoutOut._splomAxes || {})[axLetter] || {})[axId] || {};\n    var thisID = containerOut._id;\n    var letter = thisID.charAt(0);\n\n    // coerce the constraint mechanics even if this axis has no scaleanchor\n    // because it may be the anchor of another axis.\n    var constrain = coerce('constrain');\n    Lib.coerce(containerIn, containerOut, {\n        constraintoward: {\n            valType: 'enumerated',\n            values: letter === 'x' ? ['left', 'center', 'right'] : ['bottom', 'middle', 'top'],\n            dflt: letter === 'x' ? 'center' : 'middle'\n        }\n    }, 'constraintoward');\n\n    var matches, matchOpts;\n\n    if((containerIn.matches || splomStash.matches) && !containerOut.fixedrange) {\n        matchOpts = getConstraintOpts(matchGroups, thisID, allAxisIds, layoutOut);\n        matches = Lib.coerce(containerIn, containerOut, {\n            matches: {\n                valType: 'enumerated',\n                values: matchOpts.linkableAxes || [],\n                dflt: splomStash.matches\n            }\n        }, 'matches');\n    }\n\n    // 'matches' wins over 'scaleanchor' (for now)\n    var scaleanchor, scaleOpts;\n\n    if(!matches && containerIn.scaleanchor && !(containerOut.fixedrange && constrain !== 'domain')) {\n        scaleOpts = getConstraintOpts(constraintGroups, thisID, allAxisIds, layoutOut, constrain);\n        scaleanchor = Lib.coerce(containerIn, containerOut, {\n            scaleanchor: {\n                valType: 'enumerated',\n                values: scaleOpts.linkableAxes || []\n            }\n        }, 'scaleanchor');\n    }\n\n    if(matches) {\n        delete containerOut.constrain;\n        updateConstraintGroups(matchGroups, matchOpts.thisGroup, thisID, matches, 1);\n    } else if(allAxisIds.indexOf(containerIn.matches) !== -1) {\n        Lib.warn('ignored ' + containerOut._name + '.matches: \"' +\n            containerIn.matches + '\" to avoid either an infinite loop ' +\n            'or because the target axis has fixed range.');\n    }\n\n    if(scaleanchor) {\n        var scaleratio = coerce('scaleratio');\n\n        // TODO: I suppose I could do attribute.min: Number.MIN_VALUE to avoid zero,\n        // but that seems hacky. Better way to say \"must be a positive number\"?\n        // Of course if you use several super-tiny values you could eventually\n        // force a product of these to zero and all hell would break loose...\n        // Likewise with super-huge values.\n        if(!scaleratio) scaleratio = containerOut.scaleratio = 1;\n\n        updateConstraintGroups(constraintGroups, scaleOpts.thisGroup, thisID, scaleanchor, scaleratio);\n    } else if(allAxisIds.indexOf(containerIn.scaleanchor) !== -1) {\n        Lib.warn('ignored ' + containerOut._name + '.scaleanchor: \"' +\n            containerIn.scaleanchor + '\" to avoid either an infinite loop ' +\n            'and possibly inconsistent scaleratios, or because the target ' +\n            'axis has fixed range or this axis declares a *matches* constraint.');\n    }\n};\n\n// If this axis is already part of a constraint group, we can't\n// scaleanchor any other axis in that group, or we'd make a loop.\n// Filter allAxisIds to enforce this, also matching axis types.\nfunction getConstraintOpts(groups, thisID, allAxisIds, layoutOut, constrain) {\n    var doesNotConstrainRange = constrain !== 'range';\n    var thisType = layoutOut[id2name(thisID)].type;\n    var i, j, idj, axj;\n\n    var linkableAxes = [];\n    for(j = 0; j < allAxisIds.length; j++) {\n        idj = allAxisIds[j];\n        if(idj === thisID) continue;\n\n        axj = layoutOut[id2name(idj)];\n        if(axj.type === thisType) {\n            if(!axj.fixedrange) {\n                linkableAxes.push(idj);\n            } else if(doesNotConstrainRange && axj.anchor) {\n                // allow domain constraints on subplots where\n                // BOTH axes have fixedrange:true and constrain:domain\n                var counterAxj = layoutOut[id2name(axj.anchor)];\n                if(counterAxj.fixedrange) {\n                    linkableAxes.push(idj);\n                }\n            }\n        }\n    }\n\n    for(i = 0; i < groups.length; i++) {\n        if(groups[i][thisID]) {\n            var thisGroup = groups[i];\n\n            var linkableAxesNoLoops = [];\n            for(j = 0; j < linkableAxes.length; j++) {\n                idj = linkableAxes[j];\n                if(!thisGroup[idj]) linkableAxesNoLoops.push(idj);\n            }\n            return {linkableAxes: linkableAxesNoLoops, thisGroup: thisGroup};\n        }\n    }\n\n    return {linkableAxes: linkableAxes, thisGroup: null};\n}\n\n/*\n * Add this axis to the axis constraint groups, which is the collection\n * of axes that are all constrained together on scale.\n *\n * constraintGroups: a list of objects. each object is\n * {axis_id: scale_within_group}, where scale_within_group is\n * only important relative to the rest of the group, and defines\n * the relative scales between all axes in the group\n *\n * thisGroup: the group the current axis is already in\n * thisID: the id if the current axis\n * scaleanchor: the id of the axis to scale it with\n * scaleratio: the ratio of this axis to the scaleanchor axis\n */\nfunction updateConstraintGroups(constraintGroups, thisGroup, thisID, scaleanchor, scaleratio) {\n    var i, j, groupi, keyj, thisGroupIndex;\n\n    if(thisGroup === null) {\n        thisGroup = {};\n        thisGroup[thisID] = 1;\n        thisGroupIndex = constraintGroups.length;\n        constraintGroups.push(thisGroup);\n    } else {\n        thisGroupIndex = constraintGroups.indexOf(thisGroup);\n    }\n\n    var thisGroupKeys = Object.keys(thisGroup);\n\n    // we know that this axis isn't in any other groups, but we don't know\n    // about the scaleanchor axis. If it is, we need to merge the groups.\n    for(i = 0; i < constraintGroups.length; i++) {\n        groupi = constraintGroups[i];\n        if(i !== thisGroupIndex && groupi[scaleanchor]) {\n            var baseScale = groupi[scaleanchor];\n            for(j = 0; j < thisGroupKeys.length; j++) {\n                keyj = thisGroupKeys[j];\n                groupi[keyj] = baseScale * scaleratio * thisGroup[keyj];\n            }\n            constraintGroups.splice(thisGroupIndex, 1);\n            return;\n        }\n    }\n\n    // otherwise, we insert the new scaleanchor axis as the base scale (1)\n    // in its group, and scale the rest of the group to it\n    if(scaleratio !== 1) {\n        for(j = 0; j < thisGroupKeys.length; j++) {\n            thisGroup[thisGroupKeys[j]] *= scaleratio;\n        }\n    }\n    thisGroup[scaleanchor] = 1;\n}\n\nexports.enforce = function enforce(gd) {\n    var fullLayout = gd._fullLayout;\n    var constraintGroups = fullLayout._axisConstraintGroups || [];\n\n    var i, j, axisID, ax, normScale, mode, factor;\n\n    for(i = 0; i < constraintGroups.length; i++) {\n        var group = constraintGroups[i];\n        var axisIDs = Object.keys(group);\n\n        var minScale = Infinity;\n        var maxScale = 0;\n        // mostly matchScale will be the same as minScale\n        // ie we expand axis ranges to encompass *everything*\n        // that's currently in any of their ranges, but during\n        // autorange of a subset of axes we will ignore other\n        // axes for this purpose.\n        var matchScale = Infinity;\n        var normScales = {};\n        var axes = {};\n        var hasAnyDomainConstraint = false;\n\n        // find the (normalized) scale of each axis in the group\n        for(j = 0; j < axisIDs.length; j++) {\n            axisID = axisIDs[j];\n            axes[axisID] = ax = fullLayout[id2name(axisID)];\n\n            if(ax._inputDomain) ax.domain = ax._inputDomain.slice();\n            else ax._inputDomain = ax.domain.slice();\n\n            if(!ax._inputRange) ax._inputRange = ax.range.slice();\n\n            // set axis scale here so we can use _m rather than\n            // having to calculate it from length and range\n            ax.setScale();\n\n            // abs: inverted scales still satisfy the constraint\n            normScales[axisID] = normScale = Math.abs(ax._m) / group[axisID];\n            minScale = Math.min(minScale, normScale);\n            if(ax.constrain === 'domain' || !ax._constraintShrinkable) {\n                matchScale = Math.min(matchScale, normScale);\n            }\n\n            // this has served its purpose, so remove it\n            delete ax._constraintShrinkable;\n            maxScale = Math.max(maxScale, normScale);\n\n            if(ax.constrain === 'domain') hasAnyDomainConstraint = true;\n        }\n\n        // Do we have a constraint mismatch? Give a small buffer for rounding errors\n        if(minScale > ALMOST_EQUAL * maxScale && !hasAnyDomainConstraint) continue;\n\n        // now increase any ranges we need to until all normalized scales are equal\n        for(j = 0; j < axisIDs.length; j++) {\n            axisID = axisIDs[j];\n            normScale = normScales[axisID];\n            ax = axes[axisID];\n            mode = ax.constrain;\n\n            // even if the scale didn't change, if we're shrinking domain\n            // we need to recalculate in case `constraintoward` changed\n            if(normScale !== matchScale || mode === 'domain') {\n                factor = normScale / matchScale;\n\n                if(mode === 'range') {\n                    scaleZoom(ax, factor);\n                } else {\n                    // mode === 'domain'\n\n                    var inputDomain = ax._inputDomain;\n                    var domainShrunk = (ax.domain[1] - ax.domain[0]) /\n                        (inputDomain[1] - inputDomain[0]);\n                    var rangeShrunk = (ax.r2l(ax.range[1]) - ax.r2l(ax.range[0])) /\n                        (ax.r2l(ax._inputRange[1]) - ax.r2l(ax._inputRange[0]));\n\n                    factor /= domainShrunk;\n\n                    if(factor * rangeShrunk < 1) {\n                        // we've asked to magnify the axis more than we can just by\n                        // enlarging the domain - so we need to constrict range\n                        ax.domain = ax._input.domain = inputDomain.slice();\n                        scaleZoom(ax, factor);\n                        continue;\n                    }\n\n                    if(rangeShrunk < 1) {\n                        // the range has previously been constricted by ^^, but we've\n                        // switched to the domain-constricted regime, so reset range\n                        ax.range = ax._input.range = ax._inputRange.slice();\n                        factor *= rangeShrunk;\n                    }\n\n                    if(ax.autorange) {\n                        /*\n                         * range & factor may need to change because range was\n                         * calculated for the larger scaling, so some pixel\n                         * paddings may get cut off when we reduce the domain.\n                         *\n                         * This is easier than the regular autorange calculation\n                         * because we already know the scaling `m`, but we still\n                         * need to cut out impossible constraints (like\n                         * annotations with super-long arrows). That's what\n                         * outerMin/Max are for - if the expansion was going to\n                         * go beyond the original domain, it must be impossible\n                         */\n                        var rl0 = ax.r2l(ax.range[0]);\n                        var rl1 = ax.r2l(ax.range[1]);\n                        var rangeCenter = (rl0 + rl1) / 2;\n                        var rangeMin = rangeCenter;\n                        var rangeMax = rangeCenter;\n                        var halfRange = Math.abs(rl1 - rangeCenter);\n                        // extra tiny bit for rounding errors, in case we actually\n                        // *are* expanding to the full domain\n                        var outerMin = rangeCenter - halfRange * factor * 1.0001;\n                        var outerMax = rangeCenter + halfRange * factor * 1.0001;\n                        var getPad = makePadFn(ax);\n\n                        updateDomain(ax, factor);\n                        var m = Math.abs(ax._m);\n                        var extremes = concatExtremes(gd, ax);\n                        var minArray = extremes.min;\n                        var maxArray = extremes.max;\n                        var newVal;\n                        var k;\n\n                        for(k = 0; k < minArray.length; k++) {\n                            newVal = minArray[k].val - getPad(minArray[k]) / m;\n                            if(newVal > outerMin && newVal < rangeMin) {\n                                rangeMin = newVal;\n                            }\n                        }\n\n                        for(k = 0; k < maxArray.length; k++) {\n                            newVal = maxArray[k].val + getPad(maxArray[k]) / m;\n                            if(newVal < outerMax && newVal > rangeMax) {\n                                rangeMax = newVal;\n                            }\n                        }\n\n                        var domainExpand = (rangeMax - rangeMin) / (2 * halfRange);\n                        factor /= domainExpand;\n\n                        rangeMin = ax.l2r(rangeMin);\n                        rangeMax = ax.l2r(rangeMax);\n                        ax.range = ax._input.range = (rl0 < rl1) ?\n                            [rangeMin, rangeMax] : [rangeMax, rangeMin];\n                    }\n\n                    updateDomain(ax, factor);\n                }\n            }\n        }\n    }\n};\n\n// For use before autoranging, check if this axis was previously constrained\n// by domain but no longer is\nexports.clean = function clean(gd, ax) {\n    if(ax._inputDomain) {\n        var isConstrained = false;\n        var axId = ax._id;\n        var constraintGroups = gd._fullLayout._axisConstraintGroups;\n        for(var j = 0; j < constraintGroups.length; j++) {\n            if(constraintGroups[j][axId]) {\n                isConstrained = true;\n                break;\n            }\n        }\n        if(!isConstrained || ax.constrain !== 'domain') {\n            ax._input.domain = ax.domain = ax._inputDomain;\n            delete ax._inputDomain;\n        }\n    }\n};\n\nfunction updateDomain(ax, factor) {\n    var inputDomain = ax._inputDomain;\n    var centerFraction = FROM_BL[ax.constraintoward];\n    var center = inputDomain[0] + (inputDomain[1] - inputDomain[0]) * centerFraction;\n\n    ax.domain = ax._input.domain = [\n        center + (inputDomain[0] - center) / factor,\n        center + (inputDomain[1] - center) / factor\n    ];\n    ax.setScale();\n}\n\n},{\"../../constants/alignment\":675,\"../../constants/numerical\":680,\"../../lib\":703,\"./autorange\":750,\"./axis_ids\":754,\"./scale_zoom\":767}],759:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\nvar supportsPassive = _dereq_('has-passive-events');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Fx = _dereq_('../../components/fx');\nvar Axes = _dereq_('./axes');\nvar setCursor = _dereq_('../../lib/setcursor');\nvar dragElement = _dereq_('../../components/dragelement');\nvar FROM_TL = _dereq_('../../constants/alignment').FROM_TL;\nvar clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');\nvar redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;\n\nvar Plots = _dereq_('../plots');\n\nvar getFromId = _dereq_('./axis_ids').getFromId;\nvar prepSelect = _dereq_('./select').prepSelect;\nvar clearSelect = _dereq_('./select').clearSelect;\nvar selectOnClick = _dereq_('./select').selectOnClick;\nvar scaleZoom = _dereq_('./scale_zoom');\n\nvar constants = _dereq_('./constants');\nvar MINDRAG = constants.MINDRAG;\nvar MINZOOM = constants.MINZOOM;\n\n// flag for showing \"doubleclick to zoom out\" only at the beginning\nvar SHOWZOOMOUTTIP = true;\n\n// dragBox: create an element to drag one or more axis ends\n// inputs:\n//      plotinfo - which subplot are we making dragboxes on?\n//      x,y,w,h - left, top, width, height of the box\n//      ns - how does this drag the vertical axis?\n//          'n' - top only\n//          's' - bottom only\n//          'ns' - top and bottom together, difference unchanged\n//      ew - same for horizontal axis\nfunction makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {\n    // mouseDown stores ms of first mousedown event in the last\n    // DBLCLICKDELAY ms on the drag bars\n    // numClicks stores how many mousedowns have been seen\n    // within DBLCLICKDELAY so we can check for click or doubleclick events\n    // dragged stores whether a drag has occurred, so we don't have to\n    // redraw unnecessarily, ie if no move bigger than MINDRAG or MINZOOM px\n    var zoomlayer = gd._fullLayout._zoomlayer;\n    var isMainDrag = (ns + ew === 'nsew');\n    var singleEnd = (ns + ew).length === 1;\n\n    // main subplot x and y (i.e. found in plotinfo - the main ones)\n    var xa0, ya0;\n    // {ax._id: ax} hash objects\n    var xaHash, yaHash;\n    // xaHash/yaHash values (arrays)\n    var xaxes, yaxes;\n    // main axis offsets\n    var xs, ys;\n    // main axis lengths\n    var pw, ph;\n    // contains keys 'xaHash', 'yaHash', 'xaxes', and 'yaxes'\n    // which are the x/y {ax._id: ax} hash objects and their values\n    // for linked axis relative to this subplot\n    var links;\n    // similar to `links` but for matching axes\n    var matches;\n    // set to ew/ns val when active, set to '' when inactive\n    var xActive, yActive;\n    // are all axes in this subplot are fixed?\n    var allFixedRanges;\n    // do we need to edit x/y ranges?\n    var editX, editY;\n    // graph-wide optimization flags\n    var hasScatterGl, hasSplom, hasSVG;\n    // collected changes to be made to the plot by relayout at the end\n    var updates;\n\n    function recomputeAxisLists() {\n        xa0 = plotinfo.xaxis;\n        ya0 = plotinfo.yaxis;\n        pw = xa0._length;\n        ph = ya0._length;\n        xs = xa0._offset;\n        ys = ya0._offset;\n\n        xaHash = {};\n        xaHash[xa0._id] = xa0;\n        yaHash = {};\n        yaHash[ya0._id] = ya0;\n\n        // if we're dragging two axes at once, also drag overlays\n        if(ns && ew) {\n            var overlays = plotinfo.overlays;\n            for(var i = 0; i < overlays.length; i++) {\n                var xa = overlays[i].xaxis;\n                xaHash[xa._id] = xa;\n                var ya = overlays[i].yaxis;\n                yaHash[ya._id] = ya;\n            }\n        }\n\n        xaxes = hashValues(xaHash);\n        yaxes = hashValues(yaHash);\n        xActive = isDirectionActive(xaxes, ew);\n        yActive = isDirectionActive(yaxes, ns);\n        allFixedRanges = !yActive && !xActive;\n\n        links = calcLinks(gd, gd._fullLayout._axisConstraintGroups, xaHash, yaHash);\n        matches = calcLinks(gd, gd._fullLayout._axisMatchGroups, xaHash, yaHash);\n        editX = ew || links.isSubplotConstrained || matches.isSubplotConstrained;\n        editY = ns || links.isSubplotConstrained || matches.isSubplotConstrained;\n\n        var fullLayout = gd._fullLayout;\n        hasScatterGl = fullLayout._has('scattergl');\n        hasSplom = fullLayout._has('splom');\n        hasSVG = fullLayout._has('svg');\n    }\n\n    recomputeAxisLists();\n\n    var cursor = getDragCursor(yActive + xActive, gd._fullLayout.dragmode, isMainDrag);\n    var dragger = makeRectDragger(plotinfo, ns + ew + 'drag', cursor, x, y, w, h);\n\n    // still need to make the element if the axes are disabled\n    // but nuke its events (except for maindrag which needs them for hover)\n    // and stop there\n    if(allFixedRanges && !isMainDrag) {\n        dragger.onmousedown = null;\n        dragger.style.pointerEvents = 'none';\n        return dragger;\n    }\n\n    var dragOptions = {\n        element: dragger,\n        gd: gd,\n        plotinfo: plotinfo\n    };\n\n    dragOptions.prepFn = function(e, startX, startY) {\n        var dragModePrev = dragOptions.dragmode;\n        var dragModeNow = gd._fullLayout.dragmode;\n        if(dragModeNow !== dragModePrev) {\n            dragOptions.dragmode = dragModeNow;\n        }\n\n        recomputeAxisLists();\n\n        if(!allFixedRanges) {\n            if(isMainDrag) {\n                // main dragger handles all drag modes, and changes\n                // to pan (or to zoom if it already is pan) on shift\n                if(e.shiftKey) {\n                    if(dragModeNow === 'pan') dragModeNow = 'zoom';\n                    else if(!isSelectOrLasso(dragModeNow)) dragModeNow = 'pan';\n                } else if(e.ctrlKey) {\n                    dragModeNow = 'pan';\n                }\n            } else {\n                // all other draggers just pan\n                dragModeNow = 'pan';\n            }\n        }\n\n        if(dragModeNow === 'lasso') dragOptions.minDrag = 1;\n        else dragOptions.minDrag = undefined;\n\n        if(isSelectOrLasso(dragModeNow)) {\n            dragOptions.xaxes = xaxes;\n            dragOptions.yaxes = yaxes;\n            // this attaches moveFn, clickFn, doneFn on dragOptions\n            prepSelect(e, startX, startY, dragOptions, dragModeNow);\n        } else {\n            dragOptions.clickFn = clickFn;\n            if(isSelectOrLasso(dragModePrev)) {\n                // TODO Fix potential bug\n                // Note: clearing / resetting selection state only happens, when user\n                // triggers at least one interaction in pan/zoom mode. Otherwise, the\n                // select/lasso outlines are deleted (in plots.js.cleanPlot) but the selection\n                // cache isn't cleared. So when the user switches back to select/lasso and\n                // 'adds to a selection' with Shift, the \"old\", seemingly removed outlines\n                // are redrawn again because the selection cache still holds their coordinates.\n                // However, this isn't easily solved, since plots.js would need\n                // to have a reference to the dragOptions object (which holds the\n                // selection cache).\n                clearAndResetSelect();\n            }\n\n            if(!allFixedRanges) {\n                if(dragModeNow === 'zoom') {\n                    dragOptions.moveFn = zoomMove;\n                    dragOptions.doneFn = zoomDone;\n\n                    // zoomMove takes care of the threshold, but we need to\n                    // minimize this so that constrained zoom boxes will flip\n                    // orientation at the right place\n                    dragOptions.minDrag = 1;\n\n                    zoomPrep(e, startX, startY);\n                } else if(dragModeNow === 'pan') {\n                    dragOptions.moveFn = plotDrag;\n                    dragOptions.doneFn = dragTail;\n                }\n            }\n        }\n\n        gd._fullLayout._redrag = function() {\n            var dragDataNow = gd._dragdata;\n\n            if(dragDataNow && dragDataNow.element === dragger) {\n                var dragModeNow = gd._fullLayout.dragmode;\n\n                if(!isSelectOrLasso(dragModeNow)) {\n                    recomputeAxisLists();\n                    updateSubplots([0, 0, pw, ph]);\n                    dragOptions.moveFn(dragDataNow.dx, dragDataNow.dy);\n                }\n\n                // TODO should we try to \"re-select\" under select/lasso modes?\n                // probably best to wait for https://github.com/plotly/plotly.js/issues/1851\n            }\n        };\n    };\n\n    function clearAndResetSelect() {\n        // clear selection polygon cache (if any)\n        dragOptions.plotinfo.selection = false;\n        // clear selection outlines\n        clearSelect(gd);\n    }\n\n    function clickFn(numClicks, evt) {\n        var clickmode = gd._fullLayout.clickmode;\n\n        removeZoombox(gd);\n\n        if(numClicks === 2 && !singleEnd) doubleClick();\n\n        if(isMainDrag) {\n            if(clickmode.indexOf('select') > -1) {\n                selectOnClick(evt, gd, xaxes, yaxes, plotinfo.id, dragOptions);\n            }\n\n            if(clickmode.indexOf('event') > -1) {\n                Fx.click(gd, evt, plotinfo.id);\n            }\n        } else if(numClicks === 1 && singleEnd) {\n            var ax = ns ? ya0 : xa0;\n            var end = (ns === 's' || ew === 'w') ? 0 : 1;\n            var attrStr = ax._name + '.range[' + end + ']';\n            var initialText = getEndText(ax, end);\n            var hAlign = 'left';\n            var vAlign = 'middle';\n\n            if(ax.fixedrange) return;\n\n            if(ns) {\n                vAlign = (ns === 'n') ? 'top' : 'bottom';\n                if(ax.side === 'right') hAlign = 'right';\n            } else if(ew === 'e') hAlign = 'right';\n\n            if(gd._context.showAxisRangeEntryBoxes) {\n                d3.select(dragger)\n                    .call(svgTextUtils.makeEditable, {\n                        gd: gd,\n                        immediate: true,\n                        background: gd._fullLayout.paper_bgcolor,\n                        text: String(initialText),\n                        fill: ax.tickfont ? ax.tickfont.color : '#444',\n                        horizontalAlign: hAlign,\n                        verticalAlign: vAlign\n                    })\n                    .on('edit', function(text) {\n                        var v = ax.d2r(text);\n                        if(v !== undefined) {\n                            Registry.call('_guiRelayout', gd, attrStr, v);\n                        }\n                    });\n            }\n        }\n    }\n\n    dragElement.init(dragOptions);\n\n    // x/y px position at start of drag\n    var x0, y0;\n    // bbox object of the zoombox\n    var box;\n    // luminance of bg behind zoombox\n    var lum;\n    // zoombox path outline\n    var path0;\n    // is zoombox dimmed (during drag)\n    var dimmed;\n    // 'x'-only, 'y' or 'xy' zooming\n    var zoomMode;\n    // zoombox d3 selection\n    var zb;\n    // zoombox corner d3 selection\n    var corners;\n    // zoom takes over minDrag, so it also has to take over gd._dragged\n    var zoomDragged;\n\n    function zoomPrep(e, startX, startY) {\n        var dragBBox = dragger.getBoundingClientRect();\n        x0 = startX - dragBBox.left;\n        y0 = startY - dragBBox.top;\n        box = {l: x0, r: x0, w: 0, t: y0, b: y0, h: 0};\n        lum = gd._hmpixcount ?\n            (gd._hmlumcount / gd._hmpixcount) :\n            tinycolor(gd._fullLayout.plot_bgcolor).getLuminance();\n        path0 = 'M0,0H' + pw + 'V' + ph + 'H0V0';\n        dimmed = false;\n        zoomMode = 'xy';\n        zoomDragged = false;\n        zb = makeZoombox(zoomlayer, lum, xs, ys, path0);\n        corners = makeCorners(zoomlayer, xs, ys);\n    }\n\n    function zoomMove(dx0, dy0) {\n        if(gd._transitioningWithDuration) {\n            return false;\n        }\n\n        var x1 = Math.max(0, Math.min(pw, dx0 + x0));\n        var y1 = Math.max(0, Math.min(ph, dy0 + y0));\n        var dx = Math.abs(x1 - x0);\n        var dy = Math.abs(y1 - y0);\n\n        box.l = Math.min(x0, x1);\n        box.r = Math.max(x0, x1);\n        box.t = Math.min(y0, y1);\n        box.b = Math.max(y0, y1);\n\n        function noZoom() {\n            zoomMode = '';\n            box.r = box.l;\n            box.t = box.b;\n            corners.attr('d', 'M0,0Z');\n        }\n\n        if(links.isSubplotConstrained) {\n            if(dx > MINZOOM || dy > MINZOOM) {\n                zoomMode = 'xy';\n                if(dx / pw > dy / ph) {\n                    dy = dx * ph / pw;\n                    if(y0 > y1) box.t = y0 - dy;\n                    else box.b = y0 + dy;\n                } else {\n                    dx = dy * pw / ph;\n                    if(x0 > x1) box.l = x0 - dx;\n                    else box.r = x0 + dx;\n                }\n                corners.attr('d', xyCorners(box));\n            } else {\n                noZoom();\n            }\n        } else if(matches.isSubplotConstrained) {\n            if(dx > MINZOOM || dy > MINZOOM) {\n                zoomMode = 'xy';\n\n                var r0 = Math.min(box.l / pw, (ph - box.b) / ph);\n                var r1 = Math.max(box.r / pw, (ph - box.t) / ph);\n\n                box.l = r0 * pw;\n                box.r = r1 * pw;\n                box.b = (1 - r0) * ph;\n                box.t = (1 - r1) * ph;\n                corners.attr('d', xyCorners(box));\n            } else {\n                noZoom();\n            }\n        } else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) {\n            // look for small drags in one direction or the other,\n            // and only drag the other axis\n\n            if(dx < MINDRAG || !xActive) {\n                noZoom();\n            } else {\n                box.t = 0;\n                box.b = ph;\n                zoomMode = 'x';\n                corners.attr('d', xCorners(box, y0));\n            }\n        } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) {\n            box.l = 0;\n            box.r = pw;\n            zoomMode = 'y';\n            corners.attr('d', yCorners(box, x0));\n        } else {\n            zoomMode = 'xy';\n            corners.attr('d', xyCorners(box));\n        }\n        box.w = box.r - box.l;\n        box.h = box.b - box.t;\n\n        if(zoomMode) zoomDragged = true;\n        gd._dragged = zoomDragged;\n\n        updateZoombox(zb, corners, box, path0, dimmed, lum);\n        computeZoomUpdates();\n        gd.emit('plotly_relayouting', updates);\n        dimmed = true;\n    }\n\n    function computeZoomUpdates() {\n        updates = {};\n\n        // TODO: edit linked axes in zoomAxRanges and in dragTail\n        if(zoomMode === 'xy' || zoomMode === 'x') {\n            zoomAxRanges(xaxes, box.l / pw, box.r / pw, updates, links.xaxes);\n            updateMatchedAxRange('x', updates);\n        }\n        if(zoomMode === 'xy' || zoomMode === 'y') {\n            zoomAxRanges(yaxes, (ph - box.b) / ph, (ph - box.t) / ph, updates, links.yaxes);\n            updateMatchedAxRange('y', updates);\n        }\n    }\n\n    function zoomDone() {\n        // more strict than dragged, which allows you to come back to where you started\n        // and still count as dragged\n        if(Math.min(box.h, box.w) < MINDRAG * 2) {\n            return removeZoombox(gd);\n        }\n\n        computeZoomUpdates();\n\n        removeZoombox(gd);\n        dragTail();\n        showDoubleClickNotifier(gd);\n    }\n\n    // scroll zoom, on all draggers except corners\n    var scrollViewBox = [0, 0, pw, ph];\n    // wait a little after scrolling before redrawing\n    var redrawTimer = null;\n    var REDRAWDELAY = constants.REDRAWDELAY;\n    var mainplot = plotinfo.mainplot ? gd._fullLayout._plots[plotinfo.mainplot] : plotinfo;\n\n    function zoomWheel(e) {\n        // deactivate mousewheel scrolling on embedded graphs\n        // devs can override this with layout._enablescrollzoom,\n        // but _ ensures this setting won't leave their page\n        if(!gd._context._scrollZoom.cartesian && !gd._fullLayout._enablescrollzoom) {\n            return;\n        }\n\n        clearAndResetSelect();\n\n        // If a transition is in progress, then disable any behavior:\n        if(gd._transitioningWithDuration) {\n            e.preventDefault();\n            e.stopPropagation();\n            return;\n        }\n\n        recomputeAxisLists();\n\n        clearTimeout(redrawTimer);\n\n        var wheelDelta = -e.deltaY;\n        if(!isFinite(wheelDelta)) wheelDelta = e.wheelDelta / 10;\n        if(!isFinite(wheelDelta)) {\n            Lib.log('Did not find wheel motion attributes: ', e);\n            return;\n        }\n\n        var zoom = Math.exp(-Math.min(Math.max(wheelDelta, -20), 20) / 200);\n        var gbb = mainplot.draglayer.select('.nsewdrag').node().getBoundingClientRect();\n        var xfrac = (e.clientX - gbb.left) / gbb.width;\n        var yfrac = (gbb.bottom - e.clientY) / gbb.height;\n        var i;\n\n        function zoomWheelOneAxis(ax, centerFraction, zoom) {\n            if(ax.fixedrange) return;\n\n            var axRange = Lib.simpleMap(ax.range, ax.r2l);\n            var v0 = axRange[0] + (axRange[1] - axRange[0]) * centerFraction;\n            function doZoom(v) { return ax.l2r(v0 + (v - v0) * zoom); }\n            ax.range = axRange.map(doZoom);\n        }\n\n        if(editX) {\n            // if we're only zooming this axis because of constraints,\n            // zoom it about the center\n            if(!ew) xfrac = 0.5;\n\n            for(i = 0; i < xaxes.length; i++) {\n                zoomWheelOneAxis(xaxes[i], xfrac, zoom);\n            }\n            updateMatchedAxRange('x');\n\n            scrollViewBox[2] *= zoom;\n            scrollViewBox[0] += scrollViewBox[2] * xfrac * (1 / zoom - 1);\n        }\n        if(editY) {\n            if(!ns) yfrac = 0.5;\n\n            for(i = 0; i < yaxes.length; i++) {\n                zoomWheelOneAxis(yaxes[i], yfrac, zoom);\n            }\n            updateMatchedAxRange('y');\n\n            scrollViewBox[3] *= zoom;\n            scrollViewBox[1] += scrollViewBox[3] * (1 - yfrac) * (1 / zoom - 1);\n        }\n\n        // viewbox redraw at first\n        updateSubplots(scrollViewBox);\n        ticksAndAnnotations();\n\n        gd.emit('plotly_relayouting', updates);\n\n        // then replot after a delay to make sure\n        // no more scrolling is coming\n        redrawTimer = setTimeout(function() {\n            scrollViewBox = [0, 0, pw, ph];\n            dragTail();\n        }, REDRAWDELAY);\n\n        e.preventDefault();\n        return;\n    }\n\n    // everything but the corners gets wheel zoom\n    if(ns.length * ew.length !== 1) {\n        attachWheelEventHandler(dragger, zoomWheel);\n    }\n\n    // plotDrag: move the plot in response to a drag\n    function plotDrag(dx, dy) {\n        // If a transition is in progress, then disable any behavior:\n        if(gd._transitioningWithDuration) {\n            return;\n        }\n\n        // prevent axis drawing from monkeying with margins until we're done\n        gd._fullLayout._replotting = true;\n\n        if(xActive === 'ew' || yActive === 'ns') {\n            if(xActive) {\n                dragAxList(xaxes, dx);\n                updateMatchedAxRange('x');\n            }\n            if(yActive) {\n                dragAxList(yaxes, dy);\n                updateMatchedAxRange('y');\n            }\n            updateSubplots([xActive ? -dx : 0, yActive ? -dy : 0, pw, ph]);\n            ticksAndAnnotations();\n            gd.emit('plotly_relayouting', updates);\n            return;\n        }\n\n        // dz: set a new value for one end (0 or 1) of an axis array axArray,\n        // and return a pixel shift for that end for the viewbox\n        // based on pixel drag distance d\n        // TODO: this makes (generally non-fatal) errors when you get\n        // near floating point limits\n        function dz(axArray, end, d) {\n            var otherEnd = 1 - end;\n            var movedAx;\n            var newLinearizedEnd;\n            for(var i = 0; i < axArray.length; i++) {\n                var axi = axArray[i];\n                if(axi.fixedrange) continue;\n                movedAx = axi;\n                newLinearizedEnd = axi._rl[otherEnd] +\n                    (axi._rl[end] - axi._rl[otherEnd]) / dZoom(d / axi._length);\n                var newEnd = axi.l2r(newLinearizedEnd);\n\n                // if l2r comes back false or undefined, it means we've dragged off\n                // the end of valid ranges - so stop.\n                if(newEnd !== false && newEnd !== undefined) axi.range[end] = newEnd;\n            }\n            return movedAx._length * (movedAx._rl[end] - newLinearizedEnd) /\n                (movedAx._rl[end] - movedAx._rl[otherEnd]);\n        }\n\n        if(links.isSubplotConstrained && xActive && yActive) {\n            // dragging a corner of a constrained subplot:\n            // respect the fixed corner, but harmonize dx and dy\n            var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1;\n            var dxyFraction = (dx / pw + dxySign * dy / ph) / 2;\n            dx = dxyFraction * pw;\n            dy = dxySign * dxyFraction * ph;\n        }\n\n        if(xActive === 'w') dx = dz(xaxes, 0, dx);\n        else if(xActive === 'e') dx = dz(xaxes, 1, -dx);\n        else if(!xActive) dx = 0;\n\n        if(yActive === 'n') dy = dz(yaxes, 1, dy);\n        else if(yActive === 's') dy = dz(yaxes, 0, -dy);\n        else if(!yActive) dy = 0;\n\n        var xStart = (xActive === 'w') ? dx : 0;\n        var yStart = (yActive === 'n') ? dy : 0;\n\n        if(links.isSubplotConstrained) {\n            var i;\n            if(!xActive && yActive.length === 1) {\n                // dragging one end of the y axis of a constrained subplot\n                // scale the other axis the same about its middle\n                for(i = 0; i < xaxes.length; i++) {\n                    xaxes[i].range = xaxes[i]._r.slice();\n                    scaleZoom(xaxes[i], 1 - dy / ph);\n                }\n                dx = dy * pw / ph;\n                xStart = dx / 2;\n            }\n            if(!yActive && xActive.length === 1) {\n                for(i = 0; i < yaxes.length; i++) {\n                    yaxes[i].range = yaxes[i]._r.slice();\n                    scaleZoom(yaxes[i], 1 - dx / pw);\n                }\n                dy = dx * ph / pw;\n                yStart = dy / 2;\n            }\n        }\n\n        updateMatchedAxRange('x');\n        updateMatchedAxRange('y');\n        updateSubplots([xStart, yStart, pw - dx, ph - dy]);\n        ticksAndAnnotations();\n        gd.emit('plotly_relayouting', updates);\n    }\n\n    function updateMatchedAxRange(axLetter, out) {\n        var matchedAxes = matches.isSubplotConstrained ?\n            {x: yaxes, y: xaxes}[axLetter] :\n            matches[axLetter + 'axes'];\n\n        var constrainedAxes = matches.isSubplotConstrained ?\n            {x: xaxes, y: yaxes}[axLetter] :\n            [];\n\n        for(var i = 0; i < matchedAxes.length; i++) {\n            var ax = matchedAxes[i];\n            var axId = ax._id;\n            var axId2 = matches.xLinks[axId] || matches.yLinks[axId];\n            var ax2 = constrainedAxes[0] || xaHash[axId2] || yaHash[axId2];\n\n            if(ax2) {\n                if(out) {\n                    // zoombox case - don't mutate 'range', just add keys in 'updates'\n                    out[ax._name + '.range[0]'] = out[ax2._name + '.range[0]'];\n                    out[ax._name + '.range[1]'] = out[ax2._name + '.range[1]'];\n                } else {\n                    ax.range = ax2.range.slice();\n                }\n            }\n        }\n    }\n\n    // Draw ticks and annotations (and other components) when ranges change.\n    // Also records the ranges that have changed for use by update at the end.\n    function ticksAndAnnotations() {\n        var activeAxIds = [];\n        var i;\n\n        function pushActiveAxIds(axList) {\n            for(i = 0; i < axList.length; i++) {\n                if(!axList[i].fixedrange) activeAxIds.push(axList[i]._id);\n            }\n        }\n\n        if(editX) {\n            pushActiveAxIds(xaxes);\n            pushActiveAxIds(links.xaxes);\n            pushActiveAxIds(matches.xaxes);\n        }\n        if(editY) {\n            pushActiveAxIds(yaxes);\n            pushActiveAxIds(links.yaxes);\n            pushActiveAxIds(matches.yaxes);\n        }\n\n        updates = {};\n        for(i = 0; i < activeAxIds.length; i++) {\n            var axId = activeAxIds[i];\n            var ax = getFromId(gd, axId);\n            Axes.drawOne(gd, ax, {skipTitle: true});\n            updates[ax._name + '.range[0]'] = ax.range[0];\n            updates[ax._name + '.range[1]'] = ax.range[1];\n        }\n\n        Axes.redrawComponents(gd, activeAxIds);\n    }\n\n    function doubleClick() {\n        if(gd._transitioningWithDuration) return;\n\n        var doubleClickConfig = gd._context.doubleClick;\n\n        var axList = [];\n        if(xActive) axList = axList.concat(xaxes);\n        if(yActive) axList = axList.concat(yaxes);\n        if(matches.xaxes) axList = axList.concat(matches.xaxes);\n        if(matches.yaxes) axList = axList.concat(matches.yaxes);\n\n        var attrs = {};\n        var ax, i, rangeInitial;\n\n        // For reset+autosize mode:\n        // If *any* of the main axes is not at its initial range\n        // (or autoranged, if we have no initial range, to match the logic in\n        // doubleClickConfig === 'reset' below), we reset.\n        // If they are *all* at their initial ranges, then we autosize.\n        if(doubleClickConfig === 'reset+autosize') {\n            doubleClickConfig = 'autosize';\n\n            for(i = 0; i < axList.length; i++) {\n                ax = axList[i];\n                if((ax._rangeInitial && (\n                        ax.range[0] !== ax._rangeInitial[0] ||\n                        ax.range[1] !== ax._rangeInitial[1]\n                    )) ||\n                    (!ax._rangeInitial && !ax.autorange)\n                ) {\n                    doubleClickConfig = 'reset';\n                    break;\n                }\n            }\n        }\n\n        if(doubleClickConfig === 'autosize') {\n            // don't set the linked axes here, so relayout marks them as shrinkable\n            // and we autosize just to the requested axis/axes\n            for(i = 0; i < axList.length; i++) {\n                ax = axList[i];\n                if(!ax.fixedrange) attrs[ax._name + '.autorange'] = true;\n            }\n        } else if(doubleClickConfig === 'reset') {\n            // when we're resetting, reset all linked axes too, so we get back\n            // to the fully-auto-with-constraints situation\n            if(xActive || links.isSubplotConstrained) axList = axList.concat(links.xaxes);\n            if(yActive && !links.isSubplotConstrained) axList = axList.concat(links.yaxes);\n\n            if(links.isSubplotConstrained) {\n                if(!xActive) axList = axList.concat(xaxes);\n                else if(!yActive) axList = axList.concat(yaxes);\n            }\n\n            for(i = 0; i < axList.length; i++) {\n                ax = axList[i];\n\n                if(!ax.fixedrange) {\n                    if(!ax._rangeInitial) {\n                        attrs[ax._name + '.autorange'] = true;\n                    } else {\n                        rangeInitial = ax._rangeInitial;\n                        attrs[ax._name + '.range[0]'] = rangeInitial[0];\n                        attrs[ax._name + '.range[1]'] = rangeInitial[1];\n                    }\n                }\n            }\n        }\n\n        gd.emit('plotly_doubleclick', null);\n        Registry.call('_guiRelayout', gd, attrs);\n    }\n\n    // dragTail - finish a drag event with a redraw\n    function dragTail() {\n        // put the subplot viewboxes back to default (Because we're going to)\n        // be repositioning the data in the relayout. But DON'T call\n        // ticksAndAnnotations again - it's unnecessary and would overwrite `updates`\n        updateSubplots([0, 0, pw, ph]);\n\n        // since we may have been redrawing some things during the drag, we may have\n        // accumulated MathJax promises - wait for them before we relayout.\n        Lib.syncOrAsync([\n            Plots.previousPromises,\n            function() {\n                gd._fullLayout._replotting = false;\n                Registry.call('_guiRelayout', gd, updates);\n            }\n        ], gd);\n    }\n\n    // updateSubplots - find all plot viewboxes that should be\n    // affected by this drag, and update them. look for all plots\n    // sharing an affected axis (including the one being dragged),\n    // includes also scattergl and splom logic.\n    function updateSubplots(viewBox) {\n        var fullLayout = gd._fullLayout;\n        var plotinfos = fullLayout._plots;\n        var subplots = fullLayout._subplots.cartesian;\n        var i, sp, xa, ya;\n\n        if(hasSplom) {\n            Registry.subplotsRegistry.splom.drag(gd);\n        }\n\n        if(hasScatterGl) {\n            for(i = 0; i < subplots.length; i++) {\n                sp = plotinfos[subplots[i]];\n                xa = sp.xaxis;\n                ya = sp.yaxis;\n\n                if(sp._scene) {\n                    var xrng = Lib.simpleMap(xa.range, xa.r2l);\n                    var yrng = Lib.simpleMap(ya.range, ya.r2l);\n                    sp._scene.update({range: [xrng[0], yrng[0], xrng[1], yrng[1]]});\n                }\n            }\n        }\n\n        if(hasSplom || hasScatterGl) {\n            clearGlCanvases(gd);\n            redrawReglTraces(gd);\n        }\n\n        if(hasSVG) {\n            var xScaleFactor = viewBox[2] / xa0._length;\n            var yScaleFactor = viewBox[3] / ya0._length;\n\n            for(i = 0; i < subplots.length; i++) {\n                sp = plotinfos[subplots[i]];\n                xa = sp.xaxis;\n                ya = sp.yaxis;\n\n                var editX2 = editX && !xa.fixedrange && xaHash[xa._id];\n                var editY2 = editY && !ya.fixedrange && yaHash[ya._id];\n\n                var xScaleFactor2, yScaleFactor2;\n                var clipDx, clipDy;\n\n                if(editX2) {\n                    xScaleFactor2 = xScaleFactor;\n                    clipDx = ew ? viewBox[0] : getShift(xa, xScaleFactor2);\n                } else if(matches.xaHash[xa._id]) {\n                    xScaleFactor2 = xScaleFactor;\n                    clipDx = viewBox[0] * xa._length / xa0._length;\n                } else if(matches.yaHash[xa._id]) {\n                    xScaleFactor2 = yScaleFactor;\n                    clipDx = yActive === 'ns' ?\n                        -viewBox[1] * xa._length / ya0._length :\n                        getShift(xa, xScaleFactor2, {n: 'top', s: 'bottom'}[yActive]);\n                } else {\n                    xScaleFactor2 = getLinkedScaleFactor(xa, xScaleFactor, yScaleFactor);\n                    clipDx = scaleAndGetShift(xa, xScaleFactor2);\n                }\n\n                if(editY2) {\n                    yScaleFactor2 = yScaleFactor;\n                    clipDy = ns ? viewBox[1] : getShift(ya, yScaleFactor2);\n                } else if(matches.yaHash[ya._id]) {\n                    yScaleFactor2 = yScaleFactor;\n                    clipDy = viewBox[1] * ya._length / ya0._length;\n                } else if(matches.xaHash[ya._id]) {\n                    yScaleFactor2 = xScaleFactor;\n                    clipDy = xActive === 'ew' ?\n                        -viewBox[0] * ya._length / xa0._length :\n                        getShift(ya, yScaleFactor2, {e: 'right', w: 'left'}[xActive]);\n                } else {\n                    yScaleFactor2 = getLinkedScaleFactor(ya, xScaleFactor, yScaleFactor);\n                    clipDy = scaleAndGetShift(ya, yScaleFactor2);\n                }\n\n                // don't scale at all if neither axis is scalable here\n                if(!xScaleFactor2 && !yScaleFactor2) {\n                    continue;\n                }\n\n                // but if only one is, reset the other axis scaling\n                if(!xScaleFactor2) xScaleFactor2 = 1;\n                if(!yScaleFactor2) yScaleFactor2 = 1;\n\n                var plotDx = xa._offset - clipDx / xScaleFactor2;\n                var plotDy = ya._offset - clipDy / yScaleFactor2;\n\n                // TODO could be more efficient here:\n                // setTranslate and setScale do a lot of extra work\n                // when working independently, should perhaps combine\n                // them into a single routine.\n                sp.clipRect\n                    .call(Drawing.setTranslate, clipDx, clipDy)\n                    .call(Drawing.setScale, xScaleFactor2, yScaleFactor2);\n\n                sp.plot\n                    .call(Drawing.setTranslate, plotDx, plotDy)\n                    .call(Drawing.setScale, 1 / xScaleFactor2, 1 / yScaleFactor2);\n\n                // apply an inverse scale to individual points to counteract\n                // the scale of the trace group.\n                // apply only when scale changes, as adjusting the scale of\n                // all the points can be expansive.\n                if(xScaleFactor2 !== sp.xScaleFactor || yScaleFactor2 !== sp.yScaleFactor) {\n                    Drawing.setPointGroupScale(sp.zoomScalePts, xScaleFactor2, yScaleFactor2);\n                    Drawing.setTextPointsScale(sp.zoomScaleTxt, xScaleFactor2, yScaleFactor2);\n                }\n\n                Drawing.hideOutsideRangePoints(sp.clipOnAxisFalseTraces, sp);\n\n                // update x/y scaleFactor stash\n                sp.xScaleFactor = xScaleFactor2;\n                sp.yScaleFactor = yScaleFactor2;\n            }\n        }\n    }\n\n    // Find the appropriate scaling for this axis, if it's linked to the\n    // dragged axes by constraints. 0 is special, it means this axis shouldn't\n    // ever be scaled (will be converted to 1 if the other axis is scaled)\n    function getLinkedScaleFactor(ax, xScaleFactor, yScaleFactor) {\n        if(ax.fixedrange) return 0;\n\n        if(editX && links.xaHash[ax._id]) {\n            return xScaleFactor;\n        }\n        if(editY && (links.isSubplotConstrained ? links.xaHash : links.yaHash)[ax._id]) {\n            return yScaleFactor;\n        }\n        return 0;\n    }\n\n    function scaleAndGetShift(ax, scaleFactor) {\n        if(scaleFactor) {\n            ax.range = ax._r.slice();\n            scaleZoom(ax, scaleFactor);\n            return getShift(ax, scaleFactor);\n        }\n        return 0;\n    }\n\n    function getShift(ax, scaleFactor, from) {\n        return ax._length * (1 - scaleFactor) * FROM_TL[from || ax.constraintoward || 'middle'];\n    }\n\n    return dragger;\n}\n\nfunction makeDragger(plotinfo, nodeName, dragClass, cursor) {\n    var dragger3 = Lib.ensureSingle(plotinfo.draglayer, nodeName, dragClass, function(s) {\n        s.classed('drag', true)\n            .style({fill: 'transparent', 'stroke-width': 0})\n            .attr('data-subplot', plotinfo.id);\n    });\n\n    dragger3.call(setCursor, cursor);\n\n    return dragger3.node();\n}\n\nfunction makeRectDragger(plotinfo, dragClass, cursor, x, y, w, h) {\n    var dragger = makeDragger(plotinfo, 'rect', dragClass, cursor);\n    d3.select(dragger).call(Drawing.setRect, x, y, w, h);\n    return dragger;\n}\n\nfunction isDirectionActive(axList, activeVal) {\n    for(var i = 0; i < axList.length; i++) {\n        if(!axList[i].fixedrange) return activeVal;\n    }\n    return '';\n}\n\nfunction getEndText(ax, end) {\n    var initialVal = ax.range[end];\n    var diff = Math.abs(initialVal - ax.range[1 - end]);\n    var dig;\n\n    // TODO: this should basically be ax.r2d but we're doing extra\n    // rounding here... can we clean up at all?\n    if(ax.type === 'date') {\n        return initialVal;\n    } else if(ax.type === 'log') {\n        dig = Math.ceil(Math.max(0, -Math.log(diff) / Math.LN10)) + 3;\n        return d3.format('.' + dig + 'g')(Math.pow(10, initialVal));\n    } else { // linear numeric (or category... but just show numbers here)\n        dig = Math.floor(Math.log(Math.abs(initialVal)) / Math.LN10) -\n            Math.floor(Math.log(diff) / Math.LN10) + 4;\n        return d3.format('.' + String(dig) + 'g')(initialVal);\n    }\n}\n\nfunction zoomAxRanges(axList, r0Fraction, r1Fraction, updates, linkedAxes) {\n    for(var i = 0; i < axList.length; i++) {\n        var axi = axList[i];\n        if(axi.fixedrange) continue;\n\n        var axRangeLinear0 = axi._rl[0];\n        var axRangeLinearSpan = axi._rl[1] - axRangeLinear0;\n        updates[axi._name + '.range[0]'] = axi.l2r(axRangeLinear0 + axRangeLinearSpan * r0Fraction);\n        updates[axi._name + '.range[1]'] = axi.l2r(axRangeLinear0 + axRangeLinearSpan * r1Fraction);\n    }\n\n    // zoom linked axes about their centers\n    if(linkedAxes && linkedAxes.length) {\n        var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2;\n        zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction, updates, []);\n    }\n}\n\nfunction dragAxList(axList, pix) {\n    for(var i = 0; i < axList.length; i++) {\n        var axi = axList[i];\n        if(!axi.fixedrange) {\n            axi.range = [\n                axi.l2r(axi._rl[0] - pix / axi._m),\n                axi.l2r(axi._rl[1] - pix / axi._m)\n            ];\n        }\n    }\n}\n\n// common transform for dragging one end of an axis\n// d>0 is compressing scale (cursor is over the plot,\n//  the axis end should move with the cursor)\n// d<0 is expanding (cursor is off the plot, axis end moves\n//  nonlinearly so you can expand far)\nfunction dZoom(d) {\n    return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n        1 / (1 / Math.max(d, -0.3) + 3.222));\n}\n\nfunction getDragCursor(nsew, dragmode, isMainDrag) {\n    if(!nsew) return 'pointer';\n    if(nsew === 'nsew') {\n        // in this case here, clear cursor and\n        // use the cursor style set on <g .draglayer>\n        if(isMainDrag) return '';\n        if(dragmode === 'pan') return 'move';\n        return 'crosshair';\n    }\n    return nsew.toLowerCase() + '-resize';\n}\n\nfunction makeZoombox(zoomlayer, lum, xs, ys, path0) {\n    return zoomlayer.append('path')\n        .attr('class', 'zoombox')\n        .style({\n            'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)',\n            'stroke-width': 0\n        })\n        .attr('transform', 'translate(' + xs + ', ' + ys + ')')\n        .attr('d', path0 + 'Z');\n}\n\nfunction makeCorners(zoomlayer, xs, ys) {\n    return zoomlayer.append('path')\n        .attr('class', 'zoombox-corners')\n        .style({\n            fill: Color.background,\n            stroke: Color.defaultLine,\n            'stroke-width': 1,\n            opacity: 0\n        })\n        .attr('transform', 'translate(' + xs + ', ' + ys + ')')\n        .attr('d', 'M0,0Z');\n}\n\nfunction updateZoombox(zb, corners, box, path0, dimmed, lum) {\n    zb.attr('d',\n        path0 + 'M' + (box.l) + ',' + (box.t) + 'v' + (box.h) +\n        'h' + (box.w) + 'v-' + (box.h) + 'h-' + (box.w) + 'Z');\n    transitionZoombox(zb, corners, dimmed, lum);\n}\n\nfunction transitionZoombox(zb, corners, dimmed, lum) {\n    if(!dimmed) {\n        zb.transition()\n            .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' :\n                'rgba(255,255,255,0.3)')\n            .duration(200);\n        corners.transition()\n            .style('opacity', 1)\n            .duration(200);\n    }\n}\n\nfunction removeZoombox(gd) {\n    d3.select(gd)\n        .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners')\n        .remove();\n}\n\nfunction showDoubleClickNotifier(gd) {\n    if(SHOWZOOMOUTTIP && gd.data && gd._context.showTips) {\n        Lib.notifier(Lib._(gd, 'Double-click to zoom back out'), 'long');\n        SHOWZOOMOUTTIP = false;\n    }\n}\n\nfunction isSelectOrLasso(dragmode) {\n    return dragmode === 'lasso' || dragmode === 'select';\n}\n\nfunction xCorners(box, y0) {\n    return 'M' +\n        (box.l - 0.5) + ',' + (y0 - MINZOOM - 0.5) +\n        'h-3v' + (2 * MINZOOM + 1) + 'h3ZM' +\n        (box.r + 0.5) + ',' + (y0 - MINZOOM - 0.5) +\n        'h3v' + (2 * MINZOOM + 1) + 'h-3Z';\n}\n\nfunction yCorners(box, x0) {\n    return 'M' +\n        (x0 - MINZOOM - 0.5) + ',' + (box.t - 0.5) +\n        'v-3h' + (2 * MINZOOM + 1) + 'v3ZM' +\n        (x0 - MINZOOM - 0.5) + ',' + (box.b + 0.5) +\n        'v3h' + (2 * MINZOOM + 1) + 'v-3Z';\n}\n\nfunction xyCorners(box) {\n    var clen = Math.floor(Math.min(box.b - box.t, box.r - box.l, MINZOOM) / 2);\n    return 'M' +\n        (box.l - 3.5) + ',' + (box.t - 0.5 + clen) + 'h3v' + (-clen) +\n            'h' + clen + 'v-3h-' + (clen + 3) + 'ZM' +\n        (box.r + 3.5) + ',' + (box.t - 0.5 + clen) + 'h-3v' + (-clen) +\n            'h' + (-clen) + 'v-3h' + (clen + 3) + 'ZM' +\n        (box.r + 3.5) + ',' + (box.b + 0.5 - clen) + 'h-3v' + clen +\n            'h' + (-clen) + 'v3h' + (clen + 3) + 'ZM' +\n        (box.l - 3.5) + ',' + (box.b + 0.5 - clen) + 'h3v' + clen +\n            'h' + clen + 'v3h-' + (clen + 3) + 'Z';\n}\n\nfunction calcLinks(gd, groups, xaHash, yaHash) {\n    var isSubplotConstrained = false;\n    var xLinks = {};\n    var yLinks = {};\n    var xID, yID, xLinkID, yLinkID;\n\n    for(var i = 0; i < groups.length; i++) {\n        var group = groups[i];\n        // check if any of the x axes we're dragging is in this constraint group\n        for(xID in xaHash) {\n            if(group[xID]) {\n                // put the rest of these axes into xLinks, if we're not already\n                // dragging them, so we know to scale these axes automatically too\n                // to match the changes in the dragged x axes\n                for(xLinkID in group) {\n                    if(!(xLinkID.charAt(0) === 'x' ? xaHash : yaHash)[xLinkID]) {\n                        xLinks[xLinkID] = xID;\n                    }\n                }\n\n                // check if the x and y axes of THIS drag are linked\n                for(yID in yaHash) {\n                    if(group[yID]) isSubplotConstrained = true;\n                }\n            }\n        }\n\n        // now check if any of the y axes we're dragging is in this constraint group\n        // only look for outside links, as we've already checked for links within the dragger\n        for(yID in yaHash) {\n            if(group[yID]) {\n                for(yLinkID in group) {\n                    if(!(yLinkID.charAt(0) === 'x' ? xaHash : yaHash)[yLinkID]) {\n                        yLinks[yLinkID] = yID;\n                    }\n                }\n            }\n        }\n    }\n\n    if(isSubplotConstrained) {\n        // merge xLinks and yLinks if the subplot is constrained,\n        // since we'll always apply both anyway and the two will contain\n        // duplicates\n        Lib.extendFlat(xLinks, yLinks);\n        yLinks = {};\n    }\n\n    var xaHashLinked = {};\n    var xaxesLinked = [];\n    for(xLinkID in xLinks) {\n        var xa = getFromId(gd, xLinkID);\n        xaxesLinked.push(xa);\n        xaHashLinked[xa._id] = xa;\n    }\n\n    var yaHashLinked = {};\n    var yaxesLinked = [];\n    for(yLinkID in yLinks) {\n        var ya = getFromId(gd, yLinkID);\n        yaxesLinked.push(ya);\n        yaHashLinked[ya._id] = ya;\n    }\n\n    return {\n        xaHash: xaHashLinked,\n        yaHash: yaHashLinked,\n        xaxes: xaxesLinked,\n        yaxes: yaxesLinked,\n        xLinks: xLinks,\n        yLinks: yLinks,\n        isSubplotConstrained: isSubplotConstrained\n    };\n}\n\n// still seems to be some confusion about onwheel vs onmousewheel...\nfunction attachWheelEventHandler(element, handler) {\n    if(!supportsPassive) {\n        if(element.onwheel !== undefined) element.onwheel = handler;\n        else if(element.onmousewheel !== undefined) element.onmousewheel = handler;\n    } else {\n        var wheelEventName = element.onwheel !== undefined ? 'wheel' : 'mousewheel';\n\n        if(element._onwheel) {\n            element.removeEventListener(wheelEventName, element._onwheel);\n        }\n        element._onwheel = handler;\n\n        element.addEventListener(wheelEventName, handler, {passive: false});\n    }\n}\n\nfunction hashValues(hash) {\n    var out = [];\n    for(var k in hash) out.push(hash[k]);\n    return out;\n}\n\nmodule.exports = {\n    makeDragBox: makeDragBox,\n\n    makeDragger: makeDragger,\n    makeRectDragger: makeRectDragger,\n    makeZoombox: makeZoombox,\n    makeCorners: makeCorners,\n\n    updateZoombox: updateZoombox,\n    xyCorners: xyCorners,\n    transitionZoombox: transitionZoombox,\n    removeZoombox: removeZoombox,\n    showDoubleClickNotifier: showDoubleClickNotifier,\n\n    attachWheelEventHandler: attachWheelEventHandler\n};\n\n},{\"../../components/color\":580,\"../../components/dragelement\":598,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/clear_gl_canvases\":688,\"../../lib/setcursor\":723,\"../../lib/svg_text_utils\":727,\"../../plot_api/subroutines\":742,\"../../registry\":831,\"../plots\":812,\"./axes\":751,\"./axis_ids\":754,\"./constants\":757,\"./scale_zoom\":767,\"./select\":768,\"d3\":157,\"has-passive-events\":406,\"tinycolor2\":524}],760:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Fx = _dereq_('../../components/fx');\nvar dragElement = _dereq_('../../components/dragelement');\nvar setCursor = _dereq_('../../lib/setcursor');\n\nvar makeDragBox = _dereq_('./dragbox').makeDragBox;\nvar DRAGGERSIZE = _dereq_('./constants').DRAGGERSIZE;\n\nexports.initInteractions = function initInteractions(gd) {\n    var fullLayout = gd._fullLayout;\n\n    if(gd._context.staticPlot) {\n        // this sweeps up more than just cartesian drag elements...\n        d3.select(gd).selectAll('.drag').remove();\n        return;\n    }\n\n    if(!fullLayout._has('cartesian') && !fullLayout._has('splom')) return;\n\n    var subplots = Object.keys(fullLayout._plots || {}).sort(function(a, b) {\n        // sort overlays last, then by x axis number, then y axis number\n        if((fullLayout._plots[a].mainplot && true) ===\n            (fullLayout._plots[b].mainplot && true)) {\n            var aParts = a.split('y');\n            var bParts = b.split('y');\n            return (aParts[0] === bParts[0]) ?\n                (Number(aParts[1] || 1) - Number(bParts[1] || 1)) :\n                (Number(aParts[0] || 1) - Number(bParts[0] || 1));\n        }\n        return fullLayout._plots[a].mainplot ? 1 : -1;\n    });\n\n    subplots.forEach(function(subplot) {\n        var plotinfo = fullLayout._plots[subplot];\n        var xa = plotinfo.xaxis;\n        var ya = plotinfo.yaxis;\n\n        // main and corner draggers need not be repeated for\n        // overlaid subplots - these draggers drag them all\n        if(!plotinfo.mainplot) {\n            // main dragger goes over the grids and data, so we use its\n            // mousemove events for all data hover effects\n            var maindrag = makeDragBox(gd, plotinfo, xa._offset, ya._offset,\n                xa._length, ya._length, 'ns', 'ew');\n\n            maindrag.onmousemove = function(evt) {\n                // This is on `gd._fullLayout`, *not* fullLayout because the reference\n                // changes by the time this is called again.\n                gd._fullLayout._rehover = function() {\n                    if(gd._fullLayout._hoversubplot === subplot) {\n                        Fx.hover(gd, evt, subplot);\n                    }\n                };\n\n                Fx.hover(gd, evt, subplot);\n\n                // Note that we have *not* used the cached fullLayout variable here\n                // since that may be outdated when this is called as a callback later on\n                gd._fullLayout._lasthover = maindrag;\n                gd._fullLayout._hoversubplot = subplot;\n            };\n\n            /*\n             * IMPORTANT:\n             * We must check for the presence of the drag cover here.\n             * If we don't, a 'mouseout' event is triggered on the\n             * maindrag before each 'click' event, which has the effect\n             * of clearing the hoverdata; thus, cancelling the click event.\n             */\n            maindrag.onmouseout = function(evt) {\n                if(gd._dragging) return;\n\n                // When the mouse leaves this maindrag, unset the hovered subplot.\n                // This may cause problems if it leaves the subplot directly *onto*\n                // another subplot, but that's a tiny corner case at the moment.\n                gd._fullLayout._hoversubplot = null;\n\n                dragElement.unhover(gd, evt);\n            };\n\n            // corner draggers\n            if(gd._context.showAxisDragHandles) {\n                makeDragBox(gd, plotinfo, xa._offset - DRAGGERSIZE, ya._offset - DRAGGERSIZE,\n                    DRAGGERSIZE, DRAGGERSIZE, 'n', 'w');\n                makeDragBox(gd, plotinfo, xa._offset + xa._length, ya._offset - DRAGGERSIZE,\n                    DRAGGERSIZE, DRAGGERSIZE, 'n', 'e');\n                makeDragBox(gd, plotinfo, xa._offset - DRAGGERSIZE, ya._offset + ya._length,\n                    DRAGGERSIZE, DRAGGERSIZE, 's', 'w');\n                makeDragBox(gd, plotinfo, xa._offset + xa._length, ya._offset + ya._length,\n                    DRAGGERSIZE, DRAGGERSIZE, 's', 'e');\n            }\n        }\n        if(gd._context.showAxisDragHandles) {\n            // x axis draggers - if you have overlaid plots,\n            // these drag each axis separately\n            if(subplot === xa._mainSubplot) {\n                // the y position of the main x axis line\n                var y0 = xa._mainLinePosition;\n                if(xa.side === 'top') y0 -= DRAGGERSIZE;\n                makeDragBox(gd, plotinfo, xa._offset + xa._length * 0.1, y0,\n                    xa._length * 0.8, DRAGGERSIZE, '', 'ew');\n                makeDragBox(gd, plotinfo, xa._offset, y0,\n                    xa._length * 0.1, DRAGGERSIZE, '', 'w');\n                makeDragBox(gd, plotinfo, xa._offset + xa._length * 0.9, y0,\n                    xa._length * 0.1, DRAGGERSIZE, '', 'e');\n            }\n            // y axis draggers\n            if(subplot === ya._mainSubplot) {\n                // the x position of the main y axis line\n                var x0 = ya._mainLinePosition;\n                if(ya.side !== 'right') x0 -= DRAGGERSIZE;\n                makeDragBox(gd, plotinfo, x0, ya._offset + ya._length * 0.1,\n                    DRAGGERSIZE, ya._length * 0.8, 'ns', '');\n                makeDragBox(gd, plotinfo, x0, ya._offset + ya._length * 0.9,\n                    DRAGGERSIZE, ya._length * 0.1, 's', '');\n                makeDragBox(gd, plotinfo, x0, ya._offset,\n                    DRAGGERSIZE, ya._length * 0.1, 'n', '');\n            }\n        }\n    });\n\n    // In case you mousemove over some hovertext, send it to Fx.hover too\n    // we do this so that we can put the hover text in front of everything,\n    // but still be able to interact with everything as if it isn't there\n    var hoverLayer = fullLayout._hoverlayer.node();\n\n    hoverLayer.onmousemove = function(evt) {\n        evt.target = gd._fullLayout._lasthover;\n        Fx.hover(gd, evt, fullLayout._hoversubplot);\n    };\n\n    hoverLayer.onclick = function(evt) {\n        evt.target = gd._fullLayout._lasthover;\n        Fx.click(gd, evt);\n    };\n\n    // also delegate mousedowns... TODO: does this actually work?\n    hoverLayer.onmousedown = function(evt) {\n        gd._fullLayout._lasthover.onmousedown(evt);\n    };\n\n    exports.updateFx(gd);\n};\n\n// Minimal set of update needed on 'modebar' edits.\n// We only need to update the <g .draglayer> cursor style.\n//\n// Note that changing the axis configuration and/or the fixedrange attribute\n// should trigger a full initInteractions.\nexports.updateFx = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var cursor = fullLayout.dragmode === 'pan' ? 'move' : 'crosshair';\n    setCursor(fullLayout._draggers, cursor);\n};\n\n},{\"../../components/dragelement\":598,\"../../components/fx\":619,\"../../lib/setcursor\":723,\"./constants\":757,\"./dragbox\":759,\"d3\":157}],761:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\n/**\n * Factory function for checking component arrays for subplot references.\n *\n * @param {string} containerArrayName: the top-level array in gd.layout to check\n *   If an item in this container is found that references a cartesian x and/or y axis,\n *   ensure cartesian is marked as a base plot module and record the axes (and subplot\n *   if both refs are axes) in gd._fullLayout\n *\n * @return {function}: with args layoutIn (gd.layout) and layoutOut (gd._fullLayout)\n * as expected of a component includeBasePlot method\n */\nmodule.exports = function makeIncludeComponents(containerArrayName) {\n    return function includeComponents(layoutIn, layoutOut) {\n        var array = layoutIn[containerArrayName];\n        if(!Array.isArray(array)) return;\n\n        var Cartesian = Registry.subplotsRegistry.cartesian;\n        var idRegex = Cartesian.idRegex;\n        var subplots = layoutOut._subplots;\n        var xaList = subplots.xaxis;\n        var yaList = subplots.yaxis;\n        var cartesianList = subplots.cartesian;\n        var hasCartesianOrGL2D = layoutOut._has('cartesian') || layoutOut._has('gl2d');\n\n        for(var i = 0; i < array.length; i++) {\n            var itemi = array[i];\n            if(!Lib.isPlainObject(itemi)) continue;\n\n            var xref = itemi.xref;\n            var yref = itemi.yref;\n\n            var hasXref = idRegex.x.test(xref);\n            var hasYref = idRegex.y.test(yref);\n            if(hasXref || hasYref) {\n                if(!hasCartesianOrGL2D) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);\n\n                var newAxis = false;\n                if(hasXref && xaList.indexOf(xref) === -1) {\n                    xaList.push(xref);\n                    newAxis = true;\n                }\n                if(hasYref && yaList.indexOf(yref) === -1) {\n                    yaList.push(yref);\n                    newAxis = true;\n                }\n\n                /*\n                 * Notice the logic here: only add a subplot for a component if\n                 * it's referencing both x and y axes AND it's creating a new axis\n                 * so for example if your plot already has xy and x2y2, an annotation\n                 * on x2y or xy2 will not create a new subplot.\n                 */\n                if(newAxis && hasXref && hasYref) {\n                    cartesianList.push(xref + yref);\n                }\n            }\n        }\n    };\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],762:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Plots = _dereq_('../plots');\nvar Drawing = _dereq_('../../components/drawing');\n\nvar getModuleCalcData = _dereq_('../get_data').getModuleCalcData;\nvar axisIds = _dereq_('./axis_ids');\nvar constants = _dereq_('./constants');\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nvar ensureSingle = Lib.ensureSingle;\n\nfunction ensureSingleAndAddDatum(parent, nodeType, className) {\n    return Lib.ensureSingle(parent, nodeType, className, function(s) {\n        s.datum(className);\n    });\n}\n\nexports.name = 'cartesian';\n\nexports.attr = ['xaxis', 'yaxis'];\n\nexports.idRoot = ['x', 'y'];\n\nexports.idRegex = constants.idRegex;\n\nexports.attrRegex = constants.attrRegex;\n\nexports.attributes = _dereq_('./attributes');\n\nexports.layoutAttributes = _dereq_('./layout_attributes');\n\nexports.supplyLayoutDefaults = _dereq_('./layout_defaults');\n\nexports.transitionAxes = _dereq_('./transition_axes');\n\nexports.finalizeSubplots = function(layoutIn, layoutOut) {\n    var subplots = layoutOut._subplots;\n    var xList = subplots.xaxis;\n    var yList = subplots.yaxis;\n    var spSVG = subplots.cartesian;\n    var spAll = spSVG.concat(subplots.gl2d || []);\n    var allX = {};\n    var allY = {};\n    var i, xi, yi;\n\n    for(i = 0; i < spAll.length; i++) {\n        var parts = spAll[i].split('y');\n        allX[parts[0]] = 1;\n        allY['y' + parts[1]] = 1;\n    }\n\n    // check for x axes with no subplot, and make one from the anchor of that x axis\n    for(i = 0; i < xList.length; i++) {\n        xi = xList[i];\n        if(!allX[xi]) {\n            yi = (layoutIn[axisIds.id2name(xi)] || {}).anchor;\n            if(!constants.idRegex.y.test(yi)) yi = 'y';\n            spSVG.push(xi + yi);\n            spAll.push(xi + yi);\n\n            if(!allY[yi]) {\n                allY[yi] = 1;\n                Lib.pushUnique(yList, yi);\n            }\n        }\n    }\n\n    // same for y axes with no subplot\n    for(i = 0; i < yList.length; i++) {\n        yi = yList[i];\n        if(!allY[yi]) {\n            xi = (layoutIn[axisIds.id2name(yi)] || {}).anchor;\n            if(!constants.idRegex.x.test(xi)) xi = 'x';\n            spSVG.push(xi + yi);\n            spAll.push(xi + yi);\n\n            if(!allX[xi]) {\n                allX[xi] = 1;\n                Lib.pushUnique(xList, xi);\n            }\n        }\n    }\n\n    // finally, if we've gotten here we're supposed to show cartesian...\n    // so if there are NO subplots at all, make one from the first\n    // x & y axes in the input layout\n    if(!spAll.length) {\n        xi = '';\n        yi = '';\n        for(var ki in layoutIn) {\n            if(constants.attrRegex.test(ki)) {\n                var axLetter = ki.charAt(0);\n                if(axLetter === 'x') {\n                    if(!xi || (+ki.substr(5) < +xi.substr(5))) {\n                        xi = ki;\n                    }\n                } else if(!yi || (+ki.substr(5) < +yi.substr(5))) {\n                    yi = ki;\n                }\n            }\n        }\n        xi = xi ? axisIds.name2id(xi) : 'x';\n        yi = yi ? axisIds.name2id(yi) : 'y';\n        xList.push(xi);\n        yList.push(yi);\n        spSVG.push(xi + yi);\n    }\n};\n\n/**\n * Cartesian.plot\n *\n * @param {DOM div | object} gd\n * @param {array (optional)} traces\n *  array of traces indices to plot\n *  if undefined, plots all cartesian traces,\n * @param {object} (optional) transitionOpts\n *  transition option object\n * @param {function} (optional) makeOnCompleteCallback\n *  transition make callback function from Plots.transition\n */\nexports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {\n    var fullLayout = gd._fullLayout;\n    var subplots = fullLayout._subplots.cartesian;\n    var calcdata = gd.calcdata;\n    var i;\n\n    if(!Array.isArray(traces)) {\n        // If traces is not provided, then it's a complete replot and missing\n        // traces are removed\n        traces = [];\n        for(i = 0; i < calcdata.length; i++) traces.push(i);\n    }\n\n    for(i = 0; i < subplots.length; i++) {\n        var subplot = subplots[i];\n        var subplotInfo = fullLayout._plots[subplot];\n\n        // Get all calcdata for this subplot:\n        var cdSubplot = [];\n        var pcd;\n\n        for(var j = 0; j < calcdata.length; j++) {\n            var cd = calcdata[j];\n            var trace = cd[0].trace;\n\n            // Skip trace if whitelist provided and it's not whitelisted:\n            // if (Array.isArray(traces) && traces.indexOf(i) === -1) continue;\n            if(trace.xaxis + trace.yaxis === subplot) {\n                // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet\n                // axis has actually changed:\n                //\n                // If this trace is specifically requested, add it to the list:\n                if(traces.indexOf(trace.index) !== -1 || trace.carpet) {\n                    // Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate\n                    // traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill\n                    // is outdated. So this retroactively adds the previous trace if the\n                    // traces are interdependent.\n                    if(\n                        pcd &&\n                        pcd[0].trace.xaxis + pcd[0].trace.yaxis === subplot &&\n                        ['tonextx', 'tonexty', 'tonext'].indexOf(trace.fill) !== -1 &&\n                        cdSubplot.indexOf(pcd) === -1\n                    ) {\n                        cdSubplot.push(pcd);\n                    }\n\n                    cdSubplot.push(cd);\n                }\n\n                // Track the previous trace on this subplot for the retroactive-add step\n                // above:\n                pcd = cd;\n            }\n        }\n\n        plotOne(gd, subplotInfo, cdSubplot, transitionOpts, makeOnCompleteCallback);\n    }\n};\n\nfunction plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback) {\n    var traceLayerClasses = constants.traceLayerClasses;\n    var fullLayout = gd._fullLayout;\n    var modules = fullLayout._modules;\n    var _module, cdModuleAndOthers, cdModule;\n\n    var layerData = [];\n    var zoomScaleQueryParts = [];\n\n    for(var i = 0; i < modules.length; i++) {\n        _module = modules[i];\n        var name = _module.name;\n        var categories = Registry.modules[name].categories;\n\n        if(categories.svg) {\n            var className = (_module.layerName || name + 'layer');\n            var plotMethod = _module.plot;\n\n            // plot all visible traces of this type on this subplot at once\n            cdModuleAndOthers = getModuleCalcData(cdSubplot, plotMethod);\n            cdModule = cdModuleAndOthers[0];\n            // don't need to search the found traces again - in fact we need to NOT\n            // so that if two modules share the same plotter we don't double-plot\n            cdSubplot = cdModuleAndOthers[1];\n\n            if(cdModule.length) {\n                layerData.push({\n                    i: traceLayerClasses.indexOf(className),\n                    className: className,\n                    plotMethod: plotMethod,\n                    cdModule: cdModule\n                });\n            }\n\n            if(categories.zoomScale) {\n                zoomScaleQueryParts.push('.' + className);\n            }\n        }\n    }\n\n    layerData.sort(function(a, b) { return a.i - b.i; });\n\n    var layers = plotinfo.plot.selectAll('g.mlayer')\n        .data(layerData, function(d) { return d.className; });\n\n    layers.enter().append('g')\n        .attr('class', function(d) { return d.className; })\n        .classed('mlayer', true);\n\n    layers.exit().remove();\n\n    layers.order();\n\n    layers.each(function(d) {\n        var sel = d3.select(this);\n        var className = d.className;\n\n        d.plotMethod(\n            gd, plotinfo, d.cdModule, sel,\n            transitionOpts, makeOnCompleteCallback\n        );\n\n        // layers that allow `cliponaxis: false`\n        if(constants.clipOnAxisFalseQuery.indexOf('.' + className) === -1) {\n            Drawing.setClipUrl(sel, plotinfo.layerClipId, gd);\n        }\n    });\n\n    // call Scattergl.plot separately\n    if(fullLayout._has('scattergl')) {\n        _module = Registry.getModule('scattergl');\n        cdModule = getModuleCalcData(cdSubplot, _module)[0];\n        _module.plot(gd, plotinfo, cdModule);\n    }\n\n    // stash \"hot\" selections for faster interaction on drag and scroll\n    if(!gd._context.staticPlot) {\n        if(plotinfo._hasClipOnAxisFalse) {\n            plotinfo.clipOnAxisFalseTraces = plotinfo.plot\n                .selectAll(constants.clipOnAxisFalseQuery.join(','))\n                .selectAll('.trace');\n        }\n\n        if(zoomScaleQueryParts.length) {\n            var traces = plotinfo.plot\n                .selectAll(zoomScaleQueryParts.join(','))\n                .selectAll('.trace');\n\n            plotinfo.zoomScalePts = traces.selectAll('path.point');\n            plotinfo.zoomScaleTxt = traces.selectAll('.textpoint');\n        }\n    }\n}\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldPlots = oldFullLayout._plots || {};\n    var newPlots = newFullLayout._plots || {};\n    var oldSubplotList = oldFullLayout._subplots || {};\n    var plotinfo;\n    var i, k;\n\n    // when going from a large splom graph to something else,\n    // we need to clear <g subplot> so that the new cartesian subplot\n    // can have the correct layer ordering\n    if(oldFullLayout._hasOnlyLargeSploms && !newFullLayout._hasOnlyLargeSploms) {\n        for(k in oldPlots) {\n            plotinfo = oldPlots[k];\n            if(plotinfo.plotgroup) plotinfo.plotgroup.remove();\n        }\n    }\n\n    var hadGl = (oldFullLayout._has && oldFullLayout._has('gl'));\n    var hasGl = (newFullLayout._has && newFullLayout._has('gl'));\n\n    if(hadGl && !hasGl) {\n        for(k in oldPlots) {\n            plotinfo = oldPlots[k];\n            if(plotinfo._scene) plotinfo._scene.destroy();\n        }\n    }\n\n    // delete any titles we don't need anymore\n    // check if axis list has changed, and if so clear old titles\n    if(oldSubplotList.xaxis && oldSubplotList.yaxis) {\n        var oldAxIDs = axisIds.listIds({_fullLayout: oldFullLayout});\n        for(i = 0; i < oldAxIDs.length; i++) {\n            var oldAxId = oldAxIDs[i];\n            if(!newFullLayout[axisIds.id2name(oldAxId)]) {\n                oldFullLayout._infolayer.selectAll('.g-' + oldAxId + 'title').remove();\n            }\n        }\n    }\n\n    var hadCartesian = (oldFullLayout._has && oldFullLayout._has('cartesian'));\n    var hasCartesian = (newFullLayout._has && newFullLayout._has('cartesian'));\n\n    if(hadCartesian && !hasCartesian) {\n        // if we've gotten rid of all cartesian traces, remove all the subplot svg items\n\n        purgeSubplotLayers(oldFullLayout._cartesianlayer.selectAll('.subplot'), oldFullLayout);\n        oldFullLayout._defs.selectAll('.axesclip').remove();\n        delete oldFullLayout._axisConstraintGroups;\n    } else if(oldSubplotList.cartesian) {\n        // otherwise look for subplots we need to remove\n\n        for(i = 0; i < oldSubplotList.cartesian.length; i++) {\n            var oldSubplotId = oldSubplotList.cartesian[i];\n            if(!newPlots[oldSubplotId]) {\n                var selector = '.' + oldSubplotId + ',.' + oldSubplotId + '-x,.' + oldSubplotId + '-y';\n                oldFullLayout._cartesianlayer.selectAll(selector).remove();\n                removeSubplotExtras(oldSubplotId, oldFullLayout);\n            }\n        }\n    }\n};\n\nexports.drawFramework = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotData = makeSubplotData(gd);\n\n    var subplotLayers = fullLayout._cartesianlayer.selectAll('.subplot')\n        .data(subplotData, String);\n\n    subplotLayers.enter().append('g')\n        .attr('class', function(d) { return 'subplot ' + d[0]; });\n\n    subplotLayers.order();\n\n    subplotLayers.exit()\n        .call(purgeSubplotLayers, fullLayout);\n\n    subplotLayers.each(function(d) {\n        var id = d[0];\n        var plotinfo = fullLayout._plots[id];\n\n        plotinfo.plotgroup = d3.select(this);\n        makeSubplotLayer(gd, plotinfo);\n\n        // make separate drag layers for each subplot,\n        // but append them to paper rather than the plot groups,\n        // so they end up on top of the rest\n        plotinfo.draglayer = ensureSingle(fullLayout._draggers, 'g', id);\n    });\n};\n\nexports.rangePlot = function(gd, plotinfo, cdSubplot) {\n    makeSubplotLayer(gd, plotinfo);\n    plotOne(gd, plotinfo, cdSubplot);\n    Plots.style(gd);\n};\n\nfunction makeSubplotData(gd) {\n    var fullLayout = gd._fullLayout;\n    var ids = fullLayout._subplots.cartesian;\n    var len = ids.length;\n    var i, j, id, plotinfo, xa, ya;\n\n    // split 'regular' and 'overlaying' subplots\n    var regulars = [];\n    var overlays = [];\n\n    for(i = 0; i < len; i++) {\n        id = ids[i];\n        plotinfo = fullLayout._plots[id];\n        xa = plotinfo.xaxis;\n        ya = plotinfo.yaxis;\n\n        var xa2 = xa._mainAxis;\n        var ya2 = ya._mainAxis;\n        var mainplot = xa2._id + ya2._id;\n        var mainplotinfo = fullLayout._plots[mainplot];\n        plotinfo.overlays = [];\n\n        if(mainplot !== id && mainplotinfo) {\n            plotinfo.mainplot = mainplot;\n            plotinfo.mainplotinfo = mainplotinfo;\n            overlays.push(id);\n        } else {\n            plotinfo.mainplot = undefined;\n            plotinfo.mainPlotinfo = undefined;\n            regulars.push(id);\n        }\n    }\n\n    // fill in list of overlaying subplots in 'main plot'\n    for(i = 0; i < overlays.length; i++) {\n        id = overlays[i];\n        plotinfo = fullLayout._plots[id];\n        plotinfo.mainplotinfo.overlays.push(plotinfo);\n    }\n\n    // put 'regular' subplot data before 'overlaying'\n    var subplotIds = regulars.concat(overlays);\n    var subplotData = new Array(len);\n\n    for(i = 0; i < len; i++) {\n        id = subplotIds[i];\n        plotinfo = fullLayout._plots[id];\n        xa = plotinfo.xaxis;\n        ya = plotinfo.yaxis;\n\n        // use info about axis layer and overlaying pattern\n        // to clean what need to be cleaned up in exit selection\n        var d = [id, xa.layer, ya.layer, xa.overlaying || '', ya.overlaying || ''];\n        for(j = 0; j < plotinfo.overlays.length; j++) {\n            d.push(plotinfo.overlays[j].id);\n        }\n        subplotData[i] = d;\n    }\n\n    return subplotData;\n}\n\nfunction makeSubplotLayer(gd, plotinfo) {\n    var plotgroup = plotinfo.plotgroup;\n    var id = plotinfo.id;\n    var xLayer = constants.layerValue2layerClass[plotinfo.xaxis.layer];\n    var yLayer = constants.layerValue2layerClass[plotinfo.yaxis.layer];\n    var hasOnlyLargeSploms = gd._fullLayout._hasOnlyLargeSploms;\n\n    if(!plotinfo.mainplot) {\n        if(hasOnlyLargeSploms) {\n            // TODO could do even better\n            // - we don't need plot (but we would have to mock it in lsInner\n            //   and other places\n            // - we don't (x|y)lines and (x|y)axislayer for most subplots\n            //   usually just the bottom x and left y axes.\n            plotinfo.xlines = ensureSingle(plotgroup, 'path', 'xlines-above');\n            plotinfo.ylines = ensureSingle(plotgroup, 'path', 'ylines-above');\n            plotinfo.xaxislayer = ensureSingle(plotgroup, 'g', 'xaxislayer-above');\n            plotinfo.yaxislayer = ensureSingle(plotgroup, 'g', 'yaxislayer-above');\n        } else {\n            var backLayer = ensureSingle(plotgroup, 'g', 'layer-subplot');\n            plotinfo.shapelayer = ensureSingle(backLayer, 'g', 'shapelayer');\n            plotinfo.imagelayer = ensureSingle(backLayer, 'g', 'imagelayer');\n\n            plotinfo.gridlayer = ensureSingle(plotgroup, 'g', 'gridlayer');\n            plotinfo.zerolinelayer = ensureSingle(plotgroup, 'g', 'zerolinelayer');\n\n            ensureSingle(plotgroup, 'path', 'xlines-below');\n            ensureSingle(plotgroup, 'path', 'ylines-below');\n            plotinfo.overlinesBelow = ensureSingle(plotgroup, 'g', 'overlines-below');\n\n            ensureSingle(plotgroup, 'g', 'xaxislayer-below');\n            ensureSingle(plotgroup, 'g', 'yaxislayer-below');\n            plotinfo.overaxesBelow = ensureSingle(plotgroup, 'g', 'overaxes-below');\n\n            plotinfo.plot = ensureSingle(plotgroup, 'g', 'plot');\n            plotinfo.overplot = ensureSingle(plotgroup, 'g', 'overplot');\n\n            plotinfo.xlines = ensureSingle(plotgroup, 'path', 'xlines-above');\n            plotinfo.ylines = ensureSingle(plotgroup, 'path', 'ylines-above');\n            plotinfo.overlinesAbove = ensureSingle(plotgroup, 'g', 'overlines-above');\n\n            ensureSingle(plotgroup, 'g', 'xaxislayer-above');\n            ensureSingle(plotgroup, 'g', 'yaxislayer-above');\n            plotinfo.overaxesAbove = ensureSingle(plotgroup, 'g', 'overaxes-above');\n\n            // set refs to correct layers as determined by 'axis.layer'\n            plotinfo.xlines = plotgroup.select('.xlines-' + xLayer);\n            plotinfo.ylines = plotgroup.select('.ylines-' + yLayer);\n            plotinfo.xaxislayer = plotgroup.select('.xaxislayer-' + xLayer);\n            plotinfo.yaxislayer = plotgroup.select('.yaxislayer-' + yLayer);\n        }\n    } else {\n        var mainplotinfo = plotinfo.mainplotinfo;\n        var mainplotgroup = mainplotinfo.plotgroup;\n        var xId = id + '-x';\n        var yId = id + '-y';\n\n        // now make the components of overlaid subplots\n        // overlays don't have backgrounds, and append all\n        // their other components to the corresponding\n        // extra groups of their main plots.\n\n        plotinfo.gridlayer = mainplotinfo.gridlayer;\n        plotinfo.zerolinelayer = mainplotinfo.zerolinelayer;\n\n        ensureSingle(mainplotinfo.overlinesBelow, 'path', xId);\n        ensureSingle(mainplotinfo.overlinesBelow, 'path', yId);\n        ensureSingle(mainplotinfo.overaxesBelow, 'g', xId);\n        ensureSingle(mainplotinfo.overaxesBelow, 'g', yId);\n\n        plotinfo.plot = ensureSingle(mainplotinfo.overplot, 'g', id);\n\n        ensureSingle(mainplotinfo.overlinesAbove, 'path', xId);\n        ensureSingle(mainplotinfo.overlinesAbove, 'path', yId);\n        ensureSingle(mainplotinfo.overaxesAbove, 'g', xId);\n        ensureSingle(mainplotinfo.overaxesAbove, 'g', yId);\n\n        // set refs to correct layers as determined by 'abovetraces'\n        plotinfo.xlines = mainplotgroup.select('.overlines-' + xLayer).select('.' + xId);\n        plotinfo.ylines = mainplotgroup.select('.overlines-' + yLayer).select('.' + yId);\n        plotinfo.xaxislayer = mainplotgroup.select('.overaxes-' + xLayer).select('.' + xId);\n        plotinfo.yaxislayer = mainplotgroup.select('.overaxes-' + yLayer).select('.' + yId);\n    }\n\n    // common attributes for all subplots, overlays or not\n\n    if(!hasOnlyLargeSploms) {\n        ensureSingleAndAddDatum(plotinfo.gridlayer, 'g', plotinfo.xaxis._id);\n        ensureSingleAndAddDatum(plotinfo.gridlayer, 'g', plotinfo.yaxis._id);\n        plotinfo.gridlayer.selectAll('g')\n            .map(function(d) { return d[0]; })\n            .sort(axisIds.idSort);\n    }\n\n    plotinfo.xlines\n        .style('fill', 'none')\n        .classed('crisp', true);\n\n    plotinfo.ylines\n        .style('fill', 'none')\n        .classed('crisp', true);\n}\n\nfunction purgeSubplotLayers(layers, fullLayout) {\n    if(!layers) return;\n\n    var overlayIdsToRemove = {};\n\n    layers.each(function(d) {\n        var id = d[0];\n        var plotgroup = d3.select(this);\n\n        plotgroup.remove();\n        removeSubplotExtras(id, fullLayout);\n        overlayIdsToRemove[id] = true;\n\n        // do not remove individual axis <clipPath>s here\n        // as other subplots may need them\n    });\n\n    // must remove overlaid subplot trace layers 'manually'\n\n    for(var k in fullLayout._plots) {\n        var subplotInfo = fullLayout._plots[k];\n        var overlays = subplotInfo.overlays || [];\n\n        for(var j = 0; j < overlays.length; j++) {\n            var overlayInfo = overlays[j];\n\n            if(overlayIdsToRemove[overlayInfo.id]) {\n                overlayInfo.plot.selectAll('.trace').remove();\n            }\n        }\n    }\n}\n\nfunction removeSubplotExtras(subplotId, fullLayout) {\n    fullLayout._draggers.selectAll('g.' + subplotId).remove();\n    fullLayout._defs.select('#clip' + fullLayout._uid + subplotId + 'plot').remove();\n}\n\nexports.toSVG = function(gd) {\n    var imageRoot = gd._fullLayout._glimages;\n    var root = d3.select(gd).selectAll('.svg-container');\n    var canvases = root.filter(function(d, i) {return i === root.size() - 1;})\n        .selectAll('.gl-canvas-context, .gl-canvas-focus');\n\n    function canvasToImage() {\n        var canvas = this;\n        var imageData = canvas.toDataURL('image/png');\n        var image = imageRoot.append('svg:image');\n\n        image.attr({\n            xmlns: xmlnsNamespaces.svg,\n            'xlink:href': imageData,\n            preserveAspectRatio: 'none',\n            x: 0,\n            y: 0,\n            width: canvas.width,\n            height: canvas.height\n        });\n    }\n\n    canvases.each(canvasToImage);\n};\n\nexports.updateFx = _dereq_('./graph_interact').updateFx;\n\n},{\"../../components/drawing\":601,\"../../constants/xmlns_namespaces\":681,\"../../lib\":703,\"../../registry\":831,\"../get_data\":786,\"../plots\":812,\"./attributes\":749,\"./axis_ids\":754,\"./constants\":757,\"./graph_interact\":760,\"./layout_attributes\":763,\"./layout_defaults\":764,\"./transition_axes\":773,\"d3\":157}],763:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../font_attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nvar constants = _dereq_('./constants');\n\n\nmodule.exports = {\n    visible: {\n        valType: 'boolean',\n        \n        editType: 'plot',\n        \n    },\n    color: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'ticks',\n        \n    },\n    title: {\n        text: {\n            valType: 'string',\n            \n            editType: 'ticks',\n            \n        },\n        font: fontAttrs({\n            editType: 'ticks',\n            \n        }),\n        editType: 'ticks'\n    },\n    type: {\n        valType: 'enumerated',\n        // '-' means we haven't yet run autotype or couldn't find any data\n        // it gets turned into linear in gd._fullLayout but not copied back\n        // to gd.data like the others are.\n        values: ['-', 'linear', 'log', 'date', 'category', 'multicategory'],\n        dflt: '-',\n        \n        editType: 'calc',\n        // we forget when an axis has been autotyped, just writing the auto\n        // value back to the input - so it doesn't make sense to template this.\n        // Note: we do NOT prohibit this in `coerce`, so if someone enters a\n        // type in the template explicitly it will be honored as the default.\n        _noTemplating: true,\n        \n    },\n    autorange: {\n        valType: 'enumerated',\n        values: [true, false, 'reversed'],\n        dflt: true,\n        \n        editType: 'axrange',\n        impliedEdits: {'range[0]': undefined, 'range[1]': undefined},\n        \n    },\n    rangemode: {\n        valType: 'enumerated',\n        values: ['normal', 'tozero', 'nonnegative'],\n        dflt: 'normal',\n        \n        editType: 'plot',\n        \n    },\n    range: {\n        valType: 'info_array',\n        \n        items: [\n            {valType: 'any', editType: 'axrange', impliedEdits: {'^autorange': false}, anim: true},\n            {valType: 'any', editType: 'axrange', impliedEdits: {'^autorange': false}, anim: true}\n        ],\n        editType: 'axrange',\n        impliedEdits: {'autorange': false},\n        anim: true,\n        \n    },\n    fixedrange: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    // scaleanchor: not used directly, just put here for reference\n    // values are any opposite-letter axis id\n    scaleanchor: {\n        valType: 'enumerated',\n        values: [\n            constants.idRegex.x.toString(),\n            constants.idRegex.y.toString()\n        ],\n        \n        editType: 'plot',\n        \n    },\n    scaleratio: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'plot',\n        \n    },\n    constrain: {\n        valType: 'enumerated',\n        values: ['range', 'domain'],\n        dflt: 'range',\n        \n        editType: 'plot',\n        \n    },\n    // constraintoward: not used directly, just put here for reference\n    constraintoward: {\n        valType: 'enumerated',\n        values: ['left', 'center', 'right', 'top', 'middle', 'bottom'],\n        \n        editType: 'plot',\n        \n    },\n    matches: {\n        valType: 'enumerated',\n        values: [\n            constants.idRegex.x.toString(),\n            constants.idRegex.y.toString()\n        ],\n        \n        editType: 'calc',\n        \n    },\n    // ticks\n    tickmode: {\n        valType: 'enumerated',\n        values: ['auto', 'linear', 'array'],\n        \n        editType: 'ticks',\n        impliedEdits: {tick0: undefined, dtick: undefined},\n        \n    },\n    nticks: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'ticks',\n        \n    },\n    tick0: {\n        valType: 'any',\n        \n        editType: 'ticks',\n        impliedEdits: {tickmode: 'linear'},\n        \n    },\n    dtick: {\n        valType: 'any',\n        \n        editType: 'ticks',\n        impliedEdits: {tickmode: 'linear'},\n        \n    },\n    tickvals: {\n        valType: 'data_array',\n        editType: 'ticks',\n        \n    },\n    ticktext: {\n        valType: 'data_array',\n        editType: 'ticks',\n        \n    },\n    ticks: {\n        valType: 'enumerated',\n        values: ['outside', 'inside', ''],\n        \n        editType: 'ticks',\n        \n    },\n    tickson: {\n        valType: 'enumerated',\n        values: ['labels', 'boundaries'],\n        \n        dflt: 'labels',\n        editType: 'ticks',\n        \n    },\n    mirror: {\n        valType: 'enumerated',\n        values: [true, 'ticks', false, 'all', 'allticks'],\n        dflt: false,\n        \n        editType: 'ticks+layoutstyle',\n        \n    },\n    ticklen: {\n        valType: 'number',\n        min: 0,\n        dflt: 5,\n        \n        editType: 'ticks',\n        \n    },\n    tickwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'ticks',\n        \n    },\n    tickcolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'ticks',\n        \n    },\n    showticklabels: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'ticks',\n        \n    },\n    automargin: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'ticks',\n        \n    },\n    showspikes: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'modebar',\n        \n    },\n    spikecolor: {\n        valType: 'color',\n        dflt: null,\n        \n        editType: 'none',\n        \n    },\n    spikethickness: {\n        valType: 'number',\n        dflt: 3,\n        \n        editType: 'none',\n        \n    },\n    spikedash: extendFlat({}, dash, {dflt: 'dash', editType: 'none'}),\n    spikemode: {\n        valType: 'flaglist',\n        flags: ['toaxis', 'across', 'marker'],\n        \n        dflt: 'toaxis',\n        editType: 'none',\n        \n    },\n    spikesnap: {\n        valType: 'enumerated',\n        values: ['data', 'cursor'],\n        dflt: 'data',\n        \n        editType: 'none',\n        \n    },\n    tickfont: fontAttrs({\n        editType: 'ticks',\n        \n    }),\n    tickangle: {\n        valType: 'angle',\n        dflt: 'auto',\n        \n        editType: 'ticks',\n        \n    },\n    tickprefix: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'ticks',\n        \n    },\n    showtickprefix: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'ticks',\n        \n    },\n    ticksuffix: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'ticks',\n        \n    },\n    showticksuffix: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'ticks',\n        \n    },\n    showexponent: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'ticks',\n        \n    },\n    exponentformat: {\n        valType: 'enumerated',\n        values: ['none', 'e', 'E', 'power', 'SI', 'B'],\n        dflt: 'B',\n        \n        editType: 'ticks',\n        \n    },\n    separatethousands: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'ticks',\n        \n    },\n    tickformat: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'ticks',\n        \n    },\n    tickformatstops: templatedArray('tickformatstop', {\n        enabled: {\n            valType: 'boolean',\n            \n            dflt: true,\n            editType: 'ticks',\n            \n        },\n        dtickrange: {\n            valType: 'info_array',\n            \n            items: [\n                {valType: 'any', editType: 'ticks'},\n                {valType: 'any', editType: 'ticks'}\n            ],\n            editType: 'ticks',\n            \n        },\n        value: {\n            valType: 'string',\n            dflt: '',\n            \n            editType: 'ticks',\n            \n        },\n        editType: 'ticks'\n    }),\n    hoverformat: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'none',\n        \n    },\n    // lines and grids\n    showline: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'ticks+layoutstyle',\n        \n    },\n    linecolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'layoutstyle',\n        \n    },\n    linewidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'ticks+layoutstyle',\n        \n    },\n    showgrid: {\n        valType: 'boolean',\n        \n        editType: 'ticks',\n        \n    },\n    gridcolor: {\n        valType: 'color',\n        dflt: colorAttrs.lightLine,\n        \n        editType: 'ticks',\n        \n    },\n    gridwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'ticks',\n        \n    },\n    zeroline: {\n        valType: 'boolean',\n        \n        editType: 'ticks',\n        \n    },\n    zerolinecolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'ticks',\n        \n    },\n    zerolinewidth: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'ticks',\n        \n    },\n\n    showdividers: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'ticks',\n        \n    },\n    dividercolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'ticks',\n        \n    },\n    dividerwidth: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'ticks',\n        \n    },\n    // TODO dividerlen: that would override \"to label base\" length?\n\n    // positioning attributes\n    // anchor: not used directly, just put here for reference\n    // values are any opposite-letter axis id\n    anchor: {\n        valType: 'enumerated',\n        values: [\n            'free',\n            constants.idRegex.x.toString(),\n            constants.idRegex.y.toString()\n        ],\n        \n        editType: 'plot',\n        \n    },\n    // side: not used directly, as values depend on direction\n    // values are top, bottom for x axes, and left, right for y\n    side: {\n        valType: 'enumerated',\n        values: ['top', 'bottom', 'left', 'right'],\n        \n        editType: 'plot',\n        \n    },\n    // overlaying: not used directly, just put here for reference\n    // values are false and any other same-letter axis id that's not\n    // itself overlaying anything\n    overlaying: {\n        valType: 'enumerated',\n        values: [\n            'free',\n            constants.idRegex.x.toString(),\n            constants.idRegex.y.toString()\n        ],\n        \n        editType: 'plot',\n        \n    },\n    layer: {\n        valType: 'enumerated',\n        values: ['above traces', 'below traces'],\n        dflt: 'above traces',\n        \n        editType: 'plot',\n        \n    },\n    domain: {\n        valType: 'info_array',\n        \n        items: [\n            {valType: 'number', min: 0, max: 1, editType: 'plot'},\n            {valType: 'number', min: 0, max: 1, editType: 'plot'}\n        ],\n        dflt: [0, 1],\n        editType: 'plot',\n        \n    },\n    position: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0,\n        \n        editType: 'plot',\n        \n    },\n    categoryorder: {\n        valType: 'enumerated',\n        values: [\n            'trace', 'category ascending', 'category descending', 'array',\n            'total ascending', 'total descending',\n            'min ascending', 'min descending',\n            'max ascending', 'max descending',\n            'sum ascending', 'sum descending',\n            'mean ascending', 'mean descending',\n            'median ascending', 'median descending'\n        ],\n        dflt: 'trace',\n        \n        editType: 'calc',\n        \n    },\n    categoryarray: {\n        valType: 'data_array',\n        \n        editType: 'calc',\n        \n    },\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    editType: 'calc',\n\n    _deprecated: {\n        autotick: {\n            valType: 'boolean',\n            \n            editType: 'ticks',\n            \n        },\n        title: {\n            valType: 'string',\n            \n            editType: 'ticks',\n            \n        },\n        titlefont: fontAttrs({\n            editType: 'ticks',\n            \n        })\n    }\n};\n\n},{\"../../components/color/attributes\":579,\"../../components/drawing/attributes\":600,\"../../lib/extend\":693,\"../../plot_api/plot_template\":741,\"../font_attributes\":777,\"./constants\":757}],764:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar Template = _dereq_('../../plot_api/plot_template');\nvar basePlotLayoutAttributes = _dereq_('../layout_attributes');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar handleTypeDefaults = _dereq_('./type_defaults');\nvar handleAxisDefaults = _dereq_('./axis_defaults');\nvar handleConstraintDefaults = _dereq_('./constraints').handleConstraintDefaults;\nvar handlePositionDefaults = _dereq_('./position_defaults');\n\nvar axisIds = _dereq_('./axis_ids');\nvar id2name = axisIds.id2name;\nvar name2id = axisIds.name2id;\n\nvar Registry = _dereq_('../../registry');\nvar traceIs = Registry.traceIs;\nvar getComponentMethod = Registry.getComponentMethod;\n\nfunction appendList(cont, k, item) {\n    if(Array.isArray(cont[k])) cont[k].push(item);\n    else cont[k] = [item];\n}\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    var ax2traces = {};\n    var xaMayHide = {};\n    var yaMayHide = {};\n    var xaMustDisplay = {};\n    var yaMustDisplay = {};\n    var yaMustForward = {};\n    var yaMayBackward = {};\n    var outerTicks = {};\n    var noGrids = {};\n    var i, j;\n\n    // look for axes in the data\n    for(i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n        if(!traceIs(trace, 'cartesian') && !traceIs(trace, 'gl2d')) continue;\n\n        var xaName;\n        if(trace.xaxis) {\n            xaName = id2name(trace.xaxis);\n            appendList(ax2traces, xaName, trace);\n        } else if(trace.xaxes) {\n            for(j = 0; j < trace.xaxes.length; j++) {\n                appendList(ax2traces, id2name(trace.xaxes[j]), trace);\n            }\n        }\n\n        var yaName;\n        if(trace.yaxis) {\n            yaName = id2name(trace.yaxis);\n            appendList(ax2traces, yaName, trace);\n        } else if(trace.yaxes) {\n            for(j = 0; j < trace.yaxes.length; j++) {\n                appendList(ax2traces, id2name(trace.yaxes[j]), trace);\n            }\n        }\n\n        // logic for funnels\n        if(trace.type === 'funnel') {\n            if(trace.orientation === 'h') {\n                if(xaName) xaMayHide[xaName] = true;\n                if(yaName) yaMayBackward[yaName] = true;\n            } else {\n                if(yaName) yaMayHide[yaName] = true;\n            }\n        } else {\n            if(yaName) {\n                yaMustDisplay[yaName] = true;\n                yaMustForward[yaName] = true;\n            }\n\n            if(!traceIs(trace, 'carpet') || (trace.type === 'carpet' && !trace._cheater)) {\n                if(xaName) xaMustDisplay[xaName] = true;\n            }\n        }\n\n        // Two things trigger axis visibility:\n        // 1. is not carpet\n        // 2. carpet that's not cheater\n\n        // The above check for definitely-not-cheater is not adequate. This\n        // second list tracks which axes *could* be a cheater so that the\n        // full condition triggering hiding is:\n        //   *could* be a cheater and *is not definitely visible*\n        if(trace.type === 'carpet' && trace._cheater) {\n            if(xaName) xaMayHide[xaName] = true;\n        }\n\n        // check for default formatting tweaks\n        if(traceIs(trace, '2dMap')) {\n            outerTicks[xaName] = true;\n            outerTicks[yaName] = true;\n        }\n\n        if(traceIs(trace, 'oriented')) {\n            var positionAxis = trace.orientation === 'h' ? yaName : xaName;\n            noGrids[positionAxis] = true;\n        }\n    }\n\n    var subplots = layoutOut._subplots;\n    var xIds = subplots.xaxis;\n    var yIds = subplots.yaxis;\n    var xNames = Lib.simpleMap(xIds, id2name);\n    var yNames = Lib.simpleMap(yIds, id2name);\n    var axNames = xNames.concat(yNames);\n\n    // plot_bgcolor only makes sense if there's a (2D) plot!\n    // TODO: bgcolor for each subplot, to inherit from the main one\n    var plotBgColor = Color.background;\n    if(xIds.length && yIds.length) {\n        plotBgColor = Lib.coerce(layoutIn, layoutOut, basePlotLayoutAttributes, 'plot_bgcolor');\n    }\n\n    var bgColor = Color.combine(plotBgColor, layoutOut.paper_bgcolor);\n\n    var axName, axLetter, axLayoutIn, axLayoutOut;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt);\n    }\n\n    function coerce2(attr, dflt) {\n        return Lib.coerce2(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt);\n    }\n\n    function getCounterAxes(axLetter) {\n        return (axLetter === 'x') ? yIds : xIds;\n    }\n\n    var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')};\n    var allAxisIds = counterAxes.x.concat(counterAxes.y);\n\n    function getOverlayableAxes(axLetter, axName) {\n        var list = (axLetter === 'x') ? xNames : yNames;\n        var out = [];\n\n        for(var j = 0; j < list.length; j++) {\n            var axName2 = list[j];\n\n            if(axName2 !== axName && !(layoutIn[axName2] || {}).overlaying) {\n                out.push(name2id(axName2));\n            }\n        }\n\n        return out;\n    }\n\n    // first pass creates the containers, determines types, and handles most of the settings\n    for(i = 0; i < axNames.length; i++) {\n        axName = axNames[i];\n        axLetter = axName.charAt(0);\n\n        if(!Lib.isPlainObject(layoutIn[axName])) {\n            layoutIn[axName] = {};\n        }\n\n        axLayoutIn = layoutIn[axName];\n        axLayoutOut = Template.newContainer(layoutOut, axName, axLetter + 'axis');\n\n        var traces = ax2traces[axName] || [];\n        axLayoutOut._traceIndices = traces.map(function(t) { return t._expandedIndex; });\n        axLayoutOut._annIndices = [];\n        axLayoutOut._shapeIndices = [];\n        axLayoutOut._imgIndices = [];\n        axLayoutOut._subplotsWith = [];\n        axLayoutOut._counterAxes = [];\n\n        // set up some private properties\n        axLayoutOut._name = axLayoutOut._attr = axName;\n        var id = axLayoutOut._id = name2id(axName);\n\n        var overlayableAxes = getOverlayableAxes(axLetter, axName);\n\n        var visibleDflt =\n            (axLetter === 'x' && !xaMustDisplay[axName] && xaMayHide[axName]) ||\n            (axLetter === 'y' && !yaMustDisplay[axName] && yaMayHide[axName]);\n\n        var reverseDflt =\n            (axLetter === 'y' && !yaMustForward[axName] && yaMayBackward[axName]);\n\n        var defaultOptions = {\n            letter: axLetter,\n            font: layoutOut.font,\n            outerTicks: outerTicks[axName],\n            showGrid: !noGrids[axName],\n            data: traces,\n            bgColor: bgColor,\n            calendar: layoutOut.calendar,\n            automargin: true,\n            visibleDflt: visibleDflt,\n            reverseDflt: reverseDflt,\n            splomStash: ((layoutOut._splomAxes || {})[axLetter] || {})[id]\n        };\n\n        coerce('uirevision', layoutOut.uirevision);\n\n        handleTypeDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions);\n        handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut);\n\n        var spikecolor = coerce2('spikecolor');\n        var spikethickness = coerce2('spikethickness');\n        var spikedash = coerce2('spikedash');\n        var spikemode = coerce2('spikemode');\n        var spikesnap = coerce2('spikesnap');\n        var showSpikes = coerce('showspikes', !!spikecolor || !!spikethickness || !!spikedash || !!spikemode || !!spikesnap);\n\n        if(!showSpikes) {\n            delete axLayoutOut.spikecolor;\n            delete axLayoutOut.spikethickness;\n            delete axLayoutOut.spikedash;\n            delete axLayoutOut.spikemode;\n            delete axLayoutOut.spikesnap;\n        }\n\n        handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, {\n            letter: axLetter,\n            counterAxes: counterAxes[axLetter],\n            overlayableAxes: overlayableAxes,\n            grid: layoutOut.grid\n        });\n\n        axLayoutOut._input = axLayoutIn;\n    }\n\n    // quick second pass for range slider and selector defaults\n    var rangeSliderDefaults = getComponentMethod('rangeslider', 'handleDefaults');\n    var rangeSelectorDefaults = getComponentMethod('rangeselector', 'handleDefaults');\n\n    for(i = 0; i < xNames.length; i++) {\n        axName = xNames[i];\n        axLayoutIn = layoutIn[axName];\n        axLayoutOut = layoutOut[axName];\n\n        rangeSliderDefaults(layoutIn, layoutOut, axName);\n\n        if(axLayoutOut.type === 'date') {\n            rangeSelectorDefaults(\n                axLayoutIn,\n                axLayoutOut,\n                layoutOut,\n                yNames,\n                axLayoutOut.calendar\n            );\n        }\n\n        coerce('fixedrange');\n    }\n\n    for(i = 0; i < yNames.length; i++) {\n        axName = yNames[i];\n        axLayoutIn = layoutIn[axName];\n        axLayoutOut = layoutOut[axName];\n\n        var anchoredAxis = layoutOut[id2name(axLayoutOut.anchor)];\n\n        var fixedRangeDflt = getComponentMethod('rangeslider', 'isVisible')(anchoredAxis);\n\n        coerce('fixedrange', fixedRangeDflt);\n    }\n\n    // Finally, handle scale constraints and matching axes.\n    //\n    // We need to do this after all axes have coerced both `type`\n    // (so we link only axes of the same type) and\n    // `fixedrange` (so we can avoid linking from OR TO a fixed axis).\n\n    // sets of axes linked by `scaleanchor` along with the scaleratios compounded\n    // together, populated in handleConstraintDefaults\n    var constraintGroups = layoutOut._axisConstraintGroups = [];\n    // similar to _axisConstraintGroups, but for matching axes\n    var matchGroups = layoutOut._axisMatchGroups = [];\n\n    for(i = 0; i < axNames.length; i++) {\n        axName = axNames[i];\n        axLetter = axName.charAt(0);\n        axLayoutIn = layoutIn[axName];\n        axLayoutOut = layoutOut[axName];\n\n        handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, allAxisIds, layoutOut);\n    }\n\n    for(i = 0; i < matchGroups.length; i++) {\n        var group = matchGroups[i];\n        var rng = null;\n        var autorange = null;\n        var axId;\n\n        // find 'matching' range attrs\n        for(axId in group) {\n            axLayoutOut = layoutOut[id2name(axId)];\n            if(!axLayoutOut.matches) {\n                rng = axLayoutOut.range;\n                autorange = axLayoutOut.autorange;\n            }\n        }\n        // if `ax.matches` values are reciprocal,\n        // pick values of first axis in group\n        if(rng === null || autorange === null) {\n            for(axId in group) {\n                axLayoutOut = layoutOut[id2name(axId)];\n                rng = axLayoutOut.range;\n                autorange = axLayoutOut.autorange;\n                break;\n            }\n        }\n        // apply matching range attrs\n        for(axId in group) {\n            axLayoutOut = layoutOut[id2name(axId)];\n            if(axLayoutOut.matches) {\n                axLayoutOut.range = rng.slice();\n                axLayoutOut.autorange = autorange;\n            }\n            axLayoutOut._matchGroup = group;\n        }\n\n        // remove matching axis from scaleanchor constraint groups (for now)\n        if(constraintGroups.length) {\n            for(axId in group) {\n                for(j = 0; j < constraintGroups.length; j++) {\n                    var group2 = constraintGroups[j];\n                    for(var axId2 in group2) {\n                        if(axId === axId2) {\n                            Lib.warn('Axis ' + axId2 + ' is set with both ' +\n                                'a *scaleanchor* and *matches* constraint; ' +\n                                'ignoring the scale constraint.');\n\n                            delete group2[axId2];\n                            if(Object.keys(group2).length < 2) {\n                                constraintGroups.splice(j, 1);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../registry\":831,\"../layout_attributes\":803,\"./axis_defaults\":753,\"./axis_ids\":754,\"./constraints\":758,\"./layout_attributes\":763,\"./position_defaults\":766,\"./type_defaults\":774}],765:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorMix = _dereq_('tinycolor2').mix;\nvar lightFraction = _dereq_('../../components/color/attributes').lightFraction;\nvar Lib = _dereq_('../../lib');\n\n/**\n * @param {object} opts :\n *   - dfltColor {string} : default axis color\n *   - bgColor {string} : combined subplot bg color\n *   - blend {number, optional} : blend percentage (to compute dflt grid color)\n *   - showLine {boolean} : show line by default\n *   - showGrid {boolean} : show grid by default\n *   - noZeroLine {boolean} : don't coerce zeroline* attributes\n *   - attributes {object} : attribute object associated with input containers\n */\nmodule.exports = function handleLineGridDefaults(containerIn, containerOut, coerce, opts) {\n    opts = opts || {};\n\n    var dfltColor = opts.dfltColor;\n\n    function coerce2(attr, dflt) {\n        return Lib.coerce2(containerIn, containerOut, opts.attributes, attr, dflt);\n    }\n\n    var lineColor = coerce2('linecolor', dfltColor);\n    var lineWidth = coerce2('linewidth');\n    var showLine = coerce('showline', opts.showLine || !!lineColor || !!lineWidth);\n\n    if(!showLine) {\n        delete containerOut.linecolor;\n        delete containerOut.linewidth;\n    }\n\n    var gridColorDflt = colorMix(dfltColor, opts.bgColor, opts.blend || lightFraction).toRgbString();\n    var gridColor = coerce2('gridcolor', gridColorDflt);\n    var gridWidth = coerce2('gridwidth');\n    var showGridLines = coerce('showgrid', opts.showGrid || !!gridColor || !!gridWidth);\n\n    if(!showGridLines) {\n        delete containerOut.gridcolor;\n        delete containerOut.gridwidth;\n    }\n\n    if(!opts.noZeroLine) {\n        var zeroLineColor = coerce2('zerolinecolor', dfltColor);\n        var zeroLineWidth = coerce2('zerolinewidth');\n        var showZeroLine = coerce('zeroline', opts.showGrid || !!zeroLineColor || !!zeroLineWidth);\n\n        if(!showZeroLine) {\n            delete containerOut.zerolinecolor;\n            delete containerOut.zerolinewidth;\n        }\n    }\n};\n\n},{\"../../components/color/attributes\":579,\"../../lib\":703,\"tinycolor2\":524}],766:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\n\n\nmodule.exports = function handlePositionDefaults(containerIn, containerOut, coerce, options) {\n    var counterAxes = options.counterAxes || [];\n    var overlayableAxes = options.overlayableAxes || [];\n    var letter = options.letter;\n    var grid = options.grid;\n\n    var dfltAnchor, dfltDomain, dfltSide, dfltPosition;\n\n    if(grid) {\n        dfltDomain = grid._domains[letter][grid._axisMap[containerOut._id]];\n        dfltAnchor = grid._anchors[containerOut._id];\n        if(dfltDomain) {\n            dfltSide = grid[letter + 'side'].split(' ')[0];\n            dfltPosition = grid.domain[letter][dfltSide === 'right' || dfltSide === 'top' ? 1 : 0];\n        }\n    }\n\n    // Even if there's a grid, this axis may not be in it - fall back on non-grid defaults\n    dfltDomain = dfltDomain || [0, 1];\n    dfltAnchor = dfltAnchor || (isNumeric(containerIn.position) ? 'free' : (counterAxes[0] || 'free'));\n    dfltSide = dfltSide || (letter === 'x' ? 'bottom' : 'left');\n    dfltPosition = dfltPosition || 0;\n\n    var anchor = Lib.coerce(containerIn, containerOut, {\n        anchor: {\n            valType: 'enumerated',\n            values: ['free'].concat(counterAxes),\n            dflt: dfltAnchor\n        }\n    }, 'anchor');\n\n    if(anchor === 'free') coerce('position', dfltPosition);\n\n    Lib.coerce(containerIn, containerOut, {\n        side: {\n            valType: 'enumerated',\n            values: letter === 'x' ? ['bottom', 'top'] : ['left', 'right'],\n            dflt: dfltSide\n        }\n    }, 'side');\n\n    var overlaying = false;\n    if(overlayableAxes.length) {\n        overlaying = Lib.coerce(containerIn, containerOut, {\n            overlaying: {\n                valType: 'enumerated',\n                values: [false].concat(overlayableAxes),\n                dflt: false\n            }\n        }, 'overlaying');\n    }\n\n    if(!overlaying) {\n        // TODO: right now I'm copying this domain over to overlaying axes\n        // in ax.setscale()... but this means we still need (imperfect) logic\n        // in the axes popover to hide domain for the overlaying axis.\n        // perhaps I should make a private version _domain that all axes get???\n        var domain = coerce('domain', dfltDomain);\n\n        // according to https://www.npmjs.com/package/canvas-size\n        // the minimum value of max canvas width across browsers and devices is 4096\n        // which applied in the calculation below:\n        if(domain[0] > domain[1] - 1 / 4096) containerOut.domain = dfltDomain;\n        Lib.noneOrAll(containerIn.domain, containerOut.domain, dfltDomain);\n    }\n\n    coerce('layer');\n\n    return containerOut;\n};\n\n},{\"../../lib\":703,\"fast-isnumeric\":224}],767:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar FROM_BL = _dereq_('../../constants/alignment').FROM_BL;\n\nmodule.exports = function scaleZoom(ax, factor, centerFraction) {\n    if(centerFraction === undefined) {\n        centerFraction = FROM_BL[ax.constraintoward || 'center'];\n    }\n\n    var rangeLinear = [ax.r2l(ax.range[0]), ax.r2l(ax.range[1])];\n    var center = rangeLinear[0] + (rangeLinear[1] - rangeLinear[0]) * centerFraction;\n\n    ax.range = ax._input.range = [\n        ax.l2r(center + (rangeLinear[0] - center) * factor),\n        ax.l2r(center + (rangeLinear[1] - center) * factor)\n    ];\n};\n\n},{\"../../constants/alignment\":675}],768:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar polybool = _dereq_('polybooljs');\n\nvar Registry = _dereq_('../../registry');\nvar Color = _dereq_('../../components/color');\nvar Fx = _dereq_('../../components/fx');\n\nvar Lib = _dereq_('../../lib');\nvar polygon = _dereq_('../../lib/polygon');\nvar throttle = _dereq_('../../lib/throttle');\nvar makeEventData = _dereq_('../../components/fx/helpers').makeEventData;\nvar getFromId = _dereq_('./axis_ids').getFromId;\nvar clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');\n\nvar redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;\n\nvar constants = _dereq_('./constants');\nvar MINSELECT = constants.MINSELECT;\n\nvar filteredPolygon = polygon.filter;\nvar polygonTester = polygon.tester;\n\nfunction getAxId(ax) { return ax._id; }\n\nfunction prepSelect(e, startX, startY, dragOptions, mode) {\n    var gd = dragOptions.gd;\n    var fullLayout = gd._fullLayout;\n    var zoomLayer = fullLayout._zoomlayer;\n    var dragBBox = dragOptions.element.getBoundingClientRect();\n    var plotinfo = dragOptions.plotinfo;\n    var xs = plotinfo.xaxis._offset;\n    var ys = plotinfo.yaxis._offset;\n    var x0 = startX - dragBBox.left;\n    var y0 = startY - dragBBox.top;\n    var x1 = x0;\n    var y1 = y0;\n    var path0 = 'M' + x0 + ',' + y0;\n    var pw = dragOptions.xaxes[0]._length;\n    var ph = dragOptions.yaxes[0]._length;\n    var allAxes = dragOptions.xaxes.concat(dragOptions.yaxes);\n    var subtract = e.altKey;\n\n    var filterPoly, selectionTester, mergedPolygons, currentPolygon;\n    var i, searchInfo, eventData;\n\n    coerceSelectionsCache(e, gd, dragOptions);\n\n    if(mode === 'lasso') {\n        filterPoly = filteredPolygon([[x0, y0]], constants.BENDPX);\n    }\n\n    var outlines = zoomLayer.selectAll('path.select-outline-' + plotinfo.id).data([1, 2]);\n\n    outlines.enter()\n        .append('path')\n        .attr('class', function(d) { return 'select-outline select-outline-' + d + ' select-outline-' + plotinfo.id; })\n        .attr('transform', 'translate(' + xs + ', ' + ys + ')')\n        .attr('d', path0 + 'Z');\n\n    var corners = zoomLayer.append('path')\n        .attr('class', 'zoombox-corners')\n        .style({\n            fill: Color.background,\n            stroke: Color.defaultLine,\n            'stroke-width': 1\n        })\n        .attr('transform', 'translate(' + xs + ', ' + ys + ')')\n        .attr('d', 'M0,0Z');\n\n\n    var throttleID = fullLayout._uid + constants.SELECTID;\n    var selection = [];\n\n    // find the traces to search for selection points\n    var searchTraces = determineSearchTraces(gd, dragOptions.xaxes,\n      dragOptions.yaxes, dragOptions.subplot);\n\n    // in v2 (once log ranges are fixed),\n    // we'll be able to p2r here for all axis types\n    function p2r(ax, v) {\n        return ax.type === 'log' ? ax.p2d(v) : ax.p2r(v);\n    }\n\n    function axValue(ax) {\n        var index = (ax._id.charAt(0) === 'y') ? 1 : 0;\n        return function(v) { return p2r(ax, v[index]); };\n    }\n\n    function ascending(a, b) { return a - b; }\n\n    // allow subplots to override fillRangeItems routine\n    var fillRangeItems;\n\n    if(plotinfo.fillRangeItems) {\n        fillRangeItems = plotinfo.fillRangeItems;\n    } else {\n        if(mode === 'select') {\n            fillRangeItems = function(eventData, poly) {\n                var ranges = eventData.range = {};\n\n                for(i = 0; i < allAxes.length; i++) {\n                    var ax = allAxes[i];\n                    var axLetter = ax._id.charAt(0);\n\n                    ranges[ax._id] = [\n                        p2r(ax, poly[axLetter + 'min']),\n                        p2r(ax, poly[axLetter + 'max'])\n                    ].sort(ascending);\n                }\n            };\n        } else {\n            fillRangeItems = function(eventData, poly, filterPoly) {\n                var dataPts = eventData.lassoPoints = {};\n\n                for(i = 0; i < allAxes.length; i++) {\n                    var ax = allAxes[i];\n                    dataPts[ax._id] = filterPoly.filtered.map(axValue(ax));\n                }\n            };\n        }\n    }\n\n    dragOptions.moveFn = function(dx0, dy0) {\n        x1 = Math.max(0, Math.min(pw, dx0 + x0));\n        y1 = Math.max(0, Math.min(ph, dy0 + y0));\n\n        var dx = Math.abs(x1 - x0);\n        var dy = Math.abs(y1 - y0);\n\n        if(mode === 'select') {\n            var direction = fullLayout.selectdirection;\n\n            if(fullLayout.selectdirection === 'any') {\n                if(dy < Math.min(dx * 0.6, MINSELECT)) direction = 'h';\n                else if(dx < Math.min(dy * 0.6, MINSELECT)) direction = 'v';\n                else direction = 'd';\n            } else {\n                direction = fullLayout.selectdirection;\n            }\n\n            if(direction === 'h') {\n                // horizontal motion: make a vertical box\n                currentPolygon = [[x0, 0], [x0, ph], [x1, ph], [x1, 0]];\n                currentPolygon.xmin = Math.min(x0, x1);\n                currentPolygon.xmax = Math.max(x0, x1);\n                currentPolygon.ymin = Math.min(0, ph);\n                currentPolygon.ymax = Math.max(0, ph);\n                // extras to guide users in keeping a straight selection\n                corners.attr('d', 'M' + currentPolygon.xmin + ',' + (y0 - MINSELECT) +\n                    'h-4v' + (2 * MINSELECT) + 'h4Z' +\n                    'M' + (currentPolygon.xmax - 1) + ',' + (y0 - MINSELECT) +\n                    'h4v' + (2 * MINSELECT) + 'h-4Z');\n            } else if(direction === 'v') {\n                // vertical motion: make a horizontal box\n                currentPolygon = [[0, y0], [0, y1], [pw, y1], [pw, y0]];\n                currentPolygon.xmin = Math.min(0, pw);\n                currentPolygon.xmax = Math.max(0, pw);\n                currentPolygon.ymin = Math.min(y0, y1);\n                currentPolygon.ymax = Math.max(y0, y1);\n                corners.attr('d', 'M' + (x0 - MINSELECT) + ',' + currentPolygon.ymin +\n                    'v-4h' + (2 * MINSELECT) + 'v4Z' +\n                    'M' + (x0 - MINSELECT) + ',' + (currentPolygon.ymax - 1) +\n                    'v4h' + (2 * MINSELECT) + 'v-4Z');\n            } else if(direction === 'd') {\n                // diagonal motion\n                currentPolygon = [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];\n                currentPolygon.xmin = Math.min(x0, x1);\n                currentPolygon.xmax = Math.max(x0, x1);\n                currentPolygon.ymin = Math.min(y0, y1);\n                currentPolygon.ymax = Math.max(y0, y1);\n                corners.attr('d', 'M0,0Z');\n            }\n        } else if(mode === 'lasso') {\n            filterPoly.addPt([x1, y1]);\n            currentPolygon = filterPoly.filtered;\n        }\n\n        // create outline & tester\n        if(dragOptions.selectionDefs && dragOptions.selectionDefs.length) {\n            mergedPolygons = mergePolygons(dragOptions.mergedPolygons, currentPolygon, subtract);\n            currentPolygon.subtract = subtract;\n            selectionTester = multiTester(dragOptions.selectionDefs.concat([currentPolygon]));\n        } else {\n            mergedPolygons = [currentPolygon];\n            selectionTester = polygonTester(currentPolygon);\n        }\n\n        // draw selection\n        drawSelection(mergedPolygons, outlines);\n\n\n        throttle.throttle(\n            throttleID,\n            constants.SELECTDELAY,\n            function() {\n                selection = [];\n\n                var thisSelection;\n                var traceSelections = [];\n                var traceSelection;\n                for(i = 0; i < searchTraces.length; i++) {\n                    searchInfo = searchTraces[i];\n\n                    traceSelection = searchInfo._module.selectPoints(searchInfo, selectionTester);\n                    traceSelections.push(traceSelection);\n\n                    thisSelection = fillSelectionItem(traceSelection, searchInfo);\n\n                    if(selection.length) {\n                        for(var j = 0; j < thisSelection.length; j++) {\n                            selection.push(thisSelection[j]);\n                        }\n                    } else selection = thisSelection;\n                }\n\n                eventData = {points: selection};\n                updateSelectedState(gd, searchTraces, eventData);\n                fillRangeItems(eventData, currentPolygon, filterPoly);\n                dragOptions.gd.emit('plotly_selecting', eventData);\n            }\n        );\n    };\n\n    dragOptions.clickFn = function(numClicks, evt) {\n        var clickmode = fullLayout.clickmode;\n\n        corners.remove();\n\n        throttle.done(throttleID).then(function() {\n            throttle.clear(throttleID);\n            if(numClicks === 2) {\n                // clear selection on doubleclick\n                outlines.remove();\n                for(i = 0; i < searchTraces.length; i++) {\n                    searchInfo = searchTraces[i];\n                    searchInfo._module.selectPoints(searchInfo, false);\n                }\n\n                updateSelectedState(gd, searchTraces);\n\n                clearSelectionsCache(dragOptions);\n\n                gd.emit('plotly_deselect', null);\n            } else {\n                if(clickmode.indexOf('select') > -1) {\n                    selectOnClick(evt, gd, dragOptions.xaxes, dragOptions.yaxes,\n                      dragOptions.subplot, dragOptions, outlines);\n                }\n\n                if(clickmode === 'event') {\n                    // TODO: remove in v2 - this was probably never intended to work as it does,\n                    // but in case anyone depends on it we don't want to break it now.\n                    // Note that click-to-select introduced pre v2 also emitts proper\n                    // event data when clickmode is having 'select' in its flag list.\n                    gd.emit('plotly_selected', undefined);\n                }\n            }\n\n            Fx.click(gd, evt);\n        }).catch(Lib.error);\n    };\n\n    dragOptions.doneFn = function() {\n        corners.remove();\n\n        throttle.done(throttleID).then(function() {\n            throttle.clear(throttleID);\n            dragOptions.gd.emit('plotly_selected', eventData);\n\n            if(currentPolygon && dragOptions.selectionDefs) {\n                // save last polygons\n                currentPolygon.subtract = subtract;\n                dragOptions.selectionDefs.push(currentPolygon);\n\n                // we have to keep reference to arrays container\n                dragOptions.mergedPolygons.length = 0;\n                [].push.apply(dragOptions.mergedPolygons, mergedPolygons);\n            }\n\n            if(dragOptions.doneFnCompleted) {\n                dragOptions.doneFnCompleted(selection);\n            }\n        }).catch(Lib.error);\n    };\n}\n\nfunction selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutlines) {\n    var hoverData = gd._hoverdata;\n    var clickmode = gd._fullLayout.clickmode;\n    var sendEvents = clickmode.indexOf('event') > -1;\n    var selection = [];\n    var searchTraces, searchInfo, currentSelectionDef, selectionTester, traceSelection;\n    var thisTracesSelection, pointOrBinSelected, subtract, eventData, i;\n\n    if(isHoverDataSet(hoverData)) {\n        coerceSelectionsCache(evt, gd, dragOptions);\n        searchTraces = determineSearchTraces(gd, xAxes, yAxes, subplot);\n        var clickedPtInfo = extractClickedPtInfo(hoverData, searchTraces);\n        var isBinnedTrace = clickedPtInfo.pointNumbers.length > 0;\n\n\n        // Note: potentially costly operation isPointOrBinSelected is\n        // called as late as possible through the use of an assignment\n        // in an if condition.\n        if(isBinnedTrace ?\n            isOnlyThisBinSelected(searchTraces, clickedPtInfo) :\n            isOnlyOnePointSelected(searchTraces) &&\n                (pointOrBinSelected = isPointOrBinSelected(clickedPtInfo))) {\n            if(polygonOutlines) polygonOutlines.remove();\n            for(i = 0; i < searchTraces.length; i++) {\n                searchInfo = searchTraces[i];\n                searchInfo._module.selectPoints(searchInfo, false);\n            }\n\n            updateSelectedState(gd, searchTraces);\n\n            clearSelectionsCache(dragOptions);\n\n            if(sendEvents) {\n                gd.emit('plotly_deselect', null);\n            }\n        } else {\n            subtract = evt.shiftKey &&\n              (pointOrBinSelected !== undefined ?\n                pointOrBinSelected :\n                isPointOrBinSelected(clickedPtInfo));\n            currentSelectionDef = newPointSelectionDef(clickedPtInfo.pointNumber, clickedPtInfo.searchInfo, subtract);\n\n            var allSelectionDefs = dragOptions.selectionDefs.concat([currentSelectionDef]);\n            selectionTester = multiTester(allSelectionDefs);\n\n            for(i = 0; i < searchTraces.length; i++) {\n                traceSelection = searchTraces[i]._module.selectPoints(searchTraces[i], selectionTester);\n                thisTracesSelection = fillSelectionItem(traceSelection, searchTraces[i]);\n\n                if(selection.length) {\n                    for(var j = 0; j < thisTracesSelection.length; j++) {\n                        selection.push(thisTracesSelection[j]);\n                    }\n                } else selection = thisTracesSelection;\n            }\n\n            eventData = {points: selection};\n            updateSelectedState(gd, searchTraces, eventData);\n\n            if(currentSelectionDef && dragOptions) {\n                dragOptions.selectionDefs.push(currentSelectionDef);\n            }\n\n            if(polygonOutlines) drawSelection(dragOptions.mergedPolygons, polygonOutlines);\n\n            if(sendEvents) {\n                gd.emit('plotly_selected', eventData);\n            }\n        }\n    }\n}\n\n/**\n * Constructs a new point selection definition object.\n */\nfunction newPointSelectionDef(pointNumber, searchInfo, subtract) {\n    return {\n        pointNumber: pointNumber,\n        searchInfo: searchInfo,\n        subtract: subtract\n    };\n}\n\nfunction isPointSelectionDef(o) {\n    return 'pointNumber' in o && 'searchInfo' in o;\n}\n\n/*\n * Constructs a new point number tester.\n */\nfunction newPointNumTester(pointSelectionDef) {\n    return {\n        xmin: 0,\n        xmax: 0,\n        ymin: 0,\n        ymax: 0,\n        pts: [],\n        contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {\n            var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace._expandedIndex;\n            var idxActualTrace = searchInfo.cd[0].trace._expandedIndex;\n            return idxActualTrace === idxWantedTrace &&\n              pointNumber === pointSelectionDef.pointNumber;\n        },\n        isRect: false,\n        degenerate: false,\n        subtract: pointSelectionDef.subtract\n    };\n}\n\n/**\n * Wraps multiple selection testers.\n *\n * @param {Array} list - An array of selection testers.\n *\n * @return a selection tester object with a contains function\n * that can be called to evaluate a point against all wrapped\n * selection testers that were passed in list.\n */\nfunction multiTester(list) {\n    var testers = [];\n    var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];\n    var xmax = xmin;\n    var ymin = isPointSelectionDef(list[0]) ? 0 : list[0][0][1];\n    var ymax = ymin;\n\n    for(var i = 0; i < list.length; i++) {\n        if(isPointSelectionDef(list[i])) {\n            testers.push(newPointNumTester(list[i]));\n        } else {\n            var tester = polygon.tester(list[i]);\n            tester.subtract = list[i].subtract;\n            testers.push(tester);\n            xmin = Math.min(xmin, tester.xmin);\n            xmax = Math.max(xmax, tester.xmax);\n            ymin = Math.min(ymin, tester.ymin);\n            ymax = Math.max(ymax, tester.ymax);\n        }\n    }\n\n    /**\n     * Tests if the given point is within this tester.\n     *\n     * @param {Array} pt - [0] is the x coordinate, [1] is the y coordinate of the point.\n     * @param {*} arg - An optional parameter to pass down to wrapped testers.\n     * @param {number} pointNumber - The point number of the point within the underlying data array.\n     * @param {number} searchInfo - An object identifying the trace the point is contained in.\n     *\n     * @return {boolean} true if point is considered to be selected, false otherwise.\n     */\n    function contains(pt, arg, pointNumber, searchInfo) {\n        var contained = false;\n        for(var i = 0; i < testers.length; i++) {\n            if(testers[i].contains(pt, arg, pointNumber, searchInfo)) {\n                // if contained by subtract tester - exclude the point\n                contained = testers[i].subtract === false;\n            }\n        }\n\n        return contained;\n    }\n\n    return {\n        xmin: xmin,\n        xmax: xmax,\n        ymin: ymin,\n        ymax: ymax,\n        pts: [],\n        contains: contains,\n        isRect: false,\n        degenerate: false\n    };\n}\n\nfunction coerceSelectionsCache(evt, gd, dragOptions) {\n    var fullLayout = gd._fullLayout;\n    var plotinfo = dragOptions.plotinfo;\n\n    var selectingOnSameSubplot = (\n        fullLayout._lastSelectedSubplot &&\n        fullLayout._lastSelectedSubplot === plotinfo.id\n    );\n    var hasModifierKey = evt.shiftKey || evt.altKey;\n\n    if(selectingOnSameSubplot && hasModifierKey &&\n      (plotinfo.selection && plotinfo.selection.selectionDefs) && !dragOptions.selectionDefs) {\n        // take over selection definitions from prev mode, if any\n        dragOptions.selectionDefs = plotinfo.selection.selectionDefs;\n        dragOptions.mergedPolygons = plotinfo.selection.mergedPolygons;\n    } else if(!hasModifierKey || !plotinfo.selection) {\n        clearSelectionsCache(dragOptions);\n    }\n\n    // clear selection outline when selecting a different subplot\n    if(!selectingOnSameSubplot) {\n        clearSelect(gd);\n        fullLayout._lastSelectedSubplot = plotinfo.id;\n    }\n}\n\nfunction clearSelectionsCache(dragOptions) {\n    var plotinfo = dragOptions.plotinfo;\n\n    plotinfo.selection = {};\n    plotinfo.selection.selectionDefs = dragOptions.selectionDefs = [];\n    plotinfo.selection.mergedPolygons = dragOptions.mergedPolygons = [];\n}\n\nfunction determineSearchTraces(gd, xAxes, yAxes, subplot) {\n    var searchTraces = [];\n    var xAxisIds = xAxes.map(getAxId);\n    var yAxisIds = yAxes.map(getAxId);\n    var cd, trace, i;\n\n    for(i = 0; i < gd.calcdata.length; i++) {\n        cd = gd.calcdata[i];\n        trace = cd[0].trace;\n\n        if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;\n\n        if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {\n            searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));\n        } else if(\n          trace.type === 'splom' &&\n          // FIXME: make sure we don't have more than single axis for splom\n          trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]\n        ) {\n            var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);\n            info.scene = gd._fullLayout._splomScenes[trace.uid];\n            searchTraces.push(info);\n        } else if(\n          trace.type === 'sankey'\n        ) {\n            var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);\n            searchTraces.push(sankeyInfo);\n        } else {\n            if(xAxisIds.indexOf(trace.xaxis) === -1) continue;\n            if(yAxisIds.indexOf(trace.yaxis) === -1) continue;\n\n            searchTraces.push(createSearchInfo(trace._module, cd,\n              getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));\n        }\n    }\n\n    return searchTraces;\n\n    function createSearchInfo(module, calcData, xaxis, yaxis) {\n        return {\n            _module: module,\n            cd: calcData,\n            xaxis: xaxis,\n            yaxis: yaxis\n        };\n    }\n}\n\nfunction drawSelection(polygons, outlines) {\n    var paths = [];\n    var i, d;\n\n    for(i = 0; i < polygons.length; i++) {\n        var ppts = polygons[i];\n        paths.push(ppts.join('L') + 'L' + ppts[0]);\n    }\n\n    d = polygons.length > 0 ?\n      'M' + paths.join('M') + 'Z' :\n      'M0,0Z';\n    outlines.attr('d', d);\n}\n\nfunction isHoverDataSet(hoverData) {\n    return hoverData &&\n      Array.isArray(hoverData) &&\n      hoverData[0].hoverOnBox !== true;\n}\n\nfunction extractClickedPtInfo(hoverData, searchTraces) {\n    var hoverDatum = hoverData[0];\n    var pointNumber = -1;\n    var pointNumbers = [];\n    var searchInfo, i;\n\n    for(i = 0; i < searchTraces.length; i++) {\n        searchInfo = searchTraces[i];\n        if(hoverDatum.fullData._expandedIndex === searchInfo.cd[0].trace._expandedIndex) {\n            // Special case for box (and violin)\n            if(hoverDatum.hoverOnBox === true) {\n                break;\n            }\n\n            // Hint: in some traces like histogram, one graphical element\n            // doesn't correspond to one particular data point, but to\n            // bins of data points. Thus, hoverDatum can have a binNumber\n            // property instead of pointNumber.\n            if(hoverDatum.pointNumber !== undefined) {\n                pointNumber = hoverDatum.pointNumber;\n            } else if(hoverDatum.binNumber !== undefined) {\n                pointNumber = hoverDatum.binNumber;\n                pointNumbers = hoverDatum.pointNumbers;\n            }\n\n            break;\n        }\n    }\n\n    return {\n        pointNumber: pointNumber,\n        pointNumbers: pointNumbers,\n        searchInfo: searchInfo\n    };\n}\n\nfunction isPointOrBinSelected(clickedPtInfo) {\n    var trace = clickedPtInfo.searchInfo.cd[0].trace;\n    var ptNum = clickedPtInfo.pointNumber;\n    var ptNums = clickedPtInfo.pointNumbers;\n    var ptNumsSet = ptNums.length > 0;\n\n    // When pointsNumbers is set (e.g. histogram's binning),\n    // it is assumed that when the first point of\n    // a bin is selected, all others are as well\n    var ptNumToTest = ptNumsSet ? ptNums[0] : ptNum;\n\n    // TODO potential performance improvement\n    // Primarily we need this function to determine if a click adds\n    // or subtracts from a selection.\n    // In cases `trace.selectedpoints` is a huge array, indexOf\n    // might be slow. One remedy would be to introduce a hash somewhere.\n    return trace.selectedpoints ? trace.selectedpoints.indexOf(ptNumToTest) > -1 : false;\n}\n\nfunction isOnlyThisBinSelected(searchTraces, clickedPtInfo) {\n    var tracesWithSelectedPts = [];\n    var searchInfo, trace, isSameTrace, i;\n\n    for(i = 0; i < searchTraces.length; i++) {\n        searchInfo = searchTraces[i];\n        if(searchInfo.cd[0].trace.selectedpoints && searchInfo.cd[0].trace.selectedpoints.length > 0) {\n            tracesWithSelectedPts.push(searchInfo);\n        }\n    }\n\n    if(tracesWithSelectedPts.length === 1) {\n        isSameTrace = tracesWithSelectedPts[0] === clickedPtInfo.searchInfo;\n        if(isSameTrace) {\n            trace = clickedPtInfo.searchInfo.cd[0].trace;\n            if(trace.selectedpoints.length === clickedPtInfo.pointNumbers.length) {\n                for(i = 0; i < clickedPtInfo.pointNumbers.length; i++) {\n                    if(trace.selectedpoints.indexOf(clickedPtInfo.pointNumbers[i]) < 0) {\n                        return false;\n                    }\n                }\n                return true;\n            }\n        }\n    }\n\n    return false;\n}\n\nfunction isOnlyOnePointSelected(searchTraces) {\n    var len = 0;\n    var searchInfo, trace, i;\n\n    for(i = 0; i < searchTraces.length; i++) {\n        searchInfo = searchTraces[i];\n        trace = searchInfo.cd[0].trace;\n        if(trace.selectedpoints) {\n            if(trace.selectedpoints.length > 1) return false;\n\n            len += trace.selectedpoints.length;\n            if(len > 1) return false;\n        }\n    }\n\n    return len === 1;\n}\n\nfunction updateSelectedState(gd, searchTraces, eventData) {\n    var i, searchInfo, cd, trace;\n\n    // before anything else, update preGUI if necessary\n    for(i = 0; i < searchTraces.length; i++) {\n        var fullInputTrace = searchTraces[i].cd[0].trace._fullInput;\n        var tracePreGUI = gd._fullLayout._tracePreGUI[fullInputTrace.uid] || {};\n        if(tracePreGUI.selectedpoints === undefined) {\n            tracePreGUI.selectedpoints = fullInputTrace._input.selectedpoints || null;\n        }\n    }\n\n    if(eventData) {\n        var pts = eventData.points || [];\n\n        for(i = 0; i < searchTraces.length; i++) {\n            trace = searchTraces[i].cd[0].trace;\n            trace._input.selectedpoints = trace._fullInput.selectedpoints = [];\n            if(trace._fullInput !== trace) trace.selectedpoints = [];\n        }\n\n        for(i = 0; i < pts.length; i++) {\n            var pt = pts[i];\n            var data = pt.data;\n            var fullData = pt.fullData;\n\n            if(pt.pointIndices) {\n                [].push.apply(data.selectedpoints, pt.pointIndices);\n                if(trace._fullInput !== trace) {\n                    [].push.apply(fullData.selectedpoints, pt.pointIndices);\n                }\n            } else {\n                data.selectedpoints.push(pt.pointIndex);\n                if(trace._fullInput !== trace) {\n                    fullData.selectedpoints.push(pt.pointIndex);\n                }\n            }\n        }\n    } else {\n        for(i = 0; i < searchTraces.length; i++) {\n            trace = searchTraces[i].cd[0].trace;\n            delete trace.selectedpoints;\n            delete trace._input.selectedpoints;\n            if(trace._fullInput !== trace) {\n                delete trace._fullInput.selectedpoints;\n            }\n        }\n    }\n\n    var hasRegl = false;\n\n    for(i = 0; i < searchTraces.length; i++) {\n        searchInfo = searchTraces[i];\n        cd = searchInfo.cd;\n        trace = cd[0].trace;\n\n        if(Registry.traceIs(trace, 'regl')) {\n            hasRegl = true;\n        }\n\n        var _module = searchInfo._module;\n        var fn = _module.styleOnSelect || _module.style;\n        if(fn) fn(gd, cd);\n    }\n\n    if(hasRegl) {\n        clearGlCanvases(gd);\n        redrawReglTraces(gd);\n    }\n}\n\nfunction mergePolygons(list, poly, subtract) {\n    var res;\n\n    if(subtract) {\n        res = polybool.difference({\n            regions: list,\n            inverted: false\n        }, {\n            regions: [poly],\n            inverted: false\n        });\n\n        return res.regions;\n    }\n\n    res = polybool.union({\n        regions: list,\n        inverted: false\n    }, {\n        regions: [poly],\n        inverted: false\n    });\n\n    return res.regions;\n}\n\nfunction fillSelectionItem(selection, searchInfo) {\n    if(Array.isArray(selection)) {\n        var cd = searchInfo.cd;\n        var trace = searchInfo.cd[0].trace;\n\n        for(var i = 0; i < selection.length; i++) {\n            selection[i] = makeEventData(selection[i], trace, cd);\n        }\n    }\n\n    return selection;\n}\n\n// until we get around to persistent selections, remove the outline\n// here. The selection itself will be removed when the plot redraws\n// at the end.\nfunction clearSelect(gd) {\n    var fullLayout = gd._fullLayout || {};\n    var zoomlayer = fullLayout._zoomlayer;\n    if(zoomlayer) {\n        zoomlayer.selectAll('.select-outline').remove();\n    }\n}\n\nmodule.exports = {\n    prepSelect: prepSelect,\n    clearSelect: clearSelect,\n    selectOnClick: selectOnClick\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../components/fx/helpers\":615,\"../../lib\":703,\"../../lib/clear_gl_canvases\":688,\"../../lib/polygon\":715,\"../../lib/throttle\":728,\"../../plot_api/subroutines\":742,\"../../registry\":831,\"./axis_ids\":754,\"./constants\":757,\"polybooljs\":468}],769:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar cleanNumber = Lib.cleanNumber;\nvar ms2DateTime = Lib.ms2DateTime;\nvar dateTime2ms = Lib.dateTime2ms;\nvar ensureNumber = Lib.ensureNumber;\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\n\nvar numConstants = _dereq_('../../constants/numerical');\nvar FP_SAFE = numConstants.FP_SAFE;\nvar BADNUM = numConstants.BADNUM;\nvar LOG_CLIP = numConstants.LOG_CLIP;\n\nvar constants = _dereq_('./constants');\nvar axisIds = _dereq_('./axis_ids');\n\nfunction fromLog(v) {\n    return Math.pow(10, v);\n}\n\nfunction isValidCategory(v) {\n    return v !== null && v !== undefined;\n}\n\n/**\n * Define the conversion functions for an axis data is used in 5 ways:\n *\n *  d: data, in whatever form it's provided\n *  c: calcdata: turned into numbers, but not linearized\n *  l: linearized - same as c except for log axes (and other nonlinear\n *      mappings later?) this is used when we need to know if it's\n *      *possible* to show some data on this axis, without caring about\n *      the current range\n *  p: pixel value - mapped to the screen with current size and zoom\n *  r: ranges, tick0, and annotation positions match one of the above\n *     but are handled differently for different types:\n *     - linear and date: data format (d)\n *     - category: calcdata format (c), and will stay that way because\n *       the data format has no continuous mapping\n *     - log: linearized (l) format\n *       TODO: in v2.0 we plan to change it to data format. At that point\n *       shapes will work the same way as ranges, tick0, and annotations\n *       so they can use this conversion too.\n *\n * Creates/updates these conversion functions, and a few more utilities\n * like cleanRange, and makeCalcdata\n *\n * also clears the autotick constraints ._minDtick, ._forceTick0\n */\nmodule.exports = function setConvert(ax, fullLayout) {\n    fullLayout = fullLayout || {};\n\n    var axId = (ax._id || 'x');\n    var axLetter = axId.charAt(0);\n\n    function toLog(v, clip) {\n        if(v > 0) return Math.log(v) / Math.LN10;\n\n        else if(v <= 0 && clip && ax.range && ax.range.length === 2) {\n            // clip NaN (ie past negative infinity) to LOG_CLIP axis\n            // length past the negative edge\n            var r0 = ax.range[0];\n            var r1 = ax.range[1];\n            return 0.5 * (r0 + r1 - 2 * LOG_CLIP * Math.abs(r0 - r1));\n        } else return BADNUM;\n    }\n\n    /*\n     * wrapped dateTime2ms that:\n     * - accepts ms numbers for backward compatibility\n     * - inserts a dummy arg so calendar is the 3rd arg (see notes below).\n     * - defaults to ax.calendar\n     */\n    function dt2ms(v, _, calendar) {\n        // NOTE: Changed this behavior: previously we took any numeric value\n        // to be a ms, even if it was a string that could be a bare year.\n        // Now we convert it as a date if at all possible, and only try\n        // as (local) ms if that fails.\n        var ms = dateTime2ms(v, calendar || ax.calendar);\n        if(ms === BADNUM) {\n            if(isNumeric(v)) {\n                v = +v;\n                // keep track of tenths of ms, that `new Date` will drop\n                // same logic as in Lib.ms2DateTime\n                var msecTenths = Math.floor(Lib.mod(v + 0.05, 1) * 10);\n                var msRounded = Math.round(v - msecTenths / 10);\n                ms = dateTime2ms(new Date(msRounded)) + msecTenths / 10;\n            } else return BADNUM;\n        }\n        return ms;\n    }\n\n    // wrapped ms2DateTime to insert default ax.calendar\n    function ms2dt(v, r, calendar) {\n        return ms2DateTime(v, r, calendar || ax.calendar);\n    }\n\n    function getCategoryName(v) {\n        return ax._categories[Math.round(v)];\n    }\n\n    /*\n     * setCategoryIndex: return the index of category v,\n     * inserting it in the list if it's not already there\n     *\n     * this will enter the categories in the order it\n     * encounters them, ie all the categories from the\n     * first data set, then all the ones from the second\n     * that aren't in the first etc.\n     *\n     * it is assumed that this function is being invoked in the\n     * already sorted category order; otherwise there would be\n     * a disconnect between the array and the index returned\n     */\n    function setCategoryIndex(v) {\n        if(isValidCategory(v)) {\n            if(ax._categoriesMap === undefined) {\n                ax._categoriesMap = {};\n            }\n\n            if(ax._categoriesMap[v] !== undefined) {\n                return ax._categoriesMap[v];\n            } else {\n                ax._categories.push(typeof v === 'number' ? String(v) : v);\n\n                var curLength = ax._categories.length - 1;\n                ax._categoriesMap[v] = curLength;\n\n                return curLength;\n            }\n        }\n        return BADNUM;\n    }\n\n    function setMultiCategoryIndex(arrayIn, len) {\n        var arrayOut = new Array(len);\n\n        for(var i = 0; i < len; i++) {\n            var v0 = (arrayIn[0] || [])[i];\n            var v1 = (arrayIn[1] || [])[i];\n            arrayOut[i] = getCategoryIndex([v0, v1]);\n        }\n\n        return arrayOut;\n    }\n\n    function getCategoryIndex(v) {\n        if(ax._categoriesMap) {\n            return ax._categoriesMap[v];\n        }\n    }\n\n    function getCategoryPosition(v) {\n        // d2l/d2c variant that that won't add categories but will also\n        // allow numbers to be mapped to the linearized axis positions\n        var index = getCategoryIndex(v);\n        if(index !== undefined) return index;\n        if(isNumeric(v)) return +v;\n    }\n\n    function l2p(v) {\n        if(!isNumeric(v)) return BADNUM;\n\n        // include 2 fractional digits on pixel, for PDF zooming etc\n        return d3.round(ax._b + ax._m * v, 2);\n    }\n\n    function p2l(px) { return (px - ax._b) / ax._m; }\n\n    // conversions among c/l/p are fairly simple - do them together for all axis types\n    ax.c2l = (ax.type === 'log') ? toLog : ensureNumber;\n    ax.l2c = (ax.type === 'log') ? fromLog : ensureNumber;\n\n    ax.l2p = l2p;\n    ax.p2l = p2l;\n\n    ax.c2p = (ax.type === 'log') ? function(v, clip) { return l2p(toLog(v, clip)); } : l2p;\n    ax.p2c = (ax.type === 'log') ? function(px) { return fromLog(p2l(px)); } : p2l;\n\n    /*\n     * now type-specific conversions for **ALL** other combinations\n     * they're all written out, instead of being combinations of each other, for\n     * both clarity and speed.\n     */\n    if(['linear', '-'].indexOf(ax.type) !== -1) {\n        // all are data vals, but d and r need cleaning\n        ax.d2r = ax.r2d = ax.d2c = ax.r2c = ax.d2l = ax.r2l = cleanNumber;\n        ax.c2d = ax.c2r = ax.l2d = ax.l2r = ensureNumber;\n\n        ax.d2p = ax.r2p = function(v) { return ax.l2p(cleanNumber(v)); };\n        ax.p2d = ax.p2r = p2l;\n\n        ax.cleanPos = ensureNumber;\n    } else if(ax.type === 'log') {\n        // d and c are data vals, r and l are logged (but d and r need cleaning)\n        ax.d2r = ax.d2l = function(v, clip) { return toLog(cleanNumber(v), clip); };\n        ax.r2d = ax.r2c = function(v) { return fromLog(cleanNumber(v)); };\n\n        ax.d2c = ax.r2l = cleanNumber;\n        ax.c2d = ax.l2r = ensureNumber;\n\n        ax.c2r = toLog;\n        ax.l2d = fromLog;\n\n        ax.d2p = function(v, clip) { return ax.l2p(ax.d2r(v, clip)); };\n        ax.p2d = function(px) { return fromLog(p2l(px)); };\n\n        ax.r2p = function(v) { return ax.l2p(cleanNumber(v)); };\n        ax.p2r = p2l;\n\n        ax.cleanPos = ensureNumber;\n    } else if(ax.type === 'date') {\n        // r and d are date strings, l and c are ms\n\n        /*\n         * Any of these functions with r and d on either side, calendar is the\n         * **3rd** argument. log has reserved the second argument.\n         *\n         * Unless you need the special behavior of the second arg (ms2DateTime\n         * uses this to limit precision, toLog uses true to clip negatives\n         * to offscreen low rather than undefined), it's safe to pass 0.\n         */\n        ax.d2r = ax.r2d = Lib.identity;\n\n        ax.d2c = ax.r2c = ax.d2l = ax.r2l = dt2ms;\n        ax.c2d = ax.c2r = ax.l2d = ax.l2r = ms2dt;\n\n        ax.d2p = ax.r2p = function(v, _, calendar) { return ax.l2p(dt2ms(v, 0, calendar)); };\n        ax.p2d = ax.p2r = function(px, r, calendar) { return ms2dt(p2l(px), r, calendar); };\n\n        ax.cleanPos = function(v) { return Lib.cleanDate(v, BADNUM, ax.calendar); };\n    } else if(ax.type === 'category') {\n        // d is categories (string)\n        // c and l are indices (numbers)\n        // r is categories or numbers\n\n        ax.d2c = ax.d2l = setCategoryIndex;\n        ax.r2d = ax.c2d = ax.l2d = getCategoryName;\n\n        ax.d2r = ax.d2l_noadd = getCategoryPosition;\n\n        ax.r2c = function(v) {\n            var index = getCategoryPosition(v);\n            return index !== undefined ? index : ax.fraction2r(0.5);\n        };\n\n        ax.l2r = ax.c2r = ensureNumber;\n        ax.r2l = getCategoryPosition;\n\n        ax.d2p = function(v) { return ax.l2p(ax.r2c(v)); };\n        ax.p2d = function(px) { return getCategoryName(p2l(px)); };\n        ax.r2p = ax.d2p;\n        ax.p2r = p2l;\n\n        ax.cleanPos = function(v) {\n            if(typeof v === 'string' && v !== '') return v;\n            return ensureNumber(v);\n        };\n    } else if(ax.type === 'multicategory') {\n        // N.B. multicategory axes don't define d2c and d2l,\n        // as 'data-to-calcdata' conversion needs to take into\n        // account all data array items as in ax.makeCalcdata.\n\n        ax.r2d = ax.c2d = ax.l2d = getCategoryName;\n        ax.d2r = ax.d2l_noadd = getCategoryPosition;\n\n        ax.r2c = function(v) {\n            var index = getCategoryPosition(v);\n            return index !== undefined ? index : ax.fraction2r(0.5);\n        };\n\n        ax.r2c_just_indices = getCategoryIndex;\n\n        ax.l2r = ax.c2r = ensureNumber;\n        ax.r2l = getCategoryPosition;\n\n        ax.d2p = function(v) { return ax.l2p(ax.r2c(v)); };\n        ax.p2d = function(px) { return getCategoryName(p2l(px)); };\n        ax.r2p = ax.d2p;\n        ax.p2r = p2l;\n\n        ax.cleanPos = function(v) {\n            if(Array.isArray(v) || (typeof v === 'string' && v !== '')) return v;\n            return ensureNumber(v);\n        };\n\n        ax.setupMultiCategory = function(fullData) {\n            var traceIndices = ax._traceIndices;\n            var i, j;\n\n            var matchGroups = fullLayout._axisMatchGroups;\n            if(matchGroups && matchGroups.length && ax._categories.length === 0) {\n                for(i = 0; i < matchGroups.length; i++) {\n                    var group = matchGroups[i];\n                    if(group[axId]) {\n                        for(var axId2 in group) {\n                            if(axId2 !== axId) {\n                                var ax2 = fullLayout[axisIds.id2name(axId2)];\n                                traceIndices = traceIndices.concat(ax2._traceIndices);\n                            }\n                        }\n                    }\n                }\n            }\n\n            // [ [cnt, {$cat: index}], for 1,2 ]\n            var seen = [[0, {}], [0, {}]];\n            // [ [arrayIn[0][i], arrayIn[1][i]], for i .. N ]\n            var list = [];\n\n            for(i = 0; i < traceIndices.length; i++) {\n                var trace = fullData[traceIndices[i]];\n\n                if(axLetter in trace) {\n                    var arrayIn = trace[axLetter];\n                    var len = trace._length || Lib.minRowLength(arrayIn);\n\n                    if(isArrayOrTypedArray(arrayIn[0]) && isArrayOrTypedArray(arrayIn[1])) {\n                        for(j = 0; j < len; j++) {\n                            var v0 = arrayIn[0][j];\n                            var v1 = arrayIn[1][j];\n\n                            if(isValidCategory(v0) && isValidCategory(v1)) {\n                                list.push([v0, v1]);\n\n                                if(!(v0 in seen[0][1])) {\n                                    seen[0][1][v0] = seen[0][0]++;\n                                }\n                                if(!(v1 in seen[1][1])) {\n                                    seen[1][1][v1] = seen[1][0]++;\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n\n            list.sort(function(a, b) {\n                var ind0 = seen[0][1];\n                var d = ind0[a[0]] - ind0[b[0]];\n                if(d) return d;\n\n                var ind1 = seen[1][1];\n                return ind1[a[1]] - ind1[b[1]];\n            });\n\n            for(i = 0; i < list.length; i++) {\n                setCategoryIndex(list[i]);\n            }\n        };\n    }\n\n    // find the range value at the specified (linear) fraction of the axis\n    ax.fraction2r = function(v) {\n        var rl0 = ax.r2l(ax.range[0]);\n        var rl1 = ax.r2l(ax.range[1]);\n        return ax.l2r(rl0 + v * (rl1 - rl0));\n    };\n\n    // find the fraction of the range at the specified range value\n    ax.r2fraction = function(v) {\n        var rl0 = ax.r2l(ax.range[0]);\n        var rl1 = ax.r2l(ax.range[1]);\n        return (ax.r2l(v) - rl0) / (rl1 - rl0);\n    };\n\n    /*\n     * cleanRange: make sure range is a couplet of valid & distinct values\n     * keep numbers away from the limits of floating point numbers,\n     * and dates away from the ends of our date system (+/- 9999 years)\n     *\n     * optional param rangeAttr: operate on a different attribute, like\n     * ax._r, rather than ax.range\n     */\n    ax.cleanRange = function(rangeAttr, opts) {\n        if(!opts) opts = {};\n        if(!rangeAttr) rangeAttr = 'range';\n\n        var range = Lib.nestedProperty(ax, rangeAttr).get();\n        var i, dflt;\n\n        if(ax.type === 'date') dflt = Lib.dfltRange(ax.calendar);\n        else if(axLetter === 'y') dflt = constants.DFLTRANGEY;\n        else dflt = opts.dfltRange || constants.DFLTRANGEX;\n\n        // make sure we don't later mutate the defaults\n        dflt = dflt.slice();\n\n        if(!range || range.length !== 2) {\n            Lib.nestedProperty(ax, rangeAttr).set(dflt);\n            return;\n        }\n\n        if(ax.type === 'date' && !ax.autorange) {\n            // check if milliseconds or js date objects are provided for range\n            // and convert to date strings\n            range[0] = Lib.cleanDate(range[0], BADNUM, ax.calendar);\n            range[1] = Lib.cleanDate(range[1], BADNUM, ax.calendar);\n        }\n\n        for(i = 0; i < 2; i++) {\n            if(ax.type === 'date') {\n                if(!Lib.isDateTime(range[i], ax.calendar)) {\n                    ax[rangeAttr] = dflt;\n                    break;\n                }\n\n                if(ax.r2l(range[0]) === ax.r2l(range[1])) {\n                    // split by +/- 1 second\n                    var linCenter = Lib.constrain(ax.r2l(range[0]),\n                        Lib.MIN_MS + 1000, Lib.MAX_MS - 1000);\n                    range[0] = ax.l2r(linCenter - 1000);\n                    range[1] = ax.l2r(linCenter + 1000);\n                    break;\n                }\n            } else {\n                if(!isNumeric(range[i])) {\n                    if(isNumeric(range[1 - i])) {\n                        range[i] = range[1 - i] * (i ? 10 : 0.1);\n                    } else {\n                        ax[rangeAttr] = dflt;\n                        break;\n                    }\n                }\n\n                if(range[i] < -FP_SAFE) range[i] = -FP_SAFE;\n                else if(range[i] > FP_SAFE) range[i] = FP_SAFE;\n\n                if(range[0] === range[1]) {\n                    // somewhat arbitrary: split by 1 or 1ppm, whichever is bigger\n                    var inc = Math.max(1, Math.abs(range[0] * 1e-6));\n                    range[0] -= inc;\n                    range[1] += inc;\n                }\n            }\n        }\n    };\n\n    // set scaling to pixels\n    ax.setScale = function(usePrivateRange) {\n        var gs = fullLayout._size;\n\n        // make sure we have a domain (pull it in from the axis\n        // this one is overlaying if necessary)\n        if(ax.overlaying) {\n            var ax2 = axisIds.getFromId({ _fullLayout: fullLayout }, ax.overlaying);\n            ax.domain = ax2.domain;\n        }\n\n        // While transitions are occuring, occurring, we get a double-transform\n        // issue if we transform the drawn layer *and* use the new axis range to\n        // draw the data. This allows us to construct setConvert using the pre-\n        // interaction values of the range:\n        var rangeAttr = (usePrivateRange && ax._r) ? '_r' : 'range';\n        var calendar = ax.calendar;\n        ax.cleanRange(rangeAttr);\n\n        var rl0 = ax.r2l(ax[rangeAttr][0], calendar);\n        var rl1 = ax.r2l(ax[rangeAttr][1], calendar);\n\n        if(axLetter === 'y') {\n            ax._offset = gs.t + (1 - ax.domain[1]) * gs.h;\n            ax._length = gs.h * (ax.domain[1] - ax.domain[0]);\n            ax._m = ax._length / (rl0 - rl1);\n            ax._b = -ax._m * rl1;\n        } else {\n            ax._offset = gs.l + ax.domain[0] * gs.w;\n            ax._length = gs.w * (ax.domain[1] - ax.domain[0]);\n            ax._m = ax._length / (rl1 - rl0);\n            ax._b = -ax._m * rl0;\n        }\n\n        if(!isFinite(ax._m) || !isFinite(ax._b) || ax._length < 0) {\n            fullLayout._replotting = false;\n            throw new Error('Something went wrong with axis scaling');\n        }\n    };\n\n    // makeCalcdata: takes an x or y array and converts it\n    // to a position on the axis object \"ax\"\n    // inputs:\n    //      trace - a data object from gd.data\n    //      axLetter - a string, either 'x' or 'y', for which item\n    //          to convert (TODO: is this now always the same as\n    //          the first letter of ax._id?)\n    // in case the expected data isn't there, make a list of\n    // integers based on the opposite data\n    ax.makeCalcdata = function(trace, axLetter) {\n        var arrayIn, arrayOut, i, len;\n\n        var axType = ax.type;\n        var cal = axType === 'date' && trace[axLetter + 'calendar'];\n\n        if(axLetter in trace) {\n            arrayIn = trace[axLetter];\n            len = trace._length || Lib.minRowLength(arrayIn);\n\n            if(Lib.isTypedArray(arrayIn) && (axType === 'linear' || axType === 'log')) {\n                if(len === arrayIn.length) {\n                    return arrayIn;\n                } else if(arrayIn.subarray) {\n                    return arrayIn.subarray(0, len);\n                }\n            }\n\n            if(axType === 'multicategory') {\n                return setMultiCategoryIndex(arrayIn, len);\n            }\n\n            arrayOut = new Array(len);\n            for(i = 0; i < len; i++) {\n                arrayOut[i] = ax.d2c(arrayIn[i], 0, cal);\n            }\n        } else {\n            var v0 = ((axLetter + '0') in trace) ? ax.d2c(trace[axLetter + '0'], 0, cal) : 0;\n            var dv = (trace['d' + axLetter]) ? Number(trace['d' + axLetter]) : 1;\n\n            // the opposing data, for size if we have x and dx etc\n            arrayIn = trace[{x: 'y', y: 'x'}[axLetter]];\n            len = trace._length || arrayIn.length;\n            arrayOut = new Array(len);\n\n            for(i = 0; i < len; i++) {\n                arrayOut[i] = v0 + i * dv;\n            }\n        }\n\n        return arrayOut;\n    };\n\n    ax.isValidRange = function(range) {\n        return (\n            Array.isArray(range) &&\n            range.length === 2 &&\n            isNumeric(ax.r2l(range[0])) &&\n            isNumeric(ax.r2l(range[1]))\n        );\n    };\n\n    ax.isPtWithinRange = function(d, calendar) {\n        var coord = ax.c2l(d[axLetter], null, calendar);\n        var r0 = ax.r2l(ax.range[0]);\n        var r1 = ax.r2l(ax.range[1]);\n\n        if(r0 < r1) {\n            return r0 <= coord && coord <= r1;\n        } else {\n            // Reversed axis case.\n            return r1 <= coord && coord <= r0;\n        }\n    };\n\n    // should skip if not category nor multicategory\n    ax.clearCalc = function() {\n        var emptyCategories = function() {\n            ax._categories = [];\n            ax._categoriesMap = {};\n        };\n\n        var matchGroups = fullLayout._axisMatchGroups;\n\n        if(matchGroups && matchGroups.length) {\n            var found = false;\n\n            for(var i = 0; i < matchGroups.length; i++) {\n                var group = matchGroups[i];\n\n                if(group[axId]) {\n                    found = true;\n                    var categories = null;\n                    var categoriesMap = null;\n\n                    for(var axId2 in group) {\n                        var ax2 = fullLayout[axisIds.id2name(axId2)];\n                        if(ax2._categories) {\n                            categories = ax2._categories;\n                            categoriesMap = ax2._categoriesMap;\n                            break;\n                        }\n                    }\n\n                    if(categories && categoriesMap) {\n                        ax._categories = categories;\n                        ax._categoriesMap = categoriesMap;\n                    } else {\n                        emptyCategories();\n                    }\n                    break;\n                }\n            }\n            if(!found) emptyCategories();\n        } else {\n            emptyCategories();\n        }\n\n        if(ax._initialCategories) {\n            for(var j = 0; j < ax._initialCategories.length; j++) {\n                setCategoryIndex(ax._initialCategories[j]);\n            }\n        }\n    };\n\n    // sort the axis (and all the matching ones) by _initialCategories\n    // returns the indices of the traces affected by the reordering\n    ax.sortByInitialCategories = function() {\n        var affectedTraces = [];\n        var emptyCategories = function() {\n            ax._categories = [];\n            ax._categoriesMap = {};\n        };\n\n        emptyCategories();\n\n        if(ax._initialCategories) {\n            for(var j = 0; j < ax._initialCategories.length; j++) {\n                setCategoryIndex(ax._initialCategories[j]);\n            }\n        }\n\n        affectedTraces = affectedTraces.concat(ax._traceIndices);\n\n        // Propagate to matching axes\n        var group = ax._matchGroup;\n        for(var axId2 in group) {\n            if(axId === axId2) continue;\n            var ax2 = fullLayout[axisIds.id2name(axId2)];\n            ax2._categories = ax._categories;\n            ax2._categoriesMap = ax._categoriesMap;\n            affectedTraces = affectedTraces.concat(ax2._traceIndices);\n        }\n        return affectedTraces;\n    };\n\n    // Propagate localization into the axis so that\n    // methods in Axes can use it w/o having to pass fullLayout\n    // Default (non-d3) number formatting uses separators directly\n    // dates and d3-formatted numbers use the d3 locale\n    // Fall back on default format for dummy axes that don't care about formatting\n    var locale = fullLayout._d3locale;\n    if(ax.type === 'date') {\n        ax._dateFormat = locale ? locale.timeFormat.utc : d3.time.format.utc;\n        ax._extraFormat = fullLayout._extraFormat;\n    }\n    // occasionally we need _numFormat to pass through\n    // even though it won't be needed by this axis\n    ax._separators = fullLayout.separators;\n    ax._numFormat = locale ? locale.numberFormat : d3.format;\n\n    // and for bar charts and box plots: reset forced minimum tick spacing\n    delete ax._minDtick;\n    delete ax._forceTick0;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"./axis_ids\":754,\"./constants\":757,\"d3\":157,\"fast-isnumeric\":224}],770:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar handleArrayContainerDefaults = _dereq_('../array_container_defaults');\n\nmodule.exports = function handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options, config) {\n    if(!config || config.pass === 1) {\n        handlePrefixSuffix(containerIn, containerOut, coerce, axType, options);\n    }\n\n    if(!config || config.pass === 2) {\n        handleOtherDefaults(containerIn, containerOut, coerce, axType, options);\n    }\n};\n\nfunction handlePrefixSuffix(containerIn, containerOut, coerce, axType, options) {\n    var showAttrDflt = getShowAttrDflt(containerIn);\n\n    var tickPrefix = coerce('tickprefix');\n    if(tickPrefix) coerce('showtickprefix', showAttrDflt);\n\n    var tickSuffix = coerce('ticksuffix', options.tickSuffixDflt);\n    if(tickSuffix) coerce('showticksuffix', showAttrDflt);\n}\n\nfunction handleOtherDefaults(containerIn, containerOut, coerce, axType, options) {\n    var showAttrDflt = getShowAttrDflt(containerIn);\n\n    var tickPrefix = coerce('tickprefix');\n    if(tickPrefix) coerce('showtickprefix', showAttrDflt);\n\n    var tickSuffix = coerce('ticksuffix', options.tickSuffixDflt);\n    if(tickSuffix) coerce('showticksuffix', showAttrDflt);\n\n    var showTickLabels = coerce('showticklabels');\n    if(showTickLabels) {\n        var font = options.font || {};\n        var contColor = containerOut.color;\n        // as with titlefont.color, inherit axis.color only if one was\n        // explicitly provided\n        var dfltFontColor = (contColor && contColor !== layoutAttributes.color.dflt) ?\n            contColor : font.color;\n        Lib.coerceFont(coerce, 'tickfont', {\n            family: font.family,\n            size: font.size,\n            color: dfltFontColor\n        });\n        coerce('tickangle');\n\n        if(axType !== 'category') {\n            var tickFormat = coerce('tickformat');\n            var tickformatStops = containerIn.tickformatstops;\n            if(Array.isArray(tickformatStops) && tickformatStops.length) {\n                handleArrayContainerDefaults(containerIn, containerOut, {\n                    name: 'tickformatstops',\n                    inclusionAttr: 'enabled',\n                    handleItemDefaults: tickformatstopDefaults\n                });\n            }\n            if(!tickFormat && axType !== 'date') {\n                coerce('showexponent', showAttrDflt);\n                coerce('exponentformat');\n                coerce('separatethousands');\n            }\n        }\n    }\n}\n\n/*\n * Attributes 'showexponent', 'showtickprefix' and 'showticksuffix'\n * share values.\n *\n * If only 1 attribute is set,\n * the remaining attributes inherit that value.\n *\n * If 2 attributes are set to the same value,\n * the remaining attribute inherits that value.\n *\n * If 2 attributes are set to different values,\n * the remaining is set to its dflt value.\n *\n */\nfunction getShowAttrDflt(containerIn) {\n    var showAttrsAll = ['showexponent', 'showtickprefix', 'showticksuffix'];\n    var showAttrs = showAttrsAll.filter(function(a) {\n        return containerIn[a] !== undefined;\n    });\n    var sameVal = function(a) {\n        return containerIn[a] === containerIn[showAttrs[0]];\n    };\n\n    if(showAttrs.every(sameVal) || showAttrs.length === 1) {\n        return containerIn[showAttrs[0]];\n    }\n}\n\nfunction tickformatstopDefaults(valueIn, valueOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(valueIn, valueOut, layoutAttributes.tickformatstops, attr, dflt);\n    }\n\n    var enabled = coerce('enabled');\n    if(enabled) {\n        coerce('dtickrange');\n        coerce('value');\n    }\n}\n\n},{\"../../lib\":703,\"../array_container_defaults\":747,\"./layout_attributes\":763}],771:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\n\n\n/**\n * options: inherits outerTicks from axes.handleAxisDefaults\n */\nmodule.exports = function handleTickDefaults(containerIn, containerOut, coerce, options) {\n    var tickLen = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'ticklen');\n    var tickWidth = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'tickwidth');\n    var tickColor = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'tickcolor', containerOut.color);\n    var showTicks = coerce('ticks', (options.outerTicks || tickLen || tickWidth || tickColor) ? 'outside' : '');\n\n    if(!showTicks) {\n        delete containerOut.ticklen;\n        delete containerOut.tickwidth;\n        delete containerOut.tickcolor;\n    }\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":763}],772:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar cleanTicks = _dereq_('./clean_ticks');\n\nmodule.exports = function handleTickValueDefaults(containerIn, containerOut, coerce, axType) {\n    var tickmode;\n\n    if(containerIn.tickmode === 'array' &&\n            (axType === 'log' || axType === 'date')) {\n        tickmode = containerOut.tickmode = 'auto';\n    } else {\n        var tickmodeDefault = Array.isArray(containerIn.tickvals) ? 'array' :\n            containerIn.dtick ? 'linear' :\n            'auto';\n        tickmode = coerce('tickmode', tickmodeDefault);\n    }\n\n    if(tickmode === 'auto') coerce('nticks');\n    else if(tickmode === 'linear') {\n        // dtick is usually a positive number, but there are some\n        // special strings available for log or date axes\n        // tick0 also has special logic\n        var dtick = containerOut.dtick = cleanTicks.dtick(\n            containerIn.dtick, axType);\n        containerOut.tick0 = cleanTicks.tick0(\n            containerIn.tick0, axType, containerOut.calendar, dtick);\n    } else if(axType !== 'multicategory') {\n        var tickvals = coerce('tickvals');\n        if(tickvals === undefined) containerOut.tickmode = 'auto';\n        else coerce('ticktext');\n    }\n};\n\n},{\"./clean_ticks\":756}],773:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Drawing = _dereq_('../../components/drawing');\nvar Axes = _dereq_('./axes');\n\n/**\n * transitionAxes\n *\n * transition axes from one set of ranges to another, using a svg\n * transformations, similar to during panning.\n *\n * @param {DOM element | object} gd\n * @param {array} edits : array of 'edits', each item with\n * - plotinfo {object} subplot object\n * - xr0 {array} initial x-range\n * - xr1 {array} end x-range\n * - yr0 {array} initial y-range\n * - yr1 {array} end y-range\n * @param {object} transitionOpts\n * @param {function} makeOnCompleteCallback\n */\nmodule.exports = function transitionAxes(gd, edits, transitionOpts, makeOnCompleteCallback) {\n    var fullLayout = gd._fullLayout;\n\n    // special case for redraw:false Plotly.animate that relies on this\n    // to update axis-referenced layout components\n    if(edits.length === 0) {\n        Axes.redrawComponents(gd);\n        return;\n    }\n\n    function unsetSubplotTransform(subplot) {\n        var xa = subplot.xaxis;\n        var ya = subplot.yaxis;\n\n        fullLayout._defs.select('#' + subplot.clipId + '> rect')\n            .call(Drawing.setTranslate, 0, 0)\n            .call(Drawing.setScale, 1, 1);\n\n        subplot.plot\n            .call(Drawing.setTranslate, xa._offset, ya._offset)\n            .call(Drawing.setScale, 1, 1);\n\n        var traceGroups = subplot.plot.selectAll('.scatterlayer .trace');\n\n        // This is specifically directed at scatter traces, applying an inverse\n        // scale to individual points to counteract the scale of the trace\n        // as a whole:\n        traceGroups.selectAll('.point')\n            .call(Drawing.setPointGroupScale, 1, 1);\n        traceGroups.selectAll('.textpoint')\n            .call(Drawing.setTextPointsScale, 1, 1);\n        traceGroups\n            .call(Drawing.hideOutsideRangePoints, subplot);\n    }\n\n    function updateSubplot(edit, progress) {\n        var plotinfo = edit.plotinfo;\n        var xa = plotinfo.xaxis;\n        var ya = plotinfo.yaxis;\n\n        var xr0 = edit.xr0;\n        var xr1 = edit.xr1;\n        var xlen = xa._length;\n        var yr0 = edit.yr0;\n        var yr1 = edit.yr1;\n        var ylen = ya._length;\n\n        var editX = !!xr1;\n        var editY = !!yr1;\n        var viewBox = [];\n\n        if(editX) {\n            var dx0 = xr0[1] - xr0[0];\n            var dx1 = xr1[1] - xr1[0];\n            viewBox[0] = (xr0[0] * (1 - progress) + progress * xr1[0] - xr0[0]) / (xr0[1] - xr0[0]) * xlen;\n            viewBox[2] = xlen * ((1 - progress) + progress * dx1 / dx0);\n            xa.range[0] = xr0[0] * (1 - progress) + progress * xr1[0];\n            xa.range[1] = xr0[1] * (1 - progress) + progress * xr1[1];\n        } else {\n            viewBox[0] = 0;\n            viewBox[2] = xlen;\n        }\n\n        if(editY) {\n            var dy0 = yr0[1] - yr0[0];\n            var dy1 = yr1[1] - yr1[0];\n            viewBox[1] = (yr0[1] * (1 - progress) + progress * yr1[1] - yr0[1]) / (yr0[0] - yr0[1]) * ylen;\n            viewBox[3] = ylen * ((1 - progress) + progress * dy1 / dy0);\n            ya.range[0] = yr0[0] * (1 - progress) + progress * yr1[0];\n            ya.range[1] = yr0[1] * (1 - progress) + progress * yr1[1];\n        } else {\n            viewBox[1] = 0;\n            viewBox[3] = ylen;\n        }\n\n        Axes.drawOne(gd, xa, {skipTitle: true});\n        Axes.drawOne(gd, ya, {skipTitle: true});\n        Axes.redrawComponents(gd, [xa._id, ya._id]);\n\n        var xScaleFactor = editX ? xlen / viewBox[2] : 1;\n        var yScaleFactor = editY ? ylen / viewBox[3] : 1;\n        var clipDx = editX ? viewBox[0] : 0;\n        var clipDy = editY ? viewBox[1] : 0;\n        var fracDx = editX ? (viewBox[0] / viewBox[2] * xlen) : 0;\n        var fracDy = editY ? (viewBox[1] / viewBox[3] * ylen) : 0;\n        var plotDx = xa._offset - fracDx;\n        var plotDy = ya._offset - fracDy;\n\n        plotinfo.clipRect\n            .call(Drawing.setTranslate, clipDx, clipDy)\n            .call(Drawing.setScale, 1 / xScaleFactor, 1 / yScaleFactor);\n\n        plotinfo.plot\n            .call(Drawing.setTranslate, plotDx, plotDy)\n            .call(Drawing.setScale, xScaleFactor, yScaleFactor);\n\n        // apply an inverse scale to individual points to counteract\n        // the scale of the trace group.\n        Drawing.setPointGroupScale(plotinfo.zoomScalePts, 1 / xScaleFactor, 1 / yScaleFactor);\n        Drawing.setTextPointsScale(plotinfo.zoomScaleTxt, 1 / xScaleFactor, 1 / yScaleFactor);\n    }\n\n    var onComplete;\n    if(makeOnCompleteCallback) {\n        // This module makes the choice whether or not it notifies Plotly.transition\n        // about completion:\n        onComplete = makeOnCompleteCallback();\n    }\n\n    function transitionComplete() {\n        var aobj = {};\n\n        for(var i = 0; i < edits.length; i++) {\n            var edit = edits[i];\n            if(edit.xr1) aobj[edit.plotinfo.xaxis._name + '.range'] = edit.xr1.slice();\n            if(edit.yr1) aobj[edit.plotinfo.yaxis._name + '.range'] = edit.yr1.slice();\n        }\n\n        // Signal that this transition has completed:\n        onComplete && onComplete();\n\n        return Registry.call('relayout', gd, aobj).then(function() {\n            for(var i = 0; i < edits.length; i++) {\n                unsetSubplotTransform(edits[i].plotinfo);\n            }\n        });\n    }\n\n    function transitionInterrupt() {\n        var aobj = {};\n\n        for(var i = 0; i < edits.length; i++) {\n            var edit = edits[i];\n            if(edit.xr0) aobj[edit.plotinfo.xaxis._name + '.range'] = edit.xr0.slice();\n            if(edit.yr0) aobj[edit.plotinfo.yaxis._name + '.range'] = edit.yr0.slice();\n        }\n\n        return Registry.call('relayout', gd, aobj).then(function() {\n            for(var i = 0; i < edits.length; i++) {\n                unsetSubplotTransform(edits[i].plotinfo);\n            }\n        });\n    }\n\n    var t1, t2, raf;\n    var easeFn = d3.ease(transitionOpts.easing);\n\n    gd._transitionData._interruptCallbacks.push(function() {\n        window.cancelAnimationFrame(raf);\n        raf = null;\n        return transitionInterrupt();\n    });\n\n    function doFrame() {\n        t2 = Date.now();\n\n        var tInterp = Math.min(1, (t2 - t1) / transitionOpts.duration);\n        var progress = easeFn(tInterp);\n\n        for(var i = 0; i < edits.length; i++) {\n            updateSubplot(edits[i], progress);\n        }\n\n        if(t2 - t1 > transitionOpts.duration) {\n            transitionComplete();\n            raf = window.cancelAnimationFrame(doFrame);\n        } else {\n            raf = window.requestAnimationFrame(doFrame);\n        }\n    }\n\n    t1 = Date.now();\n    raf = window.requestAnimationFrame(doFrame);\n\n    return Promise.resolve();\n};\n\n},{\"../../components/drawing\":601,\"../../registry\":831,\"./axes\":751,\"d3\":157}],774:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar traceIs = _dereq_('../../registry').traceIs;\nvar autoType = _dereq_('./axis_autotype');\n\n/*\n *  data: the plot data to use in choosing auto type\n *  name: axis object name (ie 'xaxis') if one should be stored\n */\nmodule.exports = function handleTypeDefaults(containerIn, containerOut, coerce, options) {\n    var axType = coerce('type', (options.splomStash || {}).type);\n\n    if(axType === '-') {\n        setAutoType(containerOut, options.data);\n\n        if(containerOut.type === '-') {\n            containerOut.type = 'linear';\n        } else {\n            // copy autoType back to input axis\n            // note that if this object didn't exist\n            // in the input layout, we have to put it in\n            // this happens in the main supplyDefaults function\n            containerIn.type = containerOut.type;\n        }\n    }\n};\n\nfunction setAutoType(ax, data) {\n    // new logic: let people specify any type they want,\n    // only autotype if type is '-'\n    if(ax.type !== '-') return;\n\n    var id = ax._id;\n    var axLetter = id.charAt(0);\n\n    // support 3d\n    if(id.indexOf('scene') !== -1) id = axLetter;\n\n    var d0 = getFirstNonEmptyTrace(data, id, axLetter);\n    if(!d0) return;\n\n    // first check for histograms, as the count direction\n    // should always default to a linear axis\n    if(d0.type === 'histogram' &&\n            axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) {\n        ax.type = 'linear';\n        return;\n    }\n\n    var calAttr = axLetter + 'calendar';\n    var calendar = d0[calAttr];\n    var opts = {noMultiCategory: !traceIs(d0, 'cartesian') || traceIs(d0, 'noMultiCategory')};\n    var i;\n\n    // check all boxes on this x axis to see\n    // if they're dates, numbers, or categories\n    if(isBoxWithoutPositionCoords(d0, axLetter)) {\n        var posLetter = getBoxPosLetter(d0);\n        var boxPositions = [];\n\n        for(i = 0; i < data.length; i++) {\n            var trace = data[i];\n            if(!traceIs(trace, 'box-violin') || (trace[axLetter + 'axis'] || axLetter) !== id) continue;\n\n            if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]);\n            else if(trace.name !== undefined) boxPositions.push(trace.name);\n            else boxPositions.push('text');\n\n            if(trace[calAttr] !== calendar) calendar = undefined;\n        }\n\n        ax.type = autoType(boxPositions, calendar, opts);\n    } else if(d0.type === 'splom') {\n        var dimensions = d0.dimensions;\n        var dim = dimensions[d0._axesDim[id]];\n        if(dim.visible) ax.type = autoType(dim.values, calendar, opts);\n    } else {\n        ax.type = autoType(d0[axLetter] || [d0[axLetter + '0']], calendar, opts);\n    }\n}\n\nfunction getFirstNonEmptyTrace(data, id, axLetter) {\n    for(var i = 0; i < data.length; i++) {\n        var trace = data[i];\n\n        if(trace.type === 'splom' &&\n                trace._length > 0 &&\n                (trace['_' + axLetter + 'axes'] || {})[id]\n        ) {\n            return trace;\n        }\n\n        if((trace[axLetter + 'axis'] || axLetter) === id) {\n            if(isBoxWithoutPositionCoords(trace, axLetter)) {\n                return trace;\n            } else if((trace[axLetter] || []).length || trace[axLetter + '0']) {\n                return trace;\n            }\n        }\n    }\n}\n\nfunction getBoxPosLetter(trace) {\n    return {v: 'x', h: 'y'}[trace.orientation || 'v'];\n}\n\nfunction isBoxWithoutPositionCoords(trace, axLetter) {\n    var posLetter = getBoxPosLetter(trace);\n    var isBox = traceIs(trace, 'box-violin');\n    var isCandlestick = traceIs(trace._fullInput || {}, 'candlestick');\n\n    return (\n        isBox &&\n        !isCandlestick &&\n        axLetter === posLetter &&\n        trace[posLetter] === undefined &&\n        trace[posLetter + '0'] === undefined\n    );\n}\n\n},{\"../../registry\":831,\"./axis_autotype\":752}],775:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\nvar Lib = _dereq_('../lib');\n\n/*\n * Create or update an observer. This function is designed to be\n * idempotent so that it can be called over and over as the component\n * updates, and will attach and detach listeners as needed.\n *\n * @param {optional object} container\n *      An object on which the observer is stored. This is the mechanism\n *      by which it is idempotent. If it already exists, another won't be\n *      added. Each time it's called, the value lookup table is updated.\n * @param {array} commandList\n *      An array of commands, following either `buttons` of `updatemenus`\n *      or `steps` of `sliders`.\n * @param {function} onchange\n *      A listener called when the value is changed. Receives data object\n *      with information about the new state.\n */\nexports.manageCommandObserver = function(gd, container, commandList, onchange) {\n    var ret = {};\n    var enabled = true;\n\n    if(container && container._commandObserver) {\n        ret = container._commandObserver;\n    }\n\n    if(!ret.cache) {\n        ret.cache = {};\n    }\n\n    // Either create or just recompute this:\n    ret.lookupTable = {};\n\n    var binding = exports.hasSimpleAPICommandBindings(gd, commandList, ret.lookupTable);\n\n    if(container && container._commandObserver) {\n        if(!binding) {\n            // If container exists and there are no longer any bindings,\n            // remove existing:\n            if(container._commandObserver.remove) {\n                container._commandObserver.remove();\n                container._commandObserver = null;\n                return ret;\n            }\n        } else {\n            // If container exists and there *are* bindings, then the lookup\n            // table should have been updated and check is already attached,\n            // so there's nothing to be done:\n            return ret;\n        }\n    }\n\n    // Determine whether there's anything to do for this binding:\n\n    if(binding) {\n        // Build the cache:\n        bindingValueHasChanged(gd, binding, ret.cache);\n\n        ret.check = function check() {\n            if(!enabled) return;\n\n            var update = bindingValueHasChanged(gd, binding, ret.cache);\n\n            if(update.changed && onchange) {\n                // Disable checks for the duration of this command in order to avoid\n                // infinite loops:\n                if(ret.lookupTable[update.value] !== undefined) {\n                    ret.disable();\n                    Promise.resolve(onchange({\n                        value: update.value,\n                        type: binding.type,\n                        prop: binding.prop,\n                        traces: binding.traces,\n                        index: ret.lookupTable[update.value]\n                    })).then(ret.enable, ret.enable);\n                }\n            }\n\n            return update.changed;\n        };\n\n        var checkEvents = [\n            'plotly_relayout',\n            'plotly_redraw',\n            'plotly_restyle',\n            'plotly_update',\n            'plotly_animatingframe',\n            'plotly_afterplot'\n        ];\n\n        for(var i = 0; i < checkEvents.length; i++) {\n            gd._internalOn(checkEvents[i], ret.check);\n        }\n\n        ret.remove = function() {\n            for(var i = 0; i < checkEvents.length; i++) {\n                gd._removeInternalListener(checkEvents[i], ret.check);\n            }\n        };\n    } else {\n        // TODO: It'd be really neat to actually give a *reason* for this, but at least a warning\n        // is a start\n        Lib.log('Unable to automatically bind plot updates to API command');\n\n        ret.lookupTable = {};\n        ret.remove = function() {};\n    }\n\n    ret.disable = function disable() {\n        enabled = false;\n    };\n\n    ret.enable = function enable() {\n        enabled = true;\n    };\n\n    if(container) {\n        container._commandObserver = ret;\n    }\n\n    return ret;\n};\n\n/*\n * This function checks to see if an array of objects containing\n * method and args properties is compatible with automatic two-way\n * binding. The criteria right now are that\n *\n *   1. multiple traces may be affected\n *   2. only one property may be affected\n *   3. the same property must be affected by all commands\n */\nexports.hasSimpleAPICommandBindings = function(gd, commandList, bindingsByValue) {\n    var i;\n    var n = commandList.length;\n\n    var refBinding;\n\n    for(i = 0; i < n; i++) {\n        var binding;\n        var command = commandList[i];\n        var method = command.method;\n        var args = command.args;\n\n        if(!Array.isArray(args)) args = [];\n\n        // If any command has no method, refuse to bind:\n        if(!method) {\n            return false;\n        }\n        var bindings = exports.computeAPICommandBindings(gd, method, args);\n\n        // Right now, handle one and *only* one property being set:\n        if(bindings.length !== 1) {\n            return false;\n        }\n\n        if(!refBinding) {\n            refBinding = bindings[0];\n            if(Array.isArray(refBinding.traces)) {\n                refBinding.traces.sort();\n            }\n        } else {\n            binding = bindings[0];\n            if(binding.type !== refBinding.type) {\n                return false;\n            }\n            if(binding.prop !== refBinding.prop) {\n                return false;\n            }\n            if(Array.isArray(refBinding.traces)) {\n                if(Array.isArray(binding.traces)) {\n                    binding.traces.sort();\n                    for(var j = 0; j < refBinding.traces.length; j++) {\n                        if(refBinding.traces[j] !== binding.traces[j]) {\n                            return false;\n                        }\n                    }\n                } else {\n                    return false;\n                }\n            } else {\n                if(binding.prop !== refBinding.prop) {\n                    return false;\n                }\n            }\n        }\n\n        binding = bindings[0];\n        var value = binding.value;\n        if(Array.isArray(value)) {\n            if(value.length === 1) {\n                value = value[0];\n            } else {\n                return false;\n            }\n        }\n        if(bindingsByValue) {\n            bindingsByValue[value] = i;\n        }\n    }\n\n    return refBinding;\n};\n\nfunction bindingValueHasChanged(gd, binding, cache) {\n    var container, value, obj;\n    var changed = false;\n\n    if(binding.type === 'data') {\n        // If it's data, we need to get a trace. Based on the limited scope\n        // of what we cover, we can just take the first trace from the list,\n        // or otherwise just the first trace:\n        container = gd._fullData[binding.traces !== null ? binding.traces[0] : 0];\n    } else if(binding.type === 'layout') {\n        container = gd._fullLayout;\n    } else {\n        return false;\n    }\n\n    value = Lib.nestedProperty(container, binding.prop).get();\n\n    obj = cache[binding.type] = cache[binding.type] || {};\n\n    if(obj.hasOwnProperty(binding.prop)) {\n        if(obj[binding.prop] !== value) {\n            changed = true;\n        }\n    }\n\n    obj[binding.prop] = value;\n\n    return {\n        changed: changed,\n        value: value\n    };\n}\n\n/*\n * Execute an API command. There's really not much to this; it just provides\n * a common hook so that implementations don't need to be synchronized across\n * multiple components with the ability to invoke API commands.\n *\n * @param {string} method\n *      The name of the plotly command to execute. Must be one of 'animate',\n *      'restyle', 'relayout', 'update'.\n * @param {array} args\n *      A list of arguments passed to the API command\n */\nexports.executeAPICommand = function(gd, method, args) {\n    if(method === 'skip') return Promise.resolve();\n\n    var _method = Registry.apiMethodRegistry[method];\n    var allArgs = [gd];\n    if(!Array.isArray(args)) args = [];\n\n    for(var i = 0; i < args.length; i++) {\n        allArgs.push(args[i]);\n    }\n\n    return _method.apply(null, allArgs).catch(function(err) {\n        Lib.warn('API call to Plotly.' + method + ' rejected.', err);\n        return Promise.reject(err);\n    });\n};\n\nexports.computeAPICommandBindings = function(gd, method, args) {\n    var bindings;\n\n    if(!Array.isArray(args)) args = [];\n\n    switch(method) {\n        case 'restyle':\n            bindings = computeDataBindings(gd, args);\n            break;\n        case 'relayout':\n            bindings = computeLayoutBindings(gd, args);\n            break;\n        case 'update':\n            bindings = computeDataBindings(gd, [args[0], args[2]])\n                .concat(computeLayoutBindings(gd, [args[1]]));\n            break;\n        case 'animate':\n            bindings = computeAnimateBindings(gd, args);\n            break;\n        default:\n            // This is the case where intelligent logic about what affects\n            // this command is not implemented. It causes no ill effects.\n            // For example, addFrames simply won't bind to a control component.\n            bindings = [];\n    }\n    return bindings;\n};\n\nfunction computeAnimateBindings(gd, args) {\n    // We'll assume that the only relevant modification an animation\n    // makes that's meaningfully tracked is the frame:\n    if(Array.isArray(args[0]) && args[0].length === 1 && ['string', 'number'].indexOf(typeof args[0][0]) !== -1) {\n        return [{type: 'layout', prop: '_currentFrame', value: args[0][0].toString()}];\n    } else {\n        return [];\n    }\n}\n\nfunction computeLayoutBindings(gd, args) {\n    var bindings = [];\n\n    var astr = args[0];\n    var aobj = {};\n    if(typeof astr === 'string') {\n        aobj[astr] = args[1];\n    } else if(Lib.isPlainObject(astr)) {\n        aobj = astr;\n    } else {\n        return bindings;\n    }\n\n    crawl(aobj, function(path, attrName, attr) {\n        bindings.push({type: 'layout', prop: path, value: attr});\n    }, '', 0);\n\n    return bindings;\n}\n\nfunction computeDataBindings(gd, args) {\n    var traces, astr, val, aobj;\n    var bindings = [];\n\n    // Logic copied from Plotly.restyle:\n    astr = args[0];\n    val = args[1];\n    traces = args[2];\n    aobj = {};\n    if(typeof astr === 'string') {\n        aobj[astr] = val;\n    } else if(Lib.isPlainObject(astr)) {\n        // the 3-arg form\n        aobj = astr;\n\n        if(traces === undefined) {\n            traces = val;\n        }\n    } else {\n        return bindings;\n    }\n\n    if(traces === undefined) {\n        // Explicitly assign this to null instead of undefined:\n        traces = null;\n    }\n\n    crawl(aobj, function(path, attrName, attr) {\n        var thisTraces;\n        if(Array.isArray(attr)) {\n            var nAttr = Math.min(attr.length, gd.data.length);\n            if(traces) {\n                nAttr = Math.min(nAttr, traces.length);\n            }\n            thisTraces = [];\n            for(var j = 0; j < nAttr; j++) {\n                thisTraces[j] = traces ? traces[j] : j;\n            }\n        } else {\n            thisTraces = traces ? traces.slice(0) : null;\n        }\n\n        // Convert [7] to just 7 when traces is null:\n        if(thisTraces === null) {\n            if(Array.isArray(attr)) {\n                attr = attr[0];\n            }\n        } else if(Array.isArray(thisTraces)) {\n            if(!Array.isArray(attr)) {\n                var tmp = attr;\n                attr = [];\n                for(var i = 0; i < thisTraces.length; i++) {\n                    attr[i] = tmp;\n                }\n            }\n            attr.length = Math.min(thisTraces.length, attr.length);\n        }\n\n        bindings.push({\n            type: 'data',\n            prop: path,\n            traces: thisTraces,\n            value: attr\n        });\n    }, '', 0);\n\n    return bindings;\n}\n\nfunction crawl(attrs, callback, path, depth) {\n    Object.keys(attrs).forEach(function(attrName) {\n        var attr = attrs[attrName];\n\n        if(attrName[0] === '_') return;\n\n        var thisPath = path + (depth > 0 ? '.' : '') + attrName;\n\n        if(Lib.isPlainObject(attr)) {\n            crawl(attr, callback, thisPath, depth + 1);\n        } else {\n            // Only execute the callback on leaf nodes:\n            callback(thisPath, attrName, attr);\n        }\n    });\n}\n\n},{\"../lib\":703,\"../registry\":831}],776:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar extendFlat = _dereq_('../lib/extend').extendFlat;\n\n/**\n * Make a xy domain attribute group\n *\n * @param {object} opts\n *   @param {string}\n *     opts.name: name to be inserted in the default description\n *   @param {boolean}\n *     opts.trace: set to true for trace containers\n *   @param {string}\n *     opts.editType: editType for all pieces\n *   @param {boolean}\n *     opts.noGridCell: set to true to omit `row` and `column`\n *\n * @param {object} extra\n *   @param {string}\n *     extra.description: extra description. N.B we use\n *     a separate extra container to make it compatible with\n *     the compress_attributes transform.\n *\n * @return {object} attributes object containing {x,y} as specified\n */\nexports.attributes = function(opts, extra) {\n    opts = opts || {};\n    extra = extra || {};\n\n    var base = {\n        valType: 'info_array',\n        \n        editType: opts.editType,\n        items: [\n            {valType: 'number', min: 0, max: 1, editType: opts.editType},\n            {valType: 'number', min: 0, max: 1, editType: opts.editType}\n        ],\n        dflt: [0, 1]\n    };\n\n    var namePart = opts.name ? opts.name + ' ' : '';\n    var contPart = opts.trace ? 'trace ' : 'subplot ';\n    var descPart = extra.description ? ' ' + extra.description : '';\n\n    var out = {\n        x: extendFlat({}, base, {\n            \n        }),\n        y: extendFlat({}, base, {\n            \n        }),\n        editType: opts.editType\n    };\n\n    if(!opts.noGridCell) {\n        out.row = {\n            valType: 'integer',\n            min: 0,\n            dflt: 0,\n            \n            editType: opts.editType,\n            \n        };\n        out.column = {\n            valType: 'integer',\n            min: 0,\n            dflt: 0,\n            \n            editType: opts.editType,\n            \n        };\n    }\n\n    return out;\n};\n\nexports.defaults = function(containerOut, layout, coerce, dfltDomains) {\n    var dfltX = (dfltDomains && dfltDomains.x) || [0, 1];\n    var dfltY = (dfltDomains && dfltDomains.y) || [0, 1];\n\n    var grid = layout.grid;\n    if(grid) {\n        var column = coerce('domain.column');\n        if(column !== undefined) {\n            if(column < grid.columns) dfltX = grid._domains.x[column];\n            else delete containerOut.domain.column;\n        }\n\n        var row = coerce('domain.row');\n        if(row !== undefined) {\n            if(row < grid.rows) dfltY = grid._domains.y[row];\n            else delete containerOut.domain.row;\n        }\n    }\n\n    coerce('domain.x', dfltX);\n    coerce('domain.y', dfltY);\n};\n\n},{\"../lib/extend\":693}],777:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * make a font attribute group\n *\n * @param {object} opts\n *   @param {string}\n *     opts.description: where & how this font is used\n *   @param {optional bool} arrayOk:\n *     should each part (family, size, color) be arrayOk? default false.\n *   @param {string} editType:\n *     the editType for all pieces of this font\n *   @param {optional string} colorEditType:\n *     a separate editType just for color\n *\n * @return {object} attributes object containing {family, size, color} as specified\n */\nmodule.exports = function(opts) {\n    var editType = opts.editType;\n    var colorEditType = opts.colorEditType;\n    if(colorEditType === undefined) colorEditType = editType;\n    var attrs = {\n        family: {\n            valType: 'string',\n            \n            noBlank: true,\n            strict: true,\n            editType: editType,\n            \n        },\n        size: {\n            valType: 'number',\n            \n            min: 1,\n            editType: editType\n        },\n        color: {\n            valType: 'color',\n            \n            editType: colorEditType\n        },\n        editType: editType,\n        // blank strings so compress_attributes can remove\n        // TODO - that's uber hacky... better solution?\n        \n    };\n\n    if(opts.arrayOk) {\n        attrs.family.arrayOk = true;\n        attrs.size.arrayOk = true;\n        attrs.color.arrayOk = true;\n    }\n\n    return attrs;\n};\n\n},{}],778:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    _isLinkedToArray: 'frames_entry',\n\n    group: {\n        valType: 'string',\n        \n        \n    },\n    name: {\n        valType: 'string',\n        \n        \n    },\n    traces: {\n        valType: 'any',\n        \n        \n    },\n    baseframe: {\n        valType: 'string',\n        \n        \n    },\n    data: {\n        valType: 'any',\n        \n        \n    },\n    layout: {\n        valType: 'any',\n        \n        \n    }\n};\n\n},{}],779:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// projection names to d3 function name\nexports.projNames = {\n    // d3.geo.projection\n    'equirectangular': 'equirectangular',\n    'mercator': 'mercator',\n    'orthographic': 'orthographic',\n    'natural earth': 'naturalEarth',\n    'kavrayskiy7': 'kavrayskiy7',\n    'miller': 'miller',\n    'robinson': 'robinson',\n    'eckert4': 'eckert4',\n    'azimuthal equal area': 'azimuthalEqualArea',\n    'azimuthal equidistant': 'azimuthalEquidistant',\n    'conic equal area': 'conicEqualArea',\n    'conic conformal': 'conicConformal',\n    'conic equidistant': 'conicEquidistant',\n    'gnomonic': 'gnomonic',\n    'stereographic': 'stereographic',\n    'mollweide': 'mollweide',\n    'hammer': 'hammer',\n    'transverse mercator': 'transverseMercator',\n    'albers usa': 'albersUsa',\n    'winkel tripel': 'winkel3',\n    'aitoff': 'aitoff',\n    'sinusoidal': 'sinusoidal'\n};\n\n// name of the axes\nexports.axesNames = ['lonaxis', 'lataxis'];\n\n// max longitudinal angular span (EXPERIMENTAL)\nexports.lonaxisSpan = {\n    'orthographic': 180,\n    'azimuthal equal area': 360,\n    'azimuthal equidistant': 360,\n    'conic conformal': 180,\n    'gnomonic': 160,\n    'stereographic': 180,\n    'transverse mercator': 180,\n    '*': 360\n};\n\n// max latitudinal angular span (EXPERIMENTAL)\nexports.lataxisSpan = {\n    'conic conformal': 150,\n    'stereographic': 179.5,\n    '*': 180\n};\n\n// defaults for each scope\nexports.scopeDefaults = {\n    world: {\n        lonaxisRange: [-180, 180],\n        lataxisRange: [-90, 90],\n        projType: 'equirectangular',\n        projRotate: [0, 0, 0]\n    },\n    usa: {\n        lonaxisRange: [-180, -50],\n        lataxisRange: [15, 80],\n        projType: 'albers usa'\n    },\n    europe: {\n        lonaxisRange: [-30, 60],\n        lataxisRange: [30, 85],\n        projType: 'conic conformal',\n        projRotate: [15, 0, 0],\n        projParallels: [0, 60]\n    },\n    asia: {\n        lonaxisRange: [22, 160],\n        lataxisRange: [-15, 55],\n        projType: 'mercator',\n        projRotate: [0, 0, 0]\n    },\n    africa: {\n        lonaxisRange: [-30, 60],\n        lataxisRange: [-40, 40],\n        projType: 'mercator',\n        projRotate: [0, 0, 0]\n    },\n    'north america': {\n        lonaxisRange: [-180, -45],\n        lataxisRange: [5, 85],\n        projType: 'conic conformal',\n        projRotate: [-100, 0, 0],\n        projParallels: [29.5, 45.5]\n    },\n    'south america': {\n        lonaxisRange: [-100, -30],\n        lataxisRange: [-60, 15],\n        projType: 'mercator',\n        projRotate: [0, 0, 0]\n    }\n};\n\n// angular pad to avoid rounding error around clip angles\nexports.clipPad = 1e-3;\n\n// map projection precision\nexports.precision = 0.1;\n\n// default land and water fill colors\nexports.landColor = '#F0DC82';\nexports.waterColor = '#3399FF';\n\n// locationmode to layer name\nexports.locationmodeToLayer = {\n    'ISO-3': 'countries',\n    'USA-states': 'subunits',\n    'country names': 'countries'\n};\n\n// SVG element for a sphere (use to frame maps)\nexports.sphereSVG = {type: 'Sphere'};\n\n// N.B. base layer names must be the same as in the topojson files\n\n// base layer with a fill color\nexports.fillLayers = {\n    ocean: 1,\n    land: 1,\n    lakes: 1\n};\n\n// base layer with a only a line color\nexports.lineLayers = {\n    subunits: 1,\n    countries: 1,\n    coastlines: 1,\n    rivers: 1,\n    frame: 1\n};\n\nexports.layers = [\n    'bg',\n    'ocean', 'land', 'lakes',\n    'subunits', 'countries', 'coastlines', 'rivers',\n    'lataxis', 'lonaxis', 'frame',\n    'backplot',\n    'frontplot'\n];\n\nexports.layersForChoropleth = [\n    'bg',\n    'ocean', 'land',\n    'subunits', 'countries', 'coastlines',\n    'lataxis', 'lonaxis', 'frame',\n    'backplot',\n    'rivers', 'lakes',\n    'frontplot'\n];\n\nexports.layerNameToAdjective = {\n    ocean: 'ocean',\n    land: 'land',\n    lakes: 'lake',\n    subunits: 'subunit',\n    countries: 'country',\n    coastlines: 'coastline',\n    rivers: 'river',\n    frame: 'frame'\n};\n\n},{}],780:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/* global PlotlyGeoAssets:false */\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Fx = _dereq_('../../components/fx');\nvar Plots = _dereq_('../plots');\nvar Axes = _dereq_('../cartesian/axes');\nvar dragElement = _dereq_('../../components/dragelement');\nvar prepSelect = _dereq_('../cartesian/select').prepSelect;\nvar selectOnClick = _dereq_('../cartesian/select').selectOnClick;\n\nvar createGeoZoom = _dereq_('./zoom');\nvar constants = _dereq_('./constants');\n\nvar topojsonUtils = _dereq_('../../lib/topojson_utils');\nvar topojsonFeature = _dereq_('topojson-client').feature;\n\n_dereq_('./projections')(d3);\n\nfunction Geo(opts) {\n    this.id = opts.id;\n    this.graphDiv = opts.graphDiv;\n    this.container = opts.container;\n    this.topojsonURL = opts.topojsonURL;\n    this.isStatic = opts.staticPlot;\n\n    this.topojsonName = null;\n    this.topojson = null;\n\n    this.projection = null;\n    this.scope = null;\n    this.viewInitial = null;\n    this.fitScale = null;\n    this.bounds = null;\n    this.midPt = null;\n\n    this.hasChoropleth = false;\n    this.traceHash = {};\n\n    this.layers = {};\n    this.basePaths = {};\n    this.dataPaths = {};\n    this.dataPoints = {};\n\n    this.clipDef = null;\n    this.clipRect = null;\n    this.bgRect = null;\n\n    this.makeFramework();\n}\n\nvar proto = Geo.prototype;\n\nmodule.exports = function createGeo(opts) {\n    return new Geo(opts);\n};\n\nproto.plot = function(geoCalcData, fullLayout, promises) {\n    var _this = this;\n    var geoLayout = fullLayout[this.id];\n\n    var needsTopojson = false;\n    for(var k in constants.layerNameToAdjective) {\n        if(k !== 'frame' && geoLayout['show' + k]) {\n            needsTopojson = true;\n            break;\n        }\n    }\n    if(!needsTopojson) {\n        return _this.update(geoCalcData, fullLayout);\n    }\n\n    var topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout);\n\n    if(_this.topojson === null || topojsonNameNew !== _this.topojsonName) {\n        _this.topojsonName = topojsonNameNew;\n\n        if(PlotlyGeoAssets.topojson[_this.topojsonName] === undefined) {\n            promises.push(_this.fetchTopojson().then(function(topojson) {\n                PlotlyGeoAssets.topojson[_this.topojsonName] = topojson;\n                _this.topojson = topojson;\n                _this.update(geoCalcData, fullLayout);\n            }));\n        } else {\n            _this.topojson = PlotlyGeoAssets.topojson[_this.topojsonName];\n            _this.update(geoCalcData, fullLayout);\n        }\n    } else {\n        _this.update(geoCalcData, fullLayout);\n    }\n};\n\nproto.fetchTopojson = function() {\n    var topojsonPath = topojsonUtils.getTopojsonPath(\n        this.topojsonURL,\n        this.topojsonName\n    );\n    return new Promise(function(resolve, reject) {\n        d3.json(topojsonPath, function(err, topojson) {\n            if(err) {\n                if(err.status === 404) {\n                    return reject(new Error([\n                        'plotly.js could not find topojson file at',\n                        topojsonPath, '.',\n                        'Make sure the *topojsonURL* plot config option',\n                        'is set properly.'\n                    ].join(' ')));\n                } else {\n                    return reject(new Error([\n                        'unexpected error while fetching topojson file at',\n                        topojsonPath\n                    ].join(' ')));\n                }\n            }\n            resolve(topojson);\n        });\n    });\n};\n\nproto.update = function(geoCalcData, fullLayout) {\n    var geoLayout = fullLayout[this.id];\n\n    var hasInvalidBounds = this.updateProjection(fullLayout, geoLayout);\n    if(hasInvalidBounds) return;\n\n    // important: maps with choropleth traces have a different layer order\n    this.hasChoropleth = false;\n    for(var i = 0; i < geoCalcData.length; i++) {\n        if(geoCalcData[i][0].trace.type === 'choropleth') {\n            this.hasChoropleth = true;\n            break;\n        }\n    }\n\n    if(!this.viewInitial || this.scope !== geoLayout.scope) {\n        this.saveViewInitial(geoLayout);\n    }\n    this.scope = geoLayout.scope;\n\n    this.updateBaseLayers(fullLayout, geoLayout);\n    this.updateDims(fullLayout, geoLayout);\n    this.updateFx(fullLayout, geoLayout);\n\n    Plots.generalUpdatePerTraceModule(this.graphDiv, this, geoCalcData, geoLayout);\n\n    var scatterLayer = this.layers.frontplot.select('.scatterlayer');\n    this.dataPoints.point = scatterLayer.selectAll('.point');\n    this.dataPoints.text = scatterLayer.selectAll('text');\n    this.dataPaths.line = scatterLayer.selectAll('.js-line');\n\n    var choroplethLayer = this.layers.backplot.select('.choroplethlayer');\n    this.dataPaths.choropleth = choroplethLayer.selectAll('path');\n\n    this.render();\n};\n\nproto.updateProjection = function(fullLayout, geoLayout) {\n    var gs = fullLayout._size;\n    var domain = geoLayout.domain;\n    var projLayout = geoLayout.projection;\n    var rotation = projLayout.rotation || {};\n    var center = geoLayout.center || {};\n\n    var projection = this.projection = getProjection(geoLayout);\n\n    // set 'pre-fit' projection\n    projection\n        .center([center.lon - rotation.lon, center.lat - rotation.lat])\n        .rotate([-rotation.lon, -rotation.lat, rotation.roll])\n        .parallels(projLayout.parallels);\n\n    // setup subplot extent [[x0,y0], [x1,y1]]\n    var extent = [[\n        gs.l + gs.w * domain.x[0],\n        gs.t + gs.h * (1 - domain.y[1])\n    ], [\n        gs.l + gs.w * domain.x[1],\n        gs.t + gs.h * (1 - domain.y[0])\n    ]];\n\n    var lonaxis = geoLayout.lonaxis;\n    var lataxis = geoLayout.lataxis;\n    var rangeBox = makeRangeBox(lonaxis.range, lataxis.range);\n\n    // fit projection 'scale' and 'translate' to set lon/lat ranges\n    projection.fitExtent(extent, rangeBox);\n\n    var b = this.bounds = projection.getBounds(rangeBox);\n    var s = this.fitScale = projection.scale();\n    var t = projection.translate();\n\n    if(\n        !isFinite(b[0][0]) || !isFinite(b[0][1]) ||\n        !isFinite(b[1][0]) || !isFinite(b[1][1]) ||\n        isNaN(t[0]) || isNaN(t[0])\n    ) {\n        var gd = this.graphDiv;\n        var attrToUnset = ['projection.rotation', 'center', 'lonaxis.range', 'lataxis.range'];\n        var msg = 'Invalid geo settings, relayout\\'ing to default view.';\n        var updateObj = {};\n\n        // clear all attribute that could cause invalid bounds,\n        // clear viewInitial to update reset-view behavior\n\n        for(var i = 0; i < attrToUnset.length; i++) {\n            updateObj[this.id + '.' + attrToUnset[i]] = null;\n        }\n\n        this.viewInitial = null;\n\n        Lib.warn(msg);\n        gd._promises.push(Registry.call('relayout', gd, updateObj));\n        return msg;\n    }\n\n    // px coordinates of view mid-point,\n    // useful to update `geo.center` after interactions\n    var midPt = this.midPt = [\n        (b[0][0] + b[1][0]) / 2,\n        (b[0][1] + b[1][1]) / 2\n    ];\n\n    // adjust projection to user setting\n    projection\n        .scale(projLayout.scale * s)\n        .translate([t[0] + (midPt[0] - t[0]), t[1] + (midPt[1] - t[1])])\n        .clipExtent(b);\n\n    // the 'albers usa' projection does not expose a 'center' method\n    // so here's this hack to make it respond to 'geoLayout.center'\n    if(geoLayout._isAlbersUsa) {\n        var centerPx = projection([center.lon, center.lat]);\n        var tt = projection.translate();\n\n        projection.translate([\n            tt[0] - (centerPx[0] - tt[0]),\n            tt[1] - (centerPx[1] - tt[1])\n        ]);\n    }\n};\n\nproto.updateBaseLayers = function(fullLayout, geoLayout) {\n    var _this = this;\n    var topojson = _this.topojson;\n    var layers = _this.layers;\n    var basePaths = _this.basePaths;\n\n    function isAxisLayer(d) {\n        return (d === 'lonaxis' || d === 'lataxis');\n    }\n\n    function isLineLayer(d) {\n        return Boolean(constants.lineLayers[d]);\n    }\n\n    function isFillLayer(d) {\n        return Boolean(constants.fillLayers[d]);\n    }\n\n    var allLayers = this.hasChoropleth ?\n        constants.layersForChoropleth :\n        constants.layers;\n\n    var layerData = allLayers.filter(function(d) {\n        return (isLineLayer(d) || isFillLayer(d)) ? geoLayout['show' + d] :\n            isAxisLayer(d) ? geoLayout[d].showgrid :\n            true;\n    });\n\n    var join = _this.framework.selectAll('.layer')\n        .data(layerData, String);\n\n    join.exit().each(function(d) {\n        delete layers[d];\n        delete basePaths[d];\n        d3.select(this).remove();\n    });\n\n    join.enter().append('g')\n        .attr('class', function(d) { return 'layer ' + d; })\n        .each(function(d) {\n            var layer = layers[d] = d3.select(this);\n\n            if(d === 'bg') {\n                _this.bgRect = layer.append('rect')\n                    .style('pointer-events', 'all');\n            } else if(isAxisLayer(d)) {\n                basePaths[d] = layer.append('path')\n                    .style('fill', 'none');\n            } else if(d === 'backplot') {\n                layer.append('g')\n                    .classed('choroplethlayer', true);\n            } else if(d === 'frontplot') {\n                layer.append('g')\n                    .classed('scatterlayer', true);\n            } else if(isLineLayer(d)) {\n                basePaths[d] = layer.append('path')\n                    .style('fill', 'none')\n                    .style('stroke-miterlimit', 2);\n            } else if(isFillLayer(d)) {\n                basePaths[d] = layer.append('path')\n                    .style('stroke', 'none');\n            }\n        });\n\n    join.order();\n\n    join.each(function(d) {\n        var path = basePaths[d];\n        var adj = constants.layerNameToAdjective[d];\n\n        if(d === 'frame') {\n            path.datum(constants.sphereSVG);\n        } else if(isLineLayer(d) || isFillLayer(d)) {\n            path.datum(topojsonFeature(topojson, topojson.objects[d]));\n        } else if(isAxisLayer(d)) {\n            path.datum(makeGraticule(d, geoLayout, fullLayout))\n                .call(Color.stroke, geoLayout[d].gridcolor)\n                .call(Drawing.dashLine, '', geoLayout[d].gridwidth);\n        }\n\n        if(isLineLayer(d)) {\n            path.call(Color.stroke, geoLayout[adj + 'color'])\n                .call(Drawing.dashLine, '', geoLayout[adj + 'width']);\n        } else if(isFillLayer(d)) {\n            path.call(Color.fill, geoLayout[adj + 'color']);\n        }\n    });\n};\n\nproto.updateDims = function(fullLayout, geoLayout) {\n    var b = this.bounds;\n    var hFrameWidth = (geoLayout.framewidth || 0) / 2;\n\n    var l = b[0][0] - hFrameWidth;\n    var t = b[0][1] - hFrameWidth;\n    var w = b[1][0] - l + hFrameWidth;\n    var h = b[1][1] - t + hFrameWidth;\n\n    Drawing.setRect(this.clipRect, l, t, w, h);\n\n    this.bgRect\n        .call(Drawing.setRect, l, t, w, h)\n        .call(Color.fill, geoLayout.bgcolor);\n\n    this.xaxis._offset = l;\n    this.xaxis._length = w;\n\n    this.yaxis._offset = t;\n    this.yaxis._length = h;\n};\n\nproto.updateFx = function(fullLayout, geoLayout) {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var bgRect = _this.bgRect;\n    var dragMode = fullLayout.dragmode;\n    var clickMode = fullLayout.clickmode;\n\n    if(_this.isStatic) return;\n\n    function zoomReset() {\n        var viewInitial = _this.viewInitial;\n        var updateObj = {};\n\n        for(var k in viewInitial) {\n            updateObj[_this.id + '.' + k] = viewInitial[k];\n        }\n\n        Registry.call('_guiRelayout', gd, updateObj);\n        gd.emit('plotly_doubleclick', null);\n    }\n\n    function invert(lonlat) {\n        return _this.projection.invert([\n            lonlat[0] + _this.xaxis._offset,\n            lonlat[1] + _this.yaxis._offset\n        ]);\n    }\n\n    var fillRangeItems;\n\n    if(dragMode === 'select') {\n        fillRangeItems = function(eventData, poly) {\n            var ranges = eventData.range = {};\n            ranges[_this.id] = [\n                invert([poly.xmin, poly.ymin]),\n                invert([poly.xmax, poly.ymax])\n            ];\n        };\n    } else if(dragMode === 'lasso') {\n        fillRangeItems = function(eventData, poly, pts) {\n            var dataPts = eventData.lassoPoints = {};\n            dataPts[_this.id] = pts.filtered.map(invert);\n        };\n    }\n\n    // Note: dragOptions is needed to be declared for all dragmodes because\n    // it's the object that holds persistent selection state.\n    var dragOptions = {\n        element: _this.bgRect.node(),\n        gd: gd,\n        plotinfo: {\n            id: _this.id,\n            xaxis: _this.xaxis,\n            yaxis: _this.yaxis,\n            fillRangeItems: fillRangeItems\n        },\n        xaxes: [_this.xaxis],\n        yaxes: [_this.yaxis],\n        subplot: _this.id,\n        clickFn: function(numClicks) {\n            if(numClicks === 2) {\n                fullLayout._zoomlayer.selectAll('.select-outline').remove();\n            }\n        }\n    };\n\n    if(dragMode === 'pan') {\n        bgRect.node().onmousedown = null;\n        bgRect.call(createGeoZoom(_this, geoLayout));\n        bgRect.on('dblclick.zoom', zoomReset);\n        if(!gd._context._scrollZoom.geo) {\n            bgRect.on('wheel.zoom', null);\n        }\n    } else if(dragMode === 'select' || dragMode === 'lasso') {\n        bgRect.on('.zoom', null);\n\n        dragOptions.prepFn = function(e, startX, startY) {\n            prepSelect(e, startX, startY, dragOptions, dragMode);\n        };\n\n        dragElement.init(dragOptions);\n    }\n\n    bgRect.on('mousemove', function() {\n        var lonlat = _this.projection.invert(d3.mouse(this));\n\n        if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) {\n            return dragElement.unhover(gd, d3.event);\n        }\n\n        _this.xaxis.p2c = function() { return lonlat[0]; };\n        _this.yaxis.p2c = function() { return lonlat[1]; };\n\n        Fx.hover(gd, d3.event, _this.id);\n    });\n\n    bgRect.on('mouseout', function() {\n        if(gd._dragging) return;\n        dragElement.unhover(gd, d3.event);\n    });\n\n    bgRect.on('click', function() {\n        // For select and lasso the dragElement is handling clicks\n        if(dragMode !== 'select' && dragMode !== 'lasso') {\n            if(clickMode.indexOf('select') > -1) {\n                selectOnClick(d3.event, gd, [_this.xaxis], [_this.yaxis],\n                  _this.id, dragOptions);\n            }\n\n            if(clickMode.indexOf('event') > -1) {\n                // TODO: like pie and mapbox, this doesn't support right-click\n                // actually this one is worse, as right-click starts a pan, or leaves\n                // select in a weird state.\n                // Also, only tangentially related, we should cancel hover during pan\n                Fx.click(gd, d3.event);\n            }\n        }\n    });\n};\n\nproto.makeFramework = function() {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var fullLayout = gd._fullLayout;\n    var clipId = 'clip' + fullLayout._uid + _this.id;\n\n    _this.clipDef = fullLayout._clips.append('clipPath')\n        .attr('id', clipId);\n\n    _this.clipRect = _this.clipDef.append('rect');\n\n    _this.framework = d3.select(_this.container).append('g')\n        .attr('class', 'geo ' + _this.id)\n        .call(Drawing.setClipUrl, clipId, gd);\n\n    // sane lonlat to px\n    _this.project = function(v) {\n        var px = _this.projection(v);\n        return px ?\n            [px[0] - _this.xaxis._offset, px[1] - _this.yaxis._offset] :\n            [null, null];\n    };\n\n    _this.xaxis = {\n        _id: 'x',\n        c2p: function(v) { return _this.project(v)[0]; }\n    };\n\n    _this.yaxis = {\n        _id: 'y',\n        c2p: function(v) { return _this.project(v)[1]; }\n    };\n\n    // mock axis for hover formatting\n    _this.mockAxis = {\n        type: 'linear',\n        showexponent: 'all',\n        exponentformat: 'B'\n    };\n    Axes.setConvert(_this.mockAxis, fullLayout);\n};\n\nproto.saveViewInitial = function(geoLayout) {\n    var center = geoLayout.center || {};\n    var projLayout = geoLayout.projection;\n    var rotation = projLayout.rotation || {};\n\n    if(geoLayout._isScoped) {\n        this.viewInitial = {\n            'center.lon': center.lon,\n            'center.lat': center.lat,\n            'projection.scale': projLayout.scale\n        };\n    } else if(geoLayout._isClipped) {\n        this.viewInitial = {\n            'projection.scale': projLayout.scale,\n            'projection.rotation.lon': rotation.lon,\n            'projection.rotation.lat': rotation.lat\n        };\n    } else {\n        this.viewInitial = {\n            'center.lon': center.lon,\n            'center.lat': center.lat,\n            'projection.scale': projLayout.scale,\n            'projection.rotation.lon': rotation.lon\n        };\n    }\n};\n\n// [hot code path] (re)draw all paths which depend on the projection\nproto.render = function() {\n    var projection = this.projection;\n    var pathFn = projection.getPath();\n    var k;\n\n    function translatePoints(d) {\n        var lonlatPx = projection(d.lonlat);\n        return lonlatPx ?\n            'translate(' + lonlatPx[0] + ',' + lonlatPx[1] + ')' :\n             null;\n    }\n\n    function hideShowPoints(d) {\n        return projection.isLonLatOverEdges(d.lonlat) ? 'none' : null;\n    }\n\n    for(k in this.basePaths) {\n        this.basePaths[k].attr('d', pathFn);\n    }\n\n    for(k in this.dataPaths) {\n        this.dataPaths[k].attr('d', function(d) { return pathFn(d.geojson); });\n    }\n\n    for(k in this.dataPoints) {\n        this.dataPoints[k]\n            .attr('display', hideShowPoints)\n            .attr('transform', translatePoints);\n    }\n};\n\n// Helper that wraps d3.geo[/* projection name /*]() which:\n//\n// - adds 'fitExtent' (available in d3 v4)\n// - adds 'getPath', 'getBounds' convenience methods\n// - scopes logic related to 'clipAngle'\n// - adds 'isLonLatOverEdges' method\n// - sets projection precision\n// - sets methods that aren't always defined depending\n//   on the projection type to a dummy 'd3-esque' function,\n//\n// This wrapper alleviates subsequent code of (many) annoying if-statements.\nfunction getProjection(geoLayout) {\n    var projLayout = geoLayout.projection;\n    var projType = projLayout.type;\n\n    var projection = d3.geo[constants.projNames[projType]]();\n\n    var clipAngle = geoLayout._isClipped ?\n        constants.lonaxisSpan[projType] / 2 :\n        null;\n\n    var methods = ['center', 'rotate', 'parallels', 'clipExtent'];\n    var dummyFn = function(_) { return _ ? projection : []; };\n\n    for(var i = 0; i < methods.length; i++) {\n        var m = methods[i];\n        if(typeof projection[m] !== 'function') {\n            projection[m] = dummyFn;\n        }\n    }\n\n    projection.isLonLatOverEdges = function(lonlat) {\n        if(projection(lonlat) === null) {\n            return true;\n        }\n\n        if(clipAngle) {\n            var r = projection.rotate();\n            var angle = d3.geo.distance(lonlat, [-r[0], -r[1]]);\n            var maxAngle = clipAngle * Math.PI / 180;\n            return angle > maxAngle;\n        } else {\n            return false;\n        }\n    };\n\n    projection.getPath = function() {\n        return d3.geo.path().projection(projection);\n    };\n\n    projection.getBounds = function(object) {\n        return projection.getPath().bounds(object);\n    };\n\n    // adapted from d3 v4:\n    // https://github.com/d3/d3-geo/blob/master/src/projection/fit.js\n    projection.fitExtent = function(extent, object) {\n        var w = extent[1][0] - extent[0][0];\n        var h = extent[1][1] - extent[0][1];\n        var clip = projection.clipExtent && projection.clipExtent();\n\n        projection\n            .scale(150)\n            .translate([0, 0]);\n\n        if(clip) projection.clipExtent(null);\n\n        var b = projection.getBounds(object);\n        var k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1]));\n        var x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2;\n        var y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n\n        if(clip) projection.clipExtent(clip);\n\n        return projection\n            .scale(k * 150)\n            .translate([x, y]);\n    };\n\n    projection.precision(constants.precision);\n\n    if(clipAngle) {\n        projection.clipAngle(clipAngle - constants.clipPad);\n    }\n\n    return projection;\n}\n\nfunction makeGraticule(axisName, geoLayout, fullLayout) {\n    // equivalent to the d3 \"ε\"\n    var epsilon = 1e-6;\n    // same as the geoGraticule default\n    var precision = 2.5;\n\n    var axLayout = geoLayout[axisName];\n    var scopeDefaults = constants.scopeDefaults[geoLayout.scope];\n    var rng;\n    var oppRng;\n    var coordFn;\n\n    if(axisName === 'lonaxis') {\n        rng = scopeDefaults.lonaxisRange;\n        oppRng = scopeDefaults.lataxisRange;\n        coordFn = function(v, l) { return [v, l]; };\n    } else if(axisName === 'lataxis') {\n        rng = scopeDefaults.lataxisRange;\n        oppRng = scopeDefaults.lonaxisRange;\n        coordFn = function(v, l) { return [l, v]; };\n    }\n\n    var dummyAx = {\n        type: 'linear',\n        range: [rng[0], rng[1] - epsilon],\n        tick0: axLayout.tick0,\n        dtick: axLayout.dtick\n    };\n\n    Axes.setConvert(dummyAx, fullLayout);\n    var vals = Axes.calcTicks(dummyAx);\n\n    // remove duplicate on antimeridian\n    if(!geoLayout.isScoped && axisName === 'lonaxis') {\n        vals.pop();\n    }\n\n    var len = vals.length;\n    var coords = new Array(len);\n\n    for(var i = 0; i < len; i++) {\n        var v = vals[i].x;\n        var line = coords[i] = [];\n        for(var l = oppRng[0]; l < oppRng[1] + precision; l += precision) {\n            line.push(coordFn(v, l));\n        }\n    }\n\n    return {\n        type: 'MultiLineString',\n        coordinates: coords\n    };\n}\n\n// Returns polygon GeoJSON corresponding to lon/lat range box\n// with well-defined direction\n//\n// Note that clipPad padding is added around range to avoid aliasing.\nfunction makeRangeBox(lon, lat) {\n    var clipPad = constants.clipPad;\n    var lon0 = lon[0] + clipPad;\n    var lon1 = lon[1] - clipPad;\n    var lat0 = lat[0] + clipPad;\n    var lat1 = lat[1] - clipPad;\n\n    // to cross antimeridian w/o ambiguity\n    if(lon0 > 0 && lon1 < 0) lon1 += 360;\n\n    var dlon4 = (lon1 - lon0) / 4;\n\n    return {\n        type: 'Polygon',\n        coordinates: [[\n            [lon0, lat0],\n            [lon0, lat1],\n            [lon0 + dlon4, lat1],\n            [lon0 + 2 * dlon4, lat1],\n            [lon0 + 3 * dlon4, lat1],\n            [lon1, lat1],\n            [lon1, lat0],\n            [lon1 - dlon4, lat0],\n            [lon1 - 2 * dlon4, lat0],\n            [lon1 - 3 * dlon4, lat0],\n            [lon0, lat0]\n        ]]\n    };\n}\n\n},{\"../../components/color\":580,\"../../components/dragelement\":598,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../lib\":703,\"../../lib/topojson_utils\":730,\"../../registry\":831,\"../cartesian/axes\":751,\"../cartesian/select\":768,\"../plots\":812,\"./constants\":779,\"./projections\":784,\"./zoom\":785,\"d3\":157,\"topojson-client\":527}],781:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar getSubplotCalcData = _dereq_('../../plots/get_data').getSubplotCalcData;\nvar counterRegex = _dereq_('../../lib').counterRegex;\n\nvar createGeo = _dereq_('./geo');\n\nvar GEO = 'geo';\nvar counter = counterRegex(GEO);\n\nvar attributes = {};\nattributes[GEO] = {\n    valType: 'subplotid',\n    \n    dflt: GEO,\n    editType: 'calc',\n    \n};\n\nfunction plotGeo(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcData = gd.calcdata;\n    var geoIds = fullLayout._subplots[GEO];\n\n    /**\n     * If 'plotly-geo-assets.js' is not included,\n     * initialize object to keep reference to every loaded topojson\n     */\n    if(window.PlotlyGeoAssets === undefined) {\n        window.PlotlyGeoAssets = {topojson: {}};\n    }\n\n    for(var i = 0; i < geoIds.length; i++) {\n        var geoId = geoIds[i];\n        var geoCalcData = getSubplotCalcData(calcData, GEO, geoId);\n        var geoLayout = fullLayout[geoId];\n        var geo = geoLayout._subplot;\n\n        if(!geo) {\n            geo = createGeo({\n                id: geoId,\n                graphDiv: gd,\n                container: fullLayout._geolayer.node(),\n                topojsonURL: gd._context.topojsonURL,\n                staticPlot: gd._context.staticPlot\n            });\n\n            fullLayout[geoId]._subplot = geo;\n        }\n\n        geo.plot(geoCalcData, fullLayout, gd._promises);\n    }\n}\n\nfunction clean(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldGeoKeys = oldFullLayout._subplots[GEO] || [];\n\n    for(var i = 0; i < oldGeoKeys.length; i++) {\n        var oldGeoKey = oldGeoKeys[i];\n        var oldGeo = oldFullLayout[oldGeoKey]._subplot;\n\n        if(!newFullLayout[oldGeoKey] && !!oldGeo) {\n            oldGeo.framework.remove();\n            oldGeo.clipDef.remove();\n        }\n    }\n}\n\nfunction updateFx(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots[GEO];\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplotLayout = fullLayout[subplotIds[i]];\n        var subplotObj = subplotLayout._subplot;\n        subplotObj.updateFx(fullLayout, subplotLayout);\n    }\n}\n\nmodule.exports = {\n    attr: GEO,\n    name: GEO,\n    idRoot: GEO,\n    idRegex: counter,\n    attrRegex: counter,\n    attributes: attributes,\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    plot: plotGeo,\n    updateFx: updateFx,\n    clean: clean\n};\n\n},{\"../../lib\":703,\"../../plots/get_data\":786,\"./geo\":780,\"./layout_attributes\":782,\"./layout_defaults\":783}],782:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar domainAttrs = _dereq_('../domain').attributes;\nvar constants = _dereq_('./constants');\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar geoAxesAttrs = {\n    range: {\n        valType: 'info_array',\n        \n        items: [\n            {valType: 'number'},\n            {valType: 'number'}\n        ],\n        \n    },\n    showgrid: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    tick0: {\n        valType: 'number',\n        \n        dflt: 0,\n        \n    },\n    dtick: {\n        valType: 'number',\n        \n        \n    },\n    gridcolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.lightLine,\n        \n    },\n    gridwidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    }\n};\n\nvar attrs = module.exports = overrideAll({\n    domain: domainAttrs({name: 'geo'}, {\n        \n    }),\n\n    resolution: {\n        valType: 'enumerated',\n        values: [110, 50],\n        \n        dflt: 110,\n        coerceNumber: true,\n        \n    },\n    scope: {\n        valType: 'enumerated',\n        \n        values: Object.keys(constants.scopeDefaults),\n        dflt: 'world',\n        \n    },\n    projection: {\n        type: {\n            valType: 'enumerated',\n            \n            values: Object.keys(constants.projNames),\n            \n        },\n        rotation: {\n            lon: {\n                valType: 'number',\n                \n                \n            },\n            lat: {\n                valType: 'number',\n                \n                \n            },\n            roll: {\n                valType: 'number',\n                \n                \n            }\n        },\n        parallels: {\n            valType: 'info_array',\n            \n            items: [\n                {valType: 'number'},\n                {valType: 'number'}\n            ],\n            \n        },\n        scale: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 1,\n            \n        },\n    },\n    center: {\n        lon: {\n            valType: 'number',\n            \n            \n        },\n        lat: {\n            valType: 'number',\n            \n            \n        }\n    },\n    showcoastlines: {\n        valType: 'boolean',\n        \n        \n    },\n    coastlinecolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.defaultLine,\n        \n    },\n    coastlinewidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    },\n    showland: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    landcolor: {\n        valType: 'color',\n        \n        dflt: constants.landColor,\n        \n    },\n    showocean: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    oceancolor: {\n        valType: 'color',\n        \n        dflt: constants.waterColor,\n        \n    },\n    showlakes: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    lakecolor: {\n        valType: 'color',\n        \n        dflt: constants.waterColor,\n        \n    },\n    showrivers: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    rivercolor: {\n        valType: 'color',\n        \n        dflt: constants.waterColor,\n        \n    },\n    riverwidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    },\n    showcountries: {\n        valType: 'boolean',\n        \n        \n    },\n    countrycolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.defaultLine,\n        \n    },\n    countrywidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    },\n    showsubunits: {\n        valType: 'boolean',\n        \n        \n    },\n    subunitcolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.defaultLine,\n        \n    },\n    subunitwidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    },\n    showframe: {\n        valType: 'boolean',\n        \n        \n    },\n    framecolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.defaultLine,\n        \n    },\n    framewidth: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        \n    },\n    bgcolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.background,\n        \n    },\n    lonaxis: geoAxesAttrs,\n    lataxis: geoAxesAttrs\n}, 'plot', 'from-root');\n\n// set uirevision outside of overrideAll so it can be `editType: 'none'`\nattrs.uirevision = {\n    valType: 'any',\n    \n    editType: 'none',\n    \n};\n\n},{\"../../components/color/attributes\":579,\"../../plot_api/edit_types\":734,\"../domain\":776,\"./constants\":779}],783:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar handleSubplotDefaults = _dereq_('../subplot_defaults');\nvar constants = _dereq_('./constants');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nvar axesNames = constants.axesNames;\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    handleSubplotDefaults(layoutIn, layoutOut, fullData, {\n        type: 'geo',\n        attributes: layoutAttributes,\n        handleDefaults: handleGeoDefaults,\n        partition: 'y'\n    });\n};\n\nfunction handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce) {\n    var show;\n\n    var resolution = coerce('resolution');\n    var scope = coerce('scope');\n    var scopeParams = constants.scopeDefaults[scope];\n\n    var projType = coerce('projection.type', scopeParams.projType);\n    var isAlbersUsa = geoLayoutOut._isAlbersUsa = projType === 'albers usa';\n\n    // no other scopes are allowed for 'albers usa' projection\n    if(isAlbersUsa) scope = geoLayoutOut.scope = 'usa';\n\n    var isScoped = geoLayoutOut._isScoped = (scope !== 'world');\n    var isConic = geoLayoutOut._isConic = projType.indexOf('conic') !== -1;\n    geoLayoutOut._isClipped = !!constants.lonaxisSpan[projType];\n\n    for(var i = 0; i < axesNames.length; i++) {\n        var axisName = axesNames[i];\n        var dtickDflt = [30, 10][i];\n        var rangeDflt;\n\n        if(isScoped) {\n            rangeDflt = scopeParams[axisName + 'Range'];\n        } else {\n            var dfltSpans = constants[axisName + 'Span'];\n            var hSpan = (dfltSpans[projType] || dfltSpans['*']) / 2;\n            var rot = coerce(\n                'projection.rotation.' + axisName.substr(0, 3),\n                scopeParams.projRotate[i]\n            );\n            rangeDflt = [rot - hSpan, rot + hSpan];\n        }\n\n        coerce(axisName + '.range', rangeDflt);\n        coerce(axisName + '.tick0');\n        coerce(axisName + '.dtick', dtickDflt);\n\n        show = coerce(axisName + '.showgrid');\n        if(show) {\n            coerce(axisName + '.gridcolor');\n            coerce(axisName + '.gridwidth');\n        }\n    }\n\n    var lonRange = geoLayoutOut.lonaxis.range;\n    var latRange = geoLayoutOut.lataxis.range;\n\n    // to cross antimeridian w/o ambiguity\n    var lon0 = lonRange[0];\n    var lon1 = lonRange[1];\n    if(lon0 > 0 && lon1 < 0) lon1 += 360;\n\n    var centerLon = (lon0 + lon1) / 2;\n    var projLon;\n\n    if(!isAlbersUsa) {\n        var dfltProjRotate = isScoped ? scopeParams.projRotate : [centerLon, 0, 0];\n\n        projLon = coerce('projection.rotation.lon', dfltProjRotate[0]);\n        coerce('projection.rotation.lat', dfltProjRotate[1]);\n        coerce('projection.rotation.roll', dfltProjRotate[2]);\n\n        show = coerce('showcoastlines', !isScoped);\n        if(show) {\n            coerce('coastlinecolor');\n            coerce('coastlinewidth');\n        }\n\n        show = coerce('showocean');\n        if(show) coerce('oceancolor');\n    }\n\n    var centerLonDflt;\n    var centerLatDflt;\n\n    if(isAlbersUsa) {\n        // 'albers usa' does not have a 'center',\n        // these values were found using via:\n        //   projection.invert([geoLayout.center.lon, geoLayoutIn.center.lat])\n        centerLonDflt = -96.6;\n        centerLatDflt = 38.7;\n    } else {\n        centerLonDflt = isScoped ? centerLon : projLon;\n        centerLatDflt = (latRange[0] + latRange[1]) / 2;\n    }\n\n    coerce('center.lon', centerLonDflt);\n    coerce('center.lat', centerLatDflt);\n\n    if(isConic) {\n        var dfltProjParallels = scopeParams.projParallels || [0, 60];\n        coerce('projection.parallels', dfltProjParallels);\n    }\n\n    coerce('projection.scale');\n\n    show = coerce('showland');\n    if(show) coerce('landcolor');\n\n    show = coerce('showlakes');\n    if(show) coerce('lakecolor');\n\n    show = coerce('showrivers');\n    if(show) {\n        coerce('rivercolor');\n        coerce('riverwidth');\n    }\n\n    show = coerce('showcountries', isScoped && scope !== 'usa');\n    if(show) {\n        coerce('countrycolor');\n        coerce('countrywidth');\n    }\n\n    if(scope === 'usa' || (scope === 'north america' && resolution === 50)) {\n        // Only works for:\n        //   USA states at 110m\n        //   USA states + Canada provinces at 50m\n        coerce('showsubunits', true);\n        coerce('subunitcolor');\n        coerce('subunitwidth');\n    }\n\n    if(!isScoped) {\n        // Does not work in non-world scopes\n        show = coerce('showframe', true);\n        if(show) {\n            coerce('framecolor');\n            coerce('framewidth');\n        }\n    }\n\n    coerce('bgcolor');\n}\n\n},{\"../subplot_defaults\":826,\"./constants\":779,\"./layout_attributes\":782}],784:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n/*\n * Generated by https://github.com/etpinard/d3-geo-projection-picker\n *\n * which is hand-picks projection from https://github.com/d3/d3-geo-projection\n *\n * into a CommonJS require-able module.\n */\n\n'use strict';\n\n/* eslint-disable */\n\nfunction addProjectionsToD3(d3) {\n  d3.geo.project = function(object, projection) {\n    var stream = projection.stream;\n    if (!stream) throw new Error(\"not yet supported\");\n    return (object && d3_geo_projectObjectType.hasOwnProperty(object.type) ? d3_geo_projectObjectType[object.type] : d3_geo_projectGeometry)(object, stream);\n  };\n  function d3_geo_projectFeature(object, stream) {\n    return {\n      type: \"Feature\",\n      id: object.id,\n      properties: object.properties,\n      geometry: d3_geo_projectGeometry(object.geometry, stream)\n    };\n  }\n  function d3_geo_projectGeometry(geometry, stream) {\n    if (!geometry) return null;\n    if (geometry.type === \"GeometryCollection\") return {\n      type: \"GeometryCollection\",\n      geometries: object.geometries.map(function(geometry) {\n        return d3_geo_projectGeometry(geometry, stream);\n      })\n    };\n    if (!d3_geo_projectGeometryType.hasOwnProperty(geometry.type)) return null;\n    var sink = d3_geo_projectGeometryType[geometry.type];\n    d3.geo.stream(geometry, stream(sink));\n    return sink.result();\n  }\n  var d3_geo_projectObjectType = {\n    Feature: d3_geo_projectFeature,\n    FeatureCollection: function(object, stream) {\n      return {\n        type: \"FeatureCollection\",\n        features: object.features.map(function(feature) {\n          return d3_geo_projectFeature(feature, stream);\n        })\n      };\n    }\n  };\n  var d3_geo_projectPoints = [], d3_geo_projectLines = [];\n  var d3_geo_projectPoint = {\n    point: function(x, y) {\n      d3_geo_projectPoints.push([ x, y ]);\n    },\n    result: function() {\n      var result = !d3_geo_projectPoints.length ? null : d3_geo_projectPoints.length < 2 ? {\n        type: \"Point\",\n        coordinates: d3_geo_projectPoints[0]\n      } : {\n        type: \"MultiPoint\",\n        coordinates: d3_geo_projectPoints\n      };\n      d3_geo_projectPoints = [];\n      return result;\n    }\n  };\n  var d3_geo_projectLine = {\n    lineStart: d3_geo_projectNoop,\n    point: function(x, y) {\n      d3_geo_projectPoints.push([ x, y ]);\n    },\n    lineEnd: function() {\n      if (d3_geo_projectPoints.length) d3_geo_projectLines.push(d3_geo_projectPoints),\n      d3_geo_projectPoints = [];\n    },\n    result: function() {\n      var result = !d3_geo_projectLines.length ? null : d3_geo_projectLines.length < 2 ? {\n        type: \"LineString\",\n        coordinates: d3_geo_projectLines[0]\n      } : {\n        type: \"MultiLineString\",\n        coordinates: d3_geo_projectLines\n      };\n      d3_geo_projectLines = [];\n      return result;\n    }\n  };\n  var d3_geo_projectPolygon = {\n    polygonStart: d3_geo_projectNoop,\n    lineStart: d3_geo_projectNoop,\n    point: function(x, y) {\n      d3_geo_projectPoints.push([ x, y ]);\n    },\n    lineEnd: function() {\n      var n = d3_geo_projectPoints.length;\n      if (n) {\n        do d3_geo_projectPoints.push(d3_geo_projectPoints[0].slice()); while (++n < 4);\n        d3_geo_projectLines.push(d3_geo_projectPoints), d3_geo_projectPoints = [];\n      }\n    },\n    polygonEnd: d3_geo_projectNoop,\n    result: function() {\n      if (!d3_geo_projectLines.length) return null;\n      var polygons = [], holes = [];\n      d3_geo_projectLines.forEach(function(ring) {\n        if (d3_geo_projectClockwise(ring)) polygons.push([ ring ]); else holes.push(ring);\n      });\n      holes.forEach(function(hole) {\n        var point = hole[0];\n        polygons.some(function(polygon) {\n          if (d3_geo_projectContains(polygon[0], point)) {\n            polygon.push(hole);\n            return true;\n          }\n        }) || polygons.push([ hole ]);\n      });\n      d3_geo_projectLines = [];\n      return !polygons.length ? null : polygons.length > 1 ? {\n        type: \"MultiPolygon\",\n        coordinates: polygons\n      } : {\n        type: \"Polygon\",\n        coordinates: polygons[0]\n      };\n    }\n  };\n  var d3_geo_projectGeometryType = {\n    Point: d3_geo_projectPoint,\n    MultiPoint: d3_geo_projectPoint,\n    LineString: d3_geo_projectLine,\n    MultiLineString: d3_geo_projectLine,\n    Polygon: d3_geo_projectPolygon,\n    MultiPolygon: d3_geo_projectPolygon,\n    Sphere: d3_geo_projectPolygon\n  };\n  function d3_geo_projectNoop() {}\n  function d3_geo_projectClockwise(ring) {\n    if ((n = ring.length) < 4) return false;\n    var i = 0, n, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n    while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n    return area <= 0;\n  }\n  function d3_geo_projectContains(ring, point) {\n    var x = point[0], y = point[1], contains = false;\n    for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n      var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];\n      if (yi > y ^ yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) contains = !contains;\n    }\n    return contains;\n  }\n  var ε = 1e-6, ε2 = ε * ε, π = Math.PI, halfπ = π / 2, sqrtπ = Math.sqrt(π), radians = π / 180, degrees = 180 / π;\n  function sinci(x) {\n    return x ? x / Math.sin(x) : 1;\n  }\n  function sgn(x) {\n    return x > 0 ? 1 : x < 0 ? -1 : 0;\n  }\n  function asin(x) {\n    return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);\n  }\n  function acos(x) {\n    return x > 1 ? 0 : x < -1 ? π : Math.acos(x);\n  }\n  function asqrt(x) {\n    return x > 0 ? Math.sqrt(x) : 0;\n  }\n  var projection = d3.geo.projection, projectionMutator = d3.geo.projectionMutator;\n  d3.geo.interrupt = function(project) {\n    var lobes = [ [ [ [ -π, 0 ], [ 0, halfπ ], [ π, 0 ] ] ], [ [ [ -π, 0 ], [ 0, -halfπ ], [ π, 0 ] ] ] ];\n    var bounds;\n    function forward(λ, φ) {\n      var sign = φ < 0 ? -1 : +1, hemilobes = lobes[+(φ < 0)];\n      for (var i = 0, n = hemilobes.length - 1; i < n && λ > hemilobes[i][2][0]; ++i) ;\n      var coordinates = project(λ - hemilobes[i][1][0], φ);\n      coordinates[0] += project(hemilobes[i][1][0], sign * φ > sign * hemilobes[i][0][1] ? hemilobes[i][0][1] : φ)[0];\n      return coordinates;\n    }\n    function reset() {\n      bounds = lobes.map(function(hemilobes) {\n        return hemilobes.map(function(lobe) {\n          var x0 = project(lobe[0][0], lobe[0][1])[0], x1 = project(lobe[2][0], lobe[2][1])[0], y0 = project(lobe[1][0], lobe[0][1])[1], y1 = project(lobe[1][0], lobe[1][1])[1], t;\n          if (y0 > y1) t = y0, y0 = y1, y1 = t;\n          return [ [ x0, y0 ], [ x1, y1 ] ];\n        });\n      });\n    }\n    if (project.invert) forward.invert = function(x, y) {\n      var hemibounds = bounds[+(y < 0)], hemilobes = lobes[+(y < 0)];\n      for (var i = 0, n = hemibounds.length; i < n; ++i) {\n        var b = hemibounds[i];\n        if (b[0][0] <= x && x < b[1][0] && b[0][1] <= y && y < b[1][1]) {\n          var coordinates = project.invert(x - project(hemilobes[i][1][0], 0)[0], y);\n          coordinates[0] += hemilobes[i][1][0];\n          return pointEqual(forward(coordinates[0], coordinates[1]), [ x, y ]) ? coordinates : null;\n        }\n      }\n    };\n    var projection = d3.geo.projection(forward), stream_ = projection.stream;\n    projection.stream = function(stream) {\n      var rotate = projection.rotate(), rotateStream = stream_(stream), sphereStream = (projection.rotate([ 0, 0 ]),\n      stream_(stream));\n      projection.rotate(rotate);\n      rotateStream.sphere = function() {\n        d3.geo.stream(sphere(), sphereStream);\n      };\n      return rotateStream;\n    };\n    projection.lobes = function(_) {\n      if (!arguments.length) return lobes.map(function(lobes) {\n        return lobes.map(function(lobe) {\n          return [ [ lobe[0][0] * 180 / π, lobe[0][1] * 180 / π ], [ lobe[1][0] * 180 / π, lobe[1][1] * 180 / π ], [ lobe[2][0] * 180 / π, lobe[2][1] * 180 / π ] ];\n        });\n      });\n      lobes = _.map(function(lobes) {\n        return lobes.map(function(lobe) {\n          return [ [ lobe[0][0] * π / 180, lobe[0][1] * π / 180 ], [ lobe[1][0] * π / 180, lobe[1][1] * π / 180 ], [ lobe[2][0] * π / 180, lobe[2][1] * π / 180 ] ];\n        });\n      });\n      reset();\n      return projection;\n    };\n    function sphere() {\n      var ε = 1e-6, coordinates = [];\n      for (var i = 0, n = lobes[0].length; i < n; ++i) {\n        var lobe = lobes[0][i], λ0 = lobe[0][0] * 180 / π, φ0 = lobe[0][1] * 180 / π, φ1 = lobe[1][1] * 180 / π, λ2 = lobe[2][0] * 180 / π, φ2 = lobe[2][1] * 180 / π;\n        coordinates.push(resample([ [ λ0 + ε, φ0 + ε ], [ λ0 + ε, φ1 - ε ], [ λ2 - ε, φ1 - ε ], [ λ2 - ε, φ2 + ε ] ], 30));\n      }\n      for (var i = lobes[1].length - 1; i >= 0; --i) {\n        var lobe = lobes[1][i], λ0 = lobe[0][0] * 180 / π, φ0 = lobe[0][1] * 180 / π, φ1 = lobe[1][1] * 180 / π, λ2 = lobe[2][0] * 180 / π, φ2 = lobe[2][1] * 180 / π;\n        coordinates.push(resample([ [ λ2 - ε, φ2 - ε ], [ λ2 - ε, φ1 + ε ], [ λ0 + ε, φ1 + ε ], [ λ0 + ε, φ0 - ε ] ], 30));\n      }\n      return {\n        type: \"Polygon\",\n        coordinates: [ d3.merge(coordinates) ]\n      };\n    }\n    function resample(coordinates, m) {\n      var i = -1, n = coordinates.length, p0 = coordinates[0], p1, dx, dy, resampled = [];\n      while (++i < n) {\n        p1 = coordinates[i];\n        dx = (p1[0] - p0[0]) / m;\n        dy = (p1[1] - p0[1]) / m;\n        for (var j = 0; j < m; ++j) resampled.push([ p0[0] + j * dx, p0[1] + j * dy ]);\n        p0 = p1;\n      }\n      resampled.push(p1);\n      return resampled;\n    }\n    function pointEqual(a, b) {\n      return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε;\n    }\n    return projection;\n  };\n  function eckert4(λ, φ) {\n    var k = (2 + halfπ) * Math.sin(φ);\n    φ /= 2;\n    for (var i = 0, δ = Infinity; i < 10 && Math.abs(δ) > ε; i++) {\n      var cosφ = Math.cos(φ);\n      φ -= δ = (φ + Math.sin(φ) * (cosφ + 2) - k) / (2 * cosφ * (1 + cosφ));\n    }\n    return [ 2 / Math.sqrt(π * (4 + π)) * λ * (1 + Math.cos(φ)), 2 * Math.sqrt(π / (4 + π)) * Math.sin(φ) ];\n  }\n  eckert4.invert = function(x, y) {\n    var A = .5 * y * Math.sqrt((4 + π) / π), k = asin(A), c = Math.cos(k);\n    return [ x / (2 / Math.sqrt(π * (4 + π)) * (1 + c)), asin((k + A * (c + 2)) / (2 + halfπ)) ];\n  };\n  (d3.geo.eckert4 = function() {\n    return projection(eckert4);\n  }).raw = eckert4;\n  var hammerAzimuthalEqualArea = d3.geo.azimuthalEqualArea.raw;\n  function hammer(A, B) {\n    if (arguments.length < 2) B = A;\n    if (B === 1) return hammerAzimuthalEqualArea;\n    if (B === Infinity) return hammerQuarticAuthalic;\n    function forward(λ, φ) {\n      var coordinates = hammerAzimuthalEqualArea(λ / B, φ);\n      coordinates[0] *= A;\n      return coordinates;\n    }\n    forward.invert = function(x, y) {\n      var coordinates = hammerAzimuthalEqualArea.invert(x / A, y);\n      coordinates[0] *= B;\n      return coordinates;\n    };\n    return forward;\n  }\n  function hammerProjection() {\n    var B = 2, m = projectionMutator(hammer), p = m(B);\n    p.coefficient = function(_) {\n      if (!arguments.length) return B;\n      return m(B = +_);\n    };\n    return p;\n  }\n  function hammerQuarticAuthalic(λ, φ) {\n    return [ λ * Math.cos(φ) / Math.cos(φ /= 2), 2 * Math.sin(φ) ];\n  }\n  hammerQuarticAuthalic.invert = function(x, y) {\n    var φ = 2 * asin(y / 2);\n    return [ x * Math.cos(φ / 2) / Math.cos(φ), φ ];\n  };\n  (d3.geo.hammer = hammerProjection).raw = hammer;\n  function kavrayskiy7(λ, φ) {\n    return [ 3 * λ / (2 * π) * Math.sqrt(π * π / 3 - φ * φ), φ ];\n  }\n  kavrayskiy7.invert = function(x, y) {\n    return [ 2 / 3 * π * x / Math.sqrt(π * π / 3 - y * y), y ];\n  };\n  (d3.geo.kavrayskiy7 = function() {\n    return projection(kavrayskiy7);\n  }).raw = kavrayskiy7;\n  function miller(λ, φ) {\n    return [ λ, 1.25 * Math.log(Math.tan(π / 4 + .4 * φ)) ];\n  }\n  miller.invert = function(x, y) {\n    return [ x, 2.5 * Math.atan(Math.exp(.8 * y)) - .625 * π ];\n  };\n  (d3.geo.miller = function() {\n    return projection(miller);\n  }).raw = miller;\n  function mollweideBromleyθ(Cp) {\n    return function(θ) {\n      var Cpsinθ = Cp * Math.sin(θ), i = 30, δ;\n      do θ -= δ = (θ + Math.sin(θ) - Cpsinθ) / (1 + Math.cos(θ)); while (Math.abs(δ) > ε && --i > 0);\n      return θ / 2;\n    };\n  }\n  function mollweideBromley(Cx, Cy, Cp) {\n    var θ = mollweideBromleyθ(Cp);\n    function forward(λ, φ) {\n      return [ Cx * λ * Math.cos(φ = θ(φ)), Cy * Math.sin(φ) ];\n    }\n    forward.invert = function(x, y) {\n      var θ = asin(y / Cy);\n      return [ x / (Cx * Math.cos(θ)), asin((2 * θ + Math.sin(2 * θ)) / Cp) ];\n    };\n    return forward;\n  }\n  var mollweideθ = mollweideBromleyθ(π), mollweide = mollweideBromley(Math.SQRT2 / halfπ, Math.SQRT2, π);\n  (d3.geo.mollweide = function() {\n    return projection(mollweide);\n  }).raw = mollweide;\n  function naturalEarth(λ, φ) {\n    var φ2 = φ * φ, φ4 = φ2 * φ2;\n    return [ λ * (.8707 - .131979 * φ2 + φ4 * (-.013791 + φ4 * (.003971 * φ2 - .001529 * φ4))), φ * (1.007226 + φ2 * (.015085 + φ4 * (-.044475 + .028874 * φ2 - .005916 * φ4))) ];\n  }\n  naturalEarth.invert = function(x, y) {\n    var φ = y, i = 25, δ;\n    do {\n      var φ2 = φ * φ, φ4 = φ2 * φ2;\n      φ -= δ = (φ * (1.007226 + φ2 * (.015085 + φ4 * (-.044475 + .028874 * φ2 - .005916 * φ4))) - y) / (1.007226 + φ2 * (.015085 * 3 + φ4 * (-.044475 * 7 + .028874 * 9 * φ2 - .005916 * 11 * φ4)));\n    } while (Math.abs(δ) > ε && --i > 0);\n    return [ x / (.8707 + (φ2 = φ * φ) * (-.131979 + φ2 * (-.013791 + φ2 * φ2 * φ2 * (.003971 - .001529 * φ2)))), φ ];\n  };\n  (d3.geo.naturalEarth = function() {\n    return projection(naturalEarth);\n  }).raw = naturalEarth;\n  var robinsonConstants = [ [ .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 ] ];\n  robinsonConstants.forEach(function(d) {\n    d[1] *= 1.0144;\n  });\n  function robinson(λ, φ) {\n    var i = Math.min(18, Math.abs(φ) * 36 / π), i0 = Math.floor(i), di = i - i0, ax = (k = robinsonConstants[i0])[0], ay = k[1], bx = (k = robinsonConstants[++i0])[0], by = k[1], cx = (k = robinsonConstants[Math.min(19, ++i0)])[0], cy = k[1], k;\n    return [ λ * (bx + di * (cx - ax) / 2 + di * di * (cx - 2 * bx + ax) / 2), (φ > 0 ? halfπ : -halfπ) * (by + di * (cy - ay) / 2 + di * di * (cy - 2 * by + ay) / 2) ];\n  }\n  robinson.invert = function(x, y) {\n    var yy = y / halfπ, φ = yy * 90, i = Math.min(18, Math.abs(φ / 5)), i0 = Math.max(0, Math.floor(i));\n    do {\n      var ay = robinsonConstants[i0][1], by = robinsonConstants[i0 + 1][1], cy = robinsonConstants[Math.min(19, i0 + 2)][1], u = cy - ay, v = cy - 2 * by + ay, t = 2 * (Math.abs(yy) - by) / u, c = v / u, di = t * (1 - c * t * (1 - 2 * c * t));\n      if (di >= 0 || i0 === 1) {\n        φ = (y >= 0 ? 5 : -5) * (di + i);\n        var j = 50, δ;\n        do {\n          i = Math.min(18, Math.abs(φ) / 5);\n          i0 = Math.floor(i);\n          di = i - i0;\n          ay = robinsonConstants[i0][1];\n          by = robinsonConstants[i0 + 1][1];\n          cy = robinsonConstants[Math.min(19, i0 + 2)][1];\n          φ -= (δ = (y >= 0 ? halfπ : -halfπ) * (by + di * (cy - ay) / 2 + di * di * (cy - 2 * by + ay) / 2) - y) * degrees;\n        } while (Math.abs(δ) > ε2 && --j > 0);\n        break;\n      }\n    } while (--i0 >= 0);\n    var ax = robinsonConstants[i0][0], bx = robinsonConstants[i0 + 1][0], cx = robinsonConstants[Math.min(19, i0 + 2)][0];\n    return [ x / (bx + di * (cx - ax) / 2 + di * di * (cx - 2 * bx + ax) / 2), φ * radians ];\n  };\n  (d3.geo.robinson = function() {\n    return projection(robinson);\n  }).raw = robinson;\n  function sinusoidal(λ, φ) {\n    return [ λ * Math.cos(φ), φ ];\n  }\n  sinusoidal.invert = function(x, y) {\n    return [ x / Math.cos(y), y ];\n  };\n  (d3.geo.sinusoidal = function() {\n    return projection(sinusoidal);\n  }).raw = sinusoidal;\n  function aitoff(λ, φ) {\n    var cosφ = Math.cos(φ), sinciα = sinci(acos(cosφ * Math.cos(λ /= 2)));\n    return [ 2 * cosφ * Math.sin(λ) * sinciα, Math.sin(φ) * sinciα ];\n  }\n  aitoff.invert = function(x, y) {\n    if (x * x + 4 * y * y > π * π + ε) return;\n    var λ = x, φ = y, i = 25;\n    do {\n      var sinλ = Math.sin(λ), sinλ_2 = Math.sin(λ / 2), cosλ_2 = Math.cos(λ / 2), sinφ = Math.sin(φ), cosφ = Math.cos(φ), sin_2φ = Math.sin(2 * φ), sin2φ = sinφ * sinφ, cos2φ = cosφ * cosφ, sin2λ_2 = sinλ_2 * sinλ_2, C = 1 - cos2φ * cosλ_2 * cosλ_2, E = C ? acos(cosφ * cosλ_2) * Math.sqrt(F = 1 / C) : F = 0, F, fx = 2 * E * cosφ * sinλ_2 - x, fy = E * sinφ - y, δxδλ = F * (cos2φ * sin2λ_2 + E * cosφ * cosλ_2 * sin2φ), δxδφ = F * (.5 * sinλ * sin_2φ - E * 2 * sinφ * sinλ_2), δyδλ = F * .25 * (sin_2φ * sinλ_2 - E * sinφ * cos2φ * sinλ), δyδφ = F * (sin2φ * cosλ_2 + E * sin2λ_2 * cosφ), denominator = δxδφ * δyδλ - δyδφ * δxδλ;\n      if (!denominator) break;\n      var δλ = (fy * δxδφ - fx * δyδφ) / denominator, δφ = (fx * δyδλ - fy * δxδλ) / denominator;\n      λ -= δλ, φ -= δφ;\n    } while ((Math.abs(δλ) > ε || Math.abs(δφ) > ε) && --i > 0);\n    return [ λ, φ ];\n  };\n  (d3.geo.aitoff = function() {\n    return projection(aitoff);\n  }).raw = aitoff;\n  function winkel3(λ, φ) {\n    var coordinates = aitoff(λ, φ);\n    return [ (coordinates[0] + λ / halfπ) / 2, (coordinates[1] + φ) / 2 ];\n  }\n  winkel3.invert = function(x, y) {\n    var λ = x, φ = y, i = 25;\n    do {\n      var cosφ = Math.cos(φ), sinφ = Math.sin(φ), sin_2φ = Math.sin(2 * φ), sin2φ = sinφ * sinφ, cos2φ = cosφ * cosφ, sinλ = Math.sin(λ), cosλ_2 = Math.cos(λ / 2), sinλ_2 = Math.sin(λ / 2), sin2λ_2 = sinλ_2 * sinλ_2, C = 1 - cos2φ * cosλ_2 * cosλ_2, E = C ? acos(cosφ * cosλ_2) * Math.sqrt(F = 1 / C) : F = 0, F, fx = .5 * (2 * E * cosφ * sinλ_2 + λ / halfπ) - x, fy = .5 * (E * sinφ + φ) - y, δxδλ = .5 * F * (cos2φ * sin2λ_2 + E * cosφ * cosλ_2 * sin2φ) + .5 / halfπ, δxδφ = F * (sinλ * sin_2φ / 4 - E * sinφ * sinλ_2), δyδλ = .125 * F * (sin_2φ * sinλ_2 - E * sinφ * cos2φ * sinλ), δyδφ = .5 * F * (sin2φ * cosλ_2 + E * sin2λ_2 * cosφ) + .5, denominator = δxδφ * δyδλ - δyδφ * δxδλ, δλ = (fy * δxδφ - fx * δyδφ) / denominator, δφ = (fx * δyδλ - fy * δxδλ) / denominator;\n      λ -= δλ, φ -= δφ;\n    } while ((Math.abs(δλ) > ε || Math.abs(δφ) > ε) && --i > 0);\n    return [ λ, φ ];\n  };\n  (d3.geo.winkel3 = function() {\n    return projection(winkel3);\n  }).raw = winkel3;\n}\n\nmodule.exports = addProjectionsToD3;\n\n},{}],785:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar radians = Math.PI / 180;\nvar degrees = 180 / Math.PI;\nvar zoomstartStyle = {cursor: 'pointer'};\nvar zoomendStyle = {cursor: 'auto'};\n\nfunction createGeoZoom(geo, geoLayout) {\n    var projection = geo.projection;\n    var zoomConstructor;\n\n    if(geoLayout._isScoped) {\n        zoomConstructor = zoomScoped;\n    } else if(geoLayout._isClipped) {\n        zoomConstructor = zoomClipped;\n    } else {\n        zoomConstructor = zoomNonClipped;\n    }\n\n    // TODO add a conic-specific zoom\n\n    return zoomConstructor(geo, projection);\n}\n\nmodule.exports = createGeoZoom;\n\n// common to all zoom types\nfunction initZoom(geo, projection) {\n    return d3.behavior.zoom()\n        .translate(projection.translate())\n        .scale(projection.scale());\n}\n\n// sync zoom updates with user & full layout\nfunction sync(geo, projection, cb) {\n    var id = geo.id;\n    var gd = geo.graphDiv;\n    var layout = gd.layout;\n    var userOpts = layout[id];\n    var fullLayout = gd._fullLayout;\n    var fullOpts = fullLayout[id];\n\n    var preGUI = {};\n    var eventData = {};\n\n    function set(propStr, val) {\n        preGUI[id + '.' + propStr] = Lib.nestedProperty(userOpts, propStr).get();\n        Registry.call('_storeDirectGUIEdit', layout, fullLayout._preGUI, preGUI);\n\n        var fullNp = Lib.nestedProperty(fullOpts, propStr);\n        if(fullNp.get() !== val) {\n            fullNp.set(val);\n            Lib.nestedProperty(userOpts, propStr).set(val);\n            eventData[id + '.' + propStr] = val;\n        }\n    }\n\n    cb(set);\n    set('projection.scale', projection.scale() / geo.fitScale);\n    gd.emit('plotly_relayout', eventData);\n}\n\n// zoom for scoped projections\nfunction zoomScoped(geo, projection) {\n    var zoom = initZoom(geo, projection);\n\n    function handleZoomstart() {\n        d3.select(this).style(zoomstartStyle);\n    }\n\n    function handleZoom() {\n        projection\n            .scale(d3.event.scale)\n            .translate(d3.event.translate);\n        geo.render();\n\n        var center = projection.invert(geo.midPt);\n        geo.graphDiv.emit('plotly_relayouting', {\n            'geo.projection.scale': projection.scale() / geo.fitScale,\n            'geo.center.lon': center[0],\n            'geo.center.lat': center[1]\n        });\n    }\n\n    function syncCb(set) {\n        var center = projection.invert(geo.midPt);\n\n        set('center.lon', center[0]);\n        set('center.lat', center[1]);\n    }\n\n    function handleZoomend() {\n        d3.select(this).style(zoomendStyle);\n        sync(geo, projection, syncCb);\n    }\n\n    zoom\n        .on('zoomstart', handleZoomstart)\n        .on('zoom', handleZoom)\n        .on('zoomend', handleZoomend);\n\n    return zoom;\n}\n\n// zoom for non-clipped projections\nfunction zoomNonClipped(geo, projection) {\n    var zoom = initZoom(geo, projection);\n\n    var INSIDETOLORANCEPXS = 2;\n\n    var mouse0, rotate0, translate0, lastRotate, zoomPoint,\n        mouse1, rotate1, point1, didZoom;\n\n    function position(x) { return projection.invert(x); }\n\n    function outside(x) {\n        var pos = position(x);\n        if(!pos) return true;\n\n        var pt = projection(pos);\n        return (\n            Math.abs(pt[0] - x[0]) > INSIDETOLORANCEPXS ||\n            Math.abs(pt[1] - x[1]) > INSIDETOLORANCEPXS\n        );\n    }\n\n    function handleZoomstart() {\n        d3.select(this).style(zoomstartStyle);\n\n        mouse0 = d3.mouse(this);\n        rotate0 = projection.rotate();\n        translate0 = projection.translate();\n        lastRotate = rotate0;\n        zoomPoint = position(mouse0);\n    }\n\n    function handleZoom() {\n        mouse1 = d3.mouse(this);\n\n        if(outside(mouse0)) {\n            zoom.scale(projection.scale());\n            zoom.translate(projection.translate());\n            return;\n        }\n\n        projection.scale(d3.event.scale);\n        projection.translate([translate0[0], d3.event.translate[1]]);\n\n        if(!zoomPoint) {\n            mouse0 = mouse1;\n            zoomPoint = position(mouse0);\n        } else if(position(mouse1)) {\n            point1 = position(mouse1);\n            rotate1 = [lastRotate[0] + (point1[0] - zoomPoint[0]), rotate0[1], rotate0[2]];\n            projection.rotate(rotate1);\n            lastRotate = rotate1;\n        }\n\n        didZoom = true;\n        geo.render();\n\n        var rotate = projection.rotate();\n        var center = projection.invert(geo.midPt);\n        geo.graphDiv.emit('plotly_relayouting', {\n            'geo.projection.scale': projection.scale() / geo.fitScale,\n            'geo.center.lon': center[0],\n            'geo.center.lat': center[1],\n            'geo.projection.rotation.lon': -rotate[0]\n\n        });\n    }\n\n    function handleZoomend() {\n        d3.select(this).style(zoomendStyle);\n        if(didZoom) sync(geo, projection, syncCb);\n    }\n\n    function syncCb(set) {\n        var rotate = projection.rotate();\n        var center = projection.invert(geo.midPt);\n\n        set('projection.rotation.lon', -rotate[0]);\n        set('center.lon', center[0]);\n        set('center.lat', center[1]);\n    }\n\n    zoom\n        .on('zoomstart', handleZoomstart)\n        .on('zoom', handleZoom)\n        .on('zoomend', handleZoomend);\n\n    return zoom;\n}\n\n// zoom for clipped projections\n// inspired by https://www.jasondavies.com/maps/d3.geo.zoom.js\nfunction zoomClipped(geo, projection) {\n    var view = {r: projection.rotate(), k: projection.scale()};\n    var zoom = initZoom(geo, projection);\n    var event = d3eventDispatch(zoom, 'zoomstart', 'zoom', 'zoomend');\n    var zooming = 0;\n    var zoomOn = zoom.on;\n\n    var zoomPoint;\n\n    zoom.on('zoomstart', function() {\n        d3.select(this).style(zoomstartStyle);\n\n        var mouse0 = d3.mouse(this);\n        var rotate0 = projection.rotate();\n        var lastRotate = rotate0;\n        var translate0 = projection.translate();\n        var q = quaternionFromEuler(rotate0);\n\n        zoomPoint = position(projection, mouse0);\n\n        zoomOn.call(zoom, 'zoom', function() {\n            var mouse1 = d3.mouse(this);\n\n            projection.scale(view.k = d3.event.scale);\n\n            if(!zoomPoint) {\n                // if no zoomPoint, the mouse wasn't over the actual geography yet\n                // maybe this point is the start... we'll find out next time!\n                mouse0 = mouse1;\n                zoomPoint = position(projection, mouse0);\n            } else if(position(projection, mouse1)) {\n                // check if the point is on the map\n                // if not, don't do anything new but scale\n                // if it is, then we can assume between will exist below\n                // so we don't need the 'bank' function, whatever that is.\n\n                // go back to original projection temporarily\n                // except for scale... that's kind of independent?\n                projection\n                    .rotate(rotate0)\n                    .translate(translate0);\n\n                // calculate the new params\n                var point1 = position(projection, mouse1);\n                var between = rotateBetween(zoomPoint, point1);\n                var newEuler = eulerFromQuaternion(multiply(q, between));\n                var rotateAngles = view.r = unRoll(newEuler, zoomPoint, lastRotate);\n\n                if(!isFinite(rotateAngles[0]) || !isFinite(rotateAngles[1]) ||\n                   !isFinite(rotateAngles[2])) {\n                    rotateAngles = lastRotate;\n                }\n\n                // update the projection\n                projection.rotate(rotateAngles);\n                lastRotate = rotateAngles;\n            }\n\n            zoomed(event.of(this, arguments));\n        });\n\n        zoomstarted(event.of(this, arguments));\n    })\n    .on('zoomend', function() {\n        d3.select(this).style(zoomendStyle);\n        zoomOn.call(zoom, 'zoom', null);\n        zoomended(event.of(this, arguments));\n        sync(geo, projection, syncCb);\n    })\n    .on('zoom.redraw', function() {\n        geo.render();\n\n        var _rotate = projection.rotate();\n        geo.graphDiv.emit('plotly_relayouting', {\n            'geo.projection.scale': projection.scale() / geo.fitScale,\n            'geo.projection.rotation.lon': -_rotate[0],\n            'geo.projection.rotation.lat': -_rotate[1]\n        });\n    });\n\n    function zoomstarted(dispatch) {\n        if(!zooming++) dispatch({type: 'zoomstart'});\n    }\n\n    function zoomed(dispatch) {\n        dispatch({type: 'zoom'});\n    }\n\n    function zoomended(dispatch) {\n        if(!--zooming) dispatch({type: 'zoomend'});\n    }\n\n    function syncCb(set) {\n        var _rotate = projection.rotate();\n        set('projection.rotation.lon', -_rotate[0]);\n        set('projection.rotation.lat', -_rotate[1]);\n    }\n\n    return d3.rebind(zoom, event, 'on');\n}\n\n// -- helper functions for zoomClipped\n\nfunction position(projection, point) {\n    var spherical = projection.invert(point);\n    return spherical && isFinite(spherical[0]) && isFinite(spherical[1]) && cartesian(spherical);\n}\n\nfunction quaternionFromEuler(euler) {\n    var lambda = 0.5 * euler[0] * radians;\n    var phi = 0.5 * euler[1] * radians;\n    var gamma = 0.5 * euler[2] * radians;\n    var sinLambda = Math.sin(lambda);\n    var cosLambda = Math.cos(lambda);\n    var sinPhi = Math.sin(phi);\n    var cosPhi = Math.cos(phi);\n    var sinGamma = Math.sin(gamma);\n    var cosGamma = Math.cos(gamma);\n    return [\n        cosLambda * cosPhi * cosGamma + sinLambda * sinPhi * sinGamma,\n        sinLambda * cosPhi * cosGamma - cosLambda * sinPhi * sinGamma,\n        cosLambda * sinPhi * cosGamma + sinLambda * cosPhi * sinGamma,\n        cosLambda * cosPhi * sinGamma - sinLambda * sinPhi * cosGamma\n    ];\n}\n\nfunction multiply(a, b) {\n    var a0 = a[0];\n    var a1 = a[1];\n    var a2 = a[2];\n    var a3 = a[3];\n    var b0 = b[0];\n    var b1 = b[1];\n    var b2 = b[2];\n    var b3 = b[3];\n    return [\n        a0 * b0 - a1 * b1 - a2 * b2 - a3 * b3,\n        a0 * b1 + a1 * b0 + a2 * b3 - a3 * b2,\n        a0 * b2 - a1 * b3 + a2 * b0 + a3 * b1,\n        a0 * b3 + a1 * b2 - a2 * b1 + a3 * b0\n    ];\n}\n\nfunction rotateBetween(a, b) {\n    if(!a || !b) return;\n    var axis = cross(a, b);\n    var norm = Math.sqrt(dot(axis, axis));\n    var halfgamma = 0.5 * Math.acos(Math.max(-1, Math.min(1, dot(a, b))));\n    var k = Math.sin(halfgamma) / norm;\n    return norm && [Math.cos(halfgamma), axis[2] * k, -axis[1] * k, axis[0] * k];\n}\n\n// input:\n//   rotateAngles: a calculated set of Euler angles\n//   pt: a point (cartesian in 3-space) to keep fixed\n//   roll0: an initial roll, to be preserved\n// output:\n//   a set of Euler angles that preserve the projection of pt\n//     but set roll (output[2]) equal to roll0\n//     note that this doesn't depend on the particular projection,\n//     just on the rotation angles\nfunction unRoll(rotateAngles, pt, lastRotate) {\n    // calculate the fixed point transformed by these Euler angles\n    // but with the desired roll undone\n    var ptRotated = rotateCartesian(pt, 2, rotateAngles[0]);\n    ptRotated = rotateCartesian(ptRotated, 1, rotateAngles[1]);\n    ptRotated = rotateCartesian(ptRotated, 0, rotateAngles[2] - lastRotate[2]);\n\n    var x = pt[0];\n    var y = pt[1];\n    var z = pt[2];\n    var f = ptRotated[0];\n    var g = ptRotated[1];\n    var h = ptRotated[2];\n\n    // the following essentially solves:\n    // ptRotated = rotateCartesian(rotateCartesian(pt, 2, newYaw), 1, newPitch)\n    // for newYaw and newPitch, as best it can\n    var theta = Math.atan2(y, x) * degrees;\n    var a = Math.sqrt(x * x + y * y);\n    var b;\n    var newYaw1;\n\n    if(Math.abs(g) > a) {\n        newYaw1 = (g > 0 ? 90 : -90) - theta;\n        b = 0;\n    } else {\n        newYaw1 = Math.asin(g / a) * degrees - theta;\n        b = Math.sqrt(a * a - g * g);\n    }\n\n    var newYaw2 = 180 - newYaw1 - 2 * theta;\n    var newPitch1 = (Math.atan2(h, f) - Math.atan2(z, b)) * degrees;\n    var newPitch2 = (Math.atan2(h, f) - Math.atan2(z, -b)) * degrees;\n\n    // which is closest to lastRotate[0,1]: newYaw/Pitch or newYaw2/Pitch2?\n    var dist1 = angleDistance(lastRotate[0], lastRotate[1], newYaw1, newPitch1);\n    var dist2 = angleDistance(lastRotate[0], lastRotate[1], newYaw2, newPitch2);\n\n    if(dist1 <= dist2) return [newYaw1, newPitch1, lastRotate[2]];\n    else return [newYaw2, newPitch2, lastRotate[2]];\n}\n\nfunction angleDistance(yaw0, pitch0, yaw1, pitch1) {\n    var dYaw = angleMod(yaw1 - yaw0);\n    var dPitch = angleMod(pitch1 - pitch0);\n    return Math.sqrt(dYaw * dYaw + dPitch * dPitch);\n}\n\n// reduce an angle in degrees to [-180,180]\nfunction angleMod(angle) {\n    return (angle % 360 + 540) % 360 - 180;\n}\n\n// rotate a cartesian vector\n// axis is 0 (x), 1 (y), or 2 (z)\n// angle is in degrees\nfunction rotateCartesian(vector, axis, angle) {\n    var angleRads = angle * radians;\n    var vectorOut = vector.slice();\n    var ax1 = (axis === 0) ? 1 : 0;\n    var ax2 = (axis === 2) ? 1 : 2;\n    var cosa = Math.cos(angleRads);\n    var sina = Math.sin(angleRads);\n\n    vectorOut[ax1] = vector[ax1] * cosa - vector[ax2] * sina;\n    vectorOut[ax2] = vector[ax2] * cosa + vector[ax1] * sina;\n\n    return vectorOut;\n}\nfunction eulerFromQuaternion(q) {\n    return [\n        Math.atan2(2 * (q[0] * q[1] + q[2] * q[3]), 1 - 2 * (q[1] * q[1] + q[2] * q[2])) * degrees,\n        Math.asin(Math.max(-1, Math.min(1, 2 * (q[0] * q[2] - q[3] * q[1])))) * degrees,\n        Math.atan2(2 * (q[0] * q[3] + q[1] * q[2]), 1 - 2 * (q[2] * q[2] + q[3] * q[3])) * degrees\n    ];\n}\n\nfunction cartesian(spherical) {\n    var lambda = spherical[0] * radians;\n    var phi = spherical[1] * radians;\n    var cosPhi = Math.cos(phi);\n    return [\n        cosPhi * Math.cos(lambda),\n        cosPhi * Math.sin(lambda),\n        Math.sin(phi)\n    ];\n}\n\nfunction dot(a, b) {\n    var s = 0;\n    for(var i = 0, n = a.length; i < n; ++i) s += a[i] * b[i];\n    return s;\n}\n\nfunction cross(a, b) {\n    return [\n        a[1] * b[2] - a[2] * b[1],\n        a[2] * b[0] - a[0] * b[2],\n        a[0] * b[1] - a[1] * b[0]\n    ];\n}\n\n// Like d3.dispatch, but for custom events abstracting native UI events. These\n// events have a target component (such as a brush), a target element (such as\n// the svg:g element containing the brush) and the standard arguments `d` (the\n// target element's data) and `i` (the selection index of the target element).\nfunction d3eventDispatch(target) {\n    var i = 0;\n    var n = arguments.length;\n    var argumentz = [];\n\n    while(++i < n) argumentz.push(arguments[i]);\n\n    var dispatch = d3.dispatch.apply(null, argumentz);\n\n    // Creates a dispatch context for the specified `thiz` (typically, the target\n    // DOM element that received the source event) and `argumentz` (typically, the\n    // data `d` and index `i` of the target element). The returned function can be\n    // used to dispatch an event to any registered listeners; the function takes a\n    // single argument as input, being the event to dispatch. The event must have\n    // a \"type\" attribute which corresponds to a type registered in the\n    // constructor. This context will automatically populate the \"sourceEvent\" and\n    // \"target\" attributes of the event, as well as setting the `d3.event` global\n    // for the duration of the notification.\n    dispatch.of = function(thiz, argumentz) {\n        return function(e1) {\n            var e0;\n            try {\n                e0 = e1.sourceEvent = d3.event;\n                e1.target = target;\n                d3.event = e1;\n                dispatch[e1.type].apply(thiz, argumentz);\n            } finally {\n                d3.event = e0;\n            }\n        };\n    };\n\n    return dispatch;\n}\n\n},{\"../../lib\":703,\"../../registry\":831,\"d3\":157}],786:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\nvar SUBPLOT_PATTERN = _dereq_('./cartesian/constants').SUBPLOT_PATTERN;\n\n/**\n * Get calcdata trace(s) associated with a given subplot\n *\n * @param {array} calcData: as in gd.calcdata\n * @param {string} type: subplot type\n * @param {string} subplotId: subplot id to look for\n *\n * @return {array} array of calcdata traces\n */\nexports.getSubplotCalcData = function(calcData, type, subplotId) {\n    var basePlotModule = Registry.subplotsRegistry[type];\n    if(!basePlotModule) return [];\n\n    var attr = basePlotModule.attr;\n    var subplotCalcData = [];\n\n    for(var i = 0; i < calcData.length; i++) {\n        var calcTrace = calcData[i];\n        var trace = calcTrace[0].trace;\n\n        if(trace[attr] === subplotId) subplotCalcData.push(calcTrace);\n    }\n\n    return subplotCalcData;\n};\n/**\n * Get calcdata trace(s) that can be plotted with a given module\n * NOTE: this isn't necessarily just exactly matching trace type,\n * if multiple trace types use the same plotting routine, they will be\n * collected here.\n * In order to not plot the same thing multiple times, we return two arrays,\n * the calcdata we *will* plot with this module, and the ones we *won't*\n *\n * @param {array} calcdata: as in gd.calcdata\n * @param {object|string|fn} arg1:\n *  the plotting module, or its name, or its plot method\n *\n * @return {array[array]} [foundCalcdata, remainingCalcdata]\n */\nexports.getModuleCalcData = function(calcdata, arg1) {\n    var moduleCalcData = [];\n    var remainingCalcData = [];\n\n    var plotMethod;\n    if(typeof arg1 === 'string') {\n        plotMethod = Registry.getModule(arg1).plot;\n    } else if(typeof arg1 === 'function') {\n        plotMethod = arg1;\n    } else {\n        plotMethod = arg1.plot;\n    }\n    if(!plotMethod) {\n        return [moduleCalcData, calcdata];\n    }\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var trace = cd[0].trace;\n        // N.B.\n        // - 'legendonly' traces do not make it past here\n        // - skip over 'visible' traces that got trimmed completely during calc transforms\n        if(trace.visible !== true || trace._length === 0) continue;\n\n        // group calcdata trace not by 'module' (as the name of this function\n        // would suggest), but by 'module plot method' so that if some traces\n        // share the same module plot method (e.g. bar and histogram), we\n        // only call it one!\n        if(trace._module.plot === plotMethod) {\n            moduleCalcData.push(cd);\n        } else {\n            remainingCalcData.push(cd);\n        }\n    }\n\n    return [moduleCalcData, remainingCalcData];\n};\n\n/**\n * Get the data trace(s) associated with a given subplot.\n *\n * @param {array} data  plotly full data array.\n * @param {string} type subplot type to look for.\n * @param {string} subplotId subplot id to look for.\n *\n * @return {array} list of trace objects.\n *\n */\nexports.getSubplotData = function getSubplotData(data, type, subplotId) {\n    if(!Registry.subplotsRegistry[type]) return [];\n\n    var attr = Registry.subplotsRegistry[type].attr;\n    var subplotData = [];\n    var trace, subplotX, subplotY;\n\n    if(type === 'gl2d') {\n        var spmatch = subplotId.match(SUBPLOT_PATTERN);\n        subplotX = 'x' + spmatch[1];\n        subplotY = 'y' + spmatch[2];\n    }\n\n    for(var i = 0; i < data.length; i++) {\n        trace = data[i];\n\n        if(type === 'gl2d' && Registry.traceIs(trace, 'gl2d')) {\n            if(trace[attr[0]] === subplotX && trace[attr[1]] === subplotY) {\n                subplotData.push(trace);\n            }\n        } else {\n            if(trace[attr] === subplotId) subplotData.push(trace);\n        }\n    }\n\n    return subplotData;\n};\n\n},{\"../registry\":831,\"./cartesian/constants\":757}],787:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar mouseChange = _dereq_('mouse-change');\nvar mouseWheel = _dereq_('mouse-wheel');\nvar mouseOffset = _dereq_('mouse-event-offset');\nvar cartesianConstants = _dereq_('../cartesian/constants');\nvar hasPassive = _dereq_('has-passive-events');\n\nmodule.exports = createCamera;\n\nfunction Camera2D(element, plot) {\n    this.element = element;\n    this.plot = plot;\n    this.mouseListener = null;\n    this.wheelListener = null;\n    this.lastInputTime = Date.now();\n    this.lastPos = [0, 0];\n    this.boxEnabled = false;\n    this.boxInited = false;\n    this.boxStart = [0, 0];\n    this.boxEnd = [0, 0];\n    this.dragStart = [0, 0];\n}\n\n\nfunction createCamera(scene) {\n    var element = scene.mouseContainer;\n    var plot = scene.glplot;\n    var result = new Camera2D(element, plot);\n\n    function unSetAutoRange() {\n        scene.xaxis.autorange = false;\n        scene.yaxis.autorange = false;\n    }\n\n    function getSubplotConstraint() {\n        // note: this assumes we only have one x and one y axis on this subplot\n        // when this constraint is lifted this block won't make sense\n        var constraints = scene.graphDiv._fullLayout._axisConstraintGroups;\n        var xaId = scene.xaxis._id;\n        var yaId = scene.yaxis._id;\n        for(var i = 0; i < constraints.length; i++) {\n            if(constraints[i][xaId] !== -1) {\n                if(constraints[i][yaId] !== -1) return true;\n                break;\n            }\n        }\n        return false;\n    }\n\n    result.mouseListener = mouseChange(element, handleInteraction);\n\n    // enable simple touch interactions\n    element.addEventListener('touchstart', function(ev) {\n        var xy = mouseOffset(ev.changedTouches[0], element);\n        handleInteraction(0, xy[0], xy[1]);\n        handleInteraction(1, xy[0], xy[1]);\n\n        ev.preventDefault();\n    }, hasPassive ? {passive: false} : false);\n    element.addEventListener('touchmove', function(ev) {\n        ev.preventDefault();\n        var xy = mouseOffset(ev.changedTouches[0], element);\n        handleInteraction(1, xy[0], xy[1]);\n\n        ev.preventDefault();\n    }, hasPassive ? {passive: false} : false);\n    element.addEventListener('touchend', function(ev) {\n        handleInteraction(0, result.lastPos[0], result.lastPos[1]);\n\n        ev.preventDefault();\n    }, hasPassive ? {passive: false} : false);\n\n    function handleInteraction(buttons, x, y) {\n        var dataBox = scene.calcDataBox();\n        var viewBox = plot.viewBox;\n\n        var lastX = result.lastPos[0];\n        var lastY = result.lastPos[1];\n\n        var MINDRAG = cartesianConstants.MINDRAG * plot.pixelRatio;\n        var MINZOOM = cartesianConstants.MINZOOM * plot.pixelRatio;\n\n        var dx, dy;\n\n        x *= plot.pixelRatio;\n        y *= plot.pixelRatio;\n\n        // mouseChange gives y about top; convert to about bottom\n        y = (viewBox[3] - viewBox[1]) - y;\n\n        function updateRange(i0, start, end) {\n            var range0 = Math.min(start, end);\n            var range1 = Math.max(start, end);\n\n            if(range0 !== range1) {\n                dataBox[i0] = range0;\n                dataBox[i0 + 2] = range1;\n                result.dataBox = dataBox;\n                scene.setRanges(dataBox);\n            } else {\n                scene.selectBox.selectBox = [0, 0, 1, 1];\n                scene.glplot.setDirty();\n            }\n        }\n\n        switch(scene.fullLayout.dragmode) {\n            case 'zoom':\n                if(buttons) {\n                    var dataX = x /\n                            (viewBox[2] - viewBox[0]) * (dataBox[2] - dataBox[0]) +\n                        dataBox[0];\n                    var dataY = y /\n                            (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) +\n                        dataBox[1];\n\n                    if(!result.boxInited) {\n                        result.boxStart[0] = dataX;\n                        result.boxStart[1] = dataY;\n                        result.dragStart[0] = x;\n                        result.dragStart[1] = y;\n                    }\n\n                    result.boxEnd[0] = dataX;\n                    result.boxEnd[1] = dataY;\n\n                    // we need to mark the box as initialized right away\n                    // so that we can tell the start and end points apart\n                    result.boxInited = true;\n\n                    // but don't actually enable the box until the cursor moves\n                    if(!result.boxEnabled && (\n                        result.boxStart[0] !== result.boxEnd[0] ||\n                        result.boxStart[1] !== result.boxEnd[1])\n                    ) {\n                        result.boxEnabled = true;\n                    }\n\n                    // constrain aspect ratio if the axes require it\n                    var smallDx = Math.abs(result.dragStart[0] - x) < MINZOOM;\n                    var smallDy = Math.abs(result.dragStart[1] - y) < MINZOOM;\n                    if(getSubplotConstraint() && !(smallDx && smallDy)) {\n                        dx = result.boxEnd[0] - result.boxStart[0];\n                        dy = result.boxEnd[1] - result.boxStart[1];\n                        var dydx = (dataBox[3] - dataBox[1]) / (dataBox[2] - dataBox[0]);\n\n                        if(Math.abs(dx * dydx) > Math.abs(dy)) {\n                            result.boxEnd[1] = result.boxStart[1] +\n                                Math.abs(dx) * dydx * (dy >= 0 ? 1 : -1);\n\n                            // gl-select-box clips to the plot area bounds,\n                            // which breaks the axis constraint, so don't allow\n                            // this box to go out of bounds\n                            if(result.boxEnd[1] < dataBox[1]) {\n                                result.boxEnd[1] = dataBox[1];\n                                result.boxEnd[0] = result.boxStart[0] +\n                                    (dataBox[1] - result.boxStart[1]) / Math.abs(dydx);\n                            } else if(result.boxEnd[1] > dataBox[3]) {\n                                result.boxEnd[1] = dataBox[3];\n                                result.boxEnd[0] = result.boxStart[0] +\n                                    (dataBox[3] - result.boxStart[1]) / Math.abs(dydx);\n                            }\n                        } else {\n                            result.boxEnd[0] = result.boxStart[0] +\n                                Math.abs(dy) / dydx * (dx >= 0 ? 1 : -1);\n\n                            if(result.boxEnd[0] < dataBox[0]) {\n                                result.boxEnd[0] = dataBox[0];\n                                result.boxEnd[1] = result.boxStart[1] +\n                                    (dataBox[0] - result.boxStart[0]) * Math.abs(dydx);\n                            } else if(result.boxEnd[0] > dataBox[2]) {\n                                result.boxEnd[0] = dataBox[2];\n                                result.boxEnd[1] = result.boxStart[1] +\n                                    (dataBox[2] - result.boxStart[0]) * Math.abs(dydx);\n                            }\n                        }\n                    } else {\n                        // otherwise clamp small changes to the origin so we get 1D zoom\n\n                        if(smallDx) result.boxEnd[0] = result.boxStart[0];\n                        if(smallDy) result.boxEnd[1] = result.boxStart[1];\n                    }\n                } else if(result.boxEnabled) {\n                    dx = result.boxStart[0] !== result.boxEnd[0];\n                    dy = result.boxStart[1] !== result.boxEnd[1];\n                    if(dx || dy) {\n                        if(dx) {\n                            updateRange(0, result.boxStart[0], result.boxEnd[0]);\n                            scene.xaxis.autorange = false;\n                        }\n                        if(dy) {\n                            updateRange(1, result.boxStart[1], result.boxEnd[1]);\n                            scene.yaxis.autorange = false;\n                        }\n                        scene.relayoutCallback();\n                    } else {\n                        scene.glplot.setDirty();\n                    }\n                    result.boxEnabled = false;\n                    result.boxInited = false;\n                } else if(result.boxInited) {\n                    // if box was inited but button released then - reset the box\n\n                    result.boxInited = false;\n                }\n                break;\n\n            case 'pan':\n                result.boxEnabled = false;\n                result.boxInited = false;\n\n                if(buttons) {\n                    if(!result.panning) {\n                        result.dragStart[0] = x;\n                        result.dragStart[1] = y;\n                    }\n\n                    if(Math.abs(result.dragStart[0] - x) < MINDRAG) x = result.dragStart[0];\n                    if(Math.abs(result.dragStart[1] - y) < MINDRAG) y = result.dragStart[1];\n\n                    dx = (lastX - x) * (dataBox[2] - dataBox[0]) /\n                        (plot.viewBox[2] - plot.viewBox[0]);\n                    dy = (lastY - y) * (dataBox[3] - dataBox[1]) /\n                        (plot.viewBox[3] - plot.viewBox[1]);\n\n                    dataBox[0] += dx;\n                    dataBox[2] += dx;\n                    dataBox[1] += dy;\n                    dataBox[3] += dy;\n\n                    scene.setRanges(dataBox);\n\n                    result.panning = true;\n                    result.lastInputTime = Date.now();\n                    unSetAutoRange();\n                    scene.cameraChanged();\n                    scene.handleAnnotations();\n                } else if(result.panning) {\n                    result.panning = false;\n                    scene.relayoutCallback();\n                }\n                break;\n        }\n\n        result.lastPos[0] = x;\n        result.lastPos[1] = y;\n    }\n\n    result.wheelListener = mouseWheel(element, function(dx, dy) {\n        if(!scene.scrollZoom) return false;\n\n        var dataBox = scene.calcDataBox();\n        var viewBox = plot.viewBox;\n\n        var lastX = result.lastPos[0];\n        var lastY = result.lastPos[1];\n\n        var scale = Math.exp(5.0 * dy / (viewBox[3] - viewBox[1]));\n\n        var cx = lastX /\n                (viewBox[2] - viewBox[0]) * (dataBox[2] - dataBox[0]) +\n            dataBox[0];\n        var cy = lastY /\n                (viewBox[3] - viewBox[1]) * (dataBox[3] - dataBox[1]) +\n            dataBox[1];\n\n        dataBox[0] = (dataBox[0] - cx) * scale + cx;\n        dataBox[2] = (dataBox[2] - cx) * scale + cx;\n        dataBox[1] = (dataBox[1] - cy) * scale + cy;\n        dataBox[3] = (dataBox[3] - cy) * scale + cy;\n\n        scene.setRanges(dataBox);\n\n        result.lastInputTime = Date.now();\n        unSetAutoRange();\n        scene.cameraChanged();\n        scene.handleAnnotations();\n        scene.relayoutCallback();\n\n        return true;\n    }, true);\n\n    return result;\n}\n\n},{\"../cartesian/constants\":757,\"has-passive-events\":406,\"mouse-change\":430,\"mouse-event-offset\":431,\"mouse-wheel\":433}],788:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Axes = _dereq_('../cartesian/axes');\n\nvar str2RGBArray = _dereq_('../../lib/str2rgbarray');\n\nfunction Axes2DOptions(scene) {\n    this.scene = scene;\n    this.gl = scene.gl;\n    this.pixelRatio = scene.pixelRatio;\n\n    this.screenBox = [0, 0, 1, 1];\n    this.viewBox = [0, 0, 1, 1];\n    this.dataBox = [-1, -1, 1, 1];\n\n    this.borderLineEnable = [false, false, false, false];\n    this.borderLineWidth = [1, 1, 1, 1];\n    this.borderLineColor = [\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1]\n    ];\n\n    this.ticks = [[], []];\n    this.tickEnable = [true, true, false, false];\n    this.tickPad = [15, 15, 15, 15];\n    this.tickAngle = [0, 0, 0, 0];\n    this.tickColor = [\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1]\n    ];\n    this.tickMarkLength = [0, 0, 0, 0];\n    this.tickMarkWidth = [0, 0, 0, 0];\n    this.tickMarkColor = [\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1]\n    ];\n\n    this.labels = ['x', 'y'];\n    this.labelEnable = [true, true, false, false];\n    this.labelAngle = [0, Math.PI / 2, 0, 3.0 * Math.PI / 2];\n    this.labelPad = [15, 15, 15, 15];\n    this.labelSize = [12, 12];\n    this.labelFont = ['sans-serif', 'sans-serif'];\n    this.labelColor = [\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1],\n        [0, 0, 0, 1]\n    ];\n\n    this.title = '';\n    this.titleEnable = true;\n    this.titleCenter = [0, 0, 0, 0];\n    this.titleAngle = 0;\n    this.titleColor = [0, 0, 0, 1];\n    this.titleFont = 'sans-serif';\n    this.titleSize = 18;\n\n    this.gridLineEnable = [true, true];\n    this.gridLineColor = [\n        [0, 0, 0, 0.5],\n        [0, 0, 0, 0.5]\n    ];\n    this.gridLineWidth = [1, 1];\n\n    this.zeroLineEnable = [true, true];\n    this.zeroLineWidth = [1, 1];\n    this.zeroLineColor = [\n        [0, 0, 0, 1],\n        [0, 0, 0, 1]\n    ];\n\n    this.borderColor = [0, 0, 0, 0];\n    this.backgroundColor = [0, 0, 0, 0];\n\n    this.static = this.scene.staticPlot;\n}\n\nvar proto = Axes2DOptions.prototype;\n\nvar AXES = ['xaxis', 'yaxis'];\n\nproto.merge = function(options) {\n    // titles are rendered in SVG\n    this.titleEnable = false;\n    this.backgroundColor = str2RGBArray(options.plot_bgcolor);\n\n    var axisName, ax, axTitle, axMirror;\n    var hasAxisInDfltPos, hasAxisInAltrPos, hasSharedAxis, mirrorLines, mirrorTicks;\n    var i, j;\n\n    for(i = 0; i < 2; ++i) {\n        axisName = AXES[i];\n        var axisLetter = axisName.charAt(0);\n\n        // get options relevant to this subplot,\n        // '_name' is e.g. xaxis, xaxis2, yaxis, yaxis4 ...\n        ax = options[this.scene[axisName]._name];\n\n        axTitle = ax.title.text === this.scene.fullLayout._dfltTitle[axisLetter] ? '' : ax.title.text;\n\n        for(j = 0; j <= 2; j += 2) {\n            this.labelEnable[i + j] = false;\n            this.labels[i + j] = axTitle;\n            this.labelColor[i + j] = str2RGBArray(ax.title.font.color);\n            this.labelFont[i + j] = ax.title.font.family;\n            this.labelSize[i + j] = ax.title.font.size;\n            this.labelPad[i + j] = this.getLabelPad(axisName, ax);\n\n            this.tickEnable[i + j] = false;\n            this.tickColor[i + j] = str2RGBArray((ax.tickfont || {}).color);\n            this.tickAngle[i + j] = (ax.tickangle === 'auto') ?\n                0 :\n                Math.PI * -ax.tickangle / 180;\n            this.tickPad[i + j] = this.getTickPad(ax);\n\n            this.tickMarkLength[i + j] = 0;\n            this.tickMarkWidth[i + j] = ax.tickwidth || 0;\n            this.tickMarkColor[i + j] = str2RGBArray(ax.tickcolor);\n\n            this.borderLineEnable[i + j] = false;\n            this.borderLineColor[i + j] = str2RGBArray(ax.linecolor);\n            this.borderLineWidth[i + j] = ax.linewidth || 0;\n        }\n\n        hasSharedAxis = this.hasSharedAxis(ax);\n        hasAxisInDfltPos = this.hasAxisInDfltPos(axisName, ax) && !hasSharedAxis;\n        hasAxisInAltrPos = this.hasAxisInAltrPos(axisName, ax) && !hasSharedAxis;\n\n        axMirror = ax.mirror || false;\n        mirrorLines = hasSharedAxis ?\n            (String(axMirror).indexOf('all') !== -1) :  // 'all' or 'allticks'\n            !!axMirror;                                 // all but false\n        mirrorTicks = hasSharedAxis ?\n            (axMirror === 'allticks') :\n            (String(axMirror).indexOf('ticks') !== -1); // 'ticks' or 'allticks'\n\n        // Axis titles and tick labels can only appear of one side of the scene\n        //  and are never show on subplots that share existing axes.\n\n        if(hasAxisInDfltPos) this.labelEnable[i] = true;\n        else if(hasAxisInAltrPos) this.labelEnable[i + 2] = true;\n\n        if(hasAxisInDfltPos) this.tickEnable[i] = ax.showticklabels;\n        else if(hasAxisInAltrPos) this.tickEnable[i + 2] = ax.showticklabels;\n\n        // Grid lines and ticks can appear on both sides of the scene\n        //  and can appear on subplot that share existing axes via `ax.mirror`.\n\n        if(hasAxisInDfltPos || mirrorLines) this.borderLineEnable[i] = ax.showline;\n        if(hasAxisInAltrPos || mirrorLines) this.borderLineEnable[i + 2] = ax.showline;\n\n        if(hasAxisInDfltPos || mirrorTicks) this.tickMarkLength[i] = this.getTickMarkLength(ax);\n        if(hasAxisInAltrPos || mirrorTicks) this.tickMarkLength[i + 2] = this.getTickMarkLength(ax);\n\n        this.gridLineEnable[i] = ax.showgrid;\n        this.gridLineColor[i] = str2RGBArray(ax.gridcolor);\n        this.gridLineWidth[i] = ax.gridwidth;\n\n        this.zeroLineEnable[i] = ax.zeroline;\n        this.zeroLineColor[i] = str2RGBArray(ax.zerolinecolor);\n        this.zeroLineWidth[i] = ax.zerolinewidth;\n    }\n};\n\n// is an axis shared with an already-drawn subplot ?\nproto.hasSharedAxis = function(ax) {\n    var scene = this.scene;\n    var subplotIds = scene.fullLayout._subplots.gl2d;\n    var list = Axes.findSubplotsWithAxis(subplotIds, ax);\n\n    // if index === 0, then the subplot is already drawn as subplots\n    // are drawn in order.\n    return (list.indexOf(scene.id) !== 0);\n};\n\n// has an axis in default position (i.e. bottom/left) ?\nproto.hasAxisInDfltPos = function(axisName, ax) {\n    var axSide = ax.side;\n\n    if(axisName === 'xaxis') return (axSide === 'bottom');\n    else if(axisName === 'yaxis') return (axSide === 'left');\n};\n\n// has an axis in alternate position (i.e. top/right) ?\nproto.hasAxisInAltrPos = function(axisName, ax) {\n    var axSide = ax.side;\n\n    if(axisName === 'xaxis') return (axSide === 'top');\n    else if(axisName === 'yaxis') return (axSide === 'right');\n};\n\nproto.getLabelPad = function(axisName, ax) {\n    var offsetBase = 1.5;\n    var fontSize = ax.title.font.size;\n    var showticklabels = ax.showticklabels;\n\n    if(axisName === 'xaxis') {\n        return (ax.side === 'top') ?\n            -10 + fontSize * (offsetBase + (showticklabels ? 1 : 0)) :\n            -10 + fontSize * (offsetBase + (showticklabels ? 0.5 : 0));\n    } else if(axisName === 'yaxis') {\n        return (ax.side === 'right') ?\n            10 + fontSize * (offsetBase + (showticklabels ? 1 : 0.5)) :\n            10 + fontSize * (offsetBase + (showticklabels ? 0.5 : 0));\n    }\n};\n\nproto.getTickPad = function(ax) {\n    return (ax.ticks === 'outside') ? 10 + ax.ticklen : 15;\n};\n\nproto.getTickMarkLength = function(ax) {\n    if(!ax.ticks) return 0;\n\n    var ticklen = ax.ticklen;\n\n    return (ax.ticks === 'inside') ? -ticklen : ticklen;\n};\n\n\nfunction createAxes2D(scene) {\n    return new Axes2DOptions(scene);\n}\n\nmodule.exports = createAxes2D;\n\n},{\"../../lib/str2rgbarray\":726,\"../cartesian/axes\":751}],789:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar Scene2D = _dereq_('./scene2d');\nvar layoutGlobalAttrs = _dereq_('../layout_attributes');\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\nvar constants = _dereq_('../cartesian/constants');\nvar Cartesian = _dereq_('../cartesian');\nvar fxAttrs = _dereq_('../../components/fx/layout_attributes');\nvar getSubplotData = _dereq_('../get_data').getSubplotData;\n\nexports.name = 'gl2d';\n\nexports.attr = ['xaxis', 'yaxis'];\n\nexports.idRoot = ['x', 'y'];\n\nexports.idRegex = constants.idRegex;\n\nexports.attrRegex = constants.attrRegex;\n\nexports.attributes = _dereq_('../cartesian/attributes');\n\nexports.supplyLayoutDefaults = function(layoutIn, layoutOut, fullData) {\n    if(!layoutOut._has('cartesian')) {\n        Cartesian.supplyLayoutDefaults(layoutIn, layoutOut, fullData);\n    }\n};\n\n// gl2d uses svg axis attributes verbatim, but overrides editType\n// this could potentially be just `layoutAttributes` but it would\n// still need special handling somewhere to give it precedence over\n// the svg version when both are in use on one plot\nexports.layoutAttrOverrides = overrideAll(Cartesian.layoutAttributes, 'plot', 'from-root');\n\n// similar overrides for base plot attributes (and those added by components)\nexports.baseLayoutAttrOverrides = overrideAll({\n    plot_bgcolor: layoutGlobalAttrs.plot_bgcolor,\n    hoverlabel: fxAttrs.hoverlabel\n    // dragmode needs calc but only when transitioning TO lasso or select\n    // so for now it's left inside _relayout\n    // dragmode: fxAttrs.dragmode\n}, 'plot', 'nested');\n\nexports.plot = function plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n    var subplotIds = fullLayout._subplots.gl2d;\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplotId = subplotIds[i];\n        var subplotObj = fullLayout._plots[subplotId];\n        var fullSubplotData = getSubplotData(fullData, 'gl2d', subplotId);\n\n        // ref. to corresp. Scene instance\n        var scene = subplotObj._scene2d;\n\n        // If Scene is not instantiated, create one!\n        if(scene === undefined) {\n            scene = new Scene2D({\n                id: subplotId,\n                graphDiv: gd,\n                container: gd.querySelector('.gl-container'),\n                staticPlot: gd._context.staticPlot,\n                plotGlPixelRatio: gd._context.plotGlPixelRatio\n            },\n                fullLayout\n            );\n\n            // set ref to Scene instance\n            subplotObj._scene2d = scene;\n        }\n\n        scene.plot(fullSubplotData, gd.calcdata, fullLayout, gd.layout);\n    }\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldSceneKeys = oldFullLayout._subplots.gl2d || [];\n\n    for(var i = 0; i < oldSceneKeys.length; i++) {\n        var id = oldSceneKeys[i];\n        var oldSubplot = oldFullLayout._plots[id];\n\n        // old subplot wasn't gl2d; nothing to do\n        if(!oldSubplot._scene2d) continue;\n\n        // if no traces are present, delete gl2d subplot\n        var subplotData = getSubplotData(newFullData, 'gl2d', id);\n        if(subplotData.length === 0) {\n            oldSubplot._scene2d.destroy();\n            delete oldFullLayout._plots[id];\n        }\n    }\n\n    // since we use cartesian interactions, do cartesian clean\n    Cartesian.clean.apply(this, arguments);\n};\n\nexports.drawFramework = function(gd) {\n    if(!gd._context.staticPlot) {\n        Cartesian.drawFramework(gd);\n    }\n};\n\nexports.toSVG = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots.gl2d;\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplot = fullLayout._plots[subplotIds[i]];\n        var scene = subplot._scene2d;\n\n        var imageData = scene.toImage('png');\n        var image = fullLayout._glimages.append('svg:image');\n\n        image.attr({\n            xmlns: xmlnsNamespaces.svg,\n            'xlink:href': imageData,\n            x: 0,\n            y: 0,\n            width: '100%',\n            height: '100%',\n            preserveAspectRatio: 'none'\n        });\n\n        scene.destroy();\n    }\n};\n\nexports.updateFx = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots.gl2d;\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplotObj = fullLayout._plots[subplotIds[i]]._scene2d;\n        subplotObj.updateFx(fullLayout.dragmode);\n    }\n};\n\n},{\"../../components/fx/layout_attributes\":620,\"../../constants/xmlns_namespaces\":681,\"../../plot_api/edit_types\":734,\"../cartesian\":762,\"../cartesian/attributes\":749,\"../cartesian/constants\":757,\"../get_data\":786,\"../layout_attributes\":803,\"./scene2d\":790}],790:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Fx = _dereq_('../../components/fx');\n\nvar createPlot2D = _dereq_('gl-plot2d');\nvar createSpikes = _dereq_('gl-spikes2d');\nvar createSelectBox = _dereq_('gl-select-box');\nvar getContext = _dereq_('webgl-context');\n\nvar createOptions = _dereq_('./convert');\nvar createCamera = _dereq_('./camera');\nvar showNoWebGlMsg = _dereq_('../../lib/show_no_webgl_msg');\nvar axisConstraints = _dereq_('../cartesian/constraints');\nvar enforceAxisConstraints = axisConstraints.enforce;\nvar cleanAxisConstraints = axisConstraints.clean;\nvar doAutoRange = _dereq_('../cartesian/autorange').doAutoRange;\n\nvar AXES = ['xaxis', 'yaxis'];\nvar STATIC_CANVAS, STATIC_CONTEXT;\n\nvar SUBPLOT_PATTERN = _dereq_('../cartesian/constants').SUBPLOT_PATTERN;\n\n\nfunction Scene2D(options, fullLayout) {\n    this.container = options.container;\n    this.graphDiv = options.graphDiv;\n    this.pixelRatio = options.plotGlPixelRatio || window.devicePixelRatio;\n    this.id = options.id;\n    this.staticPlot = !!options.staticPlot;\n    this.scrollZoom = this.graphDiv._context._scrollZoom.cartesian;\n\n    this.fullData = null;\n    this.updateRefs(fullLayout);\n\n    this.makeFramework();\n    if(this.stopped) return;\n\n    // update options\n    this.glplotOptions = createOptions(this);\n    this.glplotOptions.merge(fullLayout);\n\n    // create the plot\n    this.glplot = createPlot2D(this.glplotOptions);\n\n    // create camera\n    this.camera = createCamera(this);\n\n    // trace set\n    this.traces = {};\n\n    // create axes spikes\n    this.spikes = createSpikes(this.glplot);\n\n    this.selectBox = createSelectBox(this.glplot, {\n        innerFill: false,\n        outerFill: true\n    });\n\n    // last button state\n    this.lastButtonState = 0;\n\n    // last pick result\n    this.pickResult = null;\n\n    // is the mouse over the plot?\n    // it's OK if this says true when it's not, so long as\n    // when we get a mouseout we set it to false before handling\n    this.isMouseOver = true;\n\n    // flag to stop render loop\n    this.stopped = false;\n\n    // redraw the plot\n    this.redraw = this.draw.bind(this);\n    this.redraw();\n}\n\nmodule.exports = Scene2D;\n\nvar proto = Scene2D.prototype;\n\nproto.makeFramework = function() {\n    // create canvas and gl context\n    if(this.staticPlot) {\n        if(!STATIC_CONTEXT) {\n            STATIC_CANVAS = document.createElement('canvas');\n\n            STATIC_CONTEXT = getContext({\n                canvas: STATIC_CANVAS,\n                preserveDrawingBuffer: false,\n                premultipliedAlpha: true,\n                antialias: true\n            });\n\n            if(!STATIC_CONTEXT) {\n                throw new Error('Error creating static canvas/context for image server');\n            }\n        }\n\n        this.canvas = STATIC_CANVAS;\n        this.gl = STATIC_CONTEXT;\n    } else {\n        var liveCanvas = this.container.querySelector('.gl-canvas-focus');\n\n        var gl = getContext({\n            canvas: liveCanvas,\n            preserveDrawingBuffer: true,\n            premultipliedAlpha: true\n        });\n\n        if(!gl) {\n            showNoWebGlMsg(this);\n            this.stopped = true;\n            return;\n        }\n\n        this.canvas = liveCanvas;\n        this.gl = gl;\n    }\n\n    // position the canvas\n    var canvas = this.canvas;\n\n    canvas.style.width = '100%';\n    canvas.style.height = '100%';\n    canvas.style.position = 'absolute';\n    canvas.style.top = '0px';\n    canvas.style.left = '0px';\n    canvas.style['pointer-events'] = 'none';\n\n    this.updateSize(canvas);\n\n    // disabling user select on the canvas\n    // sanitizes double-clicks interactions\n    // ref: https://github.com/plotly/plotly.js/issues/744\n    canvas.className += ' user-select-none';\n\n    // create SVG container for hover text\n    var svgContainer = this.svgContainer = document.createElementNS(\n        'http://www.w3.org/2000/svg',\n        'svg');\n    svgContainer.style.position = 'absolute';\n    svgContainer.style.top = svgContainer.style.left = '0px';\n    svgContainer.style.width = svgContainer.style.height = '100%';\n    svgContainer.style['z-index'] = 20;\n    svgContainer.style['pointer-events'] = 'none';\n\n    // create div to catch the mouse event\n    var mouseContainer = this.mouseContainer = document.createElement('div');\n    mouseContainer.style.position = 'absolute';\n    mouseContainer.style['pointer-events'] = 'auto';\n\n    this.pickCanvas = this.container.querySelector('.gl-canvas-pick');\n\n\n    // append canvas, hover svg and mouse div to container\n    var container = this.container;\n    container.appendChild(svgContainer);\n    container.appendChild(mouseContainer);\n\n    var self = this;\n    mouseContainer.addEventListener('mouseout', function() {\n        self.isMouseOver = false;\n        self.unhover();\n    });\n    mouseContainer.addEventListener('mouseover', function() {\n        self.isMouseOver = true;\n    });\n};\n\nproto.toImage = function(format) {\n    if(!format) format = 'png';\n\n    this.stopped = true;\n\n    if(this.staticPlot) this.container.appendChild(STATIC_CANVAS);\n\n    // update canvas size\n    this.updateSize(this.canvas);\n\n\n    // grab context and yank out pixels\n    var gl = this.glplot.gl;\n    var w = gl.drawingBufferWidth;\n    var h = gl.drawingBufferHeight;\n\n    // force redraw\n    gl.clearColor(1, 1, 1, 0);\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n    this.glplot.setDirty();\n    this.glplot.draw();\n\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n    var pixels = new Uint8Array(w * h * 4);\n    gl.readPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\n\n    // flip pixels\n    for(var j = 0, k = h - 1; j < k; ++j, --k) {\n        for(var i = 0; i < w; ++i) {\n            for(var l = 0; l < 4; ++l) {\n                var tmp = pixels[4 * (w * j + i) + l];\n                pixels[4 * (w * j + i) + l] = pixels[4 * (w * k + i) + l];\n                pixels[4 * (w * k + i) + l] = tmp;\n            }\n        }\n    }\n\n    var canvas = document.createElement('canvas');\n    canvas.width = w;\n    canvas.height = h;\n\n    var context = canvas.getContext('2d');\n    var imageData = context.createImageData(w, h);\n    imageData.data.set(pixels);\n    context.putImageData(imageData, 0, 0);\n\n    var dataURL;\n\n    switch(format) {\n        case 'jpeg':\n            dataURL = canvas.toDataURL('image/jpeg');\n            break;\n        case 'webp':\n            dataURL = canvas.toDataURL('image/webp');\n            break;\n        default:\n            dataURL = canvas.toDataURL('image/png');\n    }\n\n    if(this.staticPlot) this.container.removeChild(STATIC_CANVAS);\n\n    return dataURL;\n};\n\nproto.updateSize = function(canvas) {\n    if(!canvas) canvas = this.canvas;\n\n    var pixelRatio = this.pixelRatio;\n    var fullLayout = this.fullLayout;\n\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n    var pixelWidth = Math.ceil(pixelRatio * width) |0;\n    var pixelHeight = Math.ceil(pixelRatio * height) |0;\n\n    // check for resize\n    if(canvas.width !== pixelWidth || canvas.height !== pixelHeight) {\n        canvas.width = pixelWidth;\n        canvas.height = pixelHeight;\n    }\n\n    return canvas;\n};\n\nproto.computeTickMarks = function() {\n    this.xaxis.setScale();\n    this.yaxis.setScale();\n\n    var nextTicks = [\n        Axes.calcTicks(this.xaxis),\n        Axes.calcTicks(this.yaxis)\n    ];\n\n    for(var j = 0; j < 2; ++j) {\n        for(var i = 0; i < nextTicks[j].length; ++i) {\n            // coercing tick value (may not be a string) to a string\n            nextTicks[j][i].text = nextTicks[j][i].text + '';\n        }\n    }\n\n    return nextTicks;\n};\n\nfunction compareTicks(a, b) {\n    for(var i = 0; i < 2; ++i) {\n        var aticks = a[i];\n        var bticks = b[i];\n\n        if(aticks.length !== bticks.length) return true;\n\n        for(var j = 0; j < aticks.length; ++j) {\n            if(aticks[j].x !== bticks[j].x) return true;\n        }\n    }\n\n    return false;\n}\n\nproto.updateRefs = function(newFullLayout) {\n    this.fullLayout = newFullLayout;\n\n    var spmatch = this.id.match(SUBPLOT_PATTERN);\n    var xaxisName = 'xaxis' + spmatch[1];\n    var yaxisName = 'yaxis' + spmatch[2];\n\n    this.xaxis = this.fullLayout[xaxisName];\n    this.yaxis = this.fullLayout[yaxisName];\n};\n\nproto.relayoutCallback = function() {\n    var graphDiv = this.graphDiv;\n    var xaxis = this.xaxis;\n    var yaxis = this.yaxis;\n    var layout = graphDiv.layout;\n\n    // make a meaningful value to be passed on to possible 'plotly_relayout' subscriber(s)\n    var update = {};\n    var xrange = update[xaxis._name + '.range'] = xaxis.range.slice();\n    var yrange = update[yaxis._name + '.range'] = yaxis.range.slice();\n    update[xaxis._name + '.autorange'] = xaxis.autorange;\n    update[yaxis._name + '.autorange'] = yaxis.autorange;\n\n    Registry.call('_storeDirectGUIEdit', graphDiv.layout, graphDiv._fullLayout._preGUI, update);\n\n    // update the input layout\n    var xaIn = layout[xaxis._name];\n    xaIn.range = xrange;\n    xaIn.autorange = xaxis.autorange;\n\n    var yaIn = layout[yaxis._name];\n    yaIn.range = yrange;\n    yaIn.autorange = yaxis.autorange;\n\n    // lastInputTime helps determine which one is the latest input (if async)\n    update.lastInputTime = this.camera.lastInputTime;\n    graphDiv.emit('plotly_relayout', update);\n};\n\nproto.cameraChanged = function() {\n    var camera = this.camera;\n\n    this.glplot.setDataBox(this.calcDataBox());\n\n    var nextTicks = this.computeTickMarks();\n    var curTicks = this.glplotOptions.ticks;\n\n    if(compareTicks(nextTicks, curTicks)) {\n        this.glplotOptions.ticks = nextTicks;\n        this.glplotOptions.dataBox = camera.dataBox;\n        this.glplot.update(this.glplotOptions);\n        this.handleAnnotations();\n    }\n};\n\nproto.handleAnnotations = function() {\n    var gd = this.graphDiv;\n    var annotations = this.fullLayout.annotations;\n\n    for(var i = 0; i < annotations.length; i++) {\n        var ann = annotations[i];\n\n        if(ann.xref === this.xaxis._id && ann.yref === this.yaxis._id) {\n            Registry.getComponentMethod('annotations', 'drawOne')(gd, i);\n        }\n    }\n};\n\nproto.destroy = function() {\n    if(!this.glplot) return;\n\n    var traces = this.traces;\n\n    if(traces) {\n        Object.keys(traces).map(function(key) {\n            traces[key].dispose();\n            delete traces[key];\n        });\n    }\n\n    this.glplot.dispose();\n\n    this.container.removeChild(this.svgContainer);\n    this.container.removeChild(this.mouseContainer);\n\n    this.fullData = null;\n    this.glplot = null;\n    this.stopped = true;\n    this.camera.mouseListener.enabled = false;\n    this.mouseContainer.removeEventListener('wheel', this.camera.wheelListener);\n    this.camera = null;\n};\n\nproto.plot = function(fullData, calcData, fullLayout) {\n    var glplot = this.glplot;\n\n    this.updateRefs(fullLayout);\n    this.xaxis.clearCalc();\n    this.yaxis.clearCalc();\n    this.updateTraces(fullData, calcData);\n    this.updateFx(fullLayout.dragmode);\n\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n\n    this.updateSize(this.canvas);\n\n    var options = this.glplotOptions;\n    options.merge(fullLayout);\n    options.screenBox = [0, 0, width, height];\n\n    var mockGraphDiv = {_fullLayout: {\n        _axisConstraintGroups: this.graphDiv._fullLayout._axisConstraintGroups,\n        xaxis: this.xaxis,\n        yaxis: this.yaxis\n    }};\n\n    cleanAxisConstraints(mockGraphDiv, this.xaxis);\n    cleanAxisConstraints(mockGraphDiv, this.yaxis);\n\n    var size = fullLayout._size;\n    var domainX = this.xaxis.domain;\n    var domainY = this.yaxis.domain;\n\n    options.viewBox = [\n        size.l + domainX[0] * size.w,\n        size.b + domainY[0] * size.h,\n        (width - size.r) - (1 - domainX[1]) * size.w,\n        (height - size.t) - (1 - domainY[1]) * size.h\n    ];\n\n    this.mouseContainer.style.width = size.w * (domainX[1] - domainX[0]) + 'px';\n    this.mouseContainer.style.height = size.h * (domainY[1] - domainY[0]) + 'px';\n    this.mouseContainer.height = size.h * (domainY[1] - domainY[0]);\n    this.mouseContainer.style.left = size.l + domainX[0] * size.w + 'px';\n    this.mouseContainer.style.top = size.t + (1 - domainY[1]) * size.h + 'px';\n\n    var ax, i;\n\n    for(i = 0; i < 2; ++i) {\n        ax = this[AXES[i]];\n        ax._length = options.viewBox[i + 2] - options.viewBox[i];\n\n        doAutoRange(this.graphDiv, ax);\n        ax.setScale();\n    }\n\n    enforceAxisConstraints(mockGraphDiv);\n\n    options.ticks = this.computeTickMarks();\n\n    options.dataBox = this.calcDataBox();\n\n    options.merge(fullLayout);\n    glplot.update(options);\n\n    // force redraw so that promise is returned when rendering is completed\n    this.glplot.draw();\n};\n\nproto.calcDataBox = function() {\n    var xaxis = this.xaxis;\n    var yaxis = this.yaxis;\n    var xrange = xaxis.range;\n    var yrange = yaxis.range;\n    var xr2l = xaxis.r2l;\n    var yr2l = yaxis.r2l;\n\n    return [xr2l(xrange[0]), yr2l(yrange[0]), xr2l(xrange[1]), yr2l(yrange[1])];\n};\n\nproto.setRanges = function(dataBox) {\n    var xaxis = this.xaxis;\n    var yaxis = this.yaxis;\n    var xl2r = xaxis.l2r;\n    var yl2r = yaxis.l2r;\n\n    xaxis.range = [xl2r(dataBox[0]), xl2r(dataBox[2])];\n    yaxis.range = [yl2r(dataBox[1]), yl2r(dataBox[3])];\n};\n\nproto.updateTraces = function(fullData, calcData) {\n    var traceIds = Object.keys(this.traces);\n    var i, j, fullTrace;\n\n    this.fullData = fullData;\n\n    // remove empty traces\n    traceIdLoop:\n    for(i = 0; i < traceIds.length; i++) {\n        var oldUid = traceIds[i];\n        var oldTrace = this.traces[oldUid];\n\n        for(j = 0; j < fullData.length; j++) {\n            fullTrace = fullData[j];\n\n            if(fullTrace.uid === oldUid && fullTrace.type === oldTrace.type) {\n                continue traceIdLoop;\n            }\n        }\n\n        oldTrace.dispose();\n        delete this.traces[oldUid];\n    }\n\n    // update / create trace objects\n    for(i = 0; i < fullData.length; i++) {\n        fullTrace = fullData[i];\n        var calcTrace = calcData[i];\n        var traceObj = this.traces[fullTrace.uid];\n\n        if(traceObj) traceObj.update(fullTrace, calcTrace);\n        else {\n            traceObj = fullTrace._module.plot(this, fullTrace, calcTrace);\n            this.traces[fullTrace.uid] = traceObj;\n        }\n    }\n\n    // order object per traces\n    this.glplot.objects.sort(function(a, b) {\n        return a._trace.index - b._trace.index;\n    });\n};\n\nproto.updateFx = function(dragmode) {\n    // switch to svg interactions in lasso/select mode\n    if(dragmode === 'lasso' || dragmode === 'select') {\n        this.pickCanvas.style['pointer-events'] = 'none';\n        this.mouseContainer.style['pointer-events'] = 'none';\n    } else {\n        this.pickCanvas.style['pointer-events'] = 'auto';\n        this.mouseContainer.style['pointer-events'] = 'auto';\n    }\n\n    // set proper cursor\n    if(dragmode === 'pan') {\n        this.mouseContainer.style.cursor = 'move';\n    } else if(dragmode === 'zoom') {\n        this.mouseContainer.style.cursor = 'crosshair';\n    } else {\n        this.mouseContainer.style.cursor = null;\n    }\n};\n\nproto.emitPointAction = function(nextSelection, eventType) {\n    var uid = nextSelection.trace.uid;\n    var ptNumber = nextSelection.pointIndex;\n    var trace;\n\n    for(var i = 0; i < this.fullData.length; i++) {\n        if(this.fullData[i].uid === uid) {\n            trace = this.fullData[i];\n        }\n    }\n\n    var pointData = {\n        x: nextSelection.traceCoord[0],\n        y: nextSelection.traceCoord[1],\n        curveNumber: trace.index,\n        pointNumber: ptNumber,\n        data: trace._input,\n        fullData: this.fullData,\n        xaxis: this.xaxis,\n        yaxis: this.yaxis\n    };\n\n    Fx.appendArrayPointValue(pointData, trace, ptNumber);\n\n    this.graphDiv.emit(eventType, {points: [pointData]});\n};\n\nproto.draw = function() {\n    if(this.stopped) return;\n\n    requestAnimationFrame(this.redraw);\n\n    var glplot = this.glplot;\n    var camera = this.camera;\n    var mouseListener = camera.mouseListener;\n    var mouseUp = this.lastButtonState === 1 && mouseListener.buttons === 0;\n    var fullLayout = this.fullLayout;\n\n    this.lastButtonState = mouseListener.buttons;\n\n    this.cameraChanged();\n\n    var x = mouseListener.x * glplot.pixelRatio;\n    var y = this.canvas.height - glplot.pixelRatio * mouseListener.y;\n\n    var result;\n\n    if(camera.boxEnabled && fullLayout.dragmode === 'zoom') {\n        this.selectBox.enabled = true;\n\n        var selectBox = this.selectBox.selectBox = [\n            Math.min(camera.boxStart[0], camera.boxEnd[0]),\n            Math.min(camera.boxStart[1], camera.boxEnd[1]),\n            Math.max(camera.boxStart[0], camera.boxEnd[0]),\n            Math.max(camera.boxStart[1], camera.boxEnd[1])\n        ];\n\n        // 1D zoom\n        for(var i = 0; i < 2; i++) {\n            if(camera.boxStart[i] === camera.boxEnd[i]) {\n                selectBox[i] = glplot.dataBox[i];\n                selectBox[i + 2] = glplot.dataBox[i + 2];\n            }\n        }\n\n        glplot.setDirty();\n    } else if(!camera.panning && this.isMouseOver) {\n        this.selectBox.enabled = false;\n\n        var size = fullLayout._size;\n        var domainX = this.xaxis.domain;\n        var domainY = this.yaxis.domain;\n\n        result = glplot.pick(\n            (x / glplot.pixelRatio) + size.l + domainX[0] * size.w,\n            (y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h)\n        );\n\n        var nextSelection = result && result.object._trace.handlePick(result);\n\n        if(nextSelection && mouseUp) {\n            this.emitPointAction(nextSelection, 'plotly_click');\n        }\n\n        if(result && result.object._trace.hoverinfo !== 'skip' && fullLayout.hovermode) {\n            if(nextSelection && (\n                !this.lastPickResult ||\n                this.lastPickResult.traceUid !== nextSelection.trace.uid ||\n                this.lastPickResult.dataCoord[0] !== nextSelection.dataCoord[0] ||\n                this.lastPickResult.dataCoord[1] !== nextSelection.dataCoord[1])\n            ) {\n                var selection = nextSelection;\n\n                this.lastPickResult = {\n                    traceUid: nextSelection.trace ? nextSelection.trace.uid : null,\n                    dataCoord: nextSelection.dataCoord.slice()\n                };\n                this.spikes.update({ center: result.dataCoord });\n\n                selection.screenCoord = [\n                    ((glplot.viewBox[2] - glplot.viewBox[0]) *\n                    (result.dataCoord[0] - glplot.dataBox[0]) /\n                        (glplot.dataBox[2] - glplot.dataBox[0]) + glplot.viewBox[0]) /\n                            glplot.pixelRatio,\n                    (this.canvas.height - (glplot.viewBox[3] - glplot.viewBox[1]) *\n                    (result.dataCoord[1] - glplot.dataBox[1]) /\n                        (glplot.dataBox[3] - glplot.dataBox[1]) - glplot.viewBox[1]) /\n                            glplot.pixelRatio\n                ];\n\n                // this needs to happen before the next block that deletes traceCoord data\n                // also it's important to copy, otherwise data is lost by the time event data is read\n                this.emitPointAction(nextSelection, 'plotly_hover');\n\n                var trace = this.fullData[selection.trace.index] || {};\n                var ptNumber = selection.pointIndex;\n                var hoverinfo = Fx.castHoverinfo(trace, fullLayout, ptNumber);\n\n                if(hoverinfo && hoverinfo !== 'all') {\n                    var parts = hoverinfo.split('+');\n                    if(parts.indexOf('x') === -1) selection.traceCoord[0] = undefined;\n                    if(parts.indexOf('y') === -1) selection.traceCoord[1] = undefined;\n                    if(parts.indexOf('z') === -1) selection.traceCoord[2] = undefined;\n                    if(parts.indexOf('text') === -1) selection.textLabel = undefined;\n                    if(parts.indexOf('name') === -1) selection.name = undefined;\n                }\n\n                Fx.loneHover({\n                    x: selection.screenCoord[0],\n                    y: selection.screenCoord[1],\n                    xLabel: this.hoverFormatter('xaxis', selection.traceCoord[0]),\n                    yLabel: this.hoverFormatter('yaxis', selection.traceCoord[1]),\n                    zLabel: selection.traceCoord[2],\n                    text: selection.textLabel,\n                    name: selection.name,\n                    color: Fx.castHoverOption(trace, ptNumber, 'bgcolor') || selection.color,\n                    borderColor: Fx.castHoverOption(trace, ptNumber, 'bordercolor'),\n                    fontFamily: Fx.castHoverOption(trace, ptNumber, 'font.family'),\n                    fontSize: Fx.castHoverOption(trace, ptNumber, 'font.size'),\n                    fontColor: Fx.castHoverOption(trace, ptNumber, 'font.color'),\n                    nameLength: Fx.castHoverOption(trace, ptNumber, 'namelength'),\n                    textAlign: Fx.castHoverOption(trace, ptNumber, 'align')\n                }, {\n                    container: this.svgContainer,\n                    gd: this.graphDiv\n                });\n            }\n        }\n    }\n\n    // Remove hover effects if we're not over a point OR\n    // if we're zooming or panning (in which case result is not set)\n    if(!result) {\n        this.unhover();\n    }\n\n    glplot.draw();\n};\n\nproto.unhover = function() {\n    if(this.lastPickResult) {\n        this.spikes.update({});\n        this.lastPickResult = null;\n        this.graphDiv.emit('plotly_unhover');\n        Fx.loneUnhover(this.svgContainer);\n    }\n};\n\nproto.hoverFormatter = function(axisName, val) {\n    if(val === undefined) return undefined;\n\n    var axis = this[axisName];\n    return Axes.tickText(axis, axis.c2l(val), 'hover').text;\n};\n\n},{\"../../components/fx\":619,\"../../lib/show_no_webgl_msg\":724,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../cartesian/autorange\":750,\"../cartesian/constants\":757,\"../cartesian/constraints\":758,\"./camera\":787,\"./convert\":788,\"gl-plot2d\":286,\"gl-select-box\":298,\"gl-spikes2d\":307,\"webgl-context\":543}],791:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar fxAttrs = _dereq_('../../components/fx/layout_attributes');\n\nvar Scene = _dereq_('./scene');\nvar getSubplotData = _dereq_('../get_data').getSubplotData;\nvar Lib = _dereq_('../../lib');\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nvar GL3D = 'gl3d';\nvar SCENE = 'scene';\n\n\nexports.name = GL3D;\n\nexports.attr = SCENE;\n\nexports.idRoot = SCENE;\n\nexports.idRegex = exports.attrRegex = Lib.counterRegex('scene');\n\nexports.attributes = _dereq_('./layout/attributes');\n\nexports.layoutAttributes = _dereq_('./layout/layout_attributes');\n\nexports.baseLayoutAttrOverrides = overrideAll({\n    hoverlabel: fxAttrs.hoverlabel\n}, 'plot', 'nested');\n\nexports.supplyLayoutDefaults = _dereq_('./layout/defaults');\n\nexports.plot = function plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n    var sceneIds = fullLayout._subplots[GL3D];\n\n    for(var i = 0; i < sceneIds.length; i++) {\n        var sceneId = sceneIds[i];\n        var fullSceneData = getSubplotData(fullData, GL3D, sceneId);\n        var sceneLayout = fullLayout[sceneId];\n        var camera = sceneLayout.camera;\n        var scene = sceneLayout._scene;\n\n        if(!scene) {\n            scene = new Scene({\n                id: sceneId,\n                graphDiv: gd,\n                container: gd.querySelector('.gl-container'),\n                staticPlot: gd._context.staticPlot,\n                plotGlPixelRatio: gd._context.plotGlPixelRatio,\n                camera: camera\n            },\n                fullLayout\n            );\n\n            // set ref to Scene instance\n            sceneLayout._scene = scene;\n        }\n\n        // save 'initial' camera view settings for modebar button\n        if(!scene.viewInitial) {\n            scene.viewInitial = {\n                up: {\n                    x: camera.up.x,\n                    y: camera.up.y,\n                    z: camera.up.z\n                },\n                eye: {\n                    x: camera.eye.x,\n                    y: camera.eye.y,\n                    z: camera.eye.z\n                },\n                center: {\n                    x: camera.center.x,\n                    y: camera.center.y,\n                    z: camera.center.z\n                }\n            };\n        }\n\n        scene.plot(fullSceneData, fullLayout, gd.layout);\n    }\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldSceneKeys = oldFullLayout._subplots[GL3D] || [];\n\n    for(var i = 0; i < oldSceneKeys.length; i++) {\n        var oldSceneKey = oldSceneKeys[i];\n\n        if(!newFullLayout[oldSceneKey] && !!oldFullLayout[oldSceneKey]._scene) {\n            oldFullLayout[oldSceneKey]._scene.destroy();\n\n            if(oldFullLayout._infolayer) {\n                oldFullLayout._infolayer\n                    .selectAll('.annotation-' + oldSceneKey)\n                    .remove();\n            }\n        }\n    }\n};\n\nexports.toSVG = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var sceneIds = fullLayout._subplots[GL3D];\n    var size = fullLayout._size;\n\n    for(var i = 0; i < sceneIds.length; i++) {\n        var sceneLayout = fullLayout[sceneIds[i]];\n        var domain = sceneLayout.domain;\n        var scene = sceneLayout._scene;\n\n        var imageData = scene.toImage('png');\n        var image = fullLayout._glimages.append('svg:image');\n\n        image.attr({\n            xmlns: xmlnsNamespaces.svg,\n            'xlink:href': imageData,\n            x: size.l + size.w * domain.x[0],\n            y: size.t + size.h * (1 - domain.y[1]),\n            width: size.w * (domain.x[1] - domain.x[0]),\n            height: size.h * (domain.y[1] - domain.y[0]),\n            preserveAspectRatio: 'none'\n        });\n\n        scene.destroy();\n    }\n};\n\n// clean scene ids, 'scene1' -> 'scene'\nexports.cleanId = function cleanId(id) {\n    if(!id.match(/^scene[0-9]*$/)) return;\n\n    var sceneNum = id.substr(5);\n    if(sceneNum === '1') sceneNum = '';\n\n    return SCENE + sceneNum;\n};\n\nexports.updateFx = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots[GL3D];\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplotObj = fullLayout[subplotIds[i]]._scene;\n        subplotObj.updateFx(fullLayout.dragmode, fullLayout.hovermode);\n    }\n};\n\n},{\"../../components/fx/layout_attributes\":620,\"../../constants/xmlns_namespaces\":681,\"../../lib\":703,\"../../plot_api/edit_types\":734,\"../get_data\":786,\"./layout/attributes\":792,\"./layout/defaults\":796,\"./layout/layout_attributes\":797,\"./scene\":801}],792:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    scene: {\n        valType: 'subplotid',\n        \n        dflt: 'scene',\n        editType: 'calc+clearAxisTypes',\n        \n    }\n};\n\n},{}],793:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../../components/color');\nvar axesAttrs = _dereq_('../../cartesian/layout_attributes');\nvar extendFlat = _dereq_('../../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../../plot_api/edit_types').overrideAll;\n\nmodule.exports = overrideAll({\n    visible: axesAttrs.visible,\n    showspikes: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n    spikesides: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n    spikethickness: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 2,\n        \n    },\n    spikecolor: {\n        valType: 'color',\n        \n        dflt: Color.defaultLine,\n        \n    },\n    showbackground: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n    backgroundcolor: {\n        valType: 'color',\n        \n        dflt: 'rgba(204, 204, 204, 0.5)',\n        \n    },\n    showaxeslabels: {\n        valType: 'boolean',\n        \n        dflt: true,\n        \n    },\n    color: axesAttrs.color,\n    categoryorder: axesAttrs.categoryorder,\n    categoryarray: axesAttrs.categoryarray,\n    title: axesAttrs.title,\n    type: extendFlat({}, axesAttrs.type, {\n        values: ['-', 'linear', 'log', 'date', 'category']\n    }),\n    autorange: axesAttrs.autorange,\n    rangemode: axesAttrs.rangemode,\n    range: extendFlat({}, axesAttrs.range, {\n        items: [\n            {valType: 'any', editType: 'plot', impliedEdits: {'^autorange': false}},\n            {valType: 'any', editType: 'plot', impliedEdits: {'^autorange': false}}\n        ],\n        anim: false\n    }),\n    // ticks\n    tickmode: axesAttrs.tickmode,\n    nticks: axesAttrs.nticks,\n    tick0: axesAttrs.tick0,\n    dtick: axesAttrs.dtick,\n    tickvals: axesAttrs.tickvals,\n    ticktext: axesAttrs.ticktext,\n    ticks: axesAttrs.ticks,\n    mirror: axesAttrs.mirror,\n    ticklen: axesAttrs.ticklen,\n    tickwidth: axesAttrs.tickwidth,\n    tickcolor: axesAttrs.tickcolor,\n    showticklabels: axesAttrs.showticklabels,\n    tickfont: axesAttrs.tickfont,\n    tickangle: axesAttrs.tickangle,\n    tickprefix: axesAttrs.tickprefix,\n    showtickprefix: axesAttrs.showtickprefix,\n    ticksuffix: axesAttrs.ticksuffix,\n    showticksuffix: axesAttrs.showticksuffix,\n    showexponent: axesAttrs.showexponent,\n    exponentformat: axesAttrs.exponentformat,\n    separatethousands: axesAttrs.separatethousands,\n    tickformat: axesAttrs.tickformat,\n    tickformatstops: axesAttrs.tickformatstops,\n    hoverformat: axesAttrs.hoverformat,\n    // lines and grids\n    showline: axesAttrs.showline,\n    linecolor: axesAttrs.linecolor,\n    linewidth: axesAttrs.linewidth,\n    showgrid: axesAttrs.showgrid,\n    gridcolor: extendFlat({}, axesAttrs.gridcolor,  // shouldn't this be on-par with 2D?\n        {dflt: 'rgb(204, 204, 204)'}),\n    gridwidth: axesAttrs.gridwidth,\n    zeroline: axesAttrs.zeroline,\n    zerolinecolor: axesAttrs.zerolinecolor,\n    zerolinewidth: axesAttrs.zerolinewidth,\n    _deprecated: {\n        title: axesAttrs._deprecated.title,\n        titlefont: axesAttrs._deprecated.titlefont\n    }\n}, 'plot', 'from-root');\n\n},{\"../../../components/color\":580,\"../../../lib/extend\":693,\"../../../plot_api/edit_types\":734,\"../../cartesian/layout_attributes\":763}],794:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar colorMix = _dereq_('tinycolor2').mix;\n\nvar Lib = _dereq_('../../../lib');\nvar Template = _dereq_('../../../plot_api/plot_template');\n\nvar layoutAttributes = _dereq_('./axis_attributes');\nvar handleTypeDefaults = _dereq_('../../cartesian/type_defaults');\nvar handleAxisDefaults = _dereq_('../../cartesian/axis_defaults');\n\nvar axesNames = ['xaxis', 'yaxis', 'zaxis'];\n\n// TODO: hard-coded lightness fraction based on gridline default colors\n// that differ from other subplot types.\nvar gridLightness = 100 * (204 - 0x44) / (255 - 0x44);\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) {\n    var containerIn, containerOut;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, layoutAttributes, attr, dflt);\n    }\n\n    for(var j = 0; j < axesNames.length; j++) {\n        var axName = axesNames[j];\n        containerIn = layoutIn[axName] || {};\n\n        containerOut = Template.newContainer(layoutOut, axName);\n        containerOut._id = axName[0] + options.scene;\n        containerOut._name = axName;\n\n        handleTypeDefaults(containerIn, containerOut, coerce, options);\n\n        handleAxisDefaults(\n            containerIn,\n            containerOut,\n            coerce,\n            {\n                font: options.font,\n                letter: axName[0],\n                data: options.data,\n                showGrid: true,\n                noTickson: true,\n                bgColor: options.bgColor,\n                calendar: options.calendar\n            },\n            options.fullLayout);\n\n        coerce('gridcolor', colorMix(containerOut.color, options.bgColor, gridLightness).toRgbString());\n        coerce('title.text', axName[0]);  // shouldn't this be on-par with 2D?\n\n        containerOut.setScale = Lib.noop;\n\n        if(coerce('showspikes')) {\n            coerce('spikesides');\n            coerce('spikethickness');\n            coerce('spikecolor', containerOut.color);\n        }\n\n        coerce('showaxeslabels');\n        if(coerce('showbackground')) coerce('backgroundcolor');\n    }\n};\n\n},{\"../../../lib\":703,\"../../../plot_api/plot_template\":741,\"../../cartesian/axis_defaults\":753,\"../../cartesian/type_defaults\":774,\"./axis_attributes\":793,\"tinycolor2\":524}],795:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar str2RgbaArray = _dereq_('../../../lib/str2rgbarray');\nvar Lib = _dereq_('../../../lib');\n\nvar AXES_NAMES = ['xaxis', 'yaxis', 'zaxis'];\n\nfunction AxesOptions() {\n    this.bounds = [\n        [-10, -10, -10],\n        [10, 10, 10]\n    ];\n\n    this.ticks = [ [], [], [] ];\n    this.tickEnable = [ true, true, true ];\n    this.tickFont = [ 'sans-serif', 'sans-serif', 'sans-serif' ];\n    this.tickSize = [ 12, 12, 12 ];\n    this.tickAngle = [ 0, 0, 0 ];\n    this.tickColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n    this.tickPad = [ 18, 18, 18 ];\n\n    this.labels = [ 'x', 'y', 'z' ];\n    this.labelEnable = [ true, true, true ];\n    this.labelFont = ['Open Sans', 'Open Sans', 'Open Sans'];\n    this.labelSize = [ 20, 20, 20 ];\n    this.labelColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n    this.labelPad = [ 30, 30, 30 ];\n\n    this.lineEnable = [ true, true, true ];\n    this.lineMirror = [ false, false, false ];\n    this.lineWidth = [ 1, 1, 1 ];\n    this.lineColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n\n    this.lineTickEnable = [ true, true, true ];\n    this.lineTickMirror = [ false, false, false ];\n    this.lineTickLength = [ 10, 10, 10 ];\n    this.lineTickWidth = [ 1, 1, 1 ];\n    this.lineTickColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n\n    this.gridEnable = [ true, true, true ];\n    this.gridWidth = [ 1, 1, 1 ];\n    this.gridColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n\n    this.zeroEnable = [ true, true, true ];\n    this.zeroLineColor = [ [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1] ];\n    this.zeroLineWidth = [ 2, 2, 2 ];\n\n    this.backgroundEnable = [ true, true, true ];\n    this.backgroundColor = [ [0.8, 0.8, 0.8, 0.5],\n                              [0.8, 0.8, 0.8, 0.5],\n                              [0.8, 0.8, 0.8, 0.5] ];\n\n    // some default values are stored for applying model transforms\n    this._defaultTickPad = this.tickPad.slice();\n    this._defaultLabelPad = this.labelPad.slice();\n    this._defaultLineTickLength = this.lineTickLength.slice();\n}\n\nvar proto = AxesOptions.prototype;\n\nproto.merge = function(fullLayout, sceneLayout) {\n    var opts = this;\n    for(var i = 0; i < 3; ++i) {\n        var axes = sceneLayout[AXES_NAMES[i]];\n\n        if(!axes.visible) {\n            opts.tickEnable[i] = false;\n            opts.labelEnable[i] = false;\n            opts.lineEnable[i] = false;\n            opts.lineTickEnable[i] = false;\n            opts.gridEnable[i] = false;\n            opts.zeroEnable[i] = false;\n            opts.backgroundEnable[i] = false;\n            continue;\n        }\n\n        // Axes labels\n        opts.labels[i] = fullLayout._meta ?\n            Lib.templateString(axes.title.text, fullLayout._meta) :\n            axes.title.text;\n\n        if('font' in axes.title) {\n            if(axes.title.font.color) opts.labelColor[i] = str2RgbaArray(axes.title.font.color);\n            if(axes.title.font.family) opts.labelFont[i] = axes.title.font.family;\n            if(axes.title.font.size) opts.labelSize[i] = axes.title.font.size;\n        }\n\n        // Lines\n        if('showline' in axes) opts.lineEnable[i] = axes.showline;\n        if('linecolor' in axes) opts.lineColor[i] = str2RgbaArray(axes.linecolor);\n        if('linewidth' in axes) opts.lineWidth[i] = axes.linewidth;\n\n        if('showgrid' in axes) opts.gridEnable[i] = axes.showgrid;\n        if('gridcolor' in axes) opts.gridColor[i] = str2RgbaArray(axes.gridcolor);\n        if('gridwidth' in axes) opts.gridWidth[i] = axes.gridwidth;\n\n        // Remove zeroline if axis type is log\n        // otherwise the zeroline is incorrectly drawn at 1 on log axes\n        if(axes.type === 'log') opts.zeroEnable[i] = false;\n        else if('zeroline' in axes) opts.zeroEnable[i] = axes.zeroline;\n        if('zerolinecolor' in axes) opts.zeroLineColor[i] = str2RgbaArray(axes.zerolinecolor);\n        if('zerolinewidth' in axes) opts.zeroLineWidth[i] = axes.zerolinewidth;\n\n        // tick lines\n        if('ticks' in axes && !!axes.ticks) opts.lineTickEnable[i] = true;\n        else opts.lineTickEnable[i] = false;\n\n        if('ticklen' in axes) {\n            opts.lineTickLength[i] = opts._defaultLineTickLength[i] = axes.ticklen;\n        }\n        if('tickcolor' in axes) opts.lineTickColor[i] = str2RgbaArray(axes.tickcolor);\n        if('tickwidth' in axes) opts.lineTickWidth[i] = axes.tickwidth;\n        if('tickangle' in axes) {\n            opts.tickAngle[i] = (axes.tickangle === 'auto') ?\n                -3600 : // i.e. special number to set auto option\n                Math.PI * -axes.tickangle / 180;\n        }\n\n        // tick labels\n        if('showticklabels' in axes) opts.tickEnable[i] = axes.showticklabels;\n        if('tickfont' in axes) {\n            if(axes.tickfont.color) opts.tickColor[i] = str2RgbaArray(axes.tickfont.color);\n            if(axes.tickfont.family) opts.tickFont[i] = axes.tickfont.family;\n            if(axes.tickfont.size) opts.tickSize[i] = axes.tickfont.size;\n        }\n\n        if('mirror' in axes) {\n            if(['ticks', 'all', 'allticks'].indexOf(axes.mirror) !== -1) {\n                opts.lineTickMirror[i] = true;\n                opts.lineMirror[i] = true;\n            } else if(axes.mirror === true) {\n                opts.lineTickMirror[i] = false;\n                opts.lineMirror[i] = true;\n            } else {\n                opts.lineTickMirror[i] = false;\n                opts.lineMirror[i] = false;\n            }\n        } else opts.lineMirror[i] = false;\n\n        // grid background\n        if('showbackground' in axes && axes.showbackground !== false) {\n            opts.backgroundEnable[i] = true;\n            opts.backgroundColor[i] = str2RgbaArray(axes.backgroundcolor);\n        } else opts.backgroundEnable[i] = false;\n    }\n};\n\n\nfunction createAxesOptions(fullLayout, sceneLayout) {\n    var result = new AxesOptions();\n    result.merge(fullLayout, sceneLayout);\n    return result;\n}\n\nmodule.exports = createAxesOptions;\n\n},{\"../../../lib\":703,\"../../../lib/str2rgbarray\":726}],796:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../../lib');\nvar Color = _dereq_('../../../components/color');\nvar Registry = _dereq_('../../../registry');\n\nvar handleSubplotDefaults = _dereq_('../../subplot_defaults');\nvar supplyGl3dAxisLayoutDefaults = _dereq_('./axis_defaults');\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar getSubplotData = _dereq_('../../get_data').getSubplotData;\n\nvar GL3D = 'gl3d';\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    var hasNon3D = layoutOut._basePlotModules.length > 1;\n\n    // some layout-wide attribute are used in all scenes\n    // if 3D is the only visible plot type\n    function getDfltFromLayout(attr) {\n        if(hasNon3D) return;\n\n        var isValid = Lib.validate(layoutIn[attr], layoutAttributes[attr]);\n        if(isValid) return layoutIn[attr];\n    }\n\n    handleSubplotDefaults(layoutIn, layoutOut, fullData, {\n        type: GL3D,\n        attributes: layoutAttributes,\n        handleDefaults: handleGl3dDefaults,\n        fullLayout: layoutOut,\n        font: layoutOut.font,\n        fullData: fullData,\n        getDfltFromLayout: getDfltFromLayout,\n        paper_bgcolor: layoutOut.paper_bgcolor,\n        calendar: layoutOut.calendar\n    });\n};\n\nfunction handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {\n    /*\n     * Scene numbering proceeds as follows\n     * scene\n     * scene2\n     * scene3\n     *\n     * and d.scene will be undefined or some number or number string\n     *\n     * Also write back a blank scene object to user layout so that some\n     * attributes like aspectratio can be written back dynamically.\n     */\n\n    var bgcolor = coerce('bgcolor');\n    var bgColorCombined = Color.combine(bgcolor, opts.paper_bgcolor);\n\n    var cameraKeys = ['up', 'center', 'eye'];\n\n    for(var j = 0; j < cameraKeys.length; j++) {\n        coerce('camera.' + cameraKeys[j] + '.x');\n        coerce('camera.' + cameraKeys[j] + '.y');\n        coerce('camera.' + cameraKeys[j] + '.z');\n    }\n\n    coerce('camera.projection.type');\n\n    /*\n     * coerce to positive number (min 0) but also do not accept 0 (>0 not >=0)\n     * note that 0's go false with the !! call\n     */\n    var hasAspect = !!coerce('aspectratio.x') &&\n                    !!coerce('aspectratio.y') &&\n                    !!coerce('aspectratio.z');\n\n    var defaultAspectMode = hasAspect ? 'manual' : 'auto';\n    var aspectMode = coerce('aspectmode', defaultAspectMode);\n\n    /*\n     * We need aspectratio object in all the Layouts as it is dynamically set\n     * in the calculation steps, ie, we cant set the correct data now, it happens later.\n     * We must also account for the case the user sends bad ratio data with 'manual' set\n     * for the mode. In this case we must force change it here as the default coerce\n     * misses it above.\n     */\n    if(!hasAspect) {\n        sceneLayoutIn.aspectratio = sceneLayoutOut.aspectratio = {x: 1, y: 1, z: 1};\n\n        if(aspectMode === 'manual') sceneLayoutOut.aspectmode = 'auto';\n\n        /*\n         * kind of like autorange - we need the calculated aspectmode back in\n         * the input layout or relayout can cause problems later\n         */\n        sceneLayoutIn.aspectmode = sceneLayoutOut.aspectmode;\n    }\n\n    var fullGl3dData = getSubplotData(opts.fullData, GL3D, opts.id);\n\n    supplyGl3dAxisLayoutDefaults(sceneLayoutIn, sceneLayoutOut, {\n        font: opts.font,\n        scene: opts.id,\n        data: fullGl3dData,\n        bgColor: bgColorCombined,\n        calendar: opts.calendar,\n        fullLayout: opts.fullLayout\n    });\n\n    Registry.getComponentMethod('annotations3d', 'handleDefaults')(\n        sceneLayoutIn, sceneLayoutOut, opts\n    );\n\n    var dragmode = opts.getDfltFromLayout('dragmode');\n\n    if(dragmode !== false) {\n        if(!dragmode) {\n            dragmode = 'orbit';\n\n            if(sceneLayoutIn.camera &&\n                sceneLayoutIn.camera.up) {\n                var x = sceneLayoutIn.camera.up.x;\n                var y = sceneLayoutIn.camera.up.y;\n                var z = sceneLayoutIn.camera.up.z;\n\n                if(z !== 0) {\n                    if(!x || !y || !z) {\n                        dragmode = 'turntable';\n                    } else if(z / Math.sqrt(x * x + y * y + z * z) > 0.999) {\n                        dragmode = 'turntable';\n                    }\n                }\n            } else {\n                dragmode = 'turntable';\n            }\n        }\n    }\n\n    coerce('dragmode', dragmode);\n    coerce('hovermode', opts.getDfltFromLayout('hovermode'));\n}\n\n},{\"../../../components/color\":580,\"../../../lib\":703,\"../../../registry\":831,\"../../get_data\":786,\"../../subplot_defaults\":826,\"./axis_defaults\":794,\"./layout_attributes\":797}],797:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar gl3dAxisAttrs = _dereq_('./axis_attributes');\nvar domainAttrs = _dereq_('../../domain').attributes;\nvar extendFlat = _dereq_('../../../lib/extend').extendFlat;\nvar counterRegex = _dereq_('../../../lib').counterRegex;\n\nfunction makeCameraVector(x, y, z) {\n    return {\n        x: {\n            valType: 'number',\n            \n            dflt: x,\n            editType: 'camera'\n        },\n        y: {\n            valType: 'number',\n            \n            dflt: y,\n            editType: 'camera'\n        },\n        z: {\n            valType: 'number',\n            \n            dflt: z,\n            editType: 'camera'\n        },\n        editType: 'camera'\n    };\n}\n\nmodule.exports = {\n    _arrayAttrRegexps: [counterRegex('scene', '.annotations', true)],\n\n    bgcolor: {\n        valType: 'color',\n        \n        dflt: 'rgba(0,0,0,0)',\n        editType: 'plot'\n    },\n    camera: {\n        up: extendFlat(makeCameraVector(0, 0, 1), {\n            \n        }),\n        center: extendFlat(makeCameraVector(0, 0, 0), {\n            \n        }),\n        eye: extendFlat(makeCameraVector(1.25, 1.25, 1.25), {\n            \n        }),\n        projection: {\n            type: {\n                valType: 'enumerated',\n                \n                values: ['perspective', 'orthographic'],\n                dflt: 'perspective',\n                editType: 'calc',\n                \n            },\n            editType: 'calc'\n        },\n        editType: 'camera'\n    },\n    domain: domainAttrs({name: 'scene', editType: 'plot'}),\n    aspectmode: {\n        valType: 'enumerated',\n        \n        values: ['auto', 'cube', 'data', 'manual'],\n        dflt: 'auto',\n        editType: 'plot',\n        impliedEdits: {\n            'aspectratio.x': undefined,\n            'aspectratio.y': undefined,\n            'aspectratio.z': undefined\n        },\n        \n    },\n    aspectratio: { // must be positive (0's are coerced to 1)\n        x: {\n            valType: 'number',\n            \n            min: 0,\n            editType: 'plot',\n            impliedEdits: {'^aspectmode': 'manual'}\n        },\n        y: {\n            valType: 'number',\n            \n            min: 0,\n            editType: 'plot',\n            impliedEdits: {'^aspectmode': 'manual'}\n        },\n        z: {\n            valType: 'number',\n            \n            min: 0,\n            editType: 'plot',\n            impliedEdits: {'^aspectmode': 'manual'}\n        },\n        editType: 'plot',\n        impliedEdits: {aspectmode: 'manual'},\n        \n    },\n\n    xaxis: gl3dAxisAttrs,\n    yaxis: gl3dAxisAttrs,\n    zaxis: gl3dAxisAttrs,\n\n    dragmode: {\n        valType: 'enumerated',\n        \n        values: ['orbit', 'turntable', 'zoom', 'pan', false],\n        editType: 'plot',\n        \n    },\n    hovermode: {\n        valType: 'enumerated',\n        \n        values: ['closest', false],\n        dflt: 'closest',\n        editType: 'modebar',\n        \n    },\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    editType: 'plot',\n\n    _deprecated: {\n        cameraposition: {\n            valType: 'info_array',\n            \n            editType: 'camera',\n            \n        }\n    }\n};\n\n},{\"../../../lib\":703,\"../../../lib/extend\":693,\"../../domain\":776,\"./axis_attributes\":793}],798:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar str2RGBArray = _dereq_('../../../lib/str2rgbarray');\n\nvar AXES_NAMES = ['xaxis', 'yaxis', 'zaxis'];\n\nfunction SpikeOptions() {\n    this.enabled = [true, true, true];\n    this.colors = [[0, 0, 0, 1],\n                   [0, 0, 0, 1],\n                   [0, 0, 0, 1]];\n    this.drawSides = [true, true, true];\n    this.lineWidth = [1, 1, 1];\n}\n\nvar proto = SpikeOptions.prototype;\n\nproto.merge = function(sceneLayout) {\n    for(var i = 0; i < 3; ++i) {\n        var axes = sceneLayout[AXES_NAMES[i]];\n\n        if(!axes.visible) {\n            this.enabled[i] = false;\n            this.drawSides[i] = false;\n            continue;\n        }\n\n        this.enabled[i] = axes.showspikes;\n        this.colors[i] = str2RGBArray(axes.spikecolor);\n        this.drawSides[i] = axes.spikesides;\n        this.lineWidth[i] = axes.spikethickness;\n    }\n};\n\nfunction createSpikeOptions(layout) {\n    var result = new SpikeOptions();\n    result.merge(layout);\n    return result;\n}\n\nmodule.exports = createSpikeOptions;\n\n},{\"../../../lib/str2rgbarray\":726}],799:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n/* eslint block-scoped-var: 0*/\n/* eslint no-redeclare: 0*/\n\n'use strict';\n\nmodule.exports = computeTickMarks;\n\nvar Axes = _dereq_('../../cartesian/axes');\nvar Lib = _dereq_('../../../lib');\n\nvar AXES_NAMES = ['xaxis', 'yaxis', 'zaxis'];\n\nvar centerPoint = [0, 0, 0];\n\nfunction contourLevelsFromTicks(ticks) {\n    var result = new Array(3);\n    for(var i = 0; i < 3; ++i) {\n        var tlevel = ticks[i];\n        var clevel = new Array(tlevel.length);\n        for(var j = 0; j < tlevel.length; ++j) {\n            clevel[j] = tlevel[j].x;\n        }\n        result[i] = clevel;\n    }\n    return result;\n}\n\nfunction computeTickMarks(scene) {\n    var axesOptions = scene.axesOptions;\n    var glRange = scene.glplot.axesPixels;\n    var sceneLayout = scene.fullSceneLayout;\n\n    var ticks = [[], [], []];\n\n    for(var i = 0; i < 3; ++i) {\n        var axes = sceneLayout[AXES_NAMES[i]];\n\n        axes._length = (glRange[i].hi - glRange[i].lo) *\n            glRange[i].pixelsPerDataUnit / scene.dataScale[i];\n\n        if(Math.abs(axes._length) === Infinity ||\n           isNaN(axes._length)) {\n            ticks[i] = [];\n        } else {\n            axes._input_range = axes.range.slice();\n            axes.range[0] = (glRange[i].lo) / scene.dataScale[i];\n            axes.range[1] = (glRange[i].hi) / scene.dataScale[i];\n            axes._m = 1.0 / (scene.dataScale[i] * glRange[i].pixelsPerDataUnit);\n\n            if(axes.range[0] === axes.range[1]) {\n                axes.range[0] -= 1;\n                axes.range[1] += 1;\n            }\n            // this is necessary to short-circuit the 'y' handling\n            // in autotick part of calcTicks... Treating all axes as 'y' in this case\n            // running the autoticks here, then setting\n            // autoticks to false to get around the 2D handling in calcTicks.\n            var tickModeCached = axes.tickmode;\n            if(axes.tickmode === 'auto') {\n                axes.tickmode = 'linear';\n                var nticks = axes.nticks || Lib.constrain((axes._length / 40), 4, 9);\n                Axes.autoTicks(axes, Math.abs(axes.range[1] - axes.range[0]) / nticks);\n            }\n            var dataTicks = Axes.calcTicks(axes);\n            for(var j = 0; j < dataTicks.length; ++j) {\n                dataTicks[j].x = dataTicks[j].x * scene.dataScale[i];\n\n                if(axes.type === 'date') {\n                    dataTicks[j].text =\n                    dataTicks[j].text.replace(/\\<br\\>/g, ' ');\n                }\n            }\n            ticks[i] = dataTicks;\n\n\n            axes.tickmode = tickModeCached;\n        }\n    }\n\n    axesOptions.ticks = ticks;\n\n    // Calculate tick lengths dynamically\n    for(var i = 0; i < 3; ++i) {\n        centerPoint[i] = 0.5 * (scene.glplot.bounds[0][i] + scene.glplot.bounds[1][i]);\n        for(var j = 0; j < 2; ++j) {\n            axesOptions.bounds[j][i] = scene.glplot.bounds[j][i];\n        }\n    }\n\n    scene.contourLevels = contourLevelsFromTicks(ticks);\n}\n\n},{\"../../../lib\":703,\"../../cartesian/axes\":751}],800:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nfunction xformMatrix(m, v) {\n    var out = [0, 0, 0, 0];\n    var i, j;\n\n    for(i = 0; i < 4; ++i) {\n        for(j = 0; j < 4; ++j) {\n            out[j] += m[4 * i + j] * v[i];\n        }\n    }\n\n    return out;\n}\n\nfunction project(camera, v) {\n    var p = xformMatrix(camera.projection,\n        xformMatrix(camera.view,\n        xformMatrix(camera.model, [v[0], v[1], v[2], 1])));\n    return p;\n}\n\nmodule.exports = project;\n\n},{}],801:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar createCamera = _dereq_('gl-plot3d').createCamera;\nvar createPlot = _dereq_('gl-plot3d').createScene;\nvar getContext = _dereq_('webgl-context');\nvar passiveSupported = _dereq_('has-passive-events');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Fx = _dereq_('../../components/fx');\n\nvar str2RGBAarray = _dereq_('../../lib/str2rgbarray');\nvar showNoWebGlMsg = _dereq_('../../lib/show_no_webgl_msg');\n\nvar project = _dereq_('./project');\nvar createAxesOptions = _dereq_('./layout/convert');\nvar createSpikeOptions = _dereq_('./layout/spikes');\nvar computeTickMarks = _dereq_('./layout/tick_marks');\n\n\nvar STATIC_CANVAS, STATIC_CONTEXT;\n\nfunction render(scene) {\n    var gd = scene.graphDiv;\n    var trace;\n\n    // update size of svg container\n    var svgContainer = scene.svgContainer;\n    var clientRect = scene.container.getBoundingClientRect();\n    var width = clientRect.width;\n    var height = clientRect.height;\n    svgContainer.setAttributeNS(null, 'viewBox', '0 0 ' + width + ' ' + height);\n    svgContainer.setAttributeNS(null, 'width', width);\n    svgContainer.setAttributeNS(null, 'height', height);\n\n    computeTickMarks(scene);\n    scene.glplot.axes.update(scene.axesOptions);\n\n    // check if pick has changed\n    var keys = Object.keys(scene.traces);\n    var lastPicked = null;\n    var selection = scene.glplot.selection;\n    for(var i = 0; i < keys.length; ++i) {\n        trace = scene.traces[keys[i]];\n        if(trace.data.hoverinfo !== 'skip' && trace.handlePick(selection)) {\n            lastPicked = trace;\n        }\n\n        if(trace.setContourLevels) trace.setContourLevels();\n    }\n\n    function formatter(axisName, val) {\n        var axis = scene.fullSceneLayout[axisName];\n\n        return Axes.tickText(axis, axis.d2l(val), 'hover').text;\n    }\n\n    var oldEventData;\n\n    if(lastPicked !== null) {\n        var pdata = project(scene.glplot.cameraParams, selection.dataCoordinate);\n        trace = lastPicked.data;\n        var traceNow = gd._fullData[trace.index];\n        var ptNumber = selection.index;\n\n        var labels = {\n            xLabel: formatter('xaxis', selection.traceCoordinate[0]),\n            yLabel: formatter('yaxis', selection.traceCoordinate[1]),\n            zLabel: formatter('zaxis', selection.traceCoordinate[2])\n        };\n\n        var hoverinfo = Fx.castHoverinfo(traceNow, scene.fullLayout, ptNumber);\n        var hoverinfoParts = (hoverinfo || '').split('+');\n        var isHoverinfoAll = hoverinfo && hoverinfo === 'all';\n\n        if(!traceNow.hovertemplate && !isHoverinfoAll) {\n            if(hoverinfoParts.indexOf('x') === -1) labels.xLabel = undefined;\n            if(hoverinfoParts.indexOf('y') === -1) labels.yLabel = undefined;\n            if(hoverinfoParts.indexOf('z') === -1) labels.zLabel = undefined;\n            if(hoverinfoParts.indexOf('text') === -1) selection.textLabel = undefined;\n            if(hoverinfoParts.indexOf('name') === -1) lastPicked.name = undefined;\n        }\n\n        var tx;\n        var vectorTx = [];\n\n        if(trace.type === 'cone' || trace.type === 'streamtube') {\n            labels.uLabel = formatter('xaxis', selection.traceCoordinate[3]);\n            if(isHoverinfoAll || hoverinfoParts.indexOf('u') !== -1) {\n                vectorTx.push('u: ' + labels.uLabel);\n            }\n\n            labels.vLabel = formatter('yaxis', selection.traceCoordinate[4]);\n            if(isHoverinfoAll || hoverinfoParts.indexOf('v') !== -1) {\n                vectorTx.push('v: ' + labels.vLabel);\n            }\n\n            labels.wLabel = formatter('zaxis', selection.traceCoordinate[5]);\n            if(isHoverinfoAll || hoverinfoParts.indexOf('w') !== -1) {\n                vectorTx.push('w: ' + labels.wLabel);\n            }\n\n            labels.normLabel = selection.traceCoordinate[6].toPrecision(3);\n            if(isHoverinfoAll || hoverinfoParts.indexOf('norm') !== -1) {\n                vectorTx.push('norm: ' + labels.normLabel);\n            }\n            if(trace.type === 'streamtube') {\n                labels.divergenceLabel = selection.traceCoordinate[7].toPrecision(3);\n                if(isHoverinfoAll || hoverinfoParts.indexOf('divergence') !== -1) {\n                    vectorTx.push('divergence: ' + labels.divergenceLabel);\n                }\n            }\n            if(selection.textLabel) {\n                vectorTx.push(selection.textLabel);\n            }\n            tx = vectorTx.join('<br>');\n        } else if(trace.type === 'isosurface' || trace.type === 'volume') {\n            labels.valueLabel = Axes.tickText(scene.mockAxis, scene.mockAxis.d2l(selection.traceCoordinate[3]), 'hover').text;\n            vectorTx.push('value: ' + labels.valueLabel);\n            if(selection.textLabel) {\n                vectorTx.push(selection.textLabel);\n            }\n            tx = vectorTx.join('<br>');\n        } else {\n            tx = selection.textLabel;\n        }\n\n        var pointData = {\n            x: selection.traceCoordinate[0],\n            y: selection.traceCoordinate[1],\n            z: selection.traceCoordinate[2],\n            data: traceNow._input,\n            fullData: traceNow,\n            curveNumber: traceNow.index,\n            pointNumber: ptNumber\n        };\n\n        Fx.appendArrayPointValue(pointData, traceNow, ptNumber);\n\n        if(trace._module.eventData) {\n            pointData = traceNow._module.eventData(pointData, selection, traceNow, {}, ptNumber);\n        }\n\n        var eventData = {points: [pointData]};\n\n        if(scene.fullSceneLayout.hovermode) {\n            Fx.loneHover({\n                trace: traceNow,\n                x: (0.5 + 0.5 * pdata[0] / pdata[3]) * width,\n                y: (0.5 - 0.5 * pdata[1] / pdata[3]) * height,\n                xLabel: labels.xLabel,\n                yLabel: labels.yLabel,\n                zLabel: labels.zLabel,\n                text: tx,\n                name: lastPicked.name,\n                color: Fx.castHoverOption(traceNow, ptNumber, 'bgcolor') || lastPicked.color,\n                borderColor: Fx.castHoverOption(traceNow, ptNumber, 'bordercolor'),\n                fontFamily: Fx.castHoverOption(traceNow, ptNumber, 'font.family'),\n                fontSize: Fx.castHoverOption(traceNow, ptNumber, 'font.size'),\n                fontColor: Fx.castHoverOption(traceNow, ptNumber, 'font.color'),\n                nameLength: Fx.castHoverOption(traceNow, ptNumber, 'namelength'),\n                textAlign: Fx.castHoverOption(traceNow, ptNumber, 'align'),\n                hovertemplate: Lib.castOption(traceNow, ptNumber, 'hovertemplate'),\n                hovertemplateLabels: Lib.extendFlat({}, pointData, labels),\n                eventData: [pointData]\n            }, {\n                container: svgContainer,\n                gd: gd\n            });\n        }\n\n        if(selection.buttons && selection.distance < 5) {\n            gd.emit('plotly_click', eventData);\n        } else {\n            gd.emit('plotly_hover', eventData);\n        }\n\n        oldEventData = eventData;\n    } else {\n        Fx.loneUnhover(svgContainer);\n        gd.emit('plotly_unhover', oldEventData);\n    }\n\n    scene.drawAnnotations(scene);\n}\n\nfunction tryCreatePlot(scene, cameraObject, pixelRatio, canvas, gl) {\n    var glplotOptions = {\n        canvas: canvas,\n        gl: gl,\n        container: scene.container,\n        axes: scene.axesOptions,\n        spikes: scene.spikeOptions,\n        pickRadius: 10,\n        snapToData: true,\n        autoScale: true,\n        autoBounds: false,\n        cameraObject: cameraObject,\n        pixelRatio: pixelRatio\n    };\n\n    // for static plots, we reuse the WebGL context\n    //  as WebKit doesn't collect them reliably\n    if(scene.staticMode) {\n        if(!STATIC_CONTEXT) {\n            STATIC_CANVAS = document.createElement('canvas');\n            STATIC_CONTEXT = getContext({\n                canvas: STATIC_CANVAS,\n                preserveDrawingBuffer: true,\n                premultipliedAlpha: true,\n                antialias: true\n            });\n            if(!STATIC_CONTEXT) {\n                throw new Error('error creating static canvas/context for image server');\n            }\n        }\n        glplotOptions.pixelRatio = scene.pixelRatio;\n        glplotOptions.gl = STATIC_CONTEXT;\n        glplotOptions.canvas = STATIC_CANVAS;\n    }\n\n    try {\n        scene.glplot = createPlot(glplotOptions);\n    } catch(e) {\n        return false;\n    }\n\n    return true;\n}\n\nfunction initializeGLPlot(scene, pixelRatio, canvas, gl) {\n    scene.initializeGLCamera();\n\n    var success = tryCreatePlot(scene, scene.camera, pixelRatio, canvas, gl);\n    /*\n    * createPlot will throw when webgl is not enabled in the client.\n    * Lets return an instance of the module with all functions noop'd.\n    * The destroy method - which will remove the container from the DOM\n    * is overridden with a function that removes the container only.\n    */\n    if(!success) return showNoWebGlMsg(scene);\n\n    var gd = scene.graphDiv;\n\n    var relayoutCallback = function(scene) {\n        if(scene.fullSceneLayout.dragmode === false) return;\n\n        var update = {};\n        update[scene.id + '.camera'] = getLayoutCamera(scene.camera);\n        scene.saveCamera(gd.layout);\n        scene.graphDiv.emit('plotly_relayout', update);\n    };\n\n    scene.glplot.canvas.addEventListener('mouseup', function() {\n        relayoutCallback(scene);\n    });\n\n    scene.glplot.canvas.addEventListener('wheel', function() {\n        if(gd._context._scrollZoom.gl3d) {\n            relayoutCallback(scene);\n        }\n    }, passiveSupported ? {passive: false} : false);\n\n    scene.glplot.canvas.addEventListener('mousemove', function() {\n        if(scene.fullSceneLayout.dragmode === false) return;\n        if(scene.camera.mouseListener.buttons === 0) return;\n\n        var update = {};\n        update[scene.id + '.camera'] = getLayoutCamera(scene.camera);\n        scene.graphDiv.emit('plotly_relayouting', update);\n    });\n\n    if(!scene.staticMode) {\n        scene.glplot.canvas.addEventListener('webglcontextlost', function(event) {\n            if(gd && gd.emit) {\n                gd.emit('plotly_webglcontextlost', {\n                    event: event,\n                    layer: scene.id\n                });\n            }\n        }, false);\n    }\n\n    scene.glplot.camera = scene.camera;\n\n    scene.glplot.oncontextloss = function() {\n        scene.recoverContext();\n    };\n\n    scene.glplot.onrender = render.bind(null, scene);\n\n    // List of scene objects\n    scene.traces = {};\n\n    scene.make4thDimension();\n\n    return true;\n}\n\nfunction Scene(options, fullLayout) {\n    // create sub container for plot\n    var sceneContainer = document.createElement('div');\n    var plotContainer = options.container;\n\n    // keep a ref to the graph div to fire hover+click events\n    this.graphDiv = options.graphDiv;\n\n    // create SVG container for hover text\n    var svgContainer = document.createElementNS(\n        'http://www.w3.org/2000/svg',\n        'svg');\n    svgContainer.style.position = 'absolute';\n    svgContainer.style.top = svgContainer.style.left = '0px';\n    svgContainer.style.width = svgContainer.style.height = '100%';\n    svgContainer.style['z-index'] = 20;\n    svgContainer.style['pointer-events'] = 'none';\n    sceneContainer.appendChild(svgContainer);\n    this.svgContainer = svgContainer;\n\n    // Tag the container with the sceneID\n    sceneContainer.id = options.id;\n    sceneContainer.style.position = 'absolute';\n    sceneContainer.style.top = sceneContainer.style.left = '0px';\n    sceneContainer.style.width = sceneContainer.style.height = '100%';\n    plotContainer.appendChild(sceneContainer);\n\n    this.fullLayout = fullLayout;\n    this.id = options.id || 'scene';\n    this.fullSceneLayout = fullLayout[this.id];\n\n    // Saved from last call to plot()\n    this.plotArgs = [ [], {}, {} ];\n\n    /*\n     * Move this to calc step? Why does it work here?\n     */\n    this.axesOptions = createAxesOptions(fullLayout, fullLayout[this.id]);\n    this.spikeOptions = createSpikeOptions(fullLayout[this.id]);\n    this.container = sceneContainer;\n    this.staticMode = !!options.staticPlot;\n    this.pixelRatio = this.pixelRatio || options.plotGlPixelRatio || 2;\n\n    // Coordinate rescaling\n    this.dataScale = [1, 1, 1];\n\n    this.contourLevels = [ [], [], [] ];\n\n    this.convertAnnotations = Registry.getComponentMethod('annotations3d', 'convert');\n    this.drawAnnotations = Registry.getComponentMethod('annotations3d', 'draw');\n\n    initializeGLPlot(this, this.pixelRatio);\n}\n\nvar proto = Scene.prototype;\n\nproto.initializeGLCamera = function() {\n    var cameraData = this.fullSceneLayout.camera;\n    var isOrtho = (cameraData.projection.type === 'orthographic');\n\n    this.camera = createCamera(this.container, {\n        center: [cameraData.center.x, cameraData.center.y, cameraData.center.z],\n        eye: [cameraData.eye.x, cameraData.eye.y, cameraData.eye.z],\n        up: [cameraData.up.x, cameraData.up.y, cameraData.up.z],\n        _ortho: isOrtho,\n        zoomMin: 0.01,\n        zoomMax: 100,\n        mode: 'orbit'\n    });\n};\n\nproto.recoverContext = function() {\n    var scene = this;\n    var gl = this.glplot.gl;\n    var canvas = this.glplot.canvas;\n    var camera = this.glplot.camera;\n    var pixelRatio = this.glplot.pixelRatio;\n    this.glplot.dispose();\n\n    function tryRecover() {\n        if(gl.isContextLost()) {\n            requestAnimationFrame(tryRecover);\n            return;\n        }\n        if(!initializeGLPlot(scene, camera, pixelRatio, canvas, gl)) {\n            Lib.error('Catastrophic and unrecoverable WebGL error. Context lost.');\n            return;\n        }\n        scene.plot.apply(scene, scene.plotArgs);\n    }\n    requestAnimationFrame(tryRecover);\n};\n\nvar axisProperties = [ 'xaxis', 'yaxis', 'zaxis' ];\n\nfunction computeTraceBounds(scene, trace, bounds) {\n    var sceneLayout = scene.fullSceneLayout;\n\n    for(var d = 0; d < 3; d++) {\n        var axisName = axisProperties[d];\n        var axLetter = axisName.charAt(0);\n        var ax = sceneLayout[axisName];\n        var coords = trace[axLetter];\n        var calendar = trace[axLetter + 'calendar'];\n        var len = trace['_' + axLetter + 'length'];\n\n        if(!Lib.isArrayOrTypedArray(coords)) {\n            bounds[0][d] = Math.min(bounds[0][d], 0);\n            bounds[1][d] = Math.max(bounds[1][d], len - 1);\n        } else {\n            var v;\n\n            for(var i = 0; i < (len || coords.length); i++) {\n                if(Lib.isArrayOrTypedArray(coords[i])) {\n                    for(var j = 0; j < coords[i].length; ++j) {\n                        v = ax.d2l(coords[i][j], 0, calendar);\n                        if(!isNaN(v) && isFinite(v)) {\n                            bounds[0][d] = Math.min(bounds[0][d], v);\n                            bounds[1][d] = Math.max(bounds[1][d], v);\n                        }\n                    }\n                } else {\n                    v = ax.d2l(coords[i], 0, calendar);\n                    if(!isNaN(v) && isFinite(v)) {\n                        bounds[0][d] = Math.min(bounds[0][d], v);\n                        bounds[1][d] = Math.max(bounds[1][d], v);\n                    }\n                }\n            }\n        }\n    }\n}\n\nfunction computeAnnotationBounds(scene, bounds) {\n    var sceneLayout = scene.fullSceneLayout;\n    var annotations = sceneLayout.annotations || [];\n\n    for(var d = 0; d < 3; d++) {\n        var axisName = axisProperties[d];\n        var axLetter = axisName.charAt(0);\n        var ax = sceneLayout[axisName];\n\n        for(var j = 0; j < annotations.length; j++) {\n            var ann = annotations[j];\n\n            if(ann.visible) {\n                var pos = ax.r2l(ann[axLetter]);\n                if(!isNaN(pos) && isFinite(pos)) {\n                    bounds[0][d] = Math.min(bounds[0][d], pos);\n                    bounds[1][d] = Math.max(bounds[1][d], pos);\n                }\n            }\n        }\n    }\n}\n\nproto.plot = function(sceneData, fullLayout, layout) {\n    // Save parameters\n    this.plotArgs = [sceneData, fullLayout, layout];\n\n    if(this.glplot.contextLost) return;\n\n    var data, trace;\n    var i, j, axis, axisType;\n    var fullSceneLayout = fullLayout[this.id];\n    var sceneLayout = layout[this.id];\n\n    if(fullSceneLayout.bgcolor) this.glplot.clearColor = str2RGBAarray(fullSceneLayout.bgcolor);\n    else this.glplot.clearColor = [0, 0, 0, 0];\n\n    this.glplot.snapToData = true;\n\n    // Update layout\n    this.fullLayout = fullLayout;\n    this.fullSceneLayout = fullSceneLayout;\n\n    this.glplotLayout = fullSceneLayout;\n    this.axesOptions.merge(fullLayout, fullSceneLayout);\n    this.spikeOptions.merge(fullSceneLayout);\n\n    // Update camera and camera mode\n    this.setCamera(fullSceneLayout.camera);\n    this.updateFx(fullSceneLayout.dragmode, fullSceneLayout.hovermode);\n    this.camera.enableWheel = this.graphDiv._context._scrollZoom.gl3d;\n\n    // Update scene\n    this.glplot.update({});\n\n    // Update axes functions BEFORE updating traces\n    this.setConvert(axis);\n\n    // Convert scene data\n    if(!sceneData) sceneData = [];\n    else if(!Array.isArray(sceneData)) sceneData = [sceneData];\n\n    // Compute trace bounding box\n    var dataBounds = [\n        [Infinity, Infinity, Infinity],\n        [-Infinity, -Infinity, -Infinity]\n    ];\n\n    for(i = 0; i < sceneData.length; ++i) {\n        data = sceneData[i];\n        if(data.visible !== true || data._length === 0) continue;\n\n        computeTraceBounds(this, data, dataBounds);\n    }\n    computeAnnotationBounds(this, dataBounds);\n\n    var dataScale = [1, 1, 1];\n    for(j = 0; j < 3; ++j) {\n        if(dataBounds[1][j] === dataBounds[0][j]) {\n            dataScale[j] = 1.0;\n        } else {\n            dataScale[j] = 1.0 / (dataBounds[1][j] - dataBounds[0][j]);\n        }\n    }\n\n    // Save scale\n    this.dataScale = dataScale;\n\n    // after computeTraceBounds where ax._categories are filled in\n    this.convertAnnotations(this);\n\n    // Update traces\n    for(i = 0; i < sceneData.length; ++i) {\n        data = sceneData[i];\n        if(data.visible !== true || data._length === 0) {\n            continue;\n        }\n        trace = this.traces[data.uid];\n        if(trace) {\n            if(trace.data.type === data.type) {\n                trace.update(data);\n            } else {\n                trace.dispose();\n                trace = data._module.plot(this, data);\n                this.traces[data.uid] = trace;\n            }\n        } else {\n            trace = data._module.plot(this, data);\n            this.traces[data.uid] = trace;\n        }\n        trace.name = data.name;\n    }\n\n    // Remove empty traces\n    var traceIds = Object.keys(this.traces);\n\n    traceIdLoop:\n    for(i = 0; i < traceIds.length; ++i) {\n        for(j = 0; j < sceneData.length; ++j) {\n            if(sceneData[j].uid === traceIds[i] &&\n                (sceneData[j].visible === true && sceneData[j]._length !== 0)) {\n                continue traceIdLoop;\n            }\n        }\n        trace = this.traces[traceIds[i]];\n        trace.dispose();\n        delete this.traces[traceIds[i]];\n    }\n\n    // order object per trace index\n    this.glplot.objects.sort(function(a, b) {\n        return a._trace.data.index - b._trace.data.index;\n    });\n\n    // Update ranges (needs to be called *after* objects are added due to updates)\n    var sceneBounds = [[0, 0, 0], [0, 0, 0]];\n    var axisDataRange = [];\n    var axisTypeRatios = {};\n\n    for(i = 0; i < 3; ++i) {\n        axis = fullSceneLayout[axisProperties[i]];\n        axisType = axis.type;\n\n        if(axisType in axisTypeRatios) {\n            axisTypeRatios[axisType].acc *= dataScale[i];\n            axisTypeRatios[axisType].count += 1;\n        } else {\n            axisTypeRatios[axisType] = {\n                acc: dataScale[i],\n                count: 1\n            };\n        }\n\n        if(axis.autorange) {\n            sceneBounds[0][i] = Infinity;\n            sceneBounds[1][i] = -Infinity;\n\n            var objects = this.glplot.objects;\n            var annotations = this.fullSceneLayout.annotations || [];\n            var axLetter = axis._name.charAt(0);\n\n            for(j = 0; j < objects.length; j++) {\n                var obj = objects[j];\n                var objBounds = obj.bounds;\n                var pad = obj._trace.data._pad || 0;\n\n                if(obj.constructor.name === 'ErrorBars' && axis._lowerLogErrorBound) {\n                    sceneBounds[0][i] = Math.min(sceneBounds[0][i], axis._lowerLogErrorBound);\n                } else {\n                    sceneBounds[0][i] = Math.min(sceneBounds[0][i], objBounds[0][i] / dataScale[i] - pad);\n                }\n                sceneBounds[1][i] = Math.max(sceneBounds[1][i], objBounds[1][i] / dataScale[i] + pad);\n            }\n\n            for(j = 0; j < annotations.length; j++) {\n                var ann = annotations[j];\n\n                // N.B. not taking into consideration the arrowhead\n                if(ann.visible) {\n                    var pos = axis.r2l(ann[axLetter]);\n                    sceneBounds[0][i] = Math.min(sceneBounds[0][i], pos);\n                    sceneBounds[1][i] = Math.max(sceneBounds[1][i], pos);\n                }\n            }\n\n            if('rangemode' in axis && axis.rangemode === 'tozero') {\n                sceneBounds[0][i] = Math.min(sceneBounds[0][i], 0);\n                sceneBounds[1][i] = Math.max(sceneBounds[1][i], 0);\n            }\n            if(sceneBounds[0][i] > sceneBounds[1][i]) {\n                sceneBounds[0][i] = -1;\n                sceneBounds[1][i] = 1;\n            } else {\n                var d = sceneBounds[1][i] - sceneBounds[0][i];\n                sceneBounds[0][i] -= d / 32.0;\n                sceneBounds[1][i] += d / 32.0;\n            }\n\n            if(axis.autorange === 'reversed') {\n                // swap bounds:\n                var tmp = sceneBounds[0][i];\n                sceneBounds[0][i] = sceneBounds[1][i];\n                sceneBounds[1][i] = tmp;\n            }\n        } else {\n            var range = axis.range;\n            sceneBounds[0][i] = axis.r2l(range[0]);\n            sceneBounds[1][i] = axis.r2l(range[1]);\n        }\n        if(sceneBounds[0][i] === sceneBounds[1][i]) {\n            sceneBounds[0][i] -= 1;\n            sceneBounds[1][i] += 1;\n        }\n        axisDataRange[i] = sceneBounds[1][i] - sceneBounds[0][i];\n\n        // Update plot bounds\n        this.glplot.bounds[0][i] = sceneBounds[0][i] * dataScale[i];\n        this.glplot.bounds[1][i] = sceneBounds[1][i] * dataScale[i];\n    }\n\n    var axesScaleRatio = [1, 1, 1];\n\n    // Compute axis scale per category\n    for(i = 0; i < 3; ++i) {\n        axis = fullSceneLayout[axisProperties[i]];\n        axisType = axis.type;\n        var axisRatio = axisTypeRatios[axisType];\n        axesScaleRatio[i] = Math.pow(axisRatio.acc, 1.0 / axisRatio.count) / dataScale[i];\n    }\n\n    /*\n     * Dynamically set the aspect ratio depending on the users aspect settings\n     */\n    var axisAutoScaleFactor = 4;\n    var aspectRatio;\n\n    if(fullSceneLayout.aspectmode === 'auto') {\n        if(Math.max.apply(null, axesScaleRatio) / Math.min.apply(null, axesScaleRatio) <= axisAutoScaleFactor) {\n            /*\n             * USE DATA MODE WHEN AXIS RANGE DIMENSIONS ARE RELATIVELY EQUAL\n             */\n\n            aspectRatio = axesScaleRatio;\n        } else {\n            /*\n             * USE EQUAL MODE WHEN AXIS RANGE DIMENSIONS ARE HIGHLY UNEQUAL\n             */\n            aspectRatio = [1, 1, 1];\n        }\n    } else if(fullSceneLayout.aspectmode === 'cube') {\n        aspectRatio = [1, 1, 1];\n    } else if(fullSceneLayout.aspectmode === 'data') {\n        aspectRatio = axesScaleRatio;\n    } else if(fullSceneLayout.aspectmode === 'manual') {\n        var userRatio = fullSceneLayout.aspectratio;\n        aspectRatio = [userRatio.x, userRatio.y, userRatio.z];\n    } else {\n        throw new Error('scene.js aspectRatio was not one of the enumerated types');\n    }\n\n    /*\n     * Write aspect Ratio back to user data and fullLayout so that it is modifies as user\n     * manipulates the aspectmode settings and the fullLayout is up-to-date.\n     */\n    fullSceneLayout.aspectratio.x = sceneLayout.aspectratio.x = aspectRatio[0];\n    fullSceneLayout.aspectratio.y = sceneLayout.aspectratio.y = aspectRatio[1];\n    fullSceneLayout.aspectratio.z = sceneLayout.aspectratio.z = aspectRatio[2];\n\n    /*\n     * Finally assign the computed aspecratio to the glplot module. This will have an effect\n     * on the next render cycle.\n     */\n    this.glplot.aspect = aspectRatio;\n\n\n    // Update frame position for multi plots\n    var domain = fullSceneLayout.domain || null;\n    var size = fullLayout._size || null;\n\n    if(domain && size) {\n        var containerStyle = this.container.style;\n        containerStyle.position = 'absolute';\n        containerStyle.left = (size.l + domain.x[0] * size.w) + 'px';\n        containerStyle.top = (size.t + (1 - domain.y[1]) * size.h) + 'px';\n        containerStyle.width = (size.w * (domain.x[1] - domain.x[0])) + 'px';\n        containerStyle.height = (size.h * (domain.y[1] - domain.y[0])) + 'px';\n    }\n\n    // force redraw so that promise is returned when rendering is completed\n    this.glplot.redraw();\n};\n\nproto.destroy = function() {\n    if(!this.glplot) return;\n\n    this.camera.mouseListener.enabled = false;\n    this.container.removeEventListener('wheel', this.camera.wheelListener);\n    this.camera = this.glplot.camera = null;\n    this.glplot.dispose();\n    this.container.parentNode.removeChild(this.container);\n    this.glplot = null;\n};\n\n// getOrbitCamera :: plotly_coords -> orbit_camera_coords\n// inverse of getLayoutCamera\nfunction getOrbitCamera(camera) {\n    return [\n        [camera.eye.x, camera.eye.y, camera.eye.z],\n        [camera.center.x, camera.center.y, camera.center.z],\n        [camera.up.x, camera.up.y, camera.up.z]\n    ];\n}\n\n// getLayoutCamera :: orbit_camera_coords -> plotly_coords\n// inverse of getOrbitCamera\nfunction getLayoutCamera(camera) {\n    return {\n        up: {x: camera.up[0], y: camera.up[1], z: camera.up[2]},\n        center: {x: camera.center[0], y: camera.center[1], z: camera.center[2]},\n        eye: {x: camera.eye[0], y: camera.eye[1], z: camera.eye[2]},\n        projection: {type: (camera._ortho === true) ? 'orthographic' : 'perspective'}\n    };\n}\n\n// get camera position in plotly coords from 'orbit-camera' coords\nproto.getCamera = function getCamera() {\n    this.glplot.camera.view.recalcMatrix(this.camera.view.lastT());\n    return getLayoutCamera(this.glplot.camera);\n};\n\n// set camera position with a set of plotly coords\nproto.setCamera = function setCamera(cameraData) {\n    this.glplot.camera.lookAt.apply(this, getOrbitCamera(cameraData));\n\n    var newOrtho = (cameraData.projection.type === 'orthographic');\n    var oldOrtho = this.glplot.camera._ortho;\n\n    if(newOrtho !== oldOrtho) {\n        this.glplot.redraw();\n\n        var pixelRatio = this.glplot.pixelRatio;\n\n        var RGBA = this.glplot.clearColor;\n        this.glplot.gl.clearColor(\n            RGBA[0], RGBA[1], RGBA[2], RGBA[3]\n        );\n        this.glplot.gl.clear(\n            this.glplot.gl.DEPTH_BUFFER_BIT |\n            this.glplot.gl.COLOR_BUFFER_BIT\n        );\n\n        this.glplot.dispose();\n\n        initializeGLPlot(this, pixelRatio);\n        this.glplot.camera._ortho = newOrtho;\n    }\n};\n\n// save camera to user layout (i.e. gd.layout)\nproto.saveCamera = function saveCamera(layout) {\n    var fullLayout = this.fullLayout;\n    var cameraData = this.getCamera();\n    var cameraNestedProp = Lib.nestedProperty(layout, this.id + '.camera');\n    var cameraDataLastSave = cameraNestedProp.get();\n    var hasChanged = false;\n\n    function same(x, y, i, j) {\n        var vectors = ['up', 'center', 'eye'];\n        var components = ['x', 'y', 'z'];\n        return y[vectors[i]] && (x[vectors[i]][components[j]] === y[vectors[i]][components[j]]);\n    }\n\n    if(cameraDataLastSave === undefined) {\n        hasChanged = true;\n    } else {\n        for(var i = 0; i < 3; i++) {\n            for(var j = 0; j < 3; j++) {\n                if(!same(cameraData, cameraDataLastSave, i, j)) {\n                    hasChanged = true;\n                    break;\n                }\n            }\n        }\n\n        if(!cameraDataLastSave.projection || (\n            cameraData.projection &&\n            cameraData.projection.type !== cameraDataLastSave.projection.type)) {\n            hasChanged = true;\n        }\n    }\n\n    if(hasChanged) {\n        var preGUI = {};\n        preGUI[this.id + '.camera'] = cameraDataLastSave;\n        Registry.call('_storeDirectGUIEdit', layout, fullLayout._preGUI, preGUI);\n\n        cameraNestedProp.set(cameraData);\n\n        var cameraFullNP = Lib.nestedProperty(fullLayout, this.id + '.camera');\n        cameraFullNP.set(cameraData);\n    }\n\n    return hasChanged;\n};\n\nproto.updateFx = function(dragmode, hovermode) {\n    var camera = this.camera;\n    if(camera) {\n        // rotate and orbital are synonymous\n        if(dragmode === 'orbit') {\n            camera.mode = 'orbit';\n            camera.keyBindingMode = 'rotate';\n        } else if(dragmode === 'turntable') {\n            camera.up = [0, 0, 1];\n            camera.mode = 'turntable';\n            camera.keyBindingMode = 'rotate';\n\n            // The setter for camera.mode animates the transition to z-up,\n            // but only if we *don't* explicitly set z-up earlier via the\n            // relayout. So push `up` back to layout & fullLayout manually now.\n            var gd = this.graphDiv;\n            var fullLayout = gd._fullLayout;\n            var fullCamera = this.fullSceneLayout.camera;\n            var x = fullCamera.up.x;\n            var y = fullCamera.up.y;\n            var z = fullCamera.up.z;\n            // only push `up` back to (full)layout if it's going to change\n            if(z / Math.sqrt(x * x + y * y + z * z) < 0.999) {\n                var attr = this.id + '.camera.up';\n                var zUp = {x: 0, y: 0, z: 1};\n                var edits = {};\n                edits[attr] = zUp;\n                var layout = gd.layout;\n                Registry.call('_storeDirectGUIEdit', layout, fullLayout._preGUI, edits);\n                fullCamera.up = zUp;\n                Lib.nestedProperty(layout, attr).set(zUp);\n            }\n        } else {\n            // none rotation modes [pan or zoom]\n            camera.keyBindingMode = dragmode;\n        }\n    }\n\n    // to put dragmode and hovermode on the same grounds from relayout\n    this.fullSceneLayout.hovermode = hovermode;\n};\n\nproto.toImage = function(format) {\n    if(!format) format = 'png';\n\n    if(this.staticMode) this.container.appendChild(STATIC_CANVAS);\n\n    // Force redraw\n    this.glplot.redraw();\n\n    // Grab context and yank out pixels\n    var gl = this.glplot.gl;\n    var w = gl.drawingBufferWidth;\n    var h = gl.drawingBufferHeight;\n\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n    var pixels = new Uint8Array(w * h * 4);\n    gl.readPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\n\n    // Flip pixels\n    for(var j = 0, k = h - 1; j < k; ++j, --k) {\n        for(var i = 0; i < w; ++i) {\n            for(var l = 0; l < 4; ++l) {\n                var tmp = pixels[4 * (w * j + i) + l];\n                pixels[4 * (w * j + i) + l] = pixels[4 * (w * k + i) + l];\n                pixels[4 * (w * k + i) + l] = tmp;\n            }\n        }\n    }\n\n    var canvas = document.createElement('canvas');\n    canvas.width = w;\n    canvas.height = h;\n    var context = canvas.getContext('2d');\n    var imageData = context.createImageData(w, h);\n    imageData.data.set(pixels);\n    context.putImageData(imageData, 0, 0);\n\n    var dataURL;\n\n    switch(format) {\n        case 'jpeg':\n            dataURL = canvas.toDataURL('image/jpeg');\n            break;\n        case 'webp':\n            dataURL = canvas.toDataURL('image/webp');\n            break;\n        default:\n            dataURL = canvas.toDataURL('image/png');\n    }\n\n    if(this.staticMode) this.container.removeChild(STATIC_CANVAS);\n\n    return dataURL;\n};\n\nproto.setConvert = function() {\n    for(var i = 0; i < 3; i++) {\n        var ax = this.fullSceneLayout[axisProperties[i]];\n        Axes.setConvert(ax, this.fullLayout);\n        ax.setScale = Lib.noop;\n    }\n};\n\nproto.make4thDimension = function() {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var fullLayout = gd._fullLayout;\n\n    // mock axis for hover formatting\n    _this.mockAxis = {\n        type: 'linear',\n        showexponent: 'all',\n        exponentformat: 'B'\n    };\n    Axes.setConvert(_this.mockAxis, fullLayout);\n};\n\nmodule.exports = Scene;\n\n},{\"../../components/fx\":619,\"../../lib\":703,\"../../lib/show_no_webgl_msg\":724,\"../../lib/str2rgbarray\":726,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"./layout/convert\":795,\"./layout/spikes\":798,\"./layout/tick_marks\":799,\"./project\":800,\"gl-plot3d\":289,\"has-passive-events\":406,\"webgl-context\":543}],802:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function zip3(x, y, z, len) {\n    len = len || x.length;\n\n    var result = new Array(len);\n    for(var i = 0; i < len; i++) {\n        result[i] = [x[i], y[i], z[i]];\n    }\n    return result;\n};\n\n},{}],803:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('./font_attributes');\nvar animationAttrs = _dereq_('./animation_attributes');\nvar colorAttrs = _dereq_('../components/color/attributes');\nvar padAttrs = _dereq_('./pad_attributes');\nvar extendFlat = _dereq_('../lib/extend').extendFlat;\n\nvar globalFont = fontAttrs({\n    editType: 'calc',\n    \n});\nglobalFont.family.dflt = '\"Open Sans\", verdana, arial, sans-serif';\nglobalFont.size.dflt = 12;\nglobalFont.color.dflt = colorAttrs.defaultLine;\n\nmodule.exports = {\n    font: globalFont,\n    title: {\n        text: {\n            valType: 'string',\n            \n            editType: 'layoutstyle',\n            \n        },\n        font: fontAttrs({\n            editType: 'layoutstyle',\n            \n        }),\n        xref: {\n            valType: 'enumerated',\n            dflt: 'container',\n            values: ['container', 'paper'],\n            \n            editType: 'layoutstyle',\n            \n        },\n        yref: {\n            valType: 'enumerated',\n            dflt: 'container',\n            values: ['container', 'paper'],\n            \n            editType: 'layoutstyle',\n            \n        },\n        x: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            dflt: 0.5,\n            \n            editType: 'layoutstyle',\n            \n        },\n        y: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            dflt: 'auto',\n            \n            editType: 'layoutstyle',\n            \n        },\n        xanchor: {\n            valType: 'enumerated',\n            dflt: 'auto',\n            values: ['auto', 'left', 'center', 'right'],\n            \n            editType: 'layoutstyle',\n            \n        },\n        yanchor: {\n            valType: 'enumerated',\n            dflt: 'auto',\n            values: ['auto', 'top', 'middle', 'bottom'],\n            \n            editType: 'layoutstyle',\n            \n        },\n        pad: extendFlat(padAttrs({editType: 'layoutstyle'}), {\n            \n        }),\n        editType: 'layoutstyle'\n    },\n    autosize: {\n        valType: 'boolean',\n        \n        dflt: false,\n        // autosize, width, and height get special editType treatment in _relayout\n        // so we can handle noop resizes more efficiently\n        editType: 'none',\n        \n    },\n    width: {\n        valType: 'number',\n        \n        min: 10,\n        dflt: 700,\n        editType: 'plot',\n        \n    },\n    height: {\n        valType: 'number',\n        \n        min: 10,\n        dflt: 450,\n        editType: 'plot',\n        \n    },\n    margin: {\n        l: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 80,\n            editType: 'plot',\n            \n        },\n        r: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 80,\n            editType: 'plot',\n            \n        },\n        t: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 100,\n            editType: 'plot',\n            \n        },\n        b: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 80,\n            editType: 'plot',\n            \n        },\n        pad: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 0,\n            editType: 'plot',\n            \n        },\n        autoexpand: {\n            valType: 'boolean',\n            \n            dflt: true,\n            editType: 'plot'\n        },\n        editType: 'plot'\n    },\n    paper_bgcolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.background,\n        editType: 'plot',\n        \n    },\n    plot_bgcolor: {\n        // defined here, but set in cartesian.supplyLayoutDefaults\n        // because it needs to know if there are (2D) axes or not\n        valType: 'color',\n        \n        dflt: colorAttrs.background,\n        editType: 'layoutstyle',\n        \n    },\n    separators: {\n        valType: 'string',\n        \n        editType: 'plot',\n        \n    },\n    hidesources: {\n        valType: 'boolean',\n        \n        dflt: false,\n        editType: 'plot',\n        \n    },\n    showlegend: {\n        // handled in legend.supplyLayoutDefaults\n        // but included here because it's not in the legend object\n        valType: 'boolean',\n        \n        editType: 'legend',\n        \n    },\n    colorway: {\n        valType: 'colorlist',\n        dflt: colorAttrs.defaults,\n        \n        editType: 'calc',\n        \n    },\n    datarevision: {\n        valType: 'any',\n        \n        editType: 'calc',\n        \n    },\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    editrevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    selectionrevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n    template: {\n        valType: 'any',\n        \n        editType: 'calc',\n        \n    },\n    modebar: {\n        orientation: {\n            valType: 'enumerated',\n            values: ['v', 'h'],\n            dflt: 'h',\n            \n            editType: 'modebar',\n            \n        },\n        bgcolor: {\n            valType: 'color',\n            \n            editType: 'modebar',\n            \n        },\n        color: {\n            valType: 'color',\n            \n            editType: 'modebar',\n            \n        },\n        activecolor: {\n            valType: 'color',\n            \n            editType: 'modebar',\n            \n        },\n        uirevision: {\n            valType: 'any',\n            \n            editType: 'none',\n            \n        },\n        editType: 'modebar'\n    },\n\n    meta: {\n        valType: 'any',\n        arrayOk: true,\n        \n        editType: 'plot',\n        \n    },\n\n    transition: extendFlat({}, animationAttrs.transition, {\n        \n        editType: 'none'\n    }),\n\n    _deprecated: {\n        title: {\n            valType: 'string',\n            \n            editType: 'layoutstyle',\n            \n        },\n        titlefont: fontAttrs({\n            editType: 'layoutstyle',\n            \n        })\n    }\n};\n\n},{\"../components/color/attributes\":579,\"../lib/extend\":693,\"./animation_attributes\":746,\"./font_attributes\":777,\"./pad_attributes\":811}],804:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar requiredVersion = '0.45.0';\n\nmodule.exports = {\n    requiredVersion: requiredVersion,\n\n    styleUrlPrefix: 'mapbox://styles/mapbox/',\n    styleUrlSuffix: 'v9',\n\n    controlContainerClassName: 'mapboxgl-control-container',\n\n    wrongVersionErrorMsg: [\n        'Your custom plotly.js bundle is not using the correct mapbox-gl version',\n        'Please install mapbox-gl@' + requiredVersion + '.'\n    ].join('\\n'),\n\n    noAccessTokenErrorMsg: [\n        'Missing Mapbox access token.',\n        'Mapbox trace type require a Mapbox access token to be registered.',\n        'For example:',\n        '  Plotly.plot(gd, data, layout, { mapboxAccessToken: \\'my-access-token\\' });',\n        'More info here: https://www.mapbox.com/help/define-access-token/'\n    ].join('\\n'),\n\n    mapOnErrorMsg: 'Mapbox error.',\n\n    // a subset of node_modules/mapbox-gl/dist/mapbox-gl.css\n    styleRules: {\n        map: 'overflow:hidden;position:relative;',\n        'missing-css': 'display:none',\n    }\n};\n\n},{}],805:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n/**\n * Convert plotly.js 'textposition' to mapbox-gl 'anchor' and 'offset'\n * (with the help of the icon size).\n *\n * @param {string} textpostion : plotly.js textposition value\n * @param {number} iconSize : plotly.js icon size (e.g. marker.size for traces)\n *\n * @return {object}\n *      - anchor\n *      - offset\n */\nmodule.exports = function convertTextOpts(textposition, iconSize) {\n    var parts = textposition.split(' ');\n    var vPos = parts[0];\n    var hPos = parts[1];\n\n    // ballpack values\n    var factor = Lib.isArrayOrTypedArray(iconSize) ? Lib.mean(iconSize) : iconSize;\n    var xInc = 0.5 + (factor / 100);\n    var yInc = 1.5 + (factor / 100);\n\n    var anchorVals = ['', ''];\n    var offset = [0, 0];\n\n    switch(vPos) {\n        case 'top':\n            anchorVals[0] = 'top';\n            offset[1] = -yInc;\n            break;\n        case 'bottom':\n            anchorVals[0] = 'bottom';\n            offset[1] = yInc;\n            break;\n    }\n\n    switch(hPos) {\n        case 'left':\n            anchorVals[1] = 'right';\n            offset[0] = -xInc;\n            break;\n        case 'right':\n            anchorVals[1] = 'left';\n            offset[0] = xInc;\n            break;\n    }\n\n    // Mapbox text-anchor must be one of:\n    //  center, left, right, top, bottom,\n    //  top-left, top-right, bottom-left, bottom-right\n\n    var anchor;\n    if(anchorVals[0] && anchorVals[1]) anchor = anchorVals.join('-');\n    else if(anchorVals[0]) anchor = anchorVals[0];\n    else if(anchorVals[1]) anchor = anchorVals[1];\n    else anchor = 'center';\n\n    return { anchor: anchor, offset: offset };\n};\n\n},{\"../../lib\":703}],806:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar mapboxgl = _dereq_('mapbox-gl');\n\nvar Lib = _dereq_('../../lib');\nvar getSubplotCalcData = _dereq_('../../plots/get_data').getSubplotCalcData;\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nvar createMapbox = _dereq_('./mapbox');\nvar constants = _dereq_('./constants');\n\nvar MAPBOX = 'mapbox';\n\nfor(var k in constants.styleRules) {\n    Lib.addStyleRule('.mapboxgl-' + k, constants.styleRules[k]);\n}\n\nexports.name = MAPBOX;\n\nexports.attr = 'subplot';\n\nexports.idRoot = MAPBOX;\n\nexports.idRegex = exports.attrRegex = Lib.counterRegex(MAPBOX);\n\nexports.attributes = {\n    subplot: {\n        valType: 'subplotid',\n        \n        dflt: 'mapbox',\n        editType: 'calc',\n        \n    }\n};\n\nexports.layoutAttributes = _dereq_('./layout_attributes');\n\nexports.supplyLayoutDefaults = _dereq_('./layout_defaults');\n\nexports.plot = function plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcData = gd.calcdata;\n    var mapboxIds = fullLayout._subplots[MAPBOX];\n\n    if(mapboxgl.version !== constants.requiredVersion) {\n        throw new Error(constants.wrongVersionErrorMsg);\n    }\n\n    var accessToken = findAccessToken(gd, mapboxIds);\n    mapboxgl.accessToken = accessToken;\n\n    for(var i = 0; i < mapboxIds.length; i++) {\n        var id = mapboxIds[i];\n        var subplotCalcData = getSubplotCalcData(calcData, MAPBOX, id);\n        var opts = fullLayout[id];\n        var mapbox = opts._subplot;\n\n        if(!mapbox) {\n            mapbox = createMapbox({\n                gd: gd,\n                container: fullLayout._glcontainer.node(),\n                id: id,\n                fullLayout: fullLayout,\n                staticPlot: gd._context.staticPlot\n            });\n\n            fullLayout[id]._subplot = mapbox;\n        }\n\n        if(!mapbox.viewInitial) {\n            mapbox.viewInitial = {\n                center: Lib.extendFlat({}, opts.center),\n                zoom: opts.zoom,\n                bearing: opts.bearing,\n                pitch: opts.pitch\n            };\n        }\n\n        mapbox.plot(subplotCalcData, fullLayout, gd._promises);\n    }\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldMapboxKeys = oldFullLayout._subplots[MAPBOX] || [];\n\n    for(var i = 0; i < oldMapboxKeys.length; i++) {\n        var oldMapboxKey = oldMapboxKeys[i];\n\n        if(!newFullLayout[oldMapboxKey] && !!oldFullLayout[oldMapboxKey]._subplot) {\n            oldFullLayout[oldMapboxKey]._subplot.destroy();\n        }\n    }\n};\n\nexports.toSVG = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots[MAPBOX];\n    var size = fullLayout._size;\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var opts = fullLayout[subplotIds[i]];\n        var domain = opts.domain;\n        var mapbox = opts._subplot;\n\n        var imageData = mapbox.toImage('png');\n        var image = fullLayout._glimages.append('svg:image');\n\n        image.attr({\n            xmlns: xmlnsNamespaces.svg,\n            'xlink:href': imageData,\n            x: size.l + size.w * domain.x[0],\n            y: size.t + size.h * (1 - domain.y[1]),\n            width: size.w * (domain.x[1] - domain.x[0]),\n            height: size.h * (domain.y[1] - domain.y[0]),\n            preserveAspectRatio: 'none'\n        });\n\n        mapbox.destroy();\n    }\n};\n\nfunction findAccessToken(gd, mapboxIds) {\n    var fullLayout = gd._fullLayout;\n    var context = gd._context;\n\n    // special case for Mapbox Atlas users\n    if(context.mapboxAccessToken === '') return '';\n\n    // Take the first token we find in a mapbox subplot.\n    // These default to the context value but may be overridden.\n    for(var i = 0; i < mapboxIds.length; i++) {\n        var opts = fullLayout[mapboxIds[i]];\n\n        if(opts.accesstoken) {\n            return opts.accesstoken;\n        }\n    }\n\n    throw new Error(constants.noAccessTokenErrorMsg);\n}\n\nexports.updateFx = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var subplotIds = fullLayout._subplots[MAPBOX];\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var subplotObj = fullLayout[subplotIds[i]]._subplot;\n        subplotObj.updateFx(fullLayout);\n    }\n};\n\n},{\"../../constants/xmlns_namespaces\":681,\"../../lib\":703,\"../../plots/get_data\":786,\"./constants\":804,\"./layout_attributes\":808,\"./layout_defaults\":809,\"./mapbox\":810,\"mapbox-gl\":421}],807:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar convertTextOpts = _dereq_('./convert_text_opts');\n\nfunction MapboxLayer(mapbox, index) {\n    this.mapbox = mapbox;\n    this.map = mapbox.map;\n\n    this.uid = mapbox.uid + '-' + 'layer' + index;\n\n    this.idSource = this.uid + '-source';\n    this.idLayer = this.uid + '-layer';\n\n    // some state variable to check if a remove/add step is needed\n    this.sourceType = null;\n    this.source = null;\n    this.layerType = null;\n    this.below = null;\n\n    // is layer currently visible\n    this.visible = false;\n}\n\nvar proto = MapboxLayer.prototype;\n\nproto.update = function update(opts) {\n    if(!this.visible) {\n        // IMPORTANT: must create source before layer to not cause errors\n        this.updateSource(opts);\n        this.updateLayer(opts);\n    } else if(this.needsNewSource(opts)) {\n        // IMPORTANT: must delete layer before source to not cause errors\n        this.removeLayer();\n        this.updateSource(opts);\n        this.updateLayer(opts);\n    } else if(this.needsNewLayer(opts)) {\n        this.updateLayer(opts);\n    } else {\n        this.updateStyle(opts);\n    }\n\n    this.visible = isVisible(opts);\n};\n\nproto.needsNewSource = function(opts) {\n    // for some reason changing layer to 'fill' or 'symbol'\n    // w/o changing the source throws an exception in mapbox-gl 0.18 ;\n    // stay safe and make new source on type changes\n    return (\n        this.sourceType !== opts.sourcetype ||\n        this.source !== opts.source ||\n        this.layerType !== opts.type\n    );\n};\n\nproto.needsNewLayer = function(opts) {\n    return (\n        this.layerType !== opts.type ||\n        this.below !== opts.below\n    );\n};\n\nproto.updateSource = function(opts) {\n    var map = this.map;\n\n    if(map.getSource(this.idSource)) map.removeSource(this.idSource);\n\n    this.sourceType = opts.sourcetype;\n    this.source = opts.source;\n\n    if(!isVisible(opts)) return;\n\n    var sourceOpts = convertSourceOpts(opts);\n\n    map.addSource(this.idSource, sourceOpts);\n};\n\nproto.updateLayer = function(opts) {\n    var map = this.map;\n    var convertedOpts = convertOpts(opts);\n\n    this.removeLayer();\n    this.layerType = opts.type;\n\n    if(isVisible(opts)) {\n        map.addLayer({\n            id: this.idLayer,\n            source: this.idSource,\n            'source-layer': opts.sourcelayer || '',\n            type: opts.type,\n            minzoom: opts.minzoom,\n            maxzoom: opts.maxzoom,\n            layout: convertedOpts.layout,\n            paint: convertedOpts.paint\n        }, opts.below);\n    }\n};\n\nproto.updateStyle = function(opts) {\n    if(isVisible(opts)) {\n        var convertedOpts = convertOpts(opts);\n        this.mapbox.setOptions(this.idLayer, 'setLayoutProperty', convertedOpts.layout);\n        this.mapbox.setOptions(this.idLayer, 'setPaintProperty', convertedOpts.paint);\n    }\n};\n\nproto.removeLayer = function() {\n    var map = this.map;\n    if(map.getLayer(this.idLayer)) {\n        map.removeLayer(this.idLayer);\n    }\n};\n\nproto.dispose = function dispose() {\n    var map = this.map;\n    map.removeLayer(this.idLayer);\n    map.removeSource(this.idSource);\n};\n\nfunction isVisible(opts) {\n    var source = opts.source;\n\n    return opts.visible && (\n        Lib.isPlainObject(source) ||\n        (typeof source === 'string' && source.length > 0)\n    );\n}\n\nfunction convertOpts(opts) {\n    var layout = {};\n    var paint = {};\n\n    switch(opts.type) {\n        case 'circle':\n            Lib.extendFlat(paint, {\n                'circle-radius': opts.circle.radius,\n                'circle-color': opts.color,\n                'circle-opacity': opts.opacity\n            });\n            break;\n\n        case 'line':\n            Lib.extendFlat(paint, {\n                'line-width': opts.line.width,\n                'line-color': opts.color,\n                'line-opacity': opts.opacity,\n                'line-dasharray': opts.line.dash\n            });\n            break;\n\n        case 'fill':\n            Lib.extendFlat(paint, {\n                'fill-color': opts.color,\n                'fill-outline-color': opts.fill.outlinecolor,\n                'fill-opacity': opts.opacity\n\n                // no way to pass specify outline width at the moment\n            });\n            break;\n\n        case 'symbol':\n            var symbol = opts.symbol;\n            var textOpts = convertTextOpts(symbol.textposition, symbol.iconsize);\n\n            Lib.extendFlat(layout, {\n                'icon-image': symbol.icon + '-15',\n                'icon-size': symbol.iconsize / 10,\n\n                'text-field': symbol.text,\n                'text-size': symbol.textfont.size,\n                'text-anchor': textOpts.anchor,\n                'text-offset': textOpts.offset,\n                'symbol-placement': symbol.placement,\n\n                // TODO font family\n                // 'text-font': symbol.textfont.family.split(', '),\n            });\n\n            Lib.extendFlat(paint, {\n                'icon-color': opts.color,\n                'text-color': symbol.textfont.color,\n                'text-opacity': opts.opacity\n            });\n            break;\n    }\n\n    return { layout: layout, paint: paint };\n}\n\nfunction convertSourceOpts(opts) {\n    var sourceType = opts.sourcetype;\n    var source = opts.source;\n    var sourceOpts = {type: sourceType};\n    var field;\n\n    if(sourceType === 'geojson') {\n        field = 'data';\n    } else if(sourceType === 'vector') {\n        field = typeof source === 'string' ? 'url' : 'tiles';\n    }\n\n    sourceOpts[field] = source;\n    return sourceOpts;\n}\n\nmodule.exports = function createMapboxLayer(mapbox, index, opts) {\n    var mapboxLayer = new MapboxLayer(mapbox, index);\n\n    mapboxLayer.update(opts);\n\n    return mapboxLayer;\n};\n\n},{\"../../lib\":703,\"./convert_text_opts\":805}],808:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar defaultLine = _dereq_('../../components/color').defaultLine;\nvar domainAttrs = _dereq_('../domain').attributes;\nvar fontAttrs = _dereq_('../font_attributes');\nvar textposition = _dereq_('../../traces/scatter/attributes').textposition;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nvar fontAttr = fontAttrs({\n    \n});\nfontAttr.family.dflt = 'Open Sans Regular, Arial Unicode MS Regular';\n\nvar attrs = module.exports = overrideAll({\n    _arrayAttrRegexps: [Lib.counterRegex('mapbox', '.layers', true)],\n\n    domain: domainAttrs({name: 'mapbox'}),\n\n    accesstoken: {\n        valType: 'string',\n        noBlank: true,\n        strict: true,\n        \n        \n    },\n    style: {\n        valType: 'any',\n        values: ['basic', 'streets', 'outdoors', 'light', 'dark', 'satellite', 'satellite-streets'],\n        dflt: 'basic',\n        \n        \n    },\n\n    center: {\n        lon: {\n            valType: 'number',\n            dflt: 0,\n            \n            \n        },\n        lat: {\n            valType: 'number',\n            dflt: 0,\n            \n            \n        }\n    },\n    zoom: {\n        valType: 'number',\n        dflt: 1,\n        \n        \n    },\n    bearing: {\n        valType: 'number',\n        dflt: 0,\n        \n        \n    },\n    pitch: {\n        valType: 'number',\n        dflt: 0,\n        \n        \n    },\n\n    layers: templatedArray('layer', {\n        visible: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n        sourcetype: {\n            valType: 'enumerated',\n            values: ['geojson', 'vector'],\n            dflt: 'geojson',\n            \n            \n        },\n\n        source: {\n            valType: 'any',\n            \n            \n        },\n\n        sourcelayer: {\n            valType: 'string',\n            dflt: '',\n            \n            \n        },\n\n        type: {\n            valType: 'enumerated',\n            values: ['circle', 'line', 'fill', 'symbol'],\n            dflt: 'circle',\n            \n            \n        },\n\n        // attributes shared between all types\n        below: {\n            valType: 'string',\n            dflt: '',\n            \n            \n        },\n        color: {\n            valType: 'color',\n            dflt: defaultLine,\n            \n            \n        },\n        opacity: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n            \n        },\n        minzoom: {\n            valType: 'number',\n            min: 0,\n            max: 24,\n            dflt: 0,\n            \n            \n        },\n        maxzoom: {\n            valType: 'number',\n            min: 0,\n            max: 24,\n            dflt: 24,\n            \n            \n        },\n\n        // type-specific style attributes\n        circle: {\n            radius: {\n                valType: 'number',\n                dflt: 15,\n                \n                \n            }\n        },\n\n        line: {\n            width: {\n                valType: 'number',\n                dflt: 2,\n                \n                \n            },\n            dash: {\n                valType: 'data_array',\n                \n                \n            }\n        },\n\n        fill: {\n            outlinecolor: {\n                valType: 'color',\n                dflt: defaultLine,\n                \n                \n            }\n        },\n\n        symbol: {\n            icon: {\n                valType: 'string',\n                dflt: 'marker',\n                \n                \n            },\n            iconsize: {\n                valType: 'number',\n                dflt: 10,\n                \n                \n            },\n            text: {\n                valType: 'string',\n                dflt: '',\n                \n                \n            },\n            placement: {\n                valType: 'enumerated',\n                values: ['point', 'line', 'line-center'],\n                dflt: 'point',\n                \n                \n            },\n            textfont: fontAttr,\n            textposition: Lib.extendFlat({}, textposition, { arrayOk: false })\n        }\n    })\n}, 'plot', 'from-root');\n\n// set uirevision outside of overrideAll so it can be `editType: 'none'`\nattrs.uirevision = {\n    valType: 'any',\n    \n    editType: 'none',\n    \n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plot_api/edit_types\":734,\"../../plot_api/plot_template\":741,\"../../traces/scatter/attributes\":1075,\"../domain\":776,\"../font_attributes\":777}],809:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleSubplotDefaults = _dereq_('../subplot_defaults');\nvar handleArrayContainerDefaults = _dereq_('../array_container_defaults');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    handleSubplotDefaults(layoutIn, layoutOut, fullData, {\n        type: 'mapbox',\n        attributes: layoutAttributes,\n        handleDefaults: handleDefaults,\n        partition: 'y',\n        accessToken: layoutOut._mapboxAccessToken\n    });\n};\n\nfunction handleDefaults(containerIn, containerOut, coerce, opts) {\n    coerce('accesstoken', opts.accessToken);\n    coerce('style');\n    coerce('center.lon');\n    coerce('center.lat');\n    coerce('zoom');\n    coerce('bearing');\n    coerce('pitch');\n\n    handleArrayContainerDefaults(containerIn, containerOut, {\n        name: 'layers',\n        handleItemDefaults: handleLayerDefaults\n    });\n\n    // copy ref to input container to update 'center' and 'zoom' on map move\n    containerOut._input = containerIn;\n}\n\nfunction handleLayerDefaults(layerIn, layerOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layerIn, layerOut, layoutAttributes.layers, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n    if(visible) {\n        var sourceType = coerce('sourcetype');\n        coerce('source');\n\n        if(sourceType === 'vector') coerce('sourcelayer');\n\n        // maybe add smart default based off GeoJSON geometry?\n        var type = coerce('type');\n\n        coerce('below');\n        coerce('color');\n        coerce('opacity');\n        coerce('minzoom');\n        coerce('maxzoom');\n\n        if(type === 'circle') {\n            coerce('circle.radius');\n        }\n\n        if(type === 'line') {\n            coerce('line.width');\n            coerce('line.dash');\n        }\n\n        if(type === 'fill') {\n            coerce('fill.outlinecolor');\n        }\n\n        if(type === 'symbol') {\n            coerce('symbol.icon');\n            coerce('symbol.iconsize');\n\n            coerce('symbol.text');\n            Lib.coerceFont(coerce, 'symbol.textfont');\n            coerce('symbol.textposition');\n            coerce('symbol.placement');\n        }\n    }\n}\n\n},{\"../../lib\":703,\"../array_container_defaults\":747,\"../subplot_defaults\":826,\"./layout_attributes\":808}],810:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar mapboxgl = _dereq_('mapbox-gl');\n\nvar Fx = _dereq_('../../components/fx');\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\nvar dragElement = _dereq_('../../components/dragelement');\nvar prepSelect = _dereq_('../cartesian/select').prepSelect;\nvar selectOnClick = _dereq_('../cartesian/select').selectOnClick;\nvar constants = _dereq_('./constants');\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar createMapboxLayer = _dereq_('./layers');\n\nfunction Mapbox(opts) {\n    this.id = opts.id;\n    this.gd = opts.gd;\n    this.container = opts.container;\n    this.isStatic = opts.staticPlot;\n\n    var fullLayout = opts.fullLayout;\n\n    // unique id for this Mapbox instance\n    this.uid = fullLayout._uid + '-' + this.id;\n\n    // create framework on instantiation for a smoother first plot call\n    this.div = null;\n    this.xaxis = null;\n    this.yaxis = null;\n    this.createFramework(fullLayout);\n\n    // state variables used to infer how and what to update\n    this.map = null;\n    this.accessToken = null;\n    this.styleObj = null;\n    this.traceHash = {};\n    this.layerList = [];\n}\n\nvar proto = Mapbox.prototype;\n\nmodule.exports = function createMapbox(opts) {\n    return new Mapbox(opts);\n};\n\nproto.plot = function(calcData, fullLayout, promises) {\n    var self = this;\n    var opts = fullLayout[self.id];\n\n    // remove map and create a new map if access token has change\n    if(self.map && (opts.accesstoken !== self.accessToken)) {\n        self.map.remove();\n        self.map = null;\n        self.styleObj = null;\n        self.traceHash = [];\n        self.layerList = {};\n    }\n\n    var promise;\n\n    if(!self.map) {\n        promise = new Promise(function(resolve, reject) {\n            self.createMap(calcData, fullLayout, resolve, reject);\n        });\n    } else {\n        promise = new Promise(function(resolve, reject) {\n            self.updateMap(calcData, fullLayout, resolve, reject);\n        });\n    }\n\n    promises.push(promise);\n};\n\nproto.createMap = function(calcData, fullLayout, resolve, reject) {\n    var self = this;\n    var gd = self.gd;\n    var opts = fullLayout[self.id];\n\n    // store style id and URL or object\n    var styleObj = self.styleObj = getStyleObj(opts.style);\n\n    // store access token associated with this map\n    self.accessToken = opts.accesstoken;\n\n    // create the map!\n    var map = self.map = new mapboxgl.Map({\n        container: self.div,\n\n        style: styleObj.style,\n        center: convertCenter(opts.center),\n        zoom: opts.zoom,\n        bearing: opts.bearing,\n        pitch: opts.pitch,\n\n        interactive: !self.isStatic,\n        preserveDrawingBuffer: self.isStatic,\n\n        doubleClickZoom: false,\n        boxZoom: false\n    });\n\n    // clear navigation container\n    var className = constants.controlContainerClassName;\n    var controlContainer = self.div.getElementsByClassName(className)[0];\n    self.div.removeChild(controlContainer);\n\n    // make sure canvas does not inherit left and top css\n    map._canvas.style.left = '0px';\n    map._canvas.style.top = '0px';\n\n    self.rejectOnError(reject);\n\n    map.once('load', function() {\n        self.updateData(calcData);\n        self.updateLayout(fullLayout);\n        self.resolveOnRender(resolve);\n    });\n\n    if(self.isStatic) return;\n\n    var wheeling = false;\n\n    // keep track of pan / zoom in user layout and emit relayout event\n    map.on('moveend', function(eventData) {\n        if(!self.map) return;\n\n        // 'moveend' gets triggered by map.setCenter, map.setZoom,\n        // map.setBearing and map.setPitch.\n        //\n        // Here, we make sure that state updates amd 'plotly_relayout'\n        // are triggered only when the 'moveend' originates from a\n        // mouse target (filtering out API calls) to not\n        // duplicate 'plotly_relayout' events.\n\n        if(eventData.originalEvent || wheeling) {\n            var optsNow = gd._fullLayout[self.id];\n            Registry.call('_storeDirectGUIEdit', gd.layout, gd._fullLayout._preGUI, self.getViewEdits(optsNow));\n\n            var viewNow = self.getView();\n            optsNow._input.center = optsNow.center = viewNow.center;\n            optsNow._input.zoom = optsNow.zoom = viewNow.zoom;\n            optsNow._input.bearing = optsNow.bearing = viewNow.bearing;\n            optsNow._input.pitch = optsNow.pitch = viewNow.pitch;\n\n            gd.emit('plotly_relayout', self.getViewEdits(viewNow));\n        }\n        wheeling = false;\n    });\n\n    map.on('wheel', function() {\n        wheeling = true;\n    });\n\n    map.on('mousemove', function(evt) {\n        var bb = self.div.getBoundingClientRect();\n\n        // some hackery to get Fx.hover to work\n        evt.clientX = evt.point.x + bb.left;\n        evt.clientY = evt.point.y + bb.top;\n\n        evt.target.getBoundingClientRect = function() { return bb; };\n\n        self.xaxis.p2c = function() { return evt.lngLat.lng; };\n        self.yaxis.p2c = function() { return evt.lngLat.lat; };\n\n        Fx.hover(gd, evt, self.id);\n    });\n\n    function unhover() {\n        Fx.loneUnhover(fullLayout._toppaper);\n    }\n\n    map.on('dragstart', unhover);\n    map.on('zoomstart', unhover);\n\n    function emitUpdate() {\n        var viewNow = self.getView();\n        gd.emit('plotly_relayouting', self.getViewEdits(viewNow));\n    }\n\n    map.on('drag', emitUpdate);\n    map.on('zoom', emitUpdate);\n\n    map.on('dblclick', function() {\n        var optsNow = gd._fullLayout[self.id];\n        Registry.call('_storeDirectGUIEdit', gd.layout, gd._fullLayout._preGUI, self.getViewEdits(optsNow));\n\n        var viewInitial = self.viewInitial;\n        map.setCenter(convertCenter(viewInitial.center));\n        map.setZoom(viewInitial.zoom);\n        map.setBearing(viewInitial.bearing);\n        map.setPitch(viewInitial.pitch);\n\n        var viewNow = self.getView();\n        optsNow._input.center = optsNow.center = viewNow.center;\n        optsNow._input.zoom = optsNow.zoom = viewNow.zoom;\n        optsNow._input.bearing = optsNow.bearing = viewNow.bearing;\n        optsNow._input.pitch = optsNow.pitch = viewNow.pitch;\n\n        gd.emit('plotly_doubleclick', null);\n        gd.emit('plotly_relayout', self.getViewEdits(viewNow));\n    });\n\n    // define event handlers on map creation, to keep one ref per map,\n    // so that map.on / map.off in updateFx works as expected\n    self.clearSelect = function() {\n        gd._fullLayout._zoomlayer.selectAll('.select-outline').remove();\n    };\n\n    /**\n     * Returns a click handler function that is supposed\n     * to handle clicks in pan mode.\n     */\n    self.onClickInPanFn = function(dragOptions) {\n        return function(evt) {\n            var clickMode = gd._fullLayout.clickmode;\n\n            if(clickMode.indexOf('select') > -1) {\n                selectOnClick(evt.originalEvent, gd, [self.xaxis], [self.yaxis], self.id, dragOptions);\n            }\n\n            if(clickMode.indexOf('event') > -1) {\n                // TODO: this does not support right-click. If we want to support it, we\n                // would likely need to change mapbox to use dragElement instead of straight\n                // mapbox event binding. Or perhaps better, make a simple wrapper with the\n                // right mousedown, mousemove, and mouseup handlers just for a left/right click\n                // pie would use this too.\n                Fx.click(gd, evt.originalEvent);\n            }\n        };\n    };\n};\n\nproto.updateMap = function(calcData, fullLayout, resolve, reject) {\n    var self = this;\n    var map = self.map;\n    var opts = fullLayout[this.id];\n\n    self.rejectOnError(reject);\n\n    var styleObj = getStyleObj(opts.style);\n\n    if(self.styleObj.id !== styleObj.id) {\n        self.styleObj = styleObj;\n        map.setStyle(styleObj.style);\n\n        map.once('styledata', function() {\n            // need to rebuild trace layers on reload\n            // to avoid 'lost event' errors\n            self.traceHash = {};\n            self.updateData(calcData);\n            self.updateLayout(fullLayout);\n            self.resolveOnRender(resolve);\n        });\n    } else {\n        self.updateData(calcData);\n        self.updateLayout(fullLayout);\n        self.resolveOnRender(resolve);\n    }\n};\n\nproto.updateData = function(calcData) {\n    var traceHash = this.traceHash;\n    var traceObj, trace, i, j;\n\n    // update or create trace objects\n    for(i = 0; i < calcData.length; i++) {\n        var calcTrace = calcData[i];\n\n        trace = calcTrace[0].trace;\n        traceObj = traceHash[trace.uid];\n\n        if(traceObj) {\n            traceObj.update(calcTrace);\n        } else if(trace._module) {\n            traceHash[trace.uid] = trace._module.plot(this, calcTrace);\n        }\n    }\n\n    // remove empty trace objects\n    var ids = Object.keys(traceHash);\n    idLoop:\n    for(i = 0; i < ids.length; i++) {\n        var id = ids[i];\n\n        for(j = 0; j < calcData.length; j++) {\n            trace = calcData[j][0].trace;\n            if(id === trace.uid) continue idLoop;\n        }\n\n        traceObj = traceHash[id];\n        traceObj.dispose();\n        delete traceHash[id];\n    }\n};\n\nproto.updateLayout = function(fullLayout) {\n    var map = this.map;\n    var opts = fullLayout[this.id];\n\n    map.setCenter(convertCenter(opts.center));\n    map.setZoom(opts.zoom);\n    map.setBearing(opts.bearing);\n    map.setPitch(opts.pitch);\n\n    this.updateLayers(fullLayout);\n    this.updateFramework(fullLayout);\n    this.updateFx(fullLayout);\n    this.map.resize();\n\n    if(this.gd._context._scrollZoom.mapbox) {\n        map.scrollZoom.enable();\n    } else {\n        map.scrollZoom.disable();\n    }\n};\n\nproto.resolveOnRender = function(resolve) {\n    var map = this.map;\n\n    map.on('render', function onRender() {\n        if(map.loaded()) {\n            map.off('render', onRender);\n            // resolve at end of render loop\n            setTimeout(resolve, 0);\n        }\n    });\n};\n\nproto.rejectOnError = function(reject) {\n    var map = this.map;\n\n    function handler() {\n        reject(new Error(constants.mapOnErrorMsg));\n    }\n\n    map.once('error', handler);\n    map.once('style.error', handler);\n    map.once('source.error', handler);\n    map.once('tile.error', handler);\n    map.once('layer.error', handler);\n};\n\nproto.createFramework = function(fullLayout) {\n    var self = this;\n\n    var div = self.div = document.createElement('div');\n    div.id = self.uid;\n    div.style.position = 'absolute';\n    self.container.appendChild(div);\n\n    // create mock x/y axes for hover routine\n    self.xaxis = {\n        _id: 'x',\n        c2p: function(v) { return self.project(v).x; }\n    };\n    self.yaxis = {\n        _id: 'y',\n        c2p: function(v) { return self.project(v).y; }\n    };\n\n    self.updateFramework(fullLayout);\n};\n\nproto.updateFx = function(fullLayout) {\n    var self = this;\n    var map = self.map;\n    var gd = self.gd;\n\n    if(self.isStatic) return;\n\n    function invert(pxpy) {\n        var obj = self.map.unproject(pxpy);\n        return [obj.lng, obj.lat];\n    }\n\n    var dragMode = fullLayout.dragmode;\n    var fillRangeItems;\n\n    if(dragMode === 'select') {\n        fillRangeItems = function(eventData, poly) {\n            var ranges = eventData.range = {};\n            ranges[self.id] = [\n                invert([poly.xmin, poly.ymin]),\n                invert([poly.xmax, poly.ymax])\n            ];\n        };\n    } else {\n        fillRangeItems = function(eventData, poly, pts) {\n            var dataPts = eventData.lassoPoints = {};\n            dataPts[self.id] = pts.filtered.map(invert);\n        };\n    }\n\n    // Note: dragOptions is needed to be declared for all dragmodes because\n    // it's the object that holds persistent selection state.\n    // Merge old dragOptions with new to keep possibly initialized\n    // persistent selection state.\n    var oldDragOptions = self.dragOptions;\n    self.dragOptions = Lib.extendDeep(oldDragOptions || {}, {\n        element: self.div,\n        gd: gd,\n        plotinfo: {\n            id: self.id,\n            xaxis: self.xaxis,\n            yaxis: self.yaxis,\n            fillRangeItems: fillRangeItems\n        },\n        xaxes: [self.xaxis],\n        yaxes: [self.yaxis],\n        subplot: self.id\n    });\n\n    // Unregister the old handler before potentially registering\n    // a new one. Otherwise multiple click handlers might\n    // be registered resulting in unwanted behavior.\n    map.off('click', self.onClickInPanHandler);\n    if(dragMode === 'select' || dragMode === 'lasso') {\n        map.dragPan.disable();\n        map.on('zoomstart', self.clearSelect);\n\n        self.dragOptions.prepFn = function(e, startX, startY) {\n            prepSelect(e, startX, startY, self.dragOptions, dragMode);\n        };\n\n        dragElement.init(self.dragOptions);\n    } else {\n        map.dragPan.enable();\n        map.off('zoomstart', self.clearSelect);\n        self.div.onmousedown = null;\n\n        // TODO: this does not support right-click. If we want to support it, we\n        // would likely need to change mapbox to use dragElement instead of straight\n        // mapbox event binding. Or perhaps better, make a simple wrapper with the\n        // right mousedown, mousemove, and mouseup handlers just for a left/right click\n        // pie would use this too.\n        self.onClickInPanHandler = self.onClickInPanFn(self.dragOptions);\n        map.on('click', self.onClickInPanHandler);\n    }\n};\n\nproto.updateFramework = function(fullLayout) {\n    var domain = fullLayout[this.id].domain;\n    var size = fullLayout._size;\n\n    var style = this.div.style;\n    style.width = size.w * (domain.x[1] - domain.x[0]) + 'px';\n    style.height = size.h * (domain.y[1] - domain.y[0]) + 'px';\n    style.left = size.l + domain.x[0] * size.w + 'px';\n    style.top = size.t + (1 - domain.y[1]) * size.h + 'px';\n\n    this.xaxis._offset = size.l + domain.x[0] * size.w;\n    this.xaxis._length = size.w * (domain.x[1] - domain.x[0]);\n\n    this.yaxis._offset = size.t + (1 - domain.y[1]) * size.h;\n    this.yaxis._length = size.h * (domain.y[1] - domain.y[0]);\n};\n\nproto.updateLayers = function(fullLayout) {\n    var opts = fullLayout[this.id];\n    var layers = opts.layers;\n    var layerList = this.layerList;\n    var i;\n\n    // if the layer arrays don't match,\n    // don't try to be smart,\n    // delete them all, and start all over.\n\n    if(layers.length !== layerList.length) {\n        for(i = 0; i < layerList.length; i++) {\n            layerList[i].dispose();\n        }\n\n        layerList = this.layerList = [];\n\n        for(i = 0; i < layers.length; i++) {\n            layerList.push(createMapboxLayer(this, i, layers[i]));\n        }\n    } else {\n        for(i = 0; i < layers.length; i++) {\n            layerList[i].update(layers[i]);\n        }\n    }\n};\n\nproto.destroy = function() {\n    if(this.map) {\n        this.map.remove();\n        this.map = null;\n        this.container.removeChild(this.div);\n    }\n};\n\nproto.toImage = function() {\n    this.map.stop();\n    return this.map.getCanvas().toDataURL();\n};\n\n// convenience wrapper to create set multiple layer\n// 'layout' or 'paint options at once.\nproto.setOptions = function(id, methodName, opts) {\n    for(var k in opts) {\n        this.map[methodName](id, k, opts[k]);\n    }\n};\n\n// convenience method to project a [lon, lat] array to pixel coords\nproto.project = function(v) {\n    return this.map.project(new mapboxgl.LngLat(v[0], v[1]));\n};\n\n// get map's current view values in plotly.js notation\nproto.getView = function() {\n    var map = this.map;\n    var mapCenter = map.getCenter();\n    var center = { lon: mapCenter.lng, lat: mapCenter.lat };\n\n    return {\n        center: center,\n        zoom: map.getZoom(),\n        bearing: map.getBearing(),\n        pitch: map.getPitch()\n    };\n};\n\nproto.getViewEdits = function(cont) {\n    var id = this.id;\n    var keys = ['center', 'zoom', 'bearing', 'pitch'];\n    var obj = {};\n\n    for(var i = 0; i < keys.length; i++) {\n        var k = keys[i];\n        obj[id + '.' + k] = cont[k];\n    }\n\n    return obj;\n};\n\nfunction getStyleObj(val) {\n    var styleValues = layoutAttributes.style.values;\n    var styleDflt = layoutAttributes.style.dflt;\n    var styleObj = {};\n\n    if(Lib.isPlainObject(val)) {\n        styleObj.id = val.id;\n        styleObj.style = val;\n    } else if(typeof val === 'string') {\n        styleObj.id = val;\n        styleObj.style = (styleValues.indexOf(val) !== -1) ?\n             convertStyleVal(val) :\n             val;\n    } else {\n        styleObj.id = styleDflt;\n        styleObj.style = convertStyleVal(styleDflt);\n    }\n\n    styleObj.transition = {duration: 0, delay: 0};\n\n    return styleObj;\n}\n\n// if style is part of the 'official' mapbox values, add URL prefix and suffix\nfunction convertStyleVal(val) {\n    return constants.styleUrlPrefix + val + '-' + constants.styleUrlSuffix;\n}\n\nfunction convertCenter(center) {\n    return [center.lon, center.lat];\n}\n\n},{\"../../components/dragelement\":598,\"../../components/fx\":619,\"../../lib\":703,\"../../registry\":831,\"../cartesian/select\":768,\"./constants\":804,\"./layers\":807,\"./layout_attributes\":808,\"mapbox-gl\":421}],811:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Creates a set of padding attributes.\n *\n * @param {object} opts\n *   @param {string} editType:\n *     the editType for all pieces of this padding definition\n *\n * @return {object} attributes object containing {t, r, b, l} as specified\n */\nmodule.exports = function(opts) {\n    var editType = opts.editType;\n    return {\n        t: {\n            valType: 'number',\n            dflt: 0,\n            \n            editType: editType,\n            \n        },\n        r: {\n            valType: 'number',\n            dflt: 0,\n            \n            editType: editType,\n            \n        },\n        b: {\n            valType: 'number',\n            dflt: 0,\n            \n            editType: editType,\n            \n        },\n        l: {\n            valType: 'number',\n            dflt: 0,\n            \n            editType: editType,\n            \n        },\n        editType: editType\n    };\n};\n\n},{}],812:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Registry = _dereq_('../registry');\nvar PlotSchema = _dereq_('../plot_api/plot_schema');\nvar Template = _dereq_('../plot_api/plot_template');\nvar Lib = _dereq_('../lib');\nvar Color = _dereq_('../components/color');\nvar BADNUM = _dereq_('../constants/numerical').BADNUM;\n\nvar axisIDs = _dereq_('./cartesian/axis_ids');\n\nvar animationAttrs = _dereq_('./animation_attributes');\nvar frameAttrs = _dereq_('./frame_attributes');\n\nvar relinkPrivateKeys = Lib.relinkPrivateKeys;\nvar _ = Lib._;\n\nvar plots = module.exports = {};\n\n// Expose registry methods on Plots for backward-compatibility\nLib.extendFlat(plots, Registry);\n\nplots.attributes = _dereq_('./attributes');\nplots.attributes.type.values = plots.allTypes;\nplots.fontAttrs = _dereq_('./font_attributes');\nplots.layoutAttributes = _dereq_('./layout_attributes');\n\n// TODO make this a plot attribute?\nplots.fontWeight = 'normal';\n\nvar transformsRegistry = plots.transformsRegistry;\n\nvar commandModule = _dereq_('./command');\nplots.executeAPICommand = commandModule.executeAPICommand;\nplots.computeAPICommandBindings = commandModule.computeAPICommandBindings;\nplots.manageCommandObserver = commandModule.manageCommandObserver;\nplots.hasSimpleAPICommandBindings = commandModule.hasSimpleAPICommandBindings;\n\n// in some cases the browser doesn't seem to know how big\n// the text is at first, so it needs to draw it,\n// then wait a little, then draw it again\nplots.redrawText = function(gd) {\n    gd = Lib.getGraphDiv(gd);\n\n    var fullLayout = gd._fullLayout || {};\n    var hasPolar = fullLayout._has && fullLayout._has('polar');\n    var hasLegacyPolar = !hasPolar && gd.data && gd.data[0] && gd.data[0].r;\n\n    // do not work if polar is present\n    if(hasLegacyPolar) return;\n\n    return new Promise(function(resolve) {\n        setTimeout(function() {\n            Registry.getComponentMethod('annotations', 'draw')(gd);\n            Registry.getComponentMethod('legend', 'draw')(gd);\n            Registry.getComponentMethod('colorbar', 'draw')(gd);\n            resolve(plots.previousPromises(gd));\n        }, 300);\n    });\n};\n\n// resize plot about the container size\nplots.resize = function(gd) {\n    gd = Lib.getGraphDiv(gd);\n\n    return new Promise(function(resolve, reject) {\n        function isHidden(gd) {\n            var display = window.getComputedStyle(gd).display;\n            return !display || display === 'none';\n        }\n\n        if(!gd || isHidden(gd)) {\n            reject(new Error('Resize must be passed a displayed plot div element.'));\n        }\n\n        if(gd._redrawTimer) clearTimeout(gd._redrawTimer);\n\n        gd._redrawTimer = setTimeout(function() {\n            // return if there is nothing to resize or is hidden\n            if(!gd.layout || (gd.layout.width && gd.layout.height) || isHidden(gd)) {\n                resolve(gd);\n                return;\n            }\n\n            delete gd.layout.width;\n            delete gd.layout.height;\n\n            // autosizing doesn't count as a change that needs saving\n            var oldchanged = gd.changed;\n\n            // nor should it be included in the undo queue\n            gd.autoplay = true;\n\n            Registry.call('relayout', gd, {autosize: true}).then(function() {\n                gd.changed = oldchanged;\n                resolve(gd);\n            });\n        }, 100);\n    });\n};\n\n\n// for use in Lib.syncOrAsync, check if there are any\n// pending promises in this plot and wait for them\nplots.previousPromises = function(gd) {\n    if((gd._promises || []).length) {\n        return Promise.all(gd._promises)\n            .then(function() { gd._promises = []; });\n    }\n};\n\n/**\n * Adds the 'Edit chart' link.\n * Note that now Plotly.plot() calls this so it can regenerate whenever it replots\n *\n * Add source links to your graph inside the 'showSources' config argument.\n */\nplots.addLinks = function(gd) {\n    // Do not do anything if showLink and showSources are not set to true in config\n    if(!gd._context.showLink && !gd._context.showSources) return;\n\n    var fullLayout = gd._fullLayout;\n\n    var linkContainer = Lib.ensureSingle(fullLayout._paper, 'text', 'js-plot-link-container', function(s) {\n        s.style({\n            'font-family': '\"Open Sans\", Arial, sans-serif',\n            'font-size': '12px',\n            'fill': Color.defaultLine,\n            'pointer-events': 'all'\n        })\n        .each(function() {\n            var links = d3.select(this);\n            links.append('tspan').classed('js-link-to-tool', true);\n            links.append('tspan').classed('js-link-spacer', true);\n            links.append('tspan').classed('js-sourcelinks', true);\n        });\n    });\n\n    // The text node inside svg\n    var text = linkContainer.node();\n    var attrs = {y: fullLayout._paper.attr('height') - 9};\n\n    // If text's width is bigger than the layout\n    // Check that text is a child node or document.body\n    // because otherwise IE/Edge might throw an exception\n    // when calling getComputedTextLength().\n    // Apparently offsetParent is null for invisibles.\n    if(document.body.contains(text) && text.getComputedTextLength() >= (fullLayout.width - 20)) {\n        // Align the text at the left\n        attrs['text-anchor'] = 'start';\n        attrs.x = 5;\n    } else {\n        // Align the text at the right\n        attrs['text-anchor'] = 'end';\n        attrs.x = fullLayout._paper.attr('width') - 7;\n    }\n\n    linkContainer.attr(attrs);\n\n    var toolspan = linkContainer.select('.js-link-to-tool');\n    var spacespan = linkContainer.select('.js-link-spacer');\n    var sourcespan = linkContainer.select('.js-sourcelinks');\n\n    if(gd._context.showSources) gd._context.showSources(gd);\n\n    // 'view in plotly' link for embedded plots\n    if(gd._context.showLink) positionPlayWithData(gd, toolspan);\n\n    // separator if we have both sources and tool link\n    spacespan.text((toolspan.text() && sourcespan.text()) ? ' - ' : '');\n};\n\n// note that now this function is only adding the brand in\n// iframes and 3rd-party apps\nfunction positionPlayWithData(gd, container) {\n    container.text('');\n    var link = container.append('a')\n        .attr({\n            'xlink:xlink:href': '#',\n            'class': 'link--impt link--embedview',\n            'font-weight': 'bold'\n        })\n        .text(gd._context.linkText + ' ' + String.fromCharCode(187));\n\n    if(gd._context.sendData) {\n        link.on('click', function() {\n            plots.sendDataToCloud(gd);\n        });\n    } else {\n        var path = window.location.pathname.split('/');\n        var query = window.location.search;\n        link.attr({\n            'xlink:xlink:show': 'new',\n            'xlink:xlink:href': '/' + path[2].split('.')[0] + '/' + path[1] + query\n        });\n    }\n}\n\nplots.sendDataToCloud = function(gd) {\n    gd.emit('plotly_beforeexport');\n\n    var baseUrl = (window.PLOTLYENV || {}).BASE_URL || gd._context.plotlyServerURL;\n\n    var hiddenformDiv = d3.select(gd)\n        .append('div')\n        .attr('id', 'hiddenform')\n        .style('display', 'none');\n\n    var hiddenform = hiddenformDiv\n        .append('form')\n        .attr({\n            action: baseUrl + '/external',\n            method: 'post',\n            target: '_blank'\n        });\n\n    var hiddenformInput = hiddenform\n        .append('input')\n        .attr({\n            type: 'text',\n            name: 'data'\n        });\n\n    hiddenformInput.node().value = plots.graphJson(gd, false, 'keepdata');\n    hiddenform.node().submit();\n    hiddenformDiv.remove();\n\n    gd.emit('plotly_afterexport');\n    return false;\n};\n\nvar d3FormatKeys = [\n    'days', 'shortDays', 'months', 'shortMonths', 'periods',\n    'dateTime', 'date', 'time',\n    'decimal', 'thousands', 'grouping', 'currency'\n];\n\nvar extraFormatKeys = [\n    'year', 'month', 'dayMonth', 'dayMonthYear'\n];\n\n/*\n * Fill in default values\n * @param {DOM element} gd\n * @param {object} opts\n * @param {boolean} opts.skipUpdateCalc: normally if the existing gd.calcdata looks\n *   compatible with the new gd._fullData we finish by linking the new _fullData traces\n *   to the old gd.calcdata, so it's correctly set if we're not going to recalc. But also,\n *   if there are calcTransforms on the trace, we first remap data arrays from the old full\n *   trace into the new one. Use skipUpdateCalc to defer this (needed by Plotly.react)\n *\n * gd.data, gd.layout:\n *   are precisely what the user specified (except as modified by cleanData/cleanLayout),\n *   these fields shouldn't be modified (except for filling in some auto values)\n *   nor used directly after the supply defaults step.\n *\n * gd._fullData, gd._fullLayout:\n *   are complete descriptions of how to draw the plot,\n *   use these fields in all required computations.\n *\n * gd._fullLayout._modules\n *   is a list of all the trace modules required to draw the plot.\n *\n * gd._fullLayout._visibleModules\n *   subset of _modules, a list of modules corresponding to visible:true traces.\n *\n * gd._fullLayout._basePlotModules\n *   is a list of all the plot modules required to draw the plot.\n *\n * gd._fullLayout._transformModules\n *   is a list of all the transform modules invoked.\n *\n */\nplots.supplyDefaults = function(gd, opts) {\n    var skipUpdateCalc = opts && opts.skipUpdateCalc;\n    var oldFullLayout = gd._fullLayout || {};\n\n    if(oldFullLayout._skipDefaults) {\n        delete oldFullLayout._skipDefaults;\n        return;\n    }\n\n    var newFullLayout = gd._fullLayout = {};\n    var newLayout = gd.layout || {};\n\n    var oldFullData = gd._fullData || [];\n    var newFullData = gd._fullData = [];\n    var newData = gd.data || [];\n\n    var oldCalcdata = gd.calcdata || [];\n\n    var context = gd._context || {};\n\n    var i;\n\n    // Create all the storage space for frames, but only if doesn't already exist\n    if(!gd._transitionData) plots.createTransitionData(gd);\n\n    // So we only need to do this once (and since we have gd here)\n    // get the translated placeholder titles.\n    // These ones get used as default values so need to be known at supplyDefaults\n    // others keep their blank defaults but render the placeholder as desired later\n    // TODO: make these work the same way, only inserting the placeholder text at draw time?\n    // The challenge is that this has slightly different behavior right now in editable mode:\n    // using the placeholder as default makes this text permanently (but lightly) visible,\n    // but explicit '' for these titles gives you a placeholder that's hidden until you mouse\n    // over it - so you're not distracted by it if you really don't want a title, but if you do\n    // and you're new to plotly you may not be able to find it.\n    // When editable=false the two behave the same, no title is drawn.\n    newFullLayout._dfltTitle = {\n        plot: _(gd, 'Click to enter Plot title'),\n        x: _(gd, 'Click to enter X axis title'),\n        y: _(gd, 'Click to enter Y axis title'),\n        colorbar: _(gd, 'Click to enter Colorscale title'),\n        annotation: _(gd, 'new text')\n    };\n    newFullLayout._traceWord = _(gd, 'trace');\n\n    var formatObj = getFormatObj(gd, d3FormatKeys);\n\n    // stash the token from context so mapbox subplots can use it as default\n    newFullLayout._mapboxAccessToken = context.mapboxAccessToken;\n\n    // first fill in what we can of layout without looking at data\n    // because fullData needs a few things from layout\n    if(oldFullLayout._initialAutoSizeIsDone) {\n        // coerce the updated layout while preserving width and height\n        var oldWidth = oldFullLayout.width;\n        var oldHeight = oldFullLayout.height;\n\n        plots.supplyLayoutGlobalDefaults(newLayout, newFullLayout, formatObj);\n\n        if(!newLayout.width) newFullLayout.width = oldWidth;\n        if(!newLayout.height) newFullLayout.height = oldHeight;\n        plots.sanitizeMargins(newFullLayout);\n    } else {\n        // coerce the updated layout and autosize if needed\n        plots.supplyLayoutGlobalDefaults(newLayout, newFullLayout, formatObj);\n\n        var missingWidthOrHeight = (!newLayout.width || !newLayout.height);\n        var autosize = newFullLayout.autosize;\n        var autosizable = context.autosizable;\n        var initialAutoSize = missingWidthOrHeight && (autosize || autosizable);\n\n        if(initialAutoSize) plots.plotAutoSize(gd, newLayout, newFullLayout);\n        else if(missingWidthOrHeight) plots.sanitizeMargins(newFullLayout);\n\n        // for backwards-compatibility with Plotly v1.x.x\n        if(!autosize && missingWidthOrHeight) {\n            newLayout.width = newFullLayout.width;\n            newLayout.height = newFullLayout.height;\n        }\n    }\n\n    newFullLayout._d3locale = getFormatter(formatObj, newFullLayout.separators);\n    newFullLayout._extraFormat = getFormatObj(gd, extraFormatKeys);\n\n    newFullLayout._initialAutoSizeIsDone = true;\n\n    // keep track of how many traces are inputted\n    newFullLayout._dataLength = newData.length;\n\n    // clear the lists of trace and baseplot modules, and subplots\n    newFullLayout._modules = [];\n    newFullLayout._visibleModules = [];\n    newFullLayout._basePlotModules = [];\n    var subplots = newFullLayout._subplots = emptySubplotLists();\n\n    // initialize axis and subplot hash objects for splom-generated grids\n    var splomAxes = newFullLayout._splomAxes = {x: {}, y: {}};\n    var splomSubplots = newFullLayout._splomSubplots = {};\n    // initialize splom grid defaults\n    newFullLayout._splomGridDflt = {};\n\n    // for stacked area traces to share config across traces\n    newFullLayout._scatterStackOpts = {};\n    // for the first scatter trace on each subplot (so it knows tonext->tozero)\n    newFullLayout._firstScatter = {};\n    // for grouped bar/box/violin trace to share config across traces\n    newFullLayout._alignmentOpts = {};\n    // track color axes referenced in the data\n    newFullLayout._colorAxes = {};\n\n    // for traces to request a default rangeslider on their x axes\n    // eg set `_requestRangeslider.x2 = true` for xaxis2\n    newFullLayout._requestRangeslider = {};\n\n    // pull uids from old data to use as new defaults\n    newFullLayout._traceUids = getTraceUids(oldFullData, newData);\n\n    // then do the data\n    newFullLayout._globalTransforms = (gd._context || {}).globalTransforms;\n    plots.supplyDataDefaults(newData, newFullData, newLayout, newFullLayout);\n\n    // redo grid size defaults with info about splom x/y axes,\n    // and fill in generated cartesian axes and subplots\n    var splomXa = Object.keys(splomAxes.x);\n    var splomYa = Object.keys(splomAxes.y);\n    if(splomXa.length > 1 && splomYa.length > 1) {\n        Registry.getComponentMethod('grid', 'sizeDefaults')(newLayout, newFullLayout);\n\n        for(i = 0; i < splomXa.length; i++) {\n            Lib.pushUnique(subplots.xaxis, splomXa[i]);\n        }\n        for(i = 0; i < splomYa.length; i++) {\n            Lib.pushUnique(subplots.yaxis, splomYa[i]);\n        }\n        for(var k in splomSubplots) {\n            Lib.pushUnique(subplots.cartesian, k);\n        }\n    }\n\n    // attach helper method to check whether a plot type is present on graph\n    newFullLayout._has = plots._hasPlotType.bind(newFullLayout);\n\n    if(oldFullData.length === newFullData.length) {\n        for(i = 0; i < newFullData.length; i++) {\n            relinkPrivateKeys(newFullData[i], oldFullData[i]);\n        }\n    }\n\n    // finally, fill in the pieces of layout that may need to look at data\n    plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData, gd._transitionData);\n\n    // Special cases that introduce interactions between traces.\n    // This is after relinkPrivateKeys so we can use those in crossTraceDefaults\n    // and after layout module defaults, so we can use eg barmode\n    var _modules = newFullLayout._visibleModules;\n    var crossTraceDefaultsFuncs = [];\n    for(i = 0; i < _modules.length; i++) {\n        var funci = _modules[i].crossTraceDefaults;\n        // some trace types share crossTraceDefaults (ie histogram2d, histogram2dcontour)\n        if(funci) Lib.pushUnique(crossTraceDefaultsFuncs, funci);\n    }\n    for(i = 0; i < crossTraceDefaultsFuncs.length; i++) {\n        crossTraceDefaultsFuncs[i](newFullData, newFullLayout);\n    }\n\n    // turn on flag to optimize large splom-only graphs\n    // mostly by omitting SVG layers during Cartesian.drawFramework\n    newFullLayout._hasOnlyLargeSploms = (\n        newFullLayout._basePlotModules.length === 1 &&\n        newFullLayout._basePlotModules[0].name === 'splom' &&\n        splomXa.length > 15 &&\n        splomYa.length > 15 &&\n        newFullLayout.shapes.length === 0 &&\n        newFullLayout.images.length === 0\n    );\n\n    // TODO remove in v2.0.0\n    // add has-plot-type refs to fullLayout for backward compatibility\n    newFullLayout._hasCartesian = newFullLayout._has('cartesian');\n    newFullLayout._hasGeo = newFullLayout._has('geo');\n    newFullLayout._hasGL3D = newFullLayout._has('gl3d');\n    newFullLayout._hasGL2D = newFullLayout._has('gl2d');\n    newFullLayout._hasTernary = newFullLayout._has('ternary');\n    newFullLayout._hasPie = newFullLayout._has('pie');\n\n    // relink / initialize subplot axis objects\n    plots.linkSubplots(newFullData, newFullLayout, oldFullData, oldFullLayout);\n\n    // clean subplots and other artifacts from previous plot calls\n    plots.cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout);\n\n    // clear selection outline until we implement persistent selection,\n    // don't clear them though when drag handlers (e.g. listening to\n    // `plotly_selecting`) update the graph.\n    // we should try to come up with a better solution when implementing\n    // https://github.com/plotly/plotly.js/issues/1851\n    if(oldFullLayout._zoomlayer && !gd._dragging) {\n        oldFullLayout._zoomlayer.selectAll('.select-outline').remove();\n    }\n\n\n    // fill in meta helpers\n    fillMetaTextHelpers(newFullData, newFullLayout);\n\n    // relink functions and _ attributes to promote consistency between plots\n    relinkPrivateKeys(newFullLayout, oldFullLayout);\n\n    // colorscale crossTraceDefaults needs newFullLayout with relinked keys\n    Registry.getComponentMethod('colorscale', 'crossTraceDefaults')(newFullData, newFullLayout);\n\n    // For persisting GUI-driven changes in layout\n    // _preGUI and _tracePreGUI were already copied over in relinkPrivateKeys\n    if(!newFullLayout._preGUI) newFullLayout._preGUI = {};\n    // track trace GUI changes by uid rather than by trace index\n    if(!newFullLayout._tracePreGUI) newFullLayout._tracePreGUI = {};\n    var tracePreGUI = newFullLayout._tracePreGUI;\n    var uids = {};\n    var uid;\n    for(uid in tracePreGUI) uids[uid] = 'old';\n    for(i = 0; i < newFullData.length; i++) {\n        uid = newFullData[i]._fullInput.uid;\n        if(!uids[uid]) tracePreGUI[uid] = {};\n        uids[uid] = 'new';\n    }\n    for(uid in uids) {\n        if(uids[uid] === 'old') delete tracePreGUI[uid];\n    }\n\n    // set up containers for margin calculations\n    initMargins(newFullLayout);\n\n    // collect and do some initial calculations for rangesliders\n    Registry.getComponentMethod('rangeslider', 'makeData')(newFullLayout);\n\n    // update object references in calcdata\n    if(!skipUpdateCalc && oldCalcdata.length === newFullData.length) {\n        plots.supplyDefaultsUpdateCalc(oldCalcdata, newFullData);\n    }\n};\n\nplots.supplyDefaultsUpdateCalc = function(oldCalcdata, newFullData) {\n    for(var i = 0; i < newFullData.length; i++) {\n        var newTrace = newFullData[i];\n        var cd0 = (oldCalcdata[i] || [])[0];\n        if(cd0 && cd0.trace) {\n            var oldTrace = cd0.trace;\n            if(oldTrace._hasCalcTransform) {\n                var arrayAttrs = oldTrace._arrayAttrs;\n                var j, astr, oldArrayVal;\n\n                for(j = 0; j < arrayAttrs.length; j++) {\n                    astr = arrayAttrs[j];\n                    oldArrayVal = Lib.nestedProperty(oldTrace, astr).get().slice();\n                    Lib.nestedProperty(newTrace, astr).set(oldArrayVal);\n                }\n            }\n            cd0.trace = newTrace;\n        }\n    }\n};\n\n/**\n * Create a list of uid strings satisfying (in this order of importance):\n * 1. all unique, all strings\n * 2. matches input uids if provided\n * 3. matches previous data uids\n */\nfunction getTraceUids(oldFullData, newData) {\n    var len = newData.length;\n    var oldFullInput = [];\n    var i, prevFullInput;\n    for(i = 0; i < oldFullData.length; i++) {\n        var thisFullInput = oldFullData[i]._fullInput;\n        if(thisFullInput !== prevFullInput) oldFullInput.push(thisFullInput);\n        prevFullInput = thisFullInput;\n    }\n    var oldLen = oldFullInput.length;\n    var out = new Array(len);\n    var seenUids = {};\n\n    function setUid(uid, i) {\n        out[i] = uid;\n        seenUids[uid] = 1;\n    }\n\n    function tryUid(uid, i) {\n        if(uid && typeof uid === 'string' && !seenUids[uid]) {\n            setUid(uid, i);\n            return true;\n        }\n    }\n\n    for(i = 0; i < len; i++) {\n        var newUid = newData[i].uid;\n        if(typeof newUid === 'number') newUid = String(newUid);\n\n        if(tryUid(newUid, i)) continue;\n        if(i < oldLen && tryUid(oldFullInput[i].uid, i)) continue;\n        setUid(Lib.randstr(seenUids), i);\n    }\n\n    return out;\n}\n\n/**\n * Make a container for collecting subplots we need to display.\n *\n * Finds all subplot types we need to enumerate once and caches it,\n * but makes a new output object each time.\n * Single-trace subplots (which have no `id`) such as pie, table, etc\n * do not need to be collected because we just draw all visible traces.\n */\nfunction emptySubplotLists() {\n    var collectableSubplotTypes = Registry.collectableSubplotTypes;\n    var out = {};\n    var i, j;\n\n    if(!collectableSubplotTypes) {\n        collectableSubplotTypes = [];\n\n        var subplotsRegistry = Registry.subplotsRegistry;\n\n        for(var subplotType in subplotsRegistry) {\n            var subplotModule = subplotsRegistry[subplotType];\n            var subplotAttr = subplotModule.attr;\n\n            if(subplotAttr) {\n                collectableSubplotTypes.push(subplotType);\n\n                // special case, currently just for cartesian:\n                // we need to enumerate axes, not just subplots\n                if(Array.isArray(subplotAttr)) {\n                    for(j = 0; j < subplotAttr.length; j++) {\n                        Lib.pushUnique(collectableSubplotTypes, subplotAttr[j]);\n                    }\n                }\n            }\n        }\n    }\n\n    for(i = 0; i < collectableSubplotTypes.length; i++) {\n        out[collectableSubplotTypes[i]] = [];\n    }\n    return out;\n}\n\n/**\n * getFormatObj: use _context to get the format object from locale.\n * Used to get d3.locale argument object and extraFormat argument object\n *\n * Regarding d3.locale argument :\n * decimal and thousands can be overridden later by layout.separators\n * grouping and currency are not presently used by our automatic number\n * formatting system but can be used by custom formats.\n *\n * @returns {object} d3.locale format object\n */\nfunction getFormatObj(gd, formatKeys) {\n    var locale = gd._context.locale;\n    if(!locale) locale === 'en-US';\n\n    var formatDone = false;\n    var formatObj = {};\n\n    function includeFormat(newFormat) {\n        var formatFinished = true;\n        for(var i = 0; i < formatKeys.length; i++) {\n            var formatKey = formatKeys[i];\n            if(!formatObj[formatKey]) {\n                if(newFormat[formatKey]) {\n                    formatObj[formatKey] = newFormat[formatKey];\n                } else formatFinished = false;\n            }\n        }\n        if(formatFinished) formatDone = true;\n    }\n\n    // same as localize, look for format parts in each format spec in the chain\n    for(var i = 0; i < 2; i++) {\n        var locales = gd._context.locales;\n        for(var j = 0; j < 2; j++) {\n            var formatj = (locales[locale] || {}).format;\n            if(formatj) {\n                includeFormat(formatj);\n                if(formatDone) break;\n            }\n            locales = Registry.localeRegistry;\n        }\n\n        var baseLocale = locale.split('-')[0];\n        if(formatDone || baseLocale === locale) break;\n        locale = baseLocale;\n    }\n\n    // lastly pick out defaults from english (non-US, as DMY is so much more common)\n    if(!formatDone) includeFormat(Registry.localeRegistry.en.format);\n\n    return formatObj;\n}\n\n/**\n * getFormatter: combine the final separators with the locale formatting object\n * we pulled earlier to generate number and time formatters\n * TODO: remove separators in v2, only use locale, so we don't need this step?\n *\n * @param {object} formatObj: d3.locale format object\n * @param {string} separators: length-2 string to override decimal and thousands\n *   separators in number formatting\n *\n * @returns {object} {numberFormat, timeFormat} d3 formatter factory functions\n *   for numbers and time\n */\nfunction getFormatter(formatObj, separators) {\n    formatObj.decimal = separators.charAt(0);\n    formatObj.thousands = separators.charAt(1);\n\n    return d3.locale(formatObj);\n}\n\nfunction fillMetaTextHelpers(newFullData, newFullLayout) {\n    var _meta;\n    var meta4data = [];\n\n    if(newFullLayout.meta) {\n        _meta = newFullLayout._meta = {\n            meta: newFullLayout.meta,\n            layout: {meta: newFullLayout.meta}\n        };\n    }\n\n    for(var i = 0; i < newFullData.length; i++) {\n        var trace = newFullData[i];\n\n        if(trace.meta) {\n            meta4data[trace.index] = trace._meta = {meta: trace.meta};\n        } else if(newFullLayout.meta) {\n            trace._meta = {meta: newFullLayout.meta};\n        }\n        if(newFullLayout.meta) {\n            trace._meta.layout = {meta: newFullLayout.meta};\n        }\n    }\n\n    if(meta4data.length) {\n        if(!_meta) {\n            _meta = newFullLayout._meta = {};\n        }\n        _meta.data = meta4data;\n    }\n}\n\n// Create storage for all of the data related to frames and transitions:\nplots.createTransitionData = function(gd) {\n    // Set up the default keyframe if it doesn't exist:\n    if(!gd._transitionData) {\n        gd._transitionData = {};\n    }\n\n    if(!gd._transitionData._frames) {\n        gd._transitionData._frames = [];\n    }\n\n    if(!gd._transitionData._frameHash) {\n        gd._transitionData._frameHash = {};\n    }\n\n    if(!gd._transitionData._counter) {\n        gd._transitionData._counter = 0;\n    }\n\n    if(!gd._transitionData._interruptCallbacks) {\n        gd._transitionData._interruptCallbacks = [];\n    }\n};\n\n// helper function to be bound to fullLayout to check\n// whether a certain plot type is present on plot\n// or trace has a category\nplots._hasPlotType = function(category) {\n    var i;\n\n    // check base plot modules\n    var basePlotModules = this._basePlotModules || [];\n    for(i = 0; i < basePlotModules.length; i++) {\n        if(basePlotModules[i].name === category) return true;\n    }\n\n    // check trace modules (including non-visible:true)\n    var modules = this._modules || [];\n    for(i = 0; i < modules.length; i++) {\n        var name = modules[i].name;\n        if(name === category) return true;\n        // N.B. this is modules[i] along with 'categories' as a hash object\n        var _module = Registry.modules[name];\n        if(_module && _module.categories[category]) return true;\n    }\n\n    return false;\n};\n\nplots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var i, j;\n\n    var basePlotModules = oldFullLayout._basePlotModules || [];\n    for(i = 0; i < basePlotModules.length; i++) {\n        var _module = basePlotModules[i];\n\n        if(_module.clean) {\n            _module.clean(newFullData, newFullLayout, oldFullData, oldFullLayout);\n        }\n    }\n\n    var hadGl = oldFullLayout._has && oldFullLayout._has('gl');\n    var hasGl = newFullLayout._has && newFullLayout._has('gl');\n\n    if(hadGl && !hasGl) {\n        if(oldFullLayout._glcontainer !== undefined) {\n            oldFullLayout._glcontainer.selectAll('.gl-canvas').remove();\n            oldFullLayout._glcontainer.selectAll('.no-webgl').remove();\n            oldFullLayout._glcanvas = null;\n        }\n    }\n\n    var hasInfoLayer = !!oldFullLayout._infolayer;\n\n    oldLoop:\n    for(i = 0; i < oldFullData.length; i++) {\n        var oldTrace = oldFullData[i];\n        var oldUid = oldTrace.uid;\n\n        for(j = 0; j < newFullData.length; j++) {\n            var newTrace = newFullData[j];\n\n            if(oldUid === newTrace.uid) continue oldLoop;\n        }\n\n        // clean old colorbars\n        if(hasInfoLayer) {\n            oldFullLayout._infolayer.select('.cb' + oldUid).remove();\n        }\n    }\n};\n\nplots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var i, j;\n\n    var oldSubplots = oldFullLayout._plots || {};\n    var newSubplots = newFullLayout._plots = {};\n    var newSubplotList = newFullLayout._subplots;\n\n    var mockGd = {\n        _fullData: newFullData,\n        _fullLayout: newFullLayout\n    };\n\n    var ids = newSubplotList.cartesian.concat(newSubplotList.gl2d || []);\n\n    for(i = 0; i < ids.length; i++) {\n        var id = ids[i];\n        var oldSubplot = oldSubplots[id];\n        var xaxis = axisIDs.getFromId(mockGd, id, 'x');\n        var yaxis = axisIDs.getFromId(mockGd, id, 'y');\n        var plotinfo;\n\n        // link or create subplot object\n        if(oldSubplot) {\n            plotinfo = newSubplots[id] = oldSubplot;\n        } else {\n            plotinfo = newSubplots[id] = {};\n            plotinfo.id = id;\n        }\n\n        // add these axis ids to each others' subplot lists\n        xaxis._counterAxes.push(yaxis._id);\n        yaxis._counterAxes.push(xaxis._id);\n        xaxis._subplotsWith.push(id);\n        yaxis._subplotsWith.push(id);\n\n        // update x and y axis layout object refs\n        plotinfo.xaxis = xaxis;\n        plotinfo.yaxis = yaxis;\n\n        // By default, we clip at the subplot level,\n        // but if one trace on a given subplot has *cliponaxis* set to false,\n        // we need to clip at the trace module layer level;\n        // find this out here, once of for all.\n        plotinfo._hasClipOnAxisFalse = false;\n\n        for(j = 0; j < newFullData.length; j++) {\n            var trace = newFullData[j];\n\n            if(\n                trace.xaxis === plotinfo.xaxis._id &&\n                trace.yaxis === plotinfo.yaxis._id &&\n                trace.cliponaxis === false\n            ) {\n                plotinfo._hasClipOnAxisFalse = true;\n                break;\n            }\n        }\n    }\n\n    // while we're at it, link overlaying axes to their main axes and\n    // anchored axes to the axes they're anchored to\n    var axList = axisIDs.list(mockGd, null, true);\n    var ax;\n    for(i = 0; i < axList.length; i++) {\n        ax = axList[i];\n        var mainAx = null;\n\n        if(ax.overlaying) {\n            mainAx = axisIDs.getFromId(mockGd, ax.overlaying);\n\n            // you cannot overlay an axis that's already overlaying another\n            if(mainAx && mainAx.overlaying) {\n                ax.overlaying = false;\n                mainAx = null;\n            }\n        }\n        ax._mainAxis = mainAx || ax;\n\n        /*\n         * For now force overlays to overlay completely... so they\n         * can drag together correctly and share backgrounds.\n         * Later perhaps we make separate axis domain and\n         * tick/line domain or something, so they can still share\n         * the (possibly larger) dragger and background but don't\n         * have to both be drawn over that whole domain\n         */\n        if(mainAx) ax.domain = mainAx.domain.slice();\n\n        ax._anchorAxis = ax.anchor === 'free' ?\n            null :\n            axisIDs.getFromId(mockGd, ax.anchor);\n    }\n\n    // finally, we can find the main subplot for each axis\n    // (on which the ticks & labels are drawn)\n    for(i = 0; i < axList.length; i++) {\n        ax = axList[i];\n        ax._counterAxes.sort(axisIDs.idSort);\n        ax._subplotsWith.sort(Lib.subplotSort);\n        ax._mainSubplot = findMainSubplot(ax, newFullLayout);\n    }\n};\n\nfunction findMainSubplot(ax, fullLayout) {\n    var mockGd = {_fullLayout: fullLayout};\n\n    var isX = ax._id.charAt(0) === 'x';\n    var anchorAx = ax._mainAxis._anchorAxis;\n    var mainSubplotID = '';\n    var nextBestMainSubplotID = '';\n    var anchorID = '';\n\n    // First try the main ID with the anchor\n    if(anchorAx) {\n        anchorID = anchorAx._mainAxis._id;\n        mainSubplotID = isX ? (ax._id + anchorID) : (anchorID + ax._id);\n    }\n\n    // Then look for a subplot with the counteraxis overlaying the anchor\n    // If that fails just use the first subplot including this axis\n    if(!mainSubplotID || !fullLayout._plots[mainSubplotID]) {\n        mainSubplotID = '';\n\n        var counterIDs = ax._counterAxes;\n        for(var j = 0; j < counterIDs.length; j++) {\n            var counterPart = counterIDs[j];\n            var id = isX ? (ax._id + counterPart) : (counterPart + ax._id);\n            if(!nextBestMainSubplotID) nextBestMainSubplotID = id;\n            var counterAx = axisIDs.getFromId(mockGd, counterPart);\n            if(anchorID && counterAx.overlaying === anchorID) {\n                mainSubplotID = id;\n                break;\n            }\n        }\n    }\n\n    return mainSubplotID || nextBestMainSubplotID;\n}\n\n// This function clears any trace attributes with valType: color and\n// no set dflt filed in the plot schema. This is needed because groupby (which\n// is the only transform for which this currently applies) supplies parent\n// trace defaults, then expanded trace defaults. The result is that `null`\n// colors are default-supplied and inherited as a color instead of a null.\n// The result is that expanded trace default colors have no effect, with\n// the final result that groups are indistinguishable. This function clears\n// those colors so that individual groupby groups get unique colors.\nplots.clearExpandedTraceDefaultColors = function(trace) {\n    var colorAttrs, path, i;\n\n    // This uses weird closure state in order to satisfy the linter rule\n    // that we can't create functions in a loop.\n    function locateColorAttrs(attr, attrName, attrs, level) {\n        path[level] = attrName;\n        path.length = level + 1;\n        if(attr.valType === 'color' && attr.dflt === undefined) {\n            colorAttrs.push(path.join('.'));\n        }\n    }\n\n    path = [];\n\n    // Get the cached colorAttrs:\n    colorAttrs = trace._module._colorAttrs;\n\n    // Or else compute and cache the colorAttrs on the module:\n    if(!colorAttrs) {\n        trace._module._colorAttrs = colorAttrs = [];\n        PlotSchema.crawl(\n            trace._module.attributes,\n            locateColorAttrs\n        );\n    }\n\n    for(i = 0; i < colorAttrs.length; i++) {\n        var origprop = Lib.nestedProperty(trace, '_input.' + colorAttrs[i]);\n\n        if(!origprop.get()) {\n            Lib.nestedProperty(trace, colorAttrs[i]).set(null);\n        }\n    }\n};\n\n\nplots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {\n    var modules = fullLayout._modules;\n    var visibleModules = fullLayout._visibleModules;\n    var basePlotModules = fullLayout._basePlotModules;\n    var cnt = 0;\n    var colorCnt = 0;\n\n    var i, fullTrace, trace;\n\n    fullLayout._transformModules = [];\n\n    function pushModule(fullTrace) {\n        dataOut.push(fullTrace);\n\n        var _module = fullTrace._module;\n        if(!_module) return;\n\n        Lib.pushUnique(modules, _module);\n        if(fullTrace.visible === true) Lib.pushUnique(visibleModules, _module);\n        Lib.pushUnique(basePlotModules, fullTrace._module.basePlotModule);\n        cnt++;\n\n        // TODO: do we really want color not to increment for explicitly invisible traces?\n        // This logic is weird, but matches previous behavior: traces that you explicitly\n        // set to visible:false do not increment the color, but traces WE determine to be\n        // empty or invalid (and thus set to visible:false) DO increment color.\n        // I kind of think we should just let all traces increment color, visible or not.\n        // see mock: axes-autotype-empty vs. a test of restyling visible: false that\n        // I can't find right now...\n        if(fullTrace._input.visible !== false) colorCnt++;\n    }\n\n    var carpetIndex = {};\n    var carpetDependents = [];\n    var dataTemplate = (layout.template || {}).data || {};\n    var templater = Template.traceTemplater(dataTemplate);\n\n    for(i = 0; i < dataIn.length; i++) {\n        trace = dataIn[i];\n\n        // reuse uid we may have pulled out of oldFullData\n        // Note: templater supplies trace type\n        fullTrace = templater.newTrace(trace);\n        fullTrace.uid = fullLayout._traceUids[i];\n        plots.supplyTraceDefaults(trace, fullTrace, colorCnt, fullLayout, i);\n\n        fullTrace.index = i;\n        fullTrace._input = trace;\n        fullTrace._expandedIndex = cnt;\n\n        if(fullTrace.transforms && fullTrace.transforms.length) {\n            var sdInvisible = trace.visible !== false && fullTrace.visible === false;\n\n            var expandedTraces = applyTransforms(fullTrace, dataOut, layout, fullLayout);\n\n            for(var j = 0; j < expandedTraces.length; j++) {\n                var expandedTrace = expandedTraces[j];\n\n                // No further templating during transforms.\n                var fullExpandedTrace = {\n                    _template: fullTrace._template,\n                    type: fullTrace.type,\n                    // set uid using parent uid and expanded index\n                    // to promote consistency between update calls\n                    uid: fullTrace.uid + j\n                };\n\n                // If the first supplyDefaults created `visible: false`,\n                // clear it before running supplyDefaults a second time,\n                // because sometimes there are items we still want to coerce\n                // inside trace modules before determining that the trace is\n                // again `visible: false`, for example partial visibilities\n                // in `splom` traces.\n                if(sdInvisible && expandedTrace.visible === false) {\n                    delete expandedTrace.visible;\n                }\n\n                plots.supplyTraceDefaults(expandedTrace, fullExpandedTrace, cnt, fullLayout, i);\n\n                // relink private (i.e. underscore) keys expanded trace to full expanded trace so\n                // that transform supply-default methods can set _ keys for future use.\n                relinkPrivateKeys(fullExpandedTrace, expandedTrace);\n\n                // add info about parent data trace\n                fullExpandedTrace.index = i;\n                fullExpandedTrace._input = trace;\n                fullExpandedTrace._fullInput = fullTrace;\n\n                // add info about the expanded data\n                fullExpandedTrace._expandedIndex = cnt;\n                fullExpandedTrace._expandedInput = expandedTrace;\n\n                pushModule(fullExpandedTrace);\n            }\n        } else {\n            // add identify refs for consistency with transformed traces\n            fullTrace._fullInput = fullTrace;\n            fullTrace._expandedInput = fullTrace;\n\n            pushModule(fullTrace);\n        }\n\n        if(Registry.traceIs(fullTrace, 'carpetAxis')) {\n            carpetIndex[fullTrace.carpet] = fullTrace;\n        }\n\n        if(Registry.traceIs(fullTrace, 'carpetDependent')) {\n            carpetDependents.push(i);\n        }\n    }\n\n    for(i = 0; i < carpetDependents.length; i++) {\n        fullTrace = dataOut[carpetDependents[i]];\n\n        if(!fullTrace.visible) continue;\n\n        var carpetAxis = carpetIndex[fullTrace.carpet];\n        fullTrace._carpet = carpetAxis;\n\n        if(!carpetAxis || !carpetAxis.visible) {\n            fullTrace.visible = false;\n            continue;\n        }\n\n        fullTrace.xaxis = carpetAxis.xaxis;\n        fullTrace.yaxis = carpetAxis.yaxis;\n    }\n};\n\nplots.supplyAnimationDefaults = function(opts) {\n    opts = opts || {};\n    var i;\n    var optsOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(opts || {}, optsOut, animationAttrs, attr, dflt);\n    }\n\n    coerce('mode');\n    coerce('direction');\n    coerce('fromcurrent');\n\n    if(Array.isArray(opts.frame)) {\n        optsOut.frame = [];\n        for(i = 0; i < opts.frame.length; i++) {\n            optsOut.frame[i] = plots.supplyAnimationFrameDefaults(opts.frame[i] || {});\n        }\n    } else {\n        optsOut.frame = plots.supplyAnimationFrameDefaults(opts.frame || {});\n    }\n\n    if(Array.isArray(opts.transition)) {\n        optsOut.transition = [];\n        for(i = 0; i < opts.transition.length; i++) {\n            optsOut.transition[i] = plots.supplyAnimationTransitionDefaults(opts.transition[i] || {});\n        }\n    } else {\n        optsOut.transition = plots.supplyAnimationTransitionDefaults(opts.transition || {});\n    }\n\n    return optsOut;\n};\n\nplots.supplyAnimationFrameDefaults = function(opts) {\n    var optsOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(opts || {}, optsOut, animationAttrs.frame, attr, dflt);\n    }\n\n    coerce('duration');\n    coerce('redraw');\n\n    return optsOut;\n};\n\nplots.supplyAnimationTransitionDefaults = function(opts) {\n    var optsOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(opts || {}, optsOut, animationAttrs.transition, attr, dflt);\n    }\n\n    coerce('duration');\n    coerce('easing');\n\n    return optsOut;\n};\n\nplots.supplyFrameDefaults = function(frameIn) {\n    var frameOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(frameIn, frameOut, frameAttrs, attr, dflt);\n    }\n\n    coerce('group');\n    coerce('name');\n    coerce('traces');\n    coerce('baseframe');\n    coerce('data');\n    coerce('layout');\n\n    return frameOut;\n};\n\nplots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, traceInIndex) {\n    var colorway = layout.colorway || Color.defaults;\n    var defaultColor = colorway[colorIndex % colorway.length];\n\n    var i;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, plots.attributes, attr, dflt);\n    }\n\n    var visible = coerce('visible');\n\n    coerce('type');\n    coerce('name', layout._traceWord + ' ' + traceInIndex);\n\n    coerce('uirevision', layout.uirevision);\n\n    // we want even invisible traces to make their would-be subplots visible\n    // so coerce the subplot id(s) now no matter what\n    var _module = plots.getModule(traceOut);\n\n    traceOut._module = _module;\n    if(_module) {\n        var basePlotModule = _module.basePlotModule;\n        var subplotAttr = basePlotModule.attr;\n        var subplotAttrs = basePlotModule.attributes;\n        if(subplotAttr && subplotAttrs) {\n            var subplots = layout._subplots;\n            var subplotId = '';\n\n            // TODO - currently if we draw an empty gl2d subplot, it draws\n            // nothing then gets stuck and you can't get it back without newPlot\n            // sort this out in the regl refactor? but for now just drop empty gl2d subplots\n            if(basePlotModule.name !== 'gl2d' || visible) {\n                if(Array.isArray(subplotAttr)) {\n                    for(i = 0; i < subplotAttr.length; i++) {\n                        var attri = subplotAttr[i];\n                        var vali = Lib.coerce(traceIn, traceOut, subplotAttrs, attri);\n\n                        if(subplots[attri]) Lib.pushUnique(subplots[attri], vali);\n                        subplotId += vali;\n                    }\n                } else {\n                    subplotId = Lib.coerce(traceIn, traceOut, subplotAttrs, subplotAttr);\n                }\n\n                if(subplots[basePlotModule.name]) {\n                    Lib.pushUnique(subplots[basePlotModule.name], subplotId);\n                }\n            }\n        }\n    }\n\n    if(visible) {\n        coerce('customdata');\n        coerce('ids');\n        coerce('meta');\n\n        if(Registry.traceIs(traceOut, 'showLegend')) {\n            traceOut._dfltShowLegend = true;\n            coerce('showlegend');\n            coerce('legendgroup');\n        } else {\n            traceOut._dfltShowLegend = false;\n        }\n\n        if(_module) {\n            _module.supplyDefaults(traceIn, traceOut, defaultColor, layout);\n        }\n\n        if(!Registry.traceIs(traceOut, 'noOpacity')) {\n            coerce('opacity');\n        }\n\n        if(Registry.traceIs(traceOut, 'notLegendIsolatable')) {\n            // This clears out the legendonly state for traces like carpet that\n            // cannot be isolated in the legend\n            traceOut.visible = !!traceOut.visible;\n        }\n\n        if(!Registry.traceIs(traceOut, 'noHover')) {\n            if(!traceOut.hovertemplate) Lib.coerceHoverinfo(traceIn, traceOut, layout);\n\n            // parcats support hover, but not hoverlabel stylings (yet)\n            if(traceOut.type !== 'parcats') {\n                Registry.getComponentMethod('fx', 'supplyDefaults')(traceIn, traceOut, defaultColor, layout);\n            }\n        }\n\n        if(_module && _module.selectPoints) {\n            coerce('selectedpoints');\n        }\n\n        plots.supplyTransformDefaults(traceIn, traceOut, layout);\n    }\n\n    return traceOut;\n};\n\n/**\n * hasMakesDataTransform: does this trace have a transform that makes its own\n * data, either by grabbing it from somewhere else or by creating it from input\n * parameters? If so, we should still keep going with supplyDefaults\n * even if the trace is invisible, which may just be because it has no data yet.\n */\nfunction hasMakesDataTransform(trace) {\n    var transforms = trace.transforms;\n    if(Array.isArray(transforms) && transforms.length) {\n        for(var i = 0; i < transforms.length; i++) {\n            var ti = transforms[i];\n            var _module = ti._module || transformsRegistry[ti.type];\n            if(_module && _module.makesData) return true;\n        }\n    }\n    return false;\n}\n\nplots.hasMakesDataTransform = hasMakesDataTransform;\n\nplots.supplyTransformDefaults = function(traceIn, traceOut, layout) {\n    // For now we only allow transforms on 1D traces, ie those that specify a _length.\n    // If we were to implement 2D transforms, we'd need to have each transform\n    // describe its own applicability and disable itself when it doesn't apply.\n    // Also allow transforms that make their own data, but not in globalTransforms\n    if(!(traceOut._length || hasMakesDataTransform(traceIn))) return;\n\n    var globalTransforms = layout._globalTransforms || [];\n    var transformModules = layout._transformModules || [];\n\n    if(!Array.isArray(traceIn.transforms) && globalTransforms.length === 0) return;\n\n    var containerIn = traceIn.transforms || [];\n    var transformList = globalTransforms.concat(containerIn);\n    var containerOut = traceOut.transforms = [];\n\n    for(var i = 0; i < transformList.length; i++) {\n        var transformIn = transformList[i];\n        var type = transformIn.type;\n        var _module = transformsRegistry[type];\n        var transformOut;\n\n        /*\n         * Supply defaults may run twice. First pass runs all supply defaults steps\n         * and adds the _module to any output transforms.\n         * If transforms exist another pass is run so that any generated traces also\n         * go through supply defaults. This has the effect of rerunning\n         * supplyTransformDefaults. If the transform does not have a `transform`\n         * function it could not have generated any new traces and the second stage\n         * is unnecessary. We detect this case with the following variables.\n         */\n        var isFirstStage = !(transformIn._module && transformIn._module === _module);\n        var doLaterStages = _module && typeof _module.transform === 'function';\n\n        if(!_module) Lib.warn('Unrecognized transform type ' + type + '.');\n\n        if(_module && _module.supplyDefaults && (isFirstStage || doLaterStages)) {\n            transformOut = _module.supplyDefaults(transformIn, traceOut, layout, traceIn);\n            transformOut.type = type;\n            transformOut._module = _module;\n\n            Lib.pushUnique(transformModules, _module);\n        } else {\n            transformOut = Lib.extendFlat({}, transformIn);\n        }\n\n        containerOut.push(transformOut);\n    }\n};\n\nfunction applyTransforms(fullTrace, fullData, layout, fullLayout) {\n    var container = fullTrace.transforms;\n    var dataOut = [fullTrace];\n\n    for(var i = 0; i < container.length; i++) {\n        var transform = container[i];\n        var _module = transformsRegistry[transform.type];\n\n        if(_module && _module.transform) {\n            dataOut = _module.transform(dataOut, {\n                transform: transform,\n                fullTrace: fullTrace,\n                fullData: fullData,\n                layout: layout,\n                fullLayout: fullLayout,\n                transformIndex: i\n            });\n        }\n    }\n\n    return dataOut;\n}\n\nplots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, plots.layoutAttributes, attr, dflt);\n    }\n\n    var template = layoutIn.template;\n    if(Lib.isPlainObject(template)) {\n        layoutOut.template = template;\n        layoutOut._template = template.layout;\n        layoutOut._dataTemplate = template.data;\n    }\n\n    var globalFont = Lib.coerceFont(coerce, 'font');\n\n    coerce('title.text', layoutOut._dfltTitle.plot);\n\n    Lib.coerceFont(coerce, 'title.font', {\n        family: globalFont.family,\n        size: Math.round(globalFont.size * 1.4),\n        color: globalFont.color\n    });\n\n    coerce('title.xref');\n    coerce('title.yref');\n    coerce('title.x');\n    coerce('title.y');\n    coerce('title.xanchor');\n    coerce('title.yanchor');\n    coerce('title.pad.t');\n    coerce('title.pad.r');\n    coerce('title.pad.b');\n    coerce('title.pad.l');\n\n    // Make sure that autosize is defaulted to *true*\n    // on layouts with no set width and height for backward compatibly,\n    // in particular https://plot.ly/javascript/responsive-fluid-layout/\n    //\n    // Before https://github.com/plotly/plotly.js/pull/635 ,\n    // layouts with no set width and height were set temporary set to 'initial'\n    // to pass through the autosize routine\n    //\n    // This behavior is subject to change in v2.\n    coerce('autosize', !(layoutIn.width && layoutIn.height));\n\n    coerce('width');\n    coerce('height');\n    coerce('margin.l');\n    coerce('margin.r');\n    coerce('margin.t');\n    coerce('margin.b');\n    coerce('margin.pad');\n    coerce('margin.autoexpand');\n\n    if(layoutIn.width && layoutIn.height) plots.sanitizeMargins(layoutOut);\n\n    Registry.getComponentMethod('grid', 'sizeDefaults')(layoutIn, layoutOut);\n\n    coerce('paper_bgcolor');\n\n    coerce('separators', formatObj.decimal + formatObj.thousands);\n    coerce('hidesources');\n\n    coerce('colorway');\n\n    coerce('datarevision');\n    var uirevision = coerce('uirevision');\n    coerce('editrevision', uirevision);\n    coerce('selectionrevision', uirevision);\n\n    coerce('modebar.orientation');\n    coerce('modebar.bgcolor', Color.addOpacity(layoutOut.paper_bgcolor, 0.5));\n    var modebarDefaultColor = Color.contrast(Color.rgb(layoutOut.modebar.bgcolor));\n    coerce('modebar.color', Color.addOpacity(modebarDefaultColor, 0.3));\n    coerce('modebar.activecolor', Color.addOpacity(modebarDefaultColor, 0.7));\n    coerce('modebar.uirevision', uirevision);\n\n    coerce('meta');\n\n    // do not include defaults in fullLayout when users do not set transition\n    if(Lib.isPlainObject(layoutIn.transition)) {\n        coerce('transition.duration');\n        coerce('transition.easing');\n        coerce('transition.ordering');\n    }\n\n    Registry.getComponentMethod(\n        'calendars',\n        'handleDefaults'\n    )(layoutIn, layoutOut, 'calendar');\n\n    Registry.getComponentMethod(\n        'fx',\n        'supplyLayoutGlobalDefaults'\n    )(layoutIn, layoutOut, coerce);\n};\n\nplots.plotAutoSize = function plotAutoSize(gd, layout, fullLayout) {\n    var context = gd._context || {};\n    var frameMargins = context.frameMargins;\n    var newWidth;\n    var newHeight;\n\n    var isPlotDiv = Lib.isPlotDiv(gd);\n\n    if(isPlotDiv) gd.emit('plotly_autosize');\n\n    // embedded in an iframe - just take the full iframe size\n    // if we get to this point, with no aspect ratio restrictions\n    if(context.fillFrame) {\n        newWidth = window.innerWidth;\n        newHeight = window.innerHeight;\n\n        // somehow we get a few extra px height sometimes...\n        // just hide it\n        document.body.style.overflow = 'hidden';\n    } else {\n        // plotly.js - let the developers do what they want, either\n        // provide height and width for the container div,\n        // specify size in layout, or take the defaults,\n        // but don't enforce any ratio restrictions\n        var computedStyle = isPlotDiv ? window.getComputedStyle(gd) : {};\n\n        newWidth = parseFloat(computedStyle.width) || parseFloat(computedStyle.maxWidth) || fullLayout.width;\n        newHeight = parseFloat(computedStyle.height) || parseFloat(computedStyle.maxHeight) || fullLayout.height;\n\n        if(isNumeric(frameMargins) && frameMargins > 0) {\n            var factor = 1 - 2 * frameMargins;\n            newWidth = Math.round(factor * newWidth);\n            newHeight = Math.round(factor * newHeight);\n        }\n    }\n\n    var minWidth = plots.layoutAttributes.width.min;\n    var minHeight = plots.layoutAttributes.height.min;\n    if(newWidth < minWidth) newWidth = minWidth;\n    if(newHeight < minHeight) newHeight = minHeight;\n\n    var widthHasChanged = !layout.width &&\n        (Math.abs(fullLayout.width - newWidth) > 1);\n    var heightHasChanged = !layout.height &&\n        (Math.abs(fullLayout.height - newHeight) > 1);\n\n    if(heightHasChanged || widthHasChanged) {\n        if(widthHasChanged) fullLayout.width = newWidth;\n        if(heightHasChanged) fullLayout.height = newHeight;\n    }\n\n    // cache initial autosize value, used in relayout when\n    // width or height values are set to null\n    if(!gd._initialAutoSize) {\n        gd._initialAutoSize = { width: newWidth, height: newHeight };\n    }\n\n    plots.sanitizeMargins(fullLayout);\n};\n\nplots.supplyLayoutModuleDefaults = function(layoutIn, layoutOut, fullData, transitionData) {\n    var componentsRegistry = Registry.componentsRegistry;\n    var basePlotModules = layoutOut._basePlotModules;\n    var component, i, _module;\n\n    var Cartesian = Registry.subplotsRegistry.cartesian;\n\n    // check if any components need to add more base plot modules\n    // that weren't captured by traces\n    for(component in componentsRegistry) {\n        _module = componentsRegistry[component];\n\n        if(_module.includeBasePlot) {\n            _module.includeBasePlot(layoutIn, layoutOut);\n        }\n    }\n\n    // make sure we *at least* have some cartesian axes\n    if(!basePlotModules.length) {\n        basePlotModules.push(Cartesian);\n    }\n\n    // ensure all cartesian axes have at least one subplot\n    if(layoutOut._has('cartesian')) {\n        Registry.getComponentMethod('grid', 'contentDefaults')(layoutIn, layoutOut);\n        Cartesian.finalizeSubplots(layoutIn, layoutOut);\n    }\n\n    // sort subplot lists\n    for(var subplotType in layoutOut._subplots) {\n        layoutOut._subplots[subplotType].sort(Lib.subplotSort);\n    }\n\n    // base plot module layout defaults\n    for(i = 0; i < basePlotModules.length; i++) {\n        _module = basePlotModules[i];\n\n        // e.g. pie does not have a layout-defaults step\n        if(_module.supplyLayoutDefaults) {\n            _module.supplyLayoutDefaults(layoutIn, layoutOut, fullData);\n        }\n    }\n\n    // trace module layout defaults\n    // use _modules rather than _visibleModules so that even\n    // legendonly traces can include settings - eg barmode, which affects\n    // legend.traceorder default value.\n    var modules = layoutOut._modules;\n    for(i = 0; i < modules.length; i++) {\n        _module = modules[i];\n\n        if(_module.supplyLayoutDefaults) {\n            _module.supplyLayoutDefaults(layoutIn, layoutOut, fullData);\n        }\n    }\n\n    // transform module layout defaults\n    var transformModules = layoutOut._transformModules;\n    for(i = 0; i < transformModules.length; i++) {\n        _module = transformModules[i];\n\n        if(_module.supplyLayoutDefaults) {\n            _module.supplyLayoutDefaults(layoutIn, layoutOut, fullData, transitionData);\n        }\n    }\n\n    for(component in componentsRegistry) {\n        _module = componentsRegistry[component];\n\n        if(_module.supplyLayoutDefaults) {\n            _module.supplyLayoutDefaults(layoutIn, layoutOut, fullData);\n        }\n    }\n};\n\n// Remove all plotly attributes from a div so it can be replotted fresh\n// TODO: these really need to be encapsulated into a much smaller set...\nplots.purge = function(gd) {\n    // note: we DO NOT remove _context because it doesn't change when we insert\n    // a new plot, and may have been set outside of our scope.\n\n    var fullLayout = gd._fullLayout || {};\n    if(fullLayout._glcontainer !== undefined) {\n        fullLayout._glcontainer.selectAll('.gl-canvas').remove();\n        fullLayout._glcontainer.remove();\n        fullLayout._glcanvas = null;\n    }\n    if(fullLayout._geocontainer !== undefined) fullLayout._geocontainer.remove();\n\n    // remove modebar\n    if(fullLayout._modeBar) fullLayout._modeBar.destroy();\n\n    if(gd._transitionData) {\n        // Ensure any dangling callbacks are simply dropped if the plot is purged.\n        // This is more or less only actually important for testing.\n        if(gd._transitionData._interruptCallbacks) {\n            gd._transitionData._interruptCallbacks.length = 0;\n        }\n\n        if(gd._transitionData._animationRaf) {\n            window.cancelAnimationFrame(gd._transitionData._animationRaf);\n        }\n    }\n\n    // remove any planned throttles\n    Lib.clearThrottle();\n\n    // remove responsive handler\n    Lib.clearResponsive(gd);\n\n    // data and layout\n    delete gd.data;\n    delete gd.layout;\n    delete gd._fullData;\n    delete gd._fullLayout;\n    delete gd.calcdata;\n    delete gd.framework;\n    delete gd.empty;\n\n    delete gd.fid;\n\n    delete gd.undoqueue; // action queue\n    delete gd.undonum;\n    delete gd.autoplay; // are we doing an action that doesn't go in undo queue?\n    delete gd.changed;\n\n    // these get recreated on Plotly.plot anyway, but just to be safe\n    // (and to have a record of them...)\n    delete gd._promises;\n    delete gd._redrawTimer;\n    delete gd._hmlumcount;\n    delete gd._hmpixcount;\n    delete gd._transitionData;\n    delete gd._transitioning;\n    delete gd._initialAutoSize;\n    delete gd._transitioningWithDuration;\n\n    // created during certain events, that *should* clean them up\n    // themselves, but may not if there was an error\n    delete gd._dragging;\n    delete gd._dragged;\n    delete gd._dragdata;\n    delete gd._hoverdata;\n    delete gd._snapshotInProgress;\n    delete gd._editing;\n    delete gd._mouseDownTime;\n    delete gd._legendMouseDownTime;\n\n    // remove all event listeners\n    if(gd.removeAllListeners) gd.removeAllListeners();\n};\n\nplots.style = function(gd) {\n    var _modules = gd._fullLayout._visibleModules;\n    var styleModules = [];\n    var i;\n\n    // some trace modules reuse the same style method,\n    // make sure to not unnecessary call them multiple times.\n\n    for(i = 0; i < _modules.length; i++) {\n        var _module = _modules[i];\n        if(_module.style) {\n            Lib.pushUnique(styleModules, _module.style);\n        }\n    }\n\n    for(i = 0; i < styleModules.length; i++) {\n        styleModules[i](gd);\n    }\n};\n\nplots.sanitizeMargins = function(fullLayout) {\n    // polar doesn't do margins...\n    if(!fullLayout || !fullLayout.margin) return;\n\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n    var margin = fullLayout.margin;\n    var plotWidth = width - (margin.l + margin.r);\n    var plotHeight = height - (margin.t + margin.b);\n    var correction;\n\n    // if margin.l + margin.r = 0 then plotWidth > 0\n    // as width >= 10 by supplyDefaults\n    // similarly for margin.t + margin.b\n\n    if(plotWidth < 0) {\n        correction = (width - 1) / (margin.l + margin.r);\n        margin.l = Math.floor(correction * margin.l);\n        margin.r = Math.floor(correction * margin.r);\n    }\n\n    if(plotHeight < 0) {\n        correction = (height - 1) / (margin.t + margin.b);\n        margin.t = Math.floor(correction * margin.t);\n        margin.b = Math.floor(correction * margin.b);\n    }\n};\n\nplots.clearAutoMarginIds = function(gd) {\n    gd._fullLayout._pushmarginIds = {};\n};\n\nplots.allowAutoMargin = function(gd, id) {\n    gd._fullLayout._pushmarginIds[id] = 1;\n};\n\nfunction initMargins(fullLayout) {\n    var margin = fullLayout.margin;\n\n    if(!fullLayout._size) {\n        var gs = fullLayout._size = {\n            l: Math.round(margin.l),\n            r: Math.round(margin.r),\n            t: Math.round(margin.t),\n            b: Math.round(margin.b),\n            p: Math.round(margin.pad)\n        };\n        gs.w = Math.round(fullLayout.width) - gs.l - gs.r;\n        gs.h = Math.round(fullLayout.height) - gs.t - gs.b;\n    }\n    if(!fullLayout._pushmargin) fullLayout._pushmargin = {};\n    if(!fullLayout._pushmarginIds) fullLayout._pushmarginIds = {};\n}\n\n/**\n * autoMargin: called by components that may need to expand the margins to\n * be rendered on-plot.\n *\n * @param {DOM element} gd\n * @param {string} id - an identifier unique (within this plot) to this object,\n *     so we can remove a previous margin expansion from the same object.\n * @param {object} o - the margin requirements of this object, or omit to delete\n *     this entry (like if it's hidden). Keys are:\n *     x, y: plot fraction of the anchor point.\n *     xl, xr, yt, yb: if the object has an extent defined in plot fraction,\n *         you can specify both edges as plot fractions in each dimension\n *     l, r, t, b: the pixels to pad past the plot fraction x[l|r] and y[t|b]\n *     pad: extra pixels to add in all directions, default 12 (why?)\n */\nplots.autoMargin = function(gd, id, o) {\n    var fullLayout = gd._fullLayout;\n\n    var pushMargin = fullLayout._pushmargin;\n    var pushMarginIds = fullLayout._pushmarginIds;\n\n    if(fullLayout.margin.autoexpand !== false) {\n        if(!o) {\n            delete pushMargin[id];\n            delete pushMarginIds[id];\n        } else {\n            var pad = o.pad;\n            if(pad === undefined) {\n                var margin = fullLayout.margin;\n                // if no explicit pad is given, use 12px unless there's a\n                // specified margin that's smaller than that\n                pad = Math.min(12, margin.l, margin.r, margin.t, margin.b);\n            }\n\n            // if the item is too big, just give it enough automargin to\n            // make sure you can still grab it and bring it back\n            if(o.l + o.r > fullLayout.width * 0.5) o.l = o.r = 0;\n            if(o.b + o.t > fullLayout.height * 0.5) o.b = o.t = 0;\n\n            var xl = o.xl !== undefined ? o.xl : o.x;\n            var xr = o.xr !== undefined ? o.xr : o.x;\n            var yt = o.yt !== undefined ? o.yt : o.y;\n            var yb = o.yb !== undefined ? o.yb : o.y;\n\n            pushMargin[id] = {\n                l: {val: xl, size: o.l + pad},\n                r: {val: xr, size: o.r + pad},\n                b: {val: yb, size: o.b + pad},\n                t: {val: yt, size: o.t + pad}\n            };\n            pushMarginIds[id] = 1;\n        }\n\n        if(!fullLayout._replotting) {\n            plots.doAutoMargin(gd);\n        }\n    }\n};\n\nplots.doAutoMargin = function(gd) {\n    var fullLayout = gd._fullLayout;\n    if(!fullLayout._size) fullLayout._size = {};\n    initMargins(fullLayout);\n\n    var gs = fullLayout._size;\n    var margin = fullLayout.margin;\n    var oldMargins = Lib.extendFlat({}, gs);\n\n    // adjust margins for outside components\n    // fullLayout.margin is the requested margin,\n    // fullLayout._size has margins and plotsize after adjustment\n    var ml = margin.l;\n    var mr = margin.r;\n    var mt = margin.t;\n    var mb = margin.b;\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n    var pushMargin = fullLayout._pushmargin;\n    var pushMarginIds = fullLayout._pushmarginIds;\n\n    if(fullLayout.margin.autoexpand !== false) {\n        for(var k in pushMargin) {\n            if(!pushMarginIds[k]) delete pushMargin[k];\n        }\n\n        // fill in the requested margins\n        pushMargin.base = {\n            l: {val: 0, size: ml},\n            r: {val: 1, size: mr},\n            t: {val: 1, size: mt},\n            b: {val: 0, size: mb}\n        };\n\n        // now cycle through all the combinations of l and r\n        // (and t and b) to find the required margins\n\n        for(var k1 in pushMargin) {\n            var pushleft = pushMargin[k1].l || {};\n            var pushbottom = pushMargin[k1].b || {};\n            var fl = pushleft.val;\n            var pl = pushleft.size;\n            var fb = pushbottom.val;\n            var pb = pushbottom.size;\n\n            for(var k2 in pushMargin) {\n                if(isNumeric(pl) && pushMargin[k2].r) {\n                    var fr = pushMargin[k2].r.val;\n                    var pr = pushMargin[k2].r.size;\n\n                    if(fr > fl) {\n                        var newL = (pl * fr + (pr - width) * fl) / (fr - fl);\n                        var newR = (pr * (1 - fl) + (pl - width) * (1 - fr)) / (fr - fl);\n                        if(newL >= 0 && newR >= 0 && width - (newL + newR) > 0 && newL + newR > ml + mr) {\n                            ml = newL;\n                            mr = newR;\n                        }\n                    }\n                }\n\n                if(isNumeric(pb) && pushMargin[k2].t) {\n                    var ft = pushMargin[k2].t.val;\n                    var pt = pushMargin[k2].t.size;\n\n                    if(ft > fb) {\n                        var newB = (pb * ft + (pt - height) * fb) / (ft - fb);\n                        var newT = (pt * (1 - fb) + (pb - height) * (1 - ft)) / (ft - fb);\n                        if(newB >= 0 && newT >= 0 && height - (newT + newB) > 0 && newB + newT > mb + mt) {\n                            mb = newB;\n                            mt = newT;\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    gs.l = Math.round(ml);\n    gs.r = Math.round(mr);\n    gs.t = Math.round(mt);\n    gs.b = Math.round(mb);\n    gs.p = Math.round(margin.pad);\n    gs.w = Math.round(width) - gs.l - gs.r;\n    gs.h = Math.round(height) - gs.t - gs.b;\n\n    // if things changed and we're not already redrawing, trigger a redraw\n    if(!fullLayout._replotting && plots.didMarginChange(oldMargins, gs)) {\n        if('_redrawFromAutoMarginCount' in fullLayout) {\n            fullLayout._redrawFromAutoMarginCount++;\n        } else {\n            fullLayout._redrawFromAutoMarginCount = 1;\n        }\n        return Registry.call('plot', gd);\n    }\n};\n\nvar marginKeys = ['l', 'r', 't', 'b', 'p', 'w', 'h'];\n\nplots.didMarginChange = function(margin0, margin1) {\n    for(var i = 0; i < marginKeys.length; i++) {\n        var k = marginKeys[i];\n        var m0 = margin0[k];\n        var m1 = margin1[k];\n        // use 1px tolerance in case we old/new differ only\n        // by rounding errors, which can lead to infinite loops\n        if(!isNumeric(m0) || Math.abs(m1 - m0) > 1) {\n            return true;\n        }\n    }\n    return false;\n};\n\n/**\n * JSONify the graph data and layout\n *\n * This function needs to recurse because some src can be inside\n * sub-objects.\n *\n * It also strips out functions and private (starts with _) elements.\n * Therefore, we can add temporary things to data and layout that don't\n * get saved.\n *\n * @param gd The graphDiv\n * @param {Boolean} dataonly If true, don't return layout.\n * @param {'keepref'|'keepdata'|'keepall'} [mode='keepref'] Filter what's kept\n *      keepref: remove data for which there's a src present\n *          eg if there's xsrc present (and xsrc is well-formed,\n *          ie has : and some chars before it), strip out x\n *      keepdata: remove all src tags, don't remove the data itself\n *      keepall: keep data and src\n * @param {String} output If you specify 'object', the result will not be stringified\n * @param {Boolean} useDefaults If truthy, use _fullLayout and _fullData\n * @returns {Object|String}\n */\nplots.graphJson = function(gd, dataonly, mode, output, useDefaults) {\n    // if the defaults aren't supplied yet, we need to do that...\n    if((useDefaults && dataonly && !gd._fullData) ||\n            (useDefaults && !dataonly && !gd._fullLayout)) {\n        plots.supplyDefaults(gd);\n    }\n\n    var data = (useDefaults) ? gd._fullData : gd.data;\n    var layout = (useDefaults) ? gd._fullLayout : gd.layout;\n    var frames = (gd._transitionData || {})._frames;\n\n    function stripObj(d) {\n        if(typeof d === 'function') {\n            return null;\n        }\n        if(Lib.isPlainObject(d)) {\n            var o = {};\n            var v, src;\n            for(v in d) {\n                // remove private elements and functions\n                // _ is for private, [ is a mistake ie [object Object]\n                if(typeof d[v] === 'function' ||\n                        ['_', '['].indexOf(v.charAt(0)) !== -1) {\n                    continue;\n                }\n\n                // look for src/data matches and remove the appropriate one\n                if(mode === 'keepdata') {\n                    // keepdata: remove all ...src tags\n                    if(v.substr(v.length - 3) === 'src') {\n                        continue;\n                    }\n                } else if(mode === 'keepstream') {\n                    // keep sourced data if it's being streamed.\n                    // similar to keepref, but if the 'stream' object exists\n                    // in a trace, we will keep the data array.\n                    src = d[v + 'src'];\n                    if(typeof src === 'string' && src.indexOf(':') > 0) {\n                        if(!Lib.isPlainObject(d.stream)) {\n                            continue;\n                        }\n                    }\n                } else if(mode !== 'keepall') {\n                    // keepref: remove sourced data but only\n                    // if the source tag is well-formed\n                    src = d[v + 'src'];\n                    if(typeof src === 'string' && src.indexOf(':') > 0) {\n                        continue;\n                    }\n                }\n\n                // OK, we're including this... recurse into it\n                o[v] = stripObj(d[v]);\n            }\n            return o;\n        }\n\n        if(Array.isArray(d)) {\n            return d.map(stripObj);\n        }\n\n        if(Lib.isTypedArray(d)) {\n            return Lib.simpleMap(d, Lib.identity);\n        }\n\n        // convert native dates to date strings...\n        // mostly for external users exporting to plotly\n        if(Lib.isJSDate(d)) return Lib.ms2DateTimeLocal(+d);\n\n        return d;\n    }\n\n    var obj = {\n        data: (data || []).map(function(v) {\n            var d = stripObj(v);\n            // fit has some little arrays in it that don't contain data,\n            // just fit params and meta\n            if(dataonly) { delete d.fit; }\n            return d;\n        })\n    };\n    if(!dataonly) { obj.layout = stripObj(layout); }\n\n    if(gd.framework && gd.framework.isPolar) obj = gd.framework.getConfig();\n\n    if(frames) obj.frames = stripObj(frames);\n\n    return (output === 'object') ? obj : JSON.stringify(obj);\n};\n\n/**\n * Modify a keyframe using a list of operations:\n *\n * @param {array of objects} operations\n *      Sequence of operations to be performed on the keyframes\n */\nplots.modifyFrames = function(gd, operations) {\n    var i, op, frame;\n    var _frames = gd._transitionData._frames;\n    var _frameHash = gd._transitionData._frameHash;\n\n    for(i = 0; i < operations.length; i++) {\n        op = operations[i];\n\n        switch(op.type) {\n            // No reason this couldn't exist, but is currently unused/untested:\n            /* case 'rename':\n                frame = _frames[op.index];\n                delete _frameHash[frame.name];\n                _frameHash[op.name] = frame;\n                frame.name = op.name;\n                break;*/\n            case 'replace':\n                frame = op.value;\n                var oldName = (_frames[op.index] || {}).name;\n                var newName = frame.name;\n                _frames[op.index] = _frameHash[newName] = frame;\n\n                if(newName !== oldName) {\n                    // If name has changed in addition to replacement, then update\n                    // the lookup table:\n                    delete _frameHash[oldName];\n                    _frameHash[newName] = frame;\n                }\n\n                break;\n            case 'insert':\n                frame = op.value;\n                _frameHash[frame.name] = frame;\n                _frames.splice(op.index, 0, frame);\n                break;\n            case 'delete':\n                frame = _frames[op.index];\n                delete _frameHash[frame.name];\n                _frames.splice(op.index, 1);\n                break;\n        }\n    }\n\n    return Promise.resolve();\n};\n\n/*\n * Compute a keyframe. Merge a keyframe into its base frame(s) and\n * expand properties.\n *\n * @param {object} frameLookup\n *      An object containing frames keyed by name (i.e. gd._transitionData._frameHash)\n * @param {string} frame\n *      The name of the keyframe to be computed\n *\n * Returns: a new object with the merged content\n */\nplots.computeFrame = function(gd, frameName) {\n    var frameLookup = gd._transitionData._frameHash;\n    var i, traceIndices, traceIndex, destIndex;\n\n    // Null or undefined will fail on .toString(). We'll allow numbers since we\n    // make it clear frames must be given string names, but we'll allow numbers\n    // here since they're otherwise fine for looking up frames as long as they're\n    // properly cast to strings. We really just want to ensure here that this\n    // 1) doesn't fail, and\n    // 2) doens't give an incorrect answer (which String(frameName) would)\n    if(!frameName) {\n        throw new Error('computeFrame must be given a string frame name');\n    }\n\n    var framePtr = frameLookup[frameName.toString()];\n\n    // Return false if the name is invalid:\n    if(!framePtr) {\n        return false;\n    }\n\n    var frameStack = [framePtr];\n    var frameNameStack = [framePtr.name];\n\n    // Follow frame pointers:\n    while(framePtr.baseframe && (framePtr = frameLookup[framePtr.baseframe.toString()])) {\n        // Avoid infinite loops:\n        if(frameNameStack.indexOf(framePtr.name) !== -1) break;\n\n        frameStack.push(framePtr);\n        frameNameStack.push(framePtr.name);\n    }\n\n    // A new object for the merged result:\n    var result = {};\n\n    // Merge, starting with the last and ending with the desired frame:\n    while((framePtr = frameStack.pop())) {\n        if(framePtr.layout) {\n            result.layout = plots.extendLayout(result.layout, framePtr.layout);\n        }\n\n        if(framePtr.data) {\n            if(!result.data) {\n                result.data = [];\n            }\n            traceIndices = framePtr.traces;\n\n            if(!traceIndices) {\n                // If not defined, assume serial order starting at zero\n                traceIndices = [];\n                for(i = 0; i < framePtr.data.length; i++) {\n                    traceIndices[i] = i;\n                }\n            }\n\n            if(!result.traces) {\n                result.traces = [];\n            }\n\n            for(i = 0; i < framePtr.data.length; i++) {\n                // Loop through this frames data, find out where it should go,\n                // and merge it!\n                traceIndex = traceIndices[i];\n                if(traceIndex === undefined || traceIndex === null) {\n                    continue;\n                }\n\n                destIndex = result.traces.indexOf(traceIndex);\n                if(destIndex === -1) {\n                    destIndex = result.data.length;\n                    result.traces[destIndex] = traceIndex;\n                }\n\n                result.data[destIndex] = plots.extendTrace(result.data[destIndex], framePtr.data[i]);\n            }\n        }\n    }\n\n    return result;\n};\n\n/*\n * Recompute the lookup table that maps frame name -> frame object. addFrames/\n * deleteFrames already manages this data one at a time, so the only time this\n * is necessary is if you poke around manually in `gd._transitionData._frames`\n * and create and haven't updated the lookup table.\n */\nplots.recomputeFrameHash = function(gd) {\n    var hash = gd._transitionData._frameHash = {};\n    var frames = gd._transitionData._frames;\n    for(var i = 0; i < frames.length; i++) {\n        var frame = frames[i];\n        if(frame && frame.name) {\n            hash[frame.name] = frame;\n        }\n    }\n};\n\n/**\n * Extend an object, treating container arrays very differently by extracting\n * their contents and merging them separately.\n *\n * This exists so that we can extendDeepNoArrays and avoid stepping into data\n * arrays without knowledge of the plot schema, but so that we may also manually\n * recurse into known container arrays, such as transforms.\n *\n * See extendTrace and extendLayout below for usage.\n */\nplots.extendObjectWithContainers = function(dest, src, containerPaths) {\n    var containerProp, containerVal, i, j, srcProp, destProp, srcContainer, destContainer;\n    var copy = Lib.extendDeepNoArrays({}, src || {});\n    var expandedObj = Lib.expandObjectPaths(copy);\n    var containerObj = {};\n\n    // Step through and extract any container properties. Otherwise extendDeepNoArrays\n    // will clobber any existing properties with an empty array and then supplyDefaults\n    // will reset everything to defaults.\n    if(containerPaths && containerPaths.length) {\n        for(i = 0; i < containerPaths.length; i++) {\n            containerProp = Lib.nestedProperty(expandedObj, containerPaths[i]);\n            containerVal = containerProp.get();\n\n            if(containerVal === undefined) {\n                Lib.nestedProperty(containerObj, containerPaths[i]).set(null);\n            } else {\n                containerProp.set(null);\n                Lib.nestedProperty(containerObj, containerPaths[i]).set(containerVal);\n            }\n        }\n    }\n\n    dest = Lib.extendDeepNoArrays(dest || {}, expandedObj);\n\n    if(containerPaths && containerPaths.length) {\n        for(i = 0; i < containerPaths.length; i++) {\n            srcProp = Lib.nestedProperty(containerObj, containerPaths[i]);\n            srcContainer = srcProp.get();\n\n            if(!srcContainer) continue;\n\n            destProp = Lib.nestedProperty(dest, containerPaths[i]);\n            destContainer = destProp.get();\n\n            if(!Array.isArray(destContainer)) {\n                destContainer = [];\n                destProp.set(destContainer);\n            }\n\n            for(j = 0; j < srcContainer.length; j++) {\n                var srcObj = srcContainer[j];\n\n                if(srcObj === null) destContainer[j] = null;\n                else {\n                    destContainer[j] = plots.extendObjectWithContainers(destContainer[j], srcObj);\n                }\n            }\n\n            destProp.set(destContainer);\n        }\n    }\n\n    return dest;\n};\n\nplots.dataArrayContainers = ['transforms', 'dimensions'];\nplots.layoutArrayContainers = Registry.layoutArrayContainers;\n\n/*\n * Extend a trace definition. This method:\n *\n *  1. directly transfers any array references\n *  2. manually recurses into container arrays like transforms\n *\n * The result is the original object reference with the new contents merged in.\n */\nplots.extendTrace = function(destTrace, srcTrace) {\n    return plots.extendObjectWithContainers(destTrace, srcTrace, plots.dataArrayContainers);\n};\n\n/*\n * Extend a layout definition. This method:\n *\n *  1. directly transfers any array references (not critically important for\n *     layout since there aren't really data arrays)\n *  2. manually recurses into container arrays like annotations\n *\n * The result is the original object reference with the new contents merged in.\n */\nplots.extendLayout = function(destLayout, srcLayout) {\n    return plots.extendObjectWithContainers(destLayout, srcLayout, plots.layoutArrayContainers);\n};\n\n/**\n * Transition to a set of new data and layout properties from Plotly.animate\n *\n * @param {DOM element} gd\n * @param {Object[]} data\n *      an array of data objects following the normal Plotly data definition format\n * @param {Object} layout\n *      a layout object, following normal Plotly layout format\n * @param {Number[]} traces\n *      indices of the corresponding traces specified in `data`\n * @param {Object} frameOpts\n *      options for the frame (i.e. whether to redraw post-transition)\n * @param {Object} transitionOpts\n *      options for the transition\n */\nplots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts) {\n    var opts = {redraw: frameOpts.redraw};\n    var transitionedTraces = {};\n    var axEdits = [];\n\n    opts.prepareFn = function() {\n        var dataLength = Array.isArray(data) ? data.length : 0;\n        var traceIndices = traces.slice(0, dataLength);\n\n        for(var i = 0; i < traceIndices.length; i++) {\n            var traceIdx = traceIndices[i];\n            var trace = gd._fullData[traceIdx];\n            var _module = trace._module;\n\n            // There's nothing to do if this module is not defined:\n            if(!_module) continue;\n\n            // Don't register the trace as transitioned if it doesn't know what to do.\n            // If it *is* registered, it will receive a callback that it's responsible\n            // for calling in order to register the transition as having completed.\n            if(_module.animatable) {\n                var n = _module.basePlotModule.name;\n                if(!transitionedTraces[n]) transitionedTraces[n] = [];\n                transitionedTraces[n].push(traceIdx);\n            }\n\n            gd.data[traceIndices[i]] = plots.extendTrace(gd.data[traceIndices[i]], data[i]);\n        }\n\n        // Follow the same procedure. Clone it so we don't mangle the input, then\n        // expand any object paths so we can merge deep into gd.layout:\n        var layoutUpdate = Lib.expandObjectPaths(Lib.extendDeepNoArrays({}, layout));\n\n        // Before merging though, we need to modify the incoming layout. We only\n        // know how to *transition* layout ranges, so it's imperative that a new\n        // range not be sent to the layout before the transition has started. So\n        // we must remove the things we can transition:\n        var axisAttrRe = /^[xy]axis[0-9]*$/;\n        for(var attr in layoutUpdate) {\n            if(!axisAttrRe.test(attr)) continue;\n            delete layoutUpdate[attr].range;\n        }\n\n        plots.extendLayout(gd.layout, layoutUpdate);\n\n        // Supply defaults after applying the incoming properties. Note that any attempt\n        // to simplify this step and reduce the amount of work resulted in the reconstruction\n        // of essentially the whole supplyDefaults step, so that it seems sensible to just use\n        // supplyDefaults even though it's heavier than would otherwise be desired for\n        // transitions:\n\n        // first delete calcdata so supplyDefaults knows a calc step is coming\n        delete gd.calcdata;\n\n        plots.supplyDefaults(gd);\n        plots.doCalcdata(gd);\n\n        var newLayout = Lib.expandObjectPaths(layout);\n\n        if(newLayout) {\n            var subplots = gd._fullLayout._plots;\n\n            for(var k in subplots) {\n                var plotinfo = subplots[k];\n                var xa = plotinfo.xaxis;\n                var ya = plotinfo.yaxis;\n                var xr0 = xa.range.slice();\n                var yr0 = ya.range.slice();\n\n                var xr1;\n                if(Array.isArray(newLayout[xa._name + '.range'])) {\n                    xr1 = newLayout[xa._name + '.range'].slice();\n                } else if(Array.isArray((newLayout[xa._name] || {}).range)) {\n                    xr1 = newLayout[xa._name].range.slice();\n                }\n\n                var yr1;\n                if(Array.isArray(newLayout[ya._name + '.range'])) {\n                    yr1 = newLayout[ya._name + '.range'].slice();\n                } else if(Array.isArray((newLayout[ya._name] || {}).range)) {\n                    yr1 = newLayout[ya._name].range.slice();\n                }\n\n                var editX;\n                if(xr0 && xr1 && (xr0[0] !== xr1[0] || xr0[1] !== xr1[1])) {\n                    editX = {xr0: xr0, xr1: xr1};\n                }\n\n                var editY;\n                if(yr0 && yr1 && (yr0[0] !== yr1[0] || yr0[1] !== yr1[1])) {\n                    editY = {yr0: yr0, yr1: yr1};\n                }\n\n                if(editX || editY) {\n                    axEdits.push(Lib.extendFlat({plotinfo: plotinfo}, editX, editY));\n                }\n            }\n        }\n\n        return Promise.resolve();\n    };\n\n    opts.runFn = function(makeCallback) {\n        var traceTransitionOpts;\n        var basePlotModules = gd._fullLayout._basePlotModules;\n        var hasAxisTransition = axEdits.length;\n        var i;\n\n        if(layout) {\n            for(i = 0; i < basePlotModules.length; i++) {\n                if(basePlotModules[i].transitionAxes) {\n                    basePlotModules[i].transitionAxes(gd, axEdits, transitionOpts, makeCallback);\n                }\n            }\n        }\n\n        // Here handle the exception that we refuse to animate scales and axes at the same\n        // time. In other words, if there's an axis transition, then set the data transition\n        // to instantaneous.\n        if(hasAxisTransition) {\n            traceTransitionOpts = Lib.extendFlat({}, transitionOpts);\n            traceTransitionOpts.duration = 0;\n            // This means do not transition cartesian traces,\n            // this happens on layout-only (e.g. axis range) animations\n            delete transitionedTraces.cartesian;\n        } else {\n            traceTransitionOpts = transitionOpts;\n        }\n\n        // Note that we pass a callback to *create* the callback that must be invoked on completion.\n        // This is since not all traces know about transitions, so it greatly simplifies matters if\n        // the trace is responsible for creating a callback, if needed, and then executing it when\n        // the time is right.\n        for(var n in transitionedTraces) {\n            var traceIndices = transitionedTraces[n];\n            var _module = gd._fullData[traceIndices[0]]._module;\n            _module.basePlotModule.plot(gd, traceIndices, traceTransitionOpts, makeCallback);\n        }\n    };\n\n    return _transition(gd, transitionOpts, opts);\n};\n\n/**\n * Transition to a set of new data and layout properties from Plotly.react\n *\n * @param {DOM element} gd\n * @param {object} restyleFlags\n * - anim {'all'|'some'}\n * @param {object} relayoutFlags\n * - anim {'all'|'some'}\n * @param {object} oldFullLayout : old (pre Plotly.react) fullLayout\n */\nplots.transitionFromReact = function(gd, restyleFlags, relayoutFlags, oldFullLayout) {\n    var fullLayout = gd._fullLayout;\n    var transitionOpts = fullLayout.transition;\n    var opts = {};\n    var axEdits = [];\n\n    opts.prepareFn = function() {\n        var subplots = fullLayout._plots;\n\n        // no need to redraw at end of transition,\n        // if all changes are animatable\n        opts.redraw = false;\n        if(restyleFlags.anim === 'some') opts.redraw = true;\n        if(relayoutFlags.anim === 'some') opts.redraw = true;\n\n        for(var k in subplots) {\n            var plotinfo = subplots[k];\n            var xa = plotinfo.xaxis;\n            var ya = plotinfo.yaxis;\n            var xr0 = oldFullLayout[xa._name].range.slice();\n            var yr0 = oldFullLayout[ya._name].range.slice();\n            var xr1 = xa.range.slice();\n            var yr1 = ya.range.slice();\n\n            xa.setScale();\n            ya.setScale();\n\n            var editX;\n            if(xr0[0] !== xr1[0] || xr0[1] !== xr1[1]) {\n                editX = {xr0: xr0, xr1: xr1};\n            }\n\n            var editY;\n            if(yr0[0] !== yr1[0] || yr0[1] !== yr1[1]) {\n                editY = {yr0: yr0, yr1: yr1};\n            }\n\n            if(editX || editY) {\n                axEdits.push(Lib.extendFlat({plotinfo: plotinfo}, editX, editY));\n            }\n        }\n\n        return Promise.resolve();\n    };\n\n    opts.runFn = function(makeCallback) {\n        var fullData = gd._fullData;\n        var fullLayout = gd._fullLayout;\n        var basePlotModules = fullLayout._basePlotModules;\n\n        var axisTransitionOpts;\n        var traceTransitionOpts;\n        var transitionedTraces;\n\n        var allTraceIndices = [];\n        for(var i = 0; i < fullData.length; i++) {\n            allTraceIndices.push(i);\n        }\n\n        function transitionAxes() {\n            for(var j = 0; j < basePlotModules.length; j++) {\n                if(basePlotModules[j].transitionAxes) {\n                    basePlotModules[j].transitionAxes(gd, axEdits, axisTransitionOpts, makeCallback);\n                }\n            }\n        }\n\n        function transitionTraces() {\n            for(var j = 0; j < basePlotModules.length; j++) {\n                basePlotModules[j].plot(gd, transitionedTraces, traceTransitionOpts, makeCallback);\n            }\n        }\n\n        if(axEdits.length && restyleFlags.anim) {\n            if(transitionOpts.ordering === 'traces first') {\n                axisTransitionOpts = Lib.extendFlat({}, transitionOpts, {duration: 0});\n                transitionedTraces = allTraceIndices;\n                traceTransitionOpts = transitionOpts;\n                transitionTraces();\n                setTimeout(transitionAxes, transitionOpts.duration);\n            } else {\n                axisTransitionOpts = transitionOpts;\n                transitionedTraces = null;\n                traceTransitionOpts = Lib.extendFlat({}, transitionOpts, {duration: 0});\n                transitionAxes();\n                transitionTraces();\n            }\n        } else if(axEdits.length) {\n            axisTransitionOpts = transitionOpts;\n            transitionAxes();\n        } else if(restyleFlags.anim) {\n            transitionedTraces = allTraceIndices;\n            traceTransitionOpts = transitionOpts;\n            transitionTraces();\n        }\n    };\n\n    return _transition(gd, transitionOpts, opts);\n};\n\n/**\n * trace/layout transition wrapper that works\n * for transitions initiated by Plotly.animate and Plotly.react.\n *\n * @param {DOM element} gd\n * @param {object} transitionOpts\n * @param {object} opts\n * - redraw {boolean}\n * - prepareFn {function} *should return a Promise*\n * - runFn {function} ran inside executeTransitions\n */\nfunction _transition(gd, transitionOpts, opts) {\n    var aborted = false;\n\n    function executeCallbacks(list) {\n        var p = Promise.resolve();\n        if(!list) return p;\n        while(list.length) {\n            p = p.then((list.shift()));\n        }\n        return p;\n    }\n\n    function flushCallbacks(list) {\n        if(!list) return;\n        while(list.length) {\n            list.shift();\n        }\n    }\n\n    function executeTransitions() {\n        gd.emit('plotly_transitioning', []);\n\n        return new Promise(function(resolve) {\n            // This flag is used to disabled things like autorange:\n            gd._transitioning = true;\n\n            // When instantaneous updates are coming through quickly, it's too much to simply disable\n            // all interaction, so store this flag so we can disambiguate whether mouse interactions\n            // should be fully disabled or not:\n            if(transitionOpts.duration > 0) {\n                gd._transitioningWithDuration = true;\n            }\n\n            // If another transition is triggered, this callback will be executed simply because it's\n            // in the interruptCallbacks queue. If this transition completes, it will instead flush\n            // that queue and forget about this callback.\n            gd._transitionData._interruptCallbacks.push(function() {\n                aborted = true;\n            });\n\n            if(opts.redraw) {\n                gd._transitionData._interruptCallbacks.push(function() {\n                    return Registry.call('redraw', gd);\n                });\n            }\n\n            // Emit this and make sure it happens last:\n            gd._transitionData._interruptCallbacks.push(function() {\n                gd.emit('plotly_transitioninterrupted', []);\n            });\n\n            // Construct callbacks that are executed on transition end. This ensures the d3 transitions\n            // are *complete* before anything else is done.\n            var numCallbacks = 0;\n            var numCompleted = 0;\n            function makeCallback() {\n                numCallbacks++;\n                return function() {\n                    numCompleted++;\n                    // When all are complete, perform a redraw:\n                    if(!aborted && numCompleted === numCallbacks) {\n                        completeTransition(resolve);\n                    }\n                };\n            }\n\n            opts.runFn(makeCallback);\n\n            // If nothing else creates a callback, then this will trigger the completion in the next tick:\n            setTimeout(makeCallback());\n        });\n    }\n\n    function completeTransition(callback) {\n        // This a simple workaround for tests which purge the graph before animations\n        // have completed. That's not a very common case, so this is the simplest\n        // fix.\n        if(!gd._transitionData) return;\n\n        flushCallbacks(gd._transitionData._interruptCallbacks);\n\n        return Promise.resolve().then(function() {\n            if(opts.redraw) {\n                return Registry.call('redraw', gd);\n            }\n        }).then(function() {\n            // Set transitioning false again once the redraw has occurred. This is used, for example,\n            // to prevent the trailing redraw from autoranging:\n            gd._transitioning = false;\n            gd._transitioningWithDuration = false;\n\n            gd.emit('plotly_transitioned', []);\n        }).then(callback);\n    }\n\n    function interruptPreviousTransitions() {\n        // Fail-safe against purged plot:\n        if(!gd._transitionData) return;\n\n        // If a transition is interrupted, set this to false. At the moment, the only thing that would\n        // interrupt a transition is another transition, so that it will momentarily be set to true\n        // again, but this determines whether autorange or dragbox work, so it's for the sake of\n        // cleanliness:\n        gd._transitioning = false;\n\n        return executeCallbacks(gd._transitionData._interruptCallbacks);\n    }\n\n    var seq = [\n        plots.previousPromises,\n        interruptPreviousTransitions,\n        opts.prepareFn,\n        plots.rehover,\n        executeTransitions\n    ];\n\n    var transitionStarting = Lib.syncOrAsync(seq, gd);\n\n    if(!transitionStarting || !transitionStarting.then) {\n        transitionStarting = Promise.resolve();\n    }\n\n    return transitionStarting.then(function() { return gd; });\n}\n\nplots.doCalcdata = function(gd, traces) {\n    var axList = axisIDs.list(gd);\n    var fullData = gd._fullData;\n    var fullLayout = gd._fullLayout;\n\n    var trace, _module, i, j;\n\n    // XXX: Is this correct? Needs a closer look so that *some* traces can be recomputed without\n    // *all* needing doCalcdata:\n    var calcdata = new Array(fullData.length);\n    var oldCalcdata = (gd.calcdata || []).slice(0);\n    gd.calcdata = calcdata;\n\n    // extra helper variables\n\n    // how many box/violins plots do we have (in case they're grouped)\n    fullLayout._numBoxes = 0;\n    fullLayout._numViolins = 0;\n\n    // initialize violin per-scale-group stats container\n    fullLayout._violinScaleGroupStats = {};\n\n    // for calculating avg luminosity of heatmaps\n    gd._hmpixcount = 0;\n    gd._hmlumcount = 0;\n\n    // for sharing colors across pies / sunbursts / funnelarea (and for legend)\n    fullLayout._piecolormap = {};\n    fullLayout._sunburstcolormap = {};\n    fullLayout._funnelareacolormap = {};\n\n    // If traces were specified and this trace was not included,\n    // then transfer it over from the old calcdata:\n    for(i = 0; i < fullData.length; i++) {\n        if(Array.isArray(traces) && traces.indexOf(i) === -1) {\n            calcdata[i] = oldCalcdata[i];\n            continue;\n        }\n    }\n\n    for(i = 0; i < fullData.length; i++) {\n        trace = fullData[i];\n\n        trace._arrayAttrs = PlotSchema.findArrayAttributes(trace);\n\n        // keep track of trace extremes (for autorange) in here\n        trace._extremes = {};\n    }\n\n    // add polar axes to axis list\n    var polarIds = fullLayout._subplots.polar || [];\n    for(i = 0; i < polarIds.length; i++) {\n        axList.push(\n            fullLayout[polarIds[i]].radialaxis,\n            fullLayout[polarIds[i]].angularaxis\n        );\n    }\n\n    var hasCalcTransform = false;\n\n    function transformCalci(i) {\n        trace = fullData[i];\n        _module = trace._module;\n\n        if(trace.visible === true && trace.transforms) {\n            // we need one round of trace module calc before\n            // the calc transform to 'fill in' the categories list\n            // used for example in the data-to-coordinate method\n            if(_module && _module.calc) {\n                var cdi = _module.calc(gd, trace);\n\n                // must clear scene 'batches', so that 2nd\n                // _module.calc call starts from scratch\n                if(cdi[0] && cdi[0].t && cdi[0].t._scene) {\n                    delete cdi[0].t._scene.dirty;\n                }\n            }\n\n            for(j = 0; j < trace.transforms.length; j++) {\n                var transform = trace.transforms[j];\n\n                _module = transformsRegistry[transform.type];\n                if(_module && _module.calcTransform) {\n                    trace._hasCalcTransform = true;\n                    hasCalcTransform = true;\n                    _module.calcTransform(gd, trace, transform);\n                }\n            }\n        }\n    }\n\n    function calci(i, isContainer) {\n        trace = fullData[i];\n        _module = trace._module;\n\n        if(!!_module.isContainer !== isContainer) return;\n\n        var cd = [];\n\n        if(trace.visible === true && trace._length !== 0) {\n            // clear existing ref in case it got relinked\n            delete trace._indexToPoints;\n            // keep ref of index-to-points map object of the *last* enabled transform,\n            // this index-to-points map object is required to determine the calcdata indices\n            // that correspond to input indices (e.g. from 'selectedpoints')\n            var transforms = trace.transforms || [];\n            for(j = transforms.length - 1; j >= 0; j--) {\n                if(transforms[j].enabled) {\n                    trace._indexToPoints = transforms[j]._indexToPoints;\n                    break;\n                }\n            }\n\n            if(_module && _module.calc) {\n                cd = _module.calc(gd, trace);\n            }\n        }\n\n        // Make sure there is a first point.\n        //\n        // This ensures there is a calcdata item for every trace,\n        // even if cartesian logic doesn't handle it (for things like legends).\n        if(!Array.isArray(cd) || !cd[0]) {\n            cd = [{x: BADNUM, y: BADNUM}];\n        }\n\n        // add the trace-wide properties to the first point,\n        // per point properties to every point\n        // t is the holder for trace-wide properties\n        if(!cd[0].t) cd[0].t = {};\n        cd[0].trace = trace;\n\n        calcdata[i] = cd;\n    }\n\n    setupAxisCategories(axList, fullData);\n\n    // 'transform' loop - must calc container traces first\n    // so that if their dependent traces can get transform properly\n    for(i = 0; i < fullData.length; i++) calci(i, true);\n    for(i = 0; i < fullData.length; i++) transformCalci(i);\n\n    // clear stuff that should recomputed in 'regular' loop\n    if(hasCalcTransform) setupAxisCategories(axList, fullData);\n\n    // 'regular' loop - make sure container traces (eg carpet) calc before\n    // contained traces (eg contourcarpet)\n    for(i = 0; i < fullData.length; i++) calci(i, true);\n    for(i = 0; i < fullData.length; i++) calci(i, false);\n\n    doCrossTraceCalc(gd);\n\n    // Sort axis categories per value if specified\n    var sorted = sortAxisCategoriesByValue(axList, gd);\n    if(sorted.length) {\n        // If a sort operation was performed, run calc() again\n        for(i = 0; i < sorted.length; i++) calci(sorted[i], true);\n        for(i = 0; i < sorted.length; i++) calci(sorted[i], false);\n        doCrossTraceCalc(gd);\n    }\n\n    Registry.getComponentMethod('fx', 'calc')(gd);\n    Registry.getComponentMethod('errorbars', 'calc')(gd);\n};\n\nvar sortAxisCategoriesByValueRegex = /(total|sum|min|max|mean|median) (ascending|descending)/;\n\nfunction sortAxisCategoriesByValue(axList, gd) {\n    var affectedTraces = [];\n    var i, j, k, l, o;\n\n    function zMapCategory(type, ax, value) {\n        var axLetter = ax._id.charAt(0);\n        if(type === 'histogram2dcontour') {\n            var counterAxLetter = ax._counterAxes[0];\n            var counterAx = axisIDs.getFromId(gd, counterAxLetter);\n\n            var xCategorical = axLetter === 'x' || (counterAxLetter === 'x' && counterAx.type === 'category');\n            var yCategorical = axLetter === 'y' || (counterAxLetter === 'y' && counterAx.type === 'category');\n\n            return function(o, l) {\n                if(o === 0 || l === 0) return -1; // Skip first row and column\n                if(xCategorical && o === value[l].length - 1) return -1;\n                if(yCategorical && l === value.length - 1) return -1;\n\n                return (axLetter === 'y' ? l : o) - 1;\n            };\n        } else {\n            return function(o, l) {\n                return axLetter === 'y' ? l : o;\n            };\n        }\n    }\n\n    var aggFn = {\n        'min': function(values) {return Lib.aggNums(Math.min, null, values);},\n        'max': function(values) {return Lib.aggNums(Math.max, null, values);},\n        'sum': function(values) {return Lib.aggNums(function(a, b) { return a + b;}, null, values);},\n        'total': function(values) {return Lib.aggNums(function(a, b) { return a + b;}, null, values);},\n        'mean': function(values) {return Lib.mean(values);},\n        'median': function(values) {return Lib.median(values);}\n    };\n\n    for(i = 0; i < axList.length; i++) {\n        var ax = axList[i];\n        if(ax.type !== 'category') continue;\n\n        // Order by value\n        var match = ax.categoryorder.match(sortAxisCategoriesByValueRegex);\n        if(match) {\n            var aggregator = match[1];\n            var order = match[2];\n\n            // Store values associated with each category\n            var categoriesValue = [];\n            for(j = 0; j < ax._categories.length; j++) {\n                categoriesValue.push([ax._categories[j], []]);\n            }\n\n            // Collect values across traces\n            for(j = 0; j < ax._traceIndices.length; j++) {\n                var traceIndex = ax._traceIndices[j];\n                var fullTrace = gd._fullData[traceIndex];\n                var axLetter = ax._id.charAt(0);\n\n                // Skip over invisible traces\n                if(fullTrace.visible !== true) continue;\n\n                var type = fullTrace.type;\n                if(Registry.traceIs(fullTrace, 'histogram')) {\n                    delete fullTrace._xautoBinFinished;\n                    delete fullTrace._yautoBinFinished;\n                }\n\n                var cd = gd.calcdata[traceIndex];\n                for(k = 0; k < cd.length; k++) {\n                    var cdi = cd[k];\n                    var cat, catIndex, value;\n\n                    if(type === 'splom') {\n                        // If `splom`, collect values across dimensions\n                        // Find which dimension the current axis is representing\n                        var currentDimensionIndex = fullTrace._axesDim[ax._id];\n\n                        // Apply logic to associated x axis if it's defined\n                        if(axLetter === 'y') {\n                            var associatedXAxisID = fullTrace._diag[currentDimensionIndex][0];\n                            if(associatedXAxisID) ax = gd._fullLayout[axisIDs.id2name(associatedXAxisID)];\n                        }\n\n                        var categories = cdi.trace.dimensions[currentDimensionIndex].values;\n                        for(l = 0; l < categories.length; l++) {\n                            cat = categories[l];\n                            catIndex = ax._categoriesMap[cat];\n\n                            // Collect associated values at index `l` over all other dimensions\n                            for(o = 0; o < cdi.trace.dimensions.length; o++) {\n                                if(o === currentDimensionIndex) continue;\n                                var dimension = cdi.trace.dimensions[o];\n                                categoriesValue[catIndex][1].push(dimension.values[l]);\n                            }\n                        }\n                    } else if(type === 'scattergl') {\n                        // If `scattergl`, collect all values stashed under cdi.t\n                        for(l = 0; l < cdi.t.x.length; l++) {\n                            if(axLetter === 'x') {\n                                cat = cdi.t.x[l];\n                                catIndex = cat;\n                                value = cdi.t.y[l];\n                            }\n\n                            if(axLetter === 'y') {\n                                cat = cdi.t.y[l];\n                                catIndex = cat;\n                                value = cdi.t.x[l];\n                            }\n                            categoriesValue[catIndex][1].push(value);\n                        }\n                        // must clear scene 'batches', so that 2nd\n                        // _module.calc call starts from scratch\n                        if(cdi.t && cdi.t._scene) {\n                            delete cdi.t._scene.dirty;\n                        }\n                    } else if(cdi.hasOwnProperty('z')) {\n                        // If 2dMap, collect values in `z`\n                        value = cdi.z;\n                        var mapping = zMapCategory(fullTrace.type, ax, value);\n\n                        for(l = 0; l < value.length; l++) {\n                            for(o = 0; o < value[l].length; o++) {\n                                catIndex = mapping(o, l);\n                                if(catIndex + 1) categoriesValue[catIndex][1].push(value[l][o]);\n                            }\n                        }\n                    } else {\n                        // For all other 2d cartesian traces\n                        if(axLetter === 'x') {\n                            cat = cdi.p + 1 ? cdi.p : cdi.x;\n                            value = cdi.s || cdi.v || cdi.y;\n                        } else if(axLetter === 'y') {\n                            cat = cdi.p + 1 ? cdi.p : cdi.y;\n                            value = cdi.s || cdi.v || cdi.x;\n                        }\n                        if(!Array.isArray(value)) value = [value];\n                        for(l = 0; l < value.length; l++) {\n                            categoriesValue[cat][1].push(value[l]);\n                        }\n                    }\n                }\n            }\n\n            ax._categoriesValue = categoriesValue;\n\n            var categoriesAggregatedValue = [];\n            for(j = 0; j < categoriesValue.length; j++) {\n                categoriesAggregatedValue.push([\n                    categoriesValue[j][0],\n                    aggFn[aggregator](categoriesValue[j][1])\n                ]);\n            }\n\n            // Sort by aggregated value\n            categoriesAggregatedValue.sort(function(a, b) {\n                return a[1] - b[1];\n            });\n\n            ax._categoriesAggregatedValue = categoriesAggregatedValue;\n\n            // Set new category order\n            ax._initialCategories = categoriesAggregatedValue.map(function(c) {\n                return c[0];\n            });\n\n            // Reverse if descending\n            if(order === 'descending') {\n                ax._initialCategories.reverse();\n            }\n\n            // Sort all matching axes\n            affectedTraces = affectedTraces.concat(ax.sortByInitialCategories());\n        }\n    }\n    return affectedTraces;\n}\n\nfunction setupAxisCategories(axList, fullData) {\n    for(var i = 0; i < axList.length; i++) {\n        var ax = axList[i];\n        ax.clearCalc();\n        if(ax.type === 'multicategory') {\n            ax.setupMultiCategory(fullData);\n        }\n    }\n}\n\nfunction doCrossTraceCalc(gd) {\n    var fullLayout = gd._fullLayout;\n    var modules = fullLayout._visibleModules;\n    var hash = {};\n    var i, j, k;\n\n    // position and range calculations for traces that\n    // depend on each other ie bars (stacked or grouped)\n    // and boxes (grouped) push each other out of the way\n\n    for(j = 0; j < modules.length; j++) {\n        var _module = modules[j];\n        var fn = _module.crossTraceCalc;\n        if(fn) {\n            var spType = _module.basePlotModule.name;\n            if(hash[spType]) {\n                Lib.pushUnique(hash[spType], fn);\n            } else {\n                hash[spType] = [fn];\n            }\n        }\n    }\n\n    for(k in hash) {\n        var methods = hash[k];\n        var subplots = fullLayout._subplots[k];\n\n        if(Array.isArray(subplots)) {\n            for(i = 0; i < subplots.length; i++) {\n                var sp = subplots[i];\n                var spInfo = k === 'cartesian' ?\n                    fullLayout._plots[sp] :\n                    fullLayout[sp];\n\n                for(j = 0; j < methods.length; j++) {\n                    methods[j](gd, spInfo, sp);\n                }\n            }\n        } else {\n            for(j = 0; j < methods.length; j++) {\n                methods[j](gd);\n            }\n        }\n    }\n}\n\nplots.rehover = function(gd) {\n    if(gd._fullLayout._rehover) {\n        gd._fullLayout._rehover();\n    }\n};\n\nplots.redrag = function(gd) {\n    if(gd._fullLayout._redrag) {\n        gd._fullLayout._redrag();\n    }\n};\n\nplots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {\n    var traceHashOld = subplot.traceHash;\n    var traceHash = {};\n    var i;\n\n    // build up moduleName -> calcData hash\n    for(i = 0; i < subplotCalcData.length; i++) {\n        var calcTraces = subplotCalcData[i];\n        var trace = calcTraces[0].trace;\n\n        // skip over visible === false traces\n        // as they don't have `_module` ref\n        if(trace.visible) {\n            traceHash[trace.type] = traceHash[trace.type] || [];\n            traceHash[trace.type].push(calcTraces);\n        }\n    }\n\n    // when a trace gets deleted, make sure that its module's\n    // plot method is called so that it is properly\n    // removed from the DOM.\n    for(var moduleNameOld in traceHashOld) {\n        if(!traceHash[moduleNameOld]) {\n            var fakeCalcTrace = traceHashOld[moduleNameOld][0];\n            var fakeTrace = fakeCalcTrace[0].trace;\n\n            fakeTrace.visible = false;\n            traceHash[moduleNameOld] = [fakeCalcTrace];\n        }\n    }\n\n    // call module plot method\n    for(var moduleName in traceHash) {\n        var moduleCalcData = traceHash[moduleName];\n        var _module = moduleCalcData[0][0].trace._module;\n\n        _module.plot(gd, subplot, Lib.filterVisible(moduleCalcData), subplotLayout);\n    }\n\n    // update moduleName -> calcData hash\n    subplot.traceHash = traceHash;\n};\n\n},{\"../components/color\":580,\"../constants/numerical\":680,\"../lib\":703,\"../plot_api/plot_schema\":740,\"../plot_api/plot_template\":741,\"../registry\":831,\"./animation_attributes\":746,\"./attributes\":748,\"./cartesian/axis_ids\":754,\"./command\":775,\"./font_attributes\":777,\"./frame_attributes\":778,\"./layout_attributes\":803,\"d3\":157,\"fast-isnumeric\":224}],813:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attr: 'subplot',\n    name: 'polar',\n\n    axisNames: ['angularaxis', 'radialaxis'],\n    axisName2dataArray: {angularaxis: 'theta', radialaxis: 'r'},\n\n    layerNames: [\n        'draglayer',\n        'plotbg',\n        'backplot',\n        'angular-grid',\n        'radial-grid',\n        'frontplot',\n        'angular-line',\n        'radial-line',\n        'angular-axis',\n        'radial-axis'\n    ],\n\n    radialDragBoxSize: 50,\n    angularDragBoxSize: 30,\n    cornerLen: 25,\n    cornerHalfWidth: 2,\n\n    // pixels to move mouse before you stop clamping to starting point\n    MINDRAG: 8,\n    // smallest radial distance [px] allowed for a zoombox\n    MINZOOM: 20,\n    // distance [px] off (r=0) or (r=radius) where we transition\n    // from single-sided to two-sided radial zoom\n    OFFEDGE: 20\n};\n\n},{}],814:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar polygonTester = _dereq_('../../lib/polygon').tester;\n\nvar findIndexOfMin = Lib.findIndexOfMin;\nvar isAngleInsideSector = Lib.isAngleInsideSector;\nvar angleDelta = Lib.angleDelta;\nvar angleDist = Lib.angleDist;\n\n/**\n * is pt (r,a) inside polygon made up vertices at angles 'vangles'\n * inside a given polar sector\n *\n * @param {number} r : pt's radial coordinate\n * @param {number} a : pt's angular coordinate in *radians*\n * @param {2-item array} rBnds : sector's radial bounds\n * @param {2-item array} aBnds : sector's angular bounds *radians*\n * @param {array} vangles : angles of polygon vertices in *radians*\n * @return {boolean}\n */\nfunction isPtInsidePolygon(r, a, rBnds, aBnds, vangles) {\n    if(!isAngleInsideSector(a, aBnds)) return false;\n\n    var r0, r1;\n\n    if(rBnds[0] < rBnds[1]) {\n        r0 = rBnds[0];\n        r1 = rBnds[1];\n    } else {\n        r0 = rBnds[1];\n        r1 = rBnds[0];\n    }\n\n    var polygonIn = polygonTester(makePolygon(r0, aBnds[0], aBnds[1], vangles));\n    var polygonOut = polygonTester(makePolygon(r1, aBnds[0], aBnds[1], vangles));\n    var xy = [r * Math.cos(a), r * Math.sin(a)];\n    return polygonOut.contains(xy) && !polygonIn.contains(xy);\n}\n\n// find intersection of 'v0' <-> 'v1' edge with a ray at angle 'a'\n// (i.e. a line that starts from the origin at angle 'a')\n// given an (xp,yp) pair on the 'v0' <-> 'v1' line\n// (N.B. 'v0' and 'v1' are angles in radians)\nfunction findIntersectionXY(v0, v1, a, xpyp) {\n    var xstar, ystar;\n\n    var xp = xpyp[0];\n    var yp = xpyp[1];\n    var dsin = clampTiny(Math.sin(v1) - Math.sin(v0));\n    var dcos = clampTiny(Math.cos(v1) - Math.cos(v0));\n    var tanA = Math.tan(a);\n    var cotanA = clampTiny(1 / tanA);\n    var m = dsin / dcos;\n    var b = yp - m * xp;\n\n    if(cotanA) {\n        if(dsin && dcos) {\n            // given\n            //  g(x) := v0 -> v1 line = m*x + b\n            //  h(x) := ray at angle 'a' = m*x = tanA*x\n            // solve g(xstar) = h(xstar)\n            xstar = b / (tanA - m);\n            ystar = tanA * xstar;\n        } else if(dcos) {\n            // horizontal v0 -> v1\n            xstar = yp * cotanA;\n            ystar = yp;\n        } else {\n            // vertical v0 -> v1\n            xstar = xp;\n            ystar = xp * tanA;\n        }\n    } else {\n        // vertical ray\n        if(dsin && dcos) {\n            xstar = 0;\n            ystar = b;\n        } else if(dcos) {\n            xstar = 0;\n            ystar = yp;\n        } else {\n            // does this case exists?\n            xstar = ystar = NaN;\n        }\n    }\n\n    return [xstar, ystar];\n}\n\n// solves l^2 = (f(x)^2 - yp)^2 + (x - xp)^2\n// rearranged into 0 = a*x^2 + b * x + c\n//\n// where f(x) = m*x + t + yp\n// and   (x0, x1) = (-b +/- del) / (2*a)\nfunction findXYatLength(l, m, xp, yp) {\n    var t = -m * xp;\n    var a = m * m + 1;\n    var b = 2 * (m * t - xp);\n    var c = t * t + xp * xp - l * l;\n    var del = Math.sqrt(b * b - 4 * a * c);\n    var x0 = (-b + del) / (2 * a);\n    var x1 = (-b - del) / (2 * a);\n    return [\n        [x0, m * x0 + t + yp],\n        [x1, m * x1 + t + yp]\n    ];\n}\n\nfunction makeRegularPolygon(r, vangles) {\n    var len = vangles.length;\n    var vertices = new Array(len + 1);\n    var i;\n    for(i = 0; i < len; i++) {\n        var va = vangles[i];\n        vertices[i] = [r * Math.cos(va), r * Math.sin(va)];\n    }\n    vertices[i] = vertices[0].slice();\n    return vertices;\n}\n\nfunction makeClippedPolygon(r, a0, a1, vangles) {\n    var len = vangles.length;\n    var vertices = [];\n    var i, j;\n\n    function a2xy(a) {\n        return [r * Math.cos(a), r * Math.sin(a)];\n    }\n\n    function findXY(va0, va1, s) {\n        return findIntersectionXY(va0, va1, s, a2xy(va0));\n    }\n\n    function cycleIndex(ind) {\n        return Lib.mod(ind, len);\n    }\n\n    function isInside(v) {\n        return isAngleInsideSector(v, [a0, a1]);\n    }\n\n    // find index in sector closest to a0\n    // use it to find intersection of v[i0] <-> v[i0-1] edge with sector radius\n    var i0 = findIndexOfMin(vangles, function(v) {\n        return isInside(v) ? angleDist(v, a0) : Infinity;\n    });\n    var xy0 = findXY(vangles[i0], vangles[cycleIndex(i0 - 1)], a0);\n    vertices.push(xy0);\n\n    // fill in in-sector vertices\n    for(i = i0, j = 0; j < len; i++, j++) {\n        var va = vangles[cycleIndex(i)];\n        if(!isInside(va)) break;\n        vertices.push(a2xy(va));\n    }\n\n    // find index in sector closest to a1,\n    // use it to find intersection of v[iN] <-> v[iN+1] edge with sector radius\n    var iN = findIndexOfMin(vangles, function(v) {\n        return isInside(v) ? angleDist(v, a1) : Infinity;\n    });\n    var xyN = findXY(vangles[iN], vangles[cycleIndex(iN + 1)], a1);\n    vertices.push(xyN);\n\n    vertices.push([0, 0]);\n    vertices.push(vertices[0].slice());\n\n    return vertices;\n}\n\nfunction makePolygon(r, a0, a1, vangles) {\n    return Lib.isFullCircle([a0, a1]) ?\n        makeRegularPolygon(r, vangles) :\n        makeClippedPolygon(r, a0, a1, vangles);\n}\n\nfunction findPolygonOffset(r, a0, a1, vangles) {\n    var minX = Infinity;\n    var minY = Infinity;\n    var vertices = makePolygon(r, a0, a1, vangles);\n\n    for(var i = 0; i < vertices.length; i++) {\n        var v = vertices[i];\n        minX = Math.min(minX, v[0]);\n        minY = Math.min(minY, -v[1]);\n    }\n    return [minX, minY];\n}\n\n/**\n * find vertex angles (in 'vangles') the enclose angle 'a'\n *\n * @param {number} a : angle in *radians*\n * @param {array} vangles : angles of polygon vertices in *radians*\n * @return {2-item array}\n */\nfunction findEnclosingVertexAngles(a, vangles) {\n    var minFn = function(v) {\n        var adelta = angleDelta(v, a);\n        return adelta > 0 ? adelta : Infinity;\n    };\n    var i0 = findIndexOfMin(vangles, minFn);\n    var i1 = Lib.mod(i0 + 1, vangles.length);\n    return [vangles[i0], vangles[i1]];\n}\n\n// to more easily catch 'almost zero' numbers in if-else blocks\nfunction clampTiny(v) {\n    return Math.abs(v) > 1e-10 ? v : 0;\n}\n\nfunction transformForSVG(pts0, cx, cy) {\n    cx = cx || 0;\n    cy = cy || 0;\n\n    var len = pts0.length;\n    var pts1 = new Array(len);\n\n    for(var i = 0; i < len; i++) {\n        var pt = pts0[i];\n        pts1[i] = [cx + pt[0], cy - pt[1]];\n    }\n    return pts1;\n}\n\n/**\n * path polygon\n *\n * @param {number} r : polygon 'radius'\n * @param {number} a0 : first angular coordinate in *radians*\n * @param {number} a1 : second angular coordinate in *radians*\n * @param {array} vangles : angles of polygon vertices in *radians*\n * @param {number (optional)} cx : x coordinate of center\n * @param {number (optional)} cy : y coordinate of center\n * @return {string} svg path\n *\n */\nfunction pathPolygon(r, a0, a1, vangles, cx, cy) {\n    var poly = makePolygon(r, a0, a1, vangles);\n    return 'M' + transformForSVG(poly, cx, cy).join('L');\n}\n\n/**\n * path a polygon 'annulus'\n * i.e. a polygon with a concentric hole\n *\n * N.B. this routine uses the evenodd SVG rule\n *\n * @param {number} r0 : first radial coordinate\n * @param {number} r1 : second radial coordinate\n * @param {number} a0 : first angular coordinate in *radians*\n * @param {number} a1 : second angular coordinate in *radians*\n * @param {array} vangles : angles of polygon vertices in *radians*\n * @param {number (optional)} cx : x coordinate of center\n * @param {number (optional)} cy : y coordinate of center\n * @return {string} svg path\n *\n */\nfunction pathPolygonAnnulus(r0, r1, a0, a1, vangles, cx, cy) {\n    var rStart, rEnd;\n\n    if(r0 < r1) {\n        rStart = r0;\n        rEnd = r1;\n    } else {\n        rStart = r1;\n        rEnd = r0;\n    }\n\n    var inner = transformForSVG(makePolygon(rStart, a0, a1, vangles), cx, cy);\n    var outer = transformForSVG(makePolygon(rEnd, a0, a1, vangles), cx, cy);\n    return 'M' + outer.reverse().join('L') + 'M' + inner.join('L');\n}\n\nmodule.exports = {\n    isPtInsidePolygon: isPtInsidePolygon,\n    findPolygonOffset: findPolygonOffset,\n    findEnclosingVertexAngles: findEnclosingVertexAngles,\n    findIntersectionXY: findIntersectionXY,\n    findXYatLength: findXYatLength,\n    clampTiny: clampTiny,\n    pathPolygon: pathPolygon,\n    pathPolygonAnnulus: pathPolygonAnnulus\n};\n\n},{\"../../lib\":703,\"../../lib/polygon\":715}],815:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar getSubplotCalcData = _dereq_('../get_data').getSubplotCalcData;\nvar counterRegex = _dereq_('../../lib').counterRegex;\n\nvar createPolar = _dereq_('./polar');\nvar constants = _dereq_('./constants');\n\nvar attr = constants.attr;\nvar name = constants.name;\nvar counter = counterRegex(name);\n\nvar attributes = {};\nattributes[attr] = {\n    valType: 'subplotid',\n    \n    dflt: name,\n    editType: 'calc',\n    \n};\n\nfunction plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcData = gd.calcdata;\n    var subplotIds = fullLayout._subplots[name];\n\n    for(var i = 0; i < subplotIds.length; i++) {\n        var id = subplotIds[i];\n        var subplotCalcData = getSubplotCalcData(calcData, name, id);\n        var subplot = fullLayout[id]._subplot;\n\n        if(!subplot) {\n            subplot = createPolar(gd, id);\n            fullLayout[id]._subplot = subplot;\n        }\n\n        subplot.plot(subplotCalcData, fullLayout, gd._promises);\n    }\n}\n\nfunction clean(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldIds = oldFullLayout._subplots[name] || [];\n    var hadGl = (oldFullLayout._has && oldFullLayout._has('gl'));\n    var hasGl = (newFullLayout._has && newFullLayout._has('gl'));\n    var mustCleanScene = hadGl && !hasGl;\n\n    for(var i = 0; i < oldIds.length; i++) {\n        var id = oldIds[i];\n        var oldSubplot = oldFullLayout[id]._subplot;\n\n        if(!newFullLayout[id] && !!oldSubplot) {\n            oldSubplot.framework.remove();\n            oldSubplot.layers['radial-axis-title'].remove();\n\n            for(var k in oldSubplot.clipPaths) {\n                oldSubplot.clipPaths[k].remove();\n            }\n        }\n\n        if(mustCleanScene && oldSubplot._scene) {\n            oldSubplot._scene.destroy();\n            oldSubplot._scene = null;\n        }\n    }\n}\n\nmodule.exports = {\n    attr: attr,\n    name: name,\n    idRoot: name,\n    idRegex: counter,\n    attrRegex: counter,\n    attributes: attributes,\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    plot: plot,\n    clean: clean,\n    toSVG: _dereq_('../cartesian').toSVG\n};\n\n},{\"../../lib\":703,\"../cartesian\":762,\"../get_data\":786,\"./constants\":813,\"./layout_attributes\":816,\"./layout_defaults\":817,\"./polar\":824}],816:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar axesAttrs = _dereq_('../cartesian/layout_attributes');\nvar domainAttrs = _dereq_('../domain').attributes;\nvar extendFlat = _dereq_('../../lib').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar axisLineGridAttr = overrideAll({\n    color: axesAttrs.color,\n    showline: extendFlat({}, axesAttrs.showline, {dflt: true}),\n    linecolor: axesAttrs.linecolor,\n    linewidth: axesAttrs.linewidth,\n    showgrid: extendFlat({}, axesAttrs.showgrid, {dflt: true}),\n    gridcolor: axesAttrs.gridcolor,\n    gridwidth: axesAttrs.gridwidth\n\n    // TODO add spike* attributes down the road\n\n    // should we add zeroline* attributes?\n\n}, 'plot', 'from-root');\n\nvar axisTickAttrs = overrideAll({\n    tickmode: axesAttrs.tickmode,\n    nticks: axesAttrs.nticks,\n    tick0: axesAttrs.tick0,\n    dtick: axesAttrs.dtick,\n    tickvals: axesAttrs.tickvals,\n    ticktext: axesAttrs.ticktext,\n    ticks: axesAttrs.ticks,\n    ticklen: axesAttrs.ticklen,\n    tickwidth: axesAttrs.tickwidth,\n    tickcolor: axesAttrs.tickcolor,\n    showticklabels: axesAttrs.showticklabels,\n    showtickprefix: axesAttrs.showtickprefix,\n    tickprefix: axesAttrs.tickprefix,\n    showticksuffix: axesAttrs.showticksuffix,\n    ticksuffix: axesAttrs.ticksuffix,\n    showexponent: axesAttrs.showexponent,\n    exponentformat: axesAttrs.exponentformat,\n    separatethousands: axesAttrs.separatethousands,\n    tickfont: axesAttrs.tickfont,\n    tickangle: axesAttrs.tickangle,\n    tickformat: axesAttrs.tickformat,\n    tickformatstops: axesAttrs.tickformatstops,\n    layer: axesAttrs.layer\n}, 'plot', 'from-root');\n\nvar radialAxisAttrs = {\n    visible: extendFlat({}, axesAttrs.visible, {dflt: true}),\n    type: extendFlat({}, axesAttrs.type, {\n        values: ['-', 'linear', 'log', 'date', 'category']\n    }),\n\n    autorange: extendFlat({}, axesAttrs.autorange, {editType: 'plot'}),\n    rangemode: {\n        valType: 'enumerated',\n        values: ['tozero', 'nonnegative', 'normal'],\n        dflt: 'tozero',\n        \n        editType: 'calc',\n        \n    },\n    range: extendFlat({}, axesAttrs.range, {\n        items: [\n            {valType: 'any', editType: 'plot', impliedEdits: {'^autorange': false}},\n            {valType: 'any', editType: 'plot', impliedEdits: {'^autorange': false}}\n        ],\n        editType: 'plot'\n    }),\n\n    categoryorder: axesAttrs.categoryorder,\n    categoryarray: axesAttrs.categoryarray,\n\n    angle: {\n        valType: 'angle',\n        editType: 'plot',\n        \n        \n    },\n\n    side: {\n        valType: 'enumerated',\n        // TODO add 'center' for `showline: false` radial axes\n        values: ['clockwise', 'counterclockwise'],\n        dflt: 'clockwise',\n        editType: 'plot',\n        \n        \n    },\n\n\n    title: overrideAll(axesAttrs.title, 'plot', 'from-root'),\n    // might need a 'titleside' and even 'titledirection' down the road\n\n    hoverformat: axesAttrs.hoverformat,\n\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n\n    editType: 'calc',\n\n    _deprecated: {\n        title: axesAttrs._deprecated.title,\n        titlefont: axesAttrs._deprecated.titlefont\n    }\n};\n\n// radial title is not gui-editable, so it needs dflt: '', similar to carpet axes.\nradialAxisAttrs.title.text.dflt = '';\n\nextendFlat(\n    radialAxisAttrs,\n\n    // N.B. radialaxis grid lines are circular,\n    // but radialaxis lines are straight from circle center to outer bound\n    axisLineGridAttr,\n    axisTickAttrs\n);\n\nvar angularAxisAttrs = {\n    visible: extendFlat({}, axesAttrs.visible, {dflt: true}),\n    type: {\n        valType: 'enumerated',\n        // 'linear' should maybe be called 'angle' or 'angular' here\n        // to make clear that axis here is periodic and more tightly match\n        // `thetaunit`?\n        //\n        // skip 'date' for first push\n        // no 'log' for now\n        values: ['-', 'linear', 'category'],\n        dflt: '-',\n        \n        editType: 'calc',\n        _noTemplating: true,\n        \n    },\n\n    categoryorder: axesAttrs.categoryorder,\n    categoryarray: axesAttrs.categoryarray,\n\n    thetaunit: {\n        valType: 'enumerated',\n        values: ['radians', 'degrees'],\n        dflt: 'degrees',\n        \n        editType: 'calc',\n        \n    },\n\n    period: {\n        valType: 'number',\n        editType: 'calc',\n        min: 0,\n        \n        \n        // Examples for date axes:\n        //\n        // - period that equals the timeseries length\n        //  http://flowingdata.com/2017/01/24/one-dataset-visualized-25-ways/18-polar-coordinates/\n        // - and 1-year periods (focusing on seasonal change0\n        //  http://otexts.org/fpp2/seasonal-plots.html\n        //  https://blogs.scientificamerican.com/sa-visual/why-are-so-many-babies-born-around-8-00-a-m/\n        //  http://www.seasonaladjustment.com/2012/09/05/clock-plot-visualising-seasonality-using-r-and-ggplot2-part-3/\n        //  https://i.pinimg.com/736x/49/b9/72/49b972ccb3206a1a6d6f870dac543280.jpg\n        //  https://www.climate-lab-book.ac.uk/spirals/\n    },\n\n    direction: {\n        valType: 'enumerated',\n        values: ['counterclockwise', 'clockwise'],\n        dflt: 'counterclockwise',\n        \n        editType: 'calc',\n        \n    },\n\n    rotation: {\n        valType: 'angle',\n        editType: 'calc',\n        \n        \n    },\n\n    hoverformat: axesAttrs.hoverformat,\n\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n\n    editType: 'calc'\n};\n\nextendFlat(\n    angularAxisAttrs,\n\n    // N.B. angular grid lines are straight lines from circle center to outer bound\n    // the angular line is circular bounding the polar plot area.\n    axisLineGridAttr,\n\n    // N.B. ticksuffix defaults to '°' for angular axes with `thetaunit: 'degrees'`\n    axisTickAttrs\n);\n\nmodule.exports = {\n    // TODO for x/y/zoom system for paper-based zooming:\n    // x: {},\n    // y: {},\n    // zoom: {},\n\n    domain: domainAttrs({name: 'polar', editType: 'plot'}),\n\n    sector: {\n        valType: 'info_array',\n        items: [\n            {valType: 'number', editType: 'plot'},\n            {valType: 'number', editType: 'plot'}\n        ],\n        dflt: [0, 360],\n        \n        editType: 'plot',\n        \n    },\n    hole: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0,\n        editType: 'plot',\n        \n        \n    },\n\n    bgcolor: {\n        valType: 'color',\n        \n        editType: 'plot',\n        dflt: colorAttrs.background,\n        \n    },\n\n    radialaxis: radialAxisAttrs,\n    angularaxis: angularAxisAttrs,\n\n    gridshape: {\n        valType: 'enumerated',\n        values: ['circular', 'linear'],\n        dflt: 'circular',\n        \n        editType: 'plot',\n        \n    },\n\n    // TODO maybe?\n    // annotations:\n\n    uirevision: {\n        valType: 'any',\n        \n        editType: 'none',\n        \n    },\n\n    editType: 'calc'\n};\n\n},{\"../../components/color/attributes\":579,\"../../lib\":703,\"../../plot_api/edit_types\":734,\"../cartesian/layout_attributes\":763,\"../domain\":776}],817:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nvar handleSubplotDefaults = _dereq_('../subplot_defaults');\nvar getSubplotData = _dereq_('../get_data').getSubplotData;\n\nvar handleTickValueDefaults = _dereq_('../cartesian/tick_value_defaults');\nvar handleTickMarkDefaults = _dereq_('../cartesian/tick_mark_defaults');\nvar handleTickLabelDefaults = _dereq_('../cartesian/tick_label_defaults');\nvar handleCategoryOrderDefaults = _dereq_('../cartesian/category_order_defaults');\nvar handleLineGridDefaults = _dereq_('../cartesian/line_grid_defaults');\nvar autoType = _dereq_('../cartesian/axis_autotype');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar setConvert = _dereq_('./set_convert');\nvar constants = _dereq_('./constants');\nvar axisNames = constants.axisNames;\n\nfunction handleDefaults(contIn, contOut, coerce, opts) {\n    var bgColor = coerce('bgcolor');\n    opts.bgColor = Color.combine(bgColor, opts.paper_bgcolor);\n\n    var sector = coerce('sector');\n    coerce('hole');\n\n    // could optimize, subplotData is not always needed!\n    var subplotData = getSubplotData(opts.fullData, constants.name, opts.id);\n    var layoutOut = opts.layoutOut;\n    var axName;\n\n    function coerceAxis(attr, dflt) {\n        return coerce(axName + '.' + attr, dflt);\n    }\n\n    for(var i = 0; i < axisNames.length; i++) {\n        axName = axisNames[i];\n\n        if(!Lib.isPlainObject(contIn[axName])) {\n            contIn[axName] = {};\n        }\n\n        var axIn = contIn[axName];\n        var axOut = Template.newContainer(contOut, axName);\n        axOut._id = axOut._name = axName;\n        axOut._attr = opts.id + '.' + axName;\n        axOut._traceIndices = subplotData.map(function(t) { return t._expandedIndex; });\n\n        var dataAttr = constants.axisName2dataArray[axName];\n        var axType = handleAxisTypeDefaults(axIn, axOut, coerceAxis, subplotData, dataAttr);\n\n        handleCategoryOrderDefaults(axIn, axOut, coerceAxis, {\n            axData: subplotData,\n            dataAttr: dataAttr\n        });\n\n        var visible = coerceAxis('visible');\n        setConvert(axOut, contOut, layoutOut);\n\n        coerceAxis('uirevision', contOut.uirevision);\n\n        var dfltColor;\n        var dfltFontColor;\n\n        if(visible) {\n            dfltColor = coerceAxis('color');\n            dfltFontColor = (dfltColor === axIn.color) ? dfltColor : opts.font.color;\n        }\n\n        // We don't want to make downstream code call ax.setScale,\n        // as both radial and angular axes don't have a set domain.\n        // Furthermore, angular axes don't have a set range.\n        //\n        // Mocked domains and ranges are set by the polar subplot instances,\n        // but Axes.findExtremes uses the sign of _m to determine which padding value\n        // to use.\n        //\n        // By setting, _m to 1 here, we make Axes.findExtremes think that\n        // range[1] > range[0], and vice-versa for `autorange: 'reversed'` below.\n        axOut._m = 1;\n\n        switch(axName) {\n            case 'radialaxis':\n                var autoRange = coerceAxis('autorange', !axOut.isValidRange(axIn.range));\n                axIn.autorange = autoRange;\n                if(autoRange && (axType === 'linear' || axType === '-')) coerceAxis('rangemode');\n                if(autoRange === 'reversed') axOut._m = -1;\n\n                coerceAxis('range');\n                axOut.cleanRange('range', {dfltRange: [0, 1]});\n\n                if(visible) {\n                    coerceAxis('side');\n                    coerceAxis('angle', sector[0]);\n\n                    coerceAxis('title.text');\n                    Lib.coerceFont(coerceAxis, 'title.font', {\n                        family: opts.font.family,\n                        size: Math.round(opts.font.size * 1.2),\n                        color: dfltFontColor\n                    });\n                }\n                break;\n\n            case 'angularaxis':\n                // We do not support 'true' date angular axes yet,\n                // users can still plot dates on angular axes by setting\n                // `angularaxis.type: 'category'`.\n                //\n                // Here, if a date angular axes is detected, we make\n                // all its corresponding traces invisible, so that\n                // when we do add support for data angular axes, the new\n                // behavior won't conflict with existing behavior\n                if(axType === 'date') {\n                    Lib.log('Polar plots do not support date angular axes yet.');\n\n                    for(var j = 0; j < subplotData.length; j++) {\n                        subplotData[j].visible = false;\n                    }\n\n                    // turn this into a 'dummy' linear axis so that\n                    // the subplot still renders ok\n                    axType = axIn.type = axOut.type = 'linear';\n                }\n\n                if(axType === 'linear') {\n                    coerceAxis('thetaunit');\n                } else {\n                    coerceAxis('period');\n                }\n\n                var direction = coerceAxis('direction');\n                coerceAxis('rotation', {counterclockwise: 0, clockwise: 90}[direction]);\n                break;\n        }\n\n        if(visible) {\n            handleTickValueDefaults(axIn, axOut, coerceAxis, axOut.type);\n            handleTickLabelDefaults(axIn, axOut, coerceAxis, axOut.type, {\n                tickSuffixDflt: axOut.thetaunit === 'degrees' ? '°' : undefined\n            });\n            handleTickMarkDefaults(axIn, axOut, coerceAxis, {outerTicks: true});\n\n            var showTickLabels = coerceAxis('showticklabels');\n            if(showTickLabels) {\n                Lib.coerceFont(coerceAxis, 'tickfont', {\n                    family: opts.font.family,\n                    size: opts.font.size,\n                    color: dfltFontColor\n                });\n                coerceAxis('tickangle');\n                coerceAxis('tickformat');\n            }\n\n            handleLineGridDefaults(axIn, axOut, coerceAxis, {\n                dfltColor: dfltColor,\n                bgColor: opts.bgColor,\n                // default grid color is darker here (60%, vs cartesian default ~91%)\n                // because the grid is not square so the eye needs heavier cues to follow\n                blend: 60,\n                showLine: true,\n                showGrid: true,\n                noZeroLine: true,\n                attributes: layoutAttributes[axName]\n            });\n\n            coerceAxis('layer');\n        }\n\n        if(axType !== 'category') coerceAxis('hoverformat');\n\n        axOut._input = axIn;\n    }\n\n    if(contOut.angularaxis.type === 'category') {\n        coerce('gridshape');\n    }\n}\n\nfunction handleAxisTypeDefaults(axIn, axOut, coerce, subplotData, dataAttr) {\n    var axType = coerce('type');\n\n    if(axType === '-') {\n        var trace;\n\n        for(var i = 0; i < subplotData.length; i++) {\n            if(subplotData[i].visible) {\n                trace = subplotData[i];\n                break;\n            }\n        }\n\n        if(trace && trace[dataAttr]) {\n            axOut.type = autoType(trace[dataAttr], 'gregorian');\n        }\n\n        if(axOut.type === '-') {\n            axOut.type = 'linear';\n        } else {\n            // copy autoType back to input axis\n            // note that if this object didn't exist\n            // in the input layout, we have to put it in\n            // this happens in the main supplyDefaults function\n            axIn.type = axOut.type;\n        }\n    }\n\n    return axOut.type;\n}\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    handleSubplotDefaults(layoutIn, layoutOut, fullData, {\n        type: constants.name,\n        attributes: layoutAttributes,\n        handleDefaults: handleDefaults,\n        font: layoutOut.font,\n        paper_bgcolor: layoutOut.paper_bgcolor,\n        fullData: fullData,\n        layoutOut: layoutOut\n    });\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../cartesian/axis_autotype\":752,\"../cartesian/category_order_defaults\":755,\"../cartesian/line_grid_defaults\":765,\"../cartesian/tick_label_defaults\":770,\"../cartesian/tick_mark_defaults\":771,\"../cartesian/tick_value_defaults\":772,\"../get_data\":786,\"../subplot_defaults\":826,\"./constants\":813,\"./layout_attributes\":816,\"./set_convert\":825}],818:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../../../traces/scatter/attributes');\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar extendFlat = _dereq_('../../../lib/extend').extendFlat;\n\nvar deprecationWarning = [\n    'Area traces are deprecated!',\n    'Please switch to the *barpolar* trace type.'\n].join(' ');\n\nmodule.exports = {\n    r: extendFlat({}, scatterAttrs.r, {\n        \n    }),\n    t: extendFlat({}, scatterAttrs.t, {\n        \n    }),\n    marker: {\n        color: extendFlat({}, scatterMarkerAttrs.color, {\n            \n        }),\n        size: extendFlat({}, scatterMarkerAttrs.size, {\n            \n        }),\n        symbol: extendFlat({}, scatterMarkerAttrs.symbol, {\n            \n        }),\n        opacity: extendFlat({}, scatterMarkerAttrs.opacity, {\n            \n        }),\n        editType: 'calc'\n    }\n};\n\n},{\"../../../lib/extend\":693,\"../../../traces/scatter/attributes\":1075}],819:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar axesAttrs = _dereq_('../../cartesian/layout_attributes');\nvar extendFlat = _dereq_('../../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../../plot_api/edit_types').overrideAll;\n\nvar deprecationWarning = [\n    'Legacy polar charts are deprecated!',\n    'Please switch to *polar* subplots.'\n].join(' ');\n\nvar domainAttr = extendFlat({}, axesAttrs.domain, {\n    \n});\n\nfunction mergeAttrs(axisName, nonCommonAttrs) {\n    var commonAttrs = {\n        showline: {\n            valType: 'boolean',\n            \n            \n        },\n        showticklabels: {\n            valType: 'boolean',\n            \n            \n        },\n        tickorientation: {\n            valType: 'enumerated',\n            values: ['horizontal', 'vertical'],\n            \n            \n        },\n        ticklen: {\n            valType: 'number',\n            min: 0,\n            \n            \n        },\n        tickcolor: {\n            valType: 'color',\n            \n            \n        },\n        ticksuffix: {\n            valType: 'string',\n            \n            \n        },\n        endpadding: {\n            valType: 'number',\n            \n            description: deprecationWarning,\n        },\n        visible: {\n            valType: 'boolean',\n            \n            \n        }\n    };\n\n    return extendFlat({}, nonCommonAttrs, commonAttrs);\n}\n\nmodule.exports = overrideAll({\n    radialaxis: mergeAttrs('radial', {\n        range: {\n            valType: 'info_array',\n            \n            items: [\n                { valType: 'number' },\n                { valType: 'number' }\n            ],\n            \n        },\n        domain: domainAttr,\n        orientation: {\n            valType: 'number',\n            \n            \n        }\n    }),\n\n    angularaxis: mergeAttrs('angular', {\n        range: {\n            valType: 'info_array',\n            \n            items: [\n                { valType: 'number', dflt: 0 },\n                { valType: 'number', dflt: 360 }\n            ],\n            \n        },\n        domain: domainAttr\n    }),\n\n    // attributes that appear at layout root\n    layout: {\n        direction: {\n            valType: 'enumerated',\n            values: ['clockwise', 'counterclockwise'],\n            \n            \n        },\n        orientation: {\n            valType: 'angle',\n            \n            \n        }\n    }\n}, 'plot', 'nested');\n\n},{\"../../../lib/extend\":693,\"../../../plot_api/edit_types\":734,\"../../cartesian/layout_attributes\":763}],820:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Polar = module.exports = _dereq_('./micropolar');\n\nPolar.manager = _dereq_('./micropolar_manager');\n\n},{\"./micropolar\":821,\"./micropolar_manager\":822}],821:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../../lib');\nvar extendDeepAll = Lib.extendDeepAll;\nvar MID_SHIFT = _dereq_('../../../constants/alignment').MID_SHIFT;\n\nvar µ = module.exports = { version: '0.2.2' };\n\nµ.Axis = function module() {\n    var config = {\n        data: [],\n        layout: {}\n    }, inputConfig = {}, liveConfig = {};\n    var svg, container, dispatch = d3.dispatch('hover'), radialScale, angularScale;\n    var exports = {};\n    function render(_container) {\n        container = _container || container;\n        var data = config.data;\n        var axisConfig = config.layout;\n        if (typeof container == 'string' || container.nodeName) container = d3.select(container);\n        container.datum(data).each(function(_data, _index) {\n            var dataOriginal = _data.slice();\n            liveConfig = {\n                data: µ.util.cloneJson(dataOriginal),\n                layout: µ.util.cloneJson(axisConfig)\n            };\n            var colorIndex = 0;\n            dataOriginal.forEach(function(d, i) {\n                if (!d.color) {\n                    d.color = axisConfig.defaultColorRange[colorIndex];\n                    colorIndex = (colorIndex + 1) % axisConfig.defaultColorRange.length;\n                }\n                if (!d.strokeColor) {\n                    d.strokeColor = d.geometry === 'LinePlot' ? d.color : d3.rgb(d.color).darker().toString();\n                }\n                liveConfig.data[i].color = d.color;\n                liveConfig.data[i].strokeColor = d.strokeColor;\n                liveConfig.data[i].strokeDash = d.strokeDash;\n                liveConfig.data[i].strokeSize = d.strokeSize;\n            });\n            var data = dataOriginal.filter(function(d, i) {\n                var visible = d.visible;\n                return typeof visible === 'undefined' || visible === true;\n            });\n            var isStacked = false;\n            var dataWithGroupId = data.map(function(d, i) {\n                isStacked = isStacked || typeof d.groupId !== 'undefined';\n                return d;\n            });\n            if (isStacked) {\n                var grouped = d3.nest().key(function(d, i) {\n                    return typeof d.groupId != 'undefined' ? d.groupId : 'unstacked';\n                }).entries(dataWithGroupId);\n                var dataYStack = [];\n                var stacked = grouped.map(function(d, i) {\n                    if (d.key === 'unstacked') return d.values; else {\n                        var prevArray = d.values[0].r.map(function(d, i) {\n                            return 0;\n                        });\n                        d.values.forEach(function(d, i, a) {\n                            d.yStack = [ prevArray ];\n                            dataYStack.push(prevArray);\n                            prevArray = µ.util.sumArrays(d.r, prevArray);\n                        });\n                        return d.values;\n                    }\n                });\n                data = d3.merge(stacked);\n            }\n            data.forEach(function(d, i) {\n                d.t = Array.isArray(d.t[0]) ? d.t : [ d.t ];\n                d.r = Array.isArray(d.r[0]) ? d.r : [ d.r ];\n            });\n            var radius = Math.min(axisConfig.width - axisConfig.margin.left - axisConfig.margin.right, axisConfig.height - axisConfig.margin.top - axisConfig.margin.bottom) / 2;\n            radius = Math.max(10, radius);\n            var chartCenter = [ axisConfig.margin.left + radius, axisConfig.margin.top + radius ];\n            var extent;\n            if (isStacked) {\n                var highestStackedValue = d3.max(µ.util.sumArrays(µ.util.arrayLast(data).r[0], µ.util.arrayLast(dataYStack)));\n                extent = [ 0, highestStackedValue ];\n            } else extent = d3.extent(µ.util.flattenArray(data.map(function(d, i) {\n                return d.r;\n            })));\n            if (axisConfig.radialAxis.domain != µ.DATAEXTENT) extent[0] = 0;\n            radialScale = d3.scale.linear().domain(axisConfig.radialAxis.domain != µ.DATAEXTENT && axisConfig.radialAxis.domain ? axisConfig.radialAxis.domain : extent).range([ 0, radius ]);\n            liveConfig.layout.radialAxis.domain = radialScale.domain();\n            var angularDataMerged = µ.util.flattenArray(data.map(function(d, i) {\n                return d.t;\n            }));\n            var isOrdinal = typeof angularDataMerged[0] === 'string';\n            var ticks;\n            if (isOrdinal) {\n                angularDataMerged = µ.util.deduplicate(angularDataMerged);\n                ticks = angularDataMerged.slice();\n                angularDataMerged = d3.range(angularDataMerged.length);\n                data = data.map(function(d, i) {\n                    var result = d;\n                    d.t = [ angularDataMerged ];\n                    if (isStacked) result.yStack = d.yStack;\n                    return result;\n                });\n            }\n            var hasOnlyLineOrDotPlot = data.filter(function(d, i) {\n                return d.geometry === 'LinePlot' || d.geometry === 'DotPlot';\n            }).length === data.length;\n            var needsEndSpacing = axisConfig.needsEndSpacing === null ? isOrdinal || !hasOnlyLineOrDotPlot : axisConfig.needsEndSpacing;\n            var useProvidedDomain = axisConfig.angularAxis.domain && axisConfig.angularAxis.domain != µ.DATAEXTENT && !isOrdinal && axisConfig.angularAxis.domain[0] >= 0;\n            var angularDomain = useProvidedDomain ? axisConfig.angularAxis.domain : d3.extent(angularDataMerged);\n            var angularDomainStep = Math.abs(angularDataMerged[1] - angularDataMerged[0]);\n            if (hasOnlyLineOrDotPlot && !isOrdinal) angularDomainStep = 0;\n            var angularDomainWithPadding = angularDomain.slice();\n            if (needsEndSpacing && isOrdinal) angularDomainWithPadding[1] += angularDomainStep;\n            var tickCount = axisConfig.angularAxis.ticksCount || 4;\n            if (tickCount > 8) tickCount = tickCount / (tickCount / 8) + tickCount % 8;\n            if (axisConfig.angularAxis.ticksStep) {\n                tickCount = (angularDomainWithPadding[1] - angularDomainWithPadding[0]) / tickCount;\n            }\n            var angularTicksStep = axisConfig.angularAxis.ticksStep || (angularDomainWithPadding[1] - angularDomainWithPadding[0]) / (tickCount * (axisConfig.minorTicks + 1));\n            if (ticks) angularTicksStep = Math.max(Math.round(angularTicksStep), 1);\n            if (!angularDomainWithPadding[2]) angularDomainWithPadding[2] = angularTicksStep;\n            var angularAxisRange = d3.range.apply(this, angularDomainWithPadding);\n            angularAxisRange = angularAxisRange.map(function(d, i) {\n                return parseFloat(d.toPrecision(12));\n            });\n            angularScale = d3.scale.linear().domain(angularDomainWithPadding.slice(0, 2)).range(axisConfig.direction === 'clockwise' ? [ 0, 360 ] : [ 360, 0 ]);\n            liveConfig.layout.angularAxis.domain = angularScale.domain();\n            liveConfig.layout.angularAxis.endPadding = needsEndSpacing ? angularDomainStep : 0;\n            svg = d3.select(this).select('svg.chart-root');\n            if (typeof svg === 'undefined' || svg.empty()) {\n                var skeleton = \"<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>\";\n                var doc = new DOMParser().parseFromString(skeleton, 'application/xml');\n                var newSvg = this.appendChild(this.ownerDocument.importNode(doc.documentElement, true));\n                svg = d3.select(newSvg);\n            }\n            svg.select('.guides-group').style({\n                'pointer-events': 'none'\n            });\n            svg.select('.angular.axis-group').style({\n                'pointer-events': 'none'\n            });\n            svg.select('.radial.axis-group').style({\n                'pointer-events': 'none'\n            });\n            var chartGroup = svg.select('.chart-group');\n            var lineStyle = {\n                fill: 'none',\n                stroke: axisConfig.tickColor\n            };\n            var fontStyle = {\n                'font-size': axisConfig.font.size,\n                'font-family': axisConfig.font.family,\n                fill: axisConfig.font.color,\n                'text-shadow': [ '-1px 0px', '1px -1px', '-1px 1px', '1px 1px' ].map(function(d, i) {\n                    return ' ' + d + ' 0 ' + axisConfig.font.outlineColor;\n                }).join(',')\n            };\n            var legendContainer;\n            if (axisConfig.showLegend) {\n                legendContainer = svg.select('.legend-group').attr({\n                    transform: 'translate(' + [ radius, axisConfig.margin.top ] + ')'\n                }).style({\n                    display: 'block'\n                });\n                var elements = data.map(function(d, i) {\n                    var datumClone = µ.util.cloneJson(d);\n                    datumClone.symbol = d.geometry === 'DotPlot' ? d.dotType || 'circle' : d.geometry != 'LinePlot' ? 'square' : 'line';\n                    datumClone.visibleInLegend = typeof d.visibleInLegend === 'undefined' || d.visibleInLegend;\n                    datumClone.color = d.geometry === 'LinePlot' ? d.strokeColor : d.color;\n                    return datumClone;\n                });\n\n                µ.Legend().config({\n                    data: data.map(function(d, i) {\n                        return d.name || 'Element' + i;\n                    }),\n                    legendConfig: extendDeepAll({},\n                        µ.Legend.defaultConfig().legendConfig,\n                        {\n                            container: legendContainer,\n                            elements: elements,\n                            reverseOrder: axisConfig.legend.reverseOrder\n                        }\n                    )\n                })();\n\n                var legendBBox = legendContainer.node().getBBox();\n                radius = Math.min(axisConfig.width - legendBBox.width - axisConfig.margin.left - axisConfig.margin.right, axisConfig.height - axisConfig.margin.top - axisConfig.margin.bottom) / 2;\n                radius = Math.max(10, radius);\n                chartCenter = [ axisConfig.margin.left + radius, axisConfig.margin.top + radius ];\n                radialScale.range([ 0, radius ]);\n                liveConfig.layout.radialAxis.domain = radialScale.domain();\n                legendContainer.attr('transform', 'translate(' + [ chartCenter[0] + radius, chartCenter[1] - radius ] + ')');\n            } else {\n                legendContainer = svg.select('.legend-group').style({\n                    display: 'none'\n                });\n            }\n            svg.attr({\n                width: axisConfig.width,\n                height: axisConfig.height\n            }).style({\n                opacity: axisConfig.opacity\n            });\n            chartGroup.attr('transform', 'translate(' + chartCenter + ')').style({\n                cursor: 'crosshair'\n            });\n            var centeringOffset = [ (axisConfig.width - (axisConfig.margin.left + axisConfig.margin.right + radius * 2 + (legendBBox ? legendBBox.width : 0))) / 2, (axisConfig.height - (axisConfig.margin.top + axisConfig.margin.bottom + radius * 2)) / 2 ];\n            centeringOffset[0] = Math.max(0, centeringOffset[0]);\n            centeringOffset[1] = Math.max(0, centeringOffset[1]);\n            svg.select('.outer-group').attr('transform', 'translate(' + centeringOffset + ')');\n            if (axisConfig.title && axisConfig.title.text) {\n                var title = svg.select('g.title-group text').style(fontStyle).text(axisConfig.title.text);\n                var titleBBox = title.node().getBBox();\n                title.attr({\n                    x: chartCenter[0] - titleBBox.width / 2,\n                    y: chartCenter[1] - radius - 20\n                });\n            }\n            var radialAxis = svg.select('.radial.axis-group');\n            if (axisConfig.radialAxis.gridLinesVisible) {\n                var gridCircles = radialAxis.selectAll('circle.grid-circle').data(radialScale.ticks(5));\n                gridCircles.enter().append('circle').attr({\n                    'class': 'grid-circle'\n                }).style(lineStyle);\n                gridCircles.attr('r', radialScale);\n                gridCircles.exit().remove();\n            }\n            radialAxis.select('circle.outside-circle').attr({\n                r: radius\n            }).style(lineStyle);\n            var backgroundCircle = svg.select('circle.background-circle').attr({\n                r: radius\n            }).style({\n                fill: axisConfig.backgroundColor,\n                stroke: axisConfig.stroke\n            });\n            function currentAngle(d, i) {\n                return angularScale(d) % 360 + axisConfig.orientation;\n            }\n            if (axisConfig.radialAxis.visible) {\n                var axis = d3.svg.axis().scale(radialScale).ticks(5).tickSize(5);\n                radialAxis.call(axis).attr({\n                    transform: 'rotate(' + axisConfig.radialAxis.orientation + ')'\n                });\n                radialAxis.selectAll('.domain').style(lineStyle);\n                radialAxis.selectAll('g>text').text(function(d, i) {\n                    return this.textContent + axisConfig.radialAxis.ticksSuffix;\n                }).style(fontStyle).style({\n                    'text-anchor': 'start'\n                }).attr({\n                    x: 0,\n                    y: 0,\n                    dx: 0,\n                    dy: 0,\n                    transform: function(d, i) {\n                        if (axisConfig.radialAxis.tickOrientation === 'horizontal') {\n                            return 'rotate(' + -axisConfig.radialAxis.orientation + ') translate(' + [ 0, fontStyle['font-size'] ] + ')';\n                        } else return 'translate(' + [ 0, fontStyle['font-size'] ] + ')';\n                    }\n                });\n                radialAxis.selectAll('g>line').style({\n                    stroke: 'black'\n                });\n            }\n            var angularAxis = svg.select('.angular.axis-group').selectAll('g.angular-tick').data(angularAxisRange);\n            var angularAxisEnter = angularAxis.enter().append('g').classed('angular-tick', true);\n            angularAxis.attr({\n                transform: function(d, i) {\n                    return 'rotate(' + currentAngle(d, i) + ')';\n                }\n            }).style({\n                display: axisConfig.angularAxis.visible ? 'block' : 'none'\n            });\n            angularAxis.exit().remove();\n            angularAxisEnter.append('line').classed('grid-line', true).classed('major', function(d, i) {\n                return i % (axisConfig.minorTicks + 1) == 0;\n            }).classed('minor', function(d, i) {\n                return !(i % (axisConfig.minorTicks + 1) == 0);\n            }).style(lineStyle);\n            angularAxisEnter.selectAll('.minor').style({\n                stroke: axisConfig.minorTickColor\n            });\n            angularAxis.select('line.grid-line').attr({\n                x1: axisConfig.tickLength ? radius - axisConfig.tickLength : 0,\n                x2: radius\n            }).style({\n                display: axisConfig.angularAxis.gridLinesVisible ? 'block' : 'none'\n            });\n            angularAxisEnter.append('text').classed('axis-text', true).style(fontStyle);\n            var ticksText = angularAxis.select('text.axis-text').attr({\n                x: radius + axisConfig.labelOffset,\n                dy: MID_SHIFT + 'em',\n                transform: function(d, i) {\n                    var angle = currentAngle(d, i);\n                    var rad = radius + axisConfig.labelOffset;\n                    var orient = axisConfig.angularAxis.tickOrientation;\n                    if (orient == 'horizontal') return 'rotate(' + -angle + ' ' + rad + ' 0)'; else if (orient == 'radial') return angle < 270 && angle > 90 ? 'rotate(180 ' + rad + ' 0)' : null; else return 'rotate(' + (angle <= 180 && angle > 0 ? -90 : 90) + ' ' + rad + ' 0)';\n                }\n            }).style({\n                'text-anchor': 'middle',\n                display: axisConfig.angularAxis.labelsVisible ? 'block' : 'none'\n            }).text(function(d, i) {\n                if (i % (axisConfig.minorTicks + 1) != 0) return '';\n                if (ticks) {\n                    return ticks[d] + axisConfig.angularAxis.ticksSuffix;\n                } else return d + axisConfig.angularAxis.ticksSuffix;\n            }).style(fontStyle);\n            if (axisConfig.angularAxis.rewriteTicks) ticksText.text(function(d, i) {\n                if (i % (axisConfig.minorTicks + 1) != 0) return '';\n                return axisConfig.angularAxis.rewriteTicks(this.textContent, i);\n            });\n            var rightmostTickEndX = d3.max(chartGroup.selectAll('.angular-tick text')[0].map(function(d, i) {\n                return d.getCTM().e + d.getBBox().width;\n            }));\n            legendContainer.attr({\n                transform: 'translate(' + [ radius + rightmostTickEndX, axisConfig.margin.top ] + ')'\n            });\n            var hasGeometry = svg.select('g.geometry-group').selectAll('g').size() > 0;\n            var geometryContainer = svg.select('g.geometry-group').selectAll('g.geometry').data(data);\n            geometryContainer.enter().append('g').attr({\n                'class': function(d, i) {\n                    return 'geometry geometry' + i;\n                }\n            });\n            geometryContainer.exit().remove();\n            if (data[0] || hasGeometry) {\n                var geometryConfigs = [];\n                data.forEach(function(d, i) {\n                    var geometryConfig = {};\n                    geometryConfig.radialScale = radialScale;\n                    geometryConfig.angularScale = angularScale;\n                    geometryConfig.container = geometryContainer.filter(function(dB, iB) {\n                        return iB == i;\n                    });\n                    geometryConfig.geometry = d.geometry;\n                    geometryConfig.orientation = axisConfig.orientation;\n                    geometryConfig.direction = axisConfig.direction;\n                    geometryConfig.index = i;\n                    geometryConfigs.push({\n                        data: d,\n                        geometryConfig: geometryConfig\n                    });\n                });\n                var geometryConfigsGrouped = d3.nest().key(function(d, i) {\n                    return typeof d.data.groupId != 'undefined' || 'unstacked';\n                }).entries(geometryConfigs);\n                var geometryConfigsGrouped2 = [];\n                geometryConfigsGrouped.forEach(function(d, i) {\n                    if (d.key === 'unstacked') geometryConfigsGrouped2 = geometryConfigsGrouped2.concat(d.values.map(function(d, i) {\n                        return [ d ];\n                    })); else geometryConfigsGrouped2.push(d.values);\n                });\n                geometryConfigsGrouped2.forEach(function(d, i) {\n                    var geometry;\n                    if (Array.isArray(d)) geometry = d[0].geometryConfig.geometry; else geometry = d.geometryConfig.geometry;\n                    var finalGeometryConfig = d.map(function(dB, iB) {\n                        return extendDeepAll(µ[geometry].defaultConfig(), dB);\n                    });\n                    µ[geometry]().config(finalGeometryConfig)();\n                });\n            }\n            var guides = svg.select('.guides-group');\n            var tooltipContainer = svg.select('.tooltips-group');\n            var angularTooltip = µ.tooltipPanel().config({\n                container: tooltipContainer,\n                fontSize: 8\n            })();\n            var radialTooltip = µ.tooltipPanel().config({\n                container: tooltipContainer,\n                fontSize: 8\n            })();\n            var geometryTooltip = µ.tooltipPanel().config({\n                container: tooltipContainer,\n                hasTick: true\n            })();\n            var angularValue, radialValue;\n            if (!isOrdinal) {\n                var angularGuideLine = guides.select('line').attr({\n                    x1: 0,\n                    y1: 0,\n                    y2: 0\n                }).style({\n                    stroke: 'grey',\n                    'pointer-events': 'none'\n                });\n                chartGroup.on('mousemove.angular-guide', function(d, i) {\n                    var mouseAngle = µ.util.getMousePos(backgroundCircle).angle;\n                    angularGuideLine.attr({\n                        x2: -radius,\n                        transform: 'rotate(' + mouseAngle + ')'\n                    }).style({\n                        opacity: .5\n                    });\n                    var angleWithOriginOffset = (mouseAngle + 180 + 360 - axisConfig.orientation) % 360;\n                    angularValue = angularScale.invert(angleWithOriginOffset);\n                    var pos = µ.util.convertToCartesian(radius + 12, mouseAngle + 180);\n                    angularTooltip.text(µ.util.round(angularValue)).move([ pos[0] + chartCenter[0], pos[1] + chartCenter[1] ]);\n                }).on('mouseout.angular-guide', function(d, i) {\n                    guides.select('line').style({\n                        opacity: 0\n                    });\n                });\n            }\n            var angularGuideCircle = guides.select('circle').style({\n                stroke: 'grey',\n                fill: 'none'\n            });\n            chartGroup.on('mousemove.radial-guide', function(d, i) {\n                var r = µ.util.getMousePos(backgroundCircle).radius;\n                angularGuideCircle.attr({\n                    r: r\n                }).style({\n                    opacity: .5\n                });\n                radialValue = radialScale.invert(µ.util.getMousePos(backgroundCircle).radius);\n                var pos = µ.util.convertToCartesian(r, axisConfig.radialAxis.orientation);\n                radialTooltip.text(µ.util.round(radialValue)).move([ pos[0] + chartCenter[0], pos[1] + chartCenter[1] ]);\n            }).on('mouseout.radial-guide', function(d, i) {\n                angularGuideCircle.style({\n                    opacity: 0\n                });\n                geometryTooltip.hide();\n                angularTooltip.hide();\n                radialTooltip.hide();\n            });\n            svg.selectAll('.geometry-group .mark').on('mouseover.tooltip', function(d, i) {\n                var el = d3.select(this);\n                var color = this.style.fill;\n                var newColor = 'black';\n                var opacity = this.style.opacity || 1;\n                el.attr({\n                    'data-opacity': opacity\n                });\n                if (color && color !== 'none') {\n                    el.attr({\n                        'data-fill': color\n                    });\n                    newColor = d3.hsl(color).darker().toString();\n                    el.style({\n                        fill: newColor,\n                        opacity: 1\n                    });\n                    var textData = {\n                        t: µ.util.round(d[0]),\n                        r: µ.util.round(d[1])\n                    };\n                    if (isOrdinal) textData.t = ticks[d[0]];\n                    var text = 't: ' + textData.t + ', r: ' + textData.r;\n                    var bbox = this.getBoundingClientRect();\n                    var svgBBox = svg.node().getBoundingClientRect();\n                    var pos = [ bbox.left + bbox.width / 2 - centeringOffset[0] - svgBBox.left, bbox.top + bbox.height / 2 - centeringOffset[1] - svgBBox.top ];\n                    geometryTooltip.config({\n                        color: newColor\n                    }).text(text);\n                    geometryTooltip.move(pos);\n                } else {\n                    color = this.style.stroke || 'black';\n                    el.attr({\n                        'data-stroke': color\n                    });\n                    newColor = d3.hsl(color).darker().toString();\n                    el.style({\n                        stroke: newColor,\n                        opacity: 1\n                    });\n                }\n            }).on('mousemove.tooltip', function(d, i) {\n                if (d3.event.which != 0) return false;\n                if (d3.select(this).attr('data-fill')) geometryTooltip.show();\n            }).on('mouseout.tooltip', function(d, i) {\n                geometryTooltip.hide();\n                var el = d3.select(this);\n                var fillColor = el.attr('data-fill');\n                if (fillColor) el.style({\n                    fill: fillColor,\n                    opacity: el.attr('data-opacity')\n                }); else el.style({\n                    stroke: el.attr('data-stroke'),\n                    opacity: el.attr('data-opacity')\n                });\n            });\n        });\n        return exports;\n    }\n    exports.render = function(_container) {\n        render(_container);\n        return this;\n    };\n    exports.config = function(_x) {\n        if (!arguments.length) return config;\n        var xClone = µ.util.cloneJson(_x);\n        xClone.data.forEach(function(d, i) {\n            if (!config.data[i]) config.data[i] = {};\n            extendDeepAll(config.data[i], µ.Axis.defaultConfig().data[0]);\n            extendDeepAll(config.data[i], d);\n        });\n        extendDeepAll(config.layout, µ.Axis.defaultConfig().layout);\n        extendDeepAll(config.layout, xClone.layout);\n        return this;\n    };\n    exports.getLiveConfig = function() {\n        return liveConfig;\n    };\n    exports.getinputConfig = function() {\n        return inputConfig;\n    };\n    exports.radialScale = function(_x) {\n        return radialScale;\n    };\n    exports.angularScale = function(_x) {\n        return angularScale;\n    };\n    exports.svg = function() {\n        return svg;\n    };\n    d3.rebind(exports, dispatch, 'on');\n    return exports;\n};\n\nµ.Axis.defaultConfig = function(d, i) {\n    var config = {\n        data: [ {\n            t: [ 1, 2, 3, 4 ],\n            r: [ 10, 11, 12, 13 ],\n            name: 'Line1',\n            geometry: 'LinePlot',\n            color: null,\n            strokeDash: 'solid',\n            strokeColor: null,\n            strokeSize: '1',\n            visibleInLegend: true,\n            opacity: 1\n        } ],\n        layout: {\n            defaultColorRange: d3.scale.category10().range(),\n            title: null,\n            height: 450,\n            width: 500,\n            margin: {\n                top: 40,\n                right: 40,\n                bottom: 40,\n                left: 40\n            },\n            font: {\n                size: 12,\n                color: 'gray',\n                outlineColor: 'white',\n                family: 'Tahoma, sans-serif'\n            },\n            direction: 'clockwise',\n            orientation: 0,\n            labelOffset: 10,\n            radialAxis: {\n                domain: null,\n                orientation: -45,\n                ticksSuffix: '',\n                visible: true,\n                gridLinesVisible: true,\n                tickOrientation: 'horizontal',\n                rewriteTicks: null\n            },\n            angularAxis: {\n                domain: [ 0, 360 ],\n                ticksSuffix: '',\n                visible: true,\n                gridLinesVisible: true,\n                labelsVisible: true,\n                tickOrientation: 'horizontal',\n                rewriteTicks: null,\n                ticksCount: null,\n                ticksStep: null\n            },\n            minorTicks: 0,\n            tickLength: null,\n            tickColor: 'silver',\n            minorTickColor: '#eee',\n            backgroundColor: 'none',\n            needsEndSpacing: null,\n            showLegend: true,\n            legend: {\n                reverseOrder: false\n            },\n            opacity: 1\n        }\n    };\n    return config;\n};\n\nµ.util = {};\n\nµ.DATAEXTENT = 'dataExtent';\n\nµ.AREA = 'AreaChart';\n\nµ.LINE = 'LinePlot';\n\nµ.DOT = 'DotPlot';\n\nµ.BAR = 'BarChart';\n\nµ.util._override = function(_objA, _objB) {\n    for (var x in _objA) if (x in _objB) _objB[x] = _objA[x];\n};\n\nµ.util._extend = function(_objA, _objB) {\n    for (var x in _objA) _objB[x] = _objA[x];\n};\n\nµ.util._rndSnd = function() {\n    return Math.random() * 2 - 1 + (Math.random() * 2 - 1) + (Math.random() * 2 - 1);\n};\n\nµ.util.dataFromEquation2 = function(_equation, _step) {\n    var step = _step || 6;\n    var data = d3.range(0, 360 + step, step).map(function(deg, index) {\n        var theta = deg * Math.PI / 180;\n        var radius = _equation(theta);\n        return [ deg, radius ];\n    });\n    return data;\n};\n\nµ.util.dataFromEquation = function(_equation, _step, _name) {\n    var step = _step || 6;\n    var t = [], r = [];\n    d3.range(0, 360 + step, step).forEach(function(deg, index) {\n        var theta = deg * Math.PI / 180;\n        var radius = _equation(theta);\n        t.push(deg);\n        r.push(radius);\n    });\n    var result = {\n        t: t,\n        r: r\n    };\n    if (_name) result.name = _name;\n    return result;\n};\n\nµ.util.ensureArray = function(_val, _count) {\n    if (typeof _val === 'undefined') return null;\n    var arr = [].concat(_val);\n    return d3.range(_count).map(function(d, i) {\n        return arr[i] || arr[0];\n    });\n};\n\nµ.util.fillArrays = function(_obj, _valueNames, _count) {\n    _valueNames.forEach(function(d, i) {\n        _obj[d] = µ.util.ensureArray(_obj[d], _count);\n    });\n    return _obj;\n};\n\nµ.util.cloneJson = function(json) {\n    return JSON.parse(JSON.stringify(json));\n};\n\nµ.util.validateKeys = function(obj, keys) {\n    if (typeof keys === 'string') keys = keys.split('.');\n    var next = keys.shift();\n    return obj[next] && (!keys.length || objHasKeys(obj[next], keys));\n};\n\nµ.util.sumArrays = function(a, b) {\n    return d3.zip(a, b).map(function(d, i) {\n        return d3.sum(d);\n    });\n};\n\nµ.util.arrayLast = function(a) {\n    return a[a.length - 1];\n};\n\nµ.util.arrayEqual = function(a, b) {\n    var i = Math.max(a.length, b.length, 1);\n    while (i-- >= 0 && a[i] === b[i]) ;\n    return i === -2;\n};\n\nµ.util.flattenArray = function(arr) {\n    var r = [];\n    while (!µ.util.arrayEqual(r, arr)) {\n        r = arr;\n        arr = [].concat.apply([], arr);\n    }\n    return arr;\n};\n\nµ.util.deduplicate = function(arr) {\n    return arr.filter(function(v, i, a) {\n        return a.indexOf(v) == i;\n    });\n};\n\nµ.util.convertToCartesian = function(radius, theta) {\n    var thetaRadians = theta * Math.PI / 180;\n    var x = radius * Math.cos(thetaRadians);\n    var y = radius * Math.sin(thetaRadians);\n    return [ x, y ];\n};\n\nµ.util.round = function(_value, _digits) {\n    var digits = _digits || 2;\n    var mult = Math.pow(10, digits);\n    return Math.round(_value * mult) / mult;\n};\n\nµ.util.getMousePos = function(_referenceElement) {\n    var mousePos = d3.mouse(_referenceElement.node());\n    var mouseX = mousePos[0];\n    var mouseY = mousePos[1];\n    var mouse = {};\n    mouse.x = mouseX;\n    mouse.y = mouseY;\n    mouse.pos = mousePos;\n    mouse.angle = (Math.atan2(mouseY, mouseX) + Math.PI) * 180 / Math.PI;\n    mouse.radius = Math.sqrt(mouseX * mouseX + mouseY * mouseY);\n    return mouse;\n};\n\nµ.util.duplicatesCount = function(arr) {\n    var uniques = {}, val;\n    var dups = {};\n    for (var i = 0, len = arr.length; i < len; i++) {\n        val = arr[i];\n        if (val in uniques) {\n            uniques[val]++;\n            dups[val] = uniques[val];\n        } else {\n            uniques[val] = 1;\n        }\n    }\n    return dups;\n};\n\nµ.util.duplicates = function(arr) {\n    return Object.keys(µ.util.duplicatesCount(arr));\n};\n\nµ.util.translator = function(obj, sourceBranch, targetBranch, reverse) {\n    if (reverse) {\n        var targetBranchCopy = targetBranch.slice();\n        targetBranch = sourceBranch;\n        sourceBranch = targetBranchCopy;\n    }\n    var value = sourceBranch.reduce(function(previousValue, currentValue) {\n        if (typeof previousValue != 'undefined') return previousValue[currentValue];\n    }, obj);\n    if (typeof value === 'undefined') return;\n    sourceBranch.reduce(function(previousValue, currentValue, index) {\n        if (typeof previousValue == 'undefined') return;\n        if (index === sourceBranch.length - 1) delete previousValue[currentValue];\n        return previousValue[currentValue];\n    }, obj);\n    targetBranch.reduce(function(previousValue, currentValue, index) {\n        if (typeof previousValue[currentValue] === 'undefined') previousValue[currentValue] = {};\n        if (index === targetBranch.length - 1) previousValue[currentValue] = value;\n        return previousValue[currentValue];\n    }, obj);\n};\n\nµ.PolyChart = function module() {\n    var config = [ µ.PolyChart.defaultConfig() ];\n    var dispatch = d3.dispatch('hover');\n    var dashArray = {\n        solid: 'none',\n        dash: [ 5, 2 ],\n        dot: [ 2, 5 ]\n    };\n    var colorScale;\n    function exports() {\n        var geometryConfig = config[0].geometryConfig;\n        var container = geometryConfig.container;\n        if (typeof container == 'string') container = d3.select(container);\n        container.datum(config).each(function(_config, _index) {\n            var isStack = !!_config[0].data.yStack;\n            var data = _config.map(function(d, i) {\n                if (isStack) return d3.zip(d.data.t[0], d.data.r[0], d.data.yStack[0]); else return d3.zip(d.data.t[0], d.data.r[0]);\n            });\n            var angularScale = geometryConfig.angularScale;\n            var domainMin = geometryConfig.radialScale.domain()[0];\n            var generator = {};\n            generator.bar = function(d, i, pI) {\n                var dataConfig = _config[pI].data;\n                var h = geometryConfig.radialScale(d[1]) - geometryConfig.radialScale(0);\n                var stackTop = geometryConfig.radialScale(d[2] || 0);\n                var w = dataConfig.barWidth;\n                d3.select(this).attr({\n                    'class': 'mark bar',\n                    d: 'M' + [ [ h + stackTop, -w / 2 ], [ h + stackTop, w / 2 ], [ stackTop, w / 2 ], [ stackTop, -w / 2 ] ].join('L') + 'Z',\n                    transform: function(d, i) {\n                        return 'rotate(' + (geometryConfig.orientation + angularScale(d[0])) + ')';\n                    }\n                });\n            };\n            generator.dot = function(d, i, pI) {\n                var stackedData = d[2] ? [ d[0], d[1] + d[2] ] : d;\n                var symbol = d3.svg.symbol().size(_config[pI].data.dotSize).type(_config[pI].data.dotType)(d, i);\n                d3.select(this).attr({\n                    'class': 'mark dot',\n                    d: symbol,\n                    transform: function(d, i) {\n                        var coord = convertToCartesian(getPolarCoordinates(stackedData));\n                        return 'translate(' + [ coord.x, coord.y ] + ')';\n                    }\n                });\n            };\n            var line = d3.svg.line.radial().interpolate(_config[0].data.lineInterpolation).radius(function(d) {\n                return geometryConfig.radialScale(d[1]);\n            }).angle(function(d) {\n                return geometryConfig.angularScale(d[0]) * Math.PI / 180;\n            });\n            generator.line = function(d, i, pI) {\n                var lineData = d[2] ? data[pI].map(function(d, i) {\n                    return [ d[0], d[1] + d[2] ];\n                }) : data[pI];\n                d3.select(this).each(generator['dot']).style({\n                    opacity: function(dB, iB) {\n                        return +_config[pI].data.dotVisible;\n                    },\n                    fill: markStyle.stroke(d, i, pI)\n                }).attr({\n                    'class': 'mark dot'\n                });\n                if (i > 0) return;\n                var lineSelection = d3.select(this.parentNode).selectAll('path.line').data([ 0 ]);\n                lineSelection.enter().insert('path');\n                lineSelection.attr({\n                    'class': 'line',\n                    d: line(lineData),\n                    transform: function(dB, iB) {\n                        return 'rotate(' + (geometryConfig.orientation + 90) + ')';\n                    },\n                    'pointer-events': 'none'\n                }).style({\n                    fill: function(dB, iB) {\n                        return markStyle.fill(d, i, pI);\n                    },\n                    'fill-opacity': 0,\n                    stroke: function(dB, iB) {\n                        return markStyle.stroke(d, i, pI);\n                    },\n                    'stroke-width': function(dB, iB) {\n                        return markStyle['stroke-width'](d, i, pI);\n                    },\n                    'stroke-dasharray': function(dB, iB) {\n                        return markStyle['stroke-dasharray'](d, i, pI);\n                    },\n                    opacity: function(dB, iB) {\n                        return markStyle.opacity(d, i, pI);\n                    },\n                    display: function(dB, iB) {\n                        return markStyle.display(d, i, pI);\n                    }\n                });\n            };\n            var angularRange = geometryConfig.angularScale.range();\n            var triangleAngle = Math.abs(angularRange[1] - angularRange[0]) / data[0].length * Math.PI / 180;\n            var arc = d3.svg.arc().startAngle(function(d) {\n                return -triangleAngle / 2;\n            }).endAngle(function(d) {\n                return triangleAngle / 2;\n            }).innerRadius(function(d) {\n                return geometryConfig.radialScale(domainMin + (d[2] || 0));\n            }).outerRadius(function(d) {\n                return geometryConfig.radialScale(domainMin + (d[2] || 0)) + geometryConfig.radialScale(d[1]);\n            });\n            generator.arc = function(d, i, pI) {\n                d3.select(this).attr({\n                    'class': 'mark arc',\n                    d: arc,\n                    transform: function(d, i) {\n                        return 'rotate(' + (geometryConfig.orientation + angularScale(d[0]) + 90) + ')';\n                    }\n                });\n            };\n            var markStyle = {\n                fill: function(d, i, pI) {\n                    return _config[pI].data.color;\n                },\n                stroke: function(d, i, pI) {\n                    return _config[pI].data.strokeColor;\n                },\n                'stroke-width': function(d, i, pI) {\n                    return _config[pI].data.strokeSize + 'px';\n                },\n                'stroke-dasharray': function(d, i, pI) {\n                    return dashArray[_config[pI].data.strokeDash];\n                },\n                opacity: function(d, i, pI) {\n                    return _config[pI].data.opacity;\n                },\n                display: function(d, i, pI) {\n                    return typeof _config[pI].data.visible === 'undefined' || _config[pI].data.visible ? 'block' : 'none';\n                }\n            };\n            var geometryLayer = d3.select(this).selectAll('g.layer').data(data);\n            geometryLayer.enter().append('g').attr({\n                'class': 'layer'\n            });\n            var geometry = geometryLayer.selectAll('path.mark').data(function(d, i) {\n                return d;\n            });\n            geometry.enter().append('path').attr({\n                'class': 'mark'\n            });\n            geometry.style(markStyle).each(generator[geometryConfig.geometryType]);\n            geometry.exit().remove();\n            geometryLayer.exit().remove();\n            function getPolarCoordinates(d, i) {\n                var r = geometryConfig.radialScale(d[1]);\n                var t = (geometryConfig.angularScale(d[0]) + geometryConfig.orientation) * Math.PI / 180;\n                return {\n                    r: r,\n                    t: t\n                };\n            }\n            function convertToCartesian(polarCoordinates) {\n                var x = polarCoordinates.r * Math.cos(polarCoordinates.t);\n                var y = polarCoordinates.r * Math.sin(polarCoordinates.t);\n                return {\n                    x: x,\n                    y: y\n                };\n            }\n        });\n    }\n    exports.config = function(_x) {\n        if (!arguments.length) return config;\n        _x.forEach(function(d, i) {\n            if (!config[i]) config[i] = {};\n            extendDeepAll(config[i], µ.PolyChart.defaultConfig());\n            extendDeepAll(config[i], d);\n        });\n        return this;\n    };\n    exports.getColorScale = function() {\n        return colorScale;\n    };\n    d3.rebind(exports, dispatch, 'on');\n    return exports;\n};\n\nµ.PolyChart.defaultConfig = function() {\n    var config = {\n        data: {\n            name: 'geom1',\n            t: [ [ 1, 2, 3, 4 ] ],\n            r: [ [ 1, 2, 3, 4 ] ],\n            dotType: 'circle',\n            dotSize: 64,\n            dotVisible: false,\n            barWidth: 20,\n            color: '#ffa500',\n            strokeSize: 1,\n            strokeColor: 'silver',\n            strokeDash: 'solid',\n            opacity: 1,\n            index: 0,\n            visible: true,\n            visibleInLegend: true\n        },\n        geometryConfig: {\n            geometry: 'LinePlot',\n            geometryType: 'arc',\n            direction: 'clockwise',\n            orientation: 0,\n            container: 'body',\n            radialScale: null,\n            angularScale: null,\n            colorScale: d3.scale.category20()\n        }\n    };\n    return config;\n};\n\nµ.BarChart = function module() {\n    return µ.PolyChart();\n};\n\nµ.BarChart.defaultConfig = function() {\n    var config = {\n        geometryConfig: {\n            geometryType: 'bar'\n        }\n    };\n    return config;\n};\n\nµ.AreaChart = function module() {\n    return µ.PolyChart();\n};\n\nµ.AreaChart.defaultConfig = function() {\n    var config = {\n        geometryConfig: {\n            geometryType: 'arc'\n        }\n    };\n    return config;\n};\n\nµ.DotPlot = function module() {\n    return µ.PolyChart();\n};\n\nµ.DotPlot.defaultConfig = function() {\n    var config = {\n        geometryConfig: {\n            geometryType: 'dot',\n            dotType: 'circle'\n        }\n    };\n    return config;\n};\n\nµ.LinePlot = function module() {\n    return µ.PolyChart();\n};\n\nµ.LinePlot.defaultConfig = function() {\n    var config = {\n        geometryConfig: {\n            geometryType: 'line'\n        }\n    };\n    return config;\n};\n\nµ.Legend = function module() {\n    var config = µ.Legend.defaultConfig();\n    var dispatch = d3.dispatch('hover');\n    function exports() {\n        var legendConfig = config.legendConfig;\n        var flattenData = config.data.map(function(d, i) {\n            return [].concat(d).map(function(dB, iB) {\n                var element = extendDeepAll({}, legendConfig.elements[i]);\n                element.name = dB;\n                element.color = [].concat(legendConfig.elements[i].color)[iB];\n                return element;\n            });\n        });\n        var data = d3.merge(flattenData);\n        data = data.filter(function(d, i) {\n            return legendConfig.elements[i] && (legendConfig.elements[i].visibleInLegend || typeof legendConfig.elements[i].visibleInLegend === 'undefined');\n        });\n        if (legendConfig.reverseOrder) data = data.reverse();\n        var container = legendConfig.container;\n        if (typeof container == 'string' || container.nodeName) container = d3.select(container);\n        var colors = data.map(function(d, i) {\n            return d.color;\n        });\n        var lineHeight = legendConfig.fontSize;\n        var isContinuous = legendConfig.isContinuous == null ? typeof data[0] === 'number' : legendConfig.isContinuous;\n        var height = isContinuous ? legendConfig.height : lineHeight * data.length;\n        var legendContainerGroup = container.classed('legend-group', true);\n        var svg = legendContainerGroup.selectAll('svg').data([ 0 ]);\n        var svgEnter = svg.enter().append('svg').attr({\n            width: 300,\n            height: height + lineHeight,\n            xmlns: 'http://www.w3.org/2000/svg',\n            'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n            version: '1.1'\n        });\n        svgEnter.append('g').classed('legend-axis', true);\n        svgEnter.append('g').classed('legend-marks', true);\n        var dataNumbered = d3.range(data.length);\n        var colorScale = d3.scale[isContinuous ? 'linear' : 'ordinal']().domain(dataNumbered).range(colors);\n        var dataScale = d3.scale[isContinuous ? 'linear' : 'ordinal']().domain(dataNumbered)[isContinuous ? 'range' : 'rangePoints']([ 0, height ]);\n        var shapeGenerator = function(_type, _size) {\n            var squareSize = _size * 3;\n            if (_type === 'line') {\n                return 'M' + [ [ -_size / 2, -_size / 12 ], [ _size / 2, -_size / 12 ], [ _size / 2, _size / 12 ], [ -_size / 2, _size / 12 ] ] + 'Z';\n            } else if (d3.svg.symbolTypes.indexOf(_type) != -1) return d3.svg.symbol().type(_type).size(squareSize)(); else return d3.svg.symbol().type('square').size(squareSize)();\n        };\n        if (isContinuous) {\n            var gradient = svg.select('.legend-marks').append('defs').append('linearGradient').attr({\n                id: 'grad1',\n                x1: '0%',\n                y1: '0%',\n                x2: '0%',\n                y2: '100%'\n            }).selectAll('stop').data(colors);\n            gradient.enter().append('stop');\n            gradient.attr({\n                offset: function(d, i) {\n                    return i / (colors.length - 1) * 100 + '%';\n                }\n            }).style({\n                'stop-color': function(d, i) {\n                    return d;\n                }\n            });\n            svg.append('rect').classed('legend-mark', true).attr({\n                height: legendConfig.height,\n                width: legendConfig.colorBandWidth,\n                fill: 'url(#grad1)'\n            });\n        } else {\n            var legendElement = svg.select('.legend-marks').selectAll('path.legend-mark').data(data);\n            legendElement.enter().append('path').classed('legend-mark', true);\n            legendElement.attr({\n                transform: function(d, i) {\n                    return 'translate(' + [ lineHeight / 2, dataScale(i) + lineHeight / 2 ] + ')';\n                },\n                d: function(d, i) {\n                    var symbolType = d.symbol;\n                    return shapeGenerator(symbolType, lineHeight);\n                },\n                fill: function(d, i) {\n                    return colorScale(i);\n                }\n            });\n            legendElement.exit().remove();\n        }\n        var legendAxis = d3.svg.axis().scale(dataScale).orient('right');\n        var axis = svg.select('g.legend-axis').attr({\n            transform: 'translate(' + [ isContinuous ? legendConfig.colorBandWidth : lineHeight, lineHeight / 2 ] + ')'\n        }).call(legendAxis);\n        axis.selectAll('.domain').style({\n            fill: 'none',\n            stroke: 'none'\n        });\n        axis.selectAll('line').style({\n            fill: 'none',\n            stroke: isContinuous ? legendConfig.textColor : 'none'\n        });\n        axis.selectAll('text').style({\n            fill: legendConfig.textColor,\n            'font-size': legendConfig.fontSize\n        }).text(function(d, i) {\n            return data[i].name;\n        });\n        return exports;\n    }\n    exports.config = function(_x) {\n        if (!arguments.length) return config;\n        extendDeepAll(config, _x);\n        return this;\n    };\n    d3.rebind(exports, dispatch, 'on');\n    return exports;\n};\n\nµ.Legend.defaultConfig = function(d, i) {\n    var config = {\n        data: [ 'a', 'b', 'c' ],\n        legendConfig: {\n            elements: [ {\n                symbol: 'line',\n                color: 'red'\n            }, {\n                symbol: 'square',\n                color: 'yellow'\n            }, {\n                symbol: 'diamond',\n                color: 'limegreen'\n            } ],\n            height: 150,\n            colorBandWidth: 30,\n            fontSize: 12,\n            container: 'body',\n            isContinuous: null,\n            textColor: 'grey',\n            reverseOrder: false\n        }\n    };\n    return config;\n};\n\nµ.tooltipPanel = function() {\n    var tooltipEl, tooltipTextEl, backgroundEl;\n    var config = {\n        container: null,\n        hasTick: false,\n        fontSize: 12,\n        color: 'white',\n        padding: 5\n    };\n    var id = 'tooltip-' + µ.tooltipPanel.uid++;\n    var tickSize = 10;\n    var exports = function() {\n        tooltipEl = config.container.selectAll('g.' + id).data([ 0 ]);\n        var tooltipEnter = tooltipEl.enter().append('g').classed(id, true).style({\n            'pointer-events': 'none',\n            display: 'none'\n        });\n        backgroundEl = tooltipEnter.append('path').style({\n            fill: 'white',\n            'fill-opacity': .9\n        }).attr({\n            d: 'M0 0'\n        });\n        tooltipTextEl = tooltipEnter.append('text').attr({\n            dx: config.padding + tickSize,\n            dy: +config.fontSize * .3\n        });\n        return exports;\n    };\n    exports.text = function(_text) {\n        var l = d3.hsl(config.color).l;\n        var strokeColor = l >= .5 ? '#aaa' : 'white';\n        var fillColor = l >= .5 ? 'black' : 'white';\n        var text = _text || '';\n        tooltipTextEl.style({\n            fill: fillColor,\n            'font-size': config.fontSize + 'px'\n        }).text(text);\n        var padding = config.padding;\n        var bbox = tooltipTextEl.node().getBBox();\n        var boxStyle = {\n            fill: config.color,\n            stroke: strokeColor,\n            'stroke-width': '2px'\n        };\n        var backGroundW = bbox.width + padding * 2 + tickSize;\n        var backGroundH = bbox.height + padding * 2;\n        backgroundEl.attr({\n            d: 'M' + [ [ tickSize, -backGroundH / 2 ], [ tickSize, -backGroundH / 4 ], [ config.hasTick ? 0 : tickSize, 0 ], [ tickSize, backGroundH / 4 ], [ tickSize, backGroundH / 2 ], [ backGroundW, backGroundH / 2 ], [ backGroundW, -backGroundH / 2 ] ].join('L') + 'Z'\n        }).style(boxStyle);\n        tooltipEl.attr({\n            transform: 'translate(' + [ tickSize, -backGroundH / 2 + padding * 2 ] + ')'\n        });\n        tooltipEl.style({\n            display: 'block'\n        });\n        return exports;\n    };\n    exports.move = function(_pos) {\n        if (!tooltipEl) return;\n        tooltipEl.attr({\n            transform: 'translate(' + [ _pos[0], _pos[1] ] + ')'\n        }).style({\n            display: 'block'\n        });\n        return exports;\n    };\n    exports.hide = function() {\n        if (!tooltipEl) return;\n        tooltipEl.style({\n            display: 'none'\n        });\n        return exports;\n    };\n    exports.show = function() {\n        if (!tooltipEl) return;\n        tooltipEl.style({\n            display: 'block'\n        });\n        return exports;\n    };\n    exports.config = function(_x) {\n        extendDeepAll(config, _x);\n        return exports;\n    };\n    return exports;\n};\n\nµ.tooltipPanel.uid = 1;\n\nµ.adapter = {};\n\nµ.adapter.plotly = function module() {\n    var exports = {};\n    exports.convert = function(_inputConfig, reverse) {\n        var outputConfig = {};\n        if (_inputConfig.data) {\n            outputConfig.data = _inputConfig.data.map(function(d, i) {\n                var r = extendDeepAll({}, d);\n                var toTranslate = [\n                    [ r, [ 'marker', 'color' ], [ 'color' ] ],\n                    [ r, [ 'marker', 'opacity' ], [ 'opacity' ] ],\n                    [ r, [ 'marker', 'line', 'color' ], [ 'strokeColor' ] ],\n                    [ r, [ 'marker', 'line', 'dash' ], [ 'strokeDash' ] ],\n                    [ r, [ 'marker', 'line', 'width' ], [ 'strokeSize' ] ],\n                    [ r, [ 'marker', 'symbol' ], [ 'dotType' ] ],\n                    [ r, [ 'marker', 'size' ], [ 'dotSize' ] ],\n                    [ r, [ 'marker', 'barWidth' ], [ 'barWidth' ] ],\n                    [ r, [ 'line', 'interpolation' ], [ 'lineInterpolation' ] ],\n                    [ r, [ 'showlegend' ], [ 'visibleInLegend' ] ]\n                ];\n                toTranslate.forEach(function(d, i) {\n                    µ.util.translator.apply(null, d.concat(reverse));\n                });\n\n                if (!reverse) delete r.marker;\n                if (reverse) delete r.groupId;\n                if (!reverse) {\n                    if (r.type === 'scatter') {\n                        if (r.mode === 'lines') r.geometry = 'LinePlot'; else if (r.mode === 'markers') r.geometry = 'DotPlot'; else if (r.mode === 'lines+markers') {\n                            r.geometry = 'LinePlot';\n                            r.dotVisible = true;\n                        }\n                    } else if (r.type === 'area') r.geometry = 'AreaChart'; else if (r.type === 'bar') r.geometry = 'BarChart';\n                    delete r.mode;\n                    delete r.type;\n                } else {\n                    if (r.geometry === 'LinePlot') {\n                        r.type = 'scatter';\n                        if (r.dotVisible === true) {\n                            delete r.dotVisible;\n                            r.mode = 'lines+markers';\n                        } else r.mode = 'lines';\n                    } else if (r.geometry === 'DotPlot') {\n                        r.type = 'scatter';\n                        r.mode = 'markers';\n                    } else if (r.geometry === 'AreaChart') r.type = 'area'; else if (r.geometry === 'BarChart') r.type = 'bar';\n                    delete r.geometry;\n                }\n                return r;\n            });\n            if (!reverse && _inputConfig.layout && _inputConfig.layout.barmode === 'stack') {\n                var duplicates = µ.util.duplicates(outputConfig.data.map(function(d, i) {\n                    return d.geometry;\n                }));\n                outputConfig.data.forEach(function(d, i) {\n                    var idx = duplicates.indexOf(d.geometry);\n                    if (idx != -1) outputConfig.data[i].groupId = idx;\n                });\n            }\n        }\n        if (_inputConfig.layout) {\n            var r = extendDeepAll({}, _inputConfig.layout);\n            var toTranslate = [\n                [ r, [ 'plot_bgcolor' ], [ 'backgroundColor' ] ],\n                [ r, [ 'showlegend' ], [ 'showLegend' ] ],\n                [ r, [ 'radialaxis' ], [ 'radialAxis' ] ],\n                [ r, [ 'angularaxis' ], [ 'angularAxis' ] ],\n                [ r.angularaxis, [ 'showline' ], [ 'gridLinesVisible' ] ],\n                [ r.angularaxis, [ 'showticklabels' ], [ 'labelsVisible' ] ],\n                [ r.angularaxis, [ 'nticks' ], [ 'ticksCount' ] ],\n                [ r.angularaxis, [ 'tickorientation' ], [ 'tickOrientation' ] ],\n                [ r.angularaxis, [ 'ticksuffix' ], [ 'ticksSuffix' ] ],\n                [ r.angularaxis, [ 'range' ], [ 'domain' ] ],\n                [ r.angularaxis, [ 'endpadding' ], [ 'endPadding' ] ],\n                [ r.radialaxis, [ 'showline' ], [ 'gridLinesVisible' ] ],\n                [ r.radialaxis, [ 'tickorientation' ], [ 'tickOrientation' ] ],\n                [ r.radialaxis, [ 'ticksuffix' ], [ 'ticksSuffix' ] ],\n                [ r.radialaxis, [ 'range' ], [ 'domain' ] ],\n                [ r.angularAxis, [ 'showline' ], [ 'gridLinesVisible' ] ],\n                [ r.angularAxis, [ 'showticklabels' ], [ 'labelsVisible' ] ],\n                [ r.angularAxis, [ 'nticks' ], [ 'ticksCount' ] ],\n                [ r.angularAxis, [ 'tickorientation' ], [ 'tickOrientation' ] ],\n                [ r.angularAxis, [ 'ticksuffix' ], [ 'ticksSuffix' ] ],\n                [ r.angularAxis, [ 'range' ], [ 'domain' ] ],\n                [ r.angularAxis, [ 'endpadding' ], [ 'endPadding' ] ],\n                [ r.radialAxis, [ 'showline' ], [ 'gridLinesVisible' ] ],\n                [ r.radialAxis, [ 'tickorientation' ], [ 'tickOrientation' ] ],\n                [ r.radialAxis, [ 'ticksuffix' ], [ 'ticksSuffix' ] ],\n                [ r.radialAxis, [ 'range' ], [ 'domain' ] ],\n                [ r.font, [ 'outlinecolor' ], [ 'outlineColor' ] ],\n                [ r.legend, [ 'traceorder' ], [ 'reverseOrder' ] ],\n                [ r, [ 'labeloffset' ], [ 'labelOffset' ] ],\n                [ r, [ 'defaultcolorrange' ], [ 'defaultColorRange' ] ]\n            ];\n            toTranslate.forEach(function(d, i) {\n                µ.util.translator.apply(null, d.concat(reverse));\n            });\n\n            if (!reverse) {\n                if (r.angularAxis && typeof r.angularAxis.ticklen !== 'undefined') r.tickLength = r.angularAxis.ticklen;\n                if (r.angularAxis && typeof r.angularAxis.tickcolor !== 'undefined') r.tickColor = r.angularAxis.tickcolor;\n            } else {\n                if (typeof r.tickLength !== 'undefined') {\n                    r.angularaxis.ticklen = r.tickLength;\n                    delete r.tickLength;\n                }\n                if (r.tickColor) {\n                    r.angularaxis.tickcolor = r.tickColor;\n                    delete r.tickColor;\n                }\n            }\n            if (r.legend && typeof r.legend.reverseOrder != 'boolean') {\n                r.legend.reverseOrder = r.legend.reverseOrder != 'normal';\n            }\n            if (r.legend && typeof r.legend.traceorder == 'boolean') {\n                r.legend.traceorder = r.legend.traceorder ? 'reversed' : 'normal';\n                delete r.legend.reverseOrder;\n            }\n            if (r.margin && typeof r.margin.t != 'undefined') {\n                var source = [ 't', 'r', 'b', 'l', 'pad' ];\n                var target = [ 'top', 'right', 'bottom', 'left', 'pad' ];\n                var margin = {};\n                d3.entries(r.margin).forEach(function(dB, iB) {\n                    margin[target[source.indexOf(dB.key)]] = dB.value;\n                });\n                r.margin = margin;\n            }\n            if (reverse) {\n                delete r.needsEndSpacing;\n                delete r.minorTickColor;\n                delete r.minorTicks;\n                delete r.angularaxis.ticksCount;\n                delete r.angularaxis.ticksCount;\n                delete r.angularaxis.ticksStep;\n                delete r.angularaxis.rewriteTicks;\n                delete r.angularaxis.nticks;\n                delete r.radialaxis.ticksCount;\n                delete r.radialaxis.ticksCount;\n                delete r.radialaxis.ticksStep;\n                delete r.radialaxis.rewriteTicks;\n                delete r.radialaxis.nticks;\n            }\n            outputConfig.layout = r;\n        }\n        return outputConfig;\n    };\n    return exports;\n};\n\n},{\"../../../constants/alignment\":675,\"../../../lib\":703,\"d3\":157}],822:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n/* eslint-disable new-cap */\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../../lib');\nvar Color = _dereq_('../../../components/color');\n\nvar micropolar = _dereq_('./micropolar');\nvar UndoManager = _dereq_('./undo_manager');\nvar extendDeepAll = Lib.extendDeepAll;\n\nvar manager = module.exports = {};\n\nmanager.framework = function(_gd) {\n    var config, previousConfigClone, plot, convertedInput, container;\n    var undoManager = new UndoManager();\n\n    function exports(_inputConfig, _container) {\n        if(_container) container = _container;\n        d3.select(d3.select(container).node().parentNode).selectAll('.svg-container>*:not(.chart-root)').remove();\n\n        config = (!config) ?\n            _inputConfig :\n            extendDeepAll(config, _inputConfig);\n\n        if(!plot) plot = micropolar.Axis();\n        convertedInput = micropolar.adapter.plotly().convert(config);\n        plot.config(convertedInput).render(container);\n        _gd.data = config.data;\n        _gd.layout = config.layout;\n        manager.fillLayout(_gd);\n        return config;\n    }\n    exports.isPolar = true;\n    exports.svg = function() { return plot.svg(); };\n    exports.getConfig = function() { return config; };\n    exports.getLiveConfig = function() {\n        return micropolar.adapter.plotly().convert(plot.getLiveConfig(), true);\n    };\n    exports.getLiveScales = function() { return {t: plot.angularScale(), r: plot.radialScale()}; };\n    exports.setUndoPoint = function() {\n        var that = this;\n        var configClone = micropolar.util.cloneJson(config);\n        (function(_configClone, _previousConfigClone) {\n            undoManager.add({\n                undo: function() {\n                    if(_previousConfigClone) that(_previousConfigClone);\n                },\n                redo: function() {\n                    that(_configClone);\n                }\n            });\n        })(configClone, previousConfigClone);\n        previousConfigClone = micropolar.util.cloneJson(configClone);\n    };\n    exports.undo = function() { undoManager.undo(); };\n    exports.redo = function() { undoManager.redo(); };\n    return exports;\n};\n\nmanager.fillLayout = function(_gd) {\n    var container = d3.select(_gd).selectAll('.plot-container');\n    var paperDiv = container.selectAll('.svg-container');\n    var paper = _gd.framework && _gd.framework.svg && _gd.framework.svg();\n    var dflts = {\n        width: 800,\n        height: 600,\n        paper_bgcolor: Color.background,\n        _container: container,\n        _paperdiv: paperDiv,\n        _paper: paper\n    };\n\n    _gd._fullLayout = extendDeepAll(dflts, _gd.layout);\n};\n\n},{\"../../../components/color\":580,\"../../../lib\":703,\"./micropolar\":821,\"./undo_manager\":823,\"d3\":157}],823:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// Modified from https://github.com/ArthurClemens/Javascript-Undo-Manager\n// Copyright (c) 2010-2013 Arthur Clemens, arthur@visiblearea.com\nmodule.exports = function UndoManager() {\n    var undoCommands = [];\n    var index = -1;\n    var isExecuting = false;\n    var callback;\n\n    function execute(command, action) {\n        if(!command) return this;\n\n        isExecuting = true;\n        command[action]();\n        isExecuting = false;\n\n        return this;\n    }\n\n    return {\n        add: function(command) {\n            if(isExecuting) return this;\n            undoCommands.splice(index + 1, undoCommands.length - index);\n            undoCommands.push(command);\n            index = undoCommands.length - 1;\n            return this;\n        },\n        setCallback: function(callbackFunc) { callback = callbackFunc; },\n        undo: function() {\n            var command = undoCommands[index];\n            if(!command) return this;\n            execute(command, 'undo');\n            index -= 1;\n            if(callback) callback(command.undo);\n            return this;\n        },\n        redo: function() {\n            var command = undoCommands[index + 1];\n            if(!command) return this;\n            execute(command, 'redo');\n            index += 1;\n            if(callback) callback(command.redo);\n            return this;\n        },\n        clear: function() {\n            undoCommands = [];\n            index = -1;\n        },\n        hasUndo: function() { return index !== -1; },\n        hasRedo: function() { return index < (undoCommands.length - 1); },\n        getCommands: function() { return undoCommands; },\n        getPreviousCommand: function() { return undoCommands[index - 1]; },\n        getIndex: function() { return index; }\n    };\n};\n\n},{}],824:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Plots = _dereq_('../plots');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar setConvertCartesian = _dereq_('../cartesian/set_convert');\nvar setConvertPolar = _dereq_('./set_convert');\nvar doAutoRange = _dereq_('../cartesian/autorange').doAutoRange;\nvar dragBox = _dereq_('../cartesian/dragbox');\nvar dragElement = _dereq_('../../components/dragelement');\nvar Fx = _dereq_('../../components/fx');\nvar Titles = _dereq_('../../components/titles');\nvar prepSelect = _dereq_('../cartesian/select').prepSelect;\nvar selectOnClick = _dereq_('../cartesian/select').selectOnClick;\nvar clearSelect = _dereq_('../cartesian/select').clearSelect;\nvar setCursor = _dereq_('../../lib/setcursor');\nvar clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');\nvar redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;\n\nvar MID_SHIFT = _dereq_('../../constants/alignment').MID_SHIFT;\nvar constants = _dereq_('./constants');\nvar helpers = _dereq_('./helpers');\n\nvar _ = Lib._;\nvar mod = Lib.mod;\nvar deg2rad = Lib.deg2rad;\nvar rad2deg = Lib.rad2deg;\n\nfunction Polar(gd, id) {\n    this.id = id;\n    this.gd = gd;\n\n    this._hasClipOnAxisFalse = null;\n    this.vangles = null;\n    this.radialAxisAngle = null;\n    this.traceHash = {};\n    this.layers = {};\n    this.clipPaths = {};\n    this.clipIds = {};\n    this.viewInitial = {};\n\n    var fullLayout = gd._fullLayout;\n    var clipIdBase = 'clip' + fullLayout._uid + id;\n\n    this.clipIds.forTraces = clipIdBase + '-for-traces';\n    this.clipPaths.forTraces = fullLayout._clips.append('clipPath')\n        .attr('id', this.clipIds.forTraces);\n    this.clipPaths.forTraces.append('path');\n\n    this.framework = fullLayout._polarlayer.append('g')\n        .attr('class', id);\n\n    // unfortunately, we have to keep track of some axis tick settings\n    // as polar subplots do not implement the 'ticks' editType\n    this.radialTickLayout = null;\n    this.angularTickLayout = null;\n}\n\nvar proto = Polar.prototype;\n\nmodule.exports = function createPolar(gd, id) {\n    return new Polar(gd, id);\n};\n\nproto.plot = function(polarCalcData, fullLayout) {\n    var _this = this;\n    var polarLayout = fullLayout[_this.id];\n\n    _this._hasClipOnAxisFalse = false;\n    for(var i = 0; i < polarCalcData.length; i++) {\n        var trace = polarCalcData[i][0].trace;\n        if(trace.cliponaxis === false) {\n            _this._hasClipOnAxisFalse = true;\n            break;\n        }\n    }\n\n    _this.updateLayers(fullLayout, polarLayout);\n    _this.updateLayout(fullLayout, polarLayout);\n    Plots.generalUpdatePerTraceModule(_this.gd, _this, polarCalcData, polarLayout);\n    _this.updateFx(fullLayout, polarLayout);\n};\n\nproto.updateLayers = function(fullLayout, polarLayout) {\n    var _this = this;\n    var layers = _this.layers;\n    var radialLayout = polarLayout.radialaxis;\n    var angularLayout = polarLayout.angularaxis;\n    var layerNames = constants.layerNames;\n\n    var frontPlotIndex = layerNames.indexOf('frontplot');\n    var layerData = layerNames.slice(0, frontPlotIndex);\n    var isAngularAxisBelowTraces = angularLayout.layer === 'below traces';\n    var isRadialAxisBelowTraces = radialLayout.layer === 'below traces';\n\n    if(isAngularAxisBelowTraces) layerData.push('angular-line');\n    if(isRadialAxisBelowTraces) layerData.push('radial-line');\n    if(isAngularAxisBelowTraces) layerData.push('angular-axis');\n    if(isRadialAxisBelowTraces) layerData.push('radial-axis');\n\n    layerData.push('frontplot');\n\n    if(!isAngularAxisBelowTraces) layerData.push('angular-line');\n    if(!isRadialAxisBelowTraces) layerData.push('radial-line');\n    if(!isAngularAxisBelowTraces) layerData.push('angular-axis');\n    if(!isRadialAxisBelowTraces) layerData.push('radial-axis');\n\n    var join = _this.framework.selectAll('.polarsublayer')\n        .data(layerData, String);\n\n    join.enter().append('g')\n        .attr('class', function(d) { return 'polarsublayer ' + d;})\n        .each(function(d) {\n            var sel = layers[d] = d3.select(this);\n\n            switch(d) {\n                case 'frontplot':\n                    // TODO add option to place in 'backplot' layer??\n                    sel.append('g').classed('barlayer', true);\n                    sel.append('g').classed('scatterlayer', true);\n                    break;\n                case 'backplot':\n                    sel.append('g').classed('maplayer', true);\n                    break;\n                case 'plotbg':\n                    layers.bg = sel.append('path');\n                    break;\n                case 'radial-grid':\n                    sel.style('fill', 'none');\n                    break;\n                case 'angular-grid':\n                    sel.style('fill', 'none');\n                    break;\n                case 'radial-line':\n                    sel.append('line').style('fill', 'none');\n                    break;\n                case 'angular-line':\n                    sel.append('path').style('fill', 'none');\n                    break;\n            }\n        });\n\n    join.order();\n};\n\n/* Polar subplots juggle with 6 'axis objects' (!), these are:\n *\n * - polarLayout.radialaxis (aka radialLayout in this file):\n * - polarLayout.angularaxis (aka angularLayout in this file):\n *   used for data -> calcdata conversions (aka d2c) during the calc step\n *\n * - this.radialAxis\n *   extends polarLayout.radialaxis, adds mocked 'domain' and\n *   few other keys in order to reuse Cartesian doAutoRange and the Axes\n *   drawing routines.\n *   used for calcdata -> geometric conversions (aka c2g) during the plot step\n *   + setGeometry setups ax.c2g for given ax.range\n *   + setScale setups ax._m,ax._b for given ax.range\n *\n * - this.angularAxis\n *   extends polarLayout.angularaxis, adds mocked 'range' and 'domain' and\n *   a few other keys in order to reuse the Axes drawing routines.\n *   used for calcdata -> geometric conversions (aka c2g) during the plot step\n *   + setGeometry setups ax.c2g given ax.rotation, ax.direction & ax._categories,\n *                 and mocks ax.range\n *   + setScale setups ax._m,ax._b with that mocked ax.range\n *\n * - this.xaxis\n * - this.yaxis\n *   setup so that polar traces can reuse plot methods of Cartesian traces\n *   which mostly rely on 2pixel methods (e.g ax.c2p)\n */\nproto.updateLayout = function(fullLayout, polarLayout) {\n    var _this = this;\n    var layers = _this.layers;\n    var gs = fullLayout._size;\n\n    // axis attributes\n    var radialLayout = polarLayout.radialaxis;\n    var angularLayout = polarLayout.angularaxis;\n    // layout domains\n    var xDomain = polarLayout.domain.x;\n    var yDomain = polarLayout.domain.y;\n    // offsets from paper edge to layout domain box\n    _this.xOffset = gs.l + gs.w * xDomain[0];\n    _this.yOffset = gs.t + gs.h * (1 - yDomain[1]);\n    // lengths of the layout domain box\n    var xLength = _this.xLength = gs.w * (xDomain[1] - xDomain[0]);\n    var yLength = _this.yLength = gs.h * (yDomain[1] - yDomain[0]);\n    // sector to plot\n    var sector = polarLayout.sector;\n    _this.sectorInRad = sector.map(deg2rad);\n    var sectorBBox = _this.sectorBBox = computeSectorBBox(sector);\n    var dxSectorBBox = sectorBBox[2] - sectorBBox[0];\n    var dySectorBBox = sectorBBox[3] - sectorBBox[1];\n    // aspect ratios\n    var arDomain = yLength / xLength;\n    var arSector = Math.abs(dySectorBBox / dxSectorBBox);\n    // actual lengths and domains of subplot box\n    var xLength2, yLength2;\n    var xDomain2, yDomain2;\n    var gap;\n    if(arDomain > arSector) {\n        xLength2 = xLength;\n        yLength2 = xLength * arSector;\n        gap = (yLength - yLength2) / gs.h / 2;\n        xDomain2 = [xDomain[0], xDomain[1]];\n        yDomain2 = [yDomain[0] + gap, yDomain[1] - gap];\n    } else {\n        xLength2 = yLength / arSector;\n        yLength2 = yLength;\n        gap = (xLength - xLength2) / gs.w / 2;\n        xDomain2 = [xDomain[0] + gap, xDomain[1] - gap];\n        yDomain2 = [yDomain[0], yDomain[1]];\n    }\n    _this.xLength2 = xLength2;\n    _this.yLength2 = yLength2;\n    _this.xDomain2 = xDomain2;\n    _this.yDomain2 = yDomain2;\n    // actual offsets from paper edge to the subplot box top-left corner\n    var xOffset2 = _this.xOffset2 = gs.l + gs.w * xDomain2[0];\n    var yOffset2 = _this.yOffset2 = gs.t + gs.h * (1 - yDomain2[1]);\n    // circle radius in px\n    var radius = _this.radius = xLength2 / dxSectorBBox;\n    // 'inner' radius in px (when polar.hole is set)\n    var innerRadius = _this.innerRadius = polarLayout.hole * radius;\n    // circle center position in px\n    var cx = _this.cx = xOffset2 - radius * sectorBBox[0];\n    var cy = _this.cy = yOffset2 + radius * sectorBBox[3];\n    // circle center in the coordinate system of plot area\n    var cxx = _this.cxx = cx - xOffset2;\n    var cyy = _this.cyy = cy - yOffset2;\n\n    _this.radialAxis = _this.mockAxis(fullLayout, polarLayout, radialLayout, {\n        // make this an 'x' axis to make positioning (especially rotation) easier\n        _id: 'x',\n        // convert to 'x' axis equivalent\n        side: {\n            counterclockwise: 'top',\n            clockwise: 'bottom'\n        }[radialLayout.side],\n        // spans length 1 radius\n        domain: [innerRadius / gs.w, radius / gs.w]\n    });\n\n    _this.angularAxis = _this.mockAxis(fullLayout, polarLayout, angularLayout, {\n        side: 'right',\n        // to get auto nticks right\n        domain: [0, Math.PI],\n        // don't pass through autorange logic\n        autorange: false\n    });\n\n    _this.doAutoRange(fullLayout, polarLayout);\n    // N.B. this sets _this.vangles\n    _this.updateAngularAxis(fullLayout, polarLayout);\n    // N.B. this sets _this.radialAxisAngle\n    _this.updateRadialAxis(fullLayout, polarLayout);\n    _this.updateRadialAxisTitle(fullLayout, polarLayout);\n\n    _this.xaxis = _this.mockCartesianAxis(fullLayout, polarLayout, {\n        _id: 'x',\n        domain: xDomain2\n    });\n\n    _this.yaxis = _this.mockCartesianAxis(fullLayout, polarLayout, {\n        _id: 'y',\n        domain: yDomain2\n    });\n\n    var dPath = _this.pathSubplot();\n\n    _this.clipPaths.forTraces.select('path')\n        .attr('d', dPath)\n        .attr('transform', strTranslate(cxx, cyy));\n\n    layers.frontplot\n        .attr('transform', strTranslate(xOffset2, yOffset2))\n        .call(Drawing.setClipUrl, _this._hasClipOnAxisFalse ? null : _this.clipIds.forTraces, _this.gd);\n\n    layers.bg\n        .attr('d', dPath)\n        .attr('transform', strTranslate(cx, cy))\n        .call(Color.fill, polarLayout.bgcolor);\n};\n\nproto.mockAxis = function(fullLayout, polarLayout, axLayout, opts) {\n    var commonOpts = {\n        // to get _boundingBox computation right when showticklabels is false\n        anchor: 'free',\n        position: 0\n    };\n\n    var ax = Lib.extendFlat(commonOpts, axLayout, opts);\n    setConvertPolar(ax, polarLayout, fullLayout);\n    return ax;\n};\n\nproto.mockCartesianAxis = function(fullLayout, polarLayout, opts) {\n    var _this = this;\n    var axId = opts._id;\n\n    var ax = Lib.extendFlat({type: 'linear'}, opts);\n    setConvertCartesian(ax, fullLayout);\n\n    var bboxIndices = {\n        x: [0, 2],\n        y: [1, 3]\n    };\n\n    ax.setRange = function() {\n        var sectorBBox = _this.sectorBBox;\n        var ind = bboxIndices[axId];\n        var rl = _this.radialAxis._rl;\n        var drl = (rl[1] - rl[0]) / (1 - polarLayout.hole);\n        ax.range = [sectorBBox[ind[0]] * drl, sectorBBox[ind[1]] * drl];\n    };\n\n    ax.isPtWithinRange = axId === 'x' ?\n        function(d) { return _this.isPtInside(d); } :\n        function() { return true; };\n\n    ax.setRange();\n    ax.setScale();\n    return ax;\n};\n\nproto.doAutoRange = function(fullLayout, polarLayout) {\n    var gd = this.gd;\n    var radialAxis = this.radialAxis;\n    var radialLayout = polarLayout.radialaxis;\n\n    radialAxis.setScale();\n    doAutoRange(gd, radialAxis);\n\n    var rng = radialAxis.range;\n    radialLayout.range = rng.slice();\n    radialLayout._input.range = rng.slice();\n\n    radialAxis._rl = [\n        radialAxis.r2l(rng[0], null, 'gregorian'),\n        radialAxis.r2l(rng[1], null, 'gregorian')\n    ];\n};\n\nproto.updateRadialAxis = function(fullLayout, polarLayout) {\n    var _this = this;\n    var gd = _this.gd;\n    var layers = _this.layers;\n    var radius = _this.radius;\n    var innerRadius = _this.innerRadius;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var radialLayout = polarLayout.radialaxis;\n    var a0 = mod(polarLayout.sector[0], 360);\n    var ax = _this.radialAxis;\n    var hasRoomForIt = innerRadius < radius;\n\n    _this.fillViewInitialKey('radialaxis.angle', radialLayout.angle);\n    _this.fillViewInitialKey('radialaxis.range', ax.range.slice());\n\n    ax.setGeometry();\n\n    // rotate auto tick labels by 180 if in quadrant II and III to make them\n    // readable from left-to-right\n    //\n    // TODO try moving deeper in Axes.drawLabels for better results?\n    if(ax.tickangle === 'auto' && (a0 > 90 && a0 <= 270)) {\n        ax.tickangle = 180;\n    }\n\n    // easier to set rotate angle with custom translate function\n    var transFn = function(d) {\n        return 'translate(' + (ax.l2p(d.x) + innerRadius) + ',0)';\n    };\n\n    // set special grid path function\n    var gridPathFn = function(d) {\n        return _this.pathArc(ax.r2p(d.x) + innerRadius);\n    };\n\n    var newTickLayout = strTickLayout(radialLayout);\n    if(_this.radialTickLayout !== newTickLayout) {\n        layers['radial-axis'].selectAll('.xtick').remove();\n        _this.radialTickLayout = newTickLayout;\n    }\n\n    if(hasRoomForIt) {\n        ax.setScale();\n\n        var vals = Axes.calcTicks(ax);\n        var valsClipped = Axes.clipEnds(ax, vals);\n        var tickSign = Axes.getTickSigns(ax)[2];\n\n        Axes.drawTicks(gd, ax, {\n            vals: vals,\n            layer: layers['radial-axis'],\n            path: Axes.makeTickPath(ax, 0, tickSign),\n            transFn: transFn,\n            crisp: false\n        });\n\n        Axes.drawGrid(gd, ax, {\n            vals: valsClipped,\n            layer: layers['radial-grid'],\n            path: gridPathFn,\n            transFn: Lib.noop,\n            crisp: false\n        });\n\n        Axes.drawLabels(gd, ax, {\n            vals: vals,\n            layer: layers['radial-axis'],\n            transFn: transFn,\n            labelFns: Axes.makeLabelFns(ax, 0)\n        });\n    }\n\n    // stash 'actual' radial axis angle for drag handlers (in degrees)\n    var angle = _this.radialAxisAngle = _this.vangles ?\n        rad2deg(snapToVertexAngle(deg2rad(radialLayout.angle), _this.vangles)) :\n        radialLayout.angle;\n\n    var tLayer = strTranslate(cx, cy);\n    var tLayer2 = tLayer + strRotate(-angle);\n\n    updateElement(\n        layers['radial-axis'],\n        hasRoomForIt && (radialLayout.showticklabels || radialLayout.ticks),\n        {transform: tLayer2}\n    );\n\n    updateElement(\n        layers['radial-grid'],\n        hasRoomForIt && radialLayout.showgrid,\n        {transform: tLayer}\n    );\n\n    updateElement(\n        layers['radial-line'].select('line'),\n        hasRoomForIt && radialLayout.showline,\n        {\n            x1: innerRadius,\n            y1: 0,\n            x2: radius,\n            y2: 0,\n            transform: tLayer2\n        }\n    )\n    .attr('stroke-width', radialLayout.linewidth)\n    .call(Color.stroke, radialLayout.linecolor);\n};\n\nproto.updateRadialAxisTitle = function(fullLayout, polarLayout, _angle) {\n    var _this = this;\n    var gd = _this.gd;\n    var radius = _this.radius;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var radialLayout = polarLayout.radialaxis;\n    var titleClass = _this.id + 'title';\n\n    var angle = _angle !== undefined ? _angle : _this.radialAxisAngle;\n    var angleRad = deg2rad(angle);\n    var cosa = Math.cos(angleRad);\n    var sina = Math.sin(angleRad);\n\n    var pad = 0;\n\n    // Hint: no need to check if there is in fact a title.text set\n    // because if plot is editable, pad needs to be calculated anyways\n    // to properly show placeholder text when title is empty.\n    if(radialLayout.title) {\n        var h = Drawing.bBox(_this.layers['radial-axis'].node()).height;\n        var ts = radialLayout.title.font.size;\n        pad = radialLayout.side === 'counterclockwise' ?\n            -h - ts * 0.4 :\n            h + ts * 0.8;\n    }\n\n    _this.layers['radial-axis-title'] = Titles.draw(gd, titleClass, {\n        propContainer: radialLayout,\n        propName: _this.id + '.radialaxis.title',\n        placeholder: _(gd, 'Click to enter radial axis title'),\n        attributes: {\n            x: cx + (radius / 2) * cosa + pad * sina,\n            y: cy - (radius / 2) * sina + pad * cosa,\n            'text-anchor': 'middle'\n        },\n        transform: {rotate: -angle}\n    });\n};\n\nproto.updateAngularAxis = function(fullLayout, polarLayout) {\n    var _this = this;\n    var gd = _this.gd;\n    var layers = _this.layers;\n    var radius = _this.radius;\n    var innerRadius = _this.innerRadius;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var angularLayout = polarLayout.angularaxis;\n    var ax = _this.angularAxis;\n\n    _this.fillViewInitialKey('angularaxis.rotation', angularLayout.rotation);\n\n    ax.setGeometry();\n    ax.setScale();\n\n    // 't'ick to 'g'eometric radians is used all over the place here\n    var t2g = function(d) { return ax.t2g(d.x); };\n\n    // run rad2deg on tick0 and ditck for thetaunit: 'radians' axes\n    if(ax.type === 'linear' && ax.thetaunit === 'radians') {\n        ax.tick0 = rad2deg(ax.tick0);\n        ax.dtick = rad2deg(ax.dtick);\n    }\n\n    var _transFn = function(rad) {\n        return strTranslate(cx + radius * Math.cos(rad), cy - radius * Math.sin(rad));\n    };\n\n    var transFn = function(d) {\n        return _transFn(t2g(d));\n    };\n\n    var transFn2 = function(d) {\n        var rad = t2g(d);\n        return _transFn(rad) + strRotate(-rad2deg(rad));\n    };\n\n    var gridPathFn = function(d) {\n        var rad = t2g(d);\n        var cosRad = Math.cos(rad);\n        var sinRad = Math.sin(rad);\n        return 'M' + [cx + innerRadius * cosRad, cy - innerRadius * sinRad] +\n            'L' + [cx + radius * cosRad, cy - radius * sinRad];\n    };\n\n    var out = Axes.makeLabelFns(ax, 0);\n    var labelStandoff = out.labelStandoff;\n    var labelFns = {};\n\n    labelFns.xFn = function(d) {\n        var rad = t2g(d);\n        return Math.cos(rad) * labelStandoff;\n    };\n\n    labelFns.yFn = function(d) {\n        var rad = t2g(d);\n        var ff = Math.sin(rad) > 0 ? 0.2 : 1;\n        return -Math.sin(rad) * (labelStandoff + d.fontSize * ff) +\n            Math.abs(Math.cos(rad)) * (d.fontSize * MID_SHIFT);\n    };\n\n    labelFns.anchorFn = function(d) {\n        var rad = t2g(d);\n        var cos = Math.cos(rad);\n        return Math.abs(cos) < 0.1 ?\n            'middle' :\n            (cos > 0 ? 'start' : 'end');\n    };\n\n    labelFns.heightFn = function(d, a, h) {\n        var rad = t2g(d);\n        return -0.5 * (1 + Math.sin(rad)) * h;\n    };\n\n    var newTickLayout = strTickLayout(angularLayout);\n    if(_this.angularTickLayout !== newTickLayout) {\n        layers['angular-axis'].selectAll('.' + ax._id + 'tick').remove();\n        _this.angularTickLayout = newTickLayout;\n    }\n\n    var vals = Axes.calcTicks(ax);\n\n    // angle of polygon vertices in geometric radians (null means circles)\n    // TODO what to do when ax.period > ax._categories ??\n    var vangles;\n    if(polarLayout.gridshape === 'linear') {\n        vangles = vals.map(t2g);\n\n        // ax._vals should be always ordered, make them\n        // always turn counterclockwise for convenience here\n        if(Lib.angleDelta(vangles[0], vangles[1]) < 0) {\n            vangles = vangles.slice().reverse();\n        }\n    } else {\n        vangles = null;\n    }\n    _this.vangles = vangles;\n\n    // Use tickval filter for category axes instead of tweaking\n    // the range w.r.t sector, so that sectors that cross 360 can\n    // show all their ticks.\n    if(ax.type === 'category') {\n        vals = vals.filter(function(d) {\n            return Lib.isAngleInsideSector(t2g(d), _this.sectorInRad);\n        });\n    }\n\n    if(ax.visible) {\n        var tickSign = ax.ticks === 'inside' ? -1 : 1;\n        var pad = (ax.linewidth || 1) / 2;\n\n        Axes.drawTicks(gd, ax, {\n            vals: vals,\n            layer: layers['angular-axis'],\n            path: 'M' + (tickSign * pad) + ',0h' + (tickSign * ax.ticklen),\n            transFn: transFn2,\n            crisp: false\n        });\n\n        Axes.drawGrid(gd, ax, {\n            vals: vals,\n            layer: layers['angular-grid'],\n            path: gridPathFn,\n            transFn: Lib.noop,\n            crisp: false\n        });\n\n        Axes.drawLabels(gd, ax, {\n            vals: vals,\n            layer: layers['angular-axis'],\n            repositionOnUpdate: true,\n            transFn: transFn,\n            labelFns: labelFns\n        });\n    }\n\n    // TODO maybe two arcs is better here?\n    // maybe split style attributes between inner and outer angular axes?\n\n    updateElement(layers['angular-line'].select('path'), angularLayout.showline, {\n        d: _this.pathSubplot(),\n        transform: strTranslate(cx, cy)\n    })\n    .attr('stroke-width', angularLayout.linewidth)\n    .call(Color.stroke, angularLayout.linecolor);\n};\n\nproto.updateFx = function(fullLayout, polarLayout) {\n    if(!this.gd._context.staticPlot) {\n        this.updateAngularDrag(fullLayout);\n        this.updateRadialDrag(fullLayout, polarLayout, 0);\n        this.updateRadialDrag(fullLayout, polarLayout, 1);\n        this.updateMainDrag(fullLayout);\n    }\n};\n\nproto.updateMainDrag = function(fullLayout) {\n    var _this = this;\n    var gd = _this.gd;\n    var layers = _this.layers;\n    var zoomlayer = fullLayout._zoomlayer;\n    var MINZOOM = constants.MINZOOM;\n    var OFFEDGE = constants.OFFEDGE;\n    var radius = _this.radius;\n    var innerRadius = _this.innerRadius;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var cxx = _this.cxx;\n    var cyy = _this.cyy;\n    var sectorInRad = _this.sectorInRad;\n    var vangles = _this.vangles;\n    var radialAxis = _this.radialAxis;\n    var clampTiny = helpers.clampTiny;\n    var findXYatLength = helpers.findXYatLength;\n    var findEnclosingVertexAngles = helpers.findEnclosingVertexAngles;\n    var chw = constants.cornerHalfWidth;\n    var chl = constants.cornerLen / 2;\n\n    var mainDrag = dragBox.makeDragger(layers, 'path', 'maindrag', 'crosshair');\n\n    d3.select(mainDrag)\n        .attr('d', _this.pathSubplot())\n        .attr('transform', strTranslate(cx, cy));\n\n    var dragOpts = {\n        element: mainDrag,\n        gd: gd,\n        subplot: _this.id,\n        plotinfo: {\n            id: _this.id,\n            xaxis: _this.xaxis,\n            yaxis: _this.yaxis\n        },\n        xaxes: [_this.xaxis],\n        yaxes: [_this.yaxis]\n    };\n\n    // mouse px position at drag start (0), move (1)\n    var x0, y0;\n    // radial distance from circle center at drag start (0), move (1)\n    var r0, r1;\n    // zoombox persistent quantities\n    var path0, dimmed, lum;\n    // zoombox, corners elements\n    var zb, corners;\n\n    function norm(x, y) {\n        return Math.sqrt(x * x + y * y);\n    }\n\n    function xy2r(x, y) {\n        return norm(x - cxx, y - cyy);\n    }\n\n    function xy2a(x, y) {\n        return Math.atan2(cyy - y, x - cxx);\n    }\n\n    function ra2xy(r, a) {\n        return [r * Math.cos(a), r * Math.sin(-a)];\n    }\n\n    function pathCorner(r, a) {\n        if(r === 0) return _this.pathSector(2 * chw);\n\n        var da = chl / r;\n        var am = a - da;\n        var ap = a + da;\n        var rb = Math.max(0, Math.min(r, radius));\n        var rm = rb - chw;\n        var rp = rb + chw;\n\n        return 'M' + ra2xy(rm, am) +\n            'A' + [rm, rm] + ' 0,0,0 ' + ra2xy(rm, ap) +\n            'L' + ra2xy(rp, ap) +\n            'A' + [rp, rp] + ' 0,0,1 ' + ra2xy(rp, am) +\n            'Z';\n    }\n\n    // (x,y) is the pt at middle of the va0 <-> va1 edge\n    //\n    // ... we could eventually add another mode for cursor\n    // angles 'close to' enough to a particular vertex.\n    function pathCornerForPolygons(r, va0, va1) {\n        if(r === 0) return _this.pathSector(2 * chw);\n\n        var xy0 = ra2xy(r, va0);\n        var xy1 = ra2xy(r, va1);\n        var x = clampTiny((xy0[0] + xy1[0]) / 2);\n        var y = clampTiny((xy0[1] + xy1[1]) / 2);\n        var innerPts, outerPts;\n\n        if(x && y) {\n            var m = y / x;\n            var mperp = -1 / m;\n            var midPts = findXYatLength(chw, m, x, y);\n            innerPts = findXYatLength(chl, mperp, midPts[0][0], midPts[0][1]);\n            outerPts = findXYatLength(chl, mperp, midPts[1][0], midPts[1][1]);\n        } else {\n            var dx, dy;\n            if(y) {\n                // horizontal handles\n                dx = chl;\n                dy = chw;\n            } else {\n                // vertical handles\n                dx = chw;\n                dy = chl;\n            }\n            innerPts = [[x - dx, y - dy], [x + dx, y - dy]];\n            outerPts = [[x - dx, y + dy], [x + dx, y + dy]];\n        }\n\n        return 'M' + innerPts.join('L') +\n            'L' + outerPts.reverse().join('L') + 'Z';\n    }\n\n    function zoomPrep() {\n        r0 = null;\n        r1 = null;\n        path0 = _this.pathSubplot();\n        dimmed = false;\n\n        var polarLayoutNow = gd._fullLayout[_this.id];\n        lum = tinycolor(polarLayoutNow.bgcolor).getLuminance();\n\n        zb = dragBox.makeZoombox(zoomlayer, lum, cx, cy, path0);\n        zb.attr('fill-rule', 'evenodd');\n        corners = dragBox.makeCorners(zoomlayer, cx, cy);\n        clearSelect(gd);\n    }\n\n    // N.B. this sets scoped 'r0' and 'r1'\n    // return true if 'valid' zoom distance, false otherwise\n    function clampAndSetR0R1(rr0, rr1) {\n        rr1 = Math.max(Math.min(rr1, radius), innerRadius);\n\n        // starting or ending drag near center (outer edge),\n        // clamps radial distance at origin (at r=radius)\n        if(rr0 < OFFEDGE) rr0 = 0;\n        else if((radius - rr0) < OFFEDGE) rr0 = radius;\n        else if(rr1 < OFFEDGE) rr1 = 0;\n        else if((radius - rr1) < OFFEDGE) rr1 = radius;\n\n        // make sure r0 < r1,\n        // to get correct fill pattern in path1 below\n        if(Math.abs(rr1 - rr0) > MINZOOM) {\n            if(rr0 < rr1) {\n                r0 = rr0;\n                r1 = rr1;\n            } else {\n                r0 = rr1;\n                r1 = rr0;\n            }\n            return true;\n        } else {\n            r0 = null;\n            r1 = null;\n            return false;\n        }\n    }\n\n    function applyZoomMove(path1, cpath) {\n        path1 = path1 || path0;\n        cpath = cpath || 'M0,0Z';\n\n        zb.attr('d', path1);\n        corners.attr('d', cpath);\n        dragBox.transitionZoombox(zb, corners, dimmed, lum);\n        dimmed = true;\n\n        var updateObj = {};\n        computeZoomUpdates(updateObj);\n        gd.emit('plotly_relayouting', updateObj);\n    }\n\n    function zoomMove(dx, dy) {\n        var x1 = x0 + dx;\n        var y1 = y0 + dy;\n        var rr0 = xy2r(x0, y0);\n        var rr1 = Math.min(xy2r(x1, y1), radius);\n        var a0 = xy2a(x0, y0);\n        var path1;\n        var cpath;\n\n        if(clampAndSetR0R1(rr0, rr1)) {\n            path1 = path0 + _this.pathSector(r1);\n            if(r0) path1 += _this.pathSector(r0);\n            // keep 'starting' angle\n            cpath = pathCorner(r0, a0) + pathCorner(r1, a0);\n        }\n        applyZoomMove(path1, cpath);\n    }\n\n    function findPolygonRadius(x, y, va0, va1) {\n        var xy = helpers.findIntersectionXY(va0, va1, va0, [x - cxx, cyy - y]);\n        return norm(xy[0], xy[1]);\n    }\n\n    function zoomMoveForPolygons(dx, dy) {\n        var x1 = x0 + dx;\n        var y1 = y0 + dy;\n        var a0 = xy2a(x0, y0);\n        var a1 = xy2a(x1, y1);\n        var vangles0 = findEnclosingVertexAngles(a0, vangles);\n        var vangles1 = findEnclosingVertexAngles(a1, vangles);\n        var rr0 = findPolygonRadius(x0, y0, vangles0[0], vangles0[1]);\n        var rr1 = Math.min(findPolygonRadius(x1, y1, vangles1[0], vangles1[1]), radius);\n        var path1;\n        var cpath;\n\n        if(clampAndSetR0R1(rr0, rr1)) {\n            path1 = path0 + _this.pathSector(r1);\n            if(r0) path1 += _this.pathSector(r0);\n            // keep 'starting' angle here too\n            cpath = [\n                pathCornerForPolygons(r0, vangles0[0], vangles0[1]),\n                pathCornerForPolygons(r1, vangles0[0], vangles0[1])\n            ].join(' ');\n        }\n        applyZoomMove(path1, cpath);\n    }\n\n    function zoomDone() {\n        dragBox.removeZoombox(gd);\n\n        if(r0 === null || r1 === null) return;\n        var updateObj = {};\n        computeZoomUpdates(updateObj);\n\n        dragBox.showDoubleClickNotifier(gd);\n\n        Registry.call('_guiRelayout', gd, updateObj);\n    }\n\n    function computeZoomUpdates(update) {\n        var rl = radialAxis._rl;\n        var m = (rl[1] - rl[0]) / (1 - innerRadius / radius) / radius;\n        var newRng = [\n            rl[0] + (r0 - innerRadius) * m,\n            rl[0] + (r1 - innerRadius) * m\n        ];\n        update[_this.id + '.radialaxis.range'] = newRng;\n    }\n\n    function zoomClick(numClicks, evt) {\n        var clickMode = gd._fullLayout.clickmode;\n\n        dragBox.removeZoombox(gd);\n\n        // TODO double once vs twice logic (autorange vs fixed range)\n        if(numClicks === 2) {\n            var updateObj = {};\n            for(var k in _this.viewInitial) {\n                updateObj[_this.id + '.' + k] = _this.viewInitial[k];\n            }\n\n            gd.emit('plotly_doubleclick', null);\n            Registry.call('_guiRelayout', gd, updateObj);\n        }\n\n        if(clickMode.indexOf('select') > -1 && numClicks === 1) {\n            selectOnClick(evt, gd, [_this.xaxis], [_this.yaxis], _this.id, dragOpts);\n        }\n\n        if(clickMode.indexOf('event') > -1) {\n            Fx.click(gd, evt, _this.id);\n        }\n    }\n\n    dragOpts.prepFn = function(evt, startX, startY) {\n        var dragModeNow = gd._fullLayout.dragmode;\n\n        var bbox = mainDrag.getBoundingClientRect();\n        x0 = startX - bbox.left;\n        y0 = startY - bbox.top;\n\n        // need to offset x/y as bbox center does not\n        // match origin for asymmetric polygons\n        if(vangles) {\n            var offset = helpers.findPolygonOffset(radius, sectorInRad[0], sectorInRad[1], vangles);\n            x0 += cxx + offset[0];\n            y0 += cyy + offset[1];\n        }\n\n        switch(dragModeNow) {\n            case 'zoom':\n                if(vangles) {\n                    dragOpts.moveFn = zoomMoveForPolygons;\n                } else {\n                    dragOpts.moveFn = zoomMove;\n                }\n                dragOpts.clickFn = zoomClick;\n                dragOpts.doneFn = zoomDone;\n                zoomPrep(evt, startX, startY);\n                break;\n            case 'select':\n            case 'lasso':\n                prepSelect(evt, startX, startY, dragOpts, dragModeNow);\n                break;\n        }\n    };\n\n    mainDrag.onmousemove = function(evt) {\n        Fx.hover(gd, evt, _this.id);\n        gd._fullLayout._lasthover = mainDrag;\n        gd._fullLayout._hoversubplot = _this.id;\n    };\n\n    mainDrag.onmouseout = function(evt) {\n        if(gd._dragging) return;\n        dragElement.unhover(gd, evt);\n    };\n\n    dragElement.init(dragOpts);\n};\n\nproto.updateRadialDrag = function(fullLayout, polarLayout, rngIndex) {\n    var _this = this;\n    var gd = _this.gd;\n    var layers = _this.layers;\n    var radius = _this.radius;\n    var innerRadius = _this.innerRadius;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var radialAxis = _this.radialAxis;\n    var bl = constants.radialDragBoxSize;\n    var bl2 = bl / 2;\n\n    if(!radialAxis.visible) return;\n\n    var angle0 = deg2rad(_this.radialAxisAngle);\n    var rl = radialAxis._rl;\n    var rl0 = rl[0];\n    var rl1 = rl[1];\n    var rbase = rl[rngIndex];\n    var m = 0.75 * (rl[1] - rl[0]) / (1 - polarLayout.hole) / radius;\n\n    var tx, ty, className;\n    if(rngIndex) {\n        tx = cx + (radius + bl2) * Math.cos(angle0);\n        ty = cy - (radius + bl2) * Math.sin(angle0);\n        className = 'radialdrag';\n    } else {\n        // the 'inner' box can get called:\n        // - when polar.hole>0\n        // - when polar.sector isn't a full circle\n        // otherwise it is hidden behind the main drag.\n        tx = cx + (innerRadius - bl2) * Math.cos(angle0);\n        ty = cy - (innerRadius - bl2) * Math.sin(angle0);\n        className = 'radialdrag-inner';\n    }\n\n    var radialDrag = dragBox.makeRectDragger(layers, className, 'crosshair', -bl2, -bl2, bl, bl);\n    var dragOpts = {element: radialDrag, gd: gd};\n\n    updateElement(d3.select(radialDrag), radialAxis.visible && innerRadius < radius, {\n        transform: strTranslate(tx, ty)\n    });\n\n    // move function (either rotate or re-range flavor)\n    var moveFn2;\n    // rotate angle on done\n    var angle1;\n    // re-range range[1] (or range[0]) on done\n    var rprime;\n\n    function moveFn(dx, dy) {\n        if(moveFn2) {\n            moveFn2(dx, dy);\n        } else {\n            var dvec = [dx, -dy];\n            var rvec = [Math.cos(angle0), Math.sin(angle0)];\n            var comp = Math.abs(Lib.dot(dvec, rvec) / Math.sqrt(Lib.dot(dvec, dvec)));\n\n            // mostly perpendicular motions rotate,\n            // mostly parallel motions re-range\n            if(!isNaN(comp)) {\n                moveFn2 = comp < 0.5 ? rotateMove : rerangeMove;\n            }\n        }\n\n        var update = {};\n        computeRadialAxisUpdates(update);\n        gd.emit('plotly_relayouting', update);\n    }\n\n    function computeRadialAxisUpdates(update) {\n        if(angle1 !== null) {\n            update[_this.id + '.radialaxis.angle'] = angle1;\n        } else if(rprime !== null) {\n            update[_this.id + '.radialaxis.range[' + rngIndex + ']'] = rprime;\n        }\n    }\n\n    function doneFn() {\n        if(angle1 !== null) {\n            Registry.call('_guiRelayout', gd, _this.id + '.radialaxis.angle', angle1);\n        } else if(rprime !== null) {\n            Registry.call('_guiRelayout', gd, _this.id + '.radialaxis.range[' + rngIndex + ']', rprime);\n        }\n    }\n\n    function rotateMove(dx, dy) {\n        // disable for inner drag boxes\n        if(rngIndex === 0) return;\n\n        var x1 = tx + dx;\n        var y1 = ty + dy;\n\n        angle1 = Math.atan2(cy - y1, x1 - cx);\n        if(_this.vangles) angle1 = snapToVertexAngle(angle1, _this.vangles);\n        angle1 = rad2deg(angle1);\n\n        var transform = strTranslate(cx, cy) + strRotate(-angle1);\n        layers['radial-axis'].attr('transform', transform);\n        layers['radial-line'].select('line').attr('transform', transform);\n\n        var fullLayoutNow = _this.gd._fullLayout;\n        var polarLayoutNow = fullLayoutNow[_this.id];\n        _this.updateRadialAxisTitle(fullLayoutNow, polarLayoutNow, angle1);\n    }\n\n    function rerangeMove(dx, dy) {\n        // project (dx, dy) unto unit radial axis vector\n        var dr = Lib.dot([dx, -dy], [Math.cos(angle0), Math.sin(angle0)]);\n        rprime = rbase - m * dr;\n\n        // make sure rprime does not change the range[0] -> range[1] sign\n        if((m > 0) !== (rngIndex ? rprime > rl0 : rprime < rl1)) {\n            rprime = null;\n            return;\n        }\n\n        var fullLayoutNow = gd._fullLayout;\n        var polarLayoutNow = fullLayoutNow[_this.id];\n\n        // update radial range -> update c2g -> update _m,_b\n        radialAxis.range[rngIndex] = rprime;\n        radialAxis._rl[rngIndex] = rprime;\n        _this.updateRadialAxis(fullLayoutNow, polarLayoutNow);\n\n        _this.xaxis.setRange();\n        _this.xaxis.setScale();\n        _this.yaxis.setRange();\n        _this.yaxis.setScale();\n\n        var hasRegl = false;\n\n        for(var traceType in _this.traceHash) {\n            var moduleCalcData = _this.traceHash[traceType];\n            var moduleCalcDataVisible = Lib.filterVisible(moduleCalcData);\n            var _module = moduleCalcData[0][0].trace._module;\n            _module.plot(gd, _this, moduleCalcDataVisible, polarLayoutNow);\n            if(Registry.traceIs(traceType, 'gl') && moduleCalcDataVisible.length) hasRegl = true;\n        }\n\n        if(hasRegl) {\n            clearGlCanvases(gd);\n            redrawReglTraces(gd);\n        }\n    }\n\n    dragOpts.prepFn = function() {\n        moveFn2 = null;\n        angle1 = null;\n        rprime = null;\n\n        dragOpts.moveFn = moveFn;\n        dragOpts.doneFn = doneFn;\n\n        clearSelect(gd);\n    };\n\n    dragOpts.clampFn = function(dx, dy) {\n        if(Math.sqrt(dx * dx + dy * dy) < constants.MINDRAG) {\n            dx = 0;\n            dy = 0;\n        }\n        return [dx, dy];\n    };\n\n    dragElement.init(dragOpts);\n};\n\nproto.updateAngularDrag = function(fullLayout) {\n    var _this = this;\n    var gd = _this.gd;\n    var layers = _this.layers;\n    var radius = _this.radius;\n    var angularAxis = _this.angularAxis;\n    var cx = _this.cx;\n    var cy = _this.cy;\n    var cxx = _this.cxx;\n    var cyy = _this.cyy;\n    var dbs = constants.angularDragBoxSize;\n\n    var angularDrag = dragBox.makeDragger(layers, 'path', 'angulardrag', 'move');\n    var dragOpts = {element: angularDrag, gd: gd};\n\n    d3.select(angularDrag)\n        .attr('d', _this.pathAnnulus(radius, radius + dbs))\n        .attr('transform', strTranslate(cx, cy))\n        .call(setCursor, 'move');\n\n    function xy2a(x, y) {\n        return Math.atan2(cyy + dbs - y, x - cxx - dbs);\n    }\n\n    // scatter trace, points and textpoints selections\n    var scatterTraces = layers.frontplot.select('.scatterlayer').selectAll('.trace');\n    var scatterPoints = scatterTraces.selectAll('.point');\n    var scatterTextPoints = scatterTraces.selectAll('.textpoint');\n\n    // mouse px position at drag start (0), move (1)\n    var x0, y0;\n    // angular axis angle rotation at drag start (0), move (1)\n    var rot0, rot1;\n    // induced radial axis rotation (only used on polygon grids)\n    var rrot1;\n    // angle about circle center at drag start\n    var a0;\n\n    function moveFn(dx, dy) {\n        var fullLayoutNow = _this.gd._fullLayout;\n        var polarLayoutNow = fullLayoutNow[_this.id];\n\n        var x1 = x0 + dx;\n        var y1 = y0 + dy;\n        var a1 = xy2a(x1, y1);\n        var da = rad2deg(a1 - a0);\n        rot1 = rot0 + da;\n\n        layers.frontplot.attr('transform',\n            strTranslate(_this.xOffset2, _this.yOffset2) + strRotate([-da, cxx, cyy])\n        );\n\n        if(_this.vangles) {\n            rrot1 = _this.radialAxisAngle + da;\n\n            var trans = strTranslate(cx, cy) + strRotate(-da);\n            var trans2 = strTranslate(cx, cy) + strRotate(-rrot1);\n\n            layers.bg.attr('transform', trans);\n            layers['radial-grid'].attr('transform', trans);\n            layers['radial-axis'].attr('transform', trans2);\n            layers['radial-line'].select('line').attr('transform', trans2);\n            _this.updateRadialAxisTitle(fullLayoutNow, polarLayoutNow, rrot1);\n        } else {\n            _this.clipPaths.forTraces.select('path').attr('transform',\n                strTranslate(cxx, cyy) + strRotate(da)\n            );\n        }\n\n        // 'un-rotate' marker and text points\n        scatterPoints.each(function() {\n            var sel = d3.select(this);\n            var xy = Drawing.getTranslate(sel);\n            sel.attr('transform', strTranslate(xy.x, xy.y) + strRotate([da]));\n        });\n        scatterTextPoints.each(function() {\n            var sel = d3.select(this);\n            var tx = sel.select('text');\n            var xy = Drawing.getTranslate(sel);\n            // N.B rotate -> translate ordering matters\n            sel.attr('transform', strRotate([da, tx.attr('x'), tx.attr('y')]) + strTranslate(xy.x, xy.y));\n        });\n\n        // update rotation -> range -> _m,_b\n        angularAxis.rotation = Lib.modHalf(rot1, 360);\n        _this.updateAngularAxis(fullLayoutNow, polarLayoutNow);\n\n        if(_this._hasClipOnAxisFalse && !Lib.isFullCircle(_this.sectorInRad)) {\n            scatterTraces.call(Drawing.hideOutsideRangePoints, _this);\n        }\n\n        var hasRegl = false;\n\n        for(var traceType in _this.traceHash) {\n            if(Registry.traceIs(traceType, 'gl')) {\n                var moduleCalcData = _this.traceHash[traceType];\n                var moduleCalcDataVisible = Lib.filterVisible(moduleCalcData);\n                var _module = moduleCalcData[0][0].trace._module;\n                _module.plot(gd, _this, moduleCalcDataVisible, polarLayoutNow);\n                if(moduleCalcDataVisible.length) hasRegl = true;\n            }\n        }\n\n        if(hasRegl) {\n            clearGlCanvases(gd);\n            redrawReglTraces(gd);\n        }\n\n        var update = {};\n        computeRotationUpdates(update);\n        gd.emit('plotly_relayouting', update);\n    }\n\n    function computeRotationUpdates(updateObj) {\n        updateObj[_this.id + '.angularaxis.rotation'] = rot1;\n\n        if(_this.vangles) {\n            updateObj[_this.id + '.radialaxis.angle'] = rrot1;\n        }\n    }\n\n    function doneFn() {\n        scatterTextPoints.select('text').attr('transform', null);\n\n        var updateObj = {};\n        computeRotationUpdates(updateObj);\n        Registry.call('_guiRelayout', gd, updateObj);\n    }\n\n    dragOpts.prepFn = function(evt, startX, startY) {\n        var polarLayoutNow = fullLayout[_this.id];\n        rot0 = polarLayoutNow.angularaxis.rotation;\n\n        var bbox = angularDrag.getBoundingClientRect();\n        x0 = startX - bbox.left;\n        y0 = startY - bbox.top;\n        a0 = xy2a(x0, y0);\n\n        dragOpts.moveFn = moveFn;\n        dragOpts.doneFn = doneFn;\n\n        clearSelect(gd);\n    };\n\n    // I don't what we should do in this case, skip we now\n    if(_this.vangles && !Lib.isFullCircle(_this.sectorInRad)) {\n        dragOpts.prepFn = Lib.noop;\n        setCursor(d3.select(angularDrag), null);\n    }\n\n    dragElement.init(dragOpts);\n};\n\nproto.isPtInside = function(d) {\n    var sectorInRad = this.sectorInRad;\n    var vangles = this.vangles;\n    var thetag = this.angularAxis.c2g(d.theta);\n    var radialAxis = this.radialAxis;\n    var r = radialAxis.c2l(d.r);\n    var rl = radialAxis._rl;\n\n    var fn = vangles ? helpers.isPtInsidePolygon : Lib.isPtInsideSector;\n    return fn(r, thetag, rl, sectorInRad, vangles);\n};\n\nproto.pathArc = function(r) {\n    var sectorInRad = this.sectorInRad;\n    var vangles = this.vangles;\n    var fn = vangles ? helpers.pathPolygon : Lib.pathArc;\n    return fn(r, sectorInRad[0], sectorInRad[1], vangles);\n};\n\nproto.pathSector = function(r) {\n    var sectorInRad = this.sectorInRad;\n    var vangles = this.vangles;\n    var fn = vangles ? helpers.pathPolygon : Lib.pathSector;\n    return fn(r, sectorInRad[0], sectorInRad[1], vangles);\n};\n\nproto.pathAnnulus = function(r0, r1) {\n    var sectorInRad = this.sectorInRad;\n    var vangles = this.vangles;\n    var fn = vangles ? helpers.pathPolygonAnnulus : Lib.pathAnnulus;\n    return fn(r0, r1, sectorInRad[0], sectorInRad[1], vangles);\n};\n\nproto.pathSubplot = function() {\n    var r0 = this.innerRadius;\n    var r1 = this.radius;\n    return r0 ? this.pathAnnulus(r0, r1) : this.pathSector(r1);\n};\n\nproto.fillViewInitialKey = function(key, val) {\n    if(!(key in this.viewInitial)) {\n        this.viewInitial[key] = val;\n    }\n};\n\nfunction strTickLayout(axLayout) {\n    var out = axLayout.ticks + String(axLayout.ticklen) + String(axLayout.showticklabels);\n    if('side' in axLayout) out += axLayout.side;\n    return out;\n}\n\n// Finds the bounding box of a given circle sector,\n// inspired by https://math.stackexchange.com/q/1852703\n//\n// assumes:\n// - sector[0] < sector[1]\n// - counterclockwise rotation\nfunction computeSectorBBox(sector) {\n    var s0 = sector[0];\n    var s1 = sector[1];\n    var arc = s1 - s0;\n    var a0 = mod(s0, 360);\n    var a1 = a0 + arc;\n\n    var ax0 = Math.cos(deg2rad(a0));\n    var ay0 = Math.sin(deg2rad(a0));\n    var ax1 = Math.cos(deg2rad(a1));\n    var ay1 = Math.sin(deg2rad(a1));\n\n    var x0, y0, x1, y1;\n\n    if((a0 <= 90 && a1 >= 90) || (a0 > 90 && a1 >= 450)) {\n        y1 = 1;\n    } else if(ay0 <= 0 && ay1 <= 0) {\n        y1 = 0;\n    } else {\n        y1 = Math.max(ay0, ay1);\n    }\n\n    if((a0 <= 180 && a1 >= 180) || (a0 > 180 && a1 >= 540)) {\n        x0 = -1;\n    } else if(ax0 >= 0 && ax1 >= 0) {\n        x0 = 0;\n    } else {\n        x0 = Math.min(ax0, ax1);\n    }\n\n    if((a0 <= 270 && a1 >= 270) || (a0 > 270 && a1 >= 630)) {\n        y0 = -1;\n    } else if(ay0 >= 0 && ay1 >= 0) {\n        y0 = 0;\n    } else {\n        y0 = Math.min(ay0, ay1);\n    }\n\n    if(a1 >= 360) {\n        x1 = 1;\n    } else if(ax0 <= 0 && ax1 <= 0) {\n        x1 = 0;\n    } else {\n        x1 = Math.max(ax0, ax1);\n    }\n\n    return [x0, y0, x1, y1];\n}\n\nfunction snapToVertexAngle(a, vangles) {\n    var fn = function(v) { return Lib.angleDist(a, v); };\n    var ind = Lib.findIndexOfMin(vangles, fn);\n    return vangles[ind];\n}\n\nfunction updateElement(sel, showAttr, attrs) {\n    if(showAttr) {\n        sel.attr('display', null);\n        sel.attr(attrs);\n    } else if(sel) {\n        sel.attr('display', 'none');\n    }\n    return sel;\n}\n\nfunction strTranslate(x, y) {\n    return 'translate(' + x + ',' + y + ')';\n}\n\nfunction strRotate(angle) {\n    return 'rotate(' + angle + ')';\n}\n\n},{\"../../components/color\":580,\"../../components/dragelement\":598,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../components/titles\":668,\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/clear_gl_canvases\":688,\"../../lib/setcursor\":723,\"../../plot_api/subroutines\":742,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../cartesian/autorange\":750,\"../cartesian/dragbox\":759,\"../cartesian/select\":768,\"../cartesian/set_convert\":769,\"../plots\":812,\"./constants\":813,\"./helpers\":814,\"./set_convert\":825,\"d3\":157,\"tinycolor2\":524}],825:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar setConvertCartesian = _dereq_('../cartesian/set_convert');\n\nvar deg2rad = Lib.deg2rad;\nvar rad2deg = Lib.rad2deg;\n\n/**\n * setConvert for polar axes!\n *\n * @param {object} ax\n *   axis in question (works for both radial and angular axes)\n * @param {object} polarLayout\n *   full polar layout of the subplot associated with 'ax'\n * @param {object} fullLayout\n *   full layout\n *\n * Here, reuse some of the Cartesian setConvert logic,\n * but we must extend some of it, as both radial and angular axes\n * don't have domains and angular axes don't have _true_ ranges.\n *\n * Moreover, we introduce two new coordinate systems:\n * - 'g' for geometric coordinates and\n * - 't' for angular ticks\n *\n * Radial axis coordinate systems:\n * - d, c and l: same as for cartesian axes\n * - g: like calcdata but translated about `radialaxis.range[0]` & `polar.hole`\n *\n * Angular axis coordinate systems:\n * - d: data, in whatever form it's provided\n * - c: calcdata, turned into radians (for linear axes)\n *      or category indices (category axes)\n * - t: tick calcdata, just like 'c' but in degrees for linear axes\n * - g: geometric calcdata, radians coordinates that take into account\n *      axis rotation and direction\n *\n * Then, 'g'eometric data is ready to be converted to (x,y).\n */\nmodule.exports = function setConvert(ax, polarLayout, fullLayout) {\n    setConvertCartesian(ax, fullLayout);\n\n    switch(ax._id) {\n        case 'x':\n        case 'radialaxis':\n            setConvertRadial(ax, polarLayout);\n            break;\n        case 'angularaxis':\n            setConvertAngular(ax, polarLayout);\n            break;\n    }\n};\n\nfunction setConvertRadial(ax, polarLayout) {\n    var subplot = polarLayout._subplot;\n\n    ax.setGeometry = function() {\n        var rl0 = ax._rl[0];\n        var rl1 = ax._rl[1];\n\n        var b = subplot.innerRadius;\n        var m = (subplot.radius - b) / (rl1 - rl0);\n        var b2 = b / m;\n\n        var rFilter = rl0 > rl1 ?\n            function(v) { return v <= 0; } :\n            function(v) { return v >= 0; };\n\n        ax.c2g = function(v) {\n            var r = ax.c2l(v) - rl0;\n            return (rFilter(r) ? r : 0) + b2;\n        };\n\n        ax.g2c = function(v) {\n            return ax.l2c(v + rl0 - b2);\n        };\n\n        ax.g2p = function(v) { return v * m; };\n        ax.c2p = function(v) { return ax.g2p(ax.c2g(v)); };\n    };\n}\n\nfunction toRadians(v, unit) {\n    return unit === 'degrees' ? deg2rad(v) : v;\n}\n\nfunction fromRadians(v, unit) {\n    return unit === 'degrees' ? rad2deg(v) : v;\n}\n\nfunction setConvertAngular(ax, polarLayout) {\n    var axType = ax.type;\n\n    if(axType === 'linear') {\n        var _d2c = ax.d2c;\n        var _c2d = ax.c2d;\n\n        ax.d2c = function(v, unit) { return toRadians(_d2c(v), unit); };\n        ax.c2d = function(v, unit) { return _c2d(fromRadians(v, unit)); };\n    }\n\n    // override makeCalcdata to handle thetaunit and special theta0/dtheta logic\n    ax.makeCalcdata = function(trace, coord) {\n        var arrayIn = trace[coord];\n        var len = trace._length;\n        var arrayOut, i;\n\n        var _d2c = function(v) { return ax.d2c(v, trace.thetaunit); };\n\n        if(arrayIn) {\n            if(Lib.isTypedArray(arrayIn) && axType === 'linear') {\n                if(len === arrayIn.length) {\n                    return arrayIn;\n                } else if(arrayIn.subarray) {\n                    return arrayIn.subarray(0, len);\n                }\n            }\n\n            arrayOut = new Array(len);\n            for(i = 0; i < len; i++) {\n                arrayOut[i] = _d2c(arrayIn[i]);\n            }\n        } else {\n            var coord0 = coord + '0';\n            var dcoord = 'd' + coord;\n            var v0 = (coord0 in trace) ? _d2c(trace[coord0]) : 0;\n            var dv = (trace[dcoord]) ? _d2c(trace[dcoord]) : (ax.period || 2 * Math.PI) / len;\n\n            arrayOut = new Array(len);\n            for(i = 0; i < len; i++) {\n                arrayOut[i] = v0 + i * dv;\n            }\n        }\n\n        return arrayOut;\n    };\n\n    // N.B. we mock the axis 'range' here\n    ax.setGeometry = function() {\n        var sector = polarLayout.sector;\n        var sectorInRad = sector.map(deg2rad);\n        var dir = {clockwise: -1, counterclockwise: 1}[ax.direction];\n        var rot = deg2rad(ax.rotation);\n\n        var rad2g = function(v) { return dir * v + rot; };\n        var g2rad = function(v) { return (v - rot) / dir; };\n\n        var rad2c, c2rad;\n        var rad2t, t2rad;\n\n        switch(axType) {\n            case 'linear':\n                c2rad = rad2c = Lib.identity;\n                t2rad = deg2rad;\n                rad2t = rad2deg;\n\n                // Set the angular range in degrees to make auto-tick computation cleaner,\n                // changing rotation/direction should not affect the angular tick value.\n                ax.range = Lib.isFullCircle(sectorInRad) ?\n                    [sector[0], sector[0] + 360] :\n                    sectorInRad.map(g2rad).map(rad2deg);\n                break;\n\n            case 'category':\n                var catLen = ax._categories.length;\n                var _period = ax.period ? Math.max(ax.period, catLen) : catLen;\n\n                // fallback in case all categories have been filtered out\n                if(_period === 0) _period = 1;\n\n                c2rad = t2rad = function(v) { return v * 2 * Math.PI / _period; };\n                rad2c = rad2t = function(v) { return v * _period / Math.PI / 2; };\n\n                ax.range = [0, _period];\n                break;\n        }\n\n        ax.c2g = function(v) { return rad2g(c2rad(v)); };\n        ax.g2c = function(v) { return rad2c(g2rad(v)); };\n\n        ax.t2g = function(v) { return rad2g(t2rad(v)); };\n        ax.g2t = function(v) { return rad2t(g2rad(v)); };\n    };\n}\n\n},{\"../../lib\":703,\"../cartesian/set_convert\":769}],826:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar Template = _dereq_('../plot_api/plot_template');\nvar handleDomainDefaults = _dereq_('./domain').defaults;\n\n\n/**\n * Find and supply defaults to all subplots of a given type\n * This handles subplots that are contained within one container - so\n * gl3d, geo, ternary... but not 2d axes which have separate x and y axes\n * finds subplots, coerces their `domain` attributes, then calls the\n * given handleDefaults function to fill in everything else.\n *\n * layoutIn: the complete user-supplied input layout\n * layoutOut: the complete finished layout\n * fullData: the finished data array, used only to find subplots\n * opts: {\n *  type: subplot type string\n *  attributes: subplot attributes object\n *  partition: 'x' or 'y', which direction to divide domain space by default\n *      (default 'x', ie side-by-side subplots)\n *      TODO: this option is only here because 3D and geo made opposite\n *      choices in this regard previously and I didn't want to change it.\n *      Instead we should do:\n *      - something consistent\n *      - something more square (4 cuts 2x2, 5/6 cuts 2x3, etc.)\n *      - something that includes all subplot types in one arrangement,\n *        now that we can have them together!\n *  handleDefaults: function of (subplotLayoutIn, subplotLayoutOut, coerce, opts)\n *      this opts object is passed through to handleDefaults, so attach any\n *      additional items needed by this function here as well\n * }\n */\nmodule.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, opts) {\n    var subplotType = opts.type;\n    var subplotAttributes = opts.attributes;\n    var handleDefaults = opts.handleDefaults;\n    var partition = opts.partition || 'x';\n\n    var ids = layoutOut._subplots[subplotType];\n    var idsLength = ids.length;\n\n    var baseId = idsLength && ids[0].replace(/\\d+$/, '');\n\n    var subplotLayoutIn, subplotLayoutOut;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(subplotLayoutIn, subplotLayoutOut, subplotAttributes, attr, dflt);\n    }\n\n    for(var i = 0; i < idsLength; i++) {\n        var id = ids[i];\n\n        // ternary traces get a layout ternary for free!\n        if(layoutIn[id]) subplotLayoutIn = layoutIn[id];\n        else subplotLayoutIn = layoutIn[id] = {};\n\n        subplotLayoutOut = Template.newContainer(layoutOut, id, baseId);\n\n        // All subplot containers get a `uirevision` inheriting from the base.\n        // Currently all subplots containers have some user interaction\n        // attributes, but if we ever add one that doesn't, we would need an\n        // option to skip this step.\n        coerce('uirevision', layoutOut.uirevision);\n\n        var dfltDomains = {};\n        dfltDomains[partition] = [i / idsLength, (i + 1) / idsLength];\n        handleDomainDefaults(subplotLayoutOut, layoutOut, coerce, dfltDomains);\n\n        opts.id = id;\n        handleDefaults(subplotLayoutIn, subplotLayoutOut, coerce, opts);\n    }\n};\n\n},{\"../lib\":703,\"../plot_api/plot_template\":741,\"./domain\":776}],827:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Ternary = _dereq_('./ternary');\n\nvar getSubplotCalcData = _dereq_('../../plots/get_data').getSubplotCalcData;\nvar counterRegex = _dereq_('../../lib').counterRegex;\nvar TERNARY = 'ternary';\n\nexports.name = TERNARY;\n\nvar attr = exports.attr = 'subplot';\n\nexports.idRoot = TERNARY;\n\nexports.idRegex = exports.attrRegex = counterRegex(TERNARY);\n\nvar attributes = exports.attributes = {};\nattributes[attr] = {\n    valType: 'subplotid',\n    \n    dflt: 'ternary',\n    editType: 'calc',\n    \n};\n\nexports.layoutAttributes = _dereq_('./layout_attributes');\n\nexports.supplyLayoutDefaults = _dereq_('./layout_defaults');\n\nexports.plot = function plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcData = gd.calcdata;\n    var ternaryIds = fullLayout._subplots[TERNARY];\n\n    for(var i = 0; i < ternaryIds.length; i++) {\n        var ternaryId = ternaryIds[i];\n        var ternaryCalcData = getSubplotCalcData(calcData, TERNARY, ternaryId);\n        var ternary = fullLayout[ternaryId]._subplot;\n\n        // If ternary is not instantiated, create one!\n        if(!ternary) {\n            ternary = new Ternary({\n                id: ternaryId,\n                graphDiv: gd,\n                container: fullLayout._ternarylayer.node()\n            },\n                fullLayout\n            );\n\n            fullLayout[ternaryId]._subplot = ternary;\n        }\n\n        ternary.plot(ternaryCalcData, fullLayout, gd._promises);\n    }\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var oldTernaryKeys = oldFullLayout._subplots[TERNARY] || [];\n\n    for(var i = 0; i < oldTernaryKeys.length; i++) {\n        var oldTernaryKey = oldTernaryKeys[i];\n        var oldTernary = oldFullLayout[oldTernaryKey]._subplot;\n\n        if(!newFullLayout[oldTernaryKey] && !!oldTernary) {\n            oldTernary.plotContainer.remove();\n            oldTernary.clipDef.remove();\n            oldTernary.clipDefRelative.remove();\n            oldTernary.layers['a-title'].remove();\n            oldTernary.layers['b-title'].remove();\n            oldTernary.layers['c-title'].remove();\n        }\n    }\n};\n\n},{\"../../lib\":703,\"../../plots/get_data\":786,\"./layout_attributes\":828,\"./layout_defaults\":829,\"./ternary\":830}],828:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar domainAttrs = _dereq_('../domain').attributes;\nvar axesAttrs = _dereq_('../cartesian/layout_attributes');\n\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar ternaryAxesAttrs = {\n    title: axesAttrs.title,\n    color: axesAttrs.color,\n    // ticks\n    tickmode: axesAttrs.tickmode,\n    nticks: extendFlat({}, axesAttrs.nticks, {dflt: 6, min: 1}),\n    tick0: axesAttrs.tick0,\n    dtick: axesAttrs.dtick,\n    tickvals: axesAttrs.tickvals,\n    ticktext: axesAttrs.ticktext,\n    ticks: axesAttrs.ticks,\n    ticklen: axesAttrs.ticklen,\n    tickwidth: axesAttrs.tickwidth,\n    tickcolor: axesAttrs.tickcolor,\n    showticklabels: axesAttrs.showticklabels,\n    showtickprefix: axesAttrs.showtickprefix,\n    tickprefix: axesAttrs.tickprefix,\n    showticksuffix: axesAttrs.showticksuffix,\n    ticksuffix: axesAttrs.ticksuffix,\n    showexponent: axesAttrs.showexponent,\n    exponentformat: axesAttrs.exponentformat,\n    separatethousands: axesAttrs.separatethousands,\n    tickfont: axesAttrs.tickfont,\n    tickangle: axesAttrs.tickangle,\n    tickformat: axesAttrs.tickformat,\n    tickformatstops: axesAttrs.tickformatstops,\n    hoverformat: axesAttrs.hoverformat,\n    // lines and grids\n    showline: extendFlat({}, axesAttrs.showline, {dflt: true}),\n    linecolor: axesAttrs.linecolor,\n    linewidth: axesAttrs.linewidth,\n    showgrid: extendFlat({}, axesAttrs.showgrid, {dflt: true}),\n    gridcolor: axesAttrs.gridcolor,\n    gridwidth: axesAttrs.gridwidth,\n    layer: axesAttrs.layer,\n    // range\n    min: {\n        valType: 'number',\n        dflt: 0,\n        \n        min: 0,\n        \n    },\n    _deprecated: {\n        title: axesAttrs._deprecated.title,\n        titlefont: axesAttrs._deprecated.titlefont\n    }\n};\n\nvar attrs = module.exports = overrideAll({\n    domain: domainAttrs({name: 'ternary'}),\n\n    bgcolor: {\n        valType: 'color',\n        \n        dflt: colorAttrs.background,\n        \n    },\n    sum: {\n        valType: 'number',\n        \n        dflt: 1,\n        min: 0,\n        \n    },\n    aaxis: ternaryAxesAttrs,\n    baxis: ternaryAxesAttrs,\n    caxis: ternaryAxesAttrs\n}, 'plot', 'from-root');\n\n// set uirevisions outside of `overrideAll` so we can get `editType: none`\nattrs.uirevision = {\n    valType: 'any',\n    \n    editType: 'none',\n    \n};\n\nattrs.aaxis.uirevision = attrs.baxis.uirevision = attrs.caxis.uirevision = {\n    valType: 'any',\n    \n    editType: 'none',\n    \n};\n\n},{\"../../components/color/attributes\":579,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../cartesian/layout_attributes\":763,\"../domain\":776}],829:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar Template = _dereq_('../../plot_api/plot_template');\nvar Lib = _dereq_('../../lib');\n\nvar handleSubplotDefaults = _dereq_('../subplot_defaults');\nvar handleTickLabelDefaults = _dereq_('../cartesian/tick_label_defaults');\nvar handleTickMarkDefaults = _dereq_('../cartesian/tick_mark_defaults');\nvar handleTickValueDefaults = _dereq_('../cartesian/tick_value_defaults');\nvar handleLineGridDefaults = _dereq_('../cartesian/line_grid_defaults');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nvar axesNames = ['aaxis', 'baxis', 'caxis'];\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    handleSubplotDefaults(layoutIn, layoutOut, fullData, {\n        type: 'ternary',\n        attributes: layoutAttributes,\n        handleDefaults: handleTernaryDefaults,\n        font: layoutOut.font,\n        paper_bgcolor: layoutOut.paper_bgcolor\n    });\n};\n\nfunction handleTernaryDefaults(ternaryLayoutIn, ternaryLayoutOut, coerce, options) {\n    var bgColor = coerce('bgcolor');\n    var sum = coerce('sum');\n    options.bgColor = Color.combine(bgColor, options.paper_bgcolor);\n    var axName, containerIn, containerOut;\n\n    // TODO: allow most (if not all) axis attributes to be set\n    // in the outer container and used as defaults in the individual axes?\n\n    for(var j = 0; j < axesNames.length; j++) {\n        axName = axesNames[j];\n        containerIn = ternaryLayoutIn[axName] || {};\n        containerOut = Template.newContainer(ternaryLayoutOut, axName);\n        containerOut._name = axName;\n\n        handleAxisDefaults(containerIn, containerOut, options, ternaryLayoutOut);\n    }\n\n    // if the min values contradict each other, set them all to default (0)\n    // and delete *all* the inputs so the user doesn't get confused later by\n    // changing one and having them all change.\n    var aaxis = ternaryLayoutOut.aaxis;\n    var baxis = ternaryLayoutOut.baxis;\n    var caxis = ternaryLayoutOut.caxis;\n    if(aaxis.min + baxis.min + caxis.min >= sum) {\n        aaxis.min = 0;\n        baxis.min = 0;\n        caxis.min = 0;\n        if(ternaryLayoutIn.aaxis) delete ternaryLayoutIn.aaxis.min;\n        if(ternaryLayoutIn.baxis) delete ternaryLayoutIn.baxis.min;\n        if(ternaryLayoutIn.caxis) delete ternaryLayoutIn.caxis.min;\n    }\n}\n\nfunction handleAxisDefaults(containerIn, containerOut, options, ternaryLayoutOut) {\n    var axAttrs = layoutAttributes[containerOut._name];\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, axAttrs, attr, dflt);\n    }\n\n    coerce('uirevision', ternaryLayoutOut.uirevision);\n\n    containerOut.type = 'linear'; // no other types allowed for ternary\n\n    var dfltColor = coerce('color');\n    // if axis.color was provided, use it for fonts too; otherwise,\n    // inherit from global font color in case that was provided.\n    var dfltFontColor = (dfltColor !== axAttrs.color.dflt) ? dfltColor : options.font.color;\n\n    var axName = containerOut._name;\n    var letterUpper = axName.charAt(0).toUpperCase();\n    var dfltTitle = 'Component ' + letterUpper;\n\n    var title = coerce('title.text', dfltTitle);\n    containerOut._hovertitle = title === dfltTitle ? title : letterUpper;\n\n    Lib.coerceFont(coerce, 'title.font', {\n        family: options.font.family,\n        size: Math.round(options.font.size * 1.2),\n        color: dfltFontColor\n    });\n\n    // range is just set by 'min' - max is determined by the other axes mins\n    coerce('min');\n\n    handleTickValueDefaults(containerIn, containerOut, coerce, 'linear');\n    handleTickLabelDefaults(containerIn, containerOut, coerce, 'linear', {});\n    handleTickMarkDefaults(containerIn, containerOut, coerce,\n        { outerTicks: true });\n\n    var showTickLabels = coerce('showticklabels');\n    if(showTickLabels) {\n        Lib.coerceFont(coerce, 'tickfont', {\n            family: options.font.family,\n            size: options.font.size,\n            color: dfltFontColor\n        });\n        coerce('tickangle');\n        coerce('tickformat');\n    }\n\n    handleLineGridDefaults(containerIn, containerOut, coerce, {\n        dfltColor: dfltColor,\n        bgColor: options.bgColor,\n        // default grid color is darker here (60%, vs cartesian default ~91%)\n        // because the grid is not square so the eye needs heavier cues to follow\n        blend: 60,\n        showLine: true,\n        showGrid: true,\n        noZeroLine: true,\n        attributes: axAttrs\n    });\n\n    coerce('hoverformat');\n    coerce('layer');\n}\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../cartesian/line_grid_defaults\":765,\"../cartesian/tick_label_defaults\":770,\"../cartesian/tick_mark_defaults\":771,\"../cartesian/tick_value_defaults\":772,\"../subplot_defaults\":826,\"./layout_attributes\":828}],830:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar _ = Lib._;\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar setConvert = _dereq_('../cartesian/set_convert');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar Plots = _dereq_('../plots');\nvar Axes = _dereq_('../cartesian/axes');\nvar dragElement = _dereq_('../../components/dragelement');\nvar Fx = _dereq_('../../components/fx');\nvar Titles = _dereq_('../../components/titles');\nvar prepSelect = _dereq_('../cartesian/select').prepSelect;\nvar selectOnClick = _dereq_('../cartesian/select').selectOnClick;\nvar clearSelect = _dereq_('../cartesian/select').clearSelect;\nvar constants = _dereq_('../cartesian/constants');\n\nfunction Ternary(options, fullLayout) {\n    this.id = options.id;\n    this.graphDiv = options.graphDiv;\n    this.init(fullLayout);\n    this.makeFramework(fullLayout);\n\n    // unfortunately, we have to keep track of some axis tick settings\n    // as ternary subplots do not implement the 'ticks' editType\n    this.aTickLayout = null;\n    this.bTickLayout = null;\n    this.cTickLayout = null;\n}\n\nmodule.exports = Ternary;\n\nvar proto = Ternary.prototype;\n\nproto.init = function(fullLayout) {\n    this.container = fullLayout._ternarylayer;\n    this.defs = fullLayout._defs;\n    this.layoutId = fullLayout._uid;\n    this.traceHash = {};\n    this.layers = {};\n};\n\nproto.plot = function(ternaryCalcData, fullLayout) {\n    var _this = this;\n    var ternaryLayout = fullLayout[_this.id];\n    var graphSize = fullLayout._size;\n\n    _this._hasClipOnAxisFalse = false;\n    for(var i = 0; i < ternaryCalcData.length; i++) {\n        var trace = ternaryCalcData[i][0].trace;\n\n        if(trace.cliponaxis === false) {\n            _this._hasClipOnAxisFalse = true;\n            break;\n        }\n    }\n\n    _this.updateLayers(ternaryLayout);\n    _this.adjustLayout(ternaryLayout, graphSize);\n    Plots.generalUpdatePerTraceModule(_this.graphDiv, _this, ternaryCalcData, ternaryLayout);\n    _this.layers.plotbg.select('path').call(Color.fill, ternaryLayout.bgcolor);\n};\n\nproto.makeFramework = function(fullLayout) {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var ternaryLayout = fullLayout[_this.id];\n\n    var clipId = _this.clipId = 'clip' + _this.layoutId + _this.id;\n    var clipIdRelative = _this.clipIdRelative = 'clip-relative' + _this.layoutId + _this.id;\n\n    // clippath for this ternary subplot\n    _this.clipDef = Lib.ensureSingleById(fullLayout._clips, 'clipPath', clipId, function(s) {\n        s.append('path').attr('d', 'M0,0Z');\n    });\n\n    // 'relative' clippath (i.e. no translation) for this ternary subplot\n    _this.clipDefRelative = Lib.ensureSingleById(fullLayout._clips, 'clipPath', clipIdRelative, function(s) {\n        s.append('path').attr('d', 'M0,0Z');\n    });\n\n    // container for everything in this ternary subplot\n    _this.plotContainer = Lib.ensureSingle(_this.container, 'g', _this.id);\n    _this.updateLayers(ternaryLayout);\n\n    Drawing.setClipUrl(_this.layers.backplot, clipId, gd);\n    Drawing.setClipUrl(_this.layers.grids, clipId, gd);\n};\n\nproto.updateLayers = function(ternaryLayout) {\n    var _this = this;\n    var layers = _this.layers;\n\n    // inside that container, we have one container for the data, and\n    // one each for the three axes around it.\n\n    var plotLayers = ['draglayer', 'plotbg', 'backplot', 'grids'];\n\n    if(ternaryLayout.aaxis.layer === 'below traces') {\n        plotLayers.push('aaxis', 'aline');\n    }\n    if(ternaryLayout.baxis.layer === 'below traces') {\n        plotLayers.push('baxis', 'bline');\n    }\n    if(ternaryLayout.caxis.layer === 'below traces') {\n        plotLayers.push('caxis', 'cline');\n    }\n\n    plotLayers.push('frontplot');\n\n    if(ternaryLayout.aaxis.layer === 'above traces') {\n        plotLayers.push('aaxis', 'aline');\n    }\n    if(ternaryLayout.baxis.layer === 'above traces') {\n        plotLayers.push('baxis', 'bline');\n    }\n    if(ternaryLayout.caxis.layer === 'above traces') {\n        plotLayers.push('caxis', 'cline');\n    }\n\n    var toplevel = _this.plotContainer.selectAll('g.toplevel')\n        .data(plotLayers, String);\n\n    var grids = ['agrid', 'bgrid', 'cgrid'];\n\n    toplevel.enter().append('g')\n        .attr('class', function(d) { return 'toplevel ' + d; })\n        .each(function(d) {\n            var s = d3.select(this);\n            layers[d] = s;\n\n            // containers for different trace types.\n            // NOTE - this is different from cartesian, where all traces\n            // are in front of grids. Here I'm putting maps behind the grids\n            // so the grids will always be visible if they're requested.\n            // Perhaps we want that for cartesian too?\n            if(d === 'frontplot') {\n                s.append('g').classed('scatterlayer', true);\n            } else if(d === 'backplot') {\n                s.append('g').classed('maplayer', true);\n            } else if(d === 'plotbg') {\n                s.append('path').attr('d', 'M0,0Z');\n            } else if(d === 'aline' || d === 'bline' || d === 'cline') {\n                s.append('path');\n            } else if(d === 'grids') {\n                grids.forEach(function(d) {\n                    layers[d] = s.append('g').classed('grid ' + d, true);\n                });\n            }\n        });\n\n    toplevel.order();\n};\n\nvar whRatio = Math.sqrt(4 / 3);\n\nproto.adjustLayout = function(ternaryLayout, graphSize) {\n    var _this = this;\n    var domain = ternaryLayout.domain;\n    var xDomainCenter = (domain.x[0] + domain.x[1]) / 2;\n    var yDomainCenter = (domain.y[0] + domain.y[1]) / 2;\n    var xDomain = domain.x[1] - domain.x[0];\n    var yDomain = domain.y[1] - domain.y[0];\n    var wmax = xDomain * graphSize.w;\n    var hmax = yDomain * graphSize.h;\n    var sum = ternaryLayout.sum;\n    var amin = ternaryLayout.aaxis.min;\n    var bmin = ternaryLayout.baxis.min;\n    var cmin = ternaryLayout.caxis.min;\n\n    var x0, y0, w, h, xDomainFinal, yDomainFinal;\n\n    if(wmax > whRatio * hmax) {\n        h = hmax;\n        w = h * whRatio;\n    } else {\n        w = wmax;\n        h = w / whRatio;\n    }\n\n    xDomainFinal = xDomain * w / wmax;\n    yDomainFinal = yDomain * h / hmax;\n\n    x0 = graphSize.l + graphSize.w * xDomainCenter - w / 2;\n    y0 = graphSize.t + graphSize.h * (1 - yDomainCenter) - h / 2;\n\n    _this.x0 = x0;\n    _this.y0 = y0;\n    _this.w = w;\n    _this.h = h;\n    _this.sum = sum;\n\n    // set up the x and y axis objects we'll use to lay out the points\n    _this.xaxis = {\n        type: 'linear',\n        range: [amin + 2 * cmin - sum, sum - amin - 2 * bmin],\n        domain: [\n            xDomainCenter - xDomainFinal / 2,\n            xDomainCenter + xDomainFinal / 2\n        ],\n        _id: 'x'\n    };\n    setConvert(_this.xaxis, _this.graphDiv._fullLayout);\n    _this.xaxis.setScale();\n    _this.xaxis.isPtWithinRange = function(d) {\n        return (\n            d.a >= _this.aaxis.range[0] &&\n            d.a <= _this.aaxis.range[1] &&\n            d.b >= _this.baxis.range[1] &&\n            d.b <= _this.baxis.range[0] &&\n            d.c >= _this.caxis.range[1] &&\n            d.c <= _this.caxis.range[0]\n        );\n    };\n\n    _this.yaxis = {\n        type: 'linear',\n        range: [amin, sum - bmin - cmin],\n        domain: [\n            yDomainCenter - yDomainFinal / 2,\n            yDomainCenter + yDomainFinal / 2\n        ],\n        _id: 'y'\n    };\n    setConvert(_this.yaxis, _this.graphDiv._fullLayout);\n    _this.yaxis.setScale();\n    _this.yaxis.isPtWithinRange = function() { return true; };\n\n    // set up the modified axes for tick drawing\n    var yDomain0 = _this.yaxis.domain[0];\n\n    // aaxis goes up the left side. Set it up as a y axis, but with\n    // fictitious angles and domain, but then rotate and translate\n    // it into place at the end\n    var aaxis = _this.aaxis = extendFlat({}, ternaryLayout.aaxis, {\n        range: [amin, sum - bmin - cmin],\n        side: 'left',\n        // tickangle = 'auto' means 0 anyway for a y axis, need to coerce to 0 here\n        // so we can shift by 30.\n        tickangle: (+ternaryLayout.aaxis.tickangle || 0) - 30,\n        domain: [yDomain0, yDomain0 + yDomainFinal * whRatio],\n        anchor: 'free',\n        position: 0,\n        _id: 'y',\n        _length: w\n    });\n    setConvert(aaxis, _this.graphDiv._fullLayout);\n    aaxis.setScale();\n\n    // baxis goes across the bottom (backward). We can set it up as an x axis\n    // without any enclosing transformation.\n    var baxis = _this.baxis = extendFlat({}, ternaryLayout.baxis, {\n        range: [sum - amin - cmin, bmin],\n        side: 'bottom',\n        domain: _this.xaxis.domain,\n        anchor: 'free',\n        position: 0,\n        _id: 'x',\n        _length: w\n    });\n    setConvert(baxis, _this.graphDiv._fullLayout);\n    baxis.setScale();\n\n    // caxis goes down the right side. Set it up as a y axis, with\n    // post-transformation similar to aaxis\n    var caxis = _this.caxis = extendFlat({}, ternaryLayout.caxis, {\n        range: [sum - amin - bmin, cmin],\n        side: 'right',\n        tickangle: (+ternaryLayout.caxis.tickangle || 0) + 30,\n        domain: [yDomain0, yDomain0 + yDomainFinal * whRatio],\n        anchor: 'free',\n        position: 0,\n        _id: 'y',\n        _length: w\n    });\n    setConvert(caxis, _this.graphDiv._fullLayout);\n    caxis.setScale();\n\n    var triangleClip = 'M' + x0 + ',' + (y0 + h) + 'h' + w + 'l-' + (w / 2) + ',-' + h + 'Z';\n    _this.clipDef.select('path').attr('d', triangleClip);\n    _this.layers.plotbg.select('path').attr('d', triangleClip);\n\n    var triangleClipRelative = 'M0,' + h + 'h' + w + 'l-' + (w / 2) + ',-' + h + 'Z';\n    _this.clipDefRelative.select('path').attr('d', triangleClipRelative);\n\n    var plotTransform = 'translate(' + x0 + ',' + y0 + ')';\n    _this.plotContainer.selectAll('.scatterlayer,.maplayer')\n        .attr('transform', plotTransform);\n\n    _this.clipDefRelative.select('path').attr('transform', null);\n\n    // TODO: shift axes to accommodate linewidth*sin(30) tick mark angle\n\n    // TODO: there's probably an easier way to handle these translations/offsets now...\n    var bTransform = 'translate(' + (x0 - baxis._offset) + ',' + (y0 + h) + ')';\n\n    _this.layers.baxis.attr('transform', bTransform);\n    _this.layers.bgrid.attr('transform', bTransform);\n\n    var aTransform = 'translate(' + (x0 + w / 2) + ',' + y0 +\n        ')rotate(30)translate(0,' + -aaxis._offset + ')';\n    _this.layers.aaxis.attr('transform', aTransform);\n    _this.layers.agrid.attr('transform', aTransform);\n\n    var cTransform = 'translate(' + (x0 + w / 2) + ',' + y0 +\n        ')rotate(-30)translate(0,' + -caxis._offset + ')';\n    _this.layers.caxis.attr('transform', cTransform);\n    _this.layers.cgrid.attr('transform', cTransform);\n\n    _this.drawAxes(true);\n\n    _this.layers.aline.select('path')\n        .attr('d', aaxis.showline ?\n            'M' + x0 + ',' + (y0 + h) + 'l' + (w / 2) + ',-' + h : 'M0,0')\n        .call(Color.stroke, aaxis.linecolor || '#000')\n        .style('stroke-width', (aaxis.linewidth || 0) + 'px');\n    _this.layers.bline.select('path')\n        .attr('d', baxis.showline ?\n            'M' + x0 + ',' + (y0 + h) + 'h' + w : 'M0,0')\n        .call(Color.stroke, baxis.linecolor || '#000')\n        .style('stroke-width', (baxis.linewidth || 0) + 'px');\n    _this.layers.cline.select('path')\n        .attr('d', caxis.showline ?\n            'M' + (x0 + w / 2) + ',' + y0 + 'l' + (w / 2) + ',' + h : 'M0,0')\n        .call(Color.stroke, caxis.linecolor || '#000')\n        .style('stroke-width', (caxis.linewidth || 0) + 'px');\n\n    if(!_this.graphDiv._context.staticPlot) {\n        _this.initInteractions();\n    }\n\n    Drawing.setClipUrl(\n        _this.layers.frontplot,\n        _this._hasClipOnAxisFalse ? null : _this.clipId,\n        _this.graphDiv\n    );\n};\n\nproto.drawAxes = function(doTitles) {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var titlesuffix = _this.id.substr(7) + 'title';\n    var layers = _this.layers;\n    var aaxis = _this.aaxis;\n    var baxis = _this.baxis;\n    var caxis = _this.caxis;\n\n    _this.drawAx(aaxis);\n    _this.drawAx(baxis);\n    _this.drawAx(caxis);\n\n    if(doTitles) {\n        var apad = Math.max(aaxis.showticklabels ? aaxis.tickfont.size / 2 : 0,\n            (caxis.showticklabels ? caxis.tickfont.size * 0.75 : 0) +\n            (caxis.ticks === 'outside' ? caxis.ticklen * 0.87 : 0));\n        var bpad = (baxis.showticklabels ? baxis.tickfont.size : 0) +\n            (baxis.ticks === 'outside' ? baxis.ticklen : 0) + 3;\n\n        layers['a-title'] = Titles.draw(gd, 'a' + titlesuffix, {\n            propContainer: aaxis,\n            propName: _this.id + '.aaxis.title',\n            placeholder: _(gd, 'Click to enter Component A title'),\n            attributes: {\n                x: _this.x0 + _this.w / 2,\n                y: _this.y0 - aaxis.title.font.size / 3 - apad,\n                'text-anchor': 'middle'\n            }\n        });\n        layers['b-title'] = Titles.draw(gd, 'b' + titlesuffix, {\n            propContainer: baxis,\n            propName: _this.id + '.baxis.title',\n            placeholder: _(gd, 'Click to enter Component B title'),\n            attributes: {\n                x: _this.x0 - bpad,\n                y: _this.y0 + _this.h + baxis.title.font.size * 0.83 + bpad,\n                'text-anchor': 'middle'\n            }\n        });\n        layers['c-title'] = Titles.draw(gd, 'c' + titlesuffix, {\n            propContainer: caxis,\n            propName: _this.id + '.caxis.title',\n            placeholder: _(gd, 'Click to enter Component C title'),\n            attributes: {\n                x: _this.x0 + _this.w + bpad,\n                y: _this.y0 + _this.h + caxis.title.font.size * 0.83 + bpad,\n                'text-anchor': 'middle'\n            }\n        });\n    }\n};\n\nproto.drawAx = function(ax) {\n    var _this = this;\n    var gd = _this.graphDiv;\n    var axName = ax._name;\n    var axLetter = axName.charAt(0);\n    var axId = ax._id;\n    var axLayer = _this.layers[axName];\n    var counterAngle = 30;\n\n    var stashKey = axLetter + 'tickLayout';\n    var newTickLayout = strTickLayout(ax);\n    if(_this[stashKey] !== newTickLayout) {\n        axLayer.selectAll('.' + axId + 'tick').remove();\n        _this[stashKey] = newTickLayout;\n    }\n\n    ax.setScale();\n\n    var vals = Axes.calcTicks(ax);\n    var valsClipped = Axes.clipEnds(ax, vals);\n    var transFn = Axes.makeTransFn(ax);\n    var tickSign = Axes.getTickSigns(ax)[2];\n\n    var caRad = Lib.deg2rad(counterAngle);\n    var pad = tickSign * (ax.linewidth || 1) / 2;\n    var len = tickSign * ax.ticklen;\n    var w = _this.w;\n    var h = _this.h;\n\n    var tickPath = axLetter === 'b' ?\n        'M0,' + pad + 'l' + (Math.sin(caRad) * len) + ',' + (Math.cos(caRad) * len) :\n        'M' + pad + ',0l' + (Math.cos(caRad) * len) + ',' + (-Math.sin(caRad) * len);\n\n    var gridPath = {\n        a: 'M0,0l' + h + ',-' + (w / 2),\n        b: 'M0,0l-' + (w / 2) + ',-' + h,\n        c: 'M0,0l-' + h + ',' + (w / 2)\n    }[axLetter];\n\n    Axes.drawTicks(gd, ax, {\n        vals: ax.ticks === 'inside' ? valsClipped : vals,\n        layer: axLayer,\n        path: tickPath,\n        transFn: transFn,\n        crisp: false\n    });\n\n    Axes.drawGrid(gd, ax, {\n        vals: valsClipped,\n        layer: _this.layers[axLetter + 'grid'],\n        path: gridPath,\n        transFn: transFn,\n        crisp: false\n    });\n\n    Axes.drawLabels(gd, ax, {\n        vals: vals,\n        layer: axLayer,\n        transFn: transFn,\n        labelFns: Axes.makeLabelFns(ax, 0, counterAngle)\n    });\n};\n\nfunction strTickLayout(axLayout) {\n    return axLayout.ticks + String(axLayout.ticklen) + String(axLayout.showticklabels);\n}\n\n// hard coded paths for zoom corners\n// uses the same sizing as cartesian, length is MINZOOM/2, width is 3px\nvar CLEN = constants.MINZOOM / 2 + 0.87;\nvar BLPATH = 'm-0.87,.5h' + CLEN + 'v3h-' + (CLEN + 5.2) +\n    'l' + (CLEN / 2 + 2.6) + ',-' + (CLEN * 0.87 + 4.5) +\n    'l2.6,1.5l-' + (CLEN / 2) + ',' + (CLEN * 0.87) + 'Z';\nvar BRPATH = 'm0.87,.5h-' + CLEN + 'v3h' + (CLEN + 5.2) +\n    'l-' + (CLEN / 2 + 2.6) + ',-' + (CLEN * 0.87 + 4.5) +\n    'l-2.6,1.5l' + (CLEN / 2) + ',' + (CLEN * 0.87) + 'Z';\nvar TOPPATH = 'm0,1l' + (CLEN / 2) + ',' + (CLEN * 0.87) +\n    'l2.6,-1.5l-' + (CLEN / 2 + 2.6) + ',-' + (CLEN * 0.87 + 4.5) +\n    'l-' + (CLEN / 2 + 2.6) + ',' + (CLEN * 0.87 + 4.5) +\n    'l2.6,1.5l' + (CLEN / 2) + ',-' + (CLEN * 0.87) + 'Z';\nvar STARTMARKER = 'm0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z';\n\n// I guess this could be shared with cartesian... but for now it's separate.\nvar SHOWZOOMOUTTIP = true;\n\nproto.initInteractions = function() {\n    var _this = this;\n    var dragger = _this.layers.plotbg.select('path').node();\n    var gd = _this.graphDiv;\n    var zoomLayer = gd._fullLayout._zoomlayer;\n\n    // use plotbg for the main interactions\n    var dragOptions = {\n        element: dragger,\n        gd: gd,\n        plotinfo: {\n            id: _this.id,\n            xaxis: _this.xaxis,\n            yaxis: _this.yaxis\n        },\n        subplot: _this.id,\n        prepFn: function(e, startX, startY) {\n            // these aren't available yet when initInteractions\n            // is called\n            dragOptions.xaxes = [_this.xaxis];\n            dragOptions.yaxes = [_this.yaxis];\n            var dragModeNow = gd._fullLayout.dragmode;\n\n            if(dragModeNow === 'lasso') dragOptions.minDrag = 1;\n            else dragOptions.minDrag = undefined;\n\n            if(dragModeNow === 'zoom') {\n                dragOptions.moveFn = zoomMove;\n                dragOptions.clickFn = clickZoomPan;\n                dragOptions.doneFn = zoomDone;\n                zoomPrep(e, startX, startY);\n            } else if(dragModeNow === 'pan') {\n                dragOptions.moveFn = plotDrag;\n                dragOptions.clickFn = clickZoomPan;\n                dragOptions.doneFn = dragDone;\n                panPrep();\n                clearSelect(gd);\n            } else if(dragModeNow === 'select' || dragModeNow === 'lasso') {\n                prepSelect(e, startX, startY, dragOptions, dragModeNow);\n            }\n        }\n    };\n\n    var x0, y0, mins0, span0, mins, lum, path0, dimmed, zb, corners;\n\n    function makeUpdate(_mins) {\n        var attrs = {};\n        attrs[_this.id + '.aaxis.min'] = _mins.a;\n        attrs[_this.id + '.baxis.min'] = _mins.b;\n        attrs[_this.id + '.caxis.min'] = _mins.c;\n        return attrs;\n    }\n\n    function clickZoomPan(numClicks, evt) {\n        var clickMode = gd._fullLayout.clickmode;\n\n        removeZoombox(gd);\n\n        if(numClicks === 2) {\n            gd.emit('plotly_doubleclick', null);\n            Registry.call('_guiRelayout', gd, makeUpdate({a: 0, b: 0, c: 0}));\n        }\n\n        if(clickMode.indexOf('select') > -1 && numClicks === 1) {\n            selectOnClick(evt, gd, [_this.xaxis], [_this.yaxis], _this.id, dragOptions);\n        }\n\n        if(clickMode.indexOf('event') > -1) {\n            Fx.click(gd, evt, _this.id);\n        }\n    }\n\n    function zoomPrep(e, startX, startY) {\n        var dragBBox = dragger.getBoundingClientRect();\n        x0 = startX - dragBBox.left;\n        y0 = startY - dragBBox.top;\n        mins0 = {\n            a: _this.aaxis.range[0],\n            b: _this.baxis.range[1],\n            c: _this.caxis.range[1]\n        };\n        mins = mins0;\n        span0 = _this.aaxis.range[1] - mins0.a;\n        lum = tinycolor(_this.graphDiv._fullLayout[_this.id].bgcolor).getLuminance();\n        path0 = 'M0,' + _this.h + 'L' + (_this.w / 2) + ', 0L' + _this.w + ',' + _this.h + 'Z';\n        dimmed = false;\n\n        zb = zoomLayer.append('path')\n            .attr('class', 'zoombox')\n            .attr('transform', 'translate(' + _this.x0 + ', ' + _this.y0 + ')')\n            .style({\n                'fill': lum > 0.2 ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0)',\n                'stroke-width': 0\n            })\n            .attr('d', path0);\n\n        corners = zoomLayer.append('path')\n            .attr('class', 'zoombox-corners')\n            .attr('transform', 'translate(' + _this.x0 + ', ' + _this.y0 + ')')\n            .style({\n                fill: Color.background,\n                stroke: Color.defaultLine,\n                'stroke-width': 1,\n                opacity: 0\n            })\n            .attr('d', 'M0,0Z');\n\n        clearSelect(gd);\n    }\n\n    function getAFrac(x, y) { return 1 - (y / _this.h); }\n    function getBFrac(x, y) { return 1 - ((x + (_this.h - y) / Math.sqrt(3)) / _this.w); }\n    function getCFrac(x, y) { return ((x - (_this.h - y) / Math.sqrt(3)) / _this.w); }\n\n    function zoomMove(dx0, dy0) {\n        var x1 = x0 + dx0;\n        var y1 = y0 + dy0;\n        var afrac = Math.max(0, Math.min(1, getAFrac(x0, y0), getAFrac(x1, y1)));\n        var bfrac = Math.max(0, Math.min(1, getBFrac(x0, y0), getBFrac(x1, y1)));\n        var cfrac = Math.max(0, Math.min(1, getCFrac(x0, y0), getCFrac(x1, y1)));\n        var xLeft = ((afrac / 2) + cfrac) * _this.w;\n        var xRight = (1 - (afrac / 2) - bfrac) * _this.w;\n        var xCenter = (xLeft + xRight) / 2;\n        var xSpan = xRight - xLeft;\n        var yBottom = (1 - afrac) * _this.h;\n        var yTop = yBottom - xSpan / whRatio;\n\n        if(xSpan < constants.MINZOOM) {\n            mins = mins0;\n            zb.attr('d', path0);\n            corners.attr('d', 'M0,0Z');\n        } else {\n            mins = {\n                a: mins0.a + afrac * span0,\n                b: mins0.b + bfrac * span0,\n                c: mins0.c + cfrac * span0\n            };\n            zb.attr('d', path0 + 'M' + xLeft + ',' + yBottom +\n                'H' + xRight + 'L' + xCenter + ',' + yTop +\n                'L' + xLeft + ',' + yBottom + 'Z');\n            corners.attr('d', 'M' + x0 + ',' + y0 + STARTMARKER +\n                'M' + xLeft + ',' + yBottom + BLPATH +\n                'M' + xRight + ',' + yBottom + BRPATH +\n                'M' + xCenter + ',' + yTop + TOPPATH);\n        }\n\n        if(!dimmed) {\n            zb.transition()\n                .style('fill', lum > 0.2 ? 'rgba(0,0,0,0.4)' :\n                    'rgba(255,255,255,0.3)')\n                .duration(200);\n            corners.transition()\n                .style('opacity', 1)\n                .duration(200);\n            dimmed = true;\n        }\n\n        gd.emit('plotly_relayouting', makeUpdate(mins));\n    }\n\n    function zoomDone() {\n        removeZoombox(gd);\n\n        if(mins === mins0) return;\n\n        Registry.call('_guiRelayout', gd, makeUpdate(mins));\n\n        if(SHOWZOOMOUTTIP && gd.data && gd._context.showTips) {\n            Lib.notifier(_(gd, 'Double-click to zoom back out'), 'long');\n            SHOWZOOMOUTTIP = false;\n        }\n    }\n\n    function panPrep() {\n        mins0 = {\n            a: _this.aaxis.range[0],\n            b: _this.baxis.range[1],\n            c: _this.caxis.range[1]\n        };\n        mins = mins0;\n    }\n\n    function plotDrag(dx, dy) {\n        var dxScaled = dx / _this.xaxis._m;\n        var dyScaled = dy / _this.yaxis._m;\n        mins = {\n            a: mins0.a - dyScaled,\n            b: mins0.b + (dxScaled + dyScaled) / 2,\n            c: mins0.c - (dxScaled - dyScaled) / 2\n        };\n        var minsorted = [mins.a, mins.b, mins.c].sort();\n        var minindices = {\n            a: minsorted.indexOf(mins.a),\n            b: minsorted.indexOf(mins.b),\n            c: minsorted.indexOf(mins.c)\n        };\n        if(minsorted[0] < 0) {\n            if(minsorted[1] + minsorted[0] / 2 < 0) {\n                minsorted[2] += minsorted[0] + minsorted[1];\n                minsorted[0] = minsorted[1] = 0;\n            } else {\n                minsorted[2] += minsorted[0] / 2;\n                minsorted[1] += minsorted[0] / 2;\n                minsorted[0] = 0;\n            }\n            mins = {\n                a: minsorted[minindices.a],\n                b: minsorted[minindices.b],\n                c: minsorted[minindices.c]\n            };\n            dy = (mins0.a - mins.a) * _this.yaxis._m;\n            dx = (mins0.c - mins.c - mins0.b + mins.b) * _this.xaxis._m;\n        }\n\n        // move the data (translate, don't redraw)\n        var plotTransform = 'translate(' + (_this.x0 + dx) + ',' + (_this.y0 + dy) + ')';\n        _this.plotContainer.selectAll('.scatterlayer,.maplayer')\n            .attr('transform', plotTransform);\n\n        var plotTransform2 = 'translate(' + -dx + ',' + -dy + ')';\n        _this.clipDefRelative.select('path').attr('transform', plotTransform2);\n\n        // move the ticks\n        _this.aaxis.range = [mins.a, _this.sum - mins.b - mins.c];\n        _this.baxis.range = [_this.sum - mins.a - mins.c, mins.b];\n        _this.caxis.range = [_this.sum - mins.a - mins.b, mins.c];\n\n        _this.drawAxes(false);\n\n        if(_this._hasClipOnAxisFalse) {\n            _this.plotContainer\n                .select('.scatterlayer').selectAll('.trace')\n                .call(Drawing.hideOutsideRangePoints, _this);\n        }\n\n        gd.emit('plotly_relayouting', makeUpdate(mins));\n    }\n\n    function dragDone() {\n        Registry.call('_guiRelayout', gd, makeUpdate(mins));\n    }\n\n    // finally, set up hover and click\n    // these event handlers must already be set before dragElement.init\n    // so it can stash them and override them.\n    dragger.onmousemove = function(evt) {\n        Fx.hover(gd, evt, _this.id);\n        gd._fullLayout._lasthover = dragger;\n        gd._fullLayout._hoversubplot = _this.id;\n    };\n\n    dragger.onmouseout = function(evt) {\n        if(gd._dragging) return;\n\n        dragElement.unhover(gd, evt);\n    };\n\n    dragElement.init(dragOptions);\n};\n\nfunction removeZoombox(gd) {\n    d3.select(gd)\n        .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners')\n        .remove();\n}\n\n},{\"../../components/color\":580,\"../../components/dragelement\":598,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../components/titles\":668,\"../../lib\":703,\"../../lib/extend\":693,\"../../registry\":831,\"../cartesian/axes\":751,\"../cartesian/constants\":757,\"../cartesian/select\":768,\"../cartesian/set_convert\":769,\"../plots\":812,\"d3\":157,\"tinycolor2\":524}],831:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Loggers = _dereq_('./lib/loggers');\nvar noop = _dereq_('./lib/noop');\nvar pushUnique = _dereq_('./lib/push_unique');\nvar isPlainObject = _dereq_('./lib/is_plain_object');\nvar ExtendModule = _dereq_('./lib/extend');\n\nvar basePlotAttributes = _dereq_('./plots/attributes');\nvar baseLayoutAttributes = _dereq_('./plots/layout_attributes');\n\nvar extendFlat = ExtendModule.extendFlat;\nvar extendDeepAll = ExtendModule.extendDeepAll;\n\nexports.modules = {};\nexports.allCategories = {};\nexports.allTypes = [];\nexports.subplotsRegistry = {};\nexports.transformsRegistry = {};\nexports.componentsRegistry = {};\nexports.layoutArrayContainers = [];\nexports.layoutArrayRegexes = [];\nexports.traceLayoutAttributes = {};\nexports.localeRegistry = {};\nexports.apiMethodRegistry = {};\nexports.collectableSubplotTypes = null;\n\n/**\n * Top-level register routine, exported as Plotly.register\n *\n * @param {object array or array of objects} _modules :\n *  module object or list of module object to register.\n *\n *  A valid `moduleType: 'trace'` module has fields:\n *  - name {string} : the trace type\n *  - categories {array} : categories associated with this trace type,\n *                         tested with Register.traceIs()\n *  - meta {object} : meta info (mostly for plot-schema)\n *\n *  A valid `moduleType: 'locale'` module has fields:\n *  - name {string} : the locale name. Should be a 2-digit language string ('en', 'de')\n *                    optionally with a country/region code ('en-GB', 'de-CH'). If a country\n *                    code is used but the base language locale has not yet been supplied,\n *                    we will use this locale for the base as well.\n *  - dictionary {object} : the dictionary mapping input strings to localized strings\n *                          generally the keys should be the literal input strings, but\n *                          if default translations are provided you can use any string as a key.\n *  - format {object} : a `d3.locale` format specifier for this locale\n *                      any omitted keys we'll fall back on en-US.\n *\n *  A valid `moduleType: 'transform'` module has fields:\n *  - name {string} : transform name\n *  - transform {function} : default-level transform function\n *  - calcTransform {function} : calc-level transform function\n *  - attributes {object} : transform attributes declarations\n *  - supplyDefaults {function} : attributes default-supply function\n *\n *  A valid `moduleType: 'component'` module has fields:\n *  - name {string} : the component name, used it with Register.getComponentMethod()\n *                    to employ component method.\n *\n *  A valid `moduleType: 'apiMethod'` module has fields:\n *  - name {string} : the api method name.\n *  - fn {function} : the api method called with Register.call();\n *\n */\nexports.register = function register(_modules) {\n    exports.collectableSubplotTypes = null;\n\n    if(!_modules) {\n        throw new Error('No argument passed to Plotly.register.');\n    } else if(_modules && !Array.isArray(_modules)) {\n        _modules = [_modules];\n    }\n\n    for(var i = 0; i < _modules.length; i++) {\n        var newModule = _modules[i];\n\n        if(!newModule) {\n            throw new Error('Invalid module was attempted to be registered!');\n        }\n\n        switch(newModule.moduleType) {\n            case 'trace':\n                registerTraceModule(newModule);\n                break;\n            case 'transform':\n                registerTransformModule(newModule);\n                break;\n            case 'component':\n                registerComponentModule(newModule);\n                break;\n            case 'locale':\n                registerLocale(newModule);\n                break;\n            case 'apiMethod':\n                var name = newModule.name;\n                exports.apiMethodRegistry[name] = newModule.fn;\n                break;\n            default:\n                throw new Error('Invalid module was attempted to be registered!');\n        }\n    }\n};\n\n/**\n * Get registered module using trace object or trace type\n *\n * @param {object||string} trace\n *  trace object with prop 'type' or trace type as a string\n * @return {object}\n *  module object corresponding to trace type\n */\nexports.getModule = function(trace) {\n    var _module = exports.modules[getTraceType(trace)];\n    if(!_module) return false;\n    return _module._module;\n};\n\n/**\n * Determine if this trace type is in a given category\n *\n * @param {object||string} traceType\n *  a trace (object) or trace type (string)\n * @param {string} category\n *  category in question\n * @return {boolean}\n */\nexports.traceIs = function(traceType, category) {\n    traceType = getTraceType(traceType);\n\n    // old plot.ly workspace hack, nothing to see here\n    if(traceType === 'various') return false;\n\n    var _module = exports.modules[traceType];\n\n    if(!_module) {\n        if(traceType && traceType !== 'area') {\n            Loggers.log('Unrecognized trace type ' + traceType + '.');\n        }\n\n        _module = exports.modules[basePlotAttributes.type.dflt];\n    }\n\n    return !!_module.categories[category];\n};\n\n/**\n * Determine if this trace has a transform of the given type and return\n * array of matching indices.\n *\n * @param {object} data\n *  a trace object (member of data or fullData)\n * @param {string} type\n *  type of trace to test\n * @return {array}\n *  array of matching indices. If none found, returns []\n */\nexports.getTransformIndices = function(data, type) {\n    var indices = [];\n    var transforms = data.transforms || [];\n    for(var i = 0; i < transforms.length; i++) {\n        if(transforms[i].type === type) {\n            indices.push(i);\n        }\n    }\n    return indices;\n};\n\n/**\n * Determine if this trace has a transform of the given type\n *\n * @param {object} data\n *  a trace object (member of data or fullData)\n * @param {string} type\n *  type of trace to test\n * @return {boolean}\n */\nexports.hasTransform = function(data, type) {\n    var transforms = data.transforms || [];\n    for(var i = 0; i < transforms.length; i++) {\n        if(transforms[i].type === type) {\n            return true;\n        }\n    }\n    return false;\n};\n\n/**\n * Retrieve component module method. Falls back on noop if either the\n * module or the method is missing, so the result can always be safely called\n *\n * @param {string} name\n *  name of component (as declared in component module)\n * @param {string} method\n *  name of component module method\n * @return {function}\n */\nexports.getComponentMethod = function(name, method) {\n    var _module = exports.componentsRegistry[name];\n\n    if(!_module) return noop;\n    return _module[method] || noop;\n};\n\n/**\n * Call registered api method.\n *\n * @param {string} name : api method name\n * @param {...array} args : arguments passed to api method\n * @return {any} : returns api method output\n */\nexports.call = function() {\n    var name = arguments[0];\n    var args = [].slice.call(arguments, 1);\n    return exports.apiMethodRegistry[name].apply(null, args);\n};\n\nfunction registerTraceModule(_module) {\n    var thisType = _module.name;\n    var categoriesIn = _module.categories;\n    var meta = _module.meta;\n\n    if(exports.modules[thisType]) {\n        Loggers.log('Type ' + thisType + ' already registered');\n        return;\n    }\n\n    if(!exports.subplotsRegistry[_module.basePlotModule.name]) {\n        registerSubplot(_module.basePlotModule);\n    }\n\n    var categoryObj = {};\n    for(var i = 0; i < categoriesIn.length; i++) {\n        categoryObj[categoriesIn[i]] = true;\n        exports.allCategories[categoriesIn[i]] = true;\n    }\n\n    exports.modules[thisType] = {\n        _module: _module,\n        categories: categoryObj\n    };\n\n    if(meta && Object.keys(meta).length) {\n        exports.modules[thisType].meta = meta;\n    }\n\n    exports.allTypes.push(thisType);\n\n    for(var componentName in exports.componentsRegistry) {\n        mergeComponentAttrsToTrace(componentName, thisType);\n    }\n\n    /*\n     * Collect all trace layout attributes in one place for easier lookup later\n     * but don't merge them into the base schema as it would confuse the docs\n     * (at least after https://github.com/plotly/documentation/issues/202 gets done!)\n     */\n    if(_module.layoutAttributes) {\n        extendFlat(exports.traceLayoutAttributes, _module.layoutAttributes);\n    }\n}\n\nfunction registerSubplot(_module) {\n    var plotType = _module.name;\n\n    if(exports.subplotsRegistry[plotType]) {\n        Loggers.log('Plot type ' + plotType + ' already registered.');\n        return;\n    }\n\n    // relayout array handling will look for component module methods with this\n    // name and won't find them because this is a subplot module... but that\n    // should be fine, it will just fall back on redrawing the plot.\n    findArrayRegexps(_module);\n\n    // not sure what's best for the 'cartesian' type at this point\n    exports.subplotsRegistry[plotType] = _module;\n\n    for(var componentName in exports.componentsRegistry) {\n        mergeComponentAttrsToSubplot(componentName, _module.name);\n    }\n}\n\nfunction registerComponentModule(_module) {\n    if(typeof _module.name !== 'string') {\n        throw new Error('Component module *name* must be a string.');\n    }\n\n    var name = _module.name;\n    exports.componentsRegistry[name] = _module;\n\n    if(_module.layoutAttributes) {\n        if(_module.layoutAttributes._isLinkedToArray) {\n            pushUnique(exports.layoutArrayContainers, name);\n        }\n        findArrayRegexps(_module);\n    }\n\n    for(var traceType in exports.modules) {\n        mergeComponentAttrsToTrace(name, traceType);\n    }\n\n    for(var subplotName in exports.subplotsRegistry) {\n        mergeComponentAttrsToSubplot(name, subplotName);\n    }\n\n    for(var transformType in exports.transformsRegistry) {\n        mergeComponentAttrsToTransform(name, transformType);\n    }\n\n    if(_module.schema && _module.schema.layout) {\n        extendDeepAll(baseLayoutAttributes, _module.schema.layout);\n    }\n}\n\nfunction registerTransformModule(_module) {\n    if(typeof _module.name !== 'string') {\n        throw new Error('Transform module *name* must be a string.');\n    }\n\n    var prefix = 'Transform module ' + _module.name;\n    var hasTransform = typeof _module.transform === 'function';\n    var hasCalcTransform = typeof _module.calcTransform === 'function';\n\n    if(!hasTransform && !hasCalcTransform) {\n        throw new Error(prefix + ' is missing a *transform* or *calcTransform* method.');\n    }\n    if(hasTransform && hasCalcTransform) {\n        Loggers.log([\n            prefix + ' has both a *transform* and *calcTransform* methods.',\n            'Please note that all *transform* methods are executed',\n            'before all *calcTransform* methods.'\n        ].join(' '));\n    }\n    if(!isPlainObject(_module.attributes)) {\n        Loggers.log(prefix + ' registered without an *attributes* object.');\n    }\n    if(typeof _module.supplyDefaults !== 'function') {\n        Loggers.log(prefix + ' registered without a *supplyDefaults* method.');\n    }\n\n    exports.transformsRegistry[_module.name] = _module;\n\n    for(var componentName in exports.componentsRegistry) {\n        mergeComponentAttrsToTransform(componentName, _module.name);\n    }\n}\n\nfunction registerLocale(_module) {\n    var locale = _module.name;\n    var baseLocale = locale.split('-')[0];\n\n    var newDict = _module.dictionary;\n    var newFormat = _module.format;\n    var hasDict = newDict && Object.keys(newDict).length;\n    var hasFormat = newFormat && Object.keys(newFormat).length;\n\n    var locales = exports.localeRegistry;\n\n    var localeObj = locales[locale];\n    if(!localeObj) locales[locale] = localeObj = {};\n\n    // Should we use this dict for the base locale?\n    // In case we're overwriting a previous dict for this locale, check\n    // whether the base matches the full locale dict now. If we're not\n    // overwriting, locales[locale] is undefined so this just checks if\n    // baseLocale already had a dict or not.\n    // Same logic for dateFormats\n    if(baseLocale !== locale) {\n        var baseLocaleObj = locales[baseLocale];\n        if(!baseLocaleObj) locales[baseLocale] = baseLocaleObj = {};\n\n        if(hasDict && baseLocaleObj.dictionary === localeObj.dictionary) {\n            baseLocaleObj.dictionary = newDict;\n        }\n        if(hasFormat && baseLocaleObj.format === localeObj.format) {\n            baseLocaleObj.format = newFormat;\n        }\n    }\n\n    if(hasDict) localeObj.dictionary = newDict;\n    if(hasFormat) localeObj.format = newFormat;\n}\n\nfunction findArrayRegexps(_module) {\n    if(_module.layoutAttributes) {\n        var arrayAttrRegexps = _module.layoutAttributes._arrayAttrRegexps;\n        if(arrayAttrRegexps) {\n            for(var i = 0; i < arrayAttrRegexps.length; i++) {\n                pushUnique(exports.layoutArrayRegexes, arrayAttrRegexps[i]);\n            }\n        }\n    }\n}\n\nfunction mergeComponentAttrsToTrace(componentName, traceType) {\n    var componentSchema = exports.componentsRegistry[componentName].schema;\n    if(!componentSchema || !componentSchema.traces) return;\n\n    var traceAttrs = componentSchema.traces[traceType];\n    if(traceAttrs) {\n        extendDeepAll(exports.modules[traceType]._module.attributes, traceAttrs);\n    }\n}\n\nfunction mergeComponentAttrsToTransform(componentName, transformType) {\n    var componentSchema = exports.componentsRegistry[componentName].schema;\n    if(!componentSchema || !componentSchema.transforms) return;\n\n    var transformAttrs = componentSchema.transforms[transformType];\n    if(transformAttrs) {\n        extendDeepAll(exports.transformsRegistry[transformType].attributes, transformAttrs);\n    }\n}\n\nfunction mergeComponentAttrsToSubplot(componentName, subplotName) {\n    var componentSchema = exports.componentsRegistry[componentName].schema;\n    if(!componentSchema || !componentSchema.subplots) return;\n\n    var subplotModule = exports.subplotsRegistry[subplotName];\n    var subplotAttrs = subplotModule.layoutAttributes;\n    var subplotAttr = subplotModule.attr === 'subplot' ? subplotModule.name : subplotModule.attr;\n    if(Array.isArray(subplotAttr)) subplotAttr = subplotAttr[0];\n\n    var componentLayoutAttrs = componentSchema.subplots[subplotAttr];\n    if(subplotAttrs && componentLayoutAttrs) {\n        extendDeepAll(subplotAttrs, componentLayoutAttrs);\n    }\n}\n\nfunction getTraceType(traceType) {\n    if(typeof traceType === 'object') traceType = traceType.type;\n    return traceType;\n}\n\n},{\"./lib/extend\":693,\"./lib/is_plain_object\":704,\"./lib/loggers\":707,\"./lib/noop\":712,\"./lib/push_unique\":717,\"./plots/attributes\":748,\"./plots/layout_attributes\":803}],832:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\nvar Lib = _dereq_('../lib');\n\nvar extendFlat = Lib.extendFlat;\nvar extendDeep = Lib.extendDeep;\n\n// Put default plotTile layouts here\nfunction cloneLayoutOverride(tileClass) {\n    var override;\n\n    switch(tileClass) {\n        case 'themes__thumb':\n            override = {\n                autosize: true,\n                width: 150,\n                height: 150,\n                title: {text: ''},\n                showlegend: false,\n                margin: {l: 5, r: 5, t: 5, b: 5, pad: 0},\n                annotations: []\n            };\n            break;\n\n        case 'thumbnail':\n            override = {\n                title: {text: ''},\n                hidesources: true,\n                showlegend: false,\n                borderwidth: 0,\n                bordercolor: '',\n                margin: {l: 1, r: 1, t: 1, b: 1, pad: 0},\n                annotations: []\n            };\n            break;\n\n        default:\n            override = {};\n    }\n\n\n    return override;\n}\n\nfunction keyIsAxis(keyName) {\n    var types = ['xaxis', 'yaxis', 'zaxis'];\n    return (types.indexOf(keyName.slice(0, 5)) > -1);\n}\n\n\nmodule.exports = function clonePlot(graphObj, options) {\n    // Polar plot compatibility\n    if(graphObj.framework && graphObj.framework.isPolar) {\n        graphObj = graphObj.framework.getConfig();\n    }\n\n    var i;\n    var oldData = graphObj.data;\n    var oldLayout = graphObj.layout;\n    var newData = extendDeep([], oldData);\n    var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass));\n    var context = graphObj._context || {};\n\n    if(options.width) newLayout.width = options.width;\n    if(options.height) newLayout.height = options.height;\n\n    if(options.tileClass === 'thumbnail' || options.tileClass === 'themes__thumb') {\n        // kill annotations\n        newLayout.annotations = [];\n        var keys = Object.keys(newLayout);\n\n        for(i = 0; i < keys.length; i++) {\n            if(keyIsAxis(keys[i])) {\n                newLayout[keys[i]].title = {text: ''};\n            }\n        }\n\n        // kill colorbar and pie labels\n        for(i = 0; i < newData.length; i++) {\n            var trace = newData[i];\n            trace.showscale = false;\n            if(trace.marker) trace.marker.showscale = false;\n            if(Registry.traceIs(trace, 'pie-like')) trace.textposition = 'none';\n        }\n    }\n\n    if(Array.isArray(options.annotations)) {\n        for(i = 0; i < options.annotations.length; i++) {\n            newLayout.annotations.push(options.annotations[i]);\n        }\n    }\n\n    // TODO: does this scene modification really belong here?\n    // If we still need it, can it move into the gl3d module?\n    var sceneIds = Object.keys(newLayout).filter(function(key) {\n        return key.match(/^scene\\d*$/);\n    });\n    if(sceneIds.length) {\n        var axesImageOverride = {};\n        if(options.tileClass === 'thumbnail') {\n            axesImageOverride = {\n                title: {text: ''},\n                showaxeslabels: false,\n                showticklabels: false,\n                linetickenable: false\n            };\n        }\n        for(i = 0; i < sceneIds.length; i++) {\n            var scene = newLayout[sceneIds[i]];\n\n            if(!scene.xaxis) {\n                scene.xaxis = {};\n            }\n\n            if(!scene.yaxis) {\n                scene.yaxis = {};\n            }\n\n            if(!scene.zaxis) {\n                scene.zaxis = {};\n            }\n\n            extendFlat(scene.xaxis, axesImageOverride);\n            extendFlat(scene.yaxis, axesImageOverride);\n            extendFlat(scene.zaxis, axesImageOverride);\n\n            // TODO what does this do?\n            scene._scene = null;\n        }\n    }\n\n    var gd = document.createElement('div');\n    if(options.tileClass) gd.className = options.tileClass;\n\n    var plotTile = {\n        gd: gd,\n        td: gd, // for external (image server) compatibility\n        layout: newLayout,\n        data: newData,\n        config: {\n            staticPlot: (options.staticPlot === undefined) ?\n                true :\n                options.staticPlot,\n            plotGlPixelRatio: (options.plotGlPixelRatio === undefined) ?\n                2 :\n                options.plotGlPixelRatio,\n            displaylogo: options.displaylogo || false,\n            showLink: options.showLink || false,\n            showTips: options.showTips || false,\n            mapboxAccessToken: context.mapboxAccessToken\n        }\n    };\n\n    if(options.setBackground !== 'transparent') {\n        plotTile.config.setBackground = options.setBackground || 'opaque';\n    }\n\n    // attaching the default Layout the gd, so you can grab it later\n    plotTile.gd.defaultLayout = cloneLayoutOverride(options.tileClass);\n\n    return plotTile;\n};\n\n},{\"../lib\":703,\"../registry\":831}],833:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar toImage = _dereq_('../plot_api/to_image');\nvar Lib = _dereq_('../lib');\nvar fileSaver = _dereq_('./filesaver');\n\n/** Plotly.downloadImage\n *\n * @param {object | string | HTML div} gd\n *   can either be a data/layout/config object\n *   or an existing graph <div>\n *   or an id to an existing graph <div>\n * @param {object} opts (see ../plot_api/to_image)\n * @return {promise}\n */\nfunction downloadImage(gd, opts) {\n    var _gd;\n    if(!Lib.isPlainObject(gd)) _gd = Lib.getGraphDiv(gd);\n\n    // check for undefined opts\n    opts = opts || {};\n    // default to png\n    opts.format = opts.format || 'png';\n\n    return new Promise(function(resolve, reject) {\n        if(_gd && _gd._snapshotInProgress) {\n            reject(new Error('Snapshotting already in progress.'));\n        }\n\n        // see comments within svgtoimg for additional\n        //   discussion of problems with IE\n        //   can now draw to canvas, but CORS tainted canvas\n        //   does not allow toDataURL\n        //   svg format will work though\n        if(Lib.isIE() && opts.format !== 'svg') {\n            reject(new Error('Sorry IE does not support downloading from canvas. Try {format:\\'svg\\'} instead.'));\n        }\n\n        if(_gd) _gd._snapshotInProgress = true;\n        var promise = toImage(gd, opts);\n\n        var filename = opts.filename || gd.fn || 'newplot';\n        filename += '.' + opts.format;\n\n        promise.then(function(result) {\n            if(_gd) _gd._snapshotInProgress = false;\n            return fileSaver(result, filename);\n        }).then(function(name) {\n            resolve(name);\n        }).catch(function(err) {\n            if(_gd) _gd._snapshotInProgress = false;\n            reject(err);\n        });\n    });\n}\n\nmodule.exports = downloadImage;\n\n},{\"../lib\":703,\"../plot_api/to_image\":744,\"./filesaver\":834}],834:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n/*\n* substantial portions of this code from FileSaver.js\n* https://github.com/eligrey/FileSaver.js\n* License: https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n* 1.1.20160328\n*\n* By Eli Grey, http://eligrey.com\n* License: MIT\n*   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n*/\n\n'use strict';\n\nvar fileSaver = function(url, name) {\n    var saveLink = document.createElement('a');\n    var canUseSaveLink = 'download' in saveLink;\n    var isSafari = /Version\\/[\\d\\.]+.*Safari/.test(navigator.userAgent);\n    var promise = new Promise(function(resolve, reject) {\n        // IE <10 is explicitly unsupported\n        if(typeof navigator !== 'undefined' && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n            reject(new Error('IE < 10 unsupported'));\n        }\n\n        // First try a.download, then web filesystem, then object URLs\n        if(isSafari) {\n            // Safari doesn't allow downloading of blob urls\n            document.location.href = 'data:application/octet-stream' + url.slice(url.search(/[,;]/));\n            resolve(name);\n        }\n\n        if(!name) {\n            name = 'download';\n        }\n\n        if(canUseSaveLink) {\n            saveLink.href = url;\n            saveLink.download = name;\n            document.body.appendChild(saveLink);\n            saveLink.click();\n            document.body.removeChild(saveLink);\n            resolve(name);\n        }\n\n        // IE 10+ (native saveAs)\n        if(typeof navigator !== 'undefined' && navigator.msSaveBlob) {\n            // At this point we are only dealing with a SVG encoded as\n            // a data URL (since IE only supports SVG)\n            var encoded = url.split(/^data:image\\/svg\\+xml,/)[1];\n            var svg = decodeURIComponent(encoded);\n            navigator.msSaveBlob(new Blob([svg]), name);\n            resolve(name);\n        }\n\n        reject(new Error('download error'));\n    });\n\n    return promise;\n};\n\nmodule.exports = fileSaver;\n\n},{}],835:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../registry');\n\nexports.getDelay = function(fullLayout) {\n    if(!fullLayout._has) return 0;\n\n    return (\n        fullLayout._has('gl3d') ||\n        fullLayout._has('gl2d') ||\n        fullLayout._has('mapbox')\n    ) ? 500 : 0;\n};\n\nexports.getRedrawFunc = function(gd) {\n    return function() {\n        var fullLayout = gd._fullLayout || {};\n        var hasPolar = fullLayout._has && fullLayout._has('polar');\n        var hasLegacyPolar = !hasPolar && gd.data && gd.data[0] && gd.data[0].r;\n\n        if(!hasLegacyPolar) {\n            Registry.getComponentMethod('colorbar', 'draw')(gd);\n        }\n    };\n};\n\n},{\"../registry\":831}],836:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar helpers = _dereq_('./helpers');\n\nvar Snapshot = {\n    getDelay: helpers.getDelay,\n    getRedrawFunc: helpers.getRedrawFunc,\n    clone: _dereq_('./cloneplot'),\n    toSVG: _dereq_('./tosvg'),\n    svgToImg: _dereq_('./svgtoimg'),\n    toImage: _dereq_('./toimage'),\n    downloadImage: _dereq_('./download')\n};\n\nmodule.exports = Snapshot;\n\n},{\"./cloneplot\":832,\"./download\":833,\"./helpers\":835,\"./svgtoimg\":837,\"./toimage\":838,\"./tosvg\":839}],837:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar EventEmitter = _dereq_('events').EventEmitter;\n\nfunction svgToImg(opts) {\n    var ev = opts.emitter || new EventEmitter();\n\n    var promise = new Promise(function(resolve, reject) {\n        var Image = window.Image;\n        var svg = opts.svg;\n        var format = opts.format || 'png';\n\n        // IE only support svg\n        if(Lib.isIE() && format !== 'svg') {\n            var ieSvgError = new Error('Sorry IE does not support downloading from canvas. Try {format:\\'svg\\'} instead.');\n            reject(ieSvgError);\n            // eventually remove the ev\n            //  in favor of promises\n            if(!opts.promise) {\n                return ev.emit('error', ieSvgError);\n            } else {\n                return promise;\n            }\n        }\n\n        var canvas = opts.canvas;\n        var scale = opts.scale || 1;\n        var w0 = opts.width || 300;\n        var h0 = opts.height || 150;\n        var w1 = scale * w0;\n        var h1 = scale * h0;\n\n        var ctx = canvas.getContext('2d');\n        var img = new Image();\n\n        // for Safari support, eliminate createObjectURL\n        //  this decision could cause problems if content\n        //  is not restricted to svg\n        var url = 'data:image/svg+xml,' + encodeURIComponent(svg);\n\n        canvas.width = w1;\n        canvas.height = h1;\n\n        img.onload = function() {\n            var imgData;\n\n            // don't need to draw to canvas if svg\n            //  save some time and also avoid failure on IE\n            if(format !== 'svg') {\n                ctx.drawImage(img, 0, 0, w1, h1);\n            }\n\n            switch(format) {\n                case 'jpeg':\n                    imgData = canvas.toDataURL('image/jpeg');\n                    break;\n                case 'png':\n                    imgData = canvas.toDataURL('image/png');\n                    break;\n                case 'webp':\n                    imgData = canvas.toDataURL('image/webp');\n                    break;\n                case 'svg':\n                    imgData = url;\n                    break;\n                default:\n                    var errorMsg = 'Image format is not jpeg, png, svg or webp.';\n                    reject(new Error(errorMsg));\n                    // eventually remove the ev\n                    //  in favor of promises\n                    if(!opts.promise) {\n                        return ev.emit('error', errorMsg);\n                    }\n            }\n            resolve(imgData);\n            // eventually remove the ev\n            //  in favor of promises\n            if(!opts.promise) {\n                ev.emit('success', imgData);\n            }\n        };\n\n        img.onerror = function(err) {\n            reject(err);\n            // eventually remove the ev\n            //  in favor of promises\n            if(!opts.promise) {\n                return ev.emit('error', err);\n            }\n        };\n\n        img.src = url;\n    });\n\n    // temporary for backward compatibility\n    //  move to only Promise in 2.0.0\n    //  and eliminate the EventEmitter\n    if(opts.promise) {\n        return promise;\n    }\n\n    return ev;\n}\n\nmodule.exports = svgToImg;\n\n},{\"../lib\":703,\"events\":97}],838:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar EventEmitter = _dereq_('events').EventEmitter;\n\nvar Registry = _dereq_('../registry');\nvar Lib = _dereq_('../lib');\n\nvar helpers = _dereq_('./helpers');\nvar clonePlot = _dereq_('./cloneplot');\nvar toSVG = _dereq_('./tosvg');\nvar svgToImg = _dereq_('./svgtoimg');\n\n/**\n * @param {object} gd figure Object\n * @param {object} opts option object\n * @param opts.format 'jpeg' | 'png' | 'webp' | 'svg'\n */\nfunction toImage(gd, opts) {\n    // first clone the GD so we can operate in a clean environment\n    var ev = new EventEmitter();\n\n    var clone = clonePlot(gd, {format: 'png'});\n    var clonedGd = clone.gd;\n\n    // put the cloned div somewhere off screen before attaching to DOM\n    clonedGd.style.position = 'absolute';\n    clonedGd.style.left = '-5000px';\n    document.body.appendChild(clonedGd);\n\n    function wait() {\n        var delay = helpers.getDelay(clonedGd._fullLayout);\n\n        setTimeout(function() {\n            var svg = toSVG(clonedGd);\n\n            var canvas = document.createElement('canvas');\n            canvas.id = Lib.randstr();\n\n            ev = svgToImg({\n                format: opts.format,\n                width: clonedGd._fullLayout.width,\n                height: clonedGd._fullLayout.height,\n                canvas: canvas,\n                emitter: ev,\n                svg: svg\n            });\n\n            ev.clean = function() {\n                if(clonedGd) document.body.removeChild(clonedGd);\n            };\n        }, delay);\n    }\n\n    var redrawFunc = helpers.getRedrawFunc(clonedGd);\n\n    Registry.call('plot', clonedGd, clone.data, clone.layout, clone.config)\n        .then(redrawFunc)\n        .then(wait)\n        .catch(function(err) {\n            ev.emit('error', err);\n        });\n\n\n    return ev;\n}\n\nmodule.exports = toImage;\n\n},{\"../lib\":703,\"../registry\":831,\"./cloneplot\":832,\"./helpers\":835,\"./svgtoimg\":837,\"./tosvg\":839,\"events\":97}],839:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../lib');\nvar Drawing = _dereq_('../components/drawing');\nvar Color = _dereq_('../components/color');\n\nvar xmlnsNamespaces = _dereq_('../constants/xmlns_namespaces');\nvar DOUBLEQUOTE_REGEX = /\"/g;\nvar DUMMY_SUB = 'TOBESTRIPPED';\nvar DUMMY_REGEX = new RegExp('(\"' + DUMMY_SUB + ')|(' + DUMMY_SUB + '\")', 'g');\n\nfunction htmlEntityDecode(s) {\n    var hiddenDiv = d3.select('body').append('div').style({display: 'none'}).html('');\n    var replaced = s.replace(/(&[^;]*;)/gi, function(d) {\n        if(d === '&lt;') { return '&#60;'; } // special handling for brackets\n        if(d === '&rt;') { return '&#62;'; }\n        if(d.indexOf('<') !== -1 || d.indexOf('>') !== -1) { return ''; }\n        return hiddenDiv.html(d).text(); // everything else, let the browser decode it to unicode\n    });\n    hiddenDiv.remove();\n    return replaced;\n}\n\nfunction xmlEntityEncode(str) {\n    return str.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g, '&amp;');\n}\n\nmodule.exports = function toSVG(gd, format, scale) {\n    var fullLayout = gd._fullLayout;\n    var svg = fullLayout._paper;\n    var toppaper = fullLayout._toppaper;\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n    var i;\n\n    // make background color a rect in the svg, then revert after scraping\n    // all other alterations have been dealt with by properly preparing the svg\n    // in the first place... like setting cursors with css classes so we don't\n    // have to remove them, and providing the right namespaces in the svg to\n    // begin with\n    svg.insert('rect', ':first-child')\n        .call(Drawing.setRect, 0, 0, width, height)\n        .call(Color.fill, fullLayout.paper_bgcolor);\n\n    // subplot-specific to-SVG methods\n    // which notably add the contents of the gl-container\n    // into the main svg node\n    var basePlotModules = fullLayout._basePlotModules || [];\n    for(i = 0; i < basePlotModules.length; i++) {\n        var _module = basePlotModules[i];\n\n        if(_module.toSVG) _module.toSVG(gd);\n    }\n\n    // add top items above them assumes everything in toppaper is either\n    // a group or a defs, and if it's empty (like hoverlayer) we can ignore it.\n    if(toppaper) {\n        var nodes = toppaper.node().childNodes;\n\n        // make copy of nodes as childNodes prop gets mutated in loop below\n        var topGroups = Array.prototype.slice.call(nodes);\n\n        for(i = 0; i < topGroups.length; i++) {\n            var topGroup = topGroups[i];\n\n            if(topGroup.childNodes.length) svg.node().appendChild(topGroup);\n        }\n    }\n\n    // remove draglayer for Adobe Illustrator compatibility\n    if(fullLayout._draggers) {\n        fullLayout._draggers.remove();\n    }\n\n    // in case the svg element had an explicit background color, remove this\n    // we want the rect to get the color so it's the right size; svg bg will\n    // fill whatever container it's displayed in regardless of plot size.\n    svg.node().style.background = '';\n\n    svg.selectAll('text')\n        .attr({'data-unformatted': null, 'data-math': null})\n        .each(function() {\n            var txt = d3.select(this);\n\n            // hidden text is pre-formatting mathjax, the browser ignores it\n            // but in a static plot it's useless and it can confuse batik\n            // we've tried to standardize on display:none but make sure we still\n            // catch visibility:hidden if it ever arises\n            if(this.style.visibility === 'hidden' || this.style.display === 'none') {\n                txt.remove();\n                return;\n            } else {\n                // clear other visibility/display values to default\n                // to not potentially confuse non-browser SVG implementations\n                txt.style({visibility: null, display: null});\n            }\n\n            // Font family styles break things because of quotation marks,\n            // so we must remove them *after* the SVG DOM has been serialized\n            // to a string (browsers convert singles back)\n            var ff = this.style.fontFamily;\n            if(ff && ff.indexOf('\"') !== -1) {\n                txt.style('font-family', ff.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));\n            }\n        });\n\n    svg.selectAll('.point, .scatterpts, .legendfill>path, .legendlines>path, .cbfill').each(function() {\n        var pt = d3.select(this);\n\n        // similar to font family styles above,\n        // we must remove \" after the SVG DOM has been serialized\n        var fill = this.style.fill;\n        if(fill && fill.indexOf('url(') !== -1) {\n            pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));\n        }\n\n        var stroke = this.style.stroke;\n        if(stroke && stroke.indexOf('url(') !== -1) {\n            pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));\n        }\n    });\n\n    if(format === 'pdf' || format === 'eps') {\n        // these formats make the extra line MathJax adds around symbols look super thick in some cases\n        // it looks better if this is removed entirely.\n        svg.selectAll('#MathJax_SVG_glyphs path')\n            .attr('stroke-width', 0);\n    }\n\n    // fix for IE namespacing quirk?\n    // http://stackoverflow.com/questions/19610089/unwanted-namespaces-on-svg-markup-when-using-xmlserializer-in-javascript-with-ie\n    svg.node().setAttributeNS(xmlnsNamespaces.xmlns, 'xmlns', xmlnsNamespaces.svg);\n    svg.node().setAttributeNS(xmlnsNamespaces.xmlns, 'xmlns:xlink', xmlnsNamespaces.xlink);\n\n    if(format === 'svg' && scale) {\n        svg.attr('width', scale * width);\n        svg.attr('height', scale * height);\n        svg.attr('viewBox', '0 0 ' + width + ' ' + height);\n    }\n\n    var s = new window.XMLSerializer().serializeToString(svg.node());\n    s = htmlEntityDecode(s);\n    s = xmlEntityEncode(s);\n\n    // Fix quotations around font strings and gradient URLs\n    s = s.replace(DUMMY_REGEX, '\\'');\n\n    // IE is very strict, so we will need to clean\n    //  svg with the following regex\n    //  yes this is messy, but do not know a better way\n    // Even with this IE will not work due to tainted canvas\n    //  see https://github.com/kangax/fabric.js/issues/1957\n    //      http://stackoverflow.com/questions/18112047/canvas-todataurl-working-in-all-browsers-except-ie10\n    // Leave here just in case the CORS/tainted IE issue gets resolved\n    if(Lib.isIE()) {\n        // replace double quote with single quote\n        s = s.replace(/\"/gi, '\\'');\n        // url in svg are single quoted\n        //   since we changed double to single\n        //   we'll need to change these to double-quoted\n        s = s.replace(/(\\('#)([^']*)('\\))/gi, '(\\\"#$2\\\")');\n        // font names with spaces will be escaped single-quoted\n        //   we'll need to change these to double-quoted\n        s = s.replace(/(\\\\')/gi, '\\\"');\n    }\n\n    return s;\n};\n\n},{\"../components/color\":580,\"../components/drawing\":601,\"../constants/xmlns_namespaces\":681,\"../lib\":703,\"d3\":157}],840:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar mergeArray = _dereq_('../../lib').mergeArray;\n\n// arrayOk attributes, merge them into calcdata array\nmodule.exports = function arraysToCalcdata(cd, trace) {\n    for(var i = 0; i < cd.length; i++) cd[i].i = i;\n\n    mergeArray(trace.text, cd, 'tx');\n    mergeArray(trace.hovertext, cd, 'htx');\n\n    var marker = trace.marker;\n    if(marker) {\n        mergeArray(marker.opacity, cd, 'mo');\n        mergeArray(marker.color, cd, 'mc');\n\n        var markerLine = marker.line;\n        if(markerLine) {\n            mergeArray(markerLine.color, cd, 'mlc');\n            mergeArray(markerLine.width, cd, 'mlw');\n        }\n    }\n};\n\n},{\"../../lib\":703}],841:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar constants = _dereq_('./constants.js');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar textFontAttrs = fontAttrs({\n    editType: 'calc',\n    arrayOk: true,\n    colorEditType: 'style',\n    \n});\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nvar markerLineWidth = extendFlat({},\n    scatterMarkerLineAttrs.width, { dflt: 0 });\n\nvar markerLine = extendFlat({\n    width: markerLineWidth,\n    editType: 'calc'\n}, colorScaleAttrs('marker.line'));\n\nvar marker = extendFlat({\n    line: markerLine,\n    editType: 'calc'\n}, colorScaleAttrs('marker'), {\n    opacity: {\n        valType: 'number',\n        arrayOk: true,\n        dflt: 1,\n        min: 0,\n        max: 1,\n        \n        editType: 'style',\n        \n    }\n});\n\nmodule.exports = {\n    x: scatterAttrs.x,\n    x0: scatterAttrs.x0,\n    dx: scatterAttrs.dx,\n    y: scatterAttrs.y,\n    y0: scatterAttrs.y0,\n    dy: scatterAttrs.dy,\n\n    text: scatterAttrs.text,\n    hovertext: scatterAttrs.hovertext,\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: constants.eventDataKeys\n    }),\n\n    textposition: {\n        valType: 'enumerated',\n        \n        values: ['inside', 'outside', 'auto', 'none'],\n        dflt: 'none',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n\n    insidetextanchor: {\n        valType: 'enumerated',\n        values: ['end', 'middle', 'start'],\n        dflt: 'end',\n        \n        editType: 'plot',\n        \n    },\n\n    textangle: {\n        valType: 'angle',\n        dflt: 'auto',\n        \n        editType: 'plot',\n        \n    },\n\n    textfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n\n    insidetextfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n\n    outsidetextfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n\n    constraintext: {\n        valType: 'enumerated',\n        values: ['inside', 'outside', 'both', 'none'],\n        \n        dflt: 'both',\n        editType: 'calc',\n        \n    },\n\n    cliponaxis: extendFlat({}, scatterAttrs.cliponaxis, {\n        \n    }),\n\n    orientation: {\n        valType: 'enumerated',\n        \n        values: ['v', 'h'],\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    base: {\n        valType: 'any',\n        dflt: null,\n        arrayOk: true,\n        \n        editType: 'calc',\n        \n    },\n\n    offset: {\n        valType: 'number',\n        dflt: null,\n        arrayOk: true,\n        \n        editType: 'calc',\n        \n    },\n\n    width: {\n        valType: 'number',\n        dflt: null,\n        min: 0,\n        arrayOk: true,\n        \n        editType: 'calc',\n        \n    },\n\n    marker: marker,\n\n    offsetgroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n    alignmentgroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n\n    selected: {\n        marker: {\n            opacity: scatterAttrs.selected.marker.opacity,\n            color: scatterAttrs.selected.marker.color,\n            editType: 'style'\n        },\n        textfont: scatterAttrs.selected.textfont,\n        editType: 'style'\n    },\n    unselected: {\n        marker: {\n            opacity: scatterAttrs.unselected.marker.opacity,\n            color: scatterAttrs.unselected.marker.color,\n            editType: 'style'\n        },\n        textfont: scatterAttrs.unselected.textfont,\n        editType: 'style'\n    },\n\n    r: scatterAttrs.r,\n    t: scatterAttrs.t,\n\n    _deprecated: {\n        bardir: {\n            valType: 'enumerated',\n            \n            editType: 'calc',\n            values: ['v', 'h'],\n            \n        }\n    }\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/font_attributes\":777,\"../scatter/attributes\":1075,\"./constants.js\":843}],842:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar arraysToCalcdata = _dereq_('./arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\n\nmodule.exports = function calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var size, pos;\n\n    if(trace.orientation === 'h') {\n        size = xa.makeCalcdata(trace, 'x');\n        pos = ya.makeCalcdata(trace, 'y');\n    } else {\n        size = ya.makeCalcdata(trace, 'y');\n        pos = xa.makeCalcdata(trace, 'x');\n    }\n\n    // create the \"calculated data\" to plot\n    var serieslen = Math.min(pos.length, size.length);\n    var cd = new Array(serieslen);\n\n    // set position and size\n    for(var i = 0; i < serieslen; i++) {\n        cd[i] = { p: pos[i], s: size[i] };\n\n        if(trace.ids) {\n            cd[i].id = String(trace.ids[i]);\n        }\n    }\n\n    // auto-z and autocolorscale if applicable\n    if(hasColorscale(trace, 'marker')) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.marker.color,\n            containerStr: 'marker',\n            cLetter: 'c'\n        });\n    }\n    if(hasColorscale(trace, 'marker.line')) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.marker.line.color,\n            containerStr: 'marker.line',\n            cLetter: 'c'\n        });\n    }\n\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\n},{\"../../components/colorscale/calc\":588,\"../../components/colorscale/helpers\":591,\"../../plots/cartesian/axes\":751,\"../scatter/calc_selection\":1077,\"./arrays_to_calcdata\":840}],843:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    eventDataKeys: []\n};\n\n},{}],844:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar getAxisGroup = _dereq_('../../plots/cartesian/axis_ids').getAxisGroup;\nvar Sieve = _dereq_('./sieve.js');\n\n/*\n * Bar chart stacking/grouping positioning and autoscaling calculations\n * for each direction separately calculate the ranges and positions\n * note that this handles histograms too\n * now doing this one subplot at a time\n */\n\nfunction crossTraceCalc(gd, plotinfo) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    var fullLayout = gd._fullLayout;\n    var fullTraces = gd._fullData;\n    var calcTraces = gd.calcdata;\n    var calcTracesHorz = [];\n    var calcTracesVert = [];\n\n    for(var i = 0; i < fullTraces.length; i++) {\n        var fullTrace = fullTraces[i];\n        if(\n            fullTrace.visible === true &&\n            Registry.traceIs(fullTrace, 'bar') &&\n            fullTrace.xaxis === xa._id &&\n            fullTrace.yaxis === ya._id\n        ) {\n            if(fullTrace.orientation === 'h') {\n                calcTracesHorz.push(calcTraces[i]);\n            } else {\n                calcTracesVert.push(calcTraces[i]);\n            }\n        }\n    }\n\n    var opts = {\n        mode: fullLayout.barmode,\n        norm: fullLayout.barnorm,\n        gap: fullLayout.bargap,\n        groupgap: fullLayout.bargroupgap\n    };\n\n    setGroupPositions(gd, xa, ya, calcTracesVert, opts);\n    setGroupPositions(gd, ya, xa, calcTracesHorz, opts);\n}\n\nfunction setGroupPositions(gd, pa, sa, calcTraces, opts) {\n    if(!calcTraces.length) return;\n\n    var excluded;\n    var included;\n    var i, calcTrace, fullTrace;\n\n    initBase(sa, calcTraces);\n\n    switch(opts.mode) {\n        case 'overlay':\n            setGroupPositionsInOverlayMode(pa, sa, calcTraces, opts);\n            break;\n\n        case 'group':\n            // exclude from the group those traces for which the user set an offset\n            excluded = [];\n            included = [];\n            for(i = 0; i < calcTraces.length; i++) {\n                calcTrace = calcTraces[i];\n                fullTrace = calcTrace[0].trace;\n\n                if(fullTrace.offset === undefined) included.push(calcTrace);\n                else excluded.push(calcTrace);\n            }\n\n            if(included.length) {\n                setGroupPositionsInGroupMode(gd, pa, sa, included, opts);\n            }\n            if(excluded.length) {\n                setGroupPositionsInOverlayMode(pa, sa, excluded, opts);\n            }\n            break;\n\n        case 'stack':\n        case 'relative':\n            // exclude from the stack those traces for which the user set a base\n            excluded = [];\n            included = [];\n            for(i = 0; i < calcTraces.length; i++) {\n                calcTrace = calcTraces[i];\n                fullTrace = calcTrace[0].trace;\n\n                if(fullTrace.base === undefined) included.push(calcTrace);\n                else excluded.push(calcTrace);\n            }\n\n            if(included.length) {\n                setGroupPositionsInStackOrRelativeMode(gd, pa, sa, included, opts);\n            }\n            if(excluded.length) {\n                setGroupPositionsInOverlayMode(pa, sa, excluded, opts);\n            }\n            break;\n    }\n\n    collectExtents(calcTraces, pa);\n}\n\nfunction initBase(sa, calcTraces) {\n    var i, j;\n\n    for(i = 0; i < calcTraces.length; i++) {\n        var cd = calcTraces[i];\n        var trace = cd[0].trace;\n        var base = (trace.type === 'funnel') ? trace._base : trace.base;\n        var b;\n\n        // not sure if it really makes sense to have dates for bar size data...\n        // ideally if we want to make gantt charts or something we'd treat\n        // the actual size (trace.x or y) as time delta but base as absolute\n        // time. But included here for completeness.\n        var scalendar = trace.orientation === 'h' ? trace.xcalendar : trace.ycalendar;\n\n        // 'base' on categorical axes makes no sense\n        var d2c = sa.type === 'category' || sa.type === 'multicategory' ?\n            function() { return null; } :\n            sa.d2c;\n\n        if(isArrayOrTypedArray(base)) {\n            for(j = 0; j < Math.min(base.length, cd.length); j++) {\n                b = d2c(base[j], 0, scalendar);\n                if(isNumeric(b)) {\n                    cd[j].b = +b;\n                    cd[j].hasB = 1;\n                } else cd[j].b = 0;\n            }\n            for(; j < cd.length; j++) {\n                cd[j].b = 0;\n            }\n        } else {\n            b = d2c(base, 0, scalendar);\n            var hasBase = isNumeric(b);\n            b = hasBase ? b : 0;\n            for(j = 0; j < cd.length; j++) {\n                cd[j].b = b;\n                if(hasBase) cd[j].hasB = 1;\n            }\n        }\n    }\n}\n\nfunction setGroupPositionsInOverlayMode(pa, sa, calcTraces, opts) {\n    // update position axis and set bar offsets and widths\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n\n        var sieve = new Sieve([calcTrace], {\n            sepNegVal: false,\n            overlapNoMerge: !opts.norm\n        });\n\n        // set bar offsets and widths, and update position axis\n        setOffsetAndWidth(pa, sieve, opts);\n\n        // set bar bases and sizes, and update size axis\n        //\n        // (note that `setGroupPositionsInOverlayMode` handles the case barnorm\n        // is defined, because this function is also invoked for traces that\n        // can't be grouped or stacked)\n        if(opts.norm) {\n            sieveBars(sieve);\n            normalizeBars(sa, sieve, opts);\n        } else {\n            setBaseAndTop(sa, sieve);\n        }\n    }\n}\n\nfunction setGroupPositionsInGroupMode(gd, pa, sa, calcTraces, opts) {\n    var sieve = new Sieve(calcTraces, {\n        sepNegVal: false,\n        overlapNoMerge: !opts.norm\n    });\n\n    // set bar offsets and widths, and update position axis\n    setOffsetAndWidthInGroupMode(gd, pa, sieve, opts);\n\n    // relative-stack bars within the same trace that would otherwise\n    // be hidden\n    unhideBarsWithinTrace(sieve);\n\n    // set bar bases and sizes, and update size axis\n    if(opts.norm) {\n        sieveBars(sieve);\n        normalizeBars(sa, sieve, opts);\n    } else {\n        setBaseAndTop(sa, sieve);\n    }\n}\n\nfunction setGroupPositionsInStackOrRelativeMode(gd, pa, sa, calcTraces, opts) {\n    var sieve = new Sieve(calcTraces, {\n        sepNegVal: opts.mode === 'relative',\n        overlapNoMerge: !(opts.norm || opts.mode === 'stack' || opts.mode === 'relative')\n    });\n\n    // set bar offsets and widths, and update position axis\n    setOffsetAndWidth(pa, sieve, opts);\n\n    // set bar bases and sizes, and update size axis\n    stackBars(sa, sieve, opts);\n\n    // flag the outmost bar (for text display purposes)\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n\n        for(var j = 0; j < calcTrace.length; j++) {\n            var bar = calcTrace[j];\n\n            if(bar.s !== BADNUM) {\n                var isOutmostBar = ((bar.b + bar.s) === sieve.get(bar.p, bar.s));\n                if(isOutmostBar) bar._outmost = true;\n            }\n        }\n    }\n\n    // Note that marking the outmost bars has to be done\n    // before `normalizeBars` changes `bar.b` and `bar.s`.\n    if(opts.norm) normalizeBars(sa, sieve, opts);\n}\n\nfunction setOffsetAndWidth(pa, sieve, opts) {\n    var minDiff = sieve.minDiff;\n    var calcTraces = sieve.traces;\n\n    // set bar offsets and widths\n    var barGroupWidth = minDiff * (1 - opts.gap);\n    var barWidthPlusGap = barGroupWidth;\n    var barWidth = barWidthPlusGap * (1 - (opts.groupgap || 0));\n\n    // computer bar group center and bar offset\n    var offsetFromCenter = -barWidth / 2;\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var t = calcTrace[0].t;\n\n        // store bar width and offset for this trace\n        t.barwidth = barWidth;\n        t.poffset = offsetFromCenter;\n        t.bargroupwidth = barGroupWidth;\n        t.bardelta = minDiff;\n    }\n\n    // stack bars that only differ by rounding\n    sieve.binWidth = calcTraces[0][0].t.barwidth / 100;\n\n    // if defined, apply trace offset and width\n    applyAttributes(sieve);\n\n    // store the bar center in each calcdata item\n    setBarCenterAndWidth(pa, sieve);\n\n    // update position axes\n    updatePositionAxis(pa, sieve);\n}\n\nfunction setOffsetAndWidthInGroupMode(gd, pa, sieve, opts) {\n    var fullLayout = gd._fullLayout;\n    var positions = sieve.positions;\n    var distinctPositions = sieve.distinctPositions;\n    var minDiff = sieve.minDiff;\n    var calcTraces = sieve.traces;\n    var nTraces = calcTraces.length;\n\n    // if there aren't any overlapping positions,\n    // let them have full width even if mode is group\n    var overlap = (positions.length !== distinctPositions.length);\n    var barGroupWidth = minDiff * (1 - opts.gap);\n\n    var groupId = getAxisGroup(fullLayout, pa._id) + calcTraces[0][0].trace.orientation;\n    var alignmentGroups = fullLayout._alignmentOpts[groupId] || {};\n\n    for(var i = 0; i < nTraces; i++) {\n        var calcTrace = calcTraces[i];\n        var trace = calcTrace[0].trace;\n\n        var alignmentGroupOpts = alignmentGroups[trace.alignmentgroup] || {};\n        var nOffsetGroups = Object.keys(alignmentGroupOpts.offsetGroups || {}).length;\n\n        var barWidthPlusGap;\n        if(nOffsetGroups) {\n            barWidthPlusGap = barGroupWidth / nOffsetGroups;\n        } else {\n            barWidthPlusGap = overlap ? barGroupWidth / nTraces : barGroupWidth;\n        }\n\n        var barWidth = barWidthPlusGap * (1 - (opts.groupgap || 0));\n\n        var offsetFromCenter;\n        if(nOffsetGroups) {\n            offsetFromCenter = ((2 * trace._offsetIndex + 1 - nOffsetGroups) * barWidthPlusGap - barWidth) / 2;\n        } else {\n            offsetFromCenter = overlap ?\n                ((2 * i + 1 - nTraces) * barWidthPlusGap - barWidth) / 2 :\n                -barWidth / 2;\n        }\n\n        var t = calcTrace[0].t;\n        t.barwidth = barWidth;\n        t.poffset = offsetFromCenter;\n        t.bargroupwidth = barGroupWidth;\n        t.bardelta = minDiff;\n    }\n\n    // stack bars that only differ by rounding\n    sieve.binWidth = calcTraces[0][0].t.barwidth / 100;\n\n    // if defined, apply trace width\n    applyAttributes(sieve);\n\n    // store the bar center in each calcdata item\n    setBarCenterAndWidth(pa, sieve);\n\n    // update position axes\n    updatePositionAxis(pa, sieve, overlap);\n}\n\nfunction applyAttributes(sieve) {\n    var calcTraces = sieve.traces;\n    var i, j;\n\n    for(i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var calcTrace0 = calcTrace[0];\n        var fullTrace = calcTrace0.trace;\n        var t = calcTrace0.t;\n        var offset = fullTrace._offset || fullTrace.offset;\n        var initialPoffset = t.poffset;\n        var newPoffset;\n\n        if(isArrayOrTypedArray(offset)) {\n            // if offset is an array, then clone it into t.poffset.\n            newPoffset = Array.prototype.slice.call(offset, 0, calcTrace.length);\n\n            // guard against non-numeric items\n            for(j = 0; j < newPoffset.length; j++) {\n                if(!isNumeric(newPoffset[j])) {\n                    newPoffset[j] = initialPoffset;\n                }\n            }\n\n            // if the length of the array is too short,\n            // then extend it with the initial value of t.poffset\n            for(j = newPoffset.length; j < calcTrace.length; j++) {\n                newPoffset.push(initialPoffset);\n            }\n\n            t.poffset = newPoffset;\n        } else if(offset !== undefined) {\n            t.poffset = offset;\n        }\n\n        var width = fullTrace._width || fullTrace.width;\n        var initialBarwidth = t.barwidth;\n\n        if(isArrayOrTypedArray(width)) {\n            // if width is an array, then clone it into t.barwidth.\n            var newBarwidth = Array.prototype.slice.call(width, 0, calcTrace.length);\n\n            // guard against non-numeric items\n            for(j = 0; j < newBarwidth.length; j++) {\n                if(!isNumeric(newBarwidth[j])) newBarwidth[j] = initialBarwidth;\n            }\n\n            // if the length of the array is too short,\n            // then extend it with the initial value of t.barwidth\n            for(j = newBarwidth.length; j < calcTrace.length; j++) {\n                newBarwidth.push(initialBarwidth);\n            }\n\n            t.barwidth = newBarwidth;\n\n            // if user didn't set offset,\n            // then correct t.poffset to ensure bars remain centered\n            if(offset === undefined) {\n                newPoffset = [];\n                for(j = 0; j < calcTrace.length; j++) {\n                    newPoffset.push(\n                        initialPoffset + (initialBarwidth - newBarwidth[j]) / 2\n                    );\n                }\n                t.poffset = newPoffset;\n            }\n        } else if(width !== undefined) {\n            t.barwidth = width;\n\n            // if user didn't set offset,\n            // then correct t.poffset to ensure bars remain centered\n            if(offset === undefined) {\n                t.poffset = initialPoffset + (initialBarwidth - width) / 2;\n            }\n        }\n    }\n}\n\nfunction setBarCenterAndWidth(pa, sieve) {\n    var calcTraces = sieve.traces;\n    var pLetter = getAxisLetter(pa);\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var t = calcTrace[0].t;\n        var poffset = t.poffset;\n        var poffsetIsArray = Array.isArray(poffset);\n        var barwidth = t.barwidth;\n        var barwidthIsArray = Array.isArray(barwidth);\n\n        for(var j = 0; j < calcTrace.length; j++) {\n            var calcBar = calcTrace[j];\n\n            // store the actual bar width and position, for use by hover\n            var width = calcBar.w = barwidthIsArray ? barwidth[j] : barwidth;\n            calcBar[pLetter] = calcBar.p + (poffsetIsArray ? poffset[j] : poffset) + width / 2;\n        }\n    }\n}\n\nfunction updatePositionAxis(pa, sieve, allowMinDtick) {\n    var calcTraces = sieve.traces;\n    var minDiff = sieve.minDiff;\n    var vpad = minDiff / 2;\n\n    Axes.minDtick(pa, sieve.minDiff, sieve.distinctPositions[0], allowMinDtick);\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var calcTrace0 = calcTrace[0];\n        var fullTrace = calcTrace0.trace;\n        var pts = [];\n        var bar, l, r, j;\n\n        for(j = 0; j < calcTrace.length; j++) {\n            bar = calcTrace[j];\n            l = bar.p - vpad;\n            r = bar.p + vpad;\n            pts.push(l, r);\n        }\n\n        if(fullTrace.width || fullTrace.offset) {\n            var t = calcTrace0.t;\n            var poffset = t.poffset;\n            var barwidth = t.barwidth;\n            var poffsetIsArray = Array.isArray(poffset);\n            var barwidthIsArray = Array.isArray(barwidth);\n\n            for(j = 0; j < calcTrace.length; j++) {\n                bar = calcTrace[j];\n                var calcBarOffset = poffsetIsArray ? poffset[j] : poffset;\n                var calcBarWidth = barwidthIsArray ? barwidth[j] : barwidth;\n                l = bar.p + calcBarOffset;\n                r = l + calcBarWidth;\n                pts.push(l, r);\n            }\n        }\n\n        fullTrace._extremes[pa._id] = Axes.findExtremes(pa, pts, {padded: false});\n    }\n}\n\n// store these bar bases and tops in calcdata\n// and make sure the size axis includes zero,\n// along with the bases and tops of each bar.\nfunction setBaseAndTop(sa, sieve) {\n    var calcTraces = sieve.traces;\n    var sLetter = getAxisLetter(sa);\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var fullTrace = calcTrace[0].trace;\n        var pts = [];\n        var allBaseAboveZero = true;\n\n        for(var j = 0; j < calcTrace.length; j++) {\n            var bar = calcTrace[j];\n            var base = bar.b;\n            var top = base + bar.s;\n\n            bar[sLetter] = top;\n            pts.push(top);\n            if(bar.hasB) pts.push(base);\n\n            if(!bar.hasB || !(bar.b > 0 && bar.s > 0)) {\n                allBaseAboveZero = false;\n            }\n        }\n\n        fullTrace._extremes[sa._id] = Axes.findExtremes(sa, pts, {\n            tozero: !allBaseAboveZero,\n            padded: true\n        });\n    }\n}\n\nfunction stackBars(sa, sieve, opts) {\n    var sLetter = getAxisLetter(sa);\n    var calcTraces = sieve.traces;\n    var calcTrace;\n    var fullTrace;\n    var isFunnel;\n    var i, j;\n    var bar;\n\n    for(i = 0; i < calcTraces.length; i++) {\n        calcTrace = calcTraces[i];\n        fullTrace = calcTrace[0].trace;\n\n        if(fullTrace.type === 'funnel') {\n            for(j = 0; j < calcTrace.length; j++) {\n                bar = calcTrace[j];\n\n                if(bar.s !== BADNUM) {\n                    // create base of funnels\n                    sieve.put(bar.p, -0.5 * bar.s);\n                }\n            }\n        }\n    }\n\n    for(i = 0; i < calcTraces.length; i++) {\n        calcTrace = calcTraces[i];\n        fullTrace = calcTrace[0].trace;\n\n        isFunnel = (fullTrace.type === 'funnel');\n\n        var pts = [];\n\n        for(j = 0; j < calcTrace.length; j++) {\n            bar = calcTrace[j];\n\n            if(bar.s !== BADNUM) {\n                // stack current bar and get previous sum\n                var value;\n                if(isFunnel) {\n                    value = bar.s;\n                } else {\n                    value = bar.s + bar.b;\n                }\n\n                var base = sieve.put(bar.p, value);\n\n                var top = base + value;\n\n                // store the bar base and top in each calcdata item\n                bar.b = base;\n                bar[sLetter] = top;\n\n                if(!opts.norm) {\n                    pts.push(top);\n                    if(bar.hasB) {\n                        pts.push(base);\n                    }\n                }\n            }\n        }\n\n        // if barnorm is set, let normalizeBars update the axis range\n        if(!opts.norm) {\n            fullTrace._extremes[sa._id] = Axes.findExtremes(sa, pts, {\n                // N.B. we don't stack base with 'base',\n                // so set tozero:true always!\n                tozero: true,\n                padded: true\n            });\n        }\n    }\n}\n\nfunction sieveBars(sieve) {\n    var calcTraces = sieve.traces;\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n\n        for(var j = 0; j < calcTrace.length; j++) {\n            var bar = calcTrace[j];\n\n            if(bar.s !== BADNUM) {\n                sieve.put(bar.p, bar.b + bar.s);\n            }\n        }\n    }\n}\n\nfunction unhideBarsWithinTrace(sieve) {\n    var calcTraces = sieve.traces;\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var fullTrace = calcTrace[0].trace;\n\n        if(fullTrace.base === undefined) {\n            var inTraceSieve = new Sieve([calcTrace], {\n                sepNegVal: true,\n                overlapNoMerge: true\n            });\n\n            for(var j = 0; j < calcTrace.length; j++) {\n                var bar = calcTrace[j];\n\n                if(bar.p !== BADNUM) {\n                    // stack current bar and get previous sum\n                    var base = inTraceSieve.put(bar.p, bar.b + bar.s);\n\n                    // if previous sum if non-zero, this means:\n                    // multiple bars have same starting point are potentially hidden,\n                    // shift them vertically so that all bars are visible by default\n                    if(base) bar.b = base;\n                }\n            }\n        }\n    }\n}\n\n// Note:\n//\n// normalizeBars requires that either sieveBars or stackBars has been\n// previously invoked.\nfunction normalizeBars(sa, sieve, opts) {\n    var calcTraces = sieve.traces;\n    var sLetter = getAxisLetter(sa);\n    var sTop = opts.norm === 'fraction' ? 1 : 100;\n    var sTiny = sTop / 1e9; // in case of rounding error in sum\n    var sMin = sa.l2c(sa.c2l(0));\n    var sMax = opts.mode === 'stack' ? sTop : sMin;\n\n    function needsPadding(v) {\n        return (\n            isNumeric(sa.c2l(v)) &&\n            ((v < sMin - sTiny) || (v > sMax + sTiny) || !isNumeric(sMin))\n        );\n    }\n\n    for(var i = 0; i < calcTraces.length; i++) {\n        var calcTrace = calcTraces[i];\n        var fullTrace = calcTrace[0].trace;\n        var pts = [];\n        var allBaseAboveZero = true;\n        var padded = false;\n\n        for(var j = 0; j < calcTrace.length; j++) {\n            var bar = calcTrace[j];\n\n            if(bar.s !== BADNUM) {\n                var scale = Math.abs(sTop / sieve.get(bar.p, bar.s));\n                bar.b *= scale;\n                bar.s *= scale;\n\n                var base = bar.b;\n                var top = base + bar.s;\n\n                bar[sLetter] = top;\n                pts.push(top);\n                padded = padded || needsPadding(top);\n\n                if(bar.hasB) {\n                    pts.push(base);\n                    padded = padded || needsPadding(base);\n                }\n\n                if(!bar.hasB || !(bar.b > 0 && bar.s > 0)) {\n                    allBaseAboveZero = false;\n                }\n            }\n        }\n\n        fullTrace._extremes[sa._id] = Axes.findExtremes(sa, pts, {\n            tozero: !allBaseAboveZero,\n            padded: padded\n        });\n    }\n}\n\n// find the full position span of bars at each position\n// for use by hover, to ensure labels move in if bars are\n// narrower than the space they're in.\n// run once per trace group (subplot & direction) and\n// the same mapping is attached to all calcdata traces\nfunction collectExtents(calcTraces, pa) {\n    var pLetter = getAxisLetter(pa);\n    var extents = {};\n    var i, j, cd;\n\n    var pMin = Infinity;\n    var pMax = -Infinity;\n\n    for(i = 0; i < calcTraces.length; i++) {\n        cd = calcTraces[i];\n        for(j = 0; j < cd.length; j++) {\n            var p = cd[j].p;\n            if(isNumeric(p)) {\n                pMin = Math.min(pMin, p);\n                pMax = Math.max(pMax, p);\n            }\n        }\n    }\n\n    // this is just for positioning of hover labels, and nobody will care if\n    // the label is 1px too far out; so round positions to 1/10K in case\n    // position values don't exactly match from trace to trace\n    var roundFactor = 10000 / (pMax - pMin);\n    var round = extents.round = function(p) {\n        return String(Math.round(roundFactor * (p - pMin)));\n    };\n\n    for(i = 0; i < calcTraces.length; i++) {\n        cd = calcTraces[i];\n        cd[0].t.extents = extents;\n\n        var poffset = cd[0].t.poffset;\n        var poffsetIsArray = Array.isArray(poffset);\n\n        for(j = 0; j < cd.length; j++) {\n            var di = cd[j];\n            var p0 = di[pLetter] - di.w / 2;\n\n            if(isNumeric(p0)) {\n                var p1 = di[pLetter] + di.w / 2;\n                var pVal = round(di.p);\n                if(extents[pVal]) {\n                    extents[pVal] = [Math.min(p0, extents[pVal][0]), Math.max(p1, extents[pVal][1])];\n                } else {\n                    extents[pVal] = [p0, p1];\n                }\n            }\n\n            di.p0 = di.p + (poffsetIsArray ? poffset[j] : poffset);\n            di.p1 = di.p0 + di.w;\n            di.s0 = di.b;\n            di.s1 = di.s0 + di.s;\n        }\n    }\n}\n\nfunction getAxisLetter(ax) {\n    return ax._id.charAt(0);\n}\n\nmodule.exports = {\n    crossTraceCalc: crossTraceCalc,\n    setGroupPositions: setGroupPositions\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"./sieve.js\":853,\"fast-isnumeric\":224}],845:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar Registry = _dereq_('../../registry');\n\nvar handleXYDefaults = _dereq_('../scatter/xy_defaults');\nvar handleStyleDefaults = _dereq_('./style_defaults');\nvar getAxisGroup = _dereq_('../../plots/cartesian/axis_ids').getAxisGroup;\nvar attributes = _dereq_('./attributes');\n\nvar coerceFont = Lib.coerceFont;\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleXYDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('orientation', (traceOut.x && !traceOut.y) ? 'h' : 'v');\n    coerce('base');\n    coerce('offset');\n    coerce('width');\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var textposition = coerce('textposition');\n    handleText(traceIn, traceOut, layout, coerce, textposition, {\n        moduleHasSelected: true,\n        moduleHasUnselected: true,\n        moduleHasConstrain: true,\n        moduleHasCliponaxis: true,\n        moduleHasTextangle: true,\n        moduleHasInsideanchor: true\n    });\n\n    handleStyleDefaults(traceIn, traceOut, coerce, defaultColor, layout);\n\n    var lineColor = (traceOut.marker.line || {}).color;\n\n    // override defaultColor for error bars with defaultLine\n    var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'y'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'x', inherit: 'y'});\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n}\n\nfunction handleGroupingDefaults(traceIn, traceOut, fullLayout, coerce) {\n    var orientation = traceOut.orientation;\n    // N.B. grouping is done across all trace types that support it\n    var posAxId = traceOut[{v: 'x', h: 'y'}[orientation] + 'axis'];\n    var groupId = getAxisGroup(fullLayout, posAxId) + orientation;\n\n    var alignmentOpts = fullLayout._alignmentOpts || {};\n    var alignmentgroup = coerce('alignmentgroup');\n\n    var alignmentGroups = alignmentOpts[groupId];\n    if(!alignmentGroups) alignmentGroups = alignmentOpts[groupId] = {};\n\n    var alignmentGroupOpts = alignmentGroups[alignmentgroup];\n\n    if(alignmentGroupOpts) {\n        alignmentGroupOpts.traces.push(traceOut);\n    } else {\n        alignmentGroupOpts = alignmentGroups[alignmentgroup] = {\n            traces: [traceOut],\n            alignmentIndex: Object.keys(alignmentGroups).length,\n            offsetGroups: {}\n        };\n    }\n\n    var offsetgroup = coerce('offsetgroup');\n    var offsetGroups = alignmentGroupOpts.offsetGroups;\n    var offsetGroupOpts = offsetGroups[offsetgroup];\n\n    if(offsetgroup) {\n        if(!offsetGroupOpts) {\n            offsetGroupOpts = offsetGroups[offsetgroup] = {\n                offsetIndex: Object.keys(offsetGroups).length\n            };\n        }\n\n        traceOut._offsetIndex = offsetGroupOpts.offsetIndex;\n    }\n}\n\nfunction crossTraceDefaults(fullData, fullLayout) {\n    var traceIn, traceOut;\n\n    function coerce(attr) {\n        return Lib.coerce(traceOut._input, traceOut, attributes, attr);\n    }\n\n    if(fullLayout.barmode === 'group') {\n        for(var i = 0; i < fullData.length; i++) {\n            traceOut = fullData[i];\n\n            if(traceOut.type === 'bar') {\n                traceIn = traceOut._input;\n                handleGroupingDefaults(traceIn, traceOut, fullLayout, coerce);\n            }\n        }\n    }\n}\n\nfunction handleText(traceIn, traceOut, layout, coerce, textposition, opts) {\n    opts = opts || {};\n    var moduleHasSelected = !(opts.moduleHasSelected === false);\n    var moduleHasUnselected = !(opts.moduleHasUnselected === false);\n    var moduleHasConstrain = !(opts.moduleHasConstrain === false);\n    var moduleHasCliponaxis = !(opts.moduleHasCliponaxis === false);\n    var moduleHasTextangle = !(opts.moduleHasTextangle === false);\n    var moduleHasInsideanchor = !(opts.moduleHasInsideanchor === false);\n\n    var hasBoth = Array.isArray(textposition) || textposition === 'auto';\n    var hasInside = hasBoth || textposition === 'inside';\n    var hasOutside = hasBoth || textposition === 'outside';\n\n    if(hasInside || hasOutside) {\n        var dfltFont = coerceFont(coerce, 'textfont', layout.font);\n\n        // Note that coercing `insidetextfont` is always needed –\n        // even if `textposition` is `outside` for each trace – since\n        // an outside label can become an inside one, for example because\n        // of a bar being stacked on top of it.\n        var insideTextFontDefault = Lib.extendFlat({}, dfltFont);\n        var isTraceTextfontColorSet = traceIn.textfont && traceIn.textfont.color;\n        var isColorInheritedFromLayoutFont = !isTraceTextfontColorSet;\n        if(isColorInheritedFromLayoutFont) {\n            delete insideTextFontDefault.color;\n        }\n        coerceFont(coerce, 'insidetextfont', insideTextFontDefault);\n\n        if(hasOutside) coerceFont(coerce, 'outsidetextfont', dfltFont);\n\n\n        if(moduleHasSelected) coerce('selected.textfont.color');\n        if(moduleHasUnselected) coerce('unselected.textfont.color');\n        if(moduleHasConstrain) coerce('constraintext');\n        if(moduleHasCliponaxis) coerce('cliponaxis');\n        if(moduleHasTextangle) coerce('textangle');\n    }\n\n    if(hasInside) {\n        if(moduleHasInsideanchor) coerce('insidetextanchor');\n    }\n}\n\nmodule.exports = {\n    supplyDefaults: supplyDefaults,\n    crossTraceDefaults: crossTraceDefaults,\n    handleGroupingDefaults: handleGroupingDefaults,\n    handleText: handleText\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../scatter/xy_defaults\":1100,\"./attributes\":841,\"./style_defaults\":855}],846:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar tinycolor = _dereq_('tinycolor2');\n\nexports.coerceString = function(attributeDefinition, value, defaultValue) {\n    if(typeof value === 'string') {\n        if(value || !attributeDefinition.noBlank) return value;\n    } else if(typeof value === 'number' || value === true) {\n        if(!attributeDefinition.strict) return String(value);\n    }\n\n    return (defaultValue !== undefined) ?\n      defaultValue :\n      attributeDefinition.dflt;\n};\n\nexports.coerceNumber = function(attributeDefinition, value, defaultValue) {\n    if(isNumeric(value)) {\n        value = +value;\n\n        var min = attributeDefinition.min;\n        var max = attributeDefinition.max;\n        var isOutOfBounds = (min !== undefined && value < min) ||\n              (max !== undefined && value > max);\n\n        if(!isOutOfBounds) return value;\n    }\n\n    return (defaultValue !== undefined) ?\n      defaultValue :\n      attributeDefinition.dflt;\n};\n\nexports.coerceColor = function(attributeDefinition, value, defaultValue) {\n    if(tinycolor(value).isValid()) return value;\n\n    return (defaultValue !== undefined) ?\n      defaultValue :\n      attributeDefinition.dflt;\n};\n\nexports.coerceEnumerated = function(attributeDefinition, value, defaultValue) {\n    if(attributeDefinition.coerceNumber) value = +value;\n\n    if(attributeDefinition.values.indexOf(value) !== -1) return value;\n\n    return (defaultValue !== undefined) ?\n      defaultValue :\n      attributeDefinition.dflt;\n};\n\nexports.getValue = function(arrayOrScalar, index) {\n    var value;\n    if(!Array.isArray(arrayOrScalar)) value = arrayOrScalar;\n    else if(index < arrayOrScalar.length) value = arrayOrScalar[index];\n    return value;\n};\n\n},{\"fast-isnumeric\":224,\"tinycolor2\":524}],847:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Fx = _dereq_('../../components/fx');\nvar Registry = _dereq_('../../registry');\nvar Color = _dereq_('../../components/color');\n\nvar fillText = _dereq_('../../lib').fillText;\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var barPointData = hoverOnBars(pointData, xval, yval, hovermode);\n\n    if(barPointData) {\n        var cd = barPointData.cd;\n        var trace = cd[0].trace;\n        var di = cd[barPointData.index];\n\n        barPointData.color = getTraceColor(trace, di);\n        Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, barPointData);\n\n        return [barPointData];\n    }\n}\n\nfunction hoverOnBars(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var t = cd[0].t;\n    var isClosest = (hovermode === 'closest');\n    var isWaterfall = (trace.type === 'waterfall');\n    var maxHoverDistance = pointData.maxHoverDistance;\n    var maxSpikeDistance = pointData.maxSpikeDistance;\n\n    var posVal, sizeVal, posLetter, sizeLetter, dx, dy, pRangeCalc;\n\n    function thisBarMinPos(di) { return di[posLetter] - di.w / 2; }\n    function thisBarMaxPos(di) { return di[posLetter] + di.w / 2; }\n\n    var minPos = isClosest ?\n        thisBarMinPos :\n        function(di) {\n            /*\n             * In compare mode, accept a bar if you're on it *or* its group.\n             * Nearly always it's the group that matters, but in case the bar\n             * was explicitly set wider than its group we'd better accept the\n             * whole bar.\n             *\n             * use `bardelta` instead of `bargroupwidth` so we accept hover\n             * in the gap. That way hover doesn't flash on and off as you\n             * mouse over the plot in compare modes.\n             * In 'closest' mode though the flashing seems inevitable,\n             * without far more complex logic\n             */\n            return Math.min(thisBarMinPos(di), di.p - t.bardelta / 2);\n        };\n\n    var maxPos = isClosest ?\n        thisBarMaxPos :\n        function(di) {\n            return Math.max(thisBarMaxPos(di), di.p + t.bardelta / 2);\n        };\n\n    function _positionFn(_minPos, _maxPos) {\n        // add a little to the pseudo-distance for wider bars, so that like scatter,\n        // if you are over two overlapping bars, the narrower one wins.\n        return Fx.inbox(_minPos - posVal, _maxPos - posVal,\n            maxHoverDistance + Math.min(1, Math.abs(_maxPos - _minPos) / pRangeCalc) - 1);\n    }\n\n    function positionFn(di) {\n        return _positionFn(minPos(di), maxPos(di));\n    }\n\n    function thisBarPositionFn(di) {\n        return _positionFn(thisBarMinPos(di), thisBarMaxPos(di));\n    }\n\n    function sizeFn(di) {\n        var v = sizeVal;\n        var b = di.b;\n        var s = di[sizeLetter];\n\n        if(isWaterfall) {\n            s += Math.abs(di.rawS || 0);\n        }\n\n        // add a gradient so hovering near the end of a\n        // bar makes it a little closer match\n        return Fx.inbox(b - v, s - v, maxHoverDistance + (s - v) / (s - b) - 1);\n    }\n\n    if(trace.orientation === 'h') {\n        posVal = yval;\n        sizeVal = xval;\n        posLetter = 'y';\n        sizeLetter = 'x';\n        dx = sizeFn;\n        dy = positionFn;\n    } else {\n        posVal = xval;\n        sizeVal = yval;\n        posLetter = 'x';\n        sizeLetter = 'y';\n        dy = sizeFn;\n        dx = positionFn;\n    }\n\n    var pa = pointData[posLetter + 'a'];\n    var sa = pointData[sizeLetter + 'a'];\n\n    pRangeCalc = Math.abs(pa.r2c(pa.range[1]) - pa.r2c(pa.range[0]));\n\n    function dxy(di) { return (dx(di) + dy(di)) / 2; }\n    var distfn = Fx.getDistanceFunction(hovermode, dx, dy, dxy);\n    Fx.getClosest(cd, distfn, pointData);\n\n    // skip the rest (for this trace) if we didn't find a close point\n    if(pointData.index === false) return;\n\n    // if we get here and we're not in 'closest' mode, push min/max pos back\n    // onto the group - even though that means occasionally the mouse will be\n    // over the hover label.\n    if(!isClosest) {\n        minPos = function(di) {\n            return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2);\n        };\n        maxPos = function(di) {\n            return Math.max(thisBarMaxPos(di), di.p + t.bargroupwidth / 2);\n        };\n    }\n\n    // the closest data point\n    var index = pointData.index;\n    var di = cd[index];\n\n    var size = (trace.base) ? di.b + di.s : di.s;\n    pointData[sizeLetter + '0'] = pointData[sizeLetter + '1'] = sa.c2p(di[sizeLetter], true);\n    pointData[sizeLetter + 'LabelVal'] = size;\n\n    var extent = t.extents[t.extents.round(di.p)];\n    pointData[posLetter + '0'] = pa.c2p(isClosest ? minPos(di) : extent[0], true);\n    pointData[posLetter + '1'] = pa.c2p(isClosest ? maxPos(di) : extent[1], true);\n    pointData[posLetter + 'LabelVal'] = di.p;\n\n    // spikelines always want \"closest\" distance regardless of hovermode\n    pointData.spikeDistance = (sizeFn(di) + thisBarPositionFn(di)) / 2 + maxSpikeDistance - maxHoverDistance;\n    // they also want to point to the data value, regardless of where the label goes\n    // in case of bars shifted within groups\n    pointData[posLetter + 'Spike'] = pa.c2p(di.p, true);\n\n    fillText(di, trace, pointData);\n    pointData.hovertemplate = trace.hovertemplate;\n\n    return pointData;\n}\n\nfunction getTraceColor(trace, di) {\n    var mc = di.mcc || trace.marker.color;\n    var mlc = di.mlcc || trace.marker.line.color;\n    var mlw = di.mlw || trace.marker.line.width;\n\n    if(Color.opacity(mc)) return mc;\n    else if(Color.opacity(mlc) && mlw) return mlc;\n}\n\nmodule.exports = {\n    hoverPoints: hoverPoints,\n    hoverOnBars: hoverOnBars,\n    getTraceColor: getTraceColor\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../lib\":703,\"../../registry\":831}],848:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    crossTraceDefaults: _dereq_('./defaults').crossTraceDefaults,\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    calc: _dereq_('./calc'),\n    crossTraceCalc: _dereq_('./cross_trace_calc').crossTraceCalc,\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    arraysToCalcdata: _dereq_('./arrays_to_calcdata'),\n    plot: _dereq_('./plot').plot,\n    style: _dereq_('./style').style,\n    styleOnSelect: _dereq_('./style').styleOnSelect,\n    hoverPoints: _dereq_('./hover').hoverPoints,\n    selectPoints: _dereq_('./select'),\n\n    moduleType: 'trace',\n    name: 'bar',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['bar-like', 'cartesian', 'svg', 'bar', 'oriented', 'errorBarsOK', 'showLegend', 'zoomScale'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../scatter/marker_colorbar\":1092,\"./arrays_to_calcdata\":840,\"./attributes\":841,\"./calc\":842,\"./cross_trace_calc\":844,\"./defaults\":845,\"./hover\":847,\"./layout_attributes\":849,\"./layout_defaults\":850,\"./plot\":851,\"./select\":852,\"./style\":854}],849:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    barmode: {\n        valType: 'enumerated',\n        values: ['stack', 'group', 'overlay', 'relative'],\n        dflt: 'group',\n        \n        editType: 'calc',\n        \n    },\n    barnorm: {\n        valType: 'enumerated',\n        values: ['', 'fraction', 'percent'],\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    bargap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'calc',\n        \n    },\n    bargroupgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],850:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function(layoutIn, layoutOut, fullData) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    var hasBars = false;\n    var shouldBeGapless = false;\n    var gappedAnyway = false;\n    var usedSubplots = {};\n\n    var mode = coerce('barmode');\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n        if(Registry.traceIs(trace, 'bar') && trace.visible) hasBars = true;\n        else continue;\n\n        // if we have at least 2 grouped bar traces on the same subplot,\n        // we should default to a gap anyway, even if the data is histograms\n        if(mode === 'group') {\n            var subploti = trace.xaxis + trace.yaxis;\n            if(usedSubplots[subploti]) gappedAnyway = true;\n            usedSubplots[subploti] = true;\n        }\n\n        if(trace.visible && trace.type === 'histogram') {\n            var pa = Axes.getFromId({_fullLayout: layoutOut},\n                        trace[trace.orientation === 'v' ? 'xaxis' : 'yaxis']);\n            if(pa.type !== 'category') shouldBeGapless = true;\n        }\n    }\n\n    if(!hasBars) {\n        delete layoutOut.barmode;\n        return;\n    }\n\n    if(mode !== 'overlay') coerce('barnorm');\n\n    coerce('bargap', (shouldBeGapless && !gappedAnyway) ? 0 : 0.2);\n    coerce('bargroupgap');\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"./layout_attributes\":849}],851:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\n\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Registry = _dereq_('../../registry');\nvar tickText = _dereq_('../../plots/cartesian/axes').tickText;\n\nvar style = _dereq_('./style');\nvar helpers = _dereq_('./helpers');\nvar attributes = _dereq_('./attributes');\n\nvar attributeText = attributes.text;\nvar attributeTextPosition = attributes.textposition;\n\n// padding in pixels around text\nvar TEXTPAD = 3;\n\nfunction dirSign(a, b) {\n    return (a < b) ? 1 : -1;\n}\n\nfunction getXY(di, xa, ya, isHorizontal) {\n    var s = [];\n    var p = [];\n\n    var sAxis = isHorizontal ? xa : ya;\n    var pAxis = isHorizontal ? ya : xa;\n\n    s[0] = sAxis.c2p(di.s0, true);\n    p[0] = pAxis.c2p(di.p0, true);\n\n    s[1] = sAxis.c2p(di.s1, true);\n    p[1] = pAxis.c2p(di.p1, true);\n\n    return isHorizontal ? [s, p] : [p, s];\n}\n\nfunction plot(gd, plotinfo, cdModule, traceLayer, opts) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var fullLayout = gd._fullLayout;\n\n    if(!opts) {\n        opts = {\n            mode: fullLayout.barmode,\n            norm: fullLayout.barmode,\n            gap: fullLayout.bargap,\n            groupgap: fullLayout.bargroupgap\n        };\n    }\n\n    var bartraces = Lib.makeTraceGroups(traceLayer, cdModule, 'trace bars').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var trace = cd[0].trace;\n        var isWaterfall = (trace.type === 'waterfall');\n        var isFunnel = (trace.type === 'funnel');\n        var isBar = (trace.type === 'bar');\n        var shouldDisplayZeros = isBar || isFunnel;\n\n        var adjustPixel = 0;\n        if(isWaterfall && trace.connector.visible && trace.connector.mode === 'between') {\n            adjustPixel = trace.connector.line.width / 2;\n        }\n\n        var isHorizontal = (trace.orientation === 'h');\n\n        if(!plotinfo.isRangePlot) cd[0].node3 = plotGroup;\n\n        var pointGroup = Lib.ensureSingle(plotGroup, 'g', 'points');\n\n        var bars = pointGroup.selectAll('g.point').data(Lib.identity);\n\n        bars.enter().append('g')\n            .classed('point', true);\n\n        bars.exit().remove();\n\n        bars.each(function(di, i) {\n            var bar = d3.select(this);\n\n            // now display the bar\n            // clipped xf/yf (2nd arg true): non-positive\n            // log values go off-screen by plotwidth\n            // so you see them continue if you drag the plot\n\n            var xy = getXY(di, xa, ya, isHorizontal);\n\n            var x0 = xy[0][0];\n            var x1 = xy[0][1];\n            var y0 = xy[1][0];\n            var y1 = xy[1][1];\n\n            var isBlank = di.isBlank = !(\n                isNumeric(x0) && isNumeric(x1) &&\n                isNumeric(y0) && isNumeric(y1) &&\n                (x0 !== x1 || (shouldDisplayZeros && isHorizontal)) &&\n                (y0 !== y1 || (shouldDisplayZeros && !isHorizontal))\n            );\n\n            // in waterfall mode `between` we need to adjust bar end points to match the connector width\n            if(adjustPixel) {\n                if(isHorizontal) {\n                    x0 -= dirSign(x0, x1) * adjustPixel;\n                    x1 += dirSign(x0, x1) * adjustPixel;\n                } else {\n                    y0 -= dirSign(y0, y1) * adjustPixel;\n                    y1 += dirSign(y0, y1) * adjustPixel;\n                }\n            }\n\n            var lw;\n            var mc;\n\n            if(trace.type === 'waterfall') {\n                if(!isBlank) {\n                    var cont = trace[di.dir].marker;\n                    lw = cont.line.width;\n                    mc = cont.color;\n                }\n            } else {\n                lw = (di.mlw + 1 || trace.marker.line.width + 1 ||\n                    (di.trace ? di.trace.marker.line.width : 0) + 1) - 1;\n                mc = di.mc || trace.marker.color;\n            }\n\n            var offset = d3.round((lw / 2) % 1, 2);\n\n            function roundWithLine(v) {\n                // if there are explicit gaps, don't round,\n                // it can make the gaps look crappy\n                return (opts.gap === 0 && opts.groupgap === 0) ?\n                    d3.round(Math.round(v) - offset, 2) : v;\n            }\n\n            function expandToVisible(v, vc) {\n                // if it's not in danger of disappearing entirely,\n                // round more precisely\n                return Math.abs(v - vc) >= 2 ? roundWithLine(v) :\n                // but if it's very thin, expand it so it's\n                // necessarily visible, even if it might overlap\n                // its neighbor\n                (v > vc ? Math.ceil(v) : Math.floor(v));\n            }\n\n            if(!gd._context.staticPlot) {\n                // if bars are not fully opaque or they have a line\n                // around them, round to integer pixels, mainly for\n                // safari so we prevent overlaps from its expansive\n                // pixelation. if the bars ARE fully opaque and have\n                // no line, expand to a full pixel to make sure we\n                // can see them\n\n                var op = Color.opacity(mc);\n                var fixpx = (op < 1 || lw > 0.01) ? roundWithLine : expandToVisible;\n                x0 = fixpx(x0, x1);\n                x1 = fixpx(x1, x0);\n                y0 = fixpx(y0, y1);\n                y1 = fixpx(y1, y0);\n            }\n\n            Lib.ensureSingle(bar, 'path')\n                .style('vector-effect', 'non-scaling-stroke')\n                .attr('d', isBlank ? 'M0,0Z' : 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z')\n                .call(Drawing.setClipUrl, plotinfo.layerClipId, gd);\n\n            appendBarText(gd, plotinfo, bar, cd, i, x0, x1, y0, y1, opts);\n\n            if(plotinfo.layerClipId) {\n                Drawing.hideOutsideRangePoint(di, bar.select('text'), xa, ya, trace.xcalendar, trace.ycalendar);\n            }\n        });\n\n        // lastly, clip points groups of `cliponaxis !== false` traces\n        // on `plotinfo._hasClipOnAxisFalse === true` subplots\n        var hasClipOnAxisFalse = trace.cliponaxis === false;\n        Drawing.setClipUrl(plotGroup, hasClipOnAxisFalse ? null : plotinfo.layerClipId, gd);\n    });\n\n    // error bars are on the top\n    Registry.getComponentMethod('errorbars', 'plot')(gd, bartraces, plotinfo);\n}\n\nfunction appendBarText(gd, plotinfo, bar, calcTrace, i, x0, x1, y0, y1, opts) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    var fullLayout = gd._fullLayout;\n    var textPosition;\n\n    function appendTextNode(bar, text, textFont) {\n        var textSelection = Lib.ensureSingle(bar, 'text')\n            .text(text)\n            .attr({\n                'class': 'bartext bartext-' + textPosition,\n                transform: '',\n                'text-anchor': 'middle',\n                // prohibit tex interpretation until we can handle\n                // tex and regular text together\n                'data-notex': 1\n            })\n            .call(Drawing.font, textFont)\n            .call(svgTextUtils.convertToTspans, gd);\n\n        return textSelection;\n    }\n\n    // get trace attributes\n    var trace = calcTrace[0].trace;\n    var isHorizontal = (trace.orientation === 'h');\n\n    var text = getText(calcTrace, i, xa, ya);\n    textPosition = getTextPosition(trace, i);\n\n    // compute text position\n    var inStackOrRelativeMode =\n        opts.mode === 'stack' ||\n        opts.mode === 'relative';\n\n    var calcBar = calcTrace[i];\n    var isOutmostBar = !inStackOrRelativeMode || calcBar._outmost;\n\n    if(!text ||\n        textPosition === 'none' ||\n        ((calcBar.isBlank || x0 === x1 || y0 === y1) && (\n            textPosition === 'auto' ||\n            textPosition === 'inside'))) {\n        bar.select('text').remove();\n        return;\n    }\n\n    var layoutFont = fullLayout.font;\n    var barColor = style.getBarColor(calcTrace[i], trace);\n    var insideTextFont = style.getInsideTextFont(trace, i, layoutFont, barColor);\n    var outsideTextFont = style.getOutsideTextFont(trace, i, layoutFont);\n\n    // Special case: don't use the c2p(v, true) value on log size axes,\n    // so that we can get correctly inside text scaling\n    var di = bar.datum();\n    if(isHorizontal) {\n        if(xa.type === 'log' && di.s0 <= 0) {\n            if(xa.range[0] < xa.range[1]) {\n                x0 = 0;\n            } else {\n                x0 = xa._length;\n            }\n        }\n    } else {\n        if(ya.type === 'log' && di.s0 <= 0) {\n            if(ya.range[0] < ya.range[1]) {\n                y0 = ya._length;\n            } else {\n                y0 = 0;\n            }\n        }\n    }\n\n    // padding excluded\n    var barWidth = Math.abs(x1 - x0) - 2 * TEXTPAD;\n    var barHeight = Math.abs(y1 - y0) - 2 * TEXTPAD;\n\n    var textSelection;\n    var textBB;\n    var textWidth;\n    var textHeight;\n\n    if(textPosition === 'outside') {\n        if(!isOutmostBar && !calcBar.hasB) textPosition = 'inside';\n    }\n\n    if(textPosition === 'auto') {\n        if(isOutmostBar) {\n            // draw text using insideTextFont and check if it fits inside bar\n            textPosition = 'inside';\n            textSelection = appendTextNode(bar, text, insideTextFont);\n\n            textBB = Drawing.bBox(textSelection.node()),\n            textWidth = textBB.width,\n            textHeight = textBB.height;\n\n            var textHasSize = (textWidth > 0 && textHeight > 0);\n            var fitsInside = (textWidth <= barWidth && textHeight <= barHeight);\n            var fitsInsideIfRotated = (textWidth <= barHeight && textHeight <= barWidth);\n            var fitsInsideIfShrunk = (isHorizontal) ?\n                (barWidth >= textWidth * (barHeight / textHeight)) :\n                (barHeight >= textHeight * (barWidth / textWidth));\n\n            if(textHasSize && (\n                fitsInside ||\n                fitsInsideIfRotated ||\n                fitsInsideIfShrunk)\n            ) {\n                textPosition = 'inside';\n            } else {\n                textPosition = 'outside';\n                textSelection.remove();\n                textSelection = null;\n            }\n        } else {\n            textPosition = 'inside';\n        }\n    }\n\n    if(!textSelection) {\n        textSelection = appendTextNode(bar, text,\n                (textPosition === 'outside') ?\n                outsideTextFont : insideTextFont);\n\n        textBB = Drawing.bBox(textSelection.node()),\n        textWidth = textBB.width,\n        textHeight = textBB.height;\n\n        if(textWidth <= 0 || textHeight <= 0) {\n            textSelection.remove();\n            return;\n        }\n    }\n\n    // compute text transform\n    var transform, constrained;\n    if(textPosition === 'outside') {\n        constrained =\n            trace.constraintext === 'both' ||\n            trace.constraintext === 'outside';\n\n        transform = getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, {\n            isHorizontal: isHorizontal,\n            constrained: constrained,\n            angle: trace.textangle\n        });\n    } else {\n        constrained =\n            trace.constraintext === 'both' ||\n            trace.constraintext === 'inside';\n\n        transform = getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, {\n            isHorizontal: isHorizontal,\n            constrained: constrained,\n            angle: trace.textangle,\n            anchor: trace.insidetextanchor\n        });\n    }\n\n    textSelection.attr('transform', transform);\n}\n\nfunction getRotationFromAngle(angle) {\n    return (angle === 'auto') ? 0 : angle;\n}\n\nfunction getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, opts) {\n    var isHorizontal = !!opts.isHorizontal;\n    var constrained = !!opts.constrained;\n    var angle = opts.angle || 0;\n    var anchor = opts.anchor || 0;\n\n    var textWidth = textBB.width;\n    var textHeight = textBB.height;\n    var lx = Math.abs(x1 - x0);\n    var ly = Math.abs(y1 - y0);\n\n    var textpad = (\n        lx > (2 * TEXTPAD) &&\n        ly > (2 * TEXTPAD)\n    ) ? TEXTPAD : 0;\n\n    lx -= 2 * textpad;\n    ly -= 2 * textpad;\n\n    var autoRotate = (angle === 'auto');\n    var isAutoRotated = false;\n    if(autoRotate &&\n        !(textWidth <= lx && textHeight <= ly) &&\n        (textWidth > lx || textHeight > ly) && (\n        !(textWidth > ly || textHeight > lx) ||\n        ((textWidth < textHeight) !== (lx < ly))\n    )) {\n        isAutoRotated = true;\n    }\n\n    if(isAutoRotated) {\n        // don't rotate yet only swap bar width with height\n        var tmp = ly;\n        ly = lx;\n        lx = tmp;\n    }\n\n    var rotation = getRotationFromAngle(angle);\n    var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));\n    var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));\n\n    // compute and apply text padding\n    var dx = Math.max(lx * absCos, ly * absSin);\n    var dy = Math.max(lx * absSin, ly * absCos);\n\n    var scale = (constrained) ?\n        Math.min(dx / textWidth, dy / textHeight) :\n        Math.max(absCos, absSin);\n\n    scale = Math.min(1, scale);\n\n    // compute text and target positions\n    var targetX = (x0 + x1) / 2;\n    var targetY = (y0 + y1) / 2;\n\n    if(anchor !== 'middle') { // case of 'start' or 'end'\n        var targetWidth = scale * (isHorizontal !== isAutoRotated ? textHeight : textWidth);\n        var targetHeight = scale * (isHorizontal !== isAutoRotated ? textWidth : textHeight);\n        textpad += 0.5 * (targetWidth * absSin + targetHeight * absCos);\n\n        if(isHorizontal) {\n            textpad *= dirSign(x0, x1);\n            targetX = (anchor === 'start') ? x0 + textpad : x1 - textpad;\n        } else {\n            textpad *= dirSign(y0, y1);\n            targetY = (anchor === 'start') ? y0 + textpad : y1 - textpad;\n        }\n    }\n\n    var textX = (textBB.left + textBB.right) / 2;\n    var textY = (textBB.top + textBB.bottom) / 2;\n\n    // lastly apply auto rotation\n    if(isAutoRotated) rotation += 90;\n\n    return getTransform(textX, textY, targetX, targetY, scale, rotation);\n}\n\nfunction getTransformToMoveOutsideBar(x0, x1, y0, y1, textBB, opts) {\n    var isHorizontal = !!opts.isHorizontal;\n    var constrained = !!opts.constrained;\n    var angle = opts.angle || 0;\n\n    var textWidth = textBB.width;\n    var textHeight = textBB.height;\n    var lx = Math.abs(x1 - x0);\n    var ly = Math.abs(y1 - y0);\n\n    var textpad;\n    // Keep the padding so the text doesn't sit right against\n    // the bars, but don't factor it into barWidth\n    if(isHorizontal) {\n        textpad = (ly > 2 * TEXTPAD) ? TEXTPAD : 0;\n    } else {\n        textpad = (lx > 2 * TEXTPAD) ? TEXTPAD : 0;\n    }\n\n    // compute rotation and scale\n    var scale = 1;\n    if(constrained) {\n        scale = (isHorizontal) ?\n            Math.min(1, ly / textHeight) :\n            Math.min(1, lx / textWidth);\n    }\n\n    var rotation = getRotationFromAngle(angle);\n    var absSin = Math.abs(Math.sin(Math.PI / 180 * rotation));\n    var absCos = Math.abs(Math.cos(Math.PI / 180 * rotation));\n\n    // compute text and target positions\n    var targetWidth = scale * (isHorizontal ? textHeight : textWidth);\n    var targetHeight = scale * (isHorizontal ? textWidth : textHeight);\n    textpad += 0.5 * (targetWidth * absSin + targetHeight * absCos);\n\n    var targetX = (x0 + x1) / 2;\n    var targetY = (y0 + y1) / 2;\n\n    if(isHorizontal) {\n        targetX = x1 - textpad * dirSign(x1, x0);\n    } else {\n        targetY = y1 + textpad * dirSign(y0, y1);\n    }\n\n    var textX = (textBB.left + textBB.right) / 2;\n    var textY = (textBB.top + textBB.bottom) / 2;\n\n    return getTransform(textX, textY, targetX, targetY, scale, rotation);\n}\n\nfunction getTransform(textX, textY, targetX, targetY, scale, rotation) {\n    var transformScale;\n    var transformRotate;\n    var transformTranslate;\n\n    if(scale < 1) transformScale = 'scale(' + scale + ') ';\n    else {\n        scale = 1;\n        transformScale = '';\n    }\n\n    transformRotate = (rotation) ?\n        'rotate(' + rotation + ' ' + textX + ' ' + textY + ') ' : '';\n\n    // Note that scaling also affects the center of the text box\n    var translateX = (targetX - scale * textX);\n    var translateY = (targetY - scale * textY);\n    transformTranslate = 'translate(' + translateX + ' ' + translateY + ')';\n\n    return transformTranslate + transformScale + transformRotate;\n}\n\nfunction getText(calcTrace, index, xa, ya) {\n    var trace = calcTrace[0].trace;\n\n    var value;\n    if(!trace.textinfo) {\n        value = helpers.getValue(trace.text, index);\n    } else {\n        value = calcTextinfo(calcTrace, index, xa, ya);\n    }\n\n    return helpers.coerceString(attributeText, value);\n}\n\nfunction getTextPosition(trace, index) {\n    var value = helpers.getValue(trace.textposition, index);\n    return helpers.coerceEnumerated(attributeTextPosition, value);\n}\n\nfunction calcTextinfo(calcTrace, index, xa, ya) {\n    var trace = calcTrace[0].trace;\n    var isHorizontal = (trace.orientation === 'h');\n    var isWaterfall = (trace.type === 'waterfall');\n    var isFunnel = (trace.type === 'funnel');\n\n    function formatLabel(u) {\n        var pAxis = isHorizontal ? ya : xa;\n        return tickText(pAxis, u, true).text;\n    }\n\n    function formatNumber(v) {\n        var sAxis = isHorizontal ? xa : ya;\n        return tickText(sAxis, +v, true).text;\n    }\n\n    var textinfo = trace.textinfo;\n    var cdi = calcTrace[index];\n\n    var parts = textinfo.split('+');\n    var text = [];\n    var tx;\n\n    var hasFlag = function(flag) { return parts.indexOf(flag) !== -1; };\n\n    if(hasFlag('label')) {\n        text.push(formatLabel(calcTrace[index].p));\n    }\n\n    if(hasFlag('text')) {\n        tx = Lib.castOption(trace, cdi.i, 'text');\n        if(tx === 0 || tx) text.push(tx);\n    }\n\n    if(isWaterfall) {\n        var delta = +cdi.rawS || cdi.s;\n        var final = cdi.v;\n        var initial = final - delta;\n\n        if(hasFlag('initial')) text.push(formatNumber(initial));\n        if(hasFlag('delta')) text.push(formatNumber(delta));\n        if(hasFlag('final')) text.push(formatNumber(final));\n    }\n\n    if(isFunnel) {\n        if(hasFlag('value')) text.push(formatNumber(cdi.s));\n\n        var nPercent = 0;\n        if(hasFlag('percent initial')) nPercent++;\n        if(hasFlag('percent previous')) nPercent++;\n        if(hasFlag('percent total')) nPercent++;\n\n        var hasMultiplePercents = nPercent > 1;\n\n        if(hasFlag('percent initial')) {\n            tx = Lib.formatPercent(cdi.begR);\n            if(hasMultiplePercents) tx += ' of initial';\n            text.push(tx);\n        }\n        if(hasFlag('percent previous')) {\n            tx = Lib.formatPercent(cdi.difR);\n            if(hasMultiplePercents) tx += ' of previous';\n            text.push(tx);\n        }\n        if(hasFlag('percent total')) {\n            tx = Lib.formatPercent(cdi.sumR);\n            if(hasMultiplePercents) tx += ' of total';\n            text.push(tx);\n        }\n    }\n\n    return text.join('<br>');\n}\n\nmodule.exports = {\n    plot: plot,\n    getTransformToMoveInsideBar: getTransformToMoveInsideBar,\n    getTransformToMoveOutsideBar: getTransformToMoveOutsideBar\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"./attributes\":841,\"./helpers\":846,\"./style\":854,\"d3\":157,\"fast-isnumeric\":224}],852:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var trace = cd[0].trace;\n    var isFunnel = (trace.type === 'funnel');\n    var isHorizontal = (trace.orientation === 'h');\n    var selection = [];\n    var i;\n\n    if(selectionTester === false) {\n        // clear selection\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            var di = cd[i];\n            var ct = 'ct' in di ? di.ct : getCentroid(di, xa, ya, isHorizontal, isFunnel);\n\n            if(selectionTester.contains(ct, false, i, searchInfo)) {\n                selection.push({\n                    pointNumber: i,\n                    x: xa.c2d(di.x),\n                    y: ya.c2d(di.y)\n                });\n                di.selected = 1;\n            } else {\n                di.selected = 0;\n            }\n        }\n    }\n\n    return selection;\n};\n\nfunction getCentroid(d, xa, ya, isHorizontal, isFunnel) {\n    var x0 = xa.c2p(isHorizontal ? d.s0 : d.p0, true);\n    var x1 = xa.c2p(isHorizontal ? d.s1 : d.p1, true);\n    var y0 = ya.c2p(isHorizontal ? d.p0 : d.s0, true);\n    var y1 = ya.c2p(isHorizontal ? d.p1 : d.s1, true);\n\n    if(isFunnel) {\n        return [(x0 + x1) / 2, (y0 + y1) / 2];\n    } else {\n        if(isHorizontal) {\n            return [x1, (y0 + y1) / 2];\n        } else {\n            return [(x0 + x1) / 2, y1];\n        }\n    }\n}\n\n},{}],853:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = Sieve;\n\nvar distinctVals = _dereq_('../../lib').distinctVals;\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\n/**\n * Helper class to sieve data from traces into bins\n *\n * @class\n *\n * @param {Array} traces\n*   Array of calculated traces\n * @param {object} opts\n *  - @param {boolean} [sepNegVal]\n *      If true, then split data at the same position into a bar\n *      for positive values and another for negative values\n *  - @param {boolean} [overlapNoMerge]\n *     If true, then don't merge overlapping bars into a single bar\n */\nfunction Sieve(traces, opts) {\n    this.traces = traces;\n    this.sepNegVal = opts.sepNegVal;\n    this.overlapNoMerge = opts.overlapNoMerge;\n\n    // for single-bin histograms - see histogram/calc\n    var width1 = Infinity;\n\n    var positions = [];\n    for(var i = 0; i < traces.length; i++) {\n        var trace = traces[i];\n        for(var j = 0; j < trace.length; j++) {\n            var bar = trace[j];\n            if(bar.p !== BADNUM) positions.push(bar.p);\n        }\n        if(trace[0] && trace[0].width1) {\n            width1 = Math.min(trace[0].width1, width1);\n        }\n    }\n    this.positions = positions;\n\n    var dv = distinctVals(positions);\n    this.distinctPositions = dv.vals;\n    if(dv.vals.length === 1 && width1 !== Infinity) this.minDiff = width1;\n    else this.minDiff = Math.min(dv.minDiff, width1);\n\n    this.binWidth = this.minDiff;\n\n    this.bins = {};\n}\n\n/**\n * Sieve datum\n *\n * @method\n * @param {number} position\n * @param {number} value\n * @returns {number} Previous bin value\n */\nSieve.prototype.put = function put(position, value) {\n    var label = this.getLabel(position, value);\n    var oldValue = this.bins[label] || 0;\n\n    this.bins[label] = oldValue + value;\n\n    return oldValue;\n};\n\n/**\n * Get current bin value for a given datum\n *\n * @method\n * @param {number} position  Position of datum\n * @param {number} [value]   Value of datum\n *                           (required if this.sepNegVal is true)\n * @returns {number} Current bin value\n */\nSieve.prototype.get = function get(position, value) {\n    var label = this.getLabel(position, value);\n    return this.bins[label] || 0;\n};\n\n/**\n * Get bin label for a given datum\n *\n * @method\n * @param {number} position  Position of datum\n * @param {number} [value]   Value of datum\n *                           (required if this.sepNegVal is true)\n * @returns {string} Bin label\n * (prefixed with a 'v' if value is negative and this.sepNegVal is\n * true; otherwise prefixed with '^')\n */\nSieve.prototype.getLabel = function getLabel(position, value) {\n    var prefix = (value < 0 && this.sepNegVal) ? 'v' : '^';\n    var label = (this.overlapNoMerge) ?\n        position :\n        Math.round(position / this.binWidth);\n    return prefix + label;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703}],854:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar attributes = _dereq_('./attributes');\nvar attributeTextFont = attributes.textfont;\nvar attributeInsideTextFont = attributes.insidetextfont;\nvar attributeOutsideTextFont = attributes.outsidetextfont;\nvar helpers = _dereq_('./helpers');\n\nfunction style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.barlayer').selectAll('g.trace');\n    var barcount = s.size();\n    var fullLayout = gd._fullLayout;\n\n    // trace styling\n    s.style('opacity', function(d) { return d[0].trace.opacity; })\n\n    // for gapless (either stacked or neighboring grouped) bars use\n    // crispEdges to turn off antialiasing so an artificial gap\n    // isn't introduced.\n    .each(function(d) {\n        if((fullLayout.barmode === 'stack' && barcount > 1) ||\n                (fullLayout.bargap === 0 &&\n                 fullLayout.bargroupgap === 0 &&\n                 !d[0].trace.marker.line.width)) {\n            d3.select(this).attr('shape-rendering', 'crispEdges');\n        }\n    });\n\n    s.selectAll('g.points').each(function(d) {\n        var sel = d3.select(this);\n        var trace = d[0].trace;\n        stylePoints(sel, trace, gd);\n    });\n\n    Registry.getComponentMethod('errorbars', 'style')(s);\n}\n\nfunction stylePoints(sel, trace, gd) {\n    Drawing.pointStyle(sel.selectAll('path'), trace, gd);\n    styleTextPoints(sel, trace, gd);\n}\n\nfunction styleTextPoints(sel, trace, gd) {\n    sel.selectAll('text').each(function(d) {\n        var tx = d3.select(this);\n        var font = determineFont(tx, d, trace, gd);\n        Drawing.font(tx, font);\n    });\n}\n\nfunction styleOnSelect(gd, cd) {\n    var s = cd[0].node3;\n    var trace = cd[0].trace;\n\n    if(trace.selectedpoints) {\n        stylePointsInSelectionMode(s, trace, gd);\n    } else {\n        stylePoints(s, trace, gd);\n\n        Registry.getComponentMethod('errorbars', 'style')(s);\n    }\n}\n\nfunction stylePointsInSelectionMode(s, trace, gd) {\n    Drawing.selectedPointStyle(s.selectAll('path'), trace);\n    styleTextInSelectionMode(s.selectAll('text'), trace, gd);\n}\n\nfunction styleTextInSelectionMode(txs, trace, gd) {\n    txs.each(function(d) {\n        var tx = d3.select(this);\n        var font;\n\n        if(d.selected) {\n            font = Lib.extendFlat({}, determineFont(tx, d, trace, gd));\n\n            var selectedFontColor = trace.selected.textfont && trace.selected.textfont.color;\n            if(selectedFontColor) {\n                font.color = selectedFontColor;\n            }\n\n            Drawing.font(tx, font);\n        } else {\n            Drawing.selectedTextStyle(tx, trace);\n        }\n    });\n}\n\nfunction determineFont(tx, d, trace, gd) {\n    var layoutFont = gd._fullLayout.font;\n    var textFont = trace.textfont;\n\n    if(tx.classed('bartext-inside')) {\n        var barColor = getBarColor(d, trace);\n        textFont = getInsideTextFont(trace, d.i, layoutFont, barColor);\n    } else if(tx.classed('bartext-outside')) {\n        textFont = getOutsideTextFont(trace, d.i, layoutFont);\n    }\n\n    return textFont;\n}\n\nfunction getTextFont(trace, index, defaultValue) {\n    return getFontValue(\n      attributeTextFont, trace.textfont, index, defaultValue);\n}\n\nfunction getInsideTextFont(trace, index, layoutFont, barColor) {\n    var defaultFont = getTextFont(trace, index, layoutFont);\n\n    var wouldFallBackToLayoutFont =\n      (trace._input.textfont === undefined || trace._input.textfont.color === undefined) ||\n      (Array.isArray(trace.textfont.color) && trace.textfont.color[index] === undefined);\n    if(wouldFallBackToLayoutFont) {\n        defaultFont = {\n            color: Color.contrast(barColor),\n            family: defaultFont.family,\n            size: defaultFont.size\n        };\n    }\n\n    return getFontValue(\n      attributeInsideTextFont, trace.insidetextfont, index, defaultFont);\n}\n\nfunction getOutsideTextFont(trace, index, layoutFont) {\n    var defaultFont = getTextFont(trace, index, layoutFont);\n    return getFontValue(\n      attributeOutsideTextFont, trace.outsidetextfont, index, defaultFont);\n}\n\nfunction getFontValue(attributeDefinition, attributeValue, index, defaultValue) {\n    attributeValue = attributeValue || {};\n\n    var familyValue = helpers.getValue(attributeValue.family, index);\n    var sizeValue = helpers.getValue(attributeValue.size, index);\n    var colorValue = helpers.getValue(attributeValue.color, index);\n\n    return {\n        family: helpers.coerceString(\n          attributeDefinition.family, familyValue, defaultValue.family),\n        size: helpers.coerceNumber(\n          attributeDefinition.size, sizeValue, defaultValue.size),\n        color: helpers.coerceColor(\n          attributeDefinition.color, colorValue, defaultValue.color)\n    };\n}\n\nfunction getBarColor(cd, trace) {\n    if(trace.type === 'waterfall') {\n        return trace[cd.dir].marker.color;\n    }\n    return cd.mc || trace.marker.color;\n}\n\nmodule.exports = {\n    style: style,\n    styleTextPoints: styleTextPoints,\n    styleOnSelect: styleOnSelect,\n    getInsideTextFont: getInsideTextFont,\n    getOutsideTextFont: getOutsideTextFont,\n    getBarColor: getBarColor\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../lib\":703,\"../../registry\":831,\"./attributes\":841,\"./helpers\":846,\"d3\":157}],855:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\n\nmodule.exports = function handleStyleDefaults(traceIn, traceOut, coerce, defaultColor, layout) {\n    coerce('marker.color', defaultColor);\n\n    if(hasColorscale(traceIn, 'marker')) {\n        colorscaleDefaults(\n            traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}\n        );\n    }\n\n    coerce('marker.line.color', Color.defaultLine);\n\n    if(hasColorscale(traceIn, 'marker.line')) {\n        colorscaleDefaults(\n            traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}\n        );\n    }\n\n    coerce('marker.line.width');\n    coerce('marker.opacity');\n    coerce('selected.marker.color');\n    coerce('unselected.marker.color');\n};\n\n},{\"../../components/color\":580,\"../../components/colorscale/defaults\":590,\"../../components/colorscale/helpers\":591}],856:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar scatterPolarAttrs = _dereq_('../scatterpolar/attributes');\nvar barAttrs = _dereq_('../bar/attributes');\n\nmodule.exports = {\n    r: scatterPolarAttrs.r,\n    theta: scatterPolarAttrs.theta,\n    r0: scatterPolarAttrs.r0,\n    dr: scatterPolarAttrs.dr,\n    theta0: scatterPolarAttrs.theta0,\n    dtheta: scatterPolarAttrs.dtheta,\n    thetaunit: scatterPolarAttrs.thetaunit,\n\n    // orientation: {\n    //     valType: 'enumerated',\n    //     \n    //     values: ['radial', 'angular'],\n    //     editType: 'calc+clearAxisTypes',\n    //     \n    // },\n\n    base: extendFlat({}, barAttrs.base, {\n        \n    }),\n    offset: extendFlat({}, barAttrs.offset, {\n        \n    }),\n    width: extendFlat({}, barAttrs.width, {\n        \n    }),\n\n    text: extendFlat({}, barAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, barAttrs.hovertext, {\n        \n    }),\n\n    // textposition: {},\n    // textfont: {},\n    // insidetextfont: {},\n    // outsidetextfont: {},\n    // constraintext: {},\n    // cliponaxis: extendFlat({}, barAttrs.cliponaxis, {dflt: false}),\n\n    marker: barAttrs.marker,\n\n    hoverinfo: scatterPolarAttrs.hoverinfo,\n    hovertemplate: hovertemplateAttrs(),\n\n    selected: barAttrs.selected,\n    unselected: barAttrs.unselected\n\n    // error_x (error_r, error_theta)\n    // error_y\n};\n\n},{\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../bar/attributes\":841,\"../scatterpolar/attributes\":1136}],857:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar arraysToCalcdata = _dereq_('../bar/arrays_to_calcdata');\nvar setGroupPositions = _dereq_('../bar/cross_trace_calc').setGroupPositions;\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar traceIs = _dereq_('../../registry').traceIs;\nvar extendFlat = _dereq_('../../lib').extendFlat;\n\nfunction calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var subplotId = trace.subplot;\n    var radialAxis = fullLayout[subplotId].radialaxis;\n    var angularAxis = fullLayout[subplotId].angularaxis;\n    var rArray = radialAxis.makeCalcdata(trace, 'r');\n    var thetaArray = angularAxis.makeCalcdata(trace, 'theta');\n    var len = trace._length;\n    var cd = new Array(len);\n\n    // 'size' axis variables\n    var sArray = rArray;\n    // 'pos' axis variables\n    var pArray = thetaArray;\n\n    for(var i = 0; i < len; i++) {\n        cd[i] = {p: pArray[i], s: sArray[i]};\n    }\n\n    // convert width and offset in 'c' coordinate,\n    // set 'c' value(s) in trace._width and trace._offset,\n    // to make Bar.crossTraceCalc \"just work\"\n    function d2c(attr) {\n        var val = trace[attr];\n        if(val !== undefined) {\n            trace['_' + attr] = Array.isArray(val) ?\n                angularAxis.makeCalcdata(trace, attr) :\n                angularAxis.d2c(val, trace.thetaunit);\n        }\n    }\n\n    if(angularAxis.type === 'linear') {\n        d2c('width');\n        d2c('offset');\n    }\n\n    if(hasColorscale(trace, 'marker')) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.marker.color,\n            containerStr: 'marker',\n            cLetter: 'c'\n        });\n    }\n    if(hasColorscale(trace, 'marker.line')) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.marker.line.color,\n            containerStr: 'marker.line',\n            cLetter: 'c'\n        });\n    }\n\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n}\n\nfunction crossTraceCalc(gd, polarLayout, subplotId) {\n    var calcdata = gd.calcdata;\n    var barPolarCd = [];\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cdi = calcdata[i];\n        var trace = cdi[0].trace;\n\n        if(trace.visible === true && traceIs(trace, 'bar') &&\n            trace.subplot === subplotId\n        ) {\n            barPolarCd.push(cdi);\n        }\n    }\n\n    // to make _extremes is filled in correctly so that\n    // polar._subplot.radialAxis can get auotrange'd\n    // TODO clean up!\n    // I think we want to call getAutorange on polar.radialaxis\n    // NOT on polar._subplot.radialAxis\n    var rAxis = extendFlat({}, polarLayout.radialaxis, {_id: 'x'});\n    var aAxis = polarLayout.angularaxis;\n\n    setGroupPositions(gd, aAxis, rAxis, barPolarCd, {\n        mode: polarLayout.barmode,\n        norm: polarLayout.barnorm,\n        gap: polarLayout.bargap,\n        groupgap: polarLayout.bargroupgap\n    });\n}\n\nmodule.exports = {\n    calc: calc,\n    crossTraceCalc: crossTraceCalc\n};\n\n},{\"../../components/colorscale/calc\":588,\"../../components/colorscale/helpers\":591,\"../../lib\":703,\"../../registry\":831,\"../bar/arrays_to_calcdata\":840,\"../bar/cross_trace_calc\":844,\"../scatter/calc_selection\":1077}],858:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleRThetaDefaults = _dereq_('../scatterpolar/defaults').handleRThetaDefaults;\nvar handleStyleDefaults = _dereq_('../bar/style_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleRThetaDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    // coerce('orientation', (traceOut.theta && !traceOut.r) ? 'angular' : 'radial');\n\n    coerce('thetaunit');\n    coerce('base');\n    coerce('offset');\n    coerce('width');\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    // var textPosition = coerce('textposition');\n    // var hasBoth = Array.isArray(textPosition) || textPosition === 'auto';\n    // var hasInside = hasBoth || textPosition === 'inside';\n    // var hasOutside = hasBoth || textPosition === 'outside';\n\n    // if(hasInside || hasOutside) {\n    //     var textFont = coerceFont(coerce, 'textfont', layout.font);\n    //     if(hasInside) coerceFont(coerce, 'insidetextfont', textFont);\n    //     if(hasOutside) coerceFont(coerce, 'outsidetextfont', textFont);\n    //     coerce('constraintext');\n    //     coerce('selected.textfont.color');\n    //     coerce('unselected.textfont.color');\n    //     coerce('cliponaxis');\n    // }\n\n    handleStyleDefaults(traceIn, traceOut, coerce, defaultColor, layout);\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../bar/style_defaults\":855,\"../scatterpolar/defaults\":1138,\"./attributes\":856}],859:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Fx = _dereq_('../../components/fx');\nvar Lib = _dereq_('../../lib');\nvar getTraceColor = _dereq_('../bar/hover').getTraceColor;\nvar fillText = Lib.fillText;\nvar makeHoverPointText = _dereq_('../scatterpolar/hover').makeHoverPointText;\nvar isPtInsidePolygon = _dereq_('../../plots/polar/helpers').isPtInsidePolygon;\n\nmodule.exports = function hoverPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n\n    var subplot = pointData.subplot;\n    var radialAxis = subplot.radialAxis;\n    var angularAxis = subplot.angularAxis;\n    var vangles = subplot.vangles;\n    var inboxFn = vangles ? isPtInsidePolygon : Lib.isPtInsideSector;\n    var maxHoverDistance = pointData.maxHoverDistance;\n    var period = angularAxis._period || 2 * Math.PI;\n\n    var rVal = Math.abs(radialAxis.g2p(Math.sqrt(xval * xval + yval * yval)));\n    var thetaVal = Math.atan2(yval, xval);\n\n    // polar.(x|y)axis.p2c doesn't get the reversed radial axis range case right\n    if(radialAxis.range[0] > radialAxis.range[1]) {\n        thetaVal += Math.PI;\n    }\n\n    var distFn = function(di) {\n        if(inboxFn(rVal, thetaVal, [di.rp0, di.rp1], [di.thetag0, di.thetag1], vangles)) {\n            return maxHoverDistance +\n                // add a little to the pseudo-distance for wider bars, so that like scatter,\n                // if you are over two overlapping bars, the narrower one wins.\n                Math.min(1, Math.abs(di.thetag1 - di.thetag0) / period) - 1 +\n                // add a gradient so hovering near the end of a\n                // bar makes it a little closer match\n                (di.rp1 - rVal) / (di.rp1 - di.rp0) - 1;\n        } else {\n            return Infinity;\n        }\n    };\n\n    Fx.getClosest(cd, distFn, pointData);\n    if(pointData.index === false) return;\n\n    var index = pointData.index;\n    var cdi = cd[index];\n\n    pointData.x0 = pointData.x1 = cdi.ct[0];\n    pointData.y0 = pointData.y1 = cdi.ct[1];\n\n    var _cdi = Lib.extendFlat({}, cdi, {r: cdi.s, theta: cdi.p});\n    fillText(cdi, trace, pointData);\n    makeHoverPointText(_cdi, trace, subplot, pointData);\n    pointData.hovertemplate = trace.hovertemplate;\n    pointData.color = getTraceColor(trace, cdi);\n    pointData.xLabelVal = pointData.yLabelVal = undefined;\n\n    if(cdi.s < 0) {\n        pointData.idealAlign = 'left';\n    }\n\n    return [pointData];\n};\n\n},{\"../../components/fx\":619,\"../../lib\":703,\"../../plots/polar/helpers\":814,\"../bar/hover\":847,\"../scatterpolar/hover\":1139}],860:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'barpolar',\n    basePlotModule: _dereq_('../../plots/polar'),\n    categories: ['polar', 'bar', 'showLegend'],\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('./calc').crossTraceCalc,\n\n    plot: _dereq_('./plot'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    style: _dereq_('../bar/style').style,\n\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../bar/select'),\n\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/polar\":815,\"../bar/select\":852,\"../bar/style\":854,\"../scatter/marker_colorbar\":1092,\"./attributes\":856,\"./calc\":857,\"./defaults\":858,\"./hover\":859,\"./layout_attributes\":861,\"./layout_defaults\":862,\"./plot\":863}],861:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    barmode: {\n        valType: 'enumerated',\n        values: ['stack', 'overlay'],\n        dflt: 'stack',\n        \n        editType: 'calc',\n        \n    },\n    bargap: {\n        valType: 'number',\n        dflt: 0.1,\n        min: 0,\n        max: 1,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],862:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attrs = _dereq_('./layout_attributes');\n\nmodule.exports = function(layoutIn, layoutOut, fullData) {\n    var subplotsDone = {};\n    var sp;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn[sp] || {}, layoutOut[sp], attrs, attr, dflt);\n    }\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n        if(trace.type === 'barpolar' && trace.visible === true) {\n            sp = trace.subplot;\n            if(!subplotsDone[sp]) {\n                coerce('barmode');\n                coerce('bargap');\n                subplotsDone[sp] = 1;\n            }\n        }\n    }\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":861}],863:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar helpers = _dereq_('../../plots/polar/helpers');\n\nmodule.exports = function plot(gd, subplot, cdbar) {\n    var xa = subplot.xaxis;\n    var ya = subplot.yaxis;\n    var radialAxis = subplot.radialAxis;\n    var angularAxis = subplot.angularAxis;\n    var pathFn = makePathFn(subplot);\n    var barLayer = subplot.layers.frontplot.select('g.barlayer');\n\n    Lib.makeTraceGroups(barLayer, cdbar, 'trace bars').each(function(cd) {\n        var plotGroup = cd[0].node3 = d3.select(this);\n        var pointGroup = Lib.ensureSingle(plotGroup, 'g', 'points');\n        var bars = pointGroup.selectAll('g.point').data(Lib.identity);\n\n        bars.enter().append('g')\n            .style('vector-effect', 'non-scaling-stroke')\n            .style('stroke-miterlimit', 2)\n            .classed('point', true);\n\n        bars.exit().remove();\n\n        bars.each(function(di) {\n            var bar = d3.select(this);\n\n            var rp0 = di.rp0 = radialAxis.c2p(di.s0);\n            var rp1 = di.rp1 = radialAxis.c2p(di.s1);\n            var thetag0 = di.thetag0 = angularAxis.c2g(di.p0);\n            var thetag1 = di.thetag1 = angularAxis.c2g(di.p1);\n\n            var dPath;\n\n            if(!isNumeric(rp0) || !isNumeric(rp1) ||\n                !isNumeric(thetag0) || !isNumeric(thetag1) ||\n                rp0 === rp1 || thetag0 === thetag1\n            ) {\n                // do not remove blank bars, to keep data-to-node\n                // mapping intact during radial drag, that we\n                // can skip calling _module.style during interactions\n                dPath = 'M0,0Z';\n            } else {\n                // this 'center' pt is used for selections and hover labels\n                var rg1 = radialAxis.c2g(di.s1);\n                var thetagMid = (thetag0 + thetag1) / 2;\n                di.ct = [\n                    xa.c2p(rg1 * Math.cos(thetagMid)),\n                    ya.c2p(rg1 * Math.sin(thetagMid))\n                ];\n\n                dPath = pathFn(rp0, rp1, thetag0, thetag1);\n            }\n\n            Lib.ensureSingle(bar, 'path').attr('d', dPath);\n        });\n\n        // clip plotGroup, when trace layer isn't clipped\n        Drawing.setClipUrl(\n            plotGroup,\n            subplot._hasClipOnAxisFalse ? subplot.clipIds.forTraces : null,\n            gd\n        );\n    });\n};\n\nfunction makePathFn(subplot) {\n    var cxx = subplot.cxx;\n    var cyy = subplot.cyy;\n\n    if(subplot.vangles) {\n        return function(r0, r1, _a0, _a1) {\n            var a0, a1;\n\n            if(Lib.angleDelta(_a0, _a1) > 0) {\n                a0 = _a0;\n                a1 = _a1;\n            } else {\n                a0 = _a1;\n                a1 = _a0;\n            }\n\n            var va0 = helpers.findEnclosingVertexAngles(a0, subplot.vangles)[0];\n            var va1 = helpers.findEnclosingVertexAngles(a1, subplot.vangles)[1];\n            var vaBar = [va0, (a0 + a1) / 2, va1];\n            return helpers.pathPolygonAnnulus(r0, r1, a0, a1, vaBar, cxx, cyy);\n        };\n    }\n\n    return function(r0, r1, a0, a1) {\n        return Lib.pathAnnulus(r0, r1, a0, a1, cxx, cyy);\n    };\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../../plots/polar/helpers\":814,\"d3\":157,\"fast-isnumeric\":224}],864:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar barAttrs = _dereq_('../bar/attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nmodule.exports = {\n    y: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    x0: {\n        valType: 'any',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y0: {\n        valType: 'any',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    name: {\n        valType: 'string',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n    hovertemplate: hovertemplateAttrs({\n        \n    }),\n    whiskerwidth: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0.5,\n        \n        editType: 'calc',\n        \n    },\n    notched: {\n        valType: 'boolean',\n        \n        editType: 'calc',\n        \n    },\n    notchwidth: {\n        valType: 'number',\n        min: 0,\n        max: 0.5,\n        dflt: 0.25,\n        \n        editType: 'calc',\n        \n    },\n    boxpoints: {\n        valType: 'enumerated',\n        values: ['all', 'outliers', 'suspectedoutliers', false],\n        dflt: 'outliers',\n        \n        editType: 'calc',\n        \n    },\n    boxmean: {\n        valType: 'enumerated',\n        values: [true, 'sd', false],\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    jitter: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'calc',\n        \n    },\n    pointpos: {\n        valType: 'number',\n        min: -2,\n        max: 2,\n        \n        editType: 'calc',\n        \n    },\n    orientation: {\n        valType: 'enumerated',\n        values: ['v', 'h'],\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    width: {\n        valType: 'number',\n        min: 0,\n        \n        dflt: 0,\n        editType: 'calc',\n        \n    },\n\n    marker: {\n        outliercolor: {\n            valType: 'color',\n            dflt: 'rgba(0, 0, 0, 0)',\n            \n            editType: 'style',\n            \n        },\n        symbol: extendFlat({}, scatterMarkerAttrs.symbol,\n            {arrayOk: false, editType: 'plot'}),\n        opacity: extendFlat({}, scatterMarkerAttrs.opacity,\n            {arrayOk: false, dflt: 1, editType: 'style'}),\n        size: extendFlat({}, scatterMarkerAttrs.size,\n            {arrayOk: false, editType: 'calc'}),\n        color: extendFlat({}, scatterMarkerAttrs.color,\n            {arrayOk: false, editType: 'style'}),\n        line: {\n            color: extendFlat({}, scatterMarkerLineAttrs.color,\n                {arrayOk: false, dflt: colorAttrs.defaultLine, editType: 'style'}\n            ),\n            width: extendFlat({}, scatterMarkerLineAttrs.width,\n                {arrayOk: false, dflt: 0, editType: 'style'}\n            ),\n            outliercolor: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            outlierwidth: {\n                valType: 'number',\n                min: 0,\n                dflt: 1,\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        editType: 'plot'\n    },\n    line: {\n        color: {\n            valType: 'color',\n            \n            editType: 'style',\n            \n        },\n        width: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 2,\n            editType: 'style',\n            \n        },\n        editType: 'plot'\n    },\n    fillcolor: scatterAttrs.fillcolor,\n\n    offsetgroup: barAttrs.offsetgroup,\n    alignmentgroup: barAttrs.alignmentgroup,\n\n    selected: {\n        marker: scatterAttrs.selected.marker,\n        editType: 'style'\n    },\n    unselected: {\n        marker: scatterAttrs.unselected.marker,\n        editType: 'style'\n    },\n    hoveron: {\n        valType: 'flaglist',\n        flags: ['boxes', 'points'],\n        dflt: 'boxes+points',\n        \n        editType: 'style',\n        \n    }\n};\n\n},{\"../../components/color/attributes\":579,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../bar/attributes\":841,\"../scatter/attributes\":1075}],865:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar _ = Lib._;\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\n// outlier definition based on http://www.physics.csbsju.edu/stats/box2.html\nmodule.exports = function calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var cd = [];\n\n    // N.B. violin reuses same Box.calc\n    var numKey = trace.type === 'violin' ? '_numViolins' : '_numBoxes';\n\n    var i;\n    var valAxis, valLetter;\n    var posAxis, posLetter;\n\n    if(trace.orientation === 'h') {\n        valAxis = xa;\n        valLetter = 'x';\n        posAxis = ya;\n        posLetter = 'y';\n    } else {\n        valAxis = ya;\n        valLetter = 'y';\n        posAxis = xa;\n        posLetter = 'x';\n    }\n\n    var val = valAxis.makeCalcdata(trace, valLetter);\n    var pos = getPos(trace, posLetter, posAxis, val, fullLayout[numKey]);\n\n    var dv = Lib.distinctVals(pos);\n    var posDistinct = dv.vals;\n    var dPos = dv.minDiff / 2;\n    var posBins = makeBins(posDistinct, dPos);\n\n    var pLen = posDistinct.length;\n    var ptsPerBin = initNestedArray(pLen);\n\n    // bin pts info per position bins\n    for(i = 0; i < trace._length; i++) {\n        var v = val[i];\n        if(!isNumeric(v)) continue;\n\n        var n = Lib.findBin(pos[i], posBins);\n        if(n >= 0 && n < pLen) {\n            var pt = {v: v, i: i};\n            arraysToCalcdata(pt, trace, i);\n            ptsPerBin[n].push(pt);\n        }\n    }\n\n    var cdi;\n    var ptFilterFn = (trace.boxpoints || trace.points) === 'all' ?\n        Lib.identity :\n        function(pt) { return (pt.v < cdi.lf || pt.v > cdi.uf); };\n\n    // build calcdata trace items, one item per distinct position\n    for(i = 0; i < pLen; i++) {\n        if(ptsPerBin[i].length > 0) {\n            var pts = ptsPerBin[i].sort(sortByVal);\n            var boxVals = pts.map(extractVal);\n            var bvLen = boxVals.length;\n\n            cdi = {};\n            cdi.pos = posDistinct[i];\n            cdi.pts = pts;\n\n            // Sort categories by values\n            cdi[posLetter] = cdi.pos;\n            cdi[valLetter] = cdi.pts.map(function(pt) { return pt.v; });\n\n            cdi.min = boxVals[0];\n            cdi.max = boxVals[bvLen - 1];\n            cdi.mean = Lib.mean(boxVals, bvLen);\n            cdi.sd = Lib.stdev(boxVals, bvLen, cdi.mean);\n\n            // first quartile\n            cdi.q1 = Lib.interp(boxVals, 0.25);\n             // median\n            cdi.med = Lib.interp(boxVals, 0.5);\n            // third quartile\n            cdi.q3 = Lib.interp(boxVals, 0.75);\n\n            // lower and upper fences - last point inside\n            // 1.5 interquartile ranges from quartiles\n            cdi.lf = Math.min(\n                cdi.q1,\n                boxVals[Math.min(\n                    Lib.findBin(2.5 * cdi.q1 - 1.5 * cdi.q3, boxVals, true) + 1,\n                    bvLen - 1\n                )]\n            );\n            cdi.uf = Math.max(\n                cdi.q3,\n                boxVals[Math.max(\n                    Lib.findBin(2.5 * cdi.q3 - 1.5 * cdi.q1, boxVals),\n                    0\n                )]\n            );\n\n            // lower and upper outliers - 3 IQR out (don't clip to max/min,\n            // this is only for discriminating suspected & far outliers)\n            cdi.lo = 4 * cdi.q1 - 3 * cdi.q3;\n            cdi.uo = 4 * cdi.q3 - 3 * cdi.q1;\n\n            // lower and upper notches ~95% Confidence Intervals for median\n            var iqr = cdi.q3 - cdi.q1;\n            var mci = 1.57 * iqr / Math.sqrt(bvLen);\n            cdi.ln = cdi.med - mci;\n            cdi.un = cdi.med + mci;\n\n            cdi.pts2 = pts.filter(ptFilterFn);\n\n            cd.push(cdi);\n        }\n    }\n\n    calcSelection(cd, trace);\n    var extremes = Axes.findExtremes(valAxis, val, {padded: true});\n    trace._extremes[valAxis._id] = extremes;\n\n    if(cd.length > 0) {\n        cd[0].t = {\n            num: fullLayout[numKey],\n            dPos: dPos,\n            posLetter: posLetter,\n            valLetter: valLetter,\n            labels: {\n                med: _(gd, 'median:'),\n                min: _(gd, 'min:'),\n                q1: _(gd, 'q1:'),\n                q3: _(gd, 'q3:'),\n                max: _(gd, 'max:'),\n                mean: trace.boxmean === 'sd' ? _(gd, 'mean ± σ:') : _(gd, 'mean:'),\n                lf: _(gd, 'lower fence:'),\n                uf: _(gd, 'upper fence:')\n            }\n        };\n\n        fullLayout[numKey]++;\n        return cd;\n    } else {\n        return [{t: {empty: true}}];\n    }\n};\n\n// In vertical (horizontal) box plots:\n// if no x (y) data, use x0 (y0), or name\n// so if you want one box\n// per trace, set x0 (y0) to the x (y) value or category for this trace\n// (or set x (y) to a constant array matching y (x))\nfunction getPos(trace, posLetter, posAxis, val, num) {\n    if(posLetter in trace) {\n        return posAxis.makeCalcdata(trace, posLetter);\n    }\n\n    var pos0;\n\n    if(posLetter + '0' in trace) {\n        pos0 = trace[posLetter + '0'];\n    } else if('name' in trace && (\n        posAxis.type === 'category' || (\n            isNumeric(trace.name) &&\n            ['linear', 'log'].indexOf(posAxis.type) !== -1\n        ) || (\n            Lib.isDateTime(trace.name) &&\n            posAxis.type === 'date'\n        )\n    )) {\n        pos0 = trace.name;\n    } else {\n        pos0 = num;\n    }\n\n    var pos0c = posAxis.type === 'multicategory' ?\n        posAxis.r2c_just_indices(pos0) :\n        posAxis.d2c(pos0, 0, trace[posLetter + 'calendar']);\n\n    return val.map(function() { return pos0c; });\n}\n\nfunction makeBins(x, dx) {\n    var len = x.length;\n    var bins = new Array(len + 1);\n\n    for(var i = 0; i < len; i++) {\n        bins[i] = x[i] - dx;\n    }\n    bins[len] = x[len - 1] + dx;\n\n    return bins;\n}\n\nfunction initNestedArray(len) {\n    var arr = new Array(len);\n    for(var i = 0; i < len; i++) {\n        arr[i] = [];\n    }\n    return arr;\n}\n\nfunction arraysToCalcdata(pt, trace, i) {\n    var trace2calc = {\n        text: 'tx',\n        hovertext: 'htx'\n    };\n\n    for(var k in trace2calc) {\n        if(Array.isArray(trace[k])) {\n            pt[trace2calc[k]] = trace[k][i];\n        }\n    }\n}\n\nfunction calcSelection(cd, trace) {\n    if(Lib.isArrayOrTypedArray(trace.selectedpoints)) {\n        for(var i = 0; i < cd.length; i++) {\n            var pts = cd[i].pts || [];\n            var ptNumber2cdIndex = {};\n\n            for(var j = 0; j < pts.length; j++) {\n                ptNumber2cdIndex[pts[j].i] = j;\n            }\n\n            Lib.tagSelected(pts, trace, ptNumber2cdIndex);\n        }\n    }\n}\n\nfunction sortByVal(a, b) { return a.v - b.v; }\n\nfunction extractVal(o) { return o.v; }\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"fast-isnumeric\":224}],866:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\nvar getAxisGroup = _dereq_('../../plots/cartesian/axis_ids').getAxisGroup;\n\nvar orientations = ['v', 'h'];\n\nfunction crossTraceCalc(gd, plotinfo) {\n    var calcdata = gd.calcdata;\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    for(var i = 0; i < orientations.length; i++) {\n        var orientation = orientations[i];\n        var posAxis = orientation === 'h' ? ya : xa;\n        var boxList = [];\n\n        // make list of boxes / candlesticks\n        // For backward compatibility, candlesticks are treated as if they *are* box traces here\n        for(var j = 0; j < calcdata.length; j++) {\n            var cd = calcdata[j];\n            var t = cd[0].t;\n            var trace = cd[0].trace;\n\n            if(trace.visible === true &&\n                    (trace.type === 'box' || trace.type === 'candlestick') &&\n                    !t.empty &&\n                    (trace.orientation || 'v') === orientation &&\n                    trace.xaxis === xa._id &&\n                    trace.yaxis === ya._id\n              ) {\n                boxList.push(j);\n            }\n        }\n\n        setPositionOffset('box', gd, boxList, posAxis);\n    }\n}\n\nfunction setPositionOffset(traceType, gd, boxList, posAxis) {\n    var calcdata = gd.calcdata;\n    var fullLayout = gd._fullLayout;\n    var axId = posAxis._id;\n    var axLetter = axId.charAt(0);\n\n    var i, j, calcTrace;\n    var pointList = [];\n    var shownPts = 0;\n\n    // make list of box points\n    for(i = 0; i < boxList.length; i++) {\n        calcTrace = calcdata[boxList[i]];\n        for(j = 0; j < calcTrace.length; j++) {\n            pointList.push(calcTrace[j].pos);\n            shownPts += (calcTrace[j].pts2 || []).length;\n        }\n    }\n\n    if(!pointList.length) return;\n\n    // box plots - update dPos based on multiple traces\n    var boxdv = Lib.distinctVals(pointList);\n    var dPos0 = boxdv.minDiff / 2;\n\n    // check for forced minimum dtick\n    Axes.minDtick(posAxis, boxdv.minDiff, boxdv.vals[0], true);\n\n    var numKey = traceType === 'violin' ? '_numViolins' : '_numBoxes';\n    var numTotal = fullLayout[numKey];\n    var group = fullLayout[traceType + 'mode'] === 'group' && numTotal > 1;\n    var groupFraction = 1 - fullLayout[traceType + 'gap'];\n    var groupGapFraction = 1 - fullLayout[traceType + 'groupgap'];\n\n    for(i = 0; i < boxList.length; i++) {\n        calcTrace = calcdata[boxList[i]];\n\n        var trace = calcTrace[0].trace;\n        var t = calcTrace[0].t;\n        var width = trace.width;\n        var side = trace.side;\n\n        // position coordinate delta\n        var dPos;\n        // box half width;\n        var bdPos;\n        // box center offset\n        var bPos;\n        // half-width within which to accept hover for this box/violin\n        // always split the distance to the closest box/violin\n        var wHover;\n\n        if(width) {\n            dPos = bdPos = wHover = width / 2;\n            bPos = 0;\n        } else {\n            dPos = dPos0;\n\n            if(group) {\n                var groupId = getAxisGroup(fullLayout, posAxis._id) + trace.orientation;\n                var alignmentGroups = fullLayout._alignmentOpts[groupId] || {};\n                var alignmentGroupOpts = alignmentGroups[trace.alignmentgroup] || {};\n                var nOffsetGroups = Object.keys(alignmentGroupOpts.offsetGroups || {}).length;\n                var num = nOffsetGroups || numTotal;\n                var shift = nOffsetGroups ? trace._offsetIndex : t.num;\n\n                bdPos = dPos * groupFraction * groupGapFraction / num;\n                bPos = 2 * dPos * (-0.5 + (shift + 0.5) / num) * groupFraction;\n                wHover = dPos * groupFraction / num;\n            } else {\n                bdPos = dPos * groupFraction * groupGapFraction;\n                bPos = 0;\n                wHover = dPos;\n            }\n        }\n        t.dPos = dPos;\n        t.bPos = bPos;\n        t.bdPos = bdPos;\n        t.wHover = wHover;\n\n        // box/violin-only value-space push value\n        var pushplus;\n        var pushminus;\n        // edge of box/violin\n        var edge = bPos + bdPos;\n        var edgeplus;\n        var edgeminus;\n        // value-space padding\n        var vpadplus;\n        var vpadminus;\n        // pixel-space padding\n        var ppadplus;\n        var ppadminus;\n        // do we add 5% of both sides (more logic for points beyond box/violin below)\n        var padded = Boolean(width);\n        // does this trace show points?\n        var hasPts = (trace.boxpoints || trace.points) && (shownPts > 0);\n\n        if(side === 'positive') {\n            pushplus = dPos * (width ? 1 : 0.5);\n            edgeplus = edge;\n            pushminus = edgeplus = bPos;\n        } else if(side === 'negative') {\n            pushplus = edgeplus = bPos;\n            pushminus = dPos * (width ? 1 : 0.5);\n            edgeminus = edge;\n        } else {\n            pushplus = pushminus = dPos;\n            edgeplus = edgeminus = edge;\n        }\n\n        if(hasPts) {\n            var pointpos = trace.pointpos;\n            var jitter = trace.jitter;\n            var ms = trace.marker.size / 2;\n\n            var pp = 0;\n            if((pointpos + jitter) >= 0) {\n                pp = edge * (pointpos + jitter);\n                if(pp > pushplus) {\n                    // (++) beyond plus-value, use pp\n                    padded = true;\n                    ppadplus = ms;\n                    vpadplus = pp;\n                } else if(pp > edgeplus) {\n                    // (+), use push-value (it's bigger), but add px-pad\n                    ppadplus = ms;\n                    vpadplus = pushplus;\n                }\n            }\n            if(pp <= pushplus) {\n                // (->) fallback to push value\n                vpadplus = pushplus;\n            }\n\n            var pm = 0;\n            if((pointpos - jitter) <= 0) {\n                pm = -edge * (pointpos - jitter);\n                if(pm > pushminus) {\n                    // (--) beyond plus-value, use pp\n                    padded = true;\n                    ppadminus = ms;\n                    vpadminus = pm;\n                } else if(pm > edgeminus) {\n                    // (-), use push-value (it's bigger), but add px-pad\n                    ppadminus = ms;\n                    vpadminus = pushminus;\n                }\n            }\n            if(pm <= pushminus) {\n                // (<-) fallback to push value\n                vpadminus = pushminus;\n            }\n        } else {\n            vpadplus = pushplus;\n            vpadminus = pushminus;\n        }\n\n        var pos = new Array(calcTrace.length);\n        for(j = 0; j < calcTrace.length; j++) {\n            pos[j] = calcTrace[j].pos;\n        }\n\n        trace._extremes[axId] = Axes.findExtremes(posAxis, pos, {\n            padded: padded,\n            vpadminus: vpadminus,\n            vpadplus: vpadplus,\n            // N.B. SVG px-space positive/negative\n            ppadminus: {x: ppadminus, y: ppadplus}[axLetter],\n            ppadplus: {x: ppadplus, y: ppadminus}[axLetter],\n        });\n    }\n}\n\nmodule.exports = {\n    crossTraceCalc: crossTraceCalc,\n    setPositionOffset: setPositionOffset\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../plots/cartesian/axis_ids\":754}],867:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\nvar Color = _dereq_('../../components/color');\nvar handleGroupingDefaults = _dereq_('../bar/defaults').handleGroupingDefaults;\nvar attributes = _dereq_('./attributes');\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    handleSampleDefaults(traceIn, traceOut, coerce, layout);\n    if(traceOut.visible === false) return;\n\n    coerce('line.color', (traceIn.marker || {}).color || defaultColor);\n    coerce('line.width');\n    coerce('fillcolor', Color.addOpacity(traceOut.line.color, 0.5));\n\n    coerce('whiskerwidth');\n    coerce('boxmean');\n    coerce('width');\n\n    var notched = coerce('notched', traceIn.notchwidth !== undefined);\n    if(notched) coerce('notchwidth');\n\n    handlePointsDefaults(traceIn, traceOut, coerce, {prefix: 'box'});\n}\n\nfunction handleSampleDefaults(traceIn, traceOut, coerce, layout) {\n    var y = coerce('y');\n    var x = coerce('x');\n    var hasX = x && x.length;\n\n    var defaultOrientation, len;\n\n    if(y && y.length) {\n        defaultOrientation = 'v';\n        if(hasX) {\n            len = Math.min(Lib.minRowLength(x), Lib.minRowLength(y));\n        } else {\n            coerce('x0');\n            len = Lib.minRowLength(y);\n        }\n    } else if(hasX) {\n        defaultOrientation = 'h';\n        coerce('y0');\n        len = Lib.minRowLength(x);\n    } else {\n        traceOut.visible = false;\n        return;\n    }\n    traceOut._length = len;\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);\n\n    coerce('orientation', defaultOrientation);\n}\n\nfunction handlePointsDefaults(traceIn, traceOut, coerce, opts) {\n    var prefix = opts.prefix;\n\n    var outlierColorDflt = Lib.coerce2(traceIn, traceOut, attributes, 'marker.outliercolor');\n    var lineoutliercolor = coerce('marker.line.outliercolor');\n\n    var points = coerce(\n        prefix + 'points',\n        (outlierColorDflt || lineoutliercolor) ? 'suspectedoutliers' : undefined\n    );\n\n    if(points) {\n        coerce('jitter', points === 'all' ? 0.3 : 0);\n        coerce('pointpos', points === 'all' ? -1.5 : 0);\n\n        coerce('marker.symbol');\n        coerce('marker.opacity');\n        coerce('marker.size');\n        coerce('marker.color', traceOut.line.color);\n        coerce('marker.line.color');\n        coerce('marker.line.width');\n\n        if(points === 'suspectedoutliers') {\n            coerce('marker.line.outliercolor', traceOut.marker.color);\n            coerce('marker.line.outlierwidth');\n        }\n\n        coerce('selected.marker.color');\n        coerce('unselected.marker.color');\n        coerce('selected.marker.size');\n        coerce('unselected.marker.size');\n\n        coerce('text');\n        coerce('hovertext');\n    } else {\n        delete traceOut.marker;\n    }\n\n    var hoveron = coerce('hoveron');\n    if(hoveron === 'all' || hoveron.indexOf('points') !== -1) {\n        coerce('hovertemplate');\n    }\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n}\n\nfunction crossTraceDefaults(fullData, fullLayout) {\n    var traceIn, traceOut;\n\n    function coerce(attr) {\n        return Lib.coerce(traceOut._input, traceOut, attributes, attr);\n    }\n\n    for(var i = 0; i < fullData.length; i++) {\n        traceOut = fullData[i];\n        var traceType = traceOut.type;\n\n        if(traceType === 'box' || traceType === 'violin') {\n            traceIn = traceOut._input;\n            if(fullLayout[traceType + 'mode'] === 'group') {\n                handleGroupingDefaults(traceIn, traceOut, fullLayout, coerce);\n            }\n        }\n    }\n}\n\nmodule.exports = {\n    supplyDefaults: supplyDefaults,\n    crossTraceDefaults: crossTraceDefaults,\n\n    handleSampleDefaults: handleSampleDefaults,\n    handlePointsDefaults: handlePointsDefaults\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../registry\":831,\"../bar/defaults\":845,\"./attributes\":864}],868:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function eventData(out, pt) {\n    // Note: hoverOnBox property is needed for click-to-select\n    // to ignore when a box was clicked. This is the reason box\n    // implements this custom eventData function.\n    if(pt.hoverOnBox) out.hoverOnBox = pt.hoverOnBox;\n\n    if('xVal' in pt) out.x = pt.xVal;\n    if('yVal' in pt) out.y = pt.yVal;\n    if(pt.xa) out.xaxis = pt.xa;\n    if(pt.ya) out.yaxis = pt.ya;\n\n    return out;\n};\n\n},{}],869:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\nvar Fx = _dereq_('../../components/fx');\nvar Color = _dereq_('../../components/color');\nvar fillText = Lib.fillText;\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var hoveron = trace.hoveron;\n    var closeBoxData = [];\n    var closePtData;\n\n    if(hoveron.indexOf('boxes') !== -1) {\n        closeBoxData = closeBoxData.concat(hoverOnBoxes(pointData, xval, yval, hovermode));\n    }\n\n    if(hoveron.indexOf('points') !== -1) {\n        closePtData = hoverOnPoints(pointData, xval, yval);\n    }\n\n    // If there's a point in range and hoveron has points, show the best single point only.\n    // If hoveron has boxes and there's no point in range (or hoveron doesn't have points), show the box stats.\n    if(hovermode === 'closest') {\n        if(closePtData) return [closePtData];\n        return closeBoxData;\n    }\n\n    // Otherwise in compare mode, allow a point AND the box stats to be labeled\n    // If there are multiple boxes in range (ie boxmode = 'overlay') we'll see stats for all of them.\n    if(closePtData) {\n        closeBoxData.push(closePtData);\n        return closeBoxData;\n    }\n    return closeBoxData;\n}\n\nfunction hoverOnBoxes(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var trace = cd[0].trace;\n    var t = cd[0].t;\n    var isViolin = trace.type === 'violin';\n    var closeBoxData = [];\n\n    var pLetter, vLetter, pAxis, vAxis, vVal, pVal, dx, dy, dPos,\n        hoverPseudoDistance, spikePseudoDistance;\n\n    var boxDelta = t.bdPos;\n    var boxDeltaPos, boxDeltaNeg;\n    var posAcceptance = t.wHover;\n    var shiftPos = function(di) { return di.pos + t.bPos - pVal; };\n\n    if(isViolin && trace.side !== 'both') {\n        if(trace.side === 'positive') {\n            dPos = function(di) {\n                var pos = shiftPos(di);\n                return Fx.inbox(pos, pos + posAcceptance, hoverPseudoDistance);\n            };\n            boxDeltaPos = boxDelta;\n            boxDeltaNeg = 0;\n        }\n        if(trace.side === 'negative') {\n            dPos = function(di) {\n                var pos = shiftPos(di);\n                return Fx.inbox(pos - posAcceptance, pos, hoverPseudoDistance);\n            };\n            boxDeltaPos = 0;\n            boxDeltaNeg = boxDelta;\n        }\n    } else {\n        dPos = function(di) {\n            var pos = shiftPos(di);\n            return Fx.inbox(pos - posAcceptance, pos + posAcceptance, hoverPseudoDistance);\n        };\n        boxDeltaPos = boxDeltaNeg = boxDelta;\n    }\n\n    var dVal;\n\n    if(isViolin) {\n        dVal = function(di) {\n            return Fx.inbox(di.span[0] - vVal, di.span[1] - vVal, hoverPseudoDistance);\n        };\n    } else {\n        dVal = function(di) {\n            return Fx.inbox(di.min - vVal, di.max - vVal, hoverPseudoDistance);\n        };\n    }\n\n    if(trace.orientation === 'h') {\n        vVal = xval;\n        pVal = yval;\n        dx = dVal;\n        dy = dPos;\n        pLetter = 'y';\n        pAxis = ya;\n        vLetter = 'x';\n        vAxis = xa;\n    } else {\n        vVal = yval;\n        pVal = xval;\n        dx = dPos;\n        dy = dVal;\n        pLetter = 'x';\n        pAxis = xa;\n        vLetter = 'y';\n        vAxis = ya;\n    }\n\n    // if two boxes are overlaying, let the narrowest one win\n    var pseudoDistance = Math.min(1, boxDelta / Math.abs(pAxis.r2c(pAxis.range[1]) - pAxis.r2c(pAxis.range[0])));\n    hoverPseudoDistance = pointData.maxHoverDistance - pseudoDistance;\n    spikePseudoDistance = pointData.maxSpikeDistance - pseudoDistance;\n\n    function dxy(di) { return (dx(di) + dy(di)) / 2; }\n    var distfn = Fx.getDistanceFunction(hovermode, dx, dy, dxy);\n    Fx.getClosest(cd, distfn, pointData);\n\n    // skip the rest (for this trace) if we didn't find a close point\n    // and create the item(s) in closedata for this point\n    if(pointData.index === false) return [];\n\n    var di = cd[pointData.index];\n    var lc = trace.line.color;\n    var mc = (trace.marker || {}).color;\n\n    if(Color.opacity(lc) && trace.line.width) pointData.color = lc;\n    else if(Color.opacity(mc) && trace.boxpoints) pointData.color = mc;\n    else pointData.color = trace.fillcolor;\n\n    pointData[pLetter + '0'] = pAxis.c2p(di.pos + t.bPos - boxDeltaNeg, true);\n    pointData[pLetter + '1'] = pAxis.c2p(di.pos + t.bPos + boxDeltaPos, true);\n\n    pointData[pLetter + 'LabelVal'] = di.pos;\n\n    var spikePosAttr = pLetter + 'Spike';\n    pointData.spikeDistance = dxy(di) * spikePseudoDistance / hoverPseudoDistance;\n    pointData[spikePosAttr] = pAxis.c2p(di.pos, true);\n\n    // box plots: each \"point\" gets many labels\n    var usedVals = {};\n    var attrs = ['med', 'min', 'q1', 'q3', 'max'];\n\n    if(trace.boxmean || (trace.meanline || {}).visible) {\n        attrs.push('mean');\n    }\n    if(trace.boxpoints || trace.points) {\n        attrs.push('lf', 'uf');\n    }\n\n    for(var i = 0; i < attrs.length; i++) {\n        var attr = attrs[i];\n\n        if(!(attr in di) || (di[attr] in usedVals)) continue;\n        usedVals[di[attr]] = true;\n\n        // copy out to a new object for each value to label\n        var val = di[attr];\n        var valPx = vAxis.c2p(val, true);\n        var pointData2 = Lib.extendFlat({}, pointData);\n\n        pointData2[vLetter + '0'] = pointData2[vLetter + '1'] = valPx;\n        pointData2[vLetter + 'LabelVal'] = val;\n        pointData2[vLetter + 'Label'] = (t.labels ? t.labels[attr] + ' ' : '') + Axes.hoverLabelText(vAxis, val);\n\n        // Note: introduced to be able to distinguish a\n        // clicked point from a box during click-to-select\n        pointData2.hoverOnBox = true;\n\n        if(attr === 'mean' && ('sd' in di) && trace.boxmean === 'sd') {\n            pointData2[vLetter + 'err'] = di.sd;\n        }\n\n        // only keep name and spikes on the first item (median)\n        pointData.name = '';\n        pointData.spikeDistance = undefined;\n        pointData[spikePosAttr] = undefined;\n\n        // no hovertemplate support yet\n        pointData2.hovertemplate = false;\n\n        closeBoxData.push(pointData2);\n    }\n\n    return closeBoxData;\n}\n\nfunction hoverOnPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var trace = cd[0].trace;\n    var xPx = xa.c2p(xval);\n    var yPx = ya.c2p(yval);\n    var closePtData;\n\n    var dx = function(di) {\n        var rad = Math.max(3, di.mrc || 0);\n        return Math.max(Math.abs(xa.c2p(di.x) - xPx) - rad, 1 - 3 / rad);\n    };\n    var dy = function(di) {\n        var rad = Math.max(3, di.mrc || 0);\n        return Math.max(Math.abs(ya.c2p(di.y) - yPx) - rad, 1 - 3 / rad);\n    };\n    var distfn = Fx.quadrature(dx, dy);\n\n    // show one point per trace\n    var ijClosest = false;\n    var di, pt;\n\n    for(var i = 0; i < cd.length; i++) {\n        di = cd[i];\n\n        for(var j = 0; j < (di.pts || []).length; j++) {\n            pt = di.pts[j];\n\n            var newDistance = distfn(pt);\n            if(newDistance <= pointData.distance) {\n                pointData.distance = newDistance;\n                ijClosest = [i, j];\n            }\n        }\n    }\n\n    if(!ijClosest) return false;\n\n    di = cd[ijClosest[0]];\n    pt = di.pts[ijClosest[1]];\n\n    var xc = xa.c2p(pt.x, true);\n    var yc = ya.c2p(pt.y, true);\n    var rad = pt.mrc || 1;\n\n    closePtData = Lib.extendFlat({}, pointData, {\n        // corresponds to index in x/y input data array\n        index: pt.i,\n        color: (trace.marker || {}).color,\n        name: trace.name,\n        x0: xc - rad,\n        x1: xc + rad,\n        y0: yc - rad,\n        y1: yc + rad,\n        spikeDistance: pointData.distance,\n        hovertemplate: trace.hovertemplate\n    });\n\n    var pa;\n    if(trace.orientation === 'h') {\n        pa = ya;\n        closePtData.xLabelVal = pt.x;\n        closePtData.yLabelVal = di.pos;\n    } else {\n        pa = xa;\n        closePtData.xLabelVal = di.pos;\n        closePtData.yLabelVal = pt.y;\n    }\n\n    var pLetter = pa._id.charAt(0);\n    closePtData[pLetter + 'Spike'] = pa.c2p(di.pos, true);\n\n    fillText(pt, trace, closePtData);\n\n    return closePtData;\n}\n\nmodule.exports = {\n    hoverPoints: hoverPoints,\n    hoverOnBoxes: hoverOnBoxes,\n    hoverOnPoints: hoverOnPoints\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../lib\":703,\"../../plots/cartesian/axes\":751}],870:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    crossTraceDefaults: _dereq_('./defaults').crossTraceDefaults,\n    supplyLayoutDefaults: _dereq_('./layout_defaults').supplyLayoutDefaults,\n    calc: _dereq_('./calc'),\n    crossTraceCalc: _dereq_('./cross_trace_calc').crossTraceCalc,\n    plot: _dereq_('./plot').plot,\n    style: _dereq_('./style').style,\n    styleOnSelect: _dereq_('./style').styleOnSelect,\n    hoverPoints: _dereq_('./hover').hoverPoints,\n    eventData: _dereq_('./event_data'),\n    selectPoints: _dereq_('./select'),\n\n    moduleType: 'trace',\n    name: 'box',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'symbols', 'oriented', 'box-violin', 'showLegend', 'boxLayout', 'zoomScale'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"./attributes\":864,\"./calc\":865,\"./cross_trace_calc\":866,\"./defaults\":867,\"./event_data\":868,\"./hover\":869,\"./layout_attributes\":871,\"./layout_defaults\":872,\"./plot\":873,\"./select\":874,\"./style\":875}],871:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    boxmode: {\n        valType: 'enumerated',\n        values: ['group', 'overlay'],\n        dflt: 'overlay',\n        \n        editType: 'calc',\n        \n    },\n    boxgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0.3,\n        \n        editType: 'calc',\n        \n    },\n    boxgroupgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0.3,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],872:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nfunction _supply(layoutIn, layoutOut, fullData, coerce, traceType) {\n    var category = traceType + 'Layout';\n    var hasTraceType = false;\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n\n        if(Registry.traceIs(trace, category)) {\n            hasTraceType = true;\n            break;\n        }\n    }\n    if(!hasTraceType) return;\n\n    coerce(traceType + 'mode');\n    coerce(traceType + 'gap');\n    coerce(traceType + 'groupgap');\n}\n\nfunction supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n    _supply(layoutIn, layoutOut, fullData, coerce, 'box');\n}\n\nmodule.exports = {\n    supplyLayoutDefaults: supplyLayoutDefaults,\n    _supply: _supply\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"./layout_attributes\":871}],873:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\n\n// constants for dynamic jitter (ie less jitter for sparser points)\nvar JITTERCOUNT = 5; // points either side of this to include\nvar JITTERSPREAD = 0.01; // fraction of IQR to count as \"dense\"\n\nfunction plot(gd, plotinfo, cdbox, boxLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(boxLayer, cdbox, 'trace boxes').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var t = cd0.t;\n        var trace = cd0.trace;\n        if(!plotinfo.isRangePlot) cd0.node3 = plotGroup;\n\n        // whisker width\n        t.wdPos = t.bdPos * trace.whiskerwidth;\n\n        if(trace.visible !== true || t.empty) {\n            plotGroup.remove();\n            return;\n        }\n\n        var posAxis, valAxis;\n\n        if(trace.orientation === 'h') {\n            posAxis = ya;\n            valAxis = xa;\n        } else {\n            posAxis = xa;\n            valAxis = ya;\n        }\n\n        plotBoxAndWhiskers(plotGroup, {pos: posAxis, val: valAxis}, trace, t);\n        plotPoints(plotGroup, {x: xa, y: ya}, trace, t);\n        plotBoxMean(plotGroup, {pos: posAxis, val: valAxis}, trace, t);\n    });\n}\n\nfunction plotBoxAndWhiskers(sel, axes, trace, t) {\n    var posAxis = axes.pos;\n    var valAxis = axes.val;\n    var bPos = t.bPos;\n    var wdPos = t.wdPos || 0;\n    var bPosPxOffset = t.bPosPxOffset || 0;\n    var whiskerWidth = trace.whiskerwidth || 0;\n    var notched = trace.notched || false;\n    var nw = notched ? 1 - 2 * trace.notchwidth : 1;\n\n    // to support for one-sided box\n    var bdPos0;\n    var bdPos1;\n    if(Array.isArray(t.bdPos)) {\n        bdPos0 = t.bdPos[0];\n        bdPos1 = t.bdPos[1];\n    } else {\n        bdPos0 = t.bdPos;\n        bdPos1 = t.bdPos;\n    }\n\n    var paths = sel.selectAll('path.box').data((\n        trace.type !== 'violin' ||\n        trace.box.visible\n    ) ? Lib.identity : []);\n\n    paths.enter().append('path')\n        .style('vector-effect', 'non-scaling-stroke')\n        .attr('class', 'box');\n\n    paths.exit().remove();\n\n    paths.each(function(d) {\n        if(d.empty) return 'M0,0Z';\n\n        var pos = d.pos;\n        var posc = posAxis.c2p(pos + bPos, true) + bPosPxOffset;\n        var pos0 = posAxis.c2p(pos + bPos - bdPos0, true) + bPosPxOffset;\n        var pos1 = posAxis.c2p(pos + bPos + bdPos1, true) + bPosPxOffset;\n        var posw0 = posAxis.c2p(pos + bPos - wdPos, true) + bPosPxOffset;\n        var posw1 = posAxis.c2p(pos + bPos + wdPos, true) + bPosPxOffset;\n        var posm0 = posAxis.c2p(pos + bPos - bdPos0 * nw, true) + bPosPxOffset;\n        var posm1 = posAxis.c2p(pos + bPos + bdPos1 * nw, true) + bPosPxOffset;\n        var q1 = valAxis.c2p(d.q1, true);\n        var q3 = valAxis.c2p(d.q3, true);\n        // make sure median isn't identical to either of the\n        // quartiles, so we can see it\n        var m = Lib.constrain(\n            valAxis.c2p(d.med, true),\n            Math.min(q1, q3) + 1, Math.max(q1, q3) - 1\n        );\n\n        // for compatibility with box, violin, and candlestick\n        // perhaps we should put this into cd0.t instead so it's more explicit,\n        // but what we have now is:\n        // - box always has d.lf, but boxpoints can be anything\n        // - violin has d.lf and should always use it (boxpoints is undefined)\n        // - candlestick has only min/max\n        var useExtremes = (d.lf === undefined) || (trace.boxpoints === false);\n        var lf = valAxis.c2p(useExtremes ? d.min : d.lf, true);\n        var uf = valAxis.c2p(useExtremes ? d.max : d.uf, true);\n        var ln = valAxis.c2p(d.ln, true);\n        var un = valAxis.c2p(d.un, true);\n\n        if(trace.orientation === 'h') {\n            d3.select(this).attr('d',\n                'M' + m + ',' + posm0 + 'V' + posm1 + // median line\n                'M' + q1 + ',' + pos0 + 'V' + pos1 + // left edge\n                (notched ? 'H' + ln + 'L' + m + ',' + posm1 + 'L' + un + ',' + pos1 : '') + // top notched edge\n                'H' + q3 + // end of the top edge\n                'V' + pos0 + // right edge\n                (notched ? 'H' + un + 'L' + m + ',' + posm0 + 'L' + ln + ',' + pos0 : '') + // bottom notched edge\n                'Z' + // end of the box\n                'M' + q1 + ',' + posc + 'H' + lf + 'M' + q3 + ',' + posc + 'H' + uf + // whiskers\n                ((whiskerWidth === 0) ? '' : // whisker caps\n                    'M' + lf + ',' + posw0 + 'V' + posw1 + 'M' + uf + ',' + posw0 + 'V' + posw1));\n        } else {\n            d3.select(this).attr('d',\n                'M' + posm0 + ',' + m + 'H' + posm1 + // median line\n                'M' + pos0 + ',' + q1 + 'H' + pos1 + // top of the box\n                (notched ? 'V' + ln + 'L' + posm1 + ',' + m + 'L' + pos1 + ',' + un : '') + // notched right edge\n                'V' + q3 + // end of the right edge\n                'H' + pos0 + // bottom of the box\n                (notched ? 'V' + un + 'L' + posm0 + ',' + m + 'L' + pos0 + ',' + ln : '') + // notched left edge\n                'Z' + // end of the box\n                'M' + posc + ',' + q1 + 'V' + lf + 'M' + posc + ',' + q3 + 'V' + uf + // whiskers\n                ((whiskerWidth === 0) ? '' : // whisker caps\n                    'M' + posw0 + ',' + lf + 'H' + posw1 + 'M' + posw0 + ',' + uf + 'H' + posw1));\n        }\n    });\n}\n\nfunction plotPoints(sel, axes, trace, t) {\n    var xa = axes.x;\n    var ya = axes.y;\n    var bdPos = t.bdPos;\n    var bPos = t.bPos;\n\n    // to support violin points\n    var mode = trace.boxpoints || trace.points;\n\n    // repeatable pseudo-random number generator\n    Lib.seedPseudoRandom();\n\n    // since box plot points get an extra level of nesting, each\n    // box needs the trace styling info\n    var fn = function(d) {\n        d.forEach(function(v) {\n            v.t = t;\n            v.trace = trace;\n        });\n        return d;\n    };\n\n    var gPoints = sel.selectAll('g.points')\n        .data(mode ? fn : []);\n\n    gPoints.enter().append('g')\n        .attr('class', 'points');\n\n    gPoints.exit().remove();\n\n    var paths = gPoints.selectAll('path')\n        .data(function(d) {\n            var i;\n            var pts = d.pts2;\n\n            // normally use IQR, but if this is 0 or too small, use max-min\n            var typicalSpread = Math.max((d.max - d.min) / 10, d.q3 - d.q1);\n            var minSpread = typicalSpread * 1e-9;\n            var spreadLimit = typicalSpread * JITTERSPREAD;\n            var jitterFactors = [];\n            var maxJitterFactor = 0;\n            var newJitter;\n\n            // dynamic jitter\n            if(trace.jitter) {\n                if(typicalSpread === 0) {\n                    // edge case of no spread at all: fall back to max jitter\n                    maxJitterFactor = 1;\n                    jitterFactors = new Array(pts.length);\n                    for(i = 0; i < pts.length; i++) {\n                        jitterFactors[i] = 1;\n                    }\n                } else {\n                    for(i = 0; i < pts.length; i++) {\n                        var i0 = Math.max(0, i - JITTERCOUNT);\n                        var pmin = pts[i0].v;\n                        var i1 = Math.min(pts.length - 1, i + JITTERCOUNT);\n                        var pmax = pts[i1].v;\n\n                        if(mode !== 'all') {\n                            if(pts[i].v < d.lf) pmax = Math.min(pmax, d.lf);\n                            else pmin = Math.max(pmin, d.uf);\n                        }\n\n                        var jitterFactor = Math.sqrt(spreadLimit * (i1 - i0) / (pmax - pmin + minSpread)) || 0;\n                        jitterFactor = Lib.constrain(Math.abs(jitterFactor), 0, 1);\n\n                        jitterFactors.push(jitterFactor);\n                        maxJitterFactor = Math.max(jitterFactor, maxJitterFactor);\n                    }\n                }\n                newJitter = trace.jitter * 2 / (maxJitterFactor || 1);\n            }\n\n            // fills in 'x' and 'y' in calcdata 'pts' item\n            for(i = 0; i < pts.length; i++) {\n                var pt = pts[i];\n                var v = pt.v;\n\n                var jitterOffset = trace.jitter ?\n                    (newJitter * jitterFactors[i] * (Lib.pseudoRandom() - 0.5)) :\n                    0;\n\n                var posPx = d.pos + bPos + bdPos * (trace.pointpos + jitterOffset);\n\n                if(trace.orientation === 'h') {\n                    pt.y = posPx;\n                    pt.x = v;\n                } else {\n                    pt.x = posPx;\n                    pt.y = v;\n                }\n\n                // tag suspected outliers\n                if(mode === 'suspectedoutliers' && v < d.uo && v > d.lo) {\n                    pt.so = true;\n                }\n            }\n\n            return pts;\n        });\n\n    paths.enter().append('path')\n        .classed('point', true);\n\n    paths.exit().remove();\n\n    paths.call(Drawing.translatePoints, xa, ya);\n}\n\nfunction plotBoxMean(sel, axes, trace, t) {\n    var posAxis = axes.pos;\n    var valAxis = axes.val;\n    var bPos = t.bPos;\n    var bPosPxOffset = t.bPosPxOffset || 0;\n\n    // to support violin mean lines\n    var mode = trace.boxmean || (trace.meanline || {}).visible;\n\n    // to support for one-sided box\n    var bdPos0;\n    var bdPos1;\n    if(Array.isArray(t.bdPos)) {\n        bdPos0 = t.bdPos[0];\n        bdPos1 = t.bdPos[1];\n    } else {\n        bdPos0 = t.bdPos;\n        bdPos1 = t.bdPos;\n    }\n\n    var paths = sel.selectAll('path.mean').data((\n        (trace.type === 'box' && trace.boxmean) ||\n        (trace.type === 'violin' && trace.box.visible && trace.meanline.visible)\n    ) ? Lib.identity : []);\n\n    paths.enter().append('path')\n        .attr('class', 'mean')\n        .style({\n            fill: 'none',\n            'vector-effect': 'non-scaling-stroke'\n        });\n\n    paths.exit().remove();\n\n    paths.each(function(d) {\n        var posc = posAxis.c2p(d.pos + bPos, true) + bPosPxOffset;\n        var pos0 = posAxis.c2p(d.pos + bPos - bdPos0, true) + bPosPxOffset;\n        var pos1 = posAxis.c2p(d.pos + bPos + bdPos1, true) + bPosPxOffset;\n        var m = valAxis.c2p(d.mean, true);\n        var sl = valAxis.c2p(d.mean - d.sd, true);\n        var sh = valAxis.c2p(d.mean + d.sd, true);\n\n        if(trace.orientation === 'h') {\n            d3.select(this).attr('d',\n                'M' + m + ',' + pos0 + 'V' + pos1 +\n                (mode === 'sd' ?\n                    'm0,0L' + sl + ',' + posc + 'L' + m + ',' + pos0 + 'L' + sh + ',' + posc + 'Z' :\n                    '')\n            );\n        } else {\n            d3.select(this).attr('d',\n                'M' + pos0 + ',' + m + 'H' + pos1 +\n                (mode === 'sd' ?\n                    'm0,0L' + posc + ',' + sl + 'L' + pos0 + ',' + m + 'L' + posc + ',' + sh + 'Z' :\n                    '')\n            );\n        }\n    });\n}\n\nmodule.exports = {\n    plot: plot,\n    plotBoxAndWhiskers: plotBoxAndWhiskers,\n    plotPoints: plotPoints,\n    plotBoxMean: plotBoxMean\n};\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"d3\":157}],874:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n    var i, j;\n\n    if(selectionTester === false) {\n        for(i = 0; i < cd.length; i++) {\n            for(j = 0; j < (cd[i].pts || []).length; j++) {\n                // clear selection\n                cd[i].pts[j].selected = 0;\n            }\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            for(j = 0; j < (cd[i].pts || []).length; j++) {\n                var pt = cd[i].pts[j];\n                var x = xa.c2p(pt.x);\n                var y = ya.c2p(pt.y);\n\n                if(selectionTester.contains([x, y], null, pt.i, searchInfo)) {\n                    selection.push({\n                        pointNumber: pt.i,\n                        x: xa.c2d(pt.x),\n                        y: ya.c2d(pt.y)\n                    });\n                    pt.selected = 1;\n                } else {\n                    pt.selected = 0;\n                }\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{}],875:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\n\nfunction style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.trace.boxes');\n\n    s.style('opacity', function(d) { return d[0].trace.opacity; });\n\n    s.each(function(d) {\n        var el = d3.select(this);\n        var trace = d[0].trace;\n        var lineWidth = trace.line.width;\n\n        function styleBox(boxSel, lineWidth, lineColor, fillColor) {\n            boxSel.style('stroke-width', lineWidth + 'px')\n                .call(Color.stroke, lineColor)\n                .call(Color.fill, fillColor);\n        }\n\n        var allBoxes = el.selectAll('path.box');\n\n        if(trace.type === 'candlestick') {\n            allBoxes.each(function(boxData) {\n                if(boxData.empty) return;\n\n                var thisBox = d3.select(this);\n                var container = trace[boxData.dir]; // dir = 'increasing' or 'decreasing'\n                styleBox(thisBox, container.line.width, container.line.color, container.fillcolor);\n                // TODO: custom selection style for candlesticks\n                thisBox.style('opacity', trace.selectedpoints && !boxData.selected ? 0.3 : 1);\n            });\n        } else {\n            styleBox(allBoxes, lineWidth, trace.line.color, trace.fillcolor);\n            el.selectAll('path.mean')\n                .style({\n                    'stroke-width': lineWidth,\n                    'stroke-dasharray': (2 * lineWidth) + 'px,' + lineWidth + 'px'\n                })\n                .call(Color.stroke, trace.line.color);\n\n            var pts = el.selectAll('path.point');\n            Drawing.pointStyle(pts, trace, gd);\n        }\n    });\n}\n\nfunction styleOnSelect(gd, cd) {\n    var s = cd[0].node3;\n    var trace = cd[0].trace;\n    var pts = s.selectAll('path.point');\n\n    if(trace.selectedpoints) {\n        Drawing.selectedPointStyle(pts, trace);\n    } else {\n        Drawing.pointStyle(pts, trace, gd);\n    }\n}\n\nmodule.exports = {\n    style: style,\n    styleOnSelect: styleOnSelect\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"d3\":157}],876:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar extendFlat = _dereq_('../../lib').extendFlat;\nvar OHLCattrs = _dereq_('../ohlc/attributes');\nvar boxAttrs = _dereq_('../box/attributes');\n\nfunction directionAttrs(lineColorDefault) {\n    return {\n        line: {\n            color: extendFlat({}, boxAttrs.line.color, {dflt: lineColorDefault}),\n            width: boxAttrs.line.width,\n            editType: 'style'\n        },\n\n        fillcolor: boxAttrs.fillcolor,\n        editType: 'style'\n    };\n}\n\nmodule.exports = {\n    x: OHLCattrs.x,\n    open: OHLCattrs.open,\n    high: OHLCattrs.high,\n    low: OHLCattrs.low,\n    close: OHLCattrs.close,\n\n    line: {\n        width: extendFlat({}, boxAttrs.line.width, {\n            \n        }),\n        editType: 'style'\n    },\n\n    increasing: directionAttrs(OHLCattrs.increasing.line.color.dflt),\n\n    decreasing: directionAttrs(OHLCattrs.decreasing.line.color.dflt),\n\n    text: OHLCattrs.text,\n    hovertext: OHLCattrs.hovertext,\n    whiskerwidth: extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }),\n\n    hoverlabel: OHLCattrs.hoverlabel,\n};\n\n},{\"../../lib\":703,\"../box/attributes\":864,\"../ohlc/attributes\":1022}],877:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar calcCommon = _dereq_('../ohlc/calc').calcCommon;\n\nmodule.exports = function(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var xa = Axes.getFromId(gd, trace.xaxis);\n    var ya = Axes.getFromId(gd, trace.yaxis);\n\n    var x = xa.makeCalcdata(trace, 'x');\n\n    var cd = calcCommon(gd, trace, x, ya, ptFunc);\n\n    if(cd.length) {\n        Lib.extendFlat(cd[0].t, {\n            num: fullLayout._numBoxes,\n            dPos: Lib.distinctVals(x).minDiff / 2,\n            posLetter: 'x',\n            valLetter: 'y',\n        });\n\n        fullLayout._numBoxes++;\n        return cd;\n    } else {\n        return [{t: {empty: true}}];\n    }\n};\n\nfunction ptFunc(o, h, l, c) {\n    return {\n        min: l,\n        q1: Math.min(o, c),\n        med: c,\n        q3: Math.max(o, c),\n        max: h,\n    };\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../ohlc/calc\":1023}],878:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\nvar handleOHLC = _dereq_('../ohlc/ohlc_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleOHLC(traceIn, traceOut, coerce, layout);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('line.width');\n\n    handleDirection(traceIn, traceOut, coerce, 'increasing');\n    handleDirection(traceIn, traceOut, coerce, 'decreasing');\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('whiskerwidth');\n\n    layout._requestRangeslider[traceOut.xaxis] = true;\n};\n\nfunction handleDirection(traceIn, traceOut, coerce, direction) {\n    var lineColor = coerce(direction + '.line.color');\n    coerce(direction + '.line.width', traceOut.line.width);\n    coerce(direction + '.fillcolor', Color.addOpacity(lineColor, 0.5));\n}\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../ohlc/ohlc_defaults\":1027,\"./attributes\":876}],879:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'candlestick',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'showLegend', 'candlestick', 'boxLayout'],\n    meta: {\n        \n    },\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('../box/layout_attributes'),\n    supplyLayoutDefaults: _dereq_('../box/layout_defaults').supplyLayoutDefaults,\n    crossTraceCalc: _dereq_('../box/cross_trace_calc').crossTraceCalc,\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('../box/plot').plot,\n    layerName: 'boxlayer',\n    style: _dereq_('../box/style').style,\n    hoverPoints: _dereq_('../ohlc/hover').hoverPoints,\n    selectPoints: _dereq_('../ohlc/select')\n};\n\n},{\"../../plots/cartesian\":762,\"../box/cross_trace_calc\":866,\"../box/layout_attributes\":871,\"../box/layout_defaults\":872,\"../box/plot\":873,\"../box/style\":875,\"../ohlc/hover\":1025,\"../ohlc/select\":1029,\"./attributes\":876,\"./calc\":877,\"./defaults\":878}],880:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar handleAxisDefaults = _dereq_('./axis_defaults');\nvar Template = _dereq_('../../plot_api/plot_template');\n\nmodule.exports = function handleABDefaults(traceIn, traceOut, fullLayout, coerce, dfltColor) {\n    var a = coerce('a');\n\n    if(!a) {\n        coerce('da');\n        coerce('a0');\n    }\n\n    var b = coerce('b');\n\n    if(!b) {\n        coerce('db');\n        coerce('b0');\n    }\n\n    mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor);\n};\n\nfunction mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) {\n    var axesList = ['aaxis', 'baxis'];\n\n    axesList.forEach(function(axName) {\n        var axLetter = axName.charAt(0);\n        var axIn = traceIn[axName] || {};\n        var axOut = Template.newContainer(traceOut, axName);\n\n        var defaultOptions = {\n            tickfont: 'x',\n            id: axLetter + 'axis',\n            letter: axLetter,\n            font: traceOut.font,\n            name: axName,\n            data: traceIn[axLetter],\n            calendar: traceOut.calendar,\n            dfltColor: dfltColor,\n            bgColor: fullLayout.paper_bgcolor,\n            fullLayout: fullLayout\n        };\n\n        handleAxisDefaults(axIn, axOut, defaultOptions);\n        axOut._categories = axOut._categories || [];\n\n        // so we don't have to repeat autotype unnecessarily,\n        // copy an autotype back to traceIn\n        if(!traceIn[axName] && axIn.type !== '-') {\n            traceIn[axName] = {type: axIn.type};\n        }\n    });\n}\n\n},{\"../../plot_api/plot_template\":741,\"./axis_defaults\":885}],881:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\nmodule.exports = function(a) {\n    return minMax(a, 0);\n};\n\nfunction minMax(a, depth) {\n    // Limit to ten dimensional datasets. This seems *exceedingly* unlikely to\n    // ever cause problems or even be a concern. It's include strictly so that\n    // circular arrays could never cause this to loop.\n    if(!isArrayOrTypedArray(a) || depth >= 10) {\n        return null;\n    }\n\n    var min = Infinity;\n    var max = -Infinity;\n    var n = a.length;\n    for(var i = 0; i < n; i++) {\n        var datum = a[i];\n\n        if(isArrayOrTypedArray(datum)) {\n            var result = minMax(datum, depth + 1);\n\n            if(result) {\n                min = Math.min(result[0], min);\n                max = Math.max(result[1], max);\n            }\n        } else {\n            min = Math.min(datum, min);\n            max = Math.max(datum, max);\n        }\n    }\n\n    return [min, max];\n}\n\n},{\"../../lib\":703}],882:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar axisAttrs = _dereq_('./axis_attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\n\nvar carpetFont = fontAttrs({\n    editType: 'calc',\n    \n});\n// TODO: inherit from global font\ncarpetFont.family.dflt = '\"Open Sans\", verdana, arial, sans-serif';\ncarpetFont.size.dflt = 12;\ncarpetFont.color.dflt = colorAttrs.defaultLine;\n\nmodule.exports = {\n    carpet: {\n        valType: 'string',\n        \n        editType: 'calc',\n        \n    },\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    a: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    a0: {\n        valType: 'number',\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    da: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    b: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    b0: {\n        valType: 'number',\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    db: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    cheaterslope: {\n        valType: 'number',\n        \n        dflt: 1,\n        editType: 'calc',\n        \n    },\n    aaxis: axisAttrs,\n    baxis: axisAttrs,\n    font: carpetFont,\n    color: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'plot',\n        \n    },\n    transforms: undefined\n};\n\n},{\"../../components/color/attributes\":579,\"../../plots/font_attributes\":777,\"./axis_attributes\":884}],883:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\n/* This function retrns a set of control points that define a curve aligned along\n * either the a or b axis. Exactly one of a or b must be an array defining the range\n * spanned.\n *\n * Honestly this is the most complicated function I've implemente here so far because\n * of the way it handles knot insertion and direction/axis-agnostic slices.\n */\nmodule.exports = function(carpet, carpetcd, a, b) {\n    var idx, tangent, tanIsoIdx, tanIsoPar, segment, refidx;\n    var p0, p1, v0, v1, start, end, range;\n\n    var axis = isArrayOrTypedArray(a) ? 'a' : 'b';\n    var ax = axis === 'a' ? carpet.aaxis : carpet.baxis;\n    var smoothing = ax.smoothing;\n    var toIdx = axis === 'a' ? carpet.a2i : carpet.b2j;\n    var pt = axis === 'a' ? a : b;\n    var iso = axis === 'a' ? b : a;\n    var n = axis === 'a' ? carpetcd.a.length : carpetcd.b.length;\n    var m = axis === 'a' ? carpetcd.b.length : carpetcd.a.length;\n    var isoIdx = Math.floor(axis === 'a' ? carpet.b2j(iso) : carpet.a2i(iso));\n\n    var xy = axis === 'a' ? function(value) {\n        return carpet.evalxy([], value, isoIdx);\n    } : function(value) {\n        return carpet.evalxy([], isoIdx, value);\n    };\n\n    if(smoothing) {\n        tanIsoIdx = Math.max(0, Math.min(m - 2, isoIdx));\n        tanIsoPar = isoIdx - tanIsoIdx;\n        tangent = axis === 'a' ? function(i, ti) {\n            return carpet.dxydi([], i, tanIsoIdx, ti, tanIsoPar);\n        } : function(j, tj) {\n            return carpet.dxydj([], tanIsoIdx, j, tanIsoPar, tj);\n        };\n    }\n\n    var vstart = toIdx(pt[0]);\n    var vend = toIdx(pt[1]);\n\n    // So that we can make this work in two directions, flip all of the\n    // math functions if the direction is from higher to lower indices:\n    //\n    // Note that the tolerance is directional!\n    var dir = vstart < vend ? 1 : -1;\n    var tol = (vend - vstart) * 1e-8;\n    var dirfloor = dir > 0 ? Math.floor : Math.ceil;\n    var dirceil = dir > 0 ? Math.ceil : Math.floor;\n    var dirmin = dir > 0 ? Math.min : Math.max;\n    var dirmax = dir > 0 ? Math.max : Math.min;\n\n    var idx0 = dirfloor(vstart + tol);\n    var idx1 = dirceil(vend - tol);\n\n    p0 = xy(vstart);\n    var segments = [[p0]];\n\n    for(idx = idx0; idx * dir < idx1 * dir; idx += dir) {\n        segment = [];\n        start = dirmax(vstart, idx);\n        end = dirmin(vend, idx + dir);\n        range = end - start;\n\n        // In order to figure out which cell we're in for the derivative (remember,\n        // the derivatives are *not* constant across grid lines), let's just average\n        // the start and end points. This cuts out just a tiny bit of logic and\n        // there's really no computational difference:\n        refidx = Math.max(0, Math.min(n - 2, Math.floor(0.5 * (start + end))));\n\n        p1 = xy(end);\n        if(smoothing) {\n            v0 = tangent(refidx, start - refidx);\n            v1 = tangent(refidx, end - refidx);\n\n            segment.push([\n                p0[0] + v0[0] / 3 * range,\n                p0[1] + v0[1] / 3 * range\n            ]);\n\n            segment.push([\n                p1[0] - v1[0] / 3 * range,\n                p1[1] - v1[1] / 3 * range\n            ]);\n        }\n\n        segment.push(p1);\n\n        segments.push(segment);\n        p0 = p1;\n    }\n\n    return segments;\n};\n\n},{\"../../lib\":703}],884:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar axesAttrs = _dereq_('../../plots/cartesian/layout_attributes');\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nmodule.exports = {\n    color: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n    smoothing: {\n        valType: 'number',\n        dflt: 1,\n        min: 0,\n        max: 1.3,\n        \n        editType: 'calc'\n    },\n    title: {\n        text: {\n            valType: 'string',\n            dflt: '',\n            \n            editType: 'calc',\n            \n        },\n        font: fontAttrs({\n            editType: 'calc',\n            \n        }),\n        offset: {\n            valType: 'number',\n            \n            dflt: 10,\n            editType: 'calc',\n            \n        },\n        editType: 'calc',\n    },\n    type: {\n        valType: 'enumerated',\n        // '-' means we haven't yet run autotype or couldn't find any data\n        // it gets turned into linear in gd._fullLayout but not copied back\n        // to gd.data like the others are.\n        values: ['-', 'linear', 'date', 'category'],\n        dflt: '-',\n        \n        editType: 'calc',\n        \n    },\n    autorange: {\n        valType: 'enumerated',\n        values: [true, false, 'reversed'],\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    rangemode: {\n        valType: 'enumerated',\n        values: ['normal', 'tozero', 'nonnegative'],\n        dflt: 'normal',\n        \n        editType: 'calc',\n        \n    },\n    range: {\n        valType: 'info_array',\n        \n        editType: 'calc',\n        items: [\n            {valType: 'any', editType: 'calc'},\n            {valType: 'any', editType: 'calc'}\n        ],\n        \n    },\n\n    fixedrange: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    cheatertype: {\n        valType: 'enumerated',\n        values: ['index', 'value'],\n        dflt: 'value',\n        \n        editType: 'calc'\n    },\n    tickmode: {\n        valType: 'enumerated',\n        values: ['linear', 'array'],\n        dflt: 'array',\n        \n        editType: 'calc'\n    },\n    nticks: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    tickvals: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    ticktext: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    showticklabels: {\n        valType: 'enumerated',\n        values: ['start', 'end', 'both', 'none'],\n        dflt: 'start',\n        \n        editType: 'calc',\n        \n    },\n    tickfont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n    tickangle: {\n        valType: 'angle',\n        dflt: 'auto',\n        \n        editType: 'calc',\n        \n    },\n    tickprefix: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    showtickprefix: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'calc',\n        \n    },\n    ticksuffix: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    showticksuffix: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'calc',\n        \n    },\n    showexponent: {\n        valType: 'enumerated',\n        values: ['all', 'first', 'last', 'none'],\n        dflt: 'all',\n        \n        editType: 'calc',\n        \n    },\n    exponentformat: {\n        valType: 'enumerated',\n        values: ['none', 'e', 'E', 'power', 'SI', 'B'],\n        dflt: 'B',\n        \n        editType: 'calc',\n        \n    },\n    separatethousands: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    tickformat: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    tickformatstops: overrideAll(axesAttrs.tickformatstops, 'calc', 'from-root'),\n    categoryorder: {\n        valType: 'enumerated',\n        values: [\n            'trace', 'category ascending', 'category descending', 'array'\n            /* , 'value ascending', 'value descending'*/ // value ascending / descending to be implemented later\n        ],\n        dflt: 'trace',\n        \n        editType: 'calc',\n        \n    },\n    categoryarray: {\n        valType: 'data_array',\n        \n        editType: 'calc',\n        \n    },\n    labelpadding: {\n        valType: 'integer',\n        \n        dflt: 10,\n        editType: 'calc',\n        \n    },\n    labelprefix: {\n        valType: 'string',\n        \n        editType: 'calc',\n        \n    },\n    labelsuffix: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    // lines and grids\n    showline: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    linecolor: {\n        valType: 'color',\n        dflt: colorAttrs.defaultLine,\n        \n        editType: 'calc',\n        \n    },\n    linewidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    gridcolor: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n    gridwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    showgrid: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc',\n        \n    },\n    minorgridcount: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    minorgridwidth: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    minorgridcolor: {\n        valType: 'color',\n        dflt: colorAttrs.lightLine,\n        \n        editType: 'calc',\n        \n    },\n    startline: {\n        valType: 'boolean',\n        \n        editType: 'calc',\n        \n    },\n    startlinecolor: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n    startlinewidth: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    endline: {\n        valType: 'boolean',\n        \n        editType: 'calc',\n        \n    },\n    endlinewidth: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    endlinecolor: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n    tick0: {\n        valType: 'number',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    dtick: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n    arraytick0: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    arraydtick: {\n        valType: 'integer',\n        min: 1,\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n\n    _deprecated: {\n        title: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        titlefont: fontAttrs({\n            editType: 'calc',\n            \n        }),\n        titleoffset: {\n            valType: 'number',\n            \n            dflt: 10,\n            editType: 'calc',\n            \n        }\n    },\n\n    editType: 'calc'\n};\n\n},{\"../../components/color/attributes\":579,\"../../plot_api/edit_types\":734,\"../../plots/cartesian/layout_attributes\":763,\"../../plots/font_attributes\":777}],885:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar carpetAttrs = _dereq_('./attributes');\n\nvar addOpacity = _dereq_('../../components/color').addOpacity;\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar handleTickValueDefaults = _dereq_('../../plots/cartesian/tick_value_defaults');\nvar handleTickLabelDefaults = _dereq_('../../plots/cartesian/tick_label_defaults');\nvar handleCategoryOrderDefaults = _dereq_('../../plots/cartesian/category_order_defaults');\nvar setConvert = _dereq_('../../plots/cartesian/set_convert');\nvar autoType = _dereq_('../../plots/cartesian/axis_autotype');\n\n/**\n * options: object containing:\n *\n *  letter: 'a' or 'b'\n *  title: name of the axis (ie 'Colorbar') to go in default title\n *  name: axis object name (ie 'xaxis') if one should be stored\n *  font: the default font to inherit\n *  outerTicks: boolean, should ticks default to outside?\n *  showGrid: boolean, should gridlines be shown by default?\n *  data: the plot data to use in choosing auto type\n *  bgColor: the plot background color, to calculate default gridline colors\n */\nmodule.exports = function handleAxisDefaults(containerIn, containerOut, options) {\n    var letter = options.letter;\n    var font = options.font || {};\n    var attributes = carpetAttrs[letter + 'axis'];\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);\n    }\n\n    function coerce2(attr, dflt) {\n        return Lib.coerce2(containerIn, containerOut, attributes, attr, dflt);\n    }\n\n    // set up some private properties\n    if(options.name) {\n        containerOut._name = options.name;\n        containerOut._id = options.name;\n    }\n\n    // now figure out type and do some more initialization\n    var axType = coerce('type');\n    if(axType === '-') {\n        if(options.data) setAutoType(containerOut, options.data);\n\n        if(containerOut.type === '-') {\n            containerOut.type = 'linear';\n        } else {\n            // copy autoType back to input axis\n            // note that if this object didn't exist\n            // in the input layout, we have to put it in\n            // this happens in the main supplyDefaults function\n            axType = containerIn.type = containerOut.type;\n        }\n    }\n\n    coerce('smoothing');\n    coerce('cheatertype');\n\n    coerce('showticklabels');\n    coerce('labelprefix', letter + ' = ');\n    coerce('labelsuffix');\n    coerce('showtickprefix');\n    coerce('showticksuffix');\n\n    coerce('separatethousands');\n    coerce('tickformat');\n    coerce('exponentformat');\n    coerce('showexponent');\n    coerce('categoryorder');\n\n    coerce('tickmode');\n    coerce('tickvals');\n    coerce('ticktext');\n    coerce('tick0');\n    coerce('dtick');\n\n    if(containerOut.tickmode === 'array') {\n        coerce('arraytick0');\n        coerce('arraydtick');\n    }\n\n    coerce('labelpadding');\n\n    containerOut._hovertitle = letter;\n\n\n    if(axType === 'date') {\n        var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults');\n        handleCalendarDefaults(containerIn, containerOut, 'calendar', options.calendar);\n    }\n\n    // we need some of the other functions setConvert attaches, but for\n    // path finding, override pixel scaling to simple passthrough (identity)\n    setConvert(containerOut, options.fullLayout);\n    containerOut.c2p = Lib.identity;\n\n    var dfltColor = coerce('color', options.dfltColor);\n    // if axis.color was provided, use it for fonts too; otherwise,\n    // inherit from global font color in case that was provided.\n    var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color;\n\n    var title = coerce('title.text');\n    if(title) {\n        Lib.coerceFont(coerce, 'title.font', {\n            family: font.family,\n            size: Math.round(font.size * 1.2),\n            color: dfltFontColor\n        });\n        coerce('title.offset');\n    }\n\n    coerce('tickangle');\n\n    var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range));\n\n    if(autoRange) coerce('rangemode');\n\n    coerce('range');\n    containerOut.cleanRange();\n\n    coerce('fixedrange');\n\n    handleTickValueDefaults(containerIn, containerOut, coerce, axType);\n    handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options);\n    handleCategoryOrderDefaults(containerIn, containerOut, coerce, {\n        data: options.data,\n        dataAttr: letter\n    });\n\n    var gridColor = coerce2('gridcolor', addOpacity(dfltColor, 0.3));\n    var gridWidth = coerce2('gridwidth');\n    var showGrid = coerce('showgrid');\n\n    if(!showGrid) {\n        delete containerOut.gridcolor;\n        delete containerOut.gridwidth;\n    }\n\n    var startLineColor = coerce2('startlinecolor', dfltColor);\n    var startLineWidth = coerce2('startlinewidth', gridWidth);\n    var showStartLine = coerce('startline', containerOut.showgrid || !!startLineColor || !!startLineWidth);\n\n    if(!showStartLine) {\n        delete containerOut.startlinecolor;\n        delete containerOut.startlinewidth;\n    }\n\n    var endLineColor = coerce2('endlinecolor', dfltColor);\n    var endLineWidth = coerce2('endlinewidth', gridWidth);\n    var showEndLine = coerce('endline', containerOut.showgrid || !!endLineColor || !!endLineWidth);\n\n    if(!showEndLine) {\n        delete containerOut.endlinecolor;\n        delete containerOut.endlinewidth;\n    }\n\n    if(!showGrid) {\n        delete containerOut.gridcolor;\n        delete containerOut.gridWidth;\n    } else {\n        coerce('minorgridcount');\n        coerce('minorgridwidth', gridWidth);\n        coerce('minorgridcolor', addOpacity(gridColor, 0.06));\n\n        if(!containerOut.minorgridcount) {\n            delete containerOut.minorgridwidth;\n            delete containerOut.minorgridcolor;\n        }\n    }\n\n    if(containerOut.showticklabels === 'none') {\n        delete containerOut.tickfont;\n        delete containerOut.tickangle;\n        delete containerOut.showexponent;\n        delete containerOut.exponentformat;\n        delete containerOut.tickformat;\n        delete containerOut.showticksuffix;\n        delete containerOut.showtickprefix;\n    }\n\n    if(!containerOut.showticksuffix) {\n        delete containerOut.ticksuffix;\n    }\n\n    if(!containerOut.showtickprefix) {\n        delete containerOut.tickprefix;\n    }\n\n    // It needs to be coerced, then something above overrides this deep in the axis code,\n    // but no, we *actually* want to coerce this.\n    coerce('tickmode');\n\n    return containerOut;\n};\n\nfunction setAutoType(ax, data) {\n    // new logic: let people specify any type they want,\n    // only autotype if type is '-'\n    if(ax.type !== '-') return;\n\n    var id = ax._id;\n    var axLetter = id.charAt(0);\n\n    var calAttr = axLetter + 'calendar';\n    var calendar = ax[calAttr];\n\n    ax.type = autoType(data, calendar);\n}\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../plots/cartesian/axis_autotype\":752,\"../../plots/cartesian/category_order_defaults\":755,\"../../plots/cartesian/set_convert\":769,\"../../plots/cartesian/tick_label_defaults\":770,\"../../plots/cartesian/tick_value_defaults\":772,\"../../registry\":831,\"./attributes\":882}],886:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar isArray1D = _dereq_('../../lib').isArray1D;\nvar cheaterBasis = _dereq_('./cheater_basis');\nvar arrayMinmax = _dereq_('./array_minmax');\nvar calcGridlines = _dereq_('./calc_gridlines');\nvar calcLabels = _dereq_('./calc_labels');\nvar calcClipPath = _dereq_('./calc_clippath');\nvar clean2dArray = _dereq_('../heatmap/clean_2d_array');\nvar smoothFill2dArray = _dereq_('./smooth_fill_2d_array');\nvar convertColumnData = _dereq_('../heatmap/convert_column_xyz');\nvar setConvert = _dereq_('./set_convert');\n\nmodule.exports = function calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis);\n    var ya = Axes.getFromId(gd, trace.yaxis);\n    var aax = trace.aaxis;\n    var bax = trace.baxis;\n\n    var x = trace.x;\n    var y = trace.y;\n    var cols = [];\n    if(x && isArray1D(x)) cols.push('x');\n    if(y && isArray1D(y)) cols.push('y');\n\n    if(cols.length) {\n        convertColumnData(trace, aax, bax, 'a', 'b', cols);\n    }\n\n    var a = trace._a = trace._a || trace.a;\n    var b = trace._b = trace._b || trace.b;\n    x = trace._x || trace.x;\n    y = trace._y || trace.y;\n\n    var t = {};\n\n    if(trace._cheater) {\n        var avals = aax.cheatertype === 'index' ? a.length : a;\n        var bvals = bax.cheatertype === 'index' ? b.length : b;\n        x = cheaterBasis(avals, bvals, trace.cheaterslope);\n    }\n\n    trace._x = x = clean2dArray(x);\n    trace._y = y = clean2dArray(y);\n\n    // Fill in any undefined values with elliptic smoothing. This doesn't take\n    // into account the spacing of the values. That is, the derivatives should\n    // be modified to use a and b values. It's not that hard, but this is already\n    // moderate overkill for just filling in missing values.\n    smoothFill2dArray(x, a, b);\n    smoothFill2dArray(y, a, b);\n\n    setConvert(trace);\n\n    // create conversion functions that depend on the data\n    trace.setScale();\n\n    // This is a rather expensive scan. Nothing guarantees monotonicity,\n    // so we need to scan through all data to get proper ranges:\n    var xrange = arrayMinmax(x);\n    var yrange = arrayMinmax(y);\n\n    var dx = 0.5 * (xrange[1] - xrange[0]);\n    var xc = 0.5 * (xrange[1] + xrange[0]);\n\n    var dy = 0.5 * (yrange[1] - yrange[0]);\n    var yc = 0.5 * (yrange[1] + yrange[0]);\n\n    // Expand the axes to fit the plot, except just grow it by a factor of 1.3\n    // because the labels should be taken into account except that's difficult\n    // hence 1.3.\n    var grow = 1.3;\n    xrange = [xc - dx * grow, xc + dx * grow];\n    yrange = [yc - dy * grow, yc + dy * grow];\n\n    trace._extremes[xa._id] = Axes.findExtremes(xa, xrange, {padded: true});\n    trace._extremes[ya._id] = Axes.findExtremes(ya, yrange, {padded: true});\n\n    // Enumerate the gridlines, both major and minor, and store them on the trace\n    // object:\n    calcGridlines(trace, 'a', 'b');\n    calcGridlines(trace, 'b', 'a');\n\n    // Calculate the text labels for each major gridline and store them on the\n    // trace object:\n    calcLabels(trace, aax);\n    calcLabels(trace, bax);\n\n    // Tabulate points for the four segments that bound the axes so that we can\n    // map to pixel coordinates in the plot function and create a clip rect:\n    t.clipsegments = calcClipPath(trace._xctrl, trace._yctrl, aax, bax);\n\n    t.x = x;\n    t.y = y;\n    t.a = a;\n    t.b = b;\n\n    return [t];\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../heatmap/clean_2d_array\":974,\"../heatmap/convert_column_xyz\":976,\"./array_minmax\":881,\"./calc_clippath\":887,\"./calc_gridlines\":888,\"./calc_labels\":889,\"./cheater_basis\":891,\"./set_convert\":904,\"./smooth_fill_2d_array\":905}],887:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = function makeClipPath(xctrl, yctrl, aax, bax) {\n    var i, x, y;\n    var segments = [];\n\n    var asmoothing = !!aax.smoothing;\n    var bsmoothing = !!bax.smoothing;\n    var nea1 = xctrl[0].length - 1;\n    var neb1 = xctrl.length - 1;\n\n    // Along the lower a axis:\n    for(i = 0, x = [], y = []; i <= nea1; i++) {\n        x[i] = xctrl[0][i];\n        y[i] = yctrl[0][i];\n    }\n    segments.push({x: x, y: y, bicubic: asmoothing});\n\n    // Along the upper b axis:\n    for(i = 0, x = [], y = []; i <= neb1; i++) {\n        x[i] = xctrl[i][nea1];\n        y[i] = yctrl[i][nea1];\n    }\n    segments.push({x: x, y: y, bicubic: bsmoothing});\n\n    // Backwards along the upper a axis:\n    for(i = nea1, x = [], y = []; i >= 0; i--) {\n        x[nea1 - i] = xctrl[neb1][i];\n        y[nea1 - i] = yctrl[neb1][i];\n    }\n    segments.push({x: x, y: y, bicubic: asmoothing});\n\n    // Backwards along the lower b axis:\n    for(i = neb1, x = [], y = []; i >= 0; i--) {\n        x[neb1 - i] = xctrl[i][0];\n        y[neb1 - i] = yctrl[i][0];\n    }\n    segments.push({x: x, y: y, bicubic: bsmoothing});\n\n    return segments;\n};\n\n},{}],888:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = function calcGridlines(trace, axisLetter, crossAxisLetter) {\n    var i, j, j0;\n    var eps, bounds, n1, n2, n, value, v;\n    var j1, v0, v1, d;\n\n    var data = trace['_' + axisLetter];\n    var axis = trace[axisLetter + 'axis'];\n\n    var gridlines = axis._gridlines = [];\n    var minorgridlines = axis._minorgridlines = [];\n    var boundarylines = axis._boundarylines = [];\n\n    var crossData = trace['_' + crossAxisLetter];\n    var crossAxis = trace[crossAxisLetter + 'axis'];\n\n    if(axis.tickmode === 'array') {\n        axis.tickvals = data.slice();\n    }\n\n    var xcp = trace._xctrl;\n    var ycp = trace._yctrl;\n    var nea = xcp[0].length;\n    var neb = xcp.length;\n    var na = trace._a.length;\n    var nb = trace._b.length;\n\n    Axes.prepTicks(axis);\n\n    // don't leave tickvals in axis looking like an attribute\n    if(axis.tickmode === 'array') delete axis.tickvals;\n\n    // The default is an empty array that will cause the join to remove the gridline if\n    // it's just disappeared:\n    // axis._startline = axis._endline = [];\n\n    // If the cross axis uses bicubic interpolation, then the grid\n    // lines fall once every three expanded grid row/cols:\n    var stride = axis.smoothing ? 3 : 1;\n\n    function constructValueGridline(value) {\n        var i, j, j0, tj, pxy, i0, ti, xy, dxydi0, dxydi1, dxydj0, dxydj1;\n        var xpoints = [];\n        var ypoints = [];\n        var ret = {};\n        // Search for the fractional grid index giving this line:\n        if(axisLetter === 'b') {\n            // For the position we use just the i-j coordinates:\n            j = trace.b2j(value);\n\n            // The derivatives for catmull-rom splines are discontinuous across cell\n            // boundaries though, so we need to provide both the cell and the position\n            // within the cell separately:\n            j0 = Math.floor(Math.max(0, Math.min(nb - 2, j)));\n            tj = j - j0;\n\n            ret.length = nb;\n            ret.crossLength = na;\n\n            ret.xy = function(i) {\n                return trace.evalxy([], i, j);\n            };\n\n            ret.dxy = function(i0, ti) {\n                return trace.dxydi([], i0, j0, ti, tj);\n            };\n\n            for(i = 0; i < na; i++) {\n                i0 = Math.min(na - 2, i);\n                ti = i - i0;\n                xy = trace.evalxy([], i, j);\n\n                if(crossAxis.smoothing && i > 0) {\n                    // First control point:\n                    dxydi0 = trace.dxydi([], i - 1, j0, 0, tj);\n                    xpoints.push(pxy[0] + dxydi0[0] / 3);\n                    ypoints.push(pxy[1] + dxydi0[1] / 3);\n\n                    // Second control point:\n                    dxydi1 = trace.dxydi([], i - 1, j0, 1, tj);\n                    xpoints.push(xy[0] - dxydi1[0] / 3);\n                    ypoints.push(xy[1] - dxydi1[1] / 3);\n                }\n\n                xpoints.push(xy[0]);\n                ypoints.push(xy[1]);\n\n                pxy = xy;\n            }\n        } else {\n            i = trace.a2i(value);\n            i0 = Math.floor(Math.max(0, Math.min(na - 2, i)));\n            ti = i - i0;\n\n            ret.length = na;\n            ret.crossLength = nb;\n\n            ret.xy = function(j) {\n                return trace.evalxy([], i, j);\n            };\n\n            ret.dxy = function(j0, tj) {\n                return trace.dxydj([], i0, j0, ti, tj);\n            };\n\n            for(j = 0; j < nb; j++) {\n                j0 = Math.min(nb - 2, j);\n                tj = j - j0;\n                xy = trace.evalxy([], i, j);\n\n                if(crossAxis.smoothing && j > 0) {\n                    // First control point:\n                    dxydj0 = trace.dxydj([], i0, j - 1, ti, 0);\n                    xpoints.push(pxy[0] + dxydj0[0] / 3);\n                    ypoints.push(pxy[1] + dxydj0[1] / 3);\n\n                    // Second control point:\n                    dxydj1 = trace.dxydj([], i0, j - 1, ti, 1);\n                    xpoints.push(xy[0] - dxydj1[0] / 3);\n                    ypoints.push(xy[1] - dxydj1[1] / 3);\n                }\n\n                xpoints.push(xy[0]);\n                ypoints.push(xy[1]);\n\n                pxy = xy;\n            }\n        }\n\n        ret.axisLetter = axisLetter;\n        ret.axis = axis;\n        ret.crossAxis = crossAxis;\n        ret.value = value;\n        ret.constvar = crossAxisLetter;\n        ret.index = n;\n        ret.x = xpoints;\n        ret.y = ypoints;\n        ret.smoothing = crossAxis.smoothing;\n\n        return ret;\n    }\n\n    function constructArrayGridline(idx) {\n        var j, i0, j0, ti, tj;\n        var xpoints = [];\n        var ypoints = [];\n        var ret = {};\n        ret.length = data.length;\n        ret.crossLength = crossData.length;\n\n        if(axisLetter === 'b') {\n            j0 = Math.max(0, Math.min(nb - 2, idx));\n            tj = Math.min(1, Math.max(0, idx - j0));\n\n            ret.xy = function(i) {\n                return trace.evalxy([], i, idx);\n            };\n\n            ret.dxy = function(i0, ti) {\n                return trace.dxydi([], i0, j0, ti, tj);\n            };\n\n            // In the tickmode: array case, this operation is a simple\n            // transfer of data:\n            for(j = 0; j < nea; j++) {\n                xpoints[j] = xcp[idx * stride][j];\n                ypoints[j] = ycp[idx * stride][j];\n            }\n        } else {\n            i0 = Math.max(0, Math.min(na - 2, idx));\n            ti = Math.min(1, Math.max(0, idx - i0));\n\n            ret.xy = function(j) {\n                return trace.evalxy([], idx, j);\n            };\n\n            ret.dxy = function(j0, tj) {\n                return trace.dxydj([], i0, j0, ti, tj);\n            };\n\n            // In the tickmode: array case, this operation is a simple\n            // transfer of data:\n            for(j = 0; j < neb; j++) {\n                xpoints[j] = xcp[j][idx * stride];\n                ypoints[j] = ycp[j][idx * stride];\n            }\n        }\n\n        ret.axisLetter = axisLetter;\n        ret.axis = axis;\n        ret.crossAxis = crossAxis;\n        ret.value = data[idx];\n        ret.constvar = crossAxisLetter;\n        ret.index = idx;\n        ret.x = xpoints;\n        ret.y = ypoints;\n        ret.smoothing = crossAxis.smoothing;\n\n        return ret;\n    }\n\n    if(axis.tickmode === 'array') {\n        // var j0 = axis.startline ? 1 : 0;\n        // var j1 = data.length - (axis.endline ? 1 : 0);\n\n        eps = 5e-15;\n        bounds = [\n            Math.floor(((data.length - 1) - axis.arraytick0) / axis.arraydtick * (1 + eps)),\n            Math.ceil((- axis.arraytick0) / axis.arraydtick / (1 + eps))\n        ].sort(function(a, b) {return a - b;});\n\n        // Unpack sorted values so we can be sure to avoid infinite loops if something\n        // is backwards:\n        n1 = bounds[0] - 1;\n        n2 = bounds[1] + 1;\n\n        // If the axes fall along array lines, then this is a much simpler process since\n        // we already have all the control points we need\n        for(n = n1; n < n2; n++) {\n            j = axis.arraytick0 + axis.arraydtick * n;\n            if(j < 0 || j > data.length - 1) continue;\n            gridlines.push(extendFlat(constructArrayGridline(j), {\n                color: axis.gridcolor,\n                width: axis.gridwidth\n            }));\n        }\n\n        for(n = n1; n < n2; n++) {\n            j0 = axis.arraytick0 + axis.arraydtick * n;\n            j1 = Math.min(j0 + axis.arraydtick, data.length - 1);\n\n            // TODO: fix the bounds computation so we don't have to do a large range and then throw\n            // out unneeded numbers\n            if(j0 < 0 || j0 > data.length - 1) continue;\n            if(j1 < 0 || j1 > data.length - 1) continue;\n\n            v0 = data[j0];\n            v1 = data[j1];\n\n            for(i = 0; i < axis.minorgridcount; i++) {\n                d = j1 - j0;\n\n                // TODO: fix the bounds computation so we don't have to do a large range and then throw\n                // out unneeded numbers\n                if(d <= 0) continue;\n\n                // XXX: This calculation isn't quite right. Off by one somewhere?\n                v = v0 + (v1 - v0) * (i + 1) / (axis.minorgridcount + 1) * (axis.arraydtick / d);\n\n                // TODO: fix the bounds computation so we don't have to do a large range and then throw\n                // out unneeded numbers\n                if(v < data[0] || v > data[data.length - 1]) continue;\n                minorgridlines.push(extendFlat(constructValueGridline(v), {\n                    color: axis.minorgridcolor,\n                    width: axis.minorgridwidth\n                }));\n            }\n        }\n\n        if(axis.startline) {\n            boundarylines.push(extendFlat(constructArrayGridline(0), {\n                color: axis.startlinecolor,\n                width: axis.startlinewidth\n            }));\n        }\n\n        if(axis.endline) {\n            boundarylines.push(extendFlat(constructArrayGridline(data.length - 1), {\n                color: axis.endlinecolor,\n                width: axis.endlinewidth\n            }));\n        }\n    } else {\n        // If the lines do not fall along the axes, then we have to interpolate\n        // the contro points and so some math to figure out where the lines are\n        // in the first place.\n\n        // Compute the integer boudns of tick0 + n * dtick that fall within the range\n        // (roughly speaking):\n        // Give this a nice generous epsilon. We use at as * (1 + eps) in order to make\n        // inequalities a little tolerant in a more or less correct manner:\n        eps = 5e-15;\n        bounds = [\n            Math.floor((data[data.length - 1] - axis.tick0) / axis.dtick * (1 + eps)),\n            Math.ceil((data[0] - axis.tick0) / axis.dtick / (1 + eps))\n        ].sort(function(a, b) {return a - b;});\n\n        // Unpack sorted values so we can be sure to avoid infinite loops if something\n        // is backwards:\n        n1 = bounds[0];\n        n2 = bounds[1];\n\n        for(n = n1; n <= n2; n++) {\n            value = axis.tick0 + axis.dtick * n;\n\n            gridlines.push(extendFlat(constructValueGridline(value), {\n                color: axis.gridcolor,\n                width: axis.gridwidth\n            }));\n        }\n\n        for(n = n1 - 1; n < n2 + 1; n++) {\n            value = axis.tick0 + axis.dtick * n;\n\n            for(i = 0; i < axis.minorgridcount; i++) {\n                v = value + axis.dtick * (i + 1) / (axis.minorgridcount + 1);\n                if(v < data[0] || v > data[data.length - 1]) continue;\n                minorgridlines.push(extendFlat(constructValueGridline(v), {\n                    color: axis.minorgridcolor,\n                    width: axis.minorgridwidth\n                }));\n            }\n        }\n\n        if(axis.startline) {\n            boundarylines.push(extendFlat(constructValueGridline(data[0]), {\n                color: axis.startlinecolor,\n                width: axis.startlinewidth\n            }));\n        }\n\n        if(axis.endline) {\n            boundarylines.push(extendFlat(constructValueGridline(data[data.length - 1]), {\n                color: axis.endlinecolor,\n                width: axis.endlinewidth\n            }));\n        }\n    }\n};\n\n},{\"../../lib/extend\":693,\"../../plots/cartesian/axes\":751}],889:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = function calcLabels(trace, axis) {\n    var i, tobj, prefix, suffix, gridline;\n\n    var labels = axis._labels = [];\n    var gridlines = axis._gridlines;\n\n    for(i = 0; i < gridlines.length; i++) {\n        gridline = gridlines[i];\n\n        if(['start', 'both'].indexOf(axis.showticklabels) !== -1) {\n            tobj = Axes.tickText(axis, gridline.value);\n\n            extendFlat(tobj, {\n                prefix: prefix,\n                suffix: suffix,\n                endAnchor: true,\n                xy: gridline.xy(0),\n                dxy: gridline.dxy(0, 0),\n                axis: gridline.axis,\n                length: gridline.crossAxis.length,\n                font: gridline.axis.tickfont,\n                isFirst: i === 0,\n                isLast: i === gridlines.length - 1\n            });\n\n            labels.push(tobj);\n        }\n\n        if(['end', 'both'].indexOf(axis.showticklabels) !== -1) {\n            tobj = Axes.tickText(axis, gridline.value);\n\n            extendFlat(tobj, {\n                endAnchor: false,\n                xy: gridline.xy(gridline.crossLength - 1),\n                dxy: gridline.dxy(gridline.crossLength - 2, 1),\n                axis: gridline.axis,\n                length: gridline.crossAxis.length,\n                font: gridline.axis.tickfont,\n                isFirst: i === 0,\n                isLast: i === gridlines.length - 1\n            });\n\n            labels.push(tobj);\n        }\n    }\n};\n\n},{\"../../lib/extend\":693,\"../../plots/cartesian/axes\":751}],890:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * Compute the tangent vector according to catmull-rom cubic splines (centripetal,\n * I think). That differs from the control point in two ways:\n *   1. It is a vector, not a position relative to the point\n *   2. the vector is longer than the position relative to p1 by a factor of 3\n *\n * Close to the boundaries, we'll use these as *quadratic control points, so that\n * to make a nice grid, we'll need to divide the tangent by 2 instead of 3. (The\n * math works out this way if you work through the bezier derivatives)\n */\nvar CatmullRomExp = 0.5;\nmodule.exports = function makeControlPoints(p0, p1, p2, smoothness) {\n    var d1x = p0[0] - p1[0];\n    var d1y = p0[1] - p1[1];\n    var d2x = p2[0] - p1[0];\n    var d2y = p2[1] - p1[1];\n    var d1a = Math.pow(d1x * d1x + d1y * d1y, CatmullRomExp / 2);\n    var d2a = Math.pow(d2x * d2x + d2y * d2y, CatmullRomExp / 2);\n    var numx = (d2a * d2a * d1x - d1a * d1a * d2x) * smoothness;\n    var numy = (d2a * d2a * d1y - d1a * d1a * d2y) * smoothness;\n    var denom1 = d2a * (d1a + d2a) * 3;\n    var denom2 = d1a * (d1a + d2a) * 3;\n\n    return [[\n        p1[0] + (denom1 && numx / denom1),\n        p1[1] + (denom1 && numy / denom1)\n    ], [\n        p1[0] - (denom2 && numx / denom2),\n        p1[1] - (denom2 && numy / denom2)\n    ]];\n};\n\n},{}],891:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\n/*\n * Construct a 2D array of cheater values given a, b, and a slope.\n * If\n */\nmodule.exports = function(a, b, cheaterslope) {\n    var i, j, ascal, bscal, aval, bval;\n    var data = [];\n\n    var na = isArrayOrTypedArray(a) ? a.length : a;\n    var nb = isArrayOrTypedArray(b) ? b.length : b;\n    var adata = isArrayOrTypedArray(a) ? a : null;\n    var bdata = isArrayOrTypedArray(b) ? b : null;\n\n    // If we're using data, scale it so that for data that's just barely\n    // not evenly spaced, the switch to value-based indexing is continuous.\n    // This means evenly spaced data should look the same whether value\n    // or index cheatertype.\n    if(adata) {\n        ascal = (adata.length - 1) / (adata[adata.length - 1] - adata[0]) / (na - 1);\n    }\n\n    if(bdata) {\n        bscal = (bdata.length - 1) / (bdata[bdata.length - 1] - bdata[0]) / (nb - 1);\n    }\n\n    var xval;\n    var xmin = Infinity;\n    var xmax = -Infinity;\n    for(j = 0; j < nb; j++) {\n        data[j] = [];\n        bval = bdata ? (bdata[j] - bdata[0]) * bscal : j / (nb - 1);\n        for(i = 0; i < na; i++) {\n            aval = adata ? (adata[i] - adata[0]) * ascal : i / (na - 1);\n            xval = aval - bval * cheaterslope;\n            xmin = Math.min(xval, xmin);\n            xmax = Math.max(xval, xmax);\n            data[j][i] = xval;\n        }\n    }\n\n    // Normalize cheater values to the 0-1 range. This comes into play when you have\n    // multiple cheater plots. After careful consideration, it seems better if cheater\n    // values are normalized to a consistent range. Otherwise one cheater affects the\n    // layout of other cheaters on the same axis.\n    var slope = 1.0 / (xmax - xmin);\n    var offset = -xmin * slope;\n    for(j = 0; j < nb; j++) {\n        for(i = 0; i < na; i++) {\n            data[j][i] = slope * data[j][i] + offset;\n        }\n    }\n\n    return data;\n};\n\n},{\"../../lib\":703}],892:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar makeControlPoints = _dereq_('./catmull_rom');\nvar ensureArray = _dereq_('../../lib').ensureArray;\n\n/*\n * Turns a coarse grid into a fine grid with control points.\n *\n * Here's an ASCII representation:\n *\n *       o ----- o ----- o ----- o\n *       |       |       |       |\n *       |       |       |       |\n *       |       |       |       |\n *       o ----- o ----- o ----- o\n *       |       |       |       |\n *       |       |       |       |\n *    ^  |       |       |       |\n *    |  o ----- o ----- o ----- o\n *  b |  |       |       |       |\n *    |  |       |       |       |\n *    |  |       |       |       |\n *       o ----- o ----- o ----- o\n *         ------>\n *           a\n *\n * First of all, note that we want to do this in *cartesian* space. This means\n * we might run into problems when there are extreme differences in x/y scaling,\n * but the alternative is that the topology of the contours might actually be\n * view-dependent, which seems worse. As a fallback, the only parameter that\n * actually affects the result is the *aspect ratio*, so that we can at least\n * improve the situation a bit without going all the way to screen coordinates.\n *\n * This function flattens the points + tangents  into a slightly denser grid of\n * *control points*. The resulting grid looks like this:\n *\n *       9 +--o-o--+ -o-o--+--o-o--+\n *       8 o  o o  o  o o  o  o o  o\n *         |       |       |       |\n *       7 o  o o  o  o o  o  o o  o\n *       6 +--o-o--+ -o-o--+--o-o--+\n *       5 o  o o  o  o o  o  o o  o\n *         |       |       |       |\n *    ^  4 o  o o  o  o o  o  o o  o\n *    |  3 +--o-o--+ -o-o--+--o-o--+\n *  b |  2 o  o o  o  o o  o  o o  o\n *    |    |       |       |       |\n *    |  1 o  o o  o  o o  o  o o  o\n *       0 +--o-o--+ -o-o--+--o-o--+\n *         0  1 2  3  4 5  6  7 8  9\n *         ------>\n *           a\n *\n * where `o`s represent newly-computed control points. the resulting dimension is\n *\n *     (m - 1) * 3 + 1\n *   = 3 * m - 2\n *\n * We could simply store the tangents separately, but that's a nightmare to organize\n * in two dimensions since we'll be slicing grid lines in both directions and since\n * that basically requires very nearly just as much storage as just storing the dense\n * grid.\n *\n * Wow!\n */\n\n\n/*\n * Catmull-rom is biased at the boundaries toward the interior and we actually\n * can't use catmull-rom to compute the control point closest to (but inside)\n * the boundary.\n *\n * A note on plotly's spline interpolation. It uses the catmull rom control point\n * closest to the boundary *as* a quadratic control point. This seems incorrect,\n * so I've elected not to follow that. Given control points 0 and 1, regular plotly\n * splines give *equivalent* cubic control points:\n *\n * Input:\n *\n *   boundary\n *     |                    |\n *     p0           p2      p3    --> interior\n *     0.0          0.667   1.0\n *     |                    |\n *\n * Cubic-equivalent of what plotly splines draw::\n *\n *   boundary\n *     |                    |\n *     p0   p1      p2      p3    --> interior\n *     0.0  0.4444  0.8888  1.0\n *     |                    |\n *\n * What this function fills in:\n *\n *   boundary\n *     |                    |\n *     p0    p1     p2      p3    --> interior\n *     0.0   0.333  0.667   1.0\n *     |                    |\n *\n * Parameters:\n *   p0: boundary point\n *   p2: catmull rom point based on computation at p3\n *   p3: first grid point\n *\n * Of course it works whichever way it's oriented; you just need to interpret the\n * input/output accordingly.\n */\nfunction inferCubicControlPoint(p0, p2, p3) {\n    // Extend p1 away from p0 by 50%. This is the equivalent quadratic point that\n    // would give the same slope as catmull rom at p0.\n    var p2e0 = -0.5 * p3[0] + 1.5 * p2[0];\n    var p2e1 = -0.5 * p3[1] + 1.5 * p2[1];\n\n    return [\n        (2 * p2e0 + p0[0]) / 3,\n        (2 * p2e1 + p0[1]) / 3,\n    ];\n}\n\nmodule.exports = function computeControlPoints(xe, ye, x, y, asmoothing, bsmoothing) {\n    var i, j, ie, je, xej, yej, xj, yj, cp, p1;\n    // At this point, we know these dimensions are correct and representative of\n    // the whole 2D arrays:\n    var na = x[0].length;\n    var nb = x.length;\n\n    // (n)umber of (e)xpanded points:\n    var nea = asmoothing ? 3 * na - 2 : na;\n    var neb = bsmoothing ? 3 * nb - 2 : nb;\n\n    xe = ensureArray(xe, neb);\n    ye = ensureArray(ye, neb);\n\n    for(ie = 0; ie < neb; ie++) {\n        xe[ie] = ensureArray(xe[ie], nea);\n        ye[ie] = ensureArray(ye[ie], nea);\n    }\n\n    // This loop fills in the X'd points:\n    //\n    //    .       .       .       .\n    //    .       .       .       .\n    //    |       |       |       |\n    //    |       |       |       |\n    //    X ----- X ----- X ----- X\n    //    |       |       |       |\n    //    |       |       |       |\n    //    |       |       |       |\n    //    X ----- X ----- X ----- X\n    //\n    //\n    // ie = (i) (e)xpanded:\n    for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) {\n        xej = xe[je];\n        yej = ye[je];\n        xj = x[j];\n        yj = y[j];\n\n        // je = (j) (e)xpanded:\n        for(i = 0, ie = 0; i < na; i++, ie += asmoothing ? 3 : 1) {\n            xej[ie] = xj[i];\n            yej[ie] = yj[i];\n        }\n    }\n\n    if(asmoothing) {\n        // If there's a-smoothing, this loop fills in the X'd points with catmull-rom\n        // control points computed along the a-axis:\n        //     .       .       .       .\n        //     .       .       .       .\n        //     |       |       |       |\n        //     |       |       |       |\n        //     o -Y-X- o -X-X- o -X-Y- o\n        //     |       |       |       |\n        //     |       |       |       |\n        //     |       |       |       |\n        //     o -Y-X- o -X-X- o -X-Y- o\n        //\n        // i:  0       1       2       3\n        // ie: 0  1 3  3  4 5  6  7 8  9\n        //\n        //           ------>\n        //             a\n        //\n        for(j = 0, je = 0; j < nb; j++, je += bsmoothing ? 3 : 1) {\n            // Fill in the points marked X for this a-row:\n            for(i = 1, ie = 3; i < na - 1; i++, ie += 3) {\n                cp = makeControlPoints(\n                    [x[j][i - 1], y[j][i - 1]],\n                    [x[j][i ], y[j][i]],\n                    [x[j][i + 1], y[j][i + 1]],\n                    asmoothing\n                );\n\n                xe[je][ie - 1] = cp[0][0];\n                ye[je][ie - 1] = cp[0][1];\n                xe[je][ie + 1] = cp[1][0];\n                ye[je][ie + 1] = cp[1][1];\n            }\n\n            // The very first cubic interpolation point (to the left for i = 1 above) is\n            // used as a *quadratic* interpolation point by the spline drawing function\n            // which isn't really correct. But for the sake of consistency, we'll use it\n            // as such. Since we're using cubic splines, that means we need to shorten the\n            // tangent by 1/3 and also construct a new cubic spline control point 1/3 from\n            // the original to the i = 0 point.\n            p1 = inferCubicControlPoint(\n                [xe[je][0], ye[je][0]],\n                [xe[je][2], ye[je][2]],\n                [xe[je][3], ye[je][3]]\n            );\n            xe[je][1] = p1[0];\n            ye[je][1] = p1[1];\n\n            // Ditto last points, sans explanation:\n            p1 = inferCubicControlPoint(\n                [xe[je][nea - 1], ye[je][nea - 1]],\n                [xe[je][nea - 3], ye[je][nea - 3]],\n                [xe[je][nea - 4], ye[je][nea - 4]]\n            );\n            xe[je][nea - 2] = p1[0];\n            ye[je][nea - 2] = p1[1];\n        }\n    }\n\n    if(bsmoothing) {\n        // If there's a-smoothing, this loop fills in the X'd points with catmull-rom\n        // control points computed along the b-axis:\n        //     .       .       .       .\n        //     X  X X  X  X X  X  X X  X\n        //     |       |       |       |\n        //     X  X X  X  X X  X  X X  X\n        //     o -o-o- o -o-o- o -o-o- o\n        //     X  X X  X  X X  X  X X  X\n        //     |       |       |       |\n        //     Y  Y Y  Y  Y Y  Y  Y Y  Y\n        //     o -o-o- o -o-o- o -o-o- o\n        //\n        // i:  0       1       2       3\n        // ie: 0  1 3  3  4 5  6  7 8  9\n        //\n        //           ------>\n        //             a\n        //\n        for(ie = 0; ie < nea; ie++) {\n            for(je = 3; je < neb - 3; je += 3) {\n                cp = makeControlPoints(\n                    [xe[je - 3][ie], ye[je - 3][ie]],\n                    [xe[je][ie], ye[je][ie]],\n                    [xe[je + 3][ie], ye[je + 3][ie]],\n                    bsmoothing\n                );\n\n                xe[je - 1][ie] = cp[0][0];\n                ye[je - 1][ie] = cp[0][1];\n                xe[je + 1][ie] = cp[1][0];\n                ye[je + 1][ie] = cp[1][1];\n            }\n            // Do the same boundary condition magic for these control points marked Y above:\n            p1 = inferCubicControlPoint(\n                [xe[0][ie], ye[0][ie]],\n                [xe[2][ie], ye[2][ie]],\n                [xe[3][ie], ye[3][ie]]\n            );\n            xe[1][ie] = p1[0];\n            ye[1][ie] = p1[1];\n\n            p1 = inferCubicControlPoint(\n                [xe[neb - 1][ie], ye[neb - 1][ie]],\n                [xe[neb - 3][ie], ye[neb - 3][ie]],\n                [xe[neb - 4][ie], ye[neb - 4][ie]]\n            );\n            xe[neb - 2][ie] = p1[0];\n            ye[neb - 2][ie] = p1[1];\n        }\n    }\n\n    if(asmoothing && bsmoothing) {\n        // Do one more pass, this time recomputing exactly what we just computed.\n        // It's overdetermined since we're peforming catmull-rom in two directions,\n        // so we'll just average the overdetermined. These points don't lie along the\n        // grid lines, so note that only grid lines will follow normal plotly spline\n        // interpolation.\n        //\n        // Unless of course there was no b smoothing. Then these intermediate points\n        // don't actually exist and this section is bypassed.\n        //     .       .       .       .\n        //     o  X X  o  X X  o  X X  o\n        //     |       |       |       |\n        //     o  X X  o  X X  o  X X  o\n        //     o -o-o- o -o-o- o -o-o- o\n        //     o  X X  o  X X  o  X X  o\n        //     |       |       |       |\n        //     o  Y Y  o  Y Y  o  Y Y  o\n        //     o -o-o- o -o-o- o -o-o- o\n        //\n        // i:  0       1       2       3\n        // ie: 0  1 3  3  4 5  6  7 8  9\n        //\n        //           ------>\n        //             a\n        //\n        for(je = 1; je < neb; je += (je + 1) % 3 === 0 ? 2 : 1) {\n            // Fill in the points marked X for this a-row:\n            for(ie = 3; ie < nea - 3; ie += 3) {\n                cp = makeControlPoints(\n                    [xe[je][ie - 3], ye[je][ie - 3]],\n                    [xe[je][ie], ye[je][ie]],\n                    [xe[je][ie + 3], ye[je][ie + 3]],\n                    asmoothing\n                );\n\n                xe[je][ie - 1] = 0.5 * (xe[je][ie - 1] + cp[0][0]);\n                ye[je][ie - 1] = 0.5 * (ye[je][ie - 1] + cp[0][1]);\n                xe[je][ie + 1] = 0.5 * (xe[je][ie + 1] + cp[1][0]);\n                ye[je][ie + 1] = 0.5 * (ye[je][ie + 1] + cp[1][1]);\n            }\n\n            // This case is just slightly different. The computation is the same,\n            // but having computed this, we'll average with the existing result.\n            p1 = inferCubicControlPoint(\n                [xe[je][0], ye[je][0]],\n                [xe[je][2], ye[je][2]],\n                [xe[je][3], ye[je][3]]\n            );\n            xe[je][1] = 0.5 * (xe[je][1] + p1[0]);\n            ye[je][1] = 0.5 * (ye[je][1] + p1[1]);\n\n            p1 = inferCubicControlPoint(\n                [xe[je][nea - 1], ye[je][nea - 1]],\n                [xe[je][nea - 3], ye[je][nea - 3]],\n                [xe[je][nea - 4], ye[je][nea - 4]]\n            );\n            xe[je][nea - 2] = 0.5 * (xe[je][nea - 2] + p1[0]);\n            ye[je][nea - 2] = 0.5 * (ye[je][nea - 2] + p1[1]);\n        }\n    }\n\n    return [xe, ye];\n};\n\n},{\"../../lib\":703,\"./catmull_rom\":890}],893:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    RELATIVE_CULL_TOLERANCE: 1e-6\n};\n\n},{}],894:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * Evaluates the derivative of a list of control point arrays. That is, it expects an array or arrays\n * that are expanded relative to the raw data to include the bicubic control points, if applicable. If\n * only linear interpolation is desired, then the data points correspond 1-1 along that axis to the\n * data itself. Since it's catmull-rom splines in either direction note in particular that the\n * derivatives are discontinuous across cell boundaries. That's the reason you need both the *cell*\n * and the *point within the cell*.\n *\n * Also note that the discontinuity of the derivative is in magnitude only. The direction *is*\n * continuous across cell boundaries.\n *\n * For example, to compute the derivative of the xcoordinate halfway betwen the 7 and 8th i-gridpoints\n * and the 10th and 11th j-gridpoints given bicubic smoothing in both dimensions, you'd write:\n *\n *     var deriv = createIDerivativeEvaluator([x], 1, 1);\n *\n *     var dxdi = deriv([], 7, 10, 0.5, 0.5);\n *     // => [0.12345]\n *\n * Since there'd be a bunch of duplicate computation to compute multiple derivatives, you can double\n * this up by providing more arrays:\n *\n *     var deriv = createIDerivativeEvaluator([x, y], 1, 1);\n *\n *     var dxdi = deriv([], 7, 10, 0.5, 0.5);\n *     // => [0.12345, 0.78910]\n *\n * NB: It's presumed that at this point all data has been sanitized and is valid numerical data arrays\n * of the correct dimension.\n */\nmodule.exports = function(arrays, asmoothing, bsmoothing) {\n    if(asmoothing && bsmoothing) {\n        return function(out, i0, j0, u, v) {\n            if(!out) out = [];\n            var f0, f1, f2, f3, ak, k;\n\n            // Since it's a grid of control points, the actual indices are * 3:\n            i0 *= 3;\n            j0 *= 3;\n\n            // Precompute some numbers:\n            var u2 = u * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ouu2 = ou * u * 2;\n            var a = -3 * ou2;\n            var b = 3 * (ou2 - ouu2);\n            var c = 3 * (ouu2 - u2);\n            var d = 3 * u2;\n\n            var v2 = v * v;\n            var v3 = v2 * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ov3 = ov2 * ov;\n\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                // Compute the derivatives in the u-direction:\n                f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3];\n                f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3];\n                f2 = a * ak[j0 + 2][i0] + b * ak[j0 + 2][i0 + 1] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 2][i0 + 3];\n                f3 = a * ak[j0 + 3][i0] + b * ak[j0 + 3][i0 + 1] + c * ak[j0 + 3][i0 + 2] + d * ak[j0 + 3][i0 + 3];\n\n                // Now just interpolate in the v-direction since it's all separable:\n                out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3;\n            }\n\n            return out;\n        };\n    } else if(asmoothing) {\n        // Handle smooth in the a-direction but linear in the b-direction by performing four\n        // linear interpolations followed by one cubic interpolation of the result\n        return function(out, i0, j0, u, v) {\n            if(!out) out = [];\n            var f0, f1, k, ak;\n            i0 *= 3;\n            var u2 = u * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ouu2 = ou * u * 2;\n            var a = -3 * ou2;\n            var b = 3 * (ou2 - ouu2);\n            var c = 3 * (ouu2 - u2);\n            var d = 3 * u2;\n            var ov = 1 - v;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = a * ak[j0 ][i0] + b * ak[j0 ][i0 + 1] + c * ak[j0 ][i0 + 2] + d * ak[j0 ][i0 + 3];\n                f1 = a * ak[j0 + 1][i0] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 1][i0 + 2] + d * ak[j0 + 1][i0 + 3];\n\n                out[k] = ov * f0 + v * f1;\n            }\n            return out;\n        };\n    } else if(bsmoothing) {\n        // Same as the above case, except reversed. I've disabled the no-unused vars rule\n        // so that this function is fully interpolation-agnostic. Otherwise it would need\n        // to be called differently in different cases. Which wouldn't be the worst, but\n        /* eslint-disable no-unused-vars */\n        return function(out, i0, j0, u, v) {\n        /* eslint-enable no-unused-vars */\n            if(!out) out = [];\n            var f0, f1, f2, f3, k, ak;\n            j0 *= 3;\n            var v2 = v * v;\n            var v3 = v2 * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ov3 = ov2 * ov;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ak[j0][i0 + 1] - ak[j0][i0];\n                f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0];\n                f2 = ak[j0 + 2][i0 + 1] - ak[j0 + 2][i0];\n                f3 = ak[j0 + 3][i0 + 1] - ak[j0 + 3][i0];\n\n                out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3;\n            }\n            return out;\n        };\n    } else {\n        // Finally, both directions are linear:\n        /* eslint-disable no-unused-vars */\n        return function(out, i0, j0, u, v) {\n        /* eslint-enable no-unused-vars */\n            if(!out) out = [];\n            var f0, f1, k, ak;\n            var ov = 1 - v;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ak[j0][i0 + 1] - ak[j0][i0];\n                f1 = ak[j0 + 1][i0 + 1] - ak[j0 + 1][i0];\n\n                out[k] = ov * f0 + v * f1;\n            }\n            return out;\n        };\n    }\n};\n\n},{}],895:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function(arrays, asmoothing, bsmoothing) {\n    if(asmoothing && bsmoothing) {\n        return function(out, i0, j0, u, v) {\n            if(!out) out = [];\n            var f0, f1, f2, f3, ak, k;\n\n            // Since it's a grid of control points, the actual indices are * 3:\n            i0 *= 3;\n            j0 *= 3;\n\n            // Precompute some numbers:\n            var u2 = u * u;\n            var u3 = u2 * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ou3 = ou2 * ou;\n\n            var v2 = v * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ovv2 = ov * v * 2;\n            var a = -3 * ov2;\n            var b = 3 * (ov2 - ovv2);\n            var c = 3 * (ovv2 - v2);\n            var d = 3 * v2;\n\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n\n                // Compute the derivatives in the v-direction:\n                f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0];\n                f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1];\n                f2 = a * ak[j0][i0 + 2] + b * ak[j0 + 1][i0 + 2] + c * ak[j0 + 2][i0 + 2] + d * ak[j0 + 3][i0 + 2];\n                f3 = a * ak[j0][i0 + 3] + b * ak[j0 + 1][i0 + 3] + c * ak[j0 + 2][i0 + 3] + d * ak[j0 + 3][i0 + 3];\n\n                // Now just interpolate in the v-direction since it's all separable:\n                out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3;\n            }\n\n            return out;\n        };\n    } else if(asmoothing) {\n        // Handle smooth in the a-direction but linear in the b-direction by performing four\n        // linear interpolations followed by one cubic interpolation of the result\n        return function(out, i0, j0, v, u) {\n            if(!out) out = [];\n            var f0, f1, f2, f3, k, ak;\n            i0 *= 3;\n            var u2 = u * u;\n            var u3 = u2 * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ou3 = ou2 * ou;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n\n                f0 = ak[j0 + 1][i0] - ak[j0][i0];\n                f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1];\n                f2 = ak[j0 + 1][i0 + 2] - ak[j0][i0 + 2];\n                f3 = ak[j0 + 1][i0 + 3] - ak[j0][i0 + 3];\n\n                out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3;\n\n                // mathematically equivalent:\n                // f0 = ou3 * ak[j0    ][i0] + 3 * (ou2 * u * ak[j0    ][i0 + 1] + ou * u2 * ak[j0    ][i0 + 2]) + u3 * ak[j0    ][i0 + 3];\n                // f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3];\n                // out[k] = f1 - f0;\n            }\n            return out;\n        };\n    } else if(bsmoothing) {\n        // Same as the above case, except reversed:\n        /* eslint-disable no-unused-vars */\n        return function(out, i0, j0, u, v) {\n        /* eslint-enable no-unused-vars */\n            if(!out) out = [];\n            var f0, f1, k, ak;\n            j0 *= 3;\n            var ou = 1 - u;\n            var v2 = v * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ovv2 = ov * v * 2;\n            var a = -3 * ov2;\n            var b = 3 * (ov2 - ovv2);\n            var c = 3 * (ovv2 - v2);\n            var d = 3 * v2;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = a * ak[j0][i0] + b * ak[j0 + 1][i0] + c * ak[j0 + 2][i0] + d * ak[j0 + 3][i0];\n                f1 = a * ak[j0][i0 + 1] + b * ak[j0 + 1][i0 + 1] + c * ak[j0 + 2][i0 + 1] + d * ak[j0 + 3][i0 + 1];\n\n                out[k] = ou * f0 + u * f1;\n            }\n            return out;\n        };\n    } else {\n        // Finally, both directions are linear:\n        /* eslint-disable no-unused-vars */\n        return function(out, i0, j0, v, u) {\n        /* eslint-enable no-unused-vars */\n            if(!out) out = [];\n            var f0, f1, k, ak;\n            var ov = 1 - v;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ak[j0 + 1][i0] - ak[j0][i0];\n                f1 = ak[j0 + 1][i0 + 1] - ak[j0][i0 + 1];\n\n                out[k] = ov * f0 + v * f1;\n            }\n            return out;\n        };\n    }\n};\n\n},{}],896:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * Return a function that evaluates a set of linear or bicubic control points.\n * This will get evaluated a lot, so we'll at least do a bit of extra work to\n * flatten some of the choices. In particular, we'll unroll the linear/bicubic\n * combinations and we'll allow computing results in parallel to cut down\n * on repeated arithmetic.\n *\n * Take note that we don't search for the correct range in this function. The\n * reason is for consistency due to the corrresponding derivative function. In\n * particular, the derivatives aren't continuous across cells, so it's important\n * to be able control whether the derivative at a cell boundary is approached\n * from one side or the other.\n */\nmodule.exports = function(arrays, na, nb, asmoothing, bsmoothing) {\n    var imax = na - 2;\n    var jmax = nb - 2;\n\n    if(asmoothing && bsmoothing) {\n        return function(out, i, j) {\n            if(!out) out = [];\n            var f0, f1, f2, f3, ak, k;\n\n            var i0 = Math.max(0, Math.min(Math.floor(i), imax));\n            var j0 = Math.max(0, Math.min(Math.floor(j), jmax));\n            var u = Math.max(0, Math.min(1, i - i0));\n            var v = Math.max(0, Math.min(1, j - j0));\n\n            // Since it's a grid of control points, the actual indices are * 3:\n            i0 *= 3;\n            j0 *= 3;\n\n            // Precompute some numbers:\n            var u2 = u * u;\n            var u3 = u2 * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ou3 = ou2 * ou;\n\n            var v2 = v * v;\n            var v3 = v2 * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ov3 = ov2 * ov;\n\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ou3 * ak[j0][i0] + 3 * (ou2 * u * ak[j0][i0 + 1] + ou * u2 * ak[j0][i0 + 2]) + u3 * ak[j0][i0 + 3];\n                f1 = ou3 * ak[j0 + 1][i0] + 3 * (ou2 * u * ak[j0 + 1][i0 + 1] + ou * u2 * ak[j0 + 1][i0 + 2]) + u3 * ak[j0 + 1][i0 + 3];\n                f2 = ou3 * ak[j0 + 2][i0] + 3 * (ou2 * u * ak[j0 + 2][i0 + 1] + ou * u2 * ak[j0 + 2][i0 + 2]) + u3 * ak[j0 + 2][i0 + 3];\n                f3 = ou3 * ak[j0 + 3][i0] + 3 * (ou2 * u * ak[j0 + 3][i0 + 1] + ou * u2 * ak[j0 + 3][i0 + 2]) + u3 * ak[j0 + 3][i0 + 3];\n                out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3;\n            }\n\n            return out;\n        };\n    } else if(asmoothing) {\n        // Handle smooth in the a-direction but linear in the b-direction by performing four\n        // linear interpolations followed by one cubic interpolation of the result\n        return function(out, i, j) {\n            if(!out) out = [];\n\n            var i0 = Math.max(0, Math.min(Math.floor(i), imax));\n            var j0 = Math.max(0, Math.min(Math.floor(j), jmax));\n            var u = Math.max(0, Math.min(1, i - i0));\n            var v = Math.max(0, Math.min(1, j - j0));\n\n            var f0, f1, f2, f3, k, ak;\n            i0 *= 3;\n            var u2 = u * u;\n            var u3 = u2 * u;\n            var ou = 1 - u;\n            var ou2 = ou * ou;\n            var ou3 = ou2 * ou;\n            var ov = 1 - v;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ov * ak[j0][i0] + v * ak[j0 + 1][i0];\n                f1 = ov * ak[j0][i0 + 1] + v * ak[j0 + 1][i0 + 1];\n                f2 = ov * ak[j0][i0 + 2] + v * ak[j0 + 1][i0 + 1];\n                f3 = ov * ak[j0][i0 + 3] + v * ak[j0 + 1][i0 + 1];\n\n                out[k] = ou3 * f0 + 3 * (ou2 * u * f1 + ou * u2 * f2) + u3 * f3;\n            }\n            return out;\n        };\n    } else if(bsmoothing) {\n        // Same as the above case, except reversed:\n        return function(out, i, j) {\n            if(!out) out = [];\n\n            var i0 = Math.max(0, Math.min(Math.floor(i), imax));\n            var j0 = Math.max(0, Math.min(Math.floor(j), jmax));\n            var u = Math.max(0, Math.min(1, i - i0));\n            var v = Math.max(0, Math.min(1, j - j0));\n\n            var f0, f1, f2, f3, k, ak;\n            j0 *= 3;\n            var v2 = v * v;\n            var v3 = v2 * v;\n            var ov = 1 - v;\n            var ov2 = ov * ov;\n            var ov3 = ov2 * ov;\n            var ou = 1 - u;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1];\n                f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1];\n                f2 = ou * ak[j0 + 2][i0] + u * ak[j0 + 2][i0 + 1];\n                f3 = ou * ak[j0 + 3][i0] + u * ak[j0 + 3][i0 + 1];\n\n                out[k] = ov3 * f0 + 3 * (ov2 * v * f1 + ov * v2 * f2) + v3 * f3;\n            }\n            return out;\n        };\n    } else {\n        // Finally, both directions are linear:\n        return function(out, i, j) {\n            if(!out) out = [];\n\n            var i0 = Math.max(0, Math.min(Math.floor(i), imax));\n            var j0 = Math.max(0, Math.min(Math.floor(j), jmax));\n            var u = Math.max(0, Math.min(1, i - i0));\n            var v = Math.max(0, Math.min(1, j - j0));\n\n            var f0, f1, k, ak;\n            var ov = 1 - v;\n            var ou = 1 - u;\n            for(k = 0; k < arrays.length; k++) {\n                ak = arrays[k];\n                f0 = ou * ak[j0][i0] + u * ak[j0][i0 + 1];\n                f1 = ou * ak[j0 + 1][i0] + u * ak[j0 + 1][i0 + 1];\n\n                out[k] = ov * f0 + v * f1;\n            }\n            return out;\n        };\n    }\n};\n\n},{}],897:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleXYDefaults = _dereq_('./xy_defaults');\nvar handleABDefaults = _dereq_('./ab_defaults');\nvar attributes = _dereq_('./attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    traceOut._clipPathId = 'clip' + traceOut.uid + 'carpet';\n\n    var defaultColor = coerce('color', colorAttrs.defaultLine);\n    Lib.coerceFont(coerce, 'font');\n\n    coerce('carpet');\n\n    handleABDefaults(traceIn, traceOut, fullLayout, coerce, defaultColor);\n\n    if(!traceOut.a || !traceOut.b) {\n        traceOut.visible = false;\n        return;\n    }\n\n    if(traceOut.a.length < 3) {\n        traceOut.aaxis.smoothing = 0;\n    }\n\n    if(traceOut.b.length < 3) {\n        traceOut.baxis.smoothing = 0;\n    }\n\n    // NB: the input is x/y arrays. You should know that the *first* dimension of x and y\n    // corresponds to b and the second to a. This sounds backwards but ends up making sense\n    // the important part to know is that when you write y[j][i], j goes from 0 to b.length - 1\n    // and i goes from 0 to a.length - 1.\n    var validData = handleXYDefaults(traceIn, traceOut, coerce);\n    if(!validData) {\n        traceOut.visible = false;\n    }\n\n    if(traceOut._cheater) {\n        coerce('cheaterslope');\n    }\n};\n\n},{\"../../components/color/attributes\":579,\"../../lib\":703,\"./ab_defaults\":880,\"./attributes\":882,\"./xy_defaults\":906}],898:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    plot: _dereq_('./plot'),\n    calc: _dereq_('./calc'),\n    animatable: true,\n    isContainer: true, // so carpet traces get `calc` before other traces\n\n    moduleType: 'trace',\n    name: 'carpet',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'carpet', 'carpetAxis', 'notLegendIsolatable', 'noMultiCategory'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"./attributes\":882,\"./calc\":886,\"./defaults\":897,\"./plot\":903}],899:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/*\n * Given a trace, look up the carpet axis by carpet.\n */\nmodule.exports = function(gd, trace) {\n    var n = gd._fullData.length;\n    var firstAxis;\n    for(var i = 0; i < n; i++) {\n        var maybeCarpet = gd._fullData[i];\n\n        if(maybeCarpet.index === trace.index) continue;\n\n        if(maybeCarpet.type === 'carpet') {\n            if(!firstAxis) {\n                firstAxis = maybeCarpet;\n            }\n\n            if(maybeCarpet.carpet === trace.carpet) {\n                return maybeCarpet;\n            }\n        }\n    }\n\n    return firstAxis;\n};\n\n},{}],900:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function makePath(xp, yp, isBicubic) {\n    // Prevent d3 errors that would result otherwise:\n    if(xp.length === 0) return '';\n\n    var i;\n    var path = [];\n    var stride = isBicubic ? 3 : 1;\n    for(i = 0; i < xp.length; i += stride) {\n        path.push(xp[i] + ',' + yp[i]);\n\n        if(isBicubic && i < xp.length - stride) {\n            path.push('C');\n            path.push([\n                xp[i + 1] + ',' + yp[i + 1],\n                xp[i + 2] + ',' + yp[i + 2] + ' ',\n            ].join(' '));\n        }\n    }\n    return path.join(isBicubic ? '' : 'L');\n};\n\n},{}],901:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\n/*\n * Map an array of x or y coordinates (c) to screen-space pixel coordinates (p).\n * The output array is optional, but if provided, it will be reused without\n * reallocation to the extent possible.\n */\nmodule.exports = function mapArray(out, data, func) {\n    var i;\n\n    if(!isArrayOrTypedArray(out)) {\n        // If not an array, make it an array:\n        out = [];\n    } else if(out.length > data.length) {\n        // If too long, truncate. (If too short, it will grow\n        // automatically so we don't care about that case)\n        out = out.slice(0, data.length);\n    }\n\n    for(i = 0; i < data.length; i++) {\n        out[i] = func(data[i]);\n    }\n\n    return out;\n};\n\n},{\"../../lib\":703}],902:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = function orientText(trace, xaxis, yaxis, xy, dxy, refDxy) {\n    var dx = dxy[0] * trace.dpdx(xaxis);\n    var dy = dxy[1] * trace.dpdy(yaxis);\n    var flip = 1;\n\n    var offsetMultiplier = 1.0;\n    if(refDxy) {\n        var l1 = Math.sqrt(dxy[0] * dxy[0] + dxy[1] * dxy[1]);\n        var l2 = Math.sqrt(refDxy[0] * refDxy[0] + refDxy[1] * refDxy[1]);\n        var dot = (dxy[0] * refDxy[0] + dxy[1] * refDxy[1]) / l1 / l2;\n        offsetMultiplier = Math.max(0.0, dot);\n    }\n\n    var angle = Math.atan2(dy, dx) * 180 / Math.PI;\n    if(angle < -90) {\n        angle += 180;\n        flip = -flip;\n    } else if(angle > 90) {\n        angle -= 180;\n        flip = -flip;\n    }\n\n    return {\n        angle: angle,\n        flip: flip,\n        p: trace.c2p(xy, xaxis, yaxis),\n        offsetMultplier: offsetMultiplier\n    };\n};\n\n},{}],903:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Drawing = _dereq_('../../components/drawing');\nvar map1dArray = _dereq_('./map_1d_array');\nvar makepath = _dereq_('./makepath');\nvar orientText = _dereq_('./orient_text');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar Lib = _dereq_('../../lib');\nvar alignmentConstants = _dereq_('../../constants/alignment');\n\nmodule.exports = function plot(gd, plotinfo, cdcarpet, carpetLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var fullLayout = gd._fullLayout;\n    var clipLayer = fullLayout._clips;\n\n    Lib.makeTraceGroups(carpetLayer, cdcarpet, 'trace').each(function(cd) {\n        var axisLayer = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n        var aax = trace.aaxis;\n        var bax = trace.baxis;\n\n        var minorLayer = Lib.ensureSingle(axisLayer, 'g', 'minorlayer');\n        var majorLayer = Lib.ensureSingle(axisLayer, 'g', 'majorlayer');\n        var boundaryLayer = Lib.ensureSingle(axisLayer, 'g', 'boundarylayer');\n        var labelLayer = Lib.ensureSingle(axisLayer, 'g', 'labellayer');\n\n        axisLayer.style('opacity', trace.opacity);\n\n        drawGridLines(xa, ya, majorLayer, aax, 'a', aax._gridlines, true);\n        drawGridLines(xa, ya, majorLayer, bax, 'b', bax._gridlines, true);\n        drawGridLines(xa, ya, minorLayer, aax, 'a', aax._minorgridlines, true);\n        drawGridLines(xa, ya, minorLayer, bax, 'b', bax._minorgridlines, true);\n\n        // NB: These are not ommitted if the lines are not active. The joins must be executed\n        // in order for them to get cleaned up without a full redraw\n        drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines);\n        drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines);\n\n        var labelOrientationA = drawAxisLabels(gd, xa, ya, trace, cd0, labelLayer, aax._labels, 'a-label');\n        var labelOrientationB = drawAxisLabels(gd, xa, ya, trace, cd0, labelLayer, bax._labels, 'b-label');\n\n        drawAxisTitles(gd, labelLayer, trace, cd0, xa, ya, labelOrientationA, labelOrientationB);\n\n        drawClipPath(trace, cd0, clipLayer, xa, ya);\n    });\n};\n\nfunction drawClipPath(trace, t, layer, xaxis, yaxis) {\n    var seg, xp, yp, i;\n\n    var clip = layer.select('#' + trace._clipPathId);\n\n    if(!clip.size()) {\n        clip = layer.append('clipPath')\n            .classed('carpetclip', true);\n    }\n\n    var path = Lib.ensureSingle(clip, 'path', 'carpetboundary');\n    var segments = t.clipsegments;\n    var segs = [];\n\n    for(i = 0; i < segments.length; i++) {\n        seg = segments[i];\n        xp = map1dArray([], seg.x, xaxis.c2p);\n        yp = map1dArray([], seg.y, yaxis.c2p);\n        segs.push(makepath(xp, yp, seg.bicubic));\n    }\n\n    // This could be optimized ever so slightly to avoid no-op L segments\n    // at the corners, but it's so negligible that I don't think it's worth\n    // the extra complexity\n    var clipPathData = 'M' + segs.join('L') + 'Z';\n    clip.attr('id', trace._clipPathId);\n    path.attr('d', clipPathData);\n}\n\nfunction drawGridLines(xaxis, yaxis, layer, axis, axisLetter, gridlines) {\n    var lineClass = 'const-' + axisLetter + '-lines';\n    var gridJoin = layer.selectAll('.' + lineClass).data(gridlines);\n\n    gridJoin.enter().append('path')\n        .classed(lineClass, true)\n        .style('vector-effect', 'non-scaling-stroke');\n\n    gridJoin.each(function(d) {\n        var gridline = d;\n        var x = gridline.x;\n        var y = gridline.y;\n\n        var xp = map1dArray([], x, xaxis.c2p);\n        var yp = map1dArray([], y, yaxis.c2p);\n\n        var path = 'M' + makepath(xp, yp, gridline.smoothing);\n\n        var el = d3.select(this);\n\n        el.attr('d', path)\n            .style('stroke-width', gridline.width)\n            .style('stroke', gridline.color)\n            .style('fill', 'none');\n    });\n\n    gridJoin.exit().remove();\n}\n\nfunction drawAxisLabels(gd, xaxis, yaxis, trace, t, layer, labels, labelClass) {\n    var labelJoin = layer.selectAll('text.' + labelClass).data(labels);\n\n    labelJoin.enter().append('text')\n        .classed(labelClass, true);\n\n    var maxExtent = 0;\n    var labelOrientation = {};\n\n    labelJoin.each(function(label, i) {\n        // Most of the positioning is done in calc_labels. Only the parts that depend upon\n        // the screen space representation of the x and y axes are here:\n        var orientation;\n        if(label.axis.tickangle === 'auto') {\n            orientation = orientText(trace, xaxis, yaxis, label.xy, label.dxy);\n        } else {\n            var angle = (label.axis.tickangle + 180.0) * Math.PI / 180.0;\n            orientation = orientText(trace, xaxis, yaxis, label.xy, [Math.cos(angle), Math.sin(angle)]);\n        }\n\n        if(!i) {\n            // TODO: offsetMultiplier? Not currently used anywhere...\n            labelOrientation = {angle: orientation.angle, flip: orientation.flip};\n        }\n        var direction = (label.endAnchor ? -1 : 1) * orientation.flip;\n\n        var labelEl = d3.select(this)\n            .attr({\n                'text-anchor': direction > 0 ? 'start' : 'end',\n                'data-notex': 1\n            })\n            .call(Drawing.font, label.font)\n            .text(label.text)\n            .call(svgTextUtils.convertToTspans, gd);\n\n        var bbox = Drawing.bBox(this);\n\n        labelEl.attr('transform',\n                // Translate to the correct point:\n                'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' +\n                // Rotate to line up with grid line tangent:\n                'rotate(' + orientation.angle + ')' +\n                // Adjust the baseline and indentation:\n                'translate(' + label.axis.labelpadding * direction + ',' + bbox.height * 0.3 + ')'\n            );\n\n        maxExtent = Math.max(maxExtent, bbox.width + label.axis.labelpadding);\n    });\n\n    labelJoin.exit().remove();\n\n    labelOrientation.maxExtent = maxExtent;\n    return labelOrientation;\n}\n\nfunction drawAxisTitles(gd, layer, trace, t, xa, ya, labelOrientationA, labelOrientationB) {\n    var a, b, xy, dxy;\n\n    var aMin = Lib.aggNums(Math.min, null, trace.a);\n    var aMax = Lib.aggNums(Math.max, null, trace.a);\n    var bMin = Lib.aggNums(Math.min, null, trace.b);\n    var bMax = Lib.aggNums(Math.max, null, trace.b);\n\n    a = 0.5 * (aMin + aMax);\n    b = bMin;\n    xy = trace.ab2xy(a, b, true);\n    dxy = trace.dxyda_rough(a, b);\n    if(labelOrientationA.angle === undefined) {\n        Lib.extendFlat(labelOrientationA, orientText(trace, xa, ya, xy, trace.dxydb_rough(a, b)));\n    }\n    drawAxisTitle(gd, layer, trace, t, xy, dxy, trace.aaxis, xa, ya, labelOrientationA, 'a-title');\n\n    a = aMin;\n    b = 0.5 * (bMin + bMax);\n    xy = trace.ab2xy(a, b, true);\n    dxy = trace.dxydb_rough(a, b);\n    if(labelOrientationB.angle === undefined) {\n        Lib.extendFlat(labelOrientationB, orientText(trace, xa, ya, xy, trace.dxyda_rough(a, b)));\n    }\n    drawAxisTitle(gd, layer, trace, t, xy, dxy, trace.baxis, xa, ya, labelOrientationB, 'b-title');\n}\n\nvar lineSpacing = alignmentConstants.LINE_SPACING;\nvar midShift = ((1 - alignmentConstants.MID_SHIFT) / lineSpacing) + 1;\n\nfunction drawAxisTitle(gd, layer, trace, t, xy, dxy, axis, xa, ya, labelOrientation, labelClass) {\n    var data = [];\n    if(axis.title.text) data.push(axis.title.text);\n    var titleJoin = layer.selectAll('text.' + labelClass).data(data);\n    var offset = labelOrientation.maxExtent;\n\n    titleJoin.enter().append('text')\n        .classed(labelClass, true);\n\n    // There's only one, but we'll do it as a join so it's updated nicely:\n    titleJoin.each(function() {\n        var orientation = orientText(trace, xa, ya, xy, dxy);\n\n        if(['start', 'both'].indexOf(axis.showticklabels) === -1) {\n            offset = 0;\n        }\n\n        // In addition to the size of the labels, add on some extra padding:\n        var titleSize = axis.title.font.size;\n        offset += titleSize + axis.title.offset;\n\n        var labelNorm = labelOrientation.angle + (labelOrientation.flip < 0 ? 180 : 0);\n        var angleDiff = (labelNorm - orientation.angle + 450) % 360;\n        var reverseTitle = angleDiff > 90 && angleDiff < 270;\n\n        var el = d3.select(this);\n\n        el.text(axis.title.text)\n            .call(svgTextUtils.convertToTspans, gd);\n\n        if(reverseTitle) {\n            offset = (-svgTextUtils.lineCount(el) + midShift) * lineSpacing * titleSize - offset;\n        }\n\n        el.attr('transform',\n                'translate(' + orientation.p[0] + ',' + orientation.p[1] + ') ' +\n                'rotate(' + orientation.angle + ') ' +\n                'translate(0,' + offset + ')'\n            )\n            .classed('user-select-none', true)\n            .attr('text-anchor', 'middle')\n            .call(Drawing.font, axis.title.font);\n    });\n\n    titleJoin.exit().remove();\n}\n\n},{\"../../components/drawing\":601,\"../../constants/alignment\":675,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"./makepath\":900,\"./map_1d_array\":901,\"./orient_text\":902,\"d3\":157}],904:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar constants = _dereq_('./constants');\nvar search = _dereq_('../../lib/search').findBin;\nvar computeControlPoints = _dereq_('./compute_control_points');\nvar createSplineEvaluator = _dereq_('./create_spline_evaluator');\nvar createIDerivativeEvaluator = _dereq_('./create_i_derivative_evaluator');\nvar createJDerivativeEvaluator = _dereq_('./create_j_derivative_evaluator');\n\n/*\n * Create conversion functions to go from one basis to another. In particular the letter\n * abbreviations are:\n *\n *   i: i/j coordinates along the grid. Integer values correspond to data points\n *   a: real-valued coordinates along the a/b axes\n *   c: cartesian x-y coordinates\n *   p: screen-space pixel coordinates\n */\nmodule.exports = function setConvert(trace) {\n    var a = trace._a;\n    var b = trace._b;\n    var na = a.length;\n    var nb = b.length;\n    var aax = trace.aaxis;\n    var bax = trace.baxis;\n\n    // Grab the limits once rather than recomputing the bounds for every point\n    // independently:\n    var amin = a[0];\n    var amax = a[na - 1];\n    var bmin = b[0];\n    var bmax = b[nb - 1];\n    var arange = a[a.length - 1] - a[0];\n    var brange = b[b.length - 1] - b[0];\n\n    // Compute the tolerance so that points are visible slightly outside the\n    // defined carpet axis:\n    var atol = arange * constants.RELATIVE_CULL_TOLERANCE;\n    var btol = brange * constants.RELATIVE_CULL_TOLERANCE;\n\n    // Expand the limits to include the relative tolerance:\n    amin -= atol;\n    amax += atol;\n    bmin -= btol;\n    bmax += btol;\n\n    trace.isVisible = function(a, b) {\n        return a > amin && a < amax && b > bmin && b < bmax;\n    };\n\n    trace.isOccluded = function(a, b) {\n        return a < amin || a > amax || b < bmin || b > bmax;\n    };\n\n    trace.setScale = function() {\n        var x = trace._x;\n        var y = trace._y;\n\n        // This is potentially a very expensive step! It does the bulk of the work of constructing\n        // an expanded basis of control points. Note in particular that it overwrites the existing\n        // basis without creating a new array since that would potentially thrash the garbage\n        // collector.\n        var result = computeControlPoints(trace._xctrl, trace._yctrl, x, y, aax.smoothing, bax.smoothing);\n        trace._xctrl = result[0];\n        trace._yctrl = result[1];\n\n        // This step is the second step in the process, but it's somewhat simpler. It just unrolls\n        // some logic since it would be unnecessarily expensive to compute both interpolations\n        // nearly identically but separately and to include a bunch of linear vs. bicubic logic in\n        // every single call.\n        trace.evalxy = createSplineEvaluator([trace._xctrl, trace._yctrl], na, nb, aax.smoothing, bax.smoothing);\n\n        trace.dxydi = createIDerivativeEvaluator([trace._xctrl, trace._yctrl], aax.smoothing, bax.smoothing);\n        trace.dxydj = createJDerivativeEvaluator([trace._xctrl, trace._yctrl], aax.smoothing, bax.smoothing);\n    };\n\n    /*\n     * Convert from i/j data grid coordinates to a/b values. Note in particular that this\n     * is *linear* interpolation, even if the data is interpolated bicubically.\n     */\n    trace.i2a = function(i) {\n        var i0 = Math.max(0, Math.floor(i[0]), na - 2);\n        var ti = i[0] - i0;\n        return (1 - ti) * a[i0] + ti * a[i0 + 1];\n    };\n\n    trace.j2b = function(j) {\n        var j0 = Math.max(0, Math.floor(j[1]), na - 2);\n        var tj = j[1] - j0;\n        return (1 - tj) * b[j0] + tj * b[j0 + 1];\n    };\n\n    trace.ij2ab = function(ij) {\n        return [trace.i2a(ij[0]), trace.j2b(ij[1])];\n    };\n\n    /*\n     * Convert from a/b coordinates to i/j grid-numbered coordinates. This requires searching\n     * through the a/b data arrays and assumes they are monotonic, which is presumed to have\n     * been enforced already.\n     */\n    trace.a2i = function(aval) {\n        var i0 = Math.max(0, Math.min(search(aval, a), na - 2));\n        var a0 = a[i0];\n        var a1 = a[i0 + 1];\n        return Math.max(0, Math.min(na - 1, i0 + (aval - a0) / (a1 - a0)));\n    };\n\n    trace.b2j = function(bval) {\n        var j0 = Math.max(0, Math.min(search(bval, b), nb - 2));\n        var b0 = b[j0];\n        var b1 = b[j0 + 1];\n        return Math.max(0, Math.min(nb - 1, j0 + (bval - b0) / (b1 - b0)));\n    };\n\n    trace.ab2ij = function(ab) {\n        return [trace.a2i(ab[0]), trace.b2j(ab[1])];\n    };\n\n    /*\n     * Convert from i/j coordinates to x/y caretesian coordinates. This means either bilinear\n     * or bicubic spline evaluation, but the hard part is already done at this point.\n     */\n    trace.i2c = function(i, j) {\n        return trace.evalxy([], i, j);\n    };\n\n    trace.ab2xy = function(aval, bval, extrapolate) {\n        if(!extrapolate && (aval < a[0] || aval > a[na - 1] | bval < b[0] || bval > b[nb - 1])) {\n            return [false, false];\n        }\n        var i = trace.a2i(aval);\n        var j = trace.b2j(bval);\n\n        var pt = trace.evalxy([], i, j);\n\n        if(extrapolate) {\n            // This section uses the boundary derivatives to extrapolate linearly outside\n            // the defined range. Consider a scatter line with one point inside the carpet\n            // axis and one point outside. If we don't extrapolate, we can't draw the line\n            // at all.\n            var iex = 0;\n            var jex = 0;\n            var der = [];\n\n            var i0, ti, j0, tj;\n            if(aval < a[0]) {\n                i0 = 0;\n                ti = 0;\n                iex = (aval - a[0]) / (a[1] - a[0]);\n            } else if(aval > a[na - 1]) {\n                i0 = na - 2;\n                ti = 1;\n                iex = (aval - a[na - 1]) / (a[na - 1] - a[na - 2]);\n            } else {\n                i0 = Math.max(0, Math.min(na - 2, Math.floor(i)));\n                ti = i - i0;\n            }\n\n            if(bval < b[0]) {\n                j0 = 0;\n                tj = 0;\n                jex = (bval - b[0]) / (b[1] - b[0]);\n            } else if(bval > b[nb - 1]) {\n                j0 = nb - 2;\n                tj = 1;\n                jex = (bval - b[nb - 1]) / (b[nb - 1] - b[nb - 2]);\n            } else {\n                j0 = Math.max(0, Math.min(nb - 2, Math.floor(j)));\n                tj = j - j0;\n            }\n\n            if(iex) {\n                trace.dxydi(der, i0, j0, ti, tj);\n                pt[0] += der[0] * iex;\n                pt[1] += der[1] * iex;\n            }\n\n            if(jex) {\n                trace.dxydj(der, i0, j0, ti, tj);\n                pt[0] += der[0] * jex;\n                pt[1] += der[1] * jex;\n            }\n        }\n\n        return pt;\n    };\n\n\n    trace.c2p = function(xy, xa, ya) {\n        return [xa.c2p(xy[0]), ya.c2p(xy[1])];\n    };\n\n    trace.p2x = function(p, xa, ya) {\n        return [xa.p2c(p[0]), ya.p2c(p[1])];\n    };\n\n    trace.dadi = function(i /* , u*/) {\n        // Right now only a piecewise linear a or b basis is permitted since smoother interpolation\n        // would cause monotonicity problems. As a retult, u is entirely disregarded in this\n        // computation, though we'll specify it as a parameter for the sake of completeness and\n        // future-proofing. It would be possible to use monotonic cubic interpolation, for example.\n        //\n        // See: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n\n        // u = u || 0;\n\n        var i0 = Math.max(0, Math.min(a.length - 2, i));\n\n        // The step (demoninator) is implicitly 1 since that's the grid spacing.\n        return a[i0 + 1] - a[i0];\n    };\n\n    trace.dbdj = function(j /* , v*/) {\n        // See above caveats for dadi which also apply here\n        var j0 = Math.max(0, Math.min(b.length - 2, j));\n\n        // The step (demoninator) is implicitly 1 since that's the grid spacing.\n        return b[j0 + 1] - b[j0];\n    };\n\n    // Takes: grid cell coordinate (i, j) and fractional grid cell coordinates (u, v)\n    // Returns: (dx/da, dy/db)\n    //\n    // NB: separate grid cell + fractional grid cell coordinate format is due to the discontinuous\n    // derivative, as described better in create_i_derivative_evaluator.js\n    trace.dxyda = function(i0, j0, u, v) {\n        var dxydi = trace.dxydi(null, i0, j0, u, v);\n        var dadi = trace.dadi(i0, u);\n\n        return [dxydi[0] / dadi, dxydi[1] / dadi];\n    };\n\n    trace.dxydb = function(i0, j0, u, v) {\n        var dxydj = trace.dxydj(null, i0, j0, u, v);\n        var dbdj = trace.dbdj(j0, v);\n\n        return [dxydj[0] / dbdj, dxydj[1] / dbdj];\n    };\n\n    // Sometimes we don't care about precision and all we really want is decent rough\n    // directions (as is the case with labels). In that case, we can do a very rough finite\n    // difference and spare having to worry about precise grid coordinates:\n    trace.dxyda_rough = function(a, b, reldiff) {\n        var h = arange * (reldiff || 0.1);\n        var plus = trace.ab2xy(a + h, b, true);\n        var minus = trace.ab2xy(a - h, b, true);\n\n        return [\n            (plus[0] - minus[0]) * 0.5 / h,\n            (plus[1] - minus[1]) * 0.5 / h\n        ];\n    };\n\n    trace.dxydb_rough = function(a, b, reldiff) {\n        var h = brange * (reldiff || 0.1);\n        var plus = trace.ab2xy(a, b + h, true);\n        var minus = trace.ab2xy(a, b - h, true);\n\n        return [\n            (plus[0] - minus[0]) * 0.5 / h,\n            (plus[1] - minus[1]) * 0.5 / h\n        ];\n    };\n\n    trace.dpdx = function(xa) {\n        return xa._m;\n    };\n\n    trace.dpdy = function(ya) {\n        return ya._m;\n    };\n};\n\n},{\"../../lib/search\":722,\"./compute_control_points\":892,\"./constants\":893,\"./create_i_derivative_evaluator\":894,\"./create_j_derivative_evaluator\":895,\"./create_spline_evaluator\":896}],905:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n/*\n * Given a 2D array as well as a basis in either direction, this function fills in the\n * 2D array using a combination of smoothing and extrapolation. This is rather important\n * for carpet plots since it's used for layout so that we can't simply omit or blank out\n * points. We need a reasonable guess so that the interpolation puts points somewhere\n * even if we were to somehow represent that the data was missing later on.\n *\n * input:\n *  - data: 2D array of arrays\n *  - a: array such that a.length === data[0].length\n *  - b: array such that b.length === data.length\n */\nmodule.exports = function smoothFill2dArray(data, a, b) {\n    var i, j, k;\n    var ip = [];\n    var jp = [];\n    // var neighborCnts = [];\n\n    var ni = data[0].length;\n    var nj = data.length;\n\n    function avgSurrounding(i, j) {\n        // As a low-quality start, we can simply average surrounding points (in a not\n        // non-uniform grid aware manner):\n        var sum = 0.0;\n        var val;\n        var cnt = 0;\n        if(i > 0 && (val = data[j][i - 1]) !== undefined) {\n            cnt++;\n            sum += val;\n        }\n        if(i < ni - 1 && (val = data[j][i + 1]) !== undefined) {\n            cnt++;\n            sum += val;\n        }\n        if(j > 0 && (val = data[j - 1][i]) !== undefined) {\n            cnt++;\n            sum += val;\n        }\n        if(j < nj - 1 && (val = data[j + 1][i]) !== undefined) {\n            cnt++;\n            sum += val;\n        }\n        return sum / Math.max(1, cnt);\n    }\n\n    // This loop iterates over all cells. Any cells that are null will be noted and those\n    // are the only points we will loop over and update via laplace's equation. Points with\n    // any neighbors will receive the average. If there are no neighboring points, then they\n    // will be set to zero. Also as we go, track the maximum magnitude so that we can scale\n    // our tolerance accordingly.\n    var dmax = 0.0;\n    for(i = 0; i < ni; i++) {\n        for(j = 0; j < nj; j++) {\n            if(data[j][i] === undefined) {\n                ip.push(i);\n                jp.push(j);\n\n                data[j][i] = avgSurrounding(i, j);\n                // neighborCnts.push(result.neighbors);\n            }\n            dmax = Math.max(dmax, Math.abs(data[j][i]));\n        }\n    }\n\n    if(!ip.length) return data;\n\n    // The tolerance doesn't need to be excessive. It's just for display positioning\n    var dxp, dxm, dap, dam, dbp, dbm, c, d, diff, reldiff, overrelaxation;\n    var tol = 1e-5;\n    var resid = 0;\n    var itermax = 100;\n    var iter = 0;\n    var n = ip.length;\n    do {\n        resid = 0;\n        // Normally we'd loop in two dimensions, but not all points are blank and need\n        // an update, so we instead loop only over the points that were tabulated above\n        for(k = 0; k < n; k++) {\n            i = ip[k];\n            j = jp[k];\n            // neighborCnt = neighborCnts[k];\n\n            // Track a counter for how many contributions there are. We'll use this counter\n            // to average at the end, which reduces to laplace's equation with neumann boundary\n            // conditions on the first derivative (second derivative is zero so that we get\n            // a nice linear extrapolation at the boundaries).\n            var boundaryCnt = 0;\n            var newVal = 0;\n\n            var d0, d1, x0, x1, i0, j0;\n            if(i === 0) {\n                // If this lies along the i = 0 boundary, extrapolate from the two points\n                // to the right of this point. Note that the finite differences take into\n                // account non-uniform grid spacing:\n                i0 = Math.min(ni - 1, 2);\n                x0 = a[i0];\n                x1 = a[1];\n                d0 = data[j][i0];\n                d1 = data[j][1];\n                newVal += d1 + (d1 - d0) * (a[0] - x1) / (x1 - x0);\n                boundaryCnt++;\n            } else if(i === ni - 1) {\n                // If along the high i boundary, extrapolate from the two points to the\n                // left of this point\n                i0 = Math.max(0, ni - 3);\n                x0 = a[i0];\n                x1 = a[ni - 2];\n                d0 = data[j][i0];\n                d1 = data[j][ni - 2];\n                newVal += d1 + (d1 - d0) * (a[ni - 1] - x1) / (x1 - x0);\n                boundaryCnt++;\n            }\n\n            if((i === 0 || i === ni - 1) && (j > 0 && j < nj - 1)) {\n                // If along the min(i) or max(i) boundaries, also smooth vertically as long\n                // as we're not in a corner. Note that the finite differences used here\n                // are also aware of nonuniform grid spacing:\n                dxp = b[j + 1] - b[j];\n                dxm = b[j] - b[j - 1];\n                newVal += (dxm * data[j + 1][i] + dxp * data[j - 1][i]) / (dxm + dxp);\n                boundaryCnt++;\n            }\n\n            if(j === 0) {\n                // If along the j = 0 boundary, extrpolate this point from the two points\n                // above it\n                j0 = Math.min(nj - 1, 2);\n                x0 = b[j0];\n                x1 = b[1];\n                d0 = data[j0][i];\n                d1 = data[1][i];\n                newVal += d1 + (d1 - d0) * (b[0] - x1) / (x1 - x0);\n                boundaryCnt++;\n            } else if(j === nj - 1) {\n                // Same for the max j boundary from the cells below it:\n                j0 = Math.max(0, nj - 3);\n                x0 = b[j0];\n                x1 = b[nj - 2];\n                d0 = data[j0][i];\n                d1 = data[nj - 2][i];\n                newVal += d1 + (d1 - d0) * (b[nj - 1] - x1) / (x1 - x0);\n                boundaryCnt++;\n            }\n\n            if((j === 0 || j === nj - 1) && (i > 0 && i < ni - 1)) {\n                // Now average points to the left/right as long as not in a corner:\n                dxp = a[i + 1] - a[i];\n                dxm = a[i] - a[i - 1];\n                newVal += (dxm * data[j][i + 1] + dxp * data[j][i - 1]) / (dxm + dxp);\n                boundaryCnt++;\n            }\n\n            if(!boundaryCnt) {\n                // If none of the above conditions were triggered, then this is an interior\n                // point and we can just do a laplace equation update. As above, these differences\n                // are aware of nonuniform grid spacing:\n                dap = a[i + 1] - a[i];\n                dam = a[i] - a[i - 1];\n                dbp = b[j + 1] - b[j];\n                dbm = b[j] - b[j - 1];\n\n                // These are just some useful constants for the iteration, which is perfectly\n                // straightforward but a little long to derive from f_xx + f_yy = 0.\n                c = dap * dam * (dap + dam);\n                d = dbp * dbm * (dbp + dbm);\n\n                newVal = (c * (dbm * data[j + 1][i] + dbp * data[j - 1][i]) +\n                          d * (dam * data[j][i + 1] + dap * data[j][i - 1])) /\n                          (d * (dam + dap) + c * (dbm + dbp));\n            } else {\n                // If we did have contributions from the boundary conditions, then average\n                // the result from the various contributions:\n                newVal /= boundaryCnt;\n            }\n\n            // Jacobi updates are ridiculously slow to converge, so this approach uses a\n            // Gauss-seidel iteration which is dramatically faster.\n            diff = newVal - data[j][i];\n            reldiff = diff / dmax;\n            resid += reldiff * reldiff;\n\n            // Gauss-Seidel-ish iteration, omega chosen based on heuristics and some\n            // quick tests.\n            //\n            // NB: Don't overrelax the boundarie. Otherwise set an overrelaxation factor\n            // which is a little low but safely optimal-ish:\n            overrelaxation = boundaryCnt ? 0 : 0.85;\n\n            // If there are four non-null neighbors, then we want a simple average without\n            // overrelaxation. If all the surrouding points are null, then we want the full\n            // overrelaxation\n            //\n            // Based on experiments, this actually seems to slow down convergence just a bit.\n            // I'll leave it here for reference in case this needs to be revisited, but\n            // it seems to work just fine without this.\n            // if (overrelaxation) overrelaxation *= (4 - neighborCnt) / 4;\n\n            data[j][i] += diff * (1 + overrelaxation);\n        }\n\n        resid = Math.sqrt(resid);\n    } while(iter++ < itermax && resid > tol);\n\n    Lib.log('Smoother converged to', resid, 'after', iter, 'iterations');\n\n    return data;\n};\n\n},{\"../../lib\":703}],906:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isArray1D = _dereq_('../../lib').isArray1D;\n\nmodule.exports = function handleXYDefaults(traceIn, traceOut, coerce) {\n    var x = coerce('x');\n    var hasX = x && x.length;\n    var y = coerce('y');\n    var hasY = y && y.length;\n    if(!hasX && !hasY) return false;\n\n    traceOut._cheater = !x;\n\n    if((!hasX || isArray1D(x)) && (!hasY || isArray1D(y))) {\n        var len = hasX ? x.length : Infinity;\n        if(hasY) len = Math.min(len, y.length);\n        if(traceOut.a && traceOut.a.length) len = Math.min(len, traceOut.a.length);\n        if(traceOut.b && traceOut.b.length) len = Math.min(len, traceOut.b.length);\n        traceOut._length = len;\n    } else traceOut._length = null;\n\n    return true;\n};\n\n},{\"../../lib\":703}],907:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar scatterGeoAttrs = _dereq_('../scattergeo/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterGeoMarkerLineAttrs = scatterGeoAttrs.marker.line;\n\nmodule.exports = extendFlat({\n    locations: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    locationmode: scatterGeoAttrs.locationmode,\n    z: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    text: extendFlat({}, scatterGeoAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterGeoAttrs.hovertext, {\n        \n    }),\n    marker: {\n        line: {\n            color: scatterGeoMarkerLineAttrs.color,\n            width: extendFlat({}, scatterGeoMarkerLineAttrs.width, {dflt: 1}),\n            editType: 'calc'\n        },\n        opacity: {\n            valType: 'number',\n            arrayOk: true,\n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n            editType: 'style',\n            \n        },\n        editType: 'calc'\n    },\n\n    selected: {\n        marker: {\n            opacity: scatterGeoAttrs.selected.marker.opacity,\n            editType: 'plot'\n        },\n        editType: 'plot'\n    },\n    unselected: {\n        marker: {\n            opacity: scatterGeoAttrs.unselected.marker.opacity,\n            editType: 'plot'\n        },\n        editType: 'plot'\n    },\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        editType: 'calc',\n        flags: ['location', 'z', 'text', 'name']\n    }),\n    hovertemplate: hovertemplateAttrs(),\n},\n\n    colorScaleAttrs('', {\n        cLetter: 'z',\n        editTypeOverride: 'calc'\n    })\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../scattergeo/attributes\":1114}],908:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\n\nmodule.exports = function calc(gd, trace) {\n    var len = trace._length;\n    var calcTrace = new Array(len);\n\n    for(var i = 0; i < len; i++) {\n        var calcPt = calcTrace[i] = {};\n        var loc = trace.locations[i];\n        var z = trace.z[i];\n\n        calcPt.loc = typeof loc === 'string' ? loc : null;\n        calcPt.z = isNumeric(z) ? z : BADNUM;\n    }\n\n    arraysToCalcdata(calcTrace, trace);\n    colorscaleCalc(gd, trace, {\n        vals: trace.z,\n        containerStr: '',\n        cLetter: 'z'\n    });\n    calcSelection(calcTrace, trace);\n\n    return calcTrace;\n};\n\n},{\"../../components/colorscale/calc\":588,\"../../constants/numerical\":680,\"../scatter/arrays_to_calcdata\":1074,\"../scatter/calc_selection\":1077,\"fast-isnumeric\":224}],909:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var locations = coerce('locations');\n    var z = coerce('z');\n\n    if(!(locations && locations.length && Lib.isArrayOrTypedArray(z) && z.length)) {\n        traceOut.visible = false;\n        return;\n    }\n    traceOut._length = Math.min(locations.length, z.length);\n\n    coerce('locationmode');\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    coerce('marker.line.color');\n    coerce('marker.line.width');\n    coerce('marker.opacity');\n\n    colorscaleDefaults(\n        traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}\n    );\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"./attributes\":907}],910:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = function eventData(out, pt) {\n    out.location = pt.location;\n    out.z = pt.z;\n\n    return out;\n};\n\n},{}],911:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar attributes = _dereq_('./attributes');\nvar fillText = _dereq_('../../lib').fillText;\n\nmodule.exports = function hoverPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var geo = pointData.subplot;\n\n    var pt, i, j, isInside;\n\n    for(i = 0; i < cd.length; i++) {\n        pt = cd[i];\n        isInside = false;\n\n        if(pt._polygons) {\n            for(j = 0; j < pt._polygons.length; j++) {\n                if(pt._polygons[j].contains([xval, yval])) {\n                    isInside = !isInside;\n                }\n                // for polygons that cross antimeridian as xval is in [-180, 180]\n                if(pt._polygons[j].contains([xval + 360, yval])) {\n                    isInside = !isInside;\n                }\n            }\n\n            if(isInside) break;\n        }\n    }\n\n    if(!isInside || !pt) return;\n\n    pointData.x0 = pointData.x1 = pointData.xa.c2p(pt.ct);\n    pointData.y0 = pointData.y1 = pointData.ya.c2p(pt.ct);\n\n    pointData.index = pt.index;\n    pointData.location = pt.loc;\n    pointData.z = pt.z;\n    pointData.hovertemplate = pt.hovertemplate;\n\n    makeHoverInfo(pointData, trace, pt, geo.mockAxis);\n\n    return [pointData];\n};\n\nfunction makeHoverInfo(pointData, trace, pt, axis) {\n    if(trace.hovertemplate) {\n        return;\n    }\n\n    var hoverinfo = pt.hi || trace.hoverinfo;\n\n    var parts = (hoverinfo === 'all') ?\n        attributes.hoverinfo.flags :\n        hoverinfo.split('+');\n\n    var hasName = (parts.indexOf('name') !== -1);\n    var hasLocation = (parts.indexOf('location') !== -1);\n    var hasZ = (parts.indexOf('z') !== -1);\n    var hasText = (parts.indexOf('text') !== -1);\n    var hasIdAsNameLabel = !hasName && hasLocation;\n\n    var text = [];\n\n    function formatter(val) {\n        return Axes.tickText(axis, axis.c2l(val), 'hover').text;\n    }\n\n    if(hasIdAsNameLabel) {\n        pointData.nameOverride = pt.loc;\n    } else {\n        if(hasName) pointData.nameOverride = trace.name;\n        if(hasLocation) text.push(pt.loc);\n    }\n\n    if(hasZ) text.push(formatter(pt.z));\n    if(hasText) {\n        fillText(pt, trace, text);\n    }\n\n    pointData.extraText = text.join('<br>');\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"./attributes\":907}],912:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../heatmap/colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style').style,\n    styleOnSelect: _dereq_('./style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    eventData: _dereq_('./event_data'),\n    selectPoints: _dereq_('./select'),\n\n    moduleType: 'trace',\n    name: 'choropleth',\n    basePlotModule: _dereq_('../../plots/geo'),\n    categories: ['geo', 'noOpacity'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/geo\":781,\"../heatmap/colorbar\":975,\"./attributes\":907,\"./calc\":908,\"./defaults\":909,\"./event_data\":910,\"./hover\":911,\"./plot\":913,\"./select\":914,\"./style\":915}],913:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\nvar polygon = _dereq_('../../lib/polygon');\n\nvar getTopojsonFeatures = _dereq_('../../lib/topojson_utils').getTopojsonFeatures;\nvar locationToFeature = _dereq_('../../lib/geo_location_utils').locationToFeature;\nvar style = _dereq_('./style').style;\n\nmodule.exports = function plot(gd, geo, calcData) {\n    for(var i = 0; i < calcData.length; i++) {\n        calcGeoJSON(calcData[i], geo.topojson);\n    }\n\n    var choroplethLayer = geo.layers.backplot.select('.choroplethlayer');\n    Lib.makeTraceGroups(choroplethLayer, calcData, 'trace choropleth').each(function(calcTrace) {\n        var sel = calcTrace[0].node3 = d3.select(this);\n\n        var paths = sel.selectAll('path.choroplethlocation')\n            .data(Lib.identity);\n\n        paths.enter().append('path')\n            .classed('choroplethlocation', true);\n\n        paths.exit().remove();\n\n        // call style here within topojson request callback\n        style(gd, calcTrace);\n    });\n};\n\nfunction calcGeoJSON(calcTrace, topojson) {\n    var trace = calcTrace[0].trace;\n    var len = calcTrace.length;\n    var features = getTopojsonFeatures(trace, topojson);\n\n    for(var i = 0; i < len; i++) {\n        var calcPt = calcTrace[i];\n        var feature = locationToFeature(trace.locationmode, calcPt.loc, features);\n\n        if(!feature) {\n            calcPt.geojson = null;\n            continue;\n        }\n\n\n        calcPt.geojson = feature;\n        calcPt.ct = feature.properties.ct;\n        calcPt.index = i;\n        calcPt._polygons = feature2polygons(feature);\n    }\n}\n\nfunction feature2polygons(feature) {\n    var geometry = feature.geometry;\n    var coords = geometry.coordinates;\n    var loc = feature.id;\n\n    var polygons = [];\n    var appendPolygon, j, k, m;\n\n    function doesCrossAntiMerdian(pts) {\n        for(var l = 0; l < pts.length - 1; l++) {\n            if(pts[l][0] > 0 && pts[l + 1][0] < 0) return l;\n        }\n        return null;\n    }\n\n    if(loc === 'RUS' || loc === 'FJI') {\n        // Russia and Fiji have landmasses that cross the antimeridian,\n        // we need to add +360 to their longitude coordinates, so that\n        // polygon 'contains' doesn't get confused when crossing the antimeridian.\n        //\n        // Note that other countries have polygons on either side of the antimeridian\n        // (e.g. some Aleutian island for the USA), but those don't confuse\n        // the 'contains' method; these are skipped here.\n        appendPolygon = function(_pts) {\n            var pts;\n\n            if(doesCrossAntiMerdian(_pts) === null) {\n                pts = _pts;\n            } else {\n                pts = new Array(_pts.length);\n                for(m = 0; m < _pts.length; m++) {\n                    // do nut mutate calcdata[i][j].geojson !!\n                    pts[m] = [\n                        _pts[m][0] < 0 ? _pts[m][0] + 360 : _pts[m][0],\n                        _pts[m][1]\n                    ];\n                }\n            }\n\n            polygons.push(polygon.tester(pts));\n        };\n    } else if(loc === 'ATA') {\n        // Antarctica has a landmass that wraps around every longitudes which\n        // confuses the 'contains' methods.\n        appendPolygon = function(pts) {\n            var crossAntiMeridianIndex = doesCrossAntiMerdian(pts);\n\n            // polygon that do not cross anti-meridian need no special handling\n            if(crossAntiMeridianIndex === null) {\n                return polygons.push(polygon.tester(pts));\n            }\n\n            // stitch polygon by adding pt over South Pole,\n            // so that it covers the projected region covers all latitudes\n            //\n            // Note that the algorithm below only works for polygons that\n            // start and end on longitude -180 (like the ones built by\n            // https://github.com/etpinard/sane-topojson).\n            var stitch = new Array(pts.length + 1);\n            var si = 0;\n\n            for(m = 0; m < pts.length; m++) {\n                if(m > crossAntiMeridianIndex) {\n                    stitch[si++] = [pts[m][0] + 360, pts[m][1]];\n                } else if(m === crossAntiMeridianIndex) {\n                    stitch[si++] = pts[m];\n                    stitch[si++] = [pts[m][0], -90];\n                } else {\n                    stitch[si++] = pts[m];\n                }\n            }\n\n            // polygon.tester by default appends pt[0] to the points list,\n            // we must remove it here, to avoid a jump in longitude from 180 to -180,\n            // that would confuse the 'contains' method\n            var tester = polygon.tester(stitch);\n            tester.pts.pop();\n            polygons.push(tester);\n        };\n    } else {\n        // otherwise using same array ref is fine\n        appendPolygon = function(pts) {\n            polygons.push(polygon.tester(pts));\n        };\n    }\n\n    switch(geometry.type) {\n        case 'MultiPolygon':\n            for(j = 0; j < coords.length; j++) {\n                for(k = 0; k < coords[j].length; k++) {\n                    appendPolygon(coords[j][k]);\n                }\n            }\n            break;\n        case 'Polygon':\n            for(j = 0; j < coords.length; j++) {\n                appendPolygon(coords[j]);\n            }\n            break;\n    }\n\n    return polygons;\n}\n\n},{\"../../lib\":703,\"../../lib/geo_location_utils\":696,\"../../lib/polygon\":715,\"../../lib/topojson_utils\":730,\"./style\":915,\"d3\":157}],914:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n\n    var i, di, ct, x, y;\n\n    if(selectionTester === false) {\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            di = cd[i];\n            ct = di.ct;\n\n            if(!ct) continue;\n\n            x = xa.c2p(ct);\n            y = ya.c2p(ct);\n\n            if(selectionTester.contains([x, y], null, i, searchInfo)) {\n                selection.push({\n                    pointNumber: i,\n                    lon: ct[0],\n                    lat: ct[1]\n                });\n                di.selected = 1;\n            } else {\n                di.selected = 0;\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{}],915:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Colorscale = _dereq_('../../components/colorscale');\n\nfunction style(gd, calcTrace) {\n    if(calcTrace) styleTrace(gd, calcTrace);\n}\n\nfunction styleTrace(gd, calcTrace) {\n    var trace = calcTrace[0].trace;\n    var s = calcTrace[0].node3;\n    var locs = s.selectAll('.choroplethlocation');\n    var marker = trace.marker || {};\n    var markerLine = marker.line || {};\n\n    var sclFunc = Colorscale.makeColorScaleFuncFromTrace(trace);\n\n    locs.each(function(d) {\n        d3.select(this)\n            .attr('fill', sclFunc(d.z))\n            .call(Color.stroke, d.mlc || markerLine.color)\n            .call(Drawing.dashLine, '', d.mlw || markerLine.width || 0)\n            .style('opacity', marker.opacity);\n    });\n\n    Drawing.selectedPointStyle(locs, trace, gd);\n}\n\nfunction styleOnSelect(gd, calcTrace) {\n    var s = calcTrace[0].node3;\n    var trace = calcTrace[0].trace;\n\n    if(trace.selectedpoints) {\n        Drawing.selectedPointStyle(s.selectAll('.choroplethlocation'), trace, gd);\n    } else {\n        styleTrace(gd, calcTrace);\n    }\n}\n\nmodule.exports = {\n    style: style,\n    styleOnSelect: styleOnSelect\n};\n\n},{\"../../components/color\":580,\"../../components/colorscale\":592,\"../../components/drawing\":601,\"d3\":157}],916:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar mesh3dAttrs = _dereq_('../mesh3d/attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar attrs = {\n    x: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    z: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    u: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    v: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    w: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    // TODO add way to specify cone positions independently of the vector field\n    // provided, similar to MATLAB's coneplot Cx/Cy/Cz meshgrids,\n    // see https://www.mathworks.com/help/matlab/ref/coneplot.html\n    //\n    // Alternatively, if our goal is only to 'fill in gaps' in the vector data,\n    // we could try to extend the heatmap 'connectgaps' algorithm to 3D.\n    // From AJ: this particular algorithm which amounts to a Poisson equation,\n    // both for interpolation and extrapolation - is the right one to use for\n    // cones too.  It makes a field with zero divergence, which is a good\n    // baseline assumption for vector fields.\n    //\n    // cones: {\n    //     // potential attributes to add:\n    //     //\n    //     // - meshmode: 'cartesian-product', 'pts', 'grid'\n    //     //\n    //     // under `meshmode: 'grid'`\n    //     // - (x|y|z)grid.start\n    //     // - (x|y|z)grid.end\n    //     // - (x|y|z)grid.size\n    //\n    //     x: {\n    //         valType: 'data_array',\n    //         editType: 'calc',\n    //         \n    //     },\n    //     y: {\n    //         valType: 'data_array',\n    //         editType: 'calc',\n    //         \n    //     },\n    //     z: {\n    //         valType: 'data_array',\n    //         editType: 'calc',\n    //         \n    //     },\n    //\n    //     editType: 'calc',\n    //     \n    // },\n\n    sizemode: {\n        valType: 'enumerated',\n        values: ['scaled', 'absolute'],\n        \n        editType: 'calc',\n        dflt: 'scaled',\n        \n    },\n    sizeref: {\n        valType: 'number',\n        \n        editType: 'calc',\n        min: 0,\n        \n    },\n\n    anchor: {\n        valType: 'enumerated',\n        \n        editType: 'calc',\n        values: ['tip', 'tail', 'cm', 'center'],\n        dflt: 'cm',\n        \n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertemplate: hovertemplateAttrs({editType: 'calc'}, {keys: ['norm']})\n};\n\nextendFlat(attrs, colorScaleAttrs('', {\n    colorAttr: 'u/v/w norm',\n    showScaleDflt: true,\n    editTypeOverride: 'calc'\n}));\n\nvar fromMesh3d = ['opacity', 'lightposition', 'lighting'];\n\nfromMesh3d.forEach(function(k) {\n    attrs[k] = mesh3dAttrs[k];\n});\n\nattrs.hoverinfo = extendFlat({}, baseAttrs.hoverinfo, {\n    editType: 'calc',\n    flags: ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'],\n    dflt: 'x+y+z+norm+text+name'\n});\n\nattrs.transforms = undefined;\n\nmodule.exports = attrs;\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../mesh3d/attributes\":1017}],917:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\n\nmodule.exports = function calc(gd, trace) {\n    var u = trace.u;\n    var v = trace.v;\n    var w = trace.w;\n    var len = Math.min(\n        trace.x.length, trace.y.length, trace.z.length,\n        u.length, v.length, w.length\n    );\n    var normMax = -Infinity;\n    var normMin = Infinity;\n\n    for(var i = 0; i < len; i++) {\n        var uu = u[i];\n        var vv = v[i];\n        var ww = w[i];\n        var norm = Math.sqrt(uu * uu + vv * vv + ww * ww);\n\n        normMax = Math.max(normMax, norm);\n        normMin = Math.min(normMin, norm);\n    }\n\n    trace._len = len;\n    trace._normMax = normMax;\n\n    colorscaleCalc(gd, trace, {\n        vals: [normMin, normMax],\n        containerStr: '',\n        cLetter: 'c'\n    });\n};\n\n},{\"../../components/colorscale/calc\":588}],918:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar conePlot = _dereq_('gl-cone3d');\nvar createConeMesh = _dereq_('gl-cone3d').createConeMesh;\n\nvar simpleMap = _dereq_('../../lib').simpleMap;\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar zip3 = _dereq_('../../plots/gl3d/zip3');\n\nfunction Cone(scene, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.mesh = null;\n    this.data = null;\n}\n\nvar proto = Cone.prototype;\n\nproto.handlePick = function(selection) {\n    if(selection.object === this.mesh) {\n        var selectIndex = selection.index = selection.data.index;\n        var xx = this.data.x[selectIndex];\n        var yy = this.data.y[selectIndex];\n        var zz = this.data.z[selectIndex];\n        var uu = this.data.u[selectIndex];\n        var vv = this.data.v[selectIndex];\n        var ww = this.data.w[selectIndex];\n\n        selection.traceCoordinate = [\n            xx, yy, zz,\n            uu, vv, ww,\n            Math.sqrt(uu * uu + vv * vv + ww * ww)\n        ];\n\n        var text = this.data.hovertext || this.data.text;\n        if(Array.isArray(text) && text[selectIndex] !== undefined) {\n            selection.textLabel = text[selectIndex];\n        } else if(text) {\n            selection.textLabel = text;\n        }\n\n        return true;\n    }\n};\n\nvar axisName2scaleIndex = {xaxis: 0, yaxis: 1, zaxis: 2};\nvar anchor2coneOffset = {tip: 1, tail: 0, cm: 0.25, center: 0.5};\nvar anchor2coneSpan = {tip: 1, tail: 1, cm: 0.75, center: 0.5};\n\nfunction convert(scene, trace) {\n    var sceneLayout = scene.fullSceneLayout;\n    var dataScale = scene.dataScale;\n    var coneOpts = {};\n\n    function toDataCoords(arr, axisName) {\n        var ax = sceneLayout[axisName];\n        var scale = dataScale[axisName2scaleIndex[axisName]];\n        return simpleMap(arr, function(v) { return ax.d2l(v) * scale; });\n    }\n\n    coneOpts.vectors = zip3(\n        toDataCoords(trace.u, 'xaxis'),\n        toDataCoords(trace.v, 'yaxis'),\n        toDataCoords(trace.w, 'zaxis'),\n        trace._len\n    );\n\n    coneOpts.positions = zip3(\n        toDataCoords(trace.x, 'xaxis'),\n        toDataCoords(trace.y, 'yaxis'),\n        toDataCoords(trace.z, 'zaxis'),\n        trace._len\n    );\n\n    var cOpts = extractOpts(trace);\n    coneOpts.colormap = parseColorScale(trace);\n    coneOpts.vertexIntensityBounds = [cOpts.min / trace._normMax, cOpts.max / trace._normMax];\n    coneOpts.coneOffset = anchor2coneOffset[trace.anchor];\n\n    if(trace.sizemode === 'scaled') {\n        // unitless sizeref\n        coneOpts.coneSize = trace.sizeref || 0.5;\n    } else {\n        // sizeref here has unit of velocity\n        coneOpts.coneSize = trace.sizeref && trace._normMax ?\n            trace.sizeref / trace._normMax :\n            0.5;\n    }\n\n    var meshData = conePlot(coneOpts);\n\n    // pass gl-mesh3d lighting attributes\n    var lp = trace.lightposition;\n    meshData.lightPosition = [lp.x, lp.y, lp.z];\n    meshData.ambient = trace.lighting.ambient;\n    meshData.diffuse = trace.lighting.diffuse;\n    meshData.specular = trace.lighting.specular;\n    meshData.roughness = trace.lighting.roughness;\n    meshData.fresnel = trace.lighting.fresnel;\n    meshData.opacity = trace.opacity;\n\n    // stash autorange pad value\n    trace._pad = anchor2coneSpan[trace.anchor] * meshData.vectorScale * meshData.coneScale * trace._normMax;\n\n    return meshData;\n}\n\nproto.update = function(data) {\n    this.data = data;\n\n    var meshData = convert(this.scene, data);\n    this.mesh.update(meshData);\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.mesh);\n    this.mesh.dispose();\n};\n\nfunction createConeTrace(scene, data) {\n    var gl = scene.glplot.gl;\n\n    var meshData = convert(scene, data);\n    var mesh = createConeMesh(gl, meshData);\n\n    var cone = new Cone(scene, data.uid);\n    cone.mesh = mesh;\n    cone.data = data;\n    mesh._trace = cone;\n\n    scene.glplot.add(mesh);\n\n    return cone;\n}\n\nmodule.exports = createConeTrace;\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../plots/gl3d/zip3\":802,\"gl-cone3d\":241}],919:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var u = coerce('u');\n    var v = coerce('v');\n    var w = coerce('w');\n\n    var x = coerce('x');\n    var y = coerce('y');\n    var z = coerce('z');\n\n    if(\n        !u || !u.length || !v || !v.length || !w || !w.length ||\n        !x || !x.length || !y || !y.length || !z || !z.length\n    ) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('sizeref');\n    coerce('sizemode');\n\n    coerce('anchor');\n\n    coerce('lighting.ambient');\n    coerce('lighting.diffuse');\n    coerce('lighting.specular');\n    coerce('lighting.roughness');\n    coerce('lighting.fresnel');\n    coerce('lightposition.x');\n    coerce('lightposition.y');\n    coerce('lightposition.z');\n\n    colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'});\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    // disable 1D transforms (for now)\n    traceOut._length = null;\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"./attributes\":916}],920:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'cone',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./convert'),\n    eventData: function(out, pt) {\n        out.norm = pt.traceCoordinate[6];\n        return out;\n    },\n\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"./attributes\":916,\"./calc\":917,\"./convert\":918,\"./defaults\":919}],921:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar heatmapAttrs = _dereq_('../heatmap/attributes');\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar filterOps = _dereq_('../../constants/filter_ops');\nvar COMPARISON_OPS2 = filterOps.COMPARISON_OPS2;\nvar INTERVAL_OPS = filterOps.INTERVAL_OPS;\n\nvar scatterLineAttrs = scatterAttrs.line;\n\nmodule.exports = extendFlat({\n    z: heatmapAttrs.z,\n    x: heatmapAttrs.x,\n    x0: heatmapAttrs.x0,\n    dx: heatmapAttrs.dx,\n    y: heatmapAttrs.y,\n    y0: heatmapAttrs.y0,\n    dy: heatmapAttrs.dy,\n    text: heatmapAttrs.text,\n    hovertext: heatmapAttrs.hovertext,\n    transpose: heatmapAttrs.transpose,\n    xtype: heatmapAttrs.xtype,\n    ytype: heatmapAttrs.ytype,\n    zhoverformat: heatmapAttrs.zhoverformat,\n    hovertemplate: heatmapAttrs.hovertemplate,\n\n    connectgaps: heatmapAttrs.connectgaps,\n\n    fillcolor: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n\n    autocontour: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        impliedEdits: {\n            'contours.start': undefined,\n            'contours.end': undefined,\n            'contours.size': undefined\n        },\n        \n    },\n    ncontours: {\n        valType: 'integer',\n        dflt: 15,\n        min: 1,\n        \n        editType: 'calc',\n        \n    },\n\n    contours: {\n        type: {\n            valType: 'enumerated',\n            values: ['levels', 'constraint'],\n            dflt: 'levels',\n            \n            editType: 'calc',\n            \n        },\n        start: {\n            valType: 'number',\n            dflt: null,\n            \n            editType: 'plot',\n            impliedEdits: {'^autocontour': false},\n            \n        },\n        end: {\n            valType: 'number',\n            dflt: null,\n            \n            editType: 'plot',\n            impliedEdits: {'^autocontour': false},\n            \n        },\n        size: {\n            valType: 'number',\n            dflt: null,\n            min: 0,\n            \n            editType: 'plot',\n            impliedEdits: {'^autocontour': false},\n            \n        },\n        coloring: {\n            valType: 'enumerated',\n            values: ['fill', 'heatmap', 'lines', 'none'],\n            dflt: 'fill',\n            \n            editType: 'calc',\n            \n        },\n        showlines: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'plot',\n            \n        },\n        showlabels: {\n            valType: 'boolean',\n            dflt: false,\n            \n            editType: 'plot',\n            \n        },\n        labelfont: fontAttrs({\n            editType: 'plot',\n            colorEditType: 'style',\n            \n        }),\n        labelformat: {\n            valType: 'string',\n            dflt: '',\n            \n            editType: 'plot',\n            \n        },\n        operation: {\n            valType: 'enumerated',\n            values: [].concat(COMPARISON_OPS2).concat(INTERVAL_OPS),\n            \n            dflt: '=',\n            editType: 'calc',\n            \n        },\n        value: {\n            valType: 'any',\n            dflt: 0,\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc',\n        impliedEdits: {'autocontour': false}\n    },\n\n    line: {\n        color: extendFlat({}, scatterLineAttrs.color, {\n            editType: 'style+colorbars',\n            \n        }),\n        width: extendFlat({}, scatterLineAttrs.width, {\n            editType: 'style+colorbars'\n        }),\n        dash: dash,\n        smoothing: extendFlat({}, scatterLineAttrs.smoothing, {\n            \n        }),\n        editType: 'plot'\n    }\n},\n    colorScaleAttrs('', {\n        cLetter: 'z',\n        autoColorDflt: false,\n        editTypeOverride: 'calc'\n    })\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/drawing/attributes\":600,\"../../constants/filter_ops\":676,\"../../lib/extend\":693,\"../../plots/font_attributes\":777,\"../heatmap/attributes\":972,\"../scatter/attributes\":1075}],922:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Colorscale = _dereq_('../../components/colorscale');\n\nvar heatmapCalc = _dereq_('../heatmap/calc');\nvar setContours = _dereq_('./set_contours');\nvar endPlus = _dereq_('./end_plus');\n\n// most is the same as heatmap calc, then adjust it\n// though a few things inside heatmap calc still look for\n// contour maps, because the makeBoundArray calls are too entangled\nmodule.exports = function calc(gd, trace) {\n    var cd = heatmapCalc(gd, trace);\n\n    var zOut = cd[0].z;\n    setContours(trace, zOut);\n\n    var contours = trace.contours;\n    var cOpts = Colorscale.extractOpts(trace);\n    var cVals;\n\n    if(contours.coloring === 'heatmap' && cOpts.auto && trace.autocontour === false) {\n        var start = contours.start;\n        var end = endPlus(contours);\n        var cs = contours.size || 1;\n        var nc = Math.floor((end - start) / cs) + 1;\n\n        if(!isFinite(cs)) {\n            cs = 1;\n            nc = 1;\n        }\n\n        var min0 = start - cs / 2;\n        var max0 = min0 + nc * cs;\n        cVals = [min0, max0];\n    } else {\n        cVals = zOut;\n    }\n\n    Colorscale.calc(gd, trace, {vals: cVals, cLetter: 'z'});\n\n    return cd;\n};\n\n},{\"../../components/colorscale\":592,\"../heatmap/calc\":973,\"./end_plus\":932,\"./set_contours\":940}],923:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function(pathinfo, operation, perimeter, trace) {\n    // Abandon all hope, ye who enter here.\n    var i, v1, v2;\n    var pi0 = pathinfo[0];\n    var na = pi0.x.length;\n    var nb = pi0.y.length;\n    var z = pi0.z;\n    var contours = trace.contours;\n\n    var boundaryMax = -Infinity;\n    var boundaryMin = Infinity;\n\n    for(i = 0; i < nb; i++) {\n        boundaryMin = Math.min(boundaryMin, z[i][0]);\n        boundaryMin = Math.min(boundaryMin, z[i][na - 1]);\n        boundaryMax = Math.max(boundaryMax, z[i][0]);\n        boundaryMax = Math.max(boundaryMax, z[i][na - 1]);\n    }\n\n    for(i = 1; i < na - 1; i++) {\n        boundaryMin = Math.min(boundaryMin, z[0][i]);\n        boundaryMin = Math.min(boundaryMin, z[nb - 1][i]);\n        boundaryMax = Math.max(boundaryMax, z[0][i]);\n        boundaryMax = Math.max(boundaryMax, z[nb - 1][i]);\n    }\n\n    pi0.prefixBoundary = false;\n\n    switch(operation) {\n        case '>':\n            if(contours.value > boundaryMax) {\n                pi0.prefixBoundary = true;\n            }\n            break;\n        case '<':\n            if(contours.value < boundaryMin) {\n                pi0.prefixBoundary = true;\n            }\n            break;\n        case '[]':\n            v1 = Math.min.apply(null, contours.value);\n            v2 = Math.max.apply(null, contours.value);\n            if(v2 < boundaryMin || v1 > boundaryMax) {\n                pi0.prefixBoundary = true;\n            }\n            break;\n        case '][':\n            v1 = Math.min.apply(null, contours.value);\n            v2 = Math.max.apply(null, contours.value);\n            if(v1 < boundaryMin && v2 > boundaryMax) {\n                pi0.prefixBoundary = true;\n            }\n            break;\n    }\n};\n\n},{}],924:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar makeColorMap = _dereq_('./make_color_map');\nvar endPlus = _dereq_('./end_plus');\n\nfunction calc(gd, trace, opts) {\n    var contours = trace.contours;\n    var line = trace.line;\n    var cs = contours.size || 1;\n    var coloring = contours.coloring;\n    var colorMap = makeColorMap(trace, {isColorbar: true});\n\n    if(coloring === 'heatmap') {\n        var cOpts = extractOpts(trace);\n        opts._fillgradient = trace.colorscale;\n        opts._zrange = [cOpts.min, cOpts.max];\n    } else if(coloring === 'fill') {\n        opts._fillcolor = colorMap;\n    }\n\n    opts._line = {\n        color: coloring === 'lines' ? colorMap : line.color,\n        width: contours.showlines !== false ? line.width : 0,\n        dash: line.dash\n    };\n\n    opts._levels = {\n        start: contours.start,\n        end: endPlus(contours),\n        size: cs\n    };\n}\n\nmodule.exports = {\n    min: 'zmin',\n    max: 'zmax',\n    calc: calc\n};\n\n},{\"../../components/colorscale\":592,\"./end_plus\":932,\"./make_color_map\":937}],925:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\nmodule.exports = {\n    // some constants to help with marching squares algorithm\n    // where does the path start for each index?\n    BOTTOMSTART: [1, 9, 13, 104, 713],\n    TOPSTART: [4, 6, 7, 104, 713],\n    LEFTSTART: [8, 12, 14, 208, 1114],\n    RIGHTSTART: [2, 3, 11, 208, 1114],\n\n    // which way [dx,dy] do we leave a given index?\n    // saddles are already disambiguated\n    NEWDELTA: [\n        null, [-1, 0], [0, -1], [-1, 0],\n        [1, 0], null, [0, -1], [-1, 0],\n        [0, 1], [0, 1], null, [0, 1],\n        [1, 0], [1, 0], [0, -1]\n    ],\n\n    // for each saddle, the first index here is used\n    // for dx||dy<0, the second for dx||dy>0\n    CHOOSESADDLE: {\n        104: [4, 1],\n        208: [2, 8],\n        713: [7, 13],\n        1114: [11, 14]\n    },\n\n    // after one index has been used for a saddle, which do we\n    // substitute to be used up later?\n    SADDLEREMAINDER: {1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11},\n\n    // length of a contour, as a multiple of the plot area diagonal, per label\n    LABELDISTANCE: 2,\n\n    // number of contour levels after which we start increasing the number of\n    // labels we draw. Many contours means they will generally be close\n    // together, so it will be harder to follow a long way to find a label\n    LABELINCREASE: 10,\n\n    // minimum length of a contour line, as a multiple of the label length,\n    // at which we draw *any* labels\n    LABELMIN: 3,\n\n    // max number of labels to draw on a single contour path, no matter how long\n    LABELMAX: 10,\n\n    // constants for the label position cost function\n    LABELOPTIMIZER: {\n        // weight given to edge proximity\n        EDGECOST: 1,\n        // weight given to the angle off horizontal\n        ANGLECOST: 1,\n        // weight given to distance from already-placed labels\n        NEIGHBORCOST: 5,\n        // cost multiplier for labels on the same level\n        SAMELEVELFACTOR: 10,\n        // minimum distance (as a multiple of the label length)\n        // for labels on the same level\n        SAMELEVELDISTANCE: 5,\n        // maximum cost before we won't even place the label\n        MAXCOST: 100,\n        // number of evenly spaced points to look at in the first\n        // iteration of the search\n        INITIALSEARCHPOINTS: 10,\n        // number of binary search iterations after the initial wide search\n        ITERATIONS: 5\n    }\n};\n\n},{}],926:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar handleLabelDefaults = _dereq_('./label_defaults');\n\nvar Color = _dereq_('../../components/color');\nvar addOpacity = Color.addOpacity;\nvar opacity = Color.opacity;\n\nvar filterOps = _dereq_('../../constants/filter_ops');\nvar CONSTRAINT_REDUCTION = filterOps.CONSTRAINT_REDUCTION;\nvar COMPARISON_OPS2 = filterOps.COMPARISON_OPS2;\n\nmodule.exports = function handleConstraintDefaults(traceIn, traceOut, coerce, layout, defaultColor, opts) {\n    var contours = traceOut.contours;\n    var showLines, lineColor, fillColor;\n\n    var operation = coerce('contours.operation');\n    contours._operation = CONSTRAINT_REDUCTION[operation];\n\n    handleConstraintValueDefaults(coerce, contours);\n\n    if(operation === '=') {\n        showLines = contours.showlines = true;\n    } else {\n        showLines = coerce('contours.showlines');\n        fillColor = coerce('fillcolor', addOpacity(\n            (traceIn.line || {}).color || defaultColor, 0.5\n        ));\n    }\n\n    if(showLines) {\n        var lineDfltColor = fillColor && opacity(fillColor) ?\n            addOpacity(traceOut.fillcolor, 1) :\n            defaultColor;\n        lineColor = coerce('line.color', lineDfltColor);\n        coerce('line.width', 2);\n        coerce('line.dash');\n    }\n\n    coerce('line.smoothing');\n\n    handleLabelDefaults(coerce, layout, lineColor, opts);\n};\n\nfunction handleConstraintValueDefaults(coerce, contours) {\n    var zvalue;\n\n    if(COMPARISON_OPS2.indexOf(contours.operation) === -1) {\n        // Requires an array of two numbers:\n        coerce('contours.value', [0, 1]);\n\n        if(!Array.isArray(contours.value)) {\n            if(isNumeric(contours.value)) {\n                zvalue = parseFloat(contours.value);\n                contours.value = [zvalue, zvalue + 1];\n            }\n        } else if(contours.value.length > 2) {\n            contours.value = contours.value.slice(2);\n        } else if(contours.length === 0) {\n            contours.value = [0, 1];\n        } else if(contours.length < 2) {\n            zvalue = parseFloat(contours.value[0]);\n            contours.value = [zvalue, zvalue + 1];\n        } else {\n            contours.value = [\n                parseFloat(contours.value[0]),\n                parseFloat(contours.value[1])\n            ];\n        }\n    } else {\n        // Requires a single scalar:\n        coerce('contours.value', 0);\n\n        if(!isNumeric(contours.value)) {\n            if(Array.isArray(contours.value)) {\n                contours.value = parseFloat(contours.value[0]);\n            } else {\n                contours.value = 0;\n            }\n        }\n    }\n}\n\n},{\"../../components/color\":580,\"../../constants/filter_ops\":676,\"./label_defaults\":936,\"fast-isnumeric\":224}],927:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar filterOps = _dereq_('../../constants/filter_ops');\nvar isNumeric = _dereq_('fast-isnumeric');\n\n// This syntax conforms to the existing filter transform syntax, but we don't care\n// about open vs. closed intervals for simply drawing contours constraints:\nmodule.exports = {\n    '[]': makeRangeSettings('[]'),\n    '][': makeRangeSettings(']['),\n    '>': makeInequalitySettings('>'),\n    '<': makeInequalitySettings('<'),\n    '=': makeInequalitySettings('=')\n};\n\n// This does not in any way shape or form support calendars. It's adapted from\n// transforms/filter.js.\nfunction coerceValue(operation, value) {\n    var hasArrayValue = Array.isArray(value);\n\n    var coercedValue;\n\n    function coerce(value) {\n        return isNumeric(value) ? (+value) : null;\n    }\n\n    if(filterOps.COMPARISON_OPS2.indexOf(operation) !== -1) {\n        coercedValue = hasArrayValue ? coerce(value[0]) : coerce(value);\n    } else if(filterOps.INTERVAL_OPS.indexOf(operation) !== -1) {\n        coercedValue = hasArrayValue ?\n            [coerce(value[0]), coerce(value[1])] :\n            [coerce(value), coerce(value)];\n    } else if(filterOps.SET_OPS.indexOf(operation) !== -1) {\n        coercedValue = hasArrayValue ? value.map(coerce) : [coerce(value)];\n    }\n\n    return coercedValue;\n}\n\n// Returns a parabola scaled so that the min/max is either +/- 1 and zero at the two values\n// provided. The data is mapped by this function when constructing intervals so that it's\n// very easy to construct contours as normal.\nfunction makeRangeSettings(operation) {\n    return function(value) {\n        value = coerceValue(operation, value);\n\n        // Ensure proper ordering:\n        var min = Math.min(value[0], value[1]);\n        var max = Math.max(value[0], value[1]);\n\n        return {\n            start: min,\n            end: max,\n            size: max - min\n        };\n    };\n}\n\nfunction makeInequalitySettings(operation) {\n    return function(value) {\n        value = coerceValue(operation, value);\n\n        return {\n            start: value,\n            end: Infinity,\n            size: Infinity\n        };\n    };\n}\n\n},{\"../../constants/filter_ops\":676,\"fast-isnumeric\":224}],928:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function handleContourDefaults(traceIn, traceOut, coerce, coerce2) {\n    var contourStart = coerce2('contours.start');\n    var contourEnd = coerce2('contours.end');\n    var missingEnd = (contourStart === false) || (contourEnd === false);\n\n    // normally we only need size if autocontour is off. But contour.calc\n    // pushes its calculated contour size back to the input trace, so for\n    // things like restyle that can call supplyDefaults without calc\n    // after the initial draw, we can just reuse the previous calculation\n    var contourSize = coerce('contours.size');\n    var autoContour;\n\n    if(missingEnd) autoContour = traceOut.autocontour = true;\n    else autoContour = coerce('autocontour', false);\n\n    if(autoContour || !contourSize) coerce('ncontours');\n};\n\n},{}],929:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n// The contour extraction is great, except it totally fails for constraints because we\n// need weird range loops and flipped contours instead of the usual format. This function\n// does some weird manipulation of the extracted pathinfo data such that it magically\n// draws contours correctly *as* constraints.\nmodule.exports = function(pathinfo, operation) {\n    var i, pi0, pi1;\n\n    var op0 = function(arr) { return arr.reverse(); };\n    var op1 = function(arr) { return arr; };\n\n    switch(operation) {\n        case '=':\n        case '<':\n            return pathinfo;\n        case '>':\n            if(pathinfo.length !== 1) {\n                Lib.warn('Contour data invalid for the specified inequality operation.');\n            }\n\n            // In this case there should be exactly two contour levels in pathinfo. We\n            // simply concatenate the info into one pathinfo and flip all of the data\n            // in one. This will draw the contour as closed.\n            pi0 = pathinfo[0];\n\n            for(i = 0; i < pi0.edgepaths.length; i++) {\n                pi0.edgepaths[i] = op0(pi0.edgepaths[i]);\n            }\n\n            for(i = 0; i < pi0.paths.length; i++) {\n                pi0.paths[i] = op0(pi0.paths[i]);\n            }\n            return pathinfo;\n        case '][':\n            var tmp = op0;\n            op0 = op1;\n            op1 = tmp;\n            // It's a nice rule, except this definitely *is* what's intended here.\n            /* eslint-disable: no-fallthrough */\n        case '[]':\n            /* eslint-enable: no-fallthrough */\n            if(pathinfo.length !== 2) {\n                Lib.warn('Contour data invalid for the specified inequality range operation.');\n            }\n\n            // In this case there should be exactly two contour levels in pathinfo. We\n            // simply concatenate the info into one pathinfo and flip all of the data\n            // in one. This will draw the contour as closed.\n            pi0 = copyPathinfo(pathinfo[0]);\n            pi1 = copyPathinfo(pathinfo[1]);\n\n            for(i = 0; i < pi0.edgepaths.length; i++) {\n                pi0.edgepaths[i] = op0(pi0.edgepaths[i]);\n            }\n\n            for(i = 0; i < pi0.paths.length; i++) {\n                pi0.paths[i] = op0(pi0.paths[i]);\n            }\n\n            while(pi1.edgepaths.length) {\n                pi0.edgepaths.push(op1(pi1.edgepaths.shift()));\n            }\n            while(pi1.paths.length) {\n                pi0.paths.push(op1(pi1.paths.shift()));\n            }\n            return [pi0];\n    }\n};\n\nfunction copyPathinfo(pi) {\n    return Lib.extendFlat({}, pi, {\n        edgepaths: Lib.extendDeep([], pi.edgepaths),\n        paths: Lib.extendDeep([], pi.paths)\n    });\n}\n\n},{\"../../lib\":703}],930:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleXYZDefaults = _dereq_('../heatmap/xyz_defaults');\nvar handleConstraintDefaults = _dereq_('./constraint_defaults');\nvar handleContoursDefaults = _dereq_('./contours_defaults');\nvar handleStyleDefaults = _dereq_('./style_defaults');\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    function coerce2(attr) {\n        return Lib.coerce2(traceIn, traceOut, attributes, attr);\n    }\n\n    var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var isConstraint = (coerce('contours.type') === 'constraint');\n    coerce('connectgaps', Lib.isArray1D(traceOut.z));\n\n    if(isConstraint) {\n        handleConstraintDefaults(traceIn, traceOut, coerce, layout, defaultColor);\n    } else {\n        handleContoursDefaults(traceIn, traceOut, coerce, coerce2);\n        handleStyleDefaults(traceIn, traceOut, coerce, layout);\n    }\n};\n\n},{\"../../lib\":703,\"../heatmap/xyz_defaults\":986,\"./attributes\":921,\"./constraint_defaults\":926,\"./contours_defaults\":928,\"./style_defaults\":942}],931:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar constraintMapping = _dereq_('./constraint_mapping');\nvar endPlus = _dereq_('./end_plus');\n\nmodule.exports = function emptyPathinfo(contours, plotinfo, cd0) {\n    var contoursFinal = (contours.type === 'constraint') ?\n        constraintMapping[contours._operation](contours.value) :\n        contours;\n\n    var cs = contoursFinal.size;\n    var pathinfo = [];\n    var end = endPlus(contoursFinal);\n\n    var carpet = cd0.trace._carpetTrace;\n\n    var basePathinfo = carpet ? {\n        // store axes so we can convert to px\n        xaxis: carpet.aaxis,\n        yaxis: carpet.baxis,\n        // full data arrays to use for interpolation\n        x: cd0.a,\n        y: cd0.b\n    } : {\n        xaxis: plotinfo.xaxis,\n        yaxis: plotinfo.yaxis,\n        x: cd0.x,\n        y: cd0.y\n    };\n\n    for(var ci = contoursFinal.start; ci < end; ci += cs) {\n        pathinfo.push(Lib.extendFlat({\n            level: ci,\n            // all the cells with nontrivial marching index\n            crossings: {},\n            // starting points on the edges of the lattice for each contour\n            starts: [],\n            // all unclosed paths (may have less items than starts,\n            // if a path is closed by rounding)\n            edgepaths: [],\n            // all closed paths\n            paths: [],\n            z: cd0.z,\n            smoothing: cd0.trace.line.smoothing\n        }, basePathinfo));\n\n        if(pathinfo.length > 1000) {\n            Lib.warn('Too many contours, clipping at 1000', contours);\n            break;\n        }\n    }\n    return pathinfo;\n};\n\n},{\"../../lib\":703,\"./constraint_mapping\":927,\"./end_plus\":932}],932:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n/*\n * tiny helper to move the end of the contours a little to prevent\n * losing the last contour to rounding errors\n */\nmodule.exports = function endPlus(contours) {\n    return contours.end + contours.size / 1e6;\n};\n\n},{}],933:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar constants = _dereq_('./constants');\n\nmodule.exports = function findAllPaths(pathinfo, xtol, ytol) {\n    var cnt,\n        startLoc,\n        i,\n        pi,\n        j;\n\n    // Default just passes these values through as they were before:\n    xtol = xtol || 0.01;\n    ytol = ytol || 0.01;\n\n    for(i = 0; i < pathinfo.length; i++) {\n        pi = pathinfo[i];\n\n        for(j = 0; j < pi.starts.length; j++) {\n            startLoc = pi.starts[j];\n            makePath(pi, startLoc, 'edge', xtol, ytol);\n        }\n\n        cnt = 0;\n        while(Object.keys(pi.crossings).length && cnt < 10000) {\n            cnt++;\n            startLoc = Object.keys(pi.crossings)[0].split(',').map(Number);\n            makePath(pi, startLoc, undefined, xtol, ytol);\n        }\n        if(cnt === 10000) Lib.log('Infinite loop in contour?');\n    }\n};\n\nfunction equalPts(pt1, pt2, xtol, ytol) {\n    return Math.abs(pt1[0] - pt2[0]) < xtol &&\n           Math.abs(pt1[1] - pt2[1]) < ytol;\n}\n\n// distance in index units - uses the 3rd and 4th items in points\nfunction ptDist(pt1, pt2) {\n    var dx = pt1[2] - pt2[2];\n    var dy = pt1[3] - pt2[3];\n    return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction makePath(pi, loc, edgeflag, xtol, ytol) {\n    var startLocStr = loc.join(',');\n    var locStr = startLocStr;\n    var mi = pi.crossings[locStr];\n    var marchStep = startStep(mi, edgeflag, loc);\n    // start by going backward a half step and finding the crossing point\n    var pts = [getInterpPx(pi, loc, [-marchStep[0], -marchStep[1]])];\n    var startStepStr = marchStep.join(',');\n    var m = pi.z.length;\n    var n = pi.z[0].length;\n    var cnt;\n\n    // now follow the path\n    for(cnt = 0; cnt < 10000; cnt++) { // just to avoid infinite loops\n        if(mi > 20) {\n            mi = constants.CHOOSESADDLE[mi][(marchStep[0] || marchStep[1]) < 0 ? 0 : 1];\n            pi.crossings[locStr] = constants.SADDLEREMAINDER[mi];\n        } else {\n            delete pi.crossings[locStr];\n        }\n\n        marchStep = constants.NEWDELTA[mi];\n        if(!marchStep) {\n            Lib.log('Found bad marching index:', mi, loc, pi.level);\n            break;\n        }\n\n        // find the crossing a half step forward, and then take the full step\n        pts.push(getInterpPx(pi, loc, marchStep));\n        loc[0] += marchStep[0];\n        loc[1] += marchStep[1];\n\n        // don't include the same point multiple times\n        if(equalPts(pts[pts.length - 1], pts[pts.length - 2], xtol, ytol)) pts.pop();\n        locStr = loc.join(',');\n\n        var atEdge = (marchStep[0] && (loc[0] < 0 || loc[0] > n - 2)) ||\n                (marchStep[1] && (loc[1] < 0 || loc[1] > m - 2));\n        var closedLoop = (locStr === startLocStr) && (marchStep.join(',') === startStepStr);\n\n        // have we completed a loop, or reached an edge?\n        if((closedLoop) || (edgeflag && atEdge)) break;\n\n        mi = pi.crossings[locStr];\n    }\n\n    if(cnt === 10000) {\n        Lib.log('Infinite loop in contour?');\n    }\n    var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol);\n    var totaldist = 0;\n    var distThresholdFactor = 0.2 * pi.smoothing;\n    var alldists = [];\n    var cropstart = 0;\n    var distgroup, cnt2, cnt3, newpt, ptcnt, ptavg, thisdist,\n        i, j, edgepathi, edgepathj;\n\n    /*\n     * Check for points that are too close together (<1/5 the average dist\n     * *in grid index units* (important for log axes and nonuniform grids),\n     * less if less smoothed) and just take the center (or avg of center 2).\n     * This cuts down on funny behavior when a point is very close to a\n     * contour level.\n     */\n    for(cnt = 1; cnt < pts.length; cnt++) {\n        thisdist = ptDist(pts[cnt], pts[cnt - 1]);\n        totaldist += thisdist;\n        alldists.push(thisdist);\n    }\n\n    var distThreshold = totaldist / alldists.length * distThresholdFactor;\n\n    function getpt(i) { return pts[i % pts.length]; }\n\n    for(cnt = pts.length - 2; cnt >= cropstart; cnt--) {\n        distgroup = alldists[cnt];\n        if(distgroup < distThreshold) {\n            cnt3 = 0;\n            for(cnt2 = cnt - 1; cnt2 >= cropstart; cnt2--) {\n                if(distgroup + alldists[cnt2] < distThreshold) {\n                    distgroup += alldists[cnt2];\n                } else break;\n            }\n\n            // closed path with close points wrapping around the boundary?\n            if(closedpath && cnt === pts.length - 2) {\n                for(cnt3 = 0; cnt3 < cnt2; cnt3++) {\n                    if(distgroup + alldists[cnt3] < distThreshold) {\n                        distgroup += alldists[cnt3];\n                    } else break;\n                }\n            }\n            ptcnt = cnt - cnt2 + cnt3 + 1;\n            ptavg = Math.floor((cnt + cnt2 + cnt3 + 2) / 2);\n\n            // either endpoint included: keep the endpoint\n            if(!closedpath && cnt === pts.length - 2) newpt = pts[pts.length - 1];\n            else if(!closedpath && cnt2 === -1) newpt = pts[0];\n\n            // odd # of points - just take the central one\n            else if(ptcnt % 2) newpt = getpt(ptavg);\n\n            // even # of pts - average central two\n            else {\n                newpt = [(getpt(ptavg)[0] + getpt(ptavg + 1)[0]) / 2,\n                    (getpt(ptavg)[1] + getpt(ptavg + 1)[1]) / 2];\n            }\n\n            pts.splice(cnt2 + 1, cnt - cnt2 + 1, newpt);\n            cnt = cnt2 + 1;\n            if(cnt3) cropstart = cnt3;\n            if(closedpath) {\n                if(cnt === pts.length - 2) pts[cnt3] = pts[pts.length - 1];\n                else if(cnt === 0) pts[pts.length - 1] = pts[0];\n            }\n        }\n    }\n    pts.splice(0, cropstart);\n\n    // done with the index parts - remove them so path generation works right\n    // because it depends on only having [xpx, ypx]\n    for(cnt = 0; cnt < pts.length; cnt++) pts[cnt].length = 2;\n\n    // don't return single-point paths (ie all points were the same\n    // so they got deleted?)\n    if(pts.length < 2) return;\n    else if(closedpath) {\n        pts.pop();\n        pi.paths.push(pts);\n    } else {\n        if(!edgeflag) {\n            Lib.log('Unclosed interior contour?',\n                pi.level, startLocStr, pts.join('L'));\n        }\n\n        // edge path - does it start where an existing edge path ends, or vice versa?\n        var merged = false;\n        for(i = 0; i < pi.edgepaths.length; i++) {\n            edgepathi = pi.edgepaths[i];\n            if(!merged && equalPts(edgepathi[0], pts[pts.length - 1], xtol, ytol)) {\n                pts.pop();\n                merged = true;\n\n                // now does it ALSO meet the end of another (or the same) path?\n                var doublemerged = false;\n                for(j = 0; j < pi.edgepaths.length; j++) {\n                    edgepathj = pi.edgepaths[j];\n                    if(equalPts(edgepathj[edgepathj.length - 1], pts[0], xtol, ytol)) {\n                        doublemerged = true;\n                        pts.shift();\n                        pi.edgepaths.splice(i, 1);\n                        if(j === i) {\n                            // the path is now closed\n                            pi.paths.push(pts.concat(edgepathj));\n                        } else {\n                            if(j > i) j--;\n                            pi.edgepaths[j] = edgepathj.concat(pts, edgepathi);\n                        }\n                        break;\n                    }\n                }\n                if(!doublemerged) {\n                    pi.edgepaths[i] = pts.concat(edgepathi);\n                }\n            }\n        }\n        for(i = 0; i < pi.edgepaths.length; i++) {\n            if(merged) break;\n            edgepathi = pi.edgepaths[i];\n            if(equalPts(edgepathi[edgepathi.length - 1], pts[0], xtol, ytol)) {\n                pts.shift();\n                pi.edgepaths[i] = edgepathi.concat(pts);\n                merged = true;\n            }\n        }\n\n        if(!merged) pi.edgepaths.push(pts);\n    }\n}\n\n// special function to get the marching step of the\n// first point in the path (leading to loc)\nfunction startStep(mi, edgeflag, loc) {\n    var dx = 0;\n    var dy = 0;\n    if(mi > 20 && edgeflag) {\n        // these saddles start at +/- x\n        if(mi === 208 || mi === 1114) {\n            // if we're starting at the left side, we must be going right\n            dx = loc[0] === 0 ? 1 : -1;\n        } else {\n            // if we're starting at the bottom, we must be going up\n            dy = loc[1] === 0 ? 1 : -1;\n        }\n    } else if(constants.BOTTOMSTART.indexOf(mi) !== -1) dy = 1;\n    else if(constants.LEFTSTART.indexOf(mi) !== -1) dx = 1;\n    else if(constants.TOPSTART.indexOf(mi) !== -1) dy = -1;\n    else dx = -1;\n    return [dx, dy];\n}\n\n/*\n * Find the pixel coordinates of a particular crossing\n *\n * @param {object} pi: the pathinfo object at this level\n * @param {array} loc: the grid index [x, y] of the crossing\n * @param {array} step: the direction [dx, dy] we're moving on the grid\n *\n * @return {array} [xpx, ypx, xi, yi]: the first two are the pixel location,\n *   the next two are the interpolated grid indices, which we use for\n *   distance calculations to delete points that are too close together.\n *   This is important when the grid is nonuniform (and most dramatically when\n *   we're on log axes and include invalid (0 or negative) values.\n *   It's crucial to delete these extra two before turning an array of these\n *   points into a path, because those routines require length-2 points.\n */\nfunction getInterpPx(pi, loc, step) {\n    var locx = loc[0] + Math.max(step[0], 0);\n    var locy = loc[1] + Math.max(step[1], 0);\n    var zxy = pi.z[locy][locx];\n    var xa = pi.xaxis;\n    var ya = pi.yaxis;\n\n    if(step[1]) {\n        var dx = (pi.level - zxy) / (pi.z[locy][locx + 1] - zxy);\n\n        return [xa.c2p((1 - dx) * pi.x[locx] + dx * pi.x[locx + 1], true),\n            ya.c2p(pi.y[locy], true),\n            locx + dx, locy];\n    } else {\n        var dy = (pi.level - zxy) / (pi.z[locy + 1][locx] - zxy);\n        return [xa.c2p(pi.x[locx], true),\n            ya.c2p((1 - dy) * pi.y[locy] + dy * pi.y[locy + 1], true),\n            locx, locy + dy];\n    }\n}\n\n},{\"../../lib\":703,\"./constants\":925}],934:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\n\nvar heatmapHoverPoints = _dereq_('../heatmap/hover');\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer) {\n    var hoverData = heatmapHoverPoints(pointData, xval, yval, hovermode, hoverLayer, true);\n\n    if(hoverData) {\n        hoverData.forEach(function(hoverPt) {\n            var trace = hoverPt.trace;\n            if(trace.contours.type === 'constraint') {\n                if(trace.fillcolor && Color.opacity(trace.fillcolor)) {\n                    hoverPt.color = Color.addOpacity(trace.fillcolor, 1);\n                } else if(trace.contours.showlines && Color.opacity(trace.line.color)) {\n                    hoverPt.color = Color.addOpacity(trace.line.color, 1);\n                }\n            }\n        });\n    }\n\n    return hoverData;\n};\n\n},{\"../../components/color\":580,\"../heatmap/hover\":979}],935:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot').plot,\n    style: _dereq_('./style'),\n    colorbar: _dereq_('./colorbar'),\n    hoverPoints: _dereq_('./hover'),\n\n    moduleType: 'trace',\n    name: 'contour',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', '2dMap', 'contour', 'showLegend'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"./attributes\":921,\"./calc\":922,\"./colorbar\":924,\"./defaults\":930,\"./hover\":934,\"./plot\":939,\"./style\":941}],936:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function handleLabelDefaults(coerce, layout, lineColor, opts) {\n    if(!opts) opts = {};\n    var showLabels = coerce('contours.showlabels');\n    if(showLabels) {\n        var globalFont = layout.font;\n        Lib.coerceFont(coerce, 'contours.labelfont', {\n            family: globalFont.family,\n            size: globalFont.size,\n            color: lineColor\n        });\n        coerce('contours.labelformat');\n    }\n\n    if(opts.hasHover !== false) coerce('zhoverformat');\n};\n\n},{\"../../lib\":703}],937:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Colorscale = _dereq_('../../components/colorscale');\nvar endPlus = _dereq_('./end_plus');\n\nmodule.exports = function makeColorMap(trace) {\n    var contours = trace.contours;\n    var start = contours.start;\n    var end = endPlus(contours);\n    var cs = contours.size || 1;\n    var nc = Math.floor((end - start) / cs) + 1;\n    var extra = contours.coloring === 'lines' ? 0 : 1;\n    var cOpts = Colorscale.extractOpts(trace);\n\n    if(!isFinite(cs)) {\n        cs = 1;\n        nc = 1;\n    }\n\n    var scl = cOpts.reversescale ?\n        Colorscale.flipScale(cOpts.colorscale) :\n        cOpts.colorscale;\n\n    var len = scl.length;\n    var domain = new Array(len);\n    var range = new Array(len);\n\n    var si, i;\n\n    if(contours.coloring === 'heatmap') {\n        var zmin0 = cOpts.min;\n        var zmax0 = cOpts.max;\n\n        for(i = 0; i < len; i++) {\n            si = scl[i];\n            domain[i] = si[0] * (zmax0 - zmin0) + zmin0;\n            range[i] = si[1];\n        }\n\n        // do the contours extend beyond the colorscale?\n        // if so, extend the colorscale with constants\n        var zRange = d3.extent([\n            zmin0,\n            zmax0,\n            contours.start,\n            contours.start + cs * (nc - 1)\n        ]);\n        var zmin = zRange[zmin0 < zmax0 ? 0 : 1];\n        var zmax = zRange[zmin0 < zmax0 ? 1 : 0];\n\n        if(zmin !== zmin0) {\n            domain.splice(0, 0, zmin);\n            range.splice(0, 0, range[0]);\n        }\n\n        if(zmax !== zmax0) {\n            domain.push(zmax);\n            range.push(range[range.length - 1]);\n        }\n    } else {\n        for(i = 0; i < len; i++) {\n            si = scl[i];\n            domain[i] = (si[0] * (nc + extra - 1) - (extra / 2)) * cs + start;\n            range[i] = si[1];\n        }\n    }\n\n    return Colorscale.makeColorScaleFunc(\n        {domain: domain, range: range},\n        {noNumericCheck: true}\n    );\n};\n\n},{\"../../components/colorscale\":592,\"./end_plus\":932,\"d3\":157}],938:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar constants = _dereq_('./constants');\n\n// Calculate all the marching indices, for ALL levels at once.\n// since we want to be exhaustive we'll check for contour crossings\n// at every intersection, rather than just following a path\n// TODO: shorten the inner loop to only the relevant levels\nmodule.exports = function makeCrossings(pathinfo) {\n    var z = pathinfo[0].z;\n    var m = z.length;\n    var n = z[0].length; // we already made sure z isn't ragged in interp2d\n    var twoWide = m === 2 || n === 2;\n    var xi;\n    var yi;\n    var startIndices;\n    var ystartIndices;\n    var label;\n    var corners;\n    var mi;\n    var pi;\n    var i;\n\n    for(yi = 0; yi < m - 1; yi++) {\n        ystartIndices = [];\n        if(yi === 0) ystartIndices = ystartIndices.concat(constants.BOTTOMSTART);\n        if(yi === m - 2) ystartIndices = ystartIndices.concat(constants.TOPSTART);\n\n        for(xi = 0; xi < n - 1; xi++) {\n            startIndices = ystartIndices.slice();\n            if(xi === 0) startIndices = startIndices.concat(constants.LEFTSTART);\n            if(xi === n - 2) startIndices = startIndices.concat(constants.RIGHTSTART);\n\n            label = xi + ',' + yi;\n            corners = [[z[yi][xi], z[yi][xi + 1]],\n                       [z[yi + 1][xi], z[yi + 1][xi + 1]]];\n            for(i = 0; i < pathinfo.length; i++) {\n                pi = pathinfo[i];\n                mi = getMarchingIndex(pi.level, corners);\n                if(!mi) continue;\n\n                pi.crossings[label] = mi;\n                if(startIndices.indexOf(mi) !== -1) {\n                    pi.starts.push([xi, yi]);\n                    if(twoWide && startIndices.indexOf(mi,\n                            startIndices.indexOf(mi) + 1) !== -1) {\n                        // the same square has starts from opposite sides\n                        // it's not possible to have starts on opposite edges\n                        // of a corner, only a start and an end...\n                        // but if the array is only two points wide (either way)\n                        // you can have starts on opposite sides.\n                        pi.starts.push([xi, yi]);\n                    }\n                }\n            }\n        }\n    }\n};\n\n// modified marching squares algorithm,\n// so we disambiguate the saddle points from the start\n// and we ignore the cases with no crossings\n// the index I'm using is based on:\n// http://en.wikipedia.org/wiki/Marching_squares\n// except that the saddles bifurcate and I represent them\n// as the decimal combination of the two appropriate\n// non-saddle indices\nfunction getMarchingIndex(val, corners) {\n    var mi = (corners[0][0] > val ? 0 : 1) +\n             (corners[0][1] > val ? 0 : 2) +\n             (corners[1][1] > val ? 0 : 4) +\n             (corners[1][0] > val ? 0 : 8);\n    if(mi === 5 || mi === 10) {\n        var avg = (corners[0][0] + corners[0][1] +\n                   corners[1][0] + corners[1][1]) / 4;\n        // two peaks with a big valley\n        if(val > avg) return (mi === 5) ? 713 : 1114;\n        // two valleys with a big ridge\n        return (mi === 5) ? 104 : 208;\n    }\n    return (mi === 15) ? 0 : mi;\n}\n\n},{\"./constants\":925}],939:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar setConvert = _dereq_('../../plots/cartesian/set_convert');\n\nvar heatmapPlot = _dereq_('../heatmap/plot');\nvar makeCrossings = _dereq_('./make_crossings');\nvar findAllPaths = _dereq_('./find_all_paths');\nvar emptyPathinfo = _dereq_('./empty_pathinfo');\nvar convertToConstraints = _dereq_('./convert_to_constraints');\nvar closeBoundaries = _dereq_('./close_boundaries');\nvar constants = _dereq_('./constants');\nvar costConstants = constants.LABELOPTIMIZER;\n\nexports.plot = function plot(gd, plotinfo, cdcontours, contourLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(contourLayer, cdcontours, 'contour').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n        var x = cd0.x;\n        var y = cd0.y;\n        var contours = trace.contours;\n        var pathinfo = emptyPathinfo(contours, plotinfo, cd0);\n\n        // use a heatmap to fill - draw it behind the lines\n        var heatmapColoringLayer = Lib.ensureSingle(plotGroup, 'g', 'heatmapcoloring');\n        var cdheatmaps = [];\n        if(contours.coloring === 'heatmap') {\n            cdheatmaps = [cd];\n        }\n        heatmapPlot(gd, plotinfo, cdheatmaps, heatmapColoringLayer);\n\n        makeCrossings(pathinfo);\n        findAllPaths(pathinfo);\n\n        var leftedge = xa.c2p(x[0], true);\n        var rightedge = xa.c2p(x[x.length - 1], true);\n        var bottomedge = ya.c2p(y[0], true);\n        var topedge = ya.c2p(y[y.length - 1], true);\n        var perimeter = [\n            [leftedge, topedge],\n            [rightedge, topedge],\n            [rightedge, bottomedge],\n            [leftedge, bottomedge]\n        ];\n\n        var fillPathinfo = pathinfo;\n        if(contours.type === 'constraint') {\n            fillPathinfo = convertToConstraints(pathinfo, contours._operation);\n            closeBoundaries(fillPathinfo, contours._operation, perimeter, trace);\n        }\n\n        // draw everything\n        makeBackground(plotGroup, perimeter, contours);\n        makeFills(plotGroup, fillPathinfo, perimeter, contours);\n        makeLinesAndLabels(plotGroup, pathinfo, gd, cd0, contours);\n        clipGaps(plotGroup, plotinfo, gd, cd0, perimeter);\n    });\n};\n\nfunction makeBackground(plotgroup, perimeter, contours) {\n    var bggroup = Lib.ensureSingle(plotgroup, 'g', 'contourbg');\n\n    var bgfill = bggroup.selectAll('path')\n        .data(contours.coloring === 'fill' ? [0] : []);\n    bgfill.enter().append('path');\n    bgfill.exit().remove();\n    bgfill\n        .attr('d', 'M' + perimeter.join('L') + 'Z')\n        .style('stroke', 'none');\n}\n\nfunction makeFills(plotgroup, pathinfo, perimeter, contours) {\n    var fillgroup = Lib.ensureSingle(plotgroup, 'g', 'contourfill');\n\n    var fillitems = fillgroup.selectAll('path')\n        .data(contours.coloring === 'fill' || (contours.type === 'constraint' && contours._operation !== '=') ? pathinfo : []);\n    fillitems.enter().append('path');\n    fillitems.exit().remove();\n    fillitems.each(function(pi) {\n        // join all paths for this level together into a single path\n        // first follow clockwise around the perimeter to close any open paths\n        // if the whole perimeter is above this level, start with a path\n        // enclosing the whole thing. With all that, the parity should mean\n        // that we always fill everything above the contour, nothing below\n        var fullpath = joinAllPaths(pi, perimeter);\n\n        if(!fullpath) d3.select(this).remove();\n        else d3.select(this).attr('d', fullpath).style('stroke', 'none');\n    });\n}\n\nfunction initFullPath(pi, perimeter) {\n    var prefixBoundary = pi.prefixBoundary;\n    if(prefixBoundary === undefined) {\n        var edgeVal2 = Math.min(pi.z[0][0], pi.z[0][1]);\n        prefixBoundary = (!pi.edgepaths.length && edgeVal2 > pi.level);\n    }\n\n    if(prefixBoundary) {\n        // TODO: why does ^^ not work for constraints?\n        // pi.prefixBoundary gets set by closeBoundaries\n        return 'M' + perimeter.join('L') + 'Z';\n    }\n    return '';\n}\n\nfunction joinAllPaths(pi, perimeter) {\n    var fullpath = initFullPath(pi, perimeter);\n    var i = 0;\n    var startsleft = pi.edgepaths.map(function(v, i) { return i; });\n    var newloop = true;\n    var endpt;\n    var newendpt;\n    var cnt;\n    var nexti;\n    var possiblei;\n    var addpath;\n\n    function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < 0.01; }\n    function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < 0.01; }\n    function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < 0.01; }\n    function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < 0.01; }\n\n    while(startsleft.length) {\n        addpath = Drawing.smoothopen(pi.edgepaths[i], pi.smoothing);\n        fullpath += newloop ? addpath : addpath.replace(/^M/, 'L');\n        startsleft.splice(startsleft.indexOf(i), 1);\n        endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1];\n        nexti = -1;\n\n        // now loop through sides, moving our endpoint until we find a new start\n        for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops\n            if(!endpt) {\n                Lib.log('Missing end?', i, pi);\n                break;\n            }\n\n            if(istop(endpt) && !isright(endpt)) newendpt = perimeter[1]; // right top\n            else if(isleft(endpt)) newendpt = perimeter[0]; // left top\n            else if(isbottom(endpt)) newendpt = perimeter[3]; // right bottom\n            else if(isright(endpt)) newendpt = perimeter[2]; // left bottom\n\n            for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) {\n                var ptNew = pi.edgepaths[possiblei][0];\n                // is ptNew on the (horz. or vert.) segment from endpt to newendpt?\n                if(Math.abs(endpt[0] - newendpt[0]) < 0.01) {\n                    if(Math.abs(endpt[0] - ptNew[0]) < 0.01 &&\n                            (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) {\n                        newendpt = ptNew;\n                        nexti = possiblei;\n                    }\n                } else if(Math.abs(endpt[1] - newendpt[1]) < 0.01) {\n                    if(Math.abs(endpt[1] - ptNew[1]) < 0.01 &&\n                            (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) {\n                        newendpt = ptNew;\n                        nexti = possiblei;\n                    }\n                } else {\n                    Lib.log('endpt to newendpt is not vert. or horz.',\n                        endpt, newendpt, ptNew);\n                }\n            }\n\n            endpt = newendpt;\n\n            if(nexti >= 0) break;\n            fullpath += 'L' + newendpt;\n        }\n\n        if(nexti === pi.edgepaths.length) {\n            Lib.log('unclosed perimeter path');\n            break;\n        }\n\n        i = nexti;\n\n        // if we closed back on a loop we already included,\n        // close it and start a new loop\n        newloop = (startsleft.indexOf(i) === -1);\n        if(newloop) {\n            i = startsleft[0];\n            fullpath += 'Z';\n        }\n    }\n\n    // finally add the interior paths\n    for(i = 0; i < pi.paths.length; i++) {\n        fullpath += Drawing.smoothclosed(pi.paths[i], pi.smoothing);\n    }\n\n    return fullpath;\n}\n\nfunction makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours) {\n    var lineContainer = Lib.ensureSingle(plotgroup, 'g', 'contourlines');\n    var showLines = contours.showlines !== false;\n    var showLabels = contours.showlabels;\n    var clipLinesForLabels = showLines && showLabels;\n\n    // Even if we're not going to show lines, we need to create them\n    // if we're showing labels, because the fill paths include the perimeter\n    // so can't be used to position the labels correctly.\n    // In this case we'll remove the lines after making the labels.\n    var linegroup = exports.createLines(lineContainer, showLines || showLabels, pathinfo);\n\n    var lineClip = exports.createLineClip(lineContainer, clipLinesForLabels, gd, cd0.trace.uid);\n\n    var labelGroup = plotgroup.selectAll('g.contourlabels')\n        .data(showLabels ? [0] : []);\n\n    labelGroup.exit().remove();\n\n    labelGroup.enter().append('g')\n        .classed('contourlabels', true);\n\n    if(showLabels) {\n        var labelClipPathData = [];\n        var labelData = [];\n\n        // invalidate the getTextLocation cache in case paths changed\n        Lib.clearLocationCache();\n\n        var contourFormat = exports.labelFormatter(contours, cd0.t.cb, gd._fullLayout);\n\n        var dummyText = Drawing.tester.append('text')\n            .attr('data-notex', 1)\n            .call(Drawing.font, contours.labelfont);\n\n        var xa = pathinfo[0].xaxis;\n        var ya = pathinfo[0].yaxis;\n        var xLen = xa._length;\n        var yLen = ya._length;\n        var xRng = xa.range;\n        var yRng = ya.range;\n        var xMin = Lib.aggNums(Math.min, null, cd0.x);\n        var xMax = Lib.aggNums(Math.max, null, cd0.x);\n        var yMin = Lib.aggNums(Math.min, null, cd0.y);\n        var yMax = Lib.aggNums(Math.max, null, cd0.y);\n        var x0 = Math.max(xa.c2p(xMin, true), 0);\n        var x1 = Math.min(xa.c2p(xMax, true), xLen);\n        var y0 = Math.max(ya.c2p(yMax, true), 0);\n        var y1 = Math.min(ya.c2p(yMin, true), yLen);\n\n        // visible bounds of the contour trace (and the midpoints, to\n        // help with cost calculations)\n        var bounds = {};\n\n        if(xRng[0] < xRng[1]) {\n            bounds.left = x0;\n            bounds.right = x1;\n        } else {\n            bounds.left = x1;\n            bounds.right = x0;\n        }\n\n        if(yRng[0] < yRng[1]) {\n            bounds.top = y0;\n            bounds.bottom = y1;\n        } else {\n            bounds.top = y1;\n            bounds.bottom = y0;\n        }\n\n        bounds.middle = (bounds.top + bounds.bottom) / 2;\n        bounds.center = (bounds.left + bounds.right) / 2;\n\n        labelClipPathData.push([\n            [bounds.left, bounds.top],\n            [bounds.right, bounds.top],\n            [bounds.right, bounds.bottom],\n            [bounds.left, bounds.bottom]\n        ]);\n\n        var plotDiagonal = Math.sqrt(xLen * xLen + yLen * yLen);\n\n        // the path length to use to scale the number of labels to draw:\n        var normLength = constants.LABELDISTANCE * plotDiagonal /\n            Math.max(1, pathinfo.length / constants.LABELINCREASE);\n\n        linegroup.each(function(d) {\n            var textOpts = exports.calcTextOpts(d.level, contourFormat, dummyText, gd);\n\n            d3.select(this).selectAll('path').each(function() {\n                var path = this;\n                var pathBounds = Lib.getVisibleSegment(path, bounds, textOpts.height / 2);\n                if(!pathBounds) return;\n\n                if(pathBounds.len < (textOpts.width + textOpts.height) * constants.LABELMIN) return;\n\n                var maxLabels = Math.min(Math.ceil(pathBounds.len / normLength),\n                    constants.LABELMAX);\n\n                for(var i = 0; i < maxLabels; i++) {\n                    var loc = exports.findBestTextLocation(path, pathBounds, textOpts,\n                        labelData, bounds);\n\n                    if(!loc) break;\n\n                    exports.addLabelData(loc, textOpts, labelData, labelClipPathData);\n                }\n            });\n        });\n\n        dummyText.remove();\n\n        exports.drawLabels(labelGroup, labelData, gd, lineClip,\n            clipLinesForLabels ? labelClipPathData : null);\n    }\n\n    if(showLabels && !showLines) linegroup.remove();\n}\n\nexports.createLines = function(lineContainer, makeLines, pathinfo) {\n    var smoothing = pathinfo[0].smoothing;\n\n    var linegroup = lineContainer.selectAll('g.contourlevel')\n        .data(makeLines ? pathinfo : []);\n\n    linegroup.exit().remove();\n    linegroup.enter().append('g')\n        .classed('contourlevel', true);\n\n    if(makeLines) {\n        // pedgepaths / ppaths are used by contourcarpet, for the paths transformed from a/b to x/y\n        // edgepaths / paths are used by contour since it's in x/y from the start\n        var opencontourlines = linegroup.selectAll('path.openline')\n            .data(function(d) { return d.pedgepaths || d.edgepaths; });\n\n        opencontourlines.exit().remove();\n        opencontourlines.enter().append('path')\n            .classed('openline', true);\n\n        opencontourlines\n            .attr('d', function(d) {\n                return Drawing.smoothopen(d, smoothing);\n            })\n            .style('stroke-miterlimit', 1)\n            .style('vector-effect', 'non-scaling-stroke');\n\n        var closedcontourlines = linegroup.selectAll('path.closedline')\n            .data(function(d) { return d.ppaths || d.paths; });\n\n        closedcontourlines.exit().remove();\n        closedcontourlines.enter().append('path')\n            .classed('closedline', true);\n\n        closedcontourlines\n            .attr('d', function(d) {\n                return Drawing.smoothclosed(d, smoothing);\n            })\n            .style('stroke-miterlimit', 1)\n            .style('vector-effect', 'non-scaling-stroke');\n    }\n\n    return linegroup;\n};\n\nexports.createLineClip = function(lineContainer, clipLinesForLabels, gd, uid) {\n    var clips = gd._fullLayout._clips;\n    var clipId = clipLinesForLabels ? ('clipline' + uid) : null;\n\n    var lineClip = clips.selectAll('#' + clipId)\n        .data(clipLinesForLabels ? [0] : []);\n    lineClip.exit().remove();\n\n    lineClip.enter().append('clipPath')\n        .classed('contourlineclip', true)\n        .attr('id', clipId);\n\n    Drawing.setClipUrl(lineContainer, clipId, gd);\n\n    return lineClip;\n};\n\nexports.labelFormatter = function(contours, colorbar, fullLayout) {\n    if(contours.labelformat) {\n        return fullLayout._d3locale.numberFormat(contours.labelformat);\n    } else {\n        var formatAxis;\n        if(colorbar) {\n            formatAxis = colorbar.axis;\n        } else {\n            formatAxis = {\n                type: 'linear',\n                _id: 'ycontour',\n                showexponent: 'all',\n                exponentformat: 'B'\n            };\n\n            if(contours.type === 'constraint') {\n                var value = contours.value;\n                if(Array.isArray(value)) {\n                    formatAxis.range = [value[0], value[value.length - 1]];\n                } else formatAxis.range = [value, value];\n            } else {\n                formatAxis.range = [contours.start, contours.end];\n                formatAxis.nticks = (contours.end - contours.start) / contours.size;\n            }\n\n            if(formatAxis.range[0] === formatAxis.range[1]) {\n                formatAxis.range[1] += formatAxis.range[0] || 1;\n            }\n            if(!formatAxis.nticks) formatAxis.nticks = 1000;\n\n            setConvert(formatAxis, fullLayout);\n            Axes.prepTicks(formatAxis);\n            formatAxis._tmin = null;\n            formatAxis._tmax = null;\n        }\n        return function(v) {\n            return Axes.tickText(formatAxis, v).text;\n        };\n    }\n};\n\nexports.calcTextOpts = function(level, contourFormat, dummyText, gd) {\n    var text = contourFormat(level);\n    dummyText.text(text)\n        .call(svgTextUtils.convertToTspans, gd);\n    var bBox = Drawing.bBox(dummyText.node(), true);\n\n    return {\n        text: text,\n        width: bBox.width,\n        height: bBox.height,\n        level: level,\n        dy: (bBox.top + bBox.bottom) / 2\n    };\n};\n\nexports.findBestTextLocation = function(path, pathBounds, textOpts, labelData, plotBounds) {\n    var textWidth = textOpts.width;\n\n    var p0, dp, pMax, pMin, loc;\n    if(pathBounds.isClosed) {\n        dp = pathBounds.len / costConstants.INITIALSEARCHPOINTS;\n        p0 = pathBounds.min + dp / 2;\n        pMax = pathBounds.max;\n    } else {\n        dp = (pathBounds.len - textWidth) / (costConstants.INITIALSEARCHPOINTS + 1);\n        p0 = pathBounds.min + dp + textWidth / 2;\n        pMax = pathBounds.max - (dp + textWidth) / 2;\n    }\n\n    var cost = Infinity;\n    for(var j = 0; j < costConstants.ITERATIONS; j++) {\n        for(var p = p0; p < pMax; p += dp) {\n            var newLocation = Lib.getTextLocation(path, pathBounds.total, p, textWidth);\n            var newCost = locationCost(newLocation, textOpts, labelData, plotBounds);\n            if(newCost < cost) {\n                cost = newCost;\n                loc = newLocation;\n                pMin = p;\n            }\n        }\n        if(cost > costConstants.MAXCOST * 2) break;\n\n        // subsequent iterations just look half steps away from the\n        // best we found in the previous iteration\n        if(j) dp /= 2;\n        p0 = pMin - dp / 2;\n        pMax = p0 + dp * 1.5;\n    }\n    if(cost <= costConstants.MAXCOST) return loc;\n};\n\n/*\n * locationCost: a cost function for label locations\n * composed of three kinds of penalty:\n * - for open paths, being close to the end of the path\n * - the angle away from horizontal\n * - being too close to already placed neighbors\n */\nfunction locationCost(loc, textOpts, labelData, bounds) {\n    var halfWidth = textOpts.width / 2;\n    var halfHeight = textOpts.height / 2;\n    var x = loc.x;\n    var y = loc.y;\n    var theta = loc.theta;\n    var dx = Math.cos(theta) * halfWidth;\n    var dy = Math.sin(theta) * halfWidth;\n\n    // cost for being near an edge\n    var normX = ((x > bounds.center) ? (bounds.right - x) : (x - bounds.left)) /\n        (dx + Math.abs(Math.sin(theta) * halfHeight));\n    var normY = ((y > bounds.middle) ? (bounds.bottom - y) : (y - bounds.top)) /\n        (Math.abs(dy) + Math.cos(theta) * halfHeight);\n    if(normX < 1 || normY < 1) return Infinity;\n    var cost = costConstants.EDGECOST * (1 / (normX - 1) + 1 / (normY - 1));\n\n    // cost for not being horizontal\n    cost += costConstants.ANGLECOST * theta * theta;\n\n    // cost for being close to other labels\n    var x1 = x - dx;\n    var y1 = y - dy;\n    var x2 = x + dx;\n    var y2 = y + dy;\n    for(var i = 0; i < labelData.length; i++) {\n        var labeli = labelData[i];\n        var dxd = Math.cos(labeli.theta) * labeli.width / 2;\n        var dyd = Math.sin(labeli.theta) * labeli.width / 2;\n        var dist = Lib.segmentDistance(\n            x1, y1,\n            x2, y2,\n            labeli.x - dxd, labeli.y - dyd,\n            labeli.x + dxd, labeli.y + dyd\n        ) * 2 / (textOpts.height + labeli.height);\n\n        var sameLevel = labeli.level === textOpts.level;\n        var distOffset = sameLevel ? costConstants.SAMELEVELDISTANCE : 1;\n\n        if(dist <= distOffset) return Infinity;\n\n        var distFactor = costConstants.NEIGHBORCOST *\n            (sameLevel ? costConstants.SAMELEVELFACTOR : 1);\n\n        cost += distFactor / (dist - distOffset);\n    }\n\n    return cost;\n}\n\nexports.addLabelData = function(loc, textOpts, labelData, labelClipPathData) {\n    var halfWidth = textOpts.width / 2;\n    var halfHeight = textOpts.height / 2;\n\n    var x = loc.x;\n    var y = loc.y;\n    var theta = loc.theta;\n\n    var sin = Math.sin(theta);\n    var cos = Math.cos(theta);\n    var dxw = halfWidth * cos;\n    var dxh = halfHeight * sin;\n    var dyw = halfWidth * sin;\n    var dyh = -halfHeight * cos;\n    var bBoxPts = [\n        [x - dxw - dxh, y - dyw - dyh],\n        [x + dxw - dxh, y + dyw - dyh],\n        [x + dxw + dxh, y + dyw + dyh],\n        [x - dxw + dxh, y - dyw + dyh],\n    ];\n\n    labelData.push({\n        text: textOpts.text,\n        x: x,\n        y: y,\n        dy: textOpts.dy,\n        theta: theta,\n        level: textOpts.level,\n        width: textOpts.width,\n        height: textOpts.height\n    });\n\n    labelClipPathData.push(bBoxPts);\n};\n\nexports.drawLabels = function(labelGroup, labelData, gd, lineClip, labelClipPathData) {\n    var labels = labelGroup.selectAll('text')\n        .data(labelData, function(d) {\n            return d.text + ',' + d.x + ',' + d.y + ',' + d.theta;\n        });\n\n    labels.exit().remove();\n\n    labels.enter().append('text')\n        .attr({\n            'data-notex': 1,\n            'text-anchor': 'middle'\n        })\n        .each(function(d) {\n            var x = d.x + Math.sin(d.theta) * d.dy;\n            var y = d.y - Math.cos(d.theta) * d.dy;\n            d3.select(this)\n                .text(d.text)\n                .attr({\n                    x: x,\n                    y: y,\n                    transform: 'rotate(' + (180 * d.theta / Math.PI) + ' ' + x + ' ' + y + ')'\n                })\n                .call(svgTextUtils.convertToTspans, gd);\n        });\n\n    if(labelClipPathData) {\n        var clipPath = '';\n        for(var i = 0; i < labelClipPathData.length; i++) {\n            clipPath += 'M' + labelClipPathData[i].join('L') + 'Z';\n        }\n\n        var lineClipPath = Lib.ensureSingle(lineClip, 'path', '');\n        lineClipPath.attr('d', clipPath);\n    }\n};\n\nfunction clipGaps(plotGroup, plotinfo, gd, cd0, perimeter) {\n    var clips = gd._fullLayout._clips;\n    var clipId = 'clip' + cd0.trace.uid;\n\n    var clipPath = clips.selectAll('#' + clipId)\n        .data(cd0.trace.connectgaps ? [] : [0]);\n    clipPath.enter().append('clipPath')\n        .classed('contourclip', true)\n        .attr('id', clipId);\n    clipPath.exit().remove();\n\n    if(cd0.trace.connectgaps === false) {\n        var clipPathInfo = {\n            // fraction of the way from missing to present point\n            // to draw the boundary.\n            // if you make this 1 (or 1-epsilon) then a point in\n            // a sea of missing data will disappear entirely.\n            level: 0.9,\n            crossings: {},\n            starts: [],\n            edgepaths: [],\n            paths: [],\n            xaxis: plotinfo.xaxis,\n            yaxis: plotinfo.yaxis,\n            x: cd0.x,\n            y: cd0.y,\n            // 0 = no data, 1 = data\n            z: makeClipMask(cd0),\n            smoothing: 0\n        };\n\n        makeCrossings([clipPathInfo]);\n        findAllPaths([clipPathInfo]);\n        var fullpath = joinAllPaths(clipPathInfo, perimeter);\n\n        var path = Lib.ensureSingle(clipPath, 'path', '');\n        path.attr('d', fullpath);\n    } else clipId = null;\n\n    Drawing.setClipUrl(plotGroup, clipId, gd);\n}\n\nfunction makeClipMask(cd0) {\n    var empties = cd0.trace._emptypoints;\n    var z = [];\n    var m = cd0.z.length;\n    var n = cd0.z[0].length;\n    var i;\n    var row = [];\n    var emptyPoint;\n\n    for(i = 0; i < n; i++) row.push(1);\n    for(i = 0; i < m; i++) z.push(row.slice());\n    for(i = 0; i < empties.length; i++) {\n        emptyPoint = empties[i];\n        z[emptyPoint[0]][emptyPoint[1]] = 0;\n    }\n    // save this mask to determine whether to show this data in hover\n    cd0.zmask = z;\n    return z;\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plots/cartesian/axes\":751,\"../../plots/cartesian/set_convert\":769,\"../heatmap/plot\":983,\"./close_boundaries\":923,\"./constants\":925,\"./convert_to_constraints\":929,\"./empty_pathinfo\":931,\"./find_all_paths\":933,\"./make_crossings\":938,\"d3\":157}],940:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function setContours(trace, vals) {\n    var contours = trace.contours;\n\n    // check if we need to auto-choose contour levels\n    if(trace.autocontour) {\n        // N.B. do not try to use coloraxis cmin/cmax,\n        // these values here are meant to remain \"per-trace\" for now\n        var zmin = trace.zmin;\n        var zmax = trace.zmax;\n        if(trace.zauto || zmin === undefined) {\n            zmin = Lib.aggNums(Math.min, null, vals);\n        }\n        if(trace.zauto || zmax === undefined) {\n            zmax = Lib.aggNums(Math.max, null, vals);\n        }\n\n        var dummyAx = autoContours(zmin, zmax, trace.ncontours);\n        contours.size = dummyAx.dtick;\n        contours.start = Axes.tickFirst(dummyAx);\n        dummyAx.range.reverse();\n        contours.end = Axes.tickFirst(dummyAx);\n\n        if(contours.start === zmin) contours.start += contours.size;\n        if(contours.end === zmax) contours.end -= contours.size;\n\n        // if you set a small ncontours, *and* the ends are exactly on zmin/zmax\n        // there's an edge case where start > end now. Make sure there's at least\n        // one meaningful contour, put it midway between the crossed values\n        if(contours.start > contours.end) {\n            contours.start = contours.end = (contours.start + contours.end) / 2;\n        }\n\n        // copy auto-contour info back to the source data.\n        // previously we copied the whole contours object back, but that had\n        // other info (coloring, showlines) that should be left to supplyDefaults\n        if(!trace._input.contours) trace._input.contours = {};\n        Lib.extendFlat(trace._input.contours, {\n            start: contours.start,\n            end: contours.end,\n            size: contours.size\n        });\n        trace._input.autocontour = true;\n    } else if(contours.type !== 'constraint') {\n        // sanity checks on manually-supplied start/end/size\n        var start = contours.start;\n        var end = contours.end;\n        var inputContours = trace._input.contours;\n\n        if(start > end) {\n            contours.start = inputContours.start = end;\n            end = contours.end = inputContours.end = start;\n            start = contours.start;\n        }\n\n        if(!(contours.size > 0)) {\n            var sizeOut;\n            if(start === end) sizeOut = 1;\n            else sizeOut = autoContours(start, end, trace.ncontours).dtick;\n\n            inputContours.size = contours.size = sizeOut;\n        }\n    }\n};\n\n\n/*\n * autoContours: make a dummy axis object with dtick we can use\n * as contours.size, and if needed we can use Axes.tickFirst\n * with this axis object to calculate the start and end too\n *\n * start: the value to start the contours at\n * end: the value to end at (must be > start)\n * ncontours: max number of contours to make, like roughDTick\n *\n * returns: an axis object\n */\nfunction autoContours(start, end, ncontours) {\n    var dummyAx = {\n        type: 'linear',\n        range: [start, end]\n    };\n\n    Axes.autoTicks(\n        dummyAx,\n        (end - start) / (ncontours || 15)\n    );\n\n    return dummyAx;\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751}],941:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Drawing = _dereq_('../../components/drawing');\nvar heatmapStyle = _dereq_('../heatmap/style');\n\nvar makeColorMap = _dereq_('./make_color_map');\n\n\nmodule.exports = function style(gd) {\n    var contours = d3.select(gd).selectAll('g.contour');\n\n    contours.style('opacity', function(d) {\n        return d[0].trace.opacity;\n    });\n\n    contours.each(function(d) {\n        var c = d3.select(this);\n        var trace = d[0].trace;\n        var contours = trace.contours;\n        var line = trace.line;\n        var cs = contours.size || 1;\n        var start = contours.start;\n\n        // for contourcarpet only - is this a constraint-type contour trace?\n        var isConstraintType = contours.type === 'constraint';\n        var colorLines = !isConstraintType && contours.coloring === 'lines';\n        var colorFills = !isConstraintType && contours.coloring === 'fill';\n\n        var colorMap = (colorLines || colorFills) ? makeColorMap(trace) : null;\n\n        c.selectAll('g.contourlevel').each(function(d) {\n            d3.select(this).selectAll('path')\n                .call(Drawing.lineGroupStyle,\n                    line.width,\n                    colorLines ? colorMap(d.level) : line.color,\n                    line.dash);\n        });\n\n        var labelFont = contours.labelfont;\n        c.selectAll('g.contourlabels text').each(function(d) {\n            Drawing.font(d3.select(this), {\n                family: labelFont.family,\n                size: labelFont.size,\n                color: labelFont.color || (colorLines ? colorMap(d.level) : line.color)\n            });\n        });\n\n        if(isConstraintType) {\n            c.selectAll('g.contourfill path')\n                .style('fill', trace.fillcolor);\n        } else if(colorFills) {\n            var firstFill;\n\n            c.selectAll('g.contourfill path')\n                .style('fill', function(d) {\n                    if(firstFill === undefined) firstFill = d.level;\n                    return colorMap(d.level + 0.5 * cs);\n                });\n\n            if(firstFill === undefined) firstFill = start;\n\n            c.selectAll('g.contourbg path')\n                .style('fill', colorMap(firstFill - 0.5 * cs));\n        }\n    });\n\n    heatmapStyle(gd);\n};\n\n},{\"../../components/drawing\":601,\"../heatmap/style\":984,\"./make_color_map\":937,\"d3\":157}],942:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar handleLabelDefaults = _dereq_('./label_defaults');\n\n\nmodule.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, opts) {\n    var coloring = coerce('contours.coloring');\n\n    var showLines;\n    var lineColor = '';\n    if(coloring === 'fill') showLines = coerce('contours.showlines');\n\n    if(showLines !== false) {\n        if(coloring !== 'lines') lineColor = coerce('line.color', '#000');\n        coerce('line.width', 0.5);\n        coerce('line.dash');\n    }\n\n    if(coloring !== 'none') {\n        // plots/plots always coerces showlegend to true, but in this case\n        // we default to false and (by default) show a colorbar instead\n        if(traceIn.showlegend !== true) traceOut.showlegend = false;\n        traceOut._dfltShowLegend = false;\n\n        colorscaleDefaults(\n            traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}\n        );\n    }\n\n    coerce('line.smoothing');\n\n    handleLabelDefaults(coerce, layout, lineColor, opts);\n};\n\n},{\"../../components/colorscale/defaults\":590,\"./label_defaults\":936}],943:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar heatmapAttrs = _dereq_('../heatmap/attributes');\nvar contourAttrs = _dereq_('../contour/attributes');\nvar contourContourAttrs = contourAttrs.contours;\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterLineAttrs = scatterAttrs.line;\n\nmodule.exports = extendFlat({\n    carpet: {\n        valType: 'string',\n        \n        editType: 'calc',\n        \n    },\n    z: heatmapAttrs.z,\n    a: heatmapAttrs.x,\n    a0: heatmapAttrs.x0,\n    da: heatmapAttrs.dx,\n    b: heatmapAttrs.y,\n    b0: heatmapAttrs.y0,\n    db: heatmapAttrs.dy,\n    text: heatmapAttrs.text,\n    hovertext: heatmapAttrs.hovertext,\n    transpose: heatmapAttrs.transpose,\n    atype: heatmapAttrs.xtype,\n    btype: heatmapAttrs.ytype,\n\n    fillcolor: contourAttrs.fillcolor,\n\n    autocontour: contourAttrs.autocontour,\n    ncontours: contourAttrs.ncontours,\n\n    contours: {\n        type: contourContourAttrs.type,\n        start: contourContourAttrs.start,\n        end: contourContourAttrs.end,\n        size: contourContourAttrs.size,\n        coloring: {\n            // from contourAttrs.contours.coloring but no 'heatmap' option\n            valType: 'enumerated',\n            values: ['fill', 'lines', 'none'],\n            dflt: 'fill',\n            \n            editType: 'calc',\n            \n        },\n        showlines: contourContourAttrs.showlines,\n        showlabels: contourContourAttrs.showlabels,\n        labelfont: contourContourAttrs.labelfont,\n        labelformat: contourContourAttrs.labelformat,\n        operation: contourContourAttrs.operation,\n        value: contourContourAttrs.value,\n        editType: 'calc',\n        impliedEdits: {'autocontour': false}\n    },\n\n    line: {\n        color: extendFlat({}, scatterLineAttrs.color, {\n            \n        }),\n        width: scatterLineAttrs.width,\n        dash: scatterLineAttrs.dash,\n        smoothing: extendFlat({}, scatterLineAttrs.smoothing, {\n            \n        }),\n        editType: 'plot'\n    },\n    transforms: undefined\n},\n\n    colorScaleAttrs('', {\n        cLetter: 'z',\n        autoColorDflt: false\n    })\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../contour/attributes\":921,\"../heatmap/attributes\":972,\"../scatter/attributes\":1075}],944:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar Lib = _dereq_('../../lib');\n\nvar convertColumnData = _dereq_('../heatmap/convert_column_xyz');\nvar clean2dArray = _dereq_('../heatmap/clean_2d_array');\nvar interp2d = _dereq_('../heatmap/interp2d');\nvar findEmpties = _dereq_('../heatmap/find_empties');\nvar makeBoundArray = _dereq_('../heatmap/make_bound_array');\nvar supplyDefaults = _dereq_('./defaults');\nvar lookupCarpet = _dereq_('../carpet/lookup_carpetid');\nvar setContours = _dereq_('../contour/set_contours');\n\n// most is the same as heatmap calc, then adjust it\n// though a few things inside heatmap calc still look for\n// contour maps, because the makeBoundArray calls are too entangled\nmodule.exports = function calc(gd, trace) {\n    var carpet = trace._carpetTrace = lookupCarpet(gd, trace);\n    if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return;\n\n    if(!trace.a || !trace.b) {\n        // Look up the original incoming carpet data:\n        var carpetdata = gd.data[carpet.index];\n\n        // Look up the incoming trace data, *except* perform a shallow\n        // copy so that we're not actually modifying it when we use it\n        // to supply defaults:\n        var tracedata = gd.data[trace.index];\n        // var tracedata = extendFlat({}, gd.data[trace.index]);\n\n        // If the data is not specified\n        if(!tracedata.a) tracedata.a = carpetdata.a;\n        if(!tracedata.b) tracedata.b = carpetdata.b;\n\n        supplyDefaults(tracedata, trace, trace._defaultColor, gd._fullLayout);\n    }\n\n    var cd = heatmappishCalc(gd, trace);\n    setContours(trace, trace._z);\n\n    return cd;\n};\n\nfunction heatmappishCalc(gd, trace) {\n    // prepare the raw data\n    // run makeCalcdata on x and y even for heatmaps, in case of category mappings\n    var carpet = trace._carpetTrace;\n    var aax = carpet.aaxis;\n    var bax = carpet.baxis;\n    var a,\n        a0,\n        da,\n        b,\n        b0,\n        db,\n        z;\n\n    // cancel minimum tick spacings (only applies to bars and boxes)\n    aax._minDtick = 0;\n    bax._minDtick = 0;\n\n    if(Lib.isArray1D(trace.z)) convertColumnData(trace, aax, bax, 'a', 'b', ['z']);\n    a = trace._a = trace._a || trace.a;\n    b = trace._b = trace._b || trace.b;\n\n    a = a ? aax.makeCalcdata(trace, '_a') : [];\n    b = b ? bax.makeCalcdata(trace, '_b') : [];\n    a0 = trace.a0 || 0;\n    da = trace.da || 1;\n    b0 = trace.b0 || 0;\n    db = trace.db || 1;\n\n    z = trace._z = clean2dArray(trace._z || trace.z, trace.transpose);\n\n    trace._emptypoints = findEmpties(z);\n    interp2d(z, trace._emptypoints);\n\n    // create arrays of brick boundaries, to be used by autorange and heatmap.plot\n    var xlen = Lib.maxRowLength(z);\n    var xIn = trace.xtype === 'scaled' ? '' : a;\n    var xArray = makeBoundArray(trace, xIn, a0, da, xlen, aax);\n    var yIn = trace.ytype === 'scaled' ? '' : b;\n    var yArray = makeBoundArray(trace, yIn, b0, db, z.length, bax);\n\n    var cd0 = {\n        a: xArray,\n        b: yArray,\n        z: z,\n    };\n\n    if(trace.contours.type === 'levels' && trace.contours.coloring !== 'none') {\n        // auto-z and autocolorscale if applicable\n        colorscaleCalc(gd, trace, {\n            vals: z,\n            containerStr: '',\n            cLetter: 'z'\n        });\n    }\n\n    return [cd0];\n}\n\n},{\"../../components/colorscale/calc\":588,\"../../lib\":703,\"../carpet/lookup_carpetid\":899,\"../contour/set_contours\":940,\"../heatmap/clean_2d_array\":974,\"../heatmap/convert_column_xyz\":976,\"../heatmap/find_empties\":978,\"../heatmap/interp2d\":981,\"../heatmap/make_bound_array\":982,\"./defaults\":945}],945:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleXYZDefaults = _dereq_('../heatmap/xyz_defaults');\nvar attributes = _dereq_('./attributes');\nvar handleConstraintDefaults = _dereq_('../contour/constraint_defaults');\nvar handleContoursDefaults = _dereq_('../contour/contours_defaults');\nvar handleStyleDefaults = _dereq_('../contour/style_defaults');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    function coerce2(attr) {\n        return Lib.coerce2(traceIn, traceOut, attributes, attr);\n    }\n\n    coerce('carpet');\n\n    // If either a or b is not present, then it's not a valid trace *unless* the carpet\n    // axis has the a or b values we're looking for. So if these are not found, just defer\n    // that decision until the calc step.\n    //\n    // NB: the calc step will modify the original data input by assigning whichever of\n    // a or b are missing. This is necessary because panning goes right from supplyDefaults\n    // to plot (skipping calc). That means on subsequent updates, this *will* need to be\n    // able to find a and b.\n    //\n    // The long-term proper fix is that this should perhaps use underscored attributes to\n    // at least modify the user input to a slightly lesser extent. Fully removing the\n    // input mutation is challenging. The underscore approach is not currently taken since\n    // it requires modification to all of the functions below that expect the coerced\n    // attribute name to match the property name -- except '_a' !== 'a' so that is not\n    // straightforward.\n    if(traceIn.a && traceIn.b) {\n        var len = handleXYZDefaults(traceIn, traceOut, coerce, layout, 'a', 'b');\n\n        if(!len) {\n            traceOut.visible = false;\n            return;\n        }\n\n        coerce('text');\n        var isConstraint = (coerce('contours.type') === 'constraint');\n\n        if(isConstraint) {\n            handleConstraintDefaults(traceIn, traceOut, coerce, layout, defaultColor, {hasHover: false});\n        } else {\n            handleContoursDefaults(traceIn, traceOut, coerce, coerce2);\n            handleStyleDefaults(traceIn, traceOut, coerce, layout, {hasHover: false});\n        }\n    } else {\n        traceOut._defaultColor = defaultColor;\n        traceOut._length = null;\n    }\n};\n\n},{\"../../lib\":703,\"../contour/constraint_defaults\":926,\"../contour/contours_defaults\":928,\"../contour/style_defaults\":942,\"../heatmap/xyz_defaults\":986,\"./attributes\":943}],946:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../contour/colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('../contour/style'),\n\n    moduleType: 'trace',\n    name: 'contourcarpet',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../contour/colorbar\":924,\"../contour/style\":941,\"./attributes\":943,\"./calc\":944,\"./defaults\":945,\"./plot\":949}],947:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Drawing = _dereq_('../../components/drawing');\nvar axisAlignedLine = _dereq_('../carpet/axis_aligned_line');\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya) {\n    var i;\n    var fullpath = '';\n\n    var startsleft = pi.edgepaths.map(function(v, i) { return i; });\n    var newloop = true;\n    var endpt, newendpt, cnt, nexti, possiblei, addpath;\n\n    var atol = Math.abs(perimeter[0][0] - perimeter[2][0]) * 1e-4;\n    var btol = Math.abs(perimeter[0][1] - perimeter[2][1]) * 1e-4;\n\n    function istop(pt) { return Math.abs(pt[1] - perimeter[0][1]) < btol; }\n    function isbottom(pt) { return Math.abs(pt[1] - perimeter[2][1]) < btol; }\n    function isleft(pt) { return Math.abs(pt[0] - perimeter[0][0]) < atol; }\n    function isright(pt) { return Math.abs(pt[0] - perimeter[2][0]) < atol; }\n\n    function pathto(pt0, pt1) {\n        var i, j, segments, axis;\n        var path = '';\n\n        if((istop(pt0) && !isright(pt0)) || (isbottom(pt0) && !isleft(pt0))) {\n            axis = carpet.aaxis;\n            segments = axisAlignedLine(carpet, carpetcd, [pt0[0], pt1[0]], 0.5 * (pt0[1] + pt1[1]));\n        } else {\n            axis = carpet.baxis;\n            segments = axisAlignedLine(carpet, carpetcd, 0.5 * (pt0[0] + pt1[0]), [pt0[1], pt1[1]]);\n        }\n\n        for(i = 1; i < segments.length; i++) {\n            path += axis.smoothing ? 'C' : 'L';\n            for(j = 0; j < segments[i].length; j++) {\n                var pt = segments[i][j];\n                path += [xa.c2p(pt[0]), ya.c2p(pt[1])] + ' ';\n            }\n        }\n\n        return path;\n    }\n\n    i = 0;\n    endpt = null;\n    while(startsleft.length) {\n        var startpt = pi.edgepaths[i][0];\n\n        if(endpt) {\n            fullpath += pathto(endpt, startpt);\n        }\n\n        addpath = Drawing.smoothopen(pi.edgepaths[i].map(ab2p), pi.smoothing);\n        fullpath += newloop ? addpath : addpath.replace(/^M/, 'L');\n        startsleft.splice(startsleft.indexOf(i), 1);\n        endpt = pi.edgepaths[i][pi.edgepaths[i].length - 1];\n        nexti = -1;\n\n        // now loop through sides, moving our endpoint until we find a new start\n        for(cnt = 0; cnt < 4; cnt++) { // just to prevent infinite loops\n            if(!endpt) {\n                Lib.log('Missing end?', i, pi);\n                break;\n            }\n\n            if(istop(endpt) && !isright(endpt)) {\n                newendpt = perimeter[1]; // left top ---> right top\n            } else if(isleft(endpt)) {\n                newendpt = perimeter[0]; // left bottom ---> left top\n            } else if(isbottom(endpt)) {\n                newendpt = perimeter[3]; // right bottom\n            } else if(isright(endpt)) {\n                newendpt = perimeter[2]; // left bottom\n            }\n\n            for(possiblei = 0; possiblei < pi.edgepaths.length; possiblei++) {\n                var ptNew = pi.edgepaths[possiblei][0];\n                // is ptNew on the (horz. or vert.) segment from endpt to newendpt?\n                if(Math.abs(endpt[0] - newendpt[0]) < atol) {\n                    if(Math.abs(endpt[0] - ptNew[0]) < atol && (ptNew[1] - endpt[1]) * (newendpt[1] - ptNew[1]) >= 0) {\n                        newendpt = ptNew;\n                        nexti = possiblei;\n                    }\n                } else if(Math.abs(endpt[1] - newendpt[1]) < btol) {\n                    if(Math.abs(endpt[1] - ptNew[1]) < btol && (ptNew[0] - endpt[0]) * (newendpt[0] - ptNew[0]) >= 0) {\n                        newendpt = ptNew;\n                        nexti = possiblei;\n                    }\n                } else {\n                    Lib.log('endpt to newendpt is not vert. or horz.', endpt, newendpt, ptNew);\n                }\n            }\n\n            if(nexti >= 0) break;\n            fullpath += pathto(endpt, newendpt);\n            endpt = newendpt;\n        }\n\n        if(nexti === pi.edgepaths.length) {\n            Lib.log('unclosed perimeter path');\n            break;\n        }\n\n        i = nexti;\n\n        // if we closed back on a loop we already included,\n        // close it and start a new loop\n        newloop = (startsleft.indexOf(i) === -1);\n        if(newloop) {\n            i = startsleft[0];\n            fullpath += pathto(endpt, newendpt) + 'Z';\n            endpt = null;\n        }\n    }\n\n    // finally add the interior paths\n    for(i = 0; i < pi.paths.length; i++) {\n        fullpath += Drawing.smoothclosed(pi.paths[i].map(ab2p), pi.smoothing);\n    }\n\n    return fullpath;\n};\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../carpet/axis_aligned_line\":883}],948:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function mapPathinfo(pathinfo, map) {\n    var i, j, k, pi, pedgepaths, ppaths, pedgepath, ppath, path;\n\n    for(i = 0; i < pathinfo.length; i++) {\n        pi = pathinfo[i];\n        pedgepaths = pi.pedgepaths = [];\n        ppaths = pi.ppaths = [];\n        for(j = 0; j < pi.edgepaths.length; j++) {\n            path = pi.edgepaths[j];\n            pedgepath = [];\n            for(k = 0; k < path.length; k++) {\n                pedgepath[k] = map(path[k]);\n            }\n            pedgepaths.push(pedgepath);\n        }\n        for(j = 0; j < pi.paths.length; j++) {\n            path = pi.paths[j];\n            ppath = [];\n            for(k = 0; k < path.length; k++) {\n                ppath[k] = map(path[k]);\n            }\n            ppaths.push(ppath);\n        }\n    }\n};\n\n},{}],949:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar map1dArray = _dereq_('../carpet/map_1d_array');\nvar makepath = _dereq_('../carpet/makepath');\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\n\nvar makeCrossings = _dereq_('../contour/make_crossings');\nvar findAllPaths = _dereq_('../contour/find_all_paths');\nvar contourPlot = _dereq_('../contour/plot');\nvar constants = _dereq_('../contour/constants');\nvar convertToConstraints = _dereq_('../contour/convert_to_constraints');\nvar joinAllPaths = _dereq_('./join_all_paths');\nvar emptyPathinfo = _dereq_('../contour/empty_pathinfo');\nvar mapPathinfo = _dereq_('./map_pathinfo');\nvar lookupCarpet = _dereq_('../carpet/lookup_carpetid');\nvar closeBoundaries = _dereq_('../contour/close_boundaries');\n\nmodule.exports = function plot(gd, plotinfo, cdcontours, contourcarpetLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(contourcarpetLayer, cdcontours, 'contour').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n\n        var carpet = trace._carpetTrace = lookupCarpet(gd, trace);\n        var carpetcd = gd.calcdata[carpet.index][0];\n\n        if(!carpet.visible || carpet.visible === 'legendonly') return;\n\n        var a = cd0.a;\n        var b = cd0.b;\n        var contours = trace.contours;\n        var pathinfo = emptyPathinfo(contours, plotinfo, cd0);\n        var isConstraint = contours.type === 'constraint';\n        var operation = contours._operation;\n        var coloring = isConstraint ? (operation === '=' ? 'lines' : 'fill') : contours.coloring;\n\n        // Map [a, b] (data) --> [i, j] (pixels)\n        function ab2p(ab) {\n            var pt = carpet.ab2xy(ab[0], ab[1], true);\n            return [xa.c2p(pt[0]), ya.c2p(pt[1])];\n        }\n\n        // Define the perimeter in a/b coordinates:\n        var perimeter = [\n            [a[0], b[b.length - 1]],\n            [a[a.length - 1], b[b.length - 1]],\n            [a[a.length - 1], b[0]],\n            [a[0], b[0]]\n        ];\n\n        // Extract the contour levels:\n        makeCrossings(pathinfo);\n        var atol = (a[a.length - 1] - a[0]) * 1e-8;\n        var btol = (b[b.length - 1] - b[0]) * 1e-8;\n        findAllPaths(pathinfo, atol, btol);\n\n        // Constraints might need to be draw inverted, which is not something contours\n        // handle by default since they're assumed fully opaque so that they can be\n        // drawn overlapping. This function flips the paths as necessary so that they're\n        // drawn correctly.\n        //\n        // TODO: Perhaps this should be generalized and *all* paths should be drawn as\n        // closed regions so that translucent contour levels would be valid.\n        // See: https://github.com/plotly/plotly.js/issues/1356\n        var fillPathinfo = pathinfo;\n        if(contours.type === 'constraint') {\n            fillPathinfo = convertToConstraints(pathinfo, operation);\n            closeBoundaries(fillPathinfo, operation, perimeter, trace);\n        }\n\n        // Map the paths in a/b coordinates to pixel coordinates:\n        mapPathinfo(pathinfo, ab2p);\n\n        // draw everything\n\n        // Compute the boundary path\n        var seg, xp, yp, i;\n        var segs = [];\n        for(i = carpetcd.clipsegments.length - 1; i >= 0; i--) {\n            seg = carpetcd.clipsegments[i];\n            xp = map1dArray([], seg.x, xa.c2p);\n            yp = map1dArray([], seg.y, ya.c2p);\n            xp.reverse();\n            yp.reverse();\n            segs.push(makepath(xp, yp, seg.bicubic));\n        }\n\n        var boundaryPath = 'M' + segs.join('L') + 'Z';\n\n        // Draw the baseline background fill that fills in the space behind any other\n        // contour levels:\n        makeBackground(plotGroup, carpetcd.clipsegments, xa, ya, isConstraint, coloring);\n\n        // Draw the specific contour fills. As a simplification, they're assumed to be\n        // fully opaque so that it's easy to draw them simply overlapping. The alternative\n        // would be to flip adjacent paths and draw closed paths for each level instead.\n        makeFills(trace, plotGroup, xa, ya, fillPathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath);\n\n        // Draw contour lines:\n        makeLinesAndLabels(plotGroup, pathinfo, gd, cd0, contours, plotinfo, carpet);\n\n        // Clip the boundary of the plot\n        Drawing.setClipUrl(plotGroup, carpet._clipPathId, gd);\n    });\n};\n\nfunction makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, plotinfo, carpet) {\n    var lineContainer = Lib.ensureSingle(plotgroup, 'g', 'contourlines');\n    var showLines = contours.showlines !== false;\n    var showLabels = contours.showlabels;\n    var clipLinesForLabels = showLines && showLabels;\n\n    // Even if we're not going to show lines, we need to create them\n    // if we're showing labels, because the fill paths include the perimeter\n    // so can't be used to position the labels correctly.\n    // In this case we'll remove the lines after making the labels.\n    var linegroup = contourPlot.createLines(lineContainer, showLines || showLabels, pathinfo);\n\n    var lineClip = contourPlot.createLineClip(lineContainer, clipLinesForLabels, gd, cd0.trace.uid);\n\n    var labelGroup = plotgroup.selectAll('g.contourlabels')\n        .data(showLabels ? [0] : []);\n\n    labelGroup.exit().remove();\n\n    labelGroup.enter().append('g')\n        .classed('contourlabels', true);\n\n    if(showLabels) {\n        var xa = plotinfo.xaxis;\n        var ya = plotinfo.yaxis;\n        var xLen = xa._length;\n        var yLen = ya._length;\n        // for simplicity use the xy box for label clipping outline.\n        var labelClipPathData = [[\n            [0, 0],\n            [xLen, 0],\n            [xLen, yLen],\n            [0, yLen]\n        ]];\n\n\n        var labelData = [];\n\n        // invalidate the getTextLocation cache in case paths changed\n        Lib.clearLocationCache();\n\n        var contourFormat = contourPlot.labelFormatter(contours, cd0.t.cb, gd._fullLayout);\n\n        var dummyText = Drawing.tester.append('text')\n            .attr('data-notex', 1)\n            .call(Drawing.font, contours.labelfont);\n\n        // use `bounds` only to keep labels away from the x/y boundaries\n        // `constrainToCarpet` below ensures labels don't go off the\n        // carpet edges\n        var bounds = {\n            left: 0,\n            right: xLen,\n            center: xLen / 2,\n            top: 0,\n            bottom: yLen,\n            middle: yLen / 2\n        };\n\n        var plotDiagonal = Math.sqrt(xLen * xLen + yLen * yLen);\n\n        // the path length to use to scale the number of labels to draw:\n        var normLength = constants.LABELDISTANCE * plotDiagonal /\n            Math.max(1, pathinfo.length / constants.LABELINCREASE);\n\n        linegroup.each(function(d) {\n            var textOpts = contourPlot.calcTextOpts(d.level, contourFormat, dummyText, gd);\n\n            d3.select(this).selectAll('path').each(function(pathData) {\n                var path = this;\n                var pathBounds = Lib.getVisibleSegment(path, bounds, textOpts.height / 2);\n                if(!pathBounds) return;\n\n                constrainToCarpet(path, pathData, d, pathBounds, carpet, textOpts.height);\n\n                if(pathBounds.len < (textOpts.width + textOpts.height) * constants.LABELMIN) return;\n\n                var maxLabels = Math.min(Math.ceil(pathBounds.len / normLength),\n                    constants.LABELMAX);\n\n                for(var i = 0; i < maxLabels; i++) {\n                    var loc = contourPlot.findBestTextLocation(path, pathBounds, textOpts,\n                        labelData, bounds);\n\n                    if(!loc) break;\n\n                    contourPlot.addLabelData(loc, textOpts, labelData, labelClipPathData);\n                }\n            });\n        });\n\n        dummyText.remove();\n\n        contourPlot.drawLabels(labelGroup, labelData, gd, lineClip,\n            clipLinesForLabels ? labelClipPathData : null);\n    }\n\n    if(showLabels && !showLines) linegroup.remove();\n}\n\n// figure out if this path goes off the edge of the carpet\n// and shorten the part we call visible to keep labels away from the edge\nfunction constrainToCarpet(path, pathData, levelData, pathBounds, carpet, textHeight) {\n    var pathABData;\n    for(var i = 0; i < levelData.pedgepaths.length; i++) {\n        if(pathData === levelData.pedgepaths[i]) {\n            pathABData = levelData.edgepaths[i];\n        }\n    }\n    if(!pathABData) return;\n\n    var aMin = carpet.a[0];\n    var aMax = carpet.a[carpet.a.length - 1];\n    var bMin = carpet.b[0];\n    var bMax = carpet.b[carpet.b.length - 1];\n\n    function getOffset(abPt, pathVector) {\n        var offset = 0;\n        var edgeVector;\n        var dAB = 0.1;\n        if(Math.abs(abPt[0] - aMin) < dAB || Math.abs(abPt[0] - aMax) < dAB) {\n            edgeVector = normalizeVector(carpet.dxydb_rough(abPt[0], abPt[1], dAB));\n            offset = Math.max(offset, textHeight * vectorTan(pathVector, edgeVector) / 2);\n        }\n\n        if(Math.abs(abPt[1] - bMin) < dAB || Math.abs(abPt[1] - bMax) < dAB) {\n            edgeVector = normalizeVector(carpet.dxyda_rough(abPt[0], abPt[1], dAB));\n            offset = Math.max(offset, textHeight * vectorTan(pathVector, edgeVector) / 2);\n        }\n        return offset;\n    }\n\n    var startVector = getUnitVector(path, 0, 1);\n    var endVector = getUnitVector(path, pathBounds.total, pathBounds.total - 1);\n    var minStart = getOffset(pathABData[0], startVector);\n    var maxEnd = pathBounds.total - getOffset(pathABData[pathABData.length - 1], endVector);\n\n    if(pathBounds.min < minStart) pathBounds.min = minStart;\n    if(pathBounds.max > maxEnd) pathBounds.max = maxEnd;\n\n    pathBounds.len = pathBounds.max - pathBounds.min;\n}\n\nfunction getUnitVector(path, p0, p1) {\n    var pt0 = path.getPointAtLength(p0);\n    var pt1 = path.getPointAtLength(p1);\n    var dx = pt1.x - pt0.x;\n    var dy = pt1.y - pt0.y;\n    var len = Math.sqrt(dx * dx + dy * dy);\n    return [dx / len, dy / len];\n}\n\nfunction normalizeVector(v) {\n    var len = Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n    return [v[0] / len, v[1] / len];\n}\n\nfunction vectorTan(v0, v1) {\n    var cos = Math.abs(v0[0] * v1[0] + v0[1] * v1[1]);\n    var sin = Math.sqrt(1 - cos * cos);\n    return sin / cos;\n}\n\nfunction makeBackground(plotgroup, clipsegments, xaxis, yaxis, isConstraint, coloring) {\n    var seg, xp, yp, i;\n    var bggroup = Lib.ensureSingle(plotgroup, 'g', 'contourbg');\n\n    var bgfill = bggroup.selectAll('path')\n        .data((coloring === 'fill' && !isConstraint) ? [0] : []);\n    bgfill.enter().append('path');\n    bgfill.exit().remove();\n\n    var segs = [];\n    for(i = 0; i < clipsegments.length; i++) {\n        seg = clipsegments[i];\n        xp = map1dArray([], seg.x, xaxis.c2p);\n        yp = map1dArray([], seg.y, yaxis.c2p);\n        segs.push(makepath(xp, yp, seg.bicubic));\n    }\n\n    bgfill\n        .attr('d', 'M' + segs.join('L') + 'Z')\n        .style('stroke', 'none');\n}\n\nfunction makeFills(trace, plotgroup, xa, ya, pathinfo, perimeter, ab2p, carpet, carpetcd, coloring, boundaryPath) {\n    var fillgroup = Lib.ensureSingle(plotgroup, 'g', 'contourfill');\n\n    var fillitems = fillgroup.selectAll('path')\n        .data(coloring === 'fill' ? pathinfo : []);\n    fillitems.enter().append('path');\n    fillitems.exit().remove();\n    fillitems.each(function(pi) {\n        // join all paths for this level together into a single path\n        // first follow clockwise around the perimeter to close any open paths\n        // if the whole perimeter is above this level, start with a path\n        // enclosing the whole thing. With all that, the parity should mean\n        // that we always fill everything above the contour, nothing below\n        var fullpath = joinAllPaths(trace, pi, perimeter, ab2p, carpet, carpetcd, xa, ya);\n\n        if(pi.prefixBoundary) {\n            fullpath = boundaryPath + fullpath;\n        }\n\n        if(!fullpath) {\n            d3.select(this).remove();\n        } else {\n            d3.select(this)\n                .attr('d', fullpath)\n                .style('stroke', 'none');\n        }\n    });\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../carpet/lookup_carpetid\":899,\"../carpet/makepath\":900,\"../carpet/map_1d_array\":901,\"../contour/close_boundaries\":923,\"../contour/constants\":925,\"../contour/convert_to_constraints\":929,\"../contour/empty_pathinfo\":931,\"../contour/find_all_paths\":933,\"../contour/make_crossings\":938,\"../contour/plot\":939,\"./join_all_paths\":947,\"./map_pathinfo\":948,\"d3\":157}],950:[function(_dereq_,module,exports){\narguments[4][840][0].apply(exports,arguments)\n},{\"../../lib\":703,\"dup\":840}],951:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar barAttrs = _dereq_('../bar/attributes');\nvar lineAttrs = _dereq_('../scatter/attributes').line;\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar constants = _dereq_('./constants');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar Color = _dereq_('../../components/color');\n\nmodule.exports = {\n    x: barAttrs.x,\n    x0: barAttrs.x0,\n    dx: barAttrs.dx,\n    y: barAttrs.y,\n    y0: barAttrs.y0,\n    dy: barAttrs.dy,\n\n    hovertext: barAttrs.hovertext,\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: constants.eventDataKeys\n    }),\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total']\n    }),\n\n    textinfo: {\n        valType: 'flaglist',\n        flags: ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'],\n        extras: ['none'],\n        \n        editType: 'plot',\n        arrayOk: false,\n        \n    },\n\n    text: barAttrs.text,\n    textposition: extendFlat({}, barAttrs.textposition, {dflt: 'auto'}),\n    insidetextanchor: extendFlat({}, barAttrs.insidetextanchor, {dflt: 'middle'}),\n    textangle: extendFlat({}, barAttrs.textangle, {dflt: 0}),\n    textfont: barAttrs.textfont,\n    insidetextfont: barAttrs.insidetextfont,\n    outsidetextfont: barAttrs.outsidetextfont,\n    constraintext: barAttrs.constraintext,\n    cliponaxis: barAttrs.cliponaxis,\n\n    orientation: extendFlat({}, barAttrs.orientation, {\n        \n    }),\n\n    offset: extendFlat({}, barAttrs.offset, {arrayOk: false}),\n    width: extendFlat({}, barAttrs.width, {arrayOk: false}),\n\n    marker: barAttrs.marker,\n\n    connector: {\n        fillcolor: {\n            valType: 'color',\n            \n            editType: 'style',\n            \n        },\n        line: {\n            color: extendFlat({}, lineAttrs.color, {dflt: Color.defaultLine}),\n            width: extendFlat({}, lineAttrs.width, {\n                dflt: 0,\n                editType: 'plot',\n            }),\n            dash: lineAttrs.dash,\n            editType: 'style'\n        },\n        visible: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'plot',\n            \n        },\n        editType: 'plot'\n    },\n\n    offsetgroup: barAttrs.offsetgroup,\n    alignmentgroup: barAttrs.alignmentgroup\n};\n\n},{\"../../components/color\":580,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../bar/attributes\":841,\"../scatter/attributes\":1075,\"./constants\":953}],952:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar arraysToCalcdata = _dereq_('./arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var size, pos, i, cdi;\n\n    if(trace.orientation === 'h') {\n        size = xa.makeCalcdata(trace, 'x');\n        pos = ya.makeCalcdata(trace, 'y');\n    } else {\n        size = ya.makeCalcdata(trace, 'y');\n        pos = xa.makeCalcdata(trace, 'x');\n    }\n\n    // create the \"calculated data\" to plot\n    var serieslen = Math.min(pos.length, size.length);\n    var cd = new Array(serieslen);\n\n    // Unlike other bar-like traces funnels do not support base attribute.\n    // bases for funnels are computed internally in a way that\n    // the mid-point of each bar are located on the axis line.\n    trace._base = [];\n\n    // set position and size\n    for(i = 0; i < serieslen; i++) {\n        // treat negative values as bad numbers\n        if(size[i] < 0) size[i] = BADNUM;\n\n        var connectToNext = false;\n        if(size[i] !== BADNUM) {\n            if(i + 1 < serieslen && size[i + 1] !== BADNUM) {\n                connectToNext = true;\n            }\n        }\n\n        cdi = cd[i] = {\n            p: pos[i],\n            s: size[i],\n            cNext: connectToNext\n        };\n\n        trace._base[i] = -0.5 * cdi.s;\n\n        if(trace.ids) {\n            cdi.id = String(trace.ids[i]);\n        }\n\n        // calculate total values\n        if(i === 0) cd[0].vTotal = 0;\n        cd[0].vTotal += fixNum(cdi.s);\n\n        // ratio from initial value\n        cdi.begR = fixNum(cdi.s) / fixNum(cd[0].s);\n    }\n\n    var prevGoodNum;\n    for(i = 0; i < serieslen; i++) {\n        cdi = cd[i];\n        if(cdi.s === BADNUM) continue;\n\n        // ratio of total value\n        cdi.sumR = cdi.s / cd[0].vTotal;\n\n        // ratio of previous (good) value\n        cdi.difR = (prevGoodNum !== undefined) ? cdi.s / prevGoodNum : 1;\n\n        prevGoodNum = cdi.s;\n    }\n\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\nfunction fixNum(a) {\n    return (a === BADNUM) ? 0 : a;\n}\n\n},{\"../../constants/numerical\":680,\"../../plots/cartesian/axes\":751,\"../scatter/calc_selection\":1077,\"./arrays_to_calcdata\":950}],953:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    eventDataKeys: [\n        'percentInitial',\n        'percentPrevious',\n        'percentTotal'\n    ]\n};\n\n},{}],954:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar setGroupPositions = _dereq_('../bar/cross_trace_calc').setGroupPositions;\n\nmodule.exports = function crossTraceCalc(gd, plotinfo) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n    var calcdata = gd.calcdata;\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var funnels = [];\n    var funnelsVert = [];\n    var funnelsHorz = [];\n    var cd, i;\n\n    for(i = 0; i < fullData.length; i++) {\n        var fullTrace = fullData[i];\n        var isHorizontal = (fullTrace.orientation === 'h');\n\n        if(\n            fullTrace.visible === true &&\n            fullTrace.xaxis === xa._id &&\n            fullTrace.yaxis === ya._id &&\n            fullTrace.type === 'funnel'\n        ) {\n            cd = calcdata[i];\n\n            if(isHorizontal) {\n                funnelsHorz.push(cd);\n            } else {\n                funnelsVert.push(cd);\n            }\n\n            funnels.push(cd);\n        }\n    }\n\n    var opts = {\n        mode: fullLayout.funnelmode,\n        norm: fullLayout.funnelnorm,\n        gap: fullLayout.funnelgap,\n        groupgap: fullLayout.funnelgroupgap\n    };\n\n    setGroupPositions(gd, xa, ya, funnelsVert, opts);\n    setGroupPositions(gd, ya, xa, funnelsHorz, opts);\n\n    for(i = 0; i < funnels.length; i++) {\n        cd = funnels[i];\n\n        for(var j = 0; j < cd.length; j++) {\n            if(j + 1 < cd.length) {\n                cd[j].nextP0 = cd[j + 1].p0;\n                cd[j].nextS0 = cd[j + 1].s0;\n\n                cd[j].nextP1 = cd[j + 1].p1;\n                cd[j].nextS1 = cd[j + 1].s1;\n            }\n        }\n    }\n};\n\n},{\"../bar/cross_trace_calc\":844}],955:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleGroupingDefaults = _dereq_('../bar/defaults').handleGroupingDefaults;\nvar handleText = _dereq_('../bar/defaults').handleText;\nvar handleXYDefaults = _dereq_('../scatter/xy_defaults');\nvar attributes = _dereq_('./attributes');\nvar Color = _dereq_('../../components/color');\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleXYDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('orientation', (traceOut.y && !traceOut.x) ? 'v' : 'h');\n    coerce('offset');\n    coerce('width');\n\n    var text = coerce('text');\n\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var textposition = coerce('textposition');\n    handleText(traceIn, traceOut, layout, coerce, textposition, {\n        moduleHasSelected: false,\n        moduleHasUnselected: false,\n        moduleHasConstrain: true,\n        moduleHasCliponaxis: true,\n        moduleHasTextangle: true,\n        moduleHasInsideanchor: true\n    });\n\n    if(traceOut.textposition !== 'none') {\n        coerce('textinfo', Array.isArray(text) ? 'text+value' : 'value');\n    }\n\n    var markerColor = coerce('marker.color', defaultColor);\n    coerce('marker.line.color', Color.defaultLine);\n    coerce('marker.line.width');\n\n    var connectorVisible = coerce('connector.visible');\n    if(connectorVisible) {\n        coerce('connector.fillcolor', defaultFillColor(markerColor));\n\n        var connectorLineWidth = coerce('connector.line.width');\n        if(connectorLineWidth) {\n            coerce('connector.line.color');\n            coerce('connector.line.dash');\n        }\n    }\n}\n\nfunction defaultFillColor(markerColor) {\n    var cBase = Lib.isArrayOrTypedArray(markerColor) ? '#000' : markerColor;\n\n    return Color.addOpacity(cBase, 0.5 * Color.opacity(cBase));\n}\n\nfunction crossTraceDefaults(fullData, fullLayout) {\n    var traceIn, traceOut;\n\n    function coerce(attr) {\n        return Lib.coerce(traceOut._input, traceOut, attributes, attr);\n    }\n\n    if(fullLayout.funnelmode === 'group') {\n        for(var i = 0; i < fullData.length; i++) {\n            traceOut = fullData[i];\n            traceIn = traceOut._input;\n\n            handleGroupingDefaults(traceIn, traceOut, fullLayout, coerce);\n        }\n    }\n}\n\nmodule.exports = {\n    supplyDefaults: supplyDefaults,\n    crossTraceDefaults: crossTraceDefaults\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../bar/defaults\":845,\"../scatter/xy_defaults\":1100,\"./attributes\":951}],956:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function eventData(out, pt /* , trace, cd, pointNumber */) {\n    // standard cartesian event data\n    out.x = 'xVal' in pt ? pt.xVal : pt.x;\n    out.y = 'yVal' in pt ? pt.yVal : pt.y;\n\n    // for funnel\n    if('percentInitial' in pt) out.percentInitial = pt.percentInitial;\n    if('percentPrevious' in pt) out.percentPrevious = pt.percentPrevious;\n    if('percentTotal' in pt) out.percentTotal = pt.percentTotal;\n\n    if(pt.xa) out.xaxis = pt.xa;\n    if(pt.ya) out.yaxis = pt.ya;\n\n    return out;\n};\n\n},{}],957:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar opacity = _dereq_('../../components/color').opacity;\nvar hoverOnBars = _dereq_('../bar/hover').hoverOnBars;\nvar formatPercent = _dereq_('../../lib').formatPercent;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var point = hoverOnBars(pointData, xval, yval, hovermode);\n    if(!point) return;\n\n    var cd = point.cd;\n    var trace = cd[0].trace;\n    var isHorizontal = (trace.orientation === 'h');\n\n    // the closest data point\n    var index = point.index;\n    var di = cd[index];\n\n    var sizeLetter = isHorizontal ? 'x' : 'y';\n    point[sizeLetter + 'LabelVal'] = di.s;\n\n    point.percentInitial = di.begR;\n    point.percentInitialLabel = formatPercent(di.begR, 1);\n\n    point.percentPrevious = di.difR;\n    point.percentPreviousLabel = formatPercent(di.difR, 1);\n\n    point.percentTotal = di.sumR;\n    point.percentTotalLabel = formatPercent(di.sumR, 1);\n\n    var hoverinfo = di.hi || trace.hoverinfo;\n    var text = [];\n    if(hoverinfo && hoverinfo !== 'none' && hoverinfo !== 'skip') {\n        var isAll = (hoverinfo === 'all');\n        var parts = hoverinfo.split('+');\n\n        var hasFlag = function(flag) { return isAll || parts.indexOf(flag) !== -1; };\n\n        if(hasFlag('percent initial')) {\n            text.push(point.percentInitialLabel + ' of initial');\n        }\n        if(hasFlag('percent previous')) {\n            text.push(point.percentPreviousLabel + ' of previous');\n        }\n        if(hasFlag('percent total')) {\n            text.push(point.percentTotalLabel + ' of total');\n        }\n    }\n    point.extraText = text.join('<br>');\n\n    point.color = getTraceColor(trace, di);\n\n    return [point];\n};\n\nfunction getTraceColor(trace, di) {\n    var cont = trace.marker;\n    var mc = di.mc || cont.color;\n    var mlc = di.mlc || cont.line.color;\n    var mlw = di.mlw || cont.line.width;\n    if(opacity(mc)) return mc;\n    else if(opacity(mlc) && mlw) return mlc;\n}\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../bar/hover\":847}],958:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    crossTraceDefaults: _dereq_('./defaults').crossTraceDefaults,\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    calc: _dereq_('./calc'),\n    crossTraceCalc: _dereq_('./cross_trace_calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style').style,\n    hoverPoints: _dereq_('./hover'),\n    eventData: _dereq_('./event_data'),\n\n    selectPoints: _dereq_('../bar/select'),\n\n    moduleType: 'trace',\n    name: 'funnel',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['bar-like', 'cartesian', 'svg', 'oriented', 'showLegend', 'zoomScale'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../bar/select\":852,\"./attributes\":951,\"./calc\":952,\"./cross_trace_calc\":954,\"./defaults\":955,\"./event_data\":956,\"./hover\":957,\"./layout_attributes\":959,\"./layout_defaults\":960,\"./plot\":961,\"./style\":962}],959:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    funnelmode: {\n        valType: 'enumerated',\n        values: ['stack', 'group', 'overlay'],\n        dflt: 'stack',\n        \n        editType: 'calc',\n        \n    },\n    funnelgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'calc',\n        \n    },\n    funnelgroupgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],960:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function(layoutIn, layoutOut, fullData) {\n    var hasTraceType = false;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n\n        if(trace.visible && trace.type === 'funnel') {\n            hasTraceType = true;\n            break;\n        }\n    }\n\n    if(hasTraceType) {\n        coerce('funnelmode');\n        coerce('funnelgap', 0.2);\n        coerce('funnelgroupgap');\n    }\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":959}],961:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar barPlot = _dereq_('../bar/plot').plot;\n\nmodule.exports = function plot(gd, plotinfo, cdModule, traceLayer) {\n    var fullLayout = gd._fullLayout;\n\n    plotConnectorRegions(gd, plotinfo, cdModule, traceLayer);\n    plotConnectorLines(gd, plotinfo, cdModule, traceLayer);\n\n    barPlot(gd, plotinfo, cdModule, traceLayer, {\n        mode: fullLayout.funnelmode,\n        norm: fullLayout.funnelmode,\n        gap: fullLayout.funnelgap,\n        groupgap: fullLayout.funnelgroupgap\n    });\n};\n\nfunction plotConnectorRegions(gd, plotinfo, cdModule, traceLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(traceLayer, cdModule, 'trace bars').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var trace = cd[0].trace;\n\n        var group = Lib.ensureSingle(plotGroup, 'g', 'regions');\n\n        if(!trace.connector || !trace.connector.visible) {\n            group.remove();\n            return;\n        }\n\n        var isHorizontal = (trace.orientation === 'h');\n\n        var connectors = group.selectAll('g.region').data(Lib.identity);\n\n        connectors.enter().append('g')\n            .classed('region', true);\n\n        connectors.exit().remove();\n\n        var len = connectors.size();\n\n        connectors.each(function(di, i) {\n            // don't draw lines between nulls\n            if(i !== len - 1 && !di.cNext) return;\n\n            var xy = getXY(di, xa, ya, isHorizontal);\n            var x = xy[0];\n            var y = xy[1];\n\n            var shape = '';\n\n            if(x[3] !== undefined && y[3] !== undefined) {\n                if(isHorizontal) {\n                    shape += 'M' + x[0] + ',' + y[1] + 'L' + x[2] + ',' + y[2] + 'H' + x[3] + 'L' + x[1] + ',' + y[1] + 'Z';\n                } else {\n                    shape += 'M' + x[1] + ',' + y[1] + 'L' + x[2] + ',' + y[3] + 'V' + y[2] + 'L' + x[1] + ',' + y[0] + 'Z';\n                }\n            }\n\n            Lib.ensureSingle(d3.select(this), 'path')\n                .attr('d', shape)\n                .call(Drawing.setClipUrl, plotinfo.layerClipId, gd);\n        });\n    });\n}\n\nfunction plotConnectorLines(gd, plotinfo, cdModule, traceLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(traceLayer, cdModule, 'trace bars').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var trace = cd[0].trace;\n\n        var group = Lib.ensureSingle(plotGroup, 'g', 'lines');\n\n        if(!trace.connector || !trace.connector.visible || !trace.connector.line.width) {\n            group.remove();\n            return;\n        }\n\n        var isHorizontal = (trace.orientation === 'h');\n\n        var connectors = group.selectAll('g.line').data(Lib.identity);\n\n        connectors.enter().append('g')\n            .classed('line', true);\n\n        connectors.exit().remove();\n\n        var len = connectors.size();\n\n        connectors.each(function(di, i) {\n            // don't draw lines between nulls\n            if(i !== len - 1 && !di.cNext) return;\n\n            var xy = getXY(di, xa, ya, isHorizontal);\n            var x = xy[0];\n            var y = xy[1];\n\n            var shape = '';\n\n            if(x[3] !== undefined && y[3] !== undefined) {\n                if(isHorizontal) {\n                    shape += 'M' + x[0] + ',' + y[1] + 'L' + x[2] + ',' + y[2];\n                    shape += 'M' + x[1] + ',' + y[1] + 'L' + x[3] + ',' + y[2];\n                } else {\n                    shape += 'M' + x[1] + ',' + y[1] + 'L' + x[2] + ',' + y[3];\n                    shape += 'M' + x[1] + ',' + y[0] + 'L' + x[2] + ',' + y[2];\n                }\n            }\n\n            if(shape === '') shape = 'M0,0Z';\n\n            Lib.ensureSingle(d3.select(this), 'path')\n                .attr('d', shape)\n                .call(Drawing.setClipUrl, plotinfo.layerClipId, gd);\n        });\n    });\n}\n\nfunction getXY(di, xa, ya, isHorizontal) {\n    var s = [];\n    var p = [];\n\n    var sAxis = isHorizontal ? xa : ya;\n    var pAxis = isHorizontal ? ya : xa;\n\n    s[0] = sAxis.c2p(di.s0, true);\n    p[0] = pAxis.c2p(di.p0, true);\n\n    s[1] = sAxis.c2p(di.s1, true);\n    p[1] = pAxis.c2p(di.p1, true);\n\n    s[2] = sAxis.c2p(di.nextS0, true);\n    p[2] = pAxis.c2p(di.nextP0, true);\n\n    s[3] = sAxis.c2p(di.nextS1, true);\n    p[3] = pAxis.c2p(di.nextP1, true);\n\n    return isHorizontal ? [s, p] : [p, s];\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../bar/plot\":851,\"d3\":157}],962:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Drawing = _dereq_('../../components/drawing');\nvar Color = _dereq_('../../components/color');\n\nvar styleTextPoints = _dereq_('../bar/style').styleTextPoints;\n\nfunction style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.funnellayer').selectAll('g.trace');\n\n    s.style('opacity', function(d) { return d[0].trace.opacity; });\n\n    s.each(function(d) {\n        var gTrace = d3.select(this);\n        var trace = d[0].trace;\n\n        gTrace.selectAll('.point > path').each(function(di) {\n            if(!di.isBlank) {\n                var cont = trace.marker;\n\n                d3.select(this)\n                    .call(Color.fill, di.mc || cont.color)\n                    .call(Color.stroke, di.mlc || cont.line.color)\n                    .call(Drawing.dashLine, cont.line.dash, di.mlw || cont.line.width)\n                    .style('opacity', trace.selectedpoints && !di.selected ? 0.3 : 1);\n            }\n        });\n\n        styleTextPoints(gTrace, trace, gd);\n\n        gTrace.selectAll('.regions').each(function() {\n            d3.select(this).selectAll('path').style('stroke-width', 0).call(Color.fill, trace.connector.fillcolor);\n        });\n\n        gTrace.selectAll('.lines').each(function() {\n            var cont = trace.connector.line;\n\n            Drawing.lineGroupStyle(\n                d3.select(this).selectAll('path'),\n                cont.width,\n                cont.color,\n                cont.dash\n            );\n        });\n    });\n}\n\nmodule.exports = {\n    style: style\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../bar/style\":854,\"d3\":157}],963:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar pieAttrs = _dereq_('../pie/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    labels: pieAttrs.labels,\n    // equivalent of x0 and dx, if label is missing\n    label0: pieAttrs.label0,\n    dlabel: pieAttrs.dlabel,\n    values: pieAttrs.values,\n\n    marker: {\n        colors: pieAttrs.marker.colors,\n        line: {\n            color: extendFlat({}, pieAttrs.marker.line.color, {\n                dflt: null,\n                \n            }),\n            width: extendFlat({}, pieAttrs.marker.line.width, {dflt: 1}),\n            editType: 'calc'\n        },\n        editType: 'calc'\n    },\n\n    text: pieAttrs.text,\n    hovertext: pieAttrs.hovertext,\n\n    scalegroup: extendFlat({}, pieAttrs.scalegroup, {\n        \n    }),\n\n    textinfo: extendFlat({}, pieAttrs.textinfo, {\n        flags: ['label', 'text', 'value', 'percent']\n    }),\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['label', 'text', 'value', 'percent', 'name']\n    }),\n\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: ['label', 'color', 'value', 'percent', 'text']\n    }),\n\n    textposition: extendFlat({}, pieAttrs.textposition, {\n        values: ['inside', 'none'],\n        dflt: 'inside'\n    }),\n\n    textfont: pieAttrs.textfont,\n    insidetextfont: pieAttrs.insidetextfont,\n\n    title: {\n        text: pieAttrs.title.text,\n        font: pieAttrs.title.font,\n        position: extendFlat({}, pieAttrs.title.position, {\n            values: ['top left', 'top center', 'top right'],\n            dflt: 'top center'\n        }),\n        editType: 'plot'\n    },\n\n    domain: domainAttrs({name: 'funnelarea', trace: true, editType: 'calc'}),\n\n    aspectratio: {\n        valType: 'number',\n        \n        min: 0,\n        dflt: 1,\n        editType: 'plot',\n        \n    },\n\n    baseratio: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 0.333,\n        editType: 'plot',\n        \n    }\n};\n\n},{\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../../plots/domain\":776,\"../pie/attributes\":1049}],964:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\n\nexports.name = 'funnelarea';\n\nexports.plot = function(gd) {\n    var Funnelarea = Registry.getModule('funnelarea');\n    var cdFunnelarea = getModuleCalcData(gd.calcdata, Funnelarea)[0];\n    Funnelarea.plot(gd, cdFunnelarea);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadFunnelarea = (oldFullLayout._has && oldFullLayout._has('funnelarea'));\n    var hasFunnelarea = (newFullLayout._has && newFullLayout._has('funnelarea'));\n\n    if(hadFunnelarea && !hasFunnelarea) {\n        oldFullLayout._funnelarealayer.selectAll('g.trace').remove();\n    }\n};\n\n},{\"../../plots/get_data\":786,\"../../registry\":831}],965:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar pieCalc = _dereq_('../pie/calc');\n\nfunction calc(gd, trace) {\n    return pieCalc.calc(gd, trace);\n}\n\nfunction crossTraceCalc(gd) {\n    pieCalc.crossTraceCalc(gd, { type: 'funnelarea' });\n}\n\nmodule.exports = {\n    calc: calc,\n    crossTraceCalc: crossTraceCalc\n};\n\n},{\"../pie/calc\":1051}],966:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleText = _dereq_('../bar/defaults').handleText;\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len;\n    var vals = coerce('values');\n    var hasVals = Lib.isArrayOrTypedArray(vals);\n    var labels = coerce('labels');\n    if(Array.isArray(labels)) {\n        len = labels.length;\n        if(hasVals) len = Math.min(len, vals.length);\n    } else if(hasVals) {\n        len = vals.length;\n\n        coerce('label0');\n        coerce('dlabel');\n    }\n\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n    traceOut._length = len;\n\n    var lineWidth = coerce('marker.line.width');\n    if(lineWidth) coerce('marker.line.color', layout.paper_bgcolor);\n\n    coerce('marker.colors');\n\n    coerce('scalegroup');\n\n    var textData = coerce('text');\n    var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    if(textInfo && textInfo !== 'none') {\n        var textposition = coerce('textposition');\n        handleText(traceIn, traceOut, layout, coerce, textposition, {\n            moduleHasSelected: false,\n            moduleHasUnselected: false,\n            moduleHasConstrain: false,\n            moduleHasCliponaxis: false,\n            moduleHasTextangle: false,\n            moduleHasInsideanchor: false\n        });\n    }\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    var title = coerce('title.text');\n    if(title) {\n        coerce('title.position');\n        Lib.coerceFont(coerce, 'title.font', layout.font);\n    }\n\n    coerce('aspectratio');\n    coerce('baseratio');\n};\n\n},{\"../../lib\":703,\"../../plots/domain\":776,\"../bar/defaults\":845,\"./attributes\":963}],967:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'funnelarea',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['pie-like', 'funnelarea', 'showLegend'],\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('./calc').crossTraceCalc,\n\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style'),\n    styleOne: _dereq_('../pie/style_one'),\n\n    meta: {\n        \n    }\n};\n\n},{\"../pie/style_one\":1060,\"./attributes\":963,\"./base_plot\":964,\"./calc\":965,\"./defaults\":966,\"./layout_attributes\":968,\"./layout_defaults\":969,\"./plot\":970,\"./style\":971}],968:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hiddenlabels = _dereq_('../pie/layout_attributes').hiddenlabels;\n\nmodule.exports = {\n    hiddenlabels: hiddenlabels,\n\n    funnelareacolorway: {\n        valType: 'colorlist',\n        \n        editType: 'calc',\n        \n    },\n    extendfunnelareacolors: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{\"../pie/layout_attributes\":1056}],969:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    coerce('hiddenlabels');\n    coerce('funnelareacolorway', layoutOut.colorway);\n    coerce('extendfunnelareacolors');\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":968}],970:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\n\nvar barPlot = _dereq_('../bar/plot');\nvar getTransformToMoveInsideBar = barPlot.getTransformToMoveInsideBar;\n\nvar pieHelpers = _dereq_('../pie/helpers');\nvar piePlot = _dereq_('../pie/plot');\n\nvar attachFxHandlers = piePlot.attachFxHandlers;\nvar determineInsideTextFont = piePlot.determineInsideTextFont;\n\nvar layoutAreas = piePlot.layoutAreas;\nvar prerenderTitles = piePlot.prerenderTitles;\nvar positionTitleOutside = piePlot.positionTitleOutside;\n\nmodule.exports = function plot(gd, cdModule) {\n    var fullLayout = gd._fullLayout;\n\n    prerenderTitles(cdModule, gd);\n    layoutAreas(cdModule, fullLayout._size);\n\n    Lib.makeTraceGroups(fullLayout._funnelarealayer, cdModule, 'trace').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n\n        setCoords(cd);\n\n        plotGroup.each(function() {\n            var slices = d3.select(this).selectAll('g.slice').data(cd);\n\n            slices.enter().append('g')\n                .classed('slice', true);\n            slices.exit().remove();\n\n            slices.each(function(pt) {\n                if(pt.hidden) {\n                    d3.select(this).selectAll('path,g').remove();\n                    return;\n                }\n\n                // to have consistent event data compared to other traces\n                pt.pointNumber = pt.i;\n                pt.curveNumber = trace.index;\n\n                var cx = cd0.cx;\n                var cy = cd0.cy;\n                var sliceTop = d3.select(this);\n                var slicePath = sliceTop.selectAll('path.surface').data([pt]);\n\n                slicePath.enter().append('path')\n                    .classed('surface', true)\n                    .style({'pointer-events': 'all'});\n\n                sliceTop.call(attachFxHandlers, gd, cd);\n\n                var shape =\n                    'M' + (cx + pt.TR[0]) + ',' + (cy + pt.TR[1]) +\n                    line(pt.TR, pt.BR) +\n                    line(pt.BR, pt.BL) +\n                    line(pt.BL, pt.TL) +\n                    'Z';\n\n                slicePath.attr('d', shape);\n\n                // add text\n                var textPosition = pieHelpers.castOption(trace.textposition, pt.pts);\n                var sliceTextGroup = sliceTop.selectAll('g.slicetext')\n                    .data(pt.text && (textPosition !== 'none') ? [0] : []);\n\n                sliceTextGroup.enter().append('g')\n                    .classed('slicetext', true);\n                sliceTextGroup.exit().remove();\n\n                sliceTextGroup.each(function() {\n                    var sliceText = Lib.ensureSingle(d3.select(this), 'text', '', function(s) {\n                        // prohibit tex interpretation until we can handle\n                        // tex and regular text together\n                        s.attr('data-notex', 1);\n                    });\n\n                    sliceText.text(pt.text)\n                        .attr({\n                            'class': 'slicetext',\n                            transform: '',\n                            'text-anchor': 'middle'\n                        })\n                        .call(Drawing.font, determineInsideTextFont(trace, pt, gd._fullLayout.font))\n                        .call(svgTextUtils.convertToTspans, gd);\n\n                    // position the text relative to the slice\n                    var textBB = Drawing.bBox(sliceText.node());\n                    var transform;\n\n                    var x0, x1;\n                    var y0 = Math.min(pt.BL[1], pt.BR[1]);\n                    var y1 = Math.max(pt.TL[1], pt.TR[1]);\n\n                    x0 = Math.max(pt.TL[0], pt.BL[0]);\n                    x1 = Math.min(pt.TR[0], pt.BR[0]);\n\n                    transform = getTransformToMoveInsideBar(x0, x1, y0, y1, textBB, {\n                        isHorizontal: true,\n                        constrained: true,\n                        angle: 0,\n                        anchor: 'middle'\n                    });\n\n                    sliceText.attr('transform',\n                        'translate(' + cx + ',' + cy + ')' + transform\n                    );\n                });\n            });\n\n            // add the title\n            var titleTextGroup = d3.select(this).selectAll('g.titletext')\n                .data(trace.title.text ? [0] : []);\n\n            titleTextGroup.enter().append('g')\n                .classed('titletext', true);\n            titleTextGroup.exit().remove();\n\n            titleTextGroup.each(function() {\n                var titleText = Lib.ensureSingle(d3.select(this), 'text', '', function(s) {\n                    // prohibit tex interpretation as above\n                    s.attr('data-notex', 1);\n                });\n\n                var txt = trace.title.text;\n                if(trace._meta) {\n                    txt = Lib.templateString(txt, trace._meta);\n                }\n\n                titleText.text(txt)\n                    .attr({\n                        'class': 'titletext',\n                        transform: '',\n                        'text-anchor': 'middle',\n                    })\n                .call(Drawing.font, trace.title.font)\n                .call(svgTextUtils.convertToTspans, gd);\n\n                var transform = positionTitleOutside(cd0, fullLayout._size);\n\n                titleText.attr('transform',\n                    'translate(' + transform.x + ',' + transform.y + ')' +\n                    (transform.scale < 1 ? ('scale(' + transform.scale + ')') : '') +\n                    'translate(' + transform.tx + ',' + transform.ty + ')');\n            });\n        });\n    });\n};\n\nfunction line(a, b) {\n    var dx = b[0] - a[0];\n    var dy = b[1] - a[1];\n\n    return 'l' + dx + ',' + dy;\n}\n\nfunction getBetween(a, b) {\n    return [\n        0.5 * (a[0] + b[0]),\n        0.5 * (a[1] + b[1])\n    ];\n}\n\nfunction setCoords(cd) {\n    if(!cd.length) return;\n\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n\n    var aspectratio = trace.aspectratio;\n\n    var h = trace.baseratio;\n    if(h > 0.999) h = 0.999; // TODO: may handle this case separately\n    var h2 = Math.pow(h, 2);\n\n    var v1 = cd0.vTotal;\n    var v0 = v1 * h2 / (1 - h2);\n\n    var totalValues = v1;\n    var sumSteps = v0 / v1;\n\n    function calcPos() {\n        var q = Math.sqrt(sumSteps);\n        return {\n            x: q,\n            y: -q\n        };\n    }\n\n    function getPoint() {\n        var pos = calcPos();\n        return [pos.x, pos.y];\n    }\n\n    var p;\n    var allPoints = [];\n    allPoints.push(getPoint());\n\n    var i, cdi;\n    for(i = cd.length - 1; i > -1; i--) {\n        cdi = cd[i];\n        if(cdi.hidden) continue;\n\n        var step = cdi.v / totalValues;\n        sumSteps += step;\n\n        allPoints.push(getPoint());\n    }\n\n    var minY = Infinity;\n    var maxY = -Infinity;\n    for(i = 0; i < allPoints.length; i++) {\n        p = allPoints[i];\n        minY = Math.min(minY, p[1]);\n        maxY = Math.max(maxY, p[1]);\n    }\n\n    // center the shape\n    for(i = 0; i < allPoints.length; i++) {\n        allPoints[i][1] -= (maxY + minY) / 2;\n    }\n\n    var lastX = allPoints[allPoints.length - 1][0];\n\n    // get pie r\n    var r = cd0.r;\n\n    var rY = (maxY - minY) / 2;\n    var scaleX = r / lastX;\n    var scaleY = r / rY * aspectratio;\n\n    // set funnelarea r\n    cd0.r = scaleY * rY;\n\n    // scale the shape\n    for(i = 0; i < allPoints.length; i++) {\n        allPoints[i][0] *= scaleX;\n        allPoints[i][1] *= scaleY;\n    }\n\n    // record first position\n    p = allPoints[0];\n    var prevLeft = [-p[0], p[1]];\n    var prevRight = [p[0], p[1]];\n\n    var n = 0; // note we skip the very first point.\n    for(i = cd.length - 1; i > -1; i--) {\n        cdi = cd[i];\n        if(cdi.hidden) continue;\n\n        n += 1;\n        var x = allPoints[n][0];\n        var y = allPoints[n][1];\n\n        cdi.TL = [-x, y];\n        cdi.TR = [x, y];\n\n        cdi.BL = prevLeft;\n        cdi.BR = prevRight;\n\n        cdi.pxmid = getBetween(cdi.TR, cdi.BR);\n\n        prevLeft = cdi.TL;\n        prevRight = cdi.TR;\n    }\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../bar/plot\":851,\"../pie/helpers\":1054,\"../pie/plot\":1058,\"d3\":157}],971:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar styleOne = _dereq_('../pie/style_one');\n\nmodule.exports = function style(gd) {\n    gd._fullLayout._funnelarealayer.selectAll('.trace').each(function(cd) {\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n        var traceSelection = d3.select(this);\n\n        traceSelection.style({opacity: trace.opacity});\n\n        traceSelection.selectAll('path.surface').each(function(pt) {\n            d3.select(this).call(styleOne, pt, trace);\n        });\n    });\n};\n\n},{\"../pie/style_one\":1060,\"d3\":157}],972:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = extendFlat({\n    z: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    x: extendFlat({}, scatterAttrs.x, {impliedEdits: {xtype: 'array'}}),\n    x0: extendFlat({}, scatterAttrs.x0, {impliedEdits: {xtype: 'scaled'}}),\n    dx: extendFlat({}, scatterAttrs.dx, {impliedEdits: {xtype: 'scaled'}}),\n    y: extendFlat({}, scatterAttrs.y, {impliedEdits: {ytype: 'array'}}),\n    y0: extendFlat({}, scatterAttrs.y0, {impliedEdits: {ytype: 'scaled'}}),\n    dy: extendFlat({}, scatterAttrs.dy, {impliedEdits: {ytype: 'scaled'}}),\n\n    text: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    transpose: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    xtype: {\n        valType: 'enumerated',\n        values: ['array', 'scaled'],\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    ytype: {\n        valType: 'enumerated',\n        values: ['array', 'scaled'],\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    zsmooth: {\n        valType: 'enumerated',\n        values: ['fast', 'best', false],\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    connectgaps: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    xgap: {\n        valType: 'number',\n        dflt: 0,\n        min: 0,\n        \n        editType: 'plot',\n        \n    },\n    ygap: {\n        valType: 'number',\n        dflt: 0,\n        min: 0,\n        \n        editType: 'plot',\n        \n    },\n    zhoverformat: {\n        valType: 'string',\n        dflt: '',\n        \n        editType: 'none',\n        \n    },\n    hovertemplate: hovertemplateAttrs()\n}, {\n    transforms: undefined\n},\n    colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../scatter/attributes\":1075}],973:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar histogram2dCalc = _dereq_('../histogram2d/calc');\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar convertColumnData = _dereq_('./convert_column_xyz');\nvar clean2dArray = _dereq_('./clean_2d_array');\nvar interp2d = _dereq_('./interp2d');\nvar findEmpties = _dereq_('./find_empties');\nvar makeBoundArray = _dereq_('./make_bound_array');\n\nmodule.exports = function calc(gd, trace) {\n    // prepare the raw data\n    // run makeCalcdata on x and y even for heatmaps, in case of category mappings\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var isContour = Registry.traceIs(trace, 'contour');\n    var isHist = Registry.traceIs(trace, 'histogram');\n    var isGL2D = Registry.traceIs(trace, 'gl2d');\n    var zsmooth = isContour ? 'best' : trace.zsmooth;\n    var x;\n    var x0;\n    var dx;\n    var y;\n    var y0;\n    var dy;\n    var z;\n    var i;\n    var binned;\n\n    // cancel minimum tick spacings (only applies to bars and boxes)\n    xa._minDtick = 0;\n    ya._minDtick = 0;\n\n    if(isHist) {\n        binned = histogram2dCalc(gd, trace);\n        x = binned.x;\n        x0 = binned.x0;\n        dx = binned.dx;\n        y = binned.y;\n        y0 = binned.y0;\n        dy = binned.dy;\n        z = binned.z;\n    } else {\n        var zIn = trace.z;\n        if(Lib.isArray1D(zIn)) {\n            convertColumnData(trace, xa, ya, 'x', 'y', ['z']);\n            x = trace._x;\n            y = trace._y;\n            zIn = trace._z;\n        } else {\n            x = trace._x = trace.x ? xa.makeCalcdata(trace, 'x') : [];\n            y = trace._y = trace.y ? ya.makeCalcdata(trace, 'y') : [];\n        }\n\n        x0 = trace.x0;\n        dx = trace.dx;\n        y0 = trace.y0;\n        dy = trace.dy;\n\n        z = clean2dArray(zIn, trace, xa, ya);\n\n        if(isContour || trace.connectgaps) {\n            trace._emptypoints = findEmpties(z);\n            interp2d(z, trace._emptypoints);\n        }\n    }\n\n    function noZsmooth(msg) {\n        zsmooth = trace._input.zsmooth = trace.zsmooth = false;\n        Lib.warn('cannot use zsmooth: \"fast\": ' + msg);\n    }\n\n    // check whether we really can smooth (ie all boxes are about the same size)\n    if(zsmooth === 'fast') {\n        if(xa.type === 'log' || ya.type === 'log') {\n            noZsmooth('log axis found');\n        } else if(!isHist) {\n            if(x.length) {\n                var avgdx = (x[x.length - 1] - x[0]) / (x.length - 1);\n                var maxErrX = Math.abs(avgdx / 100);\n                for(i = 0; i < x.length - 1; i++) {\n                    if(Math.abs(x[i + 1] - x[i] - avgdx) > maxErrX) {\n                        noZsmooth('x scale is not linear');\n                        break;\n                    }\n                }\n            }\n            if(y.length && zsmooth === 'fast') {\n                var avgdy = (y[y.length - 1] - y[0]) / (y.length - 1);\n                var maxErrY = Math.abs(avgdy / 100);\n                for(i = 0; i < y.length - 1; i++) {\n                    if(Math.abs(y[i + 1] - y[i] - avgdy) > maxErrY) {\n                        noZsmooth('y scale is not linear');\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\n    // create arrays of brick boundaries, to be used by autorange and heatmap.plot\n    var xlen = Lib.maxRowLength(z);\n    var xIn = trace.xtype === 'scaled' ? '' : x;\n    var xArray = makeBoundArray(trace, xIn, x0, dx, xlen, xa);\n    var yIn = trace.ytype === 'scaled' ? '' : y;\n    var yArray = makeBoundArray(trace, yIn, y0, dy, z.length, ya);\n\n    // handled in gl2d convert step\n    if(!isGL2D) {\n        trace._extremes[xa._id] = Axes.findExtremes(xa, xArray);\n        trace._extremes[ya._id] = Axes.findExtremes(ya, yArray);\n    }\n\n    var cd0 = {\n        x: xArray,\n        y: yArray,\n        z: z,\n        text: trace._text || trace.text,\n        hovertext: trace._hovertext || trace.hovertext\n    };\n\n    if(xIn && xIn.length === xArray.length - 1) cd0.xCenter = xIn;\n    if(yIn && yIn.length === yArray.length - 1) cd0.yCenter = yIn;\n\n    if(isHist) {\n        cd0.xRanges = binned.xRanges;\n        cd0.yRanges = binned.yRanges;\n        cd0.pts = binned.pts;\n    }\n\n    if(!isContour) {\n        colorscaleCalc(gd, trace, {vals: z, cLetter: 'z'});\n    }\n\n    if(isContour && trace.contours && trace.contours.coloring === 'heatmap') {\n        var dummyTrace = {\n            type: trace.type === 'contour' ? 'heatmap' : 'histogram2d',\n            xcalendar: trace.xcalendar,\n            ycalendar: trace.ycalendar\n        };\n        cd0.xfill = makeBoundArray(dummyTrace, xIn, x0, dx, xlen, xa);\n        cd0.yfill = makeBoundArray(dummyTrace, yIn, y0, dy, z.length, ya);\n    }\n\n    return [cd0];\n};\n\n},{\"../../components/colorscale/calc\":588,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../histogram2d/calc\":1004,\"./clean_2d_array\":974,\"./convert_column_xyz\":976,\"./find_empties\":978,\"./interp2d\":981,\"./make_bound_array\":982}],974:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar Lib = _dereq_('../../lib');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function clean2dArray(zOld, trace, xa, ya) {\n    var rowlen, collen, getCollen, old2new, i, j;\n\n    function cleanZvalue(v) {\n        if(!isNumeric(v)) return undefined;\n        return +v;\n    }\n\n    if(trace && trace.transpose) {\n        rowlen = 0;\n        for(i = 0; i < zOld.length; i++) rowlen = Math.max(rowlen, zOld[i].length);\n        if(rowlen === 0) return false;\n        getCollen = function(zOld) { return zOld.length; };\n        old2new = function(zOld, i, j) { return zOld[j][i]; };\n    } else {\n        rowlen = zOld.length;\n        getCollen = function(zOld, i) { return zOld[i].length; };\n        old2new = function(zOld, i, j) { return zOld[i][j]; };\n    }\n\n    var padOld2new = function(zOld, i, j) {\n        if(i === BADNUM || j === BADNUM) return BADNUM;\n        return old2new(zOld, i, j);\n    };\n\n    function axisMapping(ax) {\n        if(trace && trace.type !== 'carpet' && trace.type !== 'contourcarpet' &&\n            ax && ax.type === 'category' && trace['_' + ax._id.charAt(0)].length) {\n            var axLetter = ax._id.charAt(0);\n            var axMapping = {};\n            var traceCategories = trace['_' + axLetter + 'CategoryMap'] || trace[axLetter];\n            for(i = 0; i < traceCategories.length; i++) {\n                axMapping[traceCategories[i]] = i;\n            }\n            return function(i) {\n                var ind = axMapping[ax._categories[i]];\n                return ind + 1 ? ind : BADNUM;\n            };\n        } else {\n            return Lib.identity;\n        }\n    }\n\n    var xMap = axisMapping(xa);\n    var yMap = axisMapping(ya);\n\n    var zNew = new Array(rowlen);\n\n    if(ya && ya.type === 'category') rowlen = ya._categories.length;\n    for(i = 0; i < rowlen; i++) {\n        if(xa && xa.type === 'category') {\n            collen = xa._categories.length;\n        } else {\n            collen = getCollen(zOld, i);\n        }\n        zNew[i] = new Array(collen);\n        for(j = 0; j < collen; j++) zNew[i][j] = cleanZvalue(padOld2new(zOld, yMap(i), xMap(j)));\n    }\n\n    return zNew;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"fast-isnumeric\":224}],975:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    min: 'zmin',\n    max: 'zmax'\n};\n\n},{}],976:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name, arrayVarNames) {\n    var colLen = trace._length;\n    var col1 = ax1.makeCalcdata(trace, var1Name);\n    var col2 = ax2.makeCalcdata(trace, var2Name);\n    var textCol = trace.text;\n    var hasColumnText = (textCol !== undefined && Lib.isArray1D(textCol));\n    var hoverTextCol = trace.hovertext;\n    var hasColumnHoverText = (hoverTextCol !== undefined && Lib.isArray1D(hoverTextCol));\n    var i, j;\n\n    var col1dv = Lib.distinctVals(col1);\n    var col1vals = col1dv.vals;\n    var col2dv = Lib.distinctVals(col2);\n    var col2vals = col2dv.vals;\n    var newArrays = [];\n    var text;\n    var hovertext;\n\n    for(i = 0; i < arrayVarNames.length; i++) {\n        newArrays[i] = Lib.init2dArray(col2vals.length, col1vals.length);\n    }\n\n    if(hasColumnText) {\n        text = Lib.init2dArray(col2vals.length, col1vals.length);\n    }\n    if(hasColumnHoverText) {\n        hovertext = Lib.init2dArray(col2vals.length, col1vals.length);\n    }\n\n    for(i = 0; i < colLen; i++) {\n        if(col1[i] !== BADNUM && col2[i] !== BADNUM) {\n            var i1 = Lib.findBin(col1[i] + col1dv.minDiff / 2, col1vals);\n            var i2 = Lib.findBin(col2[i] + col2dv.minDiff / 2, col2vals);\n\n            for(j = 0; j < arrayVarNames.length; j++) {\n                var arrayVarName = arrayVarNames[j];\n                var arrayVar = trace[arrayVarName];\n                var newArray = newArrays[j];\n                newArray[i2][i1] = arrayVar[i];\n            }\n\n            if(hasColumnText) text[i2][i1] = textCol[i];\n            if(hasColumnHoverText) hovertext[i2][i1] = hoverTextCol[i];\n        }\n    }\n\n    trace['_' + var1Name] = col1vals;\n    trace['_' + var2Name] = col2vals;\n    for(j = 0; j < arrayVarNames.length; j++) {\n        trace['_' + arrayVarNames[j]] = newArrays[j];\n    }\n    if(hasColumnText) trace._text = text;\n    if(hasColumnHoverText) trace._hovertext = hovertext;\n\n    if(ax1 && ax1.type === 'category') {\n        trace['_' + var1Name + 'CategoryMap'] = col1vals.map(function(v) { return ax1._categories[v];});\n    }\n\n    if(ax2 && ax2.type === 'category') {\n        trace['_' + var2Name + 'CategoryMap'] = col2vals.map(function(v) { return ax2._categories[v];});\n    }\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703}],977:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleXYZDefaults = _dereq_('./xyz_defaults');\nvar handleStyleDefaults = _dereq_('./style_defaults');\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var validData = handleXYZDefaults(traceIn, traceOut, coerce, layout);\n    if(!validData) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    handleStyleDefaults(traceIn, traceOut, coerce, layout);\n\n    coerce('connectgaps', Lib.isArray1D(traceOut.z) && (traceOut.zsmooth !== false));\n\n    colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"./attributes\":972,\"./style_defaults\":985,\"./xyz_defaults\":986}],978:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar maxRowLength = _dereq_('../../lib').maxRowLength;\n\n/* Return a list of empty points in 2D array z\n * each empty point z[i][j] gives an array [i, j, neighborCount]\n * neighborCount is the count of 4 nearest neighbors that DO exist\n * this is to give us an order of points to evaluate for interpolation.\n * if no neighbors exist, we iteratively look for neighbors that HAVE\n * neighbors, and add a fractional neighborCount\n */\nmodule.exports = function findEmpties(z) {\n    var empties = [];\n    var neighborHash = {};\n    var noNeighborList = [];\n    var nextRow = z[0];\n    var row = [];\n    var blank = [0, 0, 0];\n    var rowLength = maxRowLength(z);\n    var prevRow;\n    var i;\n    var j;\n    var thisPt;\n    var p;\n    var neighborCount;\n    var newNeighborHash;\n    var foundNewNeighbors;\n\n    for(i = 0; i < z.length; i++) {\n        prevRow = row;\n        row = nextRow;\n        nextRow = z[i + 1] || [];\n        for(j = 0; j < rowLength; j++) {\n            if(row[j] === undefined) {\n                neighborCount = (row[j - 1] !== undefined ? 1 : 0) +\n                    (row[j + 1] !== undefined ? 1 : 0) +\n                    (prevRow[j] !== undefined ? 1 : 0) +\n                    (nextRow[j] !== undefined ? 1 : 0);\n\n                if(neighborCount) {\n                    // for this purpose, don't count off-the-edge points\n                    // as undefined neighbors\n                    if(i === 0) neighborCount++;\n                    if(j === 0) neighborCount++;\n                    if(i === z.length - 1) neighborCount++;\n                    if(j === row.length - 1) neighborCount++;\n\n                    // if all neighbors that could exist do, we don't\n                    // need this for finding farther neighbors\n                    if(neighborCount < 4) {\n                        neighborHash[[i, j]] = [i, j, neighborCount];\n                    }\n\n                    empties.push([i, j, neighborCount]);\n                } else noNeighborList.push([i, j]);\n            }\n        }\n    }\n\n    while(noNeighborList.length) {\n        newNeighborHash = {};\n        foundNewNeighbors = false;\n\n        // look for cells that now have neighbors but didn't before\n        for(p = noNeighborList.length - 1; p >= 0; p--) {\n            thisPt = noNeighborList[p];\n            i = thisPt[0];\n            j = thisPt[1];\n\n            neighborCount = ((neighborHash[[i - 1, j]] || blank)[2] +\n                (neighborHash[[i + 1, j]] || blank)[2] +\n                (neighborHash[[i, j - 1]] || blank)[2] +\n                (neighborHash[[i, j + 1]] || blank)[2]) / 20;\n\n            if(neighborCount) {\n                newNeighborHash[thisPt] = [i, j, neighborCount];\n                noNeighborList.splice(p, 1);\n                foundNewNeighbors = true;\n            }\n        }\n\n        if(!foundNewNeighbors) {\n            throw 'findEmpties iterated with no new neighbors';\n        }\n\n        // put these new cells into the main neighbor list\n        for(thisPt in newNeighborHash) {\n            neighborHash[thisPt] = newNeighborHash[thisPt];\n            empties.push(newNeighborHash[thisPt]);\n        }\n    }\n\n    // sort the full list in descending order of neighbor count\n    return empties.sort(function(a, b) { return b[2] - a[2]; });\n};\n\n},{\"../../lib\":703}],979:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Fx = _dereq_('../../components/fx');\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer, contour) {\n    var cd0 = pointData.cd[0];\n    var trace = cd0.trace;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var x = cd0.x;\n    var y = cd0.y;\n    var z = cd0.z;\n    var xc = cd0.xCenter;\n    var yc = cd0.yCenter;\n    var zmask = cd0.zmask;\n    var zhoverformat = trace.zhoverformat;\n    var x2 = x;\n    var y2 = y;\n\n    var xl, yl, nx, ny;\n\n    if(pointData.index !== false) {\n        try {\n            nx = Math.round(pointData.index[1]);\n            ny = Math.round(pointData.index[0]);\n        } catch(e) {\n            Lib.error('Error hovering on heatmap, ' +\n                'pointNumber must be [row,col], found:', pointData.index);\n            return;\n        }\n        if(nx < 0 || nx >= z[0].length || ny < 0 || ny > z.length) {\n            return;\n        }\n    } else if(Fx.inbox(xval - x[0], xval - x[x.length - 1], 0) > 0 ||\n            Fx.inbox(yval - y[0], yval - y[y.length - 1], 0) > 0) {\n        return;\n    } else {\n        if(contour) {\n            var i2;\n            x2 = [2 * x[0] - x[1]];\n\n            for(i2 = 1; i2 < x.length; i2++) {\n                x2.push((x[i2] + x[i2 - 1]) / 2);\n            }\n            x2.push([2 * x[x.length - 1] - x[x.length - 2]]);\n\n            y2 = [2 * y[0] - y[1]];\n            for(i2 = 1; i2 < y.length; i2++) {\n                y2.push((y[i2] + y[i2 - 1]) / 2);\n            }\n            y2.push([2 * y[y.length - 1] - y[y.length - 2]]);\n        }\n        nx = Math.max(0, Math.min(x2.length - 2, Lib.findBin(xval, x2)));\n        ny = Math.max(0, Math.min(y2.length - 2, Lib.findBin(yval, y2)));\n    }\n\n    var x0 = xa.c2p(x[nx]);\n    var x1 = xa.c2p(x[nx + 1]);\n    var y0 = ya.c2p(y[ny]);\n    var y1 = ya.c2p(y[ny + 1]);\n\n    if(contour) {\n        x1 = x0;\n        xl = x[nx];\n        y1 = y0;\n        yl = y[ny];\n    } else {\n        xl = xc ? xc[nx] : ((x[nx] + x[nx + 1]) / 2);\n        yl = yc ? yc[ny] : ((y[ny] + y[ny + 1]) / 2);\n\n        if(xa && xa.type === 'category') xl = x[nx];\n        if(ya && ya.type === 'category') yl = y[ny];\n\n        if(trace.zsmooth) {\n            x0 = x1 = xa.c2p(xl);\n            y0 = y1 = ya.c2p(yl);\n        }\n    }\n\n    var zVal = z[ny][nx];\n    if(zmask && !zmask[ny][nx]) zVal = undefined;\n\n    var text;\n    if(Array.isArray(cd0.hovertext) && Array.isArray(cd0.hovertext[ny])) {\n        text = cd0.hovertext[ny][nx];\n    } else if(Array.isArray(cd0.text) && Array.isArray(cd0.text[ny])) {\n        text = cd0.text[ny][nx];\n    }\n\n    // dummy axis for formatting the z value\n    var cOpts = extractOpts(trace);\n    var dummyAx = {\n        type: 'linear',\n        range: [cOpts.min, cOpts.max],\n        hoverformat: zhoverformat,\n        _separators: xa._separators,\n        _numFormat: xa._numFormat\n    };\n    var zLabel = Axes.tickText(dummyAx, zVal, 'hover').text;\n\n    return [Lib.extendFlat(pointData, {\n        index: [ny, nx],\n        // never let a 2D override 1D type as closest point\n        distance: pointData.maxHoverDistance,\n        spikeDistance: pointData.maxSpikeDistance,\n        x0: x0,\n        x1: x1,\n        y0: y0,\n        y1: y1,\n        xLabelVal: xl,\n        yLabelVal: yl,\n        zLabelVal: zVal,\n        zLabel: zLabel,\n        text: text\n    })];\n};\n\n},{\"../../components/colorscale\":592,\"../../components/fx\":619,\"../../lib\":703,\"../../plots/cartesian/axes\":751}],980:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    colorbar: _dereq_('./colorbar'),\n    style: _dereq_('./style'),\n    hoverPoints: _dereq_('./hover'),\n\n    moduleType: 'trace',\n    name: 'heatmap',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', '2dMap'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"./attributes\":972,\"./calc\":973,\"./colorbar\":975,\"./defaults\":977,\"./hover\":979,\"./plot\":983,\"./style\":984}],981:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar INTERPTHRESHOLD = 1e-2;\nvar NEIGHBORSHIFTS = [[-1, 0], [1, 0], [0, -1], [0, 1]];\n\nfunction correctionOvershoot(maxFractionalChange) {\n    // start with less overshoot, until we know it's converging,\n    // then ramp up the overshoot for faster convergence\n    return 0.5 - 0.25 * Math.min(1, maxFractionalChange * 0.5);\n}\n\n/*\n * interp2d: Fill in missing data from a 2D array using an iterative\n *   poisson equation solver with zero-derivative BC at edges.\n *   Amazingly, this just amounts to repeatedly averaging all the existing\n *   nearest neighbors, at least if we don't take x/y scaling into account,\n *   which is the right approach here where x and y may not even have the\n *   same units.\n *\n * @param {array of arrays} z\n *      The 2D array to fill in. Will be mutated here. Assumed to already be\n *      cleaned, so all entries are numbers except gaps, which are `undefined`.\n * @param {array of arrays} emptyPoints\n *      Each entry [i, j, neighborCount] for empty points z[i][j] and the number\n *      of neighbors that are *not* missing. Assumed to be sorted from most to\n *      least neighbors, as produced by heatmap/find_empties.\n */\nmodule.exports = function interp2d(z, emptyPoints) {\n    var maxFractionalChange = 1;\n    var i;\n\n    // one pass to fill in a starting value for all the empties\n    iterateInterp2d(z, emptyPoints);\n\n    // we're don't need to iterate lone empties - remove them\n    for(i = 0; i < emptyPoints.length; i++) {\n        if(emptyPoints[i][2] < 4) break;\n    }\n    // but don't remove these points from the original array,\n    // we'll use them for masking, so make a copy.\n    emptyPoints = emptyPoints.slice(i);\n\n    for(i = 0; i < 100 && maxFractionalChange > INTERPTHRESHOLD; i++) {\n        maxFractionalChange = iterateInterp2d(z, emptyPoints,\n            correctionOvershoot(maxFractionalChange));\n    }\n    if(maxFractionalChange > INTERPTHRESHOLD) {\n        Lib.log('interp2d didn\\'t converge quickly', maxFractionalChange);\n    }\n\n    return z;\n};\n\nfunction iterateInterp2d(z, emptyPoints, overshoot) {\n    var maxFractionalChange = 0;\n    var thisPt;\n    var i;\n    var j;\n    var p;\n    var q;\n    var neighborShift;\n    var neighborRow;\n    var neighborVal;\n    var neighborCount;\n    var neighborSum;\n    var initialVal;\n    var minNeighbor;\n    var maxNeighbor;\n\n    for(p = 0; p < emptyPoints.length; p++) {\n        thisPt = emptyPoints[p];\n        i = thisPt[0];\n        j = thisPt[1];\n        initialVal = z[i][j];\n        neighborSum = 0;\n        neighborCount = 0;\n\n        for(q = 0; q < 4; q++) {\n            neighborShift = NEIGHBORSHIFTS[q];\n            neighborRow = z[i + neighborShift[0]];\n            if(!neighborRow) continue;\n            neighborVal = neighborRow[j + neighborShift[1]];\n            if(neighborVal !== undefined) {\n                if(neighborSum === 0) {\n                    minNeighbor = maxNeighbor = neighborVal;\n                } else {\n                    minNeighbor = Math.min(minNeighbor, neighborVal);\n                    maxNeighbor = Math.max(maxNeighbor, neighborVal);\n                }\n                neighborCount++;\n                neighborSum += neighborVal;\n            }\n        }\n\n        if(neighborCount === 0) {\n            throw 'iterateInterp2d order is wrong: no defined neighbors';\n        }\n\n        // this is the laplace equation interpolation:\n        // each point is just the average of its neighbors\n        // note that this ignores differential x/y scaling\n        // which I think is the right approach, since we\n        // don't know what that scaling means\n        z[i][j] = neighborSum / neighborCount;\n\n        if(initialVal === undefined) {\n            if(neighborCount < 4) maxFractionalChange = 1;\n        } else {\n            // we can make large empty regions converge faster\n            // if we overshoot the change vs the previous value\n            z[i][j] = (1 + overshoot) * z[i][j] - overshoot * initialVal;\n\n            if(maxNeighbor > minNeighbor) {\n                maxFractionalChange = Math.max(maxFractionalChange,\n                    Math.abs(z[i][j] - initialVal) / (maxNeighbor - minNeighbor));\n            }\n        }\n    }\n\n    return maxFractionalChange;\n}\n\n},{\"../../lib\":703}],982:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\nmodule.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks, ax) {\n    var arrayOut = [];\n    var isContour = Registry.traceIs(trace, 'contour');\n    var isHist = Registry.traceIs(trace, 'histogram');\n    var isGL2D = Registry.traceIs(trace, 'gl2d');\n    var v0;\n    var dv;\n    var i;\n\n    var isArrayOfTwoItemsOrMore = isArrayOrTypedArray(arrayIn) && arrayIn.length > 1;\n\n    if(isArrayOfTwoItemsOrMore && !isHist && (ax.type !== 'category')) {\n        var len = arrayIn.length;\n\n        // given vals are brick centers\n        // hopefully length === numbricks, but use this method even if too few are supplied\n        // and extend it linearly based on the last two points\n        if(len <= numbricks) {\n            // contour plots only want the centers\n            if(isContour || isGL2D) arrayOut = arrayIn.slice(0, numbricks);\n            else if(numbricks === 1) {\n                arrayOut = [arrayIn[0] - 0.5, arrayIn[0] + 0.5];\n            } else {\n                arrayOut = [1.5 * arrayIn[0] - 0.5 * arrayIn[1]];\n\n                for(i = 1; i < len; i++) {\n                    arrayOut.push((arrayIn[i - 1] + arrayIn[i]) * 0.5);\n                }\n\n                arrayOut.push(1.5 * arrayIn[len - 1] - 0.5 * arrayIn[len - 2]);\n            }\n\n            if(len < numbricks) {\n                var lastPt = arrayOut[arrayOut.length - 1];\n                var delta = lastPt - arrayOut[arrayOut.length - 2];\n\n                for(i = len; i < numbricks; i++) {\n                    lastPt += delta;\n                    arrayOut.push(lastPt);\n                }\n            }\n        } else {\n            // hopefully length === numbricks+1, but do something regardless:\n            // given vals are brick boundaries\n            return isContour ?\n                arrayIn.slice(0, numbricks) :  // we must be strict for contours\n                arrayIn.slice(0, numbricks + 1);\n        }\n    } else {\n        var calendar = trace[ax._id.charAt(0) + 'calendar'];\n\n        if(isHist) {\n            v0 = ax.r2c(v0In, 0, calendar);\n        } else {\n            if(isArrayOrTypedArray(arrayIn) && arrayIn.length === 1) {\n                v0 = arrayIn[0];\n            } else if(v0In === undefined) {\n                v0 = 0;\n            } else {\n                var fn = ax.type === 'log' ? ax.d2c : ax.r2c;\n                v0 = fn(v0In, 0, calendar);\n            }\n        }\n\n        dv = dvIn || 1;\n\n        for(i = (isContour || isGL2D) ? 0 : -0.5; i < numbricks; i++) {\n            arrayOut.push(v0 + dv * i);\n        }\n    }\n\n    return arrayOut;\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],983:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar makeColorScaleFuncFromTrace = _dereq_('../../components/colorscale').makeColorScaleFuncFromTrace;\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nmodule.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(heatmapLayer, cdheatmaps, 'hm').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n\n        var z = cd0.z;\n        var x = cd0.x;\n        var y = cd0.y;\n        var xc = cd0.xCenter;\n        var yc = cd0.yCenter;\n        var isContour = Registry.traceIs(trace, 'contour');\n        var zsmooth = isContour ? 'best' : trace.zsmooth;\n\n        // get z dims\n        var m = z.length;\n        var n = Lib.maxRowLength(z);\n        var xrev = false;\n        var yrev = false;\n\n        var left, right, temp, top, bottom, i;\n\n        // TODO: if there are multiple overlapping categorical heatmaps,\n        // or if we allow category sorting, then the categories may not be\n        // sequential... may need to reorder and/or expand z\n\n        // Get edges of png in pixels (xa.c2p() maps axes coordinates to pixel coordinates)\n        // figure out if either axis is reversed (y is usually reversed, in pixel coords)\n        // also clip the image to maximum 50% outside the visible plot area\n        // bigger image lets you pan more naturally, but slows performance.\n        // TODO: use low-resolution images outside the visible plot for panning\n        // these while loops find the first and last brick bounds that are defined\n        // (in case of log of a negative)\n        i = 0;\n        while(left === undefined && i < x.length - 1) {\n            left = xa.c2p(x[i]);\n            i++;\n        }\n        i = x.length - 1;\n        while(right === undefined && i > 0) {\n            right = xa.c2p(x[i]);\n            i--;\n        }\n\n        if(right < left) {\n            temp = right;\n            right = left;\n            left = temp;\n            xrev = true;\n        }\n\n        i = 0;\n        while(top === undefined && i < y.length - 1) {\n            top = ya.c2p(y[i]);\n            i++;\n        }\n        i = y.length - 1;\n        while(bottom === undefined && i > 0) {\n            bottom = ya.c2p(y[i]);\n            i--;\n        }\n\n        if(bottom < top) {\n            temp = top;\n            top = bottom;\n            bottom = temp;\n            yrev = true;\n        }\n\n        // for contours with heatmap fill, we generate the boundaries based on\n        // brick centers but then use the brick edges for drawing the bricks\n        if(isContour) {\n            xc = x;\n            yc = y;\n            x = cd0.xfill;\n            y = cd0.yfill;\n        }\n\n        // make an image that goes at most half a screen off either side, to keep\n        // time reasonable when you zoom in. if zsmooth is true/fast, don't worry\n        // about this, because zooming doesn't increase number of pixels\n        // if zsmooth is best, don't include anything off screen because it takes too long\n        if(zsmooth !== 'fast') {\n            var extra = zsmooth === 'best' ? 0 : 0.5;\n            left = Math.max(-extra * xa._length, left);\n            right = Math.min((1 + extra) * xa._length, right);\n            top = Math.max(-extra * ya._length, top);\n            bottom = Math.min((1 + extra) * ya._length, bottom);\n        }\n\n        var imageWidth = Math.round(right - left);\n        var imageHeight = Math.round(bottom - top);\n\n        // setup image nodes\n\n        // if image is entirely off-screen, don't even draw it\n        var isOffScreen = (imageWidth <= 0 || imageHeight <= 0);\n\n        if(isOffScreen) {\n            var noImage = plotGroup.selectAll('image').data([]);\n            noImage.exit().remove();\n            return;\n        }\n\n        // generate image data\n\n        var canvasW, canvasH;\n        if(zsmooth === 'fast') {\n            canvasW = n;\n            canvasH = m;\n        } else {\n            canvasW = imageWidth;\n            canvasH = imageHeight;\n        }\n\n        var canvas = document.createElement('canvas');\n        canvas.width = canvasW;\n        canvas.height = canvasH;\n        var context = canvas.getContext('2d');\n\n        var sclFunc = makeColorScaleFuncFromTrace(trace, {noNumericCheck: true, returnArray: true});\n\n        // map brick boundaries to image pixels\n        var xpx,\n            ypx;\n        if(zsmooth === 'fast') {\n            xpx = xrev ?\n                function(index) { return n - 1 - index; } :\n                Lib.identity;\n            ypx = yrev ?\n                function(index) { return m - 1 - index; } :\n                Lib.identity;\n        } else {\n            xpx = function(index) {\n                return Lib.constrain(Math.round(xa.c2p(x[index]) - left),\n                    0, imageWidth);\n            };\n            ypx = function(index) {\n                return Lib.constrain(Math.round(ya.c2p(y[index]) - top),\n                    0, imageHeight);\n            };\n        }\n\n        // build the pixel map brick-by-brick\n        // cruise through z-matrix row-by-row\n        // build a brick at each z-matrix value\n        var yi = ypx(0);\n        var yb = [yi, yi];\n        var xbi = xrev ? 0 : 1;\n        var ybi = yrev ? 0 : 1;\n        // for collecting an average luminosity of the heatmap\n        var pixcount = 0;\n        var rcount = 0;\n        var gcount = 0;\n        var bcount = 0;\n\n        var xb, j, xi, v, row, c;\n\n        function setColor(v, pixsize) {\n            if(v !== undefined) {\n                var c = sclFunc(v);\n                c[0] = Math.round(c[0]);\n                c[1] = Math.round(c[1]);\n                c[2] = Math.round(c[2]);\n\n                pixcount += pixsize;\n                rcount += c[0] * pixsize;\n                gcount += c[1] * pixsize;\n                bcount += c[2] * pixsize;\n                return c;\n            }\n            return [0, 0, 0, 0];\n        }\n\n        function interpColor(r0, r1, xinterp, yinterp) {\n            var z00 = r0[xinterp.bin0];\n            if(z00 === undefined) return setColor(undefined, 1);\n\n            var z01 = r0[xinterp.bin1];\n            var z10 = r1[xinterp.bin0];\n            var z11 = r1[xinterp.bin1];\n            var dx = (z01 - z00) || 0;\n            var dy = (z10 - z00) || 0;\n            var dxy;\n\n            // the bilinear interpolation term needs different calculations\n            // for all the different permutations of missing data\n            // among the neighbors of the main point, to ensure\n            // continuity across brick boundaries.\n            if(z01 === undefined) {\n                if(z11 === undefined) dxy = 0;\n                else if(z10 === undefined) dxy = 2 * (z11 - z00);\n                else dxy = (2 * z11 - z10 - z00) * 2 / 3;\n            } else if(z11 === undefined) {\n                if(z10 === undefined) dxy = 0;\n                else dxy = (2 * z00 - z01 - z10) * 2 / 3;\n            } else if(z10 === undefined) dxy = (2 * z11 - z01 - z00) * 2 / 3;\n            else dxy = (z11 + z00 - z01 - z10);\n\n            return setColor(z00 + xinterp.frac * dx + yinterp.frac * (dy + xinterp.frac * dxy));\n        }\n\n        if(zsmooth) { // best or fast, works fastest with imageData\n            var pxIndex = 0;\n            var pixels;\n\n            try {\n                pixels = new Uint8Array(imageWidth * imageHeight * 4);\n            } catch(e) {\n                pixels = new Array(imageWidth * imageHeight * 4);\n            }\n\n            if(zsmooth === 'best') {\n                var xForPx = xc || x;\n                var yForPx = yc || y;\n                var xPixArray = new Array(xForPx.length);\n                var yPixArray = new Array(yForPx.length);\n                var xinterpArray = new Array(imageWidth);\n                var findInterpX = xc ? findInterpFromCenters : findInterp;\n                var findInterpY = yc ? findInterpFromCenters : findInterp;\n                var yinterp, r0, r1;\n\n                // first make arrays of x and y pixel locations of brick boundaries\n                for(i = 0; i < xForPx.length; i++) xPixArray[i] = Math.round(xa.c2p(xForPx[i]) - left);\n                for(i = 0; i < yForPx.length; i++) yPixArray[i] = Math.round(ya.c2p(yForPx[i]) - top);\n\n                // then make arrays of interpolations\n                // (bin0=closest, bin1=next, frac=fractional dist.)\n                for(i = 0; i < imageWidth; i++) xinterpArray[i] = findInterpX(i, xPixArray);\n\n                // now do the interpolations and fill the png\n                for(j = 0; j < imageHeight; j++) {\n                    yinterp = findInterpY(j, yPixArray);\n                    r0 = z[yinterp.bin0];\n                    r1 = z[yinterp.bin1];\n                    for(i = 0; i < imageWidth; i++, pxIndex += 4) {\n                        c = interpColor(r0, r1, xinterpArray[i], yinterp);\n                        putColor(pixels, pxIndex, c);\n                    }\n                }\n            } else { // zsmooth = fast\n                for(j = 0; j < m; j++) {\n                    row = z[j];\n                    yb = ypx(j);\n                    for(i = 0; i < imageWidth; i++) {\n                        c = setColor(row[i], 1);\n                        pxIndex = (yb * imageWidth + xpx(i)) * 4;\n                        putColor(pixels, pxIndex, c);\n                    }\n                }\n            }\n\n            var imageData = context.createImageData(imageWidth, imageHeight);\n            try {\n                imageData.data.set(pixels);\n            } catch(e) {\n                var pxArray = imageData.data;\n                var dlen = pxArray.length;\n                for(j = 0; j < dlen; j ++) {\n                    pxArray[j] = pixels[j];\n                }\n            }\n\n            context.putImageData(imageData, 0, 0);\n        } else { // zsmooth = false -> filling potentially large bricks works fastest with fillRect\n            // gaps do not need to be exact integers, but if they *are* we will get\n            // cleaner edges by rounding at least one edge\n            var xGap = trace.xgap;\n            var yGap = trace.ygap;\n            var xGapLeft = Math.floor(xGap / 2);\n            var yGapTop = Math.floor(yGap / 2);\n\n            for(j = 0; j < m; j++) {\n                row = z[j];\n                yb.reverse();\n                yb[ybi] = ypx(j + 1);\n                if(yb[0] === yb[1] || yb[0] === undefined || yb[1] === undefined) {\n                    continue;\n                }\n                xi = xpx(0);\n                xb = [xi, xi];\n                for(i = 0; i < n; i++) {\n                    // build one color brick!\n                    xb.reverse();\n                    xb[xbi] = xpx(i + 1);\n                    if(xb[0] === xb[1] || xb[0] === undefined || xb[1] === undefined) {\n                        continue;\n                    }\n                    v = row[i];\n                    c = setColor(v, (xb[1] - xb[0]) * (yb[1] - yb[0]));\n                    context.fillStyle = 'rgba(' + c.join(',') + ')';\n\n                    context.fillRect(xb[0] + xGapLeft, yb[0] + yGapTop,\n                        xb[1] - xb[0] - xGap, yb[1] - yb[0] - yGap);\n                }\n            }\n        }\n\n        rcount = Math.round(rcount / pixcount);\n        gcount = Math.round(gcount / pixcount);\n        bcount = Math.round(bcount / pixcount);\n        var avgColor = tinycolor('rgb(' + rcount + ',' + gcount + ',' + bcount + ')');\n\n        gd._hmpixcount = (gd._hmpixcount||0) + pixcount;\n        gd._hmlumcount = (gd._hmlumcount||0) + pixcount * avgColor.getLuminance();\n\n        var image3 = plotGroup.selectAll('image')\n            .data(cd);\n\n        image3.enter().append('svg:image').attr({\n            xmlns: xmlnsNamespaces.svg,\n            preserveAspectRatio: 'none'\n        });\n\n        image3.attr({\n            height: imageHeight,\n            width: imageWidth,\n            x: left,\n            y: top,\n            'xlink:href': canvas.toDataURL('image/png')\n        });\n    });\n};\n\n// get interpolated bin value. Returns {bin0:closest bin, frac:fractional dist to next, bin1:next bin}\nfunction findInterp(pixel, pixArray) {\n    var maxBin = pixArray.length - 2;\n    var bin = Lib.constrain(Lib.findBin(pixel, pixArray), 0, maxBin);\n    var pix0 = pixArray[bin];\n    var pix1 = pixArray[bin + 1];\n    var interp = Lib.constrain(bin + (pixel - pix0) / (pix1 - pix0) - 0.5, 0, maxBin);\n    var bin0 = Math.round(interp);\n    var frac = Math.abs(interp - bin0);\n\n    if(!interp || interp === maxBin || !frac) {\n        return {\n            bin0: bin0,\n            bin1: bin0,\n            frac: 0\n        };\n    }\n    return {\n        bin0: bin0,\n        frac: frac,\n        bin1: Math.round(bin0 + frac / (interp - bin0))\n    };\n}\n\nfunction findInterpFromCenters(pixel, centerPixArray) {\n    var maxBin = centerPixArray.length - 1;\n    var bin = Lib.constrain(Lib.findBin(pixel, centerPixArray), 0, maxBin);\n    var pix0 = centerPixArray[bin];\n    var pix1 = centerPixArray[bin + 1];\n    var frac = ((pixel - pix0) / (pix1 - pix0)) || 0;\n    if(frac <= 0) {\n        return {\n            bin0: bin,\n            bin1: bin,\n            frac: 0\n        };\n    }\n    if(frac < 0.5) {\n        return {\n            bin0: bin,\n            bin1: bin + 1,\n            frac: frac\n        };\n    }\n    return {\n        bin0: bin + 1,\n        bin1: bin,\n        frac: 1 - frac\n    };\n}\n\nfunction putColor(pixels, pxIndex, c) {\n    pixels[pxIndex] = c[0];\n    pixels[pxIndex + 1] = c[1];\n    pixels[pxIndex + 2] = c[2];\n    pixels[pxIndex + 3] = Math.round(c[3] * 255);\n}\n\n},{\"../../components/colorscale\":592,\"../../constants/xmlns_namespaces\":681,\"../../lib\":703,\"../../registry\":831,\"d3\":157,\"tinycolor2\":524}],984:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nmodule.exports = function style(gd) {\n    d3.select(gd).selectAll('.hm image')\n        .style('opacity', function(d) {\n            return d.trace.opacity;\n        });\n};\n\n},{\"d3\":157}],985:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {\n    var zsmooth = coerce('zsmooth');\n    if(zsmooth === false) {\n        // ensure that xgap and ygap are coerced only when zsmooth allows them to have an effect.\n        coerce('xgap');\n        coerce('ygap');\n    }\n\n    coerce('zhoverformat');\n};\n\n},{}],986:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar Lib = _dereq_('../../lib');\n\nvar Registry = _dereq_('../../registry');\n\nmodule.exports = function handleXYZDefaults(traceIn, traceOut, coerce, layout, xName, yName) {\n    var z = coerce('z');\n    xName = xName || 'x';\n    yName = yName || 'y';\n    var x, y;\n\n    if(z === undefined || !z.length) return 0;\n\n    if(Lib.isArray1D(traceIn.z)) {\n        x = coerce(xName);\n        y = coerce(yName);\n\n        var xlen = Lib.minRowLength(x);\n        var ylen = Lib.minRowLength(y);\n\n        // column z must be accompanied by xName and yName arrays\n        if(xlen === 0 || ylen === 0) return 0;\n\n        traceOut._length = Math.min(xlen, ylen, z.length);\n    } else {\n        x = coordDefaults(xName, coerce);\n        y = coordDefaults(yName, coerce);\n\n        // TODO put z validation elsewhere\n        if(!isValidZ(z)) return 0;\n\n        coerce('transpose');\n\n        traceOut._length = null;\n    }\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, [xName, yName], layout);\n\n    return true;\n};\n\nfunction coordDefaults(coordStr, coerce) {\n    var coord = coerce(coordStr);\n    var coordType = coord ? coerce(coordStr + 'type', 'array') : 'scaled';\n\n    if(coordType === 'scaled') {\n        coerce(coordStr + '0');\n        coerce('d' + coordStr);\n    }\n\n    return coord;\n}\n\nfunction isValidZ(z) {\n    var allRowsAreArrays = true;\n    var oneRowIsFilled = false;\n    var hasOneNumber = false;\n    var zi;\n\n    /*\n     * Without this step:\n     *\n     * hasOneNumber = false breaks contour but not heatmap\n     * allRowsAreArrays = false breaks contour but not heatmap\n     * oneRowIsFilled = false breaks both\n     */\n\n    for(var i = 0; i < z.length; i++) {\n        zi = z[i];\n        if(!Lib.isArrayOrTypedArray(zi)) {\n            allRowsAreArrays = false;\n            break;\n        }\n        if(zi.length > 0) oneRowIsFilled = true;\n        for(var j = 0; j < zi.length; j++) {\n            if(isNumeric(zi[j])) {\n                hasOneNumber = true;\n                break;\n            }\n        }\n    }\n\n    return (allRowsAreArrays && oneRowIsFilled && hasOneNumber);\n}\n\n},{\"../../lib\":703,\"../../registry\":831,\"fast-isnumeric\":224}],987:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar heatmapAttrs = _dereq_('../heatmap/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar commonList = [\n    'z',\n    'x', 'x0', 'dx',\n    'y', 'y0', 'dy',\n    'text', 'transpose',\n    'xtype', 'ytype'\n];\n\nvar attrs = {};\n\nfor(var i = 0; i < commonList.length; i++) {\n    var k = commonList[i];\n    attrs[k] = heatmapAttrs[k];\n}\n\nextendFlat(\n    attrs,\n    colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})\n);\n\nmodule.exports = overrideAll(attrs, 'calc', 'nested');\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../heatmap/attributes\":972}],988:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar createHeatmap2D = _dereq_('gl-heatmap2d');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar str2RGBArray = _dereq_('../../lib/str2rgbarray');\n\n\nfunction Heatmap(scene, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.type = 'heatmapgl';\n\n    this.name = '';\n    this.hoverinfo = 'all';\n\n    this.xData = [];\n    this.yData = [];\n    this.zData = [];\n    this.textLabels = [];\n\n    this.idToIndex = [];\n    this.bounds = [0, 0, 0, 0];\n\n    this.options = {\n        z: [],\n        x: [],\n        y: [],\n        shape: [0, 0],\n        colorLevels: [0],\n        colorValues: [0, 0, 0, 1]\n    };\n\n    this.heatmap = createHeatmap2D(scene.glplot, this.options);\n    this.heatmap._trace = this;\n}\n\nvar proto = Heatmap.prototype;\n\nproto.handlePick = function(pickResult) {\n    var options = this.options;\n    var shape = options.shape;\n    var index = pickResult.pointId;\n    var xIndex = index % shape[0];\n    var yIndex = Math.floor(index / shape[0]);\n    var zIndex = index;\n\n    return {\n        trace: this,\n        dataCoord: pickResult.dataCoord,\n        traceCoord: [\n            options.x[xIndex],\n            options.y[yIndex],\n            options.z[zIndex]\n        ],\n        textLabel: this.textLabels[index],\n        name: this.name,\n        pointIndex: [yIndex, xIndex],\n        hoverinfo: this.hoverinfo\n    };\n};\n\nproto.update = function(fullTrace, calcTrace) {\n    var calcPt = calcTrace[0];\n\n    this.index = fullTrace.index;\n    this.name = fullTrace.name;\n    this.hoverinfo = fullTrace.hoverinfo;\n\n    // convert z from 2D -> 1D\n    var z = calcPt.z;\n    this.options.z = [].concat.apply([], z);\n\n    var rowLen = z[0].length;\n    var colLen = z.length;\n    this.options.shape = [rowLen, colLen];\n\n    this.options.x = calcPt.x;\n    this.options.y = calcPt.y;\n\n    var colorOptions = convertColorscale(fullTrace);\n    this.options.colorLevels = colorOptions.colorLevels;\n    this.options.colorValues = colorOptions.colorValues;\n\n    // convert text from 2D -> 1D\n    this.textLabels = [].concat.apply([], fullTrace.text);\n\n    this.heatmap.update(this.options);\n\n    var xa = this.scene.xaxis;\n    var ya = this.scene.yaxis;\n    fullTrace._extremes[xa._id] = Axes.findExtremes(xa, calcPt.x);\n    fullTrace._extremes[ya._id] = Axes.findExtremes(ya, calcPt.y);\n};\n\nproto.dispose = function() {\n    this.heatmap.dispose();\n};\n\nfunction convertColorscale(fullTrace) {\n    var scl = fullTrace.colorscale;\n    var zmin = fullTrace.zmin;\n    var zmax = fullTrace.zmax;\n\n    var N = scl.length;\n    var domain = new Array(N);\n    var range = new Array(4 * N);\n\n    for(var i = 0; i < N; i++) {\n        var si = scl[i];\n        var color = str2RGBArray(si[1]);\n\n        domain[i] = zmin + si[0] * (zmax - zmin);\n\n        for(var j = 0; j < 4; j++) {\n            range[(4 * i) + j] = color[j];\n        }\n    }\n\n    return {\n        colorLevels: domain,\n        colorValues: range\n    };\n}\n\nfunction createHeatmap(scene, fullTrace, calcTrace) {\n    var plot = new Heatmap(scene, fullTrace.uid);\n    plot.update(fullTrace, calcTrace);\n    return plot;\n}\n\nmodule.exports = createHeatmap;\n\n},{\"../../lib/str2rgbarray\":726,\"../../plots/cartesian/axes\":751,\"gl-heatmap2d\":250}],989:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('../heatmap/defaults'),\n    colorbar: _dereq_('../heatmap/colorbar'),\n\n    calc: _dereq_('../heatmap/calc'),\n    plot: _dereq_('./convert'),\n\n    moduleType: 'trace',\n    name: 'heatmapgl',\n    basePlotModule: _dereq_('../../plots/gl2d'),\n    categories: ['gl', 'gl2d', '2dMap'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl2d\":789,\"../heatmap/calc\":973,\"../heatmap/colorbar\":975,\"../heatmap/defaults\":977,\"./attributes\":987,\"./convert\":988}],990:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar barAttrs = _dereq_('../bar/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar makeBinAttrs = _dereq_('./bin_attributes');\nvar constants = _dereq_('./constants');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    text: extendFlat({}, barAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, barAttrs.hovertext, {\n        \n    }),\n    orientation: barAttrs.orientation,\n\n    histfunc: {\n        valType: 'enumerated',\n        values: ['count', 'sum', 'avg', 'min', 'max'],\n        \n        dflt: 'count',\n        editType: 'calc',\n        \n    },\n    histnorm: {\n        valType: 'enumerated',\n        values: ['', 'percent', 'probability', 'density', 'probability density'],\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n\n    cumulative: {\n        enabled: {\n            valType: 'boolean',\n            dflt: false,\n            \n            editType: 'calc',\n            \n        },\n\n        direction: {\n            valType: 'enumerated',\n            values: ['increasing', 'decreasing'],\n            dflt: 'increasing',\n            \n            editType: 'calc',\n            \n        },\n\n        currentbin: {\n            valType: 'enumerated',\n            values: ['include', 'exclude', 'half'],\n            dflt: 'include',\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    },\n    nbinsx: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    xbins: makeBinAttrs('x', true),\n\n    nbinsy: {\n        valType: 'integer',\n        min: 0,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    ybins: makeBinAttrs('y', true),\n    autobinx: {\n        valType: 'boolean',\n        dflt: null,\n        \n        editType: 'calc',\n        \n    },\n    autobiny: {\n        valType: 'boolean',\n        dflt: null,\n        \n        editType: 'calc',\n        \n    },\n\n    bingroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: constants.eventDataKeys\n    }),\n\n    marker: barAttrs.marker,\n\n    offsetgroup: barAttrs.offsetgroup,\n    alignmentgroup: barAttrs.alignmentgroup,\n\n    selected: barAttrs.selected,\n    unselected: barAttrs.unselected,\n\n    _deprecated: {\n        bardir: barAttrs._deprecated.bardir\n    }\n};\n\n},{\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../bar/attributes\":841,\"./bin_attributes\":992,\"./constants\":996}],991:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = function doAvg(size, counts) {\n    var nMax = size.length;\n    var total = 0;\n    for(var i = 0; i < nMax; i++) {\n        if(counts[i]) {\n            size[i] /= counts[i];\n            total += size[i];\n        } else size[i] = null;\n    }\n    return total;\n};\n\n},{}],992:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function makeBinAttrs(axLetter, match) {\n    return {\n        start: {\n            valType: 'any', // for date axes\n            \n            editType: 'calc',\n            \n        },\n        end: {\n            valType: 'any', // for date axes\n            \n            editType: 'calc',\n            \n        },\n        size: {\n            valType: 'any', // for date axes\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    };\n};\n\n},{}],993:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\n\nmodule.exports = {\n    count: function(n, i, size) {\n        size[n]++;\n        return 1;\n    },\n\n    sum: function(n, i, size, counterData) {\n        var v = counterData[i];\n        if(isNumeric(v)) {\n            v = Number(v);\n            size[n] += v;\n            return v;\n        }\n        return 0;\n    },\n\n    avg: function(n, i, size, counterData, counts) {\n        var v = counterData[i];\n        if(isNumeric(v)) {\n            v = Number(v);\n            size[n] += v;\n            counts[n]++;\n        }\n        return 0;\n    },\n\n    min: function(n, i, size, counterData) {\n        var v = counterData[i];\n        if(isNumeric(v)) {\n            v = Number(v);\n            if(!isNumeric(size[n])) {\n                size[n] = v;\n                return v;\n            } else if(size[n] > v) {\n                var delta = v - size[n];\n                size[n] = v;\n                return delta;\n            }\n        }\n        return 0;\n    },\n\n    max: function(n, i, size, counterData) {\n        var v = counterData[i];\n        if(isNumeric(v)) {\n            v = Number(v);\n            if(!isNumeric(size[n])) {\n                size[n] = v;\n                return v;\n            } else if(size[n] < v) {\n                var delta = v - size[n];\n                size[n] = v;\n                return delta;\n            }\n        }\n        return 0;\n    }\n};\n\n},{\"fast-isnumeric\":224}],994:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar numConstants = _dereq_('../../constants/numerical');\nvar oneYear = numConstants.ONEAVGYEAR;\nvar oneMonth = numConstants.ONEAVGMONTH;\nvar oneDay = numConstants.ONEDAY;\nvar oneHour = numConstants.ONEHOUR;\nvar oneMin = numConstants.ONEMIN;\nvar oneSec = numConstants.ONESEC;\nvar tickIncrement = _dereq_('../../plots/cartesian/axes').tickIncrement;\n\n\n/*\n * make a function that will find rounded bin edges\n * @param {number} leftGap: how far from the left edge of any bin is the closest data value?\n * @param {number} rightGap: how far from the right edge of any bin is the closest data value?\n * @param {Array[number]} binEdges: the actual edge values used in binning\n * @param {object} pa: the position axis\n * @param {string} calendar: the data calendar\n *\n * @return {function(v, isRightEdge)}:\n *   find the start (isRightEdge is falsy) or end (truthy) label value for a bin edge `v`\n */\nmodule.exports = function getBinSpanLabelRound(leftGap, rightGap, binEdges, pa, calendar) {\n    // the rounding digit is the largest digit that changes in *all* of 4 regions:\n    // - inside the rightGap before binEdges[0] (shifted 10% to the left)\n    // - inside the leftGap after binEdges[0] (expanded by 10% of rightGap on each end)\n    // - same for binEdges[1]\n    var dv0 = -1.1 * rightGap;\n    var dv1 = -0.1 * rightGap;\n    var dv2 = leftGap - dv1;\n    var edge0 = binEdges[0];\n    var edge1 = binEdges[1];\n    var leftDigit = Math.min(\n        biggestDigitChanged(edge0 + dv1, edge0 + dv2, pa, calendar),\n        biggestDigitChanged(edge1 + dv1, edge1 + dv2, pa, calendar)\n    );\n    var rightDigit = Math.min(\n        biggestDigitChanged(edge0 + dv0, edge0 + dv1, pa, calendar),\n        biggestDigitChanged(edge1 + dv0, edge1 + dv1, pa, calendar)\n    );\n\n    // normally we try to make the label for the right edge different from\n    // the left edge label, so it's unambiguous which bin gets data on the edge.\n    // but if this results in more than 3 extra digits (or for dates, more than\n    // 2 fields ie hr&min or min&sec, which is 3600x), it'll be more clutter than\n    // useful so keep the label cleaner instead\n    var digit, disambiguateEdges;\n    if(leftDigit > rightDigit && rightDigit < Math.abs(edge1 - edge0) / 4000) {\n        digit = leftDigit;\n        disambiguateEdges = false;\n    } else {\n        digit = Math.min(leftDigit, rightDigit);\n        disambiguateEdges = true;\n    }\n\n    if(pa.type === 'date' && digit > oneDay) {\n        var dashExclude = (digit === oneYear) ? 1 : 6;\n        var increment = (digit === oneYear) ? 'M12' : 'M1';\n\n        return function(v, isRightEdge) {\n            var dateStr = pa.c2d(v, oneYear, calendar);\n            var dashPos = dateStr.indexOf('-', dashExclude);\n            if(dashPos > 0) dateStr = dateStr.substr(0, dashPos);\n            var roundedV = pa.d2c(dateStr, 0, calendar);\n\n            if(roundedV < v) {\n                var nextV = tickIncrement(roundedV, increment, false, calendar);\n                if((roundedV + nextV) / 2 < v + leftGap) roundedV = nextV;\n            }\n\n            if(isRightEdge && disambiguateEdges) {\n                return tickIncrement(roundedV, increment, true, calendar);\n            }\n\n            return roundedV;\n        };\n    }\n\n    return function(v, isRightEdge) {\n        var roundedV = digit * Math.round(v / digit);\n        // if we rounded down and we could round up and still be < leftGap\n        // (or what leftGap values round to), do that\n        if(roundedV + (digit / 10) < v && roundedV + (digit * 0.9) < v + leftGap) {\n            roundedV += digit;\n        }\n        // finally for the right edge back off one digit - but only if we can do that\n        // and not clip off any data that's potentially in the bin\n        if(isRightEdge && disambiguateEdges) {\n            roundedV -= digit;\n        }\n        return roundedV;\n    };\n};\n\n/*\n * Find the largest digit that changes within a (calcdata) region [v1, v2]\n * if dates, \"digit\" means date/time part when it's bigger than a second\n * returns the unit value to round to this digit, eg 0.01 to round to hundredths, or\n * 100 to round to hundreds. returns oneMonth or oneYear for month or year rounding,\n * so that Math.min will work, rather than 'M1' and 'M12'\n */\nfunction biggestDigitChanged(v1, v2, pa, calendar) {\n    // are we crossing zero? can't say anything.\n    // in principle this doesn't apply to dates but turns out this doesn't matter.\n    if(v1 * v2 <= 0) return Infinity;\n\n    var dv = Math.abs(v2 - v1);\n    var isDate = pa.type === 'date';\n    var digit = biggestGuaranteedDigitChanged(dv, isDate);\n    // see if a larger digit also changed\n    for(var i = 0; i < 10; i++) {\n        // numbers: next digit needs to be >10x but <100x then gets rounded down.\n        // dates: next digit can be as much as 60x (then rounded down)\n        var nextDigit = biggestGuaranteedDigitChanged(digit * 80, isDate);\n        // if we get to years, the chain stops\n        if(digit === nextDigit) break;\n        if(didDigitChange(nextDigit, v1, v2, isDate, pa, calendar)) digit = nextDigit;\n        else break;\n    }\n    return digit;\n}\n\n/*\n * Find the largest digit that *definitely* changes in a region [v, v + dv] for any v\n * for nonuniform date regions (months/years) pick the largest\n */\nfunction biggestGuaranteedDigitChanged(dv, isDate) {\n    if(isDate && dv > oneSec) {\n        // this is supposed to be the biggest *guaranteed* change\n        // so compare to the longest month and year across any calendar,\n        // and we'll iterate back up later\n        // note: does not support rounding larger than one year. We could add\n        // that if anyone wants it, but seems unusual and not strictly necessary.\n        if(dv > oneDay) {\n            if(dv > oneYear * 1.1) return oneYear;\n            if(dv > oneMonth * 1.1) return oneMonth;\n            return oneDay;\n        }\n\n        if(dv > oneHour) return oneHour;\n        if(dv > oneMin) return oneMin;\n        return oneSec;\n    }\n    return Math.pow(10, Math.floor(Math.log(dv) / Math.LN10));\n}\n\nfunction didDigitChange(digit, v1, v2, isDate, pa, calendar) {\n    if(isDate && digit > oneDay) {\n        var dateParts1 = dateParts(v1, pa, calendar);\n        var dateParts2 = dateParts(v2, pa, calendar);\n        var parti = (digit === oneYear) ? 0 : 1;\n        return dateParts1[parti] !== dateParts2[parti];\n    }\n    return Math.floor(v2 / digit) - Math.floor(v1 / digit) > 0.1;\n}\n\nfunction dateParts(v, pa, calendar) {\n    var parts = pa.c2d(v, oneYear, calendar).split('-');\n    if(parts[0] === '') {\n        parts.unshift();\n        parts[0] = '-' + parts[0];\n    }\n    return parts;\n}\n\n},{\"../../constants/numerical\":680,\"../../plots/cartesian/axes\":751}],995:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar arraysToCalcdata = _dereq_('../bar/arrays_to_calcdata');\nvar binFunctions = _dereq_('./bin_functions');\nvar normFunctions = _dereq_('./norm_functions');\nvar doAvg = _dereq_('./average');\nvar getBinSpanLabelRound = _dereq_('./bin_label_vals');\n\nfunction calc(gd, trace) {\n    var pos = [];\n    var size = [];\n    var pa = Axes.getFromId(gd, trace.orientation === 'h' ? trace.yaxis : trace.xaxis);\n    var mainData = trace.orientation === 'h' ? 'y' : 'x';\n    var counterData = {x: 'y', y: 'x'}[mainData];\n    var calendar = trace[mainData + 'calendar'];\n    var cumulativeSpec = trace.cumulative;\n    var i;\n\n    var binsAndPos = calcAllAutoBins(gd, trace, pa, mainData);\n    var binSpec = binsAndPos[0];\n    var pos0 = binsAndPos[1];\n\n    var nonuniformBins = typeof binSpec.size === 'string';\n    var binEdges = [];\n    var bins = nonuniformBins ? binEdges : binSpec;\n    // make the empty bin array\n    var inc = [];\n    var counts = [];\n    var inputPoints = [];\n    var total = 0;\n    var norm = trace.histnorm;\n    var func = trace.histfunc;\n    var densityNorm = norm.indexOf('density') !== -1;\n    var i2, binEnd, n;\n\n    if(cumulativeSpec.enabled && densityNorm) {\n        // we treat \"cumulative\" like it means \"integral\" if you use a density norm,\n        // which in the end means it's the same as without \"density\"\n        norm = norm.replace(/ ?density$/, '');\n        densityNorm = false;\n    }\n\n    var extremeFunc = func === 'max' || func === 'min';\n    var sizeInit = extremeFunc ? null : 0;\n    var binFunc = binFunctions.count;\n    var normFunc = normFunctions[norm];\n    var isAvg = false;\n    var pr2c = function(v) { return pa.r2c(v, 0, calendar); };\n    var rawCounterData;\n\n    if(Lib.isArrayOrTypedArray(trace[counterData]) && func !== 'count') {\n        rawCounterData = trace[counterData];\n        isAvg = func === 'avg';\n        binFunc = binFunctions[func];\n    }\n\n    // create the bins (and any extra arrays needed)\n    // assume more than 1e6 bins is an error, so we don't crash the browser\n    i = pr2c(binSpec.start);\n\n    // decrease end a little in case of rounding errors\n    binEnd = pr2c(binSpec.end) + (i - Axes.tickIncrement(i, binSpec.size, false, calendar)) / 1e6;\n\n    while(i < binEnd && pos.length < 1e6) {\n        i2 = Axes.tickIncrement(i, binSpec.size, false, calendar);\n        pos.push((i + i2) / 2);\n        size.push(sizeInit);\n        inputPoints.push([]);\n        // nonuniform bins (like months) we need to search,\n        // rather than straight calculate the bin we're in\n        binEdges.push(i);\n        // nonuniform bins also need nonuniform normalization factors\n        if(densityNorm) inc.push(1 / (i2 - i));\n        if(isAvg) counts.push(0);\n        // break to avoid infinite loops\n        if(i2 <= i) break;\n        i = i2;\n    }\n    binEdges.push(i);\n\n    // for date axes we need bin bounds to be calcdata. For nonuniform bins\n    // we already have this, but uniform with start/end/size they're still strings.\n    if(!nonuniformBins && pa.type === 'date') {\n        bins = {\n            start: pr2c(bins.start),\n            end: pr2c(bins.end),\n            size: bins.size\n        };\n    }\n\n    // bin the data\n    // and make histogram-specific pt-number-to-cd-index map object\n    var nMax = size.length;\n    var uniqueValsPerBin = true;\n    var leftGap = Infinity;\n    var rightGap = Infinity;\n    var ptNumber2cdIndex = {};\n    for(i = 0; i < pos0.length; i++) {\n        var posi = pos0[i];\n        n = Lib.findBin(posi, bins);\n        if(n >= 0 && n < nMax) {\n            total += binFunc(n, i, size, rawCounterData, counts);\n            if(uniqueValsPerBin && inputPoints[n].length && posi !== pos0[inputPoints[n][0]]) {\n                uniqueValsPerBin = false;\n            }\n            inputPoints[n].push(i);\n            ptNumber2cdIndex[i] = n;\n\n            leftGap = Math.min(leftGap, posi - binEdges[n]);\n            rightGap = Math.min(rightGap, binEdges[n + 1] - posi);\n        }\n    }\n\n    var roundFn;\n    if(!uniqueValsPerBin) {\n        roundFn = getBinSpanLabelRound(leftGap, rightGap, binEdges, pa, calendar);\n    }\n\n    // average and/or normalize the data, if needed\n    if(isAvg) total = doAvg(size, counts);\n    if(normFunc) normFunc(size, total, inc);\n\n    // after all normalization etc, now we can accumulate if desired\n    if(cumulativeSpec.enabled) cdf(size, cumulativeSpec.direction, cumulativeSpec.currentbin);\n\n    var seriesLen = Math.min(pos.length, size.length);\n    var cd = [];\n    var firstNonzero = 0;\n    var lastNonzero = seriesLen - 1;\n\n    // look for empty bins at the ends to remove, so autoscale omits them\n    for(i = 0; i < seriesLen; i++) {\n        if(size[i]) {\n            firstNonzero = i;\n            break;\n        }\n    }\n    for(i = seriesLen - 1; i >= firstNonzero; i--) {\n        if(size[i]) {\n            lastNonzero = i;\n            break;\n        }\n    }\n\n    // create the \"calculated data\" to plot\n    for(i = firstNonzero; i <= lastNonzero; i++) {\n        if((isNumeric(pos[i]) && isNumeric(size[i]))) {\n            var cdi = {\n                p: pos[i],\n                s: size[i],\n                b: 0\n            };\n\n            // setup hover and event data fields,\n            // N.B. pts and \"hover\" positions ph0/ph1 don't seem to make much sense\n            // for cumulative distributions\n            if(!cumulativeSpec.enabled) {\n                cdi.pts = inputPoints[i];\n                if(uniqueValsPerBin) {\n                    cdi.ph0 = cdi.ph1 = (inputPoints[i].length) ? pos0[inputPoints[i][0]] : pos[i];\n                } else {\n                    cdi.ph0 = roundFn(binEdges[i]);\n                    cdi.ph1 = roundFn(binEdges[i + 1], true);\n                }\n            }\n            cd.push(cdi);\n        }\n    }\n\n    if(cd.length === 1) {\n        // when we collapse to a single bin, calcdata no longer describes bin size\n        // so we need to explicitly specify it\n        cd[0].width1 = Axes.tickIncrement(cd[0].p, binSpec.size, false, calendar) - cd[0].p;\n    }\n\n    arraysToCalcdata(cd, trace);\n\n    if(Lib.isArrayOrTypedArray(trace.selectedpoints)) {\n        Lib.tagSelected(cd, trace, ptNumber2cdIndex);\n    }\n\n    return cd;\n}\n\n/*\n * calcAllAutoBins: we want all histograms inside the same bingroup\n * (see logic in Histogram.crossTraceDefaults) to share bin specs\n *\n * If the user has explicitly specified differing\n * bin specs, there's nothing we can do, but if possible we will try to use the\n * smallest bins of any of the auto values for all histograms inside the same\n * bingroup.\n */\nfunction calcAllAutoBins(gd, trace, pa, mainData, _overlayEdgeCase) {\n    var binAttr = mainData + 'bins';\n    var fullLayout = gd._fullLayout;\n    var groupName = trace['_' + mainData + 'bingroup'];\n    var binOpts = fullLayout._histogramBinOpts[groupName];\n    var isOverlay = fullLayout.barmode === 'overlay';\n    var i, traces, tracei, calendar, pos0, autoVals, cumulativeSpec;\n\n    var r2c = function(v) { return pa.r2c(v, 0, calendar); };\n    var c2r = function(v) { return pa.c2r(v, 0, calendar); };\n\n    var cleanBound = pa.type === 'date' ?\n        function(v) { return (v || v === 0) ? Lib.cleanDate(v, null, calendar) : null; } :\n        function(v) { return isNumeric(v) ? Number(v) : null; };\n\n    function setBound(attr, bins, newBins) {\n        if(bins[attr + 'Found']) {\n            bins[attr] = cleanBound(bins[attr]);\n            if(bins[attr] === null) bins[attr] = newBins[attr];\n        } else {\n            autoVals[attr] = bins[attr] = newBins[attr];\n            Lib.nestedProperty(traces[0], binAttr + '.' + attr).set(newBins[attr]);\n        }\n    }\n\n    // all but the first trace in this group has already been marked finished\n    // clear this flag, so next time we run calc we will run autobin again\n    if(trace['_' + mainData + 'autoBinFinished']) {\n        delete trace['_' + mainData + 'autoBinFinished'];\n    } else {\n        traces = binOpts.traces;\n        var allPos = [];\n\n        // Note: we're including `legendonly` traces here for autobin purposes,\n        // so that showing & hiding from the legend won't affect bins.\n        // But this complicates things a bit since those traces don't `calc`,\n        // hence `isFirstVisible`.\n        var isFirstVisible = true;\n        var has2dMap = false;\n        var hasHist2dContour = false;\n        for(i = 0; i < traces.length; i++) {\n            tracei = traces[i];\n\n            if(tracei.visible) {\n                var mainDatai = binOpts.dirs[i];\n                pos0 = tracei['_' + mainDatai + 'pos0'] = pa.makeCalcdata(tracei, mainDatai);\n\n                allPos = Lib.concat(allPos, pos0);\n                delete tracei['_' + mainData + 'autoBinFinished'];\n\n                if(trace.visible === true) {\n                    if(isFirstVisible) {\n                        isFirstVisible = false;\n                    } else {\n                        delete tracei._autoBin;\n                        tracei['_' + mainData + 'autoBinFinished'] = 1;\n                    }\n                    if(Registry.traceIs(tracei, '2dMap')) {\n                        has2dMap = true;\n                    }\n                    if(tracei.type === 'histogram2dcontour') {\n                        hasHist2dContour = true;\n                    }\n                }\n            }\n        }\n\n        calendar = traces[0][mainData + 'calendar'];\n        var newBinSpec = Axes.autoBin(allPos, pa, binOpts.nbins, has2dMap, calendar, binOpts.sizeFound && binOpts.size);\n\n        var autoBin = traces[0]._autoBin = {};\n        autoVals = autoBin[binOpts.dirs[0]] = {};\n\n        if(hasHist2dContour) {\n            // the \"true\" 2nd argument reverses the tick direction (which we can't\n            // just do with a minus sign because of month bins)\n            if(!binOpts.size) {\n                newBinSpec.start = c2r(Axes.tickIncrement(\n                    r2c(newBinSpec.start), newBinSpec.size, true, calendar));\n            }\n            if(binOpts.end === undefined) {\n                newBinSpec.end = c2r(Axes.tickIncrement(\n                    r2c(newBinSpec.end), newBinSpec.size, false, calendar));\n            }\n        }\n\n        // Edge case: single-valued histogram overlaying others\n        // Use them all together to calculate the bin size for the single-valued one\n        if(isOverlay && !Registry.traceIs(trace, '2dMap') && newBinSpec._dataSpan === 0 &&\n            pa.type !== 'category' && pa.type !== 'multicategory') {\n            // Several single-valued histograms! Stop infinite recursion,\n            // just return an extra flag that tells handleSingleValueOverlays\n            // to sort out this trace too\n            if(_overlayEdgeCase) return [newBinSpec, pos0, true];\n\n            newBinSpec = handleSingleValueOverlays(gd, trace, pa, mainData, binAttr);\n        }\n\n        // adjust for CDF edge cases\n        cumulativeSpec = tracei.cumulative || {};\n        if(cumulativeSpec.enabled && (cumulativeSpec.currentbin !== 'include')) {\n            if(cumulativeSpec.direction === 'decreasing') {\n                newBinSpec.start = c2r(Axes.tickIncrement(\n                    r2c(newBinSpec.start), newBinSpec.size, true, calendar));\n            } else {\n                newBinSpec.end = c2r(Axes.tickIncrement(\n                    r2c(newBinSpec.end), newBinSpec.size, false, calendar));\n            }\n        }\n\n        binOpts.size = newBinSpec.size;\n        if(!binOpts.sizeFound) {\n            autoVals.size = newBinSpec.size;\n            Lib.nestedProperty(traces[0], binAttr + '.size').set(newBinSpec.size);\n        }\n\n        setBound('start', binOpts, newBinSpec);\n        setBound('end', binOpts, newBinSpec);\n    }\n\n    pos0 = trace['_' + mainData + 'pos0'];\n    delete trace['_' + mainData + 'pos0'];\n\n    // Each trace can specify its own start/end, or if omitted\n    // we ensure they're beyond the bounds of this trace's data,\n    // and we need to make sure start is aligned with the main start\n    var traceInputBins = trace._input[binAttr] || {};\n    var traceBinOptsCalc = Lib.extendFlat({}, binOpts);\n    var mainStart = binOpts.start;\n    var startIn = pa.r2l(traceInputBins.start);\n    var hasStart = startIn !== undefined;\n    if((binOpts.startFound || hasStart) && startIn !== pa.r2l(mainStart)) {\n        // We have an explicit start to reconcile across traces\n        // if this trace has an explicit start, shift it down to a bin edge\n        // if another trace had an explicit start, shift it down to a\n        // bin edge past our data\n        var traceStart = hasStart ?\n            startIn :\n            Lib.aggNums(Math.min, null, pos0);\n\n        var dummyAx = {\n            type: (pa.type === 'category' || pa.type === 'multicategory') ? 'linear' : pa.type,\n            r2l: pa.r2l,\n            dtick: binOpts.size,\n            tick0: mainStart,\n            calendar: calendar,\n            range: ([traceStart, Axes.tickIncrement(traceStart, binOpts.size, false, calendar)]).map(pa.l2r)\n        };\n        var newStart = Axes.tickFirst(dummyAx);\n        if(newStart > pa.r2l(traceStart)) {\n            newStart = Axes.tickIncrement(newStart, binOpts.size, true, calendar);\n        }\n        traceBinOptsCalc.start = pa.l2r(newStart);\n        if(!hasStart) Lib.nestedProperty(trace, binAttr + '.start').set(traceBinOptsCalc.start);\n    }\n\n    var mainEnd = binOpts.end;\n    var endIn = pa.r2l(traceInputBins.end);\n    var hasEnd = endIn !== undefined;\n    if((binOpts.endFound || hasEnd) && endIn !== pa.r2l(mainEnd)) {\n        // Reconciling an explicit end is easier, as it doesn't need to\n        // match bin edges\n        var traceEnd = hasEnd ?\n            endIn :\n            Lib.aggNums(Math.max, null, pos0);\n\n        traceBinOptsCalc.end = pa.l2r(traceEnd);\n        if(!hasEnd) Lib.nestedProperty(trace, binAttr + '.start').set(traceBinOptsCalc.end);\n    }\n\n    // Backward compatibility for one-time autobinning.\n    // autobin: true is handled in cleanData, but autobin: false\n    // needs to be here where we have determined the values.\n    var autoBinAttr = 'autobin' + mainData;\n    if(trace._input[autoBinAttr] === false) {\n        trace._input[binAttr] = Lib.extendFlat({}, trace[binAttr] || {});\n        delete trace._input[autoBinAttr];\n        delete trace[autoBinAttr];\n    }\n\n    return [traceBinOptsCalc, pos0];\n}\n\n/*\n * Adjust single-value histograms in overlay mode to make as good a\n * guess as we can at autobin values the user would like.\n *\n * Returns the binSpec for the trace that sparked all this\n */\nfunction handleSingleValueOverlays(gd, trace, pa, mainData, binAttr) {\n    var fullLayout = gd._fullLayout;\n    var overlaidTraceGroup = getConnectedHistograms(gd, trace);\n    var pastThisTrace = false;\n    var minSize = Infinity;\n    var singleValuedTraces = [trace];\n    var i, tracei, binOpts;\n\n    // first collect all the:\n    // - min bin size from all multi-valued traces\n    // - single-valued traces\n    for(i = 0; i < overlaidTraceGroup.length; i++) {\n        tracei = overlaidTraceGroup[i];\n\n        if(tracei === trace) {\n            pastThisTrace = true;\n        } else if(!pastThisTrace) {\n            // This trace has already had its autobins calculated, so either:\n            // - it is part of a bingroup\n            // - it is NOT a single-valued trace\n            binOpts = fullLayout._histogramBinOpts[tracei['_' + mainData + 'bingroup']];\n            minSize = Math.min(minSize, binOpts.size || tracei[binAttr].size);\n        } else {\n            var resulti = calcAllAutoBins(gd, tracei, pa, mainData, true);\n            var binSpeci = resulti[0];\n            var isSingleValued = resulti[2];\n\n            // so we can use this result when we get to tracei in the normal\n            // course of events, mark it as done and put _pos0 back\n            tracei['_' + mainData + 'autoBinFinished'] = 1;\n            tracei['_' + mainData + 'pos0'] = resulti[1];\n\n            if(isSingleValued) {\n                singleValuedTraces.push(tracei);\n            } else {\n                minSize = Math.min(minSize, binSpeci.size);\n            }\n        }\n    }\n\n    // find the real data values for each single-valued trace\n    // hunt through pos0 for the first valid value\n    var dataVals = new Array(singleValuedTraces.length);\n    for(i = 0; i < singleValuedTraces.length; i++) {\n        var pos0 = singleValuedTraces[i]['_' + mainData + 'pos0'];\n        for(var j = 0; j < pos0.length; j++) {\n            if(pos0[j] !== undefined) {\n                dataVals[i] = pos0[j];\n                break;\n            }\n        }\n    }\n\n    // are ALL traces are single-valued? use the min difference between\n    // all of their values (which defaults to 1 if there's still only one)\n    if(!isFinite(minSize)) {\n        minSize = Lib.distinctVals(dataVals).minDiff;\n    }\n\n    // now apply the min size we found to all single-valued traces\n    for(i = 0; i < singleValuedTraces.length; i++) {\n        tracei = singleValuedTraces[i];\n        var calendar = tracei[mainData + 'calendar'];\n\n        var newBins = {\n            start: pa.c2r(dataVals[i] - minSize / 2, 0, calendar),\n            end: pa.c2r(dataVals[i] + minSize / 2, 0, calendar),\n            size: minSize\n        };\n\n        tracei._input[binAttr] = tracei[binAttr] = newBins;\n\n        binOpts = fullLayout._histogramBinOpts[tracei['_' + mainData + 'bingroup']];\n        if(binOpts) Lib.extendFlat(binOpts, newBins);\n    }\n\n    return trace[binAttr];\n}\n\n/*\n * Return an array of histograms that share axes and orientation.\n *\n * Only considers histograms. In principle we could include bars in a\n * similar way to how we do manually binned histograms, though this\n * would have tons of edge cases and value judgments to make.\n */\nfunction getConnectedHistograms(gd, trace) {\n    var xid = trace.xaxis;\n    var yid = trace.yaxis;\n    var orientation = trace.orientation;\n\n    var out = [];\n    var fullData = gd._fullData;\n    for(var i = 0; i < fullData.length; i++) {\n        var tracei = fullData[i];\n        if(tracei.type === 'histogram' &&\n            tracei.visible === true &&\n            tracei.orientation === orientation &&\n            tracei.xaxis === xid && tracei.yaxis === yid\n        ) {\n            out.push(tracei);\n        }\n    }\n\n    return out;\n}\n\nfunction cdf(size, direction, currentBin) {\n    var i, vi, prevSum;\n\n    function firstHalfPoint(i) {\n        prevSum = size[i];\n        size[i] /= 2;\n    }\n\n    function nextHalfPoint(i) {\n        vi = size[i];\n        size[i] = prevSum + vi / 2;\n        prevSum += vi;\n    }\n\n    if(currentBin === 'half') {\n        if(direction === 'increasing') {\n            firstHalfPoint(0);\n            for(i = 1; i < size.length; i++) {\n                nextHalfPoint(i);\n            }\n        } else {\n            firstHalfPoint(size.length - 1);\n            for(i = size.length - 2; i >= 0; i--) {\n                nextHalfPoint(i);\n            }\n        }\n    } else if(direction === 'increasing') {\n        for(i = 1; i < size.length; i++) {\n            size[i] += size[i - 1];\n        }\n\n        // 'exclude' is identical to 'include' just shifted one bin over\n        if(currentBin === 'exclude') {\n            size.unshift(0);\n            size.pop();\n        }\n    } else {\n        for(i = size.length - 2; i >= 0; i--) {\n            size[i] += size[i + 1];\n        }\n\n        if(currentBin === 'exclude') {\n            size.push(0);\n            size.shift();\n        }\n    }\n}\n\nmodule.exports = {\n    calc: calc,\n    calcAllAutoBins: calcAllAutoBins\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../registry\":831,\"../bar/arrays_to_calcdata\":840,\"./average\":991,\"./bin_functions\":993,\"./bin_label_vals\":994,\"./norm_functions\":1002,\"fast-isnumeric\":224}],996:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    eventDataKeys: ['binNumber']\n};\n\n},{}],997:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar axisIds = _dereq_('../../plots/cartesian/axis_ids');\n\nvar traceIs = _dereq_('../../registry').traceIs;\nvar handleGroupingDefaults = _dereq_('../bar/defaults').handleGroupingDefaults;\n\nvar nestedProperty = Lib.nestedProperty;\nvar getAxisGroup = axisIds.getAxisGroup;\n\nvar BINATTRS = [\n    {aStr: {x: 'xbins.start', y: 'ybins.start'}, name: 'start'},\n    {aStr: {x: 'xbins.end', y: 'ybins.end'}, name: 'end'},\n    {aStr: {x: 'xbins.size', y: 'ybins.size'}, name: 'size'},\n    {aStr: {x: 'nbinsx', y: 'nbinsy'}, name: 'nbins'}\n];\n\nvar BINDIRECTIONS = ['x', 'y'];\n\n// handle bin attrs and relink auto-determined values so fullData is complete\nmodule.exports = function crossTraceDefaults(fullData, fullLayout) {\n    var allBinOpts = fullLayout._histogramBinOpts = {};\n    var histTraces = [];\n    var mustMatchTracesLookup = {};\n    var otherTracesList = [];\n\n    var traceOut, traces, groupName, binDir;\n    var i, j, k;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceOut._input, traceOut, traceOut._module.attributes, attr, dflt);\n    }\n\n    function orientation2binDir(traceOut) {\n        return traceOut.orientation === 'v' ? 'x' : 'y';\n    }\n\n    function getAxisType(traceOut, binDir) {\n        var ax = axisIds.getFromTrace({_fullLayout: fullLayout}, traceOut, binDir);\n        return ax.type;\n    }\n\n    function fillBinOpts(traceOut, groupName, binDir) {\n        // N.B. group traces that don't have a bingroup with themselves\n        var fallbackGroupName = traceOut.uid + '__' + binDir;\n        if(!groupName) groupName = fallbackGroupName;\n\n        var axType = getAxisType(traceOut, binDir);\n        var calendar = traceOut[binDir + 'calendar'];\n        var binOpts = allBinOpts[groupName];\n        var needsNewItem = true;\n\n        if(binOpts) {\n            if(axType === binOpts.axType && calendar === binOpts.calendar) {\n                needsNewItem = false;\n                binOpts.traces.push(traceOut);\n                binOpts.dirs.push(binDir);\n            } else {\n                groupName = fallbackGroupName;\n\n                if(axType !== binOpts.axType) {\n                    Lib.warn([\n                        'Attempted to group the bins of trace', traceOut.index,\n                        'set on a', 'type:' + axType, 'axis',\n                        'with bins on', 'type:' + binOpts.axType, 'axis.'\n                    ].join(' '));\n                }\n                if(calendar !== binOpts.calendar) {\n                    // prohibit bingroup for traces using different calendar,\n                    // there's probably a way to make this work, but skip for now\n                    Lib.warn([\n                        'Attempted to group the bins of trace', traceOut.index,\n                        'set with a', calendar, 'calendar',\n                        'with bins',\n                        (binOpts.calendar ? 'on a ' + binOpts.calendar + ' calendar' : 'w/o a set calendar')\n                    ].join(' '));\n                }\n            }\n        }\n\n        if(needsNewItem) {\n            allBinOpts[groupName] = {\n                traces: [traceOut],\n                dirs: [binDir],\n                axType: axType,\n                calendar: traceOut[binDir + 'calendar'] || ''\n            };\n        }\n        traceOut['_' + binDir + 'bingroup'] = groupName;\n    }\n\n    for(i = 0; i < fullData.length; i++) {\n        traceOut = fullData[i];\n\n        if(traceIs(traceOut, 'histogram')) {\n            histTraces.push(traceOut);\n\n            // TODO: this shouldn't be relinked as it's only used within calc\n            // https://github.com/plotly/plotly.js/issues/749\n            delete traceOut._xautoBinFinished;\n            delete traceOut._yautoBinFinished;\n\n            // N.B. need to coerce *alignmentgroup* before *bingroup*, as traces\n            // in same alignmentgroup \"have to match\"\n            if(!traceIs(traceOut, '2dMap')) {\n                handleGroupingDefaults(traceOut._input, traceOut, fullLayout, coerce);\n            }\n        }\n    }\n\n    var alignmentOpts = fullLayout._alignmentOpts || {};\n\n    // Look for traces that \"have to match\", that is:\n    // - 1d histogram traces on the same subplot with same orientation under barmode:stack,\n    // - 1d histogram traces on the same subplot with same orientation under barmode:group\n    // - 1d histogram traces on the same position axis with the same orientation\n    //   and the same *alignmentgroup* (coerced under barmode:group)\n    // - Once `stackgroup` gets implemented (see https://github.com/plotly/plotly.js/issues/3614),\n    //   traces within the same stackgroup will also \"have to match\"\n    for(i = 0; i < histTraces.length; i++) {\n        traceOut = histTraces[i];\n        groupName = '';\n\n        if(!traceIs(traceOut, '2dMap')) {\n            binDir = orientation2binDir(traceOut);\n\n            if(fullLayout.barmode === 'group' && traceOut.alignmentgroup) {\n                var pa = traceOut[binDir + 'axis'];\n                var aGroupId = getAxisGroup(fullLayout, pa) + traceOut.orientation;\n                if((alignmentOpts[aGroupId] || {})[traceOut.alignmentgroup]) {\n                    groupName = aGroupId;\n                }\n            }\n\n            if(!groupName && fullLayout.barmode !== 'overlay') {\n                groupName = (\n                    getAxisGroup(fullLayout, traceOut.xaxis) +\n                    getAxisGroup(fullLayout, traceOut.yaxis) +\n                    orientation2binDir(traceOut)\n                );\n            }\n        }\n\n        if(groupName) {\n            if(!mustMatchTracesLookup[groupName]) {\n                mustMatchTracesLookup[groupName] = [];\n            }\n            mustMatchTracesLookup[groupName].push(traceOut);\n        } else {\n            otherTracesList.push(traceOut);\n        }\n    }\n\n    // Setup binOpts for traces that have to match,\n    // if the traces have a valid bingroup, use that\n    // if not use axis+binDir groupName\n    for(groupName in mustMatchTracesLookup) {\n        traces = mustMatchTracesLookup[groupName];\n\n        // no need to 'force' anything when a single\n        // trace is detected as \"must match\"\n        if(traces.length === 1) {\n            otherTracesList.push(traces[0]);\n            continue;\n        }\n\n        var binGroupFound = false;\n        for(i = 0; i < traces.length; i++) {\n            traceOut = traces[i];\n            binGroupFound = coerce('bingroup');\n            break;\n        }\n\n        groupName = binGroupFound || groupName;\n\n        for(i = 0; i < traces.length; i++) {\n            traceOut = traces[i];\n            var bingroupIn = traceOut._input.bingroup;\n            if(bingroupIn && bingroupIn !== groupName) {\n                Lib.warn([\n                    'Trace', traceOut.index, 'must match',\n                    'within bingroup', groupName + '.',\n                    'Ignoring its bingroup:', bingroupIn, 'setting.'\n                ].join(' '));\n            }\n            traceOut.bingroup = groupName;\n\n            // N.B. no need to worry about 2dMap case\n            // (where both bin direction are set in each trace)\n            // as 2dMap trace never \"have to match\"\n            fillBinOpts(traceOut, groupName, orientation2binDir(traceOut));\n        }\n    }\n\n    // setup binOpts for traces that can but don't have to match,\n    // notice that these traces can be matched with traces that have to match\n    for(i = 0; i < otherTracesList.length; i++) {\n        traceOut = otherTracesList[i];\n\n        var binGroup = coerce('bingroup');\n\n        if(traceIs(traceOut, '2dMap')) {\n            for(k = 0; k < 2; k++) {\n                binDir = BINDIRECTIONS[k];\n                var binGroupInDir = coerce(binDir + 'bingroup',\n                    binGroup ? binGroup + '__' + binDir : null\n                );\n                fillBinOpts(traceOut, binGroupInDir, binDir);\n            }\n        } else {\n            fillBinOpts(traceOut, binGroup, orientation2binDir(traceOut));\n        }\n    }\n\n    // coerce bin attrs!\n    for(groupName in allBinOpts) {\n        var binOpts = allBinOpts[groupName];\n        traces = binOpts.traces;\n\n        for(j = 0; j < BINATTRS.length; j++) {\n            var attrSpec = BINATTRS[j];\n            var attr = attrSpec.name;\n            var aStr;\n            var autoVals;\n\n            // nbins(x|y) is moot if we have a size. This depends on\n            // nbins coming after size in binAttrs.\n            if(attr === 'nbins' && binOpts.sizeFound) continue;\n\n            for(i = 0; i < traces.length; i++) {\n                traceOut = traces[i];\n                binDir = binOpts.dirs[i];\n                aStr = attrSpec.aStr[binDir];\n\n                if(nestedProperty(traceOut._input, aStr).get() !== undefined) {\n                    binOpts[attr] = coerce(aStr);\n                    binOpts[attr + 'Found'] = true;\n                    break;\n                }\n\n                autoVals = (traceOut._autoBin || {})[binDir] || {};\n                if(autoVals[attr]) {\n                    // if this is the *first* autoval\n                    nestedProperty(traceOut, aStr).set(autoVals[attr]);\n                }\n            }\n\n            // start and end we need to coerce anyway, after having collected the\n            // first of each into binOpts, in case a trace wants to restrict its\n            // data to a certain range\n            if(attr === 'start' || attr === 'end') {\n                for(; i < traces.length; i++) {\n                    traceOut = traces[i];\n                    if(traceOut['_' + binDir + 'bingroup']) {\n                        autoVals = (traceOut._autoBin || {})[binDir] || {};\n                        coerce(aStr, autoVals[attr]);\n                    }\n                }\n            }\n\n            if(attr === 'nbins' && !binOpts.sizeFound && !binOpts.nbinsFound) {\n                traceOut = traces[0];\n                binOpts[attr] = coerce(aStr);\n            }\n        }\n    }\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../bar/defaults\":845}],998:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\n\nvar handleStyleDefaults = _dereq_('../bar/style_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var x = coerce('x');\n    var y = coerce('y');\n\n    var cumulative = coerce('cumulative.enabled');\n    if(cumulative) {\n        coerce('cumulative.direction');\n        coerce('cumulative.currentbin');\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var orientation = coerce('orientation', (y && !x) ? 'h' : 'v');\n    var sampleLetter = orientation === 'v' ? 'x' : 'y';\n    var aggLetter = orientation === 'v' ? 'y' : 'x';\n\n    var len = (x && y) ?\n        Math.min(Lib.minRowLength(x) && Lib.minRowLength(y)) :\n        Lib.minRowLength(traceOut[sampleLetter] || []);\n\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    traceOut._length = len;\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);\n\n    var hasAggregationData = traceOut[aggLetter];\n    if(hasAggregationData) coerce('histfunc');\n    coerce('histnorm');\n\n    // Note: bin defaults are now handled in Histogram.crossTraceDefaults\n    // autobin(x|y) are only included here to appease Plotly.validate\n    coerce('autobin' + sampleLetter);\n\n    handleStyleDefaults(traceIn, traceOut, coerce, defaultColor, layout);\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n\n    var lineColor = (traceOut.marker.line || {}).color;\n\n    // override defaultColor for error bars with defaultLine\n    var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'y'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'x', inherit: 'y'});\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../../registry\":831,\"../bar/style_defaults\":855,\"./attributes\":990}],999:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function eventData(out, pt, trace, cd, pointNumber) {\n    // standard cartesian event data\n    out.x = 'xVal' in pt ? pt.xVal : pt.x;\n    out.y = 'yVal' in pt ? pt.yVal : pt.y;\n\n    // for 2d histograms\n    if('zLabelVal' in pt) out.z = pt.zLabelVal;\n\n    if(pt.xa) out.xaxis = pt.xa;\n    if(pt.ya) out.yaxis = pt.ya;\n\n    // specific to histogram - CDFs do not have pts (yet?)\n    if(!(trace.cumulative || {}).enabled) {\n        var pts = Array.isArray(pointNumber) ?\n            cd[0].pts[pointNumber[0]][pointNumber[1]] :\n            cd[pointNumber].pts;\n\n        out.pointNumbers = pts;\n        out.binNumber = out.pointNumber;\n        delete out.pointNumber;\n        delete out.pointIndex;\n\n        var pointIndices;\n        if(trace._indexToPoints) {\n            pointIndices = [];\n            for(var i = 0; i < pts.length; i++) {\n                pointIndices = pointIndices.concat(trace._indexToPoints[pts[i]]);\n            }\n        } else {\n            pointIndices = pts;\n        }\n\n        out.pointIndices = pointIndices;\n    }\n\n    return out;\n};\n\n},{}],1000:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar barHover = _dereq_('../bar/hover').hoverPoints;\nvar hoverLabelText = _dereq_('../../plots/cartesian/axes').hoverLabelText;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var pts = barHover(pointData, xval, yval, hovermode);\n\n    if(!pts) return;\n\n    pointData = pts[0];\n    var di = pointData.cd[pointData.index];\n    var trace = pointData.cd[0].trace;\n\n    if(!trace.cumulative.enabled) {\n        var posLetter = trace.orientation === 'h' ? 'y' : 'x';\n\n        pointData[posLetter + 'Label'] = hoverLabelText(pointData[posLetter + 'a'], di.ph0, di.ph1);\n    }\n\n    if(trace.hovermplate) pointData.hovertemplate = trace.hovertemplate;\n\n    return pts;\n};\n\n},{\"../../plots/cartesian/axes\":751,\"../bar/hover\":847}],1001:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * Histogram has its own attribute, defaults and calc steps,\n * but uses bar's plot to display\n * and bar's crossTraceCalc (formerly known as setPositions) for stacking and grouping\n */\n\n/**\n * histogram errorBarsOK is debatable, but it's put in for backward compat.\n * there are use cases for it - sqrt for a simple histogram works right now,\n * constant and % work but they're not so meaningful. I guess it could be cool\n * to allow quadrature combination of errors in summed histograms...\n */\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('../bar/layout_attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('./cross_trace_defaults'),\n    supplyLayoutDefaults: _dereq_('../bar/layout_defaults'),\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('../bar/cross_trace_calc').crossTraceCalc,\n    plot: _dereq_('../bar/plot').plot,\n    layerName: 'barlayer',\n    style: _dereq_('../bar/style').style,\n    styleOnSelect: _dereq_('../bar/style').styleOnSelect,\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../bar/select'),\n    eventData: _dereq_('./event_data'),\n\n    moduleType: 'trace',\n    name: 'histogram',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['bar-like', 'cartesian', 'svg', 'bar', 'histogram', 'oriented', 'errorBarsOK', 'showLegend'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../bar/cross_trace_calc\":844,\"../bar/layout_attributes\":849,\"../bar/layout_defaults\":850,\"../bar/plot\":851,\"../bar/select\":852,\"../bar/style\":854,\"../scatter/marker_colorbar\":1092,\"./attributes\":990,\"./calc\":995,\"./cross_trace_defaults\":997,\"./defaults\":998,\"./event_data\":999,\"./hover\":1000}],1002:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = {\n    percent: function(size, total) {\n        var nMax = size.length;\n        var norm = 100 / total;\n        for(var n = 0; n < nMax; n++) size[n] *= norm;\n    },\n    probability: function(size, total) {\n        var nMax = size.length;\n        for(var n = 0; n < nMax; n++) size[n] /= total;\n    },\n    density: function(size, total, inc, yinc) {\n        var nMax = size.length;\n        yinc = yinc || 1;\n        for(var n = 0; n < nMax; n++) size[n] *= inc[n] * yinc;\n    },\n    'probability density': function(size, total, inc, yinc) {\n        var nMax = size.length;\n        if(yinc) total /= yinc;\n        for(var n = 0; n < nMax; n++) size[n] *= inc[n] / total;\n    }\n};\n\n},{}],1003:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar histogramAttrs = _dereq_('../histogram/attributes');\nvar makeBinAttrs = _dereq_('../histogram/bin_attributes');\nvar heatmapAttrs = _dereq_('../heatmap/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = extendFlat(\n    {\n        x: histogramAttrs.x,\n        y: histogramAttrs.y,\n\n        z: {\n            valType: 'data_array',\n            editType: 'calc',\n            \n        },\n        marker: {\n            color: {\n                valType: 'data_array',\n                editType: 'calc',\n                \n            },\n            editType: 'calc'\n        },\n\n        histnorm: histogramAttrs.histnorm,\n        histfunc: histogramAttrs.histfunc,\n        nbinsx: histogramAttrs.nbinsx,\n        xbins: makeBinAttrs('x'),\n        nbinsy: histogramAttrs.nbinsy,\n        ybins: makeBinAttrs('y'),\n        autobinx: histogramAttrs.autobinx,\n        autobiny: histogramAttrs.autobiny,\n\n        bingroup: extendFlat({}, histogramAttrs.bingroup, {\n            \n        }),\n        xbingroup: extendFlat({}, histogramAttrs.bingroup, {\n            \n        }),\n        ybingroup: extendFlat({}, histogramAttrs.bingroup, {\n            \n        }),\n\n        xgap: heatmapAttrs.xgap,\n        ygap: heatmapAttrs.ygap,\n        zsmooth: heatmapAttrs.zsmooth,\n        zhoverformat: heatmapAttrs.zhoverformat,\n        hovertemplate: hovertemplateAttrs({}, {keys: 'z'})\n    },\n    colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../heatmap/attributes\":972,\"../histogram/attributes\":990,\"../histogram/bin_attributes\":992}],1004:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar binFunctions = _dereq_('../histogram/bin_functions');\nvar normFunctions = _dereq_('../histogram/norm_functions');\nvar doAvg = _dereq_('../histogram/average');\nvar getBinSpanLabelRound = _dereq_('../histogram/bin_label_vals');\nvar calcAllAutoBins = _dereq_('../histogram/calc').calcAllAutoBins;\n\nmodule.exports = function calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis);\n    var ya = Axes.getFromId(gd, trace.yaxis);\n\n    var xcalendar = trace.xcalendar;\n    var ycalendar = trace.ycalendar;\n    var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };\n    var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };\n    var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };\n    var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };\n\n    var i, j, n, m;\n\n    // calculate the bins\n    var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');\n    var xBinSpec = xBinsAndPos[0];\n    var xPos0 = xBinsAndPos[1];\n    var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');\n    var yBinSpec = yBinsAndPos[0];\n    var yPos0 = yBinsAndPos[1];\n\n    var serieslen = trace._length;\n    if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);\n    if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);\n\n    // make the empty bin array & scale the map\n    var z = [];\n    var onecol = [];\n    var zerocol = [];\n    var nonuniformBinsX = typeof xBinSpec.size === 'string';\n    var nonuniformBinsY = typeof yBinSpec.size === 'string';\n    var xEdges = [];\n    var yEdges = [];\n    var xbins = nonuniformBinsX ? xEdges : xBinSpec;\n    var ybins = nonuniformBinsY ? yEdges : yBinSpec;\n    var total = 0;\n    var counts = [];\n    var inputPoints = [];\n    var norm = trace.histnorm;\n    var func = trace.histfunc;\n    var densitynorm = norm.indexOf('density') !== -1;\n    var extremefunc = func === 'max' || func === 'min';\n    var sizeinit = extremefunc ? null : 0;\n    var binfunc = binFunctions.count;\n    var normfunc = normFunctions[norm];\n    var doavg = false;\n    var xinc = [];\n    var yinc = [];\n\n    // set a binning function other than count?\n    // for binning functions: check first for 'z',\n    // then 'mc' in case we had a colored scatter plot\n    // and want to transfer these colors to the 2D histo\n    // TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?\n    var rawCounterData = ('z' in trace) ?\n        trace.z :\n        (('marker' in trace && Array.isArray(trace.marker.color)) ?\n            trace.marker.color : '');\n    if(rawCounterData && func !== 'count') {\n        doavg = func === 'avg';\n        binfunc = binFunctions[func];\n    }\n\n    // decrease end a little in case of rounding errors\n    var xBinSize = xBinSpec.size;\n    var xBinStart = xr2c(xBinSpec.start);\n    var xBinEnd = xr2c(xBinSpec.end) +\n        (xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;\n\n    for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {\n        onecol.push(sizeinit);\n        xEdges.push(i);\n        if(doavg) zerocol.push(0);\n    }\n    xEdges.push(i);\n\n    var nx = onecol.length;\n    var dx = (i - xBinStart) / nx;\n    var x0 = xc2r(xBinStart + dx / 2);\n\n    var yBinSize = yBinSpec.size;\n    var yBinStart = yr2c(yBinSpec.start);\n    var yBinEnd = yr2c(yBinSpec.end) +\n        (yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;\n\n    for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {\n        z.push(onecol.slice());\n        yEdges.push(i);\n        var ipCol = new Array(nx);\n        for(j = 0; j < nx; j++) ipCol[j] = [];\n        inputPoints.push(ipCol);\n        if(doavg) counts.push(zerocol.slice());\n    }\n    yEdges.push(i);\n\n    var ny = z.length;\n    var dy = (i - yBinStart) / ny;\n    var y0 = yc2r(yBinStart + dy / 2);\n\n    if(densitynorm) {\n        xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);\n        yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);\n    }\n\n    // for date axes we need bin bounds to be calcdata. For nonuniform bins\n    // we already have this, but uniform with start/end/size they're still strings.\n    if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);\n    if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);\n\n    // put data into bins\n    var uniqueValsPerX = true;\n    var uniqueValsPerY = true;\n    var xVals = new Array(nx);\n    var yVals = new Array(ny);\n    var xGapLow = Infinity;\n    var xGapHigh = Infinity;\n    var yGapLow = Infinity;\n    var yGapHigh = Infinity;\n    for(i = 0; i < serieslen; i++) {\n        var xi = xPos0[i];\n        var yi = yPos0[i];\n        n = Lib.findBin(xi, xbins);\n        m = Lib.findBin(yi, ybins);\n        if(n >= 0 && n < nx && m >= 0 && m < ny) {\n            total += binfunc(n, i, z[m], rawCounterData, counts[m]);\n            inputPoints[m][n].push(i);\n\n            if(uniqueValsPerX) {\n                if(xVals[n] === undefined) xVals[n] = xi;\n                else if(xVals[n] !== xi) uniqueValsPerX = false;\n            }\n            if(uniqueValsPerY) {\n                if(yVals[m] === undefined) yVals[m] = yi;\n                else if(yVals[m] !== yi) uniqueValsPerY = false;\n            }\n\n            xGapLow = Math.min(xGapLow, xi - xEdges[n]);\n            xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);\n            yGapLow = Math.min(yGapLow, yi - yEdges[m]);\n            yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);\n        }\n    }\n    // normalize, if needed\n    if(doavg) {\n        for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);\n    }\n    if(normfunc) {\n        for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);\n    }\n\n    return {\n        x: xPos0,\n        xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),\n        x0: x0,\n        dx: dx,\n        y: yPos0,\n        yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),\n        y0: y0,\n        dy: dy,\n        z: z,\n        pts: inputPoints\n    };\n};\n\nfunction makeIncrements(len, bins, dv, nonuniform) {\n    var out = new Array(len);\n    var i;\n    if(nonuniform) {\n        for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);\n    } else {\n        var inc = 1 / dv;\n        for(i = 0; i < len; i++) out[i] = inc;\n    }\n    return out;\n}\n\nfunction binsToCalc(r2c, bins) {\n    return {\n        start: r2c(bins.start),\n        end: r2c(bins.end),\n        size: bins.size\n    };\n}\n\nfunction getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {\n    var i;\n    var len = edges.length - 1;\n    var out = new Array(len);\n    var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);\n\n    for(i = 0; i < len; i++) {\n        var v = (uniqueVals || [])[i];\n        out[i] = v === undefined ?\n            [roundFn(edges[i]), roundFn(edges[i + 1], true)] :\n            [v, v];\n    }\n    return out;\n}\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../histogram/average\":991,\"../histogram/bin_functions\":993,\"../histogram/bin_label_vals\":994,\"../histogram/calc\":995,\"../histogram/norm_functions\":1002}],1005:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleSampleDefaults = _dereq_('./sample_defaults');\nvar handleStyleDefaults = _dereq_('../heatmap/style_defaults');\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    handleSampleDefaults(traceIn, traceOut, coerce, layout);\n    if(traceOut.visible === false) return;\n\n    handleStyleDefaults(traceIn, traceOut, coerce, layout);\n    colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});\n    coerce('hovertemplate');\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"../heatmap/style_defaults\":985,\"./attributes\":1003,\"./sample_defaults\":1008}],1006:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar heatmapHover = _dereq_('../heatmap/hover');\nvar hoverLabelText = _dereq_('../../plots/cartesian/axes').hoverLabelText;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer, contour) {\n    var pts = heatmapHover(pointData, xval, yval, hovermode, hoverLayer, contour);\n\n    if(!pts) return;\n\n    pointData = pts[0];\n    var indices = pointData.index;\n    var ny = indices[0];\n    var nx = indices[1];\n    var cd0 = pointData.cd[0];\n    var xRange = cd0.xRanges[nx];\n    var yRange = cd0.yRanges[ny];\n\n    pointData.xLabel = hoverLabelText(pointData.xa, xRange[0], xRange[1]);\n    pointData.yLabel = hoverLabelText(pointData.ya, yRange[0], yRange[1]);\n\n    return pts;\n};\n\n},{\"../../plots/cartesian/axes\":751,\"../heatmap/hover\":979}],1007:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('../histogram/cross_trace_defaults'),\n    calc: _dereq_('../heatmap/calc'),\n    plot: _dereq_('../heatmap/plot'),\n    layerName: 'heatmaplayer',\n    colorbar: _dereq_('../heatmap/colorbar'),\n    style: _dereq_('../heatmap/style'),\n    hoverPoints: _dereq_('./hover'),\n    eventData: _dereq_('../histogram/event_data'),\n\n    moduleType: 'trace',\n    name: 'histogram2d',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', '2dMap', 'histogram'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../heatmap/calc\":973,\"../heatmap/colorbar\":975,\"../heatmap/plot\":983,\"../heatmap/style\":984,\"../histogram/cross_trace_defaults\":997,\"../histogram/event_data\":999,\"./attributes\":1003,\"./defaults\":1005,\"./hover\":1006}],1008:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {\n    var x = coerce('x');\n    var y = coerce('y');\n    var xlen = Lib.minRowLength(x);\n    var ylen = Lib.minRowLength(y);\n\n    // we could try to accept x0 and dx, etc...\n    // but that's a pretty weird use case.\n    // for now require both x and y explicitly specified.\n    if(!xlen || !ylen) {\n        traceOut.visible = false;\n        return;\n    }\n\n    traceOut._length = Math.min(xlen, ylen);\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);\n\n    // if marker.color is an array, we can use it in aggregation instead of z\n    var hasAggregationData = coerce('z') || coerce('marker.color');\n\n    if(hasAggregationData) coerce('histfunc');\n    coerce('histnorm');\n\n    // Note: bin defaults are now handled in Histogram2D.crossTraceDefaults\n    // autobin(x|y) are only included here to appease Plotly.validate\n    coerce('autobinx');\n    coerce('autobiny');\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],1009:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar histogram2dAttrs = _dereq_('../histogram2d/attributes');\nvar contourAttrs = _dereq_('../contour/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = extendFlat({\n    x: histogram2dAttrs.x,\n    y: histogram2dAttrs.y,\n    z: histogram2dAttrs.z,\n    marker: histogram2dAttrs.marker,\n\n    histnorm: histogram2dAttrs.histnorm,\n    histfunc: histogram2dAttrs.histfunc,\n    nbinsx: histogram2dAttrs.nbinsx,\n    xbins: histogram2dAttrs.xbins,\n    nbinsy: histogram2dAttrs.nbinsy,\n    ybins: histogram2dAttrs.ybins,\n    autobinx: histogram2dAttrs.autobinx,\n    autobiny: histogram2dAttrs.autobiny,\n\n    bingroup: histogram2dAttrs.bingroup,\n    xbingroup: histogram2dAttrs.xbingroup,\n    ybingroup: histogram2dAttrs.ybingroup,\n\n    autocontour: contourAttrs.autocontour,\n    ncontours: contourAttrs.ncontours,\n    contours: contourAttrs.contours,\n    line: contourAttrs.line,\n    zhoverformat: histogram2dAttrs.zhoverformat,\n    hovertemplate: histogram2dAttrs.hovertemplate\n},\n    colorScaleAttrs('', {\n        cLetter: 'z',\n        editTypeOverride: 'calc'\n    })\n);\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../contour/attributes\":921,\"../histogram2d/attributes\":1003}],1010:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleSampleDefaults = _dereq_('../histogram2d/sample_defaults');\nvar handleContoursDefaults = _dereq_('../contour/contours_defaults');\nvar handleStyleDefaults = _dereq_('../contour/style_defaults');\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    function coerce2(attr) {\n        return Lib.coerce2(traceIn, traceOut, attributes, attr);\n    }\n\n    handleSampleDefaults(traceIn, traceOut, coerce, layout);\n    if(traceOut.visible === false) return;\n\n    handleContoursDefaults(traceIn, traceOut, coerce, coerce2);\n    handleStyleDefaults(traceIn, traceOut, coerce, layout);\n    coerce('hovertemplate');\n};\n\n},{\"../../lib\":703,\"../contour/contours_defaults\":928,\"../contour/style_defaults\":942,\"../histogram2d/sample_defaults\":1008,\"./attributes\":1009}],1011:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('../histogram/cross_trace_defaults'),\n    calc: _dereq_('../contour/calc'),\n    plot: _dereq_('../contour/plot').plot,\n    layerName: 'contourlayer',\n    style: _dereq_('../contour/style'),\n    colorbar: _dereq_('../contour/colorbar'),\n    hoverPoints: _dereq_('../contour/hover'),\n\n    moduleType: 'trace',\n    name: 'histogram2dcontour',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../contour/calc\":922,\"../contour/colorbar\":924,\"../contour/hover\":934,\"../contour/plot\":939,\"../contour/style\":941,\"../histogram/cross_trace_defaults\":997,\"./attributes\":1009,\"./defaults\":1010}],1012:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar meshAttrs = _dereq_('../mesh3d/attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nfunction makeSliceAttr(axLetter) {\n    return {\n        show: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        locations: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        fill: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n        }\n    };\n}\n\nfunction makeCapAttr(axLetter) {\n    return {\n        show: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n        fill: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n        }\n    };\n}\n\nvar attrs = module.exports = overrideAll(extendFlat({\n    x: {\n        valType: 'data_array',\n        \n        \n    },\n    y: {\n        valType: 'data_array',\n        \n        \n    },\n    z: {\n        valType: 'data_array',\n        \n        \n    },\n    value: {\n        valType: 'data_array',\n        \n        \n    },\n    isomin: {\n        valType: 'number',\n        \n        \n    },\n    isomax: {\n        valType: 'number',\n        \n        \n    },\n\n    surface: {\n        show: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n        count: {\n            valType: 'integer',\n            \n            dflt: 2,\n            min: 1,\n            \n        },\n        fill: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n        },\n        pattern: {\n            valType: 'flaglist',\n            flags: ['A', 'B', 'C', 'D', 'E'],\n            extras: ['all', 'odd', 'even'],\n            dflt: 'all',\n            \n            \n        }\n    },\n\n    spaceframe: {\n        show: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        fill: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 0.15,\n            \n        }\n    },\n\n    slices: {\n        x: makeSliceAttr('x'),\n        y: makeSliceAttr('y'),\n        z: makeSliceAttr('z')\n    },\n\n    caps: {\n        x: makeCapAttr('x'),\n        y: makeCapAttr('y'),\n        z: makeCapAttr('z')\n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        \n    },\n    hovertemplate: hovertemplateAttrs()\n},\n\ncolorScaleAttrs('', {\n    colorAttr: '`value`',\n    showScaleDflt: true,\n    editTypeOverride: 'calc'\n}), {\n    opacity: meshAttrs.opacity,\n    lightposition: meshAttrs.lightposition,\n    lighting: meshAttrs.lighting,\n    flatshading: meshAttrs.flatshading,\n    contour: meshAttrs.contour,\n\n    hoverinfo: extendFlat({}, baseAttrs.hoverinfo)\n}), 'calc', 'nested');\n\n// required defaults to speed up surface normal calculations\nattrs.flatshading.dflt = true; attrs.lighting.facenormalsepsilon.dflt = 0;\n\nattrs.x.editType = attrs.y.editType = attrs.z.editType = attrs.value.editType = 'calc+clearAxisTypes';\nattrs.transforms = undefined;\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../mesh3d/attributes\":1017}],1013:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\n\nmodule.exports = function calc(gd, trace) {\n    trace._len = Math.min(trace.x.length, trace.y.length, trace.z.length, trace.value.length);\n\n    var min = Infinity;\n    var max = -Infinity;\n    var len = trace.value.length;\n    for(var i = 0; i < len; i++) {\n        var v = trace.value[i];\n        min = Math.min(min, v);\n        max = Math.max(max, v);\n    }\n\n    trace._minValues = min;\n    trace._maxValues = max;\n\n    trace._vMin = (trace.isomin === undefined || trace.isomin === null) ? min : trace.isomin;\n    trace._vMax = (trace.isomax === undefined || trace.isomin === null) ? max : trace.isomax;\n\n    colorscaleCalc(gd, trace, {\n        vals: [trace._vMin, trace._vMax],\n        containerStr: '',\n        cLetter: 'c'\n    });\n};\n\n},{\"../../components/colorscale/calc\":588}],1014:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createMesh = _dereq_('gl-mesh3d');\n\nvar Lib = _dereq_('../../lib');\n\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar str2RgbaArray = _dereq_('../../lib/str2rgbarray');\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar zip3 = _dereq_('../../plots/gl3d/zip3');\n\nfunction distinctVals(col) {\n    return Lib.distinctVals(col).vals;\n}\n\nvar findNearestOnAxis = function(w, arr) {\n    for(var q = arr.length - 1; q > 0; q--) {\n        var min = Math.min(arr[q], arr[q - 1]);\n        var max = Math.max(arr[q], arr[q - 1]);\n        if(max > min && min < w && w <= max) {\n            return {\n                id: q,\n                distRatio: (max - w) / (max - min)\n            };\n        }\n    }\n    return {\n        id: 0,\n        distRatio: 0\n    };\n};\n\nfunction IsosurfaceTrace(scene, mesh, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.mesh = mesh;\n    this.name = '';\n    this.data = null;\n    this.showContour = false;\n}\n\nvar proto = IsosurfaceTrace.prototype;\n\nproto.handlePick = function(selection) {\n    if(selection.object === this.mesh) {\n        var rawId = selection.data.index;\n\n        var x = this.data._x[rawId];\n        var y = this.data._y[rawId];\n        var z = this.data._z[rawId];\n\n        var height = this.data._Ys.length;\n        var depth = this.data._Zs.length;\n\n        var i = findNearestOnAxis(x, this.data._Xs).id;\n        var j = findNearestOnAxis(y, this.data._Ys).id;\n        var k = findNearestOnAxis(z, this.data._Zs).id;\n\n        var selectIndex = selection.index = k + depth * j + depth * height * i;\n\n        selection.traceCoordinate = [\n            this.data._x[selectIndex],\n            this.data._y[selectIndex],\n            this.data._z[selectIndex],\n            this.data.value[selectIndex]\n        ];\n\n        var text = this.data.hovertext || this.data.text;\n        if(Array.isArray(text) && text[selectIndex] !== undefined) {\n            selection.textLabel = text[selectIndex];\n        } else if(text) {\n            selection.textLabel = text;\n        }\n\n        return true;\n    }\n};\n\nproto.update = function(data) {\n    var scene = this.scene;\n    var layout = scene.fullSceneLayout;\n\n    this.data = generateIsoMeshes(data);\n\n    // Unpack position data\n    function toDataCoords(axis, coord, scale, calendar) {\n        return coord.map(function(x) {\n            return axis.d2l(x, 0, calendar) * scale;\n        });\n    }\n\n    var positions = zip3(\n        toDataCoords(layout.xaxis, data._x, scene.dataScale[0], data.xcalendar),\n        toDataCoords(layout.yaxis, data._y, scene.dataScale[1], data.ycalendar),\n        toDataCoords(layout.zaxis, data._z, scene.dataScale[2], data.zcalendar));\n\n    var cells = zip3(data._i, data._j, data._k);\n\n    var config = {\n        positions: positions,\n        cells: cells,\n        lightPosition: [data.lightposition.x, data.lightposition.y, data.lightposition.z],\n        ambient: data.lighting.ambient,\n        diffuse: data.lighting.diffuse,\n        specular: data.lighting.specular,\n        roughness: data.lighting.roughness,\n        fresnel: data.lighting.fresnel,\n        vertexNormalsEpsilon: data.lighting.vertexnormalsepsilon,\n        faceNormalsEpsilon: data.lighting.facenormalsepsilon,\n        opacity: data.opacity,\n        contourEnable: data.contour.show,\n        contourColor: str2RgbaArray(data.contour.color).slice(0, 3),\n        contourWidth: data.contour.width,\n        useFacetNormals: data.flatshading\n    };\n\n    var cOpts = extractOpts(data);\n    config.vertexIntensity = data._intensity;\n    config.vertexIntensityBounds = [cOpts.min, cOpts.max];\n    config.colormap = parseColorScale(data);\n\n    // Update mesh\n    this.mesh.update(config);\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.mesh);\n    this.mesh.dispose();\n};\n\nfunction generateIsoMeshes(data) {\n    data._i = [];\n    data._j = [];\n    data._k = [];\n\n    var showSurface = data.surface.show;\n    var showSpaceframe = data.spaceframe.show;\n\n    var surfaceFill = data.surface.fill;\n    var spaceframeFill = data.spaceframe.fill;\n\n    var drawingSurface = false;\n    var drawingSpaceframe = false;\n\n    var numFaces = 0;\n    var numVertices;\n    var beginVertextLength;\n\n    var Xs = distinctVals(data.x.slice(0, data._len));\n    var Ys = distinctVals(data.y.slice(0, data._len));\n    var Zs = distinctVals(data.z.slice(0, data._len));\n\n    var width = Xs.length;\n    var height = Ys.length;\n    var depth = Zs.length;\n\n    function getIndex(i, j, k) {\n        return k + depth * j + depth * height * i;\n    }\n\n    var minValues = data._minValues;\n    var maxValues = data._maxValues;\n\n    var vMin = data._vMin;\n    var vMax = data._vMax;\n\n    var allXs;\n    var allYs;\n    var allZs;\n    var allVs;\n\n    function findVertexId(x, y, z) {\n        // could be used to find the vertex id of previously generated vertex within the group\n\n        var len = allVs.length;\n        for(var f = beginVertextLength; f < len; f++) {\n            if(\n                x === allXs[f] &&\n                y === allYs[f] &&\n                z === allZs[f]\n            ) {\n                return f;\n            }\n        }\n        return -1;\n    }\n\n    function beginGroup() {\n        beginVertextLength = numVertices;\n    }\n\n    function emptyVertices() {\n        allXs = [];\n        allYs = [];\n        allZs = [];\n        allVs = [];\n        numVertices = 0;\n\n        beginGroup();\n    }\n\n    function addVertex(x, y, z, v) {\n        allXs.push(x);\n        allYs.push(y);\n        allZs.push(z);\n        allVs.push(v);\n        numVertices++;\n\n        return numVertices - 1;\n    }\n\n    function addFace(a, b, c) {\n        data._i.push(a);\n        data._j.push(b);\n        data._k.push(c);\n        numFaces++;\n\n        return numFaces - 1;\n    }\n\n    function getCenter(A, B, C) {\n        var M = [];\n        for(var i = 0; i < A.length; i++) {\n            M[i] = (A[i] + B[i] + C[i]) / 3.0;\n        }\n        return M;\n    }\n\n    function getBetween(A, B, r) {\n        var M = [];\n        for(var i = 0; i < A.length; i++) {\n            M[i] = A[i] * (1 - r) + r * B[i];\n        }\n        return M;\n    }\n\n    var activeFill;\n    function setFill(fill) {\n        activeFill = fill;\n    }\n\n    function createOpenTri(xyzv, abc) {\n        var A = xyzv[0];\n        var B = xyzv[1];\n        var C = xyzv[2];\n        var G = getCenter(A, B, C);\n\n        var r = Math.sqrt(1 - activeFill);\n        var p1 = getBetween(G, A, r);\n        var p2 = getBetween(G, B, r);\n        var p3 = getBetween(G, C, r);\n\n        var a = abc[0];\n        var b = abc[1];\n        var c = abc[2];\n\n        return {\n            xyzv: [\n                [A, B, p2], [p2, p1, A],\n                [B, C, p3], [p3, p2, B],\n                [C, A, p1], [p1, p3, C]\n            ],\n            abc: [\n                [a, b, -1], [-1, -1, a],\n                [b, c, -1], [-1, -1, b],\n                [c, a, -1], [-1, -1, c]\n            ]\n        };\n    }\n\n    function styleIncludes(style, char) {\n        if(style === 'all' || style === null) return true;\n        return (style.indexOf(char) > -1);\n    }\n\n    function mapValue(style, value) {\n        if(style === null) return value;\n        return style;\n    }\n\n    function drawTri(style, xyzv, abc) {\n        beginGroup();\n\n        var allXYZVs = [xyzv];\n        var allABCs = [abc];\n        if(activeFill >= 1) {\n            allXYZVs = [xyzv];\n            allABCs = [abc];\n        } else if(activeFill > 0) {\n            var openTri = createOpenTri(xyzv, abc);\n            allXYZVs = openTri.xyzv;\n            allABCs = openTri.abc;\n        }\n\n        for(var f = 0; f < allXYZVs.length; f++) {\n            xyzv = allXYZVs[f];\n            abc = allABCs[f];\n\n            var pnts = [];\n            for(var i = 0; i < 3; i++) {\n                var x = xyzv[i][0];\n                var y = xyzv[i][1];\n                var z = xyzv[i][2];\n                var v = xyzv[i][3];\n\n                var id = (abc[i] > -1) ? abc[i] : findVertexId(x, y, z);\n                if(id > -1) {\n                    pnts[i] = id;\n                } else {\n                    pnts[i] = addVertex(x, y, z, mapValue(style, v));\n                }\n            }\n\n            addFace(pnts[0], pnts[1], pnts[2]);\n        }\n    }\n\n    function drawQuad(style, xyzv, abcd) {\n        var makeTri = function(i, j, k) {\n            drawTri(style, [xyzv[i], xyzv[j], xyzv[k]], [abcd[i], abcd[j], abcd[k]]);\n        };\n\n        makeTri(0, 1, 2);\n        makeTri(2, 3, 0);\n    }\n\n    function drawTetra(style, xyzv, abcd) {\n        var makeTri = function(i, j, k) {\n            drawTri(style, [xyzv[i], xyzv[j], xyzv[k]], [abcd[i], abcd[j], abcd[k]]);\n        };\n\n        makeTri(0, 1, 2);\n        makeTri(3, 0, 1);\n        makeTri(2, 3, 0);\n        makeTri(1, 2, 3);\n    }\n\n    function calcIntersection(pointOut, pointIn, min, max) {\n        var value = pointOut[3];\n\n        if(value < min) value = min;\n        if(value > max) value = max;\n\n        var ratio = (pointOut[3] - value) / (pointOut[3] - pointIn[3] + 0.000000001); // we had to add this error to force solve the tiny caps\n\n        var result = [];\n        for(var s = 0; s < 4; s++) {\n            result[s] = (1 - ratio) * pointOut[s] + ratio * pointIn[s];\n        }\n        return result;\n    }\n\n    function inRange(value, min, max) {\n        return (\n            value >= min &&\n            value <= max\n        );\n    }\n\n    function almostInFinalRange(value) {\n        var vErr = 0.001 * (vMax - vMin);\n        return (\n            value >= vMin - vErr &&\n            value <= vMax + vErr\n        );\n    }\n\n    function getXYZV(indecies) {\n        var xyzv = [];\n        for(var q = 0; q < 4; q++) {\n            var index = indecies[q];\n            xyzv.push(\n                [\n                    data.x[index],\n                    data.y[index],\n                    data.z[index],\n                    data.value[index]\n                ]\n            );\n        }\n\n        return xyzv;\n    }\n\n    var MAX_PASS = 3;\n\n    function tryCreateTri(style, xyzv, abc, min, max, nPass) {\n        if(!nPass) nPass = 1;\n\n        abc = [-1, -1, -1]; // Note: for the moment we override indices\n        // to run faster! But it is possible to comment this line\n        // to reduce the number of vertices.\n\n        var result = false;\n\n        var ok = [\n            inRange(xyzv[0][3], min, max),\n            inRange(xyzv[1][3], min, max),\n            inRange(xyzv[2][3], min, max)\n        ];\n\n        if(!ok[0] && !ok[1] && !ok[2]) {\n            return false;\n        }\n\n        var tryDrawTri = function(style, xyzv, abc) {\n            if( // we check here if the points are in `real` iso-min/max range\n                almostInFinalRange(xyzv[0][3]) &&\n                almostInFinalRange(xyzv[1][3]) &&\n                almostInFinalRange(xyzv[2][3])\n            ) {\n                drawTri(style, xyzv, abc);\n                return true;\n            } else if(nPass < MAX_PASS) {\n                return tryCreateTri(style, xyzv, abc, vMin, vMax, ++nPass); // i.e. second pass using actual vMin vMax bounds\n            }\n            return false;\n        };\n\n        if(ok[0] && ok[1] && ok[2]) {\n            return tryDrawTri(style, xyzv, abc) || result;\n        }\n\n        var interpolated = false;\n\n        [\n            [0, 1, 2],\n            [2, 0, 1],\n            [1, 2, 0]\n        ].forEach(function(e) {\n            if(ok[e[0]] && ok[e[1]] && !ok[e[2]]) {\n                var A = xyzv[e[0]];\n                var B = xyzv[e[1]];\n                var C = xyzv[e[2]];\n\n                var p1 = calcIntersection(C, A, min, max);\n                var p2 = calcIntersection(C, B, min, max);\n\n                result = tryDrawTri(style, [p2, p1, A], [-1, -1, abc[e[0]]]) || result;\n                result = tryDrawTri(style, [A, B, p2], [abc[e[0]], abc[e[1]], -1]) || result;\n\n                interpolated = true;\n            }\n        });\n        if(interpolated) return result;\n\n        [\n            [0, 1, 2],\n            [1, 2, 0],\n            [2, 0, 1]\n        ].forEach(function(e) {\n            if(ok[e[0]] && !ok[e[1]] && !ok[e[2]]) {\n                var A = xyzv[e[0]];\n                var B = xyzv[e[1]];\n                var C = xyzv[e[2]];\n\n                var p1 = calcIntersection(B, A, min, max);\n                var p2 = calcIntersection(C, A, min, max);\n\n                result = tryDrawTri(style, [p2, p1, A], [-1, -1, abc[e[0]]]) || result;\n\n                interpolated = true;\n            }\n        });\n        return result;\n    }\n\n    function tryCreateTetra(style, abcd, min, max) {\n        var result = false;\n\n        var xyzv = getXYZV(abcd);\n\n        var ok = [\n            inRange(xyzv[0][3], min, max),\n            inRange(xyzv[1][3], min, max),\n            inRange(xyzv[2][3], min, max),\n            inRange(xyzv[3][3], min, max)\n        ];\n\n        if(!ok[0] && !ok[1] && !ok[2] && !ok[3]) {\n            return result;\n        }\n\n        if(ok[0] && ok[1] && ok[2] && ok[3]) {\n            if(drawingSpaceframe) {\n                result = drawTetra(style, xyzv, abcd) || result;\n            }\n            return result;\n        }\n\n        var interpolated = false;\n\n        [\n            [0, 1, 2, 3],\n            [3, 0, 1, 2],\n            [2, 3, 0, 1],\n            [1, 2, 3, 0]\n        ].forEach(function(e) {\n            if(ok[e[0]] && ok[e[1]] && ok[e[2]] && !ok[e[3]]) {\n                var A = xyzv[e[0]];\n                var B = xyzv[e[1]];\n                var C = xyzv[e[2]];\n                var D = xyzv[e[3]];\n\n                if(drawingSpaceframe) {\n                    result = drawTri(style, [A, B, C], [abcd[e[0]], abcd[e[1]], abcd[e[2]]]) || result;\n                } else {\n                    var p1 = calcIntersection(D, A, min, max);\n                    var p2 = calcIntersection(D, B, min, max);\n                    var p3 = calcIntersection(D, C, min, max);\n\n                    result = drawTri(null, [p1, p2, p3], [-1, -1, -1]) || result;\n                }\n\n                interpolated = true;\n            }\n        });\n        if(interpolated) return result;\n\n        [\n            [0, 1, 2, 3],\n            [1, 2, 3, 0],\n            [2, 3, 0, 1],\n            [3, 0, 1, 2],\n            [0, 2, 3, 1],\n            [1, 3, 2, 0]\n        ].forEach(function(e) {\n            if(ok[e[0]] && ok[e[1]] && !ok[e[2]] && !ok[e[3]]) {\n                var A = xyzv[e[0]];\n                var B = xyzv[e[1]];\n                var C = xyzv[e[2]];\n                var D = xyzv[e[3]];\n\n                var p1 = calcIntersection(C, A, min, max);\n                var p2 = calcIntersection(C, B, min, max);\n                var p3 = calcIntersection(D, B, min, max);\n                var p4 = calcIntersection(D, A, min, max);\n\n                if(drawingSpaceframe) {\n                    result = drawTri(style, [A, p4, p1], [abcd[e[0]], -1, -1]) || result;\n                    result = drawTri(style, [B, p2, p3], [abcd[e[1]], -1, -1]) || result;\n                } else {\n                    result = drawQuad(null, [p1, p2, p3, p4], [-1, -1, -1, -1]) || result;\n                }\n\n                interpolated = true;\n            }\n        });\n        if(interpolated) return result;\n\n        [\n            [0, 1, 2, 3],\n            [1, 2, 3, 0],\n            [2, 3, 0, 1],\n            [3, 0, 1, 2]\n        ].forEach(function(e) {\n            if(ok[e[0]] && !ok[e[1]] && !ok[e[2]] && !ok[e[3]]) {\n                var A = xyzv[e[0]];\n                var B = xyzv[e[1]];\n                var C = xyzv[e[2]];\n                var D = xyzv[e[3]];\n\n                var p1 = calcIntersection(B, A, min, max);\n                var p2 = calcIntersection(C, A, min, max);\n                var p3 = calcIntersection(D, A, min, max);\n\n                if(drawingSpaceframe) {\n                    result = drawTri(style, [A, p1, p2], [abcd[e[0]], -1, -1]) || result;\n                    result = drawTri(style, [A, p2, p3], [abcd[e[0]], -1, -1]) || result;\n                    result = drawTri(style, [A, p3, p1], [abcd[e[0]], -1, -1]) || result;\n                } else {\n                    result = drawTri(null, [p1, p2, p3], [-1, -1, -1]) || result;\n                }\n\n                interpolated = true;\n            }\n        });\n        return result;\n    }\n\n    function addCube(style, p000, p001, p010, p011, p100, p101, p110, p111, min, max) {\n        var result = false;\n\n        if(drawingSurface) {\n            if(styleIncludes(style, 'A')) {\n                result = tryCreateTetra(null, [p000, p001, p010, p100], min, max) || result;\n            }\n            if(styleIncludes(style, 'B')) {\n                result = tryCreateTetra(null, [p001, p010, p011, p111], min, max) || result;\n            }\n            if(styleIncludes(style, 'C')) {\n                result = tryCreateTetra(null, [p001, p100, p101, p111], min, max) || result;\n            }\n            if(styleIncludes(style, 'D')) {\n                result = tryCreateTetra(null, [p010, p100, p110, p111], min, max) || result;\n            }\n            if(styleIncludes(style, 'E')) {\n                result = tryCreateTetra(null, [p001, p010, p100, p111], min, max) || result;\n            }\n        }\n\n        if(drawingSpaceframe) {\n            result = tryCreateTetra(style, [p001, p010, p100, p111], min, max) || result;\n        }\n\n        return result;\n    }\n\n    function addRect(style, a, b, c, d, min, max, previousResult) {\n        return [\n            (previousResult[0] === true) ? true :\n            tryCreateTri(style, getXYZV([a, b, c]), [a, b, c], min, max),\n            (previousResult[1] === true) ? true :\n            tryCreateTri(style, getXYZV([c, d, a]), [c, d, a], min, max)\n        ];\n    }\n\n    function begin2dCell(style, p00, p01, p10, p11, min, max, isEven, previousResult) {\n        // used to create caps and/or slices on exact axis points\n        if(isEven) {\n            return addRect(style, p00, p01, p11, p10, min, max, previousResult);\n        } else {\n            return addRect(style, p01, p11, p10, p00, min, max, previousResult);\n        }\n    }\n\n    function beginSection(style, i, j, k, min, max, distRatios) {\n        // used to create slices between axis points\n\n        var result = false;\n        var A, B, C, D;\n\n        var makeSection = function() {\n            result = tryCreateTri(style, [A, B, C], [-1, -1, -1], min, max) || result;\n            result = tryCreateTri(style, [C, D, A], [-1, -1, -1], min, max) || result;\n        };\n\n        var rX = distRatios[0];\n        var rY = distRatios[1];\n        var rZ = distRatios[2];\n\n        if(rX) {\n            A = getBetween(getXYZV([getIndex(i, j - 0, k - 0)])[0], getXYZV([getIndex(i - 1, j - 0, k - 0)])[0], rX);\n            B = getBetween(getXYZV([getIndex(i, j - 0, k - 1)])[0], getXYZV([getIndex(i - 1, j - 0, k - 1)])[0], rX);\n            C = getBetween(getXYZV([getIndex(i, j - 1, k - 1)])[0], getXYZV([getIndex(i - 1, j - 1, k - 1)])[0], rX);\n            D = getBetween(getXYZV([getIndex(i, j - 1, k - 0)])[0], getXYZV([getIndex(i - 1, j - 1, k - 0)])[0], rX);\n            makeSection();\n        }\n\n        if(rY) {\n            A = getBetween(getXYZV([getIndex(i - 0, j, k - 0)])[0], getXYZV([getIndex(i - 0, j - 1, k - 0)])[0], rY);\n            B = getBetween(getXYZV([getIndex(i - 0, j, k - 1)])[0], getXYZV([getIndex(i - 0, j - 1, k - 1)])[0], rY);\n            C = getBetween(getXYZV([getIndex(i - 1, j, k - 1)])[0], getXYZV([getIndex(i - 1, j - 1, k - 1)])[0], rY);\n            D = getBetween(getXYZV([getIndex(i - 1, j, k - 0)])[0], getXYZV([getIndex(i - 1, j - 1, k - 0)])[0], rY);\n            makeSection();\n        }\n\n        if(rZ) {\n            A = getBetween(getXYZV([getIndex(i - 0, j - 0, k)])[0], getXYZV([getIndex(i - 0, j - 0, k - 1)])[0], rZ);\n            B = getBetween(getXYZV([getIndex(i - 0, j - 1, k)])[0], getXYZV([getIndex(i - 0, j - 1, k - 1)])[0], rZ);\n            C = getBetween(getXYZV([getIndex(i - 1, j - 1, k)])[0], getXYZV([getIndex(i - 1, j - 1, k - 1)])[0], rZ);\n            D = getBetween(getXYZV([getIndex(i - 1, j - 0, k)])[0], getXYZV([getIndex(i - 1, j - 0, k - 1)])[0], rZ);\n            makeSection();\n        }\n\n        return result;\n    }\n\n    function begin3dCell(style, p000, p001, p010, p011, p100, p101, p110, p111, min, max, isEven) {\n        // used to create spaceframe and/or iso-surfaces\n\n        var cellStyle = style;\n        if(isEven) {\n            if(drawingSurface && style === 'even') cellStyle = null;\n            return addCube(cellStyle, p000, p001, p010, p011, p100, p101, p110, p111, min, max);\n        } else {\n            if(drawingSurface && style === 'odd') cellStyle = null;\n            return addCube(cellStyle, p111, p110, p101, p100, p011, p010, p001, p000, min, max);\n        }\n    }\n\n    function draw2dX(style, items, min, max, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var i = items[q];\n            for(var k = 1; k < depth; k++) {\n                for(var j = 1; j < height; j++) {\n                    result.push(\n                        begin2dCell(style,\n                            getIndex(i, j - 1, k - 1),\n                            getIndex(i, j - 1, k),\n                            getIndex(i, j, k - 1),\n                            getIndex(i, j, k),\n                            min,\n                            max,\n                            (i + j + k) % 2,\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function draw2dY(style, items, min, max, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var j = items[q];\n            for(var i = 1; i < width; i++) {\n                for(var k = 1; k < depth; k++) {\n                    result.push(\n                        begin2dCell(style,\n                            getIndex(i - 1, j, k - 1),\n                            getIndex(i, j, k - 1),\n                            getIndex(i - 1, j, k),\n                            getIndex(i, j, k),\n                            min,\n                            max,\n                            (i + j + k) % 2,\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function draw2dZ(style, items, min, max, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var k = items[q];\n            for(var j = 1; j < height; j++) {\n                for(var i = 1; i < width; i++) {\n                    result.push(\n                        begin2dCell(style,\n                            getIndex(i - 1, j - 1, k),\n                            getIndex(i - 1, j, k),\n                            getIndex(i, j - 1, k),\n                            getIndex(i, j, k),\n                            min,\n                            max,\n                            (i + j + k) % 2,\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function draw3d(style, min, max) {\n        for(var k = 1; k < depth; k++) {\n            for(var j = 1; j < height; j++) {\n                for(var i = 1; i < width; i++) {\n                    begin3dCell(style,\n                        getIndex(i - 1, j - 1, k - 1),\n                        getIndex(i - 1, j - 1, k),\n                        getIndex(i - 1, j, k - 1),\n                        getIndex(i - 1, j, k),\n                        getIndex(i, j - 1, k - 1),\n                        getIndex(i, j - 1, k),\n                        getIndex(i, j, k - 1),\n                        getIndex(i, j, k),\n                        min,\n                        max,\n                        (i + j + k) % 2\n                    );\n                }\n            }\n        }\n    }\n\n    function drawSpaceframe(style, min, max) {\n        drawingSpaceframe = true;\n        draw3d(style, min, max);\n        drawingSpaceframe = false;\n    }\n\n    function drawSurface(style, min, max) {\n        drawingSurface = true;\n        draw3d(style, min, max);\n        drawingSurface = false;\n    }\n\n    function drawSectionX(style, items, min, max, distRatios, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var i = items[q];\n            for(var k = 1; k < depth; k++) {\n                for(var j = 1; j < height; j++) {\n                    result.push(\n                        beginSection(style, i, j, k, min, max, distRatios[q],\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function drawSectionY(style, items, min, max, distRatios, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var j = items[q];\n            for(var i = 1; i < width; i++) {\n                for(var k = 1; k < depth; k++) {\n                    result.push(\n                        beginSection(style, i, j, k, min, max, distRatios[q],\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function drawSectionZ(style, items, min, max, distRatios, previousResult) {\n        var result = [];\n        var n = 0;\n        for(var q = 0; q < items.length; q++) {\n            var k = items[q];\n            for(var j = 1; j < height; j++) {\n                for(var i = 1; i < width; i++) {\n                    result.push(\n                        beginSection(style, i, j, k, min, max, distRatios[q],\n                            (previousResult && previousResult[n]) ? previousResult[n] : []\n                        )\n                    );\n                    n++;\n                }\n            }\n        }\n        return result;\n    }\n\n    function createRange(a, b) {\n        var range = [];\n        for(var q = a; q < b; q++) {\n            range.push(q);\n        }\n        return range;\n    }\n\n    function insertGridPoints() {\n        for(var i = 0; i < width; i++) {\n            for(var j = 0; j < height; j++) {\n                for(var k = 0; k < depth; k++) {\n                    var index = getIndex(i, j, k);\n                    addVertex(\n                        data.x[index],\n                        data.y[index],\n                        data.z[index],\n                        data.value[index]\n                    );\n                }\n            }\n        }\n    }\n\n    function drawAll() {\n        emptyVertices();\n\n        // insert grid points\n        insertGridPoints();\n\n        var activeStyle = null;\n\n        // draw spaceframes\n        if(showSpaceframe && spaceframeFill) {\n            setFill(spaceframeFill);\n\n            drawSpaceframe(activeStyle, vMin, vMax);\n        }\n\n        // draw iso-surfaces\n        if(showSurface && surfaceFill) {\n            setFill(surfaceFill);\n\n            var surfacePattern = data.surface.pattern;\n            var surfaceCount = data.surface.count;\n            for(var q = 0; q < surfaceCount; q++) {\n                var ratio = (surfaceCount === 1) ? 0.5 : q / (surfaceCount - 1);\n                var level = (1 - ratio) * vMin + ratio * vMax;\n\n                var d1 = Math.abs(level - minValues);\n                var d2 = Math.abs(level - maxValues);\n                var ranges = (d1 > d2) ?\n                    [minValues, level] :\n                    [level, maxValues];\n\n                drawSurface(surfacePattern, ranges[0], ranges[1]);\n            }\n        }\n\n        var setupMinMax = [\n            [ Math.min(vMin, maxValues), Math.max(vMin, maxValues) ],\n            [ Math.min(minValues, vMax), Math.max(minValues, vMax) ]\n        ];\n\n        ['x', 'y', 'z'].forEach(function(e) {\n            var preRes = [];\n            for(var s = 0; s < setupMinMax.length; s++) {\n                var count = 0;\n\n                var activeMin = setupMinMax[s][0];\n                var activeMax = setupMinMax[s][1];\n\n                // draw slices\n                var slice = data.slices[e];\n                if(slice.show && slice.fill) {\n                    setFill(slice.fill);\n\n                    var exactIndices = [];\n                    var ceilIndices = [];\n                    var distRatios = [];\n                    if(slice.locations.length) {\n                        for(var q = 0; q < slice.locations.length; q++) {\n                            var near = findNearestOnAxis(\n                                slice.locations[q],\n                                (e === 'x') ? Xs :\n                                (e === 'y') ? Ys : Zs\n                            );\n\n                            if(near.distRatio === 0) {\n                                exactIndices.push(near.id);\n                            } else if(near.id > 0) {\n                                ceilIndices.push(near.id);\n                                if(e === 'x') {\n                                    distRatios.push([near.distRatio, 0, 0]);\n                                } else if(e === 'y') {\n                                    distRatios.push([0, near.distRatio, 0]);\n                                } else {\n                                    distRatios.push([0, 0, near.distRatio]);\n                                }\n                            }\n                        }\n                    } else {\n                        if(e === 'x') {\n                            exactIndices = createRange(1, width - 1);\n                        } else if(e === 'y') {\n                            exactIndices = createRange(1, height - 1);\n                        } else {\n                            exactIndices = createRange(1, depth - 1);\n                        }\n                    }\n\n                    if(ceilIndices.length > 0) {\n                        if(e === 'x') {\n                            preRes[count] = drawSectionX(activeStyle, ceilIndices, activeMin, activeMax, distRatios, preRes[count]);\n                        } else if(e === 'y') {\n                            preRes[count] = drawSectionY(activeStyle, ceilIndices, activeMin, activeMax, distRatios, preRes[count]);\n                        } else {\n                            preRes[count] = drawSectionZ(activeStyle, ceilIndices, activeMin, activeMax, distRatios, preRes[count]);\n                        }\n                        count++;\n                    }\n\n                    if(exactIndices.length > 0) {\n                        if(e === 'x') {\n                            preRes[count] = draw2dX(activeStyle, exactIndices, activeMin, activeMax, preRes[count]);\n                        } else if(e === 'y') {\n                            preRes[count] = draw2dY(activeStyle, exactIndices, activeMin, activeMax, preRes[count]);\n                        } else {\n                            preRes[count] = draw2dZ(activeStyle, exactIndices, activeMin, activeMax, preRes[count]);\n                        }\n                        count++;\n                    }\n                }\n\n                // draw caps\n                var cap = data.caps[e];\n                if(cap.show && cap.fill) {\n                    setFill(cap.fill);\n                    if(e === 'x') {\n                        preRes[count] = draw2dX(activeStyle, [0, width - 1], activeMin, activeMax, preRes[count]);\n                    } else if(e === 'y') {\n                        preRes[count] = draw2dY(activeStyle, [0, height - 1], activeMin, activeMax, preRes[count]);\n                    } else {\n                        preRes[count] = draw2dZ(activeStyle, [0, depth - 1], activeMin, activeMax, preRes[count]);\n                    }\n                    count++;\n                }\n            }\n        });\n\n        // remove vertices arrays (i.e. grid points) in case no face was created.\n        if(numFaces === 0) {\n            emptyVertices();\n        }\n\n        data._x = allXs;\n        data._y = allYs;\n        data._z = allZs;\n        data._intensity = allVs;\n\n        data._Xs = Xs;\n        data._Ys = Ys;\n        data._Zs = Zs;\n    }\n\n    drawAll();\n\n    return data;\n}\n\nfunction createIsosurfaceTrace(scene, data) {\n    var gl = scene.glplot.gl;\n    var mesh = createMesh({gl: gl});\n    var result = new IsosurfaceTrace(scene, mesh, data.uid);\n\n    mesh._trace = result;\n    result.update(data);\n    scene.glplot.add(mesh);\n    return result;\n}\n\nmodule.exports = {\n    findNearestOnAxis: findNearestOnAxis,\n    generateIsoMeshes: generateIsoMeshes,\n    createIsosurfaceTrace: createIsosurfaceTrace,\n};\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../lib/str2rgbarray\":726,\"../../plots/gl3d/zip3\":802,\"gl-mesh3d\":279}],1015:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\nvar attributes = _dereq_('./attributes');\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    supplyIsoDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n}\n\nfunction supplyIsoDefaults(traceIn, traceOut, defaultColor, layout, coerce) {\n    var isomin = coerce('isomin');\n    var isomax = coerce('isomax');\n\n    if(isomax !== undefined && isomax !== null &&\n        isomin !== undefined && isomin !== null &&\n         isomin > isomax) {\n        // applying default values in this case:\n        traceOut.isomin = null;\n        traceOut.isomax = null;\n    }\n\n    var x = coerce('x');\n    var y = coerce('y');\n    var z = coerce('z');\n    var value = coerce('value');\n\n    if(\n        !x || !x.length ||\n        !y || !y.length ||\n        !z || !z.length ||\n        !value || !value.length\n    ) {\n        traceOut.visible = false;\n        return;\n    }\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);\n\n    ['x', 'y', 'z'].forEach(function(dim) {\n        var capDim = 'caps.' + dim;\n        var showCap = coerce(capDim + '.show');\n        if(showCap) {\n            coerce(capDim + '.fill');\n        }\n\n        var sliceDim = 'slices.' + dim;\n        var showSlice = coerce(sliceDim + '.show');\n        if(showSlice) {\n            coerce(sliceDim + '.fill');\n            coerce(sliceDim + '.locations');\n        }\n    });\n\n    var showSpaceframe = coerce('spaceframe.show');\n    if(showSpaceframe) {\n        coerce('spaceframe.fill');\n    }\n\n    var showSurface = coerce('surface.show');\n    if(showSurface) {\n        coerce('surface.count');\n        coerce('surface.fill');\n        coerce('surface.pattern');\n    }\n\n    var showContour = coerce('contour.show');\n    if(showContour) {\n        coerce('contour.color');\n        coerce('contour.width');\n    }\n\n    // Coerce remaining properties\n    [\n        'text',\n        'hovertext',\n        'hovertemplate',\n        'lighting.ambient',\n        'lighting.diffuse',\n        'lighting.specular',\n        'lighting.roughness',\n        'lighting.fresnel',\n        'lighting.vertexnormalsepsilon',\n        'lighting.facenormalsepsilon',\n        'lightposition.x',\n        'lightposition.y',\n        'lightposition.z',\n        'flatshading',\n        'opacity'\n    ].forEach(function(x) { coerce(x); });\n\n    colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'});\n\n    // disable 1D transforms (for now)\n    traceOut._length = null;\n}\n\nmodule.exports = {\n    supplyDefaults: supplyDefaults,\n    supplyIsoDefaults: supplyIsoDefaults\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"../../registry\":831,\"./attributes\":1012}],1016:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    calc: _dereq_('./calc'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    plot: _dereq_('./convert').createIsosurfaceTrace,\n\n    moduleType: 'trace',\n    name: 'isosurface',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"./attributes\":1012,\"./calc\":1013,\"./convert\":1014,\"./defaults\":1015}],1017:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar surfaceAtts = _dereq_('../surface/attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = extendFlat({\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n    z: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    i: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    j: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n\n    },\n    k: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n\n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertemplate: hovertemplateAttrs({editType: 'calc'}),\n\n    delaunayaxis: {\n        valType: 'enumerated',\n        \n        values: [ 'x', 'y', 'z' ],\n        dflt: 'z',\n        editType: 'calc',\n        \n    },\n\n    alphahull: {\n        valType: 'number',\n        \n        dflt: -1,\n        editType: 'calc',\n        \n    },\n\n    intensity: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    // Color field\n    color: {\n        valType: 'color',\n        \n        editType: 'calc',\n        \n    },\n    vertexcolor: {\n        valType: 'data_array',\n        \n        editType: 'calc',\n        \n    },\n    facecolor: {\n        valType: 'data_array',\n        \n        editType: 'calc',\n        \n    },\n    transforms: undefined\n},\n\ncolorScaleAttrs('', {\n    colorAttr: '`intensity`',\n    showScaleDflt: true,\n    editTypeOverride: 'calc'\n}), {\n    opacity: surfaceAtts.opacity,\n\n    // Flat shaded mode\n    flatshading: {\n        valType: 'boolean',\n        \n        dflt: false,\n        editType: 'calc',\n        \n    },\n\n    contour: {\n        show: extendFlat({}, surfaceAtts.contours.x.show, {\n            \n        }),\n        color: surfaceAtts.contours.x.color,\n        width: surfaceAtts.contours.x.width,\n        editType: 'calc'\n    },\n\n    lightposition: {\n        x: extendFlat({}, surfaceAtts.lightposition.x, {dflt: 1e5}),\n        y: extendFlat({}, surfaceAtts.lightposition.y, {dflt: 1e5}),\n        z: extendFlat({}, surfaceAtts.lightposition.z, {dflt: 0}),\n        editType: 'calc'\n    },\n    lighting: extendFlat({\n        vertexnormalsepsilon: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 1,\n            dflt: 1e-12, // otherwise finely tessellated things eg. the brain will have no specular light reflection\n            editType: 'calc',\n            \n        },\n        facenormalsepsilon: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 1,\n            dflt: 1e-6, // even the brain model doesn't appear to need finer than this\n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    }, surfaceAtts.lighting),\n\n    hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {editType: 'calc'})\n});\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../surface/attributes\":1171}],1018:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\n\nmodule.exports = function calc(gd, trace) {\n    if(trace.intensity) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.intensity,\n            containerStr: '',\n            cLetter: 'c'\n        });\n    }\n};\n\n},{\"../../components/colorscale/calc\":588}],1019:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createMesh = _dereq_('gl-mesh3d');\nvar triangulate = _dereq_('delaunay-triangulate');\nvar alphaShape = _dereq_('alpha-shape');\nvar convexHull = _dereq_('convex-hull');\n\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar str2RgbaArray = _dereq_('../../lib/str2rgbarray');\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar zip3 = _dereq_('../../plots/gl3d/zip3');\n\nfunction Mesh3DTrace(scene, mesh, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.mesh = mesh;\n    this.name = '';\n    this.color = '#fff';\n    this.data = null;\n    this.showContour = false;\n}\n\nvar proto = Mesh3DTrace.prototype;\n\nproto.handlePick = function(selection) {\n    if(selection.object === this.mesh) {\n        var selectIndex = selection.index = selection.data.index;\n\n        selection.traceCoordinate = [\n            this.data.x[selectIndex],\n            this.data.y[selectIndex],\n            this.data.z[selectIndex]\n        ];\n\n        var text = this.data.hovertext || this.data.text;\n        if(Array.isArray(text) && text[selectIndex] !== undefined) {\n            selection.textLabel = text[selectIndex];\n        } else if(text) {\n            selection.textLabel = text;\n        }\n\n        return true;\n    }\n};\n\nfunction parseColorArray(colors) {\n    var b = [];\n    var len = colors.length;\n    for(var i = 0; i < len; i++) {\n        b[i] = str2RgbaArray(colors[i]);\n    }\n    return b;\n}\n\n// Unpack position data\nfunction toDataCoords(axis, coord, scale, calendar) {\n    var b = [];\n    var len = coord.length;\n    for(var i = 0; i < len; i++) {\n        b[i] = axis.d2l(coord[i], 0, calendar) * scale;\n    }\n    return b;\n}\n\n// Round indices if passed as floats\nfunction toRoundIndex(a) {\n    var b = [];\n    var len = a.length;\n    for(var i = 0; i < len; i++) {\n        b[i] = Math.round(a[i]);\n    }\n    return b;\n}\n\nfunction delaunayCells(delaunayaxis, positions) {\n    var d = ['x', 'y', 'z'].indexOf(delaunayaxis);\n    var b = [];\n    var len = positions.length;\n    for(var i = 0; i < len; i++) {\n        b[i] = [positions[i][(d + 1) % 3], positions[i][(d + 2) % 3]];\n    }\n    return triangulate(b);\n}\n\n// Validate indices\nfunction hasValidIndices(list, numVertices) {\n    var len = list.length;\n    for(var i = 0; i < len; i++) {\n        if(list[i] <= -0.5 || list[i] >= numVertices - 0.5) { // Note: the indices would be rounded -0.49 is valid.\n            return false;\n        }\n    }\n    return true;\n}\n\nproto.update = function(data) {\n    var scene = this.scene;\n    var layout = scene.fullSceneLayout;\n\n    this.data = data;\n\n    var numVertices = data.x.length;\n\n    var positions = zip3(\n        toDataCoords(layout.xaxis, data.x, scene.dataScale[0], data.xcalendar),\n        toDataCoords(layout.yaxis, data.y, scene.dataScale[1], data.ycalendar),\n        toDataCoords(layout.zaxis, data.z, scene.dataScale[2], data.zcalendar)\n    );\n\n    var cells;\n    if(data.i && data.j && data.k) {\n        if(\n            data.i.length !== data.j.length ||\n            data.j.length !== data.k.length ||\n            !hasValidIndices(data.i, numVertices) ||\n            !hasValidIndices(data.j, numVertices) ||\n            !hasValidIndices(data.k, numVertices)\n        ) {\n            return;\n        }\n        cells = zip3(\n            toRoundIndex(data.i),\n            toRoundIndex(data.j),\n            toRoundIndex(data.k)\n        );\n    } else if(data.alphahull === 0) {\n        cells = convexHull(positions);\n    } else if(data.alphahull > 0) {\n        cells = alphaShape(data.alphahull, positions);\n    } else {\n        cells = delaunayCells(data.delaunayaxis, positions);\n    }\n\n    var config = {\n        positions: positions,\n        cells: cells,\n        lightPosition: [data.lightposition.x, data.lightposition.y, data.lightposition.z],\n        ambient: data.lighting.ambient,\n        diffuse: data.lighting.diffuse,\n        specular: data.lighting.specular,\n        roughness: data.lighting.roughness,\n        fresnel: data.lighting.fresnel,\n        vertexNormalsEpsilon: data.lighting.vertexnormalsepsilon,\n        faceNormalsEpsilon: data.lighting.facenormalsepsilon,\n        opacity: data.opacity,\n        contourEnable: data.contour.show,\n        contourColor: str2RgbaArray(data.contour.color).slice(0, 3),\n        contourWidth: data.contour.width,\n        useFacetNormals: data.flatshading\n    };\n\n    if(data.intensity) {\n        var cOpts = extractOpts(data);\n        this.color = '#fff';\n        config.vertexIntensity = data.intensity;\n        config.vertexIntensityBounds = [cOpts.min, cOpts.max];\n        config.colormap = parseColorScale(data);\n    } else if(data.vertexcolor) {\n        this.color = data.vertexcolor[0];\n        config.vertexColors = parseColorArray(data.vertexcolor);\n    } else if(data.facecolor) {\n        this.color = data.facecolor[0];\n        config.cellColors = parseColorArray(data.facecolor);\n    } else {\n        this.color = data.color;\n        config.meshColor = str2RgbaArray(data.color);\n    }\n\n    // Update mesh\n    this.mesh.update(config);\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.mesh);\n    this.mesh.dispose();\n};\n\nfunction createMesh3DTrace(scene, data) {\n    var gl = scene.glplot.gl;\n    var mesh = createMesh({gl: gl});\n    var result = new Mesh3DTrace(scene, mesh, data.uid);\n    mesh._trace = result;\n    result.update(data);\n    scene.glplot.add(mesh);\n    return result;\n}\n\nmodule.exports = createMesh3DTrace;\n\n},{\"../../components/colorscale\":592,\"../../lib/gl_format_color\":700,\"../../lib/str2rgbarray\":726,\"../../plots/gl3d/zip3\":802,\"alpha-shape\":57,\"convex-hull\":123,\"delaunay-triangulate\":159,\"gl-mesh3d\":279}],1020:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    // read in face/vertex properties\n    function readComponents(array) {\n        var ret = array.map(function(attr) {\n            var result = coerce(attr);\n\n            if(result && Lib.isArrayOrTypedArray(result)) return result;\n            return null;\n        });\n\n        return ret.every(function(x) {\n            return x && x.length === ret[0].length;\n        }) && ret;\n    }\n\n    var coords = readComponents(['x', 'y', 'z']);\n    if(!coords) {\n        traceOut.visible = false;\n        return;\n    }\n\n    readComponents(['i', 'j', 'k']);\n    // three indices should be all provided or not\n    if(\n        (traceOut.i && (!traceOut.j || !traceOut.k)) ||\n        (traceOut.j && (!traceOut.k || !traceOut.i)) ||\n        (traceOut.k && (!traceOut.i || !traceOut.j))\n    ) {\n        traceOut.visible = false;\n        return;\n    }\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);\n\n    // Coerce remaining properties\n    [\n        'lighting.ambient',\n        'lighting.diffuse',\n        'lighting.specular',\n        'lighting.roughness',\n        'lighting.fresnel',\n        'lighting.vertexnormalsepsilon',\n        'lighting.facenormalsepsilon',\n        'lightposition.x',\n        'lightposition.y',\n        'lightposition.z',\n        'contour.show',\n        'contour.color',\n        'contour.width',\n        'colorscale',\n        'reversescale',\n        'flatshading',\n        'alphahull',\n        'delaunayaxis',\n        'opacity'\n    ].forEach(function(x) { coerce(x); });\n\n    if('intensity' in traceIn) {\n        coerce('intensity');\n        colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'});\n    } else {\n        traceOut.showscale = false;\n\n        if('facecolor' in traceIn) coerce('facecolor');\n        else if('vertexcolor' in traceIn) coerce('vertexcolor');\n        else coerce('color', defaultColor);\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    // disable 1D transforms\n    // x/y/z should match lengths, and i/j/k should match as well, but\n    // the two sets have different lengths so transforms wouldn't work.\n    traceOut._length = null;\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"../../registry\":831,\"./attributes\":1017}],1021:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    plot: _dereq_('./convert'),\n\n    moduleType: 'trace',\n    name: 'mesh3d',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"./attributes\":1017,\"./calc\":1018,\"./convert\":1019,\"./defaults\":1020}],1022:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar extendFlat = _dereq_('../../lib').extendFlat;\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\nvar fxAttrs = _dereq_('../../components/fx/attributes');\n\nvar INCREASING_COLOR = '#3D9970';\nvar DECREASING_COLOR = '#FF4136';\n\nvar lineAttrs = scatterAttrs.line;\n\nfunction directionAttrs(lineColorDefault) {\n    return {\n        line: {\n            color: extendFlat({}, lineAttrs.color, {dflt: lineColorDefault}),\n            width: lineAttrs.width,\n            dash: dash,\n            editType: 'style'\n        },\n        editType: 'style'\n    };\n}\n\nmodule.exports = {\n\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    open: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    high: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    low: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    close: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    line: {\n        width: extendFlat({}, lineAttrs.width, {\n            \n        }),\n        dash: extendFlat({}, dash, {\n            \n        }),\n        editType: 'style'\n    },\n\n    increasing: directionAttrs(INCREASING_COLOR),\n\n    decreasing: directionAttrs(DECREASING_COLOR),\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n\n    tickwidth: {\n        valType: 'number',\n        min: 0,\n        max: 0.5,\n        dflt: 0.3,\n        \n        editType: 'calc',\n        \n    },\n\n    hoverlabel: extendFlat({}, fxAttrs.hoverlabel, {\n        split: {\n            valType: 'boolean',\n            \n            dflt: false,\n            editType: 'style',\n            \n        }\n    }),\n};\n\n},{\"../../components/drawing/attributes\":600,\"../../components/fx/attributes\":610,\"../../lib\":703,\"../scatter/attributes\":1075}],1023:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar _ = Lib._;\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nfunction calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis);\n    var ya = Axes.getFromId(gd, trace.yaxis);\n\n    var tickLen = convertTickWidth(gd, xa, trace);\n    var minDiff = trace._minDiff;\n    trace._minDiff = null;\n    var x = trace._xcalc;\n    trace._xcalc = null;\n\n    var cd = calcCommon(gd, trace, x, ya, ptFunc);\n\n    trace._extremes[xa._id] = Axes.findExtremes(xa, x, {vpad: minDiff / 2});\n    if(cd.length) {\n        Lib.extendFlat(cd[0].t, {\n            wHover: minDiff / 2,\n            tickLen: tickLen\n        });\n        return cd;\n    } else {\n        return [{t: {empty: true}}];\n    }\n}\n\nfunction ptFunc(o, h, l, c) {\n    return {\n        o: o,\n        h: h,\n        l: l,\n        c: c\n    };\n}\n\n\n// shared between OHLC and candlestick\n// ptFunc makes a calcdata point specific to each trace type, from oi, hi, li, ci\nfunction calcCommon(gd, trace, x, ya, ptFunc) {\n    var o = ya.makeCalcdata(trace, 'open');\n    var h = ya.makeCalcdata(trace, 'high');\n    var l = ya.makeCalcdata(trace, 'low');\n    var c = ya.makeCalcdata(trace, 'close');\n\n    var hasTextArray = Array.isArray(trace.text);\n    var hasHovertextArray = Array.isArray(trace.hovertext);\n\n    // we're optimists - before we have any changing data, assume increasing\n    var increasing = true;\n    var cPrev = null;\n\n    var cd = [];\n    for(var i = 0; i < x.length; i++) {\n        var xi = x[i];\n        var oi = o[i];\n        var hi = h[i];\n        var li = l[i];\n        var ci = c[i];\n\n        if(xi !== BADNUM && oi !== BADNUM && hi !== BADNUM && li !== BADNUM && ci !== BADNUM) {\n            if(ci === oi) {\n                // if open == close, look for a change from the previous close\n                if(cPrev !== null && ci !== cPrev) increasing = ci > cPrev;\n                // else (c === cPrev or cPrev is null) no change\n            } else increasing = ci > oi;\n\n            cPrev = ci;\n\n            var pt = ptFunc(oi, hi, li, ci);\n\n            pt.pos = xi;\n            pt.yc = (oi + ci) / 2;\n            pt.i = i;\n            pt.dir = increasing ? 'increasing' : 'decreasing';\n\n            // For categoryorder, store low and high\n            pt.x = pt.pos;\n            pt.y = [li, hi];\n\n            if(hasTextArray) pt.tx = trace.text[i];\n            if(hasHovertextArray) pt.htx = trace.hovertext[i];\n\n            cd.push(pt);\n        } else {\n            cd.push({pos: xi, empty: true});\n        }\n    }\n\n    trace._extremes[ya._id] = Axes.findExtremes(ya, Lib.concat(l, h), {padded: true});\n\n    if(cd.length) {\n        cd[0].t = {\n            labels: {\n                open: _(gd, 'open:') + ' ',\n                high: _(gd, 'high:') + ' ',\n                low: _(gd, 'low:') + ' ',\n                close: _(gd, 'close:') + ' '\n            }\n        };\n    }\n\n    return cd;\n}\n\n/*\n * find min x-coordinates difference of all traces\n * attached to this x-axis and stash the result in _minDiff\n * in all traces; when a trace uses this in its\n * calc step it deletes _minDiff, so that next calc this is\n * done again in case the data changed.\n * also since we need it here, stash _xcalc on the trace\n */\nfunction convertTickWidth(gd, xa, trace) {\n    var minDiff = trace._minDiff;\n\n    if(!minDiff) {\n        var fullData = gd._fullData;\n        var ohlcTracesOnThisXaxis = [];\n\n        minDiff = Infinity;\n\n        var i;\n\n        for(i = 0; i < fullData.length; i++) {\n            var tracei = fullData[i];\n\n            if(tracei.type === 'ohlc' &&\n                tracei.visible === true &&\n                tracei.xaxis === xa._id\n            ) {\n                ohlcTracesOnThisXaxis.push(tracei);\n\n                var xcalc = xa.makeCalcdata(tracei, 'x');\n                tracei._xcalc = xcalc;\n\n                var _minDiff = Lib.distinctVals(xcalc).minDiff;\n                if(_minDiff && isFinite(_minDiff)) {\n                    minDiff = Math.min(minDiff, _minDiff);\n                }\n            }\n        }\n\n        // if minDiff is still Infinity here, set it to 1\n        if(minDiff === Infinity) minDiff = 1;\n\n        for(i = 0; i < ohlcTracesOnThisXaxis.length; i++) {\n            ohlcTracesOnThisXaxis[i]._minDiff = minDiff;\n        }\n    }\n\n    return minDiff * trace.tickwidth;\n}\n\nmodule.exports = {\n    calc: calc,\n    calcCommon: calcCommon\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751}],1024:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleOHLC = _dereq_('./ohlc_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleOHLC(traceIn, traceOut, coerce, layout);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('line.width');\n    coerce('line.dash');\n\n    handleDirection(traceIn, traceOut, coerce, 'increasing');\n    handleDirection(traceIn, traceOut, coerce, 'decreasing');\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('tickwidth');\n\n    layout._requestRangeslider[traceOut.xaxis] = true;\n};\n\nfunction handleDirection(traceIn, traceOut, coerce, direction) {\n    coerce(direction + '.line.color');\n    coerce(direction + '.line.width', traceOut.line.width);\n    coerce(direction + '.line.dash', traceOut.line.dash);\n}\n\n},{\"../../lib\":703,\"./attributes\":1022,\"./ohlc_defaults\":1027}],1025:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\nvar Fx = _dereq_('../../components/fx');\nvar Color = _dereq_('../../components/color');\nvar fillText = _dereq_('../../lib').fillText;\n\nvar DIRSYMBOL = {\n    increasing: '▲',\n    decreasing: '▼'\n};\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n\n    if(trace.hoverlabel.split) {\n        return hoverSplit(pointData, xval, yval, hovermode);\n    }\n\n    return hoverOnPoints(pointData, xval, yval, hovermode);\n}\n\nfunction getClosestPoint(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var xa = pointData.xa;\n    var trace = cd[0].trace;\n    var t = cd[0].t;\n\n    var type = trace.type;\n    var minAttr = type === 'ohlc' ? 'l' : 'min';\n    var maxAttr = type === 'ohlc' ? 'h' : 'max';\n\n    var hoverPseudoDistance, spikePseudoDistance;\n\n    // potentially shift xval for grouped candlesticks\n    var centerShift = t.bPos || 0;\n    var shiftPos = function(di) { return di.pos + centerShift - xval; };\n\n    // ohlc and candlestick call displayHalfWidth different things...\n    var displayHalfWidth = t.bdPos || t.tickLen;\n    var hoverHalfWidth = t.wHover;\n\n    // if two figures are overlaying, let the narrowest one win\n    var pseudoDistance = Math.min(1, displayHalfWidth / Math.abs(xa.r2c(xa.range[1]) - xa.r2c(xa.range[0])));\n    hoverPseudoDistance = pointData.maxHoverDistance - pseudoDistance;\n    spikePseudoDistance = pointData.maxSpikeDistance - pseudoDistance;\n\n    function dx(di) {\n        var pos = shiftPos(di);\n        return Fx.inbox(pos - hoverHalfWidth, pos + hoverHalfWidth, hoverPseudoDistance);\n    }\n\n    function dy(di) {\n        var min = di[minAttr];\n        var max = di[maxAttr];\n        return min === max || Fx.inbox(min - yval, max - yval, hoverPseudoDistance);\n    }\n\n    function dxy(di) { return (dx(di) + dy(di)) / 2; }\n\n    var distfn = Fx.getDistanceFunction(hovermode, dx, dy, dxy);\n    Fx.getClosest(cd, distfn, pointData);\n\n    if(pointData.index === false) return null;\n\n    var di = cd[pointData.index];\n\n    if(di.empty) return null;\n\n    var dir = di.dir;\n    var container = trace[dir];\n    var lc = container.line.color;\n\n    if(Color.opacity(lc) && container.line.width) pointData.color = lc;\n    else pointData.color = container.fillcolor;\n\n    pointData.x0 = xa.c2p(di.pos + centerShift - displayHalfWidth, true);\n    pointData.x1 = xa.c2p(di.pos + centerShift + displayHalfWidth, true);\n\n    pointData.xLabelVal = di.pos;\n\n    pointData.spikeDistance = dxy(di) * spikePseudoDistance / hoverPseudoDistance;\n    pointData.xSpike = xa.c2p(di.pos, true);\n\n    return pointData;\n}\n\nfunction hoverSplit(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var ya = pointData.ya;\n    var trace = cd[0].trace;\n    var t = cd[0].t;\n    var closeBoxData = [];\n\n    var closestPoint = getClosestPoint(pointData, xval, yval, hovermode);\n    // skip the rest (for this trace) if we didn't find a close point\n    if(!closestPoint) return [];\n\n    var cdIndex = closestPoint.index;\n    var di = cd[cdIndex];\n    var hoverinfo = di.hi || trace.hoverinfo;\n    var hoverParts = hoverinfo.split('+');\n    var isAll = hoverinfo === 'all';\n    var hasY = isAll || hoverParts.indexOf('y') !== -1;\n\n    // similar to hoverOnPoints, we return nothing\n    // if all or y is not present.\n    if(!hasY) return [];\n\n    var attrs = ['high', 'open', 'close', 'low'];\n\n    // several attributes can have the same y-coordinate. We will\n    // bunch them together in a single text block. For this, we keep\n    // a dictionary mapping y-coord -> point data.\n    var usedVals = {};\n\n    for(var i = 0; i < attrs.length; i++) {\n        var attr = attrs[i];\n\n        var val = trace[attr][closestPoint.index];\n        var valPx = ya.c2p(val, true);\n        var pointData2;\n        if(val in usedVals) {\n            pointData2 = usedVals[val];\n            pointData2.yLabel += '<br>' + t.labels[attr] + Axes.hoverLabelText(ya, val);\n        } else {\n            // copy out to a new object for each new y-value to label\n            pointData2 = Lib.extendFlat({}, closestPoint);\n\n            pointData2.y0 = pointData2.y1 = valPx;\n            pointData2.yLabelVal = val;\n            pointData2.yLabel = t.labels[attr] + Axes.hoverLabelText(ya, val);\n\n            pointData2.name = '';\n\n            closeBoxData.push(pointData2);\n            usedVals[val] = pointData2;\n        }\n    }\n\n    return closeBoxData;\n}\n\nfunction hoverOnPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var ya = pointData.ya;\n    var trace = cd[0].trace;\n    var t = cd[0].t;\n\n    var closestPoint = getClosestPoint(pointData, xval, yval, hovermode);\n    // skip the rest (for this trace) if we didn't find a close point\n    if(!closestPoint) return [];\n\n    // we don't make a calcdata point if we're missing any piece (x/o/h/l/c)\n    // so we need to fix the index here to point to the data arrays\n    var cdIndex = closestPoint.index;\n    var di = cd[cdIndex];\n    var i = closestPoint.index = di.i;\n    var dir = di.dir;\n\n    function getLabelLine(attr) {\n        return t.labels[attr] + Axes.hoverLabelText(ya, trace[attr][i]);\n    }\n\n    var hoverinfo = di.hi || trace.hoverinfo;\n    var hoverParts = hoverinfo.split('+');\n    var isAll = hoverinfo === 'all';\n    var hasY = isAll || hoverParts.indexOf('y') !== -1;\n    var hasText = isAll || hoverParts.indexOf('text') !== -1;\n\n    var textParts = hasY ? [\n        getLabelLine('open'),\n        getLabelLine('high'),\n        getLabelLine('low'),\n        getLabelLine('close') + '  ' + DIRSYMBOL[dir]\n    ] : [];\n    if(hasText) fillText(di, trace, textParts);\n\n    // don't make .yLabelVal or .text, since we're managing hoverinfo\n    // put it all in .extraText\n    closestPoint.extraText = textParts.join('<br>');\n\n    // this puts the label *and the spike* at the midpoint of the box, ie\n    // halfway between open and close, not between high and low.\n    closestPoint.y0 = closestPoint.y1 = ya.c2p(di.yc, true);\n\n    return [closestPoint];\n}\n\nmodule.exports = {\n    hoverPoints: hoverPoints,\n    hoverSplit: hoverSplit,\n    hoverOnPoints: hoverOnPoints\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../lib\":703,\"../../plots/cartesian/axes\":751}],1026:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'ohlc',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'showLegend'],\n    meta: {\n        \n    },\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc').calc,\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style'),\n    hoverPoints: _dereq_('./hover').hoverPoints,\n    selectPoints: _dereq_('./select')\n};\n\n},{\"../../plots/cartesian\":762,\"./attributes\":1022,\"./calc\":1023,\"./defaults\":1024,\"./hover\":1025,\"./plot\":1028,\"./select\":1029,\"./style\":1030}],1027:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function handleOHLC(traceIn, traceOut, coerce, layout) {\n    var x = coerce('x');\n    var open = coerce('open');\n    var high = coerce('high');\n    var low = coerce('low');\n    var close = coerce('close');\n\n    coerce('hoverlabel.split');\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x'], layout);\n\n    if(!(open && high && low && close)) return;\n\n    var len = Math.min(open.length, high.length, low.length, close.length);\n    if(x) len = Math.min(len, Lib.minRowLength(x));\n    traceOut._length = len;\n\n    return len;\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],1028:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function plot(gd, plotinfo, cdOHLC, ohlcLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(ohlcLayer, cdOHLC, 'trace ohlc').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var t = cd0.t;\n        var trace = cd0.trace;\n        if(!plotinfo.isRangePlot) cd0.node3 = plotGroup;\n\n        if(trace.visible !== true || t.empty) {\n            plotGroup.remove();\n            return;\n        }\n\n        var tickLen = t.tickLen;\n\n        var paths = plotGroup.selectAll('path').data(Lib.identity);\n\n        paths.enter().append('path');\n\n        paths.exit().remove();\n\n        paths.attr('d', function(d) {\n            if(d.empty) return 'M0,0Z';\n\n            var x = xa.c2p(d.pos, true);\n            var xo = xa.c2p(d.pos - tickLen, true);\n            var xc = xa.c2p(d.pos + tickLen, true);\n\n            var yo = ya.c2p(d.o, true);\n            var yh = ya.c2p(d.h, true);\n            var yl = ya.c2p(d.l, true);\n            var yc = ya.c2p(d.c, true);\n\n            return 'M' + xo + ',' + yo + 'H' + x +\n                'M' + x + ',' + yh + 'V' + yl +\n                'M' + xc + ',' + yc + 'H' + x;\n        });\n    });\n};\n\n},{\"../../lib\":703,\"d3\":157}],1029:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n    var i;\n    // for (potentially grouped) candlesticks\n    var posOffset = cd[0].t.bPos || 0;\n\n    if(selectionTester === false) {\n        // clear selection\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            var di = cd[i];\n\n            if(selectionTester.contains([xa.c2p(di.pos + posOffset), ya.c2p(di.yc)], null, di.i, searchInfo)) {\n                selection.push({\n                    pointNumber: di.i,\n                    x: xa.c2d(di.pos),\n                    y: ya.c2d(di.yc)\n                });\n                di.selected = 1;\n            } else {\n                di.selected = 0;\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{}],1030:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Drawing = _dereq_('../../components/drawing');\nvar Color = _dereq_('../../components/color');\n\nmodule.exports = function style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.ohlclayer').selectAll('g.trace');\n\n    s.style('opacity', function(d) {\n        return d[0].trace.opacity;\n    });\n\n    s.each(function(d) {\n        var trace = d[0].trace;\n\n        d3.select(this).selectAll('path').each(function(di) {\n            if(di.empty) return;\n\n            var dirLine = trace[di.dir].line;\n            d3.select(this)\n                .style('fill', 'none')\n                .call(Color.stroke, dirLine.color)\n                .call(Drawing.dashLine, dirLine.dash, dirLine.width)\n                // TODO: custom selection style for OHLC\n                .style('opacity', trace.selectedpoints && !di.selected ? 0.3 : 1);\n        });\n    });\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"d3\":157}],1031:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\n\nvar line = extendFlat(\n    {editType: 'calc'},\n    colorScaleAttrs('line', {editTypeOverride: 'calc'}),\n    {\n        shape: {\n            valType: 'enumerated',\n            values: ['linear', 'hspline'],\n            dflt: 'linear',\n            \n            editType: 'plot',\n            \n        },\n\n        hovertemplate: hovertemplateAttrs({\n            editType: 'plot',\n            arrayOk: false\n        }, {\n            keys: ['count', 'probability'],\n            \n        })\n    }\n);\n\nmodule.exports = {\n    domain: domainAttrs({name: 'parcats', trace: true, editType: 'calc'}),\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['count', 'probability'],\n        editType: 'plot',\n        arrayOk: false\n    }),\n    hoveron: {\n        valType: 'enumerated',\n        values: ['category', 'color', 'dimension'],\n        dflt: 'category',\n        \n        editType: 'plot',\n        \n    },\n    hovertemplate: hovertemplateAttrs({\n        editType: 'plot',\n        arrayOk: false\n    }, {\n        keys: [\n            'count', 'probability', 'category',\n            'categorycount', 'colorcount', 'bandcolorcount'\n        ],\n        \n    }),\n\n    arrangement: {\n        valType: 'enumerated',\n        values: ['perpendicular', 'freeform', 'fixed'],\n        dflt: 'perpendicular',\n        \n        editType: 'plot',\n        \n    },\n    bundlecolors: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'plot',\n        \n    },\n    sortpaths: {\n        valType: 'enumerated',\n        values: ['forward', 'backward'],\n        dflt: 'forward',\n        \n        editType: 'plot',\n        \n    },\n    labelfont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n\n    tickfont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n\n    dimensions: {\n        _isLinkedToArray: 'dimension',\n        label: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        categoryorder: {\n            valType: 'enumerated',\n            values: [\n                'trace', 'category ascending', 'category descending', 'array'\n            ],\n            dflt: 'trace',\n            \n            editType: 'calc',\n            \n        },\n        categoryarray: {\n            valType: 'data_array',\n            \n            editType: 'calc',\n            \n        },\n        ticktext: {\n            valType: 'data_array',\n            \n            editType: 'calc',\n            \n        },\n        values: {\n            valType: 'data_array',\n            \n            dflt: [],\n            editType: 'calc',\n            \n        },\n        displayindex: {\n            valType: 'integer',\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc',\n        \n        visible: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'calc',\n            \n        }\n    },\n\n    line: line,\n    counts: {\n        valType: 'number',\n        min: 0,\n        dflt: 1,\n        arrayOk: true,\n        \n        editType: 'calc',\n        \n    },\n\n    // Hide unsupported top-level properties from plot-schema\n    customdata: undefined,\n    hoverlabel: undefined,\n    ids: undefined,\n    legendgroup: undefined,\n    opacity: undefined,\n    selectedpoints: undefined,\n    showlegend: undefined\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../../plots/domain\":776,\"../../plots/font_attributes\":777}],1032:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\nvar parcatsPlot = _dereq_('./plot');\n\nvar PARCATS = 'parcats';\nexports.name = PARCATS;\n\nexports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {\n    var cdModuleAndOthers = getModuleCalcData(gd.calcdata, PARCATS);\n\n    if(cdModuleAndOthers.length) {\n        var calcData = cdModuleAndOthers[0];\n        parcatsPlot(gd, calcData, transitionOpts, makeOnCompleteCallback);\n    }\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadTable = (oldFullLayout._has && oldFullLayout._has('parcats'));\n    var hasTable = (newFullLayout._has && newFullLayout._has('parcats'));\n\n    if(hadTable && !hasTable) {\n        oldFullLayout._paperdiv.selectAll('.parcats').remove();\n    }\n};\n\n},{\"../../plots/get_data\":786,\"./plot\":1037}],1033:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n// Requirements\n// ============\nvar wrap = _dereq_('../../lib/gup').wrap;\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\nvar filterUnique = _dereq_('../../lib/filter_unique.js');\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\n\n/**\n * Create a wrapped ParcatsModel object from trace\n *\n * Note: trace defaults have already been applied\n * @param {Object} gd\n * @param {Object} trace\n * @return {Array.<ParcatsModel>}\n */\nmodule.exports = function calc(gd, trace) {\n    var visibleDims = Lib.filterVisible(trace.dimensions);\n\n    if(visibleDims.length === 0) return [];\n\n    var uniqueInfoDims = visibleDims.map(function(dim) {\n        var categoryValues;\n        if(dim.categoryorder === 'trace') {\n            // Use order of first occurrence in trace\n            categoryValues = null;\n        } else if(dim.categoryorder === 'array') {\n            // Use categories specified in `categoryarray` first,\n            // then add extra to the end in trace order\n            categoryValues = dim.categoryarray;\n        } else {\n            // Get all categories up front so we can order them\n            // Should we check for numbers as sort numerically?\n            categoryValues = filterUnique(dim.values).sort();\n            if(dim.categoryorder === 'category descending') {\n                categoryValues = categoryValues.reverse();\n            }\n        }\n        return getUniqueInfo(dim.values, categoryValues);\n    });\n\n    var counts,\n        count,\n        totalCount;\n    if(Lib.isArrayOrTypedArray(trace.counts)) {\n        counts = trace.counts;\n    } else {\n        counts = [trace.counts];\n    }\n\n    validateDimensionDisplayInds(visibleDims);\n\n    visibleDims.forEach(function(dim, dimInd) {\n        validateCategoryProperties(dim, uniqueInfoDims[dimInd]);\n    });\n\n    // Handle path colors\n    // ------------------\n    var line = trace.line;\n    var markerColorscale;\n\n    // Process colorscale\n    if(line) {\n        if(hasColorscale(trace, 'line')) {\n            colorscaleCalc(gd, trace, {\n                vals: trace.line.color,\n                containerStr: 'line',\n                cLetter: 'c'\n            });\n        }\n        markerColorscale = Drawing.tryColorscale(line);\n    } else {\n        markerColorscale = Lib.identity;\n    }\n\n    // Build color generation function\n    function getMarkerColorInfo(index) {\n        var value;\n        if(Lib.isArrayOrTypedArray(line.color)) {\n            value = line.color[index % line.color.length];\n        } else {\n            value = line.color;\n        }\n\n        return {color: markerColorscale(value), rawColor: value};\n    }\n\n    // Number of values and counts\n    // ---------------------------\n    var numValues = visibleDims[0].values.length;\n\n    // Build path info\n    // ---------------\n    // Mapping from category inds to PathModel objects\n    var pathModels = {};\n\n    // Category inds array for each dimension\n    var categoryIndsDims = uniqueInfoDims.map(function(di) {return di.inds;});\n\n    // Initialize total count\n    totalCount = 0;\n    var valueInd;\n    var d;\n\n    for(valueInd = 0; valueInd < numValues; valueInd++) {\n        // Category inds for this input value across dimensions\n        var categoryIndsPath = [];\n        for(d = 0; d < categoryIndsDims.length; d++) {\n            categoryIndsPath.push(categoryIndsDims[d][valueInd]);\n        }\n\n        // Count\n        count = counts[valueInd % counts.length];\n\n        // Update total count\n        totalCount += count;\n\n        // Path color\n        var pathColorInfo = getMarkerColorInfo(valueInd);\n\n        // path key\n        var pathKey = categoryIndsPath + '-' + pathColorInfo.rawColor;\n\n        // Create / Update PathModel\n        if(pathModels[pathKey] === undefined) {\n            pathModels[pathKey] = createPathModel(categoryIndsPath,\n                pathColorInfo.color,\n                pathColorInfo.rawColor);\n        }\n        updatePathModel(pathModels[pathKey], valueInd, count);\n    }\n\n    var dimensionModels = visibleDims.map(function(di, i) {\n        return createDimensionModel(i, di._index, di._displayindex, di.label, totalCount);\n    });\n\n\n    for(valueInd = 0; valueInd < numValues; valueInd++) {\n        count = counts[valueInd % counts.length];\n\n        for(d = 0; d < dimensionModels.length; d++) {\n            var containerInd = dimensionModels[d].containerInd;\n            var catInd = uniqueInfoDims[d].inds[valueInd];\n            var cats = dimensionModels[d].categories;\n\n            if(cats[catInd] === undefined) {\n                var catValue = trace.dimensions[containerInd]._categoryarray[catInd];\n                var catLabel = trace.dimensions[containerInd]._ticktext[catInd];\n                cats[catInd] = createCategoryModel(d, catInd, catValue, catLabel);\n            }\n\n            updateCategoryModel(cats[catInd], valueInd, count);\n        }\n    }\n\n    // Compute unique\n    return wrap(createParcatsModel(dimensionModels, pathModels, totalCount));\n};\n\n// Models\n// ======\n\n// Parcats Model\n// -------------\n/**\n * @typedef {Object} ParcatsModel\n *  Object containing calculated information about a parcats trace\n *\n * @property {Array.<DimensionModel>} dimensions\n *  Array of dimension models\n * @property {Object.<string,PathModel>} paths\n *  Dictionary from category inds string (e.g. \"1,2,1,1\") to path model\n * @property {Number} maxCats\n *  The maximum number of categories of any dimension in the diagram\n * @property {Number} count\n *  Total number of input values\n * @property {Object} trace\n */\n\n/**\n * Create and new ParcatsModel object\n * @param {Array.<DimensionModel>} dimensions\n * @param {Object.<string,PathModel>} paths\n * @param {Number} count\n * @return {ParcatsModel}\n */\nfunction createParcatsModel(dimensions, paths, count) {\n    var maxCats = dimensions\n        .map(function(d) {return d.categories.length;})\n        .reduce(function(v1, v2) {return Math.max(v1, v2);});\n    return {dimensions: dimensions, paths: paths, trace: undefined, maxCats: maxCats, count: count};\n}\n\n// Dimension Model\n// ---------------\n/**\n * @typedef {Object} DimensionModel\n *  Object containing calculated information about a single dimension\n *\n * @property {Number} dimensionInd\n *  The index of this dimension among the *visible* dimensions\n * @property {Number} containerInd\n *  The index of this dimension in the original dimensions container,\n *  irrespective of dimension visibility\n * @property {Number} displayInd\n *  The display index of this dimension (where 0 is the left most dimension)\n * @property {String} dimensionLabel\n *  The label of this dimension\n * @property {Number} count\n *  Total number of input values\n * @property {Array.<CategoryModel>} categories\n * @property {Number|null} dragX\n *  The x position of dimension that is currently being dragged. null if not being dragged\n */\n\n/**\n * Create and new DimensionModel object with an empty categories array\n * @param {Number} dimensionInd\n * @param {Number} containerInd\n * @param {Number} displayInd\n * @param {String} dimensionLabel\n * @param {Number} count\n *  Total number of input values\n * @return {DimensionModel}\n */\nfunction createDimensionModel(dimensionInd, containerInd, displayInd, dimensionLabel, count) {\n    return {\n        dimensionInd: dimensionInd,\n        containerInd: containerInd,\n        displayInd: displayInd,\n        dimensionLabel: dimensionLabel,\n        count: count,\n        categories: [],\n        dragX: null\n    };\n}\n\n// Category Model\n// --------------\n/**\n * @typedef {Object} CategoryModel\n *  Object containing calculated information about a single category.\n *\n * @property {Number} dimensionInd\n *  The index of this categories dimension\n * @property {Number} categoryInd\n *  The index of this category\n * @property {Number} displayInd\n *  The display index of this category (where 0 is the topmost category)\n * @property {String} categoryLabel\n *  The name of this category\n * @property categoryValue: Raw value of the category\n * @property {Array} valueInds\n *  Array of indices (into the original value array) of all samples in this category\n * @property {Number} count\n *  The number of elements from the original array in this path\n * @property {Number|null} dragY\n *  The y position of category that is currently being dragged. null if not being dragged\n */\n\n/**\n * Create and return a new CategoryModel object\n * @param {Number} dimensionInd\n * @param {Number} categoryInd\n *  The display index of this category (where 0 is the topmost category)\n * @param {String} categoryValue\n * @param {String} categoryLabel\n * @return {CategoryModel}\n */\nfunction createCategoryModel(dimensionInd, categoryInd, categoryValue, categoryLabel) {\n    return {\n        dimensionInd: dimensionInd,\n        categoryInd: categoryInd,\n        categoryValue: categoryValue,\n        displayInd: categoryInd,\n        categoryLabel: categoryLabel,\n        valueInds: [],\n        count: 0,\n        dragY: null\n    };\n}\n\n/**\n * Update a CategoryModel object with a new value index\n * Note: The calling parameter is modified in place.\n *\n * @param {CategoryModel} categoryModel\n * @param {Number} valueInd\n * @param {Number} count\n */\nfunction updateCategoryModel(categoryModel, valueInd, count) {\n    categoryModel.valueInds.push(valueInd);\n    categoryModel.count += count;\n}\n\n\n// Path Model\n// ----------\n/**\n * @typedef {Object} PathModel\n *  Object containing calculated information about the samples in a path.\n *\n * @property {Array} categoryInds\n *  Array of category indices for each dimension (length `numDimensions`)\n * @param {String} pathColor\n *  Color of this path. (Note: Any colorscaling has already taken place)\n * @property {Array} valueInds\n *  Array of indices (into the original value array) of all samples in this path\n * @property {Number} count\n *  The number of elements from the original array in this path\n * @property {String} color\n *  The path's color (ass CSS color string)\n * @property rawColor\n *  The raw color value specified by the user. May be a CSS color string or a Number\n */\n\n/**\n * Create and return a new PathModel object\n * @param {Array} categoryInds\n * @param color\n * @param rawColor\n * @return {PathModel}\n */\nfunction createPathModel(categoryInds, color, rawColor) {\n    return {\n        categoryInds: categoryInds,\n        color: color,\n        rawColor: rawColor,\n        valueInds: [],\n        count: 0\n    };\n}\n\n/**\n * Update a PathModel object with a new value index\n * Note: The calling parameter is modified in place.\n *\n * @param {PathModel} pathModel\n * @param {Number} valueInd\n * @param {Number} count\n */\nfunction updatePathModel(pathModel, valueInd, count) {\n    pathModel.valueInds.push(valueInd);\n    pathModel.count += count;\n}\n\n// Unique calculations\n// ===================\n/**\n * @typedef {Object} UniqueInfo\n *  Object containing information about the unique values of an input array\n *\n * @property {Array} uniqueValues\n *  The unique values in the input array\n * @property {Array} uniqueCounts\n *  The number of times each entry in uniqueValues occurs in input array.\n *  This has the same length as `uniqueValues`\n * @property {Array} inds\n *  Indices into uniqueValues that would reproduce original input array\n */\n\n/**\n * Compute unique value information for an array\n *\n * IMPORTANT: Note that values are considered unique\n * if their string representations are unique.\n *\n * @param {Array} values\n * @param {Array|undefined} uniqueValues\n *  Array of expected unique values. The uniqueValues property of the resulting UniqueInfo object will begin with\n *  these entries. Entries are included even if there are zero occurrences in the values array. Entries found in\n *  the values array that are not present in uniqueValues will be included at the end of the array in the\n *  UniqueInfo object.\n * @return {UniqueInfo}\n */\nfunction getUniqueInfo(values, uniqueValues) {\n    // Initialize uniqueValues if not specified\n    if(uniqueValues === undefined || uniqueValues === null) {\n        uniqueValues = [];\n    } else {\n        // Shallow copy so append below doesn't alter input array\n        uniqueValues = uniqueValues.map(function(e) {return e;});\n    }\n\n    // Initialize Variables\n    var uniqueValueCounts = {};\n    var uniqueValueInds = {};\n    var inds = [];\n\n    // Initialize uniqueValueCounts and\n    uniqueValues.forEach(function(uniqueVal, valInd) {\n        uniqueValueCounts[uniqueVal] = 0;\n        uniqueValueInds[uniqueVal] = valInd;\n    });\n\n    // Compute the necessary unique info in a single pass\n    for(var i = 0; i < values.length; i++) {\n        var item = values[i];\n        var itemInd;\n\n        if(uniqueValueCounts[item] === undefined) {\n            // This item has a previously unseen value\n            uniqueValueCounts[item] = 1;\n            itemInd = uniqueValues.push(item) - 1;\n            uniqueValueInds[item] = itemInd;\n        } else {\n            // Increment count for this item\n            uniqueValueCounts[item]++;\n            itemInd = uniqueValueInds[item];\n        }\n        inds.push(itemInd);\n    }\n\n    // Build UniqueInfo\n    var uniqueCounts = uniqueValues.map(function(v) { return uniqueValueCounts[v]; });\n\n    return {\n        uniqueValues: uniqueValues,\n        uniqueCounts: uniqueCounts,\n        inds: inds\n    };\n}\n\n\n/**\n * Validate the requested display order for the dimensions.\n * If the display order is a permutation of 0 through dimensions.length - 1, link to _displayindex\n * Otherwise, replace the display order with the dimension order\n * @param {Object} trace\n */\nfunction validateDimensionDisplayInds(visibleDims) {\n    var displayInds = visibleDims.map(function(d) { return d.displayindex; });\n    var i;\n\n    if(isRangePermutation(displayInds)) {\n        for(i = 0; i < visibleDims.length; i++) {\n            visibleDims[i]._displayindex = visibleDims[i].displayindex;\n        }\n    } else {\n        for(i = 0; i < visibleDims.length; i++) {\n            visibleDims[i]._displayindex = i;\n        }\n    }\n}\n\n\n/**\n * Update category properties based on the unique values found for this dimension\n * @param {Object} dim\n * @param {UniqueInfo} uniqueInfoDim\n */\nfunction validateCategoryProperties(dim, uniqueInfoDim) {\n    // Update categoryarray\n    dim._categoryarray = uniqueInfoDim.uniqueValues;\n\n    // Handle ticktext\n    if(dim.ticktext === null || dim.ticktext === undefined) {\n        dim._ticktext = [];\n    } else {\n        // Shallow copy to avoid modifying input array\n        dim._ticktext = dim.ticktext.slice();\n    }\n\n    // Extend ticktext with elements from uniqueInfoDim.uniqueValues\n    for(var i = dim._ticktext.length; i < uniqueInfoDim.uniqueValues.length; i++) {\n        dim._ticktext.push(uniqueInfoDim.uniqueValues[i]);\n    }\n}\n\n/**\n * Determine whether an array contains a permutation of the integers from 0 to the array's length - 1\n * @param {Array} inds\n * @return {boolean}\n */\nfunction isRangePermutation(inds) {\n    var indsSpecified = new Array(inds.length);\n\n    for(var i = 0; i < inds.length; i++) {\n        // Check for out of bounds\n        if(inds[i] < 0 || inds[i] >= inds.length) {\n            return false;\n        }\n\n        // Check for collisions with already specified index\n        if(indsSpecified[inds[i]] !== undefined) {\n            return false;\n        }\n\n        indsSpecified[inds[i]] = true;\n    }\n\n    // Nothing out of bounds and no collisions. We have a permutation\n    return true;\n}\n\n},{\"../../components/colorscale/calc\":588,\"../../components/colorscale/helpers\":591,\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/filter_unique.js\":694,\"../../lib/gup\":701}],1034:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar mergeLength = _dereq_('../parcoords/merge_length');\n\nfunction handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) {\n    coerce('line.shape');\n    coerce('line.hovertemplate');\n\n    var lineColor = coerce('line.color', layout.colorway[0]);\n    if(hasColorscale(traceIn, 'line') && Lib.isArrayOrTypedArray(lineColor)) {\n        if(lineColor.length) {\n            coerce('line.colorscale');\n            colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'line.', cLetter: 'c'});\n            return lineColor.length;\n        } else {\n            traceOut.line.color = defaultColor;\n        }\n    }\n    return Infinity;\n}\n\nfunction dimensionDefaults(dimensionIn, dimensionOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(dimensionIn, dimensionOut, attributes.dimensions, attr, dflt);\n    }\n\n    var values = coerce('values');\n    var visible = coerce('visible');\n    if(!(values && values.length)) {\n        visible = dimensionOut.visible = false;\n    }\n\n    if(visible) {\n        // Dimension level\n        coerce('label');\n        coerce('displayindex', dimensionOut._index);\n\n        // Category level\n        var arrayIn = dimensionIn.categoryarray;\n        var isValidArray = (Array.isArray(arrayIn) && arrayIn.length > 0);\n\n        var orderDefault;\n        if(isValidArray) orderDefault = 'array';\n        var order = coerce('categoryorder', orderDefault);\n\n        // coerce 'categoryarray' only in array order case\n        if(order === 'array') {\n            coerce('categoryarray');\n            coerce('ticktext');\n        } else {\n            delete dimensionIn.categoryarray;\n            delete dimensionIn.ticktext;\n        }\n\n        // cannot set 'categoryorder' to 'array' with an invalid 'categoryarray'\n        if(!isValidArray && order === 'array') {\n            dimensionOut.categoryorder = 'trace';\n        }\n    }\n}\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var dimensions = handleArrayContainerDefaults(traceIn, traceOut, {\n        name: 'dimensions',\n        handleItemDefaults: dimensionDefaults\n    });\n\n    var len = handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    if(!Array.isArray(dimensions) || !dimensions.length) {\n        traceOut.visible = false;\n    }\n\n    mergeLength(traceOut, dimensions, 'values', len);\n\n    coerce('hoveron');\n    coerce('hovertemplate');\n    coerce('arrangement');\n    coerce('bundlecolors');\n    coerce('sortpaths');\n    coerce('counts');\n\n    var labelfontDflt = {\n        family: layout.font.family,\n        size: Math.round(layout.font.size),\n        color: layout.font.color\n    };\n\n    Lib.coerceFont(coerce, 'labelfont', labelfontDflt);\n\n    var categoryfontDefault = {\n        family: layout.font.family,\n        size: Math.round(layout.font.size / 1.2),\n        color: layout.font.color\n    };\n\n    Lib.coerceFont(coerce, 'tickfont', categoryfontDefault);\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../components/colorscale/helpers\":591,\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/domain\":776,\"../parcoords/merge_length\":1046,\"./attributes\":1031}],1035:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    colorbar: {\n        container: 'line',\n        min: 'cmin',\n        max: 'cmax'\n    },\n\n    moduleType: 'trace',\n    name: 'parcats',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['noOpacity'],\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1031,\"./base_plot\":1032,\"./calc\":1033,\"./defaults\":1034,\"./plot\":1037}],1036:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Plotly = _dereq_('../../plot_api/plot_api');\nvar Fx = _dereq_('../../components/fx');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar tinycolor = _dereq_('tinycolor2');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\n\nfunction performPlot(parcatsModels, graphDiv, layout, svg) {\n    var viewModels = parcatsModels.map(createParcatsViewModel.bind(0, graphDiv, layout));\n\n    // Get (potentially empty) parcatslayer selection with bound data to single element array\n    var layerSelection = svg.selectAll('g.parcatslayer').data([null]);\n\n    // Initialize single parcatslayer group if it doesn't exist\n    layerSelection.enter()\n        .append('g')\n        .attr('class', 'parcatslayer')\n        .style('pointer-events', 'all');\n\n    // Bind data to children of layerSelection and get reference to traceSelection\n    var traceSelection = layerSelection\n        .selectAll('g.trace.parcats')\n        .data(viewModels, key);\n\n    // Initialize group for each trace/dimensions\n    var traceEnter = traceSelection.enter()\n        .append('g')\n        .attr('class', 'trace parcats');\n\n    // Update properties for each trace\n    traceSelection\n        .attr('transform', function(d) {\n            return 'translate(' + d.x + ', ' + d.y + ')';\n        });\n\n    // Initialize paths group\n    traceEnter\n        .append('g')\n        .attr('class', 'paths');\n\n    // Update paths transform\n    var pathsSelection = traceSelection\n        .select('g.paths');\n\n    // Get paths selection\n    var pathSelection = pathsSelection\n        .selectAll('path.path')\n        .data(function(d) {\n            return d.paths;\n        }, key);\n\n    // Update existing path colors\n    pathSelection\n        .attr('fill', function(d) {\n            return d.model.color;\n        });\n\n    // Create paths\n    var pathSelectionEnter = pathSelection\n        .enter()\n        .append('path')\n        .attr('class', 'path')\n        .attr('stroke-opacity', 0)\n        .attr('fill', function(d) {\n            return d.model.color;\n        })\n        .attr('fill-opacity', 0);\n\n    stylePathsNoHover(pathSelectionEnter);\n\n    // Set path geometry\n    pathSelection\n        .attr('d', function(d) {\n            return d.svgD;\n        });\n\n    // sort paths\n    if(!pathSelectionEnter.empty()) {\n        // Only sort paths if there has been a change.\n        // Otherwise paths are already sorted or a hover operation may be in progress\n        pathSelection.sort(compareRawColor);\n    }\n\n    // Remove any old paths\n    pathSelection.exit().remove();\n\n    // Path hover\n    pathSelection\n        .on('mouseover', mouseoverPath)\n        .on('mouseout', mouseoutPath)\n        .on('click', clickPath);\n\n    // Initialize dimensions group\n    traceEnter.append('g').attr('class', 'dimensions');\n\n    // Update dimensions transform\n    var dimensionsSelection = traceSelection\n        .select('g.dimensions');\n\n    // Get dimension selection\n    var dimensionSelection = dimensionsSelection\n        .selectAll('g.dimension')\n        .data(function(d) {\n            return d.dimensions;\n        }, key);\n\n    // Create dimension groups\n    dimensionSelection.enter()\n        .append('g')\n        .attr('class', 'dimension');\n\n    // Update dimension group transforms\n    dimensionSelection.attr('transform', function(d) {\n        return 'translate(' + d.x + ', 0)';\n    });\n\n    // Remove any old dimensions\n    dimensionSelection.exit().remove();\n\n    // Get category selection\n    var categorySelection = dimensionSelection\n        .selectAll('g.category')\n        .data(function(d) {\n            return d.categories;\n        }, key);\n\n    // Initialize category groups\n    var categoryGroupEnterSelection = categorySelection\n        .enter()\n        .append('g')\n        .attr('class', 'category');\n\n    // Update category transforms\n    categorySelection\n        .attr('transform', function(d) {\n            return 'translate(0, ' + d.y + ')';\n        });\n\n\n    // Initialize rectangle\n    categoryGroupEnterSelection\n        .append('rect')\n        .attr('class', 'catrect')\n        .attr('pointer-events', 'none');\n\n\n    // Update rectangle\n    categorySelection.select('rect.catrect')\n        .attr('fill', 'none')\n        .attr('width', function(d) {\n            return d.width;\n        })\n        .attr('height', function(d) {\n            return d.height;\n        });\n\n    styleCategoriesNoHover(categoryGroupEnterSelection);\n\n    // Initialize color band rects\n    var bandSelection = categorySelection\n        .selectAll('rect.bandrect')\n        .data(\n            /** @param {CategoryViewModel} catViewModel*/\n            function(catViewModel) {\n                return catViewModel.bands;\n            }, key);\n\n    // Raise all update bands to the top so that fading enter/exit bands will be behind\n    bandSelection.each(function() {Lib.raiseToTop(this);});\n\n    // Update band color\n    bandSelection\n        .attr('fill', function(d) {\n            return d.color;\n        });\n\n    var bandsSelectionEnter = bandSelection.enter()\n        .append('rect')\n        .attr('class', 'bandrect')\n        .attr('stroke-opacity', 0)\n        .attr('fill', function(d) {\n            return d.color;\n        })\n        .attr('fill-opacity', 0);\n\n    bandSelection\n        .attr('fill', function(d) {\n            return d.color;\n        })\n        .attr('width', function(d) {\n            return d.width;\n        })\n        .attr('height', function(d) {\n            return d.height;\n        })\n        .attr('y', function(d) {\n            return d.y;\n        })\n        .attr('cursor',\n            /** @param {CategoryBandViewModel} bandModel*/\n            function(bandModel) {\n                if(bandModel.parcatsViewModel.arrangement === 'fixed') {\n                    return 'default';\n                } else if(bandModel.parcatsViewModel.arrangement === 'perpendicular') {\n                    return 'ns-resize';\n                } else {\n                    return 'move';\n                }\n            });\n\n    styleBandsNoHover(bandsSelectionEnter);\n\n    bandSelection.exit().remove();\n\n    // Initialize category label\n    categoryGroupEnterSelection\n        .append('text')\n        .attr('class', 'catlabel')\n        .attr('pointer-events', 'none');\n\n    var paperColor = graphDiv._fullLayout.paper_bgcolor;\n\n    // Update category label\n    categorySelection.select('text.catlabel')\n        .attr('text-anchor',\n            function(d) {\n                if(catInRightDim(d)) {\n                    // Place label to the right of category\n                    return 'start';\n                } else {\n                    // Place label to the left of category\n                    return 'end';\n                }\n            })\n        .attr('alignment-baseline', 'middle')\n\n        .style('text-shadow',\n            paperColor + ' -1px  1px 2px, ' +\n            paperColor + ' 1px  1px 2px, ' +\n            paperColor + '  1px -1px 2px, ' +\n            paperColor + ' -1px -1px 2px')\n        .style('fill', 'rgb(0, 0, 0)')\n        .attr('x',\n            function(d) {\n                if(catInRightDim(d)) {\n                    // Place label to the right of category\n                    return d.width + 5;\n                } else {\n                    // Place label to the left of category\n                    return -5;\n                }\n            })\n        .attr('y', function(d) {\n            return d.height / 2;\n        })\n        .text(function(d) {\n            return d.model.categoryLabel;\n        })\n        .each(\n            /** @param {CategoryViewModel} catModel*/\n            function(catModel) {\n                Drawing.font(d3.select(this), catModel.parcatsViewModel.categorylabelfont);\n                svgTextUtils.convertToTspans(d3.select(this), graphDiv);\n            });\n\n    // Initialize dimension label\n    categoryGroupEnterSelection\n        .append('text')\n        .attr('class', 'dimlabel');\n\n    // Update dimension label\n    categorySelection.select('text.dimlabel')\n        .attr('text-anchor', 'middle')\n        .attr('alignment-baseline', 'baseline')\n        .attr('cursor',\n             /** @param {CategoryViewModel} catModel*/\n            function(catModel) {\n                if(catModel.parcatsViewModel.arrangement === 'fixed') {\n                    return 'default';\n                } else {\n                    return 'ew-resize';\n                }\n            })\n        .attr('x', function(d) {\n            return d.width / 2;\n        })\n        .attr('y', -5)\n        .text(function(d, i) {\n            if(i === 0) {\n                // Add dimension label above topmost category\n                return d.parcatsViewModel.model.dimensions[d.model.dimensionInd].dimensionLabel;\n            } else {\n                return null;\n            }\n        })\n        .each(\n            /** @param {CategoryViewModel} catModel*/\n            function(catModel) {\n                Drawing.font(d3.select(this), catModel.parcatsViewModel.labelfont);\n            });\n\n    // Category hover\n    // categorySelection.select('rect.catrect')\n    categorySelection.selectAll('rect.bandrect')\n        .on('mouseover', mouseoverCategoryBand)\n        .on('mouseout', mouseoutCategory);\n\n    // Remove unused categories\n    categorySelection.exit().remove();\n\n    // Setup drag\n    dimensionSelection.call(d3.behavior.drag()\n        .origin(function(d) {\n            return {x: d.x, y: 0};\n        })\n        .on('dragstart', dragDimensionStart)\n        .on('drag', dragDimension)\n        .on('dragend', dragDimensionEnd));\n\n\n    // Save off selections to view models\n    traceSelection.each(function(d) {\n        d.traceSelection = d3.select(this);\n        d.pathSelection = d3.select(this).selectAll('g.paths').selectAll('path.path');\n        d.dimensionSelection = d3.select(this).selectAll('g.dimensions').selectAll('g.dimension');\n    });\n\n    // Remove any orphan traces\n    traceSelection.exit().remove();\n}\n\n/**\n * Create / update parcat traces\n *\n * @param {Object} graphDiv\n * @param {Object} svg\n * @param {Array.<ParcatsModel>} parcatsModels\n * @param {Layout} layout\n */\nmodule.exports = function(graphDiv, svg, parcatsModels, layout) {\n    performPlot(parcatsModels, graphDiv, layout, svg);\n};\n\n/**\n * Function the returns the key property of an object for use with as D3 join function\n * @param d\n */\nfunction key(d) {\n    return d.key;\n}\n\n /** True if a category view model is in the right-most display dimension\n  * @param {CategoryViewModel} d */\nfunction catInRightDim(d) {\n    var numDims = d.parcatsViewModel.dimensions.length;\n    var leftDimInd = d.parcatsViewModel.dimensions[numDims - 1].model.dimensionInd;\n    return d.model.dimensionInd === leftDimInd;\n}\n\n/**\n * @param {PathViewModel} a\n * @param {PathViewModel} b\n */\nfunction compareRawColor(a, b) {\n    if(a.model.rawColor > b.model.rawColor) {\n        return 1;\n    } else if(a.model.rawColor < b.model.rawColor) {\n        return -1;\n    } else {\n        return 0;\n    }\n}\n\n/**\n * Handle path mouseover\n * @param {PathViewModel} d\n */\nfunction mouseoverPath(d) {\n    if(!d.parcatsViewModel.dragDimension) {\n        // We're not currently dragging\n\n        if(d.parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n            // hoverinfo is not skip, so we at least style the paths and emit interaction events\n\n            // Raise path to top\n            Lib.raiseToTop(this);\n\n            stylePathsHover(d3.select(this));\n\n            // Emit hover event\n            var points = buildPointsArrayForPath(d);\n            d.parcatsViewModel.graphDiv.emit('plotly_hover', {points: points, event: d3.event});\n\n            // Handle hover label\n            if(d.parcatsViewModel.hoverinfoItems.indexOf('none') === -1) {\n                // hoverinfo is a combination of 'count' and 'probability'\n\n                // Mouse\n                var hoverX = d3.mouse(this)[0];\n\n                // Label\n                var gd = d.parcatsViewModel.graphDiv;\n                var trace = d.parcatsViewModel.trace;\n                var fullLayout = gd._fullLayout;\n                var rootBBox = fullLayout._paperdiv.node().getBoundingClientRect();\n                var graphDivBBox = d.parcatsViewModel.graphDiv.getBoundingClientRect();\n\n                // Find path center in path coordinates\n                var pathCenterX,\n                    pathCenterY,\n                    dimInd;\n\n                for(dimInd = 0; dimInd < (d.leftXs.length - 1); dimInd++) {\n                    if(d.leftXs[dimInd] + d.dimWidths[dimInd] - 2 <= hoverX && hoverX <= d.leftXs[dimInd + 1] + 2) {\n                        var leftDim = d.parcatsViewModel.dimensions[dimInd];\n                        var rightDim = d.parcatsViewModel.dimensions[dimInd + 1];\n                        pathCenterX = (leftDim.x + leftDim.width + rightDim.x) / 2;\n                        pathCenterY = (d.topYs[dimInd] + d.topYs[dimInd + 1] + d.height) / 2;\n                        break;\n                    }\n                }\n\n                // Find path center in root coordinates\n                var hoverCenterX = d.parcatsViewModel.x + pathCenterX;\n                var hoverCenterY = d.parcatsViewModel.y + pathCenterY;\n\n                var textColor = tinycolor.mostReadable(d.model.color, ['black', 'white']);\n\n                var count = d.model.count;\n                var prob = count / d.parcatsViewModel.model.count;\n                var labels = {\n                    countLabel: count,\n                    probabilityLabel: prob.toFixed(3)\n                };\n\n                // Build hover text\n                var hovertextParts = [];\n                if(d.parcatsViewModel.hoverinfoItems.indexOf('count') !== -1) {\n                    hovertextParts.push(['Count:', labels.countLabel].join(' '));\n                }\n                if(d.parcatsViewModel.hoverinfoItems.indexOf('probability') !== -1) {\n                    hovertextParts.push(['P:', labels.probabilityLabel].join(' '));\n                }\n\n                var hovertext = hovertextParts.join('<br>');\n                var mouseX = d3.mouse(gd)[0];\n\n                Fx.loneHover({\n                    trace: trace,\n                    x: hoverCenterX - rootBBox.left + graphDivBBox.left,\n                    y: hoverCenterY - rootBBox.top + graphDivBBox.top,\n                    text: hovertext,\n                    color: d.model.color,\n                    borderColor: 'black',\n                    fontFamily: 'Monaco, \"Courier New\", monospace',\n                    fontSize: 10,\n                    fontColor: textColor,\n                    idealAlign: mouseX < hoverCenterX ? 'right' : 'left',\n                    hovertemplate: (trace.line || {}).hovertemplate,\n                    hovertemplateLabels: labels,\n                    eventData: [{\n                        data: trace._input,\n                        fullData: trace,\n                        count: count,\n                        probability: prob\n                    }]\n                }, {\n                    container: fullLayout._hoverlayer.node(),\n                    outerContainer: fullLayout._paper.node(),\n                    gd: gd\n                });\n            }\n        }\n    }\n}\n\n/**\n * Handle path mouseout\n * @param {PathViewModel} d\n */\nfunction mouseoutPath(d) {\n    if(!d.parcatsViewModel.dragDimension) {\n        // We're not currently dragging\n        stylePathsNoHover(d3.select(this));\n\n        // Remove and hover label\n        Fx.loneUnhover(d.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node());\n\n        // Restore path order\n        d.parcatsViewModel.pathSelection.sort(compareRawColor);\n\n        // Emit unhover event\n        if(d.parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n            var points = buildPointsArrayForPath(d);\n            d.parcatsViewModel.graphDiv.emit('plotly_unhover', {points: points, event: d3.event});\n        }\n    }\n}\n\n/**\n * Build array of point objects for a path\n *\n * For use in click/hover events\n * @param {PathViewModel} d\n */\nfunction buildPointsArrayForPath(d) {\n    var points = [];\n    var curveNumber = getTraceIndex(d.parcatsViewModel);\n\n    for(var i = 0; i < d.model.valueInds.length; i++) {\n        var pointNumber = d.model.valueInds[i];\n        points.push({\n            curveNumber: curveNumber,\n            pointNumber: pointNumber\n        });\n    }\n    return points;\n}\n\n/**\n * Handle path click\n * @param {PathViewModel} d\n */\nfunction clickPath(d) {\n    if(d.parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n        // hoverinfo it's skip, so interaction events aren't disabled\n        var points = buildPointsArrayForPath(d);\n        d.parcatsViewModel.graphDiv.emit('plotly_click', {points: points, event: d3.event});\n    }\n}\n\nfunction stylePathsNoHover(pathSelection) {\n    pathSelection\n        .attr('fill', function(d) {\n            return d.model.color;\n        })\n        .attr('fill-opacity', 0.6)\n        .attr('stroke', 'lightgray')\n        .attr('stroke-width', 0.2)\n        .attr('stroke-opacity', 1.0);\n}\n\nfunction stylePathsHover(pathSelection) {\n    pathSelection\n        .attr('fill-opacity', 0.8)\n        .attr('stroke', function(d) {\n            return tinycolor.mostReadable(d.model.color, ['black', 'white']);\n        })\n        .attr('stroke-width', 0.3);\n}\n\nfunction styleCategoryHover(categorySelection) {\n    categorySelection\n        .select('rect.catrect')\n        .attr('stroke', 'black')\n        .attr('stroke-width', 2.5);\n}\n\nfunction styleCategoriesNoHover(categorySelection) {\n    categorySelection\n        .select('rect.catrect')\n        .attr('stroke', 'black')\n        .attr('stroke-width', 1)\n        .attr('stroke-opacity', 1);\n}\n\nfunction styleBandsHover(bandsSelection) {\n    bandsSelection\n        .attr('stroke', 'black')\n        .attr('stroke-width', 1.5);\n}\n\nfunction styleBandsNoHover(bandsSelection) {\n    bandsSelection\n        .attr('stroke', 'black')\n        .attr('stroke-width', 0.2)\n        .attr('stroke-opacity', 1.0)\n        .attr('fill-opacity', 1.0);\n}\n\n/**\n * Return selection of all paths that pass through the specified category\n * @param {CategoryBandViewModel} catBandViewModel\n */\nfunction selectPathsThroughCategoryBandColor(catBandViewModel) {\n    var allPaths = catBandViewModel.parcatsViewModel.pathSelection;\n    var dimInd = catBandViewModel.categoryViewModel.model.dimensionInd;\n    var catInd = catBandViewModel.categoryViewModel.model.categoryInd;\n\n    return allPaths\n        .filter(\n            /** @param {PathViewModel} pathViewModel */\n            function(pathViewModel) {\n                return pathViewModel.model.categoryInds[dimInd] === catInd &&\n                    pathViewModel.model.color === catBandViewModel.color;\n            });\n}\n\n\n/**\n * Perform hover styling for all paths that pass though the specified band element's category\n *\n * @param {HTMLElement} bandElement\n *  HTML element for band\n *\n */\nfunction styleForCategoryHovermode(bandElement) {\n    // Get all bands in the current category\n    var bandSel = d3.select(bandElement.parentNode).selectAll('rect.bandrect');\n\n    // Raise and style paths\n    bandSel.each(function(bvm) {\n        var paths = selectPathsThroughCategoryBandColor(bvm);\n        stylePathsHover(paths);\n        paths.each(function() {\n            // Raise path to top\n            Lib.raiseToTop(this);\n        });\n    });\n\n    // Style category\n    styleCategoryHover(d3.select(bandElement.parentNode));\n}\n\n/**\n * Perform hover styling for all paths that pass though the category of the specified band element and share the\n * same color\n *\n * @param {HTMLElement} bandElement\n *  HTML element for band\n *\n */\nfunction styleForColorHovermode(bandElement) {\n    var bandViewModel = d3.select(bandElement).datum();\n    var catPaths = selectPathsThroughCategoryBandColor(bandViewModel);\n    stylePathsHover(catPaths);\n    catPaths.each(function() {\n        // Raise path to top\n        Lib.raiseToTop(this);\n    });\n\n    // Style category for drag\n    d3.select(bandElement.parentNode)\n        .selectAll('rect.bandrect')\n        .filter(function(b) {return b.color === bandViewModel.color;})\n        .each(function() {\n            Lib.raiseToTop(this);\n            styleBandsHover(d3.select(this));\n        });\n}\n\n\n/**\n * @param {HTMLElement} bandElement\n *  HTML element for band\n * @param eventName\n *  Event name (plotly_hover or plotly_click)\n * @param event\n *  Mouse Event\n */\nfunction emitPointsEventCategoryHovermode(bandElement, eventName, event) {\n    // Get all bands in the current category\n    var bandViewModel = d3.select(bandElement).datum();\n    var gd = bandViewModel.parcatsViewModel.graphDiv;\n    var bandSel = d3.select(bandElement.parentNode).selectAll('rect.bandrect');\n\n    var points = [];\n    bandSel.each(function(bvm) {\n        var paths = selectPathsThroughCategoryBandColor(bvm);\n        paths.each(function(pathViewModel) {\n            // Extend points array\n            Array.prototype.push.apply(points, buildPointsArrayForPath(pathViewModel));\n        });\n    });\n\n    gd.emit(eventName, {points: points, event: event});\n}\n\n/**\n * @param {HTMLElement} bandElement\n *  HTML element for band\n * @param eventName\n *  Event name (plotly_hover or plotly_click)\n * @param event\n *  Mouse Event\n */\nfunction emitPointsEventColorHovermode(bandElement, eventName, event) {\n    var bandViewModel = d3.select(bandElement).datum();\n    var gd = bandViewModel.parcatsViewModel.graphDiv;\n    var paths = selectPathsThroughCategoryBandColor(bandViewModel);\n\n    var points = [];\n    paths.each(function(pathViewModel) {\n        // Extend points array\n        Array.prototype.push.apply(points, buildPointsArrayForPath(pathViewModel));\n    });\n\n    gd.emit(eventName, {points: points, event: event});\n}\n\n/**\n * Create hover label for a band element's category (for use when hoveron === 'category')\n *\n * @param {ClientRect} rootBBox\n *  Client bounding box for root of figure\n * @param {HTMLElement} bandElement\n *  HTML element for band\n *\n */\nfunction createHoverLabelForCategoryHovermode(rootBBox, bandElement) {\n    // Selections\n    var rectSelection = d3.select(bandElement.parentNode).select('rect.catrect');\n    var rectBoundingBox = rectSelection.node().getBoundingClientRect();\n\n    // Models\n    /** @type {CategoryViewModel} */\n    var catViewModel = rectSelection.datum();\n    var parcatsViewModel = catViewModel.parcatsViewModel;\n    var dimensionModel = parcatsViewModel.model.dimensions[catViewModel.model.dimensionInd];\n    var trace = parcatsViewModel.trace;\n\n    // Positions\n    var hoverCenterY = rectBoundingBox.top + rectBoundingBox.height / 2;\n    var hoverCenterX,\n        hoverLabelIdealAlign;\n\n    if(parcatsViewModel.dimensions.length > 1 &&\n        dimensionModel.displayInd === parcatsViewModel.dimensions.length - 1) {\n        // right most dimension\n        hoverCenterX = rectBoundingBox.left;\n        hoverLabelIdealAlign = 'left';\n    } else {\n        hoverCenterX = rectBoundingBox.left + rectBoundingBox.width;\n        hoverLabelIdealAlign = 'right';\n    }\n\n    var count = catViewModel.model.count;\n    var catLabel = catViewModel.model.categoryLabel;\n    var prob = count / catViewModel.parcatsViewModel.model.count;\n    var labels = {\n        countLabel: count,\n        categoryLabel: catLabel,\n        probabilityLabel: prob.toFixed(3)\n    };\n\n    // Hover label text\n    var hoverinfoParts = [];\n    if(catViewModel.parcatsViewModel.hoverinfoItems.indexOf('count') !== -1) {\n        hoverinfoParts.push(['Count:', labels.countLabel].join(' '));\n    }\n    if(catViewModel.parcatsViewModel.hoverinfoItems.indexOf('probability') !== -1) {\n        hoverinfoParts.push(['P(' + labels.categoryLabel + '):', labels.probabilityLabel].join(' '));\n    }\n\n    var hovertext = hoverinfoParts.join('<br>');\n    return {\n        trace: trace,\n        x: hoverCenterX - rootBBox.left,\n        y: hoverCenterY - rootBBox.top,\n        text: hovertext,\n        color: 'lightgray',\n        borderColor: 'black',\n        fontFamily: 'Monaco, \"Courier New\", monospace',\n        fontSize: 12,\n        fontColor: 'black',\n        idealAlign: hoverLabelIdealAlign,\n        hovertemplate: trace.hovertemplate,\n        hovertemplateLabels: labels,\n        eventData: [{\n            data: trace._input,\n            fullData: trace,\n            count: count,\n            category: catLabel,\n            probability: prob\n        }]\n    };\n}\n\n/**\n * Create hover label for a band element's category (for use when hoveron === 'category')\n *\n * @param {ClientRect} rootBBox\n *  Client bounding box for root of figure\n * @param {HTMLElement} bandElement\n *  HTML element for band\n *\n */\nfunction createHoverLabelForDimensionHovermode(rootBBox, bandElement) {\n    var allHoverlabels = [];\n\n    d3.select(bandElement.parentNode.parentNode)\n        .selectAll('g.category')\n        .select('rect.catrect')\n        .each(function() {\n            var bandNode = this;\n            allHoverlabels.push(createHoverLabelForCategoryHovermode(rootBBox, bandNode));\n        });\n\n    return allHoverlabels;\n}\n\n/**\n * Create hover labels for a band element's category (for use when hoveron === 'dimension')\n *\n * @param {ClientRect} rootBBox\n *  Client bounding box for root of figure\n * @param {HTMLElement} bandElement\n *  HTML element for band\n *\n */\nfunction createHoverLabelForColorHovermode(rootBBox, bandElement) {\n    var bandBoundingBox = bandElement.getBoundingClientRect();\n\n    // Models\n    /** @type {CategoryBandViewModel} */\n    var bandViewModel = d3.select(bandElement).datum();\n    var catViewModel = bandViewModel.categoryViewModel;\n    var parcatsViewModel = catViewModel.parcatsViewModel;\n    var dimensionModel = parcatsViewModel.model.dimensions[catViewModel.model.dimensionInd];\n    var trace = parcatsViewModel.trace;\n\n    // positions\n    var hoverCenterY = bandBoundingBox.y + bandBoundingBox.height / 2;\n\n    var hoverCenterX,\n        hoverLabelIdealAlign;\n    if(parcatsViewModel.dimensions.length > 1 &&\n        dimensionModel.displayInd === parcatsViewModel.dimensions.length - 1) {\n        // right most dimension\n        hoverCenterX = bandBoundingBox.left;\n        hoverLabelIdealAlign = 'left';\n    } else {\n        hoverCenterX = bandBoundingBox.left + bandBoundingBox.width;\n        hoverLabelIdealAlign = 'right';\n    }\n\n    // Labels\n    var catLabel = catViewModel.model.categoryLabel;\n\n    // Counts\n    var totalCount = bandViewModel.parcatsViewModel.model.count;\n\n    var bandColorCount = 0;\n    bandViewModel.categoryViewModel.bands.forEach(function(b) {\n        if(b.color === bandViewModel.color) {\n            bandColorCount += b.count;\n        }\n    });\n\n    var catCount = catViewModel.model.count;\n\n    var colorCount = 0;\n    parcatsViewModel.pathSelection.each(\n        /** @param {PathViewModel} pathViewModel */\n        function(pathViewModel) {\n            if(pathViewModel.model.color === bandViewModel.color) {\n                colorCount += pathViewModel.model.count;\n            }\n        });\n\n    var pColorAndCat = bandColorCount / totalCount;\n    var pCatGivenColor = bandColorCount / colorCount;\n    var pColorGivenCat = bandColorCount / catCount;\n\n    var labels = {\n        countLabel: totalCount,\n        categoryLabel: catLabel,\n        probabilityLabel: pColorAndCat.toFixed(3)\n    };\n\n    // Hover label text\n    var hoverinfoParts = [];\n    if(catViewModel.parcatsViewModel.hoverinfoItems.indexOf('count') !== -1) {\n        hoverinfoParts.push(['Count:', labels.countLabel].join(' '));\n    }\n    if(catViewModel.parcatsViewModel.hoverinfoItems.indexOf('probability') !== -1) {\n        hoverinfoParts.push('P(color ∩ ' + catLabel + '): ' + labels.probabilityLabel);\n        hoverinfoParts.push('P(' + catLabel + ' | color): ' + pCatGivenColor.toFixed(3));\n        hoverinfoParts.push('P(color | ' + catLabel + '): ' + pColorGivenCat.toFixed(3));\n    }\n\n    var hovertext = hoverinfoParts.join('<br>');\n\n    // Compute text color\n    var textColor = tinycolor.mostReadable(bandViewModel.color, ['black', 'white']);\n\n    return {\n        trace: trace,\n        x: hoverCenterX - rootBBox.left,\n        y: hoverCenterY - rootBBox.top,\n        // name: 'NAME',\n        text: hovertext,\n        color: bandViewModel.color,\n        borderColor: 'black',\n        fontFamily: 'Monaco, \"Courier New\", monospace',\n        fontColor: textColor,\n        fontSize: 10,\n        idealAlign: hoverLabelIdealAlign,\n        hovertemplate: trace.hovertemplate,\n        hovertemplateLabels: labels,\n        eventData: [{\n            data: trace._input,\n            fullData: trace,\n            category: catLabel,\n            count: totalCount,\n            probability: pColorAndCat,\n            categorycount: catCount,\n            colorcount: colorCount,\n            bandcolorcount: bandColorCount\n        }]\n    };\n}\n\n/**\n * Handle dimension mouseover\n * @param {CategoryBandViewModel} bandViewModel\n */\nfunction mouseoverCategoryBand(bandViewModel) {\n    if(!bandViewModel.parcatsViewModel.dragDimension) {\n        // We're not currently dragging\n\n        if(bandViewModel.parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n            // hoverinfo is not skip, so we at least style the bands and emit interaction events\n\n            // Mouse\n            var mouseY = d3.mouse(this)[1];\n            if(mouseY < -1) {\n                // Hover is above above the category rectangle (probably the dimension title text)\n                return;\n            }\n\n            var gd = bandViewModel.parcatsViewModel.graphDiv;\n            var fullLayout = gd._fullLayout;\n            var rootBBox = fullLayout._paperdiv.node().getBoundingClientRect();\n            var hoveron = bandViewModel.parcatsViewModel.hoveron;\n\n            /** @type {HTMLElement} */\n            var bandElement = this;\n\n            // Handle style and events\n            if(hoveron === 'color') {\n                styleForColorHovermode(bandElement);\n                emitPointsEventColorHovermode(bandElement, 'plotly_hover', d3.event);\n            } else {\n                styleForCategoryHovermode(bandElement);\n                emitPointsEventCategoryHovermode(bandElement, 'plotly_hover', d3.event);\n            }\n\n            // Handle hover label\n            if(bandViewModel.parcatsViewModel.hoverinfoItems.indexOf('none') === -1) {\n                var hoverItems;\n                if(hoveron === 'category') {\n                    hoverItems = createHoverLabelForCategoryHovermode(rootBBox, bandElement);\n                } else if(hoveron === 'color') {\n                    hoverItems = createHoverLabelForColorHovermode(rootBBox, bandElement);\n                } else if(hoveron === 'dimension') {\n                    hoverItems = createHoverLabelForDimensionHovermode(rootBBox, bandElement);\n                }\n\n                if(hoverItems) {\n                    Fx.loneHover(hoverItems, {\n                        container: fullLayout._hoverlayer.node(),\n                        outerContainer: fullLayout._paper.node(),\n                        gd: gd\n                    });\n                }\n            }\n        }\n    }\n}\n\n\n/**\n * Handle dimension mouseover\n * @param {CategoryBandViewModel} bandViewModel\n */\nfunction mouseoutCategory(bandViewModel) {\n    var parcatsViewModel = bandViewModel.parcatsViewModel;\n\n    if(!parcatsViewModel.dragDimension) {\n        // We're not dragging anything\n\n        // Reset unhovered styles\n        stylePathsNoHover(parcatsViewModel.pathSelection);\n        styleCategoriesNoHover(parcatsViewModel.dimensionSelection.selectAll('g.category'));\n        styleBandsNoHover(parcatsViewModel.dimensionSelection.selectAll('g.category').selectAll('rect.bandrect'));\n\n        // Remove hover label\n        Fx.loneUnhover(parcatsViewModel.graphDiv._fullLayout._hoverlayer.node());\n\n        // Restore path order\n        parcatsViewModel.pathSelection.sort(compareRawColor);\n\n        // Emit unhover event\n        if(parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n            var hoveron = bandViewModel.parcatsViewModel.hoveron;\n            var bandElement = this;\n\n            // Handle style and events\n            if(hoveron === 'color') {\n                emitPointsEventColorHovermode(bandElement, 'plotly_unhover', d3.event);\n            } else {\n                emitPointsEventCategoryHovermode(bandElement, 'plotly_unhover', d3.event);\n            }\n        }\n    }\n}\n\n\n/**\n * Handle dimension drag start\n * @param {DimensionViewModel} d\n */\nfunction dragDimensionStart(d) {\n    // Check if dragging is supported\n    if(d.parcatsViewModel.arrangement === 'fixed') {\n        return;\n    }\n\n    // Save off initial drag indexes for dimension\n    d.dragDimensionDisplayInd = d.model.displayInd;\n    d.initialDragDimensionDisplayInds = d.parcatsViewModel.model.dimensions.map(function(d) {return d.displayInd;});\n    d.dragHasMoved = false;\n\n    // Check for category hit\n    d.dragCategoryDisplayInd = null;\n    d3.select(this)\n        .selectAll('g.category')\n        .select('rect.catrect')\n        .each(\n            /** @param {CategoryViewModel} catViewModel */\n            function(catViewModel) {\n                var catMouseX = d3.mouse(this)[0];\n                var catMouseY = d3.mouse(this)[1];\n\n\n                if(-2 <= catMouseX && catMouseX <= catViewModel.width + 2 &&\n                    -2 <= catMouseY && catMouseY <= catViewModel.height + 2) {\n                    // Save off initial drag indexes for categories\n                    d.dragCategoryDisplayInd = catViewModel.model.displayInd;\n                    d.initialDragCategoryDisplayInds = d.model.categories.map(function(c) {\n                        return c.displayInd;\n                    });\n\n                    // Initialize categories dragY to be the current y position\n                    catViewModel.model.dragY = catViewModel.y;\n\n                    // Raise category\n                    Lib.raiseToTop(this.parentNode);\n\n                    // Get band element\n                    d3.select(this.parentNode)\n                        .selectAll('rect.bandrect')\n                        /** @param {CategoryBandViewModel} bandViewModel */\n                        .each(function(bandViewModel) {\n                            if(bandViewModel.y < catMouseY && catMouseY <= bandViewModel.y + bandViewModel.height) {\n                                d.potentialClickBand = this;\n                            }\n                        });\n                }\n            });\n\n    // Update toplevel drag dimension\n    d.parcatsViewModel.dragDimension = d;\n\n    // Remove hover label if any\n    Fx.loneUnhover(d.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node());\n}\n\n/**\n * Handle dimension drag\n * @param {DimensionViewModel} d\n */\nfunction dragDimension(d) {\n    // Check if dragging is supported\n    if(d.parcatsViewModel.arrangement === 'fixed') {\n        return;\n    }\n\n    d.dragHasMoved = true;\n\n    if(d.dragDimensionDisplayInd === null) {\n        return;\n    }\n\n    var dragDimInd = d.dragDimensionDisplayInd;\n    var prevDimInd = dragDimInd - 1;\n    var nextDimInd = dragDimInd + 1;\n\n    var dragDimension = d.parcatsViewModel\n        .dimensions[dragDimInd];\n\n    // Update category\n    if(d.dragCategoryDisplayInd !== null) {\n        var dragCategory = dragDimension.categories[d.dragCategoryDisplayInd];\n\n        // Update dragY by dy\n        dragCategory.model.dragY += d3.event.dy;\n        var categoryY = dragCategory.model.dragY;\n\n        // Check for category drag swaps\n        var catDisplayInd = dragCategory.model.displayInd;\n        var dimCategoryViews = dragDimension.categories;\n\n        var catAbove = dimCategoryViews[catDisplayInd - 1];\n        var catBelow = dimCategoryViews[catDisplayInd + 1];\n\n        // Check for overlap above\n        if(catAbove !== undefined) {\n            if(categoryY < (catAbove.y + catAbove.height / 2.0)) {\n                // Swap display inds\n                dragCategory.model.displayInd = catAbove.model.displayInd;\n                catAbove.model.displayInd = catDisplayInd;\n            }\n        }\n\n        if(catBelow !== undefined) {\n            if((categoryY + dragCategory.height) > (catBelow.y + catBelow.height / 2.0)) {\n                // Swap display inds\n                dragCategory.model.displayInd = catBelow.model.displayInd;\n                catBelow.model.displayInd = catDisplayInd;\n            }\n        }\n\n        // Update category drag display index\n        d.dragCategoryDisplayInd = dragCategory.model.displayInd;\n    }\n\n    // Update dimension position\n    if(d.dragCategoryDisplayInd === null || d.parcatsViewModel.arrangement === 'freeform') {\n        dragDimension.model.dragX = d3.event.x;\n\n        // Check for dimension swaps\n        var prevDimension = d.parcatsViewModel.dimensions[prevDimInd];\n        var nextDimension = d.parcatsViewModel.dimensions[nextDimInd];\n\n        if(prevDimension !== undefined) {\n            if(dragDimension.model.dragX < (prevDimension.x + prevDimension.width)) {\n                // Swap display inds\n                dragDimension.model.displayInd = prevDimension.model.displayInd;\n                prevDimension.model.displayInd = dragDimInd;\n            }\n        }\n\n        if(nextDimension !== undefined) {\n            if((dragDimension.model.dragX + dragDimension.width) > nextDimension.x) {\n                // Swap display inds\n                dragDimension.model.displayInd = nextDimension.model.displayInd;\n                nextDimension.model.displayInd = d.dragDimensionDisplayInd;\n            }\n        }\n\n        // Update drag display index\n        d.dragDimensionDisplayInd = dragDimension.model.displayInd;\n    }\n\n    // Update view models\n    updateDimensionViewModels(d.parcatsViewModel);\n    updatePathViewModels(d.parcatsViewModel);\n\n    // Update svg geometry\n    updateSvgCategories(d.parcatsViewModel);\n    updateSvgPaths(d.parcatsViewModel);\n}\n\n\n/**\n * Handle dimension drag end\n * @param {DimensionViewModel} d\n */\nfunction dragDimensionEnd(d) {\n    // Check if dragging is supported\n    if(d.parcatsViewModel.arrangement === 'fixed') {\n        return;\n    }\n\n    if(d.dragDimensionDisplayInd === null) {\n        return;\n    }\n\n    d3.select(this).selectAll('text').attr('font-weight', 'normal');\n\n    // Compute restyle command\n    // -----------------------\n    var restyleData = {};\n    var traceInd = getTraceIndex(d.parcatsViewModel);\n\n    // ### Handle dimension reordering ###\n    var finalDragDimensionDisplayInds = d.parcatsViewModel.model.dimensions.map(function(d) {return d.displayInd;});\n    var anyDimsReordered = d.initialDragDimensionDisplayInds.some(function(initDimDisplay, dimInd) {\n        return initDimDisplay !== finalDragDimensionDisplayInds[dimInd];\n    });\n\n    if(anyDimsReordered) {\n        finalDragDimensionDisplayInds.forEach(function(finalDimDisplay, dimInd) {\n            var containerInd = d.parcatsViewModel.model.dimensions[dimInd].containerInd;\n            restyleData['dimensions[' + containerInd + '].displayindex'] = finalDimDisplay;\n        });\n    }\n\n    // ### Handle category reordering ###\n    var anyCatsReordered = false;\n    if(d.dragCategoryDisplayInd !== null) {\n        var finalDragCategoryDisplayInds = d.model.categories.map(function(c) {\n            return c.displayInd;\n        });\n\n        anyCatsReordered = d.initialDragCategoryDisplayInds.some(function(initCatDisplay, catInd) {\n            return initCatDisplay !== finalDragCategoryDisplayInds[catInd];\n        });\n\n        if(anyCatsReordered) {\n            // Sort a shallow copy of the category models by display index\n            var sortedCategoryModels = d.model.categories.slice().sort(\n                function(a, b) { return a.displayInd - b.displayInd; });\n\n            // Get new categoryarray and ticktext values\n            var newCategoryArray = sortedCategoryModels.map(function(v) { return v.categoryValue; });\n            var newCategoryLabels = sortedCategoryModels.map(function(v) { return v.categoryLabel; });\n\n            restyleData['dimensions[' + d.model.containerInd + '].categoryarray'] = [newCategoryArray];\n            restyleData['dimensions[' + d.model.containerInd + '].ticktext'] = [newCategoryLabels];\n            restyleData['dimensions[' + d.model.containerInd + '].categoryorder'] = 'array';\n        }\n    }\n\n    // Handle potential click event\n    // ----------------------------\n    if(d.parcatsViewModel.hoverinfoItems.indexOf('skip') === -1) {\n        if(!d.dragHasMoved && d.potentialClickBand) {\n            if(d.parcatsViewModel.hoveron === 'color') {\n                emitPointsEventColorHovermode(d.potentialClickBand, 'plotly_click', d3.event.sourceEvent);\n            } else {\n                emitPointsEventCategoryHovermode(d.potentialClickBand, 'plotly_click', d3.event.sourceEvent);\n            }\n        }\n    }\n\n    // Nullify drag states\n    // -------------------\n    d.model.dragX = null;\n    if(d.dragCategoryDisplayInd !== null) {\n        var dragCategory = d.parcatsViewModel\n            .dimensions[d.dragDimensionDisplayInd]\n            .categories[d.dragCategoryDisplayInd];\n\n        dragCategory.model.dragY = null;\n        d.dragCategoryDisplayInd = null;\n    }\n\n    d.dragDimensionDisplayInd = null;\n    d.parcatsViewModel.dragDimension = null;\n    d.dragHasMoved = null;\n    d.potentialClickBand = null;\n\n    // Update view models\n    // ------------------\n    updateDimensionViewModels(d.parcatsViewModel);\n    updatePathViewModels(d.parcatsViewModel);\n\n    // Perform transition\n    // ------------------\n    var transition = d3.transition()\n        .duration(300)\n        .ease('cubic-in-out');\n\n    transition\n        .each(function() {\n            updateSvgCategories(d.parcatsViewModel, true);\n            updateSvgPaths(d.parcatsViewModel, true);\n        })\n        .each('end', function() {\n            if(anyDimsReordered || anyCatsReordered) {\n                // Perform restyle if the order of categories or dimensions changed\n                Plotly.restyle(d.parcatsViewModel.graphDiv, restyleData, [traceInd]);\n            }\n        });\n}\n\n/**\n *\n * @param {ParcatsViewModel} parcatsViewModel\n */\nfunction getTraceIndex(parcatsViewModel) {\n    var traceInd;\n    var allTraces = parcatsViewModel.graphDiv._fullData;\n    for(var i = 0; i < allTraces.length; i++) {\n        if(parcatsViewModel.key === allTraces[i].uid) {\n            traceInd = i;\n            break;\n        }\n    }\n    return traceInd;\n}\n\n/** Update the svg paths for view model\n * @param {ParcatsViewModel} parcatsViewModel\n * @param {boolean} hasTransition Whether to update element with transition\n */\nfunction updateSvgPaths(parcatsViewModel, hasTransition) {\n    if(hasTransition === undefined) {\n        hasTransition = false;\n    }\n\n    function transition(selection) {\n        return hasTransition ? selection.transition() : selection;\n    }\n\n    // Update binding\n    parcatsViewModel.pathSelection.data(function(d) {\n        return d.paths;\n    }, key);\n\n    // Update paths\n    transition(parcatsViewModel.pathSelection).attr('d', function(d) {\n        return d.svgD;\n    });\n}\n\n/** Update the svg paths for view model\n * @param {ParcatsViewModel} parcatsViewModel\n * @param {boolean} hasTransition Whether to update element with transition\n */\nfunction updateSvgCategories(parcatsViewModel, hasTransition) {\n    if(hasTransition === undefined) {\n        hasTransition = false;\n    }\n\n    function transition(selection) {\n        return hasTransition ? selection.transition() : selection;\n    }\n\n    // Update binding\n    parcatsViewModel.dimensionSelection\n        .data(function(d) {\n            return d.dimensions;\n        }, key);\n\n    var categorySelection = parcatsViewModel.dimensionSelection\n        .selectAll('g.category')\n        .data(function(d) {return d.categories;}, key);\n\n    // Update dimension position\n    transition(parcatsViewModel.dimensionSelection)\n        .attr('transform', function(d) {\n            return 'translate(' + d.x + ', 0)';\n        });\n\n    // Update category position\n    transition(categorySelection)\n        .attr('transform', function(d) {\n            return 'translate(0, ' + d.y + ')';\n        });\n\n    var dimLabelSelection = categorySelection.select('.dimlabel');\n\n    // ### Update dimension label\n    // Only the top-most display category should have the dimension label\n    dimLabelSelection\n        .text(function(d, i) {\n            if(i === 0) {\n                // Add dimension label above topmost category\n                return d.parcatsViewModel.model.dimensions[d.model.dimensionInd].dimensionLabel;\n            } else {\n                return null;\n            }\n        });\n\n    // Update category label\n    // Categories in the right-most display dimension have their labels on\n    // the right, all others on the left\n    var catLabelSelection = categorySelection.select('.catlabel');\n    catLabelSelection\n        .attr('text-anchor',\n            function(d) {\n                if(catInRightDim(d)) {\n                    // Place label to the right of category\n                    return 'start';\n                } else {\n                    // Place label to the left of category\n                    return 'end';\n                }\n            })\n        .attr('x',\n            function(d) {\n                if(catInRightDim(d)) {\n                    // Place label to the right of category\n                    return d.width + 5;\n                } else {\n                    // Place label to the left of category\n                    return -5;\n                }\n            })\n        .each(function(d) {\n            // Update attriubutes of <tspan> elements\n            var newX;\n            var newAnchor;\n            if(catInRightDim(d)) {\n                // Place label to the right of category\n                newX = d.width + 5;\n                newAnchor = 'start';\n            } else {\n                // Place label to the left of category\n                newX = -5;\n                newAnchor = 'end';\n            }\n            d3.select(this)\n                .selectAll('tspan')\n                .attr('x', newX)\n                .attr('text-anchor', newAnchor);\n        });\n\n    // Update bands\n    // Initialize color band rects\n    var bandSelection = categorySelection\n        .selectAll('rect.bandrect')\n        .data(\n            /** @param {CategoryViewModel} catViewModel*/\n            function(catViewModel) {\n                return catViewModel.bands;\n            }, key);\n\n    var bandsSelectionEnter = bandSelection.enter()\n        .append('rect')\n        .attr('class', 'bandrect')\n        .attr('cursor', 'move')\n        .attr('stroke-opacity', 0)\n        .attr('fill', function(d) {\n            return d.color;\n        })\n        .attr('fill-opacity', 0);\n\n    bandSelection\n        .attr('fill', function(d) {\n            return d.color;\n        })\n        .attr('width', function(d) {\n            return d.width;\n        })\n        .attr('height', function(d) {\n            return d.height;\n        })\n        .attr('y', function(d) {\n            return d.y;\n        });\n\n    styleBandsNoHover(bandsSelectionEnter);\n\n    // Raise bands to the top\n    bandSelection.each(function() {Lib.raiseToTop(this);});\n\n    // Remove unused bands\n    bandSelection.exit().remove();\n}\n\n/**\n * Create a ParcatsViewModel traces\n * @param {Object} graphDiv\n *  Top-level graph div element\n * @param {Layout} layout\n *  SVG layout object\n * @param {Array.<ParcatsModel>} wrappedParcatsModel\n *  Wrapped ParcatsModel for this trace\n * @return {ParcatsViewModel}\n */\nfunction createParcatsViewModel(graphDiv, layout, wrappedParcatsModel) {\n    // Unwrap model\n    var parcatsModel = wrappedParcatsModel[0];\n\n    // Compute margin\n    var margin = layout.margin || {l: 80, r: 80, t: 100, b: 80};\n\n    // Compute pixel position/extents\n    var trace = parcatsModel.trace;\n    var domain = trace.domain;\n    var figureWidth = layout.width;\n    var figureHeight = layout.height;\n    var traceWidth = Math.floor(figureWidth * (domain.x[1] - domain.x[0]));\n    var traceHeight = Math.floor(figureHeight * (domain.y[1] - domain.y[0]));\n    var traceX = domain.x[0] * figureWidth + margin.l;\n    var traceY = layout.height - domain.y[1] * layout.height + margin.t;\n\n    // Handle path shape\n    // -----------------\n    var pathShape = trace.line.shape;\n\n    // Handle hover info\n    // -----------------\n    var hoverinfoItems;\n    if(trace.hoverinfo === 'all') {\n        hoverinfoItems = ['count', 'probability'];\n    } else {\n        hoverinfoItems = (trace.hoverinfo || '').split('+');\n    }\n\n    // Construct parcatsViewModel\n    // --------------------------\n    var parcatsViewModel = {\n        trace: trace,\n        key: trace.uid,\n        model: parcatsModel,\n        x: traceX,\n        y: traceY,\n        width: traceWidth,\n        height: traceHeight,\n        hoveron: trace.hoveron,\n        hoverinfoItems: hoverinfoItems,\n        arrangement: trace.arrangement,\n        bundlecolors: trace.bundlecolors,\n        sortpaths: trace.sortpaths,\n        labelfont: trace.labelfont,\n        categorylabelfont: trace.tickfont,\n        pathShape: pathShape,\n        dragDimension: null,\n        margin: margin,\n        paths: [],\n        dimensions: [],\n        graphDiv: graphDiv,\n        traceSelection: null,\n        pathSelection: null,\n        dimensionSelection: null\n    };\n\n    // Update dimension view models if we have at least 1 dimension\n    if(parcatsModel.dimensions) {\n        updateDimensionViewModels(parcatsViewModel);\n\n        // Update path view models if we have at least 2 dimensions\n        updatePathViewModels(parcatsViewModel);\n    }\n    // Inside a categories view model\n    return parcatsViewModel;\n}\n\n/**\n * Build the SVG string to represents a parallel categories path\n * @param {Array.<Number>} leftXPositions\n *  Array of the x positions of the left edge of each dimension (in display order)\n * @param {Array.<Number>} pathYs\n *  Array of the y positions of the top of the path at each dimension (in display order)\n * @param {Array.<Number>} dimWidths\n *  Array of the widths of each dimension in display order\n * @param {Number} pathHeight\n *  The height of the path in pixels\n * @param {Number} curvature\n *  The curvature factor for the path. 0 results in a straight line and values greater than zero result in curved paths\n * @return {string}\n */\nfunction buildSvgPath(leftXPositions, pathYs, dimWidths, pathHeight, curvature) {\n    // Compute the x midpoint of each path segment\n    var xRefPoints1 = [];\n    var xRefPoints2 = [];\n    var refInterpolator;\n    var d;\n\n    for(d = 0; d < dimWidths.length - 1; d++) {\n        refInterpolator = d3.interpolateNumber(dimWidths[d] + leftXPositions[d], leftXPositions[d + 1]);\n        xRefPoints1.push(refInterpolator(curvature));\n        xRefPoints2.push(refInterpolator(1 - curvature));\n    }\n\n    // Move to top of path on left edge of left-most category\n    var svgD = 'M ' + leftXPositions[0] + ',' + pathYs[0];\n\n    // Horizontal line to right edge\n    svgD += 'l' + dimWidths[0] + ',0 ';\n\n    // Horizontal line to right edge\n    for(d = 1; d < dimWidths.length; d++) {\n        // Curve to left edge of category\n        svgD += 'C' + xRefPoints1[d - 1] + ',' + pathYs[d - 1] +\n              ' ' + xRefPoints2[d - 1] + ',' + pathYs[d] +\n              ' ' + leftXPositions[d] + ',' + pathYs[d];\n\n        // svgD += 'L' + leftXPositions[d] + ',' + pathYs[d];\n\n        // Horizontal line to right edge\n        svgD += 'l' + dimWidths[d] + ',0 ';\n    }\n\n    // Line down\n    svgD += 'l' + '0,' + pathHeight + ' ';\n\n    // Line to left edge of right-most category\n    svgD += 'l -' + dimWidths[dimWidths.length - 1] + ',0 ';\n\n    for(d = dimWidths.length - 2; d >= 0; d--) {\n        // Curve to right edge of category\n        svgD += 'C' + xRefPoints2[d] + ',' + (pathYs[d + 1] + pathHeight) +\n             ' ' + xRefPoints1[d] + ',' + (pathYs[d] + pathHeight) +\n             ' ' + (leftXPositions[d] + dimWidths[d]) + ',' + (pathYs[d] + pathHeight);\n\n        // svgD += 'L' + (leftXPositions[d] + dimWidths[d]) + ',' + (pathYs[d] + pathHeight);\n\n        // Horizontal line to right edge\n        svgD += 'l-' + dimWidths[d] + ',0 ';\n    }\n\n    // Close path\n    svgD += 'Z';\n    return svgD;\n}\n\n/**\n * Update the path view models based on the dimension view models in a ParcatsViewModel\n *\n * @param {ParcatsViewModel} parcatsViewModel\n *  View model for trace\n */\nfunction updatePathViewModels(parcatsViewModel) {\n    // Initialize an array of the y position of the top of the next path to be added to each category.\n    //\n    // nextYPositions[d][c] is the y position of the next path through category with index c of dimension with index d\n    var dimensionViewModels = parcatsViewModel.dimensions;\n    var parcatsModel = parcatsViewModel.model;\n    var nextYPositions = dimensionViewModels.map(\n        function(d) {\n            return d.categories.map(\n                function(c) {\n                    return c.y;\n                });\n        });\n\n    // Array from category index to category display index for each true dimension index\n    var catToDisplayIndPerDim = parcatsViewModel.model.dimensions.map(\n        function(d) {\n            return d.categories.map(function(c) {return c.displayInd;});\n        });\n\n    // Array from true dimension index to dimension display index\n    var dimToDisplayInd = parcatsViewModel.model.dimensions.map(function(d) {return d.displayInd;});\n    var displayToDimInd = parcatsViewModel.dimensions.map(function(d) {return d.model.dimensionInd;});\n\n    // Array of the x position of the left edge of the rectangles for each dimension\n    var leftXPositions = dimensionViewModels.map(\n        function(d) {\n            return d.x;\n        });\n\n    // Compute dimension widths\n    var dimWidths = dimensionViewModels.map(function(d) {return d.width;});\n\n    // Build sorted Array of PathModel objects\n    var pathModels = [];\n    for(var p in parcatsModel.paths) {\n        if(parcatsModel.paths.hasOwnProperty(p)) {\n            pathModels.push(parcatsModel.paths[p]);\n        }\n    }\n\n    // Compute category display inds to use for sorting paths\n    function pathDisplayCategoryInds(pathModel) {\n        var dimensionInds = pathModel.categoryInds.map(function(catInd, dimInd) {return catToDisplayIndPerDim[dimInd][catInd];});\n        var displayInds = displayToDimInd.map(function(dimInd) {\n            return dimensionInds[dimInd];\n        });\n        return displayInds;\n    }\n\n    // Sort in ascending order by display index array\n    pathModels.sort(function(v1, v2) {\n        // Build display inds for each path\n        var sortArray1 = pathDisplayCategoryInds(v1);\n        var sortArray2 = pathDisplayCategoryInds(v2);\n\n        // Handle path sort order\n        if(parcatsViewModel.sortpaths === 'backward') {\n            sortArray1.reverse();\n            sortArray2.reverse();\n        }\n\n        // Append the first value index of the path to break ties\n        sortArray1.push(v1.valueInds[0]);\n        sortArray2.push(v2.valueInds[0]);\n\n        // Handle color bundling\n        if(parcatsViewModel.bundlecolors) {\n            // Prepend sort array with the raw color value\n            sortArray1.unshift(v1.rawColor);\n            sortArray2.unshift(v2.rawColor);\n        }\n\n        // colors equal, sort by display categories\n        if(sortArray1 < sortArray2) {\n            return -1;\n        }\n        if(sortArray1 > sortArray2) {\n            return 1;\n        }\n\n        return 0;\n    });\n\n    // Create path models\n    var pathViewModels = new Array(pathModels.length);\n    var totalCount = dimensionViewModels[0].model.count;\n    var totalHeight = dimensionViewModels[0].categories\n        .map(function(c) { return c.height; })\n        .reduce(function(v1, v2) { return v1 + v2; });\n\n\n    for(var pathNumber = 0; pathNumber < pathModels.length; pathNumber++) {\n        var pathModel = pathModels[pathNumber];\n\n        var pathHeight;\n        if(totalCount > 0) {\n            pathHeight = totalHeight * (pathModel.count / totalCount);\n        } else {\n            pathHeight = 0;\n        }\n\n        // Build path y coords\n        var pathYs = new Array(nextYPositions.length);\n        for(var d = 0; d < pathModel.categoryInds.length; d++) {\n            var catInd = pathModel.categoryInds[d];\n            var catDisplayInd = catToDisplayIndPerDim[d][catInd];\n            var dimDisplayInd = dimToDisplayInd[d];\n\n            // Update next y position\n            pathYs[dimDisplayInd] = nextYPositions[dimDisplayInd][catDisplayInd];\n            nextYPositions[dimDisplayInd][catDisplayInd] += pathHeight;\n\n            // Update category color information\n            var catViewModle = parcatsViewModel.dimensions[dimDisplayInd].categories[catDisplayInd];\n            var numBands = catViewModle.bands.length;\n            var lastCatBand = catViewModle.bands[numBands - 1];\n\n            if(lastCatBand === undefined || pathModel.rawColor !== lastCatBand.rawColor) {\n                // Create a new band\n                var bandY = lastCatBand === undefined ? 0 : lastCatBand.y + lastCatBand.height;\n                catViewModle.bands.push({\n                    key: bandY,\n                    color: pathModel.color,\n                    rawColor: pathModel.rawColor,\n                    height: pathHeight,\n                    width: catViewModle.width,\n                    count: pathModel.count,\n                    y: bandY,\n                    categoryViewModel: catViewModle,\n                    parcatsViewModel: parcatsViewModel\n                });\n            } else {\n                // Extend current band\n                var currentBand = catViewModle.bands[numBands - 1];\n                currentBand.height += pathHeight;\n                currentBand.count += pathModel.count;\n            }\n        }\n\n        // build svg path\n        var svgD;\n        if(parcatsViewModel.pathShape === 'hspline') {\n            svgD = buildSvgPath(leftXPositions, pathYs, dimWidths, pathHeight, 0.5);\n        } else {\n            svgD = buildSvgPath(leftXPositions, pathYs, dimWidths, pathHeight, 0);\n        }\n\n        pathViewModels[pathNumber] = {\n            key: pathModel.valueInds[0],\n            model: pathModel,\n            height: pathHeight,\n            leftXs: leftXPositions,\n            topYs: pathYs,\n            dimWidths: dimWidths,\n            svgD: svgD,\n            parcatsViewModel: parcatsViewModel\n        };\n    }\n\n    parcatsViewModel.paths = pathViewModels;\n\n // * @property key\n // *  Unique key for this model\n // * @property {PathModel} model\n // *  Source path model\n // * @property {Number} height\n // *  Height of this path (pixels)\n // * @property {String} svgD\n // *  SVG path \"d\" attribute string\n}\n\n/**\n * Update the dimension view models based on the dimension models in a ParcatsViewModel\n *\n * @param {ParcatsViewModel} parcatsViewModel\n *  View model for trace\n */\nfunction updateDimensionViewModels(parcatsViewModel) {\n    // Compute dimension ordering\n    var dimensionsIndInfo = parcatsViewModel.model.dimensions.map(function(d) {\n        return {displayInd: d.displayInd, dimensionInd: d.dimensionInd};\n    });\n\n    dimensionsIndInfo.sort(function(a, b) {\n        return a.displayInd - b.displayInd;\n    });\n\n    var dimensions = [];\n    for(var displayInd in dimensionsIndInfo) {\n        var dimensionInd = dimensionsIndInfo[displayInd].dimensionInd;\n        var dimModel = parcatsViewModel.model.dimensions[dimensionInd];\n        dimensions.push(createDimensionViewModel(parcatsViewModel, dimModel));\n    }\n\n    parcatsViewModel.dimensions = dimensions;\n}\n\n/**\n * Create a parcats DimensionViewModel\n *\n * @param {ParcatsViewModel} parcatsViewModel\n *  View model for trace\n * @param {DimensionModel} dimensionModel\n * @return {DimensionViewModel}\n */\nfunction createDimensionViewModel(parcatsViewModel, dimensionModel) {\n    // Compute dimension x position\n    var categoryLabelPad = 40;\n    var dimWidth = 16;\n    var numDimensions = parcatsViewModel.model.dimensions.length;\n    var displayInd = dimensionModel.displayInd;\n\n    // Compute x coordinate values\n    var dimDx;\n    var dimX0;\n    var dimX;\n\n    if(numDimensions > 1) {\n        dimDx = (parcatsViewModel.width - 2 * categoryLabelPad - dimWidth) / (numDimensions - 1);\n    } else {\n        dimDx = 0;\n    }\n    dimX0 = categoryLabelPad;\n    dimX = dimX0 + dimDx * displayInd;\n\n    // Compute categories\n    var categories = [];\n    var maxCats = parcatsViewModel.model.maxCats;\n    var numCats = dimensionModel.categories.length;\n    var catSpacing = 8;\n    var totalCount = dimensionModel.count;\n    var totalHeight = parcatsViewModel.height - catSpacing * (maxCats - 1);\n    var nextCatHeight;\n    var nextCatModel;\n    var nextCat;\n    var catInd;\n    var catDisplayInd;\n\n    // Compute starting Y offset\n    var nextCatY = (maxCats - numCats) * catSpacing / 2.0;\n\n    // Compute category ordering\n    var categoryIndInfo = dimensionModel.categories.map(function(c) {\n        return {displayInd: c.displayInd, categoryInd: c.categoryInd};\n    });\n\n    categoryIndInfo.sort(function(a, b) {\n        return a.displayInd - b.displayInd;\n    });\n\n    for(catDisplayInd = 0; catDisplayInd < numCats; catDisplayInd++) {\n        catInd = categoryIndInfo[catDisplayInd].categoryInd;\n        nextCatModel = dimensionModel.categories[catInd];\n\n        if(totalCount > 0) {\n            nextCatHeight = (nextCatModel.count / totalCount) * totalHeight;\n        } else {\n            nextCatHeight = 0;\n        }\n\n        nextCat = {\n            key: nextCatModel.valueInds[0],\n            model: nextCatModel,\n            width: dimWidth,\n            height: nextCatHeight,\n            y: nextCatModel.dragY !== null ? nextCatModel.dragY : nextCatY,\n            bands: [],\n            parcatsViewModel: parcatsViewModel\n        };\n\n        nextCatY = nextCatY + nextCatHeight + catSpacing;\n        categories.push(nextCat);\n    }\n\n    return {\n        key: dimensionModel.dimensionInd,\n        x: dimensionModel.dragX !== null ? dimensionModel.dragX : dimX,\n        y: 0,\n        width: dimWidth,\n        model: dimensionModel,\n        categories: categories,\n        parcatsViewModel: parcatsViewModel,\n        dragCategoryDisplayInd: null,\n        dragDimensionDisplayInd: null,\n        initialDragDimensionDisplayInds: null,\n        initialDragCategoryDisplayInds: null,\n        dragHasMoved: null,\n        potentialClickBand: null\n    };\n}\n\n// JSDoc typedefs\n// ==============\n/**\n * @typedef {Object} Layout\n *  Object containing svg layout information\n *\n * @property {Number} width (pixels)\n *  Usable width for Figure (after margins are removed)\n * @property {Number} height (pixels)\n *  Usable height for Figure (after margins are removed)\n * @property {Margin} margin\n *  Margin around the Figure (pixels)\n */\n\n/**\n * @typedef {Object} Margin\n *  Object containing padding information in pixels\n *\n * @property {Number} t\n *  Top margin\n * @property {Number} r\n *  Right margin\n * @property {Number} b\n *  Bottom margin\n * @property {Number} l\n *  Left margin\n */\n\n/**\n * @typedef {Object} Font\n *  Object containing font information\n *\n * @property {Number} size: Font size\n * @property {String} color: Font color\n * @property {String} family: Font family\n */\n\n/**\n * @typedef {Object} ParcatsViewModel\n *  Object containing calculated parcats view information\n *\n *  These are quantities that require Layout information to calculate\n * @property key\n *  Unique key for this model\n * @property {ParcatsModel} model\n *  Source parcats model\n * @property {Array.<DimensionViewModel>} dimensions\n *  Array of dimension view models\n * @property {Number} width\n *  Width for this trace (pixels)\n * @property {Number} height\n *  Height for this trace (pixels)\n * @property {Number} x\n *  X position of this trace with respect to the Figure (pixels)\n * @property {Number} y\n *  Y position of this trace with respect to the Figure (pixels)\n * @property {String} hoveron\n *  Hover interaction mode. One of: 'category', 'color', or 'dimension'\n * @property {Array.<String>} hoverinfoItems\n *  Info to display on hover. Array with a combination of 'counts' and/or 'probabilities', or 'none', or 'skip'\n * @property {String} arrangement\n *  Category arrangement. One of: 'perpendicular', 'freeform', or 'fixed'\n * @property {Boolean} bundlecolors\n *  Whether paths should be sorted so that like colors are bundled together as they pass through categories\n * @property {String} sortpaths\n *  If 'forward' then sort paths based on dimensions from left to right. If 'backward' sort based on dimensions\n *  from right to left\n * @property {Font} labelfont\n *  Font for the dimension labels\n * @property {Font} categorylabelfont\n *  Font for the category labels\n * @property {String} pathShape\n *  The shape of the paths. Either 'linear' or 'hspline'.\n * @property {DimensionViewModel|null} dragDimension\n *  Dimension currently being dragged. Null if no drag in progress\n * @property {Margin} margin\n *  Margin around the Figure\n * @property {Object} graphDiv\n *  Top-level graph div element\n * @property {Object} traceSelection\n *  D3 selection of this view models trace group element\n * @property {Object} pathSelection\n *  D3 selection of this view models path elements\n * @property {Object} dimensionSelection\n *  D3 selection of this view models dimension group element\n */\n\n/**\n * @typedef {Object} DimensionViewModel\n *  Object containing calculated parcats dimension view information\n *\n *  These are quantities that require Layout information to calculate\n * @property key\n *  Unique key for this model\n * @property {DimensionModel} model\n *  Source dimension model\n * @property {Number} x\n *  X position of the center of this dimension with respect to the Figure (pixels)\n * @property {Number} y\n *  Y position of the top of this dimension with respect to the Figure (pixels)\n * @property {Number} width\n *  Width of categories in this dimension (pixels)\n * @property {ParcatsViewModel} parcatsViewModel\n *  The parent trace's view model\n * @property {Array.<CategoryViewModel>} categories\n *  Dimensions category view models\n * @property {Number|null} dragCategoryDisplayInd\n *  Display index of category currently being dragged. null if no category is being dragged\n * @property {Number|null} dragDimensionDisplayInd\n *  Display index of the dimension being dragged. null if no dimension is being dragged\n * @property {Array.<Number>|null} initialDragDimensionDisplayInds\n *  Dimensions display indexes at the beginning of the current drag. null if no dimension is being dragged\n * @property {Array.<Number>|null} initialDragCategoryDisplayInds\n *  Category display indexes for the at the beginning of the current drag. null if no category is being dragged\n * @property {HTMLElement} potentialClickBand\n *  Band under mouse when current drag began. If no drag movement takes place then a click will be emitted for this\n *  band. Null if not drag in progress.\n * @property {Boolean} dragHasMoved\n *  True if there is an active drag and the drag has moved. If drag doesn't move before being ended then\n *  this may be interpreted as a click. Null if no drag in progress\n */\n\n/**\n * @typedef {Object} CategoryViewModel\n *  Object containing calculated parcats category view information\n *\n *  These are quantities that require Layout information to calculate\n * @property key\n *  Unique key for this model\n * @property {CategoryModel} model\n *  Source category model\n * @property {Number} width\n *  Width for this category (pixels)\n * @property {Number} height\n *  Height for this category (pixels)\n * @property {Number} y\n *  Y position of this cateogry with respect to the Figure (pixels)\n * @property {Array.<CategoryBandViewModel>} bands\n *  Array of color bands inside the category\n * @property {ParcatsViewModel} parcatsViewModel\n *  The parent trace's view model\n */\n\n/**\n * @typedef {Object} CategoryBandViewModel\n *  Object containing calculated category band information. A category band is a region inside a category covering\n *  paths of a single color\n *\n * @property key\n *  Unique key for this model\n * @property color\n *  Band color\n * @property rawColor\n *  Raw color value for band\n * @property {Number} width\n *  Band width\n * @property {Number} height\n *  Band height\n * @property {Number} y\n *  Y position of top of the band with respect to the category\n * @property {Number} count\n *  The number of samples represented by the band\n * @property {CategoryViewModel} categoryViewModel\n *  The parent categorie's view model\n * @property {ParcatsViewModel} parcatsViewModel\n *  The parent trace's view model\n */\n\n/**\n * @typedef {Object} PathViewModel\n *  Object containing calculated parcats path view information\n *\n *  These are quantities that require Layout information to calculate\n * @property key\n *  Unique key for this model\n * @property {PathModel} model\n *  Source path model\n * @property {Number} height\n *  Height of this path (pixels)\n * @property {Array.<Number>} leftXs\n *  The x position of the left edge of each display dimension\n * @property {Array.<Number>} topYs\n *  The y position of the top of the path for each display dimension\n * @property {Array.<Number>} dimWidths\n *  The width of each display dimension\n * @property {String} svgD\n *  SVG path \"d\" attribute string\n * @property {ParcatsViewModel} parcatsViewModel\n *  The parent trace's view model\n */\n\n},{\"../../components/drawing\":601,\"../../components/fx\":619,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"../../plot_api/plot_api\":738,\"d3\":157,\"tinycolor2\":524}],1037:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nvar parcats = _dereq_('./parcats');\n\n/**\n * Create / update parcat traces\n *\n * @param {Object} graphDiv\n * @param {Array.<ParcatsModel>} parcatsModels\n */\nmodule.exports = function plot(graphDiv, parcatsModels, transitionOpts, makeOnCompleteCallback) {\n    var fullLayout = graphDiv._fullLayout;\n    var svg = fullLayout._paper;\n    var size = fullLayout._size;\n\n    parcats(\n        graphDiv,\n        svg,\n        parcatsModels,\n        {\n            width: size.w,\n            height: size.h,\n            margin: {\n                t: size.t,\n                r: size.r,\n                b: size.b,\n                l: size.l\n            }\n        },\n        transitionOpts,\n        makeOnCompleteCallback\n    );\n};\n\n},{\"./parcats\":1036}],1038:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar axesAttrs = _dereq_('../../plots/cartesian/layout_attributes');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nmodule.exports = {\n    domain: domainAttrs({name: 'parcoords', trace: true, editType: 'calc'}),\n\n    labelfont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n    tickfont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n    rangefont: fontAttrs({\n        editType: 'calc',\n        \n    }),\n\n    dimensions: templatedArray('dimension', {\n        label: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        // TODO: better way to determine ordinal vs continuous axes,\n        // so users can use tickvals/ticktext with a continuous axis.\n        tickvals: extendFlat({}, axesAttrs.tickvals, {\n            editType: 'calc',\n            \n        }),\n        ticktext: extendFlat({}, axesAttrs.ticktext, {\n            editType: 'calc',\n            \n        }),\n        tickformat: {\n            valType: 'string',\n            dflt: '3s',\n            \n            editType: 'calc',\n            \n        },\n        visible: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'calc',\n            \n        },\n        range: {\n            valType: 'info_array',\n            \n            items: [\n                {valType: 'number', editType: 'calc'},\n                {valType: 'number', editType: 'calc'}\n            ],\n            editType: 'calc',\n            \n        },\n        constraintrange: {\n            valType: 'info_array',\n            \n            freeLength: true,\n            dimensions: '1-2',\n            items: [\n                {valType: 'number', editType: 'calc'},\n                {valType: 'number', editType: 'calc'}\n            ],\n            editType: 'calc',\n            \n        },\n        multiselect: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'calc',\n            \n        },\n        values: {\n            valType: 'data_array',\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc',\n        \n    }),\n\n    line: extendFlat({editType: 'calc'},\n        colorScaleAttrs('line', {\n            // the default autocolorscale isn't quite usable for parcoords due to context ambiguity around 0 (grey, off-white)\n            // autocolorscale therefore defaults to false too, to avoid being overridden by the blue-white-red autocolor palette\n            colorscaleDflt: 'Viridis',\n            autoColorDflt: false,\n            editTypeOverride: 'calc'\n        })\n    )\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/layout_attributes\":763,\"../../plots/domain\":776,\"../../plots/font_attributes\":777}],1039:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar c = _dereq_('./constants');\nvar d3 = _dereq_('d3');\nvar keyFun = _dereq_('../../lib/gup').keyFun;\nvar repeat = _dereq_('../../lib/gup').repeat;\nvar sortAsc = _dereq_('../../lib').sorterAsc;\n\nvar snapRatio = c.bar.snapRatio;\nfunction snapOvershoot(v, vAdjacent) { return v * (1 - snapRatio) + vAdjacent * snapRatio; }\n\nvar snapClose = c.bar.snapClose;\nfunction closeToCovering(v, vAdjacent) { return v * (1 - snapClose) + vAdjacent * snapClose; }\n\n// snap for the low end of a range on an ordinal scale\n// on an ordinal scale, always show some overshoot from the exact value,\n// so it's clear we're covering it\n// find the interval we're in, and snap to 1/4 the distance to the next\n// these two could be unified at a slight loss of readability / perf\nfunction ordinalScaleSnap(isHigh, a, v, existingRanges) {\n    if(overlappingExisting(v, existingRanges)) return v;\n\n    var dir = isHigh ? -1 : 1;\n\n    var first = 0;\n    var last = a.length - 1;\n    if(dir < 0) {\n        var tmp = first;\n        first = last;\n        last = tmp;\n    }\n\n    var aHere = a[first];\n    var aPrev = aHere;\n    for(var i = first; dir * i < dir * last; i += dir) {\n        var nextI = i + dir;\n        var aNext = a[nextI];\n\n        // very close to the previous - snap down to it\n        if(dir * v < dir * closeToCovering(aHere, aNext)) return snapOvershoot(aHere, aPrev);\n        if(dir * v < dir * aNext || nextI === last) return snapOvershoot(aNext, aHere);\n\n        aPrev = aHere;\n        aHere = aNext;\n    }\n}\n\nfunction overlappingExisting(v, existingRanges) {\n    for(var i = 0; i < existingRanges.length; i++) {\n        if(v >= existingRanges[i][0] && v <= existingRanges[i][1]) return true;\n    }\n    return false;\n}\n\nfunction barHorizontalSetup(selection) {\n    selection\n        .attr('x', -c.bar.captureWidth / 2)\n        .attr('width', c.bar.captureWidth);\n}\n\nfunction backgroundBarHorizontalSetup(selection) {\n    selection\n        .attr('visibility', 'visible')\n        .style('visibility', 'visible')\n        .attr('fill', 'yellow')\n        .attr('opacity', 0);\n}\n\nfunction setHighlight(d) {\n    if(!d.brush.filterSpecified) {\n        return '0,' + d.height;\n    }\n    var pixelRanges = unitToPx(d.brush.filter.getConsolidated(), d.height);\n    var dashArray = [0]; // we start with a 0 length selection as filter ranges are inclusive, not exclusive\n    var p, sectionHeight, iNext;\n    var currentGap = pixelRanges.length ? pixelRanges[0][0] : null;\n    for(var i = 0; i < pixelRanges.length; i++) {\n        p = pixelRanges[i];\n        sectionHeight = p[1] - p[0];\n        dashArray.push(currentGap);\n        dashArray.push(sectionHeight);\n        iNext = i + 1;\n        if(iNext < pixelRanges.length) {\n            currentGap = pixelRanges[iNext][0] - p[1];\n        }\n    }\n    dashArray.push(d.height);\n    // d.height is added at the end to ensure that (1) we have an even number of dasharray points, MDN page says\n    // \"If an odd number of values is provided, then the list of values is repeated to yield an even number of values.\"\n    // and (2) it's _at least_ as long as the full height (even if range is minuscule and at the bottom) though this\n    // may not be necessary, maybe duplicating the last point would do too. But no harm in a longer dasharray than line.\n    return dashArray;\n}\n\nfunction unitToPx(unitRanges, height) {\n    return unitRanges.map(function(pr) {\n        return pr.map(function(v) { return v * height; }).sort(sortAsc);\n    });\n}\n\n// is the cursor over the north, middle, or south of a bar?\n// the end handles extend over the last 10% of the bar\nfunction getRegion(fPix, y) {\n    var pad = c.bar.handleHeight;\n    if(y > fPix[1] + pad || y < fPix[0] - pad) return;\n    if(y >= 0.9 * fPix[1] + 0.1 * fPix[0]) return 'n';\n    if(y <= 0.9 * fPix[0] + 0.1 * fPix[1]) return 's';\n    return 'ns';\n}\n\nfunction clearCursor() {\n    d3.select(document.body)\n        .style('cursor', null);\n}\n\nfunction styleHighlight(selection) {\n    // stroke-dasharray is used to minimize the number of created DOM nodes, because the requirement calls for up to\n    // 1000 individual selections on an axis, and there can be 60 axes per parcoords, and multiple parcoords per\n    // dashboard. The technique is similar to https://codepen.io/monfera/pen/rLYqWR and using a `polyline` with\n    // multiple sections, or a `path` element via its `d` attribute would also be DOM-sparing alternatives.\n    selection.attr('stroke-dasharray', setHighlight);\n}\n\nfunction renderHighlight(root, tweenCallback) {\n    var bar = d3.select(root).selectAll('.highlight, .highlight-shadow');\n    var barToStyle = tweenCallback ? bar.transition().duration(c.bar.snapDuration).each('end', tweenCallback) : bar;\n    styleHighlight(barToStyle);\n}\n\nfunction getInterval(d, y) {\n    var b = d.brush;\n    var active = b.filterSpecified;\n    var closestInterval = NaN;\n    var out = {};\n    var i;\n\n    if(active) {\n        var height = d.height;\n        var intervals = b.filter.getConsolidated();\n        var pixIntervals = unitToPx(intervals, height);\n        var hoveredInterval = NaN;\n        var previousInterval = NaN;\n        var nextInterval = NaN;\n        for(i = 0; i <= pixIntervals.length; i++) {\n            var p = pixIntervals[i];\n            if(p && p[0] <= y && y <= p[1]) {\n                // over a bar\n                hoveredInterval = i;\n                break;\n            } else {\n                // between bars, or before/after the first/last bar\n                previousInterval = i ? i - 1 : NaN;\n                if(p && p[0] > y) {\n                    nextInterval = i;\n                    break; // no point continuing as intervals are non-overlapping and sorted; could use log search\n                }\n            }\n        }\n\n        closestInterval = hoveredInterval;\n        if(isNaN(closestInterval)) {\n            if(isNaN(previousInterval) || isNaN(nextInterval)) {\n                closestInterval = isNaN(previousInterval) ? nextInterval : previousInterval;\n            } else {\n                closestInterval = (y - pixIntervals[previousInterval][1] < pixIntervals[nextInterval][0] - y) ?\n                    previousInterval : nextInterval;\n            }\n        }\n\n        if(!isNaN(closestInterval)) {\n            var fPix = pixIntervals[closestInterval];\n            var region = getRegion(fPix, y);\n\n            if(region) {\n                out.interval = intervals[closestInterval];\n                out.intervalPix = fPix;\n                out.region = region;\n            }\n        }\n    }\n\n    if(d.ordinal && !out.region) {\n        var a = d.unitTickvals;\n        var unitLocation = d.unitToPaddedPx.invert(y);\n        for(i = 0; i < a.length; i++) {\n            var rangei = [\n                a[Math.max(i - 1, 0)] * 0.25 + a[i] * 0.75,\n                a[Math.min(i + 1, a.length - 1)] * 0.25 + a[i] * 0.75\n            ];\n            if(unitLocation >= rangei[0] && unitLocation <= rangei[1]) {\n                out.clickableOrdinalRange = rangei;\n                break;\n            }\n        }\n    }\n\n    return out;\n}\n\nfunction attachDragBehavior(selection) {\n    // There's some fiddling with pointer cursor styling so that the cursor preserves its shape while dragging a brush\n    // even if the cursor strays from the interacting bar, which is bound to happen as bars are thin and the user\n    // will inevitably leave the hotspot strip. In this regard, it does something similar to what the D3 brush would do.\n    selection\n        .on('mousemove', function(d) {\n            d3.event.preventDefault();\n            if(!d.parent.inBrushDrag) {\n                var y = d.height - d3.mouse(this)[1] - 2 * c.verticalPadding;\n                var interval = getInterval(d, y);\n\n                var cursor = 'crosshair';\n                if(interval.clickableOrdinalRange) cursor = 'pointer';\n                else if(interval.region) cursor = interval.region + '-resize';\n                d3.select(document.body)\n                    .style('cursor', cursor);\n            }\n        })\n        .on('mouseleave', function(d) {\n            if(!d.parent.inBrushDrag) clearCursor();\n        })\n        .call(d3.behavior.drag()\n            .on('dragstart', function(d) {\n                d3.event.sourceEvent.stopPropagation();\n                var y = d.height - d3.mouse(this)[1] - 2 * c.verticalPadding;\n                var unitLocation = d.unitToPaddedPx.invert(y);\n                var b = d.brush;\n                var interval = getInterval(d, y);\n                var unitRange = interval.interval;\n                var s = b.svgBrush;\n                s.wasDragged = false; // we start assuming there won't be a drag - useful for reset\n                s.grabbingBar = interval.region === 'ns';\n                if(s.grabbingBar) {\n                    var pixelRange = unitRange.map(d.unitToPaddedPx);\n                    s.grabPoint = y - pixelRange[0] - c.verticalPadding;\n                    s.barLength = pixelRange[1] - pixelRange[0];\n                }\n                s.clickableOrdinalRange = interval.clickableOrdinalRange;\n                s.stayingIntervals = (d.multiselect && b.filterSpecified) ? b.filter.getConsolidated() : [];\n                if(unitRange) {\n                    s.stayingIntervals = s.stayingIntervals.filter(function(int2) {\n                        return int2[0] !== unitRange[0] && int2[1] !== unitRange[1];\n                    });\n                }\n                s.startExtent = interval.region ? unitRange[interval.region === 's' ? 1 : 0] : unitLocation;\n                d.parent.inBrushDrag = true;\n                s.brushStartCallback();\n            })\n            .on('drag', function(d) {\n                d3.event.sourceEvent.stopPropagation();\n                var y = d.height - d3.mouse(this)[1] - 2 * c.verticalPadding;\n                var s = d.brush.svgBrush;\n                s.wasDragged = true;\n\n                if(s.grabbingBar) { // moving the bar\n                    s.newExtent = [y - s.grabPoint, y + s.barLength - s.grabPoint].map(d.unitToPaddedPx.invert);\n                } else { // south/north drag or new bar creation\n                    s.newExtent = [s.startExtent, d.unitToPaddedPx.invert(y)].sort(sortAsc);\n                }\n\n                // take care of the parcoords axis height constraint: bar can't breach it\n                var bottomViolation = Math.max(0, -s.newExtent[0]);\n                var topViolation = Math.max(0, s.newExtent[1] - 1);\n                s.newExtent[0] += bottomViolation;\n                s.newExtent[1] -= topViolation;\n                if(s.grabbingBar) {\n                    // in case of bar dragging (non-resizing interaction, unlike north/south resize or new bar creation)\n                    // the constraint adjustment must apply to the other end of the bar as well, otherwise it'd\n                    // shorten or lengthen\n                    s.newExtent[1] += bottomViolation;\n                    s.newExtent[0] -= topViolation;\n                }\n\n                d.brush.filterSpecified = true;\n                s.extent = s.stayingIntervals.concat([s.newExtent]);\n                s.brushCallback(d);\n                renderHighlight(this.parentNode);\n            })\n            .on('dragend', function(d) {\n                var e = d3.event;\n                e.sourceEvent.stopPropagation();\n                var brush = d.brush;\n                var filter = brush.filter;\n                var s = brush.svgBrush;\n                var grabbingBar = s.grabbingBar;\n                s.grabbingBar = false;\n                s.grabLocation = undefined;\n                d.parent.inBrushDrag = false;\n                clearCursor(); // instead of clearing, a nicer thing would be to set it according to current location\n                if(!s.wasDragged) { // a click+release on the same spot (ie. w/o dragging) means a bar or full reset\n                    s.wasDragged = undefined; // logic-wise unneeded, just shows `wasDragged` has no longer a meaning\n                    if(s.clickableOrdinalRange) {\n                        if(brush.filterSpecified && d.multiselect) {\n                            s.extent.push(s.clickableOrdinalRange);\n                        } else {\n                            s.extent = [s.clickableOrdinalRange];\n                            brush.filterSpecified = true;\n                        }\n                    } else if(grabbingBar) {\n                        s.extent = s.stayingIntervals;\n                        if(s.extent.length === 0) {\n                            brushClear(brush);\n                        }\n                    } else {\n                        brushClear(brush);\n                    }\n                    s.brushCallback(d);\n                    renderHighlight(this.parentNode);\n                    s.brushEndCallback(brush.filterSpecified ? filter.getConsolidated() : []);\n                    return; // no need to fuse intervals or snap to ordinals, so we can bail early\n                }\n\n                var mergeIntervals = function() {\n                    // Key piece of logic: once the button is released, possibly overlapping intervals will be fused:\n                    // Here it's done immediately on click release while on ordinal snap transition it's done at the end\n                    filter.set(filter.getConsolidated());\n                };\n\n                if(d.ordinal) {\n                    var a = d.unitTickvals;\n                    if(a[a.length - 1] < a[0]) a.reverse();\n                    s.newExtent = [\n                        ordinalScaleSnap(0, a, s.newExtent[0], s.stayingIntervals),\n                        ordinalScaleSnap(1, a, s.newExtent[1], s.stayingIntervals)\n                    ];\n                    var hasNewExtent = s.newExtent[1] > s.newExtent[0];\n                    s.extent = s.stayingIntervals.concat(hasNewExtent ? [s.newExtent] : []);\n                    if(!s.extent.length) {\n                        brushClear(brush);\n                    }\n                    s.brushCallback(d);\n                    if(hasNewExtent) {\n                        // merging intervals post the snap tween\n                        renderHighlight(this.parentNode, mergeIntervals);\n                    } else {\n                        // if no new interval, don't animate, just redraw the highlight immediately\n                        mergeIntervals();\n                        renderHighlight(this.parentNode);\n                    }\n                } else {\n                    mergeIntervals(); // merging intervals immediately\n                }\n                s.brushEndCallback(brush.filterSpecified ? filter.getConsolidated() : []);\n            })\n        );\n}\n\nfunction startAsc(a, b) { return a[0] - b[0]; }\n\nfunction renderAxisBrush(axisBrush) {\n    var background = axisBrush.selectAll('.background').data(repeat);\n\n    background.enter()\n        .append('rect')\n        .classed('background', true)\n        .call(barHorizontalSetup)\n        .call(backgroundBarHorizontalSetup)\n        .style('pointer-events', 'auto') // parent pointer events are disabled; we must have it to register events\n        .attr('transform', 'translate(0 ' + c.verticalPadding + ')');\n\n    background\n        .call(attachDragBehavior)\n        .attr('height', function(d) {\n            return d.height - c.verticalPadding;\n        });\n\n    var highlightShadow = axisBrush.selectAll('.highlight-shadow').data(repeat); // we have a set here, can't call it `extent`\n\n    highlightShadow.enter()\n        .append('line')\n        .classed('highlight-shadow', true)\n        .attr('x', -c.bar.width / 2)\n        .attr('stroke-width', c.bar.width + c.bar.strokeWidth)\n        .attr('stroke', c.bar.strokeColor)\n        .attr('opacity', c.bar.strokeOpacity)\n        .attr('stroke-linecap', 'butt');\n\n    highlightShadow\n        .attr('y1', function(d) { return d.height; })\n        .call(styleHighlight);\n\n    var highlight = axisBrush.selectAll('.highlight').data(repeat); // we have a set here, can't call it `extent`\n\n    highlight.enter()\n        .append('line')\n        .classed('highlight', true)\n        .attr('x', -c.bar.width / 2)\n        .attr('stroke-width', c.bar.width - c.bar.strokeWidth)\n        .attr('stroke', c.bar.fillColor)\n        .attr('opacity', c.bar.fillOpacity)\n        .attr('stroke-linecap', 'butt');\n\n    highlight\n        .attr('y1', function(d) { return d.height; })\n        .call(styleHighlight);\n}\n\nfunction ensureAxisBrush(axisOverlays) {\n    var axisBrush = axisOverlays.selectAll('.' + c.cn.axisBrush)\n        .data(repeat, keyFun);\n\n    axisBrush.enter()\n        .append('g')\n        .classed(c.cn.axisBrush, true);\n\n    renderAxisBrush(axisBrush);\n}\n\nfunction getBrushExtent(brush) {\n    return brush.svgBrush.extent.map(function(e) {return e.slice();});\n}\n\nfunction brushClear(brush) {\n    brush.filterSpecified = false;\n    brush.svgBrush.extent = [[0, 1]];\n}\n\nfunction axisBrushMoved(callback) {\n    return function axisBrushMoved(dimension) {\n        var brush = dimension.brush;\n        var extent = getBrushExtent(brush);\n        var newExtent = extent.slice();\n        brush.filter.set(newExtent);\n        callback();\n    };\n}\n\nfunction dedupeRealRanges(intervals) {\n    // Fuses elements of intervals if they overlap, yielding discontiguous intervals, results.length <= intervals.length\n    // Currently uses closed intervals, ie. dedupeRealRanges([[400, 800], [300, 400]]) -> [300, 800]\n    var queue = intervals.slice();\n    var result = [];\n    var currentInterval;\n    var current = queue.shift();\n    while(current) { // [].shift === undefined, so we don't descend into an empty array\n        currentInterval = current.slice();\n        while((current = queue.shift()) && current[0] <= /* right-open interval would need `<` */ currentInterval[1]) {\n            currentInterval[1] = Math.max(currentInterval[1], current[1]);\n        }\n        result.push(currentInterval);\n    }\n    return result;\n}\n\nfunction makeFilter() {\n    var filter = [];\n    var consolidated;\n    var bounds;\n    return {\n        set: function(a) {\n            filter = a\n                .map(function(d) { return d.slice().sort(sortAsc); })\n                .sort(startAsc);\n            consolidated = dedupeRealRanges(filter);\n            bounds = filter.reduce(function(p, n) {\n                return [Math.min(p[0], n[0]), Math.max(p[1], n[1])];\n            }, [Infinity, -Infinity]);\n        },\n        get: function() { return filter.slice(); },\n        getConsolidated: function() { return consolidated; },\n        getBounds: function() { return bounds; }\n    };\n}\n\nfunction makeBrush(state, rangeSpecified, initialRange, brushStartCallback, brushCallback, brushEndCallback) {\n    var filter = makeFilter();\n    filter.set(initialRange);\n    return {\n        filter: filter,\n        filterSpecified: rangeSpecified, // there's a difference between not filtering and filtering a non-proper subset\n        svgBrush: {\n            extent: [], // this is where the svgBrush writes contents into\n            brushStartCallback: brushStartCallback,\n            brushCallback: axisBrushMoved(brushCallback),\n            brushEndCallback: brushEndCallback\n        }\n    };\n}\n\n// for use by supplyDefaults, but it needed tons of pieces from here so\n// seemed to make more sense just to put the whole routine here\nfunction cleanRanges(ranges, dimension) {\n    if(Array.isArray(ranges[0])) {\n        ranges = ranges.map(function(ri) { return ri.sort(sortAsc); });\n\n        if(!dimension.multiselect) ranges = [ranges[0]];\n        else ranges = dedupeRealRanges(ranges.sort(startAsc));\n    } else ranges = [ranges.sort(sortAsc)];\n\n    // ordinal snapping\n    if(dimension.tickvals) {\n        var sortedTickVals = dimension.tickvals.slice().sort(sortAsc);\n        ranges = ranges.map(function(ri) {\n            var rSnapped = [\n                ordinalScaleSnap(0, sortedTickVals, ri[0], []),\n                ordinalScaleSnap(1, sortedTickVals, ri[1], [])\n            ];\n            if(rSnapped[1] > rSnapped[0]) return rSnapped;\n        })\n        .filter(function(ri) { return ri; });\n\n        if(!ranges.length) return;\n    }\n    return ranges.length > 1 ? ranges : ranges[0];\n}\n\nmodule.exports = {\n    makeBrush: makeBrush,\n    ensureAxisBrush: ensureAxisBrush,\n    cleanRanges: cleanRanges\n};\n\n},{\"../../lib\":703,\"../../lib/gup\":701,\"./constants\":1042,\"d3\":157}],1040:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\nvar parcoordsPlot = _dereq_('./plot');\nvar xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');\n\nvar PARCOORDS = 'parcoords';\n\nexports.name = PARCOORDS;\n\nexports.plot = function(gd) {\n    var calcData = getModuleCalcData(gd.calcdata, PARCOORDS)[0];\n    if(calcData.length) parcoordsPlot(gd, calcData);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadParcoords = (oldFullLayout._has && oldFullLayout._has(PARCOORDS));\n    var hasParcoords = (newFullLayout._has && newFullLayout._has(PARCOORDS));\n\n    if(hadParcoords && !hasParcoords) {\n        oldFullLayout._paperdiv.selectAll('.parcoords').remove();\n        oldFullLayout._glimages.selectAll('*').remove();\n    }\n};\n\nexports.toSVG = function(gd) {\n    var imageRoot = gd._fullLayout._glimages;\n    var root = d3.select(gd).selectAll('.svg-container');\n    var canvases = root.filter(function(d, i) {return i === root.size() - 1;})\n        .selectAll('.gl-canvas-context, .gl-canvas-focus');\n\n    function canvasToImage() {\n        var canvas = this;\n        var imageData = canvas.toDataURL('image/png');\n        var image = imageRoot.append('svg:image');\n\n        image.attr({\n            xmlns: xmlnsNamespaces.svg,\n            'xlink:href': imageData,\n            preserveAspectRatio: 'none',\n            x: 0,\n            y: 0,\n            width: canvas.width,\n            height: canvas.height\n        });\n    }\n\n    canvases.each(canvasToImage);\n\n    // Chrome / Safari bug workaround - browser apparently loses connection to the defined pattern\n    // Without the workaround, these browsers 'lose' the filter brush styling (color etc.) after a snapshot\n    // on a subsequent interaction.\n    // Firefox works fine without this workaround\n    window.setTimeout(function() {\n        d3.selectAll('#filterBarPattern')\n            .attr('id', 'filterBarPattern');\n    }, 60);\n};\n\n},{\"../../constants/xmlns_namespaces\":681,\"../../plots/get_data\":786,\"./plot\":1048,\"d3\":157}],1041:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Colorscale = _dereq_('../../components/colorscale');\nvar Lib = _dereq_('../../lib');\nvar wrap = _dereq_('../../lib/gup').wrap;\n\nmodule.exports = function calc(gd, trace) {\n    for(var i = 0; i < trace.dimensions.length; i++) {\n        trace.dimensions[i].values = convertTypedArray(trace.dimensions[i].values);\n    }\n    trace.line.color = convertTypedArray(trace.line.color);\n\n    var lineColor;\n    var cscale;\n\n    if(Colorscale.hasColorscale(trace, 'line') && Array.isArray(trace.line.color)) {\n        lineColor = trace.line.color;\n        cscale = Colorscale.extractOpts(trace.line).colorscale;\n\n        Colorscale.calc(gd, trace, {\n            vals: lineColor,\n            containerStr: 'line',\n            cLetter: 'c'\n        });\n    } else {\n        lineColor = constHalf(trace._length);\n        cscale = [[0, trace.line.color], [1, trace.line.color]];\n    }\n\n    return wrap({lineColor: lineColor, cscale: cscale});\n};\n\nfunction constHalf(len) {\n    var out = new Array(len);\n    for(var i = 0; i < len; i++) {\n        out[i] = 0.5;\n    }\n    return out;\n}\n\nfunction convertTypedArray(a) {\n    return Lib.isTypedArray(a) ? Array.prototype.slice.call(a) : a;\n}\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gup\":701}],1042:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n\nmodule.exports = {\n    maxDimensionCount: 60, // this cannot be increased without WebGL code refactoring\n    overdrag: 45,\n    verticalPadding: 2, // otherwise, horizontal lines on top or bottom are of lower width\n    tickDistance: 50,\n    canvasPixelRatio: 1,\n    blockLineCount: 5000,\n    layers: ['contextLineLayer', 'focusLineLayer', 'pickLineLayer'],\n    axisTitleOffset: 28,\n    axisExtentOffset: 10,\n    bar: {\n        width: 4, // Visible width of the filter bar\n        captureWidth: 10, // Mouse-sensitive width for interaction (Fitts law)\n        fillColor: 'magenta', // Color of the filter bar fill\n        fillOpacity: 1, // Filter bar fill opacity\n        snapDuration: 150, // tween duration in ms for brush snap for ordinal axes\n        snapRatio: 0.25, // ratio of bar extension relative to the distance between two adjacent ordinal values\n        snapClose: 0.01, // fraction of inter-value distance to snap to the closer one, even if you're not over it\n        strokeColor: 'white', // Color of the filter bar side lines\n        strokeOpacity: 1, // Filter bar side stroke opacity\n        strokeWidth: 1, // Filter bar side stroke width in pixels\n        handleHeight: 8, // Height of the filter bar vertical resize areas on top and bottom\n        handleOpacity: 1, // Opacity of the filter bar vertical resize areas on top and bottom\n        handleOverlap: 0 // A larger than 0 value causes overlaps with the filter bar, represented as pixels\n    },\n    cn: {\n        axisExtentText: 'axis-extent-text',\n        parcoordsLineLayers: 'parcoords-line-layers',\n        parcoordsLineLayer: 'parcoords-lines',\n        parcoords: 'parcoords',\n        parcoordsControlView: 'parcoords-control-view',\n        yAxis: 'y-axis',\n        axisOverlays: 'axis-overlays',\n        axis: 'axis',\n        axisHeading: 'axis-heading',\n        axisTitle: 'axis-title',\n        axisExtent: 'axis-extent',\n        axisExtentTop: 'axis-extent-top',\n        axisExtentTopText: 'axis-extent-top-text',\n        axisExtentBottom: 'axis-extent-bottom',\n        axisExtentBottomText: 'axis-extent-bottom-text',\n        axisBrush: 'axis-brush'\n    },\n    id: {\n        filterBarPattern: 'filter-bar-pattern'\n\n    }\n};\n\n},{}],1043:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar axisBrush = _dereq_('./axisbrush');\nvar maxDimensionCount = _dereq_('./constants').maxDimensionCount;\nvar mergeLength = _dereq_('./merge_length');\n\nfunction handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) {\n    var lineColor = coerce('line.color', defaultColor);\n\n    if(hasColorscale(traceIn, 'line') && Lib.isArrayOrTypedArray(lineColor)) {\n        if(lineColor.length) {\n            coerce('line.colorscale');\n            colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'line.', cLetter: 'c'});\n            // TODO: I think it would be better to keep showing lines beyond the last line color\n            // but I'm not sure what color to give these lines - probably black or white\n            // depending on the background color?\n            return lineColor.length;\n        } else {\n            traceOut.line.color = defaultColor;\n        }\n    }\n    return Infinity;\n}\n\nfunction dimensionDefaults(dimensionIn, dimensionOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(dimensionIn, dimensionOut, attributes.dimensions, attr, dflt);\n    }\n\n    var values = coerce('values');\n    var visible = coerce('visible');\n    if(!(values && values.length)) {\n        visible = dimensionOut.visible = false;\n    }\n\n    if(visible) {\n        coerce('label');\n        coerce('tickvals');\n        coerce('ticktext');\n        coerce('tickformat');\n        coerce('range');\n\n        coerce('multiselect');\n        var constraintRange = coerce('constraintrange');\n        if(constraintRange) {\n            dimensionOut.constraintrange = axisBrush.cleanRanges(constraintRange, dimensionOut);\n        }\n    }\n}\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var dimensionsIn = traceIn.dimensions;\n    if(Array.isArray(dimensionsIn) && dimensionsIn.length > maxDimensionCount) {\n        Lib.log('parcoords traces support up to ' + maxDimensionCount + ' dimensions at the moment');\n        dimensionsIn.splice(maxDimensionCount);\n    }\n\n    var dimensions = handleArrayContainerDefaults(traceIn, traceOut, {\n        name: 'dimensions',\n        handleItemDefaults: dimensionDefaults\n    });\n\n    var len = handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    if(!Array.isArray(dimensions) || !dimensions.length) {\n        traceOut.visible = false;\n    }\n\n    mergeLength(traceOut, dimensions, 'values', len);\n\n    // make default font size 10px (default is 12),\n    // scale linearly with global font size\n    var fontDflt = {\n        family: layout.font.family,\n        size: Math.round(layout.font.size / 1.2),\n        color: layout.font.color\n    };\n\n    Lib.coerceFont(coerce, 'labelfont', fontDflt);\n    Lib.coerceFont(coerce, 'tickfont', fontDflt);\n    Lib.coerceFont(coerce, 'rangefont', fontDflt);\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../components/colorscale/helpers\":591,\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../../plots/domain\":776,\"./attributes\":1038,\"./axisbrush\":1039,\"./constants\":1042,\"./merge_length\":1046}],1044:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    colorbar: {\n        container: 'line',\n        min: 'cmin',\n        max: 'cmax'\n    },\n\n    moduleType: 'trace',\n    name: 'parcoords',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['gl', 'regl', 'noOpacity', 'noHover'],\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1038,\"./base_plot\":1040,\"./calc\":1041,\"./defaults\":1043,\"./plot\":1048}],1045:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar glslify = _dereq_('glslify');\nvar vertexShaderSource = glslify([\"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;\\nuniform sampler2D mask;\\nuniform float maskHeight;\\n\\nuniform vec2 colorClamp;\\n\\nvarying vec4 fragColor;\\n\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\n\\nfloat val(mat4 p, mat4 v) {\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\n}\\n\\nfloat axisY(\\n        float x,\\n        mat4 d[4],\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\n    ) {\\n\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\n    return y1 * (1.0 - x) + y2 * x;\\n}\\n\\nconst int bitsPerByte = 8;\\n\\nint mod2(int a) {\\n    return a - 2 * (a / 2);\\n}\\n\\nint mod8(int a) {\\n    return a - 8 * (a / 8);\\n}\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit_0 = 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\\nbool withinBoundingBox(\\n        mat4 d[4],\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\n    ) {\\n\\n    return mshow(d[0], loA, hiA) &&\\n           mshow(d[1], loB, hiB) &&\\n           mshow(d[2], loC, hiC) &&\\n           mshow(d[3], loD, hiD);\\n}\\n\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\n    bool result = true;\\n    int bitInByteStepper;\\n    float valY, valueY, scaleX;\\n    int hit, bitmask, valX;\\n    for(int i = 0; i < 4; i++) {\\n        for(int j = 0; j < 4; j++) {\\n            for(int k = 0; k < 4; k++) {\\n                bitInByteStepper = mod8(j * 4 + k);\\n                valX = i * 2 + j / 2;\\n                valY = d[i][j][k];\\n                valueY = valY * (height - 1.0) + 0.5;\\n                scaleX = (float(valX) + 0.5) / 8.0;\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\n                result = result && mod2(hit) == 1;\\n            }\\n        }\\n    }\\n    return result;\\n}\\n\\nvec4 position(\\n        float depth,\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\n        mat4 dims[4],\\n        float signum,\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\n        sampler2D mask, float maskHeight\\n    ) {\\n\\n    float x = 0.5 * signum + 0.5;\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\n\\n    float show = float(\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\n                         && withinRasterMask(dims, mask, maskHeight)\\n                      );\\n\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n    return vec4(\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n        depthOrHide,\\n        1.0\\n    );\\n}\\n\\nvoid main() {\\n\\n    float prominence = abs(pf[3]);\\n\\n    mat4 p[4];\\n    p[0] = mat4(p0, p1, p2, p3);\\n    p[1] = mat4(p4, p5, p6, p7);\\n    p[2] = mat4(p8, p9, pa, pb);\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\n\\n    gl_Position = position(\\n        1.0 - prominence,\\n        resolution, viewBoxPosition, viewBoxSize,\\n        p,\\n        sign(pf[3]),\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\n        mask, maskHeight\\n    );\\n\\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\"]);\nvar contextShaderSource = glslify([\"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\\nuniform vec2 resolution,\\n             viewBoxPosition,\\n             viewBoxSize;\\n\\nuniform sampler2D palette;\\n\\nuniform vec2 colorClamp;\\n\\nvarying vec4 fragColor;\\n\\nvec2 xyProjection = vec2(1, 1);\\n\\nvec4 unit = vec4(1, 1, 1, 1);\\n\\nfloat val(mat4 p, mat4 v) {\\n    return dot(matrixCompMult(p, v) * unit, unit);\\n}\\n\\nfloat axisY(\\n        float x,\\n        mat4 d[4],\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\n    ) {\\n\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\n    return y1 * (1.0 - x) + y2 * x;\\n}\\n\\nvec4 position(\\n        float depth,\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\n        mat4 dims[4],\\n        float signum,\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\n    ) {\\n\\n    float x = 0.5 * signum + 0.5;\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\n\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\n\\n    return vec4(\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n        depth,\\n        1.0\\n    );\\n}\\n\\nvoid main() {\\n\\n    float prominence = abs(pf[3]);\\n\\n    mat4 p[4];\\n    p[0] = mat4(p0, p1, p2, p3);\\n    p[1] = mat4(p4, p5, p6, p7);\\n    p[2] = mat4(p8, p9, pa, pb);\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\n\\n    gl_Position = position(\\n        1.0 - prominence,\\n        resolution, viewBoxPosition, viewBoxSize,\\n        p,\\n        sign(pf[3]),\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D\\n    );\\n\\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\"]);\nvar pickVertexShaderSource = glslify([\"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 mask;\\nuniform float maskHeight;\\n\\nuniform vec2 colorClamp;\\n\\nvarying vec4 fragColor;\\n\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\n\\nfloat val(mat4 p, mat4 v) {\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\n}\\n\\nfloat axisY(\\n        float x,\\n        mat4 d[4],\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\n    ) {\\n\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\n    return y1 * (1.0 - x) + y2 * x;\\n}\\n\\nconst int bitsPerByte = 8;\\n\\nint mod2(int a) {\\n    return a - 2 * (a / 2);\\n}\\n\\nint mod8(int a) {\\n    return a - 8 * (a / 8);\\n}\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit_0 = 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\\nbool withinBoundingBox(\\n        mat4 d[4],\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\n    ) {\\n\\n    return mshow(d[0], loA, hiA) &&\\n           mshow(d[1], loB, hiB) &&\\n           mshow(d[2], loC, hiC) &&\\n           mshow(d[3], loD, hiD);\\n}\\n\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\n    bool result = true;\\n    int bitInByteStepper;\\n    float valY, valueY, scaleX;\\n    int hit, bitmask, valX;\\n    for(int i = 0; i < 4; i++) {\\n        for(int j = 0; j < 4; j++) {\\n            for(int k = 0; k < 4; k++) {\\n                bitInByteStepper = mod8(j * 4 + k);\\n                valX = i * 2 + j / 2;\\n                valY = d[i][j][k];\\n                valueY = valY * (height - 1.0) + 0.5;\\n                scaleX = (float(valX) + 0.5) / 8.0;\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\n                result = result && mod2(hit) == 1;\\n            }\\n        }\\n    }\\n    return result;\\n}\\n\\nvec4 position(\\n        float depth,\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\n        mat4 dims[4],\\n        float signum,\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\n        sampler2D mask, float maskHeight\\n    ) {\\n\\n    float x = 0.5 * signum + 0.5;\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\n\\n    float show = float(\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\n                         && withinRasterMask(dims, mask, maskHeight)\\n                      );\\n\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n    return vec4(\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n        depthOrHide,\\n        1.0\\n    );\\n}\\n\\nvoid main() {\\n\\n    float prominence = abs(pf[3]);\\n\\n    mat4 p[4];\\n    p[0] = mat4(p0, p1, p2, p3);\\n    p[1] = mat4(p4, p5, p6, p7);\\n    p[2] = mat4(p8, p9, pa, pb);\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\n\\n    gl_Position = position(\\n        1.0 - prominence,\\n        resolution, viewBoxPosition, viewBoxSize,\\n        p,\\n        sign(pf[3]),\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\n        mask, maskHeight\\n    );\\n\\n    fragColor = vec4(pf.rgb, 1.0);\\n}\\n\"]);\nvar fragmentShaderSource = glslify([\"precision lowp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n    gl_FragColor = fragColor;\\n}\\n\"]);\n\nvar Lib = _dereq_('../../lib');\n\n// don't change; otherwise near/far plane lines are lost\nvar depthLimitEpsilon = 1e-6;\n// just enough buffer for an extra bit at single-precision floating point\n// which on [0, 1] is 6e-8 (1/2^24)\nvar filterEpsilon = 1e-7;\n\n// precision of multiselect is the full range divided into this many parts\nvar maskHeight = 2048;\n\nvar gpuDimensionCount = 64;\nvar sectionVertexCount = 2;\nvar vec4NumberCount = 4;\nvar bitsPerByte = 8;\nvar channelCount = gpuDimensionCount / bitsPerByte; // == 8 bytes needed to have 64 bits\n\nvar contextColor = [119, 119, 119]; // middle gray to not drawn the focus; looks good on a black or white background\n\nvar dummyPixel = new Uint8Array(4);\nvar pickPixel = new Uint8Array(4);\n\nvar paletteTextureConfig = {\n    shape: [256, 1],\n    format: 'rgba',\n    type: 'uint8',\n    mag: 'nearest',\n    min: 'nearest'\n};\n\nfunction ensureDraw(regl) {\n    regl.read({\n        x: 0,\n        y: 0,\n        width: 1,\n        height: 1,\n        data: dummyPixel\n    });\n}\n\nfunction clear(regl, x, y, width, height) {\n    var gl = regl._gl;\n    gl.enable(gl.SCISSOR_TEST);\n    gl.scissor(x, y, width, height);\n    regl.clear({color: [0, 0, 0, 0], depth: 1}); // clearing is done in scissored panel only\n}\n\nfunction renderBlock(regl, glAes, renderState, blockLineCount, sampleCount, item) {\n    var rafKey = item.key;\n\n    function render(blockNumber) {\n        var count;\n\n        count = Math.min(blockLineCount, sampleCount - blockNumber * blockLineCount);\n\n        item.offset = sectionVertexCount * blockNumber * blockLineCount;\n        item.count = sectionVertexCount * count;\n        if(blockNumber === 0) {\n            // stop drawing possibly stale glyphs before clearing\n            window.cancelAnimationFrame(renderState.currentRafs[rafKey]);\n            delete renderState.currentRafs[rafKey];\n            clear(regl, item.scissorX, item.scissorY, item.scissorWidth, item.viewBoxSize[1]);\n        }\n\n        if(renderState.clearOnly) {\n            return;\n        }\n\n        glAes(item);\n\n        if(blockNumber * blockLineCount + count < sampleCount) {\n            renderState.currentRafs[rafKey] = window.requestAnimationFrame(function() {\n                render(blockNumber + 1);\n            });\n        }\n\n        renderState.drawCompleted = false;\n    }\n\n    if(!renderState.drawCompleted) {\n        ensureDraw(regl);\n        renderState.drawCompleted = true;\n    }\n\n    // start with rendering item 0; recursion handles the rest\n    render(0);\n}\n\nfunction adjustDepth(d) {\n    // WebGL matrix operations use floats with limited precision, potentially causing a number near a border of [0, 1]\n    // to end up slightly outside the border. With an epsilon, we reduce the chance that a line gets clipped by the\n    // near or the far plane.\n    return Math.max(depthLimitEpsilon, Math.min(1 - depthLimitEpsilon, d));\n}\n\nfunction palette(unitToColor, context, opacity) {\n    var result = [];\n    for(var j = 0; j < 256; j++) {\n        var c = unitToColor(j / 255);\n        result.push((context ? contextColor : c).concat(opacity));\n    }\n\n    return result;\n}\n\n// Maps the sample index [0...sampleCount - 1] to a range of [0, 1] as the shader expects colors in the [0, 1] range.\n// but first it shifts the sample index by 0, 8 or 16 bits depending on rgbIndex [0..2]\n// with the end result that each line will be of a unique color, making it possible for the pick handler\n// to uniquely identify which line is hovered over (bijective mapping).\n// The inverse, i.e. readPixel is invoked from 'parcoords.js'\nfunction calcPickColor(j, rgbIndex) {\n    return (j >>> 8 * rgbIndex) % 256 / 255;\n}\n\nfunction makePoints(sampleCount, dimensions, color) {\n    var dimensionCount = dimensions.length;\n\n    var points = [];\n    for(var j = 0; j < sampleCount; j++) {\n        for(var i = 0; i < gpuDimensionCount; i++) {\n            points.push(i < dimensionCount ?\n                dimensions[i].paddedUnitValues[j] :\n                i === (gpuDimensionCount - 1) ?\n                    adjustDepth(color[j]) :\n                    i >= gpuDimensionCount - 4 ?\n                        calcPickColor(j, gpuDimensionCount - 2 - i) :\n                        0.5);\n        }\n    }\n\n    return points;\n}\n\nfunction makeVecAttr(sampleCount, points, vecIndex) {\n    var i, j, k;\n    var pointPairs = [];\n\n    for(j = 0; j < sampleCount; j++) {\n        for(k = 0; k < sectionVertexCount; k++) {\n            for(i = 0; i < vec4NumberCount; i++) {\n                pointPairs.push(points[j * gpuDimensionCount + vecIndex * vec4NumberCount + i]);\n                if(vecIndex * vec4NumberCount + i === gpuDimensionCount - 1 && k % 2 === 0) {\n                    pointPairs[pointPairs.length - 1] *= -1;\n                }\n            }\n        }\n    }\n\n    return pointPairs;\n}\n\nfunction setAttributes(attributes, sampleCount, points) {\n    for(var i = 0; i < 16; i++) {\n        attributes['p' + i.toString(16)](makeVecAttr(sampleCount, points, i));\n    }\n}\n\nfunction emptyAttributes(regl) {\n    var attributes = {};\n    for(var i = 0; i < 16; i++) {\n        attributes['p' + i.toString(16)] = regl.buffer({usage: 'dynamic', type: 'float', data: new Uint8Array(0)});\n    }\n    return attributes;\n}\n\nmodule.exports = function(canvasGL, d) {\n    // context & pick describe which canvas we're talking about - won't change with new data\n    var context = d.context;\n    var pick = d.pick;\n\n    var regl = d.regl;\n\n    var renderState = {\n        currentRafs: {},\n        drawCompleted: true,\n        clearOnly: false\n    };\n\n    // state to be set by update and used later\n    var model;\n    var vm;\n    var initialDims;\n    var sampleCount;\n    var attributes = emptyAttributes(regl);\n    var maskTexture;\n    var paletteTexture = regl.texture(paletteTextureConfig);\n\n    update(d);\n\n    var glAes = regl({\n\n        profile: false,\n\n        blend: {\n            enable: context,\n            func: {\n                srcRGB: 'src alpha',\n                dstRGB: 'one minus src alpha',\n                srcAlpha: 1,\n                dstAlpha: 1 // 'one minus src alpha'\n            },\n            equation: {\n                rgb: 'add',\n                alpha: 'add'\n            },\n            color: [0, 0, 0, 0]\n        },\n\n        depth: {\n            enable: !context,\n            mask: true,\n            func: 'less',\n            range: [0, 1]\n        },\n\n        // for polygons\n        cull: {\n            enable: true,\n            face: 'back'\n        },\n\n        scissor: {\n            enable: true,\n            box: {\n                x: regl.prop('scissorX'),\n                y: regl.prop('scissorY'),\n                width: regl.prop('scissorWidth'),\n                height: regl.prop('scissorHeight')\n            }\n        },\n\n        viewport: {\n            x: regl.prop('viewportX'),\n            y: regl.prop('viewportY'),\n            width: regl.prop('viewportWidth'),\n            height: regl.prop('viewportHeight')\n        },\n\n        dither: false,\n\n        vert: pick ? pickVertexShaderSource : context ? contextShaderSource : vertexShaderSource,\n\n        frag: fragmentShaderSource,\n\n        primitive: 'lines',\n        lineWidth: 1,\n        attributes: attributes,\n        uniforms: {\n            resolution: regl.prop('resolution'),\n            viewBoxPosition: regl.prop('viewBoxPosition'),\n            viewBoxSize: regl.prop('viewBoxSize'),\n            dim1A: regl.prop('dim1A'),\n            dim2A: regl.prop('dim2A'),\n            dim1B: regl.prop('dim1B'),\n            dim2B: regl.prop('dim2B'),\n            dim1C: regl.prop('dim1C'),\n            dim2C: regl.prop('dim2C'),\n            dim1D: regl.prop('dim1D'),\n            dim2D: regl.prop('dim2D'),\n            loA: regl.prop('loA'),\n            hiA: regl.prop('hiA'),\n            loB: regl.prop('loB'),\n            hiB: regl.prop('hiB'),\n            loC: regl.prop('loC'),\n            hiC: regl.prop('hiC'),\n            loD: regl.prop('loD'),\n            hiD: regl.prop('hiD'),\n            palette: paletteTexture,\n            mask: regl.prop('maskTexture'),\n            maskHeight: regl.prop('maskHeight'),\n            colorClamp: regl.prop('colorClamp')\n        },\n        offset: regl.prop('offset'),\n        count: regl.prop('count')\n    });\n\n    function update(dNew) {\n        model = dNew.model;\n        vm = dNew.viewModel;\n        initialDims = vm.dimensions.slice();\n        sampleCount = initialDims[0] ? initialDims[0].values.length : 0;\n\n        var lines = model.lines;\n        var color = pick ? lines.color.map(function(_, i) {return i / lines.color.length;}) : lines.color;\n        var contextOpacity = Math.max(1 / 255, Math.pow(1 / color.length, 1 / 3));\n\n        var points = makePoints(sampleCount, initialDims, color);\n        setAttributes(attributes, sampleCount, points);\n\n        paletteTexture = regl.texture(Lib.extendFlat({\n            data: palette(model.unitToColor, context, Math.round((context ? contextOpacity : 1) * 255))\n        }, paletteTextureConfig));\n    }\n\n    var colorClamp = [0, 1];\n\n    function setColorDomain(unitDomain) {\n        colorClamp[0] = unitDomain[0];\n        colorClamp[1] = unitDomain[1];\n    }\n\n    var previousAxisOrder = [];\n\n    function makeItem(i, ii, x, y, panelSizeX, canvasPanelSizeY, crossfilterDimensionIndex, I, leftmost, rightmost, constraints) {\n        var loHi, abcd, d, index;\n        var leftRight = [i, ii];\n\n        var dims = [0, 1].map(function() {return [0, 1, 2, 3].map(function() {return new Float32Array(16);});});\n\n        for(loHi = 0; loHi < 2; loHi++) {\n            index = leftRight[loHi];\n            for(abcd = 0; abcd < 4; abcd++) {\n                for(d = 0; d < 16; d++) {\n                    dims[loHi][abcd][d] = d + 16 * abcd === index ? 1 : 0;\n                }\n            }\n        }\n\n        var overdrag = model.lines.canvasOverdrag;\n        var domain = model.domain;\n        var canvasWidth = model.canvasWidth;\n        var canvasHeight = model.canvasHeight;\n\n        var itemModel = Lib.extendFlat({\n            key: crossfilterDimensionIndex,\n            resolution: [canvasWidth, canvasHeight],\n            viewBoxPosition: [x + overdrag, y],\n            viewBoxSize: [panelSizeX, canvasPanelSizeY],\n            i: i,\n            ii: ii,\n\n            dim1A: dims[0][0],\n            dim1B: dims[0][1],\n            dim1C: dims[0][2],\n            dim1D: dims[0][3],\n            dim2A: dims[1][0],\n            dim2B: dims[1][1],\n            dim2C: dims[1][2],\n            dim2D: dims[1][3],\n\n            colorClamp: colorClamp,\n\n            scissorX: (I === leftmost ? 0 : x + overdrag) + (model.pad.l - overdrag) + model.layoutWidth * domain.x[0],\n            scissorWidth: (I === rightmost ? canvasWidth - x + overdrag : panelSizeX + 0.5) + (I === leftmost ? x + overdrag : 0),\n            scissorY: y + model.pad.b + model.layoutHeight * domain.y[0],\n            scissorHeight: canvasPanelSizeY,\n\n            viewportX: model.pad.l - overdrag + model.layoutWidth * domain.x[0],\n            viewportY: model.pad.b + model.layoutHeight * domain.y[0],\n            viewportWidth: canvasWidth,\n            viewportHeight: canvasHeight\n        }, constraints);\n\n        return itemModel;\n    }\n\n    function makeConstraints() {\n        var loHi, abcd, d;\n\n        var lims = [0, 1].map(function() {return [0, 1, 2, 3].map(function() {return new Float32Array(16);});});\n\n        for(loHi = 0; loHi < 2; loHi++) {\n            for(abcd = 0; abcd < 4; abcd++) {\n                for(d = 0; d < 16; d++) {\n                    var dimP = d + 16 * abcd;\n                    var lim;\n                    if(dimP < initialDims.length) {\n                        lim = initialDims[dimP].brush.filter.getBounds()[loHi];\n                    } else lim = loHi;\n                    lims[loHi][abcd][d] = lim + (2 * loHi - 1) * filterEpsilon;\n                }\n            }\n        }\n\n        function expandedPixelRange(dim, bounds) {\n            var maskHMinus = maskHeight - 1;\n            return [\n                Math.max(0, Math.floor(bounds[0] * maskHMinus)),\n                Math.min(maskHMinus, Math.ceil(bounds[1] * maskHMinus))\n            ];\n        }\n\n        var mask = Array.apply(null, new Array(maskHeight * channelCount)).map(function() {\n            return 255;\n        });\n        for(var dimIndex = 0; dimIndex < initialDims.length; dimIndex++) {\n            var bitIndex = dimIndex % bitsPerByte;\n            var byteIndex = (dimIndex - bitIndex) / bitsPerByte;\n            var bitMask = Math.pow(2, bitIndex);\n            var dim = initialDims[dimIndex];\n            var ranges = dim.brush.filter.get();\n            if(ranges.length < 2) continue; // bail if the bounding box based filter is sufficient\n\n            var prevEnd = expandedPixelRange(dim, ranges[0])[1];\n            for(var ri = 1; ri < ranges.length; ri++) {\n                var nextRange = expandedPixelRange(dim, ranges[ri]);\n                for(var pi = prevEnd + 1; pi < nextRange[0]; pi++) {\n                    mask[pi * channelCount + byteIndex] &= ~bitMask;\n                }\n                prevEnd = Math.max(prevEnd, nextRange[1]);\n            }\n        }\n\n        var textureData = {\n            // 8 units x 8 bits = 64 bits, just sufficient for the almost 64 dimensions we support\n            shape: [channelCount, maskHeight],\n            format: 'alpha',\n            type: 'uint8',\n            mag: 'nearest',\n            min: 'nearest',\n            data: mask\n        };\n        if(maskTexture) maskTexture(textureData);\n        else maskTexture = regl.texture(textureData);\n\n        return {\n            maskTexture: maskTexture,\n            maskHeight: maskHeight,\n            loA: lims[0][0],\n            loB: lims[0][1],\n            loC: lims[0][2],\n            loD: lims[0][3],\n            hiA: lims[1][0],\n            hiB: lims[1][1],\n            hiC: lims[1][2],\n            hiD: lims[1][3]\n        };\n    }\n\n    function renderGLParcoords(panels, setChanged, clearOnly) {\n        var panelCount = panels.length;\n        var I;\n\n        var leftmost;\n        var rightmost;\n        var lowestX = Infinity;\n        var highestX = -Infinity;\n\n        for(I = 0; I < panelCount; I++) {\n            if(panels[I].dim2.canvasX > highestX) {\n                highestX = panels[I].dim2.canvasX;\n                rightmost = I;\n            }\n            if(panels[I].dim1.canvasX < lowestX) {\n                lowestX = panels[I].dim1.canvasX;\n                leftmost = I;\n            }\n        }\n\n        if(panelCount === 0) {\n            // clear canvas here, as the panel iteration below will not enter the loop body\n            clear(regl, 0, 0, model.canvasWidth, model.canvasHeight);\n        }\n        var constraints = context ? {} : makeConstraints();\n\n        for(I = 0; I < panelCount; I++) {\n            var panel = panels[I];\n            var dim1 = panel.dim1;\n            var i = dim1.crossfilterDimensionIndex;\n            var x = panel.canvasX;\n            var y = panel.canvasY;\n            var dim2 = panel.dim2;\n            var ii = dim2.crossfilterDimensionIndex;\n            var panelSizeX = panel.panelSizeX;\n            var panelSizeY = panel.panelSizeY;\n            var xTo = x + panelSizeX;\n            if(setChanged || !previousAxisOrder[i] || previousAxisOrder[i][0] !== x || previousAxisOrder[i][1] !== xTo) {\n                previousAxisOrder[i] = [x, xTo];\n                var item = makeItem(i, ii, x, y, panelSizeX, panelSizeY, dim1.crossfilterDimensionIndex, I, leftmost, rightmost, constraints);\n                renderState.clearOnly = clearOnly;\n                renderBlock(regl, glAes, renderState, setChanged ? model.lines.blockLineCount : sampleCount, sampleCount, item);\n            }\n        }\n    }\n\n    function readPixel(canvasX, canvasY) {\n        regl.read({\n            x: canvasX,\n            y: canvasY,\n            width: 1,\n            height: 1,\n            data: pickPixel\n        });\n        return pickPixel;\n    }\n\n    function readPixels(canvasX, canvasY, width, height) {\n        var pixelArray = new Uint8Array(4 * width * height);\n        regl.read({\n            x: canvasX,\n            y: canvasY,\n            width: width,\n            height: height,\n            data: pixelArray\n        });\n        return pixelArray;\n    }\n\n    function destroy() {\n        canvasGL.style['pointer-events'] = 'none';\n        paletteTexture.destroy();\n        if(maskTexture) maskTexture.destroy();\n        for(var k in attributes) attributes[k].destroy();\n    }\n\n    return {\n        setColorDomain: setColorDomain,\n        render: renderGLParcoords,\n        readPixel: readPixel,\n        readPixels: readPixels,\n        destroy: destroy,\n        update: update\n    };\n};\n\n},{\"../../lib\":703,\"glslify\":404}],1046:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\n/**\n * mergeLength: set trace length as the minimum of all dimension data lengths\n *     and propagates this length into each dimension\n *\n * @param {object} traceOut: the fullData trace\n * @param {Array(object)} dimensions: array of dimension objects\n * @param {string} dataAttr: the attribute of each dimension containing the data\n * @param {integer} len: an already-existing length from other attributes\n */\nmodule.exports = function(traceOut, dimensions, dataAttr, len) {\n    if(!len) len = Infinity;\n    var i, dimi;\n    for(i = 0; i < dimensions.length; i++) {\n        dimi = dimensions[i];\n        if(dimi.visible) len = Math.min(len, dimi[dataAttr].length);\n    }\n    if(len === Infinity) len = 0;\n\n    traceOut._length = len;\n    for(i = 0; i < dimensions.length; i++) {\n        dimi = dimensions[i];\n        if(dimi.visible) dimi._length = len;\n    }\n\n    return len;\n};\n\n},{}],1047:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar rgba = _dereq_('color-rgba');\n\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar Colorscale = _dereq_('../../components/colorscale');\n\nvar gup = _dereq_('../../lib/gup');\nvar keyFun = gup.keyFun;\nvar repeat = gup.repeat;\nvar unwrap = gup.unwrap;\n\nvar c = _dereq_('./constants');\nvar brush = _dereq_('./axisbrush');\nvar lineLayerMaker = _dereq_('./lines');\n\nfunction visible(dimension) { return !('visible' in dimension) || dimension.visible; }\n\nfunction dimensionExtent(dimension) {\n    var lo = dimension.range ? dimension.range[0] : Lib.aggNums(Math.min, null, dimension.values, dimension._length);\n    var hi = dimension.range ? dimension.range[1] : Lib.aggNums(Math.max, null, dimension.values, dimension._length);\n\n    if(isNaN(lo) || !isFinite(lo)) {\n        lo = 0;\n    }\n\n    if(isNaN(hi) || !isFinite(hi)) {\n        hi = 0;\n    }\n\n    // avoid a degenerate (zero-width) domain\n    if(lo === hi) {\n        if(lo === 0) {\n            // no use to multiplying zero, so add/subtract in this case\n            lo -= 1;\n            hi += 1;\n        } else {\n            // this keeps the range in the order of magnitude of the data\n            lo *= 0.9;\n            hi *= 1.1;\n        }\n    }\n\n    return [lo, hi];\n}\n\nfunction toText(formatter, texts) {\n    if(texts) {\n        return function(v, i) {\n            var text = texts[i];\n            if(text === null || text === undefined) return formatter(v);\n            return text;\n        };\n    }\n    return formatter;\n}\n\nfunction domainScale(height, padding, dimension, tickvals, ticktext) {\n    var extent = dimensionExtent(dimension);\n    if(tickvals) {\n        return d3.scale.ordinal()\n            .domain(tickvals.map(toText(d3.format(dimension.tickformat), ticktext)))\n            .range(tickvals\n                .map(function(d) {\n                    var unitVal = (d - extent[0]) / (extent[1] - extent[0]);\n                    return (height - padding + unitVal * (2 * padding - height));\n                })\n            );\n    }\n    return d3.scale.linear()\n        .domain(extent)\n        .range([height - padding, padding]);\n}\n\nfunction unitToPaddedPx(height, padding) { return d3.scale.linear().range([padding, height - padding]); }\n\nfunction domainToPaddedUnitScale(dimension, padFraction) {\n    return d3.scale.linear()\n        .domain(dimensionExtent(dimension))\n        .range([padFraction, 1 - padFraction]);\n}\n\nfunction ordinalScale(dimension) {\n    if(!dimension.tickvals) return;\n\n    var extent = dimensionExtent(dimension);\n    return d3.scale.ordinal()\n        .domain(dimension.tickvals)\n        .range(dimension.tickvals.map(function(d) {\n            return (d - extent[0]) / (extent[1] - extent[0]);\n        }));\n}\n\nfunction unitToColorScale(cscale) {\n    var colorStops = cscale.map(function(d) { return d[0]; });\n    var colorTuples = cscale.map(function(d) {\n        var RGBA = rgba(d[1]);\n        return d3.rgb('rgb(' + RGBA[0] + ',' + RGBA[1] + ',' + RGBA[2] + ')');\n    });\n    var prop = function(n) { return function(o) { return o[n]; }; };\n\n    // We can't use d3 color interpolation as we may have non-uniform color palette raster\n    // (various color stop distances).\n    var polylinearUnitScales = 'rgb'.split('').map(function(key) {\n        return d3.scale.linear()\n            .clamp(true)\n            .domain(colorStops)\n            .range(colorTuples.map(prop(key)));\n    });\n\n    return function(d) {\n        return polylinearUnitScales.map(function(s) {\n            return s(d);\n        });\n    };\n}\n\nfunction someFiltersActive(view) {\n    return view.dimensions.some(function(p) {\n        return p.brush.filterSpecified;\n    });\n}\n\nfunction model(layout, d, i) {\n    var cd0 = unwrap(d);\n    var trace = cd0.trace;\n    var lineColor = cd0.lineColor;\n    var line = trace.line;\n    var cOpts = Colorscale.extractOpts(line);\n    var cscale = cOpts.reversescale ? Colorscale.flipScale(cd0.cscale) : cd0.cscale;\n    var domain = trace.domain;\n    var dimensions = trace.dimensions;\n    var width = layout.width;\n    var labelFont = trace.labelfont;\n    var tickFont = trace.tickfont;\n    var rangeFont = trace.rangefont;\n\n    var lines = Lib.extendDeepNoArrays({}, line, {\n        color: lineColor.map(d3.scale.linear().domain(dimensionExtent({\n            values: lineColor,\n            range: [cOpts.min, cOpts.max],\n            _length: trace._length\n        }))),\n        blockLineCount: c.blockLineCount,\n        canvasOverdrag: c.overdrag * c.canvasPixelRatio\n    });\n\n    var groupWidth = Math.floor(width * (domain.x[1] - domain.x[0]));\n    var groupHeight = Math.floor(layout.height * (domain.y[1] - domain.y[0]));\n\n    var pad = layout.margin || {l: 80, r: 80, t: 100, b: 80};\n    var rowContentWidth = groupWidth;\n    var rowHeight = groupHeight;\n\n    return {\n        key: i,\n        colCount: dimensions.filter(visible).length,\n        dimensions: dimensions,\n        tickDistance: c.tickDistance,\n        unitToColor: unitToColorScale(cscale),\n        lines: lines,\n        labelFont: labelFont,\n        tickFont: tickFont,\n        rangeFont: rangeFont,\n        layoutWidth: width,\n        layoutHeight: layout.height,\n        domain: domain,\n        translateX: domain.x[0] * width,\n        translateY: layout.height - domain.y[1] * layout.height,\n        pad: pad,\n        canvasWidth: rowContentWidth * c.canvasPixelRatio + 2 * lines.canvasOverdrag,\n        canvasHeight: rowHeight * c.canvasPixelRatio,\n        width: rowContentWidth,\n        height: rowHeight,\n        canvasPixelRatio: c.canvasPixelRatio\n    };\n}\n\nfunction viewModel(state, callbacks, model) {\n    var width = model.width;\n    var height = model.height;\n    var dimensions = model.dimensions;\n    var canvasPixelRatio = model.canvasPixelRatio;\n\n    var xScale = function(d) {return width * d / Math.max(1, model.colCount - 1);};\n\n    var unitPad = c.verticalPadding / height;\n    var _unitToPaddedPx = unitToPaddedPx(height, c.verticalPadding);\n\n    var viewModel = {\n        key: model.key,\n        xScale: xScale,\n        model: model,\n        inBrushDrag: false // consider factoring it out and putting it in a centralized global-ish gesture state object\n    };\n\n    var uniqueKeys = {};\n\n    viewModel.dimensions = dimensions.filter(visible).map(function(dimension, i) {\n        var domainToPaddedUnit = domainToPaddedUnitScale(dimension, unitPad);\n        var foundKey = uniqueKeys[dimension.label];\n        uniqueKeys[dimension.label] = (foundKey || 0) + 1;\n        var key = dimension.label + (foundKey ? '__' + foundKey : '');\n        var specifiedConstraint = dimension.constraintrange;\n        var filterRangeSpecified = specifiedConstraint && specifiedConstraint.length;\n        if(filterRangeSpecified && !Array.isArray(specifiedConstraint[0])) {\n            specifiedConstraint = [specifiedConstraint];\n        }\n        var filterRange = filterRangeSpecified ?\n            specifiedConstraint.map(function(d) { return d.map(domainToPaddedUnit); }) :\n            [[0, 1]];\n        var brushMove = function() {\n            var p = viewModel;\n            p.focusLayer && p.focusLayer.render(p.panels, true);\n            var filtersActive = someFiltersActive(p);\n            if(!state.contextShown() && filtersActive) {\n                p.contextLayer && p.contextLayer.render(p.panels, true);\n                state.contextShown(true);\n            } else if(state.contextShown() && !filtersActive) {\n                p.contextLayer && p.contextLayer.render(p.panels, true, true);\n                state.contextShown(false);\n            }\n        };\n\n        var truncatedValues = dimension.values;\n        if(truncatedValues.length > dimension._length) {\n            truncatedValues = truncatedValues.slice(0, dimension._length);\n        }\n\n        var tickvals = dimension.tickvals;\n        var ticktext;\n        function makeTickItem(v, i) { return {val: v, text: ticktext[i]}; }\n        function sortTickItem(a, b) { return a.val - b.val; }\n        if(Array.isArray(tickvals) && tickvals.length) {\n            ticktext = dimension.ticktext;\n\n            // ensure ticktext and tickvals have same length\n            if(!Array.isArray(ticktext) || !ticktext.length) {\n                ticktext = tickvals.map(d3.format(dimension.tickformat));\n            } else if(ticktext.length > tickvals.length) {\n                ticktext = ticktext.slice(0, tickvals.length);\n            } else if(tickvals.length > ticktext.length) {\n                tickvals = tickvals.slice(0, ticktext.length);\n            }\n\n            // check if we need to sort tickvals/ticktext\n            for(var j = 1; j < tickvals.length; j++) {\n                if(tickvals[j] < tickvals[j - 1]) {\n                    var tickItems = tickvals.map(makeTickItem).sort(sortTickItem);\n                    for(var k = 0; k < tickvals.length; k++) {\n                        tickvals[k] = tickItems[k].val;\n                        ticktext[k] = tickItems[k].text;\n                    }\n                    break;\n                }\n            }\n        } else tickvals = undefined;\n\n        return {\n            key: key,\n            label: dimension.label,\n            tickFormat: dimension.tickformat,\n            tickvals: tickvals,\n            ticktext: ticktext,\n            ordinal: !!tickvals,\n            multiselect: dimension.multiselect,\n            xIndex: i,\n            crossfilterDimensionIndex: i,\n            visibleIndex: dimension._index,\n            height: height,\n            values: truncatedValues,\n            paddedUnitValues: truncatedValues.map(domainToPaddedUnit),\n            unitTickvals: tickvals && tickvals.map(domainToPaddedUnit),\n            xScale: xScale,\n            x: xScale(i),\n            canvasX: xScale(i) * canvasPixelRatio,\n            unitToPaddedPx: _unitToPaddedPx,\n            domainScale: domainScale(height, c.verticalPadding, dimension, tickvals, ticktext),\n            ordinalScale: ordinalScale(dimension),\n            parent: viewModel,\n            model: model,\n            brush: brush.makeBrush(\n                state,\n                filterRangeSpecified,\n                filterRange,\n                function() {\n                    state.linePickActive(false);\n                },\n                brushMove,\n                function(f) {\n                    var p = viewModel;\n                    p.focusLayer.render(p.panels, true);\n                    p.pickLayer && p.pickLayer.render(p.panels, true);\n                    state.linePickActive(true);\n                    if(callbacks && callbacks.filterChanged) {\n                        var invScale = domainToPaddedUnit.invert;\n\n                        // update gd.data as if a Plotly.restyle were fired\n                        var newRanges = f.map(function(r) {\n                            return r.map(invScale).sort(Lib.sorterAsc);\n                        }).sort(function(a, b) { return a[0] - b[0]; });\n                        callbacks.filterChanged(p.key, dimension._index, newRanges);\n                    }\n                }\n            )\n        };\n    });\n\n    return viewModel;\n}\n\nfunction styleExtentTexts(selection) {\n    selection\n        .classed(c.cn.axisExtentText, true)\n        .attr('text-anchor', 'middle')\n        .style('cursor', 'default')\n        .style('user-select', 'none');\n}\n\nfunction parcoordsInteractionState() {\n    var linePickActive = true;\n    var contextShown = false;\n    return {\n        linePickActive: function(val) {return arguments.length ? linePickActive = !!val : linePickActive;},\n        contextShown: function(val) {return arguments.length ? contextShown = !!val : contextShown;}\n    };\n}\n\nmodule.exports = function(root, svg, parcoordsLineLayers, styledData, layout, callbacks) {\n    var state = parcoordsInteractionState();\n\n    var vm = styledData\n        .filter(function(d) { return unwrap(d).trace.visible; })\n        .map(model.bind(0, layout))\n        .map(viewModel.bind(0, state, callbacks));\n\n    parcoordsLineLayers.each(function(d, i) {\n        return Lib.extendFlat(d, vm[i]);\n    });\n\n    var parcoordsLineLayer = parcoordsLineLayers.selectAll('.gl-canvas')\n        .each(function(d) {\n            // FIXME: figure out how to handle multiple instances\n            d.viewModel = vm[0];\n            d.model = d.viewModel ? d.viewModel.model : null;\n        });\n\n    var lastHovered = null;\n\n    var pickLayer = parcoordsLineLayer.filter(function(d) {return d.pick;});\n\n    // emit hover / unhover event\n    pickLayer\n        .style('pointer-events', 'auto')\n        .on('mousemove', function(d) {\n            if(state.linePickActive() && d.lineLayer && callbacks && callbacks.hover) {\n                var event = d3.event;\n                var cw = this.width;\n                var ch = this.height;\n                var pointer = d3.mouse(this);\n                var x = pointer[0];\n                var y = pointer[1];\n\n                if(x < 0 || y < 0 || x >= cw || y >= ch) {\n                    return;\n                }\n                var pixel = d.lineLayer.readPixel(x, ch - 1 - y);\n                var found = pixel[3] !== 0;\n                // inverse of the calcPickColor in `lines.js`; detailed comment there\n                var curveNumber = found ? pixel[2] + 256 * (pixel[1] + 256 * pixel[0]) : null;\n                var eventData = {\n                    x: x,\n                    y: y,\n                    clientX: event.clientX,\n                    clientY: event.clientY,\n                    dataIndex: d.model.key,\n                    curveNumber: curveNumber\n                };\n                if(curveNumber !== lastHovered) { // don't unnecessarily repeat the same hit (or miss)\n                    if(found) {\n                        callbacks.hover(eventData);\n                    } else if(callbacks.unhover) {\n                        callbacks.unhover(eventData);\n                    }\n                    lastHovered = curveNumber;\n                }\n            }\n        });\n\n    parcoordsLineLayer\n        .style('opacity', function(d) {return d.pick ? 0.01 : 1;});\n\n    svg.style('background', 'rgba(255, 255, 255, 0)');\n    var parcoordsControlOverlay = svg.selectAll('.' + c.cn.parcoords)\n        .data(vm, keyFun);\n\n    parcoordsControlOverlay.exit().remove();\n\n    parcoordsControlOverlay.enter()\n        .append('g')\n        .classed(c.cn.parcoords, true)\n        .style('shape-rendering', 'crispEdges')\n        .style('pointer-events', 'none');\n\n    parcoordsControlOverlay.attr('transform', function(d) {\n        return 'translate(' + d.model.translateX + ',' + d.model.translateY + ')';\n    });\n\n    var parcoordsControlView = parcoordsControlOverlay.selectAll('.' + c.cn.parcoordsControlView)\n        .data(repeat, keyFun);\n\n    parcoordsControlView.enter()\n        .append('g')\n        .classed(c.cn.parcoordsControlView, true);\n\n    parcoordsControlView.attr('transform', function(d) {\n        return 'translate(' + d.model.pad.l + ',' + d.model.pad.t + ')';\n    });\n\n    var yAxis = parcoordsControlView.selectAll('.' + c.cn.yAxis)\n        .data(function(vm) { return vm.dimensions; }, keyFun);\n\n    function updatePanelLayout(yAxis, vm) {\n        var panels = vm.panels || (vm.panels = []);\n        var dimData = yAxis.data();\n        var panelCount = dimData.length - 1;\n        for(var p = 0; p < panelCount; p++) {\n            var panel = panels[p] || (panels[p] = {});\n            var dim1 = dimData[p];\n            var dim2 = dimData[p + 1];\n            panel.dim1 = dim1;\n            panel.dim2 = dim2;\n            panel.canvasX = dim1.canvasX;\n            panel.panelSizeX = dim2.canvasX - dim1.canvasX;\n            panel.panelSizeY = vm.model.canvasHeight;\n            panel.y = 0;\n            panel.canvasY = 0;\n        }\n    }\n\n    yAxis.enter()\n        .append('g')\n        .classed(c.cn.yAxis, true);\n\n    parcoordsControlView.each(function(vm) {\n        updatePanelLayout(yAxis, vm);\n    });\n\n    parcoordsLineLayer\n        .each(function(d) {\n            if(d.viewModel) {\n                if(!d.lineLayer || callbacks) { // recreate in case of having callbacks e.g. restyle. Should we test for callback to be a restyle?\n                    d.lineLayer = lineLayerMaker(this, d);\n                } else d.lineLayer.update(d);\n\n                if(d.key || d.key === 0) d.viewModel[d.key] = d.lineLayer;\n\n                var setChanged = (!d.context || // don't update background\n                                  callbacks);   // unless there is a callback on the context layer. Should we test the callback?\n\n                d.lineLayer.render(d.viewModel.panels, setChanged);\n            }\n        });\n\n    yAxis.attr('transform', function(d) {\n        return 'translate(' + d.xScale(d.xIndex) + ', 0)';\n    });\n\n    // drag column for reordering columns\n    yAxis.call(d3.behavior.drag()\n        .origin(function(d) { return d; })\n        .on('drag', function(d) {\n            var p = d.parent;\n            state.linePickActive(false);\n            d.x = Math.max(-c.overdrag, Math.min(d.model.width + c.overdrag, d3.event.x));\n            d.canvasX = d.x * d.model.canvasPixelRatio;\n            yAxis\n                .sort(function(a, b) { return a.x - b.x; })\n                .each(function(dd, i) {\n                    dd.xIndex = i;\n                    dd.x = d === dd ? dd.x : dd.xScale(dd.xIndex);\n                    dd.canvasX = dd.x * dd.model.canvasPixelRatio;\n                });\n\n            updatePanelLayout(yAxis, p);\n\n            yAxis.filter(function(dd) { return Math.abs(d.xIndex - dd.xIndex) !== 0; })\n                .attr('transform', function(d) { return 'translate(' + d.xScale(d.xIndex) + ', 0)'; });\n            d3.select(this).attr('transform', 'translate(' + d.x + ', 0)');\n            yAxis.each(function(dd, i, ii) { if(ii === d.parent.key) p.dimensions[i] = dd; });\n            p.contextLayer && p.contextLayer.render(p.panels, false, !someFiltersActive(p));\n            p.focusLayer.render && p.focusLayer.render(p.panels);\n        })\n        .on('dragend', function(d) {\n            var p = d.parent;\n            d.x = d.xScale(d.xIndex);\n            d.canvasX = d.x * d.model.canvasPixelRatio;\n            updatePanelLayout(yAxis, p);\n            d3.select(this)\n                .attr('transform', function(d) { return 'translate(' + d.x + ', 0)'; });\n            p.contextLayer && p.contextLayer.render(p.panels, false, !someFiltersActive(p));\n            p.focusLayer && p.focusLayer.render(p.panels);\n            p.pickLayer && p.pickLayer.render(p.panels, true);\n            state.linePickActive(true);\n\n            if(callbacks && callbacks.axesMoved) {\n                callbacks.axesMoved(p.key, p.dimensions.map(function(dd) {return dd.crossfilterDimensionIndex;}));\n            }\n        })\n    );\n\n    yAxis.exit()\n        .remove();\n\n    var axisOverlays = yAxis.selectAll('.' + c.cn.axisOverlays)\n        .data(repeat, keyFun);\n\n    axisOverlays.enter()\n        .append('g')\n        .classed(c.cn.axisOverlays, true);\n\n    axisOverlays.selectAll('.' + c.cn.axis).remove();\n\n    var axis = axisOverlays.selectAll('.' + c.cn.axis)\n        .data(repeat, keyFun);\n\n    axis.enter()\n        .append('g')\n        .classed(c.cn.axis, true);\n\n    axis\n        .each(function(d) {\n            var wantedTickCount = d.model.height / d.model.tickDistance;\n            var scale = d.domainScale;\n            var sdom = scale.domain();\n            d3.select(this)\n                .call(d3.svg.axis()\n                    .orient('left')\n                    .tickSize(4)\n                    .outerTickSize(2)\n                    .ticks(wantedTickCount, d.tickFormat) // works for continuous scales only...\n                    .tickValues(d.ordinal ? // and this works for ordinal scales\n                        sdom :\n                        null)\n                    .tickFormat(d.ordinal ? function(d) { return d; } : null)\n                    .scale(scale));\n            Drawing.font(axis.selectAll('text'), d.model.tickFont);\n        });\n\n    axis.selectAll('.domain, .tick>line')\n        .attr('fill', 'none')\n        .attr('stroke', 'black')\n        .attr('stroke-opacity', 0.25)\n        .attr('stroke-width', '1px');\n\n    axis.selectAll('text')\n        .style('text-shadow', '1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff')\n        .style('cursor', 'default')\n        .style('user-select', 'none');\n\n    var axisHeading = axisOverlays.selectAll('.' + c.cn.axisHeading)\n        .data(repeat, keyFun);\n\n    axisHeading.enter()\n        .append('g')\n        .classed(c.cn.axisHeading, true);\n\n    var axisTitle = axisHeading.selectAll('.' + c.cn.axisTitle)\n        .data(repeat, keyFun);\n\n    axisTitle.enter()\n        .append('text')\n        .classed(c.cn.axisTitle, true)\n        .attr('text-anchor', 'middle')\n        .style('cursor', 'ew-resize')\n        .style('user-select', 'none')\n        .style('pointer-events', 'auto');\n\n    axisTitle\n        .attr('transform', 'translate(0,' + -c.axisTitleOffset + ')')\n        .text(function(d) { return d.label; })\n        .each(function(d) { Drawing.font(d3.select(this), d.model.labelFont); });\n\n    var axisExtent = axisOverlays.selectAll('.' + c.cn.axisExtent)\n        .data(repeat, keyFun);\n\n    axisExtent.enter()\n        .append('g')\n        .classed(c.cn.axisExtent, true);\n\n    var axisExtentTop = axisExtent.selectAll('.' + c.cn.axisExtentTop)\n        .data(repeat, keyFun);\n\n    axisExtentTop.enter()\n        .append('g')\n        .classed(c.cn.axisExtentTop, true);\n\n    axisExtentTop\n        .attr('transform', 'translate(' + 0 + ',' + -c.axisExtentOffset + ')');\n\n    var axisExtentTopText = axisExtentTop.selectAll('.' + c.cn.axisExtentTopText)\n        .data(repeat, keyFun);\n\n    function extremeText(d, isTop) {\n        if(d.ordinal) return '';\n        var domain = d.domainScale.domain();\n        return d3.format(d.tickFormat)(domain[isTop ? domain.length - 1 : 0]);\n    }\n\n    axisExtentTopText.enter()\n        .append('text')\n        .classed(c.cn.axisExtentTopText, true)\n        .call(styleExtentTexts);\n\n    axisExtentTopText\n        .text(function(d) { return extremeText(d, true); })\n        .each(function(d) { Drawing.font(d3.select(this), d.model.rangeFont); });\n\n    var axisExtentBottom = axisExtent.selectAll('.' + c.cn.axisExtentBottom)\n        .data(repeat, keyFun);\n\n    axisExtentBottom.enter()\n        .append('g')\n        .classed(c.cn.axisExtentBottom, true);\n\n    axisExtentBottom\n        .attr('transform', function(d) {\n            return 'translate(' + 0 + ',' + (d.model.height + c.axisExtentOffset) + ')';\n        });\n\n    var axisExtentBottomText = axisExtentBottom.selectAll('.' + c.cn.axisExtentBottomText)\n        .data(repeat, keyFun);\n\n    axisExtentBottomText.enter()\n        .append('text')\n        .classed(c.cn.axisExtentBottomText, true)\n        .attr('dy', '0.75em')\n        .call(styleExtentTexts);\n\n    axisExtentBottomText\n        .text(function(d) { return extremeText(d); })\n        .each(function(d) { Drawing.font(d3.select(this), d.model.rangeFont); });\n\n    brush.ensureAxisBrush(axisOverlays);\n};\n\n},{\"../../components/colorscale\":592,\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/gup\":701,\"./axisbrush\":1039,\"./constants\":1042,\"./lines\":1045,\"color-rgba\":115,\"d3\":157}],1048:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar parcoords = _dereq_('./parcoords');\nvar prepareRegl = _dereq_('../../lib/prepare_regl');\n\nmodule.exports = function plot(gd, cdparcoords) {\n    var fullLayout = gd._fullLayout;\n    var svg = fullLayout._toppaper;\n    var root = fullLayout._paperdiv;\n    var container = fullLayout._glcontainer;\n\n    var success = prepareRegl(gd);\n    if(!success) return;\n\n    var gdDimensions = {};\n    var gdDimensionsOriginalOrder = {};\n    var fullIndices = {};\n    var inputIndices = {};\n\n    var size = fullLayout._size;\n\n    cdparcoords.forEach(function(d, i) {\n        var trace = d[0].trace;\n        fullIndices[i] = trace.index;\n        var iIn = inputIndices[i] = trace._fullInput.index;\n        gdDimensions[i] = gd.data[iIn].dimensions;\n        gdDimensionsOriginalOrder[i] = gd.data[iIn].dimensions.slice();\n    });\n\n    var filterChanged = function(i, originalDimensionIndex, newRanges) {\n        // Have updated `constraintrange` data on `gd.data` and raise `Plotly.restyle` event\n        // without having to incur heavy UI blocking due to an actual `Plotly.restyle` call\n\n        var gdDimension = gdDimensionsOriginalOrder[i][originalDimensionIndex];\n        var newConstraints = newRanges.map(function(r) { return r.slice(); });\n\n        // Store constraint range in preGUI\n        // This one doesn't work if it's stored in pieces in _storeDirectGUIEdit\n        // because it's an array of variable dimensionality. So store the whole\n        // thing at once manually.\n        var aStr = 'dimensions[' + originalDimensionIndex + '].constraintrange';\n        var preGUI = fullLayout._tracePreGUI[gd._fullData[fullIndices[i]]._fullInput.uid];\n        if(preGUI[aStr] === undefined) {\n            var initialVal = gdDimension.constraintrange;\n            preGUI[aStr] = initialVal || null;\n        }\n\n        var fullDimension = gd._fullData[fullIndices[i]].dimensions[originalDimensionIndex];\n\n        if(!newConstraints.length) {\n            delete gdDimension.constraintrange;\n            delete fullDimension.constraintrange;\n            newConstraints = null;\n        } else {\n            if(newConstraints.length === 1) newConstraints = newConstraints[0];\n            gdDimension.constraintrange = newConstraints;\n            fullDimension.constraintrange = newConstraints.slice();\n            // wrap in another array for restyle event data\n            newConstraints = [newConstraints];\n        }\n\n        var restyleData = {};\n        restyleData[aStr] = newConstraints;\n        gd.emit('plotly_restyle', [restyleData, [inputIndices[i]]]);\n    };\n\n    var hover = function(eventData) {\n        gd.emit('plotly_hover', eventData);\n    };\n\n    var unhover = function(eventData) {\n        gd.emit('plotly_unhover', eventData);\n    };\n\n    var axesMoved = function(i, visibleIndices) {\n        // Have updated order data on `gd.data` and raise `Plotly.restyle` event\n        // without having to incur heavy UI blocking due to an actual `Plotly.restyle` call\n\n        function visible(dimension) {return !('visible' in dimension) || dimension.visible;}\n\n        function newIdx(visibleIndices, orig, dim) {\n            var origIndex = orig.indexOf(dim);\n            var currentIndex = visibleIndices.indexOf(origIndex);\n            if(currentIndex === -1) {\n                // invisible dimensions initially go to the end\n                currentIndex += orig.length;\n            }\n            return currentIndex;\n        }\n\n        function sorter(orig) {\n            return function sorter(d1, d2) {\n                var i1 = newIdx(visibleIndices, orig, d1);\n                var i2 = newIdx(visibleIndices, orig, d2);\n                return i1 - i2;\n            };\n        }\n\n        // drag&drop sorting of the visible dimensions\n        var orig = sorter(gdDimensionsOriginalOrder[i].filter(visible));\n        gdDimensions[i].sort(orig);\n\n        // invisible dimensions are not interpreted in the context of drag&drop sorting as an invisible dimension\n        // cannot be dragged; they're interspersed into their original positions by this subsequent merging step\n        gdDimensionsOriginalOrder[i].filter(function(d) {return !visible(d);})\n             .sort(function(d) {\n                 // subsequent splicing to be done left to right, otherwise indices may be incorrect\n                 return gdDimensionsOriginalOrder[i].indexOf(d);\n             })\n            .forEach(function(d) {\n                gdDimensions[i].splice(gdDimensions[i].indexOf(d), 1); // remove from the end\n                gdDimensions[i].splice(gdDimensionsOriginalOrder[i].indexOf(d), 0, d); // insert at original index\n            });\n\n        // TODO: we can't really store this part of the interaction state\n        // directly as below, since it incudes data arrays. If we want to\n        // persist column order we may have to do something special for this\n        // case to just store the order itself.\n        // Registry.call('_storeDirectGUIEdit',\n        //     gd.data[inputIndices[i]],\n        //     fullLayout._tracePreGUI[gd._fullData[fullIndices[i]]._fullInput.uid],\n        //     {dimensions: gdDimensions[i]}\n        // );\n\n        gd.emit('plotly_restyle', [{dimensions: [gdDimensions[i]]}, [inputIndices[i]]]);\n    };\n\n    parcoords(\n        root,\n        svg,\n        container,\n        cdparcoords,\n        {\n            width: size.w,\n            height: size.h,\n            margin: {\n                t: size.t,\n                r: size.r,\n                b: size.b,\n                l: size.l\n            }\n        },\n        {\n            filterChanged: filterChanged,\n            hover: hover,\n            unhover: unhover,\n            axesMoved: axesMoved\n        });\n};\n\n},{\"../../lib/prepare_regl\":716,\"./parcoords\":1047}],1049:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar textFontAttrs = fontAttrs({\n    editType: 'plot',\n    arrayOk: true,\n    colorEditType: 'plot',\n    \n});\n\nmodule.exports = {\n    labels: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    // equivalent of x0 and dx, if label is missing\n    label0: {\n        valType: 'number',\n        \n        dflt: 0,\n        editType: 'calc',\n        \n    },\n    dlabel: {\n        valType: 'number',\n        \n        dflt: 1,\n        editType: 'calc',\n        \n    },\n\n    values: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    marker: {\n        colors: {\n            valType: 'data_array',  // TODO 'color_array' ?\n            editType: 'calc',\n            \n        },\n\n        line: {\n            color: {\n                valType: 'color',\n                \n                dflt: colorAttrs.defaultLine,\n                arrayOk: true,\n                editType: 'style',\n                \n            },\n            width: {\n                valType: 'number',\n                \n                min: 0,\n                dflt: 0,\n                arrayOk: true,\n                editType: 'style',\n                \n            },\n            editType: 'calc'\n        },\n        editType: 'calc'\n    },\n\n    text: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'style',\n        \n    },\n\n// 'see eg:'\n// 'https://www.e-education.psu.edu/natureofgeoinfo/sites/www.e-education.psu.edu.natureofgeoinfo/files/image/hisp_pies.gif',\n// '(this example involves a map too - may someday be a whole trace type',\n// 'of its own. but the point is the size of the whole pie is important.)'\n    scalegroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n\n    // labels (legend is handled by plots.attributes.showlegend and layout.hiddenlabels)\n    textinfo: {\n        valType: 'flaglist',\n        \n        flags: ['label', 'text', 'value', 'percent'],\n        extras: ['none'],\n        editType: 'calc',\n        \n    },\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['label', 'text', 'value', 'percent', 'name']\n    }),\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: ['label', 'color', 'value', 'percent', 'text']\n    }),\n    textposition: {\n        valType: 'enumerated',\n        \n        values: ['inside', 'outside', 'auto', 'none'],\n        dflt: 'auto',\n        arrayOk: true,\n        editType: 'plot',\n        \n    },\n    textfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n    insidetextfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n    outsidetextfont: extendFlat({}, textFontAttrs, {\n        \n    }),\n\n    title: {\n        text: {\n            valType: 'string',\n            dflt: '',\n            \n            editType: 'plot',\n            \n        },\n        font: extendFlat({}, textFontAttrs, {\n            \n        }),\n        position: {\n            valType: 'enumerated',\n            values: [\n                'top left', 'top center', 'top right',\n                'middle center',\n                'bottom left', 'bottom center', 'bottom right'\n            ],\n            \n            editType: 'plot',\n            \n        },\n\n        editType: 'plot'\n    },\n\n    // position and shape\n    domain: domainAttrs({name: 'pie', trace: true, editType: 'calc'}),\n\n    hole: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 0,\n        editType: 'calc',\n        \n    },\n\n    // ordering and direction\n    sort: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc',\n        \n    },\n    direction: {\n        /**\n         * there are two common conventions, both of which place the first\n         * (largest, if sorted) slice with its left edge at 12 o'clock but\n         * succeeding slices follow either cw or ccw from there.\n         *\n         * see http://visage.co/data-visualization-101-pie-charts/\n         */\n        valType: 'enumerated',\n        values: ['clockwise', 'counterclockwise'],\n        \n        dflt: 'counterclockwise',\n        editType: 'calc',\n        \n    },\n    rotation: {\n        valType: 'number',\n        \n        min: -360,\n        max: 360,\n        dflt: 0,\n        editType: 'calc',\n        \n    },\n\n    pull: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 0,\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n\n    _deprecated: {\n        title: {\n            valType: 'string',\n            dflt: '',\n            \n            editType: 'calc',\n            \n        },\n        titlefont: extendFlat({}, textFontAttrs, {\n            \n        }),\n        titleposition: {\n            valType: 'enumerated',\n            values: [\n                'top left', 'top center', 'top right',\n                'middle center',\n                'bottom left', 'bottom center', 'bottom right'\n            ],\n            \n            editType: 'calc',\n            \n        }\n    }\n};\n\n},{\"../../components/color/attributes\":579,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../../plots/domain\":776,\"../../plots/font_attributes\":777}],1050:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\n\nexports.name = 'pie';\n\nexports.plot = function(gd) {\n    var Pie = Registry.getModule('pie');\n    var cdPie = getModuleCalcData(gd.calcdata, Pie)[0];\n    Pie.plot(gd, cdPie);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadPie = (oldFullLayout._has && oldFullLayout._has('pie'));\n    var hasPie = (newFullLayout._has && newFullLayout._has('pie'));\n\n    if(hadPie && !hasPie) {\n        oldFullLayout._pielayer.selectAll('g.trace').remove();\n    }\n};\n\n},{\"../../plots/get_data\":786,\"../../registry\":831}],1051:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\nvar tinycolor = _dereq_('tinycolor2');\n\nvar Color = _dereq_('../../components/color');\nvar helpers = _dereq_('./helpers');\nvar isValidTextValue = _dereq_('../../lib').isValidTextValue;\n\nvar extendedColorWayList = {};\n\nfunction calc(gd, trace) {\n    var cd = [];\n\n    var fullLayout = gd._fullLayout;\n    var hiddenLabels = fullLayout.hiddenlabels || [];\n\n    var labels = trace.labels;\n    var colors = trace.marker.colors || [];\n    var vals = trace.values;\n    var hasVals = isArrayOrTypedArray(vals) && vals.length;\n\n    var i, pt;\n\n    if(trace.dlabel) {\n        labels = new Array(vals.length);\n        for(i = 0; i < vals.length; i++) {\n            labels[i] = String(trace.label0 + i * trace.dlabel);\n        }\n    }\n\n    var allThisTraceLabels = {};\n    var pullColor = makePullColorFn(fullLayout['_' + trace.type + 'colormap']);\n    var seriesLen = (hasVals ? vals : labels).length;\n    var vTotal = 0;\n    var isAggregated = false;\n\n    for(i = 0; i < seriesLen; i++) {\n        var v, label, hidden;\n        if(hasVals) {\n            v = vals[i];\n            if(!isNumeric(v)) continue;\n            v = +v;\n            if(v < 0) continue;\n        } else v = 1;\n\n        label = labels[i];\n        if(label === undefined || label === '') label = i;\n        label = String(label);\n\n        var thisLabelIndex = allThisTraceLabels[label];\n        if(thisLabelIndex === undefined) {\n            allThisTraceLabels[label] = cd.length;\n\n            hidden = hiddenLabels.indexOf(label) !== -1;\n\n            if(!hidden) vTotal += v;\n\n            cd.push({\n                v: v,\n                label: label,\n                color: pullColor(colors[i], label),\n                i: i,\n                pts: [i],\n                hidden: hidden\n            });\n        } else {\n            isAggregated = true;\n\n            pt = cd[thisLabelIndex];\n            pt.v += v;\n            pt.pts.push(i);\n            if(!pt.hidden) vTotal += v;\n\n            if(pt.color === false && colors[i]) {\n                pt.color = pullColor(colors[i], label);\n            }\n        }\n    }\n\n    var shouldSort = (trace.type === 'funnelarea') ? isAggregated : trace.sort;\n    if(shouldSort) cd.sort(function(a, b) { return b.v - a.v; });\n\n    // include the sum of all values in the first point\n    if(cd[0]) cd[0].vTotal = vTotal;\n\n    // now insert text\n    var textinfo = trace.textinfo;\n    if(textinfo && textinfo !== 'none') {\n        var parts = textinfo.split('+');\n        var hasFlag = function(flag) { return parts.indexOf(flag) !== -1; };\n        var hasLabel = hasFlag('label');\n        var hasText = hasFlag('text');\n        var hasValue = hasFlag('value');\n        var hasPercent = hasFlag('percent');\n\n        var separators = fullLayout.separators;\n        var text;\n\n        for(i = 0; i < cd.length; i++) {\n            pt = cd[i];\n            text = hasLabel ? [pt.label] : [];\n            if(hasText) {\n                var tx = helpers.getFirstFilled(trace.text, pt.pts);\n                if(isValidTextValue(tx)) text.push(tx);\n            }\n            if(hasValue) text.push(helpers.formatPieValue(pt.v, separators));\n            if(hasPercent) text.push(helpers.formatPiePercent(pt.v / vTotal, separators));\n            pt.text = text.join('<br>');\n        }\n    }\n\n    return cd;\n}\n\nfunction makePullColorFn(colorMap) {\n    return function pullColor(color, id) {\n        if(!color) return false;\n\n        color = tinycolor(color);\n        if(!color.isValid()) return false;\n\n        color = Color.addOpacity(color, color.getAlpha());\n        if(!colorMap[id]) colorMap[id] = color;\n\n        return color;\n    };\n}\n\n/*\n * `calc` filled in (and collated) explicit colors.\n * Now we need to propagate these explicit colors to other traces,\n * and fill in default colors.\n * This is done after sorting, so we pick defaults\n * in the order slices will be displayed\n */\nfunction crossTraceCalc(gd, plotinfo) { // TODO: should we name the second argument opts?\n    var desiredType = (plotinfo || {}).type;\n    if(!desiredType) desiredType = 'pie';\n\n    var fullLayout = gd._fullLayout;\n    var calcdata = gd.calcdata;\n    var colorWay = fullLayout[desiredType + 'colorway'];\n    var colorMap = fullLayout['_' + desiredType + 'colormap'];\n\n    if(fullLayout['extend' + desiredType + 'colors']) {\n        colorWay = generateExtendedColors(colorWay, extendedColorWayList);\n    }\n    var dfltColorCount = 0;\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var traceType = cd[0].trace.type;\n        if(traceType !== desiredType) continue;\n\n        for(var j = 0; j < cd.length; j++) {\n            var pt = cd[j];\n            if(pt.color === false) {\n                // have we seen this label and assigned a color to it in a previous trace?\n                if(colorMap[pt.label]) {\n                    pt.color = colorMap[pt.label];\n                } else {\n                    colorMap[pt.label] = pt.color = colorWay[dfltColorCount % colorWay.length];\n                    dfltColorCount++;\n                }\n            }\n        }\n    }\n}\n\n/**\n * pick a default color from the main default set, augmented by\n * itself lighter then darker before repeating\n */\nfunction generateExtendedColors(colorList, extendedColorWays) {\n    var i;\n    var colorString = JSON.stringify(colorList);\n    var colors = extendedColorWays[colorString];\n    if(!colors) {\n        colors = colorList.slice();\n\n        for(i = 0; i < colorList.length; i++) {\n            colors.push(tinycolor(colorList[i]).lighten(20).toHexString());\n        }\n\n        for(i = 0; i < colorList.length; i++) {\n            colors.push(tinycolor(colorList[i]).darken(20).toHexString());\n        }\n        extendedColorWays[colorString] = colors;\n    }\n\n    return colors;\n}\n\nmodule.exports = {\n    calc: calc,\n    crossTraceCalc: crossTraceCalc,\n\n    makePullColorFn: makePullColorFn,\n    generateExtendedColors: generateExtendedColors\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"./helpers\":1054,\"fast-isnumeric\":224,\"tinycolor2\":524}],1052:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleText = _dereq_('../bar/defaults').handleText;\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len;\n    var vals = coerce('values');\n    var hasVals = Lib.isArrayOrTypedArray(vals);\n    var labels = coerce('labels');\n    if(Array.isArray(labels)) {\n        len = labels.length;\n        if(hasVals) len = Math.min(len, vals.length);\n    } else if(hasVals) {\n        len = vals.length;\n\n        coerce('label0');\n        coerce('dlabel');\n    }\n\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n    traceOut._length = len;\n\n    var lineWidth = coerce('marker.line.width');\n    if(lineWidth) coerce('marker.line.color');\n\n    coerce('marker.colors');\n\n    coerce('scalegroup');\n    // TODO: hole needs to be coerced to the same value within a scaleegroup\n\n    var textData = coerce('text');\n    var textInfo = coerce('textinfo', Array.isArray(textData) ? 'text+percent' : 'percent');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    if(textInfo && textInfo !== 'none') {\n        var textposition = coerce('textposition');\n        handleText(traceIn, traceOut, layout, coerce, textposition, {\n            moduleHasSelected: false,\n            moduleHasUnselected: false,\n            moduleHasConstrain: false,\n            moduleHasCliponaxis: false,\n            moduleHasTextangle: false,\n            moduleHasInsideanchor: false\n        });\n    }\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    var hole = coerce('hole');\n    var title = coerce('title.text');\n    if(title) {\n        var titlePosition = coerce('title.position', hole ? 'middle center' : 'top center');\n        if(!hole && titlePosition === 'middle center') traceOut.title.position = 'top center';\n        Lib.coerceFont(coerce, 'title.font', layout.font);\n    }\n\n    coerce('sort');\n    coerce('direction');\n    coerce('rotation');\n    coerce('pull');\n};\n\n},{\"../../lib\":703,\"../../plots/domain\":776,\"../bar/defaults\":845,\"./attributes\":1049}],1053:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar appendArrayMultiPointValues = _dereq_('../../components/fx/helpers').appendArrayMultiPointValues;\n\n// Note: like other eventData routines, this creates the data for hover/unhover/click events\n// but it has a different API and goes through a totally different pathway.\n// So to ensure it doesn't get misused, it's not attached to the Pie module.\nmodule.exports = function eventData(pt, trace) {\n    var out = {\n        curveNumber: trace.index,\n        pointNumbers: pt.pts,\n        data: trace._input,\n        fullData: trace,\n        label: pt.label,\n        color: pt.color,\n        value: pt.v,\n        percent: pt.percent,\n        text: pt.text,\n\n        // pt.v (and pt.i below) for backward compatibility\n        v: pt.v\n    };\n\n    // Only include pointNumber if it's unambiguous\n    if(pt.pts.length === 1) out.pointNumber = out.i = pt.pts[0];\n\n    // Add extra data arrays to the output\n    // notice that this is the multi-point version ('s' on the end!)\n    // so added data will be arrays matching the pointNumbers array.\n    appendArrayMultiPointValues(out, trace, pt.pts);\n\n    // don't include obsolete fields in new funnelarea traces\n    if(trace.type === 'funnelarea') {\n        delete out.v;\n        delete out.i;\n    }\n\n    return out;\n};\n\n},{\"../../components/fx/helpers\":615}],1054:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nexports.formatPiePercent = function formatPiePercent(v, separators) {\n    var vRounded = (v * 100).toPrecision(3);\n    if(vRounded.lastIndexOf('.') !== -1) {\n        vRounded = vRounded.replace(/[.]?0+$/, '');\n    }\n    return Lib.numSeparate(vRounded, separators) + '%';\n};\n\nexports.formatPieValue = function formatPieValue(v, separators) {\n    var vRounded = v.toPrecision(10);\n    if(vRounded.lastIndexOf('.') !== -1) {\n        vRounded = vRounded.replace(/[.]?0+$/, '');\n    }\n    return Lib.numSeparate(vRounded, separators);\n};\n\nexports.getFirstFilled = function getFirstFilled(array, indices) {\n    if(!Array.isArray(array)) return;\n    for(var i = 0; i < indices.length; i++) {\n        var v = array[indices[i]];\n        if(v || v === 0) return v;\n    }\n};\n\nexports.castOption = function castOption(item, indices) {\n    if(Array.isArray(item)) return exports.getFirstFilled(item, indices);\n    else if(item) return item;\n};\n\n},{\"../../lib\":703}],1055:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('./calc').crossTraceCalc,\n\n    plot: _dereq_('./plot').plot,\n    style: _dereq_('./style'),\n    styleOne: _dereq_('./style_one'),\n\n    moduleType: 'trace',\n    name: 'pie',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['pie-like', 'pie', 'showLegend'],\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1049,\"./base_plot\":1050,\"./calc\":1051,\"./defaults\":1052,\"./layout_attributes\":1056,\"./layout_defaults\":1057,\"./plot\":1058,\"./style\":1059,\"./style_one\":1060}],1056:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    hiddenlabels: {\n        valType: 'data_array',\n        \n        editType: 'calc',\n        \n    },\n    piecolorway: {\n        valType: 'colorlist',\n        \n        editType: 'calc',\n        \n    },\n    extendpiecolors: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],1057:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    coerce('hiddenlabels');\n    coerce('piecolorway', layoutOut.colorway);\n    coerce('extendpiecolors');\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":1056}],1058:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Fx = _dereq_('../../components/fx');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\n\nvar helpers = _dereq_('./helpers');\nvar eventData = _dereq_('./event_data');\n\nfunction plot(gd, cdModule) {\n    var fullLayout = gd._fullLayout;\n\n    prerenderTitles(cdModule, gd);\n    layoutAreas(cdModule, fullLayout._size);\n\n    var plotGroups = Lib.makeTraceGroups(fullLayout._pielayer, cdModule, 'trace').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n\n        setCoords(cd);\n\n        // TODO: miter might look better but can sometimes cause problems\n        // maybe miter with a small-ish stroke-miterlimit?\n        plotGroup.attr('stroke-linejoin', 'round');\n\n        plotGroup.each(function() {\n            var slices = d3.select(this).selectAll('g.slice').data(cd);\n\n            slices.enter().append('g')\n                .classed('slice', true);\n            slices.exit().remove();\n\n            var quadrants = [\n                [[], []], // y<0: x<0, x>=0\n                [[], []] // y>=0: x<0, x>=0\n            ];\n            var hasOutsideText = false;\n\n            slices.each(function(pt) {\n                if(pt.hidden) {\n                    d3.select(this).selectAll('path,g').remove();\n                    return;\n                }\n\n                // to have consistent event data compared to other traces\n                pt.pointNumber = pt.i;\n                pt.curveNumber = trace.index;\n\n                quadrants[pt.pxmid[1] < 0 ? 0 : 1][pt.pxmid[0] < 0 ? 0 : 1].push(pt);\n\n                var cx = cd0.cx;\n                var cy = cd0.cy;\n                var sliceTop = d3.select(this);\n                var slicePath = sliceTop.selectAll('path.surface').data([pt]);\n\n                slicePath.enter().append('path')\n                    .classed('surface', true)\n                    .style({'pointer-events': 'all'});\n\n                sliceTop.call(attachFxHandlers, gd, cd);\n\n                if(trace.pull) {\n                    var pull = +helpers.castOption(trace.pull, pt.pts) || 0;\n                    if(pull > 0) {\n                        cx += pull * pt.pxmid[0];\n                        cy += pull * pt.pxmid[1];\n                    }\n                }\n\n                pt.cxFinal = cx;\n                pt.cyFinal = cy;\n\n                function arc(start, finish, cw, scale) {\n                    var dx = scale * (finish[0] - start[0]);\n                    var dy = scale * (finish[1] - start[1]);\n\n                    return 'a' +\n                        (scale * cd0.r) + ',' + (scale * cd0.r) + ' 0 ' +\n                        pt.largeArc + (cw ? ' 1 ' : ' 0 ') + dx + ',' + dy;\n                }\n\n                var hole = trace.hole;\n                if(pt.v === cd0.vTotal) { // 100% fails bcs arc start and end are identical\n                    var outerCircle = 'M' + (cx + pt.px0[0]) + ',' + (cy + pt.px0[1]) +\n                        arc(pt.px0, pt.pxmid, true, 1) +\n                        arc(pt.pxmid, pt.px0, true, 1) + 'Z';\n                    if(hole) {\n                        slicePath.attr('d',\n                            'M' + (cx + hole * pt.px0[0]) + ',' + (cy + hole * pt.px0[1]) +\n                            arc(pt.px0, pt.pxmid, false, hole) +\n                            arc(pt.pxmid, pt.px0, false, hole) +\n                            'Z' + outerCircle);\n                    } else slicePath.attr('d', outerCircle);\n                } else {\n                    var outerArc = arc(pt.px0, pt.px1, true, 1);\n\n                    if(hole) {\n                        var rim = 1 - hole;\n                        slicePath.attr('d',\n                            'M' + (cx + hole * pt.px1[0]) + ',' + (cy + hole * pt.px1[1]) +\n                            arc(pt.px1, pt.px0, false, hole) +\n                            'l' + (rim * pt.px0[0]) + ',' + (rim * pt.px0[1]) +\n                            outerArc +\n                            'Z');\n                    } else {\n                        slicePath.attr('d',\n                            'M' + cx + ',' + cy +\n                            'l' + pt.px0[0] + ',' + pt.px0[1] +\n                            outerArc +\n                            'Z');\n                    }\n                }\n\n                // add text\n                var textPosition = helpers.castOption(trace.textposition, pt.pts);\n                var sliceTextGroup = sliceTop.selectAll('g.slicetext')\n                    .data(pt.text && (textPosition !== 'none') ? [0] : []);\n\n                sliceTextGroup.enter().append('g')\n                    .classed('slicetext', true);\n                sliceTextGroup.exit().remove();\n\n                sliceTextGroup.each(function() {\n                    var sliceText = Lib.ensureSingle(d3.select(this), 'text', '', function(s) {\n                        // prohibit tex interpretation until we can handle\n                        // tex and regular text together\n                        s.attr('data-notex', 1);\n                    });\n\n                    sliceText.text(pt.text)\n                        .attr({\n                            'class': 'slicetext',\n                            transform: '',\n                            'text-anchor': 'middle'\n                        })\n                        .call(Drawing.font, textPosition === 'outside' ?\n                          determineOutsideTextFont(trace, pt, gd._fullLayout.font) :\n                          determineInsideTextFont(trace, pt, gd._fullLayout.font))\n                        .call(svgTextUtils.convertToTspans, gd);\n\n                    // position the text relative to the slice\n                    var textBB = Drawing.bBox(sliceText.node());\n                    var transform;\n\n                    if(textPosition === 'outside') {\n                        transform = transformOutsideText(textBB, pt);\n                    } else {\n                        transform = transformInsideText(textBB, pt, cd0);\n                        if(textPosition === 'auto' && transform.scale < 1) {\n                            sliceText.call(Drawing.font, trace.outsidetextfont);\n                            if(trace.outsidetextfont.family !== trace.insidetextfont.family ||\n                                    trace.outsidetextfont.size !== trace.insidetextfont.size) {\n                                textBB = Drawing.bBox(sliceText.node());\n                            }\n                            transform = transformOutsideText(textBB, pt);\n                        }\n                    }\n\n                    var translateX = cx + pt.pxmid[0] * transform.rCenter + (transform.x || 0);\n                    var translateY = cy + pt.pxmid[1] * transform.rCenter + (transform.y || 0);\n\n                    // save some stuff to use later ensure no labels overlap\n                    if(transform.outside) {\n                        pt.yLabelMin = translateY - textBB.height / 2;\n                        pt.yLabelMid = translateY;\n                        pt.yLabelMax = translateY + textBB.height / 2;\n                        pt.labelExtraX = 0;\n                        pt.labelExtraY = 0;\n                        hasOutsideText = true;\n                    }\n\n                    sliceText.attr('transform',\n                        'translate(' + translateX + ',' + translateY + ')' +\n                        (transform.scale < 1 ? ('scale(' + transform.scale + ')') : '') +\n                        (transform.rotate ? ('rotate(' + transform.rotate + ')') : '') +\n                        'translate(' +\n                            (-(textBB.left + textBB.right) / 2) + ',' +\n                            (-(textBB.top + textBB.bottom) / 2) +\n                        ')');\n                });\n            });\n\n            // add the title\n            var titleTextGroup = d3.select(this).selectAll('g.titletext')\n                .data(trace.title.text ? [0] : []);\n\n            titleTextGroup.enter().append('g')\n                .classed('titletext', true);\n            titleTextGroup.exit().remove();\n\n            titleTextGroup.each(function() {\n                var titleText = Lib.ensureSingle(d3.select(this), 'text', '', function(s) {\n                    // prohibit tex interpretation as above\n                    s.attr('data-notex', 1);\n                });\n\n                var txt = trace.title.text;\n                if(trace._meta) {\n                    txt = Lib.templateString(txt, trace._meta);\n                }\n\n                titleText.text(txt)\n                    .attr({\n                        'class': 'titletext',\n                        transform: '',\n                        'text-anchor': 'middle',\n                    })\n                .call(Drawing.font, trace.title.font)\n                .call(svgTextUtils.convertToTspans, gd);\n\n                var transform;\n\n                if(trace.title.position === 'middle center') {\n                    transform = positionTitleInside(cd0);\n                } else {\n                    transform = positionTitleOutside(cd0, fullLayout._size);\n                }\n\n                titleText.attr('transform',\n                    'translate(' + transform.x + ',' + transform.y + ')' +\n                    (transform.scale < 1 ? ('scale(' + transform.scale + ')') : '') +\n                    'translate(' + transform.tx + ',' + transform.ty + ')');\n            });\n\n            // now make sure no labels overlap (at least within one pie)\n            if(hasOutsideText) scootLabels(quadrants, trace);\n\n            plotTextLines(slices, trace);\n        });\n    });\n\n    // This is for a bug in Chrome (as of 2015-07-22, and does not affect FF)\n    // if insidetextfont and outsidetextfont are different sizes, sometimes the size\n    // of an \"em\" gets taken from the wrong element at first so lines are\n    // spaced wrong. You just have to tell it to try again later and it gets fixed.\n    // I have no idea why we haven't seen this in other contexts. Also, sometimes\n    // it gets the initial draw correct but on redraw it gets confused.\n    setTimeout(function() {\n        plotGroups.selectAll('tspan').each(function() {\n            var s = d3.select(this);\n            if(s.attr('dy')) s.attr('dy', s.attr('dy'));\n        });\n    }, 0);\n}\n\n// TODO add support for transition\nfunction plotTextLines(slices, trace) {\n    slices.each(function(pt) {\n        var sliceTop = d3.select(this);\n\n        if(!pt.labelExtraX && !pt.labelExtraY) {\n            sliceTop.select('path.textline').remove();\n            return;\n        }\n\n        // first move the text to its new location\n        var sliceText = sliceTop.select('g.slicetext text');\n\n        sliceText.attr('transform', 'translate(' + pt.labelExtraX + ',' + pt.labelExtraY + ')' +\n            sliceText.attr('transform'));\n\n        // then add a line to the new location\n        var lineStartX = pt.cxFinal + pt.pxmid[0];\n        var lineStartY = pt.cyFinal + pt.pxmid[1];\n        var textLinePath = 'M' + lineStartX + ',' + lineStartY;\n        var finalX = (pt.yLabelMax - pt.yLabelMin) * (pt.pxmid[0] < 0 ? -1 : 1) / 4;\n\n        if(pt.labelExtraX) {\n            var yFromX = pt.labelExtraX * pt.pxmid[1] / pt.pxmid[0];\n            var yNet = pt.yLabelMid + pt.labelExtraY - (pt.cyFinal + pt.pxmid[1]);\n\n            if(Math.abs(yFromX) > Math.abs(yNet)) {\n                textLinePath +=\n                    'l' + (yNet * pt.pxmid[0] / pt.pxmid[1]) + ',' + yNet +\n                    'H' + (lineStartX + pt.labelExtraX + finalX);\n            } else {\n                textLinePath += 'l' + pt.labelExtraX + ',' + yFromX +\n                    'v' + (yNet - yFromX) +\n                    'h' + finalX;\n            }\n        } else {\n            textLinePath +=\n                'V' + (pt.yLabelMid + pt.labelExtraY) +\n                'h' + finalX;\n        }\n\n        Lib.ensureSingle(sliceTop, 'path', 'textline')\n            .call(Color.stroke, trace.outsidetextfont.color)\n            .attr({\n                'stroke-width': Math.min(2, trace.outsidetextfont.size / 8),\n                d: textLinePath,\n                fill: 'none'\n            });\n    });\n}\n\nfunction attachFxHandlers(sliceTop, gd, cd) {\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n    var cx = cd0.cx;\n    var cy = cd0.cy;\n\n    // hover state vars\n    // have we drawn a hover label, so it should be cleared later\n    if(!('_hasHoverLabel' in trace)) trace._hasHoverLabel = false;\n    // have we emitted a hover event, so later an unhover event should be emitted\n    // note that click events do not depend on this - you can still get them\n    // with hovermode: false or if you were earlier dragging, then clicked\n    // in the same slice that you moused up in\n    if(!('_hasHoverEvent' in trace)) trace._hasHoverEvent = false;\n\n    sliceTop.on('mouseover', function(pt) {\n        // in case fullLayout or fullData has changed without a replot\n        var fullLayout2 = gd._fullLayout;\n        var trace2 = gd._fullData[trace.index];\n\n        if(gd._dragging || fullLayout2.hovermode === false) return;\n\n        var hoverinfo = trace2.hoverinfo;\n        if(Array.isArray(hoverinfo)) {\n            // super hacky: we need to pull out the *first* hoverinfo from\n            // pt.pts, then put it back into an array in a dummy trace\n            // and call castHoverinfo on that.\n            // TODO: do we want to have Fx.castHoverinfo somehow handle this?\n            // it already takes an array for index, for 2D, so this seems tricky.\n            hoverinfo = Fx.castHoverinfo({\n                hoverinfo: [helpers.castOption(hoverinfo, pt.pts)],\n                _module: trace._module\n            }, fullLayout2, 0);\n        }\n\n        if(hoverinfo === 'all') hoverinfo = 'label+text+value+percent+name';\n\n        // in case we dragged over the pie from another subplot,\n        // or if hover is turned off\n        if(trace2.hovertemplate || (hoverinfo !== 'none' && hoverinfo !== 'skip' && hoverinfo)) {\n            var rInscribed = pt.rInscribed || 0;\n            var hoverCenterX = cx + pt.pxmid[0] * (1 - rInscribed);\n            var hoverCenterY = cy + pt.pxmid[1] * (1 - rInscribed);\n            var separators = fullLayout2.separators;\n            var text = [];\n\n            if(hoverinfo && hoverinfo.indexOf('label') !== -1) text.push(pt.label);\n            pt.text = helpers.castOption(trace2.hovertext || trace2.text, pt.pts);\n            if(hoverinfo && hoverinfo.indexOf('text') !== -1) {\n                var tx = pt.text;\n                if(Lib.isValidTextValue(tx)) text.push(tx);\n            }\n            pt.value = pt.v;\n            pt.valueLabel = helpers.formatPieValue(pt.v, separators);\n            if(hoverinfo && hoverinfo.indexOf('value') !== -1) text.push(pt.valueLabel);\n            pt.percent = pt.v / cd0.vTotal;\n            pt.percentLabel = helpers.formatPiePercent(pt.percent, separators);\n            if(hoverinfo && hoverinfo.indexOf('percent') !== -1) text.push(pt.percentLabel);\n\n            var hoverLabel = trace2.hoverlabel;\n            var hoverFont = hoverLabel.font;\n\n            Fx.loneHover({\n                trace: trace,\n                x0: hoverCenterX - rInscribed * cd0.r,\n                x1: hoverCenterX + rInscribed * cd0.r,\n                y: hoverCenterY,\n                text: text.join('<br>'),\n                name: (trace2.hovertemplate || hoverinfo.indexOf('name') !== -1) ? trace2.name : undefined,\n                idealAlign: pt.pxmid[0] < 0 ? 'left' : 'right',\n                color: helpers.castOption(hoverLabel.bgcolor, pt.pts) || pt.color,\n                borderColor: helpers.castOption(hoverLabel.bordercolor, pt.pts),\n                fontFamily: helpers.castOption(hoverFont.family, pt.pts),\n                fontSize: helpers.castOption(hoverFont.size, pt.pts),\n                fontColor: helpers.castOption(hoverFont.color, pt.pts),\n                nameLength: helpers.castOption(hoverLabel.namelength, pt.pts),\n                textAlign: helpers.castOption(hoverLabel.align, pt.pts),\n                hovertemplate: helpers.castOption(trace2.hovertemplate, pt.pts),\n                hovertemplateLabels: pt,\n                eventData: [eventData(pt, trace2)]\n            }, {\n                container: fullLayout2._hoverlayer.node(),\n                outerContainer: fullLayout2._paper.node(),\n                gd: gd\n            });\n\n            trace._hasHoverLabel = true;\n        }\n\n        trace._hasHoverEvent = true;\n        gd.emit('plotly_hover', {\n            points: [eventData(pt, trace2)],\n            event: d3.event\n        });\n    });\n\n    sliceTop.on('mouseout', function(evt) {\n        var fullLayout2 = gd._fullLayout;\n        var trace2 = gd._fullData[trace.index];\n        var pt = d3.select(this).datum();\n\n        if(trace._hasHoverEvent) {\n            evt.originalEvent = d3.event;\n            gd.emit('plotly_unhover', {\n                points: [eventData(pt, trace2)],\n                event: d3.event\n            });\n            trace._hasHoverEvent = false;\n        }\n\n        if(trace._hasHoverLabel) {\n            Fx.loneUnhover(fullLayout2._hoverlayer.node());\n            trace._hasHoverLabel = false;\n        }\n    });\n\n    sliceTop.on('click', function(pt) {\n        // TODO: this does not support right-click. If we want to support it, we\n        // would likely need to change pie to use dragElement instead of straight\n        // mapbox event binding. Or perhaps better, make a simple wrapper with the\n        // right mousedown, mousemove, and mouseup handlers just for a left/right click\n        // mapbox would use this too.\n        var fullLayout2 = gd._fullLayout;\n        var trace2 = gd._fullData[trace.index];\n\n        if(gd._dragging || fullLayout2.hovermode === false) return;\n\n        gd._hoverdata = [eventData(pt, trace2)];\n        Fx.click(gd, d3.event);\n    });\n}\n\nfunction determineOutsideTextFont(trace, pt, layoutFont) {\n    var color =\n        helpers.castOption(trace.outsidetextfont.color, pt.pts) ||\n        helpers.castOption(trace.textfont.color, pt.pts) ||\n        layoutFont.color;\n\n    var family =\n        helpers.castOption(trace.outsidetextfont.family, pt.pts) ||\n        helpers.castOption(trace.textfont.family, pt.pts) ||\n        layoutFont.family;\n\n    var size =\n        helpers.castOption(trace.outsidetextfont.size, pt.pts) ||\n        helpers.castOption(trace.textfont.size, pt.pts) ||\n        layoutFont.size;\n\n    return {\n        color: color,\n        family: family,\n        size: size\n    };\n}\n\nfunction determineInsideTextFont(trace, pt, layoutFont) {\n    var customColor = helpers.castOption(trace.insidetextfont.color, pt.pts);\n    if(!customColor && trace._input.textfont) {\n        // Why not simply using trace.textfont? Because if not set, it\n        // defaults to layout.font which has a default color. But if\n        // textfont.color and insidetextfont.color don't supply a value,\n        // a contrasting color shall be used.\n        customColor = helpers.castOption(trace._input.textfont.color, pt.pts);\n    }\n\n    var family =\n        helpers.castOption(trace.insidetextfont.family, pt.pts) ||\n        helpers.castOption(trace.textfont.family, pt.pts) ||\n        layoutFont.family;\n\n    var size =\n        helpers.castOption(trace.insidetextfont.size, pt.pts) ||\n        helpers.castOption(trace.textfont.size, pt.pts) ||\n        layoutFont.size;\n\n    return {\n        color: customColor || Color.contrast(pt.color),\n        family: family,\n        size: size\n    };\n}\n\nfunction prerenderTitles(cdModule, gd) {\n    var cd0, trace;\n\n    // Determine the width and height of the title for each pie.\n    for(var i = 0; i < cdModule.length; i++) {\n        cd0 = cdModule[i][0];\n        trace = cd0.trace;\n\n        if(trace.title.text) {\n            var txt = trace.title.text;\n            if(trace._meta) {\n                txt = Lib.templateString(txt, trace._meta);\n            }\n\n            var dummyTitle = Drawing.tester.append('text')\n              .attr('data-notex', 1)\n              .text(txt)\n              .call(Drawing.font, trace.title.font)\n              .call(svgTextUtils.convertToTspans, gd);\n            var bBox = Drawing.bBox(dummyTitle.node(), true);\n            cd0.titleBox = {\n                width: bBox.width,\n                height: bBox.height,\n            };\n            dummyTitle.remove();\n        }\n    }\n}\n\nfunction transformInsideText(textBB, pt, cd0) {\n    var textDiameter = Math.sqrt(textBB.width * textBB.width + textBB.height * textBB.height);\n    var textAspect = textBB.width / textBB.height;\n    var halfAngle = pt.halfangle;\n    var ring = pt.ring;\n    var rInscribed = pt.rInscribed;\n    var r = cd0.r || pt.rpx1;\n\n    // max size text can be inserted inside without rotating it\n    // this inscribes the text rectangle in a circle, which is then inscribed\n    // in the slice, so it will be an underestimate, which some day we may want\n    // to improve so this case can get more use\n    var transform = {\n        scale: rInscribed * r * 2 / textDiameter,\n\n        // and the center position and rotation in this case\n        rCenter: 1 - rInscribed,\n        rotate: 0\n    };\n\n    if(transform.scale >= 1) return transform;\n\n    // max size if text is rotated radially\n    var Qr = textAspect + 1 / (2 * Math.tan(halfAngle));\n    var maxHalfHeightRotRadial = r * Math.min(\n        1 / (Math.sqrt(Qr * Qr + 0.5) + Qr),\n        ring / (Math.sqrt(textAspect * textAspect + ring / 2) + textAspect)\n    );\n    var radialTransform = {\n        scale: maxHalfHeightRotRadial * 2 / textBB.height,\n        rCenter: Math.cos(maxHalfHeightRotRadial / r) -\n            maxHalfHeightRotRadial * textAspect / r,\n        rotate: (180 / Math.PI * pt.midangle + 720) % 180 - 90\n    };\n\n    // max size if text is rotated tangentially\n    var aspectInv = 1 / textAspect;\n    var Qt = aspectInv + 1 / (2 * Math.tan(halfAngle));\n    var maxHalfWidthTangential = r * Math.min(\n        1 / (Math.sqrt(Qt * Qt + 0.5) + Qt),\n        ring / (Math.sqrt(aspectInv * aspectInv + ring / 2) + aspectInv)\n    );\n    var tangentialTransform = {\n        scale: maxHalfWidthTangential * 2 / textBB.width,\n        rCenter: Math.cos(maxHalfWidthTangential / r) -\n            maxHalfWidthTangential / textAspect / r,\n        rotate: (180 / Math.PI * pt.midangle + 810) % 180 - 90\n    };\n    // if we need a rotated transform, pick the biggest one\n    // even if both are bigger than 1\n    var rotatedTransform = tangentialTransform.scale > radialTransform.scale ?\n            tangentialTransform : radialTransform;\n\n    if(transform.scale < 1 && rotatedTransform.scale > transform.scale) return rotatedTransform;\n    return transform;\n}\n\nfunction getInscribedRadiusFraction(pt, cd0) {\n    if(pt.v === cd0.vTotal && !cd0.trace.hole) return 1;// special case of 100% with no hole\n\n    return Math.min(1 / (1 + 1 / Math.sin(pt.halfangle)), pt.ring / 2);\n}\n\nfunction transformOutsideText(textBB, pt) {\n    var x = pt.pxmid[0];\n    var y = pt.pxmid[1];\n    var dx = textBB.width / 2;\n    var dy = textBB.height / 2;\n\n    if(x < 0) dx *= -1;\n    if(y < 0) dy *= -1;\n\n    return {\n        scale: 1,\n        rCenter: 1,\n        rotate: 0,\n        x: dx + Math.abs(dy) * (dx > 0 ? 1 : -1) / 2,\n        y: dy / (1 + x * x / (y * y)),\n        outside: true\n    };\n}\n\nfunction positionTitleInside(cd0) {\n    var textDiameter =\n        Math.sqrt(cd0.titleBox.width * cd0.titleBox.width + cd0.titleBox.height * cd0.titleBox.height);\n    return {\n        x: cd0.cx,\n        y: cd0.cy,\n        scale: cd0.trace.hole * cd0.r * 2 / textDiameter,\n        tx: 0,\n        ty: - cd0.titleBox.height / 2 + cd0.trace.title.font.size\n    };\n}\n\nfunction positionTitleOutside(cd0, plotSize) {\n    var scaleX = 1;\n    var scaleY = 1;\n    var maxPull;\n\n    var trace = cd0.trace;\n    // position of the baseline point of the text box in the plot, before scaling.\n    // we anchored the text in the middle, so the baseline is on the bottom middle\n    // of the first line of text.\n    var topMiddle = {\n        x: cd0.cx,\n        y: cd0.cy\n    };\n    // relative translation of the text box after scaling\n    var translate = {\n        tx: 0,\n        ty: 0\n    };\n\n    // we reason below as if the baseline is the top middle point of the text box.\n    // so we must add the font size to approximate the y-coord. of the top.\n    // note that this correction must happen after scaling.\n    translate.ty += trace.title.font.size;\n    maxPull = getMaxPull(trace);\n\n    if(trace.title.position.indexOf('top') !== -1) {\n        topMiddle.y -= (1 + maxPull) * cd0.r;\n        translate.ty -= cd0.titleBox.height;\n    } else if(trace.title.position.indexOf('bottom') !== -1) {\n        topMiddle.y += (1 + maxPull) * cd0.r;\n    }\n\n    var rx = applyAspectRatio(cd0.r, cd0.trace.aspectratio);\n\n    var maxWidth = plotSize.w * (trace.domain.x[1] - trace.domain.x[0]) / 2;\n    if(trace.title.position.indexOf('left') !== -1) {\n        // we start the text at the left edge of the pie\n        maxWidth = maxWidth + rx;\n        topMiddle.x -= (1 + maxPull) * rx;\n        translate.tx += cd0.titleBox.width / 2;\n    } else if(trace.title.position.indexOf('center') !== -1) {\n        maxWidth *= 2;\n    } else if(trace.title.position.indexOf('right') !== -1) {\n        maxWidth = maxWidth + rx;\n        topMiddle.x += (1 + maxPull) * rx;\n        translate.tx -= cd0.titleBox.width / 2;\n    }\n    scaleX = maxWidth / cd0.titleBox.width;\n    scaleY = getTitleSpace(cd0, plotSize) / cd0.titleBox.height;\n    return {\n        x: topMiddle.x,\n        y: topMiddle.y,\n        scale: Math.min(scaleX, scaleY),\n        tx: translate.tx,\n        ty: translate.ty\n    };\n}\n\nfunction applyAspectRatio(x, aspectratio) {\n    return x / ((aspectratio === undefined) ? 1 : aspectratio);\n}\n\nfunction getTitleSpace(cd0, plotSize) {\n    var trace = cd0.trace;\n    var pieBoxHeight = plotSize.h * (trace.domain.y[1] - trace.domain.y[0]);\n    // use at most half of the plot for the title\n    return Math.min(cd0.titleBox.height, pieBoxHeight / 2);\n}\n\nfunction getMaxPull(trace) {\n    var maxPull = trace.pull;\n    if(!maxPull) return 0;\n\n    var j;\n    if(Array.isArray(maxPull)) {\n        maxPull = 0;\n        for(j = 0; j < trace.pull.length; j++) {\n            if(trace.pull[j] > maxPull) maxPull = trace.pull[j];\n        }\n    }\n    return maxPull;\n}\n\nfunction scootLabels(quadrants, trace) {\n    var xHalf, yHalf, equatorFirst, farthestX, farthestY,\n        xDiffSign, yDiffSign, thisQuad, oppositeQuad,\n        wholeSide, i, thisQuadOutside, firstOppositeOutsidePt;\n\n    function topFirst(a, b) { return a.pxmid[1] - b.pxmid[1]; }\n    function bottomFirst(a, b) { return b.pxmid[1] - a.pxmid[1]; }\n\n    function scootOneLabel(thisPt, prevPt) {\n        if(!prevPt) prevPt = {};\n\n        var prevOuterY = prevPt.labelExtraY + (yHalf ? prevPt.yLabelMax : prevPt.yLabelMin);\n        var thisInnerY = yHalf ? thisPt.yLabelMin : thisPt.yLabelMax;\n        var thisOuterY = yHalf ? thisPt.yLabelMax : thisPt.yLabelMin;\n        var thisSliceOuterY = thisPt.cyFinal + farthestY(thisPt.px0[1], thisPt.px1[1]);\n        var newExtraY = prevOuterY - thisInnerY;\n\n        var xBuffer, i, otherPt, otherOuterY, otherOuterX, newExtraX;\n\n        // make sure this label doesn't overlap other labels\n        // this *only* has us move these labels vertically\n        if(newExtraY * yDiffSign > 0) thisPt.labelExtraY = newExtraY;\n\n        // make sure this label doesn't overlap any slices\n        if(!Array.isArray(trace.pull)) return; // this can only happen with array pulls\n\n        for(i = 0; i < wholeSide.length; i++) {\n            otherPt = wholeSide[i];\n\n            // overlap can only happen if the other point is pulled more than this one\n            if(otherPt === thisPt || (\n                (helpers.castOption(trace.pull, thisPt.pts) || 0) >=\n                (helpers.castOption(trace.pull, otherPt.pts) || 0))\n            ) {\n                continue;\n            }\n\n            if((thisPt.pxmid[1] - otherPt.pxmid[1]) * yDiffSign > 0) {\n                // closer to the equator - by construction all of these happen first\n                // move the text vertically to get away from these slices\n                otherOuterY = otherPt.cyFinal + farthestY(otherPt.px0[1], otherPt.px1[1]);\n                newExtraY = otherOuterY - thisInnerY - thisPt.labelExtraY;\n\n                if(newExtraY * yDiffSign > 0) thisPt.labelExtraY += newExtraY;\n            } else if((thisOuterY + thisPt.labelExtraY - thisSliceOuterY) * yDiffSign > 0) {\n                // farther from the equator - happens after we've done all the\n                // vertical moving we're going to do\n                // move horizontally to get away from these more polar slices\n\n                // if we're moving horz. based on a slice that's several slices away from this one\n                // then we need some extra space for the lines to labels between them\n                xBuffer = 3 * xDiffSign * Math.abs(i - wholeSide.indexOf(thisPt));\n\n                otherOuterX = otherPt.cxFinal + farthestX(otherPt.px0[0], otherPt.px1[0]);\n                newExtraX = otherOuterX + xBuffer - (thisPt.cxFinal + thisPt.pxmid[0]) - thisPt.labelExtraX;\n\n                if(newExtraX * xDiffSign > 0) thisPt.labelExtraX += newExtraX;\n            }\n        }\n    }\n\n    for(yHalf = 0; yHalf < 2; yHalf++) {\n        equatorFirst = yHalf ? topFirst : bottomFirst;\n        farthestY = yHalf ? Math.max : Math.min;\n        yDiffSign = yHalf ? 1 : -1;\n\n        for(xHalf = 0; xHalf < 2; xHalf++) {\n            farthestX = xHalf ? Math.max : Math.min;\n            xDiffSign = xHalf ? 1 : -1;\n\n            // first sort the array\n            // note this is a copy of cd, so cd itself doesn't get sorted\n            // but we can still modify points in place.\n            thisQuad = quadrants[yHalf][xHalf];\n            thisQuad.sort(equatorFirst);\n\n            oppositeQuad = quadrants[1 - yHalf][xHalf];\n            wholeSide = oppositeQuad.concat(thisQuad);\n\n            thisQuadOutside = [];\n            for(i = 0; i < thisQuad.length; i++) {\n                if(thisQuad[i].yLabelMid !== undefined) thisQuadOutside.push(thisQuad[i]);\n            }\n\n            firstOppositeOutsidePt = false;\n            for(i = 0; yHalf && i < oppositeQuad.length; i++) {\n                if(oppositeQuad[i].yLabelMid !== undefined) {\n                    firstOppositeOutsidePt = oppositeQuad[i];\n                    break;\n                }\n            }\n\n            // each needs to avoid the previous\n            for(i = 0; i < thisQuadOutside.length; i++) {\n                var prevPt = i && thisQuadOutside[i - 1];\n                // bottom half needs to avoid the first label of the top half\n                // top half we still need to call scootOneLabel on the first slice\n                // so we can avoid other slices, but we don't pass a prevPt\n                if(firstOppositeOutsidePt && !i) prevPt = firstOppositeOutsidePt;\n                scootOneLabel(thisQuadOutside[i], prevPt);\n            }\n        }\n    }\n}\n\nfunction layoutAreas(cdModule, plotSize) {\n    var scaleGroups = [];\n\n    // figure out the center and maximum radius\n    for(var i = 0; i < cdModule.length; i++) {\n        var cd0 = cdModule[i][0];\n        var trace = cd0.trace;\n\n        var domain = trace.domain;\n        var width = plotSize.w * (domain.x[1] - domain.x[0]);\n        var height = plotSize.h * (domain.y[1] - domain.y[0]);\n        // leave some space for the title, if it will be displayed outside\n        if(trace.title.text && trace.title.position !== 'middle center') {\n            height -= getTitleSpace(cd0, plotSize);\n        }\n\n        var rx = width / 2;\n        var ry = height / 2;\n        if(trace.type === 'funnelarea' && !trace.scalegroup) {\n            ry /= trace.aspectratio;\n        }\n\n        cd0.r = Math.min(rx, ry) / (1 + getMaxPull(trace));\n\n        cd0.cx = plotSize.l + plotSize.w * (trace.domain.x[1] + trace.domain.x[0]) / 2;\n        cd0.cy = plotSize.t + plotSize.h * (1 - trace.domain.y[0]) - height / 2;\n        if(trace.title.text && trace.title.position.indexOf('bottom') !== -1) {\n            cd0.cy -= getTitleSpace(cd0, plotSize);\n        }\n\n        if(trace.scalegroup && scaleGroups.indexOf(trace.scalegroup) === -1) {\n            scaleGroups.push(trace.scalegroup);\n        }\n    }\n\n    groupScale(cdModule, scaleGroups);\n}\n\nfunction groupScale(cdModule, scaleGroups) {\n    var cd0, i, trace;\n\n    // scale those that are grouped\n    for(var k = 0; k < scaleGroups.length; k++) {\n        var min = Infinity;\n        var g = scaleGroups[k];\n\n        for(i = 0; i < cdModule.length; i++) {\n            cd0 = cdModule[i][0];\n            trace = cd0.trace;\n\n            if(trace.scalegroup === g) {\n                var area;\n                if(trace.type === 'pie') {\n                    area = cd0.r * cd0.r;\n                } else if(trace.type === 'funnelarea') {\n                    var rx, ry;\n\n                    if(trace.aspectratio > 1) {\n                        rx = cd0.r;\n                        ry = rx / trace.aspectratio;\n                    } else {\n                        ry = cd0.r;\n                        rx = ry * trace.aspectratio;\n                    }\n\n                    rx *= (1 + trace.baseratio) / 2;\n\n                    area = rx * ry;\n                }\n\n                min = Math.min(min, area / cd0.vTotal);\n            }\n        }\n\n        for(i = 0; i < cdModule.length; i++) {\n            cd0 = cdModule[i][0];\n            trace = cd0.trace;\n            if(trace.scalegroup === g) {\n                var v = min * cd0.vTotal;\n                if(trace.type === 'funnelarea') {\n                    v /= (1 + trace.baseratio) / 2;\n                    v /= trace.aspectratio;\n                }\n\n                cd0.r = Math.sqrt(v);\n            }\n        }\n    }\n}\n\nfunction setCoords(cd) {\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n    var currentAngle = trace.rotation * Math.PI / 180;\n    var angleFactor = 2 * Math.PI / cd0.vTotal;\n    var firstPt = 'px0';\n    var lastPt = 'px1';\n\n    var i, cdi, currentCoords;\n\n    if(trace.direction === 'counterclockwise') {\n        for(i = 0; i < cd.length; i++) {\n            if(!cd[i].hidden) break; // find the first non-hidden slice\n        }\n        if(i === cd.length) return; // all slices hidden\n\n        currentAngle += angleFactor * cd[i].v;\n        angleFactor *= -1;\n        firstPt = 'px1';\n        lastPt = 'px0';\n    }\n\n    function getCoords(angle) {\n        return [cd0.r * Math.sin(angle), -cd0.r * Math.cos(angle)];\n    }\n\n    currentCoords = getCoords(currentAngle);\n\n    for(i = 0; i < cd.length; i++) {\n        cdi = cd[i];\n        if(cdi.hidden) continue;\n\n        cdi[firstPt] = currentCoords;\n\n        currentAngle += angleFactor * cdi.v / 2;\n        cdi.pxmid = getCoords(currentAngle);\n        cdi.midangle = currentAngle;\n\n        currentAngle += angleFactor * cdi.v / 2;\n        currentCoords = getCoords(currentAngle);\n\n        cdi[lastPt] = currentCoords;\n\n        cdi.largeArc = (cdi.v > cd0.vTotal / 2) ? 1 : 0;\n\n        cdi.halfangle = Math.PI * Math.min(cdi.v / cd0.vTotal, 0.5);\n        cdi.ring = 1 - trace.hole;\n        cdi.rInscribed = getInscribedRadiusFraction(cdi, cd0);\n    }\n}\n\nmodule.exports = {\n    plot: plot,\n    transformInsideText: transformInsideText,\n    determineInsideTextFont: determineInsideTextFont,\n    positionTitleOutside: positionTitleOutside,\n    prerenderTitles: prerenderTitles,\n    layoutAreas: layoutAreas,\n    attachFxHandlers: attachFxHandlers,\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../lib\":703,\"../../lib/svg_text_utils\":727,\"./event_data\":1053,\"./helpers\":1054,\"d3\":157}],1059:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar styleOne = _dereq_('./style_one');\n\nmodule.exports = function style(gd) {\n    gd._fullLayout._pielayer.selectAll('.trace').each(function(cd) {\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n        var traceSelection = d3.select(this);\n\n        traceSelection.style({opacity: trace.opacity});\n\n        traceSelection.selectAll('path.surface').each(function(pt) {\n            d3.select(this).call(styleOne, pt, trace);\n        });\n    });\n};\n\n},{\"./style_one\":1060,\"d3\":157}],1060:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar castOption = _dereq_('./helpers').castOption;\n\nmodule.exports = function styleOne(s, pt, trace) {\n    var line = trace.marker.line;\n    var lineColor = castOption(line.color, pt.pts) || Color.defaultLine;\n    var lineWidth = castOption(line.width, pt.pts) || 0;\n\n    s.style('stroke-width', lineWidth)\n        .call(Color.fill, pt.color)\n        .call(Color.stroke, lineColor);\n};\n\n},{\"../../components/color\":580,\"./helpers\":1054}],1061:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterglAttrs = _dereq_('../scatter/attributes');\n\nmodule.exports = {\n    x: scatterglAttrs.x,\n    y: scatterglAttrs.y,\n    xy: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    indices: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    xbounds: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    ybounds: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    text: scatterglAttrs.text,\n    marker: {\n        color: {\n            valType: 'color',\n            arrayOk: false,\n            \n            editType: 'calc',\n            \n        },\n        opacity: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            dflt: 1,\n            arrayOk: false,\n            \n            editType: 'calc',\n            \n        },\n        blend: {\n            valType: 'boolean',\n            dflt: null,\n            \n            editType: 'calc',\n            \n        },\n        sizemin: {\n            valType: 'number',\n            min: 0.1,\n            max: 2,\n            dflt: 0.5,\n            \n            editType: 'calc',\n            \n        },\n        sizemax: {\n            valType: 'number',\n            min: 0.1,\n            dflt: 20,\n            \n            editType: 'calc',\n            \n        },\n        border: {\n            color: {\n                valType: 'color',\n                arrayOk: false,\n                \n                editType: 'calc',\n                \n            },\n            arearatio: {\n                valType: 'number',\n                min: 0,\n                max: 1,\n                dflt: 0,\n                \n                editType: 'calc',\n                \n            },\n            editType: 'calc'\n        },\n        editType: 'calc'\n    },\n    transforms: undefined\n};\n\n},{\"../scatter/attributes\":1075}],1062:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createPointCloudRenderer = _dereq_('gl-pointcloud2d');\n\nvar str2RGBArray = _dereq_('../../lib/str2rgbarray');\nvar findExtremes = _dereq_('../../plots/cartesian/autorange').findExtremes;\nvar getTraceColor = _dereq_('../scatter/get_trace_color');\n\nfunction Pointcloud(scene, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.type = 'pointcloud';\n\n    this.pickXData = [];\n    this.pickYData = [];\n    this.xData = [];\n    this.yData = [];\n    this.textLabels = [];\n    this.color = 'rgb(0, 0, 0)';\n    this.name = '';\n    this.hoverinfo = 'all';\n\n    this.idToIndex = new Int32Array(0);\n    this.bounds = [0, 0, 0, 0];\n\n    this.pointcloudOptions = {\n        positions: new Float32Array(0),\n        idToIndex: this.idToIndex,\n        sizemin: 0.5,\n        sizemax: 12,\n        color: [0, 0, 0, 1],\n        areaRatio: 1,\n        borderColor: [0, 0, 0, 1]\n    };\n    this.pointcloud = createPointCloudRenderer(scene.glplot, this.pointcloudOptions);\n    this.pointcloud._trace = this; // scene2d requires this prop\n}\n\nvar proto = Pointcloud.prototype;\n\nproto.handlePick = function(pickResult) {\n    var index = this.idToIndex[pickResult.pointId];\n\n    // prefer the readout from XY, if present\n    return {\n        trace: this,\n        dataCoord: pickResult.dataCoord,\n        traceCoord: this.pickXYData ?\n            [this.pickXYData[index * 2], this.pickXYData[index * 2 + 1]] :\n            [this.pickXData[index], this.pickYData[index]],\n        textLabel: Array.isArray(this.textLabels) ?\n            this.textLabels[index] :\n            this.textLabels,\n        color: this.color,\n        name: this.name,\n        pointIndex: index,\n        hoverinfo: this.hoverinfo\n    };\n};\n\nproto.update = function(options) {\n    this.index = options.index;\n    this.textLabels = options.text;\n    this.name = options.name;\n    this.hoverinfo = options.hoverinfo;\n    this.bounds = [Infinity, Infinity, -Infinity, -Infinity];\n\n    this.updateFast(options);\n\n    this.color = getTraceColor(options, {});\n};\n\nproto.updateFast = function(options) {\n    var x = this.xData = this.pickXData = options.x;\n    var y = this.yData = this.pickYData = options.y;\n    var xy = this.pickXYData = options.xy;\n\n    var userBounds = options.xbounds && options.ybounds;\n    var index = options.indices;\n\n    var len;\n    var idToIndex;\n    var positions;\n    var bounds = this.bounds;\n\n    var xx, yy, i;\n\n    if(xy) {\n        positions = xy;\n\n        // dividing xy.length by 2 and truncating to integer if xy.length was not even\n        len = xy.length >>> 1;\n\n        if(userBounds) {\n            bounds[0] = options.xbounds[0];\n            bounds[2] = options.xbounds[1];\n            bounds[1] = options.ybounds[0];\n            bounds[3] = options.ybounds[1];\n        } else {\n            for(i = 0; i < len; i++) {\n                xx = positions[i * 2];\n                yy = positions[i * 2 + 1];\n\n                if(xx < bounds[0]) bounds[0] = xx;\n                if(xx > bounds[2]) bounds[2] = xx;\n                if(yy < bounds[1]) bounds[1] = yy;\n                if(yy > bounds[3]) bounds[3] = yy;\n            }\n        }\n\n        if(index) {\n            idToIndex = index;\n        } else {\n            idToIndex = new Int32Array(len);\n\n            for(i = 0; i < len; i++) {\n                idToIndex[i] = i;\n            }\n        }\n    } else {\n        len = x.length;\n\n        positions = new Float32Array(2 * len);\n        idToIndex = new Int32Array(len);\n\n        for(i = 0; i < len; i++) {\n            xx = x[i];\n            yy = y[i];\n\n            idToIndex[i] = i;\n\n            positions[i * 2] = xx;\n            positions[i * 2 + 1] = yy;\n\n            if(xx < bounds[0]) bounds[0] = xx;\n            if(xx > bounds[2]) bounds[2] = xx;\n            if(yy < bounds[1]) bounds[1] = yy;\n            if(yy > bounds[3]) bounds[3] = yy;\n        }\n    }\n\n    this.idToIndex = idToIndex;\n    this.pointcloudOptions.idToIndex = idToIndex;\n\n    this.pointcloudOptions.positions = positions;\n\n    var markerColor = str2RGBArray(options.marker.color);\n    var borderColor = str2RGBArray(options.marker.border.color);\n    var opacity = options.opacity * options.marker.opacity;\n\n    markerColor[3] *= opacity;\n    this.pointcloudOptions.color = markerColor;\n\n    // detect blending from the number of points, if undefined\n    // because large data with blending hits performance\n    var blend = options.marker.blend;\n    if(blend === null) {\n        var maxPoints = 100;\n        blend = x.length < maxPoints || y.length < maxPoints;\n    }\n    this.pointcloudOptions.blend = blend;\n\n    borderColor[3] *= opacity;\n    this.pointcloudOptions.borderColor = borderColor;\n\n    var markerSizeMin = options.marker.sizemin;\n    var markerSizeMax = Math.max(options.marker.sizemax, options.marker.sizemin);\n    this.pointcloudOptions.sizeMin = markerSizeMin;\n    this.pointcloudOptions.sizeMax = markerSizeMax;\n    this.pointcloudOptions.areaRatio = options.marker.border.arearatio;\n\n    this.pointcloud.update(this.pointcloudOptions);\n\n    // add item for autorange routine\n    var xa = this.scene.xaxis;\n    var ya = this.scene.yaxis;\n    var pad = markerSizeMax / 2 || 0.5;\n    options._extremes[xa._id] = findExtremes(xa, [bounds[0], bounds[2]], {ppad: pad});\n    options._extremes[ya._id] = findExtremes(ya, [bounds[1], bounds[3]], {ppad: pad});\n};\n\nproto.dispose = function() {\n    this.pointcloud.dispose();\n};\n\nfunction createPointcloud(scene, data) {\n    var plot = new Pointcloud(scene, data.uid);\n    plot.update(data);\n    return plot;\n}\n\nmodule.exports = createPointcloud;\n\n},{\"../../lib/str2rgbarray\":726,\"../../plots/cartesian/autorange\":750,\"../scatter/get_trace_color\":1084,\"gl-pointcloud2d\":291}],1063:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    coerce('x');\n    coerce('y');\n\n    coerce('xbounds');\n    coerce('ybounds');\n\n    if(traceIn.xy && traceIn.xy instanceof Float32Array) {\n        traceOut.xy = traceIn.xy;\n    }\n\n    if(traceIn.indices && traceIn.indices instanceof Int32Array) {\n        traceOut.indices = traceIn.indices;\n    }\n\n    coerce('text');\n    coerce('marker.color', defaultColor);\n    coerce('marker.opacity');\n    coerce('marker.blend');\n    coerce('marker.sizemin');\n    coerce('marker.sizemax');\n    coerce('marker.border.color', defaultColor);\n    coerce('marker.border.arearatio');\n\n    // disable 1D transforms - that would defeat the purpose of this trace type, performance!\n    traceOut._length = null;\n};\n\n},{\"../../lib\":703,\"./attributes\":1061}],1064:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n\n    // reuse the Scatter3D 'dummy' calc step so that legends know what to do\n    calc: _dereq_('../scatter3d/calc'),\n    plot: _dereq_('./convert'),\n\n    moduleType: 'trace',\n    name: 'pointcloud',\n    basePlotModule: _dereq_('../../plots/gl2d'),\n    categories: ['gl', 'gl2d', 'showLegend'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl2d\":789,\"../scatter3d/calc\":1102,\"./attributes\":1061,\"./convert\":1062,\"./defaults\":1063}],1065:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar colorAttrs = _dereq_('../../components/color/attributes');\nvar fxAttrs = _dereq_('../../components/fx/attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorAttributes = _dereq_('../../components/colorscale/attributes');\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar attrs = module.exports = overrideAll({\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: [],\n        arrayOk: false,\n        \n    }),\n    hoverlabel: fxAttrs.hoverlabel,\n    domain: domainAttrs({name: 'sankey', trace: true}),\n\n    orientation: {\n        valType: 'enumerated',\n        values: ['v', 'h'],\n        dflt: 'h',\n        \n        \n    },\n\n    valueformat: {\n        valType: 'string',\n        dflt: '.3s',\n        \n        \n    },\n\n    valuesuffix: {\n        valType: 'string',\n        dflt: '',\n        \n        \n    },\n\n    arrangement: {\n        valType: 'enumerated',\n        values: ['snap', 'perpendicular', 'freeform', 'fixed'],\n        dflt: 'snap',\n        \n        \n    },\n\n    textfont: fontAttrs({\n        \n    }),\n\n    node: {\n        label: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        groups: {\n            valType: 'info_array',\n            impliedEdits: {'x': [], 'y': []},\n            dimensions: 2,\n            freeLength: true,\n            dflt: [],\n            items: {valType: 'number', editType: 'calc'},\n            \n            \n        },\n        x: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        y: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        color: {\n            valType: 'color',\n            \n            arrayOk: true,\n            \n        },\n        line: {\n            color: {\n                valType: 'color',\n                \n                dflt: colorAttrs.defaultLine,\n                arrayOk: true,\n                \n            },\n            width: {\n                valType: 'number',\n                \n                min: 0,\n                dflt: 0.5,\n                arrayOk: true,\n                \n            }\n        },\n        pad: {\n            valType: 'number',\n            arrayOk: false,\n            min: 0,\n            dflt: 20,\n            \n            \n        },\n        thickness: {\n            valType: 'number',\n            arrayOk: false,\n            min: 1,\n            dflt: 20,\n            \n            \n        },\n        hoverinfo: {\n            valType: 'enumerated',\n            values: ['all', 'none', 'skip'],\n            dflt: 'all',\n            \n            \n        },\n        hoverlabel: fxAttrs.hoverlabel, // needs editType override,\n        hovertemplate: hovertemplateAttrs({}, {\n            \n            keys: ['value', 'label']\n        }),\n        \n    },\n\n    link: {\n        label: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        color: {\n            valType: 'color',\n            \n            arrayOk: true,\n            \n        },\n        line: {\n            color: {\n                valType: 'color',\n                \n                dflt: colorAttrs.defaultLine,\n                arrayOk: true,\n                \n            },\n            width: {\n                valType: 'number',\n                \n                min: 0,\n                dflt: 0,\n                arrayOk: true,\n                \n            }\n        },\n        source: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n        target: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n        value: {\n            valType: 'data_array',\n            dflt: [],\n            \n            \n        },\n        hoverinfo: {\n            valType: 'enumerated',\n            values: ['all', 'none', 'skip'],\n            dflt: 'all',\n            \n            \n        },\n        hoverlabel: fxAttrs.hoverlabel, // needs editType override,\n        hovertemplate: hovertemplateAttrs({}, {\n            \n            keys: ['value', 'label']\n        }),\n        colorscales: templatedArray('concentrationscales', {\n            editType: 'calc',\n            label: {\n                valType: 'string',\n                \n                editType: 'calc',\n                \n                dflt: ''\n            },\n            cmax: {\n                valType: 'number',\n                \n                editType: 'calc',\n                dflt: 1,\n                \n            },\n            cmin: {\n                valType: 'number',\n                \n                editType: 'calc',\n                dflt: 0,\n                \n            },\n            colorscale: extendFlat(colorAttributes().colorscale, {dflt: [[0, 'white'], [1, 'black']]})\n        }),\n        \n        \n    }\n}, 'calc', 'nested');\nattrs.transforms = undefined;\n\n},{\"../../components/color/attributes\":579,\"../../components/colorscale/attributes\":587,\"../../components/fx/attributes\":610,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plot_api/plot_template\":741,\"../../plots/attributes\":748,\"../../plots/domain\":776,\"../../plots/font_attributes\":777}],1066:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\nvar plot = _dereq_('./plot');\nvar fxAttrs = _dereq_('../../components/fx/layout_attributes');\n\nvar setCursor = _dereq_('../../lib/setcursor');\nvar dragElement = _dereq_('../../components/dragelement');\nvar prepSelect = _dereq_('../../plots/cartesian/select').prepSelect;\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar SANKEY = 'sankey';\n\nexports.name = SANKEY;\n\nexports.baseLayoutAttrOverrides = overrideAll({\n    hoverlabel: fxAttrs.hoverlabel\n}, 'plot', 'nested');\n\nexports.plot = function(gd) {\n    var calcData = getModuleCalcData(gd.calcdata, SANKEY)[0];\n    plot(gd, calcData);\n    exports.updateFx(gd);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadPlot = (oldFullLayout._has && oldFullLayout._has(SANKEY));\n    var hasPlot = (newFullLayout._has && newFullLayout._has(SANKEY));\n\n    if(hadPlot && !hasPlot) {\n        oldFullLayout._paperdiv.selectAll('.sankey').remove();\n        oldFullLayout._paperdiv.selectAll('.bgsankey').remove();\n    }\n};\n\nexports.updateFx = function(gd) {\n    for(var i = 0; i < gd._fullData.length; i++) {\n        subplotUpdateFx(gd, i);\n    }\n};\n\nfunction subplotUpdateFx(gd, index) {\n    var trace = gd._fullData[index];\n    var fullLayout = gd._fullLayout;\n\n    var dragMode = fullLayout.dragmode;\n    var cursor = fullLayout.dragmode === 'pan' ? 'move' : 'crosshair';\n    var bgRect = trace._bgRect;\n\n    if(dragMode === 'pan' || dragMode === 'zoom') return;\n\n    setCursor(bgRect, cursor);\n\n    var xaxis = {\n        _id: 'x',\n        c2p: Lib.identity,\n        _offset: trace._sankey.translateX,\n        _length: trace._sankey.width\n    };\n    var yaxis = {\n        _id: 'y',\n        c2p: Lib.identity,\n        _offset: trace._sankey.translateY,\n        _length: trace._sankey.height\n    };\n\n    // Note: dragOptions is needed to be declared for all dragmodes because\n    // it's the object that holds persistent selection state.\n    var dragOptions = {\n        gd: gd,\n        element: bgRect.node(),\n        plotinfo: {\n            id: index,\n            xaxis: xaxis,\n            yaxis: yaxis,\n            fillRangeItems: Lib.noop\n        },\n        subplot: index,\n        // create mock x/y axes for hover routine\n        xaxes: [xaxis],\n        yaxes: [yaxis],\n        doneFnCompleted: function(selection) {\n            var traceNow = gd._fullData[index];\n            var newGroups;\n            var oldGroups = traceNow.node.groups.slice();\n            var newGroup = [];\n\n            function findNode(pt) {\n                var nodes = traceNow._sankey.graph.nodes;\n                for(var i = 0; i < nodes.length; i++) {\n                    if(nodes[i].pointNumber === pt) return nodes[i];\n                }\n            }\n\n            for(var j = 0; j < selection.length; j++) {\n                var node = findNode(selection[j].pointNumber);\n                if(!node) continue;\n\n                // If the node represents a group\n                if(node.group) {\n                    // Add all its children to the current selection\n                    for(var k = 0; k < node.childrenNodes.length; k++) {\n                        newGroup.push(node.childrenNodes[k].pointNumber);\n                    }\n                    // Flag group for removal from existing list of groups\n                    oldGroups[node.pointNumber - traceNow.node._count] = false;\n                } else {\n                    newGroup.push(node.pointNumber);\n                }\n            }\n\n            newGroups = oldGroups\n                .filter(Boolean)\n                .concat([newGroup]);\n\n            Registry.call('_guiRestyle', gd, {\n                'node.groups': [ newGroups ]\n            }, index);\n        }\n    };\n\n    dragOptions.prepFn = function(e, startX, startY) {\n        prepSelect(e, startX, startY, dragOptions, dragMode);\n    };\n\n    dragElement.init(dragOptions);\n}\n\n},{\"../../components/dragelement\":598,\"../../components/fx/layout_attributes\":620,\"../../lib\":703,\"../../lib/setcursor\":723,\"../../plot_api/edit_types\":734,\"../../plots/cartesian/select\":768,\"../../plots/get_data\":786,\"../../registry\":831,\"./plot\":1071}],1067:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar tarjan = _dereq_('strongly-connected-components');\nvar Lib = _dereq_('../../lib');\nvar wrap = _dereq_('../../lib/gup').wrap;\n\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\nvar isIndex = Lib.isIndex;\nvar Colorscale = _dereq_('../../components/colorscale');\n\nfunction convertToD3Sankey(trace) {\n    var nodeSpec = trace.node;\n    var linkSpec = trace.link;\n\n    var links = [];\n    var hasLinkColorArray = isArrayOrTypedArray(linkSpec.color);\n    var linkedNodes = {};\n\n    var components = {};\n    var componentCount = linkSpec.colorscales.length;\n    var i;\n    for(i = 0; i < componentCount; i++) {\n        var cscale = linkSpec.colorscales[i];\n        var specs = Colorscale.extractScale(cscale, {cLetter: 'c'});\n        var scale = Colorscale.makeColorScaleFunc(specs);\n        components[cscale.label] = scale;\n    }\n\n    var maxNodeId = 0;\n    for(i = 0; i < linkSpec.value.length; i++) {\n        if(linkSpec.source[i] > maxNodeId) maxNodeId = linkSpec.source[i];\n        if(linkSpec.target[i] > maxNodeId) maxNodeId = linkSpec.target[i];\n    }\n    var nodeCount = maxNodeId + 1;\n    trace.node._count = nodeCount;\n\n    // Group nodes\n    var j;\n    var groups = trace.node.groups;\n    var groupLookup = {};\n    for(i = 0; i < groups.length; i++) {\n        var group = groups[i];\n        // Build a lookup table to quickly find in which group a node is\n        for(j = 0; j < group.length; j++) {\n            var nodeIndex = group[j];\n            var groupIndex = nodeCount + i;\n            if(groupLookup.hasOwnProperty(nodeIndex)) {\n                Lib.warn('Node ' + nodeIndex + ' is already part of a group.');\n            } else {\n                groupLookup[nodeIndex] = groupIndex;\n            }\n        }\n    }\n\n    // Process links\n    var groupedLinks = {\n        source: [],\n        target: []\n    };\n    for(i = 0; i < linkSpec.value.length; i++) {\n        var val = linkSpec.value[i];\n        // remove negative values, but keep zeros with special treatment\n        var source = linkSpec.source[i];\n        var target = linkSpec.target[i];\n        if(!(val > 0 && isIndex(source, nodeCount) && isIndex(target, nodeCount))) {\n            continue;\n        }\n\n        // Remove links that are within the same group\n        if(groupLookup.hasOwnProperty(source) && groupLookup.hasOwnProperty(target) && groupLookup[source] === groupLookup[target]) {\n            continue;\n        }\n\n        // if link targets a node in the group, relink target to that group\n        if(groupLookup.hasOwnProperty(target)) {\n            target = groupLookup[target];\n        }\n\n        // if link originates from a node in a group, relink source to that group\n        if(groupLookup.hasOwnProperty(source)) {\n            source = groupLookup[source];\n        }\n\n        source = +source;\n        target = +target;\n        linkedNodes[source] = linkedNodes[target] = true;\n\n        var label = '';\n        if(linkSpec.label && linkSpec.label[i]) label = linkSpec.label[i];\n\n        var concentrationscale = null;\n        if(label && components.hasOwnProperty(label)) concentrationscale = components[label];\n\n        links.push({\n            pointNumber: i,\n            label: label,\n            color: hasLinkColorArray ? linkSpec.color[i] : linkSpec.color,\n            concentrationscale: concentrationscale,\n            source: source,\n            target: target,\n            value: +val\n        });\n\n        groupedLinks.source.push(source);\n        groupedLinks.target.push(target);\n    }\n\n    // Process nodes\n    var totalCount = nodeCount + groups.length;\n    var hasNodeColorArray = isArrayOrTypedArray(nodeSpec.color);\n    var nodes = [];\n    for(i = 0; i < totalCount; i++) {\n        if(!linkedNodes[i]) continue;\n        var l = nodeSpec.label[i];\n\n        nodes.push({\n            group: (i > nodeCount - 1),\n            childrenNodes: [],\n            pointNumber: i,\n            label: l,\n            color: hasNodeColorArray ? nodeSpec.color[i] : nodeSpec.color\n        });\n    }\n\n    // Check if we have circularity on the resulting graph\n    var circular = false;\n    if(circularityPresent(totalCount, groupedLinks.source, groupedLinks.target)) {\n        circular = true;\n    }\n\n    return {\n        circular: circular,\n        links: links,\n        nodes: nodes,\n\n        // Data structure for groups\n        groups: groups,\n        groupLookup: groupLookup\n    };\n}\n\nfunction circularityPresent(nodeLen, sources, targets) {\n    var nodes = Lib.init2dArray(nodeLen, 0);\n\n    for(var i = 0; i < Math.min(sources.length, targets.length); i++) {\n        if(Lib.isIndex(sources[i], nodeLen) && Lib.isIndex(targets[i], nodeLen)) {\n            if(sources[i] === targets[i]) {\n                return true; // self-link which is also a scc of one\n            }\n            nodes[sources[i]].push(targets[i]);\n        }\n    }\n\n    var scc = tarjan(nodes);\n\n    // Tarján's strongly connected components algorithm coded by Mikola Lysenko\n    // returns at least one non-singular component if there's circularity in the graph\n    return scc.components.some(function(c) {\n        return c.length > 1;\n    });\n}\n\nmodule.exports = function calc(gd, trace) {\n    var result = convertToD3Sankey(trace);\n\n    return wrap({\n        circular: result.circular,\n        _nodes: result.nodes,\n        _links: result.links,\n\n        // Data structure for grouping\n        _groups: result.groups,\n        _groupLookup: result.groupLookup,\n    });\n};\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gup\":701,\"strongly-connected-components\":517}],1068:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    nodeTextOffsetHorizontal: 4,\n    nodeTextOffsetVertical: 3,\n    nodePadAcross: 10,\n    sankeyIterations: 50,\n    forceIterations: 5,\n    forceTicksPerFrame: 10,\n    duration: 500,\n    ease: 'linear',\n    cn: {\n        sankey: 'sankey',\n        sankeyLinks: 'sankey-links',\n        sankeyLink: 'sankey-link',\n        sankeyNodeSet: 'sankey-node-set',\n        sankeyNode: 'sankey-node',\n        nodeRect: 'node-rect',\n        nodeCapture: 'node-capture',\n        nodeCentered: 'node-entered',\n        nodeLabelGuide: 'node-label-guide',\n        nodeLabel: 'node-label',\n        nodeLabelTextPath: 'node-label-text-path'\n    }\n};\n\n},{}],1069:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar Color = _dereq_('../../components/color');\nvar tinycolor = _dereq_('tinycolor2');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleHoverLabelDefaults = _dereq_('../../components/fx/hoverlabel_defaults');\nvar Template = _dereq_('../../plot_api/plot_template');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var hoverlabelDefault = Lib.extendDeep(layout.hoverlabel, traceIn.hoverlabel);\n\n    // node attributes\n    var nodeIn = traceIn.node;\n    var nodeOut = Template.newContainer(traceOut, 'node');\n\n    function coerceNode(attr, dflt) {\n        return Lib.coerce(nodeIn, nodeOut, attributes.node, attr, dflt);\n    }\n    coerceNode('label');\n    coerceNode('groups');\n    coerceNode('x');\n    coerceNode('y');\n    coerceNode('pad');\n    coerceNode('thickness');\n    coerceNode('line.color');\n    coerceNode('line.width');\n    coerceNode('hoverinfo', traceIn.hoverinfo);\n    handleHoverLabelDefaults(nodeIn, nodeOut, coerceNode, hoverlabelDefault);\n    coerceNode('hovertemplate');\n\n    var colors = layout.colorway;\n\n    var defaultNodePalette = function(i) {return colors[i % colors.length];};\n\n    coerceNode('color', nodeOut.label.map(function(d, i) {\n        return Color.addOpacity(defaultNodePalette(i), 0.8);\n    }));\n\n    // link attributes\n    var linkIn = traceIn.link || {};\n    var linkOut = Template.newContainer(traceOut, 'link');\n\n    function coerceLink(attr, dflt) {\n        return Lib.coerce(linkIn, linkOut, attributes.link, attr, dflt);\n    }\n    coerceLink('label');\n    coerceLink('source');\n    coerceLink('target');\n    coerceLink('value');\n    coerceLink('line.color');\n    coerceLink('line.width');\n    coerceLink('hoverinfo', traceIn.hoverinfo);\n    handleHoverLabelDefaults(linkIn, linkOut, coerceLink, hoverlabelDefault);\n    coerceLink('hovertemplate');\n\n    var defaultLinkColor = tinycolor(layout.paper_bgcolor).getLuminance() < 0.333 ?\n                'rgba(255, 255, 255, 0.6)' :\n                'rgba(0, 0, 0, 0.2)';\n\n    coerceLink('color', Lib.repeat(defaultLinkColor, linkOut.value.length));\n\n    handleArrayContainerDefaults(linkIn, linkOut, {\n        name: 'colorscales',\n        handleItemDefaults: concentrationscalesDefaults\n    });\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    coerce('orientation');\n    coerce('valueformat');\n    coerce('valuesuffix');\n\n    var dfltArrangement;\n    if(nodeOut.x.length && nodeOut.y.length) {\n        dfltArrangement = 'freeform';\n    }\n    coerce('arrangement', dfltArrangement);\n\n    Lib.coerceFont(coerce, 'textfont', Lib.extendFlat({}, layout.font));\n\n    // disable 1D transforms - arrays here are 1D but their lengths/meanings\n    // don't match, between nodes and links\n    traceOut._length = null;\n};\n\nfunction concentrationscalesDefaults(In, Out) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(In, Out, attributes.link.colorscales, attr, dflt);\n    }\n\n    coerce('label');\n    coerce('cmin');\n    coerce('cmax');\n    coerce('colorscale');\n}\n\n},{\"../../components/color\":580,\"../../components/fx/hoverlabel_defaults\":617,\"../../lib\":703,\"../../plot_api/plot_template\":741,\"../../plots/array_container_defaults\":747,\"../../plots/domain\":776,\"./attributes\":1065,\"tinycolor2\":524}],1070:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n\n    moduleType: 'trace',\n    name: 'sankey',\n    basePlotModule: _dereq_('./base_plot'),\n    selectPoints: _dereq_('./select.js'),\n    categories: ['noOpacity'],\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1065,\"./base_plot\":1066,\"./calc\":1067,\"./defaults\":1069,\"./plot\":1071,\"./select.js\":1073}],1071:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar render = _dereq_('./render');\nvar Fx = _dereq_('../../components/fx');\nvar Color = _dereq_('../../components/color');\nvar Lib = _dereq_('../../lib');\nvar cn = _dereq_('./constants').cn;\n\nvar _ = Lib._;\n\nfunction renderableValuePresent(d) {return d !== '';}\n\nfunction ownTrace(selection, d) {\n    return selection.filter(function(s) {return s.key === d.traceId;});\n}\n\nfunction makeTranslucent(element, alpha) {\n    d3.select(element)\n        .select('path')\n        .style('fill-opacity', alpha);\n    d3.select(element)\n        .select('rect')\n        .style('fill-opacity', alpha);\n}\n\nfunction makeTextContrasty(element) {\n    d3.select(element)\n        .select('text.name')\n        .style('fill', 'black');\n}\n\nfunction relatedLinks(d) {\n    return function(l) {\n        return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1;\n    };\n}\n\nfunction relatedNodes(l) {\n    return function(d) {\n        return d.node.sourceLinks.indexOf(l.link) !== -1 || d.node.targetLinks.indexOf(l.link) !== -1;\n    };\n}\n\nfunction nodeHoveredStyle(sankeyNode, d, sankey) {\n    if(d && sankey) {\n        ownTrace(sankey, d)\n            .selectAll('.' + cn.sankeyLink)\n            .filter(relatedLinks(d))\n            .call(linkHoveredStyle.bind(0, d, sankey, false));\n    }\n}\n\nfunction nodeNonHoveredStyle(sankeyNode, d, sankey) {\n    if(d && sankey) {\n        ownTrace(sankey, d)\n            .selectAll('.' + cn.sankeyLink)\n            .filter(relatedLinks(d))\n            .call(linkNonHoveredStyle.bind(0, d, sankey, false));\n    }\n}\n\nfunction linkHoveredStyle(d, sankey, visitNodes, sankeyLink) {\n    var label = sankeyLink.datum().link.label;\n\n    sankeyLink.style('fill-opacity', function(l) {\n        if(!l.link.concentrationscale) {\n            return 0.4;\n        }\n    });\n\n    if(label) {\n        ownTrace(sankey, d)\n            .selectAll('.' + cn.sankeyLink)\n            .filter(function(l) {return l.link.label === label;})\n            .style('fill-opacity', function(l) {\n                if(!l.link.concentrationscale) {\n                    return 0.4;\n                }\n            });\n    }\n\n    if(visitNodes) {\n        ownTrace(sankey, d)\n            .selectAll('.' + cn.sankeyNode)\n            .filter(relatedNodes(d))\n            .call(nodeHoveredStyle);\n    }\n}\n\nfunction linkNonHoveredStyle(d, sankey, visitNodes, sankeyLink) {\n    var label = sankeyLink.datum().link.label;\n\n    sankeyLink.style('fill-opacity', function(d) {return d.tinyColorAlpha;});\n    if(label) {\n        ownTrace(sankey, d)\n            .selectAll('.' + cn.sankeyLink)\n            .filter(function(l) {return l.link.label === label;})\n            .style('fill-opacity', function(d) {return d.tinyColorAlpha;});\n    }\n\n    if(visitNodes) {\n        ownTrace(sankey, d)\n            .selectAll(cn.sankeyNode)\n            .filter(relatedNodes(d))\n            .call(nodeNonHoveredStyle);\n    }\n}\n\n// does not support array values for now\nfunction castHoverOption(trace, attr) {\n    var labelOpts = trace.hoverlabel || {};\n    var val = Lib.nestedProperty(labelOpts, attr).get();\n    return Array.isArray(val) ? false : val;\n}\n\nmodule.exports = function plot(gd, calcData) {\n    var fullLayout = gd._fullLayout;\n    var svg = fullLayout._paper;\n    var size = fullLayout._size;\n\n    // stash initial view\n    for(var i = 0; i < gd._fullData.length; i++) {\n        if(gd._fullData[i].type !== cn.sankey) continue;\n        if(!gd._fullData[i]._viewInitial) {\n            var node = gd._fullData[i].node;\n            gd._fullData[i]._viewInitial = {\n                node: {\n                    groups: node.groups.slice(),\n                    x: node.x.slice(),\n                    y: node.y.slice()\n                }\n            };\n        }\n    }\n\n    var linkSelect = function(element, d) {\n        var evt = d.link;\n        evt.originalEvent = d3.event;\n        gd._hoverdata = [evt];\n        Fx.click(gd, { target: true });\n    };\n\n    var linkHover = function(element, d, sankey) {\n        if(gd._fullLayout.hovermode === false) return;\n        d3.select(element).call(linkHoveredStyle.bind(0, d, sankey, true));\n        if(d.link.trace.link.hoverinfo !== 'skip') {\n            d.link.fullData = d.link.trace;\n            gd.emit('plotly_hover', {\n                event: d3.event,\n                points: [d.link]\n            });\n        }\n    };\n\n    var sourceLabel = _(gd, 'source:') + ' ';\n    var targetLabel = _(gd, 'target:') + ' ';\n    var concentrationLabel = _(gd, 'concentration:') + ' ';\n    var incomingLabel = _(gd, 'incoming flow count:') + ' ';\n    var outgoingLabel = _(gd, 'outgoing flow count:') + ' ';\n\n    var linkHoverFollow = function(element, d) {\n        if(gd._fullLayout.hovermode === false) return;\n        var obj = d.link.trace.link;\n        if(obj.hoverinfo === 'none' || obj.hoverinfo === 'skip') return;\n\n        var hoverItems = [];\n\n        function hoverCenterPosition(link) {\n            var hoverCenterX, hoverCenterY;\n            if(link.circular) {\n                hoverCenterX = (link.circularPathData.leftInnerExtent + link.circularPathData.rightInnerExtent) / 2 + d.parent.translateX;\n                hoverCenterY = link.circularPathData.verticalFullExtent + d.parent.translateY;\n            } else {\n                hoverCenterX = (link.source.x1 + link.target.x0) / 2 + d.parent.translateX;\n                hoverCenterY = (link.y0 + link.y1) / 2 + d.parent.translateY;\n            }\n            return [hoverCenterX, hoverCenterY];\n        }\n\n        // For each related links, create a hoverItem\n        var anchorIndex = 0;\n        for(var i = 0; i < d.flow.links.length; i++) {\n            var link = d.flow.links[i];\n            if(gd._fullLayout.hovermode === 'closest' && d.link.pointNumber !== link.pointNumber) continue;\n            if(d.link.pointNumber === link.pointNumber) anchorIndex = i;\n            link.fullData = link.trace;\n            obj = d.link.trace.link;\n            var hoverCenter = hoverCenterPosition(link);\n            var hovertemplateLabels = {valueLabel: d3.format(d.valueFormat)(link.value) + d.valueSuffix};\n\n            hoverItems.push({\n                x: hoverCenter[0],\n                y: hoverCenter[1],\n                name: hovertemplateLabels.valueLabel,\n                text: [\n                    link.label || '',\n                    sourceLabel + link.source.label,\n                    targetLabel + link.target.label,\n                    link.concentrationscale ? concentrationLabel + d3.format('%0.2f')(link.flow.labelConcentration) : ''\n                ].filter(renderableValuePresent).join('<br>'),\n                color: castHoverOption(obj, 'bgcolor') || Color.addOpacity(link.color, 1),\n                borderColor: castHoverOption(obj, 'bordercolor'),\n                fontFamily: castHoverOption(obj, 'font.family'),\n                fontSize: castHoverOption(obj, 'font.size'),\n                fontColor: castHoverOption(obj, 'font.color'),\n                nameLength: castHoverOption(obj, 'namelength'),\n                textAlign: castHoverOption(obj, 'align'),\n                idealAlign: d3.event.x < hoverCenter[0] ? 'right' : 'left',\n\n                hovertemplate: obj.hovertemplate,\n                hovertemplateLabels: hovertemplateLabels,\n                eventData: [link]\n            });\n        }\n\n        var tooltips = Fx.loneHover(hoverItems, {\n            container: fullLayout._hoverlayer.node(),\n            outerContainer: fullLayout._paper.node(),\n            gd: gd,\n            anchorIndex: anchorIndex\n        });\n\n        tooltips.each(function() {\n            var tooltip = this;\n            if(!d.link.concentrationscale) {\n                makeTranslucent(tooltip, 0.65);\n            }\n            makeTextContrasty(tooltip);\n        });\n    };\n\n    var linkUnhover = function(element, d, sankey) {\n        if(gd._fullLayout.hovermode === false) return;\n        d3.select(element).call(linkNonHoveredStyle.bind(0, d, sankey, true));\n        if(d.link.trace.link.hoverinfo !== 'skip') {\n            d.link.fullData = d.link.trace;\n            gd.emit('plotly_unhover', {\n                event: d3.event,\n                points: [d.link]\n            });\n        }\n\n        Fx.loneUnhover(fullLayout._hoverlayer.node());\n    };\n\n    var nodeSelect = function(element, d, sankey) {\n        var evt = d.node;\n        evt.originalEvent = d3.event;\n        gd._hoverdata = [evt];\n        d3.select(element).call(nodeNonHoveredStyle, d, sankey);\n        Fx.click(gd, { target: true });\n    };\n\n    var nodeHover = function(element, d, sankey) {\n        if(gd._fullLayout.hovermode === false) return;\n        d3.select(element).call(nodeHoveredStyle, d, sankey);\n        if(d.node.trace.node.hoverinfo !== 'skip') {\n            d.node.fullData = d.node.trace;\n            gd.emit('plotly_hover', {\n                event: d3.event,\n                points: [d.node]\n            });\n        }\n    };\n\n    var nodeHoverFollow = function(element, d) {\n        if(gd._fullLayout.hovermode === false) return;\n\n        var obj = d.node.trace.node;\n        if(obj.hoverinfo === 'none' || obj.hoverinfo === 'skip') return;\n        var nodeRect = d3.select(element).select('.' + cn.nodeRect);\n        var rootBBox = gd._fullLayout._paperdiv.node().getBoundingClientRect();\n        var boundingBox = nodeRect.node().getBoundingClientRect();\n        var hoverCenterX0 = boundingBox.left - 2 - rootBBox.left;\n        var hoverCenterX1 = boundingBox.right + 2 - rootBBox.left;\n        var hoverCenterY = boundingBox.top + boundingBox.height / 4 - rootBBox.top;\n\n        var hovertemplateLabels = {valueLabel: d3.format(d.valueFormat)(d.node.value) + d.valueSuffix};\n        d.node.fullData = d.node.trace;\n\n        var tooltip = Fx.loneHover({\n            x0: hoverCenterX0,\n            x1: hoverCenterX1,\n            y: hoverCenterY,\n            name: d3.format(d.valueFormat)(d.node.value) + d.valueSuffix,\n            text: [\n                d.node.label,\n                incomingLabel + d.node.targetLinks.length,\n                outgoingLabel + d.node.sourceLinks.length\n            ].filter(renderableValuePresent).join('<br>'),\n            color: castHoverOption(obj, 'bgcolor') || d.tinyColorHue,\n            borderColor: castHoverOption(obj, 'bordercolor'),\n            fontFamily: castHoverOption(obj, 'font.family'),\n            fontSize: castHoverOption(obj, 'font.size'),\n            fontColor: castHoverOption(obj, 'font.color'),\n            nameLength: castHoverOption(obj, 'namelength'),\n            textAlign: castHoverOption(obj, 'align'),\n            idealAlign: 'left',\n\n            hovertemplate: obj.hovertemplate,\n            hovertemplateLabels: hovertemplateLabels,\n            eventData: [d.node]\n        }, {\n            container: fullLayout._hoverlayer.node(),\n            outerContainer: fullLayout._paper.node(),\n            gd: gd\n        });\n\n        makeTranslucent(tooltip, 0.85);\n        makeTextContrasty(tooltip);\n    };\n\n    var nodeUnhover = function(element, d, sankey) {\n        if(gd._fullLayout.hovermode === false) return;\n        d3.select(element).call(nodeNonHoveredStyle, d, sankey);\n        if(d.node.trace.node.hoverinfo !== 'skip') {\n            d.node.fullData = d.node.trace;\n            gd.emit('plotly_unhover', {\n                event: d3.event,\n                points: [d.node]\n            });\n        }\n\n        Fx.loneUnhover(fullLayout._hoverlayer.node());\n    };\n\n    render(\n        gd,\n        svg,\n        calcData,\n        {\n            width: size.w,\n            height: size.h,\n            margin: {\n                t: size.t,\n                r: size.r,\n                b: size.b,\n                l: size.l\n            }\n        },\n        {\n            linkEvents: {\n                hover: linkHover,\n                follow: linkHoverFollow,\n                unhover: linkUnhover,\n                select: linkSelect\n            },\n            nodeEvents: {\n                hover: nodeHover,\n                follow: nodeHoverFollow,\n                unhover: nodeUnhover,\n                select: nodeSelect\n            }\n        }\n    );\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../lib\":703,\"./constants\":1068,\"./render\":1072,\"d3\":157}],1072:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar c = _dereq_('./constants');\nvar d3 = _dereq_('d3');\nvar tinycolor = _dereq_('tinycolor2');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar d3Sankey = _dereq_('@plotly/d3-sankey');\nvar d3SankeyCircular = _dereq_('d3-sankey-circular');\nvar d3Force = _dereq_('d3-force');\nvar Lib = _dereq_('../../lib');\nvar gup = _dereq_('../../lib/gup');\nvar keyFun = gup.keyFun;\nvar repeat = gup.repeat;\nvar unwrap = gup.unwrap;\nvar interpolateNumber = _dereq_('d3-interpolate').interpolateNumber;\n\nvar Registry = _dereq_('../../registry');\n\n// view models\n\nfunction sankeyModel(layout, d, traceIndex) {\n    var calcData = unwrap(d);\n    var trace = calcData.trace;\n    var domain = trace.domain;\n    var horizontal = trace.orientation === 'h';\n    var nodePad = trace.node.pad;\n    var nodeThickness = trace.node.thickness;\n\n    var width = layout.width * (domain.x[1] - domain.x[0]);\n    var height = layout.height * (domain.y[1] - domain.y[0]);\n\n    var nodes = calcData._nodes;\n    var links = calcData._links;\n    var circular = calcData.circular;\n\n    // Select Sankey generator\n    var sankey;\n    if(circular) {\n        sankey = d3SankeyCircular\n            .sankeyCircular()\n            .circularLinkGap(0);\n    } else {\n        sankey = d3Sankey.sankey();\n    }\n\n    sankey\n      .iterations(c.sankeyIterations)\n      .size(horizontal ? [width, height] : [height, width])\n      .nodeWidth(nodeThickness)\n      .nodePadding(nodePad)\n      .nodeId(function(d) {\n          return d.pointNumber;\n      })\n      .nodes(nodes)\n      .links(links);\n\n    var graph = sankey();\n\n    if(sankey.nodePadding() < nodePad) {\n        Lib.warn('node.pad was reduced to ', sankey.nodePadding(), ' to fit within the figure.');\n    }\n\n    // Counters for nested loops\n    var i, j, k;\n\n    // Create transient nodes for animations\n    for(var nodePointNumber in calcData._groupLookup) {\n        var groupIndex = parseInt(calcData._groupLookup[nodePointNumber]);\n\n        // Find node representing groupIndex\n        var groupingNode;\n\n        for(i = 0; i < graph.nodes.length; i++) {\n            if(graph.nodes[i].pointNumber === groupIndex) {\n                groupingNode = graph.nodes[i];\n                break;\n            }\n        }\n        // If groupinNode is undefined, no links are targeting this group\n        if(!groupingNode) continue;\n\n        var child = {\n            pointNumber: parseInt(nodePointNumber),\n            x0: groupingNode.x0,\n            x1: groupingNode.x1,\n            y0: groupingNode.y0,\n            y1: groupingNode.y1,\n            partOfGroup: true,\n            sourceLinks: [],\n            targetLinks: []\n        };\n\n        graph.nodes.unshift(child);\n        groupingNode.childrenNodes.unshift(child);\n    }\n\n    function computeLinkConcentrations() {\n        for(i = 0; i < graph.nodes.length; i++) {\n            var node = graph.nodes[i];\n            // Links connecting the same two nodes are part of a flow\n            var flows = {};\n            var flowKey;\n            var link;\n            for(j = 0; j < node.targetLinks.length; j++) {\n                link = node.targetLinks[j];\n                flowKey = link.source.pointNumber + ':' + link.target.pointNumber;\n                if(!flows.hasOwnProperty(flowKey)) flows[flowKey] = [];\n                flows[flowKey].push(link);\n            }\n\n            // Compute statistics for each flow\n            var keys = Object.keys(flows);\n            for(j = 0; j < keys.length; j++) {\n                flowKey = keys[j];\n                var flowLinks = flows[flowKey];\n\n                // Find the total size of the flow and total size per label\n                var total = 0;\n                var totalPerLabel = {};\n                for(k = 0; k < flowLinks.length; k++) {\n                    link = flowLinks[k];\n                    if(!totalPerLabel[link.label]) totalPerLabel[link.label] = 0;\n                    totalPerLabel[link.label] += link.value;\n                    total += link.value;\n                }\n\n                // Find the ratio of the link's value and the size of the flow\n                for(k = 0; k < flowLinks.length; k++) {\n                    link = flowLinks[k];\n                    link.flow = {\n                        value: total,\n                        labelConcentration: totalPerLabel[link.label] / total,\n                        concentration: link.value / total,\n                        links: flowLinks\n                    };\n                    if(link.concentrationscale) {\n                        link.color = tinycolor(link.concentrationscale(link.flow.labelConcentration));\n                    }\n                }\n            }\n\n            // Gather statistics of all links at current node\n            var totalOutflow = 0;\n            for(j = 0; j < node.sourceLinks.length; j++) {\n                totalOutflow += node.sourceLinks[j].value;\n            }\n            for(j = 0; j < node.sourceLinks.length; j++) {\n                link = node.sourceLinks[j];\n                link.concentrationOut = link.value / totalOutflow;\n            }\n\n            var totalInflow = 0;\n            for(j = 0; j < node.targetLinks.length; j++) {\n                totalInflow += node.targetLinks[j].value;\n            }\n\n            for(j = 0; j < node.targetLinks.length; j++) {\n                link = node.targetLinks[j];\n                link.concenrationIn = link.value / totalInflow;\n            }\n        }\n    }\n    computeLinkConcentrations();\n\n    // Push any overlapping nodes down.\n    function resolveCollisionsTopToBottom(columns) {\n        columns.forEach(function(nodes) {\n            var node;\n            var dy;\n            var y = 0;\n            var n = nodes.length;\n            var i;\n            nodes.sort(function(a, b) {\n                return a.y0 - b.y0;\n            });\n            for(i = 0; i < n; ++i) {\n                node = nodes[i];\n                if(node.y0 >= y) {\n                    // No overlap\n                } else {\n                    dy = (y - node.y0);\n                    if(dy > 1e-6) node.y0 += dy, node.y1 += dy;\n                }\n                y = node.y1 + nodePad;\n            }\n        });\n    }\n\n    // Group nodes into columns based on their x position\n    function snapToColumns(nodes) {\n        // Sort nodes by x position\n        var orderedNodes = nodes.map(function(n, i) {\n            return {\n                x0: n.x0,\n                index: i\n            };\n        })\n        .sort(function(a, b) {\n            return a.x0 - b.x0;\n        });\n\n        var columns = [];\n        var colNumber = -1;\n        var colX; // Position of column\n        var lastX = -Infinity; // Position of last node\n        var dx;\n        for(i = 0; i < orderedNodes.length; i++) {\n            var node = nodes[orderedNodes[i].index];\n            // If the node does not overlap with the last one\n            if(node.x0 > lastX + nodeThickness) {\n                // Start a new column\n                colNumber += 1;\n                colX = node.x0;\n            }\n            lastX = node.x0;\n\n            // Add node to its associated column\n            if(!columns[colNumber]) columns[colNumber] = [];\n            columns[colNumber].push(node);\n\n            // Change node's x position to align it with its column\n            dx = colX - node.x0;\n            node.x0 += dx, node.x1 += dx;\n        }\n        return columns;\n    }\n\n    // Force node position\n    if(trace.node.x.length && trace.node.y.length) {\n        for(i = 0; i < Math.min(trace.node.x.length, trace.node.y.length, graph.nodes.length); i++) {\n            if(trace.node.x[i] && trace.node.y[i]) {\n                var pos = [trace.node.x[i] * width, trace.node.y[i] * height];\n                graph.nodes[i].x0 = pos[0] - nodeThickness / 2;\n                graph.nodes[i].x1 = pos[0] + nodeThickness / 2;\n\n                var nodeHeight = graph.nodes[i].y1 - graph.nodes[i].y0;\n                graph.nodes[i].y0 = pos[1] - nodeHeight / 2;\n                graph.nodes[i].y1 = pos[1] + nodeHeight / 2;\n            }\n        }\n        if(trace.arrangement === 'snap') {\n            nodes = graph.nodes;\n            var columns = snapToColumns(nodes);\n            resolveCollisionsTopToBottom(columns);\n        }\n        // Update links\n        sankey.update(graph);\n    }\n\n\n    return {\n        circular: circular,\n        key: traceIndex,\n        trace: trace,\n        guid: Lib.randstr(),\n        horizontal: horizontal,\n        width: width,\n        height: height,\n        nodePad: trace.node.pad,\n        nodeLineColor: trace.node.line.color,\n        nodeLineWidth: trace.node.line.width,\n        linkLineColor: trace.link.line.color,\n        linkLineWidth: trace.link.line.width,\n        valueFormat: trace.valueformat,\n        valueSuffix: trace.valuesuffix,\n        textFont: trace.textfont,\n        translateX: domain.x[0] * layout.width + layout.margin.l,\n        translateY: layout.height - domain.y[1] * layout.height + layout.margin.t,\n        dragParallel: horizontal ? height : width,\n        dragPerpendicular: horizontal ? width : height,\n        arrangement: trace.arrangement,\n        sankey: sankey,\n        graph: graph,\n        forceLayouts: {},\n        interactionState: {\n            dragInProgress: false,\n            hovered: false\n        }\n    };\n}\n\nfunction linkModel(d, l, i) {\n    var tc = tinycolor(l.color);\n    var basicKey = l.source.label + '|' + l.target.label;\n    var key = basicKey + '__' + i;\n\n    // for event data\n    l.trace = d.trace;\n    l.curveNumber = d.trace.index;\n\n    return {\n        circular: d.circular,\n        key: key,\n        traceId: d.key,\n        pointNumber: l.pointNumber,\n        link: l,\n        tinyColorHue: Color.tinyRGB(tc),\n        tinyColorAlpha: tc.getAlpha(),\n        linkPath: linkPath,\n        linkLineColor: d.linkLineColor,\n        linkLineWidth: d.linkLineWidth,\n        valueFormat: d.valueFormat,\n        valueSuffix: d.valueSuffix,\n        sankey: d.sankey,\n        parent: d,\n        interactionState: d.interactionState,\n        flow: l.flow\n    };\n}\n\nfunction createCircularClosedPathString(link) {\n    // Using coordinates computed by d3-sankey-circular\n    var pathString = '';\n    var offset = link.width / 2;\n    var coords = link.circularPathData;\n    if(link.circularLinkType === 'top') {\n        // Top path\n        pathString =\n          // start at the left of the target node\n          'M ' +\n          coords.targetX + ' ' + (coords.targetY + offset) + ' ' +\n          'L' +\n          coords.rightInnerExtent + ' ' + (coords.targetY + offset) +\n          'A' +\n          (coords.rightLargeArcRadius + offset) + ' ' + (coords.rightSmallArcRadius + offset) + ' 0 0 1 ' +\n          (coords.rightFullExtent - offset) + ' ' + (coords.targetY - coords.rightSmallArcRadius) +\n          'L' +\n          (coords.rightFullExtent - offset) + ' ' + coords.verticalRightInnerExtent +\n          'A' +\n          (coords.rightLargeArcRadius + offset) + ' ' + (coords.rightLargeArcRadius + offset) + ' 0 0 1 ' +\n          coords.rightInnerExtent + ' ' + (coords.verticalFullExtent - offset) +\n          'L' +\n          coords.leftInnerExtent + ' ' + (coords.verticalFullExtent - offset) +\n          'A' +\n          (coords.leftLargeArcRadius + offset) + ' ' + (coords.leftLargeArcRadius + offset) + ' 0 0 1 ' +\n          (coords.leftFullExtent + offset) + ' ' + coords.verticalLeftInnerExtent +\n          'L' +\n          (coords.leftFullExtent + offset) + ' ' + (coords.sourceY - coords.leftSmallArcRadius) +\n          'A' +\n          (coords.leftLargeArcRadius + offset) + ' ' + (coords.leftSmallArcRadius + offset) + ' 0 0 1 ' +\n          coords.leftInnerExtent + ' ' + (coords.sourceY + offset) +\n          'L' +\n          coords.sourceX + ' ' + (coords.sourceY + offset) +\n\n          // Walking back\n          'L' +\n          coords.sourceX + ' ' + (coords.sourceY - offset) +\n          'L' +\n          coords.leftInnerExtent + ' ' + (coords.sourceY - offset) +\n          'A' +\n          (coords.leftLargeArcRadius - offset) + ' ' + (coords.leftSmallArcRadius - offset) + ' 0 0 0 ' +\n          (coords.leftFullExtent - offset) + ' ' + (coords.sourceY - coords.leftSmallArcRadius) +\n          'L' +\n          (coords.leftFullExtent - offset) + ' ' + coords.verticalLeftInnerExtent +\n          'A' +\n          (coords.leftLargeArcRadius - offset) + ' ' + (coords.leftLargeArcRadius - offset) + ' 0 0 0 ' +\n          coords.leftInnerExtent + ' ' + (coords.verticalFullExtent + offset) +\n          'L' +\n          coords.rightInnerExtent + ' ' + (coords.verticalFullExtent + offset) +\n          'A' +\n          (coords.rightLargeArcRadius - offset) + ' ' + (coords.rightLargeArcRadius - offset) + ' 0 0 0 ' +\n          (coords.rightFullExtent + offset) + ' ' + coords.verticalRightInnerExtent +\n          'L' +\n          (coords.rightFullExtent + offset) + ' ' + (coords.targetY - coords.rightSmallArcRadius) +\n          'A' +\n          (coords.rightLargeArcRadius - offset) + ' ' + (coords.rightSmallArcRadius - offset) + ' 0 0 0 ' +\n          coords.rightInnerExtent + ' ' + (coords.targetY - offset) +\n          'L' +\n          coords.targetX + ' ' + (coords.targetY - offset) +\n          'Z';\n    } else {\n        // Bottom path\n        pathString =\n          // start at the left of the target node\n          'M ' +\n          coords.targetX + ' ' + (coords.targetY - offset) + ' ' +\n          'L' +\n          coords.rightInnerExtent + ' ' + (coords.targetY - offset) +\n          'A' +\n          (coords.rightLargeArcRadius + offset) + ' ' + (coords.rightSmallArcRadius + offset) + ' 0 0 0 ' +\n          (coords.rightFullExtent - offset) + ' ' + (coords.targetY + coords.rightSmallArcRadius) +\n          'L' +\n          (coords.rightFullExtent - offset) + ' ' + coords.verticalRightInnerExtent +\n          'A' +\n          (coords.rightLargeArcRadius + offset) + ' ' + (coords.rightLargeArcRadius + offset) + ' 0 0 0 ' +\n          coords.rightInnerExtent + ' ' + (coords.verticalFullExtent + offset) +\n          'L' +\n          coords.leftInnerExtent + ' ' + (coords.verticalFullExtent + offset) +\n          'A' +\n          (coords.leftLargeArcRadius + offset) + ' ' + (coords.leftLargeArcRadius + offset) + ' 0 0 0 ' +\n          (coords.leftFullExtent + offset) + ' ' + coords.verticalLeftInnerExtent +\n          'L' +\n          (coords.leftFullExtent + offset) + ' ' + (coords.sourceY + coords.leftSmallArcRadius) +\n          'A' +\n          (coords.leftLargeArcRadius + offset) + ' ' + (coords.leftSmallArcRadius + offset) + ' 0 0 0 ' +\n          coords.leftInnerExtent + ' ' + (coords.sourceY - offset) +\n          'L' +\n          coords.sourceX + ' ' + (coords.sourceY - offset) +\n\n          // Walking back\n          'L' +\n          coords.sourceX + ' ' + (coords.sourceY + offset) +\n          'L' +\n          coords.leftInnerExtent + ' ' + (coords.sourceY + offset) +\n          'A' +\n          (coords.leftLargeArcRadius - offset) + ' ' + (coords.leftSmallArcRadius - offset) + ' 0 0 1 ' +\n          (coords.leftFullExtent - offset) + ' ' + (coords.sourceY + coords.leftSmallArcRadius) +\n          'L' +\n          (coords.leftFullExtent - offset) + ' ' + coords.verticalLeftInnerExtent +\n          'A' +\n          (coords.leftLargeArcRadius - offset) + ' ' + (coords.leftLargeArcRadius - offset) + ' 0 0 1 ' +\n          coords.leftInnerExtent + ' ' + (coords.verticalFullExtent - offset) +\n          'L' +\n          coords.rightInnerExtent + ' ' + (coords.verticalFullExtent - offset) +\n          'A' +\n          (coords.rightLargeArcRadius - offset) + ' ' + (coords.rightLargeArcRadius - offset) + ' 0 0 1 ' +\n          (coords.rightFullExtent + offset) + ' ' + coords.verticalRightInnerExtent +\n          'L' +\n          (coords.rightFullExtent + offset) + ' ' + (coords.targetY + coords.rightSmallArcRadius) +\n          'A' +\n          (coords.rightLargeArcRadius - offset) + ' ' + (coords.rightSmallArcRadius - offset) + ' 0 0 1 ' +\n          coords.rightInnerExtent + ' ' + (coords.targetY + offset) +\n          'L' +\n          coords.targetX + ' ' + (coords.targetY + offset) +\n          'Z';\n    }\n    return pathString;\n}\n\nfunction linkPath() {\n    var curvature = 0.5;\n    function path(d) {\n        if(d.link.circular) {\n            return createCircularClosedPathString(d.link);\n        } else {\n            var x0 = d.link.source.x1;\n            var x1 = d.link.target.x0;\n            var xi = interpolateNumber(x0, x1);\n            var x2 = xi(curvature);\n            var x3 = xi(1 - curvature);\n            var y0a = d.link.y0 - d.link.width / 2;\n            var y0b = d.link.y0 + d.link.width / 2;\n            var y1a = d.link.y1 - d.link.width / 2;\n            var y1b = d.link.y1 + d.link.width / 2;\n            return 'M' + x0 + ',' + y0a +\n                 'C' + x2 + ',' + y0a +\n                 ' ' + x3 + ',' + y1a +\n                 ' ' + x1 + ',' + y1a +\n                 'L' + x1 + ',' + y1b +\n                 'C' + x3 + ',' + y1b +\n                 ' ' + x2 + ',' + y0b +\n                 ' ' + x0 + ',' + y0b +\n                 'Z';\n        }\n    }\n    return path;\n}\n\nfunction nodeModel(d, n) {\n    var tc = tinycolor(n.color);\n    var zoneThicknessPad = c.nodePadAcross;\n    var zoneLengthPad = d.nodePad / 2;\n    n.dx = n.x1 - n.x0;\n    n.dy = n.y1 - n.y0;\n    var visibleThickness = n.dx;\n    var visibleLength = Math.max(0.5, n.dy);\n\n    var key = 'node_' + n.pointNumber;\n    // If it's a group, it's mutable and should be unique\n    if(n.group) {\n        key = Lib.randstr();\n    }\n\n    // for event data\n    n.trace = d.trace;\n    n.curveNumber = d.trace.index;\n\n    return {\n        index: n.pointNumber,\n        key: key,\n        partOfGroup: n.partOfGroup || false,\n        group: n.group,\n        traceId: d.key,\n        trace: d.trace,\n        node: n,\n        nodePad: d.nodePad,\n        nodeLineColor: d.nodeLineColor,\n        nodeLineWidth: d.nodeLineWidth,\n        textFont: d.textFont,\n        size: d.horizontal ? d.height : d.width,\n        visibleWidth: Math.ceil(visibleThickness),\n        visibleHeight: visibleLength,\n        zoneX: -zoneThicknessPad,\n        zoneY: -zoneLengthPad,\n        zoneWidth: visibleThickness + 2 * zoneThicknessPad,\n        zoneHeight: visibleLength + 2 * zoneLengthPad,\n        labelY: d.horizontal ? n.dy / 2 + 1 : n.dx / 2 + 1,\n        left: n.originalLayer === 1,\n        sizeAcross: d.width,\n        forceLayouts: d.forceLayouts,\n        horizontal: d.horizontal,\n        darkBackground: tc.getBrightness() <= 128,\n        tinyColorHue: Color.tinyRGB(tc),\n        tinyColorAlpha: tc.getAlpha(),\n        valueFormat: d.valueFormat,\n        valueSuffix: d.valueSuffix,\n        sankey: d.sankey,\n        graph: d.graph,\n        arrangement: d.arrangement,\n        uniqueNodeLabelPathId: [d.guid, d.key, key].join('_'),\n        interactionState: d.interactionState,\n        figure: d\n    };\n}\n\n// rendering snippets\n\nfunction updateNodePositions(sankeyNode) {\n    sankeyNode\n        .attr('transform', function(d) {\n            return 'translate(' + d.node.x0.toFixed(3) + ', ' + (d.node.y0).toFixed(3) + ')';\n        });\n}\n\nfunction updateNodeShapes(sankeyNode) {\n    sankeyNode.call(updateNodePositions);\n}\n\nfunction updateShapes(sankeyNode, sankeyLink) {\n    sankeyNode.call(updateNodeShapes);\n    sankeyLink.attr('d', linkPath());\n}\n\nfunction sizeNode(rect) {\n    rect\n      .attr('width', function(d) {return d.node.x1 - d.node.x0;})\n      .attr('height', function(d) {return d.visibleHeight;});\n}\n\nfunction salientEnough(d) {return (d.link.width > 1 || d.linkLineWidth > 0);}\n\nfunction sankeyTransform(d) {\n    var offset = 'translate(' + d.translateX + ',' + d.translateY + ')';\n    return offset + (d.horizontal ? 'matrix(1 0 0 1 0 0)' : 'matrix(0 1 1 0 0 0)');\n}\n\nfunction nodeCentering(d) {\n    return 'translate(' + (d.horizontal ? 0 : d.labelY) + ' ' + (d.horizontal ? d.labelY : 0) + ')';\n}\n\nfunction textGuidePath(d) {\n    return d3.svg.line()([\n        [d.horizontal ? (d.left ? -d.sizeAcross : d.visibleWidth + c.nodeTextOffsetHorizontal) : c.nodeTextOffsetHorizontal, 0],\n        [d.horizontal ? (d.left ? - c.nodeTextOffsetHorizontal : d.sizeAcross) : d.visibleHeight - c.nodeTextOffsetHorizontal, 0]\n    ]);\n}\n\nfunction sankeyInverseTransform(d) {return d.horizontal ? 'matrix(1 0 0 1 0 0)' : 'matrix(0 1 1 0 0 0)';}\nfunction textFlip(d) {return d.horizontal ? 'scale(1 1)' : 'scale(-1 1)';}\nfunction nodeTextColor(d) {return d.darkBackground && !d.horizontal ? 'rgb(255,255,255)' : 'rgb(0,0,0)';}\nfunction nodeTextOffset(d) {return d.horizontal && d.left ? '100%' : '0%';}\n\n// event handling\n\nfunction attachPointerEvents(selection, sankey, eventSet) {\n    selection\n        .on('.basic', null) // remove any preexisting handlers\n        .on('mouseover.basic', function(d) {\n            if(!d.interactionState.dragInProgress && !d.partOfGroup) {\n                eventSet.hover(this, d, sankey);\n                d.interactionState.hovered = [this, d];\n            }\n        })\n        .on('mousemove.basic', function(d) {\n            if(!d.interactionState.dragInProgress && !d.partOfGroup) {\n                eventSet.follow(this, d);\n                d.interactionState.hovered = [this, d];\n            }\n        })\n        .on('mouseout.basic', function(d) {\n            if(!d.interactionState.dragInProgress && !d.partOfGroup) {\n                eventSet.unhover(this, d, sankey);\n                d.interactionState.hovered = false;\n            }\n        })\n        .on('click.basic', function(d) {\n            if(d.interactionState.hovered) {\n                eventSet.unhover(this, d, sankey);\n                d.interactionState.hovered = false;\n            }\n            if(!d.interactionState.dragInProgress && !d.partOfGroup) {\n                eventSet.select(this, d, sankey);\n            }\n        });\n}\n\nfunction attachDragHandler(sankeyNode, sankeyLink, callbacks, gd) {\n    var dragBehavior = d3.behavior.drag()\n        .origin(function(d) {\n            return {\n                x: d.node.x0 + d.visibleWidth / 2,\n                y: d.node.y0 + d.visibleHeight / 2\n            };\n        })\n\n        .on('dragstart', function(d) {\n            if(d.arrangement === 'fixed') return;\n            Lib.ensureSingle(gd._fullLayout._infolayer, 'g', 'dragcover', function(s) {\n                gd._fullLayout._dragCover = s;\n            });\n            Lib.raiseToTop(this);\n            d.interactionState.dragInProgress = d.node;\n\n            saveCurrentDragPosition(d.node);\n            if(d.interactionState.hovered) {\n                callbacks.nodeEvents.unhover.apply(0, d.interactionState.hovered);\n                d.interactionState.hovered = false;\n            }\n            if(d.arrangement === 'snap') {\n                var forceKey = d.traceId + '|' + d.key;\n                if(d.forceLayouts[forceKey]) {\n                    d.forceLayouts[forceKey].alpha(1);\n                } else { // make a forceLayout if needed\n                    attachForce(sankeyNode, forceKey, d, gd);\n                }\n                startForce(sankeyNode, sankeyLink, d, forceKey, gd);\n            }\n        })\n\n        .on('drag', function(d) {\n            if(d.arrangement === 'fixed') return;\n            var x = d3.event.x;\n            var y = d3.event.y;\n            if(d.arrangement === 'snap') {\n                d.node.x0 = x - d.visibleWidth / 2;\n                d.node.x1 = x + d.visibleWidth / 2;\n                d.node.y0 = y - d.visibleHeight / 2;\n                d.node.y1 = y + d.visibleHeight / 2;\n            } else {\n                if(d.arrangement === 'freeform') {\n                    d.node.x0 = x - d.visibleWidth / 2;\n                    d.node.x1 = x + d.visibleWidth / 2;\n                }\n                y = Math.max(0, Math.min(d.size - d.visibleHeight / 2, y));\n                d.node.y0 = y - d.visibleHeight / 2;\n                d.node.y1 = y + d.visibleHeight / 2;\n            }\n\n            saveCurrentDragPosition(d.node);\n            if(d.arrangement !== 'snap') {\n                d.sankey.update(d.graph);\n                updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink);\n            }\n        })\n\n        .on('dragend', function(d) {\n            if(d.arrangement === 'fixed') return;\n            d.interactionState.dragInProgress = false;\n            for(var i = 0; i < d.node.childrenNodes.length; i++) {\n                d.node.childrenNodes[i].x = d.node.x;\n                d.node.childrenNodes[i].y = d.node.y;\n            }\n            if(d.arrangement !== 'snap') persistFinalNodePositions(d, gd);\n        });\n\n    sankeyNode\n        .on('.drag', null) // remove possible previous handlers\n        .call(dragBehavior);\n}\n\nfunction attachForce(sankeyNode, forceKey, d, gd) {\n    // Attach force to nodes in the same column (same x coordinate)\n    switchToForceFormat(d.graph.nodes);\n    var nodes = d.graph.nodes\n        .filter(function(n) {return n.originalX === d.node.originalX;})\n        // Filter out children\n        .filter(function(n) {return !n.partOfGroup;});\n    d.forceLayouts[forceKey] = d3Force.forceSimulation(nodes)\n        .alphaDecay(0)\n        .force('collide', d3Force.forceCollide()\n            .radius(function(n) {return n.dy / 2 + d.nodePad / 2;})\n            .strength(1)\n            .iterations(c.forceIterations))\n        .force('constrain', snappingForce(sankeyNode, forceKey, nodes, d, gd))\n        .stop();\n}\n\nfunction startForce(sankeyNode, sankeyLink, d, forceKey, gd) {\n    window.requestAnimationFrame(function faster() {\n        var i;\n        for(i = 0; i < c.forceTicksPerFrame; i++) {\n            d.forceLayouts[forceKey].tick();\n        }\n\n        var nodes = d.graph.nodes;\n        switchToSankeyFormat(nodes);\n\n        d.sankey.update(d.graph);\n        updateShapes(sankeyNode.filter(sameLayer(d)), sankeyLink);\n\n        if(d.forceLayouts[forceKey].alpha() > 0) {\n            window.requestAnimationFrame(faster);\n        } else {\n            // Make sure the final x position is equal to its original value\n            // because the force simulation will have numerical error\n            var x = d.node.originalX;\n            d.node.x0 = x - d.visibleWidth / 2;\n            d.node.x1 = x + d.visibleWidth / 2;\n\n            persistFinalNodePositions(d, gd);\n        }\n    });\n}\n\nfunction snappingForce(sankeyNode, forceKey, nodes, d) {\n    return function _snappingForce() {\n        var maxVelocity = 0;\n        for(var i = 0; i < nodes.length; i++) {\n            var n = nodes[i];\n            if(n === d.interactionState.dragInProgress) { // constrain node position to the dragging pointer\n                n.x = n.lastDraggedX;\n                n.y = n.lastDraggedY;\n            } else {\n                n.vx = (n.originalX - n.x) / c.forceTicksPerFrame; // snap to layer\n                n.y = Math.min(d.size - n.dy / 2, Math.max(n.dy / 2, n.y)); // constrain to extent\n            }\n            maxVelocity = Math.max(maxVelocity, Math.abs(n.vx), Math.abs(n.vy));\n        }\n        if(!d.interactionState.dragInProgress && maxVelocity < 0.1 && d.forceLayouts[forceKey].alpha() > 0) {\n            d.forceLayouts[forceKey].alpha(0); // This will stop the animation loop\n        }\n    };\n}\n\n// basic data utilities\n\nfunction persistFinalNodePositions(d, gd) {\n    var x = [];\n    var y = [];\n    for(var i = 0; i < d.graph.nodes.length; i++) {\n        var nodeX = (d.graph.nodes[i].x0 + d.graph.nodes[i].x1) / 2;\n        var nodeY = (d.graph.nodes[i].y0 + d.graph.nodes[i].y1) / 2;\n        x.push(nodeX / d.figure.width);\n        y.push(nodeY / d.figure.height);\n    }\n    Registry.call('_guiRestyle', gd, {\n        'node.x': [x],\n        'node.y': [y]\n    }, d.trace.index)\n    .then(function() {\n        if(gd._fullLayout._dragCover) gd._fullLayout._dragCover.remove();\n    });\n}\n\nfunction persistOriginalPlace(nodes) {\n    var distinctLayerPositions = [];\n    var i;\n    for(i = 0; i < nodes.length; i++) {\n        nodes[i].originalX = (nodes[i].x0 + nodes[i].x1) / 2;\n        nodes[i].originalY = (nodes[i].y0 + nodes[i].y1) / 2;\n        if(distinctLayerPositions.indexOf(nodes[i].originalX) === -1) {\n            distinctLayerPositions.push(nodes[i].originalX);\n        }\n    }\n    distinctLayerPositions.sort(function(a, b) {return a - b;});\n    for(i = 0; i < nodes.length; i++) {\n        nodes[i].originalLayerIndex = distinctLayerPositions.indexOf(nodes[i].originalX);\n        nodes[i].originalLayer = nodes[i].originalLayerIndex / (distinctLayerPositions.length - 1);\n    }\n}\n\nfunction saveCurrentDragPosition(d) {\n    d.lastDraggedX = d.x0 + d.dx / 2;\n    d.lastDraggedY = d.y0 + d.dy / 2;\n}\n\nfunction sameLayer(d) {\n    return function(n) {return n.node.originalX === d.node.originalX;};\n}\n\nfunction switchToForceFormat(nodes) {\n    // force uses x, y as centers\n    for(var i = 0; i < nodes.length; i++) {\n        nodes[i].y = (nodes[i].y0 + nodes[i].y1) / 2;\n        nodes[i].x = (nodes[i].x0 + nodes[i].x1) / 2;\n    }\n}\n\nfunction switchToSankeyFormat(nodes) {\n    // sankey uses x0, x1, y0, y1\n    for(var i = 0; i < nodes.length; i++) {\n        nodes[i].y0 = nodes[i].y - nodes[i].dy / 2;\n        nodes[i].y1 = nodes[i].y0 + nodes[i].dy;\n\n        nodes[i].x0 = nodes[i].x - nodes[i].dx / 2;\n        nodes[i].x1 = nodes[i].x0 + nodes[i].dx;\n    }\n}\n\n// scene graph\nmodule.exports = function(gd, svg, calcData, layout, callbacks) {\n    // To prevent animation on first render\n    var firstRender = false;\n    Lib.ensureSingle(gd._fullLayout._infolayer, 'g', 'first-render', function() {\n        firstRender = true;\n    });\n\n    // To prevent animation on dragging\n    var dragcover = gd._fullLayout._dragCover;\n\n    var styledData = calcData\n            .filter(function(d) {return unwrap(d).trace.visible;})\n            .map(sankeyModel.bind(null, layout));\n\n    var sankey = svg.selectAll('.' + c.cn.sankey)\n        .data(styledData, keyFun);\n\n    sankey.exit()\n        .remove();\n\n    sankey.enter()\n        .append('g')\n        .classed(c.cn.sankey, true)\n        .style('box-sizing', 'content-box')\n        .style('position', 'absolute')\n        .style('left', 0)\n        .style('shape-rendering', 'geometricPrecision')\n        .style('pointer-events', 'auto')\n        .attr('transform', sankeyTransform);\n\n    sankey.each(function(d, i) {\n        gd._fullData[i]._sankey = d;\n        // Create dragbox if missing\n        var dragboxClassName = 'bgsankey-' + d.trace.uid + '-' + i;\n        Lib.ensureSingle(gd._fullLayout._draggers, 'rect', dragboxClassName);\n\n        gd._fullData[i]._bgRect = d3.select('.' + dragboxClassName);\n\n        // Style dragbox\n        gd._fullData[i]._bgRect\n          .style('pointer-events', 'all')\n          .attr('width', d.width)\n          .attr('height', d.height)\n          .attr('x', d.translateX)\n          .attr('y', d.translateY)\n          .classed('bgsankey', true)\n          .style({fill: 'transparent', 'stroke-width': 0});\n    });\n\n    sankey.transition()\n        .ease(c.ease).duration(c.duration)\n        .attr('transform', sankeyTransform);\n\n    var sankeyLinks = sankey.selectAll('.' + c.cn.sankeyLinks)\n        .data(repeat, keyFun);\n\n    sankeyLinks.enter()\n        .append('g')\n        .classed(c.cn.sankeyLinks, true)\n        .style('fill', 'none');\n\n    var sankeyLink = sankeyLinks.selectAll('.' + c.cn.sankeyLink)\n          .data(function(d) {\n              var links = d.graph.links;\n              return links\n                .filter(function(l) {return l.value;})\n                .map(linkModel.bind(null, d));\n          }, keyFun);\n\n    sankeyLink\n          .enter().append('path')\n          .classed(c.cn.sankeyLink, true)\n          .call(attachPointerEvents, sankey, callbacks.linkEvents);\n\n    sankeyLink\n        .style('stroke', function(d) {\n            return salientEnough(d) ? Color.tinyRGB(tinycolor(d.linkLineColor)) : d.tinyColorHue;\n        })\n        .style('stroke-opacity', function(d) {\n            return salientEnough(d) ? Color.opacity(d.linkLineColor) : d.tinyColorAlpha;\n        })\n        .style('fill', function(d) {\n            return d.tinyColorHue;\n        })\n        .style('fill-opacity', function(d) {\n            return d.tinyColorAlpha;\n        })\n        .style('stroke-width', function(d) {\n            return salientEnough(d) ? d.linkLineWidth : 1;\n        })\n        .attr('d', linkPath());\n\n    sankeyLink\n        .style('opacity', function() { return (gd._context.staticPlot || firstRender || dragcover) ? 1 : 0;})\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .style('opacity', 1);\n\n    sankeyLink.exit()\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .style('opacity', 0)\n        .remove();\n\n    var sankeyNodeSet = sankey.selectAll('.' + c.cn.sankeyNodeSet)\n        .data(repeat, keyFun);\n\n    sankeyNodeSet.enter()\n        .append('g')\n        .classed(c.cn.sankeyNodeSet, true);\n\n    sankeyNodeSet\n        .style('cursor', function(d) {\n            switch(d.arrangement) {\n                case 'fixed': return 'default';\n                case 'perpendicular': return 'ns-resize';\n                default: return 'move';\n            }\n        });\n\n    var sankeyNode = sankeyNodeSet.selectAll('.' + c.cn.sankeyNode)\n        .data(function(d) {\n            var nodes = d.graph.nodes;\n            persistOriginalPlace(nodes);\n            return nodes\n              .map(nodeModel.bind(null, d));\n        }, keyFun);\n\n    sankeyNode.enter()\n        .append('g')\n        .classed(c.cn.sankeyNode, true)\n        .call(updateNodePositions)\n        .style('opacity', function(n) { return ((gd._context.staticPlot || firstRender) && !n.partOfGroup) ? 1 : 0;});\n\n    sankeyNode\n        .call(attachPointerEvents, sankey, callbacks.nodeEvents)\n        .call(attachDragHandler, sankeyLink, callbacks, gd); // has to be here as it binds sankeyLink\n\n    sankeyNode\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .call(updateNodePositions)\n        .style('opacity', function(n) { return n.partOfGroup ? 0 : 1;});\n\n    sankeyNode.exit()\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .style('opacity', 0)\n        .remove();\n\n    var nodeRect = sankeyNode.selectAll('.' + c.cn.nodeRect)\n        .data(repeat);\n\n    nodeRect.enter()\n        .append('rect')\n        .classed(c.cn.nodeRect, true)\n        .call(sizeNode);\n\n    nodeRect\n        .style('stroke-width', function(d) {return d.nodeLineWidth;})\n        .style('stroke', function(d) {return Color.tinyRGB(tinycolor(d.nodeLineColor));})\n        .style('stroke-opacity', function(d) {return Color.opacity(d.nodeLineColor);})\n        .style('fill', function(d) {return d.tinyColorHue;})\n        .style('fill-opacity', function(d) {return d.tinyColorAlpha;});\n\n    nodeRect.transition()\n        .ease(c.ease).duration(c.duration)\n        .call(sizeNode);\n\n    var nodeCapture = sankeyNode.selectAll('.' + c.cn.nodeCapture)\n        .data(repeat);\n\n    nodeCapture.enter()\n        .append('rect')\n        .classed(c.cn.nodeCapture, true)\n        .style('fill-opacity', 0);\n\n    nodeCapture\n        .attr('x', function(d) {return d.zoneX;})\n        .attr('y', function(d) {return d.zoneY;})\n        .attr('width', function(d) {return d.zoneWidth;})\n        .attr('height', function(d) {return d.zoneHeight;});\n\n    var nodeCentered = sankeyNode.selectAll('.' + c.cn.nodeCentered)\n        .data(repeat);\n\n    nodeCentered.enter()\n        .append('g')\n        .classed(c.cn.nodeCentered, true)\n        .attr('transform', nodeCentering);\n\n    nodeCentered\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .attr('transform', nodeCentering);\n\n    var nodeLabelGuide = nodeCentered.selectAll('.' + c.cn.nodeLabelGuide)\n        .data(repeat);\n\n    nodeLabelGuide.enter()\n        .append('path')\n        .classed(c.cn.nodeLabelGuide, true)\n        .attr('id', function(d) {return d.uniqueNodeLabelPathId;})\n        .attr('d', textGuidePath)\n        .attr('transform', sankeyInverseTransform);\n\n    nodeLabelGuide\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .attr('d', textGuidePath)\n        .attr('transform', sankeyInverseTransform);\n\n    var nodeLabel = nodeCentered.selectAll('.' + c.cn.nodeLabel)\n        .data(repeat);\n\n    nodeLabel.enter()\n        .append('text')\n        .classed(c.cn.nodeLabel, true)\n        .attr('transform', textFlip)\n        .style('user-select', 'none')\n        .style('cursor', 'default')\n        .style('fill', 'black');\n\n    nodeLabel\n        .style('text-shadow', function(d) {\n            return d.horizontal ? '-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff' : 'none';\n        })\n        .each(function(d) {Drawing.font(nodeLabel, d.textFont);});\n\n    nodeLabel\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .attr('transform', textFlip);\n\n    var nodeLabelTextPath = nodeLabel.selectAll('.' + c.cn.nodeLabelTextPath)\n        .data(repeat);\n\n    nodeLabelTextPath.enter()\n        .append('textPath')\n        .classed(c.cn.nodeLabelTextPath, true)\n        .attr('alignment-baseline', 'middle')\n        .attr('xlink:href', function(d) {return '#' + d.uniqueNodeLabelPathId;})\n        .attr('startOffset', nodeTextOffset)\n        .style('fill', nodeTextColor);\n\n    nodeLabelTextPath\n        .text(function(d) {return d.horizontal || d.node.dy > 5 ? d.node.label : '';})\n        .attr('text-anchor', function(d) {return d.horizontal && d.left ? 'end' : 'start';});\n\n    nodeLabelTextPath\n        .transition()\n        .ease(c.ease).duration(c.duration)\n        .attr('startOffset', nodeTextOffset)\n        .style('fill', nodeTextColor);\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/gup\":701,\"../../registry\":831,\"./constants\":1068,\"@plotly/d3-sankey\":51,\"d3\":157,\"d3-force\":149,\"d3-interpolate\":151,\"d3-sankey-circular\":154,\"tinycolor2\":524}],1073:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var selection = [];\n    var fullData = cd[0].trace;\n\n    var nodes = fullData._sankey.graph.nodes;\n\n    for(var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        if(node.partOfGroup) continue; // Those are invisible\n\n        // Position of node's centroid\n        var pos = [(node.x0 + node.x1) / 2, (node.y0 + node.y1) / 2];\n\n        // Swap x and y if trace is vertical\n        if(fullData.orientation === 'v') pos.reverse();\n\n        if(selectionTester && selectionTester.contains(pos, false, i, searchInfo)) {\n            selection.push({\n                pointNumber: node.pointNumber\n                // TODO: add eventData\n            });\n        }\n    }\n    return selection;\n};\n\n},{}],1074:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n\n// arrayOk attributes, merge them into calcdata array\nmodule.exports = function arraysToCalcdata(cd, trace) {\n    // so each point knows which index it originally came from\n    for(var i = 0; i < cd.length; i++) cd[i].i = i;\n\n    Lib.mergeArray(trace.text, cd, 'tx');\n    Lib.mergeArray(trace.hovertext, cd, 'htx');\n    Lib.mergeArray(trace.customdata, cd, 'data');\n    Lib.mergeArray(trace.textposition, cd, 'tp');\n    if(trace.textfont) {\n        Lib.mergeArray(trace.textfont.size, cd, 'ts');\n        Lib.mergeArray(trace.textfont.color, cd, 'tc');\n        Lib.mergeArray(trace.textfont.family, cd, 'tf');\n    }\n\n    var marker = trace.marker;\n    if(marker) {\n        Lib.mergeArray(marker.size, cd, 'ms');\n        Lib.mergeArray(marker.opacity, cd, 'mo');\n        Lib.mergeArray(marker.symbol, cd, 'mx');\n        Lib.mergeArray(marker.color, cd, 'mc');\n\n        var markerLine = marker.line;\n        if(marker.line) {\n            Lib.mergeArray(markerLine.color, cd, 'mlc');\n            Lib.mergeArray(markerLine.width, cd, 'mlw');\n        }\n\n        var markerGradient = marker.gradient;\n        if(markerGradient && markerGradient.type !== 'none') {\n            Lib.mergeArray(markerGradient.type, cd, 'mgt');\n            Lib.mergeArray(markerGradient.color, cd, 'mgc');\n        }\n    }\n};\n\n},{\"../../lib\":703}],1075:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\n\nvar Drawing = _dereq_('../../components/drawing');\nvar constants = _dereq_('./constants');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    x: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        anim: true,\n        \n    },\n    x0: {\n        valType: 'any',\n        dflt: 0,\n        \n        editType: 'calc+clearAxisTypes',\n        anim: true,\n        \n    },\n    dx: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        anim: true,\n        \n    },\n    y: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        anim: true,\n        \n    },\n    y0: {\n        valType: 'any',\n        dflt: 0,\n        \n        editType: 'calc+clearAxisTypes',\n        anim: true,\n        \n    },\n    dy: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        anim: true,\n        \n    },\n\n    stackgroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n    orientation: {\n        valType: 'enumerated',\n        \n        values: ['v', 'h'],\n        editType: 'calc',\n        \n    },\n    groupnorm: {\n        valType: 'enumerated',\n        values: ['', 'fraction', 'percent'],\n        dflt: '',\n        \n        editType: 'calc',\n        \n    },\n    stackgaps: {\n        valType: 'enumerated',\n        values: ['infer zero', 'interpolate'],\n        dflt: 'infer zero',\n        \n        editType: 'calc',\n        \n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        editType: 'style',\n        \n    },\n    mode: {\n        valType: 'flaglist',\n        flags: ['lines', 'markers', 'text'],\n        extras: ['none'],\n        \n        editType: 'calc',\n        \n    },\n    hoveron: {\n        valType: 'flaglist',\n        flags: ['points', 'fills'],\n        \n        editType: 'style',\n        \n    },\n    hovertemplate: hovertemplateAttrs({}, {\n        keys: constants.eventDataKeys\n    }),\n    line: {\n        color: {\n            valType: 'color',\n            \n            editType: 'style',\n            anim: true,\n            \n        },\n        width: {\n            valType: 'number',\n            min: 0,\n            dflt: 2,\n            \n            editType: 'style',\n            anim: true,\n            \n        },\n        shape: {\n            valType: 'enumerated',\n            values: ['linear', 'spline', 'hv', 'vh', 'hvh', 'vhv'],\n            dflt: 'linear',\n            \n            editType: 'plot',\n            \n        },\n        smoothing: {\n            valType: 'number',\n            min: 0,\n            max: 1.3,\n            dflt: 1,\n            \n            editType: 'plot',\n            \n        },\n        dash: extendFlat({}, dash, {editType: 'style'}),\n        simplify: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'plot',\n            \n        },\n        editType: 'plot'\n    },\n\n    connectgaps: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    cliponaxis: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'plot',\n        \n    },\n\n    fill: {\n        valType: 'enumerated',\n        values: ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', 'toself', 'tonext'],\n        \n        editType: 'calc',\n        \n    },\n    fillcolor: {\n        valType: 'color',\n        \n        editType: 'style',\n        anim: true,\n        \n    },\n    marker: extendFlat({\n        symbol: {\n            valType: 'enumerated',\n            values: Drawing.symbolList,\n            dflt: 'circle',\n            arrayOk: true,\n            \n            editType: 'style',\n            \n        },\n        opacity: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            arrayOk: true,\n            \n            editType: 'style',\n            anim: true,\n            \n        },\n        size: {\n            valType: 'number',\n            min: 0,\n            dflt: 6,\n            arrayOk: true,\n            \n            editType: 'calc',\n            anim: true,\n            \n        },\n        maxdisplayed: {\n            valType: 'number',\n            min: 0,\n            dflt: 0,\n            \n            editType: 'plot',\n            \n        },\n        sizeref: {\n            valType: 'number',\n            dflt: 1,\n            \n            editType: 'calc',\n            \n        },\n        sizemin: {\n            valType: 'number',\n            min: 0,\n            dflt: 0,\n            \n            editType: 'calc',\n            \n        },\n        sizemode: {\n            valType: 'enumerated',\n            values: ['diameter', 'area'],\n            dflt: 'diameter',\n            \n            editType: 'calc',\n            \n        },\n\n        line: extendFlat({\n            width: {\n                valType: 'number',\n                min: 0,\n                arrayOk: true,\n                \n                editType: 'style',\n                anim: true,\n                \n            },\n            editType: 'calc'\n        },\n            colorScaleAttrs('marker.line', {anim: true})\n        ),\n        gradient: {\n            type: {\n                valType: 'enumerated',\n                values: ['radial', 'horizontal', 'vertical', 'none'],\n                arrayOk: true,\n                dflt: 'none',\n                \n                editType: 'calc',\n                \n            },\n            color: {\n                valType: 'color',\n                arrayOk: true,\n                \n                editType: 'calc',\n                \n            },\n            editType: 'calc'\n        },\n        editType: 'calc'\n    },\n        colorScaleAttrs('marker', {anim: true})\n    ),\n    selected: {\n        marker: {\n            opacity: {\n                valType: 'number',\n                min: 0,\n                max: 1,\n                \n                editType: 'style',\n                \n            },\n            color: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            size: {\n                valType: 'number',\n                min: 0,\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        textfont: {\n            color: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        editType: 'style'\n    },\n    unselected: {\n        marker: {\n            opacity: {\n                valType: 'number',\n                min: 0,\n                max: 1,\n                \n                editType: 'style',\n                \n            },\n            color: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            size: {\n                valType: 'number',\n                min: 0,\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        textfont: {\n            color: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        editType: 'style'\n    },\n\n    textposition: {\n        valType: 'enumerated',\n        values: [\n            'top left', 'top center', 'top right',\n            'middle left', 'middle center', 'middle right',\n            'bottom left', 'bottom center', 'bottom right'\n        ],\n        dflt: 'middle center',\n        arrayOk: true,\n        \n        editType: 'calc',\n        \n    },\n    textfont: fontAttrs({\n        editType: 'calc',\n        colorEditType: 'style',\n        arrayOk: true,\n        \n    }),\n\n    r: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    t: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    }\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/drawing\":601,\"../../components/drawing/attributes\":600,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/font_attributes\":777,\"./constants\":1079}],1076:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar Lib = _dereq_('../../lib');\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar subTypes = _dereq_('./subtypes');\nvar calcColorscale = _dereq_('./colorscale_calc');\nvar arraysToCalcdata = _dereq_('./arrays_to_calcdata');\nvar calcSelection = _dereq_('./calc_selection');\n\nfunction calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var x = xa.makeCalcdata(trace, 'x');\n    var y = ya.makeCalcdata(trace, 'y');\n    var serieslen = trace._length;\n    var cd = new Array(serieslen);\n    var ids = trace.ids;\n    var stackGroupOpts = getStackOpts(trace, fullLayout, xa, ya);\n    var interpolateGaps = false;\n    var isV, i, j, k, interpolate, vali;\n\n    setFirstScatter(fullLayout, trace);\n\n    var xAttr = 'x';\n    var yAttr = 'y';\n    var posAttr;\n    if(stackGroupOpts) {\n        Lib.pushUnique(stackGroupOpts.traceIndices, trace._expandedIndex);\n        isV = stackGroupOpts.orientation === 'v';\n\n        // size, like we use for bar\n        if(isV) {\n            yAttr = 's';\n            posAttr = 'x';\n        } else {\n            xAttr = 's';\n            posAttr = 'y';\n        }\n        interpolate = stackGroupOpts.stackgaps === 'interpolate';\n    } else {\n        var ppad = calcMarkerSize(trace, serieslen);\n        calcAxisExpansion(gd, trace, xa, ya, x, y, ppad);\n    }\n\n    for(i = 0; i < serieslen; i++) {\n        var cdi = cd[i] = {};\n        var xValid = isNumeric(x[i]);\n        var yValid = isNumeric(y[i]);\n        if(xValid && yValid) {\n            cdi[xAttr] = x[i];\n            cdi[yAttr] = y[i];\n        } else if(stackGroupOpts && (isV ? xValid : yValid)) {\n            // if we're stacking we need to hold on to all valid positions\n            // even with invalid sizes\n\n            cdi[posAttr] = isV ? x[i] : y[i];\n            cdi.gap = true;\n            if(interpolate) {\n                cdi.s = BADNUM;\n                interpolateGaps = true;\n            } else {\n                cdi.s = 0;\n            }\n        } else {\n            cdi[xAttr] = cdi[yAttr] = BADNUM;\n        }\n\n        if(ids) {\n            cdi.id = String(ids[i]);\n        }\n    }\n\n    arraysToCalcdata(cd, trace);\n    calcColorscale(gd, trace);\n    calcSelection(cd, trace);\n\n    if(stackGroupOpts) {\n        // remove bad positions and sort\n        // note that original indices get added to cd in arraysToCalcdata\n        i = 0;\n        while(i < cd.length) {\n            if(cd[i][posAttr] === BADNUM) {\n                cd.splice(i, 1);\n            } else i++;\n        }\n\n        Lib.sort(cd, function(a, b) {\n            return (a[posAttr] - b[posAttr]) || (a.i - b.i);\n        });\n\n        if(interpolateGaps) {\n            // first fill the beginning with constant from the first point\n            i = 0;\n            while(i < cd.length - 1 && cd[i].gap) {\n                i++;\n            }\n            vali = cd[i].s;\n            if(!vali) vali = cd[i].s = 0; // in case of no data AT ALL in this trace - use 0\n            for(j = 0; j < i; j++) {\n                cd[j].s = vali;\n            }\n            // then fill the end with constant from the last point\n            k = cd.length - 1;\n            while(k > i && cd[k].gap) {\n                k--;\n            }\n            vali = cd[k].s;\n            for(j = cd.length - 1; j > k; j--) {\n                cd[j].s = vali;\n            }\n            // now interpolate internal gaps linearly\n            while(i < k) {\n                i++;\n                if(cd[i].gap) {\n                    j = i + 1;\n                    while(cd[j].gap) {\n                        j++;\n                    }\n                    var pos0 = cd[i - 1][posAttr];\n                    var size0 = cd[i - 1].s;\n                    var m = (cd[j].s - size0) / (cd[j][posAttr] - pos0);\n                    while(i < j) {\n                        cd[i].s = size0 + (cd[i][posAttr] - pos0) * m;\n                        i++;\n                    }\n                }\n            }\n        }\n    }\n\n    return cd;\n}\n\nfunction calcAxisExpansion(gd, trace, xa, ya, x, y, ppad) {\n    var serieslen = trace._length;\n    var fullLayout = gd._fullLayout;\n    var xId = xa._id;\n    var yId = ya._id;\n    var firstScatter = fullLayout._firstScatter[firstScatterGroup(trace)] === trace.uid;\n    var stackOrientation = (getStackOpts(trace, fullLayout, xa, ya) || {}).orientation;\n    var fill = trace.fill;\n\n    // cancel minimum tick spacings (only applies to bars and boxes)\n    xa._minDtick = 0;\n    ya._minDtick = 0;\n\n    // check whether bounds should be tight, padded, extended to zero...\n    // most cases both should be padded on both ends, so start with that.\n    var xOptions = {padded: true};\n    var yOptions = {padded: true};\n\n    if(ppad) {\n        xOptions.ppad = yOptions.ppad = ppad;\n    }\n\n    // TODO: text size\n\n    var openEnded = serieslen < 2 || (x[0] !== x[serieslen - 1]) || (y[0] !== y[serieslen - 1]);\n\n    if(openEnded && (\n        (fill === 'tozerox') ||\n        ((fill === 'tonextx') && (firstScatter || stackOrientation === 'h'))\n    )) {\n        // include zero (tight) and extremes (padded) if fill to zero\n        // (unless the shape is closed, then it's just filling the shape regardless)\n\n        xOptions.tozero = true;\n    } else if(!(trace.error_y || {}).visible && (\n        // if no error bars, markers or text, or fill to y=0 remove x padding\n\n            (fill === 'tonexty' || fill === 'tozeroy') ||\n            (!subTypes.hasMarkers(trace) && !subTypes.hasText(trace))\n        )) {\n        xOptions.padded = false;\n        xOptions.ppad = 0;\n    }\n\n    if(openEnded && (\n        (fill === 'tozeroy') ||\n        ((fill === 'tonexty') && (firstScatter || stackOrientation === 'v'))\n    )) {\n        // now check for y - rather different logic, though still mostly padded both ends\n        // include zero (tight) and extremes (padded) if fill to zero\n        // (unless the shape is closed, then it's just filling the shape regardless)\n\n        yOptions.tozero = true;\n    } else if(fill === 'tonextx' || fill === 'tozerox') {\n        // tight y: any x fill\n\n        yOptions.padded = false;\n    }\n\n    // N.B. asymmetric splom traces call this with blank {} xa or ya\n    if(xId) trace._extremes[xId] = Axes.findExtremes(xa, x, xOptions);\n    if(yId) trace._extremes[yId] = Axes.findExtremes(ya, y, yOptions);\n}\n\nfunction calcMarkerSize(trace, serieslen) {\n    if(!subTypes.hasMarkers(trace)) return;\n\n    // Treat size like x or y arrays --- Run d2c\n    // this needs to go before ppad computation\n    var marker = trace.marker;\n    var sizeref = 1.6 * (trace.marker.sizeref || 1);\n    var markerTrans;\n\n    if(trace.marker.sizemode === 'area') {\n        markerTrans = function(v) {\n            return Math.max(Math.sqrt((v || 0) / sizeref), 3);\n        };\n    } else {\n        markerTrans = function(v) {\n            return Math.max((v || 0) / sizeref, 3);\n        };\n    }\n\n    if(Lib.isArrayOrTypedArray(marker.size)) {\n        // I tried auto-type but category and dates dont make much sense.\n        var ax = {type: 'linear'};\n        Axes.setConvert(ax);\n\n        var s = ax.makeCalcdata(trace.marker, 'size');\n\n        var sizeOut = new Array(serieslen);\n        for(var i = 0; i < serieslen; i++) {\n            sizeOut[i] = markerTrans(s[i]);\n        }\n        return sizeOut;\n    } else {\n        return markerTrans(marker.size);\n    }\n}\n\n/**\n * mark the first scatter trace for each subplot\n * note that scatter and scattergl each get their own first trace\n * note also that I'm doing this during calc rather than supplyDefaults\n * so I don't need to worry about transforms, but if we ever do\n * per-trace calc this will get confused.\n */\nfunction setFirstScatter(fullLayout, trace) {\n    var group = firstScatterGroup(trace);\n    var firstScatter = fullLayout._firstScatter;\n    if(!firstScatter[group]) firstScatter[group] = trace.uid;\n}\n\nfunction firstScatterGroup(trace) {\n    var stackGroup = trace.stackgroup;\n    return trace.xaxis + trace.yaxis + trace.type +\n        (stackGroup ? '-' + stackGroup : '');\n}\n\nfunction getStackOpts(trace, fullLayout, xa, ya) {\n    var stackGroup = trace.stackgroup;\n    if(!stackGroup) return;\n    var stackOpts = fullLayout._scatterStackOpts[xa._id + ya._id][stackGroup];\n    var stackAx = stackOpts.orientation === 'v' ? ya : xa;\n    // Allow stacking only on numeric axes\n    // calc is a little late to be figuring this out, but during supplyDefaults\n    // we don't know the axis type yet\n    if(stackAx.type === 'linear' || stackAx.type === 'log') return stackOpts;\n}\n\nmodule.exports = {\n    calc: calc,\n    calcMarkerSize: calcMarkerSize,\n    calcAxisExpansion: calcAxisExpansion,\n    setFirstScatter: setFirstScatter,\n    getStackOpts: getStackOpts\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"./arrays_to_calcdata\":1074,\"./calc_selection\":1077,\"./colorscale_calc\":1078,\"./subtypes\":1098,\"fast-isnumeric\":224}],1077:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = function calcSelection(cd, trace) {\n    if(Lib.isArrayOrTypedArray(trace.selectedpoints)) {\n        Lib.tagSelected(cd, trace);\n    }\n};\n\n},{\"../../lib\":703}],1078:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar calcColorscale = _dereq_('../../components/colorscale/calc');\n\nvar subTypes = _dereq_('./subtypes');\n\nmodule.exports = function calcMarkerColorscale(gd, trace) {\n    if(subTypes.hasLines(trace) && hasColorscale(trace, 'line')) {\n        calcColorscale(gd, trace, {\n            vals: trace.line.color,\n            containerStr: 'line',\n            cLetter: 'c'\n        });\n    }\n\n    if(subTypes.hasMarkers(trace)) {\n        if(hasColorscale(trace, 'marker')) {\n            calcColorscale(gd, trace, {\n                vals: trace.marker.color,\n                containerStr: 'marker',\n                cLetter: 'c'\n            });\n        }\n        if(hasColorscale(trace, 'marker.line')) {\n            calcColorscale(gd, trace, {\n                vals: trace.marker.line.color,\n                containerStr: 'marker.line',\n                cLetter: 'c'\n            });\n        }\n    }\n};\n\n},{\"../../components/colorscale/calc\":588,\"../../components/colorscale/helpers\":591,\"./subtypes\":1098}],1079:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    PTS_LINESONLY: 20,\n\n    // fixed parameters of clustering and clipping algorithms\n\n    // fraction of clustering tolerance \"so close we don't even consider it a new point\"\n    minTolerance: 0.2,\n    // how fast does clustering tolerance increase as you get away from the visible region\n    toleranceGrowth: 10,\n\n    // number of viewport sizes away from the visible region\n    // at which we clip all lines to the perimeter\n    maxScreensAway: 20,\n\n    eventDataKeys: []\n};\n\n},{}],1080:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar calc = _dereq_('./calc');\n\n/*\n * Scatter stacking & normalization calculations\n * runs per subplot, and can handle multiple stacking groups\n */\n\nmodule.exports = function crossTraceCalc(gd, plotinfo) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var subplot = xa._id + ya._id;\n\n    var subplotStackOpts = gd._fullLayout._scatterStackOpts[subplot];\n    if(!subplotStackOpts) return;\n\n    var calcTraces = gd.calcdata;\n\n    var i, j, k, i2, cd, cd0, posj, sumj, norm;\n    var groupOpts, interpolate, groupnorm, posAttr, valAttr;\n    var hasAnyBlanks;\n\n    for(var stackGroup in subplotStackOpts) {\n        groupOpts = subplotStackOpts[stackGroup];\n        var indices = groupOpts.traceIndices;\n\n        // can get here with no indices if the stack axis is non-numeric\n        if(!indices.length) continue;\n\n        interpolate = groupOpts.stackgaps === 'interpolate';\n        groupnorm = groupOpts.groupnorm;\n        if(groupOpts.orientation === 'v') {\n            posAttr = 'x';\n            valAttr = 'y';\n        } else {\n            posAttr = 'y';\n            valAttr = 'x';\n        }\n        hasAnyBlanks = new Array(indices.length);\n        for(i = 0; i < hasAnyBlanks.length; i++) {\n            hasAnyBlanks[i] = false;\n        }\n\n        // Collect the complete set of all positions across ALL traces.\n        // Start with the first trace, then interleave items from later traces\n        // as needed.\n        // Fill in mising items as we go.\n        cd0 = calcTraces[indices[0]];\n        var allPositions = new Array(cd0.length);\n        for(i = 0; i < cd0.length; i++) {\n            allPositions[i] = cd0[i][posAttr];\n        }\n\n        for(i = 1; i < indices.length; i++) {\n            cd = calcTraces[indices[i]];\n\n            for(j = k = 0; j < cd.length; j++) {\n                posj = cd[j][posAttr];\n                for(; posj > allPositions[k] && k < allPositions.length; k++) {\n                    // the current trace is missing a position from some previous trace(s)\n                    insertBlank(cd, j, allPositions[k], i, hasAnyBlanks, interpolate, posAttr);\n                    j++;\n                }\n                if(posj !== allPositions[k]) {\n                    // previous trace(s) are missing a position from the current trace\n                    for(i2 = 0; i2 < i; i2++) {\n                        insertBlank(calcTraces[indices[i2]], k, posj, i2, hasAnyBlanks, interpolate, posAttr);\n                    }\n                    allPositions.splice(k, 0, posj);\n                }\n                k++;\n            }\n            for(; k < allPositions.length; k++) {\n                insertBlank(cd, j, allPositions[k], i, hasAnyBlanks, interpolate, posAttr);\n                j++;\n            }\n        }\n\n        var serieslen = allPositions.length;\n\n        // stack (and normalize)!\n        for(j = 0; j < cd0.length; j++) {\n            sumj = cd0[j][valAttr] = cd0[j].s;\n            for(i = 1; i < indices.length; i++) {\n                cd = calcTraces[indices[i]];\n                cd[0].trace._rawLength = cd[0].trace._length;\n                cd[0].trace._length = serieslen;\n                sumj += cd[j].s;\n                cd[j][valAttr] = sumj;\n            }\n\n            if(groupnorm) {\n                norm = ((groupnorm === 'fraction') ? sumj : (sumj / 100)) || 1;\n                for(i = 0; i < indices.length; i++) {\n                    var cdj = calcTraces[indices[i]][j];\n                    cdj[valAttr] /= norm;\n                    cdj.sNorm = cdj.s / norm;\n                }\n            }\n        }\n\n        // autorange\n        for(i = 0; i < indices.length; i++) {\n            cd = calcTraces[indices[i]];\n            var trace = cd[0].trace;\n            var ppad = calc.calcMarkerSize(trace, trace._rawLength);\n            var arrayPad = Array.isArray(ppad);\n            if((ppad && hasAnyBlanks[i]) || arrayPad) {\n                var ppadRaw = ppad;\n                ppad = new Array(serieslen);\n                for(j = 0; j < serieslen; j++) {\n                    ppad[j] = cd[j].gap ? 0 : (arrayPad ? ppadRaw[cd[j].i] : ppadRaw);\n                }\n            }\n            var x = new Array(serieslen);\n            var y = new Array(serieslen);\n            for(j = 0; j < serieslen; j++) {\n                x[j] = cd[j].x;\n                y[j] = cd[j].y;\n            }\n            calc.calcAxisExpansion(gd, trace, xa, ya, x, y, ppad);\n\n            // while we're here (in a loop over all traces in the stack)\n            // record the orientation, so hover can find it easily\n            cd[0].t.orientation = groupOpts.orientation;\n        }\n    }\n};\n\nfunction insertBlank(calcTrace, index, position, traceIndex, hasAnyBlanks, interpolate, posAttr) {\n    hasAnyBlanks[traceIndex] = true;\n    var newEntry = {\n        i: null,\n        gap: true,\n        s: 0\n    };\n    newEntry[posAttr] = position;\n    calcTrace.splice(index, 0, newEntry);\n    // Even if we're not interpolating, if one trace has multiple\n    // values at the same position and this trace only has one value there,\n    // we just duplicate that one value rather than insert a zero.\n    // We also make it look like a real point - because it's ambiguous which\n    // one really is the real one!\n    if(index && position === calcTrace[index - 1][posAttr]) {\n        var prevEntry = calcTrace[index - 1];\n        newEntry.s = prevEntry.s;\n        // TODO is it going to cause any problems to have multiple\n        // calcdata points with the same index?\n        newEntry.i = prevEntry.i;\n        newEntry.gap = prevEntry.gap;\n    } else if(interpolate) {\n        newEntry.s = getInterp(calcTrace, index, position, posAttr);\n    }\n    if(!index) {\n        // t and trace need to stay on the first cd entry\n        calcTrace[0].t = calcTrace[1].t;\n        calcTrace[0].trace = calcTrace[1].trace;\n        delete calcTrace[1].t;\n        delete calcTrace[1].trace;\n    }\n}\n\nfunction getInterp(calcTrace, index, position, posAttr) {\n    var pt0 = calcTrace[index - 1];\n    var pt1 = calcTrace[index + 1];\n    if(!pt1) return pt0.s;\n    if(!pt0) return pt1.s;\n    return pt0.s + (pt1.s - pt0.s) * (position - pt0[posAttr]) / (pt1[posAttr] - pt0[posAttr]);\n}\n\n},{\"./calc\":1076}],1081:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n// remove opacity for any trace that has a fill or is filled to\nmodule.exports = function crossTraceDefaults(fullData) {\n    for(var i = 0; i < fullData.length; i++) {\n        var tracei = fullData[i];\n        if(tracei.type !== 'scatter') continue;\n\n        var filli = tracei.fill;\n        if(filli === 'none' || filli === 'toself') continue;\n\n        tracei.opacity = undefined;\n\n        if(filli === 'tonexty' || filli === 'tonextx') {\n            for(var j = i - 1; j >= 0; j--) {\n                var tracej = fullData[j];\n\n                if((tracej.type === 'scatter') &&\n                        (tracej.xaxis === tracei.xaxis) &&\n                        (tracej.yaxis === tracei.yaxis)) {\n                    tracej.opacity = undefined;\n                    break;\n                }\n            }\n        }\n    }\n};\n\n},{}],1082:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar attributes = _dereq_('./attributes');\nvar constants = _dereq_('./constants');\nvar subTypes = _dereq_('./subtypes');\nvar handleXYDefaults = _dereq_('./xy_defaults');\nvar handleStackDefaults = _dereq_('./stack_defaults');\nvar handleMarkerDefaults = _dereq_('./marker_defaults');\nvar handleLineDefaults = _dereq_('./line_defaults');\nvar handleLineShapeDefaults = _dereq_('./line_shape_defaults');\nvar handleTextDefaults = _dereq_('./text_defaults');\nvar handleFillColorDefaults = _dereq_('./fillcolor_defaults');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleXYDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) traceOut.visible = false;\n\n    if(!traceOut.visible) return;\n\n    var stackGroupOpts = handleStackDefaults(traceIn, traceOut, layout, coerce);\n\n    var defaultMode = !stackGroupOpts && (len < constants.PTS_LINESONLY) ?\n        'lines+markers' : 'lines';\n    coerce('text');\n    coerce('hovertext');\n    coerce('mode', defaultMode);\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        handleLineShapeDefaults(traceIn, traceOut, coerce);\n        coerce('connectgaps');\n        coerce('line.simplify');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    var dfltHoverOn = [];\n\n    if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) {\n        coerce('cliponaxis');\n        coerce('marker.maxdisplayed');\n        dfltHoverOn.push('points');\n    }\n\n    // It's possible for this default to be changed by a later trace.\n    // We handle that case in some hacky code inside handleStackDefaults.\n    coerce('fill', stackGroupOpts ? stackGroupOpts.fillDflt : 'none');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n        if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);\n    }\n\n    var lineColor = (traceOut.line || {}).color;\n    var markerColor = (traceOut.marker || {}).color;\n\n    if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') {\n        dfltHoverOn.push('fills');\n    }\n    coerce('hoveron', dfltHoverOn.join('+') || 'points');\n    if(traceOut.hoveron !== 'fills') coerce('hovertemplate');\n    var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'y'});\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"./attributes\":1075,\"./constants\":1079,\"./fillcolor_defaults\":1083,\"./line_defaults\":1087,\"./line_shape_defaults\":1089,\"./marker_defaults\":1093,\"./stack_defaults\":1096,\"./subtypes\":1098,\"./text_defaults\":1099,\"./xy_defaults\":1100}],1083:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\n\nmodule.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coerce) {\n    var inheritColorFromMarker = false;\n\n    if(traceOut.marker) {\n        // don't try to inherit a color array\n        var markerColor = traceOut.marker.color;\n        var markerLineColor = (traceOut.marker.line || {}).color;\n\n        if(markerColor && !isArrayOrTypedArray(markerColor)) {\n            inheritColorFromMarker = markerColor;\n        } else if(markerLineColor && !isArrayOrTypedArray(markerLineColor)) {\n            inheritColorFromMarker = markerLineColor;\n        }\n    }\n\n    coerce('fillcolor', Color.addOpacity(\n        (traceOut.line || {}).color ||\n        inheritColorFromMarker ||\n        defaultColor, 0.5\n    ));\n};\n\n},{\"../../components/color\":580,\"../../lib\":703}],1084:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar subtypes = _dereq_('./subtypes');\n\n\nmodule.exports = function getTraceColor(trace, di) {\n    var lc, tc;\n\n    // TODO: text modes\n\n    if(trace.mode === 'lines') {\n        lc = trace.line.color;\n        return (lc && Color.opacity(lc)) ?\n            lc : trace.fillcolor;\n    } else if(trace.mode === 'none') {\n        return trace.fill ? trace.fillcolor : '';\n    } else {\n        var mc = di.mcc || (trace.marker || {}).color;\n        var mlc = di.mlcc || ((trace.marker || {}).line || {}).color;\n\n        tc = (mc && Color.opacity(mc)) ? mc :\n            (mlc && Color.opacity(mlc) &&\n                (di.mlw || ((trace.marker || {}).line || {}).width)) ? mlc : '';\n\n        if(tc) {\n            // make sure the points aren't TOO transparent\n            if(Color.opacity(tc) < 0.3) {\n                return Color.addOpacity(tc, 0.3);\n            } else return tc;\n        } else {\n            lc = (trace.line || {}).color;\n            return (lc && Color.opacity(lc) &&\n                subtypes.hasLines(trace) && trace.line.width) ?\n                    lc : trace.fillcolor;\n        }\n    }\n};\n\n},{\"../../components/color\":580,\"./subtypes\":1098}],1085:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Fx = _dereq_('../../components/fx');\nvar Registry = _dereq_('../../registry');\nvar getTraceColor = _dereq_('./get_trace_color');\nvar Color = _dereq_('../../components/color');\nvar fillText = Lib.fillText;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var xpx = xa.c2p(xval);\n    var ypx = ya.c2p(yval);\n    var pt = [xpx, ypx];\n    var hoveron = trace.hoveron || '';\n    var minRad = (trace.mode.indexOf('markers') !== -1) ? 3 : 0.5;\n\n    // look for points to hover on first, then take fills only if we\n    // didn't find a point\n    if(hoveron.indexOf('points') !== -1) {\n        var dx = function(di) {\n            // dx and dy are used in compare modes - here we want to always\n            // prioritize the closest data point, at least as long as markers are\n            // the same size or nonexistent, but still try to prioritize small markers too.\n            var rad = Math.max(3, di.mrc || 0);\n            var kink = 1 - 1 / rad;\n            var dxRaw = Math.abs(xa.c2p(di.x) - xpx);\n            var d = (dxRaw < rad) ? (kink * dxRaw / rad) : (dxRaw - rad + kink);\n            return d;\n        };\n        var dy = function(di) {\n            var rad = Math.max(3, di.mrc || 0);\n            var kink = 1 - 1 / rad;\n            var dyRaw = Math.abs(ya.c2p(di.y) - ypx);\n            return (dyRaw < rad) ? (kink * dyRaw / rad) : (dyRaw - rad + kink);\n        };\n        var dxy = function(di) {\n            // scatter points: d.mrc is the calculated marker radius\n            // adjust the distance so if you're inside the marker it\n            // always will show up regardless of point size, but\n            // prioritize smaller points\n            var rad = Math.max(minRad, di.mrc || 0);\n            var dx = xa.c2p(di.x) - xpx;\n            var dy = ya.c2p(di.y) - ypx;\n            return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - minRad / rad);\n        };\n        var distfn = Fx.getDistanceFunction(hovermode, dx, dy, dxy);\n\n        Fx.getClosest(cd, distfn, pointData);\n\n        // skip the rest (for this trace) if we didn't find a close point\n        if(pointData.index !== false) {\n            // the closest data point\n            var di = cd[pointData.index];\n            var xc = xa.c2p(di.x, true);\n            var yc = ya.c2p(di.y, true);\n            var rad = di.mrc || 1;\n\n            // now we're done using the whole `calcdata` array, replace the\n            // index with the original index (in case of inserted point from\n            // stacked area)\n            pointData.index = di.i;\n\n            var orientation = cd[0].t.orientation;\n            // TODO: for scatter and bar, option to show (sub)totals and\n            // raw data? Currently stacked and/or normalized bars just show\n            // the normalized individual sizes, so that's what I'm doing here\n            // for now.\n            var sizeVal = orientation && (di.sNorm || di.s);\n            var xLabelVal = (orientation === 'h') ? sizeVal : di.x;\n            var yLabelVal = (orientation === 'v') ? sizeVal : di.y;\n\n            Lib.extendFlat(pointData, {\n                color: getTraceColor(trace, di),\n\n                x0: xc - rad,\n                x1: xc + rad,\n                xLabelVal: xLabelVal,\n\n                y0: yc - rad,\n                y1: yc + rad,\n                yLabelVal: yLabelVal,\n\n                spikeDistance: dxy(di),\n                hovertemplate: trace.hovertemplate\n            });\n\n            fillText(di, trace, pointData);\n            Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, pointData);\n\n            return [pointData];\n        }\n    }\n\n    // even if hoveron is 'fills', only use it if we have polygons too\n    if(hoveron.indexOf('fills') !== -1 && trace._polygons) {\n        var polygons = trace._polygons;\n        var polygonsIn = [];\n        var inside = false;\n        var xmin = Infinity;\n        var xmax = -Infinity;\n        var ymin = Infinity;\n        var ymax = -Infinity;\n\n        var i, j, polygon, pts, xCross, x0, x1, y0, y1;\n\n        for(i = 0; i < polygons.length; i++) {\n            polygon = polygons[i];\n            // TODO: this is not going to work right for curved edges, it will\n            // act as though they're straight. That's probably going to need\n            // the elements themselves to capture the events. Worth it?\n            if(polygon.contains(pt)) {\n                inside = !inside;\n                // TODO: need better than just the overall bounding box\n                polygonsIn.push(polygon);\n                ymin = Math.min(ymin, polygon.ymin);\n                ymax = Math.max(ymax, polygon.ymax);\n            }\n        }\n\n        if(inside) {\n            // constrain ymin/max to the visible plot, so the label goes\n            // at the middle of the piece you can see\n            ymin = Math.max(ymin, 0);\n            ymax = Math.min(ymax, ya._length);\n\n            // find the overall left-most and right-most points of the\n            // polygon(s) we're inside at their combined vertical midpoint.\n            // This is where we will draw the hover label.\n            // Note that this might not be the vertical midpoint of the\n            // whole trace, if it's disjoint.\n            var yAvg = (ymin + ymax) / 2;\n            for(i = 0; i < polygonsIn.length; i++) {\n                pts = polygonsIn[i].pts;\n                for(j = 1; j < pts.length; j++) {\n                    y0 = pts[j - 1][1];\n                    y1 = pts[j][1];\n                    if((y0 > yAvg) !== (y1 >= yAvg)) {\n                        x0 = pts[j - 1][0];\n                        x1 = pts[j][0];\n                        if(y1 - y0) {\n                            xCross = x0 + (x1 - x0) * (yAvg - y0) / (y1 - y0);\n                            xmin = Math.min(xmin, xCross);\n                            xmax = Math.max(xmax, xCross);\n                        }\n                    }\n                }\n            }\n\n            // constrain xmin/max to the visible plot now too\n            xmin = Math.max(xmin, 0);\n            xmax = Math.min(xmax, xa._length);\n\n            // get only fill or line color for the hover color\n            var color = Color.defaultLine;\n            if(Color.opacity(trace.fillcolor)) color = trace.fillcolor;\n            else if(Color.opacity((trace.line || {}).color)) {\n                color = trace.line.color;\n            }\n\n            Lib.extendFlat(pointData, {\n                // never let a 2D override 1D type as closest point\n                // also: no spikeDistance, it's not allowed for fills\n                distance: pointData.maxHoverDistance,\n                x0: xmin,\n                x1: xmax,\n                y0: yAvg,\n                y1: yAvg,\n                color: color,\n                hovertemplate: false\n            });\n\n            delete pointData.index;\n\n            if(trace.text && !Array.isArray(trace.text)) {\n                pointData.text = String(trace.text);\n            } else pointData.text = trace.name;\n\n            return [pointData];\n        }\n    }\n};\n\n},{\"../../components/color\":580,\"../../components/fx\":619,\"../../lib\":703,\"../../registry\":831,\"./get_trace_color\":1084}],1086:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar subtypes = _dereq_('./subtypes');\n\nmodule.exports = {\n    hasLines: subtypes.hasLines,\n    hasMarkers: subtypes.hasMarkers,\n    hasText: subtypes.hasText,\n    isBubble: subtypes.isBubble,\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('./cross_trace_defaults'),\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('./cross_trace_calc'),\n    arraysToCalcdata: _dereq_('./arrays_to_calcdata'),\n    plot: _dereq_('./plot'),\n    colorbar: _dereq_('./marker_colorbar'),\n    style: _dereq_('./style').style,\n    styleOnSelect: _dereq_('./style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('./select'),\n    animatable: true,\n\n    moduleType: 'trace',\n    name: 'scatter',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: [\n        'cartesian', 'svg', 'symbols', 'errorBarsOK', 'showLegend', 'scatter-like',\n        'zoomScale'\n    ],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"./arrays_to_calcdata\":1074,\"./attributes\":1075,\"./calc\":1076,\"./cross_trace_calc\":1080,\"./cross_trace_defaults\":1081,\"./defaults\":1082,\"./hover\":1085,\"./marker_colorbar\":1092,\"./plot\":1094,\"./select\":1095,\"./style\":1097,\"./subtypes\":1098}],1087:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\n\nmodule.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) {\n    var markerColor = (traceIn.marker || {}).color;\n\n    coerce('line.color', defaultColor);\n\n    if(hasColorscale(traceIn, 'line')) {\n        colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'line.', cLetter: 'c'});\n    } else {\n        var lineColorDflt = (isArrayOrTypedArray(markerColor) ? false : markerColor) || defaultColor;\n        coerce('line.color', lineColorDflt);\n    }\n\n    coerce('line.width');\n    if(!(opts || {}).noDash) coerce('line.dash');\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../components/colorscale/helpers\":591,\"../../lib\":703}],1088:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar numConstants = _dereq_('../../constants/numerical');\nvar BADNUM = numConstants.BADNUM;\nvar LOG_CLIP = numConstants.LOG_CLIP;\nvar LOG_CLIP_PLUS = LOG_CLIP + 0.5;\nvar LOG_CLIP_MINUS = LOG_CLIP - 0.5;\nvar Lib = _dereq_('../../lib');\nvar segmentsIntersect = Lib.segmentsIntersect;\nvar constrain = Lib.constrain;\nvar constants = _dereq_('./constants');\n\n\nmodule.exports = function linePoints(d, opts) {\n    var xa = opts.xaxis;\n    var ya = opts.yaxis;\n    var xLog = xa.type === 'log';\n    var yLog = ya.type === 'log';\n    var xLen = xa._length;\n    var yLen = ya._length;\n    var connectGaps = opts.connectGaps;\n    var baseTolerance = opts.baseTolerance;\n    var shape = opts.shape;\n    var linear = shape === 'linear';\n    var fill = opts.fill && opts.fill !== 'none';\n    var segments = [];\n    var minTolerance = constants.minTolerance;\n    var len = d.length;\n    var pts = new Array(len);\n    var pti = 0;\n\n    var i;\n\n    // pt variables are pixel coordinates [x,y] of one point\n    // these four are the outputs of clustering on a line\n    var clusterStartPt, clusterEndPt, clusterHighPt, clusterLowPt;\n\n    // \"this\" is the next point we're considering adding to the cluster\n    var thisPt;\n\n    // did we encounter the high point first, then a low point, or vice versa?\n    var clusterHighFirst;\n\n    // the first two points in the cluster determine its unit vector\n    // so the second is always in the \"High\" direction\n    var clusterUnitVector;\n\n    // the pixel delta from clusterStartPt\n    var thisVector;\n\n    // val variables are (signed) pixel distances along the cluster vector\n    var clusterRefDist, clusterHighVal, clusterLowVal, thisVal;\n\n    // deviation variables are (signed) pixel distances normal to the cluster vector\n    var clusterMinDeviation, clusterMaxDeviation, thisDeviation;\n\n    // turn one calcdata point into pixel coordinates\n    function getPt(index) {\n        var di = d[index];\n        if(!di) return false;\n        var x = xa.c2p(di.x);\n        var y = ya.c2p(di.y);\n\n        // if non-positive log values, set them VERY far off-screen\n        // so the line looks essentially straight from the previous point.\n        if(x === BADNUM) {\n            if(xLog) x = xa.c2p(di.x, true);\n            if(x === BADNUM) return false;\n            // If BOTH were bad log values, make the line follow a constant\n            // exponent rather than a constant slope\n            if(yLog && y === BADNUM) {\n                x *= Math.abs(xa._m * yLen * (xa._m > 0 ? LOG_CLIP_PLUS : LOG_CLIP_MINUS) /\n                    (ya._m * xLen * (ya._m > 0 ? LOG_CLIP_PLUS : LOG_CLIP_MINUS)));\n            }\n            x *= 1000;\n        }\n        if(y === BADNUM) {\n            if(yLog) y = ya.c2p(di.y, true);\n            if(y === BADNUM) return false;\n            y *= 1000;\n        }\n        return [x, y];\n    }\n\n    function crossesViewport(xFrac0, yFrac0, xFrac1, yFrac1) {\n        var dx = xFrac1 - xFrac0;\n        var dy = yFrac1 - yFrac0;\n        var dx0 = 0.5 - xFrac0;\n        var dy0 = 0.5 - yFrac0;\n        var norm2 = dx * dx + dy * dy;\n        var dot = dx * dx0 + dy * dy0;\n        if(dot > 0 && dot < norm2) {\n            var cross = dx0 * dy - dy0 * dx;\n            if(cross * cross < norm2) return true;\n        }\n    }\n\n    var latestXFrac, latestYFrac;\n    // if we're off-screen, increase tolerance over baseTolerance\n    function getTolerance(pt, nextPt) {\n        var xFrac = pt[0] / xLen;\n        var yFrac = pt[1] / yLen;\n        var offScreenFraction = Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1);\n        if(offScreenFraction && (latestXFrac !== undefined) &&\n            crossesViewport(xFrac, yFrac, latestXFrac, latestYFrac)\n        ) {\n            offScreenFraction = 0;\n        }\n        if(offScreenFraction && nextPt &&\n            crossesViewport(xFrac, yFrac, nextPt[0] / xLen, nextPt[1] / yLen)\n        ) {\n            offScreenFraction = 0;\n        }\n\n        return (1 + constants.toleranceGrowth * offScreenFraction) * baseTolerance;\n    }\n\n    function ptDist(pt1, pt2) {\n        var dx = pt1[0] - pt2[0];\n        var dy = pt1[1] - pt2[1];\n        return Math.sqrt(dx * dx + dy * dy);\n    }\n\n    // last bit of filtering: clip paths that are VERY far off-screen\n    // so we don't get near the browser's hard limit (+/- 2^29 px in Chrome and FF)\n\n    var maxScreensAway = constants.maxScreensAway;\n\n    // find the intersections between the segment from pt1 to pt2\n    // and the large rectangle maxScreensAway around the viewport\n    // if one of pt1 and pt2 is inside and the other outside, there\n    // will be only one intersection.\n    // if both are outside there will be 0 or 2 intersections\n    // (or 1 if it's right at a corner - we'll treat that like 0)\n    // returns an array of intersection pts\n    var xEdge0 = -xLen * maxScreensAway;\n    var xEdge1 = xLen * (1 + maxScreensAway);\n    var yEdge0 = -yLen * maxScreensAway;\n    var yEdge1 = yLen * (1 + maxScreensAway);\n    var edges = [\n        [xEdge0, yEdge0, xEdge1, yEdge0],\n        [xEdge1, yEdge0, xEdge1, yEdge1],\n        [xEdge1, yEdge1, xEdge0, yEdge1],\n        [xEdge0, yEdge1, xEdge0, yEdge0]\n    ];\n    var xEdge, yEdge, lastXEdge, lastYEdge, lastFarPt, edgePt;\n\n    // for linear line shape, edge intersections should be linearly interpolated\n    // spline uses this too, which isn't precisely correct but is actually pretty\n    // good, because Catmull-Rom weights far-away points less in creating the curvature\n    function getLinearEdgeIntersections(pt1, pt2) {\n        var out = [];\n        var ptCount = 0;\n        for(var i = 0; i < 4; i++) {\n            var edge = edges[i];\n            var ptInt = segmentsIntersect(\n                pt1[0], pt1[1], pt2[0], pt2[1],\n                edge[0], edge[1], edge[2], edge[3]\n            );\n            if(ptInt && (!ptCount ||\n                Math.abs(ptInt.x - out[0][0]) > 1 ||\n                Math.abs(ptInt.y - out[0][1]) > 1\n            )) {\n                ptInt = [ptInt.x, ptInt.y];\n                // if we have 2 intersections, make sure the closest one to pt1 comes first\n                if(ptCount && ptDist(ptInt, pt1) < ptDist(out[0], pt1)) out.unshift(ptInt);\n                else out.push(ptInt);\n                ptCount++;\n            }\n        }\n        return out;\n    }\n\n    function onlyConstrainedPoint(pt) {\n        if(pt[0] < xEdge0 || pt[0] > xEdge1 || pt[1] < yEdge0 || pt[1] > yEdge1) {\n            return [constrain(pt[0], xEdge0, xEdge1), constrain(pt[1], yEdge0, yEdge1)];\n        }\n    }\n\n    function sameEdge(pt1, pt2) {\n        if(pt1[0] === pt2[0] && (pt1[0] === xEdge0 || pt1[0] === xEdge1)) return true;\n        if(pt1[1] === pt2[1] && (pt1[1] === yEdge0 || pt1[1] === yEdge1)) return true;\n    }\n\n    // for line shapes hv and vh, movement in the two dimensions is decoupled,\n    // so all we need to do is constrain each dimension independently\n    function getHVEdgeIntersections(pt1, pt2) {\n        var out = [];\n        var ptInt1 = onlyConstrainedPoint(pt1);\n        var ptInt2 = onlyConstrainedPoint(pt2);\n        if(ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n\n        if(ptInt1) out.push(ptInt1);\n        if(ptInt2) out.push(ptInt2);\n        return out;\n    }\n\n    // hvh and vhv we sometimes have to move one of the intersection points\n    // out BEYOND the clipping rect, by a maximum of a factor of 2, so that\n    // the midpoint line is drawn in the right place\n    function getABAEdgeIntersections(dim, limit0, limit1) {\n        return function(pt1, pt2) {\n            var ptInt1 = onlyConstrainedPoint(pt1);\n            var ptInt2 = onlyConstrainedPoint(pt2);\n\n            var out = [];\n            if(ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n\n            if(ptInt1) out.push(ptInt1);\n            if(ptInt2) out.push(ptInt2);\n\n            var midShift = 2 * Lib.constrain((pt1[dim] + pt2[dim]) / 2, limit0, limit1) -\n                ((ptInt1 || pt1)[dim] + (ptInt2 || pt2)[dim]);\n            if(midShift) {\n                var ptToAlter;\n                if(ptInt1 && ptInt2) {\n                    ptToAlter = (midShift > 0 === ptInt1[dim] > ptInt2[dim]) ? ptInt1 : ptInt2;\n                } else ptToAlter = ptInt1 || ptInt2;\n\n                ptToAlter[dim] += midShift;\n            }\n\n            return out;\n        };\n    }\n\n    var getEdgeIntersections;\n    if(shape === 'linear' || shape === 'spline') {\n        getEdgeIntersections = getLinearEdgeIntersections;\n    } else if(shape === 'hv' || shape === 'vh') {\n        getEdgeIntersections = getHVEdgeIntersections;\n    } else if(shape === 'hvh') getEdgeIntersections = getABAEdgeIntersections(0, xEdge0, xEdge1);\n    else if(shape === 'vhv') getEdgeIntersections = getABAEdgeIntersections(1, yEdge0, yEdge1);\n\n    // a segment pt1->pt2 entirely outside the nearby region:\n    // find the corner it gets closest to touching\n    function getClosestCorner(pt1, pt2) {\n        var dx = pt2[0] - pt1[0];\n        var m = (pt2[1] - pt1[1]) / dx;\n        var b = (pt1[1] * pt2[0] - pt2[1] * pt1[0]) / dx;\n\n        if(b > 0) return [m > 0 ? xEdge0 : xEdge1, yEdge1];\n        else return [m > 0 ? xEdge1 : xEdge0, yEdge0];\n    }\n\n    function updateEdge(pt) {\n        var x = pt[0];\n        var y = pt[1];\n        var xSame = x === pts[pti - 1][0];\n        var ySame = y === pts[pti - 1][1];\n        // duplicate point?\n        if(xSame && ySame) return;\n        if(pti > 1) {\n            // backtracking along an edge?\n            var xSame2 = x === pts[pti - 2][0];\n            var ySame2 = y === pts[pti - 2][1];\n            if(xSame && (x === xEdge0 || x === xEdge1) && xSame2) {\n                if(ySame2) pti--; // backtracking exactly - drop prev pt and don't add\n                else pts[pti - 1] = pt; // not exact: replace the prev pt\n            } else if(ySame && (y === yEdge0 || y === yEdge1) && ySame2) {\n                if(xSame2) pti--;\n                else pts[pti - 1] = pt;\n            } else pts[pti++] = pt;\n        } else pts[pti++] = pt;\n    }\n\n    function updateEdgesForReentry(pt) {\n        // if we're outside the nearby region and going back in,\n        // we may need to loop around a corner point\n        if(pts[pti - 1][0] !== pt[0] && pts[pti - 1][1] !== pt[1]) {\n            updateEdge([lastXEdge, lastYEdge]);\n        }\n        updateEdge(pt);\n        lastFarPt = null;\n        lastXEdge = lastYEdge = 0;\n    }\n\n    function addPt(pt) {\n        latestXFrac = pt[0] / xLen;\n        latestYFrac = pt[1] / yLen;\n        // Are we more than maxScreensAway off-screen any direction?\n        // if so, clip to this box, but in such a way that on-screen\n        // drawing is unchanged\n        xEdge = (pt[0] < xEdge0) ? xEdge0 : (pt[0] > xEdge1) ? xEdge1 : 0;\n        yEdge = (pt[1] < yEdge0) ? yEdge0 : (pt[1] > yEdge1) ? yEdge1 : 0;\n        if(xEdge || yEdge) {\n            if(!pti) {\n                // to get fills right - if first point is far, push it toward the\n                // screen in whichever direction(s) are far\n\n                pts[pti++] = [xEdge || pt[0], yEdge || pt[1]];\n            } else if(lastFarPt) {\n                // both this point and the last are outside the nearby region\n                // check if we're crossing the nearby region\n                var intersections = getEdgeIntersections(lastFarPt, pt);\n                if(intersections.length > 1) {\n                    updateEdgesForReentry(intersections[0]);\n                    pts[pti++] = intersections[1];\n                }\n            } else {\n                // we're leaving the nearby region - add the point where we left it\n\n                edgePt = getEdgeIntersections(pts[pti - 1], pt)[0];\n                pts[pti++] = edgePt;\n            }\n\n            var lastPt = pts[pti - 1];\n            if(xEdge && yEdge && (lastPt[0] !== xEdge || lastPt[1] !== yEdge)) {\n                // we've gone out beyond a new corner: add the corner too\n                // so that the next point will take the right winding\n                if(lastFarPt) {\n                    if(lastXEdge !== xEdge && lastYEdge !== yEdge) {\n                        if(lastXEdge && lastYEdge) {\n                            // we've gone around to an opposite corner - we\n                            // need to add the correct extra corner\n                            // in order to get the right winding\n                            updateEdge(getClosestCorner(lastFarPt, pt));\n                        } else {\n                            // we're coming from a far edge - the extra corner\n                            // we need is determined uniquely by the sectors\n                            updateEdge([lastXEdge || xEdge, lastYEdge || yEdge]);\n                        }\n                    } else if(lastXEdge && lastYEdge) {\n                        updateEdge([lastXEdge, lastYEdge]);\n                    }\n                }\n                updateEdge([xEdge, yEdge]);\n            } else if((lastXEdge - xEdge) && (lastYEdge - yEdge)) {\n                // we're coming from an edge or far corner to an edge - again the\n                // extra corner we need is uniquely determined by the sectors\n                updateEdge([xEdge || lastXEdge, yEdge || lastYEdge]);\n            }\n            lastFarPt = pt;\n            lastXEdge = xEdge;\n            lastYEdge = yEdge;\n        } else {\n            if(lastFarPt) {\n                // this point is in range but the previous wasn't: add its entry pt first\n                updateEdgesForReentry(getEdgeIntersections(lastFarPt, pt)[0]);\n            }\n\n            pts[pti++] = pt;\n        }\n    }\n\n    // loop over ALL points in this trace\n    for(i = 0; i < len; i++) {\n        clusterStartPt = getPt(i);\n        if(!clusterStartPt) continue;\n\n        pti = 0;\n        lastFarPt = null;\n        addPt(clusterStartPt);\n\n        // loop over one segment of the trace\n        for(i++; i < len; i++) {\n            clusterHighPt = getPt(i);\n            if(!clusterHighPt) {\n                if(connectGaps) continue;\n                else break;\n            }\n\n            // can't decimate if nonlinear line shape\n            // TODO: we *could* decimate [hv]{2,3} shapes if we restricted clusters to horz or vert again\n            // but spline would be verrry awkward to decimate\n            if(!linear || !opts.simplify) {\n                addPt(clusterHighPt);\n                continue;\n            }\n\n            var nextPt = getPt(i + 1);\n\n            clusterRefDist = ptDist(clusterHighPt, clusterStartPt);\n\n            // #3147 - always include the very first and last points for fills\n            if(!(fill && (pti === 0 || pti === len - 1)) &&\n                clusterRefDist < getTolerance(clusterHighPt, nextPt) * minTolerance) continue;\n\n            clusterUnitVector = [\n                (clusterHighPt[0] - clusterStartPt[0]) / clusterRefDist,\n                (clusterHighPt[1] - clusterStartPt[1]) / clusterRefDist\n            ];\n\n            clusterLowPt = clusterStartPt;\n            clusterHighVal = clusterRefDist;\n            clusterLowVal = clusterMinDeviation = clusterMaxDeviation = 0;\n            clusterHighFirst = false;\n            clusterEndPt = clusterHighPt;\n\n            // loop over one cluster of points that collapse onto one line\n            for(i++; i < d.length; i++) {\n                thisPt = nextPt;\n                nextPt = getPt(i + 1);\n                if(!thisPt) {\n                    if(connectGaps) continue;\n                    else break;\n                }\n                thisVector = [\n                    thisPt[0] - clusterStartPt[0],\n                    thisPt[1] - clusterStartPt[1]\n                ];\n                // cross product (or dot with normal to the cluster vector)\n                thisDeviation = thisVector[0] * clusterUnitVector[1] - thisVector[1] * clusterUnitVector[0];\n                clusterMinDeviation = Math.min(clusterMinDeviation, thisDeviation);\n                clusterMaxDeviation = Math.max(clusterMaxDeviation, thisDeviation);\n\n                if(clusterMaxDeviation - clusterMinDeviation > getTolerance(thisPt, nextPt)) break;\n\n                clusterEndPt = thisPt;\n                thisVal = thisVector[0] * clusterUnitVector[0] + thisVector[1] * clusterUnitVector[1];\n\n                if(thisVal > clusterHighVal) {\n                    clusterHighVal = thisVal;\n                    clusterHighPt = thisPt;\n                    clusterHighFirst = false;\n                } else if(thisVal < clusterLowVal) {\n                    clusterLowVal = thisVal;\n                    clusterLowPt = thisPt;\n                    clusterHighFirst = true;\n                }\n            }\n\n            // insert this cluster into pts\n            // we've already inserted the start pt, now check if we have high and low pts\n            if(clusterHighFirst) {\n                addPt(clusterHighPt);\n                if(clusterEndPt !== clusterLowPt) addPt(clusterLowPt);\n            } else {\n                if(clusterLowPt !== clusterStartPt) addPt(clusterLowPt);\n                if(clusterEndPt !== clusterHighPt) addPt(clusterHighPt);\n            }\n            // and finally insert the end pt\n            addPt(clusterEndPt);\n\n            // have we reached the end of this segment?\n            if(i >= d.length || !thisPt) break;\n\n            // otherwise we have an out-of-cluster point to insert as next clusterStartPt\n            addPt(thisPt);\n            clusterStartPt = thisPt;\n        }\n\n        // to get fills right - repeat what we did at the start\n        if(lastFarPt) updateEdge([lastXEdge || lastFarPt[0], lastYEdge || lastFarPt[1]]);\n\n        segments.push(pts.slice(0, pti));\n    }\n\n    return segments;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"./constants\":1079}],1089:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\n// common to 'scatter' and 'scatterternary'\nmodule.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) {\n    var shape = coerce('line.shape');\n    if(shape === 'spline') coerce('line.smoothing');\n};\n\n},{}],1090:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar LINKEDFILLS = {tonextx: 1, tonexty: 1, tonext: 1};\n\nmodule.exports = function linkTraces(gd, plotinfo, cdscatter) {\n    var trace, i, group, prevtrace, groupIndex;\n\n    // first sort traces to keep stacks & filled-together groups together\n    var groupIndices = {};\n    var needsSort = false;\n    var prevGroupIndex = -1;\n    var nextGroupIndex = 0;\n    var prevUnstackedGroupIndex = -1;\n    for(i = 0; i < cdscatter.length; i++) {\n        trace = cdscatter[i][0].trace;\n        group = trace.stackgroup || '';\n        if(group) {\n            if(group in groupIndices) {\n                groupIndex = groupIndices[group];\n            } else {\n                groupIndex = groupIndices[group] = nextGroupIndex;\n                nextGroupIndex++;\n            }\n        } else if(trace.fill in LINKEDFILLS && prevUnstackedGroupIndex >= 0) {\n            groupIndex = prevUnstackedGroupIndex;\n        } else {\n            groupIndex = prevUnstackedGroupIndex = nextGroupIndex;\n            nextGroupIndex++;\n        }\n\n        if(groupIndex < prevGroupIndex) needsSort = true;\n        trace._groupIndex = prevGroupIndex = groupIndex;\n    }\n\n    var cdscatterSorted = cdscatter.slice();\n    if(needsSort) {\n        cdscatterSorted.sort(function(a, b) {\n            var traceA = a[0].trace;\n            var traceB = b[0].trace;\n            return (traceA._groupIndex - traceB._groupIndex) ||\n                (traceA.index - traceB.index);\n        });\n    }\n\n    // now link traces to each other\n    var prevtraces = {};\n    for(i = 0; i < cdscatterSorted.length; i++) {\n        trace = cdscatterSorted[i][0].trace;\n        group = trace.stackgroup || '';\n\n        // Note: The check which ensures all cdscatter here are for the same axis and\n        // are either cartesian or scatterternary has been removed. This code assumes\n        // the passed scattertraces have been filtered to the proper plot types and\n        // the proper subplots.\n        if(trace.visible === true) {\n            trace._nexttrace = null;\n\n            if(trace.fill in LINKEDFILLS) {\n                prevtrace = prevtraces[group];\n                trace._prevtrace = prevtrace || null;\n\n                if(prevtrace) {\n                    prevtrace._nexttrace = trace;\n                }\n            }\n\n            trace._ownfill = (trace.fill && (\n                trace.fill.substr(0, 6) === 'tozero' ||\n                trace.fill === 'toself' ||\n                (trace.fill.substr(0, 2) === 'to' && !trace._prevtrace)\n            ));\n\n            prevtraces[group] = trace;\n        } else {\n            trace._prevtrace = trace._nexttrace = trace._ownfill = null;\n        }\n    }\n\n    return cdscatterSorted;\n};\n\n},{}],1091:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\n\n// used in the drawing step for 'scatter' and 'scattegeo' and\n// in the convert step for 'scatter3d'\nmodule.exports = function makeBubbleSizeFn(trace) {\n    var marker = trace.marker;\n    var sizeRef = marker.sizeref || 1;\n    var sizeMin = marker.sizemin || 0;\n\n    // for bubble charts, allow scaling the provided value linearly\n    // and by area or diameter.\n    // Note this only applies to the array-value sizes\n\n    var baseFn = (marker.sizemode === 'area') ?\n        function(v) { return Math.sqrt(v / sizeRef); } :\n        function(v) { return v / sizeRef; };\n\n    // TODO add support for position/negative bubbles?\n    // TODO add 'sizeoffset' attribute?\n    return function(v) {\n        var baseSize = baseFn(v / 2);\n\n        // don't show non-numeric and negative sizes\n        return (isNumeric(baseSize) && (baseSize > 0)) ?\n            Math.max(baseSize, sizeMin) :\n            0;\n    };\n};\n\n},{\"fast-isnumeric\":224}],1092:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nmodule.exports = {\n    container: 'marker',\n    min: 'cmin',\n    max: 'cmax'\n};\n\n},{}],1093:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\n\nvar subTypes = _dereq_('./subtypes');\n\n/*\n * opts: object of flags to control features not all marker users support\n *   noLine: caller does not support marker lines\n *   gradient: caller supports gradients\n *   noSelect: caller does not support selected/unselected attribute containers\n */\nmodule.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce, opts) {\n    var isBubble = subTypes.isBubble(traceIn);\n    var lineColor = (traceIn.line || {}).color;\n    var defaultMLC;\n\n    opts = opts || {};\n\n    // marker.color inherit from line.color (even if line.color is an array)\n    if(lineColor) defaultColor = lineColor;\n\n    coerce('marker.symbol');\n    coerce('marker.opacity', isBubble ? 0.7 : 1);\n    coerce('marker.size');\n\n    coerce('marker.color', defaultColor);\n    if(hasColorscale(traceIn, 'marker')) {\n        colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'});\n    }\n\n    if(!opts.noSelect) {\n        coerce('selected.marker.color');\n        coerce('unselected.marker.color');\n        coerce('selected.marker.size');\n        coerce('unselected.marker.size');\n    }\n\n    if(!opts.noLine) {\n        // if there's a line with a different color than the marker, use\n        // that line color as the default marker line color\n        // (except when it's an array)\n        // mostly this is for transparent markers to behave nicely\n        if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) {\n            defaultMLC = lineColor;\n        } else if(isBubble) defaultMLC = Color.background;\n        else defaultMLC = Color.defaultLine;\n\n        coerce('marker.line.color', defaultMLC);\n        if(hasColorscale(traceIn, 'marker.line')) {\n            colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'});\n        }\n\n        coerce('marker.line.width', isBubble ? 1 : 0);\n    }\n\n    if(isBubble) {\n        coerce('marker.sizeref');\n        coerce('marker.sizemin');\n        coerce('marker.sizemode');\n    }\n\n    if(opts.gradient) {\n        var gradientType = coerce('marker.gradient.type');\n        if(gradientType !== 'none') {\n            coerce('marker.gradient.color');\n        }\n    }\n};\n\n},{\"../../components/color\":580,\"../../components/colorscale/defaults\":590,\"../../components/colorscale/helpers\":591,\"./subtypes\":1098}],1094:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar ensureSingle = Lib.ensureSingle;\nvar identity = Lib.identity;\nvar Drawing = _dereq_('../../components/drawing');\n\nvar subTypes = _dereq_('./subtypes');\nvar linePoints = _dereq_('./line_points');\nvar linkTraces = _dereq_('./link_traces');\nvar polygonTester = _dereq_('../../lib/polygon').tester;\n\nmodule.exports = function plot(gd, plotinfo, cdscatter, scatterLayer, transitionOpts, makeOnCompleteCallback) {\n    var join, onComplete;\n\n    // If transition config is provided, then it is only a partial replot and traces not\n    // updated are removed.\n    var isFullReplot = !transitionOpts;\n    var hasTransition = !!transitionOpts && transitionOpts.duration > 0;\n\n    // Link traces so the z-order of fill layers is correct\n    var cdscatterSorted = linkTraces(gd, plotinfo, cdscatter);\n\n    join = scatterLayer.selectAll('g.trace')\n        .data(cdscatterSorted, function(d) { return d[0].trace.uid; });\n\n    // Append new traces:\n    join.enter().append('g')\n        .attr('class', function(d) {\n            return 'trace scatter trace' + d[0].trace.uid;\n        })\n        .style('stroke-miterlimit', 2);\n    join.order();\n\n    createFills(gd, join, plotinfo);\n\n    if(hasTransition) {\n        if(makeOnCompleteCallback) {\n            // If it was passed a callback to register completion, make a callback. If\n            // this is created, then it must be executed on completion, otherwise the\n            // pos-transition redraw will not execute:\n            onComplete = makeOnCompleteCallback();\n        }\n\n        var transition = d3.transition()\n            .duration(transitionOpts.duration)\n            .ease(transitionOpts.easing)\n            .each('end', function() {\n                onComplete && onComplete();\n            })\n            .each('interrupt', function() {\n                onComplete && onComplete();\n            });\n\n        transition.each(function() {\n            // Must run the selection again since otherwise enters/updates get grouped together\n            // and these get executed out of order. Except we need them in order!\n            scatterLayer.selectAll('g.trace').each(function(d, i) {\n                plotOne(gd, i, plotinfo, d, cdscatterSorted, this, transitionOpts);\n            });\n        });\n    } else {\n        join.each(function(d, i) {\n            plotOne(gd, i, plotinfo, d, cdscatterSorted, this, transitionOpts);\n        });\n    }\n\n    if(isFullReplot) {\n        join.exit().remove();\n    }\n\n    // remove paths that didn't get used\n    scatterLayer.selectAll('path:not([d])').remove();\n};\n\nfunction createFills(gd, traceJoin, plotinfo) {\n    traceJoin.each(function(d) {\n        var fills = ensureSingle(d3.select(this), 'g', 'fills');\n        Drawing.setClipUrl(fills, plotinfo.layerClipId, gd);\n\n        var trace = d[0].trace;\n\n        var fillData = [];\n        if(trace._ownfill) fillData.push('_ownFill');\n        if(trace._nexttrace) fillData.push('_nextFill');\n\n        var fillJoin = fills.selectAll('g').data(fillData, identity);\n\n        fillJoin.enter().append('g');\n\n        fillJoin.exit()\n            .each(function(d) { trace[d] = null; })\n            .remove();\n\n        fillJoin.order().each(function(d) {\n            // make a path element inside the fill group, just so\n            // we can give it its own data later on and the group can\n            // keep its simple '_*Fill' data\n            trace[d] = ensureSingle(d3.select(this), 'path', 'js-fill');\n        });\n    });\n}\n\nfunction plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transitionOpts) {\n    var i;\n\n    // Since this has been reorganized and we're executing this on individual traces,\n    // we need to pass it the full list of cdscatter as well as this trace's index (idx)\n    // since it does an internal n^2 loop over comparisons with other traces:\n    selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll);\n\n    var hasTransition = !!transitionOpts && transitionOpts.duration > 0;\n\n    function transition(selection) {\n        return hasTransition ? selection.transition() : selection;\n    }\n\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    var trace = cdscatter[0].trace;\n    var line = trace.line;\n    var tr = d3.select(element);\n\n    var errorBarGroup = ensureSingle(tr, 'g', 'errorbars');\n    var lines = ensureSingle(tr, 'g', 'lines');\n    var points = ensureSingle(tr, 'g', 'points');\n    var text = ensureSingle(tr, 'g', 'text');\n\n    // error bars are at the bottom\n    Registry.getComponentMethod('errorbars', 'plot')(gd, errorBarGroup, plotinfo, transitionOpts);\n\n    if(trace.visible !== true) return;\n\n    transition(tr).style('opacity', trace.opacity);\n\n    // BUILD LINES AND FILLS\n    var ownFillEl3, tonext;\n    var ownFillDir = trace.fill.charAt(trace.fill.length - 1);\n    if(ownFillDir !== 'x' && ownFillDir !== 'y') ownFillDir = '';\n\n    // store node for tweaking by selectPoints\n    if(!plotinfo.isRangePlot) cdscatter[0].node3 = tr;\n\n    var prevRevpath = '';\n    var prevPolygons = [];\n    var prevtrace = trace._prevtrace;\n\n    if(prevtrace) {\n        prevRevpath = prevtrace._prevRevpath || '';\n        tonext = prevtrace._nextFill;\n        prevPolygons = prevtrace._polygons;\n    }\n\n    var thispath;\n    var thisrevpath;\n    // fullpath is all paths for this curve, joined together straight\n    // across gaps, for filling\n    var fullpath = '';\n    // revpath is fullpath reversed, for fill-to-next\n    var revpath = '';\n    // functions for converting a point array to a path\n    var pathfn, revpathbase, revpathfn;\n    // variables used before and after the data join\n    var pt0, lastSegment, pt1, thisPolygons;\n\n    // initialize line join data / method\n    var segments = [];\n    var makeUpdate = Lib.noop;\n\n    ownFillEl3 = trace._ownFill;\n\n    if(subTypes.hasLines(trace) || trace.fill !== 'none') {\n        if(tonext) {\n            // This tells .style which trace to use for fill information:\n            tonext.datum(cdscatter);\n        }\n\n        if(['hv', 'vh', 'hvh', 'vhv'].indexOf(line.shape) !== -1) {\n            pathfn = Drawing.steps(line.shape);\n            revpathbase = Drawing.steps(\n                line.shape.split('').reverse().join('')\n            );\n        } else if(line.shape === 'spline') {\n            pathfn = revpathbase = function(pts) {\n                var pLast = pts[pts.length - 1];\n                if(pts.length > 1 && pts[0][0] === pLast[0] && pts[0][1] === pLast[1]) {\n                    // identical start and end points: treat it as a\n                    // closed curve so we don't get a kink\n                    return Drawing.smoothclosed(pts.slice(1), line.smoothing);\n                } else {\n                    return Drawing.smoothopen(pts, line.smoothing);\n                }\n            };\n        } else {\n            pathfn = revpathbase = function(pts) {\n                return 'M' + pts.join('L');\n            };\n        }\n\n        revpathfn = function(pts) {\n            // note: this is destructive (reverses pts in place) so can't use pts after this\n            return revpathbase(pts.reverse());\n        };\n\n        segments = linePoints(cdscatter, {\n            xaxis: xa,\n            yaxis: ya,\n            connectGaps: trace.connectgaps,\n            baseTolerance: Math.max(line.width || 1, 3) / 4,\n            shape: line.shape,\n            simplify: line.simplify,\n            fill: trace.fill\n        });\n\n        // since we already have the pixel segments here, use them to make\n        // polygons for hover on fill\n        // TODO: can we skip this if hoveron!=fills? That would mean we\n        // need to redraw when you change hoveron...\n        thisPolygons = trace._polygons = new Array(segments.length);\n        for(i = 0; i < segments.length; i++) {\n            trace._polygons[i] = polygonTester(segments[i]);\n        }\n\n        if(segments.length) {\n            pt0 = segments[0][0];\n            lastSegment = segments[segments.length - 1];\n            pt1 = lastSegment[lastSegment.length - 1];\n        }\n\n        makeUpdate = function(isEnter) {\n            return function(pts) {\n                thispath = pathfn(pts);\n                thisrevpath = revpathfn(pts);\n                if(!fullpath) {\n                    fullpath = thispath;\n                    revpath = thisrevpath;\n                } else if(ownFillDir) {\n                    fullpath += 'L' + thispath.substr(1);\n                    revpath = thisrevpath + ('L' + revpath.substr(1));\n                } else {\n                    fullpath += 'Z' + thispath;\n                    revpath = thisrevpath + 'Z' + revpath;\n                }\n\n                if(subTypes.hasLines(trace) && pts.length > 1) {\n                    var el = d3.select(this);\n\n                    // This makes the coloring work correctly:\n                    el.datum(cdscatter);\n\n                    if(isEnter) {\n                        transition(el.style('opacity', 0)\n                            .attr('d', thispath)\n                            .call(Drawing.lineGroupStyle))\n                                .style('opacity', 1);\n                    } else {\n                        var sel = transition(el);\n                        sel.attr('d', thispath);\n                        Drawing.singleLineStyle(cdscatter, sel);\n                    }\n                }\n            };\n        };\n    }\n\n    var lineJoin = lines.selectAll('.js-line').data(segments);\n\n    transition(lineJoin.exit())\n        .style('opacity', 0)\n        .remove();\n\n    lineJoin.each(makeUpdate(false));\n\n    lineJoin.enter().append('path')\n        .classed('js-line', true)\n        .style('vector-effect', 'non-scaling-stroke')\n        .call(Drawing.lineGroupStyle)\n        .each(makeUpdate(true));\n\n    Drawing.setClipUrl(lineJoin, plotinfo.layerClipId, gd);\n\n    function clearFill(selection) {\n        transition(selection).attr('d', 'M0,0Z');\n    }\n\n    if(segments.length) {\n        if(ownFillEl3) {\n            ownFillEl3.datum(cdscatter);\n            if(pt0 && pt1) {\n                if(ownFillDir) {\n                    if(ownFillDir === 'y') {\n                        pt0[1] = pt1[1] = ya.c2p(0, true);\n                    } else if(ownFillDir === 'x') {\n                        pt0[0] = pt1[0] = xa.c2p(0, true);\n                    }\n\n                    // fill to zero: full trace path, plus extension of\n                    // the endpoints to the appropriate axis\n                    // For the sake of animations, wrap the points around so that\n                    // the points on the axes are the first two points. Otherwise\n                    // animations get a little crazy if the number of points changes.\n                    transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))\n                        .call(Drawing.singleFillStyle);\n                } else {\n                    // fill to self: just join the path to itself\n                    transition(ownFillEl3).attr('d', fullpath + 'Z')\n                        .call(Drawing.singleFillStyle);\n                }\n            }\n        } else if(tonext) {\n            if(trace.fill.substr(0, 6) === 'tonext' && fullpath && prevRevpath) {\n                // fill to next: full trace path, plus the previous path reversed\n                if(trace.fill === 'tonext') {\n                    // tonext: for use by concentric shapes, like manually constructed\n                    // contours, we just add the two paths closed on themselves.\n                    // This makes strange results if one path is *not* entirely\n                    // inside the other, but then that is a strange usage.\n                    transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')\n                        .call(Drawing.singleFillStyle);\n                } else {\n                    // tonextx/y: for now just connect endpoints with lines. This is\n                    // the correct behavior if the endpoints are at the same value of\n                    // y/x, but if they *aren't*, we should ideally do more complicated\n                    // things depending on whether the new endpoint projects onto the\n                    // existing curve or off the end of it\n                    transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')\n                        .call(Drawing.singleFillStyle);\n                }\n                trace._polygons = trace._polygons.concat(prevPolygons);\n            } else {\n                clearFill(tonext);\n                trace._polygons = null;\n            }\n        }\n        trace._prevRevpath = revpath;\n        trace._prevPolygons = thisPolygons;\n    } else {\n        if(ownFillEl3) clearFill(ownFillEl3);\n        else if(tonext) clearFill(tonext);\n        trace._polygons = trace._prevRevpath = trace._prevPolygons = null;\n    }\n\n\n    function visFilter(d) {\n        return d.filter(function(v) { return !v.gap && v.vis; });\n    }\n\n    function visFilterWithGaps(d) {\n        return d.filter(function(v) { return v.vis; });\n    }\n\n    function gapFilter(d) {\n        return d.filter(function(v) { return !v.gap; });\n    }\n\n    function keyFunc(d) {\n        return d.id;\n    }\n\n    // Returns a function if the trace is keyed, otherwise returns undefined\n    function getKeyFunc(trace) {\n        if(trace.ids) {\n            return keyFunc;\n        }\n    }\n\n    function hideFilter() {\n        return false;\n    }\n\n    function makePoints(points, text, cdscatter) {\n        var join, selection, hasNode;\n\n        var trace = cdscatter[0].trace;\n        var showMarkers = subTypes.hasMarkers(trace);\n        var showText = subTypes.hasText(trace);\n\n        var keyFunc = getKeyFunc(trace);\n        var markerFilter = hideFilter;\n        var textFilter = hideFilter;\n\n        if(showMarkers || showText) {\n            var showFilter = identity;\n            // if we're stacking, \"infer zero\" gap mode gets markers in the\n            // gap points - because we've inferred a zero there - but other\n            // modes (currently \"interpolate\", later \"interrupt\" hopefully)\n            // we don't draw generated markers\n            var stackGroup = trace.stackgroup;\n            var isInferZero = stackGroup && (\n                gd._fullLayout._scatterStackOpts[xa._id + ya._id][stackGroup].stackgaps === 'infer zero');\n            if(trace.marker.maxdisplayed || trace._needsCull) {\n                showFilter = isInferZero ? visFilterWithGaps : visFilter;\n            } else if(stackGroup && !isInferZero) {\n                showFilter = gapFilter;\n            }\n\n            if(showMarkers) markerFilter = showFilter;\n            if(showText) textFilter = showFilter;\n        }\n\n        // marker points\n\n        selection = points.selectAll('path.point');\n\n        join = selection.data(markerFilter, keyFunc);\n\n        var enter = join.enter().append('path')\n            .classed('point', true);\n\n        if(hasTransition) {\n            enter\n                .call(Drawing.pointStyle, trace, gd)\n                .call(Drawing.translatePoints, xa, ya)\n                .style('opacity', 0)\n                .transition()\n                .style('opacity', 1);\n        }\n\n        join.order();\n\n        var styleFns;\n        if(showMarkers) {\n            styleFns = Drawing.makePointStyleFns(trace);\n        }\n\n        join.each(function(d) {\n            var el = d3.select(this);\n            var sel = transition(el);\n            hasNode = Drawing.translatePoint(d, sel, xa, ya);\n\n            if(hasNode) {\n                Drawing.singlePointStyle(d, sel, trace, styleFns, gd);\n\n                if(plotinfo.layerClipId) {\n                    Drawing.hideOutsideRangePoint(d, sel, xa, ya, trace.xcalendar, trace.ycalendar);\n                }\n\n                if(trace.customdata) {\n                    el.classed('plotly-customdata', d.data !== null && d.data !== undefined);\n                }\n            } else {\n                sel.remove();\n            }\n        });\n\n        if(hasTransition) {\n            join.exit().transition()\n                .style('opacity', 0)\n                .remove();\n        } else {\n            join.exit().remove();\n        }\n\n        // text points\n        selection = text.selectAll('g');\n        join = selection.data(textFilter, keyFunc);\n\n        // each text needs to go in its own 'g' in case\n        // it gets converted to mathjax\n        join.enter().append('g').classed('textpoint', true).append('text');\n\n        join.order();\n\n        join.each(function(d) {\n            var g = d3.select(this);\n            var sel = transition(g.select('text'));\n            hasNode = Drawing.translatePoint(d, sel, xa, ya);\n\n            if(hasNode) {\n                if(plotinfo.layerClipId) {\n                    Drawing.hideOutsideRangePoint(d, g, xa, ya, trace.xcalendar, trace.ycalendar);\n                }\n            } else {\n                g.remove();\n            }\n        });\n\n        join.selectAll('text')\n            .call(Drawing.textPointStyle, trace, gd)\n            .each(function(d) {\n                // This just *has* to be totally custom becuase of SVG text positioning :(\n                // It's obviously copied from translatePoint; we just can't use that\n                var x = xa.c2p(d.x);\n                var y = ya.c2p(d.y);\n\n                d3.select(this).selectAll('tspan.line').each(function() {\n                    transition(d3.select(this)).attr({x: x, y: y});\n                });\n            });\n\n        join.exit().remove();\n    }\n\n    points.datum(cdscatter);\n    text.datum(cdscatter);\n    makePoints(points, text, cdscatter);\n\n    // lastly, clip points groups of `cliponaxis !== false` traces\n    // on `plotinfo._hasClipOnAxisFalse === true` subplots\n    var hasClipOnAxisFalse = trace.cliponaxis === false;\n    var clipUrl = hasClipOnAxisFalse ? null : plotinfo.layerClipId;\n    Drawing.setClipUrl(points, clipUrl, gd);\n    Drawing.setClipUrl(text, clipUrl, gd);\n}\n\nfunction selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var xr = d3.extent(Lib.simpleMap(xa.range, xa.r2c));\n    var yr = d3.extent(Lib.simpleMap(ya.range, ya.r2c));\n\n    var trace = cdscatter[0].trace;\n    if(!subTypes.hasMarkers(trace)) return;\n    // if marker.maxdisplayed is used, select a maximum of\n    // mnum markers to show, from the set that are in the viewport\n    var mnum = trace.marker.maxdisplayed;\n\n    // TODO: remove some as we get away from the viewport?\n    if(mnum === 0) return;\n\n    var cd = cdscatter.filter(function(v) {\n        return v.x >= xr[0] && v.x <= xr[1] && v.y >= yr[0] && v.y <= yr[1];\n    });\n    var inc = Math.ceil(cd.length / mnum);\n    var tnum = 0;\n    cdscatterAll.forEach(function(cdj, j) {\n        var tracei = cdj[0].trace;\n        if(subTypes.hasMarkers(tracei) &&\n                tracei.marker.maxdisplayed > 0 && j < idx) {\n            tnum++;\n        }\n    });\n\n    // if multiple traces use maxdisplayed, stagger which markers we\n    // display this formula offsets successive traces by 1/3 of the\n    // increment, adding an extra small amount after each triplet so\n    // it's not quite periodic\n    var i0 = Math.round(tnum * inc / 3 + Math.floor(tnum / 3) * inc / 7.1);\n\n    // for error bars: save in cd which markers to show\n    // so we don't have to repeat this\n    cdscatter.forEach(function(v) { delete v.vis; });\n    cd.forEach(function(v, i) {\n        if(Math.round((i + i0) % inc) === 0) v.vis = true;\n    });\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/polygon\":715,\"../../registry\":831,\"./line_points\":1088,\"./link_traces\":1090,\"./subtypes\":1098,\"d3\":157}],1095:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar subtypes = _dereq_('./subtypes');\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n    var trace = cd[0].trace;\n    var i;\n    var di;\n    var x;\n    var y;\n\n    var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));\n    if(hasOnlyLines) return [];\n\n    if(selectionTester === false) { // clear selection\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            di = cd[i];\n            x = xa.c2p(di.x);\n            y = ya.c2p(di.y);\n\n            if((di.i !== null) && selectionTester.contains([x, y], false, i, searchInfo)) {\n                selection.push({\n                    pointNumber: di.i,\n                    x: xa.c2d(di.x),\n                    y: ya.c2d(di.y)\n                });\n                di.selected = 1;\n            } else {\n                di.selected = 0;\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{\"./subtypes\":1098}],1096:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar perStackAttrs = ['orientation', 'groupnorm', 'stackgaps'];\n\nmodule.exports = function handleStackDefaults(traceIn, traceOut, layout, coerce) {\n    var stackOpts = layout._scatterStackOpts;\n\n    var stackGroup = coerce('stackgroup');\n    if(stackGroup) {\n        // use independent stacking options per subplot\n        var subplot = traceOut.xaxis + traceOut.yaxis;\n        var subplotStackOpts = stackOpts[subplot];\n        if(!subplotStackOpts) subplotStackOpts = stackOpts[subplot] = {};\n\n        var groupOpts = subplotStackOpts[stackGroup];\n        var firstTrace = false;\n        if(groupOpts) {\n            groupOpts.traces.push(traceOut);\n        } else {\n            groupOpts = subplotStackOpts[stackGroup] = {\n                // keep track of trace indices for use during stacking calculations\n                // this will be filled in during `calc` and used during `crossTraceCalc`\n                // so it's OK if we don't recreate it during a non-calc edit\n                traceIndices: [],\n                // Hold on to the whole set of prior traces\n                // First one is most important, so we can clear defaults\n                // there if we find explicit values only in later traces.\n                // We're only going to *use* the values stored in groupOpts,\n                // but for the editor and validate we want things self-consistent\n                // The full set of traces is used only to fix `fill` default if\n                // we find `orientation: 'h'` beyond the first trace\n                traces: [traceOut]\n            };\n            firstTrace = true;\n        }\n        // TODO: how is this going to work with groupby transforms?\n        // in principle it should be OK I guess, as long as explicit group styles\n        // don't override explicit base-trace styles?\n\n        var dflts = {\n            orientation: (traceOut.x && !traceOut.y) ? 'h' : 'v'\n        };\n\n        for(var i = 0; i < perStackAttrs.length; i++) {\n            var attr = perStackAttrs[i];\n            var attrFound = attr + 'Found';\n            if(!groupOpts[attrFound]) {\n                var traceHasAttr = traceIn[attr] !== undefined;\n                var isOrientation = attr === 'orientation';\n                if(traceHasAttr || firstTrace) {\n                    groupOpts[attr] = coerce(attr, dflts[attr]);\n\n                    if(isOrientation) {\n                        groupOpts.fillDflt = groupOpts[attr] === 'h' ?\n                            'tonextx' : 'tonexty';\n                    }\n\n                    if(traceHasAttr) {\n                        // Note: this will show a value here even if it's invalid\n                        // in which case it will revert to default.\n                        groupOpts[attrFound] = true;\n\n                        // Note: only one trace in the stack will get a _fullData\n                        // entry for a given stack-wide attribute. If no traces\n                        // (or the first trace) specify that attribute, the\n                        // first trace will get it. If the first trace does NOT\n                        // specify it but some later trace does, then it gets\n                        // removed from the first trace and only included in the\n                        // one that specified it. This is mostly important for\n                        // editors (that want to see the full values to know\n                        // what settings are available) and Plotly.react diffing.\n                        // Editors may want to use fullLayout._scatterStackOpts\n                        // directly and make these settings available from all\n                        // traces in the stack... then set the new value into\n                        // the first trace, and clear all later traces.\n                        if(!firstTrace) {\n                            delete groupOpts.traces[0][attr];\n\n                            // orientation can affect default fill of previous traces\n                            if(isOrientation) {\n                                for(var j = 0; j < groupOpts.traces.length - 1; j++) {\n                                    var trace2 = groupOpts.traces[j];\n                                    if(trace2._input.fill !== trace2.fill) {\n                                        trace2.fill = groupOpts.fillDflt;\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        return groupOpts;\n    }\n};\n\n},{}],1097:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Drawing = _dereq_('../../components/drawing');\nvar Registry = _dereq_('../../registry');\n\nfunction style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.trace.scatter');\n\n    s.style('opacity', function(d) {\n        return d[0].trace.opacity;\n    });\n\n    s.selectAll('g.points').each(function(d) {\n        var sel = d3.select(this);\n        var trace = d.trace || d[0].trace;\n        stylePoints(sel, trace, gd);\n    });\n\n    s.selectAll('g.text').each(function(d) {\n        var sel = d3.select(this);\n        var trace = d.trace || d[0].trace;\n        styleText(sel, trace, gd);\n    });\n\n    s.selectAll('g.trace path.js-line')\n        .call(Drawing.lineGroupStyle);\n\n    s.selectAll('g.trace path.js-fill')\n        .call(Drawing.fillGroupStyle);\n\n    Registry.getComponentMethod('errorbars', 'style')(s);\n}\n\nfunction stylePoints(sel, trace, gd) {\n    Drawing.pointStyle(sel.selectAll('path.point'), trace, gd);\n}\n\nfunction styleText(sel, trace, gd) {\n    Drawing.textPointStyle(sel.selectAll('text'), trace, gd);\n}\n\nfunction styleOnSelect(gd, cd) {\n    var s = cd[0].node3;\n    var trace = cd[0].trace;\n\n    if(trace.selectedpoints) {\n        Drawing.selectedPointStyle(s.selectAll('path.point'), trace);\n        Drawing.selectedTextStyle(s.selectAll('text'), trace);\n    } else {\n        stylePoints(s, trace, gd);\n        styleText(s, trace, gd);\n    }\n}\n\nmodule.exports = {\n    style: style,\n    stylePoints: stylePoints,\n    styleText: styleText,\n    styleOnSelect: styleOnSelect\n};\n\n},{\"../../components/drawing\":601,\"../../registry\":831,\"d3\":157}],1098:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nmodule.exports = {\n    hasLines: function(trace) {\n        return trace.visible && trace.mode &&\n            trace.mode.indexOf('lines') !== -1;\n    },\n\n    hasMarkers: function(trace) {\n        return trace.visible && (\n            (trace.mode && trace.mode.indexOf('markers') !== -1) ||\n            // until splom implements 'mode'\n            trace.type === 'splom'\n        );\n    },\n\n    hasText: function(trace) {\n        return trace.visible && trace.mode &&\n            trace.mode.indexOf('text') !== -1;\n    },\n\n    isBubble: function(trace) {\n        return Lib.isPlainObject(trace.marker) &&\n            Lib.isArrayOrTypedArray(trace.marker.size);\n    }\n};\n\n},{\"../../lib\":703}],1099:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n/*\n * opts: object of flags to control features not all text users support\n *   noSelect: caller does not support selected/unselected attribute containers\n */\nmodule.exports = function(traceIn, traceOut, layout, coerce, opts) {\n    opts = opts || {};\n\n    coerce('textposition');\n    Lib.coerceFont(coerce, 'textfont', layout.font);\n\n    if(!opts.noSelect) {\n        coerce('selected.textfont.color');\n        coerce('unselected.textfont.color');\n    }\n};\n\n},{\"../../lib\":703}],1100:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nmodule.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {\n    var x = coerce('x');\n    var y = coerce('y');\n    var len;\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);\n\n    if(x) {\n        var xlen = Lib.minRowLength(x);\n        if(y) {\n            len = Math.min(xlen, Lib.minRowLength(y));\n        } else {\n            len = xlen;\n            coerce('y0');\n            coerce('dy');\n        }\n    } else {\n        if(!y) return 0;\n\n        len = Lib.minRowLength(y);\n        coerce('x0');\n        coerce('dx');\n    }\n\n    traceOut._length = len;\n\n    return len;\n};\n\n},{\"../../lib\":703,\"../../registry\":831}],1101:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar colorAttributes = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\nvar DASHES = _dereq_('../../constants/gl3d_dashes');\n\nvar MARKER_SYMBOLS = _dereq_('../../constants/gl3d_markers');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar scatterLineAttrs = scatterAttrs.line;\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nvar lineAttrs = extendFlat({\n    width: scatterLineAttrs.width,\n    dash: {\n        valType: 'enumerated',\n        values: Object.keys(DASHES),\n        dflt: 'solid',\n        \n        \n    }\n}, colorAttributes('line'));\n\nfunction makeProjectionAttr(axLetter) {\n    return {\n        show: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        opacity: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n        },\n        scale: {\n            valType: 'number',\n            \n            min: 0,\n            max: 10,\n            dflt: 2 / 3,\n            \n        }\n    };\n}\n\nvar attrs = module.exports = overrideAll({\n    x: scatterAttrs.x,\n    y: scatterAttrs.y,\n    z: {\n        valType: 'data_array',\n        \n    },\n\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n    hovertemplate: hovertemplateAttrs(),\n\n    mode: extendFlat({}, scatterAttrs.mode,  // shouldn't this be on-par with 2D?\n        {dflt: 'lines+markers'}),\n    surfaceaxis: {\n        valType: 'enumerated',\n        \n        values: [-1, 0, 1, 2],\n        dflt: -1,\n        \n    },\n    surfacecolor: {\n        valType: 'color',\n        \n        \n    },\n    projection: {\n        x: makeProjectionAttr('x'),\n        y: makeProjectionAttr('y'),\n        z: makeProjectionAttr('z')\n    },\n\n    connectgaps: scatterAttrs.connectgaps,\n    line: lineAttrs,\n\n    marker: extendFlat({  // Parity with scatter.js?\n        symbol: {\n            valType: 'enumerated',\n            values: Object.keys(MARKER_SYMBOLS),\n            \n            dflt: 'circle',\n            arrayOk: true,\n            \n        },\n        size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),\n        sizeref: scatterMarkerAttrs.sizeref,\n        sizemin: scatterMarkerAttrs.sizemin,\n        sizemode: scatterMarkerAttrs.sizemode,\n        opacity: extendFlat({}, scatterMarkerAttrs.opacity, {\n            arrayOk: false,\n            \n        }),\n        colorbar: scatterMarkerAttrs.colorbar,\n\n        line: extendFlat({\n            width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})\n        },\n            colorAttributes('marker.line')\n        )\n    },\n        colorAttributes('marker')\n    ),\n\n    textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),\n    textfont: {\n        color: scatterAttrs.textfont.color,\n        size: scatterAttrs.textfont.size,\n        family: extendFlat({}, scatterAttrs.textfont.family, {arrayOk: false})\n    },\n\n    hoverinfo: extendFlat({}, baseAttrs.hoverinfo)\n}, 'calc', 'nested');\n\nattrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../constants/gl3d_dashes\":677,\"../../constants/gl3d_markers\":678,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../scatter/attributes\":1075}],1102:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\n\n/**\n * This is a kludge to put the array attributes into\n * calcdata the way Scatter.plot does, so that legends and\n * popovers know what to do with them.\n */\nmodule.exports = function calc(gd, trace) {\n    var cd = [{x: false, y: false, trace: trace, t: {}}];\n\n    arraysToCalcdata(cd, trace);\n    calcColorscale(gd, trace);\n\n    return cd;\n};\n\n},{\"../scatter/arrays_to_calcdata\":1074,\"../scatter/colorscale_calc\":1078}],1103:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\n\nfunction calculateAxisErrors(data, params, scaleFactor, axis) {\n    if(!params || !params.visible) return null;\n\n    var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);\n    var result = new Array(data.length);\n\n    for(var i = 0; i < data.length; i++) {\n        var errors = computeError(+data[i], i);\n\n        if(axis.type === 'log') {\n            var point = axis.c2l(data[i]);\n            var min = data[i] - errors[0];\n            var max = data[i] + errors[1];\n\n            result[i] = [\n                (axis.c2l(min, true) - point) * scaleFactor,\n                (axis.c2l(max, true) - point) * scaleFactor\n            ];\n\n            // Keep track of the lower error bound which isn't negative!\n            if(min > 0) {\n                var lower = axis.c2l(min);\n                if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;\n                axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);\n            }\n        } else {\n            result[i] = [\n                -errors[0] * scaleFactor,\n                errors[1] * scaleFactor\n            ];\n        }\n    }\n\n    return result;\n}\n\nfunction dataLength(array) {\n    for(var i = 0; i < array.length; i++) {\n        if(array[i]) return array[i].length;\n    }\n    return 0;\n}\n\nfunction calculateErrors(data, scaleFactor, sceneLayout) {\n    var errors = [\n        calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),\n        calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),\n        calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)\n    ];\n\n    var n = dataLength(errors);\n    if(n === 0) return null;\n\n    var errorBounds = new Array(n);\n\n    for(var i = 0; i < n; i++) {\n        var bound = [[0, 0, 0], [0, 0, 0]];\n\n        for(var j = 0; j < 3; j++) {\n            if(errors[j]) {\n                for(var k = 0; k < 2; k++) {\n                    bound[k][j] = errors[j][i][k];\n                }\n            }\n        }\n\n        errorBounds[i] = bound;\n    }\n\n    return errorBounds;\n}\n\nmodule.exports = calculateErrors;\n\n},{\"../../registry\":831}],1104:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar createLinePlot = _dereq_('gl-line3d');\nvar createScatterPlot = _dereq_('gl-scatter3d');\nvar createErrorBars = _dereq_('gl-error3d');\nvar createMesh = _dereq_('gl-mesh3d');\nvar triangulate = _dereq_('delaunay-triangulate');\n\nvar Lib = _dereq_('../../lib');\nvar str2RgbaArray = _dereq_('../../lib/str2rgbarray');\nvar formatColor = _dereq_('../../lib/gl_format_color').formatColor;\nvar makeBubbleSizeFn = _dereq_('../scatter/make_bubble_size_func');\nvar DASH_PATTERNS = _dereq_('../../constants/gl3d_dashes');\nvar MARKER_SYMBOLS = _dereq_('../../constants/gl3d_markers');\n\nvar calculateError = _dereq_('./calc_errors');\n\nfunction LineWithMarkers(scene, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.linePlot = null;\n    this.scatterPlot = null;\n    this.errorBars = null;\n    this.textMarkers = null;\n    this.delaunayMesh = null;\n    this.color = null;\n    this.mode = '';\n    this.dataPoints = [];\n    this.axesBounds = [\n        [-Infinity, -Infinity, -Infinity],\n        [Infinity, Infinity, Infinity]\n    ];\n    this.textLabels = null;\n    this.data = null;\n}\n\nvar proto = LineWithMarkers.prototype;\n\nproto.handlePick = function(selection) {\n    if(selection.object &&\n        (selection.object === this.linePlot ||\n         selection.object === this.delaunayMesh ||\n         selection.object === this.textMarkers ||\n         selection.object === this.scatterPlot)\n    ) {\n        var ind = selection.index = selection.data.index;\n\n        if(selection.object.highlight) {\n            selection.object.highlight(null);\n        }\n        if(this.scatterPlot) {\n            selection.object = this.scatterPlot;\n            this.scatterPlot.highlight(selection.data);\n        }\n\n        selection.textLabel = '';\n        if(this.textLabels) {\n            if(Array.isArray(this.textLabels)) {\n                if(this.textLabels[ind] || this.textLabels[ind] === 0) {\n                    selection.textLabel = this.textLabels[ind];\n                }\n            } else {\n                selection.textLabel = this.textLabels;\n            }\n        }\n\n        selection.traceCoordinate = [\n            this.data.x[ind],\n            this.data.y[ind],\n            this.data.z[ind]\n        ];\n\n        return true;\n    }\n};\n\nfunction constructDelaunay(points, color, axis) {\n    var u = (axis + 1) % 3;\n    var v = (axis + 2) % 3;\n    var filteredPoints = [];\n    var filteredIds = [];\n    var i;\n\n    for(i = 0; i < points.length; ++i) {\n        var p = points[i];\n        if(isNaN(p[u]) || !isFinite(p[u]) ||\n           isNaN(p[v]) || !isFinite(p[v])) {\n            continue;\n        }\n        filteredPoints.push([p[u], p[v]]);\n        filteredIds.push(i);\n    }\n    var cells = triangulate(filteredPoints);\n    for(i = 0; i < cells.length; ++i) {\n        var c = cells[i];\n        for(var j = 0; j < c.length; ++j) {\n            c[j] = filteredIds[c[j]];\n        }\n    }\n    return {\n        positions: points,\n        cells: cells,\n        meshColor: color\n    };\n}\n\nfunction calculateErrorParams(errors) {\n    var capSize = [0.0, 0.0, 0.0];\n    var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];\n    var lineWidth = [1.0, 1.0, 1.0];\n\n    for(var i = 0; i < 3; i++) {\n        var e = errors[i];\n\n        if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];\n        if(!e || !e.visible) continue;\n\n        capSize[i] = e.width / 2;  // ballpark rescaling\n        color[i] = str2RgbaArray(e.color);\n        lineWidth[i] = e.thickness;\n    }\n\n    return {capSize: capSize, color: color, lineWidth: lineWidth};\n}\n\nfunction parseAlignmentX(a) {\n    if(a === null || a === undefined) return 0;\n\n    return (a.indexOf('left') > -1) ? -1 :\n           (a.indexOf('right') > -1) ? 1 : 0;\n}\n\nfunction parseAlignmentY(a) {\n    if(a === null || a === undefined) return 0;\n\n    return (a.indexOf('top') > -1) ? -1 :\n           (a.indexOf('bottom') > -1) ? 1 : 0;\n}\n\nfunction calculateTextOffset(tp) {\n    // Read out text properties\n\n    var defaultAlignmentX = 0;\n    var defaultAlignmentY = 0;\n\n    var textOffset = [\n        defaultAlignmentX,\n        defaultAlignmentY\n    ];\n\n    if(Array.isArray(tp)) {\n        for(var i = 0; i < tp.length; i++) {\n            textOffset[i] = [\n                defaultAlignmentX,\n                defaultAlignmentY\n            ];\n            if(tp[i]) {\n                textOffset[i][0] = parseAlignmentX(tp[i]);\n                textOffset[i][1] = parseAlignmentY(tp[i]);\n            }\n        }\n    } else {\n        textOffset[0] = parseAlignmentX(tp);\n        textOffset[1] = parseAlignmentY(tp);\n    }\n\n    return textOffset;\n}\n\n\nfunction calculateSize(sizeIn, sizeFn) {\n    // rough parity with Plotly 2D markers\n    return sizeFn(sizeIn * 4);\n}\n\nfunction calculateSymbol(symbolIn) {\n    return MARKER_SYMBOLS[symbolIn];\n}\n\nfunction formatParam(paramIn, len, calculate, dflt, extraFn) {\n    var paramOut = null;\n\n    if(Lib.isArrayOrTypedArray(paramIn)) {\n        paramOut = [];\n\n        for(var i = 0; i < len; i++) {\n            if(paramIn[i] === undefined) paramOut[i] = dflt;\n            else paramOut[i] = calculate(paramIn[i], extraFn);\n        }\n    } else paramOut = calculate(paramIn, Lib.identity);\n\n    return paramOut;\n}\n\n\nfunction convertPlotlyOptions(scene, data) {\n    var points = [];\n    var sceneLayout = scene.fullSceneLayout;\n    var scaleFactor = scene.dataScale;\n    var xaxis = sceneLayout.xaxis;\n    var yaxis = sceneLayout.yaxis;\n    var zaxis = sceneLayout.zaxis;\n    var marker = data.marker;\n    var line = data.line;\n    var x = data.x || [];\n    var y = data.y || [];\n    var z = data.z || [];\n    var len = x.length;\n    var xcalendar = data.xcalendar;\n    var ycalendar = data.ycalendar;\n    var zcalendar = data.zcalendar;\n    var xc, yc, zc;\n    var params, i;\n    var text;\n\n    // Convert points\n    for(i = 0; i < len; i++) {\n        // sanitize numbers and apply transforms based on axes.type\n        xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];\n        yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];\n        zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];\n\n        points[i] = [xc, yc, zc];\n    }\n\n    // convert text\n    if(Array.isArray(data.text)) text = data.text;\n    else if(data.text !== undefined) {\n        text = new Array(len);\n        for(i = 0; i < len; i++) text[i] = data.text;\n    }\n\n    // Build object parameters\n    params = {\n        position: points,\n        mode: data.mode,\n        text: text\n    };\n\n    if('line' in data) {\n        params.lineColor = formatColor(line, 1, len);\n        params.lineWidth = line.width;\n        params.lineDashes = line.dash;\n    }\n\n    if('marker' in data) {\n        var sizeFn = makeBubbleSizeFn(data);\n\n        params.scatterColor = formatColor(marker, 1, len);\n        params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);\n        params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');\n        params.scatterLineWidth = marker.line.width;  // arrayOk === false\n        params.scatterLineColor = formatColor(marker.line, 1, len);\n        params.scatterAngle = 0;\n    }\n\n    if('textposition' in data) {\n        params.textOffset = calculateTextOffset(data.textposition);\n        params.textColor = formatColor(data.textfont, 1, len);\n        params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);\n        params.textFont = data.textfont.family;  // arrayOk === false\n        params.textAngle = 0;\n    }\n\n    var dims = ['x', 'y', 'z'];\n    params.project = [false, false, false];\n    params.projectScale = [1, 1, 1];\n    params.projectOpacity = [1, 1, 1];\n    for(i = 0; i < 3; ++i) {\n        var projection = data.projection[dims[i]];\n        if((params.project[i] = projection.show)) {\n            params.projectOpacity[i] = projection.opacity;\n            params.projectScale[i] = projection.scale;\n        }\n    }\n\n    params.errorBounds = calculateError(data, scaleFactor, sceneLayout);\n\n    var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);\n    params.errorColor = errorParams.color;\n    params.errorLineWidth = errorParams.lineWidth;\n    params.errorCapSize = errorParams.capSize;\n\n    params.delaunayAxis = data.surfaceaxis;\n    params.delaunayColor = str2RgbaArray(data.surfacecolor);\n\n    return params;\n}\n\nfunction arrayToColor(color) {\n    if(Array.isArray(color)) {\n        var c = color[0];\n\n        if(Array.isArray(c)) color = c;\n\n        return 'rgb(' + color.slice(0, 3).map(function(x) {\n            return Math.round(x * 255);\n        }) + ')';\n    }\n\n    return null;\n}\n\nproto.update = function(data) {\n    var gl = this.scene.glplot.gl;\n    var lineOptions;\n    var scatterOptions;\n    var errorOptions;\n    var textOptions;\n    var dashPattern = DASH_PATTERNS.solid;\n\n    // Save data\n    this.data = data;\n\n    // Run data conversion\n    var options = convertPlotlyOptions(this.scene, data);\n\n    if('mode' in options) {\n        this.mode = options.mode;\n    }\n    if('lineDashes' in options) {\n        if(options.lineDashes in DASH_PATTERNS) {\n            dashPattern = DASH_PATTERNS[options.lineDashes];\n        }\n    }\n\n    this.color = arrayToColor(options.scatterColor) ||\n                 arrayToColor(options.lineColor);\n\n    // Save data points\n    this.dataPoints = options.position;\n\n    lineOptions = {\n        gl: this.scene.glplot.gl,\n        position: options.position,\n        color: options.lineColor,\n        lineWidth: options.lineWidth || 1,\n        dashes: dashPattern[0],\n        dashScale: dashPattern[1],\n        opacity: data.opacity,\n        connectGaps: data.connectgaps\n    };\n\n    if(this.mode.indexOf('lines') !== -1) {\n        if(this.linePlot) this.linePlot.update(lineOptions);\n        else {\n            this.linePlot = createLinePlot(lineOptions);\n            this.linePlot._trace = this;\n            this.scene.glplot.add(this.linePlot);\n        }\n    } else if(this.linePlot) {\n        this.scene.glplot.remove(this.linePlot);\n        this.linePlot.dispose();\n        this.linePlot = null;\n    }\n\n    // N.B. marker.opacity must be a scalar for performance\n    var scatterOpacity = data.opacity;\n    if(data.marker && data.marker.opacity) scatterOpacity *= data.marker.opacity;\n\n    scatterOptions = {\n        gl: this.scene.glplot.gl,\n        position: options.position,\n        color: options.scatterColor,\n        size: options.scatterSize,\n        glyph: options.scatterMarker,\n        opacity: scatterOpacity,\n        orthographic: true,\n        lineWidth: options.scatterLineWidth,\n        lineColor: options.scatterLineColor,\n        project: options.project,\n        projectScale: options.projectScale,\n        projectOpacity: options.projectOpacity\n    };\n\n    if(this.mode.indexOf('markers') !== -1) {\n        if(this.scatterPlot) this.scatterPlot.update(scatterOptions);\n        else {\n            this.scatterPlot = createScatterPlot(scatterOptions);\n            this.scatterPlot._trace = this;\n            this.scatterPlot.highlightScale = 1;\n            this.scene.glplot.add(this.scatterPlot);\n        }\n    } else if(this.scatterPlot) {\n        this.scene.glplot.remove(this.scatterPlot);\n        this.scatterPlot.dispose();\n        this.scatterPlot = null;\n    }\n\n    textOptions = {\n        gl: this.scene.glplot.gl,\n        position: options.position,\n        glyph: options.text,\n        color: options.textColor,\n        size: options.textSize,\n        angle: options.textAngle,\n        alignment: options.textOffset,\n        font: options.textFont,\n        orthographic: true,\n        lineWidth: 0,\n        project: false,\n        opacity: data.opacity\n    };\n\n    this.textLabels = data.hovertext || data.text;\n\n    if(this.mode.indexOf('text') !== -1) {\n        if(this.textMarkers) this.textMarkers.update(textOptions);\n        else {\n            this.textMarkers = createScatterPlot(textOptions);\n            this.textMarkers._trace = this;\n            this.textMarkers.highlightScale = 1;\n            this.scene.glplot.add(this.textMarkers);\n        }\n    } else if(this.textMarkers) {\n        this.scene.glplot.remove(this.textMarkers);\n        this.textMarkers.dispose();\n        this.textMarkers = null;\n    }\n\n    errorOptions = {\n        gl: this.scene.glplot.gl,\n        position: options.position,\n        color: options.errorColor,\n        error: options.errorBounds,\n        lineWidth: options.errorLineWidth,\n        capSize: options.errorCapSize,\n        opacity: data.opacity\n    };\n    if(this.errorBars) {\n        if(options.errorBounds) {\n            this.errorBars.update(errorOptions);\n        } else {\n            this.scene.glplot.remove(this.errorBars);\n            this.errorBars.dispose();\n            this.errorBars = null;\n        }\n    } else if(options.errorBounds) {\n        this.errorBars = createErrorBars(errorOptions);\n        this.errorBars._trace = this;\n        this.scene.glplot.add(this.errorBars);\n    }\n\n    if(options.delaunayAxis >= 0) {\n        var delaunayOptions = constructDelaunay(\n            options.position,\n            options.delaunayColor,\n            options.delaunayAxis\n        );\n        delaunayOptions.opacity = data.opacity;\n\n        if(this.delaunayMesh) {\n            this.delaunayMesh.update(delaunayOptions);\n        } else {\n            delaunayOptions.gl = gl;\n            this.delaunayMesh = createMesh(delaunayOptions);\n            this.delaunayMesh._trace = this;\n            this.scene.glplot.add(this.delaunayMesh);\n        }\n    } else if(this.delaunayMesh) {\n        this.scene.glplot.remove(this.delaunayMesh);\n        this.delaunayMesh.dispose();\n        this.delaunayMesh = null;\n    }\n};\n\nproto.dispose = function() {\n    if(this.linePlot) {\n        this.scene.glplot.remove(this.linePlot);\n        this.linePlot.dispose();\n    }\n    if(this.scatterPlot) {\n        this.scene.glplot.remove(this.scatterPlot);\n        this.scatterPlot.dispose();\n    }\n    if(this.errorBars) {\n        this.scene.glplot.remove(this.errorBars);\n        this.errorBars.dispose();\n    }\n    if(this.textMarkers) {\n        this.scene.glplot.remove(this.textMarkers);\n        this.textMarkers.dispose();\n    }\n    if(this.delaunayMesh) {\n        this.scene.glplot.remove(this.delaunayMesh);\n        this.delaunayMesh.dispose();\n    }\n};\n\nfunction createLineWithMarkers(scene, data) {\n    var plot = new LineWithMarkers(scene, data.uid);\n    plot.update(data);\n    return plot;\n}\n\nmodule.exports = createLineWithMarkers;\n\n},{\"../../constants/gl3d_dashes\":677,\"../../constants/gl3d_markers\":678,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../lib/str2rgbarray\":726,\"../scatter/make_bubble_size_func\":1091,\"./calc_errors\":1103,\"delaunay-triangulate\":159,\"gl-error3d\":246,\"gl-line3d\":254,\"gl-mesh3d\":279,\"gl-scatter3d\":296}],1105:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\n\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n    coerce('mode');\n\n    if(subTypes.hasLines(traceOut)) {\n        coerce('connectgaps');\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce, {noSelect: true});\n    }\n\n    var lineColor = (traceOut.line || {}).color;\n    var markerColor = (traceOut.marker || {}).color;\n    if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);\n\n    var dims = ['x', 'y', 'z'];\n    for(var i = 0; i < 3; ++i) {\n        var projection = 'projection.' + dims[i];\n        if(coerce(projection + '.show')) {\n            coerce(projection + '.opacity');\n            coerce(projection + '.scale');\n        }\n    }\n\n    var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});\n};\n\nfunction handleXYZDefaults(traceIn, traceOut, coerce, layout) {\n    var len = 0;\n    var x = coerce('x');\n    var y = coerce('y');\n    var z = coerce('z');\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);\n\n    if(x && y && z) {\n        // TODO: what happens if one is missing?\n        len = Math.min(x.length, y.length, z.length);\n        traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;\n    }\n\n    return len;\n}\n\n},{\"../../lib\":703,\"../../registry\":831,\"../scatter/line_defaults\":1087,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1101}],1106:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    plot: _dereq_('./convert'),\n    attributes: _dereq_('./attributes'),\n    markerSymbols: _dereq_('../../constants/gl3d_markers'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: [\n        {\n            container: 'marker',\n            min: 'cmin',\n            max: 'cmax'\n        }, {\n            container: 'line',\n            min: 'cmin',\n            max: 'cmax'\n        }\n    ],\n    calc: _dereq_('./calc'),\n\n    moduleType: 'trace',\n    name: 'scatter3d',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d', 'symbols', 'showLegend'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../constants/gl3d_markers\":678,\"../../plots/gl3d\":791,\"./attributes\":1101,\"./calc\":1102,\"./convert\":1104,\"./defaults\":1105}],1107:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterLineAttrs = scatterAttrs.line;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nmodule.exports = {\n    carpet: {\n        valType: 'string',\n        \n        editType: 'calc',\n        \n    },\n    a: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    b: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}),\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n    line: {\n        color: scatterLineAttrs.color,\n        width: scatterLineAttrs.width,\n        dash: scatterLineAttrs.dash,\n        shape: extendFlat({}, scatterLineAttrs.shape,\n            {values: ['linear', 'spline']}),\n        smoothing: scatterLineAttrs.smoothing,\n        editType: 'calc'\n    },\n    connectgaps: scatterAttrs.connectgaps,\n    fill: extendFlat({}, scatterAttrs.fill, {\n        values: ['none', 'toself', 'tonext'],\n        dflt: 'none',\n        \n    }),\n    fillcolor: scatterAttrs.fillcolor,\n    marker: extendFlat({\n        symbol: scatterMarkerAttrs.symbol,\n        opacity: scatterMarkerAttrs.opacity,\n        maxdisplayed: scatterMarkerAttrs.maxdisplayed,\n        size: scatterMarkerAttrs.size,\n        sizeref: scatterMarkerAttrs.sizeref,\n        sizemin: scatterMarkerAttrs.sizemin,\n        sizemode: scatterMarkerAttrs.sizemode,\n        line: extendFlat({\n            width: scatterMarkerLineAttrs.width,\n            editType: 'calc'\n        },\n            colorScaleAttrs('marker.line')\n        ),\n        gradient: scatterMarkerAttrs.gradient,\n        editType: 'calc'\n    },\n        colorScaleAttrs('marker')\n    ),\n\n    textfont: scatterAttrs.textfont,\n    textposition: scatterAttrs.textposition,\n\n    selected: scatterAttrs.selected,\n    unselected: scatterAttrs.unselected,\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['a', 'b', 'text', 'name']\n    }),\n    hoveron: scatterAttrs.hoveron,\n    hovertemplate: hovertemplateAttrs()\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../scatter/attributes\":1075}],1108:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar calcMarkerSize = _dereq_('../scatter/calc').calcMarkerSize;\nvar lookupCarpet = _dereq_('../carpet/lookup_carpetid');\n\nmodule.exports = function calc(gd, trace) {\n    var carpet = trace._carpetTrace = lookupCarpet(gd, trace);\n    if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return;\n    var i;\n\n    // Transfer this over from carpet before plotting since this is a necessary\n    // condition in order for cartesian to actually plot this trace:\n    trace.xaxis = carpet.xaxis;\n    trace.yaxis = carpet.yaxis;\n\n    // make the calcdata array\n    var serieslen = trace._length;\n    var cd = new Array(serieslen);\n    var a, b;\n    var needsCull = false;\n    for(i = 0; i < serieslen; i++) {\n        a = trace.a[i];\n        b = trace.b[i];\n        if(isNumeric(a) && isNumeric(b)) {\n            var xy = carpet.ab2xy(+a, +b, true);\n            var visible = carpet.isVisible(+a, +b);\n            if(!visible) needsCull = true;\n            cd[i] = {x: xy[0], y: xy[1], a: a, b: b, vis: visible};\n        } else cd[i] = {x: false, y: false};\n    }\n\n    trace._needsCull = needsCull;\n\n    cd[0].carpet = carpet;\n    cd[0].trace = trace;\n\n    calcMarkerSize(trace, serieslen);\n    calcColorscale(gd, trace);\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\n},{\"../carpet/lookup_carpetid\":899,\"../scatter/arrays_to_calcdata\":1074,\"../scatter/calc\":1076,\"../scatter/calc_selection\":1077,\"../scatter/colorscale_calc\":1078,\"fast-isnumeric\":224}],1109:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar constants = _dereq_('../scatter/constants');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleLineShapeDefaults = _dereq_('../scatter/line_shape_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\n\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    coerce('carpet');\n\n    // XXX: Don't hard code this\n    traceOut.xaxis = 'x';\n    traceOut.yaxis = 'y';\n\n    var a = coerce('a');\n    var b = coerce('b');\n    var len = Math.min(a.length, b.length);\n\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    traceOut._length = len;\n\n    coerce('text');\n    coerce('hovertext');\n\n    var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines';\n    coerce('mode', defaultMode);\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        handleLineShapeDefaults(traceIn, traceOut, coerce);\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    var dfltHoverOn = [];\n\n    if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) {\n        coerce('marker.maxdisplayed');\n        dfltHoverOn.push('points');\n    }\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n        if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);\n    }\n\n    if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') {\n        dfltHoverOn.push('fills');\n    }\n\n    var hoverOn = coerce('hoveron', dfltHoverOn.join('+') || 'points');\n    if(hoverOn !== 'fills') coerce('hovertemplate');\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../scatter/constants\":1079,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/line_shape_defaults\":1089,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1107}],1110:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function eventData(out, pt, trace, cd, pointNumber) {\n    var cdi = cd[pointNumber];\n\n    out.a = cdi.a;\n    out.b = cdi.b;\n    out.y = cdi.y;\n\n    return out;\n};\n\n},{}],1111:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterHover = _dereq_('../scatter/hover');\nvar fillText = _dereq_('../../lib').fillText;\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var scatterPointData = scatterHover(pointData, xval, yval, hovermode);\n    if(!scatterPointData || scatterPointData[0].index === false) return;\n\n    var newPointData = scatterPointData[0];\n\n    // if hovering on a fill, we don't show any point data so the label is\n    // unchanged from what scatter gives us - except that it needs to\n    // be constrained to the trianglular plot area, not just the rectangular\n    // area defined by the synthetic x and y axes\n    // TODO: in some cases the vertical middle of the shape is not within\n    // the triangular viewport at all, so the label can become disconnected\n    // from the shape entirely. But calculating what portion of the shape\n    // is actually visible, as constrained by the diagonal axis lines, is not\n    // so easy and anyway we lost the information we would have needed to do\n    // this inside scatterHover.\n    if(newPointData.index === undefined) {\n        var yFracUp = 1 - (newPointData.y0 / pointData.ya._length);\n        var xLen = pointData.xa._length;\n        var xMin = xLen * yFracUp / 2;\n        var xMax = xLen - xMin;\n        newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin);\n        newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin);\n        return scatterPointData;\n    }\n\n    var cdi = newPointData.cd[newPointData.index];\n\n    newPointData.a = cdi.a;\n    newPointData.b = cdi.b;\n\n    newPointData.xLabelVal = undefined;\n    newPointData.yLabelVal = undefined;\n    // TODO: nice formatting, and label by axis title, for a, b, and c?\n\n    var trace = newPointData.trace;\n    var carpet = trace._carpet;\n\n    var ij = carpet.ab2ij([cdi.a, cdi.b]);\n    var i0 = Math.floor(ij[0]);\n    var ti = ij[0] - i0;\n    var j0 = Math.floor(ij[1]);\n    var tj = ij[1] - j0;\n    var xy = carpet.evalxy([], i0, j0, ti, tj);\n    newPointData.yLabel = xy[1].toFixed(3);\n\n    delete newPointData.text;\n    var text = [];\n\n    function textPart(ax, val) {\n        var prefix;\n\n        if(ax.labelprefix && ax.labelprefix.length > 0) {\n            prefix = ax.labelprefix.replace(/ = $/, '');\n        } else {\n            prefix = ax._hovertitle;\n        }\n\n        text.push(prefix + ': ' + val.toFixed(3) + ax.labelsuffix);\n    }\n\n\n    if(!trace.hovertemplate) {\n        var hoverinfo = cdi.hi || trace.hoverinfo;\n        var parts = hoverinfo.split('+');\n\n        if(parts.indexOf('all') !== -1) parts = ['a', 'b', 'text'];\n        if(parts.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a);\n        if(parts.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b);\n\n        text.push('y: ' + newPointData.yLabel);\n\n        if(parts.indexOf('text') !== -1) {\n            fillText(cdi, trace, text);\n        }\n\n        newPointData.extraText = text.join('<br>');\n    }\n\n    return scatterPointData;\n};\n\n},{\"../../lib\":703,\"../scatter/hover\":1085}],1112:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('../scatter/style').style,\n    styleOnSelect: _dereq_('../scatter/style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../scatter/select'),\n    eventData: _dereq_('./event_data'),\n\n    moduleType: 'trace',\n    name: 'scattercarpet',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['svg', 'carpet', 'symbols', 'showLegend', 'carpetDependent', 'zoomScale'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../scatter/marker_colorbar\":1092,\"../scatter/select\":1095,\"../scatter/style\":1097,\"./attributes\":1107,\"./calc\":1108,\"./defaults\":1109,\"./event_data\":1110,\"./hover\":1111,\"./plot\":1113}],1113:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar scatterPlot = _dereq_('../scatter/plot');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Drawing = _dereq_('../../components/drawing');\n\nmodule.exports = function plot(gd, plotinfoproxy, data, layer) {\n    var i, trace, node;\n\n    var carpet = data[0][0].carpet;\n    // mimic cartesian plotinfo\n    var plotinfo = {\n        xaxis: Axes.getFromId(gd, carpet.xaxis || 'x'),\n        yaxis: Axes.getFromId(gd, carpet.yaxis || 'y'),\n        plot: plotinfoproxy.plot,\n    };\n\n    scatterPlot(gd, plotinfo, data, layer);\n\n    for(i = 0; i < data.length; i++) {\n        trace = data[i][0].trace;\n\n        // Note: .select is adequate but seems to mutate the node data,\n        // which is at least a bit suprising and causes problems elsewhere\n        node = layer.selectAll('g.trace' + trace.uid + ' .js-line');\n\n        // Note: it would be more efficient if this didn't need to be applied\n        // separately to all scattercarpet traces, but that would require\n        // lots of reorganization of scatter traces that is otherwise not\n        // necessary. That makes this a potential optimization.\n        Drawing.setClipUrl(node, data[i][0].carpet._clipPathId, gd);\n    }\n};\n\n},{\"../../components/drawing\":601,\"../../plots/cartesian/axes\":751,\"../scatter/plot\":1094}],1114:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar colorAttributes = _dereq_('../../components/colorscale/attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterLineAttrs = scatterAttrs.line;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nmodule.exports = overrideAll({\n    lon: {\n        valType: 'data_array',\n        \n    },\n    lat: {\n        valType: 'data_array',\n        \n    },\n\n    locations: {\n        valType: 'data_array',\n        \n    },\n    locationmode: {\n        valType: 'enumerated',\n        values: ['ISO-3', 'USA-states', 'country names'],\n        \n        dflt: 'ISO-3',\n        \n    },\n\n    mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}),\n\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n\n    textfont: scatterAttrs.textfont,\n    textposition: scatterAttrs.textposition,\n\n    line: {\n        color: scatterLineAttrs.color,\n        width: scatterLineAttrs.width,\n        dash: dash\n    },\n    connectgaps: scatterAttrs.connectgaps,\n\n    marker: extendFlat({\n        symbol: scatterMarkerAttrs.symbol,\n        opacity: scatterMarkerAttrs.opacity,\n        size: scatterMarkerAttrs.size,\n        sizeref: scatterMarkerAttrs.sizeref,\n        sizemin: scatterMarkerAttrs.sizemin,\n        sizemode: scatterMarkerAttrs.sizemode,\n        colorbar: scatterMarkerAttrs.colorbar,\n        line: extendFlat({\n            width: scatterMarkerLineAttrs.width\n        },\n            colorAttributes('marker.line')\n        ),\n        gradient: scatterMarkerAttrs.gradient\n    },\n        colorAttributes('marker')\n    ),\n\n    fill: {\n        valType: 'enumerated',\n        values: ['none', 'toself'],\n        dflt: 'none',\n        \n        \n    },\n    fillcolor: scatterAttrs.fillcolor,\n\n    selected: scatterAttrs.selected,\n    unselected: scatterAttrs.unselected,\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['lon', 'lat', 'location', 'text', 'name']\n    }),\n    hovertemplate: hovertemplateAttrs(),\n}, 'calc', 'nested');\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/drawing/attributes\":600,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../scatter/attributes\":1075}],1115:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar calcMarkerColorscale = _dereq_('../scatter/colorscale_calc');\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\n\nvar _ = _dereq_('../../lib')._;\n\nmodule.exports = function calc(gd, trace) {\n    var hasLocationData = Array.isArray(trace.locations);\n    var len = hasLocationData ? trace.locations.length : trace._length;\n    var calcTrace = new Array(len);\n\n    for(var i = 0; i < len; i++) {\n        var calcPt = calcTrace[i] = {};\n\n        if(hasLocationData) {\n            var loc = trace.locations[i];\n            calcPt.loc = typeof loc === 'string' ? loc : null;\n        } else {\n            var lon = trace.lon[i];\n            var lat = trace.lat[i];\n\n            if(isNumeric(lon) && isNumeric(lat)) calcPt.lonlat = [+lon, +lat];\n            else calcPt.lonlat = [BADNUM, BADNUM];\n        }\n    }\n\n    arraysToCalcdata(calcTrace, trace);\n    calcMarkerColorscale(gd, trace);\n    calcSelection(calcTrace, trace);\n\n    if(len) {\n        calcTrace[0].t = {\n            labels: {\n                lat: _(gd, 'lat:') + ' ',\n                lon: _(gd, 'lon:') + ' '\n            }\n        };\n    }\n\n    return calcTrace;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../scatter/arrays_to_calcdata\":1074,\"../scatter/calc_selection\":1077,\"../scatter/colorscale_calc\":1078,\"fast-isnumeric\":224}],1116:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\n\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleLonLatLocDefaults(traceIn, traceOut, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n    coerce('mode');\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n    }\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\nfunction handleLonLatLocDefaults(traceIn, traceOut, coerce) {\n    var len = 0;\n    var locations = coerce('locations');\n\n    var lon, lat;\n\n    if(locations) {\n        coerce('locationmode');\n        len = locations.length;\n        return len;\n    }\n\n    lon = coerce('lon') || [];\n    lat = coerce('lat') || [];\n    len = Math.min(lon.length, lat.length);\n    traceOut._length = len;\n\n    return len;\n}\n\n},{\"../../lib\":703,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1114}],1117:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = function eventData(out, pt) {\n    out.lon = pt.lon;\n    out.lat = pt.lat;\n    out.location = pt.loc ? pt.loc : null;\n\n    return out;\n};\n\n},{}],1118:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Fx = _dereq_('../../components/fx');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar getTraceColor = _dereq_('../scatter/get_trace_color');\nvar fillText = _dereq_('../../lib').fillText;\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function hoverPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var geo = pointData.subplot;\n\n    var isLonLatOverEdges = geo.projection.isLonLatOverEdges;\n    var project = geo.project;\n\n    function distFn(d) {\n        var lonlat = d.lonlat;\n\n        if(lonlat[0] === BADNUM) return Infinity;\n        if(isLonLatOverEdges(lonlat)) return Infinity;\n\n        var pt = project(lonlat);\n        var px = project([xval, yval]);\n        var dx = Math.abs(pt[0] - px[0]);\n        var dy = Math.abs(pt[1] - px[1]);\n        var rad = Math.max(3, d.mrc || 0);\n\n        // N.B. d.mrc is the calculated marker radius\n        // which is only set for trace with 'markers' mode.\n\n        return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad);\n    }\n\n    Fx.getClosest(cd, distFn, pointData);\n\n    // skip the rest (for this trace) if we didn't find a close point\n    if(pointData.index === false) return;\n\n    var di = cd[pointData.index];\n    var lonlat = di.lonlat;\n    var pos = [xa.c2p(lonlat), ya.c2p(lonlat)];\n    var rad = di.mrc || 1;\n\n    pointData.x0 = pos[0] - rad;\n    pointData.x1 = pos[0] + rad;\n    pointData.y0 = pos[1] - rad;\n    pointData.y1 = pos[1] + rad;\n\n    pointData.loc = di.loc;\n    pointData.lon = lonlat[0];\n    pointData.lat = lonlat[1];\n\n    pointData.color = getTraceColor(trace, di);\n    pointData.extraText = getExtraText(trace, di, geo.mockAxis, cd[0].t.labels);\n    pointData.hovertemplate = trace.hovertemplate;\n\n    return [pointData];\n};\n\nfunction getExtraText(trace, pt, axis, labels) {\n    if(trace.hovertemplate) {\n        return;\n    }\n\n    var hoverinfo = pt.hi || trace.hoverinfo;\n\n    var parts = hoverinfo === 'all' ?\n        attributes.hoverinfo.flags :\n        hoverinfo.split('+');\n\n    var hasLocation = parts.indexOf('location') !== -1 && Array.isArray(trace.locations);\n    var hasLon = (parts.indexOf('lon') !== -1);\n    var hasLat = (parts.indexOf('lat') !== -1);\n    var hasText = (parts.indexOf('text') !== -1);\n    var text = [];\n\n    function format(val) {\n        return Axes.tickText(axis, axis.c2l(val), 'hover').text + '\\u00B0';\n    }\n\n    if(hasLocation) {\n        text.push(pt.loc);\n    } else if(hasLon && hasLat) {\n        text.push('(' + format(pt.lonlat[0]) + ', ' + format(pt.lonlat[1]) + ')');\n    } else if(hasLon) {\n        text.push(labels.lon + format(pt.lonlat[0]));\n    } else if(hasLat) {\n        text.push(labels.lat + format(pt.lonlat[1]));\n    }\n\n    if(hasText) {\n        fillText(pt, trace, text);\n    }\n\n    return text.join('<br>');\n}\n\n},{\"../../components/fx\":619,\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../scatter/get_trace_color\":1084,\"./attributes\":1114}],1119:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style'),\n    styleOnSelect: _dereq_('../scatter/style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    eventData: _dereq_('./event_data'),\n    selectPoints: _dereq_('./select'),\n\n    moduleType: 'trace',\n    name: 'scattergeo',\n    basePlotModule: _dereq_('../../plots/geo'),\n    categories: ['geo', 'symbols', 'showLegend', 'scatter-like'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/geo\":781,\"../scatter/marker_colorbar\":1092,\"../scatter/style\":1097,\"./attributes\":1114,\"./calc\":1115,\"./defaults\":1116,\"./event_data\":1117,\"./hover\":1118,\"./plot\":1120,\"./select\":1121,\"./style\":1122}],1120:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Lib = _dereq_('../../lib');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\nvar getTopojsonFeatures = _dereq_('../../lib/topojson_utils').getTopojsonFeatures;\nvar locationToFeature = _dereq_('../../lib/geo_location_utils').locationToFeature;\nvar geoJsonUtils = _dereq_('../../lib/geojson_utils');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar style = _dereq_('./style');\n\nmodule.exports = function plot(gd, geo, calcData) {\n    for(var i = 0; i < calcData.length; i++) {\n        calcGeoJSON(calcData[i], geo.topojson);\n    }\n\n    function removeBADNUM(d, node) {\n        if(d.lonlat[0] === BADNUM) {\n            d3.select(node).remove();\n        }\n    }\n\n    var scatterLayer = geo.layers.frontplot.select('.scatterlayer');\n    var gTraces = Lib.makeTraceGroups(scatterLayer, calcData, 'trace scattergeo');\n\n    // TODO find a way to order the inner nodes on update\n    gTraces.selectAll('*').remove();\n\n    gTraces.each(function(calcTrace) {\n        var s = calcTrace[0].node3 = d3.select(this);\n        var trace = calcTrace[0].trace;\n\n        if(subTypes.hasLines(trace) || trace.fill !== 'none') {\n            var lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace);\n\n            var lineData = (trace.fill !== 'none') ?\n                geoJsonUtils.makePolygon(lineCoords) :\n                geoJsonUtils.makeLine(lineCoords);\n\n            s.selectAll('path.js-line')\n                .data([{geojson: lineData, trace: trace}])\n              .enter().append('path')\n                .classed('js-line', true)\n                .style('stroke-miterlimit', 2);\n        }\n\n        if(subTypes.hasMarkers(trace)) {\n            s.selectAll('path.point')\n                .data(Lib.identity)\n             .enter().append('path')\n                .classed('point', true)\n                .each(function(calcPt) { removeBADNUM(calcPt, this); });\n        }\n\n        if(subTypes.hasText(trace)) {\n            s.selectAll('g')\n                .data(Lib.identity)\n              .enter().append('g')\n                .append('text')\n                .each(function(calcPt) { removeBADNUM(calcPt, this); });\n        }\n\n        // call style here within topojson request callback\n        style(gd, calcTrace);\n    });\n};\n\nfunction calcGeoJSON(calcTrace, topojson) {\n    var trace = calcTrace[0].trace;\n\n    if(!Array.isArray(trace.locations)) return;\n\n    var features = getTopojsonFeatures(trace, topojson);\n    var locationmode = trace.locationmode;\n\n    for(var i = 0; i < calcTrace.length; i++) {\n        var calcPt = calcTrace[i];\n        var feature = locationToFeature(locationmode, calcPt.loc, features);\n\n        calcPt.lonlat = feature ? feature.properties.ct : [BADNUM, BADNUM];\n    }\n}\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../lib/geo_location_utils\":696,\"../../lib/geojson_utils\":697,\"../../lib/topojson_utils\":730,\"../scatter/subtypes\":1098,\"./style\":1122,\"d3\":157}],1121:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar subtypes = _dereq_('../scatter/subtypes');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n    var trace = cd[0].trace;\n\n    var di, lonlat, x, y, i;\n\n    var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));\n    if(hasOnlyLines) return [];\n\n    if(selectionTester === false) {\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            di = cd[i];\n            lonlat = di.lonlat;\n\n            // some projection types can't handle BADNUMs\n            if(lonlat[0] === BADNUM) continue;\n\n            x = xa.c2p(lonlat);\n            y = ya.c2p(lonlat);\n\n            if(selectionTester.contains([x, y], null, i, searchInfo)) {\n                selection.push({\n                    pointNumber: i,\n                    lon: lonlat[0],\n                    lat: lonlat[1]\n                });\n                di.selected = 1;\n            } else {\n                di.selected = 0;\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{\"../../constants/numerical\":680,\"../scatter/subtypes\":1098}],1122:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Drawing = _dereq_('../../components/drawing');\nvar Color = _dereq_('../../components/color');\n\nvar scatterStyle = _dereq_('../scatter/style');\nvar stylePoints = scatterStyle.stylePoints;\nvar styleText = scatterStyle.styleText;\n\nmodule.exports = function style(gd, calcTrace) {\n    if(calcTrace) styleTrace(gd, calcTrace);\n};\n\nfunction styleTrace(gd, calcTrace) {\n    var trace = calcTrace[0].trace;\n    var s = calcTrace[0].node3;\n\n    s.style('opacity', calcTrace[0].trace.opacity);\n\n    stylePoints(s, trace, gd);\n    styleText(s, trace, gd);\n\n    // this part is incompatible with Drawing.lineGroupStyle\n    s.selectAll('path.js-line')\n        .style('fill', 'none')\n        .each(function(d) {\n            var path = d3.select(this);\n            var trace = d.trace;\n            var line = trace.line || {};\n\n            path.call(Color.stroke, line.color)\n                .call(Drawing.dashLine, line.dash || '', line.width || 0);\n\n            if(trace.fill !== 'none') {\n                path.call(Color.fill, trace.fillcolor);\n            }\n        });\n}\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../scatter/style\":1097,\"d3\":157}],1123:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar DASHES = _dereq_('./constants').DASHES;\n\nvar scatterLineAttrs = scatterAttrs.line;\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nvar attrs = module.exports = overrideAll({\n    x: scatterAttrs.x,\n    x0: scatterAttrs.x0,\n    dx: scatterAttrs.dx,\n    y: scatterAttrs.y,\n    y0: scatterAttrs.y0,\n    dy: scatterAttrs.dy,\n\n    text: scatterAttrs.text,\n    hovertext: scatterAttrs.hovertext,\n\n    textposition: scatterAttrs.textposition,\n    textfont: scatterAttrs.textfont,\n\n    mode: {\n        valType: 'flaglist',\n        flags: ['lines', 'markers', 'text'],\n        extras: ['none'],\n        \n        \n    },\n    line: {\n        color: scatterLineAttrs.color,\n        width: scatterLineAttrs.width,\n        shape: {\n            valType: 'enumerated',\n            values: ['linear', 'hv', 'vh', 'hvh', 'vhv'],\n            dflt: 'linear',\n            \n            editType: 'plot',\n            \n        },\n        dash: {\n            valType: 'enumerated',\n            values: Object.keys(DASHES),\n            dflt: 'solid',\n            \n            \n        }\n    },\n    marker: extendFlat({}, colorScaleAttrs('marker'), {\n        symbol: scatterMarkerAttrs.symbol,\n        size: scatterMarkerAttrs.size,\n        sizeref: scatterMarkerAttrs.sizeref,\n        sizemin: scatterMarkerAttrs.sizemin,\n        sizemode: scatterMarkerAttrs.sizemode,\n        opacity: scatterMarkerAttrs.opacity,\n        colorbar: scatterMarkerAttrs.colorbar,\n        line: extendFlat({}, colorScaleAttrs('marker.line'), {\n            width: scatterMarkerLineAttrs.width\n        })\n    }),\n    connectgaps: scatterAttrs.connectgaps,\n    fill: extendFlat({}, scatterAttrs.fill, {dflt: 'none'}),\n    fillcolor: scatterAttrs.fillcolor,\n\n    // no hoveron\n\n    selected: {\n        marker: scatterAttrs.selected.marker,\n        textfont: scatterAttrs.selected.textfont\n    },\n    unselected: {\n        marker: scatterAttrs.unselected.marker,\n        textfont: scatterAttrs.unselected.textfont\n    },\n\n    opacity: plotAttrs.opacity\n\n}, 'calc', 'nested');\n\nattrs.x.editType = attrs.y.editType = attrs.x0.editType = attrs.y0.editType = 'calc+clearAxisTypes';\nattrs.hovertemplate = scatterAttrs.hovertemplate;\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../scatter/attributes\":1075,\"./constants\":1124}],1124:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar SYMBOL_SIZE = 20;\n\nmodule.exports = {\n    TOO_MANY_POINTS: 1e5,\n\n    SYMBOL_SDF_SIZE: 200,\n    SYMBOL_SIZE: SYMBOL_SIZE,\n    SYMBOL_STROKE: SYMBOL_SIZE / 20,\n\n    DOT_RE: /-dot/,\n    OPEN_RE: /-open/,\n\n    DASHES: {\n        solid: [1],\n        dot: [1, 1],\n        dash: [4, 1],\n        longdash: [8, 1],\n        dashdot: [4, 1, 1, 1],\n        longdashdot: [8, 1, 1, 1]\n    }\n};\n\n},{}],1125:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar svgSdf = _dereq_('svg-path-sdf');\nvar rgba = _dereq_('color-normalize');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar AxisIDs = _dereq_('../../plots/cartesian/axis_ids');\n\nvar formatColor = _dereq_('../../lib/gl_format_color').formatColor;\nvar subTypes = _dereq_('../scatter/subtypes');\nvar makeBubbleSizeFn = _dereq_('../scatter/make_bubble_size_func');\n\nvar constants = _dereq_('./constants');\nvar DESELECTDIM = _dereq_('../../constants/interactions').DESELECTDIM;\n\nvar TEXTOFFSETSIGN = {\n    start: 1, left: 1, end: -1, right: -1, middle: 0, center: 0, bottom: 1, top: -1\n};\n\nfunction convertStyle(gd, trace) {\n    var i;\n\n    var opts = {\n        marker: undefined,\n        markerSel: undefined,\n        markerUnsel: undefined,\n        line: undefined,\n        fill: undefined,\n        errorX: undefined,\n        errorY: undefined,\n        text: undefined,\n        textSel: undefined,\n        textUnsel: undefined\n    };\n\n    if(trace.visible !== true) return opts;\n\n    if(subTypes.hasText(trace)) {\n        opts.text = convertTextStyle(trace);\n        opts.textSel = convertTextSelection(trace, trace.selected);\n        opts.textUnsel = convertTextSelection(trace, trace.unselected);\n    }\n\n    if(subTypes.hasMarkers(trace)) {\n        opts.marker = convertMarkerStyle(trace);\n        opts.markerSel = convertMarkerSelection(trace, trace.selected);\n        opts.markerUnsel = convertMarkerSelection(trace, trace.unselected);\n\n        if(!trace.unselected && Array.isArray(trace.marker.opacity)) {\n            var mo = trace.marker.opacity;\n            opts.markerUnsel.opacity = new Array(mo.length);\n            for(i = 0; i < mo.length; i++) {\n                opts.markerUnsel.opacity[i] = DESELECTDIM * mo[i];\n            }\n        }\n    }\n\n    if(subTypes.hasLines(trace)) {\n        opts.line = {\n            overlay: true,\n            thickness: trace.line.width,\n            color: trace.line.color,\n            opacity: trace.opacity\n        };\n\n        var dashes = (constants.DASHES[trace.line.dash] || [1]).slice();\n        for(i = 0; i < dashes.length; ++i) {\n            dashes[i] *= trace.line.width;\n        }\n        opts.line.dashes = dashes;\n    }\n\n    if(trace.error_x && trace.error_x.visible) {\n        opts.errorX = convertErrorBarStyle(trace, trace.error_x);\n    }\n\n    if(trace.error_y && trace.error_y.visible) {\n        opts.errorY = convertErrorBarStyle(trace, trace.error_y);\n    }\n\n    if(!!trace.fill && trace.fill !== 'none') {\n        opts.fill = {\n            closed: true,\n            fill: trace.fillcolor,\n            thickness: 0\n        };\n    }\n\n    return opts;\n}\n\nfunction convertTextStyle(trace) {\n    var count = trace._length;\n    var textfontIn = trace.textfont;\n    var textpositionIn = trace.textposition;\n    var textPos = Array.isArray(textpositionIn) ? textpositionIn : [textpositionIn];\n    var tfc = textfontIn.color;\n    var tfs = textfontIn.size;\n    var tff = textfontIn.family;\n    var optsOut = {};\n    var i;\n\n    optsOut.text = trace.text;\n    optsOut.opacity = trace.opacity;\n    optsOut.font = {};\n    optsOut.align = [];\n    optsOut.baseline = [];\n\n    for(i = 0; i < textPos.length; i++) {\n        var tp = textPos[i].split(/\\s+/);\n\n        switch(tp[1]) {\n            case 'left':\n                optsOut.align.push('right');\n                break;\n            case 'right':\n                optsOut.align.push('left');\n                break;\n            default:\n                optsOut.align.push(tp[1]);\n        }\n        switch(tp[0]) {\n            case 'top':\n                optsOut.baseline.push('bottom');\n                break;\n            case 'bottom':\n                optsOut.baseline.push('top');\n                break;\n            default:\n                optsOut.baseline.push(tp[0]);\n        }\n    }\n\n    if(Array.isArray(tfc)) {\n        optsOut.color = new Array(count);\n        for(i = 0; i < count; i++) {\n            optsOut.color[i] = tfc[i];\n        }\n    } else {\n        optsOut.color = tfc;\n    }\n\n    if(Array.isArray(tfs) || Array.isArray(tff)) {\n        // if any textfont param is array - make render a batch\n        optsOut.font = new Array(count);\n        for(i = 0; i < count; i++) {\n            var fonti = optsOut.font[i] = {};\n\n            fonti.size = Array.isArray(tfs) ?\n                (isNumeric(tfs[i]) ? tfs[i] : 0) :\n                tfs;\n\n            fonti.family = Array.isArray(tff) ? tff[i] : tff;\n        }\n    } else {\n        // if both are single values, make render fast single-value\n        optsOut.font = {size: tfs, family: tff};\n    }\n\n    return optsOut;\n}\n\n\nfunction convertMarkerStyle(trace) {\n    var count = trace._length;\n    var optsIn = trace.marker;\n    var optsOut = {};\n    var i;\n\n    var multiSymbol = Array.isArray(optsIn.symbol);\n    var multiColor = Lib.isArrayOrTypedArray(optsIn.color);\n    var multiLineColor = Lib.isArrayOrTypedArray(optsIn.line.color);\n    var multiOpacity = Lib.isArrayOrTypedArray(optsIn.opacity);\n    var multiSize = Lib.isArrayOrTypedArray(optsIn.size);\n    var multiLineWidth = Lib.isArrayOrTypedArray(optsIn.line.width);\n\n    var isOpen;\n    if(!multiSymbol) isOpen = constants.OPEN_RE.test(optsIn.symbol);\n\n    // prepare colors\n    if(multiSymbol || multiColor || multiLineColor || multiOpacity) {\n        optsOut.colors = new Array(count);\n        optsOut.borderColors = new Array(count);\n\n        var colors = formatColor(optsIn, optsIn.opacity, count);\n        var borderColors = formatColor(optsIn.line, optsIn.opacity, count);\n\n        if(!Array.isArray(borderColors[0])) {\n            var borderColor = borderColors;\n            borderColors = Array(count);\n            for(i = 0; i < count; i++) {\n                borderColors[i] = borderColor;\n            }\n        }\n        if(!Array.isArray(colors[0])) {\n            var color = colors;\n            colors = Array(count);\n            for(i = 0; i < count; i++) {\n                colors[i] = color;\n            }\n        }\n\n        optsOut.colors = colors;\n        optsOut.borderColors = borderColors;\n\n        for(i = 0; i < count; i++) {\n            if(multiSymbol) {\n                var symbol = optsIn.symbol[i];\n                isOpen = constants.OPEN_RE.test(symbol);\n            }\n            if(isOpen) {\n                borderColors[i] = colors[i].slice();\n                colors[i] = colors[i].slice();\n                colors[i][3] = 0;\n            }\n        }\n\n        optsOut.opacity = trace.opacity;\n    } else {\n        if(isOpen) {\n            optsOut.color = rgba(optsIn.color, 'uint8');\n            optsOut.color[3] = 0;\n            optsOut.borderColor = rgba(optsIn.color, 'uint8');\n        } else {\n            optsOut.color = rgba(optsIn.color, 'uint8');\n            optsOut.borderColor = rgba(optsIn.line.color, 'uint8');\n        }\n\n        optsOut.opacity = trace.opacity * optsIn.opacity;\n    }\n\n    // prepare symbols\n    if(multiSymbol) {\n        optsOut.markers = new Array(count);\n        for(i = 0; i < count; i++) {\n            optsOut.markers[i] = getSymbolSdf(optsIn.symbol[i]);\n        }\n    } else {\n        optsOut.marker = getSymbolSdf(optsIn.symbol);\n    }\n\n    // prepare sizes\n    var markerSizeFunc = makeBubbleSizeFn(trace);\n    var s;\n\n    if(multiSize || multiLineWidth) {\n        var sizes = optsOut.sizes = new Array(count);\n        var borderSizes = optsOut.borderSizes = new Array(count);\n        var sizeTotal = 0;\n        var sizeAvg;\n\n        if(multiSize) {\n            for(i = 0; i < count; i++) {\n                sizes[i] = markerSizeFunc(optsIn.size[i]);\n                sizeTotal += sizes[i];\n            }\n            sizeAvg = sizeTotal / count;\n        } else {\n            s = markerSizeFunc(optsIn.size);\n            for(i = 0; i < count; i++) {\n                sizes[i] = s;\n            }\n        }\n\n        // See  https://github.com/plotly/plotly.js/pull/1781#discussion_r121820798\n        if(multiLineWidth) {\n            for(i = 0; i < count; i++) {\n                borderSizes[i] = optsIn.line.width[i] / 2;\n            }\n        } else {\n            s = optsIn.line.width / 2;\n            for(i = 0; i < count; i++) {\n                borderSizes[i] = s;\n            }\n        }\n\n        optsOut.sizeAvg = sizeAvg;\n    } else {\n        optsOut.size = markerSizeFunc(optsIn && optsIn.size || 10);\n        optsOut.borderSizes = markerSizeFunc(optsIn.line.width);\n    }\n\n    return optsOut;\n}\n\nfunction convertMarkerSelection(trace, target) {\n    var optsIn = trace.marker;\n    var optsOut = {};\n\n    if(!target) return optsOut;\n\n    if(target.marker && target.marker.symbol) {\n        optsOut = convertMarkerStyle(Lib.extendFlat({}, optsIn, target.marker));\n    } else if(target.marker) {\n        if(target.marker.size) optsOut.size = target.marker.size / 2;\n        if(target.marker.color) optsOut.colors = target.marker.color;\n        if(target.marker.opacity !== undefined) optsOut.opacity = target.marker.opacity;\n    }\n\n    return optsOut;\n}\n\nfunction convertTextSelection(trace, target) {\n    var optsOut = {};\n\n    if(!target) return optsOut;\n\n    if(target.textfont) {\n        var optsIn = {\n            opacity: 1,\n            text: trace.text,\n            textposition: trace.textposition,\n            textfont: Lib.extendFlat({}, trace.textfont)\n        };\n        if(target.textfont) {\n            Lib.extendFlat(optsIn.textfont, target.textfont);\n        }\n        optsOut = convertTextStyle(optsIn);\n    }\n\n    return optsOut;\n}\n\nfunction convertErrorBarStyle(trace, target) {\n    var optsOut = {\n        capSize: target.width * 2,\n        lineWidth: target.thickness,\n        color: target.color\n    };\n\n    if(target.copy_ystyle) {\n        optsOut = trace.error_y;\n    }\n\n    return optsOut;\n}\n\nvar SYMBOL_SDF_SIZE = constants.SYMBOL_SDF_SIZE;\nvar SYMBOL_SIZE = constants.SYMBOL_SIZE;\nvar SYMBOL_STROKE = constants.SYMBOL_STROKE;\nvar SYMBOL_SDF = {};\nvar SYMBOL_SVG_CIRCLE = Drawing.symbolFuncs[0](SYMBOL_SIZE * 0.05);\n\nfunction getSymbolSdf(symbol) {\n    if(symbol === 'circle') return null;\n\n    var symbolPath, symbolSdf;\n    var symbolNumber = Drawing.symbolNumber(symbol);\n    var symbolFunc = Drawing.symbolFuncs[symbolNumber % 100];\n    var symbolNoDot = !!Drawing.symbolNoDot[symbolNumber % 100];\n    var symbolNoFill = !!Drawing.symbolNoFill[symbolNumber % 100];\n\n    var isDot = constants.DOT_RE.test(symbol);\n\n    // get symbol sdf from cache or generate it\n    if(SYMBOL_SDF[symbol]) return SYMBOL_SDF[symbol];\n\n    if(isDot && !symbolNoDot) {\n        symbolPath = symbolFunc(SYMBOL_SIZE * 1.1) + SYMBOL_SVG_CIRCLE;\n    } else {\n        symbolPath = symbolFunc(SYMBOL_SIZE);\n    }\n\n    symbolSdf = svgSdf(symbolPath, {\n        w: SYMBOL_SDF_SIZE,\n        h: SYMBOL_SDF_SIZE,\n        viewBox: [-SYMBOL_SIZE, -SYMBOL_SIZE, SYMBOL_SIZE, SYMBOL_SIZE],\n        stroke: symbolNoFill ? SYMBOL_STROKE : -SYMBOL_STROKE\n    });\n    SYMBOL_SDF[symbol] = symbolSdf;\n\n    return symbolSdf || null;\n}\n\nfunction convertLinePositions(gd, trace, positions) {\n    var len = positions.length;\n    var count = len / 2;\n    var linePositions;\n    var i;\n\n    if(subTypes.hasLines(trace) && count) {\n        if(trace.line.shape === 'hv') {\n            linePositions = [];\n            for(i = 0; i < count - 1; i++) {\n                if(isNaN(positions[i * 2]) || isNaN(positions[i * 2 + 1])) {\n                    linePositions.push(NaN, NaN, NaN, NaN);\n                } else {\n                    linePositions.push(positions[i * 2], positions[i * 2 + 1]);\n                    if(!isNaN(positions[i * 2 + 2]) && !isNaN(positions[i * 2 + 3])) {\n                        linePositions.push(positions[i * 2 + 2], positions[i * 2 + 1]);\n                    } else {\n                        linePositions.push(NaN, NaN);\n                    }\n                }\n            }\n            linePositions.push(positions[len - 2], positions[len - 1]);\n        } else if(trace.line.shape === 'hvh') {\n            linePositions = [];\n            for(i = 0; i < count - 1; i++) {\n                if(isNaN(positions[i * 2]) || isNaN(positions[i * 2 + 1]) || isNaN(positions[i * 2 + 2]) || isNaN(positions[i * 2 + 3])) {\n                    if(!isNaN(positions[i * 2]) && !isNaN(positions[i * 2 + 1])) {\n                        linePositions.push(positions[i * 2], positions[i * 2 + 1]);\n                    } else {\n                        linePositions.push(NaN, NaN);\n                    }\n                    linePositions.push(NaN, NaN);\n                } else {\n                    var midPtX = (positions[i * 2] + positions[i * 2 + 2]) / 2;\n                    linePositions.push(\n                        positions[i * 2],\n                        positions[i * 2 + 1],\n                        midPtX,\n                        positions[i * 2 + 1],\n                        midPtX,\n                        positions[i * 2 + 3]\n                    );\n                }\n            }\n            linePositions.push(positions[len - 2], positions[len - 1]);\n        } else if(trace.line.shape === 'vhv') {\n            linePositions = [];\n            for(i = 0; i < count - 1; i++) {\n                if(isNaN(positions[i * 2]) || isNaN(positions[i * 2 + 1]) || isNaN(positions[i * 2 + 2]) || isNaN(positions[i * 2 + 3])) {\n                    if(!isNaN(positions[i * 2]) && !isNaN(positions[i * 2 + 1])) {\n                        linePositions.push(positions[i * 2], positions[i * 2 + 1]);\n                    } else {\n                        linePositions.push(NaN, NaN);\n                    }\n                    linePositions.push(NaN, NaN);\n                } else {\n                    var midPtY = (positions[i * 2 + 1] + positions[i * 2 + 3]) / 2;\n                    linePositions.push(\n                        positions[i * 2],\n                        positions[i * 2 + 1],\n                        positions[i * 2],\n                        midPtY,\n                        positions[i * 2 + 2],\n                        midPtY\n                    );\n                }\n            }\n            linePositions.push(positions[len - 2], positions[len - 1]);\n        } else if(trace.line.shape === 'vh') {\n            linePositions = [];\n            for(i = 0; i < count - 1; i++) {\n                if(isNaN(positions[i * 2]) || isNaN(positions[i * 2 + 1])) {\n                    linePositions.push(NaN, NaN, NaN, NaN);\n                } else {\n                    linePositions.push(positions[i * 2], positions[i * 2 + 1]);\n                    if(!isNaN(positions[i * 2 + 2]) && !isNaN(positions[i * 2 + 3])) {\n                        linePositions.push(positions[i * 2], positions[i * 2 + 3]);\n                    } else {\n                        linePositions.push(NaN, NaN);\n                    }\n                }\n            }\n            linePositions.push(positions[len - 2], positions[len - 1]);\n        } else {\n            linePositions = positions;\n        }\n    }\n\n    // If we have data with gaps, we ought to use rect joins\n    // FIXME: get rid of this\n    var hasNaN = false;\n    for(i = 0; i < linePositions.length; i++) {\n        if(isNaN(linePositions[i])) {\n            hasNaN = true;\n            break;\n        }\n    }\n\n    var join = (hasNaN || linePositions.length > constants.TOO_MANY_POINTS) ? 'rect' :\n        subTypes.hasMarkers(trace) ? 'rect' : 'round';\n\n    // fill gaps\n    if(hasNaN && trace.connectgaps) {\n        var lastX = linePositions[0];\n        var lastY = linePositions[1];\n\n        for(i = 0; i < linePositions.length; i += 2) {\n            if(isNaN(linePositions[i]) || isNaN(linePositions[i + 1])) {\n                linePositions[i] = lastX;\n                linePositions[i + 1] = lastY;\n            } else {\n                lastX = linePositions[i];\n                lastY = linePositions[i + 1];\n            }\n        }\n    }\n\n    return {\n        join: join,\n        positions: linePositions\n    };\n}\n\nfunction convertErrorBarPositions(gd, trace, positions, x, y) {\n    var makeComputeError = Registry.getComponentMethod('errorbars', 'makeComputeError');\n    var xa = AxisIDs.getFromId(gd, trace.xaxis);\n    var ya = AxisIDs.getFromId(gd, trace.yaxis);\n    var count = positions.length / 2;\n    var out = {};\n\n    function convertOneAxis(coords, ax) {\n        var axLetter = ax._id.charAt(0);\n        var opts = trace['error_' + axLetter];\n\n        if(opts && opts.visible && (ax.type === 'linear' || ax.type === 'log')) {\n            var computeError = makeComputeError(opts);\n            var pOffset = {x: 0, y: 1}[axLetter];\n            var eOffset = {x: [0, 1, 2, 3], y: [2, 3, 0, 1]}[axLetter];\n            var errors = new Float64Array(4 * count);\n            var minShoe = Infinity;\n            var maxHat = -Infinity;\n\n            for(var i = 0, j = 0; i < count; i++, j += 4) {\n                var dc = coords[i];\n\n                if(isNumeric(dc)) {\n                    var dl = positions[i * 2 + pOffset];\n                    var vals = computeError(dc, i);\n                    var lv = vals[0];\n                    var hv = vals[1];\n\n                    if(isNumeric(lv) && isNumeric(hv)) {\n                        var shoe = dc - lv;\n                        var hat = dc + hv;\n\n                        errors[j + eOffset[0]] = dl - ax.c2l(shoe);\n                        errors[j + eOffset[1]] = ax.c2l(hat) - dl;\n                        errors[j + eOffset[2]] = 0;\n                        errors[j + eOffset[3]] = 0;\n\n                        minShoe = Math.min(minShoe, dc - lv);\n                        maxHat = Math.max(maxHat, dc + hv);\n                    }\n                }\n            }\n\n            out[axLetter] = {\n                positions: positions,\n                errors: errors,\n                _bnds: [minShoe, maxHat]\n            };\n        }\n    }\n\n    convertOneAxis(x, xa);\n    convertOneAxis(y, ya);\n    return out;\n}\n\nfunction convertTextPosition(gd, trace, textOpts, markerOpts) {\n    var count = trace._length;\n    var out = {};\n    var i;\n\n    // corresponds to textPointPosition from component.drawing\n    if(subTypes.hasMarkers(trace)) {\n        var fontOpts = textOpts.font;\n        var align = textOpts.align;\n        var baseline = textOpts.baseline;\n        out.offset = new Array(count);\n\n        for(i = 0; i < count; i++) {\n            var ms = markerOpts.sizes ? markerOpts.sizes[i] : markerOpts.size;\n            var fs = Array.isArray(fontOpts) ? fontOpts[i].size : fontOpts.size;\n\n            var a = Array.isArray(align) ?\n                (align.length > 1 ? align[i] : align[0]) :\n                align;\n            var b = Array.isArray(baseline) ?\n                (baseline.length > 1 ? baseline[i] : baseline[0]) :\n                baseline;\n\n            var hSign = TEXTOFFSETSIGN[a];\n            var vSign = TEXTOFFSETSIGN[b];\n            var xPad = ms ? ms / 0.8 + 1 : 0;\n            var yPad = -vSign * xPad - vSign * 0.5;\n            out.offset[i] = [hSign * xPad / fs, yPad / fs];\n        }\n    }\n\n    return out;\n}\n\nmodule.exports = {\n    style: convertStyle,\n\n    markerStyle: convertMarkerStyle,\n    markerSelection: convertMarkerSelection,\n\n    linePositions: convertLinePositions,\n    errorBarPositions: convertErrorBarPositions,\n    textPosition: convertTextPosition\n};\n\n},{\"../../components/drawing\":601,\"../../constants/interactions\":679,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../scatter/make_bubble_size_func\":1091,\"../scatter/subtypes\":1098,\"./constants\":1124,\"color-normalize\":113,\"fast-isnumeric\":224,\"svg-path-sdf\":522}],1126:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Registry = _dereq_('../../registry');\n\nvar attributes = _dereq_('./attributes');\nvar constants = _dereq_('../scatter/constants');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleXYDefaults = _dereq_('../scatter/xy_defaults');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var isOpen = traceIn.marker ? /-open/.test(traceIn.marker.symbol) : false;\n    var isBubble = subTypes.isBubble(traceIn);\n\n    var len = handleXYDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n    var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines';\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n    coerce('mode', defaultMode);\n\n    if(subTypes.hasLines(traceOut)) {\n        coerce('connectgaps');\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        coerce('line.shape');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        coerce('marker.line.width', isOpen || isBubble ? 1 : 0);\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    var lineColor = (traceOut.line || {}).color;\n    var markerColor = (traceOut.marker || {}).color;\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n    }\n\n    var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y'});\n    errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'y'});\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../../registry\":831,\"../scatter/constants\":1079,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"../scatter/xy_defaults\":1100,\"./attributes\":1123}],1127:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createScatter = _dereq_('regl-scatter2d');\nvar createLine = _dereq_('regl-line2d');\nvar createError = _dereq_('regl-error2d');\nvar cluster = _dereq_('point-cluster');\nvar Text = _dereq_('gl-text');\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\nvar prepareRegl = _dereq_('../../lib/prepare_regl');\nvar AxisIDs = _dereq_('../../plots/cartesian/axis_ids');\nvar findExtremes = _dereq_('../../plots/cartesian/autorange').findExtremes;\nvar Color = _dereq_('../../components/color');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar scatterCalc = _dereq_('../scatter/calc');\nvar calcMarkerSize = scatterCalc.calcMarkerSize;\nvar calcAxisExpansion = scatterCalc.calcAxisExpansion;\nvar setFirstScatter = scatterCalc.setFirstScatter;\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar linkTraces = _dereq_('../scatter/link_traces');\nvar getTraceColor = _dereq_('../scatter/get_trace_color');\nvar fillText = Lib.fillText;\nvar convert = _dereq_('./convert');\n\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\nvar TOO_MANY_POINTS = _dereq_('./constants').TOO_MANY_POINTS;\nvar DESELECTDIM = _dereq_('../../constants/interactions').DESELECTDIM;\n\nfunction calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var xa = AxisIDs.getFromId(gd, trace.xaxis);\n    var ya = AxisIDs.getFromId(gd, trace.yaxis);\n    var subplot = fullLayout._plots[trace.xaxis + trace.yaxis];\n    var len = trace._length;\n    var hasTooManyPoints = len >= TOO_MANY_POINTS;\n    var len2 = len * 2;\n    var stash = {};\n    var i, xx, yy;\n\n    var x = xa.makeCalcdata(trace, 'x');\n    var y = ya.makeCalcdata(trace, 'y');\n\n    // we need hi-precision for scatter2d,\n    // regl-scatter2d uses NaNs for bad/missing values\n    var positions = new Array(len2);\n    for(i = 0; i < len; i++) {\n        xx = x[i];\n        yy = y[i];\n        positions[i * 2] = xx === BADNUM ? NaN : xx;\n        positions[i * 2 + 1] = yy === BADNUM ? NaN : yy;\n    }\n\n    if(xa.type === 'log') {\n        for(i = 0; i < len2; i += 2) {\n            positions[i] = xa.c2l(positions[i]);\n        }\n    }\n    if(ya.type === 'log') {\n        for(i = 1; i < len2; i += 2) {\n            positions[i] = ya.c2l(positions[i]);\n        }\n    }\n\n    // we don't build a tree for log axes since it takes long to convert log2px\n    // and it is also\n    if(hasTooManyPoints && (xa.type !== 'log' && ya.type !== 'log')) {\n        // FIXME: delegate this to webworker\n        stash.tree = cluster(positions);\n    } else {\n        var ids = stash.ids = new Array(len);\n        for(i = 0; i < len; i++) {\n            ids[i] = i;\n        }\n    }\n\n    // create scene options and scene\n    calcColorscale(gd, trace);\n    var opts = sceneOptions(gd, subplot, trace, positions, x, y);\n    var scene = sceneUpdate(gd, subplot);\n\n    // Reuse SVG scatter axis expansion routine.\n    // For graphs with very large number of points and array marker.size,\n    // use average marker size instead to speed things up.\n    setFirstScatter(fullLayout, trace);\n    var ppad;\n    if(!hasTooManyPoints) {\n        ppad = calcMarkerSize(trace, len);\n    } else if(opts.marker) {\n        ppad = 2 * (opts.marker.sizeAvg || Math.max(opts.marker.size, 3));\n    }\n    calcAxisExpansion(gd, trace, xa, ya, x, y, ppad);\n    if(opts.errorX) expandForErrorBars(trace, xa, opts.errorX);\n    if(opts.errorY) expandForErrorBars(trace, ya, opts.errorY);\n\n    // set flags to create scene renderers\n    if(opts.fill && !scene.fill2d) scene.fill2d = true;\n    if(opts.marker && !scene.scatter2d) scene.scatter2d = true;\n    if(opts.line && !scene.line2d) scene.line2d = true;\n    if((opts.errorX || opts.errorY) && !scene.error2d) scene.error2d = true;\n    if(opts.text && !scene.glText) scene.glText = true;\n\n    // FIXME: organize it in a more appropriate manner, probably in sceneOptions\n    // put point-cluster instance for optimized regl calc\n    if(opts.marker) {\n        opts.marker.snap = stash.tree || TOO_MANY_POINTS;\n    }\n\n    scene.lineOptions.push(opts.line);\n    scene.errorXOptions.push(opts.errorX);\n    scene.errorYOptions.push(opts.errorY);\n    scene.fillOptions.push(opts.fill);\n    scene.markerOptions.push(opts.marker);\n    scene.markerSelectedOptions.push(opts.markerSel);\n    scene.markerUnselectedOptions.push(opts.markerUnsel);\n    scene.textOptions.push(opts.text);\n    scene.textSelectedOptions.push(opts.textSel);\n    scene.textUnselectedOptions.push(opts.textUnsel);\n    scene.selectBatch.push([]);\n    scene.unselectBatch.push([]);\n\n    stash._scene = scene;\n    stash.index = scene.count;\n    stash.x = x;\n    stash.y = y;\n    stash.positions = positions;\n    scene.count++;\n\n    return [{x: false, y: false, t: stash, trace: trace}];\n}\n\nfunction expandForErrorBars(trace, ax, opts) {\n    var extremes = trace._extremes[ax._id];\n    var errExt = findExtremes(ax, opts._bnds, {padded: true});\n    extremes.min = extremes.min.concat(errExt.min);\n    extremes.max = extremes.max.concat(errExt.max);\n}\n\nfunction sceneOptions(gd, subplot, trace, positions, x, y) {\n    var opts = convert.style(gd, trace);\n\n    if(opts.marker) {\n        opts.marker.positions = positions;\n    }\n\n    if(opts.line && positions.length > 1) {\n        Lib.extendFlat(\n            opts.line,\n            convert.linePositions(gd, trace, positions)\n        );\n    }\n\n    if(opts.errorX || opts.errorY) {\n        var errors = convert.errorBarPositions(gd, trace, positions, x, y);\n\n        if(opts.errorX) {\n            Lib.extendFlat(opts.errorX, errors.x);\n        }\n        if(opts.errorY) {\n            Lib.extendFlat(opts.errorY, errors.y);\n        }\n    }\n\n    if(opts.text) {\n        Lib.extendFlat(\n            opts.text,\n            {positions: positions},\n            convert.textPosition(gd, trace, opts.text, opts.marker)\n        );\n        Lib.extendFlat(\n            opts.textSel,\n            {positions: positions},\n            convert.textPosition(gd, trace, opts.text, opts.markerSel)\n        );\n        Lib.extendFlat(\n            opts.textUnsel,\n            {positions: positions},\n            convert.textPosition(gd, trace, opts.text, opts.markerUnsel)\n        );\n    }\n\n    return opts;\n}\n\n// make sure scene exists on subplot, return it\nfunction sceneUpdate(gd, subplot) {\n    var scene = subplot._scene;\n\n    var resetOpts = {\n        // number of traces in subplot, since scene:subplot -> 1:1\n        count: 0,\n        // whether scene requires init hook in plot call (dirty plot call)\n        dirty: true,\n        // last used options\n        lineOptions: [],\n        fillOptions: [],\n        markerOptions: [],\n        markerSelectedOptions: [],\n        markerUnselectedOptions: [],\n        errorXOptions: [],\n        errorYOptions: [],\n        textOptions: [],\n        textSelectedOptions: [],\n        textUnselectedOptions: [],\n        // selection batches\n        selectBatch: [],\n        unselectBatch: []\n    };\n\n    // regl- component stubs, initialized in dirty plot call\n    var initOpts = {\n        fill2d: false,\n        scatter2d: false,\n        error2d: false,\n        line2d: false,\n        glText: false,\n        select2d: false\n    };\n\n    if(!subplot._scene) {\n        scene = subplot._scene = {};\n\n        scene.init = function init() {\n            Lib.extendFlat(scene, initOpts, resetOpts);\n        };\n\n        scene.init();\n\n        // apply new option to all regl components (used on drag)\n        scene.update = function update(opt) {\n            var opts = Lib.repeat(opt, scene.count);\n\n            if(scene.fill2d) scene.fill2d.update(opts);\n            if(scene.scatter2d) scene.scatter2d.update(opts);\n            if(scene.line2d) scene.line2d.update(opts);\n            if(scene.error2d) scene.error2d.update(opts.concat(opts));\n            if(scene.select2d) scene.select2d.update(opts);\n            if(scene.glText) {\n                for(var i = 0; i < scene.count; i++) {\n                    scene.glText[i].update(opt);\n                }\n            }\n        };\n\n        // draw traces in proper order\n        scene.draw = function draw() {\n            var count = scene.count;\n            var fill2d = scene.fill2d;\n            var error2d = scene.error2d;\n            var line2d = scene.line2d;\n            var scatter2d = scene.scatter2d;\n            var glText = scene.glText;\n            var select2d = scene.select2d;\n            var selectBatch = scene.selectBatch;\n            var unselectBatch = scene.unselectBatch;\n\n            for(var i = 0; i < count; i++) {\n                if(fill2d && scene.fillOrder[i]) {\n                    fill2d.draw(scene.fillOrder[i]);\n                }\n                if(line2d && scene.lineOptions[i]) {\n                    line2d.draw(i);\n                }\n                if(error2d) {\n                    if(scene.errorXOptions[i]) error2d.draw(i);\n                    if(scene.errorYOptions[i]) error2d.draw(i + count);\n                }\n                if(scatter2d && scene.markerOptions[i]) {\n                    if(unselectBatch[i].length) {\n                        var arg = Lib.repeat([], scene.count);\n                        arg[i] = unselectBatch[i];\n                        scatter2d.draw(arg);\n                    } else if(!selectBatch[i].length) {\n                        scatter2d.draw(i);\n                    }\n                }\n                if(glText[i] && scene.textOptions[i]) {\n                    glText[i].render();\n                }\n            }\n\n            if(select2d) {\n                select2d.draw(selectBatch);\n            }\n\n            scene.dirty = false;\n        };\n\n        // remove scene resources\n        scene.destroy = function destroy() {\n            if(scene.fill2d && scene.fill2d.destroy) scene.fill2d.destroy();\n            if(scene.scatter2d && scene.scatter2d.destroy) scene.scatter2d.destroy();\n            if(scene.error2d && scene.error2d.destroy) scene.error2d.destroy();\n            if(scene.line2d && scene.line2d.destroy) scene.line2d.destroy();\n            if(scene.select2d && scene.select2d.destroy) scene.select2d.destroy();\n            if(scene.glText) {\n                scene.glText.forEach(function(text) {\n                    if(text.destroy) text.destroy();\n                });\n            }\n\n            scene.lineOptions = null;\n            scene.fillOptions = null;\n            scene.markerOptions = null;\n            scene.markerSelectedOptions = null;\n            scene.markerUnselectedOptions = null;\n            scene.errorXOptions = null;\n            scene.errorYOptions = null;\n            scene.textOptions = null;\n            scene.textSelectedOptions = null;\n            scene.textUnselectedOptions = null;\n\n            scene.selectBatch = null;\n            scene.unselectBatch = null;\n\n            // we can't just delete _scene, because `destroy` is called in the\n            // middle of supplyDefaults, before relinkPrivateKeys which will put it back.\n            subplot._scene = null;\n        };\n    }\n\n    // in case if we have scene from the last calc - reset data\n    if(!scene.dirty) {\n        Lib.extendFlat(scene, resetOpts);\n    }\n\n    return scene;\n}\n\nfunction getViewport(fullLayout, xaxis, yaxis) {\n    var gs = fullLayout._size;\n    var width = fullLayout.width;\n    var height = fullLayout.height;\n    return [\n        gs.l + xaxis.domain[0] * gs.w,\n        gs.b + yaxis.domain[0] * gs.h,\n        (width - gs.r) - (1 - xaxis.domain[1]) * gs.w,\n        (height - gs.t) - (1 - yaxis.domain[1]) * gs.h\n    ];\n}\n\nfunction plot(gd, subplot, cdata) {\n    if(!cdata.length) return;\n\n    var fullLayout = gd._fullLayout;\n    var scene = subplot._scene;\n    var xaxis = subplot.xaxis;\n    var yaxis = subplot.yaxis;\n    var i, j;\n\n    // we may have more subplots than initialized data due to Axes.getSubplots method\n    if(!scene) return;\n\n    var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint']);\n    if(!success) {\n        scene.init();\n        return;\n    }\n\n    var count = scene.count;\n    var regl = fullLayout._glcanvas.data()[0].regl;\n\n    // that is needed for fills\n    linkTraces(gd, subplot, cdata);\n\n    if(scene.dirty) {\n        // make sure scenes are created\n        if(scene.error2d === true) {\n            scene.error2d = createError(regl);\n        }\n        if(scene.line2d === true) {\n            scene.line2d = createLine(regl);\n        }\n        if(scene.scatter2d === true) {\n            scene.scatter2d = createScatter(regl);\n        }\n        if(scene.fill2d === true) {\n            scene.fill2d = createLine(regl);\n        }\n        if(scene.glText === true) {\n            scene.glText = new Array(count);\n            for(i = 0; i < count; i++) {\n                scene.glText[i] = new Text(regl);\n            }\n        }\n\n        // update main marker options\n        if(scene.glText) {\n            if(count > scene.glText.length) {\n                // add gl text marker\n                var textsToAdd = count - scene.glText.length;\n                for(i = 0; i < textsToAdd; i++) {\n                    scene.glText.push(new Text(regl));\n                }\n            } else if(count < scene.glText.length) {\n                // remove gl text marker\n                var textsToRemove = scene.glText.length - count;\n                var removedTexts = scene.glText.splice(count, textsToRemove);\n                removedTexts.forEach(function(text) { text.destroy(); });\n            }\n\n            for(i = 0; i < count; i++) {\n                scene.glText[i].update(scene.textOptions[i]);\n            }\n        }\n        if(scene.line2d) {\n            scene.line2d.update(scene.lineOptions);\n            scene.lineOptions = scene.lineOptions.map(function(lineOptions) {\n                if(lineOptions && lineOptions.positions) {\n                    var srcPos = lineOptions.positions;\n\n                    var firstptdef = 0;\n                    while(firstptdef < srcPos.length && (isNaN(srcPos[firstptdef]) || isNaN(srcPos[firstptdef + 1]))) {\n                        firstptdef += 2;\n                    }\n                    var lastptdef = srcPos.length - 2;\n                    while(lastptdef > firstptdef && (isNaN(srcPos[lastptdef]) || isNaN(srcPos[lastptdef + 1]))) {\n                        lastptdef -= 2;\n                    }\n                    lineOptions.positions = srcPos.slice(firstptdef, lastptdef + 2);\n                }\n                return lineOptions;\n            });\n            scene.line2d.update(scene.lineOptions);\n        }\n        if(scene.error2d) {\n            var errorBatch = (scene.errorXOptions || []).concat(scene.errorYOptions || []);\n            scene.error2d.update(errorBatch);\n        }\n        if(scene.scatter2d) {\n            scene.scatter2d.update(scene.markerOptions);\n        }\n\n        // fill requires linked traces, so we generate it's positions here\n        scene.fillOrder = Lib.repeat(null, count);\n        if(scene.fill2d) {\n            scene.fillOptions = scene.fillOptions.map(function(fillOptions, i) {\n                var cdscatter = cdata[i];\n                if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;\n                var cd = cdscatter[0];\n                var trace = cd.trace;\n                var stash = cd.t;\n                var lineOptions = scene.lineOptions[i];\n                var last, j;\n\n                var fillData = [];\n                if(trace._ownfill) fillData.push(i);\n                if(trace._nexttrace) fillData.push(i + 1);\n                if(fillData.length) scene.fillOrder[i] = fillData;\n\n                var pos = [];\n                var srcPos = (lineOptions && lineOptions.positions) || stash.positions;\n                var firstptdef, lastptdef;\n\n                if(trace.fill === 'tozeroy') {\n                    firstptdef = 0;\n                    while(firstptdef < srcPos.length && isNaN(srcPos[firstptdef + 1])) {\n                        firstptdef += 2;\n                    }\n                    lastptdef = srcPos.length - 2;\n                    while(lastptdef > firstptdef && isNaN(srcPos[lastptdef + 1])) {\n                        lastptdef -= 2;\n                    }\n                    if(srcPos[firstptdef + 1] !== 0) {\n                        pos = [srcPos[firstptdef], 0];\n                    }\n                    pos = pos.concat(srcPos.slice(firstptdef, lastptdef + 2));\n                    if(srcPos[lastptdef + 1] !== 0) {\n                        pos = pos.concat([srcPos[lastptdef], 0]);\n                    }\n                } else if(trace.fill === 'tozerox') {\n                    firstptdef = 0;\n                    while(firstptdef < srcPos.length && isNaN(srcPos[firstptdef])) {\n                        firstptdef += 2;\n                    }\n                    lastptdef = srcPos.length - 2;\n                    while(lastptdef > firstptdef && isNaN(srcPos[lastptdef])) {\n                        lastptdef -= 2;\n                    }\n                    if(srcPos[firstptdef] !== 0) {\n                        pos = [0, srcPos[firstptdef + 1]];\n                    }\n                    pos = pos.concat(srcPos.slice(firstptdef, lastptdef + 2));\n                    if(srcPos[lastptdef] !== 0) {\n                        pos = pos.concat([ 0, srcPos[lastptdef + 1]]);\n                    }\n                } else if(trace.fill === 'toself' || trace.fill === 'tonext') {\n                    pos = [];\n                    last = 0;\n                    for(j = 0; j < srcPos.length; j += 2) {\n                        if(isNaN(srcPos[j]) || isNaN(srcPos[j + 1])) {\n                            pos = pos.concat(srcPos.slice(last, j));\n                            pos.push(srcPos[last], srcPos[last + 1]);\n                            last = j + 2;\n                        }\n                    }\n                    pos = pos.concat(srcPos.slice(last));\n                    if(last) {\n                        pos.push(srcPos[last], srcPos[last + 1]);\n                    }\n                } else {\n                    var nextTrace = trace._nexttrace;\n\n                    if(nextTrace) {\n                        var nextOptions = scene.lineOptions[i + 1];\n\n                        if(nextOptions) {\n                            var nextPos = nextOptions.positions;\n                            if(trace.fill === 'tonexty') {\n                                pos = srcPos.slice();\n\n                                for(i = Math.floor(nextPos.length / 2); i--;) {\n                                    var xx = nextPos[i * 2];\n                                    var yy = nextPos[i * 2 + 1];\n                                    if(isNaN(xx) || isNaN(yy)) continue;\n                                    pos.push(xx, yy);\n                                }\n                                fillOptions.fill = nextTrace.fillcolor;\n                            }\n                        }\n                    }\n                }\n\n                // detect prev trace positions to exclude from current fill\n                if(trace._prevtrace && trace._prevtrace.fill === 'tonext') {\n                    var prevLinePos = scene.lineOptions[i - 1].positions;\n\n                    // FIXME: likely this logic should be tested better\n                    var offset = pos.length / 2;\n                    last = offset;\n                    var hole = [last];\n                    for(j = 0; j < prevLinePos.length; j += 2) {\n                        if(isNaN(prevLinePos[j]) || isNaN(prevLinePos[j + 1])) {\n                            hole.push(j / 2 + offset + 1);\n                            last = j + 2;\n                        }\n                    }\n\n                    pos = pos.concat(prevLinePos);\n                    fillOptions.hole = hole;\n                }\n                fillOptions.fillmode = trace.fill;\n                fillOptions.opacity = trace.opacity;\n                fillOptions.positions = pos;\n\n                return fillOptions;\n            });\n\n            scene.fill2d.update(scene.fillOptions);\n        }\n    }\n\n    // form batch arrays, and check for selected points\n    var dragmode = fullLayout.dragmode;\n    var selectMode = dragmode === 'lasso' || dragmode === 'select';\n    var clickSelectEnabled = fullLayout.clickmode.indexOf('select') > -1;\n\n    for(i = 0; i < count; i++) {\n        var cd0 = cdata[i][0];\n        var trace = cd0.trace;\n        var stash = cd0.t;\n        var index = stash.index;\n        var len = trace._length;\n        var x = stash.x;\n        var y = stash.y;\n\n        if(trace.selectedpoints || selectMode || clickSelectEnabled) {\n            if(!selectMode) selectMode = true;\n\n            // regenerate scene batch, if traces number changed during selection\n            if(trace.selectedpoints) {\n                var selPts = scene.selectBatch[index] = Lib.selIndices2selPoints(trace);\n\n                var selDict = {};\n                for(j = 0; j < selPts.length; j++) {\n                    selDict[selPts[j]] = 1;\n                }\n                var unselPts = [];\n                for(j = 0; j < len; j++) {\n                    if(!selDict[j]) unselPts.push(j);\n                }\n                scene.unselectBatch[index] = unselPts;\n            }\n\n            // precalculate px coords since we are not going to pan during select\n            // TODO, could do better here e.g.\n            // - spin that in a webworker\n            // - compute selection from polygons in data coordinates\n            //   (maybe just for linear axes)\n            var xpx = stash.xpx = new Array(len);\n            var ypx = stash.ypx = new Array(len);\n            for(j = 0; j < len; j++) {\n                xpx[j] = xaxis.c2p(x[j]);\n                ypx[j] = yaxis.c2p(y[j]);\n            }\n        } else {\n            stash.xpx = stash.ypx = null;\n        }\n    }\n\n    if(selectMode) {\n        // create scatter instance by cloning scatter2d\n        if(!scene.select2d) {\n            scene.select2d = createScatter(fullLayout._glcanvas.data()[1].regl);\n        }\n\n        // use unselected styles on 'context' canvas\n        if(scene.scatter2d) {\n            var unselOpts = new Array(count);\n            for(i = 0; i < count; i++) {\n                unselOpts[i] = scene.selectBatch[i].length || scene.unselectBatch[i].length ?\n                    scene.markerUnselectedOptions[i] :\n                    {};\n            }\n            scene.scatter2d.update(unselOpts);\n        }\n\n        // use selected style on 'focus' canvas\n        if(scene.select2d) {\n            scene.select2d.update(scene.markerOptions);\n            scene.select2d.update(scene.markerSelectedOptions);\n        }\n\n        if(scene.glText) {\n            cdata.forEach(function(cdscatter) {\n                var trace = ((cdscatter || [])[0] || {}).trace || {};\n                if(subTypes.hasText(trace)) {\n                    styleTextSelection(cdscatter);\n                }\n            });\n        }\n    } else {\n        // reset 'context' scatter2d opts to base opts,\n        // thus unsetting markerUnselectedOptions from selection\n        if(scene.scatter2d) {\n            scene.scatter2d.update(scene.markerOptions);\n        }\n    }\n\n    // provide viewport and range\n    var vpRange0 = {\n        viewport: getViewport(fullLayout, xaxis, yaxis),\n        // TODO do we need those fallbacks?\n        range: [\n            (xaxis._rl || xaxis.range)[0],\n            (yaxis._rl || yaxis.range)[0],\n            (xaxis._rl || xaxis.range)[1],\n            (yaxis._rl || yaxis.range)[1]\n        ]\n    };\n    var vpRange = Lib.repeat(vpRange0, scene.count);\n\n    // upload viewport/range data to GPU\n    if(scene.fill2d) {\n        scene.fill2d.update(vpRange);\n    }\n    if(scene.line2d) {\n        scene.line2d.update(vpRange);\n    }\n    if(scene.error2d) {\n        scene.error2d.update(vpRange.concat(vpRange));\n    }\n    if(scene.scatter2d) {\n        scene.scatter2d.update(vpRange);\n    }\n    if(scene.select2d) {\n        scene.select2d.update(vpRange);\n    }\n    if(scene.glText) {\n        scene.glText.forEach(function(text) { text.update(vpRange0); });\n    }\n}\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var stash = cd[0].t;\n    var trace = cd[0].trace;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var x = stash.x;\n    var y = stash.y;\n    var xpx = xa.c2p(xval);\n    var ypx = ya.c2p(yval);\n    var maxDistance = pointData.distance;\n    var ids;\n\n    // FIXME: make sure this is a proper way to calc search radius\n    if(stash.tree) {\n        var xl = xa.p2c(xpx - maxDistance);\n        var xr = xa.p2c(xpx + maxDistance);\n        var yl = ya.p2c(ypx - maxDistance);\n        var yr = ya.p2c(ypx + maxDistance);\n\n        if(hovermode === 'x') {\n            ids = stash.tree.range(\n                Math.min(xl, xr), Math.min(ya._rl[0], ya._rl[1]),\n                Math.max(xl, xr), Math.max(ya._rl[0], ya._rl[1])\n            );\n        } else {\n            ids = stash.tree.range(\n                Math.min(xl, xr), Math.min(yl, yr),\n                Math.max(xl, xr), Math.max(yl, yr)\n            );\n        }\n    } else if(stash.ids) {\n        ids = stash.ids;\n    } else return [pointData];\n\n    // pick the id closest to the point\n    // note that point possibly may not be found\n    var id, ptx, pty, i, dx, dy, dist, dxy;\n\n    var minDist = maxDistance;\n    if(hovermode === 'x') {\n        for(i = 0; i < ids.length; i++) {\n            ptx = x[ids[i]];\n            dx = Math.abs(xa.c2p(ptx) - xpx);\n            if(dx < minDist) {\n                minDist = dx;\n                dy = ya.c2p(y[ids[i]]) - ypx;\n                dxy = Math.sqrt(dx * dx + dy * dy);\n                id = ids[i];\n            }\n        }\n    } else {\n        for(i = ids.length - 1; i > -1; i--) {\n            ptx = x[ids[i]];\n            pty = y[ids[i]];\n            dx = xa.c2p(ptx) - xpx;\n            dy = ya.c2p(pty) - ypx;\n\n            dist = Math.sqrt(dx * dx + dy * dy);\n            if(dist < minDist) {\n                minDist = dxy = dist;\n                id = ids[i];\n            }\n        }\n    }\n\n    pointData.index = id;\n    pointData.distance = minDist;\n    pointData.dxy = dxy;\n\n    if(id === undefined) return [pointData];\n\n    calcHover(pointData, x, y, trace);\n\n    return [pointData];\n}\n\nfunction calcHover(pointData, x, y, trace) {\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var minDist = pointData.distance;\n    var dxy = pointData.dxy;\n    var id = pointData.index;\n\n    // the closest data point\n    var di = {\n        pointNumber: id,\n        x: x[id],\n        y: y[id]\n    };\n\n    // that is single-item arrays_to_calcdata excerpt, since we are doing it for a single point and we don't have to do it beforehead for 1e6 points\n    di.tx = Array.isArray(trace.text) ? trace.text[id] : trace.text;\n    di.htx = Array.isArray(trace.hovertext) ? trace.hovertext[id] : trace.hovertext;\n    di.data = Array.isArray(trace.customdata) ? trace.customdata[id] : trace.customdata;\n    di.tp = Array.isArray(trace.textposition) ? trace.textposition[id] : trace.textposition;\n\n    var font = trace.textfont;\n    if(font) {\n        di.ts = Array.isArray(font.size) ? font.size[id] : font.size;\n        di.tc = Array.isArray(font.color) ? font.color[id] : font.color;\n        di.tf = Array.isArray(font.family) ? font.family[id] : font.family;\n    }\n\n    var marker = trace.marker;\n    if(marker) {\n        di.ms = Lib.isArrayOrTypedArray(marker.size) ? marker.size[id] : marker.size;\n        di.mo = Lib.isArrayOrTypedArray(marker.opacity) ? marker.opacity[id] : marker.opacity;\n        di.mx = Array.isArray(marker.symbol) ? marker.symbol[id] : marker.symbol;\n        di.mc = Lib.isArrayOrTypedArray(marker.color) ? marker.color[id] : marker.color;\n    }\n\n    var line = marker && marker.line;\n    if(line) {\n        di.mlc = Array.isArray(line.color) ? line.color[id] : line.color;\n        di.mlw = Lib.isArrayOrTypedArray(line.width) ? line.width[id] : line.width;\n    }\n\n    var grad = marker && marker.gradient;\n    if(grad && grad.type !== 'none') {\n        di.mgt = Array.isArray(grad.type) ? grad.type[id] : grad.type;\n        di.mgc = Array.isArray(grad.color) ? grad.color[id] : grad.color;\n    }\n\n    var xp = xa.c2p(di.x, true);\n    var yp = ya.c2p(di.y, true);\n    var rad = di.mrc || 1;\n\n    var hoverlabel = trace.hoverlabel;\n\n    if(hoverlabel) {\n        di.hbg = Array.isArray(hoverlabel.bgcolor) ? hoverlabel.bgcolor[id] : hoverlabel.bgcolor;\n        di.hbc = Array.isArray(hoverlabel.bordercolor) ? hoverlabel.bordercolor[id] : hoverlabel.bordercolor;\n        di.hts = Array.isArray(hoverlabel.font.size) ? hoverlabel.font.size[id] : hoverlabel.font.size;\n        di.htc = Array.isArray(hoverlabel.font.color) ? hoverlabel.font.color[id] : hoverlabel.font.color;\n        di.htf = Array.isArray(hoverlabel.font.family) ? hoverlabel.font.family[id] : hoverlabel.font.family;\n        di.hnl = Array.isArray(hoverlabel.namelength) ? hoverlabel.namelength[id] : hoverlabel.namelength;\n    }\n    var hoverinfo = trace.hoverinfo;\n    if(hoverinfo) {\n        di.hi = Array.isArray(hoverinfo) ? hoverinfo[id] : hoverinfo;\n    }\n\n    var hovertemplate = trace.hovertemplate;\n    if(hovertemplate) {\n        di.ht = Array.isArray(hovertemplate) ? hovertemplate[id] : hovertemplate;\n    }\n\n    var fakeCd = {};\n    fakeCd[pointData.index] = di;\n\n    Lib.extendFlat(pointData, {\n        color: getTraceColor(trace, di),\n\n        x0: xp - rad,\n        x1: xp + rad,\n        xLabelVal: di.x,\n\n        y0: yp - rad,\n        y1: yp + rad,\n        yLabelVal: di.y,\n\n        cd: fakeCd,\n        distance: minDist,\n        spikeDistance: dxy,\n\n        hovertemplate: di.ht\n    });\n\n    if(di.htx) pointData.text = di.htx;\n    else if(di.tx) pointData.text = di.tx;\n    else if(trace.text) pointData.text = trace.text;\n\n    fillText(di, trace, pointData);\n    Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, pointData);\n\n    return pointData;\n}\n\nfunction selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var selection = [];\n    var trace = cd[0].trace;\n    var stash = cd[0].t;\n    var len = trace._length;\n    var x = stash.x;\n    var y = stash.y;\n    var scene = stash._scene;\n    var index = stash.index;\n\n    if(!scene) return selection;\n\n    var hasText = subTypes.hasText(trace);\n    var hasMarkers = subTypes.hasMarkers(trace);\n    var hasOnlyLines = !hasMarkers && !hasText;\n\n    if(trace.visible !== true || hasOnlyLines) return selection;\n\n    var els = [];\n    var unels = [];\n\n    // degenerate polygon does not enable selection\n    // filter out points by visible scatter ones\n    if(selectionTester !== false && !selectionTester.degenerate) {\n        for(var i = 0; i < len; i++) {\n            if(selectionTester.contains([stash.xpx[i], stash.ypx[i]], false, i, searchInfo)) {\n                els.push(i);\n                selection.push({\n                    pointNumber: i,\n                    x: x[i],\n                    y: y[i]\n                });\n            } else {\n                unels.push(i);\n            }\n        }\n    }\n\n    if(hasMarkers) {\n        var scatter2d = scene.scatter2d;\n\n        if(!els.length && !unels.length) {\n            // reset to base styles when clearing\n            var baseOpts = new Array(scene.count);\n            baseOpts[index] = scene.markerOptions[index];\n            scatter2d.update.apply(scatter2d, baseOpts);\n        } else if(!scene.selectBatch[index].length && !scene.unselectBatch[index].length) {\n            // set unselected styles on 'context' canvas (if not done already)\n            var unselOpts = new Array(scene.count);\n            unselOpts[index] = scene.markerUnselectedOptions[index];\n            scatter2d.update.apply(scatter2d, unselOpts);\n        }\n    }\n\n    scene.selectBatch[index] = els;\n    scene.unselectBatch[index] = unels;\n\n    if(hasText) {\n        styleTextSelection(cd);\n    }\n\n    return selection;\n}\n\nfunction styleTextSelection(cd) {\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n    var stash = cd0.t;\n    var scene = stash._scene;\n    var index = stash.index;\n    var els = scene.selectBatch[index];\n    var unels = scene.unselectBatch[index];\n    var baseOpts = scene.textOptions[index];\n    var selOpts = scene.textSelectedOptions[index] || {};\n    var unselOpts = scene.textUnselectedOptions[index] || {};\n    var opts = Lib.extendFlat({}, baseOpts);\n    var i, j;\n\n    if(els.length || unels.length) {\n        var stc = selOpts.color;\n        var utc = unselOpts.color;\n        var base = baseOpts.color;\n        var hasArrayBase = Array.isArray(base);\n        opts.color = new Array(trace._length);\n\n        for(i = 0; i < els.length; i++) {\n            j = els[i];\n            opts.color[j] = stc || (hasArrayBase ? base[j] : base);\n        }\n        for(i = 0; i < unels.length; i++) {\n            j = unels[i];\n            var basej = hasArrayBase ? base[j] : base;\n            opts.color[j] = utc ? utc :\n                stc ? basej : Color.addOpacity(basej, DESELECTDIM);\n        }\n    }\n\n    scene.glText[index].update(opts);\n}\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'scattergl',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['gl', 'regl', 'cartesian', 'symbols', 'errorBarsOK', 'showLegend', 'scatter-like'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('../scatter/cross_trace_defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: calc,\n    plot: plot,\n    hoverPoints: hoverPoints,\n    selectPoints: selectPoints,\n\n    sceneUpdate: sceneUpdate,\n    calcHover: calcHover,\n\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../components/color\":580,\"../../constants/interactions\":679,\"../../constants/numerical\":680,\"../../lib\":703,\"../../lib/prepare_regl\":716,\"../../plots/cartesian\":762,\"../../plots/cartesian/autorange\":750,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../scatter/calc\":1076,\"../scatter/colorscale_calc\":1078,\"../scatter/cross_trace_defaults\":1081,\"../scatter/get_trace_color\":1084,\"../scatter/link_traces\":1090,\"../scatter/marker_colorbar\":1092,\"../scatter/subtypes\":1098,\"./attributes\":1123,\"./constants\":1124,\"./convert\":1125,\"./defaults\":1126,\"gl-text\":316,\"point-cluster\":464,\"regl-error2d\":485,\"regl-line2d\":486,\"regl-scatter2d\":487}],1128:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar scatterGeoAttrs = _dereq_('../scattergeo/attributes');\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar mapboxAttrs = _dereq_('../../plots/mapbox/layout_attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar lineAttrs = scatterGeoAttrs.line;\nvar markerAttrs = scatterGeoAttrs.marker;\n\nmodule.exports = overrideAll({\n    lon: scatterGeoAttrs.lon,\n    lat: scatterGeoAttrs.lat,\n\n    // locations\n    // locationmode\n\n    mode: extendFlat({}, scatterAttrs.mode, {\n        dflt: 'markers',\n        \n    }),\n\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n\n    line: {\n        color: lineAttrs.color,\n        width: lineAttrs.width\n\n        // TODO\n        // dash: dash\n    },\n\n    connectgaps: scatterAttrs.connectgaps,\n\n    marker: extendFlat({\n        symbol: {\n            valType: 'string',\n            dflt: 'circle',\n            \n            arrayOk: true,\n            \n        },\n        opacity: markerAttrs.opacity,\n        size: markerAttrs.size,\n        sizeref: markerAttrs.sizeref,\n        sizemin: markerAttrs.sizemin,\n        sizemode: markerAttrs.sizemode\n    },\n        colorScaleAttrs('marker')\n        // line\n    ),\n\n    fill: scatterGeoAttrs.fill,\n    fillcolor: scatterAttrs.fillcolor,\n\n    textfont: mapboxAttrs.layers.symbol.textfont,\n    textposition: mapboxAttrs.layers.symbol.textposition,\n\n    selected: {\n        marker: scatterAttrs.selected.marker\n    },\n    unselected: {\n        marker: scatterAttrs.unselected.marker\n    },\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['lon', 'lat', 'text', 'name']\n    }),\n    hovertemplate: hovertemplateAttrs(),\n}, 'calc', 'nested');\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../../plots/mapbox/layout_attributes\":808,\"../scatter/attributes\":1075,\"../scattergeo/attributes\":1114}],1129:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\nvar geoJsonUtils = _dereq_('../../lib/geojson_utils');\n\nvar Colorscale = _dereq_('../../components/colorscale');\nvar Drawing = _dereq_('../../components/drawing');\nvar makeBubbleSizeFn = _dereq_('../scatter/make_bubble_size_func');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar convertTextOpts = _dereq_('../../plots/mapbox/convert_text_opts');\n\nmodule.exports = function convert(calcTrace) {\n    var trace = calcTrace[0].trace;\n\n    var isVisible = (trace.visible === true && trace._length !== 0);\n    var hasFill = (trace.fill !== 'none');\n    var hasLines = subTypes.hasLines(trace);\n    var hasMarkers = subTypes.hasMarkers(trace);\n    var hasText = subTypes.hasText(trace);\n    var hasCircles = (hasMarkers && trace.marker.symbol === 'circle');\n    var hasSymbols = (hasMarkers && trace.marker.symbol !== 'circle');\n\n    var fill = initContainer();\n    var line = initContainer();\n    var circle = initContainer();\n    var symbol = initContainer();\n\n    var opts = {\n        fill: fill,\n        line: line,\n        circle: circle,\n        symbol: symbol\n    };\n\n    // early return if not visible or placeholder\n    if(!isVisible) return opts;\n\n    // fill layer and line layer use the same coords\n    var lineCoords;\n    if(hasFill || hasLines) {\n        lineCoords = geoJsonUtils.calcTraceToLineCoords(calcTrace);\n    }\n\n    if(hasFill) {\n        fill.geojson = geoJsonUtils.makePolygon(lineCoords);\n        fill.layout.visibility = 'visible';\n\n        Lib.extendFlat(fill.paint, {\n            'fill-color': trace.fillcolor\n        });\n    }\n\n    if(hasLines) {\n        line.geojson = geoJsonUtils.makeLine(lineCoords);\n        line.layout.visibility = 'visible';\n\n        Lib.extendFlat(line.paint, {\n            'line-width': trace.line.width,\n            'line-color': trace.line.color,\n            'line-opacity': trace.opacity\n        });\n\n        // TODO convert line.dash into line-dasharray\n    }\n\n    if(hasCircles) {\n        var circleOpts = makeCircleOpts(calcTrace);\n        circle.geojson = circleOpts.geojson;\n        circle.layout.visibility = 'visible';\n\n        Lib.extendFlat(circle.paint, {\n            'circle-color': circleOpts.mcc,\n            'circle-radius': circleOpts.mrc,\n            'circle-opacity': circleOpts.mo\n        });\n    }\n\n    if(hasSymbols || hasText) {\n        symbol.geojson = makeSymbolGeoJSON(calcTrace);\n\n        Lib.extendFlat(symbol.layout, {\n            visibility: 'visible',\n            'icon-image': '{symbol}-15',\n            'text-field': '{text}'\n        });\n\n        if(hasSymbols) {\n            Lib.extendFlat(symbol.layout, {\n                'icon-size': trace.marker.size / 10\n            });\n\n            Lib.extendFlat(symbol.paint, {\n                'icon-opacity': trace.opacity * trace.marker.opacity,\n\n                // TODO does not work ??\n                'icon-color': trace.marker.color\n            });\n        }\n\n        if(hasText) {\n            var iconSize = (trace.marker || {}).size;\n            var textOpts = convertTextOpts(trace.textposition, iconSize);\n\n            // all data-driven below !!\n\n            Lib.extendFlat(symbol.layout, {\n                'text-size': trace.textfont.size,\n                'text-anchor': textOpts.anchor,\n                'text-offset': textOpts.offset\n\n                // TODO font family\n                // 'text-font': symbol.textfont.family.split(', '),\n            });\n\n            Lib.extendFlat(symbol.paint, {\n                'text-color': trace.textfont.color,\n                'text-opacity': trace.opacity\n            });\n        }\n    }\n\n    return opts;\n};\n\nfunction initContainer() {\n    return {\n        geojson: geoJsonUtils.makeBlank(),\n        layout: { visibility: 'none' },\n        paint: {}\n    };\n}\n\nfunction makeCircleOpts(calcTrace) {\n    var trace = calcTrace[0].trace;\n    var marker = trace.marker;\n    var selectedpoints = trace.selectedpoints;\n    var arrayColor = Lib.isArrayOrTypedArray(marker.color);\n    var arraySize = Lib.isArrayOrTypedArray(marker.size);\n    var arrayOpacity = Lib.isArrayOrTypedArray(marker.opacity);\n    var i;\n\n    function addTraceOpacity(o) { return trace.opacity * o; }\n\n    function size2radius(s) { return s / 2; }\n\n    var colorFn;\n    if(arrayColor) {\n        if(Colorscale.hasColorscale(trace, 'marker')) {\n            colorFn = Colorscale.makeColorScaleFuncFromTrace(marker);\n        } else {\n            colorFn = Lib.identity;\n        }\n    }\n\n    var sizeFn;\n    if(arraySize) {\n        sizeFn = makeBubbleSizeFn(trace);\n    }\n\n    var opacityFn;\n    if(arrayOpacity) {\n        opacityFn = function(mo) {\n            var mo2 = isNumeric(mo) ? +Lib.constrain(mo, 0, 1) : 0;\n            return addTraceOpacity(mo2);\n        };\n    }\n\n    var features = [];\n    for(i = 0; i < calcTrace.length; i++) {\n        var calcPt = calcTrace[i];\n        var lonlat = calcPt.lonlat;\n\n        if(isBADNUM(lonlat)) continue;\n\n        var props = {};\n        if(colorFn) props.mcc = calcPt.mcc = colorFn(calcPt.mc);\n        if(sizeFn) props.mrc = calcPt.mrc = sizeFn(calcPt.ms);\n        if(opacityFn) props.mo = opacityFn(calcPt.mo);\n        if(selectedpoints) props.selected = calcPt.selected || 0;\n\n        features.push({\n            type: 'Feature',\n            geometry: {type: 'Point', coordinates: lonlat},\n            properties: props\n        });\n    }\n\n    var fns;\n    if(selectedpoints) {\n        fns = Drawing.makeSelectedPointStyleFns(trace);\n\n        for(i = 0; i < features.length; i++) {\n            var d = features[i].properties;\n\n            if(fns.selectedOpacityFn) {\n                d.mo = addTraceOpacity(fns.selectedOpacityFn(d));\n            }\n            if(fns.selectedColorFn) {\n                d.mcc = fns.selectedColorFn(d);\n            }\n            if(fns.selectedSizeFn) {\n                d.mrc = fns.selectedSizeFn(d);\n            }\n        }\n    }\n\n    return {\n        geojson: {type: 'FeatureCollection', features: features},\n        mcc: arrayColor || (fns && fns.selectedColorFn) ?\n            {type: 'identity', property: 'mcc'} :\n            marker.color,\n        mrc: arraySize || (fns && fns.selectedSizeFn) ?\n            {type: 'identity', property: 'mrc'} :\n            size2radius(marker.size),\n        mo: arrayOpacity || (fns && fns.selectedOpacityFn) ?\n            {type: 'identity', property: 'mo'} :\n            addTraceOpacity(marker.opacity)\n    };\n}\n\nfunction makeSymbolGeoJSON(calcTrace) {\n    var trace = calcTrace[0].trace;\n\n    var marker = trace.marker || {};\n    var symbol = marker.symbol;\n    var text = trace.text;\n\n    var fillSymbol = (symbol !== 'circle') ?\n        getFillFunc(symbol) :\n        blankFillFunc;\n\n    var fillText = subTypes.hasText(trace) ?\n        getFillFunc(text) :\n        blankFillFunc;\n\n    var features = [];\n\n    for(var i = 0; i < calcTrace.length; i++) {\n        var calcPt = calcTrace[i];\n\n        if(isBADNUM(calcPt.lonlat)) continue;\n\n        features.push({\n            type: 'Feature',\n            geometry: {\n                type: 'Point',\n                coordinates: calcPt.lonlat\n            },\n            properties: {\n                symbol: fillSymbol(calcPt.mx),\n                text: fillText(calcPt.tx)\n            }\n        });\n    }\n\n    return {\n        type: 'FeatureCollection',\n        features: features\n    };\n}\n\nfunction getFillFunc(attr) {\n    if(Lib.isArrayOrTypedArray(attr)) {\n        return function(v) { return v; };\n    } else if(attr) {\n        return function() { return attr; };\n    } else {\n        return blankFillFunc;\n    }\n}\n\nfunction blankFillFunc() { return ''; }\n\n// only need to check lon (OR lat)\nfunction isBADNUM(lonlat) {\n    return lonlat[0] === BADNUM;\n}\n\n},{\"../../components/colorscale\":592,\"../../components/drawing\":601,\"../../constants/numerical\":680,\"../../lib\":703,\"../../lib/geojson_utils\":697,\"../../plots/mapbox/convert_text_opts\":805,\"../scatter/make_bubble_size_func\":1091,\"../scatter/subtypes\":1098,\"fast-isnumeric\":224}],1130:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleLonLatDefaults(traceIn, traceOut, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n    coerce('mode');\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noDash: true});\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noLine: true});\n\n        // array marker.size and marker.color are only supported with circles\n        var marker = traceOut.marker;\n        if(marker.symbol !== 'circle') {\n            if(Lib.isArrayOrTypedArray(marker.size)) marker.size = marker.size[0];\n            if(Lib.isArrayOrTypedArray(marker.color)) marker.color = marker.color[0];\n        }\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce, {noSelect: true});\n    }\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n    }\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\nfunction handleLonLatDefaults(traceIn, traceOut, coerce) {\n    var lon = coerce('lon') || [];\n    var lat = coerce('lat') || [];\n    var len = Math.min(lon.length, lat.length);\n    traceOut._length = len;\n\n    return len;\n}\n\n},{\"../../lib\":703,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1128}],1131:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\n\nmodule.exports = function eventData(out, pt) {\n    out.lon = pt.lon;\n    out.lat = pt.lat;\n\n    return out;\n};\n\n},{}],1132:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Fx = _dereq_('../../components/fx');\nvar Lib = _dereq_('../../lib');\nvar getTraceColor = _dereq_('../scatter/get_trace_color');\nvar fillText = Lib.fillText;\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function hoverPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var subplot = pointData.subplot;\n\n    // compute winding number about [-180, 180] globe\n    var winding = (xval >= 0) ?\n        Math.floor((xval + 180) / 360) :\n        Math.ceil((xval - 180) / 360);\n\n    // shift longitude to [-180, 180] to determine closest point\n    var lonShift = winding * 360;\n    var xval2 = xval - lonShift;\n\n    function distFn(d) {\n        var lonlat = d.lonlat;\n        if(lonlat[0] === BADNUM) return Infinity;\n\n        var lon = Lib.modHalf(lonlat[0], 360);\n        var lat = lonlat[1];\n        var pt = subplot.project([lon, lat]);\n        var dx = pt.x - xa.c2p([xval2, lat]);\n        var dy = pt.y - ya.c2p([lon, yval]);\n        var rad = Math.max(3, d.mrc || 0);\n\n        return Math.max(Math.sqrt(dx * dx + dy * dy) - rad, 1 - 3 / rad);\n    }\n\n    Fx.getClosest(cd, distFn, pointData);\n\n    // skip the rest (for this trace) if we didn't find a close point\n    if(pointData.index === false) return;\n\n    var di = cd[pointData.index];\n    var lonlat = di.lonlat;\n    var lonlatShifted = [Lib.modHalf(lonlat[0], 360) + lonShift, lonlat[1]];\n\n    // shift labels back to original winded globe\n    var xc = xa.c2p(lonlatShifted);\n    var yc = ya.c2p(lonlatShifted);\n    var rad = di.mrc || 1;\n\n    pointData.x0 = xc - rad;\n    pointData.x1 = xc + rad;\n    pointData.y0 = yc - rad;\n    pointData.y1 = yc + rad;\n\n    pointData.color = getTraceColor(trace, di);\n    pointData.extraText = getExtraText(trace, di, cd[0].t.labels);\n    pointData.hovertemplate = trace.hovertemplate;\n\n    return [pointData];\n};\n\nfunction getExtraText(trace, di, labels) {\n    if(trace.hovertemplate) {\n        return;\n    }\n\n    var hoverinfo = di.hi || trace.hoverinfo;\n    var parts = hoverinfo.split('+');\n    var isAll = parts.indexOf('all') !== -1;\n    var hasLon = parts.indexOf('lon') !== -1;\n    var hasLat = parts.indexOf('lat') !== -1;\n    var lonlat = di.lonlat;\n    var text = [];\n\n    // TODO should we use a mock axis to format hover?\n    // If so, we'll need to make precision be zoom-level dependent\n    function format(v) {\n        return v + '\\u00B0';\n    }\n\n    if(isAll || (hasLon && hasLat)) {\n        text.push('(' + format(lonlat[0]) + ', ' + format(lonlat[1]) + ')');\n    } else if(hasLon) {\n        text.push(labels.lon + format(lonlat[0]));\n    } else if(hasLat) {\n        text.push(labels.lat + format(lonlat[1]));\n    }\n\n    if(isAll || parts.indexOf('text') !== -1) {\n        fillText(di, trace, text);\n    }\n\n    return text.join('<br>');\n}\n\n},{\"../../components/fx\":619,\"../../constants/numerical\":680,\"../../lib\":703,\"../scatter/get_trace_color\":1084}],1133:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: _dereq_('../scattergeo/calc'),\n    plot: _dereq_('./plot'),\n    hoverPoints: _dereq_('./hover'),\n    eventData: _dereq_('./event_data'),\n    selectPoints: _dereq_('./select'),\n\n    style: function(_, cd) {\n        if(cd) {\n            var trace = cd[0].trace;\n            trace._glTrace.update(cd);\n        }\n    },\n\n    moduleType: 'trace',\n    name: 'scattermapbox',\n    basePlotModule: _dereq_('../../plots/mapbox'),\n    categories: ['mapbox', 'gl', 'symbols', 'showLegend', 'scatterlike'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/mapbox\":806,\"../scatter/marker_colorbar\":1092,\"../scattergeo/calc\":1115,\"./attributes\":1128,\"./defaults\":1130,\"./event_data\":1131,\"./hover\":1132,\"./plot\":1134,\"./select\":1135}],1134:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar convert = _dereq_('./convert');\n\nfunction ScatterMapbox(subplot, uid) {\n    this.subplot = subplot;\n    this.uid = uid;\n\n    this.sourceIds = {\n        fill: uid + '-source-fill',\n        line: uid + '-source-line',\n        circle: uid + '-source-circle',\n        symbol: uid + '-source-symbol'\n    };\n\n    this.layerIds = {\n        fill: uid + '-layer-fill',\n        line: uid + '-layer-line',\n        circle: uid + '-layer-circle',\n        symbol: uid + '-layer-symbol'\n    };\n\n    this.order = ['fill', 'line', 'circle', 'symbol'];\n\n    // We could merge the 'fill' source with the 'line' source and\n    // the 'circle' source with the 'symbol' source if ever having\n    // for up-to 4 sources per 'scattermapbox' traces becomes a problem.\n}\n\nvar proto = ScatterMapbox.prototype;\n\nproto.addSource = function(k, opts) {\n    this.subplot.map.addSource(this.sourceIds[k], {\n        type: 'geojson',\n        data: opts.geojson\n    });\n};\n\nproto.setSourceData = function(k, opts) {\n    this.subplot.map\n        .getSource(this.sourceIds[k])\n        .setData(opts.geojson);\n};\n\nproto.addLayer = function(k, opts) {\n    this.subplot.map.addLayer({\n        type: k,\n        id: this.layerIds[k],\n        source: this.sourceIds[k],\n        layout: opts.layout,\n        paint: opts.paint\n    });\n};\n\nproto.update = function update(calcTrace) {\n    var subplot = this.subplot;\n    var optsAll = convert(calcTrace);\n\n    for(var i = 0; i < this.order.length; i++) {\n        var k = this.order[i];\n        var opts = optsAll[k];\n\n        subplot.setOptions(this.layerIds[k], 'setLayoutProperty', opts.layout);\n\n        if(opts.layout.visibility === 'visible') {\n            this.setSourceData(k, opts);\n            subplot.setOptions(this.layerIds[k], 'setPaintProperty', opts.paint);\n        }\n    }\n\n    // link ref for quick update during selections\n    calcTrace[0].trace._glTrace = this;\n};\n\nproto.dispose = function dispose() {\n    var map = this.subplot.map;\n\n    for(var i = 0; i < this.order.length; i++) {\n        var k = this.order[i];\n        map.removeLayer(this.layerIds[k]);\n        map.removeSource(this.sourceIds[k]);\n    }\n};\n\nmodule.exports = function createScatterMapbox(subplot, calcTrace) {\n    var trace = calcTrace[0].trace;\n    var scatterMapbox = new ScatterMapbox(subplot, trace.uid);\n    var optsAll = convert(calcTrace);\n\n    for(var i = 0; i < scatterMapbox.order.length; i++) {\n        var k = scatterMapbox.order[i];\n        var opts = optsAll[k];\n\n        scatterMapbox.addSource(k, opts);\n        scatterMapbox.addLayer(k, opts);\n    }\n\n    // link ref for quick update during selections\n    calcTrace[0].trace._glTrace = scatterMapbox;\n\n    return scatterMapbox;\n};\n\n},{\"./convert\":1129}],1135:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar subtypes = _dereq_('../scatter/subtypes');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n    var trace = cd[0].trace;\n    var i;\n\n    if(!subtypes.hasMarkers(trace)) return [];\n\n    if(selectionTester === false) {\n        for(i = 0; i < cd.length; i++) {\n            cd[i].selected = 0;\n        }\n    } else {\n        for(i = 0; i < cd.length; i++) {\n            var di = cd[i];\n            var lonlat = di.lonlat;\n\n            if(lonlat[0] !== BADNUM) {\n                var lonlat2 = [Lib.modHalf(lonlat[0], 360), lonlat[1]];\n                var xy = [xa.c2p(lonlat2), ya.c2p(lonlat2)];\n\n                if(selectionTester.contains(xy, null, i, searchInfo)) {\n                    selection.push({\n                        pointNumber: i,\n                        lon: lonlat[0],\n                        lat: lonlat[1]\n                    });\n                    di.selected = 1;\n                } else {\n                    di.selected = 0;\n                }\n            }\n        }\n    }\n\n    return selection;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../scatter/subtypes\":1098}],1136:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar lineAttrs = scatterAttrs.line;\n\nmodule.exports = {\n    mode: scatterAttrs.mode,\n\n    r: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    theta: {\n        valType: 'data_array',\n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    r0: {\n        valType: 'any',\n        dflt: 0,\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    dr: {\n        valType: 'number',\n        dflt: 1,\n        \n        editType: 'calc',\n        \n    },\n\n    theta0: {\n        valType: 'any',\n        dflt: 0,\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    dtheta: {\n        valType: 'number',\n        \n        editType: 'calc',\n        \n    },\n\n    thetaunit: {\n        valType: 'enumerated',\n        values: ['radians', 'degrees', 'gradians'],\n        dflt: 'degrees',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    text: scatterAttrs.text,\n    hovertext: scatterAttrs.hovertext,\n\n    line: {\n        color: lineAttrs.color,\n        width: lineAttrs.width,\n        dash: lineAttrs.dash,\n        shape: extendFlat({}, lineAttrs.shape, {\n            values: ['linear', 'spline']\n        }),\n        smoothing: lineAttrs.smoothing,\n        editType: 'calc'\n    },\n    connectgaps: scatterAttrs.connectgaps,\n\n    marker: scatterAttrs.marker,\n    cliponaxis: extendFlat({}, scatterAttrs.cliponaxis, {dflt: false}),\n\n    textposition: scatterAttrs.textposition,\n    textfont: scatterAttrs.textfont,\n\n    fill: extendFlat({}, scatterAttrs.fill, {\n        values: ['none', 'toself', 'tonext'],\n        dflt: 'none',\n        \n    }),\n    fillcolor: scatterAttrs.fillcolor,\n\n    // TODO error bars\n    // https://stackoverflow.com/a/26597487/4068492\n    // error_x (error_r, error_theta)\n    // error_y\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['r', 'theta', 'text', 'name']\n    }),\n    hoveron: scatterAttrs.hoveron,\n    hovertemplate: hovertemplateAttrs(),\n\n    selected: scatterAttrs.selected,\n    unselected: scatterAttrs.unselected\n};\n\n},{\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../scatter/attributes\":1075}],1137:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar calcMarkerSize = _dereq_('../scatter/calc').calcMarkerSize;\n\nmodule.exports = function calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var subplotId = trace.subplot;\n    var radialAxis = fullLayout[subplotId].radialaxis;\n    var angularAxis = fullLayout[subplotId].angularaxis;\n    var rArray = radialAxis.makeCalcdata(trace, 'r');\n    var thetaArray = angularAxis.makeCalcdata(trace, 'theta');\n    var len = trace._length;\n    var cd = new Array(len);\n\n    for(var i = 0; i < len; i++) {\n        var r = rArray[i];\n        var theta = thetaArray[i];\n        var cdi = cd[i] = {};\n\n        if(isNumeric(r) && isNumeric(theta)) {\n            cdi.r = r;\n            cdi.theta = theta;\n        } else {\n            cdi.r = BADNUM;\n        }\n    }\n\n    var ppad = calcMarkerSize(trace, len);\n    trace._extremes.x = Axes.findExtremes(radialAxis, rArray, {ppad: ppad});\n\n    calcColorscale(gd, trace);\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\n},{\"../../constants/numerical\":680,\"../../plots/cartesian/axes\":751,\"../scatter/arrays_to_calcdata\":1074,\"../scatter/calc\":1076,\"../scatter/calc_selection\":1077,\"../scatter/colorscale_calc\":1078,\"fast-isnumeric\":224}],1138:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleLineShapeDefaults = _dereq_('../scatter/line_shape_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\nvar PTS_LINESONLY = _dereq_('../scatter/constants').PTS_LINESONLY;\n\nvar attributes = _dereq_('./attributes');\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleRThetaDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('thetaunit');\n    coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');\n    coerce('text');\n    coerce('hovertext');\n    if(traceOut.hoveron !== 'fills') coerce('hovertemplate');\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        handleLineShapeDefaults(traceIn, traceOut, coerce);\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    var dfltHoverOn = [];\n\n    if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) {\n        coerce('cliponaxis');\n        coerce('marker.maxdisplayed');\n        dfltHoverOn.push('points');\n    }\n\n    coerce('fill');\n\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n        if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);\n    }\n\n    if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') {\n        dfltHoverOn.push('fills');\n    }\n    coerce('hoveron', dfltHoverOn.join('+') || 'points');\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n}\n\nfunction handleRThetaDefaults(traceIn, traceOut, layout, coerce) {\n    var r = coerce('r');\n    var theta = coerce('theta');\n    var len;\n\n    if(r) {\n        if(theta) {\n            len = Math.min(r.length, theta.length);\n        } else {\n            len = r.length;\n            coerce('theta0');\n            coerce('dtheta');\n        }\n    } else {\n        if(!theta) return 0;\n        len = traceOut.theta.length;\n        coerce('r0');\n        coerce('dr');\n    }\n\n    traceOut._length = len;\n    return len;\n}\n\nmodule.exports = {\n    handleRThetaDefaults: handleRThetaDefaults,\n    supplyDefaults: supplyDefaults\n};\n\n},{\"../../lib\":703,\"../scatter/constants\":1079,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/line_shape_defaults\":1089,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1136}],1139:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterHover = _dereq_('../scatter/hover');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar Lib = _dereq_('../../lib');\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var scatterPointData = scatterHover(pointData, xval, yval, hovermode);\n    if(!scatterPointData || scatterPointData[0].index === false) return;\n\n    var newPointData = scatterPointData[0];\n\n    // hovering on fill case\n    if(newPointData.index === undefined) {\n        return scatterPointData;\n    }\n\n    var subplot = pointData.subplot;\n    var cdi = newPointData.cd[newPointData.index];\n    var trace = newPointData.trace;\n\n    if(!subplot.isPtInside(cdi)) return;\n\n    newPointData.xLabelVal = undefined;\n    newPointData.yLabelVal = undefined;\n    makeHoverPointText(cdi, trace, subplot, newPointData);\n    newPointData.hovertemplate = trace.hovertemplate;\n    return scatterPointData;\n}\n\nfunction makeHoverPointText(cdi, trace, subplot, pointData) {\n    var radialAxis = subplot.radialAxis;\n    var angularAxis = subplot.angularAxis;\n    radialAxis._hovertitle = 'r';\n    angularAxis._hovertitle = 'θ';\n\n    var hoverinfo = cdi.hi || trace.hoverinfo;\n    var text = [];\n    function textPart(ax, val) {\n        text.push(ax._hovertitle + ': ' + Axes.tickText(ax, val, 'hover').text);\n    }\n\n    if(!trace.hovertemplate) {\n        var parts = hoverinfo.split('+');\n\n        if(parts.indexOf('all') !== -1) parts = ['r', 'theta', 'text'];\n        if(parts.indexOf('r') !== -1) {\n            textPart(radialAxis, radialAxis.c2l(cdi.r));\n        }\n        if(parts.indexOf('theta') !== -1) {\n            var theta = cdi.theta;\n            textPart(\n                angularAxis,\n                angularAxis.thetaunit === 'degrees' ? Lib.rad2deg(theta) : theta\n            );\n        }\n        if(parts.indexOf('text') !== -1 && pointData.text) {\n            text.push(pointData.text);\n            delete pointData.text;\n        }\n\n        pointData.extraText = text.join('<br>');\n    }\n}\n\nmodule.exports = {\n    hoverPoints: hoverPoints,\n    makeHoverPointText: makeHoverPointText\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../scatter/hover\":1085}],1140:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'scatterpolar',\n    basePlotModule: _dereq_('../../plots/polar'),\n    categories: ['polar', 'symbols', 'showLegend', 'scatter-like'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('../scatter/style').style,\n    hoverPoints: _dereq_('./hover').hoverPoints,\n    selectPoints: _dereq_('../scatter/select'),\n\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/polar\":815,\"../scatter/marker_colorbar\":1092,\"../scatter/select\":1095,\"../scatter/style\":1097,\"./attributes\":1136,\"./calc\":1137,\"./defaults\":1138,\"./hover\":1139,\"./plot\":1141}],1141:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterPlot = _dereq_('../scatter/plot');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function plot(gd, subplot, moduleCalcData) {\n    var mlayer = subplot.layers.frontplot.select('g.scatterlayer');\n\n    var plotinfo = {\n        xaxis: subplot.xaxis,\n        yaxis: subplot.yaxis,\n        plot: subplot.framework,\n        layerClipId: subplot._hasClipOnAxisFalse ? subplot.clipIds.forTraces : null\n    };\n\n    var radialAxis = subplot.radialAxis;\n    var angularAxis = subplot.angularAxis;\n\n    // convert:\n    // 'c' (r,theta) -> 'geometric' (r,theta) -> (x,y)\n    for(var i = 0; i < moduleCalcData.length; i++) {\n        var cdi = moduleCalcData[i];\n\n        for(var j = 0; j < cdi.length; j++) {\n            var cd = cdi[j];\n            var r = cd.r;\n\n            if(r === BADNUM) {\n                cd.x = cd.y = BADNUM;\n            } else {\n                var rg = radialAxis.c2g(r);\n                var thetag = angularAxis.c2g(cd.theta);\n                cd.x = rg * Math.cos(thetag);\n                cd.y = rg * Math.sin(thetag);\n            }\n        }\n    }\n\n    scatterPlot(gd, plotinfo, moduleCalcData, mlayer);\n};\n\n},{\"../../constants/numerical\":680,\"../scatter/plot\":1094}],1142:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterPolarAttrs = _dereq_('../scatterpolar/attributes');\nvar scatterGlAttrs = _dereq_('../scattergl/attributes');\n\nmodule.exports = {\n    mode: scatterPolarAttrs.mode,\n    r: scatterPolarAttrs.r,\n    theta: scatterPolarAttrs.theta,\n    r0: scatterPolarAttrs.r0,\n    dr: scatterPolarAttrs.dr,\n    theta0: scatterPolarAttrs.theta0,\n    dtheta: scatterPolarAttrs.dtheta,\n    thetaunit: scatterPolarAttrs.thetaunit,\n\n    text: scatterPolarAttrs.text,\n    hovertext: scatterPolarAttrs.hovertext,\n    hovertemplate: scatterPolarAttrs.hovertemplate,\n\n    line: scatterGlAttrs.line,\n    connectgaps: scatterGlAttrs.connectgaps,\n\n    marker: scatterGlAttrs.marker,\n    // no cliponaxis\n\n    fill: scatterGlAttrs.fill,\n    fillcolor: scatterGlAttrs.fillcolor,\n\n    textposition: scatterGlAttrs.textposition,\n    textfont: scatterGlAttrs.textfont,\n\n    hoverinfo: scatterPolarAttrs.hoverinfo,\n    // no hoveron\n\n    selected: scatterPolarAttrs.selected,\n    unselected: scatterPolarAttrs.unselected\n};\n\n},{\"../scattergl/attributes\":1123,\"../scatterpolar/attributes\":1136}],1143:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleRThetaDefaults = _dereq_('../scatterpolar/defaults').handleRThetaDefaults;\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\nvar PTS_LINESONLY = _dereq_('../scatter/constants').PTS_LINESONLY;\n\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleRThetaDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('thetaunit');\n    coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');\n    coerce('text');\n    coerce('hovertext');\n    if(traceOut.hoveron !== 'fills') coerce('hovertemplate');\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n    }\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../scatter/constants\":1079,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"../scatterpolar/defaults\":1138,\"./attributes\":1142}],1144:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar cluster = _dereq_('point-cluster');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar ScatterGl = _dereq_('../scattergl');\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar calcMarkerSize = _dereq_('../scatter/calc').calcMarkerSize;\nvar convert = _dereq_('../scattergl/convert');\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar makeHoverPointText = _dereq_('../scatterpolar/hover').makeHoverPointText;\n\nvar TOO_MANY_POINTS = _dereq_('../scattergl/constants').TOO_MANY_POINTS;\n\nfunction calc(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var subplotId = trace.subplot;\n    var radialAxis = fullLayout[subplotId].radialaxis;\n    var angularAxis = fullLayout[subplotId].angularaxis;\n    var rArray = radialAxis.makeCalcdata(trace, 'r');\n    var thetaArray = angularAxis.makeCalcdata(trace, 'theta');\n    var len = trace._length;\n    var stash = {};\n\n    if(len < rArray.length) rArray = rArray.slice(0, len);\n    if(len < thetaArray.length) thetaArray = thetaArray.slice(0, len);\n\n    stash.r = rArray;\n    stash.theta = thetaArray;\n\n    calcColorscale(gd, trace);\n\n    // only compute 'style' options in calc, as position options\n    // depend on the radial range and must be set in plot\n    var opts = stash.opts = convert.style(gd, trace);\n\n    // For graphs with very large number of points and array marker.size,\n    // use average marker size instead to speed things up.\n    var ppad;\n    if(len < TOO_MANY_POINTS) {\n        ppad = calcMarkerSize(trace, len);\n    } else if(opts.marker) {\n        ppad = 2 * (opts.marker.sizeAvg || Math.max(opts.marker.size, 3));\n    }\n    trace._extremes.x = Axes.findExtremes(radialAxis, rArray, {ppad: ppad});\n\n    return [{x: false, y: false, t: stash, trace: trace}];\n}\n\nfunction plot(gd, subplot, cdata) {\n    if(!cdata.length) return;\n\n    var radialAxis = subplot.radialAxis;\n    var angularAxis = subplot.angularAxis;\n    var scene = ScatterGl.sceneUpdate(gd, subplot);\n\n    cdata.forEach(function(cdscatter) {\n        if(!cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;\n        var cd = cdscatter[0];\n        var trace = cd.trace;\n        var stash = cd.t;\n        var len = trace._length;\n        var rArray = stash.r;\n        var thetaArray = stash.theta;\n        var opts = stash.opts;\n        var i;\n\n        var subRArray = rArray.slice();\n        var subThetaArray = thetaArray.slice();\n\n        // filter out by range\n        for(i = 0; i < rArray.length; i++) {\n            if(!subplot.isPtInside({r: rArray[i], theta: thetaArray[i]})) {\n                subRArray[i] = NaN;\n                subThetaArray[i] = NaN;\n            }\n        }\n\n        var positions = new Array(len * 2);\n        var x = Array(len);\n        var y = Array(len);\n\n        for(i = 0; i < len; i++) {\n            var r = subRArray[i];\n            var xx, yy;\n\n            if(isNumeric(r)) {\n                var rg = radialAxis.c2g(r);\n                var thetag = angularAxis.c2g(subThetaArray[i], trace.thetaunit);\n                xx = rg * Math.cos(thetag);\n                yy = rg * Math.sin(thetag);\n            } else {\n                xx = yy = NaN;\n            }\n            x[i] = positions[i * 2] = xx;\n            y[i] = positions[i * 2 + 1] = yy;\n        }\n\n        stash.tree = cluster(positions);\n\n        // FIXME: see scattergl.js#109\n        if(opts.marker && len >= TOO_MANY_POINTS) {\n            opts.marker.cluster = stash.tree;\n        }\n\n        if(opts.marker) {\n            opts.markerSel.positions = opts.markerUnsel.positions = opts.marker.positions = positions;\n        }\n\n        if(opts.line && positions.length > 1) {\n            Lib.extendFlat(\n                opts.line,\n                convert.linePositions(gd, trace, positions)\n            );\n        }\n\n        if(opts.text) {\n            Lib.extendFlat(\n                opts.text,\n                {positions: positions},\n                convert.textPosition(gd, trace, opts.text, opts.marker)\n            );\n            Lib.extendFlat(\n                opts.textSel,\n                {positions: positions},\n                convert.textPosition(gd, trace, opts.text, opts.markerSel)\n            );\n            Lib.extendFlat(\n                opts.textUnsel,\n                {positions: positions},\n                convert.textPosition(gd, trace, opts.text, opts.markerUnsel)\n            );\n        }\n\n        if(opts.fill && !scene.fill2d) scene.fill2d = true;\n        if(opts.marker && !scene.scatter2d) scene.scatter2d = true;\n        if(opts.line && !scene.line2d) scene.line2d = true;\n        if(opts.text && !scene.glText) scene.glText = true;\n\n        scene.lineOptions.push(opts.line);\n        scene.fillOptions.push(opts.fill);\n        scene.markerOptions.push(opts.marker);\n        scene.markerSelectedOptions.push(opts.markerSel);\n        scene.markerUnselectedOptions.push(opts.markerUnsel);\n        scene.textOptions.push(opts.text);\n        scene.textSelectedOptions.push(opts.textSel);\n        scene.textUnselectedOptions.push(opts.textUnsel);\n        scene.selectBatch.push([]);\n        scene.unselectBatch.push([]);\n\n        stash.x = x;\n        stash.y = y;\n        stash.rawx = x;\n        stash.rawy = y;\n        stash.r = rArray;\n        stash.theta = thetaArray;\n        stash.positions = positions;\n        stash._scene = scene;\n        stash.index = scene.count;\n        scene.count++;\n    });\n\n    return ScatterGl.plot(gd, subplot, cdata);\n}\n\nfunction hoverPoints(pointData, xval, yval, hovermode) {\n    var cd = pointData.cd;\n    var stash = cd[0].t;\n    var rArray = stash.r;\n    var thetaArray = stash.theta;\n\n    var scatterPointData = ScatterGl.hoverPoints(pointData, xval, yval, hovermode);\n    if(!scatterPointData || scatterPointData[0].index === false) return;\n\n    var newPointData = scatterPointData[0];\n\n    if(newPointData.index === undefined) {\n        return scatterPointData;\n    }\n\n    var subplot = pointData.subplot;\n    var cdi = newPointData.cd[newPointData.index];\n    var trace = newPointData.trace;\n\n    // augment pointData with r/theta param\n    cdi.r = rArray[newPointData.index];\n    cdi.theta = thetaArray[newPointData.index];\n\n    if(!subplot.isPtInside(cdi)) return;\n\n    newPointData.xLabelVal = undefined;\n    newPointData.yLabelVal = undefined;\n    makeHoverPointText(cdi, trace, subplot, newPointData);\n\n    return scatterPointData;\n}\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'scatterpolargl',\n    basePlotModule: _dereq_('../../plots/polar'),\n    categories: ['gl', 'regl', 'polar', 'symbols', 'showLegend', 'scatter-like'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n\n    calc: calc,\n    plot: plot,\n    hoverPoints: hoverPoints,\n    selectPoints: ScatterGl.selectPoints,\n\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../../plots/polar\":815,\"../scatter/calc\":1076,\"../scatter/colorscale_calc\":1078,\"../scatter/marker_colorbar\":1092,\"../scattergl\":1127,\"../scattergl/constants\":1124,\"../scattergl/convert\":1125,\"../scatterpolar/hover\":1139,\"./attributes\":1142,\"./defaults\":1143,\"fast-isnumeric\":224,\"point-cluster\":464}],1145:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar dash = _dereq_('../../components/drawing/attributes').dash;\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterLineAttrs = scatterAttrs.line;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nmodule.exports = {\n    a: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    b: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    c: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    sum: {\n        valType: 'number',\n        \n        dflt: 0,\n        min: 0,\n        editType: 'calc',\n        \n    },\n    mode: extendFlat({}, scatterAttrs.mode, {dflt: 'markers'}),\n    text: extendFlat({}, scatterAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterAttrs.hovertext, {\n        \n    }),\n    line: {\n        color: scatterLineAttrs.color,\n        width: scatterLineAttrs.width,\n        dash: dash,\n        shape: extendFlat({}, scatterLineAttrs.shape,\n            {values: ['linear', 'spline']}),\n        smoothing: scatterLineAttrs.smoothing,\n        editType: 'calc'\n    },\n    connectgaps: scatterAttrs.connectgaps,\n    cliponaxis: scatterAttrs.cliponaxis,\n    fill: extendFlat({}, scatterAttrs.fill, {\n        values: ['none', 'toself', 'tonext'],\n        dflt: 'none',\n        \n    }),\n    fillcolor: scatterAttrs.fillcolor,\n    marker: extendFlat({\n        symbol: scatterMarkerAttrs.symbol,\n        opacity: scatterMarkerAttrs.opacity,\n        maxdisplayed: scatterMarkerAttrs.maxdisplayed,\n        size: scatterMarkerAttrs.size,\n        sizeref: scatterMarkerAttrs.sizeref,\n        sizemin: scatterMarkerAttrs.sizemin,\n        sizemode: scatterMarkerAttrs.sizemode,\n        line: extendFlat({\n            width: scatterMarkerLineAttrs.width,\n            editType: 'calc'\n        },\n            colorScaleAttrs('marker.line')\n        ),\n        gradient: scatterMarkerAttrs.gradient,\n        editType: 'calc'\n    },\n        colorScaleAttrs('marker')\n    ),\n\n    textfont: scatterAttrs.textfont,\n    textposition: scatterAttrs.textposition,\n\n    selected: scatterAttrs.selected,\n    unselected: scatterAttrs.unselected,\n\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['a', 'b', 'c', 'text', 'name']\n    }),\n    hoveron: scatterAttrs.hoveron,\n    hovertemplate: hovertemplateAttrs(),\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/drawing/attributes\":600,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../scatter/attributes\":1075}],1146:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar arraysToCalcdata = _dereq_('../scatter/arrays_to_calcdata');\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar calcMarkerSize = _dereq_('../scatter/calc').calcMarkerSize;\n\nvar dataArrays = ['a', 'b', 'c'];\nvar arraysToFill = {a: ['b', 'c'], b: ['a', 'c'], c: ['a', 'b']};\n\nmodule.exports = function calc(gd, trace) {\n    var ternary = gd._fullLayout[trace.subplot];\n    var displaySum = ternary.sum;\n    var normSum = trace.sum || displaySum;\n    var arrays = {a: trace.a, b: trace.b, c: trace.c};\n\n    var i, j, dataArray, newArray, fillArray1, fillArray2;\n\n    // fill in one missing component\n    for(i = 0; i < dataArrays.length; i++) {\n        dataArray = dataArrays[i];\n        if(arrays[dataArray]) continue;\n\n        fillArray1 = arrays[arraysToFill[dataArray][0]];\n        fillArray2 = arrays[arraysToFill[dataArray][1]];\n        newArray = new Array(fillArray1.length);\n        for(j = 0; j < fillArray1.length; j++) {\n            newArray[j] = normSum - fillArray1[j] - fillArray2[j];\n        }\n        arrays[dataArray] = newArray;\n    }\n\n    // make the calcdata array\n    var serieslen = trace._length;\n    var cd = new Array(serieslen);\n    var a, b, c, norm, x, y;\n    for(i = 0; i < serieslen; i++) {\n        a = arrays.a[i];\n        b = arrays.b[i];\n        c = arrays.c[i];\n        if(isNumeric(a) && isNumeric(b) && isNumeric(c)) {\n            a = +a;\n            b = +b;\n            c = +c;\n            norm = displaySum / (a + b + c);\n            if(norm !== 1) {\n                a *= norm;\n                b *= norm;\n                c *= norm;\n            }\n            // map a, b, c onto x and y where the full scale of y\n            // is [0, sum], and x is [-sum, sum]\n            // TODO: this makes `a` always the top, `b` the bottom left,\n            // and `c` the bottom right. Do we want options to rearrange\n            // these?\n            y = a;\n            x = c - b;\n            cd[i] = {x: x, y: y, a: a, b: b, c: c};\n        } else cd[i] = {x: false, y: false};\n    }\n\n    calcMarkerSize(trace, serieslen);\n    calcColorscale(gd, trace);\n    arraysToCalcdata(cd, trace);\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\n},{\"../scatter/arrays_to_calcdata\":1074,\"../scatter/calc\":1076,\"../scatter/calc_selection\":1077,\"../scatter/colorscale_calc\":1078,\"fast-isnumeric\":224}],1147:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar constants = _dereq_('../scatter/constants');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar handleLineDefaults = _dereq_('../scatter/line_defaults');\nvar handleLineShapeDefaults = _dereq_('../scatter/line_shape_defaults');\nvar handleTextDefaults = _dereq_('../scatter/text_defaults');\nvar handleFillColorDefaults = _dereq_('../scatter/fillcolor_defaults');\n\nvar attributes = _dereq_('./attributes');\n\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var a = coerce('a');\n    var b = coerce('b');\n    var c = coerce('c');\n    var len;\n\n    // allow any one array to be missing, len is the minimum length of those\n    // present. Note that after coerce data_array's are either Arrays (which\n    // are truthy even if empty) or undefined. As in scatter, an empty array\n    // is different from undefined, because it can signify that this data is\n    // not known yet but expected in the future\n    if(a) {\n        len = a.length;\n        if(b) {\n            len = Math.min(len, b.length);\n            if(c) len = Math.min(len, c.length);\n        } else if(c) len = Math.min(len, c.length);\n        else len = 0;\n    } else if(b && c) {\n        len = Math.min(b.length, c.length);\n    }\n\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    traceOut._length = len;\n\n    coerce('sum');\n\n    coerce('text');\n    coerce('hovertext');\n    if(traceOut.hoveron !== 'fills') coerce('hovertemplate');\n\n    var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines';\n    coerce('mode', defaultMode);\n\n    if(subTypes.hasLines(traceOut)) {\n        handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n        handleLineShapeDefaults(traceIn, traceOut, coerce);\n        coerce('connectgaps');\n    }\n\n    if(subTypes.hasMarkers(traceOut)) {\n        handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true});\n    }\n\n    if(subTypes.hasText(traceOut)) {\n        handleTextDefaults(traceIn, traceOut, layout, coerce);\n    }\n\n    var dfltHoverOn = [];\n\n    if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) {\n        coerce('cliponaxis');\n        coerce('marker.maxdisplayed');\n        dfltHoverOn.push('points');\n    }\n\n    coerce('fill');\n    if(traceOut.fill !== 'none') {\n        handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);\n        if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);\n    }\n\n    if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') {\n        dfltHoverOn.push('fills');\n    }\n    coerce('hoveron', dfltHoverOn.join('+') || 'points');\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\n},{\"../../lib\":703,\"../scatter/constants\":1079,\"../scatter/fillcolor_defaults\":1083,\"../scatter/line_defaults\":1087,\"../scatter/line_shape_defaults\":1089,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"../scatter/text_defaults\":1099,\"./attributes\":1145}],1148:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = function eventData(out, pt, trace, cd, pointNumber) {\n    if(pt.xa) out.xaxis = pt.xa;\n    if(pt.ya) out.yaxis = pt.ya;\n\n    if(cd[pointNumber]) {\n        var cdi = cd[pointNumber];\n\n        // N.B. These are the normalized coordinates.\n        out.a = cdi.a;\n        out.b = cdi.b;\n        out.c = cdi.c;\n    } else {\n        // for fill-hover only\n        out.a = pt.a;\n        out.b = pt.b;\n        out.c = pt.c;\n    }\n\n    return out;\n};\n\n},{}],1149:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar scatterHover = _dereq_('../scatter/hover');\nvar Axes = _dereq_('../../plots/cartesian/axes');\n\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var scatterPointData = scatterHover(pointData, xval, yval, hovermode);\n    if(!scatterPointData || scatterPointData[0].index === false) return;\n\n    var newPointData = scatterPointData[0];\n\n    // if hovering on a fill, we don't show any point data so the label is\n    // unchanged from what scatter gives us - except that it needs to\n    // be constrained to the trianglular plot area, not just the rectangular\n    // area defined by the synthetic x and y axes\n    // TODO: in some cases the vertical middle of the shape is not within\n    // the triangular viewport at all, so the label can become disconnected\n    // from the shape entirely. But calculating what portion of the shape\n    // is actually visible, as constrained by the diagonal axis lines, is not\n    // so easy and anyway we lost the information we would have needed to do\n    // this inside scatterHover.\n    if(newPointData.index === undefined) {\n        var yFracUp = 1 - (newPointData.y0 / pointData.ya._length);\n        var xLen = pointData.xa._length;\n        var xMin = xLen * yFracUp / 2;\n        var xMax = xLen - xMin;\n        newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin);\n        newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin);\n        return scatterPointData;\n    }\n\n    var cdi = newPointData.cd[newPointData.index];\n\n    newPointData.a = cdi.a;\n    newPointData.b = cdi.b;\n    newPointData.c = cdi.c;\n\n    newPointData.xLabelVal = undefined;\n    newPointData.yLabelVal = undefined;\n    // TODO: nice formatting, and label by axis title, for a, b, and c?\n\n    var trace = newPointData.trace;\n    var ternary = newPointData.subplot;\n    var hoverinfo = cdi.hi || trace.hoverinfo;\n    var text = [];\n    function textPart(ax, val) {\n        text.push(ax._hovertitle + ': ' + Axes.tickText(ax, val, 'hover').text);\n    }\n    if(!trace.hovertemplate) {\n        var parts = hoverinfo.split('+');\n        if(parts.indexOf('all') !== -1) parts = ['a', 'b', 'c'];\n        if(parts.indexOf('a') !== -1) textPart(ternary.aaxis, cdi.a);\n        if(parts.indexOf('b') !== -1) textPart(ternary.baxis, cdi.b);\n        if(parts.indexOf('c') !== -1) textPart(ternary.caxis, cdi.c);\n    }\n    newPointData.extraText = text.join('<br>');\n    newPointData.hovertemplate = trace.hovertemplate;\n    return scatterPointData;\n};\n\n},{\"../../plots/cartesian/axes\":751,\"../scatter/hover\":1085}],1150:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('../scatter/style').style,\n    styleOnSelect: _dereq_('../scatter/style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../scatter/select'),\n    eventData: _dereq_('./event_data'),\n\n    moduleType: 'trace',\n    name: 'scatterternary',\n    basePlotModule: _dereq_('../../plots/ternary'),\n    categories: ['ternary', 'symbols', 'showLegend', 'scatter-like'],\n    meta: {\n        \n        \n    }\n};\n\n},{\"../../plots/ternary\":827,\"../scatter/marker_colorbar\":1092,\"../scatter/select\":1095,\"../scatter/style\":1097,\"./attributes\":1145,\"./calc\":1146,\"./defaults\":1147,\"./event_data\":1148,\"./hover\":1149,\"./plot\":1151}],1151:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar scatterPlot = _dereq_('../scatter/plot');\n\nmodule.exports = function plot(gd, ternary, moduleCalcData) {\n    var plotContainer = ternary.plotContainer;\n\n    // remove all nodes inside the scatter layer\n    plotContainer.select('.scatterlayer').selectAll('*').remove();\n\n    // mimic cartesian plotinfo\n    var plotinfo = {\n        xaxis: ternary.xaxis,\n        yaxis: ternary.yaxis,\n        plot: plotContainer,\n        layerClipId: ternary._hasClipOnAxisFalse ? ternary.clipIdRelative : null\n    };\n\n    var scatterLayer = ternary.layers.frontplot.select('g.scatterlayer');\n\n    scatterPlot(gd, plotinfo, moduleCalcData, scatterLayer);\n};\n\n},{\"../scatter/plot\":1094}],1152:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar scatterAttrs = _dereq_('../scatter/attributes');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar scatterGlAttrs = _dereq_('../scattergl/attributes');\nvar cartesianIdRegex = _dereq_('../../plots/cartesian/constants').idRegex;\nvar templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar scatterMarkerAttrs = scatterAttrs.marker;\nvar scatterMarkerLineAttrs = scatterMarkerAttrs.line;\n\nvar markerLineAttrs = extendFlat(colorScaleAttrs('marker.line', {editTypeOverride: 'calc'}), {\n    width: extendFlat({}, scatterMarkerLineAttrs.width, {editType: 'calc'}),\n    editType: 'calc'\n});\n\nvar markerAttrs = extendFlat(colorScaleAttrs('marker'), {\n    symbol: scatterMarkerAttrs.symbol,\n    size: extendFlat({}, scatterMarkerAttrs.size, {editType: 'markerSize'}),\n    sizeref: scatterMarkerAttrs.sizeref,\n    sizemin: scatterMarkerAttrs.sizemin,\n    sizemode: scatterMarkerAttrs.sizemode,\n    opacity: scatterMarkerAttrs.opacity,\n    colorbar: scatterMarkerAttrs.colorbar,\n    line: markerLineAttrs,\n    editType: 'calc'\n});\n\nmarkerAttrs.color.editType = markerAttrs.cmin.editType = markerAttrs.cmax.editType = 'style';\n\nfunction makeAxesValObject(axLetter) {\n    return {\n        valType: 'info_array',\n        freeLength: true,\n        \n        editType: 'calc',\n        items: {\n            valType: 'subplotid',\n            regex: cartesianIdRegex[axLetter],\n            editType: 'plot'\n        },\n        \n    };\n}\n\nmodule.exports = {\n    dimensions: templatedArray('dimension', {\n        visible: {\n            valType: 'boolean',\n            \n            dflt: true,\n            editType: 'calc',\n            \n        },\n        label: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        values: {\n            valType: 'data_array',\n            \n            editType: 'calc+clearAxisTypes',\n            \n        },\n\n        axis: {\n            type: {\n                valType: 'enumerated',\n                values: ['linear', 'log', 'date', 'category'],\n                \n                editType: 'calc+clearAxisTypes',\n                \n            },\n\n            // TODO make 'true' the default in v2?\n            matches: {\n                valType: 'boolean',\n                dflt: false,\n                \n                editType: 'calc',\n                \n            },\n\n            editType: 'calc+clearAxisTypes'\n        },\n\n        // TODO should add an attribute to pin down x only vars and y only vars\n        // like https://seaborn.pydata.org/generated/seaborn.pairplot.html\n        // x_vars and y_vars\n\n        // maybe more axis defaulting option e.g. `showgrid: false`\n\n        editType: 'calc+clearAxisTypes'\n    }),\n\n    // mode: {}, (only 'markers' for now)\n\n    text: extendFlat({}, scatterGlAttrs.text, {\n        \n    }),\n    hovertext: extendFlat({}, scatterGlAttrs.hovertext, {\n        \n    }),\n\n    hovertemplate: hovertemplateAttrs(),\n\n    marker: markerAttrs,\n\n    xaxes: makeAxesValObject('x'),\n    yaxes: makeAxesValObject('y'),\n\n    diagonal: {\n        visible: {\n            valType: 'boolean',\n            \n            dflt: true,\n            editType: 'calc',\n            \n        },\n\n        // type: 'scattergl' | 'histogram' | 'box' | 'violin'\n        // ...\n        // more options\n\n        editType: 'calc'\n    },\n\n    showupperhalf: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc',\n        \n    },\n    showlowerhalf: {\n        valType: 'boolean',\n        \n        dflt: true,\n        editType: 'calc',\n        \n    },\n\n    selected: {\n        marker: scatterGlAttrs.selected.marker,\n        editType: 'calc'\n    },\n    unselected: {\n        marker: scatterGlAttrs.unselected.marker,\n        editType: 'calc'\n    },\n\n    opacity: scatterGlAttrs.opacity\n};\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/plot_template\":741,\"../../plots/cartesian/constants\":757,\"../scatter/attributes\":1075,\"../scattergl/attributes\":1123}],1153:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createLine = _dereq_('regl-line2d');\n\nvar Registry = _dereq_('../../registry');\nvar prepareRegl = _dereq_('../../lib/prepare_regl');\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\nvar Cartesian = _dereq_('../../plots/cartesian');\nvar getFromId = _dereq_('../../plots/cartesian/axis_ids').getFromId;\nvar shouldShowZeroLine = _dereq_('../../plots/cartesian/axes').shouldShowZeroLine;\n\nvar SPLOM = 'splom';\n\nfunction plot(gd) {\n    var fullLayout = gd._fullLayout;\n    var _module = Registry.getModule(SPLOM);\n    var splomCalcData = getModuleCalcData(gd.calcdata, _module)[0];\n\n    var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint']);\n    if(!success) return;\n\n    if(fullLayout._hasOnlyLargeSploms) {\n        updateGrid(gd);\n    }\n\n    _module.plot(gd, {}, splomCalcData);\n}\n\nfunction drag(gd) {\n    var cd = gd.calcdata;\n    var fullLayout = gd._fullLayout;\n\n    if(fullLayout._hasOnlyLargeSploms) {\n        updateGrid(gd);\n    }\n\n    for(var i = 0; i < cd.length; i++) {\n        var cd0 = cd[i][0];\n        var trace = cd0.trace;\n        var scene = fullLayout._splomScenes[trace.uid];\n\n        if(trace.type === 'splom' && scene && scene.matrix) {\n            dragOne(gd, trace, scene);\n        }\n    }\n}\n\nfunction dragOne(gd, trace, scene) {\n    var visibleLength = scene.matrixOptions.data.length;\n    var visibleDims = trace._visibleDims;\n    var ranges = scene.viewOpts.ranges = new Array(visibleLength);\n\n    for(var k = 0; k < visibleDims.length; k++) {\n        var i = visibleDims[k];\n        var rng = ranges[k] = new Array(4);\n\n        var xa = getFromId(gd, trace._diag[i][0]);\n        if(xa) {\n            rng[0] = xa.r2l(xa.range[0]);\n            rng[2] = xa.r2l(xa.range[1]);\n        }\n\n        var ya = getFromId(gd, trace._diag[i][1]);\n        if(ya) {\n            rng[1] = ya.r2l(ya.range[0]);\n            rng[3] = ya.r2l(ya.range[1]);\n        }\n    }\n\n    if(scene.selectBatch.length || scene.unselectBatch.length) {\n        scene.matrix.update({ranges: ranges}, {ranges: ranges});\n    } else {\n        scene.matrix.update({ranges: ranges});\n    }\n}\n\nfunction updateGrid(gd) {\n    var fullLayout = gd._fullLayout;\n    var regl = fullLayout._glcanvas.data()[0].regl;\n    var splomGrid = fullLayout._splomGrid;\n\n    if(!splomGrid) {\n        splomGrid = fullLayout._splomGrid = createLine(regl);\n    }\n    splomGrid.update(makeGridData(gd));\n}\n\nfunction makeGridData(gd) {\n    var fullLayout = gd._fullLayout;\n    var gs = fullLayout._size;\n    var fullView = [0, 0, fullLayout.width, fullLayout.height];\n    var lookup = {};\n    var k;\n\n    function push(prefix, ax, x0, x1, y0, y1) {\n        var lcolor = ax[prefix + 'color'];\n        var lwidth = ax[prefix + 'width'];\n        var key = String(lcolor + lwidth);\n\n        if(key in lookup) {\n            lookup[key].data.push(NaN, NaN, x0, x1, y0, y1);\n        } else {\n            lookup[key] = {\n                data: [x0, x1, y0, y1],\n                join: 'rect',\n                thickness: lwidth,\n                color: lcolor,\n                viewport: fullView,\n                range: fullView,\n                overlay: false\n            };\n        }\n    }\n\n    for(k in fullLayout._splomSubplots) {\n        var sp = fullLayout._plots[k];\n        var xa = sp.xaxis;\n        var ya = sp.yaxis;\n        var xVals = xa._vals;\n        var yVals = ya._vals;\n        // ya.l2p assumes top-to-bottom coordinate system (a la SVG),\n        // we need to compute bottom-to-top offsets and slopes:\n        var yOffset = gs.b + ya.domain[0] * gs.h;\n        var ym = -ya._m;\n        var yb = -ym * ya.r2l(ya.range[0], ya.calendar);\n        var x, y;\n\n        if(xa.showgrid) {\n            for(k = 0; k < xVals.length; k++) {\n                x = xa._offset + xa.l2p(xVals[k].x);\n                push('grid', xa, x, yOffset, x, yOffset + ya._length);\n            }\n        }\n        if(ya.showgrid) {\n            for(k = 0; k < yVals.length; k++) {\n                y = yOffset + yb + ym * yVals[k].x;\n                push('grid', ya, xa._offset, y, xa._offset + xa._length, y);\n            }\n        }\n        if(shouldShowZeroLine(gd, xa, ya)) {\n            x = xa._offset + xa.l2p(0);\n            push('zeroline', xa, x, yOffset, x, yOffset + ya._length);\n        }\n        if(shouldShowZeroLine(gd, ya, xa)) {\n            y = yOffset + yb + 0;\n            push('zeroline', ya, xa._offset, y, xa._offset + xa._length, y);\n        }\n    }\n\n    var gridBatches = [];\n    for(k in lookup) {\n        gridBatches.push(lookup[k]);\n    }\n\n    return gridBatches;\n}\n\nfunction clean(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var lookup = {};\n    var i;\n\n    if(oldFullLayout._splomScenes) {\n        for(i = 0; i < newFullData.length; i++) {\n            var newTrace = newFullData[i];\n            if(newTrace.type === 'splom') {\n                lookup[newTrace.uid] = 1;\n            }\n        }\n        for(i = 0; i < oldFullData.length; i++) {\n            var oldTrace = oldFullData[i];\n            if(!lookup[oldTrace.uid]) {\n                var scene = oldFullLayout._splomScenes[oldTrace.uid];\n                if(scene && scene.destroy) scene.destroy();\n                // must first set scene to null in order to get garbage collected\n                oldFullLayout._splomScenes[oldTrace.uid] = null;\n                delete oldFullLayout._splomScenes[oldTrace.uid];\n            }\n        }\n    }\n\n    if(Object.keys(oldFullLayout._splomScenes || {}).length === 0) {\n        delete oldFullLayout._splomScenes;\n    }\n\n    if(oldFullLayout._splomGrid &&\n        (!newFullLayout._hasOnlyLargeSploms && oldFullLayout._hasOnlyLargeSploms)) {\n        // must first set scene to null in order to get garbage collected\n        oldFullLayout._splomGrid.destroy();\n        oldFullLayout._splomGrid = null;\n        delete oldFullLayout._splomGrid;\n    }\n\n    Cartesian.clean(newFullData, newFullLayout, oldFullData, oldFullLayout);\n}\n\nmodule.exports = {\n    name: SPLOM,\n    attr: Cartesian.attr,\n    attrRegex: Cartesian.attrRegex,\n    layoutAttributes: Cartesian.layoutAttributes,\n    supplyLayoutDefaults: Cartesian.supplyLayoutDefaults,\n    drawFramework: Cartesian.drawFramework,\n    plot: plot,\n    drag: drag,\n    updateGrid: updateGrid,\n    clean: clean,\n    updateFx: Cartesian.updateFx,\n    toSVG: Cartesian.toSVG\n};\n\n},{\"../../lib/prepare_regl\":716,\"../../plots/cartesian\":762,\"../../plots/cartesian/axes\":751,\"../../plots/cartesian/axis_ids\":754,\"../../plots/get_data\":786,\"../../registry\":831,\"regl-line2d\":486}],1154:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');\n\nvar attributes = _dereq_('./attributes');\nvar subTypes = _dereq_('../scatter/subtypes');\nvar handleMarkerDefaults = _dereq_('../scatter/marker_defaults');\nvar mergeLength = _dereq_('../parcoords/merge_length');\nvar OPEN_RE = /-open/;\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var dimensions = handleArrayContainerDefaults(traceIn, traceOut, {\n        name: 'dimensions',\n        handleItemDefaults: dimensionDefaults\n    });\n\n    var showDiag = coerce('diagonal.visible');\n    var showUpper = coerce('showupperhalf');\n    var showLower = coerce('showlowerhalf');\n\n    var dimLength = mergeLength(traceOut, dimensions, 'values');\n\n    if(!dimLength || (!showDiag && !showUpper && !showLower)) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n\n    var isOpen = OPEN_RE.test(traceOut.marker.symbol);\n    var isBubble = subTypes.isBubble(traceOut);\n    coerce('marker.line.width', isOpen || isBubble ? 1 : 0);\n\n    handleAxisDefaults(traceIn, traceOut, layout, coerce);\n\n    Lib.coerceSelectionMarkerOpacity(traceOut, coerce);\n};\n\nfunction dimensionDefaults(dimIn, dimOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(dimIn, dimOut, attributes.dimensions, attr, dflt);\n    }\n\n    coerce('label');\n    var values = coerce('values');\n\n    if(!(values && values.length)) dimOut.visible = false;\n    else coerce('visible');\n\n    coerce('axis.type');\n    coerce('axis.matches');\n}\n\nfunction handleAxisDefaults(traceIn, traceOut, layout, coerce) {\n    var dimensions = traceOut.dimensions;\n    var dimLength = dimensions.length;\n    var showUpper = traceOut.showupperhalf;\n    var showLower = traceOut.showlowerhalf;\n    var showDiag = traceOut.diagonal.visible;\n    var i, j;\n\n    var xAxesDflt = new Array(dimLength);\n    var yAxesDflt = new Array(dimLength);\n\n    for(i = 0; i < dimLength; i++) {\n        var suffix = i ? i + 1 : '';\n        xAxesDflt[i] = 'x' + suffix;\n        yAxesDflt[i] = 'y' + suffix;\n    }\n\n    var xaxes = coerce('xaxes', xAxesDflt);\n    var yaxes = coerce('yaxes', yAxesDflt);\n\n    // build list of [x,y] axis corresponding to each dimensions[i],\n    // very useful for passing options to regl-splom\n    var diag = traceOut._diag = new Array(dimLength);\n\n    // lookup for 'drawn' x|y axes, to avoid costly indexOf downstream\n    traceOut._xaxes = {};\n    traceOut._yaxes = {};\n\n    // list of 'drawn' x|y axes, use to generate list of subplots\n    var xList = [];\n    var yList = [];\n\n    function fillAxisStashes(axId, counterAxId, dim, list) {\n        if(!axId) return;\n\n        var axLetter = axId.charAt(0);\n        var stash = layout._splomAxes[axLetter];\n\n        traceOut['_' + axLetter + 'axes'][axId] = 1;\n        list.push(axId);\n\n        if(!(axId in stash)) {\n            var s = stash[axId] = {};\n            if(dim) {\n                s.label = dim.label || '';\n                if(dim.visible && dim.axis) {\n                    if(dim.axis.type) s.type = dim.axis.type;\n                    if(dim.axis.matches) s.matches = counterAxId;\n                }\n            }\n        }\n    }\n\n    // cases where showDiag and showLower or showUpper are false\n    // no special treatment as the 'drawn' x-axes and y-axes no longer match\n    // the dimensions items and xaxes|yaxes 1-to-1\n    var mustShiftX = !showDiag && !showLower;\n    var mustShiftY = !showDiag && !showUpper;\n\n    traceOut._axesDim = {};\n    for(i = 0; i < dimLength; i++) {\n        var dim = dimensions[i];\n        var i0 = i === 0;\n        var iN = i === dimLength - 1;\n\n        var xaId = (i0 && mustShiftX) || (iN && mustShiftY) ?\n            undefined :\n            xaxes[i];\n\n        var yaId = (i0 && mustShiftY) || (iN && mustShiftX) ?\n            undefined :\n            yaxes[i];\n\n        fillAxisStashes(xaId, yaId, dim, xList);\n        fillAxisStashes(yaId, xaId, dim, yList);\n        diag[i] = [xaId, yaId];\n        traceOut._axesDim[xaId] = i;\n        traceOut._axesDim[yaId] = i;\n    }\n\n    // fill in splom subplot keys\n    for(i = 0; i < xList.length; i++) {\n        for(j = 0; j < yList.length; j++) {\n            var id = xList[i] + yList[j];\n\n            if(i > j && showUpper) {\n                layout._splomSubplots[id] = 1;\n            } else if(i < j && showLower) {\n                layout._splomSubplots[id] = 1;\n            } else if(i === j && (showDiag || !showLower || !showUpper)) {\n                // need to include diagonal subplots when\n                // hiding one half and the diagonal\n                layout._splomSubplots[id] = 1;\n            }\n        }\n    }\n\n    // when lower half is omitted, or when just the diagonal is gone,\n    // override grid default to make sure axes remain on\n    // the left/bottom of the plot area\n    if(!showLower || (!showDiag && showUpper && showLower)) {\n        layout._splomGridDflt.xside = 'bottom';\n        layout._splomGridDflt.yside = 'left';\n    }\n}\n\n},{\"../../lib\":703,\"../../plots/array_container_defaults\":747,\"../parcoords/merge_length\":1046,\"../scatter/marker_defaults\":1093,\"../scatter/subtypes\":1098,\"./attributes\":1152}],1155:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createMatrix = _dereq_('regl-splom');\n\nvar Registry = _dereq_('../../registry');\nvar Grid = _dereq_('../../components/grid');\nvar Lib = _dereq_('../../lib');\nvar AxisIDs = _dereq_('../../plots/cartesian/axis_ids');\n\nvar subTypes = _dereq_('../scatter/subtypes');\nvar calcMarkerSize = _dereq_('../scatter/calc').calcMarkerSize;\nvar calcAxisExpansion = _dereq_('../scatter/calc').calcAxisExpansion;\nvar calcColorscale = _dereq_('../scatter/colorscale_calc');\nvar convertMarkerSelection = _dereq_('../scattergl/convert').markerSelection;\nvar convertMarkerStyle = _dereq_('../scattergl/convert').markerStyle;\nvar calcHover = _dereq_('../scattergl').calcHover;\n\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\nvar TOO_MANY_POINTS = _dereq_('../scattergl/constants').TOO_MANY_POINTS;\n\nfunction calc(gd, trace) {\n    var dimensions = trace.dimensions;\n    var commonLength = trace._length;\n    var opts = {};\n    // 'c' for calculated, 'l' for linear,\n    // only differ here for log axes, pass ldata to createMatrix as 'data'\n    var cdata = opts.cdata = [];\n    var ldata = opts.data = [];\n    // keep track of visible dimensions\n    var visibleDims = trace._visibleDims = [];\n    var i, k, dim, xa, ya;\n\n    function makeCalcdata(ax, dim) {\n        // call makeCalcdata with fake input\n        var ccol = ax.makeCalcdata({\n            v: dim.values,\n            vcalendar: trace.calendar\n        }, 'v');\n\n        for(var j = 0; j < ccol.length; j++) {\n            ccol[j] = ccol[j] === BADNUM ? NaN : ccol[j];\n        }\n        cdata.push(ccol);\n        ldata.push(ax.type === 'log' ? Lib.simpleMap(ccol, ax.c2l) : ccol);\n    }\n\n    for(i = 0; i < dimensions.length; i++) {\n        dim = dimensions[i];\n\n        if(dim.visible) {\n            xa = AxisIDs.getFromId(gd, trace._diag[i][0]);\n            ya = AxisIDs.getFromId(gd, trace._diag[i][1]);\n\n            // if corresponding x & y axes don't have matching types, skip dim\n            if(xa && ya && xa.type !== ya.type) {\n                Lib.log('Skipping splom dimension ' + i + ' with conflicting axis types');\n                continue;\n            }\n\n            if(xa) {\n                makeCalcdata(xa, dim);\n                if(ya && ya.type === 'category') {\n                    ya._categories = xa._categories.slice();\n                }\n            } else {\n                // should not make it here, if both xa and ya undefined\n                makeCalcdata(ya, dim);\n            }\n\n            visibleDims.push(i);\n        }\n    }\n\n    calcColorscale(gd, trace);\n    Lib.extendFlat(opts, convertMarkerStyle(trace));\n\n    var visibleLength = cdata.length;\n    var hasTooManyPoints = (visibleLength * commonLength) > TOO_MANY_POINTS;\n\n    // Reuse SVG scatter axis expansion routine.\n    // For graphs with very large number of points and array marker.size,\n    // use average marker size instead to speed things up.\n    var ppad;\n    if(hasTooManyPoints) {\n        ppad = 2 * (opts.sizeAvg || Math.max(opts.size, 3));\n    } else {\n        ppad = calcMarkerSize(trace, commonLength);\n    }\n\n    for(k = 0; k < visibleDims.length; k++) {\n        i = visibleDims[k];\n        dim = dimensions[i];\n        xa = AxisIDs.getFromId(gd, trace._diag[i][0]) || {};\n        ya = AxisIDs.getFromId(gd, trace._diag[i][1]) || {};\n        calcAxisExpansion(gd, trace, xa, ya, cdata[k], cdata[k], ppad);\n    }\n\n    var scene = sceneUpdate(gd, trace);\n    if(!scene.matrix) scene.matrix = true;\n    scene.matrixOptions = opts;\n\n    scene.selectedOptions = convertMarkerSelection(trace, trace.selected);\n    scene.unselectedOptions = convertMarkerSelection(trace, trace.unselected);\n\n    return [{x: false, y: false, t: {}, trace: trace}];\n}\n\nfunction sceneUpdate(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var uid = trace.uid;\n\n    // must place ref to 'scene' in fullLayout, so that:\n    // - it can be relinked properly on updates\n    // - it can be destroyed properly when needed\n    var splomScenes = fullLayout._splomScenes;\n    if(!splomScenes) splomScenes = fullLayout._splomScenes = {};\n\n    var reset = {dirty: true};\n\n    var first = {\n        matrix: false,\n        selectBatch: [],\n        unselectBatch: []\n    };\n\n    var scene = splomScenes[trace.uid];\n\n    if(!scene) {\n        scene = splomScenes[uid] = Lib.extendFlat({}, reset, first);\n\n        scene.draw = function draw() {\n            if(scene.matrix && scene.matrix.draw) {\n                if(scene.selectBatch.length || scene.unselectBatch.length) {\n                    scene.matrix.draw(scene.unselectBatch, scene.selectBatch);\n                } else {\n                    scene.matrix.draw();\n                }\n            }\n\n            scene.dirty = false;\n        };\n\n        // remove scene resources\n        scene.destroy = function destroy() {\n            if(scene.matrix && scene.matrix.destroy) {\n                scene.matrix.destroy();\n            }\n            scene.matrixOptions = null;\n            scene.selectBatch = null;\n            scene.unselectBatch = null;\n            scene = null;\n        };\n    }\n\n    // In case if we have scene from the last calc - reset data\n    if(!scene.dirty) {\n        Lib.extendFlat(scene, reset);\n    }\n\n    return scene;\n}\n\nfunction plot(gd, _, splomCalcData) {\n    if(!splomCalcData.length) return;\n\n    for(var i = 0; i < splomCalcData.length; i++) {\n        plotOne(gd, splomCalcData[i][0]);\n    }\n}\n\nfunction plotOne(gd, cd0) {\n    var fullLayout = gd._fullLayout;\n    var gs = fullLayout._size;\n    var trace = cd0.trace;\n    var stash = cd0.t;\n    var scene = fullLayout._splomScenes[trace.uid];\n    var matrixOpts = scene.matrixOptions;\n    var cdata = matrixOpts.cdata;\n    var regl = fullLayout._glcanvas.data()[0].regl;\n    var dragmode = fullLayout.dragmode;\n    var xa, ya;\n    var i, j, k;\n\n    if(cdata.length === 0) return;\n\n    // augment options with proper upper/lower halves\n    // regl-splom's default grid starts from bottom-left\n    matrixOpts.lower = trace.showupperhalf;\n    matrixOpts.upper = trace.showlowerhalf;\n    matrixOpts.diagonal = trace.diagonal.visible;\n\n    var visibleDims = trace._visibleDims;\n    var visibleLength = cdata.length;\n    var viewOpts = scene.viewOpts = {};\n    viewOpts.ranges = new Array(visibleLength);\n    viewOpts.domains = new Array(visibleLength);\n\n    for(k = 0; k < visibleDims.length; k++) {\n        i = visibleDims[k];\n\n        var rng = viewOpts.ranges[k] = new Array(4);\n        var dmn = viewOpts.domains[k] = new Array(4);\n\n        xa = AxisIDs.getFromId(gd, trace._diag[i][0]);\n        if(xa) {\n            rng[0] = xa._rl[0];\n            rng[2] = xa._rl[1];\n            dmn[0] = xa.domain[0];\n            dmn[2] = xa.domain[1];\n        }\n\n        ya = AxisIDs.getFromId(gd, trace._diag[i][1]);\n        if(ya) {\n            rng[1] = ya._rl[0];\n            rng[3] = ya._rl[1];\n            dmn[1] = ya.domain[0];\n            dmn[3] = ya.domain[1];\n        }\n    }\n\n    viewOpts.viewport = [gs.l, gs.b, gs.w + gs.l, gs.h + gs.b];\n\n    if(scene.matrix === true) {\n        scene.matrix = createMatrix(regl);\n    }\n\n    var clickSelectEnabled = fullLayout.clickmode.indexOf('select') > -1;\n    var selectMode = dragmode === 'lasso' || dragmode === 'select' ||\n      !!trace.selectedpoints || clickSelectEnabled;\n    var needsBaseUpdate = true;\n\n    if(selectMode) {\n        var commonLength = trace._length;\n\n        // regenerate scene batch, if traces number changed during selection\n        if(trace.selectedpoints) {\n            scene.selectBatch = trace.selectedpoints;\n\n            var selPts = trace.selectedpoints;\n            var selDict = {};\n            for(i = 0; i < selPts.length; i++) {\n                selDict[selPts[i]] = true;\n            }\n            var unselPts = [];\n            for(i = 0; i < commonLength; i++) {\n                if(!selDict[i]) unselPts.push(i);\n            }\n            scene.unselectBatch = unselPts;\n        }\n\n        // precalculate px coords since we are not going to pan during select\n        var xpx = stash.xpx = new Array(visibleLength);\n        var ypx = stash.ypx = new Array(visibleLength);\n\n        for(k = 0; k < visibleDims.length; k++) {\n            i = visibleDims[k];\n\n            xa = AxisIDs.getFromId(gd, trace._diag[i][0]);\n            if(xa) {\n                xpx[k] = new Array(commonLength);\n                for(j = 0; j < commonLength; j++) {\n                    xpx[k][j] = xa.c2p(cdata[k][j]);\n                }\n            }\n\n            ya = AxisIDs.getFromId(gd, trace._diag[i][1]);\n            if(ya) {\n                ypx[k] = new Array(commonLength);\n                for(j = 0; j < commonLength; j++) {\n                    ypx[k][j] = ya.c2p(cdata[k][j]);\n                }\n            }\n        }\n\n        if(scene.selectBatch.length || scene.unselectBatch.length) {\n            var unselOpts = Lib.extendFlat({}, matrixOpts, scene.unselectedOptions, viewOpts);\n            var selOpts = Lib.extendFlat({}, matrixOpts, scene.selectedOptions, viewOpts);\n            scene.matrix.update(unselOpts, selOpts);\n            needsBaseUpdate = false;\n        }\n    } else {\n        stash.xpx = stash.ypx = null;\n    }\n\n    if(needsBaseUpdate) {\n        var opts = Lib.extendFlat({}, matrixOpts, viewOpts);\n        scene.matrix.update(opts, null);\n    }\n}\n\nfunction editStyle(gd, cd0) {\n    var trace = cd0.trace;\n    var scene = gd._fullLayout._splomScenes[trace.uid];\n\n    if(scene) {\n        calcColorscale(gd, trace);\n\n        Lib.extendFlat(scene.matrixOptions, convertMarkerStyle(trace));\n        // TODO [un]selected styles?\n\n        var opts = Lib.extendFlat({}, scene.matrixOptions, scene.viewOpts);\n\n        // TODO this is too long for arrayOk attributes!\n        scene.matrix.update(opts, null);\n    }\n}\n\nfunction hoverPoints(pointData, xval, yval) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var scene = pointData.scene;\n    var cdata = scene.matrixOptions.cdata;\n    var xa = pointData.xa;\n    var ya = pointData.ya;\n    var xpx = xa.c2p(xval);\n    var ypx = ya.c2p(yval);\n    var maxDistance = pointData.distance;\n\n    var xi = getDimIndex(trace, xa);\n    var yi = getDimIndex(trace, ya);\n    if(xi === false || yi === false) return [pointData];\n\n    var x = cdata[xi];\n    var y = cdata[yi];\n\n    var id, dxy;\n    var minDist = maxDistance;\n\n    for(var i = 0; i < x.length; i++) {\n        var ptx = x[i];\n        var pty = y[i];\n        var dx = xa.c2p(ptx) - xpx;\n        var dy = ya.c2p(pty) - ypx;\n        var dist = Math.sqrt(dx * dx + dy * dy);\n\n        if(dist < minDist) {\n            minDist = dxy = dist;\n            id = i;\n        }\n    }\n\n    pointData.index = id;\n    pointData.distance = minDist;\n    pointData.dxy = dxy;\n\n    if(id === undefined) return [pointData];\n\n    calcHover(pointData, x, y, trace);\n\n    return [pointData];\n}\n\nfunction selectPoints(searchInfo, selectionTester) {\n    var cd = searchInfo.cd;\n    var trace = cd[0].trace;\n    var stash = cd[0].t;\n    var scene = searchInfo.scene;\n    var cdata = scene.matrixOptions.cdata;\n    var xa = searchInfo.xaxis;\n    var ya = searchInfo.yaxis;\n    var selection = [];\n\n    if(!scene) return selection;\n\n    var hasOnlyLines = (!subTypes.hasMarkers(trace) && !subTypes.hasText(trace));\n    if(trace.visible !== true || hasOnlyLines) return selection;\n\n    var xi = getDimIndex(trace, xa);\n    var yi = getDimIndex(trace, ya);\n    if(xi === false || yi === false) return selection;\n\n    var xpx = stash.xpx[xi];\n    var ypx = stash.ypx[yi];\n    var x = cdata[xi];\n    var y = cdata[yi];\n    var els = [];\n    var unels = [];\n\n    // degenerate polygon does not enable selection\n    // filter out points by visible scatter ones\n    if(selectionTester !== false && !selectionTester.degenerate) {\n        for(var i = 0; i < x.length; i++) {\n            if(selectionTester.contains([xpx[i], ypx[i]], null, i, searchInfo)) {\n                els.push(i);\n                selection.push({\n                    pointNumber: i,\n                    x: x[i],\n                    y: y[i]\n                });\n            } else {\n                unels.push(i);\n            }\n        }\n    }\n\n    var matrixOpts = scene.matrixOptions;\n\n    if(!els.length && !unels.length) {\n        scene.matrix.update(matrixOpts, null);\n    } else if(!scene.selectBatch.length && !scene.unselectBatch.length) {\n        scene.matrix.update(\n            scene.unselectedOptions,\n            Lib.extendFlat({}, matrixOpts, scene.selectedOptions, scene.viewOpts)\n        );\n    }\n\n    scene.selectBatch = els;\n    scene.unselectBatch = unels;\n\n    return selection;\n}\n\nfunction getDimIndex(trace, ax) {\n    var axId = ax._id;\n    var axLetter = axId.charAt(0);\n    var ind = {x: 0, y: 1}[axLetter];\n    var visibleDims = trace._visibleDims;\n\n    for(var k = 0; k < visibleDims.length; k++) {\n        var i = visibleDims[k];\n        if(trace._diag[i][ind] === axId) return k;\n    }\n    return false;\n}\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'splom',\n\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['gl', 'regl', 'cartesian', 'symbols', 'showLegend', 'scatter-like'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: _dereq_('../scatter/marker_colorbar'),\n\n    calc: calc,\n    plot: plot,\n    hoverPoints: hoverPoints,\n    selectPoints: selectPoints,\n    editStyle: editStyle,\n\n    meta: {\n        \n    }\n};\n\n// splom traces use the 'grid' component to generate their axes,\n// register it here\nRegistry.register(Grid);\n\n},{\"../../components/grid\":623,\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axis_ids\":754,\"../../registry\":831,\"../scatter/calc\":1076,\"../scatter/colorscale_calc\":1078,\"../scatter/marker_colorbar\":1092,\"../scatter/subtypes\":1098,\"../scattergl\":1127,\"../scattergl/constants\":1124,\"../scattergl/convert\":1125,\"./attributes\":1152,\"./base_plot\":1153,\"./defaults\":1154,\"regl-splom\":488}],1156:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar mesh3dAttrs = _dereq_('../mesh3d/attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nvar attrs = {\n    x: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    y: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n    z: {\n        valType: 'data_array',\n        \n        editType: 'calc+clearAxisTypes',\n        \n    },\n\n    u: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    v: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    w: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    starts: {\n        x: {\n            valType: 'data_array',\n            editType: 'calc',\n            \n        },\n        y: {\n            valType: 'data_array',\n            editType: 'calc',\n            \n        },\n        z: {\n            valType: 'data_array',\n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    },\n\n    maxdisplayed: {\n        valType: 'integer',\n        min: 0,\n        dflt: 1000,\n        \n        editType: 'calc',\n        \n    },\n\n    // TODO\n    //\n    // Should add 'absolute' (like cone traces have), but currently gl-streamtube3d's\n    // `absoluteTubeSize` doesn't behave well enough for our needs.\n    //\n    // 'fixed' would be a nice addition to plot stream 'lines', see\n    // https://github.com/plotly/plotly.js/commit/812be20750e21e0a1831975001c248d365850f73#r29129877\n    //\n    // sizemode: {\n    //     valType: 'enumerated',\n    //     values: ['scaled', 'absolute', 'fixed'],\n    //     dflt: 'scaled',\n    //     \n    //     editType: 'calc',\n    //     \n    // },\n\n    sizeref: {\n        valType: 'number',\n        \n        editType: 'calc',\n        min: 0,\n        dflt: 1,\n        \n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n    hovertemplate: hovertemplateAttrs({editType: 'calc'}, {\n        keys: [\n            'tubex', 'tubey', 'tubez',\n            'tubeu', 'tubev', 'tubew',\n            'norm', 'divergence'\n        ]\n    })\n};\n\nextendFlat(attrs, colorScaleAttrs('', {\n    colorAttr: 'u/v/w norm',\n    showScaleDflt: true,\n    editTypeOverride: 'calc'\n}));\n\nvar fromMesh3d = ['opacity', 'lightposition', 'lighting'];\nfromMesh3d.forEach(function(k) {\n    attrs[k] = mesh3dAttrs[k];\n});\n\nattrs.hoverinfo = extendFlat({}, baseAttrs.hoverinfo, {\n    editType: 'calc',\n    flags: ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'],\n    dflt: 'x+y+z+norm+text+name'\n});\n\nattrs.transforms = undefined;\n\nmodule.exports = attrs;\n\n},{\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../mesh3d/attributes\":1017}],1157:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\n\nmodule.exports = function calc(gd, trace) {\n    var i;\n\n    var u = trace.u;\n    var v = trace.v;\n    var w = trace.w;\n    var x = trace.x;\n    var y = trace.y;\n    var z = trace.z;\n    var len = Math.min(x.length, y.length, z.length, u.length, v.length, w.length);\n\n    var slen = 0;\n    var startx, starty, startz;\n    if(trace.starts) {\n        startx = trace.starts.x || [];\n        starty = trace.starts.y || [];\n        startz = trace.starts.z || [];\n        slen = Math.min(startx.length, starty.length, startz.length);\n    }\n\n    var normMax = 0;\n    var normMin = Infinity;\n\n    for(i = 0; i < len; i++) {\n        var uu = u[i];\n        var vv = v[i];\n        var ww = w[i];\n        var norm = Math.sqrt(uu * uu + vv * vv + ww * ww);\n\n        normMax = Math.max(normMax, norm);\n        normMin = Math.min(normMin, norm);\n    }\n\n    colorscaleCalc(gd, trace, {\n        vals: [normMin, normMax],\n        containerStr: '',\n        cLetter: 'c'\n    });\n\n    var xMax = -Infinity;\n    var xMin = Infinity;\n    var yMax = -Infinity;\n    var yMin = Infinity;\n    var zMax = -Infinity;\n    var zMin = Infinity;\n\n    for(i = 0; i < len; i++) {\n        var xx = x[i];\n        xMax = Math.max(xMax, xx);\n        xMin = Math.min(xMin, xx);\n\n        var yy = y[i];\n        yMax = Math.max(yMax, yy);\n        yMin = Math.min(yMin, yy);\n\n        var zz = z[i];\n        zMax = Math.max(zMax, zz);\n        zMin = Math.min(zMin, zz);\n    }\n    for(i = 0; i < slen; i++) {\n        var sx = startx[i];\n        xMax = Math.max(xMax, sx);\n        xMin = Math.min(xMin, sx);\n\n        var sy = starty[i];\n        yMax = Math.max(yMax, sy);\n        yMin = Math.min(yMin, sy);\n\n        var sz = startz[i];\n        zMax = Math.max(zMax, sz);\n        zMin = Math.min(zMin, sz);\n    }\n\n    trace._len = len;\n    trace._slen = slen;\n    trace._normMax = normMax;\n    trace._xbnds = [xMin, xMax];\n    trace._ybnds = [yMin, yMax];\n    trace._zbnds = [zMin, zMax];\n};\n\n},{\"../../components/colorscale/calc\":588}],1158:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar tube2mesh = _dereq_('gl-streamtube3d');\nvar createTubeMesh = tube2mesh.createTubeMesh;\n\nvar Lib = _dereq_('../../lib');\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar zip3 = _dereq_('../../plots/gl3d/zip3');\n\nvar axisName2scaleIndex = {xaxis: 0, yaxis: 1, zaxis: 2};\n\nfunction Streamtube(scene, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.mesh = null;\n    this.data = null;\n}\n\nvar proto = Streamtube.prototype;\n\nproto.handlePick = function(selection) {\n    var sceneLayout = this.scene.fullSceneLayout;\n    var dataScale = this.scene.dataScale;\n\n    function fromDataScale(v, axisName) {\n        var ax = sceneLayout[axisName];\n        var scale = dataScale[axisName2scaleIndex[axisName]];\n        return ax.l2c(v) / scale;\n    }\n\n    if(selection.object === this.mesh) {\n        var pos = selection.data.position;\n        var uvx = selection.data.velocity;\n\n        selection.traceCoordinate = [\n            fromDataScale(pos[0], 'xaxis'),\n            fromDataScale(pos[1], 'yaxis'),\n            fromDataScale(pos[2], 'zaxis'),\n\n            fromDataScale(uvx[0], 'xaxis'),\n            fromDataScale(uvx[1], 'yaxis'),\n            fromDataScale(uvx[2], 'zaxis'),\n\n            // u/v/w norm\n            selection.data.intensity * this.data._normMax,\n            // divergence\n            selection.data.divergence\n        ];\n\n        selection.textLabel = this.data.hovertext || this.data.text;\n\n        return true;\n    }\n};\n\nfunction distinctVals(col) {\n    return Lib.distinctVals(col).vals;\n}\n\nfunction getDfltStartingPositions(vec) {\n    var len = vec.length;\n    var s;\n\n    if(len > 2) {\n        s = vec.slice(1, len - 1);\n    } else if(len === 2) {\n        s = [(vec[0] + vec[1]) / 2];\n    } else {\n        s = vec;\n    }\n    return s;\n}\n\nfunction getBoundPads(vec) {\n    var len = vec.length;\n    if(len === 1) {\n        return [0.5, 0.5];\n    } else {\n        return [vec[1] - vec[0], vec[len - 1] - vec[len - 2]];\n    }\n}\n\nfunction convert(scene, trace) {\n    var sceneLayout = scene.fullSceneLayout;\n    var dataScale = scene.dataScale;\n    var len = trace._len;\n    var tubeOpts = {};\n\n    function toDataCoords(arr, axisName) {\n        var ax = sceneLayout[axisName];\n        var scale = dataScale[axisName2scaleIndex[axisName]];\n        return Lib.simpleMap(arr, function(v) { return ax.d2l(v) * scale; });\n    }\n\n    tubeOpts.vectors = zip3(\n        toDataCoords(trace.u, 'xaxis'),\n        toDataCoords(trace.v, 'yaxis'),\n        toDataCoords(trace.w, 'zaxis'),\n        len\n    );\n\n    var valsx = distinctVals(trace.x.slice(0, len));\n    var valsy = distinctVals(trace.y.slice(0, len));\n    var valsz = distinctVals(trace.z.slice(0, len));\n\n    // Over-specified mesh case, this would error in tube2mesh\n    if(valsx.length * valsy.length * valsz.length > len) {\n        return {positions: [], cells: []};\n    }\n\n    var meshx = toDataCoords(valsx, 'xaxis');\n    var meshy = toDataCoords(valsy, 'yaxis');\n    var meshz = toDataCoords(valsz, 'zaxis');\n\n    tubeOpts.meshgrid = [meshx, meshy, meshz];\n\n    if(trace.starts) {\n        var slen = trace._slen;\n        tubeOpts.startingPositions = zip3(\n            toDataCoords(trace.starts.x.slice(0, slen), 'xaxis'),\n            toDataCoords(trace.starts.y.slice(0, slen), 'yaxis'),\n            toDataCoords(trace.starts.z.slice(0, slen), 'zaxis')\n        );\n    } else {\n        // Default starting positions:\n        //\n        // if len>2, cut xz plane at min-y,\n        // takes all x/y/z pts on that plane except those on the edges\n        // to generate \"well-defined\" tubes,\n        //\n        // if len=2, take position halfway between two the pts,\n        //\n        // if len=1, take that pt\n        var sy0 = meshy[0];\n        var sx = getDfltStartingPositions(meshx);\n        var sz = getDfltStartingPositions(meshz);\n        var startingPositions = new Array(sx.length * sz.length);\n        var m = 0;\n\n        for(var i = 0; i < sx.length; i++) {\n            for(var k = 0; k < sz.length; k++) {\n                startingPositions[m++] = [sx[i], sy0, sz[k]];\n            }\n        }\n        tubeOpts.startingPositions = startingPositions;\n    }\n\n    tubeOpts.colormap = parseColorScale(trace);\n    tubeOpts.tubeSize = trace.sizeref;\n    tubeOpts.maxLength = trace.maxdisplayed;\n\n    // add some padding around the bounds\n    // to e.g. allow tubes starting from a slice of the x/y/z mesh\n    // to go beyond bounds a little bit w/o getting clipped\n    var xbnds = toDataCoords(trace._xbnds, 'xaxis');\n    var ybnds = toDataCoords(trace._ybnds, 'yaxis');\n    var zbnds = toDataCoords(trace._zbnds, 'zaxis');\n    var xpads = getBoundPads(meshx);\n    var ypads = getBoundPads(meshy);\n    var zpads = getBoundPads(meshz);\n\n    var bounds = [\n        [xbnds[0] - xpads[0], ybnds[0] - ypads[0], zbnds[0] - zpads[0]],\n        [xbnds[1] + xpads[1], ybnds[1] + ypads[1], zbnds[1] + zpads[1]]\n    ];\n\n    var meshData = tube2mesh(tubeOpts, bounds);\n\n    // N.B. cmin/cmax correspond to the min/max vector norm\n    // in the u/v/w arrays, which in general is NOT equal to max\n    // intensity that colors the tubes.\n    var cOpts = extractOpts(trace);\n    meshData.vertexIntensityBounds = [cOpts.min / trace._normMax, cOpts.max / trace._normMax];\n\n    // pass gl-mesh3d lighting attributes\n    var lp = trace.lightposition;\n    meshData.lightPosition = [lp.x, lp.y, lp.z];\n    meshData.ambient = trace.lighting.ambient;\n    meshData.diffuse = trace.lighting.diffuse;\n    meshData.specular = trace.lighting.specular;\n    meshData.roughness = trace.lighting.roughness;\n    meshData.fresnel = trace.lighting.fresnel;\n    meshData.opacity = trace.opacity;\n\n    // stash autorange pad value\n    trace._pad = meshData.tubeScale * trace.sizeref * 2;\n\n    return meshData;\n}\n\nproto.update = function(data) {\n    this.data = data;\n\n    var meshData = convert(this.scene, data);\n    this.mesh.update(meshData);\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.mesh);\n    this.mesh.dispose();\n};\n\nfunction createStreamtubeTrace(scene, data) {\n    var gl = scene.glplot.gl;\n\n    var meshData = convert(scene, data);\n    var mesh = createTubeMesh(gl, meshData);\n\n    var streamtube = new Streamtube(scene, data.uid);\n    streamtube.mesh = mesh;\n    streamtube.data = data;\n    mesh._trace = streamtube;\n\n    scene.glplot.add(mesh);\n\n    return streamtube;\n}\n\nmodule.exports = createStreamtubeTrace;\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../plots/gl3d/zip3\":802,\"gl-streamtube3d\":312}],1159:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var u = coerce('u');\n    var v = coerce('v');\n    var w = coerce('w');\n\n    var x = coerce('x');\n    var y = coerce('y');\n    var z = coerce('z');\n\n    if(\n        !u || !u.length || !v || !v.length || !w || !w.length ||\n        !x || !x.length || !y || !y.length || !z || !z.length\n    ) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('starts.x');\n    coerce('starts.y');\n    coerce('starts.z');\n\n    coerce('maxdisplayed');\n    coerce('sizeref');\n\n    coerce('lighting.ambient');\n    coerce('lighting.diffuse');\n    coerce('lighting.specular');\n    coerce('lighting.roughness');\n    coerce('lighting.fresnel');\n    coerce('lightposition.x');\n    coerce('lightposition.y');\n    coerce('lightposition.z');\n\n    colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'});\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    // disable 1D transforms (for now)\n    // x/y/z and u/v/w have matching lengths,\n    // but they don't have to match with starts.(x|y|z)\n    traceOut._length = null;\n};\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"./attributes\":1156}],1160:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'streamtube',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d'],\n\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./convert'),\n    eventData: function(out, pt) {\n        out.tubex = out.x;\n        out.tubey = out.y;\n        out.tubez = out.z;\n\n        out.tubeu = pt.traceCoordinate[3];\n        out.tubev = pt.traceCoordinate[4];\n        out.tubew = pt.traceCoordinate[5];\n\n        out.norm = pt.traceCoordinate[6];\n        out.divergence = pt.traceCoordinate[7];\n\n        // Does not correspond to input x/y/z, so delete them\n        delete out.x;\n        delete out.y;\n        delete out.z;\n\n        return out;\n    },\n\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"./attributes\":1156,\"./calc\":1157,\"./convert\":1158,\"./defaults\":1159}],1161:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar plotAttrs = _dereq_('../../plots/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\nvar pieAtts = _dereq_('../pie/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    labels: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    parents: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n\n    values: {\n        valType: 'data_array',\n        editType: 'calc',\n        \n    },\n    branchvalues: {\n        valType: 'enumerated',\n        values: ['remainder', 'total'],\n        dflt: 'remainder',\n        editType: 'calc',\n        \n        \n    },\n\n    level: {\n        valType: 'any',\n        editType: 'plot',\n        anim: true,\n        \n        \n    },\n    maxdepth: {\n        valType: 'integer',\n        editType: 'plot',\n        \n        dflt: -1,\n        \n    },\n\n    marker: {\n        colors: {\n            valType: 'data_array',\n            editType: 'calc',\n            \n        },\n\n        // colorinheritance: {\n        //     valType: 'enumerated',\n        //     values: ['per-branch', 'per-label', false]\n        // },\n\n        line: {\n            color: extendFlat({}, pieAtts.marker.line.color, {\n                dflt: null,\n                \n            }),\n            width: extendFlat({}, pieAtts.marker.line.width, {dflt: 1}),\n            editType: 'calc'\n        },\n        editType: 'calc'\n    },\n\n    leaf: {\n        opacity: {\n            valType: 'number',\n            editType: 'style',\n            \n            min: 0,\n            max: 1,\n            dflt: 0.7,\n            \n        },\n        editType: 'plot'\n    },\n\n    text: pieAtts.text,\n    textinfo: extendFlat({}, pieAtts.textinfo, {\n        editType: 'plot',\n        flags: ['label', 'text', 'value']\n    }),\n    textfont: pieAtts.textfont,\n\n    hovertext: pieAtts.hovertext,\n    hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {\n        flags: ['label', 'text', 'value', 'name']\n    }),\n    hovertemplate: hovertemplateAttrs(),\n\n    insidetextfont: pieAtts.insidetextfont,\n    outsidetextfont: pieAtts.outsidetextfont,\n\n    domain: domainAttrs({name: 'sunburst', trace: true, editType: 'calc'})\n};\n\n},{\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plots/attributes\":748,\"../../plots/domain\":776,\"../pie/attributes\":1049}],1162:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\n\nvar name = exports.name = 'sunburst';\n\nexports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {\n    var _module = Registry.getModule(name);\n    var cdmodule = getModuleCalcData(gd.calcdata, _module)[0];\n    _module.plot(gd, cdmodule, transitionOpts, makeOnCompleteCallback);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var had = (oldFullLayout._has && oldFullLayout._has(name));\n    var has = (newFullLayout._has && newFullLayout._has(name));\n\n    if(had && !has) {\n        oldFullLayout._sunburstlayer.selectAll('g.trace').remove();\n    }\n};\n\n},{\"../../plots/get_data\":786,\"../../registry\":831}],1163:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3Hierarchy = _dereq_('d3-hierarchy');\nvar isNumeric = _dereq_('fast-isnumeric');\n\nvar Lib = _dereq_('../../lib');\nvar makePullColorFn = _dereq_('../pie/calc').makePullColorFn;\nvar generateExtendedColors = _dereq_('../pie/calc').generateExtendedColors;\n\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\n\nvar sunburstExtendedColorWays = {};\n\nexports.calc = function(gd, trace) {\n    var fullLayout = gd._fullLayout;\n    var ids = trace.ids;\n    var hasIds = isArrayOrTypedArray(ids);\n    var labels = trace.labels;\n    var parents = trace.parents;\n    var vals = trace.values;\n    var hasVals = isArrayOrTypedArray(vals);\n    var cd = [];\n\n    var parent2children = {};\n    var refs = {};\n    var addToLookup = function(parent, v) {\n        if(parent2children[parent]) parent2children[parent].push(v);\n        else parent2children[parent] = [v];\n        refs[v] = 1;\n    };\n\n    // treat number `0` as valid\n    var isValidKey = function(k) {\n        return k || typeof k === 'number';\n    };\n\n    var isValidVal = function(i) {\n        return !hasVals || (isNumeric(vals[i]) && vals[i] >= 0);\n    };\n\n    var len;\n    var isValid;\n    var getId;\n\n    if(hasIds) {\n        len = Math.min(ids.length, parents.length);\n        isValid = function(i) { return isValidKey(ids[i]) && isValidVal(i); };\n        getId = function(i) { return String(ids[i]); };\n    } else {\n        len = Math.min(labels.length, parents.length);\n        isValid = function(i) { return isValidKey(labels[i]) && isValidVal(i); };\n        // TODO We could allow some label / parent duplication\n        //\n        // From AJ:\n        //  It would work OK for one level\n        //  (multiple rows with the same name and different parents -\n        //  or even the same parent) but if that name is then used as a parent\n        //  which one is it?\n        getId = function(i) { return String(labels[i]); };\n    }\n\n    if(hasVals) len = Math.min(len, vals.length);\n\n    for(var i = 0; i < len; i++) {\n        if(isValid(i)) {\n            var id = getId(i);\n            var pid = isValidKey(parents[i]) ? String(parents[i]) : '';\n\n            var cdi = {\n                i: i,\n                id: id,\n                pid: pid,\n                label: isValidKey(labels[i]) ? String(labels[i]) : ''\n            };\n\n            if(hasVals) cdi.v = +vals[i];\n            cd.push(cdi);\n            addToLookup(pid, id);\n        }\n    }\n\n    if(!parent2children['']) {\n        var impliedRoots = [];\n        var k;\n        for(k in parent2children) {\n            if(!refs[k]) {\n                impliedRoots.push(k);\n            }\n        }\n\n        // if an `id` has no ref in the `parents` array,\n        // take it as being the root node\n\n        if(impliedRoots.length === 1) {\n            k = impliedRoots[0];\n            cd.unshift({\n                id: k,\n                pid: '',\n                label: k\n            });\n        } else {\n            return Lib.warn('Multiple implied roots, cannot build sunburst hierarchy.');\n        }\n    } else if(parent2children[''].length > 1) {\n        var dummyId = Lib.randstr();\n\n        // if multiple rows linked to the root node,\n        // add dummy \"root of roots\" node to make d3 build the hierarchy successfully\n\n        for(var j = 0; j < cd.length; j++) {\n            if(cd[j].pid === '') {\n                cd[j].pid = dummyId;\n            }\n        }\n\n        cd.unshift({\n            hasMultipleRoots: true,\n            id: dummyId,\n            pid: ''\n        });\n    }\n\n    // TODO might be better to replace stratify() with our own algorithm\n    var root;\n    try {\n        root = d3Hierarchy.stratify()\n            .id(function(d) { return d.id; })\n            .parentId(function(d) { return d.pid; })(cd);\n    } catch(e) {\n        return Lib.warn('Failed to build sunburst hierarchy. Error: ' + e.message);\n    }\n\n    var hierarchy = d3Hierarchy.hierarchy(root);\n    var failed = false;\n\n    if(hasVals) {\n        switch(trace.branchvalues) {\n            case 'remainder':\n                hierarchy.sum(function(d) { return d.data.v; });\n                break;\n            case 'total':\n                hierarchy.each(function(d) {\n                    var v = d.data.data.v;\n\n                    if(d.children) {\n                        var partialSum = d.children.reduce(function(a, c) {\n                            return a + c.data.data.v;\n                        }, 0);\n                        if(v < partialSum) {\n                            failed = true;\n                            return Lib.warn([\n                                'Total value for node', d.data.data.id,\n                                'is smaller than the sum of its children.'\n                            ].join(' '));\n                        }\n                    }\n\n                    d.value = v;\n                });\n                break;\n        }\n    } else {\n        hierarchy.count();\n    }\n\n    if(failed) return;\n\n    // TODO add way to sort by height also?\n    hierarchy.sort(function(a, b) { return b.value - a.value; });\n\n    var colors = trace.marker.colors || [];\n    var pullColor = makePullColorFn(fullLayout._sunburstcolormap);\n\n    // TODO keep track of 'root-children' (i.e. branch) for hover info etc.\n\n    hierarchy.each(function(d) {\n        var cdi = d.data.data;\n        var id = cdi.id;\n        // N.B. this mutates items in `cd`\n        cdi.color = pullColor(colors[cdi.i], id);\n    });\n\n    cd[0].hierarchy = hierarchy;\n\n    return cd;\n};\n\n/*\n * `calc` filled in (and collated) explicit colors.\n * Now we need to propagate these explicit colors to other traces,\n * and fill in default colors.\n * This is done after sorting, so we pick defaults\n * in the order slices will be displayed\n */\nexports.crossTraceCalc = function(gd) {\n    var fullLayout = gd._fullLayout;\n    var calcdata = gd.calcdata;\n    var colorWay = fullLayout.sunburstcolorway;\n    var colorMap = fullLayout._sunburstcolormap;\n\n    if(fullLayout.extendsunburstcolors) {\n        colorWay = generateExtendedColors(colorWay, sunburstExtendedColorWays);\n    }\n    var dfltColorCount = 0;\n\n    function pickColor(d) {\n        var cdi = d.data.data;\n        var id = cdi.id;\n\n        if(cdi.color === false) {\n            if(colorMap[id]) {\n                // have we seen this label and assigned a color to it in a previous trace?\n                cdi.color = colorMap[id];\n            } else if(d.parent) {\n                if(d.parent.parent) {\n                    // from third-level on, inherit from parent\n                    cdi.color = d.parent.data.data.color;\n                } else {\n                    // pick new color for second level\n                    colorMap[id] = cdi.color = colorWay[dfltColorCount % colorWay.length];\n                    dfltColorCount++;\n                }\n            } else {\n                // root gets no coloring by default\n                cdi.color = 'rgba(0,0,0,0)';\n            }\n        }\n    }\n\n    for(var i = 0; i < calcdata.length; i++) {\n        var cd = calcdata[i];\n        var cd0 = cd[0];\n        if(cd0.trace.type === 'sunburst' && cd0.hierarchy) {\n            cd0.hierarchy.each(pickColor);\n        }\n    }\n};\n\n},{\"../../lib\":703,\"../pie/calc\":1051,\"d3-hierarchy\":150,\"fast-isnumeric\":224}],1164:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    CLICK_TRANSITION_TIME: 750,\n    CLICK_TRANSITION_EASING: 'linear'\n};\n\n},{}],1165:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\nvar handleText = _dereq_('../bar/defaults').handleText;\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var labels = coerce('labels');\n    var parents = coerce('parents');\n\n    if(!labels || !labels.length || !parents || !parents.length) {\n        traceOut.visible = false;\n        return;\n    }\n\n    var vals = coerce('values');\n    if(vals && vals.length) coerce('branchvalues');\n\n    coerce('level');\n    coerce('maxdepth');\n\n    var lineWidth = coerce('marker.line.width');\n    if(lineWidth) coerce('marker.line.color', layout.paper_bgcolor);\n\n    coerce('marker.colors');\n\n    coerce('leaf.opacity');\n\n    var text = coerce('text');\n    coerce('textinfo', Array.isArray(text) ? 'text+label' : 'label');\n\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var textposition = 'auto';\n    handleText(traceIn, traceOut, layout, coerce, textposition, {\n        moduleHasSelected: false,\n        moduleHasUnselected: false,\n        moduleHasConstrain: false,\n        moduleHasCliponaxis: false,\n        moduleHasTextangle: false,\n        moduleHasInsideanchor: false\n    });\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    // do not support transforms for now\n    traceOut._length = null;\n};\n\n},{\"../../lib\":703,\"../../plots/domain\":776,\"../bar/defaults\":845,\"./attributes\":1161}],1166:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    moduleType: 'trace',\n    name: 'sunburst',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: [],\n    animatable: true,\n\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n\n    calc: _dereq_('./calc').calc,\n    crossTraceCalc: _dereq_('./calc').crossTraceCalc,\n\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style').style,\n\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1161,\"./base_plot\":1162,\"./calc\":1163,\"./defaults\":1165,\"./layout_attributes\":1167,\"./layout_defaults\":1168,\"./plot\":1169,\"./style\":1170}],1167:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    sunburstcolorway: {\n        valType: 'colorlist',\n        \n        editType: 'calc',\n        \n    },\n    extendsunburstcolors: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],1168:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n    coerce('sunburstcolorway', layoutOut.colorway);\n    coerce('extendsunburstcolors');\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":1167}],1169:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar d3Hierarchy = _dereq_('d3-hierarchy');\n\nvar Registry = _dereq_('../../registry');\nvar Fx = _dereq_('../../components/fx');\nvar Color = _dereq_('../../components/color');\nvar Drawing = _dereq_('../../components/drawing');\nvar Lib = _dereq_('../../lib');\nvar Events = _dereq_('../../lib/events');\nvar svgTextUtils = _dereq_('../../lib/svg_text_utils');\nvar setCursor = _dereq_('../../lib/setcursor');\nvar appendArrayPointValue = _dereq_('../../components/fx/helpers').appendArrayPointValue;\n\nvar transformInsideText = _dereq_('../pie/plot').transformInsideText;\nvar formatPieValue = _dereq_('../pie/helpers').formatPieValue;\nvar styleOne = _dereq_('./style').styleOne;\n\nvar constants = _dereq_('./constants');\n\nmodule.exports = function(gd, cdmodule, transitionOpts, makeOnCompleteCallback) {\n    var fullLayout = gd._fullLayout;\n    var layer = fullLayout._sunburstlayer;\n    var join, onComplete;\n\n    // If transition config is provided, then it is only a partial replot and traces not\n    // updated are removed.\n    var isFullReplot = !transitionOpts;\n    var hasTransition = transitionOpts && transitionOpts.duration > 0;\n\n    join = layer.selectAll('g.trace.sunburst')\n        .data(cdmodule, function(cd) { return cd[0].trace.uid; });\n\n    // using same 'stroke-linejoin' as pie traces\n    join.enter().append('g')\n        .classed('trace', true)\n        .classed('sunburst', true)\n        .attr('stroke-linejoin', 'round');\n\n    join.order();\n\n    if(hasTransition) {\n        if(makeOnCompleteCallback) {\n            // If it was passed a callback to register completion, make a callback. If\n            // this is created, then it must be executed on completion, otherwise the\n            // pos-transition redraw will not execute:\n            onComplete = makeOnCompleteCallback();\n        }\n\n        var transition = d3.transition()\n            .duration(transitionOpts.duration)\n            .ease(transitionOpts.easing)\n            .each('end', function() { onComplete && onComplete(); })\n            .each('interrupt', function() { onComplete && onComplete(); });\n\n        transition.each(function() {\n            // Must run the selection again since otherwise enters/updates get grouped together\n            // and these get executed out of order. Except we need them in order!\n            layer.selectAll('g.trace').each(function(cd) {\n                plotOne(gd, cd, this, transitionOpts);\n            });\n        });\n    } else {\n        join.each(function(cd) {\n            plotOne(gd, cd, this, transitionOpts);\n        });\n    }\n\n    if(isFullReplot) {\n        join.exit().remove();\n    }\n};\n\nfunction plotOne(gd, cd, element, transitionOpts) {\n    var fullLayout = gd._fullLayout;\n    // We could optimize hasTransition per trace,\n    // as sunburst has no cross-trace logic!\n    var hasTransition = transitionOpts && transitionOpts.duration > 0;\n\n    var gTrace = d3.select(element);\n    var slices = gTrace.selectAll('g.slice');\n\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n    var hierarchy = cd0.hierarchy;\n    var entry = findEntryWithLevel(hierarchy, trace.level);\n    var maxDepth = trace.maxdepth >= 0 ? trace.maxdepth : Infinity;\n\n    var gs = fullLayout._size;\n    var domain = trace.domain;\n    var vpw = gs.w * (domain.x[1] - domain.x[0]);\n    var vph = gs.h * (domain.y[1] - domain.y[0]);\n    var rMax = 0.5 * Math.min(vpw, vph);\n    var cx = cd0.cx = gs.l + gs.w * (domain.x[1] + domain.x[0]) / 2;\n    var cy = cd0.cy = gs.t + gs.h * (1 - domain.y[0]) - vph / 2;\n\n    if(!entry) {\n        return slices.remove();\n    }\n\n    // previous root 'pt' (can be empty)\n    var prevEntry = null;\n    // stash of 'previous' position data used by tweening functions\n    var prevLookup = {};\n\n    if(hasTransition) {\n        // Important: do this before binding new sliceData!\n        slices.each(function(pt) {\n            prevLookup[getPtId(pt)] = {\n                rpx0: pt.rpx0,\n                rpx1: pt.rpx1,\n                x0: pt.x0,\n                x1: pt.x1,\n                transform: pt.transform\n            };\n\n            if(!prevEntry && isEntry(pt)) {\n                prevEntry = pt;\n            }\n        });\n    }\n\n    // N.B. slice data isn't the calcdata,\n    // grab corresponding calcdata item in sliceData[i].data.data\n    var sliceData = partition(entry).descendants();\n    var maxHeight = entry.height + 1;\n    var yOffset = 0;\n    var cutoff = maxDepth;\n\n    // N.B. handle multiple-root special case\n    if(cd0.hasMultipleRoots && isHierachyRoot(entry)) {\n        sliceData = sliceData.slice(1);\n        maxHeight -= 1;\n        yOffset = 1;\n        cutoff += 1;\n    }\n\n    // filter out slices that won't show up on graph\n    sliceData = sliceData.filter(function(pt) { return pt.y1 <= cutoff; });\n\n    // partition span ('y') to sector radial px value\n    var maxY = Math.min(maxHeight, maxDepth);\n    var y2rpx = function(y) { return (y - yOffset) / maxY * rMax; };\n    // (radial px value, partition angle ('x'))  to px [x,y]\n    var rx2px = function(r, x) { return [r * Math.cos(x), -r * Math.sin(x)]; };\n    // slice path generation fn\n    var pathSlice = function(d) { return Lib.pathAnnulus(d.rpx0, d.rpx1, d.x0, d.x1, cx, cy); };\n    // slice text translate x/y\n    var transTextX = function(d) { return cx + d.pxmid[0] * d.transform.rCenter + (d.transform.x || 0); };\n    var transTextY = function(d) { return cy + d.pxmid[1] * d.transform.rCenter + (d.transform.y || 0); };\n\n    slices = slices.data(sliceData, function(pt) { return getPtId(pt); });\n\n    slices.enter().append('g')\n        .classed('slice', true);\n\n    if(hasTransition) {\n        slices.exit().transition()\n            .each(function() {\n                var sliceTop = d3.select(this);\n\n                var slicePath = sliceTop.select('path.surface');\n                slicePath.transition().attrTween('d', function(pt2) {\n                    var interp = makeExitSliceInterpolator(pt2);\n                    return function(t) { return pathSlice(interp(t)); };\n                });\n\n                var sliceTextGroup = sliceTop.select('g.slicetext');\n                sliceTextGroup.attr('opacity', 0);\n            })\n            .remove();\n    } else {\n        slices.exit().remove();\n    }\n\n    slices.order();\n\n    // next x1 (i.e. sector end angle) of previous entry\n    var nextX1ofPrevEntry = null;\n    if(hasTransition && prevEntry) {\n        var prevEntryId = getPtId(prevEntry);\n        slices.each(function(pt) {\n            if(nextX1ofPrevEntry === null && (getPtId(pt) === prevEntryId)) {\n                nextX1ofPrevEntry = pt.x1;\n            }\n        });\n    }\n\n    var updateSlices = slices;\n    if(hasTransition) {\n        updateSlices = updateSlices.transition().each('end', function() {\n            // N.B. gd._transitioning is (still) *true* by the time\n            // transition updates get hare\n            var sliceTop = d3.select(this);\n            setSliceCursor(sliceTop, gd, {isTransitioning: false});\n        });\n    }\n\n    updateSlices.each(function(pt) {\n        var sliceTop = d3.select(this);\n\n        var slicePath = Lib.ensureSingle(sliceTop, 'path', 'surface', function(s) {\n            s.style('pointer-events', 'all');\n        });\n\n        pt.rpx0 = y2rpx(pt.y0);\n        pt.rpx1 = y2rpx(pt.y1);\n        pt.xmid = (pt.x0 + pt.x1) / 2;\n        pt.pxmid = rx2px(pt.rpx1, pt.xmid);\n        pt.midangle = -(pt.xmid - Math.PI / 2);\n        pt.halfangle = 0.5 * Math.min(Lib.angleDelta(pt.x0, pt.x1) || Math.PI, Math.PI);\n        pt.ring = 1 - (pt.rpx0 / pt.rpx1);\n        pt.rInscribed = getInscribedRadiusFraction(pt, trace);\n\n        if(hasTransition) {\n            slicePath.transition().attrTween('d', function(pt2) {\n                var interp = makeUpdateSliceIntepolator(pt2);\n                return function(t) { return pathSlice(interp(t)); };\n            });\n        } else {\n            slicePath.attr('d', pathSlice);\n        }\n\n        sliceTop\n            .call(attachFxHandlers, gd, cd)\n            .call(setSliceCursor, gd, {isTransitioning: gd._transitioning});\n\n        slicePath.call(styleOne, pt, trace);\n\n        var sliceTextGroup = Lib.ensureSingle(sliceTop, 'g', 'slicetext');\n        var sliceText = Lib.ensureSingle(sliceTextGroup, 'text', '', function(s) {\n            // prohibit tex interpretation until we can handle\n            // tex and regular text together\n            s.attr('data-notex', 1);\n        });\n\n        sliceText.text(formatSliceLabel(pt, trace, fullLayout))\n            .classed('slicetext', true)\n            .attr('text-anchor', 'middle')\n            .call(Drawing.font, isHierachyRoot(pt) ?\n              determineOutsideTextFont(trace, pt, fullLayout.font) :\n              determineInsideTextFont(trace, pt, fullLayout.font))\n            .call(svgTextUtils.convertToTspans, gd);\n\n        // position the text relative to the slice\n        var textBB = Drawing.bBox(sliceText.node());\n        pt.transform = transformInsideText(textBB, pt, cd0);\n        pt.translateX = transTextX(pt);\n        pt.translateY = transTextY(pt);\n\n        var strTransform = function(d, textBB) {\n            return 'translate(' + d.translateX + ',' + d.translateY + ')' +\n                (d.transform.scale < 1 ? ('scale(' + d.transform.scale + ')') : '') +\n                (d.transform.rotate ? ('rotate(' + d.transform.rotate + ')') : '') +\n                'translate(' +\n                    (-(textBB.left + textBB.right) / 2) + ',' +\n                    (-(textBB.top + textBB.bottom) / 2) +\n                ')';\n        };\n\n        if(hasTransition) {\n            sliceText.transition().attrTween('transform', function(pt2) {\n                var interp = makeUpdateTextInterpolar(pt2);\n                return function(t) { return strTransform(interp(t), textBB); };\n            });\n        } else {\n            sliceText.attr('transform', strTransform(pt, textBB));\n        }\n    });\n\n    function makeExitSliceInterpolator(pt) {\n        var id = getPtId(pt);\n        var prev = prevLookup[id];\n        var entryPrev = prevLookup[getPtId(entry)];\n        var next;\n\n        if(entryPrev) {\n            var a = pt.x1 > entryPrev.x1 ? 2 * Math.PI : 0;\n            // if pt to remove:\n            // - if 'below' where the root-node used to be: shrink it radially inward\n            // - otherwise, collapse it clockwise or counterclockwise which ever is shortest to theta=0\n            next = pt.rpx1 < entryPrev.rpx1 ? {rpx0: 0, rpx1: 0} : {x0: a, x1: a};\n        } else {\n            // this happens when maxdepth is set, when leaves must\n            // be removed and the rootPt is new (i.e. does not have a 'prev' object)\n            var parent;\n            var parentId = getPtId(pt.parent);\n            slices.each(function(pt2) {\n                if(getPtId(pt2) === parentId) {\n                    return parent = pt2;\n                }\n            });\n            var parentChildren = parent.children;\n            var ci;\n            parentChildren.forEach(function(pt2, i) {\n                if(getPtId(pt2) === id) {\n                    return ci = i;\n                }\n            });\n            var n = parentChildren.length;\n            var interp = d3.interpolate(parent.x0, parent.x1);\n            next = {\n                rpx0: rMax, rpx1: rMax,\n                x0: interp(ci / n), x1: interp((ci + 1) / n)\n            };\n        }\n\n        return d3.interpolate(prev, next);\n    }\n\n    function makeUpdateSliceIntepolator(pt) {\n        var prev0 = prevLookup[getPtId(pt)];\n        var prev;\n        var next = {x0: pt.x0, x1: pt.x1, rpx0: pt.rpx0, rpx1: pt.rpx1};\n\n        if(prev0) {\n            // if pt already on graph, this is easy\n            prev = prev0;\n        } else {\n            // for new pts:\n            if(prevEntry) {\n                // if trace was visible before\n                if(pt.parent) {\n                    if(nextX1ofPrevEntry) {\n                        // if new branch, twist it in clockwise or\n                        // counterclockwise which ever is shorter to\n                        // its final angle\n                        var a = pt.x1 > nextX1ofPrevEntry ? 2 * Math.PI : 0;\n                        prev = {x0: a, x1: a};\n                    } else {\n                        // if new leaf (when maxdepth is set),\n                        // grow it radially and angularly from\n                        // its parent node\n                        prev = {rpx0: rMax, rpx1: rMax};\n                        Lib.extendFlat(prev, interpX0X1FromParent(pt));\n                    }\n                } else {\n                    // if new root-node, grow it radially\n                    prev = {rpx0: 0, rpx1: 0};\n                }\n            } else {\n                // start sector of new traces from theta=0\n                prev = {x0: 0, x1: 0};\n            }\n        }\n\n        return d3.interpolate(prev, next);\n    }\n\n    function makeUpdateTextInterpolar(pt) {\n        var prev0 = prevLookup[getPtId(pt)];\n        var prev;\n        var transform = pt.transform;\n\n        if(prev0) {\n            prev = prev0;\n        } else {\n            prev = {\n                rpx1: pt.rpx1,\n                transform: {\n                    scale: 0,\n                    rotate: transform.rotate,\n                    rCenter: transform.rCenter,\n                    x: transform.x,\n                    y: transform.y\n                }\n            };\n\n            // for new pts:\n            if(prevEntry) {\n                // if trace was visible before\n                if(pt.parent) {\n                    if(nextX1ofPrevEntry) {\n                        // if new branch, twist it in clockwise or\n                        // counterclockwise which ever is shorter to\n                        // its final angle\n                        var a = pt.x1 > nextX1ofPrevEntry ? 2 * Math.PI : 0;\n                        prev.x0 = prev.x1 = a;\n                    } else {\n                        // if leaf\n                        Lib.extendFlat(prev, interpX0X1FromParent(pt));\n                    }\n                } else {\n                    // if new root-node\n                    prev.x0 = prev.x1 = 0;\n                }\n            } else {\n                // on new traces\n                prev.x0 = prev.x1 = 0;\n            }\n        }\n\n        var rpx1Fn = d3.interpolate(prev.rpx1, pt.rpx1);\n        var x0Fn = d3.interpolate(prev.x0, pt.x0);\n        var x1Fn = d3.interpolate(prev.x1, pt.x1);\n        var scaleFn = d3.interpolate(prev.transform.scale, transform.scale);\n        var rotateFn = d3.interpolate(prev.transform.rotate, transform.rotate);\n\n        // smooth out start/end from entry, to try to keep text inside sector\n        // while keeping transition smooth\n        var pow = transform.rCenter === 0 ? 3 :\n            prev.transform.rCenter === 0 ? 1 / 3 :\n            1;\n        var _rCenterFn = d3.interpolate(prev.transform.rCenter, transform.rCenter);\n        var rCenterFn = function(t) { return _rCenterFn(Math.pow(t, pow)); };\n\n        return function(t) {\n            var rpx1 = rpx1Fn(t);\n            var x0 = x0Fn(t);\n            var x1 = x1Fn(t);\n            var rCenter = rCenterFn(t);\n\n            var d = {\n                pxmid: rx2px(rpx1, (x0 + x1) / 2),\n                transform: {\n                    rCenter: rCenter,\n                    x: transform.x,\n                    y: transform.y\n                }\n            };\n\n            var out = {\n                rpx1: rpx1Fn(t),\n                translateX: transTextX(d),\n                translateY: transTextY(d),\n                transform: {\n                    scale: scaleFn(t),\n                    rotate: rotateFn(t),\n                    rCenter: rCenter\n                }\n            };\n\n            return out;\n        };\n    }\n\n    function interpX0X1FromParent(pt) {\n        var parent = pt.parent;\n        var parentPrev = prevLookup[getPtId(parent)];\n        var out = {};\n\n        if(parentPrev) {\n            // if parent is visible\n            var parentChildren = parent.children;\n            var ci = parentChildren.indexOf(pt);\n            var n = parentChildren.length;\n            var interp = d3.interpolate(parentPrev.x0, parentPrev.x1);\n            out.x0 = interp(ci / n);\n            out.x1 = interp(ci / n);\n        } else {\n            // w/o visible parent\n            // TODO !!! HOW ???\n            out.x0 = out.x1 = 0;\n        }\n\n        return out;\n    }\n}\n\n// x[0-1] keys are angles [radians]\n// y[0-1] keys are hierarchy heights [integers]\nfunction partition(entry) {\n    return d3Hierarchy.partition()\n        .size([2 * Math.PI, entry.height + 1])(entry);\n}\n\nfunction findEntryWithLevel(hierarchy, level) {\n    var out;\n    if(level) {\n        hierarchy.eachAfter(function(pt) {\n            if(getPtId(pt) === level) {\n                return out = pt.copy();\n            }\n        });\n    }\n    return out || hierarchy;\n}\n\nfunction findEntryWithChild(hierarchy, childId) {\n    var out;\n    hierarchy.eachAfter(function(pt) {\n        var children = pt.children || [];\n        for(var i = 0; i < children.length; i++) {\n            var child = children[i];\n            if(getPtId(child) === childId) {\n                return out = pt.copy();\n            }\n        }\n    });\n    return out || hierarchy;\n}\n\nfunction isHierachyRoot(pt) {\n    var cdi = pt.data.data;\n    return cdi.pid === '';\n}\n\nfunction isEntry(pt) {\n    return !pt.parent;\n}\n\nfunction isLeaf(pt) {\n    return !pt.children;\n}\n\nfunction getPtId(pt) {\n    var cdi = pt.data.data;\n    return cdi.id;\n}\n\nfunction setSliceCursor(sliceTop, gd, opts) {\n    var pt = sliceTop.datum();\n    var isTransitioning = (opts || {}).isTransitioning;\n    setCursor(sliceTop, (isTransitioning || isLeaf(pt) || isHierachyRoot(pt)) ? null : 'pointer');\n}\n\nfunction attachFxHandlers(sliceTop, gd, cd) {\n    var cd0 = cd[0];\n    var trace = cd0.trace;\n\n    // hover state vars\n    // have we drawn a hover label, so it should be cleared later\n    if(!('_hasHoverLabel' in trace)) trace._hasHoverLabel = false;\n    // have we emitted a hover event, so later an unhover event should be emitted\n    // note that click events do not depend on this - you can still get them\n    // with hovermode: false or if you were earlier dragging, then clicked\n    // in the same slice that you moused up in\n    if(!('_hasHoverEvent' in trace)) trace._hasHoverEvent = false;\n\n    sliceTop.on('mouseover', function(pt) {\n        var fullLayoutNow = gd._fullLayout;\n\n        if(gd._dragging || fullLayoutNow.hovermode === false) return;\n\n        var traceNow = gd._fullData[trace.index];\n        var cdi = pt.data.data;\n        var ptNumber = cdi.i;\n\n        var _cast = function(astr) {\n            return Lib.castOption(traceNow, ptNumber, astr);\n        };\n\n        var hovertemplate = _cast('hovertemplate');\n        var hoverinfo = Fx.castHoverinfo(traceNow, fullLayoutNow, ptNumber);\n        var separators = fullLayoutNow.separators;\n\n        if(hovertemplate || (hoverinfo && hoverinfo !== 'none' && hoverinfo !== 'skip')) {\n            var rInscribed = pt.rInscribed;\n            var hoverCenterX = cd0.cx + pt.pxmid[0] * (1 - rInscribed);\n            var hoverCenterY = cd0.cy + pt.pxmid[1] * (1 - rInscribed);\n            var hoverPt = {};\n            var parts = [];\n            var thisText = [];\n            var hasFlag = function(flag) { return parts.indexOf(flag) !== -1; };\n\n            if(hoverinfo) {\n                parts = hoverinfo === 'all' ?\n                    traceNow._module.attributes.hoverinfo.flags :\n                    hoverinfo.split('+');\n            }\n\n            hoverPt.label = cdi.label;\n            if(hasFlag('label') && hoverPt.label) thisText.push(hoverPt.label);\n\n            if(cdi.hasOwnProperty('v')) {\n                hoverPt.value = cdi.v;\n                hoverPt.valueLabel = formatPieValue(hoverPt.value, separators);\n                if(hasFlag('value')) thisText.push(hoverPt.valueLabel);\n            }\n\n            hoverPt.text = _cast('hovertext') || _cast('text');\n            if(hasFlag('text')) {\n                var tx = hoverPt.text;\n                if(Lib.isValidTextValue(tx)) thisText.push(tx);\n            }\n\n            Fx.loneHover({\n                trace: traceNow,\n                x0: hoverCenterX - rInscribed * pt.rpx1,\n                x1: hoverCenterX + rInscribed * pt.rpx1,\n                y: hoverCenterY,\n                idealAlign: pt.pxmid[0] < 0 ? 'left' : 'right',\n                text: thisText.join('<br>'),\n                name: (hovertemplate || hasFlag('name')) ? traceNow.name : undefined,\n                color: _cast('hoverlabel.bgcolor') || cdi.color,\n                borderColor: _cast('hoverlabel.bordercolor'),\n                fontFamily: _cast('hoverlabel.font.family'),\n                fontSize: _cast('hoverlabel.font.size'),\n                fontColor: _cast('hoverlabel.font.color'),\n                nameLength: _cast('hoverlabel.namelength'),\n                textAlign: _cast('hoverlabel.align'),\n                hovertemplate: hovertemplate,\n                hovertemplateLabels: hoverPt,\n                eventData: [makeEventData(pt, traceNow)]\n            }, {\n                container: fullLayoutNow._hoverlayer.node(),\n                outerContainer: fullLayoutNow._paper.node(),\n                gd: gd\n            });\n\n            trace._hasHoverLabel = true;\n        }\n\n        trace._hasHoverEvent = true;\n        gd.emit('plotly_hover', {\n            points: [makeEventData(pt, traceNow)],\n            event: d3.event\n        });\n    });\n\n    sliceTop.on('mouseout', function(evt) {\n        var fullLayoutNow = gd._fullLayout;\n        var traceNow = gd._fullData[trace.index];\n        var pt = d3.select(this).datum();\n\n        if(trace._hasHoverEvent) {\n            evt.originalEvent = d3.event;\n            gd.emit('plotly_unhover', {\n                points: [makeEventData(pt, traceNow)],\n                event: d3.event\n            });\n            trace._hasHoverEvent = false;\n        }\n\n        if(trace._hasHoverLabel) {\n            Fx.loneUnhover(fullLayoutNow._hoverlayer.node());\n            trace._hasHoverLabel = false;\n        }\n    });\n\n    sliceTop.on('click', function(pt) {\n        // TODO: this does not support right-click. If we want to support it, we\n        // would likely need to change pie to use dragElement instead of straight\n        // mapbox event binding. Or perhaps better, make a simple wrapper with the\n        // right mousedown, mousemove, and mouseup handlers just for a left/right click\n        // mapbox would use this too.\n        var fullLayoutNow = gd._fullLayout;\n        var traceNow = gd._fullData[trace.index];\n\n        var clickVal = Events.triggerHandler(gd, 'plotly_sunburstclick', {\n            points: [makeEventData(pt, traceNow)],\n            event: d3.event\n        });\n\n        // 'regular' click event when sunburstclick is disabled or when\n        // clikcin on leaves or the hierarchy root\n        if(clickVal === false || isLeaf(pt) || isHierachyRoot(pt)) {\n            if(fullLayoutNow.hovermode) {\n                gd._hoverdata = [makeEventData(pt, traceNow)];\n                Fx.click(gd, d3.event);\n            }\n            return;\n        }\n\n        // skip if triggered from dragging a nearby cartesian subplot\n        if(gd._dragging) return;\n\n        // skip during transitions, to avoid potential bugs\n        // we could remove this check later\n        if(gd._transitioning) return;\n\n        // store 'old' level in guiEdit stash, so that subsequent Plotly.react\n        // calls with the same uirevision can start from the same entry\n        Registry.call('_storeDirectGUIEdit', traceNow, fullLayoutNow._tracePreGUI[traceNow.uid], {level: traceNow.level});\n\n        var hierarchy = cd0.hierarchy;\n        var id = getPtId(pt);\n        var nextEntry = isEntry(pt) ?\n            findEntryWithChild(hierarchy, id) :\n            findEntryWithLevel(hierarchy, id);\n\n        var frame = {\n            data: [{level: getPtId(nextEntry)}],\n            traces: [trace.index]\n        };\n\n        var animOpts = {\n            frame: {\n                redraw: false,\n                duration: constants.CLICK_TRANSITION_TIME\n            },\n            transition: {\n                duration: constants.CLICK_TRANSITION_TIME,\n                easing: constants.CLICK_TRANSITION_EASING\n            },\n            mode: 'immediate',\n            fromcurrent: true\n        };\n\n        Fx.loneUnhover(fullLayoutNow._hoverlayer.node());\n        Registry.call('animate', gd, frame, animOpts);\n    });\n}\n\nfunction makeEventData(pt, trace) {\n    var cdi = pt.data.data;\n\n    var out = {\n        curveNumber: trace.index,\n        pointNumber: cdi.i,\n        data: trace._input,\n        fullData: trace,\n\n        // TODO more things like 'children', 'siblings', 'hierarchy?\n    };\n\n    appendArrayPointValue(out, trace, cdi.i);\n\n    return out;\n}\n\nfunction formatSliceLabel(pt, trace, fullLayout) {\n    var textinfo = trace.textinfo;\n\n    if(!textinfo || textinfo === 'none') {\n        return '';\n    }\n\n    var cdi = pt.data.data;\n    var separators = fullLayout.separators;\n    var parts = textinfo.split('+');\n    var hasFlag = function(flag) { return parts.indexOf(flag) !== -1; };\n    var thisText = [];\n\n    if(hasFlag('label') && cdi.label) thisText.push(cdi.label);\n\n    if(cdi.hasOwnProperty('v') && hasFlag('value')) {\n        thisText.push(formatPieValue(cdi.v, separators));\n    }\n\n    if(hasFlag('text')) {\n        var tx = Lib.castOption(trace, cdi.i, 'text');\n        if(Lib.isValidTextValue(tx)) thisText.push(tx);\n    }\n\n    return thisText.join('<br>');\n}\n\nfunction determineOutsideTextFont(trace, pt, layoutFont) {\n    var cdi = pt.data.data;\n    var ptNumber = cdi.i;\n\n    var color = Lib.castOption(trace, ptNumber, 'outsidetextfont.color') ||\n        Lib.castOption(trace, ptNumber, 'textfont.color') ||\n        layoutFont.color;\n\n    var family = Lib.castOption(trace, ptNumber, 'outsidetextfont.family') ||\n        Lib.castOption(trace, ptNumber, 'textfont.family') ||\n        layoutFont.family;\n\n    var size = Lib.castOption(trace, ptNumber, 'outsidetextfont.size') ||\n        Lib.castOption(trace, ptNumber, 'textfont.size') ||\n        layoutFont.size;\n\n    return {\n        color: color,\n        family: family,\n        size: size\n    };\n}\n\nfunction determineInsideTextFont(trace, pt, layoutFont) {\n    var cdi = pt.data.data;\n    var ptNumber = cdi.i;\n\n    var customColor = Lib.castOption(trace, ptNumber, 'insidetextfont.color');\n    if(!customColor && trace._input.textfont) {\n        // Why not simply using trace.textfont? Because if not set, it\n        // defaults to layout.font which has a default color. But if\n        // textfont.color and insidetextfont.color don't supply a value,\n        // a contrasting color shall be used.\n        customColor = Lib.castOption(trace._input, ptNumber, 'textfont.color');\n    }\n\n    var family = Lib.castOption(trace, ptNumber, 'insidetextfont.family') ||\n        Lib.castOption(trace, ptNumber, 'textfont.family') ||\n        layoutFont.family;\n\n    var size = Lib.castOption(trace, ptNumber, 'insidetextfont.size') ||\n        Lib.castOption(trace, ptNumber, 'textfont.size') ||\n        layoutFont.size;\n\n    return {\n        color: customColor || Color.contrast(cdi.color),\n        family: family,\n        size: size\n    };\n}\n\nfunction getInscribedRadiusFraction(pt) {\n    if(pt.rpx0 === 0 && Lib.isFullCircle([pt.x0, pt.x1])) {\n        // special case of 100% with no hole\n        return 1;\n    } else {\n        return Math.max(0, Math.min(\n            1 / (1 + 1 / Math.sin(pt.halfangle)),\n            pt.ring / 2\n        ));\n    }\n}\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../components/fx\":619,\"../../components/fx/helpers\":615,\"../../lib\":703,\"../../lib/events\":692,\"../../lib/setcursor\":723,\"../../lib/svg_text_utils\":727,\"../../registry\":831,\"../pie/helpers\":1054,\"../pie/plot\":1058,\"./constants\":1164,\"./style\":1170,\"d3\":157,\"d3-hierarchy\":150}],1170:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Color = _dereq_('../../components/color');\nvar Lib = _dereq_('../../lib');\n\nfunction style(gd) {\n    gd._fullLayout._sunburstlayer.selectAll('.trace').each(function(cd) {\n        var gTrace = d3.select(this);\n        var cd0 = cd[0];\n        var trace = cd0.trace;\n\n        gTrace.style('opacity', trace.opacity);\n\n        gTrace.selectAll('path.surface').each(function(pt) {\n            d3.select(this).call(styleOne, pt, trace);\n        });\n    });\n}\n\nfunction styleOne(s, pt, trace) {\n    var cdi = pt.data.data;\n    var isLeaf = !pt.children;\n    var ptNumber = cdi.i;\n    var lineColor = Lib.castOption(trace, ptNumber, 'marker.line.color') || Color.defaultLine;\n    var lineWidth = Lib.castOption(trace, ptNumber, 'marker.line.width') || 0;\n\n    s.style('stroke-width', lineWidth)\n        .call(Color.fill, cdi.color)\n        .call(Color.stroke, lineColor)\n        .style('opacity', isLeaf ? trace.leaf.opacity : null);\n}\n\nmodule.exports = {\n    style: style,\n    styleOne: styleOne\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"d3\":157}],1171:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Color = _dereq_('../../components/color');\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar hovertemplateAttrs = _dereq_('../../components/fx/hovertemplate_attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nfunction makeContourProjAttr(axLetter) {\n    return {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    };\n}\n\nfunction makeContourAttr(axLetter) {\n    return {\n        show: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        start: {\n            valType: 'number',\n            dflt: null,\n            \n            editType: 'plot',\n         // impliedEdits: {'^autocontour': false},\n            \n        },\n        end: {\n            valType: 'number',\n            dflt: null,\n            \n            editType: 'plot',\n         // impliedEdits: {'^autocontour': false},\n            \n        },\n        size: {\n            valType: 'number',\n            dflt: null,\n            min: 0,\n            \n            editType: 'plot',\n         // impliedEdits: {'^autocontour': false},\n            \n        },\n        project: {\n            x: makeContourProjAttr('x'),\n            y: makeContourProjAttr('y'),\n            z: makeContourProjAttr('z')\n        },\n        color: {\n            valType: 'color',\n            \n            dflt: Color.defaultLine,\n            \n        },\n        usecolormap: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        width: {\n            valType: 'number',\n            \n            min: 1,\n            max: 16,\n            dflt: 2,\n            \n        },\n        highlight: {\n            valType: 'boolean',\n            \n            dflt: true,\n            \n        },\n        highlightcolor: {\n            valType: 'color',\n            \n            dflt: Color.defaultLine,\n            \n        },\n        highlightwidth: {\n            valType: 'number',\n            \n            min: 1,\n            max: 16,\n            dflt: 2,\n            \n        }\n    };\n}\n\nvar attrs = module.exports = overrideAll(extendFlat({\n    z: {\n        valType: 'data_array',\n        \n    },\n    x: {\n        valType: 'data_array',\n        \n    },\n    y: {\n        valType: 'data_array',\n        \n    },\n\n    text: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        \n    },\n    hovertext: {\n        valType: 'string',\n        \n        dflt: '',\n        arrayOk: true,\n        \n    },\n    hovertemplate: hovertemplateAttrs(),\n\n    connectgaps: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n\n    surfacecolor: {\n        valType: 'data_array',\n        \n    },\n},\n\ncolorScaleAttrs('', {\n    colorAttr: 'z or surfacecolor',\n    showScaleDflt: true,\n    autoColorDflt: false,\n    editTypeOverride: 'calc'\n}), {\n    contours: {\n        x: makeContourAttr('x'),\n        y: makeContourAttr('y'),\n        z: makeContourAttr('z')\n    },\n    hidesurface: {\n        valType: 'boolean',\n        \n        dflt: false,\n        \n    },\n\n    lightposition: {\n        x: {\n            valType: 'number',\n            \n            min: -1e5,\n            max: 1e5,\n            dflt: 10,\n            \n        },\n        y: {\n            valType: 'number',\n            \n            min: -1e5,\n            max: 1e5,\n            dflt: 1e4,\n            \n        },\n        z: {\n            valType: 'number',\n            \n            min: -1e5,\n            max: 1e5,\n            dflt: 0,\n            \n        }\n    },\n\n    lighting: {\n        ambient: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 1.0,\n            dflt: 0.8,\n            \n        },\n        diffuse: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 1.00,\n            dflt: 0.8,\n            \n        },\n        specular: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 2.00,\n            dflt: 0.05,\n            \n        },\n        roughness: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 1.00,\n            dflt: 0.5,\n            \n        },\n        fresnel: {\n            valType: 'number',\n            \n            min: 0.00,\n            max: 5.00,\n            dflt: 0.2,\n            \n        }\n    },\n\n    opacity: {\n        valType: 'number',\n        \n        min: 0,\n        max: 1,\n        dflt: 1,\n        \n    },\n\n    _deprecated: {\n        zauto: extendFlat({}, colorScaleAttrs.zauto, {\n            \n        }),\n        zmin: extendFlat({}, colorScaleAttrs.zmin, {\n            \n        }),\n        zmax: extendFlat({}, colorScaleAttrs.zmax, {\n            \n        })\n    },\n\n    hoverinfo: extendFlat({}, baseAttrs.hoverinfo)\n}), 'calc', 'nested');\n\nattrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';\nattrs.transforms = undefined;\n\n},{\"../../components/color\":580,\"../../components/colorscale/attributes\":587,\"../../components/fx/hovertemplate_attributes\":618,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748}],1172:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar colorscaleCalc = _dereq_('../../components/colorscale/calc');\n\n\n// Compute auto-z and autocolorscale if applicable\nmodule.exports = function calc(gd, trace) {\n    if(trace.surfacecolor) {\n        colorscaleCalc(gd, trace, {\n            vals: trace.surfacecolor,\n            containerStr: '',\n            cLetter: 'c'\n        });\n    } else {\n        colorscaleCalc(gd, trace, {\n            vals: trace.z,\n            containerStr: '',\n            cLetter: 'c'\n        });\n    }\n};\n\n},{\"../../components/colorscale/calc\":588}],1173:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n\n'use strict';\n\nvar createSurface = _dereq_('gl-surface3d');\n\nvar ndarray = _dereq_('ndarray');\nvar homography = _dereq_('ndarray-homography');\nvar fill = _dereq_('ndarray-fill');\n\nvar isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar str2RgbaArray = _dereq_('../../lib/str2rgbarray');\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\n\nvar interp2d = _dereq_('../heatmap/interp2d');\nvar findEmpties = _dereq_('../heatmap/find_empties');\n\nfunction SurfaceTrace(scene, surface, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.surface = surface;\n    this.data = null;\n    this.showContour = [false, false, false];\n    this.contourStart = [null, null, null];\n    this.contourEnd = [null, null, null];\n    this.contourSize = [0, 0, 0];\n    this.minValues = [Infinity, Infinity, Infinity];\n    this.maxValues = [-Infinity, -Infinity, -Infinity];\n    this.dataScaleX = 1.0;\n    this.dataScaleY = 1.0;\n    this.refineData = true;\n    this.objectOffset = [0, 0, 0];\n}\n\nvar proto = SurfaceTrace.prototype;\n\nproto.getXat = function(a, b, calendar, axis) {\n    var v = (\n       (!isArrayOrTypedArray(this.data.x)) ?\n            a :\n       (isArrayOrTypedArray(this.data.x[0])) ?\n            this.data.x[b][a] :\n            this.data.x[a]\n    );\n\n    return (calendar === undefined) ? v : axis.d2l(v, 0, calendar);\n};\n\nproto.getYat = function(a, b, calendar, axis) {\n    var v = (\n       (!isArrayOrTypedArray(this.data.y)) ?\n            b :\n       (isArrayOrTypedArray(this.data.y[0])) ?\n            this.data.y[b][a] :\n            this.data.y[b]\n    );\n\n    return (calendar === undefined) ? v : axis.d2l(v, 0, calendar);\n};\n\nproto.getZat = function(a, b, calendar, axis) {\n    var v = this.data.z[b][a];\n\n    if(v === null && this.data.connectgaps && this.data._interpolatedZ) {\n        v = this.data._interpolatedZ[b][a];\n    }\n\n    return (calendar === undefined) ? v : axis.d2l(v, 0, calendar);\n};\n\nproto.handlePick = function(selection) {\n    if(selection.object === this.surface) {\n        var xRatio = (selection.data.index[0] - 1) / this.dataScaleX - 1;\n        var yRatio = (selection.data.index[1] - 1) / this.dataScaleY - 1;\n\n        var j = Math.max(Math.min(Math.round(xRatio), this.data.z[0].length - 1), 0);\n        var k = Math.max(Math.min(Math.round(yRatio), this.data._ylength - 1), 0);\n\n        selection.index = [j, k];\n\n        selection.traceCoordinate = [\n            this.getXat(j, k),\n            this.getYat(j, k),\n            this.getZat(j, k)\n        ];\n\n        selection.dataCoordinate = [\n            this.getXat(j, k, this.data.xcalendar, this.scene.fullSceneLayout.xaxis),\n            this.getYat(j, k, this.data.ycalendar, this.scene.fullSceneLayout.yaxis),\n            this.getZat(j, k, this.data.zcalendar, this.scene.fullSceneLayout.zaxis)\n        ];\n\n        for(var i = 0; i < 3; i++) {\n            var v = selection.dataCoordinate[i];\n            if(v !== null && v !== undefined) {\n                selection.dataCoordinate[i] *= this.scene.dataScale[i];\n            }\n        }\n\n        var text = this.data.hovertext || this.data.text;\n        if(Array.isArray(text) && text[k] && text[k][j] !== undefined) {\n            selection.textLabel = text[k][j];\n        } else if(text) {\n            selection.textLabel = text;\n        } else {\n            selection.textLabel = '';\n        }\n\n        selection.data.dataCoordinate = selection.dataCoordinate.slice();\n\n        this.surface.highlight(selection.data);\n\n        // Snap spikes to data coordinate\n        this.scene.glplot.spikes.position = selection.dataCoordinate;\n\n        return true;\n    }\n};\n\nfunction isColormapCircular(colormap) {\n    var first = colormap[0].rgb;\n    var last = colormap[colormap.length - 1].rgb;\n\n    return (\n        first[0] === last[0] &&\n        first[1] === last[1] &&\n        first[2] === last[2] &&\n        first[3] === last[3]\n    );\n}\n\nvar shortPrimes = [\n    2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,\n    101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199,\n    211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293,\n    307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397,\n    401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499,\n    503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599,\n    601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691,\n    701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797,\n    809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,\n    907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997,\n    1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097,\n    1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193,\n    1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297,\n    1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399,\n    1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499,\n    1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597,\n    1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699,\n    1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789,\n    1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889,\n    1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999,\n    2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099,\n    2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179,\n    2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297,\n    2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399,\n    2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477,\n    2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593,\n    2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699,\n    2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797,\n    2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897,\n    2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999\n];\n\nfunction getPow(a, b) {\n    if(a < b) return 0;\n    var n = 0;\n    while(Math.floor(a % b) === 0) {\n        a /= b;\n        n++;\n    }\n    return n;\n}\n\nfunction getFactors(a) {\n    var powers = [];\n    for(var i = 0; i < shortPrimes.length; i++) {\n        var b = shortPrimes[i];\n        powers.push(\n            getPow(a, b)\n        );\n    }\n    return powers;\n}\n\nfunction smallestDivisor(a) {\n    var A = getFactors(a);\n    var result = a;\n    for(var i = 0; i < shortPrimes.length; i++) {\n        if(A[i] > 0) {\n            result = shortPrimes[i];\n            break;\n        }\n    }\n    return result;\n}\n\nfunction leastCommonMultiple(a, b) {\n    if(a < 1 || b < 1) return undefined;\n    var A = getFactors(a);\n    var B = getFactors(b);\n    var n = 1;\n    for(var i = 0; i < shortPrimes.length; i++) {\n        n *= Math.pow(\n            shortPrimes[i], Math.max(A[i], B[i])\n        );\n    }\n    return n;\n}\n\nfunction arrayLCM(A) {\n    if(A.length === 0) return undefined;\n    var n = 1;\n    for(var i = 0; i < A.length; i++) {\n        n = leastCommonMultiple(n, A[i]);\n    }\n    return n;\n}\n\nproto.calcXnums = function(xlen) {\n    var i;\n    var nums = [];\n    for(i = 1; i < xlen; i++) {\n        var a = this.getXat(i - 1, 0);\n        var b = this.getXat(i, 0);\n\n        if(b !== a &&\n            a !== undefined && a !== null &&\n            b !== undefined && b !== null) {\n            nums[i - 1] = Math.abs(b - a);\n        } else {\n            nums[i - 1] = 0;\n        }\n    }\n\n    var totalDist = 0;\n    for(i = 1; i < xlen; i++) {\n        totalDist += nums[i - 1];\n    }\n\n    for(i = 1; i < xlen; i++) {\n        if(nums[i - 1] === 0) {\n            nums[i - 1] = 1;\n        } else {\n            nums[i - 1] = Math.round(totalDist / nums[i - 1]);\n        }\n    }\n\n    return nums;\n};\n\nproto.calcYnums = function(ylen) {\n    var i;\n    var nums = [];\n    for(i = 1; i < ylen; i++) {\n        var a = this.getYat(0, i - 1);\n        var b = this.getYat(0, i);\n\n        if(b !== a &&\n            a !== undefined && a !== null &&\n            b !== undefined && b !== null) {\n            nums[i - 1] = Math.abs(b - a);\n        } else {\n            nums[i - 1] = 0;\n        }\n    }\n\n    var totalDist = 0;\n    for(i = 1; i < ylen; i++) {\n        totalDist += nums[i - 1];\n    }\n\n    for(i = 1; i < ylen; i++) {\n        if(nums[i - 1] === 0) {\n            nums[i - 1] = 1;\n        } else {\n            nums[i - 1] = Math.round(totalDist / nums[i - 1]);\n        }\n    }\n\n    return nums;\n};\n\nvar highlyComposites = [1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260];\n\nvar MIN_RESOLUTION = highlyComposites[9];\nvar MAX_RESOLUTION = highlyComposites[13];\n\nproto.estimateScale = function(resSrc, axis) {\n    var nums = (axis === 0) ?\n        this.calcXnums(resSrc) :\n        this.calcYnums(resSrc);\n\n    var resDst = 1 + arrayLCM(nums);\n\n    while(resDst < MIN_RESOLUTION) {\n        resDst *= 2;\n    }\n\n    while(resDst > MAX_RESOLUTION) {\n        resDst--;\n        resDst /= smallestDivisor(resDst);\n        resDst++;\n\n        if(resDst < MIN_RESOLUTION) {\n         // resDst = MIN_RESOLUTION; // option 1: use min resolution\n            resDst = MAX_RESOLUTION; // option 2: use max resolution\n        }\n    }\n\n    var scale = Math.round(resDst / resSrc);\n    return (scale > 1) ? scale : 1;\n};\n\nproto.refineCoords = function(coords) {\n    var scaleW = this.dataScaleX;\n    var scaleH = this.dataScaleY;\n\n    var width = coords[0].shape[0];\n    var height = coords[0].shape[1];\n\n    var newWidth = Math.floor(coords[0].shape[0] * scaleW + 1) | 0;\n    var newHeight = Math.floor(coords[0].shape[1] * scaleH + 1) | 0;\n\n    // Pad coords by +1\n    var padWidth = 1 + width + 1;\n    var padHeight = 1 + height + 1;\n    var padImg = ndarray(new Float32Array(padWidth * padHeight), [padWidth, padHeight]);\n\n    for(var i = 0; i < coords.length; ++i) {\n        this.surface.padField(padImg, coords[i]);\n\n        var scaledImg = ndarray(new Float32Array(newWidth * newHeight), [newWidth, newHeight]);\n        homography(scaledImg, padImg,\n            [\n                scaleW, 0, 0,\n                0, scaleH, 0,\n                0, 0, 1\n            ]\n        );\n        coords[i] = scaledImg;\n    }\n};\n\nfunction insertIfNewLevel(arr, newValue) {\n    var found = false;\n    for(var k = 0; k < arr.length; k++) {\n        if(newValue === arr[k]) {\n            found = true;\n            break;\n        }\n    }\n    if(found === false) arr.push(newValue);\n}\n\nproto.setContourLevels = function() {\n    var newLevels = [[], [], []];\n    var useNewLevels = [false, false, false];\n    var needsUpdate = false;\n\n    var i, j, value;\n\n    for(i = 0; i < 3; ++i) {\n        if(this.showContour[i]) {\n            needsUpdate = true;\n\n            if(\n                this.contourSize[i] > 0 &&\n                this.contourStart[i] !== null &&\n                this.contourEnd[i] !== null &&\n                this.contourEnd[i] > this.contourStart[i]\n            ) {\n                useNewLevels[i] = true;\n\n                for(j = this.contourStart[i]; j < this.contourEnd[i]; j += this.contourSize[i]) {\n                    value = j * this.scene.dataScale[i];\n\n                    insertIfNewLevel(newLevels[i], value);\n                }\n            }\n        }\n    }\n\n    if(needsUpdate) {\n        var allLevels = [[], [], []];\n        for(i = 0; i < 3; ++i) {\n            if(this.showContour[i]) {\n                allLevels[i] = useNewLevels[i] ? newLevels[i] : this.scene.contourLevels[i];\n            }\n        }\n        this.surface.update({ levels: allLevels });\n    }\n};\n\nproto.update = function(data) {\n    var scene = this.scene;\n    var sceneLayout = scene.fullSceneLayout;\n    var surface = this.surface;\n    var alpha = data.opacity;\n    var colormap = parseColorScale(data, alpha);\n    var scaleFactor = scene.dataScale;\n    var xlen = data.z[0].length;\n    var ylen = data._ylength;\n    var contourLevels = scene.contourLevels;\n\n    // Save data\n    this.data = data;\n\n    /*\n     * Fill and transpose zdata.\n     * Consistent with 'heatmap' and 'contour', plotly 'surface'\n     * 'z' are such that sub-arrays correspond to y-coords\n     * and that the sub-array entries correspond to a x-coords,\n     * which is the transpose of 'gl-surface-plot'.\n     */\n\n    var i, j, k, v;\n    var rawCoords = [];\n    for(i = 0; i < 3; i++) {\n        rawCoords[i] = [];\n        for(j = 0; j < xlen; j++) {\n            rawCoords[i][j] = [];\n            /*\n            for(k = 0; k < ylen; k++) {\n                rawCoords[i][j][k] = undefined;\n            }\n            */\n        }\n    }\n\n    // coords x, y & z\n    for(j = 0; j < xlen; j++) {\n        for(k = 0; k < ylen; k++) {\n            rawCoords[0][j][k] = this.getXat(j, k, data.xcalendar, sceneLayout.xaxis);\n            rawCoords[1][j][k] = this.getYat(j, k, data.ycalendar, sceneLayout.yaxis);\n            rawCoords[2][j][k] = this.getZat(j, k, data.zcalendar, sceneLayout.zaxis);\n        }\n    }\n\n    if(data.connectgaps) {\n        data._emptypoints = findEmpties(rawCoords[2]);\n        interp2d(rawCoords[2], data._emptypoints);\n\n        data._interpolatedZ = [];\n        for(j = 0; j < xlen; j++) {\n            data._interpolatedZ[j] = [];\n            for(k = 0; k < ylen; k++) {\n                data._interpolatedZ[j][k] = rawCoords[2][j][k];\n            }\n        }\n    }\n\n    // Note: log axes are not defined in surfaces yet.\n    // but they could be defined here...\n\n    for(i = 0; i < 3; i++) {\n        for(j = 0; j < xlen; j++) {\n            for(k = 0; k < ylen; k++) {\n                v = rawCoords[i][j][k];\n                if(v === null || v === undefined) {\n                    rawCoords[i][j][k] = NaN;\n                } else {\n                    v = rawCoords[i][j][k] *= scaleFactor[i];\n                }\n            }\n        }\n    }\n\n    for(i = 0; i < 3; i++) {\n        for(j = 0; j < xlen; j++) {\n            for(k = 0; k < ylen; k++) {\n                v = rawCoords[i][j][k];\n                if(v !== null && v !== undefined) {\n                    if(this.minValues[i] > v) {\n                        this.minValues[i] = v;\n                    }\n                    if(this.maxValues[i] < v) {\n                        this.maxValues[i] = v;\n                    }\n                }\n            }\n        }\n    }\n\n    for(i = 0; i < 3; i++) {\n        this.objectOffset[i] = 0.5 * (this.minValues[i] + this.maxValues[i]);\n    }\n\n    for(i = 0; i < 3; i++) {\n        for(j = 0; j < xlen; j++) {\n            for(k = 0; k < ylen; k++) {\n                v = rawCoords[i][j][k];\n                if(v !== null && v !== undefined) {\n                    rawCoords[i][j][k] -= this.objectOffset[i];\n                }\n            }\n        }\n    }\n\n    // convert processed raw data to Float32 matrices\n    var coords = [\n        ndarray(new Float32Array(xlen * ylen), [xlen, ylen]),\n        ndarray(new Float32Array(xlen * ylen), [xlen, ylen]),\n        ndarray(new Float32Array(xlen * ylen), [xlen, ylen])\n    ];\n    fill(coords[0], function(row, col) { return rawCoords[0][row][col]; });\n    fill(coords[1], function(row, col) { return rawCoords[1][row][col]; });\n    fill(coords[2], function(row, col) { return rawCoords[2][row][col]; });\n    rawCoords = []; // free memory\n\n    var params = {\n        colormap: colormap,\n        levels: [[], [], []],\n        showContour: [true, true, true],\n        showSurface: !data.hidesurface,\n        contourProject: [\n            [false, false, false],\n            [false, false, false],\n            [false, false, false]\n        ],\n        contourWidth: [1, 1, 1],\n        contourColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],\n        contourTint: [1, 1, 1],\n        dynamicColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],\n        dynamicWidth: [1, 1, 1],\n        dynamicTint: [1, 1, 1],\n        opacity: data.opacity\n    };\n\n    var cOpts = extractOpts(data);\n    params.intensityBounds = [cOpts.min, cOpts.max];\n\n    // Refine surface color if necessary\n    if(data.surfacecolor) {\n        var intensity = ndarray(new Float32Array(xlen * ylen), [xlen, ylen]);\n\n        fill(intensity, function(row, col) {\n            return data.surfacecolor[col][row];\n        });\n\n        coords.push(intensity);\n    } else {\n        // when 'z' is used as 'intensity',\n        // we must scale its value\n        params.intensityBounds[0] *= scaleFactor[2];\n        params.intensityBounds[1] *= scaleFactor[2];\n    }\n\n    if(MAX_RESOLUTION < coords[0].shape[0] ||\n        MAX_RESOLUTION < coords[0].shape[1]) {\n        this.refineData = false;\n    }\n\n    if(this.refineData === true) {\n        this.dataScaleX = this.estimateScale(coords[0].shape[0], 0);\n        this.dataScaleY = this.estimateScale(coords[0].shape[1], 1);\n        if(this.dataScaleX !== 1 || this.dataScaleY !== 1) {\n            this.refineCoords(coords);\n        }\n    }\n\n    if(data.surfacecolor) {\n        params.intensity = coords.pop();\n    }\n\n    var highlightEnable = [true, true, true];\n    var axis = ['x', 'y', 'z'];\n\n    for(i = 0; i < 3; ++i) {\n        var contourParams = data.contours[axis[i]];\n        highlightEnable[i] = contourParams.highlight;\n\n        params.showContour[i] = contourParams.show || contourParams.highlight;\n        if(!params.showContour[i]) continue;\n\n        params.contourProject[i] = [\n            contourParams.project.x,\n            contourParams.project.y,\n            contourParams.project.z\n        ];\n\n        if(contourParams.show) {\n            this.showContour[i] = true;\n            params.levels[i] = contourLevels[i];\n            surface.highlightColor[i] = params.contourColor[i] = str2RgbaArray(contourParams.color);\n\n            if(contourParams.usecolormap) {\n                surface.highlightTint[i] = params.contourTint[i] = 0;\n            } else {\n                surface.highlightTint[i] = params.contourTint[i] = 1;\n            }\n            params.contourWidth[i] = contourParams.width;\n\n            this.contourStart[i] = contourParams.start;\n            this.contourEnd[i] = contourParams.end;\n            this.contourSize[i] = contourParams.size;\n        } else {\n            this.showContour[i] = false;\n\n            this.contourStart[i] = null;\n            this.contourEnd[i] = null;\n            this.contourSize[i] = 0;\n        }\n\n        if(contourParams.highlight) {\n            params.dynamicColor[i] = str2RgbaArray(contourParams.highlightcolor);\n            params.dynamicWidth[i] = contourParams.highlightwidth;\n        }\n    }\n\n    // see https://github.com/plotly/plotly.js/issues/940\n    if(isColormapCircular(colormap)) {\n        params.vertexColor = true;\n    }\n\n    params.objectOffset = this.objectOffset;\n\n    params.coords = coords;\n    surface.update(params);\n\n    surface.visible = data.visible;\n    surface.enableDynamic = highlightEnable;\n    surface.enableHighlight = highlightEnable;\n\n    surface.snapToData = true;\n\n    if('lighting' in data) {\n        surface.ambientLight = data.lighting.ambient;\n        surface.diffuseLight = data.lighting.diffuse;\n        surface.specularLight = data.lighting.specular;\n        surface.roughness = data.lighting.roughness;\n        surface.fresnel = data.lighting.fresnel;\n    }\n\n    if('lightposition' in data) {\n        surface.lightPosition = [data.lightposition.x, data.lightposition.y, data.lightposition.z];\n    }\n\n    if(alpha && alpha < 1) {\n        surface.supportsTransparency = true;\n    }\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.surface);\n    this.surface.dispose();\n};\n\nfunction createSurfaceTrace(scene, data) {\n    var gl = scene.glplot.gl;\n    var surface = createSurface({ gl: gl });\n    var result = new SurfaceTrace(scene, surface, data.uid);\n    surface._trace = result;\n    result.update(data);\n    scene.glplot.add(surface);\n    return result;\n}\n\nmodule.exports = createSurfaceTrace;\n\n},{\"../../components/colorscale\":592,\"../../lib\":703,\"../../lib/gl_format_color\":700,\"../../lib/str2rgbarray\":726,\"../heatmap/find_empties\":978,\"../heatmap/interp2d\":981,\"gl-surface3d\":315,\"ndarray\":445,\"ndarray-fill\":435,\"ndarray-homography\":437}],1174:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Registry = _dereq_('../../registry');\nvar Lib = _dereq_('../../lib');\n\nvar colorscaleDefaults = _dereq_('../../components/colorscale/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    var i, j;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var x = coerce('x');\n    var y = coerce('y');\n\n    var z = coerce('z');\n    if(!z || !z.length ||\n       (x ? (x.length < 1) : false) ||\n       (y ? (y.length < 1) : false)\n    ) {\n        traceOut.visible = false;\n        return;\n    }\n\n    traceOut._xlength = (Array.isArray(x) && Lib.isArrayOrTypedArray(x[0])) ? z.length : z[0].length;\n    traceOut._ylength = z.length;\n\n    var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');\n    handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);\n\n    coerce('text');\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    // Coerce remaining properties\n    [\n        'lighting.ambient',\n        'lighting.diffuse',\n        'lighting.specular',\n        'lighting.roughness',\n        'lighting.fresnel',\n        'lightposition.x',\n        'lightposition.y',\n        'lightposition.z',\n        'hidesurface',\n        'connectgaps',\n        'opacity'\n    ].forEach(function(x) { coerce(x); });\n\n    var surfaceColor = coerce('surfacecolor');\n\n    var dims = ['x', 'y', 'z'];\n    for(i = 0; i < 3; ++i) {\n        var contourDim = 'contours.' + dims[i];\n        var show = coerce(contourDim + '.show');\n        var highlight = coerce(contourDim + '.highlight');\n\n        if(show || highlight) {\n            for(j = 0; j < 3; ++j) {\n                coerce(contourDim + '.project.' + dims[j]);\n            }\n        }\n\n        if(show) {\n            coerce(contourDim + '.color');\n            coerce(contourDim + '.width');\n            coerce(contourDim + '.usecolormap');\n        }\n\n        if(highlight) {\n            coerce(contourDim + '.highlightcolor');\n            coerce(contourDim + '.highlightwidth');\n        }\n\n        coerce(contourDim + '.start');\n        coerce(contourDim + '.end');\n        coerce(contourDim + '.size');\n    }\n\n    // backward compatibility block\n    if(!surfaceColor) {\n        mapLegacy(traceIn, 'zmin', 'cmin');\n        mapLegacy(traceIn, 'zmax', 'cmax');\n        mapLegacy(traceIn, 'zauto', 'cauto');\n    }\n\n    // TODO if contours.?.usecolormap are false and hidesurface is true\n    // the colorbar shouldn't be shown by default\n\n    colorscaleDefaults(\n        traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'}\n    );\n\n    // disable 1D transforms - currently surface does NOT support column data like heatmap does\n    // you can use mesh3d for this use case, but not surface\n    traceOut._length = null;\n};\n\nfunction mapLegacy(traceIn, oldAttr, newAttr) {\n    if(oldAttr in traceIn && !(newAttr in traceIn)) {\n        traceIn[newAttr] = traceIn[oldAttr];\n    }\n}\n\n},{\"../../components/colorscale/defaults\":590,\"../../lib\":703,\"../../registry\":831,\"./attributes\":1171}],1175:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./convert'),\n\n    moduleType: 'trace',\n    name: 'surface',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d', '2dMap', 'noOpacity'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"./attributes\":1171,\"./calc\":1172,\"./convert\":1173,\"./defaults\":1174}],1176:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar annAttrs = _dereq_('../../components/annotations/attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\nvar fontAttrs = _dereq_('../../plots/font_attributes');\nvar domainAttrs = _dereq_('../../plots/domain').attributes;\n\nvar attrs = module.exports = overrideAll({\n    domain: domainAttrs({name: 'table', trace: true}),\n\n    columnwidth: {\n        valType: 'number',\n        arrayOk: true,\n        dflt: null,\n        \n        \n    },\n\n    columnorder: {\n        valType: 'data_array',\n        \n        \n    },\n\n    header: {\n\n        values: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n\n        format: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n\n        prefix: {\n            valType: 'string',\n            arrayOk: true,\n            dflt: null,\n            \n            \n        },\n\n        suffix: {\n            valType: 'string',\n            arrayOk: true,\n            dflt: null,\n            \n            \n        },\n\n        height: {\n            valType: 'number',\n            dflt: 28,\n            \n            \n        },\n\n        align: extendFlat({}, annAttrs.align, {arrayOk: true}),\n\n        line: {\n            width: {\n                valType: 'number',\n                arrayOk: true,\n                dflt: 1,\n                \n            },\n            color: {\n                valType: 'color',\n                arrayOk: true,\n                dflt: 'grey',\n                \n            }\n        },\n\n        fill: {\n            color: {\n                valType: 'color',\n                arrayOk: true,\n                dflt: 'white',\n                \n                \n            }\n        },\n\n        font: extendFlat({}, fontAttrs({arrayOk: true}))\n    },\n\n    cells: {\n\n        values: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n\n        format: {\n            valType: 'data_array',\n            \n            dflt: [],\n            \n        },\n\n        prefix: {\n            valType: 'string',\n            arrayOk: true,\n            dflt: null,\n            \n            \n        },\n\n        suffix: {\n            valType: 'string',\n            arrayOk: true,\n            dflt: null,\n            \n            \n        },\n\n        height: {\n            valType: 'number',\n            dflt: 20,\n            \n            \n        },\n\n        align: extendFlat({}, annAttrs.align, {arrayOk: true}),\n\n        line: {\n            width: {\n                valType: 'number',\n                arrayOk: true,\n                dflt: 1,\n                \n            },\n            color: {\n                valType: 'color',\n                arrayOk: true,\n                dflt: 'grey',\n                \n            }\n        },\n\n        fill: {\n            color: {\n                valType: 'color',\n                arrayOk: true,\n                \n                dflt: 'white',\n                \n            }\n        },\n\n        font: extendFlat({}, fontAttrs({arrayOk: true}))\n    }\n}, 'calc', 'from-root');\nattrs.transforms = undefined;\n\n},{\"../../components/annotations/attributes\":563,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/domain\":776,\"../../plots/font_attributes\":777}],1177:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar getModuleCalcData = _dereq_('../../plots/get_data').getModuleCalcData;\nvar tablePlot = _dereq_('./plot');\n\nvar TABLE = 'table';\n\nexports.name = TABLE;\n\nexports.plot = function(gd) {\n    var calcData = getModuleCalcData(gd.calcdata, TABLE)[0];\n    if(calcData.length) tablePlot(gd, calcData);\n};\n\nexports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {\n    var hadTable = (oldFullLayout._has && oldFullLayout._has(TABLE));\n    var hasTable = (newFullLayout._has && newFullLayout._has(TABLE));\n\n    if(hadTable && !hasTable) {\n        oldFullLayout._paperdiv.selectAll('.table').remove();\n    }\n};\n\n},{\"../../plots/get_data\":786,\"./plot\":1184}],1178:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar wrap = _dereq_('../../lib/gup').wrap;\n\nmodule.exports = function calc() {\n    // we don't actually need to include the trace here, since that will be added\n    // by Plots.doCalcdata, and that's all we actually need later.\n    return wrap({});\n};\n\n},{\"../../lib/gup\":701}],1179:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    cellPad: 8,\n    columnExtentOffset: 10,\n    columnTitleOffset: 28,\n    emptyHeaderHeight: 16,\n    latexCheck: /^\\$.*\\$$/,\n    goldenRatio: 1.618,\n    lineBreaker: '<br>',\n    maxDimensionCount: 60,\n    overdrag: 45,\n    releaseTransitionDuration: 120,\n    releaseTransitionEase: 'cubic-out',\n    scrollbarCaptureWidth: 18,\n    scrollbarHideDelay: 1000,\n    scrollbarHideDuration: 1000,\n    scrollbarOffset: 5,\n    scrollbarWidth: 8,\n    transitionDuration: 100,\n    transitionEase: 'cubic-out',\n    uplift: 5,\n    wrapSpacer: ' ',\n    wrapSplitCharacter: ' ',\n    cn: {\n        // general class names\n        table: 'table',\n        tableControlView: 'table-control-view',\n        scrollBackground: 'scroll-background',\n        yColumn: 'y-column',\n        columnBlock: 'column-block',\n        scrollAreaClip: 'scroll-area-clip',\n        scrollAreaClipRect: 'scroll-area-clip-rect',\n        columnBoundary: 'column-boundary',\n        columnBoundaryClippath: 'column-boundary-clippath',\n        columnBoundaryRect: 'column-boundary-rect',\n        columnCells: 'column-cells',\n        columnCell: 'column-cell',\n        cellRect: 'cell-rect',\n        cellText: 'cell-text',\n        cellTextHolder: 'cell-text-holder',\n\n        // scroll related class names\n        scrollbarKit: 'scrollbar-kit',\n        scrollbar: 'scrollbar',\n        scrollbarSlider: 'scrollbar-slider',\n        scrollbarGlyph: 'scrollbar-glyph',\n        scrollbarCaptureZone: 'scrollbar-capture-zone'\n    }\n};\n\n},{}],1180:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar c = _dereq_('./constants');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar isNumeric = _dereq_('fast-isnumeric');\n\n// pure functions, don't alter but passes on `gd` and parts of `trace` without deep copying\nmodule.exports = function calc(gd, trace) {\n    var cellsValues = squareStringMatrix(trace.cells.values);\n    var slicer = function(a) {\n        return a.slice(trace.header.values.length, a.length);\n    };\n    var headerValuesIn = squareStringMatrix(trace.header.values);\n    if(headerValuesIn.length && !headerValuesIn[0].length) {\n        headerValuesIn[0] = [''];\n        headerValuesIn = squareStringMatrix(headerValuesIn);\n    }\n    var headerValues = headerValuesIn\n        .concat(slicer(cellsValues).map(function() {\n            return emptyStrings((headerValuesIn[0] || ['']).length);\n        }));\n\n    var domain = trace.domain;\n    var groupWidth = Math.floor(gd._fullLayout._size.w * (domain.x[1] - domain.x[0]));\n    var groupHeight = Math.floor(gd._fullLayout._size.h * (domain.y[1] - domain.y[0]));\n    var headerRowHeights = trace.header.values.length ?\n        headerValues[0].map(function() { return trace.header.height; }) :\n        [c.emptyHeaderHeight];\n    var rowHeights = cellsValues.length ? cellsValues[0].map(function() { return trace.cells.height; }) : [];\n    var headerHeight = headerRowHeights.reduce(sum, 0);\n    var scrollHeight = groupHeight - headerHeight;\n    var minimumFillHeight = scrollHeight + c.uplift;\n    var anchorToRowBlock = makeAnchorToRowBlock(rowHeights, minimumFillHeight);\n    var anchorToHeaderRowBlock = makeAnchorToRowBlock(headerRowHeights, headerHeight);\n    var headerRowBlocks = makeRowBlock(anchorToHeaderRowBlock, []);\n    var rowBlocks = makeRowBlock(anchorToRowBlock, headerRowBlocks);\n    var uniqueKeys = {};\n    var columnOrder = trace._fullInput.columnorder.concat(slicer(cellsValues.map(function(d, i) {return i;})));\n    var columnWidths = headerValues.map(function(d, i) {\n        var value = Array.isArray(trace.columnwidth) ?\n            trace.columnwidth[Math.min(i, trace.columnwidth.length - 1)] :\n            trace.columnwidth;\n        return isNumeric(value) ? Number(value) : 1;\n    });\n    var totalColumnWidths = columnWidths.reduce(sum, 0);\n\n    // fit columns in the available vertical space as there's no vertical scrolling now\n    columnWidths = columnWidths.map(function(d) { return d / totalColumnWidths * groupWidth; });\n\n    var maxLineWidth = Math.max(arrayMax(trace.header.line.width), arrayMax(trace.cells.line.width));\n\n    var calcdata = {\n        // include staticPlot in the key so if it changes we delete and redraw\n        key: trace.uid + gd._context.staticPlot,\n        translateX: domain.x[0] * gd._fullLayout._size.w,\n        translateY: gd._fullLayout._size.h * (1 - domain.y[1]),\n        size: gd._fullLayout._size,\n        width: groupWidth,\n        maxLineWidth: maxLineWidth,\n        height: groupHeight,\n        columnOrder: columnOrder, // will be mutated on column move, todo use in callback\n        groupHeight: groupHeight,\n        rowBlocks: rowBlocks,\n        headerRowBlocks: headerRowBlocks,\n        scrollY: 0, // will be mutated on scroll\n        cells: extendFlat({}, trace.cells, {values: cellsValues}),\n        headerCells: extendFlat({}, trace.header, {values: headerValues}),\n        gdColumns: headerValues.map(function(d) {return d[0];}),\n        gdColumnsOriginalOrder: headerValues.map(function(d) {return d[0];}),\n        prevPages: [0, 0],\n        scrollbarState: {scrollbarScrollInProgress: false},\n        columns: headerValues.map(function(label, i) {\n            var foundKey = uniqueKeys[label];\n            uniqueKeys[label] = (foundKey || 0) + 1;\n            var key = label + '__' + uniqueKeys[label];\n            return {\n                key: key,\n                label: label,\n                specIndex: i,\n                xIndex: columnOrder[i],\n                xScale: xScale,\n                x: undefined, // initialized below\n                calcdata: undefined, // initialized below\n                columnWidth: columnWidths[i]\n            };\n        })\n    };\n\n    calcdata.columns.forEach(function(col) {\n        col.calcdata = calcdata;\n        col.x = xScale(col);\n    });\n\n    return calcdata;\n};\n\nfunction arrayMax(maybeArray) {\n    if(Array.isArray(maybeArray)) {\n        var max = 0;\n        for(var i = 0; i < maybeArray.length; i++) {\n            max = Math.max(max, arrayMax(maybeArray[i]));\n        }\n        return max;\n    }\n    return maybeArray;\n}\n\nfunction sum(a, b) { return a + b; }\n\n// fill matrix in place to equal lengths\n// and ensure it's uniformly 2D\nfunction squareStringMatrix(matrixIn) {\n    var matrix = matrixIn.slice();\n    var minLen = Infinity;\n    var maxLen = 0;\n    var i;\n    for(i = 0; i < matrix.length; i++) {\n        if(!Array.isArray(matrix[i])) matrix[i] = [matrix[i]];\n        minLen = Math.min(minLen, matrix[i].length);\n        maxLen = Math.max(maxLen, matrix[i].length);\n    }\n\n    if(minLen !== maxLen) {\n        for(i = 0; i < matrix.length; i++) {\n            var padLen = maxLen - matrix[i].length;\n            if(padLen) matrix[i] = matrix[i].concat(emptyStrings(padLen));\n        }\n    }\n    return matrix;\n}\n\nfunction emptyStrings(len) {\n    var padArray = new Array(len);\n    for(var j = 0; j < len; j++) padArray[j] = '';\n    return padArray;\n}\n\nfunction xScale(d) {\n    return d.calcdata.columns.reduce(function(prev, next) {\n        return next.xIndex < d.xIndex ? prev + next.columnWidth : prev;\n    }, 0);\n}\n\nfunction makeRowBlock(anchorToRowBlock, auxiliary) {\n    var blockAnchorKeys = Object.keys(anchorToRowBlock);\n    return blockAnchorKeys.map(function(k) {return extendFlat({}, anchorToRowBlock[k], {auxiliaryBlocks: auxiliary});});\n}\n\nfunction makeAnchorToRowBlock(rowHeights, minimumFillHeight) {\n    var anchorToRowBlock = {};\n    var currentRowHeight;\n    var currentAnchor = 0;\n    var currentBlockHeight = 0;\n    var currentBlock = makeIdentity();\n    var currentFirstRowIndex = 0;\n    var blockCounter = 0;\n    for(var i = 0; i < rowHeights.length; i++) {\n        currentRowHeight = rowHeights[i];\n        currentBlock.rows.push({\n            rowIndex: i,\n            rowHeight: currentRowHeight\n        });\n        currentBlockHeight += currentRowHeight;\n        if(currentBlockHeight >= minimumFillHeight || i === rowHeights.length - 1) {\n            anchorToRowBlock[currentAnchor] = currentBlock;\n            currentBlock.key = blockCounter++;\n            currentBlock.firstRowIndex = currentFirstRowIndex;\n            currentBlock.lastRowIndex = i;\n            currentBlock = makeIdentity();\n            currentAnchor += currentBlockHeight;\n            currentFirstRowIndex = i + 1;\n            currentBlockHeight = 0;\n        }\n    }\n\n    return anchorToRowBlock;\n}\n\nfunction makeIdentity() {\n    return {\n        firstRowIndex: null,\n        lastRowIndex: null,\n        rows: []\n    };\n}\n\n},{\"../../lib/extend\":693,\"./constants\":1179,\"fast-isnumeric\":224}],1181:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\n// pure functions, don't alter but passes on `gd` and parts of `trace` without deep copying\n\nexports.splitToPanels = function(d) {\n    var prevPages = [0, 0];\n    var headerPanel = extendFlat({}, d, {\n        key: 'header',\n        type: 'header',\n        page: 0,\n        prevPages: prevPages,\n        currentRepaint: [null, null],\n        dragHandle: true,\n        values: d.calcdata.headerCells.values[d.specIndex],\n        rowBlocks: d.calcdata.headerRowBlocks,\n        calcdata: extendFlat({}, d.calcdata, {cells: d.calcdata.headerCells})\n    });\n    var revolverPanel1 = extendFlat({}, d, {\n        key: 'cells1',\n        type: 'cells',\n        page: 0,\n        prevPages: prevPages,\n        currentRepaint: [null, null],\n        dragHandle: false,\n        values: d.calcdata.cells.values[d.specIndex],\n        rowBlocks: d.calcdata.rowBlocks\n    });\n    var revolverPanel2 = extendFlat({}, d, {\n        key: 'cells2',\n        type: 'cells',\n        page: 1,\n        prevPages: prevPages,\n        currentRepaint: [null, null],\n        dragHandle: false,\n        values: d.calcdata.cells.values[d.specIndex],\n        rowBlocks: d.calcdata.rowBlocks\n    });\n    // order due to SVG using painter's algo:\n    return [revolverPanel1, revolverPanel2, headerPanel];\n};\n\nexports.splitToCells = function(d) {\n    var fromTo = rowFromTo(d);\n    return (d.values || []).slice(fromTo[0], fromTo[1]).map(function(v, i) {\n        // By keeping identical key, a DOM node removal, creation and addition is spared, important when visible\n        // grid has a lot of elements (quadratic with xcol/ycol count).\n        // But it has to be busted when `svgUtil.convertToTspans` is used as it reshapes cell subtrees asynchronously,\n        // and by that time the user may have scrolled away, resulting in stale overwrites. The real solution will be\n        // to turn `svgUtil.convertToTspans` into a cancelable request, in which case no key busting is needed.\n        var buster = (typeof v === 'string') && v.match(/[<$&> ]/) ? '_keybuster_' + Math.random() : '';\n        return {\n            // keyWithinBlock: /*fromTo[0] + */i, // optimized future version - no busting\n            // keyWithinBlock: fromTo[0] + i, // initial always-unoptimized version - janky scrolling with 5+ columns\n            keyWithinBlock: i + buster, // current compromise: regular content is very fast; async content is possible\n            key: fromTo[0] + i,\n            column: d,\n            calcdata: d.calcdata,\n            page: d.page,\n            rowBlocks: d.rowBlocks,\n            value: v\n        };\n    });\n};\n\nfunction rowFromTo(d) {\n    var rowBlock = d.rowBlocks[d.page];\n    // fixme rowBlock truthiness check is due to ugly hack of placing 2nd panel as d.page = -1\n    var rowFrom = rowBlock ? rowBlock.rows[0].rowIndex : 0;\n    var rowTo = rowBlock ? rowFrom + rowBlock.rows.length : 0;\n    return [rowFrom, rowTo];\n}\n\n},{\"../../lib/extend\":693}],1182:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar handleDomainDefaults = _dereq_('../../plots/domain').defaults;\n\nfunction defaultColumnOrder(traceOut, coerce) {\n    var specifiedColumnOrder = traceOut.columnorder || [];\n    var commonLength = traceOut.header.values.length;\n    var truncated = specifiedColumnOrder.slice(0, commonLength);\n    var sorted = truncated.slice().sort(function(a, b) {return a - b;});\n    var oneStepped = truncated.map(function(d) {return sorted.indexOf(d);});\n    for(var i = oneStepped.length; i < commonLength; i++) {\n        oneStepped.push(i);\n    }\n    coerce('columnorder', oneStepped);\n}\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    handleDomainDefaults(traceOut, layout, coerce);\n\n    coerce('columnwidth');\n\n    coerce('header.values');\n    coerce('header.format');\n    coerce('header.align');\n\n    coerce('header.prefix');\n    coerce('header.suffix');\n    coerce('header.height');\n    coerce('header.line.width');\n    coerce('header.line.color');\n    coerce('header.fill.color');\n    Lib.coerceFont(coerce, 'header.font', Lib.extendFlat({}, layout.font));\n\n    defaultColumnOrder(traceOut, coerce);\n\n    coerce('cells.values');\n    coerce('cells.format');\n    coerce('cells.align');\n    coerce('cells.prefix');\n    coerce('cells.suffix');\n    coerce('cells.height');\n    coerce('cells.line.width');\n    coerce('cells.line.color');\n    coerce('cells.fill.color');\n    Lib.coerceFont(coerce, 'cells.font', Lib.extendFlat({}, layout.font));\n\n    // disable 1D transforms\n    traceOut._length = null;\n};\n\n},{\"../../lib\":703,\"../../plots/domain\":776,\"./attributes\":1176}],1183:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('./calc'),\n    plot: _dereq_('./plot'),\n\n    moduleType: 'trace',\n    name: 'table',\n    basePlotModule: _dereq_('./base_plot'),\n    categories: ['noOpacity'],\n    meta: {\n        \n    }\n};\n\n},{\"./attributes\":1176,\"./base_plot\":1177,\"./calc\":1178,\"./defaults\":1182,\"./plot\":1184}],1184:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar c = _dereq_('./constants');\nvar d3 = _dereq_('d3');\nvar gup = _dereq_('../../lib/gup');\nvar Drawing = _dereq_('../../components/drawing');\nvar svgUtil = _dereq_('../../lib/svg_text_utils');\nvar raiseToTop = _dereq_('../../lib').raiseToTop;\nvar cancelEeaseColumn = _dereq_('../../lib').cancelTransition;\nvar prepareData = _dereq_('./data_preparation_helper');\nvar splitData = _dereq_('./data_split_helpers');\nvar Color = _dereq_('../../components/color');\n\nmodule.exports = function plot(gd, wrappedTraceHolders) {\n    var dynamic = !gd._context.staticPlot;\n\n    var table = gd._fullLayout._paper.selectAll('.' + c.cn.table)\n        .data(wrappedTraceHolders.map(function(wrappedTraceHolder) {\n            var traceHolder = gup.unwrap(wrappedTraceHolder);\n            var trace = traceHolder.trace;\n            return prepareData(gd, trace);\n        }), gup.keyFun);\n\n    table.exit().remove();\n\n    table.enter()\n        .append('g')\n        .classed(c.cn.table, true)\n        .attr('overflow', 'visible')\n        .style('box-sizing', 'content-box')\n        .style('position', 'absolute')\n        .style('left', 0)\n        .style('overflow', 'visible')\n        .style('shape-rendering', 'crispEdges')\n        .style('pointer-events', 'all');\n\n    table\n        .attr('width', function(d) {return d.width + d.size.l + d.size.r;})\n        .attr('height', function(d) {return d.height + d.size.t + d.size.b;})\n        .attr('transform', function(d) {\n            return 'translate(' + d.translateX + ',' + d.translateY + ')';\n        });\n\n    var tableControlView = table.selectAll('.' + c.cn.tableControlView)\n        .data(gup.repeat, gup.keyFun);\n\n    var cvEnter = tableControlView.enter()\n        .append('g')\n        .classed(c.cn.tableControlView, true)\n        .style('box-sizing', 'content-box');\n    if(dynamic) {\n        cvEnter\n            .on('mousemove', function(d) {\n                tableControlView\n                    .filter(function(dd) {return d === dd;})\n                    .call(renderScrollbarKit, gd);\n            })\n            .on('mousewheel', function(d) {\n                if(d.scrollbarState.wheeling) return;\n                d.scrollbarState.wheeling = true;\n                var newY = d.scrollY + d3.event.deltaY;\n                var noChange = makeDragRow(gd, tableControlView, null, newY)(d);\n                if(!noChange) {\n                    d3.event.stopPropagation();\n                    d3.event.preventDefault();\n                }\n                d.scrollbarState.wheeling = false;\n            })\n            .call(renderScrollbarKit, gd, true);\n    }\n\n    tableControlView\n        .attr('transform', function(d) {return 'translate(' + d.size.l + ' ' + d.size.t + ')';});\n\n    // scrollBackground merely ensures that mouse events are captured even on crazy fast scrollwheeling\n    // otherwise rendering glitches may occur\n    var scrollBackground = tableControlView.selectAll('.' + c.cn.scrollBackground)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollBackground.enter()\n        .append('rect')\n        .classed(c.cn.scrollBackground, true)\n        .attr('fill', 'none');\n\n    scrollBackground\n        .attr('width', function(d) {return d.width;})\n        .attr('height', function(d) {return d.height;});\n\n    tableControlView.each(function(d) {\n        Drawing.setClipUrl(d3.select(this), scrollAreaBottomClipKey(gd, d), gd);\n    });\n\n    var yColumn = tableControlView.selectAll('.' + c.cn.yColumn)\n        .data(function(vm) {return vm.columns;}, gup.keyFun);\n\n    yColumn.enter()\n        .append('g')\n        .classed(c.cn.yColumn, true);\n\n    yColumn.exit().remove();\n\n    yColumn.attr('transform', function(d) {return 'translate(' + d.x + ' 0)';});\n\n    if(dynamic) {\n        yColumn.call(d3.behavior.drag()\n            .origin(function(d) {\n                var movedColumn = d3.select(this);\n                easeColumn(movedColumn, d, -c.uplift);\n                raiseToTop(this);\n                d.calcdata.columnDragInProgress = true;\n                renderScrollbarKit(tableControlView.filter(function(dd) {return d.calcdata.key === dd.key;}), gd);\n                return d;\n            })\n            .on('drag', function(d) {\n                var movedColumn = d3.select(this);\n                var getter = function(dd) {return (d === dd ? d3.event.x : dd.x) + dd.columnWidth / 2;};\n                d.x = Math.max(-c.overdrag, Math.min(d.calcdata.width + c.overdrag - d.columnWidth, d3.event.x));\n\n                var sortableColumns = flatData(yColumn).filter(function(dd) {return dd.calcdata.key === d.calcdata.key;});\n                var newOrder = sortableColumns.sort(function(a, b) {return getter(a) - getter(b);});\n                newOrder.forEach(function(dd, i) {\n                    dd.xIndex = i;\n                    dd.x = d === dd ? dd.x : dd.xScale(dd);\n                });\n\n                yColumn.filter(function(dd) {return d !== dd;})\n                    .transition()\n                    .ease(c.transitionEase)\n                    .duration(c.transitionDuration)\n                    .attr('transform', function(d) {return 'translate(' + d.x + ' 0)';});\n                movedColumn\n                    .call(cancelEeaseColumn)\n                    .attr('transform', 'translate(' + d.x + ' -' + c.uplift + ' )');\n            })\n            .on('dragend', function(d) {\n                var movedColumn = d3.select(this);\n                var p = d.calcdata;\n                d.x = d.xScale(d);\n                d.calcdata.columnDragInProgress = false;\n                easeColumn(movedColumn, d, 0);\n                columnMoved(gd, p, p.columns.map(function(dd) {return dd.xIndex;}));\n            })\n        );\n    }\n\n    yColumn.each(function(d) {\n        Drawing.setClipUrl(d3.select(this), columnBoundaryClipKey(gd, d), gd);\n    });\n\n    var columnBlock = yColumn.selectAll('.' + c.cn.columnBlock)\n        .data(splitData.splitToPanels, gup.keyFun);\n\n    columnBlock.enter()\n        .append('g')\n        .classed(c.cn.columnBlock, true)\n        .attr('id', function(d) {return d.key;});\n\n    columnBlock\n        .style('cursor', function(d) {\n            return d.dragHandle ? 'ew-resize' : d.calcdata.scrollbarState.barWiggleRoom ? 'ns-resize' : 'default';\n        });\n\n    var headerColumnBlock = columnBlock.filter(headerBlock);\n    var cellsColumnBlock = columnBlock.filter(cellsBlock);\n\n    if(dynamic) {\n        cellsColumnBlock.call(d3.behavior.drag()\n            .origin(function(d) {\n                d3.event.stopPropagation();\n                return d;\n            })\n            .on('drag', makeDragRow(gd, tableControlView, -1))\n            .on('dragend', function() {\n                // fixme emit plotly notification\n            })\n        );\n    }\n\n    // initial rendering: header is rendered first, as it may may have async LaTeX (show header first)\n    // but blocks are _entered_ the way they are due to painter's algo (header on top)\n    renderColumnCellTree(gd, tableControlView, headerColumnBlock, columnBlock);\n    renderColumnCellTree(gd, tableControlView, cellsColumnBlock, columnBlock);\n\n    var scrollAreaClip = tableControlView.selectAll('.' + c.cn.scrollAreaClip)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollAreaClip.enter()\n        .append('clipPath')\n        .classed(c.cn.scrollAreaClip, true)\n        .attr('id', function(d) {return scrollAreaBottomClipKey(gd, d);});\n\n    var scrollAreaClipRect = scrollAreaClip.selectAll('.' + c.cn.scrollAreaClipRect)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollAreaClipRect.enter()\n        .append('rect')\n        .classed(c.cn.scrollAreaClipRect, true)\n        .attr('x', -c.overdrag)\n        .attr('y', -c.uplift)\n        .attr('fill', 'none');\n\n    scrollAreaClipRect\n        .attr('width', function(d) {return d.width + 2 * c.overdrag;})\n        .attr('height', function(d) {return d.height + c.uplift;});\n\n    var columnBoundary = yColumn.selectAll('.' + c.cn.columnBoundary)\n        .data(gup.repeat, gup.keyFun);\n\n    columnBoundary.enter()\n        .append('g')\n        .classed(c.cn.columnBoundary, true);\n\n    var columnBoundaryClippath = yColumn.selectAll('.' + c.cn.columnBoundaryClippath)\n        .data(gup.repeat, gup.keyFun);\n\n    // SVG spec doesn't mandate wrapping into a <defs> and doesn't seem to cause a speed difference\n    columnBoundaryClippath.enter()\n        .append('clipPath')\n        .classed(c.cn.columnBoundaryClippath, true);\n\n    columnBoundaryClippath\n        .attr('id', function(d) {return columnBoundaryClipKey(gd, d);});\n\n    var columnBoundaryRect = columnBoundaryClippath.selectAll('.' + c.cn.columnBoundaryRect)\n        .data(gup.repeat, gup.keyFun);\n\n    columnBoundaryRect.enter()\n        .append('rect')\n        .classed(c.cn.columnBoundaryRect, true)\n        .attr('fill', 'none');\n\n    columnBoundaryRect\n        .attr('width', function(d) { return d.columnWidth + 2 * roundHalfWidth(d); })\n        .attr('height', function(d) {return d.calcdata.height + 2 * roundHalfWidth(d) + c.uplift;})\n        .attr('x', function(d) { return -roundHalfWidth(d); })\n        .attr('y', function(d) { return -roundHalfWidth(d); });\n\n    updateBlockYPosition(null, cellsColumnBlock, tableControlView);\n};\n\nfunction roundHalfWidth(d) {\n    return Math.ceil(d.calcdata.maxLineWidth / 2);\n}\n\nfunction scrollAreaBottomClipKey(gd, d) {\n    return 'clip' + gd._fullLayout._uid + '_scrollAreaBottomClip_' + d.key;\n}\n\nfunction columnBoundaryClipKey(gd, d) {\n    return 'clip' + gd._fullLayout._uid + '_columnBoundaryClippath_' + d.calcdata.key + '_' + d.specIndex;\n}\n\nfunction flatData(selection) {\n    return [].concat.apply([], selection.map(function(g) {return g;}))\n        .map(function(g) {return g.__data__;});\n}\n\nfunction renderScrollbarKit(tableControlView, gd, bypassVisibleBar) {\n    function calcTotalHeight(d) {\n        var blocks = d.rowBlocks;\n        return firstRowAnchor(blocks, blocks.length - 1) + (blocks.length ? rowsHeight(blocks[blocks.length - 1], Infinity) : 1);\n    }\n\n    var scrollbarKit = tableControlView.selectAll('.' + c.cn.scrollbarKit)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollbarKit.enter()\n        .append('g')\n        .classed(c.cn.scrollbarKit, true)\n        .style('shape-rendering', 'geometricPrecision');\n\n    scrollbarKit\n        .each(function(d) {\n            var s = d.scrollbarState;\n            s.totalHeight = calcTotalHeight(d);\n            s.scrollableAreaHeight = d.groupHeight - headerHeight(d);\n            s.currentlyVisibleHeight = Math.min(s.totalHeight, s.scrollableAreaHeight);\n            s.ratio = s.currentlyVisibleHeight / s.totalHeight;\n            s.barLength = Math.max(s.ratio * s.currentlyVisibleHeight, c.goldenRatio * c.scrollbarWidth);\n            s.barWiggleRoom = s.currentlyVisibleHeight - s.barLength;\n            s.wiggleRoom = Math.max(0, s.totalHeight - s.scrollableAreaHeight);\n            s.topY = s.barWiggleRoom === 0 ? 0 : (d.scrollY / s.wiggleRoom) * s.barWiggleRoom;\n            s.bottomY = s.topY + s.barLength;\n            s.dragMultiplier = s.wiggleRoom / s.barWiggleRoom;\n        })\n        .attr('transform', function(d) {\n            var xPosition = d.width + c.scrollbarWidth / 2 + c.scrollbarOffset;\n            return 'translate(' + xPosition + ' ' + headerHeight(d) + ')';\n        });\n\n    var scrollbar = scrollbarKit.selectAll('.' + c.cn.scrollbar)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollbar.enter()\n        .append('g')\n        .classed(c.cn.scrollbar, true);\n\n    var scrollbarSlider = scrollbar.selectAll('.' + c.cn.scrollbarSlider)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollbarSlider.enter()\n        .append('g')\n        .classed(c.cn.scrollbarSlider, true);\n\n    scrollbarSlider\n        .attr('transform', function(d) {\n            return 'translate(0 ' + (d.scrollbarState.topY || 0) + ')';\n        });\n\n    var scrollbarGlyph = scrollbarSlider.selectAll('.' + c.cn.scrollbarGlyph)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollbarGlyph.enter()\n        .append('line')\n        .classed(c.cn.scrollbarGlyph, true)\n        .attr('stroke', 'black')\n        .attr('stroke-width', c.scrollbarWidth)\n        .attr('stroke-linecap', 'round')\n        .attr('y1', c.scrollbarWidth / 2);\n\n    scrollbarGlyph\n        .attr('y2', function(d) {\n            return d.scrollbarState.barLength - c.scrollbarWidth / 2;\n        })\n        .attr('stroke-opacity', function(d) {\n            return d.columnDragInProgress || !d.scrollbarState.barWiggleRoom || bypassVisibleBar ? 0 : 0.4;\n        });\n\n    // cancel transition: possible pending (also, delayed) transition\n    scrollbarGlyph\n        .transition().delay(0).duration(0);\n\n    scrollbarGlyph\n        .transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration)\n        .attr('stroke-opacity', 0);\n\n    var scrollbarCaptureZone = scrollbar.selectAll('.' + c.cn.scrollbarCaptureZone)\n        .data(gup.repeat, gup.keyFun);\n\n    scrollbarCaptureZone.enter()\n        .append('line')\n        .classed(c.cn.scrollbarCaptureZone, true)\n        .attr('stroke', 'white')\n        .attr('stroke-opacity', 0.01) // some browser might get rid of a 0 opacity element\n        .attr('stroke-width', c.scrollbarCaptureWidth)\n        .attr('stroke-linecap', 'butt')\n        .attr('y1', 0)\n        .on('mousedown', function(d) {\n            var y = d3.event.y;\n            var bbox = this.getBoundingClientRect();\n            var s = d.scrollbarState;\n            var pixelVal = y - bbox.top;\n            var inverseScale = d3.scale.linear().domain([0, s.scrollableAreaHeight]).range([0, s.totalHeight]).clamp(true);\n            if(!(s.topY <= pixelVal && pixelVal <= s.bottomY)) {\n                makeDragRow(gd, tableControlView, null, inverseScale(pixelVal - s.barLength / 2))(d);\n            }\n        })\n        .call(d3.behavior.drag()\n            .origin(function(d) {\n                d3.event.stopPropagation();\n                d.scrollbarState.scrollbarScrollInProgress = true;\n                return d;\n            })\n            .on('drag', makeDragRow(gd, tableControlView))\n            .on('dragend', function() {\n                // fixme emit Plotly event\n            })\n        );\n\n    scrollbarCaptureZone\n        .attr('y2', function(d) {\n            return d.scrollbarState.scrollableAreaHeight;\n        });\n\n    // Remove scroll glyph and capture zone on static plots\n    // as they don't render properly when converted to PDF\n    // in the Chrome PDF viewer\n    // https://github.com/plotly/streambed/issues/11618\n    if(gd._context.staticPlot) {\n        scrollbarGlyph.remove();\n        scrollbarCaptureZone.remove();\n    }\n}\n\nfunction renderColumnCellTree(gd, tableControlView, columnBlock, allColumnBlock) {\n    // fixme this perf hotspot\n    // this is performance critical code as scrolling calls it on every revolver switch\n    // it appears sufficiently fast but there are plenty of low-hanging fruits for performance optimization\n\n    var columnCells = renderColumnCells(columnBlock);\n\n    var columnCell = renderColumnCell(columnCells);\n\n    supplyStylingValues(columnCell);\n\n    var cellRect = renderCellRect(columnCell);\n\n    sizeAndStyleRect(cellRect);\n\n    var cellTextHolder = renderCellTextHolder(columnCell);\n\n    var cellText = renderCellText(cellTextHolder);\n\n    setFont(cellText);\n    populateCellText(cellText, tableControlView, allColumnBlock, gd);\n\n    // doing this at the end when text, and text stlying are set\n    setCellHeightAndPositionY(columnCell);\n}\n\nfunction renderColumnCells(columnBlock) {\n    var columnCells = columnBlock.selectAll('.' + c.cn.columnCells)\n        .data(gup.repeat, gup.keyFun);\n\n    columnCells.enter()\n        .append('g')\n        .classed(c.cn.columnCells, true);\n\n    columnCells.exit()\n        .remove();\n\n    return columnCells;\n}\n\nfunction renderColumnCell(columnCells) {\n    var columnCell = columnCells.selectAll('.' + c.cn.columnCell)\n        .data(splitData.splitToCells, function(d) {return d.keyWithinBlock;});\n\n    columnCell.enter()\n        .append('g')\n        .classed(c.cn.columnCell, true);\n\n    columnCell.exit()\n        .remove();\n\n    return columnCell;\n}\n\nfunction renderCellRect(columnCell) {\n    var cellRect = columnCell.selectAll('.' + c.cn.cellRect)\n        .data(gup.repeat, function(d) {return d.keyWithinBlock;});\n\n    cellRect.enter()\n        .append('rect')\n        .classed(c.cn.cellRect, true);\n\n    return cellRect;\n}\n\nfunction renderCellText(cellTextHolder) {\n    var cellText = cellTextHolder.selectAll('.' + c.cn.cellText)\n        .data(gup.repeat, function(d) {return d.keyWithinBlock;});\n\n    cellText.enter()\n        .append('text')\n        .classed(c.cn.cellText, true)\n        .style('cursor', function() {return 'auto';})\n        .on('mousedown', function() {d3.event.stopPropagation();});\n\n    return cellText;\n}\n\nfunction renderCellTextHolder(columnCell) {\n    var cellTextHolder = columnCell.selectAll('.' + c.cn.cellTextHolder)\n        .data(gup.repeat, function(d) {return d.keyWithinBlock;});\n\n    cellTextHolder.enter()\n        .append('g')\n        .classed(c.cn.cellTextHolder, true)\n        .style('shape-rendering', 'geometricPrecision');\n\n    return cellTextHolder;\n}\n\nfunction supplyStylingValues(columnCell) {\n    columnCell\n        .each(function(d, i) {\n            var spec = d.calcdata.cells.font;\n            var col = d.column.specIndex;\n            var font = {\n                size: gridPick(spec.size, col, i),\n                color: gridPick(spec.color, col, i),\n                family: gridPick(spec.family, col, i)\n            };\n            d.rowNumber = d.key;\n            d.align = gridPick(d.calcdata.cells.align, col, i);\n            d.cellBorderWidth = gridPick(d.calcdata.cells.line.width, col, i);\n            d.font = font;\n        });\n}\n\nfunction setFont(cellText) {\n    cellText\n        .each(function(d) {\n            Drawing.font(d3.select(this), d.font);\n        });\n}\n\nfunction sizeAndStyleRect(cellRect) {\n    cellRect\n        .attr('width', function(d) {return d.column.columnWidth;})\n        .attr('stroke-width', function(d) {return d.cellBorderWidth;})\n        .each(function(d) {\n            var atomicSelection = d3.select(this);\n            Color.stroke(atomicSelection, gridPick(d.calcdata.cells.line.color, d.column.specIndex, d.rowNumber));\n            Color.fill(atomicSelection, gridPick(d.calcdata.cells.fill.color, d.column.specIndex, d.rowNumber));\n        });\n}\n\nfunction populateCellText(cellText, tableControlView, allColumnBlock, gd) {\n    cellText\n        .text(function(d) {\n            var col = d.column.specIndex;\n            var row = d.rowNumber;\n\n            var userSuppliedContent = d.value;\n            var stringSupplied = (typeof userSuppliedContent === 'string');\n            var hasBreaks = stringSupplied && userSuppliedContent.match(/<br>/i);\n            var userBrokenText = !stringSupplied || hasBreaks;\n            d.mayHaveMarkup = stringSupplied && userSuppliedContent.match(/[<&>]/);\n\n            var latex = isLatex(userSuppliedContent);\n            d.latex = latex;\n\n            var prefix = latex ? '' : gridPick(d.calcdata.cells.prefix, col, row) || '';\n            var suffix = latex ? '' : gridPick(d.calcdata.cells.suffix, col, row) || '';\n            var format = latex ? null : gridPick(d.calcdata.cells.format, col, row) || null;\n\n            var prefixSuffixedText = prefix + (format ? d3.format(format)(d.value) : d.value) + suffix;\n\n            var hasWrapSplitCharacter;\n            d.wrappingNeeded = !d.wrapped && !userBrokenText && !latex && (hasWrapSplitCharacter = hasWrapCharacter(prefixSuffixedText));\n            d.cellHeightMayIncrease = hasBreaks || latex || d.mayHaveMarkup || (hasWrapSplitCharacter === void(0) ? hasWrapCharacter(prefixSuffixedText) : hasWrapSplitCharacter);\n            d.needsConvertToTspans = d.mayHaveMarkup || d.wrappingNeeded || d.latex;\n\n            var textToRender;\n            if(d.wrappingNeeded) {\n                var hrefPreservedText = c.wrapSplitCharacter === ' ' ? prefixSuffixedText.replace(/<a href=/ig, '<a_href=') : prefixSuffixedText;\n                var fragments = hrefPreservedText.split(c.wrapSplitCharacter);\n                var hrefRestoredFragments = c.wrapSplitCharacter === ' ' ? fragments.map(function(frag) {return frag.replace(/<a_href=/ig, '<a href=');}) : fragments;\n                d.fragments = hrefRestoredFragments.map(function(f) {return {text: f, width: null};});\n                d.fragments.push({fragment: c.wrapSpacer, width: null});\n                textToRender = hrefRestoredFragments.join(c.lineBreaker) + c.lineBreaker + c.wrapSpacer;\n            } else {\n                delete d.fragments;\n                textToRender = prefixSuffixedText;\n            }\n\n            return textToRender;\n        })\n        .attr('dy', function(d) {\n            return d.needsConvertToTspans ? 0 : '0.75em';\n        })\n        .each(function(d) {\n            var element = this;\n            var selection = d3.select(element);\n\n            // finalize what's in the DOM\n\n            var renderCallback = d.wrappingNeeded ? wrapTextMaker : updateYPositionMaker;\n            if(d.needsConvertToTspans) {\n                svgUtil.convertToTspans(selection, gd, renderCallback(allColumnBlock, element, tableControlView, gd, d));\n            } else {\n                d3.select(element.parentNode)\n                    // basic cell adjustment - compliance with `cellPad`\n                    .attr('transform', function(d) {return 'translate(' + xPosition(d) + ' ' + c.cellPad + ')';})\n                    .attr('text-anchor', function(d) {\n                        return ({\n                            left: 'start',\n                            center: 'middle',\n                            right: 'end'\n                        })[d.align];\n                    });\n            }\n        });\n}\n\nfunction isLatex(content) {\n    return typeof content === 'string' && content.match(c.latexCheck);\n}\n\nfunction hasWrapCharacter(text) {return text.indexOf(c.wrapSplitCharacter) !== -1;}\n\nfunction columnMoved(gd, calcdata, indices) {\n    var o = calcdata.gdColumnsOriginalOrder;\n    calcdata.gdColumns.sort(function(a, b) {\n        return indices[o.indexOf(a)] - indices[o.indexOf(b)];\n    });\n\n    calcdata.columnorder = indices;\n\n    // TODO: there's no data here, but also this reordering is not reflected\n    // in gd.data or even gd._fullData.\n    // For now I will not attempt to persist this in _preGUI\n    gd.emit('plotly_restyle');\n}\n\nfunction gridPick(spec, col, row) {\n    if(Array.isArray(spec)) {\n        var column = spec[Math.min(col, spec.length - 1)];\n        if(Array.isArray(column)) {\n            return column[Math.min(row, column.length - 1)];\n        } else {\n            return column;\n        }\n    } else {\n        return spec;\n    }\n}\n\nfunction easeColumn(selection, d, y) {\n    selection\n        .transition()\n        .ease(c.releaseTransitionEase)\n        .duration(c.releaseTransitionDuration)\n        .attr('transform', 'translate(' + d.x + ' ' + y + ')');\n}\n\nfunction cellsBlock(d) {return d.type === 'cells';}\nfunction headerBlock(d) {return d.type === 'header';}\n\n/**\n * Revolver panel and cell contents layouting\n */\n\nfunction headerHeight(d) {\n    var headerBlocks = d.rowBlocks.length ? d.rowBlocks[0].auxiliaryBlocks : [];\n    return headerBlocks.reduce(function(p, n) {return p + rowsHeight(n, Infinity);}, 0);\n}\n\nfunction findPagesAndCacheHeights(blocks, scrollY, scrollHeight) {\n    var pages = [];\n    var pTop = 0;\n\n    for(var blockIndex = 0; blockIndex < blocks.length; blockIndex++) {\n        var block = blocks[blockIndex];\n        var blockRows = block.rows;\n        var rowsHeight = 0;\n        for(var i = 0; i < blockRows.length; i++) {\n            rowsHeight += blockRows[i].rowHeight;\n        }\n\n        // caching allRowsHeight on the block - it's safe as this function is always called from within the code part\n        // that handles increases to row heights\n        block.allRowsHeight = rowsHeight;\n\n        var pBottom = pTop + rowsHeight;\n        var windowTop = scrollY;\n        var windowBottom = windowTop + scrollHeight;\n        if(windowTop < pBottom && windowBottom > pTop) {\n            pages.push(blockIndex);\n        }\n        pTop += rowsHeight;\n\n        // consider this nice final optimization; put it in `for` condition - caveat, currently the\n        // block.allRowsHeight relies on being invalidated, so enabling this opt may not be safe\n        // if(pages.length > 1) break;\n    }\n\n    return pages;\n}\n\nfunction updateBlockYPosition(gd, cellsColumnBlock, tableControlView) {\n    var d = flatData(cellsColumnBlock)[0];\n    if(d === undefined) return;\n    var blocks = d.rowBlocks;\n    var calcdata = d.calcdata;\n\n    var bottom = firstRowAnchor(blocks, blocks.length);\n    var scrollHeight = d.calcdata.groupHeight - headerHeight(d);\n    var scrollY = calcdata.scrollY = Math.max(0, Math.min(bottom - scrollHeight, calcdata.scrollY));\n\n    var pages = findPagesAndCacheHeights(blocks, scrollY, scrollHeight);\n    if(pages.length === 1) {\n        if(pages[0] === blocks.length - 1) {\n            pages.unshift(pages[0] - 1);\n        } else {\n            pages.push(pages[0] + 1);\n        }\n    }\n\n    // make phased out page jump by 2 while leaving stationary page intact\n    if(pages[0] % 2) {\n        pages.reverse();\n    }\n\n    cellsColumnBlock\n        .each(function(d, i) {\n            // these values will also be needed when a block is translated again due to growing cell height\n            d.page = pages[i];\n            d.scrollY = scrollY;\n        });\n\n    cellsColumnBlock\n        .attr('transform', function(d) {\n            var yTranslate = firstRowAnchor(d.rowBlocks, d.page) - d.scrollY;\n            return 'translate(0 ' + yTranslate + ')';\n        });\n\n    // conditionally rerendering panel 0 and 1\n    if(gd) {\n        conditionalPanelRerender(gd, tableControlView, cellsColumnBlock, pages, d.prevPages, d, 0);\n        conditionalPanelRerender(gd, tableControlView, cellsColumnBlock, pages, d.prevPages, d, 1);\n        renderScrollbarKit(tableControlView, gd);\n    }\n}\n\nfunction makeDragRow(gd, allTableControlView, optionalMultiplier, optionalPosition) {\n    return function dragRow(eventD) {\n        // may come from whichever DOM event target: drag, wheel, bar... eventD corresponds to event target\n        var d = eventD.calcdata ? eventD.calcdata : eventD;\n        var tableControlView = allTableControlView.filter(function(dd) {return d.key === dd.key;});\n        var multiplier = optionalMultiplier || d.scrollbarState.dragMultiplier;\n\n        var initialScrollY = d.scrollY;\n\n        d.scrollY = optionalPosition === void(0) ? d.scrollY + multiplier * d3.event.dy : optionalPosition;\n        var cellsColumnBlock = tableControlView.selectAll('.' + c.cn.yColumn).selectAll('.' + c.cn.columnBlock).filter(cellsBlock);\n        updateBlockYPosition(gd, cellsColumnBlock, tableControlView);\n\n        // return false if we've \"used\" the scroll, ie it did something,\n        // so the event shouldn't bubble (if appropriate)\n        return d.scrollY === initialScrollY;\n    };\n}\n\nfunction conditionalPanelRerender(gd, tableControlView, cellsColumnBlock, pages, prevPages, d, revolverIndex) {\n    var shouldComponentUpdate = pages[revolverIndex] !== prevPages[revolverIndex];\n    if(shouldComponentUpdate) {\n        clearTimeout(d.currentRepaint[revolverIndex]);\n        d.currentRepaint[revolverIndex] = setTimeout(function() {\n            // setTimeout might lag rendering but yields a smoother scroll, because fast scrolling makes\n            // some repaints invisible ie. wasteful (DOM work blocks the main thread)\n            var toRerender = cellsColumnBlock.filter(function(d, i) {return i === revolverIndex && pages[i] !== prevPages[i];});\n            renderColumnCellTree(gd, tableControlView, toRerender, cellsColumnBlock);\n            prevPages[revolverIndex] = pages[revolverIndex];\n        });\n    }\n}\n\nfunction wrapTextMaker(columnBlock, element, tableControlView, gd) {\n    return function wrapText() {\n        var cellTextHolder = d3.select(element.parentNode);\n        cellTextHolder\n            .each(function(d) {\n                var fragments = d.fragments;\n                cellTextHolder.selectAll('tspan.line').each(function(dd, i) {\n                    fragments[i].width = this.getComputedTextLength();\n                });\n                // last element is only for measuring the separator character, so it's ignored:\n                var separatorLength = fragments[fragments.length - 1].width;\n                var rest = fragments.slice(0, -1);\n                var currentRow = [];\n                var currentAddition, currentAdditionLength;\n                var currentRowLength = 0;\n                var rowLengthLimit = d.column.columnWidth - 2 * c.cellPad;\n                d.value = '';\n                while(rest.length) {\n                    currentAddition = rest.shift();\n                    currentAdditionLength = currentAddition.width + separatorLength;\n                    if(currentRowLength + currentAdditionLength > rowLengthLimit) {\n                        d.value += currentRow.join(c.wrapSpacer) + c.lineBreaker;\n                        currentRow = [];\n                        currentRowLength = 0;\n                    }\n                    currentRow.push(currentAddition.text);\n                    currentRowLength += currentAdditionLength;\n                }\n                if(currentRowLength) {\n                    d.value += currentRow.join(c.wrapSpacer);\n                }\n                d.wrapped = true;\n            });\n\n        // the pre-wrapped text was rendered only for the text measurements\n        cellTextHolder.selectAll('tspan.line').remove();\n\n        // resupply text, now wrapped\n        populateCellText(cellTextHolder.select('.' + c.cn.cellText), tableControlView, columnBlock, gd);\n        d3.select(element.parentNode.parentNode).call(setCellHeightAndPositionY);\n    };\n}\n\nfunction updateYPositionMaker(columnBlock, element, tableControlView, gd, d) {\n    return function updateYPosition() {\n        if(d.settledY) return;\n        var cellTextHolder = d3.select(element.parentNode);\n        var l = getBlock(d);\n        var rowIndex = d.key - l.firstRowIndex;\n\n        var declaredRowHeight = l.rows[rowIndex].rowHeight;\n\n        var requiredHeight = d.cellHeightMayIncrease ? element.parentNode.getBoundingClientRect().height + 2 * c.cellPad : declaredRowHeight;\n\n        var finalHeight = Math.max(requiredHeight, declaredRowHeight);\n        var increase = finalHeight - l.rows[rowIndex].rowHeight;\n\n        if(increase) {\n            // current row height increased\n            l.rows[rowIndex].rowHeight = finalHeight;\n\n            columnBlock\n                .selectAll('.' + c.cn.columnCell)\n                .call(setCellHeightAndPositionY);\n\n            updateBlockYPosition(null, columnBlock.filter(cellsBlock), 0);\n\n            // if d.column.type === 'header', then the scrollbar has to be pushed downward to the scrollable area\n            // if d.column.type === 'cells', it can still be relevant if total scrolling content height is less than the\n            //                               scrollable window, as increases to row heights may need scrollbar updates\n            renderScrollbarKit(tableControlView, gd, true);\n        }\n\n        cellTextHolder\n            .attr('transform', function() {\n                // this code block is only invoked for items where d.cellHeightMayIncrease is truthy\n                var element = this;\n                var columnCellElement = element.parentNode;\n                var box = columnCellElement.getBoundingClientRect();\n                var rectBox = d3.select(element.parentNode).select('.' + c.cn.cellRect).node().getBoundingClientRect();\n                var currentTransform = element.transform.baseVal.consolidate();\n                var yPosition = rectBox.top - box.top + (currentTransform ? currentTransform.matrix.f : c.cellPad);\n                return 'translate(' + xPosition(d, d3.select(element.parentNode).select('.' + c.cn.cellTextHolder).node().getBoundingClientRect().width) + ' ' + yPosition + ')';\n            });\n\n        d.settledY = true;\n    };\n}\n\nfunction xPosition(d, optionalWidth) {\n    switch(d.align) {\n        case 'left': return c.cellPad;\n        case 'right': return d.column.columnWidth - (optionalWidth || 0) - c.cellPad;\n        case 'center': return (d.column.columnWidth - (optionalWidth || 0)) / 2;\n        default: return c.cellPad;\n    }\n}\n\nfunction setCellHeightAndPositionY(columnCell) {\n    columnCell\n        .attr('transform', function(d) {\n            var headerHeight = d.rowBlocks[0].auxiliaryBlocks.reduce(function(p, n) {return p + rowsHeight(n, Infinity);}, 0);\n            var l = getBlock(d);\n            var rowAnchor = rowsHeight(l, d.key);\n            var yOffset = rowAnchor + headerHeight;\n            return 'translate(0 ' + yOffset + ')';\n        })\n        .selectAll('.' + c.cn.cellRect)\n        .attr('height', function(d) {return getRow(getBlock(d), d.key).rowHeight;});\n}\n\nfunction firstRowAnchor(blocks, page) {\n    var total = 0;\n    for(var i = page - 1; i >= 0; i--) {\n        total += allRowsHeight(blocks[i]);\n    }\n    return total;\n}\n\nfunction rowsHeight(rowBlock, key) {\n    var total = 0;\n    for(var i = 0; i < rowBlock.rows.length && rowBlock.rows[i].rowIndex < key; i++) {\n        total += rowBlock.rows[i].rowHeight;\n    }\n    return total;\n}\n\nfunction allRowsHeight(rowBlock) {\n    var cached = rowBlock.allRowsHeight;\n\n    if(cached !== void(0)) {\n        return cached;\n    }\n\n    var total = 0;\n    for(var i = 0; i < rowBlock.rows.length; i++) {\n        total += rowBlock.rows[i].rowHeight;\n    }\n    rowBlock.allRowsHeight = total;\n\n    return total;\n}\n\nfunction getBlock(d) {return d.rowBlocks[d.page];}\nfunction getRow(l, i) {return l.rows[i - l.firstRowIndex];}\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../../lib\":703,\"../../lib/gup\":701,\"../../lib/svg_text_utils\":727,\"./constants\":1179,\"./data_preparation_helper\":1180,\"./data_split_helpers\":1181,\"d3\":157}],1185:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar boxAttrs = _dereq_('../box/attributes');\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\n\nmodule.exports = {\n    y: boxAttrs.y,\n    x: boxAttrs.x,\n    x0: boxAttrs.x0,\n    y0: boxAttrs.y0,\n    name: extendFlat({}, boxAttrs.name, {\n        \n    }),\n    orientation: extendFlat({}, boxAttrs.orientation, {\n        \n    }),\n\n    bandwidth: {\n        valType: 'number',\n        min: 0,\n        \n        editType: 'calc',\n        \n    },\n\n    scalegroup: {\n        valType: 'string',\n        \n        dflt: '',\n        editType: 'calc',\n        \n    },\n    scalemode: {\n        valType: 'enumerated',\n        values: ['width', 'count'],\n        dflt: 'width',\n        \n        editType: 'calc',\n        \n    },\n\n    spanmode: {\n        valType: 'enumerated',\n        values: ['soft', 'hard', 'manual'],\n        dflt: 'soft',\n        \n        editType: 'calc',\n        \n    },\n    span: {\n        valType: 'info_array',\n        items: [\n            {valType: 'any', editType: 'calc'},\n            {valType: 'any', editType: 'calc'}\n        ],\n        \n        editType: 'calc',\n        \n    },\n\n    line: {\n        color: {\n            valType: 'color',\n            \n            editType: 'style',\n            \n        },\n        width: {\n            valType: 'number',\n            \n            min: 0,\n            dflt: 2,\n            editType: 'style',\n            \n        },\n        editType: 'plot'\n    },\n    fillcolor: boxAttrs.fillcolor,\n\n    points: extendFlat({}, boxAttrs.boxpoints, {\n        \n    }),\n    jitter: extendFlat({}, boxAttrs.jitter, {\n        \n    }),\n    pointpos: extendFlat({}, boxAttrs.pointpos, {\n        \n    }),\n\n    width: extendFlat({}, boxAttrs.width, {\n        \n    }),\n\n    marker: boxAttrs.marker,\n    text: boxAttrs.text,\n    hovertext: boxAttrs.hovertext,\n    hovertemplate: boxAttrs.hovertemplate,\n\n    box: {\n        visible: {\n            valType: 'boolean',\n            dflt: false,\n            \n            editType: 'plot',\n            \n        },\n        width: {\n            valType: 'number',\n            min: 0,\n            max: 1,\n            dflt: 0.25,\n            \n            editType: 'plot',\n            \n        },\n        fillcolor: {\n            valType: 'color',\n            \n            editType: 'style',\n            \n        },\n        line: {\n            color: {\n                valType: 'color',\n                \n                editType: 'style',\n                \n            },\n            width: {\n                valType: 'number',\n                min: 0,\n                \n                editType: 'style',\n                \n            },\n            editType: 'style'\n        },\n        editType: 'plot'\n    },\n\n    meanline: {\n        visible: {\n            valType: 'boolean',\n            dflt: false,\n            \n            editType: 'plot',\n            \n        },\n        color: {\n            valType: 'color',\n            \n            editType: 'style',\n            \n        },\n        width: {\n            valType: 'number',\n            min: 0,\n            \n            editType: 'style',\n            \n        },\n        editType: 'plot'\n    },\n\n    side: {\n        valType: 'enumerated',\n        values: ['both', 'positive', 'negative'],\n        dflt: 'both',\n        \n        editType: 'calc',\n        \n    },\n\n    offsetgroup: boxAttrs.offsetgroup,\n    alignmentgroup: boxAttrs.alignmentgroup,\n\n    selected: boxAttrs.selected,\n    unselected: boxAttrs.unselected,\n\n    hoveron: {\n        valType: 'flaglist',\n        flags: ['violins', 'points', 'kde'],\n        dflt: 'violins+points+kde',\n        extras: ['all'],\n        \n        editType: 'style',\n        \n    }\n};\n\n},{\"../../lib/extend\":693,\"../box/attributes\":864}],1186:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar boxCalc = _dereq_('../box/calc');\nvar helpers = _dereq_('./helpers');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nmodule.exports = function calc(gd, trace) {\n    var cd = boxCalc(gd, trace);\n\n    if(cd[0].t.empty) return cd;\n\n    var fullLayout = gd._fullLayout;\n    var valAxis = Axes.getFromId(\n        gd,\n        trace[trace.orientation === 'h' ? 'xaxis' : 'yaxis']\n    );\n\n    var spanMin = Infinity;\n    var spanMax = -Infinity;\n    var maxKDE = 0;\n    var maxCount = 0;\n\n    for(var i = 0; i < cd.length; i++) {\n        var cdi = cd[i];\n        var vals = cdi.pts.map(helpers.extractVal);\n\n        var bandwidth = cdi.bandwidth = calcBandwidth(trace, cdi, vals);\n        var span = cdi.span = calcSpan(trace, cdi, valAxis, bandwidth);\n\n        if(cdi.min === cdi.max && bandwidth === 0) {\n            // if span is zero and bandwidth is zero, we want a violin with zero width\n            span = cdi.span = [cdi.min, cdi.max];\n            cdi.density = [{v: 1, t: span[0]}];\n            cdi.bandwidth = bandwidth;\n            maxKDE = Math.max(maxKDE, 1);\n        } else {\n            // step that well covers the bandwidth and is multiple of span distance\n            var dist = span[1] - span[0];\n            var n = Math.ceil(dist / (bandwidth / 3));\n            var step = dist / n;\n\n            if(!isFinite(step) || !isFinite(n)) {\n                Lib.error('Something went wrong with computing the violin span');\n                cd[0].t.empty = true;\n                return cd;\n            }\n\n            var kde = helpers.makeKDE(cdi, trace, vals);\n            cdi.density = new Array(n);\n\n            for(var k = 0, t = span[0]; t < (span[1] + step / 2); k++, t += step) {\n                var v = kde(t);\n                cdi.density[k] = {v: v, t: t};\n                maxKDE = Math.max(maxKDE, v);\n            }\n        }\n\n        maxCount = Math.max(maxCount, vals.length);\n        spanMin = Math.min(spanMin, span[0]);\n        spanMax = Math.max(spanMax, span[1]);\n    }\n\n    var extremes = Axes.findExtremes(valAxis, [spanMin, spanMax], {padded: true});\n    trace._extremes[valAxis._id] = extremes;\n\n    if(trace.width) {\n        cd[0].t.maxKDE = maxKDE;\n    } else {\n        var violinScaleGroupStats = fullLayout._violinScaleGroupStats;\n        var scaleGroup = trace.scalegroup;\n        var groupStats = violinScaleGroupStats[scaleGroup];\n\n        if(groupStats) {\n            groupStats.maxKDE = Math.max(groupStats.maxKDE, maxKDE);\n            groupStats.maxCount = Math.max(groupStats.maxCount, maxCount);\n        } else {\n            violinScaleGroupStats[scaleGroup] = {\n                maxKDE: maxKDE,\n                maxCount: maxCount\n            };\n        }\n    }\n\n    cd[0].t.labels.kde = Lib._(gd, 'kde:');\n\n    return cd;\n};\n\n// Default to Silveman's rule of thumb\n// - https://stats.stackexchange.com/a/6671\n// - https://en.wikipedia.org/wiki/Kernel_density_estimation#A_rule-of-thumb_bandwidth_estimator\n// - https://github.com/statsmodels/statsmodels/blob/master/statsmodels/nonparametric/bandwidths.py\nfunction silvermanRule(len, ssd, iqr) {\n    var a = Math.min(ssd, iqr / 1.349);\n    return 1.059 * a * Math.pow(len, -0.2);\n}\n\nfunction calcBandwidth(trace, cdi, vals) {\n    var span = cdi.max - cdi.min;\n\n    // If span is zero\n    if(!span) {\n        if(trace.bandwidth) {\n            return trace.bandwidth;\n        } else {\n            // if span is zero and no bandwidth is specified\n            // it returns zero bandwidth which is a special case\n            return 0;\n        }\n    }\n\n    // Limit how small the bandwidth can be.\n    //\n    // Silverman's rule of thumb can be \"very\" small\n    // when IQR does a poor job at describing the spread\n    // of the distribution.\n    // We also want to limit custom bandwidths\n    // to not blow up kde computations.\n\n    if(trace.bandwidth) {\n        return Math.max(trace.bandwidth, span / 1e4);\n    } else {\n        var len = vals.length;\n        var ssd = Lib.stdev(vals, len - 1, cdi.mean);\n        return Math.max(\n            silvermanRule(len, ssd, cdi.q3 - cdi.q1),\n            span / 100\n        );\n    }\n}\n\nfunction calcSpan(trace, cdi, valAxis, bandwidth) {\n    var spanmode = trace.spanmode;\n    var spanIn = trace.span || [];\n    var spanTight = [cdi.min, cdi.max];\n    var spanLoose = [cdi.min - 2 * bandwidth, cdi.max + 2 * bandwidth];\n    var spanOut;\n\n    function calcSpanItem(index) {\n        var s = spanIn[index];\n        var sc = valAxis.type === 'multicategory' ?\n            valAxis.r2c(s) :\n            valAxis.d2c(s, 0, trace[cdi.valLetter + 'calendar']);\n        return sc === BADNUM ? spanLoose[index] : sc;\n    }\n\n    if(spanmode === 'soft') {\n        spanOut = spanLoose;\n    } else if(spanmode === 'hard') {\n        spanOut = spanTight;\n    } else {\n        spanOut = [calcSpanItem(0), calcSpanItem(1)];\n    }\n\n    // to reuse the equal-range-item block\n    var dummyAx = {\n        type: 'linear',\n        range: spanOut\n    };\n    Axes.setConvert(dummyAx);\n    dummyAx.cleanRange();\n\n    return spanOut;\n}\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../box/calc\":865,\"./helpers\":1189}],1187:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar setPositionOffset = _dereq_('../box/cross_trace_calc').setPositionOffset;\nvar orientations = ['v', 'h'];\n\nmodule.exports = function crossTraceCalc(gd, plotinfo) {\n    var calcdata = gd.calcdata;\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    for(var i = 0; i < orientations.length; i++) {\n        var orientation = orientations[i];\n        var posAxis = orientation === 'h' ? ya : xa;\n        var violinList = [];\n\n        for(var j = 0; j < calcdata.length; j++) {\n            var cd = calcdata[j];\n            var t = cd[0].t;\n            var trace = cd[0].trace;\n\n            if(trace.visible === true && trace.type === 'violin' &&\n                    !t.empty &&\n                    trace.orientation === orientation &&\n                    trace.xaxis === xa._id &&\n                    trace.yaxis === ya._id\n              ) {\n                violinList.push(j);\n            }\n        }\n\n        setPositionOffset('violin', gd, violinList, posAxis);\n    }\n};\n\n},{\"../box/cross_trace_calc\":866}],1188:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Color = _dereq_('../../components/color');\n\nvar boxDefaults = _dereq_('../box/defaults');\nvar attributes = _dereq_('./attributes');\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n    function coerce2(attr, dflt) {\n        return Lib.coerce2(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    boxDefaults.handleSampleDefaults(traceIn, traceOut, coerce, layout);\n    if(traceOut.visible === false) return;\n\n    coerce('bandwidth');\n    coerce('side');\n\n    var width = coerce('width');\n    if(!width) {\n        coerce('scalegroup', traceOut.name);\n        coerce('scalemode');\n    }\n\n    var span = coerce('span');\n    var spanmodeDflt;\n    if(Array.isArray(span)) spanmodeDflt = 'manual';\n    coerce('spanmode', spanmodeDflt);\n\n    var lineColor = coerce('line.color', (traceIn.marker || {}).color || defaultColor);\n    var lineWidth = coerce('line.width');\n    var fillColor = coerce('fillcolor', Color.addOpacity(traceOut.line.color, 0.5));\n\n    boxDefaults.handlePointsDefaults(traceIn, traceOut, coerce, {prefix: ''});\n\n    var boxWidth = coerce2('box.width');\n    var boxFillColor = coerce2('box.fillcolor', fillColor);\n    var boxLineColor = coerce2('box.line.color', lineColor);\n    var boxLineWidth = coerce2('box.line.width', lineWidth);\n    var boxVisible = coerce('box.visible', Boolean(boxWidth || boxFillColor || boxLineColor || boxLineWidth));\n    if(!boxVisible) traceOut.box = {visible: false};\n\n    var meanLineColor = coerce2('meanline.color', lineColor);\n    var meanLineWidth = coerce2('meanline.width', lineWidth);\n    var meanLineVisible = coerce('meanline.visible', Boolean(meanLineColor || meanLineWidth));\n    if(!meanLineVisible) traceOut.meanline = {visible: false};\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../box/defaults\":867,\"./attributes\":1185}],1189:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\n// Maybe add kernels more down the road,\n// but note that the default `spanmode: 'soft'` bounds might have\n// to become kernel-dependent\nvar kernels = {\n    gaussian: function(v) {\n        return (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * v * v);\n    }\n};\n\nexports.makeKDE = function(calcItem, trace, vals) {\n    var len = vals.length;\n    var kernel = kernels.gaussian;\n    var bandwidth = calcItem.bandwidth;\n    var factor = 1 / (len * bandwidth);\n\n    // don't use Lib.aggNums to skip isNumeric checks\n    return function(x) {\n        var sum = 0;\n        for(var i = 0; i < len; i++) {\n            sum += kernel((x - vals[i]) / bandwidth);\n        }\n        return factor * sum;\n    };\n};\n\nexports.getPositionOnKdePath = function(calcItem, trace, valuePx) {\n    var posLetter, valLetter;\n\n    if(trace.orientation === 'h') {\n        posLetter = 'y';\n        valLetter = 'x';\n    } else {\n        posLetter = 'x';\n        valLetter = 'y';\n    }\n\n    var pointOnPath = Lib.findPointOnPath(\n        calcItem.path,\n        valuePx,\n        valLetter,\n        {pathLength: calcItem.pathLength}\n    );\n\n    var posCenterPx = calcItem.posCenterPx;\n    var posOnPath0 = pointOnPath[posLetter];\n    var posOnPath1 = trace.side === 'both' ?\n        2 * posCenterPx - posOnPath0 :\n        posCenterPx;\n\n    return [posOnPath0, posOnPath1];\n};\n\nexports.getKdeValue = function(calcItem, trace, valueDist) {\n    var vals = calcItem.pts.map(exports.extractVal);\n    var kde = exports.makeKDE(calcItem, trace, vals);\n    return kde(valueDist) / calcItem.posDensityScale;\n};\n\nexports.extractVal = function(o) { return o.v; };\n\n},{\"../../lib\":703}],1190:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar boxHoverPoints = _dereq_('../box/hover');\nvar helpers = _dereq_('./helpers');\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer) {\n    var cd = pointData.cd;\n    var trace = cd[0].trace;\n    var hoveron = trace.hoveron;\n    var hasHoveronViolins = hoveron.indexOf('violins') !== -1;\n    var hasHoveronKDE = hoveron.indexOf('kde') !== -1;\n    var closeData = [];\n    var closePtData;\n    var violinLineAttrs;\n\n    if(hasHoveronViolins || hasHoveronKDE) {\n        var closeBoxData = boxHoverPoints.hoverOnBoxes(pointData, xval, yval, hovermode);\n\n        if(hasHoveronKDE && closeBoxData.length > 0) {\n            var xa = pointData.xa;\n            var ya = pointData.ya;\n            var pLetter, vLetter, pAxis, vAxis, vVal;\n\n            if(trace.orientation === 'h') {\n                vVal = xval;\n                pLetter = 'y';\n                pAxis = ya;\n                vLetter = 'x';\n                vAxis = xa;\n            } else {\n                vVal = yval;\n                pLetter = 'x';\n                pAxis = xa;\n                vLetter = 'y';\n                vAxis = ya;\n            }\n\n            var di = cd[pointData.index];\n\n            if(vVal >= di.span[0] && vVal <= di.span[1]) {\n                var kdePointData = Lib.extendFlat({}, pointData);\n                var vValPx = vAxis.c2p(vVal, true);\n                var kdeVal = helpers.getKdeValue(di, trace, vVal);\n                var pOnPath = helpers.getPositionOnKdePath(di, trace, vValPx);\n                var paOffset = pAxis._offset;\n                var paLength = pAxis._length;\n\n                kdePointData[pLetter + '0'] = pOnPath[0];\n                kdePointData[pLetter + '1'] = pOnPath[1];\n                kdePointData[vLetter + '0'] = kdePointData[vLetter + '1'] = vValPx;\n                kdePointData[vLetter + 'Label'] = vLetter + ': ' + Axes.hoverLabelText(vAxis, vVal) + ', ' + cd[0].t.labels.kde + ' ' + kdeVal.toFixed(3);\n\n                // move the spike to the KDE point\n                kdePointData.spikeDistance = closeBoxData[0].spikeDistance;\n                var spikePosAttr = pLetter + 'Spike';\n                kdePointData[spikePosAttr] = closeBoxData[0][spikePosAttr];\n                closeBoxData[0].spikeDistance = undefined;\n                closeBoxData[0][spikePosAttr] = undefined;\n\n                // no hovertemplate support yet\n                kdePointData.hovertemplate = false;\n\n                closeData.push(kdePointData);\n\n                violinLineAttrs = {stroke: pointData.color};\n                violinLineAttrs[pLetter + '1'] = Lib.constrain(paOffset + pOnPath[0], paOffset, paOffset + paLength);\n                violinLineAttrs[pLetter + '2'] = Lib.constrain(paOffset + pOnPath[1], paOffset, paOffset + paLength);\n                violinLineAttrs[vLetter + '1'] = violinLineAttrs[vLetter + '2'] = vAxis._offset + vValPx;\n            }\n        }\n\n        if(hasHoveronViolins) {\n            closeData = closeData.concat(closeBoxData);\n        }\n    }\n\n    if(hoveron.indexOf('points') !== -1) {\n        closePtData = boxHoverPoints.hoverOnPoints(pointData, xval, yval);\n    }\n\n    // update violin line (if any)\n    var violinLine = hoverLayer.selectAll('.violinline-' + trace.uid)\n        .data(violinLineAttrs ? [0] : []);\n    violinLine.enter().append('line')\n        .classed('violinline-' + trace.uid, true)\n        .attr('stroke-width', 1.5);\n    violinLine.exit().remove();\n    violinLine.attr(violinLineAttrs);\n\n    // same combine logic as box hoverPoints\n    if(hovermode === 'closest') {\n        if(closePtData) return [closePtData];\n        return closeData;\n    }\n    if(closePtData) {\n        closeData.push(closePtData);\n        return closeData;\n    }\n    return closeData;\n};\n\n},{\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../box/hover\":869,\"./helpers\":1189}],1191:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    crossTraceDefaults: _dereq_('../box/defaults').crossTraceDefaults,\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    calc: _dereq_('./calc'),\n    crossTraceCalc: _dereq_('./cross_trace_calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style'),\n    styleOnSelect: _dereq_('../scatter/style').styleOnSelect,\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../box/select'),\n\n    moduleType: 'trace',\n    name: 'violin',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['cartesian', 'svg', 'symbols', 'oriented', 'box-violin', 'showLegend', 'violinLayout', 'zoomScale'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../box/defaults\":867,\"../box/select\":874,\"../scatter/style\":1097,\"./attributes\":1185,\"./calc\":1186,\"./cross_trace_calc\":1187,\"./defaults\":1188,\"./hover\":1190,\"./layout_attributes\":1192,\"./layout_defaults\":1193,\"./plot\":1194,\"./style\":1195}],1192:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar boxLayoutAttrs = _dereq_('../box/layout_attributes');\nvar extendFlat = _dereq_('../../lib').extendFlat;\n\nmodule.exports = {\n    violinmode: extendFlat({}, boxLayoutAttrs.boxmode, {\n        \n    }),\n    violingap: extendFlat({}, boxLayoutAttrs.boxgap, {\n        \n    }),\n    violingroupgap: extendFlat({}, boxLayoutAttrs.boxgroupgap, {\n        \n    })\n};\n\n},{\"../../lib\":703,\"../box/layout_attributes\":871}],1193:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\nvar boxLayoutDefaults = _dereq_('../box/layout_defaults');\n\nmodule.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n    boxLayoutDefaults._supply(layoutIn, layoutOut, fullData, coerce, 'violin');\n};\n\n},{\"../../lib\":703,\"../box/layout_defaults\":872,\"./layout_attributes\":1192}],1194:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\n\nvar boxPlot = _dereq_('../box/plot');\nvar linePoints = _dereq_('../scatter/line_points');\nvar helpers = _dereq_('./helpers');\n\nmodule.exports = function plot(gd, plotinfo, cdViolins, violinLayer) {\n    var fullLayout = gd._fullLayout;\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    function makePath(pts) {\n        var segments = linePoints(pts, {\n            xaxis: xa,\n            yaxis: ya,\n            connectGaps: true,\n            baseTolerance: 0.75,\n            shape: 'spline',\n            simplify: true\n        });\n        return Drawing.smoothopen(segments[0], 1);\n    }\n\n    Lib.makeTraceGroups(violinLayer, cdViolins, 'trace violins').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var cd0 = cd[0];\n        var t = cd0.t;\n        var trace = cd0.trace;\n        if(!plotinfo.isRangePlot) cd0.node3 = plotGroup;\n\n        if(trace.visible !== true || t.empty) {\n            plotGroup.remove();\n            return;\n        }\n\n        var bPos = t.bPos;\n        var bdPos = t.bdPos;\n        var valAxis = plotinfo[t.valLetter + 'axis'];\n        var posAxis = plotinfo[t.posLetter + 'axis'];\n        var hasBothSides = trace.side === 'both';\n        var hasPositiveSide = hasBothSides || trace.side === 'positive';\n        var hasNegativeSide = hasBothSides || trace.side === 'negative';\n\n        var violins = plotGroup.selectAll('path.violin').data(Lib.identity);\n\n        violins.enter().append('path')\n            .style('vector-effect', 'non-scaling-stroke')\n            .attr('class', 'violin');\n\n        violins.exit().remove();\n\n        violins.each(function(d) {\n            var pathSel = d3.select(this);\n            var density = d.density;\n            var len = density.length;\n            var posCenter = d.pos + bPos;\n            var posCenterPx = posAxis.c2p(posCenter);\n\n            var scale;\n            if(trace.width) {\n                scale = t.maxKDE / bdPos;\n            } else {\n                var groupStats = fullLayout._violinScaleGroupStats[trace.scalegroup];\n                scale = trace.scalemode === 'count' ?\n                    (groupStats.maxKDE / bdPos) * (groupStats.maxCount / d.pts.length) :\n                    groupStats.maxKDE / bdPos;\n            }\n\n            var pathPos, pathNeg, path;\n            var i, k, pts, pt;\n\n            if(hasPositiveSide) {\n                pts = new Array(len);\n                for(i = 0; i < len; i++) {\n                    pt = pts[i] = {};\n                    pt[t.posLetter] = posCenter + (density[i].v / scale);\n                    pt[t.valLetter] = density[i].t;\n                }\n                pathPos = makePath(pts);\n            }\n\n            if(hasNegativeSide) {\n                pts = new Array(len);\n                for(k = 0, i = len - 1; k < len; k++, i--) {\n                    pt = pts[k] = {};\n                    pt[t.posLetter] = posCenter - (density[i].v / scale);\n                    pt[t.valLetter] = density[i].t;\n                }\n                pathNeg = makePath(pts);\n            }\n\n            if(hasBothSides) {\n                path = pathPos + 'L' + pathNeg.substr(1) + 'Z';\n            } else {\n                var startPt = [posCenterPx, valAxis.c2p(density[0].t)];\n                var endPt = [posCenterPx, valAxis.c2p(density[len - 1].t)];\n\n                if(trace.orientation === 'h') {\n                    startPt.reverse();\n                    endPt.reverse();\n                }\n\n                if(hasPositiveSide) {\n                    path = 'M' + startPt + 'L' + pathPos.substr(1) + 'L' + endPt;\n                } else {\n                    path = 'M' + endPt + 'L' + pathNeg.substr(1) + 'L' + startPt;\n                }\n            }\n            pathSel.attr('d', path);\n\n            // save a few things used in getPositionOnKdePath, getKdeValue\n            // on hover and for meanline draw block below\n            d.posCenterPx = posCenterPx;\n            d.posDensityScale = scale * bdPos;\n            d.path = pathSel.node();\n            d.pathLength = d.path.getTotalLength() / (hasBothSides ? 2 : 1);\n        });\n\n        var boxAttrs = trace.box;\n        var boxWidth = boxAttrs.width;\n        var boxLineWidth = (boxAttrs.line || {}).width;\n        var bdPosScaled;\n        var bPosPxOffset;\n\n        if(hasBothSides) {\n            bdPosScaled = bdPos * boxWidth;\n            bPosPxOffset = 0;\n        } else if(hasPositiveSide) {\n            bdPosScaled = [0, bdPos * boxWidth / 2];\n            bPosPxOffset = -boxLineWidth;\n        } else {\n            bdPosScaled = [bdPos * boxWidth / 2, 0];\n            bPosPxOffset = boxLineWidth;\n        }\n\n        // inner box\n        boxPlot.plotBoxAndWhiskers(plotGroup, {pos: posAxis, val: valAxis}, trace, {\n            bPos: bPos,\n            bdPos: bdPosScaled,\n            bPosPxOffset: bPosPxOffset\n        });\n\n        // meanline insider box\n        boxPlot.plotBoxMean(plotGroup, {pos: posAxis, val: valAxis}, trace, {\n            bPos: bPos,\n            bdPos: bdPosScaled,\n            bPosPxOffset: bPosPxOffset\n        });\n\n        var fn;\n        if(!trace.box.visible && trace.meanline.visible) {\n            fn = Lib.identity;\n        }\n\n        // N.B. use different class name than boxPlot.plotBoxMean,\n        // to avoid selectAll conflict\n        var meanPaths = plotGroup.selectAll('path.meanline').data(fn || []);\n        meanPaths.enter().append('path')\n            .attr('class', 'meanline')\n            .style('fill', 'none')\n            .style('vector-effect', 'non-scaling-stroke');\n        meanPaths.exit().remove();\n        meanPaths.each(function(d) {\n            var v = valAxis.c2p(d.mean, true);\n            var p = helpers.getPositionOnKdePath(d, trace, v);\n\n            d3.select(this).attr('d',\n                trace.orientation === 'h' ?\n                    'M' + v + ',' + p[0] + 'V' + p[1] :\n                    'M' + p[0] + ',' + v + 'H' + p[1]\n            );\n        });\n\n        boxPlot.plotPoints(plotGroup, {x: xa, y: ya}, trace, t);\n    });\n};\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../box/plot\":873,\"../scatter/line_points\":1088,\"./helpers\":1189,\"d3\":157}],1195:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Color = _dereq_('../../components/color');\nvar stylePoints = _dereq_('../scatter/style').stylePoints;\n\nmodule.exports = function style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.trace.violins');\n\n    s.style('opacity', function(d) { return d[0].trace.opacity; });\n\n    s.each(function(d) {\n        var trace = d[0].trace;\n        var sel = d3.select(this);\n        var box = trace.box || {};\n        var boxLine = box.line || {};\n        var meanline = trace.meanline || {};\n        var meanLineWidth = meanline.width;\n\n        sel.selectAll('path.violin')\n            .style('stroke-width', trace.line.width + 'px')\n            .call(Color.stroke, trace.line.color)\n            .call(Color.fill, trace.fillcolor);\n\n        sel.selectAll('path.box')\n            .style('stroke-width', boxLine.width + 'px')\n            .call(Color.stroke, boxLine.color)\n            .call(Color.fill, box.fillcolor);\n\n        var meanLineStyle = {\n            'stroke-width': meanLineWidth + 'px',\n            'stroke-dasharray': (2 * meanLineWidth) + 'px,' + meanLineWidth + 'px'\n        };\n\n        sel.selectAll('path.mean')\n            .style(meanLineStyle)\n            .call(Color.stroke, meanline.color);\n\n        sel.selectAll('path.meanline')\n            .style(meanLineStyle)\n            .call(Color.stroke, meanline.color);\n\n        stylePoints(sel, trace, gd);\n    });\n};\n\n},{\"../../components/color\":580,\"../scatter/style\":1097,\"d3\":157}],1196:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar colorScaleAttrs = _dereq_('../../components/colorscale/attributes');\nvar isosurfaceAttrs = _dereq_('../isosurface/attributes');\nvar baseAttrs = _dereq_('../../plots/attributes');\n\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;\n\nvar attrs = module.exports = overrideAll(extendFlat({\n    x: isosurfaceAttrs.x,\n    y: isosurfaceAttrs.y,\n    z: isosurfaceAttrs.z,\n    value: isosurfaceAttrs.value,\n    isomin: isosurfaceAttrs.isomin,\n    isomax: isosurfaceAttrs.isomax,\n    surface: isosurfaceAttrs.surface,\n    spaceframe: {\n        show: {\n            valType: 'boolean',\n            \n            dflt: false,\n            \n        },\n        fill: {\n            valType: 'number',\n            \n            min: 0,\n            max: 1,\n            dflt: 1,\n            \n        }\n    },\n\n    slices: isosurfaceAttrs.slices,\n    caps: isosurfaceAttrs.caps,\n    text: isosurfaceAttrs.text,\n    hovertext: isosurfaceAttrs.hovertext,\n    hovertemplate: isosurfaceAttrs.hovertemplate\n},\n\ncolorScaleAttrs('', {\n    colorAttr: '`value`',\n    showScaleDflt: true,\n    editTypeOverride: 'calc'\n}), {\n\n    colorbar: isosurfaceAttrs.colorbar,\n    opacity: isosurfaceAttrs.opacity,\n    opacityscale: {\n        valType: 'any',\n        \n        editType: 'calc',\n        \n    },\n\n    lightposition: isosurfaceAttrs.lightposition,\n    lighting: isosurfaceAttrs.lighting,\n    flatshading: isosurfaceAttrs.flatshading,\n    contour: isosurfaceAttrs.contour,\n\n    hoverinfo: extendFlat({}, baseAttrs.hoverinfo)\n}), 'calc', 'nested');\n\nattrs.x.editType = attrs.y.editType = attrs.z.editType = attrs.value.editType = 'calc+clearAxisTypes';\nattrs.transforms = undefined;\n\n},{\"../../components/colorscale/attributes\":587,\"../../lib/extend\":693,\"../../plot_api/edit_types\":734,\"../../plots/attributes\":748,\"../isosurface/attributes\":1012}],1197:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar createMesh = _dereq_('gl-mesh3d');\n\nvar parseColorScale = _dereq_('../../lib/gl_format_color').parseColorScale;\nvar str2RgbaArray = _dereq_('../../lib/str2rgbarray');\nvar extractOpts = _dereq_('../../components/colorscale').extractOpts;\nvar zip3 = _dereq_('../../plots/gl3d/zip3');\n\nvar findNearestOnAxis = _dereq_('../isosurface/convert').findNearestOnAxis;\nvar generateIsoMeshes = _dereq_('../isosurface/convert').generateIsoMeshes;\n\nfunction VolumeTrace(scene, mesh, uid) {\n    this.scene = scene;\n    this.uid = uid;\n    this.mesh = mesh;\n    this.name = '';\n    this.data = null;\n    this.showContour = false;\n}\n\nvar proto = VolumeTrace.prototype;\n\nproto.handlePick = function(selection) {\n    if(selection.object === this.mesh) {\n        var rawId = selection.data.index;\n\n        var x = this.data._x[rawId];\n        var y = this.data._y[rawId];\n        var z = this.data._z[rawId];\n\n        var height = this.data._Ys.length;\n        var depth = this.data._Zs.length;\n\n        var i = findNearestOnAxis(x, this.data._Xs).id;\n        var j = findNearestOnAxis(y, this.data._Ys).id;\n        var k = findNearestOnAxis(z, this.data._Zs).id;\n\n        var selectIndex = selection.index = k + depth * j + depth * height * i;\n\n        selection.traceCoordinate = [\n            this.data._x[selectIndex],\n            this.data._y[selectIndex],\n            this.data._z[selectIndex],\n            this.data.value[selectIndex]\n        ];\n\n        var text = this.data.hovertext || this.data.text;\n        if(Array.isArray(text) && text[selectIndex] !== undefined) {\n            selection.textLabel = text[selectIndex];\n        } else if(text) {\n            selection.textLabel = text;\n        }\n\n        return true;\n    }\n};\n\nproto.update = function(data) {\n    var scene = this.scene;\n    var layout = scene.fullSceneLayout;\n\n    this.data = generateIsoMeshes(data);\n\n    // Unpack position data\n    function toDataCoords(axis, coord, scale, calendar) {\n        return coord.map(function(x) {\n            return axis.d2l(x, 0, calendar) * scale;\n        });\n    }\n\n    var positions = zip3(\n        toDataCoords(layout.xaxis, data._x, scene.dataScale[0], data.xcalendar),\n        toDataCoords(layout.yaxis, data._y, scene.dataScale[1], data.ycalendar),\n        toDataCoords(layout.zaxis, data._z, scene.dataScale[2], data.zcalendar));\n\n    var cells = zip3(data._i, data._j, data._k);\n\n    var config = {\n        positions: positions,\n        cells: cells,\n        lightPosition: [data.lightposition.x, data.lightposition.y, data.lightposition.z],\n        ambient: data.lighting.ambient,\n        diffuse: data.lighting.diffuse,\n        specular: data.lighting.specular,\n        roughness: data.lighting.roughness,\n        fresnel: data.lighting.fresnel,\n        vertexNormalsEpsilon: data.lighting.vertexnormalsepsilon,\n        faceNormalsEpsilon: data.lighting.facenormalsepsilon,\n        opacity: data.opacity,\n        opacityscale: data.opacityscale,\n        contourEnable: data.contour.show,\n        contourColor: str2RgbaArray(data.contour.color).slice(0, 3),\n        contourWidth: data.contour.width,\n        useFacetNormals: data.flatshading\n    };\n\n    var cOpts = extractOpts(data);\n    config.vertexIntensity = data._intensity;\n    config.vertexIntensityBounds = [cOpts.min, cOpts.max];\n    config.colormap = parseColorScale(data);\n\n    // Update mesh\n    this.mesh.update(config);\n};\n\nproto.dispose = function() {\n    this.scene.glplot.remove(this.mesh);\n    this.mesh.dispose();\n};\n\nfunction createVolumeTrace(scene, data) {\n    var gl = scene.glplot.gl;\n    var mesh = createMesh({gl: gl});\n    var result = new VolumeTrace(scene, mesh, data.uid);\n\n    mesh._trace = result;\n    result.update(data);\n    scene.glplot.add(mesh);\n    return result;\n}\n\nmodule.exports = createVolumeTrace;\n\n},{\"../../components/colorscale\":592,\"../../lib/gl_format_color\":700,\"../../lib/str2rgbarray\":726,\"../../plots/gl3d/zip3\":802,\"../isosurface/convert\":1014,\"gl-mesh3d\":279}],1198:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar attributes = _dereq_('./attributes');\nvar supplyIsoDefaults = _dereq_('../isosurface/defaults').supplyIsoDefaults;\n\nvar MIN = 0.1; // Note: often we don't want the data cube to be disappeared\n\nfunction createWave(n, minOpacity) {\n    var arr = [];\n    var steps = 32; // Max: 256\n    for(var i = 0; i < steps; i++) {\n        var u = i / (steps - 1);\n        var v = minOpacity + (1 - minOpacity) * (1 - Math.pow(Math.sin(n * u * Math.PI), 2));\n        arr.push([\n            u,\n            Math.max(1, Math.min(0, v))\n        ]);\n    }\n    return arr;\n}\n\nmodule.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    supplyIsoDefaults(traceIn, traceOut, defaultColor, layout, coerce);\n\n    var opacityscale = coerce('opacityscale');\n    if(opacityscale === 'max') {\n        traceOut.opacityscale = [[0, MIN], [1, 1]];\n    } else if(opacityscale === 'min') {\n        traceOut.opacityscale = [[0, 1], [1, MIN]];\n    } else if(opacityscale === 'extremes') {\n        traceOut.opacityscale = createWave(1, MIN);\n    } else if(!isValidScaleArray(opacityscale)) {\n        traceOut.opacityscale = undefined;\n    }\n};\n\nfunction isValidScaleArray(scl) {\n    var highestVal = 0;\n\n    if(!Array.isArray(scl) || scl.length < 2) return false;\n\n    if(!scl[0] || !scl[scl.length - 1]) return false;\n\n    if(+scl[0][0] !== 0 || +scl[scl.length - 1][0] !== 1) return false;\n\n    for(var i = 0; i < scl.length; i++) {\n        var si = scl[i];\n\n        if(si.length !== 2 || +si[0] < highestVal) {\n            return false;\n        }\n\n        highestVal = +si[0];\n    }\n\n    return true;\n}\n\n},{\"../../lib\":703,\"../isosurface/defaults\":1015,\"./attributes\":1196}],1199:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    supplyDefaults: _dereq_('./defaults'),\n    calc: _dereq_('../isosurface/calc'),\n    colorbar: {\n        min: 'cmin',\n        max: 'cmax'\n    },\n    plot: _dereq_('./convert'),\n\n    moduleType: 'trace',\n    name: 'volume',\n    basePlotModule: _dereq_('../../plots/gl3d'),\n    categories: ['gl3d'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/gl3d\":791,\"../isosurface/calc\":1013,\"./attributes\":1196,\"./convert\":1197,\"./defaults\":1198}],1200:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar barAttrs = _dereq_('../bar/attributes');\nvar lineAttrs = _dereq_('../scatter/attributes').line;\nvar extendFlat = _dereq_('../../lib/extend').extendFlat;\nvar Color = _dereq_('../../components/color');\n\nfunction directionAttrs(dirTxt) {\n    return {\n        marker: {\n            color: extendFlat({}, barAttrs.marker.color, {\n                arrayOk: false,\n                editType: 'style',\n                \n            }),\n            line: {\n                color: extendFlat({}, barAttrs.marker.line.color, {\n                    arrayOk: false,\n                    editType: 'style',\n                    \n                }),\n                width: extendFlat({}, barAttrs.marker.line.width, {\n                    arrayOk: false,\n                    editType: 'style',\n                    \n                }),\n                editType: 'style',\n            },\n            editType: 'style'\n        },\n        editType: 'style'\n    };\n}\n\nmodule.exports = {\n    measure: {\n        valType: 'data_array',\n        dflt: [],\n        \n        editType: 'calc',\n        \n    },\n\n    base: {\n        valType: 'number',\n        dflt: null,\n        arrayOk: false,\n        \n        editType: 'calc',\n        \n    },\n\n    x: barAttrs.x,\n    x0: barAttrs.x0,\n    dx: barAttrs.dx,\n    y: barAttrs.y,\n    y0: barAttrs.y0,\n    dy: barAttrs.dy,\n\n    hovertext: barAttrs.hovertext,\n    hovertemplate: barAttrs.hovertemplate,\n\n    textinfo: {\n        valType: 'flaglist',\n        flags: ['label', 'text', 'initial', 'delta', 'final'],\n        extras: ['none'],\n        \n        editType: 'plot',\n        arrayOk: false,\n        \n    },\n\n    text: barAttrs.text,\n    textposition: barAttrs.textposition,\n    insidetextanchor: barAttrs.insidetextanchor,\n    textangle: barAttrs.textangle,\n    textfont: barAttrs.textfont,\n    insidetextfont: barAttrs.insidetextfont,\n    outsidetextfont: barAttrs.outsidetextfont,\n    constraintext: barAttrs.constraintext,\n\n    cliponaxis: barAttrs.cliponaxis,\n    orientation: barAttrs.orientation,\n\n    offset: barAttrs.offset,\n    width: barAttrs.width,\n\n    increasing: directionAttrs('increasing'),\n    decreasing: directionAttrs('decreasing'),\n    totals: directionAttrs('intermediate sums and total'),\n\n    connector: {\n        line: {\n            color: extendFlat({}, lineAttrs.color, {dflt: Color.defaultLine}),\n            width: extendFlat({}, lineAttrs.width, {\n                editType: 'plot', // i.e. to adjust bars is mode: 'between'. See https://github.com/plotly/plotly.js/issues/3787\n            }),\n            dash: lineAttrs.dash,\n            editType: 'plot'\n        },\n        mode: {\n            valType: 'enumerated',\n            values: ['spanning', 'between'],\n            dflt: 'between',\n            \n            editType: 'plot',\n            \n        },\n        visible: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'plot',\n            \n        },\n        editType: 'plot'\n    },\n\n    offsetgroup: barAttrs.offsetgroup,\n    alignmentgroup: barAttrs.alignmentgroup\n};\n\n},{\"../../components/color\":580,\"../../lib/extend\":693,\"../bar/attributes\":841,\"../scatter/attributes\":1075}],1201:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../../plots/cartesian/axes');\nvar mergeArray = _dereq_('../../lib').mergeArray;\nvar calcSelection = _dereq_('../scatter/calc_selection');\nvar BADNUM = _dereq_('../../constants/numerical').BADNUM;\n\nfunction isAbsolute(a) {\n    return (a === 'a' || a === 'absolute');\n}\n\nfunction isTotal(a) {\n    return (a === 't' || a === 'total');\n}\n\nmodule.exports = function calc(gd, trace) {\n    var xa = Axes.getFromId(gd, trace.xaxis || 'x');\n    var ya = Axes.getFromId(gd, trace.yaxis || 'y');\n    var size, pos;\n\n    if(trace.orientation === 'h') {\n        size = xa.makeCalcdata(trace, 'x');\n        pos = ya.makeCalcdata(trace, 'y');\n    } else {\n        size = ya.makeCalcdata(trace, 'y');\n        pos = xa.makeCalcdata(trace, 'x');\n    }\n\n    // create the \"calculated data\" to plot\n    var serieslen = Math.min(pos.length, size.length);\n    var cd = new Array(serieslen);\n\n    // set position and size (as well as for waterfall total size)\n    var previousSum = 0;\n    var newSize;\n    // trace-wide flags\n    var hasTotals = false;\n\n    for(var i = 0; i < serieslen; i++) {\n        var amount = size[i] || 0;\n\n        var connectToNext = false;\n        if(size[i] !== BADNUM || isTotal(trace.measure[i]) || isAbsolute(trace.measure[i])) {\n            if(i + 1 < serieslen && (size[i + 1] !== BADNUM || isTotal(trace.measure[i + 1]) || isAbsolute(trace.measure[i + 1]))) {\n                connectToNext = true;\n            }\n        }\n\n        var cdi = cd[i] = {\n            i: i,\n            p: pos[i],\n            s: amount,\n            rawS: amount,\n            cNext: connectToNext\n        };\n\n        if(isAbsolute(trace.measure[i])) {\n            previousSum = cdi.s;\n\n            cdi.isSum = true;\n            cdi.dir = 'totals';\n            cdi.s = previousSum;\n        } else if(isTotal(trace.measure[i])) {\n            cdi.isSum = true;\n            cdi.dir = 'totals';\n            cdi.s = previousSum;\n        } else {\n            // default: relative\n            cdi.isSum = false;\n            cdi.dir = cdi.rawS < 0 ? 'decreasing' : 'increasing';\n            newSize = cdi.s;\n            cdi.s = previousSum + newSize;\n            previousSum += newSize;\n        }\n\n        if(cdi.dir === 'totals') {\n            hasTotals = true;\n        }\n\n        if(trace.ids) {\n            cdi.id = String(trace.ids[i]);\n        }\n\n        cdi.v = (trace.base || 0) + previousSum;\n    }\n\n    if(cd.length) cd[0].hasTotals = hasTotals;\n\n    mergeArray(trace.text, cd, 'tx');\n    mergeArray(trace.hovertext, cd, 'htx');\n    calcSelection(cd, trace);\n\n    return cd;\n};\n\n},{\"../../constants/numerical\":680,\"../../lib\":703,\"../../plots/cartesian/axes\":751,\"../scatter/calc_selection\":1077}],1202:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar setGroupPositions = _dereq_('../bar/cross_trace_calc').setGroupPositions;\n\nmodule.exports = function crossTraceCalc(gd, plotinfo) {\n    var fullLayout = gd._fullLayout;\n    var fullData = gd._fullData;\n    var calcdata = gd.calcdata;\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n    var waterfalls = [];\n    var waterfallsVert = [];\n    var waterfallsHorz = [];\n    var cd, i;\n\n    for(i = 0; i < fullData.length; i++) {\n        var fullTrace = fullData[i];\n\n        if(\n            fullTrace.visible === true &&\n            fullTrace.xaxis === xa._id &&\n            fullTrace.yaxis === ya._id &&\n            fullTrace.type === 'waterfall'\n        ) {\n            cd = calcdata[i];\n\n            if(fullTrace.orientation === 'h') {\n                waterfallsHorz.push(cd);\n            } else {\n                waterfallsVert.push(cd);\n            }\n\n            waterfalls.push(cd);\n        }\n    }\n\n    var opts = {\n        mode: fullLayout.waterfallmode,\n        norm: fullLayout.waterfallnorm,\n        gap: fullLayout.waterfallgap,\n        groupgap: fullLayout.waterfallgroupgap\n    };\n\n    setGroupPositions(gd, xa, ya, waterfallsVert, opts);\n    setGroupPositions(gd, ya, xa, waterfallsHorz, opts);\n\n    for(i = 0; i < waterfalls.length; i++) {\n        cd = waterfalls[i];\n\n        for(var j = 0; j < cd.length; j++) {\n            var di = cd[j];\n\n            if(di.isSum === false) {\n                di.s0 += (j === 0) ? 0 : cd[j - 1].s;\n            }\n\n            if(j + 1 < cd.length) {\n                cd[j].nextP0 = cd[j + 1].p0;\n                cd[j].nextS0 = cd[j + 1].s0;\n            }\n        }\n    }\n};\n\n},{\"../bar/cross_trace_calc\":844}],1203:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\n\nvar handleGroupingDefaults = _dereq_('../bar/defaults').handleGroupingDefaults;\nvar handleText = _dereq_('../bar/defaults').handleText;\nvar handleXYDefaults = _dereq_('../scatter/xy_defaults');\nvar attributes = _dereq_('./attributes');\nvar Color = _dereq_('../../components/color');\n\nvar INCREASING_COLOR = '#3D9970';\nvar DECREASING_COLOR = '#FF4136';\nvar TOTALS_COLOR = '#4499FF';\n\nfunction handleDirection(coerce, direction, defaultColor) {\n    coerce(direction + '.marker.color', defaultColor);\n    coerce(direction + '.marker.line.color', Color.defaultLine);\n    coerce(direction + '.marker.line.width');\n}\n\nfunction supplyDefaults(traceIn, traceOut, defaultColor, layout) {\n    function coerce(attr, dflt) {\n        return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);\n    }\n\n    var len = handleXYDefaults(traceIn, traceOut, layout, coerce);\n    if(!len) {\n        traceOut.visible = false;\n        return;\n    }\n\n    coerce('measure');\n\n    coerce('orientation', (traceOut.x && !traceOut.y) ? 'h' : 'v');\n    coerce('base');\n    coerce('offset');\n    coerce('width');\n\n    coerce('text');\n\n    coerce('hovertext');\n    coerce('hovertemplate');\n\n    var textposition = coerce('textposition');\n    handleText(traceIn, traceOut, layout, coerce, textposition, {\n        moduleHasSelected: false,\n        moduleHasUnselected: false,\n        moduleHasConstrain: true,\n        moduleHasCliponaxis: true,\n        moduleHasTextangle: true,\n        moduleHasInsideanchor: true\n    });\n\n\n    if(traceOut.textposition !== 'none') {\n        coerce('textinfo');\n    }\n\n    handleDirection(coerce, 'increasing', INCREASING_COLOR);\n    handleDirection(coerce, 'decreasing', DECREASING_COLOR);\n    handleDirection(coerce, 'totals', TOTALS_COLOR);\n\n    var connectorVisible = coerce('connector.visible');\n    if(connectorVisible) {\n        coerce('connector.mode');\n        var connectorLineWidth = coerce('connector.line.width');\n        if(connectorLineWidth) {\n            coerce('connector.line.color');\n            coerce('connector.line.dash');\n        }\n    }\n}\n\nfunction crossTraceDefaults(fullData, fullLayout) {\n    var traceIn, traceOut;\n\n    function coerce(attr) {\n        return Lib.coerce(traceOut._input, traceOut, attributes, attr);\n    }\n\n    if(fullLayout.waterfallmode === 'group') {\n        for(var i = 0; i < fullData.length; i++) {\n            traceOut = fullData[i];\n            traceIn = traceOut._input;\n\n            handleGroupingDefaults(traceIn, traceOut, fullLayout, coerce);\n        }\n    }\n}\n\nmodule.exports = {\n    supplyDefaults: supplyDefaults,\n    crossTraceDefaults: crossTraceDefaults\n};\n\n},{\"../../components/color\":580,\"../../lib\":703,\"../bar/defaults\":845,\"../scatter/xy_defaults\":1100,\"./attributes\":1200}],1204:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar hoverLabelText = _dereq_('../../plots/cartesian/axes').hoverLabelText;\nvar opacity = _dereq_('../../components/color').opacity;\nvar hoverOnBars = _dereq_('../bar/hover').hoverOnBars;\n\nvar DIRSYMBOL = {\n    increasing: '▲',\n    decreasing: '▼'\n};\n\nmodule.exports = function hoverPoints(pointData, xval, yval, hovermode) {\n    var point = hoverOnBars(pointData, xval, yval, hovermode);\n    if(!point) return;\n\n    var cd = point.cd;\n    var trace = cd[0].trace;\n    var isHorizontal = (trace.orientation === 'h');\n\n    var vAxis = isHorizontal ? pointData.xa : pointData.ya;\n\n    function formatNumber(a) {\n        return hoverLabelText(vAxis, a);\n    }\n\n    // the closest data point\n    var index = point.index;\n    var di = cd[index];\n\n    var size = (di.isSum) ? di.b + di.s : di.rawS;\n\n    if(!di.isSum) {\n        // format delta numbers:\n        if(size > 0) {\n            point.extraText = formatNumber(size) + ' ' + DIRSYMBOL.increasing;\n        } else if(size < 0) {\n            point.extraText = '(' + (formatNumber(-size)) + ') ' + DIRSYMBOL.decreasing;\n        } else {\n            return;\n        }\n        // display initial value\n        point.extraText += '<br>Initial: ' + formatNumber(di.b + di.s - size);\n    }\n\n    point.color = getTraceColor(trace, di);\n\n    return [point];\n};\n\nfunction getTraceColor(trace, di) {\n    var cont = trace[di.dir].marker;\n    var mc = cont.color;\n    var mlc = cont.line.color;\n    var mlw = cont.line.width;\n    if(opacity(mc)) return mc;\n    else if(opacity(mlc) && mlw) return mlc;\n}\n\n},{\"../../components/color\":580,\"../../plots/cartesian/axes\":751,\"../bar/hover\":847}],1205:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    attributes: _dereq_('./attributes'),\n    layoutAttributes: _dereq_('./layout_attributes'),\n    supplyDefaults: _dereq_('./defaults').supplyDefaults,\n    crossTraceDefaults: _dereq_('./defaults').crossTraceDefaults,\n    supplyLayoutDefaults: _dereq_('./layout_defaults'),\n    calc: _dereq_('./calc'),\n    crossTraceCalc: _dereq_('./cross_trace_calc'),\n    plot: _dereq_('./plot'),\n    style: _dereq_('./style').style,\n    hoverPoints: _dereq_('./hover'),\n    selectPoints: _dereq_('../bar/select'),\n\n    moduleType: 'trace',\n    name: 'waterfall',\n    basePlotModule: _dereq_('../../plots/cartesian'),\n    categories: ['bar-like', 'cartesian', 'svg', 'oriented', 'showLegend', 'zoomScale'],\n    meta: {\n        \n    }\n};\n\n},{\"../../plots/cartesian\":762,\"../bar/select\":852,\"./attributes\":1200,\"./calc\":1201,\"./cross_trace_calc\":1202,\"./defaults\":1203,\"./hover\":1204,\"./layout_attributes\":1206,\"./layout_defaults\":1207,\"./plot\":1208,\"./style\":1209}],1206:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {\n    waterfallmode: {\n        valType: 'enumerated',\n        values: ['group', 'overlay'],\n        dflt: 'group',\n        \n        editType: 'calc',\n        \n    },\n    waterfallgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        \n        editType: 'calc',\n        \n    },\n    waterfallgroupgap: {\n        valType: 'number',\n        min: 0,\n        max: 1,\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    }\n};\n\n},{}],1207:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../../lib');\nvar layoutAttributes = _dereq_('./layout_attributes');\n\nmodule.exports = function(layoutIn, layoutOut, fullData) {\n    var hasTraceType = false;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);\n    }\n\n    for(var i = 0; i < fullData.length; i++) {\n        var trace = fullData[i];\n\n        if(trace.visible && trace.type === 'waterfall') {\n            hasTraceType = true;\n            break;\n        }\n    }\n\n    if(hasTraceType) {\n        coerce('waterfallmode');\n        coerce('waterfallgap', 0.2);\n        coerce('waterfallgroupgap');\n    }\n};\n\n},{\"../../lib\":703,\"./layout_attributes\":1206}],1208:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\nvar Lib = _dereq_('../../lib');\nvar Drawing = _dereq_('../../components/drawing');\nvar barPlot = _dereq_('../bar/plot').plot;\n\nmodule.exports = function plot(gd, plotinfo, cdModule, traceLayer) {\n    var fullLayout = gd._fullLayout;\n\n    barPlot(gd, plotinfo, cdModule, traceLayer, {\n        mode: fullLayout.waterfallmode,\n        norm: fullLayout.waterfallmode,\n        gap: fullLayout.waterfallgap,\n        groupgap: fullLayout.waterfallgroupgap\n    });\n\n    plotConnectors(gd, plotinfo, cdModule, traceLayer);\n};\n\nfunction plotConnectors(gd, plotinfo, cdModule, traceLayer) {\n    var xa = plotinfo.xaxis;\n    var ya = plotinfo.yaxis;\n\n    Lib.makeTraceGroups(traceLayer, cdModule, 'trace bars').each(function(cd) {\n        var plotGroup = d3.select(this);\n        var trace = cd[0].trace;\n\n        var group = Lib.ensureSingle(plotGroup, 'g', 'lines');\n\n        if(!trace.connector || !trace.connector.visible) {\n            group.remove();\n            return;\n        }\n\n        var isHorizontal = (trace.orientation === 'h');\n        var mode = trace.connector.mode;\n\n        var connectors = group.selectAll('g.line').data(Lib.identity);\n\n        connectors.enter().append('g')\n            .classed('line', true);\n\n        connectors.exit().remove();\n\n        var len = connectors.size();\n\n        connectors.each(function(di, i) {\n            // don't draw lines between nulls\n            if(i !== len - 1 && !di.cNext) return;\n\n            var xy = getXY(di, xa, ya, isHorizontal);\n            var x = xy[0];\n            var y = xy[1];\n\n            var shape = '';\n\n            if(mode === 'spanning') {\n                if(!di.isSum && i > 0) {\n                    if(isHorizontal) {\n                        shape += 'M' + x[0] + ',' + y[1] + 'V' + y[0];\n                    } else {\n                        shape += 'M' + x[1] + ',' + y[0] + 'H' + x[0];\n                    }\n                }\n            }\n\n            if(mode !== 'between') {\n                if(di.isSum || i < len - 1) {\n                    if(isHorizontal) {\n                        shape += 'M' + x[1] + ',' + y[0] + 'V' + y[1];\n                    } else {\n                        shape += 'M' + x[0] + ',' + y[1] + 'H' + x[1];\n                    }\n                }\n            }\n\n            if(x[2] !== undefined && y[2] !== undefined) {\n                if(isHorizontal) {\n                    shape += 'M' + x[1] + ',' + y[1] + 'V' + y[2];\n                } else {\n                    shape += 'M' + x[1] + ',' + y[1] + 'H' + x[2];\n                }\n            }\n\n            if(shape === '') shape = 'M0,0Z';\n\n            Lib.ensureSingle(d3.select(this), 'path')\n                .attr('d', shape)\n                .call(Drawing.setClipUrl, plotinfo.layerClipId, gd);\n        });\n    });\n}\n\nfunction getXY(di, xa, ya, isHorizontal) {\n    var s = [];\n    var p = [];\n\n    var sAxis = isHorizontal ? xa : ya;\n    var pAxis = isHorizontal ? ya : xa;\n\n    s[0] = sAxis.c2p(di.s0, true);\n    p[0] = pAxis.c2p(di.p0, true);\n\n    s[1] = sAxis.c2p(di.s1, true);\n    p[1] = pAxis.c2p(di.p1, true);\n\n    s[2] = sAxis.c2p(di.nextS0, true);\n    p[2] = pAxis.c2p(di.nextP0, true);\n\n    return isHorizontal ? [s, p] : [p, s];\n}\n\n},{\"../../components/drawing\":601,\"../../lib\":703,\"../bar/plot\":851,\"d3\":157}],1209:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar d3 = _dereq_('d3');\n\nvar Drawing = _dereq_('../../components/drawing');\nvar Color = _dereq_('../../components/color');\n\nvar styleTextPoints = _dereq_('../bar/style').styleTextPoints;\n\nfunction style(gd, cd) {\n    var s = cd ? cd[0].node3 : d3.select(gd).selectAll('g.waterfalllayer').selectAll('g.trace');\n\n    s.style('opacity', function(d) { return d[0].trace.opacity; });\n\n    s.each(function(d) {\n        var gTrace = d3.select(this);\n        var trace = d[0].trace;\n\n        gTrace.selectAll('.point > path').each(function(di) {\n            if(!di.isBlank) {\n                var cont = trace[di.dir].marker;\n\n                d3.select(this)\n                    .call(Color.fill, cont.color)\n                    .call(Color.stroke, cont.line.color)\n                    .call(Drawing.dashLine, cont.line.dash, cont.line.width)\n                    .style('opacity', trace.selectedpoints && !di.selected ? 0.3 : 1);\n            }\n        });\n\n        styleTextPoints(gTrace, trace, gd);\n\n        gTrace.selectAll('.lines').each(function() {\n            var cont = trace.connector.line;\n\n            Drawing.lineGroupStyle(\n                d3.select(this).selectAll('path'),\n                cont.width,\n                cont.color,\n                cont.dash\n            );\n        });\n    });\n}\n\nmodule.exports = {\n    style: style\n};\n\n},{\"../../components/color\":580,\"../../components/drawing\":601,\"../bar/style\":854,\"d3\":157}],1210:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Axes = _dereq_('../plots/cartesian/axes');\nvar Lib = _dereq_('../lib');\nvar PlotSchema = _dereq_('../plot_api/plot_schema');\nvar pointsAccessorFunction = _dereq_('./helpers').pointsAccessorFunction;\nvar BADNUM = _dereq_('../constants/numerical').BADNUM;\n\nexports.moduleType = 'transform';\n\nexports.name = 'aggregate';\n\nvar attrs = exports.attributes = {\n    enabled: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    groups: {\n        // TODO: groupby should support string or array grouping this way too\n        // currently groupby only allows a grouping array\n        valType: 'string',\n        strict: true,\n        noBlank: true,\n        arrayOk: true,\n        dflt: 'x',\n        \n        editType: 'calc',\n        \n    },\n    aggregations: {\n        _isLinkedToArray: 'aggregation',\n        target: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        func: {\n            valType: 'enumerated',\n            values: ['count', 'sum', 'avg', 'median', 'mode', 'rms', 'stddev', 'min', 'max', 'first', 'last', 'change', 'range'],\n            dflt: 'first',\n            \n            editType: 'calc',\n            \n        },\n        funcmode: {\n            valType: 'enumerated',\n            values: ['sample', 'population'],\n            dflt: 'sample',\n            \n            editType: 'calc',\n            \n        },\n        enabled: {\n            valType: 'boolean',\n            dflt: true,\n            \n            editType: 'calc',\n            \n        },\n        editType: 'calc'\n    },\n    editType: 'calc'\n};\n\nvar aggAttrs = attrs.aggregations;\n\n/**\n * Supply transform attributes defaults\n *\n * @param {object} transformIn\n *  object linked to trace.transforms[i] with 'func' set to exports.name\n * @param {object} traceOut\n *  the _fullData trace this transform applies to\n * @param {object} layout\n *  the plot's (not-so-full) layout\n * @param {object} traceIn\n *  the input data trace this transform applies to\n *\n * @return {object} transformOut\n *  copy of transformIn that contains attribute defaults\n */\nexports.supplyDefaults = function(transformIn, traceOut) {\n    var transformOut = {};\n    var i;\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(transformIn, transformOut, attrs, attr, dflt);\n    }\n\n    var enabled = coerce('enabled');\n\n    if(!enabled) return transformOut;\n\n    /*\n     * Normally _arrayAttrs is calculated during doCalc, but that comes later.\n     * Anyway this can change due to *count* aggregations (see below) so it's not\n     * necessarily the same set.\n     *\n     * For performance we turn it into an object of truthy values\n     * we'll use 1 for arrays we haven't aggregated yet, 0 for finished arrays,\n     * as distinct from undefined which means this array isn't present in the input\n     * missing arrays can still be aggregate outputs for *count* aggregations.\n     */\n    var arrayAttrArray = PlotSchema.findArrayAttributes(traceOut);\n    var arrayAttrs = {};\n    for(i = 0; i < arrayAttrArray.length; i++) arrayAttrs[arrayAttrArray[i]] = 1;\n\n    var groups = coerce('groups');\n\n    if(!Array.isArray(groups)) {\n        if(!arrayAttrs[groups]) {\n            transformOut.enabled = false;\n            return transformOut;\n        }\n        arrayAttrs[groups] = 0;\n    }\n\n    var aggregationsIn = transformIn.aggregations || [];\n    var aggregationsOut = transformOut.aggregations = new Array(aggregationsIn.length);\n    var aggregationOut;\n\n    function coercei(attr, dflt) {\n        return Lib.coerce(aggregationsIn[i], aggregationOut, aggAttrs, attr, dflt);\n    }\n\n    for(i = 0; i < aggregationsIn.length; i++) {\n        aggregationOut = {_index: i};\n        var target = coercei('target');\n        var func = coercei('func');\n        var enabledi = coercei('enabled');\n\n        // add this aggregation to the output only if it's the first instance\n        // of a valid target attribute - or an unused target attribute with \"count\"\n        if(enabledi && target && (arrayAttrs[target] || (func === 'count' && arrayAttrs[target] === undefined))) {\n            if(func === 'stddev') coercei('funcmode');\n\n            arrayAttrs[target] = 0;\n            aggregationsOut[i] = aggregationOut;\n        } else aggregationsOut[i] = {enabled: false, _index: i};\n    }\n\n    // any array attributes we haven't yet covered, fill them with the default aggregation\n    for(i = 0; i < arrayAttrArray.length; i++) {\n        if(arrayAttrs[arrayAttrArray[i]]) {\n            aggregationsOut.push({\n                target: arrayAttrArray[i],\n                func: aggAttrs.func.dflt,\n                enabled: true,\n                _index: -1\n            });\n        }\n    }\n\n    return transformOut;\n};\n\n\nexports.calcTransform = function(gd, trace, opts) {\n    if(!opts.enabled) return;\n\n    var groups = opts.groups;\n\n    var groupArray = Lib.getTargetArray(trace, {target: groups});\n    if(!groupArray) return;\n\n    var i, vi, groupIndex, newGrouping;\n\n    var groupIndices = {};\n    var indexToPoints = {};\n    var groupings = [];\n\n    var originalPointsAccessor = pointsAccessorFunction(trace.transforms, opts);\n\n    var len = groupArray.length;\n    if(trace._length) len = Math.min(len, trace._length);\n\n    for(i = 0; i < len; i++) {\n        vi = groupArray[i];\n        groupIndex = groupIndices[vi];\n        if(groupIndex === undefined) {\n            groupIndices[vi] = groupings.length;\n            newGrouping = [i];\n            groupings.push(newGrouping);\n            indexToPoints[groupIndices[vi]] = originalPointsAccessor(i);\n        } else {\n            groupings[groupIndex].push(i);\n            indexToPoints[groupIndices[vi]] = (indexToPoints[groupIndices[vi]] || []).concat(originalPointsAccessor(i));\n        }\n    }\n\n    opts._indexToPoints = indexToPoints;\n\n    var aggregations = opts.aggregations;\n\n    for(i = 0; i < aggregations.length; i++) {\n        aggregateOneArray(gd, trace, groupings, aggregations[i]);\n    }\n\n    if(typeof groups === 'string') {\n        aggregateOneArray(gd, trace, groupings, {\n            target: groups,\n            func: 'first',\n            enabled: true\n        });\n    }\n\n    trace._length = groupings.length;\n};\n\nfunction aggregateOneArray(gd, trace, groupings, aggregation) {\n    if(!aggregation.enabled) return;\n\n    var attr = aggregation.target;\n    var targetNP = Lib.nestedProperty(trace, attr);\n    var arrayIn = targetNP.get();\n    var conversions = Axes.getDataConversions(gd, trace, attr, arrayIn);\n    var func = getAggregateFunction(aggregation, conversions);\n\n    var arrayOut = new Array(groupings.length);\n    for(var i = 0; i < groupings.length; i++) {\n        arrayOut[i] = func(arrayIn, groupings[i]);\n    }\n    targetNP.set(arrayOut);\n\n    if(aggregation.func === 'count') {\n        // count does not depend on an input array, so it's likely not part of _arrayAttrs yet\n        // but after this transform it most definitely *is* an array attribute.\n        Lib.pushUnique(trace._arrayAttrs, attr);\n    }\n}\n\nfunction getAggregateFunction(opts, conversions) {\n    var func = opts.func;\n    var d2c = conversions.d2c;\n    var c2d = conversions.c2d;\n\n    switch(func) {\n        // count, first, and last don't depend on anything about the data\n        // point back to pure functions for performance\n        case 'count':\n            return count;\n        case 'first':\n            return first;\n        case 'last':\n            return last;\n\n        case 'sum':\n            // This will produce output in all cases even though it's nonsensical\n            // for date or category data.\n            return function(array, indices) {\n                var total = 0;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) total += vi;\n                }\n                return c2d(total);\n            };\n\n        case 'avg':\n            // Generally meaningless for category data but it still does something.\n            return function(array, indices) {\n                var total = 0;\n                var cnt = 0;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) {\n                        total += vi;\n                        cnt++;\n                    }\n                }\n                return cnt ? c2d(total / cnt) : BADNUM;\n            };\n\n        case 'min':\n            return function(array, indices) {\n                var out = Infinity;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) out = Math.min(out, vi);\n                }\n                return (out === Infinity) ? BADNUM : c2d(out);\n            };\n\n        case 'max':\n            return function(array, indices) {\n                var out = -Infinity;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) out = Math.max(out, vi);\n                }\n                return (out === -Infinity) ? BADNUM : c2d(out);\n            };\n\n        case 'range':\n            return function(array, indices) {\n                var min = Infinity;\n                var max = -Infinity;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) {\n                        min = Math.min(min, vi);\n                        max = Math.max(max, vi);\n                    }\n                }\n                return (max === -Infinity || min === Infinity) ? BADNUM : c2d(max - min);\n            };\n\n        case 'change':\n            return function(array, indices) {\n                var first = d2c(array[indices[0]]);\n                var last = d2c(array[indices[indices.length - 1]]);\n                return (first === BADNUM || last === BADNUM) ? BADNUM : c2d(last - first);\n            };\n\n        case 'median':\n            return function(array, indices) {\n                var sortCalc = [];\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) sortCalc.push(vi);\n                }\n                if(!sortCalc.length) return BADNUM;\n                sortCalc.sort();\n                var mid = (sortCalc.length - 1) / 2;\n                return c2d((sortCalc[Math.floor(mid)] + sortCalc[Math.ceil(mid)]) / 2);\n            };\n\n        case 'mode':\n            return function(array, indices) {\n                var counts = {};\n                var maxCnt = 0;\n                var out = BADNUM;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) {\n                        var counti = counts[vi] = (counts[vi] || 0) + 1;\n                        if(counti > maxCnt) {\n                            maxCnt = counti;\n                            out = vi;\n                        }\n                    }\n                }\n                return maxCnt ? c2d(out) : BADNUM;\n            };\n\n        case 'rms':\n            return function(array, indices) {\n                var total = 0;\n                var cnt = 0;\n                for(var i = 0; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) {\n                        total += vi * vi;\n                        cnt++;\n                    }\n                }\n                return cnt ? c2d(Math.sqrt(total / cnt)) : BADNUM;\n            };\n\n        case 'stddev':\n            return function(array, indices) {\n                // balance numerical stability with performance:\n                // so that we call d2c once per element but don't need to\n                // store them, reference all to the first element\n                var total = 0;\n                var total2 = 0;\n                var cnt = 1;\n                var v0 = BADNUM;\n                var i;\n                for(i = 0; i < indices.length && v0 === BADNUM; i++) {\n                    v0 = d2c(array[indices[i]]);\n                }\n                if(v0 === BADNUM) return BADNUM;\n\n                for(; i < indices.length; i++) {\n                    var vi = d2c(array[indices[i]]);\n                    if(vi !== BADNUM) {\n                        var dv = vi - v0;\n                        total += dv;\n                        total2 += dv * dv;\n                        cnt++;\n                    }\n                }\n\n                // This is population std dev, if we want sample std dev\n                // we would need (...) / (cnt - 1)\n                // Also note there's no c2d here - that means for dates the result\n                // is a number of milliseconds, and for categories it's a number\n                // of category differences, which is not generically meaningful but\n                // as in other cases we don't forbid it.\n                var norm = (opts.funcmode === 'sample') ? (cnt - 1) : cnt;\n                // this is debatable: should a count of 1 return sample stddev of\n                // 0 or undefined?\n                if(!norm) return 0;\n                return Math.sqrt((total2 - (total * total / cnt)) / norm);\n            };\n    }\n}\n\nfunction count(array, indices) {\n    return indices.length;\n}\n\nfunction first(array, indices) {\n    return array[indices[0]];\n}\n\nfunction last(array, indices) {\n    return array[indices[indices.length - 1]];\n}\n\n},{\"../constants/numerical\":680,\"../lib\":703,\"../plot_api/plot_schema\":740,\"../plots/cartesian/axes\":751,\"./helpers\":1213}],1211:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar Registry = _dereq_('../registry');\nvar Axes = _dereq_('../plots/cartesian/axes');\nvar pointsAccessorFunction = _dereq_('./helpers').pointsAccessorFunction;\n\nvar filterOps = _dereq_('../constants/filter_ops');\nvar COMPARISON_OPS = filterOps.COMPARISON_OPS;\nvar INTERVAL_OPS = filterOps.INTERVAL_OPS;\nvar SET_OPS = filterOps.SET_OPS;\n\nexports.moduleType = 'transform';\n\nexports.name = 'filter';\n\nexports.attributes = {\n    enabled: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    target: {\n        valType: 'string',\n        strict: true,\n        noBlank: true,\n        arrayOk: true,\n        dflt: 'x',\n        \n        editType: 'calc',\n        \n    },\n    operation: {\n        valType: 'enumerated',\n        values: []\n            .concat(COMPARISON_OPS)\n            .concat(INTERVAL_OPS)\n            .concat(SET_OPS),\n        dflt: '=',\n        \n        editType: 'calc',\n        \n    },\n    value: {\n        valType: 'any',\n        dflt: 0,\n        \n        editType: 'calc',\n        \n    },\n    preservegaps: {\n        valType: 'boolean',\n        dflt: false,\n        \n        editType: 'calc',\n        \n    },\n    editType: 'calc'\n};\n\nexports.supplyDefaults = function(transformIn) {\n    var transformOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(transformIn, transformOut, exports.attributes, attr, dflt);\n    }\n\n    var enabled = coerce('enabled');\n\n    if(enabled) {\n        var target = coerce('target');\n\n        if(Lib.isArrayOrTypedArray(target) && target.length === 0) {\n            transformOut.enabled = false;\n            return transformOut;\n        }\n\n        coerce('preservegaps');\n        coerce('operation');\n        coerce('value');\n\n        var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleDefaults');\n        handleCalendarDefaults(transformIn, transformOut, 'valuecalendar', null);\n        handleCalendarDefaults(transformIn, transformOut, 'targetcalendar', null);\n    }\n\n    return transformOut;\n};\n\nexports.calcTransform = function(gd, trace, opts) {\n    if(!opts.enabled) return;\n\n    var targetArray = Lib.getTargetArray(trace, opts);\n    if(!targetArray) return;\n\n    var target = opts.target;\n\n    var len = targetArray.length;\n    if(trace._length) len = Math.min(len, trace._length);\n\n    var targetCalendar = opts.targetcalendar;\n    var arrayAttrs = trace._arrayAttrs;\n    var preservegaps = opts.preservegaps;\n\n    // even if you provide targetcalendar, if target is a string and there\n    // is a calendar attribute matching target it will get used instead.\n    if(typeof target === 'string') {\n        var attrTargetCalendar = Lib.nestedProperty(trace, target + 'calendar').get();\n        if(attrTargetCalendar) targetCalendar = attrTargetCalendar;\n    }\n\n    var d2c = Axes.getDataToCoordFunc(gd, trace, target, targetArray);\n    var filterFunc = getFilterFunc(opts, d2c, targetCalendar);\n    var originalArrays = {};\n    var indexToPoints = {};\n    var index = 0;\n\n    function forAllAttrs(fn, index) {\n        for(var j = 0; j < arrayAttrs.length; j++) {\n            var np = Lib.nestedProperty(trace, arrayAttrs[j]);\n            fn(np, index);\n        }\n    }\n\n    var initFn;\n    var fillFn;\n    if(preservegaps) {\n        initFn = function(np) {\n            originalArrays[np.astr] = Lib.extendDeep([], np.get());\n            np.set(new Array(len));\n        };\n        fillFn = function(np, index) {\n            var val = originalArrays[np.astr][index];\n            np.get()[index] = val;\n        };\n    } else {\n        initFn = function(np) {\n            originalArrays[np.astr] = Lib.extendDeep([], np.get());\n            np.set([]);\n        };\n        fillFn = function(np, index) {\n            var val = originalArrays[np.astr][index];\n            np.get().push(val);\n        };\n    }\n\n    // copy all original array attribute values, and clear arrays in trace\n    forAllAttrs(initFn);\n\n    var originalPointsAccessor = pointsAccessorFunction(trace.transforms, opts);\n\n    // loop through filter array, fill trace arrays if passed\n    for(var i = 0; i < len; i++) {\n        var passed = filterFunc(targetArray[i]);\n        if(passed) {\n            forAllAttrs(fillFn, i);\n            indexToPoints[index++] = originalPointsAccessor(i);\n        } else if(preservegaps) index++;\n    }\n\n    opts._indexToPoints = indexToPoints;\n    trace._length = index;\n};\n\nfunction getFilterFunc(opts, d2c, targetCalendar) {\n    var operation = opts.operation;\n    var value = opts.value;\n    var hasArrayValue = Array.isArray(value);\n\n    function isOperationIn(array) {\n        return array.indexOf(operation) !== -1;\n    }\n\n    var d2cValue = function(v) { return d2c(v, 0, opts.valuecalendar); };\n    var d2cTarget = function(v) { return d2c(v, 0, targetCalendar); };\n\n    var coercedValue;\n\n    if(isOperationIn(COMPARISON_OPS)) {\n        coercedValue = hasArrayValue ? d2cValue(value[0]) : d2cValue(value);\n    } else if(isOperationIn(INTERVAL_OPS)) {\n        coercedValue = hasArrayValue ?\n            [d2cValue(value[0]), d2cValue(value[1])] :\n            [d2cValue(value), d2cValue(value)];\n    } else if(isOperationIn(SET_OPS)) {\n        coercedValue = hasArrayValue ? value.map(d2cValue) : [d2cValue(value)];\n    }\n\n    switch(operation) {\n        case '=':\n            return function(v) { return d2cTarget(v) === coercedValue; };\n\n        case '!=':\n            return function(v) { return d2cTarget(v) !== coercedValue; };\n\n        case '<':\n            return function(v) { return d2cTarget(v) < coercedValue; };\n\n        case '<=':\n            return function(v) { return d2cTarget(v) <= coercedValue; };\n\n        case '>':\n            return function(v) { return d2cTarget(v) > coercedValue; };\n\n        case '>=':\n            return function(v) { return d2cTarget(v) >= coercedValue; };\n\n        case '[]':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv >= coercedValue[0] && cv <= coercedValue[1];\n            };\n\n        case '()':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv > coercedValue[0] && cv < coercedValue[1];\n            };\n\n        case '[)':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv >= coercedValue[0] && cv < coercedValue[1];\n            };\n\n        case '(]':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv > coercedValue[0] && cv <= coercedValue[1];\n            };\n\n        case '][':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv <= coercedValue[0] || cv >= coercedValue[1];\n            };\n\n        case ')(':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv < coercedValue[0] || cv > coercedValue[1];\n            };\n\n        case '](':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv <= coercedValue[0] || cv > coercedValue[1];\n            };\n\n        case ')[':\n            return function(v) {\n                var cv = d2cTarget(v);\n                return cv < coercedValue[0] || cv >= coercedValue[1];\n            };\n\n        case '{}':\n            return function(v) {\n                return coercedValue.indexOf(d2cTarget(v)) !== -1;\n            };\n\n        case '}{':\n            return function(v) {\n                return coercedValue.indexOf(d2cTarget(v)) === -1;\n            };\n    }\n}\n\n},{\"../constants/filter_ops\":676,\"../lib\":703,\"../plots/cartesian/axes\":751,\"../registry\":831,\"./helpers\":1213}],1212:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar PlotSchema = _dereq_('../plot_api/plot_schema');\nvar Plots = _dereq_('../plots/plots');\nvar pointsAccessorFunction = _dereq_('./helpers').pointsAccessorFunction;\n\nexports.moduleType = 'transform';\n\nexports.name = 'groupby';\n\nexports.attributes = {\n    enabled: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    groups: {\n        valType: 'data_array',\n        dflt: [],\n        \n        editType: 'calc',\n        \n    },\n    nameformat: {\n        valType: 'string',\n        \n        editType: 'calc',\n        \n    },\n    styles: {\n        _isLinkedToArray: 'style',\n        target: {\n            valType: 'string',\n            \n            editType: 'calc',\n            \n        },\n        value: {\n            valType: 'any',\n            \n            dflt: {},\n            editType: 'calc',\n            \n            _compareAsJSON: true\n        },\n        editType: 'calc'\n    },\n    editType: 'calc'\n};\n\n/**\n * Supply transform attributes defaults\n *\n * @param {object} transformIn\n *  object linked to trace.transforms[i] with 'type' set to exports.name\n * @param {object} traceOut\n *  the _fullData trace this transform applies to\n * @param {object} layout\n *  the plot's (not-so-full) layout\n * @param {object} traceIn\n *  the input data trace this transform applies to\n *\n * @return {object} transformOut\n *  copy of transformIn that contains attribute defaults\n */\nexports.supplyDefaults = function(transformIn, traceOut, layout) {\n    var i;\n    var transformOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(transformIn, transformOut, exports.attributes, attr, dflt);\n    }\n\n    var enabled = coerce('enabled');\n\n    if(!enabled) return transformOut;\n\n    coerce('groups');\n    coerce('nameformat', layout._dataLength > 1 ? '%{group} (%{trace})' : '%{group}');\n\n    var styleIn = transformIn.styles;\n    var styleOut = transformOut.styles = [];\n\n    if(styleIn) {\n        for(i = 0; i < styleIn.length; i++) {\n            var thisStyle = styleOut[i] = {};\n            Lib.coerce(styleIn[i], styleOut[i], exports.attributes.styles, 'target');\n            var value = Lib.coerce(styleIn[i], styleOut[i], exports.attributes.styles, 'value');\n\n            // so that you can edit value in place and have Plotly.react notice it, or\n            // rebuild it every time and have Plotly.react NOT think it changed:\n            // use _compareAsJSON to say we should diff the _JSON_value\n            if(Lib.isPlainObject(value)) thisStyle.value = Lib.extendDeep({}, value);\n            else if(value) delete thisStyle.value;\n        }\n    }\n\n    return transformOut;\n};\n\n\n/**\n * Apply transform !!!\n *\n * @param {array} data\n *  array of transformed traces (is [fullTrace] upon first transform)\n *\n * @param {object} state\n *  state object which includes:\n *      - transform {object} full transform attributes\n *      - fullTrace {object} full trace object which is being transformed\n *      - fullData {array} full pre-transform(s) data array\n *      - layout {object} the plot's (not-so-full) layout\n *\n * @return {object} newData\n *  array of transformed traces\n */\nexports.transform = function(data, state) {\n    var newTraces, i, j;\n    var newData = [];\n\n    for(i = 0; i < data.length; i++) {\n        newTraces = transformOne(data[i], state);\n\n        for(j = 0; j < newTraces.length; j++) {\n            newData.push(newTraces[j]);\n        }\n    }\n\n    return newData;\n};\n\nfunction transformOne(trace, state) {\n    var i, j, k, attr, srcArray, groupName, newTrace, transforms, arrayLookup;\n    var groupNameObj;\n\n    var opts = state.transform;\n    var transformIndex = state.transformIndex;\n    var groups = trace.transforms[transformIndex].groups;\n    var originalPointsAccessor = pointsAccessorFunction(trace.transforms, opts);\n\n    if(!(Array.isArray(groups)) || groups.length === 0) {\n        return [trace];\n    }\n\n    var groupNames = Lib.filterUnique(groups);\n    var newData = new Array(groupNames.length);\n    var len = groups.length;\n\n    var arrayAttrs = PlotSchema.findArrayAttributes(trace);\n\n    var styles = opts.styles || [];\n    var styleLookup = {};\n    for(i = 0; i < styles.length; i++) {\n        styleLookup[styles[i].target] = styles[i].value;\n    }\n\n    if(opts.styles) {\n        groupNameObj = Lib.keyedContainer(opts, 'styles', 'target', 'value.name');\n    }\n\n    // An index to map group name --> expanded trace index\n    var indexLookup = {};\n    var indexCnts = {};\n\n    for(i = 0; i < groupNames.length; i++) {\n        groupName = groupNames[i];\n        indexLookup[groupName] = i;\n        indexCnts[groupName] = 0;\n\n        // Start with a deep extend that just copies array references.\n        newTrace = newData[i] = Lib.extendDeepNoArrays({}, trace);\n        newTrace._group = groupName;\n        newTrace.transforms[transformIndex]._indexToPoints = {};\n\n        var suppliedName = null;\n        if(groupNameObj) {\n            suppliedName = groupNameObj.get(groupName);\n        }\n\n        if(suppliedName || suppliedName === '') {\n            newTrace.name = suppliedName;\n        } else {\n            newTrace.name = Lib.templateString(opts.nameformat, {\n                trace: trace.name,\n                group: groupName\n            });\n        }\n\n        // In order for groups to apply correctly to other transform data (e.g.\n        // a filter transform), we have to break the connection and clone the\n        // transforms so that each group writes grouped values into a different\n        // destination. This function does not break the array reference\n        // connection between the split transforms it creates. That's handled in\n        // initialize, which creates a new empty array for each arrayAttr.\n        transforms = newTrace.transforms;\n        newTrace.transforms = [];\n        for(j = 0; j < transforms.length; j++) {\n            newTrace.transforms[j] = Lib.extendDeepNoArrays({}, transforms[j]);\n        }\n\n        // Initialize empty arrays for the arrayAttrs, to be split in the next step\n        for(j = 0; j < arrayAttrs.length; j++) {\n            Lib.nestedProperty(newTrace, arrayAttrs[j]).set([]);\n        }\n    }\n\n    // For each array attribute including those nested inside this and other\n    // transforms (small note that we technically only need to do this for\n    // transforms that have not yet been applied):\n    for(k = 0; k < arrayAttrs.length; k++) {\n        attr = arrayAttrs[k];\n\n        // Cache all the arrays to which we'll push:\n        for(j = 0, arrayLookup = []; j < groupNames.length; j++) {\n            arrayLookup[j] = Lib.nestedProperty(newData[j], attr).get();\n        }\n\n        // Get the input data:\n        srcArray = Lib.nestedProperty(trace, attr).get();\n\n        // Send each data point to the appropriate expanded trace:\n        for(j = 0; j < len; j++) {\n            // Map group data --> trace index --> array and push data onto it\n            arrayLookup[indexLookup[groups[j]]].push(srcArray[j]);\n        }\n    }\n\n    for(j = 0; j < len; j++) {\n        newTrace = newData[indexLookup[groups[j]]];\n\n        var indexToPoints = newTrace.transforms[transformIndex]._indexToPoints;\n        indexToPoints[indexCnts[groups[j]]] = originalPointsAccessor(j);\n        indexCnts[groups[j]]++;\n    }\n\n    for(i = 0; i < groupNames.length; i++) {\n        groupName = groupNames[i];\n        newTrace = newData[i];\n\n        Plots.clearExpandedTraceDefaultColors(newTrace);\n\n        // there's no need to coerce styleLookup[groupName] here\n        // as another round of supplyDefaults is done on the transformed traces\n        newTrace = Lib.extendDeepNoArrays(newTrace, styleLookup[groupName] || {});\n    }\n\n    return newData;\n}\n\n},{\"../lib\":703,\"../plot_api/plot_schema\":740,\"../plots/plots\":812,\"./helpers\":1213}],1213:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nexports.pointsAccessorFunction = function(transforms, opts) {\n    var tr;\n    var prevIndexToPoints;\n    for(var i = 0; i < transforms.length; i++) {\n        tr = transforms[i];\n        if(tr === opts) break;\n        if(!tr._indexToPoints || tr.enabled === false) continue;\n        prevIndexToPoints = tr._indexToPoints;\n    }\n    var originalPointsAccessor = prevIndexToPoints ?\n        function(i) {return prevIndexToPoints[i];} :\n        function(i) {return [i];};\n    return originalPointsAccessor;\n};\n\n},{}],1214:[function(_dereq_,module,exports){\n/**\n* Copyright 2012-2019, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar Lib = _dereq_('../lib');\nvar Axes = _dereq_('../plots/cartesian/axes');\nvar pointsAccessorFunction = _dereq_('./helpers').pointsAccessorFunction;\n\nexports.moduleType = 'transform';\n\nexports.name = 'sort';\n\nexports.attributes = {\n    enabled: {\n        valType: 'boolean',\n        dflt: true,\n        \n        editType: 'calc',\n        \n    },\n    target: {\n        valType: 'string',\n        strict: true,\n        noBlank: true,\n        arrayOk: true,\n        dflt: 'x',\n        \n        editType: 'calc',\n        \n    },\n    order: {\n        valType: 'enumerated',\n        values: ['ascending', 'descending'],\n        dflt: 'ascending',\n        \n        editType: 'calc',\n        \n    },\n    editType: 'calc'\n};\n\nexports.supplyDefaults = function(transformIn) {\n    var transformOut = {};\n\n    function coerce(attr, dflt) {\n        return Lib.coerce(transformIn, transformOut, exports.attributes, attr, dflt);\n    }\n\n    var enabled = coerce('enabled');\n\n    if(enabled) {\n        coerce('target');\n        coerce('order');\n    }\n\n    return transformOut;\n};\n\nexports.calcTransform = function(gd, trace, opts) {\n    if(!opts.enabled) return;\n\n    var targetArray = Lib.getTargetArray(trace, opts);\n    if(!targetArray) return;\n\n    var target = opts.target;\n\n    var len = targetArray.length;\n    if(trace._length) len = Math.min(len, trace._length);\n\n    var arrayAttrs = trace._arrayAttrs;\n    var d2c = Axes.getDataToCoordFunc(gd, trace, target, targetArray);\n    var indices = getIndices(opts, targetArray, d2c, len);\n    var originalPointsAccessor = pointsAccessorFunction(trace.transforms, opts);\n    var indexToPoints = {};\n    var i, j;\n\n    for(i = 0; i < arrayAttrs.length; i++) {\n        var np = Lib.nestedProperty(trace, arrayAttrs[i]);\n        var arrayOld = np.get();\n        var arrayNew = new Array(len);\n\n        for(j = 0; j < len; j++) {\n            arrayNew[j] = arrayOld[indices[j]];\n        }\n\n        np.set(arrayNew);\n    }\n\n    for(j = 0; j < len; j++) {\n        indexToPoints[j] = originalPointsAccessor(indices[j]);\n    }\n\n    opts._indexToPoints = indexToPoints;\n    trace._length = len;\n};\n\nfunction getIndices(opts, targetArray, d2c, len) {\n    var sortedArray = new Array(len);\n    var indices = new Array(len);\n    var i;\n\n    for(i = 0; i < len; i++) {\n        sortedArray[i] = {v: targetArray[i], i: i};\n    }\n\n    sortedArray.sort(getSortFunc(opts, d2c));\n\n    for(i = 0; i < len; i++) {\n        indices[i] = sortedArray[i].i;\n    }\n\n    return indices;\n}\n\nfunction getSortFunc(opts, d2c) {\n    switch(opts.order) {\n        case 'ascending':\n            return function(a, b) { return d2c(a.v) - d2c(b.v); };\n        case 'descending':\n            return function(a, b) { return d2c(b.v) - d2c(a.v); };\n    }\n}\n\n},{\"../lib\":703,\"../plots/cartesian/axes\":751,\"./helpers\":1213}]},{},[24])(24)\n});\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/plotly.js/dist/plotly.js?");

/***/ }),

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/process/browser.js?");

/***/ }),

/***/ "./node_modules/prop-types/checkPropTypes.js":
/*!***************************************************!*\
  !*** ./node_modules/prop-types/checkPropTypes.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n  var loggedTypeFailures = {};\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (true) {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          )\n\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/prop-types/checkPropTypes.js?");

/***/ }),

/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
/*!************************************************************!*\
  !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar printWarning = function() {};\n\nif (true) {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (true) {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if ( true && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n       true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : undefined;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n       true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/prop-types/factoryWithTypeCheckers.js?");

/***/ }),

/***/ "./node_modules/prop-types/index.js":
/*!******************************************!*\
  !*** ./node_modules/prop-types/index.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(isValidElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/prop-types/index.js?");

/***/ }),

/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
/*!*************************************************************!*\
  !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/prop-types/lib/ReactPropTypesSecret.js?");

/***/ }),

/***/ "./node_modules/raf/index.js":
/*!***********************************!*\
  !*** ./node_modules/raf/index.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(/*! performance-now */ \"./node_modules/performance-now/lib/performance-now.js\")\n  , root = typeof window === 'undefined' ? global : window\n  , vendors = ['moz', 'webkit']\n  , suffix = 'AnimationFrame'\n  , raf = root['request' + suffix]\n  , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n  raf = root[vendors[i] + 'Request' + suffix]\n  caf = root[vendors[i] + 'Cancel' + suffix]\n      || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n  var last = 0\n    , id = 0\n    , queue = []\n    , frameDuration = 1000 / 60\n\n  raf = function(callback) {\n    if(queue.length === 0) {\n      var _now = now()\n        , next = Math.max(0, frameDuration - (_now - last))\n      last = next + _now\n      setTimeout(function() {\n        var cp = queue.slice(0)\n        // Clear queue here to prevent\n        // callbacks from appending listeners\n        // to the current frame's queue\n        queue.length = 0\n        for(var i = 0; i < cp.length; i++) {\n          if(!cp[i].cancelled) {\n            try{\n              cp[i].callback(last)\n            } catch(e) {\n              setTimeout(function() { throw e }, 0)\n            }\n          }\n        }\n      }, Math.round(next))\n    }\n    queue.push({\n      handle: ++id,\n      callback: callback,\n      cancelled: false\n    })\n    return id\n  }\n\n  caf = function(handle) {\n    for(var i = 0; i < queue.length; i++) {\n      if(queue[i].handle === handle) {\n        queue[i].cancelled = true\n      }\n    }\n  }\n}\n\nmodule.exports = function(fn) {\n  // Wrap in a new function to prevent\n  // `cancel` potentially being assigned\n  // to the native rAF function\n  return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n  caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n  if (!object) {\n    object = root;\n  }\n  object.requestAnimationFrame = raf\n  object.cancelAnimationFrame = caf\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://dash_bio/./node_modules/raf/index.js?");

/***/ }),

/***/ "./node_modules/ramda/es/F.js":
/*!************************************!*\
  !*** ./node_modules/ramda/es/F.js ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/**\n * A function that always returns `false`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.T\n * @example\n *\n *      R.F(); //=> false\n */\nvar F = function () {\n  return false;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (F);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/F.js?");

/***/ }),

/***/ "./node_modules/ramda/es/T.js":
/*!************************************!*\
  !*** ./node_modules/ramda/es/T.js ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/**\n * A function that always returns `true`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.F\n * @example\n *\n *      R.T(); //=> true\n */\nvar T = function () {\n  return true;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (T);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/T.js?");

/***/ }),

/***/ "./node_modules/ramda/es/__.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/__.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * A special placeholder value used to specify \"gaps\" within curried functions,\n * allowing partial application of any combination of arguments, regardless of\n * their positions.\n *\n * If `g` is a curried ternary function and `_` is `R.__`, the following are\n * equivalent:\n *\n *   - `g(1, 2, 3)`\n *   - `g(_, 2, 3)(1)`\n *   - `g(_, _, 3)(1)(2)`\n *   - `g(_, _, 3)(1, 2)`\n *   - `g(_, 2, _)(1, 3)`\n *   - `g(_, 2)(1)(3)`\n *   - `g(_, 2)(1, 3)`\n *   - `g(_, 2)(_, 3)(1)`\n *\n * @name __\n * @constant\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @example\n *\n *      const greet = R.replace('{name}', R.__, 'Hello, {name}!');\n *      greet('Alice'); //=> 'Hello, Alice!'\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = ({ '@@functional/placeholder': true });\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/__.js?");

/***/ }),

/***/ "./node_modules/ramda/es/add.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/add.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Adds two values.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a\n * @param {Number} b\n * @return {Number}\n * @see R.subtract\n * @example\n *\n *      R.add(2, 3);       //=>  5\n *      R.add(7)(10);      //=> 17\n */\nvar add = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function add(a, b) {\n  return Number(a) + Number(b);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (add);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/add.js?");

/***/ }),

/***/ "./node_modules/ramda/es/addIndex.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/addIndex.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n\n/**\n * Creates a new list iteration function from an existing one by adding two new\n * parameters to its callback function: the current index, and the entire list.\n *\n * This would turn, for instance, [`R.map`](#map) function into one that\n * more closely resembles `Array.prototype.map`. Note that this will only work\n * for functions in which the iteration callback function is the first\n * parameter, and where the list is the last parameter. (This latter might be\n * unimportant if the list parameter is not used.)\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Function\n * @category List\n * @sig ((a ... -> b) ... -> [a] -> *) -> ((a ..., Int, [a] -> b) ... -> [a] -> *)\n * @param {Function} fn A list iteration function that does not pass index or list to its callback\n * @return {Function} An altered list iteration function that passes (item, index, list) to its callback\n * @example\n *\n *      const mapIndexed = R.addIndex(R.map);\n *      mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);\n *      //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']\n */\nvar addIndex = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function addIndex(fn) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(fn.length, function () {\n    var idx = 0;\n    var origFn = arguments[0];\n    var list = arguments[arguments.length - 1];\n    var args = Array.prototype.slice.call(arguments, 0);\n    args[0] = function () {\n      var result = origFn.apply(this, Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments, [idx, list]));\n      idx += 1;\n      return result;\n    };\n    return fn.apply(this, args);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (addIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/addIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/adjust.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/adjust.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n\n/**\n * Applies a function to the value at the given index of an array, returning a\n * new copy of the array with the element at the given index replaced with the\n * result of the function application.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig Number -> (a -> a) -> [a] -> [a]\n * @param {Number} idx The index.\n * @param {Function} fn The function to apply.\n * @param {Array|Arguments} list An array-like object whose value\n *        at the supplied index will be replaced.\n * @return {Array} A copy of the supplied array-like object with\n *         the element at index `idx` replaced with the value\n *         returned by applying `fn` to the existing element.\n * @see R.update\n * @example\n *\n *      R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']);      //=> ['a', 'B', 'c', 'd']\n *      R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']);     //=> ['a', 'b', 'c', 'D']\n * @symb R.adjust(-1, f, [a, b]) = [a, f(b)]\n * @symb R.adjust(0, f, [a, b]) = [f(a), b]\n */\nvar adjust = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function adjust(idx, fn, list) {\n  if (idx >= list.length || idx < -list.length) {\n    return list;\n  }\n  var start = idx < 0 ? list.length : 0;\n  var _idx = start + idx;\n  var _list = Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list);\n  _list[_idx] = fn(list[_idx]);\n  return _list;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (adjust);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/adjust.js?");

/***/ }),

/***/ "./node_modules/ramda/es/all.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/all.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xall_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xall.js */ \"./node_modules/ramda/es/internal/_xall.js\");\n\n\n\n\n/**\n * Returns `true` if all elements of the list match the predicate, `false` if\n * there are any that don't.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by every element, `false`\n *         otherwise.\n * @see R.any, R.none, R.transduce\n * @example\n *\n *      const equals3 = R.equals(3);\n *      R.all(equals3)([3, 3, 3, 3]); //=> true\n *      R.all(equals3)([3, 3, 1, 3]); //=> false\n */\nvar all = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['all'], _internal_xall_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function all(fn, list) {\n  var idx = 0;\n  while (idx < list.length) {\n    if (!fn(list[idx])) {\n      return false;\n    }\n    idx += 1;\n  }\n  return true;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (all);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/all.js?");

/***/ }),

/***/ "./node_modules/ramda/es/allPass.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/allPass.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck.js */ \"./node_modules/ramda/es/pluck.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n\n\n\n/**\n * Takes a list of predicates and returns a predicate that returns true for a\n * given list of arguments if every one of the provided predicates is satisfied\n * by those arguments.\n *\n * The function returned is a curried function whose arity matches that of the\n * highest-arity predicate.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Logic\n * @sig [(*... -> Boolean)] -> (*... -> Boolean)\n * @param {Array} predicates An array of predicates to check\n * @return {Function} The combined predicate\n * @see R.anyPass\n * @example\n *\n *      const isQueen = R.propEq('rank', 'Q');\n *      const isSpade = R.propEq('suit', '♠︎');\n *      const isQueenOfSpades = R.allPass([isQueen, isSpade]);\n *\n *      isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false\n *      isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true\n */\nvar allPass = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function allPass(preds) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_reduce_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_max_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], 0, Object(_pluck_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])('length', preds)), function () {\n    var idx = 0;\n    var len = preds.length;\n    while (idx < len) {\n      if (!preds[idx].apply(this, arguments)) {\n        return false;\n      }\n      idx += 1;\n    }\n    return true;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (allPass);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/allPass.js?");

/***/ }),

/***/ "./node_modules/ramda/es/always.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/always.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n *      const t = R.always('Tee');\n *      t(); //=> 'Tee'\n */\nvar always = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function always(val) {\n  return function () {\n    return val;\n  };\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (always);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/always.js?");

/***/ }),

/***/ "./node_modules/ramda/es/and.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/and.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if both arguments are `true`; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {Any} a\n * @param {Any} b\n * @return {Any} the first argument if it is falsy, otherwise the second argument.\n * @see R.both\n * @example\n *\n *      R.and(true, true); //=> true\n *      R.and(true, false); //=> false\n *      R.and(false, true); //=> false\n *      R.and(false, false); //=> false\n */\nvar and = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function and(a, b) {\n  return a && b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (and);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/and.js?");

/***/ }),

/***/ "./node_modules/ramda/es/any.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/any.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xany_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xany.js */ \"./node_modules/ramda/es/internal/_xany.js\");\n\n\n\n\n/**\n * Returns `true` if at least one of the elements of the list match the predicate,\n * `false` otherwise.\n *\n * Dispatches to the `any` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`\n *         otherwise.\n * @see R.all, R.none, R.transduce\n * @example\n *\n *      const lessThan0 = R.flip(R.lt)(0);\n *      const lessThan2 = R.flip(R.lt)(2);\n *      R.any(lessThan0)([1, 2]); //=> false\n *      R.any(lessThan2)([1, 2]); //=> true\n */\nvar any = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['any'], _internal_xany_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function any(fn, list) {\n  var idx = 0;\n  while (idx < list.length) {\n    if (fn(list[idx])) {\n      return true;\n    }\n    idx += 1;\n  }\n  return false;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (any);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/any.js?");

/***/ }),

/***/ "./node_modules/ramda/es/anyPass.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/anyPass.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck.js */ \"./node_modules/ramda/es/pluck.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n\n\n\n/**\n * Takes a list of predicates and returns a predicate that returns true for a\n * given list of arguments if at least one of the provided predicates is\n * satisfied by those arguments.\n *\n * The function returned is a curried function whose arity matches that of the\n * highest-arity predicate.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Logic\n * @sig [(*... -> Boolean)] -> (*... -> Boolean)\n * @param {Array} predicates An array of predicates to check\n * @return {Function} The combined predicate\n * @see R.allPass\n * @example\n *\n *      const isClub = R.propEq('suit', '♣');\n *      const isSpade = R.propEq('suit', '♠');\n *      const isBlackCard = R.anyPass([isClub, isSpade]);\n *\n *      isBlackCard({rank: '10', suit: '♣'}); //=> true\n *      isBlackCard({rank: 'Q', suit: '♠'}); //=> true\n *      isBlackCard({rank: 'Q', suit: '♦'}); //=> false\n */\nvar anyPass = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function anyPass(preds) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_reduce_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_max_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], 0, Object(_pluck_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])('length', preds)), function () {\n    var idx = 0;\n    var len = preds.length;\n    while (idx < len) {\n      if (preds[idx].apply(this, arguments)) {\n        return true;\n      }\n      idx += 1;\n    }\n    return false;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (anyPass);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/anyPass.js?");

/***/ }),

/***/ "./node_modules/ramda/es/ap.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/ap.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n\n\n/**\n * ap applies a list of functions to a list of values.\n *\n * Dispatches to the `ap` method of the second argument, if present. Also\n * treats curried functions as applicatives.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig [a -> b] -> [a] -> [b]\n * @sig Apply f => f (a -> b) -> f a -> f b\n * @sig (r -> a -> b) -> (r -> a) -> (r -> b)\n * @param {*} applyF\n * @param {*} applyX\n * @return {*}\n * @example\n *\n *      R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]\n *      R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> [\"tasty pizza\", \"tasty salad\", \"PIZZA\", \"SALAD\"]\n *\n *      // R.ap can also be used as S combinator\n *      // when only two functions are passed\n *      R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'\n * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]\n */\nvar ap = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function ap(applyF, applyX) {\n  return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {\n    return applyF(x)(applyX(x));\n  } : Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (acc, f) {\n    return Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(acc, Object(_map_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(f, applyX));\n  }, [], applyF);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ap);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/ap.js?");

/***/ }),

/***/ "./node_modules/ramda/es/aperture.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/aperture.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_aperture_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_aperture.js */ \"./node_modules/ramda/es/internal/_aperture.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xaperture_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xaperture.js */ \"./node_modules/ramda/es/internal/_xaperture.js\");\n\n\n\n\n\n/**\n * Returns a new list, composed of n-tuples of consecutive elements. If `n` is\n * greater than the length of the list, an empty list is returned.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category List\n * @sig Number -> [a] -> [[a]]\n * @param {Number} n The size of the tuples to create\n * @param {Array} list The list to split into `n`-length tuples\n * @return {Array} The resulting list of `n`-length tuples\n * @see R.transduce\n * @example\n *\n *      R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]]\n *      R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]]\n *      R.aperture(7, [1, 2, 3, 4, 5]); //=> []\n */\nvar aperture = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])([], _internal_xaperture_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _internal_aperture_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (aperture);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/aperture.js?");

/***/ }),

/***/ "./node_modules/ramda/es/append.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/append.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns a new list containing the contents of the given list, followed by\n * the given element.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The element to add to the end of the new list.\n * @param {Array} list The list of elements to add a new item to.\n *        list.\n * @return {Array} A new list containing the elements of the old list followed by `el`.\n * @see R.prepend\n * @example\n *\n *      R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']\n *      R.append('tests', []); //=> ['tests']\n *      R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]\n */\nvar append = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function append(el, list) {\n  return Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list, [el]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (append);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/append.js?");

/***/ }),

/***/ "./node_modules/ramda/es/apply.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/apply.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Applies function `fn` to the argument list `args`. This is useful for\n * creating a fixed-arity function from a variadic function. `fn` should be a\n * bound function if context is significant.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> a) -> [*] -> a\n * @param {Function} fn The function which will be called with `args`\n * @param {Array} args The arguments to call `fn` with\n * @return {*} result The result, equivalent to `fn(...args)`\n * @see R.call, R.unapply\n * @example\n *\n *      const nums = [1, 2, 3, -99, 42, 6, 7];\n *      R.apply(Math.max, nums); //=> 42\n * @symb R.apply(f, [a, b, c]) = f(a, b, c)\n */\nvar apply = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function apply(fn, args) {\n  return fn.apply(this, args);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (apply);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/apply.js?");

/***/ }),

/***/ "./node_modules/ramda/es/applySpec.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/applySpec.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _apply_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./apply.js */ \"./node_modules/ramda/es/apply.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluck.js */ \"./node_modules/ramda/es/pluck.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n/* harmony import */ var _values_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./values.js */ \"./node_modules/ramda/es/values.js\");\n\n\n\n\n\n\n\n\n\n// Use custom mapValues function to avoid issues with specs that include a \"map\" key and R.map\n// delegating calls to .map\nfunction mapValues(fn, obj) {\n  return Object(_keys_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(obj).reduce(function (acc, key) {\n    acc[key] = fn(obj[key]);\n    return acc;\n  }, {});\n}\n\n/**\n * Given a spec object recursively mapping properties to functions, creates a\n * function producing an object of the same structure, by mapping each property\n * to the result of calling its associated function with the supplied arguments.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category Function\n * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v})\n * @param {Object} spec an object recursively mapping properties to functions for\n *        producing the values for these properties.\n * @return {Function} A function that returns an object of the same structure\n * as `spec', with each property set to the value returned by calling its\n * associated function with the supplied arguments.\n * @see R.converge, R.juxt\n * @example\n *\n *      const getMetrics = R.applySpec({\n *        sum: R.add,\n *        nested: { mul: R.multiply }\n *      });\n *      getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } }\n * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } }\n */\nvar applySpec = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function applySpec(spec) {\n  spec = mapValues(function (v) {\n    return typeof v == 'function' ? v : applySpec(v);\n  }, spec);\n\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_reduce_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_max_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 0, Object(_pluck_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])('length', Object(_values_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(spec))), function () {\n    var args = arguments;\n    return mapValues(function (f) {\n      return Object(_apply_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(f, args);\n    }, spec);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (applySpec);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/applySpec.js?");

/***/ }),

/***/ "./node_modules/ramda/es/applyTo.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/applyTo.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Takes a value and applies a function to it.\n *\n * This function is also known as the `thrush` combinator.\n *\n * @func\n * @memberOf R\n * @since v0.25.0\n * @category Function\n * @sig a -> (a -> b) -> b\n * @param {*} x The value\n * @param {Function} f The function to apply\n * @return {*} The result of applying `f` to `x`\n * @example\n *\n *      const t42 = R.applyTo(42);\n *      t42(R.identity); //=> 42\n *      t42(R.add(1)); //=> 43\n */\nvar applyTo = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function applyTo(x, f) {\n  return f(x);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (applyTo);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/applyTo.js?");

/***/ }),

/***/ "./node_modules/ramda/es/ascend.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/ascend.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Makes an ascending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0`\n * @see R.descend\n * @example\n *\n *      const byAge = R.ascend(R.prop('age'));\n *      const people = [\n *        { name: 'Emma', age: 70 },\n *        { name: 'Peter', age: 78 },\n *        { name: 'Mikhail', age: 62 },\n *      ];\n *      const peopleByYoungestFirst = R.sort(byAge, people);\n *        //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\nvar ascend = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function ascend(fn, a, b) {\n  var aa = fn(a);\n  var bb = fn(b);\n  return aa < bb ? -1 : aa > bb ? 1 : 0;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ascend);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/ascend.js?");

/***/ }),

/***/ "./node_modules/ramda/es/assoc.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/assoc.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @sig String -> a -> {k: v} -> {k: v}\n * @param {String} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n *      R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\nvar assoc = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function assoc(prop, val, obj) {\n  var result = {};\n  for (var p in obj) {\n    result[p] = obj[p];\n  }\n  result[prop] = val;\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (assoc);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/assoc.js?");

/***/ }),

/***/ "./node_modules/ramda/es/assocPath.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/assocPath.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isInteger.js */ \"./node_modules/ramda/es/internal/_isInteger.js\");\n/* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./assoc.js */ \"./node_modules/ramda/es/assoc.js\");\n/* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isNil.js */ \"./node_modules/ramda/es/isNil.js\");\n\n\n\n\n\n\n\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n *      R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n *      // Any missing or non-object keys in path will be overridden\n *      R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\nvar assocPath = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function assocPath(path, val, obj) {\n  if (path.length === 0) {\n    return val;\n  }\n  var idx = path[0];\n  if (path.length > 1) {\n    var nextObj = !Object(_isNil_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(obj) && Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(idx, obj) ? obj[idx] : Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(path[1]) ? [] : {};\n    val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n  }\n  if (Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(idx) && Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj)) {\n    var arr = [].concat(obj);\n    arr[idx] = val;\n    return arr;\n  } else {\n    return Object(_assoc_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(idx, val, obj);\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (assocPath);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/assocPath.js?");

/***/ }),

/***/ "./node_modules/ramda/es/binary.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/binary.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry.js */ \"./node_modules/ramda/es/nAry.js\");\n\n\n\n/**\n * Wraps a function of any arity (including nullary) in a function that accepts\n * exactly 2 parameters. Any extraneous parameters will not be passed to the\n * supplied function.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Function\n * @sig (* -> c) -> (a, b -> c)\n * @param {Function} fn The function to wrap.\n * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of\n *         arity 2.\n * @see R.nAry, R.unary\n * @example\n *\n *      const takesThreeArgs = function(a, b, c) {\n *        return [a, b, c];\n *      };\n *      takesThreeArgs.length; //=> 3\n *      takesThreeArgs(1, 2, 3); //=> [1, 2, 3]\n *\n *      const takesTwoArgs = R.binary(takesThreeArgs);\n *      takesTwoArgs.length; //=> 2\n *      // Only 2 arguments are passed to the wrapped function\n *      takesTwoArgs(1, 2, 3); //=> [1, 2, undefined]\n * @symb R.binary(f)(a, b, c) = f(a, b)\n */\nvar binary = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function binary(fn) {\n  return Object(_nAry_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(2, fn);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (binary);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/binary.js?");

/***/ }),

/***/ "./node_modules/ramda/es/bind.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/bind.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n *      const log = R.bind(console.log, console);\n *      R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n *      // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\nvar bind = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function bind(fn, thisObj) {\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn.length, function () {\n    return fn.apply(thisObj, arguments);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (bind);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/bind.js?");

/***/ }),

/***/ "./node_modules/ramda/es/both.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/both.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ \"./node_modules/ramda/es/internal/_isFunction.js\");\n/* harmony import */ var _and_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./and.js */ \"./node_modules/ramda/es/and.js\");\n/* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lift.js */ \"./node_modules/ramda/es/lift.js\");\n\n\n\n\n\n/**\n * A function which calls the two provided functions and returns the `&&`\n * of the results.\n * It returns the result of the first function if it is false-y and the result\n * of the second function otherwise. Note that this is short-circuited,\n * meaning that the second function will not be invoked if the first returns a\n * false-y value.\n *\n * In addition to functions, `R.both` also accepts any fantasy-land compatible\n * applicative functor.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)\n * @param {Function} f A predicate\n * @param {Function} g Another predicate\n * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together.\n * @see R.and\n * @example\n *\n *      const gt10 = R.gt(R.__, 10)\n *      const lt20 = R.lt(R.__, 20)\n *      const f = R.both(gt10, lt20);\n *      f(15); //=> true\n *      f(30); //=> false\n *\n *      R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false)\n *      R.both([false, false, 'a'], [11]); //=> [false, false, 11]\n */\nvar both = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function both(f, g) {\n  return Object(_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(f) ? function _both() {\n    return f.apply(this, arguments) && g.apply(this, arguments);\n  } : Object(_lift_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_and_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(f, g);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (both);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/both.js?");

/***/ }),

/***/ "./node_modules/ramda/es/call.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/call.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curry.js */ \"./node_modules/ramda/es/curry.js\");\n\n\n/**\n * Returns the result of calling its first argument with the remaining\n * arguments. This is occasionally useful as a converging function for\n * [`R.converge`](#converge): the first branch can produce a function while the\n * remaining branches produce values to be passed to that function as its\n * arguments.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig (*... -> a),*... -> a\n * @param {Function} fn The function to apply to the remaining arguments.\n * @param {...*} args Any number of positional arguments.\n * @return {*}\n * @see R.apply\n * @example\n *\n *      R.call(R.add, 1, 2); //=> 3\n *\n *      const indentN = R.pipe(R.repeat(' '),\n *                           R.join(''),\n *                           R.replace(/^(?!$)/gm));\n *\n *      const format = R.converge(R.call, [\n *                                  R.pipe(R.prop('indent'), indentN),\n *                                  R.prop('value')\n *                              ]);\n *\n *      format({indent: 2, value: 'foo\\nbar\\nbaz\\n'}); //=> '  foo\\n  bar\\n  baz\\n'\n * @symb R.call(f, a, b) = f(a, b)\n */\nvar call = /*#__PURE__*/Object(_curry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function call(fn) {\n  return fn.apply(this, Array.prototype.slice.call(arguments, 1));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (call);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/call.js?");

/***/ }),

/***/ "./node_modules/ramda/es/chain.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/chain.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_makeFlat.js */ \"./node_modules/ramda/es/internal/_makeFlat.js\");\n/* harmony import */ var _internal_xchain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xchain.js */ \"./node_modules/ramda/es/internal/_xchain.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n\n\n\n/**\n * `chain` maps a function over a list and concatenates the results. `chain`\n * is also known as `flatMap` in some libraries.\n *\n * Dispatches to the `chain` method of the second argument, if present,\n * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain).\n *\n * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain m => (a -> m b) -> m a -> m b\n * @param {Function} fn The function to map with\n * @param {Array} list The list to map over\n * @return {Array} The result of flat-mapping `list` with `fn`\n * @example\n *\n *      const duplicate = n => [n, n];\n *      R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3]\n *\n *      R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1]\n */\nvar chain = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['fantasy-land/chain', 'chain'], _internal_xchain_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], function chain(fn, monad) {\n  if (typeof monad === 'function') {\n    return function (x) {\n      return fn(monad(x))(x);\n    };\n  }\n  return Object(_internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false)(Object(_map_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(fn, monad));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (chain);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/chain.js?");

/***/ }),

/***/ "./node_modules/ramda/es/clamp.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/clamp.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Restricts a number to be within a range.\n *\n * Also works for other ordered types such as Strings and Dates.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category Relation\n * @sig Ord a => a -> a -> a -> a\n * @param {Number} minimum The lower limit of the clamp (inclusive)\n * @param {Number} maximum The upper limit of the clamp (inclusive)\n * @param {Number} value Value to be clamped\n * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise\n * @example\n *\n *      R.clamp(1, 10, -5) // => 1\n *      R.clamp(1, 10, 15) // => 10\n *      R.clamp(1, 10, 4)  // => 4\n */\nvar clamp = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function clamp(min, max, value) {\n  if (min > max) {\n    throw new Error('min must not be greater than max in clamp(min, max, value)');\n  }\n  return value < min ? min : value > max ? max : value;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (clamp);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/clamp.js?");

/***/ }),

/***/ "./node_modules/ramda/es/clone.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/clone.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone.js */ \"./node_modules/ramda/es/internal/_clone.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n\n/**\n * Creates a deep copy of the value which may contain (nested) `Array`s and\n * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are\n * assigned by reference rather than copied\n *\n * Dispatches to a `clone` method if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n *      const objects = [{}, {}, {}];\n *      const objectsClone = R.clone(objects);\n *      objects === objectsClone; //=> false\n *      objects[0] === objectsClone[0]; //=> false\n */\nvar clone = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function clone(value) {\n  return value != null && typeof value.clone === 'function' ? value.clone() : Object(_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, [], [], true);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (clone);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/clone.js?");

/***/ }),

/***/ "./node_modules/ramda/es/comparator.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/comparator.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Makes a comparator function out of a function that reports whether the first\n * element is less than the second.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b) -> Boolean) -> ((a, b) -> Number)\n * @param {Function} pred A predicate function of arity two which will return `true` if the first argument\n * is less than the second, `false` otherwise\n * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`\n * @example\n *\n *      const byAge = R.comparator((a, b) => a.age < b.age);\n *      const people = [\n *        { name: 'Emma', age: 70 },\n *        { name: 'Peter', age: 78 },\n *        { name: 'Mikhail', age: 62 },\n *      ];\n *      const peopleByIncreasingAge = R.sort(byAge, people);\n *        //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\nvar comparator = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function comparator(pred) {\n  return function (a, b) {\n    return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;\n  };\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (comparator);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/comparator.js?");

/***/ }),

/***/ "./node_modules/ramda/es/complement.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/complement.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lift.js */ \"./node_modules/ramda/es/lift.js\");\n/* harmony import */ var _not_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./not.js */ \"./node_modules/ramda/es/not.js\");\n\n\n\n/**\n * Takes a function `f` and returns a function `g` such that if called with the same arguments\n * when `f` returns a \"truthy\" value, `g` returns `false` and when `f` returns a \"falsy\" value `g` returns `true`.\n *\n * `R.complement` may be applied to any functor\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> *) -> (*... -> Boolean)\n * @param {Function} f\n * @return {Function}\n * @see R.not\n * @example\n *\n *      const isNotNil = R.complement(R.isNil);\n *      isNil(null); //=> true\n *      isNotNil(null); //=> false\n *      isNil(7); //=> false\n *      isNotNil(7); //=> true\n */\nvar complement = /*#__PURE__*/Object(_lift_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_not_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (complement);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/complement.js?");

/***/ }),

/***/ "./node_modules/ramda/es/compose.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/compose.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return compose; });\n/* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipe.js */ \"./node_modules/ramda/es/pipe.js\");\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ramda/es/reverse.js\");\n\n\n\n/**\n * Performs right-to-left function composition. The rightmost function may have\n * any arity; the remaining functions must be unary.\n *\n * **Note:** The result of compose is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.pipe\n * @example\n *\n *      const classyGreeting = (firstName, lastName) => \"The name's \" + lastName + \", \" + firstName + \" \" + lastName\n *      const yellGreeting = R.compose(R.toUpper, classyGreeting);\n *      yellGreeting('James', 'Bond'); //=> \"THE NAME'S BOND, JAMES BOND\"\n *\n *      R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7\n *\n * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))\n */\nfunction compose() {\n  if (arguments.length === 0) {\n    throw new Error('compose requires at least one argument');\n  }\n  return _pipe_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, Object(_reverse_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arguments));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/compose.js?");

/***/ }),

/***/ "./node_modules/ramda/es/composeK.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/composeK.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return composeK; });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chain.js */ \"./node_modules/ramda/es/chain.js\");\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose.js */ \"./node_modules/ramda/es/compose.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n\n/**\n * Returns the right-to-left Kleisli composition of the provided functions,\n * each of which must return a value of a type supported by [`chain`](#chain).\n *\n * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Function\n * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.pipeK\n * @deprecated since v0.26.0\n * @example\n *\n *       //  get :: String -> Object -> Maybe *\n *       const get = R.curry((propName, obj) => Maybe(obj[propName]))\n *\n *       //  getStateCode :: Maybe String -> Maybe String\n *       const getStateCode = R.composeK(\n *         R.compose(Maybe.of, R.toUpper),\n *         get('state'),\n *         get('address'),\n *         get('user'),\n *       );\n *       getStateCode({\"user\":{\"address\":{\"state\":\"ny\"}}}); //=> Maybe.Just(\"NY\")\n *       getStateCode({}); //=> Maybe.Nothing()\n * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a)))\n */\nfunction composeK() {\n  if (arguments.length === 0) {\n    throw new Error('composeK requires at least one argument');\n  }\n  var init = Array.prototype.slice.call(arguments);\n  var last = init.pop();\n  return Object(_compose_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_compose_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, Object(_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_chain_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], init)), last);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/composeK.js?");

/***/ }),

/***/ "./node_modules/ramda/es/composeP.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/composeP.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return composeP; });\n/* harmony import */ var _pipeP_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipeP.js */ \"./node_modules/ramda/es/pipeP.js\");\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ramda/es/reverse.js\");\n\n\n\n/**\n * Performs right-to-left composition of one or more Promise-returning\n * functions. The rightmost function may have any arity; the remaining\n * functions must be unary.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z)\n * @param {...Function} functions The functions to compose\n * @return {Function}\n * @see R.pipeP\n * @deprecated since v0.26.0\n * @example\n *\n *      const db = {\n *        users: {\n *          JOE: {\n *            name: 'Joe',\n *            followers: ['STEVE', 'SUZY']\n *          }\n *        }\n *      }\n *\n *      // We'll pretend to do a db lookup which returns a promise\n *      const lookupUser = (userId) => Promise.resolve(db.users[userId])\n *      const lookupFollowers = (user) => Promise.resolve(user.followers)\n *      lookupUser('JOE').then(lookupFollowers)\n *\n *      //  followersForUser :: String -> Promise [UserId]\n *      const followersForUser = R.composeP(lookupFollowers, lookupUser);\n *      followersForUser('JOE').then(followers => console.log('Followers:', followers))\n *      // Followers: [\"STEVE\",\"SUZY\"]\n */\nfunction composeP() {\n  if (arguments.length === 0) {\n    throw new Error('composeP requires at least one argument');\n  }\n  return _pipeP_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, Object(_reverse_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arguments));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/composeP.js?");

/***/ }),

/***/ "./node_modules/ramda/es/composeWith.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/composeWith.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _pipeWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pipeWith.js */ \"./node_modules/ramda/es/pipeWith.js\");\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ramda/es/reverse.js\");\n\n\n\n\n/**\n * Performs right-to-left function composition using transforming function. The rightmost function may have\n * any arity; the remaining functions must be unary.\n *\n * **Note:** The result of compose is not automatically curried.\n *\n * @func\n * @memberOf R\n * @category Function\n * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.compose, R.pipeWith\n * @example\n *\n *      const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res));\n *\n *      composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2\n *      composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined\n *\n * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, f(i, ...args)))\n */\nvar composeWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function composeWith(xf, list) {\n  return _pipeWith_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, [xf, Object(_reverse_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(list)]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (composeWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/composeWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/concat.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/concat.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isFunction.js */ \"./node_modules/ramda/es/internal/_isFunction.js\");\n/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isString.js */ \"./node_modules/ramda/es/internal/_isString.js\");\n/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toString.js */ \"./node_modules/ramda/es/toString.js\");\n\n\n\n\n\n\n/**\n * Returns the result of concatenating the given lists or strings.\n *\n * Note: `R.concat` expects both arguments to be of the same type,\n * unlike the native `Array.prototype.concat` method. It will throw\n * an error if you `concat` an Array with a non-Array value.\n *\n * Dispatches to the `concat` method of the first argument, if present.\n * Can also concatenate two members of a [fantasy-land\n * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @sig String -> String -> String\n * @param {Array|String} firstList The first list\n * @param {Array|String} secondList The second list\n * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of\n * `secondList`.\n *\n * @example\n *\n *      R.concat('ABC', 'DEF'); // 'ABCDEF'\n *      R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n *      R.concat([], []); //=> []\n */\nvar concat = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function concat(a, b) {\n  if (Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a)) {\n    if (Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(b)) {\n      return a.concat(b);\n    }\n    throw new TypeError(Object(_toString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(b) + ' is not an array');\n  }\n  if (Object(_internal_isString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(a)) {\n    if (Object(_internal_isString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(b)) {\n      return a + b;\n    }\n    throw new TypeError(Object(_toString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(b) + ' is not a string');\n  }\n  if (a != null && Object(_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a['fantasy-land/concat'])) {\n    return a['fantasy-land/concat'](b);\n  }\n  if (a != null && Object(_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a.concat)) {\n    return a.concat(b);\n  }\n  throw new TypeError(Object(_toString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a) + ' does not have a method named \"concat\" or \"fantasy-land/concat\"');\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (concat);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/concat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/cond.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/cond.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n\n\n\n/**\n * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.\n * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments\n * to `fn` are applied to each of the predicates in turn until one returns a\n * \"truthy\" value, at which point `fn` returns the result of applying its\n * arguments to the corresponding transformer. If none of the predicates\n * matches, `fn` returns undefined.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Logic\n * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)\n * @param {Array} pairs A list of [predicate, transformer]\n * @return {Function}\n * @see R.ifElse, R.unless, R.when\n * @example\n *\n *      const fn = R.cond([\n *        [R.equals(0),   R.always('water freezes at 0°C')],\n *        [R.equals(100), R.always('water boils at 100°C')],\n *        [R.T,           temp => 'nothing special happens at ' + temp + '°C']\n *      ]);\n *      fn(0); //=> 'water freezes at 0°C'\n *      fn(50); //=> 'nothing special happens at 50°C'\n *      fn(100); //=> 'water boils at 100°C'\n */\nvar cond = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function cond(pairs) {\n  var arity = Object(_reduce_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_max_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 0, Object(_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (pair) {\n    return pair[0].length;\n  }, pairs));\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arity, function () {\n    var idx = 0;\n    while (idx < pairs.length) {\n      if (pairs[idx][0].apply(this, arguments)) {\n        return pairs[idx][1].apply(this, arguments);\n      }\n      idx += 1;\n    }\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (cond);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/cond.js?");

/***/ }),

/***/ "./node_modules/ramda/es/construct.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/construct.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _constructN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructN.js */ \"./node_modules/ramda/es/constructN.js\");\n\n\n\n/**\n * Wraps a constructor function inside a curried function that can be called\n * with the same arguments and returns the same type.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> {*}) -> (* -> {*})\n * @param {Function} fn The constructor function to wrap.\n * @return {Function} A wrapped, curried constructor function.\n * @see R.invoker\n * @example\n *\n *      // Constructor function\n *      function Animal(kind) {\n *        this.kind = kind;\n *      };\n *      Animal.prototype.sighting = function() {\n *        return \"It's a \" + this.kind + \"!\";\n *      }\n *\n *      const AnimalConstructor = R.construct(Animal)\n *\n *      // Notice we no longer need the 'new' keyword:\n *      AnimalConstructor('Pig'); //=> {\"kind\": \"Pig\", \"sighting\": function (){...}};\n *\n *      const animalTypes = [\"Lion\", \"Tiger\", \"Bear\"];\n *      const animalSighting = R.invoker(0, 'sighting');\n *      const sightNewAnimal = R.compose(animalSighting, AnimalConstructor);\n *      R.map(sightNewAnimal, animalTypes); //=> [\"It's a Lion!\", \"It's a Tiger!\", \"It's a Bear!\"]\n */\nvar construct = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function construct(Fn) {\n  return Object(_constructN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Fn.length, Fn);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (construct);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/construct.js?");

/***/ }),

/***/ "./node_modules/ramda/es/constructN.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/constructN.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curry.js */ \"./node_modules/ramda/es/curry.js\");\n/* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nAry.js */ \"./node_modules/ramda/es/nAry.js\");\n\n\n\n\n/**\n * Wraps a constructor function inside a curried function that can be called\n * with the same arguments and returns the same type. The arity of the function\n * returned is specified to allow using variadic constructor functions.\n *\n * @func\n * @memberOf R\n * @since v0.4.0\n * @category Function\n * @sig Number -> (* -> {*}) -> (* -> {*})\n * @param {Number} n The arity of the constructor function.\n * @param {Function} Fn The constructor function to wrap.\n * @return {Function} A wrapped, curried constructor function.\n * @example\n *\n *      // Variadic Constructor function\n *      function Salad() {\n *        this.ingredients = arguments;\n *      }\n *\n *      Salad.prototype.recipe = function() {\n *        const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients);\n *        return R.join('\\n', instructions);\n *      };\n *\n *      const ThreeLayerSalad = R.constructN(3, Salad);\n *\n *      // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments.\n *      const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup');\n *\n *      console.log(salad.recipe());\n *      // Add a dollop of Mayonnaise\n *      // Add a dollop of Potato Chips\n *      // Add a dollop of Ketchup\n */\nvar constructN = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function constructN(n, Fn) {\n  if (n > 10) {\n    throw new Error('Constructor with greater than ten arguments');\n  }\n  if (n === 0) {\n    return function () {\n      return new Fn();\n    };\n  }\n  return Object(_curry_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_nAry_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {\n    switch (arguments.length) {\n      case 1:\n        return new Fn($0);\n      case 2:\n        return new Fn($0, $1);\n      case 3:\n        return new Fn($0, $1, $2);\n      case 4:\n        return new Fn($0, $1, $2, $3);\n      case 5:\n        return new Fn($0, $1, $2, $3, $4);\n      case 6:\n        return new Fn($0, $1, $2, $3, $4, $5);\n      case 7:\n        return new Fn($0, $1, $2, $3, $4, $5, $6);\n      case 8:\n        return new Fn($0, $1, $2, $3, $4, $5, $6, $7);\n      case 9:\n        return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8);\n      case 10:\n        return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9);\n    }\n  }));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (constructN);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/constructN.js?");

/***/ }),

/***/ "./node_modules/ramda/es/contains.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/contains.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Works also with strings.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.includes\n * @deprecated since v0.26.0\n * @example\n *\n *      R.contains(3, [1, 2, 3]); //=> true\n *      R.contains(4, [1, 2, 3]); //=> false\n *      R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n *      R.contains([42], [[42]]); //=> true\n *      R.contains('ba', 'banana'); //=>true\n */\nvar contains = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_internal_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (contains);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/contains.js?");

/***/ }),

/***/ "./node_modules/ramda/es/converge.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/converge.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_map.js */ \"./node_modules/ramda/es/internal/_map.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluck.js */ \"./node_modules/ramda/es/pluck.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n\n\n\n\n/**\n * Accepts a converging function and a list of branching functions and returns\n * a new function. The arity of the new function is the same as the arity of\n * the longest branching function. When invoked, this new function is applied\n * to some arguments, and each branching function is applied to those same\n * arguments. The results of each branching function are passed as arguments\n * to the converging function to produce the return value.\n *\n * @func\n * @memberOf R\n * @since v0.4.2\n * @category Function\n * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z)\n * @param {Function} after A function. `after` will be invoked with the return values of\n *        `fn1` and `fn2` as its arguments.\n * @param {Array} functions A list of functions.\n * @return {Function} A new function.\n * @see R.useWith\n * @example\n *\n *      const average = R.converge(R.divide, [R.sum, R.length])\n *      average([1, 2, 3, 4, 5, 6, 7]) //=> 4\n *\n *      const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower])\n *      strangeConcat(\"Yodel\") //=> \"YODELyodel\"\n *\n * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b))\n */\nvar converge = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function converge(after, fns) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_reduce_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_max_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], 0, Object(_pluck_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])('length', fns)), function () {\n    var args = arguments;\n    var context = this;\n    return after.apply(context, Object(_internal_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (fn) {\n      return fn.apply(context, args);\n    }, fns));\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (converge);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/converge.js?");

/***/ }),

/***/ "./node_modules/ramda/es/countBy.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/countBy.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy.js */ \"./node_modules/ramda/es/reduceBy.js\");\n\n\n/**\n * Counts the elements of a list according to how many match each value of a\n * key generated by the supplied function. Returns an object mapping the keys\n * produced by `fn` to the number of occurrences in the list. Note that all\n * keys are coerced to strings because of how JavaScript objects work.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig (a -> String) -> [a] -> {*}\n * @param {Function} fn The function used to map values to keys.\n * @param {Array} list The list to count elements from.\n * @return {Object} An object mapping keys to number of occurrences in the list.\n * @example\n *\n *      const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2];\n *      R.countBy(Math.floor)(numbers);    //=> {'1': 3, '2': 2, '3': 1}\n *\n *      const letters = ['a', 'b', 'A', 'a', 'B', 'c'];\n *      R.countBy(R.toLower)(letters);   //=> {'a': 3, 'b': 2, 'c': 1}\n */\nvar countBy = /*#__PURE__*/Object(_reduceBy_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (acc, elem) {\n  return acc + 1;\n}, 0);\n/* harmony default export */ __webpack_exports__[\"default\"] = (countBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/countBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/curry.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/curry.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n *   - `g(1)(2)(3)`\n *   - `g(1)(2, 3)`\n *   - `g(1, 2)(3)`\n *   - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n *   - `g(1, 2, 3)`\n *   - `g(_, 2, 3)(1)`\n *   - `g(_, _, 3)(1)(2)`\n *   - `g(_, _, 3)(1, 2)`\n *   - `g(_, 2)(1)(3)`\n *   - `g(_, 2)(1, 3)`\n *   - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN, R.partial\n * @example\n *\n *      const addFourNumbers = (a, b, c, d) => a + b + c + d;\n *\n *      const curriedAddFourNumbers = R.curry(addFourNumbers);\n *      const f = curriedAddFourNumbers(1, 2);\n *      const g = f(3);\n *      g(4); //=> 10\n */\nvar curry = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function curry(fn) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn.length, fn);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (curry);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/curry.js?");

/***/ }),

/***/ "./node_modules/ramda/es/curryN.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/curryN.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_curryN.js */ \"./node_modules/ramda/es/internal/_curryN.js\");\n\n\n\n\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n *   - `g(1)(2)(3)`\n *   - `g(1)(2, 3)`\n *   - `g(1, 2)(3)`\n *   - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n *   - `g(1, 2, 3)`\n *   - `g(_, 2, 3)(1)`\n *   - `g(_, _, 3)(1)(2)`\n *   - `g(_, _, 3)(1, 2)`\n *   - `g(_, 2)(1)(3)`\n *   - `g(_, 2)(1, 3)`\n *   - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n *      const sumArgs = (...args) => R.sum(args);\n *\n *      const curriedAddFourNumbers = R.curryN(4, sumArgs);\n *      const f = curriedAddFourNumbers(1, 2);\n *      const g = f(3);\n *      g(4); //=> 10\n */\nvar curryN = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function curryN(length, fn) {\n  if (length === 1) {\n    return Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn);\n  }\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(length, Object(_internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(length, [], fn));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (curryN);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/curryN.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dec.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/dec.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/ramda/es/add.js\");\n\n\n/**\n * Decrements its argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Math\n * @sig Number -> Number\n * @param {Number} n\n * @return {Number} n - 1\n * @see R.inc\n * @example\n *\n *      R.dec(42); //=> 41\n */\nvar dec = /*#__PURE__*/Object(_add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(-1);\n/* harmony default export */ __webpack_exports__[\"default\"] = (dec);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dec.js?");

/***/ }),

/***/ "./node_modules/ramda/es/defaultTo.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/defaultTo.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns the second argument if it is not `null`, `undefined` or `NaN`;\n * otherwise the first argument is returned.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {a} default The default value.\n * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`.\n * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value\n * @example\n *\n *      const defaultTo42 = R.defaultTo(42);\n *\n *      defaultTo42(null);  //=> 42\n *      defaultTo42(undefined);  //=> 42\n *      defaultTo42(false);  //=> false\n *      defaultTo42('Ramda');  //=> 'Ramda'\n *      // parseInt('string') results in NaN\n *      defaultTo42(parseInt('string')); //=> 42\n */\nvar defaultTo = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function defaultTo(d, v) {\n  return v == null || v !== v ? d : v;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaultTo);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/defaultTo.js?");

/***/ }),

/***/ "./node_modules/ramda/es/descend.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/descend.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Makes a descending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0`\n * @see R.ascend\n * @example\n *\n *      const byAge = R.descend(R.prop('age'));\n *      const people = [\n *        { name: 'Emma', age: 70 },\n *        { name: 'Peter', age: 78 },\n *        { name: 'Mikhail', age: 62 },\n *      ];\n *      const peopleByOldestFirst = R.sort(byAge, people);\n *        //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }]\n */\nvar descend = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function descend(fn, a, b) {\n  var aa = fn(a);\n  var bb = fn(b);\n  return aa > bb ? -1 : aa < bb ? 1 : 0;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (descend);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/descend.js?");

/***/ }),

/***/ "./node_modules/ramda/es/difference.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/difference.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_Set.js */ \"./node_modules/ramda/es/internal/_Set.js\");\n\n\n\n/**\n * Finds the set (i.e. no duplicates) of all elements in the first list not\n * contained in the second list. Objects and Arrays are compared in terms of\n * value equality, not reference equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` that are not in `list2`.\n * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without\n * @example\n *\n *      R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2]\n *      R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5]\n *      R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}]\n */\nvar difference = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function difference(first, second) {\n  var out = [];\n  var idx = 0;\n  var firstLen = first.length;\n  var secondLen = second.length;\n  var toFilterOut = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n\n  for (var i = 0; i < secondLen; i += 1) {\n    toFilterOut.add(second[i]);\n  }\n\n  while (idx < firstLen) {\n    if (toFilterOut.add(first[idx])) {\n      out[out.length] = first[idx];\n    }\n    idx += 1;\n  }\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (difference);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/difference.js?");

/***/ }),

/***/ "./node_modules/ramda/es/differenceWith.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/differenceWith.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includesWith.js */ \"./node_modules/ramda/es/internal/_includesWith.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n\n/**\n * Finds the set (i.e. no duplicates) of all elements in the first list not\n * contained in the second list. Duplication is determined according to the\n * value returned by applying the supplied predicate to two list elements.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` that are not in `list2`.\n * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith\n * @example\n *\n *      const cmp = (x, y) => x.a === y.a;\n *      const l1 = [{a: 1}, {a: 2}, {a: 3}];\n *      const l2 = [{a: 3}, {a: 4}];\n *      R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}]\n */\nvar differenceWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function differenceWith(pred, first, second) {\n  var out = [];\n  var idx = 0;\n  var firstLen = first.length;\n  while (idx < firstLen) {\n    if (!Object(_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pred, first[idx], second) && !Object(_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pred, first[idx], out)) {\n      out.push(first[idx]);\n    }\n    idx += 1;\n  }\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (differenceWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/differenceWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dissoc.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/dissoc.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns a new object that does not contain a `prop` property.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Object\n * @sig String -> {k: v} -> {k: v}\n * @param {String} prop The name of the property to dissociate\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original but without the specified property\n * @see R.assoc, R.omit\n * @example\n *\n *      R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3}\n */\nvar dissoc = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function dissoc(prop, obj) {\n  var result = {};\n  for (var p in obj) {\n    result[p] = obj[p];\n  }\n  delete result[prop];\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (dissoc);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dissoc.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dissocPath.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/dissocPath.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ \"./node_modules/ramda/es/internal/_isInteger.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./assoc.js */ \"./node_modules/ramda/es/assoc.js\");\n/* harmony import */ var _dissoc_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dissoc.js */ \"./node_modules/ramda/es/dissoc.js\");\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/ramda/es/remove.js\");\n/* harmony import */ var _update_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./update.js */ \"./node_modules/ramda/es/update.js\");\n\n\n\n\n\n\n\n\n/**\n * Makes a shallow clone of an object, omitting the property at the given path.\n * Note that this copies and flattens prototype properties onto the new object\n * as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.11.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {k: v} -> {k: v}\n * @param {Array} path The path to the value to omit\n * @param {Object} obj The object to clone\n * @return {Object} A new object without the property at path\n * @see R.assocPath\n * @example\n *\n *      R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}}\n */\nvar dissocPath = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function dissocPath(path, obj) {\n  switch (path.length) {\n    case 0:\n      return obj;\n    case 1:\n      return Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(path[0]) && Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj) ? Object(_remove_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(path[0], 1, obj) : Object(_dissoc_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(path[0], obj);\n    default:\n      var head = path[0];\n      var tail = Array.prototype.slice.call(path, 1);\n      if (obj[head] == null) {\n        return obj;\n      } else if (Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(head) && Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj)) {\n        return Object(_update_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(head, dissocPath(tail, obj[head]), obj);\n      } else {\n        return Object(_assoc_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(head, dissocPath(tail, obj[head]), obj);\n      }\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (dissocPath);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dissocPath.js?");

/***/ }),

/***/ "./node_modules/ramda/es/divide.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/divide.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Divides two numbers. Equivalent to `a / b`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a The first value.\n * @param {Number} b The second value.\n * @return {Number} The result of `a / b`.\n * @see R.multiply\n * @example\n *\n *      R.divide(71, 100); //=> 0.71\n *\n *      const half = R.divide(R.__, 2);\n *      half(42); //=> 21\n *\n *      const reciprocal = R.divide(1);\n *      reciprocal(4);   //=> 0.25\n */\nvar divide = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function divide(a, b) {\n  return a / b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (divide);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/divide.js?");

/***/ }),

/***/ "./node_modules/ramda/es/drop.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/drop.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xdrop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdrop.js */ \"./node_modules/ramda/es/internal/_xdrop.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n\n/**\n * Returns all but the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `drop` method).\n *\n * Dispatches to the `drop` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*} A copy of list without the first `n` elements\n * @see R.take, R.transduce, R.dropLast, R.dropWhile\n * @example\n *\n *      R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz']\n *      R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz']\n *      R.drop(3, ['foo', 'bar', 'baz']); //=> []\n *      R.drop(4, ['foo', 'bar', 'baz']); //=> []\n *      R.drop(3, 'ramda');               //=> 'da'\n */\nvar drop = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['drop'], _internal_xdrop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function drop(n, xs) {\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.max(0, n), Infinity, xs);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (drop);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/drop.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dropLast.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/dropLast.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_dropLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLast.js */ \"./node_modules/ramda/es/internal/_dropLast.js\");\n/* harmony import */ var _internal_xdropLast_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLast.js */ \"./node_modules/ramda/es/internal/_xdropLast.js\");\n\n\n\n\n\n/**\n * Returns a list containing all but the last `n` elements of the given `list`.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n The number of elements of `list` to skip.\n * @param {Array} list The list of elements to consider.\n * @return {Array} A copy of the list with only the first `list.length - n` elements\n * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile\n * @example\n *\n *      R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']\n *      R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo']\n *      R.dropLast(3, ['foo', 'bar', 'baz']); //=> []\n *      R.dropLast(4, ['foo', 'bar', 'baz']); //=> []\n *      R.dropLast(3, 'ramda');               //=> 'ra'\n */\nvar dropLast = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xdropLast_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _internal_dropLast_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropLast);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dropLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dropLastWhile.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/dropLastWhile.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_dropLastWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLastWhile.js */ \"./node_modules/ramda/es/internal/_dropLastWhile.js\");\n/* harmony import */ var _internal_xdropLastWhile_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLastWhile.js */ \"./node_modules/ramda/es/internal/_xdropLastWhile.js\");\n\n\n\n\n\n/**\n * Returns a new list excluding all the tailing elements of a given list which\n * satisfy the supplied predicate function. It passes each value from the right\n * to the supplied predicate function, skipping elements until the predicate\n * function returns a `falsy` value. The predicate function is applied to one argument:\n * *(value)*.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} predicate The function to be called on each element\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`.\n * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile\n * @example\n *\n *      const lteThree = x => x <= 3;\n *\n *      R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4]\n *\n *      R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd'\n */\nvar dropLastWhile = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xdropLastWhile_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _internal_dropLastWhile_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropLastWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dropLastWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dropRepeats.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/dropRepeats.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith.js */ \"./node_modules/ramda/es/internal/_xdropRepeatsWith.js\");\n/* harmony import */ var _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropRepeatsWith.js */ \"./node_modules/ramda/es/dropRepeatsWith.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n\n\n\n/**\n * Returns a new list without any consecutively repeating elements.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} `list` without repeating elements.\n * @see R.transduce\n * @example\n *\n *     R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2]\n */\nvar dropRepeats = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], /*#__PURE__*/Object(_internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_equals_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), /*#__PURE__*/Object(_dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_equals_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])));\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropRepeats);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dropRepeats.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dropRepeatsWith.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/dropRepeatsWith.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith.js */ \"./node_modules/ramda/es/internal/_xdropRepeatsWith.js\");\n/* harmony import */ var _last_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./last.js */ \"./node_modules/ramda/es/last.js\");\n\n\n\n\n\n/**\n * Returns a new list without any consecutively repeating elements. Equality is\n * determined by applying the supplied predicate to each pair of consecutive elements. The\n * first element in a series of equal elements will be preserved.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig ((a, a) -> Boolean) -> [a] -> [a]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list The array to consider.\n * @return {Array} `list` without repeating elements.\n * @see R.transduce\n * @example\n *\n *      const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3];\n *      R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3]\n */\nvar dropRepeatsWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function dropRepeatsWith(pred, list) {\n  var result = [];\n  var idx = 1;\n  var len = list.length;\n  if (len !== 0) {\n    result[0] = list[0];\n    while (idx < len) {\n      if (!pred(Object(_last_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(result), list[idx])) {\n        result[result.length] = list[idx];\n      }\n      idx += 1;\n    }\n  }\n  return result;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropRepeatsWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dropRepeatsWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/dropWhile.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/dropWhile.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xdropWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropWhile.js */ \"./node_modules/ramda/es/internal/_xdropWhile.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n\n/**\n * Returns a new list excluding the leading elements of a given list which\n * satisfy the supplied predicate function. It passes each value to the supplied\n * predicate function, skipping elements while the predicate function returns\n * `true`. The predicate function is applied to one argument: *(value)*.\n *\n * Dispatches to the `dropWhile` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} fn The function called per iteration.\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array.\n * @see R.takeWhile, R.transduce, R.addIndex\n * @example\n *\n *      const lteTwo = x => x <= 2;\n *\n *      R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]\n *\n *      R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da'\n */\nvar dropWhile = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['dropWhile'], _internal_xdropWhile_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function dropWhile(pred, xs) {\n  var idx = 0;\n  var len = xs.length;\n  while (idx < len && pred(xs[idx])) {\n    idx += 1;\n  }\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(idx, Infinity, xs);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/dropWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/either.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/either.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ \"./node_modules/ramda/es/internal/_isFunction.js\");\n/* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lift.js */ \"./node_modules/ramda/es/lift.js\");\n/* harmony import */ var _or_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./or.js */ \"./node_modules/ramda/es/or.js\");\n\n\n\n\n\n/**\n * A function wrapping calls to the two functions in an `||` operation,\n * returning the result of the first function if it is truth-y and the result\n * of the second function otherwise. Note that this is short-circuited,\n * meaning that the second function will not be invoked if the first returns a\n * truth-y value.\n *\n * In addition to functions, `R.either` also accepts any fantasy-land compatible\n * applicative functor.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)\n * @param {Function} f a predicate\n * @param {Function} g another predicate\n * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together.\n * @see R.or\n * @example\n *\n *      const gt10 = x => x > 10;\n *      const even = x => x % 2 === 0;\n *      const f = R.either(gt10, even);\n *      f(101); //=> true\n *      f(8); //=> true\n *\n *      R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55)\n *      R.either([false, false, 'a'], [11]) // => [11, 11, \"a\"]\n */\nvar either = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function either(f, g) {\n  return Object(_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(f) ? function _either() {\n    return f.apply(this, arguments) || g.apply(this, arguments);\n  } : Object(_lift_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_or_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(f, g);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (either);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/either.js?");

/***/ }),

/***/ "./node_modules/ramda/es/empty.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/empty.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArguments.js */ \"./node_modules/ramda/es/internal/_isArguments.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject.js */ \"./node_modules/ramda/es/internal/_isObject.js\");\n/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_isString.js */ \"./node_modules/ramda/es/internal/_isString.js\");\n\n\n\n\n\n\n/**\n * Returns the empty value of its argument's type. Ramda defines the empty\n * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other\n * types are supported if they define `<Type>.empty`,\n * `<Type>.prototype.empty` or implement the\n * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).\n *\n * Dispatches to the `empty` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig a -> a\n * @param {*} x\n * @return {*}\n * @example\n *\n *      R.empty(Just(42));      //=> Nothing()\n *      R.empty([1, 2, 3]);     //=> []\n *      R.empty('unicorns');    //=> ''\n *      R.empty({x: 1, y: 2});  //=> {}\n */\nvar empty = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function empty(x) {\n  return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x) ? [] : Object(_internal_isString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x) ? '' : Object(_internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(x) ? {} : Object(_internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(x) ? function () {\n    return arguments;\n  }() : void 0 // else\n  ;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (empty);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/empty.js?");

/***/ }),

/***/ "./node_modules/ramda/es/endsWith.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/endsWith.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n/* harmony import */ var _takeLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast.js */ \"./node_modules/ramda/es/takeLast.js\");\n\n\n\n\n/**\n * Checks if a list ends with the provided sublist.\n *\n * Similarly, checks if a string ends with the provided substring.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category List\n * @sig [a] -> [a] -> Boolean\n * @sig String -> String -> Boolean\n * @param {*} suffix\n * @param {*} list\n * @return {Boolean}\n * @see R.startsWith\n * @example\n *\n *      R.endsWith('c', 'abc')                //=> true\n *      R.endsWith('b', 'abc')                //=> false\n *      R.endsWith(['c'], ['a', 'b', 'c'])    //=> true\n *      R.endsWith(['b'], ['a', 'b', 'c'])    //=> false\n */\nvar endsWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (suffix, list) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_takeLast_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(suffix.length, list), suffix);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (endsWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/endsWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/eqBy.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/eqBy.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n/**\n * Takes a function and two values in its domain and returns `true` if the\n * values map to the same value in the codomain; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Relation\n * @sig (a -> b) -> a -> a -> Boolean\n * @param {Function} f\n * @param {*} x\n * @param {*} y\n * @return {Boolean}\n * @example\n *\n *      R.eqBy(Math.abs, 5, -5); //=> true\n */\nvar eqBy = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function eqBy(f, x, y) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(f(x), f(y));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (eqBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/eqBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/eqProps.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/eqProps.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n/**\n * Reports whether two objects have the same value, in [`R.equals`](#equals)\n * terms, for the specified property. Useful as a curried predicate.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig k -> {k: v} -> {k: v} -> Boolean\n * @param {String} prop The name of the property to compare\n * @param {Object} obj1\n * @param {Object} obj2\n * @return {Boolean}\n *\n * @example\n *\n *      const o1 = { a: 1, b: 2, c: 3, d: 4 };\n *      const o2 = { a: 10, b: 20, c: 3, d: 40 };\n *      R.eqProps('a', o1, o2); //=> false\n *      R.eqProps('c', o1, o2); //=> true\n */\nvar eqProps = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function eqProps(prop, obj1, obj2) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj1[prop], obj2[prop]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (eqProps);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/eqProps.js?");

/***/ }),

/***/ "./node_modules/ramda/es/equals.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/equals.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_equals.js */ \"./node_modules/ramda/es/internal/_equals.js\");\n\n\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n *      R.equals(1, 1); //=> true\n *      R.equals(1, '1'); //=> false\n *      R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n *      const a = {}; a.v = a;\n *      const b = {}; b.v = b;\n *      R.equals(a, b); //=> true\n */\nvar equals = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function equals(a, b) {\n  return Object(_internal_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a, b, [], []);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (equals);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/equals.js?");

/***/ }),

/***/ "./node_modules/ramda/es/evolve.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/evolve.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Creates a new object by recursively evolving a shallow copy of `object`,\n * according to the `transformation` functions. All non-primitive properties\n * are copied by reference.\n *\n * A `transformation` function will not be invoked if its corresponding key\n * does not exist in the evolved object.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig {k: (v -> v)} -> {k: v} -> {k: v}\n * @param {Object} transformations The object specifying transformation functions to apply\n *        to the object.\n * @param {Object} object The object to be transformed.\n * @return {Object} The transformed object.\n * @example\n *\n *      const tomato = {firstName: '  Tomato ', data: {elapsed: 100, remaining: 1400}, id:123};\n *      const transformations = {\n *        firstName: R.trim,\n *        lastName: R.trim, // Will not get invoked.\n *        data: {elapsed: R.add(1), remaining: R.add(-1)}\n *      };\n *      R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123}\n */\nvar evolve = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function evolve(transformations, object) {\n  var result = object instanceof Array ? [] : {};\n  var transformation, key, type;\n  for (key in object) {\n    transformation = transformations[key];\n    type = typeof transformation;\n    result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key];\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (evolve);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/evolve.js?");

/***/ }),

/***/ "./node_modules/ramda/es/filter.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/filter.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter.js */ \"./node_modules/ramda/es/internal/_filter.js\");\n/* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject.js */ \"./node_modules/ramda/es/internal/_isObject.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_xfilter.js */ \"./node_modules/ramda/es/internal/_xfilter.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n\n\n\n\n\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n *      const isEven = n => n % 2 === 0;\n *\n *      R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n *      R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar filter = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['filter'], _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"], function (pred, filterable) {\n  return Object(_internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(filterable) ? Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function (acc, key) {\n    if (pred(filterable[key])) {\n      acc[key] = filterable[key];\n    }\n    return acc;\n  }, {}, Object(_keys_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(filterable)) :\n  // else\n  Object(_internal_filter_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(pred, filterable);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (filter);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/filter.js?");

/***/ }),

/***/ "./node_modules/ramda/es/find.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/find.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xfind_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfind.js */ \"./node_modules/ramda/es/internal/_xfind.js\");\n\n\n\n\n/**\n * Returns the first element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Dispatches to the `find` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n *        desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n *      const xs = [{a: 1}, {a: 2}, {a: 3}];\n *      R.find(R.propEq('a', 2))(xs); //=> {a: 2}\n *      R.find(R.propEq('a', 4))(xs); //=> undefined\n */\nvar find = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['find'], _internal_xfind_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function find(fn, list) {\n  var idx = 0;\n  var len = list.length;\n  while (idx < len) {\n    if (fn(list[idx])) {\n      return list[idx];\n    }\n    idx += 1;\n  }\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (find);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/find.js?");

/***/ }),

/***/ "./node_modules/ramda/es/findIndex.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/findIndex.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xfindIndex_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindIndex.js */ \"./node_modules/ramda/es/internal/_xfindIndex.js\");\n\n\n\n\n/**\n * Returns the index of the first element of the list which matches the\n * predicate, or `-1` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> Number\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Number} The index of the element found, or `-1`.\n * @see R.transduce\n * @example\n *\n *      const xs = [{a: 1}, {a: 2}, {a: 3}];\n *      R.findIndex(R.propEq('a', 2))(xs); //=> 1\n *      R.findIndex(R.propEq('a', 4))(xs); //=> -1\n */\nvar findIndex = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xfindIndex_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function findIndex(fn, list) {\n  var idx = 0;\n  var len = list.length;\n  while (idx < len) {\n    if (fn(list[idx])) {\n      return idx;\n    }\n    idx += 1;\n  }\n  return -1;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (findIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/findIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/findLast.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/findLast.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xfindLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLast.js */ \"./node_modules/ramda/es/internal/_xfindLast.js\");\n\n\n\n\n/**\n * Returns the last element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n *      const xs = [{a: 1, b: 0}, {a:1, b: 1}];\n *      R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1}\n *      R.findLast(R.propEq('a', 4))(xs); //=> undefined\n */\nvar findLast = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xfindLast_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function findLast(fn, list) {\n  var idx = list.length - 1;\n  while (idx >= 0) {\n    if (fn(list[idx])) {\n      return list[idx];\n    }\n    idx -= 1;\n  }\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (findLast);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/findLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/findLastIndex.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/findLastIndex.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xfindLastIndex_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLastIndex.js */ \"./node_modules/ramda/es/internal/_xfindLastIndex.js\");\n\n\n\n\n/**\n * Returns the index of the last element of the list which matches the\n * predicate, or `-1` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> Number\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Number} The index of the element found, or `-1`.\n * @see R.transduce\n * @example\n *\n *      const xs = [{a: 1, b: 0}, {a:1, b: 1}];\n *      R.findLastIndex(R.propEq('a', 1))(xs); //=> 1\n *      R.findLastIndex(R.propEq('a', 4))(xs); //=> -1\n */\nvar findLastIndex = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xfindLastIndex_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function findLastIndex(fn, list) {\n  var idx = list.length - 1;\n  while (idx >= 0) {\n    if (fn(list[idx])) {\n      return idx;\n    }\n    idx -= 1;\n  }\n  return -1;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (findLastIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/findLastIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/flatten.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/flatten.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_makeFlat.js */ \"./node_modules/ramda/es/internal/_makeFlat.js\");\n\n\n\n/**\n * Returns a new list by pulling every item out of it (and all its sub-arrays)\n * and putting them in a new array, depth-first.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b]\n * @param {Array} list The array to consider.\n * @return {Array} The flattened list.\n * @see R.unnest\n * @example\n *\n *      R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);\n *      //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n */\nvar flatten = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(true));\n/* harmony default export */ __webpack_exports__[\"default\"] = (flatten);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/flatten.js?");

/***/ }),

/***/ "./node_modules/ramda/es/flip.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/flip.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n *      const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n *      mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n *      R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\nvar flip = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function flip(fn) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn.length, function (a, b) {\n    var args = Array.prototype.slice.call(arguments, 0);\n    args[0] = b;\n    args[1] = a;\n    return fn.apply(this, args);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (flip);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/flip.js?");

/***/ }),

/***/ "./node_modules/ramda/es/forEach.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/forEach.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ \"./node_modules/ramda/es/internal/_checkForMethod.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Iterate over an input `list`, calling a provided function `fn` for each\n * element in the list.\n *\n * `fn` receives one argument: *(value)*.\n *\n * Note: `R.forEach` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.forEach` method. For more\n * details on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n *\n * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns\n * the original array. In some libraries this function is named `each`.\n *\n * Dispatches to the `forEach` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> *) -> [a] -> [a]\n * @param {Function} fn The function to invoke. Receives one argument, `value`.\n * @param {Array} list The list to iterate over.\n * @return {Array} The original list.\n * @see R.addIndex\n * @example\n *\n *      const printXPlusFive = x => console.log(x + 5);\n *      R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]\n *      // logs 6\n *      // logs 7\n *      // logs 8\n * @symb R.forEach(f, [a, b, c]) = [a, b, c]\n */\nvar forEach = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('forEach', function forEach(fn, list) {\n  var len = list.length;\n  var idx = 0;\n  while (idx < len) {\n    fn(list[idx]);\n    idx += 1;\n  }\n  return list;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (forEach);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/forEach.js?");

/***/ }),

/***/ "./node_modules/ramda/es/forEachObjIndexed.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/forEachObjIndexed.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n/**\n * Iterate over an input `object`, calling a provided function `fn` for each\n * key and value in the object.\n *\n * `fn` receives three argument: *(value, key, obj)*.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Object\n * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a\n * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`.\n * @param {Object} obj The object to iterate over.\n * @return {Object} The original object.\n * @example\n *\n *      const printKeyConcatValue = (value, key) => console.log(key + ':' + value);\n *      R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2}\n *      // logs x:1\n *      // logs y:2\n * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b}\n */\nvar forEachObjIndexed = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function forEachObjIndexed(fn, obj) {\n  var keyList = Object(_keys_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj);\n  var idx = 0;\n  while (idx < keyList.length) {\n    var key = keyList[idx];\n    fn(obj[key], key, obj);\n    idx += 1;\n  }\n  return obj;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (forEachObjIndexed);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/forEachObjIndexed.js?");

/***/ }),

/***/ "./node_modules/ramda/es/fromPairs.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/fromPairs.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Creates a new object from a list key-value pairs. If a key appears in\n * multiple pairs, the rightmost pair is included in the object.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig [[k,v]] -> {k: v}\n * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object.\n * @return {Object} The object made by pairing up `keys` and `values`.\n * @see R.toPairs, R.pair\n * @example\n *\n *      R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3}\n */\nvar fromPairs = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function fromPairs(pairs) {\n  var result = {};\n  var idx = 0;\n  while (idx < pairs.length) {\n    result[pairs[idx][0]] = pairs[idx][1];\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromPairs);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/fromPairs.js?");

/***/ }),

/***/ "./node_modules/ramda/es/groupBy.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/groupBy.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ \"./node_modules/ramda/es/internal/_checkForMethod.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduceBy.js */ \"./node_modules/ramda/es/reduceBy.js\");\n\n\n\n\n/**\n * Splits a list into sub-lists stored in an object, based on the result of\n * calling a String-returning function on each element, and grouping the\n * results according to values returned.\n *\n * Dispatches to the `groupBy` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> String) -> [a] -> {String: [a]}\n * @param {Function} fn Function :: a -> String\n * @param {Array} list The array to group\n * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements\n *         that produced that key when passed to `fn`.\n * @see R.reduceBy, R.transduce\n * @example\n *\n *      const byGrade = R.groupBy(function(student) {\n *        const score = student.score;\n *        return score < 65 ? 'F' :\n *               score < 70 ? 'D' :\n *               score < 80 ? 'C' :\n *               score < 90 ? 'B' : 'A';\n *      });\n *      const students = [{name: 'Abby', score: 84},\n *                      {name: 'Eddy', score: 58},\n *                      // ...\n *                      {name: 'Jack', score: 69}];\n *      byGrade(students);\n *      // {\n *      //   'A': [{name: 'Dianne', score: 99}],\n *      //   'B': [{name: 'Abby', score: 84}]\n *      //   // ...,\n *      //   'F': [{name: 'Eddy', score: 58}]\n *      // }\n */\nvar groupBy = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('groupBy', /*#__PURE__*/Object(_reduceBy_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (acc, item) {\n  if (acc == null) {\n    acc = [];\n  }\n  acc.push(item);\n  return acc;\n}, null)));\n/* harmony default export */ __webpack_exports__[\"default\"] = (groupBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/groupBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/groupWith.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/groupWith.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Takes a list and returns a list of lists where each sublist's elements are\n * all satisfied pairwise comparison according to the provided function.\n * Only adjacent elements are passed to the comparison function.\n *\n * @func\n * @memberOf R\n * @since v0.21.0\n * @category List\n * @sig ((a, a) → Boolean) → [a] → [[a]]\n * @param {Function} fn Function for determining whether two given (adjacent)\n *        elements should be in the same group\n * @param {Array} list The array to group. Also accepts a string, which will be\n *        treated as a list of characters.\n * @return {List} A list that contains sublists of elements,\n *         whose concatenations are equal to the original list.\n * @example\n *\n * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21])\n * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]]\n *\n * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21])\n * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]]\n *\n * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21])\n * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]]\n *\n * R.groupWith(R.eqBy(isVowel), 'aestiou')\n * //=> ['ae', 'st', 'iou']\n */\nvar groupWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (fn, list) {\n  var res = [];\n  var idx = 0;\n  var len = list.length;\n  while (idx < len) {\n    var nextidx = idx + 1;\n    while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) {\n      nextidx += 1;\n    }\n    res.push(list.slice(idx, nextidx));\n    idx = nextidx;\n  }\n  return res;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (groupWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/groupWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/gt.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/gt.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if the first argument is greater than the second; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @see R.lt\n * @example\n *\n *      R.gt(2, 1); //=> true\n *      R.gt(2, 2); //=> false\n *      R.gt(2, 3); //=> false\n *      R.gt('a', 'z'); //=> false\n *      R.gt('z', 'a'); //=> true\n */\nvar gt = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function gt(a, b) {\n  return a > b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (gt);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/gt.js?");

/***/ }),

/***/ "./node_modules/ramda/es/gte.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/gte.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if the first argument is greater than or equal to the second;\n * `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {Number} a\n * @param {Number} b\n * @return {Boolean}\n * @see R.lte\n * @example\n *\n *      R.gte(2, 1); //=> true\n *      R.gte(2, 2); //=> true\n *      R.gte(2, 3); //=> false\n *      R.gte('a', 'z'); //=> false\n *      R.gte('z', 'a'); //=> true\n */\nvar gte = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function gte(a, b) {\n  return a >= b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (gte);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/gte.js?");

/***/ }),

/***/ "./node_modules/ramda/es/has.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/has.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _hasPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hasPath.js */ \"./node_modules/ramda/es/hasPath.js\");\n\n\n\n/**\n * Returns whether or not an object has an own property with the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n *      const hasName = R.has('name');\n *      hasName({name: 'alice'});   //=> true\n *      hasName({name: 'bob'});     //=> true\n *      hasName({});                //=> false\n *\n *      const point = {x: 0, y: 0};\n *      const pointHas = R.has(R.__, point);\n *      pointHas('x');  //=> true\n *      pointHas('y');  //=> true\n *      pointHas('z');  //=> false\n */\nvar has = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function has(prop, obj) {\n  return Object(_hasPath_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([prop], obj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (has);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/has.js?");

/***/ }),

/***/ "./node_modules/ramda/es/hasIn.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/hasIn.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns whether or not an object or its prototype chain has a property with\n * the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n *      function Rectangle(width, height) {\n *        this.width = width;\n *        this.height = height;\n *      }\n *      Rectangle.prototype.area = function() {\n *        return this.width * this.height;\n *      };\n *\n *      const square = new Rectangle(2, 2);\n *      R.hasIn('width', square);  //=> true\n *      R.hasIn('area', square);  //=> true\n */\nvar hasIn = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function hasIn(prop, obj) {\n  return prop in obj;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (hasIn);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/hasIn.js?");

/***/ }),

/***/ "./node_modules/ramda/es/hasPath.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/hasPath.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n *      R.hasPath(['a', 'b'], {a: {b: 2}});         // => true\n *      R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n *      R.hasPath(['a', 'b'], {a: {c: 2}});         // => false\n *      R.hasPath(['a', 'b'], {});                  // => false\n */\nvar hasPath = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function hasPath(_path, obj) {\n  if (_path.length === 0) {\n    return false;\n  }\n  var val = obj;\n  var idx = 0;\n  while (idx < _path.length) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_path[idx], val)) {\n      val = val[_path[idx]];\n      idx += 1;\n    } else {\n      return false;\n    }\n  }\n  return true;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (hasPath);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/hasPath.js?");

/***/ }),

/***/ "./node_modules/ramda/es/head.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/head.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth.js */ \"./node_modules/ramda/es/nth.js\");\n\n\n/**\n * Returns the first element of the given list or string. In some libraries\n * this function is named `first`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {Array|String} list\n * @return {*}\n * @see R.tail, R.init, R.last\n * @example\n *\n *      R.head(['fi', 'fo', 'fum']); //=> 'fi'\n *      R.head([]); //=> undefined\n *\n *      R.head('abc'); //=> 'a'\n *      R.head(''); //=> ''\n */\nvar head = /*#__PURE__*/Object(_nth_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0);\n/* harmony default export */ __webpack_exports__[\"default\"] = (head);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/head.js?");

/***/ }),

/***/ "./node_modules/ramda/es/identical.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/identical.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_objectIs_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectIs.js */ \"./node_modules/ramda/es/internal/_objectIs.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns true if its arguments are identical, false otherwise. Values are\n * identical if they reference the same memory. `NaN` is identical to `NaN`;\n * `0` and `-0` are not identical.\n *\n * Note this is merely a curried version of ES6 `Object.is`.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n *      const o = {};\n *      R.identical(o, o); //=> true\n *      R.identical(1, 1); //=> true\n *      R.identical(1, '1'); //=> false\n *      R.identical([], []); //=> false\n *      R.identical(0, -0); //=> false\n *      R.identical(NaN, NaN); //=> true\n */\nvar identical = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_internal_objectIs_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (identical);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/identical.js?");

/***/ }),

/***/ "./node_modules/ramda/es/identity.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/identity.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_identity.js */ \"./node_modules/ramda/es/internal/_identity.js\");\n\n\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n *      R.identity(1); //=> 1\n *\n *      const obj = {};\n *      R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\nvar identity = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_internal_identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (identity);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/identity.js?");

/***/ }),

/***/ "./node_modules/ramda/es/ifElse.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/ifElse.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new function that will process either the `onTrue` or the `onFalse`\n *                    function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when, R.cond\n * @example\n *\n *      const incCount = R.ifElse(\n *        R.has('count'),\n *        R.over(R.lensProp('count'), R.inc),\n *        R.assoc('count', 1)\n *      );\n *      incCount({});           //=> { count: 1 }\n *      incCount({ count: 1 }); //=> { count: 2 }\n */\nvar ifElse = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function ifElse(condition, onTrue, onFalse) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n    return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ifElse);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/ifElse.js?");

/***/ }),

/***/ "./node_modules/ramda/es/inc.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/inc.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/ramda/es/add.js\");\n\n\n/**\n * Increments its argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Math\n * @sig Number -> Number\n * @param {Number} n\n * @return {Number} n + 1\n * @see R.dec\n * @example\n *\n *      R.inc(42); //=> 43\n */\nvar inc = /*#__PURE__*/Object(_add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1);\n/* harmony default export */ __webpack_exports__[\"default\"] = (inc);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/inc.js?");

/***/ }),

/***/ "./node_modules/ramda/es/includes.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/includes.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Works also with strings.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n *      R.includes(3, [1, 2, 3]); //=> true\n *      R.includes(4, [1, 2, 3]); //=> false\n *      R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n *      R.includes([42], [[42]]); //=> true\n *      R.includes('ba', 'banana'); //=>true\n */\nvar includes = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_internal_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (includes);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/includes.js?");

/***/ }),

/***/ "./node_modules/ramda/es/index.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/index.js ***!
  \****************************************/
/*! exports provided: F, T, __, add, addIndex, adjust, all, allPass, always, and, any, anyPass, ap, aperture, append, apply, applySpec, applyTo, ascend, assoc, assocPath, binary, bind, both, call, chain, clamp, clone, comparator, complement, compose, composeK, composeP, composeWith, concat, cond, construct, constructN, contains, converge, countBy, curry, curryN, dec, defaultTo, descend, difference, differenceWith, dissoc, dissocPath, divide, drop, dropLast, dropLastWhile, dropRepeats, dropRepeatsWith, dropWhile, either, empty, endsWith, eqBy, eqProps, equals, evolve, filter, find, findIndex, findLast, findLastIndex, flatten, flip, forEach, forEachObjIndexed, fromPairs, groupBy, groupWith, gt, gte, has, hasIn, hasPath, head, identical, identity, ifElse, inc, includes, indexBy, indexOf, init, innerJoin, insert, insertAll, intersection, intersperse, into, invert, invertObj, invoker, is, isEmpty, isNil, join, juxt, keys, keysIn, last, lastIndexOf, length, lens, lensIndex, lensPath, lensProp, lift, liftN, lt, lte, map, mapAccum, mapAccumRight, mapObjIndexed, match, mathMod, max, maxBy, mean, median, memoizeWith, merge, mergeAll, mergeDeepLeft, mergeDeepRight, mergeDeepWith, mergeDeepWithKey, mergeLeft, mergeRight, mergeWith, mergeWithKey, min, minBy, modulo, move, multiply, nAry, negate, none, not, nth, nthArg, o, objOf, of, omit, once, or, otherwise, over, pair, partial, partialRight, partition, path, pathEq, pathOr, pathSatisfies, pick, pickAll, pickBy, pipe, pipeK, pipeP, pipeWith, pluck, prepend, product, project, prop, propEq, propIs, propOr, propSatisfies, props, range, reduce, reduceBy, reduceRight, reduceWhile, reduced, reject, remove, repeat, replace, reverse, scan, sequence, set, slice, sort, sortBy, sortWith, split, splitAt, splitEvery, splitWhen, startsWith, subtract, sum, symmetricDifference, symmetricDifferenceWith, tail, take, takeLast, takeLastWhile, takeWhile, tap, test, then, times, toLower, toPairs, toPairsIn, toString, toUpper, transduce, transpose, traverse, trim, tryCatch, type, unapply, unary, uncurryN, unfold, union, unionWith, uniq, uniqBy, uniqWith, unless, unnest, until, update, useWith, values, valuesIn, view, when, where, whereEq, without, xprod, zip, zipObj, zipWith, thunkify */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _F_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F.js */ \"./node_modules/ramda/es/F.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"F\", function() { return _F_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _T_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./T.js */ \"./node_modules/ramda/es/T.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"T\", function() { return _T_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./__.js */ \"./node_modules/ramda/es/__.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"__\", function() { return _js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./add.js */ \"./node_modules/ramda/es/add.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return _add_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _addIndex_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addIndex.js */ \"./node_modules/ramda/es/addIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"addIndex\", function() { return _addIndex_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _adjust_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./adjust.js */ \"./node_modules/ramda/es/adjust.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"adjust\", function() { return _adjust_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _all_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./all.js */ \"./node_modules/ramda/es/all.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"all\", function() { return _all_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _allPass_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./allPass.js */ \"./node_modules/ramda/es/allPass.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"allPass\", function() { return _allPass_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./always.js */ \"./node_modules/ramda/es/always.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"always\", function() { return _always_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _and_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./and.js */ \"./node_modules/ramda/es/and.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"and\", function() { return _and_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _any_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./any.js */ \"./node_modules/ramda/es/any.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"any\", function() { return _any_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _anyPass_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./anyPass.js */ \"./node_modules/ramda/es/anyPass.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"anyPass\", function() { return _anyPass_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ap.js */ \"./node_modules/ramda/es/ap.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ap\", function() { return _ap_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _aperture_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./aperture.js */ \"./node_modules/ramda/es/aperture.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"aperture\", function() { return _aperture_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./append.js */ \"./node_modules/ramda/es/append.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"append\", function() { return _append_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _apply_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./apply.js */ \"./node_modules/ramda/es/apply.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"apply\", function() { return _apply_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _applySpec_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applySpec.js */ \"./node_modules/ramda/es/applySpec.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"applySpec\", function() { return _applySpec_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _applyTo_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applyTo.js */ \"./node_modules/ramda/es/applyTo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"applyTo\", function() { return _applyTo_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _ascend_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ascend.js */ \"./node_modules/ramda/es/ascend.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ascend\", function() { return _ascend_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./assoc.js */ \"./node_modules/ramda/es/assoc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"assoc\", function() { return _assoc_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _assocPath_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./assocPath.js */ \"./node_modules/ramda/es/assocPath.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"assocPath\", function() { return _assocPath_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _binary_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./binary.js */ \"./node_modules/ramda/es/binary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"binary\", function() { return _binary_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _bind_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./bind.js */ \"./node_modules/ramda/es/bind.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bind\", function() { return _bind_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _both_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./both.js */ \"./node_modules/ramda/es/both.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"both\", function() { return _both_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./call.js */ \"./node_modules/ramda/es/call.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"call\", function() { return _call_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./chain.js */ \"./node_modules/ramda/es/chain.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chain\", function() { return _chain_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _clamp_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./clamp.js */ \"./node_modules/ramda/es/clamp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clamp\", function() { return _clamp_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone.js */ \"./node_modules/ramda/es/clone.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return _clone_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony import */ var _comparator_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./comparator.js */ \"./node_modules/ramda/es/comparator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"comparator\", function() { return _comparator_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _complement_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./complement.js */ \"./node_modules/ramda/es/complement.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"complement\", function() { return _complement_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./compose.js */ \"./node_modules/ramda/es/compose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return _compose_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _composeK_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./composeK.js */ \"./node_modules/ramda/es/composeK.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"composeK\", function() { return _composeK_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _composeP_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./composeP.js */ \"./node_modules/ramda/es/composeP.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"composeP\", function() { return _composeP_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _composeWith_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./composeWith.js */ \"./node_modules/ramda/es/composeWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"composeWith\", function() { return _composeWith_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./concat.js */ \"./node_modules/ramda/es/concat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"concat\", function() { return _concat_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _cond_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./cond.js */ \"./node_modules/ramda/es/cond.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cond\", function() { return _cond_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony import */ var _construct_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./construct.js */ \"./node_modules/ramda/es/construct.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"construct\", function() { return _construct_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _constructN_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./constructN.js */ \"./node_modules/ramda/es/constructN.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"constructN\", function() { return _constructN_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/ramda/es/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contains\", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _converge_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./converge.js */ \"./node_modules/ramda/es/converge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"converge\", function() { return _converge_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _countBy_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./countBy.js */ \"./node_modules/ramda/es/countBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"countBy\", function() { return _countBy_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./curry.js */ \"./node_modules/ramda/es/curry.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curry\", function() { return _curry_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"curryN\", function() { return _curryN_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _dec_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./dec.js */ \"./node_modules/ramda/es/dec.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dec\", function() { return _dec_js__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./defaultTo.js */ \"./node_modules/ramda/es/defaultTo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defaultTo\", function() { return _defaultTo_js__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _descend_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./descend.js */ \"./node_modules/ramda/es/descend.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"descend\", function() { return _descend_js__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/ramda/es/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _differenceWith_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./differenceWith.js */ \"./node_modules/ramda/es/differenceWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"differenceWith\", function() { return _differenceWith_js__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _dissoc_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./dissoc.js */ \"./node_modules/ramda/es/dissoc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dissoc\", function() { return _dissoc_js__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _dissocPath_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./dissocPath.js */ \"./node_modules/ramda/es/dissocPath.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dissocPath\", function() { return _dissocPath_js__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _divide_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./divide.js */ \"./node_modules/ramda/es/divide.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"divide\", function() { return _divide_js__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _drop_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./drop.js */ \"./node_modules/ramda/es/drop.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"drop\", function() { return _drop_js__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _dropLast_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./dropLast.js */ \"./node_modules/ramda/es/dropLast.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dropLast\", function() { return _dropLast_js__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _dropLastWhile_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./dropLastWhile.js */ \"./node_modules/ramda/es/dropLastWhile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dropLastWhile\", function() { return _dropLastWhile_js__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var _dropRepeats_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./dropRepeats.js */ \"./node_modules/ramda/es/dropRepeats.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dropRepeats\", function() { return _dropRepeats_js__WEBPACK_IMPORTED_MODULE_54__[\"default\"]; });\n\n/* harmony import */ var _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./dropRepeatsWith.js */ \"./node_modules/ramda/es/dropRepeatsWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dropRepeatsWith\", function() { return _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_55__[\"default\"]; });\n\n/* harmony import */ var _dropWhile_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./dropWhile.js */ \"./node_modules/ramda/es/dropWhile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"dropWhile\", function() { return _dropWhile_js__WEBPACK_IMPORTED_MODULE_56__[\"default\"]; });\n\n/* harmony import */ var _either_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./either.js */ \"./node_modules/ramda/es/either.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"either\", function() { return _either_js__WEBPACK_IMPORTED_MODULE_57__[\"default\"]; });\n\n/* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./empty.js */ \"./node_modules/ramda/es/empty.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"empty\", function() { return _empty_js__WEBPACK_IMPORTED_MODULE_58__[\"default\"]; });\n\n/* harmony import */ var _endsWith_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./endsWith.js */ \"./node_modules/ramda/es/endsWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"endsWith\", function() { return _endsWith_js__WEBPACK_IMPORTED_MODULE_59__[\"default\"]; });\n\n/* harmony import */ var _eqBy_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./eqBy.js */ \"./node_modules/ramda/es/eqBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"eqBy\", function() { return _eqBy_js__WEBPACK_IMPORTED_MODULE_60__[\"default\"]; });\n\n/* harmony import */ var _eqProps_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./eqProps.js */ \"./node_modules/ramda/es/eqProps.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"eqProps\", function() { return _eqProps_js__WEBPACK_IMPORTED_MODULE_61__[\"default\"]; });\n\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return _equals_js__WEBPACK_IMPORTED_MODULE_62__[\"default\"]; });\n\n/* harmony import */ var _evolve_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./evolve.js */ \"./node_modules/ramda/es/evolve.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"evolve\", function() { return _evolve_js__WEBPACK_IMPORTED_MODULE_63__[\"default\"]; });\n\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/ramda/es/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_64__[\"default\"]; });\n\n/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./find.js */ \"./node_modules/ramda/es/find.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return _find_js__WEBPACK_IMPORTED_MODULE_65__[\"default\"]; });\n\n/* harmony import */ var _findIndex_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./findIndex.js */ \"./node_modules/ramda/es/findIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findIndex\", function() { return _findIndex_js__WEBPACK_IMPORTED_MODULE_66__[\"default\"]; });\n\n/* harmony import */ var _findLast_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./findLast.js */ \"./node_modules/ramda/es/findLast.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findLast\", function() { return _findLast_js__WEBPACK_IMPORTED_MODULE_67__[\"default\"]; });\n\n/* harmony import */ var _findLastIndex_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./findLastIndex.js */ \"./node_modules/ramda/es/findLastIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findLastIndex\", function() { return _findLastIndex_js__WEBPACK_IMPORTED_MODULE_68__[\"default\"]; });\n\n/* harmony import */ var _flatten_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./flatten.js */ \"./node_modules/ramda/es/flatten.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatten\", function() { return _flatten_js__WEBPACK_IMPORTED_MODULE_69__[\"default\"]; });\n\n/* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./flip.js */ \"./node_modules/ramda/es/flip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flip\", function() { return _flip_js__WEBPACK_IMPORTED_MODULE_70__[\"default\"]; });\n\n/* harmony import */ var _forEach_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./forEach.js */ \"./node_modules/ramda/es/forEach.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forEach\", function() { return _forEach_js__WEBPACK_IMPORTED_MODULE_71__[\"default\"]; });\n\n/* harmony import */ var _forEachObjIndexed_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./forEachObjIndexed.js */ \"./node_modules/ramda/es/forEachObjIndexed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forEachObjIndexed\", function() { return _forEachObjIndexed_js__WEBPACK_IMPORTED_MODULE_72__[\"default\"]; });\n\n/* harmony import */ var _fromPairs_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./fromPairs.js */ \"./node_modules/ramda/es/fromPairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromPairs\", function() { return _fromPairs_js__WEBPACK_IMPORTED_MODULE_73__[\"default\"]; });\n\n/* harmony import */ var _groupBy_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./groupBy.js */ \"./node_modules/ramda/es/groupBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupBy\", function() { return _groupBy_js__WEBPACK_IMPORTED_MODULE_74__[\"default\"]; });\n\n/* harmony import */ var _groupWith_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./groupWith.js */ \"./node_modules/ramda/es/groupWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupWith\", function() { return _groupWith_js__WEBPACK_IMPORTED_MODULE_75__[\"default\"]; });\n\n/* harmony import */ var _gt_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./gt.js */ \"./node_modules/ramda/es/gt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gt\", function() { return _gt_js__WEBPACK_IMPORTED_MODULE_76__[\"default\"]; });\n\n/* harmony import */ var _gte_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./gte.js */ \"./node_modules/ramda/es/gte.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gte\", function() { return _gte_js__WEBPACK_IMPORTED_MODULE_77__[\"default\"]; });\n\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./has.js */ \"./node_modules/ramda/es/has.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"has\", function() { return _has_js__WEBPACK_IMPORTED_MODULE_78__[\"default\"]; });\n\n/* harmony import */ var _hasIn_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./hasIn.js */ \"./node_modules/ramda/es/hasIn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasIn\", function() { return _hasIn_js__WEBPACK_IMPORTED_MODULE_79__[\"default\"]; });\n\n/* harmony import */ var _hasPath_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./hasPath.js */ \"./node_modules/ramda/es/hasPath.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasPath\", function() { return _hasPath_js__WEBPACK_IMPORTED_MODULE_80__[\"default\"]; });\n\n/* harmony import */ var _head_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./head.js */ \"./node_modules/ramda/es/head.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"head\", function() { return _head_js__WEBPACK_IMPORTED_MODULE_81__[\"default\"]; });\n\n/* harmony import */ var _identical_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./identical.js */ \"./node_modules/ramda/es/identical.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"identical\", function() { return _identical_js__WEBPACK_IMPORTED_MODULE_82__[\"default\"]; });\n\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/ramda/es/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return _identity_js__WEBPACK_IMPORTED_MODULE_83__[\"default\"]; });\n\n/* harmony import */ var _ifElse_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./ifElse.js */ \"./node_modules/ramda/es/ifElse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ifElse\", function() { return _ifElse_js__WEBPACK_IMPORTED_MODULE_84__[\"default\"]; });\n\n/* harmony import */ var _inc_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./inc.js */ \"./node_modules/ramda/es/inc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"inc\", function() { return _inc_js__WEBPACK_IMPORTED_MODULE_85__[\"default\"]; });\n\n/* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./includes.js */ \"./node_modules/ramda/es/includes.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"includes\", function() { return _includes_js__WEBPACK_IMPORTED_MODULE_86__[\"default\"]; });\n\n/* harmony import */ var _indexBy_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./indexBy.js */ \"./node_modules/ramda/es/indexBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexBy\", function() { return _indexBy_js__WEBPACK_IMPORTED_MODULE_87__[\"default\"]; });\n\n/* harmony import */ var _indexOf_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./indexOf.js */ \"./node_modules/ramda/es/indexOf.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexOf\", function() { return _indexOf_js__WEBPACK_IMPORTED_MODULE_88__[\"default\"]; });\n\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./init.js */ \"./node_modules/ramda/es/init.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return _init_js__WEBPACK_IMPORTED_MODULE_89__[\"default\"]; });\n\n/* harmony import */ var _innerJoin_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./innerJoin.js */ \"./node_modules/ramda/es/innerJoin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"innerJoin\", function() { return _innerJoin_js__WEBPACK_IMPORTED_MODULE_90__[\"default\"]; });\n\n/* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./insert.js */ \"./node_modules/ramda/es/insert.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"insert\", function() { return _insert_js__WEBPACK_IMPORTED_MODULE_91__[\"default\"]; });\n\n/* harmony import */ var _insertAll_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./insertAll.js */ \"./node_modules/ramda/es/insertAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"insertAll\", function() { return _insertAll_js__WEBPACK_IMPORTED_MODULE_92__[\"default\"]; });\n\n/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./intersection.js */ \"./node_modules/ramda/es/intersection.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersection\", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_93__[\"default\"]; });\n\n/* harmony import */ var _intersperse_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./intersperse.js */ \"./node_modules/ramda/es/intersperse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"intersperse\", function() { return _intersperse_js__WEBPACK_IMPORTED_MODULE_94__[\"default\"]; });\n\n/* harmony import */ var _into_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./into.js */ \"./node_modules/ramda/es/into.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"into\", function() { return _into_js__WEBPACK_IMPORTED_MODULE_95__[\"default\"]; });\n\n/* harmony import */ var _invert_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./invert.js */ \"./node_modules/ramda/es/invert.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return _invert_js__WEBPACK_IMPORTED_MODULE_96__[\"default\"]; });\n\n/* harmony import */ var _invertObj_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./invertObj.js */ \"./node_modules/ramda/es/invertObj.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"invertObj\", function() { return _invertObj_js__WEBPACK_IMPORTED_MODULE_97__[\"default\"]; });\n\n/* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./invoker.js */ \"./node_modules/ramda/es/invoker.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"invoker\", function() { return _invoker_js__WEBPACK_IMPORTED_MODULE_98__[\"default\"]; });\n\n/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./is.js */ \"./node_modules/ramda/es/is.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"is\", function() { return _is_js__WEBPACK_IMPORTED_MODULE_99__[\"default\"]; });\n\n/* harmony import */ var _isEmpty_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./isEmpty.js */ \"./node_modules/ramda/es/isEmpty.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEmpty\", function() { return _isEmpty_js__WEBPACK_IMPORTED_MODULE_100__[\"default\"]; });\n\n/* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./isNil.js */ \"./node_modules/ramda/es/isNil.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNil\", function() { return _isNil_js__WEBPACK_IMPORTED_MODULE_101__[\"default\"]; });\n\n/* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./join.js */ \"./node_modules/ramda/es/join.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"join\", function() { return _join_js__WEBPACK_IMPORTED_MODULE_102__[\"default\"]; });\n\n/* harmony import */ var _juxt_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./juxt.js */ \"./node_modules/ramda/es/juxt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"juxt\", function() { return _juxt_js__WEBPACK_IMPORTED_MODULE_103__[\"default\"]; });\n\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return _keys_js__WEBPACK_IMPORTED_MODULE_104__[\"default\"]; });\n\n/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./keysIn.js */ \"./node_modules/ramda/es/keysIn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keysIn\", function() { return _keysIn_js__WEBPACK_IMPORTED_MODULE_105__[\"default\"]; });\n\n/* harmony import */ var _last_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./last.js */ \"./node_modules/ramda/es/last.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"last\", function() { return _last_js__WEBPACK_IMPORTED_MODULE_106__[\"default\"]; });\n\n/* harmony import */ var _lastIndexOf_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./lastIndexOf.js */ \"./node_modules/ramda/es/lastIndexOf.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lastIndexOf\", function() { return _lastIndexOf_js__WEBPACK_IMPORTED_MODULE_107__[\"default\"]; });\n\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./length.js */ \"./node_modules/ramda/es/length.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return _length_js__WEBPACK_IMPORTED_MODULE_108__[\"default\"]; });\n\n/* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./lens.js */ \"./node_modules/ramda/es/lens.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lens\", function() { return _lens_js__WEBPACK_IMPORTED_MODULE_109__[\"default\"]; });\n\n/* harmony import */ var _lensIndex_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./lensIndex.js */ \"./node_modules/ramda/es/lensIndex.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lensIndex\", function() { return _lensIndex_js__WEBPACK_IMPORTED_MODULE_110__[\"default\"]; });\n\n/* harmony import */ var _lensPath_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./lensPath.js */ \"./node_modules/ramda/es/lensPath.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lensPath\", function() { return _lensPath_js__WEBPACK_IMPORTED_MODULE_111__[\"default\"]; });\n\n/* harmony import */ var _lensProp_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./lensProp.js */ \"./node_modules/ramda/es/lensProp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lensProp\", function() { return _lensProp_js__WEBPACK_IMPORTED_MODULE_112__[\"default\"]; });\n\n/* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./lift.js */ \"./node_modules/ramda/es/lift.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lift\", function() { return _lift_js__WEBPACK_IMPORTED_MODULE_113__[\"default\"]; });\n\n/* harmony import */ var _liftN_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./liftN.js */ \"./node_modules/ramda/es/liftN.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"liftN\", function() { return _liftN_js__WEBPACK_IMPORTED_MODULE_114__[\"default\"]; });\n\n/* harmony import */ var _lt_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./lt.js */ \"./node_modules/ramda/es/lt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lt\", function() { return _lt_js__WEBPACK_IMPORTED_MODULE_115__[\"default\"]; });\n\n/* harmony import */ var _lte_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./lte.js */ \"./node_modules/ramda/es/lte.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lte\", function() { return _lte_js__WEBPACK_IMPORTED_MODULE_116__[\"default\"]; });\n\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map_js__WEBPACK_IMPORTED_MODULE_117__[\"default\"]; });\n\n/* harmony import */ var _mapAccum_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./mapAccum.js */ \"./node_modules/ramda/es/mapAccum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mapAccum\", function() { return _mapAccum_js__WEBPACK_IMPORTED_MODULE_118__[\"default\"]; });\n\n/* harmony import */ var _mapAccumRight_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./mapAccumRight.js */ \"./node_modules/ramda/es/mapAccumRight.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mapAccumRight\", function() { return _mapAccumRight_js__WEBPACK_IMPORTED_MODULE_119__[\"default\"]; });\n\n/* harmony import */ var _mapObjIndexed_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./mapObjIndexed.js */ \"./node_modules/ramda/es/mapObjIndexed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mapObjIndexed\", function() { return _mapObjIndexed_js__WEBPACK_IMPORTED_MODULE_120__[\"default\"]; });\n\n/* harmony import */ var _match_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./match.js */ \"./node_modules/ramda/es/match.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"match\", function() { return _match_js__WEBPACK_IMPORTED_MODULE_121__[\"default\"]; });\n\n/* harmony import */ var _mathMod_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./mathMod.js */ \"./node_modules/ramda/es/mathMod.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mathMod\", function() { return _mathMod_js__WEBPACK_IMPORTED_MODULE_122__[\"default\"]; });\n\n/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./max.js */ \"./node_modules/ramda/es/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max_js__WEBPACK_IMPORTED_MODULE_123__[\"default\"]; });\n\n/* harmony import */ var _maxBy_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./maxBy.js */ \"./node_modules/ramda/es/maxBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxBy\", function() { return _maxBy_js__WEBPACK_IMPORTED_MODULE_124__[\"default\"]; });\n\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/ramda/es/mean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mean\", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_125__[\"default\"]; });\n\n/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./median.js */ \"./node_modules/ramda/es/median.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"median\", function() { return _median_js__WEBPACK_IMPORTED_MODULE_126__[\"default\"]; });\n\n/* harmony import */ var _memoizeWith_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./memoizeWith.js */ \"./node_modules/ramda/es/memoizeWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"memoizeWith\", function() { return _memoizeWith_js__WEBPACK_IMPORTED_MODULE_127__[\"default\"]; });\n\n/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./merge.js */ \"./node_modules/ramda/es/merge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_128__[\"default\"]; });\n\n/* harmony import */ var _mergeAll_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./mergeAll.js */ \"./node_modules/ramda/es/mergeAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeAll\", function() { return _mergeAll_js__WEBPACK_IMPORTED_MODULE_129__[\"default\"]; });\n\n/* harmony import */ var _mergeDeepLeft_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./mergeDeepLeft.js */ \"./node_modules/ramda/es/mergeDeepLeft.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeDeepLeft\", function() { return _mergeDeepLeft_js__WEBPACK_IMPORTED_MODULE_130__[\"default\"]; });\n\n/* harmony import */ var _mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(/*! ./mergeDeepRight.js */ \"./node_modules/ramda/es/mergeDeepRight.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeDeepRight\", function() { return _mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_131__[\"default\"]; });\n\n/* harmony import */ var _mergeDeepWith_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(/*! ./mergeDeepWith.js */ \"./node_modules/ramda/es/mergeDeepWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeDeepWith\", function() { return _mergeDeepWith_js__WEBPACK_IMPORTED_MODULE_132__[\"default\"]; });\n\n/* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ \"./node_modules/ramda/es/mergeDeepWithKey.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeDeepWithKey\", function() { return _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_133__[\"default\"]; });\n\n/* harmony import */ var _mergeLeft_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(/*! ./mergeLeft.js */ \"./node_modules/ramda/es/mergeLeft.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeLeft\", function() { return _mergeLeft_js__WEBPACK_IMPORTED_MODULE_134__[\"default\"]; });\n\n/* harmony import */ var _mergeRight_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(/*! ./mergeRight.js */ \"./node_modules/ramda/es/mergeRight.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeRight\", function() { return _mergeRight_js__WEBPACK_IMPORTED_MODULE_135__[\"default\"]; });\n\n/* harmony import */ var _mergeWith_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(/*! ./mergeWith.js */ \"./node_modules/ramda/es/mergeWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeWith\", function() { return _mergeWith_js__WEBPACK_IMPORTED_MODULE_136__[\"default\"]; });\n\n/* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(/*! ./mergeWithKey.js */ \"./node_modules/ramda/es/mergeWithKey.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeWithKey\", function() { return _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_137__[\"default\"]; });\n\n/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(/*! ./min.js */ \"./node_modules/ramda/es/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min_js__WEBPACK_IMPORTED_MODULE_138__[\"default\"]; });\n\n/* harmony import */ var _minBy_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(/*! ./minBy.js */ \"./node_modules/ramda/es/minBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minBy\", function() { return _minBy_js__WEBPACK_IMPORTED_MODULE_139__[\"default\"]; });\n\n/* harmony import */ var _modulo_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(/*! ./modulo.js */ \"./node_modules/ramda/es/modulo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"modulo\", function() { return _modulo_js__WEBPACK_IMPORTED_MODULE_140__[\"default\"]; });\n\n/* harmony import */ var _move_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(/*! ./move.js */ \"./node_modules/ramda/es/move.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"move\", function() { return _move_js__WEBPACK_IMPORTED_MODULE_141__[\"default\"]; });\n\n/* harmony import */ var _multiply_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(/*! ./multiply.js */ \"./node_modules/ramda/es/multiply.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return _multiply_js__WEBPACK_IMPORTED_MODULE_142__[\"default\"]; });\n\n/* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(/*! ./nAry.js */ \"./node_modules/ramda/es/nAry.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nAry\", function() { return _nAry_js__WEBPACK_IMPORTED_MODULE_143__[\"default\"]; });\n\n/* harmony import */ var _negate_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(/*! ./negate.js */ \"./node_modules/ramda/es/negate.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"negate\", function() { return _negate_js__WEBPACK_IMPORTED_MODULE_144__[\"default\"]; });\n\n/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(/*! ./none.js */ \"./node_modules/ramda/es/none.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"none\", function() { return _none_js__WEBPACK_IMPORTED_MODULE_145__[\"default\"]; });\n\n/* harmony import */ var _not_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(/*! ./not.js */ \"./node_modules/ramda/es/not.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"not\", function() { return _not_js__WEBPACK_IMPORTED_MODULE_146__[\"default\"]; });\n\n/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(/*! ./nth.js */ \"./node_modules/ramda/es/nth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nth\", function() { return _nth_js__WEBPACK_IMPORTED_MODULE_147__[\"default\"]; });\n\n/* harmony import */ var _nthArg_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(/*! ./nthArg.js */ \"./node_modules/ramda/es/nthArg.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nthArg\", function() { return _nthArg_js__WEBPACK_IMPORTED_MODULE_148__[\"default\"]; });\n\n/* harmony import */ var _o_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(/*! ./o.js */ \"./node_modules/ramda/es/o.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return _o_js__WEBPACK_IMPORTED_MODULE_149__[\"default\"]; });\n\n/* harmony import */ var _objOf_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(/*! ./objOf.js */ \"./node_modules/ramda/es/objOf.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"objOf\", function() { return _objOf_js__WEBPACK_IMPORTED_MODULE_150__[\"default\"]; });\n\n/* harmony import */ var _of_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(/*! ./of.js */ \"./node_modules/ramda/es/of.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"of\", function() { return _of_js__WEBPACK_IMPORTED_MODULE_151__[\"default\"]; });\n\n/* harmony import */ var _omit_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(/*! ./omit.js */ \"./node_modules/ramda/es/omit.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"omit\", function() { return _omit_js__WEBPACK_IMPORTED_MODULE_152__[\"default\"]; });\n\n/* harmony import */ var _once_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(/*! ./once.js */ \"./node_modules/ramda/es/once.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"once\", function() { return _once_js__WEBPACK_IMPORTED_MODULE_153__[\"default\"]; });\n\n/* harmony import */ var _or_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(/*! ./or.js */ \"./node_modules/ramda/es/or.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"or\", function() { return _or_js__WEBPACK_IMPORTED_MODULE_154__[\"default\"]; });\n\n/* harmony import */ var _otherwise_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(/*! ./otherwise.js */ \"./node_modules/ramda/es/otherwise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"otherwise\", function() { return _otherwise_js__WEBPACK_IMPORTED_MODULE_155__[\"default\"]; });\n\n/* harmony import */ var _over_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(/*! ./over.js */ \"./node_modules/ramda/es/over.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"over\", function() { return _over_js__WEBPACK_IMPORTED_MODULE_156__[\"default\"]; });\n\n/* harmony import */ var _pair_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(/*! ./pair.js */ \"./node_modules/ramda/es/pair.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pair\", function() { return _pair_js__WEBPACK_IMPORTED_MODULE_157__[\"default\"]; });\n\n/* harmony import */ var _partial_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(/*! ./partial.js */ \"./node_modules/ramda/es/partial.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partial\", function() { return _partial_js__WEBPACK_IMPORTED_MODULE_158__[\"default\"]; });\n\n/* harmony import */ var _partialRight_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(/*! ./partialRight.js */ \"./node_modules/ramda/es/partialRight.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partialRight\", function() { return _partialRight_js__WEBPACK_IMPORTED_MODULE_159__[\"default\"]; });\n\n/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(/*! ./partition.js */ \"./node_modules/ramda/es/partition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"partition\", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_160__[\"default\"]; });\n\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"path\", function() { return _path_js__WEBPACK_IMPORTED_MODULE_161__[\"default\"]; });\n\n/* harmony import */ var _pathEq_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(/*! ./pathEq.js */ \"./node_modules/ramda/es/pathEq.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pathEq\", function() { return _pathEq_js__WEBPACK_IMPORTED_MODULE_162__[\"default\"]; });\n\n/* harmony import */ var _pathOr_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(/*! ./pathOr.js */ \"./node_modules/ramda/es/pathOr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pathOr\", function() { return _pathOr_js__WEBPACK_IMPORTED_MODULE_163__[\"default\"]; });\n\n/* harmony import */ var _pathSatisfies_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(/*! ./pathSatisfies.js */ \"./node_modules/ramda/es/pathSatisfies.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pathSatisfies\", function() { return _pathSatisfies_js__WEBPACK_IMPORTED_MODULE_164__[\"default\"]; });\n\n/* harmony import */ var _pick_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(/*! ./pick.js */ \"./node_modules/ramda/es/pick.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pick\", function() { return _pick_js__WEBPACK_IMPORTED_MODULE_165__[\"default\"]; });\n\n/* harmony import */ var _pickAll_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(/*! ./pickAll.js */ \"./node_modules/ramda/es/pickAll.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pickAll\", function() { return _pickAll_js__WEBPACK_IMPORTED_MODULE_166__[\"default\"]; });\n\n/* harmony import */ var _pickBy_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(/*! ./pickBy.js */ \"./node_modules/ramda/es/pickBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pickBy\", function() { return _pickBy_js__WEBPACK_IMPORTED_MODULE_167__[\"default\"]; });\n\n/* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(/*! ./pipe.js */ \"./node_modules/ramda/es/pipe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pipe\", function() { return _pipe_js__WEBPACK_IMPORTED_MODULE_168__[\"default\"]; });\n\n/* harmony import */ var _pipeK_js__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(/*! ./pipeK.js */ \"./node_modules/ramda/es/pipeK.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pipeK\", function() { return _pipeK_js__WEBPACK_IMPORTED_MODULE_169__[\"default\"]; });\n\n/* harmony import */ var _pipeP_js__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(/*! ./pipeP.js */ \"./node_modules/ramda/es/pipeP.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pipeP\", function() { return _pipeP_js__WEBPACK_IMPORTED_MODULE_170__[\"default\"]; });\n\n/* harmony import */ var _pipeWith_js__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(/*! ./pipeWith.js */ \"./node_modules/ramda/es/pipeWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pipeWith\", function() { return _pipeWith_js__WEBPACK_IMPORTED_MODULE_171__[\"default\"]; });\n\n/* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(/*! ./pluck.js */ \"./node_modules/ramda/es/pluck.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pluck\", function() { return _pluck_js__WEBPACK_IMPORTED_MODULE_172__[\"default\"]; });\n\n/* harmony import */ var _prepend_js__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(/*! ./prepend.js */ \"./node_modules/ramda/es/prepend.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prepend\", function() { return _prepend_js__WEBPACK_IMPORTED_MODULE_173__[\"default\"]; });\n\n/* harmony import */ var _product_js__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(/*! ./product.js */ \"./node_modules/ramda/es/product.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"product\", function() { return _product_js__WEBPACK_IMPORTED_MODULE_174__[\"default\"]; });\n\n/* harmony import */ var _project_js__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(/*! ./project.js */ \"./node_modules/ramda/es/project.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"project\", function() { return _project_js__WEBPACK_IMPORTED_MODULE_175__[\"default\"]; });\n\n/* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(/*! ./prop.js */ \"./node_modules/ramda/es/prop.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prop\", function() { return _prop_js__WEBPACK_IMPORTED_MODULE_176__[\"default\"]; });\n\n/* harmony import */ var _propEq_js__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(/*! ./propEq.js */ \"./node_modules/ramda/es/propEq.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"propEq\", function() { return _propEq_js__WEBPACK_IMPORTED_MODULE_177__[\"default\"]; });\n\n/* harmony import */ var _propIs_js__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(/*! ./propIs.js */ \"./node_modules/ramda/es/propIs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"propIs\", function() { return _propIs_js__WEBPACK_IMPORTED_MODULE_178__[\"default\"]; });\n\n/* harmony import */ var _propOr_js__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(/*! ./propOr.js */ \"./node_modules/ramda/es/propOr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"propOr\", function() { return _propOr_js__WEBPACK_IMPORTED_MODULE_179__[\"default\"]; });\n\n/* harmony import */ var _propSatisfies_js__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(/*! ./propSatisfies.js */ \"./node_modules/ramda/es/propSatisfies.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"propSatisfies\", function() { return _propSatisfies_js__WEBPACK_IMPORTED_MODULE_180__[\"default\"]; });\n\n/* harmony import */ var _props_js__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(/*! ./props.js */ \"./node_modules/ramda/es/props.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"props\", function() { return _props_js__WEBPACK_IMPORTED_MODULE_181__[\"default\"]; });\n\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(/*! ./range.js */ \"./node_modules/ramda/es/range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return _range_js__WEBPACK_IMPORTED_MODULE_182__[\"default\"]; });\n\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_183__[\"default\"]; });\n\n/* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(/*! ./reduceBy.js */ \"./node_modules/ramda/es/reduceBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduceBy\", function() { return _reduceBy_js__WEBPACK_IMPORTED_MODULE_184__[\"default\"]; });\n\n/* harmony import */ var _reduceRight_js__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(/*! ./reduceRight.js */ \"./node_modules/ramda/es/reduceRight.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduceRight\", function() { return _reduceRight_js__WEBPACK_IMPORTED_MODULE_185__[\"default\"]; });\n\n/* harmony import */ var _reduceWhile_js__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(/*! ./reduceWhile.js */ \"./node_modules/ramda/es/reduceWhile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduceWhile\", function() { return _reduceWhile_js__WEBPACK_IMPORTED_MODULE_186__[\"default\"]; });\n\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(/*! ./reduced.js */ \"./node_modules/ramda/es/reduced.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduced\", function() { return _reduced_js__WEBPACK_IMPORTED_MODULE_187__[\"default\"]; });\n\n/* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(/*! ./reject.js */ \"./node_modules/ramda/es/reject.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reject\", function() { return _reject_js__WEBPACK_IMPORTED_MODULE_188__[\"default\"]; });\n\n/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(/*! ./remove.js */ \"./node_modules/ramda/es/remove.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"remove\", function() { return _remove_js__WEBPACK_IMPORTED_MODULE_189__[\"default\"]; });\n\n/* harmony import */ var _repeat_js__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(/*! ./repeat.js */ \"./node_modules/ramda/es/repeat.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"repeat\", function() { return _repeat_js__WEBPACK_IMPORTED_MODULE_190__[\"default\"]; });\n\n/* harmony import */ var _replace_js__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(/*! ./replace.js */ \"./node_modules/ramda/es/replace.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"replace\", function() { return _replace_js__WEBPACK_IMPORTED_MODULE_191__[\"default\"]; });\n\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ramda/es/reverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reverse\", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_192__[\"default\"]; });\n\n/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(/*! ./scan.js */ \"./node_modules/ramda/es/scan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"scan\", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_193__[\"default\"]; });\n\n/* harmony import */ var _sequence_js__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(/*! ./sequence.js */ \"./node_modules/ramda/es/sequence.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sequence\", function() { return _sequence_js__WEBPACK_IMPORTED_MODULE_194__[\"default\"]; });\n\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(/*! ./set.js */ \"./node_modules/ramda/es/set.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return _set_js__WEBPACK_IMPORTED_MODULE_195__[\"default\"]; });\n\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return _slice_js__WEBPACK_IMPORTED_MODULE_196__[\"default\"]; });\n\n/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(/*! ./sort.js */ \"./node_modules/ramda/es/sort.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sort\", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_197__[\"default\"]; });\n\n/* harmony import */ var _sortBy_js__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(/*! ./sortBy.js */ \"./node_modules/ramda/es/sortBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortBy\", function() { return _sortBy_js__WEBPACK_IMPORTED_MODULE_198__[\"default\"]; });\n\n/* harmony import */ var _sortWith_js__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(/*! ./sortWith.js */ \"./node_modules/ramda/es/sortWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortWith\", function() { return _sortWith_js__WEBPACK_IMPORTED_MODULE_199__[\"default\"]; });\n\n/* harmony import */ var _split_js__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(/*! ./split.js */ \"./node_modules/ramda/es/split.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"split\", function() { return _split_js__WEBPACK_IMPORTED_MODULE_200__[\"default\"]; });\n\n/* harmony import */ var _splitAt_js__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(/*! ./splitAt.js */ \"./node_modules/ramda/es/splitAt.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitAt\", function() { return _splitAt_js__WEBPACK_IMPORTED_MODULE_201__[\"default\"]; });\n\n/* harmony import */ var _splitEvery_js__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(/*! ./splitEvery.js */ \"./node_modules/ramda/es/splitEvery.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitEvery\", function() { return _splitEvery_js__WEBPACK_IMPORTED_MODULE_202__[\"default\"]; });\n\n/* harmony import */ var _splitWhen_js__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(/*! ./splitWhen.js */ \"./node_modules/ramda/es/splitWhen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitWhen\", function() { return _splitWhen_js__WEBPACK_IMPORTED_MODULE_203__[\"default\"]; });\n\n/* harmony import */ var _startsWith_js__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(/*! ./startsWith.js */ \"./node_modules/ramda/es/startsWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"startsWith\", function() { return _startsWith_js__WEBPACK_IMPORTED_MODULE_204__[\"default\"]; });\n\n/* harmony import */ var _subtract_js__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(/*! ./subtract.js */ \"./node_modules/ramda/es/subtract.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return _subtract_js__WEBPACK_IMPORTED_MODULE_205__[\"default\"]; });\n\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/ramda/es/sum.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sum\", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_206__[\"default\"]; });\n\n/* harmony import */ var _symmetricDifference_js__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(/*! ./symmetricDifference.js */ \"./node_modules/ramda/es/symmetricDifference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symmetricDifference\", function() { return _symmetricDifference_js__WEBPACK_IMPORTED_MODULE_207__[\"default\"]; });\n\n/* harmony import */ var _symmetricDifferenceWith_js__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(/*! ./symmetricDifferenceWith.js */ \"./node_modules/ramda/es/symmetricDifferenceWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"symmetricDifferenceWith\", function() { return _symmetricDifferenceWith_js__WEBPACK_IMPORTED_MODULE_208__[\"default\"]; });\n\n/* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(/*! ./tail.js */ \"./node_modules/ramda/es/tail.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tail\", function() { return _tail_js__WEBPACK_IMPORTED_MODULE_209__[\"default\"]; });\n\n/* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(/*! ./take.js */ \"./node_modules/ramda/es/take.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"take\", function() { return _take_js__WEBPACK_IMPORTED_MODULE_210__[\"default\"]; });\n\n/* harmony import */ var _takeLast_js__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(/*! ./takeLast.js */ \"./node_modules/ramda/es/takeLast.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"takeLast\", function() { return _takeLast_js__WEBPACK_IMPORTED_MODULE_211__[\"default\"]; });\n\n/* harmony import */ var _takeLastWhile_js__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(/*! ./takeLastWhile.js */ \"./node_modules/ramda/es/takeLastWhile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"takeLastWhile\", function() { return _takeLastWhile_js__WEBPACK_IMPORTED_MODULE_212__[\"default\"]; });\n\n/* harmony import */ var _takeWhile_js__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(/*! ./takeWhile.js */ \"./node_modules/ramda/es/takeWhile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"takeWhile\", function() { return _takeWhile_js__WEBPACK_IMPORTED_MODULE_213__[\"default\"]; });\n\n/* harmony import */ var _tap_js__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(/*! ./tap.js */ \"./node_modules/ramda/es/tap.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tap\", function() { return _tap_js__WEBPACK_IMPORTED_MODULE_214__[\"default\"]; });\n\n/* harmony import */ var _test_js__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(/*! ./test.js */ \"./node_modules/ramda/es/test.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"test\", function() { return _test_js__WEBPACK_IMPORTED_MODULE_215__[\"default\"]; });\n\n/* harmony import */ var _then_js__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(/*! ./then.js */ \"./node_modules/ramda/es/then.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"then\", function() { return _then_js__WEBPACK_IMPORTED_MODULE_216__[\"default\"]; });\n\n/* harmony import */ var _times_js__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(/*! ./times.js */ \"./node_modules/ramda/es/times.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"times\", function() { return _times_js__WEBPACK_IMPORTED_MODULE_217__[\"default\"]; });\n\n/* harmony import */ var _toLower_js__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(/*! ./toLower.js */ \"./node_modules/ramda/es/toLower.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toLower\", function() { return _toLower_js__WEBPACK_IMPORTED_MODULE_218__[\"default\"]; });\n\n/* harmony import */ var _toPairs_js__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(/*! ./toPairs.js */ \"./node_modules/ramda/es/toPairs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toPairs\", function() { return _toPairs_js__WEBPACK_IMPORTED_MODULE_219__[\"default\"]; });\n\n/* harmony import */ var _toPairsIn_js__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(/*! ./toPairsIn.js */ \"./node_modules/ramda/es/toPairsIn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toPairsIn\", function() { return _toPairsIn_js__WEBPACK_IMPORTED_MODULE_220__[\"default\"]; });\n\n/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(/*! ./toString.js */ \"./node_modules/ramda/es/toString.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toString\", function() { return _toString_js__WEBPACK_IMPORTED_MODULE_221__[\"default\"]; });\n\n/* harmony import */ var _toUpper_js__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(/*! ./toUpper.js */ \"./node_modules/ramda/es/toUpper.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toUpper\", function() { return _toUpper_js__WEBPACK_IMPORTED_MODULE_222__[\"default\"]; });\n\n/* harmony import */ var _transduce_js__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(/*! ./transduce.js */ \"./node_modules/ramda/es/transduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transduce\", function() { return _transduce_js__WEBPACK_IMPORTED_MODULE_223__[\"default\"]; });\n\n/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(/*! ./transpose.js */ \"./node_modules/ramda/es/transpose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_224__[\"default\"]; });\n\n/* harmony import */ var _traverse_js__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(/*! ./traverse.js */ \"./node_modules/ramda/es/traverse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"traverse\", function() { return _traverse_js__WEBPACK_IMPORTED_MODULE_225__[\"default\"]; });\n\n/* harmony import */ var _trim_js__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(/*! ./trim.js */ \"./node_modules/ramda/es/trim.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"trim\", function() { return _trim_js__WEBPACK_IMPORTED_MODULE_226__[\"default\"]; });\n\n/* harmony import */ var _tryCatch_js__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(/*! ./tryCatch.js */ \"./node_modules/ramda/es/tryCatch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"tryCatch\", function() { return _tryCatch_js__WEBPACK_IMPORTED_MODULE_227__[\"default\"]; });\n\n/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(/*! ./type.js */ \"./node_modules/ramda/es/type.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"type\", function() { return _type_js__WEBPACK_IMPORTED_MODULE_228__[\"default\"]; });\n\n/* harmony import */ var _unapply_js__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(/*! ./unapply.js */ \"./node_modules/ramda/es/unapply.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unapply\", function() { return _unapply_js__WEBPACK_IMPORTED_MODULE_229__[\"default\"]; });\n\n/* harmony import */ var _unary_js__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(/*! ./unary.js */ \"./node_modules/ramda/es/unary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unary\", function() { return _unary_js__WEBPACK_IMPORTED_MODULE_230__[\"default\"]; });\n\n/* harmony import */ var _uncurryN_js__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(/*! ./uncurryN.js */ \"./node_modules/ramda/es/uncurryN.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uncurryN\", function() { return _uncurryN_js__WEBPACK_IMPORTED_MODULE_231__[\"default\"]; });\n\n/* harmony import */ var _unfold_js__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(/*! ./unfold.js */ \"./node_modules/ramda/es/unfold.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unfold\", function() { return _unfold_js__WEBPACK_IMPORTED_MODULE_232__[\"default\"]; });\n\n/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(/*! ./union.js */ \"./node_modules/ramda/es/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union_js__WEBPACK_IMPORTED_MODULE_233__[\"default\"]; });\n\n/* harmony import */ var _unionWith_js__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(/*! ./unionWith.js */ \"./node_modules/ramda/es/unionWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unionWith\", function() { return _unionWith_js__WEBPACK_IMPORTED_MODULE_234__[\"default\"]; });\n\n/* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(/*! ./uniq.js */ \"./node_modules/ramda/es/uniq.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniq\", function() { return _uniq_js__WEBPACK_IMPORTED_MODULE_235__[\"default\"]; });\n\n/* harmony import */ var _uniqBy_js__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(/*! ./uniqBy.js */ \"./node_modules/ramda/es/uniqBy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqBy\", function() { return _uniqBy_js__WEBPACK_IMPORTED_MODULE_236__[\"default\"]; });\n\n/* harmony import */ var _uniqWith_js__WEBPACK_IMPORTED_MODULE_237__ = __webpack_require__(/*! ./uniqWith.js */ \"./node_modules/ramda/es/uniqWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqWith\", function() { return _uniqWith_js__WEBPACK_IMPORTED_MODULE_237__[\"default\"]; });\n\n/* harmony import */ var _unless_js__WEBPACK_IMPORTED_MODULE_238__ = __webpack_require__(/*! ./unless.js */ \"./node_modules/ramda/es/unless.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unless\", function() { return _unless_js__WEBPACK_IMPORTED_MODULE_238__[\"default\"]; });\n\n/* harmony import */ var _unnest_js__WEBPACK_IMPORTED_MODULE_239__ = __webpack_require__(/*! ./unnest.js */ \"./node_modules/ramda/es/unnest.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unnest\", function() { return _unnest_js__WEBPACK_IMPORTED_MODULE_239__[\"default\"]; });\n\n/* harmony import */ var _until_js__WEBPACK_IMPORTED_MODULE_240__ = __webpack_require__(/*! ./until.js */ \"./node_modules/ramda/es/until.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"until\", function() { return _until_js__WEBPACK_IMPORTED_MODULE_240__[\"default\"]; });\n\n/* harmony import */ var _update_js__WEBPACK_IMPORTED_MODULE_241__ = __webpack_require__(/*! ./update.js */ \"./node_modules/ramda/es/update.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"update\", function() { return _update_js__WEBPACK_IMPORTED_MODULE_241__[\"default\"]; });\n\n/* harmony import */ var _useWith_js__WEBPACK_IMPORTED_MODULE_242__ = __webpack_require__(/*! ./useWith.js */ \"./node_modules/ramda/es/useWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useWith\", function() { return _useWith_js__WEBPACK_IMPORTED_MODULE_242__[\"default\"]; });\n\n/* harmony import */ var _values_js__WEBPACK_IMPORTED_MODULE_243__ = __webpack_require__(/*! ./values.js */ \"./node_modules/ramda/es/values.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return _values_js__WEBPACK_IMPORTED_MODULE_243__[\"default\"]; });\n\n/* harmony import */ var _valuesIn_js__WEBPACK_IMPORTED_MODULE_244__ = __webpack_require__(/*! ./valuesIn.js */ \"./node_modules/ramda/es/valuesIn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"valuesIn\", function() { return _valuesIn_js__WEBPACK_IMPORTED_MODULE_244__[\"default\"]; });\n\n/* harmony import */ var _view_js__WEBPACK_IMPORTED_MODULE_245__ = __webpack_require__(/*! ./view.js */ \"./node_modules/ramda/es/view.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"view\", function() { return _view_js__WEBPACK_IMPORTED_MODULE_245__[\"default\"]; });\n\n/* harmony import */ var _when_js__WEBPACK_IMPORTED_MODULE_246__ = __webpack_require__(/*! ./when.js */ \"./node_modules/ramda/es/when.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"when\", function() { return _when_js__WEBPACK_IMPORTED_MODULE_246__[\"default\"]; });\n\n/* harmony import */ var _where_js__WEBPACK_IMPORTED_MODULE_247__ = __webpack_require__(/*! ./where.js */ \"./node_modules/ramda/es/where.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"where\", function() { return _where_js__WEBPACK_IMPORTED_MODULE_247__[\"default\"]; });\n\n/* harmony import */ var _whereEq_js__WEBPACK_IMPORTED_MODULE_248__ = __webpack_require__(/*! ./whereEq.js */ \"./node_modules/ramda/es/whereEq.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"whereEq\", function() { return _whereEq_js__WEBPACK_IMPORTED_MODULE_248__[\"default\"]; });\n\n/* harmony import */ var _without_js__WEBPACK_IMPORTED_MODULE_249__ = __webpack_require__(/*! ./without.js */ \"./node_modules/ramda/es/without.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"without\", function() { return _without_js__WEBPACK_IMPORTED_MODULE_249__[\"default\"]; });\n\n/* harmony import */ var _xprod_js__WEBPACK_IMPORTED_MODULE_250__ = __webpack_require__(/*! ./xprod.js */ \"./node_modules/ramda/es/xprod.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"xprod\", function() { return _xprod_js__WEBPACK_IMPORTED_MODULE_250__[\"default\"]; });\n\n/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_251__ = __webpack_require__(/*! ./zip.js */ \"./node_modules/ramda/es/zip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zip\", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_251__[\"default\"]; });\n\n/* harmony import */ var _zipObj_js__WEBPACK_IMPORTED_MODULE_252__ = __webpack_require__(/*! ./zipObj.js */ \"./node_modules/ramda/es/zipObj.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zipObj\", function() { return _zipObj_js__WEBPACK_IMPORTED_MODULE_252__[\"default\"]; });\n\n/* harmony import */ var _zipWith_js__WEBPACK_IMPORTED_MODULE_253__ = __webpack_require__(/*! ./zipWith.js */ \"./node_modules/ramda/es/zipWith.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zipWith\", function() { return _zipWith_js__WEBPACK_IMPORTED_MODULE_253__[\"default\"]; });\n\n/* harmony import */ var _thunkify_js__WEBPACK_IMPORTED_MODULE_254__ = __webpack_require__(/*! ./thunkify.js */ \"./node_modules/ramda/es/thunkify.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"thunkify\", function() { return _thunkify_js__WEBPACK_IMPORTED_MODULE_254__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/index.js?");

/***/ }),

/***/ "./node_modules/ramda/es/indexBy.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/indexBy.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy.js */ \"./node_modules/ramda/es/reduceBy.js\");\n\n\n/**\n * Given a function that generates a key, turns a list of objects into an\n * object indexing the objects by the given key. Note that if multiple\n * objects generate the same value for the indexing key only the last value\n * will be included in the generated object.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig (a -> String) -> [{k: v}] -> {k: {k: v}}\n * @param {Function} fn Function :: a -> String\n * @param {Array} array The array of objects to index\n * @return {Object} An object indexing each array element by the given property.\n * @example\n *\n *      const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}];\n *      R.indexBy(R.prop('id'), list);\n *      //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}}\n */\nvar indexBy = /*#__PURE__*/Object(_reduceBy_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (acc, elem) {\n  return elem;\n}, null);\n/* harmony default export */ __webpack_exports__[\"default\"] = (indexBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/indexBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/indexOf.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/indexOf.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_indexOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_indexOf.js */ \"./node_modules/ramda/es/internal/_indexOf.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n\n\n\n\n/**\n * Returns the position of the first occurrence of an item in an array, or -1\n * if the item is not included in the array. [`R.equals`](#equals) is used to\n * determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Number\n * @param {*} target The item to find.\n * @param {Array} xs The array to search in.\n * @return {Number} the index of the target, or -1 if the target is not found.\n * @see R.lastIndexOf\n * @example\n *\n *      R.indexOf(3, [1,2,3,4]); //=> 2\n *      R.indexOf(10, [1,2,3,4]); //=> -1\n */\nvar indexOf = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function indexOf(target, xs) {\n  return typeof xs.indexOf === 'function' && !Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(xs) ? xs.indexOf(target) : Object(_internal_indexOf_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(xs, target, 0);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (indexOf);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/indexOf.js?");

/***/ }),

/***/ "./node_modules/ramda/es/init.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/init.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n/**\n * Returns all but the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.last, R.head, R.tail\n * @example\n *\n *      R.init([1, 2, 3]);  //=> [1, 2]\n *      R.init([1, 2]);     //=> [1]\n *      R.init([1]);        //=> []\n *      R.init([]);         //=> []\n *\n *      R.init('abc');  //=> 'ab'\n *      R.init('ab');   //=> 'a'\n *      R.init('a');    //=> ''\n *      R.init('');     //=> ''\n */\nvar init = /*#__PURE__*/Object(_slice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0, -1);\n/* harmony default export */ __webpack_exports__[\"default\"] = (init);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/init.js?");

/***/ }),

/***/ "./node_modules/ramda/es/innerJoin.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/innerJoin.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includesWith.js */ \"./node_modules/ramda/es/internal/_includesWith.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter.js */ \"./node_modules/ramda/es/internal/_filter.js\");\n\n\n\n\n/**\n * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list\n * `xs'` comprising each of the elements of `xs` which is equal to one or more\n * elements of `ys` according to `pred`.\n *\n * `pred` must be a binary function expecting an element from each list.\n *\n * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should\n * not be significant, but since `xs'` is ordered the implementation guarantees\n * that its values are in the same order as they appear in `xs`. Duplicates are\n * not removed, so `xs'` may contain duplicates if `xs` contains duplicates.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Relation\n * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a]\n * @param {Function} pred\n * @param {Array} xs\n * @param {Array} ys\n * @return {Array}\n * @see R.intersection\n * @example\n *\n *      R.innerJoin(\n *        (record, id) => record.id === id,\n *        [{id: 824, name: 'Richie Furay'},\n *         {id: 956, name: 'Dewey Martin'},\n *         {id: 313, name: 'Bruce Palmer'},\n *         {id: 456, name: 'Stephen Stills'},\n *         {id: 177, name: 'Neil Young'}],\n *        [177, 456, 999]\n *      );\n *      //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}]\n */\nvar innerJoin = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function innerJoin(pred, xs, ys) {\n  return Object(_internal_filter_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (x) {\n    return Object(_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pred, x, ys);\n  }, xs);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (innerJoin);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/innerJoin.js?");

/***/ }),

/***/ "./node_modules/ramda/es/insert.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/insert.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Inserts the supplied element into the list, at the specified `index`. _Note that\n\n * this is not destructive_: it returns a copy of the list with the changes.\n * <small>No lists have been harmed in the application of this function.</small>\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> a -> [a] -> [a]\n * @param {Number} index The position to insert the element\n * @param {*} elt The element to insert into the Array\n * @param {Array} list The list to insert into\n * @return {Array} A new Array with `elt` inserted at `index`.\n * @example\n *\n *      R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4]\n */\nvar insert = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function insert(idx, elt, list) {\n  idx = idx < list.length && idx >= 0 ? idx : list.length;\n  var result = Array.prototype.slice.call(list, 0);\n  result.splice(idx, 0, elt);\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (insert);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/insert.js?");

/***/ }),

/***/ "./node_modules/ramda/es/insertAll.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/insertAll.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Inserts the sub-list into the list, at the specified `index`. _Note that this is not\n * destructive_: it returns a copy of the list with the changes.\n * <small>No lists have been harmed in the application of this function.</small>\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig Number -> [a] -> [a] -> [a]\n * @param {Number} index The position to insert the sub-list\n * @param {Array} elts The sub-list to insert into the Array\n * @param {Array} list The list to insert the sub-list into\n * @return {Array} A new Array with `elts` inserted starting at `index`.\n * @example\n *\n *      R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]\n */\nvar insertAll = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function insertAll(idx, elts, list) {\n  idx = idx < list.length && idx >= 0 ? idx : list.length;\n  return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (insertAll);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/insertAll.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_Set.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_Set.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n\n\nvar _Set = /*#__PURE__*/function () {\n  function _Set() {\n    /* globals Set */\n    this._nativeSet = typeof Set === 'function' ? new Set() : null;\n    this._items = {};\n  }\n\n  // until we figure out why jsdoc chokes on this\n  // @param item The item to add to the Set\n  // @returns {boolean} true if the item did not exist prior, otherwise false\n  //\n  _Set.prototype.add = function (item) {\n    return !hasOrAdd(item, true, this);\n  };\n\n  //\n  // @param item The item to check for existence in the Set\n  // @returns {boolean} true if the item exists in the Set, otherwise false\n  //\n  _Set.prototype.has = function (item) {\n    return hasOrAdd(item, false, this);\n  };\n\n  //\n  // Combines the logic for checking whether an item is a member of the set and\n  // for adding a new item to the set.\n  //\n  // @param item       The item to check or add to the Set instance.\n  // @param shouldAdd  If true, the item will be added to the set if it doesn't\n  //                   already exist.\n  // @param set        The set instance to check or add to.\n  // @return {boolean} true if the item already existed, otherwise false.\n  //\n  return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n  var type = typeof item;\n  var prevSize, newSize;\n  switch (type) {\n    case 'string':\n    case 'number':\n      // distinguish between +0 and -0\n      if (item === 0 && 1 / item === -Infinity) {\n        if (set._items['-0']) {\n          return true;\n        } else {\n          if (shouldAdd) {\n            set._items['-0'] = true;\n          }\n          return false;\n        }\n      }\n      // these types can all utilise the native Set\n      if (set._nativeSet !== null) {\n        if (shouldAdd) {\n          prevSize = set._nativeSet.size;\n          set._nativeSet.add(item);\n          newSize = set._nativeSet.size;\n          return newSize === prevSize;\n        } else {\n          return set._nativeSet.has(item);\n        }\n      } else {\n        if (!(type in set._items)) {\n          if (shouldAdd) {\n            set._items[type] = {};\n            set._items[type][item] = true;\n          }\n          return false;\n        } else if (item in set._items[type]) {\n          return true;\n        } else {\n          if (shouldAdd) {\n            set._items[type][item] = true;\n          }\n          return false;\n        }\n      }\n\n    case 'boolean':\n      // set._items['boolean'] holds a two element array\n      // representing [ falseExists, trueExists ]\n      if (type in set._items) {\n        var bIdx = item ? 1 : 0;\n        if (set._items[type][bIdx]) {\n          return true;\n        } else {\n          if (shouldAdd) {\n            set._items[type][bIdx] = true;\n          }\n          return false;\n        }\n      } else {\n        if (shouldAdd) {\n          set._items[type] = item ? [false, true] : [true, false];\n        }\n        return false;\n      }\n\n    case 'function':\n      // compare functions for reference equality\n      if (set._nativeSet !== null) {\n        if (shouldAdd) {\n          prevSize = set._nativeSet.size;\n          set._nativeSet.add(item);\n          newSize = set._nativeSet.size;\n          return newSize === prevSize;\n        } else {\n          return set._nativeSet.has(item);\n        }\n      } else {\n        if (!(type in set._items)) {\n          if (shouldAdd) {\n            set._items[type] = [item];\n          }\n          return false;\n        }\n        if (!Object(_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(item, set._items[type])) {\n          if (shouldAdd) {\n            set._items[type].push(item);\n          }\n          return false;\n        }\n        return true;\n      }\n\n    case 'undefined':\n      if (set._items[type]) {\n        return true;\n      } else {\n        if (shouldAdd) {\n          set._items[type] = true;\n        }\n        return false;\n      }\n\n    case 'object':\n      if (item === null) {\n        if (!set._items['null']) {\n          if (shouldAdd) {\n            set._items['null'] = true;\n          }\n          return false;\n        }\n        return true;\n      }\n    /* falls through */\n    default:\n      // reduce the search size of heterogeneous sets by creating buckets\n      // for each type.\n      type = Object.prototype.toString.call(item);\n      if (!(type in set._items)) {\n        if (shouldAdd) {\n          set._items[type] = [item];\n        }\n        return false;\n      }\n      // scan through all previously applied items\n      if (!Object(_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(item, set._items[type])) {\n        if (shouldAdd) {\n          set._items[type].push(item);\n        }\n        return false;\n      }\n      return true;\n  }\n}\n\n// A simple Set type that honours R.equals semantics\n/* harmony default export */ __webpack_exports__[\"default\"] = (_Set);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_Set.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_aperture.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_aperture.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _aperture; });\nfunction _aperture(n, list) {\n  var idx = 0;\n  var limit = list.length - (n - 1);\n  var acc = new Array(limit >= 0 ? limit : 0);\n  while (idx < limit) {\n    acc[idx] = Array.prototype.slice.call(list, idx, idx + n);\n    idx += 1;\n  }\n  return acc;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_aperture.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_arity.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_arity.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arity; });\nfunction _arity(n, fn) {\n  /* eslint-disable no-unused-vars */\n  switch (n) {\n    case 0:\n      return function () {\n        return fn.apply(this, arguments);\n      };\n    case 1:\n      return function (a0) {\n        return fn.apply(this, arguments);\n      };\n    case 2:\n      return function (a0, a1) {\n        return fn.apply(this, arguments);\n      };\n    case 3:\n      return function (a0, a1, a2) {\n        return fn.apply(this, arguments);\n      };\n    case 4:\n      return function (a0, a1, a2, a3) {\n        return fn.apply(this, arguments);\n      };\n    case 5:\n      return function (a0, a1, a2, a3, a4) {\n        return fn.apply(this, arguments);\n      };\n    case 6:\n      return function (a0, a1, a2, a3, a4, a5) {\n        return fn.apply(this, arguments);\n      };\n    case 7:\n      return function (a0, a1, a2, a3, a4, a5, a6) {\n        return fn.apply(this, arguments);\n      };\n    case 8:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n        return fn.apply(this, arguments);\n      };\n    case 9:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n        return fn.apply(this, arguments);\n      };\n    case 10:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n        return fn.apply(this, arguments);\n      };\n    default:\n      throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n  }\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_arity.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_arrayFromIterator.js":
/*!**************************************************************!*\
  !*** ./node_modules/ramda/es/internal/_arrayFromIterator.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayFromIterator; });\nfunction _arrayFromIterator(iter) {\n  var list = [];\n  var next;\n  while (!(next = iter.next()).done) {\n    list.push(next.value);\n  }\n  return list;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_arrayFromIterator.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_assertPromise.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_assertPromise.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _assertPromise; });\n/* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isFunction.js */ \"./node_modules/ramda/es/internal/_isFunction.js\");\n/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_toString.js */ \"./node_modules/ramda/es/internal/_toString.js\");\n\n\n\nfunction _assertPromise(name, p) {\n  if (p == null || !Object(_isFunction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(p.then)) {\n    throw new TypeError('`' + name + '` expected a Promise, received ' + Object(_toString_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p, []));\n  }\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_assertPromise.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_checkForMethod.js":
/*!***********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_checkForMethod.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _checkForMethod; });\n/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implemtation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\nfunction _checkForMethod(methodname, fn) {\n  return function () {\n    var length = arguments.length;\n    if (length === 0) {\n      return fn();\n    }\n    var obj = arguments[length - 1];\n    return Object(_isArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_checkForMethod.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_clone.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_clone.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _clone; });\n/* harmony import */ var _cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_cloneRegExp.js */ \"./node_modules/ramda/es/internal/_cloneRegExp.js\");\n/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.js */ \"./node_modules/ramda/es/type.js\");\n\n\n\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\nfunction _clone(value, refFrom, refTo, deep) {\n  var copy = function copy(copiedValue) {\n    var len = refFrom.length;\n    var idx = 0;\n    while (idx < len) {\n      if (value === refFrom[idx]) {\n        return refTo[idx];\n      }\n      idx += 1;\n    }\n    refFrom[idx + 1] = value;\n    refTo[idx + 1] = copiedValue;\n    for (var key in value) {\n      copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n    }\n    return copiedValue;\n  };\n  switch (Object(_type_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value)) {\n    case 'Object':\n      return copy({});\n    case 'Array':\n      return copy([]);\n    case 'Date':\n      return new Date(value.valueOf());\n    case 'RegExp':\n      return Object(_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value);\n    default:\n      return value;\n  }\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_clone.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_cloneRegExp.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_cloneRegExp.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _cloneRegExp; });\nfunction _cloneRegExp(pattern) {\n                                  return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_cloneRegExp.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_complement.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_complement.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _complement; });\nfunction _complement(f) {\n  return function () {\n    return !f.apply(this, arguments);\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_complement.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_concat.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_concat.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _concat; });\n/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n *      _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nfunction _concat(set1, set2) {\n  set1 = set1 || [];\n  set2 = set2 || [];\n  var idx;\n  var len1 = set1.length;\n  var len2 = set2.length;\n  var result = [];\n\n  idx = 0;\n  while (idx < len1) {\n    result[result.length] = set1[idx];\n    idx += 1;\n  }\n  idx = 0;\n  while (idx < len2) {\n    result[result.length] = set2[idx];\n    idx += 1;\n  }\n  return result;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_concat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_createPartialApplicator.js":
/*!********************************************************************!*\
  !*** ./node_modules/ramda/es/internal/_createPartialApplicator.js ***!
  \********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createPartialApplicator; });\n/* harmony import */ var _arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\nfunction _createPartialApplicator(concat) {\n  return Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (fn, args) {\n    return Object(_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Math.max(0, fn.length - args.length), function () {\n      return fn.apply(this, concat(args, arguments));\n    });\n  });\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_createPartialApplicator.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry1.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry1.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _curry1; });\n/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ \"./node_modules/ramda/es/internal/_isPlaceholder.js\");\n\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nfunction _curry1(fn) {\n  return function f1(a) {\n    if (arguments.length === 0 || Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a)) {\n      return f1;\n    } else {\n      return fn.apply(this, arguments);\n    }\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_curry1.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry2.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry2.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _curry2; });\n/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder.js */ \"./node_modules/ramda/es/internal/_isPlaceholder.js\");\n\n\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nfunction _curry2(fn) {\n  return function f2(a, b) {\n    switch (arguments.length) {\n      case 0:\n        return f2;\n      case 1:\n        return Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a) ? f2 : Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_b) {\n          return fn(a, _b);\n        });\n      default:\n        return Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(b) ? f2 : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a) ? Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_a) {\n          return fn(_a, b);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(b) ? Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_b) {\n          return fn(a, _b);\n        }) : fn(a, b);\n    }\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_curry2.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry3.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry3.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _curry3; });\n/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isPlaceholder.js */ \"./node_modules/ramda/es/internal/_isPlaceholder.js\");\n\n\n\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nfunction _curry3(fn) {\n  return function f3(a, b, c) {\n    switch (arguments.length) {\n      case 0:\n        return f3;\n      case 1:\n        return Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) ? f3 : Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_b, _c) {\n          return fn(a, _b, _c);\n        });\n      case 2:\n        return Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) ? f3 : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) ? Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_a, _c) {\n          return fn(_a, b, _c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) ? Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_b, _c) {\n          return fn(a, _b, _c);\n        }) : Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_c) {\n          return fn(a, b, _c);\n        });\n      default:\n        return Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(c) ? f3 : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) ? Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_a, _b) {\n          return fn(_a, _b, c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(c) ? Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_a, _c) {\n          return fn(_a, b, _c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) && Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(c) ? Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_b, _c) {\n          return fn(a, _b, _c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a) ? Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_a) {\n          return fn(_a, b, c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(b) ? Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_b) {\n          return fn(a, _b, c);\n        }) : Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(c) ? Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (_c) {\n          return fn(a, b, _c);\n        }) : fn(a, b, c);\n    }\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_curry3.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curryN.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curryN.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _curryN; });\n/* harmony import */ var _arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder.js */ \"./node_modules/ramda/es/internal/_isPlaceholder.js\");\n\n\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nfunction _curryN(length, received, fn) {\n  return function () {\n    var combined = [];\n    var argsIdx = 0;\n    var left = length;\n    var combinedIdx = 0;\n    while (combinedIdx < received.length || argsIdx < arguments.length) {\n      var result;\n      if (combinedIdx < received.length && (!Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(received[combinedIdx]) || argsIdx >= arguments.length)) {\n        result = received[combinedIdx];\n      } else {\n        result = arguments[argsIdx];\n        argsIdx += 1;\n      }\n      combined[combinedIdx] = result;\n      if (!Object(_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(result)) {\n        left -= 1;\n      }\n      combinedIdx += 1;\n    }\n    return left <= 0 ? fn.apply(this, combined) : Object(_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(left, _curryN(length, combined, fn));\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_curryN.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_dispatchable.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_dispatchable.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _dispatchable; });\n/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _isTransformer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isTransformer.js */ \"./node_modules/ramda/es/internal/_isTransformer.js\");\n\n\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer [xf] to return a new transformer (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} xf transducer to initialize if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\nfunction _dispatchable(methodNames, xf, fn) {\n  return function () {\n    if (arguments.length === 0) {\n      return fn();\n    }\n    var args = Array.prototype.slice.call(arguments, 0);\n    var obj = args.pop();\n    if (!Object(_isArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj)) {\n      var idx = 0;\n      while (idx < methodNames.length) {\n        if (typeof obj[methodNames[idx]] === 'function') {\n          return obj[methodNames[idx]].apply(obj, args);\n        }\n        idx += 1;\n      }\n      if (Object(_isTransformer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj)) {\n        var transducer = xf.apply(null, args);\n        return transducer(obj);\n      }\n    }\n    return fn.apply(this, arguments);\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_dispatchable.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_dropLast.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_dropLast.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return dropLast; });\n/* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../take.js */ \"./node_modules/ramda/es/take.js\");\n\n\nfunction dropLast(n, xs) {\n  return Object(_take_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(n < xs.length ? xs.length - n : 0, xs);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_dropLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_dropLastWhile.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_dropLastWhile.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return dropLastWhile; });\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\nfunction dropLastWhile(pred, xs) {\n  var idx = xs.length - 1;\n  while (idx >= 0 && pred(xs[idx])) {\n    idx -= 1;\n  }\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0, idx + 1, xs);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_dropLastWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_equals.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_equals.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _equals; });\n/* harmony import */ var _arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayFromIterator.js */ \"./node_modules/ramda/es/internal/_arrayFromIterator.js\");\n/* harmony import */ var _includesWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_includesWith.js */ \"./node_modules/ramda/es/internal/_includesWith.js\");\n/* harmony import */ var _functionName_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_functionName.js */ \"./node_modules/ramda/es/internal/_functionName.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _objectIs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_objectIs.js */ \"./node_modules/ramda/es/internal/_objectIs.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../keys.js */ \"./node_modules/ramda/es/keys.js\");\n/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type.js */ \"./node_modules/ramda/es/type.js\");\n\n\n\n\n\n\n\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n  var a = Object(_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(aIterator);\n  var b = Object(_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(bIterator);\n\n  function eq(_a, _b) {\n    return _equals(_a, _b, stackA.slice(), stackB.slice());\n  }\n\n  // if *a* array contains any element that is not included in *b*\n  return !Object(_includesWith_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (b, aItem) {\n    return !Object(_includesWith_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(eq, aItem, b);\n  }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n  if (Object(_objectIs_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b)) {\n    return true;\n  }\n\n  var typeA = Object(_type_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(a);\n\n  if (typeA !== Object(_type_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(b)) {\n    return false;\n  }\n\n  if (a == null || b == null) {\n    return false;\n  }\n\n  if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n    return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n  }\n\n  if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n    return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n  }\n\n  switch (typeA) {\n    case 'Arguments':\n    case 'Array':\n    case 'Object':\n      if (typeof a.constructor === 'function' && Object(_functionName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(a.constructor) === 'Promise') {\n        return a === b;\n      }\n      break;\n    case 'Boolean':\n    case 'Number':\n    case 'String':\n      if (!(typeof a === typeof b && Object(_objectIs_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a.valueOf(), b.valueOf()))) {\n        return false;\n      }\n      break;\n    case 'Date':\n      if (!Object(_objectIs_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a.valueOf(), b.valueOf())) {\n        return false;\n      }\n      break;\n    case 'Error':\n      return a.name === b.name && a.message === b.message;\n    case 'RegExp':\n      if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n        return false;\n      }\n      break;\n  }\n\n  var idx = stackA.length - 1;\n  while (idx >= 0) {\n    if (stackA[idx] === a) {\n      return stackB[idx] === b;\n    }\n    idx -= 1;\n  }\n\n  switch (typeA) {\n    case 'Map':\n      if (a.size !== b.size) {\n        return false;\n      }\n\n      return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n    case 'Set':\n      if (a.size !== b.size) {\n        return false;\n      }\n\n      return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n    case 'Arguments':\n    case 'Array':\n    case 'Object':\n    case 'Boolean':\n    case 'Number':\n    case 'String':\n    case 'Date':\n    case 'Error':\n    case 'RegExp':\n    case 'Int8Array':\n    case 'Uint8Array':\n    case 'Uint8ClampedArray':\n    case 'Int16Array':\n    case 'Uint16Array':\n    case 'Int32Array':\n    case 'Uint32Array':\n    case 'Float32Array':\n    case 'Float64Array':\n    case 'ArrayBuffer':\n      break;\n    default:\n      // Values of other types are only equal if identical.\n      return false;\n  }\n\n  var keysA = Object(_keys_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(a);\n  if (keysA.length !== Object(_keys_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(b).length) {\n    return false;\n  }\n\n  var extendedStackA = stackA.concat([a]);\n  var extendedStackB = stackB.concat([b]);\n\n  idx = keysA.length - 1;\n  while (idx >= 0) {\n    var key = keysA[idx];\n    if (!(Object(_has_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n      return false;\n    }\n    idx -= 1;\n  }\n  return true;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_equals.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_filter.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_filter.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _filter; });\nfunction _filter(fn, list) {\n  var idx = 0;\n  var len = list.length;\n  var result = [];\n\n  while (idx < len) {\n    if (fn(list[idx])) {\n      result[result.length] = list[idx];\n    }\n    idx += 1;\n  }\n  return result;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_filter.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_flatCat.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_flatCat.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _forceReduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_forceReduced.js */ \"./node_modules/ramda/es/internal/_forceReduced.js\");\n/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArrayLike.js */ \"./node_modules/ramda/es/internal/_isArrayLike.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\n\nvar preservingReduced = function (xf) {\n  return {\n    '@@transducer/init': _xfBase_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].init,\n    '@@transducer/result': function (result) {\n      return xf['@@transducer/result'](result);\n    },\n    '@@transducer/step': function (result, input) {\n      var ret = xf['@@transducer/step'](result, input);\n      return ret['@@transducer/reduced'] ? Object(_forceReduced_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ret) : ret;\n    }\n  };\n};\n\nvar _flatCat = function _xcat(xf) {\n  var rxf = preservingReduced(xf);\n  return {\n    '@@transducer/init': _xfBase_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].init,\n    '@@transducer/result': function (result) {\n      return rxf['@@transducer/result'](result);\n    },\n    '@@transducer/step': function (result, input) {\n      return !Object(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(input) ? Object(_reduce_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(rxf, result, [input]) : Object(_reduce_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(rxf, result, input);\n    }\n  };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_flatCat);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_flatCat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_forceReduced.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_forceReduced.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _forceReduced; });\nfunction _forceReduced(x) {\n  return {\n    '@@transducer/value': x,\n    '@@transducer/reduced': true\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_forceReduced.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_functionName.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_functionName.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _functionName; });\nfunction _functionName(f) {\n  // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n  var match = String(f).match(/^function (\\w*)/);\n  return match == null ? '' : match[1];\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_functionName.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_has.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_has.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _has; });\nfunction _has(prop, obj) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_has.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_identity.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_identity.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _identity; });\nfunction _identity(x) {\n  return x;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_identity.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_includes.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_includes.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _includes; });\n/* harmony import */ var _indexOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_indexOf.js */ \"./node_modules/ramda/es/internal/_indexOf.js\");\n\n\nfunction _includes(a, list) {\n  return Object(_indexOf_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list, a, 0) >= 0;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_includes.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_includesWith.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_includesWith.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _includesWith; });\nfunction _includesWith(pred, x, list) {\n  var idx = 0;\n  var len = list.length;\n\n  while (idx < len) {\n    if (pred(x, list[idx])) {\n      return true;\n    }\n    idx += 1;\n  }\n  return false;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_includesWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_indexOf.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_indexOf.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _indexOf; });\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\nfunction _indexOf(list, a, idx) {\n  var inf, item;\n  // Array.prototype.indexOf doesn't exist below IE9\n  if (typeof list.indexOf === 'function') {\n    switch (typeof a) {\n      case 'number':\n        if (a === 0) {\n          // manually crawl the list to distinguish between +0 and -0\n          inf = 1 / a;\n          while (idx < list.length) {\n            item = list[idx];\n            if (item === 0 && 1 / item === inf) {\n              return idx;\n            }\n            idx += 1;\n          }\n          return -1;\n        } else if (a !== a) {\n          // NaN\n          while (idx < list.length) {\n            item = list[idx];\n            if (typeof item === 'number' && item !== item) {\n              return idx;\n            }\n            idx += 1;\n          }\n          return -1;\n        }\n        // non-zero numbers can utilise Set\n        return list.indexOf(a, idx);\n\n      // all these types can utilise Set\n      case 'string':\n      case 'boolean':\n      case 'function':\n      case 'undefined':\n        return list.indexOf(a, idx);\n\n      case 'object':\n        if (a === null) {\n          // null can utilise Set\n          return list.indexOf(a, idx);\n        }\n    }\n  }\n  // anything else not covered above, defer to R.equals\n  while (idx < list.length) {\n    if (Object(_equals_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list[idx], a)) {\n      return idx;\n    }\n    idx += 1;\n  }\n  return -1;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_indexOf.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArguments.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArguments.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n  return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n    return toString.call(x) === '[object Arguments]';\n  } : function _isArguments(x) {\n    return Object(_has_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('callee', x);\n  };\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_isArguments);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isArguments.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArray.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArray.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n *      _isArray([]); //=> true\n *      _isArray(null); //=> false\n *      _isArray({}); //=> false\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (Array.isArray || function _isArray(val) {\n  return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n});\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isArray.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArrayLike.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArrayLike.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _isString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isString.js */ \"./node_modules/ramda/es/internal/_isString.js\");\n\n\n\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n *      _isArrayLike([]); //=> true\n *      _isArrayLike(true); //=> false\n *      _isArrayLike({}); //=> false\n *      _isArrayLike({length: 10}); //=> false\n *      _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\nvar _isArrayLike = /*#__PURE__*/Object(_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function isArrayLike(x) {\n  if (Object(_isArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(x)) {\n    return true;\n  }\n  if (!x) {\n    return false;\n  }\n  if (typeof x !== 'object') {\n    return false;\n  }\n  if (Object(_isString_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x)) {\n    return false;\n  }\n  if (x.nodeType === 1) {\n    return !!x.length;\n  }\n  if (x.length === 0) {\n    return true;\n  }\n  if (x.length > 0) {\n    return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n  }\n  return false;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_isArrayLike);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isArrayLike.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isFunction.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isFunction.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isFunction; });\nfunction _isFunction(x) {\n  return Object.prototype.toString.call(x) === '[object Function]';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isFunction.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isInteger.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isInteger.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (Number.isInteger || function _isInteger(n) {\n  return n << 0 === n;\n});\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isInteger.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isNumber.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isNumber.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isNumber; });\nfunction _isNumber(x) {\n  return Object.prototype.toString.call(x) === '[object Number]';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isNumber.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isObject.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isObject.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isObject; });\nfunction _isObject(x) {\n  return Object.prototype.toString.call(x) === '[object Object]';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isObject.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isPlaceholder.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isPlaceholder.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isPlaceholder; });\nfunction _isPlaceholder(a) {\n       return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isPlaceholder.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isRegExp.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isRegExp.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isRegExp; });\nfunction _isRegExp(x) {\n  return Object.prototype.toString.call(x) === '[object RegExp]';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isRegExp.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isString.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isString.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isString; });\nfunction _isString(x) {\n  return Object.prototype.toString.call(x) === '[object String]';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isString.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isTransformer.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isTransformer.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isTransformer; });\nfunction _isTransformer(obj) {\n  return obj != null && typeof obj['@@transducer/step'] === 'function';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_isTransformer.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_makeFlat.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_makeFlat.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _makeFlat; });\n/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike.js */ \"./node_modules/ramda/es/internal/_isArrayLike.js\");\n\n\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\nfunction _makeFlat(recursive) {\n  return function flatt(list) {\n    var value, jlen, j;\n    var result = [];\n    var idx = 0;\n    var ilen = list.length;\n\n    while (idx < ilen) {\n      if (Object(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list[idx])) {\n        value = recursive ? flatt(list[idx]) : list[idx];\n        j = 0;\n        jlen = value.length;\n        while (j < jlen) {\n          result[result.length] = value[j];\n          j += 1;\n        }\n      } else {\n        result[result.length] = list[idx];\n      }\n      idx += 1;\n    }\n    return result;\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_makeFlat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_map.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_map.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _map; });\nfunction _map(fn, functor) {\n  var idx = 0;\n  var len = functor.length;\n  var result = Array(len);\n  while (idx < len) {\n    result[idx] = fn(functor[idx]);\n    idx += 1;\n  }\n  return result;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_map.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_objectAssign.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_objectAssign.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\nfunction _objectAssign(target) {\n  if (target == null) {\n    throw new TypeError('Cannot convert undefined or null to object');\n  }\n\n  var output = Object(target);\n  var idx = 1;\n  var length = arguments.length;\n  while (idx < length) {\n    var source = arguments[idx];\n    if (source != null) {\n      for (var nextKey in source) {\n        if (Object(_has_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(nextKey, source)) {\n          output[nextKey] = source[nextKey];\n        }\n      }\n    }\n    idx += 1;\n  }\n  return output;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof Object.assign === 'function' ? Object.assign : _objectAssign);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_objectAssign.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_objectIs.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_objectIs.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n  // SameValue algorithm\n  if (a === b) {\n    // Steps 1-5, 7-10\n    // Steps 6.b-6.e: +0 != -0\n    return a !== 0 || 1 / a === 1 / b;\n  } else {\n    // Step 6.a: NaN == NaN\n    return a !== a && b !== b;\n  }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof Object.is === 'function' ? Object.is : _objectIs);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_objectIs.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_of.js":
/*!***********************************************!*\
  !*** ./node_modules/ramda/es/internal/_of.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _of; });\nfunction _of(x) {\n  return [x];\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_of.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_pipe.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_pipe.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _pipe; });\nfunction _pipe(f, g) {\n  return function () {\n    return g.call(this, f.apply(this, arguments));\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_pipe.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_pipeP.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_pipeP.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _pipeP; });\nfunction _pipeP(f, g) {\n  return function () {\n    var ctx = this;\n    return f.apply(ctx, arguments).then(function (x) {\n      return g.call(ctx, x);\n    });\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_pipeP.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_quote.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_quote.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _quote; });\nfunction _quote(s) {\n  var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n  .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n\n  return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_quote.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_reduce.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_reduce.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _reduce; });\n/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike.js */ \"./node_modules/ramda/es/internal/_isArrayLike.js\");\n/* harmony import */ var _xwrap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xwrap.js */ \"./node_modules/ramda/es/internal/_xwrap.js\");\n/* harmony import */ var _bind_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../bind.js */ \"./node_modules/ramda/es/bind.js\");\n\n\n\n\nfunction _arrayReduce(xf, acc, list) {\n  var idx = 0;\n  var len = list.length;\n  while (idx < len) {\n    acc = xf['@@transducer/step'](acc, list[idx]);\n    if (acc && acc['@@transducer/reduced']) {\n      acc = acc['@@transducer/value'];\n      break;\n    }\n    idx += 1;\n  }\n  return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n  var step = iter.next();\n  while (!step.done) {\n    acc = xf['@@transducer/step'](acc, step.value);\n    if (acc && acc['@@transducer/reduced']) {\n      acc = acc['@@transducer/value'];\n      break;\n    }\n    step = iter.next();\n  }\n  return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n  return xf['@@transducer/result'](obj[methodName](Object(_bind_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nfunction _reduce(fn, acc, list) {\n  if (typeof fn === 'function') {\n    fn = Object(_xwrap_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn);\n  }\n  if (Object(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list)) {\n    return _arrayReduce(fn, acc, list);\n  }\n  if (typeof list['fantasy-land/reduce'] === 'function') {\n    return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n  }\n  if (list[symIterator] != null) {\n    return _iterableReduce(fn, acc, list[symIterator]());\n  }\n  if (typeof list.next === 'function') {\n    return _iterableReduce(fn, acc, list);\n  }\n  if (typeof list.reduce === 'function') {\n    return _methodReduce(fn, acc, list, 'reduce');\n  }\n\n  throw new TypeError('reduce: list must be array or iterable');\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_reduce.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_reduced.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_reduced.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _reduced; });\nfunction _reduced(x) {\n  return x && x['@@transducer/reduced'] ? x : {\n    '@@transducer/value': x,\n    '@@transducer/reduced': true\n  };\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_reduced.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_stepCat.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_stepCat.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _stepCat; });\n/* harmony import */ var _objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_objectAssign.js */ \"./node_modules/ramda/es/internal/_objectAssign.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_identity.js */ \"./node_modules/ramda/es/internal/_identity.js\");\n/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isArrayLike.js */ \"./node_modules/ramda/es/internal/_isArrayLike.js\");\n/* harmony import */ var _isTransformer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_isTransformer.js */ \"./node_modules/ramda/es/internal/_isTransformer.js\");\n/* harmony import */ var _objOf_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../objOf.js */ \"./node_modules/ramda/es/objOf.js\");\n\n\n\n\n\n\nvar _stepCatArray = {\n  '@@transducer/init': Array,\n  '@@transducer/step': function (xs, x) {\n    xs.push(x);\n    return xs;\n  },\n  '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\nvar _stepCatString = {\n  '@@transducer/init': String,\n  '@@transducer/step': function (a, b) {\n    return a + b;\n  },\n  '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\nvar _stepCatObject = {\n  '@@transducer/init': Object,\n  '@@transducer/step': function (result, input) {\n    return Object(_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(result, Object(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(input) ? Object(_objOf_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(input[0], input[1]) : input);\n  },\n  '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n};\n\nfunction _stepCat(obj) {\n  if (Object(_isTransformer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(obj)) {\n    return obj;\n  }\n  if (Object(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj)) {\n    return _stepCatArray;\n  }\n  if (typeof obj === 'string') {\n    return _stepCatString;\n  }\n  if (typeof obj === 'object') {\n    return _stepCatObject;\n  }\n  throw new Error('Cannot create transformer for ' + obj);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_stepCat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_toISOString.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_toISOString.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n  return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n  return d.toISOString();\n} : function _toISOString(d) {\n  return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_toISOString);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_toISOString.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_toString.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_toString.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toString; });\n/* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_map.js */ \"./node_modules/ramda/es/internal/_map.js\");\n/* harmony import */ var _quote_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_quote.js */ \"./node_modules/ramda/es/internal/_quote.js\");\n/* harmony import */ var _toISOString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_toISOString.js */ \"./node_modules/ramda/es/internal/_toISOString.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keys.js */ \"./node_modules/ramda/es/keys.js\");\n/* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../reject.js */ \"./node_modules/ramda/es/reject.js\");\n\n\n\n\n\n\n\nfunction _toString(x, seen) {\n  var recur = function recur(y) {\n    var xs = seen.concat([x]);\n    return Object(_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(y, xs) ? '<Circular>' : _toString(y, xs);\n  };\n\n  //  mapPairs :: (Object, [String]) -> [String]\n  var mapPairs = function (obj, keys) {\n    return Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (k) {\n      return Object(_quote_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(k) + ': ' + recur(obj[k]);\n    }, keys.slice().sort());\n  };\n\n  switch (Object.prototype.toString.call(x)) {\n    case '[object Arguments]':\n      return '(function() { return arguments; }(' + Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(recur, x).join(', ') + '))';\n    case '[object Array]':\n      return '[' + Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(recur, x).concat(mapPairs(x, Object(_reject_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (k) {\n        return (/^\\d+$/.test(k)\n        );\n      }, Object(_keys_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x)))).join(', ') + ']';\n    case '[object Boolean]':\n      return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n    case '[object Date]':\n      return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : Object(_quote_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_toISOString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(x))) + ')';\n    case '[object Null]':\n      return 'null';\n    case '[object Number]':\n      return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n    case '[object String]':\n      return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : Object(_quote_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x);\n    case '[object Undefined]':\n      return 'undefined';\n    default:\n      if (typeof x.toString === 'function') {\n        var repr = x.toString();\n        if (repr !== '[object Object]') {\n          return repr;\n        }\n      }\n      return '{' + mapPairs(x, Object(_keys_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(x)).join(', ') + '}';\n  }\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_toString.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xall.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xall.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XAll = /*#__PURE__*/function () {\n  function XAll(f, xf) {\n    this.xf = xf;\n    this.f = f;\n    this.all = true;\n  }\n  XAll.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XAll.prototype['@@transducer/result'] = function (result) {\n    if (this.all) {\n      result = this.xf['@@transducer/step'](result, true);\n    }\n    return this.xf['@@transducer/result'](result);\n  };\n  XAll.prototype['@@transducer/step'] = function (result, input) {\n    if (!this.f(input)) {\n      this.all = false;\n      result = Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.xf['@@transducer/step'](result, false));\n    }\n    return result;\n  };\n\n  return XAll;\n}();\n\nvar _xall = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xall(f, xf) {\n  return new XAll(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xall);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xall.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xany.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xany.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XAny = /*#__PURE__*/function () {\n  function XAny(f, xf) {\n    this.xf = xf;\n    this.f = f;\n    this.any = false;\n  }\n  XAny.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XAny.prototype['@@transducer/result'] = function (result) {\n    if (!this.any) {\n      result = this.xf['@@transducer/step'](result, false);\n    }\n    return this.xf['@@transducer/result'](result);\n  };\n  XAny.prototype['@@transducer/step'] = function (result, input) {\n    if (this.f(input)) {\n      this.any = true;\n      result = Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.xf['@@transducer/step'](result, true));\n    }\n    return result;\n  };\n\n  return XAny;\n}();\n\nvar _xany = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xany(f, xf) {\n  return new XAny(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xany);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xany.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xaperture.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xaperture.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XAperture = /*#__PURE__*/function () {\n  function XAperture(n, xf) {\n    this.xf = xf;\n    this.pos = 0;\n    this.full = false;\n    this.acc = new Array(n);\n  }\n  XAperture.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XAperture.prototype['@@transducer/result'] = function (result) {\n    this.acc = null;\n    return this.xf['@@transducer/result'](result);\n  };\n  XAperture.prototype['@@transducer/step'] = function (result, input) {\n    this.store(input);\n    return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result;\n  };\n  XAperture.prototype.store = function (input) {\n    this.acc[this.pos] = input;\n    this.pos += 1;\n    if (this.pos === this.acc.length) {\n      this.pos = 0;\n      this.full = true;\n    }\n  };\n  XAperture.prototype.getCopy = function () {\n    return Object(_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos));\n  };\n\n  return XAperture;\n}();\n\nvar _xaperture = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function _xaperture(n, xf) {\n  return new XAperture(n, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xaperture);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xaperture.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xchain.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xchain.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _flatCat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_flatCat.js */ \"./node_modules/ramda/es/internal/_flatCat.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n\nvar _xchain = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xchain(f, xf) {\n  return Object(_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(f, Object(_flatCat_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(xf));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xchain);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xchain.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xdrop.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xdrop.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XDrop = /*#__PURE__*/function () {\n  function XDrop(n, xf) {\n    this.xf = xf;\n    this.n = n;\n  }\n  XDrop.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XDrop.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XDrop.prototype['@@transducer/step'] = function (result, input) {\n    if (this.n > 0) {\n      this.n -= 1;\n      return result;\n    }\n    return this.xf['@@transducer/step'](result, input);\n  };\n\n  return XDrop;\n}();\n\nvar _xdrop = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xdrop(n, xf) {\n  return new XDrop(n, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xdrop);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xdrop.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xdropLast.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xdropLast.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XDropLast = /*#__PURE__*/function () {\n  function XDropLast(n, xf) {\n    this.xf = xf;\n    this.pos = 0;\n    this.full = false;\n    this.acc = new Array(n);\n  }\n  XDropLast.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XDropLast.prototype['@@transducer/result'] = function (result) {\n    this.acc = null;\n    return this.xf['@@transducer/result'](result);\n  };\n  XDropLast.prototype['@@transducer/step'] = function (result, input) {\n    if (this.full) {\n      result = this.xf['@@transducer/step'](result, this.acc[this.pos]);\n    }\n    this.store(input);\n    return result;\n  };\n  XDropLast.prototype.store = function (input) {\n    this.acc[this.pos] = input;\n    this.pos += 1;\n    if (this.pos === this.acc.length) {\n      this.pos = 0;\n      this.full = true;\n    }\n  };\n\n  return XDropLast;\n}();\n\nvar _xdropLast = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xdropLast(n, xf) {\n  return new XDropLast(n, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xdropLast);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xdropLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xdropLastWhile.js":
/*!***********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xdropLastWhile.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XDropLastWhile = /*#__PURE__*/function () {\n  function XDropLastWhile(fn, xf) {\n    this.f = fn;\n    this.retained = [];\n    this.xf = xf;\n  }\n  XDropLastWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XDropLastWhile.prototype['@@transducer/result'] = function (result) {\n    this.retained = null;\n    return this.xf['@@transducer/result'](result);\n  };\n  XDropLastWhile.prototype['@@transducer/step'] = function (result, input) {\n    return this.f(input) ? this.retain(result, input) : this.flush(result, input);\n  };\n  XDropLastWhile.prototype.flush = function (result, input) {\n    result = Object(_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.xf['@@transducer/step'], result, this.retained);\n    this.retained = [];\n    return this.xf['@@transducer/step'](result, input);\n  };\n  XDropLastWhile.prototype.retain = function (result, input) {\n    this.retained.push(input);\n    return result;\n  };\n\n  return XDropLastWhile;\n}();\n\nvar _xdropLastWhile = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xdropLastWhile(fn, xf) {\n  return new XDropLastWhile(fn, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xdropLastWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xdropLastWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js":
/*!*************************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xdropRepeatsWith.js ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XDropRepeatsWith = /*#__PURE__*/function () {\n  function XDropRepeatsWith(pred, xf) {\n    this.xf = xf;\n    this.pred = pred;\n    this.lastValue = undefined;\n    this.seenFirstValue = false;\n  }\n\n  XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) {\n    var sameAsLast = false;\n    if (!this.seenFirstValue) {\n      this.seenFirstValue = true;\n    } else if (this.pred(this.lastValue, input)) {\n      sameAsLast = true;\n    }\n    this.lastValue = input;\n    return sameAsLast ? result : this.xf['@@transducer/step'](result, input);\n  };\n\n  return XDropRepeatsWith;\n}();\n\nvar _xdropRepeatsWith = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xdropRepeatsWith(pred, xf) {\n  return new XDropRepeatsWith(pred, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xdropRepeatsWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xdropRepeatsWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xdropWhile.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xdropWhile.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XDropWhile = /*#__PURE__*/function () {\n  function XDropWhile(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XDropWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XDropWhile.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XDropWhile.prototype['@@transducer/step'] = function (result, input) {\n    if (this.f) {\n      if (this.f(input)) {\n        return result;\n      }\n      this.f = null;\n    }\n    return this.xf['@@transducer/step'](result, input);\n  };\n\n  return XDropWhile;\n}();\n\nvar _xdropWhile = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xdropWhile(f, xf) {\n  return new XDropWhile(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xdropWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xdropWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfBase.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfBase.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  init: function () {\n    return this.xf['@@transducer/init']();\n  },\n  result: function (result) {\n    return this.xf['@@transducer/result'](result);\n  }\n});\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfBase.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfilter.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfilter.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XFilter = /*#__PURE__*/function () {\n  function XFilter(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XFilter.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XFilter.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XFilter.prototype['@@transducer/step'] = function (result, input) {\n    return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n  };\n\n  return XFilter;\n}();\n\nvar _xfilter = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xfilter(f, xf) {\n  return new XFilter(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xfilter);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfilter.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfind.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfind.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XFind = /*#__PURE__*/function () {\n  function XFind(f, xf) {\n    this.xf = xf;\n    this.f = f;\n    this.found = false;\n  }\n  XFind.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XFind.prototype['@@transducer/result'] = function (result) {\n    if (!this.found) {\n      result = this.xf['@@transducer/step'](result, void 0);\n    }\n    return this.xf['@@transducer/result'](result);\n  };\n  XFind.prototype['@@transducer/step'] = function (result, input) {\n    if (this.f(input)) {\n      this.found = true;\n      result = Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.xf['@@transducer/step'](result, input));\n    }\n    return result;\n  };\n\n  return XFind;\n}();\n\nvar _xfind = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xfind(f, xf) {\n  return new XFind(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xfind);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfind.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfindIndex.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfindIndex.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XFindIndex = /*#__PURE__*/function () {\n  function XFindIndex(f, xf) {\n    this.xf = xf;\n    this.f = f;\n    this.idx = -1;\n    this.found = false;\n  }\n  XFindIndex.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XFindIndex.prototype['@@transducer/result'] = function (result) {\n    if (!this.found) {\n      result = this.xf['@@transducer/step'](result, -1);\n    }\n    return this.xf['@@transducer/result'](result);\n  };\n  XFindIndex.prototype['@@transducer/step'] = function (result, input) {\n    this.idx += 1;\n    if (this.f(input)) {\n      this.found = true;\n      result = Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.xf['@@transducer/step'](result, this.idx));\n    }\n    return result;\n  };\n\n  return XFindIndex;\n}();\n\nvar _xfindIndex = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xfindIndex(f, xf) {\n  return new XFindIndex(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xfindIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfindIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfindLast.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfindLast.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XFindLast = /*#__PURE__*/function () {\n  function XFindLast(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XFindLast.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XFindLast.prototype['@@transducer/result'] = function (result) {\n    return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last));\n  };\n  XFindLast.prototype['@@transducer/step'] = function (result, input) {\n    if (this.f(input)) {\n      this.last = input;\n    }\n    return result;\n  };\n\n  return XFindLast;\n}();\n\nvar _xfindLast = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xfindLast(f, xf) {\n  return new XFindLast(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xfindLast);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfindLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfindLastIndex.js":
/*!***********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfindLastIndex.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XFindLastIndex = /*#__PURE__*/function () {\n  function XFindLastIndex(f, xf) {\n    this.xf = xf;\n    this.f = f;\n    this.idx = -1;\n    this.lastIdx = -1;\n  }\n  XFindLastIndex.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XFindLastIndex.prototype['@@transducer/result'] = function (result) {\n    return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx));\n  };\n  XFindLastIndex.prototype['@@transducer/step'] = function (result, input) {\n    this.idx += 1;\n    if (this.f(input)) {\n      this.lastIdx = this.idx;\n    }\n    return result;\n  };\n\n  return XFindLastIndex;\n}();\n\nvar _xfindLastIndex = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xfindLastIndex(f, xf) {\n  return new XFindLastIndex(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xfindLastIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xfindLastIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xmap.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xmap.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XMap = /*#__PURE__*/function () {\n  function XMap(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XMap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XMap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XMap.prototype['@@transducer/step'] = function (result, input) {\n    return this.xf['@@transducer/step'](result, this.f(input));\n  };\n\n  return XMap;\n}();\n\nvar _xmap = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xmap(f, xf) {\n  return new XMap(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xmap);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xmap.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xreduceBy.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xreduceBy.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curryN.js */ \"./node_modules/ramda/es/internal/_curryN.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XReduceBy = /*#__PURE__*/function () {\n  function XReduceBy(valueFn, valueAcc, keyFn, xf) {\n    this.valueFn = valueFn;\n    this.valueAcc = valueAcc;\n    this.keyFn = keyFn;\n    this.xf = xf;\n    this.inputs = {};\n  }\n  XReduceBy.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XReduceBy.prototype['@@transducer/result'] = function (result) {\n    var key;\n    for (key in this.inputs) {\n      if (Object(_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(key, this.inputs)) {\n        result = this.xf['@@transducer/step'](result, this.inputs[key]);\n        if (result['@@transducer/reduced']) {\n          result = result['@@transducer/value'];\n          break;\n        }\n      }\n    }\n    this.inputs = null;\n    return this.xf['@@transducer/result'](result);\n  };\n  XReduceBy.prototype['@@transducer/step'] = function (result, input) {\n    var key = this.keyFn(input);\n    this.inputs[key] = this.inputs[key] || [key, this.valueAcc];\n    this.inputs[key][1] = this.valueFn(this.inputs[key][1], input);\n    return result;\n  };\n\n  return XReduceBy;\n}();\n\nvar _xreduceBy = /*#__PURE__*/Object(_curryN_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) {\n  return new XReduceBy(valueFn, valueAcc, keyFn, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xreduceBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xreduceBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xtake.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xtake.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XTake = /*#__PURE__*/function () {\n  function XTake(n, xf) {\n    this.xf = xf;\n    this.n = n;\n    this.i = 0;\n  }\n  XTake.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XTake.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].result;\n  XTake.prototype['@@transducer/step'] = function (result, input) {\n    this.i += 1;\n    var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);\n    return this.n >= 0 && this.i >= this.n ? Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ret) : ret;\n  };\n\n  return XTake;\n}();\n\nvar _xtake = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xtake(n, xf) {\n  return new XTake(n, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xtake);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xtake.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xtakeWhile.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xtakeWhile.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\n\nvar XTakeWhile = /*#__PURE__*/function () {\n  function XTakeWhile(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XTakeWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init;\n  XTakeWhile.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].result;\n  XTakeWhile.prototype['@@transducer/step'] = function (result, input) {\n    return this.f(input) ? this.xf['@@transducer/step'](result, input) : Object(_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(result);\n  };\n\n  return XTakeWhile;\n}();\n\nvar _xtakeWhile = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xtakeWhile(f, xf) {\n  return new XTakeWhile(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xtakeWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xtakeWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xtap.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xtap.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ \"./node_modules/ramda/es/internal/_xfBase.js\");\n\n\n\nvar XTap = /*#__PURE__*/function () {\n  function XTap(f, xf) {\n    this.xf = xf;\n    this.f = f;\n  }\n  XTap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init;\n  XTap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].result;\n  XTap.prototype['@@transducer/step'] = function (result, input) {\n    this.f(input);\n    return this.xf['@@transducer/step'](result, input);\n  };\n\n  return XTap;\n}();\n\nvar _xtap = /*#__PURE__*/Object(_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function _xtap(f, xf) {\n  return new XTap(f, xf);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (_xtap);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xtap.js?");

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xwrap.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xwrap.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _xwrap; });\nvar XWrap = /*#__PURE__*/function () {\n  function XWrap(fn) {\n    this.f = fn;\n  }\n  XWrap.prototype['@@transducer/init'] = function () {\n    throw new Error('init not implemented on XWrap');\n  };\n  XWrap.prototype['@@transducer/result'] = function (acc) {\n    return acc;\n  };\n  XWrap.prototype['@@transducer/step'] = function (acc, x) {\n    return this.f(acc, x);\n  };\n\n  return XWrap;\n}();\n\nfunction _xwrap(fn) {\n  return new XWrap(fn);\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/internal/_xwrap.js?");

/***/ }),

/***/ "./node_modules/ramda/es/intersection.js":
/*!***********************************************!*\
  !*** ./node_modules/ramda/es/intersection.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter.js */ \"./node_modules/ramda/es/internal/_filter.js\");\n/* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flip.js */ \"./node_modules/ramda/es/flip.js\");\n/* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uniq.js */ \"./node_modules/ramda/es/uniq.js\");\n\n\n\n\n\n\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of those\n * elements common to both lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The list of elements found in both `list1` and `list2`.\n * @see R.innerJoin\n * @example\n *\n *      R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]\n */\nvar intersection = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function intersection(list1, list2) {\n  var lookupList, filteredList;\n  if (list1.length > list2.length) {\n    lookupList = list1;\n    filteredList = list2;\n  } else {\n    lookupList = list2;\n    filteredList = list1;\n  }\n  return Object(_uniq_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Object(_internal_filter_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_flip_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_internal_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lookupList), filteredList));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersection);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/intersection.js?");

/***/ }),

/***/ "./node_modules/ramda/es/intersperse.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/intersperse.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ \"./node_modules/ramda/es/internal/_checkForMethod.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Creates a new list with the separator interposed between elements.\n *\n * Dispatches to the `intersperse` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} separator The element to add to the list.\n * @param {Array} list The list to be interposed.\n * @return {Array} The new list.\n * @example\n *\n *      R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's']\n */\nvar intersperse = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('intersperse', function intersperse(separator, list) {\n  var out = [];\n  var idx = 0;\n  var length = list.length;\n  while (idx < length) {\n    if (idx === length - 1) {\n      out.push(list[idx]);\n    } else {\n      out.push(list[idx], separator);\n    }\n    idx += 1;\n  }\n  return out;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (intersperse);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/intersperse.js?");

/***/ }),

/***/ "./node_modules/ramda/es/into.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/into.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone.js */ \"./node_modules/ramda/es/internal/_clone.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_isTransformer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isTransformer.js */ \"./node_modules/ramda/es/internal/_isTransformer.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_stepCat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_stepCat.js */ \"./node_modules/ramda/es/internal/_stepCat.js\");\n\n\n\n\n\n\n/**\n * Transforms the items of the list with the transducer and appends the\n * transformed items to the accumulator using an appropriate iterator function\n * based on the accumulator type.\n *\n * The accumulator can be an array, string, object or a transformer. Iterated\n * items will be appended to arrays and concatenated to strings. Objects will\n * be merged directly or 2-item arrays will be merged as key, value pairs.\n *\n * The accumulator can also be a transformer object that provides a 2-arity\n * reducing iterator function, step, 0-arity initial value function, init, and\n * 1-arity result extraction function result. The step function is used as the\n * iterator function in reduce. The result function is used to convert the\n * final accumulator into the return type and in most cases is R.identity. The\n * init function is used to provide the initial accumulator.\n *\n * The iteration is performed with [`R.reduce`](#reduce) after initializing the\n * transducer.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category List\n * @sig a -> (b -> b) -> [c] -> a\n * @param {*} acc The initial accumulator value.\n * @param {Function} xf The transducer function. Receives a transformer and returns a transformer.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.transduce\n * @example\n *\n *      const numbers = [1, 2, 3, 4];\n *      const transducer = R.compose(R.map(R.add(1)), R.take(2));\n *\n *      R.into([], transducer, numbers); //=> [2, 3]\n *\n *      const intoArray = R.into([]);\n *      intoArray(transducer, numbers); //=> [2, 3]\n */\nvar into = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function into(acc, xf, list) {\n  return Object(_internal_isTransformer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(acc) ? Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(xf(acc), acc['@@transducer/init'](), list) : Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(xf(Object(_internal_stepCat_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(acc)), Object(_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(acc, [], [], false), list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (into);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/into.js?");

/***/ }),

/***/ "./node_modules/ramda/es/invert.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/invert.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n\n/**\n * Same as [`R.invertObj`](#invertObj), however this accounts for objects with\n * duplicate values by putting the values into an array.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig {s: x} -> {x: [ s, ... ]}\n * @param {Object} obj The object or array to invert\n * @return {Object} out A new object with keys in an array.\n * @see R.invertObj\n * @example\n *\n *      const raceResultsByFirstName = {\n *        first: 'alice',\n *        second: 'jake',\n *        third: 'alice',\n *      };\n *      R.invert(raceResultsByFirstName);\n *      //=> { 'alice': ['first', 'third'], 'jake':['second'] }\n */\nvar invert = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function invert(obj) {\n  var props = Object(_keys_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj);\n  var len = props.length;\n  var idx = 0;\n  var out = {};\n\n  while (idx < len) {\n    var key = props[idx];\n    var val = obj[key];\n    var list = Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(val, out) ? out[val] : out[val] = [];\n    list[list.length] = key;\n    idx += 1;\n  }\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (invert);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/invert.js?");

/***/ }),

/***/ "./node_modules/ramda/es/invertObj.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/invertObj.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n/**\n * Returns a new object with the keys of the given object as values, and the\n * values of the given object, which are coerced to strings, as keys. Note\n * that the last key found is preferred when handling the same value.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig {s: x} -> {x: s}\n * @param {Object} obj The object or array to invert\n * @return {Object} out A new object\n * @see R.invert\n * @example\n *\n *      const raceResults = {\n *        first: 'alice',\n *        second: 'jake'\n *      };\n *      R.invertObj(raceResults);\n *      //=> { 'alice': 'first', 'jake':'second' }\n *\n *      // Alternatively:\n *      const raceResults = ['alice', 'jake'];\n *      R.invertObj(raceResults);\n *      //=> { 'alice': '0', 'jake':'1' }\n */\nvar invertObj = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function invertObj(obj) {\n  var props = Object(_keys_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj);\n  var len = props.length;\n  var idx = 0;\n  var out = {};\n\n  while (idx < len) {\n    var key = props[idx];\n    out[obj[key]] = key;\n    idx += 1;\n  }\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (invertObj);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/invertObj.js?");

/***/ }),

/***/ "./node_modules/ramda/es/invoker.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/invoker.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ \"./node_modules/ramda/es/internal/_isFunction.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString.js */ \"./node_modules/ramda/es/toString.js\");\n\n\n\n\n\n/**\n * Turns a named method with a specified arity into a function that can be\n * called directly supplied with arguments and a target object.\n *\n * The returned function is curried and accepts `arity + 1` parameters where\n * the final parameter is the target object.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *)\n * @param {Number} arity Number of arguments the returned function should take\n *        before the target object.\n * @param {String} method Name of the method to call.\n * @return {Function} A new curried function.\n * @see R.construct\n * @example\n *\n *      const sliceFrom = R.invoker(1, 'slice');\n *      sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm'\n *      const sliceFrom6 = R.invoker(2, 'slice')(6);\n *      sliceFrom6(8, 'abcdefghijklm'); //=> 'gh'\n * @symb R.invoker(0, 'method')(o) = o['method']()\n * @symb R.invoker(1, 'method')(a, o) = o['method'](a)\n * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b)\n */\nvar invoker = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function invoker(arity, method) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arity + 1, function () {\n    var target = arguments[arity];\n    if (target != null && Object(_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target[method])) {\n      return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity));\n    }\n    throw new TypeError(Object(_toString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(target) + ' does not have a method named \"' + method + '\"');\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (invoker);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/invoker.js?");

/***/ }),

/***/ "./node_modules/ramda/es/is.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/is.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * See if an object (`val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n *      R.is(Object, {}); //=> true\n *      R.is(Number, 1); //=> true\n *      R.is(Object, 1); //=> false\n *      R.is(String, 's'); //=> true\n *      R.is(String, new String('')); //=> true\n *      R.is(Object, new String('')); //=> true\n *      R.is(Object, 's'); //=> false\n *      R.is(Number, {}); //=> false\n */\nvar is = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function is(Ctor, val) {\n  return val != null && val.constructor === Ctor || val instanceof Ctor;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (is);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/is.js?");

/***/ }),

/***/ "./node_modules/ramda/es/isEmpty.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/isEmpty.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty.js */ \"./node_modules/ramda/es/empty.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n\n/**\n * Returns `true` if the given value is its type's empty value; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty\n * @example\n *\n *      R.isEmpty([1, 2, 3]);   //=> false\n *      R.isEmpty([]);          //=> true\n *      R.isEmpty('');          //=> true\n *      R.isEmpty(null);        //=> false\n *      R.isEmpty({});          //=> true\n *      R.isEmpty({length: 0}); //=> false\n */\nvar isEmpty = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function isEmpty(x) {\n  return x != null && Object(_equals_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x, Object(_empty_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(x));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (isEmpty);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/isEmpty.js?");

/***/ }),

/***/ "./node_modules/ramda/es/isNil.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/isNil.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n *      R.isNil(null); //=> true\n *      R.isNil(undefined); //=> true\n *      R.isNil(0); //=> false\n *      R.isNil([]); //=> false\n */\nvar isNil = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function isNil(x) {\n  return x == null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (isNil);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/isNil.js?");

/***/ }),

/***/ "./node_modules/ramda/es/join.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/join.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ \"./node_modules/ramda/es/invoker.js\");\n\n\n/**\n * Returns a string made by inserting the `separator` between each element and\n * concatenating all the elements into a single string.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig String -> [a] -> String\n * @param {Number|String} separator The string used to separate the elements.\n * @param {Array} xs The elements to join into a string.\n * @return {String} str The string made by concatenating `xs` with `separator`.\n * @see R.split\n * @example\n *\n *      const spacer = R.join(' ');\n *      spacer(['a', 2, 3.4]);   //=> 'a 2 3.4'\n *      R.join('|', [1, 2, 3]);    //=> '1|2|3'\n */\nvar join = /*#__PURE__*/Object(_invoker_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1, 'join');\n/* harmony default export */ __webpack_exports__[\"default\"] = (join);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/join.js?");

/***/ }),

/***/ "./node_modules/ramda/es/juxt.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/juxt.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _converge_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./converge.js */ \"./node_modules/ramda/es/converge.js\");\n\n\n\n/**\n * juxt applies a list of functions to a list of values.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Function\n * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n])\n * @param {Array} fns An array of functions\n * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters.\n * @see R.applySpec\n * @example\n *\n *      const getRange = R.juxt([Math.min, Math.max]);\n *      getRange(3, 4, 9, -3); //=> [-3, 9]\n * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)]\n */\nvar juxt = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function juxt(fns) {\n  return Object(_converge_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function () {\n    return Array.prototype.slice.call(arguments, 0);\n  }, fns);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (juxt);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/juxt.js?");

/***/ }),

/***/ "./node_modules/ramda/es/keys.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/keys.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _internal_isArguments_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArguments.js */ \"./node_modules/ramda/es/internal/_isArguments.js\");\n\n\n\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n  'use strict';\n\n  return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n  var idx = 0;\n  while (idx < list.length) {\n    if (list[idx] === item) {\n      return true;\n    }\n    idx += 1;\n  }\n  return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n *      R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function keys(obj) {\n  return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function keys(obj) {\n  if (Object(obj) !== obj) {\n    return [];\n  }\n  var prop, nIdx;\n  var ks = [];\n  var checkArgsLength = hasArgsEnumBug && Object(_internal_isArguments_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj);\n  for (prop in obj) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n      ks[ks.length] = prop;\n    }\n  }\n  if (hasEnumBug) {\n    nIdx = nonEnumerableProps.length - 1;\n    while (nIdx >= 0) {\n      prop = nonEnumerableProps[nIdx];\n      if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop, obj) && !contains(ks, prop)) {\n        ks[ks.length] = prop;\n      }\n      nIdx -= 1;\n    }\n  }\n  return ks;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (keys);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/keys.js?");

/***/ }),

/***/ "./node_modules/ramda/es/keysIn.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/keysIn.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Returns a list containing the names of all the properties of the supplied\n * object, including prototype properties.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own and prototype properties.\n * @see R.keys, R.valuesIn\n * @example\n *\n *      const F = function() { this.x = 'X'; };\n *      F.prototype.y = 'Y';\n *      const f = new F();\n *      R.keysIn(f); //=> ['x', 'y']\n */\nvar keysIn = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function keysIn(obj) {\n  var prop;\n  var ks = [];\n  for (prop in obj) {\n    ks[ks.length] = prop;\n  }\n  return ks;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (keysIn);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/keysIn.js?");

/***/ }),

/***/ "./node_modules/ramda/es/last.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/last.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth.js */ \"./node_modules/ramda/es/nth.js\");\n\n\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n *      R.last(['fi', 'fo', 'fum']); //=> 'fum'\n *      R.last([]); //=> undefined\n *\n *      R.last('abc'); //=> 'c'\n *      R.last(''); //=> ''\n */\nvar last = /*#__PURE__*/Object(_nth_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(-1);\n/* harmony default export */ __webpack_exports__[\"default\"] = (last);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/last.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lastIndexOf.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/lastIndexOf.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ \"./node_modules/ramda/es/internal/_isArray.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n\n/**\n * Returns the position of the last occurrence of an item in an array, or -1 if\n * the item is not included in the array. [`R.equals`](#equals) is used to\n * determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Number\n * @param {*} target The item to find.\n * @param {Array} xs The array to search in.\n * @return {Number} the index of the target, or -1 if the target is not found.\n * @see R.indexOf\n * @example\n *\n *      R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6\n *      R.lastIndexOf(10, [1,2,3,4]); //=> -1\n */\nvar lastIndexOf = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lastIndexOf(target, xs) {\n  if (typeof xs.lastIndexOf === 'function' && !Object(_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(xs)) {\n    return xs.lastIndexOf(target);\n  } else {\n    var idx = xs.length - 1;\n    while (idx >= 0) {\n      if (Object(_equals_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(xs[idx], target)) {\n        return idx;\n      }\n      idx -= 1;\n    }\n    return -1;\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lastIndexOf);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lastIndexOf.js?");

/***/ }),

/***/ "./node_modules/ramda/es/length.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/length.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber.js */ \"./node_modules/ramda/es/internal/_isNumber.js\");\n\n\n\n/**\n * Returns the number of elements in the array by returning `list.length`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig [a] -> Number\n * @param {Array} list The array to inspect.\n * @return {Number} The length of the array.\n * @example\n *\n *      R.length([]); //=> 0\n *      R.length([1, 2, 3]); //=> 3\n */\nvar length = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function length(list) {\n  return list != null && Object(_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(list.length) ? list.length : NaN;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (length);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/length.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lens.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/lens.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n/**\n * Returns a lens for the given getter and setter functions. The getter \"gets\"\n * the value of the focus; the setter \"sets\" the value of the focus. The setter\n * should not mutate the data structure.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig (s -> a) -> ((a, s) -> s) -> Lens s a\n * @param {Function} getter\n * @param {Function} setter\n * @return {Lens}\n * @see R.view, R.set, R.over, R.lensIndex, R.lensProp\n * @example\n *\n *      const xLens = R.lens(R.prop('x'), R.assoc('x'));\n *\n *      R.view(xLens, {x: 1, y: 2});            //=> 1\n *      R.set(xLens, 4, {x: 1, y: 2});          //=> {x: 4, y: 2}\n *      R.over(xLens, R.negate, {x: 1, y: 2});  //=> {x: -1, y: 2}\n */\nvar lens = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lens(getter, setter) {\n  return function (toFunctorFn) {\n    return function (target) {\n      return Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (focus) {\n        return setter(focus, target);\n      }, toFunctorFn(getter(target)));\n    };\n  };\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lens);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lens.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lensIndex.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/lensIndex.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lens.js */ \"./node_modules/ramda/es/lens.js\");\n/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ \"./node_modules/ramda/es/nth.js\");\n/* harmony import */ var _update_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./update.js */ \"./node_modules/ramda/es/update.js\");\n\n\n\n\n\n/**\n * Returns a lens whose focus is the specified index.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Number -> Lens s a\n * @param {Number} n\n * @return {Lens}\n * @see R.view, R.set, R.over\n * @example\n *\n *      const headLens = R.lensIndex(0);\n *\n *      R.view(headLens, ['a', 'b', 'c']);            //=> 'a'\n *      R.set(headLens, 'x', ['a', 'b', 'c']);        //=> ['x', 'b', 'c']\n *      R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c']\n */\nvar lensIndex = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lensIndex(n) {\n  return Object(_lens_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_nth_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(n), Object(_update_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(n));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lensIndex);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lensIndex.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lensPath.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/lensPath.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _assocPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assocPath.js */ \"./node_modules/ramda/es/assocPath.js\");\n/* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens.js */ \"./node_modules/ramda/es/lens.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n\n\n\n\n\n/**\n * Returns a lens whose focus is the specified path.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @typedefn Idx = String | Int\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig [Idx] -> Lens s a\n * @param {Array} path The path to use.\n * @return {Lens}\n * @see R.view, R.set, R.over\n * @example\n *\n *      const xHeadYLens = R.lensPath(['x', 0, 'y']);\n *\n *      R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n *      //=> 2\n *      R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n *      //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]}\n *      R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n *      //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]}\n */\nvar lensPath = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lensPath(p) {\n  return Object(_lens_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_path_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(p), Object(_assocPath_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lensPath);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lensPath.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lensProp.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/lensProp.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assoc.js */ \"./node_modules/ramda/es/assoc.js\");\n/* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens.js */ \"./node_modules/ramda/es/lens.js\");\n/* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prop.js */ \"./node_modules/ramda/es/prop.js\");\n\n\n\n\n\n/**\n * Returns a lens whose focus is the specified property.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig String -> Lens s a\n * @param {String} k\n * @return {Lens}\n * @see R.view, R.set, R.over\n * @example\n *\n *      const xLens = R.lensProp('x');\n *\n *      R.view(xLens, {x: 1, y: 2});            //=> 1\n *      R.set(xLens, 4, {x: 1, y: 2});          //=> {x: 4, y: 2}\n *      R.over(xLens, R.negate, {x: 1, y: 2});  //=> {x: -1, y: 2}\n */\nvar lensProp = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lensProp(k) {\n  return Object(_lens_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_prop_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(k), Object(_assoc_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(k));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lensProp);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lensProp.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lift.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/lift.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _liftN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./liftN.js */ \"./node_modules/ramda/es/liftN.js\");\n\n\n\n/**\n * \"lifts\" a function of arity > 1 so that it may \"map over\" a list, Function or other\n * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.liftN\n * @example\n *\n *      const madd3 = R.lift((a, b, c) => a + b + c);\n *\n *      madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n *\n *      const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);\n *\n *      madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24]\n */\nvar lift = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lift(fn) {\n  return Object(_liftN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn.length, fn);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lift);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lift.js?");

/***/ }),

/***/ "./node_modules/ramda/es/liftN.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/liftN.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ap.js */ \"./node_modules/ramda/es/ap.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n\n\n\n\n\n\n/**\n * \"lifts\" a function to be the specified arity, so that it may \"map over\" that\n * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig Number -> (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.lift, R.ap\n * @example\n *\n *      const madd3 = R.liftN(3, (...args) => R.sum(args));\n *      madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n */\nvar liftN = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function liftN(arity, fn) {\n  var lifted = Object(_curryN_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(arity, fn);\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(arity, function () {\n    return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ap_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], Object(_map_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (liftN);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/liftN.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lt.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/lt.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if the first argument is less than the second; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @see R.gt\n * @example\n *\n *      R.lt(2, 1); //=> false\n *      R.lt(2, 2); //=> false\n *      R.lt(2, 3); //=> true\n *      R.lt('a', 'z'); //=> true\n *      R.lt('z', 'a'); //=> false\n */\nvar lt = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lt(a, b) {\n  return a < b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lt);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lt.js?");

/***/ }),

/***/ "./node_modules/ramda/es/lte.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/lte.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if the first argument is less than or equal to the second;\n * `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {Number} a\n * @param {Number} b\n * @return {Boolean}\n * @see R.gte\n * @example\n *\n *      R.lte(2, 1); //=> false\n *      R.lte(2, 2); //=> true\n *      R.lte(2, 3); //=> true\n *      R.lte('a', 'z'); //=> true\n *      R.lte('z', 'a'); //=> false\n */\nvar lte = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function lte(a, b) {\n  return a <= b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (lte);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/lte.js?");

/***/ }),

/***/ "./node_modules/ramda/es/map.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/map.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_map.js */ \"./node_modules/ramda/es/internal/_map.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_xmap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xmap.js */ \"./node_modules/ramda/es/internal/_xmap.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n\n\n\n\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex\n * @example\n *\n *      const double = x => x * 2;\n *\n *      R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n *      R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\nvar map = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['fantasy-land/map', 'map'], _internal_xmap_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"], function map(fn, functor) {\n  switch (Object.prototype.toString.call(functor)) {\n    case '[object Function]':\n      return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(functor.length, function () {\n        return fn.call(this, functor.apply(this, arguments));\n      });\n    case '[object Object]':\n      return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function (acc, key) {\n        acc[key] = fn(functor[key]);\n        return acc;\n      }, {}, Object(_keys_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(functor));\n    default:\n      return Object(_internal_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(fn, functor);\n  }\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (map);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/map.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mapAccum.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/mapAccum.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * The `mapAccum` function behaves like a combination of map and reduce; it\n * applies a function to each element of a list, passing an accumulating\n * parameter from left to right, and returning a final value of this\n * accumulator together with the new list.\n *\n * The iterator function receives two arguments, *acc* and *value*, and should\n * return a tuple *[acc, value]*.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y])\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.scan, R.addIndex, R.mapAccumRight\n * @example\n *\n *      const digits = ['1', '2', '3', '4'];\n *      const appender = (a, b) => [a + b, a + b];\n *\n *      R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']]\n * @symb R.mapAccum(f, a, [b, c, d]) = [\n *   f(f(f(a, b)[0], c)[0], d)[0],\n *   [\n *     f(a, b)[1],\n *     f(f(a, b)[0], c)[1],\n *     f(f(f(a, b)[0], c)[0], d)[1]\n *   ]\n * ]\n */\nvar mapAccum = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mapAccum(fn, acc, list) {\n  var idx = 0;\n  var len = list.length;\n  var result = [];\n  var tuple = [acc];\n  while (idx < len) {\n    tuple = fn(tuple[0], list[idx]);\n    result[idx] = tuple[1];\n    idx += 1;\n  }\n  return [tuple[0], result];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mapAccum);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mapAccum.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mapAccumRight.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/mapAccumRight.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * The `mapAccumRight` function behaves like a combination of map and reduce; it\n * applies a function to each element of a list, passing an accumulating\n * parameter from right to left, and returning a final value of this\n * accumulator together with the new list.\n *\n * Similar to [`mapAccum`](#mapAccum), except moves through the input list from\n * the right to the left.\n *\n * The iterator function receives two arguments, *acc* and *value*, and should\n * return a tuple *[acc, value]*.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y])\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.addIndex, R.mapAccum\n * @example\n *\n *      const digits = ['1', '2', '3', '4'];\n *      const appender = (a, b) => [b + a, b + a];\n *\n *      R.mapAccumRight(appender, 5, digits); //=> ['12345', ['12345', '2345', '345', '45']]\n * @symb R.mapAccumRight(f, a, [b, c, d]) = [\n *   f(f(f(a, d)[0], c)[0], b)[0],\n *   [\n *     f(a, d)[1],\n *     f(f(a, d)[0], c)[1],\n *     f(f(f(a, d)[0], c)[0], b)[1]\n *   ]\n * ]\n */\nvar mapAccumRight = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mapAccumRight(fn, acc, list) {\n  var idx = list.length - 1;\n  var result = [];\n  var tuple = [acc];\n  while (idx >= 0) {\n    tuple = fn(tuple[0], list[idx]);\n    result[idx] = tuple[1];\n    idx -= 1;\n  }\n  return [tuple[0], result];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mapAccumRight);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mapAccumRight.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mapObjIndexed.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/mapObjIndexed.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n\n/**\n * An Object-specific version of [`map`](#map). The function is applied to three\n * arguments: *(value, key, obj)*. If only the value is significant, use\n * [`map`](#map) instead.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig ((*, String, Object) -> *) -> Object -> Object\n * @param {Function} fn\n * @param {Object} obj\n * @return {Object}\n * @see R.map\n * @example\n *\n *      const xyz = { x: 1, y: 2, z: 3 };\n *      const prependKeyAndDouble = (num, key, obj) => key + (num * 2);\n *\n *      R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' }\n */\nvar mapObjIndexed = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mapObjIndexed(fn, obj) {\n  return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (acc, key) {\n    acc[key] = fn(obj[key], key, obj);\n    return acc;\n  }, {}, Object(_keys_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(obj));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mapObjIndexed);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mapObjIndexed.js?");

/***/ }),

/***/ "./node_modules/ramda/es/match.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/match.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Tests a regular expression against a String. Note that this function will\n * return an empty array when there are no matches. This differs from\n * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match)\n * which returns `null` when there are no matches.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category String\n * @sig RegExp -> String -> [String | Undefined]\n * @param {RegExp} rx A regular expression.\n * @param {String} str The string to match against\n * @return {Array} The list of matches or empty array.\n * @see R.test\n * @example\n *\n *      R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na']\n *      R.match(/a/, 'b'); //=> []\n *      R.match(/a/, null); //=> TypeError: null does not have a method named \"match\"\n */\nvar match = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function match(rx, str) {\n  return str.match(rx) || [];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (match);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/match.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mathMod.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/mathMod.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ \"./node_modules/ramda/es/internal/_isInteger.js\");\n\n\n\n/**\n * `mathMod` behaves like the modulo operator should mathematically, unlike the\n * `%` operator (and by extension, [`R.modulo`](#modulo)). So while\n * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer\n * arguments, and returns NaN when the modulus is zero or negative.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} m The dividend.\n * @param {Number} p the modulus.\n * @return {Number} The result of `b mod a`.\n * @see R.modulo\n * @example\n *\n *      R.mathMod(-17, 5);  //=> 3\n *      R.mathMod(17, 5);   //=> 2\n *      R.mathMod(17, -5);  //=> NaN\n *      R.mathMod(17, 0);   //=> NaN\n *      R.mathMod(17.2, 5); //=> NaN\n *      R.mathMod(17, 5.3); //=> NaN\n *\n *      const clock = R.mathMod(R.__, 12);\n *      clock(15); //=> 3\n *      clock(24); //=> 0\n *\n *      const seventeenMod = R.mathMod(17);\n *      seventeenMod(3);  //=> 2\n *      seventeenMod(4);  //=> 1\n *      seventeenMod(10); //=> 7\n */\nvar mathMod = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mathMod(m, p) {\n  if (!Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(m)) {\n    return NaN;\n  }\n  if (!Object(_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p) || p < 1) {\n    return NaN;\n  }\n  return (m % p + p) % p;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mathMod);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mathMod.js?");

/***/ }),

/***/ "./node_modules/ramda/es/max.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/max.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n *      R.max(789, 123); //=> 789\n *      R.max('a', 'b'); //=> 'b'\n */\nvar max = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function max(a, b) {\n  return b > a ? b : a;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (max);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/max.js?");

/***/ }),

/***/ "./node_modules/ramda/es/maxBy.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/maxBy.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Takes a function and two values, and returns whichever value produces the\n * larger result when passed to the provided function.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Relation\n * @sig Ord b => (a -> b) -> a -> a -> a\n * @param {Function} f\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.max, R.minBy\n * @example\n *\n *      //  square :: Number -> Number\n *      const square = n => n * n;\n *\n *      R.maxBy(square, -3, 2); //=> -3\n *\n *      R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5\n *      R.reduce(R.maxBy(square), 0, []); //=> 0\n */\nvar maxBy = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function maxBy(f, a, b) {\n  return f(b) > f(a) ? b : a;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (maxBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/maxBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mean.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/mean.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sum.js */ \"./node_modules/ramda/es/sum.js\");\n\n\n\n/**\n * Returns the mean of the given list of numbers.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list\n * @return {Number}\n * @see R.median\n * @example\n *\n *      R.mean([2, 7, 9]); //=> 6\n *      R.mean([]); //=> NaN\n */\nvar mean = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mean(list) {\n  return Object(_sum_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(list) / list.length;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mean);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mean.js?");

/***/ }),

/***/ "./node_modules/ramda/es/median.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/median.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mean.js */ \"./node_modules/ramda/es/mean.js\");\n\n\n\n/**\n * Returns the median of the given list of numbers.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list\n * @return {Number}\n * @see R.mean\n * @example\n *\n *      R.median([2, 9, 7]); //=> 7\n *      R.median([7, 2, 10, 9]); //=> 8\n *      R.median([]); //=> NaN\n */\nvar median = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function median(list) {\n  var len = list.length;\n  if (len === 0) {\n    return NaN;\n  }\n  var width = 2 - len % 2;\n  var idx = (len - width) / 2;\n  return Object(_mean_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Array.prototype.slice.call(list, 0).sort(function (a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n  }).slice(idx, idx + width));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (median);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/median.js?");

/***/ }),

/***/ "./node_modules/ramda/es/memoizeWith.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/memoizeWith.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n\n\n/**\n * Creates a new function that, when invoked, caches the result of calling `fn`\n * for a given argument set and returns the result. Subsequent calls to the\n * memoized `fn` with the same argument set will not result in an additional\n * call to `fn`; instead, the cached result for that set of arguments will be\n * returned.\n *\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Function\n * @sig (*... -> String) -> (*... -> a) -> (*... -> a)\n * @param {Function} fn The function to generate the cache key.\n * @param {Function} fn The function to memoize.\n * @return {Function} Memoized version of `fn`.\n * @example\n *\n *      let count = 0;\n *      const factorial = R.memoizeWith(R.identity, n => {\n *        count += 1;\n *        return R.product(R.range(1, n + 1));\n *      });\n *      factorial(5); //=> 120\n *      factorial(5); //=> 120\n *      factorial(5); //=> 120\n *      count; //=> 1\n */\nvar memoizeWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function memoizeWith(mFn, fn) {\n  var cache = {};\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn.length, function () {\n    var key = mFn.apply(this, arguments);\n    if (!Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(key, cache)) {\n      cache[key] = fn.apply(this, arguments);\n    }\n    return cache[key];\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (memoizeWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/memoizeWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/merge.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/merge.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ \"./node_modules/ramda/es/internal/_objectAssign.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @deprecated\n * @example\n *\n *      R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n *      //=> { 'name': 'fred', 'age': 40 }\n *\n *      const withDefaults = R.merge({x: 0, y: 0});\n *      withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.merge(a, b) = {...a, ...b}\n */\nvar merge = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function merge(l, r) {\n  return Object(_internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, l, r);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (merge);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/merge.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeAll.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/mergeAll.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ \"./node_modules/ramda/es/internal/_objectAssign.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n\n/**\n * Merges a list of objects together into one object.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig [{k: v}] -> {k: v}\n * @param {Array} list An array of objects\n * @return {Object} A merged object.\n * @see R.reduce\n * @example\n *\n *      R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3}\n *      R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2}\n * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 }\n */\nvar mergeAll = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function mergeAll(list) {\n  return _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(null, [{}].concat(list));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeAll);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeAll.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeDeepLeft.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/mergeDeepLeft.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ \"./node_modules/ramda/es/mergeDeepWithKey.js\");\n\n\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the first object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n *      R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n *                      { age: 40, contact: { email: 'baa@example.com' }});\n *      //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }}\n */\nvar mergeDeepLeft = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeDeepLeft(lObj, rObj) {\n  return Object(_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (k, lVal, rVal) {\n    return lVal;\n  }, lObj, rObj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeDeepLeft);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeDeepLeft.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeDeepRight.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/mergeDeepRight.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ \"./node_modules/ramda/es/mergeDeepWithKey.js\");\n\n\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n *      R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n *                       { age: 40, contact: { email: 'baa@example.com' }});\n *      //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\nvar mergeDeepRight = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeDeepRight(lObj, rObj) {\n  return Object(_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (k, lVal, rVal) {\n    return rVal;\n  }, lObj, rObj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeDeepRight);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeDeepRight.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeDeepWith.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/mergeDeepWith.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ \"./node_modules/ramda/es/mergeDeepWithKey.js\");\n\n\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n *   recursively merged.\n * - otherwise the provided function is applied to associated values using the\n *   resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWith, R.mergeDeepWithKey\n * @example\n *\n *      R.mergeDeepWith(R.concat,\n *                      { a: true, c: { values: [10, 20] }},\n *                      { b: true, c: { values: [15, 35] }});\n *      //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }}\n */\nvar mergeDeepWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeDeepWith(fn, lObj, rObj) {\n  return Object(_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (k, lVal, rVal) {\n    return fn(lVal, rVal);\n  }, lObj, rObj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeDeepWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeDeepWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeDeepWithKey.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/mergeDeepWithKey.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isObject.js */ \"./node_modules/ramda/es/internal/_isObject.js\");\n/* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeWithKey.js */ \"./node_modules/ramda/es/mergeWithKey.js\");\n\n\n\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n *   recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n *   using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n *      let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n *      R.mergeDeepWithKey(concatValues,\n *                         { a: true, c: { thing: 'foo', values: [10, 20] }},\n *                         { b: true, c: { thing: 'bar', values: [15, 35] }});\n *      //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\nvar mergeDeepWithKey = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeDeepWithKey(fn, lObj, rObj) {\n  return Object(_mergeWithKey_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (k, lVal, rVal) {\n    if (Object(_internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lVal) && Object(_internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(rVal)) {\n      return mergeDeepWithKey(fn, lVal, rVal);\n    } else {\n      return fn(k, lVal, rVal);\n    }\n  }, lObj, rObj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeDeepWithKey);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeDeepWithKey.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeLeft.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/mergeLeft.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ \"./node_modules/ramda/es/internal/_objectAssign.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the first object will be used.\n *\n * @func\n * @memberOf R\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey\n * @example\n *\n *      R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 });\n *      //=> { 'name': 'fred', 'age': 40 }\n *\n *      const resetToDefault = R.mergeLeft({x: 0});\n *      resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeLeft(a, b) = {...b, ...a}\n */\nvar mergeLeft = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function mergeLeft(l, r) {\n  return Object(_internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, r, l);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeLeft);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeLeft.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeRight.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/mergeRight.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ \"./node_modules/ramda/es/internal/_objectAssign.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n *      R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n *      //=> { 'name': 'fred', 'age': 40 }\n *\n *      const withDefaults = R.mergeRight({x: 0, y: 0});\n *      withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\nvar mergeRight = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function mergeRight(l, r) {\n  return Object(_internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, l, r);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeRight);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeRight.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeWith.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/mergeWith.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeWithKey.js */ \"./node_modules/ramda/es/mergeWithKey.js\");\n\n\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the values\n * associated with the key in each object, with the result being used as the\n * value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWith, R.merge, R.mergeWithKey\n * @example\n *\n *      R.mergeWith(R.concat,\n *                  { a: true, values: [10, 20] },\n *                  { b: true, values: [15, 35] });\n *      //=> { a: true, b: true, values: [10, 20, 15, 35] }\n */\nvar mergeWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeWith(fn, l, r) {\n  return Object(_mergeWithKey_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (_, _l, _r) {\n    return fn(_l, _r);\n  }, l, r);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/mergeWithKey.js":
/*!***********************************************!*\
  !*** ./node_modules/ramda/es/mergeWithKey.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.merge, R.mergeWith\n * @example\n *\n *      let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n *      R.mergeWithKey(concatValues,\n *                     { a: true, thing: 'foo', values: [10, 20] },\n *                     { b: true, thing: 'bar', values: [15, 35] });\n *      //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\nvar mergeWithKey = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function mergeWithKey(fn, l, r) {\n  var result = {};\n  var k;\n\n  for (k in l) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(k, l)) {\n      result[k] = Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(k, r) ? fn(k, l[k], r[k]) : l[k];\n    }\n  }\n\n  for (k in r) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(k, r) && !Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(k, result)) {\n      result[k] = r[k];\n    }\n  }\n\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeWithKey);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/mergeWithKey.js?");

/***/ }),

/***/ "./node_modules/ramda/es/min.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/min.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns the smaller of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.minBy, R.max\n * @example\n *\n *      R.min(789, 123); //=> 123\n *      R.min('a', 'b'); //=> 'a'\n */\nvar min = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function min(a, b) {\n  return b < a ? b : a;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (min);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/min.js?");

/***/ }),

/***/ "./node_modules/ramda/es/minBy.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/minBy.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Takes a function and two values, and returns whichever value produces the\n * smaller result when passed to the provided function.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Relation\n * @sig Ord b => (a -> b) -> a -> a -> a\n * @param {Function} f\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.min, R.maxBy\n * @example\n *\n *      //  square :: Number -> Number\n *      const square = n => n * n;\n *\n *      R.minBy(square, -3, 2); //=> 2\n *\n *      R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1\n *      R.reduce(R.minBy(square), Infinity, []); //=> Infinity\n */\nvar minBy = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function minBy(f, a, b) {\n  return f(b) < f(a) ? b : a;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (minBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/minBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/modulo.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/modulo.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Divides the first parameter by the second and returns the remainder. Note\n * that this function preserves the JavaScript-style behavior for modulo. For\n * mathematical modulo see [`mathMod`](#mathMod).\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a The value to the divide.\n * @param {Number} b The pseudo-modulus\n * @return {Number} The result of `b % a`.\n * @see R.mathMod\n * @example\n *\n *      R.modulo(17, 3); //=> 2\n *      // JS behavior:\n *      R.modulo(-17, 3); //=> -2\n *      R.modulo(17, -3); //=> 2\n *\n *      const isOdd = R.modulo(R.__, 2);\n *      isOdd(42); //=> 0\n *      isOdd(21); //=> 1\n */\nvar modulo = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function modulo(a, b) {\n  return a % b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (modulo);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/modulo.js?");

/***/ }),

/***/ "./node_modules/ramda/es/move.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/move.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Move an item, at index `from`, to index `to`, in a list of elements.\n * A new list will be created containing the new elements order.\n *\n * @func\n * @memberOf R\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} from The source index\n * @param {Number} to The destination index\n * @param {Array} list The list which will serve to realise the move\n * @return {Array} The new list reordered\n * @example\n *\n *      R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f']\n *      R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation\n */\nvar move = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (from, to, list) {\n  var length = list.length;\n  var result = list.slice();\n  var positiveFrom = from < 0 ? length + from : from;\n  var positiveTo = to < 0 ? length + to : to;\n  var item = result.splice(positiveFrom, 1);\n\n  return positiveFrom < 0 || positiveFrom >= list.length || positiveTo < 0 || positiveTo >= list.length ? list : [].concat(result.slice(0, positiveTo)).concat(item).concat(result.slice(positiveTo, list.length));\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (move);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/move.js?");

/***/ }),

/***/ "./node_modules/ramda/es/multiply.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/multiply.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Multiplies two numbers. Equivalent to `a * b` but curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a The first value.\n * @param {Number} b The second value.\n * @return {Number} The result of `a * b`.\n * @see R.divide\n * @example\n *\n *      const double = R.multiply(2);\n *      const triple = R.multiply(3);\n *      double(3);       //=>  6\n *      triple(4);       //=> 12\n *      R.multiply(2, 5);  //=> 10\n */\nvar multiply = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function multiply(a, b) {\n  return a * b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (multiply);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/multiply.js?");

/***/ }),

/***/ "./node_modules/ramda/es/nAry.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/nAry.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Wraps a function of any arity (including nullary) in a function that accepts\n * exactly `n` parameters. Any extraneous parameters will not be passed to the\n * supplied function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} n The desired arity of the new function.\n * @param {Function} fn The function to wrap.\n * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of\n *         arity `n`.\n * @see R.binary, R.unary\n * @example\n *\n *      const takesTwoArgs = (a, b) => [a, b];\n *\n *      takesTwoArgs.length; //=> 2\n *      takesTwoArgs(1, 2); //=> [1, 2]\n *\n *      const takesOneArg = R.nAry(1, takesTwoArgs);\n *      takesOneArg.length; //=> 1\n *      // Only `n` arguments are passed to the wrapped function\n *      takesOneArg(1, 2); //=> [1, undefined]\n * @symb R.nAry(0, f)(a, b) = f()\n * @symb R.nAry(1, f)(a, b) = f(a)\n * @symb R.nAry(2, f)(a, b) = f(a, b)\n */\nvar nAry = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function nAry(n, fn) {\n  switch (n) {\n    case 0:\n      return function () {\n        return fn.call(this);\n      };\n    case 1:\n      return function (a0) {\n        return fn.call(this, a0);\n      };\n    case 2:\n      return function (a0, a1) {\n        return fn.call(this, a0, a1);\n      };\n    case 3:\n      return function (a0, a1, a2) {\n        return fn.call(this, a0, a1, a2);\n      };\n    case 4:\n      return function (a0, a1, a2, a3) {\n        return fn.call(this, a0, a1, a2, a3);\n      };\n    case 5:\n      return function (a0, a1, a2, a3, a4) {\n        return fn.call(this, a0, a1, a2, a3, a4);\n      };\n    case 6:\n      return function (a0, a1, a2, a3, a4, a5) {\n        return fn.call(this, a0, a1, a2, a3, a4, a5);\n      };\n    case 7:\n      return function (a0, a1, a2, a3, a4, a5, a6) {\n        return fn.call(this, a0, a1, a2, a3, a4, a5, a6);\n      };\n    case 8:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n        return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7);\n      };\n    case 9:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n        return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8);\n      };\n    case 10:\n      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n        return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);\n      };\n    default:\n      throw new Error('First argument to nAry must be a non-negative integer no greater than ten');\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (nAry);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/nAry.js?");

/***/ }),

/***/ "./node_modules/ramda/es/negate.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/negate.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Negates its argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Math\n * @sig Number -> Number\n * @param {Number} n\n * @return {Number}\n * @example\n *\n *      R.negate(42); //=> -42\n */\nvar negate = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function negate(n) {\n  return -n;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (negate);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/negate.js?");

/***/ }),

/***/ "./node_modules/ramda/es/none.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/none.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_complement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement.js */ \"./node_modules/ramda/es/internal/_complement.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _all_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./all.js */ \"./node_modules/ramda/es/all.js\");\n\n\n\n\n/**\n * Returns `true` if no elements of the list match the predicate, `false`\n * otherwise.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise.\n * @see R.all, R.any\n * @example\n *\n *      const isEven = n => n % 2 === 0;\n *      const isOdd = n => n % 2 === 1;\n *\n *      R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true\n *      R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false\n */\nvar none = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function none(fn, input) {\n  return Object(_all_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_internal_complement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn), input);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (none);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/none.js?");

/***/ }),

/***/ "./node_modules/ramda/es/not.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/not.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * A function that returns the `!` of its argument. It will return `true` when\n * passed false-y value, and `false` when passed a truth-y one.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig * -> Boolean\n * @param {*} a any value\n * @return {Boolean} the logical inverse of passed argument.\n * @see R.complement\n * @example\n *\n *      R.not(true); //=> false\n *      R.not(false); //=> true\n *      R.not(0); //=> true\n *      R.not(1); //=> false\n */\nvar not = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function not(a) {\n  return !a;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (not);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/not.js?");

/***/ }),

/***/ "./node_modules/ramda/es/nth.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/nth.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ \"./node_modules/ramda/es/internal/_isString.js\");\n\n\n\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n *      const list = ['foo', 'bar', 'baz', 'quux'];\n *      R.nth(1, list); //=> 'bar'\n *      R.nth(-1, list); //=> 'quux'\n *      R.nth(-99, list); //=> undefined\n *\n *      R.nth(2, 'abc'); //=> 'c'\n *      R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\nvar nth = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function nth(offset, list) {\n  var idx = offset < 0 ? list.length + offset : offset;\n  return Object(_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(list) ? list.charAt(idx) : list[idx];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (nth);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/nth.js?");

/***/ }),

/***/ "./node_modules/ramda/es/nthArg.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/nthArg.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ \"./node_modules/ramda/es/nth.js\");\n\n\n\n\n/**\n * Returns a function which returns its nth argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig Number -> *... -> *\n * @param {Number} n\n * @return {Function}\n * @example\n *\n *      R.nthArg(1)('a', 'b', 'c'); //=> 'b'\n *      R.nthArg(-1)('a', 'b', 'c'); //=> 'c'\n * @symb R.nthArg(-1)(a, b, c) = c\n * @symb R.nthArg(0)(a, b, c) = a\n * @symb R.nthArg(1)(a, b, c) = b\n */\nvar nthArg = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function nthArg(n) {\n  var arity = n < 0 ? 1 : n + 1;\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arity, function () {\n    return Object(_nth_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(n, arguments);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (nthArg);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/nthArg.js?");

/***/ }),

/***/ "./node_modules/ramda/es/o.js":
/*!************************************!*\
  !*** ./node_modules/ramda/es/o.js ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * `o` is a curried composition function that returns a unary function.\n * Like [`compose`](#compose), `o` performs right-to-left function composition.\n * Unlike [`compose`](#compose), the rightmost function passed to `o` will be\n * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is\n * limited to accepting only 2 unary functions. The name o was chosen because\n * of its similarity to the mathematical composition operator ∘.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Function\n * @sig (b -> c) -> (a -> b) -> a -> c\n * @param {Function} f\n * @param {Function} g\n * @return {Function}\n * @see R.compose, R.pipe\n * @example\n *\n *      const classyGreeting = name => \"The name's \" + name.last + \", \" + name.first + \" \" + name.last\n *      const yellGreeting = R.o(R.toUpper, classyGreeting);\n *      yellGreeting({first: 'James', last: 'Bond'}); //=> \"THE NAME'S BOND, JAMES BOND\"\n *\n *      R.o(R.multiply(10), R.add(10))(-4) //=> 60\n *\n * @symb R.o(f, g, x) = f(g(x))\n */\nvar o = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function o(f, g, x) {\n  return f(g(x));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (o);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/o.js?");

/***/ }),

/***/ "./node_modules/ramda/es/objOf.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/objOf.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Creates an object containing a single key:value pair.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Object\n * @sig String -> a -> {String:a}\n * @param {String} key\n * @param {*} val\n * @return {Object}\n * @see R.pair\n * @example\n *\n *      const matchPhrases = R.compose(\n *        R.objOf('must'),\n *        R.map(R.objOf('match_phrase'))\n *      );\n *      matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]}\n */\nvar objOf = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function objOf(key, val) {\n  var obj = {};\n  obj[key] = val;\n  return obj;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (objOf);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/objOf.js?");

/***/ }),

/***/ "./node_modules/ramda/es/of.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/of.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_of.js */ \"./node_modules/ramda/es/internal/_of.js\");\n\n\n\n/**\n * Returns a singleton array containing the value provided.\n *\n * Note this `of` is different from the ES6 `of`; See\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig a -> [a]\n * @param {*} x any value\n * @return {Array} An array wrapping `x`.\n * @example\n *\n *      R.of(null); //=> [null]\n *      R.of([42]); //=> [[42]]\n */\nvar of = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_internal_of_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/of.js?");

/***/ }),

/***/ "./node_modules/ramda/es/omit.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/omit.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n *      R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\nvar omit = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function omit(names, obj) {\n  var result = {};\n  var index = {};\n  var idx = 0;\n  var len = names.length;\n\n  while (idx < len) {\n    index[names[idx]] = 1;\n    idx += 1;\n  }\n\n  for (var prop in obj) {\n    if (!index.hasOwnProperty(prop)) {\n      result[prop] = obj[prop];\n    }\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (omit);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/omit.js?");

/***/ }),

/***/ "./node_modules/ramda/es/once.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/once.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n\n/**\n * Accepts a function `fn` and returns a function that guards invocation of\n * `fn` such that `fn` can only ever be called once, no matter how many times\n * the returned function is invoked. The first value calculated is returned in\n * subsequent invocations.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (a... -> b) -> (a... -> b)\n * @param {Function} fn The function to wrap in a call-only-once wrapper.\n * @return {Function} The wrapped function.\n * @example\n *\n *      const addOneOnce = R.once(x => x + 1);\n *      addOneOnce(10); //=> 11\n *      addOneOnce(addOneOnce(50)); //=> 11\n */\nvar once = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function once(fn) {\n  var called = false;\n  var result;\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn.length, function () {\n    if (called) {\n      return result;\n    }\n    called = true;\n    result = fn.apply(this, arguments);\n    return result;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (once);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/once.js?");

/***/ }),

/***/ "./node_modules/ramda/es/or.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/or.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns `true` if one or both of its arguments are `true`. Returns `false`\n * if both arguments are `false`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {Any} a\n * @param {Any} b\n * @return {Any} the first argument if truthy, otherwise the second argument.\n * @see R.either\n * @example\n *\n *      R.or(true, true); //=> true\n *      R.or(true, false); //=> true\n *      R.or(false, true); //=> true\n *      R.or(false, false); //=> false\n */\nvar or = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function or(a, b) {\n  return a || b;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (or);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/or.js?");

/***/ }),

/***/ "./node_modules/ramda/es/otherwise.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/otherwise.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_assertPromise.js */ \"./node_modules/ramda/es/internal/_assertPromise.js\");\n\n\n\n/**\n * Returns the result of applying the onFailure function to the value inside\n * a failed promise. This is useful for handling rejected promises\n * inside function compositions.\n *\n * @func\n * @memberOf R\n * @category Function\n * @sig (e -> b) -> (Promise e a) -> (Promise e b)\n * @sig (e -> (Promise f b)) -> (Promise e a) -> (Promise f b)\n * @param {Function} onFailure The function to apply. Can return a value or a promise of a value.\n * @param {Promise} p\n * @return {Promise} The result of calling `p.then(null, onFailure)`\n * @see R.then\n * @example\n *\n *      var failedFetch = (id) => Promise.reject('bad ID');\n *      var useDefault = () => ({ firstName: 'Bob', lastName: 'Loblaw' })\n *\n *      //recoverFromFailure :: String -> Promise ({firstName, lastName})\n *      var recoverFromFailure = R.pipe(\n *        failedFetch,\n *        R.otherwise(useDefault),\n *        R.then(R.pick(['firstName', 'lastName'])),\n *      );\n *      recoverFromFailure(12345).then(console.log)\n */\nvar otherwise = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function otherwise(f, p) {\n  Object(_internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('otherwise', p);\n\n  return p.then(null, f);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (otherwise);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/otherwise.js?");

/***/ }),

/***/ "./node_modules/ramda/es/over.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/over.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n// `Identity` is a functor that holds a single value, where `map` simply\n// transforms the held value with the provided function.\nvar Identity = function (x) {\n  return { value: x, map: function (f) {\n      return Identity(f(x));\n    } };\n};\n\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the result of applying the given function to\n * the focused value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> (a -> a) -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.prop, R.lensIndex, R.lensProp\n * @example\n *\n *      const headLens = R.lensIndex(0);\n *\n *      R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']\n */\nvar over = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function over(lens, f, x) {\n  // The value returned by the getter function is first transformed with `f`,\n  // then set as the value of an `Identity`. This is then mapped over with the\n  // setter function of the lens.\n  return lens(function (y) {\n    return Identity(f(y));\n  })(x).value;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (over);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/over.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pair.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/pair.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category List\n * @sig a -> b -> (a,b)\n * @param {*} fst\n * @param {*} snd\n * @return {Array}\n * @see R.objOf, R.of\n * @example\n *\n *      R.pair('foo', 'bar'); //=> ['foo', 'bar']\n */\nvar pair = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pair(fst, snd) {\n  return [fst, snd];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pair);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pair.js?");

/***/ }),

/***/ "./node_modules/ramda/es/partial.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/partial.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator.js */ \"./node_modules/ramda/es/internal/_createPartialApplicator.js\");\n\n\n\n/**\n * Takes a function `f` and a list of arguments, and returns a function `g`.\n * When applied, `g` returns the result of applying `f` to the arguments\n * provided initially followed by the arguments provided to `g`.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x)\n * @param {Function} f\n * @param {Array} args\n * @return {Function}\n * @see R.partialRight, R.curry\n * @example\n *\n *      const multiply2 = (a, b) => a * b;\n *      const double = R.partial(multiply2, [2]);\n *      double(2); //=> 4\n *\n *      const greet = (salutation, title, firstName, lastName) =>\n *        salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';\n *\n *      const sayHello = R.partial(greet, ['Hello']);\n *      const sayHelloToMs = R.partial(sayHello, ['Ms.']);\n *      sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!'\n * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d)\n */\nvar partial = /*#__PURE__*/Object(_internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (partial);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/partial.js?");

/***/ }),

/***/ "./node_modules/ramda/es/partialRight.js":
/*!***********************************************!*\
  !*** ./node_modules/ramda/es/partialRight.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator.js */ \"./node_modules/ramda/es/internal/_createPartialApplicator.js\");\n/* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip.js */ \"./node_modules/ramda/es/flip.js\");\n\n\n\n\n/**\n * Takes a function `f` and a list of arguments, and returns a function `g`.\n * When applied, `g` returns the result of applying `f` to the arguments\n * provided to `g` followed by the arguments provided initially.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x)\n * @param {Function} f\n * @param {Array} args\n * @return {Function}\n * @see R.partial\n * @example\n *\n *      const greet = (salutation, title, firstName, lastName) =>\n *        salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';\n *\n *      const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']);\n *\n *      greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!'\n * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b)\n */\nvar partialRight = /*#__PURE__*/Object(_internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_flip_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (partialRight);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/partialRight.js?");

/***/ }),

/***/ "./node_modules/ramda/es/partition.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/partition.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/ramda/es/filter.js\");\n/* harmony import */ var _juxt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./juxt.js */ \"./node_modules/ramda/es/juxt.js\");\n/* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reject.js */ \"./node_modules/ramda/es/reject.js\");\n\n\n\n\n/**\n * Takes a predicate and a list or other `Filterable` object and returns the\n * pair of filterable objects of the same type of elements which do and do not\n * satisfy, the predicate, respectively. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a]\n * @param {Function} pred A predicate to determine which side the element belongs to.\n * @param {Array} filterable the list (or other filterable) to partition.\n * @return {Array} An array, containing first the subset of elements that satisfy the\n *         predicate, and second the subset of elements that do not satisfy.\n * @see R.filter, R.reject\n * @example\n *\n *      R.partition(R.includes('s'), ['sss', 'ttt', 'foo', 'bars']);\n *      // => [ [ 'sss', 'bars' ],  [ 'ttt', 'foo' ] ]\n *\n *      R.partition(R.includes('s'), { a: 'sss', b: 'ttt', foo: 'bars' });\n *      // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' }  ]\n */\nvar partition = /*#__PURE__*/Object(_juxt_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([_filter_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], _reject_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (partition);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/partition.js?");

/***/ }),

/***/ "./node_modules/ramda/es/path.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/path.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop\n * @example\n *\n *      R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n *      R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n */\nvar path = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function path(paths, obj) {\n  var val = obj;\n  var idx = 0;\n  while (idx < paths.length) {\n    if (val == null) {\n      return;\n    }\n    val = val[paths[idx]];\n    idx += 1;\n  }\n  return val;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (path);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/path.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pathEq.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/pathEq.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n\n\n\n\n/**\n * Determines whether a nested path on an object has a specific value, in\n * [`R.equals`](#equals) terms. Most likely used to filter a list.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Relation\n * @typedefn Idx = String | Int\n * @sig [Idx] -> a -> {a} -> Boolean\n * @param {Array} path The path of the nested property to use\n * @param {*} val The value to compare the nested property with\n * @param {Object} obj The object to check the nested property in\n * @return {Boolean} `true` if the value equals the nested object property,\n *         `false` otherwise.\n * @example\n *\n *      const user1 = { address: { zipCode: 90210 } };\n *      const user2 = { address: { zipCode: 55555 } };\n *      const user3 = { name: 'Bob' };\n *      const users = [ user1, user2, user3 ];\n *      const isFamous = R.pathEq(['address', 'zipCode'], 90210);\n *      R.filter(isFamous, users); //=> [ user1 ]\n */\nvar pathEq = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pathEq(_path, val, obj) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_path_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_path, obj), val);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pathEq);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pathEq.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pathOr.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/pathOr.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo.js */ \"./node_modules/ramda/es/defaultTo.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n\n\n\n\n/**\n * If the given, non-null object has a value at the given path, returns the\n * value at that path. Otherwise returns the provided default value.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig a -> [Idx] -> {a} -> a\n * @param {*} d The default value.\n * @param {Array} p The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path` of the supplied object or the default value.\n * @example\n *\n *      R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2\n *      R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> \"N/A\"\n */\nvar pathOr = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pathOr(d, p, obj) {\n  return Object(_defaultTo_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(d, Object(_path_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(p, obj));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pathOr);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pathOr.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pathSatisfies.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/pathSatisfies.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n\n\n\n/**\n * Returns `true` if the specified object property at given path satisfies the\n * given predicate; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Logic\n * @typedefn Idx = String | Int\n * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean\n * @param {Function} pred\n * @param {Array} propPath\n * @param {*} obj\n * @return {Boolean}\n * @see R.propSatisfies, R.path\n * @example\n *\n *      R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true\n */\nvar pathSatisfies = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pathSatisfies(pred, propPath, obj) {\n  return propPath.length > 0 && pred(Object(_path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(propPath, obj));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pathSatisfies);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pathSatisfies.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pick.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/pick.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n *      R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n *      R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\nvar pick = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pick(names, obj) {\n  var result = {};\n  var idx = 0;\n  while (idx < names.length) {\n    if (names[idx] in obj) {\n      result[names[idx]] = obj[names[idx]];\n    }\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pick);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pick.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pickAll.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/pickAll.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Similar to `pick` except that this one includes a `key: undefined` pair for\n * properties that don't exist.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.pick\n * @example\n *\n *      R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n *      R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}\n */\nvar pickAll = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pickAll(names, obj) {\n  var result = {};\n  var idx = 0;\n  var len = names.length;\n  while (idx < len) {\n    var name = names[idx];\n    result[name] = obj[name];\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pickAll);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pickAll.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pickBy.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/pickBy.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns a partial copy of an object containing only the keys that satisfy\n * the supplied predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v}\n * @param {Function} pred A predicate to determine whether or not a key\n *        should be included on the output object.\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties that satisfy `pred`\n *         on it.\n * @see R.pick, R.filter\n * @example\n *\n *      const isUpperCase = (val, key) => key.toUpperCase() === key;\n *      R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}\n */\nvar pickBy = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pickBy(test, obj) {\n  var result = {};\n  for (var prop in obj) {\n    if (test(obj[prop], prop, obj)) {\n      result[prop] = obj[prop];\n    }\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pickBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pickBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pipe.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/pipe.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pipe; });\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_pipe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipe.js */ \"./node_modules/ramda/es/internal/_pipe.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n/* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail.js */ \"./node_modules/ramda/es/tail.js\");\n\n\n\n\n\n/**\n * Performs left-to-right function composition. The leftmost function may have\n * any arity; the remaining functions must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n *      const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n *      f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n */\nfunction pipe() {\n  if (arguments.length === 0) {\n    throw new Error('pipe requires at least one argument');\n  }\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments[0].length, Object(_reduce_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_internal_pipe_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], arguments[0], Object(_tail_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(arguments)));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pipe.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pipeK.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/pipeK.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pipeK; });\n/* harmony import */ var _composeK_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./composeK.js */ \"./node_modules/ramda/es/composeK.js\");\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ramda/es/reverse.js\");\n\n\n\n/**\n * Returns the left-to-right Kleisli composition of the provided functions,\n * each of which must return a value of a type supported by [`chain`](#chain).\n *\n * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Function\n * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z)\n * @param {...Function}\n * @return {Function}\n * @see R.composeK\n * @deprecated since v0.26.0\n * @example\n *\n *      //  parseJson :: String -> Maybe *\n *      //  get :: String -> Object -> Maybe *\n *\n *      //  getStateCode :: Maybe String -> Maybe String\n *      const getStateCode = R.pipeK(\n *        parseJson,\n *        get('user'),\n *        get('address'),\n *        get('state'),\n *        R.compose(Maybe.of, R.toUpper)\n *      );\n *\n *      getStateCode('{\"user\":{\"address\":{\"state\":\"ny\"}}}');\n *      //=> Just('NY')\n *      getStateCode('[Invalid JSON]');\n *      //=> Nothing()\n * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a)))\n */\nfunction pipeK() {\n  if (arguments.length === 0) {\n    throw new Error('pipeK requires at least one argument');\n  }\n  return _composeK_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, Object(_reverse_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arguments));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pipeK.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pipeP.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/pipeP.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pipeP; });\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_pipeP_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipeP.js */ \"./node_modules/ramda/es/internal/_pipeP.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n/* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail.js */ \"./node_modules/ramda/es/tail.js\");\n\n\n\n\n\n/**\n * Performs left-to-right composition of one or more Promise-returning\n * functions. The leftmost function may have any arity; the remaining functions\n * must be unary.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.composeP\n * @deprecated since v0.26.0\n * @example\n *\n *      //  followersForUser :: String -> Promise [User]\n *      const followersForUser = R.pipeP(db.getUserById, db.getFollowers);\n */\nfunction pipeP() {\n  if (arguments.length === 0) {\n    throw new Error('pipeP requires at least one argument');\n  }\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arguments[0].length, Object(_reduce_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_internal_pipeP_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], arguments[0], Object(_tail_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(arguments)));\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pipeP.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pipeWith.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/pipeWith.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _head_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./head.js */ \"./node_modules/ramda/es/head.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tail.js */ \"./node_modules/ramda/es/tail.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/ramda/es/identity.js\");\n\n\n\n\n\n\n\n/**\n * Performs left-to-right function composition using transforming function. The leftmost function may have\n * any arity; the remaining functions must be unary.\n *\n * **Note:** The result of pipeWith is not automatically curried.\n *\n * @func\n * @memberOf R\n * @category Function\n * @sig ((* -> *), [((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)]) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.composeWith, R.pipe\n * @example\n *\n *      const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res));\n *      const f = pipeWhileNotNil([Math.pow, R.negate, R.inc])\n *\n *      f(3, 4); // -(3^4) + 1\n * @symb R.pipeWith(f)([g, h, i])(...args) = f(i, f(h, f(g, ...args)))\n */\nvar pipeWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function pipeWith(xf, list) {\n  if (list.length <= 0) {\n    return _identity_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n  }\n\n  var headList = Object(_head_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(list);\n  var tailList = Object(_tail_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(list);\n\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(headList.length, function () {\n    return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function (result, f) {\n      return xf.call(this, f, result);\n    }, headList.apply(this, arguments), tailList);\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pipeWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pipeWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/pluck.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/pluck.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./prop.js */ \"./node_modules/ramda/es/prop.js\");\n\n\n\n\n/**\n * Returns a new list by plucking the same named property off all objects in\n * the list supplied.\n *\n * `pluck` will work on\n * any [functor](https://github.com/fantasyland/fantasy-land#functor) in\n * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => k -> f {k: v} -> f v\n * @param {Number|String} key The key name to pluck off of each object.\n * @param {Array} f The array or functor to consider.\n * @return {Array} The list of values for the given key.\n * @see R.props\n * @example\n *\n *      var getAges = R.pluck('age');\n *      getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]\n *\n *      R.pluck(0, [[1, 2], [3, 4]]);               //=> [1, 3]\n *      R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}\n * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]\n * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]\n */\nvar pluck = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function pluck(p, list) {\n  return Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_prop_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(p), list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (pluck);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/pluck.js?");

/***/ }),

/***/ "./node_modules/ramda/es/prepend.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/prepend.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns a new list with the given element at the front, followed by the\n * contents of the list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The item to add to the head of the output list.\n * @param {Array} list The array to add to the tail of the output list.\n * @return {Array} A new array.\n * @see R.append\n * @example\n *\n *      R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum']\n */\nvar prepend = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function prepend(el, list) {\n  return Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])([el], list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (prepend);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/prepend.js?");

/***/ }),

/***/ "./node_modules/ramda/es/product.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/product.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _multiply_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiply.js */ \"./node_modules/ramda/es/multiply.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n/**\n * Multiplies together all the elements of a list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list An array of numbers\n * @return {Number} The product of all the numbers in the list.\n * @see R.reduce\n * @example\n *\n *      R.product([2,4,6,8,100,1]); //=> 38400\n */\nvar product = /*#__PURE__*/Object(_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_multiply_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], 1);\n/* harmony default export */ __webpack_exports__[\"default\"] = (product);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/product.js?");

/***/ }),

/***/ "./node_modules/ramda/es/project.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/project.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_map.js */ \"./node_modules/ramda/es/internal/_map.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/ramda/es/identity.js\");\n/* harmony import */ var _pickAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pickAll.js */ \"./node_modules/ramda/es/pickAll.js\");\n/* harmony import */ var _useWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useWith.js */ \"./node_modules/ramda/es/useWith.js\");\n\n\n\n\n\n/**\n * Reasonable analog to SQL `select` statement.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @category Relation\n * @sig [k] -> [{k: v}] -> [{k: v}]\n * @param {Array} props The property names to project\n * @param {Array} objs The objects to query\n * @return {Array} An array of objects with just the `props` properties.\n * @example\n *\n *      const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2};\n *      const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7};\n *      const kids = [abby, fred];\n *      R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}]\n */\nvar project = /*#__PURE__*/Object(_useWith_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_internal_map_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], [_pickAll_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _identity_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]]); // passing `identity` gives correct arity\n/* harmony default export */ __webpack_exports__[\"default\"] = (project);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/project.js?");

/***/ }),

/***/ "./node_modules/ramda/es/prop.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/prop.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/ramda/es/path.js\");\n\n\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig s -> {s: a} -> a | Undefined\n * @param {String} p The property name\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path\n * @example\n *\n *      R.prop('x', {x: 100}); //=> 100\n *      R.prop('x', {}); //=> undefined\n *      R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function prop(p, obj) {\n  return Object(_path_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([p], obj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (prop);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/prop.js?");

/***/ }),

/***/ "./node_modules/ramda/es/propEq.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/propEq.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n\n\n\n/**\n * Returns `true` if the specified object property is equal, in\n * [`R.equals`](#equals) terms, to the given value; `false` otherwise.\n * You can test multiple properties with [`R.whereEq`](#whereEq).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig String -> a -> Object -> Boolean\n * @param {String} name\n * @param {*} val\n * @param {*} obj\n * @return {Boolean}\n * @see R.whereEq, R.propSatisfies, R.equals\n * @example\n *\n *      const abby = {name: 'Abby', age: 7, hair: 'blond'};\n *      const fred = {name: 'Fred', age: 12, hair: 'brown'};\n *      const rusty = {name: 'Rusty', age: 10, hair: 'brown'};\n *      const alois = {name: 'Alois', age: 15, disposition: 'surly'};\n *      const kids = [abby, fred, rusty, alois];\n *      const hasBrownHair = R.propEq('hair', 'brown');\n *      R.filter(hasBrownHair, kids); //=> [fred, rusty]\n */\nvar propEq = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function propEq(name, val, obj) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(val, obj[name]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (propEq);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/propEq.js?");

/***/ }),

/***/ "./node_modules/ramda/es/propIs.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/propIs.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is.js */ \"./node_modules/ramda/es/is.js\");\n\n\n\n/**\n * Returns `true` if the specified object property is of the given type;\n * `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Type\n * @sig Type -> String -> Object -> Boolean\n * @param {Function} type\n * @param {String} name\n * @param {*} obj\n * @return {Boolean}\n * @see R.is, R.propSatisfies\n * @example\n *\n *      R.propIs(Number, 'x', {x: 1, y: 2});  //=> true\n *      R.propIs(Number, 'x', {x: 'foo'});    //=> false\n *      R.propIs(Number, 'x', {});            //=> false\n */\nvar propIs = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function propIs(type, name, obj) {\n  return Object(_is_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(type, obj[name]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (propIs);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/propIs.js?");

/***/ }),

/***/ "./node_modules/ramda/es/propOr.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/propOr.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _pathOr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pathOr.js */ \"./node_modules/ramda/es/pathOr.js\");\n\n\n\n/**\n * If the given, non-null object has an own property with the specified name,\n * returns the value of that property. Otherwise returns the provided default\n * value.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Object\n * @sig a -> String -> Object -> a\n * @param {*} val The default value.\n * @param {String} p The name of the property to return.\n * @param {Object} obj The object to query.\n * @return {*} The value of given property of the supplied object or the default value.\n * @example\n *\n *      const alice = {\n *        name: 'ALICE',\n *        age: 101\n *      };\n *      const favorite = R.prop('favoriteLibrary');\n *      const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary');\n *\n *      favorite(alice);  //=> undefined\n *      favoriteWithDefault(alice);  //=> 'Ramda'\n */\nvar propOr = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function propOr(val, p, obj) {\n  return Object(_pathOr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(val, [p], obj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (propOr);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/propOr.js?");

/***/ }),

/***/ "./node_modules/ramda/es/propSatisfies.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/propSatisfies.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Returns `true` if the specified object property satisfies the given\n * predicate; `false` otherwise. You can test multiple properties with\n * [`R.where`](#where).\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Logic\n * @sig (a -> Boolean) -> String -> {String: a} -> Boolean\n * @param {Function} pred\n * @param {String} name\n * @param {*} obj\n * @return {Boolean}\n * @see R.where, R.propEq, R.propIs\n * @example\n *\n *      R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true\n */\nvar propSatisfies = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function propSatisfies(pred, name, obj) {\n  return pred(obj[name]);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (propSatisfies);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/propSatisfies.js?");

/***/ }),

/***/ "./node_modules/ramda/es/props.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/props.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Acts as multiple `prop`: array of keys in, array of values out. Preserves\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> [v]\n * @param {Array} ps The property names to fetch\n * @param {Object} obj The object to query\n * @return {Array} The corresponding values or partially applied function.\n * @example\n *\n *      R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]\n *      R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]\n *\n *      const fullName = R.compose(R.join(' '), R.props(['first', 'last']));\n *      fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'\n */\nvar props = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function props(ps, obj) {\n  var len = ps.length;\n  var out = [];\n  var idx = 0;\n\n  while (idx < len) {\n    out[idx] = obj[ps[idx]];\n    idx += 1;\n  }\n\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (props);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/props.js?");

/***/ }),

/***/ "./node_modules/ramda/es/range.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/range.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber.js */ \"./node_modules/ramda/es/internal/_isNumber.js\");\n\n\n\n/**\n * Returns a list of numbers from `from` (inclusive) to `to` (exclusive).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> Number -> [Number]\n * @param {Number} from The first number in the list.\n * @param {Number} to One more than the last number in the list.\n * @return {Array} The list of numbers in the set `[a, b)`.\n * @example\n *\n *      R.range(1, 5);    //=> [1, 2, 3, 4]\n *      R.range(50, 53);  //=> [50, 51, 52]\n */\nvar range = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function range(from, to) {\n  if (!(Object(_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(from) && Object(_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(to))) {\n    throw new TypeError('Both arguments to range must be numbers');\n  }\n  var result = [];\n  var n = from;\n  while (n < to) {\n    result.push(n);\n    n += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (range);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/range.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reduce.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/reduce.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n\n\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n *        current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n *      R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n *      //          -               -10\n *      //         / \\              / \\\n *      //        -   4           -6   4\n *      //       / \\              / \\\n *      //      -   3   ==>     -3   3\n *      //     / \\              / \\\n *      //    -   2           -1   2\n *      //   / \\              / \\\n *      //  0   1            0   1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\nvar reduce = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduce);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reduce.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reduceBy.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/reduceBy.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN.js */ \"./node_modules/ramda/es/internal/_curryN.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_xreduceBy_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xreduceBy.js */ \"./node_modules/ramda/es/internal/_xreduceBy.js\");\n\n\n\n\n\n\n/**\n * Groups the elements of the list according to the result of calling\n * the String-returning function `keyFn` on each element and reduces the elements\n * of each group to a single value via the reducer function `valueFn`.\n *\n * This function is basically a more general [`groupBy`](#groupBy) function.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category List\n * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a}\n * @param {Function} valueFn The function that reduces the elements of each group to a single\n *        value. Receives two values, accumulator for a particular group and the current element.\n * @param {*} acc The (initial) accumulator value for each group.\n * @param {Function} keyFn The function that maps the list's element into a key.\n * @param {Array} list The array to group.\n * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of\n *         `valueFn` for elements which produced that key when passed to `keyFn`.\n * @see R.groupBy, R.reduce\n * @example\n *\n *      const groupNames = (acc, {name}) => acc.concat(name)\n *      const toGrade = ({score}) =>\n *        score < 65 ? 'F' :\n *        score < 70 ? 'D' :\n *        score < 80 ? 'C' :\n *        score < 90 ? 'B' : 'A'\n *\n *      var students = [\n *        {name: 'Abby', score: 83},\n *        {name: 'Bart', score: 62},\n *        {name: 'Curt', score: 88},\n *        {name: 'Dora', score: 92},\n *      ]\n *\n *      reduceBy(groupNames, [], toGrade, students)\n *      //=> {\"A\": [\"Dora\"], \"B\": [\"Abby\", \"Curt\"], \"F\": [\"Bart\"]}\n */\nvar reduceBy = /*#__PURE__*/Object(_internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(4, [], /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xreduceBy_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"], function reduceBy(valueFn, valueAcc, keyFn, list) {\n  return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function (acc, elt) {\n    var key = keyFn(elt);\n    acc[key] = valueFn(Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(key, acc) ? acc[key] : valueAcc, elt);\n    return acc;\n  }, {}, list);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduceBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reduceBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reduceRight.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/reduceRight.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * Similar to [`reduce`](#reduce), except moves through the input list from the\n * right to the left.\n *\n * The iterator function receives two values: *(value, acc)*, while the arguments'\n * order of `reduce`'s iterator function is *(acc, value)*.\n *\n * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduceRight` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> b) -> b -> [a] -> b\n * @param {Function} fn The iterator function. Receives two values, the current element from the array\n *        and the accumulator.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduce, R.addIndex\n * @example\n *\n *      R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2\n *      //    -               -2\n *      //   / \\              / \\\n *      //  1   -            1   3\n *      //     / \\              / \\\n *      //    2   -     ==>    2  -1\n *      //       / \\              / \\\n *      //      3   -            3   4\n *      //         / \\              / \\\n *      //        4   0            4   0\n *\n * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a)))\n */\nvar reduceRight = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function reduceRight(fn, acc, list) {\n  var idx = list.length - 1;\n  while (idx >= 0) {\n    acc = fn(list[idx], acc);\n    idx -= 1;\n  }\n  return acc;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduceRight);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reduceRight.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reduceWhile.js":
/*!**********************************************!*\
  !*** ./node_modules/ramda/es/reduceWhile.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN.js */ \"./node_modules/ramda/es/internal/_curryN.js\");\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_reduced_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n\n\n\n\n/**\n * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating\n * through the list, successively calling the iterator function. `reduceWhile`\n * also takes a predicate that is evaluated before each step. If the predicate\n * returns `false`, it \"short-circuits\" the iteration and returns the current\n * value of the accumulator.\n *\n * @func\n * @memberOf R\n * @since v0.22.0\n * @category List\n * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} pred The predicate. It is passed the accumulator and the\n *        current element.\n * @param {Function} fn The iterator function. Receives two values, the\n *        accumulator and the current element.\n * @param {*} a The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduce, R.reduced\n * @example\n *\n *      const isOdd = (acc, x) => x % 2 === 1;\n *      const xs = [1, 3, 5, 60, 777, 800];\n *      R.reduceWhile(isOdd, R.add, 0, xs); //=> 9\n *\n *      const ys = [2, 4, 6]\n *      R.reduceWhile(isOdd, R.add, 111, ys); //=> 111\n */\nvar reduceWhile = /*#__PURE__*/Object(_internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(4, [], function _reduceWhile(pred, fn, a, list) {\n  return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (acc, x) {\n    return pred(acc, x) ? fn(acc, x) : Object(_internal_reduced_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(acc);\n  }, a, list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduceWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reduceWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reduced.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/reduced.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduced.js */ \"./node_modules/ramda/es/internal/_reduced.js\");\n\n\n\n/**\n * Returns a value wrapped to indicate that it is the final value of the reduce\n * and transduce functions. The returned value should be considered a black\n * box: the internal structure is not guaranteed to be stable.\n *\n * Note: this optimization is only available to the below functions:\n * - [`reduce`](#reduce)\n * - [`reduceWhile`](#reduceWhile)\n * - [`transduce`](#transduce)\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category List\n * @sig a -> *\n * @param {*} x The final value of the reduce.\n * @return {*} The wrapped value.\n * @see R.reduce, R.reduceWhile, R.transduce\n * @example\n *\n *     R.reduce(\n *       (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),\n *       [],\n *       [1, 2, 3, 4, 5]) // [1, 2, 3]\n */\nvar reduced = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_internal_reduced_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduced);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reduced.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reject.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/reject.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_complement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement.js */ \"./node_modules/ramda/es/internal/_complement.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter.js */ \"./node_modules/ramda/es/filter.js\");\n\n\n\n\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n *      const isOdd = (n) => n % 2 === 1;\n *\n *      R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n *      R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar reject = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function reject(pred, filterable) {\n  return Object(_filter_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_internal_complement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pred), filterable);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (reject);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reject.js?");

/***/ }),

/***/ "./node_modules/ramda/es/remove.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/remove.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Removes the sub-list of `list` starting at index `start` and containing\n * `count` elements. _Note that this is not destructive_: it returns a copy of\n * the list with the changes.\n * <small>No lists have been harmed in the application of this function.</small>\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} start The position to start removing elements\n * @param {Number} count The number of elements to remove\n * @param {Array} list The list to remove from\n * @return {Array} A new Array with `count` elements from `start` removed.\n * @see R.without\n * @example\n *\n *      R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]\n */\nvar remove = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function remove(start, count, list) {\n  var result = Array.prototype.slice.call(list, 0);\n  result.splice(start, count);\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (remove);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/remove.js?");

/***/ }),

/***/ "./node_modules/ramda/es/repeat.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/repeat.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always.js */ \"./node_modules/ramda/es/always.js\");\n/* harmony import */ var _times_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./times.js */ \"./node_modules/ramda/es/times.js\");\n\n\n\n\n/**\n * Returns a fixed list of size `n` containing a specified identical value.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig a -> n -> [a]\n * @param {*} value The value to repeat.\n * @param {Number} n The desired size of the output list.\n * @return {Array} A new array containing `n` `value`s.\n * @see R.times\n * @example\n *\n *      R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi']\n *\n *      const obj = {};\n *      const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}]\n *      repeatedObjs[0] === repeatedObjs[1]; //=> true\n * @symb R.repeat(a, 0) = []\n * @symb R.repeat(a, 1) = [a]\n * @symb R.repeat(a, 2) = [a, a]\n */\nvar repeat = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function repeat(value, n) {\n  return Object(_times_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Object(_always_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value), n);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (repeat);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/repeat.js?");

/***/ }),

/***/ "./node_modules/ramda/es/replace.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/replace.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Replace a substring or regex match in a string with a replacement.\n *\n * The first two parameters correspond to the parameters of the\n * `String.prototype.replace()` function, so the second parameter can also be a\n * function.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category String\n * @sig RegExp|String -> String -> String -> String\n * @param {RegExp|String} pattern A regular expression or a substring to match.\n * @param {String} replacement The string to replace the matches with.\n * @param {String} str The String to do the search and replacement in.\n * @return {String} The result.\n * @example\n *\n *      R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo'\n *      R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo'\n *\n *      // Use the \"g\" (global) flag to replace all occurrences:\n *      R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar'\n */\nvar replace = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function replace(regex, replacement, str) {\n  return str.replace(regex, replacement);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (replace);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/replace.js?");

/***/ }),

/***/ "./node_modules/ramda/es/reverse.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/reverse.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ \"./node_modules/ramda/es/internal/_isString.js\");\n\n\n\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n *      R.reverse([1, 2, 3]);  //=> [3, 2, 1]\n *      R.reverse([1, 2]);     //=> [2, 1]\n *      R.reverse([1]);        //=> [1]\n *      R.reverse([]);         //=> []\n *\n *      R.reverse('abc');      //=> 'cba'\n *      R.reverse('ab');       //=> 'ba'\n *      R.reverse('a');        //=> 'a'\n *      R.reverse('');         //=> ''\n */\nvar reverse = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function reverse(list) {\n  return Object(_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (reverse);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/reverse.js?");

/***/ }),

/***/ "./node_modules/ramda/es/scan.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/scan.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Scan is similar to [`reduce`](#reduce), but returns a list of successively\n * reduced values from the left\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> [a]\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n *        current element from the array\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {Array} A list of all intermediately reduced values.\n * @see R.reduce, R.mapAccum\n * @example\n *\n *      const numbers = [1, 2, 3, 4];\n *      const factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24]\n * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)]\n */\nvar scan = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function scan(fn, acc, list) {\n  var idx = 0;\n  var len = list.length;\n  var result = [acc];\n  while (idx < len) {\n    acc = fn(acc, list[idx]);\n    result[idx + 1] = acc;\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (scan);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/scan.js?");

/***/ }),

/***/ "./node_modules/ramda/es/sequence.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/sequence.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ap.js */ \"./node_modules/ramda/es/ap.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony import */ var _prepend_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prepend.js */ \"./node_modules/ramda/es/prepend.js\");\n/* harmony import */ var _reduceRight_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduceRight.js */ \"./node_modules/ramda/es/reduceRight.js\");\n\n\n\n\n\n\n/**\n * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable)\n * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an\n * Applicative of Traversable.\n *\n * Dispatches to the `sequence` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a)\n * @param {Function} of\n * @param {*} traversable\n * @return {*}\n * @see R.traverse\n * @example\n *\n *      R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]);   //=> Just([1, 2, 3])\n *      R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing()\n *\n *      R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)]\n *      R.sequence(R.of, Nothing());       //=> [Nothing()]\n */\nvar sequence = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function sequence(of, traversable) {\n  return typeof traversable.sequence === 'function' ? traversable.sequence(of) : Object(_reduceRight_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function (x, acc) {\n    return Object(_ap_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_prepend_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], x), acc);\n  }, of([]), traversable);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (sequence);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/sequence.js?");

/***/ }),

/***/ "./node_modules/ramda/es/set.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/set.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always.js */ \"./node_modules/ramda/es/always.js\");\n/* harmony import */ var _over_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./over.js */ \"./node_modules/ramda/es/over.js\");\n\n\n\n\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the given value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> a -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.prop, R.lensIndex, R.lensProp\n * @example\n *\n *      const xLens = R.lensProp('x');\n *\n *      R.set(xLens, 4, {x: 1, y: 2});  //=> {x: 4, y: 2}\n *      R.set(xLens, 8, {x: 1, y: 2});  //=> {x: 8, y: 2}\n */\nvar set = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function set(lens, v, x) {\n  return Object(_over_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lens, Object(_always_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(v), x);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (set);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/set.js?");

/***/ }),

/***/ "./node_modules/ramda/es/slice.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/slice.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ \"./node_modules/ramda/es/internal/_checkForMethod.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n *      R.slice(1, 3, ['a', 'b', 'c', 'd']);        //=> ['b', 'c']\n *      R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n *      R.slice(0, -1, ['a', 'b', 'c', 'd']);       //=> ['a', 'b', 'c']\n *      R.slice(-3, -1, ['a', 'b', 'c', 'd']);      //=> ['b', 'c']\n *      R.slice(0, 3, 'ramda');                     //=> 'ram'\n */\nvar slice = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('slice', function slice(fromIndex, toIndex, list) {\n  return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (slice);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/slice.js?");

/***/ }),

/***/ "./node_modules/ramda/es/sort.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/sort.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Returns a copy of the list, sorted according to the comparator function,\n * which should accept two values at a time and return a negative number if the\n * first value is smaller, a positive number if it's larger, and zero if they\n * are equal. Please note that this is a **copy** of the list. It does not\n * modify the original.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, a) -> Number) -> [a] -> [a]\n * @param {Function} comparator A sorting function :: a -> b -> Int\n * @param {Array} list The list to sort\n * @return {Array} a new array with its elements sorted by the comparator function.\n * @example\n *\n *      const diff = function(a, b) { return a - b; };\n *      R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7]\n */\nvar sort = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function sort(comparator, list) {\n  return Array.prototype.slice.call(list, 0).sort(comparator);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (sort);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/sort.js?");

/***/ }),

/***/ "./node_modules/ramda/es/sortBy.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/sortBy.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Sorts the list according to the supplied function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord b => (a -> b) -> [a] -> [a]\n * @param {Function} fn\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted by the keys generated by `fn`.\n * @example\n *\n *      const sortByFirstItem = R.sortBy(R.prop(0));\n *      const pairs = [[-1, 1], [-2, 2], [-3, 3]];\n *      sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]]\n *\n *      const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name')));\n *      const alice = {\n *        name: 'ALICE',\n *        age: 101\n *      };\n *      const bob = {\n *        name: 'Bob',\n *        age: -10\n *      };\n *      const clara = {\n *        name: 'clara',\n *        age: 314.159\n *      };\n *      const people = [clara, bob, alice];\n *      sortByNameCaseInsensitive(people); //=> [alice, bob, clara]\n */\nvar sortBy = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function sortBy(fn, list) {\n  return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n    var aa = fn(a);\n    var bb = fn(b);\n    return aa < bb ? -1 : aa > bb ? 1 : 0;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (sortBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/sortBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/sortWith.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/sortWith.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Sorts a list according to a list of comparators.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Relation\n * @sig [(a, a) -> Number] -> [a] -> [a]\n * @param {Array} functions A list of comparator functions.\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted according to the comarator functions.\n * @example\n *\n *      const alice = {\n *        name: 'alice',\n *        age: 40\n *      };\n *      const bob = {\n *        name: 'bob',\n *        age: 30\n *      };\n *      const clara = {\n *        name: 'clara',\n *        age: 40\n *      };\n *      const people = [clara, bob, alice];\n *      const ageNameSort = R.sortWith([\n *        R.descend(R.prop('age')),\n *        R.ascend(R.prop('name'))\n *      ]);\n *      ageNameSort(people); //=> [alice, clara, bob]\n */\nvar sortWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function sortWith(fns, list) {\n  return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n    var result = 0;\n    var i = 0;\n    while (result === 0 && i < fns.length) {\n      result = fns[i](a, b);\n      i += 1;\n    }\n    return result;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (sortWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/sortWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/split.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/split.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ \"./node_modules/ramda/es/invoker.js\");\n\n\n/**\n * Splits a string into an array of strings based on the given\n * separator.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category String\n * @sig (String | RegExp) -> String -> [String]\n * @param {String|RegExp} sep The pattern.\n * @param {String} str The string to separate into an array.\n * @return {Array} The array of strings from `str` separated by `str`.\n * @see R.join\n * @example\n *\n *      const pathComponents = R.split('/');\n *      R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node']\n *\n *      R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd']\n */\nvar split = /*#__PURE__*/Object(_invoker_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1, 'split');\n/* harmony default export */ __webpack_exports__[\"default\"] = (split);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/split.js?");

/***/ }),

/***/ "./node_modules/ramda/es/splitAt.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/splitAt.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./length.js */ \"./node_modules/ramda/es/length.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n/**\n * Splits a given list or string at a given index.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig Number -> [a] -> [[a], [a]]\n * @sig Number -> String -> [String, String]\n * @param {Number} index The index where the array/string is split.\n * @param {Array|String} array The array/string to be split.\n * @return {Array}\n * @example\n *\n *      R.splitAt(1, [1, 2, 3]);          //=> [[1], [2, 3]]\n *      R.splitAt(5, 'hello world');      //=> ['hello', ' world']\n *      R.splitAt(-1, 'foobar');          //=> ['fooba', 'r']\n */\nvar splitAt = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function splitAt(index, array) {\n  return [Object(_slice_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(0, index, array), Object(_slice_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(index, Object(_length_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(array), array)];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (splitAt);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/splitAt.js?");

/***/ }),

/***/ "./node_modules/ramda/es/splitEvery.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/splitEvery.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n/**\n * Splits a collection into slices of the specified length.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig Number -> [a] -> [[a]]\n * @sig Number -> String -> [String]\n * @param {Number} n\n * @param {Array} list\n * @return {Array}\n * @example\n *\n *      R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]]\n *      R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz']\n */\nvar splitEvery = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function splitEvery(n, list) {\n  if (n <= 0) {\n    throw new Error('First argument to splitEvery must be a positive integer');\n  }\n  var result = [];\n  var idx = 0;\n  while (idx < list.length) {\n    result.push(Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(idx, idx += n, list));\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (splitEvery);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/splitEvery.js?");

/***/ }),

/***/ "./node_modules/ramda/es/splitWhen.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/splitWhen.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Takes a list and a predicate and returns a pair of lists with the following properties:\n *\n *  - the result of concatenating the two output lists is equivalent to the input list;\n *  - none of the elements of the first output list satisfies the predicate; and\n *  - if the second output list is non-empty, its first element satisfies the predicate.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [[a], [a]]\n * @param {Function} pred The predicate that determines where the array is split.\n * @param {Array} list The array to be split.\n * @return {Array}\n * @example\n *\n *      R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]);   //=> [[1], [2, 3, 1, 2, 3]]\n */\nvar splitWhen = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function splitWhen(pred, list) {\n  var idx = 0;\n  var len = list.length;\n  var prefix = [];\n\n  while (idx < len && !pred(list[idx])) {\n    prefix.push(list[idx]);\n    idx += 1;\n  }\n\n  return [prefix, Array.prototype.slice.call(list, idx)];\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (splitWhen);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/splitWhen.js?");

/***/ }),

/***/ "./node_modules/ramda/es/startsWith.js":
/*!*********************************************!*\
  !*** ./node_modules/ramda/es/startsWith.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n/* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take.js */ \"./node_modules/ramda/es/take.js\");\n\n\n\n\n/**\n * Checks if a list starts with the provided sublist.\n *\n * Similarly, checks if a string starts with the provided substring.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category List\n * @sig [a] -> [a] -> Boolean\n * @sig String -> String -> Boolean\n * @param {*} prefix\n * @param {*} list\n * @return {Boolean}\n * @see R.endsWith\n * @example\n *\n *      R.startsWith('a', 'abc')                //=> true\n *      R.startsWith('b', 'abc')                //=> false\n *      R.startsWith(['a'], ['a', 'b', 'c'])    //=> true\n *      R.startsWith(['b'], ['a', 'b', 'c'])    //=> false\n */\nvar startsWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (prefix, list) {\n  return Object(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_take_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(prefix.length, list), prefix);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (startsWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/startsWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/subtract.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/subtract.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Subtracts its second argument from its first argument.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a The first value.\n * @param {Number} b The second value.\n * @return {Number} The result of `a - b`.\n * @see R.add\n * @example\n *\n *      R.subtract(10, 8); //=> 2\n *\n *      const minus5 = R.subtract(R.__, 5);\n *      minus5(17); //=> 12\n *\n *      const complementaryAngle = R.subtract(90);\n *      complementaryAngle(30); //=> 60\n *      complementaryAngle(72); //=> 18\n */\nvar subtract = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function subtract(a, b) {\n  return Number(a) - Number(b);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (subtract);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/subtract.js?");

/***/ }),

/***/ "./node_modules/ramda/es/sum.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/sum.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ \"./node_modules/ramda/es/add.js\");\n/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce.js */ \"./node_modules/ramda/es/reduce.js\");\n\n\n\n/**\n * Adds together all the elements of a list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list An array of numbers\n * @return {Number} The sum of all the numbers in the list.\n * @see R.reduce\n * @example\n *\n *      R.sum([2,4,6,8,100,1]); //=> 121\n */\nvar sum = /*#__PURE__*/Object(_reduce_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_add_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], 0);\n/* harmony default export */ __webpack_exports__[\"default\"] = (sum);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/sum.js?");

/***/ }),

/***/ "./node_modules/ramda/es/symmetricDifference.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/symmetricDifference.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat.js */ \"./node_modules/ramda/es/concat.js\");\n/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./difference.js */ \"./node_modules/ramda/es/difference.js\");\n\n\n\n\n/**\n * Finds the set (i.e. no duplicates) of all elements contained in the first or\n * second list, but not both.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` or `list2`, but not both.\n * @see R.symmetricDifferenceWith, R.difference, R.differenceWith\n * @example\n *\n *      R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5]\n *      R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2]\n */\nvar symmetricDifference = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function symmetricDifference(list1, list2) {\n  return Object(_concat_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_difference_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(list1, list2), Object(_difference_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(list2, list1));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (symmetricDifference);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/symmetricDifference.js?");

/***/ }),

/***/ "./node_modules/ramda/es/symmetricDifferenceWith.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/symmetricDifferenceWith.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat.js */ \"./node_modules/ramda/es/concat.js\");\n/* harmony import */ var _differenceWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./differenceWith.js */ \"./node_modules/ramda/es/differenceWith.js\");\n\n\n\n\n/**\n * Finds the set (i.e. no duplicates) of all elements contained in the first or\n * second list, but not both. Duplication is determined according to the value\n * returned by applying the supplied predicate to two list elements.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Relation\n * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` or `list2`, but not both.\n * @see R.symmetricDifference, R.difference, R.differenceWith\n * @example\n *\n *      const eqA = R.eqBy(R.prop('a'));\n *      const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}];\n *      const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}];\n *      R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}]\n */\nvar symmetricDifferenceWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function symmetricDifferenceWith(pred, list1, list2) {\n  return Object(_concat_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_differenceWith_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(pred, list1, list2), Object(_differenceWith_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(pred, list2, list1));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (symmetricDifferenceWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/symmetricDifferenceWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/tail.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/tail.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ \"./node_modules/ramda/es/internal/_checkForMethod.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n *      R.tail([1, 2, 3]);  //=> [2, 3]\n *      R.tail([1, 2]);     //=> [2]\n *      R.tail([1]);        //=> []\n *      R.tail([]);         //=> []\n *\n *      R.tail('abc');  //=> 'bc'\n *      R.tail('ab');   //=> 'b'\n *      R.tail('a');    //=> ''\n *      R.tail('');     //=> ''\n */\nvar tail = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('tail', /*#__PURE__*/Object(_slice_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(1, Infinity)));\n/* harmony default export */ __webpack_exports__[\"default\"] = (tail);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/tail.js?");

/***/ }),

/***/ "./node_modules/ramda/es/take.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/take.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xtake_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtake.js */ \"./node_modules/ramda/es/internal/_xtake.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n\n/**\n * Returns the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `take` method).\n *\n * Dispatches to the `take` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*}\n * @see R.drop\n * @example\n *\n *      R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']\n *      R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']\n *      R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n *      R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n *      R.take(3, 'ramda');               //=> 'ram'\n *\n *      const personnel = [\n *        'Dave Brubeck',\n *        'Paul Desmond',\n *        'Eugene Wright',\n *        'Joe Morello',\n *        'Gerry Mulligan',\n *        'Bob Bates',\n *        'Joe Dodge',\n *        'Ron Crotty'\n *      ];\n *\n *      const takeFive = R.take(5);\n *      takeFive(personnel);\n *      //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']\n * @symb R.take(-1, [a, b]) = [a, b]\n * @symb R.take(0, [a, b]) = []\n * @symb R.take(1, [a, b]) = [a]\n * @symb R.take(2, [a, b]) = [a, b]\n */\nvar take = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['take'], _internal_xtake_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function take(n, xs) {\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, n < 0 ? Infinity : n, xs);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (take);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/take.js?");

/***/ }),

/***/ "./node_modules/ramda/es/takeLast.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/takeLast.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _drop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop.js */ \"./node_modules/ramda/es/drop.js\");\n\n\n\n/**\n * Returns a new list containing the last `n` elements of the given list.\n * If `n > list.length`, returns a list of `list.length` elements.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n The number of elements to return.\n * @param {Array} xs The collection to consider.\n * @return {Array}\n * @see R.dropLast\n * @example\n *\n *      R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz']\n *      R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz']\n *      R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n *      R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n *      R.takeLast(3, 'ramda');               //=> 'mda'\n */\nvar takeLast = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function takeLast(n, xs) {\n  return Object(_drop_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(n >= 0 ? xs.length - n : 0, xs);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (takeLast);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/takeLast.js?");

/***/ }),

/***/ "./node_modules/ramda/es/takeLastWhile.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/takeLastWhile.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n/**\n * Returns a new list containing the last `n` elements of a given list, passing\n * each value to the supplied predicate function, and terminating when the\n * predicate function returns `false`. Excludes the element that caused the\n * predicate function to fail. The predicate function is passed one argument:\n * *(value)*.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} fn The function called per iteration.\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array.\n * @see R.dropLastWhile, R.addIndex\n * @example\n *\n *      const isNotOne = x => x !== 1;\n *\n *      R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4]\n *\n *      R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda'\n */\nvar takeLastWhile = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function takeLastWhile(fn, xs) {\n  var idx = xs.length - 1;\n  while (idx >= 0 && fn(xs[idx])) {\n    idx -= 1;\n  }\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(idx + 1, Infinity, xs);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (takeLastWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/takeLastWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/takeWhile.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/takeWhile.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xtakeWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtakeWhile.js */ \"./node_modules/ramda/es/internal/_xtakeWhile.js\");\n/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ \"./node_modules/ramda/es/slice.js\");\n\n\n\n\n\n/**\n * Returns a new list containing the first `n` elements of a given list,\n * passing each value to the supplied predicate function, and terminating when\n * the predicate function returns `false`. Excludes the element that caused the\n * predicate function to fail. The predicate function is passed one argument:\n * *(value)*.\n *\n * Dispatches to the `takeWhile` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} fn The function called per iteration.\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array.\n * @see R.dropWhile, R.transduce, R.addIndex\n * @example\n *\n *      const isNotFour = x => x !== 4;\n *\n *      R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3]\n *\n *      R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram'\n */\nvar takeWhile = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(['takeWhile'], _internal_xtakeWhile_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function takeWhile(fn, xs) {\n  var idx = 0;\n  var len = xs.length;\n  while (idx < len && fn(xs[idx])) {\n    idx += 1;\n  }\n  return Object(_slice_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, idx, xs);\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (takeWhile);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/takeWhile.js?");

/***/ }),

/***/ "./node_modules/ramda/es/tap.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/tap.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ \"./node_modules/ramda/es/internal/_dispatchable.js\");\n/* harmony import */ var _internal_xtap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtap.js */ \"./node_modules/ramda/es/internal/_xtap.js\");\n\n\n\n\n/**\n * Runs the given function with the supplied object, then returns the object.\n *\n * Acts as a transducer if a transformer is given as second parameter.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (a -> *) -> a -> a\n * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away.\n * @param {*} x\n * @return {*} `x`.\n * @example\n *\n *      const sayX = x => console.log('x is ' + x);\n *      R.tap(sayX, 100); //=> 100\n *      // logs 'x is 100'\n * @symb R.tap(f, a) = a\n */\nvar tap = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/Object(_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([], _internal_xtap_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], function tap(fn, x) {\n  fn(x);\n  return x;\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (tap);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/tap.js?");

/***/ }),

/***/ "./node_modules/ramda/es/test.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/test.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_cloneRegExp.js */ \"./node_modules/ramda/es/internal/_cloneRegExp.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_isRegExp_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isRegExp.js */ \"./node_modules/ramda/es/internal/_isRegExp.js\");\n/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString.js */ \"./node_modules/ramda/es/toString.js\");\n\n\n\n\n\n/**\n * Determines whether a given string matches a given regular expression.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category String\n * @sig RegExp -> String -> Boolean\n * @param {RegExp} pattern\n * @param {String} str\n * @return {Boolean}\n * @see R.match\n * @example\n *\n *      R.test(/^x/, 'xyz'); //=> true\n *      R.test(/^y/, 'xyz'); //=> false\n */\nvar test = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function test(pattern, str) {\n  if (!Object(_internal_isRegExp_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(pattern)) {\n    throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + Object(_toString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(pattern));\n  }\n  return Object(_internal_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pattern).test(str);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (test);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/test.js?");

/***/ }),

/***/ "./node_modules/ramda/es/then.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/then.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_assertPromise.js */ \"./node_modules/ramda/es/internal/_assertPromise.js\");\n\n\n\n/**\n * Returns the result of applying the onSuccess function to the value inside\n * a successfully resolved promise. This is useful for working with promises\n * inside function compositions.\n *\n * @func\n * @memberOf R\n * @category Function\n * @sig (a -> b) -> (Promise e a) -> (Promise e b)\n * @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b)\n * @param {Function} onSuccess The function to apply. Can return a value or a promise of a value.\n * @param {Promise} p\n * @return {Promise} The result of calling `p.then(onSuccess)`\n * @see R.otherwise\n * @example\n *\n *      var makeQuery = (email) => ({ query: { email }});\n *\n *      //getMemberName :: String -> Promise ({firstName, lastName})\n *      var getMemberName = R.pipe(\n *        makeQuery,\n *        fetchMember,\n *        R.then(R.pick(['firstName', 'lastName']))\n *      );\n */\nvar then = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function then(f, p) {\n  Object(_internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('then', p);\n\n  return p.then(f);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (then);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/then.js?");

/***/ }),

/***/ "./node_modules/ramda/es/thunkify.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/thunkify.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n\n/**\n * Creates a thunk out of a function. A thunk delays a calculation until\n * its result is needed, providing lazy evaluation of arguments.\n *\n * @func\n * @memberOf R\n * @category Function\n * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k)\n * @param {Function} fn A function to wrap in a thunk\n * @return {Function} Expects arguments for `fn` and returns a new function\n *  that, when called, applies those arguments to `fn`.\n * @see R.partial, R.partialRight\n * @example\n *\n *      R.thunkify(R.identity)(42)(); //=> 42\n *      R.thunkify((a, b) => a + b)(25, 17)(); //=> 42\n */\nvar thunkify = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function thunkify(fn) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn.length, function createThunk() {\n    var fnArgs = arguments;\n    return function invokeThunk() {\n      return fn.apply(this, fnArgs);\n    };\n  });\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (thunkify);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/thunkify.js?");

/***/ }),

/***/ "./node_modules/ramda/es/times.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/times.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Calls an input function `n` times, returning an array containing the results\n * of those function calls.\n *\n * `fn` is passed one argument: The current value of `n`, which begins at `0`\n * and is gradually incremented to `n - 1`.\n *\n * @func\n * @memberOf R\n * @since v0.2.3\n * @category List\n * @sig (Number -> a) -> Number -> [a]\n * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`.\n * @param {Number} n A value between `0` and `n - 1`. Increments after each function call.\n * @return {Array} An array containing the return values of all calls to `fn`.\n * @see R.repeat\n * @example\n *\n *      R.times(R.identity, 5); //=> [0, 1, 2, 3, 4]\n * @symb R.times(f, 0) = []\n * @symb R.times(f, 1) = [f(0)]\n * @symb R.times(f, 2) = [f(0), f(1)]\n */\nvar times = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function times(fn, n) {\n  var len = Number(n);\n  var idx = 0;\n  var list;\n\n  if (len < 0 || isNaN(len)) {\n    throw new RangeError('n must be a non-negative number');\n  }\n  list = new Array(len);\n  while (idx < len) {\n    list[idx] = fn(idx);\n    idx += 1;\n  }\n  return list;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (times);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/times.js?");

/***/ }),

/***/ "./node_modules/ramda/es/toLower.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/toLower.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ \"./node_modules/ramda/es/invoker.js\");\n\n\n/**\n * The lower case version of a string.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to lower case.\n * @return {String} The lower case version of `str`.\n * @see R.toUpper\n * @example\n *\n *      R.toLower('XYZ'); //=> 'xyz'\n */\nvar toLower = /*#__PURE__*/Object(_invoker_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0, 'toLowerCase');\n/* harmony default export */ __webpack_exports__[\"default\"] = (toLower);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/toLower.js?");

/***/ }),

/***/ "./node_modules/ramda/es/toPairs.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/toPairs.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n\n/**\n * Converts an object into an array of key, value arrays. Only the object's\n * own properties are used.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.4.0\n * @category Object\n * @sig {String: *} -> [[String,*]]\n * @param {Object} obj The object to extract from\n * @return {Array} An array of key, value arrays from the object's own properties.\n * @see R.fromPairs\n * @example\n *\n *      R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]]\n */\nvar toPairs = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function toPairs(obj) {\n  var pairs = [];\n  for (var prop in obj) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop, obj)) {\n      pairs[pairs.length] = [prop, obj[prop]];\n    }\n  }\n  return pairs;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (toPairs);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/toPairs.js?");

/***/ }),

/***/ "./node_modules/ramda/es/toPairsIn.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/toPairsIn.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Converts an object into an array of key, value arrays. The object's own\n * properties and prototype properties are used. Note that the order of the\n * output array is not guaranteed to be consistent across different JS\n * platforms.\n *\n * @func\n * @memberOf R\n * @since v0.4.0\n * @category Object\n * @sig {String: *} -> [[String,*]]\n * @param {Object} obj The object to extract from\n * @return {Array} An array of key, value arrays from the object's own\n *         and prototype properties.\n * @example\n *\n *      const F = function() { this.x = 'X'; };\n *      F.prototype.y = 'Y';\n *      const f = new F();\n *      R.toPairsIn(f); //=> [['x','X'], ['y','Y']]\n */\nvar toPairsIn = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function toPairsIn(obj) {\n  var pairs = [];\n  for (var prop in obj) {\n    pairs[pairs.length] = [prop, obj[prop]];\n  }\n  return pairs;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (toPairsIn);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/toPairsIn.js?");

/***/ }),

/***/ "./node_modules/ramda/es/toString.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/toString.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _internal_toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_toString.js */ \"./node_modules/ramda/es/internal/_toString.js\");\n\n\n\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n *     function Point(x, y) {\n *       this.x = x;\n *       this.y = y;\n *     }\n *\n *     Point.prototype.toString = function() {\n *       return 'new Point(' + this.x + ', ' + this.y + ')';\n *     };\n *\n *     R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n *      R.toString(42); //=> '42'\n *      R.toString('abc'); //=> '\"abc\"'\n *      R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n *      R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n *      R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\nvar toString = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function toString(val) {\n  return Object(_internal_toString_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(val, []);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (toString);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/toString.js?");

/***/ }),

/***/ "./node_modules/ramda/es/toUpper.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/toUpper.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ \"./node_modules/ramda/es/invoker.js\");\n\n\n/**\n * The upper case version of a string.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to upper case.\n * @return {String} The upper case version of `str`.\n * @see R.toLower\n * @example\n *\n *      R.toUpper('abc'); //=> 'ABC'\n */\nvar toUpper = /*#__PURE__*/Object(_invoker_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(0, 'toUpperCase');\n/* harmony default export */ __webpack_exports__[\"default\"] = (toUpper);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/toUpper.js?");

/***/ }),

/***/ "./node_modules/ramda/es/transduce.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/transduce.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_reduce.js */ \"./node_modules/ramda/es/internal/_reduce.js\");\n/* harmony import */ var _internal_xwrap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xwrap.js */ \"./node_modules/ramda/es/internal/_xwrap.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n\n/**\n * Initializes a transducer using supplied iterator function. Returns a single\n * item by iterating through the list, successively calling the transformed\n * iterator function and passing it an accumulator value and the current value\n * from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It will be\n * wrapped as a transformer to initialize the transducer. A transformer can be\n * passed directly in place of an iterator function. In both cases, iteration\n * may be stopped early with the [`R.reduced`](#reduced) function.\n *\n * A transducer is a function that accepts a transformer and returns a\n * transformer and can be composed directly.\n *\n * A transformer is an an object that provides a 2-arity reducing iterator\n * function, step, 0-arity initial value function, init, and 1-arity result\n * extraction function, result. The step function is used as the iterator\n * function in reduce. The result function is used to convert the final\n * accumulator into the return type and in most cases is\n * [`R.identity`](#identity). The init function can be used to provide an\n * initial accumulator, but is ignored by transduce.\n *\n * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category List\n * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} xf The transducer function. Receives a transformer and returns a transformer.\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n *        current element from the array. Wrapped as transformer, if necessary, and used to\n *        initialize the transducer\n * @param {*} acc The initial accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduce, R.reduced, R.into\n * @example\n *\n *      const numbers = [1, 2, 3, 4];\n *      const transducer = R.compose(R.map(R.add(1)), R.take(2));\n *      R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3]\n *\n *      const isOdd = (x) => x % 2 === 1;\n *      const firstOddTransducer = R.compose(R.filter(isOdd), R.take(1));\n *      R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1]\n */\nvar transduce = /*#__PURE__*/Object(_curryN_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(4, function transduce(xf, fn, acc, list) {\n  return Object(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xf(typeof fn === 'function' ? Object(_internal_xwrap_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn) : fn), acc, list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (transduce);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/transduce.js?");

/***/ }),

/***/ "./node_modules/ramda/es/transpose.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/transpose.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Transposes the rows and columns of a 2D list.\n * When passed a list of `n` lists of length `x`,\n * returns a list of `x` lists of length `n`.\n *\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [[a]] -> [[a]]\n * @param {Array} list A 2D list\n * @return {Array} A 2D list\n * @example\n *\n *      R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']]\n *      R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n *\n *      // If some of the rows are shorter than the following rows, their elements are skipped:\n *      R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]]\n * @symb R.transpose([[a], [b], [c]]) = [a, b, c]\n * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]]\n * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]]\n */\nvar transpose = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function transpose(outerlist) {\n  var i = 0;\n  var result = [];\n  while (i < outerlist.length) {\n    var innerlist = outerlist[i];\n    var j = 0;\n    while (j < innerlist.length) {\n      if (typeof result[j] === 'undefined') {\n        result[j] = [];\n      }\n      result[j].push(innerlist[j]);\n      j += 1;\n    }\n    i += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (transpose);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/transpose.js?");

/***/ }),

/***/ "./node_modules/ramda/es/traverse.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/traverse.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony import */ var _sequence_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sequence.js */ \"./node_modules/ramda/es/sequence.js\");\n\n\n\n\n/**\n * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning\n * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable),\n * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative\n * into an Applicative of Traversable.\n *\n * Dispatches to the `traverse` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b)\n * @param {Function} of\n * @param {Function} f\n * @param {*} traversable\n * @return {*}\n * @see R.sequence\n * @example\n *\n *      // Returns `Maybe.Nothing` if the given divisor is `0`\n *      const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d)\n *\n *      R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Maybe.Just([5, 2.5, 2])\n *      R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Maybe.Nothing\n */\nvar traverse = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function traverse(of, f, traversable) {\n  return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : Object(_sequence_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(of, Object(_map_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(f, traversable));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (traverse);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/traverse.js?");

/***/ }),

/***/ "./node_modules/ramda/es/trim.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/trim.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n *      R.trim('   xyz  '); //=> 'xyz'\n *      R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\nvar trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function trim(str) {\n  var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n  var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n  return str.replace(beginRx, '').replace(endRx, '');\n}) : /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function trim(str) {\n  return str.trim();\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (trim);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/trim.js?");

/***/ }),

/***/ "./node_modules/ramda/es/tryCatch.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/tryCatch.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ \"./node_modules/ramda/es/internal/_arity.js\");\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n\n/**\n * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned\n * function evaluates the `tryer`; if it does not throw, it simply returns the\n * result. If the `tryer` *does* throw, the returned function evaluates the\n * `catcher` function and returns its result. Note that for effective\n * composition with this function, both the `tryer` and `catcher` functions\n * must return the same type of results.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category Function\n * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a)\n * @param {Function} tryer The function that may throw.\n * @param {Function} catcher The function that will be evaluated if `tryer` throws.\n * @return {Function} A new function that will catch exceptions and send then to the catcher.\n * @example\n *\n *      R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true\n *      R.tryCatch(() => { throw 'foo'}, R.always('catched'))('bar') // => 'catched'\n *      R.tryCatch(R.times(R.identity), R.always([]))('s') // => []\n `` */\nvar tryCatch = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function _tryCatch(tryer, catcher) {\n  return Object(_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(tryer.length, function () {\n    try {\n      return tryer.apply(this, arguments);\n    } catch (e) {\n      return catcher.apply(this, Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])([e], arguments));\n    }\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (tryCatch);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/tryCatch.js?");

/***/ }),

/***/ "./node_modules/ramda/es/type.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/type.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n *      R.type({}); //=> \"Object\"\n *      R.type(1); //=> \"Number\"\n *      R.type(false); //=> \"Boolean\"\n *      R.type('s'); //=> \"String\"\n *      R.type(null); //=> \"Null\"\n *      R.type([]); //=> \"Array\"\n *      R.type(/[A-z]/); //=> \"RegExp\"\n *      R.type(() => {}); //=> \"Function\"\n *      R.type(undefined); //=> \"Undefined\"\n */\nvar type = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function type(val) {\n  return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (type);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/type.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unapply.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/unapply.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Takes a function `fn`, which takes a single array argument, and returns a\n * function which:\n *\n *   - takes any number of positional arguments;\n *   - passes these arguments to `fn` as an array; and\n *   - returns the result.\n *\n * In other words, `R.unapply` derives a variadic function from a function which\n * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply).\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Function\n * @sig ([*...] -> a) -> (*... -> a)\n * @param {Function} fn\n * @return {Function}\n * @see R.apply\n * @example\n *\n *      R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]'\n * @symb R.unapply(f)(a, b) = f([a, b])\n */\nvar unapply = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function unapply(fn) {\n  return function () {\n    return fn(Array.prototype.slice.call(arguments, 0));\n  };\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (unapply);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unapply.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unary.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/unary.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry.js */ \"./node_modules/ramda/es/nAry.js\");\n\n\n\n/**\n * Wraps a function of any arity (including nullary) in a function that accepts\n * exactly 1 parameter. Any extraneous parameters will not be passed to the\n * supplied function.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Function\n * @sig (* -> b) -> (a -> b)\n * @param {Function} fn The function to wrap.\n * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of\n *         arity 1.\n * @see R.binary, R.nAry\n * @example\n *\n *      const takesTwoArgs = function(a, b) {\n *        return [a, b];\n *      };\n *      takesTwoArgs.length; //=> 2\n *      takesTwoArgs(1, 2); //=> [1, 2]\n *\n *      const takesOneArg = R.unary(takesTwoArgs);\n *      takesOneArg.length; //=> 1\n *      // Only 1 argument is passed to the wrapped function\n *      takesOneArg(1, 2); //=> [1, undefined]\n * @symb R.unary(f)(a, b, c) = f(a)\n */\nvar unary = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function unary(fn) {\n  return Object(_nAry_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, fn);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (unary);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unary.js?");

/***/ }),

/***/ "./node_modules/ramda/es/uncurryN.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/uncurryN.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n/**\n * Returns a function of arity `n` from a (manually) curried function.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Function\n * @sig Number -> (a -> b) -> (a -> c)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to uncurry.\n * @return {Function} A new function.\n * @see R.curry\n * @example\n *\n *      const addFour = a => b => c => d => a + b + c + d;\n *\n *      const uncurriedAddFour = R.uncurryN(4, addFour);\n *      uncurriedAddFour(1, 2, 3, 4); //=> 10\n */\nvar uncurryN = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function uncurryN(depth, fn) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(depth, function () {\n    var currentDepth = 1;\n    var value = fn;\n    var idx = 0;\n    var endIdx;\n    while (currentDepth <= depth && typeof value === 'function') {\n      endIdx = currentDepth === depth ? arguments.length : idx + value.length;\n      value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx));\n      currentDepth += 1;\n      idx = endIdx;\n    }\n    return value;\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (uncurryN);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/uncurryN.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unfold.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/unfold.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Builds a list from a seed value. Accepts an iterator function, which returns\n * either false to stop iteration or an array of length 2 containing the value\n * to add to the resulting list and the seed to be used in the next call to the\n * iterator function.\n *\n * The iterator function receives one argument: *(seed)*.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig (a -> [b]) -> * -> [b]\n * @param {Function} fn The iterator function. receives one argument, `seed`, and returns\n *        either false to quit iteration or an array of length two to proceed. The element\n *        at index 0 of this array will be added to the resulting array, and the element\n *        at index 1 will be passed to the next call to `fn`.\n * @param {*} seed The seed value.\n * @return {Array} The final list.\n * @example\n *\n *      const f = n => n > 50 ? false : [-n, n + 10];\n *      R.unfold(f, 10); //=> [-10, -20, -30, -40, -50]\n * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...]\n */\nvar unfold = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function unfold(fn, seed) {\n  var pair = fn(seed);\n  var result = [];\n  while (pair && pair.length) {\n    result[result.length] = pair[0];\n    pair = fn(pair[1]);\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (unfold);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unfold.js?");

/***/ }),

/***/ "./node_modules/ramda/es/union.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/union.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose.js */ \"./node_modules/ramda/es/compose.js\");\n/* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uniq.js */ \"./node_modules/ramda/es/uniq.js\");\n\n\n\n\n\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of the elements\n * of each list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The first and second lists concatenated, with\n *         duplicates removed.\n * @example\n *\n *      R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]\n */\nvar union = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/Object(_compose_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_uniq_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (union);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/union.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unionWith.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/unionWith.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ \"./node_modules/ramda/es/internal/_concat.js\");\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _uniqWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uniqWith.js */ \"./node_modules/ramda/es/uniqWith.js\");\n\n\n\n\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of the elements\n * of each list. Duplication is determined according to the value returned by\n * applying the supplied predicate to two list elements.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The first and second lists concatenated, with\n *         duplicates removed.\n * @see R.union\n * @example\n *\n *      const l1 = [{a: 1}, {a: 2}];\n *      const l2 = [{a: 1}, {a: 4}];\n *      R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}]\n */\nvar unionWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function unionWith(pred, list1, list2) {\n  return Object(_uniqWith_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(pred, Object(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(list1, list2));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (unionWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unionWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/uniq.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/uniq.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/ramda/es/identity.js\");\n/* harmony import */ var _uniqBy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uniqBy.js */ \"./node_modules/ramda/es/uniqBy.js\");\n\n\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list. [`R.equals`](#equals) is used to determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n *      R.uniq([1, 1, 2, 1]); //=> [1, 2]\n *      R.uniq([1, '1']);     //=> [1, '1']\n *      R.uniq([[42], [42]]); //=> [[42]]\n */\nvar uniq = /*#__PURE__*/Object(_uniqBy_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_identity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (uniq);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/uniq.js?");

/***/ }),

/***/ "./node_modules/ramda/es/uniqBy.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/uniqBy.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_Set.js */ \"./node_modules/ramda/es/internal/_Set.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied function to\n * each list element. Prefers the first item if the supplied function produces\n * the same value on two items. [`R.equals`](#equals) is used for comparison.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> b) -> [a] -> [a]\n * @param {Function} fn A function used to produce a value to use during comparisons.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n *      R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]\n */\nvar uniqBy = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function uniqBy(fn, list) {\n  var set = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n  var result = [];\n  var idx = 0;\n  var appliedItem, item;\n\n  while (idx < list.length) {\n    item = list[idx];\n    appliedItem = fn(item);\n    if (set.add(appliedItem)) {\n      result.push(item);\n    }\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (uniqBy);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/uniqBy.js?");

/***/ }),

/***/ "./node_modules/ramda/es/uniqWith.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/uniqWith.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includesWith.js */ \"./node_modules/ramda/es/internal/_includesWith.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied predicate to\n * two list elements. Prefers the first item if two items compare equal based\n * on the predicate.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category List\n * @sig ((a, a) -> Boolean) -> [a] -> [a]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n *      const strEq = R.eqBy(String);\n *      R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2]\n *      R.uniqWith(strEq)([{}, {}]);       //=> [{}]\n *      R.uniqWith(strEq)([1, '1', 1]);    //=> [1]\n *      R.uniqWith(strEq)(['1', 1, 1]);    //=> ['1']\n */\nvar uniqWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function uniqWith(pred, list) {\n  var idx = 0;\n  var len = list.length;\n  var result = [];\n  var item;\n  while (idx < len) {\n    item = list[idx];\n    if (!Object(_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(pred, item, result)) {\n      result[result.length] = item;\n    }\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (uniqWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/uniqWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unless.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/unless.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Tests the final argument by passing it to the given predicate function. If\n * the predicate is not satisfied, the function will return the result of\n * calling the `whenFalseFn` function with the same argument. If the predicate\n * is satisfied, the argument is returned as is.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Logic\n * @sig (a -> Boolean) -> (a -> a) -> a -> a\n * @param {Function} pred        A predicate function\n * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates\n *                               to a falsy value.\n * @param {*}        x           An object to test with the `pred` function and\n *                               pass to `whenFalseFn` if necessary.\n * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`.\n * @see R.ifElse, R.when, R.cond\n * @example\n *\n *      let safeInc = R.unless(R.isNil, R.inc);\n *      safeInc(null); //=> null\n *      safeInc(1); //=> 2\n */\nvar unless = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function unless(pred, whenFalseFn, x) {\n  return pred(x) ? x : whenFalseFn(x);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (unless);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unless.js?");

/***/ }),

/***/ "./node_modules/ramda/es/unnest.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/unnest.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_identity.js */ \"./node_modules/ramda/es/internal/_identity.js\");\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chain.js */ \"./node_modules/ramda/es/chain.js\");\n\n\n\n/**\n * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from\n * any [Chain](https://github.com/fantasyland/fantasy-land#chain).\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain c => c (c a) -> c a\n * @param {*} list\n * @return {*}\n * @see R.flatten, R.chain\n * @example\n *\n *      R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]]\n *      R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6]\n */\nvar unnest = /*#__PURE__*/Object(_chain_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_internal_identity_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (unnest);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/unnest.js?");

/***/ }),

/***/ "./node_modules/ramda/es/until.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/until.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Takes a predicate, a transformation function, and an initial value,\n * and returns a value of the same type as the initial value.\n * It does so by applying the transformation until the predicate is satisfied,\n * at which point it returns the satisfactory value.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category Logic\n * @sig (a -> Boolean) -> (a -> a) -> a -> a\n * @param {Function} pred A predicate function\n * @param {Function} fn The iterator function\n * @param {*} init Initial value\n * @return {*} Final value that satisfies predicate\n * @example\n *\n *      R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128\n */\nvar until = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function until(pred, fn, init) {\n  var val = init;\n  while (!pred(val)) {\n    val = fn(val);\n  }\n  return val;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (until);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/until.js?");

/***/ }),

/***/ "./node_modules/ramda/es/update.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/update.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n/* harmony import */ var _adjust_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adjust.js */ \"./node_modules/ramda/es/adjust.js\");\n/* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./always.js */ \"./node_modules/ramda/es/always.js\");\n\n\n\n\n/**\n * Returns a new copy of the array with the element at the provided index\n * replaced with the given value.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig Number -> a -> [a] -> [a]\n * @param {Number} idx The index to update.\n * @param {*} x The value to exist at the given index of the returned array.\n * @param {Array|Arguments} list The source array-like object to be updated.\n * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`.\n * @see R.adjust\n * @example\n *\n *      R.update(1, '_', ['a', 'b', 'c']);      //=> ['a', '_', 'c']\n *      R.update(-1, '_', ['a', 'b', 'c']);     //=> ['a', 'b', '_']\n * @symb R.update(-1, a, [b, c]) = [b, a]\n * @symb R.update(0, a, [b, c]) = [a, c]\n * @symb R.update(1, a, [b, c]) = [b, a]\n */\nvar update = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function update(idx, x, list) {\n  return Object(_adjust_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(idx, Object(_always_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(x), list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (update);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/update.js?");

/***/ }),

/***/ "./node_modules/ramda/es/useWith.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/useWith.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ \"./node_modules/ramda/es/curryN.js\");\n\n\n\n/**\n * Accepts a function `fn` and a list of transformer functions and returns a\n * new curried function. When the new function is invoked, it calls the\n * function `fn` with parameters consisting of the result of calling each\n * supplied handler on successive arguments to the new function.\n *\n * If more arguments are passed to the returned function than transformer\n * functions, those arguments are passed directly to `fn` as additional\n * parameters. If you expect additional arguments that don't need to be\n * transformed, although you can ignore them, it's best to pass an identity\n * function so that the new function reports the correct arity.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z)\n * @param {Function} fn The function to wrap.\n * @param {Array} transformers A list of transformer functions\n * @return {Function} The wrapped function.\n * @see R.converge\n * @example\n *\n *      R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81\n *      R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81\n *      R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32\n *      R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32\n * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b))\n */\nvar useWith = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function useWith(fn, transformers) {\n  return Object(_curryN_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(transformers.length, function () {\n    var args = [];\n    var idx = 0;\n    while (idx < transformers.length) {\n      args.push(transformers[idx].call(this, arguments[idx]));\n      idx += 1;\n    }\n    return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length)));\n  });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (useWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/useWith.js?");

/***/ }),

/***/ "./node_modules/ramda/es/values.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/values.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ \"./node_modules/ramda/es/keys.js\");\n\n\n\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys\n * @example\n *\n *      R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\nvar values = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function values(obj) {\n  var props = Object(_keys_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj);\n  var len = props.length;\n  var vals = [];\n  var idx = 0;\n  while (idx < len) {\n    vals[idx] = obj[props[idx]];\n    idx += 1;\n  }\n  return vals;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (values);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/values.js?");

/***/ }),

/***/ "./node_modules/ramda/es/valuesIn.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/valuesIn.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ \"./node_modules/ramda/es/internal/_curry1.js\");\n\n\n/**\n * Returns a list of all the properties, including prototype properties, of the\n * supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own and prototype properties.\n * @see R.values, R.keysIn\n * @example\n *\n *      const F = function() { this.x = 'X'; };\n *      F.prototype.y = 'Y';\n *      const f = new F();\n *      R.valuesIn(f); //=> ['X', 'Y']\n */\nvar valuesIn = /*#__PURE__*/Object(_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function valuesIn(obj) {\n  var prop;\n  var vs = [];\n  for (prop in obj) {\n    vs[vs.length] = obj[prop];\n  }\n  return vs;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (valuesIn);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/valuesIn.js?");

/***/ }),

/***/ "./node_modules/ramda/es/view.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/view.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n// `Const` is a functor that effectively ignores the function given to `map`.\nvar Const = function (x) {\n  return { value: x, 'fantasy-land/map': function () {\n      return this;\n    } };\n};\n\n/**\n * Returns a \"view\" of the given data structure, determined by the given lens.\n * The lens's focus determines which portion of the data structure is visible.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> s -> a\n * @param {Lens} lens\n * @param {*} x\n * @return {*}\n * @see R.prop, R.lensIndex, R.lensProp\n * @example\n *\n *      const xLens = R.lensProp('x');\n *\n *      R.view(xLens, {x: 1, y: 2});  //=> 1\n *      R.view(xLens, {x: 4, y: 2});  //=> 4\n */\nvar view = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function view(lens, x) {\n  // Using `Const` effectively ignores the setter function of the `lens`,\n  // leaving the value returned by the getter function unmodified.\n  return lens(Const)(x).value;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (view);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/view.js?");

/***/ }),

/***/ "./node_modules/ramda/es/when.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/when.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Tests the final argument by passing it to the given predicate function. If\n * the predicate is satisfied, the function will return the result of calling\n * the `whenTrueFn` function with the same argument. If the predicate is not\n * satisfied, the argument is returned as is.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Logic\n * @sig (a -> Boolean) -> (a -> a) -> a -> a\n * @param {Function} pred       A predicate function\n * @param {Function} whenTrueFn A function to invoke when the `condition`\n *                              evaluates to a truthy value.\n * @param {*}        x          An object to test with the `pred` function and\n *                              pass to `whenTrueFn` if necessary.\n * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`.\n * @see R.ifElse, R.unless, R.cond\n * @example\n *\n *      // truncate :: String -> String\n *      const truncate = R.when(\n *        R.propSatisfies(R.gt(R.__, 10), 'length'),\n *        R.pipe(R.take(10), R.append('…'), R.join(''))\n *      );\n *      truncate('12345');         //=> '12345'\n *      truncate('0123456789ABC'); //=> '0123456789…'\n */\nvar when = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function when(pred, whenTrueFn, x) {\n  return pred(x) ? whenTrueFn(x) : x;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (when);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/when.js?");

/***/ }),

/***/ "./node_modules/ramda/es/where.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/where.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ \"./node_modules/ramda/es/internal/_has.js\");\n\n\n\n/**\n * Takes a spec object and a test object; returns true if the test satisfies\n * the spec. Each of the spec's own properties must be a predicate function.\n * Each predicate is applied to the value of the corresponding property of the\n * test object. `where` returns true if all the predicates return true, false\n * otherwise.\n *\n * `where` is well suited to declaratively expressing constraints for other\n * functions such as [`filter`](#filter) and [`find`](#find).\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category Object\n * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean\n * @param {Object} spec\n * @param {Object} testObj\n * @return {Boolean}\n * @see R.propSatisfies, R.whereEq\n * @example\n *\n *      // pred :: Object -> Boolean\n *      const pred = R.where({\n *        a: R.equals('foo'),\n *        b: R.complement(R.equals('bar')),\n *        x: R.gt(R.__, 10),\n *        y: R.lt(R.__, 20)\n *      });\n *\n *      pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true\n *      pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false\n *      pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false\n *      pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false\n *      pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false\n */\nvar where = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function where(spec, testObj) {\n  for (var prop in spec) {\n    if (Object(_internal_has_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop, spec) && !spec[prop](testObj[prop])) {\n      return false;\n    }\n  }\n  return true;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (where);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/where.js?");

/***/ }),

/***/ "./node_modules/ramda/es/whereEq.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/whereEq.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ \"./node_modules/ramda/es/equals.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ \"./node_modules/ramda/es/map.js\");\n/* harmony import */ var _where_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./where.js */ \"./node_modules/ramda/es/where.js\");\n\n\n\n\n\n/**\n * Takes a spec object and a test object; returns true if the test satisfies\n * the spec, false otherwise. An object satisfies the spec if, for each of the\n * spec's own properties, accessing that property of the object gives the same\n * value (in [`R.equals`](#equals) terms) as accessing that property of the\n * spec.\n *\n * `whereEq` is a specialization of [`where`](#where).\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Object\n * @sig {String: *} -> {String: *} -> Boolean\n * @param {Object} spec\n * @param {Object} testObj\n * @return {Boolean}\n * @see R.propEq, R.where\n * @example\n *\n *      // pred :: Object -> Boolean\n *      const pred = R.whereEq({a: 1, b: 2});\n *\n *      pred({a: 1});              //=> false\n *      pred({a: 1, b: 2});        //=> true\n *      pred({a: 1, b: 2, c: 3});  //=> true\n *      pred({a: 1, b: 1});        //=> false\n */\nvar whereEq = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function whereEq(spec, testObj) {\n  return Object(_where_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_equals_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], spec), testObj);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (whereEq);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/whereEq.js?");

/***/ }),

/***/ "./node_modules/ramda/es/without.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/without.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includes.js */ \"./node_modules/ramda/es/internal/_includes.js\");\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n/* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip.js */ \"./node_modules/ramda/es/flip.js\");\n/* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reject.js */ \"./node_modules/ramda/es/reject.js\");\n\n\n\n\n\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n *      R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\nvar without = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (xs, list) {\n  return Object(_reject_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_flip_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_internal_includes_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xs), list);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (without);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/without.js?");

/***/ }),

/***/ "./node_modules/ramda/es/xprod.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/xprod.js ***!
  \****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Creates a new list out of the two supplied by creating each possible pair\n * from the lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The list made by combining each possible pair from\n *         `as` and `bs` into pairs (`[a, b]`).\n * @example\n *\n *      R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]\n * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]]\n */\nvar xprod = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function xprod(a, b) {\n  // = xprodWith(prepend); (takes about 3 times as long...)\n  var idx = 0;\n  var ilen = a.length;\n  var j;\n  var jlen = b.length;\n  var result = [];\n  while (idx < ilen) {\n    j = 0;\n    while (j < jlen) {\n      result[result.length] = [a[idx], b[j]];\n      j += 1;\n    }\n    idx += 1;\n  }\n  return result;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (xprod);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/xprod.js?");

/***/ }),

/***/ "./node_modules/ramda/es/zip.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/zip.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Creates a new list out of the two supplied by pairing up equally-positioned\n * items from both lists. The returned list is truncated to the length of the\n * shorter of the two input lists.\n * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`.\n * @example\n *\n *      R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]]\n */\nvar zip = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function zip(a, b) {\n  var rv = [];\n  var idx = 0;\n  var len = Math.min(a.length, b.length);\n  while (idx < len) {\n    rv[idx] = [a[idx], b[idx]];\n    idx += 1;\n  }\n  return rv;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (zip);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/zip.js?");

/***/ }),

/***/ "./node_modules/ramda/es/zipObj.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/zipObj.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ \"./node_modules/ramda/es/internal/_curry2.js\");\n\n\n/**\n * Creates a new object out of a list of keys and a list of values.\n * Key/value pairing is truncated to the length of the shorter of the two lists.\n * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig [String] -> [*] -> {String: *}\n * @param {Array} keys The array that will be properties on the output object.\n * @param {Array} values The list of values on the output object.\n * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`.\n * @example\n *\n *      R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3}\n */\nvar zipObj = /*#__PURE__*/Object(_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function zipObj(keys, values) {\n  var idx = 0;\n  var len = Math.min(keys.length, values.length);\n  var out = {};\n  while (idx < len) {\n    out[keys[idx]] = values[idx];\n    idx += 1;\n  }\n  return out;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (zipObj);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/zipObj.js?");

/***/ }),

/***/ "./node_modules/ramda/es/zipWith.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/zipWith.js ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ \"./node_modules/ramda/es/internal/_curry3.js\");\n\n\n/**\n * Creates a new list out of the two supplied by applying the function to each\n * equally-positioned pair in the lists. The returned list is truncated to the\n * length of the shorter of the two input lists.\n *\n * @function\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> c) -> [a] -> [b] -> [c]\n * @param {Function} fn The function used to combine the two elements into one value.\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by combining same-indexed elements of `list1` and `list2`\n *         using `fn`.\n * @example\n *\n *      const f = (x, y) => {\n *        // ...\n *      };\n *      R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']);\n *      //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')]\n * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)]\n */\nvar zipWith = /*#__PURE__*/Object(_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function zipWith(fn, a, b) {\n  var rv = [];\n  var idx = 0;\n  var len = Math.min(a.length, b.length);\n  while (idx < len) {\n    rv[idx] = fn(a[idx], b[idx]);\n    idx += 1;\n  }\n  return rv;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (zipWith);\n\n//# sourceURL=webpack://dash_bio/./node_modules/ramda/es/zipWith.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/AlignmentChart.js":
/*!******************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/AlignmentChart.js ***!
  \******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _reactPlotly = _interopRequireDefault(__webpack_require__(/*! react-plotly.js */ \"./node_modules/react-plotly.js/react-plotly.js\"));\n\nvar _sequences = __webpack_require__(/*! ./sequences */ \"./node_modules/react-alignment-viewer/lib/components/sequences.js\");\n\nvar _metrics = __webpack_require__(/*! ./metrics */ \"./node_modules/react-alignment-viewer/lib/components/metrics.js\");\n\nvar _charting = __webpack_require__(/*! ./charting */ \"./node_modules/react-alignment-viewer/lib/components/charting.js\");\n\nvar _colormaker = __webpack_require__(/*! ./colormaker */ \"./node_modules/react-alignment-viewer/lib/components/colormaker.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n/**\n * The Alignment Viewer (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment viewer\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Aligment Viewer is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Note that the AlignmentChart only returns a chart of the sequence, while\n * AlignmentViewer has integrated controls for colorscale, heatmaps, and subplots\n * allowing the user to interactively control their sequences.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\nvar AlignmentChart =\n/*#__PURE__*/\nfunction (_PureComponent) {\n  _inherits(AlignmentChart, _PureComponent);\n\n  // Constructor\n  function AlignmentChart(props) {\n    var _this;\n\n    _classCallCheck(this, AlignmentChart);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(AlignmentChart).call(this, props));\n    _this.state = {\n      xStart: null,\n      xEnd: null\n    };\n    _this.resetWindowing = _this.resetWindowing.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n    _this.handleChange = _lodash.default.debounce(_this.handleChange.bind(_assertThisInitialized(_assertThisInitialized(_this))), 250);\n    return _this;\n  } // Reset windowing to user preset on init or data change\n\n\n  _createClass(AlignmentChart, [{\n    key: \"resetWindowing\",\n    value: function resetWindowing(props) {\n      var tilewidth = props.tilewidth,\n          inputNumtiles = props.numtiles,\n          inputWidth = props.width; // Get sizing\n\n      var width, pixelWidth; // Width\n\n      if (inputWidth) {\n        width = inputWidth;\n        pixelWidth = (0, _charting.getWidth)(inputWidth);\n      } else if (tilewidth && inputNumtiles) {\n        width = _lodash.default.toInteger(tilewidth) * _lodash.default.toInteger(inputNumtiles);\n        pixelWidth = width;\n      } else {\n        width = '100%';\n        pixelWidth = (0, _charting.getWidth)(width);\n      } // Number of horizontal tiles\n\n\n      var numtiles;\n\n      if (inputNumtiles) {\n        numtiles = inputNumtiles;\n      } else if (tilewidth) {\n        numtiles = _lodash.default.toInteger(pixelWidth / tilewidth);\n      } else {\n        numtiles = 50;\n      }\n\n      return {\n        xStart: -0.5,\n        xEnd: numtiles + 0.5\n      };\n    } // Handle plot events\n\n  }, {\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      if (!this.props.onChange) {\n        return;\n      } // CLick (mousedown) or hover (mousemove)\n\n\n      if (event.points) {\n        var eventType;\n\n        if (event.event.type === \"mousedown\") {\n          eventType = 'Click';\n        } else if (event.event.type === \"mousemove\") {\n          eventType = 'Hover';\n        } else {\n          eventType = 'Other';\n        }\n\n        this.props.onChange({\n          eventType: eventType,\n          name: event.points[0].data.name,\n          text: event.points[0].text,\n          curveNumber: event.points[0].curveNumber,\n          x: event.points[0].x,\n          y: event.points[0].y\n        });\n      } // Zoom\n      else if (event['xaxis.range[0]'] || event['xaxis.range']) {\n          this.setState({\n            xStart: event['xaxis.range[0]'] || event['xaxis.range'][0],\n            xEnd: event['xaxis.range[1]'] || event['xaxis.range'][1]\n          });\n          this.props.onChange({\n            eventType: 'Zoom',\n            xStart: event['xaxis.range[0]'] || event['xaxis.range'][0],\n            xEnd: event['xaxis.range[1]'] || event['xaxis.range'][1]\n          });\n        } // Autozoom\n        else if (event['xaxis.autorange'] === true) {\n            this.setState({\n              xStart: null,\n              xEnd: null\n            });\n            this.props.onChange({\n              eventType: 'Autoscale'\n            });\n          } // Guard\n          else {\n              this.props.onChange(event);\n            }\n    }\n  }, {\n    key: \"getData\",\n    // Fetch data\n    value: function getData() {\n      var _this$props = this.props,\n          inputData = _this$props.data,\n          extension = _this$props.extension,\n          inputColorscale = _this$props.colorscale,\n          inputOpacity = _this$props.opacity,\n          inputTextColor = _this$props.textcolor,\n          textsize = _this$props.textsize,\n          showlabel = _this$props.showlabel,\n          showid = _this$props.showid,\n          showconservation = _this$props.showconservation,\n          conservationcolor = _this$props.conservationcolor,\n          conservationcolorscale = _this$props.conservationcolorscale,\n          conservationopacity = _this$props.conservationopacity,\n          conservationmethod = _this$props.conservationmethod,\n          correctgap = _this$props.correctgap,\n          showgap = _this$props.showgap,\n          gapcolor = _this$props.gapcolor,\n          gapcolorscale = _this$props.gapcolorscale,\n          gapopacity = _this$props.gapopacity,\n          groupbars = _this$props.groupbars,\n          showconsensus = _this$props.showconsensus; // Import sequence in FASTA/Clustal format\n\n      var sequences = (0, _sequences.importSequences)(inputData, extension); // Fill sequence gaps if any\n\n      var length = _lodash.default.maxBy(sequences, function (sequence) {\n        return sequence.seq.length;\n      }).seq.length;\n\n      var _parseSequences = (0, _sequences.parseSequences)(sequences, length),\n          sequencesArray = _parseSequences.sequencesArray,\n          sequencesInfo = _parseSequences.sequencesInfo;\n\n      var sequencesTranspose = _lodash.default.zip.apply(_lodash.default, _toConsumableArray(sequencesArray));\n\n      var preCount = sequencesInfo.length; // Make consensus sequence\n\n      var _mergeSequences = (0, _sequences.mergeSequences)(sequencesTranspose, sequencesArray, sequencesInfo, showconsensus);\n\n      sequencesArray = _mergeSequences.sequencesArray;\n      sequencesInfo = _mergeSequences.sequencesInfo;\n      var count = sequencesInfo.length; // TODO export to main plot\n      // Get colorscale\n\n      var _getColorscale = (0, _colormaker.getColorscale)(inputColorscale, inputTextColor, inputOpacity),\n          colormap = _getColorscale.colormap,\n          colorscale = _getColorscale.colorscale,\n          textcolor = _getColorscale.textcolor,\n          opacity = _getColorscale.opacity; // Get heatmap z, and annotations x, y, text, hoverText\n\n\n      var z = sequencesArray.map(function (sequenceText) {\n        return sequenceText.map(function (letter) {\n          return colormap[letter] || 1;\n        });\n      });\n\n      var x = _lodash.default.range(length * count).map(function (i) {\n        return i % length;\n      });\n\n      var y = _lodash.default.range(length * count).map(function (i) {\n        return _lodash.default.floor(i / length);\n      });\n\n      var text = _lodash.default.flatten(sequencesArray);\n\n      var hoverText = (0, _charting.getHovertext)(sequencesArray, sequencesInfo); // Get labels, tick\n\n      var _getTicks = (0, _charting.getTicks)(sequencesInfo, showlabel, showid),\n          labels = _getTicks.labels,\n          tick = _getTicks.tick; // return { sequencesInfo, sequencesArray };\n      // TODO export to secondary plots\n      // Make conservation and gap bars\n\n\n      var conservationBars = false;\n      var gapBars = false;\n      var maxEntropy = 0;\n\n      if (showconservation) {\n        conservationBars = sequencesTranspose.map(function (sequenceTranspose) {\n          var val;\n\n          if (conservationmethod === 'entropy') {\n            val = (0, _metrics.getEntropy)(sequenceTranspose);\n\n            if (val > maxEntropy) {\n              maxEntropy = val;\n            }\n          } else {\n            val = (0, _metrics.getConservation)(sequenceTranspose);\n          }\n\n          return val;\n        });\n\n        if (conservationmethod === 'entropy') {\n          conservationBars = conservationBars.map(function (conservationBar) {\n            return 1 - conservationBar / maxEntropy;\n          });\n        } else {\n          conservationBars = conservationBars.map(function (conservationBar) {\n            return conservationBar / preCount;\n          });\n        }\n      }\n\n      if (showgap) {\n        gapBars = sequencesTranspose.map(function (sequenceTranspose) {\n          return _lodash.default.countBy(sequenceTranspose)['-'] / preCount;\n        });\n      }\n\n      if (correctgap) {\n        for (var i = 0; i < conservationBars.length; i++) {\n          conservationBars[i] = conservationBars[i] * (1 - (gapBars[i] ? gapBars[i] : 0));\n        }\n      } // Get data\n\n\n      var data = [// Heatmap\n      {\n        type: 'heatmap',\n        name: 'Heatmap',\n        z: z,\n        hoverinfo: 'none',\n        colorscale: colorscale,\n        opacity: opacity,\n        showscale: false\n      }, // Heatmap annotations\n      {\n        type: 'scattergl',\n        name: 'Text',\n        mode: 'text',\n        x: x,\n        y: y,\n        text: text,\n        hoverinfo: 'none',\n        textfont: {\n          color: textcolor,\n          size: textsize\n        }\n      }, // Hoverinfo label (hacky)\n      {\n        type: 'scatter',\n        name: 'Annotations',\n        x: x,\n        y: y,\n        marker: {\n          color: 'transparent'\n        },\n        text: hoverText,\n        hoverinfo: 'text+name',\n        textfont: {\n          color: textcolor,\n          size: textsize\n        }\n      }]; // Append secondary plots\n\n      var plotCount = 1; // Conservation\n\n      if (conservationBars) {\n        plotCount += 1;\n        var dataArr = {\n          type: 'bar',\n          name: 'Conservation',\n          x: _lodash.default.range(length),\n          y: conservationBars,\n          marker: {\n            color: conservationcolor,\n            opacity: conservationopacity\n          },\n          yaxis: \"y\".concat(plotCount)\n        };\n\n        if (conservationcolorscale) {\n          dataArr.marker.color = conservationBars;\n          dataArr.marker.colorscale = conservationcolorscale;\n          dataArr.marker.reversescale = true;\n        }\n\n        data.push(dataArr);\n      } // Gap\n\n\n      if (gapBars) {\n        if (groupbars === false) {\n          plotCount += 1;\n        }\n\n        var _dataArr = {\n          type: 'bar',\n          name: 'Gap',\n          x: _lodash.default.range(length),\n          y: gapBars,\n          marker: {\n            color: gapcolor,\n            opacity: gapopacity\n          },\n          yaxis: \"y\".concat(plotCount)\n        };\n\n        if (gapcolorscale) {\n          _dataArr.marker.color = gapBars;\n          _dataArr.marker.colorscale = gapcolorscale;\n          _dataArr.marker.reversescale = true;\n        }\n\n        data.push(_dataArr);\n      }\n\n      return {\n        data: data,\n        length: length,\n        count: count,\n        labels: labels,\n        tick: tick,\n        plotCount: plotCount\n      };\n    }\n  }, {\n    key: \"getLayout\",\n    // Fetch layout\n    value: function getLayout(_ref) {\n      var length = _ref.length,\n          count = _ref.count,\n          labels = _ref.labels,\n          tick = _ref.tick,\n          plotCount = _ref.plotCount;\n      var _this$props2 = this.props,\n          tilewidth = _this$props2.tilewidth,\n          tileheight = _this$props2.tileheight,\n          inputNumtiles = _this$props2.numtiles,\n          overview = _this$props2.overview,\n          inputScrollskip = _this$props2.scrollskip,\n          tickstart = _this$props2.tickstart,\n          ticksteps = _this$props2.ticksteps,\n          inputWidth = _this$props2.width,\n          inputHeight = _this$props2.height;\n      var _this$state = this.state,\n          xStart = _this$state.xStart,\n          xEnd = _this$state.xEnd; // Initial width and range handled by constructor\n\n      var initialRange = [xStart, xEnd]; // Get sizing\n\n      var width, pixelWidth, height; // Width\n\n      if (inputWidth) {\n        width = inputWidth;\n        pixelWidth = (0, _charting.getWidth)(inputWidth);\n      } else if (tilewidth && inputNumtiles) {\n        width = _lodash.default.toInteger(tilewidth) * _lodash.default.toInteger(inputNumtiles);\n        pixelWidth = width;\n      } else {\n        width = '100%';\n        pixelWidth = (0, _charting.getWidth)(width);\n      } // Height\n\n\n      if (inputHeight) {\n        height = inputHeight;\n      } else if (tileheight) {\n        // Adjust for subplots\n        var ratio = _charting.SUBPLOT_RATIOS[plotCount] * (overview === 'heatmap' || overview === 'bar' ? 0.85 : 1);\n        height = _lodash.default.toInteger(_lodash.default.toInteger(tileheight) * count / ratio) + 50;\n      } else {\n        height = '100%';\n      } // Number of horizontal tiles\n\n\n      var numtiles;\n\n      if (inputNumtiles) {\n        numtiles = inputNumtiles;\n      } else if (tilewidth) {\n        numtiles = _lodash.default.toInteger(pixelWidth / tilewidth);\n      } else {\n        numtiles = 50;\n      } // Get slider\n\n\n      var steps;\n\n      if (overview === 'slider') {\n        var scrollskip = inputScrollskip ? inputScrollskip : 1;\n\n        var possibleSteps = _lodash.default.range(length);\n\n        steps = (0, _lodash.default)(possibleSteps).filter(function (i) {\n          return i % _lodash.default.toInteger(scrollskip) === 0;\n        }).map(function (j) {\n          return {\n            'method': 'relayout',\n            'label': j,\n            'args': ['xaxis', {\n              'range': [-0.5 + j, numtiles + 0.5 + j]\n            }]\n          };\n        }).value();\n      } // Get layout\n\n\n      var layout = {\n        hovermode: 'closest',\n        dragmode: 'pan',\n        showlegend: false,\n        xaxis: {\n          showgrid: false,\n          zeroline: false,\n          range: initialRange,\n          automargin: true\n        },\n        yaxis: {\n          ticks: tick,\n          ticktext: labels,\n          tickvals: _lodash.default.range(labels.length),\n          showgrid: false,\n          zeroline: false,\n          autorange: 'reversed',\n          automargin: true\n        },\n        margin: {\n          t: 20,\n          r: 20\n        }\n      }; // Append secondary plots\n\n      if (plotCount === 2) {\n        layout.yaxis.domain = [0.0, 0.74];\n        layout.yaxis2 = {\n          title: '<b>Bar weights</b>',\n          titlefont: {\n            size: 12\n          },\n          showgrid: false,\n          zeroline: false,\n          domain: [0.75, 1]\n        };\n      } else if (plotCount === 3) {\n        layout.yaxis.domain = [0.0, 0.64];\n        layout.yaxis2 = {\n          title: '<b>Conservation</b>',\n          titlefont: {\n            size: 12\n          },\n          showgrid: false,\n          zeroline: false,\n          domain: [0.65, 0.89]\n        };\n        layout.yaxis3 = {\n          title: '<b>Gap</b>',\n          titlefont: {\n            size: 12\n          },\n          showgrid: false,\n          zeroline: false,\n          domain: [0.90, 1]\n        };\n      } else {\n        layout.yaxis.domain = [0.0, 1.0];\n      } // Get overview plot\n\n\n      if (overview === 'heatmap') {\n        layout.xaxis.rangeslider = {\n          autorange: true\n        };\n        layout.xaxis.tick0 = tickstart;\n        layout.xaxis.dtick = ticksteps;\n        layout.margin = {\n          t: 20,\n          r: 20,\n          b: 20\n        };\n      } else if (overview === 'slider') {\n        layout.sliders = [{\n          // Wrap in bold hack\n          currentvalue: {\n            \"prefix\": \"<b>Position </b><b>\",\n            \"suffix\": \"</b>\"\n          },\n          steps: steps\n        }];\n      } else {\n        layout.xaxis.tick0 = tickstart;\n        layout.xaxis.dtick = ticksteps;\n        layout.margin = {\n          t: 20,\n          r: 20,\n          b: 20\n        };\n      }\n\n      return {\n        layout: layout,\n        width: width,\n        height: height\n      };\n    }\n  }, {\n    key: \"componentDidMount\",\n    // Set xStart and xEnd on load\n    value: function componentDidMount() {\n      var _this$resetWindowing = this.resetWindowing(this.props),\n          xStart = _this$resetWindowing.xStart,\n          xEnd = _this$resetWindowing.xEnd;\n\n      this.setState({\n        xStart: xStart,\n        xEnd: xEnd\n      });\n    } // Reset xStart and xEnd on data change\n\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (this.props.data !== prevProps.data) {\n        var _this$resetWindowing2 = this.resetWindowing(this.props),\n            xStart = _this$resetWindowing2.xStart,\n            xEnd = _this$resetWindowing2.xEnd;\n\n        this.setState({\n          xStart: xStart,\n          xEnd: xEnd\n        });\n      }\n    } // Main\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$getData = this.getData(),\n          data = _this$getData.data,\n          length = _this$getData.length,\n          count = _this$getData.count,\n          labels = _this$getData.labels,\n          tick = _this$getData.tick,\n          plotCount = _this$getData.plotCount;\n\n      var _this$getLayout = this.getLayout({\n        length: length,\n        count: count,\n        labels: labels,\n        tick: tick,\n        plotCount: plotCount\n      }),\n          layout = _this$getLayout.layout,\n          width = _this$getLayout.width,\n          height = _this$getLayout.height;\n\n      var other = {\n        style: {\n          width: width,\n          height: height\n        },\n        useResizeHandler: true\n      };\n      return _react.default.createElement(\"div\", null, _react.default.createElement(_reactPlotly.default, _extends({\n        data: data,\n        layout: layout,\n        onClick: this.handleChange,\n        onHover: this.handleChange,\n        onRelayout: this.handleChange\n      }, other)));\n    }\n  }]);\n\n  return AlignmentChart;\n}(_react.PureComponent);\n\nexports.default = AlignmentChart;\nAlignmentChart.propTypes = {\n  /**\n   * Input data, either in FASTA or Clustal format.\n   */\n  data: _propTypes.default.string,\n\n  /**\n   *Format type of the input data, either in FASTA or Clustal.\n   */\n  extension: _propTypes.default.string,\n\n  /**\n   * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n   * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n   * or your own colorscale as a {'nucleotide': COLOR} dict.\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),\n\n  /**\n   * Opacity of the main plot as a value between 0 and 1.\n   */\n  opacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n   * If left blank, handled by the colorscale automatically.\n   */\n  textcolor: _propTypes.default.string,\n\n  /**\n   * Size of the nucleotide labels, as a number.\n   */\n  textsize: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Toggles displaying sequence labels at left of alignment\n   */\n  showlabel: _propTypes.default.bool,\n\n  /**\n   * Toggles displaying sequence IDs at left of alignment.\n   */\n  showid: _propTypes.default.bool,\n\n  /**\n   * Enables the display of conservation secondary barplot where the most conserved\n   * nucleotides or amino acids get greater bars.\n   */\n  showconservation: _propTypes.default.bool,\n\n  /**\n   * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  conservationcolor: _propTypes.default.string,\n\n  /**\n   * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  conservationcolorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),\n\n  /**\n   * Opacity of the conservation secondary barplot as a value between 0 and 1.\n   */\n  conservationopacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Whether to use most conserved ratio (MLE) 'conservation'\n   * or normalized entropy 'entropy' to determine conservation,\n   * which is a value between 0 and 1 where 1 is most conserved.\n   */\n  conservationmethod: _propTypes.default.oneOf(['conservation', 'entropy']),\n\n  /**\n   * Whether to normalize the conservation barchart\n   * By multiplying it elementwise with the gap barchart, as to\n   * lower the conservation values across sequences regions with many gaps.\n   */\n  correctgap: _propTypes.default.bool,\n\n  /**\n   * Enables the display of gap secondary barplot where the sequence regions\n   * with the fewest gaps get the greatest bars.\n   */\n  showgap: _propTypes.default.bool,\n\n  /**\n   * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  gapcolor: _propTypes.default.string,\n\n  /**\n   * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  gapcolorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),\n\n  /**\n   * Opacity of the gap secondary barplot as a value between 0 and 1.\n   */\n  gapopacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * If both conservation and gap are enabled,\n   * toggles whether to group bars or to stack them as separate subplots.\n   * No effect if not both gap and conservation are shown.\n   */\n  groupbars: _propTypes.default.bool,\n\n  /**\n   * Displays toggling the consensus sequence, where each nucleotide in the\n   * consensus sequence is the argmax of its distribution at a set nucleotide.\n   */\n  showconsensus: _propTypes.default.bool,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up horizontally. The total number of tiles (numtiles) seen\n   * horizontally is automatically determined by rounding\n   * the Viewer width divided by the tile width.\n   * the Viewwer width divided by the tile witdth.\n   */\n  tilewidth: _propTypes.default.number,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up vertically.\n   * If enabled, set height dynamically.\n   */\n  tileheight: _propTypes.default.number,\n\n  /**\n   * Toggles whether the overview should be a heatmap, a slider, or none.\n   */\n  overview: _propTypes.default.oneOf(['heatmap', 'slider', 'none']),\n\n  /**\n   * Sets how many tiles to display across horitontally. If enabled,\n   * overrides tilewidth and sets the amount of tiles directly based off\n   * that value.\n   */\n  numtiles: _propTypes.default.number,\n\n  /**\n   * If overview is set to 'scroll', determines how many tiles to skip\n   * with each slider movement.\n   * Has no effect if scroll is not enabled (such as with overview or none).\n   */\n  scrollskip: _propTypes.default.number,\n\n  /**\n   * Determines where to start annotating the first tile.\n   * If let blank will be automatically determined by Plotly.\n   * Equivalent to Plotly's tick0 property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  tickstart: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Determines at what interval to keep annotating the tiles.\n   * If left blank will be automatially determined by Plotly.\n   * Equivalent to Plotly's dtick property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  ticksteps: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tileswidth and numtiles\n   * if either of them is set.\n   */\n  width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tilesheight if both\n   * are set.\n   */\n  height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n};\nAlignmentChart.defaultProps = {\n  // Data\n  extension: 'fasta',\n  colorscale: 'clustal2',\n  opacity: null,\n  textcolor: null,\n  textsize: 10,\n  showlabel: true,\n  showid: true,\n  showconservation: true,\n  conservationcolor: null,\n  conservationcolorscale: 'Viridis',\n  conservationopacity: null,\n  conservationmethod: 'entropy',\n  correctgap: true,\n  showgap: true,\n  gapcolor: 'grey',\n  gapcolorscale: null,\n  gapopacity: null,\n  groupbars: false,\n  showconsensus: true,\n  // Layout\n  tilewidth: 16,\n  tileheight: 16,\n  numtiles: null,\n  overview: 'heatmap',\n  scrollskip: 10,\n  tickstart: null,\n  ticksteps: null,\n  // Other\n  width: null,\n  height: 900\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/AlignmentChart.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/AlignmentViewer.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/AlignmentViewer.js ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _AlignmentChart = _interopRequireDefault(__webpack_require__(/*! ./AlignmentChart */ \"./node_modules/react-alignment-viewer/lib/components/AlignmentChart.js\"));\n\nvar _Components = __webpack_require__(/*! ./Components */ \"./node_modules/react-alignment-viewer/lib/components/Components.js\");\n\nvar _charting = __webpack_require__(/*! ./charting */ \"./node_modules/react-alignment-viewer/lib/components/charting.js\");\n\nvar _options = __webpack_require__(/*! ./options */ \"./node_modules/react-alignment-viewer/lib/components/options.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * The Alignment Viewer (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment viewer\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Aligment Viewer is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Note that the AlignmentChart only returns a chart of the sequence, while\n * AlignmentViewer has integrated controls for colorscale, heatmaps, and subplots\n * allowing the user to interactively control their sequences.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\nvar AlignmentViewer =\n/*#__PURE__*/\nfunction (_PureComponent) {\n  _inherits(AlignmentViewer, _PureComponent);\n\n  function AlignmentViewer(props) {\n    var _this;\n\n    _classCallCheck(this, AlignmentViewer);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(AlignmentViewer).call(this, props));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleSelect\", function (key) {\n      return function (event) {\n        _this.setState(_defineProperty({}, key, event));\n      };\n    });\n\n    _this.state = {\n      overview: {\n        value: 'heatmap',\n        label: 'Heatmap overview'\n      },\n      colorscale: {\n        value: 'clustal',\n        label: 'Clustal'\n      },\n      visualizations: [{\n        value: 'showconservation',\n        label: 'Show conservation weights'\n      }, {\n        value: 'showgap',\n        label: 'Show gap weights'\n      }, {\n        value: 'showlabel',\n        label: 'Show labels'\n      }, {\n        value: 'showid',\n        label: 'Show ID'\n      }, {\n        value: 'showconsensus',\n        label: 'Show consensus'\n      }]\n    };\n    return _this;\n  }\n\n  _createClass(AlignmentViewer, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          data = _this$props.data,\n          precolorscale = _this$props.colorscale,\n          preoverview = _this$props.overview,\n          preshowconservation = _this$props.showconservation,\n          preshowgap = _this$props.showgap,\n          preshowlabel = _this$props.showlabel,\n          preshowid = _this$props.showid,\n          preshowconsensus = _this$props.showconsensus,\n          other = _objectWithoutProperties(_this$props, [\"data\", \"colorscale\", \"overview\", \"showconservation\", \"showgap\", \"showlabel\", \"showid\", \"showconsensus\"]);\n\n      var _this$state = this.state,\n          colorscale = _this$state.colorscale,\n          overview = _this$state.overview,\n          visualizations = _this$state.visualizations; // Parse state\n\n      var colorscaleVal = colorscale.value;\n      var overviewVal = overview.value;\n      var visualizationsVal = visualizations.map(function (visualization) {\n        return visualization.value;\n      });\n\n      var _getVisualizations = (0, _charting.getVisualizations)(visualizationsVal),\n          showconservation = _getVisualizations.showconservation,\n          showgap = _getVisualizations.showgap,\n          showlabel = _getVisualizations.showlabel,\n          showid = _getVisualizations.showid,\n          showconsensus = _getVisualizations.showconsensus;\n\n      return _react.default.createElement(\"div\", null, _react.default.createElement(\"div\", {\n        style: {\n          display: 'flex'\n        }\n      }, _react.default.createElement(_Components.DropdownSelect, {\n        outerStyle: {\n          width: '25%'\n        },\n        caption: 'Select colorscale',\n        value: colorscale,\n        onChange: this.handleSelect('colorscale'),\n        options: _options.COLORSCALE_OPTIONS\n      }), _react.default.createElement(_Components.DropdownSelect, {\n        outerStyle: {\n          width: '25%'\n        },\n        caption: 'Select overview',\n        value: overview,\n        onChange: this.handleSelect('overview'),\n        options: _options.OVERVIEW_OPTIONS\n      }), _react.default.createElement(_Components.DropdownSelect, {\n        outerStyle: {\n          width: '75%'\n        },\n        caption: 'Toggle visualizations',\n        value: visualizations,\n        onChange: this.handleSelect('visualizations'),\n        options: _options.VISUALIZATION_OPTIONS,\n        isMulti: true\n      })), _react.default.createElement(_AlignmentChart.default, _extends({\n        data: data,\n        colorscale: colorscaleVal,\n        overview: overviewVal,\n        showconservation: showconservation,\n        showgap: showgap,\n        showlabel: showlabel,\n        showid: showid,\n        showconsensus: showconsensus\n      }, other)));\n    }\n  }]);\n\n  return AlignmentViewer;\n}(_react.PureComponent);\n\nexports.default = AlignmentViewer;\nAlignmentViewer.propTypes = {\n  /**\n   * Input data, either in FASTA or Clustal format.\n   */\n  data: _propTypes.default.string,\n\n  /**\n   *Format type of the input data, either in FASTA or Clustal.\n   */\n  extension: _propTypes.default.string,\n\n  /**\n   * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n   * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n   * or your own colorscale as a {'nucleotide': COLOR} dict.\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),\n\n  /**\n   * Opacity of the main plot as a value between 0 and 1.\n   */\n  opacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n   * If left blank, handled by the colorscale automatically.\n   */\n  textcolor: _propTypes.default.string,\n\n  /**\n   * Size of the nucleotide labels, as a number.\n   */\n  textsize: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Toggles displaying sequence labels at left of alignment\n   */\n  showlabel: _propTypes.default.bool,\n\n  /**\n   * Toggles displaying sequence IDs at left of alignment.\n   */\n  showid: _propTypes.default.bool,\n\n  /**\n   * Enables the display of conservation secondary barplot where the most conserved\n   * nucleotides or amino acids get greater bars.\n   */\n  showconservation: _propTypes.default.bool,\n\n  /**\n   * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  conservationcolor: _propTypes.default.string,\n\n  /**\n   * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  conservationcolorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),\n\n  /**\n   * Opacity of the conservation secondary barplot as a value between 0 and 1.\n   */\n  conservationopacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Whether to use most conserved ratio (MLE) 'conservation'\n   * or normalized entropy 'entropy' to determine conservation,\n   * which is a value between 0 and 1 where 1 is most conserved.\n   */\n  conservationmethod: _propTypes.default.oneOf(['conservation', 'entropy']),\n\n  /**\n   * Whether to normalize the conservation barchart\n   * By multiplying it elementwise with the gap barchart, as to\n   * lower the conservation values across sequences regions with many gaps.\n   */\n  correctgap: _propTypes.default.bool,\n\n  /**\n   * Enables the display of gap secondary barplot where the sequence regions\n   * with the fewest gaps get the greatest bars.\n   */\n  showgap: _propTypes.default.bool,\n\n  /**\n   * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  gapcolor: _propTypes.default.string,\n\n  /**\n   * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  gapcolorscale: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),\n\n  /**\n   * Opacity of the gap secondary barplot as a value between 0 and 1.\n   */\n  gapopacity: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * If both conservation and gap are enabled,\n   * toggles whether to group bars or to stack them as separate subplots.\n   * No effect if not both gap and conservation are shown.\n   */\n  groupbars: _propTypes.default.bool,\n\n  /**\n   * Displays toggling the consensus sequence, where each nucleotide in the\n   * consensus sequence is the argmax of its distribution at a set nucleotide.\n   */\n  showconsensus: _propTypes.default.bool,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up horizontally. The total number of tiles (numtiles) seen\n   * horizontally is automatically determined by rounding\n   * the Viewer width divided by the tile width.\n   * the Viewwer width divided by the tile witdth.\n   */\n  tilewidth: _propTypes.default.number,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up vertically.\n   * If enabled, set height dynamically.\n   */\n  tileheight: _propTypes.default.number,\n\n  /**\n   * Toggles whether the overview should be a heatmap, a slider, or none.\n   */\n  overview: _propTypes.default.oneOf(['heatmap', 'slider', 'none']),\n\n  /**\n   * Sets how many tiles to display across horitontally. If enabled,\n   * overrides tilewidth and sets the amount of tiles directly based off\n   * that value.\n   */\n  numtiles: _propTypes.default.number,\n\n  /**\n   * If overview is set to 'scroll', determines how many tiles to skip\n   * with each slider movement.\n   * Has no effect if scroll is not enabled (such as with overview or none).\n   */\n  scrollskip: _propTypes.default.number,\n\n  /**\n   * Determines where to start annotating the first tile.\n   * If let blank will be automatically determined by Plotly.\n   * Equivalent to Plotly's tick0 property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  tickstart: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Determines at what interval to keep annotating the tiles.\n   * If left blank will be automatially determined by Plotly.\n   * Equivalent to Plotly's dtick property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  ticksteps: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tileswidth and numtiles\n   * if either of them is set.\n   */\n  width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tilesheight if both\n   * are set.\n   */\n  height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n};\nAlignmentViewer.defaultProps = {\n  // Data\n  extension: 'fasta',\n  colorscale: 'clustal2',\n  opacity: null,\n  textcolor: null,\n  textsize: 10,\n  showlabel: true,\n  showid: true,\n  showconservation: true,\n  conservationcolor: null,\n  conservationcolorscale: 'Viridis',\n  conservationopacity: null,\n  conservationmethod: 'entropy',\n  correctgap: true,\n  showgap: true,\n  gapcolor: 'grey',\n  gapcolorscale: null,\n  gapopacity: null,\n  groupbars: false,\n  showconsensus: true,\n  // Layout\n  tilewidth: 16,\n  tileheight: 16,\n  numtiles: null,\n  overview: 'heatmap',\n  scrollskip: 10,\n  tickstart: null,\n  ticksteps: null,\n  // Other\n  width: null,\n  height: 900\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/AlignmentViewer.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/Components.js":
/*!**************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/Components.js ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.DropdownSelect = exports.Caption = void 0;\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _reactSelect = _interopRequireWildcard(__webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nvar Caption = function Caption(props) {\n  return _react.default.createElement(\"div\", {\n    style: {\n      marginTop: -8,\n      marginBottom: -8\n    }\n  }, _react.default.createElement(\"p\", {\n    style: {\n      fontSize: 12,\n      fontColor: '#444444'\n    }\n  }, props.children));\n};\n\nexports.Caption = Caption;\n\nvar DropdownSelect = function DropdownSelect(props) {\n  var caption = props.caption,\n      isCreatable = props.isCreatable,\n      outerStyle = props.outerStyle,\n      propsRest = _objectWithoutProperties(props, [\"caption\", \"isCreatable\", \"outerStyle\"]);\n\n  return _react.default.createElement(\"div\", {\n    style: outerStyle\n  }, caption && _react.default.createElement(Caption, null, caption), !caption && _react.default.createElement(Caption, null, \"\\xA0\"), isCreatable && _react.default.createElement(_reactSelect.Creatable, _extends({\n    allowCreate: true\n  }, propsRest)), !isCreatable && _react.default.createElement(_reactSelect.default, propsRest));\n};\n\nexports.DropdownSelect = DropdownSelect;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/Components.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/charting.js":
/*!************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/charting.js ***!
  \************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getVisualizations = exports.getTicks = exports.getHovertext = exports.getWidth = exports.SUBPLOT_RATIOS = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Subplot ratios\nvar SUBPLOT_RATIOS = {\n  1: 1,\n  2: 0.75,\n  3: 0.65\n}; // Get width\n\nexports.SUBPLOT_RATIOS = SUBPLOT_RATIOS;\n\nvar getWidth = function getWidth(inputWidth) {\n  var width;\n\n  if (_lodash.default.isNumber(inputWidth)) {\n    width = inputWidth;\n  } else {\n    // Only supports % and px for now\n    // Need react-sizeme for container support if user chooses half-grid, etc\n    if (inputWidth.includes('%')) {\n      width = parseFloat(inputWidth) / 100 * window.innerWidth;\n    } else {\n      width = parseFloat(inputWidth);\n    }\n  }\n\n  return width;\n}; // Format hover text\n\n\nexports.getWidth = getWidth;\n\nvar getHovertext = function getHovertext(sequencesArray, sequencesInfo) {\n  var formattedTextsArray = [];\n\n  var _loop = function _loop(i) {\n    var formattedTexts = [];\n    var position = 0;\n    sequencesArray[i].forEach(function (letter) {\n      position += 1;\n      var formattedText = [\"<b>Name</b>: \".concat(sequencesInfo[i].name), \"<b>Organism</b>: \".concat(sequencesInfo[i].os ? sequencesInfo[i].os : 'N/A'), \"<b>ID</b>: \".concat(sequencesInfo[i].id, \"<br>\"), \"<b>Position</b>: (\".concat(position, \", \").concat(i, \")\"), \"<b>Letter</b>: \".concat(letter)].join('<br>');\n      formattedTexts.push(formattedText);\n    });\n    formattedTextsArray.push(formattedTexts);\n  };\n\n  for (var i = 0; i < sequencesArray.length; i++) {\n    _loop(i);\n  }\n\n  return _lodash.default.flatten(formattedTextsArray);\n}; // Get label and tick properties\n\n\nexports.getHovertext = getHovertext;\n\nvar getTicks = function getTicks(sequencesInfo, showlabel, showid) {\n  var offset = _lodash.default.toString(_lodash.default.maxBy(sequencesInfo, \"id\").id).length;\n\n  var labels, tick;\n\n  if (showlabel && showid) {\n    labels = sequencesInfo.map(function (sequence) {\n      return sequence.name + \"     \" + _lodash.default.padStart(sequence.id, offset, \"0\");\n    });\n    tick = '';\n  } else if (showlabel) {\n    labels = sequencesInfo.map(function (sequence) {\n      return sequence.name;\n    });\n    tick = 'outside';\n  } else if (showid) {\n    labels = sequencesInfo.map(function (sequence) {\n      return sequence.id;\n    });\n    tick = 'outside';\n  } else {\n    labels = sequencesInfo.map(function () {\n      return \"\";\n    });\n    tick = '';\n  }\n\n  return {\n    labels: labels,\n    tick: tick\n  };\n}; // Pasrse visualization settings for AlignmentViewer\n\n\nexports.getTicks = getTicks;\n\nvar getVisualizations = function getVisualizations(visualizationsVal) {\n  var showconservation = false;\n  var showgap = false;\n  var showlabel = false;\n  var showid = false;\n  var showconsensus = false;\n\n  if (_lodash.default.includes(visualizationsVal, 'showconservation')) {\n    showconservation = true;\n  }\n\n  if (_lodash.default.includes(visualizationsVal, 'showgap')) {\n    showgap = true;\n  }\n\n  if (_lodash.default.includes(visualizationsVal, 'showlabel')) {\n    showlabel = true;\n  }\n\n  if (_lodash.default.includes(visualizationsVal, 'showid')) {\n    showid = true;\n  }\n\n  if (_lodash.default.includes(visualizationsVal, 'showconsensus')) {\n    showconsensus = true;\n  }\n\n  return {\n    showconservation: showconservation,\n    showgap: showgap,\n    showlabel: showlabel,\n    showid: showid,\n    showconsensus: showconsensus\n  };\n};\n\nexports.getVisualizations = getVisualizations;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/charting.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colormaker.js":
/*!**************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colormaker.js ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getColorscale = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _buried = _interopRequireDefault(__webpack_require__(/*! ./colorscales/buried */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/buried.js\"));\n\nvar _cinema = _interopRequireDefault(__webpack_require__(/*! ./colorscales/cinema */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/cinema.js\"));\n\nvar _clustal = _interopRequireDefault(__webpack_require__(/*! ./colorscales/clustal */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/clustal.js\"));\n\nvar _clustal2 = _interopRequireDefault(__webpack_require__(/*! ./colorscales/clustal2 */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/clustal2.js\"));\n\nvar _helix = _interopRequireDefault(__webpack_require__(/*! ./colorscales/helix */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/helix.js\"));\n\nvar _hydrophobicity = _interopRequireDefault(__webpack_require__(/*! ./colorscales/hydrophobicity */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/hydrophobicity.js\"));\n\nvar _lesk = _interopRequireDefault(__webpack_require__(/*! ./colorscales/lesk */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/lesk.js\"));\n\nvar _mae = _interopRequireDefault(__webpack_require__(/*! ./colorscales/mae */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/mae.js\"));\n\nvar _nucleotide = _interopRequireDefault(__webpack_require__(/*! ./colorscales/nucleotide */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/nucleotide.js\"));\n\nvar _purine = _interopRequireDefault(__webpack_require__(/*! ./colorscales/purine */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/purine.js\"));\n\nvar _strand = _interopRequireDefault(__webpack_require__(/*! ./colorscales/strand */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/strand.js\"));\n\nvar _taylor = _interopRequireDefault(__webpack_require__(/*! ./colorscales/taylor */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/taylor.js\"));\n\nvar _turn = _interopRequireDefault(__webpack_require__(/*! ./colorscales/turn */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/turn.js\"));\n\nvar _zappo = _interopRequireDefault(__webpack_require__(/*! ./colorscales/zappo */ \"./node_modules/react-alignment-viewer/lib/components/colorscales/zappo.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ALL_COLORSCALES = {\n  buried: _buried.default,\n  buried_index: _buried.default,\n  cinema: _cinema.default,\n  clustal2: _clustal2.default,\n  clustal: _clustal.default,\n  helix: _helix.default,\n  helix_propensity: _helix.default,\n  hydro: _hydrophobicity.default,\n  hydrophobicity: _hydrophobicity.default,\n  lesk: _lesk.default,\n  mae: _mae.default,\n  nucleotide: _nucleotide.default,\n  purine: _purine.default,\n  purine_pyrimidine: _purine.default,\n  strand: _strand.default,\n  strand_propensity: _strand.default,\n  taylor: _taylor.default,\n  turn: _turn.default,\n  turn_propensity: _turn.default,\n  zappo: _zappo.default\n};\nvar DARK_COLORSCALES = ['buried', 'buried_index', 'helix', 'helix_propensity', 'hydro', 'hydrophobicity', 'strand', 'strand_propensity', 'turn', 'turn_propensity'];\n\nvar convertColorscale = function convertColorscale(inputColorscale) {\n  // Add filler white for blanks\n  if (!inputColorscale['-']) {\n    inputColorscale['-'] = '#ffffff';\n  } // Increment based on number of keys in colorscale\n\n\n  var length = _lodash.default.size(inputColorscale);\n\n  var increment = 1 / length;\n  var offset = 0;\n  var safety = 0.005;\n  var colormap = {};\n  var colorscale = [];\n\n  _lodash.default.forEach(inputColorscale, function (val, key) {\n    // Pre-increment\n    colormap[key] = offset + safety;\n    colorscale.push([offset, val]); // Increment\n\n    offset += increment; // Post-increment\n\n    colorscale.push([offset, val]);\n  }); // To remove floating point error\n\n\n  colorscale[colorscale.length - 1][0] = 1;\n  return {\n    colormap: colormap,\n    colorscale: colorscale\n  };\n}; // Return colorscale and other params for given input string/object\n\n\nvar getColorscale = function getColorscale(inputColorscale) {\n  var inputTextcolor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var inputOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var chosenColorscale, textcolor, opacity;\n\n  if (_lodash.default.isString(inputColorscale)) {\n    // Default colorscale\n    chosenColorscale = ALL_COLORSCALES[inputColorscale] || _taylor.default;\n\n    if (DARK_COLORSCALES.includes(inputColorscale)) {\n      textcolor = '#ffffff';\n      opacity = 1;\n    } else {\n      textcolor = '#444444';\n      opacity = 0.75;\n    }\n  } else {\n    // Custom colorscale\n    chosenColorscale = inputColorscale;\n    textcolor = '#ffffff';\n    opacity = 1;\n  } // Custom overrride\n\n\n  if (inputTextcolor) {\n    textcolor = inputTextcolor;\n  }\n\n  if (inputOpacity) {\n    opacity = inputOpacity;\n  }\n\n  var _convertColorscale = convertColorscale(chosenColorscale),\n      colormap = _convertColorscale.colormap,\n      colorscale = _convertColorscale.colorscale;\n\n  return {\n    colormap: colormap,\n    colorscale: colorscale,\n    textcolor: textcolor,\n    opacity: opacity\n  };\n};\n\nexports.getColorscale = getColorscale;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colormaker.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/buried.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/buried.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#00a35c\",\n  R: \"#00fc03\",\n  N: \"#00eb14\",\n  D: \"#00eb14\",\n  C: \"#0000ff\",\n  Q: \"#00f10e\",\n  E: \"#00f10e\",\n  G: \"#009d62\",\n  H: \"#00d52a\",\n  I: \"#0054ab\",\n  L: \"#007b84\",\n  K: \"#00ff00\",\n  M: \"#009768\",\n  F: \"#008778\",\n  P: \"#00e01f\",\n  S: \"#00d52a\",\n  T: \"#00db24\",\n  W: \"#00a857\",\n  Y: \"#00e619\",\n  V: \"#005fa0\",\n  B: \"#00eb14\",\n  X: \"#00b649\",\n  Z: \"#00f10e\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/buried.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/cinema.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/cinema.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#BBBBBB\",\n  B: \"grey\",\n  C: \"yellow\",\n  D: \"red\",\n  E: \"red\",\n  F: \"magenta\",\n  G: \"brown\",\n  H: \"#00FFFF\",\n  I: \"#BBBBBB\",\n  J: \"#fff\",\n  K: \"#00FFFF\",\n  L: \"#BBBBBB\",\n  M: \"#BBBBBB\",\n  N: \"green\",\n  O: \"#fff\",\n  P: \"brown\",\n  Q: \"green\",\n  R: \"#00FFFF\",\n  S: \"green\",\n  T: \"green\",\n  U: \"#fff\",\n  V: \"#BBBBBB\",\n  W: \"magenta\",\n  X: \"grey\",\n  Y: \"magenta\",\n  Z: \"grey\",\n  '-': \"grey\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/cinema.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/clustal.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/clustal.js ***!
  \***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"orange\",\n  B: \"#fff\",\n  C: \"green\",\n  D: \"red\",\n  E: \"red\",\n  F: \"blue\",\n  G: \"orange\",\n  H: \"red\",\n  I: \"green\",\n  J: \"#fff\",\n  K: \"red\",\n  L: \"green\",\n  M: \"green\",\n  N: \"#fff\",\n  O: \"#fff\",\n  P: \"orange\",\n  Q: \"#fff\",\n  R: \"red\",\n  S: \"orange\",\n  T: \"orange\",\n  U: \"#fff\",\n  V: \"green\",\n  W: \"blue\",\n  X: \"#fff\",\n  Y: \"blue\",\n  Z: \"#fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/clustal.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/clustal2.js":
/*!************************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/clustal2.js ***!
  \************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#80a0f0\",\n  R: \"#f01505\",\n  N: \"#00ff00\",\n  D: \"#c048c0\",\n  C: \"#f08080\",\n  Q: \"#00ff00\",\n  E: \"#c048c0\",\n  G: \"#f09048\",\n  H: \"#15a4a4\",\n  I: \"#80a0f0\",\n  L: \"#80a0f0\",\n  K: \"#f01505\",\n  M: \"#80a0f0\",\n  F: \"#80a0f0\",\n  P: \"#ffff00\",\n  S: \"#00ff00\",\n  T: \"#00ff00\",\n  W: \"#80a0f0\",\n  Y: \"#15a4a4\",\n  V: \"#80a0f0\",\n  B: \"#fff\",\n  X: \"#fff\",\n  Z: \"#fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/clustal2.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/helix.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/helix.js ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#e718e7\",\n  R: \"#6f906f\",\n  N: \"#1be41b\",\n  D: \"#778877\",\n  C: \"#23dc23\",\n  Q: \"#926d92\",\n  E: \"#ff00ff\",\n  G: \"#00ff00\",\n  H: \"#758a75\",\n  I: \"#8a758a\",\n  L: \"#ae51ae\",\n  K: \"#a05fa0\",\n  M: \"#ef10ef\",\n  F: \"#986798\",\n  P: \"#00ff00\",\n  S: \"#36c936\",\n  T: \"#47b847\",\n  W: \"#8a758a\",\n  Y: \"#21de21\",\n  V: \"#857a85\",\n  B: \"#49b649\",\n  X: \"#758a75\",\n  Z: \"#c936c9\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/helix.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/hydrophobicity.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/hydrophobicity.js ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#ad0052\",\n  B: \"#0c00f3\",\n  C: \"#c2003d\",\n  D: \"#0c00f3\",\n  E: \"#0c00f3\",\n  F: \"#cb0034\",\n  G: \"#6a0095\",\n  H: \"#1500ea\",\n  I: \"#ff0000\",\n  J: \"#fff\",\n  K: \"#0000ff\",\n  L: \"#ea0015\",\n  M: \"#b0004f\",\n  N: \"#0c00f3\",\n  O: \"#fff\",\n  P: \"#4600b9\",\n  Q: \"#0c00f3\",\n  R: \"#0000ff\",\n  S: \"#5e00a1\",\n  T: \"#61009e\",\n  U: \"#fff\",\n  V: \"#f60009\",\n  W: \"#5b00a4\",\n  X: \"#680097\",\n  Y: \"#4f00b0\",\n  Z: \"#0c00f3\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/hydrophobicity.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/lesk.js":
/*!********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/lesk.js ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \" orange\",\n  B: \" #fff\",\n  C: \" green\",\n  D: \" red\",\n  E: \" red\",\n  F: \" green\",\n  G: \" orange\",\n  H: \" magenta\",\n  I: \" green\",\n  J: \" #fff\",\n  K: \" red\",\n  L: \" green\",\n  M: \" green\",\n  N: \" magenta\",\n  O: \" #fff\",\n  P: \" green\",\n  Q: \" magenta\",\n  R: \" red\",\n  S: \" orange\",\n  T: \" orange\",\n  U: \" #fff\",\n  V: \" green\",\n  W: \" green\",\n  X: \" #fff\",\n  Y: \" green\",\n  Z: \" #fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/lesk.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/mae.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/mae.js ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \" #77dd88\",\n  B: \" #fff\",\n  C: \" #99ee66\",\n  D: \" #55bb33\",\n  E: \" #55bb33\",\n  F: \" #9999ff\",\n  G: \" #77dd88\",\n  H: \" #5555ff\",\n  I: \" #66bbff\",\n  J: \" #fff\",\n  K: \" #ffcc77\",\n  L: \" #66bbff\",\n  M: \" #66bbff\",\n  N: \" #55bb33\",\n  O: \" #fff\",\n  P: \" #eeaaaa\",\n  Q: \" #55bb33\",\n  R: \" #ffcc77\",\n  S: \" #ff4455\",\n  T: \" #ff4455\",\n  U: \" #fff\",\n  V: \" #66bbff\",\n  W: \" #9999ff\",\n  X: \" #fff\",\n  Y: \" #9999ff\",\n  Z: \" #fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/mae.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/nucleotide.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/nucleotide.js ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \" #64F73F\",\n  C: \" #FFB340\",\n  G: \" #EB413C\",\n  T: \" #3C88EE\",\n  U: \" #3C88EE\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/nucleotide.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/purine.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/purine.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \" #FF83FA\",\n  C: \" #40E0D0\",\n  G: \" #FF83FA\",\n  R: \" #FF83FA\",\n  T: \" #40E0D0\",\n  U: \" #40E0D0\",\n  Y: \" #40E0D0\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/purine.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/strand.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/strand.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#5858a7\",\n  R: \"#6b6b94\",\n  N: \"#64649b\",\n  D: \"#2121de\",\n  C: \"#9d9d62\",\n  Q: \"#8c8c73\",\n  E: \"#0000ff\",\n  G: \"#4949b6\",\n  H: \"#60609f\",\n  I: \"#ecec13\",\n  L: \"#b2b24d\",\n  K: \"#4747b8\",\n  M: \"#82827d\",\n  F: \"#c2c23d\",\n  P: \"#2323dc\",\n  S: \"#4949b6\",\n  T: \"#9d9d62\",\n  W: \"#c0c03f\",\n  Y: \"#d3d32c\",\n  V: \"#ffff00\",\n  B: \"#4343bc\",\n  X: \"#797986\",\n  Z: \"#4747b8\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/strand.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/taylor.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/taylor.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#ccff00\",\n  R: \"#0000ff\",\n  N: \"#cc00ff\",\n  D: \"#ff0000\",\n  C: \"#ffff00\",\n  Q: \"#ff00cc\",\n  E: \"#ff0066\",\n  G: \"#ff9900\",\n  H: \"#0066ff\",\n  I: \"#66ff00\",\n  L: \"#33ff00\",\n  K: \"#6600ff\",\n  M: \"#00ff00\",\n  F: \"#00ff66\",\n  P: \"#ffcc00\",\n  S: \"#ff3300\",\n  T: \"#ff6600\",\n  W: \"#00ccff\",\n  Y: \"#00ffcc\",\n  V: \"#99ff00\",\n  B: \"#fff\",\n  X: \"#fff\",\n  Z: \"#fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/taylor.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/turn.js":
/*!********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/turn.js ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#2cd3d3\",\n  R: \"#708f8f\",\n  N: \"#ff0000\",\n  D: \"#e81717\",\n  C: \"#a85757\",\n  Q: \"#3fc0c0\",\n  E: \"#778888\",\n  G: \"#ff0000\",\n  H: \"#708f8f\",\n  I: \"#00ffff\",\n  L: \"#1ce3e3\",\n  K: \"#7e8181\",\n  M: \"#1ee1e1\",\n  F: \"#1ee1e1\",\n  P: \"#f60909\",\n  S: \"#e11e1e\",\n  T: \"#738c8c\",\n  W: \"#738c8c\",\n  Y: \"#9d6262\",\n  V: \"#07f8f8\",\n  B: \"#f30c0c\",\n  X: \"#7c8383\",\n  Z: \"#5ba4a4\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/turn.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/colorscales/zappo.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/colorscales/zappo.js ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = {\n  A: \"#ffafaf\",\n  R: \"#6464ff\",\n  N: \"#00ff00\",\n  D: \"#ff0000\",\n  C: \"#ffff00\",\n  Q: \"#00ff00\",\n  E: \"#ff0000\",\n  G: \"#ff00ff\",\n  H: \"#6464ff\",\n  I: \"#ffafaf\",\n  L: \"#ffafaf\",\n  K: \"#6464ff\",\n  M: \"#ffafaf\",\n  F: \"#ffc800\",\n  P: \"#ff00ff\",\n  S: \"#00ff00\",\n  T: \"#00ff00\",\n  W: \"#ffc800\",\n  Y: \"#ffc800\",\n  V: \"#ffafaf\",\n  B: \"#fff\",\n  X: \"#fff\",\n  Z: \"#fff\"\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/colorscales/zappo.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/metrics.js":
/*!***********************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/metrics.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getConsensus = exports.getConservation = exports.getEntropy = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Get Log e entropy of a distribution\nvar getEntropy = function getEntropy(input) {\n  var arr;\n\n  if (_lodash.default.isString(input)) {\n    arr = input.split('');\n  } else {\n    arr = input;\n  }\n\n  var set = {};\n  arr.forEach(function (c) {\n    return set[c] ? set[c]++ : set[c] = 1;\n  });\n  return Object.keys(set).reduce(function (acc, c) {\n    var p = set[c] / arr.length;\n    return acc - p * Math.log(p);\n  }, 0);\n}; // Get MLE of a distribution\n\n\nexports.getEntropy = getEntropy;\n\nvar getConservation = function getConservation(input) {\n  var arr;\n\n  if (_lodash.default.isString(input)) {\n    arr = input.split('');\n  } else {\n    arr = input;\n  }\n\n  var conservationArr = (0, _lodash.default)(arr).countBy().entries().maxBy('[1]')[1];\n  return conservationArr;\n}; // Get consensus sequence from 2D array\n\n\nexports.getConservation = getConservation;\n\nvar getConsensus = function getConsensus(sequencesTranspose) {\n  return sequencesTranspose.map(function (sequenceTranspose) {\n    return (0, _lodash.default)(sequenceTranspose).countBy().entries().maxBy('[1]')[0];\n  });\n};\n\nexports.getConsensus = getConsensus;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/metrics.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/options.js":
/*!***********************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/options.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.COLORSCALE_OPTIONS = exports.OVERVIEW_OPTIONS = exports.VISUALIZATION_OPTIONS = void 0;\n// TODO\n// + Correct gap\n// + Group bars\n// + Conservation method\nvar VISUALIZATION_OPTIONS = [{\n  value: 'showconservation',\n  label: 'Show conservation'\n}, {\n  value: 'showgap',\n  label: 'Show gap weights'\n}, {\n  value: 'showlabel',\n  label: 'Show labels'\n}, {\n  value: 'showid',\n  label: 'Show ID'\n}, {\n  value: 'showconsensus',\n  label: 'Show consensus weights'\n}];\nexports.VISUALIZATION_OPTIONS = VISUALIZATION_OPTIONS;\nvar OVERVIEW_OPTIONS = [{\n  value: 'heatmap',\n  label: 'Heatmap overview'\n}, {\n  value: 'slider',\n  label: 'Slider overview'\n}, {\n  value: 'none',\n  label: 'No overview'\n}];\nexports.OVERVIEW_OPTIONS = OVERVIEW_OPTIONS;\nvar COLORSCALE_OPTIONS = [{\n  value: 'buried',\n  label: 'Buried'\n}, {\n  value: 'cinema',\n  label: 'Cinema'\n}, {\n  value: 'clustal2',\n  label: 'Clustal2'\n}, {\n  value: 'clustal',\n  label: 'Clustal'\n}, {\n  value: 'helix',\n  label: 'Helix'\n}, {\n  value: 'hydro',\n  label: 'Hydrophobicity'\n}, {\n  value: 'lesk',\n  label: 'Lesk'\n}, {\n  value: 'mae',\n  label: 'Mae'\n}, {\n  value: 'nucleotide',\n  label: 'Nucleotide'\n}, {\n  value: 'purine',\n  label: 'Purine'\n}, {\n  value: 'strand',\n  label: 'Strand'\n}, {\n  value: 'taylor',\n  label: 'Taylor'\n}, {\n  value: 'turn',\n  label: 'Turn'\n}, {\n  value: 'zappo',\n  label: 'Zappo'\n}];\nexports.COLORSCALE_OPTIONS = COLORSCALE_OPTIONS;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/options.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/components/sequences.js":
/*!*************************************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/components/sequences.js ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.mergeSequences = exports.parseSequences = exports.importSequences = void 0;\n\nvar _bio = __webpack_require__(/*! bio.io */ \"./node_modules/bio.io/lib/index.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _metrics = __webpack_require__(/*! ./metrics */ \"./node_modules/react-alignment-viewer/lib/components/metrics.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Import sequence in FASTA/Clustal format\nvar importSequences = function importSequences(inputData, extension) {\n  var sequences;\n\n  if (extension === 'fasta') {\n    sequences = _bio.fasta.parse(inputData);\n  } else if (extension === 'clustal') {\n    sequences = _bio.clustal.parse(inputData);\n  } else {\n    sequences = '';\n    console.log(\"Invalid format\");\n  }\n\n  return sequences;\n}; // Get sequence and associated info\n\n\nexports.importSequences = importSequences;\n\nvar parseSequences = function parseSequences(sequences, length) {\n  var sequencesArray = [];\n  var sequencesInfo = [];\n  sequences.forEach(function (sequence) {\n    // Pad end if sequences not same length\n    var sequenceString = _lodash.default.padEnd(sequence.seq, length, \"-\");\n\n    var sequenceArray = _lodash.default.split(sequenceString, '');\n\n    var sequenceInfo = _objectSpread({\n      'id': sequence.id,\n      'name': sequence.name\n    }, sequence.details, sequence.ids);\n\n    sequencesArray.push(sequenceArray);\n    sequencesInfo.push(sequenceInfo);\n  });\n  return {\n    sequencesArray: sequencesArray,\n    sequencesInfo: sequencesInfo\n  };\n}; // Merge sequences w/ consensus sequence\n\n\nexports.parseSequences = parseSequences;\n\nvar mergeSequences = function mergeSequences(inputTranspose, inputArray, inputInfo, showconsensus) {\n  var sequencesArray = inputArray;\n  var sequencesInfo = inputInfo;\n\n  if (showconsensus) {\n    var consensusObj = {\n      name: '<b>Consensus</b>',\n      en: '<b>Consensus</b>',\n      id: \"<b>\".concat(_lodash.default.maxBy(inputInfo, \"id\").id + 1, \"</b>\")\n    };\n    var consensus = (0, _metrics.getConsensus)(inputTranspose);\n    sequencesArray = [].concat(_toConsumableArray(inputArray), [consensus]);\n    sequencesInfo = [].concat(_toConsumableArray(inputInfo), [consensusObj]);\n  }\n\n  return {\n    sequencesArray: sequencesArray,\n    sequencesInfo: sequencesInfo\n  };\n};\n\nexports.mergeSequences = mergeSequences;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/components/sequences.js?");

/***/ }),

/***/ "./node_modules/react-alignment-viewer/lib/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/react-alignment-viewer/lib/index.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nObject.defineProperty(exports, \"AlignmentViewer\", {\n  enumerable: true,\n  get: function get() {\n    return _AlignmentViewer.default;\n  }\n});\nObject.defineProperty(exports, \"AlignmentChart\", {\n  enumerable: true,\n  get: function get() {\n    return _AlignmentChart.default;\n  }\n});\n\nvar _AlignmentViewer = _interopRequireDefault(__webpack_require__(/*! ./components/AlignmentViewer */ \"./node_modules/react-alignment-viewer/lib/components/AlignmentViewer.js\"));\n\nvar _AlignmentChart = _interopRequireDefault(__webpack_require__(/*! ./components/AlignmentChart */ \"./node_modules/react-alignment-viewer/lib/components/AlignmentChart.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-alignment-viewer/lib/index.js?");

/***/ }),

/***/ "./node_modules/react-input-autosize/lib/AutosizeInput.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-input-autosize/lib/AutosizeInput.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar sizerStyle = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tvisibility: 'hidden',\n\theight: 0,\n\toverflow: 'scroll',\n\twhiteSpace: 'pre'\n};\n\nvar INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth'];\n\nvar cleanInputProps = function cleanInputProps(inputProps) {\n\tINPUT_PROPS_BLACKLIST.forEach(function (field) {\n\t\treturn delete inputProps[field];\n\t});\n\treturn inputProps;\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n\tnode.style.fontSize = styles.fontSize;\n\tnode.style.fontFamily = styles.fontFamily;\n\tnode.style.fontWeight = styles.fontWeight;\n\tnode.style.fontStyle = styles.fontStyle;\n\tnode.style.letterSpacing = styles.letterSpacing;\n\tnode.style.textTransform = styles.textTransform;\n};\n\nvar isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\\/|Edge\\//.test(window.navigator.userAgent) : false;\n\nvar generateId = function generateId() {\n\t// we only need an auto-generated ID for stylesheet injection, which is only\n\t// used for IE. so if the browser is not IE, this should return undefined.\n\treturn isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined;\n};\n\nvar AutosizeInput = function (_Component) {\n\t_inherits(AutosizeInput, _Component);\n\n\tfunction AutosizeInput(props) {\n\t\t_classCallCheck(this, AutosizeInput);\n\n\t\tvar _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props));\n\n\t\t_this.inputRef = function (el) {\n\t\t\t_this.input = el;\n\t\t\tif (typeof _this.props.inputRef === 'function') {\n\t\t\t\t_this.props.inputRef(el);\n\t\t\t}\n\t\t};\n\n\t\t_this.placeHolderSizerRef = function (el) {\n\t\t\t_this.placeHolderSizer = el;\n\t\t};\n\n\t\t_this.sizerRef = function (el) {\n\t\t\t_this.sizer = el;\n\t\t};\n\n\t\t_this.state = {\n\t\t\tinputWidth: props.minWidth,\n\t\t\tinputId: props.id || generateId()\n\t\t};\n\t\treturn _this;\n\t}\n\n\t_createClass(AutosizeInput, [{\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tthis.mounted = true;\n\t\t\tthis.copyInputStyles();\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillReceiveProps',\n\t\tvalue: function componentWillReceiveProps(nextProps) {\n\t\t\tvar id = nextProps.id;\n\n\t\t\tif (id !== this.props.id) {\n\t\t\t\tthis.setState({ inputId: id || generateId() });\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentDidUpdate',\n\t\tvalue: function componentDidUpdate(prevProps, prevState) {\n\t\t\tif (prevState.inputWidth !== this.state.inputWidth) {\n\t\t\t\tif (typeof this.props.onAutosize === 'function') {\n\t\t\t\t\tthis.props.onAutosize(this.state.inputWidth);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis.mounted = false;\n\t\t}\n\t}, {\n\t\tkey: 'copyInputStyles',\n\t\tvalue: function copyInputStyles() {\n\t\t\tif (!this.mounted || !window.getComputedStyle) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar inputStyles = this.input && window.getComputedStyle(this.input);\n\t\t\tif (!inputStyles) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcopyStyles(inputStyles, this.sizer);\n\t\t\tif (this.placeHolderSizer) {\n\t\t\t\tcopyStyles(inputStyles, this.placeHolderSizer);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'updateInputWidth',\n\t\tvalue: function updateInputWidth() {\n\t\t\tif (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar newInputWidth = void 0;\n\t\t\tif (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {\n\t\t\t\tnewInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;\n\t\t\t} else {\n\t\t\t\tnewInputWidth = this.sizer.scrollWidth + 2;\n\t\t\t}\n\t\t\t// add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI\n\t\t\tvar extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0;\n\t\t\tnewInputWidth += extraWidth;\n\t\t\tif (newInputWidth < this.props.minWidth) {\n\t\t\t\tnewInputWidth = this.props.minWidth;\n\t\t\t}\n\t\t\tif (newInputWidth !== this.state.inputWidth) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputWidth: newInputWidth\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getInput',\n\t\tvalue: function getInput() {\n\t\t\treturn this.input;\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.input.focus();\n\t\t}\n\t}, {\n\t\tkey: 'blur',\n\t\tvalue: function blur() {\n\t\t\tthis.input.blur();\n\t\t}\n\t}, {\n\t\tkey: 'select',\n\t\tvalue: function select() {\n\t\t\tthis.input.select();\n\t\t}\n\t}, {\n\t\tkey: 'renderStyles',\n\t\tvalue: function renderStyles() {\n\t\t\t// this method injects styles to hide IE's clear indicator, which messes\n\t\t\t// with input size detection. the stylesheet is only injected when the\n\t\t\t// browser is IE, and can also be disabled by the `injectStyles` prop.\n\t\t\tvar injectStyles = this.props.injectStyles;\n\n\t\t\treturn isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: {\n\t\t\t\t\t__html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}'\n\t\t\t\t} }) : null;\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {\n\t\t\t\tif (previousValue !== null && previousValue !== undefined) {\n\t\t\t\t\treturn previousValue;\n\t\t\t\t}\n\t\t\t\treturn currentValue;\n\t\t\t});\n\n\t\t\tvar wrapperStyle = _extends({}, this.props.style);\n\t\t\tif (!wrapperStyle.display) wrapperStyle.display = 'inline-block';\n\n\t\t\tvar inputStyle = _extends({\n\t\t\t\tboxSizing: 'content-box',\n\t\t\t\twidth: this.state.inputWidth + 'px'\n\t\t\t}, this.props.inputStyle);\n\n\t\t\tvar inputProps = _objectWithoutProperties(this.props, []);\n\n\t\t\tcleanInputProps(inputProps);\n\t\t\tinputProps.className = this.props.inputClassName;\n\t\t\tinputProps.id = this.state.inputId;\n\t\t\tinputProps.style = inputStyle;\n\n\t\t\treturn _react2.default.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: this.props.className, style: wrapperStyle },\n\t\t\t\tthis.renderStyles(),\n\t\t\t\t_react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),\n\t\t\t\t_react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.sizerRef, style: sizerStyle },\n\t\t\t\t\tsizerValue\n\t\t\t\t),\n\t\t\t\tthis.props.placeholder ? _react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.placeHolderSizerRef, style: sizerStyle },\n\t\t\t\t\tthis.props.placeholder\n\t\t\t\t) : null\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn AutosizeInput;\n}(_react.Component);\n\nAutosizeInput.propTypes = {\n\tclassName: _propTypes2.default.string, // className for the outer element\n\tdefaultValue: _propTypes2.default.any, // default field value\n\textraWidth: _propTypes2.default.oneOfType([// additional width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tid: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots\n\tinjectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true\n\tinputClassName: _propTypes2.default.string, // className for the input element\n\tinputRef: _propTypes2.default.func, // ref callback for the input element\n\tinputStyle: _propTypes2.default.object, // css styles for the input element\n\tminWidth: _propTypes2.default.oneOfType([// minimum width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tonAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {}\n\tonChange: _propTypes2.default.func, // onChange handler: function(event) {}\n\tplaceholder: _propTypes2.default.string, // placeholder text\n\tplaceholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder\n\tstyle: _propTypes2.default.object, // css styles for the outer element\n\tvalue: _propTypes2.default.any // field value\n};\nAutosizeInput.defaultProps = {\n\tminWidth: 1,\n\tinjectStyles: true\n};\n\nexports.default = AutosizeInput;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-input-autosize/lib/AutosizeInput.js?");

/***/ }),

/***/ "./node_modules/react-is/cjs/react-is.development.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-is/cjs/react-is.development.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/** @license React v16.8.6\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n  (function() {\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\nfunction isValidElementType(type) {\n  return typeof type === 'string' || typeof type === 'function' ||\n  // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n}\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar lowPriorityWarning = function () {};\n\n{\n  var printWarning = function (format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.warn(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  lowPriorityWarning = function (condition, format) {\n    if (format === undefined) {\n      throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nvar lowPriorityWarning$1 = lowPriorityWarning;\n\nfunction typeOf(object) {\n  if (typeof object === 'object' && object !== null) {\n    var $$typeof = object.$$typeof;\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        var type = object.type;\n\n        switch (type) {\n          case REACT_ASYNC_MODE_TYPE:\n          case REACT_CONCURRENT_MODE_TYPE:\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n            return type;\n          default:\n            var $$typeofType = type && type.$$typeof;\n\n            switch ($$typeofType) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_PROVIDER_TYPE:\n                return $$typeofType;\n              default:\n                return $$typeof;\n            }\n        }\n      case REACT_LAZY_TYPE:\n      case REACT_MEMO_TYPE:\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n\n  return undefined;\n}\n\n// AsyncMode is deprecated along with isAsyncMode\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\n\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\n\n// AsyncMode should be deprecated\nfunction isAsyncMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n      hasWarnedAboutDeprecatedIsAsyncMode = true;\n      lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n    }\n  }\n  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n  return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n  return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n  return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n  return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n  return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n  return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n  return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n  return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n  return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.typeOf = typeOf;\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isValidElementType = isValidElementType;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\n  })();\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-is/cjs/react-is.development.js?");

/***/ }),

/***/ "./node_modules/react-is/index.js":
/*!****************************************!*\
  !*** ./node_modules/react-is/index.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nif (false) {} else {\n  module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-is/index.js?");

/***/ }),

/***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js":
/*!****************************************************************************!*\
  !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***!
  \****************************************************************************/
/*! exports provided: polyfill */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyfill\", function() { return polyfill; });\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n  // Call this.constructor.gDSFP to support sub-classes.\n  var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n  if (state !== null && state !== undefined) {\n    this.setState(state);\n  }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n  // Call this.constructor.gDSFP to support sub-classes.\n  // Use the setState() updater to ensure state isn't stale in certain edge cases.\n  function updater(prevState) {\n    var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n    return state !== null && state !== undefined ? state : null;\n  }\n  // Binding \"this\" is important for shallow renderer support.\n  this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n  try {\n    var prevProps = this.props;\n    var prevState = this.state;\n    this.props = nextProps;\n    this.state = nextState;\n    this.__reactInternalSnapshotFlag = true;\n    this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n      prevProps,\n      prevState\n    );\n  } finally {\n    this.props = prevProps;\n    this.state = prevState;\n  }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n  var prototype = Component.prototype;\n\n  if (!prototype || !prototype.isReactComponent) {\n    throw new Error('Can only polyfill class components');\n  }\n\n  if (\n    typeof Component.getDerivedStateFromProps !== 'function' &&\n    typeof prototype.getSnapshotBeforeUpdate !== 'function'\n  ) {\n    return Component;\n  }\n\n  // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n  // Error if any of these lifecycles are present,\n  // Because they would work differently between older and newer (16.3+) versions of React.\n  var foundWillMountName = null;\n  var foundWillReceivePropsName = null;\n  var foundWillUpdateName = null;\n  if (typeof prototype.componentWillMount === 'function') {\n    foundWillMountName = 'componentWillMount';\n  } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n    foundWillMountName = 'UNSAFE_componentWillMount';\n  }\n  if (typeof prototype.componentWillReceiveProps === 'function') {\n    foundWillReceivePropsName = 'componentWillReceiveProps';\n  } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n    foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n  }\n  if (typeof prototype.componentWillUpdate === 'function') {\n    foundWillUpdateName = 'componentWillUpdate';\n  } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n    foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n  }\n  if (\n    foundWillMountName !== null ||\n    foundWillReceivePropsName !== null ||\n    foundWillUpdateName !== null\n  ) {\n    var componentName = Component.displayName || Component.name;\n    var newApiName =\n      typeof Component.getDerivedStateFromProps === 'function'\n        ? 'getDerivedStateFromProps()'\n        : 'getSnapshotBeforeUpdate()';\n\n    throw Error(\n      'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n        componentName +\n        ' uses ' +\n        newApiName +\n        ' but also contains the following legacy lifecycles:' +\n        (foundWillMountName !== null ? '\\n  ' + foundWillMountName : '') +\n        (foundWillReceivePropsName !== null\n          ? '\\n  ' + foundWillReceivePropsName\n          : '') +\n        (foundWillUpdateName !== null ? '\\n  ' + foundWillUpdateName : '') +\n        '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n        'https://fb.me/react-async-component-lifecycle-hooks'\n    );\n  }\n\n  // React <= 16.2 does not support static getDerivedStateFromProps.\n  // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n  // Newer versions of React will ignore these lifecycles if gDSFP exists.\n  if (typeof Component.getDerivedStateFromProps === 'function') {\n    prototype.componentWillMount = componentWillMount;\n    prototype.componentWillReceiveProps = componentWillReceiveProps;\n  }\n\n  // React <= 16.2 does not support getSnapshotBeforeUpdate.\n  // As a workaround, use cWU to invoke the new lifecycle.\n  // Newer versions of React will ignore that lifecycle if gSBU exists.\n  if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n    if (typeof prototype.componentDidUpdate !== 'function') {\n      throw new Error(\n        'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n      );\n    }\n\n    prototype.componentWillUpdate = componentWillUpdate;\n\n    var componentDidUpdate = prototype.componentDidUpdate;\n\n    prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n      prevProps,\n      prevState,\n      maybeSnapshot\n    ) {\n      // 16.3+ will not execute our will-update method;\n      // It will pass a snapshot value to did-update though.\n      // Older versions will require our polyfilled will-update value.\n      // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n      // Because for <= 15.x versions this might be a \"prevContext\" object.\n      // We also can't just check \"__reactInternalSnapshot\",\n      // Because get-snapshot might return a falsy value.\n      // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n      var snapshot = this.__reactInternalSnapshotFlag\n        ? this.__reactInternalSnapshot\n        : maybeSnapshot;\n\n      componentDidUpdate.call(this, prevProps, prevState, snapshot);\n    };\n  }\n\n  return Component;\n}\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js?");

/***/ }),

/***/ "./node_modules/react-oncoprint/lib/components/OncoPrint.js":
/*!******************************************************************!*\
  !*** ./node_modules/react-oncoprint/lib/components/OncoPrint.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _reactPlotly = _interopRequireDefault(__webpack_require__(/*! react-plotly.js */ \"./node_modules/react-plotly.js/react-plotly.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils */ \"./node_modules/react-oncoprint/lib/components/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n/**\n * The OncoPrint component is used to view multiple genetic alteration events\n * through an interactive and zoomable heatmap. It is a React/Dash port of the\n * popular oncoPrint() function from the BioConductor R package.\n * Under the hood, the rendering is done using Plotly.js built upon D3.\n * Plotly's interactivity allows the user to bind clicks and hovers to genetic\n * events, allowing the user to create complex bioinformatic apps or workflows\n * that rely on crossfiltering.\n * Read more about the component here:\n * https://github.com/plotly/react-oncoprint\n */\nvar OncoPrint =\n/*#__PURE__*/\nfunction (_PureComponent) {\n  _inherits(OncoPrint, _PureComponent);\n\n  // Constructor\n  function OncoPrint(props) {\n    var _this;\n\n    _classCallCheck(this, OncoPrint);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(OncoPrint).call(this, props));\n    _this.state = {\n      xStart: null,\n      xEnd: null\n    };\n    _this.resetWindowing = _this.resetWindowing.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n    _this.handleChange = _lodash.default.debounce(_this.handleChange.bind(_assertThisInitialized(_assertThisInitialized(_this))), 250);\n    return _this;\n  } // Reset windowing to user preset on init or data change\n\n\n  _createClass(OncoPrint, [{\n    key: \"resetWindowing\",\n    value: function resetWindowing(props) {\n      var range = props.range;\n      var xStart, xEnd;\n\n      if (range.length === 2) {\n        xStart = range[0];\n        xEnd = range[1];\n      } else {\n        xStart = null;\n        xEnd = null;\n      }\n\n      return {\n        xStart: xStart,\n        xEnd: xEnd\n      };\n    } // Handle plot events\n\n  }, {\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      if (!this.props.onChange) {\n        return;\n      } // CLick (mousedown) or hover (mousemove)\n\n\n      if (event.points) {\n        var eventType;\n\n        if (event.event.type === \"mousedown\") {\n          eventType = 'Click';\n        } else if (event.event.type === \"mousemove\") {\n          eventType = 'Hover';\n        } else {\n          eventType = 'Other';\n        }\n\n        this.props.onChange({\n          eventType: eventType,\n          name: event.points[0].data.name,\n          text: event.points[0].text,\n          curveNumber: event.points[0].curveNumber,\n          x: event.points[0].x,\n          y: event.points[0].y\n        });\n      } // Zoom\n      else if (event['xaxis.range[0]'] || event['xaxis.range']) {\n          this.setState({\n            xStart: event['xaxis.range[0]'] || event['xaxis.range'][0],\n            xEnd: event['xaxis.range[1]'] || event['xaxis.range'][1]\n          });\n          this.props.onChange({\n            eventType: 'Zoom',\n            xStart: event['xaxis.range[0]'] || event['xaxis.range'][0],\n            xEnd: event['xaxis.range[1]'] || event['xaxis.range'][1]\n          });\n        } // Autozoom\n        else if (event['xaxis.autorange'] === true) {\n            this.setState({\n              xStart: null,\n              xEnd: null\n            });\n            this.props.onChange({\n              eventType: 'Autoscale'\n            });\n          } // Guard\n          else {\n              this.props.onChange(event);\n            }\n    }\n  }, {\n    key: \"getData\",\n    // Fetch data\n    value: function getData() {\n      var _this$props = this.props,\n          inputData = _this$props.data,\n          padding = _this$props.padding,\n          colorscale = _this$props.colorscale,\n          backgroundcolor = _this$props.backgroundcolor; // OncoPrint equivalent of x, y\n\n      var events = (0, _utils.aggregate)(inputData);\n      var genes = (0, _utils.getSortedGenes)(inputData);\n      var samples = (0, _utils.getSortedSamples)(inputData);\n      var ratios = (0, _utils.getEventRatiosPerGene)(inputData, samples.length);\n\n      var formatGenes = function formatGenes(list) {\n        return list.map(function (gene) {\n          return \"\".concat(gene, \" (\").concat(ratios[gene], \"%)\");\n        });\n      };\n\n      var base = 0;\n      var bBackground = [];\n      var tBackground = [];\n      var xBackground = [];\n      var yBackground = []; // Background is used to draw the matrix (genes * samples)\n\n      samples.forEach(function (s) {\n        bBackground.push.apply(bBackground, _toConsumableArray(Array(genes.length).fill(base)));\n        tBackground.push.apply(tBackground, _toConsumableArray(Array(genes.length).fill(s)));\n        xBackground.push.apply(xBackground, _toConsumableArray(Array(genes.length).fill(1)));\n        yBackground.push.apply(yBackground, _toConsumableArray(formatGenes(genes)));\n        base += 1;\n      });\n      var background = {\n        base: bBackground.map(function (i) {\n          return i + padding;\n        }),\n        hoverinfo: 'text',\n        marker: {\n          color: backgroundcolor\n        },\n        name: 'No alteration',\n        text: tBackground,\n        orientation: 'h',\n        type: 'bar',\n        x: xBackground.map(function (i) {\n          return i - padding * 2;\n        }),\n        y: yBackground\n      };\n      var data = [background];\n      Object.keys(events).forEach(function (key) {\n        var aggr = events[key]; // Resize width depending on the mutation type\n\n        var width = 0.4;\n\n        if (aggr.type === 'CNA') {\n          width = 0.8;\n        } else if (aggr.type === 'EXP') {\n          width = 0.6;\n        } // Mutations should have the original text on it, not the type of mutation\n\n\n        var text_arr = aggr.events.map(function (event) {\n          return \"\".concat(event.sample, \"<br>\").concat((0, _utils.getDisplayName)(event));\n        }); // where to draw a bar for this entry\n\n        var indexes = aggr.events.map(function (e) {\n          return e.sample;\n        }).map(function (s) {\n          return samples.findIndex(function (sample) {\n            return sample === s;\n          });\n        });\n        data.push({\n          base: indexes.map(function (i) {\n            return i + padding;\n          }),\n          hoverinfo: 'text',\n          marker: {\n            color: (0, _utils.getColor)(aggr.events[0], colorscale)\n          },\n          name: (0, _utils.getDisplayName)(aggr.events[0]),\n          text: text_arr,\n          orientation: 'h',\n          type: 'bar',\n          width: width,\n          x: Array(aggr.events.length).fill(1).map(function (i) {\n            return i - padding * 2;\n          }),\n          y: formatGenes((0, _utils.getGeneNames)(aggr.events))\n        });\n      });\n      return data;\n    } // Fetch layout\n\n  }, {\n    key: \"getLayout\",\n    value: function getLayout() {\n      var _this$props2 = this.props,\n          showlegend = _this$props2.showlegend,\n          showoverview = _this$props2.showoverview,\n          width = _this$props2.width,\n          height = _this$props2.height;\n      var _this$state = this.state,\n          xStart = _this$state.xStart,\n          xEnd = _this$state.xEnd; // Get initial range\n\n      var initialRange = [xStart, xEnd];\n      var layout = {\n        barmode: 'stack',\n        hovermode: 'closest',\n        showlegend: showlegend,\n        xaxis: {\n          showgrid: false,\n          showticklabels: false,\n          zeroline: false,\n          range: initialRange,\n          automargin: true\n        },\n        yaxis: {\n          showgrid: false,\n          zeroline: false,\n          fixedrange: true,\n          automargin: true\n        },\n        margin: {\n          t: 20,\n          r: 20,\n          b: 20\n        }\n      };\n\n      if (showoverview) {\n        layout.xaxis.rangeslider = {\n          autorange: true\n        };\n      }\n\n      return {\n        layout: layout,\n        width: width,\n        height: height\n      };\n    } // Set xStart and xEnd on load\n\n  }, {\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var _this$resetWindowing = this.resetWindowing(this.props),\n          xStart = _this$resetWindowing.xStart,\n          xEnd = _this$resetWindowing.xEnd;\n\n      this.setState({\n        xStart: xStart,\n        xEnd: xEnd\n      });\n    } // Reset xStart and xEnd on data change\n\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (this.props.data !== prevProps.data) {\n        var _this$resetWindowing2 = this.resetWindowing(this.props),\n            xStart = _this$resetWindowing2.xStart,\n            xEnd = _this$resetWindowing2.xEnd;\n\n        this.setState({\n          xStart: xStart,\n          xEnd: xEnd\n        });\n      }\n    } // Main\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var data = this.getData();\n\n      var _this$getLayout = this.getLayout(),\n          layout = _this$getLayout.layout,\n          width = _this$getLayout.width,\n          height = _this$getLayout.height;\n\n      var other = {\n        style: {\n          width: width,\n          height: height\n        },\n        useResizeHandler: true\n      };\n      return _react.default.createElement(\"div\", null, _react.default.createElement(_reactPlotly.default, _extends({\n        data: data,\n        layout: layout,\n        onClick: this.handleChange,\n        onHover: this.handleChange,\n        onRelayout: this.handleChange\n      }, other)));\n    }\n  }]);\n\n  return OncoPrint;\n}(_react.PureComponent);\n\nexports.default = OncoPrint;\nOncoPrint.propTypes = {\n  /**\n   * Input data, in CBioPortal format where each list entry is a dict\n   * consisting of 'sample', 'gene', 'alteration', and 'type'\n   */\n  data: _propTypes.default.array,\n  // TODO: Add remove empty columns prop\n\n  /**\n   * Adjusts the padding (as a proportion of whitespace) between two tracks.\n   * Value is a ratio between 0 and 1.\n   * Defaults to 0.05 (e.g. 5%). If set to 0, plot will look like a heatmap.\n   */\n  padding: _propTypes.default.number,\n\n  /**\n   * If not null, will override the default OncoPrint colorscale.\n   * Default OncoPrint colorscale same as CBioPortal implementation.\n   * Make your own colrscale as a {'mutation': COLOR} dict.\n   * Supported mutation keys are ['MISSENSE, 'INFRAME', 'FUSION',\n   * 'AMP', 'GAIN', 'HETLOSS', 'HMODEL', 'UP', 'DOWN']\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),\n\n  /**\n   * Default color for the tracks, in common name, hex, rgb or rgba format.\n   * If left blank, will default to a light grey rgb(190, 190, 190).\n   */\n  backgroundcolor: _propTypes.default.string,\n\n  /**\n   *.Toogles whether or not to show a legend on the right side of the plot,\n   * with mutation information.\n   */\n  range: _propTypes.default.array,\n\n  /**\n   *.Toogles whether or not to show a legend on the right side of the plot,\n   * with mutation information.\n   */\n  showlegend: _propTypes.default.bool,\n\n  /**\n   *.Toogles whether or not to show a heatmap overview of the tracks.\n   */\n  showoverview: _propTypes.default.bool,\n\n  /**\n   * Width of the OncoPrint.\n   * Will disable auto-resizing of plots if set.\n   */\n  width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n\n  /**\n   * Height of the OncoPrint.\n   * Will disable auto-resizing of plots if set.\n   */\n  height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n};\nOncoPrint.defaultProps = {\n  // Data\n  padding: 0.05,\n  colorscale: null,\n  backgroundcolor: 'rgb(190, 190, 190)',\n  // Layout\n  range: [null, null],\n  showlegend: true,\n  showoverview: true,\n  // Other\n  width: null,\n  height: 500\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-oncoprint/lib/components/OncoPrint.js?");

/***/ }),

/***/ "./node_modules/react-oncoprint/lib/components/PrecomputedComparator.js":
/*!******************************************************************************!*\
  !*** ./node_modules/react-oncoprint/lib/components/PrecomputedComparator.js ***!
  \******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = exports.hasElementsInInterval = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar hasElementsInInterval = function hasElementsInInterval(arr, func, lowerBound, upperBound) {\n  // in: arr, an array sorted in increasing order of func\n  //     func, a function that takes an element of sorted_list and returns a number\n  //     lowerBound and upperBound: define a half-open interval [lowerBound, upperBound)\n  // out: boolean, true iff there are any elements whose image under func is in [lowerBound, upperBound)\n  var lowerCounter = 0;\n  var upperCounter = arr.length;\n  var middle, middle_val;\n\n  while (true) {\n    if (lowerCounter >= upperCounter) {\n      return false;\n    }\n\n    middle = Math.floor((lowerCounter + upperCounter) / 2);\n    middle_val = func(arr[middle]);\n\n    if (middle_val >= upperBound) {\n      upperCounter = middle;\n    } else if (middle_val < lowerBound) {\n      lowerCounter = middle + 1;\n    } else {\n      // otherwise, the middle value is inside the interval,\n      // so there's at least one value inside the interval\n      return true;\n    }\n  }\n}; // PrecomputedComparator is similar to the OncoPrintJs implementation with\n// three notable changes: rewritten with Flow/ES next and as a class, the input\n// data structure is different, and no direction.\n\n\nexports.hasElementsInInterval = hasElementsInInterval;\n\nvar PrecomputedComparator =\n/*#__PURE__*/\nfunction () {\n  function PrecomputedComparator(data, comparator) {\n    _classCallCheck(this, PrecomputedComparator);\n\n    this.comparator = comparator;\n    this.data = data;\n    this.sort();\n  }\n\n  _createClass(PrecomputedComparator, [{\n    key: \"sort\",\n    value: function sort() {\n      this.sortedData = this.data.sort(this.comparator);\n      this.changePoints = [];\n\n      for (var i = 0; i < this.sortedData.length; i += 1) {\n        if (i === this.sortedData.length - 1) {\n          break;\n        }\n\n        if (this.comparator(this.sortedData[i], this.sortedData[i + 1]) !== 0) {\n          this.changePoints.push(i);\n        }\n      }\n\n      this.samplesToIndex = {};\n\n      for (var _i = 0; _i < this.sortedData.length; _i += 1) {\n        this.samplesToIndex[this.sortedData[_i]] = _i;\n      }\n    }\n  }, {\n    key: \"compare\",\n    value: function compare(s1, s2) {\n      var i1 = this.samplesToIndex[s1];\n      var i2 = this.samplesToIndex[s2];\n\n      if (typeof i1 === 'undefined' && typeof i2 === 'undefined') {\n        return 0;\n      } else if (typeof i1 === 'undefined') {\n        return 1;\n      } else if (typeof i2 === 'undefined') {\n        return -1;\n      }\n\n      var shouldNegateResult = false;\n\n      if (i1 === i2) {\n        return 0;\n      } else if (i1 > i2) {\n        var tmp = i1;\n        i1 = i2;\n        i2 = tmp;\n        shouldNegateResult = true;\n      }\n\n      var res = 0;\n\n      if (hasElementsInInterval(this.changePoints, function (x) {\n        return x;\n      }, i1, i2)) {\n        res = -1;\n      }\n\n      if (shouldNegateResult) {\n        res *= -1;\n      }\n\n      return res;\n    }\n  }]);\n\n  return PrecomputedComparator;\n}();\n\nexports.default = PrecomputedComparator;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-oncoprint/lib/components/PrecomputedComparator.js?");

/***/ }),

/***/ "./node_modules/react-oncoprint/lib/components/utils.js":
/*!**************************************************************!*\
  !*** ./node_modules/react-oncoprint/lib/components/utils.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getColor = exports.getDisplayName = exports.aggregate = exports.getSortedSamples = exports.createSortEventsForGeneComparator = exports.createSamplesMap = exports.isMutation = exports.getEventRatiosPerGene = exports.getSortedGenes = exports.getGeneNames = exports.SupportedEvents = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _PrecomputedComparator = _interopRequireDefault(__webpack_require__(/*! ./PrecomputedComparator */ \"./node_modules/react-oncoprint/lib/components/PrecomputedComparator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nvar MutationEventTypes = ['INFRAME', 'TRUNC', 'MISSENSE'];\nvar SupportedEvents = {\n  // Mutations\n  MISSENSE: {\n    colorHTML: '#008000',\n    displayName: 'Missense mutation'\n  },\n  INFRAME: {\n    colorHTML: '#993404',\n    displayName: 'Inframe mutation'\n  },\n  TRUNC: {\n    colorHTML: '#000000',\n    displayName: 'Truncation mutation'\n  },\n  // Fusion\n  FUSION: {\n    colorHTML: '#8b00c9',\n    displayName: 'Fusion'\n  },\n  // Copy number alterations\n  AMP: {\n    colorHTML: '#ff0000',\n    displayName: 'Amplification'\n  },\n  GAIN: {\n    colorHTML: '#ffb6c1',\n    displayName: 'Gain'\n  },\n  HETLOSS: {\n    colorHTML: '#8fd8d8',\n    displayName: 'Shallow deletion'\n  },\n  HOMDEL: {\n    colorHTML: '#0000ff',\n    displayName: 'Deep deletion'\n  },\n  // mRNA expressions\n  UP: {\n    colorHTML: '#ff9999',\n    displayName: 'mRNA Upregulation'\n  },\n  DOWN: {\n    colorHTML: '#6699cc',\n    displayName: 'mRNA Downregulation'\n  }\n}; // Describes the order of importance for CNA events.\n\nexports.SupportedEvents = SupportedEvents;\nvar AlterationsOrder = {\n  AMP: 0,\n  GAIN: 2,\n  HETLOSS: 3,\n  HOMDEL: 1,\n  undefined: 4\n}; // Describes the order of importance for mutation events.\n\nvar MutationsOrder = {\n  INFRAME: 1,\n  MISSENSE: 3,\n  TRUNC: 0,\n  undefined: 4\n}; // Describes the order of importance for mRNA expression events.\n\nvar ExpressionsOrder = {\n  UP: 0,\n  DOWN: 1,\n  undefined: 2\n}; // Retrieves the gene names in a set of events.\n\nvar getGeneNames = function getGeneNames(events) {\n  return events.map(function (e) {\n    return e.gene;\n  }).filter(function (gene) {\n    return gene !== null;\n  });\n}; // Returns the set of genes (unique) reversed to display on the Y axis.\n\n\nexports.getGeneNames = getGeneNames;\n\nvar getSortedGenes = function getSortedGenes(events) {\n  return _toConsumableArray(new Set(getGeneNames(events))).reverse();\n}; // Returns a hash map with the percentage of events (value) per gene (key).\n\n\nexports.getSortedGenes = getSortedGenes;\n\nvar getEventRatiosPerGene = function getEventRatiosPerGene(events, nbSamples) {\n  var map = events.reduce(function (acc, event) {\n    if (event.type) {\n      if (acc[event.gene]) {\n        acc[event.gene] += 1;\n      } else {\n        acc[event.gene] = 1;\n      }\n    }\n\n    return acc;\n  }, {});\n  Object.keys(map).forEach(function (gene) {\n    map[gene] = Math.floor(map[gene] / nbSamples * 100);\n  });\n  return map;\n}; // Returns true if an event is a mutation, false otherwise.\n\n\nexports.getEventRatiosPerGene = getEventRatiosPerGene;\n\nvar isMutation = function isMutation(event) {\n  return MutationEventTypes.includes(event.type);\n}; // Returns a comparator result value given an integer that may not be -1, 0 or\n// 1 (which are the only allowed sorting return values).\n\n\nexports.isMutation = isMutation;\n\nvar sign = function sign(x) {\n  if (x > 0) {\n    return 1;\n  } else if (x < 0) {\n    return -1;\n  }\n\n  return 0;\n}; // Returns a comparator for the samples (matrix column), combining all the\n// precomputed comparators created for each gene (i.e. matrix row).\n\n\nvar samplesComparator = function samplesComparator(genes, samplesToIndex, perGeneComparators) {\n  return function (s1, s2) {\n    var result = 0;\n    var absoluteResult = 0;\n\n    for (var i = 0; i < genes.length; i += 1) {\n      var nextResult = perGeneComparators[i].compare(s1, s2);\n      var nextAbsoluteResult = Math.abs(nextResult);\n\n      if (nextAbsoluteResult > absoluteResult) {\n        result = nextResult;\n        absoluteResult = nextAbsoluteResult;\n      }\n\n      if (absoluteResult === 1) {\n        break;\n      }\n    }\n\n    if (result === 0) {\n      result = samplesToIndex[s1] < samplesToIndex[s2] ? -1 : 1;\n    }\n\n    return result > 0 ? 1 : -1;\n  };\n}; // Returns a comparator to sort the samples given a gene .\n\n\nvar sortEventsForGene = function sortEventsForGene(s1, s2, gene, samplesMap) {\n  var d1 = samplesMap[s1][gene] || {};\n  var d2 = samplesMap[s2][gene] || {};\n\n  if (d1.FUSION && !d2.FUSION) {\n    return -1;\n  } else if (!d1.FUSION && d2.FUSION) {\n    return 1;\n  }\n\n  var cna = sign(AlterationsOrder[d1.CNA] - AlterationsOrder[d2.CNA]);\n\n  if (cna !== 0) {\n    return cna;\n  }\n\n  var mut = sign(MutationsOrder[d1.MUT] - MutationsOrder[d2.MUT]);\n\n  if (mut !== 0) {\n    return mut;\n  }\n\n  var exp = sign(ExpressionsOrder[d1.EXP] - ExpressionsOrder[d2.EXP]);\n\n  if (exp !== 0) {\n    return exp;\n  }\n\n  return 0;\n}; // Returns a map to gather information on each sample, per gene, per event.\n\n\nvar createSamplesMap = function createSamplesMap(events) {\n  var samplesMap = {};\n  events.forEach(function (e) {\n    var s = samplesMap[e.sample] || {};\n    var v = s[e.gene] || {};\n\n    if (isMutation(e)) {\n      v.MUT = e.type;\n    } else {\n      v[e.type] = e.alteration;\n    }\n\n    samplesMap[e.sample] = Object.assign({}, samplesMap[e.sample], _defineProperty({}, e.gene, v));\n  });\n  return samplesMap;\n}; // Helper function to create a comparator for each gene.\n\n\nexports.createSamplesMap = createSamplesMap;\n\nvar createSortEventsForGeneComparator = function createSortEventsForGeneComparator(gene, map) {\n  return function (s1, s2) {\n    return sortEventsForGene(s1, s2, gene, map);\n  };\n}; // Returns the list of samples sorted with mutual exclusion. The sorting\n// algorithm is similar to the one used on cBioPortal and takes both the rows\n// (genes) and columns (samples) into account. We returns the sorted set of\n// samples to display on X axix.\n\n\nexports.createSortEventsForGeneComparator = createSortEventsForGeneComparator;\n\nvar getSortedSamples = function getSortedSamples(events) {\n  // Get a map with samples sorted by gene and events.\n  var samplesMap = createSamplesMap(events); // Get a unique list of genes, sorted by the natural order in the events.\n\n  var genes = _toConsumableArray(new Set(getGeneNames(events))); // Sort the samples alphabetically.\n\n\n  var samples = _toConsumableArray(new Set(events.map(function (e) {\n    return e.sample;\n  }))).sort(); // Build one comparator per gene.\n\n\n  var perGeneComparators = [];\n  genes.forEach(function (gene) {\n    perGeneComparators.push( // This actually sorts the samples, but for each gene only.\n    new _PrecomputedComparator.default(_toConsumableArray(samples), createSortEventsForGeneComparator(gene, samplesMap)));\n  }); // Create a map with the current order of the samples.\n\n  var samplesToIndex = {};\n  samples.forEach(function (s, i) {\n    samplesToIndex[s] = i;\n  }); // Finally, sort the samples taking into account both the columns and rows.\n\n  var sortedSamples = _toConsumableArray(samples);\n\n  sortedSamples.sort(samplesComparator(genes, samplesToIndex, perGeneComparators));\n  return sortedSamples;\n}; // Returns the events aggregated by type (if mutation) or alteration.\n\n\nexports.getSortedSamples = getSortedSamples;\n\nvar aggregate = function aggregate(events) {\n  var out = {};\n  events.forEach(function (e) {\n    if (!e.type || e.type === 'NONE') {\n      return;\n    }\n\n    var k = isMutation(e) ? e.type : e.alteration;\n    var v = out[k] || {\n      type: e.type,\n      alteration: e.alteration,\n      events: []\n    };\n    v.events.push(e);\n    out[k] = v;\n  });\n  return out;\n}; // Returns the display name of an event.\n\n\nexports.aggregate = aggregate;\n\nvar getDisplayName = function getDisplayName(event) {\n  var eventName = isMutation(event) ? event.type : event.alteration;\n  return SupportedEvents[eventName].displayName;\n}; // Returns the color of an event.\n\n\nexports.getDisplayName = getDisplayName;\n\nvar getColor = function getColor(event, colorscale) {\n  var eventName = isMutation(event) ? event.type : event.alteration;\n  var color;\n\n  if (colorscale && _lodash.default.isObject(colorscale)) {\n    color = colorscale[eventName]; // Revert back to default scale if not found\n\n    if (!color) {\n      color = SupportedEvents[eventName].colorHTML;\n    }\n  } else {\n    color = SupportedEvents[eventName].colorHTML;\n  }\n\n  return color;\n};\n\nexports.getColor = getColor;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-oncoprint/lib/components/utils.js?");

/***/ }),

/***/ "./node_modules/react-oncoprint/lib/index.js":
/*!***************************************************!*\
  !*** ./node_modules/react-oncoprint/lib/index.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nObject.defineProperty(exports, \"OncoPrint\", {\n  enumerable: true,\n  get: function get() {\n    return _OncoPrint.default;\n  }\n});\n\nvar _OncoPrint = _interopRequireDefault(__webpack_require__(/*! ./components/OncoPrint */ \"./node_modules/react-oncoprint/lib/components/OncoPrint.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-oncoprint/lib/index.js?");

/***/ }),

/***/ "./node_modules/react-plotly.js/factory.js":
/*!*************************************************!*\
  !*** ./node_modules/react-plotly.js/factory.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nexports.default = plotComponentFactory;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// The naming convention is:\n//   - events are attached as `'plotly_' + eventName.toLowerCase()`\n//   - react props are `'on' + eventName`\nvar eventNames = ['AfterExport', 'AfterPlot', 'Animated', 'AnimatingFrame', 'AnimationInterrupted', 'AutoSize', 'BeforeExport', 'ButtonClicked', 'Click', 'ClickAnnotation', 'Deselect', 'DoubleClick', 'Framework', 'Hover', 'LegendClick', 'LegendDoubleClick', 'Relayout', 'Restyle', 'Redraw', 'Selected', 'Selecting', 'SliderChange', 'SliderEnd', 'SliderStart', 'Transitioning', 'TransitionInterrupted', 'Unhover'];\n\nvar updateEvents = ['plotly_restyle', 'plotly_redraw', 'plotly_relayout', 'plotly_doubleclick', 'plotly_animated'];\n\n// Check if a window is available since SSR (server-side rendering)\n// breaks unnecessarily if you try to use it server-side.\nvar isBrowser = typeof window !== 'undefined';\n\nfunction plotComponentFactory(Plotly) {\n  var PlotlyComponent = function (_Component) {\n    _inherits(PlotlyComponent, _Component);\n\n    function PlotlyComponent(props) {\n      _classCallCheck(this, PlotlyComponent);\n\n      var _this = _possibleConstructorReturn(this, (PlotlyComponent.__proto__ || Object.getPrototypeOf(PlotlyComponent)).call(this, props));\n\n      _this.p = Promise.resolve();\n      _this.resizeHandler = null;\n      _this.handlers = {};\n\n      _this.syncWindowResize = _this.syncWindowResize.bind(_this);\n      _this.syncEventHandlers = _this.syncEventHandlers.bind(_this);\n      _this.attachUpdateEvents = _this.attachUpdateEvents.bind(_this);\n      _this.getRef = _this.getRef.bind(_this);\n      _this.handleUpdate = _this.handleUpdate.bind(_this);\n      _this.figureCallback = _this.figureCallback.bind(_this);\n      return _this;\n    }\n\n    _createClass(PlotlyComponent, [{\n      key: 'componentDidMount',\n      value: function componentDidMount() {\n        var _this2 = this;\n\n        this.p = this.p.then(function () {\n          return Plotly.newPlot(_this2.el, {\n            data: _this2.props.data,\n            layout: _this2.props.layout,\n            config: _this2.props.config,\n            frames: _this2.props.frames\n          });\n        }).then(function () {\n          return _this2.syncWindowResize(null, true);\n        }).then(this.syncEventHandlers).then(this.attachUpdateEvents).then(function () {\n          return _this2.figureCallback(_this2.props.onInitialized);\n        }).catch(function (err) {\n          console.error('Error while plotting:', err);\n          return _this2.props.onError && _this2.props.onError(err);\n        });\n      }\n    }, {\n      key: 'componentWillUpdate',\n      value: function componentWillUpdate(nextProps) {\n        var _this3 = this;\n\n        if (nextProps.revision !== void 0 && nextProps.revision === this.props.revision) {\n          // if revision is set and unchanged, do nothing\n          return;\n        }\n\n        var numPrevFrames = this.props.frames && this.props.frames.length ? this.props.frames.length : 0;\n        var numNextFrames = nextProps.frames && nextProps.frames.length ? nextProps.frames.length : 0;\n        if (nextProps.layout === this.props.layout && nextProps.data === this.props.data && nextProps.config === this.props.config && numNextFrames === numPrevFrames) {\n          // prevent infinite loops when component is re-rendered after onUpdate\n          // frames *always* changes identity so fall back to check length only :(\n          return;\n        }\n\n        this.p = this.p.then(function () {\n          return Plotly.react(_this3.el, {\n            data: nextProps.data,\n            layout: nextProps.layout,\n            config: nextProps.config,\n            frames: nextProps.frames\n          });\n        }).then(function () {\n          return _this3.syncEventHandlers(nextProps);\n        }).then(function () {\n          return _this3.syncWindowResize(nextProps);\n        }).then(function () {\n          return _this3.figureCallback(nextProps.onUpdate);\n        }).catch(function (err) {\n          console.error('Error while plotting:', err);\n          _this3.props.onError && _this3.props.onError(err);\n        });\n      }\n    }, {\n      key: 'componentWillUnmount',\n      value: function componentWillUnmount() {\n        this.figureCallback(this.props.onPurge);\n\n        if (this.resizeHandler && isBrowser) {\n          window.removeEventListener('resize', this.resizeHandler);\n          this.resizeHandler = null;\n        }\n\n        this.removeUpdateEvents();\n\n        Plotly.purge(this.el);\n      }\n    }, {\n      key: 'attachUpdateEvents',\n      value: function attachUpdateEvents() {\n        if (!this.el || !this.el.removeListener) return;\n\n        for (var i = 0; i < updateEvents.length; i++) {\n          this.el.on(updateEvents[i], this.handleUpdate);\n        }\n      }\n    }, {\n      key: 'removeUpdateEvents',\n      value: function removeUpdateEvents() {\n        if (!this.el || !this.el.removeListener) return;\n\n        for (var i = 0; i < updateEvents.length; i++) {\n          this.el.removeListener(updateEvents[i], this.handleUpdate);\n        }\n      }\n    }, {\n      key: 'handleUpdate',\n      value: function handleUpdate() {\n        this.figureCallback(this.props.onUpdate);\n      }\n    }, {\n      key: 'figureCallback',\n      value: function figureCallback(callback) {\n        if (typeof callback === 'function') {\n          var _el = this.el,\n              data = _el.data,\n              layout = _el.layout;\n\n          var frames = this.el._transitionData ? this.el._transitionData._frames : null;\n          var figure = { data: data, layout: layout, frames: frames }; // for extra clarity!\n          callback(figure, this.el);\n        }\n      }\n    }, {\n      key: 'syncWindowResize',\n      value: function syncWindowResize(propsIn, invoke) {\n        var _this4 = this;\n\n        var props = propsIn || this.props;\n        if (!isBrowser) return;\n\n        if (props.useResizeHandler && !this.resizeHandler) {\n          this.resizeHandler = function () {\n            return Plotly.Plots.resize(_this4.el);\n          };\n          window.addEventListener('resize', this.resizeHandler);\n          if (invoke) {\n            this.resizeHandler();\n          }\n        } else if (!props.useResizeHandler && this.resizeHandler) {\n          window.removeEventListener('resize', this.resizeHandler);\n          this.resizeHandler = null;\n        }\n      }\n    }, {\n      key: 'getRef',\n      value: function getRef(el) {\n        this.el = el;\n\n        if (this.props.debug && isBrowser) {\n          window.gd = this.el;\n        }\n      }\n\n      // Attach and remove event handlers as they're added or removed from props:\n\n    }, {\n      key: 'syncEventHandlers',\n      value: function syncEventHandlers(propsIn) {\n        // Allow use of nextProps if passed explicitly:\n        var props = propsIn || this.props;\n\n        for (var i = 0; i < eventNames.length; i++) {\n          var eventName = eventNames[i];\n          var prop = props['on' + eventName];\n          var hasHandler = !!this.handlers[eventName];\n\n          if (prop && !hasHandler) {\n            this.handlers[eventName] = prop;\n            this.el.on('plotly_' + eventName.toLowerCase(), this.handlers[eventName]);\n          } else if (!prop && hasHandler) {\n            // Needs to be removed:\n            this.el.removeListener('plotly_' + eventName.toLowerCase(), this.handlers[eventName]);\n            delete this.handlers[eventName];\n          }\n        }\n      }\n    }, {\n      key: 'render',\n      value: function render() {\n        return _react2.default.createElement('div', {\n          id: this.props.divId,\n          style: this.props.style,\n          ref: this.getRef,\n          className: this.props.className\n        });\n      }\n    }]);\n\n    return PlotlyComponent;\n  }(_react.Component);\n\n  PlotlyComponent.propTypes = {\n    data: _propTypes2.default.arrayOf(_propTypes2.default.object),\n    config: _propTypes2.default.object,\n    layout: _propTypes2.default.object,\n    frames: _propTypes2.default.arrayOf(_propTypes2.default.object),\n    revision: _propTypes2.default.number,\n    onInitialized: _propTypes2.default.func,\n    onPurge: _propTypes2.default.func,\n    onError: _propTypes2.default.func,\n    onUpdate: _propTypes2.default.func,\n    debug: _propTypes2.default.bool,\n    style: _propTypes2.default.object,\n    className: _propTypes2.default.string,\n    useResizeHandler: _propTypes2.default.bool,\n    divId: _propTypes2.default.string\n  };\n\n  for (var i = 0; i < eventNames.length; i++) {\n    PlotlyComponent.propTypes['on' + eventNames[i]] = _propTypes2.default.func;\n  }\n\n  PlotlyComponent.defaultProps = {\n    debug: false,\n    useResizeHandler: false,\n    data: [],\n    style: { position: 'relative', display: 'inline-block' }\n  };\n\n  return PlotlyComponent;\n}\nmodule.exports = exports['default'];\n//# sourceMappingURL=factory.js.map\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-plotly.js/factory.js?");

/***/ }),

/***/ "./node_modules/react-plotly.js/react-plotly.js":
/*!******************************************************!*\
  !*** ./node_modules/react-plotly.js/react-plotly.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _factory = __webpack_require__(/*! ./factory */ \"./node_modules/react-plotly.js/factory.js\");\n\nvar _factory2 = _interopRequireDefault(_factory);\n\nvar _plotly = __webpack_require__(/*! plotly.js/dist/plotly */ \"./node_modules/plotly.js/dist/plotly.js\");\n\nvar _plotly2 = _interopRequireDefault(_plotly);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PlotComponent = (0, _factory2.default)(_plotly2.default);\n\nexports.default = PlotComponent;\nmodule.exports = exports['default'];\n//# sourceMappingURL=react-plotly.js.map\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-plotly.js/react-plotly.js?");

/***/ }),

/***/ "./node_modules/react-select/dist/react-select.esm.js":
/*!************************************************************!*\
  !*** ./node_modules/react-select/dist/react-select.esm.js ***!
  \************************************************************/
/*! exports provided: default, SelectBase, Async, makeAsyncSelect, AsyncCreatable, Creatable, makeCreatableSelect, createFilter, makeAnimated, components, mergeStyles, defaultTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectBase\", function() { return Select; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Async\", function() { return Async; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"makeAsyncSelect\", function() { return makeAsyncSelect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AsyncCreatable\", function() { return AsyncCreatable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Creatable\", function() { return Creatable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"makeCreatableSelect\", function() { return makeCreatableSelect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createFilter\", function() { return createFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"makeAnimated\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"components\", function() { return components; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mergeStyles\", function() { return mergeStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultTheme\", function() { return defaultTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var emotion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! emotion */ \"./node_modules/emotion/dist/index.esm.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! raf */ \"./node_modules/raf/index.js\");\n/* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_input_autosize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-input-autosize */ \"./node_modules/react-input-autosize/lib/AutosizeInput.js\");\n/* harmony import */ var react_input_autosize__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_input_autosize__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/index.js\");\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_transition_group__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\n\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n    return arr2;\n  }\n}\n\nfunction _iterableToArray(iter) {\n  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// ==============================\n// NO OP\n// ==============================\nvar noop = function noop() {};\n// Class Name Prefixer\n// ==============================\n\n/**\n String representation of component state for styling with class names.\n\n Expects an array of strings OR a string/object pair:\n - className(['comp', 'comp-arg', 'comp-arg-2'])\n   @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'\n - className('comp', { some: true, state: false })\n   @returns 'react-select__comp react-select__comp--some'\n*/\n\nfunction applyPrefixToName(prefix, name) {\n  if (!name) {\n    return prefix;\n  } else if (name[0] === '-') {\n    return prefix + name;\n  } else {\n    return prefix + '__' + name;\n  }\n}\n\nfunction classNames(prefix, cssKey, state, className) {\n  var arr = [cssKey, className];\n\n  if (state && prefix) {\n    for (var key in state) {\n      if (state.hasOwnProperty(key) && state[key]) {\n        arr.push(\"\".concat(applyPrefixToName(prefix, key)));\n      }\n    }\n  }\n\n  return arr.filter(function (i) {\n    return i;\n  }).map(function (i) {\n    return String(i).trim();\n  }).join(' ');\n} // ==============================\n// Clean Value\n// ==============================\n\nvar cleanValue = function cleanValue(value) {\n  if (Array.isArray(value)) return value.filter(Boolean);\n  if (_typeof(value) === 'object' && value !== null) return [value];\n  return [];\n}; // ==============================\n// Handle Input Change\n// ==============================\n\nfunction handleInputChange(inputValue, actionMeta, onInputChange) {\n  if (onInputChange) {\n    var newValue = onInputChange(inputValue, actionMeta);\n    if (typeof newValue === 'string') return newValue;\n  }\n\n  return inputValue;\n} // ==============================\n// Scroll Helpers\n// ==============================\n\nfunction isDocumentElement(el) {\n  return [document.documentElement, document.body, window].indexOf(el) > -1;\n} // Normalized Scroll Top\n// ------------------------------\n\nfunction getScrollTop(el) {\n  if (isDocumentElement(el)) {\n    return window.pageYOffset;\n  }\n\n  return el.scrollTop;\n}\nfunction scrollTo(el, top) {\n  // with a scroll distance, we perform scroll on the element\n  if (isDocumentElement(el)) {\n    window.scrollTo(0, top);\n    return;\n  }\n\n  el.scrollTop = top;\n} // Get Scroll Parent\n// ------------------------------\n\nfunction getScrollParent(element) {\n  var style = getComputedStyle(element);\n  var excludeStaticParent = style.position === 'absolute';\n  var overflowRx = /(auto|scroll)/;\n  var docEl = document.documentElement; // suck it, flow...\n\n  if (style.position === 'fixed') return docEl;\n\n  for (var parent = element; parent = parent.parentElement;) {\n    style = getComputedStyle(parent);\n\n    if (excludeStaticParent && style.position === 'static') {\n      continue;\n    }\n\n    if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {\n      return parent;\n    }\n  }\n\n  return docEl;\n} // Animated Scroll To\n// ------------------------------\n\n/**\n  @param t: time (elapsed)\n  @param b: initial value\n  @param c: amount of change\n  @param d: duration\n*/\n\nfunction easeOutCubic(t, b, c, d) {\n  return c * ((t = t / d - 1) * t * t + 1) + b;\n}\n\nfunction animatedScrollTo(element, to) {\n  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n  var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n  var start = getScrollTop(element);\n  var change = to - start;\n  var increment = 10;\n  var currentTime = 0;\n\n  function animateScroll() {\n    currentTime += increment;\n    var val = easeOutCubic(currentTime, start, change, duration);\n    scrollTo(element, val);\n\n    if (currentTime < duration) {\n      raf__WEBPACK_IMPORTED_MODULE_5___default()(animateScroll);\n    } else {\n      callback(element);\n    }\n  }\n\n  animateScroll();\n} // Scroll Into View\n// ------------------------------\n\nfunction scrollIntoView(menuEl, focusedEl) {\n  var menuRect = menuEl.getBoundingClientRect();\n  var focusedRect = focusedEl.getBoundingClientRect();\n  var overScroll = focusedEl.offsetHeight / 3;\n\n  if (focusedRect.bottom + overScroll > menuRect.bottom) {\n    scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));\n  } else if (focusedRect.top - overScroll < menuRect.top) {\n    scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));\n  }\n} // ==============================\n// Get bounding client object\n// ==============================\n// cannot get keys using array notation with DOMRect\n\nfunction getBoundingClientObj(element) {\n  var rect = element.getBoundingClientRect();\n  return {\n    bottom: rect.bottom,\n    height: rect.height,\n    left: rect.left,\n    right: rect.right,\n    top: rect.top,\n    width: rect.width\n  };\n}\n// Touch Capability Detector\n// ==============================\n\nfunction isTouchCapable() {\n  try {\n    document.createEvent('TouchEvent');\n    return true;\n  } catch (e) {\n    return false;\n  }\n} // ==============================\n// Mobile Device Detector\n// ==============================\n\nfunction isMobileDevice() {\n  try {\n    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction getMenuPlacement(_ref) {\n  var maxHeight = _ref.maxHeight,\n      menuEl = _ref.menuEl,\n      minHeight = _ref.minHeight,\n      placement = _ref.placement,\n      shouldScroll = _ref.shouldScroll,\n      isFixedPosition = _ref.isFixedPosition,\n      theme = _ref.theme;\n  var spacing = theme.spacing;\n  var scrollParent = getScrollParent(menuEl);\n  var defaultState = {\n    placement: 'bottom',\n    maxHeight: maxHeight\n  }; // something went wrong, return default state\n\n  if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when\n  // the menu is rendered\n\n  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),\n      scrollHeight = _scrollParent$getBoun.height;\n\n  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),\n      menuBottom = _menuEl$getBoundingCl.bottom,\n      menuHeight = _menuEl$getBoundingCl.height,\n      menuTop = _menuEl$getBoundingCl.top;\n\n  var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),\n      containerTop = _menuEl$offsetParent$.top;\n\n  var viewHeight = window.innerHeight;\n  var scrollTop = getScrollTop(scrollParent);\n  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);\n  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);\n  var viewSpaceAbove = containerTop - marginTop;\n  var viewSpaceBelow = viewHeight - menuTop;\n  var scrollSpaceAbove = viewSpaceAbove + scrollTop;\n  var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;\n  var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;\n  var scrollUp = scrollTop + menuTop - marginTop;\n  var scrollDuration = 160;\n\n  switch (placement) {\n    case 'auto':\n    case 'bottom':\n      // 1: the menu will fit, do nothing\n      if (viewSpaceBelow >= menuHeight) {\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      } // 2: the menu will fit, if scrolled\n\n\n      if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {\n        if (shouldScroll) {\n          animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n        }\n\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      } // 3: the menu will fit, if constrained\n\n\n      if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {\n        if (shouldScroll) {\n          animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n        } // we want to provide as much of the menu as possible to the user,\n        // so give them whatever is available below rather than the minHeight.\n\n\n        var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;\n        return {\n          placement: 'bottom',\n          maxHeight: constrainedHeight\n        };\n      } // 4. Forked beviour when there isn't enough space below\n      // AUTO: flip the menu, render above\n\n\n      if (placement === 'auto' || isFixedPosition) {\n        // may need to be constrained after flipping\n        var _constrainedHeight = maxHeight;\n        var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;\n\n        if (spaceAbove >= minHeight) {\n          _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: _constrainedHeight\n        };\n      } // BOTTOM: allow browser to increase scrollable area and immediately set scroll\n\n\n      if (placement === 'bottom') {\n        scrollTo(scrollParent, scrollDown);\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      }\n\n      break;\n\n    case 'top':\n      // 1: the menu will fit, do nothing\n      if (viewSpaceAbove >= menuHeight) {\n        return {\n          placement: 'top',\n          maxHeight: maxHeight\n        };\n      } // 2: the menu will fit, if scrolled\n\n\n      if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {\n        if (shouldScroll) {\n          animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: maxHeight\n        };\n      } // 3: the menu will fit, if constrained\n\n\n      if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n        var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,\n        // so give them whatever is available below rather than the minHeight.\n\n        if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n          _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;\n        }\n\n        if (shouldScroll) {\n          animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: _constrainedHeight2\n        };\n      } // 4. not enough space, the browser WILL NOT increase scrollable area when\n      // absolutely positioned element rendered above the viewport (only below).\n      // Flip the menu, render below\n\n\n      return {\n        placement: 'bottom',\n        maxHeight: maxHeight\n      };\n\n    default:\n      throw new Error(\"Invalid placement provided \\\"\".concat(placement, \"\\\".\"));\n  } // fulfil contract with flow: implicit return value of undefined\n\n\n  return defaultState;\n} // Menu Component\n// ------------------------------\n\nfunction alignToControl(placement) {\n  var placementToCSSProp = {\n    bottom: 'top',\n    top: 'bottom'\n  };\n  return placement ? placementToCSSProp[placement] : 'bottom';\n}\n\nvar coercePlacement = function coercePlacement(p) {\n  return p === 'auto' ? 'bottom' : p;\n};\n\nvar menuCSS = function menuCSS(_ref2) {\n  var _ref3;\n\n  var placement = _ref2.placement,\n      _ref2$theme = _ref2.theme,\n      borderRadius = _ref2$theme.borderRadius,\n      spacing = _ref2$theme.spacing,\n      colors = _ref2$theme.colors;\n  return _ref3 = {\n    label: 'menu'\n  }, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, \"backgroundColor\", colors.neutral0), _defineProperty(_ref3, \"borderRadius\", borderRadius), _defineProperty(_ref3, \"boxShadow\", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, \"marginBottom\", spacing.menuGutter), _defineProperty(_ref3, \"marginTop\", spacing.menuGutter), _defineProperty(_ref3, \"position\", 'absolute'), _defineProperty(_ref3, \"width\", '100%'), _defineProperty(_ref3, \"zIndex\", 1), _ref3;\n}; // NOTE: internal only\n\nvar MenuPlacer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(MenuPlacer, _Component);\n\n  function MenuPlacer() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, MenuPlacer);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n      maxHeight: _this.props.maxMenuHeight,\n      placement: null\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPlacement\", function (ref) {\n      var _this$props = _this.props,\n          minMenuHeight = _this$props.minMenuHeight,\n          maxMenuHeight = _this$props.maxMenuHeight,\n          menuPlacement = _this$props.menuPlacement,\n          menuPosition = _this$props.menuPosition,\n          menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,\n          theme = _this$props.theme;\n      var getPortalPlacement = _this.context.getPortalPlacement;\n      if (!ref) return; // DO NOT scroll if position is fixed\n\n      var isFixedPosition = menuPosition === 'fixed';\n      var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;\n      var state = getMenuPlacement({\n        maxHeight: maxMenuHeight,\n        menuEl: ref,\n        minHeight: minMenuHeight,\n        placement: menuPlacement,\n        shouldScroll: shouldScroll,\n        isFixedPosition: isFixedPosition,\n        theme: theme\n      });\n      if (getPortalPlacement) getPortalPlacement(state);\n\n      _this.setState(state);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getUpdatedProps\", function () {\n      var menuPlacement = _this.props.menuPlacement;\n      var placement = _this.state.placement || coercePlacement(menuPlacement);\n      return _objectSpread({}, _this.props, {\n        placement: placement,\n        maxHeight: _this.state.maxHeight\n      });\n    });\n\n    return _this;\n  }\n\n  _createClass(MenuPlacer, [{\n    key: \"render\",\n    value: function render() {\n      var children = this.props.children;\n      return children({\n        ref: this.getPlacement,\n        placerProps: this.getUpdatedProps()\n      });\n    }\n  }]);\n\n  return MenuPlacer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(MenuPlacer, \"contextTypes\", {\n  getPortalPlacement: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n});\n\nvar Menu = function Menu(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerRef = props.innerRef,\n      innerProps = props.innerProps;\n  var cn = cx(\n  /*#__PURE__*/\n  Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menu', props)), {\n    menu: true\n  }, className);\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cn\n  }, innerProps, {\n    ref: innerRef\n  }), children);\n};\n// Menu List\n// ==============================\n\nvar menuListCSS = function menuListCSS(_ref4) {\n  var maxHeight = _ref4.maxHeight,\n      baseUnit = _ref4.theme.spacing.baseUnit;\n  return {\n    maxHeight: maxHeight,\n    overflowY: 'auto',\n    paddingBottom: baseUnit,\n    paddingTop: baseUnit,\n    position: 'relative',\n    // required for offset[Height, Top] > keyboard scroll\n    WebkitOverflowScrolling: 'touch'\n  };\n};\nvar MenuList = function MenuList(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      isMulti = props.isMulti,\n      innerRef = props.innerRef;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menuList', props)), {\n      'menu-list': true,\n      'menu-list--is-multi': isMulti\n    }, className),\n    ref: innerRef\n  }, children);\n}; // ==============================\n// Menu Notices\n// ==============================\n\nvar noticeCSS = function noticeCSS(_ref5) {\n  var _ref5$theme = _ref5.theme,\n      baseUnit = _ref5$theme.spacing.baseUnit,\n      colors = _ref5$theme.colors;\n  return {\n    color: colors.neutral40,\n    padding: \"\".concat(baseUnit * 2, \"px \").concat(baseUnit * 3, \"px\"),\n    textAlign: 'center'\n  };\n};\n\nvar noOptionsMessageCSS = noticeCSS;\nvar loadingMessageCSS = noticeCSS;\nvar NoOptionsMessage = function NoOptionsMessage(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('noOptionsMessage', props)), {\n      'menu-notice': true,\n      'menu-notice--no-options': true\n    }, className)\n  }, innerProps), children);\n};\nNoOptionsMessage.defaultProps = {\n  children: 'No options'\n};\nvar LoadingMessage = function LoadingMessage(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('loadingMessage', props)), {\n      'menu-notice': true,\n      'menu-notice--loading': true\n    }, className)\n  }, innerProps), children);\n};\nLoadingMessage.defaultProps = {\n  children: 'Loading...'\n}; // ==============================\n// Menu Portal\n// ==============================\n\nvar menuPortalCSS = function menuPortalCSS(_ref6) {\n  var rect = _ref6.rect,\n      offset = _ref6.offset,\n      position = _ref6.position;\n  return {\n    left: rect.left,\n    position: position,\n    top: offset,\n    width: rect.width,\n    zIndex: 1\n  };\n};\nvar MenuPortal =\n/*#__PURE__*/\nfunction (_Component2) {\n  _inherits(MenuPortal, _Component2);\n\n  function MenuPortal() {\n    var _getPrototypeOf3;\n\n    var _this2;\n\n    _classCallCheck(this, MenuPortal);\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), \"state\", {\n      placement: null\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), \"getPortalPlacement\", function (_ref7) {\n      var placement = _ref7.placement;\n      var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed\n\n      if (placement !== initialPlacement) {\n        _this2.setState({\n          placement: placement\n        });\n      }\n    });\n\n    return _this2;\n  }\n\n  _createClass(MenuPortal, [{\n    key: \"getChildContext\",\n    value: function getChildContext() {\n      return {\n        getPortalPlacement: this.getPortalPlacement\n      };\n    } // callback for occassions where the menu must \"flip\"\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props2 = this.props,\n          appendTo = _this$props2.appendTo,\n          children = _this$props2.children,\n          controlElement = _this$props2.controlElement,\n          menuPlacement = _this$props2.menuPlacement,\n          position = _this$props2.menuPosition,\n          getStyles = _this$props2.getStyles;\n      var isFixed = position === 'fixed'; // bail early if required elements aren't present\n\n      if (!appendTo && !isFixed || !controlElement) {\n        return null;\n      }\n\n      var placement = this.state.placement || coercePlacement(menuPlacement);\n      var rect = getBoundingClientObj(controlElement);\n      var scrollDistance = isFixed ? 0 : window.pageYOffset;\n      var offset = rect[placement] + scrollDistance;\n      var state = {\n        offset: offset,\n        position: position,\n        rect: rect\n      }; // same wrapper element whether fixed or portalled\n\n      var menuWrapper = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        className:\n        /*#__PURE__*/\n\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menuPortal', state))\n      }, children);\n      return appendTo ? Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"createPortal\"])(menuWrapper, appendTo) : menuWrapper;\n    }\n  }]);\n\n  return MenuPortal;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(MenuPortal, \"childContextTypes\", {\n  getPortalPlacement: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n});\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nfunction equal(a, b) {\n  // fast-deep-equal index.js 2.0.1\n  if (a === b) return true;\n\n  if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {\n    var arrA = isArray(a),\n        arrB = isArray(b),\n        i,\n        length,\n        key;\n\n    if (arrA && arrB) {\n      length = a.length;\n      if (length != b.length) return false;\n\n      for (i = length; i-- !== 0;) {\n        if (!equal(a[i], b[i])) return false;\n      }\n\n      return true;\n    }\n\n    if (arrA != arrB) return false;\n    var dateA = a instanceof Date,\n        dateB = b instanceof Date;\n    if (dateA != dateB) return false;\n    if (dateA && dateB) return a.getTime() == b.getTime();\n    var regexpA = a instanceof RegExp,\n        regexpB = b instanceof RegExp;\n    if (regexpA != regexpB) return false;\n    if (regexpA && regexpB) return a.toString() == b.toString();\n    var keys = keyList(a);\n    length = keys.length;\n\n    if (length !== keyList(b).length) {\n      return false;\n    }\n\n    for (i = length; i-- !== 0;) {\n      if (!hasProp.call(b, keys[i])) return false;\n    } // end fast-deep-equal\n    // Custom handling for React\n\n\n    for (i = length; i-- !== 0;) {\n      key = keys[i];\n\n      if (key === '_owner' && a.$$typeof) {\n        // React-specific: avoid traversing React elements' _owner.\n        //  _owner contains circular references\n        // and is not needed when comparing the actual elements (and not their owners)\n        // .$$typeof and ._store on just reasonable markers of a react element\n        continue;\n      } else {\n        // all other properties should be traversed as usual\n        if (!equal(a[key], b[key])) return false;\n      }\n    } // fast-deep-equal index.js 2.0.1\n\n\n    return true;\n  }\n\n  return a !== a && b !== b;\n} // end fast-deep-equal\n\n\nfunction exportedEqual(a, b) {\n  try {\n    return equal(a, b);\n  } catch (error) {\n    if (error.message && error.message.match(/stack|recursion/i)) {\n      // warn on circular references, don't crash\n      // browsers give this different errors name and messages:\n      // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n      // firefox: \"InternalError\", too much recursion\"\n      // edge: \"Error\", \"Out of stack space\"\n      console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n      return false;\n    } // some other error. we should definitely know about these\n\n\n    throw error;\n  }\n}\n\nvar diacritics = [{\n  base: 'A',\n  letters: /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g\n}, {\n  base: 'AA',\n  letters: /[\\uA732]/g\n}, {\n  base: 'AE',\n  letters: /[\\u00C6\\u01FC\\u01E2]/g\n}, {\n  base: 'AO',\n  letters: /[\\uA734]/g\n}, {\n  base: 'AU',\n  letters: /[\\uA736]/g\n}, {\n  base: 'AV',\n  letters: /[\\uA738\\uA73A]/g\n}, {\n  base: 'AY',\n  letters: /[\\uA73C]/g\n}, {\n  base: 'B',\n  letters: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g\n}, {\n  base: 'C',\n  letters: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g\n}, {\n  base: 'D',\n  letters: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g\n}, {\n  base: 'DZ',\n  letters: /[\\u01F1\\u01C4]/g\n}, {\n  base: 'Dz',\n  letters: /[\\u01F2\\u01C5]/g\n}, {\n  base: 'E',\n  letters: /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g\n}, {\n  base: 'F',\n  letters: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g\n}, {\n  base: 'G',\n  letters: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g\n}, {\n  base: 'H',\n  letters: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g\n}, {\n  base: 'I',\n  letters: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g\n}, {\n  base: 'J',\n  letters: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g\n}, {\n  base: 'K',\n  letters: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g\n}, {\n  base: 'L',\n  letters: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g\n}, {\n  base: 'LJ',\n  letters: /[\\u01C7]/g\n}, {\n  base: 'Lj',\n  letters: /[\\u01C8]/g\n}, {\n  base: 'M',\n  letters: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g\n}, {\n  base: 'N',\n  letters: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g\n}, {\n  base: 'NJ',\n  letters: /[\\u01CA]/g\n}, {\n  base: 'Nj',\n  letters: /[\\u01CB]/g\n}, {\n  base: 'O',\n  letters: /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g\n}, {\n  base: 'OI',\n  letters: /[\\u01A2]/g\n}, {\n  base: 'OO',\n  letters: /[\\uA74E]/g\n}, {\n  base: 'OU',\n  letters: /[\\u0222]/g\n}, {\n  base: 'P',\n  letters: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g\n}, {\n  base: 'Q',\n  letters: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g\n}, {\n  base: 'R',\n  letters: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g\n}, {\n  base: 'S',\n  letters: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g\n}, {\n  base: 'T',\n  letters: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g\n}, {\n  base: 'TZ',\n  letters: /[\\uA728]/g\n}, {\n  base: 'U',\n  letters: /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g\n}, {\n  base: 'V',\n  letters: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g\n}, {\n  base: 'VY',\n  letters: /[\\uA760]/g\n}, {\n  base: 'W',\n  letters: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g\n}, {\n  base: 'X',\n  letters: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g\n}, {\n  base: 'Y',\n  letters: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g\n}, {\n  base: 'Z',\n  letters: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g\n}, {\n  base: 'a',\n  letters: /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g\n}, {\n  base: 'aa',\n  letters: /[\\uA733]/g\n}, {\n  base: 'ae',\n  letters: /[\\u00E6\\u01FD\\u01E3]/g\n}, {\n  base: 'ao',\n  letters: /[\\uA735]/g\n}, {\n  base: 'au',\n  letters: /[\\uA737]/g\n}, {\n  base: 'av',\n  letters: /[\\uA739\\uA73B]/g\n}, {\n  base: 'ay',\n  letters: /[\\uA73D]/g\n}, {\n  base: 'b',\n  letters: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g\n}, {\n  base: 'c',\n  letters: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g\n}, {\n  base: 'd',\n  letters: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g\n}, {\n  base: 'dz',\n  letters: /[\\u01F3\\u01C6]/g\n}, {\n  base: 'e',\n  letters: /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g\n}, {\n  base: 'f',\n  letters: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g\n}, {\n  base: 'g',\n  letters: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g\n}, {\n  base: 'h',\n  letters: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g\n}, {\n  base: 'hv',\n  letters: /[\\u0195]/g\n}, {\n  base: 'i',\n  letters: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g\n}, {\n  base: 'j',\n  letters: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g\n}, {\n  base: 'k',\n  letters: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g\n}, {\n  base: 'l',\n  letters: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g\n}, {\n  base: 'lj',\n  letters: /[\\u01C9]/g\n}, {\n  base: 'm',\n  letters: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g\n}, {\n  base: 'n',\n  letters: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g\n}, {\n  base: 'nj',\n  letters: /[\\u01CC]/g\n}, {\n  base: 'o',\n  letters: /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g\n}, {\n  base: 'oi',\n  letters: /[\\u01A3]/g\n}, {\n  base: 'ou',\n  letters: /[\\u0223]/g\n}, {\n  base: 'oo',\n  letters: /[\\uA74F]/g\n}, {\n  base: 'p',\n  letters: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g\n}, {\n  base: 'q',\n  letters: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g\n}, {\n  base: 'r',\n  letters: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g\n}, {\n  base: 's',\n  letters: /[\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g\n}, {\n  base: 't',\n  letters: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g\n}, {\n  base: 'tz',\n  letters: /[\\uA729]/g\n}, {\n  base: 'u',\n  letters: /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g\n}, {\n  base: 'v',\n  letters: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g\n}, {\n  base: 'vy',\n  letters: /[\\uA761]/g\n}, {\n  base: 'w',\n  letters: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g\n}, {\n  base: 'x',\n  letters: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g\n}, {\n  base: 'y',\n  letters: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g\n}, {\n  base: 'z',\n  letters: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\n}];\nvar stripDiacritics = function stripDiacritics(str) {\n  for (var i = 0; i < diacritics.length; i++) {\n    str = str.replace(diacritics[i].letters, diacritics[i].base);\n  }\n\n  return str;\n};\n\nvar trimString = function trimString(str) {\n  return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar defaultStringify = function defaultStringify(option) {\n  return \"\".concat(option.label, \" \").concat(option.value);\n};\n\nvar createFilter = function createFilter(config) {\n  return function (option, rawInput) {\n    var _ignoreCase$ignoreAcc = _objectSpread({\n      ignoreCase: true,\n      ignoreAccents: true,\n      stringify: defaultStringify,\n      trim: true,\n      matchFrom: 'any'\n    }, config),\n        ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n        ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n        stringify = _ignoreCase$ignoreAcc.stringify,\n        trim = _ignoreCase$ignoreAcc.trim,\n        matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n    var input = trim ? trimString(rawInput) : rawInput;\n    var candidate = trim ? trimString(stringify(option)) : stringify(option);\n\n    if (ignoreCase) {\n      input = input.toLowerCase();\n      candidate = candidate.toLowerCase();\n    }\n\n    if (ignoreAccents) {\n      input = stripDiacritics(input);\n      candidate = stripDiacritics(candidate);\n    }\n\n    return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n  };\n};\n\nvar A11yText = function A11yText(props) {\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", _extends({\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n      label: 'a11yText',\n      zIndex: 9999,\n      border: 0,\n      clip: 'rect(1px, 1px, 1px, 1px)',\n      height: 1,\n      width: 1,\n      position: 'absolute',\n      overflow: 'hidden',\n      padding: 0,\n      whiteSpace: 'nowrap',\n      backgroundColor: 'red',\n      color: 'blue'\n    })\n  }, props));\n};\n\nvar DummyInput =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(DummyInput, _Component);\n\n  function DummyInput() {\n    _classCallCheck(this, DummyInput);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(DummyInput).apply(this, arguments));\n  }\n\n  _createClass(DummyInput, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          inProp = _this$props.in,\n          out = _this$props.out,\n          onExited = _this$props.onExited,\n          appear = _this$props.appear,\n          enter = _this$props.enter,\n          exit = _this$props.exit,\n          innerRef = _this$props.innerRef,\n          emotion = _this$props.emotion,\n          props = _objectWithoutProperties(_this$props, [\"in\", \"out\", \"onExited\", \"appear\", \"enter\", \"exit\", \"innerRef\", \"emotion\"]);\n\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", _extends({\n        ref: innerRef\n      }, props, {\n        className:\n        /*#__PURE__*/\n\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n          label: 'dummyInput',\n          // get rid of any default styles\n          background: 0,\n          border: 0,\n          fontSize: 'inherit',\n          outline: 0,\n          padding: 0,\n          // important! without `width` browsers won't allow focus\n          width: 1,\n          // remove cursor on desktop\n          color: 'transparent',\n          // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n          left: -100,\n          opacity: 0,\n          position: 'relative',\n          transform: 'scale(0)'\n        })\n      }));\n    }\n  }]);\n\n  return DummyInput;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\nvar NodeResolver =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(NodeResolver, _Component);\n\n  function NodeResolver() {\n    _classCallCheck(this, NodeResolver);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments));\n  }\n\n  _createClass(NodeResolver, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.props.innerRef(Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"findDOMNode\"])(this));\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      this.props.innerRef(null);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return this.props.children;\n    }\n  }]);\n\n  return NodeResolver;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\nvar LOCK_STYLES = {\n  boxSizing: 'border-box',\n  // account for possible declaration `width: 100%;` on body\n  overflow: 'hidden',\n  position: 'relative',\n  height: '100%'\n};\n\nfunction preventTouchMove(e) {\n  e.preventDefault();\n}\nfunction allowTouchMove(e) {\n  e.stopPropagation();\n}\nfunction preventInertiaScroll() {\n  var top = this.scrollTop;\n  var totalScroll = this.scrollHeight;\n  var currentScroll = top + this.offsetHeight;\n\n  if (top === 0) {\n    this.scrollTop = 1;\n  } else if (currentScroll === totalScroll) {\n    this.scrollTop = top - 1;\n  }\n} // `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\n\nfunction isTouchDevice() {\n  return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar activeScrollLocks = 0;\n\nvar ScrollLock =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(ScrollLock, _Component);\n\n  function ScrollLock() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, ScrollLock);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"originalStyles\", {});\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"listenerOptions\", {\n      capture: false,\n      passive: false\n    });\n\n    return _this;\n  }\n\n  _createClass(ScrollLock, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var _this2 = this;\n\n      if (!canUseDOM) return;\n      var _this$props = this.props,\n          accountForScrollbars = _this$props.accountForScrollbars,\n          touchScrollTarget = _this$props.touchScrollTarget;\n      var target = document.body;\n      var targetStyle = target && target.style;\n\n      if (accountForScrollbars) {\n        // store any styles already applied to the body\n        STYLE_KEYS.forEach(function (key) {\n          var val = targetStyle && targetStyle[key];\n          _this2.originalStyles[key] = val;\n        });\n      } // apply the lock styles and padding if this is the first scroll lock\n\n\n      if (accountForScrollbars && activeScrollLocks < 1) {\n        var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0;\n        var clientWidth = document.body ? document.body.clientWidth : 0;\n        var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n        Object.keys(LOCK_STYLES).forEach(function (key) {\n          var val = LOCK_STYLES[key];\n\n          if (targetStyle) {\n            targetStyle[key] = val;\n          }\n        });\n\n        if (targetStyle) {\n          targetStyle.paddingRight = \"\".concat(adjustedPadding, \"px\");\n        }\n      } // account for touch devices\n\n\n      if (target && isTouchDevice()) {\n        // Mobile Safari ignores { overflow: hidden } declaration on the body.\n        target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target\n\n        if (touchScrollTarget) {\n          touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n          touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions);\n        }\n      } // increment active scroll locks\n\n\n      activeScrollLocks += 1;\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      var _this3 = this;\n\n      if (!canUseDOM) return;\n      var _this$props2 = this.props,\n          accountForScrollbars = _this$props2.accountForScrollbars,\n          touchScrollTarget = _this$props2.touchScrollTarget;\n      var target = document.body;\n      var targetStyle = target && target.style; // safely decrement active scroll locks\n\n      activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any\n\n      if (accountForScrollbars && activeScrollLocks < 1) {\n        STYLE_KEYS.forEach(function (key) {\n          var val = _this3.originalStyles[key];\n\n          if (targetStyle) {\n            targetStyle[key] = val;\n          }\n        });\n      } // remove touch listeners\n\n\n      if (target && isTouchDevice()) {\n        target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions);\n\n        if (touchScrollTarget) {\n          touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n          touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions);\n        }\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return null;\n    }\n  }]);\n\n  return ScrollLock;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(ScrollLock, \"defaultProps\", {\n  accountForScrollbars: true\n});\n\n// NOTE:\n// We shouldn't need this after updating to React v16.3.0, which introduces:\n// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref\n// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref\nvar ScrollBlock =\n/*#__PURE__*/\nfunction (_PureComponent) {\n  _inherits(ScrollBlock, _PureComponent);\n\n  function ScrollBlock() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, ScrollBlock);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n      touchScrollTarget: null\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getScrollTarget\", function (ref) {\n      if (ref === _this.state.touchScrollTarget) return;\n\n      _this.setState({\n        touchScrollTarget: ref\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"blurSelectInput\", function () {\n      if (document.activeElement) {\n        document.activeElement.blur();\n      }\n    });\n\n    return _this;\n  }\n\n  _createClass(ScrollBlock, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          children = _this$props.children,\n          isEnabled = _this$props.isEnabled;\n      var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled\n\n      if (!isEnabled) return children;\n      /*\n       * Div\n       * ------------------------------\n       * blocks scrolling on non-body elements behind the menu\n        * NodeResolver\n       * ------------------------------\n       * we need a reference to the scrollable element to \"unlock\" scroll on\n       * mobile devices\n        * ScrollLock\n       * ------------------------------\n       * actually does the scroll locking\n       */\n\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        onClick: this.blurSelectInput,\n        className:\n        /*#__PURE__*/\n\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n          position: 'fixed',\n          left: 0,\n          bottom: 0,\n          right: 0,\n          top: 0\n        })\n      }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NodeResolver, {\n        innerRef: this.getScrollTarget\n      }, children), touchScrollTarget ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScrollLock, {\n        touchScrollTarget: touchScrollTarget\n      }) : null);\n    }\n  }]);\n\n  return ScrollBlock;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"PureComponent\"]);\n\nvar ScrollCaptor =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(ScrollCaptor, _Component);\n\n  function ScrollCaptor() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, ScrollCaptor);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"isBottom\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"isTop\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"scrollTarget\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"touchStart\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"cancelScroll\", function (event) {\n      event.preventDefault();\n      event.stopPropagation();\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleEventDelta\", function (event, delta) {\n      var _this$props = _this.props,\n          onBottomArrive = _this$props.onBottomArrive,\n          onBottomLeave = _this$props.onBottomLeave,\n          onTopArrive = _this$props.onTopArrive,\n          onTopLeave = _this$props.onTopLeave;\n      var _this$scrollTarget = _this.scrollTarget,\n          scrollTop = _this$scrollTarget.scrollTop,\n          scrollHeight = _this$scrollTarget.scrollHeight,\n          clientHeight = _this$scrollTarget.clientHeight;\n      var target = _this.scrollTarget;\n      var isDeltaPositive = delta > 0;\n      var availableScroll = scrollHeight - clientHeight - scrollTop;\n      var shouldCancelScroll = false; // reset bottom/top flags\n\n      if (availableScroll > delta && _this.isBottom) {\n        if (onBottomLeave) onBottomLeave(event);\n        _this.isBottom = false;\n      }\n\n      if (isDeltaPositive && _this.isTop) {\n        if (onTopLeave) onTopLeave(event);\n        _this.isTop = false;\n      } // bottom limit\n\n\n      if (isDeltaPositive && delta > availableScroll) {\n        if (onBottomArrive && !_this.isBottom) {\n          onBottomArrive(event);\n        }\n\n        target.scrollTop = scrollHeight;\n        shouldCancelScroll = true;\n        _this.isBottom = true; // top limit\n      } else if (!isDeltaPositive && -delta > scrollTop) {\n        if (onTopArrive && !_this.isTop) {\n          onTopArrive(event);\n        }\n\n        target.scrollTop = 0;\n        shouldCancelScroll = true;\n        _this.isTop = true;\n      } // cancel scroll\n\n\n      if (shouldCancelScroll) {\n        _this.cancelScroll(event);\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onWheel\", function (event) {\n      _this.handleEventDelta(event, event.deltaY);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onTouchStart\", function (event) {\n      // set touch start so we can calculate touchmove delta\n      _this.touchStart = event.changedTouches[0].clientY;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onTouchMove\", function (event) {\n      var deltaY = _this.touchStart - event.changedTouches[0].clientY;\n\n      _this.handleEventDelta(event, deltaY);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getScrollTarget\", function (ref) {\n      _this.scrollTarget = ref;\n    });\n\n    return _this;\n  }\n\n  _createClass(ScrollCaptor, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.startListening(this.scrollTarget);\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      this.stopListening(this.scrollTarget);\n    }\n  }, {\n    key: \"startListening\",\n    value: function startListening(el) {\n      // bail early if no scroll available\n      if (!el) return;\n      if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢\n\n      if (typeof el.addEventListener === 'function') {\n        el.addEventListener('wheel', this.onWheel, false);\n      }\n\n      if (typeof el.addEventListener === 'function') {\n        el.addEventListener('touchstart', this.onTouchStart, false);\n      }\n\n      if (typeof el.addEventListener === 'function') {\n        el.addEventListener('touchmove', this.onTouchMove, false);\n      }\n    }\n  }, {\n    key: \"stopListening\",\n    value: function stopListening(el) {\n      // bail early if no scroll available\n      if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢\n\n      if (typeof el.removeEventListener === 'function') {\n        el.removeEventListener('wheel', this.onWheel, false);\n      }\n\n      if (typeof el.removeEventListener === 'function') {\n        el.removeEventListener('touchstart', this.onTouchStart, false);\n      }\n\n      if (typeof el.removeEventListener === 'function') {\n        el.removeEventListener('touchmove', this.onTouchMove, false);\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NodeResolver, {\n        innerRef: this.getScrollTarget\n      }, this.props.children);\n    }\n  }]);\n\n  return ScrollCaptor;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\nvar ScrollCaptorSwitch =\n/*#__PURE__*/\nfunction (_Component2) {\n  _inherits(ScrollCaptorSwitch, _Component2);\n\n  function ScrollCaptorSwitch() {\n    _classCallCheck(this, ScrollCaptorSwitch);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments));\n  }\n\n  _createClass(ScrollCaptorSwitch, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props2 = this.props,\n          isEnabled = _this$props2.isEnabled,\n          props = _objectWithoutProperties(_this$props2, [\"isEnabled\"]);\n\n      return isEnabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScrollCaptor, props) : this.props.children;\n    }\n  }]);\n\n  return ScrollCaptorSwitch;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(ScrollCaptorSwitch, \"defaultProps\", {\n  isEnabled: true\n});\n\nvar instructionsAriaMessage = function instructionsAriaMessage(event) {\n  var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var isSearchable = context.isSearchable,\n      isMulti = context.isMulti,\n      label = context.label,\n      isDisabled = context.isDisabled;\n\n  switch (event) {\n    case 'menu':\n      return \"Use Up and Down to choose options\".concat(isDisabled ? '' : ', press Enter to select the currently focused option', \", press Escape to exit the menu, press Tab to select the option and exit the menu.\");\n\n    case 'input':\n      return \"\".concat(label ? label : 'Select', \" is focused \").concat(isSearchable ? ',type to refine list' : '', \", press Down to open the menu, \").concat(isMulti ? ' press left to focus selected values' : '');\n\n    case 'value':\n      return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';\n  }\n};\nvar valueEventAriaMessage = function valueEventAriaMessage(event, context) {\n  var value = context.value,\n      isDisabled = context.isDisabled;\n  if (!value) return;\n\n  switch (event) {\n    case 'deselect-option':\n    case 'pop-value':\n    case 'remove-value':\n      return \"option \".concat(value, \", deselected.\");\n\n    case 'select-option':\n      return isDisabled ? \"option \".concat(value, \" is disabled. Select another option.\") : \"option \".concat(value, \", selected.\");\n  }\n};\nvar valueFocusAriaMessage = function valueFocusAriaMessage(_ref) {\n  var focusedValue = _ref.focusedValue,\n      getOptionLabel = _ref.getOptionLabel,\n      selectValue = _ref.selectValue;\n  return \"value \".concat(getOptionLabel(focusedValue), \" focused, \").concat(selectValue.indexOf(focusedValue) + 1, \" of \").concat(selectValue.length, \".\");\n};\nvar optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) {\n  var focusedOption = _ref2.focusedOption,\n      getOptionLabel = _ref2.getOptionLabel,\n      options = _ref2.options;\n  return \"option \".concat(getOptionLabel(focusedOption), \" focused\").concat(focusedOption.isDisabled ? ' disabled' : '', \", \").concat(options.indexOf(focusedOption) + 1, \" of \").concat(options.length, \".\");\n};\nvar resultsAriaMessage = function resultsAriaMessage(_ref3) {\n  var inputValue = _ref3.inputValue,\n      screenReaderMessage = _ref3.screenReaderMessage;\n  return \"\".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', \".\");\n};\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n  return group.label;\n};\nvar getOptionLabel = function getOptionLabel(option) {\n  return option.label;\n};\nvar getOptionValue = function getOptionValue(option) {\n  return option.value;\n};\nvar isOptionDisabled = function isOptionDisabled(option) {\n  return !!option.isDisabled;\n};\n\nvar containerCSS = function containerCSS(_ref) {\n  var isDisabled = _ref.isDisabled,\n      isRtl = _ref.isRtl;\n  return {\n    label: 'container',\n    direction: isRtl ? 'rtl' : null,\n    pointerEvents: isDisabled ? 'none' : null,\n    // cancel mouse events when disabled\n    position: 'relative'\n  };\n};\nvar SelectContainer = function SelectContainer(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps,\n      isDisabled = props.isDisabled,\n      isRtl = props.isRtl;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('container', props)), {\n      '--is-disabled': isDisabled,\n      '--is-rtl': isRtl\n    }, className)\n  }, innerProps), children);\n}; // ==============================\n// Value Container\n// ==============================\n\nvar valueContainerCSS = function valueContainerCSS(_ref2) {\n  var spacing = _ref2.theme.spacing;\n  return {\n    alignItems: 'center',\n    display: 'flex',\n    flex: 1,\n    flexWrap: 'wrap',\n    padding: \"\".concat(spacing.baseUnit / 2, \"px \").concat(spacing.baseUnit * 2, \"px\"),\n    WebkitOverflowScrolling: 'touch',\n    position: 'relative',\n    overflow: 'hidden'\n  };\n};\nvar ValueContainer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(ValueContainer, _Component);\n\n  function ValueContainer() {\n    _classCallCheck(this, ValueContainer);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(ValueContainer).apply(this, arguments));\n  }\n\n  _createClass(ValueContainer, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          children = _this$props.children,\n          className = _this$props.className,\n          cx = _this$props.cx,\n          isMulti = _this$props.isMulti,\n          getStyles = _this$props.getStyles,\n          hasValue = _this$props.hasValue;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        className: cx(\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('valueContainer', this.props)), {\n          'value-container': true,\n          'value-container--is-multi': isMulti,\n          'value-container--has-value': hasValue\n        }, className)\n      }, children);\n    }\n  }]);\n\n  return ValueContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]); // ==============================\n// Indicator Container\n// ==============================\n\nvar indicatorsContainerCSS = function indicatorsContainerCSS() {\n  return {\n    alignItems: 'center',\n    alignSelf: 'stretch',\n    display: 'flex',\n    flexShrink: 0\n  };\n};\nvar IndicatorsContainer = function IndicatorsContainer(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('indicatorsContainer', props)), {\n      'indicators': true\n    }, className)\n  }, children);\n};\n\n// ==============================\n// Dropdown & Clear Icons\n// ==============================\nvar Svg = function Svg(_ref) {\n  var size = _ref.size,\n      props = _objectWithoutProperties(_ref, [\"size\"]);\n\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"svg\", _extends({\n    height: size,\n    width: size,\n    viewBox: \"0 0 20 20\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n      display: 'inline-block',\n      fill: 'currentColor',\n      lineHeight: 1,\n      stroke: 'currentColor',\n      strokeWidth: 0\n    })\n  }, props));\n};\n\nvar CrossIcon = function CrossIcon(props) {\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Svg, _extends({\n    size: 20\n  }, props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"path\", {\n    d: \"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z\"\n  }));\n};\nvar DownChevron = function DownChevron(props) {\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Svg, _extends({\n    size: 20\n  }, props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"path\", {\n    d: \"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"\n  }));\n}; // ==============================\n// Dropdown & Clear Buttons\n// ==============================\n\nvar baseCSS = function baseCSS(_ref2) {\n  var isFocused = _ref2.isFocused,\n      _ref2$theme = _ref2.theme,\n      baseUnit = _ref2$theme.spacing.baseUnit,\n      colors = _ref2$theme.colors;\n  return {\n    label: 'indicatorContainer',\n    color: isFocused ? colors.neutral60 : colors.neutral20,\n    display: 'flex',\n    padding: baseUnit * 2,\n    transition: 'color 150ms',\n    ':hover': {\n      color: isFocused ? colors.neutral80 : colors.neutral40\n    }\n  };\n};\n\nvar dropdownIndicatorCSS = baseCSS;\nvar DropdownIndicator = function DropdownIndicator(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('dropdownIndicator', props)), {\n      'indicator': true,\n      'dropdown-indicator': true\n    }, className)\n  }), children || react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DownChevron, null));\n};\nvar clearIndicatorCSS = baseCSS;\nvar ClearIndicator = function ClearIndicator(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('clearIndicator', props)), {\n      'indicator': true,\n      'clear-indicator': true\n    }, className)\n  }), children || react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CrossIcon, null));\n}; // ==============================\n// Separator\n// ==============================\n\nvar indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {\n  var isDisabled = _ref3.isDisabled,\n      _ref3$theme = _ref3.theme,\n      baseUnit = _ref3$theme.spacing.baseUnit,\n      colors = _ref3$theme.colors;\n  return {\n    label: 'indicatorSeparator',\n    alignSelf: 'stretch',\n    backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,\n    marginBottom: baseUnit * 2,\n    marginTop: baseUnit * 2,\n    width: 1\n  };\n};\nvar IndicatorSeparator = function IndicatorSeparator(props) {\n  var className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('indicatorSeparator', props)), {\n      'indicator-separator': true\n    }, className)\n  }));\n}; // ==============================\n// Loading\n// ==============================\n\nvar keyframesName = 'react-select-loading-indicator';\nvar keyframesInjected = false;\nvar loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {\n  var isFocused = _ref4.isFocused,\n      size = _ref4.size,\n      _ref4$theme = _ref4.theme,\n      colors = _ref4$theme.colors,\n      baseUnit = _ref4$theme.spacing.baseUnit;\n  return {\n    label: 'loadingIndicator',\n    color: isFocused ? colors.neutral60 : colors.neutral20,\n    display: 'flex',\n    padding: baseUnit * 2,\n    transition: 'color 150ms',\n    alignSelf: 'center',\n    fontSize: size,\n    lineHeight: 1,\n    marginRight: size,\n    textAlign: 'center',\n    verticalAlign: 'middle'\n  };\n};\n\nvar LoadingDot = function LoadingDot(_ref5) {\n  var color = _ref5.color,\n      delay = _ref5.delay,\n      offset = _ref5.offset;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n      animationDuration: '1s',\n      animationDelay: \"\".concat(delay, \"ms\"),\n      animationIterationCount: 'infinite',\n      animationName: keyframesName,\n      animationTimingFunction: 'ease-in-out',\n      backgroundColor: color,\n      borderRadius: '1em',\n      display: 'inline-block',\n      marginLeft: offset ? '1em' : null,\n      height: '1em',\n      verticalAlign: 'top',\n      width: '1em'\n    })\n  });\n};\n\nvar LoadingIndicator = function LoadingIndicator(props) {\n  var className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps,\n      isFocused = props.isFocused,\n      isRtl = props.isRtl,\n      colors = props.theme.colors;\n  var color = isFocused ? colors.neutral80 : colors.neutral20;\n\n  if (!keyframesInjected) {\n    // eslint-disable-next-line no-unused-expressions\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"injectGlobal\"])(\"@keyframes \", keyframesName, \"{0%,80%,100%{opacity:0;}40%{opacity:1;}};\");\n    keyframesInjected = true;\n  }\n\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('loadingIndicator', props)), {\n      'indicator': true,\n      'loading-indicator': true\n    }, className)\n  }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LoadingDot, {\n    color: color,\n    delay: 0,\n    offset: isRtl\n  }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LoadingDot, {\n    color: color,\n    delay: 160,\n    offset: true\n  }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LoadingDot, {\n    color: color,\n    delay: 320,\n    offset: !isRtl\n  }));\n};\nLoadingIndicator.defaultProps = {\n  size: 4\n};\n\nvar css$1 = function css$$1(_ref) {\n  var isDisabled = _ref.isDisabled,\n      isFocused = _ref.isFocused,\n      _ref$theme = _ref.theme,\n      colors = _ref$theme.colors,\n      borderRadius = _ref$theme.borderRadius,\n      spacing = _ref$theme.spacing;\n  return {\n    label: 'control',\n    alignItems: 'center',\n    backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,\n    borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,\n    borderRadius: borderRadius,\n    borderStyle: 'solid',\n    borderWidth: 1,\n    boxShadow: isFocused ? \"0 0 0 1px \".concat(colors.primary) : null,\n    cursor: 'default',\n    display: 'flex',\n    flexWrap: 'wrap',\n    justifyContent: 'space-between',\n    minHeight: spacing.controlHeight,\n    outline: '0 !important',\n    position: 'relative',\n    transition: 'all 100ms',\n    '&:hover': {\n      borderColor: isFocused ? colors.primary : colors.neutral30\n    }\n  };\n};\n\nvar Control = function Control(props) {\n  var children = props.children,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      className = props.className,\n      isDisabled = props.isDisabled,\n      isFocused = props.isFocused,\n      innerRef = props.innerRef,\n      innerProps = props.innerProps,\n      menuIsOpen = props.menuIsOpen;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    ref: innerRef,\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('control', props)), {\n      'control': true,\n      'control--is-disabled': isDisabled,\n      'control--is-focused': isFocused,\n      'control--menu-is-open': menuIsOpen\n    }, className)\n  }, innerProps), children);\n};\n\nvar groupCSS = function groupCSS(_ref) {\n  var spacing = _ref.theme.spacing;\n  return {\n    paddingBottom: spacing.baseUnit * 2,\n    paddingTop: spacing.baseUnit * 2\n  };\n};\n\nvar Group = function Group(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      Heading = props.Heading,\n      headingProps = props.headingProps,\n      label = props.label,\n      theme = props.theme,\n      selectProps = props.selectProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('group', props)), {\n      'group': true\n    }, className)\n  }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Heading, _extends({}, headingProps, {\n    selectProps: selectProps,\n    theme: theme,\n    getStyles: getStyles,\n    cx: cx\n  }), label), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, children));\n};\n\nvar groupHeadingCSS = function groupHeadingCSS(_ref2) {\n  var spacing = _ref2.theme.spacing;\n  return {\n    label: 'group',\n    color: '#999',\n    cursor: 'default',\n    display: 'block',\n    fontSize: '75%',\n    fontWeight: '500',\n    marginBottom: '0.25em',\n    paddingLeft: spacing.baseUnit * 3,\n    paddingRight: spacing.baseUnit * 3,\n    textTransform: 'uppercase'\n  };\n};\nvar GroupHeading = function GroupHeading(props) {\n  var className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      theme = props.theme,\n      selectProps = props.selectProps,\n      cleanProps = _objectWithoutProperties(props, [\"className\", \"cx\", \"getStyles\", \"theme\", \"selectProps\"]);\n\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('groupHeading', _objectSpread({\n      theme: theme\n    }, cleanProps))), {\n      'group-heading': true\n    }, className)\n  }, cleanProps));\n};\n\nvar inputCSS = function inputCSS(_ref) {\n  var isDisabled = _ref.isDisabled,\n      _ref$theme = _ref.theme,\n      spacing = _ref$theme.spacing,\n      colors = _ref$theme.colors;\n  return {\n    margin: spacing.baseUnit / 2,\n    paddingBottom: spacing.baseUnit / 2,\n    paddingTop: spacing.baseUnit / 2,\n    visibility: isDisabled ? 'hidden' : 'visible',\n    color: colors.neutral80\n  };\n};\n\nvar inputStyle = function inputStyle(isHidden) {\n  return {\n    label: 'input',\n    background: 0,\n    border: 0,\n    fontSize: 'inherit',\n    opacity: isHidden ? 0 : 1,\n    outline: 0,\n    padding: 0,\n    color: 'inherit'\n  };\n};\n\nvar Input = function Input(_ref2) {\n  var className = _ref2.className,\n      cx = _ref2.cx,\n      getStyles = _ref2.getStyles,\n      innerRef = _ref2.innerRef,\n      isHidden = _ref2.isHidden,\n      isDisabled = _ref2.isDisabled,\n      theme = _ref2.theme,\n      selectProps = _ref2.selectProps,\n      props = _objectWithoutProperties(_ref2, [\"className\", \"cx\", \"getStyles\", \"innerRef\", \"isHidden\", \"isDisabled\", \"theme\", \"selectProps\"]);\n\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('input', _objectSpread({\n      theme: theme\n    }, props)))\n  }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_input_autosize__WEBPACK_IMPORTED_MODULE_6___default.a, _extends({\n    className: cx(null, {\n      'input': true\n    }, className),\n    inputRef: innerRef,\n    inputStyle: inputStyle(isHidden),\n    disabled: isDisabled\n  }, props)));\n};\n\nvar multiValueCSS = function multiValueCSS(_ref) {\n  var _ref$theme = _ref.theme,\n      spacing = _ref$theme.spacing,\n      borderRadius = _ref$theme.borderRadius,\n      colors = _ref$theme.colors;\n  return {\n    label: 'multiValue',\n    backgroundColor: colors.neutral10,\n    borderRadius: borderRadius / 2,\n    display: 'flex',\n    margin: spacing.baseUnit / 2,\n    minWidth: 0 // resolves flex/text-overflow bug\n\n  };\n};\nvar multiValueLabelCSS = function multiValueLabelCSS(_ref2) {\n  var _ref2$theme = _ref2.theme,\n      borderRadius = _ref2$theme.borderRadius,\n      colors = _ref2$theme.colors,\n      cropWithEllipsis = _ref2.cropWithEllipsis;\n  return {\n    borderRadius: borderRadius / 2,\n    color: colors.neutral80,\n    fontSize: '85%',\n    overflow: 'hidden',\n    padding: 3,\n    paddingLeft: 6,\n    textOverflow: cropWithEllipsis ? 'ellipsis' : null,\n    whiteSpace: 'nowrap'\n  };\n};\nvar multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {\n  var _ref3$theme = _ref3.theme,\n      spacing = _ref3$theme.spacing,\n      borderRadius = _ref3$theme.borderRadius,\n      colors = _ref3$theme.colors,\n      isFocused = _ref3.isFocused;\n  return {\n    alignItems: 'center',\n    borderRadius: borderRadius / 2,\n    backgroundColor: isFocused && colors.dangerLight,\n    display: 'flex',\n    paddingLeft: spacing.baseUnit,\n    paddingRight: spacing.baseUnit,\n    ':hover': {\n      backgroundColor: colors.dangerLight,\n      color: colors.danger\n    }\n  };\n};\nvar MultiValueGeneric = function MultiValueGeneric(_ref4) {\n  var children = _ref4.children,\n      innerProps = _ref4.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", innerProps, children);\n};\nvar MultiValueContainer = MultiValueGeneric;\nvar MultiValueLabel = MultiValueGeneric;\nvar MultiValueRemove =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(MultiValueRemove, _Component);\n\n  function MultiValueRemove() {\n    _classCallCheck(this, MultiValueRemove);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments));\n  }\n\n  _createClass(MultiValueRemove, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          children = _this$props.children,\n          innerProps = _this$props.innerProps;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", innerProps, children || react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CrossIcon, {\n        size: 14\n      }));\n    }\n  }]);\n\n  return MultiValueRemove;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\nvar MultiValue =\n/*#__PURE__*/\nfunction (_Component2) {\n  _inherits(MultiValue, _Component2);\n\n  function MultiValue() {\n    _classCallCheck(this, MultiValue);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(MultiValue).apply(this, arguments));\n  }\n\n  _createClass(MultiValue, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props2 = this.props,\n          children = _this$props2.children,\n          className = _this$props2.className,\n          components = _this$props2.components,\n          cx = _this$props2.cx,\n          data = _this$props2.data,\n          getStyles = _this$props2.getStyles,\n          innerProps = _this$props2.innerProps,\n          isDisabled = _this$props2.isDisabled,\n          removeProps = _this$props2.removeProps,\n          selectProps = _this$props2.selectProps;\n      var Container = components.Container,\n          Label = components.Label,\n          Remove = components.Remove;\n\n      var containerInnerProps = _objectSpread({\n        className: cx(\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValue', this.props)), {\n          'multi-value': true,\n          'multi-value--is-disabled': isDisabled\n        }, className)\n      }, innerProps);\n\n      var labelInnerProps = {\n        className: cx(\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValueLabel', this.props)), {\n          'multi-value__label': true\n        }, className)\n      };\n\n      var removeInnerProps = _objectSpread({\n        className: cx(\n        /*#__PURE__*/\n        Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValueRemove', this.props)), {\n          'multi-value__remove': true\n        }, className)\n      }, removeProps);\n\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Container, {\n        data: data,\n        innerProps: containerInnerProps,\n        selectProps: selectProps\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Label, {\n        data: data,\n        innerProps: labelInnerProps,\n        selectProps: selectProps\n      }, children), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Remove, {\n        data: data,\n        innerProps: removeInnerProps,\n        selectProps: selectProps\n      }));\n    }\n  }]);\n\n  return MultiValue;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(MultiValue, \"defaultProps\", {\n  cropWithEllipsis: true\n});\n\nvar optionCSS = function optionCSS(_ref) {\n  var isDisabled = _ref.isDisabled,\n      isFocused = _ref.isFocused,\n      isSelected = _ref.isSelected,\n      _ref$theme = _ref.theme,\n      spacing = _ref$theme.spacing,\n      colors = _ref$theme.colors;\n  return {\n    label: 'option',\n    backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',\n    color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',\n    cursor: 'default',\n    display: 'block',\n    fontSize: 'inherit',\n    padding: \"\".concat(spacing.baseUnit * 2, \"px \").concat(spacing.baseUnit * 3, \"px\"),\n    width: '100%',\n    userSelect: 'none',\n    WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',\n    // provide some affordance on touch devices\n    ':active': {\n      backgroundColor: isSelected ? colors.primary : colors.primary50\n    }\n  };\n};\n\nvar Option = function Option(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      isDisabled = props.isDisabled,\n      isFocused = props.isFocused,\n      isSelected = props.isSelected,\n      innerRef = props.innerRef,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    ref: innerRef,\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('option', props)), {\n      'option': true,\n      'option--is-disabled': isDisabled,\n      'option--is-focused': isFocused,\n      'option--is-selected': isSelected\n    }, className)\n  }, innerProps), children);\n};\n\nvar placeholderCSS = function placeholderCSS(_ref) {\n  var _ref$theme = _ref.theme,\n      spacing = _ref$theme.spacing,\n      colors = _ref$theme.colors;\n  return {\n    label: 'placeholder',\n    color: colors.neutral50,\n    marginLeft: spacing.baseUnit / 2,\n    marginRight: spacing.baseUnit / 2,\n    position: 'absolute',\n    top: '50%',\n    transform: 'translateY(-50%)'\n  };\n};\n\nvar Placeholder = function Placeholder(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('placeholder', props)), {\n      'placeholder': true\n    }, className)\n  }, innerProps), children);\n};\n\nvar css$2 = function css$$1(_ref) {\n  var isDisabled = _ref.isDisabled,\n      _ref$theme = _ref.theme,\n      spacing = _ref$theme.spacing,\n      colors = _ref$theme.colors;\n  return {\n    label: 'singleValue',\n    color: isDisabled ? colors.neutral40 : colors.neutral80,\n    marginLeft: spacing.baseUnit / 2,\n    marginRight: spacing.baseUnit / 2,\n    maxWidth: \"calc(100% - \".concat(spacing.baseUnit * 2, \"px)\"),\n    overflow: 'hidden',\n    position: 'absolute',\n    textOverflow: 'ellipsis',\n    whiteSpace: 'nowrap',\n    top: '50%',\n    transform: 'translateY(-50%)'\n  };\n};\n\nvar SingleValue = function SingleValue(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      isDisabled = props.isDisabled,\n      innerProps = props.innerProps;\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('singleValue', props)), {\n      'single-value': true,\n      'single-value--is-disabled': isDisabled\n    }, className)\n  }, innerProps), children);\n};\n\nvar components = {\n  ClearIndicator: ClearIndicator,\n  Control: Control,\n  DropdownIndicator: DropdownIndicator,\n  DownChevron: DownChevron,\n  CrossIcon: CrossIcon,\n  Group: Group,\n  GroupHeading: GroupHeading,\n  IndicatorsContainer: IndicatorsContainer,\n  IndicatorSeparator: IndicatorSeparator,\n  Input: Input,\n  LoadingIndicator: LoadingIndicator,\n  Menu: Menu,\n  MenuList: MenuList,\n  MenuPortal: MenuPortal,\n  LoadingMessage: LoadingMessage,\n  NoOptionsMessage: NoOptionsMessage,\n  MultiValue: MultiValue,\n  MultiValueContainer: MultiValueContainer,\n  MultiValueLabel: MultiValueLabel,\n  MultiValueRemove: MultiValueRemove,\n  Option: Option,\n  Placeholder: Placeholder,\n  SelectContainer: SelectContainer,\n  SingleValue: SingleValue,\n  ValueContainer: ValueContainer\n};\nvar defaultComponents = function defaultComponents(props) {\n  return _objectSpread({}, components, props.components);\n};\n\nvar defaultStyles = {\n  clearIndicator: clearIndicatorCSS,\n  container: containerCSS,\n  control: css$1,\n  dropdownIndicator: dropdownIndicatorCSS,\n  group: groupCSS,\n  groupHeading: groupHeadingCSS,\n  indicatorsContainer: indicatorsContainerCSS,\n  indicatorSeparator: indicatorSeparatorCSS,\n  input: inputCSS,\n  loadingIndicator: loadingIndicatorCSS,\n  loadingMessage: loadingMessageCSS,\n  menu: menuCSS,\n  menuList: menuListCSS,\n  menuPortal: menuPortalCSS,\n  multiValue: multiValueCSS,\n  multiValueLabel: multiValueLabelCSS,\n  multiValueRemove: multiValueRemoveCSS,\n  noOptionsMessage: noOptionsMessageCSS,\n  option: optionCSS,\n  placeholder: placeholderCSS,\n  singleValue: css$2,\n  valueContainer: valueContainerCSS\n}; // Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source) {\n  var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  // initialize with source styles\n  var styles = _objectSpread({}, source); // massage in target styles\n\n\n  Object.keys(target).forEach(function (key) {\n    if (source[key]) {\n      styles[key] = function (rsCss, props) {\n        return target[key](source[key](rsCss, props), props);\n      };\n    } else {\n      styles[key] = target[key];\n    }\n  });\n  return styles;\n}\n\nvar colors = {\n  primary: '#2684FF',\n  primary75: '#4C9AFF',\n  primary50: '#B2D4FF',\n  primary25: '#DEEBFF',\n  danger: '#DE350B',\n  dangerLight: '#FFBDAD',\n  neutral0: 'hsl(0, 0%, 100%)',\n  neutral5: 'hsl(0, 0%, 95%)',\n  neutral10: 'hsl(0, 0%, 90%)',\n  neutral20: 'hsl(0, 0%, 80%)',\n  neutral30: 'hsl(0, 0%, 70%)',\n  neutral40: 'hsl(0, 0%, 60%)',\n  neutral50: 'hsl(0, 0%, 50%)',\n  neutral60: 'hsl(0, 0%, 40%)',\n  neutral70: 'hsl(0, 0%, 30%)',\n  neutral80: 'hsl(0, 0%, 20%)',\n  neutral90: 'hsl(0, 0%, 10%)'\n};\nvar borderRadius = 4;\nvar baseUnit = 4;\n/* Used to calculate consistent margin/padding on elements */\n\nvar controlHeight = 38;\n/* The minimum height of the control */\n\nvar menuGutter = baseUnit * 2;\n/* The amount of space between the control and menu */\n\nvar spacing = {\n  baseUnit: baseUnit,\n  controlHeight: controlHeight,\n  menuGutter: menuGutter\n};\nvar defaultTheme = {\n  borderRadius: borderRadius,\n  colors: colors,\n  spacing: spacing\n};\n\nvar defaultProps = {\n  backspaceRemovesValue: true,\n  blurInputOnSelect: isTouchCapable(),\n  captureMenuScroll: !isTouchCapable(),\n  closeMenuOnSelect: true,\n  closeMenuOnScroll: false,\n  components: {},\n  controlShouldRenderValue: true,\n  escapeClearsValue: false,\n  filterOption: createFilter(),\n  formatGroupLabel: formatGroupLabel,\n  getOptionLabel: getOptionLabel,\n  getOptionValue: getOptionValue,\n  isDisabled: false,\n  isLoading: false,\n  isMulti: false,\n  isRtl: false,\n  isSearchable: true,\n  isOptionDisabled: isOptionDisabled,\n  loadingMessage: function loadingMessage() {\n    return 'Loading...';\n  },\n  maxMenuHeight: 300,\n  minMenuHeight: 140,\n  menuIsOpen: false,\n  menuPlacement: 'bottom',\n  menuPosition: 'absolute',\n  menuShouldBlockScroll: false,\n  menuShouldScrollIntoView: !isMobileDevice(),\n  noOptionsMessage: function noOptionsMessage() {\n    return 'No options';\n  },\n  openMenuOnFocus: false,\n  openMenuOnClick: true,\n  options: [],\n  pageSize: 5,\n  placeholder: 'Select...',\n  screenReaderStatus: function screenReaderStatus(_ref) {\n    var count = _ref.count;\n    return \"\".concat(count, \" result\").concat(count !== 1 ? 's' : '', \" available\");\n  },\n  styles: {},\n  tabIndex: '0',\n  tabSelectsValue: true\n};\nvar instanceId = 1;\n\nvar Select =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Select, _Component);\n\n  // Misc. Instance Properties\n  // ------------------------------\n  // TODO\n  // Refs\n  // ------------------------------\n  // Lifecycle\n  // ------------------------------\n  function Select(_props) {\n    var _this;\n\n    _classCallCheck(this, Select);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n      ariaLiveSelection: '',\n      ariaLiveContext: '',\n      focusedOption: null,\n      focusedValue: null,\n      inputIsHidden: false,\n      isFocused: false,\n      isComposing: false,\n      menuOptions: {\n        render: [],\n        focusable: []\n      },\n      selectValue: []\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"blockOptionHover\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"clearFocusValueOnUpdate\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"commonProps\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"components\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"hasGroups\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"initialTouchX\", 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"initialTouchY\", 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"inputIsHiddenAfterUpdate\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"instancePrefix\", '');\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"openAfterFocus\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"scrollToFocusedOptionOnUpdate\", false);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"userIsDragging\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"controlRef\", null);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getControlRef\", function (ref) {\n      _this.controlRef = ref;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"focusedOptionRef\", null);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getFocusedOptionRef\", function (ref) {\n      _this.focusedOptionRef = ref;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"menuListRef\", null);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getMenuListRef\", function (ref) {\n      _this.menuListRef = ref;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"inputRef\", null);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getInputRef\", function (ref) {\n      _this.inputRef = ref;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"cacheComponents\", function (components$$1) {\n      _this.components = defaultComponents({\n        components: components$$1\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"focus\", _this.focusInput);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"blur\", _this.blurInput);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onChange\", function (newValue, actionMeta) {\n      var _this$props = _this.props,\n          onChange = _this$props.onChange,\n          name = _this$props.name;\n      onChange(newValue, _objectSpread({}, actionMeta, {\n        name: name\n      }));\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setValue\", function (newValue) {\n      var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';\n      var option = arguments.length > 2 ? arguments[2] : undefined;\n      var _this$props2 = _this.props,\n          closeMenuOnSelect = _this$props2.closeMenuOnSelect,\n          isMulti = _this$props2.isMulti;\n\n      _this.onInputChange('', {\n        action: 'set-value'\n      });\n\n      if (closeMenuOnSelect) {\n        _this.inputIsHiddenAfterUpdate = !isMulti;\n\n        _this.onMenuClose();\n      } // when the select value should change, we should reset focusedValue\n\n\n      _this.clearFocusValueOnUpdate = true;\n\n      _this.onChange(newValue, {\n        action: action,\n        option: option\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"selectOption\", function (newValue) {\n      var _this$props3 = _this.props,\n          blurInputOnSelect = _this$props3.blurInputOnSelect,\n          isMulti = _this$props3.isMulti;\n      var selectValue = _this.state.selectValue;\n\n      if (isMulti) {\n        if (_this.isOptionSelected(newValue, selectValue)) {\n          var candidate = _this.getOptionValue(newValue);\n\n          _this.setValue(selectValue.filter(function (i) {\n            return _this.getOptionValue(i) !== candidate;\n          }), 'deselect-option', newValue);\n\n          _this.announceAriaLiveSelection({\n            event: 'deselect-option',\n            context: {\n              value: _this.getOptionLabel(newValue)\n            }\n          });\n        } else {\n          if (!_this.isOptionDisabled(newValue, selectValue)) {\n            _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);\n\n            _this.announceAriaLiveSelection({\n              event: 'select-option',\n              context: {\n                value: _this.getOptionLabel(newValue)\n              }\n            });\n          } else {\n            // announce that option is disabled\n            _this.announceAriaLiveSelection({\n              event: 'select-option',\n              context: {\n                value: _this.getOptionLabel(newValue),\n                isDisabled: true\n              }\n            });\n          }\n        }\n      } else {\n        if (!_this.isOptionDisabled(newValue, selectValue)) {\n          _this.setValue(newValue, 'select-option');\n\n          _this.announceAriaLiveSelection({\n            event: 'select-option',\n            context: {\n              value: _this.getOptionLabel(newValue)\n            }\n          });\n        } else {\n          // announce that option is disabled\n          _this.announceAriaLiveSelection({\n            event: 'select-option',\n            context: {\n              value: _this.getOptionLabel(newValue),\n              isDisabled: true\n            }\n          });\n        }\n      }\n\n      if (blurInputOnSelect) {\n        _this.blurInput();\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"removeValue\", function (removedValue) {\n      var selectValue = _this.state.selectValue;\n\n      var candidate = _this.getOptionValue(removedValue);\n\n      _this.onChange(selectValue.filter(function (i) {\n        return _this.getOptionValue(i) !== candidate;\n      }), {\n        action: 'remove-value',\n        removedValue: removedValue\n      });\n\n      _this.announceAriaLiveSelection({\n        event: 'remove-value',\n        context: {\n          value: removedValue ? _this.getOptionLabel(removedValue) : ''\n        }\n      });\n\n      _this.focusInput();\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"clearValue\", function () {\n      var isMulti = _this.props.isMulti;\n\n      _this.onChange(isMulti ? [] : null, {\n        action: 'clear'\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popValue\", function () {\n      var selectValue = _this.state.selectValue;\n      var lastSelectedValue = selectValue[selectValue.length - 1];\n\n      _this.announceAriaLiveSelection({\n        event: 'pop-value',\n        context: {\n          value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : ''\n        }\n      });\n\n      _this.onChange(selectValue.slice(0, selectValue.length - 1), {\n        action: 'pop-value',\n        removedValue: lastSelectedValue\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOptionLabel\", function (data) {\n      return _this.props.getOptionLabel(data);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOptionValue\", function (data) {\n      return _this.props.getOptionValue(data);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getStyles\", function (key, props) {\n      var base = defaultStyles[key](props);\n      base.boxSizing = 'border-box';\n      var custom = _this.props.styles[key];\n      return custom ? custom(base, props) : base;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getElementId\", function (element) {\n      return \"\".concat(_this.instancePrefix, \"-\").concat(element);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getActiveDescendentId\", function () {\n      var menuIsOpen = _this.props.menuIsOpen;\n      var _this$state = _this.state,\n          menuOptions = _this$state.menuOptions,\n          focusedOption = _this$state.focusedOption;\n      if (!focusedOption || !menuIsOpen) return undefined;\n      var index = menuOptions.focusable.indexOf(focusedOption);\n      var option = menuOptions.render[index];\n      return option && option.key;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"announceAriaLiveSelection\", function (_ref2) {\n      var event = _ref2.event,\n          context = _ref2.context;\n\n      _this.setState({\n        ariaLiveSelection: valueEventAriaMessage(event, context)\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"announceAriaLiveContext\", function (_ref3) {\n      var event = _ref3.event,\n          context = _ref3.context;\n\n      _this.setState({\n        ariaLiveContext: instructionsAriaMessage(event, _objectSpread({}, context, {\n          label: _this.props['aria-label']\n        }))\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onMenuMouseDown\", function (event) {\n      if (event.button !== 0) {\n        return;\n      }\n\n      event.stopPropagation();\n      event.preventDefault();\n\n      _this.focusInput();\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onMenuMouseMove\", function (event) {\n      _this.blockOptionHover = false;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onControlMouseDown\", function (event) {\n      var openMenuOnClick = _this.props.openMenuOnClick;\n\n      if (!_this.state.isFocused) {\n        if (openMenuOnClick) {\n          _this.openAfterFocus = true;\n        }\n\n        _this.focusInput();\n      } else if (!_this.props.menuIsOpen) {\n        if (openMenuOnClick) {\n          _this.openMenu('first');\n        }\n      } else {\n        //$FlowFixMe\n        if (event.target.tagName !== 'INPUT') {\n          _this.onMenuClose();\n        }\n      } //$FlowFixMe\n\n\n      if (event.target.tagName !== 'INPUT') {\n        event.preventDefault();\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onDropdownIndicatorMouseDown\", function (event) {\n      // ignore mouse events that weren't triggered by the primary button\n      if (event && event.type === 'mousedown' && event.button !== 0) {\n        return;\n      }\n\n      if (_this.props.isDisabled) return;\n      var _this$props4 = _this.props,\n          isMulti = _this$props4.isMulti,\n          menuIsOpen = _this$props4.menuIsOpen;\n\n      _this.focusInput();\n\n      if (menuIsOpen) {\n        _this.inputIsHiddenAfterUpdate = !isMulti;\n\n        _this.onMenuClose();\n      } else {\n        _this.openMenu('first');\n      }\n\n      event.preventDefault();\n      event.stopPropagation();\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onClearIndicatorMouseDown\", function (event) {\n      // ignore mouse events that weren't triggered by the primary button\n      if (event && event.type === 'mousedown' && event.button !== 0) {\n        return;\n      }\n\n      _this.clearValue();\n\n      event.stopPropagation();\n      _this.openAfterFocus = false;\n      setTimeout(function () {\n        return _this.focusInput();\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onScroll\", function (event) {\n      if (typeof _this.props.closeMenuOnScroll === 'boolean') {\n        if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n          _this.props.onMenuClose();\n        }\n      } else if (typeof _this.props.closeMenuOnScroll === 'function') {\n        if (_this.props.closeMenuOnScroll(event)) {\n          _this.props.onMenuClose();\n        }\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onCompositionStart\", function () {\n      _this.setState({\n        isComposing: true\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onCompositionEnd\", function () {\n      _this.setState({\n        isComposing: false\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onTouchStart\", function (_ref4) {\n      var touches = _ref4.touches;\n      var touch = touches.item(0);\n\n      if (!touch) {\n        return;\n      }\n\n      _this.initialTouchX = touch.clientX;\n      _this.initialTouchY = touch.clientY;\n      _this.userIsDragging = false;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onTouchMove\", function (_ref5) {\n      var touches = _ref5.touches;\n      var touch = touches.item(0);\n\n      if (!touch) {\n        return;\n      }\n\n      var deltaX = Math.abs(touch.clientX - _this.initialTouchX);\n      var deltaY = Math.abs(touch.clientY - _this.initialTouchY);\n      var moveThreshold = 5;\n      _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onTouchEnd\", function (event) {\n      if (_this.userIsDragging) return; // close the menu if the user taps outside\n      // we're checking on event.target here instead of event.currentTarget, because we want to assert information\n      // on events on child elements, not the document (which we've attached this handler to).\n\n      if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {\n        _this.blurInput();\n      } // reset move vars\n\n\n      _this.initialTouchX = 0;\n      _this.initialTouchY = 0;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onControlTouchEnd\", function (event) {\n      if (_this.userIsDragging) return;\n\n      _this.onControlMouseDown(event);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onClearIndicatorTouchEnd\", function (event) {\n      if (_this.userIsDragging) return;\n\n      _this.onClearIndicatorMouseDown(event);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onDropdownIndicatorTouchEnd\", function (event) {\n      if (_this.userIsDragging) return;\n\n      _this.onDropdownIndicatorMouseDown(event);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleInputChange\", function (event) {\n      var inputValue = event.currentTarget.value;\n      _this.inputIsHiddenAfterUpdate = false;\n\n      _this.onInputChange(inputValue, {\n        action: 'input-change'\n      });\n\n      _this.onMenuOpen();\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onInputFocus\", function (event) {\n      var _this$props5 = _this.props,\n          isSearchable = _this$props5.isSearchable,\n          isMulti = _this$props5.isMulti;\n\n      if (_this.props.onFocus) {\n        _this.props.onFocus(event);\n      }\n\n      _this.inputIsHiddenAfterUpdate = false;\n\n      _this.announceAriaLiveContext({\n        event: 'input',\n        context: {\n          isSearchable: isSearchable,\n          isMulti: isMulti\n        }\n      });\n\n      _this.setState({\n        isFocused: true\n      });\n\n      if (_this.openAfterFocus || _this.props.openMenuOnFocus) {\n        _this.openMenu('first');\n      }\n\n      _this.openAfterFocus = false;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onInputBlur\", function (event) {\n      if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {\n        _this.inputRef.focus();\n\n        return;\n      }\n\n      if (_this.props.onBlur) {\n        _this.props.onBlur(event);\n      }\n\n      _this.onInputChange('', {\n        action: 'input-blur'\n      });\n\n      _this.onMenuClose();\n\n      _this.setState({\n        focusedValue: null,\n        isFocused: false\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onOptionHover\", function (focusedOption) {\n      if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {\n        return;\n      }\n\n      _this.setState({\n        focusedOption: focusedOption\n      });\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"shouldHideSelectedOptions\", function () {\n      var _this$props6 = _this.props,\n          hideSelectedOptions = _this$props6.hideSelectedOptions,\n          isMulti = _this$props6.isMulti;\n      if (hideSelectedOptions === undefined) return isMulti;\n      return hideSelectedOptions;\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onKeyDown\", function (event) {\n      var _this$props7 = _this.props,\n          isMulti = _this$props7.isMulti,\n          backspaceRemovesValue = _this$props7.backspaceRemovesValue,\n          escapeClearsValue = _this$props7.escapeClearsValue,\n          inputValue = _this$props7.inputValue,\n          isClearable = _this$props7.isClearable,\n          isDisabled = _this$props7.isDisabled,\n          menuIsOpen = _this$props7.menuIsOpen,\n          onKeyDown = _this$props7.onKeyDown,\n          tabSelectsValue = _this$props7.tabSelectsValue,\n          openMenuOnFocus = _this$props7.openMenuOnFocus;\n      var _this$state2 = _this.state,\n          isComposing = _this$state2.isComposing,\n          focusedOption = _this$state2.focusedOption,\n          focusedValue = _this$state2.focusedValue,\n          selectValue = _this$state2.selectValue;\n      if (isDisabled) return;\n\n      if (typeof onKeyDown === 'function') {\n        onKeyDown(event);\n\n        if (event.defaultPrevented) {\n          return;\n        }\n      } // Block option hover events when the user has just pressed a key\n\n\n      _this.blockOptionHover = true;\n\n      switch (event.key) {\n        case 'ArrowLeft':\n          if (!isMulti || inputValue) return;\n\n          _this.focusValue('previous');\n\n          break;\n\n        case 'ArrowRight':\n          if (!isMulti || inputValue) return;\n\n          _this.focusValue('next');\n\n          break;\n\n        case 'Delete':\n        case 'Backspace':\n          if (inputValue) return;\n\n          if (focusedValue) {\n            _this.removeValue(focusedValue);\n          } else {\n            if (!backspaceRemovesValue) return;\n\n            if (isMulti) {\n              _this.popValue();\n            } else if (isClearable) {\n              _this.clearValue();\n            }\n          }\n\n          break;\n\n        case 'Tab':\n          if (isComposing) return;\n\n          if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused\n          // option is already selected; it breaks the flow of navigation\n          openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {\n            return;\n          }\n\n          _this.selectOption(focusedOption);\n\n          break;\n\n        case 'Enter':\n          if (event.keyCode === 229) {\n            // ignore the keydown event from an Input Method Editor(IME)\n            // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n            break;\n          }\n\n          if (menuIsOpen) {\n            if (!focusedOption) return;\n            if (isComposing) return;\n\n            _this.selectOption(focusedOption);\n\n            break;\n          }\n\n          return;\n\n        case 'Escape':\n          if (menuIsOpen) {\n            _this.inputIsHiddenAfterUpdate = false;\n\n            _this.onInputChange('', {\n              action: 'menu-close'\n            });\n\n            _this.onMenuClose();\n          } else if (isClearable && escapeClearsValue) {\n            _this.clearValue();\n          }\n\n          break;\n\n        case ' ':\n          // space\n          if (inputValue) {\n            return;\n          }\n\n          if (!menuIsOpen) {\n            _this.openMenu('first');\n\n            break;\n          }\n\n          if (!focusedOption) return;\n\n          _this.selectOption(focusedOption);\n\n          break;\n\n        case 'ArrowUp':\n          if (menuIsOpen) {\n            _this.focusOption('up');\n          } else {\n            _this.openMenu('last');\n          }\n\n          break;\n\n        case 'ArrowDown':\n          if (menuIsOpen) {\n            _this.focusOption('down');\n          } else {\n            _this.openMenu('first');\n          }\n\n          break;\n\n        case 'PageUp':\n          if (!menuIsOpen) return;\n\n          _this.focusOption('pageup');\n\n          break;\n\n        case 'PageDown':\n          if (!menuIsOpen) return;\n\n          _this.focusOption('pagedown');\n\n          break;\n\n        case 'Home':\n          if (!menuIsOpen) return;\n\n          _this.focusOption('first');\n\n          break;\n\n        case 'End':\n          if (!menuIsOpen) return;\n\n          _this.focusOption('last');\n\n          break;\n\n        default:\n          return;\n      }\n\n      event.preventDefault();\n    });\n\n    var value = _props.value;\n    _this.cacheComponents = Object(memoize_one__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this)));\n\n    _this.cacheComponents(_props.components);\n\n    _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n\n    var _selectValue = cleanValue(value);\n\n    var _menuOptions = _this.buildMenuOptions(_props, _selectValue);\n\n    _this.state.menuOptions = _menuOptions;\n    _this.state.selectValue = _selectValue;\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.startListeningComposition();\n      this.startListeningToTouch();\n\n      if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n        // Listen to all scroll events, and filter them out inside of 'onScroll'\n        document.addEventListener('scroll', this.onScroll, true);\n      }\n\n      if (this.props.autoFocus) {\n        this.focusInput();\n      }\n    }\n  }, {\n    key: \"componentWillReceiveProps\",\n    value: function componentWillReceiveProps(nextProps) {\n      var _this$props8 = this.props,\n          options = _this$props8.options,\n          value = _this$props8.value,\n          inputValue = _this$props8.inputValue; // re-cache custom components\n\n      this.cacheComponents(nextProps.components); // rebuild the menu options\n\n      if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) {\n        var selectValue = cleanValue(nextProps.value);\n        var menuOptions = this.buildMenuOptions(nextProps, selectValue);\n        var focusedValue = this.getNextFocusedValue(selectValue);\n        var focusedOption = this.getNextFocusedOption(menuOptions.focusable);\n        this.setState({\n          menuOptions: menuOptions,\n          selectValue: selectValue,\n          focusedOption: focusedOption,\n          focusedValue: focusedValue\n        });\n      } // some updates should toggle the state of the input visibility\n\n\n      if (this.inputIsHiddenAfterUpdate != null) {\n        this.setState({\n          inputIsHidden: this.inputIsHiddenAfterUpdate\n        });\n        delete this.inputIsHiddenAfterUpdate;\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps) {\n      var _this$props9 = this.props,\n          isDisabled = _this$props9.isDisabled,\n          menuIsOpen = _this$props9.menuIsOpen;\n      var isFocused = this.state.isFocused;\n\n      if ( // ensure focus is restored correctly when the control becomes enabled\n      isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens\n      isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n        this.focusInput();\n      } // scroll the focused option into view if necessary\n\n\n      if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n        scrollIntoView(this.menuListRef, this.focusedOptionRef);\n      }\n\n      this.scrollToFocusedOptionOnUpdate = false;\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      this.stopListeningComposition();\n      this.stopListeningToTouch();\n      document.removeEventListener('scroll', this.onScroll, true);\n    }\n  }, {\n    key: \"onMenuOpen\",\n    // ==============================\n    // Consumer Handlers\n    // ==============================\n    value: function onMenuOpen() {\n      this.props.onMenuOpen();\n    }\n  }, {\n    key: \"onMenuClose\",\n    value: function onMenuClose() {\n      var _this$props10 = this.props,\n          isSearchable = _this$props10.isSearchable,\n          isMulti = _this$props10.isMulti;\n      this.announceAriaLiveContext({\n        event: 'input',\n        context: {\n          isSearchable: isSearchable,\n          isMulti: isMulti\n        }\n      });\n      this.onInputChange('', {\n        action: 'menu-close'\n      });\n      this.props.onMenuClose();\n    }\n  }, {\n    key: \"onInputChange\",\n    value: function onInputChange(newValue, actionMeta) {\n      this.props.onInputChange(newValue, actionMeta);\n    } // ==============================\n    // Methods\n    // ==============================\n\n  }, {\n    key: \"focusInput\",\n    value: function focusInput() {\n      if (!this.inputRef) return;\n      this.inputRef.focus();\n    }\n  }, {\n    key: \"blurInput\",\n    value: function blurInput() {\n      if (!this.inputRef) return;\n      this.inputRef.blur();\n    } // aliased for consumers\n\n  }, {\n    key: \"openMenu\",\n    value: function openMenu(focusOption) {\n      var _this$state3 = this.state,\n          menuOptions = _this$state3.menuOptions,\n          selectValue = _this$state3.selectValue,\n          isFocused = _this$state3.isFocused;\n      var isMulti = this.props.isMulti;\n      var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1;\n\n      if (!isMulti) {\n        var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]);\n\n        if (selectedIndex > -1) {\n          openAtIndex = selectedIndex;\n        }\n      } // only scroll if the menu isn't already open\n\n\n      this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);\n      this.inputIsHiddenAfterUpdate = false;\n      this.onMenuOpen();\n      this.setState({\n        focusedValue: null,\n        focusedOption: menuOptions.focusable[openAtIndex]\n      });\n      this.announceAriaLiveContext({\n        event: 'menu'\n      });\n    }\n  }, {\n    key: \"focusValue\",\n    value: function focusValue(direction) {\n      var _this$props11 = this.props,\n          isMulti = _this$props11.isMulti,\n          isSearchable = _this$props11.isSearchable;\n      var _this$state4 = this.state,\n          selectValue = _this$state4.selectValue,\n          focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing\n\n      if (!isMulti) return;\n      this.setState({\n        focusedOption: null\n      });\n      var focusedIndex = selectValue.indexOf(focusedValue);\n\n      if (!focusedValue) {\n        focusedIndex = -1;\n        this.announceAriaLiveContext({\n          event: 'value'\n        });\n      }\n\n      var lastIndex = selectValue.length - 1;\n      var nextFocus = -1;\n      if (!selectValue.length) return;\n\n      switch (direction) {\n        case 'previous':\n          if (focusedIndex === 0) {\n            // don't cycle from the start to the end\n            nextFocus = 0;\n          } else if (focusedIndex === -1) {\n            // if nothing is focused, focus the last value first\n            nextFocus = lastIndex;\n          } else {\n            nextFocus = focusedIndex - 1;\n          }\n\n          break;\n\n        case 'next':\n          if (focusedIndex > -1 && focusedIndex < lastIndex) {\n            nextFocus = focusedIndex + 1;\n          }\n\n          break;\n      }\n\n      if (nextFocus === -1) {\n        this.announceAriaLiveContext({\n          event: 'input',\n          context: {\n            isSearchable: isSearchable,\n            isMulti: isMulti\n          }\n        });\n      }\n\n      this.setState({\n        inputIsHidden: nextFocus === -1 ? false : true,\n        focusedValue: selectValue[nextFocus]\n      });\n    }\n  }, {\n    key: \"focusOption\",\n    value: function focusOption() {\n      var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';\n      var pageSize = this.props.pageSize;\n      var _this$state5 = this.state,\n          focusedOption = _this$state5.focusedOption,\n          menuOptions = _this$state5.menuOptions;\n      var options = menuOptions.focusable;\n      if (!options.length) return;\n      var nextFocus = 0; // handles 'first'\n\n      var focusedIndex = options.indexOf(focusedOption);\n\n      if (!focusedOption) {\n        focusedIndex = -1;\n        this.announceAriaLiveContext({\n          event: 'menu'\n        });\n      }\n\n      if (direction === 'up') {\n        nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n      } else if (direction === 'down') {\n        nextFocus = (focusedIndex + 1) % options.length;\n      } else if (direction === 'pageup') {\n        nextFocus = focusedIndex - pageSize;\n        if (nextFocus < 0) nextFocus = 0;\n      } else if (direction === 'pagedown') {\n        nextFocus = focusedIndex + pageSize;\n        if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n      } else if (direction === 'last') {\n        nextFocus = options.length - 1;\n      }\n\n      this.scrollToFocusedOptionOnUpdate = true;\n      this.setState({\n        focusedOption: options[nextFocus],\n        focusedValue: null\n      });\n      this.announceAriaLiveContext({\n        event: 'menu',\n        context: {\n          isDisabled: isOptionDisabled(options[nextFocus])\n        }\n      });\n    }\n  }, {\n    key: \"getTheme\",\n    // ==============================\n    // Getters\n    // ==============================\n    value: function getTheme() {\n      // Use the default theme if there are no customizations.\n      if (!this.props.theme) {\n        return defaultTheme;\n      } // If the theme prop is a function, assume the function\n      // knows how to merge the passed-in default theme with\n      // its own modifications.\n\n\n      if (typeof this.props.theme === 'function') {\n        return this.props.theme(defaultTheme);\n      } // Otherwise, if a plain theme object was passed in,\n      // overlay it with the default theme.\n\n\n      return _objectSpread({}, defaultTheme, this.props.theme);\n    }\n  }, {\n    key: \"getCommonProps\",\n    value: function getCommonProps() {\n      var clearValue = this.clearValue,\n          getStyles = this.getStyles,\n          setValue = this.setValue,\n          selectOption = this.selectOption,\n          props = this.props;\n      var classNamePrefix = props.classNamePrefix,\n          isMulti = props.isMulti,\n          isRtl = props.isRtl,\n          options = props.options;\n      var selectValue = this.state.selectValue;\n      var hasValue = this.hasValue();\n\n      var getValue = function getValue() {\n        return selectValue;\n      };\n\n      var cx = classNames.bind(null, classNamePrefix);\n      return {\n        cx: cx,\n        clearValue: clearValue,\n        getStyles: getStyles,\n        getValue: getValue,\n        hasValue: hasValue,\n        isMulti: isMulti,\n        isRtl: isRtl,\n        options: options,\n        selectOption: selectOption,\n        setValue: setValue,\n        selectProps: props,\n        theme: this.getTheme()\n      };\n    }\n  }, {\n    key: \"getNextFocusedValue\",\n    value: function getNextFocusedValue(nextSelectValue) {\n      if (this.clearFocusValueOnUpdate) {\n        this.clearFocusValueOnUpdate = false;\n        return null;\n      }\n\n      var _this$state6 = this.state,\n          focusedValue = _this$state6.focusedValue,\n          lastSelectValue = _this$state6.selectValue;\n      var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n\n      if (lastFocusedIndex > -1) {\n        var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n\n        if (nextFocusedIndex > -1) {\n          // the focused value is still in the selectValue, return it\n          return focusedValue;\n        } else if (lastFocusedIndex < nextSelectValue.length) {\n          // the focusedValue is not present in the next selectValue array by\n          // reference, so return the new value at the same index\n          return nextSelectValue[lastFocusedIndex];\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"getNextFocusedOption\",\n    value: function getNextFocusedOption(options) {\n      var lastFocusedOption = this.state.focusedOption;\n      return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n    }\n  }, {\n    key: \"hasValue\",\n    value: function hasValue() {\n      var selectValue = this.state.selectValue;\n      return selectValue.length > 0;\n    }\n  }, {\n    key: \"hasOptions\",\n    value: function hasOptions() {\n      return !!this.state.menuOptions.render.length;\n    }\n  }, {\n    key: \"countOptions\",\n    value: function countOptions() {\n      return this.state.menuOptions.focusable.length;\n    }\n  }, {\n    key: \"isClearable\",\n    value: function isClearable() {\n      var _this$props12 = this.props,\n          isClearable = _this$props12.isClearable,\n          isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable\n      // multi select, by default, IS clearable\n\n      if (isClearable === undefined) return isMulti;\n      return isClearable;\n    }\n  }, {\n    key: \"isOptionDisabled\",\n    value: function isOptionDisabled$$1(option, selectValue) {\n      return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false;\n    }\n  }, {\n    key: \"isOptionSelected\",\n    value: function isOptionSelected(option, selectValue) {\n      var _this2 = this;\n\n      if (selectValue.indexOf(option) > -1) return true;\n\n      if (typeof this.props.isOptionSelected === 'function') {\n        return this.props.isOptionSelected(option, selectValue);\n      }\n\n      var candidate = this.getOptionValue(option);\n      return selectValue.some(function (i) {\n        return _this2.getOptionValue(i) === candidate;\n      });\n    }\n  }, {\n    key: \"filterOption\",\n    value: function filterOption(option, inputValue) {\n      return this.props.filterOption ? this.props.filterOption(option, inputValue) : true;\n    }\n  }, {\n    key: \"formatOptionLabel\",\n    value: function formatOptionLabel(data, context) {\n      if (typeof this.props.formatOptionLabel === 'function') {\n        var inputValue = this.props.inputValue;\n        var selectValue = this.state.selectValue;\n        return this.props.formatOptionLabel(data, {\n          context: context,\n          inputValue: inputValue,\n          selectValue: selectValue\n        });\n      } else {\n        return this.getOptionLabel(data);\n      }\n    }\n  }, {\n    key: \"formatGroupLabel\",\n    value: function formatGroupLabel$$1(data) {\n      return this.props.formatGroupLabel(data);\n    } // ==============================\n    // Mouse Handlers\n    // ==============================\n\n  }, {\n    key: \"startListeningComposition\",\n    // ==============================\n    // Composition Handlers\n    // ==============================\n    value: function startListeningComposition() {\n      if (document && document.addEventListener) {\n        document.addEventListener('compositionstart', this.onCompositionStart, false);\n        document.addEventListener('compositionend', this.onCompositionEnd, false);\n      }\n    }\n  }, {\n    key: \"stopListeningComposition\",\n    value: function stopListeningComposition() {\n      if (document && document.removeEventListener) {\n        document.removeEventListener('compositionstart', this.onCompositionStart);\n        document.removeEventListener('compositionend', this.onCompositionEnd);\n      }\n    }\n  }, {\n    key: \"startListeningToTouch\",\n    // ==============================\n    // Touch Handlers\n    // ==============================\n    value: function startListeningToTouch() {\n      if (document && document.addEventListener) {\n        document.addEventListener('touchstart', this.onTouchStart, false);\n        document.addEventListener('touchmove', this.onTouchMove, false);\n        document.addEventListener('touchend', this.onTouchEnd, false);\n      }\n    }\n  }, {\n    key: \"stopListeningToTouch\",\n    value: function stopListeningToTouch() {\n      if (document && document.removeEventListener) {\n        document.removeEventListener('touchstart', this.onTouchStart);\n        document.removeEventListener('touchmove', this.onTouchMove);\n        document.removeEventListener('touchend', this.onTouchEnd);\n      }\n    }\n  }, {\n    key: \"buildMenuOptions\",\n    // ==============================\n    // Menu Options\n    // ==============================\n    value: function buildMenuOptions(props, selectValue) {\n      var _this3 = this;\n\n      var _props$inputValue = props.inputValue,\n          inputValue = _props$inputValue === void 0 ? '' : _props$inputValue,\n          options = props.options;\n\n      var toOption = function toOption(option, id) {\n        var isDisabled = _this3.isOptionDisabled(option, selectValue);\n\n        var isSelected = _this3.isOptionSelected(option, selectValue);\n\n        var label = _this3.getOptionLabel(option);\n\n        var value = _this3.getOptionValue(option);\n\n        if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({\n          label: label,\n          value: value,\n          data: option\n        }, inputValue)) {\n          return;\n        }\n\n        var onHover = isDisabled ? undefined : function () {\n          return _this3.onOptionHover(option);\n        };\n        var onSelect = isDisabled ? undefined : function () {\n          return _this3.selectOption(option);\n        };\n        var optionId = \"\".concat(_this3.getElementId('option'), \"-\").concat(id);\n        return {\n          innerProps: {\n            id: optionId,\n            onClick: onSelect,\n            onMouseMove: onHover,\n            onMouseOver: onHover,\n            tabIndex: -1\n          },\n          data: option,\n          isDisabled: isDisabled,\n          isSelected: isSelected,\n          key: optionId,\n          label: label,\n          type: 'option',\n          value: value\n        };\n      };\n\n      return options.reduce(function (acc, item, itemIndex) {\n        if (item.options) {\n          // TODO needs a tidier implementation\n          if (!_this3.hasGroups) _this3.hasGroups = true;\n          var items = item.options;\n          var children = items.map(function (child, i) {\n            var option = toOption(child, \"\".concat(itemIndex, \"-\").concat(i));\n            if (option) acc.focusable.push(child);\n            return option;\n          }).filter(Boolean);\n\n          if (children.length) {\n            var groupId = \"\".concat(_this3.getElementId('group'), \"-\").concat(itemIndex);\n            acc.render.push({\n              type: 'group',\n              key: groupId,\n              data: item,\n              options: children\n            });\n          }\n        } else {\n          var option = toOption(item, \"\".concat(itemIndex));\n\n          if (option) {\n            acc.render.push(option);\n            acc.focusable.push(item);\n          }\n        }\n\n        return acc;\n      }, {\n        render: [],\n        focusable: []\n      });\n    } // ==============================\n    // Renderers\n    // ==============================\n\n  }, {\n    key: \"constructAriaLiveMessage\",\n    value: function constructAriaLiveMessage() {\n      var _this$state7 = this.state,\n          ariaLiveContext = _this$state7.ariaLiveContext,\n          selectValue = _this$state7.selectValue,\n          focusedValue = _this$state7.focusedValue,\n          focusedOption = _this$state7.focusedOption;\n      var _this$props13 = this.props,\n          options = _this$props13.options,\n          menuIsOpen = _this$props13.menuIsOpen,\n          inputValue = _this$props13.inputValue,\n          screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select.\n\n      var focusedValueMsg = focusedValue ? valueFocusAriaMessage({\n        focusedValue: focusedValue,\n        getOptionLabel: this.getOptionLabel,\n        selectValue: selectValue\n      }) : ''; // An aria live message representing the currently focused option in the select.\n\n      var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({\n        focusedOption: focusedOption,\n        getOptionLabel: this.getOptionLabel,\n        options: options\n      }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue.\n\n      var resultsMsg = resultsAriaMessage({\n        inputValue: inputValue,\n        screenReaderMessage: screenReaderStatus({\n          count: this.countOptions()\n        })\n      });\n      return \"\".concat(focusedValueMsg, \" \").concat(focusedOptionMsg, \" \").concat(resultsMsg, \" \").concat(ariaLiveContext);\n    }\n  }, {\n    key: \"renderInput\",\n    value: function renderInput() {\n      var _this$props14 = this.props,\n          isDisabled = _this$props14.isDisabled,\n          isSearchable = _this$props14.isSearchable,\n          inputId = _this$props14.inputId,\n          inputValue = _this$props14.inputValue,\n          tabIndex = _this$props14.tabIndex;\n      var Input = this.components.Input;\n      var inputIsHidden = this.state.inputIsHidden;\n      var id = inputId || this.getElementId('input');\n\n      if (!isSearchable) {\n        // use a dummy input to maintain focus/blur functionality\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DummyInput, {\n          id: id,\n          innerRef: this.getInputRef,\n          onBlur: this.onInputBlur,\n          onChange: noop,\n          onFocus: this.onInputFocus,\n          readOnly: true,\n          disabled: isDisabled,\n          tabIndex: tabIndex,\n          value: \"\"\n        });\n      } // aria attributes makes the JSX \"noisy\", separated for clarity\n\n\n      var ariaAttributes = {\n        'aria-autocomplete': 'list',\n        'aria-label': this.props['aria-label'],\n        'aria-labelledby': this.props['aria-labelledby']\n      };\n      var _this$commonProps = this.commonProps,\n          cx = _this$commonProps.cx,\n          theme = _this$commonProps.theme,\n          selectProps = _this$commonProps.selectProps;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Input, _extends({\n        autoCapitalize: \"none\",\n        autoComplete: \"off\",\n        autoCorrect: \"off\",\n        cx: cx,\n        getStyles: this.getStyles,\n        id: id,\n        innerRef: this.getInputRef,\n        isDisabled: isDisabled,\n        isHidden: inputIsHidden,\n        onBlur: this.onInputBlur,\n        onChange: this.handleInputChange,\n        onFocus: this.onInputFocus,\n        selectProps: selectProps,\n        spellCheck: \"false\",\n        tabIndex: tabIndex,\n        theme: theme,\n        type: \"text\",\n        value: inputValue\n      }, ariaAttributes));\n    }\n  }, {\n    key: \"renderPlaceholderOrValue\",\n    value: function renderPlaceholderOrValue() {\n      var _this4 = this;\n\n      var _this$components = this.components,\n          MultiValue = _this$components.MultiValue,\n          MultiValueContainer = _this$components.MultiValueContainer,\n          MultiValueLabel = _this$components.MultiValueLabel,\n          MultiValueRemove = _this$components.MultiValueRemove,\n          SingleValue = _this$components.SingleValue,\n          Placeholder = _this$components.Placeholder;\n      var commonProps = this.commonProps;\n      var _this$props15 = this.props,\n          controlShouldRenderValue = _this$props15.controlShouldRenderValue,\n          isDisabled = _this$props15.isDisabled,\n          isMulti = _this$props15.isMulti,\n          inputValue = _this$props15.inputValue,\n          placeholder = _this$props15.placeholder;\n      var _this$state8 = this.state,\n          selectValue = _this$state8.selectValue,\n          focusedValue = _this$state8.focusedValue,\n          isFocused = _this$state8.isFocused;\n\n      if (!this.hasValue() || !controlShouldRenderValue) {\n        return inputValue ? null : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Placeholder, _extends({}, commonProps, {\n          key: \"placeholder\",\n          isDisabled: isDisabled,\n          isFocused: isFocused\n        }), placeholder);\n      }\n\n      if (isMulti) {\n        var selectValues = selectValue.map(function (opt) {\n          var isOptionFocused = opt === focusedValue;\n          return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiValue, _extends({}, commonProps, {\n            components: {\n              Container: MultiValueContainer,\n              Label: MultiValueLabel,\n              Remove: MultiValueRemove\n            },\n            isFocused: isOptionFocused,\n            isDisabled: isDisabled,\n            key: _this4.getOptionValue(opt),\n            removeProps: {\n              onClick: function onClick() {\n                return _this4.removeValue(opt);\n              },\n              onTouchEnd: function onTouchEnd() {\n                return _this4.removeValue(opt);\n              },\n              onMouseDown: function onMouseDown(e) {\n                e.preventDefault();\n                e.stopPropagation();\n              }\n            },\n            data: opt\n          }), _this4.formatOptionLabel(opt, 'value'));\n        });\n        return selectValues;\n      }\n\n      if (inputValue) {\n        return null;\n      }\n\n      var singleValue = selectValue[0];\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SingleValue, _extends({}, commonProps, {\n        data: singleValue,\n        isDisabled: isDisabled\n      }), this.formatOptionLabel(singleValue, 'value'));\n    }\n  }, {\n    key: \"renderClearIndicator\",\n    value: function renderClearIndicator() {\n      var ClearIndicator = this.components.ClearIndicator;\n      var commonProps = this.commonProps;\n      var _this$props16 = this.props,\n          isDisabled = _this$props16.isDisabled,\n          isLoading = _this$props16.isLoading;\n      var isFocused = this.state.isFocused;\n\n      if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n        return null;\n      }\n\n      var innerProps = {\n        onMouseDown: this.onClearIndicatorMouseDown,\n        onTouchEnd: this.onClearIndicatorTouchEnd,\n        'aria-hidden': 'true'\n      };\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ClearIndicator, _extends({}, commonProps, {\n        innerProps: innerProps,\n        isFocused: isFocused\n      }));\n    }\n  }, {\n    key: \"renderLoadingIndicator\",\n    value: function renderLoadingIndicator() {\n      var LoadingIndicator = this.components.LoadingIndicator;\n      var commonProps = this.commonProps;\n      var _this$props17 = this.props,\n          isDisabled = _this$props17.isDisabled,\n          isLoading = _this$props17.isLoading;\n      var isFocused = this.state.isFocused;\n      if (!LoadingIndicator || !isLoading) return null;\n      var innerProps = {\n        'aria-hidden': 'true'\n      };\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LoadingIndicator, _extends({}, commonProps, {\n        innerProps: innerProps,\n        isDisabled: isDisabled,\n        isFocused: isFocused\n      }));\n    }\n  }, {\n    key: \"renderIndicatorSeparator\",\n    value: function renderIndicatorSeparator() {\n      var _this$components2 = this.components,\n          DropdownIndicator = _this$components2.DropdownIndicator,\n          IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator\n\n      if (!DropdownIndicator || !IndicatorSeparator) return null;\n      var commonProps = this.commonProps;\n      var isDisabled = this.props.isDisabled;\n      var isFocused = this.state.isFocused;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(IndicatorSeparator, _extends({}, commonProps, {\n        isDisabled: isDisabled,\n        isFocused: isFocused\n      }));\n    }\n  }, {\n    key: \"renderDropdownIndicator\",\n    value: function renderDropdownIndicator() {\n      var DropdownIndicator = this.components.DropdownIndicator;\n      if (!DropdownIndicator) return null;\n      var commonProps = this.commonProps;\n      var isDisabled = this.props.isDisabled;\n      var isFocused = this.state.isFocused;\n      var innerProps = {\n        onMouseDown: this.onDropdownIndicatorMouseDown,\n        onTouchEnd: this.onDropdownIndicatorTouchEnd,\n        'aria-hidden': 'true'\n      };\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DropdownIndicator, _extends({}, commonProps, {\n        innerProps: innerProps,\n        isDisabled: isDisabled,\n        isFocused: isFocused\n      }));\n    }\n  }, {\n    key: \"renderMenu\",\n    value: function renderMenu() {\n      var _this5 = this;\n\n      var _this$components3 = this.components,\n          Group = _this$components3.Group,\n          GroupHeading = _this$components3.GroupHeading,\n          Menu$$1 = _this$components3.Menu,\n          MenuList$$1 = _this$components3.MenuList,\n          MenuPortal$$1 = _this$components3.MenuPortal,\n          LoadingMessage$$1 = _this$components3.LoadingMessage,\n          NoOptionsMessage$$1 = _this$components3.NoOptionsMessage,\n          Option = _this$components3.Option;\n      var commonProps = this.commonProps;\n      var _this$state9 = this.state,\n          focusedOption = _this$state9.focusedOption,\n          menuOptions = _this$state9.menuOptions;\n      var _this$props18 = this.props,\n          captureMenuScroll = _this$props18.captureMenuScroll,\n          inputValue = _this$props18.inputValue,\n          isLoading = _this$props18.isLoading,\n          loadingMessage = _this$props18.loadingMessage,\n          minMenuHeight = _this$props18.minMenuHeight,\n          maxMenuHeight = _this$props18.maxMenuHeight,\n          menuIsOpen = _this$props18.menuIsOpen,\n          menuPlacement = _this$props18.menuPlacement,\n          menuPosition = _this$props18.menuPosition,\n          menuPortalTarget = _this$props18.menuPortalTarget,\n          menuShouldBlockScroll = _this$props18.menuShouldBlockScroll,\n          menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView,\n          noOptionsMessage = _this$props18.noOptionsMessage,\n          onMenuScrollToTop = _this$props18.onMenuScrollToTop,\n          onMenuScrollToBottom = _this$props18.onMenuScrollToBottom;\n      if (!menuIsOpen) return null; // TODO: Internal Option Type here\n\n      var render = function render(props) {\n        // for performance, the menu options in state aren't changed when the\n        // focused option changes so we calculate additional props based on that\n        var isFocused = focusedOption === props.data;\n        props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined;\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Option, _extends({}, commonProps, props, {\n          isFocused: isFocused\n        }), _this5.formatOptionLabel(props.data, 'menu'));\n      };\n\n      var menuUI;\n\n      if (this.hasOptions()) {\n        menuUI = menuOptions.render.map(function (item) {\n          if (item.type === 'group') {\n            var type = item.type,\n                group = _objectWithoutProperties(item, [\"type\"]);\n\n            var headingId = \"\".concat(item.key, \"-heading\");\n            return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Group, _extends({}, commonProps, group, {\n              Heading: GroupHeading,\n              headingProps: {\n                id: headingId\n              },\n              label: _this5.formatGroupLabel(item.data)\n            }), item.options.map(function (option) {\n              return render(option);\n            }));\n          } else if (item.type === 'option') {\n            return render(item);\n          }\n        });\n      } else if (isLoading) {\n        var message = loadingMessage({\n          inputValue: inputValue\n        });\n        if (message === null) return null;\n        menuUI = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LoadingMessage$$1, commonProps, message);\n      } else {\n        var _message = noOptionsMessage({\n          inputValue: inputValue\n        });\n\n        if (_message === null) return null;\n        menuUI = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NoOptionsMessage$$1, commonProps, _message);\n      }\n\n      var menuPlacementProps = {\n        minMenuHeight: minMenuHeight,\n        maxMenuHeight: maxMenuHeight,\n        menuPlacement: menuPlacement,\n        menuPosition: menuPosition,\n        menuShouldScrollIntoView: menuShouldScrollIntoView\n      };\n      var menuElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) {\n        var ref = _ref6.ref,\n            _ref6$placerProps = _ref6.placerProps,\n            placement = _ref6$placerProps.placement,\n            maxHeight = _ref6$placerProps.maxHeight;\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Menu$$1, _extends({}, commonProps, menuPlacementProps, {\n          innerRef: ref,\n          innerProps: {\n            onMouseDown: _this5.onMenuMouseDown,\n            onMouseMove: _this5.onMenuMouseMove\n          },\n          isLoading: isLoading,\n          placement: placement\n        }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScrollCaptorSwitch, {\n          isEnabled: captureMenuScroll,\n          onTopArrive: onMenuScrollToTop,\n          onBottomArrive: onMenuScrollToBottom\n        }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScrollBlock, {\n          isEnabled: menuShouldBlockScroll\n        }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuList$$1, _extends({}, commonProps, {\n          innerRef: _this5.getMenuListRef,\n          isLoading: isLoading,\n          maxHeight: maxHeight\n        }), menuUI))));\n      }); // positioning behaviour is almost identical for portalled and fixed,\n      // so we use the same component. the actual portalling logic is forked\n      // within the component based on `menuPosition`\n\n      return menuPortalTarget || menuPosition === 'fixed' ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuPortal$$1, _extends({}, commonProps, {\n        appendTo: menuPortalTarget,\n        controlElement: this.controlRef,\n        menuPlacement: menuPlacement,\n        menuPosition: menuPosition\n      }), menuElement) : menuElement;\n    }\n  }, {\n    key: \"renderFormField\",\n    value: function renderFormField() {\n      var _this6 = this;\n\n      var _this$props19 = this.props,\n          delimiter = _this$props19.delimiter,\n          isDisabled = _this$props19.isDisabled,\n          isMulti = _this$props19.isMulti,\n          name = _this$props19.name;\n      var selectValue = this.state.selectValue;\n      if (!name || isDisabled) return;\n\n      if (isMulti) {\n        if (delimiter) {\n          var value = selectValue.map(function (opt) {\n            return _this6.getOptionValue(opt);\n          }).join(delimiter);\n          return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n            name: name,\n            type: \"hidden\",\n            value: value\n          });\n        } else {\n          var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n            return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n              key: \"i-\".concat(i),\n              name: name,\n              type: \"hidden\",\n              value: _this6.getOptionValue(opt)\n            });\n          }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n            name: name,\n            type: \"hidden\"\n          });\n          return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, input);\n        }\n      } else {\n        var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n          name: name,\n          type: \"hidden\",\n          value: _value\n        });\n      }\n    }\n  }, {\n    key: \"renderLiveRegion\",\n    value: function renderLiveRegion() {\n      if (!this.state.isFocused) return null;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(A11yText, {\n        \"aria-live\": \"assertive\"\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n        id: \"aria-selection-event\"\n      }, \"\\xA0\", this.state.ariaLiveSelection), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n        id: \"aria-context\"\n      }, \"\\xA0\", this.constructAriaLiveMessage()));\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$components4 = this.components,\n          Control = _this$components4.Control,\n          IndicatorsContainer = _this$components4.IndicatorsContainer,\n          SelectContainer = _this$components4.SelectContainer,\n          ValueContainer = _this$components4.ValueContainer;\n      var _this$props20 = this.props,\n          className = _this$props20.className,\n          id = _this$props20.id,\n          isDisabled = _this$props20.isDisabled,\n          menuIsOpen = _this$props20.menuIsOpen;\n      var isFocused = this.state.isFocused;\n      var commonProps = this.commonProps = this.getCommonProps();\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SelectContainer, _extends({}, commonProps, {\n        className: className,\n        innerProps: {\n          id: id,\n          onKeyDown: this.onKeyDown\n        },\n        isDisabled: isDisabled,\n        isFocused: isFocused\n      }), this.renderLiveRegion(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Control, _extends({}, commonProps, {\n        innerRef: this.getControlRef,\n        innerProps: {\n          onMouseDown: this.onControlMouseDown,\n          onTouchEnd: this.onControlTouchEnd\n        },\n        isDisabled: isDisabled,\n        isFocused: isFocused,\n        menuIsOpen: menuIsOpen\n      }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ValueContainer, _extends({}, commonProps, {\n        isDisabled: isDisabled\n      }), this.renderPlaceholderOrValue(), this.renderInput()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(IndicatorsContainer, _extends({}, commonProps, {\n        isDisabled: isDisabled\n      }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());\n    }\n  }]);\n\n  return Select;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n_defineProperty(Select, \"defaultProps\", defaultProps);\n\nvar defaultProps$1 = {\n  defaultInputValue: '',\n  defaultMenuIsOpen: false,\n  defaultValue: null\n};\n\nvar manageState = function manageState(SelectComponent) {\n  var _class, _temp;\n\n  return _temp = _class =\n  /*#__PURE__*/\n  function (_Component) {\n    _inherits(StateManager, _Component);\n\n    function StateManager() {\n      var _getPrototypeOf2;\n\n      var _this;\n\n      _classCallCheck(this, StateManager);\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"select\", void 0);\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n        inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,\n        menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,\n        value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue\n      });\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onChange\", function (value, actionMeta) {\n        _this.callProp('onChange', value, actionMeta);\n\n        _this.setState({\n          value: value\n        });\n      });\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onInputChange\", function (value, actionMeta) {\n        // TODO: for backwards compatibility, we allow the prop to return a new\n        // value, but now inputValue is a controllable prop we probably shouldn't\n        var newValue = _this.callProp('onInputChange', value, actionMeta);\n\n        _this.setState({\n          inputValue: newValue !== undefined ? newValue : value\n        });\n      });\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onMenuOpen\", function () {\n        _this.callProp('onMenuOpen');\n\n        _this.setState({\n          menuIsOpen: true\n        });\n      });\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onMenuClose\", function () {\n        _this.callProp('onMenuClose');\n\n        _this.setState({\n          menuIsOpen: false\n        });\n      });\n\n      return _this;\n    }\n\n    _createClass(StateManager, [{\n      key: \"focus\",\n      value: function focus() {\n        this.select.focus();\n      }\n    }, {\n      key: \"blur\",\n      value: function blur() {\n        this.select.blur();\n      } // FIXME: untyped flow code, return any\n\n    }, {\n      key: \"getProp\",\n      value: function getProp(key) {\n        return this.props[key] !== undefined ? this.props[key] : this.state[key];\n      } // FIXME: untyped flow code, return any\n\n    }, {\n      key: \"callProp\",\n      value: function callProp(name) {\n        if (typeof this.props[name] === 'function') {\n          var _this$props;\n\n          for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n            args[_key2 - 1] = arguments[_key2];\n          }\n\n          return (_this$props = this.props)[name].apply(_this$props, args);\n        }\n      }\n    }, {\n      key: \"render\",\n      value: function render() {\n        var _this2 = this;\n\n        var _this$props2 = this.props,\n            defaultInputValue = _this$props2.defaultInputValue,\n            defaultMenuIsOpen = _this$props2.defaultMenuIsOpen,\n            defaultValue = _this$props2.defaultValue,\n            props = _objectWithoutProperties(_this$props2, [\"defaultInputValue\", \"defaultMenuIsOpen\", \"defaultValue\"]);\n\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SelectComponent, _extends({}, props, {\n          ref: function ref(_ref) {\n            _this2.select = _ref;\n          },\n          inputValue: this.getProp('inputValue'),\n          menuIsOpen: this.getProp('menuIsOpen'),\n          onChange: this.onChange,\n          onInputChange: this.onInputChange,\n          onMenuClose: this.onMenuClose,\n          onMenuOpen: this.onMenuOpen,\n          value: this.getProp('value')\n        }));\n      }\n    }]);\n\n    return StateManager;\n  }(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]), _defineProperty(_class, \"defaultProps\", defaultProps$1), _temp;\n};\n\nvar defaultProps$2 = {\n  cacheOptions: false,\n  defaultOptions: false,\n  filterOption: null\n};\nvar makeAsyncSelect = function makeAsyncSelect(SelectComponent) {\n  var _class, _temp;\n\n  return _temp = _class =\n  /*#__PURE__*/\n  function (_Component) {\n    _inherits(Async, _Component);\n\n    function Async(props) {\n      var _this;\n\n      _classCallCheck(this, Async);\n\n      _this = _possibleConstructorReturn(this, _getPrototypeOf(Async).call(this));\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"select\", void 0);\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"lastRequest\", void 0);\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"mounted\", false);\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"optionsCache\", {});\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleInputChange\", function (newValue, actionMeta) {\n        var _this$props = _this.props,\n            cacheOptions = _this$props.cacheOptions,\n            onInputChange = _this$props.onInputChange; // TODO\n\n        var inputValue = handleInputChange(newValue, actionMeta, onInputChange);\n\n        if (!inputValue) {\n          delete _this.lastRequest;\n\n          _this.setState({\n            inputValue: '',\n            loadedInputValue: '',\n            loadedOptions: [],\n            isLoading: false,\n            passEmptyOptions: false\n          });\n\n          return;\n        }\n\n        if (cacheOptions && _this.optionsCache[inputValue]) {\n          _this.setState({\n            inputValue: inputValue,\n            loadedInputValue: inputValue,\n            loadedOptions: _this.optionsCache[inputValue],\n            isLoading: false,\n            passEmptyOptions: false\n          });\n        } else {\n          var request = _this.lastRequest = {};\n\n          _this.setState({\n            inputValue: inputValue,\n            isLoading: true,\n            passEmptyOptions: !_this.state.loadedInputValue\n          }, function () {\n            _this.loadOptions(inputValue, function (options) {\n              if (!_this.mounted) return;\n\n              if (options) {\n                _this.optionsCache[inputValue] = options;\n              }\n\n              if (request !== _this.lastRequest) return;\n              delete _this.lastRequest;\n\n              _this.setState({\n                isLoading: false,\n                loadedInputValue: inputValue,\n                loadedOptions: options || [],\n                passEmptyOptions: false\n              });\n            });\n          });\n        }\n\n        return inputValue;\n      });\n\n      _this.state = {\n        defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,\n        inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',\n        isLoading: props.defaultOptions === true ? true : false,\n        loadedOptions: [],\n        passEmptyOptions: false\n      };\n      return _this;\n    }\n\n    _createClass(Async, [{\n      key: \"componentDidMount\",\n      value: function componentDidMount() {\n        var _this2 = this;\n\n        this.mounted = true;\n        var defaultOptions = this.props.defaultOptions;\n        var inputValue = this.state.inputValue;\n\n        if (defaultOptions === true) {\n          this.loadOptions(inputValue, function (options) {\n            if (!_this2.mounted) return;\n            var isLoading = !!_this2.lastRequest;\n\n            _this2.setState({\n              defaultOptions: options || [],\n              isLoading: isLoading\n            });\n          });\n        }\n      }\n    }, {\n      key: \"componentWillReceiveProps\",\n      value: function componentWillReceiveProps(nextProps) {\n        // if the cacheOptions prop changes, clear the cache\n        if (nextProps.cacheOptions !== this.props.cacheOptions) {\n          this.optionsCache = {};\n        }\n\n        if (nextProps.defaultOptions !== this.props.defaultOptions) {\n          this.setState({\n            defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined\n          });\n        }\n      }\n    }, {\n      key: \"componentWillUnmount\",\n      value: function componentWillUnmount() {\n        this.mounted = false;\n      }\n    }, {\n      key: \"focus\",\n      value: function focus() {\n        this.select.focus();\n      }\n    }, {\n      key: \"blur\",\n      value: function blur() {\n        this.select.blur();\n      }\n    }, {\n      key: \"loadOptions\",\n      value: function loadOptions(inputValue, callback) {\n        var loadOptions = this.props.loadOptions;\n        if (!loadOptions) return callback();\n        var loader = loadOptions(inputValue, callback);\n\n        if (loader && typeof loader.then === 'function') {\n          loader.then(callback, function () {\n            return callback();\n          });\n        }\n      }\n    }, {\n      key: \"render\",\n      value: function render() {\n        var _this3 = this;\n\n        var _this$props2 = this.props,\n            loadOptions = _this$props2.loadOptions,\n            props = _objectWithoutProperties(_this$props2, [\"loadOptions\"]);\n\n        var _this$state = this.state,\n            defaultOptions = _this$state.defaultOptions,\n            inputValue = _this$state.inputValue,\n            isLoading = _this$state.isLoading,\n            loadedInputValue = _this$state.loadedInputValue,\n            loadedOptions = _this$state.loadedOptions,\n            passEmptyOptions = _this$state.passEmptyOptions;\n        var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SelectComponent, _extends({}, props, {\n          ref: function ref(_ref) {\n            _this3.select = _ref;\n          },\n          options: options,\n          isLoading: isLoading,\n          onInputChange: this.handleInputChange\n        }));\n      }\n    }]);\n\n    return Async;\n  }(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]), _defineProperty(_class, \"defaultProps\", defaultProps$2), _temp;\n};\nvar SelectState = manageState(Select);\nvar Async = makeAsyncSelect(SelectState);\n\nvar compareOption = function compareOption() {\n  var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n  var option = arguments.length > 1 ? arguments[1] : undefined;\n  var candidate = String(inputValue).toLowerCase();\n  var optionValue = String(option.value).toLowerCase();\n  var optionLabel = String(option.label).toLowerCase();\n  return optionValue === candidate || optionLabel === candidate;\n};\n\nvar builtins = {\n  formatCreateLabel: function formatCreateLabel(inputValue) {\n    return \"Create \\\"\".concat(inputValue, \"\\\"\");\n  },\n  isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {\n    return !(!inputValue || selectValue.some(function (option) {\n      return compareOption(inputValue, option);\n    }) || selectOptions.some(function (option) {\n      return compareOption(inputValue, option);\n    }));\n  },\n  getNewOptionData: function getNewOptionData(inputValue, optionLabel) {\n    return {\n      label: optionLabel,\n      value: inputValue,\n      __isNew__: true\n    };\n  }\n};\nvar defaultProps$3 = _objectSpread({\n  allowCreateWhileLoading: false,\n  createOptionPosition: 'last'\n}, builtins);\nvar makeCreatableSelect = function makeCreatableSelect(SelectComponent) {\n  var _class, _temp;\n\n  return _temp = _class =\n  /*#__PURE__*/\n  function (_Component) {\n    _inherits(Creatable, _Component);\n\n    function Creatable(props) {\n      var _this;\n\n      _classCallCheck(this, Creatable);\n\n      _this = _possibleConstructorReturn(this, _getPrototypeOf(Creatable).call(this, props));\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"select\", void 0);\n\n      _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onChange\", function (newValue, actionMeta) {\n        var _this$props = _this.props,\n            getNewOptionData = _this$props.getNewOptionData,\n            inputValue = _this$props.inputValue,\n            isMulti = _this$props.isMulti,\n            onChange = _this$props.onChange,\n            onCreateOption = _this$props.onCreateOption,\n            value = _this$props.value;\n\n        if (actionMeta.action !== 'select-option') {\n          return onChange(newValue, actionMeta);\n        }\n\n        var newOption = _this.state.newOption;\n        var valueArray = Array.isArray(newValue) ? newValue : [newValue];\n\n        if (valueArray[valueArray.length - 1] === newOption) {\n          if (onCreateOption) onCreateOption(inputValue);else {\n            var newOptionData = getNewOptionData(inputValue, inputValue);\n            var newActionMeta = {\n              action: 'create-option'\n            };\n\n            if (isMulti) {\n              onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);\n            } else {\n              onChange(newOptionData, newActionMeta);\n            }\n          }\n          return;\n        }\n\n        onChange(newValue, actionMeta);\n      });\n\n      var options = props.options || [];\n      _this.state = {\n        newOption: undefined,\n        options: options\n      };\n      return _this;\n    }\n\n    _createClass(Creatable, [{\n      key: \"componentWillReceiveProps\",\n      value: function componentWillReceiveProps(nextProps) {\n        var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,\n            createOptionPosition = nextProps.createOptionPosition,\n            formatCreateLabel = nextProps.formatCreateLabel,\n            getNewOptionData = nextProps.getNewOptionData,\n            inputValue = nextProps.inputValue,\n            isLoading = nextProps.isLoading,\n            isValidNewOption = nextProps.isValidNewOption,\n            value = nextProps.value;\n        var options = nextProps.options || [];\n        var newOption = this.state.newOption;\n\n        if (isValidNewOption(inputValue, cleanValue(value), options)) {\n          newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));\n        } else {\n          newOption = undefined;\n        }\n\n        this.setState({\n          newOption: newOption,\n          options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options\n        });\n      }\n    }, {\n      key: \"focus\",\n      value: function focus() {\n        this.select.focus();\n      }\n    }, {\n      key: \"blur\",\n      value: function blur() {\n        this.select.blur();\n      }\n    }, {\n      key: \"render\",\n      value: function render() {\n        var _this2 = this;\n\n        var props = _extends({}, this.props);\n\n        var options = this.state.options;\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SelectComponent, _extends({}, props, {\n          ref: function ref(_ref) {\n            _this2.select = _ref;\n          },\n          options: options,\n          onChange: this.onChange\n        }));\n      }\n    }]);\n\n    return Creatable;\n  }(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]), _defineProperty(_class, \"defaultProps\", defaultProps$3), _temp;\n}; // TODO: do this in package entrypoint\n\nvar SelectCreatable = makeCreatableSelect(Select);\nvar Creatable = manageState(SelectCreatable);\n\nvar SelectCreatable$1 = makeCreatableSelect(Select);\nvar SelectCreatableState = manageState(SelectCreatable$1);\nvar AsyncCreatable = makeAsyncSelect(SelectCreatableState);\n\n// strip transition props off before spreading onto select component\n// note we need to be explicit about innerRef for flow\nvar AnimatedInput = function AnimatedInput(WrappedComponent) {\n  return function (_ref) {\n    var inProp = _ref.in,\n        onExited = _ref.onExited,\n        appear = _ref.appear,\n        enter = _ref.enter,\n        exit = _ref.exit,\n        props = _objectWithoutProperties(_ref, [\"in\", \"onExited\", \"appear\", \"enter\", \"exit\"]);\n\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedComponent, props);\n  };\n};\n\nvar Fade = function Fade(_ref) {\n  var Tag = _ref.component,\n      _ref$duration = _ref.duration,\n      duration = _ref$duration === void 0 ? 1 : _ref$duration,\n      inProp = _ref.in,\n      onExited = _ref.onExited,\n      props = _objectWithoutProperties(_ref, [\"component\", \"duration\", \"in\", \"onExited\"]);\n\n  var transition = {\n    entering: {\n      opacity: 0\n    },\n    entered: {\n      opacity: 1,\n      transition: \"opacity \".concat(duration, \"ms\")\n    },\n    exiting: {\n      opacity: 0\n    },\n    exited: {\n      opacity: 0\n    }\n  };\n  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"Transition\"], {\n    mountOnEnter: true,\n    unmountOnExit: true,\n    in: inProp,\n    timeout: duration\n  }, function (state) {\n    var innerProps = {\n      style: _objectSpread({}, transition[state])\n    };\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Tag, _extends({\n      innerProps: innerProps\n    }, props));\n  });\n}; // ==============================\n// Collapse Transition\n// ==============================\n\nvar collapseDuration = 260;\n// wrap each MultiValue with a collapse transition; decreases width until\n// finally removing from DOM\nvar Collapse =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Collapse, _Component);\n\n  function Collapse() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, Collapse);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Collapse)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"duration\", collapseDuration);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"rafID\", void 0);\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n      width: 'auto'\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"transition\", {\n      exiting: {\n        width: 0,\n        transition: \"width \".concat(_this.duration, \"ms ease-out\")\n      },\n      exited: {\n        width: 0\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getWidth\", function (ref) {\n      if (ref && isNaN(_this.state.width)) {\n        /*\n          Here we're invoking requestAnimationFrame with a callback invoking our\n          call to getBoundingClientRect and setState in order to resolve an edge case\n          around portalling. Certain portalling solutions briefly remove children from the DOM\n          before appending them to the target node. This is to avoid us trying to call getBoundingClientrect\n          while the Select component is in this state.\n        */\n        // cannot use `offsetWidth` because it is rounded\n        _this.rafID = window.requestAnimationFrame(function () {\n          var _ref$getBoundingClien = ref.getBoundingClientRect(),\n              width = _ref$getBoundingClien.width;\n\n          _this.setState({\n            width: width\n          });\n        });\n      }\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getStyle\", function (width) {\n      return {\n        overflow: 'hidden',\n        whiteSpace: 'nowrap',\n        width: width\n      };\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getTransition\", function (state) {\n      return _this.transition[state];\n    });\n\n    return _this;\n  }\n\n  _createClass(Collapse, [{\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      if (this.rafID) {\n        window.cancelAnimationFrame(this.rafID);\n      }\n    } // width must be calculated; cannot transition from `undefined` to `number`\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n\n      var _this$props = this.props,\n          children = _this$props.children,\n          inProp = _this$props.in;\n      var width = this.state.width;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"Transition\"], {\n        enter: false,\n        mountOnEnter: true,\n        unmountOnExit: true,\n        in: inProp,\n        timeout: this.duration\n      }, function (state) {\n        var style = _objectSpread({}, _this2.getStyle(width), _this2.getTransition(state));\n\n        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n          ref: _this2.getWidth,\n          style: style\n        }, children);\n      });\n    }\n  }]);\n\n  return Collapse;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\nvar AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {\n  return function (_ref) {\n    var inProp = _ref.in,\n        onExited = _ref.onExited,\n        props = _objectWithoutProperties(_ref, [\"in\", \"onExited\"]);\n\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Collapse, {\n      in: inProp,\n      onExited: onExited\n    }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedComponent, _extends({\n      cropWithEllipsis: inProp\n    }, props)));\n  };\n};\n\nvar AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {\n  return function (props) {\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Fade, _extends({\n      component: WrappedComponent,\n      duration: props.isMulti ? collapseDuration : 1\n    }, props));\n  };\n};\n\nvar AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {\n  return function (props) {\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Fade, _extends({\n      component: WrappedComponent\n    }, props));\n  };\n};\n\n// make ValueContainer a transition group\nvar AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {\n  return function (props) {\n    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"TransitionGroup\"], _extends({\n      component: WrappedComponent\n    }, props));\n  };\n};\n\nvar makeAnimated = function makeAnimated() {\n  var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var components$$1 = defaultComponents({\n    components: externalComponents\n  });\n\n  var Input = components$$1.Input,\n      MultiValue = components$$1.MultiValue,\n      Placeholder = components$$1.Placeholder,\n      SingleValue = components$$1.SingleValue,\n      ValueContainer = components$$1.ValueContainer,\n      rest = _objectWithoutProperties(components$$1, [\"Input\", \"MultiValue\", \"Placeholder\", \"SingleValue\", \"ValueContainer\"]);\n\n  return _objectSpread({\n    Input: AnimatedInput(Input),\n    MultiValue: AnimatedMultiValue(MultiValue),\n    Placeholder: AnimatedPlaceholder(Placeholder),\n    SingleValue: AnimatedSingleValue(SingleValue),\n    ValueContainer: AnimatedValueContainer(ValueContainer)\n  }, rest);\n};\n\nvar AnimatedComponents = makeAnimated();\nvar Input$1 = AnimatedComponents.Input;\nvar MultiValue$1 = AnimatedComponents.MultiValue;\nvar Placeholder$1 = AnimatedComponents.Placeholder;\nvar SingleValue$1 = AnimatedComponents.SingleValue;\nvar ValueContainer$1 = AnimatedComponents.ValueContainer;\nvar index = Object(memoize_one__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(makeAnimated, exportedEqual);\n\nvar index$1 = manageState(Select);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index$1);\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-select/dist/react-select.esm.js?");

/***/ }),

/***/ "./node_modules/react-sequence-viewer/lib/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/react-sequence-viewer/lib/index.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _uuid = __webpack_require__(/*! uuid */ \"./node_modules/uuid/index.js\");\n\nvar _sequenceViewer = __webpack_require__(/*! sequence-viewer */ \"./node_modules/sequence-viewer/lib/index.js\");\n\nvar _sequenceViewer2 = _interopRequireDefault(_sequenceViewer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ReactSequenceViewer = function (_Component) {\n  _inherits(ReactSequenceViewer, _Component);\n\n  function ReactSequenceViewer(props) {\n    _classCallCheck(this, ReactSequenceViewer);\n\n    var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleRef = _this.handleRef.bind(_this);\n\n    if (props.selection && props.selection.length > 0 && props.coverage && props.coverage.length > 0) {\n      console.warn(\"The selection and coverage options are not compatible with each other.\");\n    }\n    // Initialize the sequence-viewer object.\n    _this._seqObj = new _sequenceViewer2.default(_this.props.sequence);\n    _this._div = null;\n    return _this;\n  }\n\n  // Function to call the render function of sequence-viewer.\n  // You can override existing props by passing an object with key value\n  // pairs to override existing props.\n  // e.g.\n  // callRender({toolbar: false})\n  // would override the existing toolbar setting.\n\n\n  ReactSequenceViewer.prototype.callRender = function callRender() {\n    var newProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var _props = this.props,\n        selection = _props.selection,\n        props = _objectWithoutProperties(_props, ['selection']);\n\n    // Read in div from private variable.\n\n\n    var div = this._div;\n\n    //Render div if it is not null.\n    if (div !== null && this.props.sequence !== null) {\n      var _seqObj;\n\n      this._seqObj.render('#' + div.id, _extends({}, props, newProps));\n      if (this.props.coverage.length > 0) this._seqObj.coverage(this.props.coverage);\n      if (this.props.legend.length > 0) this._seqObj.addLegend(this.props.legend);\n      if (selection.length > 0) (_seqObj = this._seqObj).selection.apply(_seqObj, selection);\n    }\n  };\n\n  // When the component mounts, add a change listener to the document\n  // and call render.  We attach the change listener here because\n  // jQuery events don't bubble up through React due to its synthetic event\n  // handling.  Thus, when a user toggles the charsPerLine drop down menu.\n  // the event is handled by jQuery, but not seen by React when the\n  // listener is attached at the component div level.\n  // Attaching it to the document seems to work.\n\n\n  ReactSequenceViewer.prototype.componentDidMount = function componentDidMount() {\n    document.addEventListener('change', this.handleChange);\n    this.callRender();\n    this._seqObj.onSubpartSelected(this.props.onSubpartSelected);\n    this._seqObj.onMouseSelection(this.props.onMouseSelection);\n  };\n\n  // Update the sequence-viewer object if we get a new DNA sequence.\n\n\n  ReactSequenceViewer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    if (this.props.sequence !== nextProps.sequence) {\n      this._seqObj = new _sequenceViewer2.default(nextProps.sequence);\n    }\n  };\n\n  // Re-render if the component has updated.\n\n\n  ReactSequenceViewer.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n    if (this.props !== prevProps) {\n      this.callRender();\n    }\n  };\n\n  // Remove the event listener when the component is unmounted.\n\n\n  ReactSequenceViewer.prototype.componentWillUnmount = function componentWillUnmount() {\n    document.removeEventListener('change', this.handleChange);\n  };\n\n  // Function called when the user changes the charsPerLine setting via the toolbar.\n\n\n  ReactSequenceViewer.prototype.handleChange = function handleChange(e) {\n    var elem = e.target;\n    // Check that the event was triggered by the right <select> button.\n    if ((\" \" + elem.className + \" \").indexOf(\" \" + this.props.seqLenClass + \" \") > -1) {\n      // Call render and override the charsPerLine setting with whatever the user specified.\n      this.callRender({ charsPerLine: elem.value });\n    }\n  };\n\n  ReactSequenceViewer.prototype.handleRef = function handleRef(div) {\n    this._div = div;\n  };\n\n  // Render a div with the sequence-viwer widget in it.\n\n\n  ReactSequenceViewer.prototype.render = function render() {\n    var _props2 = this.props,\n        id = _props2.id,\n        sequence = _props2.sequence,\n        className = _props2.className;\n    // Create the container div and store a reference to it once it is mounted\n    // in the DOM.  The componentDidMount function above will then get called\n    // and render the widget.\n\n    return _react2.default.createElement('div', { className: className, id: this.props.id, ref: this.handleRef });\n  };\n\n  return ReactSequenceViewer;\n}(_react.Component);\n\nexports.default = ReactSequenceViewer;\n\n\nReactSequenceViewer.propTypes =  true ? {\n  id: _propTypes2.default.string,\n  sequence: _propTypes2.default.string.isRequired,\n  className: _propTypes2.default.string,\n  selection: _propTypes2.default.arrayOf(function (arr, key, compName, location, propFullName) {\n    if (arr.length !== 3) {\n      return new Error('Invalid prop `selection` supplied to `' + compName + '`. Validation failed.');\n    }\n  }),\n  coverage: _propTypes2.default.arrayOf(_propTypes2.default.shape({\n    start: _propTypes2.default.number.isRequired,\n    end: _propTypes2.default.number.isRequired,\n    color: _propTypes2.default.string,\n    bgcolor: _propTypes2.default.string,\n    underscore: _propTypes2.default.bool,\n    tooltip: _propTypes2.default.string,\n    onclick: _propTypes2.default.func\n  })),\n  legend: _propTypes2.default.arrayOf(_propTypes2.default.shape({\n    name: _propTypes2.default.string,\n    color: _propTypes2.default.string,\n    underscore: _propTypes2.default.bool\n  })),\n  seqLenClass: _propTypes2.default.string,\n  onMouseSelection: _propTypes2.default.func,\n  onSubpartSelected: _propTypes2.default.func\n} : undefined;\n\nReactSequenceViewer.defaultProps = {\n  id: (0, _uuid.v4)(),\n  coverage: [],\n  legend: [],\n  selection: [],\n  seqLenClass: \"CPLChoice\",\n  onMouseSelection: function onMouseSelection(elem) {},\n  onSubpartSelected: function onSubpartSelected(elem) {},\n  className: ''\n};\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-sequence-viewer/lib/index.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/CSSTransition.js":
/*!**************************************************************!*\
  !*** ./node_modules/react-transition-group/CSSTransition.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _addClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/addClass */ \"./node_modules/dom-helpers/class/addClass.js\"));\n\nvar _removeClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/removeClass */ \"./node_modules/dom-helpers/class/removeClass.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/Transition.js\"));\n\nvar _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/utils/PropTypes.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar addClass = function addClass(node, classes) {\n  return node && classes && classes.split(' ').forEach(function (c) {\n    return (0, _addClass.default)(node, c);\n  });\n};\n\nvar removeClass = function removeClass(node, classes) {\n  return node && classes && classes.split(' ').forEach(function (c) {\n    return (0, _removeClass.default)(node, c);\n  });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](http://www.nganimate.org/) library, you should use it if you're\n * using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n *   const [inProp, setInProp] = useState(false);\n *   return (\n *     <div>\n *       <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n *         <div>\n *           {\"I'll receive my-node-* classes\"}\n *         </div>\n *       </CSSTransition>\n *       <button type=\"button\" onClick={() => setInProp(true)}>\n *         Click to Enter\n *       </button>\n *     </div>\n *   );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n *   opacity: 0;\n * }\n * .my-node-enter-active {\n *   opacity: 1;\n *   transition: opacity 200ms;\n * }\n * .my-node-exit {\n *   opacity: 1;\n * }\n * .my-node-exit-active {\n *   opacity: 0;\n *   transition: opacity: 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**.\n */\n\n\nvar CSSTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(CSSTransition, _React$Component);\n\n  function CSSTransition() {\n    var _this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n    _this.onEnter = function (node, appearing) {\n      var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),\n          className = _this$getClassNames.className;\n\n      _this.removeClasses(node, 'exit');\n\n      addClass(node, className);\n\n      if (_this.props.onEnter) {\n        _this.props.onEnter(node, appearing);\n      }\n    };\n\n    _this.onEntering = function (node, appearing) {\n      var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),\n          activeClassName = _this$getClassNames2.activeClassName;\n\n      _this.reflowAndAddClass(node, activeClassName);\n\n      if (_this.props.onEntering) {\n        _this.props.onEntering(node, appearing);\n      }\n    };\n\n    _this.onEntered = function (node, appearing) {\n      var appearClassName = _this.getClassNames('appear').doneClassName;\n\n      var enterClassName = _this.getClassNames('enter').doneClassName;\n\n      var doneClassName = appearing ? appearClassName + \" \" + enterClassName : enterClassName;\n\n      _this.removeClasses(node, appearing ? 'appear' : 'enter');\n\n      addClass(node, doneClassName);\n\n      if (_this.props.onEntered) {\n        _this.props.onEntered(node, appearing);\n      }\n    };\n\n    _this.onExit = function (node) {\n      var _this$getClassNames3 = _this.getClassNames('exit'),\n          className = _this$getClassNames3.className;\n\n      _this.removeClasses(node, 'appear');\n\n      _this.removeClasses(node, 'enter');\n\n      addClass(node, className);\n\n      if (_this.props.onExit) {\n        _this.props.onExit(node);\n      }\n    };\n\n    _this.onExiting = function (node) {\n      var _this$getClassNames4 = _this.getClassNames('exit'),\n          activeClassName = _this$getClassNames4.activeClassName;\n\n      _this.reflowAndAddClass(node, activeClassName);\n\n      if (_this.props.onExiting) {\n        _this.props.onExiting(node);\n      }\n    };\n\n    _this.onExited = function (node) {\n      var _this$getClassNames5 = _this.getClassNames('exit'),\n          doneClassName = _this$getClassNames5.doneClassName;\n\n      _this.removeClasses(node, 'exit');\n\n      addClass(node, doneClassName);\n\n      if (_this.props.onExited) {\n        _this.props.onExited(node);\n      }\n    };\n\n    _this.getClassNames = function (type) {\n      var classNames = _this.props.classNames;\n      var isStringClassNames = typeof classNames === 'string';\n      var prefix = isStringClassNames && classNames ? classNames + '-' : '';\n      var className = isStringClassNames ? prefix + type : classNames[type];\n      var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];\n      var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];\n      return {\n        className: className,\n        activeClassName: activeClassName,\n        doneClassName: doneClassName\n      };\n    };\n\n    return _this;\n  }\n\n  var _proto = CSSTransition.prototype;\n\n  _proto.removeClasses = function removeClasses(node, type) {\n    var _this$getClassNames6 = this.getClassNames(type),\n        className = _this$getClassNames6.className,\n        activeClassName = _this$getClassNames6.activeClassName,\n        doneClassName = _this$getClassNames6.doneClassName;\n\n    className && removeClass(node, className);\n    activeClassName && removeClass(node, activeClassName);\n    doneClassName && removeClass(node, doneClassName);\n  };\n\n  _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {\n    // This is for to force a repaint,\n    // which is necessary in order to transition styles when adding a class name.\n    if (className) {\n      /* eslint-disable no-unused-expressions */\n      node && node.scrollTop;\n      /* eslint-enable no-unused-expressions */\n\n      addClass(node, className);\n    }\n  };\n\n  _proto.render = function render() {\n    var props = _extends({}, this.props);\n\n    delete props.classNames;\n    return _react.default.createElement(_Transition.default, _extends({}, props, {\n      onEnter: this.onEnter,\n      onEntered: this.onEntered,\n      onEntering: this.onEntering,\n      onExit: this.onExit,\n      onExiting: this.onExiting,\n      onExited: this.onExited\n    }));\n  };\n\n  return CSSTransition;\n}(_react.default.Component);\n\nCSSTransition.defaultProps = {\n  classNames: ''\n};\nCSSTransition.propTypes =  true ? _extends({}, _Transition.default.propTypes, {\n  /**\n   * The animation classNames applied to the component as it enters, exits or\n   * has finished the transition. A single name can be provided and it will be\n   * suffixed for each stage: e.g.\n   *\n   * `classNames=\"fade\"` applies `fade-enter`, `fade-enter-active`,\n   * `fade-enter-done`, `fade-exit`, `fade-exit-active`, `fade-exit-done`,\n   * `fade-appear`, `fade-appear-active`, and `fade-appear-done`.\n   *\n   * **Note**: `fade-appear-done` and `fade-enter-done` will _both_ be applied.\n   * This allows you to define different behavior for when appearing is done and\n   * when regular entering is done, using selectors like\n   * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply an\n   * epic entrance animation when element first appears in the DOM using\n   * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n   * simply use `fade-enter-done` for defining both cases.\n   *\n   * Each individual classNames can also be specified independently like:\n   *\n   * ```js\n   * classNames={{\n   *  appear: 'my-appear',\n   *  appearActive: 'my-active-appear',\n   *  appearDone: 'my-done-appear',\n   *  enter: 'my-enter',\n   *  enterActive: 'my-active-enter',\n   *  enterDone: 'my-done-enter',\n   *  exit: 'my-exit',\n   *  exitActive: 'my-active-exit',\n   *  exitDone: 'my-done-exit',\n   * }}\n   * ```\n   *\n   * If you want to set these classes using CSS Modules:\n   *\n   * ```js\n   * import styles from './styles.css';\n   * ```\n   *\n   * you might want to use camelCase in your CSS file, that way could simply\n   * spread them instead of listing them one by one:\n   *\n   * ```js\n   * classNames={{ ...styles }}\n   * ```\n   *\n   * @type {string | {\n   *  appear?: string,\n   *  appearActive?: string,\n   *  appearDone?: string,\n   *  enter?: string,\n   *  enterActive?: string,\n   *  enterDone?: string,\n   *  exit?: string,\n   *  exitActive?: string,\n   *  exitDone?: string,\n   * }}\n   */\n  classNames: _PropTypes.classNamesShape,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n   * applied.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEnter: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter-active' or\n   * 'appear-active' class is applied.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEntering: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter' or\n   * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEntered: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit' class is\n   * applied.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExit: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExiting: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit' classes\n   * are **removed** and the `exit-done` class is added to the DOM node.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExited: PropTypes.func\n}) : undefined;\nvar _default = CSSTransition;\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/CSSTransition.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/ReplaceTransition.js":
/*!******************************************************************!*\
  !*** ./node_modules/react-transition-group/ReplaceTransition.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"react-dom\");\n\nvar _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/TransitionGroup.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * The `<ReplaceTransition>` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * <ReplaceTransition in>\n *   <Fade><div>I appear first</div></Fade>\n *   <Fade><div>I replace the above</div></Fade>\n * </ReplaceTransition>\n * ```\n */\nvar ReplaceTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(ReplaceTransition, _React$Component);\n\n  function ReplaceTransition() {\n    var _this;\n\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n\n    _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n\n    _this.handleEnter = function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return _this.handleLifecycle('onEnter', 0, args);\n    };\n\n    _this.handleEntering = function () {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      return _this.handleLifecycle('onEntering', 0, args);\n    };\n\n    _this.handleEntered = function () {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      return _this.handleLifecycle('onEntered', 0, args);\n    };\n\n    _this.handleExit = function () {\n      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n        args[_key5] = arguments[_key5];\n      }\n\n      return _this.handleLifecycle('onExit', 1, args);\n    };\n\n    _this.handleExiting = function () {\n      for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n        args[_key6] = arguments[_key6];\n      }\n\n      return _this.handleLifecycle('onExiting', 1, args);\n    };\n\n    _this.handleExited = function () {\n      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n        args[_key7] = arguments[_key7];\n      }\n\n      return _this.handleLifecycle('onExited', 1, args);\n    };\n\n    return _this;\n  }\n\n  var _proto = ReplaceTransition.prototype;\n\n  _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n    var _child$props;\n\n    var children = this.props.children;\n\n    var child = _react.default.Children.toArray(children)[idx];\n\n    if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n    if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this));\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        children = _this$props.children,\n        inProp = _this$props.in,\n        props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\"]);\n\n    var _React$Children$toArr = _react.default.Children.toArray(children),\n        first = _React$Children$toArr[0],\n        second = _React$Children$toArr[1];\n\n    delete props.onEnter;\n    delete props.onEntering;\n    delete props.onEntered;\n    delete props.onExit;\n    delete props.onExiting;\n    delete props.onExited;\n    return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {\n      key: 'first',\n      onEnter: this.handleEnter,\n      onEntering: this.handleEntering,\n      onEntered: this.handleEntered\n    }) : _react.default.cloneElement(second, {\n      key: 'second',\n      onEnter: this.handleExit,\n      onEntering: this.handleExiting,\n      onEntered: this.handleExited\n    }));\n  };\n\n  return ReplaceTransition;\n}(_react.default.Component);\n\nReplaceTransition.propTypes =  true ? {\n  in: _propTypes.default.bool.isRequired,\n  children: function children(props, propName) {\n    if (_react.default.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n    return null;\n  }\n} : undefined;\nvar _default = ReplaceTransition;\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/ReplaceTransition.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/Transition.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-transition-group/Transition.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;\n\nvar PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ \"react-dom\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/utils/PropTypes.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = 'unmounted';\nexports.UNMOUNTED = UNMOUNTED;\nvar EXITED = 'exited';\nexports.EXITED = EXITED;\nvar ENTERING = 'entering';\nexports.ENTERING = ENTERING;\nvar ENTERED = 'entered';\nexports.ENTERED = ENTERED;\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n *   transition: `opacity ${duration}ms ease-in-out`,\n *   opacity: 0,\n * }\n *\n * const transitionStyles = {\n *   entering: { opacity: 0 },\n *   entered:  { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n *   <Transition in={inProp} timeout={duration}>\n *     {state => (\n *       <div style={{\n *         ...defaultStyle,\n *         ...transitionStyles[state]\n *       }}>\n *         I'm a fade Transition!\n *       </div>\n *     )}\n *   </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n *  - `'entering'`\n *  - `'entered'`\n *  - `'exiting'`\n *  - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n *   const [inProp, setInProp] = useState(false);\n *   return (\n *     <div>\n *       <Transition in={inProp} timeout={500}>\n *         {state => (\n *           // ...\n *         )}\n *       </Transition>\n *       <button onClick={() => setInProp(true)}>\n *         Click to Enter\n *       </button>\n *     </div>\n *   );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nexports.EXITING = EXITING;\n\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(Transition, _React$Component);\n\n  function Transition(props, context) {\n    var _this;\n\n    _this = _React$Component.call(this, props, context) || this;\n    var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears\n\n    var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n    var initialStatus;\n    _this.appearStatus = null;\n\n    if (props.in) {\n      if (appear) {\n        initialStatus = EXITED;\n        _this.appearStatus = ENTERING;\n      } else {\n        initialStatus = ENTERED;\n      }\n    } else {\n      if (props.unmountOnExit || props.mountOnEnter) {\n        initialStatus = UNMOUNTED;\n      } else {\n        initialStatus = EXITED;\n      }\n    }\n\n    _this.state = {\n      status: initialStatus\n    };\n    _this.nextCallback = null;\n    return _this;\n  }\n\n  var _proto = Transition.prototype;\n\n  _proto.getChildContext = function getChildContext() {\n    return {\n      transitionGroup: null // allows for nested Transitions\n\n    };\n  };\n\n  Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n    var nextIn = _ref.in;\n\n    if (nextIn && prevState.status === UNMOUNTED) {\n      return {\n        status: EXITED\n      };\n    }\n\n    return null;\n  }; // getSnapshotBeforeUpdate(prevProps) {\n  //   let nextStatus = null\n  //   if (prevProps !== this.props) {\n  //     const { status } = this.state\n  //     if (this.props.in) {\n  //       if (status !== ENTERING && status !== ENTERED) {\n  //         nextStatus = ENTERING\n  //       }\n  //     } else {\n  //       if (status === ENTERING || status === ENTERED) {\n  //         nextStatus = EXITING\n  //       }\n  //     }\n  //   }\n  //   return { nextStatus }\n  // }\n\n\n  _proto.componentDidMount = function componentDidMount() {\n    this.updateStatus(true, this.appearStatus);\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var nextStatus = null;\n\n    if (prevProps !== this.props) {\n      var status = this.state.status;\n\n      if (this.props.in) {\n        if (status !== ENTERING && status !== ENTERED) {\n          nextStatus = ENTERING;\n        }\n      } else {\n        if (status === ENTERING || status === ENTERED) {\n          nextStatus = EXITING;\n        }\n      }\n    }\n\n    this.updateStatus(false, nextStatus);\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    this.cancelNextCallback();\n  };\n\n  _proto.getTimeouts = function getTimeouts() {\n    var timeout = this.props.timeout;\n    var exit, enter, appear;\n    exit = enter = appear = timeout;\n\n    if (timeout != null && typeof timeout !== 'number') {\n      exit = timeout.exit;\n      enter = timeout.enter; // TODO: remove fallback for next major\n\n      appear = timeout.appear !== undefined ? timeout.appear : enter;\n    }\n\n    return {\n      exit: exit,\n      enter: enter,\n      appear: appear\n    };\n  };\n\n  _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n    if (mounting === void 0) {\n      mounting = false;\n    }\n\n    if (nextStatus !== null) {\n      // nextStatus will always be ENTERING or EXITING.\n      this.cancelNextCallback();\n\n      var node = _reactDom.default.findDOMNode(this);\n\n      if (nextStatus === ENTERING) {\n        this.performEnter(node, mounting);\n      } else {\n        this.performExit(node);\n      }\n    } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n      this.setState({\n        status: UNMOUNTED\n      });\n    }\n  };\n\n  _proto.performEnter = function performEnter(node, mounting) {\n    var _this2 = this;\n\n    var enter = this.props.enter;\n    var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n    var timeouts = this.getTimeouts();\n    var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n    // if we are mounting and running this it means appear _must_ be set\n\n    if (!mounting && !enter) {\n      this.safeSetState({\n        status: ENTERED\n      }, function () {\n        _this2.props.onEntered(node);\n      });\n      return;\n    }\n\n    this.props.onEnter(node, appearing);\n    this.safeSetState({\n      status: ENTERING\n    }, function () {\n      _this2.props.onEntering(node, appearing);\n\n      _this2.onTransitionEnd(node, enterTimeout, function () {\n        _this2.safeSetState({\n          status: ENTERED\n        }, function () {\n          _this2.props.onEntered(node, appearing);\n        });\n      });\n    });\n  };\n\n  _proto.performExit = function performExit(node) {\n    var _this3 = this;\n\n    var exit = this.props.exit;\n    var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n    if (!exit) {\n      this.safeSetState({\n        status: EXITED\n      }, function () {\n        _this3.props.onExited(node);\n      });\n      return;\n    }\n\n    this.props.onExit(node);\n    this.safeSetState({\n      status: EXITING\n    }, function () {\n      _this3.props.onExiting(node);\n\n      _this3.onTransitionEnd(node, timeouts.exit, function () {\n        _this3.safeSetState({\n          status: EXITED\n        }, function () {\n          _this3.props.onExited(node);\n        });\n      });\n    });\n  };\n\n  _proto.cancelNextCallback = function cancelNextCallback() {\n    if (this.nextCallback !== null) {\n      this.nextCallback.cancel();\n      this.nextCallback = null;\n    }\n  };\n\n  _proto.safeSetState = function safeSetState(nextState, callback) {\n    // This shouldn't be necessary, but there are weird race conditions with\n    // setState callbacks and unmounting in testing, so always make sure that\n    // we can cancel any pending setState callbacks after we unmount.\n    callback = this.setNextCallback(callback);\n    this.setState(nextState, callback);\n  };\n\n  _proto.setNextCallback = function setNextCallback(callback) {\n    var _this4 = this;\n\n    var active = true;\n\n    this.nextCallback = function (event) {\n      if (active) {\n        active = false;\n        _this4.nextCallback = null;\n        callback(event);\n      }\n    };\n\n    this.nextCallback.cancel = function () {\n      active = false;\n    };\n\n    return this.nextCallback;\n  };\n\n  _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n    this.setNextCallback(handler);\n    var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n    if (!node || doesNotHaveTimeoutOrListener) {\n      setTimeout(this.nextCallback, 0);\n      return;\n    }\n\n    if (this.props.addEndListener) {\n      this.props.addEndListener(node, this.nextCallback);\n    }\n\n    if (timeout != null) {\n      setTimeout(this.nextCallback, timeout);\n    }\n  };\n\n  _proto.render = function render() {\n    var status = this.state.status;\n\n    if (status === UNMOUNTED) {\n      return null;\n    }\n\n    var _this$props = this.props,\n        children = _this$props.children,\n        childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // filter props for Transtition\n\n\n    delete childProps.in;\n    delete childProps.mountOnEnter;\n    delete childProps.unmountOnExit;\n    delete childProps.appear;\n    delete childProps.enter;\n    delete childProps.exit;\n    delete childProps.timeout;\n    delete childProps.addEndListener;\n    delete childProps.onEnter;\n    delete childProps.onEntering;\n    delete childProps.onEntered;\n    delete childProps.onExit;\n    delete childProps.onExiting;\n    delete childProps.onExited;\n\n    if (typeof children === 'function') {\n      return children(status, childProps);\n    }\n\n    var child = _react.default.Children.only(children);\n\n    return _react.default.cloneElement(child, childProps);\n  };\n\n  return Transition;\n}(_react.default.Component);\n\nTransition.contextTypes = {\n  transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n  transitionGroup: function transitionGroup() {}\n};\nTransition.propTypes =  true ? {\n  /**\n   * A `function` child can be used instead of a React element. This function is\n   * called with the current transition status (`'entering'`, `'entered'`,\n   * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context\n   * specific props to a component.\n   *\n   * ```jsx\n   * <Transition in={this.state.in} timeout={150}>\n   *   {state => (\n   *     <MyComponent className={`fade fade-${state}`} />\n   *   )}\n   * </Transition>\n   * ```\n   */\n  children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n  /**\n   * Show the component; triggers the enter or exit states\n   */\n  in: PropTypes.bool,\n\n  /**\n   * By default the child component is mounted immediately along with\n   * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n   * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n   * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n   */\n  mountOnEnter: PropTypes.bool,\n\n  /**\n   * By default the child component stays mounted after it reaches the `'exited'` state.\n   * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n   */\n  unmountOnExit: PropTypes.bool,\n\n  /**\n   * Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.\n   * If you want to transition on the first mount set `appear` to `true`, and the\n   * component will transition in as soon as the `<Transition>` mounts.\n   *\n   * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n   */\n  appear: PropTypes.bool,\n\n  /**\n   * Enable or disable enter transitions.\n   */\n  enter: PropTypes.bool,\n\n  /**\n   * Enable or disable exit transitions.\n   */\n  exit: PropTypes.bool,\n\n  /**\n   * The duration of the transition, in milliseconds.\n   * Required unless `addEndListener` is provided.\n   *\n   * You may specify a single timeout for all transitions:\n   *\n   * ```jsx\n   * timeout={500}\n   * ```\n   *\n   * or individually:\n   *\n   * ```jsx\n   * timeout={{\n   *  appear: 500,\n   *  enter: 300,\n   *  exit: 500,\n   * }}\n   * ```\n   *\n   * - `appear` defaults to the value of `enter`\n   * - `enter` defaults to `0`\n   * - `exit` defaults to `0`\n   *\n   * @type {number | { enter?: number, exit?: number, appear?: number }}\n   */\n  timeout: function timeout(props) {\n    var pt = _PropTypes.timeoutsShape;\n    if (!props.addEndListener) pt = pt.isRequired;\n\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    return pt.apply(void 0, [props].concat(args));\n  },\n\n  /**\n   * Add a custom transition end trigger. Called with the transitioning\n   * DOM node and a `done` callback. Allows for more fine grained transition end\n   * logic. **Note:** Timeouts are still used as a fallback if provided.\n   *\n   * ```jsx\n   * addEndListener={(node, done) => {\n   *   // use the css transitionend event to mark the finish of a transition\n   *   node.addEventListener('transitionend', done, false);\n   * }}\n   * ```\n   */\n  addEndListener: PropTypes.func,\n\n  /**\n   * Callback fired before the \"entering\" status is applied. An extra parameter\n   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool) -> void\n   */\n  onEnter: PropTypes.func,\n\n  /**\n   * Callback fired after the \"entering\" status is applied. An extra parameter\n   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEntering: PropTypes.func,\n\n  /**\n   * Callback fired after the \"entered\" status is applied. An extra parameter\n   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool) -> void\n   */\n  onEntered: PropTypes.func,\n\n  /**\n   * Callback fired before the \"exiting\" status is applied.\n   *\n   * @type Function(node: HtmlElement) -> void\n   */\n  onExit: PropTypes.func,\n\n  /**\n   * Callback fired after the \"exiting\" status is applied.\n   *\n   * @type Function(node: HtmlElement) -> void\n   */\n  onExiting: PropTypes.func,\n\n  /**\n   * Callback fired after the \"exited\" status is applied.\n   *\n   * @type Function(node: HtmlElement) -> void\n   */\n  onExited: PropTypes.func // Name the function so it is clearer in the documentation\n\n} : undefined;\n\nfunction noop() {}\n\nTransition.defaultProps = {\n  in: false,\n  mountOnEnter: false,\n  unmountOnExit: false,\n  appear: false,\n  enter: true,\n  exit: true,\n  onEnter: noop,\n  onEntering: noop,\n  onEntered: noop,\n  onExit: noop,\n  onExiting: noop,\n  onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(Transition);\n\nexports.default = _default;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/Transition.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/TransitionGroup.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-transition-group/TransitionGroup.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _ChildMapping = __webpack_require__(/*! ./utils/ChildMapping */ \"./node_modules/react-transition-group/utils/ChildMapping.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nvar values = Object.values || function (obj) {\n  return Object.keys(obj).map(function (k) {\n    return obj[k];\n  });\n};\n\nvar defaultProps = {\n  component: 'div',\n  childFactory: function childFactory(child) {\n    return child;\n  }\n  /**\n   * The `<TransitionGroup>` component manages a set of transition components\n   * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n   * components, `<TransitionGroup>` is a state machine for managing the mounting\n   * and unmounting of components over time.\n   *\n   * Consider the example below. As items are removed or added to the TodoList the\n   * `in` prop is toggled automatically by the `<TransitionGroup>`.\n   *\n   * Note that `<TransitionGroup>`  does not define any animation behavior!\n   * Exactly _how_ a list item animates is up to the individual transition\n   * component. This means you can mix and match animations across different list\n   * items.\n   */\n\n};\n\nvar TransitionGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(TransitionGroup, _React$Component);\n\n  function TransitionGroup(props, context) {\n    var _this;\n\n    _this = _React$Component.call(this, props, context) || this;\n\n    var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear\n\n\n    _this.state = {\n      handleExited: handleExited,\n      firstRender: true\n    };\n    return _this;\n  }\n\n  var _proto = TransitionGroup.prototype;\n\n  _proto.getChildContext = function getChildContext() {\n    return {\n      transitionGroup: {\n        isMounting: !this.appeared\n      }\n    };\n  };\n\n  _proto.componentDidMount = function componentDidMount() {\n    this.appeared = true;\n    this.mounted = true;\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    this.mounted = false;\n  };\n\n  TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n    var prevChildMapping = _ref.children,\n        handleExited = _ref.handleExited,\n        firstRender = _ref.firstRender;\n    return {\n      children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),\n      firstRender: false\n    };\n  };\n\n  _proto.handleExited = function handleExited(child, node) {\n    var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n    if (child.key in currentChildMapping) return;\n\n    if (child.props.onExited) {\n      child.props.onExited(node);\n    }\n\n    if (this.mounted) {\n      this.setState(function (state) {\n        var children = _extends({}, state.children);\n\n        delete children[child.key];\n        return {\n          children: children\n        };\n      });\n    }\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        Component = _this$props.component,\n        childFactory = _this$props.childFactory,\n        props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n    var children = values(this.state.children).map(childFactory);\n    delete props.appear;\n    delete props.enter;\n    delete props.exit;\n\n    if (Component === null) {\n      return children;\n    }\n\n    return _react.default.createElement(Component, props, children);\n  };\n\n  return TransitionGroup;\n}(_react.default.Component);\n\nTransitionGroup.childContextTypes = {\n  transitionGroup: _propTypes.default.object.isRequired\n};\nTransitionGroup.propTypes =  true ? {\n  /**\n   * `<TransitionGroup>` renders a `<div>` by default. You can change this\n   * behavior by providing a `component` prop.\n   * If you use React v16+ and would like to avoid a wrapping `<div>` element\n   * you can pass in `component={null}`. This is useful if the wrapping div\n   * borks your css styles.\n   */\n  component: _propTypes.default.any,\n\n  /**\n   * A set of `<Transition>` components, that are toggled `in` and out as they\n   * leave. the `<TransitionGroup>` will inject specific transition props, so\n   * remember to spread them through if you are wrapping the `<Transition>` as\n   * with our `<Fade>` example.\n   *\n   * While this component is meant for multiple `Transition` or `CSSTransition`\n   * children, sometimes you may want to have a single transition child with\n   * content that you want to be transitioned out and in when you change it\n   * (e.g. routes, images etc.) In that case you can change the `key` prop of\n   * the transition child as you change its content, this will cause\n   * `TransitionGroup` to transition the child out and back in.\n   */\n  children: _propTypes.default.node,\n\n  /**\n   * A convenience prop that enables or disables appear animations\n   * for all children. Note that specifying this will override any defaults set\n   * on individual children Transitions.\n   */\n  appear: _propTypes.default.bool,\n\n  /**\n   * A convenience prop that enables or disables enter animations\n   * for all children. Note that specifying this will override any defaults set\n   * on individual children Transitions.\n   */\n  enter: _propTypes.default.bool,\n\n  /**\n   * A convenience prop that enables or disables exit animations\n   * for all children. Note that specifying this will override any defaults set\n   * on individual children Transitions.\n   */\n  exit: _propTypes.default.bool,\n\n  /**\n   * You may need to apply reactive updates to a child as it is exiting.\n   * This is generally done by using `cloneElement` however in the case of an exiting\n   * child the element has already been removed and not accessible to the consumer.\n   *\n   * If you do need to update a child as it leaves you can provide a `childFactory`\n   * to wrap every child, even the ones that are leaving.\n   *\n   * @type Function(child: ReactElement) -> ReactElement\n   */\n  childFactory: _propTypes.default.func\n} : undefined;\nTransitionGroup.defaultProps = defaultProps;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/TransitionGroup.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/index.js":
/*!******************************************************!*\
  !*** ./node_modules/react-transition-group/index.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _CSSTransition = _interopRequireDefault(__webpack_require__(/*! ./CSSTransition */ \"./node_modules/react-transition-group/CSSTransition.js\"));\n\nvar _ReplaceTransition = _interopRequireDefault(__webpack_require__(/*! ./ReplaceTransition */ \"./node_modules/react-transition-group/ReplaceTransition.js\"));\n\nvar _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/TransitionGroup.js\"));\n\nvar _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/Transition.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = {\n  Transition: _Transition.default,\n  TransitionGroup: _TransitionGroup.default,\n  ReplaceTransition: _ReplaceTransition.default,\n  CSSTransition: _CSSTransition.default\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/index.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/utils/ChildMapping.js":
/*!*******************************************************************!*\
  !*** ./node_modules/react-transition-group/utils/ChildMapping.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\nexports.getInitialChildMapping = getInitialChildMapping;\nexports.getNextChildMapping = getNextChildMapping;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n  var mapper = function mapper(child) {\n    return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n  };\n\n  var result = Object.create(null);\n  if (children) _react.Children.map(children, function (c) {\n    return c;\n  }).forEach(function (child) {\n    // run the map function here instead so that the key is the computed one\n    result[child.key] = mapper(child);\n  });\n  return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\n\nfunction mergeChildMappings(prev, next) {\n  prev = prev || {};\n  next = next || {};\n\n  function getValueForKey(key) {\n    return key in next ? next[key] : prev[key];\n  } // For each key of `next`, the list of keys to insert before that key in\n  // the combined list\n\n\n  var nextKeysPending = Object.create(null);\n  var pendingKeys = [];\n\n  for (var prevKey in prev) {\n    if (prevKey in next) {\n      if (pendingKeys.length) {\n        nextKeysPending[prevKey] = pendingKeys;\n        pendingKeys = [];\n      }\n    } else {\n      pendingKeys.push(prevKey);\n    }\n  }\n\n  var i;\n  var childMapping = {};\n\n  for (var nextKey in next) {\n    if (nextKeysPending[nextKey]) {\n      for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n        var pendingNextKey = nextKeysPending[nextKey][i];\n        childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n      }\n    }\n\n    childMapping[nextKey] = getValueForKey(nextKey);\n  } // Finally, add the keys which didn't appear before any key in `next`\n\n\n  for (i = 0; i < pendingKeys.length; i++) {\n    childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n  }\n\n  return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n  return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nfunction getInitialChildMapping(props, onExited) {\n  return getChildMapping(props.children, function (child) {\n    return (0, _react.cloneElement)(child, {\n      onExited: onExited.bind(null, child),\n      in: true,\n      appear: getProp(child, 'appear', props),\n      enter: getProp(child, 'enter', props),\n      exit: getProp(child, 'exit', props)\n    });\n  });\n}\n\nfunction getNextChildMapping(nextProps, prevChildMapping, onExited) {\n  var nextChildMapping = getChildMapping(nextProps.children);\n  var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n  Object.keys(children).forEach(function (key) {\n    var child = children[key];\n    if (!(0, _react.isValidElement)(child)) return;\n    var hasPrev = key in prevChildMapping;\n    var hasNext = key in nextChildMapping;\n    var prevChild = prevChildMapping[key];\n    var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)\n\n    if (hasNext && (!hasPrev || isLeaving)) {\n      // console.log('entering', key)\n      children[key] = (0, _react.cloneElement)(child, {\n        onExited: onExited.bind(null, child),\n        in: true,\n        exit: getProp(child, 'exit', nextProps),\n        enter: getProp(child, 'enter', nextProps)\n      });\n    } else if (!hasNext && hasPrev && !isLeaving) {\n      // item is old (exiting)\n      // console.log('leaving', key)\n      children[key] = (0, _react.cloneElement)(child, {\n        in: false\n      });\n    } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n      // item hasn't changed transition states\n      // copy over the last transition props;\n      // console.log('unchanged', key)\n      children[key] = (0, _react.cloneElement)(child, {\n        onExited: onExited.bind(null, child),\n        in: prevChild.props.in,\n        exit: getProp(child, 'exit', nextProps),\n        enter: getProp(child, 'enter', nextProps)\n      });\n    }\n  });\n  return children;\n}\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/utils/ChildMapping.js?");

/***/ }),

/***/ "./node_modules/react-transition-group/utils/PropTypes.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-transition-group/utils/PropTypes.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar timeoutsShape =  true ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({\n  enter: _propTypes.default.number,\n  exit: _propTypes.default.number,\n  appear: _propTypes.default.number\n}).isRequired]) : undefined;\nexports.timeoutsShape = timeoutsShape;\nvar classNamesShape =  true ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({\n  enter: _propTypes.default.string,\n  exit: _propTypes.default.string,\n  active: _propTypes.default.string\n}), _propTypes.default.shape({\n  enter: _propTypes.default.string,\n  enterDone: _propTypes.default.string,\n  enterActive: _propTypes.default.string,\n  exit: _propTypes.default.string,\n  exitDone: _propTypes.default.string,\n  exitActive: _propTypes.default.string\n})]) : undefined;\nexports.classNamesShape = classNamesShape;\n\n//# sourceURL=webpack://dash_bio/./node_modules/react-transition-group/utils/PropTypes.js?");

/***/ }),

/***/ "./node_modules/sequence-viewer/lib/index.js":
/*!***************************************************!*\
  !*** ./node_modules/sequence-viewer/lib/index.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n * sequence-viewer\n * https://github.com/calipho-sib/sequence-viewer\n *\n * Copyright (c) 2015 Calipho - SIB\n * Licensed under the MIT license.\n */\n\n/**\n @class sequenceviewer\n */\n\n\n//var  sequenceviewer;\n//module.exports = sequenceviewer = function(opts){\n//    this.el = opts.el;\n//    this.el.textContent = sequenceviewer.hello(opts.text);\n//};\nvar jQuery = $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n\nvar Sequence = __webpack_require__(/*! ../src/sequence-viewer.js */ \"./node_modules/sequence-viewer/src/sequence-viewer.js\");\n\n__webpack_require__(/*! biojs-events */ \"./node_modules/biojs-events/index.js\").mixin(Sequence.prototype);\nmodule.exports = Sequence;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/sequence-viewer/lib/index.js?");

/***/ }),

/***/ "./node_modules/sequence-viewer/src/sequence-viewer.js":
/*!*************************************************************!*\
  !*** ./node_modules/sequence-viewer/src/sequence-viewer.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var Sequence = (function () {\n\n\n    var debounce = __webpack_require__(/*! lodash.debounce */ \"./node_modules/lodash.debounce/index.js\");\n\n    function Sequence(sequence, isoformName) {\n        var self = this;\n        this.events = {\n            MOUSE_SELECTION_EVENT: \"sequence-viewer-mouse-selection\",\n            SEQUENCE_SELECTED_EVENT: \"sequence-viewer-substring-selected\"\n        };\n        var isoName;\n        if (isoformName !== undefined) isoName = isoformName;\n        else isoName = \"\";\n        console.log(isoName);\n        var sequence = sequence;\n        var seqInit = \"\";\n        var seqCustomized = \"\";\n        var seqCoverage = {\n            data : [],\n            start : null,\n            end : null,\n            hlColor : null\n        }\n//        var lineJump = 0;\n        var title;\n        var divID;\n        var sequenceOptions = {};\n        var el;\n        var seqHeight;\n        var showBadge;\n\n        this.render = function (divId, options) {\n            //identifier should be a string in other cases we might get strange effects\n            if (typeof divId !== 'string') {\n               throw new Error(\"Div identifier must be a string\");\n            }\n            divID = divId;\n            el = document.getElementById(divId.substring(1));\n            if (el === null) {\n              throw new Error(\"Cannot find element with id: \" + divId.substring(1));\n            }\n//            if (typeof options === 'undefined') {\n//                var options = {\n//                    'showLineNumbers': true,\n//                    'wrapAminoAcids': true,\n//                    'charsPerLine': 30,\n//                    'search': false,\n//                    'toolbar': false,\n//                    'title': \"Protein Sequence\",\n//                    'sequenceMaxHeight': \"400px\",\n//                    'badge': true\n//                     'header' : {\n//                         display: true or false,\n//                         searchInTitle : true or false\n//                     }\n//                }\n//            }\n//            \n//            else sequenceOptions = options;\n            if (!options) options = {};\n            \n            \n            sequenceOptions.showLineNumbers = options.showLineNumbers === undefined ? true : options.showLineNumbers;\n            sequenceOptions.wrapAminoAcids = options.wrapAminoAcids === undefined ? true : options.wrapAminoAcids;\n            sequenceOptions.sequenceMaxHeight = options.sequenceMaxHeight === undefined ? \"400px\" : options.sequenceMaxHeight;\n            sequenceOptions.title = options.title === undefined ? \"Protein Sequence\" : options.title;\n            sequenceOptions.charsPerLine = options.charsPerLine === undefined ? 30 : options.charsPerLine;\n            sequenceOptions.search = options.search === undefined ? false : options.search;\n            sequenceOptions.toolbar = options.toolbar === undefined ? false : options.toolbar;\n            sequenceOptions.badge = options.badge === undefined ? true : options.badge;\n            sequenceOptions.fasta = options.fasta === undefined ? true : options.fasta;\n            sequenceOptions.apiURL = options.apiURL === undefined ? true : options.apiURL;\n            sequenceOptions.blast = options.blast === undefined ? true : options.blast;\n            \n            sequenceOptions.header = options.header ? {\n                display : options.header.display === undefined ? true : options.header.display,\n                searchInTitle : options.header.searchInTitle === undefined ? true : options.header.searchInTitle,\n                unit : options.header.unit === undefined ? \"Char\" : options.header.unit,\n                showCpl : options.header.showCpl === undefined ? true : options.header.showCpl,\n                badgeWithUnit : options.header.badgeWithUnit === undefined ? false : options.header.badgeWithUnit\n            } : {display : true, searchInTitle : true, unit : \"Char\", showCpl: true, badgeWithUnit: false};\n\n\n            var badge = \"<div style=\\\"display:inline-block;\\\">\" +\n                \"<span class=\\\"badge\\\" style=\\\"border-radius:70%;border: 2px solid black;color:#C50063;padding:8px 5px;background-color:white;margin-right:10px;vertical-align:middle;min-width:32px;\\\">\" + sequence.length + \"</span>\" +\n                \"</div>\";\n            \n            var badgeWithUnit = \"<div style=\\\"display:inline-block;\\\">\" +\n                \"<span class=\\\"badge\\\" style=\\\"border-radius:70%;border: 2px solid black;color:#C50063;padding:5px 5px;background-color:white;margin-right:10px;vertical-align:middle;min-width:32px;font-size:11px;\\\">\" + sequence.length + \"<div style='margin-top:-2px;font-size:9px;color:black;text-transform:lowercase;'>\" + sequenceOptions.header.unit + \"</div></span>\" +\n                \"</div>\";\n\n            var displayBadge = sequenceOptions.badge ? sequenceOptions.header.badgeWithUnit ? badgeWithUnit : badge : \"\";\n            \n            var header = sequenceOptions.header.display ? \"<div class=\\\"sequenceHeader row\\\" style=\\\"border-bottom: 1px solid #E7EAEC;padding-bottom:5px;margin:0px 0px 10px\\\">\" +\n                displayBadge + \"<h4 style=\\\"display:inline-block;vertical-align:middle;\\\">\" + sequenceOptions.title + \"</h4>\" +\n                \"</div>\" : \"\";\n\n            var sources = header +\n                \"<div class=\\\"sequenceBody\\\" style=\\\"margin-top: 5px;\\\">\" +\n                \"<div class=\\\"scroller\\\" style=\\\"max-height:\" + sequenceOptions.sequenceMaxHeight + \";overflow:auto;white-space: nowrap;padding-right:20px;margin-right:10px;\\\">\" +\n                \"<div class=\\\"charNumbers\\\" style=\\\"font-family: monospace;font-size: 13px;display:inline-block;text-align:right; padding-right:5px; border-right:1px solid LightGray;\\\"></div>\" +\n                \"<div class=\\\"fastaSeq\\\" display-option=\\\"\" + sequenceOptions.charsPerLine + \"\\\" style=\\\"font-family: monospace;font-size: 13px;display:inline-block;padding:5px;\\\">\" + sequence + \"</div></div>\" +\n                \"<div class=\\\"coverageLegend\\\" style=\\\"margin-top: 10px;margin-left:15px;\\\"></div>\" +\n                \"</div>\";\n\n            $(divId).html(sources);\n\t\n            if (sequenceOptions.wrapAminoAcids) {\n                sequenceLayout(divId + \" .fastaSeq\");\n            }\n            else $(divId + \" .scroller\").css(\"overflow-x\", \"auto\");\n            \n            if (sequenceOptions.showLineNumbers)\n                lineNumbers(divId + \" .fastaSeq\", divId + \" .charNumbers\");\n\n            if (sequenceOptions.toolbar) {\n                if (sequenceOptions.header.showCpl){\n                    addToolbar();\n                }\n                else {\n                    var source = \"<form class=\\\"form-inline\\\" style=\\\"margin-bottom:5px;\\\">\" +\n                    \"<div class=\\\"form-group form-group-sm sequenceToolbar\\\" style=\\\"\\\"> \"+\n                        \"</div></form>\";\n                    $(divID + \" .sequenceBody\").prepend(source);\n                }\n                if (isoName !== \"\") {\n                    if (sequenceOptions.fasta){\n                        var apiURL = \"https://www.nextprot.org\";\n                        if(sequenceOptions.apiURL) {\n                            apiURL = sequenceOptions.apiURL;\n                        }\n                        $(divID + \" .sequenceToolbar\").append(\n                            // TODO: should point to prod instead of alpha once this service is available !\n                            //\"<a class=\\\"btn btn-default btn-sm fasta-link\\\" href=\\\"https://api.nextprot.org/isoform/\" + isoName + \".fasta target='_blank'>View FASTA</a>\" +\n                            \"<a class=\\\"btn btn-default btn-sm fasta-link\\\" href=\\\"\"+ apiURL +\"/isoform/\" + isoName + \".fasta\\\" target='_blank'>View FASTA</a>\"\n    //                        \"<a class=\\\"btn btn-default btn-sm fasta-link\\\" href=\\\"http://www.nextprot.org/entry/\" + isoName.split(\"-\")[0] + \"/fasta?isoform=\" + isoName.slice(3) + \"\\\" target='_blank'>View FASTA</a>\"\n    //                        \"<a class=\\\"btn btn-default btn-sm disabled\\\" href=\\\"\\\" style=\\\"margin-left:5px;\\\">Blast sequence</a>\" +\n    //                        \"<a class=\\\"btn btn-default btn-sm disabled\\\" href=\\\"\\\" style=\\\"margin-left:5px;\\\">Blast selection</a>\"\n    //                        '<div class=\"btn-group\" role=\"group\" aria-label=\"...\" style=\"margin-left:5px;\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Soon to be implemented\">' +\n    //                          '<a class=\\\"btn btn-default btn-sm disabled\\\" style=\"margin-left:-1px;\" href=\\\"\\\">BLAST sequence</a>' +\n    //                          '<a class=\\\"btn btn-default btn-sm disabled\\\" href=\\\"\\\">BLAST selection</a>' +\n    //                        '</div>'\n                        );\n                    }\n                    if (sequenceOptions.blast){\n                        $(divID + \" .sequenceToolbar\").append(\"<a class=\\\"btn btn-default btn-sm\\\" href=\\\"/blast/\"+isoName+\"\\\" style=\\\"margin-left:5px;\\\">Blast sequence</a>\" + \n                      \"<a id=\\\"selectionBlast\\\" class=\\\"btn btn-default btn-sm\\\" href=\\\"/blast/\"+isoName+\"\\\" style=\\\"margin-left:5px;\\\"> Blast selection</a>\");\n                    }\n                }\n            }\n            \n            if (sequenceOptions.search) {\n                var inHeader = sequenceOptions.header.searchInTitle;\n                addSequenceSearch(inHeader);\n            }\n\n            seqInit = $(divId + \" .fastaSeq\").html();\n            mouseSelectionListener();\n        };\n\n        this.selection = function (start, end, color, options) {\n            var positions = [start, end];\n            var hlSeq = seqInit;\n            subpartSelection([{start:start,end:end}]);\n            positions[0] = positions[0] + ~~(positions[0] / 10) + 4 * (~~(positions[0] / sequenceOptions.charsPerLine));\n            positions[1] = positions[1] + ~~(positions[1] / 10) + 4 * (~~(positions[1] / sequenceOptions.charsPerLine));\n            var highlightColor = color;\n            hlSeq = hlSeq.substring(0, positions[0]) +\n            \"<span class='stringSelected' style=\\\"background:\" + color + \";color:white;\\\">\" +\n            hlSeq.substring(positions[0], positions[1]) +\n            \"</span>\" +\n            hlSeq.substring(positions[1], hlSeq.length);\n            $(divID + \" .fastaSeq\").html(hlSeq);\n            if (sequenceOptions.blast) {\n                $(\"#selectionBlast\").attr(\"href\", \"/blast/\"+isoName+\"/\"+(start+1)+\"/\"+end+\"/\");\n            }\n        };\n\n        function multiHighlighting(ArrayHL, color, options) {\n            var startTime2 = new Date().getTime();\n            if (ArrayHL.length === 0) {\n                $(divID + \" .fastaSeq\").html(seqInit);\n            }\n            var hlSeq = seqInit;\n            var seqTemp = hlSeq.toString();\n            var positionStart = 0;\n            var positionEnd = 0;\n            for (i in ArrayHL) {\n                positionStart = jTranslation(ArrayHL[i].start);\n                positionEnd = jTranslation(ArrayHL[i].end);\n                seqTemp = seqTemp.substring(0, positionStart) +\n                \"<span class='stringsSelected' style=\\\"background:\" + color + \";color:white;\\\">\" +\n                seqTemp.substring(positionStart, positionEnd) +\n                \"</span>\" +\n                seqTemp.substring(positionEnd, seqTemp.length);\n            }\n            $(divID + \" .fastaSeq\").html(seqTemp);\n        }\n\n        this.addLegend = function (hashLegend) {\n            for (var i = 0; i < hashLegend.length; i++) {\n                if (hashLegend[i].underscore === true) {\n                    $(divID + \" .coverageLegend\").append(\"<div style=\\\"display:inline-block;background:\" + hashLegend[i].color + \";width:20px;height:20px;vertical-align:middle;margin:0px 5px 0px 10px;border-radius:50%; border: 1px solid grey;text-align:center; line-height:0.8;\\\">_</div><p style=\\\"display:inline-block;font-weight:bold;font-size:11px;font-style:italic;margin:0;padding-top:3px;vertical-align:top;\\\">\" + hashLegend[i].name + \"</p></div>\");\n                }\n                else {\n                    $(divID + \" .coverageLegend\").append(\"<div style=\\\"display:inline-block;background:\" + hashLegend[i].color + \";width:20px;height:20px;vertical-align:middle;margin:0px 5px 0px 10px;border-radius:50%;\\\"></div><p style=\\\"display:inline-block;font-weight:bold;font-size:11px;font-style:italic;margin:0;padding-top:3px;vertical-align:top;\\\">\" + hashLegend[i].name + \"</p>\");\n                }\n            }\n        };\n\n        function jTranslation(i) {\n            var j = i + ~~(i / 10) + 4 * (~~(i / sequenceOptions.charsPerLine));\n            return j;\n        }\n        function fillGap(list) {\n            var listCloned = list.slice();\n            for (var i=0;i<=list.length-1;i++) {\n                if (i===0){\n                    if (list[0].start > 0) {\n                        listCloned.unshift({start: 0, end: list[0].start, color: \"black\", underscore: false});\n                    }\n                    if (i === list.length-1) {\n                        listCloned.push({start: list[i].end, end: sequence.length, color: \"black\", underscore: false});\n                    }\n                }\n                else if (i === list.length-1){\n                    if (list[i-1].end < list[i].start){\n                        listCloned.push({start: list[i-1].end, end: list[i].start, color: \"black\", underscore: false});\n                    }\n                    if (list[i].end < sequence.length-1){\n                        listCloned.push({start: list[i].end, end: sequence.length, color: \"black\", underscore: false});\n                    }\n                }\n                else {\n                    if (list[i-1].end < list[i].start){\n                        listCloned.push({start: list[i-1].end, end: list[i].start, color: \"black\", underscore: false});\n                    }\n                }\n                if (i !== 0 && list[i-1].end > list[i].start){\n                    console.warn(\"WARNING (error): Some positions in the coverage list are overlapping\");\n                }\n            }\n            listCloned.sort(function (a, b) {\n                return a.start - b.start;\n            });\n            return listCloned;\n        }\n\n\tvar deepExtend = function(out) {\n\t  out = out || {};\n\n\t  for (var i = 1; i < arguments.length; i++) {\n\t    var obj = arguments[i];\n\n\t    if (!obj)\n\t      continue;\n\n\t    for (var key in obj) {\n\t      if (obj.hasOwnProperty(key)) {\n\t\tif (typeof obj[key] === 'object')\n\t\t  out[key] = deepExtend(out[key], obj[key]);\n\t\telse\n\t\t  out[key] = obj[key];\n\t      }\n\t    }\n\t  }\n\n\t  return out;\n\t};\n\n\t\n        this.coverage = function (HashAA, start, end, highlightColor) {\n            seqCoverage.data = deepExtend([], HashAA);\n            seqCoverage.start = start;\n            seqCoverage.end = end;\n            seqCoverage.hlColor = highlightColor;\n            \n            HashAA.sort(function (a, b) {\n                return a.start - b.start;\n            });\n            HashAA=fillGap(HashAA);\n            var timestart = new Date().getTime();\n            if (!start) var start = 0;\n            if (!end) var end = 0;\n            if (!highlightColor) var highlightColor = \"#FFE5A3\";\n            var source = \"\";\n            var pre = \"\";\n            for (var i = 0; i < HashAA.length; i++) {\n                var tooltipStr = \"\";\n                if (HashAA[i].tooltip !== undefined) {\n                    tooltipStr = \" title=\\\"\"+HashAA[i].tooltip+\"\\\"\";\n                }\n                var bgcolorStr = \"\";\n                if (HashAA[i].bgcolor !== undefined) {\n                    bgcolorStr = \"background:\"+HashAA[i].bgcolor+\";\";\n                }\n                //in html string there is no easy way to put function, therefore\n                //assign to onclick event handler identifier of the region,\n                //and after all DOM objects will be created we will replace this handlers\n                //with proper functions\n                var onclickStr = \"\";\n                var cursorStr = \"\";\n                if (HashAA[i].onclick !== undefined) {\n                    onclickStr = \" onclick=\\\" return \"+i+\";\\\" \";\n                    cursorStr = \"cursor: pointer;\";\n                }\n                \n                if (HashAA[i].underscore) {\n                    pre = \"<span style=\\\"text-decoration:underline;color:\" + HashAA[i].color + \";\" + bgcolorStr + cursorStr+ \"\\\"\" + tooltipStr + onclickStr + \">\";\n                    source += pre;\n                }\n                else {\n                    pre = \"<span style=\\\"color:\" + HashAA[i].color + \";\" + bgcolorStr + cursorStr + \"\\\"\" + tooltipStr + onclickStr + \">\";\n                    source += pre;\n                }\n                if (end) {\n                    if (start >= HashAA[i].start && start < HashAA[i].end && end >= HashAA[i].start && end < HashAA[i].end) {\n\n                        source += seqInit.substring(jTranslation(HashAA[i].start), jTranslation(start)) + \"<span class=\\\"peptideHighlighted\\\" style=\\\"background:\" + highlightColor + \";\\\">\" + seqInit.substring(jTranslation(start), jTranslation(end + 1));\n\n                        source += \"</span>\" + seqInit.substring(jTranslation(end + 1), jTranslation(HashAA[i].end)) + \"</span>\";\n                    }\n                    else if (start >= HashAA[i].start && start < HashAA[i].end) {\n                        source += seqInit.substring(jTranslation(HashAA[i].start), jTranslation(start)) + \"</span><span class=\\\"peptideHighlighted\\\" style=\\\"background:\" + highlightColor + \";\\\">\" + pre + seqInit.substring(jTranslation(start), jTranslation(HashAA[i].end)) + \"</span>\";\n                    }\n                    else if (end >= HashAA[i].start && end < HashAA[i].end) {\n                        source += seqInit.substring(jTranslation(HashAA[i].start), jTranslation(end + 1)) + \"</span></span>\" + pre + seqInit.substring(jTranslation(end + 1), jTranslation(HashAA[i].end)) + \"</span>\";\n                    }\n                    else {\n                        source += seqInit.substring(jTranslation(HashAA[i].start), jTranslation(HashAA[i].end)) + \"</span>\";\n                    }\n                }\n                else {\n                    source += seqInit.substring(jTranslation(HashAA[i].start), jTranslation(HashAA[i].end)) + \"</span>\";\n                }\n            }\n            var fastaDiv = $(divID + \" .fastaSeq\");\n            fastaDiv.html(source);\n            seqCustomized = source;\n\n            //and now (after we created dom objects) we can assign onclick events\n            var onclickObjects = $(\"[onclick]\",fastaDiv);\n            for (var i=0;i<onclickObjects.length;i++) {\n              //get the id that was assigned to onclick event in the simple html\n              var onclickId = onclickObjects[i].onclick();\n              //and replace it with proper function\n              onclickObjects[i].onclick = HashAA[onclickId].onclick;\n            }\n\n        };\n\n        function lineNumbers(textAreaID, lineNumberID) {\n            var textContent = $(textAreaID).html().split(\"<br>\");\n            var NBC = parseInt($(textAreaID).attr(\"display-option\"));\n            var newTextContent = [];\n            var charPerLine = 0;\n            for (var i = 0; i < textContent.length; i++) {\n                newTextContent.push((charPerLine + 1) + (\"<br>\"));\n                charPerLine += NBC;\n            }\n            $(lineNumberID).html(newTextContent.join(\"\"));\n\n        };\n\n        function sequenceLayout(textAreaID) {\n            var newLines = parseInt($(textAreaID).attr(\"display-option\"));\n            newLines = (newLines + (newLines / 10)).toString();\n            var seqFormat = $(textAreaID).html();\n            seqFormat = seqFormat.toString().match(/.{1,10}/g).join(' ').match(new RegExp('.{1,' + newLines + '}', 'g')).join('<br>');\n            \n            seqCustomized = seqFormat;\n            $(textAreaID).html(seqFormat);\n        }\n\n        function addSequenceSearch(inHeader) {\n            if (inHeader){\n                $(divID + \" .sequenceHeader\").append('<input class=\\\"inputSearchSeq form-control pull-right\\\" type=\\\"text\\\" style=\\\"width:40%;margin-top: 3px;\\\" placeholder=\\\"Search in sequence.. (Regex supported)\\\">');\n            }\n            else{\n                $(divID + \" .sequenceBody\").prepend('<input class=\\\"inputSearchSeq form-control\\\" type=\\\"text\\\" style=\\\"width:100%;margin:3px auto 10px;\\\" placeholder=\\\"Search in sequence.. (Regex supported)\\\">');\n            }\n            sequenceSearch();\n\n        }\n\n        function sequenceSearch() {\n            $(divID + \" .inputSearchSeq\").keyup(debounce(function () {\n                var text = $(this).val();\n                var containsLetter = (/\\S/.test(text));\n                if (containsLetter) {\n//                if (text !== \"\") {\n                    var text2 = new RegExp(text, \"gi\");\n                    var match;\n                    var matches = [];\n                    while ((match = text2.exec(sequence)) != null) {\n                        matches.push({start: match.index, end: match.index + match[0].length});\n                    }\n                    matches.sort(function (a, b) {\n                        return b.start - a.start;\n                    });\n                    subpartSelection(matches);\n                    multiHighlighting(matches, \"#C50063\");\n                }\n                else {\n                    $(divID + \" .fastaSeq\").html(seqCustomized);\n                    triggerSequenceSelectedEvent([]);\n                }\n            }, 250));\n        }\n\n        function subpartSelection(list) {\n            var selectedParts = getSequenceOfSelection(list, sequence);\n            if (selectedParts) triggerSequenceSelectedEvent(selectedParts);\n        }\n\n        function getSequenceOfSelection(selection, sequence) {\n            var selectionList = [];\n            if (selection.length)\n            {\n                selection.forEach(function (s) {\n                    selectionList.push({\n                        start: s.start + 1,\n                        end: s.end,\n                        sequence: sequence.substring(s.start, s.end)\n                    });\n                });\n            }\n            return selectionList;\n        }\n\n        function triggerSequenceSelectedEvent(selection) {\n            if (CustomEvent) {\n                var event = new CustomEvent(self.events.SEQUENCE_SELECTED_EVENT, {\n                    detail: selection\n                });\n                el.dispatchEvent(event);\n\n            } else {\n                console.warn(\"CustomEvent is not defined....\");\n            }\n            if (self.trigger) self.trigger(self.events.SEQUENCE_SELECTED_EVENT, selection);\n        }\n\n        function mouseSelectionListener() {\n            $(divID + \" .fastaSeq\").mouseup(function () {\n                var selectedSubpart = getSelectedText();\n                if (selectedSubpart) {\n                    triggerMouseSelectionEvent(selectedSubpart);\n                    if (sequenceOptions.blast) {\n                        $(\"#selectionBlast\").attr(\"href\", \"/blast/\"+isoName+\"/\"+selectedSubpart.start+\"/\"+selectedSubpart.end+\"/\");\n                    }\n                }\n            });\n        }\n\n        this.onMouseSelection = function (listener) {\n            el.addEventListener(self.events.MOUSE_SELECTION_EVENT, listener);\n            //$(document).on(self.events.FEATURE_SELECTED_EVENT, listener);\n        };\n        this.onSubpartSelected = function (listener) {\n            el.addEventListener(self.events.SEQUENCE_SELECTED_EVENT, listener);\n            //$(document).on(self.events.FEATURE_SELECTED_EVENT, listener);\n        };\n\n        function getSelectedText() {\n            var text = window.getSelection().toString().replace(/\\s+/g, '');\n            var selection = window.getSelection();\n            var element = $(divID + \" .fastaSeq\")[0];\n            var caretOffset = 0;\n            var seqText = $(divID + \" .fastaSeq\").text();\n            \n            var range = selection.getRangeAt(0);\n            var preCaretRange = range.cloneRange();\n            preCaretRange.selectNodeContents(element);\n            preCaretRange.setEnd(range.endContainer, range.endOffset);\n            caretOffset = preCaretRange.toString().length;\n            \n            var pos_end_parsed = seqText.substring(0,caretOffset).replace(/\\s+/g, '').length;\n            \n            var pos_start_parsed = pos_end_parsed - (text.length -1);\n            \n            var text_selected = {\n                text: text,\n                start: pos_start_parsed,\n                end: pos_end_parsed\n            }\n            \n            return text_selected;\n        }\n\n        function triggerMouseSelectionEvent(subseq) {\n            if (CustomEvent) {\n                var event = new CustomEvent(self.events.MOUSE_SELECTION_EVENT, {\n                    detail: {\n                        'selection': subseq.text,\n                        'start':subseq.start,\n                        'end':subseq.end\n                    }\n                });\n                el.dispatchEvent(event);\n\n            } else {\n                console.warn(\"CustomEvent is not defined....\");\n            }\n            if (self.trigger) self.trigger(self.events.MOUSE_SELECTION_EVENT, {'selection': subseq});\n        }\n\n        function changeCharsPerLine(selection) {\n            sequenceOptions.charsPerLine = selection.value;\n            self.render(divID, sequenceOptions);\n            if (seqCoverage.data.length){\n                self.coverage(seqCoverage.data, seqCoverage.start, seqCoverage.end, seqCoverage.hlColor);\n            }\n        }\n\n        function addToolbar() {\n            var listOfCharsPerLine = [\"50\", \"60\", \"70\", \"80\", \"90\", \"100\"];\n//            var source = \"<form class=\\\"form-inline\\\" role=\\\"form\\\">\" +\n//                \"<div class=\\\"sequenceToolbar row\\\" style=\\\"margin-bottom:15px;\\\">\" +\n//                \"<div class=\\\"input-group input-group-sm\\\" style=\\\"margin-left:20px;\\\"> <span class=\\\"input-group-addon charPerLine-label\\\">Char per line</i></span>\" +\n//\n//                \"<select class=\\\"CPLChoice form-control\\\" style=\\\"border-top-left-radius: 0px;border-bottom-left-radius: 0px;\\\">\" +\n//                \"<option>Select</option>\" +\n//                \"<option value=50>50</option>\" +\n//                \"<option value=60>60</option>\" +\n//                \"<option value=70>70</option>\" +\n//                \"<option value=80>80</option>\" +\n//                \"<option value=90>90</option>\" +\n//                \"<option value=100>100</option>\" +\n//                \"</select>\" +\n//                \"</div>\" +\n//                \"</div>\" +\n//                \"</form>\";         \n            var hidexsCharPerLine = isoName ? \"hidden-xs\" : \"\";\n            var source = \"<form class=\\\"form-inline\\\" style=\\\"margin-bottom:5px;\\\">\" +\n//                \"<div class=\\\"sequenceToolbar row\\\" style=\\\"margin-bottom:15px;\\\">\" +\n                \"<div class=\\\"form-group form-group-sm sequenceToolbar\\\" style=\\\"\\\"> \"+\n                    \"<label class=\\\"control-label charPerLine-label \" + hidexsCharPerLine + \"\\\" for='\"+ divID.substring(1) +\"-cpl' style='margin-right:5px;'>\" + sequenceOptions.header.unit + \" per line</label>\" +\n                    \"<select class=\\\"CPLChoice form-control \" + hidexsCharPerLine + \"\\\" id='\"+ divID.substring(1) +\"-cpl' style='display:inline-block;width:auto;margin-right:10px;'>\" +\n                        \"<option>Select</option>\" +\n                        \"<option value=50>50</option>\" +\n                        \"<option value=60>60</option>\" +\n                        \"<option value=70>70</option>\" +\n                        \"<option value=80>80</option>\" +\n                        \"<option value=90>90</option>\" +\n                        \"<option value=100>100</option>\" +\n                    \"</select>\" +\n                \"</div>\" +\n                \"</form>\";\n            $(divID + \" .sequenceBody\").prepend(source);\n            $(divID + \" .CPLChoice\").change(function () {\n                changeCharsPerLine(this);\n                $(divID + \" .CPLChoice\" + \" option:selected\").text($(this).val());\n            });\n        }\n    }\n    return Sequence;\n})();\nif (  true && typeof module.exports === \"object\" ) {\n    module.exports = Sequence;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/sequence-viewer/src/sequence-viewer.js?");

/***/ }),

/***/ "./node_modules/speck/build/index.js":
/*!*******************************************!*\
  !*** ./node_modules/speck/build/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("const speckRenderer = __webpack_require__(/*! ../src/renderer.js */ \"./node_modules/speck/src/renderer.js\");\nconst speckSystem = __webpack_require__(/*! ../src/system.js */ \"./node_modules/speck/src/system.js\");\nconst speckView = __webpack_require__(/*! ../src/view.js */ \"./node_modules/speck/src/view.js\");\nconst speckInteractions = __webpack_require__(/*! ../src/interactions.js */ \"./node_modules/speck/src/interactions.js\");\nconst speckPresetViews = __webpack_require__(/*! ../src/presets.js */ \"./node_modules/speck/src/presets.js\");\n\nmodule.exports = {\n    speckRenderer,\n    speckSystem,\n    speckView,\n    speckInteractions,\n    speckPresetViews\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/build/index.js?");

/***/ }),

/***/ "./node_modules/speck/src/const.js":
/*!*****************************************!*\
  !*** ./node_modules/speck/src/const.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar elements = __webpack_require__(/*! ./elements */ \"./node_modules/speck/src/elements.js\");\n\nvar MIN_ATOM_RADIUS = Infinity;\nvar MAX_ATOM_RADIUS = -Infinity;\nfor (var i = 0; i <= 118; i++) {\n    MIN_ATOM_RADIUS = Math.min(MIN_ATOM_RADIUS, elements[i].radius);\n    MAX_ATOM_RADIUS = Math.max(MAX_ATOM_RADIUS, elements[i].radius);\n}\n\nmodule.exports.MIN_ATOM_RADIUS = MIN_ATOM_RADIUS;\nmodule.exports.MAX_ATOM_RADIUS = MAX_ATOM_RADIUS;\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/const.js?");

/***/ }),

/***/ "./node_modules/speck/src/cube.js":
/*!****************************************!*\
  !*** ./node_modules/speck/src/cube.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("\nvar n = -1;\nvar p = 1;\n\nmodule.exports = {\n\n\tposition: [\n\n\t\t// -X\n\t\tn, n, n,\n\t\tn, n, p,\n\t\tn, p, p,\n\t\tn, n, n,\n\t\tn, p, p,\n\t\tn, p, n,\n\n\t\t// +X\n\t\tp, n, p,\n\t\tp, n, n,\n\t\tp, p, n,\n\t\tp, n, p,\n\t\tp, p, n,\n\t\tp, p, p,\n\n\t\t// -Y\n\t\tn, n, n,\n\t\tp, n, n,\n\t\tp, n, p,\n\t\tn, n, n,\n\t\tp, n, p,\n\t\tn, n, p,\n\n\t\t// +Y\n\t\tn, p, p,\n\t\tp, p, p,\n\t\tp, p, n,\n\t\tn, p, p,\n\t\tp, p, n,\n\t\tn, p, n,\n\n\t\t// -Z\n\t\tp, n, n,\n\t\tn, n, n,\n\t\tn, p, n,\n\t\tp, n, n, \n\t\tn, p, n,\n\t\tp, p, n,\n\n\t\t// +Z\n\t\tn, n, p,\n\t\tp, n, p,\n\t\tp, p, p,\n\t\tn, n, p,\n\t\tp, p, p,\n\t\tn, p, p\n\n\t],\n\n\tnormal: [\n\n\t\t// -X\n\t\tn, 0, 0,\n\t\tn, 0, 0,\n\t\tn, 0, 0,\n\t\tn, 0, 0,\n\t\tn, 0, 0,\n\t\tn, 0, 0,\n\n\t\t// +X\n\t\tp, 0, 0,\n\t\tp, 0, 0,\n\t\tp, 0, 0,\n\t\tp, 0, 0,\n\t\tp, 0, 0,\n\t\tp, 0, 0,\n\n\t\t// -Y\n\t\t0, n, 0,\n\t\t0, n, 0,\n\t\t0, n, 0,\n\t\t0, n, 0,\n\t\t0, n, 0,\n\t\t0, n, 0,\n\n\t\t// +Y\n\t\t0, p, 0,\t\n\t\t0, p, 0,\t\n\t\t0, p, 0,\t\n\t\t0, p, 0,\t\n\t\t0, p, 0,\t\n\t\t0, p, 0,\t\n\n\t\t// -Z\n\t\t0, 0, n,\n\t\t0, 0, n,\n\t\t0, 0, n,\n\t\t0, 0, n,\n\t\t0, 0, n,\n\t\t0, 0, n,\n\n\t\t// +Z\n\t\t0, 0, p,\n\t\t0, 0, p,\n\t\t0, 0, p,\n\t\t0, 0, p,\n\t\t0, 0, p,\n\t\t0, 0, p\n\n\t]\n\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/cube.js?");

/***/ }),

/***/ "./node_modules/speck/src/elements.js":
/*!********************************************!*\
  !*** ./node_modules/speck/src/elements.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = {};\nmodule.exports[  0] = module.exports[ 'Xx'] = {'symbol':  'Xx', 'name':       'unknown', 'mass':   1.00000000, 'radius':  1.0000, 'color': [1.000, 0.078, 0.576], 'number': 0};\nmodule.exports[  1] = module.exports[  'H'] = {'symbol':   'H', 'name':      'hydrogen', 'mass':   1.00794000, 'radius':  0.3100, 'color': [1.000, 1.000, 1.000], 'number': 1};\nmodule.exports[  2] = module.exports[ 'He'] = {'symbol':  'He', 'name':        'helium', 'mass':   4.00260200, 'radius':  0.2800, 'color': [0.851, 1.000, 1.000], 'number': 2};\nmodule.exports[  3] = module.exports[ 'Li'] = {'symbol':  'Li', 'name':       'lithium', 'mass':   6.94100000, 'radius':  1.2800, 'color': [0.800, 0.502, 1.000], 'number': 3};\nmodule.exports[  4] = module.exports[ 'Be'] = {'symbol':  'Be', 'name':     'beryllium', 'mass':   9.01218200, 'radius':  0.9600, 'color': [0.761, 1.000, 0.000], 'number': 4};\nmodule.exports[  5] = module.exports[  'B'] = {'symbol':   'B', 'name':         'boron', 'mass':  10.81100000, 'radius':  0.8400, 'color': [1.000, 0.710, 0.710], 'number': 5};\nmodule.exports[  6] = module.exports[  'C'] = {'symbol':   'C', 'name':        'carbon', 'mass':  12.01070000, 'radius':  0.7300, 'color': [0.565, 0.565, 0.565], 'number': 6};\nmodule.exports[  7] = module.exports[  'N'] = {'symbol':   'N', 'name':      'nitrogen', 'mass':  14.00670000, 'radius':  0.7100, 'color': [0.188, 0.314, 0.973], 'number': 7};\nmodule.exports[  8] = module.exports[  'O'] = {'symbol':   'O', 'name':        'oxygen', 'mass':  15.99940000, 'radius':  0.6600, 'color': [1.000, 0.051, 0.051], 'number': 8};\nmodule.exports[  9] = module.exports[  'F'] = {'symbol':   'F', 'name':      'fluorine', 'mass':  18.99840320, 'radius':  0.5700, 'color': [0.565, 0.878, 0.314], 'number': 9};\nmodule.exports[ 10] = module.exports[ 'Ne'] = {'symbol':  'Ne', 'name':          'neon', 'mass':  20.17970000, 'radius':  0.5800, 'color': [0.702, 0.890, 0.961], 'number': 10};\nmodule.exports[ 11] = module.exports[ 'Na'] = {'symbol':  'Na', 'name':        'sodium', 'mass':  22.98976928, 'radius':  1.6600, 'color': [0.671, 0.361, 0.949], 'number': 11};\nmodule.exports[ 12] = module.exports[ 'Mg'] = {'symbol':  'Mg', 'name':     'magnesium', 'mass':  24.30500000, 'radius':  1.4100, 'color': [0.541, 1.000, 0.000], 'number': 12};\nmodule.exports[ 13] = module.exports[ 'Al'] = {'symbol':  'Al', 'name':      'aluminum', 'mass':  26.98153860, 'radius':  1.2100, 'color': [0.749, 0.651, 0.651], 'number': 13};\nmodule.exports[ 14] = module.exports[ 'Si'] = {'symbol':  'Si', 'name':       'silicon', 'mass':  28.08550000, 'radius':  1.1100, 'color': [0.941, 0.784, 0.627], 'number': 14};\nmodule.exports[ 15] = module.exports[  'P'] = {'symbol':   'P', 'name':    'phosphorus', 'mass':  30.97376200, 'radius':  1.0700, 'color': [1.000, 0.502, 0.000], 'number': 15};\nmodule.exports[ 16] = module.exports[  'S'] = {'symbol':   'S', 'name':        'sulfur', 'mass':  32.06500000, 'radius':  1.0500, 'color': [1.000, 1.000, 0.188], 'number': 16};\nmodule.exports[ 17] = module.exports[ 'Cl'] = {'symbol':  'Cl', 'name':      'chlorine', 'mass':  35.45300000, 'radius':  1.0200, 'color': [0.122, 0.941, 0.122], 'number': 17};\nmodule.exports[ 18] = module.exports[ 'Ar'] = {'symbol':  'Ar', 'name':         'argon', 'mass':  39.94800000, 'radius':  1.0600, 'color': [0.502, 0.820, 0.890], 'number': 18};\nmodule.exports[ 19] = module.exports[  'K'] = {'symbol':   'K', 'name':     'potassium', 'mass':  39.09830000, 'radius':  2.0300, 'color': [0.561, 0.251, 0.831], 'number': 19};\nmodule.exports[ 20] = module.exports[ 'Ca'] = {'symbol':  'Ca', 'name':       'calcium', 'mass':  40.07800000, 'radius':  1.7600, 'color': [0.239, 1.000, 0.000], 'number': 20};\nmodule.exports[ 21] = module.exports[ 'Sc'] = {'symbol':  'Sc', 'name':      'scandium', 'mass':  44.95591200, 'radius':  1.7000, 'color': [0.902, 0.902, 0.902], 'number': 21};\nmodule.exports[ 22] = module.exports[ 'Ti'] = {'symbol':  'Ti', 'name':      'titanium', 'mass':  47.86700000, 'radius':  1.6000, 'color': [0.749, 0.761, 0.780], 'number': 22};\nmodule.exports[ 23] = module.exports[  'V'] = {'symbol':   'V', 'name':      'vanadium', 'mass':  50.94150000, 'radius':  1.5300, 'color': [0.651, 0.651, 0.671], 'number': 23};\nmodule.exports[ 24] = module.exports[ 'Cr'] = {'symbol':  'Cr', 'name':      'chromium', 'mass':  51.99610000, 'radius':  1.3900, 'color': [0.541, 0.600, 0.780], 'number': 24};\nmodule.exports[ 25] = module.exports[ 'Mn'] = {'symbol':  'Mn', 'name':     'manganese', 'mass':  54.93804500, 'radius':  1.3900, 'color': [0.611, 0.478, 0.780], 'number': 25};\nmodule.exports[ 26] = module.exports[ 'Fe'] = {'symbol':  'Fe', 'name':          'iron', 'mass':  55.84500000, 'radius':  1.3200, 'color': [0.878, 0.400, 0.200], 'number': 26};\nmodule.exports[ 27] = module.exports[ 'Co'] = {'symbol':  'Co', 'name':        'cobalt', 'mass':  58.69340000, 'radius':  1.2600, 'color': [0.941, 0.565, 0.627], 'number': 27};\nmodule.exports[ 28] = module.exports[ 'Ni'] = {'symbol':  'Ni', 'name':        'nickel', 'mass':  58.93319500, 'radius':  1.2400, 'color': [0.314, 0.816, 0.314], 'number': 28};\nmodule.exports[ 29] = module.exports[ 'Cu'] = {'symbol':  'Cu', 'name':        'copper', 'mass':  63.54600000, 'radius':  1.3200, 'color': [0.784, 0.502, 0.200], 'number': 29};\nmodule.exports[ 30] = module.exports[ 'Zn'] = {'symbol':  'Zn', 'name':          'zinc', 'mass':  65.38000000, 'radius':  1.2200, 'color': [0.490, 0.502, 0.690], 'number': 30};\nmodule.exports[ 31] = module.exports[ 'Ga'] = {'symbol':  'Ga', 'name':       'gallium', 'mass':  69.72300000, 'radius':  1.2200, 'color': [0.761, 0.561, 0.561], 'number': 31};\nmodule.exports[ 32] = module.exports[ 'Ge'] = {'symbol':  'Ge', 'name':     'germanium', 'mass':  72.64000000, 'radius':  1.2000, 'color': [0.400, 0.561, 0.561], 'number': 32};\nmodule.exports[ 33] = module.exports[ 'As'] = {'symbol':  'As', 'name':       'arsenic', 'mass':  74.92160000, 'radius':  1.1900, 'color': [0.741, 0.502, 0.890], 'number': 33};\nmodule.exports[ 34] = module.exports[ 'Se'] = {'symbol':  'Se', 'name':      'selenium', 'mass':  78.96000000, 'radius':  1.2000, 'color': [1.000, 0.631, 0.000], 'number': 34};\nmodule.exports[ 35] = module.exports[ 'Br'] = {'symbol':  'Br', 'name':       'bromine', 'mass':  79.90400000, 'radius':  1.2000, 'color': [0.651, 0.161, 0.161], 'number': 35};\nmodule.exports[ 36] = module.exports[ 'Kr'] = {'symbol':  'Kr', 'name':       'krypton', 'mass':  83.79800000, 'radius':  1.1600, 'color': [0.361, 0.722, 0.820], 'number': 36};\nmodule.exports[ 37] = module.exports[ 'Rb'] = {'symbol':  'Rb', 'name':      'rubidium', 'mass':  85.46780000, 'radius':  2.2000, 'color': [0.439, 0.180, 0.690], 'number': 37};\nmodule.exports[ 38] = module.exports[ 'Sr'] = {'symbol':  'Sr', 'name':     'strontium', 'mass':  87.62000000, 'radius':  1.9500, 'color': [0.000, 1.000, 0.000], 'number': 38};\nmodule.exports[ 39] = module.exports[  'Y'] = {'symbol':   'Y', 'name':       'yttrium', 'mass':  88.90585000, 'radius':  1.9000, 'color': [0.580, 1.000, 1.000], 'number': 39};\nmodule.exports[ 40] = module.exports[ 'Zr'] = {'symbol':  'Zr', 'name':     'zirconium', 'mass':  91.22400000, 'radius':  1.7500, 'color': [0.580, 0.878, 0.878], 'number': 40};\nmodule.exports[ 41] = module.exports[ 'Nb'] = {'symbol':  'Nb', 'name':       'niobium', 'mass':  92.90638000, 'radius':  1.6400, 'color': [0.451, 0.761, 0.788], 'number': 41};\nmodule.exports[ 42] = module.exports[ 'Mo'] = {'symbol':  'Mo', 'name':    'molybdenum', 'mass':  95.96000000, 'radius':  1.5400, 'color': [0.329, 0.710, 0.710], 'number': 42};\nmodule.exports[ 43] = module.exports[ 'Tc'] = {'symbol':  'Tc', 'name':    'technetium', 'mass':  98.00000000, 'radius':  1.4700, 'color': [0.231, 0.620, 0.620], 'number': 43};\nmodule.exports[ 44] = module.exports[ 'Ru'] = {'symbol':  'Ru', 'name':     'ruthenium', 'mass': 101.07000000, 'radius':  1.4600, 'color': [0.141, 0.561, 0.561], 'number': 44};\nmodule.exports[ 45] = module.exports[ 'Rh'] = {'symbol':  'Rh', 'name':       'rhodium', 'mass': 102.90550000, 'radius':  1.4200, 'color': [0.039, 0.490, 0.549], 'number': 45};\nmodule.exports[ 46] = module.exports[ 'Pd'] = {'symbol':  'Pd', 'name':     'palladium', 'mass': 106.42000000, 'radius':  1.3900, 'color': [0.000, 0.412, 0.522], 'number': 46};\nmodule.exports[ 47] = module.exports[ 'Ag'] = {'symbol':  'Ag', 'name':        'silver', 'mass': 107.86820000, 'radius':  1.4500, 'color': [0.753, 0.753, 0.753], 'number': 47};\nmodule.exports[ 48] = module.exports[ 'Cd'] = {'symbol':  'Cd', 'name':       'cadmium', 'mass': 112.41100000, 'radius':  1.4400, 'color': [1.000, 0.851, 0.561], 'number': 48};\nmodule.exports[ 49] = module.exports[ 'In'] = {'symbol':  'In', 'name':        'indium', 'mass': 114.81800000, 'radius':  1.4200, 'color': [0.651, 0.459, 0.451], 'number': 49};\nmodule.exports[ 50] = module.exports[ 'Sn'] = {'symbol':  'Sn', 'name':           'tin', 'mass': 118.71000000, 'radius':  1.3900, 'color': [0.400, 0.502, 0.502], 'number': 50};\nmodule.exports[ 51] = module.exports[ 'Sb'] = {'symbol':  'Sb', 'name':      'antimony', 'mass': 121.76000000, 'radius':  1.3900, 'color': [0.620, 0.388, 0.710], 'number': 51};\nmodule.exports[ 52] = module.exports[ 'Te'] = {'symbol':  'Te', 'name':     'tellurium', 'mass': 127.60000000, 'radius':  1.3800, 'color': [0.831, 0.478, 0.000], 'number': 52};\nmodule.exports[ 53] = module.exports[  'I'] = {'symbol':   'I', 'name':        'iodine', 'mass': 126.90470000, 'radius':  1.3900, 'color': [0.580, 0.000, 0.580], 'number': 53};\nmodule.exports[ 54] = module.exports[ 'Xe'] = {'symbol':  'Xe', 'name':         'xenon', 'mass': 131.29300000, 'radius':  1.4000, 'color': [0.259, 0.620, 0.690], 'number': 54};\nmodule.exports[ 55] = module.exports[ 'Cs'] = {'symbol':  'Cs', 'name':        'cesium', 'mass': 132.90545190, 'radius':  2.4400, 'color': [0.341, 0.090, 0.561], 'number': 55};\nmodule.exports[ 56] = module.exports[ 'Ba'] = {'symbol':  'Ba', 'name':        'barium', 'mass': 137.32700000, 'radius':  2.1500, 'color': [0.000, 0.788, 0.000], 'number': 56};\nmodule.exports[ 57] = module.exports[ 'La'] = {'symbol':  'La', 'name':     'lanthanum', 'mass': 138.90547000, 'radius':  2.0700, 'color': [0.439, 0.831, 1.000], 'number': 57};\nmodule.exports[ 58] = module.exports[ 'Ce'] = {'symbol':  'Ce', 'name':        'cerium', 'mass': 140.11600000, 'radius':  2.0400, 'color': [1.000, 1.000, 0.780], 'number': 58};\nmodule.exports[ 59] = module.exports[ 'Pr'] = {'symbol':  'Pr', 'name':  'praseodymium', 'mass': 140.90765000, 'radius':  2.0300, 'color': [0.851, 1.000, 0.780], 'number': 59};\nmodule.exports[ 60] = module.exports[ 'Nd'] = {'symbol':  'Nd', 'name':     'neodymium', 'mass': 144.24200000, 'radius':  2.0100, 'color': [0.780, 1.000, 0.780], 'number': 60};\nmodule.exports[ 61] = module.exports[ 'Pm'] = {'symbol':  'Pm', 'name':    'promethium', 'mass': 145.00000000, 'radius':  1.9900, 'color': [0.639, 1.000, 0.780], 'number': 61};\nmodule.exports[ 62] = module.exports[ 'Sm'] = {'symbol':  'Sm', 'name':      'samarium', 'mass': 150.36000000, 'radius':  1.9800, 'color': [0.561, 1.000, 0.780], 'number': 62};\nmodule.exports[ 63] = module.exports[ 'Eu'] = {'symbol':  'Eu', 'name':      'europium', 'mass': 151.96400000, 'radius':  1.9800, 'color': [0.380, 1.000, 0.780], 'number': 63};\nmodule.exports[ 64] = module.exports[ 'Gd'] = {'symbol':  'Gd', 'name':    'gadolinium', 'mass': 157.25000000, 'radius':  1.9600, 'color': [0.271, 1.000, 0.780], 'number': 64};\nmodule.exports[ 65] = module.exports[ 'Tb'] = {'symbol':  'Tb', 'name':       'terbium', 'mass': 158.92535000, 'radius':  1.9400, 'color': [0.189, 1.000, 0.780], 'number': 65};\nmodule.exports[ 66] = module.exports[ 'Dy'] = {'symbol':  'Dy', 'name':    'dysprosium', 'mass': 162.50000000, 'radius':  1.9200, 'color': [0.122, 1.000, 0.780], 'number': 66};\nmodule.exports[ 67] = module.exports[ 'Ho'] = {'symbol':  'Ho', 'name':       'holmium', 'mass': 164.93032000, 'radius':  1.9200, 'color': [0.000, 1.000, 0.612], 'number': 67};\nmodule.exports[ 68] = module.exports[ 'Er'] = {'symbol':  'Er', 'name':        'erbium', 'mass': 167.25900000, 'radius':  1.8900, 'color': [0.000, 0.902, 0.459], 'number': 68};\nmodule.exports[ 69] = module.exports[ 'Tm'] = {'symbol':  'Tm', 'name':       'thulium', 'mass': 168.93421000, 'radius':  1.9000, 'color': [0.000, 0.831, 0.322], 'number': 69};\nmodule.exports[ 70] = module.exports[ 'Yb'] = {'symbol':  'Yb', 'name':     'ytterbium', 'mass': 173.05400000, 'radius':  1.8700, 'color': [0.000, 0.749, 0.220], 'number': 70};\nmodule.exports[ 71] = module.exports[ 'Lu'] = {'symbol':  'Lu', 'name':      'lutetium', 'mass': 174.96680000, 'radius':  1.8700, 'color': [0.000, 0.671, 0.141], 'number': 71};\nmodule.exports[ 72] = module.exports[ 'Hf'] = {'symbol':  'Hf', 'name':       'hafnium', 'mass': 178.49000000, 'radius':  1.7500, 'color': [0.302, 0.761, 1.000], 'number': 72};\nmodule.exports[ 73] = module.exports[ 'Ta'] = {'symbol':  'Ta', 'name':      'tantalum', 'mass': 180.94788000, 'radius':  1.7000, 'color': [0.302, 0.651, 1.000], 'number': 73};\nmodule.exports[ 74] = module.exports[  'W'] = {'symbol':   'W', 'name':      'tungsten', 'mass': 183.84000000, 'radius':  1.6200, 'color': [0.129, 0.580, 0.839], 'number': 74};\nmodule.exports[ 75] = module.exports[ 'Re'] = {'symbol':  'Re', 'name':       'rhenium', 'mass': 186.20700000, 'radius':  1.5100, 'color': [0.149, 0.490, 0.671], 'number': 75};\nmodule.exports[ 76] = module.exports[ 'Os'] = {'symbol':  'Os', 'name':        'osmium', 'mass': 190.23000000, 'radius':  1.4400, 'color': [0.149, 0.400, 0.588], 'number': 76};\nmodule.exports[ 77] = module.exports[ 'Ir'] = {'symbol':  'Ir', 'name':       'iridium', 'mass': 192.21700000, 'radius':  1.4100, 'color': [0.090, 0.329, 0.529], 'number': 77};\nmodule.exports[ 78] = module.exports[ 'Pt'] = {'symbol':  'Pt', 'name':      'platinum', 'mass': 195.08400000, 'radius':  1.3600, 'color': [0.816, 0.816, 0.878], 'number': 78};\nmodule.exports[ 79] = module.exports[ 'Au'] = {'symbol':  'Au', 'name':          'gold', 'mass': 196.96656900, 'radius':  1.3600, 'color': [1.000, 0.820, 0.137], 'number': 79};\nmodule.exports[ 80] = module.exports[ 'Hg'] = {'symbol':  'Hg', 'name':       'mercury', 'mass': 200.59000000, 'radius':  1.3200, 'color': [0.722, 0.722, 0.816], 'number': 80};\nmodule.exports[ 81] = module.exports[ 'Tl'] = {'symbol':  'Tl', 'name':      'thallium', 'mass': 204.38330000, 'radius':  1.4500, 'color': [0.651, 0.329, 0.302], 'number': 81};\nmodule.exports[ 82] = module.exports[ 'Pb'] = {'symbol':  'Pb', 'name':          'lead', 'mass': 207.20000000, 'radius':  1.4600, 'color': [0.341, 0.349, 0.380], 'number': 82};\nmodule.exports[ 83] = module.exports[ 'Bi'] = {'symbol':  'Bi', 'name':       'bismuth', 'mass': 208.98040000, 'radius':  1.4800, 'color': [0.620, 0.310, 0.710], 'number': 83};\nmodule.exports[ 84] = module.exports[ 'Po'] = {'symbol':  'Po', 'name':      'polonium', 'mass': 210.00000000, 'radius':  1.4000, 'color': [0.671, 0.361, 0.000], 'number': 84};\nmodule.exports[ 85] = module.exports[ 'At'] = {'symbol':  'At', 'name':      'astatine', 'mass': 210.00000000, 'radius':  1.5000, 'color': [0.459, 0.310, 0.271], 'number': 85};\nmodule.exports[ 86] = module.exports[ 'Rn'] = {'symbol':  'Rn', 'name':         'radon', 'mass': 220.00000000, 'radius':  1.5000, 'color': [0.259, 0.510, 0.588], 'number': 86};\nmodule.exports[ 87] = module.exports[ 'Fr'] = {'symbol':  'Fr', 'name':      'francium', 'mass': 223.00000000, 'radius':  2.6000, 'color': [0.259, 0.000, 0.400], 'number': 87};\nmodule.exports[ 88] = module.exports[ 'Ra'] = {'symbol':  'Ra', 'name':        'radium', 'mass': 226.00000000, 'radius':  2.2100, 'color': [0.000, 0.490, 0.000], 'number': 88};\nmodule.exports[ 89] = module.exports[ 'Ac'] = {'symbol':  'Ac', 'name':      'actinium', 'mass': 227.00000000, 'radius':  2.1500, 'color': [0.439, 0.671, 0.980], 'number': 89};\nmodule.exports[ 90] = module.exports[ 'Th'] = {'symbol':  'Th', 'name':       'thorium', 'mass': 231.03588000, 'radius':  2.0600, 'color': [0.000, 0.729, 1.000], 'number': 90};\nmodule.exports[ 91] = module.exports[ 'Pa'] = {'symbol':  'Pa', 'name':  'protactinium', 'mass': 232.03806000, 'radius':  2.0000, 'color': [0.000, 0.631, 1.000], 'number': 91};\nmodule.exports[ 92] = module.exports[  'U'] = {'symbol':   'U', 'name':       'uranium', 'mass': 237.00000000, 'radius':  1.9600, 'color': [0.000, 0.561, 1.000], 'number': 92};\nmodule.exports[ 93] = module.exports[ 'Np'] = {'symbol':  'Np', 'name':     'neptunium', 'mass': 238.02891000, 'radius':  1.9000, 'color': [0.000, 0.502, 1.000], 'number': 93};\nmodule.exports[ 94] = module.exports[ 'Pu'] = {'symbol':  'Pu', 'name':     'plutonium', 'mass': 243.00000000, 'radius':  1.8700, 'color': [0.000, 0.420, 1.000], 'number': 94};\nmodule.exports[ 95] = module.exports[ 'Am'] = {'symbol':  'Am', 'name':     'americium', 'mass': 244.00000000, 'radius':  1.8000, 'color': [0.329, 0.361, 0.949], 'number': 95};\nmodule.exports[ 96] = module.exports[ 'Cm'] = {'symbol':  'Cm', 'name':        'curium', 'mass': 247.00000000, 'radius':  1.6900, 'color': [0.471, 0.361, 0.890], 'number': 96};\nmodule.exports[ 97] = module.exports[ 'Bk'] = {'symbol':  'Bk', 'name':     'berkelium', 'mass': 247.00000000, 'radius':  1.6600, 'color': [0.541, 0.310, 0.890], 'number': 97};\nmodule.exports[ 98] = module.exports[ 'Cf'] = {'symbol':  'Cf', 'name':   'californium', 'mass': 251.00000000, 'radius':  1.6800, 'color': [0.631, 0.212, 0.831], 'number': 98};\nmodule.exports[ 99] = module.exports[ 'Es'] = {'symbol':  'Es', 'name':   'einsteinium', 'mass': 252.00000000, 'radius':  1.6500, 'color': [0.702, 0.122, 0.831], 'number': 99};\nmodule.exports[100] = module.exports[ 'Fm'] = {'symbol':  'Fm', 'name':       'fermium', 'mass': 257.00000000, 'radius':  1.6700, 'color': [0.702, 0.122, 0.729], 'number': 100};\nmodule.exports[101] = module.exports[ 'Md'] = {'symbol':  'Md', 'name':   'mendelevium', 'mass': 258.00000000, 'radius':  1.7300, 'color': [0.702, 0.051, 0.651], 'number': 101};\nmodule.exports[102] = module.exports[ 'No'] = {'symbol':  'No', 'name':      'nobelium', 'mass': 259.00000000, 'radius':  1.7600, 'color': [0.741, 0.051, 0.529], 'number': 102};\nmodule.exports[103] = module.exports[ 'Lr'] = {'symbol':  'Lr', 'name':    'lawrencium', 'mass': 262.00000000, 'radius':  1.6100, 'color': [0.780, 0.000, 0.400], 'number': 103};\nmodule.exports[104] = module.exports[ 'Rf'] = {'symbol':  'Rf', 'name': 'rutherfordium', 'mass': 261.00000000, 'radius':  1.5700, 'color': [0.800, 0.000, 0.349], 'number': 104};\nmodule.exports[105] = module.exports[ 'Db'] = {'symbol':  'Db', 'name':       'dubnium', 'mass': 262.00000000, 'radius':  1.4900, 'color': [0.820, 0.000, 0.310], 'number': 105};\nmodule.exports[106] = module.exports[ 'Sg'] = {'symbol':  'Sg', 'name':    'seaborgium', 'mass': 266.00000000, 'radius':  1.4300, 'color': [0.851, 0.000, 0.271], 'number': 106};\nmodule.exports[107] = module.exports[ 'Bh'] = {'symbol':  'Bh', 'name':       'bohrium', 'mass': 264.00000000, 'radius':  1.4100, 'color': [0.878, 0.000, 0.220], 'number': 107};\nmodule.exports[108] = module.exports[ 'Hs'] = {'symbol':  'Hs', 'name':       'hassium', 'mass': 277.00000000, 'radius':  1.3400, 'color': [0.902, 0.000, 0.180], 'number': 108};\nmodule.exports[109] = module.exports[ 'Mt'] = {'symbol':  'Mt', 'name':    'meitnerium', 'mass': 268.00000000, 'radius':  1.2900, 'color': [0.922, 0.000, 0.149], 'number': 109};\nmodule.exports[110] = module.exports[ 'Ds'] = {'symbol':  'Ds', 'name':            'Ds', 'mass': 271.00000000, 'radius':  1.2800, 'color': [0.922, 0.000, 0.149], 'number': 110};\nmodule.exports[111] = module.exports['Uuu'] = {'symbol': 'Uuu', 'name':           'Uuu', 'mass': 272.00000000, 'radius':  1.2100, 'color': [0.922, 0.000, 0.149], 'number': 111};\nmodule.exports[112] = module.exports['Uub'] = {'symbol': 'Uub', 'name':           'Uub', 'mass': 285.00000000, 'radius':  1.2200, 'color': [0.922, 0.000, 0.149], 'number': 112};\nmodule.exports[113] = module.exports['Uut'] = {'symbol': 'Uut', 'name':           'Uut', 'mass': 284.00000000, 'radius':  1.3600, 'color': [0.922, 0.000, 0.149], 'number': 113};\nmodule.exports[114] = module.exports['Uuq'] = {'symbol': 'Uuq', 'name':           'Uuq', 'mass': 289.00000000, 'radius':  1.4300, 'color': [0.922, 0.000, 0.149], 'number': 114};\nmodule.exports[115] = module.exports['Uup'] = {'symbol': 'Uup', 'name':           'Uup', 'mass': 288.00000000, 'radius':  1.6200, 'color': [0.922, 0.000, 0.149], 'number': 115};\nmodule.exports[116] = module.exports['Uuh'] = {'symbol': 'Uuh', 'name':           'Uuh', 'mass': 292.00000000, 'radius':  1.7500, 'color': [0.922, 0.000, 0.149], 'number': 116};\nmodule.exports[117] = module.exports['Uus'] = {'symbol': 'Uus', 'name':           'Uus', 'mass': 294.00000000, 'radius':  1.6500, 'color': [0.922, 0.000, 0.149], 'number': 117};\nmodule.exports[118] = module.exports['Uuo'] = {'symbol': 'Uuo', 'name':           'Uuo', 'mass': 296.00000000, 'radius':  1.5700, 'color': [0.922, 0.000, 0.149], 'number': 118};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/elements.js?");

/***/ }),

/***/ "./node_modules/speck/src/gl-matrix.js":
/*!*********************************************!*\
  !*** ./node_modules/speck/src/gl-matrix.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * @fileoverview gl-matrix - High performance matrix and vector operations\n * @author Brandon Jones\n * @author Colin MacKenzie IV\n * @version 2.2.2\n */\n\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation\n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\n(function(_global) {\n  \"use strict\";\n\n  var shim = {};\n  if (false) {}\n  else {\n    // gl-matrix lives in commonjs, define its namespaces in exports\n    shim.exports = exports;\n  }\n\n  (function(exports) {\n    /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\nif(!GLMAT_EPSILON) {\n    var GLMAT_EPSILON = 0.000001;\n}\n\nif(!GLMAT_ARRAY_TYPE) {\n    var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\n}\n\nif(!GLMAT_RANDOM) {\n    var GLMAT_RANDOM = Math.random;\n}\n\n/**\n * @class Common utilities\n * @name glMatrix\n */\nvar glMatrix = {};\n\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\nglMatrix.setMatrixArrayType = function(type) {\n    GLMAT_ARRAY_TYPE = type;\n}\n\nif(typeof(exports) !== 'undefined') {\n    exports.glMatrix = glMatrix;\n}\n\nvar degree = Math.PI / 180;\n\n/**\n* Convert Degree To Radian\n*\n* @param {Number} Angle in Degrees\n*/\nglMatrix.toRadian = function(a){\n     return a * degree;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2 Dimensional Vector\n * @name vec2\n */\n\nvar vec2 = {};\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\nvec2.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(2);\n    out[0] = 0;\n    out[1] = 0;\n    return out;\n};\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\nvec2.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(2);\n    out[0] = a[0];\n    out[1] = a[1];\n    return out;\n};\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\nvec2.fromValues = function(x, y) {\n    var out = new GLMAT_ARRAY_TYPE(2);\n    out[0] = x;\n    out[1] = y;\n    return out;\n};\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\nvec2.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    return out;\n};\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\nvec2.set = function(out, x, y) {\n    out[0] = x;\n    out[1] = y;\n    return out;\n};\n\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.add = function(out, a, b) {\n    out[0] = a[0] + b[0];\n    out[1] = a[1] + b[1];\n    return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.subtract = function(out, a, b) {\n    out[0] = a[0] - b[0];\n    out[1] = a[1] - b[1];\n    return out;\n};\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nvec2.sub = vec2.subtract;\n\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.multiply = function(out, a, b) {\n    out[0] = a[0] * b[0];\n    out[1] = a[1] * b[1];\n    return out;\n};\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nvec2.mul = vec2.multiply;\n\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.divide = function(out, a, b) {\n    out[0] = a[0] / b[0];\n    out[1] = a[1] / b[1];\n    return out;\n};\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nvec2.div = vec2.divide;\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.min = function(out, a, b) {\n    out[0] = Math.min(a[0], b[0]);\n    out[1] = Math.min(a[1], b[1]);\n    return out;\n};\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.max = function(out, a, b) {\n    out[0] = Math.max(a[0], b[0]);\n    out[1] = Math.max(a[1], b[1]);\n    return out;\n};\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\nvec2.scale = function(out, a, b) {\n    out[0] = a[0] * b;\n    out[1] = a[1] * b;\n    return out;\n};\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\nvec2.scaleAndAdd = function(out, a, b, scale) {\n    out[0] = a[0] + (b[0] * scale);\n    out[1] = a[1] + (b[1] * scale);\n    return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\nvec2.distance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1];\n    return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nvec2.dist = vec2.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec2.squaredDistance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1];\n    return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nvec2.sqrDist = vec2.squaredDistance;\n\n/**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec2.length = function (a) {\n    var x = a[0],\n        y = a[1];\n    return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nvec2.len = vec2.length;\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec2.squaredLength = function (a) {\n    var x = a[0],\n        y = a[1];\n    return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nvec2.sqrLen = vec2.squaredLength;\n\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\nvec2.negate = function(out, a) {\n    out[0] = -a[0];\n    out[1] = -a[1];\n    return out;\n};\n\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to invert\n * @returns {vec2} out\n */\nvec2.inverse = function(out, a) {\n  out[0] = 1.0 / a[0];\n  out[1] = 1.0 / a[1];\n  return out;\n};\n\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\nvec2.normalize = function(out, a) {\n    var x = a[0],\n        y = a[1];\n    var len = x*x + y*y;\n    if (len > 0) {\n        //TODO: evaluate use of glm_invsqrt here?\n        len = 1 / Math.sqrt(len);\n        out[0] = a[0] * len;\n        out[1] = a[1] * len;\n    }\n    return out;\n};\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec2.dot = function (a, b) {\n    return a[0] * b[0] + a[1] * b[1];\n};\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\nvec2.cross = function(out, a, b) {\n    var z = a[0] * b[1] - a[1] * b[0];\n    out[0] = out[1] = 0;\n    out[2] = z;\n    return out;\n};\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec2} out\n */\nvec2.lerp = function (out, a, b, t) {\n    var ax = a[0],\n        ay = a[1];\n    out[0] = ax + t * (b[0] - ax);\n    out[1] = ay + t * (b[1] - ay);\n    return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\nvec2.random = function (out, scale) {\n    scale = scale || 1.0;\n    var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n    out[0] = Math.cos(r) * scale;\n    out[1] = Math.sin(r) * scale;\n    return out;\n};\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2 = function(out, a, m) {\n    var x = a[0],\n        y = a[1];\n    out[0] = m[0] * x + m[2] * y;\n    out[1] = m[1] * x + m[3] * y;\n    return out;\n};\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2d = function(out, a, m) {\n    var x = a[0],\n        y = a[1];\n    out[0] = m[0] * x + m[2] * y + m[4];\n    out[1] = m[1] * x + m[3] * y + m[5];\n    return out;\n};\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat3 = function(out, a, m) {\n    var x = a[0],\n        y = a[1];\n    out[0] = m[0] * x + m[3] * y + m[6];\n    out[1] = m[1] * x + m[4] * y + m[7];\n    return out;\n};\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat4 = function(out, a, m) {\n    var x = a[0], \n        y = a[1];\n    out[0] = m[0] * x + m[4] * y + m[12];\n    out[1] = m[1] * x + m[5] * y + m[13];\n    return out;\n};\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec2.forEach = (function() {\n    var vec = vec2.create();\n\n    return function(a, stride, offset, count, fn, arg) {\n        var i, l;\n        if(!stride) {\n            stride = 2;\n        }\n\n        if(!offset) {\n            offset = 0;\n        }\n        \n        if(count) {\n            l = Math.min((count * stride) + offset, a.length);\n        } else {\n            l = a.length;\n        }\n\n        for(i = offset; i < l; i += stride) {\n            vec[0] = a[i]; vec[1] = a[i+1];\n            fn(vec, vec, arg);\n            a[i] = vec[0]; a[i+1] = vec[1];\n        }\n        \n        return a;\n    };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec2} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec2.str = function (a) {\n    return 'vec2(' + a[0] + ', ' + a[1] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n    exports.vec2 = vec2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3 Dimensional Vector\n * @name vec3\n */\n\nvar vec3 = {};\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nvec3.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(3);\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n    return out;\n};\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nvec3.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(3);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    return out;\n};\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nvec3.fromValues = function(x, y, z) {\n    var out = new GLMAT_ARRAY_TYPE(3);\n    out[0] = x;\n    out[1] = y;\n    out[2] = z;\n    return out;\n};\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\nvec3.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    return out;\n};\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nvec3.set = function(out, x, y, z) {\n    out[0] = x;\n    out[1] = y;\n    out[2] = z;\n    return out;\n};\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.add = function(out, a, b) {\n    out[0] = a[0] + b[0];\n    out[1] = a[1] + b[1];\n    out[2] = a[2] + b[2];\n    return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.subtract = function(out, a, b) {\n    out[0] = a[0] - b[0];\n    out[1] = a[1] - b[1];\n    out[2] = a[2] - b[2];\n    return out;\n};\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nvec3.sub = vec3.subtract;\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.multiply = function(out, a, b) {\n    out[0] = a[0] * b[0];\n    out[1] = a[1] * b[1];\n    out[2] = a[2] * b[2];\n    return out;\n};\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nvec3.mul = vec3.multiply;\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.divide = function(out, a, b) {\n    out[0] = a[0] / b[0];\n    out[1] = a[1] / b[1];\n    out[2] = a[2] / b[2];\n    return out;\n};\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nvec3.div = vec3.divide;\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.min = function(out, a, b) {\n    out[0] = Math.min(a[0], b[0]);\n    out[1] = Math.min(a[1], b[1]);\n    out[2] = Math.min(a[2], b[2]);\n    return out;\n};\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.max = function(out, a, b) {\n    out[0] = Math.max(a[0], b[0]);\n    out[1] = Math.max(a[1], b[1]);\n    out[2] = Math.max(a[2], b[2]);\n    return out;\n};\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nvec3.scale = function(out, a, b) {\n    out[0] = a[0] * b;\n    out[1] = a[1] * b;\n    out[2] = a[2] * b;\n    return out;\n};\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nvec3.scaleAndAdd = function(out, a, b, scale) {\n    out[0] = a[0] + (b[0] * scale);\n    out[1] = a[1] + (b[1] * scale);\n    out[2] = a[2] + (b[2] * scale);\n    return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\nvec3.distance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2];\n    return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nvec3.dist = vec3.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec3.squaredDistance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2];\n    return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nvec3.sqrDist = vec3.squaredDistance;\n\n/**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec3.length = function (a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2];\n    return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nvec3.len = vec3.length;\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec3.squaredLength = function (a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2];\n    return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nvec3.sqrLen = vec3.squaredLength;\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\nvec3.negate = function(out, a) {\n    out[0] = -a[0];\n    out[1] = -a[1];\n    out[2] = -a[2];\n    return out;\n};\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\nvec3.inverse = function(out, a) {\n  out[0] = 1.0 / a[0];\n  out[1] = 1.0 / a[1];\n  out[2] = 1.0 / a[2];\n  return out;\n};\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\nvec3.normalize = function(out, a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2];\n    var len = x*x + y*y + z*z;\n    if (len > 0) {\n        //TODO: evaluate use of glm_invsqrt here?\n        len = 1 / Math.sqrt(len);\n        out[0] = a[0] * len;\n        out[1] = a[1] * len;\n        out[2] = a[2] * len;\n    }\n    return out;\n};\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec3.dot = function (a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n};\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.cross = function(out, a, b) {\n    var ax = a[0], ay = a[1], az = a[2],\n        bx = b[0], by = b[1], bz = b[2];\n\n    out[0] = ay * bz - az * by;\n    out[1] = az * bx - ax * bz;\n    out[2] = ax * by - ay * bx;\n    return out;\n};\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec3} out\n */\nvec3.lerp = function (out, a, b, t) {\n    var ax = a[0],\n        ay = a[1],\n        az = a[2];\n    out[0] = ax + t * (b[0] - ax);\n    out[1] = ay + t * (b[1] - ay);\n    out[2] = az + t * (b[2] - az);\n    return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\nvec3.random = function (out, scale) {\n    scale = scale || 1.0;\n\n    var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n    var z = (GLMAT_RANDOM() * 2.0) - 1.0;\n    var zScale = Math.sqrt(1.0-z*z) * scale;\n\n    out[0] = Math.cos(r) * zScale;\n    out[1] = Math.sin(r) * zScale;\n    out[2] = z * scale;\n    return out;\n};\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat4 = function(out, a, m) {\n    var x = a[0], y = a[1], z = a[2],\n        w = m[3] * x + m[7] * y + m[11] * z + m[15];\n    w = w || 1.0;\n    out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n    out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n    out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n    return out;\n};\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat3 = function(out, a, m) {\n    var x = a[0], y = a[1], z = a[2];\n    out[0] = x * m[0] + y * m[3] + z * m[6];\n    out[1] = x * m[1] + y * m[4] + z * m[7];\n    out[2] = x * m[2] + y * m[5] + z * m[8];\n    return out;\n};\n\n/**\n * Transforms the vec3 with a quat\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\nvec3.transformQuat = function(out, a, q) {\n    // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\n    var x = a[0], y = a[1], z = a[2],\n        qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n        // calculate quat * vec\n        ix = qw * x + qy * z - qz * y,\n        iy = qw * y + qz * x - qx * z,\n        iz = qw * z + qx * y - qy * x,\n        iw = -qx * x - qy * y - qz * z;\n\n    // calculate result * inverse quat\n    out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n    out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n    out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n    return out;\n};\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateX = function(out, a, b, c){\n   var p = [], r=[];\n\t  //Translate point to the origin\n\t  p[0] = a[0] - b[0];\n\t  p[1] = a[1] - b[1];\n  \tp[2] = a[2] - b[2];\n\n\t  //perform rotation\n\t  r[0] = p[0];\n\t  r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);\n\t  r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);\n\n\t  //translate to correct position\n\t  out[0] = r[0] + b[0];\n\t  out[1] = r[1] + b[1];\n\t  out[2] = r[2] + b[2];\n\n  \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateY = function(out, a, b, c){\n  \tvar p = [], r=[];\n  \t//Translate point to the origin\n  \tp[0] = a[0] - b[0];\n  \tp[1] = a[1] - b[1];\n  \tp[2] = a[2] - b[2];\n  \n  \t//perform rotation\n  \tr[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);\n  \tr[1] = p[1];\n  \tr[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);\n  \n  \t//translate to correct position\n  \tout[0] = r[0] + b[0];\n  \tout[1] = r[1] + b[1];\n  \tout[2] = r[2] + b[2];\n  \n  \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateZ = function(out, a, b, c){\n  \tvar p = [], r=[];\n  \t//Translate point to the origin\n  \tp[0] = a[0] - b[0];\n  \tp[1] = a[1] - b[1];\n  \tp[2] = a[2] - b[2];\n  \n  \t//perform rotation\n  \tr[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);\n  \tr[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);\n  \tr[2] = p[2];\n  \n  \t//translate to correct position\n  \tout[0] = r[0] + b[0];\n  \tout[1] = r[1] + b[1];\n  \tout[2] = r[2] + b[2];\n  \n  \treturn out;\n};\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec3.forEach = (function() {\n    var vec = vec3.create();\n\n    return function(a, stride, offset, count, fn, arg) {\n        var i, l;\n        if(!stride) {\n            stride = 3;\n        }\n\n        if(!offset) {\n            offset = 0;\n        }\n        \n        if(count) {\n            l = Math.min((count * stride) + offset, a.length);\n        } else {\n            l = a.length;\n        }\n\n        for(i = offset; i < l; i += stride) {\n            vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];\n            fn(vec, vec, arg);\n            a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];\n        }\n        \n        return a;\n    };\n})();\n\n/**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\nvec3.angle = function(a, b) {\n   \n    var tempA = vec3.fromValues(a[0], a[1], a[2]);\n    var tempB = vec3.fromValues(b[0], b[1], b[2]);\n \n    vec3.normalize(tempA, tempA);\n    vec3.normalize(tempB, tempB);\n \n    var cosine = vec3.dot(tempA, tempB);\n\n    if(cosine > 1.0){\n        return 0;\n    } else {\n        return Math.acos(cosine);\n    }     \n};\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec3} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec3.str = function (a) {\n    return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n    exports.vec3 = vec3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4 Dimensional Vector\n * @name vec4\n */\n\nvar vec4 = {};\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nvec4.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    return out;\n};\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nvec4.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    return out;\n};\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nvec4.fromValues = function(x, y, z, w) {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = x;\n    out[1] = y;\n    out[2] = z;\n    out[3] = w;\n    return out;\n};\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\nvec4.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    return out;\n};\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nvec4.set = function(out, x, y, z, w) {\n    out[0] = x;\n    out[1] = y;\n    out[2] = z;\n    out[3] = w;\n    return out;\n};\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.add = function(out, a, b) {\n    out[0] = a[0] + b[0];\n    out[1] = a[1] + b[1];\n    out[2] = a[2] + b[2];\n    out[3] = a[3] + b[3];\n    return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.subtract = function(out, a, b) {\n    out[0] = a[0] - b[0];\n    out[1] = a[1] - b[1];\n    out[2] = a[2] - b[2];\n    out[3] = a[3] - b[3];\n    return out;\n};\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nvec4.sub = vec4.subtract;\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.multiply = function(out, a, b) {\n    out[0] = a[0] * b[0];\n    out[1] = a[1] * b[1];\n    out[2] = a[2] * b[2];\n    out[3] = a[3] * b[3];\n    return out;\n};\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nvec4.mul = vec4.multiply;\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.divide = function(out, a, b) {\n    out[0] = a[0] / b[0];\n    out[1] = a[1] / b[1];\n    out[2] = a[2] / b[2];\n    out[3] = a[3] / b[3];\n    return out;\n};\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nvec4.div = vec4.divide;\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.min = function(out, a, b) {\n    out[0] = Math.min(a[0], b[0]);\n    out[1] = Math.min(a[1], b[1]);\n    out[2] = Math.min(a[2], b[2]);\n    out[3] = Math.min(a[3], b[3]);\n    return out;\n};\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.max = function(out, a, b) {\n    out[0] = Math.max(a[0], b[0]);\n    out[1] = Math.max(a[1], b[1]);\n    out[2] = Math.max(a[2], b[2]);\n    out[3] = Math.max(a[3], b[3]);\n    return out;\n};\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nvec4.scale = function(out, a, b) {\n    out[0] = a[0] * b;\n    out[1] = a[1] * b;\n    out[2] = a[2] * b;\n    out[3] = a[3] * b;\n    return out;\n};\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nvec4.scaleAndAdd = function(out, a, b, scale) {\n    out[0] = a[0] + (b[0] * scale);\n    out[1] = a[1] + (b[1] * scale);\n    out[2] = a[2] + (b[2] * scale);\n    out[3] = a[3] + (b[3] * scale);\n    return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\nvec4.distance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2],\n        w = b[3] - a[3];\n    return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nvec4.dist = vec4.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec4.squaredDistance = function(a, b) {\n    var x = b[0] - a[0],\n        y = b[1] - a[1],\n        z = b[2] - a[2],\n        w = b[3] - a[3];\n    return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nvec4.sqrDist = vec4.squaredDistance;\n\n/**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec4.length = function (a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2],\n        w = a[3];\n    return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nvec4.len = vec4.length;\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec4.squaredLength = function (a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2],\n        w = a[3];\n    return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nvec4.sqrLen = vec4.squaredLength;\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\nvec4.negate = function(out, a) {\n    out[0] = -a[0];\n    out[1] = -a[1];\n    out[2] = -a[2];\n    out[3] = -a[3];\n    return out;\n};\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\nvec4.inverse = function(out, a) {\n  out[0] = 1.0 / a[0];\n  out[1] = 1.0 / a[1];\n  out[2] = 1.0 / a[2];\n  out[3] = 1.0 / a[3];\n  return out;\n};\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\nvec4.normalize = function(out, a) {\n    var x = a[0],\n        y = a[1],\n        z = a[2],\n        w = a[3];\n    var len = x*x + y*y + z*z + w*w;\n    if (len > 0) {\n        len = 1 / Math.sqrt(len);\n        out[0] = a[0] * len;\n        out[1] = a[1] * len;\n        out[2] = a[2] * len;\n        out[3] = a[3] * len;\n    }\n    return out;\n};\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec4.dot = function (a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n};\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec4} out\n */\nvec4.lerp = function (out, a, b, t) {\n    var ax = a[0],\n        ay = a[1],\n        az = a[2],\n        aw = a[3];\n    out[0] = ax + t * (b[0] - ax);\n    out[1] = ay + t * (b[1] - ay);\n    out[2] = az + t * (b[2] - az);\n    out[3] = aw + t * (b[3] - aw);\n    return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\nvec4.random = function (out, scale) {\n    scale = scale || 1.0;\n\n    //TODO: This is a pretty awful way of doing this. Find something better.\n    out[0] = GLMAT_RANDOM();\n    out[1] = GLMAT_RANDOM();\n    out[2] = GLMAT_RANDOM();\n    out[3] = GLMAT_RANDOM();\n    vec4.normalize(out, out);\n    vec4.scale(out, out, scale);\n    return out;\n};\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\nvec4.transformMat4 = function(out, a, m) {\n    var x = a[0], y = a[1], z = a[2], w = a[3];\n    out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n    out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n    out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n    out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n    return out;\n};\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\nvec4.transformQuat = function(out, a, q) {\n    var x = a[0], y = a[1], z = a[2],\n        qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n        // calculate quat * vec\n        ix = qw * x + qy * z - qz * y,\n        iy = qw * y + qz * x - qx * z,\n        iz = qw * z + qx * y - qy * x,\n        iw = -qx * x - qy * y - qz * z;\n\n    // calculate result * inverse quat\n    out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n    out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n    out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n    return out;\n};\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec4.forEach = (function() {\n    var vec = vec4.create();\n\n    return function(a, stride, offset, count, fn, arg) {\n        var i, l;\n        if(!stride) {\n            stride = 4;\n        }\n\n        if(!offset) {\n            offset = 0;\n        }\n        \n        if(count) {\n            l = Math.min((count * stride) + offset, a.length);\n        } else {\n            l = a.length;\n        }\n\n        for(i = offset; i < l; i += stride) {\n            vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];\n            fn(vec, vec, arg);\n            a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];\n        }\n        \n        return a;\n    };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec4} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec4.str = function (a) {\n    return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n    exports.vec4 = vec4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x2 Matrix\n * @name mat2\n */\n\nvar mat2 = {};\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    return out;\n};\n\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    return out;\n};\n\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    return out;\n};\n\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\nmat2.identity = function(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    return out;\n};\n\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.transpose = function(out, a) {\n    // If we are transposing ourselves we can skip a few steps but have to cache some values\n    if (out === a) {\n        var a1 = a[1];\n        out[1] = a[2];\n        out[2] = a1;\n    } else {\n        out[0] = a[0];\n        out[1] = a[2];\n        out[2] = a[1];\n        out[3] = a[3];\n    }\n    \n    return out;\n};\n\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.invert = function(out, a) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\n        // Calculate the determinant\n        det = a0 * a3 - a2 * a1;\n\n    if (!det) {\n        return null;\n    }\n    det = 1.0 / det;\n    \n    out[0] =  a3 * det;\n    out[1] = -a1 * det;\n    out[2] = -a2 * det;\n    out[3] =  a0 * det;\n\n    return out;\n};\n\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.adjoint = function(out, a) {\n    // Caching this value is nessecary if out == a\n    var a0 = a[0];\n    out[0] =  a[3];\n    out[1] = -a[1];\n    out[2] = -a[2];\n    out[3] =  a0;\n\n    return out;\n};\n\n/**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2.determinant = function (a) {\n    return a[0] * a[3] - a[2] * a[1];\n};\n\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\nmat2.multiply = function (out, a, b) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n    var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n    out[0] = a0 * b0 + a2 * b1;\n    out[1] = a1 * b0 + a3 * b1;\n    out[2] = a0 * b2 + a2 * b3;\n    out[3] = a1 * b2 + a3 * b3;\n    return out;\n};\n\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\nmat2.mul = mat2.multiply;\n\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nmat2.rotate = function (out, a, rad) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n        s = Math.sin(rad),\n        c = Math.cos(rad);\n    out[0] = a0 *  c + a2 * s;\n    out[1] = a1 *  c + a3 * s;\n    out[2] = a0 * -s + a2 * c;\n    out[3] = a1 * -s + a3 * c;\n    return out;\n};\n\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\nmat2.scale = function(out, a, v) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n        v0 = v[0], v1 = v[1];\n    out[0] = a0 * v0;\n    out[1] = a1 * v0;\n    out[2] = a2 * v1;\n    out[3] = a3 * v1;\n    return out;\n};\n\n/**\n * Returns a string representation of a mat2\n *\n * @param {mat2} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2.str = function (a) {\n    return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2.frob = function (a) {\n    return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))\n};\n\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix \n * @param {mat2} D the diagonal matrix \n * @param {mat2} U the upper triangular matrix \n * @param {mat2} a the input matrix to factorize\n */\n\nmat2.LDU = function (L, D, U, a) { \n    L[2] = a[2]/a[0]; \n    U[0] = a[0]; \n    U[1] = a[1]; \n    U[3] = a[3] - L[2] * U[1]; \n    return [L, D, U];       \n}; \n\nif(typeof(exports) !== 'undefined') {\n    exports.mat2 = mat2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x3 Matrix\n * @name mat2d\n * \n * @description \n * A mat2d contains six elements defined as:\n * <pre>\n * [a, c, tx,\n *  b, d, ty]\n * </pre>\n * This is a short form for the 3x3 matrix:\n * <pre>\n * [a, c, tx,\n *  b, d, ty,\n *  0, 0, 1]\n * </pre>\n * The last row is ignored so the array is shorter and operations are faster.\n */\n\nvar mat2d = {};\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(6);\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    out[4] = 0;\n    out[5] = 0;\n    return out;\n};\n\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(6);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    return out;\n};\n\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    return out;\n};\n\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\nmat2d.identity = function(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    out[4] = 0;\n    out[5] = 0;\n    return out;\n};\n\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.invert = function(out, a) {\n    var aa = a[0], ab = a[1], ac = a[2], ad = a[3],\n        atx = a[4], aty = a[5];\n\n    var det = aa * ad - ab * ac;\n    if(!det){\n        return null;\n    }\n    det = 1.0 / det;\n\n    out[0] = ad * det;\n    out[1] = -ab * det;\n    out[2] = -ac * det;\n    out[3] = aa * det;\n    out[4] = (ac * aty - ad * atx) * det;\n    out[5] = (ab * atx - aa * aty) * det;\n    return out;\n};\n\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2d.determinant = function (a) {\n    return a[0] * a[3] - a[1] * a[2];\n};\n\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\nmat2d.multiply = function (out, a, b) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n        b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n    out[0] = a0 * b0 + a2 * b1;\n    out[1] = a1 * b0 + a3 * b1;\n    out[2] = a0 * b2 + a2 * b3;\n    out[3] = a1 * b2 + a3 * b3;\n    out[4] = a0 * b4 + a2 * b5 + a4;\n    out[5] = a1 * b4 + a3 * b5 + a5;\n    return out;\n};\n\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\nmat2d.mul = mat2d.multiply;\n\n\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\nmat2d.rotate = function (out, a, rad) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n        s = Math.sin(rad),\n        c = Math.cos(rad);\n    out[0] = a0 *  c + a2 * s;\n    out[1] = a1 *  c + a3 * s;\n    out[2] = a0 * -s + a2 * c;\n    out[3] = a1 * -s + a3 * c;\n    out[4] = a4;\n    out[5] = a5;\n    return out;\n};\n\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\nmat2d.scale = function(out, a, v) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n        v0 = v[0], v1 = v[1];\n    out[0] = a0 * v0;\n    out[1] = a1 * v0;\n    out[2] = a2 * v1;\n    out[3] = a3 * v1;\n    out[4] = a4;\n    out[5] = a5;\n    return out;\n};\n\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\nmat2d.translate = function(out, a, v) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n        v0 = v[0], v1 = v[1];\n    out[0] = a0;\n    out[1] = a1;\n    out[2] = a2;\n    out[3] = a3;\n    out[4] = a0 * v0 + a2 * v1 + a4;\n    out[5] = a1 * v0 + a3 * v1 + a5;\n    return out;\n};\n\n/**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2d.str = function (a) {\n    return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n                    a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2d.frob = function (a) { \n    return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))\n}; \n\nif(typeof(exports) !== 'undefined') {\n    exports.mat2d = mat2d;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3x3 Matrix\n * @name mat3\n */\n\nvar mat3 = {};\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(9);\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 1;\n    out[5] = 0;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 1;\n    return out;\n};\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a   the source 4x4 matrix\n * @returns {mat3} out\n */\nmat3.fromMat4 = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[4];\n    out[4] = a[5];\n    out[5] = a[6];\n    out[6] = a[8];\n    out[7] = a[9];\n    out[8] = a[10];\n    return out;\n};\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(9);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    return out;\n};\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    return out;\n};\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nmat3.identity = function(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 1;\n    out[5] = 0;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 1;\n    return out;\n};\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.transpose = function(out, a) {\n    // If we are transposing ourselves we can skip a few steps but have to cache some values\n    if (out === a) {\n        var a01 = a[1], a02 = a[2], a12 = a[5];\n        out[1] = a[3];\n        out[2] = a[6];\n        out[3] = a01;\n        out[5] = a[7];\n        out[6] = a02;\n        out[7] = a12;\n    } else {\n        out[0] = a[0];\n        out[1] = a[3];\n        out[2] = a[6];\n        out[3] = a[1];\n        out[4] = a[4];\n        out[5] = a[7];\n        out[6] = a[2];\n        out[7] = a[5];\n        out[8] = a[8];\n    }\n    \n    return out;\n};\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.invert = function(out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8],\n\n        b01 = a22 * a11 - a12 * a21,\n        b11 = -a22 * a10 + a12 * a20,\n        b21 = a21 * a10 - a11 * a20,\n\n        // Calculate the determinant\n        det = a00 * b01 + a01 * b11 + a02 * b21;\n\n    if (!det) { \n        return null; \n    }\n    det = 1.0 / det;\n\n    out[0] = b01 * det;\n    out[1] = (-a22 * a01 + a02 * a21) * det;\n    out[2] = (a12 * a01 - a02 * a11) * det;\n    out[3] = b11 * det;\n    out[4] = (a22 * a00 - a02 * a20) * det;\n    out[5] = (-a12 * a00 + a02 * a10) * det;\n    out[6] = b21 * det;\n    out[7] = (-a21 * a00 + a01 * a20) * det;\n    out[8] = (a11 * a00 - a01 * a10) * det;\n    return out;\n};\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.adjoint = function(out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8];\n\n    out[0] = (a11 * a22 - a12 * a21);\n    out[1] = (a02 * a21 - a01 * a22);\n    out[2] = (a01 * a12 - a02 * a11);\n    out[3] = (a12 * a20 - a10 * a22);\n    out[4] = (a00 * a22 - a02 * a20);\n    out[5] = (a02 * a10 - a00 * a12);\n    out[6] = (a10 * a21 - a11 * a20);\n    out[7] = (a01 * a20 - a00 * a21);\n    out[8] = (a00 * a11 - a01 * a10);\n    return out;\n};\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\nmat3.determinant = function (a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8];\n\n    return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n};\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\nmat3.multiply = function (out, a, b) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8],\n\n        b00 = b[0], b01 = b[1], b02 = b[2],\n        b10 = b[3], b11 = b[4], b12 = b[5],\n        b20 = b[6], b21 = b[7], b22 = b[8];\n\n    out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n    out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n    out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n    out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n    out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n    out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n    out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n    out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n    out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n    return out;\n};\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nmat3.mul = mat3.multiply;\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\nmat3.translate = function(out, a, v) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8],\n        x = v[0], y = v[1];\n\n    out[0] = a00;\n    out[1] = a01;\n    out[2] = a02;\n\n    out[3] = a10;\n    out[4] = a11;\n    out[5] = a12;\n\n    out[6] = x * a00 + y * a10 + a20;\n    out[7] = x * a01 + y * a11 + a21;\n    out[8] = x * a02 + y * a12 + a22;\n    return out;\n};\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nmat3.rotate = function (out, a, rad) {\n    var a00 = a[0], a01 = a[1], a02 = a[2],\n        a10 = a[3], a11 = a[4], a12 = a[5],\n        a20 = a[6], a21 = a[7], a22 = a[8],\n\n        s = Math.sin(rad),\n        c = Math.cos(rad);\n\n    out[0] = c * a00 + s * a10;\n    out[1] = c * a01 + s * a11;\n    out[2] = c * a02 + s * a12;\n\n    out[3] = c * a10 - s * a00;\n    out[4] = c * a11 - s * a01;\n    out[5] = c * a12 - s * a02;\n\n    out[6] = a20;\n    out[7] = a21;\n    out[8] = a22;\n    return out;\n};\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nmat3.scale = function(out, a, v) {\n    var x = v[0], y = v[1];\n\n    out[0] = x * a[0];\n    out[1] = x * a[1];\n    out[2] = x * a[2];\n\n    out[3] = y * a[3];\n    out[4] = y * a[4];\n    out[5] = y * a[5];\n\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    return out;\n};\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nmat3.fromMat2d = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = 0;\n\n    out[3] = a[2];\n    out[4] = a[3];\n    out[5] = 0;\n\n    out[6] = a[4];\n    out[7] = a[5];\n    out[8] = 1;\n    return out;\n};\n\n/**\n* Calculates a 3x3 matrix from the given quaternion\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {quat} q Quaternion to create matrix from\n*\n* @returns {mat3} out\n*/\nmat3.fromQuat = function (out, q) {\n    var x = q[0], y = q[1], z = q[2], w = q[3],\n        x2 = x + x,\n        y2 = y + y,\n        z2 = z + z,\n\n        xx = x * x2,\n        yx = y * x2,\n        yy = y * y2,\n        zx = z * x2,\n        zy = z * y2,\n        zz = z * z2,\n        wx = w * x2,\n        wy = w * y2,\n        wz = w * z2;\n\n    out[0] = 1 - yy - zz;\n    out[3] = yx - wz;\n    out[6] = zx + wy;\n\n    out[1] = yx + wz;\n    out[4] = 1 - xx - zz;\n    out[7] = zy - wx;\n\n    out[2] = zx - wy;\n    out[5] = zy + wx;\n    out[8] = 1 - xx - yy;\n\n    return out;\n};\n\n/**\n* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {mat4} a Mat4 to derive the normal matrix from\n*\n* @returns {mat3} out\n*/\nmat3.normalFromMat4 = function (out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n        b00 = a00 * a11 - a01 * a10,\n        b01 = a00 * a12 - a02 * a10,\n        b02 = a00 * a13 - a03 * a10,\n        b03 = a01 * a12 - a02 * a11,\n        b04 = a01 * a13 - a03 * a11,\n        b05 = a02 * a13 - a03 * a12,\n        b06 = a20 * a31 - a21 * a30,\n        b07 = a20 * a32 - a22 * a30,\n        b08 = a20 * a33 - a23 * a30,\n        b09 = a21 * a32 - a22 * a31,\n        b10 = a21 * a33 - a23 * a31,\n        b11 = a22 * a33 - a23 * a32,\n\n        // Calculate the determinant\n        det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n    if (!det) { \n        return null; \n    }\n    det = 1.0 / det;\n\n    out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n    out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n    out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n    out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n    out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n    out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n    out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n    out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n    out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n    return out;\n};\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {mat3} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat3.str = function (a) {\n    return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n                    a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + \n                    a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat3.frob = function (a) {\n    return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n    exports.mat3 = mat3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4x4 Matrix\n * @name mat4\n */\n\nvar mat4 = {};\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(16);\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n    return out;\n};\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.clone = function(a) {\n    var out = new GLMAT_ARRAY_TYPE(16);\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    out[9] = a[9];\n    out[10] = a[10];\n    out[11] = a[11];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n    return out;\n};\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.copy = function(out, a) {\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[8] = a[8];\n    out[9] = a[9];\n    out[10] = a[10];\n    out[11] = a[11];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n    return out;\n};\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nmat4.identity = function(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n    return out;\n};\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.transpose = function(out, a) {\n    // If we are transposing ourselves we can skip a few steps but have to cache some values\n    if (out === a) {\n        var a01 = a[1], a02 = a[2], a03 = a[3],\n            a12 = a[6], a13 = a[7],\n            a23 = a[11];\n\n        out[1] = a[4];\n        out[2] = a[8];\n        out[3] = a[12];\n        out[4] = a01;\n        out[6] = a[9];\n        out[7] = a[13];\n        out[8] = a02;\n        out[9] = a12;\n        out[11] = a[14];\n        out[12] = a03;\n        out[13] = a13;\n        out[14] = a23;\n    } else {\n        out[0] = a[0];\n        out[1] = a[4];\n        out[2] = a[8];\n        out[3] = a[12];\n        out[4] = a[1];\n        out[5] = a[5];\n        out[6] = a[9];\n        out[7] = a[13];\n        out[8] = a[2];\n        out[9] = a[6];\n        out[10] = a[10];\n        out[11] = a[14];\n        out[12] = a[3];\n        out[13] = a[7];\n        out[14] = a[11];\n        out[15] = a[15];\n    }\n    \n    return out;\n};\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.invert = function(out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n        b00 = a00 * a11 - a01 * a10,\n        b01 = a00 * a12 - a02 * a10,\n        b02 = a00 * a13 - a03 * a10,\n        b03 = a01 * a12 - a02 * a11,\n        b04 = a01 * a13 - a03 * a11,\n        b05 = a02 * a13 - a03 * a12,\n        b06 = a20 * a31 - a21 * a30,\n        b07 = a20 * a32 - a22 * a30,\n        b08 = a20 * a33 - a23 * a30,\n        b09 = a21 * a32 - a22 * a31,\n        b10 = a21 * a33 - a23 * a31,\n        b11 = a22 * a33 - a23 * a32,\n\n        // Calculate the determinant\n        det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n    if (!det) { \n        return null; \n    }\n    det = 1.0 / det;\n\n    out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n    out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n    out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n    out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n    out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n    out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n    out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n    out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n    out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n    out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n    out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n    out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n    out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n    out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n    out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n    out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n    return out;\n};\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.adjoint = function(out, a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n    out[0]  =  (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n    out[1]  = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n    out[2]  =  (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n    out[3]  = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n    out[4]  = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n    out[5]  =  (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n    out[6]  = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n    out[7]  =  (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n    out[8]  =  (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n    out[9]  = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n    out[10] =  (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n    out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n    out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n    out[13] =  (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n    out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n    out[15] =  (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n    return out;\n};\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\nmat4.determinant = function (a) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n        b00 = a00 * a11 - a01 * a10,\n        b01 = a00 * a12 - a02 * a10,\n        b02 = a00 * a13 - a03 * a10,\n        b03 = a01 * a12 - a02 * a11,\n        b04 = a01 * a13 - a03 * a11,\n        b05 = a02 * a13 - a03 * a12,\n        b06 = a20 * a31 - a21 * a30,\n        b07 = a20 * a32 - a22 * a30,\n        b08 = a20 * a33 - a23 * a30,\n        b09 = a21 * a32 - a22 * a31,\n        b10 = a21 * a33 - a23 * a31,\n        b11 = a22 * a33 - a23 * a32;\n\n    // Calculate the determinant\n    return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n};\n\n/**\n * Multiplies two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\nmat4.multiply = function (out, a, b) {\n    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n    // Cache only the current line of the second matrix\n    var b0  = b[0], b1 = b[1], b2 = b[2], b3 = b[3];  \n    out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n    out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n    out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n    b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n    out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n    out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n    out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n    out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n    return out;\n};\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nmat4.mul = mat4.multiply;\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\nmat4.translate = function (out, a, v) {\n    var x = v[0], y = v[1], z = v[2],\n        a00, a01, a02, a03,\n        a10, a11, a12, a13,\n        a20, a21, a22, a23;\n\n    if (a === out) {\n        out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n        out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n        out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n        out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n    } else {\n        a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n        a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n        a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n        out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n        out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n        out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\n        out[12] = a00 * x + a10 * y + a20 * z + a[12];\n        out[13] = a01 * x + a11 * y + a21 * z + a[13];\n        out[14] = a02 * x + a12 * y + a22 * z + a[14];\n        out[15] = a03 * x + a13 * y + a23 * z + a[15];\n    }\n\n    return out;\n};\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nmat4.scale = function(out, a, v) {\n    var x = v[0], y = v[1], z = v[2];\n\n    out[0] = a[0] * x;\n    out[1] = a[1] * x;\n    out[2] = a[2] * x;\n    out[3] = a[3] * x;\n    out[4] = a[4] * y;\n    out[5] = a[5] * y;\n    out[6] = a[6] * y;\n    out[7] = a[7] * y;\n    out[8] = a[8] * z;\n    out[9] = a[9] * z;\n    out[10] = a[10] * z;\n    out[11] = a[11] * z;\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n    return out;\n};\n\n/**\n * Rotates a mat4 by the given angle\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nmat4.rotate = function (out, a, rad, axis) {\n    var x = axis[0], y = axis[1], z = axis[2],\n        len = Math.sqrt(x * x + y * y + z * z),\n        s, c, t,\n        a00, a01, a02, a03,\n        a10, a11, a12, a13,\n        a20, a21, a22, a23,\n        b00, b01, b02,\n        b10, b11, b12,\n        b20, b21, b22;\n\n    if (Math.abs(len) < GLMAT_EPSILON) { return null; }\n    \n    len = 1 / len;\n    x *= len;\n    y *= len;\n    z *= len;\n\n    s = Math.sin(rad);\n    c = Math.cos(rad);\n    t = 1 - c;\n\n    a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n    a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n    a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n    // Construct the elements of the rotation matrix\n    b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n    b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n    b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\n    // Perform rotation-specific matrix multiplication\n    out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n    out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n    out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n    out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n    out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n    out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n    out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n    out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n    out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n    out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n    out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n    out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged last row\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n    return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateX = function (out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a10 = a[4],\n        a11 = a[5],\n        a12 = a[6],\n        a13 = a[7],\n        a20 = a[8],\n        a21 = a[9],\n        a22 = a[10],\n        a23 = a[11];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged rows\n        out[0]  = a[0];\n        out[1]  = a[1];\n        out[2]  = a[2];\n        out[3]  = a[3];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[4] = a10 * c + a20 * s;\n    out[5] = a11 * c + a21 * s;\n    out[6] = a12 * c + a22 * s;\n    out[7] = a13 * c + a23 * s;\n    out[8] = a20 * c - a10 * s;\n    out[9] = a21 * c - a11 * s;\n    out[10] = a22 * c - a12 * s;\n    out[11] = a23 * c - a13 * s;\n    return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateY = function (out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a00 = a[0],\n        a01 = a[1],\n        a02 = a[2],\n        a03 = a[3],\n        a20 = a[8],\n        a21 = a[9],\n        a22 = a[10],\n        a23 = a[11];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged rows\n        out[4]  = a[4];\n        out[5]  = a[5];\n        out[6]  = a[6];\n        out[7]  = a[7];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[0] = a00 * c - a20 * s;\n    out[1] = a01 * c - a21 * s;\n    out[2] = a02 * c - a22 * s;\n    out[3] = a03 * c - a23 * s;\n    out[8] = a00 * s + a20 * c;\n    out[9] = a01 * s + a21 * c;\n    out[10] = a02 * s + a22 * c;\n    out[11] = a03 * s + a23 * c;\n    return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateZ = function (out, a, rad) {\n    var s = Math.sin(rad),\n        c = Math.cos(rad),\n        a00 = a[0],\n        a01 = a[1],\n        a02 = a[2],\n        a03 = a[3],\n        a10 = a[4],\n        a11 = a[5],\n        a12 = a[6],\n        a13 = a[7];\n\n    if (a !== out) { // If the source and destination differ, copy the unchanged last row\n        out[8]  = a[8];\n        out[9]  = a[9];\n        out[10] = a[10];\n        out[11] = a[11];\n        out[12] = a[12];\n        out[13] = a[13];\n        out[14] = a[14];\n        out[15] = a[15];\n    }\n\n    // Perform axis-specific matrix multiplication\n    out[0] = a00 * c + a10 * s;\n    out[1] = a01 * c + a11 * s;\n    out[2] = a02 * c + a12 * s;\n    out[3] = a03 * c + a13 * s;\n    out[4] = a10 * c - a00 * s;\n    out[5] = a11 * c - a01 * s;\n    out[6] = a12 * c - a02 * s;\n    out[7] = a13 * c - a03 * s;\n    return out;\n};\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n *     mat4.identity(dest);\n *     mat4.translate(dest, vec);\n *     var quatMat = mat4.create();\n *     quat4.toMat4(quat, quatMat);\n *     mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\nmat4.fromRotationTranslation = function (out, q, v) {\n    // Quaternion math\n    var x = q[0], y = q[1], z = q[2], w = q[3],\n        x2 = x + x,\n        y2 = y + y,\n        z2 = z + z,\n\n        xx = x * x2,\n        xy = x * y2,\n        xz = x * z2,\n        yy = y * y2,\n        yz = y * z2,\n        zz = z * z2,\n        wx = w * x2,\n        wy = w * y2,\n        wz = w * z2;\n\n    out[0] = 1 - (yy + zz);\n    out[1] = xy + wz;\n    out[2] = xz - wy;\n    out[3] = 0;\n    out[4] = xy - wz;\n    out[5] = 1 - (xx + zz);\n    out[6] = yz + wx;\n    out[7] = 0;\n    out[8] = xz + wy;\n    out[9] = yz - wx;\n    out[10] = 1 - (xx + yy);\n    out[11] = 0;\n    out[12] = v[0];\n    out[13] = v[1];\n    out[14] = v[2];\n    out[15] = 1;\n    \n    return out;\n};\n\nmat4.fromQuat = function (out, q) {\n    var x = q[0], y = q[1], z = q[2], w = q[3],\n        x2 = x + x,\n        y2 = y + y,\n        z2 = z + z,\n\n        xx = x * x2,\n        yx = y * x2,\n        yy = y * y2,\n        zx = z * x2,\n        zy = z * y2,\n        zz = z * z2,\n        wx = w * x2,\n        wy = w * y2,\n        wz = w * z2;\n\n    out[0] = 1 - yy - zz;\n    out[1] = yx + wz;\n    out[2] = zx - wy;\n    out[3] = 0;\n\n    out[4] = yx - wz;\n    out[5] = 1 - xx - zz;\n    out[6] = zy + wx;\n    out[7] = 0;\n\n    out[8] = zx + wy;\n    out[9] = zy - wx;\n    out[10] = 1 - xx - yy;\n    out[11] = 0;\n\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n\n    return out;\n};\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.frustum = function (out, left, right, bottom, top, near, far) {\n    var rl = 1 / (right - left),\n        tb = 1 / (top - bottom),\n        nf = 1 / (near - far);\n    out[0] = (near * 2) * rl;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = (near * 2) * tb;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = (right + left) * rl;\n    out[9] = (top + bottom) * tb;\n    out[10] = (far + near) * nf;\n    out[11] = -1;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = (far * near * 2) * nf;\n    out[15] = 0;\n    return out;\n};\n\n/**\n * Generates a perspective projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.perspective = function (out, fovy, aspect, near, far) {\n    var f = 1.0 / Math.tan(fovy / 2),\n        nf = 1 / (near - far);\n    out[0] = f / aspect;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = f;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = (far + near) * nf;\n    out[11] = -1;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = (2 * far * near) * nf;\n    out[15] = 0;\n    return out;\n};\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.ortho = function (out, left, right, bottom, top, near, far) {\n    var lr = 1 / (left - right),\n        bt = 1 / (bottom - top),\n        nf = 1 / (near - far);\n    out[0] = -2 * lr;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = -2 * bt;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 2 * nf;\n    out[11] = 0;\n    out[12] = (left + right) * lr;\n    out[13] = (top + bottom) * bt;\n    out[14] = (far + near) * nf;\n    out[15] = 1;\n    return out;\n};\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\nmat4.lookAt = function (out, eye, center, up) {\n    var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n        eyex = eye[0],\n        eyey = eye[1],\n        eyez = eye[2],\n        upx = up[0],\n        upy = up[1],\n        upz = up[2],\n        centerx = center[0],\n        centery = center[1],\n        centerz = center[2];\n\n    if (Math.abs(eyex - centerx) < GLMAT_EPSILON &&\n        Math.abs(eyey - centery) < GLMAT_EPSILON &&\n        Math.abs(eyez - centerz) < GLMAT_EPSILON) {\n        return mat4.identity(out);\n    }\n\n    z0 = eyex - centerx;\n    z1 = eyey - centery;\n    z2 = eyez - centerz;\n\n    len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n    z0 *= len;\n    z1 *= len;\n    z2 *= len;\n\n    x0 = upy * z2 - upz * z1;\n    x1 = upz * z0 - upx * z2;\n    x2 = upx * z1 - upy * z0;\n    len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n    if (!len) {\n        x0 = 0;\n        x1 = 0;\n        x2 = 0;\n    } else {\n        len = 1 / len;\n        x0 *= len;\n        x1 *= len;\n        x2 *= len;\n    }\n\n    y0 = z1 * x2 - z2 * x1;\n    y1 = z2 * x0 - z0 * x2;\n    y2 = z0 * x1 - z1 * x0;\n\n    len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n    if (!len) {\n        y0 = 0;\n        y1 = 0;\n        y2 = 0;\n    } else {\n        len = 1 / len;\n        y0 *= len;\n        y1 *= len;\n        y2 *= len;\n    }\n\n    out[0] = x0;\n    out[1] = y0;\n    out[2] = z0;\n    out[3] = 0;\n    out[4] = x1;\n    out[5] = y1;\n    out[6] = z1;\n    out[7] = 0;\n    out[8] = x2;\n    out[9] = y2;\n    out[10] = z2;\n    out[11] = 0;\n    out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n    out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n    out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n    out[15] = 1;\n\n    return out;\n};\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {mat4} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat4.str = function (a) {\n    return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +\n                    a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +\n                    a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + \n                    a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat4.frob = function (a) {\n    return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n    exports.mat4 = mat4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice, this\n    list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class Quaternion\n * @name quat\n */\n\nvar quat = {};\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nquat.create = function() {\n    var out = new GLMAT_ARRAY_TYPE(4);\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    return out;\n};\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\nquat.rotationTo = (function() {\n    var tmpvec3 = vec3.create();\n    var xUnitVec3 = vec3.fromValues(1,0,0);\n    var yUnitVec3 = vec3.fromValues(0,1,0);\n\n    return function(out, a, b) {\n        var dot = vec3.dot(a, b);\n        if (dot < -0.999999) {\n            vec3.cross(tmpvec3, xUnitVec3, a);\n            if (vec3.length(tmpvec3) < 0.000001)\n                vec3.cross(tmpvec3, yUnitVec3, a);\n            vec3.normalize(tmpvec3, tmpvec3);\n            quat.setAxisAngle(out, tmpvec3, Math.PI);\n            return out;\n        } else if (dot > 0.999999) {\n            out[0] = 0;\n            out[1] = 0;\n            out[2] = 0;\n            out[3] = 1;\n            return out;\n        } else {\n            vec3.cross(tmpvec3, a, b);\n            out[0] = tmpvec3[0];\n            out[1] = tmpvec3[1];\n            out[2] = tmpvec3[2];\n            out[3] = 1 + dot;\n            return quat.normalize(out, out);\n        }\n    };\n})();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view  the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up    the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nquat.setAxes = (function() {\n    var matr = mat3.create();\n\n    return function(out, view, right, up) {\n        matr[0] = right[0];\n        matr[3] = right[1];\n        matr[6] = right[2];\n\n        matr[1] = up[0];\n        matr[4] = up[1];\n        matr[7] = up[2];\n\n        matr[2] = -view[0];\n        matr[5] = -view[1];\n        matr[8] = -view[2];\n\n        return quat.normalize(out, quat.fromMat3(out, matr));\n    };\n})();\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nquat.clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nquat.fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nquat.copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nquat.set = vec4.set;\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nquat.identity = function(out) {\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 1;\n    return out;\n};\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nquat.setAxisAngle = function(out, axis, rad) {\n    rad = rad * 0.5;\n    var s = Math.sin(rad);\n    out[0] = s * axis[0];\n    out[1] = s * axis[1];\n    out[2] = s * axis[2];\n    out[3] = Math.cos(rad);\n    return out;\n};\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\nquat.add = vec4.add;\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\nquat.multiply = function(out, a, b) {\n    var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n        bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n    out[0] = ax * bw + aw * bx + ay * bz - az * by;\n    out[1] = ay * bw + aw * by + az * bx - ax * bz;\n    out[2] = az * bw + aw * bz + ax * by - ay * bx;\n    out[3] = aw * bw - ax * bx - ay * by - az * bz;\n    return out;\n};\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nquat.mul = quat.multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nquat.scale = vec4.scale;\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateX = function (out, a, rad) {\n    rad *= 0.5; \n\n    var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n        bx = Math.sin(rad), bw = Math.cos(rad);\n\n    out[0] = ax * bw + aw * bx;\n    out[1] = ay * bw + az * bx;\n    out[2] = az * bw - ay * bx;\n    out[3] = aw * bw - ax * bx;\n    return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateY = function (out, a, rad) {\n    rad *= 0.5; \n\n    var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n        by = Math.sin(rad), bw = Math.cos(rad);\n\n    out[0] = ax * bw - az * by;\n    out[1] = ay * bw + aw * by;\n    out[2] = az * bw + ax * by;\n    out[3] = aw * bw - ay * by;\n    return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateZ = function (out, a, rad) {\n    rad *= 0.5; \n\n    var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n        bz = Math.sin(rad), bw = Math.cos(rad);\n\n    out[0] = ax * bw + ay * bz;\n    out[1] = ay * bw - ax * bz;\n    out[2] = az * bw + aw * bz;\n    out[3] = aw * bw - az * bz;\n    return out;\n};\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\nquat.calculateW = function (out, a) {\n    var x = a[0], y = a[1], z = a[2];\n\n    out[0] = x;\n    out[1] = y;\n    out[2] = z;\n    out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n    return out;\n};\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nquat.dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n * @function\n */\nquat.lerp = vec4.lerp;\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n */\nquat.slerp = function (out, a, b, t) {\n    // benchmarks:\n    //    http://jsperf.com/quaternion-slerp-implementations\n\n    var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n        bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n    var        omega, cosom, sinom, scale0, scale1;\n\n    // calc cosine\n    cosom = ax * bx + ay * by + az * bz + aw * bw;\n    // adjust signs (if necessary)\n    if ( cosom < 0.0 ) {\n        cosom = -cosom;\n        bx = - bx;\n        by = - by;\n        bz = - bz;\n        bw = - bw;\n    }\n    // calculate coefficients\n    if ( (1.0 - cosom) > 0.000001 ) {\n        // standard case (slerp)\n        omega  = Math.acos(cosom);\n        sinom  = Math.sin(omega);\n        scale0 = Math.sin((1.0 - t) * omega) / sinom;\n        scale1 = Math.sin(t * omega) / sinom;\n    } else {        \n        // \"from\" and \"to\" quaternions are very close \n        //  ... so we can do a linear interpolation\n        scale0 = 1.0 - t;\n        scale1 = t;\n    }\n    // calculate final values\n    out[0] = scale0 * ax + scale1 * bx;\n    out[1] = scale0 * ay + scale1 * by;\n    out[2] = scale0 * az + scale1 * bz;\n    out[3] = scale0 * aw + scale1 * bw;\n    \n    return out;\n};\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\nquat.invert = function(out, a) {\n    var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n        dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,\n        invDot = dot ? 1.0/dot : 0;\n    \n    // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n    out[0] = -a0*invDot;\n    out[1] = -a1*invDot;\n    out[2] = -a2*invDot;\n    out[3] = a3*invDot;\n    return out;\n};\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nquat.conjugate = function (out, a) {\n    out[0] = -a[0];\n    out[1] = -a[1];\n    out[2] = -a[2];\n    out[3] = a[3];\n    return out;\n};\n\n/**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n * @function\n */\nquat.length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nquat.len = quat.length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nquat.squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nquat.sqrLen = quat.squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nquat.normalize = vec4.normalize;\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nquat.fromMat3 = function(out, m) {\n    // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n    // article \"Quaternion Calculus and Fast Animation\".\n    var fTrace = m[0] + m[4] + m[8];\n    var fRoot;\n\n    if ( fTrace > 0.0 ) {\n        // |w| > 1/2, may as well choose w > 1/2\n        fRoot = Math.sqrt(fTrace + 1.0);  // 2w\n        out[3] = 0.5 * fRoot;\n        fRoot = 0.5/fRoot;  // 1/(4w)\n        out[0] = (m[5]-m[7])*fRoot;\n        out[1] = (m[6]-m[2])*fRoot;\n        out[2] = (m[1]-m[3])*fRoot;\n    } else {\n        // |w| <= 1/2\n        var i = 0;\n        if ( m[4] > m[0] )\n          i = 1;\n        if ( m[8] > m[i*3+i] )\n          i = 2;\n        var j = (i+1)%3;\n        var k = (i+2)%3;\n        \n        fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);\n        out[i] = 0.5 * fRoot;\n        fRoot = 0.5 / fRoot;\n        out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;\n        out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;\n        out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;\n    }\n    \n    return out;\n};\n\n/**\n * Returns a string representation of a quatenion\n *\n * @param {quat} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nquat.str = function (a) {\n    return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n    exports.quat = quat;\n}\n;\n\n\n\n\n\n\n\n\n\n\n\n\n\n  })(shim.exports);\n})(this);\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/gl-matrix.js?");

/***/ }),

/***/ "./node_modules/speck/src/interactions.js":
/*!************************************************!*\
  !*** ./node_modules/speck/src/interactions.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar speckView = __webpack_require__(/*! ./view.js */ \"./node_modules/speck/src/view.js\");\n\nmodule.exports = function(args) {\n    if(arguments.length > 1) {\n        throw \"Error: The Speck Interactions module has changed!\";\n    }\n    else if((arguments.length === 0) || (typeof args !== \"object\")) {\n        throw \"Error: Arguments not provided to interactions\";\n    }\n\n    var scrollZoom = args.scrollZoom === undefined ? true : args.scrollZoom;\n    var container = args.container;\n\n    var getRotation = args.getRotation;\n    var setRotation = args.setRotation;\n\n    var getTranslation = args.getTranslation;\n    var setTranslation = args.setTranslation;\n\n    var getZoom = args.getZoom;\n    var setZoom = args.setZoom;\n\n    var refreshView = args.refreshView;\n\n    var interactions = {\n        buttonDown: false,\n        shiftDown: false,\n        lastX: 0.0,\n        lastY: 0.0\n    };\n\n    function mousedownFn(e) {\n        if(e.button === 0) {\n            interactions = {\n                buttonDown: true,\n                shiftDown: interactions.shiftDown,\n                lastX: e.clientX,\n                lastY: e.clientY\n            };\n        }\n    }\n    container.addEventListener(\"mousedown\", mousedownFn);\n\n    function mouseupFn(e) {\n        if(e.button === 0) {\n            if(!interactions.buttonDown) {\n                return;\n            }\n\n            interactions.buttonDown = false;\n        }\n    }\n    window.addEventListener(\"mouseup\", mouseupFn);\n\n    function keychangeFn(e) {\n        interactions.shiftDown = e.shiftKey;\n    }\n    window.addEventListener(\"keydown\", keychangeFn);\n    window.addEventListener(\"keyup\", keychangeFn);\n\n    function mousemoveFn(e) {\n        if(!interactions.buttonDown || (e.buttons === 0)){\n            return;\n        }\n\n        // prevents interaction with other page elements while dragging\n        e.preventDefault();\n\n        var dx = e.clientX - interactions.lastX;\n        var dy = e.clientY - interactions.lastY;\n        if(dx === 0 && dy === 0) {\n            return;\n        }\n\n        interactions.lastX = e.clientX;\n        interactions.lastY = e.clientY;\n\n        if(interactions.shiftDown) {\n            var translation = getTranslation();\n            var inverseZoom = 0.001/getZoom();\n            setTranslation({\n                x: translation.x - dx * inverseZoom,\n                y: translation.y + dy * inverseZoom\n            });\n        }\n        else {\n            var viewDummyObj = {\n                rotation: new Float32Array(getRotation())\n            };\n            speckView.rotate(viewDummyObj, dx, dy);\n\n            setRotation(viewDummyObj.rotation);\n        }\n        refreshView();\n    }\n    window.addEventListener(\"mousemove\", mousemoveFn);\n\n    function wheelFn(e) {\n        // prevents the page from scrolling when using scroll wheel inside speck component\n        e.preventDefault();\n\n        setZoom(getZoom() * (e.deltaY < 0 ? 1/0.9 : 0.9));\n        refreshView();\n\n    }\n    if(scrollZoom) {\n        container.addEventListener(\"wheel\", wheelFn);\n    }\n\n    function removeAllEventListeners() {\n        container.removeEventListener(\"mousedown\", mousedownFn);\n        window.removeEventListener(\"mouseup\", mouseupFn);\n        window.removeEventListener(\"keydown\", keychangeFn);\n        window.removeEventListener(\"keyup\", keychangeFn);\n        window.removeEventListener(\"mousemove\", mousemoveFn);\n        container.removeEventListener(\"wheel\", wheelFn);\n    }\n\n    return removeAllEventListeners;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/interactions.js?");

/***/ }),

/***/ "./node_modules/speck/src/presets.js":
/*!*******************************************!*\
  !*** ./node_modules/speck/src/presets.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = {\n    default: {\n        atomScale: 0.6,\n        relativeAtomScale: 1.0,\n        bondScale: 0.5,\n        ao: 0.75,\n        aoRes: 256,\n        brightness: 0.5,\n        outline: 0.0,\n        spf: 32,\n        bonds: false,\n        bondThreshold: 1.2,\n        bondShade: 0.5,\n        atomShade: 0.5,\n        dofStrength: 0.0,\n        dofPosition: 0.5,\n        fxaa: 1\n    },\n    stickball:  {\n        atomScale: 0.24,\n        relativeAtomScale: 0.64,\n        bondScale: 0.5,\n        bonds: true,\n        bondThreshold: 1.2,\n    },\n    toon:  {\n        ao: 0,\n        spf: 0,\n        brightness: 0.5,\n        outline: 1,\n    },\n    licorice:  {\n        atomScale: 0.1,\n        relativeAtomScale: 0,\n        bondScale: 1,\n        bonds: true,\n        bondThreshold: 1.2,\n    },\n};\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/presets.js?");

/***/ }),

/***/ "./node_modules/speck/src/renderer.js":
/*!********************************************!*\
  !*** ./node_modules/speck/src/renderer.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar glm = __webpack_require__(/*! ./gl-matrix */ \"./node_modules/speck/src/gl-matrix.js\");\nvar webgl = __webpack_require__(/*! ./webgl.js */ \"./node_modules/speck/src/webgl.js\");\nvar cube = __webpack_require__(/*! ./cube */ \"./node_modules/speck/src/cube.js\");\nvar elements = __webpack_require__(/*! ./elements */ \"./node_modules/speck/src/elements.js\");\nvar View = __webpack_require__(/*! ./view */ \"./node_modules/speck/src/view.js\");\nvar System = __webpack_require__(/*! ./system */ \"./node_modules/speck/src/system.js\");\nvar shaders = __webpack_require__(/*! ./shaders */ \"./node_modules/speck/src/shaders.js\");\n\nmodule.exports = function (canvas, resolution, aoResolution) {\n\n        var self = this;\n\n        var range,\n            samples,\n            system;\n\n        var gl, \n            canvas;\n\n        var rAtoms = null,\n            rBonds = null,\n            rDispQuad = null,\n            rAccumulator = null,\n            rAO = null,\n            rDOF = null,\n            rFXAA = null;\n\n        var tSceneColor, tSceneNormal, tSceneDepth,\n            tRandRotDepth, tRandRotColor,\n            tAccumulator, tAccumulatorOut,\n            tFXAA, tFXAAOut,\n            tDOF,\n            tAO;\n\n        var fbSceneColor, fbSceneNormal,\n            fbRandRot,\n            fbAccumulator,\n            fbFXAA,\n            fbDOF,\n            fbAO;\n\n        var progAtoms,\n            progBonds,\n            progAccumulator,\n            progAO,\n            progFXAA,\n            progDOF,\n            progDisplayQuad;\n\n        var ext;\n\n        var sampleCount = 0,\n            colorRendered = false,\n            normalRendered = false;\n\n        self.getAOProgress = function() {\n            return sampleCount/1024;\n        }\n\n        self.initialize = function() {\n\n            // Initialize canvas/gl.\n            canvas.width = canvas.height = resolution;\n            gl = canvas.getContext('webgl');\n            gl.enable(gl.DEPTH_TEST);\n            gl.enable(gl.CULL_FACE);\n            gl.clearColor(0,0,0,0);\n            gl.clearDepth(1);\n            gl.viewport(0,0,resolution,resolution);\n\n            window.gl = gl; //debug\n\n            ext = webgl.getExtensions(gl, [\n                \"EXT_frag_depth\", \n                \"WEBGL_depth_texture\", \n            ]);\n\n            self.createTextures();\n\n            // Initialize shaders.\n            progAtoms = loadProgram(gl, shaders.shaders['atom']);\n            progBonds = loadProgram(gl, shaders.shaders['bond']);\n            progDisplayQuad = loadProgram(gl, shaders.shaders['textured-quad']);\n            progAccumulator = loadProgram(gl, shaders.shaders['accumulator']);\n            progAO = loadProgram(gl, shaders.shaders['ao']);\n            progFXAA = loadProgram(gl, shaders.shaders['fxaa']);\n            progDOF = loadProgram(gl, shaders.shaders['dof']);\n\n            var position = [\n                -1, -1, 0,\n                 1, -1, 0,\n                 1,  1, 0,\n                -1, -1, 0,\n                 1,  1, 0,\n                -1,  1, 0\n            ];\n\n            // Initialize geometry.\n            var attribs = webgl.buildAttribs(gl, {aPosition: 3});\n            attribs.aPosition.buffer.set(new Float32Array(position));\n            var count = position.length / 9;\n\n            rDispQuad = new webgl.Renderable(gl, progDisplayQuad, attribs, count);\n            rAccumulator = new webgl.Renderable(gl, progAccumulator, attribs, count);\n            rAO = new webgl.Renderable(gl, progAO, attribs, count);\n            rFXAA = new webgl.Renderable(gl, progFXAA, attribs, count);\n            rDOF = new webgl.Renderable(gl, progDOF, attribs, count);\n\n            samples = 0;\n\n        }\n\n        self.createTextures = function() {\n            // fbRandRot\n            tRandRotColor = new webgl.Texture(gl, 0, null, aoResolution, aoResolution);\n\n            tRandRotDepth = new webgl.Texture(gl, 1, null, aoResolution, aoResolution, {\n                internalFormat: gl.DEPTH_COMPONENT,\n                format: gl.DEPTH_COMPONENT,\n                type: gl.UNSIGNED_SHORT\n            });\n\n            fbRandRot = new webgl.Framebuffer(gl, [tRandRotColor], tRandRotDepth);\n\n            // fbScene\n            tSceneColor = new webgl.Texture(gl, 2, null, resolution, resolution);\n\n            tSceneNormal = new webgl.Texture(gl, 3, null, resolution, resolution);\n\n            tSceneDepth = new webgl.Texture(gl, 4, null, resolution, resolution, {\n                internalFormat: gl.DEPTH_COMPONENT,\n                format: gl.DEPTH_COMPONENT,\n                type: gl.UNSIGNED_SHORT\n            });\n\n            fbSceneColor = new webgl.Framebuffer(gl, [tSceneColor], tSceneDepth);\n\n            fbSceneNormal = new webgl.Framebuffer(gl, [tSceneNormal], tSceneDepth);\n\n            // fbAccumulator\n            tAccumulator = new webgl.Texture(gl, 5, null, resolution, resolution);\n            tAccumulatorOut = new webgl.Texture(gl, 6, null, resolution, resolution);\n            fbAccumulator = new webgl.Framebuffer(gl, [tAccumulatorOut]);\n\n            // fbAO\n            tAO = new webgl.Texture(gl, 7, null, resolution, resolution);\n            fbAO = new webgl.Framebuffer(gl, [tAO]);\n\n            // fbFXAA\n            tFXAA = new webgl.Texture(gl, 8, null, resolution, resolution);\n            tFXAAOut = new webgl.Texture(gl, 9, null, resolution, resolution);\n            fbFXAA = new webgl.Framebuffer(gl, [tFXAAOut]);\n\n            // fbDOF\n            tDOF = new webgl.Texture(gl, 10, null, resolution, resolution);\n            fbDOF = new webgl.Framebuffer(gl, [tDOF]);\n        }\n\n        self.setResolution = function(res, aoRes) {\n            aoResolution = aoRes;\n            resolution = res;\n            canvas.width = canvas.height = resolution;\n            gl.viewport(0,0,resolution,resolution);\n            self.createTextures();\n        }\n\n\n        self.setSystem = function(newSystem, view) {\n\n            system = newSystem;\n\n            function make36(arr) {\n                var out = [];\n                for (var i = 0; i < 36; i++) {\n                    out.push.apply(out, arr);\n                }\n                return out;\n            }\n\n            // Atoms\n            var attribs = webgl.buildAttribs(gl, {\n                aImposter: 3, aPosition: 3, aRadius: 1, aColor: 3\n            });\n\n            var imposter = [];\n            var position = [];\n            var radius = [];\n            var color = [];\n\n            for (var i = 0; i < system.atoms.length; i++) {\n                imposter.push.apply(imposter, cube.position);\n                var a = system.atoms[i];\n                position.push.apply(position, make36([a.x, a.y, a.z]));\n                radius.push.apply(radius, make36([elements[a.symbol].radius]));\n                var c = elements[a.symbol].color;\n                color.push.apply(color, make36([c[0], c[1], c[2]]));\n            }\n\n            attribs.aImposter.buffer.set(new Float32Array(imposter));\n            attribs.aPosition.buffer.set(new Float32Array(position));\n            attribs.aRadius.buffer.set(new Float32Array(radius));\n            attribs.aColor.buffer.set(new Float32Array(color));\n\n            var count = imposter.length / 9;\n\n            rAtoms = new webgl.Renderable(gl, progAtoms, attribs, count);\n\n            // Bonds\n\n            if (view.bonds) {\n\n                rBonds = null;\n\n                if (system.bonds.length > 0) {\n\n                    var attribs = webgl.buildAttribs(gl, {\n                        aImposter: 3,\n                        aPosA: 3,\n                        aPosB: 3,\n                        aRadA: 1,\n                        aRadB: 1,\n                        aColA: 3,\n                        aColB: 3\n                    })\n\n                    var imposter = [];\n                    var posa = [];\n                    var posb = [];\n                    var rada = [];\n                    var radb = [];\n                    var cola = [];\n                    var colb = [];\n\n                    for (var i = 0; i < system.bonds.length; i++) {\n                        var b = system.bonds[i];\n                        if (b.cutoff > view.bondThreshold) break;\n                        imposter.push.apply(imposter, cube.position);\n                        posa.push.apply(posa, make36([b.posA.x, b.posA.y, b.posA.z]));\n                        posb.push.apply(posb, make36([b.posB.x, b.posB.y, b.posB.z]));\n                        rada.push.apply(rada, make36([b.radA]));\n                        radb.push.apply(radb, make36([b.radB]));\n                        cola.push.apply(cola, make36([b.colA.r, b.colA.g, b.colA.b]));\n                        colb.push.apply(colb, make36([b.colB.r, b.colB.g, b.colB.b]));\n                    }\n\n                    attribs.aImposter.buffer.set(new Float32Array(imposter));\n                    attribs.aPosA.buffer.set(new Float32Array(posa));\n                    attribs.aPosB.buffer.set(new Float32Array(posb));\n                    attribs.aRadA.buffer.set(new Float32Array(rada));\n                    attribs.aRadB.buffer.set(new Float32Array(radb));\n                    attribs.aColA.buffer.set(new Float32Array(cola));\n                    attribs.aColB.buffer.set(new Float32Array(colb));\n\n                    var count = imposter.length / 9;\n\n                    rBonds = new webgl.Renderable(gl, progBonds, attribs, count);\n\n                }\n\n            }\n\n        }\n\n        self.reset = function() {\n            sampleCount = 0;\n            colorRendered = false;\n            normalRendered = false;\n            tAccumulator.reset();\n            tAccumulatorOut.reset();\n        }\n\n        self.render = function(view) {\n            if (system === undefined) {\n                return;\n            }\n            if (rAtoms == null) {\n                return;\n            }\n\n            range = System.getRadius(system) * 2.0;\n\n            if (!colorRendered) {\n                color(view);\n            } else if (!normalRendered){\n                normal(view);\n            } else {\n                for (var i = 0; i < view.spf; i++) {\n                    if (sampleCount > 1024) {\n                        break;\n                    }\n                    sample(view);\n                    sampleCount++;\n                }\n            }\n            display(view);\n        }\n\n        function color(view) {\n            colorRendered = true;\n            gl.viewport(0, 0, resolution, resolution);\n            fbSceneColor.bind();\n            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            var rect = View.getRect(view);\n            var projection = glm.mat4.create();\n            glm.mat4.ortho(projection, rect.left, rect.right, rect.bottom, rect.top, 0, range);\n            var viewMat = glm.mat4.create();\n            glm.mat4.lookAt(viewMat, [0, 0, 0], [0, 0, -1], [0, 1, 0]);\n            var model = glm.mat4.create();\n            glm.mat4.translate(model, model, [0, 0, -range/2]);\n            glm.mat4.multiply(model, model, view.rotation);\n            progAtoms.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n            progAtoms.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n            progAtoms.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n            progAtoms.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n            progAtoms.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n            progAtoms.setUniform(\"uAtomScale\", \"1f\", 2.5 * view.atomScale);\n            progAtoms.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n            progAtoms.setUniform(\"uRes\", \"1f\", resolution);\n            progAtoms.setUniform(\"uDepth\", \"1f\", range);\n            progAtoms.setUniform(\"uMode\", \"1i\", 0);\n            progAtoms.setUniform(\"uAtomShade\", \"1f\", view.atomShade);\n            rAtoms.render();\n\n            if (view.bonds && rBonds != null) {\n                fbSceneColor.bind();\n                progBonds.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n                progBonds.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n                progBonds.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n                progBonds.setUniform(\"uRotation\", \"Matrix4fv\", false, view.rotation);\n                progBonds.setUniform(\"uDepth\", \"1f\", range);\n                progBonds.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n                progBonds.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n                progBonds.setUniform(\"uRes\", \"1f\", resolution);\n                progBonds.setUniform(\"uBondRadius\", \"1f\", 2.5 * View.getBondRadius(view));\n                progBonds.setUniform(\"uBondShade\", \"1f\", view.bondShade);\n                progBonds.setUniform(\"uAtomScale\", \"1f\", 2.5 * view.atomScale);\n                progBonds.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n                progBonds.setUniform(\"uMode\", \"1i\", 0);\n                rBonds.render();\n            }\n        }\n\n\n        function normal(view) {\n            normalRendered = true;\n            gl.viewport(0, 0, resolution, resolution);\n            fbSceneNormal.bind();\n            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            var rect = View.getRect(view);\n            var projection = glm.mat4.create();\n            glm.mat4.ortho(projection, rect.left, rect.right, rect.bottom, rect.top, 0, range);\n            var viewMat = glm.mat4.create();\n            glm.mat4.lookAt(viewMat, [0, 0, 0], [0, 0, -1], [0, 1, 0]);\n            var model = glm.mat4.create();\n            glm.mat4.translate(model, model, [0, 0, -range/2]);\n            glm.mat4.multiply(model, model, view.rotation);\n            progAtoms.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n            progAtoms.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n            progAtoms.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n            progAtoms.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n            progAtoms.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n            progAtoms.setUniform(\"uAtomScale\", \"1f\", 2.5 * view.atomScale);\n            progAtoms.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n            progAtoms.setUniform(\"uRes\", \"1f\", resolution);\n            progAtoms.setUniform(\"uDepth\", \"1f\", range);\n            progAtoms.setUniform(\"uMode\", \"1i\", 1);\n            progAtoms.setUniform(\"uAtomShade\", \"1f\", view.atomShade);\n            rAtoms.render();\n\n            if (view.bonds && rBonds != null) {\n                fbSceneNormal.bind();\n                progBonds.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n                progBonds.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n                progBonds.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n                progBonds.setUniform(\"uRotation\", \"Matrix4fv\", false, view.rotation);\n                progBonds.setUniform(\"uDepth\", \"1f\", range);\n                progBonds.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n                progBonds.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n                progBonds.setUniform(\"uRes\", \"1f\", resolution);\n                progBonds.setUniform(\"uBondRadius\", \"1f\", 2.5 * View.getBondRadius(view));\n                progBonds.setUniform(\"uBondShade\", \"1f\", view.bondShade);\n                progBonds.setUniform(\"uAtomScale\", \"1f\", 2.5 * view.atomScale);\n                progBonds.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n                progBonds.setUniform(\"uMode\", \"1i\", 1);\n                rBonds.render();\n            }\n        }\n\n\n        function sample(view) {\n            gl.viewport(0, 0, aoResolution, aoResolution);\n            var v = View.clone(view);\n            v.zoom = 1/range;\n            v.translation.x = 0;\n            v.translation.y = 0;\n            var rot = glm.mat4.create();\n            for (var i = 0; i < 3; i++) {\n                var axis = glm.vec3.random(glm.vec3.create(), 1.0);\n                glm.mat4.rotate(rot, rot, Math.random() * 10, axis);\n            }\n            v.rotation = glm.mat4.multiply(glm.mat4.create(), rot, v.rotation);\n            fbRandRot.bind()\n            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            var rect = View.getRect(v);\n            var projection = glm.mat4.create();\n            glm.mat4.ortho(projection, rect.left, rect.right, rect.bottom, rect.top, 0, range);\n            var viewMat = glm.mat4.create();\n            glm.mat4.lookAt(viewMat, [0, 0, 0], [0, 0, -1], [0, 1, 0]);\n            var model = glm.mat4.create();\n            glm.mat4.translate(model, model, [0, 0, -range/2]);\n            glm.mat4.multiply(model, model, v.rotation);\n            progAtoms.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n            progAtoms.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n            progAtoms.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n            progAtoms.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n            progAtoms.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n            progAtoms.setUniform(\"uAtomScale\", \"1f\", 2.5 * v.atomScale);\n            progAtoms.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n            progAtoms.setUniform(\"uRes\", \"1f\", aoResolution);\n            progAtoms.setUniform(\"uDepth\", \"1f\", range);\n            progAtoms.setUniform(\"uMode\", \"1i\", 0);\n            progAtoms.setUniform(\"uAtomShade\", \"1f\", view.atomShade);\n            rAtoms.render();\n\n            if (view.bonds && rBonds != null) {\n                progBonds.setUniform(\"uProjection\", \"Matrix4fv\", false, projection);\n                progBonds.setUniform(\"uView\", \"Matrix4fv\", false, viewMat);\n                progBonds.setUniform(\"uModel\", \"Matrix4fv\", false, model);\n                progBonds.setUniform(\"uRotation\", \"Matrix4fv\", false, v.rotation);\n                progBonds.setUniform(\"uDepth\", \"1f\", range);\n                progBonds.setUniform(\"uBottomLeft\", \"2fv\", [rect.left, rect.bottom]);\n                progBonds.setUniform(\"uTopRight\", \"2fv\", [rect.right, rect.top]);\n                progBonds.setUniform(\"uRes\", \"1f\", aoResolution);\n                progBonds.setUniform(\"uBondRadius\", \"1f\", 2.5 * View.getBondRadius(view));\n                progBonds.setUniform(\"uBondShade\", \"1f\", view.bondShade);\n                progBonds.setUniform(\"uAtomScale\", \"1f\", 2.5 * view.atomScale);\n                progBonds.setUniform(\"uRelativeAtomScale\", \"1f\", view.relativeAtomScale);\n                progBonds.setUniform(\"uMode\", \"1i\", 0);\n                rBonds.render();\n            }\n\n            gl.viewport(0, 0, resolution, resolution);\n            var sceneRect = View.getRect(view);\n            var rotRect = View.getRect(v);\n            var invRot = glm.mat4.invert(glm.mat4.create(), rot);\n            fbAccumulator.bind();\n            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            progAccumulator.setUniform(\"uSceneDepth\", \"1i\", tSceneDepth.index);\n            progAccumulator.setUniform(\"uSceneNormal\", \"1i\", tSceneNormal.index);\n            progAccumulator.setUniform(\"uRandRotDepth\", \"1i\", tRandRotDepth.index);\n            progAccumulator.setUniform(\"uAccumulator\", \"1i\", tAccumulator.index);\n            progAccumulator.setUniform(\"uSceneBottomLeft\", \"2fv\", [sceneRect.left, sceneRect.bottom]);\n            progAccumulator.setUniform(\"uSceneTopRight\", \"2fv\", [sceneRect.right, sceneRect.top]);\n            progAccumulator.setUniform(\"uRotBottomLeft\", \"2fv\", [rotRect.left, rotRect.bottom]);\n            progAccumulator.setUniform(\"uRotTopRight\", \"2fv\", [rotRect.right, rotRect.top]);\n            progAccumulator.setUniform(\"uRes\", \"1f\", resolution);\n            progAccumulator.setUniform(\"uDepth\", \"1f\", range);\n            progAccumulator.setUniform(\"uRot\", \"Matrix4fv\", false, rot);\n            progAccumulator.setUniform(\"uInvRot\", \"Matrix4fv\", false, invRot);\n            progAccumulator.setUniform(\"uSampleCount\", \"1i\", sampleCount);\n            rAccumulator.render();\n            tAccumulator.activate();\n            tAccumulator.bind();\n            gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, resolution, resolution, 0);\n        }\n\n        function display(view) {\n            gl.viewport(0, 0, resolution, resolution);\n            if (view.fxaa > 0 || view.dofStrength > 0) {\n                fbAO.bind();\n            } else {\n                gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n            }\n            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            progAO.setUniform(\"uSceneColor\", \"1i\", tSceneColor.index);\n            progAO.setUniform(\"uSceneDepth\", \"1i\", tSceneDepth.index);\n            progAO.setUniform(\"uAccumulatorOut\", \"1i\", tAccumulatorOut.index);\n            progAO.setUniform(\"uRes\", \"1f\", resolution);\n            progAO.setUniform(\"uAO\", \"1f\", 2.0 * view.ao);\n            progAO.setUniform(\"uBrightness\", \"1f\", 2.0 * view.brightness);\n            progAO.setUniform(\"uOutlineStrength\", \"1f\", view.outline);\n            rAO.render();\n\n            if (view.fxaa > 0) {\n                if (view.dofStrength > 0) {\n                    fbFXAA.bind();\n                } else {\n                    gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n                }\n                for (var i = 0; i < view.fxaa; i++) {\n                    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n                    if (i == 0) {\n                        progFXAA.setUniform(\"uTexture\", \"1i\", tAO.index);\n                    } else {\n                        progFXAA.setUniform(\"uTexture\", \"1i\", tFXAA.index);\n                    }\n                    progFXAA.setUniform(\"uRes\", \"1f\", resolution);\n                    rFXAA.render();\n                    tFXAA.activate();\n                    tFXAA.bind();\n                    gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, resolution, resolution, 0);\n                }\n            }\n\n            if (view.dofStrength > 0) {\n                gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n                gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n                if (view.fxaa > 0) {\n                    progDOF.setUniform(\"uColor\", \"1i\", tFXAA.index);\n                } else {\n                    progDOF.setUniform(\"uColor\", \"1i\", tAO.index);\n                }\n                progDOF.setUniform(\"uDepth\", \"1i\", tSceneDepth.index);\n                progDOF.setUniform(\"uDOFPosition\", \"1f\", view.dofPosition);\n                progDOF.setUniform(\"uDOFStrength\", \"1f\", view.dofStrength);\n                progDOF.setUniform(\"uRes\", \"1f\", resolution);\n                rDOF.render();\n            }\n\n\n            // gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n            // gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n            // progDisplayQuad.setUniform(\"uTexture\", \"1i\", tSceneColor.index);\n            // progDisplayQuad.setUniform(\"uRes\", \"1f\", resolution);\n            // rDispQuad.render();\n        }\n\n        self.initialize();\n}\n\n\nfunction loadProgram(gl, src) {\n    src = src.split('// __split__');\n    return new webgl.Program(gl, src[0], src[1]);\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/renderer.js?");

/***/ }),

/***/ "./node_modules/speck/src/shaders.js":
/*!*******************************************!*\
  !*** ./node_modules/speck/src/shaders.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar shaders = {}; \nshaders [\"accumulator\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uSceneDepth;\nuniform sampler2D uSceneNormal;\nuniform sampler2D uRandRotDepth;\nuniform sampler2D uAccumulator;\nuniform mat4 uRot;\nuniform mat4 uInvRot;\nuniform vec2 uSceneBottomLeft;\nuniform vec2 uSceneTopRight;\nuniform vec2 uRotBottomLeft;\nuniform vec2 uRotTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform int uSampleCount;\n\nvoid main() {\n\n    float dScene = texture2D(uSceneDepth, gl_FragCoord.xy/uRes).r;\n\n    vec3 r = vec3(uSceneBottomLeft + (gl_FragCoord.xy/uRes) * (uSceneTopRight - uSceneBottomLeft), 0.0);\n\n    r.z = -(dScene - 0.5) * uDepth;\n    r = vec3(uRot * vec4(r, 1));\n    float depth = -r.z/uDepth + 0.5;\n\n    vec2 p = (r.xy - uRotBottomLeft)/(uRotTopRight - uRotBottomLeft);\n\n    float dRandRot = texture2D(uRandRotDepth, p).r;\n\n    float ao = step(dRandRot, depth * 0.99);\n\n    vec3 normal = texture2D(uSceneNormal, gl_FragCoord.xy/uRes).rgb * 2.0 - 1.0;\n    vec3 dir = vec3(uInvRot * vec4(0, 0, 1, 0));\n    float mag = dot(dir, normal);\n    float sampled = step(0.0, mag);\n\n    ao *= sampled;\n\n    vec4 acc = texture2D(uAccumulator, gl_FragCoord.xy/uRes);\n\n    if (uSampleCount < 256) {\n        acc.r += ao/255.0;\n    } else if (uSampleCount < 512) {\n        acc.g += ao/255.0;\n    } else if (uSampleCount < 768) {\n        acc.b += ao/255.0;\n    } else {\n        acc.a += ao/255.0;\n    }\n        \n    gl_FragColor = acc;\n\n}\n`; \nshaders [\"ao\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uSceneColor;\nuniform sampler2D uSceneDepth;\nuniform sampler2D uAccumulatorOut;\nuniform float uRes;\nuniform float uAO;\nuniform float uBrightness;\nuniform float uOutlineStrength;\n\nvoid main() {\n    vec2 p = gl_FragCoord.xy/uRes;\n    vec4 sceneColor = texture2D(uSceneColor, p);\n    if (uOutlineStrength > 0.0) {\n        float depth = texture2D(uSceneDepth, p).r;\n        float r = 1.0/511.0;\n        float d0 = abs(texture2D(uSceneDepth, p + vec2(-r,  0)).r - depth);\n        float d1 = abs(texture2D(uSceneDepth, p + vec2( r,  0)).r - depth);\n        float d2 = abs(texture2D(uSceneDepth, p + vec2( 0, -r)).r - depth);\n        float d3 = abs(texture2D(uSceneDepth, p + vec2( 0,  r)).r - depth);\n        float d = max(d0, d1);\n        d = max(d, d2);\n        d = max(d, d3);\n        sceneColor.rgb *= pow(1.0 - d, uOutlineStrength * 32.0);\n        sceneColor.a = max(step(0.003, d), sceneColor.a);\n    }\n    vec4 dAccum = texture2D(uAccumulatorOut, p);\n    float shade = max(0.0, 1.0 - (dAccum.r + dAccum.g + dAccum.b + dAccum.a) * 0.25 * uAO);\n    shade = pow(shade, 2.0);\n    gl_FragColor = vec4(uBrightness * sceneColor.rgb * shade, sceneColor.a);\n}\n`; \nshaders [\"atom\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosition;\nattribute float aRadius;\nattribute vec3 aColor;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\nuniform float uAtomShade;\n\nvarying vec3 vColor;\nvarying vec3 vPosition;\nvarying float vRadius;\n\nvoid main() {\n    vRadius = uAtomScale * (1.0 + (aRadius - 1.0) * uRelativeAtomScale);\n    gl_Position = uProjection * uView * uModel * vec4(vRadius * aImposter + aPosition, 1.0);\n    vColor = mix(aColor, vec3(1,1,1), uAtomShade);\n    vPosition = vec3(uModel * vec4(aPosition, 1));\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uRes;\nuniform float uDepth;\nuniform int uMode;\n\nvarying vec3 vPosition;\nvarying float vRadius;\nvarying vec3 vColor;\n\nvec2 res = vec2(uRes, uRes);\n\nfloat raySphereIntersect(vec3 r0, vec3 rd) {\n    float a = dot(rd, rd);\n    vec3 s0_r0 = r0 - vPosition;\n    float b = 2.0 * dot(rd, s0_r0);\n    float c = dot(s0_r0, s0_r0) - (vRadius * vRadius);\n    float disc = b*b - 4.0*a*c;\n    if (disc <= 0.0) {\n        return -1.0;\n    }\n    return (-b - sqrt(disc))/(2.0*a);\n}\n\nvoid main() {\n    vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), 0.0);\n    vec3 rd = vec3(0, 0, -1);\n    float t = raySphereIntersect(r0, rd);\n    if (t < 0.0) {\n        discard;\n    }\n    vec3 coord = r0 + rd * t;\n    vec3 normal = normalize(coord - vPosition);\n    if (uMode == 0) {\n        gl_FragColor = vec4(vColor, 1);\n    } else if (uMode == 1) {\n        gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n    }\n    gl_FragDepthEXT = -coord.z/uDepth;\n}\n`; \nshaders [\"blur\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\nuniform int leftRight;\n\nvoid main() {\n    vec2 dir;\n    if (leftRight == 1) {\n        dir = vec2(1,0)/uRes;\n    } else {\n        dir = vec2(0,1)/uRes;\n    }\n    const int range = 16;\n    vec4 sample = vec4(0,0,0,0);\n    for (int i = -range; i <= range; i++) {\n        vec2 p = gl_FragCoord.xy/uRes + dir * float(i);\n        sample += texture2D(uTexture, p);\n    }\n    sample /= float(range) * 2.0 + 1.0;\n    gl_FragColor = sample;\n}\n`; \nshaders [\"bond\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosA;\nattribute vec3 aPosB;\nattribute float aRadA;\nattribute float aRadB;\nattribute vec3 aColA;\nattribute vec3 aColB;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform mat4 uRotation;\nuniform float uBondRadius;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\n\nvarying vec3 vNormal;\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n    vec3 v = cross(a, b);\n    float s = length(v);\n    float c = dot(a, b);\n    mat3 I = mat3(\n        1, 0, 0,\n        0, 1, 0,\n        0, 0, 1\n    );\n    mat3 vx = mat3(\n        0, v.z, -v.y,\n        -v.z, 0, v.x,\n        v.y, -v.x, 0\n    );\n    return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n    vRadius = uBondRadius;\n    vec3 pos = vec3(aImposter);\n    // Scale the box in x and z to be bond-radius.\n    pos = pos * vec3(vRadius, 1, vRadius);\n    // Shift the origin-centered cube so that the bottom is at the origin.\n    pos = pos + vec3(0, 1, 0);\n    // Stretch the box in y so that it is the length of the bond.\n    pos = pos * vec3(1, length(aPosA - aPosB) * 0.5, 1);\n    // Find the rotation that aligns vec3(0, 1, 0) with vec3(uPosB - uPosA) and apply it.\n    vec3 a = normalize(vec3(-0.000001, 1.000001, 0.000001));\n    vec3 b = normalize(aPosB - aPosA);\n    mat3 R = alignVector(a, b);\n    pos = R * pos;\n    // Shift the cube so that the bottom is centered at the middle of atom A.\n    pos = pos + aPosA;\n\n    vec4 position = uModel * vec4(pos, 1);\n    gl_Position = uProjection * uView * position;\n    vPosA = aPosA;\n    vPosB = aPosB;\n    vRadA = uAtomScale * (1.0 + (aRadA - 1.0) * uRelativeAtomScale);\n    vRadB = uAtomScale * (1.0 + (aRadB - 1.0) * uRelativeAtomScale);\n    vColA = aColA;\n    vColB = aColB;\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform mat4 uRotation;\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform float uBondShade;\nuniform int uMode;\n\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n    vec3 v = cross(a, b);\n    float s = length(v);\n    float c = dot(a, b);\n    mat3 I = mat3(\n        1, 0, 0,\n        0, 1, 0,\n        0, 0, 1\n    );\n    mat3 vx = mat3(\n        0, v.z, -v.y,\n        -v.z, 0, v.x,\n        v.y, -v.x, 0\n    );\n    return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n\n    vec2 res = vec2(uRes, uRes);\n    vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), uDepth/2.0);\n    vec3 rd = vec3(0, 0, -1);\n\n    vec3 i = normalize(vPosB - vPosA);\n         i = vec3(uRotation * vec4(i, 0));\n    vec3 j = normalize(vec3(-0.000001, 1.000001, 0.000001));\n    mat3 R = alignVector(i, j);\n\n    vec3 r0p = r0 - vec3(uRotation * vec4(vPosA, 0));\n    r0p = R * r0p;\n    vec3 rdp = R * rd;\n\n    float a = dot(rdp.xz, rdp.xz);\n    float b = 2.0 * dot(rdp.xz, r0p.xz);\n    float c = dot(r0p.xz, r0p.xz) - vRadius*vRadius;\n    float disc = b*b - 4.0*a*c;\n    if (disc <= 0.0) {\n        discard;\n    }\n    float t = (-b - sqrt(disc))/(2.0*a);\n    if (t < 0.0) {\n        discard;\n    }\n\n    vec3 coord = r0p + rdp * t;\n    if (coord.y < 0.0 || coord.y > length(vPosA - vPosB)) {\n        discard;\n    }\n\n    vec3 color;\n    if (coord.y < vRadA + 0.5 * (length(vPosA - vPosB) - (vRadA + vRadB))) {\n        color = vColA;\n    } else {\n        color = vColB;\n    }\n\n    color = mix(color, vec3(1,1,1), uBondShade);\n\n    R = alignVector(j, i);\n    vec3 normal = normalize(R * vec3(coord.x, 0, coord.z));\n\n    coord = r0 + rd * t;\n    if (uMode == 0) {\n        gl_FragColor = vec4(color, 1);\n    } else if (uMode == 1) {\n        gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n    }\n    gl_FragDepthEXT = -(coord.z - uDepth/2.0)/uDepth;\n}\n`; \nshaders [\"dof\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uColor;\nuniform sampler2D uDepth;\nuniform float uRes;\nuniform float uDOFPosition;\nuniform float uDOFStrength;\nuniform int leftRight;\n\nvoid main() {\n\n    vec2 samples[64];\n    samples[0] = vec2(0.857612, 0.019885);\n    samples[1] = vec2(0.563809, -0.028071);\n    samples[2] = vec2(0.825599, -0.346856);\n    samples[3] = vec2(0.126584, -0.380959);\n    samples[4] = vec2(0.782948, 0.594322);\n    samples[5] = vec2(0.292148, -0.543265);\n    samples[6] = vec2(0.130700, 0.330220);\n    samples[7] = vec2(0.236088, 0.159604);\n    samples[8] = vec2(-0.305259, 0.810505);\n    samples[9] = vec2(0.269616, 0.923026);\n    samples[10] = vec2(0.484486, 0.371845);\n    samples[11] = vec2(-0.638057, 0.080447);\n    samples[12] = vec2(0.199629, 0.667280);\n    samples[13] = vec2(-0.861043, -0.370583);\n    samples[14] = vec2(-0.040652, -0.996174);\n    samples[15] = vec2(0.330458, -0.282111);\n    samples[16] = vec2(0.647795, -0.214354);\n    samples[17] = vec2(0.030422, -0.189908);\n    samples[18] = vec2(0.177430, -0.721124);\n    samples[19] = vec2(-0.461163, -0.327434);\n    samples[20] = vec2(-0.410012, -0.734504);\n    samples[21] = vec2(-0.616334, -0.626069);\n    samples[22] = vec2(0.590759, -0.726479);\n    samples[23] = vec2(-0.590794, 0.805365);\n    samples[24] = vec2(-0.924561, -0.163739);\n    samples[25] = vec2(-0.323028, 0.526960);\n    samples[26] = vec2(0.642128, 0.752577);\n    samples[27] = vec2(0.173625, -0.952386);\n    samples[28] = vec2(0.759014, 0.330311);\n    samples[29] = vec2(-0.360526, -0.032013);\n    samples[30] = vec2(-0.035320, 0.968156);\n    samples[31] = vec2(0.585478, -0.431068);\n    samples[32] = vec2(-0.244766, -0.906947);\n    samples[33] = vec2(-0.853096, 0.184615);\n    samples[34] = vec2(-0.089061, 0.104648);\n    samples[35] = vec2(-0.437613, 0.285308);\n    samples[36] = vec2(-0.654098, 0.379841);\n    samples[37] = vec2(-0.128663, 0.456572);\n    samples[38] = vec2(0.015980, -0.568170);\n    samples[39] = vec2(-0.043966, -0.771940);\n    samples[40] = vec2(0.346512, -0.071238);\n    samples[41] = vec2(-0.207921, -0.209121);\n    samples[42] = vec2(-0.624075, -0.189224);\n    samples[43] = vec2(-0.120618, 0.689339);\n    samples[44] = vec2(-0.664679, -0.410200);\n    samples[45] = vec2(0.371945, -0.880573);\n    samples[46] = vec2(-0.743251, 0.629998);\n    samples[47] = vec2(-0.191926, -0.413946);\n    samples[48] = vec2(0.449574, 0.833373);\n    samples[49] = vec2(0.299587, 0.449113);\n    samples[50] = vec2(-0.900432, 0.399319);\n    samples[51] = vec2(0.762613, -0.544796);\n    samples[52] = vec2(0.606462, 0.174233);\n    samples[53] = vec2(0.962185, -0.167019);\n    samples[54] = vec2(0.960990, 0.249552);\n    samples[55] = vec2(0.570397, 0.559146);\n    samples[56] = vec2(-0.537514, 0.555019);\n    samples[57] = vec2(0.108491, -0.003232);\n    samples[58] = vec2(-0.237693, -0.615428);\n    samples[59] = vec2(-0.217313, 0.261084);\n    samples[60] = vec2(-0.998966, 0.025692);\n    samples[61] = vec2(-0.418554, -0.527508);\n    samples[62] = vec2(-0.822629, -0.567797);\n    samples[63] = vec2(0.061945, 0.522105);\n\n    float invRes = 1.0/uRes;\n    vec2 coord = gl_FragCoord.xy * invRes;\n\n    float strength = uDOFStrength * uRes/768.0;\n\n    float depth = texture2D(uDepth, coord).r;\n    float range = uDOFPosition - depth;\n    float scale = abs(range);\n\n    vec4 sample = texture2D(uColor, coord);\n    float count = 1.0;\n    for(int i = 0; i < 64; i++) {\n        vec2 p = samples[i];\n        p = coord + scale * 64.0 * strength * p * invRes;\n        float d = texture2D(uDepth, p).r;\n        float r = uDOFPosition - d;\n        float s = abs(r);\n        sample += texture2D(uColor, p) * s;\n        count += s;\n    }\n\n    gl_FragColor = sample/count;\n}`; \nshaders [\"fxaa\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n    float FXAA_SPAN_MAX = 8.0;\n    float FXAA_REDUCE_MUL = 1.0/8.0;\n    float FXAA_REDUCE_MIN = 1.0/128.0;\n\n    vec2 texCoords = gl_FragCoord.xy/uRes;\n\n    vec4 rgbNW = texture2D(uTexture, texCoords + (vec2(-1.0, -1.0) / uRes));\n    vec4 rgbNE = texture2D(uTexture, texCoords + (vec2(1.0, -1.0) / uRes));\n    vec4 rgbSW = texture2D(uTexture, texCoords + (vec2(-1.0, 1.0) / uRes));\n    vec4 rgbSE = texture2D(uTexture, texCoords + (vec2(1.0, 1.0) / uRes));\n    vec4 rgbM  = texture2D(uTexture, texCoords);\n\n    vec4 luma = vec4(0.299, 0.587, 0.114, 1.0);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);\n\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) / uRes;\n\n    vec4 rgbA = (1.0/2.0) * \n        (texture2D(uTexture, texCoords.xy + dir * (1.0/3.0 - 0.5)) + \n         texture2D(uTexture, texCoords.xy + dir * (2.0/3.0 - 0.5)));\n    vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * \n        (texture2D(uTexture, texCoords.xy + dir * (0.0/3.0 - 0.5)) +\n         texture2D(uTexture, texCoords.xy + dir * (3.0/3.0 - 0.5)));\n    float lumaB = dot(rgbB, luma);\n\n    if((lumaB < lumaMin) || (lumaB > lumaMax)){\n        gl_FragColor = rgbA;\n    } else {\n        gl_FragColor = rgbB;\n    }\n\n}`; \nshaders [\"textured-quad\"] = `#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n    gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n    gl_FragColor = texture2D(uTexture, gl_FragCoord.xy/uRes);\n}\n`; \nmodule.exports = {shaders};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/shaders.js?");

/***/ }),

/***/ "./node_modules/speck/src/system.js":
/*!******************************************!*\
  !*** ./node_modules/speck/src/system.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar glm = __webpack_require__(/*! ./gl-matrix */ \"./node_modules/speck/src/gl-matrix.js\")\n\nvar elements = __webpack_require__(/*! ./elements */ \"./node_modules/speck/src/elements.js\");\nvar consts = __webpack_require__(/*! ./const */ \"./node_modules/speck/src/const.js\");\n\nvar newSystem = module.exports.new = function() {\n    return {\n        atoms: [],\n        farAtom: undefined,\n        bonds: []\n    }\n};\n\n\nvar calculateBonds = module.exports.calculateBonds = function(s) {\n    var bonds = [];\n    var sorted = s.atoms.slice();\n    sorted.sort(function(a, b) {\n        return a.z - b.z;\n    });\n    for (var i = 0; i < sorted.length; i++) {\n        var a = sorted[i];\n        var j = i + 1;\n        while(j < sorted.length && sorted[j].z < sorted[i].z + 2.5 * 2 * consts.MAX_ATOM_RADIUS) {\n            var b = sorted[j];\n            var l = glm.vec3.fromValues(a.x, a.y, a.z);\n            var m = glm.vec3.fromValues(b.x, b.y, b.z);\n            var d = glm.vec3.distance(l, m);\n            var ea = elements[a.symbol];\n            var eb = elements[b.symbol];\n            if (d < 2.5*(ea.radius+eb.radius)) {\n                bonds.push({\n                    posA: {\n                        x: a.x,\n                        y: a.y,\n                        z: a.z\n                    },\n                    posB: {\n                        x: b.x,\n                        y: b.y,\n                        z: b.z\n                    },\n                    radA: ea.radius,\n                    radB: eb.radius,\n                    colA: {\n                        r: ea.color[0],\n                        g: ea.color[1],\n                        b: ea.color[2]\n                    },\n                    colB: {\n                        r: eb.color[0],\n                        g: eb.color[1],\n                        b: eb.color[2]\n                    },\n                    cutoff: d/(ea.radius+eb.radius)\n                });\n            }\n            j++;\n        }\n    }\n    bonds.sort(function(a, b) {\n        return a.cutoff - b.cutoff;\n    });\n    s.bonds = bonds;\n}\n\n\nvar addAtom = module.exports.addAtom = function(s, symbol, x, y, z) {\n    s.atoms.push({\n        symbol: symbol,\n        x: x,\n        y: y,\n        z: z,\n    });\n};\n\nvar getCentroid = module.exports.getCentroid = function(s) {\n    var xsum = 0;\n    var ysum = 0;\n    var zsum = 0;\n    for (var i = 0; i < s.atoms.length; i++) {\n        xsum += s.atoms[i].x;\n        ysum += s.atoms[i].y;\n        zsum += s.atoms[i].z;\n    }\n    return {\n        x: xsum/s.atoms.length,\n        y: ysum/s.atoms.length,\n        z: zsum/s.atoms.length\n    };\n};\n\nvar center = module.exports.center = function(s) {\n    var shift = getCentroid(s);\n    for (var i = 0; i < s.atoms.length; i++) {\n        var atom = s.atoms[i];\n        atom.x -= shift.x;\n        atom.y -= shift.y;\n        atom.z -= shift.z;\n    }\n}\n\nvar getFarAtom = module.exports.getFarAtom = function(s) {\n    if (s.farAtom !== undefined) {\n        return s.farAtom;\n    }\n    s.farAtom = s.atoms[0];\n    var maxd = 0.0;\n    for (var i = 0; i < s.atoms.length; i++) {\n        var atom = s.atoms[i];\n        var r = elements[atom.symbol].radius;\n        var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n        var d = Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n        if (d > maxd) {\n            maxd = d;\n            s.farAtom = atom;\n        }\n    }\n    return s.farAtom;\n}\n\nvar getRadius = module.exports.getRadius = function(s) {\n    var atom = getFarAtom(s);\n    var r = consts.MAX_ATOM_RADIUS;\n    var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n    return Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/system.js?");

/***/ }),

/***/ "./node_modules/speck/src/view.js":
/*!****************************************!*\
  !*** ./node_modules/speck/src/view.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n\nvar glm = __webpack_require__(/*! ./gl-matrix */ \"./node_modules/speck/src/gl-matrix.js\");\nvar elements = __webpack_require__(/*! ./elements */ \"./node_modules/speck/src/elements.js\");\nvar consts = __webpack_require__(/*! ./const */ \"./node_modules/speck/src/const.js\");\n\nfunction clamp(min, max, value) {\n    return Math.min(max, Math.max(min, value));\n}\n\n\nvar newView = module.exports.new = function() {\n    return {\n        aspect: 1.0,\n        zoom: 0.125,\n        translation: {\n            x: 0.0,\n            y: 0.0\n        },\n        atomScale: 0.6,\n        relativeAtomScale: 1.0,\n        bondScale: 0.5,\n        rotation: glm.mat4.create(),\n        ao: 0.75,\n        aoRes: 256,\n        brightness: 0.5,\n        outline: 0.0,\n        spf: 32,\n        bonds: false,\n        bondThreshold: 1.2,\n        bondShade: 0.5,\n        atomShade: 0.5,\n        resolution: 768,\n        dofStrength: 0.0,\n        dofPosition: 0.5,\n        fxaa: 1\n    };\n};\n\n\nvar center = module.exports.center = function(v, system) {\n    var maxX = -Infinity;\n    var minX = Infinity;\n    var maxY = -Infinity;\n    var minY = Infinity;\n    for(var i = 0; i < system.atoms.length; i++) {\n        var a = system.atoms[i];\n        var r = elements[a.symbol].radius;\n        r = 2.5 * v.atomScale * (1 + (r - 1) * v.relativeAtomScale);\n        var p = glm.vec4.fromValues(a.x, a.y, a.z, 0);\n        glm.vec4.transformMat4(p, p, v.rotation);\n        maxX = Math.max(maxX, p[0] + r);\n        minX = Math.min(minX, p[0] - r);\n        maxY = Math.max(maxY, p[1] + r);\n        minY = Math.min(minY, p[1] - r);\n    }\n    var cx = minX + (maxX - minX) / 2.0;\n    var cy = minY + (maxY - minY) / 2.0;\n    v.translation.x = cx;\n    v.translation.y = cy;\n    var scale = Math.max(maxX - minX, maxY - minY);\n    v.zoom = 1/(scale * 1.01);\n};\n\n\nvar override = module.exports.override = function(v, data) {\n    for (var key in data) {\n        v[key] = data[key];\n    }\n    resolve(v);\n};\n\n\nvar clone = module.exports.clone = function(v) {\n    return deserialize(serialize(v));\n};\n\n\nvar serialize = module.exports.serialize = function(v) {\n    return JSON.stringify(v);\n};\n\n\nvar deserialize = module.exports.deserialize = function(v) {\n    v = JSON.parse(v);\n    v.rotation = glm.mat4.clone(v.rotation);\n    return v;\n};\n\n\nvar resolve = module.exports.resolve = function(v) {\n    v.dofStrength = clamp(0, 1, v.dofStrength);\n    v.dofPosition = clamp(0, 1, v.dofPosition);\n    v.zoom = clamp(0.001, 2.0, v.zoom);\n    v.atomScale = clamp(0, 1, v.atomScale);\n    v.relativeAtomScale = clamp(0, 1, v.relativeAtomScale);\n    v.bondScale = clamp(0, 1, v.bondScale);\n    v.bondShade = clamp(0, 1, v.bondShade);\n    v.atomShade = clamp(0, 1, v.atomShade);\n    v.ao = clamp(0, 1, v.ao);\n    v.brightness = clamp(0, 1, v.brightness);\n    v.outline = clamp(0, 1, v.outline);\n};\n\n\nvar translate = module.exports.translate = function(v, dx, dy) {\n    v.translation.x -= dx/(v.resolution * v.zoom);\n    v.translation.y += dy/(v.resolution * v.zoom);\n    resolve(v);\n};\n\n\nvar rotate = module.exports.rotate = function(v, dx, dy) {\n    var m = glm.mat4.create();\n    glm.mat4.rotateY(m, m, dx * 0.005);\n    glm.mat4.rotateX(m, m, dy * 0.005);\n    glm.mat4.multiply(v.rotation, m, v.rotation);\n    const ao = v.ao; \n    v.ao = 0; \n    resolve(v);\n    v.ao = ao;\n};\n\n\nvar getRect = module.exports.getRect = function(v) {\n    var width = 1.0/v.zoom;\n    var height = width/v.aspect;\n    var bottom = -height/2 + v.translation.y;\n    var top = height/2 + v.translation.y;\n    var left = -width/2 + v.translation.x;\n    var right = width/2 + v.translation.x;\n    return {\n        bottom: bottom,\n        top: top,\n        left: left,\n        right: right\n    };\n};\n\n\nvar getBondRadius = module.exports.getBondRadius = function(v) {\n    return v.bondScale * v.atomScale * \n        (1 + (consts.MIN_ATOM_RADIUS - 1) * v.relativeAtomScale);\n};\n\n\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/view.js?");

/***/ }),

/***/ "./node_modules/speck/src/webgl.js":
/*!*****************************************!*\
  !*** ./node_modules/speck/src/webgl.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction buildAttribs(gl, layout) {\n    var attribs = {};\n    for (var key in layout) {\n        attribs[key] = {\n            buffer: new GLBuffer(gl),\n            size: layout[key]\n        }\n    }\n    return attribs;\n}\n\nmodule.exports.buildAttribs = buildAttribs;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction getExtensions(gl, extArray) {\n    var ext = {};\n    for (var i = 0; i < extArray.length; i++) {\n        var e = gl.getExtension(extArray[i]);\n        if (e === null) {\n            throw \"Extension \" + extArray[i] + \" not available.\";\n        }\n        ext[extArray[i]] = e;\n    }\n    return ext;\n};\n\nmodule.exports.getExtensions = getExtensions;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction Framebuffer(gl, color, depth, ext) {\n\n    var self = this;\n\n    self.initialize = function() {\n        self.fb = gl.createFramebuffer();\n        self.bind();\n        if (color.length > 1) {\n            var drawBuffers = [];\n            for (var i = 0; i < color.length; i++) {\n                drawBuffers.push(ext[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"]);\n            }\n            ext.drawBuffersWEBGL(drawBuffers);\n            for (var i = 0; i < color.length; i++) {\n                gl.framebufferTexture2D(gl.FRAMEBUFFER, ext[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"],\n                    gl.TEXTURE_2D, color[i].texture, 0);\n            }\n        } else {\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, color[0].texture, 0);\n        }\n        if (depth !== undefined) {\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, depth.texture, 0);\n        }\n    };\n\n    self.bind = function() {\n        gl.bindFramebuffer(gl.FRAMEBUFFER, self.fb);\n    }\n\n    self.initialize();\n\n};\n\nmodule.exports.Framebuffer = Framebuffer;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction Texture(gl, index, data, width, height, options) {\n    options = options || {};\n    options.target = options.target || gl.TEXTURE_2D;\n    options.mag = options.mag || gl.NEAREST;\n    options.min = options.min || gl.NEAREST;\n    options.wraps = options.wraps || gl.CLAMP_TO_EDGE;\n    options.wrapt = options.wrapt || gl.CLAMP_TO_EDGE;\n    options.internalFormat = options.internalFormat || gl.RGBA;\n    options.format = options.format || gl.RGBA;\n    options.type = options.type || gl.UNSIGNED_BYTE;\n\n    var self = this;\n\n    self.initialize = function() {\n        self.index = index;\n        self.activate();\n        self.texture = gl.createTexture();\n        self.bind();\n        gl.texParameteri(options.target, gl.TEXTURE_MAG_FILTER, options.mag);\n        gl.texParameteri(options.target, gl.TEXTURE_MIN_FILTER, options.min);\n        gl.texParameteri(options.target, gl.TEXTURE_WRAP_S, options.wraps);\n        gl.texParameteri(options.target, gl.TEXTURE_WRAP_T, options.wrapt);\n        gl.texImage2D(options.target, 0, options.internalFormat, width, height, \n            0, options.format, options.type, data);\n    }\n\n    self.bind = function() {\n        gl.bindTexture(options.target, self.texture);\n    };\n\n    self.activate = function() {\n        gl.activeTexture(gl.TEXTURE0 + self.index);\n    };\n\n    self.reset = function() {\n        self.activate();\n        self.bind();\n        gl.texImage2D(options.target, 0, options.internalFormat, width, height, \n            0, options.format, options.type, data);\n    }\n\n    self.initialize();\n}\n\nmodule.exports.Texture = Texture;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction GLBuffer(gl) {\n\n    var self = this;\n\n    self.initialize = function() {\n        self.buffer = gl.createBuffer();\n    }\n\n    self.bind = function() {\n        gl.bindBuffer(gl.ARRAY_BUFFER, self.buffer);\n    }\n\n    self.set = function(data) {\n        self.bind();\n        gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n    }\n\n    self.initialize();\n};\n\nmodule.exports.GLBuffer = GLBuffer;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction Renderable(gl, program, buffers, primitiveCount) {\n\n    var self = this;\n\n    self.primitiveCount = primitiveCount;\n\n    self.initialize = function() {\n    }\n\n    self.render = function() {\n        program.use();\n        for (name in buffers) {\n            var buffer = buffers[name].buffer;\n            var size = buffers[name].size;\n            try {\n                var location = program.attribs[name].location;\n            } catch (e) {\n                console.log(\"Could not find location for\", name);\n                throw e;\n            }\n            buffer.bind();\n            gl.enableVertexAttribArray(location);\n            gl.vertexAttribPointer(location, size, gl.FLOAT, false, 0, 0);\n        }\n        gl.drawArrays(gl.TRIANGLES, 0, 3 * primitiveCount);\n        for (name in self.buffers) {\n            gl.disableVertexAttribArray(program.attributes[name].location);\n        }\n    }\n\n    self.initialize();\n};\n\nmodule.exports.Renderable = Renderable;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction InstancedRenderable(gl, program, buffers, primitiveCount, instancedExt) {\n\n    var self = this;\n\n    self.initialize = function() {\n    }\n\n    self.render = function() {\n        program.use();\n        for (name in buffers) {\n            var buffer = buffers[name].buffer;\n            var size = buffers[name].size;\n            try {\n                var location = program.attribs[name].location;\n            } catch (e) {\n                console.log(\"Could not find location for\", name);\n                throw e;\n            }\n            buffer.bind();\n            gl.enableVertexAttribArray(location);\n            gl.vertexAttribPointer(location, size, gl.FLOAT, false, 0, 0);\n            instancedExt.vertexAttribDivisorANGLE(location, buffers[name].divisor);                \n        }\n        instancedExt.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6*2*3, primitiveCount)\n        for (name in self.buffers) {\n            gl.disableVertexAttribArray(program.attributes[name].location);\n        }\n    }\n\n    self.initialize();\n};\n\nmodule.exports.InstancedRenderable = InstancedRenderable;\n\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nfunction Program(gl, vertexSource, fragmentSource) {\n\n    var self = this;\n\n    self.initialize = function() {\n        self.program = self.compileProgram(vertexSource, fragmentSource);\n        self.attribs = self.gatherAttribs();\n        self.uniforms = self.gatherUniforms();\n    }\n\n    self.use = function() {\n        gl.useProgram(self.program);\n    }\n\n    self.compileProgram = function(vertexSource, fragmentSource) {\n        var vertexShader = self.compileShader(vertexSource, gl.VERTEX_SHADER);\n        var fragmentShader = self.compileShader(fragmentSource, gl.FRAGMENT_SHADER);\n        var program = gl.createProgram();\n        gl.attachShader(program, vertexShader);\n        gl.attachShader(program, fragmentShader);\n        gl.linkProgram(program);\n        if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n            console.log(gl.getProgramInfoLog(program));\n            throw \"Failed to compile program.\";\n        }\n        return program;\n    }\n\n    self.compileShader = function(source, type) {\n        var shader = gl.createShader(type);\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n            var err = gl.getShaderInfoLog(shader);\n            var lineno = parseInt(err.split(':')[2]);\n            var split = source.split(\"\\n\");\n            for (var i in split) {\n                var q = parseInt(i);\n                console.log(q + \"  \" + split[i]);\n                if (i == lineno - 1) {\n                    console.warn(err);\n                }\n            }\n            typeString = type == gl.VERTEX_SHADER ? \"vertex\" : \"fragment\";\n            throw \"Failed to compile \" + typeString + \" shader.\";\n        }\n        return shader;\n    }\n\n    self.setUniform = function(name, type, value) {\n        var args = Array.prototype.slice.call(arguments, 2);\n        self.use(); // Make this idempotent. At the context level, perhaps?\n        try {\n            var location = self.uniforms[name].location;\n        }\n        catch(e) {\n            console.log(name);\n            throw e;\n        }\n        gl['uniform' + type].apply(gl, [location].concat(args));\n    }\n\n    self.gatherUniforms = function() {\n        var uniforms = {};\n        var nUniforms = gl.getProgramParameter(self.program, gl.ACTIVE_UNIFORMS);\n        for (var i = 0; i < nUniforms; i++) {\n            var uniform = gl.getActiveUniform(self.program, i);\n            uniforms[uniform.name] = {\n                name: uniform.name,\n                location: gl.getUniformLocation(self.program, uniform.name),\n                type: uniform.type,\n                size: uniform.size\n            };\n        }\n        return uniforms;\n    }\n\n    self.gatherAttribs = function() {\n        var attribs = {};\n        var nAttribs = gl.getProgramParameter(self.program, gl.ACTIVE_ATTRIBUTES);\n        for (var i = 0; i < nAttribs; i++) {\n            var attrib = gl.getActiveAttrib(self.program, i);\n            attribs[attrib.name] = {\n                name: attrib.name,\n                location: gl.getAttribLocation(self.program, attrib.name),\n                type: attrib.type,\n                size: attrib.size\n            };\n        }\n        return attribs;\n    }   \n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n    self.initialize();\n\n};\n\n//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\nmodule.exports.Program = Program;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/speck/src/webgl.js?");

/***/ }),

/***/ "./node_modules/string.prototype.trim/implementation.js":
/*!**************************************************************!*\
  !*** ./node_modules/string.prototype.trim/implementation.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar ES = __webpack_require__(/*! es-abstract/es5 */ \"./node_modules/es-abstract/es5.js\");\nvar replace = bind.call(Function.call, String.prototype.replace);\n\nvar leftWhitespace = /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n\nmodule.exports = function trim() {\n\tvar S = ES.ToString(ES.CheckObjectCoercible(this));\n\treturn replace(replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/string.prototype.trim/implementation.js?");

/***/ }),

/***/ "./node_modules/string.prototype.trim/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/string.prototype.trim/index.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/string.prototype.trim/implementation.js\");\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/string.prototype.trim/polyfill.js\");\nvar shim = __webpack_require__(/*! ./shim */ \"./node_modules/string.prototype.trim/shim.js\");\n\nvar boundTrim = bind.call(Function.call, getPolyfill());\n\ndefine(boundTrim, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundTrim;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/string.prototype.trim/index.js?");

/***/ }),

/***/ "./node_modules/string.prototype.trim/polyfill.js":
/*!********************************************************!*\
  !*** ./node_modules/string.prototype.trim/polyfill.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/string.prototype.trim/implementation.js\");\n\nvar zeroWidthSpace = '\\u200b';\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/string.prototype.trim/polyfill.js?");

/***/ }),

/***/ "./node_modules/string.prototype.trim/shim.js":
/*!****************************************************!*\
  !*** ./node_modules/string.prototype.trim/shim.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/string.prototype.trim/polyfill.js\");\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, { trim: function () { return String.prototype.trim !== polyfill; } });\n\treturn polyfill;\n};\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/string.prototype.trim/shim.js?");

/***/ }),

/***/ "./node_modules/stylis-rule-sheet/index.js":
/*!*************************************************!*\
  !*** ./node_modules/stylis-rule-sheet/index.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("(function (factory) {\n\t true ? (module['exports'] = factory()) :\n\t\tundefined\n}(function () {\n\n\t'use strict'\n\n\treturn function (insertRule) {\n\t\tvar delimiter = '/*|*/'\n\t\tvar needle = delimiter+'}'\n\n\t\tfunction toSheet (block) {\n\t\t\tif (block)\n\t\t\t\ttry {\n\t\t\t\t\tinsertRule(block + '}')\n\t\t\t\t} catch (e) {}\n\t\t}\n\n\t\treturn function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {\n\t\t\tswitch (context) {\n\t\t\t\t// property\n\t\t\t\tcase 1:\n\t\t\t\t\t// @import\n\t\t\t\t\tif (depth === 0 && content.charCodeAt(0) === 64)\n\t\t\t\t\t\treturn insertRule(content+';'), ''\n\t\t\t\t\tbreak\n\t\t\t\t// selector\n\t\t\t\tcase 2:\n\t\t\t\t\tif (ns === 0)\n\t\t\t\t\t\treturn content + delimiter\n\t\t\t\t\tbreak\n\t\t\t\t// at-rule\n\t\t\t\tcase 3:\n\t\t\t\t\tswitch (ns) {\n\t\t\t\t\t\t// @font-face, @page\n\t\t\t\t\t\tcase 102:\n\t\t\t\t\t\tcase 112:\n\t\t\t\t\t\t\treturn insertRule(selectors[0]+content), ''\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn content + (at === 0 ? delimiter : '')\n\t\t\t\t\t}\n\t\t\t\tcase -2:\n\t\t\t\t\tcontent.split(needle).forEach(toSheet)\n\t\t\t}\n\t\t}\n\t}\n}))\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/stylis-rule-sheet/index.js?");

/***/ }),

/***/ "./node_modules/uuid/index.js":
/*!************************************!*\
  !*** ./node_modules/uuid/index.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var v1 = __webpack_require__(/*! ./v1 */ \"./node_modules/uuid/v1.js\");\nvar v4 = __webpack_require__(/*! ./v4 */ \"./node_modules/uuid/v4.js\");\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/uuid/index.js?");

/***/ }),

/***/ "./node_modules/uuid/lib/bytesToUuid.js":
/*!**********************************************!*\
  !*** ./node_modules/uuid/lib/bytesToUuid.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n  return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/uuid/lib/bytesToUuid.js?");

/***/ }),

/***/ "./node_modules/uuid/lib/rng-browser.js":
/*!**********************************************!*\
  !*** ./node_modules/uuid/lib/rng-browser.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/uuid/lib/rng-browser.js?");

/***/ }),

/***/ "./node_modules/uuid/v1.js":
/*!*********************************!*\
  !*** ./node_modules/uuid/v1.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var rng = __webpack_require__(/*! ./lib/rng */ \"./node_modules/uuid/lib/rng-browser.js\");\nvar bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ \"./node_modules/uuid/lib/bytesToUuid.js\");\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/uuid/v1.js?");

/***/ }),

/***/ "./node_modules/uuid/v4.js":
/*!*********************************!*\
  !*** ./node_modules/uuid/v4.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var rng = __webpack_require__(/*! ./lib/rng */ \"./node_modules/uuid/lib/rng-browser.js\");\nvar bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ \"./node_modules/uuid/lib/bytesToUuid.js\");\n\nfunction v4(options, buf, offset) {\n  var i = buf && offset || 0;\n\n  if (typeof(options) == 'string') {\n    buf = options === 'binary' ? new Array(16) : null;\n    options = null;\n  }\n  options = options || {};\n\n  var rnds = options.random || (options.rng || rng)();\n\n  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n  rnds[6] = (rnds[6] & 0x0f) | 0x40;\n  rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n  // Copy bytes to buffer, if provided\n  if (buf) {\n    for (var ii = 0; ii < 16; ++ii) {\n      buf[i + ii] = rnds[ii];\n    }\n  }\n\n  return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/uuid/v4.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://dash_bio/(webpack)/buildin/global.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n//# sourceURL=webpack://dash_bio/(webpack)/buildin/module.js?");

/***/ }),

/***/ "./node_modules/xhr/index.js":
/*!***********************************!*\
  !*** ./node_modules/xhr/index.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar window = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\")\nvar isFunction = __webpack_require__(/*! is-function */ \"./node_modules/is-function/index.js\")\nvar parseHeaders = __webpack_require__(/*! parse-headers */ \"./node_modules/parse-headers/parse-headers.js\")\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\n\nmodule.exports = createXHR\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n    createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n        options = initParams(uri, options, callback)\n        options.method = method.toUpperCase()\n        return _createXHR(options)\n    }\n})\n\nfunction forEachArray(array, iterator) {\n    for (var i = 0; i < array.length; i++) {\n        iterator(array[i])\n    }\n}\n\nfunction isEmpty(obj){\n    for(var i in obj){\n        if(obj.hasOwnProperty(i)) return false\n    }\n    return true\n}\n\nfunction initParams(uri, options, callback) {\n    var params = uri\n\n    if (isFunction(options)) {\n        callback = options\n        if (typeof uri === \"string\") {\n            params = {uri:uri}\n        }\n    } else {\n        params = xtend(options, {uri: uri})\n    }\n\n    params.callback = callback\n    return params\n}\n\nfunction createXHR(uri, options, callback) {\n    options = initParams(uri, options, callback)\n    return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n    if(typeof options.callback === \"undefined\"){\n        throw new Error(\"callback argument missing\")\n    }\n\n    var called = false\n    var callback = function cbOnce(err, response, body){\n        if(!called){\n            called = true\n            options.callback(err, response, body)\n        }\n    }\n\n    function readystatechange() {\n        if (xhr.readyState === 4) {\n            setTimeout(loadFunc, 0)\n        }\n    }\n\n    function getBody() {\n        // Chrome with requestType=blob throws errors arround when even testing access to responseText\n        var body = undefined\n\n        if (xhr.response) {\n            body = xhr.response\n        } else {\n            body = xhr.responseText || getXml(xhr)\n        }\n\n        if (isJson) {\n            try {\n                body = JSON.parse(body)\n            } catch (e) {}\n        }\n\n        return body\n    }\n\n    function errorFunc(evt) {\n        clearTimeout(timeoutTimer)\n        if(!(evt instanceof Error)){\n            evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n        }\n        evt.statusCode = 0\n        return callback(evt, failureResponse)\n    }\n\n    // will load the data & process the response in a special response object\n    function loadFunc() {\n        if (aborted) return\n        var status\n        clearTimeout(timeoutTimer)\n        if(options.useXDR && xhr.status===undefined) {\n            //IE8 CORS GET successful response doesn't have a status field, but body is fine\n            status = 200\n        } else {\n            status = (xhr.status === 1223 ? 204 : xhr.status)\n        }\n        var response = failureResponse\n        var err = null\n\n        if (status !== 0){\n            response = {\n                body: getBody(),\n                statusCode: status,\n                method: method,\n                headers: {},\n                url: uri,\n                rawRequest: xhr\n            }\n            if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n                response.headers = parseHeaders(xhr.getAllResponseHeaders())\n            }\n        } else {\n            err = new Error(\"Internal XMLHttpRequest Error\")\n        }\n        return callback(err, response, response.body)\n    }\n\n    var xhr = options.xhr || null\n\n    if (!xhr) {\n        if (options.cors || options.useXDR) {\n            xhr = new createXHR.XDomainRequest()\n        }else{\n            xhr = new createXHR.XMLHttpRequest()\n        }\n    }\n\n    var key\n    var aborted\n    var uri = xhr.url = options.uri || options.url\n    var method = xhr.method = options.method || \"GET\"\n    var body = options.body || options.data\n    var headers = xhr.headers = options.headers || {}\n    var sync = !!options.sync\n    var isJson = false\n    var timeoutTimer\n    var failureResponse = {\n        body: undefined,\n        headers: {},\n        statusCode: 0,\n        method: method,\n        url: uri,\n        rawRequest: xhr\n    }\n\n    if (\"json\" in options && options.json !== false) {\n        isJson = true\n        headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n        if (method !== \"GET\" && method !== \"HEAD\") {\n            headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n            body = JSON.stringify(options.json === true ? body : options.json)\n        }\n    }\n\n    xhr.onreadystatechange = readystatechange\n    xhr.onload = loadFunc\n    xhr.onerror = errorFunc\n    // IE9 must have onprogress be set to a unique function.\n    xhr.onprogress = function () {\n        // IE must die\n    }\n    xhr.onabort = function(){\n        aborted = true;\n    }\n    xhr.ontimeout = errorFunc\n    xhr.open(method, uri, !sync, options.username, options.password)\n    //has to be after open\n    if(!sync) {\n        xhr.withCredentials = !!options.withCredentials\n    }\n    // Cannot set timeout with sync request\n    // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n    // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n    if (!sync && options.timeout > 0 ) {\n        timeoutTimer = setTimeout(function(){\n            if (aborted) return\n            aborted = true//IE9 may still call readystatechange\n            xhr.abort(\"timeout\")\n            var e = new Error(\"XMLHttpRequest timeout\")\n            e.code = \"ETIMEDOUT\"\n            errorFunc(e)\n        }, options.timeout )\n    }\n\n    if (xhr.setRequestHeader) {\n        for(key in headers){\n            if(headers.hasOwnProperty(key)){\n                xhr.setRequestHeader(key, headers[key])\n            }\n        }\n    } else if (options.headers && !isEmpty(options.headers)) {\n        throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n    }\n\n    if (\"responseType\" in options) {\n        xhr.responseType = options.responseType\n    }\n\n    if (\"beforeSend\" in options &&\n        typeof options.beforeSend === \"function\"\n    ) {\n        options.beforeSend(xhr)\n    }\n\n    // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n    // XMLHttpRequest spec says to pass null as body to indicate no body\n    // See https://github.com/naugtur/xhr/issues/100.\n    xhr.send(body || null)\n\n    return xhr\n\n\n}\n\nfunction getXml(xhr) {\n    // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n    // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n    try {\n        if (xhr.responseType === \"document\") {\n            return xhr.responseXML\n        }\n        var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\"\n        if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n            return xhr.responseXML\n        }\n    } catch (e) {}\n\n    return null\n}\n\nfunction noop() {}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/xhr/index.js?");

/***/ }),

/***/ "./node_modules/xtend/immutable.js":
/*!*****************************************!*\
  !*** ./node_modules/xtend/immutable.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n    var target = {}\n\n    for (var i = 0; i < arguments.length; i++) {\n        var source = arguments[i]\n\n        for (var key in source) {\n            if (hasOwnProperty.call(source, key)) {\n                target[key] = source[key]\n            }\n        }\n    }\n\n    return target\n}\n\n\n//# sourceURL=webpack://dash_bio/./node_modules/xtend/immutable.js?");

/***/ }),

/***/ "./src/lib/components/AlignmentChart.react.js":
/*!****************************************************!*\
  !*** ./src/lib/components/AlignmentChart.react.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AlignmentChart; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\n/* harmony import */ var react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-alignment-viewer */ \"./node_modules/react-alignment-viewer/lib/index.js\");\n/* harmony import */ var react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * The Alignment Viewer (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment viewer\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Aligment Viewer is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Note that the AlignmentChart only returns a chart of the sequence, while\n * AlignmentViewer has integrated controls for colorscale, heatmaps, and subplots\n * allowing the user to interactively control their sequences.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\n\nvar AlignmentChart =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(AlignmentChart, _Component);\n\n  function AlignmentChart(props) {\n    var _this;\n\n    _classCallCheck(this, AlignmentChart);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(AlignmentChart).call(this, props));\n    _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n    return _this;\n  } // Bind to Dash event handler that puts event back into props\n\n\n  _createClass(AlignmentChart, [{\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      var eventObj = JSON.stringify(event);\n      this.props.setProps({\n        eventDatum: eventObj\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          id = _this$props.id,\n          eventDatum = _this$props.eventDatum;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id,\n        eventDatum: eventDatum\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__[\"AlignmentChart\"], _extends({\n        onChange: this.handleChange\n      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"omit\"])(['fireEvent', 'dashEvent', 'setProps'], this.props))));\n    }\n  }]);\n\n  return AlignmentChart;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nAlignmentChart.propTypes = {\n  /**\n   * The ID of this component, used to identify dash components\n   * in callbacks. The ID needs to be unique across all of the\n   * components in an app.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n   */\n  eventDatum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * Input data, either in FASTA or Clustal format.\n   */\n  data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   *Format type of the input data, either in FASTA or Clustal.\n   */\n  extension: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n   * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n   * or your own colorscale as a {'nucleotide': COLOR} dict.\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object]),\n\n  /**\n   * Opacity of the main plot as a value between 0 and 1.\n   */\n  opacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n   * If left blank, handled by the colorscale automatically.\n   */\n  textcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Size of the nucleotide labels, as a number.\n   */\n  textsize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Toggles displaying sequence labels at left of alignment\n   */\n  showlabel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Toggles displaying sequence IDs at left of alignment.\n   */\n  showid: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Enables the display of conservation secondary barplot where the most conserved\n   * nucleotides or amino acids get greater bars.\n   */\n  showconservation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  conservationcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  conservationcolorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n  /**\n   * Opacity of the conservation secondary barplot as a value between 0 and 1.\n   */\n  conservationopacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Whether to use most conserved ratio (MLE) 'conservation'\n   * or normalized entropy 'entropy' to determine conservation,\n   * which is a value between 0 and 1 where 1 is most conserved.\n   */\n  conservationmethod: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['conservation', 'entropy']),\n\n  /**\n   * Whether to normalize the conservation barchart\n   * By multiplying it elementwise with the gap barchart, as to\n   * lower the conservation values across sequences regions with many gaps.\n   */\n  correctgap: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Enables the display of gap secondary barplot where the sequence regions\n   * with the fewest gaps get the greatest bars.\n   */\n  showgap: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  gapcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  gapcolorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n  /**\n   * Opacity of the gap secondary barplot as a value between 0 and 1.\n   */\n  gapopacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * If both conservation and gap are enabled,\n   * toggles whether to group bars or to stack them as separate subplots.\n   * No effect if not both gap and conservation are shown.\n   */\n  groupbars: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Displays toggling the consensus sequence, where each nucleotide in the\n   * consensus sequence is the argmax of its distribution at a set nucleotide.\n   */\n  showconsensus: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up horizontally. The total number of tiles (numtiles) seen\n   * horizontally is automatically determined by rounding\n   * the Viewer width divided by the tile width.\n   * the Viewwer width divided by the tile witdth.\n   */\n  tilewidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up vertically.\n   * If enabled, set height dynamically.\n   */\n  tileheight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Toggles whether the overview should be a heatmap, a slider, or none.\n   */\n  overview: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['heatmap', 'slider', 'none']),\n\n  /**\n   * Sets how many tiles to display across horitontally. If enabled,\n   * overrides tilewidth and sets the amount of tiles directly based off\n   * that value.\n   */\n  numtiles: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * If overview is set to 'scroll', determines how many tiles to skip\n   * with each slider movement.\n   * Has no effect if scroll is not enabled (such as with overview or none).\n   */\n  scrollskip: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Determines where to start annotating the first tile.\n   * If let blank will be automatically determined by Plotly.\n   * Equivalent to Plotly's tick0 property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  tickstart: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Determines at what interval to keep annotating the tiles.\n   * If left blank will be automatially determined by Plotly.\n   * Equivalent to Plotly's dtick property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  ticksteps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tileswidth and numtiles\n   * if either of them is set.\n   */\n  width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tilesheight if both\n   * are set.\n   */\n  height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string])\n};\nAlignmentChart.defaultProps = {\n  // Data\n  extension: 'fasta',\n  colorscale: 'clustal2',\n  opacity: null,\n  textcolor: null,\n  textsize: 10,\n  showlabel: true,\n  showid: true,\n  showconservation: true,\n  conservationcolor: null,\n  conservationcolorscale: 'Viridis',\n  conservationopacity: null,\n  conservationmethod: 'entropy',\n  correctgap: true,\n  showgap: true,\n  gapcolor: 'grey',\n  gapcolorscale: null,\n  gapopacity: null,\n  groupbars: false,\n  showconsensus: true,\n  // Layout\n  tilewidth: 16,\n  tileheight: 16,\n  numtiles: null,\n  overview: 'heatmap',\n  scrollskip: 10,\n  tickstart: null,\n  ticksteps: null,\n  // Other\n  width: null,\n  height: 900\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/AlignmentChart.react.js?");

/***/ }),

/***/ "./src/lib/components/AlignmentViewer.react.js":
/*!*****************************************************!*\
  !*** ./src/lib/components/AlignmentViewer.react.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AlignmentViewer; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\n/* harmony import */ var react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-alignment-viewer */ \"./node_modules/react-alignment-viewer/lib/index.js\");\n/* harmony import */ var react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * The Alignment Viewer (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment viewer\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Aligment Viewer is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Note that the AlignmentChart only returns a chart of the sequence, while\n * AlignmentViewer has integrated controls for colorscale, heatmaps, and subplots\n * allowing the user to interactively control their sequences.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\n\nvar AlignmentViewer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(AlignmentViewer, _Component);\n\n  function AlignmentViewer(props) {\n    var _this;\n\n    _classCallCheck(this, AlignmentViewer);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(AlignmentViewer).call(this, props));\n    _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n    return _this;\n  } // Bind to Dash event handler that puts event back into props\n\n\n  _createClass(AlignmentViewer, [{\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      var eventObj = JSON.stringify(event);\n      this.props.setProps({\n        eventDatum: eventObj\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          id = _this$props.id,\n          eventDatum = _this$props.eventDatum;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id,\n        eventDatum: eventDatum\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_alignment_viewer__WEBPACK_IMPORTED_MODULE_3__[\"AlignmentViewer\"], _extends({\n        onChange: this.handleChange\n      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"omit\"])(['fireEvent', 'dashEvent', 'setProps'], this.props))));\n    }\n  }]);\n\n  return AlignmentViewer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nAlignmentViewer.propTypes = {\n  /**\n   * The ID of this component, used to identify dash components\n   * in callbacks. The ID needs to be unique across all of the\n   * components in an app.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n   */\n  eventDatum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * Input data, either in FASTA or Clustal format.\n   */\n  data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   *Format type of the input data, either in FASTA or Clustal.\n   */\n  extension: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n   * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n   * or your own colorscale as a {'nucleotide': COLOR} dict.\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object]),\n\n  /**\n   * Opacity of the main plot as a value between 0 and 1.\n   */\n  opacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n   * If left blank, handled by the colorscale automatically.\n   */\n  textcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Size of the nucleotide labels, as a number.\n   */\n  textsize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Toggles displaying sequence labels at left of alignment\n   */\n  showlabel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Toggles displaying sequence IDs at left of alignment.\n   */\n  showid: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Enables the display of conservation secondary barplot where the most conserved\n   * nucleotides or amino acids get greater bars.\n   */\n  showconservation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  conservationcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  conservationcolorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n  /**\n   * Opacity of the conservation secondary barplot as a value between 0 and 1.\n   */\n  conservationopacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Whether to use most conserved ratio (MLE) 'conservation'\n   * or normalized entropy 'entropy' to determine conservation,\n   * which is a value between 0 and 1 where 1 is most conserved.\n   */\n  conservationmethod: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['conservation', 'entropy']),\n\n  /**\n   * Whether to normalize the conservation barchart\n   * By multiplying it elementwise with the gap barchart, as to\n   * lower the conservation values across sequences regions with many gaps.\n   */\n  correctgap: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Enables the display of gap secondary barplot where the sequence regions\n   * with the fewest gaps get the greatest bars.\n   */\n  showgap: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n   */\n  gapcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n   * or as custom Plotly colorscale under a list format.\n   * Note that this conservationcolorscale argument\n   * does NOT follow the same format as the colorscale argument.\n   */\n  gapcolorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n  /**\n   * Opacity of the gap secondary barplot as a value between 0 and 1.\n   */\n  gapopacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * If both conservation and gap are enabled,\n   * toggles whether to group bars or to stack them as separate subplots.\n   * No effect if not both gap and conservation are shown.\n   */\n  groupbars: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Displays toggling the consensus sequence, where each nucleotide in the\n   * consensus sequence is the argmax of its distribution at a set nucleotide.\n   */\n  showconsensus: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up horizontally. The total number of tiles (numtiles) seen\n   * horizontally is automatically determined by rounding\n   * the Viewer width divided by the tile width.\n   * the Viewwer width divided by the tile witdth.\n   */\n  tilewidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Sets how many pixels each nucleotide/amino acid on the Alignment Viewer\n   * takes up vertically.\n   * If enabled, set height dynamically.\n   */\n  tileheight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Toggles whether the overview should be a heatmap, a slider, or none.\n   */\n  overview: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['heatmap', 'slider', 'none']),\n\n  /**\n   * Sets how many tiles to display across horitontally. If enabled,\n   * overrides tilewidth and sets the amount of tiles directly based off\n   * that value.\n   */\n  numtiles: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * If overview is set to 'scroll', determines how many tiles to skip\n   * with each slider movement.\n   * Has no effect if scroll is not enabled (such as with overview or none).\n   */\n  scrollskip: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Determines where to start annotating the first tile.\n   * If let blank will be automatically determined by Plotly.\n   * Equivalent to Plotly's tick0 property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  tickstart: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Determines at what interval to keep annotating the tiles.\n   * If left blank will be automatially determined by Plotly.\n   * Equivalent to Plotly's dtick property.\n   * Does not function if overview mode 'slider' is applied. (Current bug)\n   */\n  ticksteps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tileswidth and numtiles\n   * if either of them is set.\n   */\n  width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Width of the Viewer.\n   * Property takes precedence over tilesheight if both\n   * are set.\n   */\n  height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string])\n};\nAlignmentViewer.defaultProps = {\n  // Data\n  extension: 'fasta',\n  colorscale: 'clustal2',\n  opacity: null,\n  textcolor: null,\n  textsize: 10,\n  showlabel: true,\n  showid: true,\n  showconservation: true,\n  conservationcolor: null,\n  conservationcolorscale: 'Viridis',\n  conservationopacity: null,\n  conservationmethod: 'entropy',\n  correctgap: true,\n  showgap: true,\n  gapcolor: 'grey',\n  gapcolorscale: null,\n  gapopacity: null,\n  groupbars: false,\n  showconsensus: true,\n  // Layout\n  tilewidth: 16,\n  tileheight: 16,\n  numtiles: null,\n  overview: 'heatmap',\n  scrollskip: 10,\n  tickstart: null,\n  ticksteps: null,\n  // Other\n  width: null,\n  height: 900\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/AlignmentViewer.react.js?");

/***/ }),

/***/ "./src/lib/components/Circos.react.js":
/*!********************************************!*\
  !*** ./src/lib/components/Circos.react.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Circos; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var circos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! circos */ \"./node_modules/circos/index.js\");\n/* harmony import */ var circos__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(circos__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _constants_tracks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants/tracks */ \"./src/lib/constants/tracks.js\");\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * Dash Circos is a library used to analyze and interpret\n * data using a circular layout, based on the popular\n * 'Circos' graph. This Dash Bio component is a useful tool\n * for showcasing relationships bewtween data/datasets in a\n * beautiful way. Please checkout the Dash Bio repository\n * on github to learn more about this API.\n */\n\nvar Circos =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Circos, _Component);\n\n  function Circos(props) {\n    var _this;\n\n    _classCallCheck(this, Circos);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Circos).call(this, props));\n    _this.circos = null;\n    _this.configCircos = _this.configCircos.bind(_assertThisInitialized(_this));\n    _this.setEvent = _this.setEvent.bind(_assertThisInitialized(_this));\n    _this.setColor = _this.setColor.bind(_assertThisInitialized(_this));\n    _this.setToolTip = _this.setToolTip.bind(_assertThisInitialized(_this));\n    _this.stopScroll = _this.stopScroll.bind(_assertThisInitialized(_this));\n    _this.setStopScroll = _this.setStopScroll.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(Circos, [{\n    key: \"stopScroll\",\n    value: function stopScroll(e) {\n      e.preventDefault();\n    }\n  }, {\n    key: \"setStopScroll\",\n    value: function setStopScroll(stop) {\n      if (stop) {\n        this.ref.addEventListener('wheel', this.stopScroll);\n      } else {\n        this.ref.removeEventListener('wheel', this.stopScroll);\n      }\n    }\n  }, {\n    key: \"setEvent\",\n    value: function setEvent(setProps, index) {\n      /**\n       * Used to set a click or hover event on tracks/layout that will show annotations for the circos grpah.\n       **/\n      if (typeof this.props.selectEvent !== 'undefined') {\n        if (this.props.selectEvent[index] === 'both') {\n          return {\n            'click.alert': function clickAlert(datum) {\n              setProps({\n                eventDatum: datum\n              });\n            },\n            'mouseover.alert': function mouseoverAlert(datum) {\n              setProps({\n                eventDatum: datum\n              });\n            }\n          };\n        } else if (this.props.selectEvent[index] === 'hover') {\n          return {\n            'mouseover.alert': function mouseoverAlert(datum) {\n              setProps({\n                eventDatum: datum\n              });\n            }\n          };\n        } else if (this.props.selectEvent[index] === 'click') {\n          return {\n            'click.alert': function clickAlert(datum) {\n              setProps({\n                eventDatum: datum\n              });\n            }\n          };\n        }\n      }\n\n      return {};\n    }\n  }, {\n    key: \"setColor\",\n    value: function setColor(configApply) {\n      /**\n       * Allows user to specify a color prop, that will iterate through the colors\n       * in the dataset provided, and apply them directly to the tracks/layout specified\n       * by ID.\n       */\n      if (typeof configApply.color !== 'undefined') {\n        if (typeof configApply.color.name !== 'undefined') {\n          var colorName = configApply.color.name;\n\n          configApply.color = function (d) {\n            return d[colorName];\n          };\n        } else if (typeof configApply.color.conditional !== 'undefined') {\n          var condColor = configApply.color.conditional;\n\n          configApply.color = function (d) {\n            var returnedColor;\n\n            for (var i = 0; i < condColor.value.length; i++) {\n              if (d[condColor.end] - d[condColor.start] > condColor.value[i]) {\n                returnedColor = condColor.color[i];\n                break;\n              }\n            }\n\n            return returnedColor;\n          };\n        }\n      }\n    }\n  }, {\n    key: \"setToolTip\",\n    value: function setToolTip(configApply) {\n      /**\n       * Set the tool tip event handler. It allows the user to specify what data they want\n       * to show on annotation click or hover\n       */\n      if (typeof configApply.tooltipContent !== 'undefined') {\n        if (typeof configApply.tooltipContent.name !== 'undefined') {\n          if (configApply.tooltipContent.name === 'all') {\n            configApply.tooltipContent = function (d) {\n              var contents = '';\n\n              for (var key in d) {\n                var keyUpper = key.charAt(0).toUpperCase() + key.slice(1);\n                contents = '<p>' + keyUpper + ' : ' + d[key] + '</p>' + contents;\n              }\n\n              return '<p>' + contents + '</p>';\n            };\n          } else {\n            var toolName = configApply.tooltipContent.name;\n\n            configApply.tooltipContent = function (d) {\n              return d[toolName];\n            };\n          }\n        } else if (typeof configApply.tooltipContent.source !== 'undefined') {\n          var tooltipData = configApply.tooltipContent;\n\n          if (typeof tooltipData.sourceID !== 'undefined' && typeof tooltipData.targetID !== 'undefined') {\n            configApply.tooltipContent = function (d) {\n              return '<h3>' + d[tooltipData.source][tooltipData.sourceID] + ' ➤ ' + d[tooltipData.target][tooltipData.targetID] + ': ' + d[tooltipData.target][tooltipData.targetEnd] + '</h3>';\n            };\n          } else {\n            configApply.tooltipContent = function (d) {\n              return '<h3>' + d[tooltipData.source] + ' ➤ ' + d[tooltipData.target] + ': ' + d[tooltipData.targetEnd] + '</h3>';\n            };\n          }\n        }\n      } else {\n        configApply.tooltipContent = null;\n      }\n    }\n  }, {\n    key: \"configCircos\",\n    value: function configCircos(layout, config, tracks, setProps) {\n      var _this2 = this;\n\n      this.circos.layout(layout, config);\n      tracks.forEach(function (track, index) {\n        var id = track.id,\n            data = track.data,\n            config = track.config,\n            type = track.type; // Since config is const, can't manipulate and throws error\n\n        var configApply;\n\n        if (typeof config !== 'undefined') {\n          configApply = config; // Set Event Handling\n\n          if (setProps) {\n            configApply.events = _this2.setEvent(setProps, index);\n          } // Set Color\n\n\n          _this2.setColor(configApply); // Set Tooltip\n\n\n          _this2.setToolTip(configApply);\n        }\n\n        _this2.circos[type.toLowerCase()](id || \"track-\".concat(index), data, configApply);\n      });\n      this.circos.render();\n    }\n  }, {\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var _this$props = this.props,\n          enableDownloadSVG = _this$props.enableDownloadSVG,\n          enableZoomPan = _this$props.enableZoomPan,\n          size = _this$props.size,\n          layout = _this$props.layout,\n          config = _this$props.config,\n          tracks = _this$props.tracks,\n          setProps = _this$props.setProps;\n      this.circos = new circos__WEBPACK_IMPORTED_MODULE_2___default.a({\n        container: this.ref,\n        width: size,\n        height: size,\n        enableZoomPan: enableZoomPan,\n        enableDownloadSVG: enableDownloadSVG\n      });\n      this.configCircos(layout, config, tracks, setProps);\n      this.setStopScroll(enableZoomPan);\n    }\n  }, {\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps) {\n      return this.props.config !== nextProps.config || this.props.layout !== nextProps.layout || this.props.tracks !== nextProps.tracks || this.props.size !== nextProps.size || this.props.selectEvent !== nextProps.selectEvent;\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      var _this$props2 = this.props,\n          size = _this$props2.size,\n          layout = _this$props2.layout,\n          config = _this$props2.config,\n          tracks = _this$props2.tracks,\n          setProps = _this$props2.setProps;\n      this.circos.removeTracks();\n      this.container = this.ref;\n      this.circos.width = size;\n      this.circos.height = size;\n      this.configCircos(layout, config, tracks, setProps);\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      this.setStopScroll(false);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this3 = this;\n\n      var _this$props3 = this.props,\n          id = _this$props3.id,\n          style = _this$props3.style,\n          config = _this$props3.config,\n          layout = _this$props3.layout,\n          tracks = _this$props3.tracks,\n          size = _this$props3.size,\n          eventDatum = _this$props3.eventDatum;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id,\n        style: style,\n        eventDatum: eventDatum\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: \"Circos-container\",\n        ref: function ref(_ref) {\n          _this3.ref = _ref;\n        },\n        config: config,\n        layout: layout,\n        tracks: tracks,\n        size: size\n      }));\n    }\n  }]);\n\n  return Circos;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nCircos.defaultProps = {\n  config: {},\n  size: 800,\n  tracks: []\n};\nCircos.propTypes = {\n  /**\n   * Allow for an SVG snapshot of the Circos graph to be downloaded.\n   **/\n  enableDownloadSVG: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Allow for zooming and panning the Circos graph.\n   **/\n  enableZoomPan: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * The ID of the component to be used in Dash callbacks\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The CSS styling of the div wrapping the component\n   */\n  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * A Dash prop that returns data on clicking or hovering of the tracks.\n   * Depending on what is specified for prop \"selectEvent\".\n   */\n  eventDatum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n  * A dictionary used to choose whether tracks should return\n  * data on click, hover, or both, with the dash prop \"eventDatum\".\n  * The keys of the dictionary represent the index of the list\n  * specified for \"tracks\".\n  *\n  * Ex:\n  * selectEvent={\n      \"0\": \"hover\",\n      \"1\": \"click\",\n      \"2\": \"both\"\n  },\n  */\n  selectEvent: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * Dash provided setProps.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * The overall layout of the Circos graph, provided\n   * as a list of dictionaries.\n   */\n  layout: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    /**\n     * The length of the block.\n     */\n    len: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired,\n\n    /**\n     * The color of the block.\n     */\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,\n\n    /**\n     * The labels of the block.\n     */\n    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,\n\n    /**\n     * The id of the block, where it will recieve\n     * data from the specified \"track\" id.\n     */\n    id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired\n  })).isRequired,\n\n  /**\n   * Configuration of overall layout of the graph.\n   */\n  config: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * The overall size of the SVG container holding the\n   * graph. Set on initilization and unchangeable thereafter.\n   */\n  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Tracks that specify specific layouts.\n   * For a complete list of tracks and usage,\n   * please check the docs.\n   */\n  tracks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    /**\n     * The id of a specific piece of track data.\n     */\n    id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n    /**\n     * The data that makes up the track. It can\n     * be a Json object.\n     */\n    data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array.isRequired,\n\n    /**\n     * The layout of the tracks, where the user\n     * can configure innerRadius, outterRadius, ticks,\n     * labels, and more.\n     */\n    config: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n    /**\n     * Specify the type of track this is.\n     * Please check the docs for a list of tracks you can use,\n     * and ensure the name is typed in all capitals.\n     **/\n    type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(_constants_tracks__WEBPACK_IMPORTED_MODULE_3__[\"TRACK_TYPES\"]),\n\n    /**\n     * Specify what data for tooltipContent is\n     * displayed.\n     *\n     * The entry for the \"name\" key, is any of the keys used in the data loaded into tracks.\n     * Ex: \"tooltipContent\": {\"name\": \"block_id\"},\n     *\n     * To display all data in the dataset use \"all\" as the entry for the key \"name\".\n     * Ex: \"tooltipContent\": {\"name\": \"all\"}\n     *\n     * Ex: This will return (source) + ' > ' + (target) + ': ' + (targetEnd)'.\n     * \"tooltipContent\": {\n        \"source\": \"block_id\",\n        \"target\": \"position\",\n        \"targetEnd\": \"value\"\n                },\n     * Ex: This will return (source)(sourceID) + ' > ' + (target)(targetID) + ': ' (target)(targetEnd)'.\n     * \"tooltipContent\": {\n        \"source\": \"source\",\n        \"sourceID\": \"id\",\n        \"target\": \"target\",\n        \"targetID\": \"id\",\n        \"targetEnd\": \"end\"\n    }\n     **/\n    tooltipContent: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired\n    }), prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      source: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,\n      sourceID: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n      target: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,\n      targetEnd: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,\n      targetID: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string\n    })]),\n\n    /**\n     * Specify which dictonary key to grab color values from, in the passed in dataset.\n     * This can be a string or an object.\n     *\n     * If using a string, you can specify hex,\n     * RGB, and colors from d3 scale chromatic (Ex: RdYlBu).\n     *\n     * The key \"name\" is required for this dictionary,\n     * where the input for \"name\" points to some list of\n     * dictionaries color values.\n     *\n     * Ex: \"color\": {\"name\": \"some key that refers to color in a data set\"}\n     **/\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired\n    })])\n  }))\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/Circos.react.js?");

/***/ }),

/***/ "./src/lib/components/Ideogram.react.js":
/*!**********************************************!*\
  !*** ./src/lib/components/Ideogram.react.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Ideogram; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ideogram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ideogram */ \"./node_modules/ideogram/src/js/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * The Ideogram component is used to draw and animate genome-wide\n * datasets for organisms such as human, mouse, and any other\n * eukaryote. The Ideogram component can be used to compare\n * homologous features between chromosomes, and depict\n * haploid, diploid, aneuploid genomes. It can also display\n * annotations on genomic data using histograms and overlays.\n *\n * Reference: https://eweitz.github.io/ideogram/\n * Component's props: https://github.com/eweitz/ideogram/blob/master/api.md\n */\n\nvar Ideogram =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Ideogram, _Component);\n\n  function Ideogram() {\n    var _this;\n\n    _classCallCheck(this, Ideogram);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Ideogram).call(this));\n    _this.ideogram = null;\n    _this.isRotated = false;\n    _this.tooltipData = null;\n    _this.tooltipDataTwo = null;\n    _this.propKeys = ['localOrganism', 'organism', 'showBandLabels', 'orientation', 'dataDir', 'chrHeight', 'chrWidth', 'chrMargin', 'resolution', 'ploidy', 'sex', 'annotationsColor', 'annotationHeight', 'annotationsLayout', 'annotationsPath', 'style', 'chromosomes', 'rotatable', 'showChromosomeLabels', 'showFullyBanded', 'showNonNuclearChromsomes', 'annotationTracks', 'annotations', 'assembly', 'barWidth', 'filterable', 'homology', 'perspective', 'fullChromosomeLabels'];\n    _this.onBrushHandler = _this.onBrushHandler.bind(_assertThisInitialized(_this));\n    _this.onLoadHandler = _this.onLoadHandler.bind(_assertThisInitialized(_this));\n    _this.onRotateHandler = _this.onRotateHandler.bind(_assertThisInitialized(_this));\n    _this.onHomologyHandler = _this.onHomologyHandler.bind(_assertThisInitialized(_this));\n    _this.onToolTipHandler = _this.onToolTipHandler.bind(_assertThisInitialized(_this));\n    _this.onMouseOverHandler = _this.onMouseOverHandler.bind(_assertThisInitialized(_this));\n    _this.setConfig = _this.setConfig.bind(_assertThisInitialized(_this));\n    _this.initIdeogram = _this.initIdeogram.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(Ideogram, [{\n    key: \"onHomologyHandler\",\n    value: function onHomologyHandler() {\n      /**\n       * An event handler used to compare two chromosomes,\n       * where the user can specify the connection\n       * between two points of two chromosomes. The user\n       * can supply the homology locations using the\n       * 'homology' prop.\n       */\n      var chrs = this.ideogram.chromosomes;\n      var chrOne = null;\n      var chrTwo = null;\n      var organism = this.props.organism;\n      var chromosomes = this.props.chromosomes;\n      var homology = this.props.homology;\n\n      if (typeof this.props.organism !== 'string') {\n        chrOne = chrs[homology.chrOne.organism][chromosomes[organism[0]]];\n        chrTwo = chrs[homology.chrTwo.organism][chromosomes[organism[1]]];\n      } else {\n        chrOne = chrs[homology.chrOne.organism][chromosomes[0]];\n        chrTwo = chrs[homology.chrTwo.organism][chromosomes[1]];\n      }\n\n      var par1X = {\n        chr: chrOne,\n        start: homology.chrOne.start[0],\n        stop: homology.chrOne.stop[0]\n      };\n      var par1Y = {\n        chr: chrTwo,\n        start: homology.chrTwo.start[0],\n        stop: homology.chrTwo.stop[0]\n      };\n      var par2X = {\n        chr: chrOne,\n        start: homology.chrOne.start[1],\n        stop: homology.chrOne.stop[1]\n      };\n      var par2Y = {\n        chr: chrTwo,\n        start: homology.chrTwo.start[1],\n        stop: homology.chrTwo.stop[1]\n      };\n      var regions = [{\n        r1: par1X,\n        r2: par1Y\n      }, {\n        r1: par2X,\n        r2: par2Y\n      }];\n      this.ideogram.drawSynteny(regions);\n    }\n  }, {\n    key: \"onToolTipHandler\",\n    value: function onToolTipHandler() {\n      /**\n       * An event handler that is called by onMouseHover handler, which\n       * returns the annotation the mouse hovered over with the prop\n       * 'annotationsData'.\n       */\n      this.tooltipDataTwo = this.tooltipData;\n\n      if (this.props.setProps) {\n        this.props.setProps({\n          annotationsData: this.tooltipData\n        });\n      }\n    }\n  }, {\n    key: \"onBrushHandler\",\n    value: function onBrushHandler() {\n      /**\n       * An event handler that is called when an Ideogram\n       * is using the brush prop. This event handler\n       * returns brush data in to the Dash application\n       * with the prop 'brushData'.\n       */\n      var r = this.ideogram.selectedRegion,\n          start = r.from.toLocaleString(),\n          end = r.to.toLocaleString(),\n          extent = r.extent.toLocaleString();\n\n      if (typeof this.props.brush !== 'undefined' && typeof this.props.setProps !== 'undefined') {\n        this.props.setProps({\n          brushData: {\n            start: start,\n            end: end,\n            extent: extent\n          }\n        });\n      }\n    }\n  }, {\n    key: \"onLoadHandler\",\n    value: function onLoadHandler() {\n      /**\n       *  An event handler that will load a function depending on\n       * whether the brush prop is activated, or the homology prop\n       * is activated. This prop is activated on the loading of the\n       * Ideogram.\n       */\n      if (typeof this.props.brush !== 'undefined') {\n        this.onBrushHandler();\n      } else if (typeof this.props.homology !== 'undefined') {\n        this.onHomologyHandler();\n      }\n\n      return null;\n    }\n  }, {\n    key: \"onRotateHandler\",\n    value: function onRotateHandler() {\n      /**\n       * An event handler that returns 'true' or 'false' if the\n       * ideogram is rotated. The user can use the prop 'rotated'\n       * in their Dash application to see this effect.\n       */\n      this.isRotated = this.isRotated ? false : true;\n\n      if (this.props.setProps) {\n        this.props.setProps({\n          rotated: this.isRotated\n        });\n      }\n    }\n  }, {\n    key: \"onMouseOverHandler\",\n    value: function onMouseOverHandler() {\n      /**\n       * Event handler that activates when you hover the mouse over an annotation.\n       * This event handler allows the user to add an prop `onMouseOver` into their\n       * Dash application, that will return the annotation that the mouse hovers over.\n       */\n      if (this.props.setProps) {\n        this.tooltipData = document.getElementById('_ideogramTooltip').innerHTML;\n        this.tooltipDataTwo = this.tooltipData !== this.tooltipDataTwo ? this.onToolTipHandler() : document.getElementById('_ideogramTooltip').innerHTML;\n      }\n    }\n  }, {\n    key: \"setConfig\",\n    value: function setConfig() {\n      // Pass in all props into config except setProps\n      var config = Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(['setProps'], this.props); // Event handlers\n\n      config.onDidRotate = this.onRotateHandler;\n      config.onBrushMove = this.props.brush ? this.onBrushHandler : null;\n      config.onLoad = this.onLoadHandler;\n      config.container = '#ideogram-container-' + this.props.id;\n      return config;\n    }\n  }, {\n    key: \"initIdeogram\",\n    value: function initIdeogram() {\n      // Used to pass in a local dataset\n      if (this.props.localOrganism) {\n        this.props.dataDir = null;\n        window.chrBands = this.props.localOrganism;\n      }\n\n      this.ideogram = new ideogram__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.setConfig());\n    }\n  }, {\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps) {\n      var _this2 = this;\n\n      return this.propKeys.some(function (currentKey) {\n        return _this2.props[currentKey] !== nextProps[currentKey];\n      });\n    }\n  }, {\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.initIdeogram();\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      // Have to remove old data, because it breaks new instances\n      delete window.chrBands;\n      this.initIdeogram();\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      delete window.chrBands;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: this.props.id,\n        className: this.props.className,\n        style: this.props.style\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", _extends({}, Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(['setProps'], this.props), {\n        id: 'ideogram-container-' + this.props.id,\n        onMouseOver: this.onMouseOverHandler\n      })));\n    }\n  }]);\n\n  return Ideogram;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nIdeogram.defaultProps = {\n  organism: 'human',\n  dataDir: 'https://unpkg.com/ideogram@1.5.0/dist/data/bands/native/',\n  annotationsColor: '#F00',\n  annotationsLayout: 'tracks',\n  barWidth: 3,\n  chrHeight: 400,\n  chrMargin: 10,\n  chrWidth: 10,\n  ploidy: 1,\n  rotatable: true,\n  showBandLabels: false,\n  showChromosomeLabels: true,\n  showAnnotTooltip: true,\n  showFullyBanded: true,\n  showNonNuclearChromosomes: false\n};\nIdeogram.propTypes = {\n  /**\n   * The ID used to identify this component in Dash callbacks and used to identify Ideogram\n   * instances.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n\n  /**\n   * The component's inline styles\n   */\n  style: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n\n  /**\n   * Dash specific prop type connecting event handlers to front end.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n  /**\n   * The CSS class of the component wrapper\n   */\n  className: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * Layout of ideogram annotations.\n   * One of \"tracks\", \"histogram\", or \"overlay\".\n   *\n   * \"tracks\": display annotations in tracks beside each chromosome.\n   *\n   * \"histogram\": display annotations in a histogram. Clusters annotations by location. Each\n   * cluster/bin is shown as a bar, the height of which represents the number of annotations on\n   * genomic range.\n   *\n   * \"overlay\": display annotations directly over chromosomes.\n   */\n  annotationsLayout: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['tracks', 'histogram', 'overlay']),\n\n  /**\n   * A list of annotation objects. Annotation objects can also have a name, color, shape, and\n   * track index. At the moment there is more keys specified and the docs need updating.\n   */\n  annotations: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n    name: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n    chr: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n    start: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n    stop: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number\n  })),\n\n  /**\n   * An absolute or relative URL directing to a JSON file containing annotation objects (JSON).\n   */\n  annotationsPath: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * Use this prop in a dash callback to return annotationData when hovered.\n   * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n   * dash.dependencies.Input\n   */\n  annotationsData: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * A list of objects with metadata for each track, e.g., id, display name, color, shape.\n   */\n  annotationTracks: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object),\n\n  /**\n   * Not used if annotationsLayout is set to \"overlay\".\n   * The height of histogram bars or the size of annotations tracks symbols\n   */\n  annotationHeight: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * Color of annotations.\n   */\n  annotationsColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * Scaling of histogram bars height\n   * Only used if annotationsLayout is set to \"histogram\".\n   * One of \"absolute\" or \"relative\".\n   *\n   * \"absolute\": sets bar height relative to tallest bar in all chromosomes.\n   * \"relative\": sets bar height relative to tallest bar in each chromosome.\n   */\n  histogramScaling: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['absolute', 'relative']),\n\n  /**\n   * Pixel width of histogram bars.\n   * Only used if annotationsLayout is set to \"histogram\".\n   **/\n  barWidth: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * Whether to show a tooltip upon mousing over an annotation.\n   */\n  showAnnotTooltip: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Default: latest RefSeq assembly for specified organism.\n   * The genome assembly to display.\n   * Takes assembly name (e.g., \"GRCh37\"),\n   * RefSeq accession (e.g., \"GCF_000306695.2\"),\n   * or GenBank accession (e.g., \"GCA_000005005.5\")\n   */\n  assembly: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * Genomic coordinate range (e.g., \"chr1:104325484-119977655\") for a brush on a\n   * chromosome. Useful when ideogram consists of one chromosome and you want to be\n   * able to focus on a region within that chromosome,\n   * and create an interactive sliding window to other regions\n   */\n  brush: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * A dash callback that is activated when the 'brush' prop is used in component.\n   * It will return an dictionary like so:\n   *\n   * {'start': <value>, 'end': <value>, 'extent': <value>}\n   *\n   * where start is the left most edge, end is right most edge, and extent is the total width of\n   * the brush.\n   * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n   * dash.dependencies.Input\n   */\n  brushData: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n    start: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n    end: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n    extent: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string\n  }),\n\n  /**\n   * CSS styling and the id of the container holding the Ideogram in\n   * react-ideogram.js, this is where all the d3 magic happens.\n   */\n  container: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * The pixel height of the tallest chromosome in the ideogram\n   */\n  chrHeight: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * The pixel space of margin between each chromosome.\n   */\n  chrMargin: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * The pixel width of each chromosome.\n   */\n  chrWidth: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * A list of the names of chromosomes to display. Useful for depicting a subset of the\n   * chromosomes in the genome, e.g., a single chromosome.\n   *\n   * If Homology (between two different species):\n   * Ex: chromosomes={\n   *       'human': ['1'],\n   *       'mouse': ['4']\n   * }\n   *\n   * General case to specify specific chromosomes:\n   * Ex: chromosomes=['1', '2']\n   */\n  chromosomes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string), prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object]),\n\n  /**\n   * Absolute or relative URL of the directory containing data needed to draw banded chromosomes.\n   * You will need to set up your own database to grab data from a custom database.\n   */\n  dataDir: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n\n  /**\n   * Organism(s) to show chromosomes for. Supply organism's name as a string (e.g., \"human\") or\n   * organism's NCBI Taxonomy ID (taxid, e.g., 9606) to display chromosomes from a single\n   * organism, or an array of organisms' names or taxids to display chromosomes from multiple\n   * species.\n   */\n  organism: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number]),\n\n  /**\n   * Provide local JSON organism into this prop from a local user JSON file.\n   * DataDir must not be initialized.\n   */\n  localOrganism: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n\n  /**\n   * Used to compare two chromosomes with each other.\n   * The keys \"chrOne\" and \"chrTwo\" represent one chromosome each. Organism is the taxID or name.\n   * Start is an array, containing start one and start two, in this order. Stop is an array,\n   * containing stop one, and stop two, in this order.\n   * Ex: homology={\n   *     \"chrOne\": {\n   *         organism\": \"9606\",\n   *         \"start\": [50000, 155701383],\n   *         \"stop\": [900000, 156030895]\n   *     },\n   *     \"chrTwo\": {\n   *         organism\": \"10090\",\n   *         \"start\": [10001, 50000000],\n   *         \"stop\": [2781479, 57217415]\n   *     }\n   * }\n   */\n  homology: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n    chrOne: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n      organism: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n      start: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number.isRequired),\n      stop: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number.isRequired)\n    }),\n    chrTwo: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n      organism: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n      start: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number.isRequired),\n      stop: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number.isRequired)\n    })\n  }),\n\n  /**\n   * Use perspective: 'comparative' to enable annotations between two chromosomes,\n   * either within the same organism or different organisms. Used for homology.\n   */\n  perspective: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['comparative']),\n\n  /**\n   * Whether to include abbreviation species name in chromosome label. Used for homology.\n   */\n  fullChromosomeLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * The resolution of cytogenetic bands to show for each chromosome.\n   * The quantity refers to an approximate value in bands per haploid set (bphs).\n   * One of 450, 550, or 850.\n   */\n  resolution: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * Whether annotations should be filterable or not.\n   */\n  filterable: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * The orientation of chromosomes on the page.\n   */\n  orientation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['vertical', 'horizontal']),\n\n  /**\n   * The ploidy - number of chromosomes to depict for each chromosome set.\n   */\n  ploidy: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n\n  /**\n   * Description of ploidy in each chromosome set in terms of ancestry composition.\n   */\n  ploidyDesc: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object),\n\n  /**\n   * A map associating ancestor labels to colors. Used to color\n   * chromosomes from different ancestors in polyploid genomes.\n   */\n  ancestors: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n\n  /**\n   * List of objects describing segments of recombination among chromosomes in a chromosome set.\n   */\n  rangeSet: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object),\n\n  /**\n   * Whether chromosomes are rotatable on click.\n   */\n  rotatable: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Dash callback that returns true if rotated, and false if not.\n   *\n   */\n  rotated: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Useful for omitting chromosome Y in female animals.\n   * Currently only supported for organisms that use XY sex-determination.\n   */\n  sex: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['male', 'female']),\n\n  /**\n   * Whether to show chromosome labels, e.g., 1, 2, 3, X, Y.\n   */\n  showChromosomeLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Whether to show cytogenetic band labels, e.g., 1q21\n   **/\n  showBandLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Whether to show fully banded chromosomes for genomes that have sufficient data. Useful for\n   * showing simpler chromosomes of cytogenetically well-characterized organisms, e.g., human,\n   * beside chromosomes of less studied organisms, e.g., chimpanzee.\n   */\n  showFullyBanded: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n  /**\n   * Whether to show non-nuclear chromosomes,\n   * e.g., for mitochondrial (MT) and chloroplast (CP) DNA.\n   */\n  showNonNuclearChromosomes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool\n  /**\n   * Callback function to invoke after chromosome has rotated. (React)\n   * onDidRotate: PropTypes.func,\n   */\n\n  /**\n   * Dash event callback for hovering over data.\n   * onMouseOver: PropTypes.func,\n   */\n\n  /**\n   * Callback function to invoke when brush moves.\n   * onBrushMove: PropTypes.func,\n   */\n\n  /**\n   * Callback function to invoke when annotations are drawn. (React)\n   * onDrawAnnots: PropTypes.func,\n   */\n\n  /**\n   * Callback function to invoke when chromosomes are loaded,\n   * i.e., rendered on the page. (React)\n   * onLoad: PropTypes.func,\n   */\n\n  /**\n   * Useful for putting ideogram into a small container,\n   * or when dealing with genomes that have many chromosomes.\n   * Note: Not fully working, needs to be fixed by developer.\n   * rows: PropTypes.number,\n   */\n\n  /**\n   * This is a work in progess and will hopefully be fixed in future releases.\n   * https://eweitz.github.io/ideogram/annotations-heatmap\n   * heatmaps: PropTypes.arrayOf(PropTypes.object),\n   */\n\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/Ideogram.react.js?");

/***/ }),

/***/ "./src/lib/components/Molecule2dViewer.react.js":
/*!******************************************************!*\
  !*** ./src/lib/components/Molecule2dViewer.react.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Molecule2dViewer; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var molecule_2d_for_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! molecule-2d-for-react */ \"./node_modules/molecule-2d-for-react/dist/bundle.js\");\n/* harmony import */ var molecule_2d_for_react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(molecule_2d_for_react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * The Molecule2dViewer component is used to render structural\n * formulae of molecules.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-2d-for-react\n */\n\nvar Molecule2dViewer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Molecule2dViewer, _Component);\n\n  function Molecule2dViewer(props) {\n    var _this;\n\n    _classCallCheck(this, Molecule2dViewer);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Molecule2dViewer).call(this, props));\n    _this.onChangeSelection = _this.onChangeSelection.bind(_assertThisInitialized(_this));\n    _this.key = 0;\n    return _this;\n  }\n\n  _createClass(Molecule2dViewer, [{\n    key: \"onChangeSelection\",\n    value: function onChangeSelection(selectedAtomIds) {\n      this.props.setProps({\n        selectedAtomIds: selectedAtomIds\n      });\n    }\n  }, {\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps) {\n      if (this.props.modelData !== nextProps.modelData) {\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps) {\n      var modelData = this.props.modelData;\n\n      if (Object.keys(modelData).some(function (propertyName) {\n        return modelData[propertyName].length !== prevProps.modelData[propertyName].length;\n      })) {\n        this.forceUpdate();\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      this.key++; // increment key to force remount\n\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: this.props.id\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(molecule_2d_for_react__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({\n        key: this.key,\n        onChangeSelection: this.onChangeSelection\n      }, Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(['id', 'setProps'], this.props))));\n    }\n  }]);\n\n  return Molecule2dViewer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nMolecule2dViewer.defaultProps = {\n  width: 500,\n  height: 500,\n  modelData: {\n    nodes: [],\n    links: []\n  }\n};\nMolecule2dViewer.propTypes = {\n  /**\n   * The ID used to identify this component in callbacks.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Dash-assigned callback that should be called whenever properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * The selected atom IDs.\n   */\n  selectedAtomIds: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number),\n\n  /**\n   * The width of the SVG element.\n   */\n  width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * The height of the SVG element.\n   */\n  height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Description of the molecule to display.\n   */\n  modelData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    nodes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      atom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string\n    })),\n    links: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      source: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      target: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      bond: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      strength: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      distance: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number\n    }))\n  })\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/Molecule2dViewer.react.js?");

/***/ }),

/***/ "./src/lib/components/Molecule3dViewer.js":
/*!************************************************!*\
  !*** ./src/lib/components/Molecule3dViewer.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Molecule3dViewer; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var molecule_3d_for_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! molecule-3d-for-react */ \"./node_modules/molecule-3d-for-react/dist/bundle.js\");\n/* harmony import */ var molecule_3d_for_react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(molecule_3d_for_react__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n/**\n * The Molecule3dViewer component is used to render schematic diagrams\n * of biomolecules. It can display ribbon-structure diagrams, or\n * render atoms in the molecule as sticks or spheres.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-3d-for-react\n */\n\nvar Molecule3dViewer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Molecule3dViewer, _Component);\n\n  function Molecule3dViewer(props) {\n    var _this;\n\n    _classCallCheck(this, Molecule3dViewer);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Molecule3dViewer).call(this, props));\n    _this.onChangeSelection = _this.onChangeSelection.bind(_assertThisInitialized(_this));\n    _this.onRenderNewData = _this.onRenderNewData.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(Molecule3dViewer, [{\n    key: \"onChangeSelection\",\n    value: function onChangeSelection(selectedAtomIds) {\n      this.props.setProps({\n        selectedAtomIds: selectedAtomIds\n      });\n    }\n  }, {\n    key: \"onRenderNewData\",\n    value: function onRenderNewData(glviewer) {\n      glviewer.center();\n      var zoomRatio = 0.8;\n      glviewer.zoom(zoomRatio);\n    }\n  }, {\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps) {\n      if (this.props.modelData !== nextProps.modelData || this.props.backgroundColor !== nextProps.backgroundColor || this.props.backgroundOpacity !== nextProps.backgroundOpacity || this.props.styles !== nextProps.styles) {\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          id = _this$props.id,\n          selectionType = _this$props.selectionType; // molecule-3d-for-react requires the selection type to be\n      // capitalized, but Dash typically uses all-lowercase prop values\n\n      var capitalizedSelectionType = selectionType === null ? null : selectionType.charAt(0).toUpperCase() + selectionType.slice(1);\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(molecule_3d_for_react__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({}, this.props, {\n        selectionType: capitalizedSelectionType,\n        onChangeSelection: this.onChangeSelection,\n        onRenderNewData: this.onRenderNewData\n      })));\n    }\n  }]);\n\n  return Molecule3dViewer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nMolecule3dViewer.defaultProps = {\n  selectionType: 'atom',\n  backgroundColor: '#FFFFFF',\n  backgroundOpacity: 0\n};\nMolecule3dViewer.propTypes = {\n  /**\n   * The ID used to identify this component in callbacks\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Dash-assigned callback that should be called whenever properties change\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * The selection type - may be atom, residue or chain\n   */\n  selectionType: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['atom', 'residue', 'chain']),\n\n  /**\n   * Property to change the background color of the molecule viewer\n   */\n  backgroundColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Property to change the backgroun opacity - ranges from 0 to 1\n   */\n  backgroundOpacity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Property that can be used to change the representation of\n   * the molecule. Options include sticks, cartoon and sphere\n   */\n  styles: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    visualization_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['cartoon', 'sphere', 'stick'])\n  })),\n\n  /**\n   * The data that will be used to display the molecule in 3D\n   * The data will be in JSON format\n   * and should have two main dictionaries - atoms, bonds\n   */\n  modelData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    atoms: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n    bonds: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array\n  }),\n\n  /**\n   * Property to either show or hide labels\n   */\n  atomLabelsShown: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Property that stores a list of all selected atoms\n   */\n  selectedAtomIds: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n\n  /**\n   * labels corresponding to the atoms of the molecule\n   */\n  labels: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n\n  /**\n   * Callback to re-render molecule viewer\n   * when modelData is changed\n   */\n  onRenderNewData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * Callback to change append selectedAtomIds\n   * when a selection is made\n   */\n  onChangeSelection: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/Molecule3dViewer.js?");

/***/ }),

/***/ "./src/lib/components/NeedlePlot.react.js":
/*!************************************************!*\
  !*** ./src/lib/components/NeedlePlot.react.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return NeedlePlot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_plotly_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-plotly.js */ \"./node_modules/react-plotly.js/react-plotly.js\");\n/* harmony import */ var react_plotly_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_plotly_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * Checks if a variable is representation of a number or not\n * https://stackoverflow.com/questions/9716468/pure-javascript-a-function-like-jquerys-isnumeric\n * @param  {String/FLoat} n  A variable to test.\n * @return {Bool}            True if n is a number, false otherwise.\n */\n\nfunction isNumeric(n) {\n  return !isNaN(parseFloat(n)) && isFinite(n);\n}\n/**\n * Converts an array elements to numbers and ignore the elements which are not\n * a representation of  numbers\n * @param  {Array} test_array An array\n * @return {Array}       An array with only numbers.\n */\n\n\nfunction filterNanArray(test_array) {\n  return test_array.filter(function (el) {\n    return Number(isNumeric(el));\n  });\n}\n/**\n * Search the protein position array for small protein domains (typically 1->5 sites)\n * and bogus entries (i.e. \"?-123\" or \"320-?\"), the protein domains are indicated\n * by the presence of a '-' character in the element of the array.\n * @param  {Array} protein_pos_array        An array containing protein domains\n * @return {Array} positions_array          An array with only single site\n\t\t\t\t\t    protein mutations.\n * @return {Array} domains_array            An array with only small domains\n\t\t\t\t\t    protein mutations.\n * @return {Array} idx_old_positions_array  An array with the indexes of the\n\t\t\t\t\t    single site protein mutations\n\t\t\t\t\t    relative to protein_pos_array\n * @return {Array} idx_bogus_entry          An array with the indexes of the\n\t\t\t\t\t    bogus entries (containing '?')\n\t\t\t\t\t    relative to protein_pos_array\n*/\n\n\nfunction extractSmallDomains(protein_pos_array) {\n  var positions_array = [];\n  var domains_array = [];\n  var idx_old_positions_array = [];\n  var idx_bogus_entry = [];\n  protein_pos_array.forEach(function (dx, i) {\n    if (dx.indexOf('-') > -1) {\n      var domains_limits = dx.split('-');\n\n      if (isNumeric(domains_limits[0]) || isNumeric(domains_limits[1])) {\n        idx_bogus_entry.push(i);\n      } else {\n        domains_array.push(dx);\n      }\n    } else {\n      idx_old_positions_array.push(i);\n      positions_array.push(dx);\n    }\n  });\n  return [positions_array, domains_array, idx_old_positions_array, idx_bogus_entry];\n}\n/**\n * Creates two arrays to plot horizontal lines with many markers\n *\n * @param  {number} xi  start x coordinate of the line\n * @param  {number} xf  stop x coordinate of the line\n * @param  {number} y   y coordinate of the line\n * @param  {int} n      number of markers\n * @return {array} x    x coordinates of the horizontal ine\n * @return {array} y    y coordinates of the horizontal ine\n */\n\n\nfunction createHorizontalLine(xi, xf, y, n) {\n  var dx = (xf - xi) / n;\n  var N = Math.max(2, n);\n  var x = Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(0, N).map(function (i) {\n    return xi + i * dx;\n  });\n  return [x, Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"repeat\"])(y, N)];\n}\n/**\n * Finds the max of an array while ignoring the NaN values\n *\n * @param  {array} test_array  an array with numbers as entries\n * @return {number}            max value of the array\n */\n\n\nfunction nanMax(test_array) {\n  return Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"reduce\"])(ramda__WEBPACK_IMPORTED_MODULE_3__[\"max\"], -Infinity, filterNanArray(test_array));\n}\n/**\n * The Needle Plot component is used to visualize large datasets\n * containing categorical or numerical data. The lines and markers in\n * the plot correspond to bars in a histogram.\n **/\n\n\nvar NeedlePlot =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(NeedlePlot, _Component);\n\n  function NeedlePlot() {\n    var _this;\n\n    _classCallCheck(this, NeedlePlot);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(NeedlePlot).call(this));\n    _this.state = {\n      xStart: null,\n      xEnd: null\n    };\n    _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(NeedlePlot, [{\n    key: \"componentWillMount\",\n    value: function componentWillMount() {\n      // For default argument of taken from defaultProps deeply nested\n      this.props = Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"mergeDeepRight\"])(NeedlePlot.defaultProps, this.props);\n    } // Handle plot events\n\n  }, {\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      // Zoom\n      if (event['xaxis.range[0]'] || event['xaxis.range']) {\n        this.setState({\n          xStart: event['xaxis.range[0]'] || event['xaxis.range'][0],\n          xEnd: event['xaxis.range[1]'] || event['xaxis.range'][1]\n        });\n      } // Autozoom\n      else if (event['xaxis.autorange'] === true) {\n          this.setState({\n            xStart: null,\n            xEnd: null\n          });\n        }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var id = this.props.id;\n\n      var _this$prepareTraces = this.prepareTraces(),\n          data = _this$prepareTraces.data,\n          globalAnnotation = _this$prepareTraces.globalAnnotation,\n          domainAnnotations = _this$prepareTraces.domainAnnotations;\n\n      var layout = this.prepareLayout({\n        data: data,\n        globalAnnotation: globalAnnotation,\n        domainAnnotations: domainAnnotations\n      });\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_plotly_js__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({\n        data: data,\n        layout: layout,\n        onRelayout: this.handleChange\n      }, Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(['setProps'], this.props))));\n    } // Fetch data\n\n  }, {\n    key: \"prepareTraces\",\n    value: function prepareTraces() {\n      var _mergeDeepRight = Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"mergeDeepRight\"])(NeedlePlot.defaultProps, this.props),\n          _mergeDeepRight$mutat = _mergeDeepRight.mutationData,\n          x = _mergeDeepRight$mutat.x,\n          y = _mergeDeepRight$mutat.y,\n          mutationGroups = _mergeDeepRight$mutat.mutationGroups,\n          domains = _mergeDeepRight$mutat.domains,\n          _mergeDeepRight$domai = _mergeDeepRight.domainStyle,\n          domainColor = _mergeDeepRight$domai.domainColor,\n          displayMinorDomains = _mergeDeepRight$domai.displayMinorDomains,\n          _mergeDeepRight$needl = _mergeDeepRight.needleStyle,\n          stemColor = _mergeDeepRight$needl.stemColor,\n          stemThickness = _mergeDeepRight$needl.stemThickness,\n          stemConstHeight = _mergeDeepRight$needl.stemConstHeight,\n          headSize = _mergeDeepRight$needl.headSize,\n          headColor = _mergeDeepRight$needl.headColor,\n          headSymbol = _mergeDeepRight$needl.headSymbol; // Apply filtering on protein positions\n\n\n      var _extractSmallDomains = extractSmallDomains(x),\n          _extractSmallDomains2 = _slicedToArray(_extractSmallDomains, 3),\n          x_single_site = _extractSmallDomains2[0],\n          small_domains = _extractSmallDomains2[1],\n          idx_old_positions_array = _extractSmallDomains2[2]; // manage whether headColor is an array or a string\n\n\n      var fixed_mutation_colors = Array.isArray(headColor) ? headColor : mutationGroups.map(function () {\n        return headColor;\n      });\n      var fixed_mutation_symbols = Array.isArray(headSymbol) ? headSymbol : mutationGroups.map(function () {\n        return headSymbol;\n      });\n      var fixed_domain_colors = domainColor;\n      var X_DATA_MIN = Math.min.apply(null, x_single_site);\n      var X_DATA_MAX = Math.max.apply(null, x_single_site);\n      var Y_DATA_MAX = stemConstHeight === true ? 1 : nanMax(y);\n      var X_RANGE_MIN = this.state.xStart || X_DATA_MIN;\n      var X_RANGE_MAX = this.state.xEnd || X_DATA_MAX;\n      var XSPAN = X_RANGE_MAX - X_RANGE_MIN; // this is used to trigger a change of display inside annotations\n\n      var XSPAN_RATIO = 0.2;\n      var Y_BUFFER = stemConstHeight === true ? 0.5 : Y_DATA_MAX / 10; // this is used to scale the position for the annotations\n\n      var Y_BUFFER_DIVIDER = 2;\n      var Y_TOP = stemConstHeight === true ? 2 : Y_DATA_MAX + Y_BUFFER;\n      var DOMAIN_WIDTH = 33;\n      var sequenceDomains = [];\n      var domainAnnotations = [];\n      var hoverlabels = []; // contains the height of each stem\n\n      var stemsY = [];\n      idx_old_positions_array.forEach(function (idx) {\n        if (stemConstHeight) {\n          stemsY = stemsY.concat([1]);\n        } else {\n          hoverlabels = hoverlabels.concat(['(' + x[idx] + ',' + y[idx] + ')']);\n          stemsY = stemsY.concat([y[idx]]);\n        }\n      });\n      var hoverinfo = stemConstHeight === true ? 'x+name+text' : 'name+text'; // build the different protein large domains\n\n      domains.forEach(function (dom, i) {\n        var domainLimits = dom.coord.split('-');\n        var x0 = Number(domainLimits[0]);\n        var x1 = Number(domainLimits[1]);\n        var domainLength = x1 - x0; // Highlight of the protein domain\n\n        sequenceDomains.push({\n          x: [x1, x0],\n          y: [Y_TOP, Y_TOP],\n          xaxis: 'x1',\n          name: dom.name,\n          fill: 'tozeroy',\n          mode: 'lines',\n          opacity: 0.5,\n          visible: 'legendonly',\n          legendgroup: dom.name,\n          marker: {\n            color: fixed_domain_colors[i]\n          }\n        });\n\n        var _createHorizontalLine = createHorizontalLine(x0, x1, -Y_BUFFER, x1 - x0),\n            _createHorizontalLine2 = _slicedToArray(_createHorizontalLine, 2),\n            line_x = _createHorizontalLine2[0],\n            line_y = _createHorizontalLine2[1];\n\n        sequenceDomains.push({\n          type: 'scatter',\n          mode: 'lines',\n          fill: 'tozeroy',\n          fillcolor: fixed_domain_colors[i],\n          hoveron: 'points+fills',\n          x: line_x,\n          y: line_y,\n          xaxis: 'x2',\n          showlegend: false,\n          hoverinfo: 'name',\n          name: \"[\".concat(x0, \"->\").concat(x1, \"] \").concat(dom.name),\n          marker: {\n            color: fixed_domain_colors[i]\n          },\n          line: {\n            width: 2\n          }\n        }); // Name of the protein domain\n\n        domainAnnotations.push({\n          x: (x0 + x1) / Y_BUFFER_DIVIDER,\n          y: -Y_BUFFER / Y_BUFFER_DIVIDER,\n          showarrow: false,\n          text: dom.name,\n          width: domainLength,\n          align: domainLength < XSPAN_RATIO * XSPAN ? 'right' : 'center'\n        });\n      });\n\n      if (displayMinorDomains === true) {\n        // build the different protein small domains\n        small_domains.forEach(function (dom) {\n          var x0 = Number(dom.split('-')[0]);\n          var x1 = Number(dom.split('-')[1]);\n          var gname = mutationGroups[x.indexOf(dom)];\n\n          var _createHorizontalLine3 = createHorizontalLine(x0, x1, -Y_BUFFER / Y_BUFFER_DIVIDER, x1 - x0),\n              _createHorizontalLine4 = _slicedToArray(_createHorizontalLine3, 2),\n              line_x = _createHorizontalLine4[0],\n              line_y = _createHorizontalLine4[1]; // Range of the protein domain on the xaxis\n\n\n          sequenceDomains.push({\n            type: 'scatter',\n            mode: 'lines',\n            x: line_x,\n            y: line_y,\n            fill: 'tozeroy',\n            fillcolor: fixed_mutation_colors[_toConsumableArray(new Set(mutationGroups)).indexOf(gname)],\n            hoveron: 'points+fills',\n            xaxis: 'x2',\n            hoverinfo: 'name+text',\n            name: gname,\n            text: \"[\".concat(x0, \"->\").concat(x1, \"] \"),\n            showlegend: false,\n            marker: {\n              color: fixed_mutation_colors[_toConsumableArray(new Set(mutationGroups)).indexOf(gname)]\n            },\n            line: {\n              width: DOMAIN_WIDTH\n            }\n          });\n        });\n      }\n\n      var globalAnnotation = [{\n        text: \"<b>\".concat(x_single_site.length + small_domains.length, \" Mutations</b>\"),\n        x: 0.01,\n        xref: 'paper',\n        y: 1.1,\n        yref: 'paper',\n        showarrow: false,\n        align: 'left'\n      }];\n      var data = [{\n        type: 'scatter',\n        mode: 'markers',\n        x: x_single_site,\n        y: stemsY,\n        xaxis: 'x1',\n        hoverinfo: hoverinfo,\n        text: hoverlabels,\n        error_y: {\n          type: 'data',\n          symmetric: false,\n          array: 0,\n          arrayminus: stemsY,\n          thickness: stemThickness,\n          width: 0,\n          color: stemColor\n        },\n        transforms: [{\n          type: 'groupby',\n          groups: mutationGroups,\n          nameformat: \"%{group}\",\n          styles: _toConsumableArray(new Set(mutationGroups)).map(function (target, i) {\n            return {\n              target: target,\n              value: {\n                marker: {\n                  size: headSize,\n                  symbol: fixed_mutation_symbols[i],\n                  color: fixed_mutation_colors[i]\n                }\n              }\n            };\n          })\n        }]\n      }].concat(sequenceDomains);\n      return {\n        data: data,\n        globalAnnotation: globalAnnotation,\n        domainAnnotations: domainAnnotations\n      };\n    } // Fetch layout\n\n  }, {\n    key: \"prepareLayout\",\n    value: function prepareLayout(vars) {\n      var data = vars.data,\n          globalAnnotation = vars.globalAnnotation,\n          domainAnnotations = vars.domainAnnotations;\n\n      var _mergeDeepRight2 = Object(ramda__WEBPACK_IMPORTED_MODULE_3__[\"mergeDeepRight\"])(NeedlePlot.defaultProps, this.props),\n          xlabel = _mergeDeepRight2.xlabel,\n          ylabel = _mergeDeepRight2.ylabel,\n          rangeSlider = _mergeDeepRight2.rangeSlider;\n\n      var _this$state = this.state,\n          xStart = _this$state.xStart,\n          xEnd = _this$state.xEnd;\n      var first_init = false; // initialize the range based on input data\n\n      if (Boolean(!xStart) || Boolean(!xEnd)) {\n        first_init = true;\n        data.forEach(function (trace) {\n          var X_DATA_MIN = Math.min.apply(null, trace.x);\n          var X_DATA_MAX = Math.max.apply(null, trace.x);\n\n          if (xStart > X_DATA_MIN || Boolean(!xStart)) {\n            xStart = X_DATA_MIN;\n          }\n\n          if (xEnd < X_DATA_MAX || Boolean(!xEnd)) {\n            xEnd = X_DATA_MAX;\n          }\n        });\n      } // this is used to zoom in the axis range initially\n\n\n      var XSTART_RATIO = 0.98;\n      var XEND_RATIO = 1.02;\n      var layout = {\n        legend: {\n          orientation: 'v',\n          x: 1,\n          y: 1.05,\n          bgcolor: 'rgba(255, 255, 255, 0)'\n        },\n        hovermode: 'closest',\n        xaxis: {\n          title: xlabel,\n          showgrid: false,\n          zeroline: false,\n          autorange: Boolean(!xStart),\n          range: [xStart, xEnd],\n          anchor: 'y'\n        },\n        xaxis2: {\n          scaleanchor: 'x',\n          autorange: Boolean(!xStart),\n          range: [xStart, xEnd],\n          anchor: 'y',\n          overlaying: 'x'\n        },\n        yaxis: {\n          title: ylabel,\n          showgrid: false,\n          ticks: 'inside'\n        },\n        margin: {\n          t: 100,\n          l: 40,\n          r: 0,\n          b: 40\n        },\n        annotations: domainAnnotations.concat(globalAnnotation)\n      };\n\n      if (rangeSlider === true) {\n        layout.xaxis.rangeslider = first_init === true ? {\n          range: [xStart * XSTART_RATIO, xEnd * XEND_RATIO]\n        } : {};\n      }\n\n      return layout;\n    }\n  }]);\n\n  return NeedlePlot;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nNeedlePlot.propTypes = {\n  /**\n   * The ID of this component, used to identify dash components\n   * in callbacks. The ID needs to be unique across all of the\n   * components in an app.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The data that are displayed on the plot\n   */\n  mutationData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    /*\n    coordinate of mutations on the protein sequence\n    */\n    x: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n    /* value (could be the sample count), this property is not necessarily\n    relevant, should match x in size\n    */\n    y: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array]),\n\n    /*\n    type of mutations, should match x in size\n    */\n    mutationGroups: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string),\n\n    /*\n    protein domains coordinates on the protein sequence\n    */\n    domains: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array\n  }),\n\n  /**\n   * Title of the x-axis.\n   **/\n  xlabel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Title of the y-axis.\n   **/\n  ylabel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * If true, enables a rangeslider for the x-axis.\n   **/\n  rangeSlider: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Options for the needle marking single site mutations\n   */\n  needleStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    // Color of the stems of the needles\n    stemColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    // Thickness of the stems of the needles\n    stemThickness: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    // Decides whether all stems have same height or not\n    stemConstHeight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n    // Size of the heads of the needlehead\n    headSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    // Color of the heads of the needlehead\n    headColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([\n    /* different color for different mutations, must be larger or\n    equal to the size of the mutationGroup prop\n    */\n    prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, // same color for all needles\n    prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n    // Style of the heads of the needlehead\n    headSymbol: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([\n    /* different marker for different mutations, must be larger or\n    equal to the size of the mutationGroup prop\n    */\n    prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, // same marker for all needles\n    prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string])\n  }),\n\n  /**\n   * Options for the protein domain coloring\n   */\n  domainStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    // Color of the protein domains\n    domainColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n\n    /*\n    the prop x sometimes contains smaller domains (e.g. multi-site\n    mutations), if true, they are displayed\n    */\n    displayMinorDomains: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool\n  }),\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func\n};\nNeedlePlot.defaultProps = {\n  mutationData: {\n    x: [],\n    y: [],\n    domains: [],\n    mutationGroups: []\n  },\n  rangeSlider: false,\n  needleStyle: {\n    stemColor: '#444',\n    stemThickness: 0.5,\n    stemConstHeight: false,\n    headSize: 5,\n    headColor: ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999', '#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999', '#e41a1c'],\n    headSymbol: 'circle'\n  },\n  domainStyle: {\n    displayMinorDomains: false,\n    domainColor: ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f', '#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69']\n  }\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/NeedlePlot.react.js?");

/***/ }),

/***/ "./src/lib/components/OncoPrint.react.js":
/*!***********************************************!*\
  !*** ./src/lib/components/OncoPrint.react.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return OncoPrint; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\n/* harmony import */ var react_oncoprint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-oncoprint */ \"./node_modules/react-oncoprint/lib/index.js\");\n/* harmony import */ var react_oncoprint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_oncoprint__WEBPACK_IMPORTED_MODULE_3__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n/**\n * The OncoPrint component is used to view multiple genetic alteration events\n * through an interactive and zoomable heatmap. It is a React/Dash port of the\n * popular oncoPrint() function from the BioConductor R package.\n * Under the hood, the rendering is done using Plotly.js built upon D3.\n * Plotly's interactivity allows the user to bind clicks and hovers to genetic\n * events, allowing the user to create complex bioinformatic apps or workflows\n * that rely on crossfiltering.\n * Read more about the component here:\n * https://github.com/plotly/react-oncoprint\n */\n\nvar OncoPrint =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(OncoPrint, _Component);\n\n  function OncoPrint(props) {\n    var _this;\n\n    _classCallCheck(this, OncoPrint);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(OncoPrint).call(this, props));\n    _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n    return _this;\n  } // Bind to Dash event handler that puts event back into props\n\n\n  _createClass(OncoPrint, [{\n    key: \"handleChange\",\n    value: function handleChange(event) {\n      var eventObj = JSON.stringify(event);\n      this.props.setProps({\n        eventDatum: eventObj\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n          id = _this$props.id,\n          eventDatum = _this$props.eventDatum;\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id,\n        eventDatum: eventDatum\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_oncoprint__WEBPACK_IMPORTED_MODULE_3__[\"OncoPrint\"], _extends({\n        onChange: this.handleChange\n      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"omit\"])(['setProps'], this.props))));\n    }\n  }]);\n\n  return OncoPrint;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nOncoPrint.propTypes = {\n  /**\n   * The ID of this component, used to identify dash components\n   * in callbacks. The ID needs to be unique to the component.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n  /**\n   * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n   */\n  eventDatum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n  /**\n   * Input data, in CBioPortal format where each list entry is a dict\n   * consisting of 'sample', 'gene', 'alteration', and 'type'\n   */\n  data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n  // TODO: Add remove empty columns prop\n\n  /**\n   * Adjusts the padding (as a proportion of whitespace) between two tracks.\n   * Value is a ratio between 0 and 1.\n   * Defaults to 0.05 (i.e., 5 percent). If set to 0, plot will look like a heatmap.\n   */\n  padding: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * If not null, will override the default OncoPrint colorscale.\n   * Default OncoPrint colorscale same as CBioPortal implementation.\n   * Make your own colrscale as a {'mutation': COLOR} dict.\n   * Supported mutation keys are ['MISSENSE, 'INFRAME', 'FUSION',\n   * 'AMP', 'GAIN', 'HETLOSS', 'HMODEL', 'UP', 'DOWN']\n   * Note that this is NOT a standard plotly colorscale.\n   */\n  colorscale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object]),\n\n  /**\n   * Default color for the tracks, in common name, hex, rgb or rgba format.\n   * If left blank, will default to a light grey rgb(190, 190, 190).\n   */\n  backgroundcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   *.Toogles whether or not to show a legend on the right side of the plot,\n   * with mutation information.\n   */\n  range: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,\n\n  /**\n   *.Toogles whether or not to show a legend on the right side of the plot,\n   * with mutation information.\n   */\n  showlegend: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   *.Toogles whether or not to show a heatmap overview of the tracks.\n   */\n  showoverview: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * Width of the OncoPrint.\n   * Will disable auto-resizing of plots if set.\n   */\n  width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),\n\n  /**\n   * Height of the OncoPrint.\n   * Will disable auto-resizing of plots if set.\n   */\n  height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string])\n};\nOncoPrint.defaultProps = {\n  // Layout\n  padding: 0.05,\n  colorscale: null,\n  backgroundcolor: 'rgb(190, 190, 190)',\n  range: [null, null],\n  showlegend: true,\n  showoverview: true,\n  width: null,\n  height: 500\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/OncoPrint.react.js?");

/***/ }),

/***/ "./src/lib/components/SequenceViewer.react.js":
/*!****************************************************!*\
  !*** ./src/lib/components/SequenceViewer.react.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return SequenceViewer; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_sequence_viewer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-sequence-viewer */ \"./node_modules/react-sequence-viewer/lib/index.js\");\n/* harmony import */ var react_sequence_viewer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_sequence_viewer__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n/**\n * The sequence viewer component is used to display sequences\n * that represent proteins, strands of genomic information, and\n * more. It can apply a coverage to the sequence supplied (with\n * clickable coverage sections that can display specific information,\n * and an optional legend to describe the color codes used),\n * search through the sequence for specific regex, capture\n * mouse selection events of subparts of the sequence, display a\n * count of the number of nucleotides or amino acids in the\n * sequence,\n * Read more about the component here:\n * https://github.com/FlyBase/react-sequence-viewer\n */\n\nvar SequenceViewer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(SequenceViewer, _Component);\n\n  function SequenceViewer(props) {\n    var _this;\n\n    _classCallCheck(this, SequenceViewer);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(SequenceViewer).call(this, props));\n    _this.onMouseSelection = _this.onMouseSelection.bind(_assertThisInitialized(_this));\n    _this.onSubpartSelected = _this.onSubpartSelected.bind(_assertThisInitialized(_this));\n    _this.getOnClick = _this.getOnClick.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(SequenceViewer, [{\n    key: \"onMouseSelection\",\n    value: function onMouseSelection(e) {\n      if (e.detail) {\n        this.props.setProps({\n          mouseSelection: e.detail\n        });\n      }\n    }\n  }, {\n    key: \"onSubpartSelected\",\n    value: function onSubpartSelected(e) {\n      if (e.detail) {\n        this.props.setProps({\n          subpartSelected: e.detail\n        });\n      }\n    }\n  }, {\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps, _) {\n      var _this$props = this.props,\n          showLineNumbers = _this$props.showLineNumbers,\n          wrapAminoAcids = _this$props.wrapAminoAcids,\n          charsPerLine = _this$props.charsPerLine,\n          toolbar = _this$props.toolbar,\n          search = _this$props.search,\n          sequence = _this$props.sequence,\n          title = _this$props.title,\n          sequenceMaxHeight = _this$props.sequenceMaxHeight,\n          badge = _this$props.badge,\n          coverage = _this$props.coverage,\n          selection = _this$props.selection,\n          legend = _this$props.legend;\n\n      if (showLineNumbers !== nextProps.showLineNumbers || wrapAminoAcids !== nextProps.wrapAminoAcids || charsPerLine !== nextProps.charsPerLine || toolbar !== nextProps.toolbar || search !== nextProps.search || title !== nextProps.title || sequenceMaxHeight !== nextProps.sequenceMaxHeight || badge !== nextProps.badge || legend !== nextProps.legend || sequence !== nextProps.sequence) {\n        return true;\n      } // go through selection\n      // save some time by comparing lengths first\n\n\n      if (selection.length !== nextProps.selection.length) {\n        return true;\n      }\n\n      if (Object.keys(selection).some(function (propertyName) {\n        return selection[propertyName] !== nextProps.selection[propertyName];\n      })) {\n        return true;\n      } // otherwise, go through all of the coverage and compare\n\n\n      if (coverage.length !== nextProps.coverage.length || coverage.some(function (cov, i) {\n        return Object.keys(cov).some(function (propertyName) {\n          return coverage[i][propertyName] !== nextProps.coverage[i][propertyName];\n        });\n      })) {\n        return true;\n      } // if everything is the same, do not update\n\n\n      return false;\n    }\n  }, {\n    key: \"getOnClick\",\n    value: function getOnClick(i) {\n      var _this2 = this;\n\n      return function (_) {\n        _this2.props.setProps({\n          coverageClicked: i\n        });\n      };\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, _) {\n      var coverage = this.props.coverage;\n\n      if (coverage.length !== prevProps.coverage.length || coverage.some(function (cov, i) {\n        return Object.keys(cov).some(function (propertyName) {\n          return coverage[i][propertyName] !== prevProps.coverage[i][propertyName];\n        });\n      })) {\n        for (var i = 0; i < coverage.length; i++) {\n          coverage[i].onclick = this.getOnClick(i);\n        } // force update to ensure that all onclick events have registered\n\n\n        this.forceUpdate();\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var options = {\n        id: this.props.id,\n        coverage: this.props.coverage,\n        selection: this.props.selection,\n        setProps: this.props.setProps,\n        showLineNumbers: this.props.showLineNumbers,\n        wrapAminoAcids: this.props.wrapAminoAcids,\n        charsPerLine: this.props.charsPerLine,\n        toolbar: this.props.toolbar,\n        search: this.props.search,\n        title: this.props.title,\n        sequenceMaxHeight: this.props.sequenceMaxHeight,\n        badge: this.props.badge,\n        onMouseSelection: this.onMouseSelection,\n        onSubpartSelected: this.onSubpartSelected,\n        legend: this.props.legend\n      };\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_sequence_viewer__WEBPACK_IMPORTED_MODULE_2___default.a, _extends({\n        sequence: this.props.sequence\n      }, options));\n    }\n  }]);\n\n  return SequenceViewer;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nSequenceViewer.defaultProps = {\n  sequence: '-',\n  showLineNumbers: true,\n  wrapAminoAcids: true,\n  charsPerLine: 40,\n  toolbar: false,\n  search: true,\n  title: '',\n  sequenceMaxHeight: '400px',\n  badge: true,\n  selection: [],\n  coverage: []\n};\nSequenceViewer.propTypes = {\n  /**\n   * The ID used to identify this component in Dash callbacks.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The amino acid sequence that will be displayed.\n   */\n  sequence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The option of whether or not to display line numbers.\n   */\n  showLineNumbers: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * The option of whether or not to display the list of amino acids\n   * as broken up into separate lines of a fixed length set by\n   * charsPerLine.\n   */\n  wrapAminoAcids: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * The number of amino acids that will display per line.\n   */\n  charsPerLine: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * The option of whether or not to display a toolbar at the top\n   * that allows the user to choose the number of letters per line.\n   */\n  toolbar: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * The option of whether or not to include a search bar in\n   * the header. This supports regex.\n   */\n  search: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * A string that displays at the top of the component.\n   */\n  title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The maximum height of the sequence.\n   */\n  sequenceMaxHeight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The option of whether or not to display a badge showing the\n   * amino acid count at the top of the component beside the title.\n   */\n  badge: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * A highlighted section of the sequence; the color of the highlight\n   * can also be defined. Takes a list of format [min, max, color] where\n   * min is a number that represents the starting index of the selection,\n   * max is a number that represents the stopping index of the selection,\n   * and color is a string that defines the highlight color.\n   * Cannot be used at the same time as coverage.\n   */\n  selection: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    low: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    high: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string\n  })),\n\n  /**\n   * A coverage of the entire sequence; each section of the sequence\n   * can have its own text color, background color, tooltip (on hover),\n   * and an optional underscore. The props start and end represent the\n   * beginning and terminating indices of the section in question.\n   * Cannot be used at the same time as selection.\n   */\n  coverage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    end: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    bgcolor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    tooltip: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    underscore: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n    onclick: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func\n  })),\n\n  /**\n   * A legend corresponding to the color codes above (optionally displayed).\n   */\n  legend: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    underscore: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool\n  })),\n\n  /**\n   * Contains the index of the section that was clicked last in\n   * the coverage list supplied.\n   */\n  coverageClicked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n  /**\n   * Contains information about the subsequence selected\n   * by the mouse. Start and end refer to the initial and\n   * final indices, respectively, of the subsequence, and\n   * \"selection\" contains the string that is selected.\n   */\n  mouseSelection: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    end: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    selection: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string\n  }),\n\n  /**\n   * A list of the subparts selected using the\n   * \"search\" function or the \"selection\" property.\n   */\n  subpartSelected: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    end: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    sequence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string\n  })),\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/SequenceViewer.react.js?");

/***/ }),

/***/ "./src/lib/components/Speck.react.js":
/*!*******************************************!*\
  !*** ./src/lib/components/Speck.react.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Speck; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ \"./node_modules/ramda/es/index.js\");\n/* harmony import */ var fast_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! fast-memoize */ \"./node_modules/fast-memoize/src/index.js\");\n/* harmony import */ var fast_memoize__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(fast_memoize__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var speck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! speck */ \"./node_modules/speck/build/index.js\");\n/* harmony import */ var speck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(speck__WEBPACK_IMPORTED_MODULE_4__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\n\n\n/**\n * Define private functions and variables used in the Speck component.\n **/\n// Time (in milliseconds) idle before props reconciliation with external\n// view is done\n\nvar PROPS_RECONCILE_DEBOUNCE_TIME = 500;\nvar generateSystem = fast_memoize__WEBPACK_IMPORTED_MODULE_3___default()(function (data) {\n  var system = speck__WEBPACK_IMPORTED_MODULE_4__[\"speckSystem\"].new();\n\n  for (var i = 0; i < data.length; i++) {\n    // get the coordinate data\n    var a = data[i]; // add to the system\n\n    speck__WEBPACK_IMPORTED_MODULE_4__[\"speckSystem\"].addAtom(system, a.symbol, a.x, a.y, a.z);\n  }\n\n  speck__WEBPACK_IMPORTED_MODULE_4__[\"speckSystem\"].center(system);\n  speck__WEBPACK_IMPORTED_MODULE_4__[\"speckSystem\"].calculateBonds(system);\n  return system;\n});\n\nvar viewClone = function viewClone(view) {\n  return Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"mergeAll\"])([view, {\n    rotation: new Float32Array(view.rotation),\n    translation: Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"mergeAll\"])([view.translation])\n  }]);\n};\n\nvar viewAssign = function viewAssign() {\n  var view1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var view2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign(view1, view2);\n};\n\nvar viewHasEqual = function viewHasEqual(view1) {\n  var view1Str = JSON.stringify(view1);\n\n  for (var i = 1; i < arguments.length; i++) {\n    if (view1Str === JSON.stringify(arguments[i])) {\n      return true;\n    }\n  }\n\n  return false;\n};\n/**\n * The Speck component is a WebGL-based 3D molecule renderer.\n * Read more about the component here:\n * https://github.com/wwwtyro/speck\n **/\n\n\nvar Speck =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(Speck, _Component);\n\n  function Speck(props) {\n    var _this;\n\n    _classCallCheck(this, Speck);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Speck).call(this, props));\n    _this.state = {\n      renderer: null\n    };\n\n    _this.eventListenDestructor = function () {\n      /* no-op */\n    };\n\n    _this.refreshView = false;\n    _this.propsReconcileTimeout = null;\n    _this.view = viewAssign(speck__WEBPACK_IMPORTED_MODULE_4__[\"speckView\"].new(), props.view);\n\n    _this.props.setProps({\n      view: viewClone(_this.view)\n    }); // setting refs in this way to allow for easier updating to\n    // react 16\n\n\n    _this.setCanvasRef = function (e) {\n      _this.canvas = e;\n    };\n\n    _this.setContainerRef = function (e) {\n      _this.container = e;\n    };\n\n    _this.loop = _this.loop.bind(_assertThisInitialized(_this));\n    _this.loadStructure = _this.loadStructure.bind(_assertThisInitialized(_this));\n    _this.propsReconcile = _this.propsReconcile.bind(_assertThisInitialized(_this));\n    _this.propsReconcileSchedule = _this.propsReconcileSchedule.bind(_assertThisInitialized(_this));\n    return _this;\n  }\n\n  _createClass(Speck, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var _this2 = this;\n\n      var scrollZoom = this.props.scrollZoom;\n      var canvas = this.canvas,\n          container = this.container;\n      var resolution = 200;\n      var aoResolution = 300;\n      var renderer = new speck__WEBPACK_IMPORTED_MODULE_4__[\"speckRenderer\"](canvas, resolution, aoResolution);\n      this.setState({\n        renderer: renderer\n      }, this.loadStructure); // add event listeners\n\n      this.eventListenDestructor = Object(speck__WEBPACK_IMPORTED_MODULE_4__[\"speckInteractions\"])({\n        scrollZoom: scrollZoom,\n        container: container,\n        getRotation: function getRotation() {\n          return _this2.view.rotation;\n        },\n        setRotation: function setRotation(rotationObj) {\n          _this2.view = viewAssign(_this2.view, {\n            rotation: rotationObj\n          });\n\n          _this2.propsReconcileSchedule();\n        },\n        getTranslation: function getTranslation() {\n          return _this2.view.translation;\n        },\n        setTranslation: function setTranslation(translationObj) {\n          _this2.view = viewAssign(_this2.view, {\n            translation: translationObj\n          });\n\n          _this2.propsReconcileSchedule();\n        },\n        getZoom: function getZoom() {\n          return _this2.view.zoom;\n        },\n        setZoom: function setZoom(zoomVal) {\n          _this2.view = viewAssign(_this2.view, {\n            zoom: zoomVal\n          });\n\n          _this2.propsReconcileSchedule();\n        },\n        refreshView: function refreshView() {\n          return _this2.refreshView = true;\n        }\n      });\n      this.loop();\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps) {\n      var _this$props = this.props,\n          data = _this$props.data,\n          view = _this$props.view,\n          presetView = _this$props.presetView;\n      var renderer = this.state.renderer;\n      var viewInternal = this.view;\n      var needsUpdate = false; // apply applicable preset parameters if preset has changed\n\n      if (prevProps.presetView !== presetView) {\n        viewInternal = viewAssign(viewInternal, speck__WEBPACK_IMPORTED_MODULE_4__[\"speckPresetViews\"][presetView]);\n        this.propsReconcileSchedule();\n        needsUpdate = true;\n      } // apply the user-supplied view parameters\n\n\n      if (!viewHasEqual(view, prevProps.view, viewInternal)) {\n        viewInternal = viewAssign(viewInternal, view);\n        needsUpdate = true;\n      } // check for changes to data\n\n\n      if (!Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"equals\"])(data, prevProps.data)) {\n        needsUpdate = true;\n      } // perform update\n\n\n      if (needsUpdate) {\n        this.view = viewInternal;\n\n        if (renderer) {\n          this.loadStructure();\n        }\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      // set this.state.renderer = null to ensure all refs to renderer are\n      // destroyed so garbage collector will clean up webgl contexts\n      // eslint-disable-next-line react/no-direct-mutation-state\n      this.state.renderer = null;\n      this.eventListenDestructor();\n      this.props.setProps({\n        view: this.view\n      });\n    }\n  }, {\n    key: \"propsReconcile\",\n    value: function propsReconcile() {\n      if (!Object(ramda__WEBPACK_IMPORTED_MODULE_2__[\"equals\"])(this.view, this.props.view)) {\n        this.props.setProps({\n          view: viewClone(this.view)\n        });\n      }\n    } // Schedule the function \"propsReconcile\" to run after the amount of time\n    // specified in PROPS_RECONCILE_DEBOUNCE_TIME. If a run has been scheduled\n    // previously, cancel it.\n\n  }, {\n    key: \"propsReconcileSchedule\",\n    value: function propsReconcileSchedule() {\n      clearTimeout(this.propsReconcileTimeout);\n      this.propsReconcileTimeout = setTimeout(this.propsReconcile, PROPS_RECONCILE_DEBOUNCE_TIME);\n    }\n  }, {\n    key: \"loadStructure\",\n    value: function loadStructure() {\n      var data = this.props.data; // avoid trying to load an empty system\n\n      if (data.length === 0) {\n        return;\n      }\n\n      var renderer = this.state.renderer;\n      var view = this.view;\n      var system = generateSystem(data);\n      renderer.setSystem(system, view); // update the resolution\n\n      renderer.setResolution(view.resolution, view.aoRes);\n      this.refreshView = true;\n    }\n  }, {\n    key: \"loop\",\n    value: function loop() {\n      if (this.state.renderer && this.view) {\n        if (this.refreshView) {\n          this.state.renderer.reset();\n          this.refreshView = false;\n        }\n\n        this.state.renderer.render(this.view);\n      }\n\n      requestAnimationFrame(this.loop);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var id = this.props.id;\n      var view = this.view;\n      var divStyle = {\n        height: view.resolution,\n        width: view.resolution\n      };\n      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n        id: id,\n        ref: this.setContainerRef,\n        style: divStyle\n      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"canvas\", {\n        ref: this.setCanvasRef,\n        width: view.resolution,\n        height: view.resolution\n      }));\n    }\n  }]);\n\n  return Speck;\n}(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n\nSpeck.defaultProps = {\n  view: speck__WEBPACK_IMPORTED_MODULE_4__[\"speckView\"].new(),\n  data: []\n};\nSpeck.propTypes = {\n  /**\n   * The ID used to identify this component in Dash callbacks.\n   */\n  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n\n  /**\n   * The xyz file data; a list of atoms such that each atom\n   * has a dictionary defining the x, y, and z coordinates\n   * along with the atom's symbol.\n   */\n  data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    symbol: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,\n    x: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    y: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    z: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number\n  })),\n\n  /**\n   * The option of whether or not to allow scrolling to control\n   * the zoom.\n   */\n  scrollZoom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n  /**\n   * An object that determines and controls various parameters\n   * related to how the molecule is displayed.\n   */\n  view: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n    aspect: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    zoom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    translation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({\n      x: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n      y: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number\n    }),\n    atomScale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    relativeAtomScale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    bondScale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    rotation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({}),\n    ao: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    aoRes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    brightness: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    outline: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    spf: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    bonds: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n    bondThreshold: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    bondShade: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    atomShade: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    resolution: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    dofStrength: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    dofPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n    fxaa: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number\n  }),\n\n  /**\n   * One of several pre-loaded views: default, stick-ball, toon,\n   * and licorice\n   */\n  presetView: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['default', 'stickball', 'toon', 'licorice']),\n\n  /**\n   * Dash-assigned callback that should be called whenever any of the\n   * properties change.\n   */\n  setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func\n};\n\n//# sourceURL=webpack://dash_bio/./src/lib/components/Speck.react.js?");

/***/ }),

/***/ "./src/lib/constants/tracks.js":
/*!*************************************!*\
  !*** ./src/lib/constants/tracks.js ***!
  \*************************************/
/*! exports provided: CHORDS, HEATMAP, HIGHLIGHT, HISTOGRAM, LINE, SCATTER, STACK, TEXT, TRACK_TYPES */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CHORDS\", function() { return CHORDS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HEATMAP\", function() { return HEATMAP; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HIGHLIGHT\", function() { return HIGHLIGHT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HISTOGRAM\", function() { return HISTOGRAM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LINE\", function() { return LINE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SCATTER\", function() { return SCATTER; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STACK\", function() { return STACK; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TEXT\", function() { return TEXT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TRACK_TYPES\", function() { return TRACK_TYPES; });\nvar CHORDS = 'CHORDS';\nvar HEATMAP = 'HEATMAP';\nvar HIGHLIGHT = 'HIGHLIGHT';\nvar HISTOGRAM = 'HISTOGRAM';\nvar LINE = 'LINE';\nvar SCATTER = 'SCATTER';\nvar STACK = 'STACK';\nvar TEXT = 'TEXT';\nvar TRACK_TYPES = [CHORDS, HEATMAP, HIGHLIGHT, HISTOGRAM, LINE, SCATTER, STACK, TEXT];\n\n//# sourceURL=webpack://dash_bio/./src/lib/constants/tracks.js?");

/***/ }),

/***/ "./src/lib/index.js":
/*!**************************!*\
  !*** ./src/lib/index.js ***!
  \**************************/
/*! exports provided: AlignmentChart, AlignmentViewer, Circos, Ideogram, Molecule2dViewer, Molecule3dViewer, NeedlePlot, OncoPrint, SequenceViewer, Speck */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_AlignmentChart_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/AlignmentChart.react */ \"./src/lib/components/AlignmentChart.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AlignmentChart\", function() { return _components_AlignmentChart_react__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _components_AlignmentViewer_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/AlignmentViewer.react */ \"./src/lib/components/AlignmentViewer.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AlignmentViewer\", function() { return _components_AlignmentViewer_react__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _components_Circos_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Circos.react */ \"./src/lib/components/Circos.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Circos\", function() { return _components_Circos_react__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _components_Ideogram_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/Ideogram.react */ \"./src/lib/components/Ideogram.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Ideogram\", function() { return _components_Ideogram_react__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _components_Molecule2dViewer_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/Molecule2dViewer.react */ \"./src/lib/components/Molecule2dViewer.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Molecule2dViewer\", function() { return _components_Molecule2dViewer_react__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _components_Molecule3dViewer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/Molecule3dViewer */ \"./src/lib/components/Molecule3dViewer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Molecule3dViewer\", function() { return _components_Molecule3dViewer__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _components_NeedlePlot_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/NeedlePlot.react */ \"./src/lib/components/NeedlePlot.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"NeedlePlot\", function() { return _components_NeedlePlot_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _components_OncoPrint_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/OncoPrint.react */ \"./src/lib/components/OncoPrint.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"OncoPrint\", function() { return _components_OncoPrint_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _components_SequenceViewer_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/SequenceViewer.react */ \"./src/lib/components/SequenceViewer.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SequenceViewer\", function() { return _components_SequenceViewer_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _components_Speck_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/Speck.react */ \"./src/lib/components/Speck.react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Speck\", function() { return _components_Speck_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* eslint-disable import/prefer-default-export */\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://dash_bio/./src/lib/index.js?");

/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("(function() { module.exports = window[\"React\"]; }());\n\n//# sourceURL=webpack://dash_bio/external_%22React%22?");

/***/ }),

/***/ "react-dom":
/*!***************************!*\
  !*** external "ReactDOM" ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("(function() { module.exports = window[\"ReactDOM\"]; }());\n\n//# sourceURL=webpack://dash_bio/external_%22ReactDOM%22?");

/***/ })

/******/ });